Ignore:
File:
1 edited

Legend:

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

    r42a9f27 re526f08  
    2727 */
    2828
    29 /** @addtogroup libnet
     29/** @addtogroup netif
    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>
    4546
    4647#include <adt/measured_strings.h>
     
    4849#include <net/packet.h>
    4950
    50 /** Network interface device specific data. */
     51/** Network interface device specific data.
     52 *
     53 */
    5154typedef struct {
    5255        device_id_t device_id;  /**< Device identifier. */
     
    6467DEVICE_MAP_DECLARE(netif_device_map, netif_device_t);
    6568
    66 /** Network interface module skeleton global data. */
     69/** Network interface module skeleton global data.
     70 *
     71 */
    6772typedef struct {
    6873        int net_phone;                  /**< Networking module phone. */
     
    7681 *
    7782 * This function has to be implemented in user code.
     83 *
    7884 */
    7985extern int netif_initialize(void);
     
    8389 * This has to be implemented in user code.
    8490 *
    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.
     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 *
    94100 */
    95101extern int netif_probe_message(device_id_t device_id, int irq, uintptr_t io);
     
    99105 * This has to be implemented in user code.
    100106 *
    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.
     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 *
    112117 */
    113118extern int netif_send_message(device_id_t device_id, packet_t packet,
     
    118123 * This has to be implemented in user code.
    119124 *
    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.
     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 *
    127132 */
    128133extern int netif_start_message(netif_device_t *device);
     
    132137 * This has to be implemented in user code.
    133138 *
    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.
     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 *
    141146 */
    142147extern int netif_stop_message(netif_device_t *device);
     
    146151 * This has to be implemented in user code.
    147152 *
    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.
     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 *
    158163 */
    159164extern int netif_get_addr_message(device_id_t device_id,
     
    165170 * skeleton. This has to be implemented in user code.
    166171 *
    167  * @param[in] callid    The message identifier.
    168  * @param[in] call      The message parameters.
    169  * @param[out] answer   The message answer parameters.
     172 * @param[in]  callid       The message identifier.
     173 * @param[in]  call         The message parameters.
     174 * @param[out] answer       The message answer parameters.
    170175 * @param[out] answer_count The last parameter for the actual answer in
    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.
     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 *
    177183 */
    178184extern int netif_specific_message(ipc_callid_t callid, ipc_call_t *call,
     
    183189 * This has to be implemented in user code.
    184190 *
    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.
     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 *
    193199 */
    194200extern int netif_get_device_stats(device_id_t device_id,
Note: See TracChangeset for help on using the changeset viewer.