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#
The service labels (e.g., "_mt._udp", not the full domain name).
The service instance name label (not the full name).
Array of sub-type labels (must end with NULL
or can be NULL
).
Array of TXT entries (mNumTxtEntries
gives num of entries).
The service port number.
The service priority.
The service weight.
Number of entries in the mTxtEntries
array.
Service state (managed by OT core).
Internal data (used by OT core).
Pointer to next entry in a linked-list (managed by OT core).
Desired lease interval in sec - zero to use default.
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).
102
of file include/openthread/srp_client.h
mInstanceName#
const char* otSrpClientService::mInstanceName
The service instance name label (not the full name).
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
).
104
of file include/openthread/srp_client.h
mTxtEntries#
const otDnsTxtEntry* otSrpClientService::mTxtEntries
Array of TXT entries (mNumTxtEntries
gives num of entries).
105
of file include/openthread/srp_client.h
mPort#
uint16_t otSrpClientService::mPort
The service port number.
106
of file include/openthread/srp_client.h
mPriority#
uint16_t otSrpClientService::mPriority
The service priority.
107
of file include/openthread/srp_client.h
mWeight#
uint16_t otSrpClientService::mWeight
The service weight.
108
of file include/openthread/srp_client.h
mNumTxtEntries#
uint8_t otSrpClientService::mNumTxtEntries
Number of entries in the mTxtEntries
array.
109
of file include/openthread/srp_client.h
mState#
otSrpClientItemState otSrpClientService::mState
Service state (managed by OT core).
110
of file include/openthread/srp_client.h
mData#
uint32_t otSrpClientService::mData
Internal data (used by OT core).
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).
112
of file include/openthread/srp_client.h
mLease#
uint32_t otSrpClientService::mLease
Desired lease interval in sec - zero to use default.
113
of file include/openthread/srp_client.h
mKeyLease#
uint32_t otSrpClientService::mKeyLease
Desired key lease interval in sec - zero to use default.
114
of file include/openthread/srp_client.h