Ignore:
Timestamp:
2024-12-13T08:32:55Z (10 months ago)
Author:
Nataliia Korop <n.corop08@…>
Children:
8765039
Parents:
91042127
git-author:
Nataliia Korop <n.corop08@…> (2024-03-10 09:38:44)
git-committer:
Nataliia Korop <n.corop08@…> (2024-12-13 08:32:55)
Message:

moved to nic, fixed all except addressing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/nic/virtio-net/virtio-net.c

    r91042127 r9ce251c7  
    4343
    4444#include <virtio-pci.h>
    45 #include "pcapdump_iface.h"
    46 #include "pcap_iface.h"
     45#include <pcapdump_iface.h>
     46
    4747#define NAME    "virtio-net"
    4848
     
    9898                if (frame) {
    9999                        memcpy(frame->data, &hdr[1], len - sizeof(*hdr));
    100                         pcapdump_packet(nic_get_pcap_iface(nic), frame->data, frame->size);
    101100                        nic_received_frame(nic, frame);
    102101                } else {
     
    359358        /* Copy packet data into the buffer just past the header */
    360359        memcpy(&hdr[1], data, size);
    361         pcapdump_packet(nic_get_pcap_iface(nic), data, size);
     360
    362361        /*
    363362         * Set the descriptor, put it into the virtqueue and notify the device
     
    439438            ddf_dev_get_name(dev));
    440439
    441         errno_t pcap_rc  = pcapdump_init(nic_get_pcap_iface(nic));
    442 
    443         if (pcap_rc != EOK) {
    444                 printf("Failed creating pcapdump port\n");
    445         }
    446440        rc = ddf_fun_add_to_category(fun, "pcap");
    447         if (rc != EOK)
     441        if (rc != EOK) {
     442                ddf_msg(LVL_ERROR, "Failed adding function to category pcap");
    448443                goto unbind;
     444        }
    449445
    450446        return EOK;
Note: See TracChangeset for help on using the changeset viewer.