aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-udp.c
AgeCommit message (Collapse)AuthorFilesLines
2011-03-14Add expert info to UDP dissector for showing possible (Unix-style)Stephen Fisher1-3/+16
traceroute packets: if the port number range is 33434 to 33434 + 30. svn path=/trunk/; revision=36194
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-4/+4
keys to have _uint in their names, to match the routines that handle dissector tables with string keys. (Using _port can confuse people into thinking they're intended solely for use with TCP/UDP/etc. ports when, in fact, they work better for things such as Ethernet types, where the binding of particular values to particular protocols are a lot stronger.) svn path=/trunk/; revision=35224
2010-08-04Avoid a possible dereference of null pointer.Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=33707
2010-05-13As suggested in ↵Jeff Morriss1-17/+4
http://www.wireshark.org/lists/wireshark-dev/200809/msg00075.html (as referenced in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2907 ) and https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3411 : Write a new convenience routine for finding a conversation and, if it is not found, create it. The frame number and addresses are taken from pinfo (as is the common case). Use this function in a bunch of dissectors. svn path=/trunk/; revision=32790
2010-04-03Remove unneeded #include <stdio.h>Bill Meier1-1/+0
svn path=/trunk/; revision=32367
2010-01-27Make the good/bad checksum values as generated even when the UDP checksum is 0.Stephen Fisher1-2/+4
svn path=/trunk/; revision=31694
2009-11-07Avoid possible NULL pointer dereferenceKovarththanan Rajaratnam1-1/+1
svn path=/trunk/; revision=30851
2009-10-25From Jakub Zawadzki:Anders Broman1-3/+3
Cleanup dissector code - use proper memory functions. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4164 svn path=/trunk/; revision=30691
2009-07-22Get rid of check_col() in some of the more frequently used dissectors.Anders Broman1-17/+9
svn path=/trunk/; revision=29170
2009-06-18From Kovarththanan Rajaratnam via bug 3548:Stig Bjørlykke1-12/+12
(1) Trailing/leading spaces are removed from 'name's/'blurb's (2) Duplicate 'blurb's are replaced with NULL (3) Empty ("") 'blurb's are replaced with NULL (4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME, FT_PROTOCOL, FT_STRING and FT_STRINGZ field types (5) Only allow non-zero value for 'display' if 'bitmask' is non-zero svn path=/trunk/; revision=28770
2009-06-15Trivial warning fixes:Jörg Mayer1-1/+1
- Might be used uninitialized - not a prototype - comma at end of enum svn path=/trunk/; revision=28730
2009-05-15Remove an unused variable.Gerald Combs1-2/+2
svn path=/trunk/; revision=28367
2009-05-14Add support for process flow records to IPFIX, which required addingGerald Combs1-2/+202
support for vendor-specific IEs. Fix variable-length record handling. Add conversation tracking to the UDP dissector and add process flow information to TCP and UDP conversations. This lets us run process flow collectors on one or more machines and have the process username, PID, command name, etc. show up in the TCP and UDP protocol trees. svn path=/trunk/; revision=28366
2009-02-02If we can't calculate the UDP checksum (e.g., because the packet is truncated)Jeff Morriss1-1/+1
make it obvious to the user: add [unchecked, not all data available] to the tree item (like we do in TCP). svn path=/trunk/; revision=27351
2008-12-17From Didier Gautheron:Jaap Keuter1-1/+1
If udp summary is not set dissector doesn't test for udp/udplite in proto_tree_add_item svn path=/trunk/; revision=27038
2008-09-30Minor proto_reg_handoff cleanup: use find_dissector when appropriate.Bill Meier1-1/+1
svn path=/trunk/; revision=26308
2008-05-14Fix some of the Errors/warnings detected by checkapi.Bill Meier1-8/+14
svn path=/trunk/; revision=25290
2008-04-05as discussed on SharkFest: switch off checksum checks by defaultUlf Lamping1-2/+2
svn path=/trunk/; revision=24778
2008-01-09more sophisticated H245 OLC handling focusing on more reliable T.38 ↵Tomas Kukosa1-2/+2
establishment svn path=/trunk/; revision=24043
2007-11-26Update error handling of UDP Light Illegal Checksum value 0Sebastien Tandel1-3/+5
* change expert group from PI_MALFORMED to PI_CHECKSUM (as it should be!!!). * set item hf_udp_checksum_[good|bad] as generated svn path=/trunk/; revision=23599
2007-11-26iUpdate error handling of UDP Light Illegal Checksum value 0Sebastien Tandel1-0/+3
* Adding PI_MALFORMED expert field for this case. * Adding an error string in COL_INFO. svn path=/trunk/; revision=23598
2007-11-03- Future improve/clean up the now generic follow stream codeStephen Fisher1-0/+8
- Add "Follow UDP Stream" feature svn path=/trunk/; revision=23346
2007-10-02Do not indicate bogus length if inside an icmp.Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=23049
2007-03-19Extend the bad checksum description to include '(maybe caused by "UDPGerald Combs1-6/+6
checksum offload"?)', similar to the TCP dissector. Minor whitespace fixups. svn path=/trunk/; revision=21067
2007-02-14Dissect the Cisco proprietary encapsulation of IPSEC/ISAKMPJörg Mayer1-0/+1
in TCP (incomplete). Add preference to select the tcp port (default: 10000) svn path=/trunk/; revision=20809
2007-02-08The length of the UDP packet, according to IP, is the reported length,Guy Harris1-2/+2
not the data length (the packet might've been cut short by a snapshot length). Fetch the reported length with an accessor. svn path=/trunk/; revision=20743
2007-02-05From Andrej Mikus:Jaap Keuter1-8/+11
Wireshark complains about bogus udp length when processing last fragment of UDP data. It compares length field from UDP header with payload size of last fragment. Attached is my attempt to fix this by referring to tvp->length instead of pinfo->iplen - pinfo->iphdrlen. Also set some items attribute to generated. svn path=/trunk/; revision=20722
2007-02-02replace a rotating buffer for the udp header structure with ep allocated memoryRonnie Sahlberg1-7/+2
svn path=/trunk/; revision=20682
2006-12-11For length errors, add an error item for the expert info, and put a tagGuy Harris1-13/+26
in the summary line. svn path=/trunk/; revision=20111
2006-12-10Treat the UDP checksum the same way the TCP checksum is treated - markGuy Harris1-64/+71
the "checksum bad" and "checksum good" flags as generated fields, add an expert info item on a checksum error, and put a "checksum incorrect" indication in the Info column. Clean up indentation. svn path=/trunk/; revision=20092
2006-10-29make the checksum fields visible for TCP and UDPUlf Lamping1-51/+91
svn path=/trunk/; revision=19727
2006-10-29From Stephen Fisher:Jaap Keuter1-44/+67
Attached is a patch to allow the disabling of the UDP/UDPlite checksum verification for cards that offload it and report it incorrectly. svn path=/trunk/; revision=19725
2006-08-28Fix length check for IP packets with options.Jaap Keuter1-2/+2
svn path=/trunk/; revision=19062
2006-05-21change a whole bunch of ethereal into wiresharkRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=18196
2006-01-12Add warning when UDP length field is too large.Jaap Keuter1-2/+10
Patch by Graeme Hewson svn path=/trunk/; revision=17023
2005-12-14From Jaap Keuter:Anders Broman1-21/+101
> Two patch files are attached adding UDP-Lite dissection to the UDP > dissector. Wiki page is available at the normal location, including > sample captures courtesy of Gerrit Renker of the University of > Aberdeen Electronics Research Group. The patch has been tested with > both the sample captures and Fuzz test. And add Marc Petit-Huguenin to AUTHORS svn path=/trunk/; revision=16801
2005-09-28Have show_exception() take a "const char *" as its exception message,Guy Harris1-0/+1
and not free the string to which it points. Pass to REPORT_DISSECTOR_BUG() strings allocated with ep_strdup_printf(), so that they're freed automatically. svn path=/trunk/; revision=16039
2005-06-10just to get things straight: a dissector should *never* do any g_assert() calls!Ulf Lamping1-2/+2
in a simple approach, I've replaced all g_assert() and g_assert_not_reached() calls by their exception throwing counterparts DISSECTOR_ASSERT() and DISSECTOR_ASSERT_NOT_REACHED() this will replace application crash by showing a dissector bug, which is the desired behaviour there were some g_assert calls in the protocol registering functions, which might not be acting as expected now, but to be able to simply search for g_assert in the future I've replaced that calls too one g_assert remained, the one when someone throws an unknown exception "into" packet_frame.c, but IMHO this one should remain. svn path=/trunk/; revision=14608
2005-06-02use [] not () brackets to indicate [correct] UDP checksum, as this is a ↵Ulf Lamping1-2/+2
generated field svn path=/trunk/; revision=14530
2005-05-11Some applications do very naughty things like reusing a port for a different ↵Ronnie Sahlberg1-1/+2
protocol during different stages of an application cycle. This is very naughty and will cause problems when we have assigned a dissector to a dynamic port using conversation_set_dissector(). To make ethereal handle this case I have changed the try_conversation_dissector() to allow it to fail and return 0, meaning yes there is indeed a protocol registered for this conversation but that protocol rejected this packet. (which only happens for "new" style dissectors, "old" style dissectors will never reject a packet that way) When this happens the decode_udp_port() helper will still allow other dissectors to be tried, in the hope that the conversation is now used for some other protocol and thus someone else might be able to decode the packet. Update SNMP and TFTP dissectors to check that even if there already is a conversation but that conversation does NOT have snmp/tftp registered as the dissector for it, then create a new conversation anyway and attach the proper dissector. Since ethereal keeps track of which frame number a conversation started in, this actually works really well. svn path=/trunk/; revision=14345
2004-10-30from Mark Phillips: the length field in the UDP header includes theGuy Harris1-12/+19
length of the UDP header itself, so subtract the length of the header when using it to limit the length of the payload tvbuff. Clean up the computing of the captured length of the payload tvbuff (we really should get rid of the "length" argument to "tvb_new_subset()", and have it compute the captured length based on the supplied reported length and the amount of that data actually present in the parent tvbuff). Don't fetch the length and checksum fields until we use them (so that we don't throw an exception until then, and fail to process the source and destination ports), and check whether the length is bogus regardless of whether we're building a protocol tree or not. svn path=/trunk/; revision=12444
2004-09-29Move various tables into the epan directory.Guy Harris1-1/+1
svn path=/trunk/; revision=12130
2004-09-29Move the tap infrastructure to the epan directory.Guy Harris1-1/+1
svn path=/trunk/; revision=12128
2004-09-28Move various checksum routines and headers to epan.Guy Harris1-1/+1
svn path=/trunk/; revision=12117
2004-09-27Move prefs.c and prefs.h into the epan subdirectory.Guy Harris1-1/+1
svn path=/trunk/; revision=12115
2004-08-06From Albert Chin: rename resolv.{ch} to addr_resolv.{ch}, so that anGuy Harris1-1/+1
include of <resolv.h> in any system header file gets the system <resolv.h> (needed for builds on Tru64 with GTK+ 1.2[.x]). svn path=/trunk/; revision=11615
2004-07-18Move dissectors to epan/dissectors directory.Gilbert Ramirez1-0/+356
Also move ncp222.py, x11-fields, process-x11-fields.pl, make-reg-dotc, and make-reg-dotc.py. Adjust #include lines in files that include packet-*.h files. svn path=/trunk/; revision=11410