Documentation ¶
Index ¶
Constants ¶
View Source
const ( IPProtocolIPv6HopByHop IPProtocol = 0 IPProtocolICMPv4 IPProtocol = 1 IPProtocolIGMP IPProtocol = 2 IPProtocolIPv4 IPProtocol = 4 IPProtocolTCP IPProtocol = 6 IPProtocolUDP IPProtocol = 17 IPProtocolRUDP IPProtocol = 27 IPProtocolIPv6 IPProtocol = 41 IPProtocolIPv6Routing IPProtocol = 43 IPProtocolIPv6Fragment IPProtocol = 44 IPProtocolGRE IPProtocol = 47 IPProtocolESP IPProtocol = 50 IPProtocolAH IPProtocol = 51 IPProtocolICMPv6 IPProtocol = 58 IPProtocolNoNextHeader IPProtocol = 59 IPProtocolIPv6Destination IPProtocol = 60 IPProtocolIPIP IPProtocol = 94 IPProtocolEtherIP IPProtocol = 97 IPProtocolSCTP IPProtocol = 132 IPProtocolUDPLite IPProtocol = 136 IPProtocolMPLSInIP IPProtocol = 137 IPv4_PSEUDO_LENGTH int = 12 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IPProtocol ¶
type IPProtocol uint8
IPProtocol is an enumeration of IP protocol values, and acts as a decoder for any type it supports.
type IPv4 ¶
type IPv4 struct { Version uint8 IHL uint8 TOS uint8 Length uint16 Id uint16 Flags uint8 FragOffset uint16 TTL uint8 Protocol IPProtocol Checksum uint16 SrcIP net.IP DstIP net.IP Options []IPv4Option Padding []byte Payload []byte // contains filtered or unexported fields }
func (*IPv4) HeaderLength ¶
func (*IPv4) PseudoHeader ¶
func (ip *IPv4) PseudoHeader(buf []byte, proto IPProtocol, dataLen int) error
type IPv4Option ¶
type TCP ¶
type TCP struct { SrcPort uint16 DstPort uint16 Seq uint32 Ack uint32 DataOffset uint8 FIN, SYN, RST, PSH, ACK, URG, ECE, CWR, NS bool Window uint16 Checksum uint16 Urgent uint16 Options []TCPOption Padding []byte Payload []byte // contains filtered or unexported fields }
func (*TCP) HeaderLength ¶
Click to show internal directories.
Click to hide internal directories.