Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
convert (and simplify a bit) dht-kademlia example
[simgrid.git] / examples / c / dht-kademlia / answer.h
similarity index 87%
rename from examples/deprecated/msg/dht-kademlia/answer.h
rename to examples/c/dht-kademlia/answer.h
index 97838e0..9e617ef 100644 (file)
@@ -6,17 +6,17 @@
 
 #ifndef _KADEMLIA_EXAMPLES_ANSWER_H_
 #define _KADEMLIA_EXAMPLES_ANSWER_H_
-#include <xbt/dynar.h>
 #include "routing_table.h"
+#include <xbt/dynar.h>
 
 /* Node query answer. contains the elements closest to the id given. */
 typedef struct s_node_answer {
   unsigned int destination_id;
-  xbt_dynar_t nodes;            //Dynar of node_contact_t
+  xbt_dynar_t nodes; // Dynar of node_contact_t
   unsigned int size;
 } s_answer_t;
 
-typedef s_answer_t *answer_t;
+typedef s_answer_tanswer_t;
 typedef const s_answer_t* const_answer_t;
 
 answer_t answer_init(unsigned int destination_id);
@@ -29,4 +29,4 @@ void answer_add_bucket(const_bucket_t bucket, answer_t answer);
 unsigned int answer_contains(const_answer_t answer, unsigned int id);
 unsigned int answer_destination_found(const_answer_t answer);
 
-#endif                          /* _KADEMLIA_EXAMPLES_ANSWER_H_ */
+#endif /* _KADEMLIA_EXAMPLES_ANSWER_H_ */