aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dcerpc-ndr.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2009-10-03 00:03:48 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2009-10-03 00:03:48 +0000
commit0a9289108df89d5b3953488ce8d6d138ddb7ce89 (patch)
treee2419a1f2c911b7ebfe0539704d65c884adb4600 /epan/dissectors/packet-dcerpc-ndr.c
parente162470d6b60999deebdb389cdba33e6ddd97ca5 (diff)
teach the dce/rpc pointer dissector about ndr64 and make it dissect
pointers as 8 byte entities when ndr64 is negotiated svn path=/trunk/; revision=30253
Diffstat (limited to 'epan/dissectors/packet-dcerpc-ndr.c')
-rw-r--r--epan/dissectors/packet-dcerpc-ndr.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/epan/dissectors/packet-dcerpc-ndr.c b/epan/dissectors/packet-dcerpc-ndr.c
index 16eced4df9..a6e760bde1 100644
--- a/epan/dissectors/packet-dcerpc-ndr.c
+++ b/epan/dissectors/packet-dcerpc-ndr.c
@@ -214,6 +214,28 @@ dissect_ndr_uint32 (tvbuff_t *tvb, gint offset, packet_info *pinfo,
tree, drep, hfindex, pdata);
}
+/* This is used to dissect the new datatypes, such as pointers and conformance
+ data, which is 4 bytes in size in NDR but 8 bytes in NDR64.
+*/
+int
+dissect_ndr_4or8 (tvbuff_t *tvb, gint offset, packet_info *pinfo,
+ proto_tree *tree, guint8 *drep,
+ int hfindex, guint64 *pdata)
+{
+ dcerpc_info *di;
+
+ di=pinfo->private_data;
+
+ if (di->call_data->flags & DCERPC_IS_NDR64) {
+ return dissect_ndr_uint64(tvb, offset, pinfo, tree, drep, hfindex, pdata);
+ } else {
+ guint32 val;
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hfindex, &val);
+ *pdata = val;
+ return offset;
+ }
+}
+
int
PIDL_dissect_uint32 (tvbuff_t *tvb, gint offset, packet_info *pinfo,
proto_tree *tree, guint8 *drep,