Added comments and changed signature or t_* functions

This commit is contained in:
n07070 2020-04-18 15:02:55 +02:00
parent dd532dc580
commit 03e5b69553
1 changed files with 12 additions and 4 deletions

View File

@ -91,12 +91,20 @@ int send_tlv(tlv *tlv_to_send, int16_t length, struct sockaddr_in6 * dest_list,
*/
int send_tlvs(struct list * tlv_list, int16_t length, struct sockaddr_in6 * dest_list, int dest_list_size, int socket_num);
// threaded functions
int t_ask_for_more_peers();
/* Check our peer list. If we have less than 5 peers, send out a
TLV NEIGHBOUR_REQUEST to a random peer
*/
int t_ask_for_more_peers(list * neighbourhood);
int t_update_neighbours();
/* We look at every peer, if he is marked as is_temporary, AND we didn't get a
packet from him in the last 70 sec, we remove him from the list.
*/
int t_update_neighbours(list * neighbourhood);
int t_get_network_state();
/* We send out a TLV Network Hash to every peer, and we expect getting a TLV
Network state from each of them.
*/
int t_get_network_state(list * neighbourhood);
// This function adds a message to the message table.
int add_message(char * message, int message_len);