Skip to main content

Crate modem_mgmt

Crate modem_mgmt 

Source
Expand description

The management plane: everything the ICD’s control channel used to carry — as a library, for any driver that links the contract (#119).

Decision D2 deleted that channel entirely — HELLO, capability negotiation, both snapshot protocols, TX delivery states, the security state model — on the claim that all of it is better expressed as ordinary Zenoh traffic under the keyspace-v2 convention. This module is that claim, in code.

Two planes, kept apart deliberately (docs/architecture.md §4.1, §4.6):

  • The data plane carries opaque batches and never links against zenoh. CI holds that with a dependency guard.
  • The management plane is an ordinary Zenoh client surface on the driver’s own session. It is feature-gated, so a driver built without it still moves data and the data-path tests never need it.

What that buys, beyond tidiness: an operator gets zenctl on day one, the contract is linted at build time by zenkey-build rather than written prose, and capability negotiation becomes a query anyone can make instead of a handshake only the link can perform.

Re-exports§

pub use host::Host;
pub use host::Node;
pub use host::Plane;
pub use plane::LaneView;
pub use plane::SchedulerCounters;
pub use plane::SduPlane;
pub use telemetry::subjects as telemetry_subjects;

Modules§

conformance
The wire-level half of the conformance kit (#131): a running management plane, probed as an operator’s tool would.
host
One daemon, every device on the host (#118).
plane
The SDU plane as the management plane reads it (#119).
telemetry
Counters, published as telemetry.

Structs§

Ack
The reply of a write that has nothing to read back: persist’s.
ActionEvent
events/modem/device/{device}/action/{event_id} — an operator action ran, or was refused (#129). Every invocation is one, so the record shows the decisions an operator made and the scripts that were refused rather than billed. The attribution is caller-claimed, never authentication (I5).
ActionOutcome
What an action did and what it cost (#129): the reply, so an operator sees the bill of an operation they asked for.
ActionRequest
@rpc/modem/device/{device}/action/{name}’s body (#129): the action’s arguments, with the configuration plane’s value kinds.
Capabilities
What the medium behind a device can carry.
DestinationState
state/modem/device/{device}/destination/{destination} — one neighbour a netdev’s radio reports it can reach (#137): a DLEP destination, with the radio’s metrics for the link toward it.
DeviceFault
events/modem/device_fault/{event_id} — the medium’s own words.
EndpointLane
One lane, as an endpoint document names it.
EndpointState
state/modem/endpoint/{device}/{endpoint} — one remote, and its lanes.
Identity
state/modem/device/{device}/identity — what the device is, with RFC 8348’s field names (#122). Every field optional and #[non_exhaustive]: a device says what it knows. Subscriber identifiers never appear here — IMSI, ICCID, MSISDN identify a person’s subscription, not equipment (invariant I5); the equipment identifier does, because the gateway keys its endpoints by it.
IdentityChange
events/modem/device/{device}/identity_change/{event_id} — the device behind a name changed under a running driver (#122): a terminal swapped, or its firmware updated.
Lane
One lane, in full.
LaneTable
@rpc/modem/device/{device}/sdu/lanes — the same facts, on demand.
LinkState
state/modem/device/{device}/sdu/link — what one device’s medium is and what it carries.
Mgmt
A running management plane.
MgmtConfig
How to reach the local bus.
Oper
state/modem/device/{device}/oper — RFC 2863’s operational status, typed (#121). Only the states something produces are declared: up, down, notPresent, unknown; a coverage gap is down with recoverable: true, never dormant, because Linux’s operstate defines dormant as L1 up.
OperChange
events/modem/device/{device}/oper_change/{event_id} — the operational status changed (#121): what the device says, or what the driver knows — a medium that failed a lane operation is down and not recoverable.
RadioState
state/modem/device/{device}/radio — where a bearer stands with its network (#123): registration and access technology, for a device that registers with one. A point-to-point radio has none, and the subject is gated on capability:registration for it.
SecurityState
state/modem/device/{device}/security — properties, never a boolean.
Sensor
state/modem/sensor — the producer’s registration document (zenkey RFC 04 §5): versions, and per device the capability: predicates that hold here (v1.41). The registry says which surfaces are conditional and on what; this says which conditions hold on this host, which is what lets a consumer read a gated subject’s silence as honest (#122, #124).
UsrPwd
A usrpwd identity for the management session (#98).

Enums§

Duplex
Whether the medium can transmit and receive at once.

Constants§

PRODUCER
The producer name every driver of this contract publishes under.

Statics§

PROFILE
The application identity every key is minted under.

Functions§

serve
Serve every device on the host: open the session, declare presence, and start publishing. The one call a driver makes (#119); Mgmt::start is the same function under the name the daemon has always used.