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.
Click to show internal directories.
Click to hide internal directories.