Documentation ¶
Index ¶
Constants ¶
View Source
const ( Version = 4 // protocol version HeaderLen = 20 // header length without extension headers )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Header ¶
type Header struct { Version int // protocol version Len int // header length TOS int // type-of-service TotalLen int // packet total length ID int // identification Flags HeaderFlags // flags FragOff int // fragment offset TTL int // time-to-live Protocol int // next protocol Checksum int // checksum Src net.IP // source address Dst net.IP // destination address Options []byte // options, extension headers Payload []byte }
A Header represents an IPv4 header.
type HeaderFlags ¶
type HeaderFlags int
const ( MoreFragments HeaderFlags = 1 << iota // more fragments flag DontFragment // don't fragment flag )
Click to show internal directories.
Click to hide internal directories.