aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/mplog.c
AgeCommit message (Collapse)AuthorFilesLines
2016-04-25mplog: fix 'err_info' was marked unused but was used ↵Alexis La Goutte1-1/+1
[-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-19Call the buffer for the magic number "magic".Guy Harris1-3/+3
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-19Distinguish between read errors and short reads when opening.Guy Harris1-2/+5
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-19Open routines are called with the seek pointer at the beginning.Guy Harris1-4/+0
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-19Detect and handle EOFs in the middle of a packet.Guy Harris1-2/+15
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-19Use memcmp() to check the magic number.Guy Harris1-2/+2
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-18wiretap: add support for the mplog capture file formatMartin Kaiser1-0/+256
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>