Represents an SRP client service.

The values in this structure, including the string buffers for the names and the TXT record entries, MUST persist and stay constant after an instance of this structure is passed to OpenThread from otSrpClientAddService() or otSrpClientRemoveService().

The mState, mData, mNext fields are used/managed by OT core only. Their value is ignored when an instance of otSrpClientService is passed in otSrpClientAddService() or otSrpClientRemoveService() or other functions. The caller does not need to set these fields.

The mLease and mKeyLease fields specify the desired lease and key lease intervals for this service. Zero value indicates that the interval is unspecified and then the default lease or key lease intervals from otSrpClientGetLeaseInterval() and otSrpClientGetKeyLeaseInterval() are used for this service. If the key lease interval (whether set explicitly or determined from the default) is shorter than the lease interval for a service, SRP client will re-use the lease interval value for key lease interval as well. For example, if in service mLease is explicitly set to 2 days and mKeyLease is set to zero and default key lease is set to 1 day, then when registering this service, the requested key lease for this service is also set to 2 days.

Public Attributes#

const char *

The service labels (e.g., "_mt._udp", not the full domain name).

const char *

The service instance name label (not the full name).

const char *const *

Array of sub-type labels (must end with NULL or can be NULL).

Array of TXT entries (mNumTxtEntries gives num of entries).

uint16_t

The service port number.

uint16_t

The service priority.

uint16_t

The service weight.

uint8_t

Number of entries in the mTxtEntries array.

Service state (managed by OT core).

uint32_t

Internal data (used by OT core).

Pointer to next entry in a linked-list (managed by OT core).

uint32_t

Desired lease interval in sec - zero to use default.

uint32_t

Desired key lease interval in sec - zero to use default.

Public Attribute Documentation#

mName#

const char* otSrpClientService::mName

The service labels (e.g., "_mt._udp", not the full domain name).


Definition at line 102 of file include/openthread/srp_client.h

mInstanceName#

const char* otSrpClientService::mInstanceName

The service instance name label (not the full name).


Definition at line 103 of file include/openthread/srp_client.h

mSubTypeLabels#

const char* const* otSrpClientService::mSubTypeLabels

Array of sub-type labels (must end with NULL or can be NULL).


Definition at line 104 of file include/openthread/srp_client.h

mTxtEntries#

const otDnsTxtEntry* otSrpClientService::mTxtEntries

Array of TXT entries (mNumTxtEntries gives num of entries).


Definition at line 105 of file include/openthread/srp_client.h

mPort#

uint16_t otSrpClientService::mPort

The service port number.


Definition at line 106 of file include/openthread/srp_client.h

mPriority#

uint16_t otSrpClientService::mPriority

The service priority.


Definition at line 107 of file include/openthread/srp_client.h

mWeight#

uint16_t otSrpClientService::mWeight

The service weight.


Definition at line 108 of file include/openthread/srp_client.h

mNumTxtEntries#

uint8_t otSrpClientService::mNumTxtEntries

Number of entries in the mTxtEntries array.


Definition at line 109 of file include/openthread/srp_client.h

mState#

otSrpClientItemState otSrpClientService::mState

Service state (managed by OT core).


Definition at line 110 of file include/openthread/srp_client.h

mData#

uint32_t otSrpClientService::mData

Internal data (used by OT core).


Definition at line 111 of file include/openthread/srp_client.h

mNext#

struct otSrpClientService* otSrpClientService::mNext

Pointer to next entry in a linked-list (managed by OT core).


Definition at line 112 of file include/openthread/srp_client.h

mLease#

uint32_t otSrpClientService::mLease

Desired lease interval in sec - zero to use default.


Definition at line 113 of file include/openthread/srp_client.h

mKeyLease#

uint32_t otSrpClientService::mKeyLease

Desired key lease interval in sec - zero to use default.


Definition at line 114 of file include/openthread/srp_client.h