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
;
14 enum ndr_err_code ndr_err
;
16 struct initshutdown_Init
*r
;
18 call
= &ndr_table_initshutdown
.calls
[NDR_INITSHUTDOWN_INIT
];
20 r
= talloc(talloc_tos(), 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 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
38 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
43 if (DEBUGLEVEL
>= 10) {
44 NDR_PRINT_IN_DEBUG(initshutdown_Init
, r
);
47 r
->out
.result
= _initshutdown_Init(p
, r
);
49 if (p
->rng_fault_state
) {
51 /* Return true here, srv_pipe_hnd.c will take care */
55 if (DEBUGLEVEL
>= 10) {
56 NDR_PRINT_OUT_DEBUG(initshutdown_Init
, r
);
59 push
= ndr_push_init_ctx(r
);
65 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
66 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
71 blob
= ndr_push_blob(push
);
72 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
82 static bool api_initshutdown_Abort(pipes_struct
*p
)
84 const struct ndr_interface_call
*call
;
85 struct ndr_pull
*pull
;
86 struct ndr_push
*push
;
87 enum ndr_err_code ndr_err
;
89 struct initshutdown_Abort
*r
;
91 call
= &ndr_table_initshutdown
.calls
[NDR_INITSHUTDOWN_ABORT
];
93 r
= talloc(talloc_tos(), struct initshutdown_Abort
);
98 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
103 pull
= ndr_pull_init_blob(&blob
, r
);
109 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
110 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
111 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
116 if (DEBUGLEVEL
>= 10) {
117 NDR_PRINT_IN_DEBUG(initshutdown_Abort
, r
);
120 r
->out
.result
= _initshutdown_Abort(p
, r
);
122 if (p
->rng_fault_state
) {
124 /* Return true here, srv_pipe_hnd.c will take care */
128 if (DEBUGLEVEL
>= 10) {
129 NDR_PRINT_OUT_DEBUG(initshutdown_Abort
, r
);
132 push
= ndr_push_init_ctx(r
);
138 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
139 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
144 blob
= ndr_push_blob(push
);
145 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
155 static bool api_initshutdown_InitEx(pipes_struct
*p
)
157 const struct ndr_interface_call
*call
;
158 struct ndr_pull
*pull
;
159 struct ndr_push
*push
;
160 enum ndr_err_code ndr_err
;
162 struct initshutdown_InitEx
*r
;
164 call
= &ndr_table_initshutdown
.calls
[NDR_INITSHUTDOWN_INITEX
];
166 r
= talloc(talloc_tos(), struct initshutdown_InitEx
);
171 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
176 pull
= ndr_pull_init_blob(&blob
, r
);
182 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
183 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
184 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
189 if (DEBUGLEVEL
>= 10) {
190 NDR_PRINT_IN_DEBUG(initshutdown_InitEx
, r
);
193 r
->out
.result
= _initshutdown_InitEx(p
, r
);
195 if (p
->rng_fault_state
) {
197 /* Return true here, srv_pipe_hnd.c will take care */
201 if (DEBUGLEVEL
>= 10) {
202 NDR_PRINT_OUT_DEBUG(initshutdown_InitEx
, r
);
205 push
= ndr_push_init_ctx(r
);
211 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
212 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
217 blob
= ndr_push_blob(push
);
218 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
230 static struct api_struct api_initshutdown_cmds
[] =
232 {"INITSHUTDOWN_INIT", NDR_INITSHUTDOWN_INIT
, api_initshutdown_Init
},
233 {"INITSHUTDOWN_ABORT", NDR_INITSHUTDOWN_ABORT
, api_initshutdown_Abort
},
234 {"INITSHUTDOWN_INITEX", NDR_INITSHUTDOWN_INITEX
, api_initshutdown_InitEx
},
237 void initshutdown_get_pipe_fns(struct api_struct
**fns
, int *n_fns
)
239 *fns
= api_initshutdown_cmds
;
240 *n_fns
= sizeof(api_initshutdown_cmds
) / sizeof(struct api_struct
);
243 NTSTATUS
rpc_initshutdown_init(void)
245 return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION
, "initshutdown", "initshutdown", api_initshutdown_cmds
, sizeof(api_initshutdown_cmds
) / sizeof(struct api_struct
));