Documentation ¶
Index ¶
- Constants
- Variables
- func IsBGP(payload []byte) bool
- func IsBGPKeepalive(payload []byte) bool
- func IsBGPNotification(payload []byte) bool
- func IsBGPOpen(payload []byte) bool
- func IsBGPUpdate(payload []byte) bool
- func NewDebugNetworkInterface(netIF *p.NetworkInterface) *debugNetworkInterface
- type BGP
- type BGPNotificationStruct
- type BGPUpdateStruct
Constants ¶
View Source
const ( BGP_TYPE_OPEN = 0x01 BGP_TYPE_UPDATE = 0x02 BGP_TYPE_NOTIFICATION = 0x03 BGP_TYPE_KEEPALIVE = 0x04 BGP_TYPE_ROUTERREFRESH = 0x05 )
View Source
const BGP_MAJOR_ERROR_MESSAGE_HEADER_ERROR = 0x01
https://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml#bgp-parameters-3
View Source
const BGP_MINOR_ERROR_CONNECTION_NOT_SYNCHRONIZED = 0x01
View Source
const BGP_PORT = 0x00b3 // 179
View Source
const BGP_VERSION = 0x04
Variables ¶
View Source
var BGP_MARKER = []byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
すべて1の場合は認証なし. TODO: 認証ある場合
Functions ¶
func IsBGPKeepalive ¶ added in v1.0.6
func IsBGPNotification ¶ added in v1.0.6
func IsBGPUpdate ¶ added in v1.0.6
func NewDebugNetworkInterface ¶
func NewDebugNetworkInterface(netIF *p.NetworkInterface) *debugNetworkInterface
Types ¶
type BGP ¶ added in v1.0.6
type BGP struct { Marker []byte // 16byte Length []byte // 2byte Typ byte // 1byte Version byte // 1byte MyAS []byte // 2byte HoldTime []byte // 2byte Identifier []byte // 4byte OptionalParametersLength byte // 1byte OptionalParameters []byte }
func NewBGPKeepalive ¶ added in v1.0.6
func NewBGPKeepalive() *BGP
func NewBGPOpen ¶ added in v1.0.6
func NewBGPOpen() *BGP
func ParsedBGPOpen ¶ added in v1.0.6
type BGPNotificationStruct ¶ added in v1.0.6
type BGPNotificationStruct struct { Marker []byte // 16byte Length []byte // 2byte Typ byte // 1byte MajorErrorCode byte // 1byte MinorErrorCode byte // 1byte }
上の BGP strucct とフィールドが微妙に異なる
func NewBGPNotification ¶ added in v1.0.6
func NewBGPNotification() *BGPNotificationStruct
func (*BGPNotificationStruct) Bytes ¶ added in v1.0.6
func (bn *BGPNotificationStruct) Bytes() []byte
type BGPUpdateStruct ¶ added in v1.0.6
type BGPUpdateStruct struct { Marker []byte // 16byte Length []byte // 2byte Typ byte // 1byte WithdrawnRoutesLength []byte // 2byte TotalPathAttributeLength []byte // 2byte }
上の BGP strucct とフィールドが微妙に異なる
func NewBGPUpdate ¶ added in v1.0.6
func NewBGPUpdate() *BGPUpdateStruct
func ParsedBGPUpdate ¶ added in v1.0.6
func ParsedBGPUpdate(payload []byte) *BGPUpdateStruct
func (*BGPUpdateStruct) Bytes ¶ added in v1.0.6
func (bu *BGPUpdateStruct) Bytes() []byte
Click to show internal directories.
Click to hide internal directories.