From 241aca98bdc8106221ee7d7dbcea9f2fa17f24bc Mon Sep 17 00:00:00 2001 From: Konstantin Kowalski Date: Fri, 26 Jul 2013 23:07:25 -0400 Subject: A *lot* of style changes. --- core/DHT.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'core/DHT.h') diff --git a/core/DHT.h b/core/DHT.h index 966645f5..f306026e 100644 --- a/core/DHT.h +++ b/core/DHT.h @@ -40,13 +40,13 @@ extern "C" { client_id must be CLIENT_ID_SIZE bytes long. returns 0 if success returns 1 if failure (friends list is full) */ -int DHT_addfriend(uint8_t * client_id); +int DHT_addfriend(uint8_t *client_id); /* Delete a friend from the friends list client_id must be CLIENT_ID_SIZE bytes long. returns 0 if success returns 1 if failure (client_id not in friends list) */ -int DHT_delfriend(uint8_t * client_id); +int DHT_delfriend(uint8_t *client_id); /* Get ip of friend client_id must be CLIENT_ID_SIZE bytes long. @@ -55,7 +55,7 @@ int DHT_delfriend(uint8_t * client_id); returns ip if success returns ip of 0 if failure (This means the friend is either offline or we have not found him yet.) returns ip of 1 if friend is not in list. */ -IP_Port DHT_getfriendip(uint8_t * client_id); +IP_Port DHT_getfriendip(uint8_t *client_id); /* Run this function at least a couple times per second (It's the main loop) */ void doDHT(); @@ -63,21 +63,21 @@ void doDHT(); /* if we receive a DHT packet we call this function so it can be handled. return 0 if packet is handled correctly. return 1 if it didn't handle the packet or if the packet was shit. */ -int DHT_handlepacket(uint8_t * packet, uint32_t length, IP_Port source); +int DHT_handlepacket(uint8_t *packet, uint32_t length, IP_Port source); /* Use this function to bootstrap the client Sends a get nodes request to the given node with ip port and public_key */ -void DHT_bootstrap(IP_Port ip_port, uint8_t * public_key); +void DHT_bootstrap(IP_Port ip_port, uint8_t *public_key); /* ROUTING FUNCTIONS */ /* send the given packet to node with client_id returns -1 if failure */ -int route_packet(uint8_t * client_id, uint8_t * packet, uint32_t length); +int route_packet(uint8_t *client_id, uint8_t *packet, uint32_t length); /* Send the following packet to everyone who tells us they are connected to friend_id returns the number of nodes it sent the packet to */ -int route_tofriend(uint8_t * friend_id, uint8_t * packet, uint32_t length); +int route_tofriend(uint8_t *friend_id, uint8_t *packet, uint32_t length); /* NAT PUNCHING FUNCTIONS */ @@ -85,7 +85,7 @@ int route_tofriend(uint8_t * friend_id, uint8_t * packet, uint32_t length); ip_portlist must be at least MAX_FRIEND_CLIENTS big returns the number of ips returned returns -1 if no such friend*/ -int friend_ips(IP_Port * ip_portlist, uint8_t * friend_id); +int friend_ips(IP_Port *ip_portlist, uint8_t *friend_id); /* SAVE/LOAD functions */ @@ -93,12 +93,12 @@ int friend_ips(IP_Port * ip_portlist, uint8_t * friend_id); uint32_t DHT_size(); /* save the DHT in data where data is an array of size DHT_size() */ -void DHT_save(uint8_t * data); +void DHT_save(uint8_t *data); /* load the DHT from data of size size; return -1 if failure return 0 if success */ -int DHT_load(uint8_t * data, uint32_t size); +int DHT_load(uint8_t *data, uint32_t size); /* returns 0 if we are not connected to the DHT returns 1 if we are */ -- cgit v1.2.3