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 struct ndr_pull
*pull
;
12 struct ndr_push
*push
;
16 TALLOC_CTX
*mem_ctx
= talloc_init("api_epm_Insert");
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_epm_Insert(pull
, NDR_IN
, &r
);
31 if (NT_STATUS_IS_ERR(status
)) {
37 NDR_PRINT_IN_DEBUG(epm_Insert
, &r
);
39 r
.out
.result
= _epm_Insert(p
, &r
);
41 if (p
->rng_fault_state
) {
43 /* Return True here, srv_pipe_hnd.c will take care */
48 NDR_PRINT_OUT_DEBUG(epm_Insert
, &r
);
50 push
= ndr_push_init_ctx(mem_ctx
);
56 status
= ndr_push_epm_Insert(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_epm_Delete(pipes_struct
*p
)
75 struct ndr_pull
*pull
;
76 struct ndr_push
*push
;
80 TALLOC_CTX
*mem_ctx
= talloc_init("api_epm_Delete");
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_epm_Delete(pull
, NDR_IN
, &r
);
95 if (NT_STATUS_IS_ERR(status
)) {
100 if (DEBUGLEVEL
>= 10)
101 NDR_PRINT_IN_DEBUG(epm_Delete
, &r
);
103 r
.out
.result
= _epm_Delete(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(epm_Delete
, &r
);
114 push
= ndr_push_init_ctx(mem_ctx
);
116 talloc_free(mem_ctx
);
120 status
= ndr_push_epm_Delete(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_epm_Lookup(pipes_struct
*p
)
139 struct ndr_pull
*pull
;
140 struct ndr_push
*push
;
144 TALLOC_CTX
*mem_ctx
= talloc_init("api_epm_Lookup");
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_epm_Lookup(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(epm_Lookup
, &r
);
168 r
.out
.entry_handle
= r
.in
.entry_handle
;
169 r
.out
.num_ents
= talloc_zero(mem_ctx
, uint32_t);
170 if (r
.out
.num_ents
== NULL
) {
171 talloc_free(mem_ctx
);
175 r
.out
.entries
= talloc_zero_array(mem_ctx
, struct epm_entry_t
, r
.in
.max_ents
);
176 if (r
.out
.entries
== NULL
) {
177 talloc_free(mem_ctx
);
181 r
.out
.result
= _epm_Lookup(p
, &r
);
183 if (p
->rng_fault_state
) {
184 talloc_free(mem_ctx
);
185 /* Return True here, srv_pipe_hnd.c will take care */
189 if (DEBUGLEVEL
>= 10)
190 NDR_PRINT_OUT_DEBUG(epm_Lookup
, &r
);
192 push
= ndr_push_init_ctx(mem_ctx
);
194 talloc_free(mem_ctx
);
198 status
= ndr_push_epm_Lookup(push
, NDR_OUT
, &r
);
199 if (NT_STATUS_IS_ERR(status
)) {
200 talloc_free(mem_ctx
);
204 blob
= ndr_push_blob(push
);
205 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
206 talloc_free(mem_ctx
);
210 talloc_free(mem_ctx
);
215 static BOOL
api_epm_Map(pipes_struct
*p
)
217 struct ndr_pull
*pull
;
218 struct ndr_push
*push
;
222 TALLOC_CTX
*mem_ctx
= talloc_init("api_epm_Map");
224 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
225 talloc_free(mem_ctx
);
229 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
231 talloc_free(mem_ctx
);
235 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
236 status
= ndr_pull_epm_Map(pull
, NDR_IN
, &r
);
237 if (NT_STATUS_IS_ERR(status
)) {
238 talloc_free(mem_ctx
);
242 if (DEBUGLEVEL
>= 10)
243 NDR_PRINT_IN_DEBUG(epm_Map
, &r
);
246 r
.out
.entry_handle
= r
.in
.entry_handle
;
247 r
.out
.num_towers
= talloc_zero(mem_ctx
, uint32_t);
248 if (r
.out
.num_towers
== NULL
) {
249 talloc_free(mem_ctx
);
253 r
.out
.towers
= talloc_zero_array(mem_ctx
, struct epm_twr_p_t
, r
.in
.max_towers
);
254 if (r
.out
.towers
== NULL
) {
255 talloc_free(mem_ctx
);
259 r
.out
.result
= _epm_Map(p
, &r
);
261 if (p
->rng_fault_state
) {
262 talloc_free(mem_ctx
);
263 /* Return True here, srv_pipe_hnd.c will take care */
267 if (DEBUGLEVEL
>= 10)
268 NDR_PRINT_OUT_DEBUG(epm_Map
, &r
);
270 push
= ndr_push_init_ctx(mem_ctx
);
272 talloc_free(mem_ctx
);
276 status
= ndr_push_epm_Map(push
, NDR_OUT
, &r
);
277 if (NT_STATUS_IS_ERR(status
)) {
278 talloc_free(mem_ctx
);
282 blob
= ndr_push_blob(push
);
283 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
284 talloc_free(mem_ctx
);
288 talloc_free(mem_ctx
);
293 static BOOL
api_epm_LookupHandleFree(pipes_struct
*p
)
295 struct ndr_pull
*pull
;
296 struct ndr_push
*push
;
299 struct epm_LookupHandleFree r
;
300 TALLOC_CTX
*mem_ctx
= talloc_init("api_epm_LookupHandleFree");
302 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
303 talloc_free(mem_ctx
);
307 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
309 talloc_free(mem_ctx
);
313 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
314 status
= ndr_pull_epm_LookupHandleFree(pull
, NDR_IN
, &r
);
315 if (NT_STATUS_IS_ERR(status
)) {
316 talloc_free(mem_ctx
);
320 if (DEBUGLEVEL
>= 10)
321 NDR_PRINT_IN_DEBUG(epm_LookupHandleFree
, &r
);
324 r
.out
.entry_handle
= r
.in
.entry_handle
;
325 r
.out
.result
= _epm_LookupHandleFree(p
, &r
);
327 if (p
->rng_fault_state
) {
328 talloc_free(mem_ctx
);
329 /* Return True here, srv_pipe_hnd.c will take care */
333 if (DEBUGLEVEL
>= 10)
334 NDR_PRINT_OUT_DEBUG(epm_LookupHandleFree
, &r
);
336 push
= ndr_push_init_ctx(mem_ctx
);
338 talloc_free(mem_ctx
);
342 status
= ndr_push_epm_LookupHandleFree(push
, NDR_OUT
, &r
);
343 if (NT_STATUS_IS_ERR(status
)) {
344 talloc_free(mem_ctx
);
348 blob
= ndr_push_blob(push
);
349 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
350 talloc_free(mem_ctx
);
354 talloc_free(mem_ctx
);
359 static BOOL
api_epm_InqObject(pipes_struct
*p
)
361 struct ndr_pull
*pull
;
362 struct ndr_push
*push
;
365 struct epm_InqObject r
;
366 TALLOC_CTX
*mem_ctx
= talloc_init("api_epm_InqObject");
368 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
369 talloc_free(mem_ctx
);
373 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
375 talloc_free(mem_ctx
);
379 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
380 status
= ndr_pull_epm_InqObject(pull
, NDR_IN
, &r
);
381 if (NT_STATUS_IS_ERR(status
)) {
382 talloc_free(mem_ctx
);
386 if (DEBUGLEVEL
>= 10)
387 NDR_PRINT_IN_DEBUG(epm_InqObject
, &r
);
389 r
.out
.result
= _epm_InqObject(p
, &r
);
391 if (p
->rng_fault_state
) {
392 talloc_free(mem_ctx
);
393 /* Return True here, srv_pipe_hnd.c will take care */
397 if (DEBUGLEVEL
>= 10)
398 NDR_PRINT_OUT_DEBUG(epm_InqObject
, &r
);
400 push
= ndr_push_init_ctx(mem_ctx
);
402 talloc_free(mem_ctx
);
406 status
= ndr_push_epm_InqObject(push
, NDR_OUT
, &r
);
407 if (NT_STATUS_IS_ERR(status
)) {
408 talloc_free(mem_ctx
);
412 blob
= ndr_push_blob(push
);
413 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
414 talloc_free(mem_ctx
);
418 talloc_free(mem_ctx
);
423 static BOOL
api_epm_MgmtDelete(pipes_struct
*p
)
425 struct ndr_pull
*pull
;
426 struct ndr_push
*push
;
429 struct epm_MgmtDelete r
;
430 TALLOC_CTX
*mem_ctx
= talloc_init("api_epm_MgmtDelete");
432 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
433 talloc_free(mem_ctx
);
437 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
439 talloc_free(mem_ctx
);
443 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
444 status
= ndr_pull_epm_MgmtDelete(pull
, NDR_IN
, &r
);
445 if (NT_STATUS_IS_ERR(status
)) {
446 talloc_free(mem_ctx
);
450 if (DEBUGLEVEL
>= 10)
451 NDR_PRINT_IN_DEBUG(epm_MgmtDelete
, &r
);
453 r
.out
.result
= _epm_MgmtDelete(p
, &r
);
455 if (p
->rng_fault_state
) {
456 talloc_free(mem_ctx
);
457 /* Return True here, srv_pipe_hnd.c will take care */
461 if (DEBUGLEVEL
>= 10)
462 NDR_PRINT_OUT_DEBUG(epm_MgmtDelete
, &r
);
464 push
= ndr_push_init_ctx(mem_ctx
);
466 talloc_free(mem_ctx
);
470 status
= ndr_push_epm_MgmtDelete(push
, NDR_OUT
, &r
);
471 if (NT_STATUS_IS_ERR(status
)) {
472 talloc_free(mem_ctx
);
476 blob
= ndr_push_blob(push
);
477 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
478 talloc_free(mem_ctx
);
482 talloc_free(mem_ctx
);
487 static BOOL
api_epm_MapAuth(pipes_struct
*p
)
489 struct ndr_pull
*pull
;
490 struct ndr_push
*push
;
493 struct epm_MapAuth r
;
494 TALLOC_CTX
*mem_ctx
= talloc_init("api_epm_MapAuth");
496 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
497 talloc_free(mem_ctx
);
501 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
503 talloc_free(mem_ctx
);
507 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
508 status
= ndr_pull_epm_MapAuth(pull
, NDR_IN
, &r
);
509 if (NT_STATUS_IS_ERR(status
)) {
510 talloc_free(mem_ctx
);
514 if (DEBUGLEVEL
>= 10)
515 NDR_PRINT_IN_DEBUG(epm_MapAuth
, &r
);
517 r
.out
.result
= _epm_MapAuth(p
, &r
);
519 if (p
->rng_fault_state
) {
520 talloc_free(mem_ctx
);
521 /* Return True here, srv_pipe_hnd.c will take care */
525 if (DEBUGLEVEL
>= 10)
526 NDR_PRINT_OUT_DEBUG(epm_MapAuth
, &r
);
528 push
= ndr_push_init_ctx(mem_ctx
);
530 talloc_free(mem_ctx
);
534 status
= ndr_push_epm_MapAuth(push
, NDR_OUT
, &r
);
535 if (NT_STATUS_IS_ERR(status
)) {
536 talloc_free(mem_ctx
);
540 blob
= ndr_push_blob(push
);
541 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
542 talloc_free(mem_ctx
);
546 talloc_free(mem_ctx
);
553 static struct api_struct api_epmapper_cmds
[] =
555 {"EPM_INSERT", DCERPC_EPM_INSERT
, api_epm_Insert
},
556 {"EPM_DELETE", DCERPC_EPM_DELETE
, api_epm_Delete
},
557 {"EPM_LOOKUP", DCERPC_EPM_LOOKUP
, api_epm_Lookup
},
558 {"EPM_MAP", DCERPC_EPM_MAP
, api_epm_Map
},
559 {"EPM_LOOKUPHANDLEFREE", DCERPC_EPM_LOOKUPHANDLEFREE
, api_epm_LookupHandleFree
},
560 {"EPM_INQOBJECT", DCERPC_EPM_INQOBJECT
, api_epm_InqObject
},
561 {"EPM_MGMTDELETE", DCERPC_EPM_MGMTDELETE
, api_epm_MgmtDelete
},
562 {"EPM_MAPAUTH", DCERPC_EPM_MAPAUTH
, api_epm_MapAuth
},
565 void epmapper_get_pipe_fns(struct api_struct
**fns
, int *n_fns
)
567 *fns
= api_epmapper_cmds
;
568 *n_fns
= sizeof(api_epmapper_cmds
) / sizeof(struct api_struct
);
571 NTSTATUS
rpc_epmapper_init(void)
573 return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION
, "epmapper", "epmapper", api_epmapper_cmds
, sizeof(api_epmapper_cmds
) / sizeof(struct api_struct
));