Changeset d3cdb7f0 in mainline for uspace/lib/net/il/ip_remote.c


Ignore:
Timestamp:
2010-10-30T17:21:45Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
768ea9e
Parents:
e8199d77
Message:

libnet ip nits.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/net/il/ip_remote.c

    re8199d77 rd3cdb7f0  
    5757 * The target network is routed using this device.
    5858 *
    59  * @param[in] ip_phone  The IP module phone used for (semi)remote calls.
    60  * @param[in] device_id The device identifier.
    61  * @param[in] address   The target network address.
    62  * @param[in] netmask   The target network mask.
    63  * @param[in] gateway   The target network gateway. Not used if zero.
    64  *
     59 * @param[in] ip_phone  The IP module phone used for (semi)remote calls.
     60 * @param[in] device_id The device identifier.
     61 * @param[in] address   The target network address.
     62 * @param[in] netmask   The target network mask.
     63 * @param[in] gateway   The target network gateway. Not used if zero.
    6564 */
    6665int ip_add_route_req_remote(int ip_phone, device_id_t device_id,
     
    106105 * If the device uses ARP registers also the new ARP device.
    107106 *
    108  * @param[in] ip_phone  The IP module phone used for (semi)remote calls.
    109  * @param[in] device_id The new device identifier.
    110  * @param[in] netif     The underlying device network interface layer service.
    111  *
    112  * @return EOK on success.
    113  * @return ENOMEM if there is not enough memory left.
    114  * @return EINVAL if the device configuration is invalid.
    115  * @return ENOTSUP if the device uses IPv6.
    116  * @return ENOTSUP if the device uses DHCP.
    117  * @return Other error codes as defined for the net_get_device_conf_req()
    118  *         function.
    119  * @return Other error codes as defined for the arp_device_req() function.
    120  *
     107 * @param[in] ip_phone  The IP module phone used for (semi)remote calls.
     108 * @param[in] device_id The new device identifier.
     109 * @param[in] netif     The underlying device network interface layer service.
     110 * @return              EOK on success.
     111 * @return              ENOMEM if there is not enough memory left.
     112 * @return              EINVAL if the device configuration is invalid.
     113 * @return              ENOTSUP if the device uses IPv6.
     114 * @return              ENOTSUP if the device uses DHCP.
     115 * @return              Other error codes as defined for the
     116 *                      net_get_device_conf_req() function.
     117 * @return              Other error codes as defined for the arp_device_req()
     118 *                      function.
    121119 */
    122120int ip_device_req_remote(int ip_phone, device_id_t device_id,
     
    130128 * destination address.
    131129 *
    132  * @param[in]  ip_phone    The IP module phone used for (semi)remote calls.
    133  * @param[in]  protocol    The transport protocol.
    134  * @param[in]  destination The destination address.
    135  * @param[in]  addrlen     The destination address length.
    136  * @param[out] device_id   The device identifier.
    137  * @param[out] header      The constructed IP pseudo header.
    138  * @param[out] headerlen   The IP pseudo header length.
     130 * @param[in] ip_phone  The IP module phone used for (semi)remote calls.
     131 * @param[in] protocol  The transport protocol.
     132 * @param[in] destination The destination address.
     133 * @param[in] addrlen   The destination address length.
     134 * @param[out] device_id The device identifier.
     135 * @param[out] header   The constructed IP pseudo header.
     136 * @param[out] headerlen The IP pseudo header length.
    139137 *
    140138 */
     
    143141    device_id_t *device_id, void **header, size_t *headerlen)
    144142{
    145         if ((!destination) || (addrlen == 0))
     143        if (!destination || (addrlen == 0))
    146144                return EINVAL;
    147145       
    148         if ((!device_id) || (!header) || (!headerlen))
     146        if (!device_id || !header || !headerlen)
    149147                return EBADMEM;
    150148       
     
    169167        async_wait_for(message_id, &result);
    170168       
    171         if ((result != EOK) && (*header))
     169        if ((result != EOK) && *header)
    172170                free(*header);
    173171        else
     
    179177/** Return the device packet dimension for sending.
    180178 *
    181  * @param[in]  ip_phone         The IP module phone used for (semi)remote calls.
    182  * @param[in]  device_id        The device identifier.
     179 * @param[in] ip_phone  The IP module phone used for (semi)remote calls.
     180 * @param[in] device_id The device identifier.
    183181 * @param[out] packet_dimension The packet dimension.
    184  *
    185  * @return EOK on success.
    186  * @return ENOENT if there is no such device.
    187  * @return Other error codes as defined for the
    188  *         generic_packet_size_req_remote() function.
    189  *
     182 * @return              EOK on success.
     183 * @return              ENOENT if there is no such device.
     184 * @return              Other error codes as defined for the
     185 *                      generic_packet_size_req_remote() function.
    190186 */
    191187int ip_packet_size_req_remote(int ip_phone, device_id_t device_id,
     
    198194/** Notify the IP module about the received error notification packet.
    199195 *
    200  * @param[in] ip_phone  The IP module phone used for (semi)remote calls.
    201  * @param[in] device_id The device identifier.
    202  * @param[in] packet    The received packet or the received packet queue.
    203  * @param[in] target    The target internetwork module service to be
    204  *                      delivered to.
    205  * @param[in] error     The packet error reporting service. Prefixes the
    206  *                      received packet.
    207  *
    208  * @return EOK on success.
    209  *
     196 * @param[in] ip_phone  The IP module phone used for (semi)remote calls.
     197 * @param[in] device_id The device identifier.
     198 * @param[in] packet    The received packet or the received packet queue.
     199 * @param[in] target    The target internetwork module service to be
     200 *                      delivered to.
     201 * @param[in] error     The packet error reporting service. Prefixes the
     202 *                      received packet.
     203 * @return              EOK on success.
    210204 */
    211205int ip_received_error_msg_remote(int ip_phone, device_id_t device_id,
     
    220214 * The packets may get fragmented if needed.
    221215 *
    222  * @param[in] ip_phone  The IP module phone used for (semi)remote calls.
    223  * @param[in] device_id The device identifier.
    224  * @param[in] packet    The packet fragments as a packet queue. All the
    225  *                      packets have to have the same destination address.
    226  * @param[in] sender    The sending module service.
    227  * @param[in] error     The packet error reporting service. Prefixes the
    228  *                      received packet.
    229  *
    230  * @return EOK on success.
    231  * @return Other error codes as defined for the generic_send_msg() function.
    232  *
     216 * @param[in] ip_phone  The IP module phone used for (semi)remote calls.
     217 * @param[in] device_id The device identifier.
     218 * @param[in] packet    The packet fragments as a packet queue. All the
     219 *                      packets have to have the same destination address.
     220 * @param[in] sender    The sending module service.
     221 * @param[in] error     The packet error reporting service. Prefixes the
     222 *                      received packet.
     223 * @return              EOK on success.
     224 * @return              Other error codes as defined for the generic_send_msg()
     225 *                      function.
    233226 */
    234227int ip_send_msg_remote(int ip_phone, device_id_t device_id, packet_t packet,
     
    243236 * This gateway is used if no other route is found.
    244237 *
    245  * @param[in] ip_phone  The IP module phone used for (semi)remote calls.
    246  * @param[in] device_id The device identifier.
    247  * @param[in] gateway   The default gateway.
    248  *
     238 * @param[in] ip_phone  The IP module phone used for (semi)remote calls.
     239 * @param[in] device_id The device identifier.
     240 * @param[in] gateway   The default gateway.
    249241 */
    250242int ip_set_gateway_req_remote(int ip_phone, device_id_t device_id,
Note: See TracChangeset for help on using the changeset viewer.