Wireshark-commits: [Wireshark-commits] master-2.2 bc1cc26: Handle the new LINKTYPE_CAN_SOCKETCAN_HO

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Fri, 19 Aug 2016 01:43:09 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=bc1cc2685f1f0b4a30b9c82e0227d0b087ff672f
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master-2.2
Repository: wireshark

Commits:

bc1cc26 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>
    (cherry picked from commit 95c4c432c43a07d8a43eae33591616145cabc57a)
    Reviewed-on: https://code.wireshark.org/review/17156
    

Actions performed:

    from  c9b37bb   fix endianess of rejoin source address
    adds  bc1cc26   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(-)