PICMPSocket Class Reference

#include <icmpsock.h>

Inheritance diagram for PICMPSocket:

PIPDatagramSocket PIPSocket PSocket PChannel PObject List of all members.

Public Types

Status & Information
enum  PingStatus {
  PingSuccess, NetworkUnreachable, HostUnreachable, PacketTooBig,
  RequestTimedOut, BadRoute, TtlExpiredTransmit, TtlExpiredReassembly,
  SourceQuench, MtuChange, GeneralError, NumStatuses
}
 Results of ICMP operation. More...

Public Member Functions

Ping
BOOL Ping (const PString &host)
BOOL Ping (const PString &host, PingInfo &info)

Protected Member Functions

const char * GetProtocolName () const
virtual BOOL OpenSocket ()
virtual BOOL OpenSocket (int ipAdressFamily)
BOOL WritePing (const PString &host, PingInfo &info)
BOOL ReadPing (PingInfo &info)

Classes

class  PingInfo
 Information used by and obtained by the ping operation. More...

Detailed Description

Create a socket channel that uses allows ICMP commands in the Internal Protocol.


Member Enumeration Documentation

enum PICMPSocket::PingStatus

Results of ICMP operation.

Enumerator:
PingSuccess 
NetworkUnreachable 
HostUnreachable 
PacketTooBig 
RequestTimedOut 
BadRoute 
TtlExpiredTransmit 
TtlExpiredReassembly 
SourceQuench 
MtuChange 
GeneralError 
NumStatuses 


Constructor & Destructor Documentation

PICMPSocket::PICMPSocket (  ) 

Create a TCP/IP protocol socket channel. If a remote machine address or a "listening" socket is specified then the channel is also opened.

PICMPSocket::PICMPSocket (  ) 

Create a TCP/IP protocol socket channel. If a remote machine address or a "listening" socket is specified then the channel is also opened.


Member Function Documentation

BOOL PICMPSocket::Ping ( const PString host  ) 

Send an ECHO_REPLY message to the specified host and wait for a reply to be sent back.

Returns:
FALSE if host not found or no response.
Parameters:
host  Host to send ping.

BOOL PICMPSocket::Ping ( const PString host,
PingInfo info 
)

Send an ECHO_REPLY message to the specified host and wait for a reply to be sent back.

Returns:
FALSE if host not found or no response.
Parameters:
host  Host to send ping.
info  Information on the ping and reply.

const char* PICMPSocket::GetProtocolName (  )  const [protected, virtual]

This function returns the protocol name for the socket type.

Implements PSocket.

virtual BOOL PICMPSocket::OpenSocket (  )  [protected, virtual]

Implements PSocket.

virtual BOOL PICMPSocket::OpenSocket ( int  ipAdressFamily  )  [protected, virtual]

Implements PIPSocket.

BOOL PICMPSocket::WritePing ( const PString host,
PingInfo info 
) [protected]

BOOL PICMPSocket::ReadPing ( PingInfo info  )  [protected]


The documentation for this class was generated from the following file:
Generated on Fri Mar 7 06:25:06 2008 for PTLib by  doxygen 1.5.1