Crate umsh_node_mgmt

Crate umsh_node_mgmt 

Source
Expand description

The Node Management binding: ULCP over the mesh.

A node that supports node management is configured and observed over the mesh itself, in the same command grammar and property model [umsh_ulcp] defines for the local link. Node Management Request (payload type 8) and Node Management Response (payload type 9) payloads carry ordinary ULCP frames between an administrator — a node listed in the device’s PROP_DEV_ADMINS — and the device. docs/protocol/src/app-node-management.md specifies it.

The binding relies on exactly what secure unicast guarantees — an authenticated source, confidentiality, and replay protection — and adds what the ULCP grammar needs on a transport that promises neither delivery nor ordering:

  • a token correlating a response with its request, in place of the TID of the local bindings;
  • retained responses, so a retransmission is answered again rather than executed again;
  • cursors, carrying a read larger than one frame across as many exchanges as it takes, with no per-read state on the device.

Both engines are sans-IO: they own no transport, no clock, and no buffers beyond their own state. The caller sends the payloads they hand out, feeds back the ones that arrive, and supplies the time. Authorization is likewise the caller’s: a request reaches device::DeviceEngine only after its source has been checked against the administrator list.

Re-exports§

pub use admin::Exchange;
pub use admin::Failure;
pub use admin::Outcome;
pub use admin::Reassembly;
pub use admin::Step;
pub use device::DeviceEngine;
pub use device::Dispatch;
pub use device::DropReason;
pub use device::Ingress;
pub use device::Produced;
pub use device::PublicKey;
pub use envelope::Envelope;
pub use envelope::EnvelopeError;
pub use envelope::Token;
pub use fragment::continuable;
pub use fragment::produce;
pub use fragment::trailing;
pub use fragment::trailing_offset;
pub use node_adapter::BeginError;
pub use node_adapter::ManagementError;
pub use node_adapter::NodeManager;
pub use node_adapter::Progress;

Modules§

admin
The administrator side of an exchange: token choice, retransmission pacing, and the cursor continuation loop.
device
The device side of an exchange: tokens, retained responses, and cursors.
envelope
The Node Management payload envelope.
fragment
Where a response frame can be cut, and which requests may be continued.
node_adapter
Managing a device over the mesh, from a node.

Constants§

PAYLOAD_MAX
The Node Management payload an administrator sizes its requests against.
REQUEST_MAX
The largest request frame that fits a payload once its envelope is accounted for.