Changeset 3a4c6d9 in mainline for uspace/lib/nic/src/nic_impl.c


Ignore:
Timestamp:
2025-11-14T16:58:23Z (3 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
1ec732a
Parents:
d101368
git-author:
Nataliia Korop <n.corop08@…> (2025-11-14 16:57:02)
git-committer:
Jiri Svoboda <jiri@…> (2025-11-14 16:58:23)
Message:

Packet capture (thx Nataliia Korop)

File:
1 edited

Legend:

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

    rd101368 r3a4c6d9  
    4040#include <ipc/services.h>
    4141#include <ns.h>
     42#include <pcapdump_drv_iface.h>
    4243#include "nic_driver.h"
    4344#include "nic_ev.h"
     
    179180                return EBUSY;
    180181        }
    181 
     182        pcapdump_packet(nic_get_pcap_dumper(nic_data), data, size);
    182183        nic_data->send_frame(nic_data, data, size);
    183184        fibril_rwlock_read_unlock(&nic_data->main_lock);
     
    843844}
    844845
     846errno_t nic_fun_add_to_cats(ddf_fun_t *fun)
     847{
     848        errno_t rc;
     849        rc = ddf_fun_add_to_category(fun, DEVICE_CATEGORY_NIC);
     850        if (rc != EOK)
     851                return rc;
     852
     853        rc = ddf_fun_add_to_category(fun, "pcap");
     854        if (rc != EOK) {
     855                return rc;
     856        }
     857        return EOK;
     858}
     859
    845860/** @}
    846861 */
Note: See TracChangeset for help on using the changeset viewer.