|
C++ common classes
General purpose classes for use across projects (Apache license)
|
Class to implement traceroute. More...
#include <CTraceRoute.h>
Public Member Functions | |
| CTraceRoute (TR_CALLBACK pCallback=NULL, DWORD dwUserParm=0) | |
| 3/1/97 Richard Bross | |
| virtual | ~CTraceRoute () |
| int | TraceRoute (const char *szIPAddress, int iTimeoutMS, int iMaxRetries, const char *szLooseRoute=NULL, bool bPingOnly=false) |
| Do the traceroute. | |
| void | RegisterCallback (TR_CALLBACK pCallback, DWORD dwUserParm) |
| Register a callback function. If the callback returns anything other than 0, stop. | |
| int | GetLastSocketError () |
| Get last socket error. | |
Protected Member Functions | |
| int | DecodeTracerouteResponse (char *szBuf, int iBytes, struct sockaddr_in *sFrom, unsigned short &usSeq) |
| Decode the ICMP iResponse. | |
| unsigned short | CheckSum (unsigned short *szBuffer, int iSize) |
| Calculate the checksum. | |
Protected Attributes | |
| TR_CALLBACK | pUserFunc |
| DWORD | dwUserParm |
| int | iLastError |
| struct in_addr | sLastAddr |
| unsigned short | uID |
Class to implement traceroute.
Definition at line 36 of file CTraceRoute.h.
| CTraceRoute::CTraceRoute | ( | TR_CALLBACK | pCallback = NULL, |
| DWORD | dwUserParm = 0 |
||
| ) |
3/1/97 Richard Bross
Call back function and user parm. User parm is passed to the callback. Typically it is a pointer to the calling object, since the callback must be static.
Definition at line 38 of file CTraceRoute.cpp.
| CTraceRoute::~CTraceRoute | ( | ) | [virtual] |
Definition at line 43 of file CTraceRoute.cpp.
| unsigned short CTraceRoute::CheckSum | ( | unsigned short * | szBuffer, |
| int | iSize | ||
| ) | [protected] |
Calculate the checksum.
Definition at line 386 of file CTraceRoute.cpp.
| int CTraceRoute::DecodeTracerouteResponse | ( | char * | szBuf, |
| int | iBytes, | ||
| struct sockaddr_in * | sFrom, | ||
| unsigned short & | usSeq | ||
| ) | [protected] |
Decode the ICMP iResponse.
Definition at line 295 of file CTraceRoute.cpp.
| int CTraceRoute::GetLastSocketError | ( | ) |
Get last socket error.
Definition at line 287 of file CTraceRoute.cpp.
| void CTraceRoute::RegisterCallback | ( | TR_CALLBACK | pCallback, |
| DWORD | dwUserParm | ||
| ) |
Register a callback function. If the callback returns anything other than 0, stop.
Definition at line 49 of file CTraceRoute.cpp.
| int CTraceRoute::TraceRoute | ( | const char * | szIPAddress, |
| int | iTimeoutMS, | ||
| int | iMaxRetries, | ||
| const char * | szLooseRoute = NULL, |
||
| bool | bPingOnly = false |
||
| ) |
Do the traceroute.
Definition at line 57 of file CTraceRoute.cpp.
DWORD CTraceRoute::dwUserParm [protected] |
Definition at line 66 of file CTraceRoute.h.
int CTraceRoute::iLastError [protected] |
Definition at line 67 of file CTraceRoute.h.
TR_CALLBACK CTraceRoute::pUserFunc [protected] |
Definition at line 65 of file CTraceRoute.h.
struct in_addr CTraceRoute::sLastAddr [protected] |
Definition at line 68 of file CTraceRoute.h.
unsigned short CTraceRoute::uID [protected] |
Definition at line 69 of file CTraceRoute.h.