Changes in uspace/lib/nic/include/nic.h [e86b8f0:6d8455d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/nic/include/nic.h
re86b8f0 r6d8455d 42 42 #include <ddf/driver.h> 43 43 #include <device/hw_res_parsed.h> 44 #include <net/packet.h> 44 45 #include <ops/nic.h> 45 46 #define DEVICE_CATEGORY_NIC "nic"47 46 48 47 struct nic; … … 62 61 63 62 /** 64 * Simple structure for sending lists of frames.63 * Simple structure for sending the allocated frames (packets) in a list. 65 64 */ 66 65 typedef struct { 67 66 link_t link; 68 void *data; 69 size_t size; 67 packet_t *packet; 70 68 } nic_frame_t; 71 69 … … 73 71 74 72 /** 75 * Handler for writing framedata to the NIC device.76 * The function is responsible for releasing the frame.73 * Handler for writing packet data to the NIC device. 74 * The function is responsible for releasing the packet. 77 75 * It does not return anything, if some error is detected the function just 78 76 * silently fails (logging on debug level is suggested). … … 160 158 * @return ENOTSUP If this filter cannot work on this NIC (e.g. the NIC 161 159 * cannot run in promiscuous node or the limit of WOL 162 * frames' specifications was reached).160 * packets' specifications was reached). 163 161 * @return ELIMIT If this filter must implemented in HW but currently the 164 162 * limit of these HW filters was reached. … … 206 204 /* Functions called in add_device */ 207 205 extern int nic_connect_to_services(nic_t *); 206 extern int nic_register_as_ddf_fun(nic_t *, ddf_dev_ops_t *); 208 207 extern int nic_get_resources(nic_t *, hw_res_list_parsed_t *); 209 208 extern void nic_set_specific(nic_t *, void *); … … 226 225 extern ddf_dev_t *nic_get_ddf_dev(nic_t *); 227 226 extern ddf_fun_t *nic_get_ddf_fun(nic_t *); 228 extern void nic_set_ddf_fun(nic_t *, ddf_fun_t *);229 227 extern nic_t *nic_get_from_ddf_dev(ddf_dev_t *); 230 228 extern nic_t *nic_get_from_ddf_fun(ddf_fun_t *); … … 235 233 extern int nic_report_poll_mode(nic_t *, nic_poll_mode_t, struct timeval *); 236 234 extern void nic_query_address(nic_t *, nic_address_t *); 237 extern void nic_received_noneth_frame(nic_t *, void *, size_t); 235 extern void nic_received_packet(nic_t *, packet_t *); 236 extern void nic_received_noneth_packet(nic_t *, packet_t *); 238 237 extern void nic_received_frame(nic_t *, nic_frame_t *); 239 238 extern void nic_received_frame_list(nic_t *, nic_frame_list_t *); … … 249 248 extern void nic_report_collisions(nic_t *, unsigned); 250 249 251 /* Frame / frame list allocation and deallocation */ 250 /* Packet / frame / frame list allocation and deallocation */ 251 extern packet_t *nic_alloc_packet(nic_t *, size_t); 252 extern void nic_release_packet(nic_t *, packet_t *); 252 253 extern nic_frame_t *nic_alloc_frame(nic_t *, size_t); 253 254 extern nic_frame_list_t *nic_alloc_frame_list(void); … … 274 275 extern void nic_sw_period_stop(nic_t *); 275 276 277 /* Packet DMA lock */ 278 extern int nic_dma_lock_packet(packet_t *, size_t, void **); 279 extern int nic_dma_unlock_packet(packet_t *, size_t); 280 276 281 #endif // __NIC_H__ 277 282
Note:
See TracChangeset
for help on using the changeset viewer.