Commit Graph

63 Commits

Author SHA1 Message Date
Maxim Konovalov
a8734ffdb3 o Add do-not-fragment option support to ping6(8).
PR:		bin/145759
Submitted by:	pluknet
MFC after:	1 month
2010-04-20 06:10:05 +00:00
Matteo Riondato
865bdc6208 Implement -R support, similar to ping(8)'s -A.
ping(8)'s -a was mapped to -e, but -E was already taken in ping6 (old
option) so rename -e to -r.
Now:
ping -a => ping6 -r
ping -A => ping6 -R

MFC after:	2 days
2008-08-27 15:01:23 +00:00
Matteo Riondato
248e5e18af Add -e to usage()
MFC after:	2 days
2008-08-27 13:29:43 +00:00
Matteo Riondato
155dac2fdc Implement audible support similar to ping(8) -a option. Since -a was already taken, I chose -e (no real argument for this) but I'm willing to change to a different character if needed/desired.
PR:	bin/123752 (inspired by)
MFC after:	2 days
2008-08-26 14:34:09 +00:00
Bjoern A. Zeeb
115737b173 Change the exit status for 0 and 2 to be the same as with ping(1)
and be usable in scripts, etc.

This also changes the semantics in case when we lose one of n packets.
In that case, before we exited by SIG, now we exit with return(0).

Submitted by:	Gert Doering (gert space.net)
MFC after:	10 days
2008-05-27 10:51:19 +00:00
Mike Silbersack
de625c605d Decrease ping6's minimum allowed interval
from .01 to .000001.

Note that due to the architecture of ping6,
you are still limited to kern.hz pings per
second.

MFC after: 2 weeks
2008-02-25 10:45:25 +00:00
Dima Dorfman
3ad1a3ea69 Add -o option to match ping(8)
Reviewed by:	dwmalone, maxim
MFC after:	2 weeks
2007-11-20 01:58:34 +00:00
Bjoern A. Zeeb
53bf725ae1 Remove the -DFAST_IPSEC from Makefiles again.
This was needed during the IPSEC->FAST_IPSEC->IPSEC transition
period to not break the build after picking up netipsec header
files. Now that the FAST_IPSEC kernel option is gone and the
default is IPSEC again those defines are superfluous.

Approved by:	re (rwatson)
2007-07-05 08:56:46 +00:00
George V. Neville-Neil
8409aedfa6 Commit IPv6 support for FAST_IPSEC to the tree.
This commit includes all remaining changes for the time being including
user space updates.

Submitted by:    bz
Approved by:    re
2007-07-01 12:08:08 +00:00
Mike Makonnen
ad092d18d7 Correct two issues in ping6:
1. The static buffer that ping6(8) uses to hold the control data
   it gets from recvmsg(2) is too small in some cases.
2. When it prints the extra header information it doesn't do
   any checking to make sure the data it's printing is within
   the bounds of the supplied buffer.

Fix this by:
o Increasing the buffer to hold extra headers to 10240 bytes (the minimum
  according to RFC3542 sec. 20.1) and allocate it dynamically.
o In verbose mode, specify a warning if any control data from recvmsg(2)
  was truncated because the buffer was too small.
o When printing the extra headers make sure not to overrun the buffer
  boundaries.

