Documentation ¶
Index ¶
Constants ¶
const ( ProtocolICMP int = 1 ProtocolIPv6ICMP int = 58 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DestinationUnreachableBody ¶
type DestinationUnreachableBody struct { Reserved uint16 NextHopMTU uint16 IpHeader ipv4.Header Data []byte }
An DestinationUnreachableBody represents an ICMP destination unreachable message body.
func ParseDestinationUnreachableBody ¶
func ParseDestinationUnreachableBody(b []byte) (*DestinationUnreachableBody, error)
ParseDestinationUnreachableBody parses b as an ICMP DestinationUnreachableBody.
func (*DestinationUnreachableBody) Len ¶
func (p *DestinationUnreachableBody) Len() int
Len returns the ICMP DestinationUnreachableBody length
func (*DestinationUnreachableBody) Marshal ¶
func (p *DestinationUnreachableBody) Marshal() ([]byte, error)
Marshal returns the binary encoding of the ICMP DestinationUnreachableBody .
type RedirectBody ¶
An RedirectBody represents an ICMP redirect message body.
func ParseRedirectBody ¶
func ParseRedirectBody(b []byte) (*RedirectBody, error)
ParseRedirectBody parses b as an ICMP RedirectBody .
func (*RedirectBody) Len ¶
func (p *RedirectBody) Len() int
Len returns the ICMP RedirectBody length
func (*RedirectBody) Marshal ¶
func (p *RedirectBody) Marshal() ([]byte, error)
Marshal returns the binary encoding of the ICMP RedirectBody .
type TimeExceededBody ¶
An TimeExceededBody represents an ICMP time exceeded message body.
func ParseTimeExceedeBody ¶
func ParseTimeExceedeBody(b []byte) (*TimeExceededBody, error)
ParseTimeExceedeBody parses b as an ICMP TimeExceededBody.
func (*TimeExceededBody) Len ¶
func (p *TimeExceededBody) Len() int
Len returns the ICMP TimeExceededBody length
func (*TimeExceededBody) Marshal ¶
func (p *TimeExceededBody) Marshal() ([]byte, error)
Marshal returns the binary encoding of the ICMP TimeExceededBody .