Changeset 6b66de6b in mainline
- Timestamp:
- 2024-02-14T09:18:19Z (11 months ago)
- Children:
- 86f862c
- Parents:
- dc5c303
- git-author:
- Nataliia Korop <n.corop08@…> (2023-12-19 14:05:46)
- git-committer:
- Nataliia Korop <n.corop08@…> (2024-02-14 09:18:19)
- Location:
- uspace
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/e1k/e1k.c
rdc5c303 r6b66de6b 177 177 fibril_mutex_t eeprom_lock; 178 178 179 /** Interface for dumping packets */180 pcap_iface_t pcapdump;181 179 182 180 } e1000_t; … … 1195 1193 if (frame != NULL) { 1196 1194 memcpy(frame->data, e1000->rx_frame_virt[next_tail], frame_size); 1197 pcapdump_packet( &e1000->pcapdump, frame->data, frame->size);1195 pcapdump_packet(nic_get_pcap_iface(nic), frame->data, frame->size); 1198 1196 1199 1197 nic_received_frame(nic, frame); … … 2211 2209 goto err_add_to_cat; 2212 2210 2213 errno_t pcap_rc = pcapdump_init( &e1000->pcapdump);2211 errno_t pcap_rc = pcapdump_init(nic_get_pcap_iface(nic)); 2214 2212 2215 2213 if (pcap_rc != EOK) { … … 2383 2381 2384 2382 memcpy(e1000->tx_frame_virt[tdt], data, size); 2385 pcapdump_packet( &e1000->pcapdump, data, size);2383 pcapdump_packet(nic_get_pcap_iface(nic), data, size); 2386 2384 tx_descriptor_addr->phys_addr = PTR_TO_U64(e1000->tx_frame_phys[tdt]); 2387 2385 tx_descriptor_addr->length = size; -
uspace/lib/nic/include/nic.h
rdc5c303 r6b66de6b 44 44 #include <device/hw_res_parsed.h> 45 45 #include <ops/nic.h> 46 47 #include "pcap_iface.h" 46 48 47 49 #define DEVICE_CATEGORY_NIC "nic" … … 278 280 extern void nic_sw_period_stop(nic_t *); 279 281 282 /* pcapdump interface */ 283 extern pcap_iface_t* nic_get_pcap_iface(nic_t *); 284 280 285 #endif // __NIC_H__ 281 286 -
uspace/lib/nic/include/nic_driver.h
rdc5c303 r6b66de6b 50 50 #include "nic_rx_control.h" 51 51 #include "nic_wol_virtues.h" 52 #include "pcap/include/pcapdump_iface.h" 52 53 53 54 struct sw_poll_info { … … 195 196 */ 196 197 poll_request_handler on_poll_request; 198 199 /** Interface for dumping packets */ 200 pcap_iface_t pcapdump; 201 197 202 /** Data specific for particular driver */ 198 203 void *specific; -
uspace/lib/nic/meson.build
rdc5c303 r6b66de6b 27 27 # 28 28 29 deps = [ 'drv' ]29 deps = [ 'drv' , 'pcap' ] 30 30 c_args = [ '-DLIBNIC_INTERNAL', ] 31 31 src = files( -
uspace/lib/nic/src/nic_driver.c
rdc5c303 r6b66de6b 1133 1133 } 1134 1134 1135 pcap_iface_t* nic_get_pcap_iface(nic_t *nic_data) { 1136 1137 return &nic_data->pcapdump; 1138 } 1139 1135 1140 /** @} 1136 1141 */
Note:
See TracChangeset
for help on using the changeset viewer.