Using the TVPing Utility

Environment: VC++6, MFC

TVping

Here is one more ping utility with a graphical representation of the response time. It can be used on the Microsoft Windows platforms. It is also a usual ping technique, but it has nice code (I think) that draws a graph. The source code that's provided uses MFC and needs to be compiled with VC++6.

Purpose

It allows the user to test the reachability of another host in the network, and also to know about the response time and the integrity of data sent. The user can know the performance of the remote IP device and the network speed.

Goal

A software package that can interpret the above requirement is needed. It should be highly innovative and very user-friendly. Moreover, there should be a graphical presentation to enrich the illustrative presentation of results.

Implementation

VC++ MFC is used to create this software, using an object-oriented coding approach. The "PING" technique is used to verify the network connections and get the performance results.

PING

PING stands for Packet INternet Groper and provides a connectionless verification of the availability of a remote IP device. PING uses ICMP Echo and Echo Reply protocol data units, encapsulated within IP datagrams.

Performing PING

Follow these steps to use the program:

  1. Create a Raw socket with control message protocol.
  2. Send an ICMP header with an ICMP request and optional data packets to the desired host. The host replies as it sends back the data packets, ICMP header, and additional IP Header.
  3. Before sending the ICMP request data packets, we should fill the checksum field with the checksum value of data packets, inclusive of the ICMP header. We can know the elapsed time by sending the current timer value with the data packet. This same data packet will be sent back by the host. We can know the elapsed time by comparing the sent time with the current time while receiving.
  4. Verify the data integrity by verifying the checksum field of ICMP header.
  5. Raw sockets are connectionless sockets, so we have to use synchronized methods of the "sento" and "recvefrom" APIs.
  6. In the ICMP protocol, sockets are not connected with any Port number of receiving host because as an ICMP protocol, no "bind" and "accept" concepts are at the receiving end.

Downloads

Download documentation - 5 Kb
Download source - 56 Kb


Comments

  • ICMP.cpp is missing code

    Posted by Legacy on 06/23/2003 12:00am

    Originally posted by: Prateek Garodia

    Hi:

    icmp.cpp came out blank in your zip file. Can you please send that file?

    Thanks a lot,
    Prateek

    Reply
  • nice!

    Posted by Legacy on 02/27/2003 12:00am

    Originally posted by: Awitkows

    nice

    Reply
  • Blocked

    Posted by Legacy on 01/27/2003 12:00am

    Originally posted by: Blue Star

    Your ping utility has a nice GUI,but poor functionality.

    First,you must be a Administrator in win2k if you want to create raw sockets,so regular users cannot use this utility.

    Second,when ping a site that is down,the program will be blocked for a long time,even after closing it. So,it will be also blocked in a second thread.

    Keep your GUI staff,and I recomend you to use ICMP.dll,you could get the reason in <A HREF=http://www.codeguru.com/internet/cping.shtml>;CPing -- Easily ping a host from Windows 95 and Windows NT.

    I know ICMP.dll was claimed obsolete by M$,but it works at least.

    Reply
  • nice

    Posted by Legacy on 01/23/2003 12:00am

    Originally posted by: yh

    well done

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: September 17, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT Another day, another end-of-support deadline. You've heard enough about the hazards of not migrating to Windows Server 2008 or 2012. What you may not know is that there's plenty in it for you and your business, like increased automation and performance, time-saving technical features, and a lower total cost of ownership. Check out this upcoming eSeminar and join Rich Holmes, Pomeroy's practice director of virtualization, as he discusses the …

  • Live Event Date: September 16, 2014 @ 11:00 a.m. ET / 8:00 a.m. PT Are you starting an on-premise-to-cloud data migration project? Have you thought about how much space you might need for your online platform or how to handle data that might be related to users who no longer exist? If these questions or any other concerns have been plaguing you about your migration project, check out this eSeminar. Join our speakers Betsy Bilhorn, VP, Product Management at Scribe, Mike Virnig, PowerSucess Manager and Michele …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds