July 25th, 2004, 08:17 PM
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 [184.108.40.206] with 32 bytes of data:
Reply from 220.127.116.11: bytes=32 time=643ms TTL=238
Reply from 18.104.22.168: bytes=32 time=487ms TTL=238
Reply from 22.214.171.124: bytes=32 time=448ms TTL=238
Reply from 126.96.36.199: bytes=32 time=445ms TTL=238
Reply from 188.8.131.52: bytes=32 time=412ms TTL=238
Reply from 184.108.40.206: bytes=32 time=404ms TTL=238
Reply from 220.127.116.11: bytes=32 time=399ms TTL=238
Reply from 18.104.22.168: bytes=32 time=420ms TTL=238
Ping statistics for 22.214.171.124:
Packets: Sent = 8, Received = 8, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 399ms, Maximum = 643ms, Average = 457ms
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??
July 25th, 2004, 08:23 PM
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.
July 26th, 2004, 08:08 PM
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!!
July 27th, 2004, 07:35 AM
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.
July 27th, 2004, 12:03 PM
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)?
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