Wireshark-commits: [Wireshark-commits] master 95c4c43: Handle the new LINKTYPE_CAN_SOCKETCAN_HOSTEN
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=95c4c432c43a07d8a43eae33591616145cabc57a
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
95c4c43 by Guy Harris (guy@xxxxxxxxxxxx):
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@xxxxxxxxxxxx>
Actions performed:
from 2a4d6f1 fix endianess of rejoin source address
adds 95c4c43 Handle the new LINKTYPE_CAN_SOCKETCAN_HOSTENDIAN.
Summary of changes:
epan/dissectors/packet-socketcan.c | 49 ++++++++++++++---
wiretap/pcap-common.c | 107 +++++++++++++++++++++++++++++++++++-
wiretap/wtap.c | 7 ++-
wiretap/wtap.h | 3 +-
4 files changed, 152 insertions(+), 14 deletions(-)