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>
impl<'a, A: Alarm<'a>> ThreadNetworkDriver<'a, A>
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>
Trait Implementations§
source§impl<'a, A: Alarm<'a>> AlarmClient for ThreadNetworkDriver<'a, A>
impl<'a, A: Alarm<'a>> AlarmClient for ThreadNetworkDriver<'a, A>
source§impl<'a, A: Alarm<'a>> CCMClient for ThreadNetworkDriver<'a, A>
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,
)
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>
impl<'a, A: Alarm<'a>> DeviceProcedure for ThreadNetworkDriver<'a, A>
source§fn lookup_addr_long(&self, _addr: MacAddress) -> Option<[u8; 8]>
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>
impl<'a, A: Alarm<'a>> KeyProcedure for ThreadNetworkDriver<'a, A>
source§fn lookup_key(&self, _level: SecurityLevel, _key_id: KeyId) -> Option<[u8; 16]>
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>
impl<'a, A: Alarm<'a>> SyscallDriver for ThreadNetworkDriver<'a, A>
source§fn command(
&self,
command_num: usize,
_arg1: usize,
_: usize,
processid: ProcessId,
) -> CommandReturn
fn command( &self, command_num: usize, _arg1: usize, _: usize, processid: ProcessId, ) -> CommandReturn
§command_num
0
: Driver Check1
: Add a new mle/mac networkkey and initiate a parent request.
source§fn allocate_grant(&self, processid: ProcessId) -> Result<(), Error>
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)>
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 moresource§impl<'a, A: Alarm<'a>> UDPRecvClient for ThreadNetworkDriver<'a, A>
impl<'a, A: Alarm<'a>> UDPRecvClient for ThreadNetworkDriver<'a, A>
source§impl<'a, A: Alarm<'a>> UDPSendClient for ThreadNetworkDriver<'a, A>
impl<'a, A: Alarm<'a>> UDPSendClient for ThreadNetworkDriver<'a, A>
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more