~lefteris-nikoltsios/+junk/samba-lp1016895

« back to all changes in this revision

Viewing changes to source3/librpc/gen_ndr/ndr_dfs.c

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-12-21 13:18:04 UTC
  • mfrom: (0.39.21 sid)
  • Revision ID: package-import@ubuntu.com-20111221131804-xtlr39wx6njehxxr
Tags: 2:3.6.1-3ubuntu1
* Merge from Debian testing.  Remaining changes:
  + debian/patches/VERSION.patch:
    - set SAMBA_VERSION_SUFFIX to Ubuntu.
  + debian/patches/error-trans.fix-276472:
    - Add the translation of Unix Error code -ENOTSUP to NT Error Code
    - NT_STATUS_NOT_SUPPORTED to prevent the Permission denied error.
  + debian/smb.conf:
    - add "(Samba, Ubuntu)" to server string.
    - comment out the default [homes] share, and add a comment about
      "valid users = %S" to show users how to restrict access to
      \\server\username to only username.
    - Set 'usershare allow guests', so that usershare admins are 
      allowed to create public shares in addition to authenticated
      ones.
    - add map to guest = Bad user, maps bad username to guest access.
  + debian/samba-common.config:
    - Do not change priority to high if dhclient3 is installed.
    - Use priority medium instead of high for the workgroup question.
  + debian/control:
    - Don't build against or suggest ctdb.
    - Add dependency on samba-common-bin to samba.
  + Add ufw integration:
    - Created debian/samba.ufw.profile
    - debian/rules, debian/samba.dirs, debian/samba.files: install
      profile
    - debian/control: have samba suggest ufw
  + Add apport hook:
    - Created debian/source_samba.py.
    - debian/rules, debian/samba.dirs, debian/samba-common-bin.files: install
  + Switch to upstart:
    - Add debian/samba.{nmbd,smbd}.upstart.
  + debian/samba.logrotate, debian/samba-common.dhcp, debian/samba.if-up:
    - Make them upstart compatible
  + debian/samba.postinst: 
    - Avoid scary pdbedit warnings on first import.
  + debian/samba-common.postinst: Add more informative error message for
    the case where smb.conf was manually deleted
  + debian/patches/fix-debuglevel-name-conflict.patch: don't use 'debug_level'
    as a global variable name in an NSS module 
  + Dropped:
    - debian/patches/error-trans.fix-276472
    - debian/patches/fix-debuglevel-name-conflict.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* parser auto-generated by pidl */
 
2
 
 
3
#include "includes.h"
 
4
#include "librpc/gen_ndr/ndr_dfs.h"
 
5
 
 
6
#include "librpc/gen_ndr/ndr_misc.h"
 
7
static enum ndr_err_code ndr_push_dfs_ManagerVersion(struct ndr_push *ndr, int ndr_flags, enum dfs_ManagerVersion r)
 
8
{
 
9
        NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
 
10
        return NDR_ERR_SUCCESS;
 
11
}
 
12
 
 
13
static enum ndr_err_code ndr_pull_dfs_ManagerVersion(struct ndr_pull *ndr, int ndr_flags, enum dfs_ManagerVersion *r)
 
14
{
 
15
        uint32_t v;
 
16
        NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
 
17
        *r = v;
 
18
        return NDR_ERR_SUCCESS;
 
19
}
 
20
 
 
21
_PUBLIC_ void ndr_print_dfs_ManagerVersion(struct ndr_print *ndr, const char *name, enum dfs_ManagerVersion r)
 
22
{
 
23
        const char *val = NULL;
 
24
 
 
25
        switch (r) {
 
26
                case DFS_MANAGER_VERSION_NT4: val = "DFS_MANAGER_VERSION_NT4"; break;
 
27
                case DFS_MANAGER_VERSION_W2K: val = "DFS_MANAGER_VERSION_W2K"; break;
 
28
                case DFS_MANAGER_VERSION_W2K3: val = "DFS_MANAGER_VERSION_W2K3"; break;
 
29
                case DFS_MANAGER_VERSION_W2K8: val = "DFS_MANAGER_VERSION_W2K8"; break;
 
30
        }
 
31
        ndr_print_enum(ndr, name, "ENUM", val, r);
 
32
}
 
33
 
 
34
static enum ndr_err_code ndr_push_dfs_Info0(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info0 *r)
 
35
{
 
36
        if (ndr_flags & NDR_SCALARS) {
 
37
                NDR_CHECK(ndr_push_align(ndr, 1));
 
38
                NDR_CHECK(ndr_push_trailer_align(ndr, 1));
 
39
        }
 
40
        if (ndr_flags & NDR_BUFFERS) {
 
41
        }
 
42
        return NDR_ERR_SUCCESS;
 
43
}
 
44
 
 
45
static enum ndr_err_code ndr_pull_dfs_Info0(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info0 *r)
 
46
{
 
47
        if (ndr_flags & NDR_SCALARS) {
 
48
                NDR_CHECK(ndr_pull_align(ndr, 1));
 
49
                NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
 
50
        }
 
51
        if (ndr_flags & NDR_BUFFERS) {
 
52
        }
 
53
        return NDR_ERR_SUCCESS;
 
54
}
 
55
 
 
56
_PUBLIC_ void ndr_print_dfs_Info0(struct ndr_print *ndr, const char *name, const struct dfs_Info0 *r)
 
57
{
 
58
        ndr_print_struct(ndr, name, "dfs_Info0");
 
59
        if (r == NULL) { ndr_print_null(ndr); return; }
 
60
        ndr->depth++;
 
61
        ndr->depth--;
 
62
}
 
63
 
 
64
static enum ndr_err_code ndr_push_dfs_Info1(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info1 *r)
 
65
{
 
66
        if (ndr_flags & NDR_SCALARS) {
 
67
                NDR_CHECK(ndr_push_align(ndr, 5));
 
68
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
 
69
                NDR_CHECK(ndr_push_trailer_align(ndr, 5));
 
70
        }
 
71
        if (ndr_flags & NDR_BUFFERS) {
 
72
                if (r->path) {
 
73
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
 
74
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
75
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
 
76
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
77
                }
 
78
        }
 
79
        return NDR_ERR_SUCCESS;
 
80
}
 
81
 
 
82
static enum ndr_err_code ndr_pull_dfs_Info1(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info1 *r)
 
83
{
 
84
        uint32_t _ptr_path;
 
85
        TALLOC_CTX *_mem_save_path_0;
 
86
        if (ndr_flags & NDR_SCALARS) {
 
87
                NDR_CHECK(ndr_pull_align(ndr, 5));
 
88
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
 
89
                if (_ptr_path) {
 
90
                        NDR_PULL_ALLOC(ndr, r->path);
 
91
                } else {
 
92
                        r->path = NULL;
 
93
                }
 
94
                NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
 
95
        }
 
96
        if (ndr_flags & NDR_BUFFERS) {
 
97
                if (r->path) {
 
98
                        _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
99
                        NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
 
100
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
 
101
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
 
102
                        if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
 
103
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path));
 
104
                        }
 
105
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
 
106
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
 
107
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
 
108
                }
 
109
        }
 
110
        return NDR_ERR_SUCCESS;
 
111
}
 
112
 
 
113
_PUBLIC_ void ndr_print_dfs_Info1(struct ndr_print *ndr, const char *name, const struct dfs_Info1 *r)
 
114
{
 
115
        ndr_print_struct(ndr, name, "dfs_Info1");
 
116
        if (r == NULL) { ndr_print_null(ndr); return; }
 
117
        ndr->depth++;
 
118
        ndr_print_ptr(ndr, "path", r->path);
 
119
        ndr->depth++;
 
120
        if (r->path) {
 
121
                ndr_print_string(ndr, "path", r->path);
 
122
        }
 
123
        ndr->depth--;
 
124
        ndr->depth--;
 
125
}
 
126
 
 
127
_PUBLIC_ enum ndr_err_code ndr_push_dfs_VolumeState(struct ndr_push *ndr, int ndr_flags, uint32_t r)
 
128
{
 
129
        NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
 
130
        return NDR_ERR_SUCCESS;
 
131
}
 
132
 
 
133
_PUBLIC_ enum ndr_err_code ndr_pull_dfs_VolumeState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
 
134
{
 
135
        uint32_t v;
 
136
        NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
 
137
        *r = v;
 
138
        return NDR_ERR_SUCCESS;
 
139
}
 
140
 
 
141
_PUBLIC_ void ndr_print_dfs_VolumeState(struct ndr_print *ndr, const char *name, uint32_t r)
 
142
{
 
143
        ndr_print_uint32(ndr, name, r);
 
144
        ndr->depth++;
 
145
        ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_OK", DFS_VOLUME_STATE_OK, r);
 
146
        ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_INCONSISTENT", DFS_VOLUME_STATE_INCONSISTENT, r);
 
147
        ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_OFFLINE", DFS_VOLUME_STATE_OFFLINE, r);
 
148
        ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_ONLINE", DFS_VOLUME_STATE_ONLINE, r);
 
149
        ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_STANDALONE", DFS_VOLUME_STATE_STANDALONE, r);
 
150
        ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_AD_BLOB", DFS_VOLUME_STATE_AD_BLOB, r);
 
151
        ndr->depth--;
 
152
}
 
153
 
 
154
static enum ndr_err_code ndr_push_dfs_Info2(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info2 *r)
 
155
{
 
156
        if (ndr_flags & NDR_SCALARS) {
 
157
                NDR_CHECK(ndr_push_align(ndr, 5));
 
158
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
 
159
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
 
160
                NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
 
161
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
 
162
                NDR_CHECK(ndr_push_trailer_align(ndr, 5));
 
163
        }
 
164
        if (ndr_flags & NDR_BUFFERS) {
 
165
                if (r->path) {
 
166
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
 
167
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
168
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
 
169
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
170
                }
 
171
                if (r->comment) {
 
172
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
 
173
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
174
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
 
175
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
176
                }
 
177
        }
 
178
        return NDR_ERR_SUCCESS;
 
179
}
 
180
 
 
181
static enum ndr_err_code ndr_pull_dfs_Info2(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info2 *r)
 
182
{
 
183
        uint32_t _ptr_path;
 
184
        TALLOC_CTX *_mem_save_path_0;
 
185
        uint32_t _ptr_comment;
 
186
        TALLOC_CTX *_mem_save_comment_0;
 
187
        if (ndr_flags & NDR_SCALARS) {
 
188
                NDR_CHECK(ndr_pull_align(ndr, 5));
 
189
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
 
190
                if (_ptr_path) {
 
191
                        NDR_PULL_ALLOC(ndr, r->path);
 
192
                } else {
 
193
                        r->path = NULL;
 
194
                }
 
195
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
 
196
                if (_ptr_comment) {
 
197
                        NDR_PULL_ALLOC(ndr, r->comment);
 
198
                } else {
 
199
                        r->comment = NULL;
 
200
                }
 
201
                NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
 
202
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
 
203
                NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
 
204
        }
 
205
        if (ndr_flags & NDR_BUFFERS) {
 
206
                if (r->path) {
 
207
                        _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
208
                        NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
 
209
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
 
210
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
 
211
                        if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
 
212
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path));
 
213
                        }
 
214
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
 
215
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
 
216
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
 
217
                }
 
218
                if (r->comment) {
 
219
                        _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
220
                        NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
 
221
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
 
222
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
 
223
                        if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
 
224
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
 
225
                        }
 
226
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
 
227
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
 
228
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
 
229
                }
 
230
        }
 
231
        return NDR_ERR_SUCCESS;
 
232
}
 
233
 
 
234
_PUBLIC_ void ndr_print_dfs_Info2(struct ndr_print *ndr, const char *name, const struct dfs_Info2 *r)
 
235
{
 
236
        ndr_print_struct(ndr, name, "dfs_Info2");
 
237
        if (r == NULL) { ndr_print_null(ndr); return; }
 
238
        ndr->depth++;
 
239
        ndr_print_ptr(ndr, "path", r->path);
 
240
        ndr->depth++;
 
241
        if (r->path) {
 
242
                ndr_print_string(ndr, "path", r->path);
 
243
        }
 
244
        ndr->depth--;
 
245
        ndr_print_ptr(ndr, "comment", r->comment);
 
246
        ndr->depth++;
 
247
        if (r->comment) {
 
248
                ndr_print_string(ndr, "comment", r->comment);
 
249
        }
 
250
        ndr->depth--;
 
251
        ndr_print_dfs_VolumeState(ndr, "state", r->state);
 
252
        ndr_print_uint32(ndr, "num_stores", r->num_stores);
 
253
        ndr->depth--;
 
254
}
 
255
 
 
256
_PUBLIC_ enum ndr_err_code ndr_push_dfs_StorageState(struct ndr_push *ndr, int ndr_flags, uint32_t r)
 
257
{
 
258
        NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
 
259
        return NDR_ERR_SUCCESS;
 
260
}
 
261
 
 
262
_PUBLIC_ enum ndr_err_code ndr_pull_dfs_StorageState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
 
263
{
 
264
        uint32_t v;
 
265
        NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
 
266
        *r = v;
 
267
        return NDR_ERR_SUCCESS;
 
268
}
 
269
 
 
270
_PUBLIC_ void ndr_print_dfs_StorageState(struct ndr_print *ndr, const char *name, uint32_t r)
 
271
{
 
272
        ndr_print_uint32(ndr, name, r);
 
273
        ndr->depth++;
 
274
        ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_OFFLINE", DFS_STORAGE_STATE_OFFLINE, r);
 
275
        ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_ONLINE", DFS_STORAGE_STATE_ONLINE, r);
 
276
        ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_ACTIVE", DFS_STORAGE_STATE_ACTIVE, r);
 
277
        ndr->depth--;
 
278
}
 
279
 
 
280
static enum ndr_err_code ndr_push_dfs_StorageInfo(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo *r)
 
281
{
 
282
        if (ndr_flags & NDR_SCALARS) {
 
283
                NDR_CHECK(ndr_push_align(ndr, 5));
 
284
                NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state));
 
285
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->server));
 
286
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->share));
 
287
                NDR_CHECK(ndr_push_trailer_align(ndr, 5));
 
288
        }
 
289
        if (ndr_flags & NDR_BUFFERS) {
 
290
                if (r->server) {
 
291
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server, CH_UTF16)));
 
292
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
293
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server, CH_UTF16)));
 
294
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server, ndr_charset_length(r->server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
295
                }
 
296
                if (r->share) {
 
297
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
 
298
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
299
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
 
300
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->share, ndr_charset_length(r->share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
301
                }
 
302
        }
 
303
        return NDR_ERR_SUCCESS;
 
304
}
 
305
 
 
306
static enum ndr_err_code ndr_pull_dfs_StorageInfo(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo *r)
 
307
{
 
308
        uint32_t _ptr_server;
 
309
        TALLOC_CTX *_mem_save_server_0;
 
310
        uint32_t _ptr_share;
 
311
        TALLOC_CTX *_mem_save_share_0;
 
312
        if (ndr_flags & NDR_SCALARS) {
 
313
                NDR_CHECK(ndr_pull_align(ndr, 5));
 
314
                NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state));
 
315
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
 
316
                if (_ptr_server) {
 
317
                        NDR_PULL_ALLOC(ndr, r->server);
 
318
                } else {
 
319
                        r->server = NULL;
 
320
                }
 
321
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
 
322
                if (_ptr_share) {
 
323
                        NDR_PULL_ALLOC(ndr, r->share);
 
324
                } else {
 
325
                        r->share = NULL;
 
326
                }
 
327
                NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
 
328
        }
 
329
        if (ndr_flags & NDR_BUFFERS) {
 
330
                if (r->server) {
 
331
                        _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
332
                        NDR_PULL_SET_MEM_CTX(ndr, r->server, 0);
 
333
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->server));
 
334
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->server));
 
335
                        if (ndr_get_array_length(ndr, &r->server) > ndr_get_array_size(ndr, &r->server)) {
 
336
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->server), ndr_get_array_length(ndr, &r->server));
 
337
                        }
 
338
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->server), sizeof(uint16_t)));
 
339
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server, ndr_get_array_length(ndr, &r->server), sizeof(uint16_t), CH_UTF16));
 
340
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
 
341
                }
 
342
                if (r->share) {
 
343
                        _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
344
                        NDR_PULL_SET_MEM_CTX(ndr, r->share, 0);
 
345
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->share));
 
346
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->share));
 
347
                        if (ndr_get_array_length(ndr, &r->share) > ndr_get_array_size(ndr, &r->share)) {
 
348
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->share), ndr_get_array_length(ndr, &r->share));
 
349
                        }
 
350
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->share), sizeof(uint16_t)));
 
351
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->share, ndr_get_array_length(ndr, &r->share), sizeof(uint16_t), CH_UTF16));
 
352
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
 
353
                }
 
354
        }
 
355
        return NDR_ERR_SUCCESS;
 
356
}
 
357
 
 
358
_PUBLIC_ void ndr_print_dfs_StorageInfo(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo *r)
 
359
{
 
360
        ndr_print_struct(ndr, name, "dfs_StorageInfo");
 
361
        if (r == NULL) { ndr_print_null(ndr); return; }
 
362
        ndr->depth++;
 
363
        ndr_print_dfs_StorageState(ndr, "state", r->state);
 
364
        ndr_print_ptr(ndr, "server", r->server);
 
365
        ndr->depth++;
 
366
        if (r->server) {
 
367
                ndr_print_string(ndr, "server", r->server);
 
368
        }
 
369
        ndr->depth--;
 
370
        ndr_print_ptr(ndr, "share", r->share);
 
371
        ndr->depth++;
 
372
        if (r->share) {
 
373
                ndr_print_string(ndr, "share", r->share);
 
374
        }
 
375
        ndr->depth--;
 
376
        ndr->depth--;
 
377
}
 
378
 
 
379
static enum ndr_err_code ndr_push_dfs_Info3(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info3 *r)
 
380
{
 
381
        uint32_t cntr_stores_1;
 
382
        if (ndr_flags & NDR_SCALARS) {
 
383
                NDR_CHECK(ndr_push_align(ndr, 5));
 
384
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
 
385
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
 
386
                NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
 
387
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
 
388
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores));
 
389
                NDR_CHECK(ndr_push_trailer_align(ndr, 5));
 
390
        }
 
391
        if (ndr_flags & NDR_BUFFERS) {
 
392
                if (r->path) {
 
393
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
 
394
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
395
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
 
396
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
397
                }
 
398
                if (r->comment) {
 
399
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
 
400
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
401
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
 
402
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
403
                }
 
404
                if (r->stores) {
 
405
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_stores));
 
406
                        for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
 
407
                                NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
 
408
                        }
 
409
                        for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
 
410
                                NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
 
411
                        }
 
412
                }
 
413
        }
 
414
        return NDR_ERR_SUCCESS;
 
415
}
 
416
 
 
417
static enum ndr_err_code ndr_pull_dfs_Info3(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info3 *r)
 
418
{
 
419
        uint32_t _ptr_path;
 
420
        TALLOC_CTX *_mem_save_path_0;
 
421
        uint32_t _ptr_comment;
 
422
        TALLOC_CTX *_mem_save_comment_0;
 
423
        uint32_t _ptr_stores;
 
424
        uint32_t cntr_stores_1;
 
425
        TALLOC_CTX *_mem_save_stores_0;
 
426
        TALLOC_CTX *_mem_save_stores_1;
 
427
        if (ndr_flags & NDR_SCALARS) {
 
428
                NDR_CHECK(ndr_pull_align(ndr, 5));
 
429
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
 
430
                if (_ptr_path) {
 
431
                        NDR_PULL_ALLOC(ndr, r->path);
 
432
                } else {
 
433
                        r->path = NULL;
 
434
                }
 
435
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
 
436
                if (_ptr_comment) {
 
437
                        NDR_PULL_ALLOC(ndr, r->comment);
 
438
                } else {
 
439
                        r->comment = NULL;
 
440
                }
 
441
                NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
 
442
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
 
443
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores));
 
444
                if (_ptr_stores) {
 
445
                        NDR_PULL_ALLOC(ndr, r->stores);
 
446
                } else {
 
447
                        r->stores = NULL;
 
448
                }
 
449
                NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
 
450
        }
 
451
        if (ndr_flags & NDR_BUFFERS) {
 
452
                if (r->path) {
 
453
                        _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
454
                        NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
 
455
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
 
456
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
 
457
                        if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
 
458
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path));
 
459
                        }
 
460
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
 
461
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
 
462
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
 
463
                }
 
464
                if (r->comment) {
 
465
                        _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
466
                        NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
 
467
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
 
468
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
 
469
                        if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
 
470
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
 
471
                        }
 
472
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
 
473
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
 
474
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
 
475
                }
 
476
                if (r->stores) {
 
477
                        _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
478
                        NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
 
479
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->stores));
 
480
                        NDR_PULL_ALLOC_N(ndr, r->stores, ndr_get_array_size(ndr, &r->stores));
 
481
                        _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr);
 
482
                        NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
 
483
                        for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
 
484
                                NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
 
485
                        }
 
486
                        for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
 
487
                                NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
 
488
                        }
 
489
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0);
 
490
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0);
 
491
                }
 
492
                if (r->stores) {
 
493
                        NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores));
 
494
                }
 
495
        }
 
496
        return NDR_ERR_SUCCESS;
 
497
}
 
498
 
 
499
_PUBLIC_ void ndr_print_dfs_Info3(struct ndr_print *ndr, const char *name, const struct dfs_Info3 *r)
 
500
{
 
501
        uint32_t cntr_stores_1;
 
502
        ndr_print_struct(ndr, name, "dfs_Info3");
 
503
        if (r == NULL) { ndr_print_null(ndr); return; }
 
504
        ndr->depth++;
 
505
        ndr_print_ptr(ndr, "path", r->path);
 
506
        ndr->depth++;
 
507
        if (r->path) {
 
508
                ndr_print_string(ndr, "path", r->path);
 
509
        }
 
510
        ndr->depth--;
 
511
        ndr_print_ptr(ndr, "comment", r->comment);
 
512
        ndr->depth++;
 
513
        if (r->comment) {
 
514
                ndr_print_string(ndr, "comment", r->comment);
 
515
        }
 
516
        ndr->depth--;
 
517
        ndr_print_dfs_VolumeState(ndr, "state", r->state);
 
518
        ndr_print_uint32(ndr, "num_stores", r->num_stores);
 
519
        ndr_print_ptr(ndr, "stores", r->stores);
 
520
        ndr->depth++;
 
521
        if (r->stores) {
 
522
                ndr->print(ndr, "%s: ARRAY(%d)", "stores", (int)r->num_stores);
 
523
                ndr->depth++;
 
524
                for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
 
525
                        ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]);
 
526
                }
 
527
                ndr->depth--;
 
528
        }
 
529
        ndr->depth--;
 
530
        ndr->depth--;
 
531
}
 
532
 
 
533
static enum ndr_err_code ndr_push_dfs_Info4(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info4 *r)
 
534
{
 
535
        uint32_t cntr_stores_1;
 
536
        if (ndr_flags & NDR_SCALARS) {
 
537
                NDR_CHECK(ndr_push_align(ndr, 5));
 
538
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
 
539
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
 
540
                NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
 
541
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
 
542
                NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
 
543
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
 
544
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores));
 
545
                NDR_CHECK(ndr_push_trailer_align(ndr, 5));
 
546
        }
 
547
        if (ndr_flags & NDR_BUFFERS) {
 
548
                if (r->path) {
 
549
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
 
550
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
551
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
 
552
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
553
                }
 
554
                if (r->comment) {
 
555
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
 
556
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
557
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
 
558
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
559
                }
 
560
                if (r->stores) {
 
561
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_stores));
 
562
                        for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
 
563
                                NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
 
564
                        }
 
565
                        for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
 
566
                                NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
 
567
                        }
 
568
                }
 
569
        }
 
570
        return NDR_ERR_SUCCESS;
 
571
}
 
572
 
 
573
static enum ndr_err_code ndr_pull_dfs_Info4(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info4 *r)
 
574
{
 
575
        uint32_t _ptr_path;
 
576
        TALLOC_CTX *_mem_save_path_0;
 
577
        uint32_t _ptr_comment;
 
578
        TALLOC_CTX *_mem_save_comment_0;
 
579
        uint32_t _ptr_stores;
 
580
        uint32_t cntr_stores_1;
 
581
        TALLOC_CTX *_mem_save_stores_0;
 
582
        TALLOC_CTX *_mem_save_stores_1;
 
583
        if (ndr_flags & NDR_SCALARS) {
 
584
                NDR_CHECK(ndr_pull_align(ndr, 5));
 
585
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
 
586
                if (_ptr_path) {
 
587
                        NDR_PULL_ALLOC(ndr, r->path);
 
588
                } else {
 
589
                        r->path = NULL;
 
590
                }
 
591
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
 
592
                if (_ptr_comment) {
 
593
                        NDR_PULL_ALLOC(ndr, r->comment);
 
594
                } else {
 
595
                        r->comment = NULL;
 
596
                }
 
597
                NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
 
598
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
 
599
                NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
 
600
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
 
601
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores));
 
602
                if (_ptr_stores) {
 
603
                        NDR_PULL_ALLOC(ndr, r->stores);
 
604
                } else {
 
605
                        r->stores = NULL;
 
606
                }
 
607
                NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
 
608
        }
 
609
        if (ndr_flags & NDR_BUFFERS) {
 
610
                if (r->path) {
 
611
                        _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
612
                        NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
 
613
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
 
614
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
 
615
                        if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
 
616
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path));
 
617
                        }
 
618
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
 
619
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
 
620
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
 
621
                }
 
622
                if (r->comment) {
 
623
                        _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
624
                        NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
 
625
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
 
626
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
 
627
                        if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
 
628
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
 
629
                        }
 
630
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
 
631
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
 
632
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
 
633
                }
 
634
                if (r->stores) {
 
635
                        _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
636
                        NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
 
637
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->stores));
 
638
                        NDR_PULL_ALLOC_N(ndr, r->stores, ndr_get_array_size(ndr, &r->stores));
 
639
                        _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr);
 
640
                        NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
 
641
                        for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
 
642
                                NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
 
643
                        }
 
644
                        for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
 
645
                                NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
 
646
                        }
 
647
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0);
 
648
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0);
 
649
                }
 
650
                if (r->stores) {
 
651
                        NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores));
 
652
                }
 
653
        }
 
654
        return NDR_ERR_SUCCESS;
 
655
}
 
656
 
 
657
_PUBLIC_ void ndr_print_dfs_Info4(struct ndr_print *ndr, const char *name, const struct dfs_Info4 *r)
 
658
{
 
659
        uint32_t cntr_stores_1;
 
660
        ndr_print_struct(ndr, name, "dfs_Info4");
 
661
        if (r == NULL) { ndr_print_null(ndr); return; }
 
662
        ndr->depth++;
 
663
        ndr_print_ptr(ndr, "path", r->path);
 
664
        ndr->depth++;
 
665
        if (r->path) {
 
666
                ndr_print_string(ndr, "path", r->path);
 
667
        }
 
668
        ndr->depth--;
 
669
        ndr_print_ptr(ndr, "comment", r->comment);
 
670
        ndr->depth++;
 
671
        if (r->comment) {
 
672
                ndr_print_string(ndr, "comment", r->comment);
 
673
        }
 
674
        ndr->depth--;
 
675
        ndr_print_dfs_VolumeState(ndr, "state", r->state);
 
676
        ndr_print_uint32(ndr, "timeout", r->timeout);
 
677
        ndr_print_GUID(ndr, "guid", &r->guid);
 
678
        ndr_print_uint32(ndr, "num_stores", r->num_stores);
 
679
        ndr_print_ptr(ndr, "stores", r->stores);
 
680
        ndr->depth++;
 
681
        if (r->stores) {
 
682
                ndr->print(ndr, "%s: ARRAY(%d)", "stores", (int)r->num_stores);
 
683
                ndr->depth++;
 
684
                for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
 
685
                        ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]);
 
686
                }
 
687
                ndr->depth--;
 
688
        }
 
689
        ndr->depth--;
 
690
        ndr->depth--;
 
691
}
 
692
 
 
693
_PUBLIC_ enum ndr_err_code ndr_push_dfs_PropertyFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
 
694
{
 
695
        NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
 
696
        return NDR_ERR_SUCCESS;
 
697
}
 
698
 
 
699
_PUBLIC_ enum ndr_err_code ndr_pull_dfs_PropertyFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
 
700
{
 
701
        uint32_t v;
 
702
        NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
 
703
        *r = v;
 
704
        return NDR_ERR_SUCCESS;
 
705
}
 
706
 
 
707
_PUBLIC_ void ndr_print_dfs_PropertyFlags(struct ndr_print *ndr, const char *name, uint32_t r)
 
708
{
 
709
        ndr_print_uint32(ndr, name, r);
 
710
        ndr->depth++;
 
711
        ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_INSITE_REFERRALS", DFS_PROPERTY_FLAG_INSITE_REFERRALS, r);
 
712
        ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_ROOT_SCALABILITY", DFS_PROPERTY_FLAG_ROOT_SCALABILITY, r);
 
713
        ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_SITE_COSTING", DFS_PROPERTY_FLAG_SITE_COSTING, r);
 
714
        ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_TARGET_FAILBACK", DFS_PROPERTY_FLAG_TARGET_FAILBACK, r);
 
715
        ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_CLUSTER_ENABLED", DFS_PROPERTY_FLAG_CLUSTER_ENABLED, r);
 
716
        ndr->depth--;
 
717
}
 
718
 
 
719
static enum ndr_err_code ndr_push_dfs_Info5(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info5 *r)
 
720
{
 
721
        if (ndr_flags & NDR_SCALARS) {
 
722
                NDR_CHECK(ndr_push_align(ndr, 5));
 
723
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
 
724
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
 
725
                NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
 
726
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
 
727
                NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
 
728
                NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags));
 
729
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pktsize));
 
730
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
 
731
                NDR_CHECK(ndr_push_trailer_align(ndr, 5));
 
732
        }
 
733
        if (ndr_flags & NDR_BUFFERS) {
 
734
                if (r->path) {
 
735
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
 
736
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
737
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
 
738
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
739
                }
 
740
                if (r->comment) {
 
741
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
 
742
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
743
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
 
744
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
745
                }
 
746
        }
 
747
        return NDR_ERR_SUCCESS;
 
748
}
 
749
 
 
750
static enum ndr_err_code ndr_pull_dfs_Info5(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info5 *r)
 
