Skip to content

[SRP Client] How to create an SRP service subtype using OT methods #8183

Closed Answered by jwhui
estelleOl asked this question in Q&A
Discussion options

You must be logged in to vote

You need to add the sub-type labels separately via the mSubTypeLabels array in the otSrpClientService struct.

You can also see how the CLI implementation processes sub-types:

if (label != nullptr)
{
uint16_t arrayLength;
const char **subTypeLabels = otSrpClientBuffersGetSubTypeLabelsArray(entry, &arrayLength);
// Leave the last array element as `nullptr` to indicate end of array.
for (uint16_t index = 0; index + 1 < arrayLength; index++)
{
*label++ = '\0';
subTypeLabels[index] = label;
label = strchr(label, ',');
if (label == nullptr)
{
b…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@estelleOl
Comment options

@jwhui
Comment options

@estelleOl
Comment options

@abtink
Comment options

Answer selected by estelleOl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants