diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2009-10-03 00:03:48 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2009-10-03 00:03:48 +0000 |
commit | 0a9289108df89d5b3953488ce8d6d138ddb7ce89 (patch) | |
tree | e2419a1f2c911b7ebfe0539704d65c884adb4600 /epan/dissectors/packet-dcerpc-ndr.c | |
parent | e162470d6b60999deebdb389cdba33e6ddd97ca5 (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.c | 22 |
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, |