aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorSchanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de>2018-03-05 19:40:00 +0100
committerSchanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de>2018-03-05 19:40:00 +0100
commit044170c00077438d30ab0c832a7193eb093aae30 (patch)
tree151f568d4c2f0aa164f96414c0c20389b011cbbf /src/include
parentbb5a41d072ab7964006cb68a45e043d856cb630e (diff)
parent31c1856767dbf20d04520f9091e0ae80780de7c7 (diff)
downloadgnunet-044170c00077438d30ab0c832a7193eb093aae30.tar.gz
gnunet-044170c00077438d30ab0c832a7193eb093aae30.zip
Merge branch 'master' of git+ssh://gnunet.org/gnunet
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_protocols.h26
-rw-r--r--src/include/gnunet_rps_service.h26
2 files changed, 51 insertions, 1 deletions
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h
index 436adc5a4..d692b28ff 100644
--- a/src/include/gnunet_protocols.h
+++ b/src/include/gnunet_protocols.h
@@ -2621,6 +2621,8 @@ extern "C"
2621 2621
2622#endif /* ENABLE_MALICIOUS */ 2622#endif /* ENABLE_MALICIOUS */
2623 2623
2624/* Debugging API continues at 1130 */
2625
2624/******************************************************************************/ 2626/******************************************************************************/
2625 2627
2626 2628
@@ -2944,8 +2946,30 @@ extern "C"
2944#define GNUNET_MESSAGE_TYPE_AUCTION_CLIENT_OUTCOME 1112 2946#define GNUNET_MESSAGE_TYPE_AUCTION_CLIENT_OUTCOME 1112
2945 2947
2946 2948
2949
2950/******************************************************************************/
2951/********************************* RPS DEBUG ********************************/
2952/******************************************************************************/
2953
2954/**
2955 * @brief Request updates of the view
2956 */
2957#define GNUNET_MESSAGE_TYPE_RPS_CS_DEBUG_VIEW_REQUEST 1130
2958
2959/**
2960 * @brief Send update of the view
2961 */
2962#define GNUNET_MESSAGE_TYPE_RPS_CS_DEBUG_VIEW_REPLY 1131
2963
2964/**
2965 * @brief Cancel getting updates of the view
2966 */
2967#define GNUNET_MESSAGE_TYPE_RPS_CS_DEBUG_VIEW_CANCEL 1132
2968
2969
2970
2947/** 2971/**
2948 * Next available: 1130 2972 * Next available: 1200
2949 */ 2973 */
2950 2974
2951 2975
diff --git a/src/include/gnunet_rps_service.h b/src/include/gnunet_rps_service.h
index c91804a60..8267e28b2 100644
--- a/src/include/gnunet_rps_service.h
+++ b/src/include/gnunet_rps_service.h
@@ -66,6 +66,16 @@ typedef void (* GNUNET_RPS_NotifyReadyCB) (void *cls,
66 const struct GNUNET_PeerIdentity *peers); 66 const struct GNUNET_PeerIdentity *peers);
67 67
68/** 68/**
69 * Callback called when view was updated
70 *
71 * @param num_peers the number of peers returned
72 * @param peers array with num_peers PeerIDs
73 */
74typedef void (* GNUNET_RPS_ViewUpdateCB) (void *cls,
75 uint64_t num_peers,
76 const struct GNUNET_PeerIdentity *peers);
77
78/**
69 * Connect to the rps service 79 * Connect to the rps service
70 * 80 *
71 * @param cfg configuration to use 81 * @param cfg configuration to use
@@ -136,6 +146,22 @@ GNUNET_RPS_act_malicious (struct GNUNET_RPS_Handle *h,
136 const struct GNUNET_PeerIdentity *target_peer); 146 const struct GNUNET_PeerIdentity *target_peer);
137#endif /* ENABLE_MALICIOUS */ 147#endif /* ENABLE_MALICIOUS */
138 148
149/* Get internals for debugging/profiling purposes */
150
151/**
152 * Request updates of view
153 *
154 * @param rps_handle handle to the rps service
155 * @param num_req_peers number of peers we want to receive
156 * (0 for infinite updates)
157 * @param cls a closure that will be given to the callback
158 * @param ready_cb the callback called when the peers are available
159 */
160void
161GNUNET_RPS_view_request (struct GNUNET_RPS_Handle *rps_handle,
162 uint32_t num_updates,
163 GNUNET_RPS_ViewUpdateCB view_update_cb,
164 void *cls);
139 165
140/** 166/**
141 * Disconnect from the rps service 167 * Disconnect from the rps service