Zephyr Project API 3.7.0
A Scalable Open Source RTOS
|
Result callbacks. More...
#include <dns_resolve.h>
Data Fields | |
struct k_work_delayable | timer |
Timeout timer. | |
struct dns_resolve_context * | ctx |
Back pointer to ctx, needed in timeout handler. | |
dns_resolve_cb_t | cb |
Result callback. | |
void * | user_data |
User data. | |
k_timeout_t | timeout |
TX timeout. | |
const char * | query |
String containing the thing to resolve like www.example.com. | |
enum dns_query_type | query_type |
Query type. | |
uint16_t | id |
DNS id of this query. | |
uint16_t | query_hash |
Hash of the DNS name + query type we are querying. | |
Result callbacks.
We have multiple callbacks here so that it is possible to do multiple queries at the same time.
Contents of this structure can be inspected and changed only when the lock is held.
dns_resolve_cb_t dns_resolve_context::dns_pending_query::cb |
Result callback.
A null value indicates the slot is not in use.
struct dns_resolve_context* dns_resolve_context::dns_pending_query::ctx |
Back pointer to ctx, needed in timeout handler.
uint16_t dns_resolve_context::dns_pending_query::id |
DNS id of this query.
const char* dns_resolve_context::dns_pending_query::query |
String containing the thing to resolve like www.example.com.
This is set to a non-null value when the query is started, and is not used thereafter.
If the query completed at a point where the work item was still pending the pointer is cleared to indicate that the query is complete, but release of the query slot will be deferred until a request for a slot determines that the work item has been released.
uint16_t dns_resolve_context::dns_pending_query::query_hash |
Hash of the DNS name + query type we are querying.
This hash is calculated so we can match the response that we are receiving. This is needed mainly for mDNS which is setting the DNS id to 0, which means that the id alone cannot be used to find correct pending query.
enum dns_query_type dns_resolve_context::dns_pending_query::query_type |
Query type.
k_timeout_t dns_resolve_context::dns_pending_query::timeout |
TX timeout.
struct k_work_delayable dns_resolve_context::dns_pending_query::timer |
Timeout timer.
void* dns_resolve_context::dns_pending_query::user_data |
User data.