summaryrefslogtreecommitdiffstats
path: root/sbin/ping
Commit message (Collapse)AuthorAgeFilesLines
* 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
* More strict ip options parsing.maxim2002-07-051-53/+44
| | | | | Reviewed by: bde (style), silence on -audit MFC after: 2 months
* WARNS fixes.maxim2002-04-021-3/+3
| | | | | | | Submitted by: kris Reviewed by: bde Approved by: ru MFC after: 2 weeks
* style(9) cleanup.maxim2002-04-021-57/+53
| | | | | | | Submitted by: kris (an early version of this patch) Reviewed by: bde Approved by: ru MFC after: 2 weeks
* Style(9) local vars after 'register' removal.obrien2002-03-231-33/+41
| | | | Requested by: bde
* Remove 'register' keyword.obrien2002-03-201-13/+13
| | | | | | 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?)
* Use network byte order for the ICMP sequence number. This is onlyfenner2002-02-271-6/+8
| | | | | significant when monitoring packets on another system, since otherwise the ICMP sequence number is only used by the ping client.
* Document ping(8) reaction to SIGINFO.maxim2002-02-071-1/+13
| | | | | | | PR: doc/33639 Reviewed by: ru Approved by: ru MFC after: 1 week
* Fixed two bugs with the "-l preload" option:ru2002-01-141-5/+9
| | | | | | | - first ping after a preload was sent undelayed - we could send more than -c packets in preload PR: bin/32354
* Default to WARNS=2.obrien2001-12-041-1/+1
| | | | | | Binary builds that cannot handle this must explicitly set WARNS=0. Reviewed by: mike
* The -A option (beep when packets are dropped) didn't work quiteiedowse2001-09-252-5/+12
| | | | | | | | | | | | | right; after a single packet was dropped it beeped after every transmission. Change its implementation to only output a bell when there is an increase in the maximum value of the number of packets that were sent but not yet received. This has the benefit that even for very long round-trip times, ping -A will do roughly the right thing after a few inital false-positives. Reviewed by: ru
OpenPOWER on IntegriCloud