summaryrefslogtreecommitdiffstats
path: root/sbin/ping
Commit message (Collapse)AuthorAgeFilesLines
* Sync usage() with SYNOPSIS.ru2005-12-011-4/+4
|
* -mdoc sweep.ru2005-11-181-3/+4
|
* Implement a new feature for ping(8) - sweeping pings. In a sweepingglebius2005-08-152-7/+117
| | | | | | | | | ping ICMP payload of packets being sent is increased with given step. Sweeping pings are useful for testing problematic channels, MTU issues or traffic policing functions in networks. PR: bin/82625 Submitted by: Chris Hellberg <chellberg juniper.net> (with some cleanups)
* o Store timestamp in network byte order.maxim2004-09-301-4/+15
| | | | | | | | | o Remove an assumption sizeof(struct timeval) == 8 (this is not true on sparc64). Reviewed by: imp, -hackers Obtained from: NetBSD (rev. 1.75) MT5 after: 1 month
* Avoid using void pointers in additive expressions.stefanf2004-08-141-1/+1
| | | | PR: 56653
* Remove advertising clause from University of California Regent's license,markm2004-04-092-8/+0
| | | | | | per letter dated July 22, 1999. Approved by: core, imp
* Don't turn off the regular SIGINFO status information. The use ofiedowse2004-04-071-14/+0
| | | | | | | | | | the NOKERNINFO flag only marginally de-clutters the output and has a number of unwanted side effects: o The kernel info might be what you want to see o ^T is left non-functional if ping is killed non-cleanly o "ping -q foo &" gets suspended on tty output Encouraged by: bde
* style.Makefile(5):johan2004-02-231-1/+1
| | | | Use WARNS?= instead of WARNS=.
* Certain ICMP error replies cause ping to perform a reverse DNSiedowse2004-02-081-0/+6
| | | | | | | | | | | lookup on an IP address from the packet (such as the IP that sent a TTL exceeded error). If the DNS lookup takes a long time, ^C will appear to be ineffective since the SIGINT handler just sets a flag and returns. Work around this by exiting immediately on receipt of a second SIGINT when DNS lookups are enabled. PR: bin/4696 MFC after: 1 week
* mdoc(7): Use the new feature of the .In macro.ru2003-09-081-1/+1
|
* o Rename local variables, do not shadow global declarations.maxim2003-07-141-7/+7
|
* o Kill MINICMPLEN, there is ICMP_MINLEN already.maxim2003-07-141-7/+6
|
* o Be ready to get a reply with length up to IP_MAXPACKET.maxim2003-07-141-11/+18
| | | | | | | | o Warn when recieved packet length is not equal to length of the packet we sent out. Idea from NetBSD. o Fit the dump of packet with wrong data to 80 columns (from NetBSD). Comments from: bde
* The current recommended default time to live (TTL) for the Internetru2003-06-251-3/+3
| | | | | | | Protocol (IP) is 64 [RFC791, RFC1122]. Prodded by: Igor Kucherenko <kivvy@sunbay.com> Obtained from: http://www.iana.org/assignments/ip-parameters
* Fix SIGINFO handling: do not print incorrect timing statisticsmaxim2003-06-021-6/+6
| | | | | | when the data for it is not available. Founded by: ping -s0 localhost; press ^T
* Use __FBSDID() to quiet GCC 3.3 warnings.obrien2003-05-031-4/+4
|
* o Skip timestamp part when checking payload.maxim2003-04-141-2/+8
| | | | | PR: bin/50909 Submitted by: Barney Wolff <barney@lab.databus.com>
* Deal with a case where the returned packed was smaller than themdodd2003-04-071-12/+17
| | | | | | transmitted packet (because the remote host stripped off our icmp_data). Submitted by: Maxim Konovalov <maxim@macomnet.ru>
* Back out support for RFC3514.mdodd2003-04-022-17/+3
| | | | RFC3514 poses an unacceptale risk to compliant systems.
* IP_EVIL -> IP_EFmaxim2003-04-021-2/+2
|
* Implement support for RFC 3514 (The Security Flag in the IPv4 Header).mdodd2003-04-012-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (See: ftp://ftp.rfc-editor.org/in-notes/rfc3514.txt) This fulfills the host requirements for userland support by way of the setsockopt() IP_EVIL_INTENT message. There are three sysctl tunables provided to govern system behavior. net.inet.ip.rfc3514: Enables support for rfc3514. As this is an Informational RFC and support is not yet widespread this option is disabled by default. net.inet.ip.hear_no_evil If set the host will discard all received evil packets. net.inet.ip.speak_no_evil If set the host will discard all transmitted evil packets. The IP statistics counter 'ips_evil' (available via 'netstat') provides information on the number of 'evil' packets recieved. For reference, the '-E' option to 'ping' has been provided to demonstrate and test the implementation.
* Default data length should be 56, not 64.mdodd2003-03-281-1/+1
|
* - Make -M mask and -M time exclusive.mdodd2003-03-241-22/+21
| | | | | | | | | | | | | | | | | | | | - Correct some problems with packet construction. +--------+------------+----------+-------------+---------+ | | | | | | | IP Hdr | MINICMPLEN | phdr_len | TIMEVAL_LEN | payload | | | | | | | +--------+------------+----------+-------------+---------+ | | | | |<- IP ->|<------- ICMP -------->|<------ datalen ------>| My previous changes tried to mess around with 'datalen' instead of modifying 'phdr_len'. I'm including this nice ASCII diagram (from Maxim) to further clarify things in CVS history. Submitted by: Maxim Konovalov <maxim@macomnet.ru>
* Fixed an errx format error in rev.1.81. This should have been fatalbde2003-03-241-2/+2
| | | | | | | | when WARNS was increased recently, but __printf0like() has been temporarily disabled for 8 months. Fixed related style bugs (disordered declaraction and silly type for maxpayload -- assume 16-bit ints like the rest of ping.c).
* Demangle the usage message at the source level.ru2003-03-141-15/+8
| | | | Submitted by: bde
* Fix and sync SYNOPSIS and usage().ru2003-03-112-24/+44
| | | | Prodded by: bde
* Update ping to be WARNS=2 compliant.seanc2003-03-052-27/+36
| | | | | Reviewed by: -audit (no objections ~1mo) Approved by: nectar
* Spelling, grammar fixes.mdodd2003-03-051-3/+3
|
* Remove documentation of old '-M' flag.mdodd2003-03-051-15/+5
| | | | Re-order.
* Support ICMP_TSTAMP/ICMP_TSTAMPREPLY.mdodd2003-03-022-28/+104
| | | | This alters the meaning of the '-M' flag.
* Sort options.ru2003-02-232-77/+83
|
* Call fill() after maxpayload has been initialized.mdodd2003-01-291-3/+6
| | | | Reviewed by: maxim
* Send ICMP_MASKREQ packets when the '-M' option is specified.mdodd2003-01-282-10/+31
|
* Better error handling for -s.maxim2003-01-232-11/+15
| | | | | | | | | | | | | | Submitted by: bde Do not constantify maximum payload size. It is 65467 with -R (record route), and 65507 without it. Reviewed by: silence on -net Proposed by: bde I am going to MFC rev.1.77 - 1.81 ping.c and rev.1.39 and 1.40 ping.8: MFC after: 6 months
* style(9) sweep.maxim2003-01-231-37/+30
| | | | Submitted by: bde
* Anti-magic: s/255/MAXTTL/maxim2003-01-231-2/+2
|
* Implement -D (do not fragment) and -z (TOS) options.maxim2003-01-232-8/+63
| | | | | | PR: bin/29164 Reviewed by: silence of -net Obtained from: OpenBSD
* Print strict source routing option.maxim2003-01-231-1/+3
| | | | | Reviewed by: silence on -net Proposed by: David Wang <dsw@juniper.net>
* english(4) police.schweikh2002-12-271-1/+1
|
* Spelling: s/then/than/ where appropriate.ru2002-12-241-1/+1
|
* Fix LSRR option length check: it has to be less or equal remained header'smaxim2002-10-211-1/+2
| | | | | | length minus sizeof(struct ip). MFC after: 1 week
* Add an -o option to exit after receiving one reply. This can be useddd2002-10-022-5/+12
| | | | | | | | to test whether a link is live. PR: 38573 Submitted by: David Taylor <davidt@yadt.co.uk> Obtained from: NetBSD
* Commit "unrelated style fixes" part of Bruce's patch (regardingpeter2002-09-111-5/+5
| | | | | | bcopy/memcpy) seperately. Submitted by: bde
* Modify previous commit to solve the real problem that made gcc thinkpeter2002-09-111-5/+5
| | | | | | | the timestamp was aligned. ie: Use a void * instead of struct timeval * which gcc assumes will be aligned. Go back to memcpy(). Submitted by: bde
* In reference to previous commit: use err(3).nectar2002-09-091-4/+2
| | | | Noticed by: bde
* Check for FD_SET overrun.nectar2002-09-091-0/+4
|
* Add the -A flag to the usage line.iedowse2002-08-271-1/+1
| | | | | Submitted by: Yutaka KAWASE <yutaka@mailhost.net> MFC after: 3 days
* Fix the broken "avoid unaligned data" fix. The problem is that the builtinpeter2002-08-101-2/+2
| | | | | | | | | | | | | | | | | | gcc memcpy "knows" about types that are supposed to be actually already aligned and triggers alignment errors doing the memcpy itself. "Fix" this by changing it to a bcopy(). In this case, we had: struct timeval *tp; struct timeval tv1; memcpy(&tv1,tp,sizeof(tv1)); .. and since gcc *knows* that a pointer to a timeval is longword aligned and that tv1 is longword aligned, then it can use an inline that assumes alignment. The following works too: cp = (char *)tp; memcpy(&tv1,cp,sizeof(tv1)); Simply casting (char *)tp for the memcpy doesn't work. :-( This affected different 64 bit platforms in different ways and depends a lot on gcc as well. I've seen this on alpha and ia64 at least, although alpha isn't doing it right now.
* The .Nm utilitycharnier2002-07-061-7/+9
|
* o Change almost all magic numbers to the appropriate constants.maxim2002-07-051-28/+32
| | | | | | | | | o Fix zero payloading, unbreak ping -s 0. o Increase socket recieve buffer, ping -s 65467 is working now. Submitted by: anti-magic sweep based on kris's patch Reviewed by: bde, silence on -audit MFC after: 2 months
OpenPOWER on IntegriCloud