DNS - Platform
This module includes the platform abstraction for sending recursive DNS query to upstream DNS servers.
Summary
Typedefs |
|
---|---|
otPlatDnsUpstreamQuery
|
typedefstruct otPlatDnsUpstreamQuery
This opaque type represents an upstream DNS query transaction. |
Functions |
|
---|---|
otPlatDnsCancelUpstreamQuery(otInstance *aInstance, otPlatDnsUpstreamQuery *aTxn)
|
void
Cancels a transaction of upstream query.
|
otPlatDnsStartUpstreamQuery(otInstance *aInstance, otPlatDnsUpstreamQuery *aTxn, const otMessage *aQuery)
|
void
Starts an upstream query transaction.
|
otPlatDnsUpstreamQueryDone(otInstance *aInstance, otPlatDnsUpstreamQuery *aTxn, otMessage *aResponse)
|
void
The platform calls this function to finish DNS query.
|
Typedefs
otPlatDnsUpstreamQuery
struct otPlatDnsUpstreamQuery otPlatDnsUpstreamQuery
This opaque type represents an upstream DNS query transaction.
Functions
otPlatDnsCancelUpstreamQuery
void otPlatDnsCancelUpstreamQuery( otInstance *aInstance, otPlatDnsUpstreamQuery *aTxn )
Cancels a transaction of upstream query.
The platform must call otPlatDnsUpstreamQueryDone
to release the resources.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otPlatDnsStartUpstreamQuery
void otPlatDnsStartUpstreamQuery( otInstance *aInstance, otPlatDnsUpstreamQuery *aTxn, const otMessage *aQuery )
Starts an upstream query transaction.
- In success case (and errors represented by DNS protocol messages), the platform is expected to call
otPlatDnsUpstreamQueryDone
. - The OpenThread core may cancel a (possibly timeout) query transaction by calling
otPlatDnsCancelUpstreamQuery
, the platform must not callotPlatDnsUpstreamQueryDone
on a cancelled transaction.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
otPlatDnsUpstreamQueryDone
void otPlatDnsUpstreamQueryDone( otInstance *aInstance, otPlatDnsUpstreamQuery *aTxn, otMessage *aResponse )
The platform calls this function to finish DNS query.
The transaction will be released, so the platform must not call on the same transaction twice. This function passes the ownership of aResponse
to OpenThread stack.
Platform can pass a nullptr to close a transaction without a response.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
Resources
OpenThread API Reference topics originate from the source code, available on GitHub. For more information, or to contribute to our documentation, refer to Resources.