Changeset 87b490e3 in mainline for uspace/lib/pcap/include/pcap.h


Ignore:
Timestamp:
2024-12-13T08:44:05Z (10 months ago)
Author:
Nataliia Korop <n.corop08@…>
Children:
420b13d
Parents:
fb31682
git-author:
Nataliia Korop <n.corop08@…> (2024-11-30 19:08:32)
git-committer:
Nataliia Korop <n.corop08@…> (2024-12-13 08:44:05)
Message:

docs comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/pcap/include/pcap.h

    rfb31682 r87b490e3  
    3333/**
    3434 * @file
    35  * @brief Headers and functions for .pcap file and packets to be dumped
     35 * @brief Headers and functions for PCAP format and packets to be dumped.
    3636 */
    3737
     
    4646#include <errno.h>
    4747
    48 #define PCAP_MAGIC_MICRO 0xA1B2C3D4
    49 #define PCAP_MAGIC_NANO 0xA1B23C4D
    50 #define PCAP_MAJOR_VERSION 0x0002
    51 #define PCAP_MINOR_VERSION 0x0004
    52 #define PCAP_SNAP_LEN 0x00040000
     48#define PCAP_MAGIC_MICRO 0xA1B2C3D4 /** Sets time in seconds and microseconds in packet records. */
     49#define PCAP_MAGIC_NANO 0xA1B23C4D /** Sets time in seconds and nanoseconds in packet records. */
     50#define PCAP_MAJOR_VERSION 0x0002  /** Major version of the PCAP format. */
     51#define PCAP_MINOR_VERSION 0x0004  /** Miner version of the PCAP format. */
     52#define PCAP_SNAP_LEN 0x00040000  /** Maximum number of bytes that can be captured for one packet record. */
    5353
    5454#define PCAP_LINKTYPE_ETHERNET 1    /* IEEE 802.3 Ethernet */
     
    5656#define PCAP_LINKTYPE_IEEE802_11_RADIO 127
    5757#define PCAP_LINKTYPE_USB_LINUX_MMAPPED 220
    58 #define WIRESHARK_EX 0xc
    59 #define WIRESHARK_SNAPLEN 0xffff
    6058
    6159/** Header of the .pcap file. */
     
    8078typedef struct pcap_writer pcap_writer_t;
    8179
    82 /** Operations for dumper. */
     80/** Writing operations for destination buffer. */
    8381typedef struct {
    8482        errno_t (*open)(pcap_writer_t *, const char *);
     
    8987} pcap_writer_ops_t;
    9088
    91 /** Interface for working with .pcap file. */
     89/** Structure for writing data to the destination buffer. */
    9290struct pcap_writer {
     91        /** Writing buffer. */
    9392        void *data;
     93        /** Writing operations for working with the buffer. */
    9494        pcap_writer_ops_t *ops;
    9595};
Note: See TracChangeset for help on using the changeset viewer.