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;
18 call = &ndr_table_epmapper.calls[NDR_EPM_INSERT];
20 r = talloc(NULL, 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 status = call->ndr_pull(pull, NDR_IN, r);
38 if (NT_STATUS_IS_ERR(status)) {
44 NDR_PRINT_IN_DEBUG(epm_Insert, r);
46 r->out.result = _epm_Insert(p, r);
48 if (p->rng_fault_state) {
50 /* Return True here, srv_pipe_hnd.c will take care */
55 NDR_PRINT_OUT_DEBUG(epm_Insert, 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_epm_Delete(pipes_struct *p)
82 const struct ndr_interface_call *call;
83 struct ndr_pull *pull;
84 struct ndr_push *push;
89 call = &ndr_table_epmapper.calls[NDR_EPM_DELETE];
91 r = talloc(NULL, struct epm_Delete);
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(epm_Delete, r);
117 r->out.result = _epm_Delete(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(epm_Delete, 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_epm_Lookup(pipes_struct *p)
153 const struct ndr_interface_call *call;
154 struct ndr_pull *pull;
155 struct ndr_push *push;
158 struct epm_Lookup *r;
160 call = &ndr_table_epmapper.calls[NDR_EPM_LOOKUP];
162 r = talloc(NULL, struct epm_Lookup);
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(epm_Lookup, r);
189 r->out.entry_handle = r->in.entry_handle;
190 r->out.num_ents = talloc_zero(r, uint32_t);
191 if (r->out.num_ents == NULL) {
196 r->out.entries = talloc_zero_array(r, struct epm_entry_t, r->in.max_ents);
197 if (r->out.entries == NULL) {
202 r->out.result = _epm_Lookup(p, r);
204 if (p->rng_fault_state) {
206 /* Return True here, srv_pipe_hnd.c will take care */
210 if (DEBUGLEVEL >= 10)
211 NDR_PRINT_OUT_DEBUG(epm_Lookup, r);
213 push = ndr_push_init_ctx(r);
219 status = call->ndr_push(push, NDR_OUT, r);
220 if (NT_STATUS_IS_ERR(status)) {
225 blob = ndr_push_blob(push);
226 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
236 static BOOL api_epm_Map(pipes_struct *p)
238 const struct ndr_interface_call *call;
239 struct ndr_pull *pull;
240 struct ndr_push *push;
245 call = &ndr_table_epmapper.calls[NDR_EPM_MAP];
247 r = talloc(NULL, struct epm_Map);
252 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
257 pull = ndr_pull_init_blob(&blob, r);
263 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
264 status = call->ndr_pull(pull, NDR_IN, r);
265 if (NT_STATUS_IS_ERR(status)) {
270 if (DEBUGLEVEL >= 10)
271 NDR_PRINT_IN_DEBUG(epm_Map, r);
274 r->out.entry_handle = r->in.entry_handle;
275 r->out.num_towers = talloc_zero(r, uint32_t);
276 if (r->out.num_towers == NULL) {
281 r->out.towers = talloc_zero_array(r, struct epm_twr_p_t, r->in.max_towers);
282 if (r->out.towers == NULL) {
287 r->out.result = _epm_Map(p, r);
289 if (p->rng_fault_state) {
291 /* Return True here, srv_pipe_hnd.c will take care */
295 if (DEBUGLEVEL >= 10)
296 NDR_PRINT_OUT_DEBUG(epm_Map, r);
298 push = ndr_push_init_ctx(r);
304 status = call->ndr_push(push, NDR_OUT, r);
305 if (NT_STATUS_IS_ERR(status)) {
310 blob = ndr_push_blob(push);
311 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
321 static BOOL api_epm_LookupHandleFree(pipes_struct *p)
323 const struct ndr_interface_call *call;
324 struct ndr_pull *pull;
325 struct ndr_push *push;
328 struct epm_LookupHandleFree *r;
330 call = &ndr_table_epmapper.calls[NDR_EPM_LOOKUPHANDLEFREE];
332 r = talloc(NULL, struct epm_LookupHandleFree);
337 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
342 pull = ndr_pull_init_blob(&blob, r);
348 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
349 status = call->ndr_pull(pull, NDR_IN, r);
350 if (NT_STATUS_IS_ERR(status)) {
355 if (DEBUGLEVEL >= 10)
356 NDR_PRINT_IN_DEBUG(epm_LookupHandleFree, r);
359 r->out.entry_handle = r->in.entry_handle;
360 r->out.result = _epm_LookupHandleFree(p, r);
362 if (p->rng_fault_state) {
364 /* Return True here, srv_pipe_hnd.c will take care */
368 if (DEBUGLEVEL >= 10)
369 NDR_PRINT_OUT_DEBUG(epm_LookupHandleFree, r);
371 push = ndr_push_init_ctx(r);
377 status = call->ndr_push(push, NDR_OUT, r);
378 if (NT_STATUS_IS_ERR(status)) {
383 blob = ndr_push_blob(push);
384 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
394 static BOOL api_epm_InqObject(pipes_struct *p)
396 const struct ndr_interface_call *call;
397 struct ndr_pull *pull;
398 struct ndr_push *push;
401 struct epm_InqObject *r;
403 call = &ndr_table_epmapper.calls[NDR_EPM_INQOBJECT];
405 r = talloc(NULL, struct epm_InqObject);
410 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
415 pull = ndr_pull_init_blob(&blob, r);
421 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
422 status = call->ndr_pull(pull, NDR_IN, r);
423 if (NT_STATUS_IS_ERR(status)) {
428 if (DEBUGLEVEL >= 10)
429 NDR_PRINT_IN_DEBUG(epm_InqObject, r);
431 r->out.result = _epm_InqObject(p, r);
433 if (p->rng_fault_state) {
435 /* Return True here, srv_pipe_hnd.c will take care */
439 if (DEBUGLEVEL >= 10)
440 NDR_PRINT_OUT_DEBUG(epm_InqObject, r);
442 push = ndr_push_init_ctx(r);
448 status = call->ndr_push(push, NDR_OUT, r);
449 if (NT_STATUS_IS_ERR(status)) {
454 blob = ndr_push_blob(push);
455 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
465 static BOOL api_epm_MgmtDelete(pipes_struct *p)
467 const struct ndr_interface_call *call;
468 struct ndr_pull *pull;
469 struct ndr_push *push;
472 struct epm_MgmtDelete *r;
474 call = &ndr_table_epmapper.calls[NDR_EPM_MGMTDELETE];
476 r = talloc(NULL, struct epm_MgmtDelete);
481 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
486 pull = ndr_pull_init_blob(&blob, r);
492 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
493 status = call->ndr_pull(pull, NDR_IN, r);
494 if (NT_STATUS_IS_ERR(status)) {
499 if (DEBUGLEVEL >= 10)
500 NDR_PRINT_IN_DEBUG(epm_MgmtDelete, r);
502 r->out.result = _epm_MgmtDelete(p, r);
504 if (p->rng_fault_state) {
506 /* Return True here, srv_pipe_hnd.c will take care */
510 if (DEBUGLEVEL >= 10)
511 NDR_PRINT_OUT_DEBUG(epm_MgmtDelete, r);
513 push = ndr_push_init_ctx(r);
519 status = call->ndr_push(push, NDR_OUT, r);
520 if (NT_STATUS_IS_ERR(status)) {
525 blob = ndr_push_blob(push);
526 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
536 static BOOL api_epm_MapAuth(pipes_struct *p)
538 const struct ndr_interface_call *call;
539 struct ndr_pull *pull;
540 struct ndr_push *push;
543 struct epm_MapAuth *r;
545 call = &ndr_table_epmapper.calls[NDR_EPM_MAPAUTH];
547 r = talloc(NULL, struct epm_MapAuth);
552 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
557 pull = ndr_pull_init_blob(&blob, r);
563 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
564 status = call->ndr_pull(pull, NDR_IN, r);
565 if (NT_STATUS_IS_ERR(status)) {
570 if (DEBUGLEVEL >= 10)
571 NDR_PRINT_IN_DEBUG(epm_MapAuth, r);
573 r->out.result = _epm_MapAuth(p, r);
575 if (p->rng_fault_state) {
577 /* Return True here, srv_pipe_hnd.c will take care */
581 if (DEBUGLEVEL >= 10)
582 NDR_PRINT_OUT_DEBUG(epm_MapAuth, r);
584 push = ndr_push_init_ctx(r);
590 status = call->ndr_push(push, NDR_OUT, r);
591 if (NT_STATUS_IS_ERR(status)) {
596 blob = ndr_push_blob(push);
597 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
609 static struct api_struct api_epmapper_cmds[] =
611 {"EPM_INSERT", NDR_EPM_INSERT, api_epm_Insert},
612 {"EPM_DELETE", NDR_EPM_DELETE, api_epm_Delete},
613 {"EPM_LOOKUP", NDR_EPM_LOOKUP, api_epm_Lookup},
614 {"EPM_MAP", NDR_EPM_MAP, api_epm_Map},
615 {"EPM_LOOKUPHANDLEFREE", NDR_EPM_LOOKUPHANDLEFREE, api_epm_LookupHandleFree},
616 {"EPM_INQOBJECT", NDR_EPM_INQOBJECT, api_epm_InqObject},
617 {"EPM_MGMTDELETE", NDR_EPM_MGMTDELETE, api_epm_MgmtDelete},
618 {"EPM_MAPAUTH", NDR_EPM_MAPAUTH, api_epm_MapAuth},
621 void epmapper_get_pipe_fns(struct api_struct **fns, int *n_fns)
623 *fns = api_epmapper_cmds;
624 *n_fns = sizeof(api_epmapper_cmds) / sizeof(struct api_struct);
627 NTSTATUS rpc_epmapper_init(void)
629 return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "epmapper", "epmapper", api_epmapper_cmds, sizeof(api_epmapper_cmds) / sizeof(struct api_struct));