pub enum Message {
Register {
node: NodeId,
counter: u64,
},
Lookup {
node: NodeId,
},
PeerInfo {
node: NodeId,
reflexive: SocketAddr,
record: Option<Record>,
},
NotFound {
node: NodeId,
},
PunchHint {
node: NodeId,
reflexive: SocketAddr,
},
RelaySend {
src: NodeId,
dst: NodeId,
payload: Vec<u8>,
},
RelayDeliver {
src: NodeId,
payload: Vec<u8>,
},
RegisterSigned {
record: Record,
},
RegisterAuth {
node: NodeId,
counter: u64,
mac: [u8; 16],
},
}Expand description
A rendezvous/relay control message. See the 2b spec for direction/semantics.
Variants§
Register
Fields
Lookup
PeerInfo
Fields
§
reflexive: SocketAddrNotFound
PunchHint
RelaySend
RelayDeliver
RegisterSigned
A self-authenticating registration: the relay verifies record
itself rather than trusting an unauthenticated counter.
RegisterAuth
A symmetric MAC-authenticated registration for rootless relay/rendezvous:
verified via verify_register_mac under obf_psk to prevent false upgrades.
Trait Implementations§
impl Eq for Message
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin for Message
impl UnwindSafe for Message
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