aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dvbci.c
AgeCommit message (Collapse)AuthorFilesLines
2023-11-20Remove init of proto variablesStig Bjørlykke1-320/+320
Remove init of proto, header field, expert info and subtree variables. This will reduces the binary size by approximate 1266320 bytes due to using .bss to zero-initialize the fields. The conversion is done using the tools/convert-proto-init.py script.
2023-05-18epan: Add STRING_CASE_[IN]SENSITIVE for dissector tablesJohn Thacker1-1/+1
The last parameter of register_dissector_table() indicates the base for integer tables, indicates case sensitivity for string tables, and is ignored for other tables (FT_NONE, FT_GUID). It can be a little difficult to remember what the code is doing when reading it, and which of 0 and 1 is sensitive and which is insensitive (0 is sensitive, the default). Add STRING_CASE_SENSITIVE and STRING_CASE_INSENSITIVE. Check in tools/fix-encoding-args.pl for STRING-like tables that use BASE_NONE, TRUE, or FALSE, and convert them to the new values.
2023-03-30Restrict allowed characters in dissector namesJohn Thacker1-3/+5
Dissectors now can have both a name and a long description. Out of 1722 registered dissector names, 9 used characters not allowed in field names, with spaces being the worst offender. Another handful use uppercase characters, which are not allowed in heuristic dissector names but are allowed in field and protocol names. Those characters can create parsing issues (and already do with UAT table entries for DLT_USER, where it's impossible to select some of these dissectors). Restrict the names to the characters allowed in field and protocol names, renaming those 9 dissectors. Use the new description field for those, even though it's not displayed everywhere we'd like yet.
2023-01-31More fussing with items and calls.Martin Mathieson1-3/+3
2023-01-20Fix some issues seen by tools/check_typed_item_calls.pyMartin Mathieson1-1/+1
2022-09-10Dissector names are not protocol names.Guy Harris1-1/+1
A given protocol's packet format may depend, for example, on which lower-level protocol is transporting the protocol in question. For example, protocols that run atop both byte-stream protocols such as TCP and TLS, and packet-oriented protocols such as UDP or DTLS, might begin the packet with a length when running atop a byte-stream protocol, to indicate where this packet ends and the next packet begins in the byte stream, but not do so when running atop a packet-oriented protocol. Dissectors can handle this in various ways: For example, the dissector could attempt to determine the protocol over which the packet was transported. Unfortunately, many of those mechanisms do so by fetching data from the packet_info structure, and many items in that structure act as global variables, so that, for example, if there are two two PDUs for protocol A inside a TCP segment, and the first protocol for PDU A contains a PDU for protocol B, and protocol B's dissector, or a dissector it calls, modifies the information in the packet_info structure so that it no longer indicates that the parent protocol is TCP, the second PDU for protocol A might not be correctly dissected. Another such mechanism is to query the previous element in the layers structure of the packet_info structure, which is a list of protocol IDs. Unfortunately, that is not a list of earlier protocols in the protocol stack, it's a list of earlier protocols in the dissection, which means that, in the above example, when the second PDU for protocol A is dissected, the list is {...,TCP,A,B,...,A}, which means that the previous element in the list is not TCP, so, again, the second PDU for protocol A will not be correctly dissected. An alternative is to have multiple dissectors for the same protocol, with the part of the protocol that's independent of the protocol transporting the PDU being dissected by common code. Protocol B might have an "over a byte-stream transport" dissector and an "over a packet transport" dissector, with the first dissector being registered for use over TCP and TLS and the other dissector being registered for use over packet protocols. This mechanism, unlike the other mechanisms, is not dependent on information in the packet_info structure that might be affected by dissectors other than the one for the protocol that transports protocol B. Furthermore, in a LINKTYPE_WIRESHARK_UPPER_PDU pcap or pcapng packet for protocol B, there might not be any information to indicate the protocol that transports protocol B, so there would have to be separate dissectors for protocol B, with separate names, so that a tag giving the protocol name would differ for B-over-byte-stream and B-over-packets. So: We rename EXP_PDU_TAG_PROTO_NAME and EXP_PDU_TAG_HEUR_PROTO_NAME to EXP_PDU_TAG_DISSECTOR_NAME and EXP_PDU_TAG_HEUR_DISSECTOR_NAME, to emphasize that they are *not* protocol names, they are dissector names (which has always been the case - if there's a protocol with that name, but no dissector with that name, Wireshark will not be able to handle the packet, as it will try to look up a dissector given that name and fail). We fix that exported PDU dissector to refer to those tags as dissector names, not protocol names. We update documentation to refer to them as DISSECTOR_NAME tags, not PROTO_NAME tags. (If there is any documentation for this outside the Wireshark source, it should be updated as well.) We add comments for calls to dissector_handle_get_dissector_name() where the dissector name is shown to the user, to indicate that it might be that the protocol name should be used. We update the TLS and DTLS dissectors to show the encapsulated protocol as the string returned by dissector_handle_get_long_name(); as the default is "Application Data", it appeaers that a descriptive name, rather than a short API name, should be used. (We continue to use the dissector name in debugging messages, to indicate which dissector was called.)
2022-08-25Rename a bunch of things with "conversation".Guy Harris1-3/+3
A conversation in Wireshark might have two endpoints or might have no endpoints; few if any have one endpoint. Distinguish between conversations and endpoints.
2022-08-09prefs: More cleanup, auto prefsJohn Thacker1-10/+14
Remove callback function from pref registrations for dissectors that don't need a callback. In other dissectors, move registration that only needs to be done once inside the check for initialization, avoiding some console messages when preferences are changed ("Duplicate dissectors (anonymous) and (anonymous) for protocol...") and the like. Add a couple auto preferences for dissectors missed in previous waves. Ping #14319
2022-05-24epan: Switch some _by_id conversation routines to elements.Gerald Combs1-3/+3
Switch the non-endpoint *_by_id conversation routines to use element lists. Change the ID type from guint32 to guint64. None of them used the address+port option flag arguments, so remove them.
2022-02-15Tools: Fix fix-encoding-args.pl ASCII string validationJoão Valverde1-8/+8
Do not require a useless ENC_NA parameter for string encodings. FT_STRING and FT_STRINGZ types don't have any ndianness. Follow-up to 6ec429622c9258eefd388caf21ce92ab5b9f54b4.
2021-12-19Replace g_snprintf() with snprintf() (dissectors)João Valverde1-2/+2
Use macros from inttypes.h with format strings.
2021-12-03epan: Remove STR_ASCII and STR_UNICODEJoão Valverde1-21/+21
These display bases work to replace unprintable characters so the name is a misnomer. In addition they are the same option and this display behaviour is not something that is configurable. This does not affect encodings because all our internal text strings need to be valid UTF-8 and the source encoding is specified using ENC_*. Remove the assertion for valid UTF-8 in proto.c because tvb_get_*_string() must return a valid UTF-8 string, always, and we don't need to assert that, it is expensive.
2021-08-20Use the wsutil/pint.h functions to fill in "exported PDU" headers.Guy Harris1-4/+3
That makes the code cleaner, including making it clearer that the fields in those headers are big-endian.
2021-07-21First pass pinfo->pool conversion, part 2Evan Huus1-18/+18
Automated find/replace of wmem_packet_scope() with pinfo->pool in all files where it didn't cause a build failure.
2021-07-17Delete various unused fieldsEvan Huus1-5/+0
Discovered during the build failure of https://gitlab.com/wireshark/wireshark/-/merge_requests/3695
2021-02-25dvb-ci: clean up the protocol column for mime filesMartin Kaiser1-0/+3
Some DVB-CI messages contain a file that can be dissected by the mime-encap dissector. mime-encap adds itself to the protocol column. We already set a fence, but things still look messy: DVB-CIMIME_FILE This patch adds ", " before the fence and "Data" afterwards. If mime-encap is enabled, it'll overwrite the Data with its protocol name DVB-CI, MIME_FILE If mime-encap is disabled, the embedded file will be handled by the data dissector, who doesn't touch the protocol column. So we keep DVB-CI, Data
2021-02-21dvb-ci: afs resource: dissect file req / ackMartin Kaiser1-24/+40
The file request and file acknowledge APDUs of the auxiliary file system resource are exactly the same as in the application mmi resource. We already have a function that dissects file acknowledge. Move the dissection of file request into a separate function as well. Call the two functions for both ami and afs resources.
2021-02-18dvb-ci: pass ami payload to mime-encap dissectorMartin Kaiser1-22/+7
Using the application mmi (ami) resource, a file of any type may be sent from the module to the host. The host receives both the file name and the binary payload. At the moment, we parse the name and hand the payload to the png dissector if it ends with .png Instead of this manual approach, we should make use of all file types that wireshark can dissect, i.e. all file types registered in the wtap_file dissector table. The mime-encap dissector does just that, so we pass our payload to this dissector.
2021-02-18dvb-ci: lsc resource: dissect ip config request and replyMartin Kaiser1-12/+84
Dissect the ip config request and reply APDUs that were added in the DVB-CI+ v1.4 specification. Re-use the existing value string for "connected/disconnected". (If the field was a single bit, we could use a tfs...). Yet again, this is based on work by Jens Rosenboom.
2021-02-17dvb-ci: add the host control apdus from CI+ 1.4Martin Kaiser1-0/+10
The CI+ v1.4 specification added more APDUs to the host control resource. Extend our APDU list to recognize the new APDUs.
2021-02-15dvb-ci: initial support for auxiliary file system resourceMartin Kaiser1-1/+67
The Auxiliary File System Resource was added by the DVB-CI+ specification v1.4. As a first step, this patch adds the framework for supporting the afs resource and dissects two simple APDUs. This is based on work by Jens Rosenboom.
2021-01-13DVB-CI: fix parameter names for payload functionsMartin Kaiser1-14/+14
82891e37e9 ("DVB-CI: Convert circuit API to conversation API") updated the payload functions to use conversations instead of the circuit API. The parameters were renamed from circuit to conv in the function implementations, but not in the prototypes. This patch renames the parameters in the prototypes as well.
2020-10-02Clean up URLs.Guy Harris1-1/+1
Add ui/urls.h to define some URLs on various of our websites. Use the GitLab URL for the wiki. Add a macro to generate wiki URLs. Update wiki URLs in comments etc. Use the #defined URL for the docs page in WelcomePage::on_helpLabel_clicked; that removes the last user of topic_online_url(), so get rid of it and swallow it up into topic_action_url().
2020-06-19Fix the type of arrays of pointers to hf_ values for bitfield routines.Guy Harris1-2/+2
The static arrays are supposed to be arrays of const pointers to int, not arrays of non-const pointers to const int. Fixing that means some bugs (scribbling on what's *supposed* to be a const array) will be caught (see packet-ieee80211-radiotap.c for examples, the first of which inspired this change and the second of which was discovered while testing compiles with this change), and removes the need for some annoying casts. Also make some of those arrays static while we're at it. Update documentation and dissector-generator tools. Change-Id: I789da5fc60aadc15797cefecfd9a9fbe9a130ccc Reviewed-on: https://code.wireshark.org/review/37517 Petri-Dish: Guy Harris <gharris@sonic.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-09dvb-ci: (trivial) fix two commentsMartin Kaiser1-2/+1
fix the wording in one place, remove an obsolete comment nearby Change-Id: I1df9078366f460cd8a3cbe00f96806c97b05f8a0 Reviewed-on: https://code.wireshark.org/review/37415 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
2020-04-19dvb-ci: register the dissector by nameMartin Kaiser1-3/+4
Register the DVB-CI dissector by name in addition to linking it to the DVB-CI DLT. This makes it easier for fuzzshark to find the dissector. Change-Id: Ieda150a9ad573a59e2dfcce97a4a1b17a0d66d93 Reviewed-on: https://code.wireshark.org/review/36886 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-07-26HTTPS (almost) everywhere.Guy Harris1-1/+1
Change all wireshark.org URLs to use https. Fix some broken links while we're at it. Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c Reviewed-on: https://code.wireshark.org/review/34089 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-04-04epan: Convert our PROTO_ITEM_ macros to inline functions.Gerald Combs1-1/+1
Convert our various PROTO_ITEM_ macros to inline functions and document them. Change-Id: I070b15d4f70d2189217a177ee8ba2740be36327c Reviewed-on: https://code.wireshark.org/review/32706 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-05Fix some spelling errors found by Lintian.Gerald Combs1-2/+2
Change-Id: If6fc3aab7ad4fc634567121f7b9541bc6f6c5766 Reviewed-on: https://code.wireshark.org/review/30926 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-25PMT, DVB-CI: remove packet-mpeg-pmt.hMartin Kaiser1-1/+1
packet-mpeg-pmt.h is included only by DVB-CI. All it contains is the definition of a value string for stream types in the ca_pmt. Move the definition into packet-dvbci.c and remove the include file. Change-Id: I7d63e49804c936284f6a9c5218e0fd9b4fa469a6 Reviewed-on: https://code.wireshark.org/review/29813 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-12dissectors: use SPDX identifiers.Dario Lombardo1-13/+1
Change-Id: I92c94448e6641716d03158a5f332c8b53709423a Reviewed-on: https://code.wireshark.org/review/25756 Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-13Remove circuit APIMichael Mann1-3/+3
Replace with conversation API that limits the "endpoint" to a single uint32 value. The intention is to eventually have "layered" endpoints, because circuit_id was used in cases where src/dest port have already been populated (and are used for layers above). Those src/dest ports should just be treated as just another endpoint, but we currently only have support for one. Change-Id: Ic6aa7ef0241275aa4dfde9459194369b48c72960 Reviewed-on: https://code.wireshark.org/review/24369 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-11DVB-CI: ensure that conversation_t stucture exists before using itPascal Quantin1-2/+2
Bug: 14202 Change-Id: Ie0cad9c1cd1d0ea1392a61194567e80bb2b5a566 Reviewed-on: https://code.wireshark.org/review/24345 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-11-09DVB-CI: Convert circuit API to conversation APIMichael Mann1-65/+60
Add the few necessary conversation APIs to make conversion possible. Change-Id: I775f23005c48cacd2be342bdc704af4738f0789c Reviewed-on: https://code.wireshark.org/review/24310 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-08Have circuit functionality more closely mirror conversation functionalityMichael Mann1-4/+5
This will allow for a smoother transition for refactoring because circuit functionality can now be represented as a strict subset of conversation functionality. Change-Id: I323d7facad707c81b8e35b33143fa1102d6b5976 Reviewed-on: https://code.wireshark.org/review/24290 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-10-15Remove superfluous null-checks before strdup/freeAhmad Fatoum1-8/+2
NULL checks were removed for following free functions: - g_free "If mem is NULL it simply returns" https://developer.gnome.org/glib/stable/glib-Memory-Allocation.html#g-free - g_slist_free(_full)? "NULL is considered to be the empty list" https://developer.gnome.org/glib/stable/glib-Singly-Linked-Lists.html - g_strfreev "If str_array is NULL, this function simply returns." https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-strfreev - g_slice_free "If mem is NULL, this macro does nothing." https://developer.gnome.org/glib/stable/glib-Memory-Slices.html#g-slice-free - g_match_info_free "not NULL... otherwise does nothing" https://developer.gnome.org/glib/stable/glib-Perl-compatible-regular-expressions.html#g-match-info-free - dfilter_free defined in Wireshark code. Returns early when passed NULL epan/dfilter/dfilter.c They were also removed around calls to g_strdup where applicable: - g_strdup "If str is NULL it returns NULL." https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-strdup Change-Id: Ie80c2db89bef531edc3aed7b7c9f654e1d654d04 Reviewed-on: https://code.wireshark.org/review/23406 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2017-04-02Use col_append_sep_str() for fixed stringsStig Bjørlykke1-66/+66
Change from col_append_sep_fstr() to col_append_sep_str() when appending strings without formatting. Change-Id: I315aca9b815c204a5bc78f7326402c40d1325f0e Reviewed-on: https://code.wireshark.org/review/20846 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-02-13Make Libgcrypt a mandatory dependencyPeter Wu1-18/+0
Removed all guards for HAVE_LIBGCRYPT, change autotools and CMake to error out if it is not available. Update release notes, developer documentation and README with the new status. Clarify relation with GnuTLS in macosx-setup.sh. Install Libgcrypt via brew script. Motivation for this change is that many dissectors depend on Libgcrypt and having it optional increases the maintenance burden (there have been several compile issues in the past due to the optional status). Furthermore, wsutil has crypto code that can be replaced by Libgcrypt. Change-Id: Idf0021b8c4cd5db70b8766f7dcc2a8b3acbf042f Link: https://www.wireshark.org/lists/wireshark-dev/201702/msg00011.html Reviewed-on: https://code.wireshark.org/review/20030 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-01-29Register reassembly tablesMichael Mann1-12/+5
Register all reassembly tables with a central unit, allowing the central unit to have the callback that initializes and destroys the reassembly tables, rather than have dissectors do it individually. Change-Id: Ic92619c06fb5ba6f1c3012f613cae14982e101d4 Reviewed-on: https://code.wireshark.org/review/19834 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-24dvbci: add shutdown routine.Dario Lombardo1-0/+10
Change-Id: I3f950ce227818b6dae11ac89e4a8ec636294a6ec Reviewed-on: https://code.wireshark.org/review/19740 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com> Tested-by: Dario Lombardo <lomato@gmail.com>
2016-12-25DVB-CI: simplify dissection of the resource idMartin Kaiser1-22/+11
Now that proto_tree_add_bitmask_value_with_flags() works for tvb==NULL, we can use it to simplify the dissection of DVB-CI's resource id. Change-Id: Ia09d5668bf0a61161ecd0cb412680838a67d7a7a Reviewed-on: https://code.wireshark.org/review/19409 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-12-23DVB-CI: don't call proto_tree_add_subtree_format() with tvb==NULLMartin Kaiser1-4/+10
When I first implemented this, proto_tree_add_subtree_format() worked for tvb==NULL if len was also 0. The bounds check added in 56706427f53cc64793870bf072c2c06248ae88f3 breaks this use case and makes DVB-CI spill out dissector asserts. Warn Dissector bug, protocol DVB-CI, in packet 625: ../epan/tvbuff.c:532: failed assertion "tvb && tvb->initialized" Create a proto_item first and link the subtree to this item. This will work as long as proto_tree_add_uint() accepts tvb==NULL. Thanks to Kay Katzorke for reporting this bug. Change-Id: I25a071c21925f7d362c92852fd5a8136e4d361c8 Reviewed-on: https://code.wireshark.org/review/19389 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2016-08-31Don't do any Decode As stuff for dissector tables not used with Decode As.Guy Harris1-1/+1
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-07-20Convert uses of g_alloced data with tvb_new_child_real_data to use ↵Michael Mann1-7/+4
pinfo->pool instead. Aldo update documentation to suggest using wmem pinfo->pool instead of glib memory Change-Id: I5d34cc6c1515aa9f0d57784b38da501ffcb95ccc Reviewed-on: https://code.wireshark.org/review/16551 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
2016-06-29Provide new interface for Export PDU.Michael Mann1-7/+23
Rather than have a bitmask for each desired field, have a dissector provide a list of structures that represent data that goes into the PDU. Change-Id: I125190cbaee489ebffb7d9f5d8bc6f3be2d06353 Reviewed-on: https://code.wireshark.org/review/16122 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-06-27tvb_get_string_enc + proto_tree_add_item = proto_tree_add_item_ret_stringMichael Mann1-18/+11
Also some other tricks to remove unnecessary tvb_get_string_enc calls. Change-Id: I2f40d9175b6c0bb0b1364b4089bfaa287edf0914 Reviewed-on: https://code.wireshark.org/review/16158 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-03-20Manually add protocol dependencies derived from find_dissector.Michael Mann1-3/+3
Started by grepping call_dissector_with_data, call_dissector_only and call_dissector and traced the handles passed into them to a find_dissector within the dissector. Then replaced find_dissector with find_dissector_add_dependency and added the protocol id from the dissector. "data" dissector was not considered to be a dependency. Change-Id: I15d0d77301306587ef8e7af5876e74231816890d Reviewed-on: https://code.wireshark.org/review/14509 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-17Associate dissector tables and heuristic subdissector lists with a protocol.Michael Mann1-1/+1
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-26Add free_address_wmem(), fix warnings [-Wcast-qual]João Valverde1-2/+2
Try to improve address API and also fix some constness warnings by not overloading the 'data' pointer to store malloc'ed buffers (use private pointer for that instead). Second try, now passing test suite. Change-Id: Idc101cd866b6d4f13500c9d59da5c7a38847fb7f Reviewed-on: https://code.wireshark.org/review/13946 Petri-Dish: João Valverde <j@v6e.pt> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-02-16const gpointer -> gconstpointerJoão Valverde1-2/+2
'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>