SatCat5
file_pcap.h File Reference

Detailed Description

File I/O for packet capture files (PCAP, PCAPNG)

This file defines classes for reading and writing common packet-capture files as SatCat5 packet streams (i.e., io::Readable and io::Writeable).

Supported file formats include:

This implementation supports Ethernet packets only, using minimalist metadata where required. When writing files, packet timestamps are drawn from a provided datetime::Clock object.

Definition in file file_pcap.h.

#include <hal_posix/file_io.h>
#include <satcat5/datetime.h>
Include dependency graph for file_pcap.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  satcat5::io::ReadPcap
 Read packet stream from a file. More...
 
class  satcat5::io::WritePcap
 Store packet stream to a file. More...
 
class  satcat5::io::WritePcapInterface
 Helper object for writing capture files with multiple sources. More...
 

Macros

#define SATCAT5_PCAP_BUFFSIZE   1600
 
constexpr u16 satcat5::io::LINKTYPE_ETHERNET = 1
 Define selected LinkType codes from the official registry: https://www.tcpdump.org/linktypes.html.
 
constexpr u16 satcat5::io::LINKTYPE_USER0 = 147
 Define selected LinkType codes from the official registry: https://www.tcpdump.org/linktypes.html.
 
constexpr u16 satcat5::io::LINKTYPE_AOS = 222
 Define selected LinkType codes from the official registry: https://www.tcpdump.org/linktypes.html.
 
constexpr u16 satcat5::io::LINKTYPE_USER (u16 x)
 Define selected LinkType codes from the official registry: https://www.tcpdump.org/linktypes.html.