summaryrefslogtreecommitdiffstats
path: root/usr.sbin/tcpdump/print-bootp.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* - (void)printf() -> printf(); the cast adds clutter for little value.procter2020-01-241-7/+7
| | | | | | | | | | - 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
* Rework UDP parsing, particularly around IP addresses.dlg2018-07-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This originally started as trying to put a consistent space between the UDP header information and the payload parsing, but while doing that I noticed inconsistent IPv4 vs IPv6 handling. Apart from the default "srcip.srcport > dstip.dstpor" output, all the other places that IP addresses were printed assumed IPv4. It looks like it is possible that udp_print() can be called without an IP header, which made these blind IPv4 prints turn into NULL derefs. This fixes the problem above by only having a single place that prints the addresses out, and makes sure to get the difference between IPv4, IPv6 and no IP correct. This changes how the checksum is calculated. It incrementally builds the UDP checksum by feeding the IPv4 and v6 addresses in separately, then using common code for the rest of the pseudo header and actual payload. Lastly, this does make printing the space between the UDP header and its payload consistent. The UDP code is now responsible for adding a space after itself so the payload parsers don't have to. They got it wrong in some cases anyway, so this should be a lot more uniform. help and ok sthen@
* assign pointers to NULL rather than 0mmcc2015-12-221-2/+2
|
* Remove memory.h includes.mmcc2015-11-181-2/+1
| | | | ok deraadt@
* Remove more register keywords.mmcc2015-11-151-12/+12
| | | | ok daniel@, discussed on hackers@
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-2/+1
| | | | | | | | | 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)
* If a constant string needs a name, use a static const array instead of aguenther2013-10-271-2/+2
| | | | | | | | pointer or non-const array, as that minimizes the symbols, maximizes the placement into read-only memory, and avoids warnings from gcc -Wformat=2 when they're used as format strings. ok deraadt@
* 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
* trash $Header goo which is just annoying; 5595deraadt2007-10-071-2/+2
|
* c should be u_char for printing option numbers. fix parameter requeststevesk2007-01-081-3/+3
| | | | list option numbers >127 being negative. ok krw@
* Fix size checks for bootp packets. Problem found and initial patchcanacar2006-05-211-5/+5
| | | | from pedro@. ok moritz@
* fix byteorder for "s" and "l" formats; ok henning@ krw@stevesk2005-11-171-4/+4
|
* We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.millert2002-02-191-4/+2
|
* Add $OpenBSD$. (jakob@ ok)ho2000-10-031-1/+3
|
* INET6jakob2000-04-261-2/+128
| | | | | | DHCP/BOOTP tcp & udp checksum detection numerous bugfixes
* bring more inline with tcpdump 3.4brad1999-09-161-2/+2
|
* - Merge some changes from tcpdump 3.4jakob1999-07-281-1/+4
| | | | | | | | | | | | | | | -a flag; attempt to convert network and broadcast addresses to names Improved signal handling Miscellaneous fixes and typos OSPF MD5 authentication support - -X flag; emacs-hexl print (including ascii) - Add ECN bits to TCP and IP headers - IKE & IPsec (ESP & AH) support OK deraadt@
* length check bp_file; cgdderaadt1998-07-081-2/+2
|
* #if __STDC__ --> #ifdef __STDC__mickey1997-07-251-2/+2
|
* *** empty log message ***bitblt1996-12-121-46/+30
|
* it is 3.2 now.mickey1996-07-131-19/+23
|
* 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/+359