Commit Graph

38 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
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
Ruslan Ermilov
8d646af581 Sync program's usage() with manpage's SYNOPSIS. 2005-02-10 09:19:34 +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
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
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
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
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
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
Hajimu UMEMOTO
effd2d8296 test strdup() failures.
from: Chris Faulhaber <jedgar@fxp.org>

Obtained from:	KAME
2000-12-04 13:38:59 +00:00
Kris Kennaway
5088aa38a3 Don't overflow our fd_set. This is not a full sync with KAME because there
are a whole lot of other changes which may not be suitable for us.

Obtained from:	KAME
2000-10-08 08:02:35 +00:00
Kris Kennaway
0af87587a7 Don't call errx() without a format string, to protect against possible
% characters in localized error messages from ipsec_strerror().

Obtained from:  OpenBSD
2000-08-05 06:24:41 +00:00
Kris Kennaway
0adc52c853 Sync with latest KAME code.
Obtained from:	KAME
2000-07-05 09:34:10 +00:00
Yoshinobu Inoue
690a43db7e Update icmp node info query message bit order of query types,
according to draft-ietf-ipngwg-icmp-name-lookups-04 to 05 change.
This is necessary before 4.0, because,
  -This change is non backword compatible
  -Other KAME derived platforms applied 05
  -Author of the draft said he never do backword imcompatible changes
   again.

Approved by: jkh

Obtained from: KAME project
2000-03-09 14:47:21 +00:00
Yoshinobu Inoue
53c9088f68 Security fixes. (Just same as sbin/ping and usr.sbin/traceroute)
-Open socket() at first and then setuid() to actual user.
  -Allow ping6 preload option only for root.

Approved by: jkh

Submitted by: Neil Blakey-Milner <nbm@mithrandr.moria.org>
2000-02-24 19:06:05 +00:00
Yoshinobu Inoue
9b59fde4e0 Small bug fix and improvements
(1)added error check of if_nameindex() return value at getaddrinfo().
  (2)print out more detailed information when getaddrinfo() error value
     is EAI_SYSTEM.(in this case system error num is kept in errno)

(1) is Discovered by: jinmei@kame.net in KAME environment.
1999-12-28 05:37:39 +00:00
Yoshinobu Inoue
7d56d3747c Getaddrinfo(), getnameinfo(), and etc support in libc/net.
Several udp and raw apps IPv6 support.

Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project
1999-12-28 02:37:14 +00:00