aboutsummaryrefslogtreecommitdiffstats
path: root/epan/exported_pdu.c
AgeCommit message (Collapse)AuthorFilesLines
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>
2018-08-14export_pdu.c: Fix a memory leakVasil Velichkov1-2/+2
Allocate the exp_pdu_data using the wmem_packet_scope allocator so the epan_dissect_run_with_taps will free it after calling all registered tap listeners. valgrind --tool=memcheck --leak-check=full ./run/tshark -r sctp.pcap -U "OSI layer 3" -w exported.pcap 32 bytes in 1 blocks are definitely lost in loss record 48 of 76 at 0x4C2EBAB: malloc (vg_replace_malloc.c:299) by 0xB3FC3C5: g_malloc (gmem.c:99) by 0x68C2BE1: export_pdu_create_tags (exported_pdu.c:251) by 0x68C2D5E: export_pdu_create_common_tags (exported_pdu.c:231) by 0x70AA54E: create_exp_pdu_proto_name (packet-sctp.c:3240) by 0x70AA54E: export_sctp_data_chunk.part.23 (packet-sctp.c:3268) by 0x70AB76B: export_sctp_data_chunk (packet-sctp.c:3256) by 0x70AB76B: dissect_data_chunk (packet-sctp.c:3509) Change-Id: I6e247ab2861bbb053f0958faf253913b28dbcbeb Reviewed-on: https://code.wireshark.org/review/29126 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-04-17glib: Use g_slist_free_full() in a couple of places.Anders1-8/+1
Change-Id: Iff833bf5c197959c8decb62d6ce794c6d0415fb7 Reviewed-on: https://code.wireshark.org/review/26978 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-08epan: use SPDX indentifiers.Dario Lombardo1-13/+1
Skipping dissectors dir for now. Change-Id: I717b66bfbc7cc81b83f8c2cbc011fcad643796aa Reviewed-on: https://code.wireshark.org/review/25694 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-06Convert PT_EXCHG into using conversation endpointsMichael Mann1-2/+0
Change-Id: Id5857a58513c38dd0ab5b30b61113bcc14e1ecee Reviewed-on: https://code.wireshark.org/review/24258 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-11-05Convert TIPC to use endpoint conversationsMichael Mann1-2/+0
Change-Id: Iab03ebbfc982bf7182851f63c17fa59bc71d7709 Reviewed-on: https://code.wireshark.org/review/24219 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-01Add ability to create endpoints through conversationsMichael Mann1-2/+0
Add endpoint information to the packet_info structure for dissectors to potentially use as their data to create conversations. This patch includes a simple "example" of using conversation_create_endpoint with TDMoP. The assignment of the PT_TDMOP "port type" has been replaced by setting ENDPOINT_TDMOP within the endpoint structure. Then when subdissectors of TDMoP call find_or_create_conversation(), it implicitly picks up the conversation information set by TDMoP Change-Id: I11dc29989cccd3b0f0349ee901babb455ca02d19 Reviewed-on: https://code.wireshark.org/review/24190 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Andrew Chernyh <andrew.chernyh@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-30Remove port_type values not set in pinfo->ptypeMichael Mann1-4/+0
NCP and SBCCS values used for conversation (endpoints) and not to pass "type" to subdissectors. Change-Id: I56a13d2bb7d718b340e9b5a102c43f6e0012bfb9 Reviewed-on: https://code.wireshark.org/review/24174 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-29"Hardcode" the port types used by Export PDU functionalityMichael Mann1-4/+51
The "internal" port type has been serialized by export PDU functionality and nettrace_3gpp_32_423 wiretap. To better support "endpoint" functionality the port types will be removed/updated and that changes the implicit values from the port_type enum. Take a snapshot of the current port_type values and use those specific values when reading/writing export PDU data and provide conversion functions that can be modified when port_types are removed. Do the same for nettrace_3gpp_32_423 wiretap. Change-Id: I770bd0cab22e84f3cf49032fc86c5927bf85263f Reviewed-on: https://code.wireshark.org/review/24169 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-01-17exported_pdu: add cleanup function.Dario Lombardo1-0/+12
Change-Id: Iafc9f1c4b2a0210d8098b37eefc095e740182258 Reviewed-on: https://code.wireshark.org/review/19648 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-01Add OSI Layer 4 to exported PDU to handle TCP and UDP payloads.Michael Mann1-1/+23
This allows for much easier anonymized captures for protocols running atop TCP/UDP. Added support for "TCP dissector data" tag within export PDU (34) so that the tcpinfo struct that TCP dissector normally passes to its subdissectors can be saved. Change-Id: Icd63c049162332e5bcb2720159e5cf8aac893788 Reviewed-on: https://code.wireshark.org/review/16285 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-29Provide new interface for Export PDU.Michael Mann1-282/+189
Rather than have a bitmask for each desired field, have a dissector provide a list of structures that represent data that goes into the PDU. Change-Id: I125190cbaee489ebffb7d9f5d8bc6f3be2d06353 Reviewed-on: https://code.wireshark.org/review/16122 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>
2016-06-13Convert AT_SS7PC to a "dissector address type"Michael Mann1-4/+12
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-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-06-25Add ability to export PDUs for heuristic dissectors alsoPascal Quantin1-3/+4
Change-Id: I1bf1aa9794f9b4f106edffd4986fc0b1014522fa Reviewed-on: https://code.wireshark.org/review/9099 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-10-10Add editor modelines; Adjust whitespace as needed.Bill Meier1-6/+19
Change-Id: I3dc57f4c2ca57585103e3b71503ac4c332903e50 Reviewed-on: https://code.wireshark.org/review/4594 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-06-19Add the ability to dynamically add a new protocol to export PDU dialog boxPascal Quantin1-0/+24
Change-Id: I83012cc963d514982e40010e837e11a6fcf1bc3e Reviewed-on: https://code.wireshark.org/review/2423 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-18Exported PDU: add support for more than 32 tagsPascal Quantin1-186/+201
Change-Id: Idc9f105164919827a8a81c88b5a56de4fa25df0b Reviewed-on: https://code.wireshark.org/review/1197 Reviewed-by: Anders Broman <a.broman58@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>
2014-02-25Remove trailing whitespaceBill Meier1-1/+1
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0 Reviewed-on: https://code.wireshark.org/review/385 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
2014-01-06Try to fix warning: cast discards '__attribute__((const))' qualifier from ↵Anders Broman1-2/+2
pointer target type . svn path=/trunk/; revision=54619
2013-11-21Remove ethertype, mpls_label and ppids from packet_info structure.Michael Mann1-33/+1
The information was converted to "proto" data within their respective dissectors strictly for use in "Decode As". svn path=/trunk/; revision=53489
2013-07-29support exporting decrypted DVB-CI/CI+ SAC messagesMartin Kaiser1-1/+17
using the new export PDU mechanism svn path=/trunk/; revision=51019
2013-06-19Add export of SS7 OPC/DPCPascal Quantin1-18/+73
svn path=/trunk/; revision=50060
2013-06-17More PDU export work:Pascal Quantin1-28/+100
- add automatic export of port type when exporting a source / destination port - add export of SCTP PPID (usefulness to be checked) - fix some field size svn path=/trunk/; revision=49989
2013-05-14Fix copy/paste errorsPascal Quantin1-2/+2
svn path=/trunk/; revision=49306
2013-05-14Add a tag for original frame number.Anders Broman1-0/+20
svn path=/trunk/; revision=49298
2013-05-14Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-1/+1
svn path=/trunk/; revision=49287
2013-05-10Fix a few bugs related to PDU export feature:Pascal Quantin1-13/+16
- tag length is wrong if proto name was a multiple of 4 bytes - tag length is wrong in case no IP address is available in packet_info structwhile tag is requested - endianness issue when dumping the port number - overlapping tag IPv4 Dst address and IPv6 Src address - do not call dissector when it is not found - typo errors Enhancements: - add a subtree for tag content - display IPv6 Src/Dst address svn path=/trunk/; revision=49232
2013-05-06Fix compilation on -Werror compilesJörg Mayer1-3/+2
svn path=/trunk/; revision=49186
2013-05-06Add a helper function to load tags, handle IP and port tags andAnders Broman1-0/+188
copy packet comments. svn path=/trunk/; revision=49184