2
* Unix SMB/CIFS implementation.
3
* server auto-generated by pidl. DO NOT MODIFY!
8
#include "librpc/gen_ndr/srv_dcom.h"
10
static bool api_UseProtSeq(struct pipes_struct *p)
12
const struct ndr_interface_call *call;
13
struct ndr_pull *pull;
14
struct ndr_push *push;
15
enum ndr_err_code ndr_err;
18
call = &ndr_table_dcom_Unknown.calls[NDR_USEPROTSEQ];
20
r = talloc(talloc_tos(), struct UseProtSeq);
25
pull = ndr_pull_init_blob(&p->in_data.data, r);
31
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
33
pull->flags |= LIBNDR_FLAG_BIGENDIAN;
35
ndr_err = call->ndr_pull(pull, NDR_IN, r);
36
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
41
if (DEBUGLEVEL >= 10) {
42
NDR_PRINT_FUNCTION_DEBUG(UseProtSeq, NDR_IN, r);
47
if (p->rng_fault_state) {
49
/* Return true here, srv_pipe_hnd.c will take care */
53
if (DEBUGLEVEL >= 10) {
54
NDR_PRINT_FUNCTION_DEBUG(UseProtSeq, NDR_OUT | NDR_SET_VALUES, r);
57
push = ndr_push_init_ctx(r);
64
* carry over the pointer count to the reply in case we are
65
* using full pointer. See NDR specification for full pointers
67
push->ptr_count = pull->ptr_count;
69
ndr_err = call->ndr_push(push, NDR_OUT, r);
70
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
75
p->out_data.rdata = ndr_push_blob(push);
76
talloc_steal(p->mem_ctx, p->out_data.rdata.data);
83
static bool api_GetCustomProtseqInfo(struct pipes_struct *p)
85
const struct ndr_interface_call *call;
86
struct ndr_pull *pull;
87
struct ndr_push *push;
88
enum ndr_err_code ndr_err;
89
struct GetCustomProtseqInfo *r;
91
call = &ndr_table_dcom_Unknown.calls[NDR_GETCUSTOMPROTSEQINFO];
93
r = talloc(talloc_tos(), struct GetCustomProtseqInfo);
98
pull = ndr_pull_init_blob(&p->in_data.data, r);
104
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
106
pull->flags |= LIBNDR_FLAG_BIGENDIAN;
108
ndr_err = call->ndr_pull(pull, NDR_IN, r);
109
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
114
if (DEBUGLEVEL >= 10) {
115
NDR_PRINT_FUNCTION_DEBUG(GetCustomProtseqInfo, NDR_IN, r);
118
_GetCustomProtseqInfo(p, r);
120
if (p->rng_fault_state) {
122
/* Return true here, srv_pipe_hnd.c will take care */
126
if (DEBUGLEVEL >= 10) {
127
NDR_PRINT_FUNCTION_DEBUG(GetCustomProtseqInfo, NDR_OUT | NDR_SET_VALUES, r);
130
push = ndr_push_init_ctx(r);
137
* carry over the pointer count to the reply in case we are
138
* using full pointer. See NDR specification for full pointers
140
push->ptr_count = pull->ptr_count;
142
ndr_err = call->ndr_push(push, NDR_OUT, r);
143
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
148
p->out_data.rdata = ndr_push_blob(push);
149
talloc_steal(p->mem_ctx, p->out_data.rdata.data);
156
static bool api_UpdateResolverBindings(struct pipes_struct *p)
158
const struct ndr_interface_call *call;
159
struct ndr_pull *pull;
160
struct ndr_push *push;
161
enum ndr_err_code ndr_err;
162
struct UpdateResolverBindings *r;
164
call = &ndr_table_dcom_Unknown.calls[NDR_UPDATERESOLVERBINDINGS];
166
r = talloc(talloc_tos(), struct UpdateResolverBindings);
171
pull = ndr_pull_init_blob(&p->in_data.data, r);
177
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
179
pull->flags |= LIBNDR_FLAG_BIGENDIAN;
181
ndr_err = call->ndr_pull(pull, NDR_IN, r);
182
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
187
if (DEBUGLEVEL >= 10) {
188
NDR_PRINT_FUNCTION_DEBUG(UpdateResolverBindings, NDR_IN, r);
191
_UpdateResolverBindings(p, r);
193
if (p->rng_fault_state) {
195
/* Return true here, srv_pipe_hnd.c will take care */
199
if (DEBUGLEVEL >= 10) {
200
NDR_PRINT_FUNCTION_DEBUG(UpdateResolverBindings, NDR_OUT | NDR_SET_VALUES, r);
203
push = ndr_push_init_ctx(r);
210
* carry over the pointer count to the reply in case we are
211
* using full pointer. See NDR specification for full pointers
213
push->ptr_count = pull->ptr_count;
215
ndr_err = call->ndr_push(push, NDR_OUT, r);
216
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
221
p->out_data.rdata = ndr_push_blob(push);
222
talloc_steal(p->mem_ctx, p->out_data.rdata.data);
231
static struct api_struct api_dcom_Unknown_cmds[] =
233
{"USEPROTSEQ", NDR_USEPROTSEQ, api_UseProtSeq},
234
{"GETCUSTOMPROTSEQINFO", NDR_GETCUSTOMPROTSEQINFO, api_GetCustomProtseqInfo},
235
{"UPDATERESOLVERBINDINGS", NDR_UPDATERESOLVERBINDINGS, api_UpdateResolverBindings},
238
void dcom_Unknown_get_pipe_fns(struct api_struct **fns, int *n_fns)
240
*fns = api_dcom_Unknown_cmds;
241
*n_fns = sizeof(api_dcom_Unknown_cmds) / sizeof(struct api_struct);
244
NTSTATUS rpc_dcom_Unknown_init(const struct rpc_srv_callbacks *rpc_srv_cb)
246
return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "dcom_Unknown", "dcom_Unknown", &ndr_table_dcom_Unknown, api_dcom_Unknown_cmds, sizeof(api_dcom_Unknown_cmds) / sizeof(struct api_struct), rpc_srv_cb);
249
NTSTATUS rpc_dcom_Unknown_shutdown(void)
251
return rpc_srv_unregister(&ndr_table_dcom_Unknown);
253
static bool api_QueryInterface(struct pipes_struct *p)
255
const struct ndr_interface_call *call;
256
struct ndr_pull *pull;
257
struct ndr_push *push;
258
enum ndr_err_code ndr_err;
259
struct QueryInterface *r;
261
call = &ndr_table_IUnknown.calls[NDR_QUERYINTERFACE];
263
r = talloc(talloc_tos(), struct QueryInterface);
268
pull = ndr_pull_init_blob(&p->in_data.data, r);
274
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
276
pull->flags |= LIBNDR_FLAG_BIGENDIAN;
278
ndr_err = call->ndr_pull(pull, NDR_IN, r);
279
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
284
if (DEBUGLEVEL >= 10) {
285
NDR_PRINT_FUNCTION_DEBUG(QueryInterface, NDR_IN, r);
289
r->out.ORPCthat = talloc_zero(r, struct ORPCTHAT);
290
if (r->out.ORPCthat == NULL) {
295
r->out.data = talloc_zero(r, struct MInterfacePointer *);
296
if (r->out.data == NULL) {
301
r->out.result = _QueryInterface(p, r);
303
if (p->rng_fault_state) {
305
/* Return true here, srv_pipe_hnd.c will take care */
309
if (DEBUGLEVEL >= 10) {
310
NDR_PRINT_FUNCTION_DEBUG(QueryInterface, NDR_OUT | NDR_SET_VALUES, r);
313
push = ndr_push_init_ctx(r);
320
* carry over the pointer count to the reply in case we are
321
* using full pointer. See NDR specification for full pointers
323
push->ptr_count = pull->ptr_count;
325
ndr_err = call->ndr_push(push, NDR_OUT, r);
326
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
331
p->out_data.rdata = ndr_push_blob(push);
332
talloc_steal(p->mem_ctx, p->out_data.rdata.data);
339
static bool api_AddRef(struct pipes_struct *p)
341
const struct ndr_interface_call *call;
342
struct ndr_pull *pull;
343
struct ndr_push *push;
344
enum ndr_err_code ndr_err;
347
call = &ndr_table_IUnknown.calls[NDR_ADDREF];
349
r = talloc(talloc_tos(), struct AddRef);
354
pull = ndr_pull_init_blob(&p->in_data.data, r);
360
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
362
pull->flags |= LIBNDR_FLAG_BIGENDIAN;
364
ndr_err = call->ndr_pull(pull, NDR_IN, r);
365
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
370
if (DEBUGLEVEL >= 10) {
371
NDR_PRINT_FUNCTION_DEBUG(AddRef, NDR_IN, r);
375
r->out.ORPCthat = talloc_zero(r, struct ORPCTHAT);
376
if (r->out.ORPCthat == NULL) {
381
r->out.result = _AddRef(p, r);
383
if (p->rng_fault_state) {
385
/* Return true here, srv_pipe_hnd.c will take care */
389
if (DEBUGLEVEL >= 10) {
390
NDR_PRINT_FUNCTION_DEBUG(AddRef, NDR_OUT | NDR_SET_VALUES, r);
393
push = ndr_push_init_ctx(r);
400
* carry over the pointer count to the reply in case we are
401
* using full pointer. See NDR specification for full pointers
403
push->ptr_count = pull->ptr_count;
405
ndr_err = call->ndr_push(push, NDR_OUT, r);
406
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
411
p->out_data.rdata = ndr_push_blob(push);
412
talloc_steal(p->mem_ctx, p->out_data.rdata.data);
419
static bool api_Release(struct pipes_struct *p)
421
const struct ndr_interface_call *call;
422
struct ndr_pull *pull;
423
struct ndr_push *push;
424
enum ndr_err_code ndr_err;
427
call = &ndr_table_IUnknown.calls[NDR_RELEASE];
429
r = talloc(talloc_tos(), struct Release);
434
pull = ndr_pull_init_blob(&p->in_data.data, r);
440
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
442
pull->flags |= LIBNDR_FLAG_BIGENDIAN;
444
ndr_err = call->ndr_pull(pull, NDR_IN, r);
445
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
450
if (DEBUGLEVEL >= 10) {
451
NDR_PRINT_FUNCTION_DEBUG(Release, NDR_IN, r);
455
r->out.ORPCthat = talloc_zero(r, struct ORPCTHAT);
456
if (r->out.ORPCthat == NULL) {
461
r->out.result = _Release(p, r);
463
if (p->rng_fault_state) {
465
/* Return true here, srv_pipe_hnd.c will take care */
469
if (DEBUGLEVEL >= 10) {
470
NDR_PRINT_FUNCTION_DEBUG(Release, NDR_OUT | NDR_SET_VALUES, r);
473
push = ndr_push_init_ctx(r);
480
* carry over the pointer count to the reply in case we are
481
* using full pointer. See NDR specification for full pointers
483
push->ptr_count = pull->ptr_count;
485
ndr_err = call->ndr_push(push, NDR_OUT, r);
486
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
491
p->out_data.rdata = ndr_push_blob(push);
492
talloc_steal(p->mem_ctx, p->out_data.rdata.data);
501
static struct api_struct api_IUnknown_cmds[] =
503
{"QUERYINTERFACE", NDR_QUERYINTERFACE, api_QueryInterface},
504
{"ADDREF", NDR_ADDREF, api_AddRef},
505
{"RELEASE", NDR_RELEASE, api_Release},
508
void IUnknown_get_pipe_fns(struct api_struct **fns, int *n_fns)
510
*fns = api_IUnknown_cmds;
511
*n_fns = sizeof(api_IUnknown_cmds) / sizeof(struct api_struct);
514
NTSTATUS rpc_IUnknown_init(const struct rpc_srv_callbacks *rpc_srv_cb)
516
return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "IUnknown", "IUnknown", &ndr_table_IUnknown, api_IUnknown_cmds, sizeof(api_IUnknown_cmds) / sizeof(struct api_struct), rpc_srv_cb);
519
NTSTATUS rpc_IUnknown_shutdown(void)
521
return rpc_srv_unregister(&ndr_table_IUnknown);
523
static bool api_CreateInstance(struct pipes_struct *p)
525
const struct ndr_interface_call *call;
526
struct ndr_pull *pull;
527
struct ndr_push *push;
528
enum ndr_err_code ndr_err;
529
struct CreateInstance *r;
531
call = &ndr_table_IClassFactory.calls[NDR_CREATEINSTANCE];
533
r = talloc(talloc_tos(), struct CreateInstance);
538
pull = ndr_pull_init_blob(&p->in_data.data, r);
544
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
546
pull->flags |= LIBNDR_FLAG_BIGENDIAN;
548
ndr_err = call->ndr_pull(pull, NDR_IN, r);
549
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
554
if (DEBUGLEVEL >= 10) {
555
NDR_PRINT_FUNCTION_DEBUG(CreateInstance, NDR_IN, r);
559
r->out.ORPCthat = talloc_zero(r, struct ORPCTHAT);
560
if (r->out.ORPCthat == NULL) {
565
r->out.ppv = talloc_zero(r, struct MInterfacePointer);
566
if (r->out.ppv == NULL) {
571
r->out.result = _CreateInstance(p, r);
573
if (p->rng_fault_state) {
575
/* Return true here, srv_pipe_hnd.c will take care */
579
if (DEBUGLEVEL >= 10) {
580
NDR_PRINT_FUNCTION_DEBUG(CreateInstance, NDR_OUT | NDR_SET_VALUES, r);
583
push = ndr_push_init_ctx(r);
590
* carry over the pointer count to the reply in case we are
591
* using full pointer. See NDR specification for full pointers
593
push->ptr_count = pull->ptr_count;
595
ndr_err = call->ndr_push(push, NDR_OUT, r);
596
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
601
p->out_data.rdata = ndr_push_blob(push);
602
talloc_steal(p->mem_ctx, p->out_data.rdata.data);
609
static bool api_RemoteCreateInstance(struct pipes_struct *p)
611
const struct ndr_interface_call *call;
612
struct ndr_pull *pull;
613
struct ndr_push *push;
614
enum ndr_err_code ndr_err;
615
struct RemoteCreateInstance *r;
617
call = &ndr_table_IClassFactory.calls[NDR_REMOTECREATEINSTANCE];
619
r = talloc(talloc_tos(), struct RemoteCreateInstance);
624
pull = ndr_pull_init_blob(&p->in_data.data, r);
630
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
632
pull->flags |= LIBNDR_FLAG_BIGENDIAN;
634
ndr_err = call->ndr_pull(pull, NDR_IN, r);
635
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
640
if (DEBUGLEVEL >= 10) {
641
NDR_PRINT_FUNCTION_DEBUG(RemoteCreateInstance, NDR_IN, r);
645
r->out.ORPCthat = talloc_zero(r, struct ORPCTHAT);
646
if (r->out.ORPCthat == NULL) {
651
r->out.result = _RemoteCreateInstance(p, r);
653
if (p->rng_fault_state) {
655
/* Return true here, srv_pipe_hnd.c will take care */
659
if (DEBUGLEVEL >= 10) {
660
NDR_PRINT_FUNCTION_DEBUG(RemoteCreateInstance, NDR_OUT | NDR_SET_VALUES, r);
663
push = ndr_push_init_ctx(r);
670
* carry over the pointer count to the reply in case we are
671
* using full pointer. See NDR specification for full pointers
673
push->ptr_count = pull->ptr_count;
675
ndr_err = call->ndr_push(push, NDR_OUT, r);
676
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
681
p->out_data.rdata = ndr_push_blob(push);
682
talloc_steal(p->mem_ctx, p->out_data.rdata.data);
689
static bool api_LockServer(struct pipes_struct *p)
691
const struct ndr_interface_call *call;
692
struct ndr_pull *pull;
693
struct ndr_push *push;
694
enum ndr_err_code ndr_err;
695
struct LockServer *r;
697
call = &ndr_table_IClassFactory.calls[NDR_LOCKSERVER];
699
r = talloc(talloc_tos(), struct LockServer);
704
pull = ndr_pull_init_blob(&p->in_data.data, r);
710
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
712
pull->flags |= LIBNDR_FLAG_BIGENDIAN;
714
ndr_err = call->ndr_pull(pull, NDR_IN, r);
715
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
720
if (DEBUGLEVEL >= 10) {
721
NDR_PRINT_FUNCTION_DEBUG(LockServer, NDR_IN, r);
725
r->out.ORPCthat = talloc_zero(r, struct ORPCTHAT);
726
if (r->out.ORPCthat == NULL) {
731
r->out.result = _LockServer(p, r);
733
if (p->rng_fault_state) {
735
/* Return true here, srv_pipe_hnd.c will take care */
739
if (DEBUGLEVEL >= 10) {
740
NDR_PRINT_FUNCTION_DEBUG(LockServer, NDR_OUT | NDR_SET_VALUES, r);
743
push = ndr_push_init_ctx(r);
750
* carry over the pointer count to the reply in case we are
751
* using full pointer. See NDR specification for full pointers
753
push->ptr_count = pull->ptr_count;
755
ndr_err = call->ndr_push(push, NDR_OUT, r);
756
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
761
p->out_data.rdata = ndr_push_blob(push);
762
talloc_steal(p->mem_ctx, p->out_data.rdata.data);
769
static bool api_RemoteLockServer(struct pipes_struct *p)
771
const struct ndr_interface_call *call;
772
struct ndr_pull *pull;
773
struct ndr_push *push;
774
enum ndr_err_code ndr_err;
775
struct RemoteLockServer *r;
777
call = &ndr_table_IClassFactory.calls[NDR_REMOTELOCKSERVER];
779
r = talloc(talloc_tos(), struct RemoteLockServer);
784
pull = ndr_pull_init_blob(&p->in_data.data, r);
790
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
792
pull->flags |= LIBNDR_FLAG_BIGENDIAN;
794
ndr_err = call->ndr_pull(pull, NDR_IN, r);
795
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
800
if (DEBUGLEVEL >= 10) {
801
NDR_PRINT_FUNCTION_DEBUG(RemoteLockServer, NDR_IN, r);
805
r->out.ORPCthat = talloc_zero(r, struct ORPCTHAT);
806
if (r->out.ORPCthat == NULL) {
811
r->out.result = _RemoteLockServer(p, r);
813
if (p->rng_fault_state) {
815
/* Return true here, srv_pipe_hnd.c will take care */
819
if (DEBUGLEVEL >= 10) {
820
NDR_PRINT_FUNCTION_DEBUG(RemoteLockServer, NDR_OUT | NDR_SET_VALUES, r);
823
push = ndr_push_init_ctx(r);
830
* carry over the pointer count to the reply in case we are
831
* using full pointer. See NDR specification for full pointers
833
push->ptr_count = pull->ptr_count;
835
ndr_err = call->ndr_push(push, NDR_OUT, r);
836
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
841
p->out_data.rdata = ndr_push_blob(push);
842
talloc_steal(p->mem_ctx, p->out_data.rdata.data);
851
static struct api_struct api_IClassFactory_cmds[] =
853
{"CREATEINSTANCE", NDR_CREATEINSTANCE, api_CreateInstance},
854
{"REMOTECREATEINSTANCE", NDR_REMOTECREATEINSTANCE, api_RemoteCreateInstance},
855
{"LOCKSERVER", NDR_LOCKSERVER, api_LockServer},
856
{"REMOTELOCKSERVER", NDR_REMOTELOCKSERVER, api_RemoteLockServer},
859
void IClassFactory_get_pipe_fns(struct api_struct **fns, int *n_fns)
861
*fns = api_IClassFactory_cmds;
862
*n_fns = sizeof(api_IClassFactory_cmds) / sizeof(struct api_struct);
865
NTSTATUS rpc_IClassFactory_init(const struct rpc_srv_callbacks *rpc_srv_cb)
867
return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "IClassFactory", "IClassFactory", &ndr_table_IClassFactory, api_IClassFactory_cmds, sizeof(api_IClassFactory_cmds) / sizeof(struct api_struct), rpc_srv_cb);
870
NTSTATUS rpc_IClassFactory_shutdown(void)
872
return rpc_srv_unregister(&ndr_table_IClassFactory);
874
static bool api_RemQueryInterface(struct pipes_struct *p)
876
const struct ndr_interface_call *call;
877
struct ndr_pull *pull;
878
struct ndr_push *push;
879
enum ndr_err_code ndr_err;
880
struct RemQueryInterface *r;
882
call = &ndr_table_IRemUnknown.calls[NDR_REMQUERYINTERFACE];
884
r = talloc(talloc_tos(), struct RemQueryInterface);
889
pull = ndr_pull_init_blob(&p->in_data.data, r);
895
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
897
pull->flags |= LIBNDR_FLAG_BIGENDIAN;
899
ndr_err = call->ndr_pull(pull, NDR_IN, r);
900
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
905
if (DEBUGLEVEL >= 10) {
906
NDR_PRINT_FUNCTION_DEBUG(RemQueryInterface, NDR_IN, r);
910
r->out.ORPCthat = talloc_zero(r, struct ORPCTHAT);
911
if (r->out.ORPCthat == NULL) {
916
r->out.ip = talloc_zero_array(r, struct MInterfacePointer, r->in.cIids);
917
if (r->out.ip == NULL) {
922
r->out.result = _RemQueryInterface(p, r);
924
if (p->rng_fault_state) {
926
/* Return true here, srv_pipe_hnd.c will take care */
930
if (DEBUGLEVEL >= 10) {
931
NDR_PRINT_FUNCTION_DEBUG(RemQueryInterface, NDR_OUT | NDR_SET_VALUES, r);
934
push = ndr_push_init_ctx(r);
941
* carry over the pointer count to the reply in case we are
942
* using full pointer. See NDR specification for full pointers
944
push->ptr_count = pull->ptr_count;
946
ndr_err = call->ndr_push(push, NDR_OUT, r);
947
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
952
p->out_data.rdata = ndr_push_blob(push);
953
talloc_steal(p->mem_ctx, p->out_data.rdata.data);
960
static bool api_RemAddRef(struct pipes_struct *p)
962
const struct ndr_interface_call *call;
963
struct ndr_pull *pull;
964
struct ndr_push *push;
965
enum ndr_err_code ndr_err;
968
call = &ndr_table_IRemUnknown.calls[NDR_REMADDREF];
970
r = talloc(talloc_tos(), struct RemAddRef);
975
pull = ndr_pull_init_blob(&p->in_data.data, r);
981
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
983
pull->flags |= LIBNDR_FLAG_BIGENDIAN;
985
ndr_err = call->ndr_pull(pull, NDR_IN, r);
986
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
991
if (DEBUGLEVEL >= 10) {
992
NDR_PRINT_FUNCTION_DEBUG(RemAddRef, NDR_IN, r);
996
r->out.ORPCthat = talloc_zero(r, struct ORPCTHAT);
997
if (r->out.ORPCthat == NULL) {
1002
r->out.pResults = talloc_zero_array(r, WERROR, r->in.cInterfaceRefs);
1003
if (r->out.pResults == NULL) {
1008
r->out.result = _RemAddRef(p, r);
1010
if (p->rng_fault_state) {
1012
/* Return true here, srv_pipe_hnd.c will take care */
1016
if (DEBUGLEVEL >= 10) {
1017
NDR_PRINT_FUNCTION_DEBUG(RemAddRef, NDR_OUT | NDR_SET_VALUES, r);
1020
push = ndr_push_init_ctx(r);
1027
* carry over the pointer count to the reply in case we are
1028
* using full pointer. See NDR specification for full pointers
1030
push->ptr_count = pull->ptr_count;
1032
ndr_err = call->ndr_push(push, NDR_OUT, r);
1033
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1038
p->out_data.rdata = ndr_push_blob(push);
1039
talloc_steal(p->mem_ctx, p->out_data.rdata.data);
1046
static bool api_RemRelease(struct pipes_struct *p)
1048
const struct ndr_interface_call *call;
1049
struct ndr_pull *pull;
1050
struct ndr_push *push;
1051
enum ndr_err_code ndr_err;
1052
struct RemRelease *r;
1054
call = &ndr_table_IRemUnknown.calls[NDR_REMRELEASE];
1056
r = talloc(talloc_tos(), struct RemRelease);
1061
pull = ndr_pull_init_blob(&p->in_data.data, r);
1067
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1069
pull->flags |= LIBNDR_FLAG_BIGENDIAN;
1071
ndr_err = call->ndr_pull(pull, NDR_IN, r);
1072
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1077
if (DEBUGLEVEL >= 10) {
1078
NDR_PRINT_FUNCTION_DEBUG(RemRelease, NDR_IN, r);
1081
ZERO_STRUCT(r->out);
1082
r->out.ORPCthat = talloc_zero(r, struct ORPCTHAT);
1083
if (r->out.ORPCthat == NULL) {
1088
r->out.result = _RemRelease(p, r);
1090
if (p->rng_fault_state) {
1092
/* Return true here, srv_pipe_hnd.c will take care */
1096
if (DEBUGLEVEL >= 10) {
1097
NDR_PRINT_FUNCTION_DEBUG(RemRelease, NDR_OUT | NDR_SET_VALUES, r);
1100
push = ndr_push_init_ctx(r);
1107
* carry over the pointer count to the reply in case we are
1108
* using full pointer. See NDR specification for full pointers
1110
push->ptr_count = pull->ptr_count;
1112
ndr_err = call->ndr_push(push, NDR_OUT, r);
1113
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1118
p->out_data.rdata = ndr_push_blob(push);
1119
talloc_steal(p->mem_ctx, p->out_data.rdata.data);
1128
static struct api_struct api_IRemUnknown_cmds[] =
1130
{"REMQUERYINTERFACE", NDR_REMQUERYINTERFACE, api_RemQueryInterface},
1131
{"REMADDREF", NDR_REMADDREF, api_RemAddRef},
1132
{"REMRELEASE", NDR_REMRELEASE, api_RemRelease},
1135
void IRemUnknown_get_pipe_fns(struct api_struct **fns, int *n_fns)
1137
*fns = api_IRemUnknown_cmds;
1138
*n_fns = sizeof(api_IRemUnknown_cmds) / sizeof(struct api_struct);
1141
NTSTATUS rpc_IRemUnknown_init(const struct rpc_srv_callbacks *rpc_srv_cb)
1143
return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "IRemUnknown", "IRemUnknown", &ndr_table_IRemUnknown, api_IRemUnknown_cmds, sizeof(api_IRemUnknown_cmds) / sizeof(struct api_struct), rpc_srv_cb);
1146
NTSTATUS rpc_IRemUnknown_shutdown(void)
1148
return rpc_srv_unregister(&ndr_table_IRemUnknown);
1150
static bool api_GetClassObject(struct pipes_struct *p)
1152
const struct ndr_interface_call *call;
1153
struct ndr_pull *pull;
1154
struct ndr_push *push;
1155
enum ndr_err_code ndr_err;
1156
struct GetClassObject *r;
1158
call = &ndr_table_IClassActivator.calls[NDR_GETCLASSOBJECT];
1160
r = talloc(talloc_tos(), struct GetClassObject);
1165
pull = ndr_pull_init_blob(&p->in_data.data, r);
1171
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1173
pull->flags |= LIBNDR_FLAG_BIGENDIAN;
1175
ndr_err = call->ndr_pull(pull, NDR_IN, r);
1176
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1181
if (DEBUGLEVEL >= 10) {
1182
NDR_PRINT_FUNCTION_DEBUG(GetClassObject, NDR_IN, r);
1185
ZERO_STRUCT(r->out);
1186
r->out.ORPCthat = talloc_zero(r, struct ORPCTHAT);
1187
if (r->out.ORPCthat == NULL) {
1192
r->out.data = talloc_zero(r, struct MInterfacePointer);
1193
if (r->out.data == NULL) {
1198
_GetClassObject(p, r);
1200
if (p->rng_fault_state) {
1202
/* Return true here, srv_pipe_hnd.c will take care */
1206
if (DEBUGLEVEL >= 10) {
1207
NDR_PRINT_FUNCTION_DEBUG(GetClassObject, NDR_OUT | NDR_SET_VALUES, r);
1210
push = ndr_push_init_ctx(r);
1217
* carry over the pointer count to the reply in case we are
1218
* using full pointer. See NDR specification for full pointers
1220
push->ptr_count = pull->ptr_count;
1222
ndr_err = call->ndr_push(push, NDR_OUT, r);
1223
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1228
p->out_data.rdata = ndr_push_blob(push);
1229
talloc_steal(p->mem_ctx, p->out_data.rdata.data);
1238
static struct api_struct api_IClassActivator_cmds[] =
1240
{"GETCLASSOBJECT", NDR_GETCLASSOBJECT, api_GetClassObject},
1243
void IClassActivator_get_pipe_fns(struct api_struct **fns, int *n_fns)
1245
*fns = api_IClassActivator_cmds;
1246
*n_fns = sizeof(api_IClassActivator_cmds) / sizeof(struct api_struct);
1249
NTSTATUS rpc_IClassActivator_init(const struct rpc_srv_callbacks *rpc_srv_cb)
1251
return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "IClassActivator", "IClassActivator", &ndr_table_IClassActivator, api_IClassActivator_cmds, sizeof(api_IClassActivator_cmds) / sizeof(struct api_struct), rpc_srv_cb);
1254
NTSTATUS rpc_IClassActivator_shutdown(void)
1256
return rpc_srv_unregister(&ndr_table_IClassActivator);
1258
static bool api_ISCMLocalActivator_CreateInstance(struct pipes_struct *p)
1260
const struct ndr_interface_call *call;
1261
struct ndr_pull *pull;
1262
struct ndr_push *push;
1263
enum ndr_err_code ndr_err;
1264
struct ISCMLocalActivator_CreateInstance *r;
1266
call = &ndr_table_ISCMLocalActivator.calls[NDR_ISCMLOCALACTIVATOR_CREATEINSTANCE];
1268
r = talloc(talloc_tos(), struct ISCMLocalActivator_CreateInstance);
1273
pull = ndr_pull_init_blob(&p->in_data.data, r);
1279
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1281
pull->flags |= LIBNDR_FLAG_BIGENDIAN;
1283
ndr_err = call->ndr_pull(pull, NDR_IN, r);
1284
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1289
if (DEBUGLEVEL >= 10) {
1290
NDR_PRINT_FUNCTION_DEBUG(ISCMLocalActivator_CreateInstance, NDR_IN, r);
1293
ZERO_STRUCT(r->out);
1294
r->out.ORPCthat = talloc_zero(r, struct ORPCTHAT);
1295
if (r->out.ORPCthat == NULL) {
1300
r->out.result = _ISCMLocalActivator_CreateInstance(p, r);
1302
if (p->rng_fault_state) {
1304
/* Return true here, srv_pipe_hnd.c will take care */
1308
if (DEBUGLEVEL >= 10) {
1309
NDR_PRINT_FUNCTION_DEBUG(ISCMLocalActivator_CreateInstance, NDR_OUT | NDR_SET_VALUES, r);
1312
push = ndr_push_init_ctx(r);
1319
* carry over the pointer count to the reply in case we are
1320
* using full pointer. See NDR specification for full pointers
1322
push->ptr_count = pull->ptr_count;
1324
ndr_err = call->ndr_push(push, NDR_OUT, r);
1325
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1330
p->out_data.rdata = ndr_push_blob(push);
1331
talloc_steal(p->mem_ctx, p->out_data.rdata.data);
1340
static struct api_struct api_ISCMLocalActivator_cmds[] =
1342
{"ISCMLOCALACTIVATOR_CREATEINSTANCE", NDR_ISCMLOCALACTIVATOR_CREATEINSTANCE, api_ISCMLocalActivator_CreateInstance},
1345
void ISCMLocalActivator_get_pipe_fns(struct api_struct **fns, int *n_fns)
1347
*fns = api_ISCMLocalActivator_cmds;
1348
*n_fns = sizeof(api_ISCMLocalActivator_cmds) / sizeof(struct api_struct);
1351
NTSTATUS rpc_ISCMLocalActivator_init(const struct rpc_srv_callbacks *rpc_srv_cb)
1353
return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "ISCMLocalActivator", "ISCMLocalActivator", &ndr_table_ISCMLocalActivator, api_ISCMLocalActivator_cmds, sizeof(api_ISCMLocalActivator_cmds) / sizeof(struct api_struct), rpc_srv_cb);
1356
NTSTATUS rpc_ISCMLocalActivator_shutdown(void)
1358
return rpc_srv_unregister(&ndr_table_ISCMLocalActivator);
1360
static bool api_IMachineLocalActivator_foo(struct pipes_struct *p)
1362
const struct ndr_interface_call *call;
1363
struct ndr_pull *pull;
1364
struct ndr_push *push;
1365
enum ndr_err_code ndr_err;
1366
struct IMachineLocalActivator_foo *r;
1368
call = &ndr_table_IMachineLocalActivator.calls[NDR_IMACHINELOCALACTIVATOR_FOO];
1370
r = talloc(talloc_tos(), struct IMachineLocalActivator_foo);
1375
pull = ndr_pull_init_blob(&p->in_data.data, r);
1381
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1383
pull->flags |= LIBNDR_FLAG_BIGENDIAN;
1385
ndr_err = call->ndr_pull(pull, NDR_IN, r);
1386
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1391
if (DEBUGLEVEL >= 10) {
1392
NDR_PRINT_FUNCTION_DEBUG(IMachineLocalActivator_foo, NDR_IN, r);
1395
r->out.result = _IMachineLocalActivator_foo(p, r);
1397
if (p->rng_fault_state) {
1399
/* Return true here, srv_pipe_hnd.c will take care */
1403
if (DEBUGLEVEL >= 10) {
1404
NDR_PRINT_FUNCTION_DEBUG(IMachineLocalActivator_foo, NDR_OUT | NDR_SET_VALUES, r);
1407
push = ndr_push_init_ctx(r);
1414
* carry over the pointer count to the reply in case we are
1415
* using full pointer. See NDR specification for full pointers
1417
push->ptr_count = pull->ptr_count;
1419
ndr_err = call->ndr_push(push, NDR_OUT, r);
1420
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1425
p->out_data.rdata = ndr_push_blob(push);
1426
talloc_steal(p->mem_ctx, p->out_data.rdata.data);
1435
static struct api_struct api_IMachineLocalActivator_cmds[] =
1437
{"IMACHINELOCALACTIVATOR_FOO", NDR_IMACHINELOCALACTIVATOR_FOO, api_IMachineLocalActivator_foo},
1440
void IMachineLocalActivator_get_pipe_fns(struct api_struct **fns, int *n_fns)
1442
*fns = api_IMachineLocalActivator_cmds;
1443
*n_fns = sizeof(api_IMachineLocalActivator_cmds) / sizeof(struct api_struct);
1446
NTSTATUS rpc_IMachineLocalActivator_init(const struct rpc_srv_callbacks *rpc_srv_cb)
1448
return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "IMachineLocalActivator", "IMachineLocalActivator", &ndr_table_IMachineLocalActivator, api_IMachineLocalActivator_cmds, sizeof(api_IMachineLocalActivator_cmds) / sizeof(struct api_struct), rpc_srv_cb);
1451
NTSTATUS rpc_IMachineLocalActivator_shutdown(void)
1453
return rpc_srv_unregister(&ndr_table_IMachineLocalActivator);
1455
static bool api_ILocalObjectExporter_Foo(struct pipes_struct *p)
1457
const struct ndr_interface_call *call;
1458
struct ndr_pull *pull;
1459
struct ndr_push *push;
1460
enum ndr_err_code ndr_err;
1461
struct ILocalObjectExporter_Foo *r;
1463
call = &ndr_table_ILocalObjectExporter.calls[NDR_ILOCALOBJECTEXPORTER_FOO];
1465
r = talloc(talloc_tos(), struct ILocalObjectExporter_Foo);
1470
pull = ndr_pull_init_blob(&p->in_data.data, r);
1476
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1478
pull->flags |= LIBNDR_FLAG_BIGENDIAN;
1480
ndr_err = call->ndr_pull(pull, NDR_IN, r);
1481
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1486
if (DEBUGLEVEL >= 10) {
1487
NDR_PRINT_FUNCTION_DEBUG(ILocalObjectExporter_Foo, NDR_IN, r);
1490
r->out.result = _ILocalObjectExporter_Foo(p, r);
1492
if (p->rng_fault_state) {
1494
/* Return true here, srv_pipe_hnd.c will take care */
1498
if (DEBUGLEVEL >= 10) {
1499
NDR_PRINT_FUNCTION_DEBUG(ILocalObjectExporter_Foo, NDR_OUT | NDR_SET_VALUES, r);
1502
push = ndr_push_init_ctx(r);
1509
* carry over the pointer count to the reply in case we are
1510
* using full pointer. See NDR specification for full pointers
1512
push->ptr_count = pull->ptr_count;
1514
ndr_err = call->ndr_push(push, NDR_OUT, r);
1515
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1520
p->out_data.rdata = ndr_push_blob(push);
1521
talloc_steal(p->mem_ctx, p->out_data.rdata.data);
1530
static struct api_struct api_ILocalObjectExporter_cmds[] =
1532
{"ILOCALOBJECTEXPORTER_FOO", NDR_ILOCALOBJECTEXPORTER_FOO, api_ILocalObjectExporter_Foo},
1535
void ILocalObjectExporter_get_pipe_fns(struct api_struct **fns, int *n_fns)
1537
*fns = api_ILocalObjectExporter_cmds;
1538
*n_fns = sizeof(api_ILocalObjectExporter_cmds) / sizeof(struct api_struct);
1541
NTSTATUS rpc_ILocalObjectExporter_init(const struct rpc_srv_callbacks *rpc_srv_cb)
1543
return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "ILocalObjectExporter", "ILocalObjectExporter", &ndr_table_ILocalObjectExporter, api_ILocalObjectExporter_cmds, sizeof(api_ILocalObjectExporter_cmds) / sizeof(struct api_struct), rpc_srv_cb);
1546
NTSTATUS rpc_ILocalObjectExporter_shutdown(void)
1548
return rpc_srv_unregister(&ndr_table_ILocalObjectExporter);
1550
static bool api_ISystemActivatorRemoteCreateInstance(struct pipes_struct *p)
1552
const struct ndr_interface_call *call;
1553
struct ndr_pull *pull;
1554
struct ndr_push *push;
1555
enum ndr_err_code ndr_err;
1556
struct ISystemActivatorRemoteCreateInstance *r;
1558
call = &ndr_table_ISystemActivator.calls[NDR_ISYSTEMACTIVATORREMOTECREATEINSTANCE];
1560
r = talloc(talloc_tos(), struct ISystemActivatorRemoteCreateInstance);
1565
pull = ndr_pull_init_blob(&p->in_data.data, r);
1571
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1573
pull->flags |= LIBNDR_FLAG_BIGENDIAN;
1575
ndr_err = call->ndr_pull(pull, NDR_IN, r);
1576
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1581
if (DEBUGLEVEL >= 10) {
1582
NDR_PRINT_FUNCTION_DEBUG(ISystemActivatorRemoteCreateInstance, NDR_IN, r);
1585
ZERO_STRUCT(r->out);
1586
r->out.ORPCthat = talloc_zero(r, struct ORPCTHAT);
1587
if (r->out.ORPCthat == NULL) {
1592
r->out.unknown3 = talloc_zero(r, uint32_t);
1593
if (r->out.unknown3 == NULL) {
1598
r->out.iface2 = talloc_zero(r, struct MInterfacePointer);
1599
if (r->out.iface2 == NULL) {
1604
r->out.result = _ISystemActivatorRemoteCreateInstance(p, r);
1606
if (p->rng_fault_state) {
1608
/* Return true here, srv_pipe_hnd.c will take care */
1612
if (DEBUGLEVEL >= 10) {
1613
NDR_PRINT_FUNCTION_DEBUG(ISystemActivatorRemoteCreateInstance, NDR_OUT | NDR_SET_VALUES, r);
1616
push = ndr_push_init_ctx(r);
1623
* carry over the pointer count to the reply in case we are
1624
* using full pointer. See NDR specification for full pointers
1626
push->ptr_count = pull->ptr_count;
1628
ndr_err = call->ndr_push(push, NDR_OUT, r);
1629
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1634
p->out_data.rdata = ndr_push_blob(push);
1635
talloc_steal(p->mem_ctx, p->out_data.rdata.data);
1644
static struct api_struct api_ISystemActivator_cmds[] =
1646
{"ISYSTEMACTIVATORREMOTECREATEINSTANCE", NDR_ISYSTEMACTIVATORREMOTECREATEINSTANCE, api_ISystemActivatorRemoteCreateInstance},
1649
void ISystemActivator_get_pipe_fns(struct api_struct **fns, int *n_fns)
1651
*fns = api_ISystemActivator_cmds;
1652
*n_fns = sizeof(api_ISystemActivator_cmds) / sizeof(struct api_struct);
1655
NTSTATUS rpc_ISystemActivator_init(const struct rpc_srv_callbacks *rpc_srv_cb)
1657
return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "ISystemActivator", "ISystemActivator", &ndr_table_ISystemActivator, api_ISystemActivator_cmds, sizeof(api_ISystemActivator_cmds) / sizeof(struct api_struct), rpc_srv_cb);
1660
NTSTATUS rpc_ISystemActivator_shutdown(void)
1662
return rpc_srv_unregister(&ndr_table_ISystemActivator);
1664
static bool api_RemQueryInterface2(struct pipes_struct *p)
1666
const struct ndr_interface_call *call;
1667
struct ndr_pull *pull;
1668
struct ndr_push *push;
1669
enum ndr_err_code ndr_err;
1670
struct RemQueryInterface2 *r;
1672
call = &ndr_table_IRemUnknown2.calls[NDR_REMQUERYINTERFACE2];
1674
r = talloc(talloc_tos(), struct RemQueryInterface2);
1679
pull = ndr_pull_init_blob(&p->in_data.data, r);
1685
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1687
pull->flags |= LIBNDR_FLAG_BIGENDIAN;
1689
ndr_err = call->ndr_pull(pull, NDR_IN, r);
1690
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1695
if (DEBUGLEVEL >= 10) {
1696
NDR_PRINT_FUNCTION_DEBUG(RemQueryInterface2, NDR_IN, r);
1699
ZERO_STRUCT(r->out);
1700
r->out.ORPCthat = talloc_zero(r, struct ORPCTHAT);
1701
if (r->out.ORPCthat == NULL) {
1706
r->out.phr = talloc_zero_array(r, WERROR, r->in.cIids);
1707
if (r->out.phr == NULL) {
1712
r->out.ppMIF = talloc_zero_array(r, struct MInterfacePointer, r->in.cIids);
1713
if (r->out.ppMIF == NULL) {
1718
r->out.result = _RemQueryInterface2(p, r);
1720
if (p->rng_fault_state) {
1722
/* Return true here, srv_pipe_hnd.c will take care */
1726
if (DEBUGLEVEL >= 10) {
1727
NDR_PRINT_FUNCTION_DEBUG(RemQueryInterface2, NDR_OUT | NDR_SET_VALUES, r);
1730
push = ndr_push_init_ctx(r);
1737
* carry over the pointer count to the reply in case we are
1738
* using full pointer. See NDR specification for full pointers
1740
push->ptr_count = pull->ptr_count;
1742
ndr_err = call->ndr_push(push, NDR_OUT, r);
1743
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1748
p->out_data.rdata = ndr_push_blob(push);
1749
talloc_steal(p->mem_ctx, p->out_data.rdata.data);
1758
static struct api_struct api_IRemUnknown2_cmds[] =
1760
{"REMQUERYINTERFACE2", NDR_REMQUERYINTERFACE2, api_RemQueryInterface2},
1763
void IRemUnknown2_get_pipe_fns(struct api_struct **fns, int *n_fns)
1765
*fns = api_IRemUnknown2_cmds;
1766
*n_fns = sizeof(api_IRemUnknown2_cmds) / sizeof(struct api_struct);
1769
NTSTATUS rpc_IRemUnknown2_init(const struct rpc_srv_callbacks *rpc_srv_cb)
1771
return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "IRemUnknown2", "IRemUnknown2", &ndr_table_IRemUnknown2, api_IRemUnknown2_cmds, sizeof(api_IRemUnknown2_cmds) / sizeof(struct api_struct), rpc_srv_cb);
1774
NTSTATUS rpc_IRemUnknown2_shutdown(void)
1776
return rpc_srv_unregister(&ndr_table_IRemUnknown2);
1778
static bool api_GetTypeInfoCount(struct pipes_struct *p)
1780
const struct ndr_interface_call *call;
1781
struct ndr_pull *pull;
1782
struct ndr_push *push;
1783
enum ndr_err_code ndr_err;
1784
struct GetTypeInfoCount *r;
1786
call = &ndr_table_IDispatch.calls[NDR_GETTYPEINFOCOUNT];
1788
r = talloc(talloc_tos(), struct GetTypeInfoCount);
1793
pull = ndr_pull_init_blob(&p->in_data.data, r);
1799
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1801
pull->flags |= LIBNDR_FLAG_BIGENDIAN;
1803
ndr_err = call->ndr_pull(pull, NDR_IN, r);
1804
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1809
if (DEBUGLEVEL >= 10) {
1810
NDR_PRINT_FUNCTION_DEBUG(GetTypeInfoCount, NDR_IN, r);
1813
ZERO_STRUCT(r->out);
1814
r->out.ORPCthat = talloc_zero(r, struct ORPCTHAT);
1815
if (r->out.ORPCthat == NULL) {
1820
r->out.pctinfo = talloc_zero(r, uint16_t);
1821
if (r->out.pctinfo == NULL) {
1826
r->out.result = _GetTypeInfoCount(p, r);
1828
if (p->rng_fault_state) {
1830
/* Return true here, srv_pipe_hnd.c will take care */
1834
if (DEBUGLEVEL >= 10) {
1835
NDR_PRINT_FUNCTION_DEBUG(GetTypeInfoCount, NDR_OUT | NDR_SET_VALUES, r);
1838
push = ndr_push_init_ctx(r);
1845
* carry over the pointer count to the reply in case we are
1846
* using full pointer. See NDR specification for full pointers
1848
push->ptr_count = pull->ptr_count;
1850
ndr_err = call->ndr_push(push, NDR_OUT, r);
1851
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1856
p->out_data.rdata = ndr_push_blob(push);
1857
talloc_steal(p->mem_ctx, p->out_data.rdata.data);
1864
static bool api_GetTypeInfo(struct pipes_struct *p)
1866
const struct ndr_interface_call *call;
1867
struct ndr_pull *pull;
1868
struct ndr_push *push;
1869
enum ndr_err_code ndr_err;
1870
struct GetTypeInfo *r;
1872
call = &ndr_table_IDispatch.calls[NDR_GETTYPEINFO];
1874
r = talloc(talloc_tos(), struct GetTypeInfo);
1879
pull = ndr_pull_init_blob(&p->in_data.data, r);
1885
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1887
pull->flags |= LIBNDR_FLAG_BIGENDIAN;
1889
ndr_err = call->ndr_pull(pull, NDR_IN, r);
1890
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1895
if (DEBUGLEVEL >= 10) {
1896
NDR_PRINT_FUNCTION_DEBUG(GetTypeInfo, NDR_IN, r);
1899
ZERO_STRUCT(r->out);
1900
r->out.ORPCthat = talloc_zero(r, struct ORPCTHAT);
1901
if (r->out.ORPCthat == NULL) {
1906
r->out.ppTInfo = talloc_zero(r, struct REF_ITypeInfo);
1907
if (r->out.ppTInfo == NULL) {
1912
r->out.result = _GetTypeInfo(p, r);
1914
if (p->rng_fault_state) {
1916
/* Return true here, srv_pipe_hnd.c will take care */
1920
if (DEBUGLEVEL >= 10) {
1921
NDR_PRINT_FUNCTION_DEBUG(GetTypeInfo, NDR_OUT | NDR_SET_VALUES, r);
1924
push = ndr_push_init_ctx(r);
1931
* carry over the pointer count to the reply in case we are
1932
* using full pointer. See NDR specification for full pointers
1934
push->ptr_count = pull->ptr_count;
1936
ndr_err = call->ndr_push(push, NDR_OUT, r);
1937
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1942
p->out_data.rdata = ndr_push_blob(push);
1943
talloc_steal(p->mem_ctx, p->out_data.rdata.data);
1950
static bool api_GetIDsOfNames(struct pipes_struct *p)
1952
const struct ndr_interface_call *call;
1953
struct ndr_pull *pull;
1954
struct ndr_push *push;
1955
enum ndr_err_code ndr_err;
1956
struct GetIDsOfNames *r;
1958
call = &ndr_table_IDispatch.calls[NDR_GETIDSOFNAMES];
1960
r = talloc(talloc_tos(), struct GetIDsOfNames);
1965
pull = ndr_pull_init_blob(&p->in_data.data, r);
1971
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1973
pull->flags |= LIBNDR_FLAG_BIGENDIAN;
1975
ndr_err = call->ndr_pull(pull, NDR_IN, r);
1976
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1981
if (DEBUGLEVEL >= 10) {
1982
NDR_PRINT_FUNCTION_DEBUG(GetIDsOfNames, NDR_IN, r);
1985
ZERO_STRUCT(r->out);
1986
r->out.ORPCthat = talloc_zero(r, struct ORPCTHAT);
1987
if (r->out.ORPCthat == NULL) {
1992
r->out.rgDispId = talloc_zero_array(r, uint32_t, r->in.cNames);
1993
if (r->out.rgDispId == NULL) {
1998
r->out.result = _GetIDsOfNames(p, r);
2000
if (p->rng_fault_state) {
2002
/* Return true here, srv_pipe_hnd.c will take care */
2006
if (DEBUGLEVEL >= 10) {
2007
NDR_PRINT_FUNCTION_DEBUG(GetIDsOfNames, NDR_OUT | NDR_SET_VALUES, r);
2010
push = ndr_push_init_ctx(r);
2017
* carry over the pointer count to the reply in case we are
2018
* using full pointer. See NDR specification for full pointers
2020
push->ptr_count = pull->ptr_count;
2022
ndr_err = call->ndr_push(push, NDR_OUT, r);
2023
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2028
p->out_data.rdata = ndr_push_blob(push);
2029
talloc_steal(p->mem_ctx, p->out_data.rdata.data);
2036
static bool api_Invoke(struct pipes_struct *p)
2038
const struct ndr_interface_call *call;
2039
struct ndr_pull *pull;
2040
struct ndr_push *push;
2041
enum ndr_err_code ndr_err;
2044
call = &ndr_table_IDispatch.calls[NDR_INVOKE];
2046
r = talloc(talloc_tos(), struct Invoke);
2051
pull = ndr_pull_init_blob(&p->in_data.data, r);
2057
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2059
pull->flags |= LIBNDR_FLAG_BIGENDIAN;
2061
ndr_err = call->ndr_pull(pull, NDR_IN, r);
2062
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2067
if (DEBUGLEVEL >= 10) {
2068
NDR_PRINT_FUNCTION_DEBUG(Invoke, NDR_IN, r);
2071
ZERO_STRUCT(r->out);
2072
r->out.pDispParams = r->in.pDispParams;
2073
r->out.ORPCthat = talloc_zero(r, struct ORPCTHAT);
2074
if (r->out.ORPCthat == NULL) {
2079
r->out.pVarResult = talloc_zero(r, struct VARIANT);
2080
if (r->out.pVarResult == NULL) {
2085
r->out.pExcepInfo = talloc_zero(r, struct EXCEPINFO);
2086
if (r->out.pExcepInfo == NULL) {
2091
r->out.puArgErr = talloc_zero(r, uint16_t);
2092
if (r->out.puArgErr == NULL) {
2097
r->out.result = _Invoke(p, r);
2099
if (p->rng_fault_state) {
2101
/* Return true here, srv_pipe_hnd.c will take care */
2105
if (DEBUGLEVEL >= 10) {
2106
NDR_PRINT_FUNCTION_DEBUG(Invoke, NDR_OUT | NDR_SET_VALUES, r);
2109
push = ndr_push_init_ctx(r);
2116
* carry over the pointer count to the reply in case we are
2117
* using full pointer. See NDR specification for full pointers
2119
push->ptr_count = pull->ptr_count;
2121
ndr_err = call->ndr_push(push, NDR_OUT, r);
2122
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2127
p->out_data.rdata = ndr_push_blob(push);
2128
talloc_steal(p->mem_ctx, p->out_data.rdata.data);
2137
static struct api_struct api_IDispatch_cmds[] =
2139
{"GETTYPEINFOCOUNT", NDR_GETTYPEINFOCOUNT, api_GetTypeInfoCount},
2140
{"GETTYPEINFO", NDR_GETTYPEINFO, api_GetTypeInfo},
2141
{"GETIDSOFNAMES", NDR_GETIDSOFNAMES, api_GetIDsOfNames},
2142
{"INVOKE", NDR_INVOKE, api_Invoke},
2145
void IDispatch_get_pipe_fns(struct api_struct **fns, int *n_fns)
2147
*fns = api_IDispatch_cmds;
2148
*n_fns = sizeof(api_IDispatch_cmds) / sizeof(struct api_struct);
2151
NTSTATUS rpc_IDispatch_init(const struct rpc_srv_callbacks *rpc_srv_cb)
2153
return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "IDispatch", "IDispatch", &ndr_table_IDispatch, api_IDispatch_cmds, sizeof(api_IDispatch_cmds) / sizeof(struct api_struct), rpc_srv_cb);
2156
NTSTATUS rpc_IDispatch_shutdown(void)
2158
return rpc_srv_unregister(&ndr_table_IDispatch);
2160
static bool api_MarshalInterface(struct pipes_struct *p)
2162
const struct ndr_interface_call *call;
2163
struct ndr_pull *pull;
2164
struct ndr_push *push;
2165
enum ndr_err_code ndr_err;
2166
struct MarshalInterface *r;
2168
call = &ndr_table_IMarshal.calls[NDR_MARSHALINTERFACE];
2170
r = talloc(talloc_tos(), struct MarshalInterface);
2175
pull = ndr_pull_init_blob(&p->in_data.data, r);
2181
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2183
pull->flags |= LIBNDR_FLAG_BIGENDIAN;
2185
ndr_err = call->ndr_pull(pull, NDR_IN, r);
2186
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2191
if (DEBUGLEVEL >= 10) {
2192
NDR_PRINT_FUNCTION_DEBUG(MarshalInterface, NDR_IN, r);
2195
ZERO_STRUCT(r->out);
2196
r->out.ORPCthat = talloc_zero(r, struct ORPCTHAT);
2197
if (r->out.ORPCthat == NULL) {
2202
r->out.result = _MarshalInterface(p, r);
2204
if (p->rng_fault_state) {
2206
/* Return true here, srv_pipe_hnd.c will take care */
2210
if (DEBUGLEVEL >= 10) {
2211
NDR_PRINT_FUNCTION_DEBUG(MarshalInterface, NDR_OUT | NDR_SET_VALUES, r);
2214
push = ndr_push_init_ctx(r);
2221
* carry over the pointer count to the reply in case we are
2222
* using full pointer. See NDR specification for full pointers
2224
push->ptr_count = pull->ptr_count;
2226
ndr_err = call->ndr_push(push, NDR_OUT, r);
2227
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2232
p->out_data.rdata = ndr_push_blob(push);
2233
talloc_steal(p->mem_ctx, p->out_data.rdata.data);
2240
static bool api_UnMarshalInterface(struct pipes_struct *p)
2242
const struct ndr_interface_call *call;
2243
struct ndr_pull *pull;
2244
struct ndr_push *push;
2245
enum ndr_err_code ndr_err;
2246
struct UnMarshalInterface *r;
2248
call = &ndr_table_IMarshal.calls[NDR_UNMARSHALINTERFACE];
2250
r = talloc(talloc_tos(), struct UnMarshalInterface);
2255
pull = ndr_pull_init_blob(&p->in_data.data, r);
2261
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2263
pull->flags |= LIBNDR_FLAG_BIGENDIAN;
2265
ndr_err = call->ndr_pull(pull, NDR_IN, r);
2266
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2271
if (DEBUGLEVEL >= 10) {
2272
NDR_PRINT_FUNCTION_DEBUG(UnMarshalInterface, NDR_IN, r);
2275
ZERO_STRUCT(r->out);
2276
r->out.ORPCthat = talloc_zero(r, struct ORPCTHAT);
2277
if (r->out.ORPCthat == NULL) {
2282
r->out.result = _UnMarshalInterface(p, r);
2284
if (p->rng_fault_state) {
2286
/* Return true here, srv_pipe_hnd.c will take care */
2290
if (DEBUGLEVEL >= 10) {
2291
NDR_PRINT_FUNCTION_DEBUG(UnMarshalInterface, NDR_OUT | NDR_SET_VALUES, r);
2294
push = ndr_push_init_ctx(r);
2301
* carry over the pointer count to the reply in case we are
2302
* using full pointer. See NDR specification for full pointers
2304
push->ptr_count = pull->ptr_count;
2306
ndr_err = call->ndr_push(push, NDR_OUT, r);
2307
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2312
p->out_data.rdata = ndr_push_blob(push);
2313
talloc_steal(p->mem_ctx, p->out_data.rdata.data);
2322
static struct api_struct api_IMarshal_cmds[] =
2324
{"MARSHALINTERFACE", NDR_MARSHALINTERFACE, api_MarshalInterface},
2325
{"UNMARSHALINTERFACE", NDR_UNMARSHALINTERFACE, api_UnMarshalInterface},
2328
void IMarshal_get_pipe_fns(struct api_struct **fns, int *n_fns)
2330
*fns = api_IMarshal_cmds;
2331
*n_fns = sizeof(api_IMarshal_cmds) / sizeof(struct api_struct);
2334
NTSTATUS rpc_IMarshal_init(const struct rpc_srv_callbacks *rpc_srv_cb)
2336
return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "IMarshal", "IMarshal", &ndr_table_IMarshal, api_IMarshal_cmds, sizeof(api_IMarshal_cmds) / sizeof(struct api_struct), rpc_srv_cb);
2339
NTSTATUS rpc_IMarshal_shutdown(void)
2341
return rpc_srv_unregister(&ndr_table_IMarshal);
2343
static bool api_MakeCoffee(struct pipes_struct *p)
2345
const struct ndr_interface_call *call;
2346
struct ndr_pull *pull;
2347
struct ndr_push *push;
2348
enum ndr_err_code ndr_err;
2349
struct MakeCoffee *r;
2351
call = &ndr_table_ICoffeeMachine.calls[NDR_MAKECOFFEE];
2353
r = talloc(talloc_tos(), struct MakeCoffee);
2358
pull = ndr_pull_init_blob(&p->in_data.data, r);
2364
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2366
pull->flags |= LIBNDR_FLAG_BIGENDIAN;
2368
ndr_err = call->ndr_pull(pull, NDR_IN, r);
2369
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2374
if (DEBUGLEVEL >= 10) {
2375
NDR_PRINT_FUNCTION_DEBUG(MakeCoffee, NDR_IN, r);
2378
ZERO_STRUCT(r->out);
2379
r->out.ORPCthat = talloc_zero(r, struct ORPCTHAT);
2380
if (r->out.ORPCthat == NULL) {
2385
r->out.result = _MakeCoffee(p, r);
2387
if (p->rng_fault_state) {
2389
/* Return true here, srv_pipe_hnd.c will take care */
2393
if (DEBUGLEVEL >= 10) {
2394
NDR_PRINT_FUNCTION_DEBUG(MakeCoffee, NDR_OUT | NDR_SET_VALUES, r);
2397
push = ndr_push_init_ctx(r);
2404
* carry over the pointer count to the reply in case we are
2405
* using full pointer. See NDR specification for full pointers
2407
push->ptr_count = pull->ptr_count;
2409
ndr_err = call->ndr_push(push, NDR_OUT, r);
2410
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2415
p->out_data.rdata = ndr_push_blob(push);
2416
talloc_steal(p->mem_ctx, p->out_data.rdata.data);
2425
static struct api_struct api_ICoffeeMachine_cmds[] =
2427
{"MAKECOFFEE", NDR_MAKECOFFEE, api_MakeCoffee},
2430
void ICoffeeMachine_get_pipe_fns(struct api_struct **fns, int *n_fns)
2432
*fns = api_ICoffeeMachine_cmds;
2433
*n_fns = sizeof(api_ICoffeeMachine_cmds) / sizeof(struct api_struct);
2436
NTSTATUS rpc_ICoffeeMachine_init(const struct rpc_srv_callbacks *rpc_srv_cb)
2438
return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "ICoffeeMachine", "ICoffeeMachine", &ndr_table_ICoffeeMachine, api_ICoffeeMachine_cmds, sizeof(api_ICoffeeMachine_cmds) / sizeof(struct api_struct), rpc_srv_cb);
2441
NTSTATUS rpc_ICoffeeMachine_shutdown(void)
2443
return rpc_srv_unregister(&ndr_table_ICoffeeMachine);
2445
static bool api_Read(struct pipes_struct *p)
2447
const struct ndr_interface_call *call;
2448
struct ndr_pull *pull;
2449
struct ndr_push *push;
2450
enum ndr_err_code ndr_err;
2453
call = &ndr_table_IStream.calls[NDR_READ];
2455
r = talloc(talloc_tos(), struct Read);
2460
pull = ndr_pull_init_blob(&p->in_data.data, r);
2466
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2468
pull->flags |= LIBNDR_FLAG_BIGENDIAN;
2470
ndr_err = call->ndr_pull(pull, NDR_IN, r);
2471
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2476
if (DEBUGLEVEL >= 10) {
2477
NDR_PRINT_FUNCTION_DEBUG(Read, NDR_IN, r);
2480
ZERO_STRUCT(r->out);
2481
r->out.ORPCthat = talloc_zero(r, struct ORPCTHAT);
2482
if (r->out.ORPCthat == NULL) {
2487
r->out.pv = talloc_zero_array(r, uint8_t, r->in.num_requested);
2488
if (r->out.pv == NULL) {
2493
r->out.num_read = talloc_zero(r, uint32_t);
2494
if (r->out.num_read == NULL) {
2499
r->out.result = _Read(p, r);
2501
if (p->rng_fault_state) {
2503
/* Return true here, srv_pipe_hnd.c will take care */
2507
if (DEBUGLEVEL >= 10) {
2508
NDR_PRINT_FUNCTION_DEBUG(Read, NDR_OUT | NDR_SET_VALUES, r);
2511
push = ndr_push_init_ctx(r);
2518
* carry over the pointer count to the reply in case we are
2519
* using full pointer. See NDR specification for full pointers
2521
push->ptr_count = pull->ptr_count;
2523
ndr_err = call->ndr_push(push, NDR_OUT, r);
2524
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2529
p->out_data.rdata = ndr_push_blob(push);
2530
talloc_steal(p->mem_ctx, p->out_data.rdata.data);
2537
static bool api_Write(struct pipes_struct *p)
2539
const struct ndr_interface_call *call;
2540
struct ndr_pull *pull;
2541
struct ndr_push *push;
2542
enum ndr_err_code ndr_err;
2545
call = &ndr_table_IStream.calls[NDR_WRITE];
2547
r = talloc(talloc_tos(), struct Write);
2552
pull = ndr_pull_init_blob(&p->in_data.data, r);
2558
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2560
pull->flags |= LIBNDR_FLAG_BIGENDIAN;
2562
ndr_err = call->ndr_pull(pull, NDR_IN, r);
2563
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2568
if (DEBUGLEVEL >= 10) {
2569
NDR_PRINT_FUNCTION_DEBUG(Write, NDR_IN, r);
2572
ZERO_STRUCT(r->out);
2573
r->out.ORPCthat = talloc_zero(r, struct ORPCTHAT);
2574
if (r->out.ORPCthat == NULL) {
2579
r->out.num_written = talloc_zero(r, uint32_t);
2580
if (r->out.num_written == NULL) {
2585
r->out.result = _Write(p, r);
2587
if (p->rng_fault_state) {
2589
/* Return true here, srv_pipe_hnd.c will take care */
2593
if (DEBUGLEVEL >= 10) {
2594
NDR_PRINT_FUNCTION_DEBUG(Write, NDR_OUT | NDR_SET_VALUES, r);
2597
push = ndr_push_init_ctx(r);
2604
* carry over the pointer count to the reply in case we are
2605
* using full pointer. See NDR specification for full pointers
2607
push->ptr_count = pull->ptr_count;
2609
ndr_err = call->ndr_push(push, NDR_OUT, r);
2610
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2615
p->out_data.rdata = ndr_push_blob(push);
2616
talloc_steal(p->mem_ctx, p->out_data.rdata.data);
2625
static struct api_struct api_IStream_cmds[] =
2627
{"READ", NDR_READ, api_Read},
2628
{"WRITE", NDR_WRITE, api_Write},
2631
void IStream_get_pipe_fns(struct api_struct **fns, int *n_fns)
2633
*fns = api_IStream_cmds;
2634
*n_fns = sizeof(api_IStream_cmds) / sizeof(struct api_struct);
2637
NTSTATUS rpc_IStream_init(const struct rpc_srv_callbacks *rpc_srv_cb)
2639
return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "IStream", "IStream", &ndr_table_IStream, api_IStream_cmds, sizeof(api_IStream_cmds) / sizeof(struct api_struct), rpc_srv_cb);
2642
NTSTATUS rpc_IStream_shutdown(void)
2644
return rpc_srv_unregister(&ndr_table_IStream);