PICMPSocket Class Reference

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

#include <icmpsock.h>

Inheritance diagram for PICMPSocket:

PIPDatagramSocket PIPSocket PSocket PChannel PObject List of all members.

Public Types

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

Public Member Functions

Construction
 PICMPSocket ()
 Create a TCP/IP protocol socket channel.
Ping
PBoolean Ping (const PString &host)
 Send an ECHO_REPLY message to the specified host and wait for a reply to be sent back.
PBoolean Ping (const PString &host, PingInfo &info)
 Send an ECHO_REPLY message to the specified host and wait for a reply to be sent back.

Protected Member Functions

const char * GetProtocolName () const
 This function returns the protocol name for the socket type.
virtual PBoolean OpenSocket ()
virtual PBoolean OpenSocket (int ipAdressFamily)
 Open an IPv4 or IPv6 socket.
PBoolean WritePing (const PString &host, PingInfo &info)
PBoolean 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.


Member Function Documentation

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

This function returns the protocol name for the socket type.

Implements PSocket.

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

Open an IPv4 or IPv6 socket.

Implements PIPSocket.

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

Implements PSocket.

PBoolean 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.

PBoolean 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.

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

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


The documentation for this class was generated from the following file:
Generated on Fri Oct 14 01:44:12 2011 for PTLib by  doxygen 1.4.7