|
DeterministicESPAsyncWebServer v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
|
libpcap file framing - the classic global + per-record headers, link-type agnostic. More...
#include <stddef.h>#include <stdint.h>Go to the source code of this file.
Namespaces | |
| namespace | detpcap_detail |
Macros | |
| #define | DET_PCAP_GLOBAL_HDR_LEN 24 |
| libpcap header sizes. | |
| #define | DET_PCAP_REC_HDR_LEN 16 |
| #define | DET_DLT_IEEE802_11 105 |
| Common libpcap DLT link-layer types. | |
| #define | DET_DLT_CAN_SOCKETCAN 227 |
| Linux SocketCAN classic/FD frames. | |
| #define | DET_DLT_ETHERNET 1 |
| IEEE 802.3 Ethernet. | |
| #define | DET_DLT_IEEE802_15_4_NOFCS 230 |
| raw 802.15.4 MAC frame, no FCS | |
| #define | DET_DLT_IEEE802_15_4_TAP 283 |
| 802.15.4 with a TAP pseudo-header (RSSI / channel TLVs) | |
Functions | |
| void | detpcap_detail::wr32le (uint8_t *p, uint32_t v) |
| void | detpcap_detail::wr16le (uint8_t *p, uint16_t v) |
| size_t | det_pcap_global_header (uint8_t *out, size_t cap, uint32_t linktype) |
| Write the 24-byte libpcap global header (little-endian, microsecond timestamps). | |
| size_t | det_pcap_record_header (uint8_t *out, size_t cap, uint32_t ts_sec, uint32_t ts_usec, uint32_t caplen, uint32_t origlen) |
| Write a 16-byte libpcap record header for one captured frame. | |
libpcap file framing - the classic global + per-record headers, link-type agnostic.
One owner for the PCAP framing shared by every capture feature (Wi-Fi promiscuous capture, CAN / bus listen-only capture, ...): each writes its frames with the matching DLT link type so the forwarded stream is a valid .pcap a wired Wireshark / tcpdump opens directly. Header-only and pure (little-endian byte writes, no heap, no stdlib), host-identical.
Definition in file pcap.h.
| #define DET_DLT_IEEE802_11 105 |
| #define DET_DLT_CAN_SOCKETCAN 227 |
| #define DET_DLT_IEEE802_15_4_NOFCS 230 |
| #define DET_DLT_IEEE802_15_4_TAP 283 |
|
inline |
Write the 24-byte libpcap global header (little-endian, microsecond timestamps).
| linktype | the DLT_* link type of the frames that follow (e.g. DET_DLT_IEEE802_11). |
cap is too small. Definition at line 55 of file pcap.h.
References DET_PCAP_GLOBAL_HDR_LEN, detpcap_detail::wr16le(), and detpcap_detail::wr32le().
|
inline |
Write a 16-byte libpcap record header for one captured frame.
cap is too small. Definition at line 73 of file pcap.h.
References DET_PCAP_REC_HDR_LEN, and detpcap_detail::wr32le().