This utility set is not supposed to be a reference set or something like.
They are just utilities, which I use NOW (to the date of snapshot)

They compile and work at least on intel (libc5), alpha (glibc-1.99)
and sparc (glibc-2.0.7) and are supposed to work on all transmutations.

Most of them was forked from some orginals:

ping		- cloned of an ancient NetTools-B-xx.
ping6		- cloned of a very old Pedro's utility set.
traceroute6	- cloned of NRL Sep 96 distribution.
rdisc		- cloned of SUN in.rdisc
clockdiff	- broken out of some timed.
tftpd		- it is clone of some ancient NetKit package.

I do not remember, what I changed there, because original
versions were lost years ago 8)

The main reason to include well-known utilities ping/ping6/traceroute6
is that it appeared, that they are badly maintained and not updated
to be used on Linux. These versions are maintained by defintition
(because I use them every day). If someone will dig out bugs, which
were fixed after my versions were cloned: PLEASE, tell me!



And three new ones:

tracepath
tracepath6
arping		

GENERAL NOTE: all these applets, except for tracepath[6]
should be excecutabel only with CAP_NET_RAWIO capability.
To all that I know, they are safe to be used as setuid root.

NOTE: IPv4 traceroute is not included here. Look for it
in ip-routing/lbl-tools directory.


Short desriptions:


* clockdiff.

Usage: clockdiff [-o | -o2] <destination>

 	Measures clock difference between us and <destination> with 1msec
	resolution. Without -o option it uses icmp timestamps, with -o
	it uses icmp echo with timestamp IP option.

	WARNINGS:
	* some nodes (f.e. Solaris<2.4) do not support icmp
	  timestamps. clockdiff -o still works.
	* some nodes (Cisco) use non-standard timestamps,
	  which makes clockdiff useless.
	* some nodes use wrong timestamps (Solaris>2.4), if
	  run xntpd. Seems, it uses different clock source,
	  which is synchronized to time-of-day clock periodically.
	* -o1 uses three-node tstamp. What option (-o or -o1)
	  works better depends on target host.

* ping/ping6

Usage: ping [ as usually ]

	Changed options: -I <device name> may be used to set output interface.

	New options:
	-T [ping only]:  send timestamp IP option.
		-T tsonly	--- only timesamps
	        -T tsandaddr	--- timestamps & addresses
		-T tsprespec host1 [host2 [host3 [host 4]]]
				--- timestamp prespecified hops

	-P <traffic class> [ping6 only] sets traffic class bits.
	-F <flow label> [ping6 only] sets flow label. -F 0 generates
	    random label.
	-w TIMEOUT  exit after this time. If no replies received, exit
	            with error code.

	Improvements:
	- it understands icmp error messages and reacts to them correctly.
	- it checks icmp checksum and reacts to corrupted packets correctly.
	- it correctly pings linux loopback.
	etc.

* traceroute6

Usage: traceroute6 [ as usually ]

	No new options.

* arping

Usage: arping [-D] [-U] [-A] [-c <count>] [-w <timeout>] [-q] [-s <source>]
		-I <interface>   <address>

	Ping <address> on device <interface> by ARP packets,
	using source address <source>.
	
	<count>		number of pings.
	<timeout>	stop after this time
	-q		do not print any messages
	-D		duplicate address detection mode.
			Returns 0, if DAD suceeded i.e. no replies
			are received.
	-U		Unsolicited ARP mode to update neighbours' ARP caches.
	-A		The same as -U, but ARP REPLY packets used instead
			of ARP REQUEST.

	If -s option is absent, source address is:

	1. In normal mode calculated from routing tables.
	2. In DAD (-D) mode set to 0.0.0.0
	3. In Unsilicited ARP mode (-U,-A) set to <address>

* rdisc

Classic router discovery daemon. Start it with "rdisc -fs" and enjoy.
Certainly, it is not useful if routers on the network do not
support RDISC, teach them or kill, if they are not teachable.


* tracepath/tracepath6

Usage: tracepath <destination>[<port>]

It traces path to <destination> discovering MTU along this path.
It uses UDP port <port> or some random port.

tracepath6 is good replacement for traceroute6
and classic example of application Linux error queues.
tracepath is worse, because commercial IP routers
do not return enough information in icmp error messages.
Probably, it will change, when they will be updated.
For now it uses Van Jacobons's trick, sweaping a range
of UDP ports to maintain trace history.

* tftpd

The only difference is that it sends to kernel neighbour
reachability confirmations, which will help to boot with
buggy firmware, which answers to arp only once.


Alexey Kuznetsov
<kuznet@ms2.inr.ac.ru>
