which is a complete must read story for anyone interested in this kind of article and led to much of the current cyber-crime coordination in the US (e.g. US-CERT, etc).
from that book:
"On the heels of Steve's call, Mike Muuss of the Ballistic Research Laboratory called.
In Aberdeen, Maryland, the Army runs a research and development laboratory;
it's one of the last government labs that doesn't farm out its research to private
contractors. Mike's their computer honcho.
Mike Muuss's famous throughout the Unix community as a pioneer in networking and as a
creator of elegant programs to replace awkward ones. As Mike puts it, good programs
aren't written or built. They're grown. A six-foot-tall, mustached runner,
he's incredibly driven, intense, and obsessed. Mike's paid his dues on ancient
versions of Unix, dating back to the '70s. When Mike talks, other wizards listen."
There is an unusual (ab)use of ping that I hope no-one here needs but just in case; I and a tech was doing some dos scripting (in windows) at a client and we needed short delays. We couldn't find anything in dos, but a web search suggested an obscure but natty trick - pinging localhost.
ping -n <seconds> 127.0.0.1
It worked (edit: I couldn't stop laughing). To be fair, I've used it and its big brother traceroute (very useful!) for its designed purpose.
Standard Windows NT command to sleep 1 second. This is actually intended to let the user select an option Yes/No and default after 1 second without answer.
The Internet's designers had not heard of YAGNI. They thought ahead a great deal. They even had features for PMTUD long before anyone sat down to figure out how to do PMTUD.
That's because the Internet's designers were smart, experienced, and visionary, but they didn't have infinite resources, so they did what they could, and a lot of what they could was just a sketch for others to color-in.
"ICMP (Internet Control Message Protocol) is an error-reporting protocol network devices like routers use to generate error messages to the source IP address when network problems prevent delivery of IP packets."
They were asking specifically of Echo packets, though. It seems ping covers the whole use of them. I wonder if any other part of an OS tends to make Echo packets.
Ping is how I found a compromised server once in a large, poorly wired server rack. The sys admins were out and the supervisor did not know anything about the server room (nor did I... the security guy) so he pinged the infected box from a laptop while I went behind the rack and unplugged each machine one at a time.... found it after a dozen or so cables. How about now? Yep, that's the one.
pr_pack( buf, cc, from )
char *buf;
int cc;
struct sockaddr_in *from;
{
I know this ship has sailed, but after reading through the code you linked to, I finally understand the merit to this old-style C function definition syntax, and actually think it might look nicer than the modern way of doing the same thing for longer parameter lists:
pr_pack( char *buf,
int cc,
struct sockaddr_in *from )
{
It reminds me of how in TypeScript, if a function gets too many arguments, I'll split them out into an interface, and use destructuring to get to each element in the actual parameter list for convenience.
I have hundreds of pings running 24/7 from dozens of devices to machines on 6 continents monitoring for packet loss, never even considered the history of the command