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


Ignore:
Timestamp:
2024-06-27T08:07:31Z (6 days ago)
Author:
GitHub <noreply@…>
Parents:
af3235d (diff), 2a0c827c (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.
git-author:
boba-buba <120932204+boba-buba@…> (2024-06-27 08:07:31)
git-committer:
GitHub <noreply@…> (2024-06-27 08:07:31)
Message:

Merge 2a0c827c42eafb070de3bbe3c98a1d8a2b77d719 into af3235d07726dfc8b146c760a25544ea3ac29f9d

File:
1 edited

Legend:

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

    raf3235d r87488278  
    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}
     
    648651        nic_data->dev = device;
    649652
     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
    650658        return nic_data;
    651659}
     
    11331141}
    11341142
     1143pcap_iface_t *nic_get_pcap_iface(nic_t *nic_data)
     1144{
     1145        return &nic_data->pcapdump;
     1146}
     1147
    11351148/** @}
    11361149 */
Note: See TracChangeset for help on using the changeset viewer.