pub enum ControlFrame {
IpRequest {
requester_id: NodeId,
},
IpAssign {
assigned_ip: [u8; 4],
subnet_mask: u8,
gateway_ip: [u8; 4],
lease_seconds: u32,
},
Goodbye {
departing_id: NodeId,
reason: u8,
},
Rekey,
Ping {
nonce: u64,
},
Pong {
nonce: u64,
},
PeerInfo {
x25519_pub: [u8; 32],
friendly_name: String,
},
Message {
message_id: [u8; 16],
timestamp_ms: u64,
ciphertext: Vec<u8>,
},
MessageAck {
message_id: [u8; 16],
ack_kind: u8,
},
}Expand description
Multiplexed control message.
Layout: control_type(1) + body (variable, depends on type)
Variants§
IpRequest
Request an address lease from a gateway.
IpAssign
Lease configuration returned by a gateway.
Fields
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
Message
End-to-end encrypted user message.
Carried inside a MeshDataFrame with both
DataFlags::IS_CONTROL and
DataFlags::IS_E2E set. ciphertext
is the literal output of pim_crypto::e2e_encrypt.
Fields
MessageAck
Receipt for a previously sent ControlFrame::Message.
Trait Implementations§
Source§impl Clone for ControlFrame
impl Clone for ControlFrame
Source§fn clone(&self) -> ControlFrame
fn clone(&self) -> ControlFrame
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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
impl Eq for ControlFrame
impl StructuralPartialEq for ControlFrame
Auto Trait Implementations§
impl Freeze for ControlFrame
impl RefUnwindSafe for ControlFrame
impl Send for ControlFrame
impl Sync for ControlFrame
impl Unpin for ControlFrame
impl UnsafeUnpin for ControlFrame
impl UnwindSafe for ControlFrame
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more