Changeset a9c6b966 in mainline for uspace/srv


Ignore:
Timestamp:
2010-11-19T22:04:12Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0b4a67a, fdbc3ff
Parents:
a7811f17 (diff), 1bfd3d3 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge netstart removal and doxytag cleanup.

Location:
uspace/srv
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hw/netif/dp8390/dp8390.c

    ra7811f17 ra9c6b966  
    6262 *  @param[in] dep The network interface structure.
    6363 *  @param[in] packet The outgoing packet.
    64  *  @returns EOK on success.
    65  *  @returns EINVAL
     64 *  @return EOK on success.
     65 *  @return EINVAL
    6666 */
    6767int queue_packet(dpeth_t * dep, packet_t packet);
  • uspace/srv/net/il/arp/arp.c

    ra7811f17 ra9c6b966  
    171171 * @param[in] service   The protocol module service.
    172172 * @param[in] address   The actual protocol device address.
    173  * @returns             EOK on success.
    174  * @returns             ENOMEM if there is not enough memory left.
     173 * @return              EOK on success.
     174 * @return              ENOMEM if there is not enough memory left.
    175175 */
    176176static int arp_proto_create(arp_proto_t **proto, services_t service,
     
    205205 * @param[in] protocol  The protocol service.
    206206 * @param[in] address   The actual device protocol address.
    207  * @returns             EOK on success.
    208  * @returns             EEXIST if another device with the same device identifier
     207 * @return              EOK on success.
     208 * @return              EEXIST if another device with the same device identifier
    209209 *                      and different driver service exists.
    210  * @returns             ENOMEM if there is not enough memory left.
    211  * @returns             Other error codes as defined for the
     210 * @return              ENOMEM if there is not enough memory left.
     211 * @return              Other error codes as defined for the
    212212 *                      measured_strings_return() function.
    213213 */
     
    356356 *  @param[in] client_connection The client connection processing function.
    357357 *                      The module skeleton propagates its own one.
    358  *  @returns            EOK on success.
    359  *  @returns            ENOMEM if there is not enough memory left.
     358 *  @return             EOK on success.
     359 *  @return             ENOMEM if there is not enough memory left.
    360360 */
    361361int arp_initialize(async_client_conn_t client_connection)
     
    376376 * @param[in] device_id The device identifier.
    377377 * @param[in] mtu       The new mtu value.
    378  * @returns             ENOENT if device is not found.
    379  * @returns             EOK on success.
     378 * @return              ENOENT if device is not found.
     379 * @return              EOK on success.
    380380 */
    381381static int arp_mtu_changed_message(device_id_t device_id, size_t mtu)
     
    404404 * @param[in] device_id The source device identifier.
    405405 * @param[in,out] packet The received packet.
    406  * @returns             EOK on success and the packet is no longer needed.
    407  * @returns             One on success and the packet has been reused.
    408  * @returns             EINVAL if the packet is too small to carry an ARP
     406 * @return              EOK on success and the packet is no longer needed.
     407 * @return              One on success and the packet has been reused.
     408 * @return              EINVAL if the packet is too small to carry an ARP
    409409 *                      packet.
    410  * @returns             EINVAL if the received address lengths differs from
     410 * @return              EINVAL if the received address lengths differs from
    411411 *                      the registered values.
    412  * @returns             ENOENT if the device is not found in the cache.
    413  * @returns             ENOENT if the protocol for the device is not found in
     412 * @return              ENOENT if the device is not found in the cache.
     413 * @return              ENOENT if the protocol for the device is not found in
    414414 *                      the cache.
    415  * @returns             ENOMEM if there is not enough memory left.
     415 * @return              ENOMEM if there is not enough memory left.
    416416 */
    417417static int arp_receive_message(device_id_t device_id, packet_t packet)
     
    516516 * @param[in] protocol  The protocol service.
    517517 * @param[in] target    The target protocol address.
    518  * @returns             The hardware address of the target.
    519  * @returns             NULL if the target parameter is NULL.
    520  * @returns             NULL if the device is not found.
    521  * @returns             NULL if the device packet is too small to send a
     518 * @return              The hardware address of the target.
     519 * @return              NULL if the target parameter is NULL.
     520 * @return              NULL if the device is not found.
     521 * @return              NULL if the device packet is too small to send a
    522522 *                      request.
    523  * @returns             NULL if the hardware address is not found in the cache.
     523 * @return              NULL if the hardware address is not found in the cache.
    524524 */
    525525static measured_string_t *
     
    602602 * @param[out] answer_count The last parameter for the actual answer in the
    603603 *                      answer parameter.
    604  * @returns             EOK on success.
    605  * @returns             ENOTSUP if the message is not known.
     604 * @return              EOK on success.
     605 * @return              ENOTSUP if the message is not known.
    606606 *
    607607 * @see arp_interface.h
     
    747747/** Starts the module.
    748748 *
    749  * @returns             EOK on success.
    750  * @returns             Other error codes as defined for each specific module
     749 * @return              EOK on success.
     750 * @return              Other error codes as defined for each specific module
    751751 *                      start function.
    752752 */
  • uspace/srv/net/il/ip/ip.c

    ra7811f17 ra9c6b966  
    139139 * Searches the registered protocols.
    140140 *
    141  * @returns             The found ICMP phone.
    142  * @returns             ENOENT if the ICMP is not registered.
     141 * @return              The found ICMP phone.
     142 * @return              ENOENT if the ICMP is not registered.
    143143 */
    144144static int ip_get_icmp_phone(void)
     
    160160 * @param[in] packet    The packet or the packet queue to be reported as faulty.
    161161 * @param[in] header    The first packet IP header. May be NULL.
    162  * @returns             EOK on success.
    163  * @returns             EINVAL if there are no data in the packet.
    164  * @returns             EINVAL if the packet is a fragment.
    165  * @returns             ENOMEM if the packet is too short to contain the IP
     162 * @return              EOK on success.
     163 * @return              EINVAL if there are no data in the packet.
     164 * @return              EINVAL if the packet is a fragment.
     165 * @return              ENOMEM if the packet is too short to contain the IP
    166166 *                      header.
    167  * @returns             EAFNOSUPPORT if the address family is not supported.
    168  * @returns             EPERM if the protocol is not allowed to send ICMP
     167 * @return              EAFNOSUPPORT if the address family is not supported.
     168 * @return              EPERM if the protocol is not allowed to send ICMP
    169169 *                      notifications. The ICMP protocol itself.
    170  * @returns             Other error codes as defined for the packet_set_addr().
     170 * @return              Other error codes as defined for the packet_set_addr().
    171171 */
    172172static int ip_prepare_icmp(packet_t packet, ip_header_t *header)
     
    227227 * @param[in] packet    The packet or the packet queue to be reported as faulty.
    228228 * @param[in] header    The first packet IP header. May be NULL.
    229  * @returns             The found ICMP phone.
    230  * @returns             EINVAL if the error parameter is set.
    231  * @returns             EINVAL if the ICMP phone is not found.
    232  * @returns             EINVAL if the ip_prepare_icmp() fails.
     229 * @return              The found ICMP phone.
     230 * @return              EINVAL if the error parameter is set.
     231 * @return              EINVAL if the ICMP phone is not found.
     232 * @return              EINVAL if the ip_prepare_icmp() fails.
    233233 */
    234234static int
     
    248248 * @param[in] client_connection The client connection processing function. The
    249249 *                      module skeleton propagates its own one.
    250  * @returns             EOK on success.
    251  * @returns             ENOMEM if there is not enough memory left.
     250 * @return              EOK on success.
     251 * @return              ENOMEM if there is not enough memory left.
    252252 */
    253253int ip_initialize(async_client_conn_t client_connection)
     
    293293 *
    294294 * @param[in,out] ip_netif Network interface specific data.
    295  * @returns             EOK on success.
    296  * @returns             ENOTSUP if DHCP is configured.
    297  * @returns             ENOTSUP if IPv6 is configured.
    298  * @returns             EINVAL if any of the addresses is invalid.
    299  * @returns             EINVAL if the used ARP module is not known.
    300  * @returns             ENOMEM if there is not enough memory left.
    301  * @returns             Other error codes as defined for the
     295 * @return              EOK on success.
     296 * @return              ENOTSUP if DHCP is configured.
     297 * @return              ENOTSUP if IPv6 is configured.
     298 * @return              EINVAL if any of the addresses is invalid.
     299 * @return              EINVAL if the used ARP module is not known.
     300 * @return              ENOMEM if there is not enough memory left.
     301 * @return              Other error codes as defined for the
    302302 *                      net_get_device_conf_req() function.
    303  * @returns             Other error codes as defined for the bind_service()
     303 * @return              Other error codes as defined for the bind_service()
    304304 *                      function.
    305  * @returns             Other error codes as defined for the specific
     305 * @return              Other error codes as defined for the specific
    306306 *                      arp_device_req() function.
    307  * @returns             Other error codes as defined for the
     307 * @return              Other error codes as defined for the
    308308 *                      nil_packet_size_req() function.
    309309 */
     
    486486 * @param[in] device_id The device identifier.
    487487 * @param[in] mtu       The new mtu value.
    488  * @returns             EOK on success.
    489  * @returns             ENOENT if device is not found.
     488 * @return              EOK on success.
     489 * @return              ENOENT if device is not found.
    490490 */
    491491static int ip_mtu_changed_message(device_id_t device_id, size_t mtu)
     
    511511 * @param[in] device_id The device identifier.
    512512 * @param[in] state     The new state value.
    513  * @returns             EOK on success.
    514  * @returns             ENOENT if device is not found.
     513 * @return              EOK on success.
     514 * @return              ENOENT if device is not found.
    515515 */
    516516static int ip_device_state_message(device_id_t device_id, device_state_t state)
     
    539539 * @param[in] packet    The packet to be prefixed.
    540540 * @param[in] last      The last header to be copied.
    541  * @returns             The prefixed middle header.
    542  * @returns             NULL on error.
     541 * @return              The prefixed middle header.
     542 * @return              NULL on error.
    543543 */
    544544static ip_header_t *
     
    613613 * @param[in,out] packet The packet to be sent.
    614614 * @param[in] destination The destination hardware address.
    615  * @returns             EOK on success.
    616  * @returns             EINVAL if the packet is too small to contain the IP
     615 * @return              EOK on success.
     616 * @return              EINVAL if the packet is too small to contain the IP
    617617 *                      header.
    618  * @returns             EINVAL if the packet is too long than the IP allows.
    619  * @returns             ENOMEM if there is not enough memory left.
    620  * @returns             Other error codes as defined for the packet_set_addr()
     618 * @return              EINVAL if the packet is too long than the IP allows.
     619 * @return              ENOMEM if there is not enough memory left.
     620 * @return              Other error codes as defined for the packet_set_addr()
    621621 *                      function.
    622622 */
     
    746746 * @param[in] dest      The destiantion address.
    747747 * @param[in] addrlen   The address length.
    748  * @returns             EOK on success.
    749  * @returns             ENOMEM if the target packet is too small.
    750  * @returns             Other error codes as defined for the packet_set_addr()
     748 * @return              EOK on success.
     749 * @return              ENOMEM if the target packet is too small.
     750 * @return              Other error codes as defined for the packet_set_addr()
    751751 *                      function.
    752  * @returns             Other error codes as defined for the pq_insert_after()
     752 * @return              Other error codes as defined for the pq_insert_after()
    753753 *                      function.
    754754 */
     
    799799 * @param[in] suffix    The minimum suffix size.
    800800 * @param[in] addr_len  The minimum address length.
    801  * @returns             EOK on success.
    802  * @returns             EINVAL if the packet_get_addr() function fails.
    803  * @returns             EINVAL if the packet does not contain the IP header.
    804  * @returns             EPERM if the packet needs to be fragmented and the
     801 * @return              EOK on success.
     802 * @return              EINVAL if the packet_get_addr() function fails.
     803 * @return              EINVAL if the packet does not contain the IP header.
     804 * @return              EPERM if the packet needs to be fragmented and the
    805805 *                      fragmentation is not allowed.
    806  * @returns             ENOMEM if there is not enough memory left.
    807  * @returns             ENOMEM if there is no packet available.
    808  * @returns             ENOMEM if the packet is too small to contain the IP
     806 * @return              ENOMEM if there is not enough memory left.
     807 * @return              ENOMEM if there is no packet available.
     808 * @return              ENOMEM if the packet is too small to contain the IP
    809809 *                      header.
    810  * @returns             Other error codes as defined for the packet_trim()
     810 * @return              Other error codes as defined for the packet_trim()
    811811 *                      function.
    812  * @returns             Other error codes as defined for the
     812 * @return              Other error codes as defined for the
    813813 *                      ip_create_middle_header() function.
    814  * @returns             Other error codes as defined for the
     814 * @return              Other error codes as defined for the
    815815 *                      ip_fragment_packet_data() function.
    816816 */
     
    919919 * @param[in] addr_len  The minimum address length.
    920920 * @param[in] error     The error module service.
    921  * @returns             The packet or the packet queue of the allowed length.
    922  * @returns             NULL if there are no packets left.
     921 * @return              The packet or the packet queue of the allowed length.
     922 * @return              NULL if there are no packets left.
    923923 */
    924924static packet_t
     
    986986 * @param[in] dest      The destination address.
    987987 * @param[in] error     The error module service.
    988  * @returns             EOK on success.
    989  * @returns             Other error codes as defined for the arp_translate_req()
     988 * @return              EOK on success.
     989 * @return              Other error codes as defined for the arp_translate_req()
    990990 *                      function.
    991  * @returns             Other error codes as defined for the ip_prepare_packet()
     991 * @return              Other error codes as defined for the ip_prepare_packet()
    992992 *                      function.
    993993 */
     
    10621062 *                      NULL.
    10631063 * @param[in] destination The destination address.
    1064  * @returns             The found route.
    1065  * @returns             NULL if no route was found.
     1064 * @return              The found route.
     1065 * @return              NULL if no route was found.
    10661066 */
    10671067static ip_route_t *
     
    10901090 *
    10911091 * @param[in] destination The destination address.
    1092  * @returns             The found route.
    1093  * @returns             NULL if no route was found.
     1092 * @return              The found route.
     1093 * @return              NULL if no route was found.
    10941094 */
    10951095static ip_route_t *ip_find_route(in_addr_t destination) {
     
    11161116 *
    11171117 * @param[in] netif     The network interface.
    1118  * @returns             The IP address.
    1119  * @returns             NULL if no IP address was found.
     1118 * @return              The IP address.
     1119 * @return              NULL if no IP address was found.
    11201120 */
    11211121static in_addr_t *ip_netif_address(ip_netif_t *netif)
     
    11361136 * @param[in] phone     The transport layer module phone.
    11371137 * @param[in] received_msg The receiving function.
    1138  * @returns             EOK on success.
    1139  * @returns             EINVAL if the protocol parameter and/or the service
     1138 * @return              EOK on success.
     1139 * @return              EINVAL if the protocol parameter and/or the service
    11401140 *                      parameter is zero.
    1141  * @returns             EINVAL if the phone parameter is not a positive number
     1141 * @return              EINVAL if the phone parameter is not a positive number
    11421142 *                      and the tl_receive_msg is NULL.
    1143  * @returns             ENOMEM if there is not enough memory left.
     1143 * @return              ENOMEM if there is not enough memory left.
    11441144 */
    11451145static int
     
    13611361 * @param[out] content  The maximum content size.
    13621362 * @param[out] suffix   The minimum reserved suffix size.
    1363  * @returns             EOK on success.
     1363 * @return              EOK on success.
    13641364 */
    13651365static int
     
    14181418 *
    14191419 * @param[in] header    The packet IP header to be read.
    1420  * @returns             The packet destination address.
     1420 * @return              The packet destination address.
    14211421 */
    14221422static in_addr_t ip_get_destination(ip_header_t *header)
     
    14391439 * @param[in] header    The first packet IP header. May be NULL.
    14401440 * @param[in] error     The packet error service.
    1441  * @returns             EOK on success.
    1442  * @returns             ENOTSUP if the packet is a fragment.
    1443  * @returns             EAFNOSUPPORT if the address family is not supported.
    1444  * @returns             ENOENT if the target protocol is not found.
    1445  * @returns             Other error codes as defined for the packet_set_addr()
     1441 * @return              EOK on success.
     1442 * @return              ENOTSUP if the packet is a fragment.
     1443 * @return              EAFNOSUPPORT if the address family is not supported.
     1444 * @return              ENOENT if the target protocol is not found.
     1445 * @return              Other error codes as defined for the packet_set_addr()
    14461446 *                      function.
    1447  * @returns             Other error codes as defined for the packet_trim()
     1447 * @return              Other error codes as defined for the packet_trim()
    14481448 *                      function.
    1449  * @returns             Other error codes as defined for the protocol specific
     1449 * @return              Other error codes as defined for the protocol specific
    14501450 *                      tl_received_msg() function.
    14511451 */
     
    15441544 * @param[in] device_id The source device identifier.
    15451545 * @param[in] packet    The received packet to be processed.
    1546  * @returns             EOK on success.
    1547  * @returns             EINVAL if the TTL is less than two.
    1548  * @returns             EINVAL if the checksum is invalid.
    1549  * @returns             EAFNOSUPPORT if the address family is not supported.
    1550  * @returns             ENOENT if no route was found.
    1551  * @returns             ENOENT if the packet is for another host and the routing
     1546 * @return              EOK on success.
     1547 * @return              EINVAL if the TTL is less than two.
     1548 * @return              EINVAL if the checksum is invalid.
     1549 * @return              EAFNOSUPPORT if the address family is not supported.
     1550 * @return              ENOENT if no route was found.
     1551 * @return              ENOENT if the packet is for another host and the routing
    15521552 *                      is disabled.
    15531553 */
     
    18491849 * @param[in] device_id The source device identifier.
    18501850 * @param[in,out] packet The received packet.
    1851  * @returns             EOK on success and the packet is no longer needed.
    1852  * @returns             EINVAL if the packet is too small to carry the IP
     1851 * @return              EOK on success and the packet is no longer needed.
     1852 * @return              EINVAL if the packet is too small to carry the IP
    18531853 *                      packet.
    1854  * @returns             EINVAL if the received address lengths differs from the
     1854 * @return              EINVAL if the received address lengths differs from the
    18551855 *                      registered values.
    1856  * @returns             ENOENT if the device is not found in the cache.
    1857  * @returns             ENOENT if the protocol for the device is not found in
     1856 * @return              ENOENT if the device is not found in the cache.
     1857 * @return              ENOENT if the protocol for the device is not found in
    18581858 *                      the cache.
    1859  * @returns             ENOMEM if there is not enough memory left.
     1859 * @return              ENOMEM if there is not enough memory left.
    18601860 */
    18611861static int ip_receive_message(device_id_t device_id, packet_t packet)
     
    18791879 * @param[out] answer_count The last parameter for the actual answer in the
    18801880 *                      answer parameter.
    1881  * @returns             EOK on success.
    1882  * @returns             ENOTSUP if the message is not known.
     1881 * @return              EOK on success.
     1882 * @return              ENOTSUP if the message is not known.
    18831883 *
    18841884 * @see ip_interface.h
     
    20372037/** Starts the module.
    20382038 *
    2039  * @returns EOK on success.
    2040  * @returns Other error codes as defined for each specific module start function.
     2039 * @return EOK on success.
     2040 * @return Other error codes as defined for each specific module start function.
    20412041 */
    20422042int main(int argc, char *argv[])
  • uspace/srv/net/net/net.c

    ra7811f17 ra9c6b966  
    7878DEVICE_MAP_IMPLEMENT(netifs, netif_t);
    7979
     80static int startup(void);
     81
    8082/** Add the configured setting to the configuration map.
    8183 *
     
    8486 * @param[in] value         The setting value.
    8587 *
    86  * @returns EOK on success.
    87  * @returns ENOMEM if there is not enough memory left.
     88 * @return EOK on success.
     89 * @return ENOMEM if there is not enough memory left.
    8890 *
    8991 */
     
    110112/** Generate new system-unique device identifier.
    111113 *
    112  * @returns             The system-unique devic identifier.
     114 * @return              The system-unique devic identifier.
    113115 */
    114116static device_id_t generate_new_device_id(void)
     
    235237 * @param[in,out] netif The network interface structure.
    236238 *
    237  * @returns EOK on success.
    238  * @returns Other error codes as defined for the add_configuration() function.
     239 * @return EOK on success.
     240 * @return Other error codes as defined for the add_configuration() function.
    239241 *
    240242 */
     
    246248/** Read the networking subsystem global configuration.
    247249 *
    248  * @returns EOK on success.
    249  * @returns Other error codes as defined for the add_configuration() function.
     250 * @return EOK on success.
     251 * @return Other error codes as defined for the add_configuration() function.
    250252 *
    251253 */
     
    262264 *                              its own one.
    263265 *
    264  * @returns EOK on success.
    265  * @returns ENOMEM if there is not enough memory left.
     266 * @return EOK on success.
     267 * @return ENOMEM if there is not enough memory left.
    266268 *
    267269 */
     
    313315 *                              its own one.
    314316 *
    315  * @returns EOK on successful module termination.
    316  * @returns Other error codes as defined for the net_initialize() function.
    317  * @returns Other error codes as defined for the REGISTER_ME() macro function.
     317 * @return EOK on successful module termination.
     318 * @return Other error codes as defined for the net_initialize() function.
     319 * @return Other error codes as defined for the REGISTER_ME() macro function.
    318320 *
    319321 */
     
    337339                goto out;
    338340       
     341        rc = startup();
     342        if (rc != EOK)
     343                goto out;
     344       
     345        task_retval(0);
    339346        async_manager();
    340347
     
    353360 * @param[out] data          The found configuration settings data.
    354361 *
    355  * @returns EOK.
     362 * @return EOK.
    356363 *
    357364 */
     
    415422 * @param[in] netif The network interface specific data.
    416423 *
    417  * @returns EOK on success.
    418  * @returns EINVAL if there are some settings missing.
    419  * @returns ENOENT if the internet protocol module is not known.
    420  * @returns Other error codes as defined for the netif_probe_req() function.
    421  * @returns Other error codes as defined for the nil_device_req() function.
    422  * @returns Other error codes as defined for the needed internet layer
    423  *          registering function.
     424 * @return EOK on success.
     425 * @return EINVAL if there are some settings missing.
     426 * @return ENOENT if the internet protocol module is not known.
     427 * @return Other error codes as defined for the netif_probe_req() function.
     428 * @return Other error codes as defined for the nil_device_req() function.
     429 * @return Other error codes as defined for the needed internet layer
     430 *         registering function.
    424431 *
    425432 */
     
    507514/** Read the configuration and start all network interfaces.
    508515 *
    509  * @returns EOK on success.
    510  * @returns EXDEV if there is no available system-unique device identifier.
    511  * @returns EINVAL if any of the network interface names are not configured.
    512  * @returns ENOMEM if there is not enough memory left.
    513  * @returns Other error codes as defined for the read_configuration()
    514  *          function.
    515  * @returns Other error codes as defined for the read_netif_configuration()
    516  *          function.
    517  * @returns Other error codes as defined for the start_device() function.
     516 * @return EOK on success.
     517 * @return EXDEV if there is no available system-unique device identifier.
     518 * @return EINVAL if any of the network interface names are not configured.
     519 * @return ENOMEM if there is not enough memory left.
     520 * @return Other error codes as defined for the read_configuration()
     521 *         function.
     522 * @return Other error codes as defined for the read_netif_configuration()
     523 *         function.
     524 * @return Other error codes as defined for the start_device() function.
    518525 *
    519526 */
     
    610617 *                          in the answer parameter.
    611618 *
    612  * @returns EOK on success.
    613  * @returns ENOTSUP if the message is not known.
     619 * @return EOK on success.
     620 * @return ENOTSUP if the message is not known.
    614621 *
    615622 * @see net_interface.h
  • uspace/srv/net/netif/lo/lo.c

    ra7811f17 ra9c6b966  
    103103 * @param[in] device    The device structure.
    104104 * @param[in] state     The new device state.
    105  * @returns             The new state if changed.
    106  * @returns             EOK otherwise.
     105 * @return              The new state if changed.
     106 * @return              EOK otherwise.
    107107 */
    108108static int change_state_message(netif_device_t *device, device_state_t state)
     
    124124 * @param[in] device_id The new devce identifier.
    125125 * @param[out] device   The device structure.
    126  * @returns             EOK on success.
    127  * @returns             EXDEV if one loopback network interface already exists.
    128  * @returns             ENOMEM if there is not enough memory left.
     126 * @return              EOK on success.
     127 * @return              EXDEV if one loopback network interface already exists.
     128 * @return              ENOMEM if there is not enough memory left.
    129129 */
    130130static int create(device_id_t device_id, netif_device_t **device)
  • uspace/srv/net/nil/eth/eth.c

    ra7811f17 ra9c6b966  
    268268 * @param[in] service   The device driver service.
    269269 * @param[in] mtu       The device maximum transmission unit.
    270  * @returns             EOK on success.
    271  * @returns             EEXIST if the device with the different service exists.
    272  * @returns             ENOMEM if there is not enough memory left.
    273  * @returns             Other error codes as defined for the
     270 * @return              EOK on success.
     271 * @return              EEXIST if the device with the different service exists.
     272 * @return              ENOMEM if there is not enough memory left.
     273 * @return              Other error codes as defined for the
    274274 *                      net_get_device_conf_req() function.
    275  * @returns             Other error codes as defined for the
     275 * @return              Other error codes as defined for the
    276276 *                      netif_bind_service() function.
    277  * @returns             Other error codes as defined for the
     277 * @return              Other error codes as defined for the
    278278 *                      netif_get_addr_req() function.
    279279 */
     
    422422 * @param[in] flags     The device flags.
    423423 * @param[in] packet    The packet.
    424  * @returns             The target registered module.
    425  * @returns             NULL if the packet is not long enough.
    426  * @returns             NULL if the packet is too long.
    427  * @returns             NULL if the raw ethernet protocol is used.
    428  * @returns             NULL if the dummy device FCS checksum is invalid.
    429  * @returns             NULL if the packet address length is not big enough.
     424 * @return              The target registered module.
     425 * @return              NULL if the packet is not long enough.
     426 * @return              NULL if the packet is too long.
     427 * @return              NULL if the raw ethernet protocol is used.
     428 * @return              NULL if the dummy device FCS checksum is invalid.
     429 * @return              NULL if the packet address length is not big enough.
    430430 */
    431431static eth_proto_t *eth_process_packet(int flags, packet_t packet)
     
    552552 * @param[out] content  The maximum content size.
    553553 * @param[out] suffix   The minimum reserved suffix size.
    554  * @returns             EOK on success.
    555  * @returns             EBADMEM if either one of the parameters is NULL.
    556  * @returns             ENOENT if there is no such device.
     554 * @return              EOK on success.
     555 * @return              EBADMEM if either one of the parameters is NULL.
     556 * @return              ENOENT if there is no such device.
    557557 */
    558558static int eth_packet_space_message(device_id_t device_id, size_t *addr_len,
     
    586586 * @param[in] type      Type of the desired address.
    587587 * @param[out] address  The device hardware address.
    588  * @returns             EOK on success.
    589  * @returns             EBADMEM if the address parameter is NULL.
    590  * @returns             ENOENT if there no such device.
     588 * @return              EOK on success.
     589 * @return              EBADMEM if the address parameter is NULL.
     590 * @return              ENOENT if there no such device.
    591591 */
    592592static int eth_addr_message(device_id_t device_id, eth_addr_type_t type,
     
    620620 * @param[in] service   The module service.
    621621 * @param[in] phone     The service phone.
    622  * @returns             EOK on success.
    623  * @returns             ENOENT if the service is not known.
    624  * @returns             ENOMEM if there is not enough memory left.
     622 * @return              EOK on success.
     623 * @return              ENOENT if the service is not known.
     624 * @return              ENOMEM if there is not enough memory left.
    625625 */
    626626static int eth_register_message(services_t service, int phone)
     
    673673 * @param[in] ethertype The ethernet protocol type.
    674674 * @param[in] mtu       The device maximum transmission unit.
    675  * @returns             EOK on success.
    676  * @returns             EINVAL if the packet addresses length is not long
     675 * @return              EOK on success.
     676 * @return              EINVAL if the packet addresses length is not long
    677677 *                      enough.
    678  * @returns             EINVAL if the packet is bigger than the device MTU.
    679  * @returns             ENOMEM if there is not enough memory in the packet.
     678 * @return              EINVAL if the packet is bigger than the device MTU.
     679 * @return              ENOMEM if there is not enough memory in the packet.
    680680 */
    681681static int
     
    783783 * @param[in] packet    The packet queue.
    784784 * @param[in] sender    The sending module service.
    785  * @returns             EOK on success.
    786  * @returns             ENOENT if there no such device.
    787  * @returns             EINVAL if the service parameter is not known.
     785 * @return              EOK on success.
     786 * @return              ENOENT if there no such device.
     787 * @return              EINVAL if the service parameter is not known.
    788788 */
    789789static int eth_send_message(device_id_t device_id, packet_t packet,
  • uspace/srv/net/nil/nildummy/nildummy.c

    ra7811f17 ra9c6b966  
    142142 * @param[in] service   The device driver service.
    143143 * @param[in] mtu       The device maximum transmission unit.
    144  * @returns             EOK on success.
    145  * @returns             EEXIST if the device with the different service exists.
    146  * @returns             ENOMEM if there is not enough memory left.
    147  * @returns             Other error codes as defined for the
     144 * @return              EOK on success.
     145 * @return              EEXIST if the device with the different service exists.
     146 * @return              ENOMEM if there is not enough memory left.
     147 * @return              Other error codes as defined for the
    148148 *                      netif_bind_service() function.
    149  * @returns             Other error codes as defined for the
     149 * @return              Other error codes as defined for the
    150150 *                      netif_get_addr_req() function.
    151151 */
  • uspace/srv/net/tl/icmp/icmp.c

    ra7811f17 ra9c6b966  
    100100 * @param[in,out] header The ICMP datagram header.
    101101 * @param[in] length    The total datagram length.
    102  * @returns             The computed checksum.
     102 * @return              The computed checksum.
    103103 */
    104104#define ICMP_CHECKSUM(header, length) \
     
    112112 * @param[in] id        The message identifier.
    113113 * @param[in] sequence  The message sequence number.
    114  * @returns             The computed ICMP reply data key.
     114 * @return              The computed ICMP reply data key.
    115115 */
    116116#define ICMP_GET_REPLY_KEY(id, sequence) \
     
    128128 * @param[in] packet    The packet queue to be released.
    129129 * @param[in] result    The result to be returned.
    130  * @returns             The result parameter.
     130 * @return              The result parameter.
    131131 */
    132132static int icmp_release_and_return(packet_t packet, int result)
     
    152152 * @param[in] dont_fragment The value indicating whether the datagram must not
    153153 *                      be fragmented. Is used as a MTU discovery.
    154  * @returns             EOK on success.
    155  * @returns             EPERM if the error message is not allowed.
     154 * @return              EOK on success.
     155 * @return              EPERM if the error message is not allowed.
    156156 */
    157157static int icmp_send_packet(icmp_type_t type, icmp_code_t code, packet_t packet,
     
    186186 *
    187187 * @param[in,out] packet The original packet.
    188  * @returns The prefixed ICMP header.
    189  * @returns NULL on errors.
     188 * @return The prefixed ICMP header.
     189 * @return NULL on errors.
    190190 */
    191191static icmp_header_t *icmp_prepare_packet(packet_t packet)
     
    234234 * @param[in] addr      The target host address.
    235235 * @param[in] addrlen   The torget host address length.
    236  * @returns             ICMP_ECHO on success.
    237  * @returns             ETIMEOUT if the reply has not arrived before the
     236 * @return              ICMP_ECHO on success.
     237 * @return              ETIMEOUT if the reply has not arrived before the
    238238 *                      timeout.
    239  * @returns             ICMP type of the received error notification.
    240  * @returns             EINVAL if the addrlen parameter is less or equal to
     239 * @return              ICMP type of the received error notification.
     240 * @return              EINVAL if the addrlen parameter is less or equal to
    241241 *                      zero.
    242  * @returns             ENOMEM if there is not enough memory left.
    243  * @returns             EPARTY if there was an internal error.
     242 * @return              ENOMEM if there is not enough memory left.
     243 * @return              EPARTY if there was an internal error.
    244244 */
    245245static int icmp_echo(icmp_param_t id, icmp_param_t sequence, size_t size,
     
    398398 * @param[in] client_connection The client connection processing function. The
    399399 *                      module skeleton propagates its own one.
    400  * @returns             EOK on success.
    401  * @returns             ENOMEM if there is not enough memory left.
     400 * @return              EOK on success.
     401 * @return              ENOMEM if there is not enough memory left.
    402402 */
    403403int icmp_initialize(async_client_conn_t client_connection)
     
    507507 * @param[in] error     The packet error reporting service. Prefixes the
    508508 *                      received packet.
    509  * @returns             EOK on success.
    510  * @returns             EINVAL if the packet is not valid.
    511  * @returns             EINVAL if the stored packet address is not the an_addr_t.
    512  * @returns             EINVAL if the packet does not contain any data.
    513  * @returns             NO_DATA if the packet content is shorter than the user
     509 * @return              EOK on success.
     510 * @return              EINVAL if the packet is not valid.
     511 * @return              EINVAL if the stored packet address is not the an_addr_t.
     512 * @return              EINVAL if the packet does not contain any data.
     513 * @return              NO_DATA if the packet content is shorter than the user
    514514 *                      datagram header.
    515  * @returns             ENOMEM if there is not enough memory left.
    516  * @returns             EADDRNOTAVAIL if the destination socket does not exist.
    517  * @returns             Other error codes as defined for the
     515 * @return              ENOMEM if there is not enough memory left.
     516 * @return              EADDRNOTAVAIL if the destination socket does not exist.
     517 * @return              Other error codes as defined for the
    518518 *                      ip_client_process_packet() function.
    519519 */
     
    654654 * @param[in] error     The packet error reporting service. Prefixes the
    655655 *                      received packet.
    656  * @returns             EOK on success.
    657  * @returns             Other error codes as defined for the
     656 * @return              EOK on success.
     657 * @return              Other error codes as defined for the
    658658 *                      icmp_process_packet() function.
    659659 */
     
    673673 *
    674674 * @param[in] call      The message parameters.
    675  * @returns             EOK on success.
    676  * @returns             ENOTSUP if the message is not known.
    677  * @returns             Other error codes as defined for the packet_translate()
     675 * @return              EOK on success.
     676 * @return              ENOTSUP if the message is not known.
     677 * @return              Other error codes as defined for the packet_translate()
    678678 *                      function.
    679  * @returns             Other error codes as defined for the
     679 * @return              Other error codes as defined for the
    680680 *                      icmp_destination_unreachable_msg_local() function.
    681  * @returns             Other error codes as defined for the
     681 * @return              Other error codes as defined for the
    682682 *                      icmp_source_quench_msg_local() function.
    683  * @returns             Other error codes as defined for the
     683 * @return              Other error codes as defined for the
    684684 *                      icmp_time_exceeded_msg_local() function.
    685  * @returns             Other error codes as defined for the
     685 * @return              Other error codes as defined for the
    686686 *                      icmp_parameter_problem_msg_local() function.
    687687 *
     
    731731 *
    732732 * @param[in,out] echo_data The echo data to be bound.
    733  * @returns             Index of the inserted echo data.
    734  * @returns             EBADMEM if the echo_data parameter is NULL.
    735  * @returns             ENOTCONN if no free identifier have been found.
     733 * @return              Index of the inserted echo data.
     734 * @return              EBADMEM if the echo_data parameter is NULL.
     735 * @return              ENOTCONN if no free identifier have been found.
    736736 */
    737737static int icmp_bind_free_id(icmp_echo_t *echo_data)
     
    778778 * @param[in] callid    The message identifier.
    779779 * @param[in] call      The message parameters.
    780  * @returns EOK.
     780 * @return EOK.
    781781 *
    782782 * @see icmp_interface.h
     
    887887 * @param[out] answer_count The last parameter for the actual answer in the
    888888 *                      answer parameter.
    889  * @returns             EOK on success.
    890  * @returns             ENOTSUP if the message is not known.
     889 * @return              EOK on success.
     890 * @return              ENOTSUP if the message is not known.
    891891 *
    892892 * @see icmp_interface.h
     
    964964/** Starts the module.
    965965 *
    966  * @returns             EOK on success.
    967  * @returns             Other error codes as defined for each specific module
     966 * @return              EOK on success.
     967 * @return              Other error codes as defined for each specific module
    968968 *                      start function.
    969969 */
  • uspace/srv/net/tl/tcp/tcp.c

    ra7811f17 ra9c6b966  
    224224 * @param[in] client_connection The client connection processing function. The
    225225 *                      module skeleton propagates its own one.
    226  * @returns             EOK on success.
    227  * @returns             ENOMEM if there is not enough memory left.
     226 * @return              EOK on success.
     227 * @return              ENOMEM if there is not enough memory left.
    228228 */
    229229int tcp_initialize(async_client_conn_t client_connection)
     
    12221222 * @param[out] answer_count The last parameter for the actual answer in the
    12231223 *                      answer parameter.
    1224  * @returns             EOK on success.
    1225  * @returns             ENOTSUP if the message is not known.
     1224 * @return              EOK on success.
     1225 * @return              ENOTSUP if the message is not known.
    12261226 *
    12271227 * @see tcp_interface.h
     
    24942494/** Starts the module.
    24952495 *
    2496  * @returns             EOK on success.
    2497  * @returns             Other error codes as defined for each specific module
     2496 * @return              EOK on success.
     2497 * @return              Other error codes as defined for each specific module
    24982498 *                      start function.
    24992499 */
  • uspace/srv/net/tl/udp/udp.c

    ra7811f17 ra9c6b966  
    9797 * @param[in] client_connection The client connection processing function. The
    9898 *                      module skeleton propagates its own one.
    99  * @returns             EOK on success.
    100  * @returns             ENOMEM if there is not enough memory left.
     99 * @return              EOK on success.
     100 * @return              ENOMEM if there is not enough memory left.
    101101 */
    102102int udp_initialize(async_client_conn_t client_connection)
     
    205205 * @param[in] error     The packet error reporting service. Prefixes the
    206206 *                      received packet.
    207  * @returns             EOK on success.
    208  * @returns             EINVAL if the packet is not valid.
    209  * @returns             EINVAL if the stored packet address is not the
     207 * @return              EOK on success.
     208 * @return              EINVAL if the packet is not valid.
     209 * @return              EINVAL if the stored packet address is not the
    210210 *                      an_addr_t.
    211  * @returns             EINVAL if the packet does not contain any data.
    212  * @returns             NO_DATA if the packet content is shorter than the user
     211 * @return              EINVAL if the packet does not contain any data.
     212 * @return              NO_DATA if the packet content is shorter than the user
    213213 *                      datagram header.
    214  * @returns             ENOMEM if there is not enough memory left.
    215  * @returns             EADDRNOTAVAIL if the destination socket does not exist.
    216  * @returns             Other error codes as defined for the
     214 * @return              ENOMEM if there is not enough memory left.
     215 * @return              EADDRNOTAVAIL if the destination socket does not exist.
     216 * @return              Other error codes as defined for the
    217217 *                      ip_client_process_packet() function.
    218218 */
     
    409409 * @param[in] error     The packet error reporting service. Prefixes the
    410410 *                      received packet.
    411  * @returns             EOK on success.
    412  * @returns             Other error codes as defined for the
     411 * @return              EOK on success.
     412 * @return              Other error codes as defined for the
    413413 *                      udp_process_packet() function.
    414414 */
     
    439439 * @param[out] data_fragment_size The data fragment size in bytes.
    440440 * @param[in] flags     Various send flags.
    441  * @returns             EOK on success.
    442  * @returns             EAFNOTSUPPORT if the address family is not supported.
    443  * @returns             ENOTSOCK if the socket is not found.
    444  * @returns             EINVAL if the address is invalid.
    445  * @returns             ENOTCONN if the sending socket is not and cannot be
     441 * @return              EOK on success.
     442 * @return              EAFNOTSUPPORT if the address family is not supported.
     443 * @return              ENOTSOCK if the socket is not found.
     444 * @return              EINVAL if the address is invalid.
     445 * @return              ENOTCONN if the sending socket is not and cannot be
    446446 *                      bound.
    447  * @returns             ENOMEM if there is not enough memory left.
    448  * @returns             Other error codes as defined for the
     447 * @return              ENOMEM if there is not enough memory left.
     448 * @return              Other error codes as defined for the
    449449 *                      socket_read_packet_data() function.
    450  * @returns             Other error codes as defined for the
     450 * @return              Other error codes as defined for the
    451451 *                      ip_client_prepare_packet() function.
    452  * @returns             Other error codes as defined for the ip_send_msg()
     452 * @return              Other error codes as defined for the ip_send_msg()
    453453 *                      function.
    454454 */
     
    599599 * @param[in] flags     Various receive flags.
    600600 * @param[out] addrlen  The source address length.
    601  * @returns             The number of bytes received.
    602  * @returns             ENOTSOCK if the socket is not found.
    603  * @returns             NO_DATA if there are no received packets or data.
    604  * @returns             ENOMEM if there is not enough memory left.
    605  * @returns             EINVAL if the received address is not an IP address.
    606  * @returns             Other error codes as defined for the packet_translate()
     601 * @return              The number of bytes received.
     602 * @return              ENOTSOCK if the socket is not found.
     603 * @return              NO_DATA if there are no received packets or data.
     604 * @return              ENOMEM if there is not enough memory left.
     605 * @return              EINVAL if the received address is not an IP address.
     606 * @return              Other error codes as defined for the packet_translate()
    607607 *                      function.
    608  * @returns             Other error codes as defined for the data_reply()
     608 * @return              Other error codes as defined for the data_reply()
    609609 *                      function.
    610610 */
     
    698698 * @param[in] callid    The message identifier.
    699699 * @param[in] call      The message parameters.
    700  * @returns             EOK on success.
     700 * @return              EOK on success.
    701701 *
    702702 * @see socket.h
     
    852852 * @param[out] answer_count The last parameter for the actual answer in the
    853853 *                      answer parameter.
    854  * @returns             EOK on success.
    855  * @returns             ENOTSUP if the message is not known.
     854 * @return              EOK on success.
     855 * @return              ENOTSUP if the message is not known.
    856856 *
    857857 * @see udp_interface.h
     
    924924/** Starts the module.
    925925 *
    926  * @returns             EOK on success.
    927  * @returns             Other error codes as defined for each specific module
     926 * @return              EOK on success.
     927 * @return              Other error codes as defined for each specific module
    928928 *                      start function.
    929929 */
Note: See TracChangeset for help on using the changeset viewer.