diff options
Diffstat (limited to 'doc/documentation/tutorial-examples/026.c')
-rw-r--r-- | doc/documentation/tutorial-examples/026.c | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/doc/documentation/tutorial-examples/026.c b/doc/documentation/tutorial-examples/026.c new file mode 100644 index 000000000..264e0b6b9 --- /dev/null +++ b/doc/documentation/tutorial-examples/026.c | |||
@@ -0,0 +1,52 @@ | |||
1 | static void | ||
2 | get_callback (void *cls, | ||
3 | enum GNUNET_DHT_RouteOption options, | ||
4 | enum GNUNET_BLOCK_Type type, | ||
5 | uint32_t hop_count, | ||
6 | uint32_t desired_replication_level, | ||
7 | unsigned int path_length, | ||
8 | const struct GNUNET_PeerIdentity *path, | ||
9 | const struct GNUNET_HashCode * key) | ||
10 | { | ||
11 | } | ||
12 | |||
13 | |||
14 | static void | ||
15 | get_resp_callback (void *cls, | ||
16 | enum GNUNET_BLOCK_Type type, | ||
17 | const struct GNUNET_PeerIdentity *get_path, | ||
18 | unsigned int get_path_length, | ||
19 | const struct GNUNET_PeerIdentity *put_path, | ||
20 | unsigned int put_path_length, | ||
21 | struct GNUNET_TIME_Absolute exp, | ||
22 | const struct GNUNET_HashCode * key, | ||
23 | const void *data, | ||
24 | size_t size) | ||
25 | { | ||
26 | } | ||
27 | |||
28 | |||
29 | static void | ||
30 | put_callback (void *cls, | ||
31 | enum GNUNET_DHT_RouteOption options, | ||
32 | enum GNUNET_BLOCK_Type type, | ||
33 | uint32_t hop_count, | ||
34 | uint32_t desired_replication_level, | ||
35 | unsigned int path_length, | ||
36 | const struct GNUNET_PeerIdentity *path, | ||
37 | struct GNUNET_TIME_Absolute exp, | ||
38 | const struct GNUNET_HashCode * key, | ||
39 | const void *data, | ||
40 | size_t size) | ||
41 | { | ||
42 | } | ||
43 | |||
44 | |||
45 | monitor_handle = GNUNET_DHT_monitor_start (dht_handle, | ||
46 | block_type, | ||
47 | key, | ||
48 | &get_callback, | ||
49 | &get_resp_callback, | ||
50 | &put_callback, | ||
51 | cls); | ||
52 | |||