Commit Graph

11 Commits

Author SHA1 Message Date
Jaap Keuter ca7ac05cf0 Fix some source headers, reformat SPDX license lines in comment block.
Change-Id: Ibae6a64a9915003435a3fb17763535a3844143be
Reviewed-on: https://code.wireshark.org/review/25891
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-18 22:50:37 +00:00
Guy Harris 1f5f63f8ef Generalize wtap_pkthdr into a structure for packet and non-packet records.
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>
2018-02-09 00:29:51 +00:00
Dario Lombardo 8cd389e161 replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.
The first is deprecated, as per https://spdx.org/licenses/.

Change-Id: I8e21e1d32d09b8b94b93a2dc9fbdde5ffeba6bed
Reviewed-on: https://code.wireshark.org/review/25661
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-08 14:57:36 +00:00
Dario Lombardo 9e3e02f5e5 wiretap: more SPDX license convertions.
Change-Id: I12695d0713b1d7fe58f09b2037303fab523085e9
Reviewed-on: https://code.wireshark.org/review/25394
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-01-20 17:17:58 +00:00
Alexis La Goutte cad076a820 mplog: fix 'err_info' was marked unused but was used [-Werror,-Wused-but-marked-unused]
Change-Id: Ifbbd9d264c7d75b6df754ca9834de5e415b97796
Reviewed-on: https://code.wireshark.org/review/15080
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-04-25 10:45:16 +00:00
Guy Harris 61677f9c3f Call the buffer for the magic number "magic".
It's not guaranteed to be a C string, so don't call it "str".

Change-Id: I614ccf4f87b9f6f58d9b72596827224006f1de30
Reviewed-on: https://code.wireshark.org/review/14998
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-04-19 01:31:03 +00:00
Guy Harris 378bdbfb3f Distinguish between read errors and short reads when opening.
Use wtap_read_bytes() which will return WTAP_ERR_SHORT_READ if we don't
get the specified number of bytes.  Treat all errors *other* than
WTAP_ERR_SHORT_READ as an I/O error.

Change-Id: If38b5ad1b142441f2f2dd356be196bf381058da4
Reviewed-on: https://code.wireshark.org/review/14997
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-04-19 01:28:17 +00:00
Guy Harris b13d9b6474 Open routines are called with the seek pointer at the beginning.
There's no need for an open routine to seek back to the beginning of the
file - the file open code has done that already.

Change-Id: I4053474e60e7c8e8f59a89503d4bb08499d9399e
Reviewed-on: https://code.wireshark.org/review/14996
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-04-19 01:23:20 +00:00
Guy Harris b6784594f5 Detect and handle EOFs in the middle of a packet.
And *any* EOFs in the seek-read routine.

Change-Id: I5742c7bbd782e59e9c64e4821f22c706ddbc5382
Reviewed-on: https://code.wireshark.org/review/14995
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-04-19 01:19:21 +00:00
Guy Harris c943afbdac Use memcmp() to check the magic number.
We just care whether the first 6 bytes of the file are "MPCSII";
memcmp() will do that, and we don't have to worry about NULs.

Change-Id: I03872c30e76eedce67577657270e36f0795e74bd
Reviewed-on: https://code.wireshark.org/review/14994
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-04-19 01:06:18 +00:00
Martin Kaiser fb39f102b9 wiretap: add support for the mplog capture file format
the mplog format is used by some commercial logging tools that capture
ISO 14443 traffic between a card reader and a contactless smartcard

Change-Id: If359b8f0f671eb2a7c6315e2b8960a5bd581a9e9
Reviewed-on: https://code.wireshark.org/review/14950
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2016-04-18 09:39:42 +00:00