pub unsafe extern "C" fn otPlatTrelRegisterService(
aInstance: *mut otInstance,
aPort: u16,
aTxtData: *const u8,
aTxtLength: u8,
)
Expand description
Registers a new service to be advertised using DNS-SD [RFC6763].
The service name is “_trel._udp”. The platform should use its own hostname, which when combined with the service name and the local DNS-SD domain name will produce the full service instance name, for example “example-host._trel._udp.local.”.
The domain under which the service instance name appears will be ‘local’ for mDNS, and will be whatever domain is used for service registration in the case of a non-mDNS local DNS-SD service.
A subsequent call to this function updates the previous service. It is used to update the TXT record data and/or the port number.
The @p aTxtData buffer is not persisted after the return from this function. The platform layer MUST NOT keep the pointer and instead copy the content if needed.
@param[in] aInstance The OpenThread instance. @param[in] aPort The port number to include in the SRV record of the advertised service. @param[in] aTxtData A pointer to the TXT record data (encoded) to be include in the advertised service. @param[in] aTxtLength The length of @p aTxtData (number of bytes).