summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-mtp3.c
AgeCommit message (Collapse)AuthorFilesLines
2016-10-12MTP3: Added SS7 Point Code Name ResolutionBinh Trinh1-1/+29
bug: 7592 Change-Id: I1af2c5d6664e172c358cd19bc20e9352c2582eae Reviewed-on: https://code.wireshark.org/review/17677 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>
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-06-22Add address_to_bytes API.Michael Mann1-1/+1
This will copy an address's "byte format" into a buffer. The original intended design is for export_pdu functionality, which tries to do this "manually" for many address types (and creates undesired dependencies) The default functionality if a "byte format function" isn't provided (currently the case for all address types) is a memcpy of the address data. Providing "address to byte" functions to aid export PDU functionality will be provided later. Change-Id: I3703f9e617a8cef09165ad53a0f98c6372676b9b Reviewed-on: https://code.wireshark.org/review/16070 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-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-06-13Convert AT_SS7PC to a "dissector address type"Michael Mann1-4/+27
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-20Create call_data_dissector() to call data dissector.Michael Mann1-5/+1
This saves many dissectors the need to find the data dissector and store a handle to it. There were also some that were finding it, but not using it. For others this was the only reason for their handoff function, so it could be eliminated. Change-Id: I5d3f951ee1daa3d30c060d21bd12bbc881a8027b Reviewed-on: https://code.wireshark.org/review/14530 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-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-4/+4
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-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-5/+5
Change-Id: I1a0349d5d9d47210a97ff7a99fb358e59fd70e72 Reviewed-on: https://code.wireshark.org/review/12896 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-09new_register_dissector -> register_dissector for dissector directory.Michael Mann1-1/+1
Change-Id: Ie39ef054a4a942687bd079f3a4d8c2cc55d5f22c Reviewed-on: https://code.wireshark.org/review/12485 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-14register_dissector -> new_register_dissectorMichael Mann1-3/+4
Picking off "easy" dissectors that only have one or two exit points at most. Change-Id: I25fe6a0aac93980333217d007702799d16946563 Reviewed-on: https://code.wireshark.org/review/11816 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> 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-10-22Use address functions instead of ADDRESS macros in asn1 and epanGerald Combs1-2/+2
Replace CMP_ADDRESS, COPY_ADDRESS, et al with their lower-case equivalents in the asn1 and epan directories. Change-Id: I4043b0931d4353d60cffbd829e30269eb8d08cf4 Reviewed-on: https://code.wireshark.org/review/11200 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-08-31Convert the MTP3 stats to new "generic stat API".Gerald Combs1-0/+197
Convert both the MTP3 statistics and summary. As with the GSM stats this is mostly untested. Change-Id: I7af8d5f21c8161dc95f7f2c710f32364b6f6a431 Reviewed-on: https://code.wireshark.org/review/10338 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-23Deleting unnecessary #includes from dissectors.Martin Mathieson1-1/+0
Fourth batch (packet-mac-lte.c -> packet-rtp.c). Will look at cleaning up and committing script afterwards. Change-Id: Id921f07f4b274f0cfb77ce81abe4a285fdb8b644 Reviewed-on: https://code.wireshark.org/review/6023 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-4/+2
Specifically: - Set packet.h to be the first wireshark #include after config.h and "system" #includes. packet.h added as an #include in some cases when missing. - Remove some #includes included (directly/indirectly) in packet.h. E.g., glib.h. (Done only for those files including packet.h). - As needed, move "system" #includes to be after config.h and before wireshark #includes. - Rework various #include file specifications for consistency. - Misc. Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95 Reviewed-on: https://code.wireshark.org/review/5923 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-19Rename si_code variable to mtp3_si_code to avoid conflicts with NetBSD'sStephen Fisher1-1/+1
si_code #define in sys/siginfo.h Change-Id: I5e183b997768c87f275569343afa69ca542aba46 Reviewed-on: https://code.wireshark.org/review/5844 Reviewed-by: Stephen Fisher <sfisher@sdf.org>
2014-12-13Use ENC_LITTLE_ENDIAN when fetching FT_U?INT8 fields ...Bill Meier1-7/+7
(for some dissectors which fetch all other integral fields using ENC_LITTLE_ENDIAN). Change-Id: Ica72a68ac560f2920d61e0769de83130557c46fd Reviewed-on: https://code.wireshark.org/review/5752 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-11-21Replace tvb_length()AndersBroman1-1/+1
Change-Id: I0b5ad4d588f0b658abaf3892d08d6520ecd2f645 Reviewed-on: https://code.wireshark.org/review/5431 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-04Add editor modelines; Reformat as appropriate.Bill Meier1-425/+438
Change-Id: I8e9c58b75eea85877d22024201e5d8d0e9a3dbfd Reviewed-on: https://code.wireshark.org/review/4459 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-14Eliminate proto_tree_add_text from some dissectors.Michael Mann1-3/+7
Other minor cleanup while in the neighborhood. Change-Id: If73a029f564219782c313d4154c24c7ce7458b52 Reviewed-on: https://code.wireshark.org/review/3574 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>
2014-07-04convert to proto_tree_add_subtree[_format]Michael Mann1-14/+6
Change-Id: I621f2e2cad9403449cb78f45302388f0c874d3bc Reviewed-on: https://code.wireshark.org/review/2852 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-1/+1
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-1/+1
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-07tvb_new_subset -> tvb_new_subset_length when length parameters are equal.Michael Mann1-7/+4
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-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2013-12-21Add missing includesJakub Zawadzki1-0/+2
svn path=/trunk/; revision=54332
2013-12-14Fix [-Wmissing-prototypes]Jakub Zawadzki1-0/+3
svn path=/trunk/; revision=54095
2013-11-16Avoid calling find_dissector(), cache result of [new_]register_dissector()Jakub Zawadzki1-4/+3
svn path=/trunk/; revision=53353
2013-09-15emem -> wmemPascal Quantin1-3/+2
svn path=/trunk/; revision=52063
2013-07-04Global variables considered harmful.Guy Harris1-6/+8
svn path=/trunk/; revision=50378
2013-03-19From beroset:Anders Broman1-6/+6
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48425
2013-02-01Add heuristic MTP3 standard detection to M3UA (not for the draft M3UA versions).Jeff Morriss1-2/+1
The SCCP heuristics actually don't work all that well here but checking the PCs (in M3UA) seems to do a decent job at least of differentiating ANSI from ITU. svn path=/trunk/; revision=47407
2013-01-25Use pinfo-scoped memory for mtp3 addresses.Evan Huus1-2/+3
Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8247 svn path=/trunk/; revision=47266
2012-11-29Make all enum_val_t's const.Jeff Morriss1-5/+5
svn path=/trunk/; revision=46292
2012-10-25Create and start using macros for MTP3 network indicators.Jeff Morriss1-8/+2
pinfo has a match_uint field: use it instead of passing the SI of the message to subdissectors in private_data. svn path=/trunk/; revision=45788
2012-10-25Fix cut-n-pasteo.Jeff Morriss1-1/+1
svn path=/trunk/; revision=45786
2012-10-25Create and start using macros for MTP3 network indicators.Jeff Morriss1-12/+12
Export the network indicator value_string and use it in M3UA. svn path=/trunk/; revision=45784
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-09-03MT: move global frame_end_routines to packet_info.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=44748
2012-08-10Use val_to_str_const() where appropriate;Bill Meier1-2/+2
Also (for a few files): - create/use some extended value strings; - remove unneeded #include files; - remove unneeded variable initialization; - re-order fcns slightly so prefs_reg_handoff...() at end, etc svn path=/trunk/; revision=44438
2012-06-28Update FSF address - part II.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=43538
2012-02-07Export the mtp3_heuristic_standard preference and mtp3_standard_vals[].Jeff Morriss1-5/+8
Set mtp3_standard back to the preference value after each packet (in addition to in the frame-end function) in case there are multiple packets of different standards in the same frame. svn path=/trunk/; revision=40910
2012-02-03Create a list of MTP Service Indicator macros and use them.Jeff Morriss1-36/+36
svn path=/trunk/; revision=40828
2012-02-03Register a frame-end routine to reset mtp3_standard back to the preferenceJeff Morriss1-12/+22
value even if an exception was thrown. svn path=/trunk/; revision=40827
2012-02-03Improve heuristic standard detection:Jeff Morriss1-166/+165
- Fix various bugs. - Add some optional debug. - Enable checking of the Calling address. - Check that the Called/Calling address has at least a minimum number of octets. - Handle XUDTS. - Reject messages whose mandatory variable pointers are 0 (meaning not present). - Reject Class-2 messages whose Class-spare bits are non-zero. - For (Class-2) messages that have no variable parameters but an optional pointer, only accept messages whose optional pointer is 0 (no optional parameters) or 1 (optional parameter immediately follows the pointer). - (For some of those Class-2 messages) if there are no optional parameters, reject messages if we didn't reach the end of the message. svn path=/trunk/; revision=40819
2012-01-30Remove an unused parameter.Anders Broman1-2/+2
svn path=/trunk/; revision=40778
2012-01-30Try to determine MTP3 Standard heuristically, original codeAnders Broman1-44/+109
from Jeff Morris refactored a bit by me. svn path=/trunk/; revision=40776
2011-09-26Get rid of check_col() and use ENC.Anders Broman1-14/+13
svn path=/trunk/; revision=39153