Changes in uspace/lib/net/include/netif_local.h [e526f08:46d4d9f] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/net/include/netif_local.h
re526f08 r46d4d9f 27 27 */ 28 28 29 /** @addtogroup netif29 /** @addtogroup libnet 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>46 45 47 46 #include <adt/measured_strings.h> … … 49 48 #include <net/packet.h> 50 49 51 /** Network interface device specific data. 52 * 53 */ 50 /** Network interface device specific data. */ 54 51 typedef struct { 55 52 device_id_t device_id; /**< Device identifier. */ … … 67 64 DEVICE_MAP_DECLARE(netif_device_map, netif_device_t); 68 65 69 /** Network interface module skeleton global data. 70 * 71 */ 66 /** Network interface module skeleton global data. */ 72 67 typedef struct { 73 68 int net_phone; /**< Networking module phone. */ … … 81 76 * 82 77 * This function has to be implemented in user code. 83 *84 78 */ 85 79 extern int netif_initialize(void); … … 89 83 * This has to be implemented in user code. 90 84 * 91 * @param[in] device_id 92 * @param[in] irq 93 * @param[in] io 94 * 95 * @return 96 * @return Other error codes as defined for the find_device() function.97 * @return Other error codes as defined for the specific module message98 * implementation.99 * 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. 100 94 */ 101 95 extern int netif_probe_message(device_id_t device_id, int irq, uintptr_t io); … … 105 99 * This has to be implemented in user code. 106 100 * 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, 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, 119 114 services_t sender); 120 115 … … 123 118 * This has to be implemented in user code. 124 119 * 125 * @param[in] device 126 * 127 * @return 128 * @return Other error codes as defined for the find_device() function.129 * @return Other error codes as defined for the specific module message130 * implementation.131 * 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. 132 127 */ 133 128 extern int netif_start_message(netif_device_t *device); … … 137 132 * This has to be implemented in user code. 138 133 * 139 * @param[in] device 140 * 141 * @return 142 * @return Other error codes as defined for the find_device() function.143 * @return Other error codes as defined for the specific module message144 * implementation.145 * 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. 146 141 */ 147 142 extern int netif_stop_message(netif_device_t *device); … … 151 146 * This has to be implemented in user code. 152 147 * 153 * @param[in] device_idThe device identifier.154 * @param[out] address 155 * 156 * @return 157 * @return 158 * @return 159 * @return Other error codes as defined for the find_device() function.160 * @return Other error codes as defined for the specific module message161 * implementation.162 * 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. 163 158 */ 164 159 extern int netif_get_addr_message(device_id_t device_id, 165 measured_string_ refaddress);160 measured_string_t *address); 166 161 167 162 /** Process the netif driver specific message. … … 170 165 * skeleton. This has to be implemented in user code. 171 166 * 172 * @param[in] callidThe message identifier.173 * @param[in] callThe message parameters.174 * @param[out] answer 167 * @param[in] callid The message identifier. 168 * @param[in] call The message parameters. 169 * @param[out] answer The message answer parameters. 175 170 * @param[out] answer_count The last parameter for the actual answer in 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 * 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. 183 177 */ 184 178 extern int netif_specific_message(ipc_callid_t callid, ipc_call_t *call, … … 189 183 * This has to be implemented in user code. 190 184 * 191 * @param[in] device_idThe device identifier.192 * @param[out] stats 193 * 194 * @return 195 * @return Other error codes as defined for the find_device() function.196 * @return Other error codes as defined for the specific module message197 * implementation.198 * 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. 199 193 */ 200 194 extern int netif_get_device_stats(device_id_t device_id, 201 device_stats_ refstats);202 203 extern int netif_get_addr_req_local(int, device_id_t, measured_string_ ref*,195 device_stats_t *stats); 196 197 extern int netif_get_addr_req_local(int, device_id_t, measured_string_t **, 204 198 char **); 205 199 extern int netif_probe_req_local(int, device_id_t, int, int); 206 extern int netif_send_msg_local(int, device_id_t, packet_t , services_t);200 extern int netif_send_msg_local(int, device_id_t, packet_t *, services_t); 207 201 extern int netif_start_req_local(int, device_id_t); 208 202 extern int netif_stop_req_local(int, device_id_t); 209 extern int netif_stats_req_local(int, device_id_t, device_stats_ ref);203 extern int netif_stats_req_local(int, device_id_t, device_stats_t *); 210 204 extern int netif_bind_service_local(services_t, device_id_t, services_t, 211 205 async_client_conn_t); 212 206 213 207 extern int find_device(device_id_t, netif_device_t **); 214 extern void null_device_stats(device_stats_ ref);208 extern void null_device_stats(device_stats_t *); 215 209 extern void netif_pq_release(packet_id_t); 216 extern packet_t netif_packet_get_1(size_t);210 extern packet_t *netif_packet_get_1(size_t); 217 211 extern int netif_init_module(async_client_conn_t); 218 212
Note:
See TracChangeset
for help on using the changeset viewer.