Skip to main content

SecurityBuiltinStack

Struct SecurityBuiltinStack 

Source
pub struct SecurityBuiltinStack {
    pub stateless_writer: StatelessMessageWriter,
    pub stateless_reader: StatelessMessageReader,
    pub volatile_writer: VolatileSecureMessageWriter,
    pub volatile_reader: VolatileSecureMessageReader,
    /* private fields */
}
Expand description

Bundle aus den vier Security-Builtin-Endpoints.

Fields§

§stateless_writer: StatelessMessageWriter

Stateless-Auth-Writer (Spec §7.4.4).

§stateless_reader: StatelessMessageReader

Stateless-Auth-Reader.

§volatile_writer: VolatileSecureMessageWriter

Volatile-Secure-Writer (Spec §7.4.5).

§volatile_reader: VolatileSecureMessageReader

Volatile-Secure-Reader.

Implementations§

Source§

impl SecurityBuiltinStack

Source

pub fn new(local_prefix: GuidPrefix, vendor_id: VendorId) -> Self

Erzeugt einen frischen Stack ohne Remote-Proxies.

Source

pub fn local_prefix(&self) -> GuidPrefix

Lokaler GuidPrefix.

Source

pub fn handle_remote_endpoints(&mut self, peer: &DiscoveredParticipant)

Verdrahtet Reader-/Writer-Proxies auf Basis der vom Peer annoncierten BuiltinEndpointSet-Bits (Spec §7.4.7.1):

  • Bits 22+23 (PARTICIPANT_STATELESS_MESSAGE_*) → Stateless-Slot
  • Bits 24+25 (PARTICIPANT_VOLATILE_MESSAGE_SECURE_*) → Volatile-Slot

Wir routen ueber metatraffic_unicast_locator (PID 0x0032), fallback auf default_unicast_locator. Selbst-Discovery (peer.sender_prefix == self.local_prefix) wird ignoriert.

Source

pub fn on_participant_lost(&mut self, prefix: GuidPrefix) -> (usize, usize)

Cleanup nach SPDP-Lease-Timeout: alle Proxies dieses Prefixes entfernen. Liefert (stateless_pairs_removed, volatile_pairs_removed).

Source

pub fn poll( &mut self, now: Duration, ) -> Result<Vec<OutboundDatagram>, WireError>

Tick ueber alle Endpoints. Liefert HEARTBEATs/Resends vom Volatile-Writer plus ACKNACK/NACK_FRAG vom Volatile-Reader. Stateless hat keinen Tick (BestEffort, kein Resend-State).

§Errors

Wire-Encode-Fehler aus dem Reliable-Layer.

Trait Implementations§

Source§

impl Debug for SecurityBuiltinStack

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.