diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-02-21 20:59:01 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:48:44 -0500 |
commit | f487c24a79223c295afc60e05a0fac9794c3a22d (patch) | |
tree | d1a2ef546f2f1fcdd67d113a40e132145b4cea1c /source4/pidl | |
parent | 79a1b1a928f0f8cdd6c60d74291bf048c8484f0b (diff) | |
download | samba-f487c24a79223c295afc60e05a0fac9794c3a22d.tar.gz samba-f487c24a79223c295afc60e05a0fac9794c3a22d.tar.bz2 samba-f487c24a79223c295afc60e05a0fac9794c3a22d.zip |
r21493: Patch from Ronnie Sahlberg. From his email:
This patch changes the function name and signature that pidl generate
a call for when dissecting a policy handle to a new, more
PIDL-friendly function.
It also stores the procedure name in a new pinfo-> field so that
helpers that want to know the procedure name can finbd out easily.
The new PIDL helper function for policy handles use this new field and will show
OpenHKU(<...>)
opened in frame X
closed in frame Y
for the policy handle.
(This used to be commit 0c4fb484f0e515eb4055c58cd73ca798a8c46d69)
Diffstat (limited to 'source4/pidl')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm index 9ba6f2f3e0..c61a05e90c 100644 --- a/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm +++ b/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm @@ -427,7 +427,7 @@ sub Function($$$) PrintIdl DumpFunction($fn->{ORIGINAL}); pidl_fn_start "$ifname\_dissect\_$fn_name\_response"; pidl_code "static int"; - pidl_code "$ifname\_dissect\_${fn_name}_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)"; + pidl_code "$ifname\_dissect\_${fn_name}_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo, proto_tree *tree _U_, guint8 *drep _U_)"; pidl_code "{"; indent; if ( not defined($fn->{RETURN_TYPE})) { @@ -446,6 +446,7 @@ sub Function($$$) error($fn, "unknown return type `$fn->{RETURN_TYPE}'"); } + pidl_code "pinfo->dcerpc_procedure_name=\"${fn_name}\";"; foreach (@{$fn->{ELEMENTS}}) { if (grep(/out/,@{$_->{DIRECTION}})) { pidl_code "$dissectornames{$_->{NAME}}"; @@ -491,9 +492,10 @@ sub Function($$$) pidl_fn_start "$ifname\_dissect\_$fn_name\_request"; pidl_code "static int"; - pidl_code "$ifname\_dissect\_${fn_name}_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)"; + pidl_code "$ifname\_dissect\_${fn_name}_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo, proto_tree *tree _U_, guint8 *drep _U_)"; pidl_code "{"; indent; + pidl_code "pinfo->dcerpc_procedure_name=\"${fn_name}\";"; foreach (@{$fn->{ELEMENTS}}) { if (grep(/in/,@{$_->{DIRECTION}})) { pidl_code "$dissectornames{$_->{NAME}}"; @@ -849,7 +851,7 @@ sub Initialize($) register_type("long", "offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, \@HF\@, NULL);","FT_INT32", "BASE_DEC", 0, "NULL", 4); register_type("dlong", "offset = dissect_ndr_duint32(tvb, offset, pinfo, tree, drep, \@HF\@, NULL);","FT_INT64", "BASE_DEC", 0, "NULL", 8); register_type("GUID", "offset = dissect_ndr_uuid_t(tvb, offset, pinfo, tree, drep, \@HF\@, NULL);","FT_GUID", "BASE_NONE", 0, "NULL", 4); - register_type("policy_handle", "offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep, \@HF\@, NULL, NULL, \@PARAM\@&0x01, \@PARAM\@&0x02);","FT_BYTES", "BASE_NONE", 0, "NULL", 4); + register_type("policy_handle", "offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, \@HF\@, \@PARAM\@);","FT_BYTES", "BASE_NONE", 0, "NULL", 4); register_type("NTTIME", "offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep, \@HF\@);","FT_ABSOLUTE_TIME", "BASE_NONE", 0, "NULL", 4); register_type("NTTIME_hyper", "offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep, \@HF\@);","FT_ABSOLUTE_TIME", "BASE_NONE", 0, "NULL", 4); register_type("time_t", "offset = dissect_ndr_time_t(tvb, offset, pinfo,tree, drep, \@HF\@, NULL);","FT_ABSOLUTE_TIME", "BASE_DEC", 0, "NULL", 4); |