CTraceRoute
v1.20 A C++ class to encapsulate trace route functionality
Included is an C++ class to support implement trace route functionality similar
to the "tracert" application included in Windows. Trace route is
based upon the PING/ICMP protocol. ICMP for those not familiar with all the internet
protocols is the protocol used to retrieve information about how IP packets are
routed.
Features
- Simple and clean C++ interface.
- The interface provided is synchronous which provides an easier programming
model than using asynchronous sockets.
- virtual functions are provided to support callback.
- A configurable timeout can be set through the class API.
- The classes are fully Unicode compliant and include Unicode built options
in the workspace file.
The enclosed zip file contains the CTraceRoute
source code and a simple test program very similar to "tracert"
to exercise all of the functions the classes provide.
Copyright
- You are allowed to include the source code in any product (commercial, shareware,
freeware or otherwise) when your product is released in binary form.
- You are allowed to modify the source code in any way you want except you
cannot modify the copyright details at the top of each module.
- If you want to distribute source code with your application, then you are
only allowed to distribute versions released by the author. This is to maintain
a single distribution point for the source code.
Updates
v1.20 (18 March 2022)
- Updated copyright details.
- Updated the code to use C++ uniform initialization for all variable
declarations.
v1.19 (28 March 2020)
- Updated copyright details.
- Fixed more Clang-Tidy static code analysis warnings in the code.
v1.18 (29 December 2019)
- Fixed various Clang-Tidy static code analysis warnings in the code.
v1.17 (10 November 2019)
- Updated initialization of various structs to use C++ 11 list
initialization
- Replaced BOOL with bool in a number of places throughout the codebase
v1.16 (5 May 2019)
- Updated copyright details.
- Updated the code to clean compile on VC 2019
v1.15 (3 November 2018)
- Updated copyright details.
- Fixed a number of C++ core guidelines compiler warnings. These
changes mean that the code will now only compile on VC 2017 or later.
- Removed all code which used GetProcAddress in the sample app.
- Removed code which supported CTRACEROUTE_MFC_EXTENSTIONS code path
v1.14 (26 December 2017)
- Updated copyright details.
- Replaced CString::operator LPC*STR() calls throughout the codebase with
CString::GetString calls
- Replaced NULL throughout the codebase with nullptr. This means that the
minimum requirement for the code is now VC 2010.
v1.13 (8 May 2016)
- Updated copyright details.
- Updated the sample project settings to more modern default values.
- Updated the code to compile cleanly on VC 2010 - 2015.
- Added support for IPv6 in addition to IPv4. This means that the minimum
supported version of VC which supports CTraceRoute is now VC 2008. The sample
now ships with a VC 2008 solution.
- Added SAL annotations to all the code.
- Reworked the classes to optionally compile without MFC. By default the classes
now use STL classes and idioms but if you define CTRACEROUTE_MFC_EXTENSTIONS
the classes will revert back to the MFC behaviour
v1.12 (7 June 2008)
- Updated copyright details
- Addition of TRACEROUTE_EXT_CLASS define to the classes to allow the classes
to be more easily incorporated into extension DLLs
- Updated the code to work with latest version of the author's CPing class
- Updated the sample app to compile cleanly in VC 2005
- The code has now been updated to support VC 2005 or later only
- Code now uses newer C++ style casts instead of C style casts
- Code now compiles cleanly using Code Analysis (/analyze)
- Updated the code to clean compile on VC 2008
- Updated documentation to use the same style as the web site
v1.11 (5 May 2002)
- Uses latest CPing class, now by default uses ICMP method in CPing class.
- Sample app provided with tracer now actually observes the "-d"
command line option.
- Fixed a bug where a pinging error would cause the tracer loop to exit instead
of reporting a non-pingable device
v1.1 (25 February 2002)
- Updated copyright information
- Class now #includes CPing class rather than implemented its own implementation
of Ping
- General code tidy up and review
v1.0 (18 November 1998)