diff options
author | Stefan Metzmacher <metze@samba.org> | 2005-01-14 01:32:56 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:08:49 -0500 |
commit | 9327ec51d11855ec0ceac3ce1f4e0a75c8b57081 (patch) | |
tree | 7f4427b4246b91b050c16e8dc5d1f0433eb7cc2d /source4/smbd/process_model.h | |
parent | cfc10f2a83b7c6190742498f1027256215cd0b31 (diff) | |
download | samba-9327ec51d11855ec0ceac3ce1f4e0a75c8b57081.tar.gz samba-9327ec51d11855ec0ceac3ce1f4e0a75c8b57081.tar.bz2 samba-9327ec51d11855ec0ceac3ce1f4e0a75c8b57081.zip |
r4728: split up server_services into:
- stream_socket services
the smb, ldap and rpc service which sets up a srtam socket end then
waits for connections
and
- task services
which this you can create a seperate task that do something
(this is also going through the process_model subsystem
so with -M standard a new process for this created
with -M thread a new thread ...
I'll add datagram services later when we whave support for datagram sockets in lib/socket/
see the next commit as an example for service_task's
metze
(This used to be commit d5fa02746c6569b09b6e05785642da2fad3ba3e0)
Diffstat (limited to 'source4/smbd/process_model.h')
-rw-r--r-- | source4/smbd/process_model.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/source4/smbd/process_model.h b/source4/smbd/process_model.h index 92d92a70ad..fb9bdfd44b 100644 --- a/source4/smbd/process_model.h +++ b/source4/smbd/process_model.h @@ -3,7 +3,7 @@ process model manager - main loop Copyright (C) Andrew Tridgell 1992-2003 Copyright (C) James J Myers 2003 <myersjj@samba.org> - Copyright (C) Stefan (metze) Metzmacher 2004 + Copyright (C) Stefan (metze) Metzmacher 2004-2005 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 @@ -37,21 +37,23 @@ struct model_ops { const char *name; /* called at startup when the model is selected */ - void (*model_startup)(void); + void (*model_init)(struct server_context *srv_ctx); + /* called at th eend of the main server process */ + void (*model_exit)(struct server_context *srv_ctx, const char *reason); + /* function to accept new connection */ void (*accept_connection)(struct event_context *, struct fd_event *, struct timeval t, uint16_t); - /* function to terminate a connection */ void (*terminate_connection)(struct server_connection *srv_conn, const char *reason); - /* function to exit server */ - void (*exit_server)(struct server_context *srv_ctx, const char *reason); - /* returns process or thread id */ - int (*get_id)(struct smbsrv_request *req); + /* function to create a new task event_context */ + void (*create_task)(struct server_task *task); + /* function to exit this task */ + void (*terminate_task)(struct server_task *task, const char *reason); }; /* this structure is used by modules to determine the size of some critical types */ |