2 * Unix SMB/CIFS implementation.
3 * server auto-generated by pidl. DO NOT MODIFY!
7 #include "librpc/gen_ndr/srv_initshutdown.h"
9 static bool api_initshutdown_Init(pipes_struct *p)
11 const struct ndr_interface_call *call;
12 struct ndr_pull *pull;
13 struct ndr_push *push;
16 struct initshutdown_Init *r;
18 call = &ndr_table_initshutdown.calls[NDR_INITSHUTDOWN_INIT];
20 r = talloc(NULL, struct initshutdown_Init);
25 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
30 pull = ndr_pull_init_blob(&blob, r);
36 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
37 status = call->ndr_pull(pull, NDR_IN, r);
38 if (NT_STATUS_IS_ERR(status)) {
44 NDR_PRINT_IN_DEBUG(initshutdown_Init, r);
46 r->out.result = _initshutdown_Init(p, r);
48 if (p->rng_fault_state) {
50 /* Return True here, srv_pipe_hnd.c will take care */
55 NDR_PRINT_OUT_DEBUG(initshutdown_Init, r);
57 push = ndr_push_init_ctx(r);
63 status = call->ndr_push(push, NDR_OUT, r);
64 if (NT_STATUS_IS_ERR(status)) {
69 blob = ndr_push_blob(push);
70 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
80 static bool api_initshutdown_Abort(pipes_struct *p)
82 const struct ndr_interface_call *call;
83 struct ndr_pull *pull;
84 struct ndr_push *push;
87 struct initshutdown_Abort *r;
89 call = &ndr_table_initshutdown.calls[NDR_INITSHUTDOWN_ABORT];
91 r = talloc(NULL, struct initshutdown_Abort);
96 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
101 pull = ndr_pull_init_blob(&blob, r);
107 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
108 status = call->ndr_pull(pull, NDR_IN, r);
109 if (NT_STATUS_IS_ERR(status)) {
114 if (DEBUGLEVEL >= 10)
115 NDR_PRINT_IN_DEBUG(initshutdown_Abort, r);
117 r->out.result = _initshutdown_Abort(p, r);
119 if (p->rng_fault_state) {
121 /* Return True here, srv_pipe_hnd.c will take care */
125 if (DEBUGLEVEL >= 10)
126 NDR_PRINT_OUT_DEBUG(initshutdown_Abort, r);
128 push = ndr_push_init_ctx(r);
134 status = call->ndr_push(push, NDR_OUT, r);
135 if (NT_STATUS_IS_ERR(status)) {
140 blob = ndr_push_blob(push);
141 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
151 static bool api_initshutdown_InitEx(pipes_struct *p)
153 const struct ndr_interface_call *call;
154 struct ndr_pull *pull;
155 struct ndr_push *push;
158 struct initshutdown_InitEx *r;
160 call = &ndr_table_initshutdown.calls[NDR_INITSHUTDOWN_INITEX];
162 r = talloc(NULL, struct initshutdown_InitEx);
167 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
172 pull = ndr_pull_init_blob(&blob, r);
178 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
179 status = call->ndr_pull(pull, NDR_IN, r);
180 if (NT_STATUS_IS_ERR(status)) {
185 if (DEBUGLEVEL >= 10)
186 NDR_PRINT_IN_DEBUG(initshutdown_InitEx, r);
188 r->out.result = _initshutdown_InitEx(p, r);
190 if (p->rng_fault_state) {
192 /* Return True here, srv_pipe_hnd.c will take care */
196 if (DEBUGLEVEL >= 10)
197 NDR_PRINT_OUT_DEBUG(initshutdown_InitEx, r);
199 push = ndr_push_init_ctx(r);
205 status = call->ndr_push(push, NDR_OUT, r);
206 if (NT_STATUS_IS_ERR(status)) {
211 blob = ndr_push_blob(push);
212 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
224 static struct api_struct api_initshutdown_cmds[] =
226 {"INITSHUTDOWN_INIT", NDR_INITSHUTDOWN_INIT, api_initshutdown_Init},
227 {"INITSHUTDOWN_ABORT", NDR_INITSHUTDOWN_ABORT, api_initshutdown_Abort},
228 {"INITSHUTDOWN_INITEX", NDR_INITSHUTDOWN_INITEX, api_initshutdown_InitEx},
231 void initshutdown_get_pipe_fns(struct api_struct **fns, int *n_fns)
233 *fns = api_initshutdown_cmds;
234 *n_fns = sizeof(api_initshutdown_cmds) / sizeof(struct api_struct);
237 NTSTATUS rpc_initshutdown_init(void)
239 return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "initshutdown", "initshutdown", api_initshutdown_cmds, sizeof(api_initshutdown_cmds) / sizeof(struct api_struct));