diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 1999-08-24 06:10:05 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 1999-08-24 06:10:05 +0000 |
commit | ac455686539d6799b8ae261080ec3f4ef55ce555 (patch) | |
tree | f4959e3fd7ad8abeb08048ca3c565cca9c4a190d /packet-eth.c | |
parent | a8024a89c65f008dfd515b7e7db82df12ef90cf6 (diff) |
In the summary display for Ethernet frames, make the protocol Ethernet
and the info field an indication of whether it's Ethernet II, raw 802.3,
or (LLC-atop) 802.3 (which will be overridden by other protocols, if we
know the protocol inside the frame).
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@559 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-eth.c')
-rw-r--r-- | packet-eth.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/packet-eth.c b/packet-eth.c index ab53dc70b3..4f24e42d51 100644 --- a/packet-eth.c +++ b/packet-eth.c @@ -1,7 +1,7 @@ /* packet-eth.c * Routines for ethernet packet disassembly * - * $Id: packet-eth.c,v 1.17 1999/08/22 00:47:43 guy Exp $ + * $Id: packet-eth.c,v 1.18 1999/08/24 06:10:05 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -117,9 +117,7 @@ dissect_eth(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { if (check_col(fd, COL_UNRES_DL_SRC)) col_add_str(fd, COL_UNRES_DL_SRC, ether_to_str((u_char *)&pd[offset+6])); if (check_col(fd, COL_PROTOCOL)) - col_add_str(fd, COL_PROTOCOL, "N/A"); - if (check_col(fd, COL_INFO)) - col_add_str(fd, COL_INFO, "Ethernet II"); + col_add_str(fd, COL_PROTOCOL, "Ethernet"); etype = (pd[offset+12] << 8) | pd[offset+13]; @@ -127,12 +125,12 @@ dissect_eth(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { if (etype <= IEEE_802_3_MAX_LEN) { length = etype; - /* Is there an 802.2 layer? I can tell by looking at the first 2 - bytes after the 802.3 header. If they are 0xffff, then what - follows the 802.3 header is an IPX payload, meaning no 802.2. - (IPX/SPX is they only thing that can be contained inside a - straight 802.3 packet). A non-0xffff value means that there's an - 802.2 layer inside the 802.3 layer */ + /* Is there an 802.2 layer? I can tell by looking at the first 2 + bytes after the 802.3 header. If they are 0xffff, then what + follows the 802.3 header is an IPX payload, meaning no 802.2. + (IPX/SPX is they only thing that can be contained inside a + straight 802.3 packet). A non-0xffff value means that there's an + 802.2 layer inside the 802.3 layer */ if (pd[offset+14] == 0xff && pd[offset+15] == 0xff) { ethhdr_type = ETHERNET_802_3; } @@ -140,8 +138,10 @@ dissect_eth(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { ethhdr_type = ETHERNET_802_2; } - if (check_col(fd, COL_INFO)) - col_add_str(fd, COL_INFO, "802.3"); + if (check_col(fd, COL_INFO)) { + col_add_fstr(fd, COL_INFO, "IEEE 802.3 %s", + (ethhdr_type == ETHERNET_802_3 ? "Raw " : "")); + } if (tree) { ti = proto_tree_add_item_format(tree, proto_eth, 0, ETH_HEADER_SIZE, @@ -166,6 +166,8 @@ dissect_eth(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { } else { ethhdr_type = ETHERNET_II; + if (check_col(fd, COL_INFO)) + col_add_str(fd, COL_INFO, "Ethernet II"); if (tree) { ti = proto_tree_add_item_format(tree, proto_eth, 0, ETH_HEADER_SIZE, |