summaryrefslogtreecommitdiff
path: root/source3/rpc_server/rpc_config.h
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2011-08-10 16:33:22 -0400
committerSimo Sorce <idra@samba.org>2011-08-21 09:05:03 -0400
commit11cbe24ac8415bdddef6d2c67cacc578cea850ad (patch)
treea301e9627b0520b37e6440aee78883c983de2f66 /source3/rpc_server/rpc_config.h
parent5a4e0dd853d2e5fb12031a59665966d14d07bbfc (diff)
downloadsamba-11cbe24ac8415bdddef6d2c67cacc578cea850ad.tar.gz
samba-11cbe24ac8415bdddef6d2c67cacc578cea850ad.tar.bz2
samba-11cbe24ac8415bdddef6d2c67cacc578cea850ad.zip
s3-rpc_server: Move config helpers in one place.
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
Diffstat (limited to 'source3/rpc_server/rpc_config.h')
-rw-r--r--source3/rpc_server/rpc_config.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/source3/rpc_server/rpc_config.h b/source3/rpc_server/rpc_config.h
new file mode 100644
index 0000000000..4d85d59590
--- /dev/null
+++ b/source3/rpc_server/rpc_config.h
@@ -0,0 +1,71 @@
+/*
+ * Unix SMB/CIFS implementation.
+ *
+ * SMBD RPC service config
+ *
+ * Copyright (c) 2011 Andreas Schneider <asn@samba.org>
+ * Copyright (C) 2011 Simo Sorce <idra@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_CONFIG_H
+#define _RPC_CONFIG_H
+
+enum rpc_service_mode_e {
+ RPC_SERVICE_MODE_DISABLED = 0,
+ RPC_SERVICE_MODE_EMBEDDED,
+ RPC_SERVICE_MODE_EXTERNAL,
+ RPC_SERVICE_MODE_DAEMON
+};
+
+/**
+ * @brief Get the mode in which service pipes are configured.
+ *
+ * @param name Name of the service
+ * @param def_mode The default mode for the service
+ *
+ * @return The actual configured mode.
+ */
+enum rpc_service_mode_e rpc_service_mode(const char *name);
+
+#define rpc_epmapper_mode() rpc_service_mode("epmapper")
+#define rpc_spoolss_mode() rpc_service_mode("spoolss")
+#define rpc_lsarpc_mode() rpc_service_mode("lsarpc")
+#define rpc_samr_mode() rpc_service_mode("samr")
+#define rpc_netlogon_mode() rpc_service_mode("netlogon")
+
+
+
+enum rpc_daemon_type_e {
+ RPC_DAEMON_DISABLED = 0,
+ RPC_DAEMON_EMBEDDED,
+ RPC_DAEMON_FORK
+};
+
+/**
+ * @brief Get the mode in which a server is started.
+ *
+ * @param name Name of the rpc server
+ * @param def_type The default type for the server
+ *
+ * @return The actual configured type.
+ */
+enum rpc_daemon_type_e rpc_daemon_type(const char *name);
+
+#define rpc_epmapper_daemon() rpc_daemon_type("epmd")
+#define rpc_spoolss_daemon() rpc_daemon_type("spoolssd")
+#define rpc_lsasd_daemon() rpc_daemon_type("lsasd")
+
+#endif /* _RPC_CONFIG_H */