Skip to main content

Module network_trace

Module network_trace 

Source
Expand description

Versioned data model for schedule-independent external network input.

This module deliberately contains no recorder, replayer, or scheduler hook. It defines the fail-closed trace envelopes and their framing so the runtime integration cannot accidentally reuse the schedule-coupled syscall event stream. NetworkTraceV1 is the original single-channel envelope; NetworkTraceV2 is the multi-channel form the recorder writes, and its reader upgrades v1 traces. The v3 and v4 framings extend the v2 payload with refused sends and with send waits respectively. Merely constructing a NetworkTraceConfig does not enable any behavior.

Structs§

NetworkChannelV1
The only channel supported by v1: one outbound TCP client connection.
NetworkChannelV2
One outbound TCP client connection in a v2 trace.
NetworkInputEventV1
One globally ordered external observation.
NetworkOutputV1
One contiguous recorded fragment of the expected outbound TCP byte stream.
NetworkOutputV4
One recorded outbound fragment, as a v4 trace holds it: a v1 fragment and, when a blocking send waited before Linux accepted it, that wait. Fragments of earlier versions have no wait.
NetworkReleaseV1
Conditions that must both hold before an input becomes observable.
NetworkSendWaitV4
How long a blocking send waited for buffer space before Linux accepted one fragment of it.
NetworkTraceConfig
Configuration reserved for the future network recorder/replayer seam.
NetworkTraceV1
Version-one schedule-independent network input trace.
NetworkTraceV2
Version-two schedule-independent network trace: v1’s release model over several channels.

Enums§

NetworkAddressV1
Internet address recorded without host-layout sockaddr padding.
NetworkEndpointRoleV1
Connection role admitted by v1. Server-side accept needs a different identity and arrival model and is intentionally not representable.
NetworkInputKindV1
Supported external observations for the initial TCP byte-stream model.
NetworkTraceCodecError
Failure to decode or encode the framed v1 representation.
NetworkTraceConfigError
Invalid combinations in NetworkTraceConfig.
NetworkTraceMode
Whether the future runtime integration records or replays external input.
NetworkTraceValidationError
Semantically invalid trace.
NetworkTransportV1
Transport admitted by the v1 trace envelope.

Constants§

NETWORK_TRACE_MAGIC
The on-disk format magic. The version is stored in the following four bytes.
NETWORK_TRACE_VERSION_V1
The first network trace format; still accepted and upgraded on read.
NETWORK_TRACE_VERSION_V2
The trace format written by the runtime recorder when no nonblocking send was refused.
NETWORK_TRACE_VERSION_V3
The v2 format, extended with empty outbound fragments that record a nonblocking send refused with EAGAIN. The recorder writes it only for a trace that holds one, so a reader that predates it rejects only those.
NETWORK_TRACE_VERSION_V4
The v3 format, extended with the wait of each outbound fragment that a blocking send waited for. The recorder writes it only for a trace that holds one.

Functions§

epoch_global_time
The absolute GlobalTime starting point for epoch; see NetworkTraceV1::epoch_global_time.