otSrpClientService
#include <srp_client.h>
Represents an SRP client service.
Summary
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 |
|
---|---|
mData
|
uint32_t
Internal data (used by OT core).
|
mInstanceName
|
const char *
The service instance name label (not the full name).
|
mKeyLease
|
uint32_t
Desired key lease interval in sec - zero to use default.
|
mLease
|
uint32_t
Desired lease interval in sec - zero to use default.
|
mName
|
const char *
The service labels (e.g., "_mt._udp", not the full domain name).
|
mNext
|
struct otSrpClientService *
Pointer to next entry in a linked-list (managed by OT core).
|
mNumTxtEntries
|
uint8_t
Number of entries in the
mTxtEntries array. |
mPort
|
uint16_t
The service port number.
|
mPriority
|
uint16_t
The service priority.
|
mState
|
Service state (managed by OT core).
|
mSubTypeLabels
|
const char *const *
Array of sub-type labels (must end with
NULL or can be NULL ). |
mTxtEntries
|
const otDnsTxtEntry *
Array of TXT entries (
mNumTxtEntries gives num of entries). |
mWeight
|
uint16_t
The service weight.
|
Public attributes
mData
uint32_t otSrpClientService::mData
Internal data (used by OT core).
mInstanceName
const char * otSrpClientService::mInstanceName
The service instance name label (not the full name).
mKeyLease
uint32_t otSrpClientService::mKeyLease
Desired key lease interval in sec - zero to use default.
mLease
uint32_t otSrpClientService::mLease
Desired lease interval in sec - zero to use default.
mName
const char * otSrpClientService::mName
The service labels (e.g., "_mt._udp", not the full domain name).
mNext
struct otSrpClientService * otSrpClientService::mNext
Pointer to next entry in a linked-list (managed by OT core).
mNumTxtEntries
uint8_t otSrpClientService::mNumTxtEntries
Number of entries in the mTxtEntries
array.
mPort
uint16_t otSrpClientService::mPort
The service port number.
mPriority
uint16_t otSrpClientService::mPriority
The service priority.
mSubTypeLabels
const char *const * otSrpClientService::mSubTypeLabels
Array of sub-type labels (must end with NULL
or can be NULL
).
mTxtEntries
const otDnsTxtEntry * otSrpClientService::mTxtEntries
Array of TXT entries (mNumTxtEntries
gives num of entries).
mWeight
uint16_t otSrpClientService::mWeight
The service weight.
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.