Changes in uspace/lib/net/include/netif_local.h [46d4d9f:e526f08] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/net/include/netif_local.h
r46d4d9f re526f08 27 27 */ 28 28 29 /** @addtogroup libnet29 /** @addtogroup netif 30 30 * @{ 31 31 */ … … 36 36 */ 37 37 38 #ifndef NET_NETIF_LOCAL_H_39 #define NET_NETIF_LOCAL_H_38 #ifndef __NET_NETIF_LOCAL_H__ 39 #define __NET_NETIF_LOCAL_H__ 40 40 41 41 #include <async.h> … … 43 43 #include <ipc/ipc.h> 44 44 #include <ipc/services.h> 45 #include <err.h> 45 46 46 47 #include <adt/measured_strings.h> … … 48 49 #include <net/packet.h> 49 50 50 /** Network interface device specific data. */ 51 /** Network interface device specific data. 52 * 53 */ 51 54 typedef struct { 52 55 device_id_t device_id; /**< Device identifier. */ … … 64 67 DEVICE_MAP_DECLARE(netif_device_map, netif_device_t); 65 68 66 /** Network interface module skeleton global data. */ 69 /** Network interface module skeleton global data. 70 * 71 */ 67 72 typedef struct { 68 73 int net_phone; /**< Networking module phone. */ … … 76 81 * 77 82 * This function has to be implemented in user code. 83 * 78 84 */ 79 85 extern int netif_initialize(void); … … 83 89 * This has to be implemented in user code. 84 90 * 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.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 * 94 100 */ 95 101 extern int netif_probe_message(device_id_t device_id, int irq, uintptr_t io); … … 99 105 * This has to be implemented in user code. 100 106 * 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, 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 * 117 */ 118 extern int netif_send_message(device_id_t device_id, packet_t packet, 114 119 services_t sender); 115 120 … … 118 123 * This has to be implemented in user code. 119 124 * 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.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 * 127 132 */ 128 133 extern int netif_start_message(netif_device_t *device); … … 132 137 * This has to be implemented in user code. 133 138 * 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.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 * 141 146 */ 142 147 extern int netif_stop_message(netif_device_t *device); … … 146 151 * This has to be implemented in user code. 147 152 * 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.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 * 158 163 */ 159 164 extern int netif_get_addr_message(device_id_t device_id, 160 measured_string_ t *address);165 measured_string_ref address); 161 166 162 167 /** Process the netif driver specific message. … … 165 170 * skeleton. This has to be implemented in user code. 166 171 * 167 * @param[in] callidThe message identifier.168 * @param[in] callThe message parameters.169 * @param[out] answer 172 * @param[in] callid The message identifier. 173 * @param[in] call The message parameters. 174 * @param[out] answer The message answer parameters. 170 175 * @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 * 177 183 */ 178 184 extern int netif_specific_message(ipc_callid_t callid, ipc_call_t *call, … … 183 189 * This has to be implemented in user code. 184 190 * 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.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 * 193 199 */ 194 200 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 **,201 device_stats_ref stats); 202 203 extern int netif_get_addr_req_local(int, device_id_t, measured_string_ref *, 198 204 char **); 199 205 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);206 extern int netif_send_msg_local(int, device_id_t, packet_t, services_t); 201 207 extern int netif_start_req_local(int, device_id_t); 202 208 extern int netif_stop_req_local(int, device_id_t); 203 extern int netif_stats_req_local(int, device_id_t, device_stats_ t *);209 extern int netif_stats_req_local(int, device_id_t, device_stats_ref); 204 210 extern int netif_bind_service_local(services_t, device_id_t, services_t, 205 211 async_client_conn_t); 206 212 207 213 extern int find_device(device_id_t, netif_device_t **); 208 extern void null_device_stats(device_stats_ t *);214 extern void null_device_stats(device_stats_ref); 209 215 extern void netif_pq_release(packet_id_t); 210 extern packet_t *netif_packet_get_1(size_t);216 extern packet_t netif_packet_get_1(size_t); 211 217 extern int netif_init_module(async_client_conn_t); 212 218
Note:
See TracChangeset
for help on using the changeset viewer.