summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-ansi_map.c
AgeCommit message (Collapse)AuthorFilesLines
2017-01-30Convert GHashTable -> wmem_map_t for ASN.1 disseectorsMichael Mann1-22/+8
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-07Convert range API to always use wmem memory.Michael Mann1-3/+3
This is mostly to address memory leaks in range preferences (the biggest user of range functionality) on shutdown. Now range preferences must use epan scoped memory when referencing internal preference structures to keep consistency. Change-Id: Idc644f59b5b42fa1d46891542b53ff13ea754157 Reviewed-on: https://code.wireshark.org/review/19387 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> 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-3/+3
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-01ASN.1 dissectors - don't try to find yourself.Michael Mann1-4/+3
If an ASN.1 dissector is calling register_dissector for itself in its proto_register_xxx function and then calling find_dissector for itself in its proto_reg_handoff_xxx function then just create a static handle for that dissector and use the return value of register_dissector, so the find isn't necessary. Change-Id: I911bdadc2fb4259601c141b955e741a2369cc447 Reviewed-on: https://code.wireshark.org/review/16233 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>
2016-06-27tvb_get_string_enc + proto_tree_add_item = proto_tree_add_item_ret_stringMichael Mann1-7/+15
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-06-16qt: move free_stat_tables from SimpleStatisticsDialog::fillTree to ↵Dario Lombardo1-1/+2
~SimpleStatisticsDialog. Add a reference count to stat_tap_table_ui to prevent bad deallocations. Bug: 12437 Change-Id: Ib9b1f929d08a574c306dc755ec416ab94a3fd6d3 Reviewed-on: https://code.wireshark.org/review/15920 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: Anders Broman <a.broman58@gmail.com>
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-03-13Move /asn1 to /epan/dissectorsJoão Valverde1-57/+57
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-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>
2016-01-01Clean up response matching type preference.Guy Harris1-14/+17
Add #defines for all the value types and use them. Make the preference static, as it's not used outside this module. Change-Id: Ibd04274b4160d18a55b10f47ce866ac97a76309e Reviewed-on: https://code.wireshark.org/review/12987 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-29Rename new_stat_tap_ui to stat_tap_table_ui.Guy Harris1-3/+3
A "new" statistics tap UI is a statistics tap UI where the statistics are maintained as tables and common code handles the tables; what matters is the tables, not that it's "new". Change-Id: I7a0e63cfac98c24cd5e7dce973b9a0cc5b6a03ba Reviewed-on: https://code.wireshark.org/review/12897 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-29There's no "old" stat_tap_table, so remove "new_" from the name.Guy Harris1-4/+4
Change-Id: I1a0349d5d9d47210a97ff7a99fb358e59fd70e72 Reviewed-on: https://code.wireshark.org/review/12896 Reviewed-by: Guy Harris <guy@alum.mit.edu>
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-20More spelling fixes found by lintianBalint Reczey1-1/+1
Change-Id: Id218dec9e5a721d6c63fd34962ffe50b6ab8dd56 Reviewed-on: https://code.wireshark.org/review/11946 Reviewed-by: Guy Harris <guy@alum.mit.edu> Reviewed-by: Diederik de Groot <dkgroot@talon.nl> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-04Don't allow multiple registrations of a protocol in dissector tables.Michael Mann1-3/+3
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-08-21GSM/ANSI/CAMEL...: fix no previous prototype for '*_stat_init' ↵Alexis La Goutte1-1/+1
[-Wmissing-prototypes] Change-Id: I0aedefbb77899ebceac7fb08249faf47964d785b Reviewed-on: https://code.wireshark.org/review/10163 Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-20ANSI: Add modelinesAlexis La Goutte1-0/+13
Change-Id: I641a9525ec5a6315cc4a2d97506a885605b3504b Reviewed-on: https://code.wireshark.org/review/10170 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-07-08GTK+: Add a Telephony/ANSI menu placeholder.Gerald Combs1-2/+2
Add REGISTER_STAT_GROUP_TELEPHONY_ANSI as well, and use it to add recently updated stats. Make sure we properly escape our path separators. Change-Id: I979d5c29a82acddec1a9bcae7e3cb9c5ea3f9d33 Reviewed-on: https://code.wireshark.org/review/9564 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-04ansi_map: fix float literals missing f suffixEvan Huus1-2/+2
Should fix OSX buildbots Change-Id: I466d4cdc0c4b52a15cadb9b5d429561ca68cc913 Reviewed-on: https://code.wireshark.org/review/9484 Reviewed-by: Evan Huus <eapache@gmail.com>
2015-07-04asn1: split off cleanup routinesPeter Wu1-13/+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-07-03Create very basic "generic" stat tap API to create a "GUI" independent table.Michael Mann1-5/+121
A few sample tap/dissectors (ANSI/A, ANSI MAP) are also included to test the API. The "GUI output" is a bit raw and could use some "prettying up", but all the basic hooks are there. Telephony "stat grouping" needs to be better alphabetized to properly populate menu (on GTK, probably Qt) Change-Id: I98514171f69c4ab3a304dccb26c71d629703c9ab Reviewed-on: https://code.wireshark.org/review/9110 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-04-09Replace deprecated API tvb_length... with tvb_reported_length...AndersBroman1-13/+13
Change-Id: I44732d2743ba461d1791bb3795b0aef5a314bc1f Reviewed-on: https://code.wireshark.org/review/8001 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-23asn1 generated dissectors: cleanup #include usageBill Meier1-7/+5
Change-Id: I36b2731d67f9345d2fd0c23800bba7d2be94c387 Reviewed-on: https://code.wireshark.org/review/6008 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-22ANSI_MAP: Fix unused function (by add to .OMIT list)Alexis La Goutte1-236/+45
Change-Id: I4e2278d563659db6acc6c02b9e66d58c67939e30 warning: unused function 'dissect_ansi_map_InvokeData' [-Wunused-function] warning: unused function 'dissect_ansi_map_ReturnData' [-Wunused-function] Reviewed-on: https://code.wireshark.org/review/5976 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-09Eliminate (almost all) proto_tree_add_text calls from ASN.1 dissectors.Michael Mann1-29/+57
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-19batch of manual tvb_length conversionsEvan Huus1-1/+1
Change-Id: Ib3a1ddc4342a7a8648d6ed8bfcb35aa229c56a27 Reviewed-on: https://code.wireshark.org/review/2445 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-14/+14
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-14/+14
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-02-18Remove $Id$ from the ASN.1 dissectors and regenerate them.Jeff Morriss1-52/+50
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-01-21Fix one half-changed tvb_get_string() call.Guy Harris1-1/+1
svn path=/trunk/; revision=54879
2014-01-21IA5 = ASCII. Use tvb_get_string_enc() with an explicit encoding, notGuy Harris1-2/+2
tvb_get_string(). svn path=/trunk/; revision=54877
2014-01-04Omit assignment for not used types.Anders Broman1-83/+45
svn path=/trunk/; revision=54591
2013-12-18Add a sixteenth element to all BCD digit sets to avoid garbage values whenEvan Huus1-1/+1
decoding corrupt bytes. Some of these digit sets could probably be deduplicated... svn path=/trunk/; revision=54224
2013-12-14Remove not needed ';'Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=54088
2013-12-02Reject the packet if data is NULL without doing anything else.Chris Maynard1-8/+6
svn path=/trunk/; revision=53708
2013-11-23Convert ASN1 dissectors from ep_address_to_str to address_to_str. Clean up a bitEvan Huus1-4/+4
of ansi_tcap code while in the neighbourhood. svn path=/trunk/; revision=53530
2013-10-27Have ANSI TCAP dissector pass data through subdissector parameter instead of ↵Michael Mann1-73/+62
using struct _packet_info. svn path=/trunk/; revision=52885
2013-10-26Fix some [-Wunused-const-variable] warnings (using '#if 0')Bill Meier1-3/+51
svn path=/trunk/; revision=52862
2013-09-22More emem -> wmem conversion:Pascal Quantin1-3/+3
- tvb_get_g_stringz()/tvb_get_ephemeral_stringz()/tvb_get_seasonal_stringz() -> tvb_get_stringz() - tvb_get_g_stringz_enc()/tvb_get_ephemeral_stringz_enc() -> tvb_get_stringz_enc() - tvb_get_ephemeral_unicode_stringz() -> tvb_get_unicode_stringz() - tvb_bcd_dig_to_ep_str() -> tvb_bcd_dig_to_wmem_packet_str() - update docs accordingly svn path=/trunk/; revision=52180
2013-09-22emem -> wmem conversion:Pascal Quantin1-2/+2
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits() - tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup() - tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode() - tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string() - tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string() - tvb_get_ephemeral_string_enc() -> tvb_get_string_enc() - update docs accordingly svn path=/trunk/; revision=52172
2013-09-12Convert a few dissectors from emem to wmem APIPascal Quantin1-2/+2
svn path=/trunk/; revision=51983
2013-06-19Apparently one of our major global headers must include emem.h, because I justEvan Huus1-9/+10
found a bunch more asn1 dissectors using emem without ever directly including the header. Convert those to wmem as well, which involves add a number of #include directives since dissectors do *not* automatically pull in the wmem headers. svn path=/trunk/; revision=50066
2013-05-27Postfix FT_NONE fields with "_element" string to reduce number of ↵Pascal Quantin1-224/+224
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-20[-Wmissing-prototypes]Anders Broman1-6/+10
Use explicit casts. svn path=/trunk/; revision=48439
2013-02-26its ==> it's & it's ==> its as needed.Bill Meier1-1/+1
svn path=/trunk/; revision=47892
2013-01-05Regenerate ANSI MAP dissectorPascal Quantin1-1/+1
svn path=/trunk/; revision=46948
2012-11-29Make all enum_val_t's const.Jeff Morriss1-1/+1
svn path=/trunk/; revision=46292
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