Documentation
¶
Overview ¶
Package ipv4 provides a thin, allocation-free view over raw IPv4 packets.
Index ¶
- func ScanFrame(data []byte, atEof bool) (advance int, token []byte, err error)
- type Frame
- func (self Frame) Copy() Frame
- func (self Frame) DSCP() byte
- func (self Frame) Destination() net.IP
- func (self Frame) DestinationPort() uint16
- func (self Frame) ECN() byte
- func (self Frame) Flags() byte
- func (self Frame) FragmentOffset() uint16
- func (self Frame) HeaderChecksum() uint16
- func (self Frame) IHL() byte
- func (self Frame) Identification() uint16
- func (self Frame) Options() []byte
- func (self Frame) Payload() []byte
- func (self Frame) Protocol() byte
- func (self Frame) SetDestination(ip net.IP)
- func (self Frame) SetIHL(ihl byte)
- func (self Frame) SetSource(ip net.IP)
- func (self Frame) SetTotalLength(totalLength uint16)
- func (self Frame) SetVersion(version byte)
- func (self Frame) Source() net.IP
- func (self Frame) SourcePort() uint16
- func (self Frame) TTL() byte
- func (self Frame) TotalLength() uint16
- func (self Frame) Version() byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Frame ¶
type Frame []byte
Frame is a raw IPv4 packet. Accessors read directly from the backing slice, so a Frame must be validated with DecodeFrame (or produced by MakeFrame or ScanFrame) before its variable-length fields are used.
func DecodeFrame ¶
func (Frame) Destination ¶
func (Frame) DestinationPort ¶
func (Frame) FragmentOffset ¶
func (Frame) HeaderChecksum ¶
func (Frame) Identification ¶
func (Frame) SetDestination ¶
func (Frame) SetTotalLength ¶
func (Frame) SetVersion ¶
func (Frame) SourcePort ¶
func (Frame) TotalLength ¶
Click to show internal directories.
Click to hide internal directories.