751
{
 
752
        uint32_t _ptr_path;
 
753
        TALLOC_CTX *_mem_save_path_0;
 
754
        uint32_t _ptr_comment;
 
755
        TALLOC_CTX *_mem_save_comment_0;
 
756
        if (ndr_flags & NDR_SCALARS) {
 
757
                NDR_CHECK(ndr_pull_align(ndr, 5));
 
758
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
 
759
                if (_ptr_path) {
 
760
                        NDR_PULL_ALLOC(ndr, r->path);
 
761
                } else {
 
762
                        r->path = NULL;
 
763
                }
 
764
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
 
765
                if (_ptr_comment) {
 
766
                        NDR_PULL_ALLOC(ndr, r->comment);
 
767
                } else {
 
768
                        r->comment = NULL;
 
769
                }
 
770
                NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
 
771
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
 
772
                NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
 
773
                NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags));
 
774
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pktsize));
 
775
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
 
776
                NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
 
777
        }
 
778
        if (ndr_flags & NDR_BUFFERS) {
 
779
                if (r->path) {
 
780
                        _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
781
                        NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
 
782
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
 
783
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
 
784
                        if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
 
785
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path));
 
786
                        }
 
787
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
 
788
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
 
789
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
 
790
                }
 
791
                if (r->comment) {
 
792
                        _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
793
                        NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
 
794
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
 
795
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
 
796
                        if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
 
797
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
 
798
                        }
 
799
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
 
800
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
 
801
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
 
802
                }
 
803
        }
 
804
        return NDR_ERR_SUCCESS;
 
805
}
 
806
 
 
807
_PUBLIC_ void ndr_print_dfs_Info5(struct ndr_print *ndr, const char *name, const struct dfs_Info5 *r)
 
808
{
 
809
        ndr_print_struct(ndr, name, "dfs_Info5");
 
810
        if (r == NULL) { ndr_print_null(ndr); return; }
 
811
        ndr->depth++;
 
812
        ndr_print_ptr(ndr, "path", r->path);
 
813
        ndr->depth++;
 
814
        if (r->path) {
 
815
                ndr_print_string(ndr, "path", r->path);
 
816
        }
 
817
        ndr->depth--;
 
818
        ndr_print_ptr(ndr, "comment", r->comment);
 
819
        ndr->depth++;
 
820
        if (r->comment) {
 
821
                ndr_print_string(ndr, "comment", r->comment);
 
822
        }
 
823
        ndr->depth--;
 
824
        ndr_print_dfs_VolumeState(ndr, "state", r->state);
 
825
        ndr_print_uint32(ndr, "timeout", r->timeout);
 
826
        ndr_print_GUID(ndr, "guid", &r->guid);
 
827
        ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags);
 
828
        ndr_print_uint32(ndr, "pktsize", r->pktsize);
 
829
        ndr_print_uint32(ndr, "num_stores", r->num_stores);
 
830
        ndr->depth--;
 
831
}
 
832
 
 
833
static enum ndr_err_code ndr_push_dfs_Target_PriorityClass(struct ndr_push *ndr, int ndr_flags, enum dfs_Target_PriorityClass r)
 
834
{
 
835
        NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
 
836
        return NDR_ERR_SUCCESS;
 
837
}
 
838
 
 
839
static enum ndr_err_code ndr_pull_dfs_Target_PriorityClass(struct ndr_pull *ndr, int ndr_flags, enum dfs_Target_PriorityClass *r)
 
840
{
 
841
        uint32_t v;
 
842
        NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
 
843
        *r = v;
 
844
        return NDR_ERR_SUCCESS;
 
845
}
 
846
 
 
847
_PUBLIC_ void ndr_print_dfs_Target_PriorityClass(struct ndr_print *ndr, const char *name, enum dfs_Target_PriorityClass r)
 
848
{
 
849
        const char *val = NULL;
 
850
 
 
851
        switch (r) {
 
852
                case DFS_INVALID_PRIORITY_CLASS: val = "DFS_INVALID_PRIORITY_CLASS"; break;
 
853
                case DFS_SITE_COST_NORMAL_PRIORITY_CLASS: val = "DFS_SITE_COST_NORMAL_PRIORITY_CLASS"; break;
 
854
                case DFS_GLOBAL_HIGH_PRIORITY_CLASS: val = "DFS_GLOBAL_HIGH_PRIORITY_CLASS"; break;
 
855
                case DFS_SITE_COST_HIGH_PRIORITY_CLASS: val = "DFS_SITE_COST_HIGH_PRIORITY_CLASS"; break;
 
856
                case DFS_SITE_COST_LOW_PRIORITY_CLASS: val = "DFS_SITE_COST_LOW_PRIORITY_CLASS"; break;
 
857
                case DFS_GLOBAL_LOW_PRIORITY_CLASS: val = "DFS_GLOBAL_LOW_PRIORITY_CLASS"; break;
 
858
        }
 
859
        ndr_print_enum(ndr, name, "ENUM", val, r);
 
860
}
 
861
 
 
862
static enum ndr_err_code ndr_push_dfs_Target_Priority(struct ndr_push *ndr, int ndr_flags, const struct dfs_Target_Priority *r)
 
863
{
 
864
        if (ndr_flags & NDR_SCALARS) {
 
865
                NDR_CHECK(ndr_push_align(ndr, 4));
 
866
                NDR_CHECK(ndr_push_dfs_Target_PriorityClass(ndr, NDR_SCALARS, r->target_priority_class));
 
867
                NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->target_priority_rank));
 
868
                NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved));
 
869
                NDR_CHECK(ndr_push_trailer_align(ndr, 4));
 
870
        }
 
871
        if (ndr_flags & NDR_BUFFERS) {
 
872
        }
 
873
        return NDR_ERR_SUCCESS;
 
874
}
 
875
 
 
876
static enum ndr_err_code ndr_pull_dfs_Target_Priority(struct ndr_pull *ndr, int ndr_flags, struct dfs_Target_Priority *r)
 
877
{
 
878
        if (ndr_flags & NDR_SCALARS) {
 
879
                NDR_CHECK(ndr_pull_align(ndr, 4));
 
880
                NDR_CHECK(ndr_pull_dfs_Target_PriorityClass(ndr, NDR_SCALARS, &r->target_priority_class));
 
881
                NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->target_priority_rank));
 
882
                NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved));
 
883
                NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
 
884
        }
 
885
        if (ndr_flags & NDR_BUFFERS) {
 
886
        }
 
887
        return NDR_ERR_SUCCESS;
 
888
}
 
889
 
 
890
_PUBLIC_ void ndr_print_dfs_Target_Priority(struct ndr_print *ndr, const char *name, const struct dfs_Target_Priority *r)
 
891
{
 
892
        ndr_print_struct(ndr, name, "dfs_Target_Priority");
 
893
        if (r == NULL) { ndr_print_null(ndr); return; }
 
894
        ndr->depth++;
 
895
        ndr_print_dfs_Target_PriorityClass(ndr, "target_priority_class", r->target_priority_class);
 
896
        ndr_print_uint16(ndr, "target_priority_rank", r->target_priority_rank);
 
897
        ndr_print_uint16(ndr, "reserved", r->reserved);
 
898
        ndr->depth--;
 
899
}
 
900
 
 
901
static enum ndr_err_code ndr_push_dfs_StorageInfo2(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo2 *r)
 
902
{
 
903
        if (ndr_flags & NDR_SCALARS) {
 
904
                NDR_CHECK(ndr_push_align(ndr, 5));
 
905
                NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->info));
 
906
                NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->target_priority));
 
907
                NDR_CHECK(ndr_push_trailer_align(ndr, 5));
 
908
        }
 
909
        if (ndr_flags & NDR_BUFFERS) {
 
910
                NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->info));
 
911
        }
 
912
        return NDR_ERR_SUCCESS;
 
913
}
 
914
 
 
915
static enum ndr_err_code ndr_pull_dfs_StorageInfo2(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo2 *r)
 
916
{
 
917
        if (ndr_flags & NDR_SCALARS) {
 
918
                NDR_CHECK(ndr_pull_align(ndr, 5));
 
919
                NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->info));
 
920
                NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->target_priority));
 
921
                NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
 
922
        }
 
923
        if (ndr_flags & NDR_BUFFERS) {
 
924
                NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->info));
 
925
        }
 
926
        return NDR_ERR_SUCCESS;
 
927
}
 
928
 
 
929
_PUBLIC_ void ndr_print_dfs_StorageInfo2(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo2 *r)
 
930
{
 
931
        ndr_print_struct(ndr, name, "dfs_StorageInfo2");
 
932
        if (r == NULL) { ndr_print_null(ndr); return; }
 
933
        ndr->depth++;
 
934
        ndr_print_dfs_StorageInfo(ndr, "info", &r->info);
 
935
        ndr_print_dfs_Target_Priority(ndr, "target_priority", &r->target_priority);
 
936
        ndr->depth--;
 
937
}
 
938
 
 
939
static enum ndr_err_code ndr_push_dfs_Info6(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info6 *r)
 
940
{
 
941
        uint32_t cntr_stores_1;
 
942
        if (ndr_flags & NDR_SCALARS) {
 
943
                NDR_CHECK(ndr_push_align(ndr, 5));
 
944
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->entry_path));
 
945
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
 
946
                NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
 
947
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
 
948
                NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
 
949
                NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags));
 
950
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pktsize));
 
951
                NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_stores));
 
952
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores));
 
953
                NDR_CHECK(ndr_push_trailer_align(ndr, 5));
 
954
        }
 
955
        if (ndr_flags & NDR_BUFFERS) {
 
956
                if (r->entry_path) {
 
957
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->entry_path, CH_UTF16)));
 
958
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
959
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->entry_path, CH_UTF16)));
 
960
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->entry_path, ndr_charset_length(r->entry_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
961
                }
 
962
                if (r->comment) {
 
963
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
 
964
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
965
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
 
966
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
967
                }
 
968
                if (r->stores) {
 
969
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_stores));
 
970
                        for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
 
971
                                NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
 
972
                        }
 
973
                        for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
 
974
                                NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
 
975
                        }
 
976
                }
 
977
        }
 
978
        return NDR_ERR_SUCCESS;
 
979
}
 
980
 
 
981
static enum ndr_err_code ndr_pull_dfs_Info6(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info6 *r)
 
982
{
 
983
        uint32_t _ptr_entry_path;
 
984
        TALLOC_CTX *_mem_save_entry_path_0;
 
985
        uint32_t _ptr_comment;
 
986
        TALLOC_CTX *_mem_save_comment_0;
 
987
        uint32_t _ptr_stores;
 
988
        uint32_t cntr_stores_1;
 
989
        TALLOC_CTX *_mem_save_stores_0;
 
990
        TALLOC_CTX *_mem_save_stores_1;
 
991
        if (ndr_flags & NDR_SCALARS) {
 
992
                NDR_CHECK(ndr_pull_align(ndr, 5));
 
993
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entry_path));
 
994
                if (_ptr_entry_path) {
 
995
                        NDR_PULL_ALLOC(ndr, r->entry_path);
 
996
                } else {
 
997
                        r->entry_path = NULL;
 
998
                }
 
999
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
 
1000
                if (_ptr_comment) {
 
1001
                        NDR_PULL_ALLOC(ndr, r->comment);
 
1002
                } else {
 
1003
                        r->comment = NULL;
 
1004
                }
 
1005
                NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
 
1006
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
 
1007
                NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
 
1008
                NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags));
 
1009
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pktsize));
 
1010
                NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_stores));
 
1011
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores));
 
1012
                if (_ptr_stores) {
 
1013
                        NDR_PULL_ALLOC(ndr, r->stores);
 
1014
                } else {
 
1015
                        r->stores = NULL;
 
1016
                }
 
1017
                NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
 
1018
        }
 
1019
        if (ndr_flags & NDR_BUFFERS) {
 
1020
                if (r->entry_path) {
 
1021
                        _mem_save_entry_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
1022
                        NDR_PULL_SET_MEM_CTX(ndr, r->entry_path, 0);
 
1023
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->entry_path));
 
1024
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->entry_path));
 
1025
                        if (ndr_get_array_length(ndr, &r->entry_path) > ndr_get_array_size(ndr, &r->entry_path)) {
 
1026
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->entry_path), ndr_get_array_length(ndr, &r->entry_path));
 
1027
                        }
 
1028
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->entry_path), sizeof(uint16_t)));
 
1029
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->entry_path, ndr_get_array_length(ndr, &r->entry_path), sizeof(uint16_t), CH_UTF16));
 
1030
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_path_0, 0);
 
1031
                }
 
1032
                if (r->comment) {
 
1033
                        _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
1034
                        NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
 
1035
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
 
1036
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
 
1037
                        if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
 
1038
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
 
1039
                        }
 
1040
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
 
1041
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
 
1042
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
 
1043
                }
 
1044
                if (r->stores) {
 
1045
                        _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
1046
                        NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
 
1047
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->stores));
 
1048
                        NDR_PULL_ALLOC_N(ndr, r->stores, ndr_get_array_size(ndr, &r->stores));
 
1049
                        _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr);
 
1050
                        NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
 
1051
                        for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
 
1052
                                NDR_CHECK(ndr_pull_dfs_StorageInfo2(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
 
1053
                        }
 
1054
                        for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
 
1055
                                NDR_CHECK(ndr_pull_dfs_StorageInfo2(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
 
1056
                        }
 
1057
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0);
 
1058
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0);
 
1059
                }
 
1060
                if (r->stores) {
 
1061
                        NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores));
 
1062
                }
 
1063
        }
 
1064
        return NDR_ERR_SUCCESS;
 
1065
}
 
1066
 
 
1067
_PUBLIC_ void ndr_print_dfs_Info6(struct ndr_print *ndr, const char *name, const struct dfs_Info6 *r)
 
1068
{
 
1069
        uint32_t cntr_stores_1;
 
1070
        ndr_print_struct(ndr, name, "dfs_Info6");
 
1071
        if (r == NULL) { ndr_print_null(ndr); return; }
 
1072
        ndr->depth++;
 
1073
        ndr_print_ptr(ndr, "entry_path", r->entry_path);
 
1074
        ndr->depth++;
 
1075
        if (r->entry_path) {
 
1076
                ndr_print_string(ndr, "entry_path", r->entry_path);
 
1077
        }
 
1078
        ndr->depth--;
 
1079
        ndr_print_ptr(ndr, "comment", r->comment);
 
1080
        ndr->depth++;
 
1081
        if (r->comment) {
 
1082
                ndr_print_string(ndr, "comment", r->comment);
 
1083
        }
 
1084
        ndr->depth--;
 
1085
        ndr_print_dfs_VolumeState(ndr, "state", r->state);
 
1086
        ndr_print_uint32(ndr, "timeout", r->timeout);
 
1087
        ndr_print_GUID(ndr, "guid", &r->guid);
 
1088
        ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags);
 
1089
        ndr_print_uint32(ndr, "pktsize", r->pktsize);
 
1090
        ndr_print_uint16(ndr, "num_stores", r->num_stores);
 
1091
        ndr_print_ptr(ndr, "stores", r->stores);
 
1092
        ndr->depth++;
 
1093
        if (r->stores) {
 
1094
                ndr->print(ndr, "%s: ARRAY(%d)", "stores", (int)r->num_stores);
 
1095
                ndr->depth++;
 
1096
                for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
 
1097
                        ndr_print_dfs_StorageInfo2(ndr, "stores", &r->stores[cntr_stores_1]);
 
1098
                }
 
1099
                ndr->depth--;
 
1100
        }
 
1101
        ndr->depth--;
 
1102
        ndr->depth--;
 
1103
}
 
1104
 
 
1105
static enum ndr_err_code ndr_push_dfs_Info7(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info7 *r)
 
1106
{
 
1107
        if (ndr_flags & NDR_SCALARS) {
 
1108
                NDR_CHECK(ndr_push_align(ndr, 4));
 
1109
                NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->generation_guid));
 
1110
                NDR_CHECK(ndr_push_trailer_align(ndr, 4));
 
1111
        }
 
1112
        if (ndr_flags & NDR_BUFFERS) {
 
1113
        }
 
1114
        return NDR_ERR_SUCCESS;
 
1115
}
 
1116
 
 
1117
static enum ndr_err_code ndr_pull_dfs_Info7(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info7 *r)
 
1118
{
 
1119
        if (ndr_flags & NDR_SCALARS) {
 
1120
                NDR_CHECK(ndr_pull_align(ndr, 4));
 
1121
                NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->generation_guid));
 
1122
                NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
 
1123
        }
 
1124
        if (ndr_flags & NDR_BUFFERS) {
 
1125
        }
 
1126
        return NDR_ERR_SUCCESS;
 
1127
}
 
1128
 
 
1129
_PUBLIC_ void ndr_print_dfs_Info7(struct ndr_print *ndr, const char *name, const struct dfs_Info7 *r)
 
1130
{
 
1131
        ndr_print_struct(ndr, name, "dfs_Info7");
 
1132
        if (r == NULL) { ndr_print_null(ndr); return; }
 
1133
        ndr->depth++;
 
1134
        ndr_print_GUID(ndr, "generation_guid", &r->generation_guid);
 
1135
        ndr->depth--;
 
1136
}
 
1137
 
 
1138
static enum ndr_err_code ndr_push_dfs_Info100(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info100 *r)
 
1139
{
 
1140
        if (ndr_flags & NDR_SCALARS) {
 
1141
                NDR_CHECK(ndr_push_align(ndr, 5));
 
1142
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
 
1143
                NDR_CHECK(ndr_push_trailer_align(ndr, 5));
 
1144
        }
 
1145
        if (ndr_flags & NDR_BUFFERS) {
 
1146
                if (r->comment) {
 
1147
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
 
1148
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
1149
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
 
1150
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
1151
                }
 
1152
        }
 
1153
        return NDR_ERR_SUCCESS;
 
1154
}
 
1155
 
 
1156
static enum ndr_err_code ndr_pull_dfs_Info100(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info100 *r)
 
1157
{
 
1158
        uint32_t _ptr_comment;
 
1159
        TALLOC_CTX *_mem_save_comment_0;
 
1160
        if (ndr_flags & NDR_SCALARS) {
 
1161
                NDR_CHECK(ndr_pull_align(ndr, 5));
 
1162
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
 
1163
                if (_ptr_comment) {
 
1164
                        NDR_PULL_ALLOC(ndr, r->comment);
 
1165
                } else {
 
1166
                        r->comment = NULL;
 
1167
                }
 
1168
                NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
 
1169
        }
 
1170
        if (ndr_flags & NDR_BUFFERS) {
 
1171
                if (r->comment) {
 
1172
                        _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
1173
                        NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
 
1174
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
 
1175
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
 
1176
                        if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
 
1177
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
 
1178
                        }
 
1179
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
 
1180
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
 
1181
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
 
1182
                }
 
1183
        }
 
1184
        return NDR_ERR_SUCCESS;
 
1185
}
 
1186
 
 
1187
_PUBLIC_ void ndr_print_dfs_Info100(struct ndr_print *ndr, const char *name, const struct dfs_Info100 *r)
 
1188
{
 
1189
        ndr_print_struct(ndr, name, "dfs_Info100");
 
1190
        if (r == NULL) { ndr_print_null(ndr); return; }
 
1191
        ndr->depth++;
 
1192
        ndr_print_ptr(ndr, "comment", r->comment);
 
1193
        ndr->depth++;
 
1194
        if (r->comment) {
 
1195
                ndr_print_string(ndr, "comment", r->comment);
 
1196
        }
 
1197
        ndr->depth--;
 
1198
        ndr->depth--;
 
1199
}
 
1200
 
 
1201
static enum ndr_err_code ndr_push_dfs_Info101(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info101 *r)
 
1202
{
 
1203
        if (ndr_flags & NDR_SCALARS) {
 
1204
                NDR_CHECK(ndr_push_align(ndr, 4));
 
1205
                NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state));
 
1206
                NDR_CHECK(ndr_push_trailer_align(ndr, 4));
 
1207
        }
 
1208
        if (ndr_flags & NDR_BUFFERS) {
 
1209
        }
 
1210
        return NDR_ERR_SUCCESS;
 
1211
}
 
1212
 
 
1213
static enum ndr_err_code ndr_pull_dfs_Info101(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info101 *r)
 
1214
{
 
1215
        if (ndr_flags & NDR_SCALARS) {
 
1216
                NDR_CHECK(ndr_pull_align(ndr, 4));
 
1217
                NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state));
 
1218
                NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
 
1219
        }
 
1220
        if (ndr_flags & NDR_BUFFERS) {
 
1221
        }
 
1222
        return NDR_ERR_SUCCESS;
 
1223
}
 
1224
 
 
1225
_PUBLIC_ void ndr_print_dfs_Info101(struct ndr_print *ndr, const char *name, const struct dfs_Info101 *r)
 
1226
{
 
1227
        ndr_print_struct(ndr, name, "dfs_Info101");
 
1228
        if (r == NULL) { ndr_print_null(ndr); return; }
 
1229
        ndr->depth++;
 
1230
        ndr_print_dfs_StorageState(ndr, "state", r->state);
 
1231
        ndr->depth--;
 
1232
}
 
1233
 
 
1234
static enum ndr_err_code ndr_push_dfs_Info102(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info102 *r)
 
1235
{
 
1236
        if (ndr_flags & NDR_SCALARS) {
 
1237
                NDR_CHECK(ndr_push_align(ndr, 4));
 
1238
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
 
1239
                NDR_CHECK(ndr_push_trailer_align(ndr, 4));
 
1240
        }
 
1241
        if (ndr_flags & NDR_BUFFERS) {
 
1242
        }
 
1243
        return NDR_ERR_SUCCESS;
 
1244
}
 
1245
 
 
1246
static enum ndr_err_code ndr_pull_dfs_Info102(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info102 *r)
 
1247
{
 
1248
        if (ndr_flags & NDR_SCALARS) {
 
1249
                NDR_CHECK(ndr_pull_align(ndr, 4));
 
1250
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
 
1251
                NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
 
1252
        }
 
1253
        if (ndr_flags & NDR_BUFFERS) {
 
1254
        }
 
1255
        return NDR_ERR_SUCCESS;
 
1256
}
 
1257
 
 
1258
_PUBLIC_ void ndr_print_dfs_Info102(struct ndr_print *ndr, const char *name, const struct dfs_Info102 *r)
 
1259
{
 
1260
        ndr_print_struct(ndr, name, "dfs_Info102");
 
1261
        if (r == NULL) { ndr_print_null(ndr); return; }
 
1262
        ndr->depth++;
 
1263
        ndr_print_uint32(ndr, "timeout", r->timeout);
 
1264
        ndr->depth--;
 
1265
}
 
1266
 
 
1267
static enum ndr_err_code ndr_push_dfs_Info103(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info103 *r)
 
1268
{
 
1269
        if (ndr_flags & NDR_SCALARS) {
 
1270
                NDR_CHECK(ndr_push_align(ndr, 4));
 
1271
                NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags));
 
1272
                NDR_CHECK(ndr_push_trailer_align(ndr, 4));
 
1273
        }
 
1274
        if (ndr_flags & NDR_BUFFERS) {
 
1275
        }
 
1276
        return NDR_ERR_SUCCESS;
 
1277
}
 
1278
 
 
1279
static enum ndr_err_code ndr_pull_dfs_Info103(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info103 *r)
 
1280
{
 
1281
        if (ndr_flags & NDR_SCALARS) {
 
1282
                NDR_CHECK(ndr_pull_align(ndr, 4));
 
1283
                NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags));
 
1284
                NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
 
1285
        }
 
1286
        if (ndr_flags & NDR_BUFFERS) {
 
1287
        }
 
1288
        return NDR_ERR_SUCCESS;
 
1289
}
 
1290
 
 
1291
_PUBLIC_ void ndr_print_dfs_Info103(struct ndr_print *ndr, const char *name, const struct dfs_Info103 *r)
 
1292
{
 
1293
        ndr_print_struct(ndr, name, "dfs_Info103");
 
1294
        if (r == NULL) { ndr_print_null(ndr); return; }
 
1295
        ndr->depth++;
 
1296
        ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags);
 
1297
        ndr->depth--;
 
1298
}
 
1299
 
 
1300
static enum ndr_err_code ndr_push_dfs_Info104(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info104 *r)
 
1301
{
 
1302
        if (ndr_flags & NDR_SCALARS) {
 
1303
                NDR_CHECK(ndr_push_align(ndr, 4));
 
1304
                NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
 
1305
                NDR_CHECK(ndr_push_trailer_align(ndr, 4));
 
1306
        }
 
1307
        if (ndr_flags & NDR_BUFFERS) {
 
1308
        }
 
1309
        return NDR_ERR_SUCCESS;
 
1310
}
 
1311
 
 
1312
static enum ndr_err_code ndr_pull_dfs_Info104(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info104 *r)
 
1313
{
 
1314
        if (ndr_flags & NDR_SCALARS) {
 
1315
                NDR_CHECK(ndr_pull_align(ndr, 4));
 
1316
                NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
 
1317
                NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
 
1318
        }
 
1319
        if (ndr_flags & NDR_BUFFERS) {
 
1320
        }
 
1321
        return NDR_ERR_SUCCESS;
 
1322
}
 
1323
 
 
1324
_PUBLIC_ void ndr_print_dfs_Info104(struct ndr_print *ndr, const char *name, const struct dfs_Info104 *r)
 
1325
{
 
1326
        ndr_print_struct(ndr, name, "dfs_Info104");
 
1327
        if (r == NULL) { ndr_print_null(ndr); return; }
 
1328
        ndr->depth++;
 
1329
        ndr_print_dfs_Target_Priority(ndr, "priority", &r->priority);
 
1330
        ndr->depth--;
 
1331
}
 
1332
 
 
1333
static enum ndr_err_code ndr_push_dfs_Info105(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info105 *r)
 
1334
{
 
1335
        if (ndr_flags & NDR_SCALARS) {
 
1336
                NDR_CHECK(ndr_push_align(ndr, 5));
 
1337
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
 
1338
                NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
 
1339
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
 
1340
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->property_flag_mask));
 
1341
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->property_flags));
 
1342
                NDR_CHECK(ndr_push_trailer_align(ndr, 5));
 
1343
        }
 
1344
        if (ndr_flags & NDR_BUFFERS) {
 
1345
                if (r->comment) {
 
1346
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
 
1347
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
1348
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
 
1349
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
1350
                }
 
1351
        }
 
1352
        return NDR_ERR_SUCCESS;
 
1353
}
 
1354
 
 
1355
static enum ndr_err_code ndr_pull_dfs_Info105(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info105 *r)
 
1356
{
 
1357
        uint32_t _ptr_comment;
 
1358
        TALLOC_CTX *_mem_save_comment_0;
 
1359
        if (ndr_flags & NDR_SCALARS) {
 
1360
                NDR_CHECK(ndr_pull_align(ndr, 5));
 
1361
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
 
1362
                if (_ptr_comment) {
 
1363
                        NDR_PULL_ALLOC(ndr, r->comment);
 
1364
                } else {
 
1365
                        r->comment = NULL;
 
1366
                }
 
1367
                NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
 
1368
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
 
1369
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->property_flag_mask));
 
1370
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->property_flags));
 
1371
                NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
 
1372
        }
 
1373
        if (ndr_flags & NDR_BUFFERS) {
 
1374
                if (r->comment) {
 
1375
                        _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
1376
                        NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
 
1377
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
 
1378
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
 
1379
                        if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
 
1380
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
 
1381
                        }
 
1382
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
 
1383
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
 
1384
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
 
1385
                }
 
1386
        }
 
1387
        return NDR_ERR_SUCCESS;
 
1388
}
 
1389
 
 
1390
_PUBLIC_ void ndr_print_dfs_Info105(struct ndr_print *ndr, const char *name, const struct dfs_Info105 *r)
 
1391
{
 
1392
        ndr_print_struct(ndr, name, "dfs_Info105");
 
1393
        if (r == NULL) { ndr_print_null(ndr); return; }
 
1394
        ndr->depth++;
 
1395
        ndr_print_ptr(ndr, "comment", r->comment);
 
1396
        ndr->depth++;
 
1397
        if (r->comment) {
 
1398
                ndr_print_string(ndr, "comment", r->comment);
 
1399
        }
 
1400
        ndr->depth--;
 
1401
        ndr_print_dfs_VolumeState(ndr, "state", r->state);
 
1402
        ndr_print_uint32(ndr, "timeout", r->timeout);
 
1403
        ndr_print_uint32(ndr, "property_flag_mask", r->property_flag_mask);
 
1404
        ndr_print_uint32(ndr, "property_flags", r->property_flags);
 
1405
        ndr->depth--;
 
1406
}
 
1407
 
 
1408
static enum ndr_err_code ndr_push_dfs_Info106(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info106 *r)
 
1409
{
 
1410
        if (ndr_flags & NDR_SCALARS) {
 
1411
                NDR_CHECK(ndr_push_align(ndr, 4));
 
1412
                NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state));
 
1413
                NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
 
1414
                NDR_CHECK(ndr_push_trailer_align(ndr, 4));
 
1415
        }
 
1416
        if (ndr_flags & NDR_BUFFERS) {
 
1417
        }
 
1418
        return NDR_ERR_SUCCESS;
 
1419
}
 
1420
 
 
1421
static enum ndr_err_code ndr_pull_dfs_Info106(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info106 *r)
 
1422
{
 
1423
        if (ndr_flags & NDR_SCALARS) {
 
1424
                NDR_CHECK(ndr_pull_align(ndr, 4));
 
1425
                NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state));
 
1426
                NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
 
1427
                NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
 
1428
        }
 
1429
        if (ndr_flags & NDR_BUFFERS) {
 
1430
        }
 
1431
        return NDR_ERR_SUCCESS;
 
1432
}
 
1433
 
 
1434
_PUBLIC_ void ndr_print_dfs_Info106(struct ndr_print *ndr, const char *name, const struct dfs_Info106 *r)
 
1435
{
 
1436
        ndr_print_struct(ndr, name, "dfs_Info106");
 
1437
        if (r == NULL) { ndr_print_null(ndr); return; }
 
1438
        ndr->depth++;
 
1439
        ndr_print_dfs_StorageState(ndr, "state", r->state);
 
1440
        ndr_print_dfs_Target_Priority(ndr, "priority", &r->priority);
 
1441
        ndr->depth--;
 
1442
}
 
1443
 
 
1444
static enum ndr_err_code ndr_push_dfs_Info200(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info200 *r)
 
1445
{
 
1446
        if (ndr_flags & NDR_SCALARS) {
 
1447
                NDR_CHECK(ndr_push_align(ndr, 5));
 
1448
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->dom_root));
 
1449
                NDR_CHECK(ndr_push_trailer_align(ndr, 5));
 
1450
        }
 
1451
        if (ndr_flags & NDR_BUFFERS) {
 
1452
                if (r->dom_root) {
 
1453
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
 
1454
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
1455
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
 
1456
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dom_root, ndr_charset_length(r->dom_root, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
1457
                }
 
1458
        }
 
1459
        return NDR_ERR_SUCCESS;
 
1460
}
 
1461
 
 
1462
static enum ndr_err_code ndr_pull_dfs_Info200(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info200 *r)
 
1463
{
 
1464
        uint32_t _ptr_dom_root;
 
1465
        TALLOC_CTX *_mem_save_dom_root_0;
 
1466
        if (ndr_flags & NDR_SCALARS) {
 
1467
                NDR_CHECK(ndr_pull_align(ndr, 5));
 
1468
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_root));
 
1469
                if (_ptr_dom_root) {
 
1470
                        NDR_PULL_ALLOC(ndr, r->dom_root);
 
1471
                } else {
 
1472
                        r->dom_root = NULL;
 
1473
                }
 
1474
                NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
 
1475
        }
 
1476
        if (ndr_flags & NDR_BUFFERS) {
 
1477
                if (r->dom_root) {
 
1478
                        _mem_save_dom_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
1479
                        NDR_PULL_SET_MEM_CTX(ndr, r->dom_root, 0);
 
1480
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->dom_root));
 
1481
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->dom_root));
 
1482
                        if (ndr_get_array_length(ndr, &r->dom_root) > ndr_get_array_size(ndr, &r->dom_root)) {
 
1483
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->dom_root), ndr_get_array_length(ndr, &r->dom_root));
 
1484
                        }
 
1485
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t)));
 
1486
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dom_root, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t), CH_UTF16));
 
1487
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_root_0, 0);
 
1488
                }
 
1489
        }
 
1490
        return NDR_ERR_SUCCESS;
 
1491
}
 
1492
 
 
1493
_PUBLIC_ void ndr_print_dfs_Info200(struct ndr_print *ndr, const char *name, const struct dfs_Info200 *r)
 
1494
{
 
1495
        ndr_print_struct(ndr, name, "dfs_Info200");
 
1496
        if (r == NULL) { ndr_print_null(ndr); return; }
 
1497
        ndr->depth++;
 
1498
        ndr_print_ptr(ndr, "dom_root", r->dom_root);
 
1499
        ndr->depth++;
 
1500
        if (r->dom_root) {
 
1501
                ndr_print_string(ndr, "dom_root", r->dom_root);
 
1502
        }
 
1503
        ndr->depth--;
 
1504
        ndr->depth--;
 
1505
}
 
1506
 
 
1507
static enum ndr_err_code ndr_push_dfs_VolumeFlavor(struct ndr_push *ndr, int ndr_flags, enum dfs_VolumeFlavor r)
 
1508
{
 
1509
        NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
 
1510
        return NDR_ERR_SUCCESS;
 
1511
}
 
1512
 
 
1513
static enum ndr_err_code ndr_pull_dfs_VolumeFlavor(struct ndr_pull *ndr, int ndr_flags, enum dfs_VolumeFlavor *r)
 
1514
{
 
1515
        uint16_t v;
 
1516
        NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
 
1517
        *r = v;
 
1518
        return NDR_ERR_SUCCESS;
 
1519
}
 
1520
 
 
1521
_PUBLIC_ void ndr_print_dfs_VolumeFlavor(struct ndr_print *ndr, const char *name, enum dfs_VolumeFlavor r)
 
1522
{
 
1523
        const char *val = NULL;
 
1524
 
 
1525
        switch (r) {
 
1526
                case DFS_VOLUME_FLAVOR_STANDALONE: val = "DFS_VOLUME_FLAVOR_STANDALONE"; break;
 
1527
                case DFS_VOLUME_FLAVOR_AD_BLOB: val = "DFS_VOLUME_FLAVOR_AD_BLOB"; break;
 
1528
        }
 
1529
        ndr_print_enum(ndr, name, "ENUM", val, r);
 
1530
}
 
1531
 
 
1532
static enum ndr_err_code ndr_push_dfs_Info300(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info300 *r)
 
1533
{
 
1534
        if (ndr_flags & NDR_SCALARS) {
 
1535
                NDR_CHECK(ndr_push_align(ndr, 5));
 
1536
                NDR_CHECK(ndr_push_dfs_VolumeFlavor(ndr, NDR_SCALARS, r->flavor));
 
1537
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->dom_root));
 
1538
                NDR_CHECK(ndr_push_trailer_align(ndr, 5));
 
1539
        }
 
1540
        if (ndr_flags & NDR_BUFFERS) {
 
1541
                if (r->dom_root) {
 
1542
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
 
1543
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
1544
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
 
1545
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dom_root, ndr_charset_length(r->dom_root, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
1546
                }
 
1547
        }
 
1548
        return NDR_ERR_SUCCESS;
 
1549
}
 
1550
 
 
1551
static enum ndr_err_code ndr_pull_dfs_Info300(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info300 *r)
 
1552
{
 
1553
        uint32_t _ptr_dom_root;
 
1554
        TALLOC_CTX *_mem_save_dom_root_0;
 
1555
        if (ndr_flags & NDR_SCALARS) {
 
1556
                NDR_CHECK(ndr_pull_align(ndr, 5));
 
1557
                NDR_CHECK(ndr_pull_dfs_VolumeFlavor(ndr, NDR_SCALARS, &r->flavor));
 
1558
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_root));
 
1559
                if (_ptr_dom_root) {
 
1560
                        NDR_PULL_ALLOC(ndr, r->dom_root);
 
1561
                } else {
 
1562
                        r->dom_root = NULL;
 
1563
                }
 
1564
                NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
 
1565
        }
 
1566
        if (ndr_flags & NDR_BUFFERS) {
 
1567
                if (r->dom_root) {
 
1568
                        _mem_save_dom_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
1569
                        NDR_PULL_SET_MEM_CTX(ndr, r->dom_root, 0);
 
1570
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->dom_root));
 
1571
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->dom_root));
 
1572
                        if (ndr_get_array_length(ndr, &r->dom_root) > ndr_get_array_size(ndr, &r->dom_root)) {
 
1573
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->dom_root), ndr_get_array_length(ndr, &r->dom_root));
 
1574
                        }
 
1575
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t)));
 
1576
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dom_root, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t), CH_UTF16));
 
1577
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_root_0, 0);
 
1578
                }
 
1579
        }
 
1580
        return NDR_ERR_SUCCESS;
 
1581
}
 
1582
 
 
1583
_PUBLIC_ void ndr_print_dfs_Info300(struct ndr_print *ndr, const char *name, const struct dfs_Info300 *r)
 
1584
{
 
1585
        ndr_print_struct(ndr, name, "dfs_Info300");
 
1586
        if (r == NULL) { ndr_print_null(ndr); return; }
 
1587
        ndr->depth++;
 
1588
        ndr_print_dfs_VolumeFlavor(ndr, "flavor", r->flavor);
 
1589
        ndr_print_ptr(ndr, "dom_root", r->dom_root);
 
1590
        ndr->depth++;
 
1591
        if (r->dom_root) {
 
1592
                ndr_print_string(ndr, "dom_root", r->dom_root);
 
1593
        }
 
1594
        ndr->depth--;
 
1595
        ndr->depth--;
 
1596
}
 
1597
 
 
1598
static enum ndr_err_code ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, const union dfs_Info *r)
 
1599
{
 
1600
        if (ndr_flags & NDR_SCALARS) {
 
1601
                uint32_t level = ndr_push_get_switch_value(ndr, r);
 
1602
                NDR_CHECK(ndr_push_union_align(ndr, 5));
 
1603
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
 
1604
                NDR_CHECK(ndr_push_union_align(ndr, 5));
 
1605
                switch (level) {
 
1606
                        case 0: {
 
1607
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
 
1608
                        break; }
 
1609
 
 
1610
                        case 1: {
 
1611
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
 
1612
                        break; }
 
1613
 
 
1614
                        case 2: {
 
1615
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
 
1616
                        break; }
 
1617
 
 
1618
                        case 3: {
 
1619
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
 
1620
                        break; }
 
1621
 
 
1622
                        case 4: {
 
1623
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
 
1624
                        break; }
 
1625
 
 
1626
                        case 5: {
 
1627
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->info5));
 
1628
                        break; }
 
1629
 
 
1630
                        case 6: {
 
1631
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6));
 
1632
                        break; }
 
1633
 
 
1634
                        case 7: {
 
1635
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->info7));
 
1636
                        break; }
 
1637
 
 
1638
                        case 100: {
 
1639
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->info100));
 
1640
                        break; }
 
1641
 
 
1642
                        case 101: {
 
1643
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->info101));
 
1644
                        break; }
 
1645
 
 
1646
                        case 102: {
 
1647
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->info102));
 
1648
                        break; }
 
1649
 
 
1650
                        case 103: {
 
1651
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->info103));
 
1652
                        break; }
 
1653
 
 
1654
                        case 104: {
 
1655
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->info104));
 
1656
                        break; }
 
1657
 
 
1658
                        case 105: {
 
1659
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->info105));
 
1660
                        break; }
 
1661
 
 
1662
                        case 106: {
 
1663
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->info106));
 
1664
                        break; }
 
1665
 
 
1666
                        default:
 
1667
                                return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
 
1668
                }
 
1669
        }
 
1670
        if (ndr_flags & NDR_BUFFERS) {
 
1671
                uint32_t level = ndr_push_get_switch_value(ndr, r);
 
1672
                switch (level) {
 
1673
                        case 0:
 
1674
                                if (r->info0) {
 
1675
                                        NDR_CHECK(ndr_push_dfs_Info0(ndr, NDR_SCALARS, r->info0));
 
1676
                                }
 
1677
                        break;
 
1678
 
 
1679
                        case 1:
 
1680
                                if (r->info1) {
 
1681
                                        NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
 
1682
                                }
 
1683
                        break;
 
1684
 
 
1685
                        case 2:
 
1686
                                if (r->info2) {
 
1687
                                        NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
 
1688
                                }
 
1689
                        break;
 
1690
 
 
1691
                        case 3:
 
1692
                                if (r->info3) {
 
1693
                                        NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
 
1694
                                }
 
1695
                        break;
 
1696
 
 
1697
                        case 4:
 
1698
                                if (r->info4) {
 
1699
                                        NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
 
1700
                                }
 
1701
                        break;
 
1702
 
 
1703
                        case 5:
 
1704
                                if (r->info5) {
 
1705
                                        NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
 
1706
                                }
 
1707
                        break;
 
1708
 
 
1709
                        case 6:
 
1710
                                if (r->info6) {
 
1711
                                        NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
 
1712
                                }
 
1713
                        break;
 
1714
 
 
1715
                        case 7:
 
1716
                                if (r->info7) {
 
1717
                                        NDR_CHECK(ndr_push_dfs_Info7(ndr, NDR_SCALARS, r->info7));
 
1718
                                }
 
1719
                        break;
 
1720
 
 
1721
                        case 100:
 
1722
                                if (r->info100) {
 
1723
                                        NDR_CHECK(ndr_push_dfs_Info100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
 
1724
                                }
 
1725
                        break;
 
1726
 
 
1727
                        case 101:
 
1728
                                if (r->info101) {
 
1729
                                        NDR_CHECK(ndr_push_dfs_Info101(ndr, NDR_SCALARS, r->info101));
 
1730
                                }
 
1731
                        break;
 
1732
 
 
1733
                        case 102:
 
1734
                                if (r->info102) {
 
1735
                                        NDR_CHECK(ndr_push_dfs_Info102(ndr, NDR_SCALARS, r->info102));
 
1736
                                }
 
1737
                        break;
 
1738
 
 
1739
                        case 103:
 
1740
                                if (r->info103) {
 
1741
                                        NDR_CHECK(ndr_push_dfs_Info103(ndr, NDR_SCALARS, r->info103));
 
1742
                                }
 
1743
                        break;
 
1744
 
 
1745
                        case 104:
 
1746
                                if (r->info104) {
 
1747
                                        NDR_CHECK(ndr_push_dfs_Info104(ndr, NDR_SCALARS, r->info104));
 
1748
                                }
 
1749
                        break;
 
1750
 
 
1751
                        case 105:
 
1752
                                if (r->info105) {
 
1753
                                        NDR_CHECK(ndr_push_dfs_Info105(ndr, NDR_SCALARS|NDR_BUFFERS, r->info105));
 
1754
                                }
 
1755
                        break;
 
1756
 
 
1757
                        case 106:
 
1758
                                if (r->info106) {
 
1759
                                        NDR_CHECK(ndr_push_dfs_Info106(ndr, NDR_SCALARS, r->info106));
 
1760
                                }
 
1761
                        break;
 
1762
 
 
1763
                        default:
 
1764
                                return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
 
1765
                }
 
1766
        }
 
1767
        return NDR_ERR_SUCCESS;
 
1768
}
 
1769
 
 
1770
static enum ndr_err_code ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, union dfs_Info *r)
 
1771
{
 
1772
        uint32_t level;
 
1773
        uint32_t _level;
 
1774
        TALLOC_CTX *_mem_save_info0_0;
 
1775
        TALLOC_CTX *_mem_save_info1_0;
 
1776
        TALLOC_CTX *_mem_save_info2_0;
 
1777
        TALLOC_CTX *_mem_save_info3_0;
 
1778
        TALLOC_CTX *_mem_save_info4_0;
 
1779
        TALLOC_CTX *_mem_save_info5_0;
 
1780
        TALLOC_CTX *_mem_save_info6_0;
 
1781
        TALLOC_CTX *_mem_save_info7_0;
 
1782
        TALLOC_CTX *_mem_save_info100_0;
 
1783
        TALLOC_CTX *_mem_save_info101_0;
 
1784
        TALLOC_CTX *_mem_save_info102_0;
 
1785
        TALLOC_CTX *_mem_save_info103_0;
 
1786
        TALLOC_CTX *_mem_save_info104_0;
 
1787
        TALLOC_CTX *_mem_save_info105_0;
 
1788
        TALLOC_CTX *_mem_save_info106_0;
 
1789
        level = ndr_pull_get_switch_value(ndr, r);
 
1790
        if (ndr_flags & NDR_SCALARS) {
 
1791
                NDR_CHECK(ndr_pull_union_align(ndr, 5));
 
1792
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
 
1793
                if (_level != level) {
 
1794
                        return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
 
1795
                }
 
1796
                NDR_CHECK(ndr_pull_union_align(ndr, 5));
 
1797
                switch (level) {
 
1798
                        case 0: {
 
1799
                                uint32_t _ptr_info0;
 
1800
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
 
1801
                                if (_ptr_info0) {
 
1802
                                        NDR_PULL_ALLOC(ndr, r->info0);
 
1803
                                } else {
 
1804
                                        r->info0 = NULL;
 
1805
                                }
 
1806
                        break; }
 
1807
 
 
1808
                        case 1: {
 
1809
                                uint32_t _ptr_info1;
 
1810
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
 
1811
                                if (_ptr_info1) {
 
1812
                                        NDR_PULL_ALLOC(ndr, r->info1);
 
1813
                                } else {
 
1814
                                        r->info1 = NULL;
 
1815
                                }
 
1816
                        break; }
 
1817
 
 
1818
                        case 2: {
 
1819
                                uint32_t _ptr_info2;
 
1820
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
 
1821
                                if (_ptr_info2) {
 
1822
                                        NDR_PULL_ALLOC(ndr, r->info2);
 
1823
                                } else {
 
1824
                                        r->info2 = NULL;
 
1825
                                }
 
1826
                        break; }
 
1827
 
 
1828
                        case 3: {
 
1829
                                uint32_t _ptr_info3;
 
1830
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
 
1831
                                if (_ptr_info3) {
 
1832
                                        NDR_PULL_ALLOC(ndr, r->info3);
 
1833
                                } else {
 
1834
                                        r->info3 = NULL;
 
1835
                                }
 
1836
                        break; }
 
1837
 
 
1838
                        case 4: {
 
1839
                                uint32_t _ptr_info4;
 
1840
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
 
1841
                                if (_ptr_info4) {
 
1842
                                        NDR_PULL_ALLOC(ndr, r->info4);
 
1843
                                } else {
 
1844
                                        r->info4 = NULL;
 
1845
                                }
 
1846
                        break; }
 
1847
 
 
1848
                        case 5: {
 
1849
                                uint32_t _ptr_info5;
 
1850
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info5));
 
1851
                                if (_ptr_info5) {
 
1852
                                        NDR_PULL_ALLOC(ndr, r->info5);
 
1853
                                } else {
 
1854
                                        r->info5 = NULL;
 
1855
                                }
 
1856
                        break; }
 
1857
 
 
1858
                        case 6: {
 
1859
                                uint32_t _ptr_info6;
 
1860
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info6));
 
1861
                                if (_ptr_info6) {
 
1862
                                        NDR_PULL_ALLOC(ndr, r->info6);
 
1863
                                } else {
 
1864
                                        r->info6 = NULL;
 
1865
                                }
 
1866
                        break; }
 
1867
 
 
1868
                        case 7: {
 
1869
                                uint32_t _ptr_info7;
 
1870
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info7));
 
1871
                                if (_ptr_info7) {
 
1872
                                        NDR_PULL_ALLOC(ndr, r->info7);
 
1873
                                } else {
 
1874
                                        r->info7 = NULL;
 
1875
                                }
 
1876
                        break; }
 
1877
 
 
1878
                        case 100: {
 
1879
                                uint32_t _ptr_info100;
 
1880
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info100));
 
1881
                                if (_ptr_info100) {
 
1882
                                        NDR_PULL_ALLOC(ndr, r->info100);
 
1883
                                } else {
 
1884
                                        r->info100 = NULL;
 
1885
                                }
 
1886
                        break; }
 
1887
 
 
1888
                        case 101: {
 
1889
                                uint32_t _ptr_info101;
 
1890
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info101));
 
1891
                                if (_ptr_info101) {
 
1892
                                        NDR_PULL_ALLOC(ndr, r->info101);
 
1893
                                } else {
 
1894
                                        r->info101 = NULL;
 
1895
                                }
 
1896
                        break; }
 
1897
 
 
1898
                        case 102: {
 
1899
                                uint32_t _ptr_info102;
 
1900
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info102));
 
1901
                                if (_ptr_info102) {
 
1902
                                        NDR_PULL_ALLOC(ndr, r->info102);
 
1903
                                } else {
 
1904
                                        r->info102 = NULL;
 
1905
                                }
 
1906
                        break; }
 
1907
 
 
1908
                        case 103: {
 
1909
                                uint32_t _ptr_info103;
 
1910
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info103));
 
1911
                                if (_ptr_info103) {
 
1912
                                        NDR_PULL_ALLOC(ndr, r->info103);
 
1913
                                } else {
 
1914
                                        r->info103 = NULL;
 
1915
                                }
 
1916
                        break; }
 
1917
 
 
1918
                        case 104: {
 
1919
                                uint32_t _ptr_info104;
 
1920
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info104));
 
1921
                                if (_ptr_info104) {
 
1922
                                        NDR_PULL_ALLOC(ndr, r->info104);
 
1923
                                } else {
 
1924
                                        r->info104 = NULL;
 
1925
                                }
 
1926
                        break; }
 
1927
 
 
1928
                        case 105: {
 
1929
                                uint32_t _ptr_info105;
 
1930
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info105));
 
1931
                                if (_ptr_info105) {
 
1932
                                        NDR_PULL_ALLOC(ndr, r->info105);
 
1933
                                } else {
 
1934
                                        r->info105 = NULL;
 
1935
                                }
 
1936
                        break; }
 
1937
 
 
1938
                        case 106: {
 
1939
                                uint32_t _ptr_info106;
 
1940
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info106));
 
1941
                                if (_ptr_info106) {
 
1942
                                        NDR_PULL_ALLOC(ndr, r->info106);
 
1943
                                } else {
 
1944
                                        r->info106 = NULL;
 
1945
                                }
 
1946
                        break; }
 
1947
 
 
1948
                        default:
 
1949
                                return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
 
1950
                }
 
1951
        }
 
1952
        if (ndr_flags & NDR_BUFFERS) {
 
1953
                switch (level) {
 
1954
                        case 0:
 
1955
                                if (r->info0) {
 
1956
                                        _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
1957
                                        NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
 
1958
                                        NDR_CHECK(ndr_pull_dfs_Info0(ndr, NDR_SCALARS, r->info0));
 
1959
                                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
 
1960
                                }
 
1961
                        break;
 
1962
 
 
1963
                        case 1:
 
1964
                                if (r->info1) {
 
1965
                                        _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
1966
                                        NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
 
1967
                                        NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
 
1968
                                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
 
1969
                                }
 
1970
                        break;
 
1971
 
 
1972
                        case 2:
 
1973
                                if (r->info2) {
 
1974
                                        _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
1975
                                        NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
 
1976
                                        NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
 
1977
                                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
 
1978
                                }
 
1979
                        break;
 
1980
 
 
1981
                        case 3:
 
1982
                                if (r->info3) {
 
1983
                                        _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
1984
                                        NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
 
1985
                                        NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
 
1986
                                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
 
1987
                                }
 
1988
                        break;
 
1989
 
 
1990
                        case 4:
 
1991
                                if (r->info4) {
 
1992
                                        _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
1993
                                        NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
 
1994
                                        NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
 
1995
                                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
 
1996
                                }
 
1997
                        break;
 
1998
 
 
1999
                        case 5:
 
2000
                                if (r->info5) {
 
2001
                                        _mem_save_info5_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
2002
                                        NDR_PULL_SET_MEM_CTX(ndr, r->info5, 0);
 
2003
                                        NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
 
2004
                                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info5_0, 0);
 
2005
                                }
 
2006
                        break;
 
2007
 
 
2008
                        case 6:
 
2009
                                if (r->info6) {
 
2010
                                        _mem_save_info6_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
2011
                                        NDR_PULL_SET_MEM_CTX(ndr, r->info6, 0);
 
2012
                                        NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
 
2013
                                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info6_0, 0);
 
2014
                                }
 
2015
                        break;
 
2016
 
 
2017
                        case 7:
 
2018
                                if (r->info7) {
 
2019
                                        _mem_save_info7_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
2020
                                        NDR_PULL_SET_MEM_CTX(ndr, r->info7, 0);
 
2021
                                        NDR_CHECK(ndr_pull_dfs_Info7(ndr, NDR_SCALARS, r->info7));
 
2022
                                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info7_0, 0);
 
2023
                                }
 
2024
                        break;
 
2025
 
 
2026
                        case 100:
 
2027
                                if (r->info100) {
 
2028
                                        _mem_save_info100_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
2029
                                        NDR_PULL_SET_MEM_CTX(ndr, r->info100, 0);
 
2030
                                        NDR_CHECK(ndr_pull_dfs_Info100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
 
2031
                                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info100_0, 0);
 
2032
                                }
 
2033
                        break;
 
2034
 
 
2035
                        case 101:
 
2036
                                if (r->info101) {
 
2037
                                        _mem_save_info101_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
2038
                                        NDR_PULL_SET_MEM_CTX(ndr, r->info101, 0);
 
2039
                                        NDR_CHECK(ndr_pull_dfs_Info101(ndr, NDR_SCALARS, r->info101));
 
2040
                                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info101_0, 0);
 
2041
                                }
 
2042
                        break;
 
2043
 
 
2044
                        case 102:
 
2045
                                if (r->info102) {
 
2046
                                        _mem_save_info102_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
2047
                                        NDR_PULL_SET_MEM_CTX(ndr, r->info102, 0);
 
2048
                                        NDR_CHECK(ndr_pull_dfs_Info102(ndr, NDR_SCALARS, r->info102));
 
2049
                                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info102_0, 0);
 
2050
                                }
 
2051
                        break;
 
2052
 
 
2053
                        case 103:
 
2054
                                if (r->info103) {
 
2055
                                        _mem_save_info103_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
2056
                                        NDR_PULL_SET_MEM_CTX(ndr, r->info103, 0);
 
2057
                                        NDR_CHECK(ndr_pull_dfs_Info103(ndr, NDR_SCALARS, r->info103));
 
2058
                                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info103_0, 0);
 
2059
                                }
 
2060
                        break;
 
2061
 
 
2062
                        case 104:
 
2063
                                if (r->info104) {
 
2064
                                        _mem_save_info104_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
2065
                                        NDR_PULL_SET_MEM_CTX(ndr, r->info104, 0);
 
2066
                                        NDR_CHECK(ndr_pull_dfs_Info104(ndr, NDR_SCALARS, r->info104));
 
2067
                                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info104_0, 0);
 
2068
                                }
 
2069
                        break;
 
2070
 
 
2071
                        case 105:
 
2072
                                if (r->info105) {
 
2073
                                        _mem_save_info105_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
2074
                                        NDR_PULL_SET_MEM_CTX(ndr, r->info105, 0);
 
2075
                                        NDR_CHECK(ndr_pull_dfs_Info105(ndr, NDR_SCALARS|NDR_BUFFERS, r->info105));
 
2076
                                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info105_0, 0);
 
2077
                                }
 
2078
                        break;
 
2079
 
 
2080
                        case 106:
 
2081
                                if (r->info106) {
 
2082
                                        _mem_save_info106_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
2083
                                        NDR_PULL_SET_MEM_CTX(ndr, r->info106, 0);
 
2084
                                        NDR_CHECK(ndr_pull_dfs_Info106(ndr, NDR_SCALARS, r->info106));
 
2085
                                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info106_0, 0);
 
2086
                                }
 
2087
                        break;
 
2088
 
 
2089
                        default:
 
2090
                                return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
 
2091
                }
 
2092
        }
 
2093
        return NDR_ERR_SUCCESS;
 
2094
}
 
2095
 
 
2096
_PUBLIC_ void ndr_print_dfs_Info(struct ndr_print *ndr, const char *name, const union dfs_Info *r)
 
2097
{
 
2098
        uint32_t level;
 
2099
        level = ndr_print_get_switch_value(ndr, r);
 
2100
        ndr_print_union(ndr, name, level, "dfs_Info");
 
2101
        switch (level) {
 
2102
                case 0:
 
2103
                        ndr_print_ptr(ndr, "info0", r->info0);
 
2104
                        ndr->depth++;
 
2105
                        if (r->info0) {
 
2106
                                ndr_print_dfs_Info0(ndr, "info0", r->info0);
 
2107
                        }
 
2108
                        ndr->depth--;
 
2109
                break;
 
2110
 
 
2111
                case 1:
 
2112
                        ndr_print_ptr(ndr, "info1", r->info1);
 
2113
                        ndr->depth++;
 
2114
                        if (r->info1) {
 
2115
                                ndr_print_dfs_Info1(ndr, "info1", r->info1);
 
2116
                        }
 
2117
                        ndr->depth--;
 
2118
                break;
 
2119
 
 
2120
                case 2:
 
2121
                        ndr_print_ptr(ndr, "info2", r->info2);
 
2122
                        ndr->depth++;
 
2123
                        if (r->info2) {
 
2124
                                ndr_print_dfs_Info2(ndr, "info2", r->info2);
 
2125
                        }
 
2126
                        ndr->depth--;
 
2127
                break;
 
2128
 
 
2129
                case 3:
 
2130
                        ndr_print_ptr(ndr, "info3", r->info3);
 
2131
                        ndr->depth++;
 
2132
                        if (r->info3) {
 
2133
                                ndr_print_dfs_Info3(ndr, "info3", r->info3);
 
2134
                        }
 
2135
                        ndr->depth--;
 
2136
                break;
 
2137
 
 
2138
                case 4:
 
2139
                        ndr_print_ptr(ndr, "info4", r->info4);
 
2140
                        ndr->depth++;
 
2141
                        if (r->info4) {
 
2142
                                ndr_print_dfs_Info4(ndr, "info4", r->info4);
 
2143
                        }
 
2144
                        ndr->depth--;
 
2145
                break;
 
2146
 
 
2147
                case 5:
 
2148
                        ndr_print_ptr(ndr, "info5", r->info5);
 
2149
                        ndr->depth++;
 
2150
                        if (r->info5) {
 
2151
                                ndr_print_dfs_Info5(ndr, "info5", r->info5);
 
2152
                        }
 
2153
                        ndr->depth--;
 
2154
                break;
 
2155
 
 
2156
                case 6:
 
2157
                        ndr_print_ptr(ndr, "info6", r->info6);
 
2158
                        ndr->depth++;
 
2159
                        if (r->info6) {
 
2160
                                ndr_print_dfs_Info6(ndr, "info6", r->info6);
 
2161
                        }
 
2162
                        ndr->depth--;
 
2163
                break;
 
2164
 
 
2165
                case 7:
 
2166
                        ndr_print_ptr(ndr, "info7", r->info7);
 
2167
                        ndr->depth++;
 
2168
                        if (r->info7) {
 
2169
                                ndr_print_dfs_Info7(ndr, "info7", r->info7);
 
2170
                        }
 
2171
                        ndr->depth--;
 
2172
                break;
 
2173
 
 
2174
                case 100:
 
2175
                        ndr_print_ptr(ndr, "info100", r->info100);
 
2176
                        ndr->depth++;
 
2177
                        if (r->info100) {
 
2178
                                ndr_print_dfs_Info100(ndr, "info100", r->info100);
 
2179
                        }
 
2180
                        ndr->depth--;
 
2181
                break;
 
2182
 
 
2183
                case 101:
 
2184
                        ndr_print_ptr(ndr, "info101", r->info101);
 
2185
                        ndr->depth++;
 
2186
                        if (r->info101) {
 
2187
                                ndr_print_dfs_Info101(ndr, "info101", r->info101);
 
2188
                        }
 
2189
                        ndr->depth--;
 
2190
                break;
 
2191
 
 
2192
                case 102:
 
2193
                        ndr_print_ptr(ndr, "info102", r->info102);
 
2194
                        ndr->depth++;
 
2195
                        if (r->info102) {
 
2196
                                ndr_print_dfs_Info102(ndr, "info102", r->info102);
 
2197
                        }
 
2198
                        ndr->depth--;
 
2199
                break;
 
2200
 
 
2201
                case 103:
 
2202
                        ndr_print_ptr(ndr, "info103", r->info103);
 
2203
                        ndr->depth++;
 
2204
                        if (r->info103) {
 
2205
                                ndr_print_dfs_Info103(ndr, "info103", r->info103);
 
2206
                        }
 
2207
                        ndr->depth--;
 
2208
                break;
 
2209
 
 
2210
                case 104:
 
2211
                        ndr_print_ptr(ndr, "info104", r->info104);
 
2212
                        ndr->depth++;
 
2213
                        if (r->info104) {
 
2214
                                ndr_print_dfs_Info104(ndr, "info104", r->info104);
 
2215
                        }
 
2216
                        ndr->depth--;
 
2217
                break;
 
2218
 
 
2219
                case 105:
 
2220
                        ndr_print_ptr(ndr, "info105", r->info105);
 
2221
                        ndr->depth++;
 
2222
                        if (r->info105) {
 
2223
                                ndr_print_dfs_Info105(ndr, "info105", r->info105);
 
2224
                        }
 
2225
                        ndr->depth--;
 
2226
                break;
 
2227
 
 
2228
                case 106:
 
2229
                        ndr_print_ptr(ndr, "info106", r->info106);
 
2230
                        ndr->depth++;
 
2231
                        if (r->info106) {
 
2232
                                ndr_print_dfs_Info106(ndr, "info106", r->info106);
 
2233
                        }
 
2234
                        ndr->depth--;
 
2235
                break;
 
2236
 
 
2237
                default:
 
2238
                        ndr_print_bad_level(ndr, name, level);
 
2239
        }
 
2240
}
 
2241
 
 
2242
static enum ndr_err_code ndr_push_dfs_EnumArray1(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray1 *r)
 
2243
{
 
2244
        uint32_t cntr_s_1;
 
2245
        if (ndr_flags & NDR_SCALARS) {
 
2246
                NDR_CHECK(ndr_push_align(ndr, 5));
 
2247
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
 
2248
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
 
2249
                NDR_CHECK(ndr_push_trailer_align(ndr, 5));
 
2250
        }
 
2251
        if (ndr_flags & NDR_BUFFERS) {
 
2252
                if (r->s) {
 
2253
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
 
2254
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2255
                                NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
 
2256
                        }
 
2257
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2258
                                NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
 
2259
                        }
 
2260
                }
 
2261
        }
 
2262
        return NDR_ERR_SUCCESS;
 
2263
}
 
2264
 
 
2265
static enum ndr_err_code ndr_pull_dfs_EnumArray1(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray1 *r)
 
2266
{
 
2267
        uint32_t _ptr_s;
 
2268
        uint32_t cntr_s_1;
 
2269
        TALLOC_CTX *_mem_save_s_0;
 
2270
        TALLOC_CTX *_mem_save_s_1;
 
2271
        if (ndr_flags & NDR_SCALARS) {
 
2272
                NDR_CHECK(ndr_pull_align(ndr, 5));
 
2273
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
 
2274
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
 
2275
                if (_ptr_s) {
 
2276
                        NDR_PULL_ALLOC(ndr, r->s);
 
2277
                } else {
 
2278
                        r->s = NULL;
 
2279
                }
 
2280
                NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
 
2281
        }
 
2282
        if (ndr_flags & NDR_BUFFERS) {
 
2283
                if (r->s) {
 
2284
                        _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
2285
                        NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
 
2286
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
 
2287
                        NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
 
2288
                        _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
 
2289
                        NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
 
2290
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2291
                                NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
 
2292
                        }
 
2293
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2294
                                NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
 
2295
                        }
 
2296
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
 
2297
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
 
2298
                }
 
2299
                if (r->s) {
 
2300
                        NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
 
2301
                }
 
2302
        }
 
2303
        return NDR_ERR_SUCCESS;
 
2304
}
 
2305
 
 
2306
_PUBLIC_ void ndr_print_dfs_EnumArray1(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray1 *r)
 
2307
{
 
2308
        uint32_t cntr_s_1;
 
2309
        ndr_print_struct(ndr, name, "dfs_EnumArray1");
 
2310
        if (r == NULL) { ndr_print_null(ndr); return; }
 
2311
        ndr->depth++;
 
2312
        ndr_print_uint32(ndr, "count", r->count);
 
2313
        ndr_print_ptr(ndr, "s", r->s);
 
2314
        ndr->depth++;
 
2315
        if (r->s) {
 
2316
                ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
 
2317
                ndr->depth++;
 
2318
                for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
 
2319
                        ndr_print_dfs_Info1(ndr, "s", &r->s[cntr_s_1]);
 
2320
                }
 
2321
                ndr->depth--;
 
2322
        }
 
2323
        ndr->depth--;
 
2324
        ndr->depth--;
 
2325
}
 
2326
 
 
2327
static enum ndr_err_code ndr_push_dfs_EnumArray2(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray2 *r)
 
2328
{
 
2329
        uint32_t cntr_s_1;
 
2330
        if (ndr_flags & NDR_SCALARS) {
 
2331
                NDR_CHECK(ndr_push_align(ndr, 5));
 
2332
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
 
2333
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
 
2334
                NDR_CHECK(ndr_push_trailer_align(ndr, 5));
 
2335
        }
 
2336
        if (ndr_flags & NDR_BUFFERS) {
 
2337
                if (r->s) {
 
2338
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
 
2339
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2340
                                NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
 
2341
                        }
 
2342
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2343
                                NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
 
2344
                        }
 
2345
                }
 
2346
        }
 
2347
        return NDR_ERR_SUCCESS;
 
2348
}
 
2349
 
 
2350
static enum ndr_err_code ndr_pull_dfs_EnumArray2(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray2 *r)
 
2351
{
 
2352
        uint32_t _ptr_s;
 
2353
        uint32_t cntr_s_1;
 
2354
        TALLOC_CTX *_mem_save_s_0;
 
2355
        TALLOC_CTX *_mem_save_s_1;
 
2356
        if (ndr_flags & NDR_SCALARS) {
 
2357
                NDR_CHECK(ndr_pull_align(ndr, 5));
 
2358
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
 
2359
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
 
2360
                if (_ptr_s) {
 
2361
                        NDR_PULL_ALLOC(ndr, r->s);
 
2362
                } else {
 
2363
                        r->s = NULL;
 
2364
                }
 
2365
                NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
 
2366
        }
 
2367
        if (ndr_flags & NDR_BUFFERS) {
 
2368
                if (r->s) {
 
2369
                        _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
2370
                        NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
 
2371
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
 
2372
                        NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
 
2373
                        _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
 
2374
                        NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
 
2375
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2376
                                NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
 
2377
                        }
 
2378
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2379
                                NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
 
2380
                        }
 
2381
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
 
2382
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
 
2383
                }
 
2384
                if (r->s) {
 
2385
                        NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
 
2386
                }
 
2387
        }
 
2388
        return NDR_ERR_SUCCESS;
 
2389
}
 
2390
 
 
2391
_PUBLIC_ void ndr_print_dfs_EnumArray2(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray2 *r)
 
2392
{
 
2393
        uint32_t cntr_s_1;
 
2394
        ndr_print_struct(ndr, name, "dfs_EnumArray2");
 
2395
        if (r == NULL) { ndr_print_null(ndr); return; }
 
2396
        ndr->depth++;
 
2397
        ndr_print_uint32(ndr, "count", r->count);
 
2398
        ndr_print_ptr(ndr, "s", r->s);
 
2399
        ndr->depth++;
 
2400
        if (r->s) {
 
2401
                ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
 
2402
                ndr->depth++;
 
2403
                for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
 
2404
                        ndr_print_dfs_Info2(ndr, "s", &r->s[cntr_s_1]);
 
2405
                }
 
2406
                ndr->depth--;
 
2407
        }
 
2408
        ndr->depth--;
 
2409
        ndr->depth--;
 
2410
}
 
2411
 
 
2412
static enum ndr_err_code ndr_push_dfs_EnumArray3(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray3 *r)
 
2413
{
 
2414
        uint32_t cntr_s_1;
 
2415
        if (ndr_flags & NDR_SCALARS) {
 
2416
                NDR_CHECK(ndr_push_align(ndr, 5));
 
2417
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
 
2418
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
 
2419
                NDR_CHECK(ndr_push_trailer_align(ndr, 5));
 
2420
        }
 
2421
        if (ndr_flags & NDR_BUFFERS) {
 
2422
                if (r->s) {
 
2423
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
 
2424
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2425
                                NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
 
2426
                        }
 
2427
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2428
                                NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
 
2429
                        }
 
2430
                }
 
2431
        }
 
2432
        return NDR_ERR_SUCCESS;
 
2433
}
 
2434
 
 
2435
static enum ndr_err_code ndr_pull_dfs_EnumArray3(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray3 *r)
 
2436
{
 
2437
        uint32_t _ptr_s;
 
2438
        uint32_t cntr_s_1;
 
2439
        TALLOC_CTX *_mem_save_s_0;
 
2440
        TALLOC_CTX *_mem_save_s_1;
 
2441
        if (ndr_flags & NDR_SCALARS) {
 
2442
                NDR_CHECK(ndr_pull_align(ndr, 5));
 
2443
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
 
2444
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
 
2445
                if (_ptr_s) {
 
2446
                        NDR_PULL_ALLOC(ndr, r->s);
 
2447
                } else {
 
2448
                        r->s = NULL;
 
2449
                }
 
2450
                NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
 
2451
        }
 
2452
        if (ndr_flags & NDR_BUFFERS) {
 
2453
                if (r->s) {
 
2454
                        _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
2455
                        NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
 
2456
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
 
2457
                        NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
 
2458
                        _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
 
2459
                        NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
 
2460
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2461
                                NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
 
2462
                        }
 
2463
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2464
                                NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
 
2465
                        }
 
2466
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
 
2467
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
 
2468
                }
 
2469
                if (r->s) {
 
2470
                        NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
 
2471
                }
 
2472
        }
 
2473
        return NDR_ERR_SUCCESS;
 
2474
}
 
2475
 
 
2476
_PUBLIC_ void ndr_print_dfs_EnumArray3(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray3 *r)
 
2477
{
 
2478
        uint32_t cntr_s_1;
 
2479
        ndr_print_struct(ndr, name, "dfs_EnumArray3");
 
2480
        if (r == NULL) { ndr_print_null(ndr); return; }
 
2481
        ndr->depth++;
 
2482
        ndr_print_uint32(ndr, "count", r->count);
 
2483
        ndr_print_ptr(ndr, "s", r->s);
 
2484
        ndr->depth++;
 
2485
        if (r->s) {
 
2486
                ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
 
2487
                ndr->depth++;
 
2488
                for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
 
2489
                        ndr_print_dfs_Info3(ndr, "s", &r->s[cntr_s_1]);
 
2490
                }
 
2491
                ndr->depth--;
 
2492
        }
 
2493
        ndr->depth--;
 
2494
        ndr->depth--;
 
2495
}
 
2496
 
 
2497
static enum ndr_err_code ndr_push_dfs_EnumArray4(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray4 *r)
 
2498
{
 
2499
        uint32_t cntr_s_1;
 
2500
        if (ndr_flags & NDR_SCALARS) {
 
2501
                NDR_CHECK(ndr_push_align(ndr, 5));
 
2502
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
 
2503
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
 
2504
                NDR_CHECK(ndr_push_trailer_align(ndr, 5));
 
2505
        }
 
2506
        if (ndr_flags & NDR_BUFFERS) {
 
2507
                if (r->s) {
 
2508
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
 
2509
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2510
                                NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
 
2511
                        }
 
2512
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2513
                                NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
 
2514
                        }
 
2515
                }
 
2516
        }
 
2517
        return NDR_ERR_SUCCESS;
 
2518
}
 
2519
 
 
2520
static enum ndr_err_code ndr_pull_dfs_EnumArray4(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray4 *r)
 
2521
{
 
2522
        uint32_t _ptr_s;
 
2523
        uint32_t cntr_s_1;
 
2524
        TALLOC_CTX *_mem_save_s_0;
 
2525
        TALLOC_CTX *_mem_save_s_1;
 
2526
        if (ndr_flags & NDR_SCALARS) {
 
2527
                NDR_CHECK(ndr_pull_align(ndr, 5));
 
2528
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
 
2529
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
 
2530
                if (_ptr_s) {
 
2531
                        NDR_PULL_ALLOC(ndr, r->s);
 
2532
                } else {
 
2533
                        r->s = NULL;
 
2534
                }
 
2535
                NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
 
2536
        }
 
2537
        if (ndr_flags & NDR_BUFFERS) {
 
2538
                if (r->s) {
 
2539
                        _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
2540
                        NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
 
2541
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
 
2542
                        NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
 
2543
                        _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
 
2544
                        NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
 
2545
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2546
                                NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
 
2547
                        }
 
2548
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2549
                                NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
 
2550
                        }
 
2551
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
 
2552
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
 
2553
                }
 
2554
                if (r->s) {
 
2555
                        NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
 
2556
                }
 
2557
        }
 
2558
        return NDR_ERR_SUCCESS;
 
2559
}
 
2560
 
 
2561
_PUBLIC_ void ndr_print_dfs_EnumArray4(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray4 *r)
 
2562
{
 
2563
        uint32_t cntr_s_1;
 
2564
        ndr_print_struct(ndr, name, "dfs_EnumArray4");
 
2565
        if (r == NULL) { ndr_print_null(ndr); return; }
 
2566
        ndr->depth++;
 
2567
        ndr_print_uint32(ndr, "count", r->count);
 
2568
        ndr_print_ptr(ndr, "s", r->s);
 
2569
        ndr->depth++;
 
2570
        if (r->s) {
 
2571
                ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
 
2572
                ndr->depth++;
 
2573
                for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
 
2574
                        ndr_print_dfs_Info4(ndr, "s", &r->s[cntr_s_1]);
 
2575
                }
 
2576
                ndr->depth--;
 
2577
        }
 
2578
        ndr->depth--;
 
2579
        ndr->depth--;
 
2580
}
 
2581
 
 
2582
static enum ndr_err_code ndr_push_dfs_EnumArray5(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray5 *r)
 
2583
{
 
2584
        uint32_t cntr_s_1;
 
2585
        if (ndr_flags & NDR_SCALARS) {
 
2586
                NDR_CHECK(ndr_push_align(ndr, 5));
 
2587
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
 
2588
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
 
2589
                NDR_CHECK(ndr_push_trailer_align(ndr, 5));
 
2590
        }
 
2591
        if (ndr_flags & NDR_BUFFERS) {
 
2592
                if (r->s) {
 
2593
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
 
2594
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2595
                                NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
 
2596
                        }
 
2597
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2598
                                NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
 
2599
                        }
 
2600
                }
 
2601
        }
 
2602
        return NDR_ERR_SUCCESS;
 
2603
}
 
2604
 
 
2605
static enum ndr_err_code ndr_pull_dfs_EnumArray5(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray5 *r)
 
2606
{
 
2607
        uint32_t _ptr_s;
 
2608
        uint32_t cntr_s_1;
 
2609
        TALLOC_CTX *_mem_save_s_0;
 
2610
        TALLOC_CTX *_mem_save_s_1;
 
2611
        if (ndr_flags & NDR_SCALARS) {
 
2612
                NDR_CHECK(ndr_pull_align(ndr, 5));
 
2613
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
 
2614
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
 
2615
                if (_ptr_s) {
 
2616
                        NDR_PULL_ALLOC(ndr, r->s);
 
2617
                } else {
 
2618
                        r->s = NULL;
 
2619
                }
 
2620
                NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
 
2621
        }
 
2622
        if (ndr_flags & NDR_BUFFERS) {
 
2623
                if (r->s) {
 
2624
                        _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
2625
                        NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
 
2626
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
 
2627
                        NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
 
2628
                        _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
 
2629
                        NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
 
2630
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2631
                                NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
 
2632
                        }
 
2633
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2634
                                NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
 
2635
                        }
 
2636
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
 
2637
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
 
2638
                }
 
2639
                if (r->s) {
 
2640
                        NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
 
2641
                }
 
2642
        }
 
2643
        return NDR_ERR_SUCCESS;
 
2644
}
 
2645
 
 
2646
_PUBLIC_ void ndr_print_dfs_EnumArray5(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray5 *r)
 
2647
{
 
2648
        uint32_t cntr_s_1;
 
2649
        ndr_print_struct(ndr, name, "dfs_EnumArray5");
 
2650
        if (r == NULL) { ndr_print_null(ndr); return; }
 
2651
        ndr->depth++;
 
2652
        ndr_print_uint32(ndr, "count", r->count);
 
2653
        ndr_print_ptr(ndr, "s", r->s);
 
2654
        ndr->depth++;
 
2655
        if (r->s) {
 
2656
                ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
 
2657
                ndr->depth++;
 
2658
                for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
 
2659
                        ndr_print_dfs_Info5(ndr, "s", &r->s[cntr_s_1]);
 
2660
                }
 
2661
                ndr->depth--;
 
2662
        }
 
2663
        ndr->depth--;
 
2664
        ndr->depth--;
 
2665
}
 
2666
 
 
2667
static enum ndr_err_code ndr_push_dfs_EnumArray6(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray6 *r)
 
2668
{
 
2669
        uint32_t cntr_s_1;
 
2670
        if (ndr_flags & NDR_SCALARS) {
 
2671
                NDR_CHECK(ndr_push_align(ndr, 5));
 
2672
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
 
2673
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
 
2674
                NDR_CHECK(ndr_push_trailer_align(ndr, 5));
 
2675
        }
 
2676
        if (ndr_flags & NDR_BUFFERS) {
 
2677
                if (r->s) {
 
2678
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
 
2679
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2680
                                NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
 
2681
                        }
 
2682
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2683
                                NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
 
2684
                        }
 
2685
                }
 
2686
        }
 
2687
        return NDR_ERR_SUCCESS;
 
2688
}
 
2689
 
 
2690
static enum ndr_err_code ndr_pull_dfs_EnumArray6(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray6 *r)
 
2691
{
 
2692
        uint32_t _ptr_s;
 
2693
        uint32_t cntr_s_1;
 
2694
        TALLOC_CTX *_mem_save_s_0;
 
2695
        TALLOC_CTX *_mem_save_s_1;
 
2696
        if (ndr_flags & NDR_SCALARS) {
 
2697
                NDR_CHECK(ndr_pull_align(ndr, 5));
 
2698
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
 
2699
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
 
2700
                if (_ptr_s) {
 
2701
                        NDR_PULL_ALLOC(ndr, r->s);
 
2702
                } else {
 
2703
                        r->s = NULL;
 
2704
                }
 
2705
                NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
 
2706
        }
 
2707
        if (ndr_flags & NDR_BUFFERS) {
 
2708
                if (r->s) {
 
2709
                        _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
2710
                        NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
 
2711
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
 
2712
                        NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
 
2713
                        _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
 
2714
                        NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
 
2715
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2716
                                NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
 
2717
                        }
 
2718
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2719
                                NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
 
2720
                        }
 
2721
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
 
2722
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
 
2723
                }
 
2724
                if (r->s) {
 
2725
                        NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
 
2726
                }
 
2727
        }
 
2728
        return NDR_ERR_SUCCESS;
 
2729
}
 
2730
 
 
2731
_PUBLIC_ void ndr_print_dfs_EnumArray6(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray6 *r)
 
2732
{
 
2733
        uint32_t cntr_s_1;
 
2734
        ndr_print_struct(ndr, name, "dfs_EnumArray6");
 
2735
        if (r == NULL) { ndr_print_null(ndr); return; }
 
2736
        ndr->depth++;
 
2737
        ndr_print_uint32(ndr, "count", r->count);
 
2738
        ndr_print_ptr(ndr, "s", r->s);
 
2739
        ndr->depth++;
 
2740
        if (r->s) {
 
2741
                ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
 
2742
                ndr->depth++;
 
2743
                for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
 
2744
                        ndr_print_dfs_Info6(ndr, "s", &r->s[cntr_s_1]);
 
2745
                }
 
2746
                ndr->depth--;
 
2747
        }
 
2748
        ndr->depth--;
 
2749
        ndr->depth--;
 
2750
}
 
2751
 
 
2752
static enum ndr_err_code ndr_push_dfs_EnumArray200(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray200 *r)
 
2753
{
 
2754
        uint32_t cntr_s_1;
 
2755
        if (ndr_flags & NDR_SCALARS) {
 
2756
                NDR_CHECK(ndr_push_align(ndr, 5));
 
2757
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
 
2758
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
 
2759
                NDR_CHECK(ndr_push_trailer_align(ndr, 5));
 
2760
        }
 
2761
        if (ndr_flags & NDR_BUFFERS) {
 
2762
                if (r->s) {
 
2763
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
 
2764
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2765
                                NDR_CHECK(ndr_push_dfs_Info200(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
 
2766
                        }
 
2767
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2768
                                NDR_CHECK(ndr_push_dfs_Info200(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
 
2769
                        }
 
2770
                }
 
2771
        }
 
2772
        return NDR_ERR_SUCCESS;
 
2773
}
 
2774
 
 
2775
static enum ndr_err_code ndr_pull_dfs_EnumArray200(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray200 *r)
 
2776
{
 
2777
        uint32_t _ptr_s;
 
2778
        uint32_t cntr_s_1;
 
2779
        TALLOC_CTX *_mem_save_s_0;
 
2780
        TALLOC_CTX *_mem_save_s_1;
 
2781
        if (ndr_flags & NDR_SCALARS) {
 
2782
                NDR_CHECK(ndr_pull_align(ndr, 5));
 
2783
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
 
2784
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
 
2785
                if (_ptr_s) {
 
2786
                        NDR_PULL_ALLOC(ndr, r->s);
 
2787
                } else {
 
2788
                        r->s = NULL;
 
2789
                }
 
2790
                NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
 
2791
        }
 
2792
        if (ndr_flags & NDR_BUFFERS) {
 
2793
                if (r->s) {
 
2794
                        _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
2795
                        NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
 
2796
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
 
2797
                        NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
 
2798
                        _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
 
2799
                        NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
 
2800
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2801
                                NDR_CHECK(ndr_pull_dfs_Info200(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
 
2802
                        }
 
2803
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2804
                                NDR_CHECK(ndr_pull_dfs_Info200(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
 
2805
                        }
 
2806
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
 
2807
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
 
2808
                }
 
2809
                if (r->s) {
 
2810
                        NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
 
2811
                }
 
2812
        }
 
2813
        return NDR_ERR_SUCCESS;
 
2814
}
 
2815
 
 
2816
_PUBLIC_ void ndr_print_dfs_EnumArray200(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray200 *r)
 
2817
{
 
2818
        uint32_t cntr_s_1;
 
2819
        ndr_print_struct(ndr, name, "dfs_EnumArray200");
 
2820
        if (r == NULL) { ndr_print_null(ndr); return; }
 
2821
        ndr->depth++;
 
2822
        ndr_print_uint32(ndr, "count", r->count);
 
2823
        ndr_print_ptr(ndr, "s", r->s);
 
2824
        ndr->depth++;
 
2825
        if (r->s) {
 
2826
                ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
 
2827
                ndr->depth++;
 
2828
                for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
 
2829
                        ndr_print_dfs_Info200(ndr, "s", &r->s[cntr_s_1]);
 
2830
                }
 
2831
                ndr->depth--;
 
2832
        }
 
2833
        ndr->depth--;
 
2834
        ndr->depth--;
 
2835
}
 
2836
 
 
2837
static enum ndr_err_code ndr_push_dfs_EnumArray300(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray300 *r)
 
2838
{
 
2839
        uint32_t cntr_s_1;
 
2840
        if (ndr_flags & NDR_SCALARS) {
 
2841
                NDR_CHECK(ndr_push_align(ndr, 5));
 
2842
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
 
2843
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
 
2844
                NDR_CHECK(ndr_push_trailer_align(ndr, 5));
 
2845
        }
 
2846
        if (ndr_flags & NDR_BUFFERS) {
 
2847
                if (r->s) {
 
2848
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
 
2849
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2850
                                NDR_CHECK(ndr_push_dfs_Info300(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
 
2851
                        }
 
2852
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2853
                                NDR_CHECK(ndr_push_dfs_Info300(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
 
2854
                        }
 
2855
                }
 
2856
        }
 
2857
        return NDR_ERR_SUCCESS;
 
2858
}
 
2859
 
 
2860
static enum ndr_err_code ndr_pull_dfs_EnumArray300(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray300 *r)
 
2861
{
 
2862
        uint32_t _ptr_s;
 
2863
        uint32_t cntr_s_1;
 
2864
        TALLOC_CTX *_mem_save_s_0;
 
2865
        TALLOC_CTX *_mem_save_s_1;
 
2866
        if (ndr_flags & NDR_SCALARS) {
 
2867
                NDR_CHECK(ndr_pull_align(ndr, 5));
 
2868
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
 
2869
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
 
2870
                if (_ptr_s) {
 
2871
                        NDR_PULL_ALLOC(ndr, r->s);
 
2872
                } else {
 
2873
                        r->s = NULL;
 
2874
                }
 
2875
                NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
 
2876
        }
 
2877
        if (ndr_flags & NDR_BUFFERS) {
 
2878
                if (r->s) {
 
2879
                        _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
2880
                        NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
 
2881
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
 
2882
                        NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
 
2883
                        _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
 
2884
                        NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
 
2885
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2886
                                NDR_CHECK(ndr_pull_dfs_Info300(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
 
2887
                        }
 
2888
                        for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
 
2889
                                NDR_CHECK(ndr_pull_dfs_Info300(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
 
2890
                        }
 
2891
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
 
2892
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
 
2893
                }
 
2894
                if (r->s) {
 
2895
                        NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
 
2896
                }
 
2897
        }
 
2898
        return NDR_ERR_SUCCESS;
 
2899
}
 
2900
 
 
2901
_PUBLIC_ void ndr_print_dfs_EnumArray300(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray300 *r)
 
2902
{
 
2903
        uint32_t cntr_s_1;
 
2904
        ndr_print_struct(ndr, name, "dfs_EnumArray300");
 
2905
        if (r == NULL) { ndr_print_null(ndr); return; }
 
2906
        ndr->depth++;
 
2907
        ndr_print_uint32(ndr, "count", r->count);
 
2908
        ndr_print_ptr(ndr, "s", r->s);
 
2909
        ndr->depth++;
 
2910
        if (r->s) {
 
2911
                ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
 
2912
                ndr->depth++;
 
2913
                for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
 
2914
                        ndr_print_dfs_Info300(ndr, "s", &r->s[cntr_s_1]);
 
2915
                }
 
2916
                ndr->depth--;
 
2917
        }
 
2918
        ndr->depth--;
 
2919
        ndr->depth--;
 
2920
}
 
2921
 
 
2922
static enum ndr_err_code ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_flags, const union dfs_EnumInfo *r)
 
2923
{
 
2924
        if (ndr_flags & NDR_SCALARS) {
 
2925
                uint32_t level = ndr_push_get_switch_value(ndr, r);
 
2926
                NDR_CHECK(ndr_push_union_align(ndr, 5));
 
2927
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
 
2928
                NDR_CHECK(ndr_push_union_align(ndr, 5));
 
2929
                switch (level) {
 
2930
                        case 1: {
 
2931
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
 
2932
                        break; }
 
2933
 
 
2934
                        case 2: {
 
2935
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
 
2936
                        break; }
 
2937
 
 
2938
                        case 3: {
 
2939
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
 
2940
                        break; }
 
2941
 
 
2942
                        case 4: {
 
2943
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
 
2944
                        break; }
 
2945
 
 
2946
                        case 5: {
 
2947
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->info5));
 
2948
                        break; }
 
2949
 
 
2950
                        case 6: {
 
2951
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6));
 
2952
                        break; }
 
2953
 
 
2954
                        case 200: {
 
2955
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->info200));
 
2956
                        break; }
 
2957
 
 
2958
                        case 300: {
 
2959
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->info300));
 
2960
                        break; }
 
2961
 
 
2962
                        default:
 
2963
                                return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
 
2964
                }
 
2965
        }
 
2966
        if (ndr_flags & NDR_BUFFERS) {
 
2967
                uint32_t level = ndr_push_get_switch_value(ndr, r);
 
2968
                switch (level) {
 
2969
                        case 1:
 
2970
                                if (r->info1) {
 
2971
                                        NDR_CHECK(ndr_push_dfs_EnumArray1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
 
2972
                                }
 
2973
                        break;
 
2974
 
 
2975
                        case 2:
 
2976
                                if (r->info2) {
 
2977
                                        NDR_CHECK(ndr_push_dfs_EnumArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
 
2978
                                }
 
2979
                        break;
 
2980
 
 
2981
                        case 3:
 
2982
                                if (r->info3) {
 
2983
                                        NDR_CHECK(ndr_push_dfs_EnumArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
 
2984
                                }
 
2985
                        break;
 
2986
 
 
2987
                        case 4:
 
2988
                                if (r->info4) {
 
2989
                                        NDR_CHECK(ndr_push_dfs_EnumArray4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
 
2990
                                }
 
2991
                        break;
 
2992
 
 
2993
                        case 5:
 
2994
                                if (r->info5) {
 
2995
                                        NDR_CHECK(ndr_push_dfs_EnumArray5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
 
2996
                                }
 
2997
                        break;
 
2998
 
 
2999
                        case 6:
 
3000
                                if (r->info6) {
 
3001
                                        NDR_CHECK(ndr_push_dfs_EnumArray6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
 
3002
                                }
 
3003
                        break;
 
3004
 
 
3005
                        case 200:
 
3006
                                if (r->info200) {
 
3007
                                        NDR_CHECK(ndr_push_dfs_EnumArray200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200));
 
3008
                                }
 
3009
                        break;
 
3010
 
 
3011
                        case 300:
 
3012
                                if (r->info300) {
 
3013
                                        NDR_CHECK(ndr_push_dfs_EnumArray300(ndr, NDR_SCALARS|NDR_BUFFERS, r->info300));
 
3014
                                }
 
3015
                        break;
 
3016
 
 
3017
                        default:
 
3018
                                return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
 
3019
                }
 
3020
        }
 
3021
        return NDR_ERR_SUCCESS;
 
3022
}
 
3023
 
 
3024
static enum ndr_err_code ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_flags, union dfs_EnumInfo *r)
 
3025
{
 
3026
        uint32_t level;
 
3027
        uint32_t _level;
 
3028
        TALLOC_CTX *_mem_save_info1_0;
 
3029
        TALLOC_CTX *_mem_save_info2_0;
 
3030
        TALLOC_CTX *_mem_save_info3_0;
 
3031
        TALLOC_CTX *_mem_save_info4_0;
 
3032
        TALLOC_CTX *_mem_save_info5_0;
 
3033
        TALLOC_CTX *_mem_save_info6_0;
 
3034
        TALLOC_CTX *_mem_save_info200_0;
 
3035
        TALLOC_CTX *_mem_save_info300_0;
 
3036
        level = ndr_pull_get_switch_value(ndr, r);
 
3037
        if (ndr_flags & NDR_SCALARS) {
 
3038
                NDR_CHECK(ndr_pull_union_align(ndr, 5));
 
3039
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
 
3040
                if (_level != level) {
 
3041
                        return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
 
3042
                }
 
3043
                NDR_CHECK(ndr_pull_union_align(ndr, 5));
 
3044
                switch (level) {
 
3045
                        case 1: {
 
3046
                                uint32_t _ptr_info1;
 
3047
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
 
3048
                                if (_ptr_info1) {
 
3049
                                        NDR_PULL_ALLOC(ndr, r->info1);
 
3050
                                } else {
 
3051
                                        r->info1 = NULL;
 
3052
                                }
 
3053
                        break; }
 
3054
 
 
3055
                        case 2: {
 
3056
                                uint32_t _ptr_info2;
 
3057
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
 
3058
                                if (_ptr_info2) {
 
3059
                                        NDR_PULL_ALLOC(ndr, r->info2);
 
3060
                                } else {
 
3061
                                        r->info2 = NULL;
 
3062
                                }
 
3063
                        break; }
 
3064
 
 
3065
                        case 3: {
 
3066
                                uint32_t _ptr_info3;
 
3067
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
 
3068
                                if (_ptr_info3) {
 
3069
                                        NDR_PULL_ALLOC(ndr, r->info3);
 
3070
                                } else {
 
3071
                                        r->info3 = NULL;
 
3072
                                }
 
3073
                        break; }
 
3074
 
 
3075
                        case 4: {
 
3076
                                uint32_t _ptr_info4;
 
3077
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
 
3078
                                if (_ptr_info4) {
 
3079
                                        NDR_PULL_ALLOC(ndr, r->info4);
 
3080
                                } else {
 
3081
                                        r->info4 = NULL;
 
3082
                                }
 
3083
                        break; }
 
3084
 
 
3085
                        case 5: {
 
3086
                                uint32_t _ptr_info5;
 
3087
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info5));
 
3088
                                if (_ptr_info5) {
 
3089
                                        NDR_PULL_ALLOC(ndr, r->info5);
 
3090
                                } else {
 
3091
                                        r->info5 = NULL;
 
3092
                                }
 
3093
                        break; }
 
3094
 
 
3095
                        case 6: {
 
3096
                                uint32_t _ptr_info6;
 
3097
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info6));
 
3098
                                if (_ptr_info6) {
 
3099
                                        NDR_PULL_ALLOC(ndr, r->info6);
 
3100
                                } else {
 
3101
                                        r->info6 = NULL;
 
3102
                                }
 
3103
                        break; }
 
3104
 
 
3105
                        case 200: {
 
3106
                                uint32_t _ptr_info200;
 
3107
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info200));
 
3108
                                if (_ptr_info200) {
 
3109
                                        NDR_PULL_ALLOC(ndr, r->info200);
 
3110
                                } else {
 
3111
                                        r->info200 = NULL;
 
3112
                                }
 
3113
                        break; }
 
3114
 
 
3115
                        case 300: {
 
3116
                                uint32_t _ptr_info300;
 
3117
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info300));
 
3118
                                if (_ptr_info300) {
 
3119
                                        NDR_PULL_ALLOC(ndr, r->info300);
 
3120
                                } else {
 
3121
                                        r->info300 = NULL;
 
3122
                                }
 
3123
                        break; }
 
3124
 
 
3125
                        default:
 
3126
                                return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
 
3127
                }
 
3128
        }
 
3129
        if (ndr_flags & NDR_BUFFERS) {
 
3130
                switch (level) {
 
3131
                        case 1:
 
3132
                                if (r->info1) {
 
3133
                                        _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
3134
                                        NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
 
3135
                                        NDR_CHECK(ndr_pull_dfs_EnumArray1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
 
3136
                                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
 
3137
                                }
 
3138
                        break;
 
3139
 
 
3140
                        case 2:
 
3141
                                if (r->info2) {
 
3142
                                        _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
3143
                                        NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
 
3144
                                        NDR_CHECK(ndr_pull_dfs_EnumArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
 
3145
                                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
 
3146
                                }
 
3147
                        break;
 
3148
 
 
3149
                        case 3:
 
3150
                                if (r->info3) {
 
3151
                                        _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
3152
                                        NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
 
3153
                                        NDR_CHECK(ndr_pull_dfs_EnumArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
 
3154
                                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
 
3155
                                }
 
3156
                        break;
 
3157
 
 
3158
                        case 4:
 
3159
                                if (r->info4) {
 
3160
                                        _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
3161
                                        NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
 
3162
                                        NDR_CHECK(ndr_pull_dfs_EnumArray4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
 
3163
                                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
 
3164
                                }
 
3165
                        break;
 
3166
 
 
3167
                        case 5:
 
3168
                                if (r->info5) {
 
3169
                                        _mem_save_info5_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
3170
                                        NDR_PULL_SET_MEM_CTX(ndr, r->info5, 0);
 
3171
                                        NDR_CHECK(ndr_pull_dfs_EnumArray5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
 
3172
                                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info5_0, 0);
 
3173
                                }
 
3174
                        break;
 
3175
 
 
3176
                        case 6:
 
3177
                                if (r->info6) {
 
3178
                                        _mem_save_info6_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
3179
                                        NDR_PULL_SET_MEM_CTX(ndr, r->info6, 0);
 
3180
                                        NDR_CHECK(ndr_pull_dfs_EnumArray6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
 
3181
                                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info6_0, 0);
 
3182
                                }
 
3183
                        break;
 
3184
 
 
3185
                        case 200:
 
3186
                                if (r->info200) {
 
3187
                                        _mem_save_info200_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
3188
                                        NDR_PULL_SET_MEM_CTX(ndr, r->info200, 0);
 
3189
                                        NDR_CHECK(ndr_pull_dfs_EnumArray200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200));
 
3190
                                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info200_0, 0);
 
3191
                                }
 
3192
                        break;
 
3193
 
 
3194
                        case 300:
 
3195
                                if (r->info300) {
 
3196
                                        _mem_save_info300_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
3197
                                        NDR_PULL_SET_MEM_CTX(ndr, r->info300, 0);
 
3198
                                        NDR_CHECK(ndr_pull_dfs_EnumArray300(ndr, NDR_SCALARS|NDR_BUFFERS, r->info300));
 
3199
                                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info300_0, 0);
 
3200
                                }
 
3201
                        break;
 
3202
 
 
3203
                        default:
 
3204
                                return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
 
3205
                }
 
3206
        }
 
3207
        return NDR_ERR_SUCCESS;
 
3208
}
 
3209
 
 
3210
_PUBLIC_ void ndr_print_dfs_EnumInfo(struct ndr_print *ndr, const char *name, const union dfs_EnumInfo *r)
 
3211
{
 
3212
        uint32_t level;
 
3213
        level = ndr_print_get_switch_value(ndr, r);
 
3214
        ndr_print_union(ndr, name, level, "dfs_EnumInfo");
 
3215
        switch (level) {
 
3216
                case 1:
 
3217
                        ndr_print_ptr(ndr, "info1", r->info1);
 
3218
                        ndr->depth++;
 
3219
                        if (r->info1) {
 
3220
                                ndr_print_dfs_EnumArray1(ndr, "info1", r->info1);
 
3221
                        }
 
3222
                        ndr->depth--;
 
3223
                break;
 
3224
 
 
3225
                case 2:
 
3226
                        ndr_print_ptr(ndr, "info2", r->info2);
 
3227
                        ndr->depth++;
 
3228
                        if (r->info2) {
 
3229
                                ndr_print_dfs_EnumArray2(ndr, "info2", r->info2);
 
3230
                        }
 
3231
                        ndr->depth--;
 
3232
                break;
 
3233
 
 
3234
                case 3:
 
3235
                        ndr_print_ptr(ndr, "info3", r->info3);
 
3236
                        ndr->depth++;
 
3237
                        if (r->info3) {
 
3238
                                ndr_print_dfs_EnumArray3(ndr, "info3", r->info3);
 
3239
                        }
 
3240
                        ndr->depth--;
 
3241
                break;
 
3242
 
 
3243
                case 4:
 
3244
                        ndr_print_ptr(ndr, "info4", r->info4);
 
3245
                        ndr->depth++;
 
3246
                        if (r->info4) {
 
3247
                                ndr_print_dfs_EnumArray4(ndr, "info4", r->info4);
 
3248
                        }
 
3249
                        ndr->depth--;
 
3250
                break;
 
3251
 
 
3252
                case 5:
 
3253
                        ndr_print_ptr(ndr, "info5", r->info5);
 
3254
                        ndr->depth++;
 
3255
                        if (r->info5) {
 
3256
                                ndr_print_dfs_EnumArray5(ndr, "info5", r->info5);
 
3257
                        }
 
3258
                        ndr->depth--;
 
3259
                break;
 
3260
 
 
3261
                case 6:
 
3262
                        ndr_print_ptr(ndr, "info6", r->info6);
 
3263
                        ndr->depth++;
 
3264
                        if (r->info6) {
 
3265
                                ndr_print_dfs_EnumArray6(ndr, "info6", r->info6);
 
3266
                        }
 
3267
                        ndr->depth--;
 
3268
                break;
 
3269
 
 
3270
                case 200:
 
3271
                        ndr_print_ptr(ndr, "info200", r->info200);
 
3272
                        ndr->depth++;
 
3273
                        if (r->info200) {
 
3274
                                ndr_print_dfs_EnumArray200(ndr, "info200", r->info200);
 
3275
                        }
 
3276
                        ndr->depth--;
 
3277
                break;
 
3278
 
 
3279
                case 300:
 
3280
                        ndr_print_ptr(ndr, "info300", r->info300);
 
3281
                        ndr->depth++;
 
3282
                        if (r->info300) {
 
3283
                                ndr_print_dfs_EnumArray300(ndr, "info300", r->info300);
 
3284
                        }
 
3285
                        ndr->depth--;
 
3286
                break;
 
3287
 
 
3288
                default:
 
3289
                        ndr_print_bad_level(ndr, name, level);
 
3290
        }
 
3291
}
 
3292
 
 
3293
static enum ndr_err_code ndr_push_dfs_EnumStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumStruct *r)
 
3294
{
 
3295
        if (ndr_flags & NDR_SCALARS) {
 
3296
                NDR_CHECK(ndr_push_align(ndr, 5));
 
3297
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
 
3298
                NDR_CHECK(ndr_push_set_switch_value(ndr, &r->e, r->level));
 
3299
                NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_SCALARS, &r->e));
 
3300
                NDR_CHECK(ndr_push_trailer_align(ndr, 5));
 
3301
        }
 
3302
        if (ndr_flags & NDR_BUFFERS) {
 
3303
                NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_BUFFERS, &r->e));
 
3304
        }
 
3305
        return NDR_ERR_SUCCESS;
 
3306
}
 
3307
 
 
3308
static enum ndr_err_code ndr_pull_dfs_EnumStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumStruct *r)
 
3309
{
 
3310
        if (ndr_flags & NDR_SCALARS) {
 
3311
                NDR_CHECK(ndr_pull_align(ndr, 5));
 
3312
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
 
3313
                NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->e, r->level));
 
3314
                NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_SCALARS, &r->e));
 
3315
                NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
 
3316
        }
 
3317
        if (ndr_flags & NDR_BUFFERS) {
 
3318
                NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_BUFFERS, &r->e));
 
3319
        }
 
3320
        return NDR_ERR_SUCCESS;
 
3321
}
 
3322
 
 
3323
_PUBLIC_ void ndr_print_dfs_EnumStruct(struct ndr_print *ndr, const char *name, const struct dfs_EnumStruct *r)
 
3324
{
 
3325
        ndr_print_struct(ndr, name, "dfs_EnumStruct");
 
3326
        if (r == NULL) { ndr_print_null(ndr); return; }
 
3327
        ndr->depth++;
 
3328
        ndr_print_uint32(ndr, "level", r->level);
 
3329
        ndr_print_set_switch_value(ndr, &r->e, r->level);
 
3330
        ndr_print_dfs_EnumInfo(ndr, "e", &r->e);
 
3331
        ndr->depth--;
 
3332
}
 
3333
 
 
3334
static enum ndr_err_code ndr_push_dfs_UnknownStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_UnknownStruct *r)
 
3335
{
 
3336
        if (ndr_flags & NDR_SCALARS) {
 
3337
                NDR_CHECK(ndr_push_align(ndr, 5));
 
3338
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
 
3339
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->unknown2));
 
3340
                NDR_CHECK(ndr_push_trailer_align(ndr, 5));
 
3341
        }
 
3342
        if (ndr_flags & NDR_BUFFERS) {
 
3343
                if (r->unknown2) {
 
3344
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->unknown2, CH_UTF16)));
 
3345
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
3346
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->unknown2, CH_UTF16)));
 
3347
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->unknown2, ndr_charset_length(r->unknown2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
3348
                }
 
3349
        }
 
3350
        return NDR_ERR_SUCCESS;
 
3351
}
 
3352
 
 
3353
static enum ndr_err_code ndr_pull_dfs_UnknownStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_UnknownStruct *r)
 
3354
{
 
3355
        uint32_t _ptr_unknown2;
 
3356
        TALLOC_CTX *_mem_save_unknown2_0;
 
3357
        if (ndr_flags & NDR_SCALARS) {
 
3358
                NDR_CHECK(ndr_pull_align(ndr, 5));
 
3359
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
 
3360
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
 
3361
                if (_ptr_unknown2) {
 
3362
                        NDR_PULL_ALLOC(ndr, r->unknown2);
 
3363
                } else {
 
3364
                        r->unknown2 = NULL;
 
3365
                }
 
3366
                NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
 
3367
        }
 
3368
        if (ndr_flags & NDR_BUFFERS) {
 
3369
                if (r->unknown2) {
 
3370
                        _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
3371
                        NDR_PULL_SET_MEM_CTX(ndr, r->unknown2, 0);
 
3372
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->unknown2));
 
3373
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->unknown2));
 
3374
                        if (ndr_get_array_length(ndr, &r->unknown2) > ndr_get_array_size(ndr, &r->unknown2)) {
 
3375
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->unknown2), ndr_get_array_length(ndr, &r->unknown2));
 
3376
                        }
 
3377
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->unknown2), sizeof(uint16_t)));
 
3378
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->unknown2, ndr_get_array_length(ndr, &r->unknown2), sizeof(uint16_t), CH_UTF16));
 
3379
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
 
3380
                }
 
3381
        }
 
3382
        return NDR_ERR_SUCCESS;
 
3383
}
 
3384
 
 
3385
_PUBLIC_ void ndr_print_dfs_UnknownStruct(struct ndr_print *ndr, const char *name, const struct dfs_UnknownStruct *r)
 
3386
{
 
3387
        ndr_print_struct(ndr, name, "dfs_UnknownStruct");
 
3388
        if (r == NULL) { ndr_print_null(ndr); return; }
 
3389
        ndr->depth++;
 
3390
        ndr_print_uint32(ndr, "unknown1", r->unknown1);
 
3391
        ndr_print_ptr(ndr, "unknown2", r->unknown2);
 
3392
        ndr->depth++;
 
3393
        if (r->unknown2) {
 
3394
                ndr_print_string(ndr, "unknown2", r->unknown2);
 
3395
        }
 
3396
        ndr->depth--;
 
3397
        ndr->depth--;
 
3398
}
 
3399
 
 
3400
_PUBLIC_ enum ndr_err_code ndr_push_dfs_GetManagerVersion(struct ndr_push *ndr, int flags, const struct dfs_GetManagerVersion *r)
 
3401
{
 
3402
        if (flags & NDR_IN) {
 
3403
        }
 
3404
        if (flags & NDR_OUT) {
 
3405
                if (r->out.version == NULL) {
 
3406
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
 
3407
                }
 
3408
                NDR_CHECK(ndr_push_dfs_ManagerVersion(ndr, NDR_SCALARS, *r->out.version));
 
3409
        }
 
3410
        return NDR_ERR_SUCCESS;
 
3411
}
 
3412
 
 
3413
_PUBLIC_ enum ndr_err_code ndr_pull_dfs_GetManagerVersion(struct ndr_pull *ndr, int flags, struct dfs_GetManagerVersion *r)
 
3414
{
 
3415
        TALLOC_CTX *_mem_save_version_0;
 
3416
        if (flags & NDR_IN) {
 
3417
                ZERO_STRUCT(r->out);
 
3418
 
 
3419
                NDR_PULL_ALLOC(ndr, r->out.version);
 
3420
                ZERO_STRUCTP(r->out.version);
 
3421
        }
 
3422
        if (flags & NDR_OUT) {
 
3423
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
 
3424
                        NDR_PULL_ALLOC(ndr, r->out.version);
 
3425
                }
 
3426
                _mem_save_version_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
3427
                NDR_PULL_SET_MEM_CTX(ndr, r->out.version, LIBNDR_FLAG_REF_ALLOC);
 
3428
                NDR_CHECK(ndr_pull_dfs_ManagerVersion(ndr, NDR_SCALARS, r->out.version));
 
3429
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_version_0, LIBNDR_FLAG_REF_ALLOC);
 
3430
        }
 
3431
        return NDR_ERR_SUCCESS;
 
3432
}
 
3433
 
 
3434
_PUBLIC_ void ndr_print_dfs_GetManagerVersion(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetManagerVersion *r)
 
3435
{
 
3436
        ndr_print_struct(ndr, name, "dfs_GetManagerVersion");
 
3437
        if (r == NULL) { ndr_print_null(ndr); return; }
 
3438
        ndr->depth++;
 
3439
        if (flags & NDR_SET_VALUES) {
 
3440
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
 
3441
        }
 
3442
        if (flags & NDR_IN) {
 
3443
                ndr_print_struct(ndr, "in", "dfs_GetManagerVersion");
 
3444
                ndr->depth++;
 
3445
                ndr->depth--;
 
3446
        }
 
3447
        if (flags & NDR_OUT) {
 
3448
                ndr_print_struct(ndr, "out", "dfs_GetManagerVersion");
 
3449
                ndr->depth++;
 
3450
                ndr_print_ptr(ndr, "version", r->out.version);
 
3451
                ndr->depth++;
 
3452
                ndr_print_dfs_ManagerVersion(ndr, "version", *r->out.version);
 
3453
                ndr->depth--;
 
3454
                ndr->depth--;
 
3455
        }
 
3456
        ndr->depth--;
 
3457
}
 
3458
 
 
3459
static enum ndr_err_code ndr_push_dfs_Add(struct ndr_push *ndr, int flags, const struct dfs_Add *r)
 
3460
{
 
3461
        if (flags & NDR_IN) {
 
3462
                if (r->in.path == NULL) {
 
3463
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
 
3464
                }
 
3465
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
 
3466
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
3467
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
 
3468
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
3469
                if (r->in.server == NULL) {
 
3470
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
 
3471
                }
 
3472
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
 
3473
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
3474
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
 
3475
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
3476
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share));
 
3477
                if (r->in.share) {
 
3478
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
 
3479
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
3480
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
 
3481
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
3482
                }
 
3483
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.comment));
 
3484
                if (r->in.comment) {
 
3485
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
 
3486
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
3487
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
 
3488
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
3489
                }
 
3490
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
 
3491
        }
 
3492
        if (flags & NDR_OUT) {
 
3493
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
 
3494
        }
 
3495
        return NDR_ERR_SUCCESS;
 
3496
}
 
3497
 
 
3498
static enum ndr_err_code ndr_pull_dfs_Add(struct ndr_pull *ndr, int flags, struct dfs_Add *r)
 
3499
{
 
3500
        uint32_t _ptr_share;
 
3501
        uint32_t _ptr_comment;
 
3502
        TALLOC_CTX *_mem_save_share_0;
 
3503
        TALLOC_CTX *_mem_save_comment_0;
 
3504
        if (flags & NDR_IN) {
 
3505
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
 
3506
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
 
3507
                if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) {
 
3508
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.path), ndr_get_array_length(ndr, &r->in.path));
 
3509
                }
 
3510
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t)));
 
3511
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16));
 
3512
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
 
3513
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
 
3514
                if (ndr_get_array_length(ndr, &r->in.server) > ndr_get_array_size(ndr, &r->in.server)) {
 
3515
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server), ndr_get_array_length(ndr, &r->in.server));
 
3516
                }
 
3517
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t)));
 
3518
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t), CH_UTF16));
 
3519
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
 
3520
                if (_ptr_share) {
 
3521
                        NDR_PULL_ALLOC(ndr, r->in.share);
 
3522
                } else {
 
3523
                        r->in.share = NULL;
 
3524
                }
 
3525
                if (r->in.share) {
 
3526
                        _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
3527
                        NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0);
 
3528
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
 
3529
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
 
3530
                        if (ndr_get_array_length(ndr, &r->in.share) > ndr_get_array_size(ndr, &r->in.share)) {
 
3531
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.share), ndr_get_array_length(ndr, &r->in.share));
 
3532
                        }
 
3533
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t)));
 
3534
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t), CH_UTF16));
 
3535
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
 
3536
                }
 
3537
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
 
3538
                if (_ptr_comment) {
 
3539
                        NDR_PULL_ALLOC(ndr, r->in.comment);
 
3540
                } else {
 
3541
                        r->in.comment = NULL;
 
3542
                }
 
3543
                if (r->in.comment) {
 
3544
                        _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
3545
                        NDR_PULL_SET_MEM_CTX(ndr, r->in.comment, 0);
 
3546
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
 
3547
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
 
3548
                        if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
 
3549
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.comment), ndr_get_array_length(ndr, &r->in.comment));
 
3550
                        }
 
3551
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
 
3552
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
 
3553
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
 
3554
                }
 
3555
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
 
3556
        }
 
3557
        if (flags & NDR_OUT) {
 
3558
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
 
3559
        }
 
3560
        return NDR_ERR_SUCCESS;
 
3561
}
 
3562
 
 
3563
_PUBLIC_ void ndr_print_dfs_Add(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add *r)
 
3564
{
 
3565
        ndr_print_struct(ndr, name, "dfs_Add");
 
3566
        if (r == NULL) { ndr_print_null(ndr); return; }
 
3567
        ndr->depth++;
 
3568
        if (flags & NDR_SET_VALUES) {
 
3569
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
 
3570
        }
 
3571
        if (flags & NDR_IN) {
 
3572
                ndr_print_struct(ndr, "in", "dfs_Add");
 
3573
                ndr->depth++;
 
3574
                ndr_print_ptr(ndr, "path", r->in.path);
 
3575
                ndr->depth++;
 
3576
                ndr_print_string(ndr, "path", r->in.path);
 
3577
                ndr->depth--;
 
3578
                ndr_print_ptr(ndr, "server", r->in.server);
 
3579
                ndr->depth++;
 
3580
                ndr_print_string(ndr, "server", r->in.server);
 
3581
                ndr->depth--;
 
3582
                ndr_print_ptr(ndr, "share", r->in.share);
 
3583
                ndr->depth++;
 
3584
                if (r->in.share) {
 
3585
                        ndr_print_string(ndr, "share", r->in.share);
 
3586
                }
 
3587
                ndr->depth--;
 
3588
                ndr_print_ptr(ndr, "comment", r->in.comment);
 
3589
                ndr->depth++;
 
3590
                if (r->in.comment) {
 
3591
                        ndr_print_string(ndr, "comment", r->in.comment);
 
3592
                }
 
3593
                ndr->depth--;
 
3594
                ndr_print_uint32(ndr, "flags", r->in.flags);
 
3595
                ndr->depth--;
 
3596
        }
 
3597
        if (flags & NDR_OUT) {
 
3598
                ndr_print_struct(ndr, "out", "dfs_Add");
 
3599
                ndr->depth++;
 
3600
                ndr_print_WERROR(ndr, "result", r->out.result);
 
3601
                ndr->depth--;
 
3602
        }
 
3603
        ndr->depth--;
 
3604
}
 
3605
 
 
3606
static enum ndr_err_code ndr_push_dfs_Remove(struct ndr_push *ndr, int flags, const struct dfs_Remove *r)
 
3607
{
 
3608
        if (flags & NDR_IN) {
 
3609
                if (r->in.dfs_entry_path == NULL) {
 
3610
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
 
3611
                }
 
3612
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
 
3613
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
3614
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
 
3615
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfs_entry_path, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
3616
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
 
3617
                if (r->in.servername) {
 
3618
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
 
3619
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
3620
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
 
3621
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
3622
                }
 
3623
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename));
 
3624
                if (r->in.sharename) {
 
3625
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
 
3626
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
3627
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
 
3628
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
3629
                }
 
3630
        }
 
3631
        if (flags & NDR_OUT) {
 
3632
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
 
3633
        }
 
3634
        return NDR_ERR_SUCCESS;
 
3635
}
 
3636
 
 
3637
static enum ndr_err_code ndr_pull_dfs_Remove(struct ndr_pull *ndr, int flags, struct dfs_Remove *r)
 
3638
{
 
3639
        uint32_t _ptr_servername;
 
3640
        uint32_t _ptr_sharename;
 
3641
        TALLOC_CTX *_mem_save_servername_0;
 
3642
        TALLOC_CTX *_mem_save_sharename_0;
 
3643
        if (flags & NDR_IN) {
 
3644
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path));
 
3645
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path));
 
3646
                if (ndr_get_array_length(ndr, &r->in.dfs_entry_path) > ndr_get_array_size(ndr, &r->in.dfs_entry_path)) {
 
3647
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dfs_entry_path), ndr_get_array_length(ndr, &r->in.dfs_entry_path));
 
3648
                }
 
3649
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t)));
 
3650
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfs_entry_path, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t), CH_UTF16));
 
3651
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
 
3652
                if (_ptr_servername) {
 
3653
                        NDR_PULL_ALLOC(ndr, r->in.servername);
 
3654
                } else {
 
3655
                        r->in.servername = NULL;
 
3656
                }
 
3657
                if (r->in.servername) {
 
3658
                        _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
3659
                        NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
 
3660
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
 
3661
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
 
3662
                        if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
 
3663
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
 
3664
                        }
 
3665
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
 
3666
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
 
3667
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
 
3668
                }
 
3669
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
 
3670
                if (_ptr_sharename) {
 
3671
                        NDR_PULL_ALLOC(ndr, r->in.sharename);
 
3672
                } else {
 
3673
                        r->in.sharename = NULL;
 
3674
                }
 
3675
                if (r->in.sharename) {
 
3676
                        _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
3677
                        NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0);
 
3678
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename));
 
3679
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename));
 
3680
                        if (ndr_get_array_length(ndr, &r->in.sharename) > ndr_get_array_size(ndr, &r->in.sharename)) {
 
3681
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.sharename), ndr_get_array_length(ndr, &r->in.sharename));
 
3682
                        }
 
3683
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t)));
 
3684
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t), CH_UTF16));
 
3685
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
 
3686
                }
 
3687
        }
 
3688
        if (flags & NDR_OUT) {
 
3689
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
 
3690
        }
 
3691
        return NDR_ERR_SUCCESS;
 
3692
}
 
3693
 
 
3694
_PUBLIC_ void ndr_print_dfs_Remove(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove *r)
 
3695
{
 
3696
        ndr_print_struct(ndr, name, "dfs_Remove");
 
3697
        if (r == NULL) { ndr_print_null(ndr); return; }
 
3698
        ndr->depth++;
 
3699
        if (flags & NDR_SET_VALUES) {
 
3700
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
 
3701
        }
 
3702
        if (flags & NDR_IN) {
 
3703
                ndr_print_struct(ndr, "in", "dfs_Remove");
 
3704
                ndr->depth++;
 
3705
                ndr_print_ptr(ndr, "dfs_entry_path", r->in.dfs_entry_path);
 
3706
                ndr->depth++;
 
3707
                ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path);
 
3708
                ndr->depth--;
 
3709
                ndr_print_ptr(ndr, "servername", r->in.servername);
 
3710
                ndr->depth++;
 
3711
                if (r->in.servername) {
 
3712
                        ndr_print_string(ndr, "servername", r->in.servername);
 
3713
                }
 
3714
                ndr->depth--;
 
3715
                ndr_print_ptr(ndr, "sharename", r->in.sharename);
 
3716
                ndr->depth++;
 
3717
                if (r->in.sharename) {
 
3718
                        ndr_print_string(ndr, "sharename", r->in.sharename);
 
3719
                }
 
3720
                ndr->depth--;
 
3721
                ndr->depth--;
 
3722
        }
 
3723
        if (flags & NDR_OUT) {
 
3724
                ndr_print_struct(ndr, "out", "dfs_Remove");
 
3725
                ndr->depth++;
 
3726
                ndr_print_WERROR(ndr, "result", r->out.result);
 
3727
                ndr->depth--;
 
3728
        }
 
3729
        ndr->depth--;
 
3730
}
 
3731
 
 
3732
static enum ndr_err_code ndr_push_dfs_SetInfo(struct ndr_push *ndr, int flags, const struct dfs_SetInfo *r)
 
3733
{
 
3734
        if (flags & NDR_IN) {
 
3735
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
 
3736
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
3737
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
 
3738
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfs_entry_path, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
3739
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
 
3740
                if (r->in.servername) {
 
3741
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
 
3742
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
3743
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
 
3744
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
3745
                }
 
3746
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename));
 
3747
                if (r->in.sharename) {
 
3748
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
 
3749
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
3750
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
 
3751
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
3752
                }
 
3753
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
 
3754
                if (r->in.info == NULL) {
 
3755
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
 
3756
                }
 
3757
                NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
 
3758
                NDR_CHECK(ndr_push_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
 
3759
        }
 
3760
        if (flags & NDR_OUT) {
 
3761
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
 
3762
        }
 
3763
        return NDR_ERR_SUCCESS;
 
3764
}
 
3765
 
 
3766
static enum ndr_err_code ndr_pull_dfs_SetInfo(struct ndr_pull *ndr, int flags, struct dfs_SetInfo *r)
 
3767
{
 
3768
        uint32_t _ptr_servername;
 
3769
        uint32_t _ptr_sharename;
 
3770
        TALLOC_CTX *_mem_save_servername_0;
 
3771
        TALLOC_CTX *_mem_save_sharename_0;
 
3772
        TALLOC_CTX *_mem_save_info_0;
 
3773
        if (flags & NDR_IN) {
 
3774
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path));
 
3775
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path));
 
3776
                if (ndr_get_array_length(ndr, &r->in.dfs_entry_path) > ndr_get_array_size(ndr, &r->in.dfs_entry_path)) {
 
3777
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dfs_entry_path), ndr_get_array_length(ndr, &r->in.dfs_entry_path));
 
3778
                }
 
3779
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t)));
 
