tlv

package
v0.0.0-...-f69728f Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

@generated by the gondn_tlv_gen, DO NOT modify manually

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdvEntry

type AdvEntry struct {
	//+field:struct:Destination
	Destination *Destination `tlv:"0xCC"`
	//+field:struct:Destination
	NextHop *Destination `tlv:"0xCE"`
	//+field:natural
	Cost uint64 `tlv:"0xD0"`
	//+field:natural
	OtherCost uint64 `tlv:"0xD2"`
}

func ParseAdvEntry

func ParseAdvEntry(reader enc.ParseReader, ignoreCritical bool) (*AdvEntry, error)

func (*AdvEntry) Bytes

func (value *AdvEntry) Bytes() []byte

func (*AdvEntry) Encode

func (value *AdvEntry) Encode() enc.Wire

type AdvEntryEncoder

type AdvEntryEncoder struct {
	Destination_encoder DestinationEncoder
	NextHop_encoder     DestinationEncoder
	// contains filtered or unexported fields
}

func (*AdvEntryEncoder) Encode

func (encoder *AdvEntryEncoder) Encode(value *AdvEntry) enc.Wire

func (*AdvEntryEncoder) EncodeInto

func (encoder *AdvEntryEncoder) EncodeInto(value *AdvEntry, buf []byte)

func (*AdvEntryEncoder) Init

func (encoder *AdvEntryEncoder) Init(value *AdvEntry)

type AdvEntryParsingContext

type AdvEntryParsingContext struct {
	Destination_context DestinationParsingContext
	NextHop_context     DestinationParsingContext
}

func (*AdvEntryParsingContext) Init

func (context *AdvEntryParsingContext) Init()

func (*AdvEntryParsingContext) Parse

func (context *AdvEntryParsingContext) Parse(reader enc.ParseReader, ignoreCritical bool) (*AdvEntry, error)
type Advertisement struct {
	//+field:sequence:*AdvEntry:struct:AdvEntry
	Entries []*AdvEntry `tlv:"0xCA"`
}

func ParseAdvertisement

func ParseAdvertisement(reader enc.ParseReader, ignoreCritical bool) (*Advertisement, error)

func (*Advertisement) Bytes

func (value *Advertisement) Bytes() []byte

func (*Advertisement) Encode

func (value *Advertisement) Encode() enc.Wire

type AdvertisementEncoder

type AdvertisementEncoder struct {
	Entries_subencoder []struct {
		Entries_encoder AdvEntryEncoder
	}
	// contains filtered or unexported fields
}

func (*AdvertisementEncoder) Encode

func (encoder *AdvertisementEncoder) Encode(value *Advertisement) enc.Wire

func (*AdvertisementEncoder) EncodeInto

func (encoder *AdvertisementEncoder) EncodeInto(value *Advertisement, buf []byte)

func (*AdvertisementEncoder) Init

func (encoder *AdvertisementEncoder) Init(value *Advertisement)

type AdvertisementParsingContext

type AdvertisementParsingContext struct {
	Entries_context AdvEntryParsingContext
}

func (*AdvertisementParsingContext) Init

func (context *AdvertisementParsingContext) Init()

func (*AdvertisementParsingContext) Parse

func (context *AdvertisementParsingContext) Parse(reader enc.ParseReader, ignoreCritical bool) (*Advertisement, error)

type Destination

type Destination struct {
	//+field:name
	Name enc.Name `tlv:"0x07"`
}

func ParseDestination

func ParseDestination(reader enc.ParseReader, ignoreCritical bool) (*Destination, error)

func (*Destination) Bytes

func (value *Destination) Bytes() []byte

func (*Destination) Encode

func (value *Destination) Encode() enc.Wire

type DestinationEncoder

type DestinationEncoder struct {
	Name_length uint
	// contains filtered or unexported fields
}

func (*DestinationEncoder) Encode

func (encoder *DestinationEncoder) Encode(value *Destination) enc.Wire

func (*DestinationEncoder) EncodeInto

func (encoder *DestinationEncoder) EncodeInto(value *Destination, buf []byte)

func (*DestinationEncoder) Init

func (encoder *DestinationEncoder) Init(value *Destination)

type DestinationParsingContext

type DestinationParsingContext struct {
}

func (*DestinationParsingContext) Init

func (context *DestinationParsingContext) Init()

func (*DestinationParsingContext) Parse

func (context *DestinationParsingContext) Parse(reader enc.ParseReader, ignoreCritical bool) (*Destination, error)

type Packet

type Packet struct {
	//+field:struct:Advertisement
	Advertisement *Advertisement `tlv:"0xC9"`
	//+field:struct:PrefixOpList
	PrefixOpList *PrefixOpList `tlv:"0x12D"`
}

func ParsePacket

func ParsePacket(reader enc.ParseReader, ignoreCritical bool) (*Packet, error)

func (*Packet) Bytes

func (value *Packet) Bytes() []byte

func (*Packet) Encode

func (value *Packet) Encode() enc.Wire

type PacketEncoder

type PacketEncoder struct {
	Advertisement_encoder AdvertisementEncoder
	PrefixOpList_encoder  PrefixOpListEncoder
	// contains filtered or unexported fields
}

func (*PacketEncoder) Encode

func (encoder *PacketEncoder) Encode(value *Packet) enc.Wire

func (*PacketEncoder) EncodeInto

func (encoder *PacketEncoder) EncodeInto(value *Packet, buf []byte)

func (*PacketEncoder) Init

func (encoder *PacketEncoder) Init(value *Packet)

type PacketParsingContext

type PacketParsingContext struct {
	Advertisement_context AdvertisementParsingContext
	PrefixOpList_context  PrefixOpListParsingContext
}

