rtr

package
v3.32.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

View Source
const (
	RTR_SERIAL_NOTIFY = iota
	RTR_SERIAL_QUERY
	RTR_RESET_QUERY
	RTR_CACHE_RESPONSE
	RTR_IPV4_PREFIX

	RTR_IPV6_PREFIX
	RTR_END_OF_DATA
	RTR_CACHE_RESET

	RTR_ERROR_REPORT
)
View Source
const (
	RTR_SERIAL_NOTIFY_LEN         = 12
	RTR_SERIAL_QUERY_LEN          = 12
	RTR_RESET_QUERY_LEN           = 8
	RTR_CACHE_RESPONSE_LEN        = 8
	RTR_IPV4_PREFIX_LEN           = 20
	RTR_IPV6_PREFIX_LEN           = 32
	RTR_END_OF_DATA_LEN           = 12
	RTR_CACHE_RESET_LEN           = 8
	RTR_MIN_LEN                   = 8
	RTR_ERROR_REPORT_ERR_PDU_LEN  = 4
	RTR_ERROR_REPORT_ERR_TEXT_LEN = 4
)
View Source
const (
	WITHDRAWAL uint8 = iota
	ANNOUNCEMENT
)
View Source
const (
	CORRUPT_DATA uint16 = iota
	INTERNAL_ERROR
	NO_DATA_AVAILABLE
	INVALID_REQUEST
	UNSUPPORTED_PROTOCOL_VERSION
	UNSUPPORTED_PDU_TYPE
	WITHDRAWAL_OF_UNKNOWN_RECORD
	DUPLICATE_ANNOUNCEMENT_RECORD
)
View Source
const (
	RPKI_DEFAULT_PORT = 323
)

Variables

This section is empty.

Functions

func SplitRTR

func SplitRTR(data []byte, atEOF bool) (advance int, token []byte, err error)

Types

type RTRCacheReset

type RTRCacheReset struct {
	RTRReset
}

func NewRTRCacheReset

func NewRTRCacheReset() *RTRCacheReset

type RTRCacheResponse

type RTRCacheResponse struct {
	Version   uint8
	Type      uint8
	SessionID uint16
	Len       uint32
}

func NewRTRCacheResponse

func NewRTRCacheResponse(id uint16) *RTRCacheResponse

func (*RTRCacheResponse) DecodeFromBytes

func (m *RTRCacheResponse) DecodeFromBytes(data []byte) error

func (*RTRCacheResponse) Serialize

func (m *RTRCacheResponse) Serialize() ([]byte, error)

type RTRCommon

type RTRCommon struct {
	Version      uint8
	Type         uint8
	SessionID    uint16
	Len          uint32
	SerialNumber uint32
}

func (*RTRCommon) DecodeFromBytes

func (m *RTRCommon) DecodeFromBytes(data []byte) error

func (*RTRCommon) Serialize

func (m *RTRCommon) Serialize() ([]byte, error)

type RTREndOfData

type RTREndOfData struct {
	RTRCommon
}

func NewRTREndOfData

func NewRTREndOfData(id uint16, sn uint32) *RTREndOfData

type RTRErrorReport

type RTRErrorReport struct {
	Version   uint8
	Type      uint8
	ErrorCode uint16
	Len       uint32
	PDULen    uint32
	PDU       []byte
	TextLen   uint32
	Text      []byte
}

func NewRTRErrorReport

func NewRTRErrorReport(errCode uint16, errPDU []byte, errMsg []byte) *RTRErrorReport

func (*RTRErrorReport) DecodeFromBytes

func (m *RTRErrorReport) DecodeFromBytes(data []byte) error

func (*RTRErrorReport) Serialize

func (m *RTRErrorReport) Serialize() ([]byte, error)

type RTRIPPrefix

type RTRIPPrefix struct {
	Version   uint8
	Type      uint8
	Len       uint32
	Flags     uint8
	PrefixLen uint8
	MaxLen    uint8
	Prefix    net.IP
	AS        uint32
}

func NewRTRIPPrefix

func NewRTRIPPrefix(prefix net.IP, prefixLen, maxLen uint8, as uint32, flags uint8) *RTRIPPrefix

func (*RTRIPPrefix) DecodeFromBytes

func (m *RTRIPPrefix) DecodeFromBytes(data []byte) error

func (*RTRIPPrefix) Serialize

func (m *RTRIPPrefix) Serialize() ([]byte, error)

type RTRMessage

type RTRMessage interface {
	DecodeFromBytes([]byte) error
	Serialize() ([]byte, error)
}

func ParseRTR

func ParseRTR(data []byte) (RTRMessage, error)

type RTRReset

type RTRReset struct {
	Version uint8
	Type    uint8
	Len     uint32
}

func (*RTRReset) DecodeFromBytes

func (m *RTRReset) DecodeFromBytes(data []byte) error

func (*RTRReset) Serialize

func (m *RTRReset) Serialize() ([]byte, error)

type RTRResetQuery

type RTRResetQuery struct {
	RTRReset
}

func NewRTRResetQuery

func NewRTRResetQuery() *RTRResetQuery

type RTRSerialNotify

type RTRSerialNotify struct {
	RTRCommon
}

func NewRTRSerialNotify

func NewRTRSerialNotify(id uint16, sn uint32) *RTRSerialNotify

type RTRSerialQuery

type RTRSerialQuery struct {
	RTRCommon
}

func NewRTRSerialQuery

func NewRTRSerialQuery(id uint16, sn uint32) *RTRSerialQuery

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL