BlindUnicastBuilder

Type Alias BlindUnicastBuilder 

Source
pub type BlindUnicastBuilder<'a, S> = Builder<'a, BlindUnicastKind, S>;
Expand description

Blind-unicast packet builder alias.

Aliased Type§

pub struct BlindUnicastBuilder<'a, S> { /* private fields */ }

Implementations§

Source§

impl<'a> BlindUnicastBuilder<'a, NeedsSource>

Source

pub fn source_hint( self, hint: NodeHint, ) -> BlindUnicastBuilder<'a, NeedsCounter>

Encode the source address as a three-byte hint.

Source

pub fn source_full( self, key: &PublicKey, ) -> BlindUnicastBuilder<'a, NeedsCounter>

Encode the source address as a full public key.

Source§

impl<'a> BlindUnicastBuilder<'a, NeedsCounter>

Source

pub fn frame_counter(self, counter: u32) -> BlindUnicastBuilder<'a, Configuring>

Set the frame counter for the secure packet.

Source§

impl<'a> BlindUnicastBuilder<'a, Configuring>

Source

pub fn flood_hops(self, remaining: u8) -> Self

Set the initial flood-hop budget.

Source

pub fn region_code(self, code: [u8; 2]) -> Self

Add the region-code option.

Source

pub fn trace_route(self) -> Self

Add an empty trace-route option.

Source

pub fn trace_signal(self) -> Self

Add an empty trace-signal option. Pairs entry-for-entry with trace route, so it is only meaningful alongside it.

Source

pub fn source_route(self, hops: &[RouterHint]) -> Self

Add a source-route option from a router-hint slice.

Source

pub fn option(self, number: OptionNumber, value: &[u8]) -> Self

Add an arbitrary option number/value pair.

Source§

impl<'a> BlindUnicastBuilder<'a, Configuring>

Source

pub fn ack_requested(self) -> Self

Upgrade the packet type to ACK-requested blind unicast.

Source

pub fn encrypted(self) -> Self

Mark the body and blinded address block for encryption.

Source

pub fn unencrypted(self) -> Self

Emit a blind-unicast packet without encrypting the payload.

This exists primarily for tests and for explicit policy-rejection scenarios where higher layers need to construct a frame they expect to reject. Normal blind-unicast traffic should remain encrypted.

Source

pub fn mic_size(self, size: MicSize) -> Self

Select the MIC size reserved in the packet footer.

Source

pub fn salt(self, salt: u16) -> Self

Attach an explicit salt value to SECINFO.

Source

pub fn payload(self, data: &[u8]) -> BlindUnicastBuilder<'a, Complete>

Stage the application payload and advance to the terminal builder state.

Source§

impl<'a> BlindUnicastBuilder<'a, Complete>

Source§

impl<'a> BlindUnicastBuilder<'a, Configuring>

Source

pub fn build(self) -> Result<UnsealedPacket<'a>, BuildError>

Layout (E=1): FCF [FHOPS] CHANNEL SECINFO OPTIONS 0xFF ENC_DST_SRC ENC_PAYLOAD MIC Layout (E=0): FCF [FHOPS] CHANNEL SECINFO OPTIONS 0xFF DST SRC [PAYLOAD] MIC