+ }
+ ENDTRY;
+
+ if (check_col(pinfo->fd, COL_INFO)) {
+ col_add_fstr(pinfo->fd, COL_INFO, "IEEE 802.3 Ethernet %s",
+ (is_802_2 ? "" : "Raw "));
+ }
+ if (tree) {
+ ti = proto_tree_add_protocol_format(tree, proto_eth, tvb, 0, ETH_HEADER_SIZE,
+ "IEEE 802.3 Ethernet %s", (is_802_2 ? "" : "Raw "));
+
+ fh_tree = proto_item_add_subtree(ti, ett_ieee8023);
+
+ proto_tree_add_ether(fh_tree, hf_eth_dst, tvb, 0, 6, dst);
+ proto_tree_add_ether(fh_tree, hf_eth_src, tvb, 6, 6, src);
+
+/* add items for eth.addr filter */
+ proto_tree_add_ether_hidden(fh_tree, hf_eth_addr, tvb, 0, 6, dst);
+ proto_tree_add_ether_hidden(fh_tree, hf_eth_addr, tvb, 6, 6, src);
+ }
+
+ /* Convert the LLC length from the 802.3 header to a total
+ frame length, by adding in the size of any data that preceded
+ the Ethernet header, and adding in the Ethernet header size,
+ and set the payload and captured-payload lengths to the minima
+ of the total length and the frame lengths.
+
+ XXX - when all dissectors are tvbuffified we shouldn't have to
+ do this any more. */
+ length += eth_offset + ETH_HEADER_SIZE;
+ if (pinfo->len > length)
+ pinfo->len = length;
+ if (pinfo->captured_len > length)
+ pinfo->captured_len = length;
+
+ dissect_802_3(etype, is_802_2, tvb, ETH_HEADER_SIZE, pinfo, tree, fh_tree,
+ hf_eth_len, hf_eth_trailer);
+ } else {
+ if (check_col(pinfo->fd, COL_INFO))
+ col_set_str(pinfo->fd, COL_INFO, "Ethernet II");
+ if (tree) {
+ ti = proto_tree_add_protocol_format(tree, proto_eth, tvb, 0, ETH_HEADER_SIZE,
+ "Ethernet II");
+
+ fh_tree = proto_item_add_subtree(ti, ett_ether2);
+
+ proto_tree_add_ether(fh_tree, hf_eth_dst, tvb, 0, 6, dst);
+ proto_tree_add_ether(fh_tree, hf_eth_src, tvb, 6, 6, src);
+/* add items for eth.addr filter */
+ proto_tree_add_ether_hidden(fh_tree, hf_eth_addr, tvb, 0, 6, dst);
+ proto_tree_add_ether_hidden(fh_tree, hf_eth_addr, tvb, 6, 6, src);
+ }
+
+ ethertype(etype, tvb, ETH_HEADER_SIZE, pinfo, tree, fh_tree, hf_eth_type,
+ hf_eth_trailer);
+ }