diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2005-06-29 08:03:06 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2005-06-29 08:03:06 +0000 |
commit | 2cecaba9709a2bdbac3f5da48fb6c1d2e1cd81bc (patch) | |
tree | d52c6e196b53a24e2391bf38acee0df0887033fa /epan/dissectors/packet-dcerpc.c | |
parent | 226c5a56abbad3209589cd8fc65e413ab68ce215 (diff) |
add references to the corresponding request of datagram ping and ack packets
svn path=/trunk/; revision=14815
Diffstat (limited to 'epan/dissectors/packet-dcerpc.c')
-rw-r--r-- | epan/dissectors/packet-dcerpc.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/epan/dissectors/packet-dcerpc.c b/epan/dissectors/packet-dcerpc.c index 0dfa141cd9..085302fb0a 100644 --- a/epan/dissectors/packet-dcerpc.c +++ b/epan/dissectors/packet-dcerpc.c @@ -4551,6 +4551,42 @@ dissect_dcerpc_dg_resp (tvbuff_t *tvb, int offset, packet_info *pinfo, dissect_dcerpc_dg_stub (tvb, offset, pinfo, dcerpc_tree, tree, hdr, di); } +static void +dissect_dcerpc_dg_ping_ack (tvbuff_t *tvb, int offset, packet_info *pinfo, + proto_tree *dcerpc_tree, proto_tree *tree, + e_dce_dg_common_hdr_t *hdr, conversation_t *conv) +{ +/* if(!(pinfo->fd->flags.visited)){*/ + dcerpc_call_value *call_value; + dcerpc_dg_call_key call_key; + + call_key.conv=conv; + call_key.seqnum=hdr->seqnum; + call_key.act_id=hdr->act_id; + + if((call_value=g_hash_table_lookup(dcerpc_dg_calls, &call_key))){ + proto_item *pi; + nstime_t ns; + + pi = proto_tree_add_uint(dcerpc_tree, hf_dcerpc_request_in, + tvb, 0, 0, call_value->req_frame); + PROTO_ITEM_SET_GENERATED(pi); + + if (check_col (pinfo->cinfo, COL_INFO)) + col_append_fstr(pinfo->cinfo, COL_INFO, " [req: #%u]", call_value->req_frame); + + ns.secs= pinfo->fd->abs_secs-call_value->req_time.secs; + ns.nsecs=pinfo->fd->abs_usecs*1000-call_value->req_time.nsecs; + if(ns.nsecs<0){ + ns.nsecs+=1000000000; + ns.secs--; + } + pi = proto_tree_add_time(dcerpc_tree, hf_dcerpc_time, tvb, offset, 0, &ns); + PROTO_ITEM_SET_GENERATED(pi); +/* }*/ + } +} + /* * DCERPC dissector for connectionless calls */ @@ -4908,6 +4944,8 @@ dissect_dcerpc_dg (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* these requests have no body */ case PDU_ACK: case PDU_PING: + dissect_dcerpc_dg_ping_ack (tvb, offset, pinfo, dcerpc_tree, tree, &hdr, conv); + break; case PDU_WORKING: default: break; |