3780
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfs_entry_path, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t), CH_UTF16));
 
3781
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
 
3782
                if (_ptr_servername) {
 
3783
                        NDR_PULL_ALLOC(ndr, r->in.servername);
 
3784
                } else {
 
3785
                        r->in.servername = NULL;
 
3786
                }
 
3787
                if (r->in.servername) {
 
3788
                        _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
3789
                        NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
 
3790
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
 
3791
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
 
3792
                        if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
 
3793
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
 
3794
                        }
 
3795
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
 
3796
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
 
3797
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
 
3798
                }
 
3799
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
 
3800
                if (_ptr_sharename) {
 
3801
                        NDR_PULL_ALLOC(ndr, r->in.sharename);
 
3802
                } else {
 
3803
                        r->in.sharename = NULL;
 
3804
                }
 
3805
                if (r->in.sharename) {
 
3806
                        _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
3807
                        NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0);
 
3808
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename));
 
3809
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename));
 
3810
                        if (ndr_get_array_length(ndr, &r->in.sharename) > ndr_get_array_size(ndr, &r->in.sharename)) {
 
3811
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.sharename), ndr_get_array_length(ndr, &r->in.sharename));
 
3812
                        }
 
3813
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t)));
 
3814
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t), CH_UTF16));
 
3815
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
 
3816
                }
 
3817
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
 
3818
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
 
3819
                        NDR_PULL_ALLOC(ndr, r->in.info);
 
3820
                }
 
3821
                _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
3822
                NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
 
3823
                NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
 
3824
                NDR_CHECK(ndr_pull_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
 
3825
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
 
3826
        }
 
3827
        if (flags & NDR_OUT) {
 
3828
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
 
3829
        }
 
3830
        return NDR_ERR_SUCCESS;
 
3831
}
 
3832
 
 
3833
_PUBLIC_ void ndr_print_dfs_SetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo *r)
 
3834
{
 
3835
        ndr_print_struct(ndr, name, "dfs_SetInfo");
 
3836
        if (r == NULL) { ndr_print_null(ndr); return; }
 
3837
        ndr->depth++;
 
3838
        if (flags & NDR_SET_VALUES) {
 
3839
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
 
3840
        }
 
3841
        if (flags & NDR_IN) {
 
3842
                ndr_print_struct(ndr, "in", "dfs_SetInfo");
 
3843
                ndr->depth++;
 
3844
                ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path);
 
3845
                ndr_print_ptr(ndr, "servername", r->in.servername);
 
3846
                ndr->depth++;
 
3847
                if (r->in.servername) {
 
3848
                        ndr_print_string(ndr, "servername", r->in.servername);
 
3849
                }
 
3850
                ndr->depth--;
 
3851
                ndr_print_ptr(ndr, "sharename", r->in.sharename);
 
3852
                ndr->depth++;
 
3853
                if (r->in.sharename) {
 
3854
                        ndr_print_string(ndr, "sharename", r->in.sharename);
 
3855
                }
 
3856
                ndr->depth--;
 
3857
                ndr_print_uint32(ndr, "level", r->in.level);
 
3858
                ndr_print_ptr(ndr, "info", r->in.info);
 
3859
                ndr->depth++;
 
3860
                ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
 
3861
                ndr_print_dfs_Info(ndr, "info", r->in.info);
 
3862
                ndr->depth--;
 
3863
                ndr->depth--;
 
3864
        }
 
3865
        if (flags & NDR_OUT) {
 
3866
                ndr_print_struct(ndr, "out", "dfs_SetInfo");
 
3867
                ndr->depth++;
 
3868
                ndr_print_WERROR(ndr, "result", r->out.result);
 
3869
                ndr->depth--;
 
3870
        }
 
3871
        ndr->depth--;
 
3872
}
 
3873
 
 
3874
static enum ndr_err_code ndr_push_dfs_GetInfo(struct ndr_push *ndr, int flags, const struct dfs_GetInfo *r)
 
3875
{
 
3876
        if (flags & NDR_IN) {
 
3877
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
 
3878
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
3879
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
 
3880
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfs_entry_path, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
3881
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
 
3882
                if (r->in.servername) {
 
3883
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
 
3884
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
3885
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
 
3886
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
3887
                }
 
3888
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename));
 
3889
                if (r->in.sharename) {
 
3890
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
 
3891
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
3892
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
 
3893
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
3894
                }
 
3895
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
 
3896
        }
 
3897
        if (flags & NDR_OUT) {
 
3898
                if (r->out.info == NULL) {
 
3899
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
 
3900
                }
 
3901
                NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
 
3902
                NDR_CHECK(ndr_push_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
 
3903
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
 
3904
        }
 
3905
        return NDR_ERR_SUCCESS;
 
3906
}
 
3907
 
 
3908
static enum ndr_err_code ndr_pull_dfs_GetInfo(struct ndr_pull *ndr, int flags, struct dfs_GetInfo *r)
 
3909
{
 
3910
        uint32_t _ptr_servername;
 
3911
        uint32_t _ptr_sharename;
 
3912
        TALLOC_CTX *_mem_save_servername_0;
 
3913
        TALLOC_CTX *_mem_save_sharename_0;
 
3914
        TALLOC_CTX *_mem_save_info_0;
 
3915
        if (flags & NDR_IN) {
 
3916
                ZERO_STRUCT(r->out);
 
3917
 
 
3918
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path));
 
3919
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path));
 
3920
                if (ndr_get_array_length(ndr, &r->in.dfs_entry_path) > ndr_get_array_size(ndr, &r->in.dfs_entry_path)) {
 
3921
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dfs_entry_path), ndr_get_array_length(ndr, &r->in.dfs_entry_path));
 
3922
                }
 
3923
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t)));
 
3924
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfs_entry_path, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t), CH_UTF16));
 
3925
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
 
3926
                if (_ptr_servername) {
 
3927
                        NDR_PULL_ALLOC(ndr, r->in.servername);
 
3928
                } else {
 
3929
                        r->in.servername = NULL;
 
3930
                }
 
3931
                if (r->in.servername) {
 
3932
                        _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
3933
                        NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
 
3934
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
 
3935
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
 
3936
                        if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
 
3937
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
 
3938
                        }
 
3939
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
 
3940
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
 
3941
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
 
3942
                }
 
3943
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
 
3944
                if (_ptr_sharename) {
 
3945
                        NDR_PULL_ALLOC(ndr, r->in.sharename);
 
3946
                } else {
 
3947
                        r->in.sharename = NULL;
 
3948
                }
 
3949
                if (r->in.sharename) {
 
3950
                        _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
3951
                        NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0);
 
3952
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename));
 
3953
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename));
 
3954
                        if (ndr_get_array_length(ndr, &r->in.sharename) > ndr_get_array_size(ndr, &r->in.sharename)) {
 
3955
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.sharename), ndr_get_array_length(ndr, &r->in.sharename));
 
3956
                        }
 
3957
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t)));
 
3958
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t), CH_UTF16));
 
3959
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
 
3960
                }
 
3961
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
 
3962
                NDR_PULL_ALLOC(ndr, r->out.info);
 
3963
                ZERO_STRUCTP(r->out.info);
 
3964
        }
 
3965
        if (flags & NDR_OUT) {
 
3966
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
 
3967
                        NDR_PULL_ALLOC(ndr, r->out.info);
 
3968
                }
 
3969
                _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
3970
                NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
 
3971
                NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
 
3972
                NDR_CHECK(ndr_pull_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
 
3973
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
 
3974
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
 
3975
        }
 
3976
        return NDR_ERR_SUCCESS;
 
3977
}
 
3978
 
 
3979
_PUBLIC_ void ndr_print_dfs_GetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetInfo *r)
 
3980
{
 
3981
        ndr_print_struct(ndr, name, "dfs_GetInfo");
 
3982
        if (r == NULL) { ndr_print_null(ndr); return; }
 
3983
        ndr->depth++;
 
3984
        if (flags & NDR_SET_VALUES) {
 
3985
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
 
3986
        }
 
3987
        if (flags & NDR_IN) {
 
3988
                ndr_print_struct(ndr, "in", "dfs_GetInfo");
 
3989
                ndr->depth++;
 
3990
                ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path);
 
3991
                ndr_print_ptr(ndr, "servername", r->in.servername);
 
3992
                ndr->depth++;
 
3993
                if (r->in.servername) {
 
3994
                        ndr_print_string(ndr, "servername", r->in.servername);
 
3995
                }
 
3996
                ndr->depth--;
 
3997
                ndr_print_ptr(ndr, "sharename", r->in.sharename);
 
3998
                ndr->depth++;
 
3999
                if (r->in.sharename) {
 
4000
                        ndr_print_string(ndr, "sharename", r->in.sharename);
 
4001
                }
 
4002
                ndr->depth--;
 
4003
                ndr_print_uint32(ndr, "level", r->in.level);
 
4004
                ndr->depth--;
 
4005
        }
 
4006
        if (flags & NDR_OUT) {
 
4007
                ndr_print_struct(ndr, "out", "dfs_GetInfo");
 
4008
                ndr->depth++;
 
4009
                ndr_print_ptr(ndr, "info", r->out.info);
 
4010
                ndr->depth++;
 
4011
                ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
 
4012
                ndr_print_dfs_Info(ndr, "info", r->out.info);
 
4013
                ndr->depth--;
 
4014
                ndr_print_WERROR(ndr, "result", r->out.result);
 
4015
                ndr->depth--;
 
4016
        }
 
4017
        ndr->depth--;
 
4018
}
 
4019
 
 
4020
static enum ndr_err_code ndr_push_dfs_Enum(struct ndr_push *ndr, int flags, const struct dfs_Enum *r)
 
4021
{
 
4022
        if (flags & NDR_IN) {
 
4023
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
 
4024
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize));
 
4025
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
 
4026
                if (r->in.info) {
 
4027
                        NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
 
4028
                }
 
4029
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.total));
 
4030
                if (r->in.total) {
 
4031
                        NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.total));
 
4032
                }
 
4033
        }
 
4034
        if (flags & NDR_OUT) {
 
4035
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
 
4036
                if (r->out.info) {
 
4037
                        NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
 
4038
                }
 
4039
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.total));
 
4040
                if (r->out.total) {
 
4041
                        NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total));
 
4042
                }
 
4043
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
 
4044
        }
 
4045
        return NDR_ERR_SUCCESS;
 
4046
}
 
4047
 
 
4048
static enum ndr_err_code ndr_pull_dfs_Enum(struct ndr_pull *ndr, int flags, struct dfs_Enum *r)
 
4049
{
 
4050
        uint32_t _ptr_info;
 
4051
        uint32_t _ptr_total;
 
4052
        TALLOC_CTX *_mem_save_info_0;
 
4053
        TALLOC_CTX *_mem_save_total_0;
 
4054
        if (flags & NDR_IN) {
 
4055
                ZERO_STRUCT(r->out);
 
4056
 
 
4057
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
 
4058
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bufsize));
 
4059
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
 
4060
                if (_ptr_info) {
 
4061
                        NDR_PULL_ALLOC(ndr, r->in.info);
 
4062
                } else {
 
4063
                        r->in.info = NULL;
 
4064
                }
 
4065
                if (r->in.info) {
 
4066
                        _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
4067
                        NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
 
4068
                        NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
 
4069
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
 
4070
                }
 
4071
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
 
4072
                if (_ptr_total) {
 
4073
                        NDR_PULL_ALLOC(ndr, r->in.total);
 
4074
                } else {
 
4075
                        r->in.total = NULL;
 
4076
                }
 
4077
                if (r->in.total) {
 
4078
                        _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
4079
                        NDR_PULL_SET_MEM_CTX(ndr, r->in.total, 0);
 
4080
                        NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.total));
 
4081
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
 
4082
                }
 
4083
        }
 
4084
        if (flags & NDR_OUT) {
 
4085
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
 
4086
                if (_ptr_info) {
 
4087
                        NDR_PULL_ALLOC(ndr, r->out.info);
 
4088
                } else {
 
4089
                        r->out.info = NULL;
 
4090
                }
 
4091
                if (r->out.info) {
 
4092
                        _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
4093
                        NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
 
4094
                        NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
 
4095
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
 
4096
                }
 
4097
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
 
4098
                if (_ptr_total) {
 
4099
                        NDR_PULL_ALLOC(ndr, r->out.total);
 
4100
                } else {
 
4101
                        r->out.total = NULL;
 
4102
                }
 
4103
                if (r->out.total) {
 
4104
                        _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
4105
                        NDR_PULL_SET_MEM_CTX(ndr, r->out.total, 0);
 
4106
                        NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total));
 
4107
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
 
4108
                }
 
4109
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
 
4110
        }
 
4111
        return NDR_ERR_SUCCESS;
 
4112
}
 
4113
 
 
4114
_PUBLIC_ void ndr_print_dfs_Enum(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Enum *r)
 
4115
{
 
4116
        ndr_print_struct(ndr, name, "dfs_Enum");
 
4117
        if (r == NULL) { ndr_print_null(ndr); return; }
 
4118
        ndr->depth++;
 
4119
        if (flags & NDR_SET_VALUES) {
 
4120
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
 
4121
        }
 
4122
        if (flags & NDR_IN) {
 
4123
                ndr_print_struct(ndr, "in", "dfs_Enum");
 
4124
                ndr->depth++;
 
4125
                ndr_print_uint32(ndr, "level", r->in.level);
 
4126
                ndr_print_uint32(ndr, "bufsize", r->in.bufsize);
 
4127
                ndr_print_ptr(ndr, "info", r->in.info);
 
4128
                ndr->depth++;
 
4129
                if (r->in.info) {
 
4130
                        ndr_print_dfs_EnumStruct(ndr, "info", r->in.info);
 
4131
                }
 
4132
                ndr->depth--;
 
4133
                ndr_print_ptr(ndr, "total", r->in.total);
 
4134
                ndr->depth++;
 
4135
                if (r->in.total) {
 
4136
                        ndr_print_uint32(ndr, "total", *r->in.total);
 
4137
                }
 
4138
                ndr->depth--;
 
4139
                ndr->depth--;
 
4140
        }
 
4141
        if (flags & NDR_OUT) {
 
4142
                ndr_print_struct(ndr, "out", "dfs_Enum");
 
4143
                ndr->depth++;
 
4144
                ndr_print_ptr(ndr, "info", r->out.info);
 
4145
                ndr->depth++;
 
4146
                if (r->out.info) {
 
4147
                        ndr_print_dfs_EnumStruct(ndr, "info", r->out.info);
 
4148
                }
 
4149
                ndr->depth--;
 
4150
                ndr_print_ptr(ndr, "total", r->out.total);
 
4151
                ndr->depth++;
 
4152
                if (r->out.total) {
 
4153
                        ndr_print_uint32(ndr, "total", *r->out.total);
 
4154
                }
 
4155
                ndr->depth--;
 
4156
                ndr_print_WERROR(ndr, "result", r->out.result);
 
4157
                ndr->depth--;
 
4158
        }
 
4159
        ndr->depth--;
 
4160
}
 
4161
 
 
4162
static enum ndr_err_code ndr_push_dfs_Rename(struct ndr_push *ndr, int flags, const struct dfs_Rename *r)
 
4163
{
 
4164
        if (flags & NDR_IN) {
 
4165
        }
 
4166
        if (flags & NDR_OUT) {
 
4167
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
 
4168
        }
 
4169
        return NDR_ERR_SUCCESS;
 
4170
}
 
4171
 
 
4172
static enum ndr_err_code ndr_pull_dfs_Rename(struct ndr_pull *ndr, int flags, struct dfs_Rename *r)
 
4173
{
 
4174
        if (flags & NDR_IN) {
 
4175
        }
 
4176
        if (flags & NDR_OUT) {
 
4177
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
 
4178
        }
 
4179
        return NDR_ERR_SUCCESS;
 
4180
}
 
4181
 
 
4182
_PUBLIC_ void ndr_print_dfs_Rename(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Rename *r)
 
4183
{
 
4184
        ndr_print_struct(ndr, name, "dfs_Rename");
 
4185
        if (r == NULL) { ndr_print_null(ndr); return; }
 
4186
        ndr->depth++;
 
4187
        if (flags & NDR_SET_VALUES) {
 
4188
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
 
4189
        }
 
4190
        if (flags & NDR_IN) {
 
4191
                ndr_print_struct(ndr, "in", "dfs_Rename");
 
4192
                ndr->depth++;
 
4193
                ndr->depth--;
 
4194
        }
 
4195
        if (flags & NDR_OUT) {
 
4196
                ndr_print_struct(ndr, "out", "dfs_Rename");
 
4197
                ndr->depth++;
 
4198
                ndr_print_WERROR(ndr, "result", r->out.result);
 
4199
                ndr->depth--;
 
4200
        }
 
4201
        ndr->depth--;
 
4202
}
 
4203
 
 
4204
static enum ndr_err_code ndr_push_dfs_Move(struct ndr_push *ndr, int flags, const struct dfs_Move *r)
 
4205
{
 
4206
        if (flags & NDR_IN) {
 
4207
        }
 
4208
        if (flags & NDR_OUT) {
 
4209
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
 
4210
        }
 
4211
        return NDR_ERR_SUCCESS;
 
4212
}
 
4213
 
 
4214
static enum ndr_err_code ndr_pull_dfs_Move(struct ndr_pull *ndr, int flags, struct dfs_Move *r)
 
4215
{
 
4216
        if (flags & NDR_IN) {
 
4217
        }
 
4218
        if (flags & NDR_OUT) {
 
4219
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
 
4220
        }
 
4221
        return NDR_ERR_SUCCESS;
 
4222
}
 
4223
 
 
4224
_PUBLIC_ void ndr_print_dfs_Move(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Move *r)
 
4225
{
 
4226
        ndr_print_struct(ndr, name, "dfs_Move");
 
4227
        if (r == NULL) { ndr_print_null(ndr); return; }
 
4228
        ndr->depth++;
 
4229
        if (flags & NDR_SET_VALUES) {
 
4230
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
 
4231
        }
 
4232
        if (flags & NDR_IN) {
 
4233
                ndr_print_struct(ndr, "in", "dfs_Move");
 
4234
                ndr->depth++;
 
4235
                ndr->depth--;
 
4236
        }
 
4237
        if (flags & NDR_OUT) {
 
4238
                ndr_print_struct(ndr, "out", "dfs_Move");
 
4239
                ndr->depth++;
 
4240
                ndr_print_WERROR(ndr, "result", r->out.result);
 
4241
                ndr->depth--;
 
4242
        }
 
4243
        ndr->depth--;
 
4244
}
 
4245
 
 
4246
static enum ndr_err_code ndr_push_dfs_ManagerGetConfigInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerGetConfigInfo *r)
 
4247
{
 
4248
        if (flags & NDR_IN) {
 
4249
        }
 
4250
        if (flags & NDR_OUT) {
 
4251
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
 
4252
        }
 
4253
        return NDR_ERR_SUCCESS;
 
4254
}
 
4255
 
 
4256
static enum ndr_err_code ndr_pull_dfs_ManagerGetConfigInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerGetConfigInfo *r)
 
4257
{
 
4258
        if (flags & NDR_IN) {
 
4259
        }
 
4260
        if (flags & NDR_OUT) {
 
4261
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
 
4262
        }
 
4263
        return NDR_ERR_SUCCESS;
 
4264
}
 
4265
 
 
4266
_PUBLIC_ void ndr_print_dfs_ManagerGetConfigInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerGetConfigInfo *r)
 
4267
{
 
4268
        ndr_print_struct(ndr, name, "dfs_ManagerGetConfigInfo");
 
4269
        if (r == NULL) { ndr_print_null(ndr); return; }
 
4270
        ndr->depth++;
 
4271
        if (flags & NDR_SET_VALUES) {
 
4272
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
 
4273
        }
 
4274
        if (flags & NDR_IN) {
 
4275
                ndr_print_struct(ndr, "in", "dfs_ManagerGetConfigInfo");
 
4276
                ndr->depth++;
 
4277
                ndr->depth--;
 
4278
        }
 
4279
        if (flags & NDR_OUT) {
 
4280
                ndr_print_struct(ndr, "out", "dfs_ManagerGetConfigInfo");
 
4281
                ndr->depth++;
 
4282
                ndr_print_WERROR(ndr, "result", r->out.result);
 
4283
                ndr->depth--;
 
4284
        }
 
4285
        ndr->depth--;
 
4286
}
 
4287
 
 
4288
static enum ndr_err_code ndr_push_dfs_ManagerSendSiteInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerSendSiteInfo *r)
 
4289
{
 
4290
        if (flags & NDR_IN) {
 
4291
        }
 
4292
        if (flags & NDR_OUT) {
 
4293
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
 
4294
        }
 
4295
        return NDR_ERR_SUCCESS;
 
4296
}
 
4297
 
 
4298
static enum ndr_err_code ndr_pull_dfs_ManagerSendSiteInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerSendSiteInfo *r)
 
4299
{
 
4300
        if (flags & NDR_IN) {
 
4301
        }
 
4302
        if (flags & NDR_OUT) {
 
4303
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
 
4304
        }
 
4305
        return NDR_ERR_SUCCESS;
 
4306
}
 
4307
 
 
4308
_PUBLIC_ void ndr_print_dfs_ManagerSendSiteInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerSendSiteInfo *r)
 
4309
{
 
4310
        ndr_print_struct(ndr, name, "dfs_ManagerSendSiteInfo");
 
4311
        if (r == NULL) { ndr_print_null(ndr); return; }
 
4312
        ndr->depth++;
 
4313
        if (flags & NDR_SET_VALUES) {
 
4314
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
 
4315
        }
 
4316
        if (flags & NDR_IN) {
 
4317
                ndr_print_struct(ndr, "in", "dfs_ManagerSendSiteInfo");
 
4318
                ndr->depth++;
 
4319
                ndr->depth--;
 
4320
        }
 
4321
        if (flags & NDR_OUT) {
 
4322
                ndr_print_struct(ndr, "out", "dfs_ManagerSendSiteInfo");
 
4323
                ndr->depth++;
 
4324
                ndr_print_WERROR(ndr, "result", r->out.result);
 
4325
                ndr->depth--;
 
4326
        }
 
4327
        ndr->depth--;
 
4328
}
 
4329
 
 
4330
static enum ndr_err_code ndr_push_dfs_AddFtRoot(struct ndr_push *ndr, int flags, const struct dfs_AddFtRoot *r)
 
4331
{
 
4332
        if (flags & NDR_IN) {
 
4333
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
 
4334
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
4335
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
 
4336
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
4337
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
 
4338
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
4339
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
 
4340
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dns_servername, ndr_charset_length(r->in.dns_servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
4341
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
 
4342
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
4343
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
 
4344
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfsname, ndr_charset_length(r->in.dfsname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
4345
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
 
4346
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
4347
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
 
4348
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
4349
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
 
4350
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
4351
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
 
4352
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
4353
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_config_dn, CH_UTF16)));
 
4354
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
4355
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_config_dn, CH_UTF16)));
 
4356
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfs_config_dn, ndr_charset_length(r->in.dfs_config_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
4357
                NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.unknown1));
 
4358
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
 
4359
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown2));
 
4360
                if (r->in.unknown2) {
 
4361
                        NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.unknown2));
 
4362
                        if (*r->in.unknown2) {
 
4363
                                NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown2));
 
4364
                        }
 
4365
                }
 
4366
        }
 
4367
        if (flags & NDR_OUT) {
 
4368
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.unknown2));
 
4369
                if (r->out.unknown2) {
 
4370
                        NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.unknown2));
 
4371
                        if (*r->out.unknown2) {
 
4372
                                NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown2));
 
4373
                        }
 
4374
                }
 
4375
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
 
4376
        }
 
4377
        return NDR_ERR_SUCCESS;
 
4378
}
 
4379
 
 
4380
static enum ndr_err_code ndr_pull_dfs_AddFtRoot(struct ndr_pull *ndr, int flags, struct dfs_AddFtRoot *r)
 
4381
{
 
4382
        uint32_t _ptr_unknown2;
 
4383
        TALLOC_CTX *_mem_save_unknown2_0;
 
4384
        TALLOC_CTX *_mem_save_unknown2_1;
 
4385
        if (flags & NDR_IN) {
 
4386
                ZERO_STRUCT(r->out);
 
4387
 
 
4388
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
 
4389
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
 
4390
                if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
 
4391
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
 
4392
                }
 
4393
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
 
4394
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
 
4395
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dns_servername));
 
4396
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dns_servername));
 
4397
                if (ndr_get_array_length(ndr, &r->in.dns_servername) > ndr_get_array_size(ndr, &r->in.dns_servername)) {
 
4398
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dns_servername), ndr_get_array_length(ndr, &r->in.dns_servername));
 
4399
                }
 
4400
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dns_servername), sizeof(uint16_t)));
 
4401
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dns_servername, ndr_get_array_length(ndr, &r->in.dns_servername), sizeof(uint16_t), CH_UTF16));
 
4402
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfsname));
 
4403
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfsname));
 
4404
                if (ndr_get_array_length(ndr, &r->in.dfsname) > ndr_get_array_size(ndr, &r->in.dfsname)) {
 
4405
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dfsname), ndr_get_array_length(ndr, &r->in.dfsname));
 
4406
                }
 
4407
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t)));
 
4408
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfsname, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t), CH_UTF16));
 
4409
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
 
4410
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
 
4411
                if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
 
4412
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.rootshare), ndr_get_array_length(ndr, &r->in.rootshare));
 
4413
                }
 
4414
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
 
4415
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
 
4416
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
 
4417
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
 
4418
                if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
 
4419
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.comment), ndr_get_array_length(ndr, &r->in.comment));
 
4420
                }
 
4421
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
 
4422
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
 
4423
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_config_dn));
 
4424
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_config_dn));
 
4425
                if (ndr_get_array_length(ndr, &r->in.dfs_config_dn) > ndr_get_array_size(ndr, &r->in.dfs_config_dn)) {
 
4426
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dfs_config_dn), ndr_get_array_length(ndr, &r->in.dfs_config_dn));
 
4427
                }
 
4428
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_config_dn), sizeof(uint16_t)));
 
4429
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfs_config_dn, ndr_get_array_length(ndr, &r->in.dfs_config_dn), sizeof(uint16_t), CH_UTF16));
 
4430
                NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.unknown1));
 
4431
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
 
4432
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
 
4433
                if (_ptr_unknown2) {
 
4434
                        NDR_PULL_ALLOC(ndr, r->in.unknown2);
 
4435
                } else {
 
4436
                        r->in.unknown2 = NULL;
 
4437
                }
 
4438
                if (r->in.unknown2) {
 
4439
                        _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
4440
                        NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown2, 0);
 
4441
                        NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
 
4442
                        if (_ptr_unknown2) {
 
4443
                                NDR_PULL_ALLOC(ndr, *r->in.unknown2);
 
4444
                        } else {
 
4445
                                *r->in.unknown2 = NULL;
 
4446
                        }
 
4447
                        if (*r->in.unknown2) {
 
4448
                                _mem_save_unknown2_1 = NDR_PULL_GET_MEM_CTX(ndr);
 
4449
                                NDR_PULL_SET_MEM_CTX(ndr, *r->in.unknown2, 0);
 
4450
                                NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown2));
 
4451
                                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_1, 0);
 
4452
                        }
 
4453
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
 
4454
                }
 
4455
        }
 
4456
        if (flags & NDR_OUT) {
 
4457
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
 
4458
                if (_ptr_unknown2) {
 
4459
                        NDR_PULL_ALLOC(ndr, r->out.unknown2);
 
4460
                } else {
 
4461
                        r->out.unknown2 = NULL;
 
4462
                }
 
4463
                if (r->out.unknown2) {
 
4464
                        _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
4465
                        NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown2, 0);
 
4466
                        NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
 
4467
                        if (_ptr_unknown2) {
 
4468
                                NDR_PULL_ALLOC(ndr, *r->out.unknown2);
 
4469
                        } else {
 
4470
                                *r->out.unknown2 = NULL;
 
4471
                        }
 
4472
                        if (*r->out.unknown2) {
 
4473
                                _mem_save_unknown2_1 = NDR_PULL_GET_MEM_CTX(ndr);
 
4474
                                NDR_PULL_SET_MEM_CTX(ndr, *r->out.unknown2, 0);
 
4475
                                NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown2));
 
4476
                                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_1, 0);
 
4477
                        }
 
4478
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
 
4479
                }
 
4480
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
 
4481
        }
 
4482
        return NDR_ERR_SUCCESS;
 
4483
}
 
4484
 
 
4485
_PUBLIC_ void ndr_print_dfs_AddFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddFtRoot *r)
 
4486
{
 
4487
        ndr_print_struct(ndr, name, "dfs_AddFtRoot");
 
4488
        if (r == NULL) { ndr_print_null(ndr); return; }
 
4489
        ndr->depth++;
 
4490
        if (flags & NDR_SET_VALUES) {
 
4491
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
 
4492
        }
 
4493
        if (flags & NDR_IN) {
 
4494
                ndr_print_struct(ndr, "in", "dfs_AddFtRoot");
 
4495
                ndr->depth++;
 
4496
                ndr_print_string(ndr, "servername", r->in.servername);
 
4497
                ndr_print_string(ndr, "dns_servername", r->in.dns_servername);
 
4498
                ndr_print_string(ndr, "dfsname", r->in.dfsname);
 
4499
                ndr_print_string(ndr, "rootshare", r->in.rootshare);
 
4500
                ndr_print_string(ndr, "comment", r->in.comment);
 
4501
                ndr_print_string(ndr, "dfs_config_dn", r->in.dfs_config_dn);
 
4502
                ndr_print_uint8(ndr, "unknown1", r->in.unknown1);
 
4503
                ndr_print_uint32(ndr, "flags", r->in.flags);
 
4504
                ndr_print_ptr(ndr, "unknown2", r->in.unknown2);
 
4505
                ndr->depth++;
 
4506
                if (r->in.unknown2) {
 
4507
                        ndr_print_ptr(ndr, "unknown2", *r->in.unknown2);
 
4508
                        ndr->depth++;
 
4509
                        if (*r->in.unknown2) {
 
4510
                                ndr_print_dfs_UnknownStruct(ndr, "unknown2", *r->in.unknown2);
 
4511
                        }
 
4512
                        ndr->depth--;
 
4513
                }
 
4514
                ndr->depth--;
 
4515
                ndr->depth--;
 
4516
        }
 
4517
        if (flags & NDR_OUT) {
 
4518
                ndr_print_struct(ndr, "out", "dfs_AddFtRoot");
 
4519
                ndr->depth++;
 
4520
                ndr_print_ptr(ndr, "unknown2", r->out.unknown2);
 
4521
                ndr->depth++;
 
4522
                if (r->out.unknown2) {
 
4523
                        ndr_print_ptr(ndr, "unknown2", *r->out.unknown2);
 
4524
                        ndr->depth++;
 
4525
                        if (*r->out.unknown2) {
 
4526
                                ndr_print_dfs_UnknownStruct(ndr, "unknown2", *r->out.unknown2);
 
4527
                        }
 
4528
                        ndr->depth--;
 
4529
                }
 
4530
                ndr->depth--;
 
4531
                ndr_print_WERROR(ndr, "result", r->out.result);
 
4532
                ndr->depth--;
 
4533
        }
 
4534
        ndr->depth--;
 
4535
}
 
