2 Unix SMB/CIFS implementation.
3 process model manager - main loop
4 Copyright (C) Andrew Tridgell 1992-2003
5 Copyright (C) James J Myers 2003 <myersjj@samba.org>
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 #ifndef SAMBA_PROCESS_MODEL_H
23 #define SAMBA_PROCESS_MODEL_H
25 /* modules can use the following to determine if the interface has changed
26 * please increment the version number after each interface change
27 * with a comment and maybe update struct process_model_critical_sizes.
29 /* version 1 - initial version - metze */
30 #define PROCESS_MODEL_VERSION 1
32 /* the process model operations structure - contains function pointers to
33 the model-specific implementations of each operation */
35 /* the name of the process_model */
38 /* called at startup when the model is selected */
39 void (*model_startup)(void);
41 /* function to accept new connection */
42 void (*accept_connection)(struct event_context *, struct fd_event *, time_t, uint16_t);
44 /* function to accept new rpc over tcp connection */
45 void (*accept_rpc_connection)(struct event_context *, struct fd_event *, time_t, uint16_t);
47 /* function to terminate a connection */
48 void (*terminate_connection)(struct smbsrv_context *smb, const char *reason);
50 /* function to terminate a connection */
51 void (*terminate_rpc_connection)(void *r, const char *reason);
53 /* function to exit server */
54 void (*exit_server)(struct smbsrv_context *smb, const char *reason);
56 /* returns process or thread id */
57 int (*get_id)(struct request_context *req);
60 /* this structure is used by modules to determine the size of some critical types */
61 struct process_model_critical_sizes {
62 int interface_version;
64 int sizeof_server_context;
65 int sizeof_event_context;
69 #endif /* SAMBA_PROCESS_MODEL_H */