openthread_sys

Struct otSrpClientService

Source
#[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

Source§

fn clone(&self) -> otSrpClientService

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for otSrpClientService

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for otSrpClientService

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Copy for otSrpClientService

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.