debugging

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2025 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

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 IsBGP added in v1.0.6

func IsBGP(payload []byte) bool

func IsBGPKeepalive added in v1.0.6

func IsBGPKeepalive(payload []byte) bool

func IsBGPNotification added in v1.0.6

func IsBGPNotification(payload []byte) bool

func IsBGPOpen added in v1.0.6

func IsBGPOpen(payload []byte) bool

func IsBGPUpdate added in v1.0.6

func IsBGPUpdate(payload []byte) bool

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
}

https://support.hpe.com/techhub/eginfolib/networking/docs/switches/3600v2/5998-7619r_l3-ip-rtng_cg/content/442284290.htm

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

func ParsedBGPOpen(payload []byte) *BGP

func (*BGP) Bytes added in v1.0.6

func (b *BGP) Bytes() []byte

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

Jump to

Keyboard shortcuts

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