Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
dns_resolve_context::dns_pending_query Struct Reference

#include <dns_resolve.h>

Data Fields

struct k_work_delayable timer
 
struct dns_resolve_contextctx
 
dns_resolve_cb_t cb
 
voiduser_data
 
k_timeout_t timeout
 
const char * query
 
enum dns_query_type query_type
 
uint16_t id
 
uint16_t query_hash
 

Detailed Description

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.

Field Documentation

◆ cb

dns_resolve_cb_t dns_resolve_context::dns_pending_query::cb

Result callback.

A null value indicates the slot is not in use.

◆ ctx

struct dns_resolve_context* dns_resolve_context::dns_pending_query::ctx

Back pointer to ctx, needed in timeout handler

◆ id

uint16_t dns_resolve_context::dns_pending_query::id

DNS id of this query

◆ 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.

◆ query_hash

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.

◆ query_type

enum dns_query_type dns_resolve_context::dns_pending_query::query_type

Query type

◆ timeout

k_timeout_t dns_resolve_context::dns_pending_query::timeout

TX timeout

◆ timer

struct k_work_delayable dns_resolve_context::dns_pending_query::timer

Timeout timer

◆ user_data

void* dns_resolve_context::dns_pending_query::user_data

User data


The documentation for this struct was generated from the following file: