Struct capsules::ieee802154::framer::FrameInfo   
                   
                       [−]
                   
               [src]
struct FrameInfo {
    frame_type: FrameType,
    mac_payload_offset: usize,
    data_offset: usize,
    data_len: usize,
    mic_len: usize,
    security_params: Option<(SecurityLevel, [u8; 16], [u8; 13])>,
}This contains just enough information about a frame to determine
- How to encode it once its payload has been finalized
- The sizes of the mac header, payload and MIC tag length to be added
These offsets are relative to the PSDU or buf[radio::PSDU_OFFSET..] so
that the mac frame length is data_offset + data_len
Fields
frame_type: FrameType
                           
                           
                           
                           mac_payload_offset: usize
                           
                           
                           
                           data_offset: usize
                           
                           
                           
                           data_len: usize
                           
                           
                           
                           mic_len: usize
                           
                           
                           
                           security_params: Option<(SecurityLevel, [u8; 16], [u8; 13])>
                           
                    Methods
impl FrameInfo[src]
fn unsecured_length(&self) -> usize[src]
Current size of the frame, not including the MAC footer or the MIC
fn secured_length(&self) -> usize[src]
Current size of the frame, not including the MAC footer but including the MIC
fn ccm_encrypt_ranges(&self) -> (usize, usize)[src]
Compute the offsets in the buffer for the a data and m data fields in the CCM* authentication and encryption procedures which depends on the frame type and security levels. Returns the (offset, len) of the m data fields, not including the MIC. The a data is always the remaining prefix of the header, so it can be determined implicitly.
Trait Implementations
impl Copy for FrameInfo[src]
impl Clone for FrameInfo[src]
fn clone(&self) -> FrameInfo[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Eq for FrameInfo[src]
fn assert_receiver_is_total_eq(&self)[src]
impl PartialEq for FrameInfo[src]
fn eq(&self, __arg_0: &FrameInfo) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &FrameInfo) -> bool[src]
This method tests for !=.