aboutsummaryrefslogtreecommitdiffstats
path: root/epan/packet.c
AgeCommit message (Collapse)AuthorFilesLines
2011-07-11More GLIB_CHECK_VERSION cleanups. Update the minimum GLib/GTK+ versionsGerald Combs1-12/+0
in README.devloper. Remove g_gnuc.h since it's no longer needed. Remove tvbuff_init(), tvbuff_cleanup(), reassemble_init(), and reassemble_cleanup() since they were only used for older GLib versions which didn't support GSlices. Assume we always support the "matches" operator. svn path=/trunk/; revision=37978
2011-06-01If a dissector table doesn't exist, print a more useful message, andGuy Harris1-7/+56
only abort if WIRESHARK_ABORT_ON_DISSECTOR_BUG is set. svn path=/trunk/; revision=37510
2011-05-17More eradication of old-style function definitions.Guy Harris1-2/+2
svn path=/trunk/; revision=37216
2011-04-20Fix a typo in a text string; use consistent indentation.Bill Meier1-11/+11
svn path=/trunk/; revision=36735
2011-03-31Added dissector_handle_get_long_name().Stig Bjørlykke1-0/+11
svn path=/trunk/; revision=36412
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-30/+33
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-10-30Rev 29427 added packet_add_new_data_source() with a comment indicating thatJeff Morriss1-15/+1
the data source does not need to be allocated if (!tree). Rev 30158 took the if (!tree) check out indicating that the check was invalid. So: (since packet_add_new_data_source() now only calls add_new_data_source()), remove packet_add_new_data_source(). svn path=/trunk/; revision=34717
2010-05-08Enable "Decode As..." for ethertype 0x0000 (fix for bug 4721)Sake Blok1-0/+3
svn path=/trunk/; revision=32723
2010-04-03 From Yaniv Kaul: constify parametersBill Meier1-24/+24
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4422 From me: Fix a number of instances where the function prototype or the function definition wasn't changed so there was a mismatch thus causing Windows (but not gcc) compilation errors. svn path=/trunk/; revision=32365
2010-04-02Revert SVN #32360 until Windows compilation errors corrected.Bill Meier1-21/+21
svn path=/trunk/; revision=32361
2010-04-02From Yaniv Kaul: constify parametersBill Meier1-21/+21
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4422 svn path=/trunk/; revision=32360
2010-02-23Squelch a bunch of compiler warnings.Guy Harris1-2/+2
svn path=/trunk/; revision=31961
2009-11-04Make sure we have a handle for the dissector.Anders Broman1-1/+2
svn path=/trunk/; revision=30824
2009-10-12Fix some indentation.Bill Meier1-90/+90
svn path=/trunk/; revision=30527
2009-10-05Move dissector add sanity check to separate functionKovarththanan Rajaratnam1-13/+24
svn path=/trunk/; revision=30346
2009-09-25The data sources can be used even if the protocol tree isn't being builtGuy Harris1-4/+11
or isn't visible. Clean up some indentation. svn path=/trunk/; revision=30158
2009-09-06Split a bunch of init routines into init() and cleanup(). This allows us to ↵Kovarththanan Rajaratnam1-2/+25
free memory properly on shutdown. This is an initial step. There's still some work to do. svn path=/trunk/; revision=29754
2009-09-06We track all protocols that appear in each packet in the frame dissector. ↵Kovarththanan Rajaratnam1-11/+9
This is an expensive operation because we: * Disable the TRY_TO_FAKE_THIS_ITEM optimization * Use GString to store the protocols We should only do this if the 'hf_frame_protocols' is referenced (unlikely) svn path=/trunk/; revision=29733
2009-08-15This patch introduces packet_add_new_data_source() which effectively ↵Kovarththanan Rajaratnam1-3/+12
deprecates add_new_data_source(). This is based on the following observation: 1) The tvb + name (aka. data_source) is only used when the protocol tree is visible The current implementation of add_new_data_source() doesn't take this into account and simply allocates a data_source regardless. This is what packet_add_new_data_source() tries to rectify. A couple of dissectors have already been switched over to the new packet_add_new_data_source(). Many are still missing. Help appreciated! svn path=/trunk/; revision=29427
2009-08-03Remove 1 commented-out #include inadvertantly committed.Bill Meier1-1/+0
svn path=/trunk/; revision=29276
2009-08-03Add some debug code (commented out) to check for duplicate dissector port ↵Bill Meier1-0/+14
registrations, svn path=/trunk/; revision=29275
2009-07-16Zero out the packet_info struct for each packet instead of trying toGerald Combs1-47/+1
initialize everything by hand. Fixes a Valgrind warning. svn path=/trunk/; revision=29122
2009-07-12From Kovarththanan Rajaratnam via bug 3702:Stig Bjørlykke1-6/+13
This patch optimizes the data source name processing in add_new_data_source() by delaying it. We now simply store the constant string and lazily compute the name when needed. This gives a performance boost because we only need the name if we have multiple data sources. svn path=/trunk/; revision=29066
2009-06-06Handle Detach and Service request, make it possible to set direction on ↵Anders Broman1-0/+1
link(UL/DL). svn path=/trunk/; revision=28648
2009-04-21Introduce call dissector_try_port_new() to be used when no protocol entry is ↵Anders Broman1-9/+18
to be made in the protocols list. Used by asn2wrs dissectors to avoid multiple entrys as calls are made multiple times for the same PDU. svn path=/trunk/; revision=28106
2009-04-08size_t fixes.Gerald Combs1-2/+2
svn path=/trunk/; revision=27990
2008-08-05Add a debug helper for EP memory corruptionLuis Ontanon1-2/+17
if compiled in and the env var WIRESHARK_DEBUG_EP_CANARY is set: will check for canary integrity at every call to EP_CHECK_CANARY() if corruption is found it exits pronting the prior location and the location in which corruption was found. Hopefully it stops running while the corruptor is still in the stack. see EP_CHECK_CANARY() calls in packet.c as an example. svn path=/trunk/; revision=25927
2008-07-13From Francesco Fondelli:Jaap Keuter1-0/+1
Attached is a patch for: - PW Associated Channel Header dissection as per RFC 4385 - PW MPLS Control Word dissection as per RFC 4385 - mpls subdissector table indexed by label value - enhanced "what's past last mpls label?" heuristic - Ethernet PW (w/o CW) support as per RFC 4448 svn path=/trunk/; revision=25730
2008-05-21A slightly more complicated have_postdissector() (missed in my previous ↵Jeff Morriss1-10/+28
checkin--thanks Bill) which also checks if the postdissectors are enabled. svn path=/trunk/; revision=25347
2008-05-21boolean -> gbooleanBill Meier1-1/+1
svn path=/trunk/; revision=25344
2008-05-21Add missing have_postdissector(); (Hopefully what was intended).Bill Meier1-0/+5
svn path=/trunk/; revision=25342
2008-01-15Call post dissectors with call_dissector_only() to avoid an extra Data entryStig Bjørlykke1-1/+1
if post dissectors are disabled, as pointed out by LEGO. svn path=/trunk/; revision=24109
2007-12-15Cleanup call_dissector / call_dissector_onlyJaap Keuter1-16/+16
svn path=/trunk/; revision=23871
2007-11-09Apply yet another set of the optimization patches:Anders Broman1-99/+119
move the case where pinfo->in_error_pkt is true in its own function: - it's not the common case. - it needs a TRY block. ==> slow volatile and big stack footprint. - call_dissector_work is called a lot and recursively. svn path=/trunk/; revision=23413
2007-10-27From Andrew Feren:Anders Broman1-0/+2
return FALSE if dissector_try_string(...) is passed a NULL string pointer arguably this should assert instead. svn path=/trunk/; revision=23287
2007-10-02be a bit more verbose, if the name given to register_dissector_table() is ↵Ulf Lamping1-1/+3
not unique (e.g. because of a buggy/duplicated plugin) svn path=/trunk/; revision=23042
2007-09-19call_dissector() provides generic 'data' handler for unrecognized data ↵Mike Duigou1-1/+1
types. call_dissector_only() fails gracefully for unrecognized types. The handler for generic 'data' should avoid the variant that potentially could result in recursively calling itself. svn path=/trunk/; revision=22907
2007-08-08don't use NULL to initialise an integerUlf Lamping1-2/+2
svn path=/trunk/; revision=22474
2007-08-08add pinfo fields clnp_srcref and clnp_dstref to the clnp dissector, similar ↵Ulf Lamping1-0/+2
to the srcport / destport already existing. As simply using srcport / destport for this will confuse mixed protocol usage (like RFC1006 ISOonTCP), I've added explicit clnp fields. This way, protocols on top of COTP / CLNP have at least a chance to do reassembling correct. svn path=/trunk/; revision=22473
2007-08-07from: Mike DuigouLuis Ontanon1-0/+31
Adds a heur_dissector_delete() function to allow heuristic dissectors to be dynamically disabled based upon, for example, preference settings. http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1697 svn path=/trunk/; revision=22463
2007-08-03- add PDInterfaceFSUDataAdjust blockUlf Lamping1-0/+1
- start to implement an AR conversation handler svn path=/trunk/; revision=22444
2007-05-29From David Howells :Sebastien Tandel1-1/+1
Fix compilation failures when building wireshark-0.99.6-SVN-21916 on an x86_64-unknown-linux-gnu target with gcc version 4.1.2 20070403 (Red Hat 4.1.2-8). The failures fall into two categories: (1) Casts between pointers and 32-bit integers without an intermediary cast via 'long' or 'unsigned long'. This results in a compiler warning complaining about casts between a pointer and an integer of a different size. (2) Passing values to "%lld" or similar printf-style format options that the compiler thinks are a different size. Such values need to be cast to 'long long' or 'unsigned long long'. svn path=/trunk/; revision=21975
2007-04-23Dissector table names should be pointed to by const pointers.Guy Harris1-2/+3
svn path=/trunk/; revision=21533
2007-04-23Add some GCC warnings to the standard set, and add some others to theGuy Harris1-3/+3
--enable-extra-gcc-checks set. If we turn on -pedantic, try turning on -Wno-long-long as well, so that it's not *so* pedantic that it rejects the 64-bit integral data types that we explicitly require. Constify a bunch of stuff, and make some other changes, to get rid of warnings. Clean up some indentation. svn path=/trunk/; revision=21526
2007-04-03epan/dissectors/Makefile is now building four libraries :Sebastien Tandel1-2/+3
- asn dissectors : libasndissectors.la - pidl dissectors : libpidldissectors.la - normal dissectors : libdissectors.la *and* libcleandissectors.la. I separated it in two libraries temporarily. The source files used to build libcleandissectors.la do not generate warning anymore and the -Werror is used to compile them. If we patch a dissector and it doesn't generate warning anymore, we have to move the filename dissector from DISSECTOR_SRC to CLEAN_DISSECTOR_SRC in epan/dissectors/Makefile.common. If you want to define specific cflags for one library type, let's say pidl, you may define libpidldissectors_la_CFLAGS. svn path=/trunk/; revision=21324
2007-03-21packet_info.c and packet.cLuis Ontanon1-3/+4
add sccp_info to struct _packet_info (Sorry but the way private_data works and the fact that TCAP uses it and BSSAP/RANAP can be tunnelled on GSMMAP over TCAP makes it impossible to avoid) SCCP - Have SCCP to have a TAP, - Fix associations so that every message belongs to the association. - Export message type values so that they can be used by a tap listener RANAP - Have RANAP information attached to the sccp_info BSSAP + GSM_A - Have DTAP, BSSMAP and BSSAP info attached to the sccp_info svn path=/trunk/; revision=21076
2007-02-21add a field in pinfo where dcerpc/pidl can store the name of the current ↵Ronnie Sahlberg1-0/+1
dcerpc procedure use this field in the policy handle helper to indicate not only which frames the handle was opened/close in but also the name of the function that opened it. eventually, when other pidl support infrastructure is developed it would be nice if this could be expanded to also contain the name of the object/handle opened. svn path=/trunk/; revision=20895
2007-01-15instead of simply doing an assert when running out of memory in emem, throw ↵Ulf Lamping1-0/+6
a new OutOfMemoryError Exception, so file.c can show at least a better explanation to the user before Wireshark terminates XXX - to prevent a busy wait, I need a portable way to wait for a short time period, like Sleep() for Windows svn path=/trunk/; revision=20437
2007-01-10Extending true_false_string supportJaap Keuter1-6/+1
- Separate tfs.[ch] - Add larger sample collection - Properly export DATA svn path=/trunk/; revision=20373
2006-10-22add a tcp_tree field to packet_info so that we can access the tree from ↵Ronnie Sahlberg1-0/+1
tcp_dissect_pdus() (and others if need be) in tcp_dissect_pdus() add a field ( tcp.pdu.size ) to the tree that displays the pdu size. svn path=/trunk/; revision=19655