summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-ansi_tcap.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>
2016-11-06TCAP: Use a real dissector table to store dissector handles.Michael Mann1-25/+3
Also cleanup ANSI TCAP dissector that had a commented out attempt at what was just cleaned up with TCAP. Change-Id: I347f11e21a493d8d444c2dc528bb7713a227381a Reviewed-on: https://code.wireshark.org/review/18129 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-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-03-20Manually add protocol dependencies derived from find_dissector.Michael Mann1-5/+4
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-03-13Move /asn1 to /epan/dissectorsJoão Valverde1-29/+29
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-01Clean up response matching type preference.Guy Harris1-14/+19
Add #defines for all the value types and use them. Make the preference static, as it's not used outside this module. Change-Id: I3ed715701f77d5ea6cc45c8f978d6e2da7b38671 Reviewed-on: https://code.wireshark.org/review/12988 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-22register_dissector -> new_register_dissector for ASN.1 dissectors.Michael Mann1-8/+7
Change-Id: I0476519c02ffdd426b4fdfe8a206d61b728c327a Reviewed-on: https://code.wireshark.org/review/12026 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
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-06[Dissector tables] DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE -> ↵AndersBroman1-1/+1
DISSECTOR_TABLE_ALLOW_DUPLICATE Change-Id: Id4d8d9a2d2befee7b82ac4e0e6f2f1b8f03b4532 Reviewed-on: https://code.wireshark.org/review/11603 Reviewed-by: Anders Broman <a.broman58@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-04Don't allow multiple registrations of a protocol in dissector tables.Michael Mann1-1/+1
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-09-15asni_tcap: actually regenerate dissector after cleanupPeter Wu1-4/+3
Rane make -C asn1 and found this missing change. Somehow the unnecessary initialization was not included with the dissector regeneration in 3243b6f964c96f0137fc3fffd66a74dd9f7910fd ("asn1: split off cleanup routines"). Change-Id: I26d6f0ca4e7fa0b791108f016c684556da5d06e8 Reviewed-on: https://code.wireshark.org/review/10538 Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-07-04asn1: split off cleanup routinesPeter Wu1-15/+11
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-04-09Replace deprecated API tvb_length... with tvb_reported_length...AndersBroman1-4/+4
Change-Id: I44732d2743ba461d1791bb3795b0aef5a314bc1f Reviewed-on: https://code.wireshark.org/review/8001 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-15Modify the errorcode defenition to suit ANSI MAP, this is (probably) OK asAndersBroman1-5/+31
ANSI MAP is currently the only user of ANSI TCAP. Bug: 6112 Change-Id: I49f89c862ddc8351091a9a939415e4ba6e7603f5 Reviewed-on: https://code.wireshark.org/review/6546 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-07tvb_bytes_to_ep_str -> tvb_bytes_to_strMichael Mann1-2/+2
Change-Id: I79c613cbdd8dc939dd4c29ebc477fb6eefd5bfc4 Reviewed-on: https://code.wireshark.org/review/6371 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-23asn1 generated dissectors: cleanup #include usageBill Meier1-8/+5
Change-Id: I36b2731d67f9345d2fd0c23800bba7d2be94c387 Reviewed-on: https://code.wireshark.org/review/6008 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-09Fix some spelling & grammar.Bill Meier1-1/+1
Change-Id: Iedeaa411caa0823922dd79c27897a2349d4e6907 Reviewed-on: https://code.wireshark.org/review/4054 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-09Eliminate (almost all) proto_tree_add_text calls from ASN.1 dissectors.Michael Mann1-10/+18
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-22convert to proto_tree_add_subtree[_format] for ASN.1 dissectorsMichael Mann1-4/+3
Change-Id: I753ca95e2e1b38bad2c09955317e648c525e40ef Reviewed-on: https://code.wireshark.org/review/2509 Tested-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-4/+4
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-4/+4
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-15Remove unused const variables errors seen with recent Clang versionPascal Quantin1-28/+17
Fixes bug 9886 Change-Id: I8624ef1c5874aea5521d21c998510fc29c838936 Reviewed-on: https://code.wireshark.org/review/657 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-02-26Remove trailing whitespace from asn1 .cnf & template.[hc] files. Regenerate ↵Bill Meier1-6/+6
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-23/+22
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-14Don't cast away constness.Guy Harris1-1/+1
svn path=/trunk/; revision=54800
2014-01-14Regenerate ANSI TCAP dissector from the changes in r54499.Guy Harris1-3/+10
svn path=/trunk/; revision=54799
2013-12-30Move tcap and camel "persistent data" functionality to the dissectors ↵Michael Mann1-6/+5
themselves instead of being part of epan directory. svn path=/trunk/; revision=54499
2013-12-19Rename a couple of to_str functions to have ep_ in the name. This makes itEvan Huus1-2/+2
obvious that the returned string is ephemeral, and opens up the original names in the API for versions that take a wmem pool (and thus can work in any scope). svn path=/trunk/; revision=54249
2013-11-23Convert ASN1 dissectors from ep_address_to_str to address_to_str. Clean up a bitEvan Huus1-16/+17
of ansi_tcap code while in the neighbourhood. svn path=/trunk/; revision=53530
2013-10-31Add a data parameter to call_ber_oid_callback to be able to pass data to ↵Michael Mann1-1/+1
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-10-27Have ANSI TCAP dissector pass data through subdissector parameter instead of ↵Michael Mann1-4/+3
using struct _packet_info. svn path=/trunk/; revision=52885
2013-06-19Convert a batch of asn1 dissectors from emem to wmem.Evan Huus1-7/+7
svn path=/trunk/; revision=50057
2013-05-27Postfix FT_NONE fields with "_element" string to reduce number of ↵Pascal Quantin1-23/+23
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-20svn path=/trunk/; revision=48440Anders Broman1-5/+7
2013-03-19From beroset:Anders Broman1-1/+1
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48429
2012-11-29Make all enum_val_t's const.Jeff Morriss1-44/+44
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
2012-08-18make hash key session scopedMichael Mann1-18/+7
cleanup g_snprintf svn path=/trunk/; revision=44565
2012-08-18Mark a parameter as unused.Guy Harris1-7/+5
Clean up indentation and get rid of trailing white space. svn path=/trunk/; revision=44562
2012-08-18epan/dissectors/packet-ansi_tcap.c shouldn't be edited - it's generatedGuy Harris1-6/+4
from the files in asn1/ansi_tcap. Update packet-ansi_tcap-template.c to reflect the use of session-scope-allocated data for the saved invoke data, and regenerate the dissector - which means that TransactionId_table_cleanup() still exists, and is still used, it just frees only the hash table key, which is g_strdup()ed, not the value, which is automatically freed when the session-scope-allocated data is all freed. svn path=/trunk/; revision=44560
2012-08-18Use capture scoped memory for hash table functionalityMichael Mann1-2/+1
svn path=/trunk/; revision=44558
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2011-11-19Fix Warnings.Anders Broman1-6/+6
svn path=/trunk/; revision=39948
2011-11-17Add a dissector table for National operation codes.Anders Broman1-10/+18
svn path=/trunk/; revision=39912
2011-11-16Dissect national Opcode.Anders Broman1-25/+134
svn path=/trunk/; revision=39887
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.Bill Meier1-2/+2
Also: remove trailing whitespace for a number of files. svn path=/trunk/; revision=39503