diff --git a/infrastructure-centred/owlps-aggregator/owlps-aggregatord.c b/infrastructure-centred/owlps-aggregator/owlps-aggregatord.c index 54d5ccb..aa59748 100644 --- a/infrastructure-centred/owlps-aggregator/owlps-aggregatord.c +++ b/infrastructure-centred/owlps-aggregator/owlps-aggregatord.c @@ -598,7 +598,9 @@ void got_couple_info(couple_message message) -/* Empty the couple list */ +/* + * Empties the couple list. + */ void free_couple_list() { couple_list *next_couple ; @@ -699,7 +701,9 @@ ap_list* find_ap(unsigned char mac_addr_bytes[6]) } -/* Adds a new AP in front of the AP list. */ +/* + * Adds a new AP in front of the AP list. + */ inline ap_list* add_ap_front(unsigned char mac_addr_bytes[6]) { ap_list *ap = malloc(sizeof(ap_list)) ; @@ -711,13 +715,18 @@ inline ap_list* add_ap_front(unsigned char mac_addr_bytes[6]) } +/* + * Change the IP address of the AP 'ap' with 'ip_addr'. + */ inline void update_ap_ip_addr(ap_list *ap, char ip_addr[16]) { strncpy(ap->ip_addr, ip_addr, 16) ; } -/* Updates the timestamp of the given AP. */ +/* + * Updates the timestamp of the given AP. + */ inline void update_ap_seen(ap_list *ap) { assert(ap) ; @@ -777,7 +786,9 @@ void delete_old_aps() } -/* Deletes an AP from the AP list. */ +/* + * Deletes the given AP from the AP list. + */ inline void delete_ap(ap_list *ap) { unlink_ap(ap) ; @@ -786,7 +797,10 @@ inline void delete_ap(ap_list *ap) } -/* Extracts the given AP from the AP list. */ +/* + * Extracts the given AP from the AP list (it will not be linked to any + * other element of the list). + */ void unlink_ap(ap_list *ap) { assert(ap) ; @@ -811,7 +825,9 @@ void order_send(ap_list *ap) } -/* Move the given AP, existing in the AP list, in front of the list. */ +/* + * Moves the given AP, existing in the AP list, in front of the list. + */ inline void move_ap_front(ap_list *ap) { unlink_ap(ap) ; @@ -819,7 +835,9 @@ inline void move_ap_front(ap_list *ap) } -/* Empty the AP list. */ +/* + * Empties the AP list. + */ void free_ap_list() { ap_list *ap_ptr = aps ; @@ -835,7 +853,9 @@ void free_ap_list() #ifdef DEBUG -/* Prints the couple list */ +/* + * Prints the couple list. + */ void print_couple_list() { couple_list *couple_ptr = couples ; @@ -880,7 +900,9 @@ void print_couple_list() -/* Prints an element of a couple_info_list */ +/* + * Prints an element of a couple_info_list. + */ void print_couple_info(couple_info_list *info) { char *ap_mac_string ;