aboutsummaryrefslogtreecommitdiffstats
path: root/epan/packet.h
AgeCommit message (Collapse)AuthorFilesLines
2017-04-21Put all the capture dissector structures into epan/capture_dissectors.h.Guy Harris1-4/+0
Don't scatter them amongst various other headers. Change-Id: I243954222cd4ad3e6bbe8b4d1dd25ee4952f87d6 Reviewed-on: https://code.wireshark.org/review/21277 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-17Rename some routines and structure members.Guy Harris1-7/+8
They deal with sets of hfids, which can belong to protocols as well as fields (I guess you could argue that a protocol is a field, but...). Change-Id: Ibd103cfa26427ead4ef54be89f1251908004cfae Reviewed-on: https://code.wireshark.org/review/21154 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-12Prime the epan_dissect_t with postdissector wanted fields if necessary.Guy Harris1-3/+7
This makes sure that postdissectors that indicate that they need certain fields in the first pass will get them. While we're at it: Fix the field-fetching code in TRANSUM not to assume it got any instances of the field being fetched. Rename process_packet_first_pass() in sharkd to process_packet(), as it's the only routine in sharkd that processes packets. Rename process_packet() in tshark and tfshark to process_packet_single_pass(), as it's what's used if we're only doing one-pass analysis. Clean up comments and whitespace. Change-Id: I3769af952c66f5ca4b68002ad6213858ab9cab9b Reviewed-on: https://code.wireshark.org/review/21063 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-12Add an API to let a postdissector specify fields whose values it needs.Guy Harris1-2/+37
Currently, this is only used to determine whether a protocol tree needs to be built on the first pass or not - if there are postdissectors that need fields, it does - but eventually we should be able to use it to prime the dissection to deliver those fields in cases where we don't need the *entire* protocol tree (rather than using a hack such as cooking up a fake tap with a fake filter to do that). Update MATE and TRANSUM to use it. Clean up code to check whether we need a protocol tree, and add comments before that code indicating, in each case, what the criteria are. The array of postdissectors includes a length, so we don't need to separately keep track of the number of postdissectors. Clean up indentation while we're at it. Change-Id: I71d4025848206d144bc54cc82941089a50e80ab7 Reviewed-on: https://code.wireshark.org/review/21029 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-01-28Snort: add a preference to show alert in reassembled frameMartin Mathieson1-0/+1
Change-Id: Ia29d451857995b186c88193c9722ae156eb3f66d Reviewed-on: https://code.wireshark.org/review/19729 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-01-19epan: add shutdown function for dissectors.Dario Lombardo1-1/+5
Dissectors can register shutdown functions, that will be called just before program exit. Those function will free the memory allocated during the init function. Change-Id: Id88228af2cc916bfb316fe7b36d46499f6e4f8d4 Reviewed-on: https://code.wireshark.org/review/19282 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-21packet: duplicate short_name to fix UAF in wsluaPeter Wu1-1/+1
The "short_name" parameter of heur_dissector_add is defined as const (and was assumed to be a string literal). This was no longer the case though since a change in Lua where "short_name" is a dynamically allocated string. This "simple" fix clones the memory for internal use to avoid a heap-use-after-free when heur_dissector_delete tries to access "short_name". An alternative option is to make Proto_register_heuristic track the memory, but since there are multiple possible heuristics lists for a protocol, the Proto (struct _wslua_field_t) structure is not appropriate. A possible working alternative is to store the string into lua_heur_dissectors_table_ref (replacing the value (function) by a tuple {function,short_name}). Change-Id: I6c6b393f4d304dd847e864da6ad17b54c8cd80e2 Fixes: v2.3.0rc0-1474-g7f2a838922 ("lua: Allow proto:register_heuristic to be used on multiple list names") Reviewed-on: https://code.wireshark.org/review/19365 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Franklin Mathieu <snaipe@diacritic.io> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-12-13Add support for adding unit names to hf_ fields.Michael Mann1-0/+1
This was inspired by the https://www.wireshark.org/lists/wireshark-dev/201505/msg00029.html thread. Used TCP and NTP dissectors as the guinea pig with sample use. Documentation updates includes some unrelated cleanup just because it was noticed. Change-Id: I59b26e1ca3b95e3473e4757f1759d7ad82976965 Reviewed-on: https://code.wireshark.org/review/19211 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-08Combine Decode As and port preferences for tcp.port dissector table.Michael Mann1-0/+16
This patch introduces new APIs to allow dissectors to have a preference for a (TCP) port, but the underlying data is actually part of Decode As functionality. For now the APIs are intentionally separate from the regular APIs that register a dissector within a dissector table. It may be possible to eventually combine the two so that all dissectors that register with a dissector table have an opportunity to "automatically" have a preference to adjust the "table value" through the preferences dialog. The tcp.port dissector table was used as the guinea pig. This will eventually be expanded to other dissector tables as well (most notably UDP ports). Some dissectors that "shared" a TCP/UDP port preference were also converted. It also removed the need for some preference callback functions (mostly when the callback function was the proto_reg_handoff function) so there is cleanup around that. Dissectors that has a port preference whose default was 0 were switched to using the dissector_add_for_decode_as_with_preference API rather than dissector_add_uint_with_preference Also added comments for TCP ports used that aren't IANA registered. Change-Id: I99604f95d426ad345f4b494598d94178b886eb67 Reviewed-on: https://code.wireshark.org/review/17724 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-08-31Don't do any Decode As stuff for dissector tables not used with Decode As.Guy Harris1-9/+4
Have all dissector tables have a "supports Decode As" flag, which defaults to FALSE, and which is set to TRUE if a register_decode_as() refers to it. When adding a dissector to a dissector table with a given key, only add it for Decode As if the dissector table supports it. For non-FT_STRING dissector tables, always check for multiple entries for the same protocol with different dissectors, and report an error if we found them. This means there's no need for the creator of a dissector table to specify whether duplicates of that sort should be allowed - we always do the check when registering something for "Decode As" (in a non-FT_STRING dissector table), and just don't bother registering anything for "Decode As" if the dissector table doesn't support "Decode As", so there's no check done for those dissector tables. Change-Id: I4a1fdea3bddc2af27a65cfbca23edc99b26c0eed Reviewed-on: https://code.wireshark.org/review/17402 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-13Completely remove dissector_add_handle.Michael Mann1-3/+0
It has been deprecated and replaced with dissector_add_for_decode_as. Change-Id: I5a4976f83951f749e70b5267570fca188daa7a07 Reviewed-on: https://code.wireshark.org/review/15854 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-20Create call_data_dissector() to call data dissector.Michael Mann1-0/+2
This saves many dissectors the need to find the data dissector and store a handle to it. There were also some that were finding it, but not using it. For others this was the only reason for their handoff function, so it could be eliminated. Change-Id: I5d3f951ee1daa3d30c060d21bd12bbc881a8027b Reviewed-on: https://code.wireshark.org/review/14530 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-20Start work on API to generate protocol dependency tree.Michael Mann1-0/+38
Dissector and heuristic tables now setup protocol dependencies. "Manual" dependencies in separate patch. Ping-Bug: 1402 Change-Id: I8da1239306de8676dcb05f8807914376816fc44f Reviewed-on: https://code.wireshark.org/review/14447 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-17Associate dissector tables and heuristic subdissector lists with a protocol.Michael Mann1-3/+3
This will make it easier to determine protocol dependencies. Some LLC OUI dissector tables didn't have an associated protocol, so they were left without one (-1 used) Change-Id: I6339f16476510ef3f393d6fb5d8946419bfb4b7d Reviewed-on: https://code.wireshark.org/review/14446 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-16const gpointer -> gconstpointerJoão Valverde1-1/+1
'const gpointer' is the same as 'void *const'. Replace with gconstpointer where straightforward (assuming that was the intent) and use gpointer everywhere else for clarity (that does not change *API* constness contract; it just means a variable is not declared immutable inside the called funtion). Change-Id: Iad2ef13205bfb4ff0056b2bce056353b58942267 Reviewed-on: https://code.wireshark.org/review/13945 Petri-Dish: Anders Broman <a.broman58@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-14Rename new_dissector_t to dissector_t.Guy Harris1-4/+4
There are no longer any "old" dissectors, so "new_" is redundant. Change-Id: I5fee51228c2a8562166f5991e1f30c2c697e45c8 Reviewed-on: https://code.wireshark.org/review/13273 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-01Make color filters part of dissectionMichael Mann1-0/+10
Color filters can be seen as a function that takes a tree and display filters as input and a (possibly empty) coloring rule as output. This coloring rule is then added to the frame tree and used by the GUI for coloring the packets list. From an architectural POV, "coloring" is part of the UI component, but since it influences the tree, it is something for the dissection component. Bug: 5703 Bug: 6099 Change-Id: I73d132ec1dca7262bcb1b55c8481ca564c6161d1 Reviewed-on: https://code.wireshark.org/review/12507 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-23ui: Plug memory leak in decode_build_reset_list.Stig Bjørlykke1-1/+1
The strings passed to decode_build_reset_list() is not freed, so ensure we cleanup in decode_clear_all(). Change-Id: Ib68bde71403e260199482831272beb161fe033f9 Reviewed-on: https://code.wireshark.org/review/12836 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-22Don't limit capture packet counts to a fixed set of protocols.Michael Mann1-26/+1
Kept backwards compatibility with GTK+ capture info dialog by keeping the protocols tracked hardcoded, but Qt should have more freedom. Change-Id: I497be71ec761d53f312e14858daa7152d01b8c72 Reviewed-on: https://code.wireshark.org/review/12724 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-17Create capture dissector "info" structure (capture_packet_info_t)Michael Mann1-0/+4
While it currently only contains packet_counts, it will hopefully stabilize the capture function signature if more fields are added. Change-Id: I003552c58043c7c2d67aec458187b12b233057e2 Reviewed-on: https://code.wireshark.org/review/12690 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-14Create capture dissector tables.Michael Mann1-3/+0
They are modeled after dissection dissector tables, but for the moment, don't have/need the flexibility. They are intended to be much simpler/faster than full dissection. The two most used/needed are "wtap_encap" and "ethertype", so they were the basis of starting to use and test capture dissector table API. Others may be added in the future. The "capture dissector" function signature needed a bit of tweeking to handling "claiming" of a packet. The current application of this is capture functions returning TRUE if they affected a "type" of packet count. Returning FALSE ends up considering the packet an "other" type. Change-Id: I81d06a6ccb2c03665f087258a46b9d78d513d6cd Reviewed-on: https://code.wireshark.org/review/12607 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-13Standardize the capture dissector function signature.Michael Mann1-1/+1
This will make it easier to mold into (capture) dissector tables. Change-Id: Iad63f2c2869782977992a3a072adb020be4b1818 Reviewed-on: https://code.wireshark.org/review/12587 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-13Start deprecating the capture info API.Gerald Combs1-0/+5
The GTK+ UI has a capture info dialog which shows a summary of captured protocols, including IPX (!), NetBIOS (!!) and VINES (!!OMG!!). It's been disabled by default since 2006 (g59aa9e40). Remove the preference in the Qt UI capture pane. It's still available via the advanced prefs. Add comments in various parts of the code noting that the capture_info routines and structs are GTK+ only. Also note that if we *do* want to add a Qt capture info dialog we'll probably want to modernize the information we show. Change-Id: I3c63f6f01b60f0767fb33602a7f0c3b537dbde51 Reviewed-on: https://code.wireshark.org/review/10991 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-11epan: Don't export deregister functionsStig Bjørlykke1-6/+3
Most of the deregister functions are used internally from Lua while reloading plugins. Don't export them for others to use. Change-Id: I919dbfa807f696c38d409ca7206104a0fba1ae65 Reviewed-on: https://code.wireshark.org/review/12508 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-11Completely remove new_create_dissector_handle and new_register_dissector.Michael Mann1-2/+0
The macros are no longer needed because the conversion is complete. Change-Id: I42c4b937986d9707eff9225c444cbcab73f8e86a Reviewed-on: https://code.wireshark.org/review/12517 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09new_create_dissector_handle_with_name -> create_dissector_handle_with_nameMichael Mann1-1/+0
Change-Id: I32d30ada66ee68782194905a8aa669c07f0dc204 Reviewed-on: https://code.wireshark.org/review/12482 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-04[packet-h] Add defines to make it possible to convert functions prefixedAndersBroman1-3/+6
with new_ to plain function names without changing all at the same time. Change-Id: I52682996704ff2472c9830bb62fda2a3cbef6589 Reviewed-on: https://code.wireshark.org/review/12401 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-26Completely remove "old style" dissector support.Michael Mann1-5/+0
The typedef for the "old style" has been removed as well as any old vs new style checks. The release notes have been updated to reflect the API change, even though the search/replace of the "new style" function names hasn't happen yet. But it will be coming shortly... Change-Id: I6d1eeb51d30e3b2b27f0eafd85fe0ddc0ca25b14 Reviewed-on: https://code.wireshark.org/review/12153 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-26Remove create_dissector_handleMichael Mann1-2/+0
Change-Id: I1ad7c112eda45a41c3f94b04348e328d44d8f585 Reviewed-on: https://code.wireshark.org/review/12152 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-24Remove register_dissector.Michael Mann1-3/+0
new_register_dissector will eventually take its place, but that search/replace should be done when all "old style" APIs have been removed. Change-Id: Ic3fdec67d5761fd72beeca7355f9de617562bb77 Reviewed-on: https://code.wireshark.org/review/12095 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-04Don't allow multiple registrations of a protocol in dissector tables.Michael Mann1-2/+11
The target here is the Decode As dialog where protocols have multiple registrations into a dissector table and that shows up as multiple entries in the Decode As dialog list with the same name so users are unsure which "dissector" they are choosing. The "default" behavior (done in this commit) is to not allow duplicates for a dissector table, whether its part of Decode As or not. It's just ENFORCED for Decode As. Bug: 3949 Change-Id: Ibe14fa61aaeca0881f9cc39b78799e314b5e8127 Reviewed-on: https://code.wireshark.org/review/11405 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-04Don't include "file.h" if you don't need it.Guy Harris1-3/+0
It ends up dragging in libwireshark headers, which programs not linking with libwireshark shouldn't do. In particular, including <epan/address.h> causes some functions that refer to libwireshark functions to be defined if the compiler doesn't handle "static inline" the way GCC does, and you end up requiring libwireshark even though you shouldn't require it. Move plurality() to wsutil/str_util.h, so that non-libwireshark code can get it without include epan/packet.h. Fix includes as necessary. Change-Id: Ie4819719da4c2b349f61445112aa419e99b977d3 Reviewed-on: https://code.wireshark.org/review/11545 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-02packet(.h): fix api reference / -WdocumentationAlexis La Goutte1-1/+1
From api ref : warning: argument 'uint_val' of command @param is not found in the argument list of dissector_get_guid_handle(dissector_table_t const sub_dissectors, guid_key *guid_val) The following parameters of dissector_get_guid_handle(dissector_table_t const sub_dissectors, guid_key *guid_val) are not documented: parameter 'guid_val' From -Wdocumentation parameter 'uint_val' not found in the function declaration [-Wdocumentation] Change-Id: I9c7b82e4ecb5a126cb96c7d6c057440eb5d24bdd Reviewed-on: https://code.wireshark.org/review/11499 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-01Add GUID dissector table support.Michael Mann1-1/+34
It seems like DCE/RPC could benefit from a GUID dissector table, where a dissector can register it's GUID with a dissector handle. So here is a basic start. Change-Id: Id407117687a1a648d87f6f99c2ecbf858d8c0911 Reviewed-on: https://code.wireshark.org/review/4718 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-07Remove heur_dissector_set_enabled.Michael Mann1-10/+0
With the adjustment to heur_dissector_add passing an enable/disable flag and "global" control of heuristic dissectors just like regular ones, this is no longer needed. Change-Id: I2d433c7bff8353421eca31f8813992e38b716911 Reviewed-on: https://code.wireshark.org/review/10848 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-09-27Qt: Add the Dissector Tables dialog.Gerald Combs1-4/+4
Add the "Internals" menu under the View menu instead of at the top level for now at least. Add the Dissector Tables dialog there. Change-Id: Ieb23b0015591bac196e4ef94e3443832288333f9 Reviewed-on: https://code.wireshark.org/review/10654 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-11Added Reload Lua plugins.Stig Bjørlykke1-4/+15
This is initial support for reloading Lua plugins without restarting the application. Still todo: - Deregister FileHandlers - Support deregister ProtoField with existing abbrev (same_name_hfinfo) - Add a progress dialog when reloading many plugins - Search for memory leakages in wslua functions Change-Id: I48870d8741251705ca15ffe1068613fcb0cb18c1 Reviewed-on: https://code.wireshark.org/review/5028 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-07-17Remove all preferences related to enabling/disabling heuristic dissectors.Michael Mann1-1/+7
The preferences are still supported for backwards compatibility, but the heuristic_protos file has final say on the "preference" to enable/disable a heuristic dissector. Also add parameter to heur_dissector_add() for the "default" enable/disable of a heuristic dissector. With this parameter, a few more (presumably weak) heuristic dissectors have been "registered" but of course default to being disabled. Change-Id: I51bebb2146ef3fbb8418d4f5c7f2cb2b58003a22 Reviewed-on: https://code.wireshark.org/review/9610 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-15Simply code for export of PDUs coming from heuristic dissectorsPascal Quantin1-9/+0
Let's use the newly introduced find_heur_dissector_by_unique_short_name() function Change-Id: I5781b9b2f1ab679da07e97755b71840b4b3a9361 Reviewed-on: https://code.wireshark.org/review/9645 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-07-14Add a "heuristic dissectors" tab to the Enable Protocols dialog.Michael Mann1-0/+7
This allows for a global place to enable/disable all heuristic dissectors. This removes the need for individual dissector preferences, but those will be removed at a later date. The more important part is the epan code to save/restore the enabled state of the heuristic dissector. The GTK dialog was more for quickly testing the feature (there was already some GTK code in place that started the heuristic dialog tab) Change-Id: Ie10687505c27a4456c49d5c4c69a5fc5f6394275 Ping-Bug:11152 Reviewed-on: https://code.wireshark.org/review/9508 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-12Add "user presentable" and "unique string ids" to heuristic table entries.Michael Mann1-1/+5
This allows better presentation of heuristic dissectors to the end user. Change-Id: I2ff3985ab914e83c2989880cc0c7b9904045b3f6 Reviewed-on: https://code.wireshark.org/review/9602 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-03packet: add cleanup routines supportPeter Wu1-4/+16
Currently reassembly tables are not freed on shutdown. This makes memleak debugging more difficult due to noise. Support cleanup routines that can do smarter things. After this change, "init" routines are not called anymore when closing files. Further changes should split init routines to cleanup routines as needed. Change-Id: Ib0b2cef6dd9c16905259063ac2c2fdfb7e066be6 Reviewed-on: https://code.wireshark.org/review/9135 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-02Add support for a "custom" dissector table. This allows for a "custom" (not ↵Michael Mann1-0/+24
UINT or string) key to register dissector handles. This was designed for RPC dissectors, but probably has use elsewhere. Change-Id: I1bca6b50ba312129a0c4fad5cc3c18cd9297c217 Reviewed-on: https://code.wireshark.org/review/9455 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-25Add ability to export PDUs for heuristic dissectors alsoPascal Quantin1-0/+9
Change-Id: I1bf1aa9794f9b4f106edffd4986fc0b1014522fa Reviewed-on: https://code.wireshark.org/review/9099 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-01-18Miscellaneous ep_strdup_printf replacement.Michael Mann1-1/+1
Change-Id: I973c672e9d573ad67e9b9fd82a5610aaf8a74efa Reviewed-on: https://code.wireshark.org/review/6605 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-02Remove pkt_comment member from packet_info structure.Michael Mann1-0/+7
Change-Id: Ifd3d201a09944e3fc36188f891ea8a584886101d Reviewed-on: https://code.wireshark.org/review/5884 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-22fix warning: parameter 'list' not found in the function declaration ↵Alexis La Goutte1-1/+0
[-Wdocumentation] Change-Id: Id6d02f5c1383dd8f231707f519ec1b28fb007079 Reviewed-on: https://code.wireshark.org/review/5978 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-12-21Have a heur_dissector_list_t be an opaque handle.Guy Harris1-5/+7
This allows dissector lists to be looked up by name, so they can be shared by multiple dissectors. (This means that there's no "udplite" heuristic dissector list, but there shouldn't be one - protocols can run atop UDP or UDPLite equally well, and they share a port namespace and uint dissector table, so they should share a heuristic dissector table as well.) Change-Id: Ifb2d2c294938c06d348a159adea7a57db8d770a7 Reviewed-on: https://code.wireshark.org/review/5936 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-15Enable case-insensitive string dissector tablesEvan Huus1-5/+10
Permit passing TRUE as the parameter during table registration to achieve that effect. Use it in RTP media type table. Bug: 10708 Change-Id: I892fb1a421d349f0c05197dec90f14fc34ad6b97 Reviewed-on: https://code.wireshark.org/review/5695 Reviewed-by: Evan Huus <eapache@gmail.com> Petri-Dish: Evan Huus <eapache@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-13dissector_try_uint(_new) and dissector_try_string now return the number of ↵Pascal Quantin1-6/+6
bytes consumed Change-Id: I528ad736caee1f29e2f0abfc0afcca6587d74eca Reviewed-on: https://code.wireshark.org/review/5743 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>