s4:client: Fix code spelling
[Samba.git] / ctdb / tcp / ctdb_tcp.h
blobcb8d66fa5dcd705379e618cac64172da8426d137
1 /*
2 ctdb database library
4 Copyright (C) Andrew Tridgell 2006
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, see <http://www.gnu.org/licenses/>.
20 #ifndef _CTDB_TCP_H
21 #define _CTDB_TCP_H
23 /* ctdb_tcp main state */
24 struct ctdb_tcp {
25 struct ctdb_context *ctdb;
26 int listen_fd;
30 state associated with one tcp node
32 struct ctdb_tcp_node {
33 int out_fd;
34 struct ctdb_queue *out_queue;
36 struct tevent_fd *connect_fde;
37 struct tevent_timer *connect_te;
39 struct ctdb_context *ctdb;
40 struct ctdb_queue *in_queue;
44 /* prototypes internal to tcp transport */
45 int ctdb_tcp_queue_pkt(struct ctdb_node *node, uint8_t *data, uint32_t length);
46 int ctdb_tcp_listen(struct ctdb_context *ctdb);
47 void ctdb_tcp_node_connect(struct tevent_context *ev, struct tevent_timer *te,
48 struct timeval t, void *private_data);
49 void ctdb_tcp_read_cb(uint8_t *data, size_t cnt, void *args);
50 void ctdb_tcp_tnode_cb(uint8_t *data, size_t cnt, void *private_data);
51 void ctdb_tcp_stop_outgoing(struct ctdb_node *node);
52 void ctdb_tcp_stop_incoming(struct ctdb_node *node);
54 #define CTDB_TCP_ALIGNMENT 8
56 #endif /* _CTDB_TCP_H */