The CIcmp class, derived from the MFC CSocket class, was developed to fill the requirement for class-based access to RAW sockets to perform ICMP echo requests. This class was designed using Microsoft's VisualC++ version 4.2 and MFC, and was tested on both a WindowsNT 4.0 Workstation and Server using Winsock 2.
Because of its reliance upon exclusive WindowsNT structures, it will not work on Windows95. A Windows95 version is under development, but will have to take a back burner to the current project development.
This version of the CIcmp class implements only the Echo Request message definition of RFC792. Refer to RFC792 - Internet Control Message Protocol, DARPA Internet Program, Protocol Specification for details. It will be expanded to support the complete RFC792 specification in the next version.
The ICMP header is designed to immediately follow the IP header fields of an Internet datagram. This class implements the ICMP header as part of the data buffer sent to the CSocket methods, which constructs the IP header prior to sending the message.
Use it in good health, and please let me know if it was useful. If you make improvements or fixed problems, please drop me an e-mail describing your changes at
I will try to incorporate them into this package so that others may benefit from your improvements.
Enjoy!