Reviewed By: mlaier
PR: kern/99425
MFC After: 1 month
2007-04-19 15:41:00 +00:00
Yaroslav Tykhiy
064aa4479f These IPv6-only tools have no explicit dependency on the INET6 macro.
Tested with:	cmp(1)
2006-07-27 15:31:13 +00:00
Ruslan Ermilov
8d646af581 Sync program's usage() with manpage's SYNOPSIS. 2005-02-10 09:19:34 +00:00
Ruslan Ermilov
6b806d21d1 Fixed the misplaced $FreeBSD$. 2005-02-09 18:07:17 +00:00
Ruslan Ermilov
a866e17077 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
Tom Rhodes
b6905f6f93 Fix build on all (hopefully) 64 bit architectures.
Noticed by:	tinderbox
Tested on:	panther
2005-01-09 09:10:24 +00:00
Tom Rhodes
76505d5adf Use static const char and bump WARNS. 2005-01-08 22:56:08 +00:00
SUZUKI Shinsuke
b2a1393ee2 re-enabled Rev 1.15 (lost during KAME merge at Rev 1.25, due to a KAME bug...)
Obtained from: KAME
2004-07-26 08:18:37 +00:00
Ruslan Ermilov
44d907a2fc Reapply local changes that got simply axed by the latest KAME merge.
Fixed some more markup.
2004-05-17 08:25:15 +00:00
Johan Karlsson
604d24db95 style.Makefile(5):
Use WARNS?= instead of WARNS=.
2004-02-23 20:25:27 +00:00
Hajimu UMEMOTO
f95d46333d Switch Advanced Sockets API for IPv6 from RFC2292 to RFC3542
(aka RFC2292bis).  Though I believe this commit doesn't break
backward compatibility againt existing binaries, it breaks
backward compatibility of API.
Now, the applications which use Advanced Sockets API such as
telnet, ping6, mld6query and traceroute6 use RFC3542 API.

Obtained from:	KAME
2003-10-24 18:26:30 +00:00
Hajimu UMEMOTO
d24cb2490d stop use of NI_WITHSCOPEID. it was deprecated.
Obtained from:	KAME
2003-10-21 20:11:47 +00:00
Maxim Konovalov
3111be41c2 Quote from a Problem Report:
The output format specifier for the round-trip time in ping6 should be
changed to %.3f instead of %g since %g doesn't accurately represent the
precision of the number being output. In particular, %g truncates trailing
zeroes. 0.01 ms does not mean the same thing as 0.010 ms. Although they
are numerically identical, they do not have the same precision.

PR:		bin/52324, bin/52750
Submitted by:	dg
MFC after:	1 week
2003-07-21 11:06:47 +00:00
SUZUKI Shinsuke
45289b43fb corrected buffer lengths for memset()
obtained from: KAME
MFC after: 3 days
2002-12-06 02:11:31 +00:00
Jacques Vidrine
c3e3619908 Back out previous commit. I was a bit overzealous: the fd_set size is
calculated dynamically here.
2002-09-09 16:43:18 +00:00
Jacques Vidrine
012b8a4111 Check for FD_SET overrun. 2002-09-09 16:06:41 +00:00
Hajimu UMEMOTO
406166da3b Don't explicit kill of the process' own pid.
PR:		bin/38862
Submitted by:	Martin Faxer <gmh003532@brfmasthugget.se> with some modification
MFC after:	1 week
2002-07-07 18:19:48 +00:00
Philippe Charnier
e1205e80e5 The .Nm utility 2002-07-06 19:34:18 +00:00
Warner Losh
d476a036e2 o remove __P
o remove main prototype
2002-03-21 13:20:49 +00:00
David E. O'Brien
3d438ad61f Remove 'register' keyword.
It does not help modern compilers, and some may take some hit from it.
(I also found several functions that listed *every* of its 10 local vars with
 "register" -- just how many free registers do people think machines have?)
2002-03-20 17:55:10 +00:00
Hajimu UMEMOTO
4adb3cea54 Show standard deviation.
PR:		bin/35433
Submitted by:	Morten Rodal <morten@rodal.no>,
		Maxim Konovalov <maxim@macomnet.ru>
MFC after:	1 week
2002-03-01 09:49:48 +00:00
Maxim Konovalov
87c5e8ebc4 Document ping6(8) reaction to SIGINFO.
PR:		doc/33639
Reviewed by:	ru
Approved by:	ru
MFC after:	1 week
2002-02-07 16:50:02 +00:00
Ruslan Ermilov
e0e3eb757b First ping after a preload (-l) was sent undelayed.
PR:		bin/32354
Obtained from:	ping.c,v 1.61
2002-01-15 15:10:52 +00:00
Philippe Charnier
2651db53df spelling
move some err() calls to errx() when message explains the pb enough
do not set errno just before exiting the program
lowercase errx() strings
2001-12-11 18:36:29 +00:00
David E. O'Brien
2d68bf45bf Default to WARNS=2.
Binary builds that cannot handle this must explicitly set WARNS=0.

