Ping Command code for parsing ICMP (1)

Source: Internet
Author: User

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.

 
 
  1. Specific implementation:
  2. --------
  3. // Borland C 5.0: bcc32.cpp ping. cpp
  4. // Visually C 5.0: cl ping. cpp wsock32.lib
  5. //
  6. // This sample program is hereby placed in the public domain.
  7.  
  8. # Include <iostream. h>
  9. # Include <winsock. h>
  10. # Include <windowsx. h>
  11. # Include "icmpdefs. h"


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.