diff options
author | Guy Harris <guy@alum.mit.edu> | 2020-05-08 18:20:03 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2020-05-09 03:14:50 +0000 |
commit | 7e7db3e91ce50f1f3ba35f88aff83c66b5f9bf97 (patch) | |
tree | ddeaf077db64366f56d97c3579ee8ed451a7e3c1 /epan/dissectors/packet-pa-hbbackup.c | |
parent | 2480d9b69a9f416a6a3836def1479c66fec8d7b9 (diff) |
sll: add support for LINKTYPE_LINUX_SLL2.
Different header, with a different size, an additional field, and with
fields being in a different order.
Distinguish between V1 and V2 by giving the version.
That means we can no longer use the "ethertype" dissector as it stands,
because the packet type field isn't at the end of the header, right
before the payload; pull the "add the type field to the protocol tree"
functionality out of the "ethertype" dissector and leave it up to the
dissector calling it.
Change-Id: I72b8a2483c0a539919fbe5d35fd7e60bff4bf75a
Reviewed-on: https://code.wireshark.org/review/37169
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
Diffstat (limited to 'epan/dissectors/packet-pa-hbbackup.c')
-rw-r--r-- | epan/dissectors/packet-pa-hbbackup.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/epan/dissectors/packet-pa-hbbackup.c b/epan/dissectors/packet-pa-hbbackup.c index 7fa92f81aa..d217011488 100644 --- a/epan/dissectors/packet-pa-hbbackup.c +++ b/epan/dissectors/packet-pa-hbbackup.c @@ -56,12 +56,13 @@ dissect_hbbak(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U proto_tree_add_item(hbbak_tree, hf_hbbak_unknown1, tvb, offset, 6, ENC_NA); offset += 6; eth_type_outer = tvb_get_ntohs(tvb, offset); - // offset += 2; + proto_tree_add_uint(hbbak_tree, hf_hbbak_etype_outer, tvb, + offset, 2, eth_type_outer); + offset += 2; ethertype_data.etype = eth_type_outer; - ethertype_data.offset_after_ethertype = HBBAK_SIZE; + ethertype_data.payload_offset = HBBAK_SIZE; ethertype_data.fh_tree = hbbak_tree; - ethertype_data.etype_id = hf_hbbak_etype_outer; ethertype_data.trailer_id = hf_hbbak_trailer; ethertype_data.fcs_len = 0; |