1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
|
/* parser auto-generated by pidl */
#include "includes.h"
#include "librpc/gen_ndr/ndr_notify.h"
_PUBLIC_ enum ndr_err_code ndr_push_notify_entry(struct ndr_push *ndr, int ndr_flags, const struct notify_entry *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 8));
NDR_CHECK(ndr_push_server_id(ndr, NDR_SCALARS, &r->server));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->filter));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->subdir_filter));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dir_fd));
NDR_CHECK(ndr_push_file_id(ndr, NDR_SCALARS, &r->dir_id));
{
uint32_t _flags_save_string = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->path));
ndr->flags = _flags_save_string;
}
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->path_len));
NDR_CHECK(ndr_push_pointer(ndr, NDR_SCALARS, r->private_data));
}
if (ndr_flags & NDR_BUFFERS) {
NDR_CHECK(ndr_push_server_id(ndr, NDR_BUFFERS, &r->server));
NDR_CHECK(ndr_push_file_id(ndr, NDR_BUFFERS, &r->dir_id));
}
return NDR_ERR_SUCCESS;
}
_PUBLIC_ enum ndr_err_code ndr_pull_notify_entry(struct ndr_pull *ndr, int ndr_flags, struct notify_entry *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 8));
NDR_CHECK(ndr_pull_server_id(ndr, NDR_SCALARS, &r->server));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->filter));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->subdir_filter));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dir_fd));
NDR_CHECK(ndr_pull_file_id(ndr, NDR_SCALARS, &r->dir_id));
{
uint32_t _flags_save_string = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->path));
ndr->flags = _flags_save_string;
}
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->path_len));
NDR_CHECK(ndr_pull_pointer(ndr, NDR_SCALARS, &r->private_data));
}
if (ndr_flags & NDR_BUFFERS) {
NDR_CHECK(ndr_pull_server_id(ndr, NDR_BUFFERS, &r->server));
NDR_CHECK(ndr_pull_file_id(ndr, NDR_BUFFERS, &r->dir_id));
}
return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_notify_entry(struct ndr_print *ndr, const char *name, const struct notify_entry *r)
{
ndr_print_struct(ndr, name, "notify_entry");
ndr->depth++;
ndr_print_server_id(ndr, "server", &r->server);
ndr_print_uint32(ndr, "filter", r->filter);
ndr_print_uint32(ndr, "subdir_filter", r->subdir_filter);
ndr_print_uint32(ndr, "dir_fd", r->dir_fd);
ndr_print_file_id(ndr, "dir_id", &r->dir_id);
ndr_print_string(ndr, "path", r->path);
ndr_print_uint32(ndr, "path_len", r->path_len);
ndr_print_pointer(ndr, "private_data", r->private_data);
ndr->depth--;
}
_PUBLIC_ enum ndr_err_code ndr_push_notify_entry_array(struct ndr_push *ndr, int ndr_flags, const struct notify_entry_array *r)
{
uint32_t cntr_entries_0;
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 8));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_entries));
for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) {
NDR_CHECK(ndr_push_notify_entry(ndr, NDR_SCALARS, &r->entries[cntr_entries_0]));
}
}
if (ndr_flags & NDR_BUFFERS) {
for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) {
NDR_CHECK(ndr_push_notify_entry(ndr, NDR_BUFFERS, &r->entries[cntr_entries_0]));
}
}
return NDR_ERR_SUCCESS;
}
_PUBLIC_ enum ndr_err_code ndr_pull_notify_entry_array(struct ndr_pull *ndr, int ndr_flags, struct notify_entry_array *r)
{
uint32_t cntr_entries_0;
TALLOC_CTX *_mem_save_entries_0;
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 8));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_entries));
NDR_PULL_ALLOC_N(ndr, r->entries, r->num_entries);
_mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) {
NDR_CHECK(ndr_pull_notify_entry(ndr, NDR_SCALARS, &r->entries[cntr_entries_0]));
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
}
if (ndr_flags & NDR_BUFFERS) {
_mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) {
NDR_CHECK(ndr_pull_notify_entry(ndr, NDR_BUFFERS, &r->entries[cntr_entries_0]));
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
}
return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_notify_entry_array(struct ndr_print *ndr, const char *name, const struct notify_entry_array *r)
{
uint32_t cntr_entries_0;
ndr_print_struct(ndr, name, "notify_entry_array");
ndr->depth++;
ndr_print_uint32(ndr, "num_entries", r->num_entries);
ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->num_entries);
ndr->depth++;
for (cntr_entries_0=0;cntr_entries_0<r->num_entries;cntr_entries_0++) {
char *idx_0=NULL;
if (asprintf(&idx_0, "[%d]", cntr_entries_0) != -1) {
ndr_print_notify_entry(ndr, "entries", &r->entries[cntr_entries_0]);
free(idx_0);
}
}
ndr->depth--;
ndr->depth--;
}
static enum ndr_err_code ndr_push_notify_depth(struct ndr_push *ndr, int ndr_flags, const struct notify_depth *r)
{
uint32_t cntr_entries_0;
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 8));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_mask));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_mask_subdir));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_entries));
for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) {
NDR_CHECK(ndr_push_notify_entry(ndr, NDR_SCALARS, &r->entries[cntr_entries_0]));
}
}
if (ndr_flags & NDR_BUFFERS) {
for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) {
NDR_CHECK(ndr_push_notify_entry(ndr, NDR_BUFFERS, &r->entries[cntr_entries_0]));
}
}
return NDR_ERR_SUCCESS;
}
static enum ndr_err_code ndr_pull_notify_depth(struct ndr_pull *ndr, int ndr_flags, struct notify_depth *r)
{
uint32_t cntr_entries_0;
TALLOC_CTX *_mem_save_entries_0;
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 8));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_mask));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_mask_subdir));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_entries));
NDR_PULL_ALLOC_N(ndr, r->entries, r->num_entries);
_mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) {
NDR_CHECK(ndr_pull_notify_entry(ndr, NDR_SCALARS, &r->entries[cntr_entries_0]));
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
}
if (ndr_flags & NDR_BUFFERS) {
_mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) {
NDR_CHECK(ndr_pull_notify_entry(ndr, NDR_BUFFERS, &r->entries[cntr_entries_0]));
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
}
return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_notify_depth(struct ndr_print *ndr, const char *name, const struct notify_depth *r)
{
uint32_t cntr_entries_0;
ndr_print_struct(ndr, name, "notify_depth");
ndr->depth++;
ndr_print_uint32(ndr, "max_mask", r->max_mask);
ndr_print_uint32(ndr, "max_mask_subdir", r->max_mask_subdir);
ndr_print_uint32(ndr, "num_entries", r->num_entries);
ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->num_entries);
ndr->depth++;
for (cntr_entries_0=0;cntr_entries_0<r->num_entries;cntr_entries_0++) {
char *idx_0=NULL;
if (asprintf(&idx_0, "[%d]", cntr_entries_0) != -1) {
ndr_print_notify_entry(ndr, "entries", &r->entries[cntr_entries_0]);
free(idx_0);
}
}
ndr->depth--;
ndr->depth--;
}
_PUBLIC_ enum ndr_err_code ndr_push_notify_array(struct ndr_push *ndr, int ndr_flags, const struct notify_array *r)
{
uint32_t cntr_depth_0;
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 8));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_depths));
for (cntr_depth_0 = 0; cntr_depth_0 < r->num_depths; cntr_depth_0++) {
NDR_CHECK(ndr_push_notify_depth(ndr, NDR_SCALARS, &r->depth[cntr_depth_0]));
}
}
if (ndr_flags & NDR_BUFFERS) {
for (cntr_depth_0 = 0; cntr_depth_0 < r->num_depths; cntr_depth_0++) {
NDR_CHECK(ndr_push_notify_depth(ndr, NDR_BUFFERS, &r->depth[cntr_depth_0]));
}
}
return NDR_ERR_SUCCESS;
}
_PUBLIC_ enum ndr_err_code ndr_pull_notify_array(struct ndr_pull *ndr, int ndr_flags, struct notify_array *r)
{
uint32_t cntr_depth_0;
TALLOC_CTX *_mem_save_depth_0;
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 8));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_depths));
NDR_PULL_ALLOC_N(ndr, r->depth, r->num_depths);
_mem_save_depth_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->depth, 0);
for (cntr_depth_0 = 0; cntr_depth_0 < r->num_depths; cntr_depth_0++) {
NDR_CHECK(ndr_pull_notify_depth(ndr, NDR_SCALARS, &r->depth[cntr_depth_0]));
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_depth_0, 0);
}
if (ndr_flags & NDR_BUFFERS) {
_mem_save_depth_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->depth, 0);
for (cntr_depth_0 = 0; cntr_depth_0 < r->num_depths; cntr_depth_0++) {
NDR_CHECK(ndr_pull_notify_depth(ndr, NDR_BUFFERS, &r->depth[cntr_depth_0]));
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_depth_0, 0);
}
return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_notify_array(struct ndr_print *ndr, const char *name, const struct notify_array *r)
{
uint32_t cntr_depth_0;
ndr_print_struct(ndr, name, "notify_array");
ndr->depth++;
ndr_print_uint32(ndr, "num_depths", r->num_depths);
ndr->print(ndr, "%s: ARRAY(%d)", "depth", (int)r->num_depths);
ndr->depth++;
for (cntr_depth_0=0;cntr_depth_0<r->num_depths;cntr_depth_0++) {
char *idx_0=NULL;
if (asprintf(&idx_0, "[%d]", cntr_depth_0) != -1) {
ndr_print_notify_depth(ndr, "depth", &r->depth[cntr_depth_0]);
free(idx_0);
}
}
ndr->depth--;
ndr->depth--;
}
_PUBLIC_ enum ndr_err_code ndr_push_notify_event(struct ndr_push *ndr, int ndr_flags, const struct notify_event *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 8));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->action));
{
uint32_t _flags_save_string = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->path));
ndr->flags = _flags_save_string;
}
NDR_CHECK(ndr_push_pointer(ndr, NDR_SCALARS, r->private_data));
}
if (ndr_flags & NDR_BUFFERS) {
}
return NDR_ERR_SUCCESS;
}
_PUBLIC_ enum ndr_err_code ndr_pull_notify_event(struct ndr_pull *ndr, int ndr_flags, struct notify_event *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 8));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->action));
{
uint32_t _flags_save_string = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->path));
ndr->flags = _flags_save_string;
}
NDR_CHECK(ndr_pull_pointer(ndr, NDR_SCALARS, &r->private_data));
}
if (ndr_flags & NDR_BUFFERS) {
}
return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_notify_event(struct ndr_print *ndr, const char *name, const struct notify_event *r)
{
ndr_print_struct(ndr, name, "notify_event");
ndr->depth++;
ndr_print_uint32(ndr, "action", r->action);
ndr_print_string(ndr, "path", r->path);
ndr_print_pointer(ndr, "private_data", r->private_data);
ndr->depth--;
}
|