25#include "nsapi_types.h"
125 const char *interface_name, nsapi_version_t version =
NSAPI_IPv4);
189 const char *interface_name, nsapi_version_t version =
NSAPI_IPv4);
221 host, addr, addr_count, version);
nsapi_addr_t get_addr() const
Get the raw IP address.
Callback class based on template specialization.
nsapi_error_t nsapi_dns_add_server(nsapi_addr_t addr, const char *interface_name)
Add a domain name server to list of servers to query.
signed int nsapi_size_or_error_t
Type used to represent either a size or error passed through sockets.
nsapi_error_t nsapi_dns_query(NetworkStack *stack, const char *host, SocketAddress *addr, nsapi_version_t version=NSAPI_IPv4)
Query a domain name server for an IP address of a given hostname.
signed int nsapi_error_t
Type used to represent error codes.
void nsapi_dns_reset()
nsapi_dns_reset Resets all internal states and frees reserved memory, see NOTE! Can be used to clean ...
NetworkStack * nsapi_create_stack(nsapi_stack_t *stack)
Convert a raw nsapi_stack_t object into a C++ NetworkStack object.
nsapi_error_t nsapi_dns_query_async(NetworkStack *stack, const char *host, NetworkStack::hostbyname_cb_t callback, NetworkStack::call_in_callback_cb_t call_in_cb, nsapi_version_t version=NSAPI_IPv4)
Query a domain name server for an IP address of a given hostname.
nsapi_error_t nsapi_dns_query_async_cancel(nsapi_size_or_error_t id)
Cancels asynchronous hostname translation.
void nsapi_dns_call_in_set(NetworkStack::call_in_callback_cb_t callback)
Set a call in callback.
nsapi_size_or_error_t nsapi_dns_query_multiple_async(NetworkStack *stack, const char *host, NetworkStack::hostbyname_cb_t callback, nsapi_size_t addr_count, NetworkStack::call_in_callback_cb_t call_in_cb, const char *interface_name, nsapi_version_t version=NSAPI_IPv4)
Query a domain name server for an IP address of a given hostname (asynchronous)
nsapi_size_or_error_t nsapi_dns_query_multiple(NetworkStack *stack, const char *host, SocketAddress *addr, nsapi_size_t addr_count, const char *interface_name, nsapi_version_t version=NSAPI_IPv4)
Query a domain name server for multiple IP address of a given hostname.
unsigned int nsapi_size_t
Type used to represent the size of data passed through sockets.
IP address structure for passing IP addresses by value.