ping

K

Keith Thompson

Tor Rustad said:
http://www.faqs.org/rfcs/rfc792.html

The inventor of ping, Mike Muuss, wrote the first ping program in day.. and
put it into public domain:

http://www.ping127001.com/pingpage/ping.html

It's a pity that it's provided with a ".html" suffix. When I view the
page in my browser, the #include directives are messed up, and
probably other things as well.

The problem is that the <pre> directive doesn't actually say to
display plain text without interpreting it; things that look like HTML
directives are still processed.

You can download the raw file, remove everything up to and including
the "<pre>" directive, and try to compile it.

But note that the code is inherently non-portable (as it must be,
since standard C doesn't have the required facilities). Of the
headers it includes, only two are standard:

#include <stdio.h>
#include <errno.h>
#include <sys/time.h>

#include <sys/param.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/file.h>

#include <netinet/in_systm.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/ip_icmp.h>
#include <netdb.h>

And it failed to compile on four different systems I just tried
(Cygwin, Solaris, Red Hat, AIX) -- all of which already have their own
"ping" programs, of course.

A solution to the original problem that's fairly likely to work on any
system where this is even possible is

system("ping ...");
 
T

Tor Rustad

Keith said:
It's a pity that it's provided with a ".html" suffix. When I view the
page in my browser, the #include directives are messed up, and
probably other things as well.

Yeah, I used "View Source" function in the browser, or you could get the raw
page via wget... or telnet.

And it failed to compile on four different systems I just tried
(Cygwin, Solaris, Red Hat, AIX) -- all of which already have their own
"ping" programs, of course.

Hehe.. you might have better luck with BSD installation from 1983! Still
it's an interesting read of a historical hack:

http://ftp.arl.mil:80/~mike/ping.html
 
L

Lew Pitcher

Tor said:
http://www.faqs.org/rfcs/rfc792.html

The inventor of ping, Mike Muuss, wrote the first ping program in day.. and
put it into public domain:

http://www.ping127001.com/pingpage/ping.html

As an alternative, here's the source code link from Mike's webpage
http://ftp.arl.army.mil/pub/ping.shar

If you want the whole story about ping, Mike's page gives the scoop:
http://ftp.arl.mil/~mike/ping.html

--
Lew Pitcher

Master Codewright & JOAT-in-training | Registered Linux User #112576
http://pitcher.digitalfreehold.ca/ | GPG public key available by request
---------- Slackware - Because I know what I'm doing. ------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Running ping 8
DNS Disaster: The Server Downfall 0
Ping from JAVA to IP Address 13
Trouble with Net::Ping 9
Selenium c++ help 0
Joined for Python project 11
Net-Ping Issue on Windows 0
windows net/ping load error 0

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top