X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9cc88bb9ed0a8974e524f67198984a1e03cb00b0..6a42d0b4d34e2b9777922430ef85646dabbefa20:/examples/msg/kademlia/routing_table.h diff --git a/examples/msg/kademlia/routing_table.h b/examples/msg/kademlia/routing_table.h index d13b40e6c0..6baa1cf99b 100644 --- a/examples/msg/kademlia/routing_table.h +++ b/examples/msg/kademlia/routing_table.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 @@ -13,16 +12,16 @@ * Routing table bucket */ typedef struct s_bucket { - xbt_dynar_t nodes; //Nodes in the bucket. - unsigned int id; //bucket id + xbt_dynar_t nodes; //Nodes in the bucket. + unsigned int id; //bucket id } s_bucket_t, *bucket_t; /* * Node routing table */ typedef struct s_routing_table { - unsigned int id; //node id of the client's routing table - s_bucket_t *buckets; //Node bucket list - 160 sized. + unsigned int id; //node id of the client's routing table + s_bucket_t *buckets; //Node bucket list - 160 sized. } s_routing_table_t, *routing_table_t; // bucket functions unsigned int bucket_find_id(bucket_t bucket, unsigned int id); @@ -30,9 +29,10 @@ unsigned int bucket_contains(bucket_t bucket, unsigned int id); // routing table functions routing_table_t routing_table_init(unsigned int node_id); void routing_table_free(routing_table_t table); -unsigned int routing_table_contains(routing_table_t table, unsigned int node_id); +unsigned int routing_table_contains(routing_table_t table, + unsigned int node_id); void routing_table_print(routing_table_t table); bucket_t routing_table_find_bucket(routing_table_t table, unsigned int id); - -#endif /* _MSG_KADEMLIA_EXAMPLES_ROUTING_TABLE */ + +#endif /* _MSG_KADEMLIA_EXAMPLES_ROUTING_TABLE */