Callable Ping, Networking, callable ICMP ping routine /******************************************************************************* ** This source code was posted to Info-MultiNet by Stuart Vance on ** 14-NOV-1996. ** ** In September 1997, it was modified by Hunter Goatley to work as a ** callable PING routine that works with the following interfaces: ** ** SOCKET - Normal DEC C socket library (BG interface) ** BG - $QIO calls to the BG interface (TCPware, MultiNet, UCX) ** INET - $QIO calls to the INET interface (TCPware, MultiNet) ** IP - $QIO calls to the IP interface (TCPware) ** ** For all three $QIO versions, a $QIO to the BG interface is used to do ** the gethostbyname() call. ** ** To compile using DEC C, use: ** ** $ cc/standard=vaxc/define=(MAIN,DO_OUTPUT,xxxx) ping ** $ link ping ** ** where "xxxx" is "SOCKET", "BG", "INET", or "IP". To make a callable ** PING module, simply omit the "MAIN" and "DO_OUTPUT" definitions. ** ** To call this routine from a program, use: ** ** int ping (char *hostname, int number_of_packets); ** *******************************************************************************/ * Original Author - * Mike Muuss * U. S. Army Ballistic Research Laboratory * December, 1983 * Modified at UC Berkeley * Modified even more at SRI for MultiNet * Modified further for sample RAW socket program at TGV Software, Inc. * * * Status - * Copyright (C) 1988 SRI International * Copyright (C) 1990, 1992, 1995 TGV Software, Inc. * */