summaryrefslogtreecommitdiff
path: root/print-tcp.c
Commit message (Collapse)AuthorAgeFilesLines
...
* From Ilpo Järvinen: fix printing of TCP sequence number for data segmentsGuy Harris2009-03-011-1/+1
| | | | | so it's printed for segments containing data regardless of whether -v was used or not.
* Make sure the packet isn't cut short before verifying the MD5 signature.Guy Harris2009-02-261-2/+15
| | | | Indicate why we can't verify the MD5 signature.
* pulled up some changes from the 4.0 release branchmcr2008-11-091-2/+2
|
* add infrastructure for verifiying the HMAC-MD5 digest in routing protocols.hannes2008-08-161-7/+4
| | | | | | | The shared secret is passed using the already existing -M option which is used for TCP-MD5 checking. add initial supoort for RSVP Integrity object verification.
* Add more bounds checks to the NFS dissector - check before references toguy2007-12-221-18/+34
| | | | | | | | | | | | items in the RPC header. When dissecting NFS over TCP, fetch the fragment header length, use it to limit the dissection of the request or reply (in case there's more than one request or reply in the packet), and do the same direction-plus-port checks that are done for NFS over UDP. Also eliminate the bounds check for the RPC header in the TCP dissector code, and do checks for the fields it looks at (other checks are done by the NFS dissector).
* SMB-over-TCP (port 445) support.guy2007-12-091-1/+3
|
* Fix typo in "incorrect checksum" message for IPv6.guy2007-11-091-2/+2
|
* Patches from NetBSD tree.mcr2007-08-291-2/+6
|
* From Alexander Dupuy: if the separator character is null, it means "noguy2007-04-031-2/+3
| | | | separator needed", so don't print it.
* From Kevin Steves <stevesk@pobox.com>:hannes2007-01-291-5/+5
| | | | remove extra comma after checksum verification print.
* change the TCP printer to print new-style order:hannes2007-01-291-636/+629
| | | | | | | | | - seperate fields by comma - use [] for flags and options sets - print a trailing length field make use of tok2str() and bitttok2str() move port definitions into tcp.h
* from Gerrit Renker <gerrit@erg.abdn.ac.uk>:hannes2006-11-021-18/+4
| | | | | remove duplicate code for v6 checksum calculation unify the output for broken checksums
* From Ben Byer <bushing@sourceforge.net>: add a "-K" flag to suppress theguy2006-05-051-3/+3
| | | | | | checking of TCP checksums. Sort the argument processing code alphabetically.
* add basic support for keyed authentication TCP optionhannes2005-11-291-1/+10
|
* From Noritoshi Demizu: memcmp() returns a value = 0 if the two memoryguy2005-10-161-2/+2
| | | | | | regions are =, < 0 if the first memory region is < the second, or > 0 if the first memory region is > the second, so to check whether two memory regions are equal, check whether memcmp()'s return value is == 0.
* Squelch a signed vs. unsigned warning.guy2005-04-211-2/+2
|
* From Noritoshi Demizu <demizu@users.sourceforge.net>: don't print "sack"guy2005-04-181-5/+3
| | | | twice.
* tweaked copyright.mcr2005-04-061-1/+3
|
* Have our own headers to declare the format of ONC (Sun) RPC messages onguy2004-12-271-5/+5
| | | | | | | | | | | | | | the wire; the definitions in many systems use u_long, which is 64 bits long on many platforms - that's OK for in-memory structures, but it doesn't match what's on the wire. Use headers based on the Sun ones, but use u_int32_t for fields, and otherwise make the structures match what's on the wire, and change some names to avoid collision with <rpc/rpc.h>, which print-sunrpc.c includes to declare "getrpcbynumber()" and the structure it returns. Record whether "getrpcbynumber()" is found, and use it only if it's found, rather than basing the decisison on whether we're building for Win32 or not.
* In "tcp_verify_signature()", don't assume we can do IPv6, andguy2004-09-151-7/+30
| | | | | | distinguish between "signature invalid" and "we can't check the signature". Have its caller show the raw signature if we can't check it.
* "sizeof()" could be "unsigned long" or "unsigned int"; cast it toguy2004-07-151-3/+3
| | | | | "unsigned long" and print it with "%lu", so it works in either case, regardless of whether "long" is the same size as "int" or not.
* Check for a TCP header length that's too short, report more informationguy2004-07-081-5/+17
| | | | if it's too long, and check for NFS only if the header length is OK.
* From Steiner Haug: handle LDP-over-TCP, and do more complete LDPguy2004-05-271-3/+4
| | | | decoding.
* TCP MD5 signature for IPv6. XXX not really tested yetitojun2004-04-261-13/+27
|
* display cosmetics: be more verbose on IP6 TCP checksum errors, align IP4,IP6 ↵hannes2004-04-241-9/+13
| | | | checksum printing
* get rid of warning in print-tcp.c about const violations.mcr2004-04-051-7/+11
| | | | | | the signature checker was writing over a structure that should not have been modified - change the code to make a copy instead.
* From Bruce M. Simpson: add a "-M" flag to specify a shared secret forguy2004-03-231-1/+75
| | | | TCP-MD5 (RFC 2385) digest verification if we have libcrypto.
* Cut off "snapend" at the length of the IPv4 or IPv6 payload, so we don'tguy2003-11-191-11/+8
| | | | | | | | | | | | | | | | | 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".
* In mDNS, report IN-class records with the "cache flush" bit set as such,guy2003-11-051-2/+2
| | | | rather than as "Class 32769".
* unsigned/signed mixupitojun2003-10-281-2/+2
|
* Add a new "ipproto.h" header file, with definitions of IP protocol typeguy2003-06-071-1/+2
| | | | | | | 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.
* The "__attribute__((packed))" tag on structures causes some files not toguy2002-12-111-40/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | compile with Sun C, as "interface.h" isn't being included before the structures are being declared. Furthermore, in the files that Sun C *can* compile, it doesn't cause Sun C to generate code that's safe with unaligned accesses, as "__attribute__" is defined as a do-nothing macro with compilers that don't support it. Therefore, we get rid of that tag on the structures to which it was added, and instead use "EXTRACT_16BIT()" and "EXTRACT_32BIT()" to fetch 16-bit and 32-bit big-endian quantities from packets. We also fix some other references to multi-byte quantities to get rid of code that tries to do unaligned loads on platforms that don't support them. We also throw in a hack that makes those macros use "__attribute__((packed))" on structures containing only one 16-bit or 32-bit integer to get the compiler to generate unaligned-safe code rather than doing it by hand. (GCC on SPARC produces the same code that doing it by hand does; I don't know if GCC on any other big-endian strict-alignment processor generates better code for that case. On little-endian processors, as "ntohs()" and "ntohl()" might be functions, that might actually produce worse code.) Fix some places to use "%u" rather than "%d" to print unsigned quantities.
* Get rid of the "-Wno-unused" flag, and fix up most of theguy2002-09-051-2/+2
| | | | | | | | | | | | | | | unused-parameter problems reported by GCC. Add an _U_ tag to label parameters as unused if the function is called through a pointer (so that you can't change its signature by removing parameters) or if there are unused parameters only because the function isn't complete. Add some additional bounds checks the necessity for which was revealed while cleaning up unused-parameter problems. Make some routines static. "lcp_print()", defined in "print-lcp.c", isn't called anywhere - "print-ppp.c" has the code to dissect LCP. Get rid of "print-lcp.c".
* Add a few more GCC warnings on GCC >= 2 for ".devel" builds.guy2002-09-051-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From Neil T. Spring: fixes for many of those warnings: addrtoname.c, configure.in: Linux needs netinet/ether.h for ether_ntohost print-*.c: change char *foo = "bar" to const char *foo = "bar" to appease -Wwrite-strings; should affect no run-time behavior. print-*.c: make some variables unsigned. print-bgp.c: plen ('prefix len') is unsigned, no reason to validate by comparing to zero. print-cnfp.c, print-rx.c: use intoa, provided by addrtoname, instead of inet_ntoa. print-domain.c: unsigned int l; (l=foo()) < 0 is guaranteed to be false, so check for (u_int)-1, which represents failure, explicitly. print-isakmp.c: complete initialization of attrmap objects. print-lwres.c: "if(x); print foo;" seemed much more likely to be intended to be "if(x) { print foo; }". print-smb.c: complete initialization of some structures. In addition, add some fixes for the signed vs. unsigned comparison warnings: extract.h: cast the result of the byte-extraction-and-combining, as, at least for the 16-bit version, C's integral promotions will turn "u_int16_t" into "int" if there are other "int"s nearby. print-*.c: make some more variables unsigned, or add casts to an unsigned type of signed values known not to be negative, or add casts to "int" of unsigned values known to fit in an "int", and make other changes needed to handle the aforementioned variables now being unsigned. print-isakmp.c: clean up the handling of error/status indicators in notify messages. print-ppp.c: get rid of a check that an unsigned quantity is >= 0. print-radius.c: clean up some of the bounds checking. print-smb.c: extract the word count into a "u_int" to avoid the aforementioned problems with C's integral promotions. print-snmp.c: change a check that an unsigned variable is >= 0 to a check that it's != 0. Also, fix some formats to use "%u" rather than "%d" for unsigned quantities.
* more consistent use of the length: indicator;hannes2002-08-201-2/+2
|
* tell the world that its LDP, rather than port 646;hannes2002-08-201-1/+4
|
* dissect traffic on port 5353 as multicast DNS. vlubet@apple.comitojun2002-08-161-2/+3
|
* Added support for Win32, based on WinPcap.risso2002-08-011-7/+2
|
* Calculate UDP/TCP pseudo-checksum properly in the presence offenner2002-07-281-2/+5
| | | | source-route options.
* For packets with a bad TCP checksum, show the value from the header, andguy2002-07-211-5/+7
| | | | | the value it should have had, as we do for packets with a bad IP checksum, rather than showing the non-zero computed checksum.
* The BXXP protocol was replaced by the BEEP protocol; replace the BXXPguy2001-12-101-4/+4
| | | | dissector with a BEEP dissector.
* clarify some signedness mixupitojun2001-11-161-2/+2
|
* remove a blank lineitojun2001-11-051-2/+1
|
* comment about DNS-over-TCP decoding. the packet could be unaligned (DNSitojun2001-10-191-2/+5
| | | | | formatted payload does not start at the top of the packet), and in that case, the decoded result could be garage
* Add --enable-smb to make it easier to re-enable the SMB printer.fenner2001-10-081-2/+2
|
* disable smb printing until we have boundary checks in *smb*.c (there's almostitojun2001-10-041-1/+3
| | | | no boundary check).
* Add MSDP printer.fenner2001-09-171-1/+4
|
* Use the passed in length instead of the IP header's length in thefenner2001-08-201-22/+5
| | | | | pseudo-header checksum, to allow for IPSEC or other encapsulations. Use in_cksum() instead of private versions.