summaryrefslogtreecommitdiff
path: root/print-udp.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Go with Wireshark's Internet checksum routine.Guy Harris2011-06-131-56/+38
| | | | | | | | | | | | | 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.
* Add printer for the Babel routing protocol (RFC 6126).Juliusz Chroboczek2011-04-271-2/+3
| | | | This version includes a couple of fixes from Wireshark.
* Clean up handling of tftp.h.Guy Harris2010-08-231-1/+0
| | | | | | | | Don't include the win32/Include/Arpa copy in print-udp.c; don't put that copy into the release tarball; and don't talk about <arpa/tftp.h>, or work around its deficiencies in some OSes, as we no longer include it, we include our own tftp.h, which has a th_stuff array in its structure definition.
* print-olsr: Add basic IPv6 support.Florian Forster2009-05-211-4/+9
| | | | | | | | | | | | | | | | | | | Unfortunately OLSR uses the same IDs for IPv4 and IPv6 packets, even though the size of "messages" differ. The version of the internet protocol is therefore handed to the "olsr_print" function. The code isn't very nice, due to a high density of #ifdef INET6'es. If IPv6-support really should be optional, I'm afraid this is inevitable. Both, compilation with and without IPv6 support has been tested. The patch addresses fixes other issues, too. The length given in the packet was used for pointer arithmetic without checking if the value was in a reasonable range first in several places. It should now be possible to decode more than one "namespace message" within a single packet. Other changes remove trailing whitespace or fix lines indented with tabs (the majority of the file is indented using spaces). Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
* The checksum is optional in UDP-over-IPv4, so go back to the earlierGuy Harris2009-03-051-1/+1
| | | | behavior where it's checked only with -vv and higher.
* Make the -K flag suppress IP and UDP checksum checking as well.Guy Harris2009-03-051-2/+2
|
* from Carles Kishimoto <carles.kishimoto@gmail.com>: add support for the ↵hannes2007-08-081-1/+3
| | | | SFLOW protocol
* From Carles Kishimoto <carles.kishimoto@gmail.com>:hannes2007-07-241-1/+7
| | | | | add initial support for the Light Weight Access Point Protocol as per draft-ohara-capwap-lwapp-04
* add basic skeleton for printing olsr packets as per rfc3626hannes2007-03-271-1/+3
| | | | add a line break in verbose mode fro the ip printer.
* from Carles Kishimoto <Carles.Kishimoto@bsc.es>:hannes2006-03-031-1/+3
| | | | basic support for Ciscos prop. VQP protocol
* use new ip_print_demux() routine in ISAKMP UDP-ESP encapmcr2005-04-071-2/+4
| | | | printer.
* added ESP-in-UDP printer from RFC3948.mcr2005-04-061-5/+14
|
* FALSE isn't necessarily defined.guy2004-12-271-3/+3
|
* Have our own headers to declare the format of ONC (Sun) RPC messages onguy2004-12-271-15/+15
| | | | | | | | | | | | | | 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.
* add support for sysloghannes2004-10-291-1/+3
|
* add basic support for the SIP protocolhannes2004-07-271-1/+3
|
* add baseline LSP-PING support per draft-ietf-mpls-lsp-ping-05hannes2004-06-061-2/+2
|
* add support for the Link Management Protocol (LMP) as perhannes2004-04-191-1/+3
| | | | draft-ietf-ccamp-lmp-10
* display cosmetics for printing NTP packetshannes2004-01-281-4/+4
|
* Fix a signed-vs-unsigned comparison warning.guy2003-11-191-2/+2
|
* Cut off "snapend" at the length of the IPv4 or IPv6 payload, so we don'tguy2003-11-191-12/+9
| | | | | | | | | | | | | | | | | 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.
* Get rid of unused arguments to "dhcp6_print()".guy2003-11-181-3/+2
|
* 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-3/+5
| | | | rather than as "Class 32769".
* - move UDP port numbers to udp.hhannes2003-10-271-41/+1
| | | | | | - then the number defines# are acessible from outside - make a differentiation between BFD_ECHO_PORT and BFD_CONTROL_PORT
* support for bi-directional fault detection (BFD) Control packetshannes2003-10-271-3/+8
| | | | as per draft-katz-ward-bfd-01.txt
* Updates from Bruce Simpson:guy2003-09-121-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix numerous bugs in my AODV submission, red faces all round, mainly due to misunderstanding of EXTRACT_STRING() macro arguments (because these are macros, type checking didn't happen). AODV HELLO extensions are now correctly printed. The code is closer to FreeBSD's style guidelines. Don't use "u_char" and "u_long", use "u_int8_t" and "u_int32_t". "u_long" is definitely wrong as it's 64 bits on some platforms; "u_char" is safe, but the official tcpdump style uses "u_int8_t". At least according to the (long-since-expired) draft-perkins-aodv6-01, the V6 AODV messages have different message type values from the V4 ones in draft-ietf-manet-aodv-13. However, draft-ietf-manet-aodv-13 says that the only differences are in the addresses; we support both. Clean up the way we tell the AODV6 dissector that we're running atop IPv6 a bit. Use "udpipaddr_print()" if we're printing AODV packets as a result of saying "anything that matches this filter is AODV", rather than doing it ourselves under the assumption that it's running over IPv4.
* From Bruce M. Simpson <bms@spc.org>: RFC 3561 AODV support.guy2003-08-061-1/+21
|
* Make the port arguments to udpipaddr_print() ints so that there can befenner2003-07-311-28/+51
| | | | | | | | | | | | | an out-of-range flag value. Seperate out the truncation checks into two: are the ports available, then do all the other checks, then check to see if the full UDP header is available. This is a slightly modified version of Alexander's original patch to instead use udpipaddr_print() to print the addresses if the ports are not available. Submitted-by: Alexander Dupuy Sourceforge bug #579811
* 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.
* From Motonori Shindo: allow "-T" to take "tftp" as an argument to forceguy2003-05-111-1/+6
| | | | decoding as TFTP.
* basic preparations for mpls lsp ping decodinghannes2003-05-081-1/+4
|
* The source and destination port arguments to "bootp_print()" are noguy2003-05-011-2/+2
| | | | longer used; get rid of them.
* initial checkin for a Label Distribution Protocol dissectorhannes2002-12-131-2/+2
|
* The "__attribute__((packed))" tag on structures causes some files not toguy2002-12-111-35/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* changed bootp decoder for multiline output, fixed segfault referencing NULL ↵hannes2002-12-041-2/+2
| | | | pointer
* put __attribute__((packed)) to packet headers. s/u_short/u_int16_t/ and soitojun2002-11-091-5/+5
| | | | forth while i'm here
* remove blank lines at EOFitojun2002-09-101-7/+1
|
* Get rid of the "-Wno-unused" flag, and fix up most of theguy2002-09-051-9/+8
| | | | | | | | | | | | | | | 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".
* tell the world that its LDP, rather than port 646;hannes2002-08-201-1/+10
|
* dissect traffic on port 5353 as multicast DNS. vlubet@apple.comitojun2002-08-161-2/+2
|
* Added support for Win32, based on WinPcap.risso2002-08-011-5/+2
|
* Calculate UDP/TCP pseudo-checksum properly in the presence offenner2002-07-281-2/+5
| | | | source-route options.
* whitespace cleanupitojun2002-06-111-14/+14
|
* print "addr > addr" correctly again.itojun2001-12-031-9/+12
|
* correct address pair printing on truncated case.itojun2001-11-261-66/+52
|
* Add --enable-smb to make it easier to re-enable the SMB printer.fenner2001-10-081-10/+10
|
* disable smb printing until we have boundary checks in *smb*.c (there's almostitojun2001-10-041-1/+3
| | | | no boundary check).
* HSRP dissector, from Julian Cowley <julian@lava.net>.guy2001-09-171-1/+4
|