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 struct ndr_pull
*pull
;
12 struct ndr_push
*push
;
15 struct initshutdown_Init r
;
16 TALLOC_CTX
*mem_ctx
= talloc_init("api_initshutdown_Init");
18 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
23 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
29 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
30 status
= ndr_pull_initshutdown_Init(pull
, NDR_IN
, &r
);
31 if (NT_STATUS_IS_ERR(status
)) {
37 NDR_PRINT_IN_DEBUG(initshutdown_Init
, &r
);
39 r
.out
.result
= _initshutdown_Init(p
, &r
);
41 if (p
->rng_fault_state
) {
43 /* Return True here, srv_pipe_hnd.c will take care */
48 NDR_PRINT_OUT_DEBUG(initshutdown_Init
, &r
);
50 push
= ndr_push_init_ctx(mem_ctx
);
56 status
= ndr_push_initshutdown_Init(push
, NDR_OUT
, &r
);
57 if (NT_STATUS_IS_ERR(status
)) {
62 blob
= ndr_push_blob(push
);
63 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
73 static BOOL
api_initshutdown_Abort(pipes_struct
*p
)
75 struct ndr_pull
*pull
;
76 struct ndr_push
*push
;
79 struct initshutdown_Abort r
;
80 TALLOC_CTX
*mem_ctx
= talloc_init("api_initshutdown_Abort");
82 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
87 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
93 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
94 status
= ndr_pull_initshutdown_Abort(pull
, NDR_IN
, &r
);
95 if (NT_STATUS_IS_ERR(status
)) {
100 if (DEBUGLEVEL
>= 10)
101 NDR_PRINT_IN_DEBUG(initshutdown_Abort
, &r
);
103 r
.out
.result
= _initshutdown_Abort(p
, &r
);
105 if (p
->rng_fault_state
) {
106 talloc_free(mem_ctx
);
107 /* Return True here, srv_pipe_hnd.c will take care */
111 if (DEBUGLEVEL
>= 10)
112 NDR_PRINT_OUT_DEBUG(initshutdown_Abort
, &r
);
114 push
= ndr_push_init_ctx(mem_ctx
);
116 talloc_free(mem_ctx
);
120 status
= ndr_push_initshutdown_Abort(push
, NDR_OUT
, &r
);
121 if (NT_STATUS_IS_ERR(status
)) {
122 talloc_free(mem_ctx
);
126 blob
= ndr_push_blob(push
);
127 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
128 talloc_free(mem_ctx
);
132 talloc_free(mem_ctx
);
137 static BOOL
api_initshutdown_InitEx(pipes_struct
*p
)
139 struct ndr_pull
*pull
;
140 struct ndr_push
*push
;
143 struct initshutdown_InitEx r
;
144 TALLOC_CTX
*mem_ctx
= talloc_init("api_initshutdown_InitEx");
146 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
147 talloc_free(mem_ctx
);
151 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
153 talloc_free(mem_ctx
);
157 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
158 status
= ndr_pull_initshutdown_InitEx(pull
, NDR_IN
, &r
);
159 if (NT_STATUS_IS_ERR(status
)) {
160 talloc_free(mem_ctx
);
164 if (DEBUGLEVEL
>= 10)
165 NDR_PRINT_IN_DEBUG(initshutdown_InitEx
, &r
);
167 r
.out
.result
= _initshutdown_InitEx(p
, &r
);
169 if (p
->rng_fault_state
) {
170 talloc_free(mem_ctx
);
171 /* Return True here, srv_pipe_hnd.c will take care */
175 if (DEBUGLEVEL
>= 10)
176 NDR_PRINT_OUT_DEBUG(initshutdown_InitEx
, &r
);
178 push
= ndr_push_init_ctx(mem_ctx
);
180 talloc_free(mem_ctx
);
184 status
= ndr_push_initshutdown_InitEx(push
, NDR_OUT
, &r
);
185 if (NT_STATUS_IS_ERR(status
)) {
186 talloc_free(mem_ctx
);
190 blob
= ndr_push_blob(push
);
191 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
192 talloc_free(mem_ctx
);
196 talloc_free(mem_ctx
);
203 static struct api_struct api_initshutdown_cmds
[] =
205 {"INITSHUTDOWN_INIT", DCERPC_INITSHUTDOWN_INIT
, api_initshutdown_Init
},
206 {"INITSHUTDOWN_ABORT", DCERPC_INITSHUTDOWN_ABORT
, api_initshutdown_Abort
},
207 {"INITSHUTDOWN_INITEX", DCERPC_INITSHUTDOWN_INITEX
, api_initshutdown_InitEx
},
210 void initshutdown_get_pipe_fns(struct api_struct
**fns
, int *n_fns
)
212 *fns
= api_initshutdown_cmds
;
213 *n_fns
= sizeof(api_initshutdown_cmds
) / sizeof(struct api_struct
);
216 NTSTATUS
rpc_initshutdown_init(void)
218 return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION
, "initshutdown", "initshutdown", api_initshutdown_cmds
, sizeof(api_initshutdown_cmds
) / sizeof(struct api_struct
));