Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Ping ¶
Ping sends count IPv4 ICMP echo packets to the address. Reply times are returned with -1 for missing packets.
func ValidateEchoReply ¶
ValidateEchoReply checks that the received packet is the correct reply to the sent packet.
Types ¶
type Type ¶
type Type byte
Type are the valid codes in the first byte of an ICMP packet. See RFC 792 for a detailed explanation each type.
const ( //EchoReply is the response to an Echo packet. EchoReply Type = 0 //DestinationUnreachable if the destination can't be reached. DestinationUnreachable Type = 3 //Redirect indicates an alternative path to a destination. Redirect Type = 5 //Echo is a request to receive an EchoReply. Echo Type = 8 //RouterAdvertisement used by ICMP Internet Router Discovery Protocol (IRDP). RouterAdvertisement Type = 9 //RouterSolicitation used by ICMP Internet Router Discovery Protocol (IRDP). RouterSolicitation Type = 10 //TimeExceeded indicates the destination can't be reached due to TTL. TimeExceeded Type = 11 //ParameterProblem indicates a problem with the header. ParameterProblem Type = 12 //Timestamp requests a TimestampReply to determine round trip and processing time. Timestamp Type = 13 //TimestampReply responds to Timestamp to determine round trip and processing time. TimestampReply Type = 14 //ExtendedEcho is an extended ping request. See RFC 4884. ExtendedEcho Type = 42 //ExtendedEchoReply is the response to an ExtendedEcho request request. See RFC 4884. ExtendedEchoReply Type = 43 //InvalidOrUnknown is used to indicated a Type that is bad. InvalidOrUnknown Type = 255 )
Click to show internal directories.
Click to hide internal directories.