Statistics
| Branch: | Revision:

grapes / src / TopologyManager / peersampler_iface.h @ 60fa723d

History | View | Annotate | Download (1.16 KB)

1
#ifndef PEERSAMPLER_IFACE
2
#define PEERSAMPLER_IFACE
3

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

    
16
#if 0
17

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

    
29
#endif        /* PEERSAMPLER_IFACE */