Results 1 to 5 of 5

Thread: ping stats in VB

  1. #1

    ping stats in VB

    hi to all
    i need a make a program in any language (vb,c)to ping google and to calculate the result like the average time , etc,etc

    normally in dos we use

    D:\WINDOWS\Desktop>ping -t www.google.com

    Pinging www.google.akadns.net [66.102.9.104] with 32 bytes of data:

    Reply from 66.102.9.104: bytes=32 time=643ms TTL=238
    Reply from 66.102.9.104: bytes=32 time=487ms TTL=238
    Reply from 66.102.9.104: bytes=32 time=448ms TTL=238
    Reply from 66.102.9.104: bytes=32 time=445ms TTL=238
    Reply from 66.102.9.104: bytes=32 time=412ms TTL=238
    Reply from 66.102.9.104: bytes=32 time=404ms TTL=238
    Reply from 66.102.9.104: bytes=32 time=399ms TTL=238
    Reply from 66.102.9.104: bytes=32 time=420ms TTL=238

    Ping statistics for 66.102.9.104:
    Packets: Sent = 8, Received = 8, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
    Minimum = 399ms, Maximum = 643ms, Average = 457ms
    Control-C

    D:\WINDOWS\Desktop>


    i need to make a program in VB preferrably and to display the results in a seperate window ,so any bright ideas as to how it can be done??

    thanx

  2. #2
    Elite Hacker
    Join Date
    Mar 2003
    Posts
    1,407
    I would start by looking at RFC's involving ping. http://www.faqs.org/rfcs/rfc2925.html
    From there I really don't know. There's probably some library for vb that makes it really easy, check around.

  3. #3
    i also gotta make that program ping any site my lecturer wants to , must also have a variable feild
    ---------------
    thanx for the link hertic, useful ,very useful!!

  4. #4
    Elite Hacker
    Join Date
    Mar 2003
    Posts
    1,407
    Not really helping, but I hope your lecturer doesn't want you to ping a a host which blocks ping :P. I guess in that case you could show him with the ping that comes with your operating system that the host doesn't respond to ping, and that way he won't try and pin it on your program. Good luck and sorry I'm not really of any help on the actual programming part of the project. Normally any projects you do for a class use techniques covered in the classes leading up to that date. When doing projects for a class generally you'll be the best help for yourself as you attend the class for which you are doing the project. If you get in a bind check out irc.freenode.net #c or #vb (you will need to download an IRC client such as xchat www.xchat.org). Again, best of luck.

  5. #5
    Senior Member
    Join Date
    Jul 2002
    Posts
    339
    Since this is Code Review forum, we actually expect a piece of code to review. For starter, why don't you make a skeleton program that do nothing but display a dialog box where a user can enter the hostname (and prolly ping count)?

    Peace always,
    <jdenny>
    Always listen to experts. They\'ll tell you what can\'t be done and why. Then go and do it. -- Robert Heinlein
    I\'m basically a very lazy person who likes to get credit for things other people actually do. -- Linus Torvalds


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •