Revision 60fa723d

View differences:

src/TopologyManager/blist_cache.h
1
#ifndef BLIST_CACHE
2
#define BLIST_CACHE
3

  
1 4
struct peer_cache;
2 5
struct cache_entry;
3 6
typedef int (*ranking_function)(const void *target, const void *p1, const void *p2);	// FIXME!
......
24 27
struct peer_cache *blist_cache_rank (const struct peer_cache *c, ranking_function rank, const struct nodeID *target, const void *target_meta);
25 28
struct peer_cache *blist_cache_union(struct peer_cache *c1, struct peer_cache *c2, int *size);
26 29
int blist_cache_resize (struct peer_cache *c, int size);
30

  
31
#endif	/* BLIST_CACHE */
src/TopologyManager/blist_proto.h
1
#ifndef BLIST_PROTO
2
#define BLIST_PROTO
3

  
1 4
int blist_ncast_reply(const struct peer_cache *c, struct peer_cache *local_cache);
2 5
int blist_tman_reply(const struct peer_cache *c, struct peer_cache *local_cache, int max_peers);
3 6
int blist_ncast_query(struct peer_cache *local_cache);
......
6 9
int blist_ncast_query_peer(struct peer_cache *local_cache, struct nodeID *dst);
7 10
int blist_proto_metadata_update(void *meta, int meta_size);
8 11
int blist_proto_init(struct nodeID *s, void *meta, int meta_size);
12

  
13
#endif	/* BLIST_PROTO */
src/TopologyManager/cyclon_proto.h
1
#ifndef CYCLON_PROTO
2
#define CYCLON_PROTO
3

  
1 4
int cyclon_reply(const struct peer_cache *c, struct peer_cache *local_cache);
2 5
int cyclon_query(struct peer_cache *local_cache, struct nodeID *dst);
6

  
7
#endif	/* CYCLON_PROTO */
src/TopologyManager/ncast_proto.h
1
#ifndef NCAST_PROTO
2
#define NCAST_PROTO
3

  
1 4
int ncast_reply(const struct peer_cache *c, struct peer_cache *local_cache);
2 5
int ncast_query(struct peer_cache *local_cache);
3 6
int ncast_query_peer(struct peer_cache *local_cache, struct nodeID *dst);
7

  
8
#endif	/* NCAST_PROTO */
src/TopologyManager/peersampler_iface.h
1
#ifndef PEERSAMPLER_IFACE
2
#define PEERSAMPLER_IFACE
3

  
1 4
struct peersampler_iface {
2 5
  int (*init)(struct nodeID *myID, void *metadata, int metadata_size, const char *config);
3 6
  int (*change_metadata)(void *metadata, int metadata_size);
......
22 25
int ncast_shrink_neighbourhood(int n);
23 26
int ncast_remove_neighbour(struct nodeID *neighbour);
24 27
#endif
28

  
29
#endif	/* PEERSAMPLER_IFACE */
src/TopologyManager/proto.h
1
#ifndef PROTO
2
#define PROTO
3

  
1 4
struct topo_header {
2 5
  uint8_t protocol;
3 6
  uint8_t type;
......
9 12
#define TMAN_REPLY 0x04
10 13
#define CYCLON_QUERY 0x05
11 14
#define CYCLON_REPLY 0x06
15

  
16
#endif	/* PROTO */
src/TopologyManager/topo_proto.h
1
#ifndef TOPO_PROTO
2
#define TOPO_PROTO
3

  
1 4
int topo_reply(const struct peer_cache *c, struct peer_cache *local_cache, int protocol, int type, int max_peers, int include_me);
2 5
int topo_query_peer(struct peer_cache *local_cache, struct nodeID *dst, int protocol, int type, int max_peers);
3 6

  
4 7
int topo_proto_metadata_update(void *meta, int meta_size);
5 8
int topo_proto_init(struct nodeID *s, void *meta, int meta_size);
9

  
10
#endif	/* TOPO_PROTO */
src/TopologyManager/topocache.h
1
#ifndef TOPOCACHE
2
#define TOPOCACHE
3

  
1 4
struct peer_cache;
2 5
struct cache_entry;
3 6
typedef int (*ranking_function)(const void *target, const void *p1, const void *p2);	// FIXME!
......
26 29
int cache_resize (struct peer_cache *c, int size);
27 30

  
28 31
void cache_check(const struct peer_cache *c);
32

  
33
#endif	/* TOPOCACHE */
src/config.h
1 1
#ifndef CONFIG_H
2

  
2
#define CONFIG_H
3 3
struct tag;
4 4

  
5 5
struct tag *config_parse(const char *cfg);
src/int_coding.h
1
#ifndef INT_CODING
2
#define INT_CODING
3

  
1 4
static inline void int_cpy(uint8_t *p, int v)
2 5
{
3 6
  uint32_t tmp;
......
15 18

  
16 19
  return tmp;
17 20
}
21
#endif	/* INT_CODING */

Also available in: Unified diff