summaryrefslogtreecommitdiff
path: root/print-udp.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix heuristic not to be byte-order-dependent.Guy Harris2015-05-031-1/+1
| | | | | | | | | | I'm *guessing* that the item being fetched is big-endian; the "vt" protocol might be old enough that they developed it on (non-Sun386i) Sun workstations, assuming they didn't just say "this is an Internet protocol, hence fields are big-endian"). That also prevents problems on platforms that don't support unaligned accesses.
* Merge git://github.com/the-tcpdump-group/tcpdumpGuy Harris2014-11-101-0/+2
|\
| * Add support for Generic Network Virtualization Encapsulation (Geneve).Jesse Gross2014-11-051-0/+2
| | | | | | | | Defined in http://tools.ietf.org/html/draft-gross-geneve-02
* | Use ND_TCHECK() to do bounds checking.Guy Harris2014-11-091-1/+1
|/ | | | | | | | While we're at it, just use the record count to when iterating over records; the ND_TCHECK()s will make sure we don't run past the end of the captured data. Also get rid of an unused argument to cnfp_print().
* Don't subtract the UDP header size from the length twice.Guy Harris2014-10-201-4/+2
|
* Use the length field in the UDP header.Guy Harris2014-10-191-10/+24
| | | | | | If it's less than the length of the IP payload, use it as the size of the UDP packet. If it's greater than the length of the IP payload, and we're not dissecting the payload, report the length as bad.
* Added support for RADIUS Change of Authorization messagesHerwin Weststrate2014-10-101-1/+2
| | | | Defined in RFC 5176
* merge bootp.h into print-bootp.cDenis Ovsienko2014-08-131-2/+1
|
* u_intN_t is dead, long live uintN_t.Guy Harris2014-04-231-28/+28
| | | | | | | | | And, as we require at least autoconf 2.61, and as autoconf 2.61 and later have AC_TYPE_UINTn_T and AC_TYPE_INTn_T macros, we use them to define the uintN_t and intN_t macros if the system doesn't define them for us. This lets us get rid of bitypes.h as well.
* Netdissectify the to-name resolution routines.Guy Harris2014-04-041-8/+8
| | | | | | | | Have them take a netdissect_options * argument, and get the "no name resolution" flag from it. Move the declaration of dnaddr_string to addrtoname.h, along with the other XXX-to-string routines.
* NDOize timed decoderDenis Ovsienko2014-04-031-1/+1
|
* NDOize Babel decoderDenis Ovsienko2014-04-031-1/+1
|
* NDOize SMB decoderDenis Ovsienko2014-04-021-2/+2
|
* NDOize EAP, IEEE CFM, lwres, SIP & Syslog decodersDenis Ovsienko2014-04-011-3/+3
|
* NDOize NFS decoderDenis Ovsienko2014-04-011-3/+3
|
* NDOize RX decoderDenis Ovsienko2014-03-301-1/+1
|
* NDOize SNMP decoderDenis Ovsienko2014-03-291-2/+2
|
* NDOize AppleTalk, CDP and Kerberos decodersDenis Ovsienko2014-03-281-2/+2
|
* NDOize ForCES, MPLS LSP ping and OLSR decodersDenis Ovsienko2014-03-271-2/+2
|
* NDOize AODV, IPv4 and SCTP decodersDenis Ovsienko2014-03-261-5/+5
|
* NDOize BOOTP, DHCPv6, DNS, PIM and sFlow decodersDenis Ovsienko2014-03-251-6/+6
| | | | Also add/remove tabs in a few involved functions to justify indentation.
* NDOize 7 more small decodersDenis Ovsienko2014-03-211-3/+3
| | | | | This change converts DVMRP, DLT_ENC, EGP, GeoNet, NetFlow, SLIP and TFTP decoders.
* NDOize ATM, MPTCP, NTP, VTP & Whiteboard decodersDenis Ovsienko2014-03-201-3/+3
|
* NDOize 7 bigger decodersDenis Ovsienko2014-03-191-6/+6
| | | | | This change converts IGMP, IPv6 mobility options, LDP, Lightweight Access Point, PGM, PPTP and RIP decoders.
* NDOize Frame Relay, LMP and RADIUS decodersDenis Ovsienko2014-03-181-4/+4
|
* NDOize EIGRP, ICMP, L2TP, STP and UDP decodersDenis Ovsienko2014-03-151-125/+124
|
* NDOize FDDI, MPCP, Token Ring, VQP and Zephyr decodersDenis Ovsienko2014-03-141-2/+2
|
* remove unused macro SEGSIZEDenis Ovsienko2014-03-141-4/+0
|
* NDOize 8 more small decodersDenis Ovsienko2014-03-131-2/+2
| | | | | This change converts ZeroMQ, IPX, MPLS, IPv6 options, PPPoE, RIPng, PFLOG and Sun RPC decoders.
* NDOize ARCNET, BFD and GRE decodersDenis Ovsienko2014-03-111-1/+1
|
* NDOize AHCP, OTV and VXLAN decodersDenis Ovsienko2014-03-081-4/+4
|
* NDOize HSRP, IGRP and UDLD decodersDenis Ovsienko2014-03-041-1/+1
|
* NFS: unify TCP and UDP decoding, fix a bugDenis Ovsienko2014-02-261-3/+5
| | | | | | | | | | | Change the UDP NFS printing format to match the current format of TCP NFS printing (this complements commits f3051bc and 29d83db). Update the man page to use the new format (this complements commit 2c86c75). Restore printing of NFS packet length, which was broken in commit 68fe98a.
* fix partial checksum errors in DCCP decoder, IPv6 caseFrancois-Xavier Le Bail2014-02-161-2/+2
|
* fix partial checksum errors in DCCP decoder, IPv4 caseFrancois-Xavier Le Bail2014-02-151-2/+2
|
* remove tcpdump's own CVS keywordsDenis Ovsienko2014-01-031-5/+0
| | | | | | Remove lots of $Header's and a few $Id's that all belong to the former CVS repository of tcpdump itself. These keywords have been frozen since the migration to git in late 2008.
* AHCP: add version 1 decoderDenis Ovsienko2013-11-131-0/+2
| | | | | | | Add new decoder for UDP port 5359 and a sample packet capture produced on a couple of Linux hosts (a server and a client). Besides that, an existing Babel capture contained AHCP packets and the current AHCP tests cover 0, 1 and 2 "-v" flags.
* LMP: add -T override and fix version 1 test(s)Denis Ovsienko2013-09-071-0/+4
| | | | | | | | | | | The Link Management Protocol version 1 sample capture added to the tests directory in commit 212eef2 was produced using non-standard UDP port 49998. Later assignment of port 701 reflected in commit 960aee5 made it impossible to decode the capture. This change adds a -T override for LMP, uses it to replace the broken test with two working tests and dismisses the custom test script, lmp.sh.
* Merge pull request #310 from ffatghub/masterDenis Ovsienko2013-05-101-0/+2
|\ | | | | vxlan: use IANA assigned port
| * IANA (www.iana.org/assignments/service-names-port-numbers/fra2013-05-091-0/+2
| | | | | | | | | | | | service-names-port-numbers.txt) has assigned an official port for VXLAN (4789). tcpdump uses this by default but we keep the -T vxlan option as well (e.g. Linux is allowing different ports).
* | use macros for VAT and WB port numbersDenis Ovsienko2013-04-141-2/+2
| |
* | improve ZeroMQ support (ZMTP/1.0 inside PGM/EPGM)Denis Ovsienko2013-04-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | This change adds new code to decode ZeroMQ datagrams, couples it with the PGM decoder and extends the -T option to make all this work. There are two new test cases based on existing captures of ZMTP/1.0 inside [E]PGM to decode the ZMTP/1.0 part of these. This functionality enables decoding of the traffic zeromq library produces for "pgm://" and "epgm://" protocol schemas.
* | use existing PGM decoder for UDP-encapsulated PGMDenis Ovsienko2013-04-141-0/+5
|/ | | | | | | | | The original PGM uses its own IP protocol number. "EPGM" or "PGM/UDP" stands for UDP-encapsulated PGM, which has no assigned UDP port number and can be decoded only by means of -T option, which now accepts "pgm" protocol type for this purpose. There is also a sample capture of EPGM now (similar to the one of native PGM, but produced using the "epgm://" protocol schema) and a respective test case.
* - Add support for OTV (draft-hasmit-otv-04).Francesco Fondelli2013-02-261-2/+7
| | | | - Use the packettype infrastructure (-T vxlan) for VXLAN parsing (waiting for a well known dest port)
* Add support for VXLAN (draft-mahalingam-dutt-dcops-vxlan-03)Francesco Fondelli2013-02-251-0/+2
|
* Add "radius" as an option for -T.Guy Harris2012-06-301-0/+5
| | | | | | | | This allows tcpdump to handle RADIUS running on non-standard ports. Submitted-By: ssb@sourceforge.net Man page also updated by me.
* For Babel, recognise both UDP/6696 and UDP/6697.Juliusz Chroboczek2011-08-271-1/+1
| | | | | IANA has reallocated the Babel port; it is now 6696. This patch makes tcpdump recognise both the old and the new Babel ports.
* Add a routine to do the "checksum with pseudo-header" stuff for IPv4.Guy Harris2011-06-171-24/+2
| | | | Clean up some other stuff while we're at it.
* Use nextproto6_cksum() for XXX-over-IPv6 checksums.Guy Harris2011-06-171-21/+2
| | | | Get rid of duplicated checksums with IPv6 pseudo-headers.
* Handle UDP checksums more like TCP checksums.Guy Harris2011-06-161-21/+36
| | | | | | | | | | | | | | | Instead of printing the result of udp_cksum() if it's non-zero, print the checksum field value and the value it should have had. That means that what we print is the same regardless of whether we're running on a big-endian or little-endian machine. Also, just as we did with TCP: Check -v and -K, and the fragmented flag, up front; then check the IP version etc.. Don't check for IPv6 if we already know it's IPv4. Fetch the checksum field only once. Update some test files for the new output format.