ceeb2a0a74af019113d4a14cfdb8e970b6354974
[IRC.git] / Robust / src / Runtime / DSTM / interface / dht.h
1 #ifndef _DHT_H
2 #define _DHT_H
3
4 //#define SIMPLE_DHT
5
6 #define DHT_NO_KEY_LIMIT 0xFFFFFFFF
7
8 //called by host which joins (or starts) the system
9 void dhtInit(unsigned int maxKeyCapaciy);
10 //exit system, cleanup
11 void dhtExit();
12
13 //called by whoever performs the creation, move, deletion
14
15 //returns 0 if successful, -1 if an error occurred
16 int dhtInsert(unsigned int key, unsigned int val);
17 //returns 0 if successful, -1 if an error occurred
18 int dhtRemove(unsigned int key);
19 //returns 0 if successful and copies val into *val,
20 // 1 if key not found, -1 if an error occurred
21 int dhtSearch(unsigned int key, unsigned int *val);
22
23 #endif
24