Statistics
| Branch: | Revision:

grapes / src / Cache / topo_proto.h @ 10ddaca7

History | View | Annotate | Download (1.17 KB)

1
#ifndef TOPO_PROTO
2
#define TOPO_PROTO
3

    
4
struct topo_context;
5

    
6
int topo_reply(struct topo_context *context, const struct peer_cache *c, const struct peer_cache *local_cache, int protocol, int type, int max_peers, int include_me);
7
int topo_reply_header(struct topo_context *context, const struct peer_cache *c, const struct peer_cache *local_cache, int protocol,
8
                      int type, uint8_t *header, int header_len, int max_peers, int include_me);
9
int topo_query_peer(struct topo_context *context, const struct peer_cache *local_cache, struct nodeID *dst, int protocol, int type, int max_peers);
10
int topo_query_peer_header(struct topo_context *context, const struct peer_cache *local_cache, struct nodeID *dst, int protocol, int type,
11
                           uint8_t *header, int header_len, int max_peers);
12

    
13
int topo_proto_myentry_update(struct topo_context *context, struct nodeID *s, int dts, const void *meta, int meta_size);
14
int topo_proto_metadata_update(struct topo_context *context, const void *meta, int meta_size);
15
struct topo_context* topo_proto_init(struct nodeID *s, const void *meta, int meta_size);
16

    
17
void topo_proto_destroy(struct topo_context ** t);
18

    
19
#endif /* TOPO_PROTO */