In ICMP applications, we can use the ping command to perform operations. This article introduces the application of this Part. Describes the specific implementation code. I hope it will help you learn ICMP.
Principles:
This example demonstrates the application of Microsoft ICMP. DLL "ping" another machine. this DLL is an API interface for sending ICMP return packets without documentation, also known as "pings," just like the diver's terminology about sonar signals. this Code comes from a GUI program named MarkG, and its webpage has disappeared.
ICMP. DLL APIs work well with Microsoft Winsocks on the Windows platform, but Microsoft says they will replace it when a better product comes out. microsoft said that this was in use since Windows 95, and these features still exist on Windows 2000.
For more information on the ICMP. dll api, check out sockets.com's icmp api page.
Obtain more detailed ICMP. dll api information from the ICMP ets.com icmp api webpage.
- Specific implementation:
- --------
- // Borland C 5.0: bcc32.cpp ping. cpp
- // Visually C 5.0: cl ping. cpp wsock32.lib
- //
- // This sample program is hereby placed in the public domain.
-
- # Include <iostream. h>
- # Include <winsock. h>
- # Include <windowsx. h>
- # Include "icmpdefs. h"