Changeset 1bfd3d3 in mainline for uspace/lib/c/generic/net


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/c/generic/net
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • 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 */
Note: See TracChangeset for help on using the changeset viewer.