4536
 
 
4537
static enum ndr_err_code ndr_push_dfs_RemoveFtRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveFtRoot *r)
 
4538
{
 
4539
        if (flags & NDR_IN) {
 
4540
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
 
4541
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
4542
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
 
4543
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
4544
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
 
4545
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
4546
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
 
4547
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dns_servername, ndr_charset_length(r->in.dns_servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
4548
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
 
4549
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
4550
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
 
4551
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfsname, ndr_charset_length(r->in.dfsname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
4552
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
 
4553
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
4554
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
 
4555
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
4556
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
 
4557
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown));
 
4558
                if (r->in.unknown) {
 
4559
                        NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.unknown));
 
4560
                        if (*r->in.unknown) {
 
4561
                                NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown));
 
4562
                        }
 
4563
                }
 
4564
        }
 
4565
        if (flags & NDR_OUT) {
 
4566
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.unknown));
 
4567
                if (r->out.unknown) {
 
4568
                        NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.unknown));
 
4569
                        if (*r->out.unknown) {
 
4570
                                NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown));
 
4571
                        }
 
4572
                }
 
4573
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
 
4574
        }
 
4575
        return NDR_ERR_SUCCESS;
 
4576
}
 
4577
 
 
4578
static enum ndr_err_code ndr_pull_dfs_RemoveFtRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveFtRoot *r)
 
4579
{
 
4580
        uint32_t _ptr_unknown;
 
4581
        TALLOC_CTX *_mem_save_unknown_0;
 
4582
        TALLOC_CTX *_mem_save_unknown_1;
 
4583
        if (flags & NDR_IN) {
 
4584
                ZERO_STRUCT(r->out);
 
4585
 
 
4586
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
 
4587
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
 
4588
                if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
 
4589
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
 
4590
                }
 
4591
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
 
4592
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
 
4593
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dns_servername));
 
4594
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dns_servername));
 
4595
                if (ndr_get_array_length(ndr, &r->in.dns_servername) > ndr_get_array_size(ndr, &r->in.dns_servername)) {
 
4596
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dns_servername), ndr_get_array_length(ndr, &r->in.dns_servername));
 
4597
                }
 
4598
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dns_servername), sizeof(uint16_t)));
 
4599
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dns_servername, ndr_get_array_length(ndr, &r->in.dns_servername), sizeof(uint16_t), CH_UTF16));
 
4600
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfsname));
 
4601
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfsname));
 
4602
                if (ndr_get_array_length(ndr, &r->in.dfsname) > ndr_get_array_size(ndr, &r->in.dfsname)) {
 
4603
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dfsname), ndr_get_array_length(ndr, &r->in.dfsname));
 
4604
                }
 
4605
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t)));
 
4606
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfsname, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t), CH_UTF16));
 
4607
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
 
4608
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
 
4609
                if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
 
4610
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.rootshare), ndr_get_array_length(ndr, &r->in.rootshare));
 
4611
                }
 
4612
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
 
4613
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
 
4614
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
 
4615
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
 
4616
                if (_ptr_unknown) {
 
4617
                        NDR_PULL_ALLOC(ndr, r->in.unknown);
 
4618
                } else {
 
4619
                        r->in.unknown = NULL;
 
4620
                }
 
4621
                if (r->in.unknown) {
 
4622
                        _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
4623
                        NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown, 0);
 
4624
                        NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
 
4625
                        if (_ptr_unknown) {
 
4626
                                NDR_PULL_ALLOC(ndr, *r->in.unknown);
 
4627
                        } else {
 
4628
                                *r->in.unknown = NULL;
 
4629
                        }
 
4630
                        if (*r->in.unknown) {
 
4631
                                _mem_save_unknown_1 = NDR_PULL_GET_MEM_CTX(ndr);
 
4632
                                NDR_PULL_SET_MEM_CTX(ndr, *r->in.unknown, 0);
 
4633
                                NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown));
 
4634
                                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_1, 0);
 
4635
                        }
 
4636
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0);
 
4637
                }
 
4638
        }
 
4639
        if (flags & NDR_OUT) {
 
4640
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
 
4641
                if (_ptr_unknown) {
 
4642
                        NDR_PULL_ALLOC(ndr, r->out.unknown);
 
4643
                } else {
 
4644
                        r->out.unknown = NULL;
 
4645
                }
 
4646
                if (r->out.unknown) {
 
4647
                        _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
4648
                        NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown, 0);
 
4649
                        NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
 
4650
                        if (_ptr_unknown) {
 
4651
                                NDR_PULL_ALLOC(ndr, *r->out.unknown);
 
4652
                        } else {
 
4653
                                *r->out.unknown = NULL;
 
4654
                        }
 
4655
                        if (*r->out.unknown) {
 
4656
                                _mem_save_unknown_1 = NDR_PULL_GET_MEM_CTX(ndr);
 
4657
                                NDR_PULL_SET_MEM_CTX(ndr, *r->out.unknown, 0);
 
4658
                                NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown));
 
4659
                                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_1, 0);
 
4660
                        }
 
4661
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0);
 
4662
                }
 
4663
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
 
4664
        }
 
4665
        return NDR_ERR_SUCCESS;
 
4666
}
 
4667
 
 
4668
_PUBLIC_ void ndr_print_dfs_RemoveFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveFtRoot *r)
 
4669
{
 
4670
        ndr_print_struct(ndr, name, "dfs_RemoveFtRoot");
 
4671
        if (r == NULL) { ndr_print_null(ndr); return; }
 
4672
        ndr->depth++;
 
4673
        if (flags & NDR_SET_VALUES) {
 
4674
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
 
4675
        }
 
4676
        if (flags & NDR_IN) {
 
4677
                ndr_print_struct(ndr, "in", "dfs_RemoveFtRoot");
 
4678
                ndr->depth++;
 
4679
                ndr_print_string(ndr, "servername", r->in.servername);
 
4680
                ndr_print_string(ndr, "dns_servername", r->in.dns_servername);
 
4681
                ndr_print_string(ndr, "dfsname", r->in.dfsname);
 
4682
                ndr_print_string(ndr, "rootshare", r->in.rootshare);
 
4683
                ndr_print_uint32(ndr, "flags", r->in.flags);
 
4684
                ndr_print_ptr(ndr, "unknown", r->in.unknown);
 
4685
                ndr->depth++;
 
4686
                if (r->in.unknown) {
 
4687
                        ndr_print_ptr(ndr, "unknown", *r->in.unknown);
 
4688
                        ndr->depth++;
 
4689
                        if (*r->in.unknown) {
 
4690
                                ndr_print_dfs_UnknownStruct(ndr, "unknown", *r->in.unknown);
 
4691
                        }
 
4692
                        ndr->depth--;
 
4693
                }
 
4694
                ndr->depth--;
 
4695
                ndr->depth--;
 
4696
        }
 
4697
        if (flags & NDR_OUT) {
 
4698
                ndr_print_struct(ndr, "out", "dfs_RemoveFtRoot");
 
4699
                ndr->depth++;
 
4700
                ndr_print_ptr(ndr, "unknown", r->out.unknown);
 
4701
                ndr->depth++;
 
4702
                if (r->out.unknown) {
 
4703
                        ndr_print_ptr(ndr, "unknown", *r->out.unknown);
 
4704
                        ndr->depth++;
 
4705
                        if (*r->out.unknown) {
 
4706
                                ndr_print_dfs_UnknownStruct(ndr, "unknown", *r->out.unknown);
 
4707
                        }
 
4708
                        ndr->depth--;
 
4709
                }
 
4710
                ndr->depth--;
 
4711
                ndr_print_WERROR(ndr, "result", r->out.result);
 
4712
                ndr->depth--;
 
4713
        }
 
4714
        ndr->depth--;
 
4715
}
 
4716
 
 
4717
static enum ndr_err_code ndr_push_dfs_AddStdRoot(struct ndr_push *ndr, int flags, const struct dfs_AddStdRoot *r)
 
4718
{
 
4719
        if (flags & NDR_IN) {
 
4720
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
 
4721
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
4722
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
 
4723
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
4724
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
 
4725
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
4726
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
 
4727
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
4728
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
 
4729
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
4730
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
 
4731
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
4732
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
 
4733
        }
 
4734
        if (flags & NDR_OUT) {
 
4735
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
 
4736
        }
 
4737
        return NDR_ERR_SUCCESS;
 
4738
}
 
4739
 
 
4740
static enum ndr_err_code ndr_pull_dfs_AddStdRoot(struct ndr_pull *ndr, int flags, struct dfs_AddStdRoot *r)
 
4741
{
 
4742
        if (flags & NDR_IN) {
 
4743
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
 
4744
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
 
4745
                if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
 
4746
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
 
4747
                }
 
4748
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
 
4749
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
 
4750
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
 
4751
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
 
4752
                if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
 
4753
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.rootshare), ndr_get_array_length(ndr, &r->in.rootshare));
 
4754
                }
 
4755
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
 
4756
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
 
4757
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
 
4758
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
 
4759
                if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
 
4760
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.comment), ndr_get_array_length(ndr, &r->in.comment));
 
4761
                }
 
4762
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
 
4763
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
 
4764
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
 
4765
        }
 
4766
        if (flags & NDR_OUT) {
 
4767
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
 
4768
        }
 
4769
        return NDR_ERR_SUCCESS;
 
4770
}
 
4771
 
 
4772
_PUBLIC_ void ndr_print_dfs_AddStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRoot *r)
 
4773
{
 
4774
        ndr_print_struct(ndr, name, "dfs_AddStdRoot");
 
4775
        if (r == NULL) { ndr_print_null(ndr); return; }
 
4776
        ndr->depth++;
 
4777
        if (flags & NDR_SET_VALUES) {
 
4778
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
 
4779
        }
 
4780
        if (flags & NDR_IN) {
 
4781
                ndr_print_struct(ndr, "in", "dfs_AddStdRoot");
 
4782
                ndr->depth++;
 
4783
                ndr_print_string(ndr, "servername", r->in.servername);
 
4784
                ndr_print_string(ndr, "rootshare", r->in.rootshare);
 
4785
                ndr_print_string(ndr, "comment", r->in.comment);
 
4786
                ndr_print_uint32(ndr, "flags", r->in.flags);
 
4787
                ndr->depth--;
 
4788
        }
 
4789
        if (flags & NDR_OUT) {
 
4790
                ndr_print_struct(ndr, "out", "dfs_AddStdRoot");
 
4791
                ndr->depth++;
 
4792
                ndr_print_WERROR(ndr, "result", r->out.result);
 
4793
                ndr->depth--;
 
4794
        }
 
4795
        ndr->depth--;
 
4796
}
 
4797
 
 
4798
static enum ndr_err_code ndr_push_dfs_RemoveStdRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveStdRoot *r)
 
4799
{
 
4800
        if (flags & NDR_IN) {
 
4801
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
 
4802
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
4803
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
 
4804
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
4805
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
 
4806
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
4807
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
 
4808
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
4809
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
 
4810
        }
 
4811
        if (flags & NDR_OUT) {
 
4812
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
 
4813
        }
 
4814
        return NDR_ERR_SUCCESS;
 
4815
}
 
4816
 
 
4817
static enum ndr_err_code ndr_pull_dfs_RemoveStdRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveStdRoot *r)
 
4818
{
 
4819
        if (flags & NDR_IN) {
 
4820
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
 
4821
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
 
4822
                if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
 
4823
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
 
4824
                }
 
4825
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
 
4826
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
 
4827
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
 
4828
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
 
4829
                if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
 
4830
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.rootshare), ndr_get_array_length(ndr, &r->in.rootshare));
 
4831
                }
 
4832
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
 
4833
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
 
4834
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
 
4835
        }
 
4836
        if (flags & NDR_OUT) {
 
4837
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
 
4838
        }
 
4839
        return NDR_ERR_SUCCESS;
 
4840
}
 
4841
 
 
4842
_PUBLIC_ void ndr_print_dfs_RemoveStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveStdRoot *r)
 
4843
{
 
4844
        ndr_print_struct(ndr, name, "dfs_RemoveStdRoot");
 
4845
        if (r == NULL) { ndr_print_null(ndr); return; }
 
4846
        ndr->depth++;
 
4847
        if (flags & NDR_SET_VALUES) {
 
4848
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
 
4849
        }
 
4850
        if (flags & NDR_IN) {
 
4851
                ndr_print_struct(ndr, "in", "dfs_RemoveStdRoot");
 
4852
                ndr->depth++;
 
4853
                ndr_print_string(ndr, "servername", r->in.servername);
 
4854
                ndr_print_string(ndr, "rootshare", r->in.rootshare);
 
4855
                ndr_print_uint32(ndr, "flags", r->in.flags);
 
4856
                ndr->depth--;
 
4857
        }
 
4858
        if (flags & NDR_OUT) {
 
4859
                ndr_print_struct(ndr, "out", "dfs_RemoveStdRoot");
 
4860
                ndr->depth++;
 
4861
                ndr_print_WERROR(ndr, "result", r->out.result);
 
4862
                ndr->depth--;
 
4863
        }
 
4864
        ndr->depth--;
 
4865
}
 
4866
 
 
4867
static enum ndr_err_code ndr_push_dfs_ManagerInitialize(struct ndr_push *ndr, int flags, const struct dfs_ManagerInitialize *r)
 
4868
{
 
4869
        if (flags & NDR_IN) {
 
4870
                if (r->in.servername == NULL) {
 
4871
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
 
4872
                }
 
4873
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
 
4874
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
4875
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
 
4876
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
4877
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
 
4878
        }
 
4879
        if (flags & NDR_OUT) {
 
4880
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
 
4881
        }
 
4882
        return NDR_ERR_SUCCESS;
 
4883
}
 
4884
 
 
4885
static enum ndr_err_code ndr_pull_dfs_ManagerInitialize(struct ndr_pull *ndr, int flags, struct dfs_ManagerInitialize *r)
 
4886
{
 
4887
        if (flags & NDR_IN) {
 
4888
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
 
4889
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
 
4890
                if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
 
4891
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
 
4892
                }
 
4893
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
 
4894
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
 
4895
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
 
4896
        }
 
4897
        if (flags & NDR_OUT) {
 
4898
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
 
4899
        }
 
4900
        return NDR_ERR_SUCCESS;
 
4901
}
 
4902
 
 
4903
_PUBLIC_ void ndr_print_dfs_ManagerInitialize(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerInitialize *r)
 
4904
{
 
4905
        ndr_print_struct(ndr, name, "dfs_ManagerInitialize");
 
4906
        if (r == NULL) { ndr_print_null(ndr); return; }
 
4907
        ndr->depth++;
 
4908
        if (flags & NDR_SET_VALUES) {
 
4909
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
 
4910
        }
 
4911
        if (flags & NDR_IN) {
 
4912
                ndr_print_struct(ndr, "in", "dfs_ManagerInitialize");
 
4913
                ndr->depth++;
 
4914
                ndr_print_ptr(ndr, "servername", r->in.servername);
 
4915
                ndr->depth++;
 
4916
                ndr_print_string(ndr, "servername", r->in.servername);
 
4917
                ndr->depth--;
 
4918
                ndr_print_uint32(ndr, "flags", r->in.flags);
 
4919
                ndr->depth--;
 
4920
        }
 
4921
        if (flags & NDR_OUT) {
 
4922
                ndr_print_struct(ndr, "out", "dfs_ManagerInitialize");
 
4923
                ndr->depth++;
 
4924
                ndr_print_WERROR(ndr, "result", r->out.result);
 
4925
                ndr->depth--;
 
4926
        }
 
4927
        ndr->depth--;
 
4928
}
 
4929
 
 
4930
static enum ndr_err_code ndr_push_dfs_AddStdRootForced(struct ndr_push *ndr, int flags, const struct dfs_AddStdRootForced *r)
 
4931
{
 
4932
        if (flags & NDR_IN) {
 
4933
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
 
4934
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
4935
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
 
4936
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
4937
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
 
4938
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
4939
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
 
4940
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
4941
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
 
4942
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
4943
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
 
4944
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
4945
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.store, CH_UTF16)));
 
4946
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
4947
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.store, CH_UTF16)));
 
4948
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.store, ndr_charset_length(r->in.store, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
4949
        }
 
4950
        if (flags & NDR_OUT) {
 
4951
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
 
4952
        }
 
4953
        return NDR_ERR_SUCCESS;
 
4954
}
 
4955
 
 
4956
static enum ndr_err_code ndr_pull_dfs_AddStdRootForced(struct ndr_pull *ndr, int flags, struct dfs_AddStdRootForced *r)
 
4957
{
 
4958
        if (flags & NDR_IN) {
 
4959
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
 
4960
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
 
4961
                if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
 
4962
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
 
4963
                }
 
4964
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
 
4965
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
 
4966
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
 
4967
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
 
4968
                if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
 
4969
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.rootshare), ndr_get_array_length(ndr, &r->in.rootshare));
 
4970
                }
 
4971
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
 
4972
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
 
4973
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
 
4974
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
 
4975
                if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
 
4976
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.comment), ndr_get_array_length(ndr, &r->in.comment));
 
4977
                }
 
4978
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
 
4979
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
 
4980
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.store));
 
4981
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.store));
 
4982
                if (ndr_get_array_length(ndr, &r->in.store) > ndr_get_array_size(ndr, &r->in.store)) {
 
4983
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.store), ndr_get_array_length(ndr, &r->in.store));
 
4984
                }
 
4985
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.store), sizeof(uint16_t)));
 
4986
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.store, ndr_get_array_length(ndr, &r->in.store), sizeof(uint16_t), CH_UTF16));
 
4987
        }
 
4988
        if (flags & NDR_OUT) {
 
4989
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
 
4990
        }
 
4991
        return NDR_ERR_SUCCESS;
 
4992
}
 
4993
 
 
4994
_PUBLIC_ void ndr_print_dfs_AddStdRootForced(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRootForced *r)
 
4995
{
 
4996
        ndr_print_struct(ndr, name, "dfs_AddStdRootForced");
 
4997
        if (r == NULL) { ndr_print_null(ndr); return; }
 
4998
        ndr->depth++;
 
4999
        if (flags & NDR_SET_VALUES) {
 
5000
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
 
5001
        }
 
5002
        if (flags & NDR_IN) {
 
5003
                ndr_print_struct(ndr, "in", "dfs_AddStdRootForced");
 
5004
                ndr->depth++;
 
5005
                ndr_print_string(ndr, "servername", r->in.servername);
 
5006
                ndr_print_string(ndr, "rootshare", r->in.rootshare);
 
5007
                ndr_print_string(ndr, "comment", r->in.comment);
 
5008
                ndr_print_string(ndr, "store", r->in.store);
 
5009
                ndr->depth--;
 
5010
        }
 
5011
        if (flags & NDR_OUT) {
 
5012
                ndr_print_struct(ndr, "out", "dfs_AddStdRootForced");
 
5013
                ndr->depth++;
 
5014
                ndr_print_WERROR(ndr, "result", r->out.result);
 
5015
                ndr->depth--;
 
5016
        }
 
5017
        ndr->depth--;
 
5018
}
 
5019
 
 
5020
static enum ndr_err_code ndr_push_dfs_GetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_GetDcAddress *r)
 
5021
{
 
5022
        if (flags & NDR_IN) {
 
5023
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
 
5024
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
5025
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
 
5026
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
5027
                if (r->in.server_fullname == NULL) {
 
5028
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
 
5029
                }
 
5030
                NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.server_fullname));
 
5031
                if (*r->in.server_fullname) {
 
5032
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16)));
 
5033
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
5034
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16)));
 
5035
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->in.server_fullname, ndr_charset_length(*r->in.server_fullname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
5036
                }
 
5037
                if (r->in.is_root == NULL) {
 
5038
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
 
5039
                }
 
5040
                NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->in.is_root));
 
5041
                if (r->in.ttl == NULL) {
 
5042
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
 
5043
                }
 
5044
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.ttl));
 
5045
        }
 
5046
        if (flags & NDR_OUT) {
 
5047
                if (r->out.server_fullname == NULL) {
 
5048
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
 
5049
                }
 
5050
                NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.server_fullname));
 
5051
                if (*r->out.server_fullname) {
 
5052
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16)));
 
5053
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
5054
                        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16)));
 
5055
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.server_fullname, ndr_charset_length(*r->out.server_fullname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
5056
                }
 
5057
                if (r->out.is_root == NULL) {
 
5058
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
 
5059
                }
 
5060
                NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->out.is_root));
 
5061
                if (r->out.ttl == NULL) {
 
5062
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
 
5063
                }
 
5064
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.ttl));
 
5065
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
 
5066
        }
 
5067
        return NDR_ERR_SUCCESS;
 
5068
}
 
5069
 
 
5070
static enum ndr_err_code ndr_pull_dfs_GetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_GetDcAddress *r)
 
5071
{
 
5072
        uint32_t _ptr_server_fullname;
 
5073
        TALLOC_CTX *_mem_save_server_fullname_0;
 
5074
        TALLOC_CTX *_mem_save_server_fullname_1;
 
5075
        TALLOC_CTX *_mem_save_is_root_0;
 
5076
        TALLOC_CTX *_mem_save_ttl_0;
 
5077
        if (flags & NDR_IN) {
 
5078
                ZERO_STRUCT(r->out);
 
5079
 
 
5080
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
 
5081
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
 
5082
                if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
 
5083
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
 
5084
                }
 
5085
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
 
5086
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
 
5087
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
 
5088
                        NDR_PULL_ALLOC(ndr, r->in.server_fullname);
 
5089
                }
 
5090
                _mem_save_server_fullname_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
5091
                NDR_PULL_SET_MEM_CTX(ndr, r->in.server_fullname, LIBNDR_FLAG_REF_ALLOC);
 
5092
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_fullname));
 
5093
                if (_ptr_server_fullname) {
 
5094
                        NDR_PULL_ALLOC(ndr, *r->in.server_fullname);
 
5095
                } else {
 
5096
                        *r->in.server_fullname = NULL;
 
5097
                }
 
5098
                if (*r->in.server_fullname) {
 
5099
                        _mem_save_server_fullname_1 = NDR_PULL_GET_MEM_CTX(ndr);
 
5100
                        NDR_PULL_SET_MEM_CTX(ndr, *r->in.server_fullname, 0);
 
5101
                        NDR_CHECK(ndr_pull_array_size(ndr, r->in.server_fullname));
 
5102
                        NDR_CHECK(ndr_pull_array_length(ndr, r->in.server_fullname));
 
5103
                        if (ndr_get_array_length(ndr, r->in.server_fullname) > ndr_get_array_size(ndr, r->in.server_fullname)) {
 
5104
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->in.server_fullname), ndr_get_array_length(ndr, r->in.server_fullname));
 
5105
                        }
 
5106
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->in.server_fullname), sizeof(uint16_t)));
 
5107
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->in.server_fullname, ndr_get_array_length(ndr, r->in.server_fullname), sizeof(uint16_t), CH_UTF16));
 
5108
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_1, 0);
 
5109
                }
 
5110
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_0, LIBNDR_FLAG_REF_ALLOC);
 
5111
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
 
5112
                        NDR_PULL_ALLOC(ndr, r->in.is_root);
 
5113
                }
 
5114
                _mem_save_is_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
5115
                NDR_PULL_SET_MEM_CTX(ndr, r->in.is_root, LIBNDR_FLAG_REF_ALLOC);
 
5116
                NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->in.is_root));
 
5117
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_is_root_0, LIBNDR_FLAG_REF_ALLOC);
 
5118
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
 
5119
                        NDR_PULL_ALLOC(ndr, r->in.ttl);
 
5120
                }
 
5121
                _mem_save_ttl_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
5122
                NDR_PULL_SET_MEM_CTX(ndr, r->in.ttl, LIBNDR_FLAG_REF_ALLOC);
 
5123
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.ttl));
 
5124
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ttl_0, LIBNDR_FLAG_REF_ALLOC);
 
5125
                NDR_PULL_ALLOC(ndr, r->out.server_fullname);
 
5126
                *r->out.server_fullname = *r->in.server_fullname;
 
5127
                NDR_PULL_ALLOC(ndr, r->out.is_root);
 
5128
                *r->out.is_root = *r->in.is_root;
 
5129
                NDR_PULL_ALLOC(ndr, r->out.ttl);
 
5130
                *r->out.ttl = *r->in.ttl;
 
5131
        }
 
5132
        if (flags & NDR_OUT) {
 
5133
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
 
5134
                        NDR_PULL_ALLOC(ndr, r->out.server_fullname);
 
5135
                }
 
5136
                _mem_save_server_fullname_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
5137
                NDR_PULL_SET_MEM_CTX(ndr, r->out.server_fullname, LIBNDR_FLAG_REF_ALLOC);
 
5138
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_fullname));
 
5139
                if (_ptr_server_fullname) {
 
5140
                        NDR_PULL_ALLOC(ndr, *r->out.server_fullname);
 
5141
                } else {
 
5142
                        *r->out.server_fullname = NULL;
 
5143
                }
 
5144
                if (*r->out.server_fullname) {
 
5145
                        _mem_save_server_fullname_1 = NDR_PULL_GET_MEM_CTX(ndr);
 
5146
                        NDR_PULL_SET_MEM_CTX(ndr, *r->out.server_fullname, 0);
 
5147
                        NDR_CHECK(ndr_pull_array_size(ndr, r->out.server_fullname));
 
5148
                        NDR_CHECK(ndr_pull_array_length(ndr, r->out.server_fullname));
 
5149
                        if (ndr_get_array_length(ndr, r->out.server_fullname) > ndr_get_array_size(ndr, r->out.server_fullname)) {
 
5150
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.server_fullname), ndr_get_array_length(ndr, r->out.server_fullname));
 
5151
                        }
 
5152
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.server_fullname), sizeof(uint16_t)));
 
5153
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.server_fullname, ndr_get_array_length(ndr, r->out.server_fullname), sizeof(uint16_t), CH_UTF16));
 
5154
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_1, 0);
 
5155
                }
 
5156
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_0, LIBNDR_FLAG_REF_ALLOC);
 
5157
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
 
5158
                        NDR_PULL_ALLOC(ndr, r->out.is_root);
 
5159
                }
 
5160
                _mem_save_is_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
5161
                NDR_PULL_SET_MEM_CTX(ndr, r->out.is_root, LIBNDR_FLAG_REF_ALLOC);
 
5162
                NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->out.is_root));
 
5163
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_is_root_0, LIBNDR_FLAG_REF_ALLOC);
 
5164
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
 
5165
                        NDR_PULL_ALLOC(ndr, r->out.ttl);
 
5166
                }
 
5167
                _mem_save_ttl_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
5168
                NDR_PULL_SET_MEM_CTX(ndr, r->out.ttl, LIBNDR_FLAG_REF_ALLOC);
 
5169
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.ttl));
 
5170
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ttl_0, LIBNDR_FLAG_REF_ALLOC);
 
5171
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
 
5172
        }
 
5173
        return NDR_ERR_SUCCESS;
 
5174
}
 
5175
 
 
5176
_PUBLIC_ void ndr_print_dfs_GetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetDcAddress *r)
 
5177
{
 
5178
        ndr_print_struct(ndr, name, "dfs_GetDcAddress");
 
5179
        if (r == NULL) { ndr_print_null(ndr); return; }
 
5180
        ndr->depth++;
 
5181
        if (flags & NDR_SET_VALUES) {
 
5182
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
 
5183
        }
 
5184
        if (flags & NDR_IN) {
 
5185
                ndr_print_struct(ndr, "in", "dfs_GetDcAddress");
 
5186
                ndr->depth++;
 
5187
                ndr_print_string(ndr, "servername", r->in.servername);
 
5188
                ndr_print_ptr(ndr, "server_fullname", r->in.server_fullname);
 
5189
                ndr->depth++;
 
5190
                ndr_print_ptr(ndr, "server_fullname", *r->in.server_fullname);
 
5191
                ndr->depth++;
 
5192
                if (*r->in.server_fullname) {
 
5193
                        ndr_print_string(ndr, "server_fullname", *r->in.server_fullname);
 
5194
                }
 
5195
                ndr->depth--;
 
5196
                ndr->depth--;
 
5197
                ndr_print_ptr(ndr, "is_root", r->in.is_root);
 
5198
                ndr->depth++;
 
5199
                ndr_print_uint8(ndr, "is_root", *r->in.is_root);
 
5200
                ndr->depth--;
 
5201
                ndr_print_ptr(ndr, "ttl", r->in.ttl);
 
5202
                ndr->depth++;
 
5203
                ndr_print_uint32(ndr, "ttl", *r->in.ttl);
 
5204
                ndr->depth--;
 
5205
                ndr->depth--;
 
5206
        }
 
5207
        if (flags & NDR_OUT) {
 
5208
                ndr_print_struct(ndr, "out", "dfs_GetDcAddress");
 
5209
                ndr->depth++;
 
5210
                ndr_print_ptr(ndr, "server_fullname", r->out.server_fullname);
 
5211
                ndr->depth++;
 
5212
                ndr_print_ptr(ndr, "server_fullname", *r->out.server_fullname);
 
5213
                ndr->depth++;
 
5214
                if (*r->out.server_fullname) {
 
5215
                        ndr_print_string(ndr, "server_fullname", *r->out.server_fullname);
 
5216
                }
 
5217
                ndr->depth--;
 
5218
                ndr->depth--;
 
5219
                ndr_print_ptr(ndr, "is_root", r->out.is_root);
 
5220
                ndr->depth++;
 
5221
                ndr_print_uint8(ndr, "is_root", *r->out.is_root);
 
5222
                ndr->depth--;
 
5223
                ndr_print_ptr(ndr, "ttl", r->out.ttl);
 
5224
                ndr->depth++;
 
5225
                ndr_print_uint32(ndr, "ttl", *r->out.ttl);
 
5226
                ndr->depth--;
 
5227
                ndr_print_WERROR(ndr, "result", r->out.result);
 
5228
                ndr->depth--;
 
5229
        }
 
5230
        ndr->depth--;
 
5231
}
 
