diff options
Diffstat (limited to 'src/include/gnunet_network_lib.h')
-rw-r--r-- | src/include/gnunet_network_lib.h | 178 |
1 files changed, 90 insertions, 88 deletions
diff --git a/src/include/gnunet_network_lib.h b/src/include/gnunet_network_lib.h index bdf568385..15d4a8ada 100644 --- a/src/include/gnunet_network_lib.h +++ b/src/include/gnunet_network_lib.h | |||
@@ -49,7 +49,8 @@ struct GNUNET_NETWORK_Handle; | |||
49 | /** | 49 | /** |
50 | * @brief collection of IO descriptors | 50 | * @brief collection of IO descriptors |
51 | */ | 51 | */ |
52 | struct GNUNET_NETWORK_FDSet { | 52 | struct GNUNET_NETWORK_FDSet |
53 | { | ||
53 | /** | 54 | /** |
54 | * Maximum number of any socket descriptor in the set (plus one) | 55 | * Maximum number of any socket descriptor in the set (plus one) |
55 | */ | 56 | */ |
@@ -72,7 +73,7 @@ struct GNUNET_NETWORK_FDSet { | |||
72 | * @return #GNUNET_OK if the PF is supported | 73 | * @return #GNUNET_OK if the PF is supported |
73 | */ | 74 | */ |
74 | int | 75 | int |
75 | GNUNET_NETWORK_test_pf(int pf); | 76 | GNUNET_NETWORK_test_pf (int pf); |
76 | 77 | ||
77 | 78 | ||
78 | /** | 79 | /** |
@@ -85,7 +86,7 @@ GNUNET_NETWORK_test_pf(int pf); | |||
85 | * @return shortened unixpath, NULL on error | 86 | * @return shortened unixpath, NULL on error |
86 | */ | 87 | */ |
87 | char * | 88 | char * |
88 | GNUNET_NETWORK_shorten_unixpath(char *unixpath); | 89 | GNUNET_NETWORK_shorten_unixpath (char *unixpath); |
89 | 90 | ||
90 | 91 | ||
91 | /** | 92 | /** |
@@ -98,7 +99,7 @@ GNUNET_NETWORK_shorten_unixpath(char *unixpath); | |||
98 | * @param un unix domain socket address to check | 99 | * @param un unix domain socket address to check |
99 | */ | 100 | */ |
100 | void | 101 | void |
101 | GNUNET_NETWORK_unix_precheck(const struct sockaddr_un *un); | 102 | GNUNET_NETWORK_unix_precheck (const struct sockaddr_un *un); |
102 | 103 | ||
103 | 104 | ||
104 | /** | 105 | /** |
@@ -112,9 +113,9 @@ GNUNET_NETWORK_unix_precheck(const struct sockaddr_un *un); | |||
112 | * @return client socket | 113 | * @return client socket |
113 | */ | 114 | */ |
114 | struct GNUNET_NETWORK_Handle * | 115 | struct GNUNET_NETWORK_Handle * |
115 | GNUNET_NETWORK_socket_accept(const struct GNUNET_NETWORK_Handle *desc, | 116 | GNUNET_NETWORK_socket_accept (const struct GNUNET_NETWORK_Handle *desc, |
116 | struct sockaddr *address, | 117 | struct sockaddr *address, |
117 | socklen_t *address_len); | 118 | socklen_t *address_len); |
118 | 119 | ||
119 | 120 | ||
120 | /** | 121 | /** |
@@ -124,7 +125,7 @@ GNUNET_NETWORK_socket_accept(const struct GNUNET_NETWORK_Handle *desc, | |||
124 | * @return NULL on error (including not supported on target platform) | 125 | * @return NULL on error (including not supported on target platform) |
125 | */ | 126 | */ |
126 | struct GNUNET_NETWORK_Handle * | 127 | struct GNUNET_NETWORK_Handle * |
127 | GNUNET_NETWORK_socket_box_native(SOCKTYPE fd); | 128 | GNUNET_NETWORK_socket_box_native (SOCKTYPE fd); |
128 | 129 | ||
129 | 130 | ||
130 | /** | 131 | /** |
@@ -135,8 +136,8 @@ GNUNET_NETWORK_socket_box_native(SOCKTYPE fd); | |||
135 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error | 136 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error |
136 | */ | 137 | */ |
137 | int | 138 | int |
138 | GNUNET_NETWORK_socket_set_blocking(struct GNUNET_NETWORK_Handle *fd, | 139 | GNUNET_NETWORK_socket_set_blocking (struct GNUNET_NETWORK_Handle *fd, |
139 | int doBlock); | 140 | int doBlock); |
140 | 141 | ||
141 | 142 | ||
142 | /** | 143 | /** |
@@ -148,9 +149,9 @@ GNUNET_NETWORK_socket_set_blocking(struct GNUNET_NETWORK_Handle *fd, | |||
148 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise | 149 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise |
149 | */ | 150 | */ |
150 | int | 151 | int |
151 | GNUNET_NETWORK_socket_bind(struct GNUNET_NETWORK_Handle *desc, | 152 | GNUNET_NETWORK_socket_bind (struct GNUNET_NETWORK_Handle *desc, |
152 | const struct sockaddr *address, | 153 | const struct sockaddr *address, |
153 | socklen_t address_len); | 154 | socklen_t address_len); |
154 | 155 | ||
155 | /** | 156 | /** |
156 | * Close a socket. | 157 | * Close a socket. |
@@ -159,7 +160,7 @@ GNUNET_NETWORK_socket_bind(struct GNUNET_NETWORK_Handle *desc, | |||
159 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise | 160 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise |
160 | */ | 161 | */ |
161 | int | 162 | int |
162 | GNUNET_NETWORK_socket_close(struct GNUNET_NETWORK_Handle *desc); | 163 | GNUNET_NETWORK_socket_close (struct GNUNET_NETWORK_Handle *desc); |
163 | 164 | ||
164 | 165 | ||
165 | /** | 166 | /** |
@@ -168,7 +169,7 @@ GNUNET_NETWORK_socket_close(struct GNUNET_NETWORK_Handle *desc); | |||
168 | * @param desc socket | 169 | * @param desc socket |
169 | */ | 170 | */ |
170 | void | 171 | void |
171 | GNUNET_NETWORK_socket_free_memory_only_(struct GNUNET_NETWORK_Handle *desc); | 172 | GNUNET_NETWORK_socket_free_memory_only_ (struct GNUNET_NETWORK_Handle *desc); |
172 | 173 | ||
173 | 174 | ||
174 | /** | 175 | /** |
@@ -180,9 +181,9 @@ GNUNET_NETWORK_socket_free_memory_only_(struct GNUNET_NETWORK_Handle *desc); | |||
180 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise | 181 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise |
181 | */ | 182 | */ |
182 | int | 183 | int |
183 | GNUNET_NETWORK_socket_connect(const struct GNUNET_NETWORK_Handle *desc, | 184 | GNUNET_NETWORK_socket_connect (const struct GNUNET_NETWORK_Handle *desc, |
184 | const struct sockaddr *address, | 185 | const struct sockaddr *address, |
185 | socklen_t address_len); | 186 | socklen_t address_len); |
186 | 187 | ||
187 | 188 | ||
188 | /** | 189 | /** |
@@ -196,11 +197,11 @@ GNUNET_NETWORK_socket_connect(const struct GNUNET_NETWORK_Handle *desc, | |||
196 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise | 197 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise |
197 | */ | 198 | */ |
198 | int | 199 | int |
199 | GNUNET_NETWORK_socket_getsockopt(const struct GNUNET_NETWORK_Handle *desc, | 200 | GNUNET_NETWORK_socket_getsockopt (const struct GNUNET_NETWORK_Handle *desc, |
200 | int level, | 201 | int level, |
201 | int optname, | 202 | int optname, |
202 | void *optval, | 203 | void *optval, |
203 | socklen_t *optlen); | 204 | socklen_t *optlen); |
204 | 205 | ||
205 | 206 | ||
206 | /** | 207 | /** |
@@ -211,8 +212,8 @@ GNUNET_NETWORK_socket_getsockopt(const struct GNUNET_NETWORK_Handle *desc, | |||
211 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise | 212 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise |
212 | */ | 213 | */ |
213 | int | 214 | int |
214 | GNUNET_NETWORK_socket_listen(const struct GNUNET_NETWORK_Handle *desc, | 215 | GNUNET_NETWORK_socket_listen (const struct GNUNET_NETWORK_Handle *desc, |
215 | int backlog); | 216 | int backlog); |
216 | 217 | ||
217 | 218 | ||
218 | /** | 219 | /** |
@@ -222,7 +223,8 @@ GNUNET_NETWORK_socket_listen(const struct GNUNET_NETWORK_Handle *desc, | |||
222 | * @returns #GNUNET_SYSERR if no data is available, or on error! | 223 | * @returns #GNUNET_SYSERR if no data is available, or on error! |
223 | */ | 224 | */ |
224 | ssize_t | 225 | ssize_t |
225 | GNUNET_NETWORK_socket_recvfrom_amount(const struct GNUNET_NETWORK_Handle *desc); | 226 | GNUNET_NETWORK_socket_recvfrom_amount (const struct |
227 | GNUNET_NETWORK_Handle *desc); | ||
226 | 228 | ||
227 | 229 | ||
228 | /** | 230 | /** |
@@ -236,11 +238,11 @@ GNUNET_NETWORK_socket_recvfrom_amount(const struct GNUNET_NETWORK_Handle *desc); | |||
236 | * @param addrlen length of the addr | 238 | * @param addrlen length of the addr |
237 | */ | 239 | */ |
238 | ssize_t | 240 | ssize_t |
239 | GNUNET_NETWORK_socket_recvfrom(const struct GNUNET_NETWORK_Handle *desc, | 241 | GNUNET_NETWORK_socket_recvfrom (const struct GNUNET_NETWORK_Handle *desc, |
240 | void *buffer, | 242 | void *buffer, |
241 | size_t length, | 243 | size_t length, |
242 | struct sockaddr *src_addr, | 244 | struct sockaddr *src_addr, |
243 | socklen_t *addrlen); | 245 | socklen_t *addrlen); |
244 | 246 | ||
245 | 247 | ||
246 | /** | 248 | /** |
@@ -252,9 +254,9 @@ GNUNET_NETWORK_socket_recvfrom(const struct GNUNET_NETWORK_Handle *desc, | |||
252 | * @return number of bytes read | 254 | * @return number of bytes read |
253 | */ | 255 | */ |
254 | ssize_t | 256 | ssize_t |
255 | GNUNET_NETWORK_socket_recv(const struct GNUNET_NETWORK_Handle *desc, | 257 | GNUNET_NETWORK_socket_recv (const struct GNUNET_NETWORK_Handle *desc, |
256 | void *buffer, | 258 | void *buffer, |
257 | size_t length); | 259 | size_t length); |
258 | 260 | ||
259 | 261 | ||
260 | /** | 262 | /** |
@@ -267,10 +269,10 @@ GNUNET_NETWORK_socket_recv(const struct GNUNET_NETWORK_Handle *desc, | |||
267 | * @return number of selected sockets, #GNUNET_SYSERR on error | 269 | * @return number of selected sockets, #GNUNET_SYSERR on error |
268 | */ | 270 | */ |
269 | int | 271 | int |
270 | GNUNET_NETWORK_socket_select(struct GNUNET_NETWORK_FDSet *rfds, | 272 | GNUNET_NETWORK_socket_select (struct GNUNET_NETWORK_FDSet *rfds, |
271 | struct GNUNET_NETWORK_FDSet *wfds, | 273 | struct GNUNET_NETWORK_FDSet *wfds, |
272 | struct GNUNET_NETWORK_FDSet *efds, | 274 | struct GNUNET_NETWORK_FDSet *efds, |
273 | struct GNUNET_TIME_Relative timeout); | 275 | struct GNUNET_TIME_Relative timeout); |
274 | 276 | ||
275 | 277 | ||
276 | /** | 278 | /** |
@@ -282,9 +284,9 @@ GNUNET_NETWORK_socket_select(struct GNUNET_NETWORK_FDSet *rfds, | |||
282 | * @return number of bytes sent, #GNUNET_SYSERR on error | 284 | * @return number of bytes sent, #GNUNET_SYSERR on error |
283 | */ | 285 | */ |
284 | ssize_t | 286 | ssize_t |
285 | GNUNET_NETWORK_socket_send(const struct GNUNET_NETWORK_Handle *desc, | 287 | GNUNET_NETWORK_socket_send (const struct GNUNET_NETWORK_Handle *desc, |
286 | const void *buffer, | 288 | const void *buffer, |
287 | size_t length); | 289 | size_t length); |
288 | 290 | ||
289 | 291 | ||
290 | /** | 292 | /** |
@@ -299,11 +301,11 @@ GNUNET_NETWORK_socket_send(const struct GNUNET_NETWORK_Handle *desc, | |||
299 | * @return number of bytes sent, #GNUNET_SYSERR on error | 301 | * @return number of bytes sent, #GNUNET_SYSERR on error |
300 | */ | 302 | */ |
301 | ssize_t | 303 | ssize_t |
302 | GNUNET_NETWORK_socket_sendto(const struct GNUNET_NETWORK_Handle *desc, | 304 | GNUNET_NETWORK_socket_sendto (const struct GNUNET_NETWORK_Handle *desc, |
303 | const void *message, | 305 | const void *message, |
304 | size_t length, | 306 | size_t length, |
305 | const struct sockaddr *dest_addr, | 307 | const struct sockaddr *dest_addr, |
306 | socklen_t dest_len); | 308 | socklen_t dest_len); |
307 | 309 | ||
308 | 310 | ||
309 | /** | 311 | /** |
@@ -317,11 +319,11 @@ GNUNET_NETWORK_socket_sendto(const struct GNUNET_NETWORK_Handle *desc, | |||
317 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise | 319 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise |
318 | */ | 320 | */ |
319 | int | 321 | int |
320 | GNUNET_NETWORK_socket_setsockopt(struct GNUNET_NETWORK_Handle *fd, | 322 | GNUNET_NETWORK_socket_setsockopt (struct GNUNET_NETWORK_Handle *fd, |
321 | int level, | 323 | int level, |
322 | int option_name, | 324 | int option_name, |
323 | const void *option_value, | 325 | const void *option_value, |
324 | socklen_t option_len); | 326 | socklen_t option_len); |
325 | 327 | ||
326 | 328 | ||
327 | /** | 329 | /** |
@@ -332,8 +334,8 @@ GNUNET_NETWORK_socket_setsockopt(struct GNUNET_NETWORK_Handle *fd, | |||
332 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise | 334 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise |
333 | */ | 335 | */ |
334 | int | 336 | int |
335 | GNUNET_NETWORK_socket_shutdown(struct GNUNET_NETWORK_Handle *desc, | 337 | GNUNET_NETWORK_socket_shutdown (struct GNUNET_NETWORK_Handle *desc, |
336 | int how); | 338 | int how); |
337 | 339 | ||
338 | 340 | ||
339 | /** | 341 | /** |
@@ -346,7 +348,7 @@ GNUNET_NETWORK_socket_shutdown(struct GNUNET_NETWORK_Handle *desc, | |||
346 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise | 348 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise |
347 | */ | 349 | */ |
348 | int | 350 | int |
349 | GNUNET_NETWORK_socket_disable_corking(struct GNUNET_NETWORK_Handle *desc); | 351 | GNUNET_NETWORK_socket_disable_corking (struct GNUNET_NETWORK_Handle *desc); |
350 | 352 | ||
351 | 353 | ||
352 | /** | 354 | /** |
@@ -360,9 +362,9 @@ GNUNET_NETWORK_socket_disable_corking(struct GNUNET_NETWORK_Handle *desc); | |||
360 | * @return new socket, NULL on error | 362 | * @return new socket, NULL on error |
361 | */ | 363 | */ |
362 | struct GNUNET_NETWORK_Handle * | 364 | struct GNUNET_NETWORK_Handle * |
363 | GNUNET_NETWORK_socket_create(int domain, | 365 | GNUNET_NETWORK_socket_create (int domain, |
364 | int type, | 366 | int type, |
365 | int protocol); | 367 | int protocol); |
366 | 368 | ||
367 | 369 | ||
368 | /** | 370 | /** |
@@ -371,7 +373,7 @@ GNUNET_NETWORK_socket_create(int domain, | |||
371 | * @param fds fd set to clear | 373 | * @param fds fd set to clear |
372 | */ | 374 | */ |
373 | void | 375 | void |
374 | GNUNET_NETWORK_fdset_zero(struct GNUNET_NETWORK_FDSet *fds); | 376 | GNUNET_NETWORK_fdset_zero (struct GNUNET_NETWORK_FDSet *fds); |
375 | 377 | ||
376 | 378 | ||
377 | /** | 379 | /** |
@@ -381,8 +383,8 @@ GNUNET_NETWORK_fdset_zero(struct GNUNET_NETWORK_FDSet *fds); | |||
381 | * @param desc socket to add | 383 | * @param desc socket to add |
382 | */ | 384 | */ |
383 | void | 385 | void |
384 | GNUNET_NETWORK_fdset_set(struct GNUNET_NETWORK_FDSet *fds, | 386 | GNUNET_NETWORK_fdset_set (struct GNUNET_NETWORK_FDSet *fds, |
385 | const struct GNUNET_NETWORK_Handle *desc); | 387 | const struct GNUNET_NETWORK_Handle *desc); |
386 | 388 | ||
387 | 389 | ||
388 | /** | 390 | /** |
@@ -393,8 +395,8 @@ GNUNET_NETWORK_fdset_set(struct GNUNET_NETWORK_FDSet *fds, | |||
393 | * @return #GNUNET_YES if the socket is in the set | 395 | * @return #GNUNET_YES if the socket is in the set |
394 | */ | 396 | */ |
395 | int | 397 | int |
396 | GNUNET_NETWORK_fdset_isset(const struct GNUNET_NETWORK_FDSet *fds, | 398 | GNUNET_NETWORK_fdset_isset (const struct GNUNET_NETWORK_FDSet *fds, |
397 | const struct GNUNET_NETWORK_Handle *desc); | 399 | const struct GNUNET_NETWORK_Handle *desc); |
398 | 400 | ||
399 | 401 | ||
400 | /** | 402 | /** |
@@ -404,8 +406,8 @@ GNUNET_NETWORK_fdset_isset(const struct GNUNET_NETWORK_FDSet *fds, | |||
404 | * @param src the fd set to add from | 406 | * @param src the fd set to add from |
405 | */ | 407 | */ |
406 | void | 408 | void |
407 | GNUNET_NETWORK_fdset_add(struct GNUNET_NETWORK_FDSet *dst, | 409 | GNUNET_NETWORK_fdset_add (struct GNUNET_NETWORK_FDSet *dst, |
408 | const struct GNUNET_NETWORK_FDSet *src); | 410 | const struct GNUNET_NETWORK_FDSet *src); |
409 | 411 | ||
410 | 412 | ||
411 | /** | 413 | /** |
@@ -415,8 +417,8 @@ GNUNET_NETWORK_fdset_add(struct GNUNET_NETWORK_FDSet *dst, | |||
415 | * @param from source | 417 | * @param from source |
416 | */ | 418 | */ |
417 | void | 419 | void |
418 | GNUNET_NETWORK_fdset_copy(struct GNUNET_NETWORK_FDSet *to, | 420 | GNUNET_NETWORK_fdset_copy (struct GNUNET_NETWORK_FDSet *to, |
419 | const struct GNUNET_NETWORK_FDSet *from); | 421 | const struct GNUNET_NETWORK_FDSet *from); |
420 | 422 | ||
421 | 423 | ||
422 | /** | 424 | /** |
@@ -426,7 +428,7 @@ GNUNET_NETWORK_fdset_copy(struct GNUNET_NETWORK_FDSet *to, | |||
426 | * @return POSIX file descriptor | 428 | * @return POSIX file descriptor |
427 | */ | 429 | */ |
428 | int | 430 | int |
429 | GNUNET_NETWORK_get_fd(const struct GNUNET_NETWORK_Handle *desc); | 431 | GNUNET_NETWORK_get_fd (const struct GNUNET_NETWORK_Handle *desc); |
430 | 432 | ||
431 | 433 | ||
432 | /** | 434 | /** |
@@ -436,7 +438,7 @@ GNUNET_NETWORK_get_fd(const struct GNUNET_NETWORK_Handle *desc); | |||
436 | * @return POSIX file descriptor | 438 | * @return POSIX file descriptor |
437 | */ | 439 | */ |
438 | struct sockaddr* | 440 | struct sockaddr* |
439 | GNUNET_NETWORK_get_addr(const struct GNUNET_NETWORK_Handle *desc); | 441 | GNUNET_NETWORK_get_addr (const struct GNUNET_NETWORK_Handle *desc); |
440 | 442 | ||
441 | 443 | ||
442 | /** | 444 | /** |
@@ -446,7 +448,7 @@ GNUNET_NETWORK_get_addr(const struct GNUNET_NETWORK_Handle *desc); | |||
446 | * @return socklen_t for sockaddr | 448 | * @return socklen_t for sockaddr |
447 | */ | 449 | */ |
448 | socklen_t | 450 | socklen_t |
449 | GNUNET_NETWORK_get_addrlen(const struct GNUNET_NETWORK_Handle *desc); | 451 | GNUNET_NETWORK_get_addrlen (const struct GNUNET_NETWORK_Handle *desc); |
450 | 452 | ||
451 | 453 | ||
452 | /** | 454 | /** |
@@ -457,9 +459,9 @@ GNUNET_NETWORK_get_addrlen(const struct GNUNET_NETWORK_Handle *desc); | |||
457 | * @param nfds the biggest socket number in from + 1 | 459 | * @param nfds the biggest socket number in from + 1 |
458 | */ | 460 | */ |
459 | void | 461 | void |
460 | GNUNET_NETWORK_fdset_copy_native(struct GNUNET_NETWORK_FDSet *to, | 462 | GNUNET_NETWORK_fdset_copy_native (struct GNUNET_NETWORK_FDSet *to, |
461 | const fd_set *from, | 463 | const fd_set *from, |
462 | int nfds); | 464 | int nfds); |
463 | 465 | ||
464 | 466 | ||
465 | /** | 467 | /** |
@@ -469,8 +471,8 @@ GNUNET_NETWORK_fdset_copy_native(struct GNUNET_NETWORK_FDSet *to, | |||
469 | * @param nfd native FD to set | 471 | * @param nfd native FD to set |
470 | */ | 472 | */ |
471 | void | 473 | void |
472 | GNUNET_NETWORK_fdset_set_native(struct GNUNET_NETWORK_FDSet *to, | 474 | GNUNET_NETWORK_fdset_set_native (struct GNUNET_NETWORK_FDSet *to, |
473 | int nfd); | 475 | int nfd); |
474 | 476 | ||
475 | 477 | ||
476 | /** | 478 | /** |
@@ -481,8 +483,8 @@ GNUNET_NETWORK_fdset_set_native(struct GNUNET_NETWORK_FDSet *to, | |||
481 | * @return #GNUNET_YES if to contains nfd | 483 | * @return #GNUNET_YES if to contains nfd |
482 | */ | 484 | */ |
483 | int | 485 | int |
484 | GNUNET_NETWORK_fdset_test_native(const struct GNUNET_NETWORK_FDSet *to, | 486 | GNUNET_NETWORK_fdset_test_native (const struct GNUNET_NETWORK_FDSet *to, |
485 | int nfd); | 487 | int nfd); |
486 | 488 | ||
487 | 489 | ||
488 | /** | 490 | /** |
@@ -492,8 +494,8 @@ GNUNET_NETWORK_fdset_test_native(const struct GNUNET_NETWORK_FDSet *to, | |||
492 | * @param h the file handle to add | 494 | * @param h the file handle to add |
493 | */ | 495 | */ |
494 | void | 496 | void |
495 | GNUNET_NETWORK_fdset_handle_set(struct GNUNET_NETWORK_FDSet *fds, | 497 | GNUNET_NETWORK_fdset_handle_set (struct GNUNET_NETWORK_FDSet *fds, |
496 | const struct GNUNET_DISK_FileHandle *h); | 498 | const struct GNUNET_DISK_FileHandle *h); |
497 | 499 | ||
498 | 500 | ||
499 | /** | 501 | /** |
@@ -504,8 +506,8 @@ GNUNET_NETWORK_fdset_handle_set(struct GNUNET_NETWORK_FDSet *fds, | |||
504 | * @param h the file handle to add | 506 | * @param h the file handle to add |
505 | */ | 507 | */ |
506 | void | 508 | void |
507 | GNUNET_NETWORK_fdset_handle_set_first(struct GNUNET_NETWORK_FDSet *fds, | 509 | GNUNET_NETWORK_fdset_handle_set_first (struct GNUNET_NETWORK_FDSet *fds, |
508 | const struct GNUNET_DISK_FileHandle *h); | 510 | const struct GNUNET_DISK_FileHandle *h); |
509 | 511 | ||
510 | 512 | ||
511 | /** | 513 | /** |
@@ -516,8 +518,8 @@ GNUNET_NETWORK_fdset_handle_set_first(struct GNUNET_NETWORK_FDSet *fds, | |||
516 | * @return #GNUNET_YES if the file handle is part of the set | 518 | * @return #GNUNET_YES if the file handle is part of the set |
517 | */ | 519 | */ |
518 | int | 520 | int |
519 | GNUNET_NETWORK_fdset_handle_isset(const struct GNUNET_NETWORK_FDSet *fds, | 521 | GNUNET_NETWORK_fdset_handle_isset (const struct GNUNET_NETWORK_FDSet *fds, |
520 | const struct GNUNET_DISK_FileHandle *h); | 522 | const struct GNUNET_DISK_FileHandle *h); |
521 | 523 | ||
522 | 524 | ||
523 | /** | 525 | /** |
@@ -528,8 +530,8 @@ GNUNET_NETWORK_fdset_handle_isset(const struct GNUNET_NETWORK_FDSet *fds, | |||
528 | * @return #GNUNET_YES if they do overlap, #GNUNET_NO otherwise | 530 | * @return #GNUNET_YES if they do overlap, #GNUNET_NO otherwise |
529 | */ | 531 | */ |
530 | int | 532 | int |
531 | GNUNET_NETWORK_fdset_overlap(const struct GNUNET_NETWORK_FDSet *fds1, | 533 | GNUNET_NETWORK_fdset_overlap (const struct GNUNET_NETWORK_FDSet *fds1, |
532 | const struct GNUNET_NETWORK_FDSet *fds2); | 534 | const struct GNUNET_NETWORK_FDSet *fds2); |
533 | 535 | ||
534 | 536 | ||
535 | /** | 537 | /** |
@@ -538,7 +540,7 @@ GNUNET_NETWORK_fdset_overlap(const struct GNUNET_NETWORK_FDSet *fds1, | |||
538 | * @return a new fd set | 540 | * @return a new fd set |
539 | */ | 541 | */ |
540 | struct GNUNET_NETWORK_FDSet * | 542 | struct GNUNET_NETWORK_FDSet * |
541 | GNUNET_NETWORK_fdset_create(void); | 543 | GNUNET_NETWORK_fdset_create (void); |
542 | 544 | ||
543 | 545 | ||
544 | /** | 546 | /** |
@@ -547,7 +549,7 @@ GNUNET_NETWORK_fdset_create(void); | |||
547 | * @param fds fd set | 549 | * @param fds fd set |
548 | */ | 550 | */ |
549 | void | 551 | void |
550 | GNUNET_NETWORK_fdset_destroy(struct GNUNET_NETWORK_FDSet *fds); | 552 | GNUNET_NETWORK_fdset_destroy (struct GNUNET_NETWORK_FDSet *fds); |
551 | 553 | ||
552 | 554 | ||
553 | /** | 555 | /** |
@@ -558,8 +560,8 @@ GNUNET_NETWORK_fdset_destroy(struct GNUNET_NETWORK_FDSet *fds); | |||
558 | * @return #GNUNET_OK if the port is available, #GNUNET_NO if not | 560 | * @return #GNUNET_OK if the port is available, #GNUNET_NO if not |
559 | */ | 561 | */ |
560 | int | 562 | int |
561 | GNUNET_NETWORK_test_port_free(int ipproto, | 563 | GNUNET_NETWORK_test_port_free (int ipproto, |
562 | uint16_t port); | 564 | uint16_t port); |
563 | 565 | ||
564 | 566 | ||
565 | #if 0 /* keep Emacsens' auto-indent happy */ | 567 | #if 0 /* keep Emacsens' auto-indent happy */ |