From 9327ec51d11855ec0ceac3ce1f4e0a75c8b57081 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 14 Jan 2005 01:32:56 +0000 Subject: 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) --- source4/smbd/process_model.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'source4/smbd/process_model.h') 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 - 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 */ -- cgit