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>
6 Copyright (C) Stefan (metze) Metzmacher 2004
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 2 of the License, or
11 (at your option) any later version.
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.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 #ifndef SAMBA_PROCESS_MODEL_H
24 #define SAMBA_PROCESS_MODEL_H
26 /* modules can use the following to determine if the interface has changed
27 * please increment the version number after each interface change
28 * with a comment and maybe update struct process_model_critical_sizes.
30 /* version 1 - initial version - metze */
31 #define PROCESS_MODEL_VERSION 1
33 /* the process model operations structure - contains function pointers to
34 the model-specific implementations of each operation */
36 /* the name of the process_model */
39 /* called at startup when the model is selected */
40 void (*model_startup)(void);
42 /* function to accept new connection */
43 void (*accept_connection)(struct event_context *, struct fd_event *, time_t, uint16_t);
45 /* function to terminate a connection */
46 void (*terminate_connection)(struct server_connection *srv_conn, const char *reason);
48 /* function to exit server */
49 void (*exit_server)(struct server_context *srv_ctx, const char *reason);
51 /* returns process or thread id */
52 int (*get_id)(struct smbsrv_request *req);
55 /* this structure is used by modules to determine the size of some critical types */
56 struct process_model_critical_sizes {
57 int interface_version;
59 int sizeof_server_context;
60 int sizeof_event_context;
64 #endif /* SAMBA_PROCESS_MODEL_H */