Changeset 87b490e3 in mainline for uspace/lib/pcap/include/pcap.h
- Timestamp:
- 2024-12-13T08:44:05Z (10 months ago)
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/pcap/include/pcap.h
rfb31682 r87b490e3 33 33 /** 34 34 * @file 35 * @brief Headers and functions for .pcap file and packets to be dumped35 * @brief Headers and functions for PCAP format and packets to be dumped. 36 36 */ 37 37 … … 46 46 #include <errno.h> 47 47 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. */ 53 53 54 54 #define PCAP_LINKTYPE_ETHERNET 1 /* IEEE 802.3 Ethernet */ … … 56 56 #define PCAP_LINKTYPE_IEEE802_11_RADIO 127 57 57 #define PCAP_LINKTYPE_USB_LINUX_MMAPPED 220 58 #define WIRESHARK_EX 0xc59 #define WIRESHARK_SNAPLEN 0xffff60 58 61 59 /** Header of the .pcap file. */ … … 80 78 typedef struct pcap_writer pcap_writer_t; 81 79 82 /** Operations for dumper. */80 /** Writing operations for destination buffer. */ 83 81 typedef struct { 84 82 errno_t (*open)(pcap_writer_t *, const char *); … … 89 87 } pcap_writer_ops_t; 90 88 91 /** Interface for working with .pcap file. */89 /** Structure for writing data to the destination buffer. */ 92 90 struct pcap_writer { 91 /** Writing buffer. */ 93 92 void *data; 93 /** Writing operations for working with the buffer. */ 94 94 pcap_writer_ops_t *ops; 95 95 };
Note:
See TracChangeset
for help on using the changeset viewer.