summaryrefslogtreecommitdiffstats
path: root/usr.sbin/tcpdump/print-icmp.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* - (void)printf() -> printf(); the cast adds clutter for little value.procter2020-01-241-9/+9
| | | | | | | | | | - fprintf(stdout, ...) -> printf() - fputs(x, stdout) -> printf(); for consistency. fputs is twice as fast on atom x5-Z8300@1.44GHz but Amdahl sees a pure printf tcpdump only 2% slower than a pure fputs (for constant strings) tcpdump to /dev/null across a 20MB/~170k packet pcap file. ok dlg@ for fputs and ok tedu@ krw@ deraadt@ a2k19 for the rest
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-4/+4
| | | | | | | | | possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
* No use for <netinet/in_systm.h> nor <netinet/tcpip.h>.mpi2014-08-141-3/+1
|
* Instead of showing the difference between a bad checksum and a goodlteo2014-06-201-5/+8
| | | | | | | | | | | | | | checksum, make tcpdump (with the -v flag) show the actual bad checksum within the IP/protocol header itself and what the good checksum should be, e.g. "[bad tcp cksum abcd! -> d1e6]" This change applies to IP, TCP (over IPv4 and IPv6), UDP (over IPv4 and IPv6), ICMP, and ICMPv6. This commit also fixes several inconsistencies in the way bad checksums were displayed for these protocols. Tested on amd64, i386, and macppc. ok henning@
* Let tcpdump detect bad ICMP checksums with the -v flag.lteo2014-01-111-2/+12
| | | | | | Tested on amd64, i386, loongson, and macppc. OK florian@
* Make icmp_print() accept the length variable, which is the length of thelteo2014-01-111-2/+2
| | | | | | | | | | | | | packet without the IP header. This is needed by the next commit that will allow tcpdump to detect bad ICMP checksums. Related functions like {tcp,udp,icmp6}_print() already accept this length variable, so this change makes icmp_print() consistent with them as well. This commit makes no functional change to tcpdump itself. OK florian@
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-271-6/+1
| | | | | | | unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
* add a missing check for truncated dport in the returned UDP header forsthen2009-05-251-2/+3
| | | | ICMP_UNREACH_PORT. from Peter J. Philipp, ok jsing@. Closes system/6149.
* trash $Header goo which is just annoying; 5595deraadt2007-10-071-2/+2
|
* implement -q for icmp, deregister, print usigned values using an unsignedotto2004-10-171-26/+29
| | | | format. ok markus@
* print the original ip packet on -vv; based on tcpdump.org; ok otto@markus2004-08-101-2/+15
|
* Fix 'tcpdump -v icmp' endianess buglet, print ID in hex.cedric2003-09-081-4/+5
| | | | Found by ho@, help/test pb@, hex suggestion/ok deraadt@
* We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.millert2002-02-191-4/+2
|
* simplify buffer handling; ok hoderaadt2001-11-071-20/+16
|
* bad typecastjakob2001-09-021-3/+3
|
* to much copy and paste; cleanupjakob2001-09-021-7/+4
|
* add support for printing id and seq with icmp echo/echoreply; based on patch from cyxob@thief.dyndns.orgjakob2001-09-021-2/+18
|
* detailed ICMP_PARAMPROB printing; jakob@ okmickey2001-06-101-7/+11
|
* Add $OpenBSD$. (jakob@ ok)ho2000-10-031-1/+3
|
* snprintf madnessderaadt1998-07-131-23/+29
|
* #if __STDC__ --> #ifdef __STDC__mickey1997-07-251-2/+2
|
* *** empty log message ***bitblt1996-12-121-19/+122
|
* it is 3.2 now.mickey1996-07-131-73/+106
|
* sync to latestderaadt1996-06-101-1/+1
|
* Updating to the latest LBL release.mickey1996-03-041-0/+1
| | | | Sun's SKIP support added.
* initial import of NetBSD treederaadt1995-10-181-0/+217