/* See the DRL-LICENSE file for this file's software license. */ #ifndef _PEER_COMM_H_ #define _PEER_COMM_H_ #define NULL_PEER (-2) #define MESH_REMOTE_AWOL_THRESHOLD (5) #define GOSSIP_REMOTE_AWOL_THRESHOLD (5) static const uint32_t MAGIC_MSG = 0x123123; static const uint32_t MAGIC_HELLO = 0x456456; static const uint16_t MSG = 1; static const uint16_t ACK = 2; void limiter_receive(); void message_to_hbo(message_t *msg); void message_to_nbo(message_t *msg); int send_udp_mesh(comm_t *comm, uint32_t id, int sock); int recv_mesh(comm_t *comm, uint32_t id, int sock, remote_limiter_t *remote, message_t *msg); int send_udp_gossip(comm_t *comm, uint32_t id, int sock); int recv_gossip(comm_t *comm, uint32_t id, int sock, remote_limiter_t *remote, message_t *msg); int find_gossip_target(comm_t *comm); int send_ack(uint32_t id, remote_limiter_t *remote, uint32_t seqno, uint16_t type, int32_t view); #if 0 void *limiter_accept_thread(void *limiter); void *ident_receive_thread(void *limiter); int send_tcp_gossip(comm_ident_t *ident, FILE *logfile, int unused); #endif #endif