Statistics
| Branch: | Revision:

grapes / src / TopologyManager / peersampler_iface.h @ 8bf781e5

History | View | Annotate | Download (1.07 KB)

1 a515fd33 Luca
struct peersampler_iface {
2
  int (*init)(struct nodeID *myID, void *metadata, int metadata_size, const char *config);
3
  int (*change_metadata)(void *metadata, int metadata_size);
4
  int (*add_neighbour)(struct nodeID *neighbour, void *metadata, int metadata_size);
5
  int (*parse_data)(const uint8_t *buff, int len);
6
  const struct nodeID **(*get_neighbourhood)(int *n);
7
  const void *(*get_metadata)(int *metadata_size);
8
  int (*grow_neighbourhood)(int n);
9
  int (*shrink_neighbourhood)(int n);
10
  int (*remove_neighbour)(struct nodeID *neighbour);
11
};
12
13
#if 0
14

15
int ncast_init(struct nodeID *myID, void *metadata, int metadata_size, const char *config);
16
int ncast_change_metadata(void *metadata, int metadata_size);
17
int ncast_add_neighbourhood(struct nodeID *neighbour, void *metadata, int metadata_size);
18
int ncast_parse_data(const uint8_t *buff, int len);
19
const struct nodeID **ncast_get_neighbourhood(int *n);
20
const void *ncast_get_metadata(int *metadata_size);
21
int ncast_grow_neighbourhood(int n);
22
int ncast_shrink_neighbourhood(int n);
23
int ncast_remove_neighbour(struct nodeID *neighbour);
24
#endif