aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-exported_pdu.c
AgeCommit message (Collapse)AuthorFilesLines
2018-06-27Exported PDU: adjust protocol and tag tree lengthsPeter Wu1-3/+7
Change the exported_pdu size from two to the full size of the tag (including type and length fields) and limit the protocol length to just the tags (without the PDU data). Change-Id: I1c20740627ebd74c117bb1735ff4c189d2d750d6 Reviewed-on: https://code.wireshark.org/review/28470 Petri-Dish: Peter Wu <peter@lekensteyn.nl> 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-02-12dissectors: use SPDX identifiers.Dario Lombardo1-13/+1
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-11-06Convert PT_EXCHG into using conversation endpointsMichael Mann1-2/+1
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/+1
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-03Exported PDU: apply EXP_PDU_TAG_COL_PROT_TEXT whatever the next_prot_type tagPascal Quantin1-4/+13
The include file suggests that it will always fill the protocol column if present. Let's make that happen. Change-Id: I265e2f4d1c2dcd7cf2ff121499694cde14a595f3 Reviewed-on: https://code.wireshark.org/review/24220 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-11-01Add ability to create endpoints through conversationsMichael Mann1-1/+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/+4
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/+69
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>
2016-12-31Dissectors don't need a journey of self discovery.Michael Mann1-3/+3
They already know who they are when they register themselves. Saving the handle then to avoid finding it later. Not sure if this will increase unnecessary register_dissector functions (instead of using create_dissector_handle in proto_reg_handoff function) when other dissectors copy/paste, but it should make startup time a few microseconds better. Change-Id: I3839be791b32b84887ac51a6a65fb5733e9f1f43 Reviewed-on: https://code.wireshark.org/review/19481 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-08-15Exported PDU: dump payload before calling sub dissectorPascal Quantin1-1/+1
This way, the payload is displayed even if the sub dissector triggers an exception Change-Id: Ife062f59035776c4eb9e550eb202a5e40afc4b60 Reviewed-on: https://code.wireshark.org/review/17063 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-08-15Exported PDU: fix a typoPascal Quantin1-22/+1
While we are at it, let's remove dead code Change-Id: I3a001f07b9becc885d544551a1fa578642517d08 Reviewed-on: https://code.wireshark.org/review/17061 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-08-01Add OSI Layer 4 to exported PDU to handle TCP and UDP payloads.Michael Mann1-3/+32
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-27tvb_get_string_enc + proto_tree_add_item = proto_tree_add_item_ret_stringMichael Mann1-11/+7
Also some other tricks to remove unnecessary tvb_get_string_enc calls. Change-Id: I2f40d9175b6c0bb0b1364b4089bfaa287edf0914 Reviewed-on: https://code.wireshark.org/review/16158 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> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-06-13Convert AT_SS7PC to a "dissector address type"Michael Mann1-2/+7
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-05-04[Exported PDU] Add filters for ip.addr ip.dest etc for IPv4 and Ipv6 tags.AndersBroman1-1/+37
Change-Id: Id9a7872ed982e3b615563ca8c6b264f2de8be837 Reviewed-on: https://code.wireshark.org/review/15262 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-03-29[Exported PDU] Add the abillity to use dissector tables from the file.AndersBroman1-20/+71
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>
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-20More spelling fixes found by lintianBalint Reczey1-1/+1
Change-Id: Id218dec9e5a721d6c63fd34962ffe50b6ab8dd56 Reviewed-on: https://code.wireshark.org/review/11946 Reviewed-by: Guy Harris <guy@alum.mit.edu> Reviewed-by: Diederik de Groot <dkgroot@talon.nl> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-13register_dissector -> new_register_dissectorMichael Mann1-3/+4
Picking off "easy" dissectors that only have one or two exit points at most. Change-Id: I3d5e576b796556ef070bb36d8b55da0b175dcba8 Reviewed-on: https://code.wireshark.org/review/11805 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-03Remaining ADDRESS macro to address function conversionsJoão Valverde1-4/+4
Change-Id: I8bc9af431e70243b05f4f0ce8c2b8ee451383788 Reviewed-on: https://code.wireshark.org/review/11463 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-10-22Use address functions instead of ADDRESS macros in asn1 and epanGerald Combs1-6/+6
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-07-15Simply code for export of PDUs coming from heuristic dissectorsPascal Quantin1-10/+4
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-06-25Add ability to export PDUs for heuristic dissectors alsoPascal Quantin1-2/+30
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-03-01Use COPY_ADDRESS_SHALLOW instead of duplicating TVB_SET_ADDRESS and ↵Michael Mann1-4/+4
SET_ADDRESS calls for the same address. Change-Id: I0c9cc5d574fdd73ecf1f8b32dbbf0ddb2b885116 Reviewed-on: https://code.wireshark.org/review/7437 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-01-07SET_ADDRESS -> TVB_SET_ADDRESS to "hide" some of the tvb_get_ptr use.Michael Mann1-13/+8
Not all changes were able to remove their corresponding tvb_get_ptr, because there are other API dependent on the (tvb_get)pointer, but future iterations optimizing those other APIs will then be able to remove it. Change-Id: Id7cefd440b81834de1d1aace7cd0789b1c871a22 Reviewed-on: https://code.wireshark.org/review/6358 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-23Deleting unneccessary #includes from dissectors.Martin Mathieson1-1/+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-4/+0
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-08-05Eliminate proto_tree_add_text from some dissectors.Michael Mann1-3/+8
Other minor cleanup while in the area. Change-Id: Id8d957d3d68a2e3dd5089f490bd59d773e1be967 Reviewed-on: https://code.wireshark.org/review/3427 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-06-19Add the ability to dynamically add a new protocol to export PDU dialog boxPascal Quantin1-4/+2
Change-Id: I83012cc963d514982e40010e837e11a6fcf1bc3e Reviewed-on: https://code.wireshark.org/review/2423 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-04Change tvb_get_string() -> tvb_get_string_enc and ENC_ASCII -> ENC_UTF_8AndersBroman1-2/+2
Change-Id: I07ecca5612ae9fa2b053a62c69014612c5125d5e Reviewed-on: https://code.wireshark.org/review/962 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-18Add Logcat to Exported PDUMichal Labedzki1-0/+1
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-01-28Comment out unused hf[] entries and related found by checkhf.Bill Meier1-1/+3
svn path=/trunk/; revision=54989
2013-12-15Fix [-Wmissing-prototypes]Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=54135
2013-11-29Avoid including <wiretap/wtap.h> in dissectors.Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53655
2013-11-21Get rid of unused variable.Guy Harris1-1/+0
svn path=/trunk/; revision=53492
2013-11-21Remove ethertype, mpls_label and ppids from packet_info structure.Michael Mann1-8/+0
The information was converted to "proto" data within their respective dissectors strictly for use in "Decode As". svn path=/trunk/; revision=53489
2013-11-21Do not add an unknown tag item for End-of-optionsPascal Quantin1-0/+2
svn path=/trunk/; revision=53471
2013-11-16Clear protocol column when the dissector is knownPascal Quantin1-1/+2
svn path=/trunk/; revision=53368
2013-11-12Add an item for any unknown tags we come across (just as FT_BYTES).Jeff Morriss1-0/+8
svn path=/trunk/; revision=53278
2013-11-12De-duplicate some code by changing a while loop to a do-while loop.Jeff Morriss1-22/+17
svn path=/trunk/; revision=53277
2013-11-09Include <epan/to_str.h> only when needed.Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53189
2013-10-13whitespace fixes; mostly: remove trailing blanksBill Meier1-1/+1
svn path=/trunk/; revision=52591
2013-09-22emem -> wmem conversion:Pascal Quantin1-1/+1
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits() - tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup() - tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode() - tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string() - tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string() - tvb_get_ephemeral_string_enc() -> tvb_get_string_enc() - update docs accordingly svn path=/trunk/; revision=52172
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-28Use newly assigned DLT for PDU export functionalityPascal Quantin1-3/+1
svn path=/trunk/; revision=50212
2013-06-19Add export of SS7 OPC/DPCPascal Quantin1-8/+40
svn path=/trunk/; revision=50060
2013-06-18Add ability to export decrypted IPsec PDUsPascal Quantin1-3/+2
svn path=/trunk/; revision=50022
2013-06-17More PDU export work:Pascal Quantin1-4/+29
- 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-20Make preparation to select which level tap is to be used.Anders Broman1-1/+1
svn path=/trunk/; revision=49446