summaryrefslogtreecommitdiffstats
path: root/sbin/ping
Commit message (Collapse)AuthorAgeFilesLines
* Use CMSG_LEN() to compute ping SCM_TIMESTAMP cmsg_len.shin2000-03-141-1/+1
| | | | | Without this, cmsg_len size should be smaller than necessary on alpha. (Though, no obvious error was seen on ping time value on beast.)
* CMSG_XXX macros alignment fixes to follow RFC2292.shin2000-03-031-1/+1
| | | | | | | Approved by: jkh Submitted by: Partly from tech@openbsd Reviewed by: itojun
* Remove single-space hard sentence breaks. These degrade the qualitysheldonh2000-03-011-2/+4
| | | | | of the typeset output, tend to make diffs harder to read and provide bad examples for new-comers to mdoc.
* ping -S option was missing from IPsec merge, so enable it again.shin2000-02-081-2/+2
| | | | | | Approved by: jkh Submitted by: Matthew Reimer <mreimer@vpop.net>
* Brucify:billf2000-01-202-8/+16
| | | | | | | | | add an upper limit to -t match the types of return values and the variables they are stuffed in make the man page and usage() a little more consistantly ugly less obfuscation. Submitted by: adrian, billf
* Add '-t X' which times out after pinging for X seconds.billf2000-01-142-4/+18
| | | | Submitted by: adrian
* Don't try to include ipsec support if we are building for the installmsmith2000-01-071-2/+7
| | | | floppy image.
* libipsec and IPsec related apps. (and some KAME related man pages)shin2000-01-063-5/+79
| | | | | Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project
* Make last commit bde-compliant:pb1999-11-181-8/+9
| | | | | | - correct indentation - change data types for consistency with the rest of ping.c - create new variable separate from "answer" for clarity
* Fix aliasing bug causing in_cksum() to fail on odd packet sizespb1999-11-151-5/+9
| | | | | | | due to compiler optimization. PR: bin/13292 Suggested by: wollman
* $Id$ -> $FreeBSD$peter1999-08-283-3/+3
|
* Re-add -Wmissing-prototypes to `COPTS'. I mistook -W for -Wno in this case.chris1999-08-161-1/+1
|
* -Wmissing-prototypes is unnecessary here. There are no warnings producedchris1999-08-161-2/+2
| | | | with this option disabled.
* Make flood ping flood again. It hasn't worked since 2.2.6. Make the "-l"mckay1999-05-071-4/+6
| | | | | | option work as described in the manual, not as another flood ping variant. Once discussed to death with: bde
* More egcs warning fixes:imp1999-04-251-2/+3
| | | | | | | | | | | o main returns int not void o use braces to avoid potentially ambiguous else Note: The fix to natd is potentially functional in nature since I used the indentation as the right thing rather than the struct semantics. Someone more familiar with the code should double check me on this one. Reviewed by: obrien and chuckr
* Finish documenting -S src-addr change.imp1999-02-191-1/+8
| | | | | | | Forgotten by: me Forgotten for: Far Too Long Gently Reminded by: Ruslan Ermilov <ru@ucb.crimea.ua> Submitted by: Ruslan Ermilov <ru@ucb.crimea.ua>
* Allow PINGing from any address on multihomed hostsimp1999-01-062-12/+46
| | | | | | | | | In the words of the submitter: "The patch below allows to ping from any address on the multihomed host. The man page is also updated, the text was cutted from traceroute(8)." Submitted by: Ruslan Ermilov PR: 6832
* Fixed non-use of .Nm and hard line breaks in rev.1.16-1.17:bde1998-11-291-7/+12
|
* Remove useless `BINOWN=root' now that it is the default.obrien1998-09-191-2/+1
|
* Disable gcc's builtin memcpy for alpha since it doesn't cope with unaligneddfr1998-09-051-1/+4
| | | | regions properly and this triggers an unaligned access trap.
* Updated manual page. Removed description of (now defunct) -c restrictions.dillon1998-08-271-3/+2
|
* Remove -c restrictions from previous commit.des1998-08-261-13/+1
|
* (well tested at BEST): -i option can now take FP values (e.g. -i 0.1),dillon1998-08-262-17/+46
| | | | | | | extremely useful for networking testing. Other options secured from user-level D.O.S. attacks. -f, -s now root-only. -i wait times < 1.0 root-only. -c count limited to 100 and defaults to 16 when ping run by non-root user.
* Correct use of .Nm. Remove unused #includes. Use warn(). cosmetic in usage()charnier1998-07-152-30/+29
| | | | | string. Translate 0 sec 1000000 usec to 1 sec 0 usec.
* Fix an alignment problem on alpha by doing a bytewise copy.jb1998-06-061-3/+6
|
* Use select() timeouts instead of SIGALRM to schedule packet transmission.fenner1998-05-251-81/+104
| | | | | | | | | | Fixes bin/6649 and removes the last abusive signal handler. Use SO_TIMESTAMP to get the kernel to timestamp packets on reception. Fixes bin/5658 and provides slightly better accuracy. Explicitly zero and terminate the IP options when using -R. PR: bin/5658 PR: bin/6649
* Revert the previous fix. As it turns out Warner Losh issteve1998-05-251-21/+9
| | | | working a better fix.
* Attempt to stop another DoS attack related to ping flooding.steve1998-05-251-9/+21
| | | | | PR: 6649 Submitted by: Jason Young <doogie@forbidden-donut.anet-stl.com>
* When a timeval is stored at the beginning of icmp_data, the fieldsjb1998-05-161-14/+27
| | | | | | | | | | | are unaligned for access by the alpha, so copy the value to a variable that is aligned. When checking the returned data, be careful to avoid confusing the size of the icmp header with the size of a timeval. On i386 these are both 8, but on alpha, a timeval is 16 bytes. This means that a packet sent from an alpha contains 48 bytes of data, not 56 like on i386.
* If ping write fails with short packet count, thephk1998-04-151-2/+2
| | | | | | | error message prints the two numbers backwards. PR: 6313 Reviewed by: phk Submitted by: Archie Cobbs
* Add aback in a line a accidentally killed in my last commit.imp1998-04-021-1/+2
| | | | Submitted by: Bill Fenner
* Make this compile (and seemingly work).eivind1998-04-021-2/+2
|
* A fairly rare possible buffer overflow:imp1998-04-012-5/+17
| | | | | Theo fixed this and tqbf reported it Obtained from: OpenBSD
* .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq.charnier1998-03-191-2/+4
|
* Minor style nit noticed by bde.imp1997-12-241-2/+2
|
* Fixed DPADD.bde1997-12-161-0/+2
|
* Add an ntohs() and format an IP address with inet_ntoa() whenfenner1997-08-111-3/+3
| | | | | | | printing the details of a received ICMP packet. PR: bin/3766 Submitted by: denny1@home.com (Denton Gentry)
* don't lose track of how many packets we've sentjulian1997-08-071-3/+3
| | | | | | if we get 'host unreachable'. (or any other errors than ENOBUFS) makes -c work again even if you can't get there.. This really needs a rework..
* Cleaned up revisions 1.22 and 1.23.bde1997-07-201-21/+24
| | | | | Fixed minor bugs in revisions 1.12 and 1.23 (variables assigned to in signal handlers weren't declared as volatile).
* Calculate and print out the standard deviation of the round trip times.wollman1997-07-183-19/+33
| | | | | | | This isn't necessarily the best statistic, but it is by far the easiest to calculate. Update the man page to be more explicit about precisely which statistics are printed out. Revert some of jmg's bogus man page changes from rev 1.11.
* Fix a problem introduced with a recent change that caused a hang withsef1997-07-131-10/+28
| | | | | | | | | unreachable hosts. Note that most of this consists of telling SIGINT and SIGALRM to interrupt the system call, instead of restarting them. Also try to get rid of some potential races Bruce didn't like; hopefully they aren't a problem (potential or otherwise) now. Reviewed by: julian
* don't count packets as being transmitted when we know that the sendto()julian1997-07-091-2/+4
| | | | failed (e.g. ENOBUFS)
* ping called printf() from a signal handler..julian1997-07-091-5/+26
| | | | | | | | | | this is a NO-NO re-arange to just set a "please die immediatly" flag in the signal handler and handle this in the normal thread. also handle ping -f better on slow links by backing off a bit when we get a ENOBUFFS from the sendto().
* Fix typo introduced in 1.17.imp1997-03-041-2/+2
| | | | Submitted by: "Philippe Charnier" <charnier@xp11.frmug.org>
* Check the size of the IP address reutrned from gethostbyname2, per PRimp1997-03-031-1/+3
| | | | | | 2578 from Julian A. Likely not strictly needed, but it doesn't hurt and protects ping against possible buffer overflows if the resolver were to return large IP addresses.
* fix man page to use marcos instead of parens, quotes and bracesjmg1997-03-021-60/+79
| | | | plus other minor fixes
* 1) Minor nits in the usage message from bde. I took out the hard tabs andimp1997-03-022-4/+7
| | | | | | | | | used spaces to align the second line under the program name. 2) Cache uid after call to setuid(getuid()) so we don't waste a system call for each packet with a call to getuid for the -v case. 3) Update manual to reflect new restriction on -l from last delta. Suggested by: bde, Bill Fenner
* 1) Fix usage to match convention and manual. Fix manual to match usage.imp1997-03-022-10/+26
| | | | | | | | | | | | | 2) Must be root to run preload (OpenBSD ping.c 1.8) 3) Don't print all replies unless verbose and root (from idea in OpenBSD ping.c 1.10 and 1.11) to avoid leaking information available only to root. 4) Remove unused h: from option string to getopt. 5) Make the compiler happy with exit(0) (Lite-2?) Reviewed by: Dan Cross <tenser@spitfire.ecsel.psu.edu> Good candidate for 2.2 and 2.1 (as are many of the 1.17 changes).
* Make ping -Wall clean (except for one warning).wollman1997-03-013-174/+219
| | | | | | | | | Do a better job of argument parsing. Don't permit ping -f to a multicast address (very antisocial). Don't permit -L, -I, -T options with unicast addresses. Ensure that we ask for only AF_INET addresses (should close PR#2584). Return <sysexits.h> error codes for failures. Document this. Fix man page to identify the author and put sections in correct order.
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
OpenPOWER on IntegriCloud