summaryrefslogtreecommitdiff
path: root/source4/smbd/process_model.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-02-02 13:43:03 +0000
committerStefan Metzmacher <metze@samba.org>2004-02-02 13:43:03 +0000
commitc61089219b82ff94f83e1fb428e8b47ad778c868 (patch)
tree2109fd566da9e1492a03c817cf83c71b2140ce52 /source4/smbd/process_model.h
parent894e02f80c254da4edca5dbae99561d205c63fbe (diff)
downloadsamba-c61089219b82ff94f83e1fb428e8b47ad778c868.tar.gz
- we now specify the object files in the subsystems config.m4 file
I plan to convert all objectfile group to use SMB_SUBSYSTEM later I'll add a SMB_BINARY() and SMB_LIBRARY(), then there will be no more need to touch Makefile.in, because all make rules will be autogenerated by configure - convert the PROCESS_MODEL subsystem to this new scheme and move the pthread test to smbd/process_model.m4 - convert the CHARSET subsystem to this new scheme and move the iconv test to lib/iconv.m4 (This used to be commit 2e57ee884ebea194ee79ac20e84e385481b56aa2)
Diffstat (limited to 'source4/smbd/process_model.h')
-rw-r--r--source4/smbd/process_model.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/source4/smbd/process_model.h b/source4/smbd/process_model.h
new file mode 100644
index 00000000000..688ae652262
--- /dev/null
+++ b/source4/smbd/process_model.h
@@ -0,0 +1,69 @@
+/*
+ Unix SMB/CIFS implementation.
+ process model manager - main loop
+ Copyright (C) Andrew Tridgell 1992-2003
+ Copyright (C) James J Myers 2003 <myersjj@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 2 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, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#ifndef SAMBA_PROCESS_MODEL_H
+#define SAMBA_PROCESS_MODEL_H
+
+/* modules can use the following to determine if the interface has changed
+ * please increment the version number after each interface change
+ * with a comment and maybe update struct process_model_critical_sizes.
+ */
+/* version 1 - initial version - metze */
+#define PROCESS_MODEL_VERSION 1
+
+/* the process model operations structure - contains function pointers to
+ the model-specific implementations of each operation */
+struct model_ops {
+ /* the name of the process_model */
+ const char *name;
+
+ /* called at startup when the model is selected */
+ void (*model_startup)(void);
+
+ /* function to accept new connection */
+ void (*accept_connection)(struct event_context *, struct fd_event *, time_t, uint16);
+
+ /* function to accept new rpc over tcp connection */
+ void (*accept_rpc_connection)(struct event_context *, struct fd_event *, time_t, uint16);
+
+ /* function to terminate a connection */
+ void (*terminate_connection)(struct server_context *smb, const char *reason);
+
+ /* function to terminate a connection */
+ void (*terminate_rpc_connection)(void *r, const char *reason);
+
+ /* function to exit server */
+ void (*exit_server)(struct server_context *smb, const char *reason);
+
+ /* returns process or thread id */
+ int (*get_id)(struct request_context *req);
+};
+
+/* this structure is used by modules to determine the size of some critical types */
+struct process_model_critical_sizes {
+ int interface_version;
+ int sizeof_model_ops;
+ int sizeof_server_context;
+ int sizeof_event_context;
+ int sizeof_fd_event;
+};
+
+#endif /* SAMBA_PROCESS_MODEL_H */