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