Documentation ¶
Index ¶
Constants ¶
View Source
const ( // EchoReplyType is the ICMP type for an echo reply. EchoReplyType = 0 // EchoRequestType is the ICMP type for an echo request. EchoRequestType = 8 )
View Source
const ( // EchoReplyCode is the ICMP code for an echo reply. EchoReplyCode = 0 // EchoRequestCode is the ICMP code for an echo request. EchoRequestCode = 0 )
Variables ¶
View Source
var ( // ErrUnsupportedICMPPacket is used for unsupported ICMP packet types. ErrUnsupportedICMPPacket = errors.New("unsupported ICMP packet") )
Functions ¶
This section is empty.
Types ¶
type Echo ¶
type Echo struct { Header EchoHeader Payload []byte }
Echo is the data for echo request/reply packets.
type EchoHeader ¶
EchoHeader is the header of echo request/reply packets.
type Packet ¶
type Packet struct { Header Header Data Data // Address is either the destination or source address. Address ipv4.Address }
Packet is an ICMP packet.
func NewEchoReply ¶
NewEchoReply creates a new echo reply packet.
func NewEchoRequest ¶
NewEchoRequest creates a new echo request packet.
Click to show internal directories.
Click to hide internal directories.