aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorSchanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de>2018-01-08 10:49:06 +0100
committerSchanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de>2018-01-08 10:49:06 +0100
commitf2d31fb82a314dcf6819dd494ff4a11e4f871c4e (patch)
tree029043b01c23f6e780f7fd01c15d467c568664ff /src/include
parent9f5ea1f7f809d73cbeb7ce5538550c42e978d340 (diff)
parent3f52ce03cb13118bef9a6fbe380f229e2cbec45f (diff)
downloadgnunet-f2d31fb82a314dcf6819dd494ff4a11e4f871c4e.tar.gz
gnunet-f2d31fb82a314dcf6819dd494ff4a11e4f871c4e.zip
Merge remote-tracking branch 'origin/master' into identity_oidc
Diffstat (limited to 'src/include')
-rw-r--r--src/include/Makefile.am7
-rw-r--r--src/include/gnunet_abe_lib.h193
-rw-r--r--src/include/gnunet_common.h15
-rw-r--r--src/include/gnunet_credential_service.h33
-rw-r--r--src/include/gnunet_crypto_lib.h82
-rw-r--r--src/include/gnunet_fs_service.h3
-rw-r--r--src/include/gnunet_identity_attribute_lib.h2
-rw-r--r--src/include/gnunet_identity_provider_service.h19
-rw-r--r--src/include/gnunet_mst_lib.h4
-rw-r--r--src/include/gnunet_network_lib.h8
-rw-r--r--src/include/gnunet_protocols.h30
-rw-r--r--src/include/gnunet_rest_lib.h6
-rw-r--r--src/include/gnunet_rest_plugin.h2
-rw-r--r--src/include/gnunet_scheduler_lib.h44
-rw-r--r--src/include/gnunet_service_lib.h7
-rw-r--r--src/include/gnunet_set_service.h3
16 files changed, 298 insertions, 160 deletions
diff --git a/src/include/Makefile.am b/src/include/Makefile.am
index e5abec416..08e9dd156 100644
--- a/src/include/Makefile.am
+++ b/src/include/Makefile.am
@@ -33,6 +33,7 @@ gnunetinclude_HEADERS = \
33 gnunet_bandwidth_lib.h \ 33 gnunet_bandwidth_lib.h \
34 gnunet_bio_lib.h \ 34 gnunet_bio_lib.h \
35 gnunet_block_lib.h \ 35 gnunet_block_lib.h \
36 gnunet_block_group_lib.h \
36 gnunet_block_plugin.h \ 37 gnunet_block_plugin.h \
37 gnunet_client_lib.h \ 38 gnunet_client_lib.h \
38 gnunet_common.h \ 39 gnunet_common.h \
@@ -65,7 +66,10 @@ gnunetinclude_HEADERS = \
65 gnunet_hello_lib.h \ 66 gnunet_hello_lib.h \
66 gnunet_helper_lib.h \ 67 gnunet_helper_lib.h \
67 gnunet_identity_service.h \ 68 gnunet_identity_service.h \
69 gnunet_identity_provider_service.h \
68 gnunet_json_lib.h \ 70 gnunet_json_lib.h \
71 gnunet_jsonapi_lib.h \
72 gnunet_jsonapi_util.h \
69 gnunet_load_lib.h \ 73 gnunet_load_lib.h \
70 gnunet_cadet_service.h \ 74 gnunet_cadet_service.h \
71 gnunet_microphone_lib.h \ 75 gnunet_microphone_lib.h \
@@ -102,6 +106,8 @@ gnunetinclude_HEADERS = \
102 gnunet_protocols.h \ 106 gnunet_protocols.h \
103 gnunet_resolver_service.h \ 107 gnunet_resolver_service.h \
104 gnunet_regex_service.h \ 108 gnunet_regex_service.h \
109 gnunet_rest_lib.h \
110 gnunet_rest_plugin.h \
105 gnunet_revocation_service.h \ 111 gnunet_revocation_service.h \
106 gnunet_scalarproduct_service.h \ 112 gnunet_scalarproduct_service.h \
107 gnunet_scheduler_lib.h \ 113 gnunet_scheduler_lib.h \
@@ -111,6 +117,7 @@ gnunetinclude_HEADERS = \
111 gnunet_signal_lib.h \ 117 gnunet_signal_lib.h \
112 gnunet_signatures.h \ 118 gnunet_signatures.h \
113 gnunet_social_service.h \ 119 gnunet_social_service.h \
120 gnunet_socks.h \
114 gnunet_speaker_lib.h \ 121 gnunet_speaker_lib.h \
115 gnunet_sq_lib.h \ 122 gnunet_sq_lib.h \
116 gnunet_statistics_service.h \ 123 gnunet_statistics_service.h \
diff --git a/src/include/gnunet_abe_lib.h b/src/include/gnunet_abe_lib.h
new file mode 100644
index 000000000..f73ea2431
--- /dev/null
+++ b/src/include/gnunet_abe_lib.h
@@ -0,0 +1,193 @@
1/*
2 This file is part of GNUnet.
3 Copyright (C) 2001-2018 GNUnet e.V.
4
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
9
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20
21/**
22 * @file include/gnunet_abe_lib.h
23 * @brief Attribute-Based Encryption primitives for GNUnet
24 *
25 * @author Martin Schanzenbach
26 *
27 * @defgroup abe ABE Crypto library: Attribute-Based Encryption operations
28 *
29 */
30#ifndef GNUNET_ABE_LIB_H
31#define GNUNET_ABE_LIB_H
32
33#ifdef __cplusplus
34extern "C"
35{
36#if 0 /* keep Emacsens' auto-indent happy */
37}
38#endif
39#endif
40
41#include "gnunet_common.h"
42#include <gcrypt.h>
43
44/**
45 * @brief type for ABE master keys
46 */
47struct GNUNET_CRYPTO_AbeMasterKey;
48
49/**
50 * @brief type for ABE keys
51 */
52struct GNUNET_CRYPTO_AbeKey;
53
54
55
56/**
57 * @ingroup abe
58 * Create a new CP-ABE master key. Caller must free return value.
59 *
60 * @return fresh private key; free using #GNUNET_ABE_cpabe_delete_master_key
61 */
62struct GNUNET_ABE_AbeMasterKey *
63GNUNET_ABE_cpabe_create_master_key (void);
64
65/**
66 * @ingroup abe
67 * Delete a CP-ABE master key.
68 *
69 * @param key the master key
70 * @return fresh private key; free using #GNUNET_free
71 */
72void
73GNUNET_ABE_cpabe_delete_master_key (struct GNUNET_ABE_AbeMasterKey *key);
74
75/**
76 * @ingroup abe
77 * Create a new CP-ABE key. Caller must free return value.
78 *
79 * @param key the master key
80 * @param attrs the attributes to append to the key
81 * @return fresh private key; free using #GNUNET_ABE_cpabe_delete_key
82 */
83struct GNUNET_ABE_AbeKey *
84GNUNET_ABE_cpabe_create_key (struct GNUNET_ABE_AbeMasterKey *key,
85 char **attrs);
86
87/**
88 * @ingroup abe
89 * Delete a CP-ABE key.
90 *
91 * @param key the key to delete
92 * @param delete_pub GNUNE_YES if the public key should also be freed (bug in gabe)
93 * @return fresh private key; free using #GNUNET_free
94 */
95void
96GNUNET_ABE_cpabe_delete_key (struct GNUNET_ABE_AbeKey *key,
97 int delete_pub);
98
99
100/**
101 * @ingroup abe
102 * Encrypt a block using sessionkey.
103 *
104 * @param block the block to encrypt
105 * @param size the size of the @a block
106 * @param policy the ABE policy
107 * @param key the key used to encrypt
108 * @param result the result buffer. Will be allocated. Free using #GNUNET_free
109 * @return the size of the encrypted block, -1 for errors
110 */
111ssize_t
112GNUNET_ABE_cpabe_encrypt (const void *block,
113 size_t size,
114 const char *policy,
115 const struct GNUNET_ABE_AbeMasterKey *key,
116 void **result);
117
118/**
119 * @ingroup abe
120 * Decrypt a block using the ABE key.
121 *
122 * @param block the block to encrypt
123 * @param size the size of the @a block
124 * @param key the key used to decrypt
125 * @param result the result buffer. Will be allocated. Free using #GNUNET_free
126 * @return the size of the encrypted block, -1 for errors
127 */
128ssize_t
129GNUNET_ABE_cpabe_decrypt (const void *block,
130 size_t size,
131 const struct GNUNET_ABE_AbeKey *key,
132 void **result);
133
134/**
135 * @ingroup abe
136 * Serialize an ABE key.
137 *
138 * @param key the key to serialize
139 * @param result the result buffer. Will be allocated. Free using #GNUNET_free
140 * @return the size of the encrypted block, -1 for errors
141 */
142ssize_t
143GNUNET_ABE_cpabe_serialize_key (const struct GNUNET_ABE_AbeKey *key,
144 void **result);
145
146/**
147 * @ingroup abe
148 * Deserialize a serialized ABE key.
149 *
150 * @param data the data to deserialize
151 * @param len the length of the data.
152 * @return the ABE key. NULL of unsuccessful
153 */
154struct GNUNET_ABE_AbeKey*
155GNUNET_ABE_cpabe_deserialize_key (const void *data,
156 size_t len);
157
158/**
159 * @ingroup abe
160 * Serialize an ABE master key.
161 *
162 * @param key the key to serialize
163 * @param result the result buffer. Will be allocated. Free using #GNUNET_free
164 * @return the size of the encrypted block, -1 for errors
165 */
166ssize_t
167GNUNET_ABE_cpabe_serialize_master_key (const struct GNUNET_ABE_AbeMasterKey *key,
168 void **result);
169
170/**
171 * @ingroup abe
172 * Deserialize an ABE master key.
173 *
174 * @param data the data to deserialize
175 * @param len the length of the data.
176 * @return the ABE key. NULL of unsuccessful
177 */
178struct GNUNET_ABE_AbeMasterKey*
179GNUNET_ABE_cpabe_deserialize_master_key (const void *data,
180 size_t len);
181
182
183#if 0 /* keep Emacsens' auto-indent happy */
184{
185#endif
186#ifdef __cplusplus
187}
188#endif
189
190
191/* ifndef GNUNET_ABE_LIB_H */
192#endif
193/* end of gnunet_abe_lib.h */
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index d7f7b76ff..7d23e6f9b 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -988,7 +988,8 @@ GNUNET_ntoh_double (double d);
988 * arr is important since size is the number of elements and 988 * arr is important since size is the number of elements and
989 * not the size in bytes 989 * not the size in bytes
990 * @param size the number of elements in the existing vector (number 990 * @param size the number of elements in the existing vector (number
991 * of elements to copy over) 991 * of elements to copy over), will be updated with the new
992 * array size
992 * @param tsize the target size for the resulting vector, use 0 to 993 * @param tsize the target size for the resulting vector, use 0 to
993 * free the vector (then, arr will be NULL afterwards). 994 * free the vector (then, arr will be NULL afterwards).
994 */ 995 */
@@ -996,8 +997,16 @@ GNUNET_ntoh_double (double d);
996 997
997/** 998/**
998 * @ingroup memory 999 * @ingroup memory
999 * Append an element to a list (growing the 1000 * Append an element to a list (growing the list by one).
1000 * list by one). 1001 *
1002 * @param arr base-pointer of the vector, may be NULL if size is 0;
1003 * will be updated to reflect the new address. The TYPE of
1004 * arr is important since size is the number of elements and
1005 * not the size in bytes
1006 * @param size the number of elements in the existing vector (number
1007 * of elements to copy over), will be updated with the new
1008 * array size
1009 * @param element the element that will be appended to the array
1001 */ 1010 */
1002#define GNUNET_array_append(arr,size,element) do { GNUNET_array_grow(arr,size,size+1); arr[size-1] = element; } while(0) 1011#define GNUNET_array_append(arr,size,element) do { GNUNET_array_grow(arr,size,size+1); arr[size-1] = element; } while(0)
1003 1012
diff --git a/src/include/gnunet_credential_service.h b/src/include/gnunet_credential_service.h
index 67c2f2b4c..7d6f9e973 100644
--- a/src/include/gnunet_credential_service.h
+++ b/src/include/gnunet_credential_service.h
@@ -20,7 +20,6 @@
20 20
21/** 21/**
22 * @author Martin Schanzenbach 22 * @author Martin Schanzenbach
23 * @author Adnan Husain
24 * 23 *
25 * @file 24 * @file
26 * API to the Credential service 25 * API to the Credential service
@@ -274,7 +273,8 @@ typedef void (*GNUNET_CREDENTIAL_RemoveDelegateResultProcessor) (void *cls,
274 * @param issuer_key the issuer public key 273 * @param issuer_key the issuer public key
275 * @param issuer_attribute the issuer attribute 274 * @param issuer_attribute the issuer attribute
276 * @param subject_key the subject public key 275 * @param subject_key the subject public key
277 * @param subject_attribute the attribute claimed by the subject 276 * @param credential_count number of credentials
277 * @param credentials the subject credentials
278 * @param proc function to call on result 278 * @param proc function to call on result
279 * @param proc_cls closure for processor 279 * @param proc_cls closure for processor
280 * @return handle to the queued request 280 * @return handle to the queued request
@@ -305,6 +305,8 @@ GNUNET_CREDENTIAL_collect (struct GNUNET_CREDENTIAL_Handle *handle,
305 * @param attribute the name of the attribute to delegate 305 * @param attribute the name of the attribute to delegate
306 * @param subject the subject of the delegation 306 * @param subject the subject of the delegation
307 * @param delegated_attribute the name of the attribute that is delegated to 307 * @param delegated_attribute the name of the attribute that is delegated to
308 * @param proc the result callback
309 * @param proc_cls the result closure context
308 * @return handle to the queued request 310 * @return handle to the queued request
309 */ 311 */
310struct GNUNET_CREDENTIAL_Request * 312struct GNUNET_CREDENTIAL_Request *
@@ -322,6 +324,8 @@ GNUNET_CREDENTIAL_add_delegation (struct GNUNET_CREDENTIAL_Handle *handle,
322 * @param handle handle to the Credential service 324 * @param handle handle to the Credential service
323 * @param issuer the ego that was used to delegate the attribute 325 * @param issuer the ego that was used to delegate the attribute
324 * @param attribute the name of the attribute that is delegated 326 * @param attribute the name of the attribute that is delegated
327 * @param proc the callback
328 * @param proc_cls callback closure
325 * @return handle to the queued request 329 * @return handle to the queued request
326 */ 330 */
327struct GNUNET_CREDENTIAL_Request * 331struct GNUNET_CREDENTIAL_Request *
@@ -336,7 +340,6 @@ GNUNET_CREDENTIAL_remove_delegation (struct GNUNET_CREDENTIAL_Handle *handle,
336/** 340/**
337 * Issue an attribute to a subject 341 * Issue an attribute to a subject
338 * 342 *
339 * @param handle handle to the Credential service
340 * @param issuer the ego that should be used to issue the attribute 343 * @param issuer the ego that should be used to issue the attribute
341 * @param subject the subject of the attribute 344 * @param subject the subject of the attribute
342 * @param attribute the name of the attribute 345 * @param attribute the name of the attribute
@@ -344,32 +347,12 @@ GNUNET_CREDENTIAL_remove_delegation (struct GNUNET_CREDENTIAL_Handle *handle,
344 * @return handle to the queued request 347 * @return handle to the queued request
345 */ 348 */
346struct GNUNET_CREDENTIAL_Credential* 349struct GNUNET_CREDENTIAL_Credential*
347GNUNET_CREDENTIAL_credential_issue ( 350GNUNET_CREDENTIAL_credential_issue (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
348 const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
349 struct GNUNET_CRYPTO_EcdsaPublicKey *subject, 351 struct GNUNET_CRYPTO_EcdsaPublicKey *subject,
350 const char *attribute, 352 const char *attribute,
351 struct GNUNET_TIME_Absolute *expiration); 353 struct GNUNET_TIME_Absolute *expiration);
352 354
353 355
354/**
355 * Remove a credential
356 *
357 * @param handle handle to the Credential service
358 * @param issuer the identity that issued the credential
359 * @param subject the subject of the credential
360 * @param credential the name of the credential
361 * @return handle to the queued request
362 */
363/**
364 struct GNUNET_CREDENTIAL_IssueRequest *
365 GNUNET_CREDENTIAL_remove (struct GNUNET_CREDENTIAL_Handle *handle,
366 struct GNUNET_IDENTITY_Ego *issuer,
367 struct GNUNET_IDENTITY_Ego *subject,
368 const char *credential,
369 GNUNET_CREDENTIAL_IssueResultProcessor proc,
370 void *proc_cls);
371 */
372
373 356
374/** 357/**
375 * Cancel pending lookup request 358 * Cancel pending lookup request
@@ -377,7 +360,7 @@ GNUNET_CREDENTIAL_credential_issue (
377 * @param lr the lookup request to cancel 360 * @param lr the lookup request to cancel
378 */ 361 */
379void 362void
380GNUNET_CREDENTIAL_request_cancel (struct GNUNET_CREDENTIAL_Request *vr); 363GNUNET_CREDENTIAL_request_cancel (struct GNUNET_CREDENTIAL_Request *lr);
381 364
382 365
383#if 0 /* keep Emacsens' auto-indent happy */ 366#if 0 /* keep Emacsens' auto-indent happy */
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index 2fd67ae1b..e886a561c 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -395,11 +395,6 @@ struct GNUNET_CRYPTO_PaillierCiphertext
395 unsigned char bits[GNUNET_CRYPTO_PAILLIER_BITS * 2 / 8]; 395 unsigned char bits[GNUNET_CRYPTO_PAILLIER_BITS * 2 / 8];
396}; 396};
397 397
398/**
399 * @brief type for ABE master keys
400 */
401struct GNUNET_CRYPTO_AbeMasterKey;
402
403 398
404/* **************** Functions and Macros ************* */ 399/* **************** Functions and Macros ************* */
405 400
@@ -2142,83 +2137,6 @@ GNUNET_CRYPTO_rsa_verify (const struct GNUNET_HashCode *hash,
2142 const struct GNUNET_CRYPTO_RsaPublicKey *public_key); 2137 const struct GNUNET_CRYPTO_RsaPublicKey *public_key);
2143 2138
2144 2139
2145/**
2146 * @ingroup crypto
2147 * Create a new CP-ABE master key. Caller must free return value.
2148 *
2149 * @return fresh private key; free using #GNUNET_free
2150 */
2151struct GNUNET_CRYPTO_AbeMasterKey *
2152GNUNET_CRYPTO_cpabe_create_master_key (void);
2153void
2154GNUNET_CRYPTO_cpabe_delete_master_key (struct GNUNET_CRYPTO_AbeMasterKey *key);
2155
2156/**
2157 * @ingroup crypto
2158 * Create a new CP-ABE key. Caller must free return value.
2159 *
2160 * @return fresh private key; free using #GNUNET_free
2161 */
2162struct GNUNET_CRYPTO_AbeKey *
2163GNUNET_CRYPTO_cpabe_create_key (struct GNUNET_CRYPTO_AbeMasterKey *msk,
2164 char **attrs);
2165void
2166GNUNET_CRYPTO_cpabe_delete_key (struct GNUNET_CRYPTO_AbeKey *key,
2167 int delete_pub);
2168
2169
2170/**
2171 * @ingroup crypto
2172 * Encrypt a block using sessionkey.
2173 *
2174 * @param block the block to encrypt
2175 * @param size the size of the @a block
2176 * @param sessionkey the key used to encrypt
2177 * @param iv the initialization vector to use, use INITVALUE
2178 * for streams.
2179 * @return the size of the encrypted block, -1 for errors
2180 */
2181ssize_t
2182GNUNET_CRYPTO_cpabe_encrypt (const void *block,
2183 size_t size,
2184 const char *policy,
2185 const struct GNUNET_CRYPTO_AbeMasterKey *key,
2186 void **result);
2187
2188/**
2189 * @ingroup crypto
2190 * Encrypt a block using sessionkey.
2191 *
2192 * @param block the block to encrypt
2193 * @param size the size of the @a block
2194 * @param sessionkey the key used to encrypt
2195 * @param iv the initialization vector to use, use INITVALUE
2196 * for streams.
2197 * @return the size of the encrypted block, -1 for errors
2198 */
2199ssize_t
2200GNUNET_CRYPTO_cpabe_decrypt (const void *block,
2201 size_t size,
2202 const struct GNUNET_CRYPTO_AbeKey *key,
2203 void **result);
2204
2205ssize_t
2206GNUNET_CRYPTO_cpabe_serialize_key (const struct GNUNET_CRYPTO_AbeKey *key,
2207 void **result);
2208
2209struct GNUNET_CRYPTO_AbeKey*
2210GNUNET_CRYPTO_cpabe_deserialize_key (const void *data,
2211 size_t len);
2212
2213ssize_t
2214GNUNET_CRYPTO_cpabe_serialize_master_key (const struct GNUNET_CRYPTO_AbeMasterKey *key,
2215 void **result);
2216
2217struct GNUNET_CRYPTO_AbeMasterKey*
2218GNUNET_CRYPTO_cpabe_deserialize_master_key (const void *data,
2219 size_t len);
2220
2221
2222#if 0 /* keep Emacsens' auto-indent happy */ 2140#if 0 /* keep Emacsens' auto-indent happy */
2223{ 2141{
2224#endif 2142#endif
diff --git a/src/include/gnunet_fs_service.h b/src/include/gnunet_fs_service.h
index ac418072e..cbad374b5 100644
--- a/src/include/gnunet_fs_service.h
+++ b/src/include/gnunet_fs_service.h
@@ -109,8 +109,9 @@ typedef int
109 * 109 *
110 * @param uri uri to convert to a unique key 110 * @param uri uri to convert to a unique key
111 * @param key wherer to store the unique key 111 * @param key wherer to store the unique key
112 * @return #GNUNET_OK on success
112 */ 113 */
113void 114int
114GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, 115GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri,
115 struct GNUNET_HashCode *key); 116 struct GNUNET_HashCode *key);
116 117
diff --git a/src/include/gnunet_identity_attribute_lib.h b/src/include/gnunet_identity_attribute_lib.h
index a6c9e1f1c..316b0bf95 100644
--- a/src/include/gnunet_identity_attribute_lib.h
+++ b/src/include/gnunet_identity_attribute_lib.h
@@ -122,7 +122,7 @@ struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry
122/** 122/**
123 * Create a new attribute claim. 123 * Create a new attribute claim.
124 * 124 *
125 * @param name the attribute name 125 * @param attr_name the attribute name
126 * @param type the attribute type 126 * @param type the attribute type
127 * @param data the attribute value 127 * @param data the attribute value
128 * @param data_size the attribute value size 128 * @param data_size the attribute value size
diff --git a/src/include/gnunet_identity_provider_service.h b/src/include/gnunet_identity_provider_service.h
index 6bc05d0f4..be935e898 100644
--- a/src/include/gnunet_identity_provider_service.h
+++ b/src/include/gnunet_identity_provider_service.h
@@ -131,6 +131,7 @@ GNUNET_IDENTITY_PROVIDER_attribute_store (struct GNUNET_IDENTITY_PROVIDER_Handle
131 * Process an attribute that was stored in the idp. 131 * Process an attribute that was stored in the idp.
132 * 132 *
133 * @param cls closure 133 * @param cls closure
134 * @param identity the identity
134 * @param attr the attribute 135 * @param attr the attribute
135 */ 136 */
136typedef void 137typedef void
@@ -211,19 +212,19 @@ typedef void
211 212
212/** 213/**
213 * Issues a ticket to another identity. The identity may use 214 * Issues a ticket to another identity. The identity may use
214 * @GNUNET_IDENTITY_PROVIDER_authorization_ticket_consume to consume the ticket 215 * GNUNET_IDENTITY_PROVIDER_ticket_consume to consume the ticket
215 * and retrieve the attributes specified in the AttributeList. 216 * and retrieve the attributes specified in the AttributeList.
216 * 217 *
217 * @param id the identity provider to use 218 * @param h the identity provider to use
218 * @param iss the issuing identity 219 * @param iss the issuing identity
219 * @param rp the subject of the ticket (the relying party) 220 * @param rp the subject of the ticket (the relying party)
220 * @param attr the attributes that the relying party is given access to 221 * @param attrs the attributes that the relying party is given access to
221 * @param cb the callback 222 * @param cb the callback
222 * @param cb_cls the callback closure 223 * @param cb_cls the callback closure
223 * @return handle to abort the operation 224 * @return handle to abort the operation
224 */ 225 */
225struct GNUNET_IDENTITY_PROVIDER_Operation * 226struct GNUNET_IDENTITY_PROVIDER_Operation *
226GNUNET_IDENTITY_PROVIDER_ticket_issue (struct GNUNET_IDENTITY_PROVIDER_Handle *id, 227GNUNET_IDENTITY_PROVIDER_ticket_issue (struct GNUNET_IDENTITY_PROVIDER_Handle *h,
227 const struct GNUNET_CRYPTO_EcdsaPrivateKey *iss, 228 const struct GNUNET_CRYPTO_EcdsaPrivateKey *iss,
228 const struct GNUNET_CRYPTO_EcdsaPublicKey *rp, 229 const struct GNUNET_CRYPTO_EcdsaPublicKey *rp,
229 const struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs, 230 const struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs,
@@ -234,7 +235,7 @@ GNUNET_IDENTITY_PROVIDER_ticket_issue (struct GNUNET_IDENTITY_PROVIDER_Handle *i
234 * Revoked an issued ticket. The relying party will be unable to retrieve 235 * Revoked an issued ticket. The relying party will be unable to retrieve
235 * updated attributes. 236 * updated attributes.
236 * 237 *
237 * @param id the identity provider to use 238 * @param h the identity provider to use
238 * @param identity the issuing identity 239 * @param identity the issuing identity
239 * @param ticket the ticket to revoke 240 * @param ticket the ticket to revoke
240 * @param cb the callback 241 * @param cb the callback
@@ -242,7 +243,7 @@ GNUNET_IDENTITY_PROVIDER_ticket_issue (struct GNUNET_IDENTITY_PROVIDER_Handle *i
242 * @return handle to abort the operation 243 * @return handle to abort the operation
243 */ 244 */
244struct GNUNET_IDENTITY_PROVIDER_Operation * 245struct GNUNET_IDENTITY_PROVIDER_Operation *
245GNUNET_IDENTITY_PROVIDER_ticket_revoke (struct GNUNET_IDENTITY_PROVIDER_Handle *id, 246GNUNET_IDENTITY_PROVIDER_ticket_revoke (struct GNUNET_IDENTITY_PROVIDER_Handle *h,
246 const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, 247 const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
247 const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket, 248 const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket,
248 GNUNET_IDENTITY_PROVIDER_ContinuationWithStatus cb, 249 GNUNET_IDENTITY_PROVIDER_ContinuationWithStatus cb,
@@ -254,7 +255,7 @@ GNUNET_IDENTITY_PROVIDER_ticket_revoke (struct GNUNET_IDENTITY_PROVIDER_Handle *
254 * Consumes an issued ticket. The ticket is persisted 255 * Consumes an issued ticket. The ticket is persisted
255 * and used to retrieve identity information from the issuer 256 * and used to retrieve identity information from the issuer
256 * 257 *
257 * @param id the identity provider to use 258 * @param h the identity provider to use
258 * @param identity the identity that is the subject of the issued ticket (the audience) 259 * @param identity the identity that is the subject of the issued ticket (the audience)
259 * @param ticket the issued ticket to consume 260 * @param ticket the issued ticket to consume
260 * @param cb the callback to call 261 * @param cb the callback to call
@@ -262,7 +263,7 @@ GNUNET_IDENTITY_PROVIDER_ticket_revoke (struct GNUNET_IDENTITY_PROVIDER_Handle *
262 * @return handle to abort the operation 263 * @return handle to abort the operation
263 */ 264 */
264struct GNUNET_IDENTITY_PROVIDER_Operation * 265struct GNUNET_IDENTITY_PROVIDER_Operation *
265GNUNET_IDENTITY_PROVIDER_ticket_consume (struct GNUNET_IDENTITY_PROVIDER_Handle *id, 266GNUNET_IDENTITY_PROVIDER_ticket_consume (struct GNUNET_IDENTITY_PROVIDER_Handle *h,
266 const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, 267 const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity,
267 const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket, 268 const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket,
268 GNUNET_IDENTITY_PROVIDER_AttributeResult cb, 269 GNUNET_IDENTITY_PROVIDER_AttributeResult cb,
@@ -299,7 +300,7 @@ GNUNET_IDENTITY_PROVIDER_ticket_iteration_start (struct GNUNET_IDENTITY_PROVIDER
299 * Lists all tickets that have been issued to remote 300 * Lists all tickets that have been issued to remote
300 * identites (relying parties) 301 * identites (relying parties)
301 * 302 *
302 * @param id the identity provider to use 303 * @param h the identity provider to use
303 * @param identity the issuing identity 304 * @param identity the issuing identity
304 * @param error_cb function to call on error (i.e. disconnect), 305 * @param error_cb function to call on error (i.e. disconnect),
305 * the handle is afterwards invalid 306 * the handle is afterwards invalid
diff --git a/src/include/gnunet_mst_lib.h b/src/include/gnunet_mst_lib.h
index 7a1ca7a55..fe6524eb3 100644
--- a/src/include/gnunet_mst_lib.h
+++ b/src/include/gnunet_mst_lib.h
@@ -61,7 +61,9 @@ struct GNUNET_MessageStreamTokenizer;
61 * 61 *
62 * @param cls closure 62 * @param cls closure
63 * @param message the actual message 63 * @param message the actual message
64 * @return #GNUNET_OK on success, #GNUNET_SYSERR to stop further processing 64 * @return #GNUNET_OK on success,
65 * #GNUNET_NO to stop further processing due to disconnect (no error)
66 * #GNUNET_SYSERR to stop further processing due to error
65 */ 67 */
66typedef int 68typedef int
67(*GNUNET_MessageTokenizerCallback) (void *cls, 69(*GNUNET_MessageTokenizerCallback) (void *cls,
diff --git a/src/include/gnunet_network_lib.h b/src/include/gnunet_network_lib.h
index d9d3d90e7..2c344749f 100644
--- a/src/include/gnunet_network_lib.h
+++ b/src/include/gnunet_network_lib.h
@@ -53,7 +53,7 @@ struct GNUNET_NETWORK_FDSet
53{ 53{
54 54
55 /** 55 /**
56 * Maximum number of any socket socket descriptor in the set (plus one) 56 * Maximum number of any socket descriptor in the set (plus one)
57 */ 57 */
58 int nsds; 58 int nsds;
59 59
@@ -464,7 +464,7 @@ GNUNET_NETWORK_fdset_copy (struct GNUNET_NETWORK_FDSet *to,
464 * @return POSIX file descriptor 464 * @return POSIX file descriptor
465 */ 465 */
466int 466int
467GNUNET_NETWORK_get_fd (struct GNUNET_NETWORK_Handle *desc); 467GNUNET_NETWORK_get_fd (const struct GNUNET_NETWORK_Handle *desc);
468 468
469 469
470/** 470/**
@@ -474,7 +474,7 @@ GNUNET_NETWORK_get_fd (struct GNUNET_NETWORK_Handle *desc);
474 * @return POSIX file descriptor 474 * @return POSIX file descriptor
475 */ 475 */
476struct sockaddr* 476struct sockaddr*
477GNUNET_NETWORK_get_addr (struct GNUNET_NETWORK_Handle *desc); 477GNUNET_NETWORK_get_addr (const struct GNUNET_NETWORK_Handle *desc);
478 478
479 479
480/** 480/**
@@ -484,7 +484,7 @@ GNUNET_NETWORK_get_addr (struct GNUNET_NETWORK_Handle *desc);
484 * @return socklen_t for sockaddr 484 * @return socklen_t for sockaddr
485 */ 485 */
486socklen_t 486socklen_t
487GNUNET_NETWORK_get_addrlen (struct GNUNET_NETWORK_Handle *desc); 487GNUNET_NETWORK_get_addrlen (const struct GNUNET_NETWORK_Handle *desc);
488 488
489 489
490/** 490/**
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h
index 6710d749f..436adc5a4 100644
--- a/src/include/gnunet_protocols.h
+++ b/src/include/gnunet_protocols.h
@@ -2067,7 +2067,11 @@ extern "C"
2067/** S->C: slave join acknowledgement */ 2067/** S->C: slave join acknowledgement */
2068#define GNUNET_MESSAGE_TYPE_PSYC_SLAVE_JOIN_ACK 684 2068#define GNUNET_MESSAGE_TYPE_PSYC_SLAVE_JOIN_ACK 684
2069 2069
2070/* 685-686 */ 2070/** C->S: request to part from a channel */
2071#define GNUNET_MESSAGE_TYPE_PSYC_PART_REQUEST 685
2072
2073/** S->C: acknowledgement that a slave of master parted from a channel */
2074#define GNUNET_MESSAGE_TYPE_PSYC_PART_ACK 686
2071 2075
2072/** M->S->C: incoming join request from multicast */ 2076/** M->S->C: incoming join request from multicast */
2073#define GNUNET_MESSAGE_TYPE_PSYC_JOIN_REQUEST 687 2077#define GNUNET_MESSAGE_TYPE_PSYC_JOIN_REQUEST 687
@@ -2258,6 +2262,7 @@ extern "C"
2258 */ 2262 */
2259#define GNUNET_MESSAGE_TYPE_MULTICAST_PART_ACK 755 2263#define GNUNET_MESSAGE_TYPE_MULTICAST_PART_ACK 755
2260 2264
2265// FIXME: this is never used!
2261/** 2266/**
2262 * Group terminated. 2267 * Group terminated.
2263 */ 2268 */
@@ -2398,35 +2403,38 @@ extern "C"
2398/** C->S: request to leave a place */ 2403/** C->S: request to leave a place */
2399#define GNUNET_MESSAGE_TYPE_SOCIAL_PLACE_LEAVE 848 2404#define GNUNET_MESSAGE_TYPE_SOCIAL_PLACE_LEAVE 848
2400 2405
2406/** S->C: place leave acknowledgement */
2407#define GNUNET_MESSAGE_TYPE_SOCIAL_PLACE_LEAVE_ACK 849
2408
2401/** C->S: add place to GNS zone */ 2409/** C->S: add place to GNS zone */
2402#define GNUNET_MESSAGE_TYPE_SOCIAL_ZONE_ADD_PLACE 849 2410#define GNUNET_MESSAGE_TYPE_SOCIAL_ZONE_ADD_PLACE 850
2403 2411
2404/** C->S: add nym to GNS zone */ 2412/** C->S: add nym to GNS zone */
2405#define GNUNET_MESSAGE_TYPE_SOCIAL_ZONE_ADD_NYM 850 2413#define GNUNET_MESSAGE_TYPE_SOCIAL_ZONE_ADD_NYM 851
2406 2414
2407/** C->S: connect application */ 2415/** C->S: connect application */
2408#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_CONNECT 851 2416#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_CONNECT 852
2409 2417
2410/** C->S: detach a place from application */ 2418/** C->S: detach a place from application */
2411#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_DETACH 852 2419#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_DETACH 853
2412 2420
2413/** S->C: notify about an existing ego */ 2421/** S->C: notify about an existing ego */
2414#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_EGO 853 2422#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_EGO 854
2415 2423
2416/** S->C: end of ego list */ 2424/** S->C: end of ego list */
2417#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_EGO_END 854 2425#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_EGO_END 855
2418 2426
2419/** S->C: notify about an existing place */ 2427/** S->C: notify about an existing place */
2420#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_PLACE 855 2428#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_PLACE 856
2421 2429
2422/** S->C: end of place list */ 2430/** S->C: end of place list */
2423#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_PLACE_END 856 2431#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_PLACE_END 857
2424 2432
2425/** C->S: set message processing flags */ 2433/** C->S: set message processing flags */
2426#define GNUNET_MESSAGE_TYPE_SOCIAL_MSG_PROC_SET 860 2434#define GNUNET_MESSAGE_TYPE_SOCIAL_MSG_PROC_SET 858
2427 2435
2428/** C->S: clear message processing flags */ 2436/** C->S: clear message processing flags */
2429#define GNUNET_MESSAGE_TYPE_SOCIAL_MSG_PROC_CLEAR 861 2437#define GNUNET_MESSAGE_TYPE_SOCIAL_MSG_PROC_CLEAR 859
2430 2438
2431/******************************************************************************* 2439/*******************************************************************************
2432 * X-VINE DHT messages 2440 * X-VINE DHT messages
diff --git a/src/include/gnunet_rest_lib.h b/src/include/gnunet_rest_lib.h
index 5bf04636b..41b85401d 100644
--- a/src/include/gnunet_rest_lib.h
+++ b/src/include/gnunet_rest_lib.h
@@ -32,7 +32,7 @@
32#define GNUNET_REST_LIB_H 32#define GNUNET_REST_LIB_H
33 33
34#include "gnunet_util_lib.h" 34#include "gnunet_util_lib.h"
35#include "microhttpd.h" 35#include <microhttpd.h>
36 36
37#define GNUNET_REST_HANDLER_END {NULL, NULL, NULL} 37#define GNUNET_REST_HANDLER_END {NULL, NULL, NULL}
38 38
@@ -113,7 +113,7 @@ typedef void (*GNUNET_REST_ResultProcessor) (void *cls,
113 * 113 *
114 * @param url URL to check 114 * @param url URL to check
115 * @param namespace namespace to check against 115 * @param namespace namespace to check against
116 * @retun GNUNET_YES if namespace matches 116 * @return GNUNET_YES if namespace matches
117 */ 117 */
118int 118int
119GNUNET_REST_namespace_match (const char *url, const char *namespace); 119GNUNET_REST_namespace_match (const char *url, const char *namespace);
@@ -122,7 +122,7 @@ GNUNET_REST_namespace_match (const char *url, const char *namespace);
122 * Create REST MHD response 122 * Create REST MHD response
123 * 123 *
124 * @param data result 124 * @param data result
125 * @retun MHD response 125 * @return MHD response
126 */ 126 */
127 struct MHD_Response* 127 struct MHD_Response*
128GNUNET_REST_create_response (const char *data); 128GNUNET_REST_create_response (const char *data);
diff --git a/src/include/gnunet_rest_plugin.h b/src/include/gnunet_rest_plugin.h
index ecd5f66f1..424dbb1fc 100644
--- a/src/include/gnunet_rest_plugin.h
+++ b/src/include/gnunet_rest_plugin.h
@@ -57,7 +57,7 @@ struct GNUNET_REST_Plugin
57 57
58 /** 58 /**
59 * Plugin name. Used as the namespace for the API. 59 * Plugin name. Used as the namespace for the API.
60 * e.g. http://hostname:port/<name> 60 * e.g. http://hostname:port/name
61 */ 61 */
62 char *name; 62 char *name;
63 63
diff --git a/src/include/gnunet_scheduler_lib.h b/src/include/gnunet_scheduler_lib.h
index a855ab8ab..d2805a685 100644
--- a/src/include/gnunet_scheduler_lib.h
+++ b/src/include/gnunet_scheduler_lib.h
@@ -152,14 +152,14 @@ struct GNUNET_SCHEDULER_FdInfo
152 * NULL if this is about a file handle or if no network 152 * NULL if this is about a file handle or if no network
153 * handle was given to the scheduler originally. 153 * handle was given to the scheduler originally.
154 */ 154 */
155 struct GNUNET_NETWORK_Handle *fd; 155 const struct GNUNET_NETWORK_Handle *fd;
156 156
157 /** 157 /**
158 * GNUnet file handle the event is about, matches @a sock, 158 * GNUnet file handle the event is about, matches @a sock,
159 * NULL if this is about a network socket or if no network 159 * NULL if this is about a network socket or if no network
160 * handle was given to the scheduler originally. 160 * handle was given to the scheduler originally.
161 */ 161 */
162 struct GNUNET_DISK_FileHandle *fh; 162 const struct GNUNET_DISK_FileHandle *fh;
163 163
164 /** 164 /**
165 * Type of the event that was generated related to @e sock. 165 * Type of the event that was generated related to @e sock.
@@ -216,17 +216,18 @@ struct GNUNET_SCHEDULER_TaskContext
216 216
217/** 217/**
218 * Function used by event-loop implementations to signal the scheduler 218 * Function used by event-loop implementations to signal the scheduler
219 * that a particular @a task is ready due to an event of type @a et. 219 * that a particular @a task is ready due to an event specified in the
220 * et field of @a fdi.
220 * 221 *
221 * This function will then queue the task to notify the application 222 * This function will then queue the task to notify the application
222 * that the task is ready (with the respective priority). 223 * that the task is ready (with the respective priority).
223 * 224 *
224 * @param task the task that is ready 225 * @param task the task that is ready
225 * @param et information about why the task is ready 226 * @param fdi information about the related FD
226 */ 227 */
227void 228void
228GNUNET_SCHEDULER_task_ready (struct GNUNET_SCHEDULER_Task *task, 229GNUNET_SCHEDULER_task_ready (struct GNUNET_SCHEDULER_Task *task,
229 enum GNUNET_SCHEDULER_EventType et); 230 struct GNUNET_SCHEDULER_FdInfo *fdi);
230 231
231 232
232/** 233/**
@@ -241,15 +242,16 @@ struct GNUNET_SCHEDULER_Handle;
241 * there are tasks left to run just to give other tasks a chance as 242 * there are tasks left to run just to give other tasks a chance as
242 * well. If we return #GNUNET_YES, the driver should call this 243 * well. If we return #GNUNET_YES, the driver should call this
243 * function again as soon as possible, while if we return #GNUNET_NO 244 * function again as soon as possible, while if we return #GNUNET_NO
244 * it must block until the operating system has more work as the 245 * it must block until either the operating system has more work (the
245 * scheduler has no more work to do right now. 246 * scheduler has no more work to do right now) or the timeout set by
247 * the scheduler (using the set_wakeup callback) is reached.
246 * 248 *
247 * @param sh scheduler handle that was given to the `loop` 249 * @param sh scheduler handle that was given to the `loop`
248 * @return #GNUNET_OK if there are more tasks that are ready, 250 * @return #GNUNET_OK if there are more tasks that are ready,
249 * and thus we would like to run more (yield to avoid 251 * and thus we would like to run more (yield to avoid
250 * blocking other activities for too long) 252 * blocking other activities for too long)
251 * #GNUNET_NO if we are done running tasks (yield to block) 253 * #GNUNET_NO if we are done running tasks (yield to block)
252 * #GNUNET_SYSERR on error 254 * #GNUNET_SYSERR on error, e.g. no tasks were ready
253 */ 255 */
254int 256int
255GNUNET_SCHEDULER_run_from_driver (struct GNUNET_SCHEDULER_Handle *sh); 257GNUNET_SCHEDULER_run_from_driver (struct GNUNET_SCHEDULER_Handle *sh);
@@ -268,8 +270,11 @@ struct GNUNET_SCHEDULER_Driver
268 void *cls; 270 void *cls;
269 271
270 /** 272 /**
271 * Add a @a task to be run if the conditions given 273 * Add a @a task to be run if the conditions specified in the
272 * in @a fdi are satisfied. 274 * et field of the given @a fdi are satisfied. The et field will
275 * be cleared after this call and the driver is expected to set
276 * the type of the actual event before passing @a fdi to
277 * #GNUNET_SCHEDULER_task_ready.
273 * 278 *
274 * @param cls closure 279 * @param cls closure
275 * @param task task to add 280 * @param task task to add
@@ -280,21 +285,21 @@ struct GNUNET_SCHEDULER_Driver
280 int 285 int
281 (*add)(void *cls, 286 (*add)(void *cls,
282 struct GNUNET_SCHEDULER_Task *task, 287 struct GNUNET_SCHEDULER_Task *task,
283 struct GNUNET_SCHEDULER_FdInfo *fdi); 288 struct GNUNET_SCHEDULER_FdInfo *fdi);
284 289
285 /** 290 /**
286 * Delete a @a task from the set of tasks to be run. 291 * Delete a @a task from the set of tasks to be run. A task may
292 * comprise multiple FdInfo entries previously added with the add
293 * function. The driver is expected to delete them all.
287 * 294 *
288 * @param cls closure 295 * @param cls closure
289 * @param task task to delete 296 * @param task task to delete
290 * @param fdi conditions to watch for (must match @e add call)
291 * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure 297 * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure
292 * (i.e. @a task or @a fdi do not match prior @e add call) 298 * (i.e. @a task does not match prior @e add call)
293 */ 299 */
294 int 300 int
295 (*del)(void *cls, 301 (*del)(void *cls,
296 struct GNUNET_SCHEDULER_Task *task, 302 struct GNUNET_SCHEDULER_Task *task);
297 const struct GNUNET_SCHEDULER_FdInfo *fdi);
298 303
299 /** 304 /**
300 * Set time at which we definitively want to get a wakeup call. 305 * Set time at which we definitively want to get a wakeup call.
@@ -309,7 +314,10 @@ struct GNUNET_SCHEDULER_Driver
309 /** 314 /**
310 * Event loop's "main" function, to be called from 315 * Event loop's "main" function, to be called from
311 * #GNUNET_SCHEDULER_run_with_driver() to actually 316 * #GNUNET_SCHEDULER_run_with_driver() to actually
312 * launch the loop. 317 * launch the loop. The loop should run as long as
318 * tasks (added by the add callback) are available
319 * OR the wakeup time (added by the set_wakeup
320 * callback) is not FOREVER.
313 * 321 *
314 * @param cls closure 322 * @param cls closure
315 * @param sh scheduler handle to pass to 323 * @param sh scheduler handle to pass to
@@ -359,7 +367,7 @@ GNUNET_SCHEDULER_run_with_driver (const struct GNUNET_SCHEDULER_Driver *driver,
359 * 367 *
360 * @return NULL on error 368 * @return NULL on error
361 */ 369 */
362const struct GNUNET_SCHEDULER_Driver * 370struct GNUNET_SCHEDULER_Driver *
363GNUNET_SCHEDULER_driver_select (void); 371GNUNET_SCHEDULER_driver_select (void);
364 372
365 373
diff --git a/src/include/gnunet_service_lib.h b/src/include/gnunet_service_lib.h
index aacafe956..dda827c95 100644
--- a/src/include/gnunet_service_lib.h
+++ b/src/include/gnunet_service_lib.h
@@ -366,11 +366,16 @@ GNUNET_SERVICE_client_disable_continue_warning (struct GNUNET_SERVICE_Client *c)
366/** 366/**
367 * Ask the server to disconnect from the given client. This is the 367 * Ask the server to disconnect from the given client. This is the
368 * same as returning #GNUNET_SYSERR within the check procedure when 368 * same as returning #GNUNET_SYSERR within the check procedure when
369 * handling a message, wexcept that it allows dropping of a client even 369 * handling a message, except that it allows dropping of a client even
370 * when not handling a message from that client. The `disconnect_cb` 370 * when not handling a message from that client. The `disconnect_cb`
371 * will be called on @a c even if the application closes the connection 371 * will be called on @a c even if the application closes the connection
372 * using this function. 372 * using this function.
373 * 373 *
374 * This function should be called (outside of util's internal logic)
375 * if (and usually only if) the client has violated the
376 * protocol. Otherwise, we should leave it to the client to disconnect
377 * from the service.
378 *
374 * @param c client to disconnect now 379 * @param c client to disconnect now
375 */ 380 */
376void 381void
diff --git a/src/include/gnunet_set_service.h b/src/include/gnunet_set_service.h
index a2999aebc..0c14aa945 100644
--- a/src/include/gnunet_set_service.h
+++ b/src/include/gnunet_set_service.h
@@ -530,6 +530,7 @@ GNUNET_SET_iterate (struct GNUNET_SET_Handle *set,
530 GNUNET_SET_ElementIterator iter, 530 GNUNET_SET_ElementIterator iter,
531 void *iter_cls); 531 void *iter_cls);
532 532
533
533/** 534/**
534 * Stop iteration over all elements in the given set. Can only 535 * Stop iteration over all elements in the given set. Can only
535 * be called before the iteration has "naturally" completed its 536 * be called before the iteration has "naturally" completed its
@@ -540,6 +541,7 @@ GNUNET_SET_iterate (struct GNUNET_SET_Handle *set,
540void 541void
541GNUNET_SET_iterate_cancel (struct GNUNET_SET_Handle *set); 542GNUNET_SET_iterate_cancel (struct GNUNET_SET_Handle *set);
542 543
544
543/** 545/**
544 * Create a copy of an element. The copy 546 * Create a copy of an element. The copy
545 * must be GNUNET_free-d by the caller. 547 * must be GNUNET_free-d by the caller.
@@ -550,6 +552,7 @@ GNUNET_SET_iterate_cancel (struct GNUNET_SET_Handle *set);
550struct GNUNET_SET_Element * 552struct GNUNET_SET_Element *
551GNUNET_SET_element_dup (const struct GNUNET_SET_Element *element); 553GNUNET_SET_element_dup (const struct GNUNET_SET_Element *element);
552 554
555
553/** 556/**
554 * Hash a set element. 557 * Hash a set element.
555 * 558 *