pub enum ControlFrame {
Goodbye {
departing_id: NodeId,
reason: u8,
},
Rekey,
Ping {
nonce: u64,
},
Pong {
nonce: u64,
},
PeerInfo {
x25519_pub: [u8; 32],
friendly_name: String,
},
PluginPayload {
kind: String,
body: Bytes,
},
}Expand description
Multiplexed control message.
Layout: control_type(1) + body (variable, depends on type).
Mesh-essential variants (routing, liveness, identity) live here
directly. Optional features such as user messaging are carried
inside ControlFrame::PluginPayload so the daemon can be built
without those plugins compiled in.
Variants§
Goodbye
Graceful disconnect notification.
Rekey
Request that the session be rekeyed.
Ping
Ping carrying an opaque nonce.
Pong
Pong echoing a ping nonce.
PeerInfo
Identity metadata exchanged once after the session is established
so that peers can address each other by NodeId and end-to-end
encrypt to the recipient’s static X25519 key.
Fields
PluginPayload
Generic plugin-defined payload.
kind is an ASCII identifier (≤ 255 bytes) registered by a
pim-plugin-style
plugin (e.g. "messaging.msg"). body is plugin-private and
opaque to the daemon — typically further encrypted/serialized
according to the plugin’s own scheme.
Wire layout:
0x08
kind_len (u8, 1..=255)
kind (kind_len bytes, ASCII)
body_len (u16 BE)
body (body_len bytes)Trait Implementations§
Source§impl Clone for ControlFrame
impl Clone for ControlFrame
Source§fn clone(&self) -> ControlFrame
fn clone(&self) -> ControlFrame
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ControlFrame
impl Debug for ControlFrame
Source§impl FrameCodec for ControlFrame
impl FrameCodec for ControlFrame
Source§impl PartialEq for ControlFrame
impl PartialEq for ControlFrame
Source§fn eq(&self, other: &ControlFrame) -> bool
fn eq(&self, other: &ControlFrame) -> bool
self and other values to be equal, and is used by ==.