1 /* See the DRL-LICENSE file for this file's software license. */
7 #define MESH_REMOTE_AWOL_THRESHOLD (5)
8 #define GOSSIP_REMOTE_AWOL_THRESHOLD (5)
10 static const uint32_t MAGIC_MSG = 0x123123;
11 static const uint32_t MAGIC_HELLO = 0x456456;
12 static const uint16_t MSG = 1;
13 static const uint16_t ACK = 2;
15 void limiter_receive();
17 void message_to_hbo(message_t *msg);
19 void message_to_nbo(message_t *msg);
21 int send_udp_mesh(comm_t *comm, uint32_t id, int sock);
22 int recv_mesh(comm_t *comm, uint32_t id, int sock, remote_limiter_t *remote, message_t *msg);
24 int send_udp_gossip(comm_t *comm, uint32_t id, int sock);
25 int recv_gossip(comm_t *comm, uint32_t id, int sock, remote_limiter_t *remote, message_t *msg);
27 int find_gossip_target(comm_t *comm);
29 int send_ack(uint32_t id, remote_limiter_t *remote, uint32_t seqno, uint16_t type, int32_t view);
32 void *limiter_accept_thread(void *limiter);
34 void *ident_receive_thread(void *limiter);
36 int send_tcp_gossip(comm_ident_t *ident, FILE *logfile, int unused);