Changeset 86f862c in mainline


Ignore:
Timestamp:
2024-02-19T06:27:40Z (2 months ago)
Author:
Nataliia Korop <n.corop08@…>
Children:
f2cb80a
Parents:
6b66de6b
Message:

small typos and ccheck

Location:
uspace
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/nic/e1k/e1k.c

    r6b66de6b r86f862c  
    176176        /** Lock for EEPROM access */
    177177        fibril_mutex_t eeprom_lock;
    178 
    179178
    180179} e1000_t;
  • uspace/lib/nic/include/nic.h

    r6b66de6b r86f862c  
    281281
    282282/* pcapdump interface */
    283 extern pcap_iface_t* nic_get_pcap_iface(nic_t *);
     283extern pcap_iface_t *nic_get_pcap_iface(nic_t *);
    284284
    285285#endif // __NIC_H__
  • uspace/lib/nic/src/nic_driver.c

    r6b66de6b r86f862c  
    11331133}
    11341134
    1135 pcap_iface_t* nic_get_pcap_iface(nic_t *nic_data) {
    1136 
     1135pcap_iface_t *nic_get_pcap_iface(nic_t *nic_data)
     1136{
    11371137        return &nic_data->pcapdump;
    11381138}
  • uspace/lib/pcap/src/pcap.c

    r6b66de6b r86f862c  
    5252void pcap_set_time(pcap_packet_header_t *header, bool nano) // maybe without bool nano as nano is in pcapng
    5353{
    54         time_t sec = time(NULL);
    55         header->seconds_stamp = (uint32_t)sec;
    56         header->magic_stamp = nano ? header->seconds_stamp / 1000000000 : header->seconds_stamp / 1000000;
     54        struct timespec ts;
     55        getrealtime(&ts);
     56        header->seconds_stamp = (uint32_t)ts.tv_sec;
     57        header->magic_stamp = (uint32_t)ts.tv_nsec / 1000;
    5758}
    5859
  • uspace/lib/pcap/src/pcap_iface.c

    r6b66de6b r86f862c  
    7777void pcap_add_packet(const void *data, size_t size)
    7878{
    79         if (&pcap_writer.data == NULL)
     79        if (pcap_writer.data == NULL)
    8080                return;
    8181        pcap_writer_add_packet(&pcap_writer, data, size);
Note: See TracChangeset for help on using the changeset viewer.