summaryrefslogtreecommitdiff
path: root/print-ip.c
Commit message (Collapse)AuthorAgeFilesLines
* do not convert protocol to names if -n flagMichael Richardson2012-04-071-1/+1
|
* whitespace changes in print-ip.cMichael Richardson2012-03-291-11/+11
|
* Back out DLT_PFSYNC support.Guy Harris2012-02-291-8/+0
| | | | | | Unfortunately, the DLT_PFSYNC support depends on header files included from the pfctl command's source tree, and trying to arrange to find that would be too much trouble.
* Add DLT_PFSYNC support.Guy Harris2012-02-291-0/+8
| | | | | | From FreeBSD PR bin/124825: tcpdump(8) does not support pfsync(4) data, which in turn was ported over from OpenBSD. We already have CARP support, so we did not port that part over.
* permit -n flag to affect print-ip for protocol numbersMichael Richardson2012-01-231-1/+1
|
* Add a CARP dissector and a command-line option to dissect proto 112 as CARP.George Neville-Neil2011-11-231-1/+13
| | | | | | | CARP and VRRP both use IP protocol number 112, so there needs to be a -T flag to specify that protocol 112 be dissected as CARP rather than VRRP. Also update the man page.
* Add a routine to do the "checksum with pseudo-header" stuff for IPv4.Guy Harris2011-06-171-1/+34
| | | | Clean up some other stuff while we're at it.
* Go with Wireshark's Internet checksum routine.Guy Harris2011-06-131-89/+8
| | | | | | | | | | | | | The Wireshark routine is based on the BSD in-kernel portable checksum routine (thus BSD-licensed); it takes a vector of pointers and lengths and checksums the concatenation of the buffers in question (just as the BSD in-kernel routine checksums a chain of mbufs). This simplifies the "with a pseudo-header" checksums; hopefully it'll fix up the problems being seen on some big-endian platforms, which might be due to hand-calculating some or all of the checksum and doing so incorrectly. It also gets rid of some code that might be dereferencing unaligned pointers.
* Convert the IPv6 printer to use netdissect.Guy Harris2010-11-071-3/+3
|
* reworked print-ether to use netdissectMichael Richardson2010-10-071-4/+4
|
* modularize ip6 nextlayer checksum generation andHannes Gredler2009-10-121-1/+2
| | | | change tcp6 and pim6 to use it.
* Make the -K flag suppress IP and UDP checksum checking as well.Guy Harris2009-03-051-1/+1
|
* From Victor Oppleman: add support for RFC 1393 traceroute.guy2007-09-141-1/+2
|
* add basic skeleton for printing olsr packets as per rfc3626hannes2007-03-271-2/+2
| | | | add a line break in verbose mode fro the ip printer.
* from Kevin Steves <stevesk@pobox.com>:hannes2007-01-171-2/+2
| | | | format the ttl field not with heading whitespaces for ttl < 100 and ttl < 10
* from Kevin Steves <stevesk@pobox.com>:hannes2007-01-171-4/+4
| | | | receive some colons in the IP printer output for consistency reasons.
* Add some bounds checking to the IP options code, and clean up theguy2006-02-191-18/+30
| | | | options output a bit.
* We've gotten our IP definitions/declarations from our own "ip.h" for aguy2005-11-131-7/+1
| | | | | while, and it defines IP_MF and IP_DF; we don't need to compensate for system headers lacking them.
* Properly pass the MF flag and fragment offset to the UDP, TCP, and ICMPguy2005-11-131-4/+6
| | | | print routines.
* bugfix: don't mask the more-fragments bit for ICMP checksum suppressionhannes2005-10-071-2/+2
|
* From Ian McDonald and Arnaldo Carvalho de Melo: DCCP support.guy2005-09-201-2/+6
|
* from Andy Heffernan <ahh@juniper.net>:hannes2005-05-201-1/+5
| | | | add PGM upport as per rfc3208
* use new ip_print_demux() routine in ISAKMP UDP-ESP encapmcr2005-04-071-12/+37
| | | | printer.
* refactored ip_print() so that chained header parser (ESP/AH) canmcr2005-04-061-192/+215
| | | | more easily call the inner parts.
* from Rick Jones <rick.jones2@hp.com>:hannes2005-01-211-3/+14
| | | | | suppress the IP printers "bad-len" error message in case TSO (TCP segment offload) is enabled
* from nicolas ferrero <toorop@babylo.net>:hannes2005-01-121-2/+2
| | | | - fix EGP boundary testing
* Get rid of an unused variable.guy2004-12-271-3/+2
|
* clean up the ip options printer:hannes2004-09-271-58/+47
| | | | | | - make more use of tok2str() - always display the option length - move option defines into ip.h
* Use %u to print unsigned quantities.guy2004-08-271-2/+2
| | | | | | | | | Check, and use, the supplied packet length in the PPPoE dissector. (It reflects the actual packet length; snapend reflects the captured packet length.) As we're now doing bounds checks with TCHECK, the loop over the tagged fields doesn't have to check against snapend.
* print the packet length for ESP packetshannes2004-07-161-2/+2
|
* From Eddie Kohler <xexd@sourceforge.net>: In "ip_finddst()":guy2004-06-251-10/+10
| | | | | | | | | | | | | quit as soon as we see IPOPT_EOL; *don't* quit as soon as we see IPOPT_NOP, just advance to the next option, if any; implement "quit" as "return the destination address from the IP header rather than as "return 0". Also, return the IP header destination address if we see a source-routing option with a too-short length.
* supress printing of the L3 protoname if eflag is sethannes2004-05-011-2/+2
|
* -add baseline support for dissecting EIGRP-IP and EIGRP-IPX messageshannes2004-04-301-9/+5
| | | | | -FIXME: complete TLV dissection (today we just show the TLV name and hexdump the TLV value)
* Some BSDs define IPPROTO_IGRP as 88 and don't define IPPROTO_EIGRP, soguy2004-04-281-2/+22
| | | | | | | | | | | | | | | | | | | | | | we also define it as 88, so we can't have case IPPROTO_IGRP: case IPPROTO_EIGRP: in a switch statement. The current IANA protocol number assignments page lists 9 as "any private interior gateway (used by Cisco for their IGRP)" and 88 as "EIGRP" from Cisco, so we define IPPROTO_PIGP as 9 (which matches what those BSDs do) and IPPROTO_EIGRP as 88 (so we don't bother with IPPROTO_IGRP at all), and do case IPPROTO_PIGP: case IPPROTO_EIGRP: It's not clear that we should handle both with the same print routine, however - Cisco IGRP and Cisco EIGRP don't appear to have the same packet format.
* do host-OS indep. ipproto name resolutionhannes2004-04-261-7/+9
|
* print-esp has been "NDO"-ized.mcr2004-04-051-2/+2
| | | | | replace error() and warning() with ndo-ized version. moved snaplen/snapend to ndo structure.
* Do the length checks only for IP options with a length field.guy2004-03-241-6/+6
|
* Add bounds and option length checking.guy2004-03-241-26/+43
| | | | Use "%u", not "%d", for unsigned values.
* print the proto-id in verbose modehannes2004-03-171-3/+4
|
* Have various routines for printing non-final headers for IPv4/IPv6guy2003-11-191-5/+7
| | | | | | | return -1 if they run out of data. Have the IPv4 and IPv6 dissectors check for non-positive return values from those routines and quit if they see one.
* Cut off "snapend" at the length of the IPv4 or IPv6 payload, so we don'tguy2003-11-191-3/+16
| | | | | | | | | | | | | | | | | run past the end of that payload. Check that the IPv4 total length isn't less than the header length. Use "%u", not "%d", to print unsigned values. Properly update "len" in the header-processing loop for IPv6. Doing so means we can trust the length passed to the TCP and UDP dissectors when constructing the IPv6 pseudo-header; do so (but fix the length we pass to the UDP-over-IPv6 checksum routine). That length is unsigned; make the corresponding arguments to the TCP and UDP checksum routines unsigned.
* Have the configure script arrange that the Makefile define _U_guy2003-11-161-4/+4
| | | | | | | | | | appropriately, and that GNUmakefile and the MSVC++ project file define it apppriately, as we do with libpcap, rather than defining it in "interface.h". Undo the rcsid-shuffling and addition of extra #includes, as we no longer need to arrange that "interface.h" be included before using _U_ in an RCS ID or copyright.
* From Neil Spring:guy2003-11-151-4/+4
| | | | | | | | | | | use "_U_" in the definitions of "rcsid[]", to eliminate complaints about those variables being unused; move the definitions after the include of "interface.h", or add an include of "interface.h", so that "_U_" is defined. Include "config.h" before including "tcpdump-stdinc.h" in "missing/datalinks.c".
* Fix the separator for "bad cksum".guy2003-07-081-5/+2
|
* Add a new "ipproto.h" header file, with definitions of IP protocol typeguy2003-06-071-47/+4
| | | | | | | values. Use that rather than private definitions in various files. Add "gmpls.h" to the list of files in FILES, and add it and "ipfc.h" to the list of files in INSTALL.
* warn if v6 was found using ip_print()hannes2003-05-251-3/+9
|
* bugfix: print the real version number instead of always 4 if version != 4hannes2003-05-211-2/+2
|
* don't attempt checksumming in ICMP if the packet is a fragmenthannes2003-05-151-2/+3
|
* minor display cosmetics:hannes2003-05-151-2/+2
| | | | | print 3-digit ttl field in print-ip.c unbracketize the LCP id in print-ppp.c
* print IP keyword plus optional version numberhannes2003-05-081-1/+3
|