Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EchoReply ¶
type EchoReply struct { From net.IP //The ip address that answered the Echo Request When time.Time //When the Echo Reply was received Err error //The error, if any // contains filtered or unexported fields }
Represent an EchoReply received from the network
type EchoRequest ¶
type EchoRequest struct { Id int64 //The id of the ping request To net.IPAddr //The Ip Address of the request When time.Time //The time when this request was sent over the socket Err error //Register errors before send the packet over the network // contains filtered or unexported fields }
Represent an Echo Request to be sent over the network
func (EchoRequest) GetSequence ¶
func (e EchoRequest) GetSequence() int
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 int64 //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.