aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-pktap.c
AgeCommit message (Collapse)AuthorFilesLines
2022-02-15Tools: Fix fix-encoding-args.pl ASCII string validationJoão Valverde1-1/+1
Do not require a useless ENC_NA parameter for string encodings. FT_STRING and FT_STRINGZ types don't have any ndianness. Follow-up to 6ec429622c9258eefd388caf21ce92ab5b9f54b4.
2021-12-19Fix errors found by fix-encoding-args.plJoão Valverde1-2/+2
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-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-18The header is host-endian, not little-endian. Note that.Guy Harris1-8/+18
Change-Id: I7fc2874026430c3d7e8633c48ee0558ad69d5c9a Reviewed-on: https://code.wireshark.org/review/24480 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-10-28Implement registration of capture dissectors by nameJoão Valverde1-3/+9
Mirror it after protocol dissector API. Change-Id: I7985bcfa9e07654c7cf005efec94efc205d7a304 Reviewed-on: https://code.wireshark.org/review/18496 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-20Manually add protocol dependencies derived from find_dissector.Michael Mann1-1/+1
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-01-16Have the pcap_pktdata dissector dissect the payload.Guy Harris1-8/+5
That lets us handle pseudo-headers derived from packet data in one central place. Change-Id: Ie8e1d2d7dac176ea45be08cdc49bd808d9f8cc5b Reviewed-on: https://code.wireshark.org/review/13340 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-16Don't export wtap_encap_dissector_table from packet-frame.c.Guy Harris1-2/+4
Dissectors that need it should fetch it with find_dissector_table("wtap_encap"). Change-Id: I4b12888f20182aa529274b934b81d36f7697e1a6 Reviewed-on: https://code.wireshark.org/review/13323 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-17Create capture dissector "info" structure (capture_packet_info_t)Michael Mann1-2/+2
While it currently only contains packet_counts, it will hopefully stabilize the capture function signature if more fields are added. Change-Id: I003552c58043c7c2d67aec458187b12b233057e2 Reviewed-on: https://code.wireshark.org/review/12690 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-12-14Create capture dissector tables.Michael Mann1-21/+14
They are modeled after dissection dissector tables, but for the moment, don't have/need the flexibility. They are intended to be much simpler/faster than full dissection. The two most used/needed are "wtap_encap" and "ethertype", so they were the basis of starting to use and test capture dissector table API. Others may be added in the future. The "capture dissector" function signature needed a bit of tweeking to handling "claiming" of a packet. The current application of this is capture functions returning TRUE if they affected a "type" of packet count. Returning FALSE ends up considering the packet an "other" type. Change-Id: I81d06a6ccb2c03665f087258a46b9d78d513d6cd Reviewed-on: https://code.wireshark.org/review/12607 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-12-13Create a way to register "capture" dissectors.Michael Mann1-4/+11
Capture dissectors could be architected like dissection dissectors, with tables and subtables and possibly using tvbs to pass there data instead of raw byte arrays. This is a first step towards that by refactoring capture_info_packet() to work off of a "capture dissector table" Registering the capture dissection functions instead of calling them directly also clears up a bunch of dissector header files who sole purpose was providing the capture dissection function definition. Change-Id: I10e9b79e061f32d2572f009823601d4f048d37aa Reviewed-on: https://code.wireshark.org/review/12581 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-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-4/+5
Picking off "easy" dissectors that only have one or two exit points at most. This concludes a "first pass" over the dissector directory. Change-Id: If5ce5484214be50fe541cba478da1de62e354297 Reviewed-on: https://code.wireshark.org/review/11830 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
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-3/+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-09-26Fix Dead Store (Dead assignement/Dead increment) warning found by ClangAlexis La Goutte1-1/+1
Change-Id: Ia0f29a491af920415d6e56f30ef436544f7d5ddf Reviewed-on: https://code.wireshark.org/review/4303 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-09-25The length of the pktap header isn't fixed, it's a field in the header.Guy Harris1-1/+1
Don't assume that, once we've dissected the fields in the header we know about and skipped past them, that the payload follows immediately afterwards; use the header length from the header to find the payload. Bug: 10502 Change-Id: I645fe652240e0068d99cf00d19e3705615857d5b Reviewed-on: https://code.wireshark.org/review/4280 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-21Fix gcc "warning: no previous prototype ... [-Wmissing-prototypes]"; Do some ↵Bill Meier1-0/+3
whitespace changes Change-Id: I8c2e8694223270f1810aa6b13d955f0d08001d30 Reviewed-on: https://code.wireshark.org/review/1239 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
2014-04-03Add a capture_pktap() routine and use it.Guy Harris1-0/+1
That way, the packet counts are will be valid when capturing. Change-Id: I0a21cc817d918e7f849620db5ca6dfd84bd2cd87 Reviewed-on: https://code.wireshark.org/review/936 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-01Add a dissector for Apple's PKTAP headers.Guy Harris1-0/+300
It automatically works for LINKTYPE_PKTAP and, by default, for LINKTYPE_USER2; if any other dissector is specified for LINKTYPE_USER2, that dissector overrides PKTAP. Change-Id: Ic00ac8a81c6101e45d638d337aef42df3920da12 Reviewed-on: https://code.wireshark.org/review/903 Reviewed-by: Evan Huus <eapache@gmail.com>