X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9cc88bb9ed0a8974e524f67198984a1e03cb00b0..d6d89316ae6394f900bcb1eda993050b6969e703:/examples/msg/kademlia/node.h diff --git a/examples/msg/kademlia/node.h b/examples/msg/kademlia/node.h index f2a3794991..2539528db1 100644 --- a/examples/msg/kademlia/node.h +++ b/examples/msg/kademlia/node.h @@ -1,5 +1,4 @@ - -/* Copyright (c) 2012. The SimGrid Team. +/* Copyright (c) 2012, 2014. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -8,7 +7,7 @@ #ifndef _MSG_EXAMPLES_ROUTING_H #define _MSG_EXAMPLES_ROUTING_H #include "xbt/dynar.h" -#include "msg/msg.h" +#include "simgrid/msg.h" #include "common.h" @@ -18,22 +17,22 @@ * Information about a foreign node */ typedef struct s_node_contact { - unsigned int id; //The node identifier - unsigned int distance; //The distance from the node + unsigned int id; //The node identifier + unsigned int distance; //The distance from the node } s_node_contact_t, *node_contact_t; -/* +/* * Node data */ typedef struct s_node { - unsigned int id; //node id - 160 bits - routing_table_t table; //node routing table - msg_comm_t receive_comm; //current receiving communication. - msg_task_t task_received; //current task being received - - char mailbox[MAILBOX_NAME_SIZE]; //node mailbox - unsigned int find_node_success; //Number of find_node which have succeeded. - unsigned int find_node_failed; //Number of find_node which have failed. + unsigned int id; //node id - 160 bits + routing_table_t table; //node routing table + msg_comm_t receive_comm; //current receiving communication. + msg_task_t task_received; //current task being received + + char mailbox[MAILBOX_NAME_SIZE+1]; //node mailbox + unsigned int find_node_success; //Number of find_node which have succeeded. + unsigned int find_node_failed; //Number of find_node which have failed. } s_node_t, *node_t; @@ -54,4 +53,4 @@ void get_node_mailbox(unsigned int id, char *mailbox); node_contact_t node_contact_new(unsigned int id, unsigned int distance); node_contact_t node_contact_copy(node_contact_t node_contact); void node_contact_free(node_contact_t contact); -#endif /* _MSG_EXAMPLES_ROUTING_H */ +#endif /* _MSG_EXAMPLES_ROUTING_H */