2 * Unix SMB/CIFS implementation.
3 * server auto-generated by pidl. DO NOT MODIFY!
7 #include "librpc/gen_ndr/srv_epmapper.h"
9 static bool api_epm_Insert(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
;
18 call
= &ndr_table_epmapper
.calls
[NDR_EPM_INSERT
];
20 r
= talloc(talloc_tos(), struct epm_Insert
);
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(epm_Insert
, r
);
47 r
->out
.result
= _epm_Insert(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(epm_Insert
, 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_epm_Delete(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
;
91 call
= &ndr_table_epmapper
.calls
[NDR_EPM_DELETE
];
93 r
= talloc(talloc_tos(), struct epm_Delete
);
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(epm_Delete
, r
);
120 r
->out
.result
= _epm_Delete(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(epm_Delete
, 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_epm_Lookup(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 epm_Lookup
*r
;
164 call
= &ndr_table_epmapper
.calls
[NDR_EPM_LOOKUP
];
166 r
= talloc(talloc_tos(), struct epm_Lookup
);
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(epm_Lookup
, r
);
194 r
->out
.entry_handle
= r
->in
.entry_handle
;
195 r
->out
.num_ents
= talloc_zero(r
, uint32_t);
196 if (r
->out
.num_ents
== NULL
) {
201 r
->out
.entries
= talloc_zero_array(r
, struct epm_entry_t
, r
->in
.max_ents
);
202 if (r
->out
.entries
== NULL
) {
207 r
->out
.result
= _epm_Lookup(p
, r
);
209 if (p
->rng_fault_state
) {
211 /* Return true here, srv_pipe_hnd.c will take care */
215 if (DEBUGLEVEL
>= 10) {
216 NDR_PRINT_OUT_DEBUG(epm_Lookup
, r
);
219 push
= ndr_push_init_ctx(r
);
225 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
226 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
231 blob
= ndr_push_blob(push
);
232 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
242 static bool api_epm_Map(pipes_struct
*p
)
244 const struct ndr_interface_call
*call
;
245 struct ndr_pull
*pull
;
246 struct ndr_push
*push
;
247 enum ndr_err_code ndr_err
;
251 call
= &ndr_table_epmapper
.calls
[NDR_EPM_MAP
];
253 r
= talloc(talloc_tos(), struct epm_Map
);
258 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
263 pull
= ndr_pull_init_blob(&blob
, r
);
269 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
270 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
271 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
276 if (DEBUGLEVEL
>= 10) {
277 NDR_PRINT_IN_DEBUG(epm_Map
, r
);
281 r
->out
.entry_handle
= r
->in
.entry_handle
;
282 r
->out
.num_towers
= talloc_zero(r
, uint32_t);
283 if (r
->out
.num_towers
== NULL
) {
288 r
->out
.towers
= talloc_zero_array(r
, struct epm_twr_p_t
, r
->in
.max_towers
);
289 if (r
->out
.towers
== NULL
) {
294 r
->out
.result
= _epm_Map(p
, r
);
296 if (p
->rng_fault_state
) {
298 /* Return true here, srv_pipe_hnd.c will take care */
302 if (DEBUGLEVEL
>= 10) {
303 NDR_PRINT_OUT_DEBUG(epm_Map
, r
);
306 push
= ndr_push_init_ctx(r
);
312 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
313 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
318 blob
= ndr_push_blob(push
);
319 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
329 static bool api_epm_LookupHandleFree(pipes_struct
*p
)
331 const struct ndr_interface_call
*call
;
332 struct ndr_pull
*pull
;
333 struct ndr_push
*push
;
334 enum ndr_err_code ndr_err
;
336 struct epm_LookupHandleFree
*r
;
338 call
= &ndr_table_epmapper
.calls
[NDR_EPM_LOOKUPHANDLEFREE
];
340 r
= talloc(talloc_tos(), struct epm_LookupHandleFree
);
345 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
350 pull
= ndr_pull_init_blob(&blob
, r
);
356 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
357 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
358 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
363 if (DEBUGLEVEL
>= 10) {
364 NDR_PRINT_IN_DEBUG(epm_LookupHandleFree
, r
);
368 r
->out
.entry_handle
= r
->in
.entry_handle
;
369 r
->out
.result
= _epm_LookupHandleFree(p
, r
);
371 if (p
->rng_fault_state
) {
373 /* Return true here, srv_pipe_hnd.c will take care */
377 if (DEBUGLEVEL
>= 10) {
378 NDR_PRINT_OUT_DEBUG(epm_LookupHandleFree
, r
);
381 push
= ndr_push_init_ctx(r
);
387 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
388 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
393 blob
= ndr_push_blob(push
);
394 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
404 static bool api_epm_InqObject(pipes_struct
*p
)
406 const struct ndr_interface_call
*call
;
407 struct ndr_pull
*pull
;
408 struct ndr_push
*push
;
409 enum ndr_err_code ndr_err
;
411 struct epm_InqObject
*r
;
413 call
= &ndr_table_epmapper
.calls
[NDR_EPM_INQOBJECT
];
415 r
= talloc(talloc_tos(), struct epm_InqObject
);
420 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
425 pull
= ndr_pull_init_blob(&blob
, r
);
431 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
432 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
433 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
438 if (DEBUGLEVEL
>= 10) {
439 NDR_PRINT_IN_DEBUG(epm_InqObject
, r
);
442 r
->out
.result
= _epm_InqObject(p
, r
);
444 if (p
->rng_fault_state
) {
446 /* Return true here, srv_pipe_hnd.c will take care */
450 if (DEBUGLEVEL
>= 10) {
451 NDR_PRINT_OUT_DEBUG(epm_InqObject
, r
);
454 push
= ndr_push_init_ctx(r
);
460 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
461 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
466 blob
= ndr_push_blob(push
);
467 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
477 static bool api_epm_MgmtDelete(pipes_struct
*p
)
479 const struct ndr_interface_call
*call
;
480 struct ndr_pull
*pull
;
481 struct ndr_push
*push
;
482 enum ndr_err_code ndr_err
;
484 struct epm_MgmtDelete
*r
;
486 call
= &ndr_table_epmapper
.calls
[NDR_EPM_MGMTDELETE
];
488 r
= talloc(talloc_tos(), struct epm_MgmtDelete
);
493 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
498 pull
= ndr_pull_init_blob(&blob
, r
);
504 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
505 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
506 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
511 if (DEBUGLEVEL
>= 10) {
512 NDR_PRINT_IN_DEBUG(epm_MgmtDelete
, r
);
515 r
->out
.result
= _epm_MgmtDelete(p
, r
);
517 if (p
->rng_fault_state
) {
519 /* Return true here, srv_pipe_hnd.c will take care */
523 if (DEBUGLEVEL
>= 10) {
524 NDR_PRINT_OUT_DEBUG(epm_MgmtDelete
, r
);
527 push
= ndr_push_init_ctx(r
);
533 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
534 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
539 blob
= ndr_push_blob(push
);
540 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
550 static bool api_epm_MapAuth(pipes_struct
*p
)
552 const struct ndr_interface_call
*call
;
553 struct ndr_pull
*pull
;
554 struct ndr_push
*push
;
555 enum ndr_err_code ndr_err
;
557 struct epm_MapAuth
*r
;
559 call
= &ndr_table_epmapper
.calls
[NDR_EPM_MAPAUTH
];
561 r
= talloc(talloc_tos(), struct epm_MapAuth
);
566 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
571 pull
= ndr_pull_init_blob(&blob
, r
);
577 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
578 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
579 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
584 if (DEBUGLEVEL
>= 10) {
585 NDR_PRINT_IN_DEBUG(epm_MapAuth
, r
);
588 r
->out
.result
= _epm_MapAuth(p
, r
);
590 if (p
->rng_fault_state
) {
592 /* Return true here, srv_pipe_hnd.c will take care */
596 if (DEBUGLEVEL
>= 10) {
597 NDR_PRINT_OUT_DEBUG(epm_MapAuth
, r
);
600 push
= ndr_push_init_ctx(r
);
606 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
607 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
612 blob
= ndr_push_blob(push
);
613 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
625 static struct api_struct api_epmapper_cmds
[] =
627 {"EPM_INSERT", NDR_EPM_INSERT
, api_epm_Insert
},
628 {"EPM_DELETE", NDR_EPM_DELETE
, api_epm_Delete
},
629 {"EPM_LOOKUP", NDR_EPM_LOOKUP
, api_epm_Lookup
},
630 {"EPM_MAP", NDR_EPM_MAP
, api_epm_Map
},
631 {"EPM_LOOKUPHANDLEFREE", NDR_EPM_LOOKUPHANDLEFREE
, api_epm_LookupHandleFree
},
632 {"EPM_INQOBJECT", NDR_EPM_INQOBJECT
, api_epm_InqObject
},
633 {"EPM_MGMTDELETE", NDR_EPM_MGMTDELETE
, api_epm_MgmtDelete
},
634 {"EPM_MAPAUTH", NDR_EPM_MAPAUTH
, api_epm_MapAuth
},
637 void epmapper_get_pipe_fns(struct api_struct
**fns
, int *n_fns
)
639 *fns
= api_epmapper_cmds
;
640 *n_fns
= sizeof(api_epmapper_cmds
) / sizeof(struct api_struct
);
643 NTSTATUS
rpc_epmapper_init(void)
645 return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION
, "epmapper", "epmapper", api_epmapper_cmds
, sizeof(api_epmapper_cmds
) / sizeof(struct api_struct
));