Ignore:
Timestamp:
2010-11-02T22:38:46Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
af894a21
Parents:
aab02fb (diff), e06ef614 (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 mainline changes

File:
1 edited

Legend:

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

    raab02fb refedee77  
    2727 */
    2828
    29 /** @addtogroup netif
     29/** @addtogroup libnet
    3030 * @{
    3131 */
     
    3434 * Network interface module skeleton.
    3535 * The skeleton has to be part of each network interface module.
    36  * The skeleton can be also part of the module bundled with the network interface layer.
    37  */
    38 
    39 #ifndef __NET_NETIF_LOCAL_H__
    40 #define __NET_NETIF_LOCAL_H__
     36 */
     37
     38#ifndef NET_NETIF_LOCAL_H_
     39#define NET_NETIF_LOCAL_H_
    4140
    4241#include <async.h>
     
    4645
    4746#include <adt/measured_strings.h>
    48 #include <net_err.h>
    49 #include <net_device.h>
    50 #include <packet/packet.h>
    51 
    52 /** Network interface device specific data.
    53  *
    54  */
     47#include <net/device.h>
     48#include <net/packet.h>
     49
     50/** Network interface device specific data. */
    5551typedef struct {
    5652        device_id_t device_id;  /**< Device identifier. */
     
    6864DEVICE_MAP_DECLARE(netif_device_map, netif_device_t);
    6965
    70 /** Network interface module skeleton global data.
    71  *
    72  */
     66/** Network interface module skeleton global data. */
    7367typedef struct {
    7468        int net_phone;                  /**< Networking module phone. */
     
    8276 *
    8377 * This function has to be implemented in user code.
    84  *
    8578 */
    8679extern int netif_initialize(void);
     
    9083 * This has to be implemented in user code.
    9184 *
    92  * @param[in] device_id The device identifier.
    93  * @param[in] irq       The device interrupt number.
    94  * @param[in] io        The device input/output address.
    95  *
    96  * @return EOK on success.
    97  * @return Other error codes as defined for the find_device() function.
    98  * @return Other error codes as defined for the specific module message
    99  *         implementation.
    100  *
     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.
    10194 */
    10295extern int netif_probe_message(device_id_t device_id, int irq, uintptr_t io);
     
    10699 * This has to be implemented in user code.
    107100 *
    108  * @param[in] device_id The device identifier.
    109  * @param[in] packet    The packet queue.
    110  * @param[in] sender    The sending module service.
    111  *
    112  * @return EOK on success.
    113  * @return EFORWARD if the device is not active (in the NETIF_ACTIVE state).
    114  * @return Other error codes as defined for the find_device() function.
    115  * @return Other error codes as defined for the specific module message
    116  *         implementation.
    117  *
     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.
    118112 */
    119113extern int netif_send_message(device_id_t device_id, packet_t packet,
     
    124118 * This has to be implemented in user code.
    125119 *
    126  * @param[in] device The device structure.
    127  *
    128  * @return EOK on success.
    129  * @return Other error codes as defined for the find_device() function.
    130  * @return Other error codes as defined for the specific module message
    131  *         implementation.
    132  *
     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.
    133127 */
    134128extern int netif_start_message(netif_device_t *device);
     
    138132 * This has to be implemented in user code.
    139133 *
    140  * @param[in] device The device structure.
    141  *
    142  * @return EOK on success.
    143  * @return Other error codes as defined for the find_device() function.
    144  * @return Other error codes as defined for the specific module message
    145  *         implementation.
    146  *
     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.
    147141 */
    148142extern int netif_stop_message(netif_device_t *device);
     
    152146 * This has to be implemented in user code.
    153147 *
    154  * @param[in]  device_id The device identifier.
    155  * @param[out] address   The device local hardware address.
    156  *
    157  * @return EOK on success.
    158  * @return EBADMEM if the address parameter is NULL.
    159  * @return ENOENT if there no such device.
    160  * @return Other error codes as defined for the find_device() function.
    161  * @return Other error codes as defined for the specific module message
    162  *         implementation.
    163  *
     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.
    164158 */
    165159extern int netif_get_addr_message(device_id_t device_id,
     
    171165 * skeleton. This has to be implemented in user code.
    172166 *
    173  * @param[in]  callid       The message identifier.
    174  * @param[in]  call         The message parameters.
    175  * @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.
    176170 * @param[out] answer_count The last parameter for the actual answer in
    177  *                          the answer parameter.
    178  *
    179  * @return EOK on success.
    180  * @return ENOTSUP if the message is not known.
    181  * @return Other error codes as defined for the specific module message
    182  *         implementation.
    183  *
     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.
    184177 */
    185178extern int netif_specific_message(ipc_callid_t callid, ipc_call_t *call,
     
    190183 * This has to be implemented in user code.
    191184 *
    192  * @param[in]  device_id The device identifier.
    193  * @param[out] stats     The device usage statistics.
    194  *
    195  * @return EOK on success.
    196  * @return Other error codes as defined for the find_device() function.
    197  * @return Other error codes as defined for the specific module message
    198  *         implementation.
    199  *
     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.
    200193 */
    201194extern int netif_get_device_stats(device_id_t device_id,
Note: See TracChangeset for help on using the changeset viewer.