Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Let it compile on my box
[simgrid.git] / examples / gras / p2p / chord / chord.h
1 /* 
2  * vim:ts=2:sw=2:noexpandtab
3  */
4
5 #include "xbt/sysdep.h"
6 #include "gras.h"
7
8
9
10 typedef enum msg_typus{
11         PING,
12         PONG,
13         GET_PRE,
14         REP_PRE,
15         GET_SUC,
16         REP_SUC,
17         STD,
18 }msg_typus;
19
20 /*GRAS_DEFINE_TYPE(s_pbio,
21         struct s_pbio{
22                 msg_typus type;
23                 int dest;
24                 char msg[1024];
25         };
26 );
27 typedef struct s_pbio pbio_t;*/
28
29 //GRAS_DEFINE_TYPE(s_ping,
30         struct s_ping{
31                 int id;
32         };
33 //);
34 typedef struct s_ping ping_t;
35
36 //GRAS_DEFINE_TYPE(s_pong,
37         struct s_pong{
38                 int id;
39                 int failed;
40         };
41 //);
42 typedef struct s_pong pong_t;
43
44 GRAS_DEFINE_TYPE(s_get_suc,
45         struct s_get_suc{
46                 int id;
47         };
48 );
49 typedef struct s_get_suc get_suc_t;
50
51 GRAS_DEFINE_TYPE(s_rep_suc,
52         struct s_rep_suc{
53                 int id;
54                 char host[1024];
55                 int port;
56         };
57 );
58 typedef struct s_rep_suc rep_suc_t;
59
60 typedef struct finger_elem{
61         int id;
62         char host[1024];
63         int port;
64 }finger_elem;