Slick Sim 0.10.1
Exchange simulator that shadows real venues for risk-free strategy testing
Loading...
Searching...
No Matches
pcap_reader.hpp File Reference
#include <zlib.h>
#include <zstd.h>
#include <algorithm>
#include <bit>
#include <cerrno>
#include <charconv>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <format>
#include <new>
#include <stdexcept>
#include <string>
#include <string_view>
#include <system_error>
#include <vector>
Include dependency graph for pcap_reader.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  slick::sim::md_feed::PcapPacket
 One UDP datagram read from a capture. More...
class  slick::sim::md_feed::detail::CaptureStream
 A capture file's bytes: as stored, or decompressed on the fly from .zst (zstd) or .gz (gzip, members back to back included). More...
class  slick::sim::md_feed::PcapReader
 Reads UDP payloads, in capture order, out of one pcap or pcapng file. More...

Namespaces

namespace  slick
namespace  slick::sim
namespace  slick::sim::md_feed
namespace  slick::sim::md_feed::detail

Functions

uint32_t slick::sim::md_feed::parse_ipv4 (const std::string &text)
 Packs a dotted quad such as "224.0.31.1" into host byte order, the form PcapPacket::dst_addr uses.
bool slick::sim::md_feed::detail::has_suffix (std::string_view path, std::string_view suffix) noexcept
 path ends in the lowercase suffix, in any case: a.PCAP.ZST is zstd too.
std::string slick::sim::md_feed::detail::errno_text (int error)
 errno's text, without strerror's thread-safety warning on MSVC.
std::FILE * slick::sim::md_feed::detail::open_shared (const std::string &path)
 Opens for reading, shared: two readers may hold one capture (fopen_s would lock it).