Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EchoReply ¶
type EchoReply struct { WhenSent time.Time //When the Echo Request was sent WhenRecv time.Time //When the Echo Reply was received Type uint8 //The type of the icmpReply Packet Code uint8 //The Code for the Echo Reply }
Represent an EchoReply received from the network
type EchoRequest ¶
type EchoRequest struct { WhenSent time.Time //The time this request was sent over the socket To net.IPAddr //The Ip Address of the request Size uint8 //The number of bytes to send TOS uint8 //The DSCP flag of the ip header TTL uint8 //The TTL flag of the ip header Timeout time.Duration // The timeout // contains filtered or unexported fields }
Represent an Echo Request to be sent over the network
type Ping ¶
type Ping struct { To string //hostname of the target host Times int //The number of EchoRequests we should sent Timeout time.Duration //The duration we should wait for an EchoReply for each EchoRequest Interval time.Duration //The duration we should wait between the sent EchoRequests TOS int //The Type of Service to be sent in the EchoRequest IP Header TTL int //The Time to live to be sent in the EchoRequest IP Header Size uint //The number of bytes to sent in each EchoRequest PeakTh int //The number of peaks to remove UserData map[string]string //User data Id uint64 //the id of this request. It is created in the NewPing function and can be used to debug Toaddr net.IPAddr //Stores the resolved ip address // contains filtered or unexported fields }
The Ping Request object
type Pong ¶
type Pong struct { Ping *Ping //A reference to the Ping Request EchoRequests []EchoRequest //All the EchoRequests sent over the socket for the Ping Request EchoReplies []EchoReply //All the EchoReplies received from the socket for the Ping Request }
The Response Object returned to the caller
Click to show internal directories.
Click to hide internal directories.