Writes records to a pcap file as they arrive.
More...
#include <pcap.h>
|
| | PcapWriter ()=default |
| |
| | ~PcapWriter () |
| |
| | PcapWriter (const PcapWriter &)=delete |
| |
| PcapWriter & | operator= (const PcapWriter &)=delete |
| |
| std::expected< void, std::string > | open (const std::filesystem::path &path) |
| | Creates path and writes the file header, with nanosecond timestamps.
|
| |
| std::expected< void, std::string > | write (int64_t timestampNs, std::span< const uint8_t > bytes) |
| | Appends one frame.
|
| |
| void | close () |
| | Flushes and closes the file. Called by the destructor when not called before.
|
| |
Writes records to a pcap file as they arrive.
◆ PcapWriter() [1/2]
| mm::capture::PcapWriter::PcapWriter |
( |
| ) |
|
|
default |
◆ ~PcapWriter()
| mm::capture::PcapWriter::~PcapWriter |
( |
| ) |
|
◆ PcapWriter() [2/2]
| mm::capture::PcapWriter::PcapWriter |
( |
const PcapWriter & |
| ) |
|
|
delete |
◆ close()
| void mm::capture::PcapWriter::close |
( |
| ) |
|
Flushes and closes the file. Called by the destructor when not called before.
◆ open()
| std::expected< void, std::string > mm::capture::PcapWriter::open |
( |
const std::filesystem::path & |
path | ) |
|
Creates path and writes the file header, with nanosecond timestamps.
◆ operator=()
◆ write()
| std::expected< void, std::string > mm::capture::PcapWriter::write |
( |
int64_t |
timestampNs, |
|
|
std::span< const uint8_t > |
bytes |
|
) |
| |
The documentation for this class was generated from the following files: