CIcmp MFC/VisualC++ Class

Class Variables The CIcmp class contains the following public variables:


LPIcmpHeader pIcmpHeader
  • Pointer to an IcmpHeader structure;
  • Usually mapped to the current ICMP buffer.


LPIpHeader pIpHeader
  • Pointer to an IpHeader structure;
  • Usually mapped to the current receive buffer.


SOCKET icmpSocket
  • An asynchronous socket. See CSocket class for implementation;
  • Contains the current socket for this CIcmp object;
  • Default is INVALID_SOCKET for unopened/unassigned socket.


SOCKADDR_IN icmpSockAddr
  • Socket address structure for outgoing (send) socket communication;
  • Refer to SOCKADDR_IN structure in VisualC++ help or MFC documentation.


SOCKADDR_IN rcvSockAddr
  • Socket address structure for incoming (recvfrom) socket communication;
  • Refer to SOCKADDR_IN structure in VisualC++ help or MFC documentation.


DWORD icmpRoundTripTime
  • Time between sending a message and receiving the echo;
  • in mSec.


unsigned long icmpHostAddress
  • Host address in network byte order;
  • Maintained external to the CIcmp class;
  • see inet_aton for format.


DWORD icmpPingSentAt
  • System time when the last ICMP message was sent;
  • in mSec.


DWORD icmpPingReceivedAt
  • System time when the last ICMP message was received;
  • in mSec.


int icmpRcvLen
  • integer length of the last message received;
  • set by Receive.


int icmpHops
  • Number of hops (routers contacted) in a trace route operation;
  • Set to zero by Connect method;
  • Maintained external to class (by application program).


int icmpMaxHops
  • A limit set for trace route operations which fail to complete gracefully;
  • Defaults to 30 in the CIcmp constructor;
  • Maintained external to class (by application program).


int icmpCurSeq
  • Current ICMP message sequence number;
  • Set by application program before calling Ping;
  • Set by Receive after processing an incoming (recvfrom) message.


int icmpCurId
  • ICMP id field;
  • Set to current process id by Connect;
  • Assigned to outgoing ICMP message by Ping;
  • Set to incoming ICMP id field by Receive


int icmpPingTimer
  • send (Ping) timeout in mSec;
  • recvfrom (Receive) timeout in mSec.


int icmpSocketError
  • The WSAGetLastError for the last error which occurred;
  • Preserved until the next socket error occurs.


int icmpSocketErrorMod
  • The entry level in the processing routine at which icmpSocketError occurred;
  • Preserved until the next socket error occurs.


Copyright (c) 1997,1998. EarthWalk Designs.
Direct all inquiries to:Jay Wheeler at EarthWalkDesigns.com