Documentation
¶
Index ¶
- Variables
- type HPERM
- type RTP
- func (r *RTP) CanDecode() gopacket.LayerClass
- func (r *RTP) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (r *RTP) LayerContents() []byte
- func (r *RTP) LayerPayload() []byte
- func (r *RTP) LayerType() gopacket.LayerType
- func (r *RTP) Length() int
- func (r *RTP) NextLayerType() gopacket.LayerType
- func (r *RTP) String() string
- type VXLAN
Constants ¶
This section is empty.
Variables ¶
var HPERMLayerType = gopacket.RegisterLayerType( 2112, gopacket.LayerTypeMetadata{ Name: "HPERMLayerType", Decoder: gopacket.DecodeFunc(decodeHPERMLayer), }, )
Register the layer type so we can use it Use negative or 2000+ for custom layers. It must be unique
var LayerTypeRTP = gopacket.RegisterLayerType(2010, gopacket.LayerTypeMetadata{Name: "RTP", Decoder: gopacket.DecodeFunc(decodeRTP)})
LayerTypeRTP registers the RTP layer type 2010.
Functions ¶
This section is empty.
Types ¶
type HPERM ¶
func (*HPERM) LayerContents ¶
LayerContents returns the information that our layer provides. In this case it is a header layer so we return the header information
func (*HPERM) LayerPayload ¶
LayerPayload returns the layer built on top of our layer or raw payload
type RTP ¶
type RTP struct {
Version uint8
Padding uint8
Extension uint8
CC uint8
Marker uint8
PayloadType uint8
SequenceNumber uint16
Timestamp uint32
Ssrc uint32
Csrc []uint32
ExtensionHeaderID uint16
ExtensionHeaderLength uint16
ExtensionHeader []byte
Payload []byte
Contents []byte
}
RTP represents a RTP packet.
func (*RTP) CanDecode ¶
func (r *RTP) CanDecode() gopacket.LayerClass
CanDecode returns a set of layers that RTP objects can decode, which is just LayerTypeRTP.
func (*RTP) DecodeFromBytes ¶
func (r *RTP) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
DecodeFromBytes decodes the given bytes into this layer.
func (*RTP) LayerContents ¶
func (*RTP) LayerPayload ¶
func (*RTP) NextLayerType ¶
NextLayerType specifies the next layer that should be decoded. VRRP does not contain any further payload, so we set to 0
type VXLAN ¶
type VXLAN struct {
layers.BaseLayer
ValidIDFlag bool // 'I' bit per RFC 7348
VNI uint32 // 'VXLAN Network Identifier' 24 bits per RFC 7348
}
func (*VXLAN) CanDecode ¶
func (v *VXLAN) CanDecode() gopacket.LayerClass
CanDecode returns the set of layer types that this DecodingLayer can decode.
func (*VXLAN) DecodeFromBytes ¶
func (v *VXLAN) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
func (*VXLAN) NextLayerType ¶
NextLayerType returns the layer type contained by this DecodingLayer.