s3-rpc_server: Make dcerpc_ncacn_accept() public.
[idra/samba.git] / source3 / rpc_server / rpc_service_setup.h
1 /*
2  *  Unix SMB/CIFS implementation.
3  *
4  *  SMBD RPC service callbacks
5  *
6  *  Copyright (c) 2011      Andreas Schneider <asn@samba.org>
7  *
8  *  This program is free software; you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License as published by
10  *  the Free Software Foundation; either version 3 of the License, or
11  *  (at your option) any later version.
12  *
13  *  This program is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  *  GNU General Public License for more details.
17  *
18  *  You should have received a copy of the GNU General Public License
19  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
20  */
21
22 #ifndef _RPC_EP_SETUP_H
23 #define _RPC_EP_SETUP_H
24
25 struct ndr_interface_table;
26
27 enum rpc_service_mode_e {
28         RPC_SERVICE_MODE_DISABLED = 0,
29         RPC_SERVICE_MODE_EMBEDDED,
30         RPC_SERVICE_MODE_EXTERNAL,
31         RPC_SERVICE_MODE_DAEMON
32 };
33
34 /**
35  * @brief Get the mode in which epmapper is started.
36  *
37  * @return The mode.
38  */
39 enum rpc_service_mode_e rpc_epmapper_mode(void);
40
41 /**
42  * @brief Get the mode in which epmapper is started.
43  *
44  * @return The mode.
45  */
46 enum rpc_service_mode_e rpc_spoolss_mode(void);
47
48 /**
49  * @brief Register an endpoint at the endpoint mapper.
50  *
51  * This just sets up a register and monitor loop to try to regsiter the
52  * endpoint at the endpoint mapper.
53  *
54  * @param[in] ev_ctx    The event context to setup the loop.
55  *
56  * @param[in] msg_ctx   The messaging context to use for the connnection.
57  *
58  * @param[in] iface     The interface table to register.
59  *
60  * @param[in] ncalrpc   The name of the ncalrpc pipe or NULL.
61  *
62  * @param[in] port      The tcpip port or 0.
63  *
64  * @return              NT_STATUS_OK on success or a corresponding error code.
65  */
66 NTSTATUS rpc_ep_setup_register(struct tevent_context *ev_ctx,
67                                struct messaging_context *msg_ctx,
68                                const struct ndr_interface_table *iface,
69                                const char *ncalrpc,
70                                uint16_t port);
71
72 bool dcesrv_ep_setup(struct tevent_context *ev_ctx,
73                      struct messaging_context *msg_ctx);
74
75 #endif /* _RPC_EP_SETUP_H */
76
77 /* vim: set ts=8 sw=8 noet cindent ft=c.doxygen: */