File syn_dns.h¶
Go to the source code of this file
UDP DNS resolver and mDNS responder.
#include "../common/syn_defs.h"#include "../port/syn_port_socket.h"#include "../pt/syn_pt.h"#include "../sched/syn_task.h"
Classes¶
| Type | Name |
|---|---|
| struct | SYN_DnsResolver DNS resolver context. |
| struct | SYN_Mdns mDNS responder instance. |
Public Functions¶
| Type | Name |
|---|---|
| SYN_PT_Status | syn_dns_resolve_task (SYN_PT * pt, SYN_Task * task) Cooperative task for resolving a hostname via DNS. |
| SYN_Status | syn_mdns_init (SYN_Mdns * mdns, const char * hostname, const uint8_t ip) Initialize the mDNS responder. |
| SYN_PT_Status | syn_mdns_task (SYN_PT * pt, SYN_Task * task) Cooperative task for responding to local mDNS queries. |
Public Functions Documentation¶
function syn_dns_resolve_task¶
Cooperative task for resolving a hostname via DNS.
Register this as a SYN_TaskFunc with user_data pointing to a SYN_DnsResolver instance. The task runs non-blocking UDP queries, yielding via PT_YIELD until resolution completes or times out.
Parameters:
ptProtothread pointer.taskTask structure whose user_data points to a SYN_DnsResolver.
Returns:
PT_WAITING while running, PT_EXITED when done, or PT_ENDED on early exit.
function syn_mdns_init¶
Initialize the mDNS responder.
Parameters:
mdnsmDNS instance.hostnameHostname to respond to (without .local suffix).ipIPv4 address to advertise.
Returns:
SYN_OK on success.
function syn_mdns_task¶
Cooperative task for responding to local mDNS queries.
Parameters:
ptProtothread pointer.taskTask structure whose user_data points to a SYN_Mdns.
Returns:
PT_WAITING while running, PT_EXITED when done.
The documentation for this class was generated from the following file src/syntropic/net/syn_dns.h