summaryrefslogtreecommitdiff
path: root/librpc/idl/dfsblobs.idl
blob: ffd3e6e3cae0888948302dc9e95110b2841b697d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#include "idl_types.h"

import "misc.idl";
/*
dfs blobs interface definition
*/


[
	pointer_default(unique),
	helpstring("dfs referral blobs"),
	uuid("12345778-1234-abcd-0001-00000003")
]


interface dfsblobs
{
	typedef [bitmap32bit] bitmap {
		DFS_HEADER_FLAG_REFERAL_SVR	= 0x00000001,
		DFS_HEADER_FLAG_STORAGE_SVR	= 0x00000002,
		DFS_HEADER_FLAG_TARGET_BCK	= 0x00000004
	} DFS_HEADER_FLAG;

	typedef [enum16bit] enum {
		DFS_SERVER_NON_ROOT	= 0x0000,
		DFS_SERVER_ROOT		= 0x0001
	} DFS_SERVER_TYPE;

	typedef [enum16bit] enum {
		DFS_FLAG_REFERRAL_DOMAIN_RESP		= 0x0002,
		DFS_FLAG_REFERRAL_FIRST_TARGET_SET	= 0x0004
	} DFS_FLAGS_REFERRAL;

	typedef struct {
		uint16 size;
		uint16 server_type;
		uint16 entry_flags;
		nstring *share_name;
	} dfs_referral_v1;

	typedef struct {
		uint16 size;
		DFS_SERVER_TYPE server_type;
		DFS_FLAGS_REFERRAL entry_flags;
		uint32 proximity;
		uint32 ttl;
		[relative_short] nstring *DFS_path;
		[relative_short] nstring *DFS_alt_path;
		[relative_short] nstring *netw_address;
	} 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];
	} dfs_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];
	} dfs_domain_referral;

	typedef [nodiscriminant] union {
		[case(0)] dfs_normal_referral r1;
		[case(2)] dfs_domain_referral r2;
		[default];
	} dfs_referral;

	typedef [flag(NDR_NOALIGN)] struct {
		uint16 size;
		DFS_SERVER_TYPE server_type;
		DFS_FLAGS_REFERRAL entry_flags;
		uint32 ttl;
		[switch_is(entry_flags & DFS_FLAG_REFERRAL_DOMAIN_RESP)] dfs_referral referrals;
	} dfs_referral_v3;

	typedef struct {
		uint16 size;
		DFS_SERVER_TYPE server_type;
		DFS_FLAGS_REFERRAL entry_flags;
		uint32 ttl;
		dfs_normal_referral referrals;
	} dfs_referral_v4;

	typedef [nodiscriminant] union {
		[case(1)] dfs_referral_v1 v1;
		[case(2)] dfs_referral_v2 v2;
		[case(3)] dfs_referral_v3 v3;
		[case(4)] dfs_referral_v4 v4;
		[default];
	} dfs_referral_version;

	typedef [flag(NDR_NOALIGN)] [relative_base] struct {
		uint16	version;
		[switch_is(version)] dfs_referral_version referral;
	} dfs_referral_type;

	typedef [public] struct {
		uint16	path_consumed;
		uint16	nb_referrals;
		uint32	header_flags;
		dfs_referral_type referral_entries[nb_referrals];
	} dfs_referral_resp;

	[public] void dfs_GetDFSReferral(
		[in]		uint16 max_referral_level,
		[in]		nstring servername,
		[out,ref]	dfs_referral_resp *resp
		);
}