diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-08-18 18:39:43 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-08-19 01:42:06 +0000 |
commit | 95c4c432c43a07d8a43eae33591616145cabc57a (patch) | |
tree | 3954bb1fad7d06ea0299dd8044ba373900dc9965 /wiretap/wtap.h | |
parent | 2a4d6f1b3caccc015a1d18ea3267233a5503c703 (diff) | |
download | wireshark-95c4c432c43a07d8a43eae33591616145cabc57a.tar.gz |
Handle the new LINKTYPE_CAN_SOCKETCAN_HOSTENDIAN.
Unfortunately, only one libpcap code path puts the CAN ID in the
SocketCAN header in network byte order; the others leave it in host byte
order. Therefore, a new LINKTYPE_/DLT_ value was introduced, and
libpcap was changed to use that for the cases where the CAN ID is in
host byte order. Support them both.
This means we need to, when reading pcap and pcapng files, fix up the
CAN ID if the host that wrote the file has a different byte order from
ours (as libpcap also now does). This includes Linux "cooked" captures,
which can include CAN packets.
Change-Id: I75ff2d68d1fbdb42753ce85d18f04166f21736dd
Reviewed-on: https://code.wireshark.org/review/17155
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/wtap.h')
-rw-r--r-- | wiretap/wtap.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/wiretap/wtap.h b/wiretap/wtap.h index 20a3b188f3..fc73ebe5c9 100644 --- a/wiretap/wtap.h +++ b/wiretap/wtap.h @@ -212,7 +212,7 @@ extern "C" { #define WTAP_ENCAP_FIBRE_CHANNEL_FC2_WITH_FRAME_DELIMS 122 #define WTAP_ENCAP_JPEG_JFIF 123 /* obsoleted by WTAP_ENCAP_MIME*/ #define WTAP_ENCAP_IPNET 124 -#define WTAP_ENCAP_SOCKETCAN 125 +#define WTAP_ENCAP_SOCKETCAN_BIGENDIAN 125 #define WTAP_ENCAP_IEEE_802_11_NETMON 126 #define WTAP_ENCAP_IEEE802_15_4_NOFCS 127 #define WTAP_ENCAP_RAW_IPFIX 128 @@ -269,6 +269,7 @@ extern "C" { #define WTAP_ENCAP_GFP_F 179 #define WTAP_ENCAP_IP_OVER_IB_PCAP 180 #define WTAP_ENCAP_JUNIPER_VN 181 +#define WTAP_ENCAP_SOCKETCAN_HOSTENDIAN 182 /* After adding new item here, please also add new item to encap_table_base array */ #define WTAP_NUM_ENCAP_TYPES wtap_get_num_encap_types() |