pub unsafe extern "C" fn otSrpClientBuffersAllocateService(
aInstance: *mut otInstance,
) -> *mut otSrpClientBuffersServiceEntryExpand description
Allocates a new service entry from the pool.
The returned service entry instance will be initialized as follows:
mService.mNamewill point to an allocated string buffer which can be retrieved using the functionotSrpClientBuffersGetServiceEntryServiceNameString().mService.mInstanceNamewill point to an allocated string buffer which can be retrieved using the functionotSrpClientBuffersGetServiceEntryInstanceNameString().mService.mSubTypeLabelspoints to an array that is returned fromotSrpClientBuffersGetSubTypeLabelsArray().mService.mTxtEntrieswill point tomTxtEntry.mService.mNumTxtEntrieswill be set to one.- Other
mServicefields (port, priority, weight) are set to zero. mTxtEntry.mKeyis set to NULL (value is treated as already encoded).mTxtEntry.mValuewill point to an allocated buffer which can be retrieved using the functionotSrpClientBuffersGetServiceEntryTxtBuffer().mTxtEntry.mValueLengthis set to zero.- All related data/string buffers and arrays are cleared to all zero.
@param[in] aInstance A pointer to the OpenThread instance.
@returns A pointer to the newly allocated service entry or NULL if not more entry available in the pool.