Struct capsules_extra::net::thread::driver::ThreadNetworkDriver

source ·
pub struct ThreadNetworkDriver<'a, A: Alarm<'a>> { /* private fields */ }

Implementations§

source§

impl<'a, A: Alarm<'a>> ThreadNetworkDriver<'a, A>

source

pub fn new( sender: &'a dyn UDPSender<'a>, aes_crypto: &'a dyn AES128CCM<'a>, alarm: &'a A, grant: Grant<App, UpcallCount<1>, AllowRoCount<{ ro_allow::COUNT }>, AllowRwCount<0>>, src_mac_addr: [u8; 8], max_tx_pyld_len: usize, port_table: &'static UdpPortManager, send_buffer: SubSliceMut<'static, u8>, recv_buffer: SubSliceMut<'static, u8>, driver_send_cap: &'static dyn UdpDriverCapability, net_cap: &'static NetworkCapability ) -> ThreadNetworkDriver<'a, A>

source

pub fn set_networkkey(&self, mle_key: [u8; 16], mac_key: [u8; 16])

Takes the MLE and MAC keys and replaces the networkkey

Trait Implementations§

source§

impl<'a, A: Alarm<'a>> AlarmClient for ThreadNetworkDriver<'a, A>

source§

fn alarm(&self)

Callback indicating the alarm time has been reached. The alarm MUST be disabled when this is called. If a new alarm is needed, the client can call Alarm::set_alarm.
source§

impl<'a, A: Alarm<'a>> CCMClient for ThreadNetworkDriver<'a, A>

source§

fn crypt_done( &self, buf: &'static mut [u8], _res: Result<(), ErrorCode>, _tag_is_valid: bool )

res is Ok(()) if the encryption/decryption process succeeded. This does not mean that the message has been verified in the case of decryption. If we are encrypting: tag_is_valid is true iff res is Ok(()). If we are decrypting: tag_is_valid is true iff res is Ok(()) and the message authentication tag is valid.
source§

impl<'a, A: Alarm<'a>> DeviceProcedure for ThreadNetworkDriver<'a, A>

source§

fn lookup_addr_long(&self, _addr: MacAddress) -> Option<[u8; 8]>

Gets the key corresponding to the key that matches the given security level level and key ID key_id. If no such key matches, returns None.

source§

impl<'a, A: Alarm<'a>> KeyProcedure for ThreadNetworkDriver<'a, A>

source§

fn lookup_key(&self, _level: SecurityLevel, _key_id: KeyId) -> Option<[u8; 16]>

Gets the key corresponding to the key that matches the given security level level and key ID key_id. If no such key matches, returns None.

source§

impl<'a, A: Alarm<'a>> SyscallDriver for ThreadNetworkDriver<'a, A>

source§

fn command( &self, command_num: usize, _arg1: usize, _: usize, processid: ProcessId ) -> CommandReturn

§command_num
  • 0: Driver Check
  • 1: Add a new mle/mac networkkey and initiate a parent request.
source§

fn allocate_grant(&self, processid: ProcessId) -> Result<(), Error>

Request to allocate a capsule’s grant for a specific process. Read more
source§

fn allow_userspace_readable( &self, app: ProcessId, which: usize, slice: ReadWriteProcessBuffer ) -> Result<ReadWriteProcessBuffer, (ReadWriteProcessBuffer, ErrorCode)>

System call for a process to pass a buffer (a UserspaceReadableProcessBuffer) to the kernel that the kernel can either read or write. The kernel calls this method only after it checks that the entire buffer is within memory the process can both read and write. Read more
source§

impl<'a, A: Alarm<'a>> UDPRecvClient for ThreadNetworkDriver<'a, A>

source§

fn receive( &self, src_addr: IPAddr, dst_addr: IPAddr, _src_port: u16, _dst_port: u16, payload: &[u8] )

source§

impl<'a, A: Alarm<'a>> UDPSendClient for ThreadNetworkDriver<'a, A>

source§

fn send_done( &self, _result: Result<(), ErrorCode>, dgram: SubSliceMut<'static, u8> )

Auto Trait Implementations§

§

impl<'a, A> !Freeze for ThreadNetworkDriver<'a, A>

§

impl<'a, A> !RefUnwindSafe for ThreadNetworkDriver<'a, A>

§

impl<'a, A> !Send for ThreadNetworkDriver<'a, A>

§

impl<'a, A> !Sync for ThreadNetworkDriver<'a, A>

§

impl<'a, A> Unpin for ThreadNetworkDriver<'a, A>

§

impl<'a, A> !UnwindSafe for ThreadNetworkDriver<'a, A>

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> SizedTypeProperties for T

source§

#[doc(hidden)] const IS_ZST: bool = _

🔬This is a nightly-only experimental API. (sized_type_properties)
true if this type requires no storage. false if its size is greater than zero. Read more
source§

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

§

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>,

§

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.