aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-11-21 02:48:11 +0000
committerGuy Harris <guy@alum.mit.edu>2003-11-21 02:48:11 +0000
commita041d6bf9fbb5255e76c7aa7dd9dc161d4680152 (patch)
tree557aecc84ad89d6fdc6aa064ffc4e0e29be52b90
parent9687947b5ff4edcfde5c2a04e7bacb74e67d7609 (diff)
The 32-bit integer at the beginning of a context_handle is called
"context_handle_attributes" in the DCE RPC 1.1 "nbase.idl". Rename our structure member accordingly. Note in a comment that we should perhaps display a context_handle as the attributes and UUID. Use "proto_tree_add_item()", not "proto_tree_add_bytes()", to put the context handle raw data into the protocol tree. svn path=/trunk/; revision=9052
-rw-r--r--packet-dcerpc-ndr.c17
-rw-r--r--packet-dcerpc.h4
2 files changed, 15 insertions, 6 deletions
diff --git a/packet-dcerpc-ndr.c b/packet-dcerpc-ndr.c
index bd2fc8b5d7..98e59fc36c 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.13 2002/11/03 20:35:49 guy Exp $
+ * $Id: packet-dcerpc-ndr.c,v 1.14 2003/11/21 02:48:11 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -234,6 +234,15 @@ dissect_ndr_uuid_t (tvbuff_t *tvb, gint offset, packet_info *pinfo,
return offset + 16;
}
+/*
+ * XXX - at least according to the DCE RPC 1.1 "nbase.idl", an
+ * "ndr_context_handle" is an unsigned32 "context_handle_attributes"
+ * and a uuid_t "context_handle_uuid". The attributes do not appear to
+ * be used, and always appear to be set to 0, in the DCE RPC 1.1 code.
+ *
+ * Should we display an "ndr_context_handle" with a tree holding the
+ * attributes and the uuid_t?
+ */
int
dissect_ndr_ctx_hnd (tvbuff_t *tvb, gint offset, packet_info *pinfo,
proto_tree *tree, char *drep,
@@ -251,11 +260,11 @@ dissect_ndr_ctx_hnd (tvbuff_t *tvb, gint offset, packet_info *pinfo,
if (offset % 4) {
offset += 4 - (offset % 4);
}
- ctx_hnd.Data1 = dcerpc_tvb_get_ntohl (tvb, offset, drep);
+ ctx_hnd.attributes = 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));
+ /* Bytes is bytes - don't worry about the data representation */
+ proto_tree_add_item (tree, hfindex, tvb, offset, 20, FALSE);
}
if (pdata) {
*pdata = ctx_hnd;
diff --git a/packet-dcerpc.h b/packet-dcerpc.h
index 20568f76a0..036fc63ce2 100644
--- a/packet-dcerpc.h
+++ b/packet-dcerpc.h
@@ -2,7 +2,7 @@
* Copyright 2001, Todd Sabin <tas@webspan.net>
* Copyright 2003, Tim Potter <tpot@samba.org>
*
- * $Id: packet-dcerpc.h,v 1.37 2003/11/16 23:17:17 guy Exp $
+ * $Id: packet-dcerpc.h,v 1.38 2003/11/21 02:48:11 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -39,7 +39,7 @@ typedef struct _e_uuid_t {
#define DCERPC_UUID_STR_LEN 36+1
typedef struct _e_ctx_hnd {
- guint32 Data1;
+ guint32 attributes;
e_uuid_t uuid;
} e_ctx_hnd;