} s_kademlia_message_t;
typedef s_kademlia_message_t* kademlia_message_t;
+const typedef s_kademlia_message_t* const_kademlia_message_t;
// Task handling functions
kademlia_message_t task_new_find_node(unsigned int sender_id, unsigned int destination_id, sg_mailbox_t mailbox,
* @param id node we are querying
* @param destination node we are trying to find.
*/
-void send_find_node(node_t node, unsigned int id, unsigned int destination)
+void send_find_node(const_node_t node, unsigned int id, unsigned int destination)
{
/* Gets the mailbox to send to */
sg_mailbox_t mailbox = get_node_mailbox(id);
}
/** @brief Handles the answer to an incoming "find_node" message */
-void handle_find_node(node_t node, kademlia_message_t msg)
+void handle_find_node(const_node_t node, const_kademlia_message_t msg)
{
routing_table_update(node, msg->sender_id);
XBT_VERB("Received a FIND_NODE from %s (%s), he's trying to find %08x", sg_mailbox_get_name(msg->answer_to),
unsigned int find_node(node_t node, unsigned int id_to_find, unsigned int count_in_stats);
void random_lookup(node_t node);
-void send_find_node(node_t node, unsigned int id, unsigned int destination);
+void send_find_node(const_node_t node, unsigned int id, unsigned int destination);
unsigned int send_find_node_to_best(node_t node, const_answer_t node_list);
-void handle_find_node(node_t node, kademlia_message_t data);
+void handle_find_node(const_node_t node, const_kademlia_message_t data);
#endif