diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2007-02-20 09:01:50 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2007-02-20 09:01:50 +0000 |
commit | 83c66c05e9255959577c73c37f5d9754ef2c72b8 (patch) | |
tree | e68d2dbd90af7ffb56fac0adec209f8bd0c00438 /epan/dissectors/packet-dcerpc-nt.c | |
parent | 0dfc6a0bf7c20092353760be2a8956ed1894e961 (diff) |
add a PIDL specific helper for managing dissection of policy handles.
let this helper take a parameter to describe how the policy handle should be
managed (is this an open, close ?) to improve policy handle tracking.
(centralizing to a single function of code makes other changes easier)
create defines to indicate OPEN/CLOSE and use them as a start/test in the winreg conformance file.
svn path=/trunk/; revision=20872
Diffstat (limited to 'epan/dissectors/packet-dcerpc-nt.c')
-rw-r--r-- | epan/dissectors/packet-dcerpc-nt.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/epan/dissectors/packet-dcerpc-nt.c b/epan/dissectors/packet-dcerpc-nt.c index c80fe7a700..1e6a9cedea 100644 --- a/epan/dissectors/packet-dcerpc-nt.c +++ b/epan/dissectors/packet-dcerpc-nt.c @@ -925,6 +925,34 @@ dissect_nt_policy_hnd(tvbuff_t *tvb, gint offset, packet_info *pinfo, return offset; } +/* This function is called from PIDL generated dissectors to dissect a + * NT style policy handle (contect handle). + * + * param can be used to specify where policy handles are opened and closed + * by setting PARAM_VALUE to + * PIDL_POLHND_OPEN where the policy handle is opened/created + * PIDL_POLHND_CLOSE where it is closed. + * This enables policy handle tracking so that when a policy handle is + * dissected it will be so as an expansion showing which frame it was + * opened/closed in. + * + * See conformance file for winreg (epan/dissectors/pidl/winreg.cnf) + * for examples. + */ +int +PIDL_dissect_policy_hnd(tvbuff_t *tvb, gint offset, packet_info *pinfo, + proto_tree *tree, guint8 *drep, int hfindex, + guint32 param) +{ + offset=dissect_nt_hnd(tvb, offset, pinfo, + tree, drep, hfindex, + NULL, NULL, + param&PIDL_POLHND_OPEN, param&PIDL_POLHND_CLOSE, + HND_TYPE_CTX_HANDLE); + + return offset; +} + /* this function must be called with hfindex being HF_GUID */ int dissect_nt_guid_hnd(tvbuff_t *tvb, gint offset, packet_info *pinfo, |