pcapng: fix the magic when bytes are swapped.

This value is used when checking if the file was generated on a
machine with different endianess. The error message changes from

"Unrecognized pcapng format or not pcapng data."

to

"dumpcap: Interface 0 is big endian but we're little endian."

Fix dumpcap.c and pcapio.c.

Ping-Bug: 15754
Change-Id: I3a31f873f01bcb3f1324410e70f29f285e56c715
Reviewed-on: https://code.wireshark.org/review/33274
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
This commit is contained in:
Dario Lombardo 2019-05-20 15:31:59 +02:00 committed by Peter Wu
parent 6cfc25c40e
commit 3e53ec5e11
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@
#include "ws_symbol_export.h"
#define PCAPNG_MAGIC 0x1A2B3C4D
#define PCAPNG_SWAPPED_MAGIC 0xD4C3B2A1
#define PCAPNG_SWAPPED_MAGIC 0x4D3C2B1A
#define PCAPNG_MAJOR_VERSION 1
#define PCAPNG_MINOR_VERSION 0

View File

@ -87,7 +87,7 @@ struct pcaprec_hdr {
* PCAPNG_SWAPPED_MAGIC is a byte-swapped version of that.
*/
#define PCAPNG_MAGIC 0x1A2B3C4D
#define PCAPNG_SWAPPED_MAGIC 0xD4C3B2A1
#define PCAPNG_SWAPPED_MAGIC 0x4D3C2B1A
/* Currently we are only supporting the initial version of
the file format. */