00001 #ifndef TMAN_H
00002 #define TMAN_H
00003
00024 typedef int (*tmanRankingFunction)(const void *target, const void *p1, const void *p2);
00025
00038 int tmanInit(struct nodeID *myID, void *metadata, int metadata_size, tmanRankingFunction rfun, int gossip_peers);
00039
00040
00051 int tmanAddNeighbour(struct nodeID *neighbour, void *metadata, int metadata_size);
00052
00068 int tmanParseData(const uint8_t *buff, int len, struct nodeID **peers, int size, const void *metadata, int metadata_size);
00069
00070
00080 int tmanChangeMetadata(struct nodeID *peer, void *metadata, int metadata_size);
00081
00088 const void *tmanGetMetadata(int *metadata_size);
00089
00090
00098 int tmanGetNeighbourhoodSize(void);
00099
00100
00118 int tmanGivePeers (int n, struct nodeID **peers, void *metadata);
00119
00120
00133 int tmanGrowNeighbourhood(int n);
00134
00135
00148 int tmanShrinkNeighbourhood(int n);
00149
00150 #endif