Changeset 42a9f27 in mainline


Ignore:
Timestamp:
2010-10-17T20:14:11Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
404dbae
Parents:
4a3b501
Message:

Cleanup netif local and remote interfaces.

Location:
uspace/lib/net
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/net/include/netif_interface.h

    r4a3b501 r42a9f27  
    2727 */
    2828
    29 /** @addtogroup netif
     29/** @addtogroup libnet
    3030 * @{
    3131 */
    3232
    33 #ifndef __NET_NETIF_INTERFACE_H__
    34 #define __NET_NETIF_INTERFACE_H__
     33#ifndef LIBNET_NETIF_INTERFACE_H_
     34#define LIBNET_NETIF_INTERFACE_H_
    3535
    3636#include <netif_remote.h>
  • uspace/lib/net/include/netif_local.h

    r4a3b501 r42a9f27  
    2727 */
    2828
    29 /** @addtogroup netif
     29/** @addtogroup libnet
    3030 * @{
    3131 */
     
    3636 */
    3737
    38 #ifndef __NET_NETIF_LOCAL_H__
    39 #define __NET_NETIF_LOCAL_H__
     38#ifndef NET_NETIF_LOCAL_H_
     39#define NET_NETIF_LOCAL_H_
    4040
    4141#include <async.h>
     
    4343#include <ipc/ipc.h>
    4444#include <ipc/services.h>
    45 #include <err.h>
    4645
    4746#include <adt/measured_strings.h>
     
    4948#include <net/packet.h>
    5049
    51 /** Network interface device specific data.
    52  *
    53  */
     50/** Network interface device specific data. */
    5451typedef struct {
    5552        device_id_t device_id;  /**< Device identifier. */
     
    6764DEVICE_MAP_DECLARE(netif_device_map, netif_device_t);
    6865
    69 /** Network interface module skeleton global data.
    70  *
    71  */
     66/** Network interface module skeleton global data. */
    7267typedef struct {
    7368        int net_phone;                  /**< Networking module phone. */
     
    8176 *
    8277 * This function has to be implemented in user code.
    83  *
    8478 */
    8579extern int netif_initialize(void);
     
    8983 * This has to be implemented in user code.
    9084 *
    91  * @param[in] device_id The device identifier.
    92  * @param[in] irq       The device interrupt number.
    93  * @param[in] io        The device input/output address.
    94  *
    95  * @return EOK on success.
    96  * @return Other error codes as defined for the find_device() function.
    97  * @return Other error codes as defined for the specific module message
    98  *         implementation.
    99  *
     85 * @param[in] device_id The device identifier.
     86 * @param[in] irq       The device interrupt number.
     87 * @param[in] io        The device input/output address.
     88 *
     89 * @return              EOK on success.
     90 * @return              Other error codes as defined for the find_device()
     91 *                      function.
     92 * @return              Other error codes as defined for the specific module
     93 *                      message implementation.
    10094 */
    10195extern int netif_probe_message(device_id_t device_id, int irq, uintptr_t io);
     
    10599 * This has to be implemented in user code.
    106100 *
    107  * @param[in] device_id The device identifier.
    108  * @param[in] packet    The packet queue.
    109  * @param[in] sender    The sending module service.
    110  *
    111  * @return EOK on success.
    112  * @return EFORWARD if the device is not active (in the NETIF_ACTIVE state).
    113  * @return Other error codes as defined for the find_device() function.
    114  * @return Other error codes as defined for the specific module message
    115  *         implementation.
    116  *
     101 * @param[in] device_id The device identifier.
     102 * @param[in] packet    The packet queue.
     103 * @param[in] sender    The sending module service.
     104 *
     105 * @return              EOK on success.
     106 * @return              EFORWARD if the device is not active (in the
     107 *                      NETIF_ACTIVE state).
     108 * @return              Other error codes as defined for the find_device()
     109 *                      function.
     110 * @return              Other error codes as defined for the specific module
     111 *                      message implementation.
    117112 */
    118113extern int netif_send_message(device_id_t device_id, packet_t packet,
     
    123118 * This has to be implemented in user code.
    124119 *
    125  * @param[in] device The device structure.
    126  *
    127  * @return EOK on success.
    128  * @return Other error codes as defined for the find_device() function.
    129  * @return Other error codes as defined for the specific module message
    130  *         implementation.
    131  *
     120 * @param[in] device    The device structure.
     121 *
     122 * @return              EOK on success.
     123 * @return              Other error codes as defined for the find_device()
     124 *                      function.
     125 * @return              Other error codes as defined for the specific module
     126 *                      message implementation.
    132127 */
    133128extern int netif_start_message(netif_device_t *device);
     
    137132 * This has to be implemented in user code.
    138133 *
    139  * @param[in] device The device structure.
    140  *
    141  * @return EOK on success.
    142  * @return Other error codes as defined for the find_device() function.
    143  * @return Other error codes as defined for the specific module message
    144  *         implementation.
    145  *
     134 * @param[in] device    The device structure.
     135 *
     136 * @return              EOK on success.
     137 * @return              Other error codes as defined for the find_device()
     138 *                      function.
     139 * @return              Other error codes as defined for the specific module
     140 *                      message implementation.
    146141 */
    147142extern int netif_stop_message(netif_device_t *device);
     
    151146 * This has to be implemented in user code.
    152147 *
    153  * @param[in]  device_id The device identifier.
    154  * @param[out] address   The device local hardware address.
    155  *
    156  * @return EOK on success.
    157  * @return EBADMEM if the address parameter is NULL.
    158  * @return ENOENT if there no such device.
    159  * @return Other error codes as defined for the find_device() function.
    160  * @return Other error codes as defined for the specific module message
    161  *         implementation.
    162  *
     148 * @param[in] device_id The device identifier.
     149 * @param[out] address  The device local hardware address.
     150 *
     151 * @return              EOK on success.
     152 * @return              EBADMEM if the address parameter is NULL.
     153 * @return              ENOENT if there no such device.
     154 * @return              Other error codes as defined for the find_device()
     155 *                      function.
     156 * @return              Other error codes as defined for the specific module
     157 *                      message implementation.
    163158 */
    164159extern int netif_get_addr_message(device_id_t device_id,
     
    170165 * skeleton. This has to be implemented in user code.
    171166 *
    172  * @param[in]  callid       The message identifier.
    173  * @param[in]  call         The message parameters.
    174  * @param[out] answer       The message answer parameters.
     167 * @param[in] callid    The message identifier.
     168 * @param[in] call      The message parameters.
     169 * @param[out] answer   The message answer parameters.
    175170 * @param[out] answer_count The last parameter for the actual answer in
    176  *                          the answer parameter.
    177  *
    178  * @return EOK on success.
    179  * @return ENOTSUP if the message is not known.
    180  * @return Other error codes as defined for the specific module message
    181  *         implementation.
    182  *
     171 *                      the answer parameter.
     172 *
     173 * @return              EOK on success.
     174 * @return              ENOTSUP if the message is not known.
     175 * @return              Other error codes as defined for the specific module
     176 *                      message implementation.
    183177 */
    184178extern int netif_specific_message(ipc_callid_t callid, ipc_call_t *call,
     
    189183 * This has to be implemented in user code.
    190184 *
    191  * @param[in]  device_id The device identifier.
    192  * @param[out] stats     The device usage statistics.
    193  *
    194  * @return EOK on success.
    195  * @return Other error codes as defined for the find_device() function.
    196  * @return Other error codes as defined for the specific module message
    197  *         implementation.
    198  *
     185 * @param[in] device_id The device identifier.
     186 * @param[out] stats    The device usage statistics.
     187 *
     188 * @return              EOK on success.
     189 * @return              Other error codes as defined for the find_device()
     190 *                      function.
     191 * @return              Other error codes as defined for the specific module
     192 *                      message implementation.
    199193 */
    200194extern int netif_get_device_stats(device_id_t device_id,
  • uspace/lib/net/include/netif_remote.h

    r4a3b501 r42a9f27  
    2727 */
    2828
    29 /** @addtogroup netif
     29/** @addtogroup libnet
    3030 * @{
    3131 */
    3232
    33 #ifndef __NET_NETIF_REMOTE_H__
    34 #define __NET_NETIF_REMOTE_H__
     33#ifndef LIBNET_NETIF_REMOTE_H_
     34#define LIBNET_NETIF_REMOTE_H_
    3535
     36#include <async.h>
    3637#include <ipc/services.h>
    3738#include <adt/measured_strings.h>
     39
    3840#include <net/device.h>
     41#include <net/packet.h>
    3942
    4043extern int netif_get_addr_req_remote(int, device_id_t, measured_string_ref *,
  • uspace/lib/net/netif/netif_local.c

    r4a3b501 r42a9f27  
    2727 */
    2828
    29 /** @addtogroup netif
     29/** @addtogroup libnet
    3030 * @{
    3131 */
     
    5858DEVICE_MAP_IMPLEMENT(netif_device_map, netif_device_t);
    5959
    60 /** Network interface global data.
    61  */
     60/** Network interface global data. */
    6261netif_globals_t netif_globals;
    6362
     
    6564 *
    6665 * @param[in] netif_phone The network interface phone.
    67  * @param[in] device_id   The device identifier.
    68  * @param[in] irq         The device interrupt number.
    69  * @param[in] io          The device input/output address.
    70  *
    71  * @return EOK on success.
    72  * @return Other errro codes as defined for the netif_probe_message().
    73  *
    74  */
    75 int netif_probe_req_local(int netif_phone, device_id_t device_id, int irq, int io)
     66 * @param[in] device_id The device identifier.
     67 * @param[in] irq       The device interrupt number.
     68 * @param[in] io        The device input/output address.
     69 * @return              EOK on success.
     70 * @return              Other error codes as defined for the
     71 *                      netif_probe_message().
     72 */
     73int
     74netif_probe_req_local(int netif_phone, device_id_t device_id, int irq, int io)
    7675{
    7776        fibril_rwlock_write_lock(&netif_globals.lock);
     
    8584 *
    8685 * @param[in] netif_phone The network interface phone.
    87  * @param[in] device_id   The device identifier.
    88  * @param[in] packet      The packet queue.
    89  * @param[in] sender      The sending module service.
    90  *
    91  * @return EOK on success.
    92  * @return Other error codes as defined for the generic_send_msg() function.
    93  *
     86 * @param[in] device_id The device identifier.
     87 * @param[in] packet    The packet queue.
     88 * @param[in] sender    The sending module service.
     89 * @return              EOK on success.
     90 * @return              Other error codes as defined for the generic_send_msg()
     91 *                      function.
    9492 */
    9593int netif_send_msg_local(int netif_phone, device_id_t device_id,
     
    106104 *
    107105 * @param[in] netif_phone The network interface phone.
    108  * @param[in] device_id   The device identifier.
    109  *
    110  * @return EOK on success.
    111  * @return Other error codes as defined for the find_device() function.
    112  * @return Other error codes as defined for the netif_start_message() function.
    113  *
     106 * @param[in] device_id The device identifier.
     107 * @return              EOK on success.
     108 * @return              Other error codes as defined for the find_device()
     109 *                      function.
     110 * @return              Other error codes as defined for the
     111 *                      netif_start_message() function.
    114112 */
    115113int netif_start_req_local(int netif_phone, device_id_t device_id)
     
    141139 *
    142140 * @param[in] netif_phone The network interface phone.
    143  * @param[in] device_id   The device identifier.
    144  *
    145  * @return EOK on success.
    146  * @return Other error codes as defined for the find_device() function.
    147  * @return Other error codes as defined for the netif_stop_message() function.
    148  *
     141 * @param[in] device_id The device identifier.
     142 * @return              EOK on success.
     143 * @return              Other error codes as defined for the find_device()
     144 *                      function.
     145 * @return              Other error codes as defined for the
     146 *                      netif_stop_message() function.
    149147 */
    150148int netif_stop_req_local(int netif_phone, device_id_t device_id)
     
    175173/** Return the device usage statistics.
    176174 *
    177  * @param[in]  netif_phone The network interface phone.
    178  * @param[in]  device_id   The device identifier.
    179  * @param[out] stats       The device usage statistics.
    180  *
     175 * @param[in] netif_phone The network interface phone.
     176 * @param[in] device_id The device identifier.
     177 * @param[out] stats    The device usage statistics.
    181178 * @return EOK on success.
    182  *
    183179 */
    184180int netif_stats_req_local(int netif_phone, device_id_t device_id,
     
    194190/** Return the device local hardware address.
    195191 *
    196  * @param[in]  netif_phone The network interface phone.
    197  * @param[in]  device_id   The device identifier.
    198  * @param[out] address     The device local hardware address.
    199  * @param[out] data        The address data.
    200  *
    201  * @return EOK on success.
    202  * @return EBADMEM if the address parameter is NULL.
    203  * @return ENOENT if there no such device.
    204  * @return Other error codes as defined for the netif_get_addr_message()
    205  *         function.
    206  *
     192 * @param[in] netif_phone The network interface phone.
     193 * @param[in] device_id The device identifier.
     194 * @param[out] address  The device local hardware address.
     195 * @param[out] data     The address data.
     196 * @return              EOK on success.
     197 * @return              EBADMEM if the address parameter is NULL.
     198 * @return              ENOENT if there no such device.
     199 * @return              Other error codes as defined for the
     200 *                      netif_get_addr_message() function.
    207201 */
    208202int netif_get_addr_req_local(int netif_phone, device_id_t device_id,
     
    211205        ERROR_DECLARE;
    212206       
    213         if ((!address) || (!data))
     207        if (!address || !data)
    214208                return EBADMEM;
    215209       
     
    231225/** Find the device specific data.
    232226 *
    233  * @param[in]  device_id The device identifier.
    234  * @param[out] device    The device specific data.
    235  *
    236  * @return EOK on success.
    237  * @return ENOENT if device is not found.
    238  * @return EPERM if the device is not initialized.
    239  *
     227 * @param[in] device_id The device identifier.
     228 * @param[out] device   The device specific data.
     229 * @return              EOK on success.
     230 * @return              ENOENT if device is not found.
     231 * @return              EPERM if the device is not initialized.
    240232 */
    241233int find_device(device_id_t device_id, netif_device_t **device)
     
    256248/** Clear the usage statistics.
    257249 *
    258  * @param[in] stats The usage statistics.
    259  *
     250 * @param[in] stats     The usage statistics.
    260251 */
    261252void null_device_stats(device_stats_ref stats)
     
    266257/** Initialize the netif module.
    267258 *
    268  *  @param[in] client_connection The client connection functio to be
    269  *                               registered.
    270  *
    271  *  @return EOK on success.
    272  *  @return Other error codes as defined for each specific module
    273  *          message function.
    274  *
     259 * @param[in] client_connection The client connection functio to be registered.
     260 * @return              EOK on success.
     261 * @return              Other error codes as defined for each specific module
     262 *                      message function.
    275263 */
    276264int netif_init_module(async_client_conn_t client_connection)
     
    298286 * Prepared for future optimization.
    299287 *
    300  * @param[in] packet_id The packet identifier.
    301  *
     288 * @param[in] packet_id The packet identifier.
    302289 */
    303290void netif_pq_release(packet_id_t packet_id)
     
    308295/** Allocate new packet to handle the given content size.
    309296 *
    310  * @param[in] content The minimum content size.
    311  *
    312  * @return The allocated packet.
    313  * @return NULL if there is an error.
     297 * @param[in] content   The minimum content size.
     298 * @return              The allocated packet.
     299 * @return              NULL if there is an error.
    314300 *
    315301 */
     
    319305}
    320306
    321 /** Register the device notification receiver, the network interface layer module.
    322  *
    323  * @param[in] name      Module name.
    324  * @param[in] device_id The device identifier.
    325  * @param[in] phone     The network interface layer module phone.
    326  *
    327  * @return EOK on success.
    328  * @return ENOENT if there is no such device.
    329  * @return ELIMIT if there is another module registered.
    330  *
     307/** Register the device notification receiver, the network interface layer
     308 * module.
     309 *
     310 * @param[in] name      Module name.
     311 * @param[in] device_id The device identifier.
     312 * @param[in] phone     The network interface layer module phone.
     313 * @return              EOK on success.
     314 * @return              ENOENT if there is no such device.
     315 * @return              ELIMIT if there is another module registered.
    331316 */
    332317static int register_message(const char *name, device_id_t device_id, int phone)
     
    347332/** Process the netif module messages.
    348333 *
    349  * @param[in]  name         Module name.
    350  * @param[in]  callid       The message identifier.
    351  * @param[in]  call         The message parameters.
    352  * @param[out] answer       The message answer parameters.
    353  * @param[out] answer_count The last parameter for the actual answer
    354  *                          in the answer parameter.
    355  *
    356  * @return EOK on success.
    357  * @return ENOTSUP if the message is not known.
    358  * @return Other error codes as defined for each specific module message function.
     334 * @param[in] name      Module name.
     335 * @param[in] callid    The message identifier.
     336 * @param[in] call      The message parameters.
     337 * @param[out] answer   The message answer parameters.
     338 * @param[out] answer_count The last parameter for the actual answer in the
     339 *                      answer parameter.
     340 * @return              EOK on success.
     341 * @return              ENOTSUP if the message is not known.
     342 * @return              Other error codes as defined for each specific module
     343 *                      message function.
    359344 *
    360345 * @see IS_NET_NETIF_MESSAGE()
     
    373358        *answer_count = 0;
    374359        switch (IPC_GET_METHOD(*call)) {
    375                 case IPC_M_PHONE_HUNGUP:
    376                         return EOK;
    377                 case NET_NETIF_PROBE:
    378                         return netif_probe_req_local(0, IPC_GET_DEVICE(call),
    379                             NETIF_GET_IRQ(call), NETIF_GET_IO(call));
    380                 case IPC_M_CONNECT_TO_ME:
    381                         fibril_rwlock_write_lock(&netif_globals.lock);
    382                         ERROR_CODE = register_message(name, IPC_GET_DEVICE(call),
    383                             IPC_GET_PHONE(call));
    384                         fibril_rwlock_write_unlock(&netif_globals.lock);
    385                         return ERROR_CODE;
    386                 case NET_NETIF_SEND:
    387                         ERROR_PROPAGATE(packet_translate_remote(netif_globals.net_phone,
    388                             &packet, IPC_GET_PACKET(call)));
    389                         return netif_send_msg_local(0, IPC_GET_DEVICE(call), packet,
    390                             IPC_GET_SENDER(call));
    391                 case NET_NETIF_START:
    392                         return netif_start_req_local(0, IPC_GET_DEVICE(call));
    393                 case NET_NETIF_STATS:
    394                         fibril_rwlock_read_lock(&netif_globals.lock);
    395                         if (!ERROR_OCCURRED(async_data_read_receive(&callid, &length))) {
    396                                 if (length < sizeof(device_stats_t))
    397                                         ERROR_CODE = EOVERFLOW;
    398                                 else {
    399                                         if (!ERROR_OCCURRED(netif_get_device_stats(
    400                                             IPC_GET_DEVICE(call), &stats)))
    401                                                 ERROR_CODE = async_data_read_finalize(callid, &stats,
    402                                                     sizeof(device_stats_t));
    403                                 }
    404                         }
     360        case IPC_M_PHONE_HUNGUP:
     361                return EOK;
     362       
     363        case NET_NETIF_PROBE:
     364                return netif_probe_req_local(0, IPC_GET_DEVICE(call),
     365                    NETIF_GET_IRQ(call), NETIF_GET_IO(call));
     366                   
     367        case IPC_M_CONNECT_TO_ME:
     368                fibril_rwlock_write_lock(&netif_globals.lock);
     369                ERROR_CODE = register_message(name, IPC_GET_DEVICE(call),
     370                    IPC_GET_PHONE(call));
     371                fibril_rwlock_write_unlock(&netif_globals.lock);
     372                return ERROR_CODE;
     373               
     374        case NET_NETIF_SEND:
     375                ERROR_PROPAGATE(packet_translate_remote(netif_globals.net_phone,
     376                    &packet, IPC_GET_PACKET(call)));
     377                return netif_send_msg_local(0, IPC_GET_DEVICE(call), packet,
     378                    IPC_GET_SENDER(call));
     379                   
     380        case NET_NETIF_START:
     381                return netif_start_req_local(0, IPC_GET_DEVICE(call));
     382               
     383        case NET_NETIF_STATS:
     384                fibril_rwlock_read_lock(&netif_globals.lock);
     385
     386                if (ERROR_OCCURRED(async_data_read_receive(&callid, &length))) {
    405387                        fibril_rwlock_read_unlock(&netif_globals.lock);
    406388                        return ERROR_CODE;
    407                 case NET_NETIF_STOP:
    408                         return netif_stop_req_local(0, IPC_GET_DEVICE(call));
    409                 case NET_NETIF_GET_ADDR:
    410                         fibril_rwlock_read_lock(&netif_globals.lock);
    411                         if (!ERROR_OCCURRED(netif_get_addr_message(IPC_GET_DEVICE(call),
    412                             &address)))
    413                                 ERROR_CODE = measured_strings_reply(&address, 1);
     389                }
     390                if (length < sizeof(device_stats_t)) {
    414391                        fibril_rwlock_read_unlock(&netif_globals.lock);
    415                         return ERROR_CODE;
     392                        return EOVERFLOW;
     393                }
     394
     395                if (ERROR_NONE(netif_get_device_stats(IPC_GET_DEVICE(call),
     396                    &stats))) {
     397                        ERROR_CODE = async_data_read_finalize(callid, &stats,
     398                            sizeof(device_stats_t));
     399                }
     400
     401                fibril_rwlock_read_unlock(&netif_globals.lock);
     402                return ERROR_CODE;
     403
     404        case NET_NETIF_STOP:
     405                return netif_stop_req_local(0, IPC_GET_DEVICE(call));
     406               
     407        case NET_NETIF_GET_ADDR:
     408                fibril_rwlock_read_lock(&netif_globals.lock);
     409                if (ERROR_NONE(netif_get_addr_message(IPC_GET_DEVICE(call),
     410                    &address)))
     411                        ERROR_CODE = measured_strings_reply(&address, 1);
     412                fibril_rwlock_read_unlock(&netif_globals.lock);
     413                return ERROR_CODE;
    416414        }
    417415       
     
    421419/** Start the network interface module.
    422420 *
    423  * Initialize the client connection serving function, initialize
    424  * the module, registers the module service and start the async
    425  * manager, processing IPC messages in an infinite loop.
    426  *
    427  * @param[in] client_connection The client connection processing
    428  *                              function. The module skeleton propagates
    429  *                              its own one.
    430  *
    431  * @return EOK on success.
    432  * @return Other error codes as defined for each specific module message
    433  *         function.
    434  *
     421 * Initialize the client connection serving function, initialize the module,
     422 * registers the module service and start the async manager, processing IPC
     423 * messages in an infinite loop.
     424 *
     425 * @param[in] client_connection The client connection processing function.
     426 *                      The module skeleton propagates its own one.
     427 * @return              EOK on success.
     428 * @return              Other error codes as defined for each specific module
     429 *                      message function.
    435430 */
    436431int netif_module_start_standalone(async_client_conn_t client_connection)
  • uspace/lib/net/netif/netif_remote.c

    r4a3b501 r42a9f27  
    2727 */
    2828
    29 /** @addtogroup netif
     29/** @addtogroup libnet
    3030 * @{
    3131 */
     
    3535 */
    3636
     37#include <netif_remote.h>
     38#include <packet_client.h>
     39#include <generic.h>
     40
    3741#include <ipc/services.h>
    3842#include <ipc/netif.h>
     
    4145#include <adt/measured_strings.h>
    4246#include <net/packet.h>
    43 #include <packet_client.h>
    4447#include <net/device.h>
    45 #include <netif_remote.h>
    46 #include <generic.h>
    4748
     49/** Return the device local hardware address.
     50 *
     51 * @param[in] netif_phone The network interface phone.
     52 * @param[in] device_id The device identifier.
     53 * @param[out] address  The device local hardware address.
     54 * @param[out] data     The address data.
     55 * @return              EOK on success.
     56 * @return              EBADMEM if the address parameter is NULL.
     57 * @return              ENOENT if there no such device.
     58 * @return              Other error codes as defined for the
     59 *                      netif_get_addr_message() function.
     60 */
    4861int netif_get_addr_req_remote(int netif_phone, device_id_t device_id,
    4962    measured_string_ref *address, char **data)
     
    5366}
    5467
    55 int netif_probe_req_remote(int netif_phone, device_id_t device_id, int irq, int io)
     68/** Probe the existence of the device.
     69 *
     70 * @param[in] netif_phone The network interface phone.
     71 * @param[in] device_id The device identifier.
     72 * @param[in] irq       The device interrupt number.
     73 * @param[in] io        The device input/output address.
     74 * @return              EOK on success.
     75 * @return              Other error codes as defined for the
     76 *                      netif_probe_message().
     77 */
     78int
     79netif_probe_req_remote(int netif_phone, device_id_t device_id, int irq, int io)
    5680{
    5781        return async_req_3_0(netif_phone, NET_NETIF_PROBE, device_id, irq, io);
    5882}
    5983
    60 int netif_send_msg_remote(int netif_phone, device_id_t device_id, packet_t packet,
     84/** Send the packet queue.
     85 *
     86 * @param[in] netif_phone The network interface phone.
     87 * @param[in] device_id The device identifier.
     88 * @param[in] packet    The packet queue.
     89 * @param[in] sender    The sending module service.
     90 * @return              EOK on success.
     91 * @return              Other error codes as defined for the generic_send_msg()
     92 *                      function.
     93 */
     94int
     95netif_send_msg_remote(int netif_phone, device_id_t device_id, packet_t packet,
    6196    services_t sender)
    6297{
     
    65100}
    66101
     102/** Start the device.
     103 *
     104 * @param[in] netif_phone The network interface phone.
     105 * @param[in] device_id The device identifier.
     106 * @return              EOK on success.
     107 * @return              Other error codes as defined for the find_device()
     108 *                      function.
     109 * @return              Other error codes as defined for the
     110 *                      netif_start_message() function.
     111 */
    67112int netif_start_req_remote(int netif_phone, device_id_t device_id)
    68113{
     
    70115}
    71116
     117/** Stop the device.
     118 *
     119 * @param[in] netif_phone The network interface phone.
     120 * @param[in] device_id The device identifier.
     121 * @return              EOK on success.
     122 * @return              Other error codes as defined for the find_device()
     123 *                      function.
     124 * @return              Other error codes as defined for the
     125 *                      netif_stop_message() function.
     126 */
    72127int netif_stop_req_remote(int netif_phone, device_id_t device_id)
    73128{
     
    75130}
    76131
     132/** Return the device usage statistics.
     133 *
     134 * @param[in] netif_phone The network interface phone.
     135 * @param[in] device_id The device identifier.
     136 * @param[out] stats    The device usage statistics.
     137 * @return EOK on success.
     138 */
    77139int netif_stats_req_remote(int netif_phone, device_id_t device_id,
    78140    device_stats_ref stats)
     
    99161 * @param[in] receiver  The message receiver.
    100162 *
    101  * @return The phone of the needed service.
    102  * @return EOK on success.
    103  * @return Other error codes as defined for the bind_service() function.
    104  *
     163 * @return              The phone of the needed service.
     164 * @return              EOK on success.
     165 * @return              Other error codes as defined for the bind_service()
     166 *                      function.
    105167 */
    106 int netif_bind_service_remote(services_t service, device_id_t device_id, services_t me,
    107     async_client_conn_t receiver)
     168int
     169netif_bind_service_remote(services_t service, device_id_t device_id,
     170    services_t me, async_client_conn_t receiver)
    108171{
    109172        return bind_service(service, device_id, me, 0, receiver);
Note: See TracChangeset for help on using the changeset viewer.