summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-pres.c
AgeCommit message (Collapse)AuthorFilesLines
2017-01-30Convert GHashTable -> wmem_map_t for ASN.1 disseectorsMichael Mann1-24/+9
Change-Id: Id749c41947c6300f2c82ed947352c336f9e45b72 Reviewed-on: https://code.wireshark.org/review/19838 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-12uat: add a reset callback.Dario Lombardo1-0/+1
This function will free the resources allocated by the caller. Change-Id: Ib486c14e4fd3c321662fb71f7fd06733ce9a64a4 Reviewed-on: https://code.wireshark.org/review/19375 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-26conversation: rename shadow variableDario Lombardo1-2/+2
Change-Id: I8f738b2e01d7f448b21cdc1b488b16b7dd581911 Reviewed-on: https://code.wireshark.org/review/16104 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-03-13Move /asn1 to /epan/dissectorsJoão Valverde1-18/+18
Change-Id: I1208fe3c2ba428995526f561e8f792b8d871e9a9 Reviewed-on: https://code.wireshark.org/review/14388 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: João Valverde <j@v6e.pt>
2016-02-08Revert "RTSE and PRES relies on the TCP conversation to do reassembly, ↵Anders Broman1-13/+5
switch to the new interface." This reverts commit c296001158b979497242dd726430b0b7cb26f984. Change-Id: Ie67001c181b1e7437e5d6ecd8f64b61da15df2c3 Reviewed-on: https://code.wireshark.org/review/13823 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-02-06asn1: Cleanup space usageStig Bjørlykke1-22/+18
Fix space issues in some ASN.1 dissectors. Change-Id: I4ceccfbe9a13c93fc91821d1bfe4b7d6bb39c435 Reviewed-on: https://code.wireshark.org/review/13791 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>
2016-02-05RTSE and PRES relies on the TCP conversation to do reassembly, switch toAndersBroman1-5/+14
the new interface. Change-Id: I4f818d55416d3b1d09b46015d83f3acc5a9e71cc Reviewed-on: https://code.wireshark.org/review/13744 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-2/+2
That removes most of the uses of the frame number field in the frame_data structure. Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22 Reviewed-on: https://code.wireshark.org/review/13509 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-10Convert ASN.1 dissectors to remove "new" from "new-style" dissector function ↵Michael Mann1-1/+1
names that were generated from asn2wrs.py This includes: 1. new_create_dissector_handle -> create_dissector_handle 2. new_register_dissector -> register_dissector 3. new_register_ber_oid_dissector -> register_ber_oid_dissector 4. new_register_ber_syntax_dissector -> register_ber_syntax_dissector Also remove PDU_NEW, SYNTAX_NEW and REGISTER_NEW as there is no need for the distinction anymore. Change-Id: I82c7de7c8ffeeab3259d1b55bb4afc5f6a1e0329 Reviewed-on: https://code.wireshark.org/review/12491 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09"new" dissector API -> dissector API for ASN.1 dissectors.Michael Mann1-1/+1
Change-Id: I7b794cba2feda2cae40411e2b1cb9fb091d08220 Reviewed-on: https://code.wireshark.org/review/12480 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-25Require BER dissector (OID) registration to be "new style".Michael Mann1-1/+1
Both old and new style API existed, just remove the "old" one. Change-Id: If725e778a0ecad5a431d634ed5c4856b4a281013 Reviewed-on: https://code.wireshark.org/review/12107 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-03Address "shadow" warnings found by checkAPI script.Michael Mann1-6/+6
These aren't "true" shadow issues, but the script doesn't completely understand C syntax (for things like struct member names "time" and "index"). But fixing them creates less noise. Change-Id: I5a2db1549095824530428529e86cab453c031a04 Reviewed-on: https://code.wireshark.org/review/10368 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-07-04asn1: split off cleanup routinesPeter Wu1-7/+10
General approach: 1. Split allocation (e.g. g_hash_table_new) from deallocation (g_hash_table_destroy) into functions named "init" and "cleanup". 2. Remove guards that test whether the hash tables are set as init is always called before cleanup. 3. Remove setting hash tables to NULL after destruction. 4. Copy register_init_routine function call and change init to cleanup. 5. Add cleanup function that calls reassembly_table_destroy if there is a reassembly_table_init function. Some templates were modified as follows: - snmp: split renew into init+cleanup, but keep renew for the uat_new callback. - ldap,ros: Rename init to cleanup as there was no initialization. - camel: remove init function from header, make it static. Remove debug print. - tcap: remove unused ssn_range assignment. Files in epan/ were regenerated using cmake && make asn1 Change-Id: Idac16ebf0ec304e0c8becaab5d32904e56eb69b9 Reviewed-on: https://code.wireshark.org/review/9136 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-19Convert OID APIs to use wmem.Michael Mann1-1/+1
There are a few oid functions that are only called in oids_test.c. I'll presume the APIs are used in proprietary dissectors rather than just remove them. Change-Id: I4595e00f93bf9ab8cf2493fe0432b91960f55a3f Reviewed-on: https://code.wireshark.org/review/6592 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Guy Harris <guy@alum.mit.edu> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-23asn1 generated dissectors: cleanup #include usageBill Meier1-9/+5
Change-Id: I36b2731d67f9345d2fd0c23800bba7d2be94c387 Reviewed-on: https://code.wireshark.org/review/6008 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-13ASN1: Register PDU-dissectors as NEWStig Bjørlykke1-3/+5
Change-Id: I1a317b19d8076588c9305dae6287bb80cc14da64 Reviewed-on: https://code.wireshark.org/review/4494 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
2014-09-30packet-ses.[hc], packet-pres.c: various:Bill Meier1-1/+1
- Create/use extended value-strings; - Move proto-register...() to (near) the end of the file; - Add editor modelines and adjust whitespace as needed. Change-Id: I7ebe6dfd62b3fb190aa1cefc9b35d40f156f11ea Reviewed-on: https://code.wireshark.org/review/4390 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-09Eliminate (almost all) proto_tree_add_text calls from ASN.1 dissectors.Michael Mann1-11/+13
This mostly involved adding expert info capabilities to many of the dissectors so that they could correctly flag error conditions. Only remaining proto_tree_add_text calls are in H248.cnf, which has a convoluted way of using hf_ data to make its tree. Change-Id: I6412150c2ec1977d7fa38f3f0ed416680bdfb141 Reviewed-on: https://code.wireshark.org/review/3500 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-21batch of tvb-length conversionsEvan Huus1-3/+3
Change-Id: I76ca4d075756e3ac691070e0c05344a410ea2498 Reviewed-on: https://code.wireshark.org/review/2507 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-3/+3
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96. Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f Reviewed-on: https://code.wireshark.org/review/2430 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-3/+3
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-02-26Remove trailing whitespace from asn1 .cnf & template.[hc] files. Regenerate ↵Bill Meier1-2/+2
dissectors. Change-Id: I0e779b2ac2f608356649c5bbfca438141070dea4 Reviewed-on: https://code.wireshark.org/review/412 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-18Remove $Id$ from the ASN.1 dissectors and regenerate them.Jeff Morriss1-13/+11
Change-Id: Ie476c6f82f318188b41ed922b92c6fec119ea954 Reviewed-on: https://code.wireshark.org/review/244 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-02-03Fix all -fstrict-alias warnings found by gcc 4.1.2Gilbert Ramirez1-1/+1
The majority of the fixes are for calls to uat_new(). Instead of having each caller cast its private data to (void**), we use void* in the uat_new() API itself. Inside uat_new(), we cast the void* to void**. Some dissectors use val64_string arrays, so a VALS64() macro was added for those, to avoid using VALS(), which is useful only for value_string arrays. packet-mq.c was changed because dissect_nt_sid() requires a char**, not a guint**. All other callers of dissect_nt_sid() use char*'s (and take the address of it) for their local storage. So, this was changed to follow the other practices. A confusion between gint and absolute_time_display_e in packet-time.c was cleared up. The ugliest fix is the addition of ip6_guint8_to_str(), for exactly one caller. The caller uses one type of ip6 address byte array, while ip6_to_str() expects another. This new function is in place until the various address implementations can be consolidated. Add VALS64() to the developer documentation. Change-Id: If93ff5c6c8c7cc3c9510d7fb78fa9108e4552805 Reviewed-on: https://code.wireshark.org/review/48 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-01-14Don't cast away constness.Guy Harris1-3/+3
svn path=/trunk/; revision=54793
2013-12-08- Forward declaration of register functions.Anders Broman1-5/+8
svn path=/trunk/; revision=53861
2013-11-10Add missing includes in order to remove exceptions.h from proto.h (next commit).Jakub Zawadzki1-5/+6
svn path=/trunk/; revision=53230
2013-11-05In an effort to reduce the use of pinfo->private_data (and some true global ↵Michael Mann1-44/+43
variables), I converted the ASN.1 dissectors that use pinfo->private_data to exchange a SESSION_DATA_STRUCTURE to instead only exchange it in the context of ASN.1. This meant converting dissectors to the "new" style to pass the SESSION_DATA_STRUCTURE as well as providing a pointer to it in asn1_ctx_t.private_data. Yes, it's still "private data", but it's not used by all dissectors like pinfo->private data is. svn path=/trunk/; revision=53090
2013-10-31Add a data parameter to call_ber_oid_callback to be able to pass data to ↵Michael Mann1-3/+3
subdissectors found with dissector_try_string_new. The intention is to aid in the removal of pinfo->private_data use as well as static global variables in a dissector. For now, all calls to call_ber_oid_callback have the data parameter set to NULL. svn path=/trunk/; revision=52994
2013-09-15Finish asn1 emem -> wmem conversion.Jörg Mayer1-3/+3
Left are snmp and those functions that don't have wmem equivalents. svn path=/trunk/; revision=52060
2013-07-03expert_add_info + proto_tree_add_text = proto_tree_add_expert, where applicableMichael Mann1-4/+4
svn path=/trunk/; revision=50337
2013-06-20Back out some of the wmem conversions (r50063 and r50057).Evan Huus1-3/+3
These dissectors allocate ephemeral or seasonal memory in UAT callbacks, which really makes no sense because UAT callbacks can occur when there is no packet or file in scope, making this effectively a leak if the user is fiddling with their UAT and never opens a capture. Emem let you get away with this, wmem forces an assertion. Back out the changes so that the UATs are usable until the code can be properly fixed to not use out-of-scope allocators. svn path=/trunk/; revision=50073
2013-06-19Convert the rest of the ASN1 dissectors from emem to wmem.Evan Huus1-3/+3
svn path=/trunk/; revision=50063
2013-06-03Convert ASN.1 dissectors to use filterable expert info.Michael Mann1-6/+15
NOTE: Kerberos ASN.1 template was updated, but not generated to source. svn path=/trunk/; revision=49707
2013-05-27Postfix FT_NONE fields with "_element" string to reduce number of ↵Pascal Quantin1-20/+20
incompatible filters in ASN.1 dissectors https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2402 svn path=/trunk/; revision=49599
2013-04-11Update the ASN.1 based dissectors following the changes done in r48812Pascal Quantin1-2/+2
svn path=/trunk/; revision=48820
2013-03-19From beroset:Anders Broman1-5/+5
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48429
2012-12-21Get rid of unused routines for UDC-type.Guy Harris1-18/+0
svn path=/trunk/; revision=46662
2012-12-12Moved users table lookup to find_oid_by_pres_ctx_id() so otherStig Bjørlykke1-39/+34
dissectors (acse, ros, rtse) can benefit from the configured settings. svn path=/trunk/; revision=46520
2012-09-24Regenerate asn.1 dissectors.Jakub Zawadzki1-5/+5
svn path=/trunk/; revision=45110
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45017
2012-07-08UATs could be put into "categories". The categories were defined onlyGuy Harris1-1/+1
implicitly by the #define name and string they were defined to; not all UATs neatly fit into any of the categories, so some of them were put into categories that weren't obviously correct for them, and one - the display filter macro UAT - wasn't put into any category at all (which caused crashes when editing them, as the GUI code that handled UAT changes from a dialog assumed the category field was non-null). The category was, in practice, used only to decide, in the aforementioned GUI code, whether the packet summary pane needed to be updated or not. It also offered no option of "don't update the packet summary pane *and* don't redissect anything", which is what would be appropriate for the display filter macro UAT. Replace the category with a set of fields indicating what the UAT affects; we currently offer "dissection", which applies to most UATs (any UAT in libwireshark presumably affects dissection at a minimum) and "the set of named fields that exist". Changing any UAT that affects dissection requires a redissection; changing any UAT that affects the set of named fields that exist requires a redissection *and* rebuilding the packet summary pane. Perhaps we also need "filtering", so that if you change a display filter macro, we re-filter, in case the display is currently filtered with a display filter that uses a macro that changed. svn path=/trunk/; revision=43603
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-05-24Update asn1-generated dissector.Chris Maynard1-2/+2
svn path=/trunk/; revision=42838
2012-03-02Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-3/+0
svn path=/trunk/; revision=41300
2011-10-15Update generated ASN1 *.[hc] files after recent work done by Jeff Morriss;Bill Meier1-1/+1
The only change in each file is in a comment showing the asn2wrs cmd used to build that file. svn path=/trunk/; revision=39427
2011-07-19Use ENC_NA as encoding for FT_PROTOCOL, FT_NONE and FT_BYTES.Stig Bjørlykke1-2/+2
svn path=/trunk/; revision=38122
2011-05-13Regenerate ASN.1 dissectors to update the #line directive.Stig Bjørlykke1-17/+17
svn path=/trunk/; revision=37118
2010-10-29Make the third argument to a UAT copy callback a size_t.Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=34695
2010-09-20Put Abort reason in info column.Stig Bjørlykke1-9/+16
svn path=/trunk/; revision=34159