meter

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const IPV6_TLV_PAD1 = 0
View Source
const MAX_SEGMENTLIST_ENTRIES = 10

Variables

View Source
var HBHLayerType = gopacket.RegisterLayerType(
	2002,
	gopacket.LayerTypeMetadata{
		Name:    "HBHLayerType",
		Decoder: gopacket.DecodeFunc(decodeHBHLayer),
	},
)
View Source
var Srv6LayerType = gopacket.RegisterLayerType(
	2001,
	gopacket.LayerTypeMetadata{
		Name:    "Srv6LayerType",
		Decoder: gopacket.DecodeFunc(decodeSrv6Layer),
	},
)

Functions

This section is empty.

Types

type HBHLayer

type HBHLayer struct {
	layers.BaseLayer
	NextHeader uint8
	Length     uint8
	Options    []IoamOption
}

func (*HBHLayer) DecodeFromBytes

func (l *HBHLayer) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error

func (*HBHLayer) LayerType

func (l *HBHLayer) LayerType() gopacket.LayerType

func (*HBHLayer) NextLayerType

func (l *HBHLayer) NextLayerType() gopacket.LayerType

func (*HBHLayer) SerializeTo

type IoamOption

type IoamOption struct {
	Type        uint8
	Length      uint8
	Reserved    uint8
	OptionType  uint8
	TraceHeader IoamTrace
}

type IoamTrace

type IoamTrace struct {
	NameSpaceId  uint16
	NodeLen      uint8
	Flags        byte
	RemainingLen uint8
	Type         [3]byte
	Reserved     byte
	NodeDataList []NodeData
}

type NodeData

type NodeData struct {
	HopLimitNodeId   [4]byte
	IngressEgressIds [4]byte
	Second           [4]byte
	Subsecond        [4]byte
}

type ProbeData

type ProbeData struct {
	H_source     string
	H_dest       string
	V6Srcaddr    string
	V6Dstaddr    string
	NextHdr      uint8
	HdrExtLen    uint8
	RoutingType  uint8
	SegmentsLeft uint8
	LastEntry    uint8
	Flags        uint8
	Tag          uint16
	Segments     [MAX_SEGMENTLIST_ENTRIES]string
}

func Parse

func Parse(data []byte) (*ProbeData, error)

type Srv6Layer

type Srv6Layer struct {
	layers.BaseLayer
	NextHeader   uint8
	HdrExtLen    uint8
	RoutingType  uint8
	SegmentsLeft uint8
	LastEntry    uint8
	Flags        uint8
	Tag          uint16
	Segments     []netip.Addr
}

func (*Srv6Layer) DecodeFromBytes

func (i *Srv6Layer) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error

func (*Srv6Layer) LayerType

func (l *Srv6Layer) LayerType() gopacket.LayerType

func (*Srv6Layer) NextLayerType

func (i *Srv6Layer) NextLayerType() gopacket.LayerType

func (*Srv6Layer) SerializeTo

Jump to

Keyboard shortcuts

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