Subject: bin/16011: ping(8)'s -w doesn't operate as documented
To: None <>
From: None <>
List: netbsd-bugs
Date: 03/22/2002 13:01:19
>Number:         16011
>Category:       bin
>Synopsis:       ping(8)'s -w doesn't operate as documented
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 22 10:02:00 PST 2002
>Originator:     gabriel rosenkoetter
>Release:        NetBSD 1.5ZA
System: NetBSD humbug 1.5ZA NetBSD 1.5ZA (HUMBUG) #0: Wed Feb 20 06:08:17 EST 2002 gr@grappa:/usr/obj/.i386/sys/arch/i386/compile/HUMBUG i386
Architecture: i386
Machine: i386

[Note: this should be filed under the change-request class *too*. Can
GNATS not do that?]

ping(8) on NetBSD sez:

     -w maxwait
             Specifies the number of seconds to wait for a response to a pack-
             et before transmitting the next one.  The default is 10.0.

However, when I do ping -c 5 -w 2 <host>, I only get 2 packets back.
That's mighty weird, I wonder what's broken...

Well, let's see what happens on RedHat Linux 7.2, for kicks. Same
thing. Hrm. Aha, but their ping(8) documents -w like this:

     -w deadline
             Specify a timeout, in seconds, before ping exits regardless of
             how many packets have been sent or received.

Both of these (documented) functions are useful. It so happens I
want the one that our documentation lists (but that doesn't actually
exist), but I can see a clear use for the other.


	ping -c 5 -w 2 localhost

	Note that you get 2 packets instead of 5.


Duplicate the (correct) documentation from Linux for -w.

Implement (using another flag, -W?) what our documentation says -w
does. Because it'd be handy to have. (I may decide I actually want
this and do that. If so, I'll attach patches to this PR later.)