Keep track of and display the time between Call and Reply in NCP packets.
svn path=/trunk/; revision=6968
This commit is contained in:
parent
87c67ddce1
commit
b8fd3cc391
|
@ -24,7 +24,7 @@ http://developer.novell.com/ndk/doc/docui/index.htm#../ncp/ncp__enu/data/
|
|||
for a badly-formatted HTML version of the same PDF.
|
||||
|
||||
|
||||
$Id: ncp2222.py,v 1.41 2003/01/06 02:10:54 guy Exp $
|
||||
$Id: ncp2222.py,v 1.42 2003/01/22 00:45:29 sahlberg Exp $
|
||||
|
||||
|
||||
Copyright (c) 2000-2002 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
|
@ -5545,6 +5545,7 @@ static int hf_ncp_fragment_handle = -1;
|
|||
static int hf_ncp_completion_code = -1;
|
||||
static int hf_ncp_connection_status = -1;
|
||||
static int hf_ncp_req_frame_num = -1;
|
||||
static int hf_ncp_req_frame_time = -1;
|
||||
static int hf_ncp_fragment_size = -1;
|
||||
static int hf_ncp_message_size = -1;
|
||||
static int hf_ncp_nds_flag = -1;
|
||||
|
@ -6420,6 +6421,10 @@ proto_register_ncp2222(void)
|
|||
{ "Response to Request in Frame Number", "ncp.req_frame_num", FT_UINT32, BASE_DEC,
|
||||
NULL, 0x0, "", HFILL }},
|
||||
|
||||
{ &hf_ncp_req_frame_time,
|
||||
{ "Time from Request", "ncp.time", FT_RELATIVE_TIME, BASE_NONE,
|
||||
NULL, 0x0, "Time between request and response in seconds", HFILL }},
|
||||
|
||||
{ &hf_nds_flags,
|
||||
{ "NDS Return Flags", "ncp.nds_flags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
* Modified to decode NDS packets by Greg Morris <gmorris@novell.com>
|
||||
*
|
||||
* $Id: packet-ncp2222.inc,v 1.48 2003/01/06 02:13:01 guy Exp $
|
||||
* $Id: packet-ncp2222.inc,v 1.49 2003/01/22 00:45:30 sahlberg Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -558,6 +558,7 @@ typedef struct {
|
|||
const ncp_record *ncp_rec;
|
||||
gboolean *req_cond_results;
|
||||
guint32 req_frame_num;
|
||||
nstime_t req_frame_time;
|
||||
guint32 req_nds_flags;
|
||||
guint8 nds_request_verb;
|
||||
guint8 nds_version;
|
||||
|
@ -4045,6 +4046,8 @@ dissect_ncp_request(tvbuff_t *tvb, packet_info *pinfo,
|
|||
}
|
||||
request_value = ncp_hash_insert(conversation, sequence, ncp_rec);
|
||||
request_value->req_frame_num = pinfo->fd->num;
|
||||
request_value->req_frame_time.secs=pinfo->fd->abs_secs;
|
||||
request_value->req_frame_time.nsecs=pinfo->fd->abs_usecs*1000;
|
||||
|
||||
/* If this is the first time we're examining the packet,
|
||||
* check to see if this NCP type uses a "request condition".
|
||||
|
@ -4371,8 +4374,18 @@ dissect_ncp_reply(tvbuff_t *tvb, packet_info *pinfo,
|
|||
|
||||
if (ncp_tree) {
|
||||
if (request_value) {
|
||||
nstime_t ns;
|
||||
|
||||
proto_tree_add_uint(ncp_tree, hf_ncp_req_frame_num, tvb, 0, 0,
|
||||
request_value->req_frame_num);
|
||||
ns.secs=pinfo->fd->abs_secs-request_value->req_frame_time.secs;
|
||||
ns.nsecs=pinfo->fd->abs_usecs*1000-request_value->req_frame_time.nsecs;
|
||||
if(ns.nsecs<0){
|
||||
ns.nsecs+=1000000000;
|
||||
ns.secs--;
|
||||
}
|
||||
proto_tree_add_time(ncp_tree, hf_ncp_req_frame_time, tvb, 0, 0, &ns);
|
||||
|
||||
}
|
||||
|
||||
/* Put the func (and maybe subfunc) from the request packet
|
||||
|
@ -7722,6 +7735,8 @@ dissect_nds_request(tvbuff_t *tvb, packet_info *pinfo,
|
|||
|
||||
request_value = ncp_hash_insert(conversation, sequence, ncp_rec);
|
||||
request_value->req_frame_num = pinfo->fd->num;
|
||||
request_value->req_frame_time.secs=pinfo->fd->abs_secs;
|
||||
request_value->req_frame_time.nsecs=pinfo->fd->abs_usecs*1000;
|
||||
|
||||
/* If this is the first time we're examining the packet,
|
||||
* check to see if this NCP type uses a "request condition".
|
||||
|
@ -7977,6 +7992,8 @@ dissect_ping_req(tvbuff_t *tvb, packet_info *pinfo,
|
|||
|
||||
request_value = ncp_hash_insert(conversation, sequence, ncp_rec);
|
||||
request_value->req_frame_num = pinfo->fd->num;
|
||||
request_value->req_frame_time.secs=pinfo->fd->abs_secs;
|
||||
request_value->req_frame_time.nsecs=pinfo->fd->abs_usecs*1000;
|
||||
|
||||
/* If this is the first time we're examining the packet,
|
||||
* check to see if this NCP type uses a "request condition".
|
||||
|
|
Loading…
Reference in New Issue