func (*PacketParsingContext) Init

func (context *PacketParsingContext) Init()

func (*PacketParsingContext) Parse

func (context *PacketParsingContext) Parse(reader enc.ParseReader, ignoreCritical bool) (*Packet, error)

type PrefixOpAdd

type PrefixOpAdd struct {
	//+field:name
	Name enc.Name `tlv:"0x07"`
	//+field:natural
	Cost uint64 `tlv:"0xD0"`
}

func ParsePrefixOpAdd

func ParsePrefixOpAdd(reader enc.ParseReader, ignoreCritical bool) (*PrefixOpAdd, error)

func (*PrefixOpAdd) Bytes

func (value *PrefixOpAdd) Bytes() []byte

func (*PrefixOpAdd) Encode

func (value *PrefixOpAdd) Encode() enc.Wire

type PrefixOpAddEncoder

type PrefixOpAddEncoder struct {
	Name_length uint
	// contains filtered or unexported fields
}

func (*PrefixOpAddEncoder) Encode

func (encoder *PrefixOpAddEncoder) Encode(value *PrefixOpAdd) enc.Wire

func (*PrefixOpAddEncoder) EncodeInto

func (encoder *PrefixOpAddEncoder) EncodeInto(value *PrefixOpAdd, buf []byte)

func (*PrefixOpAddEncoder) Init

func (encoder *PrefixOpAddEncoder) Init(value *PrefixOpAdd)

type PrefixOpAddParsingContext

type PrefixOpAddParsingContext struct {
}

func (*PrefixOpAddParsingContext) Init

func (context *PrefixOpAddParsingContext) Init()

func (*PrefixOpAddParsingContext) Parse

func (context *PrefixOpAddParsingContext) Parse(reader enc.ParseReader, ignoreCritical bool) (*PrefixOpAdd, error)

type PrefixOpList

type PrefixOpList struct {
	//+field:struct:Destination
	ExitRouter *Destination `tlv:"0xCC"`
	//+field:bool
	PrefixOpReset bool `tlv:"0x12E"`
	//+field:sequence:*PrefixOpAdd:struct:PrefixOpAdd
	PrefixOpAdds []*PrefixOpAdd `tlv:"0x130"`
	//+field:sequence:*PrefixOpRemove:struct:PrefixOpRemove
	PrefixOpRemoves []*PrefixOpRemove `tlv:"0x132"`
}

func ParsePrefixOpList

func ParsePrefixOpList(reader enc.ParseReader, ignoreCritical bool) (*PrefixOpList, error)

func (*PrefixOpList) Bytes

func (value *PrefixOpList) Bytes() []byte

func (*PrefixOpList) Encode

func (value *PrefixOpList) Encode() enc.Wire

type PrefixOpListEncoder

type PrefixOpListEncoder struct {
	ExitRouter_encoder DestinationEncoder

	PrefixOpAdds_subencoder []struct {
		PrefixOpAdds_encoder PrefixOpAddEncoder
	}
	PrefixOpRemoves_subencoder []struct {
		PrefixOpRemoves_encoder PrefixOpRemoveEncoder
	}
	// contains filtered or unexported fields
}

func (*PrefixOpListEncoder) Encode

func (encoder *PrefixOpListEncoder) Encode(value *PrefixOpList) enc.Wire

func (*PrefixOpListEncoder) EncodeInto

func (encoder *PrefixOpListEncoder) EncodeInto(value *PrefixOpList, buf []byte)

func (*PrefixOpListEncoder) Init

func (encoder *PrefixOpListEncoder) Init(value *PrefixOpList)

type PrefixOpListParsingContext

type PrefixOpListParsingContext struct {
	ExitRouter_context DestinationParsingContext

	PrefixOpAdds_context    PrefixOpAddParsingContext
	PrefixOpRemoves_context PrefixOpRemoveParsingContext
}

func (*PrefixOpListParsingContext) Init

func (context *PrefixOpListParsingContext) Init()

func (*PrefixOpListParsingContext) Parse

func (context *PrefixOpListParsingContext) Parse(reader enc.ParseReader, ignoreCritical bool) (*PrefixOpList, error)

type PrefixOpRemove

type PrefixOpRemove struct {
	//+field:name
	Name enc.Name `tlv:"0x07"`
}

func ParsePrefixOpRemove

func ParsePrefixOpRemove(reader enc.ParseReader, ignoreCritical bool) (*PrefixOpRemove, error)

func (*PrefixOpRemove) Bytes

func (value *PrefixOpRemove) Bytes() []byte

func (*PrefixOpRemove) Encode

func (value *PrefixOpRemove) Encode() enc.Wire

type PrefixOpRemoveEncoder

type PrefixOpRemoveEncoder struct {
	Name_length uint
	// contains filtered or unexported fields
}

func (*PrefixOpRemoveEncoder) Encode

func (encoder *PrefixOpRemoveEncoder) Encode(value *PrefixOpRemove) enc.Wire

func (*PrefixOpRemoveEncoder) EncodeInto

func (encoder *PrefixOpRemoveEncoder) EncodeInto(value *PrefixOpRemove, buf []byte)

func (*PrefixOpRemoveEncoder) Init

func (encoder *PrefixOpRemoveEncoder) Init(value *PrefixOpRemove)

type PrefixOpRemoveParsingContext

type PrefixOpRemoveParsingContext struct {
}

func (*PrefixOpRemoveParsingContext) Init

func (context *PrefixOpRemoveParsingContext) Init()

func (*PrefixOpRemoveParsingContext) Parse

func (context *PrefixOpRemoveParsingContext) Parse(reader enc.ParseReader, ignoreCritical bool) (*PrefixOpRemove, error)

Jump to

Keyboard shortcuts

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