aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-pcap_pktdata.c
AgeCommit message (Collapse)AuthorFilesLines
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>
2018-02-09pcap: Update link_type_valsStig Bjørlykke1-0/+8
Change-Id: I7d26883344f908f86bf7b2b4beb359db014fb28b Reviewed-on: https://code.wireshark.org/review/25705 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-02-09Generalize wtap_pkthdr into a structure for packet and non-packet records.Guy Harris1-6/+6
Separate the stuff that any record could have from the stuff that only particular record types have; put the latter into a union, and put all that into a wtap_rec structure. Add some record-type checks as necessary. Change-Id: Id6b3486858f826fce4b096c59231f463e44bfaa2 Reviewed-on: https://code.wireshark.org/review/25696 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-19PCAP PKTDATA: Fix Dead Store (Dead assignement/Dead increment) Warning found ↵Alexis La Goutte1-2/+0
by Clang Change-Id: Ia6e14bc1cc93645317c10b4e649f4839d802053a Reviewed-on: https://code.wireshark.org/review/13403 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-18Have the "maybe an FCS" version of the Ethernet dissector take a data argument.Guy Harris1-1/+20
It's called from some places other than packet-frame.c, at least one of which currently can't call anything else (the ATM dissector, for VC-multiplexed bridged frames, where you don't know whether the frames include the FCS or not), so the frame's pseudo-data doesn't necessarily have the appropriate "FCS length" value. Have it explicitly check the data argument, and explicitly pass the appropriate value to it. Ping-Bug: 9933 Change-Id: I0c75f921d25d1e2b75e476c15ff9625205036b25 Reviewed-on: https://code.wireshark.org/review/13382 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-16Add WTAP_ENCAP_NFC_LLCP to the list of types require a pseudo-header.Guy Harris1-4/+6
Discovered by changing wtap_encap_requires_phdr() to use a switch statement and comparing the case arms. Change-Id: I2a23b86ddfbc88c1b3251a0e97f7f00ee93f630e Reviewed-on: https://code.wireshark.org/review/13341 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-16Get rid of unused stuff.Guy Harris1-5/+0
Change-Id: Iad17e64de609d95d1e13c94ae13d1a4834786dd6 Reviewed-on: https://code.wireshark.org/review/13339 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-16Don't call dissectors that require a pseudo-header if we can't generate one.Guy Harris1-68/+100
It's not safe to pass a null data pointer to a link-layer header type dissector that expects the data pointer to point to a pseudo-header. Also, remove one extra layer of protocol tree. Change-Id: I030d38fd7d2f99d471020227597e4d7d81506e3e Reviewed-on: https://code.wireshark.org/review/13336 Reviewed-by: Guy Harris <guy@alum.mit.edu>
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-23Pcap (pktdata): fix no previous prototype for ... [-Wmissing-prototypes]Alexis La Goutte1-0/+3
no previous prototype for 'proto_register_pcap_pktdata' [-Wmissing-prototypes] no previous prototype for 'proto_reg_handoff_pcap_pktdata' [-Wmissing-prototypes] Change-Id: Id9c89b7217b4f0a0d1e1ca186ccfd8dfe1bcd2d9 Reviewed-on: https://code.wireshark.org/review/12067 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-21Have a separate dissector for pcap/pcapng-format packet data.Guy Harris1-0/+372
Put that dissector into its own file, and get handles for it from the pcap and pcapng file dissectors. Put the value_string of pcap/pcapng LINKTYPE_ values there, and have the pcap and pcapng file dissectors import it. Expand that table to include all LINKTYPE_ values in the current libpcap. Change-Id: I9397035efa5711e8a18a26e056d3b54494fd3148 Reviewed-on: https://code.wireshark.org/review/12000 Reviewed-by: Guy Harris <guy@alum.mit.edu>