Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

dns-c.h/dns-c.c

Prototype

Arguments

p_host_namePointer to a string that contains the host name.
p_rev_host_name

Pointer to a string that will receive the host name resulting from a reverse lookup. This argument should be left DEF_NULL if a forward DNS request is desired.

rev_hostname_len

String length of p_rev_host_name. This argument should evaluate to 0 if a forward DNS request is desired.

p_addrsPointer to arrays that will receive the IP address from this function.
flags

DNS client flag:

DNSc_FLAG_NONE By default this function is blocking.
DNSc_FLAG_NO_BLOCK Don't block (only possible if DNSc's task is enabled).
DNSc_FLAG_FORCE_CACHE Take host from the cache, don't send new DNS request.
DNSc_FLAG_FORCE_RENEW Force DNS request, remove existing entry in the cache.
DNSc_FLAG_FORCE_RESOLUTION Force DNS to resolve given host name.
DNSc_FLAG_IPv4_ONLY Return only IPv4 address(es) (A type).
DNSc_FLAG_IPv6_ONLY Return only IPv6 address(es) (AAAA type).
DNSc_FLAG_REVERSE_LOOKUP Issue a reverse DNS lookup for an IPv4 addr (PTR type).

p_cfg

Must be set to DEF_NULL to use default configuration.

Pointer to a request configuration. Should be set to overwrite default DNS configuration (such as DNS server, request timeout, etc.).

p_errPointer to variable that will receive the return error code from this function.

Returned Values

Resolution status:

...