diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2003-06-25 11:15:34 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2003-06-25 11:15:34 +0000 |
commit | 2c95c28f0ef214bf89ed98157d8b3062b03773e5 (patch) | |
tree | 29096c59be4d4c51369a0cc287f23086f8ff47ef /packet-fc.c | |
parent | 59433c81b7d130d76f186de5f4cbe5c15efddf68 (diff) | |
download | wireshark-2c95c28f0ef214bf89ed98157d8b3062b03773e5.tar.gz wireshark-2c95c28f0ef214bf89ed98157d8b3062b03773e5.tar.bz2 wireshark-2c95c28f0ef214bf89ed98157d8b3062b03773e5.zip |
Service Response Time measurements and statistics for Fibre Channel
svn path=/trunk/; revision=7932
Diffstat (limited to 'packet-fc.c')
-rw-r--r-- | packet-fc.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/packet-fc.c b/packet-fc.c index d369c63ed3..463b532a70 100644 --- a/packet-fc.c +++ b/packet-fc.c @@ -4,7 +4,7 @@ * Copyright 2003 Ronnie Sahlberg, exchange first/last matching and * tap listener and misc updates * - * $Id: packet-fc.c,v 1.10 2003/06/25 10:21:44 sahlberg Exp $ + * $Id: packet-fc.c,v 1.11 2003/06/25 11:15:33 sahlberg Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -688,7 +688,7 @@ dissect_fc (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint8 ftype; gboolean is_ack; - fc_hdr fchdr; + static fc_hdr fchdr; fc_exchange_data *fc_ex=NULL; fchdr.fced=NULL; @@ -749,6 +749,7 @@ dissect_fc (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if(fchdr.fctl&FC_FCTL_EXCHANGE_FIRST){ if(!pinfo->fd->flags.visited){ fc_exchange_data fced, *old_fced; + /* first check if we already have seen this exchange and it is still open/unmatched. */ @@ -763,19 +764,18 @@ dissect_fc (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) old_fced->oxid=fchdr.oxid; old_fced->s_id=fchdr.s_id; old_fced->d_id=fchdr.d_id; -old_fced->first_exchange_frame=pinfo->fd->num; + old_fced->first_exchange_frame=pinfo->fd->num; old_fced->fc_time.nsecs = pinfo->fd->abs_usecs*1000; old_fced->fc_time.secs = pinfo->fd->abs_secs; g_hash_table_insert(fc_exchange_unmatched, old_fced, old_fced); + fc_ex=old_fced; } else { fc_exchange_data fced, *old_fced; fced.oxid=fchdr.oxid; fced.first_exchange_frame=pinfo->fd->num; fced.last_exchange_frame=0; old_fced=g_hash_table_lookup(fc_exchange_matched, &fced); - if(old_fced){ - fc_ex=old_fced; - } + fc_ex=old_fced; } } if(fchdr.fctl&FC_FCTL_EXCHANGE_LAST){ @@ -791,15 +791,14 @@ old_fced->first_exchange_frame=pinfo->fd->num; old_fced->last_exchange_frame=pinfo->fd->num; g_hash_table_insert(fc_exchange_matched, old_fced, old_fced); } + fc_ex=old_fced; } else { fc_exchange_data fced, *old_fced; fced.oxid=fchdr.oxid; fced.first_exchange_frame=0; fced.last_exchange_frame=pinfo->fd->num; old_fced=g_hash_table_lookup(fc_exchange_matched, &fced); - if(old_fced){ - fc_ex=old_fced; - } + fc_ex=old_fced; } } if(fc_ex){ |