pub struct Protocols(/* private fields */);rustcrypto only.Expand description
Which protocols the upper layer will accept (§4.10.3.1).
“The Interaction Model layer indicates to the Exchange Layer which Protocols it will accept. Any message for a Protocol ID that is not registered with the Exchange Layer SHALL be dropped.”
This is not bookkeeping. §4.10.5.2 opens an exchange for any unsolicited message with the I flag, and on the unsecured session that is any datagram at all — so the set of protocols a node answers is also the set an attacker can make it allocate for. A node that registers only what it serves refuses the rest before the exchange table is touched.
Implementations§
Source§impl Protocols
impl Protocols
Sourcepub const SECURE_CHANNEL: Self
pub const SECURE_CHANNEL: Self
Secure Channel (§4.11). Every node needs it: it is how sessions are established.
Sourcepub const INTERACTION_MODEL: Self
pub const INTERACTION_MODEL: Self
The Interaction Model (ch. 8) — what a node that serves clusters registers.
Sourcepub const USER_DIRECTED_COMMISSIONING: Self
pub const USER_DIRECTED_COMMISSIONING: Self
User Directed Commissioning (§5.3).
Sourcepub const FOR_TESTING: Self
pub const FOR_TESTING: Self
The range reserved for testing.
Sourcepub const DEVICE: Self
pub const DEVICE: Self
What an ordinary device registers: Secure Channel and the Interaction Model.
Sourcepub const fn contains(self, protocol: ProtocolId) -> bool
pub const fn contains(self, protocol: ProtocolId) -> bool
Whether protocol is registered.
A vendor-specific protocol id is never registered: §4.10.3.1’s registration is by identity, and this node serves none.