capsules_extra::net::sixlowpan::sixlowpan_compression

Trait ContextStore

Source
pub trait ContextStore {
    // Required methods
    fn get_context_from_addr(&self, ip_addr: IPAddr) -> Option<Context>;
    fn get_context_from_id(&self, ctx_id: u8) -> Option<Context>;
    fn get_context_from_prefix(
        &self,
        prefix: &[u8],
        prefix_len: u8,
    ) -> Option<Context>;

    // Provided method
    fn get_context_0(&self) -> Context { ... }
}
Expand description

LoWPan ContextStore

LoWPAN encoding requires being able to look up the existence of contexts, which are essentially IPv6 address prefixes. Any implementation must ensure that context 0 is always available and contains the mesh-local prefix.

Required Methods§

Source

fn get_context_from_addr(&self, ip_addr: IPAddr) -> Option<Context>

Source

fn get_context_from_id(&self, ctx_id: u8) -> Option<Context>

Source

fn get_context_from_prefix( &self, prefix: &[u8], prefix_len: u8, ) -> Option<Context>

Provided Methods§

Implementors§