#[repr(C)]pub struct otSrpClientService {Show 13 fields
pub mName: *const c_char,
pub mInstanceName: *const c_char,
pub mSubTypeLabels: *const *const c_char,
pub mTxtEntries: *const otDnsTxtEntry,
pub mPort: u16,
pub mPriority: u16,
pub mWeight: u16,
pub mNumTxtEntries: u8,
pub mState: otSrpClientItemState,
pub mData: u32,
pub mNext: *mut otSrpClientService,
pub mLease: u32,
pub mKeyLease: u32,
}
Expand description
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.
Fields§
§mName: *const c_char
< The service labels (e.g., “_mt._udp”, not the full domain name).
mInstanceName: *const c_char
< The service instance name label (not the full name).
mSubTypeLabels: *const *const c_char
< 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).
mPort: u16
< The service port number.
mPriority: u16
< The service priority.
mWeight: u16
< The service weight.
mNumTxtEntries: u8
< Number of entries in the mTxtEntries
array.
mState: otSrpClientItemState
< Service state (managed by OT core).
mData: u32
< Internal data (used by OT core).
mNext: *mut otSrpClientService
< Pointer to next entry in a linked-list (managed by OT core).
mLease: u32
< Desired lease interval in sec - zero to use default.
mKeyLease: u32
< Desired key lease interval in sec - zero to use default.
Trait Implementations§
Source§impl Clone for otSrpClientService
impl Clone for otSrpClientService
Source§fn clone(&self) -> otSrpClientService
fn clone(&self) -> otSrpClientService
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for otSrpClientService
impl Debug for otSrpClientService
Source§impl Default for otSrpClientService
impl Default for otSrpClientService
impl Copy for otSrpClientService
Auto Trait Implementations§
impl Freeze for otSrpClientService
impl RefUnwindSafe for otSrpClientService
impl !Send for otSrpClientService
impl !Sync for otSrpClientService
impl Unpin for otSrpClientService
impl UnwindSafe for otSrpClientService
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)