aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1/tcap
AgeCommit message (Collapse)AuthorFilesLines
2020-06-01Fix some cppcheck issues:Martin Mathieson1-1/+1
- Some redundant assignments or tests. - Some declarations were changed to match definitions in terms of including _U_ for the same parameters - Some parenthesis added/changed to made precedence more obvious epan/color_filters.c:533: style: Variable 'name' is reassigned a value before the old one has been used. epan/color_filters.c:534: style: Variable 'filter_exp' is reassigned a value before the old one has been used. asn1/tcap/packet-tcap-template.c:2199: warning: Function 'dissect_tcap_ITU_ComponentPDU' argument order different: declaration '_U_, tvb, offset, _U_, tree, _U_' definition '_U_, tvb, offset, actx, tree, _U_' epan/dissectors/packet-aim.c:2546: warning: Function 'dissect_aim_tlv_value_icq' argument order different: declaration 'ti, subtype, tvb, _U_' definition 'ti, _U_, tvb, pinfo' epan/dissectors/packet-arp.c:1133: style: Clarify calculation precedence for '&' and '?'. epan/dissectors/packet-arp.c:1143: style: Clarify calculation precedence for '&' and '?'. epan/dissectors/packet-arp.c:1158: style: Clarify calculation precedence for '&' and '?'. epan/dissectors/packet-arp.c:1168: style: Clarify calculation precedence for '&' and '?'. epan/dissectors/packet-gtpv2.c:5997: warning: Function 'dissect_gtpv2_mbms_service_area' argument order different: declaration 'tvb, _U_, tree, _U_, _U_, _U_, _U_, _U_' definition 'tvb, _U_, tree, item, _U_, _U_, _U_, _U_' epan/dissectors/packet-gtpv2.c:6291: warning: Function 'dissect_gtpv2_mbms_time_to_data_xfer' argument order different: declaration 'tvb, _U_, tree, _U_, _U_, _U_, _U_, _U_' definition 'tvb, _U_, tree, item, _U_, _U_, _U_, _U_' epan/dissectors/packet-gtpv2.c:6369: warning: Function 'dissect_gtpv2_epc_timer' argument order different: declaration 'tvb, _U_, tree, _U_, _U_, _U_, _U_, _U_' definition 'tvb, _U_, tree, item, _U_, message_type, _U_, _U_' epan/dissectors/packet-knxip.c:2939: style: Condition 'mac_error' is always false (just added comment) epan/dissectors/packet-mac-lte.c:4386: style: Clarify calculation precedence for '&' and '?'. epan/dissectors/packet-nas_5gs.c:1828: style: Variable 'nas5gs_data->payload_container_type' is reassigned a value before the old one has been used. (noted confusing recursion) epan/dissectors/packet-rpcrdma.c:587: warning: Identical condition 'offset>max_offset', second condition is always false epan/dissectors/packet-rsl.c:2098: style: Assignment of function parameter has no effect outside the function. Change-Id: Ib5c9a04cfb6e6233972bc041434601c8ef09c969 Reviewed-on: https://code.wireshark.org/review/37343 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.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 Combs2-26/+26
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>
2019-01-31tcap: check p_tcap_private before dereferencing.Dario Lombardo1-8/+16
This caused a NULL pointer dereference on ASAN builds with malformed packets. AddressSanitizer:DEADLYSIGNAL ================================================================= ==15485==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x7ff49a4281fa bp 0x7ffe5257a4d0 sp 0x7ffe5257a2c0 T0) ==15485==The signal is caused by a WRITE memory access. ==15485==Hint: address points to the zero page. #0 0x7ff49a4281f9 in dissect_tcap_AARQ_application_context_name wireshark/epan/dissectors/./asn1/tcap/tcap.cnf #1 0x7ff498e7bab1 in dissect_ber_sequence wireshark/epan/dissectors/packet-ber.c:2425:17 Bug: 15464 Change-Id: I8fd4f09a1356211acb180e4598a33fce96d98e94 Reviewed-on: https://code.wireshark.org/review/31840 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
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-04-18Remove autotools build system.Dario Lombardo1-38/+0
It has been replaced by cmake. Change-Id: I83a5eddb8645dbbf6bca9f026066d2e995d8e87a Reviewed-on: https://code.wireshark.org/review/26969 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-07dissectors: more SPDX license convertions.Dario Lombardo2-26/+2
Change-Id: I96e1f1cdbaaf49d65705ecacc903f73cf0e47d7c Reviewed-on: https://code.wireshark.org/review/26334 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
2018-02-12dissectors: use SPDX identifiers.Dario Lombardo2-26/+2
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 Quantin2-13/+21
- 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 Quantin2-5/+18
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 Quantin3-21/+25
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-89/+39
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-91/+0
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-30Remove Makefile.common filesJoão Valverde2-52/+31
Now that nmake build system has been removed they are not needed anymore. Change-Id: I88075f955bb4349185859c1af4be22e53de5850f Reviewed-on: https://code.wireshark.org/review/16050 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-06-15Remove Nmake build systemPascal Quantin1-25/+0
Change-Id: I3bd474f3cda9667dec66426b5729449953df3e61 Reviewed-on: https://code.wireshark.org/review/15777 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jörg Mayer <jmayer@loplof.de> Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2016-06-13Convert AT_SS7PC to a "dissector address type"Michael Mann1-8/+13
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-13Clean asn1 make/cmake whitespaceJoão Valverde4-4/+0
Add missing newline or remove extra newlines at the end of the file. Trim trailing whitespace. Change-Id: I73b7a4e20969bc13f72bf97e981fd5de89d8bb17 Reviewed-on: https://code.wireshark.org/review/14400 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> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-03-13Move /asn1 to /epan/dissectorsJoão Valverde12-0/+3666
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>