aboutsummaryrefslogtreecommitdiffstats
path: root/packet-dcerpc-ndr.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2001-12-06 23:30:36 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2001-12-06 23:30:36 +0000
commit33020303019c130db168e02ddcd424c7cd58a20e (patch)
tree30bc4e9802cc032eed98e48e35ab63cf77012664 /packet-dcerpc-ndr.c
parent156931abb3dae13ef14d189111a16e4e7f428897 (diff)
From Todd Sabin:
add "dissect_ndr_ctx_hnd()" for dissecting context handles, and use it in various DCERPC dissectors; beef up the MS Security Account Manager dissector. Also, export "NT_errors[]" for use by that dissector. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4350 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-dcerpc-ndr.c')
-rw-r--r--packet-dcerpc-ndr.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/packet-dcerpc-ndr.c b/packet-dcerpc-ndr.c
index 1db0672b6e..c1e80458cd 100644
--- a/packet-dcerpc-ndr.c
+++ b/packet-dcerpc-ndr.c
@@ -2,7 +2,7 @@
* Routines for DCERPC NDR dissection
* Copyright 2001, Todd Sabin <tas@webspan.net>
*
- * $Id: packet-dcerpc-ndr.c,v 1.1 2001/11/27 09:27:29 guy Exp $
+ * $Id: packet-dcerpc-ndr.c,v 1.2 2001/12/06 23:30:35 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -106,3 +106,26 @@ dissect_ndr_uuid_t (tvbuff_t *tvb, gint offset, packet_info *pinfo,
return offset + 16;
}
+
+int
+dissect_ndr_ctx_hnd (tvbuff_t *tvb, gint offset, packet_info *pinfo,
+ proto_tree *tree, char *drep,
+ int hfindex, e_ctx_hnd *pdata)
+{
+ e_ctx_hnd ctx_hnd;
+
+ if (offset % 4) {
+ offset += 4 - (offset % 4);
+ }
+ ctx_hnd.Data1 = dcerpc_tvb_get_ntohl (tvb, offset, drep);
+ dcerpc_tvb_get_uuid (tvb, offset+4, drep, &ctx_hnd.uuid);
+ if (tree) {
+ proto_tree_add_bytes (tree, hfindex, tvb, offset, 20,
+ tvb_get_ptr (tvb, offset, 20));
+ }
+ if (pdata) {
+ *pdata = ctx_hnd;
+ }
+ return offset + 20;
+}
+