Commit Graph

37 Commits

Author SHA1 Message Date
Dario Lombardo 55c68ee69c epan: use SPDX indentifiers.
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>
2018-02-08 19:29:45 +00:00
Guy Harris 8aa14236f8 Have the frame_tvbuff.c routines not use the global cfile.
Have the routines that create them take a pointer to a struct
packet_provider_data, store that in the tvbuff data, and use it to get
the wtap from which packets are being read.

While we're at it, don't include globals.h in any header files, and
include it in source files iff the source file actually uses cfile.  Add
whatever includes that requires.

Change-Id: I9f1ee391f951dc427ff62c80f67aa4877a37c229
Reviewed-on: https://code.wireshark.org/review/24733
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-08 08:31:41 +00:00
Michael Mann 765a67b68a "Hardcode" the port types used by Export PDU functionality
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-10-29 19:55:24 +00:00
João Valverde d0a91b27f2 plugins: config.h must not be included by public headers
For a sane plugin build environment. Include config.h as the first
header in the .c file instead.

Fix by moving required compiler attribute macros to a new
"ws_attributes.h" API header.

Change-Id: I34f58a927f68c1a0e59686c14d214825149749e1
Reviewed-on: https://code.wireshark.org/review/23400
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>
2017-09-06 08:10:56 +00:00
Dario Lombardo baf2612d9e exported_pdu: add cleanup function.
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>
2017-01-17 03:26:04 +00:00
Michael Mann edcc2f019e Add OSI Layer 4 to exported PDU to handle TCP and UDP payloads.
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-08-01 15:19:59 +00:00
Alexis La Goutte f860e8de52 exported_pdu(.h): Fix warning: parameter 'tag_type.' not found in the function declaration [-Wdocumentation]
Change-Id: Ic93914a7f526b645bc21a5c9c5f2fa0bf988c27e
Reviewed-on: https://code.wireshark.org/review/16230
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>
2016-07-01 00:46:54 +00:00
Michael Mann be12a252dd Provide new interface for Export PDU.
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-29 18:53:46 +00:00
Michael Mann 04b82a7dc9 Convert AT_SS7PC to a "dissector address type"
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-06-13 17:06:38 +00:00
AndersBroman 4b4c7a76c3 [Nettrace] Add parsing of some HSS records.
Change-Id: I7c2f6ebdb20f90533ee008e1b4557ef27d4672dc
Reviewed-on: https://code.wireshark.org/review/14708
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-03-31 10:59:06 +00:00
Pascal Quantin 2ce6559b2a Fix a typo
Change-Id: I206c3f8ec860e92dce3f43b05f6695347d15398a
Reviewed-on: https://code.wireshark.org/review/14706
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-03-30 14:33:01 +00:00
AndersBroman 7b406ea3ea [Exported PDU] Add the abillity to use dissector tables from the file.
Change-Id: I51ac8ce56641cf6eeda18c2a3f6d6952d3126415
Reviewed-on: https://code.wireshark.org/review/14693
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-03-29 21:25:39 +00:00
AndersBroman 6f6ab7be19 [Nettrace] Add parsing of IP addresses and ports.
Change-Id: I4e2988edd9b5f75f7b104c8daddd1510bf1fc722
Reviewed-on: https://code.wireshark.org/review/11209
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-10-23 07:14:18 +00:00
Pascal Quantin 79774329d7 Simply code for export of PDUs coming from heuristic dissectors
Let's use the newly introduced find_heur_dissector_by_unique_short_name() function

Change-Id: I5781b9b2f1ab679da07e97755b71840b4b3a9361
Reviewed-on: https://code.wireshark.org/review/9645
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-07-15 18:30:57 +00:00
Pascal Quantin cdc7d25004 Add ability to export PDUs for heuristic dissectors also
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>
2015-06-25 00:10:13 +00:00
Graham Bloice 2fde6ffc8f Fix out of tree builds
Stop out of tree builds picking up the in-tree version and config.h

