aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tcap.c
AgeCommit message (Collapse)AuthorFilesLines
2018-12-05Fix some spelling errors found by Lintian.Gerald Combs1-1/+1
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-10-20Fix capitalization of preference display name.Guy Harris1-1/+1
They're supposed to use sentence case. Change-Id: I28c5120fdfae14c628a2ffbfe6fc4b571f71767a Reviewed-on: https://code.wireshark.org/review/30277 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-18ASN.1: update auto generated dissectorsPascal Quantin1-6/+6
Change-Id: Ic73e72b3d2e7590eaed07f6eb30f74f4303e7a65 Reviewed-on: https://code.wireshark.org/review/25880 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@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-10-12[TCAP] Make "tid" a generated item rather than hidden to make it obviousAndersBroman1-2/+2
that it exists. Change-Id: I1986b7678193f3b4c9ed8cabff7e411cef5bf185 Reviewed-on: https://code.wireshark.org/review/23892 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>
2017-08-15TCAP: fix infinite loop introduced in g35f9349396Pascal Quantin1-1/+1
Bug: 13926 Change-Id: I6bb06639f1226d6f5faee614858f5f09953d3ff5 Reviewed-on: https://code.wireshark.org/review/23087 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-08-15TCAP: more fixes for SRT analysisPascal Quantin1-15/+22
- when building the END hash entry, always use the BEGIN destination address. If no match is done, we will search using the BEGIN entry anyway - add the source PC to the END hash entry. As it will be used for messages initiated by the host that sent the BEGIN, we probably can assume that the PC will not change Bug: 13926 Change-Id: Iaa8b09bf6821961d1eab22683600f36d77bd2cc5 Reviewed-on: https://code.wireshark.org/review/23048 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: Michael Mann <mmann78@netscape.net>
2017-08-08We really only need one range_foreach routine.Guy Harris1-4/+4
Rename range_foreach_r() to range_foreach(), getting rid of the old range_foreach(). If your callback doesn't require an additional argument, just pass NULL when calling range_foreach(), and declare the argument as unused. Change-Id: I49a56f90610e39cf2ddc398c9e30ed11a6ca90db Reviewed-on: https://code.wireshark.org/review/23025 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-02TCAP: fix SRT analysisPascal Quantin1-13/+26
When reviewing the code, the following issues were identified: - otid/dtid on 3 bytes were not stored - when receiving the first continue from dest, the TC_END hash entry was created with the source tid / address instead of destination ones - when receiving the first continue from src, the logic could prevent the creation of the hash entry Bug: 13739 Change-Id: If4ee70f0fa69f5ff74fdf75f3a741102baa0121a Reviewed-on: https://code.wireshark.org/review/21780 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> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-29GSM MAP: use TCAP OTID to retrieve SM-RP-OA and SM-RP-DA fields when requiredPascal Quantin1-33/+35
Bug: 13592 Change-Id: Ib8a0ff6d897699c44e5c4b8834123169066cf904 Reviewed-on: https://code.wireshark.org/review/21397 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-03-19dissector: fix typo reponse -> responseAlexis La Goutte1-1/+1
Change-Id: I5d12b7038c0ed602cd5b3b416c35893986018f85 Reviewed-on: https://code.wireshark.org/review/20626 Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-28tcap: convert GHashTables into wmem.Dario Lombardo1-92/+42
Change-Id: I95509cada53d363320a5a5d9e36612d7a85d7ef3 Reviewed-on: https://code.wireshark.org/review/19741 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-11-06TCAP: Use a real dissector table to store dissector handles.Michael Mann1-12/+12
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-07-04packet-tcap.c: Remove MEM_TCAPSRTMichael Mann1-94/+3
No need to duplicate memory allocation of hash tables to have a "debug copy". Maybe a separate wmem allocator can be used within the dissector, but that type of debugging shouldn't be in trunk source. Keep it on private branch until it's working. Change-Id: I4bdd0f3d1b613f7ae79aa57ebb8e5c3293023253 Reviewed-on: https://code.wireshark.org/review/16282 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-13Convert AT_SS7PC to a "dissector address type"Michael Mann1-14/+19
The formatting of the address type is determined by a preference in packet-mtp3.c, so just make MTP3 register the address type. Use address_type_get_by_name in other dissectors (and export_pdu) to use the address type. Change-Id: Ifb32d7de27aeaa23cee8e803e25ffb3c905547b5 Reviewed-on: https://code.wireshark.org/review/15856 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-03-20Manually add protocol dependencies derived from find_dissector.Michael Mann1-1/+1
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-13Move /asn1 to /epan/dissectorsJoão Valverde1-28/+28
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-08TCAP: Fix warning [-Wclobbered]João Valverde1-12/+13
Add TCAP to clean ASN.1 dissector list. Change-Id: I256dabe0961b681d22c230378f19968d9f7eda26 Reviewed-on: https://code.wireshark.org/review/13812 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-02-07TCAP: Fix warning [-Wunused-function]João Valverde1-14/+29
Change-Id: Ie30f39cf1d79f571824cb02583130e9ec828ede4 Reviewed-on: https://code.wireshark.org/review/13788 Petri-Dish: 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-06TCAP: fix indent and add modelines (use 2 spaces)Alexis La Goutte1-119/+132
Change-Id: I3ac35f3dd6514469bdcabd0acd67970077d5c364 Reviewed-on: https://code.wireshark.org/review/13793 Reviewed-by: João Valverde <j@v6e.pt>
2016-02-06TCAP: Fix dissect_tcap_ERROR() unused warning [-Wunused-function]João Valverde1-18/+0
Change-Id: I0d9511ed9cb93446766d510b97fdefe56a86a826 Reviewed-on: https://code.wireshark.org/review/13787 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: Michael Mann <mmann78@netscape.net>
2016-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-38/+38
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-23Add more fields to packet_info structure and use them.Guy Harris1-11/+11
Add fields for the absolute time stamp (and another field for a presence flag for the absolute time stamp) and the packet encapsulation for the packet. This lets us remove the field for the packet encapsulation in the frame_data structure; do so. Change-Id: Ifb910a9a192414e2a53086f3f7b97f39ed36aa39 Reviewed-on: https://code.wireshark.org/review/13499 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-10Convert ASN.1 dissectors to remove "new" from "new-style" dissector function ↵Michael Mann1-2/+2
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-2/+2
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-15/+12
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-07-04asn1: split off cleanup routinesPeter Wu1-8/+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-04-09Replace deprecated API tvb_length... with tvb_reported_length...AndersBroman1-2/+2
Change-Id: I44732d2743ba461d1791bb3795b0aef5a314bc1f Reviewed-on: https://code.wireshark.org/review/8001 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-19TCAP: support dialogue confirmationLuke Mewburn1-55/+55
TCAP permits the changing of the originating address on the first backwards continue (i.e. the establishment of the dialogue). See ITU-T Q.771 (06/97) clause 3.1.2.2.2.2 Confirmation of the dialogue. In practice, a BEGIN replied to with an END can also exhibit this behaviour. For example, a BEGIN from GT A TID TA -> GT B, and the reply CONTINUE from GT B2 TID TB -> GT A TID TA. To support this, only support a single address hash in tcaphash_begin_info_key_t and tcaphash_end_info_key_t. The match of the first CONTINUE should find the appropriate tcaphash_begin and create the appropriate tcaphash_end entries. Also fix compile warning with DEBUG_TCAPSRT. Bug: 10841 Change-Id: Ibe75e3940e757727357b20be10f9c195c5888fdd Reviewed-on: https://code.wireshark.org/review/6446 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-23asn1 generated dissectors: cleanup #include usageBill Meier1-8/+6
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-6/+10
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-14Consistent white space.Guy Harris1-755/+760
Change-Id: I7c19a16a671db7b68ef2f680813a9a190ed1e13d Reviewed-on: https://code.wireshark.org/review/4109 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-09Eliminate (almost all) proto_tree_add_text calls from ASN.1 dissectors.Michael Mann1-7/+14
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-36/+21
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-2/+2
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-2/+2
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-17Convert tcap dissector to wmemEvan Huus1-14/+14
As far as I can tell these calls were just missed in the first initial pass, they're not in a weird scope. Close review from somebody else please to verify that! Change-Id: Ic3188879124dcb8fdf42e79d200d4f244200aa7b Reviewed-on: https://code.wireshark.org/review/2266 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-07tvb_new_subset -> tvb_new_subset_length when length parameters are equal.Michael Mann1-4/+3
tvb_new_subset -> tvb_new_subset_remaining it appears that's what the intention is. Change-Id: I2334bbf3f10475b3c22391392fc8b6864454de2d Reviewed-on: https://code.wireshark.org/review/1999 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-05-08TCAP: set a fence on info column after calling sub dissectorPascal Quantin1-1/+3
Bug: 10091 Change-Id: I7af57345e31209fb4dd02cdab7960c44c69dc0a5 Reviewed-on: https://code.wireshark.org/review/1555 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-18Fix mix tab and spaceAlexis La Goutte1-6/+6
Change-Id: Ife12c5118dcd70ba6b2540d53697f7c9cc9207c9 Reviewed-on: https://code.wireshark.org/review/1196 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-14Fix warning found by -Wunused-const-variable (Clang 3.5)Alexis La Goutte1-29/+14
Change-Id: I246aa28be28194576b4bd58714b2e6ac36f7a29a Reviewed-on: https://code.wireshark.org/review/1121 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-06Convert ep_address_to_str -> address_to_str(wmem_packet_scope, ...) for all ↵Michael Mann1-20/+20
dissectors Change-Id: I7489e2fb3a1f2630ca17b0a5fe1aa873992f1061 Reviewed-on: https://code.wireshark.org/review/975 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-02-18Remove $Id$ from the ASN.1 dissectors and regenerate them.Jeff Morriss1-22/+20
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-3/+3
svn path=/trunk/; revision=54800
2013-12-30Move tcap and camel "persistent data" functionality to the dissectors ↵Michael Mann1-13/+1839
themselves instead of being part of epan directory. svn path=/trunk/; revision=54499
2013-11-10Add missing includes in order to remove exceptions.h from proto.h (next commit).Jakub Zawadzki1-6/+7
svn path=/trunk/; revision=53230
2013-10-28Pass tcap_private into the dissectors that need it rather than use ↵Michael Mann1-2/+2
private_data. Not sure if value_ptr is the "proper" place to pass tcap_private "internally" within the TCAP dissector, but it gets away from (potential) private_data (ab)use. svn path=/trunk/; revision=52916
2013-05-27Postfix FT_NONE fields with "_element" string to reduce number of ↵Pascal Quantin1-21/+21
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