Rev 11562: Patch from Ronnie Sahlberg. From his email: in file:///home/jelmer/bzr.samba/SAMBA_4_0/

Jelmer Vernooij jelmer at samba.org
Wed Feb 21 20:55:52 GMT 2007


At file:///home/jelmer/bzr.samba/SAMBA_4_0/

------------------------------------------------------------
revno: 11562
revision-id: jelmer at samba.org-20070221205428-1zdem89mxo23fywq
parent: svn-v2:21492 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: SAMBA_4_0
timestamp: Wed 2007-02-21 21:54:28 +0100
message:
  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.
modified:
  source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm svn-v2:16824 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0-source%2fpidl%2flib%2fParse%2fPidl%2fWireshark%2fNDR.pm
=== modified file 'source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm'
--- a/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm	2007-02-18 16:46:59 +0000
+++ b/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm	2007-02-21 20:54:28 +0000
@@ -427,7 +427,7 @@
 	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 @@
 		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 @@
 
 	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 @@
 	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);



More information about the samba-cvs mailing list