Embedded Ping Class
Topics
:Overview
Conditional Directives
Constants
Type Definitions
Enumerations
Data Structures
Data Members
Functions
The embedded ping class is a cross platform ping implementation use to test connectivity between Internet host using ICMP (Internet Control Message Protocol) and raw sockets.
gxSocket * gxsPing::raw_socket
- Public data member that points the previously opened socket.gxsEchoRequest gxsPing::echo_request
- Echo request header.gxsEchoReply gxsPing::echo_reply
- Echo reply header.int gxsPing::time_sent
- Public data member the records the time the packet was sent.int gxsPing::elapsed_time
- Public data member the records the time in millisecond for the packet to return.int gxsPing::time_to_live
- Public data member the records the time to live.gxsPing::gxsPing()
gxsPing::~gxsPing()
gxsPing::Ping()
gxsPing::RecvEchoReply()
gxsPing::SendEchoRequest()
gxsPing::WaitForEchoReply()
gxSocket raw_socket(AF_INET, SOCK_RAW, IPPROTO_ICMP, 0, hostname);
gxsPing::~gxsPing()
- Class destructor.gxSocketError gxsPing::Ping(int time_out_sec = 1, int time_out_usec = 0)
- Public member function used to ping an Internet host with a specified time out value. Return zero if successful or a non-zero value corresponding to one of the integer constants defined in the error code enumeration if any failures occur.gxSocketError gxsPing::RecvEchoReply()
- Public member function used to receive the echo reply. Return zero if successful or a non-zero value corresponding to one of the integer constants defined in the error code enumeration if any failures occur.gxSocketError gxsPing::SendEchoRequest()
- Public member function used to send the echo request. Return zero if successful or a non-zero value corresponding to one of the integer constants defined in the error code enumeration if any failures occur.int gxsPing::WaitForEchoReply(int time_out_sec = 1, int time_out_usec = 0)
- Public member function used to wait for the echo reply using the select function to signal when data is waiting to be read. Returns false if the request times out when the specified timeout value is reached.
End Of Document |