2 Unix SMB/CIFS implementation.
4 structures specific to stream servers
6 Copyright (C) Stefan (metze) Metzmacher 2004
7 Copyright (C) Andrew Tridgell 2005
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #ifndef __SERVICE_STREAM_H__
24 #define __SERVICE_STREAM_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 stream_connection_critical_sizes.
30 /* version 0 - initial version - metze */
31 #define SERVER_SERVICE_VERSION 0
34 top level context for an established stream connection
36 struct stream_connection {
37 const struct stream_server_ops *ops;
38 const struct model_ops *model_ops;
39 struct server_id server_id;
43 struct event_context *ctx;
47 struct socket_context *socket;
48 struct messaging_context *msg_ctx;
51 const char *terminate;
55 /* operations passed to the service_stream code */
56 struct stream_server_ops {
57 /* the name of the server_service */
59 void (*accept_connection)(struct stream_connection *);
60 void (*recv_handler)(struct stream_connection *, uint16_t);
61 void (*send_handler)(struct stream_connection *, uint16_t);
64 #endif /* __SERVICE_STREAM_H__ */