5.11.0.0R3
Software Development Kit
 
Loading...
Searching...
No Matches
tlv.h File Reference

Functions

tlv16_data_t * tlv_find_tlv16 (const uint8_t *message, uint32_t message_length, uint16_t type)
 
tlv8_data_t * tlv_find_tlv8 (const uint8_t *message, uint32_t message_length, uint8_t type)
 

Detailed Description

Functions to read/write Type-Length-Value (TLV) data used in many common protocols.

Function Documentation

◆ tlv_find_tlv16()

tlv16_data_t * tlv_find_tlv16 ( const uint8_t * message,
uint32_t message_length,
uint16_t type )

Finds a particular type from a buffer of TLV data.

Returns a pointer to the first TLV which has a type that matches the given type. The pointer points to the 'type' field. This is the 16-bit-Type & 16-bit-Lenght version

Parameters
[in]message: A pointer to the source TLV data to be searched
[in]message_length: The length of the source TLV data to be searched
[in]type: The TLV type to search for
Returns
Pointer to start of first matching TLV, or NULL if not found

◆ tlv_find_tlv8()

tlv8_data_t * tlv_find_tlv8 ( const uint8_t * message,
uint32_t message_length,
uint8_t type )

Finds a particular type from a buffer of TLV data.

Returns a pointer to the first TLV which has a type that matches the given type. The pointer points to the 'type' field. This is the 8-bit-Type & 8-bit-Lenght version

Parameters
[in]message: A pointer to the source TLV data to be searched
[in]message_length: The length of the source TLV data to be searched
[in]type: The TLV type to search for
Returns
Pointer to start of first matching TLV, or NULL if not found