Border Agent TXT Data Parser

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

Summary

Enumerations

otBorderAgentAvailability{
  OT_BORDER_AGENT_AVAILABILITY_INFREQUENT = 0,
  OT_BORDER_AGENT_AVAILABILITY_HIGH = 1
}
enum
Represents the Availability Status in a Border Agent State Bitmap.
otBorderAgentConnMode{
  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
}
enum
Represents the Connection Mode in a Border Agent State Bitmap.
otBorderAgentThreadIfState{
  OT_BORDER_AGENT_THREAD_IF_NOT_INITIALIZED = 0,
  OT_BORDER_AGENT_THREAD_IF_INITIALIZED = 1,
  OT_BORDER_AGENT_THREAD_IF_ACTIVE = 2
}
enum
Represents the Thread Interface Status in a Border Agent State Bitmap.
otBorderAgentThreadRole{
  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
}
enum
Represents the Thread Role in a Border Agent State Bitmap.

Typedefs

otBorderAgentAvailability typedef
Represents the Availability Status in a Border Agent State Bitmap.
otBorderAgentConnMode typedef
Represents the Connection Mode in a Border Agent State Bitmap.
otBorderAgentStateBitmap typedef
Represents Border Agent State Bitmap information.
otBorderAgentThreadIfState typedef
Represents the Thread Interface Status in a Border Agent State Bitmap.
otBorderAgentThreadRole typedef
Represents the Thread Role in a Border Agent State Bitmap.
otBorderAgentTxtDataInfo typedef
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

OT_BORDER_AGENT_MODEL_NAME_SIZE (32)
Max size of Model Name string in otBorderAgentTxtDataInfo.
OT_BORDER_AGENT_RECORD_VERSION_SIZE (8)
Max size of Record Version string in otBorderAgentTxtDataInfo.
OT_BORDER_AGENT_THREAD_VERSION_SIZE (16)
Max size of Thread Version string in otBorderAgentTxtDataInfo.
OT_BORDER_AGENT_VENDOR_NAME_SIZE (32)
Max size of Vendor Name string in otBorderAgentTxtDataInfo.

Structs

otBorderAgentStateBitmap

Represents Border Agent State Bitmap information.

otBorderAgentTxtDataInfo

Represents parsed Border Agent TXT data.

Enumerations

otBorderAgentAvailability

 otBorderAgentAvailability

Represents the Availability Status in a Border Agent State Bitmap.

Properties
OT_BORDER_AGENT_AVAILABILITY_HIGH

High availability.

OT_BORDER_AGENT_AVAILABILITY_INFREQUENT

Infrequent availability.

otBorderAgentConnMode

 otBorderAgentConnMode

Represents the Connection Mode in a Border Agent State Bitmap.

Properties
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.

Properties
OT_BORDER_AGENT_THREAD_IF_ACTIVE

Thread interface is initialized and active.

OT_BORDER_AGENT_THREAD_IF_INITIALIZED

Thread interface is initialized but is not yet active.

OT_BORDER_AGENT_THREAD_IF_NOT_INITIALIZED

Thread interface is not initialized.

otBorderAgentThreadRole

 otBorderAgentThreadRole

Represents the Thread Role in a Border Agent State Bitmap.

Properties
OT_BORDER_AGENT_THREAD_ROLE_CHILD

End device (child).

OT_BORDER_AGENT_THREAD_ROLE_DISABLED_OR_DETACHED

Detached or disabled.

OT_BORDER_AGENT_THREAD_ROLE_LEADER

Leader.

OT_BORDER_AGENT_THREAD_ROLE_ROUTER

Router.

Typedefs

otBorderAgentAvailability

enum otBorderAgentAvailability otBorderAgentAvailability

Represents the Availability Status in a Border Agent State Bitmap.

otBorderAgentConnMode

enum otBorderAgentConnMode otBorderAgentConnMode

Represents the Connection Mode in a Border Agent State Bitmap.

otBorderAgentStateBitmap

struct otBorderAgentStateBitmap otBorderAgentStateBitmap

Represents Border Agent State Bitmap information.

otBorderAgentThreadIfState

enum otBorderAgentThreadIfState otBorderAgentThreadIfState

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

otBorderAgentThreadRole

enum otBorderAgentThreadRole otBorderAgentThreadRole

Represents the Thread Role in a Border Agent State Bitmap.

otBorderAgentTxtDataInfo

struct otBorderAgentTxtDataInfo otBorderAgentTxtDataInfo

Represents parsed Border Agent TXT data.

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

Functions

otBorderAgentTxtDataParse

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

Parses a Border Agent's MeshCoP service TXT data.

Requires OPENTHREAD_CONFIG_BORDER_AGENT_TXT_DATA_PARSER_ENABLE.

Details
Parameters
[in] aTxtData
A pointer to the buffer containing the TXT data.
[in] aTxtDataLength
The length of the TXT data in bytes.
[out] aInfo
A pointer to a structure to output the parsed information.
Return Values
OT_ERROR_NONE
Successfully parsed the TXT data.
OT_ERROR_PARSE
Failed to parse the TXT data.

Macros

OT_BORDER_AGENT_MODEL_NAME_SIZE

 OT_BORDER_AGENT_MODEL_NAME_SIZE (32)

Max size of Model Name string in otBorderAgentTxtDataInfo.

OT_BORDER_AGENT_RECORD_VERSION_SIZE

 OT_BORDER_AGENT_RECORD_VERSION_SIZE (8)

Max size of Record Version string in otBorderAgentTxtDataInfo.

OT_BORDER_AGENT_THREAD_VERSION_SIZE

 OT_BORDER_AGENT_THREAD_VERSION_SIZE (16)

Max size of Thread Version string in otBorderAgentTxtDataInfo.

OT_BORDER_AGENT_VENDOR_NAME_SIZE

 OT_BORDER_AGENT_VENDOR_NAME_SIZE (32)

Max size of Vendor Name string in otBorderAgentTxtDataInfo.

Resources

OpenThread API Reference topics originate from the source code, available on GitHub. For more information, or to contribute to our documentation, refer to Resources.