diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 2000-03-20 21:21:33 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 2000-03-20 21:21:33 +0000 |
commit | 4a668c0a5aaf8a3def295caf314d133ce2931246 (patch) | |
tree | 97cd1b7a257f25552a94d43b0680dc98ea9b54a2 /packet-eth.c | |
parent | 41b76f720907a2f060e4de1afa601856d5d07334 (diff) |
Added Jeff Foster's patch to add an eth.addr field.
svn path=/trunk/; revision=1730
Diffstat (limited to 'packet-eth.c')
-rw-r--r-- | packet-eth.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/packet-eth.c b/packet-eth.c index 15230e6619..ed570090b0 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.30 2000/03/12 04:47:37 gram Exp $ + * $Id: packet-eth.c,v 1.31 2000/03/20 21:21:33 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -47,6 +47,7 @@ static int hf_eth_dst = -1; static int hf_eth_src = -1; static int hf_eth_len = -1; static int hf_eth_type = -1; +static int hf_eth_addr = -1; static gint ett_ieee8023 = -1; static gint ett_ether2 = -1; @@ -198,6 +199,11 @@ dissect_eth(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) proto_tree_add_item(fh_tree, hf_eth_dst, offset+0, 6, &pd[offset+0]); proto_tree_add_item(fh_tree, hf_eth_src, offset+6, 6, &pd[offset+6]); + +/* add items for eth.addr filter */ + proto_tree_add_item_hidden(fh_tree, hf_eth_addr, offset + 0, 6, &pd[offset+0]); + proto_tree_add_item_hidden(fh_tree, hf_eth_addr, offset + 6, 6, &pd[offset+6]); + proto_tree_add_item(fh_tree, hf_eth_len, offset+12, 2, length); } @@ -224,6 +230,9 @@ dissect_eth(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) proto_tree_add_item(fh_tree, hf_eth_dst, offset+0, 6, &pd[offset+0]); proto_tree_add_item(fh_tree, hf_eth_src, offset+6, 6, &pd[offset+6]); +/* add items for eth.addr filter */ + proto_tree_add_item_hidden(fh_tree, hf_eth_addr, offset + 0, 6, &pd[offset+0]); + proto_tree_add_item_hidden(fh_tree, hf_eth_addr, offset + 6, 6, &pd[offset+6]); } } offset += ETH_HEADER_SIZE; @@ -261,7 +270,11 @@ proto_register_eth(void) /* registered here but handled in ethertype.c */ { &hf_eth_type, { "Type", "eth.type", FT_UINT16, BASE_HEX, VALS(etype_vals), 0x0, - "" }} + "" }}, + { &hf_eth_addr, + { "Source or Destination Address", "eth.addr", FT_ETHER, BASE_NONE, NULL, 0x0, + "Source or Destination Hardware Address" }} + }; static gint *ett[] = { &ett_ieee8023, |