Reviewed by:	mike
2001-12-04 02:19:58 +00:00
Ruslan Ermilov
cda2a9b2f0 Set BINOWN=root explicitly for setuid root binaries.
This is not "useless", as one may have non-default
setting for BINOWN in make.conf, and we still want
these to be installed setuid root in this case.
2001-09-13 06:48:18 +00:00
Brian Somers
9cfe90fe1f Handle snprintf() returning < 0 (not just -1)
MFC after:	2 weeks
2001-08-20 14:53:05 +00:00
Brian Somers
327e849ae1 Handle snprintf() returning -1.
MFC after:	2 weeks
2001-08-20 12:56:45 +00:00
Kris Kennaway
12205948f1 Don't hard-code BINOWN and BINGRP (BINGRP was hard-coded to 'bin', which
is the wrong value on FreeBSD).

MFC after:	1 week
2001-08-11 07:11:14 +00:00
Ruslan Ermilov
c4d9468ea0 mdoc(7) police:
Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text.
Not only this slows down the mdoc(7) processing significantly, but it also
has an undesired (in this case) effect of disabling hyphenation within the
entire enclosed block.
2001-08-07 15:48:51 +00:00
Ruslan Ermilov
2e453a1e33 mdoc(7) police: don't xref to itself. 2001-07-04 14:04:16 +00:00
Hajimu UMEMOTO
0ce50730ee - fixed typo
- a wording improvement in BUGS (ping vs ping6 issue)

Obtained from:	KAME
MFC after:	1 week
2001-06-29 20:51:00 +00:00
Hajimu UMEMOTO
0209de0466 sync usage/description with reality.
Obtained from:	KAME
MFC after:	1 week
2001-06-29 20:26:38 +00:00
Hajimu UMEMOTO
5310af8b90 stop sending echo packets whenever the upper limit is specified by the -c
option, regardless of the -f option.
based on a comment from Tomohide Nagashima <tomohide@japan-telecom.co.jp>.

Obtained from:	KAME
MFC after:	1 week
2001-06-29 20:05:48 +00:00
Hajimu UMEMOTO
3384154590 Sync with recent KAME.
This work was based on kame-20010528-freebsd43-snap.tgz and some
critical problem after the snap was out were fixed.
There are many many changes since last KAME merge.

TODO:
  - The definitions of SADB_* in sys/net/pfkeyv2.h are still different
    from RFC2407/IANA assignment because of binary compatibility
    issue.  It should be fixed under 5-CURRENT.
  - ip6po_m member of struct ip6_pktopts is no longer used.  But, it
    is still there because of binary compatibility issue.  It should
    be removed under 5-CURRENT.

Reviewed by:	itojun
Obtained from:	KAME
MFC after:	3 weeks
2001-06-11 12:39:29 +00:00
Ruslan Ermilov
0a5779d45b - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:33:27 +00:00
Ruslan Ermilov
fe655281c5 Set the default manual section for sbin/ to 8. 2001-03-20 18:13:31 +00:00
Hajimu UMEMOTO
650d202dbd some reasoning why we separated ping(8) and ping6(8)
comments/additions/corrections are welcome.

Obtained from:	KAME
2001-02-22 19:00:51 +00:00
Ruslan Ermilov
1252c1bb05 Prepare for mdoc(7)NG. 2000-12-18 15:16:24 +00:00
Hajimu UMEMOTO
effd2d8296 test strdup() failures.
from: Chris Faulhaber <jedgar@fxp.org>

Obtained from:	KAME
2000-12-04 13:38:59 +00:00
Ruslan Ermilov
7c7fb079b9 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 16:52:27 +00:00