Changes in uspace/lib/net/include/netif_local.h [46d4d9f:14f1db0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/net/include/netif_local.h
r46d4d9f r14f1db0 27 27 */ 28 28 29 /** @addtogroup libnet29 /** @addtogroup netif 30 30 * @{ 31 31 */ … … 34 34 * Network interface module skeleton. 35 35 * The skeleton has to be part of each network interface module. 36 */ 37 38 #ifndef NET_NETIF_LOCAL_H_ 39 #define NET_NETIF_LOCAL_H_ 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__ 40 41 41 42 #include <async.h> … … 45 46 46 47 #include <adt/measured_strings.h> 47 #include <net/device.h> 48 #include <net/packet.h> 49 50 /** Network interface device specific data. */ 48 #include <net_err.h> 49 #include <net_device.h> 50 #include <packet/packet.h> 51 52 /** Network interface device specific data. 53 * 54 */ 51 55 typedef struct { 52 56 device_id_t device_id; /**< Device identifier. */ … … 64 68 DEVICE_MAP_DECLARE(netif_device_map, netif_device_t); 65 69 66 /** Network interface module skeleton global data. */ 70 /** Network interface module skeleton global data. 71 * 72 */ 67 73 typedef struct { 68 74 int net_phone; /**< Networking module phone. */ … … 76 82 * 77 83 * This function has to be implemented in user code. 84 * 78 85 */ 79 86 extern int netif_initialize(void); … … 83 90 * This has to be implemented in user code. 84 91 * 85 * @param[in] device_id 86 * @param[in] irq 87 * @param[in] io 88 * 89 * @return 90 * @return Other error codes as defined for the find_device()91 * function.92 * @return Other error codes as defined for the specific module93 * message implementation.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 * 94 101 */ 95 102 extern int netif_probe_message(device_id_t device_id, int irq, uintptr_t io); … … 99 106 * This has to be implemented in user code. 100 107 * 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, 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 * 118 */ 119 extern int netif_send_message(device_id_t device_id, packet_t packet, 114 120 services_t sender); 115 121 … … 118 124 * This has to be implemented in user code. 119 125 * 120 * @param[in] device 121 * 122 * @return 123 * @return Other error codes as defined for the find_device()124 * function.125 * @return Other error codes as defined for the specific module126 * message implementation.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 * 127 133 */ 128 134 extern int netif_start_message(netif_device_t *device); … … 132 138 * This has to be implemented in user code. 133 139 * 134 * @param[in] device 135 * 136 * @return 137 * @return Other error codes as defined for the find_device()138 * function.139 * @return Other error codes as defined for the specific module140 * message implementation.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 * 141 147 */ 142 148 extern int netif_stop_message(netif_device_t *device); … … 146 152 * This has to be implemented in user code. 147 153 * 148 * @param[in] device_idThe device identifier.149 * @param[out] address 150 * 151 * @return 152 * @return 153 * @return 154 * @return Other error codes as defined for the find_device()155 * function.156 * @return Other error codes as defined for the specific module157 * message implementation.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 * 158 164 */ 159 165 extern int netif_get_addr_message(device_id_t device_id, 160 measured_string_ t *address);166 measured_string_ref address); 161 167 162 168 /** Process the netif driver specific message. … … 165 171 * skeleton. This has to be implemented in user code. 166 172 * 167 * @param[in] callidThe message identifier.168 * @param[in] callThe message parameters.169 * @param[out] answer 173 * @param[in] callid The message identifier. 174 * @param[in] call The message parameters. 175 * @param[out] answer The message answer parameters. 170 176 * @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. 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 * 177 184 */ 178 185 extern int netif_specific_message(ipc_callid_t callid, ipc_call_t *call, … … 183 190 * This has to be implemented in user code. 184 191 * 185 * @param[in] device_idThe device identifier.186 * @param[out] stats 187 * 188 * @return 189 * @return Other error codes as defined for the find_device()190 * function.191 * @return Other error codes as defined for the specific module192 * message implementation.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 * 193 200 */ 194 201 extern int netif_get_device_stats(device_id_t device_id, 195 device_stats_ t *stats);196 197 extern int netif_get_addr_req_local(int, device_id_t, measured_string_ t **,202 device_stats_ref stats); 203 204 extern int netif_get_addr_req_local(int, device_id_t, measured_string_ref *, 198 205 char **); 199 206 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);207 extern int netif_send_msg_local(int, device_id_t, packet_t, services_t); 201 208 extern int netif_start_req_local(int, device_id_t); 202 209 extern int netif_stop_req_local(int, device_id_t); 203 extern int netif_stats_req_local(int, device_id_t, device_stats_ t *);210 extern int netif_stats_req_local(int, device_id_t, device_stats_ref); 204 211 extern int netif_bind_service_local(services_t, device_id_t, services_t, 205 212 async_client_conn_t); 206 213 207 214 extern int find_device(device_id_t, netif_device_t **); 208 extern void null_device_stats(device_stats_ t *);215 extern void null_device_stats(device_stats_ref); 209 216 extern void netif_pq_release(packet_id_t); 210 extern packet_t *netif_packet_get_1(size_t);217 extern packet_t netif_packet_get_1(size_t); 211 218 extern int netif_init_module(async_client_conn_t); 212 219
Note:
See TracChangeset
for help on using the changeset viewer.