5232
 
 
5233
static enum ndr_err_code ndr_push_dfs_SetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_SetDcAddress *r)
 
5234
{
 
5235
        if (flags & NDR_IN) {
 
5236
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
 
5237
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
5238
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
 
5239
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
5240
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_fullname, CH_UTF16)));
 
5241
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
5242
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_fullname, CH_UTF16)));
 
5243
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_fullname, ndr_charset_length(r->in.server_fullname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
5244
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
 
5245
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.ttl));
 
5246
        }
 
5247
        if (flags & NDR_OUT) {
 
5248
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
 
5249
        }
 
5250
        return NDR_ERR_SUCCESS;
 
5251
}
 
5252
 
 
5253
static enum ndr_err_code ndr_pull_dfs_SetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_SetDcAddress *r)
 
5254
{
 
5255
        if (flags & NDR_IN) {
 
5256
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
 
5257
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
 
5258
                if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
 
5259
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
 
5260
                }
 
5261
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
 
5262
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
 
5263
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_fullname));
 
5264
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_fullname));
 
5265
                if (ndr_get_array_length(ndr, &r->in.server_fullname) > ndr_get_array_size(ndr, &r->in.server_fullname)) {
 
5266
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_fullname), ndr_get_array_length(ndr, &r->in.server_fullname));
 
5267
                }
 
5268
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_fullname), sizeof(uint16_t)));
 
5269
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_fullname, ndr_get_array_length(ndr, &r->in.server_fullname), sizeof(uint16_t), CH_UTF16));
 
5270
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
 
5271
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.ttl));
 
5272
        }
 
5273
        if (flags & NDR_OUT) {
 
5274
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
 
5275
        }
 
5276
        return NDR_ERR_SUCCESS;
 
5277
}
 
5278
 
 
5279
_PUBLIC_ void ndr_print_dfs_SetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetDcAddress *r)
 
5280
{
 
5281
        ndr_print_struct(ndr, name, "dfs_SetDcAddress");
 
5282
        if (r == NULL) { ndr_print_null(ndr); return; }
 
5283
        ndr->depth++;
 
5284
        if (flags & NDR_SET_VALUES) {
 
5285
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
 
5286
        }
 
5287
        if (flags & NDR_IN) {
 
5288
                ndr_print_struct(ndr, "in", "dfs_SetDcAddress");
 
5289
                ndr->depth++;
 
5290
                ndr_print_string(ndr, "servername", r->in.servername);
 
5291
                ndr_print_string(ndr, "server_fullname", r->in.server_fullname);
 
5292
                ndr_print_uint32(ndr, "flags", r->in.flags);
 
5293
                ndr_print_uint32(ndr, "ttl", r->in.ttl);
 
5294
                ndr->depth--;
 
5295
        }
 
5296
        if (flags & NDR_OUT) {
 
5297
                ndr_print_struct(ndr, "out", "dfs_SetDcAddress");
 
5298
                ndr->depth++;
 
5299
                ndr_print_WERROR(ndr, "result", r->out.result);
 
5300
                ndr->depth--;
 
5301
        }
 
5302
        ndr->depth--;
 
5303
}
 
5304
 
 
5305
static enum ndr_err_code ndr_push_dfs_FlushFtTable(struct ndr_push *ndr, int flags, const struct dfs_FlushFtTable *r)
 
5306
{
 
5307
        if (flags & NDR_IN) {
 
5308
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
 
5309
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
5310
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
 
5311
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
5312
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
 
5313
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
5314
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
 
5315
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
5316
        }
 
5317
        if (flags & NDR_OUT) {
 
5318
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
 
5319
        }
 
5320
        return NDR_ERR_SUCCESS;
 
5321
}
 
5322
 
 
5323
static enum ndr_err_code ndr_pull_dfs_FlushFtTable(struct ndr_pull *ndr, int flags, struct dfs_FlushFtTable *r)
 
5324
{
 
5325
        if (flags & NDR_IN) {
 
5326
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
 
5327
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
 
5328
                if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
 
5329
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
 
5330
                }
 
5331
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
 
5332
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
 
5333
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
 
5334
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
 
5335
                if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
 
5336
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.rootshare), ndr_get_array_length(ndr, &r->in.rootshare));
 
5337
                }
 
5338
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
 
5339
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
 
5340
        }
 
5341
        if (flags & NDR_OUT) {
 
5342
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
 
5343
        }
 
5344
        return NDR_ERR_SUCCESS;
 
5345
}
 
5346
 
 
5347
_PUBLIC_ void ndr_print_dfs_FlushFtTable(struct ndr_print *ndr, const char *name, int flags, const struct dfs_FlushFtTable *r)
 
5348
{
 
5349
        ndr_print_struct(ndr, name, "dfs_FlushFtTable");
 
5350
        if (r == NULL) { ndr_print_null(ndr); return; }
 
5351
        ndr->depth++;
 
5352
        if (flags & NDR_SET_VALUES) {
 
5353
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
 
5354
        }
 
5355
        if (flags & NDR_IN) {
 
5356
                ndr_print_struct(ndr, "in", "dfs_FlushFtTable");
 
5357
                ndr->depth++;
 
5358
                ndr_print_string(ndr, "servername", r->in.servername);
 
5359
                ndr_print_string(ndr, "rootshare", r->in.rootshare);
 
5360
                ndr->depth--;
 
5361
        }
 
5362
        if (flags & NDR_OUT) {
 
5363
                ndr_print_struct(ndr, "out", "dfs_FlushFtTable");
 
5364
                ndr->depth++;
 
5365
                ndr_print_WERROR(ndr, "result", r->out.result);
 
5366
                ndr->depth--;
 
5367
        }
 
5368
        ndr->depth--;
 
5369
}
 
5370
 
 
5371
static enum ndr_err_code ndr_push_dfs_Add2(struct ndr_push *ndr, int flags, const struct dfs_Add2 *r)
 
5372
{
 
5373
        if (flags & NDR_IN) {
 
5374
        }
 
5375
        if (flags & NDR_OUT) {
 
5376
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
 
5377
        }
 
5378
        return NDR_ERR_SUCCESS;
 
5379
}
 
5380
 
 
5381
static enum ndr_err_code ndr_pull_dfs_Add2(struct ndr_pull *ndr, int flags, struct dfs_Add2 *r)
 
5382
{
 
5383
        if (flags & NDR_IN) {
 
5384
        }
 
5385
        if (flags & NDR_OUT) {
 
5386
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
 
5387
        }
 
5388
        return NDR_ERR_SUCCESS;
 
5389
}
 
5390
 
 
5391
_PUBLIC_ void ndr_print_dfs_Add2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add2 *r)
 
5392
{
 
5393
        ndr_print_struct(ndr, name, "dfs_Add2");
 
5394
        if (r == NULL) { ndr_print_null(ndr); return; }
 
5395
        ndr->depth++;
 
5396
        if (flags & NDR_SET_VALUES) {
 
5397
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
 
5398
        }
 
5399
        if (flags & NDR_IN) {
 
5400
                ndr_print_struct(ndr, "in", "dfs_Add2");
 
5401
                ndr->depth++;
 
5402
                ndr->depth--;
 
5403
        }
 
5404
        if (flags & NDR_OUT) {
 
5405
                ndr_print_struct(ndr, "out", "dfs_Add2");
 
5406
                ndr->depth++;
 
5407
                ndr_print_WERROR(ndr, "result", r->out.result);
 
5408
                ndr->depth--;
 
5409
        }
 
5410
        ndr->depth--;
 
5411
}
 
5412
 
 
5413
static enum ndr_err_code ndr_push_dfs_Remove2(struct ndr_push *ndr, int flags, const struct dfs_Remove2 *r)
 
5414
{
 
5415
        if (flags & NDR_IN) {
 
5416
        }
 
5417
        if (flags & NDR_OUT) {
 
5418
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
 
5419
        }
 
5420
        return NDR_ERR_SUCCESS;
 
5421
}
 
5422
 
 
5423
static enum ndr_err_code ndr_pull_dfs_Remove2(struct ndr_pull *ndr, int flags, struct dfs_Remove2 *r)
 
5424
{
 
5425
        if (flags & NDR_IN) {
 
5426
        }
 
5427
        if (flags & NDR_OUT) {
 
5428
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
 
5429
        }
 
5430
        return NDR_ERR_SUCCESS;
 
5431
}
 
5432
 
 
5433
_PUBLIC_ void ndr_print_dfs_Remove2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove2 *r)
 
5434
{
 
5435
        ndr_print_struct(ndr, name, "dfs_Remove2");
 
5436
        if (r == NULL) { ndr_print_null(ndr); return; }
 
5437
        ndr->depth++;
 
5438
        if (flags & NDR_SET_VALUES) {
 
5439
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
 
5440
        }
 
5441
        if (flags & NDR_IN) {
 
5442
                ndr_print_struct(ndr, "in", "dfs_Remove2");
 
5443
                ndr->depth++;
 
5444
                ndr->depth--;
 
5445
        }
 
5446
        if (flags & NDR_OUT) {
 
5447
                ndr_print_struct(ndr, "out", "dfs_Remove2");
 
5448
                ndr->depth++;
 
5449
                ndr_print_WERROR(ndr, "result", r->out.result);
 
5450
                ndr->depth--;
 
5451
        }
 
5452
        ndr->depth--;
 
5453
}
 
5454
 
 
5455
_PUBLIC_ enum ndr_err_code ndr_push_dfs_EnumEx(struct ndr_push *ndr, int flags, const struct dfs_EnumEx *r)
 
5456
{
 
5457
        if (flags & NDR_IN) {
 
5458
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_name, CH_UTF16)));
 
5459
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
 
5460
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_name, CH_UTF16)));
 
5461
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfs_name, ndr_charset_length(r->in.dfs_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 
5462
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
 
5463
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize));
 
5464
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
 
5465
                if (r->in.info) {
 
5466
                        NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
 
5467
                }
 
5468
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.total));
 
5469
                if (r->in.total) {
 
5470
                        NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.total));
 
5471
                }
 
5472
        }
 
5473
        if (flags & NDR_OUT) {
 
5474
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
 
5475
                if (r->out.info) {
 
5476
                        NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
 
5477
                }
 
5478
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.total));
 
5479
                if (r->out.total) {
 
5480
                        NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total));
 
5481
                }
 
5482
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
 
5483
        }
 
5484
        return NDR_ERR_SUCCESS;
 
5485
}
 
5486
 
 
5487
_PUBLIC_ enum ndr_err_code ndr_pull_dfs_EnumEx(struct ndr_pull *ndr, int flags, struct dfs_EnumEx *r)
 
5488
{
 
5489
        uint32_t _ptr_info;
 
5490
        uint32_t _ptr_total;
 
5491
        TALLOC_CTX *_mem_save_info_0;
 
5492
        TALLOC_CTX *_mem_save_total_0;
 
5493
        if (flags & NDR_IN) {
 
5494
                ZERO_STRUCT(r->out);
 
5495
 
 
5496
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_name));
 
5497
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_name));
 
5498
                if (ndr_get_array_length(ndr, &r->in.dfs_name) > ndr_get_array_size(ndr, &r->in.dfs_name)) {
 
5499
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dfs_name), ndr_get_array_length(ndr, &r->in.dfs_name));
 
5500
                }
 
5501
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_name), sizeof(uint16_t)));
 
5502
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfs_name, ndr_get_array_length(ndr, &r->in.dfs_name), sizeof(uint16_t), CH_UTF16));
 
5503
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
 
5504
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bufsize));
 
5505
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
 
5506
                if (_ptr_info) {
 
5507
                        NDR_PULL_ALLOC(ndr, r->in.info);
 
5508
                } else {
 
5509
                        r->in.info = NULL;
 
5510
                }
 
5511
                if (r->in.info) {
 
5512
                        _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
5513
                        NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
 
5514
                        NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
 
5515
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
 
5516
                }
 
5517
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
 
5518
                if (_ptr_total) {
 
5519
                        NDR_PULL_ALLOC(ndr, r->in.total);
 
5520
                } else {
 
5521
                        r->in.total = NULL;
 
5522
                }
 
5523
                if (r->in.total) {
 
5524
                        _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
5525
                        NDR_PULL_SET_MEM_CTX(ndr, r->in.total, 0);
 
5526
                        NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.total));
 
5527
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
 
5528
                }
 
5529
        }
 
5530
        if (flags & NDR_OUT) {
 
5531
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
 
5532
                if (_ptr_info) {
 
5533
                        NDR_PULL_ALLOC(ndr, r->out.info);
 
5534
                } else {
 
5535
                        r->out.info = NULL;
 
5536
                }
 
5537
                if (r->out.info) {
 
5538
                        _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
5539
                        NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
 
5540
                        NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
 
5541
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
 
5542
                }
 
5543
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
 
5544
                if (_ptr_total) {
 
5545
                        NDR_PULL_ALLOC(ndr, r->out.total);
 
5546
                } else {
 
5547
                        r->out.total = NULL;
 
5548
                }
 
5549
                if (r->out.total) {
 
5550
                        _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
5551
                        NDR_PULL_SET_MEM_CTX(ndr, r->out.total, 0);
 
5552
                        NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total));
 
5553
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
 
5554
                }
 
5555
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
 
5556
        }
 
5557
        return NDR_ERR_SUCCESS;
 
5558
}
 
5559
 
 
5560
_PUBLIC_ void ndr_print_dfs_EnumEx(struct ndr_print *ndr, const char *name, int flags, const struct dfs_EnumEx *r)
 
5561
{
 
5562
        ndr_print_struct(ndr, name, "dfs_EnumEx");
 
5563
        if (r == NULL) { ndr_print_null(ndr); return; }
 
5564
        ndr->depth++;
 
5565
        if (flags & NDR_SET_VALUES) {
 
5566
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
 
5567
        }
 
5568
        if (flags & NDR_IN) {
 
5569
                ndr_print_struct(ndr, "in", "dfs_EnumEx");
 
5570
                ndr->depth++;
 
5571
                ndr_print_string(ndr, "dfs_name", r->in.dfs_name);
 
5572
                ndr_print_uint32(ndr, "level", r->in.level);
 
5573
                ndr_print_uint32(ndr, "bufsize", r->in.bufsize);
 
5574
                ndr_print_ptr(ndr, "info", r->in.info);
 
5575
                ndr->depth++;
 
5576
                if (r->in.info) {
 
5577
                        ndr_print_dfs_EnumStruct(ndr, "info", r->in.info);
 
5578
                }
 
5579
                ndr->depth--;
 
5580
                ndr_print_ptr(ndr, "total", r->in.total);
 
5581
                ndr->depth++;
 
5582
                if (r->in.total) {
 
5583
                        ndr_print_uint32(ndr, "total", *r->in.total);
 
5584
                }
 
5585
                ndr->depth--;
 
5586
                ndr->depth--;
 
5587
        }
 
5588
        if (flags & NDR_OUT) {
 
5589
                ndr_print_struct(ndr, "out", "dfs_EnumEx");
 
5590
                ndr->depth++;
 
5591
                ndr_print_ptr(ndr, "info", r->out.info);
 
5592
                ndr->depth++;
 
5593
                if (r->out.info) {
 
5594
                        ndr_print_dfs_EnumStruct(ndr, "info", r->out.info);
 
5595
                }
 
5596
                ndr->depth--;
 
5597
                ndr_print_ptr(ndr, "total", r->out.total);
 
5598
                ndr->depth++;
 
5599
                if (r->out.total) {
 
5600
                        ndr_print_uint32(ndr, "total", *r->out.total);
 
5601
                }
 
5602
                ndr->depth--;
 
5603
                ndr_print_WERROR(ndr, "result", r->out.result);
 
5604
                ndr->depth--;
 
5605
        }
 
5606
        ndr->depth--;
 
5607
}
 
5608
 
 
5609
static enum ndr_err_code ndr_push_dfs_SetInfo2(struct ndr_push *ndr, int flags, const struct dfs_SetInfo2 *r)
 
5610
{
 
5611
        if (flags & NDR_IN) {
 
5612
        }
 
5613
        if (flags & NDR_OUT) {
 
5614
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
 
5615
        }
 
5616
        return NDR_ERR_SUCCESS;
 
5617
}
 
5618
 
 
5619
static enum ndr_err_code ndr_pull_dfs_SetInfo2(struct ndr_pull *ndr, int flags, struct dfs_SetInfo2 *r)
 
5620
{
 
5621
        if (flags & NDR_IN) {
 
5622
        }
 
5623
        if (flags & NDR_OUT) {
 
5624
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
 
5625
        }
 
5626
        return NDR_ERR_SUCCESS;
 
5627
}
 
5628
 
 
5629
_PUBLIC_ void ndr_print_dfs_SetInfo2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo2 *r)
 
5630
{
 
5631
        ndr_print_struct(ndr, name, "dfs_SetInfo2");
 
5632
        if (r == NULL) { ndr_print_null(ndr); return; }
 
5633
        ndr->depth++;
 
5634
        if (flags & NDR_SET_VALUES) {
 
5635
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
 
5636
        }
 
5637
        if (flags & NDR_IN) {
 
5638
                ndr_print_struct(ndr, "in", "dfs_SetInfo2");
 
5639
                ndr->depth++;
 
5640
                ndr->depth--;
 
5641
        }
 
5642
        if (flags & NDR_OUT) {
 
5643
                ndr_print_struct(ndr, "out", "dfs_SetInfo2");
 
5644
                ndr->depth++;
 
5645
                ndr_print_WERROR(ndr, "result", r->out.result);
 
5646
                ndr->depth--;
 
5647
        }
 
5648
        ndr->depth--;
 
5649
}
 
5650
 
 
5651
static const struct ndr_interface_call netdfs_calls[] = {
 
5652
        {
 
5653
                "dfs_GetManagerVersion",
 
5654
                sizeof(struct dfs_GetManagerVersion),
 
5655
                (ndr_push_flags_fn_t) ndr_push_dfs_GetManagerVersion,
 
5656
                (ndr_pull_flags_fn_t) ndr_pull_dfs_GetManagerVersion,
 
5657
                (ndr_print_function_t) ndr_print_dfs_GetManagerVersion,
 
5658
                { 0, NULL },
 
5659
                { 0, NULL },
 
5660
        },
 
5661
        {
 
5662
                "dfs_Add",
 
5663
                sizeof(struct dfs_Add),
 
5664
                (ndr_push_flags_fn_t) ndr_push_dfs_Add,
 
5665
                (ndr_pull_flags_fn_t) ndr_pull_dfs_Add,
 
5666
                (ndr_print_function_t) ndr_print_dfs_Add,
 
5667
                { 0, NULL },
 
5668
                { 0, NULL },
 
5669
        },
 
5670
        {
 
5671
                "dfs_Remove",
 
5672
                sizeof(struct dfs_Remove),
 
5673
                (ndr_push_flags_fn_t) ndr_push_dfs_Remove,
 
5674
                (ndr_pull_flags_fn_t) ndr_pull_dfs_Remove,
 
5675
                (ndr_print_function_t) ndr_print_dfs_Remove,
 
5676
                { 0, NULL },
 
5677
                { 0, NULL },
 
5678
        },
 
5679
        {
 
5680
                "dfs_SetInfo",
 
5681
                sizeof(struct dfs_SetInfo),
 
5682
                (ndr_push_flags_fn_t) ndr_push_dfs_SetInfo,
 
5683
                (ndr_pull_flags_fn_t) ndr_pull_dfs_SetInfo,
 
5684
                (ndr_print_function_t) ndr_print_dfs_SetInfo,
 
5685
                { 0, NULL },
 
5686
                { 0, NULL },
 
5687
        },
 
5688
        {
 
5689
                "dfs_GetInfo",
 
5690
                sizeof(struct dfs_GetInfo),
 
5691
                (ndr_push_flags_fn_t) ndr_push_dfs_GetInfo,
 
5692
                (ndr_pull_flags_fn_t) ndr_pull_dfs_GetInfo,
 
5693
                (ndr_print_function_t) ndr_print_dfs_GetInfo,
 
5694
                { 0, NULL },
 
5695
                { 0, NULL },
 
5696
        },
 
5697
        {
 
5698
                "dfs_Enum",
 
5699
                sizeof(struct dfs_Enum),
 
5700
                (ndr_push_flags_fn_t) ndr_push_dfs_Enum,
 
5701
                (ndr_pull_flags_fn_t) ndr_pull_dfs_Enum,
 
5702
                (ndr_print_function_t) ndr_print_dfs_Enum,
 
5703
                { 0, NULL },
 
5704
                { 0, NULL },
 
5705
        },
 
5706
        {
 
5707
                "dfs_Rename",
 
5708
                sizeof(struct dfs_Rename),
 
5709
                (ndr_push_flags_fn_t) ndr_push_dfs_Rename,
 
5710
                (ndr_pull_flags_fn_t) ndr_pull_dfs_Rename,
 
5711
                (ndr_print_function_t) ndr_print_dfs_Rename,
 
5712
                { 0, NULL },
 
5713
                { 0, NULL },
 
5714
        },
 
5715
        {
 
5716
                "dfs_Move",
 
5717
                sizeof(struct dfs_Move),
 
5718
                (ndr_push_flags_fn_t) ndr_push_dfs_Move,
 
5719
                (ndr_pull_flags_fn_t) ndr_pull_dfs_Move,
 
5720
                (ndr_print_function_t) ndr_print_dfs_Move,
 
5721
                { 0, NULL },
 
5722
                { 0, NULL },
 
5723
        },
 
5724
        {
 
5725
                "dfs_ManagerGetConfigInfo",
 
5726
                sizeof(struct dfs_ManagerGetConfigInfo),
 
5727
                (ndr_push_flags_fn_t) ndr_push_dfs_ManagerGetConfigInfo,
 
5728
                (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerGetConfigInfo,
 
5729
                (ndr_print_function_t) ndr_print_dfs_ManagerGetConfigInfo,
 
5730
                { 0, NULL },
 
5731
                { 0, NULL },
 
5732
        },
 
5733
        {
 
5734
                "dfs_ManagerSendSiteInfo",
 
5735
                sizeof(struct dfs_ManagerSendSiteInfo),
 
5736
                (ndr_push_flags_fn_t) ndr_push_dfs_ManagerSendSiteInfo,
 
5737
                (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerSendSiteInfo,
 
5738
                (ndr_print_function_t) ndr_print_dfs_ManagerSendSiteInfo,
 
5739
                { 0, NULL },
 
5740
                { 0, NULL },
 
5741
        },
 
5742
        {
 
5743
                "dfs_AddFtRoot",
 
5744
                sizeof(struct dfs_AddFtRoot),
 
5745
                (ndr_push_flags_fn_t) ndr_push_dfs_AddFtRoot,
 
5746
                (ndr_pull_flags_fn_t) ndr_pull_dfs_AddFtRoot,
 
5747
                (ndr_print_function_t) ndr_print_dfs_AddFtRoot,
 
5748
                { 0, NULL },
 
5749
                { 0, NULL },
 
5750
        },
 
5751
        {
 
5752
                "dfs_RemoveFtRoot",
 
5753
                sizeof(struct dfs_RemoveFtRoot),
 
5754
                (ndr_push_flags_fn_t) ndr_push_dfs_RemoveFtRoot,
 
5755
                (ndr_pull_flags_fn_t) ndr_pull_dfs_RemoveFtRoot,
 
5756
                (ndr_print_function_t) ndr_print_dfs_RemoveFtRoot,
 
5757
                { 0, NULL },
 
5758
                { 0, NULL },
 
5759
        },
 
5760
        {
 
5761
                "dfs_AddStdRoot",
 
5762
                sizeof(struct dfs_AddStdRoot),
 
5763
                (ndr_push_flags_fn_t) ndr_push_dfs_AddStdRoot,
 
5764
                (ndr_pull_flags_fn_t) ndr_pull_dfs_AddStdRoot,
 
5765
                (ndr_print_function_t) ndr_print_dfs_AddStdRoot,
 
5766
                { 0, NULL },
 
5767
                { 0, NULL },
 
5768
        },
 
5769
        {
 
5770
                "dfs_RemoveStdRoot",
 
5771
                sizeof(struct dfs_RemoveStdRoot),
 
5772
                (ndr_push_flags_fn_t) ndr_push_dfs_RemoveStdRoot,
 
5773
                (ndr_pull_flags_fn_t) ndr_pull_dfs_RemoveStdRoot,
 
5774
                (ndr_print_function_t) ndr_print_dfs_RemoveStdRoot,
 
5775
                { 0, NULL },
 
5776
                { 0, NULL },
 
5777
        },
 
5778
        {
 
5779
                "dfs_ManagerInitialize",
 
5780
                sizeof(struct dfs_ManagerInitialize),
 
5781
                (ndr_push_flags_fn_t) ndr_push_dfs_ManagerInitialize,
 
5782
                (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerInitialize,
 
5783
                (ndr_print_function_t) ndr_print_dfs_ManagerInitialize,
 
5784
                { 0, NULL },
 
5785
                { 0, NULL },
 
5786
        },
 
5787
        {
 
5788
                "dfs_AddStdRootForced",
 
5789
                sizeof(struct dfs_AddStdRootForced),
 
5790
                (ndr_push_flags_fn_t) ndr_push_dfs_AddStdRootForced,
 
5791
                (ndr_pull_flags_fn_t) ndr_pull_dfs_AddStdRootForced,
 
5792
                (ndr_print_function_t) ndr_print_dfs_AddStdRootForced,
 
5793
                { 0, NULL },
 
5794
                { 0, NULL },
 
5795
        },
 
5796
        {
 
5797
                "dfs_GetDcAddress",
 
5798
                sizeof(struct dfs_GetDcAddress),
 
5799
                (ndr_push_flags_fn_t) ndr_push_dfs_GetDcAddress,
 
5800
                (ndr_pull_flags_fn_t) ndr_pull_dfs_GetDcAddress,
 
5801
                (ndr_print_function_t) ndr_print_dfs_GetDcAddress,
 
5802
                { 0, NULL },
 
5803
                { 0, NULL },
 
5804
        },
 
5805
        {
 
5806
                "dfs_SetDcAddress",
 
5807
                sizeof(struct dfs_SetDcAddress),
 
5808
                (ndr_push_flags_fn_t) ndr_push_dfs_SetDcAddress,
 
5809
                (ndr_pull_flags_fn_t) ndr_pull_dfs_SetDcAddress,
 
5810
                (ndr_print_function_t) ndr_print_dfs_SetDcAddress,
 
5811
                { 0, NULL },
 
5812
                { 0, NULL },
 
5813
        },
 
5814
        {
 
5815
                "dfs_FlushFtTable",
 
5816
                sizeof(struct dfs_FlushFtTable),
 
5817
                (ndr_push_flags_fn_t) ndr_push_dfs_FlushFtTable,
 
5818
                (ndr_pull_flags_fn_t) ndr_pull_dfs_FlushFtTable,
 
5819
                (ndr_print_function_t) ndr_print_dfs_FlushFtTable,
 
5820
                { 0, NULL },
 
5821
                { 0, NULL },
 
5822
        },
 
5823
        {
 
5824
                "dfs_Add2",
 
5825
                sizeof(struct dfs_Add2),
 
5826
                (ndr_push_flags_fn_t) ndr_push_dfs_Add2,
 
5827
                (ndr_pull_flags_fn_t) ndr_pull_dfs_Add2,
 
5828
                (ndr_print_function_t) ndr_print_dfs_Add2,
 
5829
                { 0, NULL },
 
5830
                { 0, NULL },
 
5831
        },
 
5832
        {
 
5833
                "dfs_Remove2",
 
5834
                sizeof(struct dfs_Remove2),
 
5835
                (ndr_push_flags_fn_t) ndr_push_dfs_Remove2,
 
5836
                (ndr_pull_flags_fn_t) ndr_pull_dfs_Remove2,
 
5837
                (ndr_print_function_t) ndr_print_dfs_Remove2,
 
5838
                { 0, NULL },
 
5839
                { 0, NULL },
 
5840
        },
 
5841
        {
 
5842
                "dfs_EnumEx",
 
5843
                sizeof(struct dfs_EnumEx),
 
5844
                (ndr_push_flags_fn_t) ndr_push_dfs_EnumEx,
 
5845
                (ndr_pull_flags_fn_t) ndr_pull_dfs_EnumEx,
 
5846
                (ndr_print_function_t) ndr_print_dfs_EnumEx,
 
5847
                { 0, NULL },
 
5848
                { 0, NULL },
 
5849
        },
 
5850
        {
 
5851
                "dfs_SetInfo2",
 
5852
                sizeof(struct dfs_SetInfo2),
 
5853
                (ndr_push_flags_fn_t) ndr_push_dfs_SetInfo2,
 
5854
                (ndr_pull_flags_fn_t) ndr_pull_dfs_SetInfo2,
 
5855
                (ndr_print_function_t) ndr_print_dfs_SetInfo2,
 
5856
                { 0, NULL },
 
5857
                { 0, NULL },
 
5858
        },
 
5859
        { NULL, 0, NULL, NULL, NULL }
 
5860
};
 
5861
 
 
5862
static const char * const netdfs_endpoint_strings[] = {
 
5863
        "ncacn_np:[\\pipe\\netdfs]", 
 
5864
        "ncacn_ip_tcp:", 
 
5865
        "ncalrpc:", 
 
5866
};
 
5867
 
 
5868
static const struct ndr_interface_string_array netdfs_endpoints = {
 
5869
        .count  = 3,
 
5870
        .names  = netdfs_endpoint_strings
 
5871
};
 
5872
 
 
5873
static const char * const netdfs_authservice_strings[] = {
 
5874
        "host", 
 
5875
};
 
5876
 
 
5877
static const struct ndr_interface_string_array netdfs_authservices = {
 
5878
        .count  = 1,
 
5879
        .names  = netdfs_authservice_strings
 
5880
};
 
5881
 
 
5882
 
 
5883
const struct ndr_interface_table ndr_table_netdfs = {
 
5884
        .name           = "netdfs",
 
5885
        .syntax_id      = {
 
5886
                {0x4fc742e0,0x4a10,0x11cf,{0x82,0x73},{0x00,0xaa,0x00,0x4a,0xe6,0x73}},
 
5887
                NDR_NETDFS_VERSION
 
5888
        },
 
5889
        .helpstring     = NDR_NETDFS_HELPSTRING,
 
5890
        .num_calls      = 23,
 
5891
        .calls          = netdfs_calls,
 
5892
        .endpoints      = &netdfs_endpoints,
 
5893
        .authservices   = &netdfs_authservices
 
5894
};
 
5895