Change-Id: Icadc46cab66db72af2d475eac31b28d0ca10df90
Reviewed-on: https://code.wireshark.org/review/8204
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>
2015-05-25 10:42:59 +00:00
Pascal Quantin bcff3c57cc Add the ability to dynamically add a new protocol to export PDU dialog box
Change-Id: I83012cc963d514982e40010e837e11a6fcf1bc3e
Reviewed-on: https://code.wireshark.org/review/2423
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-19 06:48:32 +00:00
Pascal Quantin ad33357e62 Exported PDU: add support for more than 32 tags
Change-Id: Idc9f105164919827a8a81c88b5a56de4fa25df0b
Reviewed-on: https://code.wireshark.org/review/1197
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-18 20:15:04 +00:00
Jeff Morriss 38b8d32083 Mark the exported_pdu tags as stable (before the next release).
These tag values have been pretty stable for a while now; mark them as
stable and insert a warning (copied directly from tcpdump.org) to ensure
that people don't start using tags without registering them.

Change-Id: I9d7b9cd0daaff7eded606506d540c2555d78c417
Reviewed-on: https://code.wireshark.org/review/1193
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-18 19:01:47 +00:00
Pascal Quantin 488f2a0974 Exported PDU: add support for data length on the wire
Change-Id: Iff14ec4d0297ec85f3597b33871fb0ab5256a597
Reviewed-on: https://code.wireshark.org/review/728
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-19 05:13:30 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(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-03-04 14:27:33 +00:00
Bill Meier 11b5c15fdb Remove trailing whitespace
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-02-25 20:46:49 +00:00
Michal Labedzki ff0468f6d3 Add Logcat to Exported PDU
Logcat can be exported from ADB over USB or ADB over TCP where can occur
multiple Logcat PDUs in one frame.

Change-Id: I290fa131e5600c62357e5be4e76096ea5c35364b
Reviewed-on: https://code.wireshark.org/review/234
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-18 11:14:01 +00:00
Michael Mann eabaddaca9 Remove ethertype, mpls_label and ppids from packet_info structure.
The information was converted to "proto" data within their respective dissectors strictly for use in "Decode As".

svn path=/trunk/; revision=53489
2013-11-21 20:08:20 +00:00
Balint Reczey 49343d633c Fix ABI check error for libwireshark
svn path=/trunk/; revision=52630
2013-10-15 20:14:47 +00:00
Martin Kaiser 174fa28a31 support exporting decrypted DVB-CI/CI+ SAC messages
using the new export PDU mechanism

svn path=/trunk/; revision=51019
2013-07-29 20:38:20 +00:00
Pascal Quantin 014e2deec6 Add export of SS7 OPC/DPC
svn path=/trunk/; revision=50060
2013-06-19 21:49:12 +00:00
Pascal Quantin d09ffee44e Add ability to export decrypted IPsec PDUs
svn path=/trunk/; revision=50022
2013-06-18 23:01:46 +00:00
Pascal Quantin 24623bdff3 More PDU export work:
- 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-06-17 21:54:21 +00:00
Anders Broman 91c0a93914 Edit comments
svn path=/trunk/; revision=49569
2013-05-24 22:38:53 +00:00
Anders Broman 6a3a3c228c Make preparation to select which level tap is to be used.
svn path=/trunk/; revision=49446
2013-05-20 17:48:09 +00:00
Anders Broman 8e509279b8 Add a tag for original frame number.
svn path=/trunk/; revision=49298
2013-05-14 19:57:19 +00:00
Anders Broman ef13d981bb Add comments on the experimental state of this feature.
svn path=/trunk/; revision=49285
2013-05-14 06:07:26 +00:00
Pascal Quantin 914099a5a9 Fix a few bugs related to PDU export feature:
- 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-10 13:13:50 +00:00
Anders Broman 05ed1f5199 Add missing files.
svn path=/trunk/; revision=49185
2013-05-06 16:31:29 +00:00
Anders Broman 6409756fb8 55:1: error: "/*" within comment
svn path=/trunk/; revision=49178
2013-05-05 19:49:50 +00:00
Anders Broman 44f48d0464 Add the abillity to export PDU:s to file using a USER_DLT adding meta data before the actual protocol PDU. Some meta tags makes it possible for the dissector of the user DLT to call the correct PDU dissector.
This is prof-of-concept needs a bit of cleanup.

svn path=/trunk/; revision=49176
2013-05-05 19:36:53 +00:00