Changeset b5e68c8 in mainline for uspace/lib/net/include/netif_skel.h


Ignore:
Timestamp:
2011-05-12T16:49:44Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f36787d7
Parents:
e80329d6 (diff), 750636a (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 moved

Legend:

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

    re80329d6 rb5e68c8  
    3636 */
    3737
    38 #ifndef NET_NETIF_LOCAL_H_
    39 #define NET_NETIF_LOCAL_H_
     38#ifndef NET_NETIF_SKEL_H_
     39#define NET_NETIF_SKEL_H_
    4040
    4141#include <async.h>
    4242#include <fibril_synch.h>
    43 #include <ipc/ipc.h>
    4443#include <ipc/services.h>
    4544
     
    7675 *
    7776 * This function has to be implemented in user code.
     77 *
    7878 */
    7979extern int netif_initialize(void);
     
    8383 * This has to be implemented in user code.
    8484 *
    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.
    94  */
    95 extern int netif_probe_message(device_id_t device_id, int irq, uintptr_t io);
     85 * @param[in] device_id Device identifier.
     86 * @param[in] irq       Device interrupt number.
     87 * @param[in] io        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.
     94 *
     95 */
     96extern int netif_probe_message(device_id_t device_id, int irq, void *io);
    9697
    9798/** Send the packet queue.
     
    99100 * This has to be implemented in user code.
    100101 *
    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.
    112  */
    113 extern int netif_send_message(device_id_t device_id, packet_t packet,
     102 * @param[in] device_id Device identifier.
     103 * @param[in] packet    Packet queue.
     104 * @param[in] sender    Sending module service.
     105 *
     106 * @return EOK on success.
     107 * @return EFORWARD if the device is not active (in the
     108 *         NETIF_ACTIVE state).
     109 * @return Other error codes as defined for the find_device()
     110 *         function.
     111 * @return Other error codes as defined for the specific module
     112 *         message implementation.
     113 *
     114 */
     115extern int netif_send_message(device_id_t device_id, packet_t *packet,
    114116    services_t sender);
    115117
     
    118120 * This has to be implemented in user code.
    119121 *
    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.
     122 * @param[in] device Device structure.
     123 *
     124 * @return New network interface state (non-negative values).
     125 * @return Other error codes as defined for the find_device()
     126 *         function.
     127 * @return Other error codes as defined for the specific module
     128 *         message implementation.
     129 
     130 *
    127131 */
    128132extern int netif_start_message(netif_device_t *device);
     
    132136 * This has to be implemented in user code.
    133137 *
    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.
     138 * @param[in] device Device structure.
     139 *
     140 * @return EOK on success.
     141 * @return Other error codes as defined for the find_device()
     142 *         function.
     143 * @return Other error codes as defined for the specific module
     144 *         message 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 Device identifier.
     154 * @param[out] address  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()
     160 *         function.
     161 * @return Other error codes as defined for the specific module
     162 *         message implementation.
     163 *
    158164 */
    159165extern int netif_get_addr_message(device_id_t device_id,
    160     measured_string_ref address);
     166    measured_string_t *address);
    161167
    162168/** Process the netif driver specific message.
     
    165171 * skeleton. This has to be implemented in user code.
    166172 *
    167  * @param[in] callid    The message identifier.
    168  * @param[in] call      The message parameters.
    169  * @param[out] answer   The message answer parameters.
    170  * @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.
     173 * @param[in]  callid Message identifier.
     174 * @param[in]  call   Message.
     175 * @param[out] answer Answer.
     176 * @param[out] count  Number of answer arguments.
     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
     181 *         message implementation.
     182 *
    177183 */
    178184extern int netif_specific_message(ipc_callid_t callid, ipc_call_t *call,
    179     ipc_call_t *answer, int *answer_count);
     185    ipc_call_t *answer, size_t *count);
    180186
    181187/** Return the device usage statistics.
     
    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 Device identifier.
     192 * @param[out] stats     Device usage statistics.
     193 *
     194 * @return EOK on success.
     195 * @return Other error codes as defined for the find_device()
     196 *         function.
     197 * @return Other error codes as defined for the specific module
     198 *         message implementation.
     199 *
    193200 */
    194201extern int netif_get_device_stats(device_id_t device_id,
    195     device_stats_ref stats);
    196 
    197 extern int netif_get_addr_req_local(int, device_id_t, measured_string_ref *,
    198     char **);
    199 extern int netif_probe_req_local(int, device_id_t, int, int);
    200 extern int netif_send_msg_local(int, device_id_t, packet_t, services_t);
    201 extern int netif_start_req_local(int, device_id_t);
    202 extern int netif_stop_req_local(int, device_id_t);
    203 extern int netif_stats_req_local(int, device_id_t, device_stats_ref);
    204 extern int netif_bind_service_local(services_t, device_id_t, services_t,
    205     async_client_conn_t);
     202    device_stats_t *stats);
    206203
    207204extern int find_device(device_id_t, netif_device_t **);
    208 extern void null_device_stats(device_stats_ref);
     205extern void null_device_stats(device_stats_t *);
    209206extern void netif_pq_release(packet_id_t);
    210 extern packet_t netif_packet_get_1(size_t);
    211 extern int netif_init_module(async_client_conn_t);
    212 
    213 extern int netif_module_message_standalone(const char *, ipc_callid_t,
    214     ipc_call_t *, ipc_call_t *, int *);
    215 extern int netif_module_start_standalone(async_client_conn_t);
     207extern packet_t *netif_packet_get_1(size_t);
     208
     209extern int netif_module_start(void);
    216210
    217211#endif
Note: See TracChangeset for help on using the changeset viewer.