Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
Helper functions for CA-821x messages

Helper functions for parsing certain responses from CA-821x. More...

Collaboration diagram for Helper functions for CA-821x messages:

Functions

struct SecSpecMCPS_DATA_indication_get_secspec (const struct MCPS_DATA_indication_pset *aPset)
 Get pointer to the security spec of the MCPS Data Indication. More...
 
struct ShortAddrMLME_BEACON_NOTIFY_indication_get_shortaddrs (uint8_t *aLength, const struct MLME_BEACON_NOTIFY_indication_pset *aPset)
 Get the short addresses in the beacon address list. More...
 
struct ExtAddrMLME_BEACON_NOTIFY_indication_get_extaddrs (uint8_t *aLength, const struct MLME_BEACON_NOTIFY_indication_pset *aPset)
 Get the ext addresses in the beacon address list. More...
 
uint8_t * MLME_BEACON_NOTIFY_indication_get_sdu (uint8_t *aLength, const struct MLME_BEACON_NOTIFY_indication_pset *aPset)
 Get the SDU from a beacon notify indication. More...
 
struct PanDescriptorMLME_SCAN_confirm_get_pandescriptor (uint8_t aIndex, const struct MLME_SCAN_confirm_pset *aPset)
 Get an indexed pandescriptor from an MLME-SCAN-confirm of a passive or active scan. More...
 
struct M_KeyIdLookupDescKeyTableEntry_get_keyidlookupdescs (const struct M_KeyTableEntryFixed *aKte)
 Get a pointer to the start of the Key ID Lookup Descriptor list. More...
 
struct M_KeyDeviceDescKeyTableEntry_get_keydevicedescs (const struct M_KeyTableEntryFixed *aKte)
 Get a pointer to the start of the Key Device Descriptor list. More...
 
struct M_KeyUsageDescKeyTableEntry_get_keyusagedescs (const struct M_KeyTableEntryFixed *aKte)
 Get a pointer to the start of the Key Usage Descriptor list. More...
 

Detailed Description

Helper functions for parsing certain responses from CA-821x.

Function Documentation

◆ KeyTableEntry_get_keydevicedescs()

struct M_KeyDeviceDesc* KeyTableEntry_get_keydevicedescs ( const struct M_KeyTableEntryFixed aKte)

Get a pointer to the start of the Key Device Descriptor list.

If this function is being used to create a key table entry, the user MUST make sure that the keytable entry being used has sufficient memory allocated to support the descriptors being written. The M_KeyTableEntryFixed by itself does not have any memory allocated for the variable lists.

All Key..Entries fields MUST be filled out prior to filling the lists, so that these helper functions can successfully parse the structure.

Parameters
aKte- Pointer to the fixed part of the key table entry
Returns
Pointer to the start of the KeyDeviceDescriptor list (even if length=0)

◆ KeyTableEntry_get_keyidlookupdescs()

struct M_KeyIdLookupDesc* KeyTableEntry_get_keyidlookupdescs ( const struct M_KeyTableEntryFixed aKte)

Get a pointer to the start of the Key ID Lookup Descriptor list.

If this function is being used to create a key table entry, the user MUST make sure that the keytable entry being used has sufficient memory allocated to support the descriptors being written. The M_KeyTableEntryFixed by itself does not have any memory allocated for the variable lists.

All Key..Entries fields MUST be filled out prior to filling the lists, so that these helper functions can successfully parse the structure.

Parameters
aKte- Pointer to the fixed part of the key table entry
Returns
Pointer to the start of the KeyIdLookupDescriptor list (even if length=0)

◆ KeyTableEntry_get_keyusagedescs()

struct M_KeyUsageDesc* KeyTableEntry_get_keyusagedescs ( const struct M_KeyTableEntryFixed aKte)

Get a pointer to the start of the Key Usage Descriptor list.

If this function is being used to create a key table entry, the user MUST make sure that the keytable entry being used has sufficient memory allocated to support the descriptors being written. The M_KeyTableEntryFixed by itself does not have any memory allocated for the variable lists.

All Key..Entries fields MUST be filled out prior to filling the lists, so that these helper functions can successfully parse the structure.

Parameters
aKte- Pointer to the fixed part of the key table entry
Returns
Pointer to the start of the KeyUsageDescriptor list (even if length=0)

◆ MCPS_DATA_indication_get_secspec()

struct SecSpec* MCPS_DATA_indication_get_secspec ( const struct MCPS_DATA_indication_pset aPset)

Get pointer to the security spec of the MCPS Data Indication.

This helper function exists because the secspec exists after a variable length portion of the data indication.

Parameters
aPset- Pointer to the MCPS_Data_indication to be analysed
Returns
Pointer to the SecSpec

◆ MLME_BEACON_NOTIFY_indication_get_extaddrs()

struct ExtAddr* MLME_BEACON_NOTIFY_indication_get_extaddrs ( uint8_t *  aLength,
const struct MLME_BEACON_NOTIFY_indication_pset aPset 
)

Get the ext addresses in the beacon address list.

This helper function exists because the ext address list exists after a variable length portion of the beacon indication.

Parameters
[out]aLength- Length of the output list (Must not be NULL)
aPset- Pointer to the MLME_BEACON_NOTIFY_indication to be analysed
Returns
Pointer to the start of the ExtAddr list (even if length=0)

◆ MLME_BEACON_NOTIFY_indication_get_sdu()

uint8_t* MLME_BEACON_NOTIFY_indication_get_sdu ( uint8_t *  aLength,
const struct MLME_BEACON_NOTIFY_indication_pset aPset 
)

Get the SDU from a beacon notify indication.

This helper function exists because the sdu exists after a variable length portion of the beacon indication.

Parameters
[out]aLength- Length of the output list (Must not be NULL)
aPset- Pointer to the MLME_BEACON_NOTIFY_indication to be analysed
Returns
Pointer to the start of the SDU (even if length=0)

◆ MLME_BEACON_NOTIFY_indication_get_shortaddrs()

struct ShortAddr* MLME_BEACON_NOTIFY_indication_get_shortaddrs ( uint8_t *  aLength,
const struct MLME_BEACON_NOTIFY_indication_pset aPset 
)

Get the short addresses in the beacon address list.

This helper function exists because the short address list exists after a variable length portion of the beacon indication.

Parameters
[out]aLength- Length of the output list (Must not be NULL)
aPset- Pointer to the MLME_BEACON_NOTIFY_indication to be analysed
Returns
Pointer to the start of the ShortAddr list (even if length=0)

◆ MLME_SCAN_confirm_get_pandescriptor()

struct PanDescriptor* MLME_SCAN_confirm_get_pandescriptor ( uint8_t  aIndex,
const struct MLME_SCAN_confirm_pset aPset 
)

Get an indexed pandescriptor from an MLME-SCAN-confirm of a passive or active scan.

This helper function exists because the pandescriptor list is not simple to parse, as each pandescriptor has a variable length.

Parameters
aIndex- Index of the pandescriptor to access
aPset- Pointer to the MLME_SCAN_confirm to be analysed
Returns
Pointer to the pandescriptor at that index (or NULL if out of range/invalid scan type)