aboutsummaryrefslogtreecommitdiffstats
path: root/epan/packet.h
AgeCommit message (Collapse)AuthorFilesLines
2011-09-05List heuristic tables in Internals->Disscetor tables menu.etxrab1-0/+12
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38881 f5534014-38df-0310-8fa8-9805f1628bb7
2011-03-31Added dissector_handle_get_long_name().stig1-0/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36412 f5534014-38df-0310-8fa8-9805f1628bb7
2010-12-20Rename the routines that handle dissector tables with unsigned integerguy1-13/+41
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.) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35224 f5534014-38df-0310-8fa8-9805f1628bb7
2010-10-30Rev 29427 added packet_add_new_data_source() with a comment indicating thatmorriss1-20/+9
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(). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34717 f5534014-38df-0310-8fa8-9805f1628bb7
2010-04-03 From Yaniv Kaul: constify parameterswmeier1-17/+17
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32365 f5534014-38df-0310-8fa8-9805f1628bb7
2010-04-02Revert SVN #32360 until Windows compilation errors corrected.wmeier1-10/+10
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32361 f5534014-38df-0310-8fa8-9805f1628bb7
2010-04-02From Yaniv Kaul: constify parameterswmeier1-10/+10
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4422 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32360 f5534014-38df-0310-8fa8-9805f1628bb7
2010-02-23Squelch a bunch of compiler warnings.guy1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31961 f5534014-38df-0310-8fa8-9805f1628bb7
2010-01-19Use more unique names for certain enum constants.wmeier1-3/+3
(enum constant names are part of the global name space). (Fixes at least one gcc -Wshadow warning). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31572 f5534014-38df-0310-8fa8-9805f1628bb7
2009-08-15This patch introduces packet_add_new_data_source() which effectively ↵krj1-2/+13
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! git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29427 f5534014-38df-0310-8fa8-9805f1628bb7
2009-07-12From Kovarththanan Rajaratnam via bug 3702:stig1-0/+5
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29066 f5534014-38df-0310-8fa8-9805f1628bb7
2009-04-21Introduce call dissector_try_port_new() to be used when no protocol entry is ↵etxrab1-0/+6
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28106 f5534014-38df-0310-8fa8-9805f1628bb7
2008-10-31Fix a prototype to avoid a warning.stig1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26659 f5534014-38df-0310-8fa8-9805f1628bb7
2008-08-12From Alexey Neyman:etxrab1-0/+2
Implement dissector for IPMB (DLT_IPMB_LINUX, 209). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25986 f5534014-38df-0310-8fa8-9805f1628bb7
2008-05-21boolean -> gbooleanwmeier1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25344 f5534014-38df-0310-8fa8-9805f1628bb7
2008-05-21Add missing have_postdissector(); (Hopefully what was intended).wmeier1-0/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25342 f5534014-38df-0310-8fa8-9805f1628bb7
2008-05-05Require GLib 2.4 or later.guy1-8/+0
That means that G_GINT64_MODIFIER will be defined, so don't check whether it's defined. We don't use the PRI[douxX]64 macros, as we use the GLib print routines and thus use G_GINT64_MODIFIER instead. Get rid of the checks for whether inttypes.h defines PRI[douxX]64; just check whether it exists at all. That means we don't set INTTYPES_H_DEFINES_FORMATS, so don't check for it. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25243 f5534014-38df-0310-8fa8-9805f1628bb7
2007-08-07from: Mike Duigoulego1-0/+9
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 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22463 f5534014-38df-0310-8fa8-9805f1628bb7
2007-04-23Add some GCC warnings to the standard set, and add some others to theguy1-4/+4
--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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21526 f5534014-38df-0310-8fa8-9805f1628bb7
2007-01-18Putguy1-0/+8
#ifdef __cplusplus extern "C" { #endif /* __cplusplus */ ... #ifdef __cplusplus } #endif /* __cplusplus */ wrappers into some header files, for the benefit of C++ plugins. Also, add multiple-include protections. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20485 f5534014-38df-0310-8fa8-9805f1628bb7
2007-01-10Extending true_false_string supportjake1-13/+2
- Separate tfs.[ch] - Add larger sample collection - Properly export DATA git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20373 f5534014-38df-0310-8fa8-9805f1628bb7
2006-05-21name changesahlberg1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18197 f5534014-38df-0310-8fa8-9805f1628bb7
2006-01-24Add register_postdissector() to the API.lego1-0/+7
Dissectors registered with register_postdissector() will be called after all other dissectors have been called. Use it to register mate. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17089 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-06Squelch more const pointer warnings.guy1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15242 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-05More char -> const char warning fixes.jmayer1-1/+1
Removed (very few) casts that only change the warning message but don't remove it (with gcc-4). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15227 f5534014-38df-0310-8fa8-9805f1628bb7
2005-07-24Constify to remove a bunch of warnings. Add some casts to squelchguy1-3/+3
(presumably-)harmless-but-otherwise-unremovable const-to-nonconst warnings. In the TACACS dissector, clean up the variables used in option parsing to avoid some const-to-nonconst warnings. Clean up some white space. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15043 f5534014-38df-0310-8fa8-9805f1628bb7
2005-07-23More 'char*' -> 'const char*' changes to fix warnings.jmayer1-3/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15015 f5534014-38df-0310-8fa8-9805f1628bb7
2005-06-19Warning fix: Declare some more strings constjmayer1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14700 f5534014-38df-0310-8fa8-9805f1628bb7
2005-06-03From Mike Duigou:etxrab1-12/+31
A few doxygen updates and an improved section on writing dissectors that don't use tcp_dissect_pdus(). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14537 f5534014-38df-0310-8fa8-9805f1628bb7
2005-05-11Some applications do very naughty things like reusing a port for a different ↵sahlberg1-1/+8
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14345 f5534014-38df-0310-8fa8-9805f1628bb7
2005-03-23Add a "cleanup_dissection()" routine, intended to free up dataguy1-0/+3
structures allocated by a dissection. Currently, it's the same as "init_dissection()", but they should be split with "init_dissection()" allocating the initial data structures and "cleanup_dissection()" freeing them and *not* reallocating the initial data structures. Use "cleanup_dissection()" in "cf_close()" to make it easier to find leaks. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13881 f5534014-38df-0310-8fa8-9805f1628bb7
2005-03-12warning: function declaration isn't a prototypejmayer1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13728 f5534014-38df-0310-8fa8-9805f1628bb7
2005-03-11from Micheal Duigou: add some doxygen tags and some changes to README.developerulfl1-0/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13725 f5534014-38df-0310-8fa8-9805f1628bb7
2005-03-11Add a "-G decodes" option to ethereal and tethereal which shows thegerald1-0/+6
filter/selector/protocol associations for each dissector. This will be used to improve our automated tests, but someone with time on their hands could probably use it to generate a protocol poster using Graphviz. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13721 f5534014-38df-0310-8fa8-9805f1628bb7
2004-10-30split capture_loop from capture.c, some more code cleanupulfl1-0/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12451 f5534014-38df-0310-8fa8-9805f1628bb7
2004-07-18Set the svn:eol-style property on all text files to "native", so thatguy1-1/+1
they have LF at the end of the line on UN*X and CR/LF on Windows; hopefully this means that if a CR/LF version is checked in on Windows, the CRs will be stripped so that they show up only when checked out on Windows, not on UN*X. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11400 f5534014-38df-0310-8fa8-9805f1628bb7
2004-06-19Pick up the stuff I did for tcpdump to figure out the right strings toguy1-1/+9
use to format 64-bit integers. Fix the RSVP dissector to use that rather than hardcoding "%ll" in. Remove the "only if G_HAVE_GINT64 is defined" bit from the discussion of 64-bit integers - we're too dependent on having them to support compilers that don't have a 64-bit integral data type. Do, however, note that neither "long" nor "long long" are acceptable, and also note that you shouldn't assume "%ll" does the trick for printing them. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11182 f5534014-38df-0310-8fa8-9805f1628bb7
2004-06-08add details for doxygenulfl1-14/+37
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11127 f5534014-38df-0310-8fa8-9805f1628bb7
2003-10-01Have a pseudo-header for Ethernet packets, giving the size of the FCS -guy1-2/+2
0 means "there is no FCS in the packet data", 4 means "there is an FCS in the packet data", -1 means "I don't know whether there's an FCS in the packet data, guess based on the packet size". Assume that Ethernet encapsulated inside other protocols has no FCS, by having the "eth" dissector assume that (and not check for an Ethernet pseudo-header). Have "ethertype()" take an argument giving the FCS size; pass 0 when appropriate. Fix up Wiretap routines to set the pseudo-header. This means we no longer use the "generic" seek-and-read routine, so get rid of it. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8574 f5534014-38df-0310-8fa8-9805f1628bb7
2003-09-09Add "dissector_get_string_handle()" for string dissector tables, similarguy1-1/+6
to "dissector_get_port_handle()" for uint dissector tables. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8434 f5534014-38df-0310-8fa8-9805f1628bb7
2003-09-07Support string dissector tables in the Tethereal "decode as" stuff.guy1-6/+6
Make the Ethereal "decode as" stuff not blow up with string dissector tables. Selectors for uint dissector tables are unsigned, not signed. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8408 f5534014-38df-0310-8fa8-9805f1628bb7
2003-09-06When registering a dissector table, choose what type of hash andguy1-11/+35
comparison function to use based on the type value passed in. For the traditional unsigned integer table, require FT_UINT{8,16,24,32}; if the type is FT_STRING or FT_STRINGZ, use the string hashing functions instead. Add routines for manipulating entries and looking up dissectors in string dissector tables. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8407 f5534014-38df-0310-8fa8-9805f1628bb7
2003-07-31From Tomas Kukosa: add "find_dissector_table()",guy1-5/+5
"dissector_get_port_handle()", "dissector_handle_get_short_name()", "dissector_handle_get_protocol_index()", "new_register_dissector()", and "new_create_dissector_handle()" to the list of APIs available to plugins on platforms where plugins have to call core Ethereal routines through pointers. "extern"alize the remaining routines in "epan/packet.h". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8116 f5534014-38df-0310-8fa8-9805f1628bb7
2003-06-05From Lionel Ains: "-d" flag for decode-as support in Tethereal.guy1-6/+9
Add a new routine to iterate through all dissector tables, calling a routine for each table, to support having the "-d" code list all dissector tables. Get rid of "dissector_handle_get_dissector_name()"; it was put in there for "-d", but turns out not to be necessary for that. Clean up the usage message a bit (using the convention, adhered to by at least some UNIX utilities, of listing all the flags with no arguments in a single lump, and then listing the ones with arguments individually, and also putting "-v" and "-h" in a separate lump, as Ethereal does). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7788 f5534014-38df-0310-8fa8-9805f1628bb7
2003-05-23Add an API to get the dissector name from a dissector handle.guy1-1/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7726 f5534014-38df-0310-8fa8-9805f1628bb7
2002-11-15From Chris Waters: export "find_dissector_table()" and addguy1-1/+7
"dissector_handle_get_protocol_index()". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6633 f5534014-38df-0310-8fa8-9805f1628bb7
2002-11-06From Solomon Peachy: support for new "wlancap" 802.11 extra-informationguy1-2/+3
header. Add overflow checks to "BYTES_ARE_IN_FRAME()", and cast all arguments to unsigned values (negative values should never be passed) to squelch compiler warnings. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6567 f5534014-38df-0310-8fa8-9805f1628bb7
2002-10-25Count ICMPv6 packets as ICMP when capturing.guy1-2/+1
Check the next header type - properly handling extension headers - in "capture_ipv6()". Get rid of the count of IPv6 packets - we break that down in "capture_ipv6()" now. Fix a typo. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6510 f5534014-38df-0310-8fa8-9805f1628bb7
2002-10-22Minimalistic support for counting IPv6 packets during capturejmayer1-1/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6476 f5534014-38df-0310-8fa8-9805f1628bb7
2002-10-14From Ulf Lamping: count ARP packets in capture progress dialog box.guy1-1/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6416 f5534014-38df-0310-8fa8-9805f1628bb7