r18690: Regenerate RPC files after pidl changes.
[jpeach/samba.git] / source / librpc / gen_ndr / srv_wkssvc.c
1 /*
2  * Unix SMB/CIFS implementation.
3  * server auto-generated by pidl. DO NOT MODIFY!
4  */
5
6 #include "includes.h"
7 #include "librpc/gen_ndr/srv_wkssvc.h"
8
9 static BOOL api_wkssvc_NetWkstaGetInfo(pipes_struct *p)
10 {
11         struct ndr_pull *pull;
12         struct ndr_push *push;
13         NTSTATUS status;
14         DATA_BLOB blob;
15         struct wkssvc_NetWkstaGetInfo r;
16         TALLOC_CTX *mem_ctx = talloc_init("api_wkssvc_NetWkstaGetInfo");
17         
18         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
19                 talloc_free(mem_ctx);
20                 return False;
21         }
22         
23         pull = ndr_pull_init_blob(&blob, mem_ctx);
24         if (pull == NULL)
25                 return False;
26         
27         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
28         status = ndr_pull_wkssvc_NetWkstaGetInfo(pull, NDR_IN, &r);
29         if (NT_STATUS_IS_ERR(status)) {
30                 talloc_free(mem_ctx);
31                 return False;
32         }
33         
34         ZERO_STRUCT(r.out);
35         r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info));
36         if (r.out.info == NULL) {
37                 talloc_free(mem_ctx);
38                 return False;
39         }
40         
41         r.out.result = _wkssvc_NetWkstaGetInfo(p, r.in.server_name, r.in.level, r.out.info);
42         
43         push = ndr_push_init_ctx(mem_ctx);
44         if (push == NULL) {
45                 talloc_free(mem_ctx);
46                 return False;
47         }
48         
49         status = ndr_push_wkssvc_NetWkstaGetInfo(push, NDR_OUT, &r);
50         if (NT_STATUS_IS_ERR(status)) {
51                 talloc_free(mem_ctx);
52                 return False;
53         }
54         
55         blob = ndr_push_blob(push);
56         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
57                 talloc_free(mem_ctx);
58                 return False;
59         }
60         
61         talloc_free(mem_ctx);
62         
63         return True;
64 }
65
66 static BOOL api_wkssvc_NetWkstaSetInfo(pipes_struct *p)
67 {
68         struct ndr_pull *pull;
69         struct ndr_push *push;
70         NTSTATUS status;
71         DATA_BLOB blob;
72         struct wkssvc_NetWkstaSetInfo r;
73         TALLOC_CTX *mem_ctx = talloc_init("api_wkssvc_NetWkstaSetInfo");
74         
75         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
76                 talloc_free(mem_ctx);
77                 return False;
78         }
79         
80         pull = ndr_pull_init_blob(&blob, mem_ctx);
81         if (pull == NULL)
82                 return False;
83         
84         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
85         status = ndr_pull_wkssvc_NetWkstaSetInfo(pull, NDR_IN, &r);
86         if (NT_STATUS_IS_ERR(status)) {
87                 talloc_free(mem_ctx);
88                 return False;
89         }
90         
91         ZERO_STRUCT(r.out);
92         r.out.parm_error = r.in.parm_error;
93         r.out.result = _wkssvc_NetWkstaSetInfo(p, r.in.server_name, r.in.level, r.in.info, r.in.parm_error);
94         
95         push = ndr_push_init_ctx(mem_ctx);
96         if (push == NULL) {
97                 talloc_free(mem_ctx);
98                 return False;
99         }
100         
101         status = ndr_push_wkssvc_NetWkstaSetInfo(push, NDR_OUT, &r);
102         if (NT_STATUS_IS_ERR(status)) {
103                 talloc_free(mem_ctx);
104                 return False;
105         }
106         
107         blob = ndr_push_blob(push);
108         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
109                 talloc_free(mem_ctx);
110                 return False;
111         }
112         
113         talloc_free(mem_ctx);
114         
115         return True;
116 }
117
118 static BOOL api_wkssvc_NetWkstaEnumUsers(pipes_struct *p)
119 {
120         struct ndr_pull *pull;
121         struct ndr_push *push;
122         NTSTATUS status;
123         DATA_BLOB blob;
124         struct wkssvc_NetWkstaEnumUsers r;
125         TALLOC_CTX *mem_ctx = talloc_init("api_wkssvc_NetWkstaEnumUsers");
126         
127         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
128                 talloc_free(mem_ctx);
129                 return False;
130         }
131         
132         pull = ndr_pull_init_blob(&blob, mem_ctx);
133         if (pull == NULL)
134                 return False;
135         
136         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
137         status = ndr_pull_wkssvc_NetWkstaEnumUsers(pull, NDR_IN, &r);
138         if (NT_STATUS_IS_ERR(status)) {
139                 talloc_free(mem_ctx);
140                 return False;
141         }
142         
143         ZERO_STRUCT(r.out);
144         r.out.users = r.in.users;
145         r.out.entriesread = talloc_size(mem_ctx, sizeof(*r.out.entriesread));
146         if (r.out.entriesread == NULL) {
147                 talloc_free(mem_ctx);
148                 return False;
149         }
150         
151         r.out.totalentries = talloc_size(mem_ctx, sizeof(*r.out.totalentries));
152         if (r.out.totalentries == NULL) {
153                 talloc_free(mem_ctx);
154                 return False;
155         }
156         
157         r.out.resumehandle = r.in.resumehandle;
158         r.out.result = _wkssvc_NetWkstaEnumUsers(p, r.in.server_name, r.in.level, r.in.users, r.in.prefmaxlen, r.out.entriesread, r.out.totalentries, r.in.resumehandle);
159         
160         push = ndr_push_init_ctx(mem_ctx);
161         if (push == NULL) {
162                 talloc_free(mem_ctx);
163                 return False;
164         }
165         
166         status = ndr_push_wkssvc_NetWkstaEnumUsers(push, NDR_OUT, &r);
167         if (NT_STATUS_IS_ERR(status)) {
168                 talloc_free(mem_ctx);
169                 return False;
170         }
171         
172         blob = ndr_push_blob(push);
173         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
174                 talloc_free(mem_ctx);
175                 return False;
176         }
177         
178         talloc_free(mem_ctx);
179         
180         return True;
181 }
182
183 static BOOL api_WKSSVC_NETRWKSTAUSERGETINFO(pipes_struct *p)
184 {
185         struct ndr_pull *pull;
186         struct ndr_push *push;
187         NTSTATUS status;
188         DATA_BLOB blob;
189         struct WKSSVC_NETRWKSTAUSERGETINFO r;
190         TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRWKSTAUSERGETINFO");
191         
192         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
193                 talloc_free(mem_ctx);
194                 return False;
195         }
196         
197         pull = ndr_pull_init_blob(&blob, mem_ctx);
198         if (pull == NULL)
199                 return False;
200         
201         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
202         status = ndr_pull_WKSSVC_NETRWKSTAUSERGETINFO(pull, NDR_IN, &r);
203         if (NT_STATUS_IS_ERR(status)) {
204                 talloc_free(mem_ctx);
205                 return False;
206         }
207         
208         r.out.result = _WKSSVC_NETRWKSTAUSERGETINFO(p);
209         
210         push = ndr_push_init_ctx(mem_ctx);
211         if (push == NULL) {
212                 talloc_free(mem_ctx);
213                 return False;
214         }
215         
216         status = ndr_push_WKSSVC_NETRWKSTAUSERGETINFO(push, NDR_OUT, &r);
217         if (NT_STATUS_IS_ERR(status)) {
218                 talloc_free(mem_ctx);
219                 return False;
220         }
221         
222         blob = ndr_push_blob(push);
223         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
224                 talloc_free(mem_ctx);
225                 return False;
226         }
227         
228         talloc_free(mem_ctx);
229         
230         return True;
231 }
232
233 static BOOL api_WKSSVC_NETRWKSTAUSERSETINFO(pipes_struct *p)
234 {
235         struct ndr_pull *pull;
236         struct ndr_push *push;
237         NTSTATUS status;
238         DATA_BLOB blob;
239         struct WKSSVC_NETRWKSTAUSERSETINFO r;
240         TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRWKSTAUSERSETINFO");
241         
242         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
243                 talloc_free(mem_ctx);
244                 return False;
245         }
246         
247         pull = ndr_pull_init_blob(&blob, mem_ctx);
248         if (pull == NULL)
249                 return False;
250         
251         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
252         status = ndr_pull_WKSSVC_NETRWKSTAUSERSETINFO(pull, NDR_IN, &r);
253         if (NT_STATUS_IS_ERR(status)) {
254                 talloc_free(mem_ctx);
255                 return False;
256         }
257         
258         r.out.result = _WKSSVC_NETRWKSTAUSERSETINFO(p);
259         
260         push = ndr_push_init_ctx(mem_ctx);
261         if (push == NULL) {
262                 talloc_free(mem_ctx);
263                 return False;
264         }
265         
266         status = ndr_push_WKSSVC_NETRWKSTAUSERSETINFO(push, NDR_OUT, &r);
267         if (NT_STATUS_IS_ERR(status)) {
268                 talloc_free(mem_ctx);
269                 return False;
270         }
271         
272         blob = ndr_push_blob(push);
273         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
274                 talloc_free(mem_ctx);
275                 return False;
276         }
277         
278         talloc_free(mem_ctx);
279         
280         return True;
281 }
282
283 static BOOL api_wkssvc_NetWkstaTransportEnum(pipes_struct *p)
284 {
285         struct ndr_pull *pull;
286         struct ndr_push *push;
287         NTSTATUS status;
288         DATA_BLOB blob;
289         struct wkssvc_NetWkstaTransportEnum r;
290         TALLOC_CTX *mem_ctx = talloc_init("api_wkssvc_NetWkstaTransportEnum");
291         
292         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
293                 talloc_free(mem_ctx);
294                 return False;
295         }
296         
297         pull = ndr_pull_init_blob(&blob, mem_ctx);
298         if (pull == NULL)
299                 return False;
300         
301         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
302         status = ndr_pull_wkssvc_NetWkstaTransportEnum(pull, NDR_IN, &r);
303         if (NT_STATUS_IS_ERR(status)) {
304                 talloc_free(mem_ctx);
305                 return False;
306         }
307         
308         ZERO_STRUCT(r.out);
309         r.out.level = r.in.level;
310         r.out.ctr = r.in.ctr;
311         r.out.totalentries = talloc_size(mem_ctx, sizeof(*r.out.totalentries));
312         if (r.out.totalentries == NULL) {
313                 talloc_free(mem_ctx);
314                 return False;
315         }
316         
317         r.out.resume_handle = r.in.resume_handle;
318         r.out.result = _wkssvc_NetWkstaTransportEnum(p, r.in.server_name, r.in.level, r.in.ctr, r.in.max_buffer, r.out.totalentries, r.in.resume_handle);
319         
320         push = ndr_push_init_ctx(mem_ctx);
321         if (push == NULL) {
322                 talloc_free(mem_ctx);
323                 return False;
324         }
325         
326         status = ndr_push_wkssvc_NetWkstaTransportEnum(push, NDR_OUT, &r);
327         if (NT_STATUS_IS_ERR(status)) {
328                 talloc_free(mem_ctx);
329                 return False;
330         }
331         
332         blob = ndr_push_blob(push);
333         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
334                 talloc_free(mem_ctx);
335                 return False;
336         }
337         
338         talloc_free(mem_ctx);
339         
340         return True;
341 }
342
343 static BOOL api_WKSSVC_NETRWKSTATRANSPORTADD(pipes_struct *p)
344 {
345         struct ndr_pull *pull;
346         struct ndr_push *push;
347         NTSTATUS status;
348         DATA_BLOB blob;
349         struct WKSSVC_NETRWKSTATRANSPORTADD r;
350         TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRWKSTATRANSPORTADD");
351         
352         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
353                 talloc_free(mem_ctx);
354                 return False;
355         }
356         
357         pull = ndr_pull_init_blob(&blob, mem_ctx);
358         if (pull == NULL)
359                 return False;
360         
361         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
362         status = ndr_pull_WKSSVC_NETRWKSTATRANSPORTADD(pull, NDR_IN, &r);
363         if (NT_STATUS_IS_ERR(status)) {
364                 talloc_free(mem_ctx);
365                 return False;
366         }
367         
368         r.out.result = _WKSSVC_NETRWKSTATRANSPORTADD(p);
369         
370         push = ndr_push_init_ctx(mem_ctx);
371         if (push == NULL) {
372                 talloc_free(mem_ctx);
373                 return False;
374         }
375         
376         status = ndr_push_WKSSVC_NETRWKSTATRANSPORTADD(push, NDR_OUT, &r);
377         if (NT_STATUS_IS_ERR(status)) {
378                 talloc_free(mem_ctx);
379                 return False;
380         }
381         
382         blob = ndr_push_blob(push);
383         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
384                 talloc_free(mem_ctx);
385                 return False;
386         }
387         
388         talloc_free(mem_ctx);
389         
390         return True;
391 }
392
393 static BOOL api_WKSSVC_NETRWKSTATRANSPORTDEL(pipes_struct *p)
394 {
395         struct ndr_pull *pull;
396         struct ndr_push *push;
397         NTSTATUS status;
398         DATA_BLOB blob;
399         struct WKSSVC_NETRWKSTATRANSPORTDEL r;
400         TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRWKSTATRANSPORTDEL");
401         
402         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
403                 talloc_free(mem_ctx);
404                 return False;
405         }
406         
407         pull = ndr_pull_init_blob(&blob, mem_ctx);
408         if (pull == NULL)
409                 return False;
410         
411         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
412         status = ndr_pull_WKSSVC_NETRWKSTATRANSPORTDEL(pull, NDR_IN, &r);
413         if (NT_STATUS_IS_ERR(status)) {
414                 talloc_free(mem_ctx);
415                 return False;
416         }
417         
418         r.out.result = _WKSSVC_NETRWKSTATRANSPORTDEL(p);
419         
420         push = ndr_push_init_ctx(mem_ctx);
421         if (push == NULL) {
422                 talloc_free(mem_ctx);
423                 return False;
424         }
425         
426         status = ndr_push_WKSSVC_NETRWKSTATRANSPORTDEL(push, NDR_OUT, &r);
427         if (NT_STATUS_IS_ERR(status)) {
428                 talloc_free(mem_ctx);
429                 return False;
430         }
431         
432         blob = ndr_push_blob(push);
433         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
434                 talloc_free(mem_ctx);
435                 return False;
436         }
437         
438         talloc_free(mem_ctx);
439         
440         return True;
441 }
442
443 static BOOL api_WKSSVC_NETRUSEADD(pipes_struct *p)
444 {
445         struct ndr_pull *pull;
446         struct ndr_push *push;
447         NTSTATUS status;
448         DATA_BLOB blob;
449         struct WKSSVC_NETRUSEADD r;
450         TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRUSEADD");
451         
452         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
453                 talloc_free(mem_ctx);
454                 return False;
455         }
456         
457         pull = ndr_pull_init_blob(&blob, mem_ctx);
458         if (pull == NULL)
459                 return False;
460         
461         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
462         status = ndr_pull_WKSSVC_NETRUSEADD(pull, NDR_IN, &r);
463         if (NT_STATUS_IS_ERR(status)) {
464                 talloc_free(mem_ctx);
465                 return False;
466         }
467         
468         r.out.result = _WKSSVC_NETRUSEADD(p);
469         
470         push = ndr_push_init_ctx(mem_ctx);
471         if (push == NULL) {
472                 talloc_free(mem_ctx);
473                 return False;
474         }
475         
476         status = ndr_push_WKSSVC_NETRUSEADD(push, NDR_OUT, &r);
477         if (NT_STATUS_IS_ERR(status)) {
478                 talloc_free(mem_ctx);
479                 return False;
480         }
481         
482         blob = ndr_push_blob(push);
483         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
484                 talloc_free(mem_ctx);
485                 return False;
486         }
487         
488         talloc_free(mem_ctx);
489         
490         return True;
491 }
492
493 static BOOL api_WKSSVC_NETRUSEGETINFO(pipes_struct *p)
494 {
495         struct ndr_pull *pull;
496         struct ndr_push *push;
497         NTSTATUS status;
498         DATA_BLOB blob;
499         struct WKSSVC_NETRUSEGETINFO r;
500         TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRUSEGETINFO");
501         
502         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
503                 talloc_free(mem_ctx);
504                 return False;
505         }
506         
507         pull = ndr_pull_init_blob(&blob, mem_ctx);
508         if (pull == NULL)
509                 return False;
510         
511         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
512         status = ndr_pull_WKSSVC_NETRUSEGETINFO(pull, NDR_IN, &r);
513         if (NT_STATUS_IS_ERR(status)) {
514                 talloc_free(mem_ctx);
515                 return False;
516         }
517         
518         r.out.result = _WKSSVC_NETRUSEGETINFO(p);
519         
520         push = ndr_push_init_ctx(mem_ctx);
521         if (push == NULL) {
522                 talloc_free(mem_ctx);
523                 return False;
524         }
525         
526         status = ndr_push_WKSSVC_NETRUSEGETINFO(push, NDR_OUT, &r);
527         if (NT_STATUS_IS_ERR(status)) {
528                 talloc_free(mem_ctx);
529                 return False;
530         }
531         
532         blob = ndr_push_blob(push);
533         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
534                 talloc_free(mem_ctx);
535                 return False;
536         }
537         
538         talloc_free(mem_ctx);
539         
540         return True;
541 }
542
543 static BOOL api_WKSSVC_NETRUSEDEL(pipes_struct *p)
544 {
545         struct ndr_pull *pull;
546         struct ndr_push *push;
547         NTSTATUS status;
548         DATA_BLOB blob;
549         struct WKSSVC_NETRUSEDEL r;
550         TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRUSEDEL");
551         
552         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
553                 talloc_free(mem_ctx);
554                 return False;
555         }
556         
557         pull = ndr_pull_init_blob(&blob, mem_ctx);
558         if (pull == NULL)
559                 return False;
560         
561         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
562         status = ndr_pull_WKSSVC_NETRUSEDEL(pull, NDR_IN, &r);
563         if (NT_STATUS_IS_ERR(status)) {
564                 talloc_free(mem_ctx);
565                 return False;
566         }
567         
568         r.out.result = _WKSSVC_NETRUSEDEL(p);
569         
570         push = ndr_push_init_ctx(mem_ctx);
571         if (push == NULL) {
572                 talloc_free(mem_ctx);
573                 return False;
574         }
575         
576         status = ndr_push_WKSSVC_NETRUSEDEL(push, NDR_OUT, &r);
577         if (NT_STATUS_IS_ERR(status)) {
578                 talloc_free(mem_ctx);
579                 return False;
580         }
581         
582         blob = ndr_push_blob(push);
583         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
584                 talloc_free(mem_ctx);
585                 return False;
586         }
587         
588         talloc_free(mem_ctx);
589         
590         return True;
591 }
592
593 static BOOL api_WKSSVC_NETRUSEENUM(pipes_struct *p)
594 {
595         struct ndr_pull *pull;
596         struct ndr_push *push;
597         NTSTATUS status;
598         DATA_BLOB blob;
599         struct WKSSVC_NETRUSEENUM r;
600         TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRUSEENUM");
601         
602         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
603                 talloc_free(mem_ctx);
604                 return False;
605         }
606         
607         pull = ndr_pull_init_blob(&blob, mem_ctx);
608         if (pull == NULL)
609                 return False;
610         
611         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
612         status = ndr_pull_WKSSVC_NETRUSEENUM(pull, NDR_IN, &r);
613         if (NT_STATUS_IS_ERR(status)) {
614                 talloc_free(mem_ctx);
615                 return False;
616         }
617         
618         r.out.result = _WKSSVC_NETRUSEENUM(p);
619         
620         push = ndr_push_init_ctx(mem_ctx);
621         if (push == NULL) {
622                 talloc_free(mem_ctx);
623                 return False;
624         }
625         
626         status = ndr_push_WKSSVC_NETRUSEENUM(push, NDR_OUT, &r);
627         if (NT_STATUS_IS_ERR(status)) {
628                 talloc_free(mem_ctx);
629                 return False;
630         }
631         
632         blob = ndr_push_blob(push);
633         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
634                 talloc_free(mem_ctx);
635                 return False;
636         }
637         
638         talloc_free(mem_ctx);
639         
640         return True;
641 }
642
643 static BOOL api_WKSSVC_NETRMESSAGEBUFFERSEND(pipes_struct *p)
644 {
645         struct ndr_pull *pull;
646         struct ndr_push *push;
647         NTSTATUS status;
648         DATA_BLOB blob;
649         struct WKSSVC_NETRMESSAGEBUFFERSEND r;
650         TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRMESSAGEBUFFERSEND");
651         
652         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
653                 talloc_free(mem_ctx);
654                 return False;
655         }
656         
657         pull = ndr_pull_init_blob(&blob, mem_ctx);
658         if (pull == NULL)
659                 return False;
660         
661         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
662         status = ndr_pull_WKSSVC_NETRMESSAGEBUFFERSEND(pull, NDR_IN, &r);
663         if (NT_STATUS_IS_ERR(status)) {
664                 talloc_free(mem_ctx);
665                 return False;
666         }
667         
668         r.out.result = _WKSSVC_NETRMESSAGEBUFFERSEND(p);
669         
670         push = ndr_push_init_ctx(mem_ctx);
671         if (push == NULL) {
672                 talloc_free(mem_ctx);
673                 return False;
674         }
675         
676         status = ndr_push_WKSSVC_NETRMESSAGEBUFFERSEND(push, NDR_OUT, &r);
677         if (NT_STATUS_IS_ERR(status)) {
678                 talloc_free(mem_ctx);
679                 return False;
680         }
681         
682         blob = ndr_push_blob(push);
683         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
684                 talloc_free(mem_ctx);
685                 return False;
686         }
687         
688         talloc_free(mem_ctx);
689         
690         return True;
691 }
692
693 static BOOL api_WKSSVC_NETRWORKSTATIONSTATISTICSGET(pipes_struct *p)
694 {
695         struct ndr_pull *pull;
696         struct ndr_push *push;
697         NTSTATUS status;
698         DATA_BLOB blob;
699         struct WKSSVC_NETRWORKSTATIONSTATISTICSGET r;
700         TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRWORKSTATIONSTATISTICSGET");
701         
702         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
703                 talloc_free(mem_ctx);
704                 return False;
705         }
706         
707         pull = ndr_pull_init_blob(&blob, mem_ctx);
708         if (pull == NULL)
709                 return False;
710         
711         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
712         status = ndr_pull_WKSSVC_NETRWORKSTATIONSTATISTICSGET(pull, NDR_IN, &r);
713         if (NT_STATUS_IS_ERR(status)) {
714                 talloc_free(mem_ctx);
715                 return False;
716         }
717         
718         r.out.result = _WKSSVC_NETRWORKSTATIONSTATISTICSGET(p);
719         
720         push = ndr_push_init_ctx(mem_ctx);
721         if (push == NULL) {
722                 talloc_free(mem_ctx);
723                 return False;
724         }
725         
726         status = ndr_push_WKSSVC_NETRWORKSTATIONSTATISTICSGET(push, NDR_OUT, &r);
727         if (NT_STATUS_IS_ERR(status)) {
728                 talloc_free(mem_ctx);
729                 return False;
730         }
731         
732         blob = ndr_push_blob(push);
733         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
734                 talloc_free(mem_ctx);
735                 return False;
736         }
737         
738         talloc_free(mem_ctx);
739         
740         return True;
741 }
742
743 static BOOL api_WKSSVC_NETRLOGONDOMAINNAMEADD(pipes_struct *p)
744 {
745         struct ndr_pull *pull;
746         struct ndr_push *push;
747         NTSTATUS status;
748         DATA_BLOB blob;
749         struct WKSSVC_NETRLOGONDOMAINNAMEADD r;
750         TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRLOGONDOMAINNAMEADD");
751         
752         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
753                 talloc_free(mem_ctx);
754                 return False;
755         }
756         
757         pull = ndr_pull_init_blob(&blob, mem_ctx);
758         if (pull == NULL)
759                 return False;
760         
761         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
762         status = ndr_pull_WKSSVC_NETRLOGONDOMAINNAMEADD(pull, NDR_IN, &r);
763         if (NT_STATUS_IS_ERR(status)) {
764                 talloc_free(mem_ctx);
765                 return False;
766         }
767         
768         r.out.result = _WKSSVC_NETRLOGONDOMAINNAMEADD(p);
769         
770         push = ndr_push_init_ctx(mem_ctx);
771         if (push == NULL) {
772                 talloc_free(mem_ctx);
773                 return False;
774         }
775         
776         status = ndr_push_WKSSVC_NETRLOGONDOMAINNAMEADD(push, NDR_OUT, &r);
777         if (NT_STATUS_IS_ERR(status)) {
778                 talloc_free(mem_ctx);
779                 return False;
780         }
781         
782         blob = ndr_push_blob(push);
783         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
784                 talloc_free(mem_ctx);
785                 return False;
786         }
787         
788         talloc_free(mem_ctx);
789         
790         return True;
791 }
792
793 static BOOL api_WKSSVC_NETRLOGONDOMAINNAMEDEL(pipes_struct *p)
794 {
795         struct ndr_pull *pull;
796         struct ndr_push *push;
797         NTSTATUS status;
798         DATA_BLOB blob;
799         struct WKSSVC_NETRLOGONDOMAINNAMEDEL r;
800         TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRLOGONDOMAINNAMEDEL");
801         
802         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
803                 talloc_free(mem_ctx);
804                 return False;
805         }
806         
807         pull = ndr_pull_init_blob(&blob, mem_ctx);
808         if (pull == NULL)
809                 return False;
810         
811         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
812         status = ndr_pull_WKSSVC_NETRLOGONDOMAINNAMEDEL(pull, NDR_IN, &r);
813         if (NT_STATUS_IS_ERR(status)) {
814                 talloc_free(mem_ctx);
815                 return False;
816         }
817         
818         r.out.result = _WKSSVC_NETRLOGONDOMAINNAMEDEL(p);
819         
820         push = ndr_push_init_ctx(mem_ctx);
821         if (push == NULL) {
822                 talloc_free(mem_ctx);
823                 return False;
824         }
825         
826         status = ndr_push_WKSSVC_NETRLOGONDOMAINNAMEDEL(push, NDR_OUT, &r);
827         if (NT_STATUS_IS_ERR(status)) {
828                 talloc_free(mem_ctx);
829                 return False;
830         }
831         
832         blob = ndr_push_blob(push);
833         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
834                 talloc_free(mem_ctx);
835                 return False;
836         }
837         
838         talloc_free(mem_ctx);
839         
840         return True;
841 }
842
843 static BOOL api_WKSSVC_NETRJOINDOMAIN(pipes_struct *p)
844 {
845         struct ndr_pull *pull;
846         struct ndr_push *push;
847         NTSTATUS status;
848         DATA_BLOB blob;
849         struct WKSSVC_NETRJOINDOMAIN r;
850         TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRJOINDOMAIN");
851         
852         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
853                 talloc_free(mem_ctx);
854                 return False;
855         }
856         
857         pull = ndr_pull_init_blob(&blob, mem_ctx);
858         if (pull == NULL)
859                 return False;
860         
861         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
862         status = ndr_pull_WKSSVC_NETRJOINDOMAIN(pull, NDR_IN, &r);
863         if (NT_STATUS_IS_ERR(status)) {
864                 talloc_free(mem_ctx);
865                 return False;
866         }
867         
868         r.out.result = _WKSSVC_NETRJOINDOMAIN(p);
869         
870         push = ndr_push_init_ctx(mem_ctx);
871         if (push == NULL) {
872                 talloc_free(mem_ctx);
873                 return False;
874         }
875         
876         status = ndr_push_WKSSVC_NETRJOINDOMAIN(push, NDR_OUT, &r);
877         if (NT_STATUS_IS_ERR(status)) {
878                 talloc_free(mem_ctx);
879                 return False;
880         }
881         
882         blob = ndr_push_blob(push);
883         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
884                 talloc_free(mem_ctx);
885                 return False;
886         }
887         
888         talloc_free(mem_ctx);
889         
890         return True;
891 }
892
893 static BOOL api_WKSSVC_NETRUNJOINDOMAIN(pipes_struct *p)
894 {
895         struct ndr_pull *pull;
896         struct ndr_push *push;
897         NTSTATUS status;
898         DATA_BLOB blob;
899         struct WKSSVC_NETRUNJOINDOMAIN r;
900         TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRUNJOINDOMAIN");
901         
902         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
903                 talloc_free(mem_ctx);
904                 return False;
905         }
906         
907         pull = ndr_pull_init_blob(&blob, mem_ctx);
908         if (pull == NULL)
909                 return False;
910         
911         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
912         status = ndr_pull_WKSSVC_NETRUNJOINDOMAIN(pull, NDR_IN, &r);
913         if (NT_STATUS_IS_ERR(status)) {
914                 talloc_free(mem_ctx);
915                 return False;
916         }
917         
918         r.out.result = _WKSSVC_NETRUNJOINDOMAIN(p);
919         
920         push = ndr_push_init_ctx(mem_ctx);
921         if (push == NULL) {
922                 talloc_free(mem_ctx);
923                 return False;
924         }
925         
926         status = ndr_push_WKSSVC_NETRUNJOINDOMAIN(push, NDR_OUT, &r);
927         if (NT_STATUS_IS_ERR(status)) {
928                 talloc_free(mem_ctx);
929                 return False;
930         }
931         
932         blob = ndr_push_blob(push);
933         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
934                 talloc_free(mem_ctx);
935                 return False;
936         }
937         
938         talloc_free(mem_ctx);
939         
940         return True;
941 }
942
943 static BOOL api_WKSSVC_NETRRENAMEMACHINEINDOMAIN(pipes_struct *p)
944 {
945         struct ndr_pull *pull;
946         struct ndr_push *push;
947         NTSTATUS status;
948         DATA_BLOB blob;
949         struct WKSSVC_NETRRENAMEMACHINEINDOMAIN r;
950         TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRRENAMEMACHINEINDOMAIN");
951         
952         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
953                 talloc_free(mem_ctx);
954                 return False;
955         }
956         
957         pull = ndr_pull_init_blob(&blob, mem_ctx);
958         if (pull == NULL)
959                 return False;
960         
961         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
962         status = ndr_pull_WKSSVC_NETRRENAMEMACHINEINDOMAIN(pull, NDR_IN, &r);
963         if (NT_STATUS_IS_ERR(status)) {
964                 talloc_free(mem_ctx);
965                 return False;
966         }
967         
968         r.out.result = _WKSSVC_NETRRENAMEMACHINEINDOMAIN(p);
969         
970         push = ndr_push_init_ctx(mem_ctx);
971         if (push == NULL) {
972                 talloc_free(mem_ctx);
973                 return False;
974         }
975         
976         status = ndr_push_WKSSVC_NETRRENAMEMACHINEINDOMAIN(push, NDR_OUT, &r);
977         if (NT_STATUS_IS_ERR(status)) {
978                 talloc_free(mem_ctx);
979                 return False;
980         }
981         
982         blob = ndr_push_blob(push);
983         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
984                 talloc_free(mem_ctx);
985                 return False;
986         }
987         
988         talloc_free(mem_ctx);
989         
990         return True;
991 }
992
993 static BOOL api_WKSSVC_NETRVALIDATENAME(pipes_struct *p)
994 {
995         struct ndr_pull *pull;
996         struct ndr_push *push;
997         NTSTATUS status;
998         DATA_BLOB blob;
999         struct WKSSVC_NETRVALIDATENAME r;
1000         TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRVALIDATENAME");
1001         
1002         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1003                 talloc_free(mem_ctx);
1004                 return False;
1005         }
1006         
1007         pull = ndr_pull_init_blob(&blob, mem_ctx);
1008         if (pull == NULL)
1009                 return False;
1010         
1011         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1012         status = ndr_pull_WKSSVC_NETRVALIDATENAME(pull, NDR_IN, &r);
1013         if (NT_STATUS_IS_ERR(status)) {
1014                 talloc_free(mem_ctx);
1015                 return False;
1016         }
1017         
1018         r.out.result = _WKSSVC_NETRVALIDATENAME(p);
1019         
1020         push = ndr_push_init_ctx(mem_ctx);
1021         if (push == NULL) {
1022                 talloc_free(mem_ctx);
1023                 return False;
1024         }
1025         
1026         status = ndr_push_WKSSVC_NETRVALIDATENAME(push, NDR_OUT, &r);
1027         if (NT_STATUS_IS_ERR(status)) {
1028                 talloc_free(mem_ctx);
1029                 return False;
1030         }
1031         
1032         blob = ndr_push_blob(push);
1033         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1034                 talloc_free(mem_ctx);
1035                 return False;
1036         }
1037         
1038         talloc_free(mem_ctx);
1039         
1040         return True;
1041 }
1042
1043 static BOOL api_WKSSVC_NETRGETJOININFORMATION(pipes_struct *p)
1044 {
1045         struct ndr_pull *pull;
1046         struct ndr_push *push;
1047         NTSTATUS status;
1048         DATA_BLOB blob;
1049         struct WKSSVC_NETRGETJOININFORMATION r;
1050         TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRGETJOININFORMATION");
1051         
1052         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1053                 talloc_free(mem_ctx);
1054                 return False;
1055         }
1056         
1057         pull = ndr_pull_init_blob(&blob, mem_ctx);
1058         if (pull == NULL)
1059                 return False;
1060         
1061         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1062         status = ndr_pull_WKSSVC_NETRGETJOININFORMATION(pull, NDR_IN, &r);
1063         if (NT_STATUS_IS_ERR(status)) {
1064                 talloc_free(mem_ctx);
1065                 return False;
1066         }
1067         
1068         r.out.result = _WKSSVC_NETRGETJOININFORMATION(p);
1069         
1070         push = ndr_push_init_ctx(mem_ctx);
1071         if (push == NULL) {
1072                 talloc_free(mem_ctx);
1073                 return False;
1074         }
1075         
1076         status = ndr_push_WKSSVC_NETRGETJOININFORMATION(push, NDR_OUT, &r);
1077         if (NT_STATUS_IS_ERR(status)) {
1078                 talloc_free(mem_ctx);
1079                 return False;
1080         }
1081         
1082         blob = ndr_push_blob(push);
1083         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1084                 talloc_free(mem_ctx);
1085                 return False;
1086         }
1087         
1088         talloc_free(mem_ctx);
1089         
1090         return True;
1091 }
1092
1093 static BOOL api_WKSSVC_NETRGETJOINABLEOUS(pipes_struct *p)
1094 {
1095         struct ndr_pull *pull;
1096         struct ndr_push *push;
1097         NTSTATUS status;
1098         DATA_BLOB blob;
1099         struct WKSSVC_NETRGETJOINABLEOUS r;
1100         TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRGETJOINABLEOUS");
1101         
1102         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1103                 talloc_free(mem_ctx);
1104                 return False;
1105         }
1106         
1107         pull = ndr_pull_init_blob(&blob, mem_ctx);
1108         if (pull == NULL)
1109                 return False;
1110         
1111         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1112         status = ndr_pull_WKSSVC_NETRGETJOINABLEOUS(pull, NDR_IN, &r);
1113         if (NT_STATUS_IS_ERR(status)) {
1114                 talloc_free(mem_ctx);
1115                 return False;
1116         }
1117         
1118         r.out.result = _WKSSVC_NETRGETJOINABLEOUS(p);
1119         
1120         push = ndr_push_init_ctx(mem_ctx);
1121         if (push == NULL) {
1122                 talloc_free(mem_ctx);
1123                 return False;
1124         }
1125         
1126         status = ndr_push_WKSSVC_NETRGETJOINABLEOUS(push, NDR_OUT, &r);
1127         if (NT_STATUS_IS_ERR(status)) {
1128                 talloc_free(mem_ctx);
1129                 return False;
1130         }
1131         
1132         blob = ndr_push_blob(push);
1133         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1134                 talloc_free(mem_ctx);
1135                 return False;
1136         }
1137         
1138         talloc_free(mem_ctx);
1139         
1140         return True;
1141 }
1142
1143 static BOOL api_wkssvc_NetrJoinDomain2(pipes_struct *p)
1144 {
1145         struct ndr_pull *pull;
1146         struct ndr_push *push;
1147         NTSTATUS status;
1148         DATA_BLOB blob;
1149         struct wkssvc_NetrJoinDomain2 r;
1150         TALLOC_CTX *mem_ctx = talloc_init("api_wkssvc_NetrJoinDomain2");
1151         
1152         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1153                 talloc_free(mem_ctx);
1154                 return False;
1155         }
1156         
1157         pull = ndr_pull_init_blob(&blob, mem_ctx);
1158         if (pull == NULL)
1159                 return False;
1160         
1161         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1162         status = ndr_pull_wkssvc_NetrJoinDomain2(pull, NDR_IN, &r);
1163         if (NT_STATUS_IS_ERR(status)) {
1164                 talloc_free(mem_ctx);
1165                 return False;
1166         }
1167         
1168         r.out.result = _wkssvc_NetrJoinDomain2(p, r.in.server_name, r.in.domain_name, r.in.account_name, r.in.admin_account, r.in.encrypted_password, r.in.join_flags);
1169         
1170         push = ndr_push_init_ctx(mem_ctx);
1171         if (push == NULL) {
1172                 talloc_free(mem_ctx);
1173                 return False;
1174         }
1175         
1176         status = ndr_push_wkssvc_NetrJoinDomain2(push, NDR_OUT, &r);
1177         if (NT_STATUS_IS_ERR(status)) {
1178                 talloc_free(mem_ctx);
1179                 return False;
1180         }
1181         
1182         blob = ndr_push_blob(push);
1183         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1184                 talloc_free(mem_ctx);
1185                 return False;
1186         }
1187         
1188         talloc_free(mem_ctx);
1189         
1190         return True;
1191 }
1192
1193 static BOOL api_wkssvc_NetrUnjoinDomain2(pipes_struct *p)
1194 {
1195         struct ndr_pull *pull;
1196         struct ndr_push *push;
1197         NTSTATUS status;
1198         DATA_BLOB blob;
1199         struct wkssvc_NetrUnjoinDomain2 r;
1200         TALLOC_CTX *mem_ctx = talloc_init("api_wkssvc_NetrUnjoinDomain2");
1201         
1202         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1203                 talloc_free(mem_ctx);
1204                 return False;
1205         }
1206         
1207         pull = ndr_pull_init_blob(&blob, mem_ctx);
1208         if (pull == NULL)
1209                 return False;
1210         
1211         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1212         status = ndr_pull_wkssvc_NetrUnjoinDomain2(pull, NDR_IN, &r);
1213         if (NT_STATUS_IS_ERR(status)) {
1214                 talloc_free(mem_ctx);
1215                 return False;
1216         }
1217         
1218         r.out.result = _wkssvc_NetrUnjoinDomain2(p, r.in.server_name, r.in.account, r.in.encrypted_password, r.in.unjoin_flags);
1219         
1220         push = ndr_push_init_ctx(mem_ctx);
1221         if (push == NULL) {
1222                 talloc_free(mem_ctx);
1223                 return False;
1224         }
1225         
1226         status = ndr_push_wkssvc_NetrUnjoinDomain2(push, NDR_OUT, &r);
1227         if (NT_STATUS_IS_ERR(status)) {
1228                 talloc_free(mem_ctx);
1229                 return False;
1230         }
1231         
1232         blob = ndr_push_blob(push);
1233         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1234                 talloc_free(mem_ctx);
1235                 return False;
1236         }
1237         
1238         talloc_free(mem_ctx);
1239         
1240         return True;
1241 }
1242
1243 static BOOL api_wkssvc_NetrRenameMachineInDomain2(pipes_struct *p)
1244 {
1245         struct ndr_pull *pull;
1246         struct ndr_push *push;
1247         NTSTATUS status;
1248         DATA_BLOB blob;
1249         struct wkssvc_NetrRenameMachineInDomain2 r;
1250         TALLOC_CTX *mem_ctx = talloc_init("api_wkssvc_NetrRenameMachineInDomain2");
1251         
1252         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1253                 talloc_free(mem_ctx);
1254                 return False;
1255         }
1256         
1257         pull = ndr_pull_init_blob(&blob, mem_ctx);
1258         if (pull == NULL)
1259                 return False;
1260         
1261         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1262         status = ndr_pull_wkssvc_NetrRenameMachineInDomain2(pull, NDR_IN, &r);
1263         if (NT_STATUS_IS_ERR(status)) {
1264                 talloc_free(mem_ctx);
1265                 return False;
1266         }
1267         
1268         r.out.result = _wkssvc_NetrRenameMachineInDomain2(p, r.in.server_name, r.in.NewMachineName, r.in.Account, r.in.EncryptedPassword, r.in.RenameOptions);
1269         
1270         push = ndr_push_init_ctx(mem_ctx);
1271         if (push == NULL) {
1272                 talloc_free(mem_ctx);
1273                 return False;
1274         }
1275         
1276         status = ndr_push_wkssvc_NetrRenameMachineInDomain2(push, NDR_OUT, &r);
1277         if (NT_STATUS_IS_ERR(status)) {
1278                 talloc_free(mem_ctx);
1279                 return False;
1280         }
1281         
1282         blob = ndr_push_blob(push);
1283         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1284                 talloc_free(mem_ctx);
1285                 return False;
1286         }
1287         
1288         talloc_free(mem_ctx);
1289         
1290         return True;
1291 }
1292
1293 static BOOL api_WKSSVC_NETRVALIDATENAME2(pipes_struct *p)
1294 {
1295         struct ndr_pull *pull;
1296         struct ndr_push *push;
1297         NTSTATUS status;
1298         DATA_BLOB blob;
1299         struct WKSSVC_NETRVALIDATENAME2 r;
1300         TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRVALIDATENAME2");
1301         
1302         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1303                 talloc_free(mem_ctx);
1304                 return False;
1305         }
1306         
1307         pull = ndr_pull_init_blob(&blob, mem_ctx);
1308         if (pull == NULL)
1309                 return False;
1310         
1311         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1312         status = ndr_pull_WKSSVC_NETRVALIDATENAME2(pull, NDR_IN, &r);
1313         if (NT_STATUS_IS_ERR(status)) {
1314                 talloc_free(mem_ctx);
1315                 return False;
1316         }
1317         
1318         r.out.result = _WKSSVC_NETRVALIDATENAME2(p);
1319         
1320         push = ndr_push_init_ctx(mem_ctx);
1321         if (push == NULL) {
1322                 talloc_free(mem_ctx);
1323                 return False;
1324         }
1325         
1326         status = ndr_push_WKSSVC_NETRVALIDATENAME2(push, NDR_OUT, &r);
1327         if (NT_STATUS_IS_ERR(status)) {
1328                 talloc_free(mem_ctx);
1329                 return False;
1330         }
1331         
1332         blob = ndr_push_blob(push);
1333         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1334                 talloc_free(mem_ctx);
1335                 return False;
1336         }
1337         
1338         talloc_free(mem_ctx);
1339         
1340         return True;
1341 }
1342
1343 static BOOL api_WKSSVC_NETRGETJOINABLEOUS2(pipes_struct *p)
1344 {
1345         struct ndr_pull *pull;
1346         struct ndr_push *push;
1347         NTSTATUS status;
1348         DATA_BLOB blob;
1349         struct WKSSVC_NETRGETJOINABLEOUS2 r;
1350         TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRGETJOINABLEOUS2");
1351         
1352         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1353                 talloc_free(mem_ctx);
1354                 return False;
1355         }
1356         
1357         pull = ndr_pull_init_blob(&blob, mem_ctx);
1358         if (pull == NULL)
1359                 return False;
1360         
1361         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1362         status = ndr_pull_WKSSVC_NETRGETJOINABLEOUS2(pull, NDR_IN, &r);
1363         if (NT_STATUS_IS_ERR(status)) {
1364                 talloc_free(mem_ctx);
1365                 return False;
1366         }
1367         
1368         r.out.result = _WKSSVC_NETRGETJOINABLEOUS2(p);
1369         
1370         push = ndr_push_init_ctx(mem_ctx);
1371         if (push == NULL) {
1372                 talloc_free(mem_ctx);
1373                 return False;
1374         }
1375         
1376         status = ndr_push_WKSSVC_NETRGETJOINABLEOUS2(push, NDR_OUT, &r);
1377         if (NT_STATUS_IS_ERR(status)) {
1378                 talloc_free(mem_ctx);
1379                 return False;
1380         }
1381         
1382         blob = ndr_push_blob(push);
1383         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1384                 talloc_free(mem_ctx);
1385                 return False;
1386         }
1387         
1388         talloc_free(mem_ctx);
1389         
1390         return True;
1391 }
1392
1393 static BOOL api_wkssvc_NetrAddAlternateComputerName(pipes_struct *p)
1394 {
1395         struct ndr_pull *pull;
1396         struct ndr_push *push;
1397         NTSTATUS status;
1398         DATA_BLOB blob;
1399         struct wkssvc_NetrAddAlternateComputerName r;
1400         TALLOC_CTX *mem_ctx = talloc_init("api_wkssvc_NetrAddAlternateComputerName");
1401         
1402         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1403                 talloc_free(mem_ctx);
1404                 return False;
1405         }
1406         
1407         pull = ndr_pull_init_blob(&blob, mem_ctx);
1408         if (pull == NULL)
1409                 return False;
1410         
1411         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1412         status = ndr_pull_wkssvc_NetrAddAlternateComputerName(pull, NDR_IN, &r);
1413         if (NT_STATUS_IS_ERR(status)) {
1414                 talloc_free(mem_ctx);
1415                 return False;
1416         }
1417         
1418         r.out.result = _wkssvc_NetrAddAlternateComputerName(p, r.in.server_name, r.in.NewAlternateMachineName, r.in.Account, r.in.EncryptedPassword, r.in.Reserved);
1419         
1420         push = ndr_push_init_ctx(mem_ctx);
1421         if (push == NULL) {
1422                 talloc_free(mem_ctx);
1423                 return False;
1424         }
1425         
1426         status = ndr_push_wkssvc_NetrAddAlternateComputerName(push, NDR_OUT, &r);
1427         if (NT_STATUS_IS_ERR(status)) {
1428                 talloc_free(mem_ctx);
1429                 return False;
1430         }
1431         
1432         blob = ndr_push_blob(push);
1433         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1434                 talloc_free(mem_ctx);
1435                 return False;
1436         }
1437         
1438         talloc_free(mem_ctx);
1439         
1440         return True;
1441 }
1442
1443 static BOOL api_wkssvc_NetrRemoveAlternateComputerName(pipes_struct *p)
1444 {
1445         struct ndr_pull *pull;
1446         struct ndr_push *push;
1447         NTSTATUS status;
1448         DATA_BLOB blob;
1449         struct wkssvc_NetrRemoveAlternateComputerName r;
1450         TALLOC_CTX *mem_ctx = talloc_init("api_wkssvc_NetrRemoveAlternateComputerName");
1451         
1452         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1453                 talloc_free(mem_ctx);
1454                 return False;
1455         }
1456         
1457         pull = ndr_pull_init_blob(&blob, mem_ctx);
1458         if (pull == NULL)
1459                 return False;
1460         
1461         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1462         status = ndr_pull_wkssvc_NetrRemoveAlternateComputerName(pull, NDR_IN, &r);
1463         if (NT_STATUS_IS_ERR(status)) {
1464                 talloc_free(mem_ctx);
1465                 return False;
1466         }
1467         
1468         r.out.result = _wkssvc_NetrRemoveAlternateComputerName(p, r.in.server_name, r.in.AlternateMachineNameToRemove, r.in.Account, r.in.EncryptedPassword, r.in.Reserved);
1469         
1470         push = ndr_push_init_ctx(mem_ctx);
1471         if (push == NULL) {
1472                 talloc_free(mem_ctx);
1473                 return False;
1474         }
1475         
1476         status = ndr_push_wkssvc_NetrRemoveAlternateComputerName(push, NDR_OUT, &r);
1477         if (NT_STATUS_IS_ERR(status)) {
1478                 talloc_free(mem_ctx);
1479                 return False;
1480         }
1481         
1482         blob = ndr_push_blob(push);
1483         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1484                 talloc_free(mem_ctx);
1485                 return False;
1486         }
1487         
1488         talloc_free(mem_ctx);
1489         
1490         return True;
1491 }
1492
1493 static BOOL api_WKSSVC_NETRSETPRIMARYCOMPUTERNAME(pipes_struct *p)
1494 {
1495         struct ndr_pull *pull;
1496         struct ndr_push *push;
1497         NTSTATUS status;
1498         DATA_BLOB blob;
1499         struct WKSSVC_NETRSETPRIMARYCOMPUTERNAME r;
1500         TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRSETPRIMARYCOMPUTERNAME");
1501         
1502         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1503                 talloc_free(mem_ctx);
1504                 return False;
1505         }
1506         
1507         pull = ndr_pull_init_blob(&blob, mem_ctx);
1508         if (pull == NULL)
1509                 return False;
1510         
1511         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1512         status = ndr_pull_WKSSVC_NETRSETPRIMARYCOMPUTERNAME(pull, NDR_IN, &r);
1513         if (NT_STATUS_IS_ERR(status)) {
1514                 talloc_free(mem_ctx);
1515                 return False;
1516         }
1517         
1518         r.out.result = _WKSSVC_NETRSETPRIMARYCOMPUTERNAME(p);
1519         
1520         push = ndr_push_init_ctx(mem_ctx);
1521         if (push == NULL) {
1522                 talloc_free(mem_ctx);
1523                 return False;
1524         }
1525         
1526         status = ndr_push_WKSSVC_NETRSETPRIMARYCOMPUTERNAME(push, NDR_OUT, &r);
1527         if (NT_STATUS_IS_ERR(status)) {
1528                 talloc_free(mem_ctx);
1529                 return False;
1530         }
1531         
1532         blob = ndr_push_blob(push);
1533         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1534                 talloc_free(mem_ctx);
1535                 return False;
1536         }
1537         
1538         talloc_free(mem_ctx);
1539         
1540         return True;
1541 }
1542
1543 static BOOL api_WKSSVC_NETRENUMERATECOMPUTERNAMES(pipes_struct *p)
1544 {
1545         struct ndr_pull *pull;
1546         struct ndr_push *push;
1547         NTSTATUS status;
1548         DATA_BLOB blob;
1549         struct WKSSVC_NETRENUMERATECOMPUTERNAMES r;
1550         TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRENUMERATECOMPUTERNAMES");
1551         
1552         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1553                 talloc_free(mem_ctx);
1554                 return False;
1555         }
1556         
1557         pull = ndr_pull_init_blob(&blob, mem_ctx);
1558         if (pull == NULL)
1559                 return False;
1560         
1561         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1562         status = ndr_pull_WKSSVC_NETRENUMERATECOMPUTERNAMES(pull, NDR_IN, &r);
1563         if (NT_STATUS_IS_ERR(status)) {
1564                 talloc_free(mem_ctx);
1565                 return False;
1566         }
1567         
1568         r.out.result = _WKSSVC_NETRENUMERATECOMPUTERNAMES(p);
1569         
1570         push = ndr_push_init_ctx(mem_ctx);
1571         if (push == NULL) {
1572                 talloc_free(mem_ctx);
1573                 return False;
1574         }
1575         
1576         status = ndr_push_WKSSVC_NETRENUMERATECOMPUTERNAMES(push, NDR_OUT, &r);
1577         if (NT_STATUS_IS_ERR(status)) {
1578                 talloc_free(mem_ctx);
1579                 return False;
1580         }
1581         
1582         blob = ndr_push_blob(push);
1583         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1584                 talloc_free(mem_ctx);
1585                 return False;
1586         }
1587         
1588         talloc_free(mem_ctx);
1589         
1590         return True;
1591 }
1592
1593
1594 /* Tables */
1595 static struct api_struct api_wkssvc_cmds[] = 
1596 {
1597         {"WKSSVC_NETWKSTAGETINFO", DCERPC_WKSSVC_NETWKSTAGETINFO, api_wkssvc_NetWkstaGetInfo},
1598         {"WKSSVC_NETWKSTASETINFO", DCERPC_WKSSVC_NETWKSTASETINFO, api_wkssvc_NetWkstaSetInfo},
1599         {"WKSSVC_NETWKSTAENUMUSERS", DCERPC_WKSSVC_NETWKSTAENUMUSERS, api_wkssvc_NetWkstaEnumUsers},
1600         {"WKSSVC_NETRWKSTAUSERGETINFO", DCERPC_WKSSVC_NETRWKSTAUSERGETINFO, api_WKSSVC_NETRWKSTAUSERGETINFO},
1601         {"WKSSVC_NETRWKSTAUSERSETINFO", DCERPC_WKSSVC_NETRWKSTAUSERSETINFO, api_WKSSVC_NETRWKSTAUSERSETINFO},
1602         {"WKSSVC_NETWKSTATRANSPORTENUM", DCERPC_WKSSVC_NETWKSTATRANSPORTENUM, api_wkssvc_NetWkstaTransportEnum},
1603         {"WKSSVC_NETRWKSTATRANSPORTADD", DCERPC_WKSSVC_NETRWKSTATRANSPORTADD, api_WKSSVC_NETRWKSTATRANSPORTADD},
1604         {"WKSSVC_NETRWKSTATRANSPORTDEL", DCERPC_WKSSVC_NETRWKSTATRANSPORTDEL, api_WKSSVC_NETRWKSTATRANSPORTDEL},
1605         {"WKSSVC_NETRUSEADD", DCERPC_WKSSVC_NETRUSEADD, api_WKSSVC_NETRUSEADD},
1606         {"WKSSVC_NETRUSEGETINFO", DCERPC_WKSSVC_NETRUSEGETINFO, api_WKSSVC_NETRUSEGETINFO},
1607         {"WKSSVC_NETRUSEDEL", DCERPC_WKSSVC_NETRUSEDEL, api_WKSSVC_NETRUSEDEL},
1608         {"WKSSVC_NETRUSEENUM", DCERPC_WKSSVC_NETRUSEENUM, api_WKSSVC_NETRUSEENUM},
1609         {"WKSSVC_NETRMESSAGEBUFFERSEND", DCERPC_WKSSVC_NETRMESSAGEBUFFERSEND, api_WKSSVC_NETRMESSAGEBUFFERSEND},
1610         {"WKSSVC_NETRWORKSTATIONSTATISTICSGET", DCERPC_WKSSVC_NETRWORKSTATIONSTATISTICSGET, api_WKSSVC_NETRWORKSTATIONSTATISTICSGET},
1611         {"WKSSVC_NETRLOGONDOMAINNAMEADD", DCERPC_WKSSVC_NETRLOGONDOMAINNAMEADD, api_WKSSVC_NETRLOGONDOMAINNAMEADD},
1612         {"WKSSVC_NETRLOGONDOMAINNAMEDEL", DCERPC_WKSSVC_NETRLOGONDOMAINNAMEDEL, api_WKSSVC_NETRLOGONDOMAINNAMEDEL},
1613         {"WKSSVC_NETRJOINDOMAIN", DCERPC_WKSSVC_NETRJOINDOMAIN, api_WKSSVC_NETRJOINDOMAIN},
1614         {"WKSSVC_NETRUNJOINDOMAIN", DCERPC_WKSSVC_NETRUNJOINDOMAIN, api_WKSSVC_NETRUNJOINDOMAIN},
1615         {"WKSSVC_NETRRENAMEMACHINEINDOMAIN", DCERPC_WKSSVC_NETRRENAMEMACHINEINDOMAIN, api_WKSSVC_NETRRENAMEMACHINEINDOMAIN},
1616         {"WKSSVC_NETRVALIDATENAME", DCERPC_WKSSVC_NETRVALIDATENAME, api_WKSSVC_NETRVALIDATENAME},
1617         {"WKSSVC_NETRGETJOININFORMATION", DCERPC_WKSSVC_NETRGETJOININFORMATION, api_WKSSVC_NETRGETJOININFORMATION},
1618         {"WKSSVC_NETRGETJOINABLEOUS", DCERPC_WKSSVC_NETRGETJOINABLEOUS, api_WKSSVC_NETRGETJOINABLEOUS},
1619         {"WKSSVC_NETRJOINDOMAIN2", DCERPC_WKSSVC_NETRJOINDOMAIN2, api_wkssvc_NetrJoinDomain2},
1620         {"WKSSVC_NETRUNJOINDOMAIN2", DCERPC_WKSSVC_NETRUNJOINDOMAIN2, api_wkssvc_NetrUnjoinDomain2},
1621         {"WKSSVC_NETRRENAMEMACHINEINDOMAIN2", DCERPC_WKSSVC_NETRRENAMEMACHINEINDOMAIN2, api_wkssvc_NetrRenameMachineInDomain2},
1622         {"WKSSVC_NETRVALIDATENAME2", DCERPC_WKSSVC_NETRVALIDATENAME2, api_WKSSVC_NETRVALIDATENAME2},
1623         {"WKSSVC_NETRGETJOINABLEOUS2", DCERPC_WKSSVC_NETRGETJOINABLEOUS2, api_WKSSVC_NETRGETJOINABLEOUS2},
1624         {"WKSSVC_NETRADDALTERNATECOMPUTERNAME", DCERPC_WKSSVC_NETRADDALTERNATECOMPUTERNAME, api_wkssvc_NetrAddAlternateComputerName},
1625         {"WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME", DCERPC_WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME, api_wkssvc_NetrRemoveAlternateComputerName},
1626         {"WKSSVC_NETRSETPRIMARYCOMPUTERNAME", DCERPC_WKSSVC_NETRSETPRIMARYCOMPUTERNAME, api_WKSSVC_NETRSETPRIMARYCOMPUTERNAME},
1627         {"WKSSVC_NETRENUMERATECOMPUTERNAMES", DCERPC_WKSSVC_NETRENUMERATECOMPUTERNAMES, api_WKSSVC_NETRENUMERATECOMPUTERNAMES},
1628 };
1629
1630 void wkssvc_get_pipe_fns(struct api_struct **fns, int *n_fns)
1631 {
1632         *fns = api_wkssvc_cmds;
1633         *n_fns = sizeof(api_wkssvc_cmds) / sizeof(struct api_struct);
1634 }
1635
1636 NTSTATUS rpc_wkssvc_init(void)
1637 {
1638         return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "wkssvc", "wkssvc", api_wkssvc_cmds, sizeof(api_wkssvc_cmds) / sizeof(struct api_struct));
1639 }