aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-atm.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-01-20 01:46:34 -0800
committerGuy Harris <guy@alum.mit.edu>2016-01-20 09:57:29 +0000
commiteeff506f56c0f3a2e82d0007b7e0c5836be15a33 (patch)
treed3f1260a5c9c8bd90dff67182257df2e0444a7cd /epan/dissectors/packet-atm.c
parent47648e0528f091a6c7525d9d880f85a0a5fa42d0 (diff)
Separate "Ethernet in capture file" and "Ethernet maybe with FCS" dissectors.
Have a dissector that is passed a "struct eth_phdr" pointer, indicating whether there is an FCS, there is no FCS, or there's maybe an FCS, and an "eth_maybefcs" dissector, to be called from other dissectors. The latter takes no data argument. That obviates the need for callers of the latter to fill in an "eth_phdr" structure. Note in a comment that setting the "assume an FCS" preference overrides a file format handler in Wiretap saying "we have no FCS". I seem to remember that this might be intentional. Ping-Bug: 9933 Change-Id: I600e1351d468ab31d48369edb96832d6da3e480c Reviewed-on: https://code.wireshark.org/review/13432 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-atm.c')
-rw-r--r--epan/dissectors/packet-atm.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/epan/dissectors/packet-atm.c b/epan/dissectors/packet-atm.c
index 57420f6c29..7634a7586b 100644
--- a/epan/dissectors/packet-atm.c
+++ b/epan/dissectors/packet-atm.c
@@ -145,7 +145,7 @@ static dissector_handle_t fr_handle;
static dissector_handle_t llc_handle;
static dissector_handle_t sscop_handle;
static dissector_handle_t ppp_handle;
-static dissector_handle_t eth_handle;
+static dissector_handle_t eth_maybefcs_handle;
static dissector_handle_t ip_handle;
static dissector_handle_t data_handle;
@@ -992,12 +992,9 @@ dissect_reassembled_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
* See RFC 2684 section 6.2 "VC Multiplexing of Bridged
* Protocols".
*/
- struct eth_phdr eth;
-
proto_tree_add_item(tree, hf_atm_padding, tvb, 0, 2, ENC_NA);
next_tvb = tvb_new_subset_remaining(tvb, 2);
- eth.fcs_len = -1; /* We don't know whether there's an FCS */
- call_dissector_with_data(eth_handle, next_tvb, pinfo, tree, &eth);
+ call_dissector(eth_maybefcs_handle, next_tvb, pinfo, tree);
decoded = TRUE;
}
else if (octet[2] == 0x03 && /* NLPID */
@@ -2018,7 +2015,7 @@ proto_reg_handoff_atm(void)
llc_handle = find_dissector("llc");
sscop_handle = find_dissector("sscop");
ppp_handle = find_dissector("ppp");
- eth_handle = find_dissector("eth");
+ eth_maybefcs_handle = find_dissector("eth_maybefcs");
ip_handle = find_dissector("ip");
data_handle = find_dissector("data");