summaryrefslogtreecommitdiff
path: root/source4/rpc_server/epmapper
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-12-14 13:22:12 +0000
committerAndrew Tridgell <tridge@samba.org>2003-12-14 13:22:12 +0000
commitf6eb8342cba87c7c8f17471ed9783b567d36b0ed (patch)
tree40484486513e10f1fb4764ce62f7fdc3f8df17ff /source4/rpc_server/epmapper
parent4cd6b8a64b5d995190a28b2a8308e688847df49c (diff)
downloadsamba-f6eb8342cba87c7c8f17471ed9783b567d36b0ed.tar.gz
samba-f6eb8342cba87c7c8f17471ed9783b567d36b0ed.tar.bz2
samba-f6eb8342cba87c7c8f17471ed9783b567d36b0ed.zip
added auto-generation of the server side boilerplate code for each
pipe. The server side code gets generated as librpc/gen_ndr/ndr_NAME_s.c and gets included in the pipe module (This used to be commit bd3dcfe5820489a838e19b244266bd9126af5eb4)
Diffstat (limited to 'source4/rpc_server/epmapper')
-rw-r--r--source4/rpc_server/epmapper/rpc_epmapper.c78
1 files changed, 2 insertions, 76 deletions
diff --git a/source4/rpc_server/epmapper/rpc_epmapper.c b/source4/rpc_server/epmapper/rpc_epmapper.c
index 43e4d4514f..f2ecc0faa9 100644
--- a/source4/rpc_server/epmapper/rpc_epmapper.c
+++ b/source4/rpc_server/epmapper/rpc_epmapper.c
@@ -319,79 +319,5 @@ static NTSTATUS epm_MgmtDelete(struct dcesrv_state *dce, TALLOC_CTX *mem_ctx,
}
-/**************************************************************************
- all the code below this point is boilerplate that will be auto-generated
-***************************************************************************/
-
-static const dcesrv_dispatch_fn_t dispatch_table[] = {
- (dcesrv_dispatch_fn_t)epm_Insert,
- (dcesrv_dispatch_fn_t)epm_Delete,
- (dcesrv_dispatch_fn_t)epm_Lookup,
- (dcesrv_dispatch_fn_t)epm_Map,
- (dcesrv_dispatch_fn_t)epm_LookupHandleFree,
- (dcesrv_dispatch_fn_t)epm_InqObject,
- (dcesrv_dispatch_fn_t)epm_MgmtDelete
-};
-
-
-/*
- return True if we want to handle the given endpoint
-*/
-static BOOL op_query_endpoint(const struct dcesrv_endpoint *ep)
-{
- return dcesrv_table_query(&dcerpc_table_epmapper, ep);
-}
-
-/*
- setup for a particular rpc interface
-*/
-static BOOL op_set_interface(struct dcesrv_state *dce, const char *uuid, uint32 if_version)
-{
- if (strcasecmp(uuid, dcerpc_table_epmapper.uuid) != 0 ||
- if_version != dcerpc_table_epmapper.if_version) {
- DEBUG(2,("Attempt to use unknown interface %s/%d\n", uuid, if_version));
- return False;
- }
-
- dce->ndr = &dcerpc_table_epmapper;
- dce->dispatch = dispatch_table;
-
- return True;
-}
-
-
-/* op_connect is called when a connection is made to an endpoint */
-static NTSTATUS op_connect(struct dcesrv_state *dce)
-{
- return NT_STATUS_OK;
-}
-
-static void op_disconnect(struct dcesrv_state *dce)
-{
- /* nothing to do */
-}
-
-
-static int op_lookup_endpoints(TALLOC_CTX *mem_ctx, struct dcesrv_ep_iface **e)
-{
- return dcesrv_lookup_endpoints(&dcerpc_table_epmapper, mem_ctx, e);
-}
-
-
-static const struct dcesrv_endpoint_ops rpc_epmapper_ops = {
- op_query_endpoint,
- op_set_interface,
- op_connect,
- op_disconnect,
- op_lookup_endpoints
-};
-
-/*
- register with the dcerpc server
-*/
-void rpc_epmapper_init(struct dcesrv_context *dce)
-{
- if (!dcesrv_endpoint_register(dce, &rpc_epmapper_ops, &dcerpc_table_epmapper)) {
- DEBUG(1,("Failed to register epmapper endpoint\n"));
- }
-}
+/* include the generated boilerplate */
+#include "librpc/gen_ndr/ndr_epmapper_s.c"