packet

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedIPVersion    = errors.New("ip version not supported")
	ErrUnsupportedSubProtocol  = errors.New("sub protocol not supported")
	ErrOffsetBiggerThanData    = errors.New("sub protocol offset is larger than given data")
	ErrSubProtocolDataTooSmall = errors.New("sub protocol data is too small")
	ErrPacketTooSmall          = errors.New("packet to small")
	ErrNoData                  = errors.New("no data provided")
)

Functions

This section is empty.

Types

type SubProtocol

type SubProtocol byte
const (
	UnsupportedSubProtocol SubProtocol = 0
	SubProtocolTCP         SubProtocol = 0x06
	SubProtocolUDP         SubProtocol = 0x11
)

func ExtractPayload

func ExtractPayload(data []byte) ([]byte, SubProtocol, error)

ExtractPayload will try to extract the payload for a given IPv4/IPv6 packet.

Jump to

Keyboard shortcuts

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