summaryrefslogtreecommitdiffstats
path: root/ctdb/tcp/ctdb_tcp.h
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-11-28 14:15:46 +1100
committerAndrew Tridgell <tridge@samba.org>2006-11-28 14:15:46 +1100
commit5d0ba69e06d2f37788697c3b7c39287334d2fa22 (patch)
tree52f2309a327511535dfde9b7e130f731d51d09d9 /ctdb/tcp/ctdb_tcp.h
parent5b06e73fb1051e9fe370a76ef4fc87e514a1f9e5 (diff)
downloadsamba-5d0ba69e06d2f37788697c3b7c39287334d2fa22.tar.gz
samba-5d0ba69e06d2f37788697c3b7c39287334d2fa22.tar.xz
samba-5d0ba69e06d2f37788697c3b7c39287334d2fa22.zip
- setup a convenience name field for nodes
- added basic IO handling for the tcp backend - added a ctdb_node_dead upcall - added packet queueing - adding incoming packet handling (This used to be ctdb commit 415497c952630e746e8cdcf8e1e2a7b2ac3e51fb)
Diffstat (limited to 'ctdb/tcp/ctdb_tcp.h')
-rw-r--r--ctdb/tcp/ctdb_tcp.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/ctdb/tcp/ctdb_tcp.h b/ctdb/tcp/ctdb_tcp.h
index 571c20508b4..14e96ea8979 100644
--- a/ctdb/tcp/ctdb_tcp.h
+++ b/ctdb/tcp/ctdb_tcp.h
@@ -32,21 +32,28 @@ struct ctdb_incoming {
int fd;
};
+struct ctdb_tcp_packet {
+ struct ctdb_tcp_packet *next, *prev;
+ uint8_t *data;
+ uint32_t length;
+};
+
/*
state associated with one tcp node
*/
struct ctdb_tcp_node {
int fd;
+ struct fd_event *fde;
+ struct ctdb_tcp_packet *queue;
};
/* prototypes internal to tcp transport */
-void ctdb_tcp_node_read(struct event_context *ev, struct fd_event *fde,
- uint16_t flags, void *private);
+void ctdb_tcp_node_write(struct event_context *ev, struct fd_event *fde,
+ uint16_t flags, void *private);
void ctdb_tcp_incoming_read(struct event_context *ev, struct fd_event *fde,
uint16_t flags, void *private);
+int ctdb_tcp_queue_pkt(struct ctdb_node *node, uint8_t *data, uint32_t length);
int ctdb_tcp_listen(struct ctdb_context *ctdb);
void ctdb_tcp_node_connect(struct event_context *ev, struct timed_event *te,
struct timeval t, void *private);
-
-