[PATCH 2/4] pidl: create trans.idl, IDL for TRANSACTIONS2 extensions

Matthieu Patou mat at matws.net
Thu Dec 10 05:17:10 MST 2009


---
 librpc/idl/trans.idl |  135 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 135 insertions(+), 0 deletions(-)
 create mode 100644 librpc/idl/trans.idl

diff --git a/librpc/idl/trans.idl b/librpc/idl/trans.idl
new file mode 100644
index 0000000..092c76d
--- /dev/null
+++ b/librpc/idl/trans.idl
@@ -0,0 +1,135 @@
+#include "idl_types.h"
+
+import "misc.idl";
+/*
+  trans interface definition
+*/
+
+
+[
+	pointer_default(unique),
+	helpstring("TRANS2 messages"),
+	uuid("7e746c6d-7373-700a-0000-00000000")
+]
+
+
+interface trans2
+{
+	[todo] WERROR trans2_QueryFileInformation();
+
+	[todo] WERROR trans2_QueryPathInformation();
+
+	[todo] WERROR trans2_SetFileInformation();
+
+	[todo] WERROR trans2_SetPathInformation();
+
+	[todo] WERROR trans2_QueryFsInformation();
+
+	[todo] WERROR trans2_SetFsInformation();
+
+	[todo] WERROR trans2_FindFirst2Information();
+
+	[todo] WERROR trans2_FindNext2Information();
+
+
+        typedef [bitmap32bit] bitmap {
+		TRANS_HEADER_FLAG_REFERAL_SVR	= 0x00000001,
+		TRANS_HEADER_FLAG_STORAGE_SVR	= 0x00000002,
+		TRANS_HEADER_FLAG_TARGET_BCK	= 0x00000004
+        } TRANS_HEADER_FLAG;
+
+        typedef [enum16bit] enum {
+		TRANS_SERVER_NON_ROOT	= 0x0000,
+		TRANS_SERVER_ROOT	= 0x0001
+        } TRANS_SERVER_TYPE;
+
+	typedef [enum16bit] enum {
+		TRANS_FLAG_REFERRAL_DOMAIN_RESP		= 0x0002,
+		TRANS_FLAG_REFERRAL_FIRST_TARGET_SET	= 0x0004
+	} TRANS_FLAGS_REFERRAL;
+
+       	typedef struct {
+		uint16	size;
+		uint16	server_type;
+		uint16	entry_flags;
+		nstring *share_name;
+	} trans2_dfs_referral_v1;
+       	
+	typedef struct {
+		uint16	size;
+		TRANS_SERVER_TYPE	server_type;
+		TRANS_FLAGS_REFERRAL	entry_flags;
+		uint32	proximity;
+		uint32	ttl;
+		[relative_short] nstring	*DFS_path;
+		[relative_short] nstring	*DFS_alt_path;
+		[relative_short] nstring	*netw_address;
+	} trans2_dfs_referral_v2;
+
+	typedef struct {
+		[relative_short] nstring	*DFS_path;
+		[relative_short] nstring	*DFS_alt_path;
+		[relative_short] nstring	*netw_address;
+		/* As stated in MS DFSC 2.2.4.3.1 this array was guid but now MUST be 16 null bytes*/
+		uint8	service_site_guid[16];
+	} trans_normal_referral;
+
+	typedef struct {
+		[relative_short] nstring *special_name;
+		uint16	nb_expanded_names;
+		[relative_short] [flag(STR_NOTERM|NDR_REMAINING)] string_array *expanded_names;
+		/*[relative_short] nstring_array expanded_names2;*/
+		/* As stated in MS DFSC 2.2.4.3.1 this array was guid but now MUST be 16 null bytes*/
+		uint8	service_site_guid[16];
+	} trans_domain_referral;
+
+	typedef [nodiscriminant] union {
+		[case(0)]	trans_normal_referral	 r1;
+		[case(2)]	trans_domain_referral	 r2;
+                [default] ;
+	} trans_referral;
+
+       	typedef [flag(NDR_NOALIGN)] struct {
+		uint16	size;
+		TRANS_SERVER_TYPE	server_type;
+		TRANS_FLAGS_REFERRAL	entry_flags;
+		uint32	ttl;
+		[switch_is(entry_flags & TRANS_FLAG_REFERRAL_DOMAIN_RESP)]  trans_referral referrals;
+	} trans2_dfs_referral_v3;
+
+       	typedef struct {
+		uint16	size;
+		TRANS_SERVER_TYPE	server_type;
+		TRANS_FLAGS_REFERRAL	entry_flags;
+		uint32	ttl;
+		trans_normal_referral referrals;
+	} trans2_dfs_referral_v4;
+
+ 	typedef [nodiscriminant] union {
+                [case(1)]  trans2_dfs_referral_v1 v1;
+                [case(2)]  trans2_dfs_referral_v2 v2;
+                [case(3)]  trans2_dfs_referral_v3 v3;
+                [case(4)]  trans2_dfs_referral_v4 v4;
+                [default] ;
+        } trans2_dfs_referral;
+
+
+	typedef [flag(NDR_NOALIGN)] [relative_base] struct {
+		uint16	version;
+		[switch_is(version)] trans2_dfs_referral referral;
+	} trans2_dfs_referral_type;
+
+	typedef [public] struct {
+		uint16	path_consumed;
+		uint16	nb_referrals;
+		uint32	header_flags;
+		trans2_dfs_referral_type referral_entries[nb_referrals];
+	} trans2_dfs_referral_resp;
+
+	[public] NTSTATUS  trans2_GetDFSReferral(
+		[in]		uint16 max_referral_level,
+		[in]		nstring  servername,
+		[out,ref]	trans2_dfs_referral_resp *resp
+		);
+
+}
-- 
1.6.3.3


--------------080605080406060906090704
Content-Type: text/x-patch;
 name="0003-torture-torture-tests-for-get_dfs_referral-of-trans..patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename*0="0003-torture-torture-tests-for-get_dfs_referral-of-trans..pa";
 filename*1="tch"



More information about the samba-technical mailing list