Struct ieee802154::mac::frame::security::AuxiliarySecurityHeader
source · [−]pub struct AuxiliarySecurityHeader {
pub control: SecurityControl,
pub key_identifier: Option<KeyIdentifier>,
/* private fields */
}
Expand description
A struct describing the Auxiliary Security Header
See: section 7.4
Fields
control: SecurityControl
The control field in the Auxiliary Security Header
key_identifier: Option<KeyIdentifier>
If the key_identifier field in AuxiliarySecurityHeader::control
is not set to None, this field contains the key identifier
of this frame, otherwise it is None
Implementations
sourceimpl AuxiliarySecurityHeader
impl AuxiliarySecurityHeader
sourcepub fn get_octet_size(&self) -> usize
pub fn get_octet_size(&self) -> usize
Get the size of this security header, in octets
sourcepub fn new(
control: SecurityControl,
key_identifier: Option<KeyIdentifier>
) -> Self
pub fn new(
control: SecurityControl,
key_identifier: Option<KeyIdentifier>
) -> Self
Create a new Auxiliary Security Header with the specified control and key identifier
sourcepub unsafe fn new_unsafe(
control: SecurityControl,
key_identifier: Option<KeyIdentifier>,
frame_counter: u32
) -> Self
pub unsafe fn new_unsafe(
control: SecurityControl,
key_identifier: Option<KeyIdentifier>,
frame_counter: u32
) -> Self
Create a new Auxiliary Security Header with the specified control, key identifier, and frame counter.
This function is unsafe because the frame_counter is almost always set when parsing a frame from a buffer, or by the security context at the time of actually writing a secured frame.
sourcepub fn get_frame_counter(&self) -> u32
pub fn get_frame_counter(&self) -> u32
Get the frame counter of this auxiliary security header.
This will be 0 on a non-parsed Auxiliary Security Header
Trait Implementations
sourceimpl Clone for AuxiliarySecurityHeader
impl Clone for AuxiliarySecurityHeader
sourcefn clone(&self) -> AuxiliarySecurityHeader
fn clone(&self) -> AuxiliarySecurityHeader
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for AuxiliarySecurityHeader
impl Debug for AuxiliarySecurityHeader
sourceimpl Hash for AuxiliarySecurityHeader
impl Hash for AuxiliarySecurityHeader
sourceimpl PartialEq<AuxiliarySecurityHeader> for AuxiliarySecurityHeader
impl PartialEq<AuxiliarySecurityHeader> for AuxiliarySecurityHeader
sourcefn eq(&self, other: &AuxiliarySecurityHeader) -> bool
fn eq(&self, other: &AuxiliarySecurityHeader) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl TryRead<'_, ()> for AuxiliarySecurityHeader
impl TryRead<'_, ()> for AuxiliarySecurityHeader
sourceimpl<AEADBLKCIPH, KEYDESCLO> TryWrite<&SecurityContext<AEADBLKCIPH, KEYDESCLO>> for AuxiliarySecurityHeader where
AEADBLKCIPH: NewBlockCipher + BlockCipher<BlockSize = U16>,
KEYDESCLO: KeyDescriptorLookup<AEADBLKCIPH::KeySize>,
impl<AEADBLKCIPH, KEYDESCLO> TryWrite<&SecurityContext<AEADBLKCIPH, KEYDESCLO>> for AuxiliarySecurityHeader where
AEADBLKCIPH: NewBlockCipher + BlockCipher<BlockSize = U16>,
KEYDESCLO: KeyDescriptorLookup<AEADBLKCIPH::KeySize>,
impl Copy for AuxiliarySecurityHeader
impl Eq for AuxiliarySecurityHeader
impl StructuralEq for AuxiliarySecurityHeader
impl StructuralPartialEq for AuxiliarySecurityHeader
Auto Trait Implementations
impl RefUnwindSafe for AuxiliarySecurityHeader
impl Send for AuxiliarySecurityHeader
impl Sync for AuxiliarySecurityHeader
impl Unpin for AuxiliarySecurityHeader
impl UnwindSafe for AuxiliarySecurityHeader
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more