Changes in / [522eecf:34aad53d] in mainline
- Files:
-
- 13 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
abi/include/abi/ipc/interfaces.h
r522eecf r34aad53d 202 202 FOURCC_COMPACT('w', 'm', 'g', 't') | IFACE_EXCHANGE_SERIALIZE | IFACE_MOD_CALLBACK, 203 203 INTERFACE_TBARCFG_NOTIFY = 204 FOURCC_COMPACT('t', 'b', 'c', 'f') | IFACE_EXCHANGE_SERIALIZE 204 FOURCC_COMPACT('t', 'b', 'c', 'f') | IFACE_EXCHANGE_SERIALIZE, 205 INTERFACE_PCAP_CONTROL = 206 FOURCC_COMPACT('p', 'c', 't', 'l') | IFACE_EXCHANGE_SERIALIZE, 205 207 } iface_t; 206 208 -
uspace/app/meson.build
r522eecf r34aad53d 72 72 'nic', 73 73 'nterm', 74 'pcapctl', 74 75 'ofw', 75 76 'pci', -
uspace/drv/nic/e1k/e1k.c
r522eecf r34aad53d 49 49 #include <nic.h> 50 50 #include <ops/nic.h> 51 #include <pcapdump_iface.h> 51 52 #include "e1k.h" 52 53 … … 174 175 /** Lock for EEPROM access */ 175 176 fibril_mutex_t eeprom_lock; 177 176 178 } e1000_t; 177 179 … … 1189 1191 if (frame != NULL) { 1190 1192 memcpy(frame->data, e1000->rx_frame_virt[next_tail], frame_size); 1193 1191 1194 nic_received_frame(nic, frame); 1192 1195 } else { … … 2203 2206 goto err_add_to_cat; 2204 2207 2208 rc = ddf_fun_add_to_category(fun, "pcap"); 2209 if (rc != EOK) { 2210 ddf_msg(LVL_ERROR, "Failed adding function to category pcap"); 2211 goto err_add_to_cat; 2212 } 2213 2205 2214 return EOK; 2206 2215 … … 2366 2375 2367 2376 memcpy(e1000->tx_frame_virt[tdt], data, size); 2368 2369 2377 tx_descriptor_addr->phys_addr = PTR_TO_U64(e1000->tx_frame_phys[tdt]); 2370 2378 tx_descriptor_addr->length = size; -
uspace/drv/nic/e1k/meson.build
r522eecf r34aad53d 27 27 # 28 28 29 deps = [ 'nic' ]29 deps = [ 'nic' , 'pcap' ] 30 30 src = files('e1k.c') -
uspace/drv/nic/virtio-net/virtio-net.c
r522eecf r34aad53d 43 43 44 44 #include <virtio-pci.h> 45 #include <pcapdump_iface.h> 45 46 46 47 #define NAME "virtio-net" … … 431 432 ddf_dev_get_name(dev)); 432 433 434 rc = ddf_fun_add_to_category(fun, "pcap"); 435 if (rc != EOK) { 436 ddf_msg(LVL_ERROR, "Failed adding function to category pcap"); 437 goto unbind; 438 } 439 433 440 return EOK; 434 441 -
uspace/lib/c/include/ipc/services.h
r522eecf r34aad53d 67 67 #define SERVICE_NAME_VBD "vbd" 68 68 #define SERVICE_NAME_VOLSRV "volsrv" 69 69 #define SERVICE_NAME_DUMPPCAP "dumppcap" 70 70 #endif 71 71 -
uspace/lib/meson.build
r522eecf r34aad53d 81 81 'minix', 82 82 'nettl', 83 'pcap', 83 84 'ofw', 84 85 'pcm', -
uspace/lib/nic/include/nic.h
r522eecf r34aad53d 44 44 #include <device/hw_res_parsed.h> 45 45 #include <ops/nic.h> 46 #include <pcap_iface.h> 46 47 47 48 #define DEVICE_CATEGORY_NIC "nic" … … 278 279 extern void nic_sw_period_stop(nic_t *); 279 280 281 /* pcapdump interface */ 282 extern pcap_iface_t *nic_get_pcap_iface(nic_t *); 283 280 284 #endif // __NIC_H__ 281 285 -
uspace/lib/nic/include/nic_driver.h
r522eecf r34aad53d 46 46 #include <nic/nic.h> 47 47 #include <async.h> 48 #include <pcapdump_iface.h> 48 49 49 50 #include "nic.h" … … 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
r522eecf r34aad53d 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
r522eecf r34aad53d 47 47 #include <ops/nic.h> 48 48 #include <errno.h> 49 #include <pcapdump_iface.h> 49 50 50 51 #include "nic_driver.h" … … 522 523 * calls it inside send_frame handler (with locked main lock) 523 524 */ 525 pcapdump_packet(nic_get_pcap_iface(nic_data), frame->data, frame->size); 524 526 fibril_rwlock_read_lock(&nic_data->rxc_lock); 525 527 nic_frame_type_t frame_type; … … 560 562 fibril_rwlock_write_unlock(&nic_data->stats_lock); 561 563 } 564 //pcapdump_packet(nic_get_pcap_iface(nic_data), frame->data, frame->size); 562 565 nic_release_frame(nic_data, frame); 563 566 } … … 648 651 nic_data->dev = device; 649 652 653 errno_t pcap_rc = pcapdump_init(nic_get_pcap_iface(nic_data)); 654 if (pcap_rc != EOK) { 655 printf("Failed creating pcapdump port\n"); 656 } 657 650 658 return nic_data; 651 659 } … … 1133 1141 } 1134 1142 1143 pcap_iface_t *nic_get_pcap_iface(nic_t *nic_data) 1144 { 1145 return &nic_data->pcapdump; 1146 } 1147 1135 1148 /** @} 1136 1149 */ -
uspace/lib/nic/src/nic_impl.c
r522eecf r34aad53d 40 40 #include <ipc/services.h> 41 41 #include <ns.h> 42 #include <pcapdump_iface.h> 42 43 #include "nic_driver.h" 43 44 #include "nic_ev.h" … … 179 180 return EBUSY; 180 181 } 181 182 pcapdump_packet(nic_get_pcap_iface(nic_data), data, size); 182 183 nic_data->send_frame(nic_data, data, size); 183 184 fibril_rwlock_read_unlock(&nic_data->main_lock); -
uspace/srv/locsrv/locsrv.c
r522eecf r34aad53d 1393 1393 categ_dir_add_cat(&cdir, cat); 1394 1394 1395 cat = category_new("pcap"); 1396 categ_dir_add_cat(&cdir, cat); 1395 1397 return true; 1396 1398 }
Note:
See TracChangeset
for help on using the changeset viewer.