routing

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HeaderType_name = map[int32]string{
		0: "HEADER_TYPE_UNSPECIFIED",
		1: "HEADER_TYPE_IP4",
		2: "HEADER_TYPE_IP6",
		3: "HEADER_TYPE_UDP4",
		4: "HEADER_TYPE_UDP6",
		5: "HEADER_TYPE_MPLS",
	}
	HeaderType_value = map[string]int32{
		"HEADER_TYPE_UNSPECIFIED": 0,
		"HEADER_TYPE_IP4":         1,
		"HEADER_TYPE_IP6":         2,
		"HEADER_TYPE_UDP4":        3,
		"HEADER_TYPE_UDP6":        4,
		"HEADER_TYPE_MPLS":        5,
	}
)

Enum value maps for HeaderType.

View Source
var File_proto_routing_routing_proto protoreflect.FileDescriptor

Functions

func ToLayers

func ToLayers(hdr *Header) []gopacket.SerializableLayer

Types

type Header struct {
	Type    HeaderType `protobuf:"varint,1,opt,name=type,proto3,enum=routing.HeaderType" json:"type,omitempty"`
	SrcIp   string     `protobuf:"bytes,2,opt,name=src_ip,json=srcIp,proto3" json:"src_ip,omitempty"`
	DstIp   string     `protobuf:"bytes,3,opt,name=dst_ip,json=dstIp,proto3" json:"dst_ip,omitempty"`
	SrcPort uint32     `protobuf:"varint,4,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"`
	DstPort uint32     `protobuf:"varint,5,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"`
	Labels  []uint32   `protobuf:"varint,6,rep,packed,name=labels,proto3" json:"labels,omitempty"`
	IpTtl   uint32     `protobuf:"varint,7,opt,name=ip_ttl,json=ipTtl,proto3" json:"ip_ttl,omitempty"`
	// contains filtered or unexported fields
}

func (*Header) Descriptor deprecated

func (*Header) Descriptor() ([]byte, []int)

Deprecated: Use Header.ProtoReflect.Descriptor instead.

func (*Header) GetDstIp

func (x *Header) GetDstIp() string

func (*Header) GetDstPort

func (x *Header) GetDstPort() uint32

func (*Header) GetIpTtl

func (x *Header) GetIpTtl() uint32

func (*Header) GetLabels

func (x *Header) GetLabels() []uint32

func (*Header) GetSrcIp

func (x *Header) GetSrcIp() string

func (*Header) GetSrcPort

func (x *Header) GetSrcPort() uint32

func (*Header) GetType

func (x *Header) GetType() HeaderType

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) ProtoReflect

func (x *Header) ProtoReflect() protoreflect.Message

func (*Header) Reset

func (x *Header) Reset()

func (*Header) String

func (x *Header) String() string

type HeaderType

type HeaderType int32
const (
	HeaderType_HEADER_TYPE_UNSPECIFIED HeaderType = 0
	HeaderType_HEADER_TYPE_IP4         HeaderType = 1
	HeaderType_HEADER_TYPE_IP6         HeaderType = 2
	HeaderType_HEADER_TYPE_UDP4        HeaderType = 3
	HeaderType_HEADER_TYPE_UDP6        HeaderType = 4
	HeaderType_HEADER_TYPE_MPLS        HeaderType = 5
)

func (HeaderType) Descriptor

func (HeaderType) Descriptor() protoreflect.EnumDescriptor

func (HeaderType) Enum

func (x HeaderType) Enum() *HeaderType

func (HeaderType) EnumDescriptor deprecated

func (HeaderType) EnumDescriptor() ([]byte, []int)

Deprecated: Use HeaderType.Descriptor instead.

func (HeaderType) Number

func (x HeaderType) Number() protoreflect.EnumNumber

func (HeaderType) String

func (x HeaderType) String() string

func (HeaderType) Type

type Headers

type Headers struct {
	Headers []*Header `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"`
	// contains filtered or unexported fields
}

func (*Headers) Descriptor deprecated

func (*Headers) Descriptor() ([]byte, []int)

Deprecated: Use Headers.ProtoReflect.Descriptor instead.

func (*Headers) GetHeaders

func (x *Headers) GetHeaders() []*Header

func (*Headers) ProtoMessage

func (*Headers) ProtoMessage()

func (*Headers) ProtoReflect

func (x *Headers) ProtoReflect() protoreflect.Message

func (*Headers) Reset

func (x *Headers) Reset()

func (*Headers) String

func (x *Headers) String() string

Jump to

Keyboard shortcuts

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