Changeset e846bec in mainline for uspace/lib/nic/src/nic_driver.c


Ignore:
Timestamp:
2024-03-10T10:46:00Z (10 months ago)
Author:
Nataliia Korop <n.corop08@…>
Children:
e4cc266
Parents:
325ea9c (diff), 6eab537d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'topic/packet-capture' into topic/packet-capture-list

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/nic/src/nic_driver.c

    r325ea9c re846bec  
    4747#include <ops/nic.h>
    4848#include <errno.h>
     49#include <pcapdump_iface.h>
    4950
    5051#include "nic_driver.h"
     
    522523         *               calls it inside send_frame handler (with locked main lock)
    523524         */
     525        pcapdump_packet(nic_get_pcap_iface(nic_data), frame->data, frame->size);
    524526        fibril_rwlock_read_lock(&nic_data->rxc_lock);
    525527        nic_frame_type_t frame_type;
     
    560562                fibril_rwlock_write_unlock(&nic_data->stats_lock);
    561563        }
     564        //pcapdump_packet(nic_get_pcap_iface(nic_data), frame->data, frame->size);
    562565        nic_release_frame(nic_data, frame);
    563566}
     
    647650
    648651        nic_data->dev = device;
     652        errno_t pcap_rc  = pcapdump_init(nic_get_pcap_iface(nic_data));
     653
     654        if (pcap_rc != EOK) {
     655                printf("Failed creating pcapdump port\n");
     656        }
    649657
    650658        return nic_data;
Note: See TracChangeset for help on using the changeset viewer.