Documentation
¶
Index ¶
- Constants
- Variables
- func ExtensionFactory(class common.L4ProtocolType, extension *Extension) (common.Extension, error)
- type Extension
- type ExtnE2EDebug
- func (o ExtnE2EDebug) Class() common.L4ProtocolType
- func (o ExtnE2EDebug) Copy() common.Extension
- func (o *ExtnE2EDebug) DecodeFromLayer(extension *Extension) error
- func (o ExtnE2EDebug) Len() int
- func (o ExtnE2EDebug) Pack() (common.RawBytes, error)
- func (o ExtnE2EDebug) Reverse() (bool, error)
- func (o ExtnE2EDebug) String() string
- func (o ExtnE2EDebug) Type() common.ExtnType
- func (o ExtnE2EDebug) Write(b common.RawBytes) error
- type ExtnOHP
- func (o ExtnOHP) Class() common.L4ProtocolType
- func (o ExtnOHP) Copy() common.Extension
- func (o *ExtnOHP) DecodeFromLayer(extension *Extension) error
- func (o ExtnOHP) Len() int
- func (o ExtnOHP) Pack() (common.RawBytes, error)
- func (o ExtnOHP) Reverse() (bool, error)
- func (o ExtnOHP) String() string
- func (o ExtnOHP) Type() common.ExtnType
- func (o ExtnOHP) Write(b common.RawBytes) error
- type ExtnSCMP
- func (e *ExtnSCMP) Class() common.L4ProtocolType
- func (e *ExtnSCMP) Copy() common.Extension
- func (e *ExtnSCMP) DecodeFromBytes(b []byte) error
- func (e *ExtnSCMP) DecodeFromLayer(extension *Extension) error
- func (e *ExtnSCMP) Len() int
- func (e *ExtnSCMP) Pack() (common.RawBytes, error)
- func (e *ExtnSCMP) Reverse() (bool, error)
- func (e *ExtnSCMP) String() string
- func (e *ExtnSCMP) Type() common.ExtnType
- func (e *ExtnSCMP) Write(b common.RawBytes) error
- type ExtnUnknown
- func (u ExtnUnknown) Class() common.L4ProtocolType
- func (u ExtnUnknown) Copy() common.Extension
- func (u *ExtnUnknown) DecodeFromLayer(extension *Extension) error
- func (u ExtnUnknown) Len() int
- func (u ExtnUnknown) Pack() (common.RawBytes, error)
- func (u ExtnUnknown) Reverse() (bool, error)
- func (u ExtnUnknown) String() string
- func (u ExtnUnknown) Type() common.ExtnType
- func (u ExtnUnknown) Write(b common.RawBytes) error
Constants ¶
View Source
const ( ExtnSCMPErrorFlag = 0x01 ExtnSCMPHBHFlag = 0x02 )
View Source
const E2EDebugLen = common.ExtnFirstLineLen
View Source
const OneHopPathLen = common.ExtnFirstLineLen
Variables ¶
View Source
var ( LayerTypeHopByHopExtension = gopacket.RegisterLayerType(1101, gopacket.LayerTypeMetadata{Name: "HopByHopExtension", Decoder: nil}) LayerTypeEndToEndExtension = gopacket.RegisterLayerType(1102, gopacket.LayerTypeMetadata{Name: "EndToEndExtension", Decoder: nil}) LayerTypeSCIONUDP = gopacket.RegisterLayerType(1103, gopacket.LayerTypeMetadata{Name: "SCIONUDP", Decoder: nil}) LayerTypeSCMP = gopacket.RegisterLayerType(1104, gopacket.LayerTypeMetadata{Name: "SCMP", Decoder: nil}) )
View Source
var ( LayerToHeaderMap = map[gopacket.LayerType]common.L4ProtocolType{ LayerTypeHopByHopExtension: common.HopByHopClass, LayerTypeEndToEndExtension: common.End2EndClass, LayerTypeSCIONUDP: common.L4UDP, LayerTypeSCMP: common.L4SCMP, } )
Functions ¶
func ExtensionFactory ¶
Types ¶
type Extension ¶
type Extension struct { layers.BaseLayer NextHeader common.L4ProtocolType NumLines uint8 Type uint8 Data []byte }
func ExtensionDataToExtensionLayer ¶
func ExtensionDataToExtensionLayer(nextHdr common.L4ProtocolType, data common.Extension) (*Extension, error)
ExtensionDataToExtensionLayer build a low level extension representation from a high level interface.
func (*Extension) DecodeFromBytes ¶
func (e *Extension) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
func (*Extension) SerializeTo ¶
func (e *Extension) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
type ExtnE2EDebug ¶
type ExtnE2EDebug struct {
ID [5]byte
}
func NewExtnE2EDebugFromLayer ¶
func NewExtnE2EDebugFromLayer(extension *Extension) (*ExtnE2EDebug, error)
func (ExtnE2EDebug) Class ¶
func (o ExtnE2EDebug) Class() common.L4ProtocolType
func (ExtnE2EDebug) Copy ¶
func (o ExtnE2EDebug) Copy() common.Extension
func (*ExtnE2EDebug) DecodeFromLayer ¶
func (o *ExtnE2EDebug) DecodeFromLayer(extension *Extension) error
func (ExtnE2EDebug) Len ¶
func (o ExtnE2EDebug) Len() int
func (ExtnE2EDebug) Reverse ¶
func (o ExtnE2EDebug) Reverse() (bool, error)
func (ExtnE2EDebug) String ¶
func (o ExtnE2EDebug) String() string
func (ExtnE2EDebug) Type ¶
func (o ExtnE2EDebug) Type() common.ExtnType
type ExtnOHP ¶
type ExtnOHP struct{}
func NewExtnOHPFromLayer ¶
func (ExtnOHP) Class ¶
func (o ExtnOHP) Class() common.L4ProtocolType
func (*ExtnOHP) DecodeFromLayer ¶
type ExtnSCMP ¶
func NewExtnSCMPFromLayer ¶
func (*ExtnSCMP) Class ¶
func (e *ExtnSCMP) Class() common.L4ProtocolType
func (*ExtnSCMP) DecodeFromBytes ¶
func (*ExtnSCMP) DecodeFromLayer ¶
type ExtnUnknown ¶
type ExtnUnknown struct { // ClassField is the Extension class. We include it here because we cannot // implement the Class() method of the interface otherwise. ClassField common.L4ProtocolType TypeField uint8 // Length, in bytes, not including the 3-byte extension header Length int }
ExtnUnknown implements common.Extension for an unknown extension.
func NewExtnUnknownFromLayer ¶
func NewExtnUnknownFromLayer(class common.L4ProtocolType, extension *Extension) (*ExtnUnknown, error)
func (ExtnUnknown) Class ¶
func (u ExtnUnknown) Class() common.L4ProtocolType
func (ExtnUnknown) Copy ¶
func (u ExtnUnknown) Copy() common.Extension
func (*ExtnUnknown) DecodeFromLayer ¶
func (u *ExtnUnknown) DecodeFromLayer(extension *Extension) error
func (ExtnUnknown) Len ¶
func (u ExtnUnknown) Len() int
func (ExtnUnknown) Reverse ¶
func (u ExtnUnknown) Reverse() (bool, error)
func (ExtnUnknown) String ¶
func (u ExtnUnknown) String() string
func (ExtnUnknown) Type ¶
func (u ExtnUnknown) Type() common.ExtnType
Click to show internal directories.
Click to hide internal directories.