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, NULL);
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, NULL);
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, NULL);
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, NULL);
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, NULL);
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, NULL);
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_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const struct ndr_interface_table *table, uint32_t opnum, void *_r)
245
if (cli->pipes_struct == NULL) {
246
return NT_STATUS_INVALID_PARAMETER;
251
case NDR_INITSHUTDOWN_INIT: {
252
struct initshutdown_Init *r = (struct initshutdown_Init *)_r;
253
r->out.result = _initshutdown_Init(cli->pipes_struct, r);
257
case NDR_INITSHUTDOWN_ABORT: {
258
struct initshutdown_Abort *r = (struct initshutdown_Abort *)_r;
259
r->out.result = _initshutdown_Abort(cli->pipes_struct, r);
263
case NDR_INITSHUTDOWN_INITEX: {
264
struct initshutdown_InitEx *r = (struct initshutdown_InitEx *)_r;
265
r->out.result = _initshutdown_InitEx(cli->pipes_struct, r);
270
return NT_STATUS_NOT_IMPLEMENTED;
274
NTSTATUS rpc_initshutdown_init(void)
276
return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "initshutdown", "initshutdown", &ndr_table_initshutdown, api_initshutdown_cmds, sizeof(api_initshutdown_cmds) / sizeof(struct api_struct));