Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/source3/librpc/gen_ndr/ndr_open_files.h"
5 :
6 : #include "librpc/gen_ndr/ndr_server_id.h"
7 : #include "librpc/gen_ndr/ndr_security.h"
8 : #include "librpc/gen_ndr/ndr_file_id.h"
9 : #include "librpc/gen_ndr/ndr_smb2_lease_struct.h"
10 : #include "librpc/gen_ndr/ndr_misc.h"
11 446412 : static enum ndr_err_code ndr_push_share_mode_entry_op_type(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum share_mode_entry_op_type r)
12 : {
13 446412 : NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
14 445328 : return NDR_ERR_SUCCESS;
15 : }
16 :
17 959019 : static enum ndr_err_code ndr_pull_share_mode_entry_op_type(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum share_mode_entry_op_type *r)
18 : {
19 2219 : uint16_t v;
20 959019 : NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
21 959019 : *r = v;
22 959019 : return NDR_ERR_SUCCESS;
23 : }
24 :
25 0 : _PUBLIC_ void ndr_print_share_mode_entry_op_type(struct ndr_print *ndr, const char *name, enum share_mode_entry_op_type r)
26 : {
27 0 : const char *val = NULL;
28 :
29 0 : switch (r) {
30 0 : case SHARE_MODE_ENTRY_OP_TYPE_NONE: val = "SHARE_MODE_ENTRY_OP_TYPE_NONE"; break;
31 0 : case SHARE_MODE_ENTRY_OP_TYPE_EXCLUSIVE: val = "SHARE_MODE_ENTRY_OP_TYPE_EXCLUSIVE"; break;
32 0 : case SHARE_MODE_ENTRY_OP_TYPE_BATCH_WITHOUT_EXCLUSIVE: val = "SHARE_MODE_ENTRY_OP_TYPE_BATCH_WITHOUT_EXCLUSIVE"; break;
33 0 : case SHARE_MODE_ENTRY_OP_TYPE_BATCH: val = "SHARE_MODE_ENTRY_OP_TYPE_BATCH"; break;
34 0 : case SHARE_MODE_ENTRY_OP_TYPE_LEVEL_II: val = "SHARE_MODE_ENTRY_OP_TYPE_LEVEL_II"; break;
35 0 : case SHARE_MODE_ENTRY_OP_TYPE_LEASE: val = "SHARE_MODE_ENTRY_OP_TYPE_LEASE"; break;
36 : }
37 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
38 0 : }
39 :
40 446412 : _PUBLIC_ enum ndr_err_code ndr_push_share_mode_entry(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct share_mode_entry *r)
41 : {
42 446412 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
43 446412 : if (ndr_flags & NDR_SCALARS) {
44 446412 : NDR_CHECK(ndr_push_align(ndr, 8));
45 446412 : NDR_CHECK(ndr_push_server_id(ndr, NDR_SCALARS, &r->pid));
46 446412 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->op_mid));
47 447496 : NDR_CHECK(ndr_push_share_mode_entry_op_type(ndr, NDR_SCALARS, r->op_type));
48 446412 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->client_guid));
49 446412 : NDR_CHECK(ndr_push_smb2_lease_key(ndr, NDR_SCALARS, &r->lease_key));
50 446412 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->access_mask));
51 446412 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->share_access));
52 446412 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->private_options));
53 446412 : NDR_CHECK(ndr_push_timeval(ndr, NDR_SCALARS, &r->time));
54 446412 : NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->share_file_id));
55 446412 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->uid));
56 446412 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->flags));
57 446412 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->name_hash));
58 : /* [skip] 'r->stale' */
59 446412 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
60 : }
61 446412 : if (ndr_flags & NDR_BUFFERS) {
62 446412 : NDR_CHECK(ndr_push_timeval(ndr, NDR_BUFFERS, &r->time));
63 : /* [skip] 'r->stale' */
64 : }
65 445328 : return NDR_ERR_SUCCESS;
66 : }
67 :
68 959019 : _PUBLIC_ enum ndr_err_code ndr_pull_share_mode_entry(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct share_mode_entry *r)
69 : {
70 959019 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
71 959019 : if (ndr_flags & NDR_SCALARS) {
72 959019 : NDR_CHECK(ndr_pull_align(ndr, 8));
73 959019 : NDR_CHECK(ndr_pull_server_id(ndr, NDR_SCALARS, &r->pid));
74 959019 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->op_mid));
75 961238 : NDR_CHECK(ndr_pull_share_mode_entry_op_type(ndr, NDR_SCALARS, &r->op_type));
76 959019 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->client_guid));
77 959019 : NDR_CHECK(ndr_pull_smb2_lease_key(ndr, NDR_SCALARS, &r->lease_key));
78 959019 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->access_mask));
79 959019 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->share_access));
80 959019 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->private_options));
81 959019 : NDR_CHECK(ndr_pull_timeval(ndr, NDR_SCALARS, &r->time));
82 959019 : NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->share_file_id));
83 959019 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->uid));
84 959019 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->flags));
85 959019 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->name_hash));
86 : /* [skip] 'r->stale' */
87 959019 : NDR_ZERO_STRUCT(r->stale);
88 959019 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
89 : }
90 959019 : if (ndr_flags & NDR_BUFFERS) {
91 959019 : NDR_CHECK(ndr_pull_timeval(ndr, NDR_BUFFERS, &r->time));
92 : }
93 956800 : return NDR_ERR_SUCCESS;
94 : }
95 :
96 0 : static void ndr_print_flags_share_mode_entry(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct share_mode_entry *r)
97 : {
98 0 : ndr_print_share_mode_entry(ndr, name, r);
99 0 : }
100 :
101 0 : _PUBLIC_ void ndr_print_share_mode_entry(struct ndr_print *ndr, const char *name, const struct share_mode_entry *r)
102 : {
103 0 : ndr_print_struct(ndr, name, "share_mode_entry");
104 0 : if (r == NULL) { ndr_print_null(ndr); return; }
105 0 : ndr->depth++;
106 0 : ndr_print_server_id(ndr, "pid", &r->pid);
107 0 : ndr_print_hyper(ndr, "op_mid", r->op_mid);
108 0 : ndr_print_share_mode_entry_op_type(ndr, "op_type", r->op_type);
109 0 : ndr_print_GUID(ndr, "client_guid", &r->client_guid);
110 0 : ndr_print_smb2_lease_key(ndr, "lease_key", &r->lease_key);
111 0 : ndr_print_uint32(ndr, "access_mask", r->access_mask);
112 0 : ndr_print_uint32(ndr, "share_access", r->share_access);
113 0 : ndr_print_uint32(ndr, "private_options", r->private_options);
114 0 : ndr_print_timeval(ndr, "time", &r->time);
115 0 : ndr_print_udlong(ndr, "share_file_id", r->share_file_id);
116 0 : ndr_print_uint32(ndr, "uid", r->uid);
117 0 : ndr_print_uint16(ndr, "flags", r->flags);
118 0 : ndr_print_uint32(ndr, "name_hash", r->name_hash);
119 0 : ndr_print_uint8(ndr, "stale", r->stale);
120 0 : ndr->depth--;
121 : }
122 :
123 67172 : _PUBLIC_ enum ndr_err_code ndr_push_delete_token(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct delete_token *r)
124 : {
125 67172 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
126 67172 : if (ndr_flags & NDR_SCALARS) {
127 33586 : NDR_CHECK(ndr_push_align(ndr, 5));
128 33586 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->name_hash));
129 33586 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->delete_nt_token));
130 33586 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->delete_token));
131 33586 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
132 : }
133 67172 : if (ndr_flags & NDR_BUFFERS) {
134 33586 : if (r->delete_nt_token) {
135 33586 : NDR_CHECK(ndr_push_security_token(ndr, NDR_SCALARS|NDR_BUFFERS, r->delete_nt_token));
136 : }
137 33586 : if (r->delete_token) {
138 33586 : NDR_CHECK(ndr_push_security_unix_token(ndr, NDR_SCALARS, r->delete_token));
139 : }
140 : }
141 66752 : return NDR_ERR_SUCCESS;
142 : }
143 :
144 2094 : _PUBLIC_ enum ndr_err_code ndr_pull_delete_token(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct delete_token *r)
145 : {
146 180 : uint32_t _ptr_delete_nt_token;
147 2094 : TALLOC_CTX *_mem_save_delete_nt_token_0 = NULL;
148 180 : uint32_t _ptr_delete_token;
149 2094 : TALLOC_CTX *_mem_save_delete_token_0 = NULL;
150 2094 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
151 2094 : if (ndr_flags & NDR_SCALARS) {
152 1047 : NDR_CHECK(ndr_pull_align(ndr, 5));
153 1047 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->name_hash));
154 1047 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delete_nt_token));
155 1047 : if (_ptr_delete_nt_token) {
156 1047 : NDR_PULL_ALLOC(ndr, r->delete_nt_token);
157 : } else {
158 0 : r->delete_nt_token = NULL;
159 : }
160 1047 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delete_token));
161 1047 : if (_ptr_delete_token) {
162 1047 : NDR_PULL_ALLOC(ndr, r->delete_token);
163 : } else {
164 0 : r->delete_token = NULL;
165 : }
166 1047 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
167 : }
168 2094 : if (ndr_flags & NDR_BUFFERS) {
169 1047 : if (r->delete_nt_token) {
170 1047 : _mem_save_delete_nt_token_0 = NDR_PULL_GET_MEM_CTX(ndr);
171 1047 : NDR_PULL_SET_MEM_CTX(ndr, r->delete_nt_token, 0);
172 1047 : NDR_CHECK(ndr_pull_security_token(ndr, NDR_SCALARS|NDR_BUFFERS, r->delete_nt_token));
173 1047 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delete_nt_token_0, 0);
174 : }
175 1047 : if (r->delete_token) {
176 1047 : _mem_save_delete_token_0 = NDR_PULL_GET_MEM_CTX(ndr);
177 1047 : NDR_PULL_SET_MEM_CTX(ndr, r->delete_token, 0);
178 1047 : NDR_CHECK(ndr_pull_security_unix_token(ndr, NDR_SCALARS, r->delete_token));
179 1047 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delete_token_0, 0);
180 : }
181 : }
182 1914 : return NDR_ERR_SUCCESS;
183 : }
184 :
185 0 : static void ndr_print_flags_delete_token(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct delete_token *r)
186 : {
187 0 : ndr_print_delete_token(ndr, name, r);
188 0 : }
189 :
190 0 : _PUBLIC_ void ndr_print_delete_token(struct ndr_print *ndr, const char *name, const struct delete_token *r)
191 : {
192 0 : ndr_print_struct(ndr, name, "delete_token");
193 0 : if (r == NULL) { ndr_print_null(ndr); return; }
194 0 : ndr->depth++;
195 0 : ndr_print_uint32(ndr, "name_hash", r->name_hash);
196 0 : ndr_print_ptr(ndr, "delete_nt_token", r->delete_nt_token);
197 0 : ndr->depth++;
198 0 : if (r->delete_nt_token) {
199 0 : ndr_print_security_token(ndr, "delete_nt_token", r->delete_nt_token);
200 : }
201 0 : ndr->depth--;
202 0 : ndr_print_ptr(ndr, "delete_token", r->delete_token);
203 0 : ndr->depth++;
204 0 : if (r->delete_token) {
205 0 : ndr_print_security_unix_token(ndr, "delete_token", r->delete_token);
206 : }
207 0 : ndr->depth--;
208 0 : ndr->depth--;
209 : }
210 :
211 457958 : _PUBLIC_ enum ndr_err_code ndr_push_share_mode_flags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint16_t r)
212 : {
213 457958 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
214 456774 : return NDR_ERR_SUCCESS;
215 : }
216 :
217 140936 : _PUBLIC_ enum ndr_err_code ndr_pull_share_mode_flags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint16_t *r)
218 : {
219 868 : uint16_t v;
220 140936 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
221 140936 : *r = v;
222 140936 : return NDR_ERR_SUCCESS;
223 : }
224 :
225 6 : _PUBLIC_ void ndr_print_share_mode_flags(struct ndr_print *ndr, const char *name, uint16_t r)
226 : {
227 6 : ndr_print_uint16(ndr, name, r);
228 6 : ndr->depth++;
229 6 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SHARE_MODE_SHARE_DELETE", SHARE_MODE_SHARE_DELETE, r);
230 6 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SHARE_MODE_SHARE_WRITE", SHARE_MODE_SHARE_WRITE, r);
231 6 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SHARE_MODE_SHARE_READ", SHARE_MODE_SHARE_READ, r);
232 6 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SHARE_MODE_ACCESS_DELETE", SHARE_MODE_ACCESS_DELETE, r);
233 6 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SHARE_MODE_ACCESS_WRITE", SHARE_MODE_ACCESS_WRITE, r);
234 6 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SHARE_MODE_ACCESS_READ", SHARE_MODE_ACCESS_READ, r);
235 6 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SHARE_MODE_LEASE_HANDLE", SHARE_MODE_LEASE_HANDLE, r);
236 6 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SHARE_MODE_LEASE_WRITE", SHARE_MODE_LEASE_WRITE, r);
237 6 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SHARE_MODE_LEASE_READ", SHARE_MODE_LEASE_READ, r);
238 6 : ndr->depth--;
239 6 : }
240 :
241 457958 : _PUBLIC_ enum ndr_err_code ndr_push_share_mode_data(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct share_mode_data *r)
242 : {
243 1184 : uint32_t cntr_delete_tokens_0;
244 457958 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
245 457958 : if (ndr_flags & NDR_SCALARS) {
246 457958 : NDR_CHECK(ndr_push_align(ndr, 8));
247 457958 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unique_content_epoch));
248 457958 : NDR_CHECK(ndr_push_share_mode_flags(ndr, NDR_SCALARS, r->flags));
249 457958 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->servicepath));
250 457958 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->base_name));
251 457958 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->stream_name));
252 457958 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_delete_tokens));
253 457958 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_delete_tokens));
254 491544 : for (cntr_delete_tokens_0 = 0; cntr_delete_tokens_0 < (r->num_delete_tokens); cntr_delete_tokens_0++) {
255 33586 : NDR_CHECK(ndr_push_delete_token(ndr, NDR_SCALARS, &r->delete_tokens[cntr_delete_tokens_0]));
256 : }
257 457958 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->old_write_time));
258 457958 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->changed_write_time));
259 : /* [skip] 'r->not_stored' */
260 : /* [skip] 'r->modified' */
261 457958 : NDR_CHECK(ndr_push_file_id(ndr, NDR_SCALARS, &r->id));
262 457958 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
263 : }
264 457958 : if (ndr_flags & NDR_BUFFERS) {
265 457958 : if (r->servicepath) {
266 457958 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->servicepath, CH_UTF8)));
267 457958 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
268 457958 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->servicepath, CH_UTF8)));
269 457958 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->servicepath, ndr_charset_length(r->servicepath, CH_UTF8), sizeof(uint8_t), CH_UTF8));
270 : }
271 457958 : if (r->base_name) {
272 457958 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->base_name, CH_UTF8)));
273 457958 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
274 457958 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->base_name, CH_UTF8)));
275 457958 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->base_name, ndr_charset_length(r->base_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
276 : }
277 457958 : if (r->stream_name) {
278 7047 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->stream_name, CH_UTF8)));
279 7047 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
280 7047 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->stream_name, CH_UTF8)));
281 7047 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->stream_name, ndr_charset_length(r->stream_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
282 : }
283 491544 : for (cntr_delete_tokens_0 = 0; cntr_delete_tokens_0 < (r->num_delete_tokens); cntr_delete_tokens_0++) {
284 33586 : NDR_CHECK(ndr_push_delete_token(ndr, NDR_BUFFERS, &r->delete_tokens[cntr_delete_tokens_0]));
285 : }
286 : /* [skip] 'r->not_stored' */
287 : /* [skip] 'r->modified' */
288 : }
289 456774 : return NDR_ERR_SUCCESS;
290 : }
291 :
292 140936 : _PUBLIC_ enum ndr_err_code ndr_pull_share_mode_data(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct share_mode_data *r)
293 : {
294 868 : uint32_t _ptr_servicepath;
295 140936 : uint32_t size_servicepath_1 = 0;
296 140936 : uint32_t length_servicepath_1 = 0;
297 140936 : TALLOC_CTX *_mem_save_servicepath_0 = NULL;
298 868 : uint32_t _ptr_base_name;
299 140936 : uint32_t size_base_name_1 = 0;
300 140936 : uint32_t length_base_name_1 = 0;
301 140936 : TALLOC_CTX *_mem_save_base_name_0 = NULL;
302 868 : uint32_t _ptr_stream_name;
303 140936 : uint32_t size_stream_name_1 = 0;
304 140936 : uint32_t length_stream_name_1 = 0;
305 140936 : TALLOC_CTX *_mem_save_stream_name_0 = NULL;
306 140936 : uint32_t size_delete_tokens_0 = 0;
307 868 : uint32_t cntr_delete_tokens_0;
308 140936 : TALLOC_CTX *_mem_save_delete_tokens_0 = NULL;
309 140936 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
310 140936 : if (ndr_flags & NDR_SCALARS) {
311 140936 : NDR_CHECK(ndr_pull_align(ndr, 8));
312 140936 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unique_content_epoch));
313 140936 : NDR_CHECK(ndr_pull_share_mode_flags(ndr, NDR_SCALARS, &r->flags));
314 140936 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servicepath));
315 140936 : if (_ptr_servicepath) {
316 140936 : NDR_PULL_ALLOC(ndr, r->servicepath);
317 : } else {
318 0 : r->servicepath = NULL;
319 : }
320 140936 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_base_name));
321 140936 : if (_ptr_base_name) {
322 140936 : NDR_PULL_ALLOC(ndr, r->base_name);
323 : } else {
324 0 : r->base_name = NULL;
325 : }
326 140936 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stream_name));
327 140936 : if (_ptr_stream_name) {
328 696 : NDR_PULL_ALLOC(ndr, r->stream_name);
329 : } else {
330 140240 : r->stream_name = NULL;
331 : }
332 140936 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_delete_tokens));
333 140936 : NDR_CHECK(ndr_pull_array_size(ndr, &r->delete_tokens));
334 140936 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->delete_tokens, &size_delete_tokens_0));
335 140936 : NDR_PULL_ALLOC_N(ndr, r->delete_tokens, size_delete_tokens_0);
336 140936 : _mem_save_delete_tokens_0 = NDR_PULL_GET_MEM_CTX(ndr);
337 140936 : NDR_PULL_SET_MEM_CTX(ndr, r->delete_tokens, 0);
338 141983 : for (cntr_delete_tokens_0 = 0; cntr_delete_tokens_0 < (size_delete_tokens_0); cntr_delete_tokens_0++) {
339 1047 : NDR_CHECK(ndr_pull_delete_token(ndr, NDR_SCALARS, &r->delete_tokens[cntr_delete_tokens_0]));
340 : }
341 140936 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delete_tokens_0, 0);
342 140936 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->old_write_time));
343 140936 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->changed_write_time));
344 : /* [skip] 'r->not_stored' */
345 140936 : NDR_ZERO_STRUCT(r->not_stored);
346 : /* [skip] 'r->modified' */
347 140936 : NDR_ZERO_STRUCT(r->modified);
348 140936 : NDR_CHECK(ndr_pull_file_id(ndr, NDR_SCALARS, &r->id));
349 140936 : if (r->delete_tokens) {
350 140936 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->delete_tokens, r->num_delete_tokens));
351 : }
352 140936 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
353 : }
354 140936 : if (ndr_flags & NDR_BUFFERS) {
355 140936 : if (r->servicepath) {
356 140936 : _mem_save_servicepath_0 = NDR_PULL_GET_MEM_CTX(ndr);
357 140936 : NDR_PULL_SET_MEM_CTX(ndr, r->servicepath, 0);
358 140936 : NDR_CHECK(ndr_pull_array_size(ndr, &r->servicepath));
359 140936 : NDR_CHECK(ndr_pull_array_length(ndr, &r->servicepath));
360 140936 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->servicepath, &size_servicepath_1));
361 140936 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->servicepath, &length_servicepath_1));
362 140936 : if (length_servicepath_1 > size_servicepath_1) {
363 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_servicepath_1, length_servicepath_1);
364 : }
365 140936 : NDR_CHECK(ndr_check_string_terminator(ndr, length_servicepath_1, sizeof(uint8_t)));
366 140936 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->servicepath, length_servicepath_1, sizeof(uint8_t), CH_UTF8));
367 140936 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servicepath_0, 0);
368 : }
369 140936 : if (r->base_name) {
370 140936 : _mem_save_base_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
371 140936 : NDR_PULL_SET_MEM_CTX(ndr, r->base_name, 0);
372 140936 : NDR_CHECK(ndr_pull_array_size(ndr, &r->base_name));
373 140936 : NDR_CHECK(ndr_pull_array_length(ndr, &r->base_name));
374 140936 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->base_name, &size_base_name_1));
375 140936 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->base_name, &length_base_name_1));
376 140936 : if (length_base_name_1 > size_base_name_1) {
377 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_base_name_1, length_base_name_1);
378 : }
379 140936 : NDR_CHECK(ndr_check_string_terminator(ndr, length_base_name_1, sizeof(uint8_t)));
380 140936 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->base_name, length_base_name_1, sizeof(uint8_t), CH_UTF8));
381 140936 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_base_name_0, 0);
382 : }
383 140936 : if (r->stream_name) {
384 696 : _mem_save_stream_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
385 696 : NDR_PULL_SET_MEM_CTX(ndr, r->stream_name, 0);
386 696 : NDR_CHECK(ndr_pull_array_size(ndr, &r->stream_name));
387 696 : NDR_CHECK(ndr_pull_array_length(ndr, &r->stream_name));
388 696 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->stream_name, &size_stream_name_1));
389 696 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->stream_name, &length_stream_name_1));
390 696 : if (length_stream_name_1 > size_stream_name_1) {
391 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_stream_name_1, length_stream_name_1);
392 : }
393 696 : NDR_CHECK(ndr_check_string_terminator(ndr, length_stream_name_1, sizeof(uint8_t)));
394 696 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->stream_name, length_stream_name_1, sizeof(uint8_t), CH_UTF8));
395 696 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stream_name_0, 0);
396 : }
397 140936 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->delete_tokens, &size_delete_tokens_0));
398 140936 : _mem_save_delete_tokens_0 = NDR_PULL_GET_MEM_CTX(ndr);
399 140936 : NDR_PULL_SET_MEM_CTX(ndr, r->delete_tokens, 0);
400 141983 : for (cntr_delete_tokens_0 = 0; cntr_delete_tokens_0 < (size_delete_tokens_0); cntr_delete_tokens_0++) {
401 1047 : NDR_CHECK(ndr_pull_delete_token(ndr, NDR_BUFFERS, &r->delete_tokens[cntr_delete_tokens_0]));
402 : }
403 140936 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delete_tokens_0, 0);
404 141893 : for (cntr_delete_tokens_0 = 0; cntr_delete_tokens_0 < (size_delete_tokens_0); cntr_delete_tokens_0++) {
405 : }
406 : }
407 140068 : return NDR_ERR_SUCCESS;
408 : }
409 :
410 0 : static void ndr_print_flags_share_mode_data(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct share_mode_data *r)
411 : {
412 0 : ndr_print_share_mode_data(ndr, name, r);
413 0 : }
414 :
415 6 : _PUBLIC_ void ndr_print_share_mode_data(struct ndr_print *ndr, const char *name, const struct share_mode_data *r)
416 : {
417 0 : uint32_t cntr_delete_tokens_0;
418 6 : ndr_print_struct(ndr, name, "share_mode_data");
419 6 : if (r == NULL) { ndr_print_null(ndr); return; }
420 6 : ndr->depth++;
421 6 : ndr_print_hyper(ndr, "unique_content_epoch", r->unique_content_epoch);
422 6 : ndr_print_share_mode_flags(ndr, "flags", r->flags);
423 6 : ndr_print_ptr(ndr, "servicepath", r->servicepath);
424 6 : ndr->depth++;
425 6 : if (r->servicepath) {
426 6 : ndr_print_string(ndr, "servicepath", r->servicepath);
427 : }
428 6 : ndr->depth--;
429 6 : ndr_print_ptr(ndr, "base_name", r->base_name);
430 6 : ndr->depth++;
431 6 : if (r->base_name) {
432 6 : ndr_print_string(ndr, "base_name", r->base_name);
433 : }
434 6 : ndr->depth--;
435 6 : ndr_print_ptr(ndr, "stream_name", r->stream_name);
436 6 : ndr->depth++;
437 6 : if (r->stream_name) {
438 0 : ndr_print_string(ndr, "stream_name", r->stream_name);
439 : }
440 6 : ndr->depth--;
441 6 : ndr_print_uint32(ndr, "num_delete_tokens", r->num_delete_tokens);
442 6 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "delete_tokens", (uint32_t)(r->num_delete_tokens));
443 6 : ndr->depth++;
444 6 : for (cntr_delete_tokens_0 = 0; cntr_delete_tokens_0 < (r->num_delete_tokens); cntr_delete_tokens_0++) {
445 0 : ndr_print_delete_token(ndr, "delete_tokens", &r->delete_tokens[cntr_delete_tokens_0]);
446 : }
447 6 : ndr->depth--;
448 6 : ndr_print_NTTIME(ndr, "old_write_time", r->old_write_time);
449 6 : ndr_print_NTTIME(ndr, "changed_write_time", r->changed_write_time);
450 6 : ndr_print_uint8(ndr, "not_stored", r->not_stored);
451 6 : ndr_print_uint8(ndr, "modified", r->modified);
452 6 : ndr_print_file_id(ndr, "id", &r->id);
453 6 : ndr->depth--;
454 : }
455 :
456 1680 : static enum ndr_err_code ndr_push_vfs_default_durable_stat(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct vfs_default_durable_stat *r)
457 : {
458 1680 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
459 1680 : if (ndr_flags & NDR_SCALARS) {
460 840 : NDR_CHECK(ndr_push_align(ndr, 8));
461 840 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->st_ex_dev));
462 840 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->st_ex_ino));
463 840 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->st_ex_mode));
464 840 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->st_ex_nlink));
465 840 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->st_ex_uid));
466 840 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->st_ex_gid));
467 840 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->st_ex_rdev));
468 840 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->st_ex_size));
469 840 : NDR_CHECK(ndr_push_timespec(ndr, NDR_SCALARS, &r->st_ex_atime));
470 840 : NDR_CHECK(ndr_push_timespec(ndr, NDR_SCALARS, &r->st_ex_mtime));
471 840 : NDR_CHECK(ndr_push_timespec(ndr, NDR_SCALARS, &r->st_ex_ctime));
472 840 : NDR_CHECK(ndr_push_timespec(ndr, NDR_SCALARS, &r->st_ex_btime));
473 840 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->st_ex_blksize));
474 840 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->st_ex_blocks));
475 840 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->st_ex_flags));
476 840 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->st_ex_iflags));
477 840 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
478 : }
479 1680 : if (ndr_flags & NDR_BUFFERS) {
480 840 : NDR_CHECK(ndr_push_timespec(ndr, NDR_BUFFERS, &r->st_ex_atime));
481 840 : NDR_CHECK(ndr_push_timespec(ndr, NDR_BUFFERS, &r->st_ex_mtime));
482 840 : NDR_CHECK(ndr_push_timespec(ndr, NDR_BUFFERS, &r->st_ex_ctime));
483 840 : NDR_CHECK(ndr_push_timespec(ndr, NDR_BUFFERS, &r->st_ex_btime));
484 : }
485 1680 : return NDR_ERR_SUCCESS;
486 : }
487 :
488 652 : static enum ndr_err_code ndr_pull_vfs_default_durable_stat(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct vfs_default_durable_stat *r)
489 : {
490 652 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
491 652 : if (ndr_flags & NDR_SCALARS) {
492 326 : NDR_CHECK(ndr_pull_align(ndr, 8));
493 326 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->st_ex_dev));
494 326 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->st_ex_ino));
495 326 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->st_ex_mode));
496 326 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->st_ex_nlink));
497 326 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->st_ex_uid));
498 326 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->st_ex_gid));
499 326 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->st_ex_rdev));
500 326 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->st_ex_size));
501 326 : NDR_CHECK(ndr_pull_timespec(ndr, NDR_SCALARS, &r->st_ex_atime));
502 326 : NDR_CHECK(ndr_pull_timespec(ndr, NDR_SCALARS, &r->st_ex_mtime));
503 326 : NDR_CHECK(ndr_pull_timespec(ndr, NDR_SCALARS, &r->st_ex_ctime));
504 326 : NDR_CHECK(ndr_pull_timespec(ndr, NDR_SCALARS, &r->st_ex_btime));
505 326 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->st_ex_blksize));
506 326 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->st_ex_blocks));
507 326 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->st_ex_flags));
508 326 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->st_ex_iflags));
509 326 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
510 : }
511 652 : if (ndr_flags & NDR_BUFFERS) {
512 326 : NDR_CHECK(ndr_pull_timespec(ndr, NDR_BUFFERS, &r->st_ex_atime));
513 326 : NDR_CHECK(ndr_pull_timespec(ndr, NDR_BUFFERS, &r->st_ex_mtime));
514 326 : NDR_CHECK(ndr_pull_timespec(ndr, NDR_BUFFERS, &r->st_ex_ctime));
515 326 : NDR_CHECK(ndr_pull_timespec(ndr, NDR_BUFFERS, &r->st_ex_btime));
516 : }
517 652 : return NDR_ERR_SUCCESS;
518 : }
519 :
520 0 : _PUBLIC_ void ndr_print_vfs_default_durable_stat(struct ndr_print *ndr, const char *name, const struct vfs_default_durable_stat *r)
521 : {
522 0 : ndr_print_struct(ndr, name, "vfs_default_durable_stat");
523 0 : if (r == NULL) { ndr_print_null(ndr); return; }
524 0 : ndr->depth++;
525 0 : ndr_print_hyper(ndr, "st_ex_dev", r->st_ex_dev);
526 0 : ndr_print_hyper(ndr, "st_ex_ino", r->st_ex_ino);
527 0 : ndr_print_hyper(ndr, "st_ex_mode", r->st_ex_mode);
528 0 : ndr_print_hyper(ndr, "st_ex_nlink", r->st_ex_nlink);
529 0 : ndr_print_hyper(ndr, "st_ex_uid", r->st_ex_uid);
530 0 : ndr_print_hyper(ndr, "st_ex_gid", r->st_ex_gid);
531 0 : ndr_print_hyper(ndr, "st_ex_rdev", r->st_ex_rdev);
532 0 : ndr_print_hyper(ndr, "st_ex_size", r->st_ex_size);
533 0 : ndr_print_timespec(ndr, "st_ex_atime", &r->st_ex_atime);
534 0 : ndr_print_timespec(ndr, "st_ex_mtime", &r->st_ex_mtime);
535 0 : ndr_print_timespec(ndr, "st_ex_ctime", &r->st_ex_ctime);
536 0 : ndr_print_timespec(ndr, "st_ex_btime", &r->st_ex_btime);
537 0 : ndr_print_hyper(ndr, "st_ex_blksize", r->st_ex_blksize);
538 0 : ndr_print_hyper(ndr, "st_ex_blocks", r->st_ex_blocks);
539 0 : ndr_print_uint32(ndr, "st_ex_flags", r->st_ex_flags);
540 0 : ndr_print_uint32(ndr, "st_ex_iflags", r->st_ex_iflags);
541 0 : ndr->depth--;
542 : }
543 :
544 840 : _PUBLIC_ enum ndr_err_code ndr_push_vfs_default_durable_cookie(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct vfs_default_durable_cookie *r)
545 : {
546 840 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
547 840 : if (ndr_flags & NDR_SCALARS) {
548 840 : NDR_CHECK(ndr_push_align(ndr, 8));
549 840 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, VFS_DEFAULT_DURABLE_COOKIE_MAGIC, 0x30, sizeof(uint8_t), CH_DOS));
550 840 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, VFS_DEFAULT_DURABLE_COOKIE_VERSION));
551 840 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->allow_reconnect));
552 840 : NDR_CHECK(ndr_push_file_id(ndr, NDR_SCALARS, &r->id));
553 840 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->servicepath));
554 840 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->base_name));
555 840 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->initial_allocation_size));
556 840 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->position_information));
557 840 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->update_write_time_triggered));
558 840 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->update_write_time_on_close));
559 840 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->write_time_forced));
560 840 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->close_write_time));
561 840 : NDR_CHECK(ndr_push_vfs_default_durable_stat(ndr, NDR_SCALARS, &r->stat_info));
562 840 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
563 : }
564 840 : if (ndr_flags & NDR_BUFFERS) {
565 840 : if (r->servicepath) {
566 840 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->servicepath, CH_UTF8)));
567 840 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
568 840 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->servicepath, CH_UTF8)));
569 840 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->servicepath, ndr_charset_length(r->servicepath, CH_UTF8), sizeof(uint8_t), CH_UTF8));
570 : }
571 840 : if (r->base_name) {
572 840 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->base_name, CH_UTF8)));
573 840 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
574 840 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->base_name, CH_UTF8)));
575 840 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->base_name, ndr_charset_length(r->base_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
576 : }
577 840 : NDR_CHECK(ndr_push_vfs_default_durable_stat(ndr, NDR_BUFFERS, &r->stat_info));
578 : }
579 840 : return NDR_ERR_SUCCESS;
580 : }
581 :
582 326 : _PUBLIC_ enum ndr_err_code ndr_pull_vfs_default_durable_cookie(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct vfs_default_durable_cookie *r)
583 : {
584 326 : uint32_t size_magic_0 = 0;
585 0 : uint32_t _ptr_servicepath;
586 326 : uint32_t size_servicepath_1 = 0;
587 326 : uint32_t length_servicepath_1 = 0;
588 326 : TALLOC_CTX *_mem_save_servicepath_0 = NULL;
589 0 : uint32_t _ptr_base_name;
590 326 : uint32_t size_base_name_1 = 0;
591 326 : uint32_t length_base_name_1 = 0;
592 326 : TALLOC_CTX *_mem_save_base_name_0 = NULL;
593 326 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
594 326 : if (ndr_flags & NDR_SCALARS) {
595 326 : NDR_CHECK(ndr_pull_align(ndr, 8));
596 326 : size_magic_0 = 0x30;
597 326 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->magic, size_magic_0, sizeof(uint8_t), CH_DOS));
598 326 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
599 326 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->allow_reconnect));
600 326 : NDR_CHECK(ndr_pull_file_id(ndr, NDR_SCALARS, &r->id));
601 326 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servicepath));
602 326 : if (_ptr_servicepath) {
603 326 : NDR_PULL_ALLOC(ndr, r->servicepath);
604 : } else {
605 0 : r->servicepath = NULL;
606 : }
607 326 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_base_name));
608 326 : if (_ptr_base_name) {
609 326 : NDR_PULL_ALLOC(ndr, r->base_name);
610 : } else {
611 0 : r->base_name = NULL;
612 : }
613 326 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->initial_allocation_size));
614 326 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->position_information));
615 326 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->update_write_time_triggered));
616 326 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->update_write_time_on_close));
617 326 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->write_time_forced));
618 326 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->close_write_time));
619 326 : NDR_CHECK(ndr_pull_vfs_default_durable_stat(ndr, NDR_SCALARS, &r->stat_info));
620 326 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
621 : }
622 326 : if (ndr_flags & NDR_BUFFERS) {
623 326 : if (r->servicepath) {
624 326 : _mem_save_servicepath_0 = NDR_PULL_GET_MEM_CTX(ndr);
625 326 : NDR_PULL_SET_MEM_CTX(ndr, r->servicepath, 0);
626 326 : NDR_CHECK(ndr_pull_array_size(ndr, &r->servicepath));
627 326 : NDR_CHECK(ndr_pull_array_length(ndr, &r->servicepath));
628 326 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->servicepath, &size_servicepath_1));
629 326 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->servicepath, &length_servicepath_1));
630 326 : if (length_servicepath_1 > size_servicepath_1) {
631 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_servicepath_1, length_servicepath_1);
632 : }
633 326 : NDR_CHECK(ndr_check_string_terminator(ndr, length_servicepath_1, sizeof(uint8_t)));
634 326 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->servicepath, length_servicepath_1, sizeof(uint8_t), CH_UTF8));
635 326 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servicepath_0, 0);
636 : }
637 326 : if (r->base_name) {
638 326 : _mem_save_base_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
639 326 : NDR_PULL_SET_MEM_CTX(ndr, r->base_name, 0);
640 326 : NDR_CHECK(ndr_pull_array_size(ndr, &r->base_name));
641 326 : NDR_CHECK(ndr_pull_array_length(ndr, &r->base_name));
642 326 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->base_name, &size_base_name_1));
643 326 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->base_name, &length_base_name_1));
644 326 : if (length_base_name_1 > size_base_name_1) {
645 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_base_name_1, length_base_name_1);
646 : }
647 326 : NDR_CHECK(ndr_check_string_terminator(ndr, length_base_name_1, sizeof(uint8_t)));
648 326 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->base_name, length_base_name_1, sizeof(uint8_t), CH_UTF8));
649 326 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_base_name_0, 0);
650 : }
651 326 : NDR_CHECK(ndr_pull_vfs_default_durable_stat(ndr, NDR_BUFFERS, &r->stat_info));
652 : }
653 326 : return NDR_ERR_SUCCESS;
654 : }
655 :
656 0 : static void ndr_print_flags_vfs_default_durable_cookie(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct vfs_default_durable_cookie *r)
657 : {
658 0 : ndr_print_vfs_default_durable_cookie(ndr, name, r);
659 0 : }
660 :
661 0 : _PUBLIC_ void ndr_print_vfs_default_durable_cookie(struct ndr_print *ndr, const char *name, const struct vfs_default_durable_cookie *r)
662 : {
663 0 : ndr_print_struct(ndr, name, "vfs_default_durable_cookie");
664 0 : if (r == NULL) { ndr_print_null(ndr); return; }
665 0 : ndr->depth++;
666 0 : ndr_print_string(ndr, "magic", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?VFS_DEFAULT_DURABLE_COOKIE_MAGIC:r->magic);
667 0 : ndr_print_uint32(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?VFS_DEFAULT_DURABLE_COOKIE_VERSION:r->version);
668 0 : ndr_print_uint8(ndr, "allow_reconnect", r->allow_reconnect);
669 0 : ndr_print_file_id(ndr, "id", &r->id);
670 0 : ndr_print_ptr(ndr, "servicepath", r->servicepath);
671 0 : ndr->depth++;
672 0 : if (r->servicepath) {
673 0 : ndr_print_string(ndr, "servicepath", r->servicepath);
674 : }
675 0 : ndr->depth--;
676 0 : ndr_print_ptr(ndr, "base_name", r->base_name);
677 0 : ndr->depth++;
678 0 : if (r->base_name) {
679 0 : ndr_print_string(ndr, "base_name", r->base_name);
680 : }
681 0 : ndr->depth--;
682 0 : ndr_print_hyper(ndr, "initial_allocation_size", r->initial_allocation_size);
683 0 : ndr_print_hyper(ndr, "position_information", r->position_information);
684 0 : ndr_print_uint8(ndr, "update_write_time_triggered", r->update_write_time_triggered);
685 0 : ndr_print_uint8(ndr, "update_write_time_on_close", r->update_write_time_on_close);
686 0 : ndr_print_uint8(ndr, "write_time_forced", r->write_time_forced);
687 0 : ndr_print_NTTIME(ndr, "close_write_time", r->close_write_time);
688 0 : ndr_print_vfs_default_durable_stat(ndr, "stat_info", &r->stat_info);
689 0 : ndr->depth--;
690 : }
691 :
692 595 : _PUBLIC_ enum ndr_err_code ndr_push_oplock_break_message(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct oplock_break_message *r)
693 : {
694 595 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
695 595 : if (ndr_flags & NDR_SCALARS) {
696 595 : NDR_CHECK(ndr_push_align(ndr, 4));
697 595 : NDR_CHECK(ndr_push_file_id(ndr, NDR_SCALARS, &r->id));
698 595 : NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->share_file_id));
699 595 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->break_to));
700 595 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
701 : }
702 595 : if (ndr_flags & NDR_BUFFERS) {
703 0 : }
704 595 : return NDR_ERR_SUCCESS;
705 : }
706 :
707 593 : _PUBLIC_ enum ndr_err_code ndr_pull_oplock_break_message(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct oplock_break_message *r)
708 : {
709 593 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
710 593 : if (ndr_flags & NDR_SCALARS) {
711 593 : NDR_CHECK(ndr_pull_align(ndr, 4));
712 593 : NDR_CHECK(ndr_pull_file_id(ndr, NDR_SCALARS, &r->id));
713 593 : NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->share_file_id));
714 593 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->break_to));
715 593 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
716 : }
717 593 : if (ndr_flags & NDR_BUFFERS) {
718 0 : }
719 593 : return NDR_ERR_SUCCESS;
720 : }
721 :
722 0 : static void ndr_print_flags_oplock_break_message(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct oplock_break_message *r)
723 : {
724 0 : ndr_print_oplock_break_message(ndr, name, r);
725 0 : }
726 :
727 0 : _PUBLIC_ void ndr_print_oplock_break_message(struct ndr_print *ndr, const char *name, const struct oplock_break_message *r)
728 : {
729 0 : ndr_print_struct(ndr, name, "oplock_break_message");
730 0 : if (r == NULL) { ndr_print_null(ndr); return; }
731 0 : ndr->depth++;
732 0 : ndr_print_file_id(ndr, "id", &r->id);
733 0 : ndr_print_udlong(ndr, "share_file_id", r->share_file_id);
734 0 : ndr_print_uint8(ndr, "break_to", r->break_to);
735 0 : ndr->depth--;
736 : }
737 :
738 24 : _PUBLIC_ enum ndr_err_code ndr_push_file_rename_message(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct file_rename_message *r)
739 : {
740 24 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
741 24 : if (ndr_flags & NDR_SCALARS) {
742 24 : NDR_CHECK(ndr_push_align(ndr, 5));
743 24 : NDR_CHECK(ndr_push_file_id(ndr, NDR_SCALARS, &r->id));
744 24 : NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->share_file_id));
745 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->servicepath));
746 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->base_name));
747 24 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->stream_name));
748 24 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
749 : }
750 24 : if (ndr_flags & NDR_BUFFERS) {
751 24 : if (r->servicepath) {
752 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->servicepath, CH_UTF8)));
753 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
754 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->servicepath, CH_UTF8)));
755 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->servicepath, ndr_charset_length(r->servicepath, CH_UTF8), sizeof(uint8_t), CH_UTF8));
756 : }
757 24 : if (r->base_name) {
758 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->base_name, CH_UTF8)));
759 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
760 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->base_name, CH_UTF8)));
761 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->base_name, ndr_charset_length(r->base_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
762 : }
763 24 : if (r->stream_name) {
764 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->stream_name, CH_UTF8)));
765 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
766 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->stream_name, CH_UTF8)));
767 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->stream_name, ndr_charset_length(r->stream_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
768 : }
769 : }
770 22 : return NDR_ERR_SUCCESS;
771 : }
772 :
773 24 : _PUBLIC_ enum ndr_err_code ndr_pull_file_rename_message(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct file_rename_message *r)
774 : {
775 2 : uint32_t _ptr_servicepath;
776 24 : uint32_t size_servicepath_1 = 0;
777 24 : uint32_t length_servicepath_1 = 0;
778 24 : TALLOC_CTX *_mem_save_servicepath_0 = NULL;
779 2 : uint32_t _ptr_base_name;
780 24 : uint32_t size_base_name_1 = 0;
781 24 : uint32_t length_base_name_1 = 0;
782 24 : TALLOC_CTX *_mem_save_base_name_0 = NULL;
783 2 : uint32_t _ptr_stream_name;
784 24 : uint32_t size_stream_name_1 = 0;
785 24 : uint32_t length_stream_name_1 = 0;
786 24 : TALLOC_CTX *_mem_save_stream_name_0 = NULL;
787 24 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
788 24 : if (ndr_flags & NDR_SCALARS) {
789 24 : NDR_CHECK(ndr_pull_align(ndr, 5));
790 24 : NDR_CHECK(ndr_pull_file_id(ndr, NDR_SCALARS, &r->id));
791 24 : NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->share_file_id));
792 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servicepath));
793 24 : if (_ptr_servicepath) {
794 24 : NDR_PULL_ALLOC(ndr, r->servicepath);
795 : } else {
796 0 : r->servicepath = NULL;
797 : }
798 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_base_name));
799 24 : if (_ptr_base_name) {
800 24 : NDR_PULL_ALLOC(ndr, r->base_name);
801 : } else {
802 0 : r->base_name = NULL;
803 : }
804 24 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stream_name));
805 24 : if (_ptr_stream_name) {
806 0 : NDR_PULL_ALLOC(ndr, r->stream_name);
807 : } else {
808 24 : r->stream_name = NULL;
809 : }
810 24 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
811 : }
812 24 : if (ndr_flags & NDR_BUFFERS) {
813 24 : if (r->servicepath) {
814 24 : _mem_save_servicepath_0 = NDR_PULL_GET_MEM_CTX(ndr);
815 24 : NDR_PULL_SET_MEM_CTX(ndr, r->servicepath, 0);
816 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->servicepath));
817 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->servicepath));
818 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->servicepath, &size_servicepath_1));
819 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->servicepath, &length_servicepath_1));
820 24 : if (length_servicepath_1 > size_servicepath_1) {
821 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_servicepath_1, length_servicepath_1);
822 : }
823 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_servicepath_1, sizeof(uint8_t)));
824 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->servicepath, length_servicepath_1, sizeof(uint8_t), CH_UTF8));
825 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servicepath_0, 0);
826 : }
827 24 : if (r->base_name) {
828 24 : _mem_save_base_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
829 24 : NDR_PULL_SET_MEM_CTX(ndr, r->base_name, 0);
830 24 : NDR_CHECK(ndr_pull_array_size(ndr, &r->base_name));
831 24 : NDR_CHECK(ndr_pull_array_length(ndr, &r->base_name));
832 24 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->base_name, &size_base_name_1));
833 24 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->base_name, &length_base_name_1));
834 24 : if (length_base_name_1 > size_base_name_1) {
835 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_base_name_1, length_base_name_1);
836 : }
837 24 : NDR_CHECK(ndr_check_string_terminator(ndr, length_base_name_1, sizeof(uint8_t)));
838 24 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->base_name, length_base_name_1, sizeof(uint8_t), CH_UTF8));
839 24 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_base_name_0, 0);
840 : }
841 24 : if (r->stream_name) {
842 0 : _mem_save_stream_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
843 0 : NDR_PULL_SET_MEM_CTX(ndr, r->stream_name, 0);
844 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->stream_name));
845 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->stream_name));
846 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->stream_name, &size_stream_name_1));
847 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->stream_name, &length_stream_name_1));
848 0 : if (length_stream_name_1 > size_stream_name_1) {
849 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_stream_name_1, length_stream_name_1);
850 : }
851 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_stream_name_1, sizeof(uint8_t)));
852 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->stream_name, length_stream_name_1, sizeof(uint8_t), CH_UTF8));
853 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stream_name_0, 0);
854 : }
855 : }
856 22 : return NDR_ERR_SUCCESS;
857 : }
858 :
859 0 : static void ndr_print_flags_file_rename_message(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct file_rename_message *r)
860 : {
861 0 : ndr_print_file_rename_message(ndr, name, r);
862 0 : }
863 :
864 0 : _PUBLIC_ void ndr_print_file_rename_message(struct ndr_print *ndr, const char *name, const struct file_rename_message *r)
865 : {
866 0 : ndr_print_struct(ndr, name, "file_rename_message");
867 0 : if (r == NULL) { ndr_print_null(ndr); return; }
868 0 : ndr->depth++;
869 0 : ndr_print_file_id(ndr, "id", &r->id);
870 0 : ndr_print_udlong(ndr, "share_file_id", r->share_file_id);
871 0 : ndr_print_ptr(ndr, "servicepath", r->servicepath);
872 0 : ndr->depth++;
873 0 : if (r->servicepath) {
874 0 : ndr_print_string(ndr, "servicepath", r->servicepath);
875 : }
876 0 : ndr->depth--;
877 0 : ndr_print_ptr(ndr, "base_name", r->base_name);
878 0 : ndr->depth++;
879 0 : if (r->base_name) {
880 0 : ndr_print_string(ndr, "base_name", r->base_name);
881 : }
882 0 : ndr->depth--;
883 0 : ndr_print_ptr(ndr, "stream_name", r->stream_name);
884 0 : ndr->depth++;
885 0 : if (r->stream_name) {
886 0 : ndr_print_string(ndr, "stream_name", r->stream_name);
887 : }
888 0 : ndr->depth--;
889 0 : ndr->depth--;
890 : }
891 :
892 : #ifndef SKIP_NDR_TABLE_open_files
893 : static const struct ndr_interface_public_struct open_files_public_structs[] = {
894 : {
895 : .name = "share_mode_entry",
896 : .struct_size = sizeof(struct share_mode_entry ),
897 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_share_mode_entry,
898 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_share_mode_entry,
899 : .ndr_print = (ndr_print_function_t) ndr_print_flags_share_mode_entry,
900 : },
901 : {
902 : .name = "delete_token",
903 : .struct_size = sizeof(struct delete_token ),
904 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_delete_token,
905 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_delete_token,
906 : .ndr_print = (ndr_print_function_t) ndr_print_flags_delete_token,
907 : },
908 : {
909 : .name = "share_mode_data",
910 : .struct_size = sizeof(struct share_mode_data ),
911 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_share_mode_data,
912 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_share_mode_data,
913 : .ndr_print = (ndr_print_function_t) ndr_print_flags_share_mode_data,
914 : },
915 : {
916 : .name = "vfs_default_durable_cookie",
917 : .struct_size = sizeof(struct vfs_default_durable_cookie ),
918 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_vfs_default_durable_cookie,
919 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_vfs_default_durable_cookie,
920 : .ndr_print = (ndr_print_function_t) ndr_print_flags_vfs_default_durable_cookie,
921 : },
922 : {
923 : .name = "oplock_break_message",
924 : .struct_size = sizeof(struct oplock_break_message ),
925 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_oplock_break_message,
926 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_oplock_break_message,
927 : .ndr_print = (ndr_print_function_t) ndr_print_flags_oplock_break_message,
928 : },
929 : {
930 : .name = "file_rename_message",
931 : .struct_size = sizeof(struct file_rename_message ),
932 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_file_rename_message,
933 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_file_rename_message,
934 : .ndr_print = (ndr_print_function_t) ndr_print_flags_file_rename_message,
935 : },
936 : { .name = NULL }
937 : };
938 :
939 : static const struct ndr_interface_call open_files_calls[] = {
940 : { .name = NULL }
941 : };
942 :
943 : static const char * const open_files_endpoint_strings[] = {
944 : "ncacn_np:[\\pipe\\open_files]",
945 : };
946 :
947 : static const struct ndr_interface_string_array open_files_endpoints = {
948 : .count = 1,
949 : .names = open_files_endpoint_strings
950 : };
951 :
952 : static const char * const open_files_authservice_strings[] = {
953 : "host",
954 : };
955 :
956 : static const struct ndr_interface_string_array open_files_authservices = {
957 : .count = 1,
958 : .names = open_files_authservice_strings
959 : };
960 :
961 :
962 : const struct ndr_interface_table ndr_table_open_files = {
963 : .name = "open_files",
964 : .num_calls = 0,
965 : .calls = open_files_calls,
966 : .num_public_structs = 6,
967 : .public_structs = open_files_public_structs,
968 : .endpoints = &open_files_endpoints,
969 : .authservices = &open_files_authservices
970 : };
971 :
972 : #endif /* SKIP_NDR_TABLE_open_files */
|