![]() |
dfx 0.1.0
Linux-based dynamic dataflow executor
|
Stateless PCAPNG block writer helpers for dfx captures. More...
#include <dfx-pcapng/Writer.hpp>
Classes | |
| struct | Entry |
| Captured message event used to generate a packet block. More... | |
| struct | Info |
| Minimal endpoint identifier for message routing metadata. More... | |
| struct | NodeInfo |
| Minimal node identity used for PCAPNG metadata. More... | |
Static Public Member Functions | |
| static std::vector< uint8_t > | writeSectionHeaderBlock (std::string_view hardware, std::string_view os, std::string_view userapp) |
| Serialize a PCAPNG Section Header Block (SHB). | |
| static std::vector< uint8_t > | writeInterfaceDescriptionBlock (Core::Kind kind) |
| Serialize a PCAPNG Interface Description Block (IDB). | |
| static std::vector< uint8_t > | writeEnhancedPacketBlock (Entry const &entry) |
| Serialize a PCAPNG Enhanced Packet Block (EPB) for a captured message event. | |
Stateless PCAPNG block writer helpers for dfx captures.
Writer is a collection of helper functions used to serialize dfx capture data into PCAPNG binary blocks (Wireshark-readable).
Since dfx is not a network protocol, message transfers do not correspond to real link-layer frames. Instead, a custom encapsulation format is used inside PCAPNG packets.
The Writer encodes dfx message events using the following link-layer types:
These are standard "user-defined" link-layer identifiers provided by PCAPNG. The actual packet payload format is dfx-specific.
wireshark-dissector/dfx.lua(located at the root of the repository)
This dissector understands the custom dfx packet layout embedded inside DLT_USER0 / DLT_USER1 frames and renders node/port/message information in a human-readable way.
Without this dissector, Wireshark will only display raw packet bytes.
|
static |
Serialize a PCAPNG Enhanced Packet Block (EPB) for a captured message event.
Encodes a single message transfer as an Enhanced Packet Block. The resulting EPB contains:
| entry | Captured message event. |
|
static |
Serialize a PCAPNG Interface Description Block (IDB).
PCAPNG packet blocks reference an interface id. In a dfx capture, the interface concept is used to model message categories/types (represented by Core::Kind).
Callers typically emit one IDB per interface they intend to reference later.
| kind | Port/message kind used to describe the "interface" type. |
|
static |
Serialize a PCAPNG Section Header Block (SHB).
The Section Header Block starts a PCAPNG stream and describes the capture environment. The provided strings are typically encoded as SHB options
Callers usually write exactly one SHB at the beginning of a capture stream.
| hardware | Hardware description string (may be empty). |
| os | Operating system description string (may be empty). |
| userapp | User application/scenario description string (may be empty). |