aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-fcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-fcp.c')
-rw-r--r--epan/dissectors/packet-fcp.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/epan/dissectors/packet-fcp.c b/epan/dissectors/packet-fcp.c
index f84a1474b3..df9604901d 100644
--- a/epan/dissectors/packet-fcp.c
+++ b/epan/dissectors/packet-fcp.c
@@ -84,8 +84,7 @@ typedef struct _fcp_conv_key {
typedef struct _fcp_conv_data {
guint32 fcp_dl;
gint32 fcp_lun;
- guint32 abs_secs;
- guint32 abs_usecs;
+ nstime_t abs_ts;
} fcp_conv_data_t;
GHashTable *fcp_req_hash = NULL;
@@ -276,8 +275,7 @@ dissect_fcp_cmnd (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* req.
*/
cdata->fcp_dl = tvb_get_ntohl (tvb, offset+12+16+add_len);
- cdata->abs_usecs = pinfo->fd->abs_usecs;
- cdata->abs_secs = pinfo->fd->abs_secs;
+ cdata->abs_ts = pinfo->fd->abs_ts;
}
else {
req_key = se_alloc (sizeof(fcp_conv_key_t));
@@ -285,8 +283,7 @@ dissect_fcp_cmnd (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
cdata = se_alloc (sizeof(fcp_conv_data_t));
cdata->fcp_dl = tvb_get_ntohl (tvb, offset+12+16+add_len);
- cdata->abs_usecs = pinfo->fd->abs_usecs;
- cdata->abs_secs = pinfo->fd->abs_secs;
+ cdata->abs_ts = pinfo->fd->abs_ts;
g_hash_table_insert (fcp_req_hash, req_key, cdata);
}
@@ -434,8 +431,9 @@ dissect_fcp_rsp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_uint_hidden (fcp_tree, hf_fcp_type, tvb, offset, 0, 0);
if (cdata) {
- del_usecs = (pinfo->fd->abs_secs - cdata->abs_secs)* 1000000 +
- (pinfo->fd->abs_usecs - cdata->abs_usecs);
+ /* XXX - this is ugly and should be replaced by a "standard way" */
+ del_usecs = (pinfo->fd->abs_ts.secs - cdata->abs_ts.secs)* 1000000 +
+ (pinfo->fd->abs_ts.nsecs - cdata->abs_ts.nsecs) / 1000;
if (del_usecs > 1000)
proto_tree_add_text (fcp_tree, tvb, offset, 0,
"Cmd Response Time: %d msecs",
@@ -538,8 +536,9 @@ dissect_fcp_xfer_rdy (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_uint_hidden (fcp_tree, hf_fcp_type, tvb, offset, 0, 0);
if (cdata) {
- del_usecs = (pinfo->fd->abs_secs - cdata->abs_secs)* 1000000 +
- (pinfo->fd->abs_usecs - cdata->abs_usecs);
+ /* XXX - this is ugly and should be replaced by a "standard way" */
+ del_usecs = (pinfo->fd->abs_ts.secs - cdata->abs_ts.secs)* 1000000 +
+ (pinfo->fd->abs_ts.nsecs - cdata->abs_ts.nsecs) / 1000;
if (del_usecs > 1000)
proto_tree_add_text (fcp_tree, tvb, offset, 0,
"Cmd Response Time: %d msecs",