diff options
Diffstat (limited to 'src/util/network.c')
-rw-r--r-- | src/util/network.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/util/network.c b/src/util/network.c index e112d9093..4ac46fa0b 100644 --- a/src/util/network.c +++ b/src/util/network.c | |||
@@ -169,7 +169,7 @@ GNUNET_NETWORK_socket_close (struct GNUNET_NETWORK_Handle *desc) | |||
169 | * Connect a socket | 169 | * Connect a socket |
170 | * @param desc socket | 170 | * @param desc socket |
171 | * @param address peer address | 171 | * @param address peer address |
172 | * @param length of address | 172 | * @param address_len length of address |
173 | * @return GNUNET_OK on success, GNUNET_SYSERR otherwise | 173 | * @return GNUNET_OK on success, GNUNET_SYSERR otherwise |
174 | */ | 174 | */ |
175 | int | 175 | int |
@@ -406,6 +406,7 @@ GNUNET_NETWORK_socket_set_inheritable (const struct GNUNET_NETWORK_Handle | |||
406 | #endif | 406 | #endif |
407 | } | 407 | } |
408 | 408 | ||
409 | |||
409 | /** | 410 | /** |
410 | * Reset FD set | 411 | * Reset FD set |
411 | * @param fds fd set | 412 | * @param fds fd set |
@@ -422,6 +423,7 @@ GNUNET_NETWORK_fdset_zero (struct GNUNET_NETWORK_FDSet *fds) | |||
422 | #endif | 423 | #endif |
423 | } | 424 | } |
424 | 425 | ||
426 | |||
425 | /** | 427 | /** |
426 | * Add a socket to the FD set | 428 | * Add a socket to the FD set |
427 | * @param fds fd set | 429 | * @param fds fd set |
@@ -437,10 +439,12 @@ GNUNET_NETWORK_fdset_set (struct GNUNET_NETWORK_FDSet *fds, | |||
437 | fds->nsds = desc->fd + 1; | 439 | fds->nsds = desc->fd + 1; |
438 | } | 440 | } |
439 | 441 | ||
442 | |||
440 | /** | 443 | /** |
441 | * Check whether a socket is part of the fd set | 444 | * Check whether a socket is part of the fd set |
442 | * @param fds fd set | 445 | * @param fds fd set |
443 | * @param desc socket | 446 | * @param desc socket |
447 | * @return 0 if the FD is not set | ||
444 | */ | 448 | */ |
445 | int | 449 | int |
446 | GNUNET_NETWORK_fdset_isset (const struct GNUNET_NETWORK_FDSet *fds, | 450 | GNUNET_NETWORK_fdset_isset (const struct GNUNET_NETWORK_FDSet *fds, |
@@ -449,6 +453,7 @@ GNUNET_NETWORK_fdset_isset (const struct GNUNET_NETWORK_FDSet *fds, | |||
449 | return FD_ISSET (desc->fd, &fds->sds); | 453 | return FD_ISSET (desc->fd, &fds->sds); |
450 | } | 454 | } |
451 | 455 | ||
456 | |||
452 | /** | 457 | /** |
453 | * Add one fd set to another | 458 | * Add one fd set to another |
454 | * @param dst the fd set to add to | 459 | * @param dst the fd set to add to |
@@ -469,6 +474,7 @@ GNUNET_NETWORK_fdset_add (struct GNUNET_NETWORK_FDSet *dst, | |||
469 | } | 474 | } |
470 | } | 475 | } |
471 | 476 | ||
477 | |||
472 | /** | 478 | /** |
473 | * Copy one fd set to another | 479 | * Copy one fd set to another |
474 | * @param to destination | 480 | * @param to destination |
@@ -494,11 +500,12 @@ GNUNET_NETWORK_fdset_copy (struct GNUNET_NETWORK_FDSet *to, | |||
494 | #endif | 500 | #endif |
495 | } | 501 | } |
496 | 502 | ||
503 | |||
497 | /** | 504 | /** |
498 | * Copy a native fd set | 505 | * Copy a native fd set |
499 | * @param to destination | 506 | * @param to destination |
500 | * @param from native source set | 507 | * @param from native source set |
501 | * @param the biggest socket number in from + 1 | 508 | * @param nfds the biggest socket number in from + 1 |
502 | */ | 509 | */ |
503 | void | 510 | void |
504 | GNUNET_NETWORK_fdset_copy_native (struct GNUNET_NETWORK_FDSet *to, | 511 | GNUNET_NETWORK_fdset_copy_native (struct GNUNET_NETWORK_FDSet *to, |
@@ -508,6 +515,7 @@ GNUNET_NETWORK_fdset_copy_native (struct GNUNET_NETWORK_FDSet *to, | |||
508 | to->nsds = nfds; | 515 | to->nsds = nfds; |
509 | } | 516 | } |
510 | 517 | ||
518 | |||
511 | /** | 519 | /** |
512 | * Add a file handle to the fd set | 520 | * Add a file handle to the fd set |
513 | * @param fds fd set | 521 | * @param fds fd set |
@@ -591,6 +599,7 @@ GNUNET_NETWORK_fdset_create () | |||
591 | return fds; | 599 | return fds; |
592 | } | 600 | } |
593 | 601 | ||
602 | |||
594 | /** | 603 | /** |
595 | * Releases the associated memory of an fd set | 604 | * Releases the associated memory of an fd set |
596 | * @param fds fd set | 605 | * @param fds fd set |
@@ -604,6 +613,7 @@ GNUNET_NETWORK_fdset_destroy (struct GNUNET_NETWORK_FDSet *fds) | |||
604 | GNUNET_free (fds); | 613 | GNUNET_free (fds); |
605 | } | 614 | } |
606 | 615 | ||
616 | |||
607 | /** | 617 | /** |
608 | * Check if sockets meet certain conditions | 618 | * Check if sockets meet certain conditions |
609 | * @param rfds set of sockets to be checked for readability | 619 | * @param rfds set of sockets to be checked for readability |
@@ -821,4 +831,5 @@ GNUNET_NETWORK_socket_select (struct GNUNET_NETWORK_FDSet *rfds, | |||
821 | #endif | 831 | #endif |
822 | } | 832 | } |
823 | 833 | ||
834 | |||
824 | /* end of network.c */ | 835 | /* end of network.c */ |