aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gtp.c
AgeCommit message (Collapse)AuthorFilesLines
2016-04-15gtp: change g_malloc to wmem_alloc.Dario Lombardo1-2/+1
Change-Id: I0e8ce74f8b656e9e5b4db1fac4a562dcd7856ab2 Reviewed-on: https://code.wireshark.org/review/14919 Petri-Dish: Dario Lombardo <lomato@gmail.com> 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-3/+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-20Manually add protocol dependencies derived from find_dissector.Michael Mann1-8/+8
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-2/+2
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-02GTP session ID generated tree item for tracking GTPv2 sessionsglores1-200/+191
Change-Id: I6d487c901838dcdb3550674e0a514a59d221806f Reviewed-on: https://code.wireshark.org/review/14093 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>
2016-02-11[GTP] In GTP' version 0 the 20 byte header is 6 bytes followed by 14 0AndersBroman1-29/+27
bytes. Bug: 12063 Change-Id: Ie1e98626b605f08835812c944acf58d57f383fae Reviewed-on: https://code.wireshark.org/review/13854 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-02-03GTP session tracker removing frame info fixGloria Pozuelo1-1/+1
Change-Id: I55e4a7a70e61d2178ee75dfeb3a201de8b12e34d Reviewed-on: https://code.wireshark.org/review/13686 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-02-02GTP: Fix Dereference of null pointer found by Clang analyzerAlexis La Goutte1-3/+3
Change-Id: Idfa4d114f39c3fe9a84f9b551488127c51aa66aa Reviewed-on: https://code.wireshark.org/review/13621 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Gloria Pozuelo <gloria.pozuelo@bics.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-01-29GTP session ID generated tree item for tracking GTPv1 sessionsGloria Pozuelo1-265/+610
Change-Id: I9192a58a9ec6676b2cba0f30bb45b4eaa8d82655 Reviewed-on: https://code.wireshark.org/review/11577 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>
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>
2016-01-23Add more fields to packet_info structure and use them.Guy Harris1-2/+2
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-30GTP: fix Dual Stack with one static and one Dynamic IP dissectionPascal Quantin1-4/+18
Bug: 11945 Change-Id: I759baec7c9af6d2502c5d3c151cb5c6adcf3d25f Reviewed-on: https://code.wireshark.org/review/12950 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>
2015-12-09new_register_dissector -> register_dissector for dissector directory.Michael Mann1-2/+2
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-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-4/+4
Some of the ASN.1 dissectors still generate a new_create_dissector_handle from the tool itself, so leave those for now. Change-Id: Ic6e5803b1444d7ac24070949f5fd557909a5641f Reviewed-on: https://code.wireshark.org/review/12484 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-08GTP sequence number fix for allowing to have sequence number equal to 0Gloria Pozuelo1-2/+7
Change-Id: Id8aad52198905eb33ecccf5ace01287954f31d2e Reviewed-on: https://code.wireshark.org/review/11526 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-04Don't allow multiple registrations of a protocol in dissector tables.Michael Mann1-2/+2
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-29It's "GTP Prime" ("GTP'"), not "GTP Prim".Guy Harris1-10/+10
Change-Id: I3b9e321483f21848f884bd301689c43fd625e747 Reviewed-on: https://code.wireshark.org/review/11410 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-08Replace or rename "duplicate" UDP protocols shown in Decode AsMichael Mann1-1/+5
Change-Id: I8cfd1c223c70c7e03728af8b2f7cbf9354d7ad86 Ping-Bug: 3949 Reviewed-on: https://code.wireshark.org/review/10865 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-12GTP: fix indent (use 4 spaces)Alexis La Goutte1-4/+4
Change-Id: I2f0645adee2aff32122a8ccb60843e1bfd0897e1 Reviewed-on: https://code.wireshark.org/review/10004 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-12[GTP] Direct Tunnel Flags 7.7.81 is currently specified with one dataAndersBroman1-2/+4
octet. Change-Id: Iab7917b23e6be03f63a92ef0aaf0814c9cbea2c3 Reviewed-on: https://code.wireshark.org/review/9992 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-06GTP fixes: RAB setup and PDP context prioLuca Melette1-2/+6
Change-Id: Ie250eaf17136076dbb3e44ac15b222a8b2e367ac Reviewed-on: https://code.wireshark.org/review/9520 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Evan Huus <eapache@gmail.com>
2015-07-03Split init of misc dissectors into init/cleanup functionsPeter Wu1-2/+2
Convert remaining dissectors to use cleanup routines when possible. (Single-)linked lists require NULL, so do reset their pointers to NULL. Generated with https://git.lekensteyn.nl/peter/wireshark-notes/diff/one-off/cleanup-rewrite.py?id=69af86e6c2cf965ba3d7f9636b647b195f0b7d57 (with AUDIT = ALWAYS_EMIT_CLEANUP_CODE = True) Remaining dissectors which did not need further changes: epan/dissectors/packet-aeron.c epan/dissectors/packet-bootp.c epan/dissectors/packet-brdwlk.c epan/dissectors/packet-drda.c epan/dissectors/packet-etch.c epan/dissectors/packet-fix.c epan/dissectors/packet-fw1.c epan/dissectors/packet-lbm.c epan/dissectors/packet-ldss.c epan/dissectors/packet-simulcrypt.c epan/dissectors/packet-spdy.c epan/dissectors/packet-starteam.c epan/dissectors/packet-udp.c Change-Id: Idcacfea6a5de38d40e67db4cdcd0452ad9f9a6a9 Reviewed-on: https://code.wireshark.org/review/9228 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-21Further refactor SRT stats.Michael Mann1-0/+58
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK. SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic. CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone. Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc Reviewed-on: https://code.wireshark.org/review/8894 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-15GTP: put T-PDU Data item under GTP treePascal Quantin1-1/+1
Otherwise it is put in the top tree, which seems a bit surprising (as seen in the attachment for bug 11271) Change-Id: I0e7f9c89d8ecaeecc3a951893e10154bc11927d3 Reviewed-on: https://code.wireshark.org/review/8927 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-25[GTP] Dissect eNodeB ID IEAnders1-4/+55
Change-Id: I7b6800ca71c9a0d2be4f30be55b49eec237ac908 Reviewed-on: https://code.wireshark.org/review/8629 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-21[GTP] Add a couple of new IEs as "Not dissected yet"Anders1-11/+140
Change-Id: If7a083ab3a56801168853a43dff85e1066d6bec5 Reviewed-on: https://code.wireshark.org/review/8570 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-19[GTP]Target identification can have a length of 0.Anders1-0/+3
Change-Id: Ica74dc4ce891f226c05d031c29465d386957edf4 Reviewed-on: https://code.wireshark.org/review/8541 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-22Convert proto_tree_add_boolean to ↵Michael Mann1-23/+61
proto_tree_add_bitmask_[value|value_with_flags|list] Part 2 of a few Change-Id: Ic1f1aafe2ed02dce95b15c03a91cbd68807a5cf4 Reviewed-on: https://code.wireshark.org/review/8165 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-03-18Remove proto_tree_add_text from packet-gtp.cMichael Mann1-57/+125
Change-Id: I53dcee56565e2a82bf0789199ce1c552f622840b Reviewed-on: https://code.wireshark.org/review/7730 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-14Support gtpp data record format version older than 6Mato1-1/+1
Bug: 11051 Change-Id: I04b1f1c852b60182ef7f5405716c0b6733d0f44a Reviewed-on: https://code.wireshark.org/review/7679 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-22GTP: Bad bytes read for extended rnc id valueBastien Bailly1-0/+1
offset+=2; is missing and bytes used for extended rnc id value are the same that for rnc id value. Bug:10877 Change-Id: I2830191e434812d42ab625e7a6e0478a191b7d95 Signed-off-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-on: https://code.wireshark.org/review/6738 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-14[E212]Modify dissect_e212_mcc_mnc() to take E212 number type as anAndersBroman1-9/+9
argument. While at it remove deprecated APIs Change-Id: Ib1a7e9d7aeba6379fb4492816a0ac602e67493c6 Reviewed-on: https://code.wireshark.org/review/6534 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-07tvb_bytes_to_ep_str -> tvb_bytes_to_strMichael Mann1-1/+1
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-31GTP: fix Copy-paste error (CID 1158594 & 1158595)Alexis La Goutte1-2/+2
Change-Id: I501c0d666c7b280656e2d7cf7a196d489d452eff Reviewed-on: https://code.wireshark.org/review/6166 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-28Replace ip6_to_str and ip6_guint8_to_str with address_to_str and tvb_ip_to_str.Michael Mann1-26/+13
Change-Id: I1d258923a7a63539ec8456d3e306bca5016a1e4b Reviewed-on: https://code.wireshark.org/review/6060 Petri-Dish: Michael Mann <mmann78@netscape.net> 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>
2014-12-26Replace ip_to_str with [ep_]address_to_str and tvb_ip_to_str.Michael Mann1-28/+16
Change-Id: I40d0c8253743183aecef252040b7dd6742ae5c71 Reviewed-on: https://code.wireshark.org/review/5934 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-23Deleting unneccessary #includes from dissectors.Martin Mathieson1-3/+0
Second batch (packet-eth.c -> packet-icmpv6.d). Will look at cleaning up and committing script afterwards. Change-Id: I14295758b81a59115d8c88899f166cc3d5d17594 Reviewed-on: https://code.wireshark.org/review/6013 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-2/+1
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-17Update to V12.5.0AndersBroman1-1/+1
Bug: 10782 Change-Id: I5fd4ec14279411682d8a23f5e0f503180113f093 Reviewed-on: https://code.wireshark.org/review/5790 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-13Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ...Bill Meier1-24/+24
(for some dissectors which fetch all other integral fields using ENC_BIG_ENDIAN). Change-Id: Ic18e3172aad76af12b12d6732c88497be22aed56 Reviewed-on: https://code.wireshark.org/review/5748 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-11-12Fix a couple of (AFAICS false) may-be-used-uninitialized warnings that show upJeff Morriss1-4/+2
on the OSX 10.5 buildbot. Change-Id: I49e066feab8b980ea85371095234e96e89db71e1 Reviewed-on: https://code.wireshark.org/review/5247 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-11-11Fix a couple of (AFAICS false) may-be-used-uninitialized warnings that show ↵Jeff Morriss1-6/+8
up with gcc 4.8.3. Change-Id: I71c9013670dd6e8c74e039bd252cfac2c9e95a18 Reviewed-on: https://code.wireshark.org/review/5246 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-11-11[GTP] Fix decoding of UMTS GTP QoS Profile i n Radius and DiameterAndersBroman1-4/+101
messages. Fixes Bug 10688 Change-Id: Iff29ae3f6cee1b4ad12a0e5c5d7fd3da1c9343af Reviewed-on: https://code.wireshark.org/review/5244 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-09-29Improve filterability of GTP dissector.Michael Mann1-161/+255
Eliminated many, but not all proto_tree_add_text calls (mostly thanks to convert_proto_tree_add_text.pl) Change-Id: I37d22ca9816ae1a3a42d911abeb73f7ba49f77d3 Reviewed-on: https://code.wireshark.org/review/4378 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-09-26GTP: display SAC as BASE_HEX_DECPascal Quantin1-1/+1
Bug: 10490 Change-Id: I0afe1f2ff51f2452830bfc57210dc3a298b68cbf Reviewed-on: https://code.wireshark.org/review/4290 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-09-16Fix spelling: cant-->can't, wont-->won't, etcBill Meier1-1/+1
Change-Id: I4497f1b8b6eab0e576d9dd31b732965f9a6679c6 Reviewed-on: https://code.wireshark.org/review/4124 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-22Replace a couple of implementations of unpack_digits() with ↵Jeff Morriss1-1/+1
tvb_bcd_dig_to_wmem_packet_str(). Change-Id: Ic9e740345fb3a748f6df4f624441bb947bbd9429 Reviewed-on: https://code.wireshark.org/review/3797 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-19fixMartin Kaiser1-2/+2
packet-gtp.c: In function 'decode_gtp_imsi': packet-gtp.c:3210:18: error: variable 'imsi_str' set but not used [-Werror=unused-but-set-variable] cc1: all warnings being treated as errors make[5]: *** [libdissectors_la-packet-gtp.lo] Error 1 by commenting out the unused variable Change-Id: I498595f93423c599f902a1a0cc42b63cef2c4d7c Reviewed-on: https://code.wireshark.org/review/3725 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-08-19Use e212 function to dissect IMSI.AndersBroman1-16/+8
Remove deprecated APIs Change-Id: I1d5a1437000c5bc4ffd7708bc5b3ab42f7019acf Reviewed-on: https://code.wireshark.org/review/3721 Reviewed-by: Anders Broman <a.broman58@gmail.com>