ownlayers

package
Version: v0.0.0-...-d649157 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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 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 (r *RTP) LayerContents() []byte

func (*RTP) LayerPayload

func (r *RTP) LayerPayload() []byte

func (*RTP) LayerType

func (r *RTP) LayerType() gopacket.LayerType

LayerType returns the layer type of the RTP object, which is LayerTypeRTP.

func (*RTP) Length

func (r *RTP) Length() int

Length returns the RTP Contents length.

func (*RTP) NextLayerType

func (r *RTP) NextLayerType() gopacket.LayerType

NextLayerType specifies the next layer that should be decoded. VRRP does not contain any further payload, so we set to 0

func (*RTP) String

func (r *RTP) String() string

String returns a string version of RTP.

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) LayerType

func (v *VXLAN) LayerType() gopacket.LayerType

LayerType returns LayerTypeVXLAN

func (*VXLAN) NextLayerType

func (v *VXLAN) NextLayerType() gopacket.LayerType

NextLayerType returns the layer type contained by this DecodingLayer.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL