Border Agent TXT Data Parser#

This module includes APIs for parsing the MeshCoP service TXT data of a Border Agent.

Modules#

otBorderAgentStateBitmap

otBorderAgentTxtDataInfo

Enumerations#

enum
OT_BORDER_AGENT_CONN_MODE_DISABLED = 0
OT_BORDER_AGENT_CONN_MODE_PSKC = 1
OT_BORDER_AGENT_CONN_MODE_PSKD = 2
OT_BORDER_AGENT_CONN_MODE_VENDOR = 3
OT_BORDER_AGENT_CONN_MODE_X509 = 4
}

Represents the Connection Mode in a Border Agent State Bitmap.

enum
OT_BORDER_AGENT_THREAD_IF_NOT_INITIALIZED = 0
OT_BORDER_AGENT_THREAD_IF_INITIALIZED = 1
OT_BORDER_AGENT_THREAD_IF_ACTIVE = 2
}

Represents the Thread Interface Status in a Border Agent State Bitmap.

enum
OT_BORDER_AGENT_AVAILABILITY_INFREQUENT = 0
OT_BORDER_AGENT_AVAILABILITY_HIGH = 1
}

Represents the Availability Status in a Border Agent State Bitmap.

enum
OT_BORDER_AGENT_THREAD_ROLE_DISABLED_OR_DETACHED = 0
OT_BORDER_AGENT_THREAD_ROLE_CHILD = 1
OT_BORDER_AGENT_THREAD_ROLE_ROUTER = 2
OT_BORDER_AGENT_THREAD_ROLE_LEADER = 3
}

Represents the Thread Role in a Border Agent State Bitmap.

Typedefs#

Represents the Connection Mode in a Border Agent State Bitmap.

Represents the Thread Interface Status in a Border Agent State Bitmap.

Represents the Availability Status in a Border Agent State Bitmap.

Represents the Thread Role in a Border Agent State Bitmap.

Represents Border Agent State Bitmap information.

Represents parsed Border Agent TXT data.

Functions#

otBorderAgentTxtDataParse(const uint8_t *aTxtData, uint16_t aTxtDataLength, otBorderAgentTxtDataInfo *aInfo)

Parses a Border Agent's MeshCoP service TXT data.

Macros#

#define
OT_BORDER_AGENT_RECORD_VERSION_SIZE (8)

Max size of Record Version string in otBorderAgentTxtDataInfo.

#define
OT_BORDER_AGENT_THREAD_VERSION_SIZE (16)

Max size of Thread Version string in otBorderAgentTxtDataInfo.

#define
OT_BORDER_AGENT_VENDOR_NAME_SIZE (32)

Max size of Vendor Name string in otBorderAgentTxtDataInfo.

#define
OT_BORDER_AGENT_MODEL_NAME_SIZE (32)

Max size of Model Name string in otBorderAgentTxtDataInfo.

Enumeration Documentation#

otBorderAgentConnMode#

otBorderAgentConnMode

Represents the Connection Mode in a Border Agent State Bitmap.

Enumerator
OT_BORDER_AGENT_CONN_MODE_DISABLED

DTLS connection not allowed.

OT_BORDER_AGENT_CONN_MODE_PSKC

DTLS connection with PSKc.

OT_BORDER_AGENT_CONN_MODE_PSKD

DTLS connection with PSKd.

OT_BORDER_AGENT_CONN_MODE_VENDOR

DTLS with vendor defined credential.

OT_BORDER_AGENT_CONN_MODE_X509

DTLS with X.509 certificate.


otBorderAgentThreadIfState#

otBorderAgentThreadIfState

Represents the Thread Interface Status in a Border Agent State Bitmap.

Enumerator
OT_BORDER_AGENT_THREAD_IF_NOT_INITIALIZED

Thread interface is not initialized.

OT_BORDER_AGENT_THREAD_IF_INITIALIZED

Thread interface is initialized but is not yet active.

OT_BORDER_AGENT_THREAD_IF_ACTIVE

Thread interface is initialized and active.


otBorderAgentAvailability#

otBorderAgentAvailability

Represents the Availability Status in a Border Agent State Bitmap.

Enumerator
OT_BORDER_AGENT_AVAILABILITY_INFREQUENT

Infrequent availability.

OT_BORDER_AGENT_AVAILABILITY_HIGH

High availability.


otBorderAgentThreadRole#

otBorderAgentThreadRole

Represents the Thread Role in a Border Agent State Bitmap.

Enumerator
OT_BORDER_AGENT_THREAD_ROLE_DISABLED_OR_DETACHED

Detached or disabled.

OT_BORDER_AGENT_THREAD_ROLE_CHILD

End device (child).

OT_BORDER_AGENT_THREAD_ROLE_ROUTER

Router.

OT_BORDER_AGENT_THREAD_ROLE_LEADER

Leader.


Typedef Documentation#

otBorderAgentConnMode#

typedef enum otBorderAgentConnMode otBorderAgentConnMode

Represents the Connection Mode in a Border Agent State Bitmap.


otBorderAgentThreadIfState#

typedef enum otBorderAgentThreadIfState otBorderAgentThreadIfState

Represents the Thread Interface Status in a Border Agent State Bitmap.


otBorderAgentAvailability#

typedef enum otBorderAgentAvailability otBorderAgentAvailability

Represents the Availability Status in a Border Agent State Bitmap.


otBorderAgentThreadRole#

typedef enum otBorderAgentThreadRole otBorderAgentThreadRole

Represents the Thread Role in a Border Agent State Bitmap.


otBorderAgentStateBitmap#

typedef struct otBorderAgentStateBitmap otBorderAgentStateBitmap

Represents Border Agent State Bitmap information.


otBorderAgentTxtDataInfo#

typedef struct otBorderAgentTxtDataInfo otBorderAgentTxtDataInfo

Represents parsed Border Agent TXT data.

The boolean flags indicate whether a specific field is present in the parsed TXT data.


Function Documentation#

otBorderAgentTxtDataParse#

otError otBorderAgentTxtDataParse (const uint8_t * aTxtData, uint16_t aTxtDataLength, otBorderAgentTxtDataInfo * aInfo)

Parses a Border Agent's MeshCoP service TXT data.

Parameters
TypeDirectionArgument NameDescription
const uint8_t *[in]aTxtData

A pointer to the buffer containing the TXT data.

uint16_t[in]aTxtDataLength

The length of the TXT data in bytes.

otBorderAgentTxtDataInfo *[out]aInfo

A pointer to a structure to output the parsed information.

Requires OPENTHREAD_CONFIG_BORDER_AGENT_TXT_DATA_PARSER_ENABLE.