openthread_sys

Function otDnsClientBrowse

Source
pub unsafe extern "C" fn otDnsClientBrowse(
    aInstance: *mut otInstance,
    aServiceName: *const c_char,
    aCallback: otDnsBrowseCallback,
    aContext: *mut c_void,
    aConfig: *const otDnsQueryConfig,
) -> otError
Expand description

Sends a DNS browse (service instance enumeration) query for a given service name.

Is available when OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE is enabled.

The @p aConfig can be NULL. In this case the default config (from otDnsClientGetDefaultConfig()) will be used as the config for this query. In a non-NULL @p aConfig, some of the fields can be left unspecified (value zero). The unspecified fields are then replaced by the values from the default config.

@param[in] aInstance A pointer to an OpenThread instance. @param[in] aServiceName The service name to query for (MUST NOT be NULL). @param[in] aCallback A function pointer that shall be called on response reception or time-out. @param[in] aContext A pointer to arbitrary context information. @param[in] aConfig A pointer to the config to use for this query.

@retval OT_ERROR_NONE Query sent successfully. @p aCallback will be invoked to report the status. @retval OT_ERROR_NO_BUFS Insufficient buffer to prepare and send query.