Changeset 1bfd3d3 in mainline for uspace/lib


Ignore:
Timestamp:
2010-11-19T22:02:09Z (15 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
973ef9fc, a9c6b966
Parents:
cc3c2a1c
Message:

Replace @returns with @return.

Location:
uspace/lib
Files:
30 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/adt/char_map.c

    rcc3c2a1c r1bfd3d3  
    6060 * @param[in] value     The integral value to be stored for the key character
    6161 *                      string.
    62  * @returns             EOK on success.
    63  * @returns             ENOMEM if there is not enough memory left.
    64  * @returns             EEXIST if the key character string is already used.
     62 * @return              EOK on success.
     63 * @return              ENOMEM if there is not enough memory left.
     64 * @return              EEXIST if the key character string is already used.
    6565 */
    6666static int
     
    107107 *
    108108 * @param[in] map       The character string to integer map.
    109  * @returns             TRUE if the map is valid.
    110  * @returns             FALSE otherwise.
     109 * @return              TRUE if the map is valid.
     110 * @return              FALSE otherwise.
    111111 */
    112112static int char_map_is_valid(const char_map_t *map)
     
    127127 * @param[in] value     The integral value to be stored for the key character
    128128 *                      string.
    129  * @returns             EOK on success.
    130  * @returns             EINVAL if the map is not valid.
    131  * @returns             EINVAL if the identifier parameter is NULL.
    132  * @returns             EINVAL if the length parameter zero (0) and the
     129 * @return              EOK on success.
     130 * @return              EINVAL if the map is not valid.
     131 * @return              EINVAL if the identifier parameter is NULL.
     132 * @return              EINVAL if the length parameter zero (0) and the
    133133 *                      identifier parameter is an empty character string (the
    134134 *                      first character is the terminating zero ('\0')
    135135 *                      character.
    136  * @returns             EEXIST if the key character string is already used.
    137  * @returns             Other error codes as defined for the
     136 * @return              EEXIST if the key character string is already used.
     137 * @return              Other error codes as defined for the
    138138 *                      char_map_add_item() function.
    139139 */
     
    196196 *                      zero (0) which means that the string is processed until
    197197 *                      the terminating zero ('\0') character is found.
    198  * @returns             The node holding the integral value assigned to the key
     198 * @return              The node holding the integral value assigned to the key
    199199 *                      character string.
    200  * @returns             NULL if the key is not assigned a node.
     200 * @return              NULL if the key is not assigned a node.
    201201 */
    202202static char_map_t *
     
    239239 *                      zero (0) which means that the string is processed until
    240240 *                      the terminating zero ('\0') character is found.
    241  * @returns             The integral value assigned to the key character string.
    242  * @returns             CHAR_MAP_NULL if the key is not assigned a value.
     241 * @return              The integral value assigned to the key character string.
     242 * @return              CHAR_MAP_NULL if the key is not assigned a value.
    243243 */
    244244int char_map_exclude(char_map_t *map, const char *identifier, size_t length)
     
    267267 *                      zero (0) which means that the string is processed until
    268268 *                      the terminating zero ('\0') character is found.
    269  *  @returns            The integral value assigned to the key character string.
    270  *  @returns            CHAR_MAP_NULL if the key is not assigned a value.
     269 *  @return             The integral value assigned to the key character string.
     270 *  @return             CHAR_MAP_NULL if the key is not assigned a value.
    271271 */
    272272int char_map_find(const char_map_t *map, const char *identifier, size_t length)
     
    281281 *
    282282 *  @param[in,out] map  The character string to integer map.
    283  *  @returns            EOK on success.
    284  *  @returns            EINVAL if the map parameter is NULL.
    285  *  @returns            ENOMEM if there is not enough memory left.
     283 *  @return             EOK on success.
     284 *  @return             EINVAL if the map parameter is NULL.
     285 *  @return             ENOMEM if there is not enough memory left.
    286286 */
    287287int char_map_initialize(char_map_t *map)
     
    319319 *  @param[in] value    The integral value to be stored for the key character
    320320 *                      string.
    321  *  @returns            EOK on success.
    322  *  @returns            EINVAL if the map is not valid.
    323  *  @returns            EINVAL if the identifier parameter is NULL.
    324  *  @returns            EINVAL if the length parameter zero (0) and the
     321 *  @return             EOK on success.
     322 *  @return             EINVAL if the map is not valid.
     323 *  @return             EINVAL if the identifier parameter is NULL.
     324 *  @return             EINVAL if the length parameter zero (0) and the
    325325 *                      identifier parameter is an empty character string (the
    326326 *                      first character is the terminating zero ('\0) character.
    327  *  @returns            EEXIST if the key character string is already used.
    328  *  @returns            Other error codes as defined for the char_map_add_item()
     327 *  @return             EEXIST if the key character string is already used.
     328 *  @return             Other error codes as defined for the char_map_add_item()
    329329 *                      function.
    330330 */
  • uspace/lib/c/generic/adt/dynamic_fifo.c

    rcc3c2a1c r1bfd3d3  
    5656 *
    5757 * @param[in] fifo      The dynamic queue.
    58  * @returns             TRUE if the queue is valid.
    59  * @returns             FALSE otherwise.
     58 * @return              TRUE if the queue is valid.
     59 * @return              FALSE otherwise.
    6060 */
    6161static int dyn_fifo_is_valid(dyn_fifo_t *fifo)
     
    6868 * @param[in,out] fifo  The dynamic queue.
    6969 * @param[in] size      The initial queue size.
    70  * @returns             EOK on success.
    71  * @returns             EINVAL if the queue is not valid.
    72  * @returns             EBADMEM if the fifo parameter is NULL.
    73  * @returns             ENOMEM if there is not enough memory left.
     70 * @return              EOK on success.
     71 * @return              EINVAL if the queue is not valid.
     72 * @return              EBADMEM if the fifo parameter is NULL.
     73 * @return              ENOMEM if there is not enough memory left.
    7474 */
    7575int dyn_fifo_initialize(dyn_fifo_t *fifo, int size)
     
    100100 *                      this limit. May be zero or negative to indicate no
    101101 *                      limit.
    102  * @returns             EOK on success.
    103  * @returns             EINVAL if the queue is not valid.
    104  * @returns             ENOMEM if there is not enough memory left.
     102 * @return              EOK on success.
     103 * @return              EINVAL if the queue is not valid.
     104 * @return              ENOMEM if there is not enough memory left.
    105105 */
    106106int dyn_fifo_push(dyn_fifo_t *fifo, int value, int max_size)
     
    150150 *
    151151 * @param[in,out] fifo  The dynamic queue.
    152  * @returns             Value of the first item in the queue.
    153  * @returns             EINVAL if the queue is not valid.
    154  * @returns             ENOENT if the queue is empty.
     152 * @return              Value of the first item in the queue.
     153 * @return              EINVAL if the queue is not valid.
     154 * @return              ENOENT if the queue is empty.
    155155 */
    156156int dyn_fifo_pop(dyn_fifo_t *fifo)
     
    172172 *
    173173 * @param[in,out] fifo  The dynamic queue.
    174  * @returnsi            Value of the first item in the queue.
    175  * @returns             EINVAL if the queue is not valid.
    176  * @returns             ENOENT if the queue is empty.
     174 * @return              Value of the first item in the queue.
     175 * @return              EINVAL if the queue is not valid.
     176 * @return              ENOENT if the queue is empty.
    177177 */
    178178int dyn_fifo_value(dyn_fifo_t *fifo)
     
    190190 *
    191191 * @param[in,out] fifo  The dynamic queue.
    192  * @returns             EOK on success.
    193  * @returns             EINVAL if the queue is not valid.
     192 * @return              EOK on success.
     193 * @return              EINVAL if the queue is not valid.
    194194 */
    195195int dyn_fifo_destroy(dyn_fifo_t *fifo)
  • uspace/lib/c/generic/adt/measured_strings.c

    rcc3c2a1c r1bfd3d3  
    5555 *                      appended with the terminating zero ('\0') character
    5656 *                      otherwise.
    57  * @returns             The new bundled character string with measured length.
    58  * @returns             NULL if there is not enough memory left.
     57 * @return              The new bundled character string with measured length.
     58 * @return              NULL if there is not enough memory left.
    5959 */
    6060measured_string_t *
     
    8484 *
    8585 * @param[in] source    The source measured string to be copied.
    86  * @returns             The copy of the given measured string.
    87  * @returns             NULL if the source parameter is NULL.
    88  * @returns             NULL if there is not enough memory left.
     86 * @return              The copy of the given measured string.
     87 * @return              NULL if the source parameter is NULL.
     88 * @return              NULL if there is not enough memory left.
    8989 */
    9090measured_string_t *measured_string_copy(measured_string_t *source)
     
    120120 *                      actual character strings.
    121121 *  @param[in] count    The size of the measured strings array.
    122  *  @returns            EOK on success.
    123  *  @returns            EINVAL if the strings or data parameter is NULL.
    124  *  @returns            EINVAL if the count parameter is zero (0).
    125  *  @returns            EINVAL if the sent array differs in size.
    126  *  @returns            EINVAL if there is inconsistency in sent measured
     122 *  @return             EOK on success.
     123 *  @return             EINVAL if the strings or data parameter is NULL.
     124 *  @return             EINVAL if the count parameter is zero (0).
     125 *  @return             EINVAL if the sent array differs in size.
     126 *  @return             EINVAL if there is inconsistency in sent measured
    127127 *                      strings' lengths (should not occur).
    128  *  @returns            ENOMEM if there is not enough memory left.
    129  *  @returns            Other error codes as defined for the
     128 *  @return             ENOMEM if there is not enough memory left.
     129 *  @return             Other error codes as defined for the
    130130 *                      async_data_write_finalize() function.
    131131 */
     
    209209 * @param[in] strings   The measured strings array to be processed.
    210210 * @param[in] count     The measured strings array size.
    211  * @returns             The computed sizes array.
    212  * @returns             NULL if there is not enough memory left.
     211 * @return              The computed sizes array.
     212 * @return              NULL if there is not enough memory left.
    213213 */
    214214static size_t *prepare_lengths(const measured_string_t *strings, size_t count)
     
    238238 * @param[in] strings   The measured strings array to be transferred.
    239239 * @param[in] count     The measured strings array size.
    240  * @returns             EOK on success.
    241  * @returns             EINVAL if the strings parameter is NULL.
    242  * @returns             EINVAL if the count parameter is zero (0).
    243  * @returns             EINVAL if the calling module does not accept the given
     240 * @return              EOK on success.
     241 * @return              EINVAL if the strings parameter is NULL.
     242 * @return              EINVAL if the count parameter is zero (0).
     243 * @return              EINVAL if the calling module does not accept the given
    244244 *                      array size.
    245  * @returns             EINVAL if there is inconsistency in sent measured
     245 * @return              EINVAL if there is inconsistency in sent measured
    246246 *                      strings' lengths (should not occur).
    247  * @returns             Other error codes as defined for the
     247 * @return              Other error codes as defined for the
    248248 *                      async_data_read_finalize() function.
    249249 */
     
    302302 *                      actual character strings.
    303303 * @param[in] count     The size of the measured strings array.
    304  * @returns             EOK on success.
    305  * @returns             EINVAL if the strings or data parameter is NULL.
    306  * @returns             EINVAL if the phone or count parameter is not positive.
    307  * @returns             EINVAL if the sent array differs in size.
    308  * @returns             ENOMEM if there is not enough memory left.
    309  * @returns             Other error codes as defined for the
     304 * @return              EOK on success.
     305 * @return              EINVAL if the strings or data parameter is NULL.
     306 * @return              EINVAL if the phone or count parameter is not positive.
     307 * @return              EINVAL if the sent array differs in size.
     308 * @return              ENOMEM if there is not enough memory left.
     309 * @return              Other error codes as defined for the
    310310 *                      async_data_read_start() function.
    311311 */
     
    378378 * @param[in] strings   The measured strings array to be transferred.
    379379 * @param[in] count     The measured strings array size.
    380  * @returns             EOK on success.
    381  * @returns             EINVAL if the strings parameter is NULL.
    382  * @returns             EINVAL if the phone or count parameter is not positive.
    383  * @returns             Other error codes as defined for the
     380 * @return              EOK on success.
     381 * @return              EINVAL if the strings parameter is NULL.
     382 * @return              EINVAL if the phone or count parameter is not positive.
     383 * @return              Other error codes as defined for the
    384384 *                      async_data_write_start() function.
    385385 */
  • uspace/lib/c/generic/net/icmp_api.c

    rcc3c2a1c r1bfd3d3  
    6666 * @param[in] addr      The target host address.
    6767 * @param[in] addrlen   The torget host address length.
    68  * @returns             ICMP_ECHO on success.
    69  * @returns             ETIMEOUT if the reply has not arrived before the
     68 * @return              ICMP_ECHO on success.
     69 * @return              ETIMEOUT if the reply has not arrived before the
    7070 *                      timeout.
    71  * @returns             ICMP type of the received error notification.
    72  * @returns             EINVAL if the addrlen parameter is less or equal to
     71 * @return              ICMP type of the received error notification.
     72 * @return              EINVAL if the addrlen parameter is less or equal to
    7373 *                      zero.
    74  * @returns             ENOMEM if there is not enough memory left.
    75  * @returns             EPARTY if there was an internal error.
     74 * @return              ENOMEM if there is not enough memory left.
     75 * @return              EPARTY if there was an internal error.
    7676 */
    7777int
  • uspace/lib/c/generic/net/icmp_common.c

    rcc3c2a1c r1bfd3d3  
    5050 * @param[in] timeout   The connection timeout in microseconds. No timeout if
    5151 *                      set to zero.
    52  * @returns             The ICMP module phone on success.
    53  * @returns             ETIMEOUT if the connection timeouted.
     52 * @return              The ICMP module phone on success.
     53 * @return              ETIMEOUT if the connection timeouted.
    5454 */
    5555int icmp_connect_module(services_t service, suseconds_t timeout)
  • uspace/lib/c/generic/net/inet.c

    rcc3c2a1c r1bfd3d3  
    5151 *  @param[out] address The character buffer to be filled.
    5252 *  @param[in] length   The buffer length.
    53  *  @returns            EOK on success.
    54  *  @returns            EINVAL if the data or address parameter is NULL.
    55  *  @returns            ENOMEM if the character buffer is not long enough.
    56  *  @returns            ENOTSUP if the address family is not supported.
     53 *  @return             EOK on success.
     54 *  @return             EINVAL if the data or address parameter is NULL.
     55 *  @return             ENOMEM if the character buffer is not long enough.
     56 *  @return             ENOTSUP if the address family is not supported.
    5757 */
    5858int
     
    101101 *  @param[in] address  The character buffer to be parsed.
    102102 *  @param[out] data    The address data to be filled.
    103  *  @returns            EOK on success.
    104  *  @returns            EINVAL if the data parameter is NULL.
    105  *  @returns            ENOENT if the address parameter is NULL.
    106  *  @returns            ENOTSUP if the address family is not supported.
     103 *  @return             EOK on success.
     104 *  @return             EINVAL if the data parameter is NULL.
     105 *  @return             ENOENT if the address parameter is NULL.
     106 *  @return             ENOTSUP if the address family is not supported.
    107107 */
    108108int inet_pton(uint16_t family, const char *address, uint8_t *data)
  • uspace/lib/c/generic/net/modules.c

    rcc3c2a1c r1bfd3d3  
    159159 *
    160160 * @param[in] need      The needed module service.
    161  * @returns             The phone of the needed service.
     161 * @return              The phone of the needed service.
    162162 */
    163163int connect_to_service(services_t need)
     
    171171 *  @param[in] timeout  The connection timeout in microseconds. No timeout if
    172172 *                      set to zero (0).
    173  *  @returns            The phone of the needed service.
    174  *  @returns            ETIMEOUT if the connection timeouted.
     173 *  @return             The phone of the needed service.
     174 *  @return             ETIMEOUT if the connection timeouted.
    175175 */
    176176int connect_to_service_timeout(services_t need, suseconds_t timeout)
     
    204204 * @param[out] data     The data buffer to be filled.
    205205 * @param[out] length   The buffer length.
    206  * @returns             EOK on success.
    207  * @returns             EBADMEM if the data or the length parameter is NULL.
    208  * @returns             EINVAL if the client does not send data.
    209  * @returns             ENOMEM if there is not enough memory left.
    210  * @returns             Other error codes as defined for the
     206 * @return              EOK on success.
     207 * @return              EBADMEM if the data or the length parameter is NULL.
     208 * @return              EINVAL if the client does not send data.
     209 * @return              ENOMEM if there is not enough memory left.
     210 * @return              Other error codes as defined for the
    211211 *                      async_data_write_finalize() function.
    212212 */
     
    242242 * @param[in] data      The data buffer to be sent.
    243243 * @param[in] data_length The buffer length.
    244  * @returns             EOK on success.
    245  * @returns             EINVAL if the client does not expect the data.
    246  * @returns             EOVERFLOW if the client does not expect all the data.
     244 * @return              EOK on success.
     245 * @return              EINVAL if the client does not expect the data.
     246 * @return              EOVERFLOW if the client does not expect all the data.
    247247 *                      Only partial data are transfered.
    248  * @returns             Other error codes as defined for the
     248 * @return              Other error codes as defined for the
    249249 *                      async_data_read_finalize() function.
    250250 */
  • uspace/lib/c/generic/net/packet.c

    rcc3c2a1c r1bfd3d3  
    8282/** Initializes the packet map.
    8383 *
    84  * @returns             EOK on success.
    85  * @returns             ENOMEM if there is not enough memory left.
     84 * @return              EOK on success.
     85 * @return              ENOMEM if there is not enough memory left.
    8686 */
    8787int pm_init(void)
     
    101101 *
    102102 * @param[in] packet_id The packet identifier to be found.
    103  * @returns             The found packet reference.
    104  * @returns             NULL if the mapping does not exist.
     103 * @return              The found packet reference.
     104 * @return              NULL if the mapping does not exist.
    105105 */
    106106packet_t pm_find(packet_id_t packet_id)
     
    130130 *
    131131 * @param[in] packet    The packet to be remembered.
    132  * @returns             EOK on success.
    133  * @returns             EINVAL if the packet is not valid.
    134  * @returns             EINVAL if the packet map is not initialized.
    135  * @returns             ENOMEM if there is not enough memory left.
     132 * @return              EOK on success.
     133 * @return              EINVAL if the packet is not valid.
     134 * @return              EINVAL if the packet map is not initialized.
     135 * @return              ENOMEM if there is not enough memory left.
    136136 */
    137137int pm_add(packet_t packet)
     
    205205 * @param[in] order     The packet order value.
    206206 * @param[in] metric    The metric value of the packet.
    207  * @returns             EOK on success.
    208  * @returns             EINVAL if the first parameter is NULL.
    209  * @returns             EINVAL if the packet is not valid.
     207 * @return              EOK on success.
     208 * @return              EINVAL if the first parameter is NULL.
     209 * @return              EINVAL if the packet is not valid.
    210210 */
    211211int pq_add(packet_t * first, packet_t packet, size_t order, size_t metric)
     
    249249 * @param[in] first     The first packet of the queue.
    250250 * @param[in] order     The packet order value.
    251  * @returns             The packet with the given order.
    252  * @returns             NULL if the first packet is not valid.
    253  * @returns             NULL if the packet is not found.
     251 * @return              The packet with the given order.
     252 * @return              NULL if the first packet is not valid.
     253 * @return              NULL if the packet is not found.
    254254 */
    255255packet_t pq_find(packet_t packet, size_t order)
     
    275275 * @param[in] packet    The packet in the queue.
    276276 * @param[in] new_packet The new packet to be inserted.
    277  * @returns             EOK on success.
    278  * @returns             EINVAL if etiher of the packets is invalid.
     277 * @return              EOK on success.
     278 * @return              EINVAL if etiher of the packets is invalid.
    279279 */
    280280int pq_insert_after(packet_t packet, packet_t new_packet)
     
    298298 *
    299299 * @param[in] packet    The packet to be detached.
    300  * @returns             The next packet in the queue. If the packet is the first
     300 * @return              The next packet in the queue. If the packet is the first
    301301 *                      one of the queue, this becomes the new first one.
    302  * @returns             NULL if there is no packet left.
    303  * @returns             NULL if the packet is not valid.
     302 * @return              NULL if there is no packet left.
     303 * @return              NULL if the packet is not valid.
    304304 */
    305305packet_t pq_detach(packet_t packet)
     
    328328 * @param[in] order     The packet order value.
    329329 * @param[in] metric    The metric value of the packet.
    330  * @returns             EOK on success.
    331  * @returns             EINVAL if the packet is invalid.
     330 * @return              EOK on success.
     331 * @return              EINVAL if the packet is invalid.
    332332 */
    333333int pq_set_order(packet_t packet, size_t order, size_t metric)
     
    346346 * @param[out] order    The packet order value.
    347347 * @param[out] metric   The metric value of the packet.
    348  * @returns             EOK on success.
    349  * @returns             EINVAL if the packet is invalid.
     348 * @return              EOK on success.
     349 * @return              EINVAL if the packet is invalid.
    350350 */
    351351int pq_get_order(packet_t packet, size_t *order, size_t *metric)
     
    391391 *
    392392 * @param[in] packet    The packet queue member.
    393  * @returns             The next packet in the queue.
    394  * @returns             NULL if there is no next packet.
    395  * @returns             NULL if the packet is not valid.
     393 * @return              The next packet in the queue.
     394 * @return              NULL if there is no next packet.
     395 * @return              NULL if the packet is not valid.
    396396 */
    397397packet_t pq_next(packet_t packet)
     
    406406 *
    407407 * @param[in] packet    The packet queue member.
    408  * @returns             The previous packet in the queue.
    409  * @returns             NULL if there is no previous packet.
    410  * @returns             NULL if the packet is not valid.
     408 * @return              The previous packet in the queue.
     409 * @return              NULL if there is no previous packet.
     410 * @return              NULL if the packet is not valid.
    411411 */
    412412packet_t pq_previous(packet_t packet)
  • uspace/lib/c/generic/net/socket_client.c

    rcc3c2a1c r1bfd3d3  
    178178/** Returns the active sockets.
    179179 *
    180  *  @returns            The active sockets.
     180 *  @return             The active sockets.
    181181 */
    182182static sockets_t *socket_get_sockets(void)
     
    286286 * Connects to the TCP module if necessary.
    287287 *
    288  * @returns             The TCP module phone.
    289  * @returns             Other error codes as defined for the
     288 * @return              The TCP module phone.
     289 * @return              Other error codes as defined for the
    290290 *                      bind_service_timeout() function.
    291291 */
     
    305305 * Connects to the UDP module if necessary.
    306306 *
    307  * @returns             The UDP module phone.
    308  * @returns             Other error codes as defined for the
     307 * @return              The UDP module phone.
     308 * @return              Other error codes as defined for the
    309309 *                      bind_service_timeout() function.
    310310 */
     
    322322/** Tries to find a new free socket identifier.
    323323 *
    324  * @returns             The new socket identifier.
    325  * @returns             ELIMIT if there is no socket identifier available.
     324 * @return              The new socket identifier.
     325 * @return              ELIMIT if there is no socket identifier available.
    326326 */
    327327static int socket_generate_new_id(void)
     
    387387 * @param[in] type      Socket type.
    388388 * @param[in] protocol  Socket protocol.
    389  * @returns             The socket identifier on success.
    390  * @returns             EPFNOTSUPPORT if the protocol family is not supported.
    391  * @returns             ESOCKNOTSUPPORT if the socket type is not supported.
    392  * @returns             EPROTONOSUPPORT if the protocol is not supported.
    393  * @returns             ENOMEM if there is not enough memory left.
    394  * @returns             ELIMIT if there was not a free socket identifier found
     389 * @return              The socket identifier on success.
     390 * @return              EPFNOTSUPPORT if the protocol family is not supported.
     391 * @return              ESOCKNOTSUPPORT if the socket type is not supported.
     392 * @return              EPROTONOSUPPORT if the protocol is not supported.
     393 * @return              ENOMEM if there is not enough memory left.
     394 * @return              ELIMIT if there was not a free socket identifier found
    395395 *                      this time.
    396  * @returns             Other error codes as defined for the NET_SOCKET message.
    397  * @returns             Other error codes as defined for the
     396 * @return              Other error codes as defined for the NET_SOCKET message.
     397 * @return              Other error codes as defined for the
    398398 *                      bind_service_timeout() function.
    399399 */
     
    509509 * @param[in] data      The data to be sent.
    510510 * @param[in] datalength The data length.
    511  * @returns             EOK on success.
    512  * @returns             ENOTSOCK if the socket is not found.
    513  * @returns             EBADMEM if the data parameter is NULL.
    514  * @returns             NO_DATA if the datalength parameter is zero (0).
    515  * @returns             Other error codes as defined for the spcific message.
     511 * @return              EOK on success.
     512 * @return              ENOTSOCK if the socket is not found.
     513 * @return              EBADMEM if the data parameter is NULL.
     514 * @return              NO_DATA if the datalength parameter is zero (0).
     515 * @return              Other error codes as defined for the spcific message.
    516516 */
    517517static int
     
    554554 * @param[in] my_addr   The port address.
    555555 * @param[in] addrlen   The address length.
    556  * @returns             EOK on success.
    557  * @returns             ENOTSOCK if the socket is not found.
    558  * @returns             EBADMEM if the my_addr parameter is NULL.
    559  * @returns             NO_DATA if the addlen parameter is zero.
    560  * @returns             Other error codes as defined for the NET_SOCKET_BIND
     556 * @return              EOK on success.
     557 * @return              ENOTSOCK if the socket is not found.
     558 * @return              EBADMEM if the my_addr parameter is NULL.
     559 * @return              NO_DATA if the addlen parameter is zero.
     560 * @return              Other error codes as defined for the NET_SOCKET_BIND
    561561 *                      message.
    562562 */
     
    575575 * @param[in] socket_id Socket identifier.
    576576 * @param[in] backlog   The maximum number of waiting sockets to be accepted.
    577  * @returns             EOK on success.
    578  * @returns             EINVAL if the backlog parameter is not positive (<=0).
    579  * @returns             ENOTSOCK if the socket is not found.
    580  * @returns             Other error codes as defined for the NET_SOCKET_LISTEN
     577 * @return              EOK on success.
     578 * @return              EINVAL if the backlog parameter is not positive (<=0).
     579 * @return              ENOTSOCK if the socket is not found.
     580 * @return              Other error codes as defined for the NET_SOCKET_LISTEN
    581581 *                      message.
    582582 */
     
    613613 * @param[out] cliaddr  The remote client address.
    614614 * @param[in] addrlen   The address length.
    615  * @returns             EOK on success.
    616  * @returns             EBADMEM if the cliaddr or addrlen parameter is NULL.
    617  * @returns             EINVAL if the backlog parameter is not positive (<=0).
    618  * @returns             ENOTSOCK if the socket is not found.
    619  * @returns             Other error codes as defined for the NET_SOCKET_ACCEPT
     615 * @return              EOK on success.
     616 * @return              EBADMEM if the cliaddr or addrlen parameter is NULL.
     617 * @return              EINVAL if the backlog parameter is not positive (<=0).
     618 * @return              ENOTSOCK if the socket is not found.
     619 * @return              Other error codes as defined for the NET_SOCKET_ACCEPT
    620620 *                      message.
    621621 */
     
    716716 * @param[in] serv_addr The remote server address.
    717717 * @param[in] addrlen   The address length.
    718  * @returns             EOK on success.
    719  * @returns             EBADMEM if the serv_addr parameter is NULL.
    720  * @returns             NO_DATA if the addlen parameter is zero.
    721  * @returns             ENOTSOCK if the socket is not found.
    722  * @returns             Other error codes as defined for the NET_SOCKET_CONNECT
     718 * @return              EOK on success.
     719 * @return              EBADMEM if the serv_addr parameter is NULL.
     720 * @return              NO_DATA if the addlen parameter is zero.
     721 * @return              ENOTSOCK if the socket is not found.
     722 * @return              Other error codes as defined for the NET_SOCKET_CONNECT
    723723 *                      message.
    724724 */
     
    756756 *
    757757 * @param[in] socket_id Socket identifier.
    758  * @returns             EOK on success.
    759  * @returns             ENOTSOCK if the socket is not found.
    760  * @returns             EINPROGRESS if there is another blocking function in
     758 * @return              EOK on success.
     759 * @return              ENOTSOCK if the socket is not found.
     760 * @return              EINPROGRESS if there is another blocking function in
    761761 *                      progress.
    762  * @returns             Other error codes as defined for the NET_SOCKET_CLOSE
     762 * @return              Other error codes as defined for the NET_SOCKET_CLOSE
    763763 *                      message.
    764764 */
     
    806806 *                      sockets.
    807807 * @param[in] addrlen   The address length. Used only if toaddr is not NULL.
    808  * @returns             EOK on success.
    809  * @returns             ENOTSOCK if the socket is not found.
    810  * @returns             EBADMEM if the data or toaddr parameter is NULL.
    811  * @returns             NO_DATA if the datalength or the addrlen parameter is
     808 * @return              EOK on success.
     809 * @return              ENOTSOCK if the socket is not found.
     810 * @return              EBADMEM if the data or toaddr parameter is NULL.
     811 * @return              NO_DATA if the datalength or the addrlen parameter is
    812812 *                      zero (0).
    813  * @returns             Other error codes as defined for the NET_SOCKET_SENDTO
     813 * @return              Other error codes as defined for the NET_SOCKET_SENDTO
    814814 *                      message.
    815815 */
     
    908908 * @param[in] datalength The data length.
    909909 * @param[in] flags     Various send flags.
    910  * @returns             EOK on success.
    911  * @returns             ENOTSOCK if the socket is not found.
    912  * @returns             EBADMEM if the data parameter is NULL.
    913  * @returns             NO_DATA if the datalength parameter is zero.
    914  * @returns             Other error codes as defined for the NET_SOCKET_SEND
     910 * @return              EOK on success.
     911 * @return              ENOTSOCK if the socket is not found.
     912 * @return              EBADMEM if the data parameter is NULL.
     913 * @return              NO_DATA if the datalength parameter is zero.
     914 * @return              Other error codes as defined for the NET_SOCKET_SEND
    915915 *                      message.
    916916 */
     
    932932 * @param[in] toaddr    The destination address.
    933933 * @param[in] addrlen   The address length.
    934  * @returns             EOK on success.
    935  * @returns             ENOTSOCK if the socket is not found.
    936  * @returns             EBADMEM if the data or toaddr parameter is NULL.
    937  * @returns             NO_DATA if the datalength or the addrlen parameter is
     934 * @return              EOK on success.
     935 * @return              ENOTSOCK if the socket is not found.
     936 * @return              EBADMEM if the data or toaddr parameter is NULL.
     937 * @return              NO_DATA if the datalength or the addrlen parameter is
    938938 *                      zero.
    939  * @returns             Other error codes as defined for the NET_SOCKET_SENDTO
     939 * @return              Other error codes as defined for the NET_SOCKET_SENDTO
    940940 *                      message.
    941941 */
     
    966966 *                      read. The actual address length is set. Used only if
    967967 *                      fromaddr is not NULL.
    968  * @returns             EOK on success.
    969  * @returns             ENOTSOCK if the socket is not found.
    970  * @returns             EBADMEM if the data parameter is NULL.
    971  * @returns             NO_DATA if the datalength or addrlen parameter is zero.
    972  * @returns             Other error codes as defined for the spcific message.
     968 * @return              EOK on success.
     969 * @return              ENOTSOCK if the socket is not found.
     970 * @return              EBADMEM if the data parameter is NULL.
     971 * @return              NO_DATA if the datalength or addrlen parameter is zero.
     972 * @return              Other error codes as defined for the spcific message.
    973973 */
    974974static int
     
    10951095 * @param[in] datalength The data length.
    10961096 * @param[in] flags     Various receive flags.
    1097  * @returns             EOK on success.
    1098  * @returns             ENOTSOCK if the socket is not found.
    1099  * @returns             EBADMEM if the data parameter is NULL.
    1100  * @returns             NO_DATA if the datalength parameter is zero.
    1101  * @returns             Other error codes as defined for the NET_SOCKET_RECV
     1097 * @return              EOK on success.
     1098 * @return              ENOTSOCK if the socket is not found.
     1099 * @return              EBADMEM if the data parameter is NULL.
     1100 * @return              NO_DATA if the datalength parameter is zero.
     1101 * @return              Other error codes as defined for the NET_SOCKET_RECV
    11021102 *                      message.
    11031103 */
     
    11181118 * @param[in,out] addrlen The address length. The maximum address length is
    11191119 *                      read. The actual address length is set.
    1120  * @returns             EOK on success.
    1121  * @returns             ENOTSOCK if the socket is not found.
    1122  * @returns             EBADMEM if the data or fromaddr parameter is NULL.
    1123  * @returns             NO_DATA if the datalength or addrlen parameter is zero.
    1124  * @returns             Other error codes as defined for the NET_SOCKET_RECVFROM
     1120 * @return              EOK on success.
     1121 * @return              ENOTSOCK if the socket is not found.
     1122 * @return              EBADMEM if the data or fromaddr parameter is NULL.
     1123 * @return              NO_DATA if the datalength or addrlen parameter is zero.
     1124 * @return              Other error codes as defined for the NET_SOCKET_RECVFROM
    11251125 *                      message.
    11261126 */
     
    11481148 * @param[in,out] optlen The value buffer length. The maximum length is read.
    11491149 *                      The actual length is set.
    1150  * @returns             EOK on success.
    1151  * @returns             ENOTSOCK if the socket is not found.
    1152  * @returns             EBADMEM if the value or optlen parameter is NULL.
    1153  * @returns             NO_DATA if the optlen parameter is zero.
    1154  * @returns             Other error codes as defined for the
     1150 * @return              EOK on success.
     1151 * @return              ENOTSOCK if the socket is not found.
     1152 * @return              EBADMEM if the value or optlen parameter is NULL.
     1153 * @return              NO_DATA if the optlen parameter is zero.
     1154 * @return              Other error codes as defined for the
    11551155 *                      NET_SOCKET_GETSOCKOPT message.
    11561156 */
     
    12011201 * @param[in] value     The value to be set.
    12021202 * @param[in] optlen    The value length.
    1203  * @returns             EOK on success.
    1204  * @returns             ENOTSOCK if the socket is not found.
    1205  * @returns             EBADMEM if the value parameter is NULL.
    1206  * @returns             NO_DATA if the optlen parameter is zero.
    1207  * @returns             Other error codes as defined for the
     1203 * @return              EOK on success.
     1204 * @return              ENOTSOCK if the socket is not found.
     1205 * @return              EBADMEM if the value parameter is NULL.
     1206 * @return              NO_DATA if the optlen parameter is zero.
     1207 * @return              Other error codes as defined for the
    12081208 *                      NET_SOCKET_SETSOCKOPT message.
    12091209 */
  • uspace/lib/c/include/net/modules.h

    rcc3c2a1c r1bfd3d3  
    6969 *
    7070 * @param[in] need      The needed module service.
    71  * @returns             The phone of the needed service.
     71 * @return              The phone of the needed service.
    7272 */
    7373typedef int connect_module_t(services_t need);
  • uspace/lib/c/include/net/packet_header.h

    rcc3c2a1c r1bfd3d3  
    124124/** Returns whether the packet is valid.
    125125 * @param[in] packet    The packet to be checked.
    126  * @returns             True if the packet is not NULL and the magic value is
     126 * @return              True if the packet is not NULL and the magic value is
    127127 *                      correct.
    128  * @returns             False otherwise.
     128 * @return              False otherwise.
    129129 */
    130130static inline int packet_is_valid(const packet_t packet)
  • uspace/lib/net/adt/module_map.c

    rcc3c2a1c r1bfd3d3  
    5959 *                      running.
    6060 * @param[in] connect_module The module connecting function.
    61  * @returns             EOK on success.
    62  * @returns             ENOMEM if there is not enough memory left.
     61 * @return              EOK on success.
     62 * @return              ENOMEM if there is not enough memory left.
    6363 */
    6464int
     
    100100 * @param[in] modules   The module map.
    101101 * @param[in] name      The module name.
    102  * @returns             The running module found. It does not have to be
     102 * @return              The running module found. It does not have to be
    103103 *                      connected.
    104  * @returns             NULL if there is no such module.
     104 * @return              NULL if there is no such module.
    105105 */
    106106module_t *get_running_module(modules_t *modules, char *name)
     
    126126 *
    127127 * @param[in] fname     The module full or relative path filename.
    128  * @returns             The new module task identifier on success.
    129  * @returns             Zero if there is no such module.
     128 * @return              The new module task identifier on success.
     129 * @return              Zero if there is no such module.
    130130 */
    131131task_id_t spawn(const char *fname)
  • uspace/lib/net/generic/generic.c

    rcc3c2a1c r1bfd3d3  
    9292 * @param[out] address  The desired address.
    9393 * @param[out] data     The address data container.
    94  * @returns             EOK on success.
    95  * @returns             EBADMEM if the address parameter and/or the data
     94 * @return              EOK on success.
     95 * @return              EBADMEM if the address parameter and/or the data
    9696 *                      parameter is NULL.
    97  * @returns             Other error codes as defined for the specific service
     97 * @return              Other error codes as defined for the specific service
    9898 *                      message.
    9999 */
     
    223223 * @param[out] translation The translated values.
    224224 * @param[out] data     The translation data container.
    225  * @returns             EOK on success.
    226  * @returns             EINVAL if the configuration parameter is NULL.
    227  * @returns             EINVAL if the count parameter is zero.
    228  * @returns             EBADMEM if the translation or the data parameters are
     225 * @return              EOK on success.
     226 * @return              EINVAL if the configuration parameter is NULL.
     227 * @return              EINVAL if the count parameter is zero.
     228 * @return              EBADMEM if the translation or the data parameters are
    229229 *                      NULL.
    230  * @returns             Other error codes as defined for the specific service
     230 * @return              Other error codes as defined for the specific service
    231231 *                      message.
    232232 */
  • uspace/lib/net/generic/net_checksum.c

    rcc3c2a1c r1bfd3d3  
    4848 *
    4949 * @param[in] sum       Computed checksum.
    50  * @returns             Compacted computed checksum to the 16 bits.
     50 * @return              Compacted computed checksum to the 16 bits.
    5151 */
    5252uint16_t compact_checksum(uint32_t sum)
     
    6666 * @param[in] data      Pointer to the beginning of data to process.
    6767 * @param[in] length    Length of the data in bytes.
    68  * @returns             The computed checksum of the length bytes of the data.
     68 * @return              The computed checksum of the length bytes of the data.
    6969 */
    7070uint32_t compute_checksum(uint32_t seed, uint8_t *data, size_t length)
     
    8888 * @param[in] data      Pointer to the beginning of data to process.
    8989 * @param[in] length    Length of the data in bits.
    90  * @returns             The computed CRC32 of the length bits of the data.
     90 * @return              The computed CRC32 of the length bits of the data.
    9191 */
    9292uint32_t compute_crc32_be(uint32_t seed, uint8_t * data, size_t length)
     
    142142 * @param[in] data      Pointer to the beginning of data to process.
    143143 * @param[in] length    Length of the data in bits.
    144  * @returns             The computed CRC32 of the length bits of the data.
     144 * @return              The computed CRC32 of the length bits of the data.
    145145 */
    146146uint32_t compute_crc32_le(uint32_t seed, uint8_t * data, size_t length)
     
    193193 *
    194194 * @param[in] checksum  The computed checksum.
    195  * @returns             The internet protocol header checksum.
    196  * @returns             0xFFFF if the computed checksum is zero.
     195 * @return              The internet protocol header checksum.
     196 * @return              0xFFFF if the computed checksum is zero.
    197197 */
    198198uint16_t flip_checksum(uint16_t checksum)
     
    211211 * @param[in] data      The header data.
    212212 * @param[in] length    The header length in bytes.
    213  * @returns             The internet protocol header checksum.
    214  * @returns             0xFFFF if the computed checksum is zero.
     213 * @return              The internet protocol header checksum.
     214 * @return              0xFFFF if the computed checksum is zero.
    215215 */
    216216uint16_t ip_checksum(uint8_t *data, size_t length)
  • uspace/lib/net/generic/net_remote.c

    rcc3c2a1c r1bfd3d3  
    4949/** Connects to the networking module.
    5050 *
    51  * @returns             The networking module phone on success.
     51 * @return              The networking module phone on success.
    5252 */
    5353int net_connect_module(void)
     
    8383 * @param[in] count     The configuration entries count.
    8484 * @param[in,out] data  The configuration and settings data.
    85  * @returns             EOK on success.
    86  * @returns             EINVAL if the configuration is NULL.
    87  * @returns             EINVAL if the count is zero.
    88  * @returns             Other error codes as defined for the
     85 * @return              EOK on success.
     86 * @return              EINVAL if the configuration is NULL.
     87 * @return              EINVAL if the count is zero.
     88 * @return              Other error codes as defined for the
    8989 *                      generic_translate_req() function.
    9090 */
     
    110110 * @param[in] count     The configuration entries count.
    111111 * @param[in,out] data  The configuration and settings data.
    112  * @returns             EOK on success.
    113  * @returns             EINVAL if the configuration is NULL.
    114  * @returns             EINVAL if the count is zero.
    115  * @returns             Other error codes as defined for the
     112 * @return              EOK on success.
     113 * @return              EINVAL if the configuration is NULL.
     114 * @return              EINVAL if the count is zero.
     115 * @return              Other error codes as defined for the
    116116 *                      generic_translate_req() function.
    117117 */
  • uspace/lib/net/generic/packet_client.c

    rcc3c2a1c r1bfd3d3  
    5353 * @param[in] data      The data to be copied.
    5454 * @param[in] length    The length of the copied data.
    55  * @returns             EOK on success.
    56  * @returns             EINVAL if the packet is not valid.
    57  * @returns             ENOMEM if there is not enough memory left.
     55 * @return              EOK on success.
     56 * @return              EINVAL if the packet is not valid.
     57 * @return              ENOMEM if there is not enough memory left.
    5858 */
    5959int packet_copy_data(packet_t packet, const void *data, size_t length)
     
    7878 * @param[in] length    The space length to be allocated at the beginning of the
    7979 *                      packet content.
    80  * @returns             The pointer to the allocated memory.
    81  * @returns             NULL if there is not enough memory left.
     80 * @return              The pointer to the allocated memory.
     81 * @return              NULL if there is not enough memory left.
    8282 */
    8383void *packet_prefix(packet_t packet, size_t length)
     
    9999 * @param[in] length    The space length to be allocated at the end of the
    100100 *                       packet content.
    101  * @returns             The pointer to the allocated memory.
    102  * @returns             NULL if there is not enough memory left.
     101 * @return              The pointer to the allocated memory.
     102 * @return              NULL if there is not enough memory left.
    103103 */
    104104void *packet_suffix(packet_t packet, size_t length)
     
    120120 * @param[in] suffix    The suffix length to be removed from the end of the
    121121 *                      packet content.
    122  * @returns             EOK on success.
    123  * @returns             EINVAL if the packet is not valid.
    124  * @returns             ENOMEM if there is not enough memory left.
     122 * @return              EOK on success.
     123 * @return              EINVAL if the packet is not valid.
     124 * @return              ENOMEM if there is not enough memory left.
    125125 */
    126126int packet_trim(packet_t packet, size_t prefix, size_t suffix)
     
    140140 *
    141141 * @param[in] packet    The packet.
    142  * @returns             The packet identifier.
    143  * @returns             Zero if the packet is not valid.
     142 * @return              The packet identifier.
     143 * @return              Zero if the packet is not valid.
    144144 */
    145145packet_id_t packet_get_id(const packet_t packet)
     
    153153 * @param[out] src      The source address. May be NULL if not desired.
    154154 * @param[out] dest     The destination address. May be NULL if not desired.
    155  * @returns             The stored addresses length.
    156  * @returns             Zero if the addresses are not present.
    157  * @returns             EINVAL if the packet is not valid.
     155 * @return              The stored addresses length.
     156 * @return              Zero if the addresses are not present.
     157 * @return              EINVAL if the packet is not valid.
    158158 */
    159159int packet_get_addr(const packet_t packet, uint8_t **src, uint8_t **dest)
     
    174174 *
    175175 * @param[in] packet    The packet.
    176  * @returns             The packet content length in bytes.
    177  * @returns             Zero if the packet is not valid.
     176 * @return              The packet content length in bytes.
     177 * @return              Zero if the packet is not valid.
    178178 */
    179179size_t packet_get_data_length(const packet_t packet)
     
    188188 *
    189189 * @param[in] packet    The packet.
    190  * @returns             The pointer to the beginning of the packet content.
    191  * @returns             NULL if the packet is not valid.
     190 * @return              The pointer to the beginning of the packet content.
     191 * @return              NULL if the packet is not valid.
    192192 */
    193193void *packet_get_data(const packet_t packet)
     
    205205 * @param[in] dest      The new destination address. May be NULL.
    206206 * @param[in] addr_len  The addresses length.
    207  * @returns             EOK on success.
    208  * @returns             EINVAL if the packet is not valid.
    209  * @returns             ENOMEM if there is not enough memory left.
     207 * @return              EOK on success.
     208 * @return              EINVAL if the packet is not valid.
     209 * @return              ENOMEM if there is not enough memory left.
    210210 */
    211211int
     
    254254 * @param[in] phone     The packet server module phone.
    255255 * @param[in] packet    The original packet.
    256  * @returns             The packet copy.
    257  * @returns             NULL on error.
     256 * @return              The packet copy.
     257 * @return              NULL on error.
    258258 */
    259259packet_t packet_get_copy(int phone, packet_t packet)
  • uspace/lib/net/generic/packet_remote.c

    rcc3c2a1c r1bfd3d3  
    100100 * @param[out] packet   The packet reference.
    101101 * @param[in] packet_id The packet identifier.
    102  * @returns             EOK on success.
    103  * @returns             EINVAL if the packet parameter is NULL.
    104  * @returns             Other error codes as defined for the NET_PACKET_GET_SIZE
     102 * @return              EOK on success.
     103 * @return              EINVAL if the packet parameter is NULL.
     104 * @return              Other error codes as defined for the NET_PACKET_GET_SIZE
    105105 *                      message.
    106  * @returns             Other error codes as defined for the packet_return()
     106 * @return              Other error codes as defined for the packet_return()
    107107 *                      function.
    108108 */
     
    145145 * @param[in] max_content The maximal content length in bytes.
    146146 * @param[in] max_suffix The maximal suffix length in bytes.
    147  * @returns             The packet reference.
    148  * @returns             NULL on error.
     147 * @return              The packet reference.
     148 * @return              NULL on error.
    149149 */
    150150packet_t packet_get_4_remote(int phone, size_t max_content, size_t addr_len,
     
    177177 * @param[in] phone     The packet server module phone.
    178178 * @param[in] content   The maximal content length in bytes.
    179  * @returns             The packet reference.
    180  * @returns             NULL on error.
     179 * @return              The packet reference.
     180 * @return              NULL on error.
    181181 */
    182182packet_t packet_get_1_remote(int phone, size_t content)
  • uspace/lib/net/generic/protocol_map.c

    rcc3c2a1c r1bfd3d3  
    4242 * @param[in] nil       Network interface layer service.
    4343 * @param[in] il        Internetwork layer service.
    44  * @returns             Network interface layer type of the internetworking
     44 * @return              Network interface layer type of the internetworking
    4545 *                      layer service.
    46  * @returns             Zero if mapping is not found.
     46 * @return              Zero if mapping is not found.
    4747 */
    4848eth_type_t protocol_map(services_t nil, services_t il)
     
    6868 * @param[in] nil       Network interface layer service.
    6969 * @param[in] protocol  Network interface layer type.
    70  * @returns             Internetwork layer service of the network interface
     70 * @return              Internetwork layer service of the network interface
    7171 *                      layer type.
    72  * @returns             Zero if mapping is not found.
     72 * @return              Zero if mapping is not found.
    7373 */
    7474services_t protocol_unmap(services_t nil, int protocol)
     
    9494 *
    9595 * @param[in] lsap      Link service access point identifier.
    96  * @returns             Ethernet protocol identifier of the link service access
     96 * @return              Ethernet protocol identifier of the link service access
    9797 *                      point identifier.
    98  * @returns             ETH_LSAP_NULL if mapping is not found.
     98 * @return              ETH_LSAP_NULL if mapping is not found.
    9999 */
    100100eth_type_t lsap_map(eth_lsap_t lsap)
     
    114114 *
    115115 * @param[in] ethertype Ethernet protocol identifier.
    116  * @returns             Link service access point identifier.
    117  * @returns             Zero if mapping is not found.
     116 * @return              Link service access point identifier.
     117 * @return              Zero if mapping is not found.
    118118 */
    119119eth_lsap_t lsap_unmap(eth_type_t ethertype)
     
    132132 *
    133133 * @param[in] nil       The network interface service.
    134  * @returns             The hardware type of the network interface service.
    135  * @returns             Zero if mapping is not found.
     134 * @return              The hardware type of the network interface service.
     135 * @return              Zero if mapping is not found.
    136136 */
    137137hw_type_t hardware_map(services_t nil)
  • uspace/lib/net/il/arp_remote.c

    rcc3c2a1c r1bfd3d3  
    5252 *
    5353 * @param service       The ARP module service. Ignored parameter.
    54  * @returns             The ARP module phone on success.
     54 * @return              The ARP module phone on success.
    5555 */
    5656int arp_connect_module(services_t service)
     
    6565 *
    6666 * @param[in] arp_phone The ARP module phone used for (semi)remote calls.
    67  * @returns             EOK on success.
     67 * @return              EOK on success.
    6868 */
    6969int arp_clean_cache_req(int arp_phone)
     
    7878 * @param[in] protocol  The requesting protocol service.
    7979 * @param[in] address   The protocol address to be cleared.
    80  * @returns             EOK on success.
    81  * @returns             ENOENT if the mapping is not found.
     80 * @return              EOK on success.
     81 * @return              ENOENT if the mapping is not found.
    8282 */
    8383int
     
    100100 * @param[in] arp_phone The ARP module phone used for (semi)remote calls.
    101101 * @param[in] device_id The device identifier.
    102  * @returns             EOK on success.
    103  * @returns             ENOENT if the device is not found.
     102 * @return              EOK on success.
     103 * @return              ENOENT if the device is not found.
    104104 */
    105105int arp_clear_device_req(int arp_phone, device_id_t device_id)
     
    119119 * @param[in] netif     The underlying device network interface layer service.
    120120 * @param[in] address   The local requesting protocol address of the device.
    121  * @returns             EOK on success.
    122  * @returns             EEXIST if the device is already used.
    123  * @returns             ENOMEM if there is not enough memory left.
    124  * @returns             ENOENT if the network interface service is not known.
    125  * @returns             EREFUSED if the network interface service is not
     121 * @return              EOK on success.
     122 * @return              EEXIST if the device is already used.
     123 * @return              ENOMEM if there is not enough memory left.
     124 * @return              ENOENT if the network interface service is not known.
     125 * @return              EREFUSED if the network interface service is not
    126126 *                      responding.
    127  * @returns             Other error codes as defined for the
     127 * @return              Other error codes as defined for the
    128128 *                      nil_packet_get_size() function.
    129  * @returns             Other error codes as defined for the nil_get_addr()
     129 * @return              Other error codes as defined for the nil_get_addr()
    130130 *                      function.
    131  * @returns             Other error codes as defined for the
     131 * @return              Other error codes as defined for the
    132132 *                      nil_get_broadcast_addr() function.
    133133 */
     
    157157 * @param[out] translation The translation of the local protocol address.
    158158 * @param[out] data     The allocated raw translation data container.
    159  * @returns             EOK on success.
    160  * @returns             EINVAL if the address parameter is NULL.
    161  * @returns             EBADMEM if the translation or the data parameters are
     159 * @return              EOK on success.
     160 * @return              EINVAL if the address parameter is NULL.
     161 * @return              EBADMEM if the translation or the data parameters are
    162162 *                      NULL.
    163  * @returns             ENOENT if the mapping is not found.
     163 * @return              ENOENT if the mapping is not found.
    164164 */
    165165int
  • uspace/lib/net/il/ip_client.c

    rcc3c2a1c r1bfd3d3  
    4848 *
    4949 * @param[in] packet    The packet.
    50  * @returns             The IP header length in bytes.
    51  * @returns             Zero if there is no IP header.
     50 * @return              The IP header length in bytes.
     51 * @return              Zero if there is no IP header.
    5252 */
    5353size_t ip_client_header_length(packet_t packet)
     
    7272 * @param[out] header   The constructed IPv4 pseudo header.
    7373 * @param[out] headerlen The length of the IP pseudo header in bytes.
    74  * @returns             EOK on success.
    75  * @returns             EBADMEM if the header and/or the headerlen parameter is
     74 * @return              EOK on success.
     75 * @return              EBADMEM if the header and/or the headerlen parameter is
    7676 *                      NULL.
    77  * @returns             EINVAL if the source address and/or the destination
     77 * @return              EINVAL if the source address and/or the destination
    7878 *                      address parameter is NULL.
    79  * @returns             EINVAL if the source address length is less than struct
     79 * @return              EINVAL if the source address length is less than struct
    8080 *                      sockaddr length.
    81  * @returns             EINVAL if the source address length differs from the
     81 * @return              EINVAL if the source address length differs from the
    8282 *                      destination address length.
    83  * @returns             EINVAL if the source address family differs from the
     83 * @return              EINVAL if the source address family differs from the
    8484 *                      destination family.
    85  * @returns             EAFNOSUPPORT if the address family is not supported.
    86  * @returns             ENOMEM if there is not enough memory left.
     85 * @return              EAFNOSUPPORT if the address family is not supported.
     86 * @return              ENOMEM if there is not enough memory left.
    8787 */
    8888int
     
    148148 *                      disabled.
    149149 * @param[in] ipopt_length The prefixed IP options length in bytes.
    150  * @returns             EOK on success.
    151  * @returns             ENOMEM if there is not enough memory left in the packet.
     150 * @return              EOK on success.
     151 * @return              ENOMEM if there is not enough memory left in the packet.
    152152 */
    153153int
     
    203203 * @param[out] ipopt_length The IP options length in bytes. May be NULL if not
    204204 *                      desired.
    205  * @returns             The prefixed IP header length in bytes on success.
    206  * @returns             ENOMEM if the packet is too short to contain the IP
     205 * @return              The prefixed IP header length in bytes on success.
     206 * @return              ENOMEM if the packet is too short to contain the IP
    207207 *                      header.
    208208 */
     
    238238 * @param[in] headerlen The length of the IP pseudo header in bytes.
    239239 * @param[in] data_length The data length to be set.
    240  * @returns             EOK on success.
    241  * @returns             EBADMEM if the header parameter is NULL.
    242  * @returns             EINVAL if the headerlen parameter is not IPv4 pseudo
     240 * @return              EOK on success.
     241 * @return              EBADMEM if the header parameter is NULL.
     242 * @return              EINVAL if the headerlen parameter is not IPv4 pseudo
    243243 *                      header length.
    244244 */
  • uspace/lib/net/il/ip_remote.c

    rcc3c2a1c r1bfd3d3  
    7878 * @param[in] me        The requesting module service.
    7979 * @param[in] receiver  The message receiver. Used for remote connection.
    80  * @returns             The phone of the needed service.
    81  * @returns             EOK on success.
    82  * @returns             Other error codes as defined for the bind_service()
     80 * @return              The phone of the needed service.
     81 * @return              EOK on success.
     82 * @return              Other error codes as defined for the bind_service()
    8383 *                      function.
    8484 */
     
    9393 *
    9494 * @param service       The IP module service. Ignored parameter.
    95  * @returns             The IP module phone on success.
     95 * @return              The IP module phone on success.
    9696 */
    9797int ip_connect_module(services_t service)
  • uspace/lib/net/include/il_local.h

    rcc3c2a1c r1bfd3d3  
    4444 * @param[out]          answer_count The last parameter for the actual answer in
    4545 *                      the answer parameter.
    46  * @returns             EOK on success.
    47  * @returns             Other error codes as defined for the arp_message()
     46 * @return              EOK on success.
     47 * @return              Other error codes as defined for the arp_message()
    4848 *                      function.
    4949 */
     
    5959 * @param[in] client_connection The client connection processing function. The
    6060 *                      module skeleton propagates its own one.
    61  * @returns             EOK on successful module termination.
    62  * @returns             Other error codes as defined for the arp_initialize()
     61 * @return              EOK on successful module termination.
     62 * @return              Other error codes as defined for the arp_initialize()
    6363 *                      function.
    64  * @returns             Other error codes as defined for the REGISTER_ME() macro
     64 * @return              Other error codes as defined for the REGISTER_ME() macro
    6565 *                      function.
    6666 */
  • uspace/lib/net/include/ip_interface.h

    rcc3c2a1c r1bfd3d3  
    6868 * @param[in] error     The packet error reporting service. Prefixes the
    6969 *                      received packet.
    70  * @returns             EOK on success.
     70 * @return              EOK on success.
    7171 */
    7272typedef int (*tl_received_msg_t)(device_id_t device_id, packet_t packet,
  • uspace/lib/net/include/packet_client.h

    rcc3c2a1c r1bfd3d3  
    6161 * @param[in] type      The type to be allocated at the beginning of the packet
    6262 *                      content.
    63  * @returns             The typed pointer to the allocated memory.
    64  * @returns             NULL if the packet is not valid.
    65  * @returns             NULL if there is not enough memory left.
     63 * @return              The typed pointer to the allocated memory.
     64 * @return              NULL if the packet is not valid.
     65 * @return              NULL if there is not enough memory left.
    6666 */
    6767#define PACKET_PREFIX(packet, type) \
     
    7676 * @param[in] type      The type to be allocated at the end of the packet
    7777 *                      content.
    78  * @returns             The typed pointer to the allocated memory.
    79  * @returns             NULL if the packet is not valid.
    80  * @returns             NULL if there is not enough memory left.
     78 * @return              The typed pointer to the allocated memory.
     79 * @return              NULL if the packet is not valid.
     80 * @return              NULL if there is not enough memory left.
    8181 */
    8282#define PACKET_SUFFIX(packet, type) \
     
    9292 * @param[in] suffix    The type of the suffix to be removed from the end of
    9393 *                      the packet content.
    94  * @returns             EOK on success.
    95  * @returns             EINVAL if the packet is not valid.
    96  * @returns             ENOMEM if there is not enough memory left.
     94 * @return              EOK on success.
     95 * @return              EINVAL if the packet is not valid.
     96 * @return              ENOMEM if there is not enough memory left.
    9797 */
    9898#define PACKET_TRIM(packet, prefix, suffix) \
  • uspace/lib/net/include/tl_local.h

    rcc3c2a1c r1bfd3d3  
    4545 * @param[in] client_connection The client connection processing function. The
    4646 *                      module skeleton propagates its own one.
    47  * @returns             EOK on successful module termination.
    48  * @returns             Other error codes as defined for the module initialize
     47 * @return              EOK on successful module termination.
     48 * @return              Other error codes as defined for the module initialize
    4949 *                      function.
    50  * @returns             Other error codes as defined for the REGISTER_ME() macro
     50 * @return              Other error codes as defined for the REGISTER_ME() macro
    5151 *                      function.
    5252 */
     
    6262 * @param[out] answer_count The last parameter for the actual answer in the
    6363 *                      answer parameter.
    64  * @returns             EOK on success.
    65  * @returns             Other error codes as defined for the module's message
     64 * @return              EOK on success.
     65 * @return              Other error codes as defined for the module's message
    6666 *                      standalone function.
    6767 */
  • uspace/lib/net/tl/icmp_client.c

    rcc3c2a1c r1bfd3d3  
    5757 * @param[out] pointer  The ICMP header pointer.
    5858 * @param[out] mtu      The ICMP header MTU.
    59  * @returns             The ICMP header length.
    60  * @returns             Zero if the packet contains no data.
     59 * @return              The ICMP header length.
     60 * @return              Zero if the packet contains no data.
    6161 */
    6262int
     
    9292 *
    9393 * @param[in] packet    The packet.
    94  * @returns             The ICMP header length in bytes.
     94 * @return              The ICMP header length in bytes.
    9595 */
    9696size_t icmp_client_header_length(packet_t packet)
  • uspace/lib/net/tl/icmp_remote.c

    rcc3c2a1c r1bfd3d3  
    5757 * @param[in] mtu       The error MTU value.
    5858 * @param[in] packet    The original packet.
    59  * @returns             EOK on success.
    60  * @returns             EPERM if the ICMP error notifications are disabled.
    61  * @returns             ENOMEM if there is not enough memory left.
     59 * @return              EOK on success.
     60 * @return              EPERM if the ICMP error notifications are disabled.
     61 * @return              ENOMEM if there is not enough memory left.
    6262 */
    6363int
     
    7878 * @param[in] icmp_phone The ICMP module phone used for (semi)remote calls.
    7979 * @param[in] packet    The original packet.
    80  * @returns             EOK on success.
    81  * @returns             EPERM if the ICMP error notifications are disabled.
    82  * @returns             ENOMEM if there is not enough memory left.
     80 * @return              EOK on success.
     81 * @return              EPERM if the ICMP error notifications are disabled.
     82 * @return              ENOMEM if there is not enough memory left.
    8383 */
    8484int icmp_source_quench_msg(int icmp_phone, packet_t packet)
     
    9898 * @param[in] code      The error specific code.
    9999 * @param[in] packet    The original packet.
    100  * @returns             EOK on success.
    101  * @returns             EPERM if the ICMP error notifications are disabled.
    102  * @returns             ENOMEM if there is not enough memory left.
     100 * @return              EOK on success.
     101 * @return              EPERM if the ICMP error notifications are disabled.
     102 * @return              ENOMEM if there is not enough memory left.
    103103 */
    104104int icmp_time_exceeded_msg(int icmp_phone, icmp_code_t code, packet_t packet)
     
    119119 * @param[in] pointer   The problematic parameter offset.
    120120 * @param[in] packet    The original packet.
    121  * @returns             EOK on success.
    122  * @returns             EPERM if the ICMP error notifications are disabled.
    123  * @returns             ENOMEM if there is not enough memory left.
     121 * @return              EOK on success.
     122 * @return              EPERM if the ICMP error notifications are disabled.
     123 * @return              ENOMEM if there is not enough memory left.
    124124 */
    125125int icmp_parameter_problem_msg(int icmp_phone, icmp_code_t code,
  • uspace/lib/net/tl/socket_core.c

    rcc3c2a1c r1bfd3d3  
    156156 * @param[in] key       The socket key identifier.
    157157 * @param[in] key_length The socket key length.
    158  * @returns             EOK on success.
    159  * @returns             ENOMEM if there is not enough memory left.
     158 * @return              EOK on success.
     159 * @return              ENOMEM if there is not enough memory left.
    160160 */
    161161static int
     
    194194 * @param[in] socket    The socket to be added.
    195195 * @param[in] port      The port number to be bound to.
    196  * @returns             EOK on success.
    197  * @returns             ENOMEM if there is not enough memory left.
    198  * @returns             Other error codes as defined for the
     196 * @return              EOK on success.
     197 * @return              ENOMEM if there is not enough memory left.
     198 * @return              Other error codes as defined for the
    199199 *                       socket_ports_add() function.
    200200 */
     
    248248 * @param[in] free_ports_end The maximum free port.
    249249 * @param[in] last_used_port The last used free port.
    250  * @returns             EOK on success.
    251  * @returns             ENOTSOCK if the socket was not found.
    252  * @returns             EAFNOSUPPORT if the address family is not supported.
    253  * @returns             EADDRINUSE if the port is already in use.
    254  * @returns             Other error codes as defined for the
     250 * @return              EOK on success.
     251 * @return              ENOTSOCK if the socket was not found.
     252 * @return              EAFNOSUPPORT if the address family is not supported.
     253 * @return              EADDRINUSE if the port is already in use.
     254 * @return              Other error codes as defined for the
    255255 *                      socket_bind_free_port() function.
    256  * @returns             Other error codes as defined for the
     256 * @return              Other error codes as defined for the
    257257 *                      socket_bind_insert() function.
    258258 */
     
    322322 * @param[in] free_ports_end The maximum free port.
    323323 * @param[in] last_used_port The last used free port.
    324  * @returns             EOK on success.
    325  * @returns             ENOTCONN if no free port was found.
    326  * @returns             Other error codes as defined for the
     324 * @return              EOK on success.
     325 * @return              ENOTCONN if no free port was found.
     326 * @return              Other error codes as defined for the
    327327 *                      socket_bind_insert() function.
    328328 */
     
    367367 *                      requested. A negative identifier is requested if set to
    368368 *                      false.
    369  * @returns             The new socket identifier.
    370  * @returns             ELIMIT if there is no socket identifier available.
     369 * @return              The new socket identifier.
     370 * @return              ELIMIT if there is no socket identifier available.
    371371 */
    372372static int socket_generate_new_id(socket_cores_t *local_sockets, int positive)
     
    410410 *                      chosen if set to zero or negative. A negative identifier
    411411 *                      is chosen if set to negative.
    412  * @returns             EOK on success.
    413  * @returns             EINVAL if the socket_id parameter is NULL.
    414  * @returns             ENOMEM if there is not enough memory left.
     412 * @return              EOK on success.
     413 * @return              EINVAL if the socket_id parameter is NULL.
     414 * @return              ENOMEM if there is not enough memory left.
    415415 */
    416416int
     
    482482 * @param[in,out] global_sockets The global sockets to be updated.
    483483 * @param[in] socket_release The client release callback function.
    484  * @returns             EOK on success.
    485  * @returns             ENOTSOCK if the socket is not found.
     484 * @return              EOK on success.
     485 * @return              ENOTSOCK if the socket is not found.
    486486 */
    487487int
     
    516516 * @param[in] packet    The packet to be transfered.
    517517 * @param[out] length   The total data length.
    518  * @returns             EOK on success.
    519  * @returns             EBADMEM if the length parameter is NULL.
    520  * @returns             ENOMEM if there is not enough memory left.
    521  * @returns             Other error codes as defined for the data_reply()
     518 * @return              EOK on success.
     519 * @return              EBADMEM if the length parameter is NULL.
     520 * @return              ENOMEM if there is not enough memory left.
     521 * @return              Other error codes as defined for the data_reply()
    522522 *                      function.
    523523 */
     
    598598 * @param[in] key       The socket key identifier.
    599599 * @param[in] key_length The socket key length.
    600  * @returns             The found socket.
    601  * @returns             NULL if no socket was found.
     600 * @return              The found socket.
     601 * @return              NULL if no socket was found.
    602602 */
    603603socket_core_t *
     
    673673 * @param[in] key       The socket key identifier.
    674674 * @param[in] key_length The socket key length.
    675  * @returns             EOK on success.
    676  * @returns             ENOENT if the port is not already used.
    677  * @returns             Other error codes as defined for the
     675 * @return              EOK on success.
     676 * @return              ENOENT if the port is not already used.
     677 * @return              Other error codes as defined for the
    678678 *                      socket_port_add_core() function.
    679679 */
  • uspace/lib/net/tl/tl_common.c

    rcc3c2a1c r1bfd3d3  
    6464 * @param[in] addrlen   The address length.
    6565 * @param[out] port     The set port.
    66  * @returns             EOK on success.
    67  * @returns             EINVAL if the address length does not match the address
     66 * @return              EOK on success.
     67 * @return              EINVAL if the address length does not match the address
    6868 *                      family.
    69  * @returns             EAFNOSUPPORT if the address family is not supported.
     69 * @return              EAFNOSUPPORT if the address family is not supported.
    7070 */
    7171int
     
    158158 * @param[in] device_id The device identifier.
    159159 * @param[in] content   The new maximum content size.
    160  * @returns             EOK on success.
     160 * @return              EOK on success.
    161161 * @return              ENOENT if the packet dimension is not cached.
    162162 */
     
    196196 * @param[in] addrlen   The address length.
    197197 * @param[in] port      The port to be set.
    198  * @returns             EOK on success.
    199  * @returns             EINVAL if the address length does not match the address
     198 * @return              EOK on success.
     199 * @return              EINVAL if the address length does not match the address
    200200 *                      family.
    201  * @returns             EAFNOSUPPORT if the address family is not supported.
     201 * @return              EAFNOSUPPORT if the address family is not supported.
    202202 */
    203203int tl_set_address_port(struct sockaddr * addr, int addrlen, uint16_t port)
     
    244244 * @param[in] error     The packet error reporting service. Prefixes the
    245245 *                      received packet.
    246  * @returns             EOK on success.
    247  * @returns             ENOENT if no packet may be sent.
     246 * @return              EOK on success.
     247 * @return              ENOENT if no packet may be sent.
    248248 */
    249249int
     
    280280 * @param[in] addr      The destination address.
    281281 * @param[in] addrlen   The address length.
    282  * @returns             Number of bytes received.
    283  * @returns             EINVAL if the client does not send data.
    284  * @returns             ENOMEM if there is not enough memory left.
    285  * @returns             Other error codes as defined for the
     282 * @return              Number of bytes received.
     283 * @return              EINVAL if the client does not send data.
     284 * @return              ENOMEM if there is not enough memory left.
     285 * @return              Other error codes as defined for the
    286286 *                      async_data_read_finalize() function.
    287287 */
  • uspace/lib/packet/generic/packet_server.c

    rcc3c2a1c r1bfd3d3  
    154154 * @param[in] max_content The maximal content length in bytes.
    155155 * @param[in] max_suffix The maximal suffix length in bytes.
    156  * @returns             The packet of dimensions at least as given.
    157  * @returns             NULL if there is not enough memory left.
     156 * @return              The packet of dimensions at least as given.
     157 * @return              NULL if there is not enough memory left.
    158158 */
    159159static packet_t
     
    278278 *
    279279 * @param[in] packet_id The first packet identifier.
    280  * @returns             EOK on success.
    281  * @returns             ENOENT if there is no such packet.
     280 * @return              EOK on success.
     281 * @return              ENOENT if there is no such packet.
    282282 */
    283283static int packet_release_wrapper(packet_id_t packet_id)
     
    303303/** Shares the packet memory block.
    304304 * @param[in] packet    The packet to be shared.
    305  * @returns             EOK on success.
    306  * @returns             EINVAL if the packet is not valid.
    307  * @returns             EINVAL if the calling module does not accept the memory.
    308  * @returns             ENOMEM if the desired and actual sizes differ.
    309  * @returns             Other error codes as defined for the
     305 * @return              EOK on success.
     306 * @return              EINVAL if the packet is not valid.
     307 * @return              EINVAL if the calling module does not accept the memory.
     308 * @return              ENOMEM if the desired and actual sizes differ.
     309 * @return              Other error codes as defined for the
    310310 *                      async_share_in_finalize() function.
    311311 */
     
    339339 * @param[out] answer_count The last parameter for the actual answer in the
    340340 *                      answer parameter.
    341  * @returns             EOK on success.
    342  * @returns             ENOMEM if there is not enough memory left.
    343  * @returns             ENOENT if there is no such packet as in the packet
     341 * @return              EOK on success.
     342 * @return              ENOMEM if there is not enough memory left.
     343 * @return              ENOENT if there is no such packet as in the packet
    344344 *                      message parameter.
    345  * @returns             ENOTSUP if the message is not known.
    346  * @returns             Other error codes as defined for the
     345 * @return              ENOTSUP if the message is not known.
     346 * @return              Other error codes as defined for the
    347347 *                      packet_release_wrapper() function.
    348348 */
Note: See TracChangeset for help on using the changeset viewer.