1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00
samba-mirror/source3/rpc_server/rpc_service_setup.h
Samuel Cabrero 228f8b2c53 s3:rpc_server: Add a function to create the endpoints sockets
The pidl-generated initialization function for each endpoint server will
register the RPC interface in all endpoints defined in the idl file.

The interface registration code will create the endpoint if it does not
exists (as an endpoint can serve multiple interfaces) and will add it to
the endpoint list exiting in the dcesrv_context.

This commit adds a generic dcesrv_create_endpoint_sockets function which
will be preforking external daemons to create the sockets regardless the
endpoint transport. This function will only create the sockets, the
external preforking daemon is who will start listening.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-03-20 15:36:33 +00:00

59 lines
1.9 KiB
C

/*
* Unix SMB/CIFS implementation.
*
* SMBD RPC service callbacks
*
* Copyright (c) 2011 Andreas Schneider <asn@samba.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _RPC_EP_SETUP_H
#define _RPC_EP_SETUP_H
#include "rpc_server/rpc_server.h"
struct pf_listen_fd;
struct dcerpc_binding_vector;
NTSTATUS dcesrv_init(TALLOC_CTX *mem_ctx,
struct tevent_context *ev_ctx,
struct messaging_context *msg_ctx,
struct dcesrv_context *dce_ctx);
NTSTATUS dcesrv_setup_endpoint_sockets(struct tevent_context *ev_ctx,
struct messaging_context *msg_ctx,
struct dcesrv_context *dce_ctx,
struct dcesrv_endpoint *e,
struct dcerpc_binding_vector *bvec,
dcerpc_ncacn_termination_fn term_fn,
void *term_data);
NTSTATUS dcesrv_create_endpoint_sockets(struct tevent_context *ev_ctx,
struct messaging_context *msg_ctx,
struct dcesrv_context *dce_ctx,
struct dcesrv_endpoint *e,
struct dcerpc_binding_vector *bvec,
struct pf_listen_fd *listen_fds,
int *listen_fds_size);
NTSTATUS rpc_setup_embedded(struct tevent_context *ev_ctx,
struct messaging_context *msg_ctx,
const struct ndr_interface_table *t,
const char *pipe_name);
#endif /* _RPC_EP_SETUP_H */
/* vim: set ts=8 sw=8 noet cindent ft=c.doxygen: */