pppoepacket

package
v0.0.0-...-8fce991 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

* BBF PPPoE tag encoder/decoder * * Created by João Correia(Altice Labs) on 17/02/2023

* PPPOE VNF decoder * * Created by João Correia(Altice Labs) on 17/02/2023

Index

Constants

View Source
const (
	BBF_VENDOR_ID                = 0x00000DE9
	BBF_CIRCUIT_ID_SUBTAG_NUMBER = 0x01 //TR-101i2 section 8.3
	BBF_REMOTE_ID_SUBTAG_NUMBER  = 0x02 //TR-101i2 section 8.3
)

Variables

View Source
var LayerTypePPPoEDiscovery = gopacket.RegisterLayerType(1000, gopacket.LayerTypeMetadata{Name: "PPPoE Discovery", Decoder: gopacket.DecodeFunc(decodePPPoEDiscovery)})

Functions

func InitPPPoEDecoder

func InitPPPoEDecoder()

Types

type BBFSubTag

type BBFSubTag struct {
	Number uint8
	Length uint8
	Value  []byte
}

func (*BBFSubTag) Serialize

func (p *BBFSubTag) Serialize() []byte

type BBFTagValue

type BBFTagValue struct {
	VendorId uint32
	SubTags  []BBFSubTag
}

func (*BBFTagValue) Serialize

func (p *BBFTagValue) Serialize() []byte

type PPPoEDiscovery

type PPPoEDiscovery struct {
	layers.BaseLayer
	Tags []PPPoETag
}

func (*PPPoEDiscovery) LayerType

func (p *PPPoEDiscovery) LayerType() gopacket.LayerType

LayerType returns gopacket.LayerTypePPPoE.

func (*PPPoEDiscovery) SerializeTo

type PPPoETag

type PPPoETag struct {
	Type  uint16
	Value []byte
}

Jump to

Keyboard shortcuts

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