Changeset b10460a in mainline for uspace/lib/nettl/src/portrng.c


Ignore:
Timestamp:
2015-08-07T21:39:00Z (9 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b688fd8
Parents:
6accc5cf
Message:

Add missing docblocks in network code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/nettl/src/portrng.c

    r6accc5cf rb10460a  
    4646#include <io/log.h>
    4747
     48/** Create port range.
     49 *
     50 * @param rpr Place to store pointer to new port range
     51 * @return EOK on success, ENOMEM if out of memory
     52 */
    4853int portrng_create(portrng_t **rpr)
    4954{
     
    6267}
    6368
     69/** Destroy port range.
     70 *
     71 * @param pr Port range
     72 */
    6473void portrng_destroy(portrng_t *pr)
    6574{
     
    6978}
    7079
     80/** Allocate port number from port range.
     81 *
     82 * @param pr    Port range
     83 * @param pnum  Port number to allocate specific port, or zero to allocate
     84 *              any valid port from range
     85 * @param arg   User argument to set for port
     86 * @param flags Flags, @c pf_allow_system to allow ports from system range
     87 *              to be specified by @a pnum.
     88 * @param apnum Place to store allocated port number
     89 *
     90 * @return EOK on success, ENOENT if no free port number found, EEXISTS
     91 *         if @a pnum is specified but it is already allocated,
     92 *         EINVAL if @a pnum is specified from the system range, but
     93 *         @c pf_allow_system was not set.
     94 */
    7195int portrng_alloc(portrng_t *pr, uint16_t pnum, void *arg,
    7296    portrng_flags_t flags, uint16_t *apnum)
     
    131155}
    132156
     157/** Find allocated port number and return its argument.
     158 *
     159 * @param pr   Port range
     160 * @param pnum Port number
     161 * @param rarg Place to store user argument
     162 *
     163 * @return EOK on success, ENOENT if specified port number is not allocated
     164 */
    133165int portrng_find_port(portrng_t *pr, uint16_t pnum, void **rarg)
    134166{
     
    143175}
    144176
     177/** Free port in port range.
     178 *
     179 * @param pr   Port range
     180 * @param pnum Port number
     181 */
    145182void portrng_free_port(portrng_t *pr, uint16_t pnum)
    146183{
     
    158195}
    159196
     197/** Determine if port range is empty.
     198 *
     199 * @param pr Port range
     200 * @return @c true if no ports are allocated from @a pr, @c false otherwise
     201 */
    160202bool portrng_empty(portrng_t *pr)
    161203{
Note: See TracChangeset for help on using the changeset viewer.