aboutsummaryrefslogtreecommitdiffstats
path: root/packet-tr.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2003-08-23 09:09:35 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2003-08-23 09:09:35 +0000
commitba74395cbe82f5fee8967247e5ea72f6918be845 (patch)
tree56aae2194ef5f2c2ef809bb5272ec76f57a8da32 /packet-tr.c
parentfb0480ae436b31994ee8a2213a78252055f8832a (diff)
New feature. Statistics/EndpointTalkjers can now present a sortable table with a list of all seen conversations of a certain type.
Supported types are Ethernet/TokenRing/IP/UDP and TCP. Will add FibreChannel soon. The framework for this feature needs to be enhanced in the future so that by selecting one entry and click the right mousebutton, this will bring up a menu with Prepare/Match options with suboptions for AnyDirection, ForwardOnly or ReverseOnly which updates the display filter accordingly. Had to update some of the taps as well to change them to use a proper address structure for the address fields. We should now be able to to these stats correctly even for ip tunneled over ip tunnelled over ip ... svn path=/trunk/; revision=8222
Diffstat (limited to 'packet-tr.c')
-rw-r--r--packet-tr.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/packet-tr.c b/packet-tr.c
index 3e3396b7a0..cf63cb3a52 100644
--- a/packet-tr.c
+++ b/packet-tr.c
@@ -2,7 +2,7 @@
* Routines for Token-Ring packet disassembly
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-tr.c,v 1.76 2003/02/08 05:31:05 guy Exp $
+ * $Id: packet-tr.c,v 1.77 2003/08/23 09:09:33 sahlberg Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -374,10 +374,10 @@ dissect_tr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Get the data */
trh->fc = tvb_get_guint8(tr_tvb, 1);
- tvb_memcpy(tr_tvb, trh->dst, 2, 6);
- tvb_memcpy(tr_tvb, trh->src, 8, 6);
+ SET_ADDRESS(&trh->src, AT_ETHER, 6, tvb_get_ptr(tr_tvb, 8, 6));
+ SET_ADDRESS(&trh->dst, AT_ETHER, 6, tvb_get_ptr(tr_tvb, 2, 6));
- memcpy(trn_shost_nonsr, trh->src, 6);
+ memcpy(trn_shost_nonsr, trh->src.data, 6);
trn_shost_nonsr[0] &= 127;
frame_type = (trh->fc & 192) >> 6;
@@ -386,7 +386,7 @@ dissect_tr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* if the high bit on the first byte of src hwaddr is 1, then
this packet is source-routed */
- source_routed = trh->src[0] & 128;
+ source_routed = trh->src.data[0] & 128;
trn_rif_bytes = tvb_get_guint8(tr_tvb, 14) & 31;
@@ -492,8 +492,8 @@ dissect_tr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
just making "trn_shost_nonsr" static? */
SET_ADDRESS(&pinfo->dl_src, AT_ETHER, 6, trn_shost_nonsr);
SET_ADDRESS(&pinfo->src, AT_ETHER, 6, trn_shost_nonsr);
- SET_ADDRESS(&pinfo->dl_dst, AT_ETHER, 6, trh->dst);
- SET_ADDRESS(&pinfo->dst, AT_ETHER, 6, trh->dst);
+ SET_ADDRESS(&pinfo->dl_dst, AT_ETHER, 6, trh->dst.data);
+ SET_ADDRESS(&pinfo->dst, AT_ETHER, 6, trh->dst.data);
/* protocol analysis tree */
if (tree) {
@@ -517,10 +517,10 @@ dissect_tr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_uint(bf_tree, hf_tr_fc_type, tr_tvb, 1, 1, trh->fc);
proto_tree_add_uint(bf_tree, hf_tr_fc_pcf, tr_tvb, 1, 1, trh->fc);
- proto_tree_add_ether(tr_tree, hf_tr_dst, tr_tvb, 2, 6, trh->dst);
- proto_tree_add_ether(tr_tree, hf_tr_src, tr_tvb, 8, 6, trh->src);
- proto_tree_add_ether_hidden(tr_tree, hf_tr_addr, tr_tvb, 2, 6, trh->dst);
- proto_tree_add_ether_hidden(tr_tree, hf_tr_addr, tr_tvb, 8, 6, trh->src);
+ proto_tree_add_ether(tr_tree, hf_tr_dst, tr_tvb, 2, 6, trh->dst.data);
+ proto_tree_add_ether(tr_tree, hf_tr_src, tr_tvb, 8, 6, trh->src.data);
+ proto_tree_add_ether_hidden(tr_tree, hf_tr_addr, tr_tvb, 2, 6, trh->dst.data);
+ proto_tree_add_ether_hidden(tr_tree, hf_tr_addr, tr_tvb, 8, 6, trh->src.data);
proto_tree_add_boolean(tr_tree, hf_tr_sr, tr_tvb, 8, 1, source_routed);