1 /*
2  * Please do not edit this file.
3  * It was generated using ndrgen.
4  */
5 
6 #include <strings.h>
7 #include <smbsrv/ndr.h>
8 #include <smbsrv/ndl/dssetup.ndl>
9 
10 extern struct ndr_typeinfo ndt__char;
11 extern struct ndr_typeinfo ndt_s_char;
12 extern struct ndr_typeinfo ndt__uchar;
13 extern struct ndr_typeinfo ndt_s_uchar;
14 extern struct ndr_typeinfo ndt__wchar;
15 extern struct ndr_typeinfo ndt_s_wchar;
16 extern struct ndr_typeinfo ndt__short;
17 extern struct ndr_typeinfo ndt_s_short;
18 extern struct ndr_typeinfo ndt__ushort;
19 extern struct ndr_typeinfo ndt_s_ushort;
20 extern struct ndr_typeinfo ndt__long;
21 extern struct ndr_typeinfo ndt_s_long;
22 extern struct ndr_typeinfo ndt__ulong;
23 extern struct ndr_typeinfo ndt_s_ulong;
24 
25 
26 
27 int ndr__dssetup_uuid (struct ndr_reference *encl_ref);
28 struct ndr_typeinfo ndt__dssetup_uuid = {
29 	1,		/* NDR version */
30 	3,		/* alignment */
31 	NDR_F_STRUCT,	/* flags */
32 	ndr__dssetup_uuid,	/* ndr_func */
33 	16,		/* pdu_size_fixed_part */
34 	0,		/* pdu_size_variable_part */
35 	16,		/* c_size_fixed_part */
36 	0,		/* c_size_variable_part */
37 };
38 
39 
40 /*
41  *  */
42 int
43 ndr__dssetup_uuid (struct ndr_reference *encl_ref)
44 {
45 	struct dssetup_uuid *val = (struct dssetup_uuid *) encl_ref->datum;
46 	struct ndr_reference myref;
47 
48 	(void) bzero(&myref, sizeof (myref));
49 	myref.enclosing = encl_ref;
50 	myref.stream = encl_ref->stream;
51 
52 	/* do all basic elements first */
53 	NDR_MEMBER (_ulong, data1, 0UL);
54 	NDR_MEMBER (_ushort, data2, 4UL);
55 	NDR_MEMBER (_ushort, data3, 6UL);
56 
57 	/* do all constructed elements w/o pointers */
58 	NDR_MEMBER_ARR_WITH_DIMENSION (_uchar, data4, 8UL,
59 		8);
60 
61 	/* do members with pointers in order */
62 
63 	return 1;
64 }
65 
66 
67 
68 int ndr__dssetup_DsRolePrimaryDomInfo1 (struct ndr_reference *encl_ref);
69 struct ndr_typeinfo ndt__dssetup_DsRolePrimaryDomInfo1 = {
70 	1,		/* NDR version */
71 	3,		/* alignment */
72 	NDR_F_STRUCT,	/* flags */
73 	ndr__dssetup_DsRolePrimaryDomInfo1,	/* ndr_func */
74 	36,		/* pdu_size_fixed_part */
75 	0,		/* pdu_size_variable_part */
76 	36,		/* c_size_fixed_part */
77 	0,		/* c_size_variable_part */
78 };
79 
80 
81 /*
82  *  */
83 int
84 ndr__dssetup_DsRolePrimaryDomInfo1 (struct ndr_reference *encl_ref)
85 {
86 	struct dssetup_DsRolePrimaryDomInfo1 *val = (struct dssetup_DsRolePrimaryDomInfo1 *) encl_ref->datum;
87 	struct ndr_reference myref;
88 
89 	(void) bzero(&myref, sizeof (myref));
90 	myref.enclosing = encl_ref;
91 	myref.stream = encl_ref->stream;
92 
93 	/* do all basic elements first */
94 	NDR_MEMBER (_ulong, role, 0UL);
95 	NDR_MEMBER (_ulong, flags, 4UL);
96 
97 	/* do all constructed elements w/o pointers */
98 	NDR_MEMBER (_dssetup_uuid, domain_guid, 20UL);
99 
100 	/* do members with pointers in order */
101 	NDR_MEMBER_PTR (s_wchar, nt_domain, 8UL);
102 	NDR_MEMBER_PTR (s_wchar, dns_domain, 12UL);
103 	NDR_MEMBER_PTR (s_wchar, forest, 16UL);
104 
105 	return 1;
106 }
107 
108 
109 
110 int ndr__dssetup_DsRolePrimaryDomInfo2 (struct ndr_reference *encl_ref);
111 struct ndr_typeinfo ndt__dssetup_DsRolePrimaryDomInfo2 = {
112 	1,		/* NDR version */
113 	3,		/* alignment */
114 	NDR_F_STRUCT,	/* flags */
115 	ndr__dssetup_DsRolePrimaryDomInfo2,	/* ndr_func */
116 	8,		/* pdu_size_fixed_part */
117 	0,		/* pdu_size_variable_part */
118 	8,		/* c_size_fixed_part */
119 	0,		/* c_size_variable_part */
120 };
121 
122 
123 /*
124  *  */
125 int
126 ndr__dssetup_DsRolePrimaryDomInfo2 (struct ndr_reference *encl_ref)
127 {
128 	struct dssetup_DsRolePrimaryDomInfo2 *val = (struct dssetup_DsRolePrimaryDomInfo2 *) encl_ref->datum;
129 	struct ndr_reference myref;
130 
131 	(void) bzero(&myref, sizeof (myref));
132 	myref.enclosing = encl_ref;
133 	myref.stream = encl_ref->stream;
134 
135 	/* do all basic elements first */
136 	NDR_MEMBER (_ulong, upgrade_state, 0UL);
137 	NDR_MEMBER (_ulong, previous_role, 4UL);
138 
139 	/* do all constructed elements w/o pointers */
140 
141 	/* do members with pointers in order */
142 
143 	return 1;
144 }
145 
146 
147 
148 int ndr__dssetup_DsRolePrimaryDomInfo3 (struct ndr_reference *encl_ref);
149 struct ndr_typeinfo ndt__dssetup_DsRolePrimaryDomInfo3 = {
150 	1,		/* NDR version */
151 	3,		/* alignment */
152 	NDR_F_STRUCT,	/* flags */
153 	ndr__dssetup_DsRolePrimaryDomInfo3,	/* ndr_func */
154 	4,		/* pdu_size_fixed_part */
155 	0,		/* pdu_size_variable_part */
156 	4,		/* c_size_fixed_part */
157 	0,		/* c_size_variable_part */
158 };
159 
160 
161 /*
162  *  */
163 int
164 ndr__dssetup_DsRolePrimaryDomInfo3 (struct ndr_reference *encl_ref)
165 {
166 	struct dssetup_DsRolePrimaryDomInfo3 *val = (struct dssetup_DsRolePrimaryDomInfo3 *) encl_ref->datum;
167 	struct ndr_reference myref;
168 
169 	(void) bzero(&myref, sizeof (myref));
170 	myref.enclosing = encl_ref;
171 	myref.stream = encl_ref->stream;
172 
173 	/* do all basic elements first */
174 	NDR_MEMBER (_ulong, status, 0UL);
175 
176 	/* do all constructed elements w/o pointers */
177 
178 	/* do members with pointers in order */
179 
180 	return 1;
181 }
182 
183 
184 
185 int ndr__dssetup_GetPrimaryDomainInfo_ru (struct ndr_reference *encl_ref);
186 struct ndr_typeinfo ndt__dssetup_GetPrimaryDomainInfo_ru = {
187 	1,		/* NDR version */
188 	3,		/* alignment */
189 	NDR_F_UNION,	/* flags */
190 	ndr__dssetup_GetPrimaryDomainInfo_ru,	/* ndr_func */
191 	36,		/* pdu_size_fixed_part */
192 	0,		/* pdu_size_variable_part */
193 	36,		/* c_size_fixed_part */
194 	0,		/* c_size_variable_part */
195 };
196 
197 
198 /*
199  *  */
200 int
201 ndr__dssetup_GetPrimaryDomainInfo_ru (struct ndr_reference *encl_ref)
202 {
203 	union dssetup_GetPrimaryDomainInfo_ru *val = (union dssetup_GetPrimaryDomainInfo_ru *) encl_ref->datum;
204 	struct ndr_reference myref;
205 
206 	(void) bzero(&myref, sizeof (myref));
207 	myref.enclosing = encl_ref;
208 	myref.stream = encl_ref->stream;
209 
210     switch (encl_ref->switch_is) {
211     case 1:
212 	NDR_MEMBER (_dssetup_DsRolePrimaryDomInfo1, info1, 0UL);
213 	break;
214 
215     case 2:
216 	NDR_MEMBER (_dssetup_DsRolePrimaryDomInfo2, info2, 0UL);
217 	break;
218 
219     case 3:
220 	NDR_MEMBER (_dssetup_DsRolePrimaryDomInfo3, info3, 0UL);
221 	break;
222 
223     default:
224 	NDR_MEMBER_PTR (_char, nullptr, 0UL);
225 	break;
226 
227     }
228 
229 
230 	return 1;
231 }
232 
233 
234 
235 int ndr__dssetup_GetPrimaryDomainInfo (struct ndr_reference *encl_ref);
236 struct ndr_typeinfo ndt__dssetup_GetPrimaryDomainInfo = {
237 	1,		/* NDR version */
238 	3,		/* alignment */
239 	NDR_F_STRUCT,	/* flags */
240 	ndr__dssetup_GetPrimaryDomainInfo,	/* ndr_func */
241 	40,		/* pdu_size_fixed_part */
242 	0,		/* pdu_size_variable_part */
243 	40,		/* c_size_fixed_part */
244 	0,		/* c_size_variable_part */
245 };
246 
247 
248 /*
249  *  */
250 int
251 ndr__dssetup_GetPrimaryDomainInfo (struct ndr_reference *encl_ref)
252 {
253 	struct dssetup_GetPrimaryDomainInfo *val = (struct dssetup_GetPrimaryDomainInfo *) encl_ref->datum;
254 	struct ndr_reference myref;
255 
256 	(void) bzero(&myref, sizeof (myref));
257 	myref.enclosing = encl_ref;
258 	myref.stream = encl_ref->stream;
259 
260 	/* do all basic elements first */
261 	NDR_MEMBER (_ushort, switch_value, 0UL);
262 
263 	/* do all constructed elements w/o pointers */
264 
265 	/* do members with pointers in order */
266 	NDR_MEMBER_WITH_SWITCH_IS (_dssetup_GetPrimaryDomainInfo_ru, ru, 4UL,
267 		val->switch_value);
268 
269 	return 1;
270 }
271 
272 
273 
274 int ndr__dssetup_DsRoleGetPrimaryDomainInfo (struct ndr_reference *encl_ref);
275 struct ndr_typeinfo ndt__dssetup_DsRoleGetPrimaryDomainInfo = {
276 	1,		/* NDR version */
277 	3,		/* alignment */
278 	NDR_F_OPERATION,	/* flags */
279 	ndr__dssetup_DsRoleGetPrimaryDomainInfo,	/* ndr_func */
280 	12,		/* pdu_size_fixed_part */
281 	0,		/* pdu_size_variable_part */
282 	12,		/* c_size_fixed_part */
283 	0,		/* c_size_variable_part */
284 };
285 
286 
287 /*
288  * [operation(0)]
289  */
290 int
291 ndr__dssetup_DsRoleGetPrimaryDomainInfo (struct ndr_reference *encl_ref)
292 {
293 	struct dssetup_DsRoleGetPrimaryDomainInfo *val = (struct dssetup_DsRoleGetPrimaryDomainInfo *) encl_ref->datum;
294 	struct ndr_reference myref;
295 
296 	(void) bzero(&myref, sizeof (myref));
297 	myref.enclosing = encl_ref;
298 	myref.stream = encl_ref->stream;
299 
300 	/* do all members in order */
301     if (NDR_DIR_IS_IN) {
302 	NDR_TOPMOST_MEMBER (_ushort, level);
303     }
304     if (NDR_DIR_IS_OUT) {
305 	NDR_TOPMOST_MEMBER_PTR (_dssetup_GetPrimaryDomainInfo, info);
306     }
307     if (NDR_DIR_IS_OUT) {
308 	NDR_TOPMOST_MEMBER (_ulong, status);
309     }
310 
311 	return 1;
312 }
313 
314 
315 
316 int ndr__dssetup_interface (struct ndr_reference *encl_ref);
317 struct ndr_typeinfo ndt__dssetup_interface = {
318 	1,		/* NDR version */
319 	3,		/* alignment */
320 	NDR_F_INTERFACE,	/* flags */
321 	ndr__dssetup_interface,	/* ndr_func */
322 	12,		/* pdu_size_fixed_part */
323 	0,		/* pdu_size_variable_part */
324 	12,		/* c_size_fixed_part */
325 	0,		/* c_size_variable_part */
326 };
327 
328 
329 /*
330  * [interface(0)]
331  */
332 int
333 ndr__dssetup_interface (struct ndr_reference *encl_ref)
334 {
335 	union dssetup_interface *val = (union dssetup_interface *) encl_ref->datum;
336 	struct ndr_reference myref;
337 
338 	(void) bzero(&myref, sizeof (myref));
339 	myref.enclosing = encl_ref;
340 	myref.stream = encl_ref->stream;
341 
342     switch (encl_ref->switch_is) {
343     case 0:
344 	NDR_PARAMS_MEMBER (_dssetup_DsRoleGetPrimaryDomainInfo, GetPrimaryDomainInfo);
345 	break;
346 
347     default:
348 	NDR_SET_ERROR(encl_ref, NDR_ERR_SWITCH_VALUE_INVALID);
349 	return 0;
350 	break;
351     }
352 
353 
354 	return 1;
355 }
356