![]() |
nrfxlib API 3.3.99
|
| int nrf_setdnsaddr | ( | int | family, |
| const void * | in_addr, | ||
| nrf_socklen_t | in_size ) |
#include <nrf_modem/include/nrf_socket.h>
Set or unset a fallback DNS address.
The fallback DNS address is used only when the network-provided DNS addresses are missing or unreachable. The fallback DNS does not override the network-provided DNS.
| family | Address family, either NRF_AF_INET or NRF_AF_INET6. |
| in_addr | An IPv4 or IPv6 address encoded in a nrf_in_addr or nrf_in6_addr structure, respectively. To unset the fallback DNS address, in_addr must be NULL. |
| in_size | Size of the structure pointed to by in_addr. To unset the fallback DNS address, in_size must be 0 (when in_addr is NULL). |
| 0 | On success |
| -1 | On error, and set errno to indicate the reason. |
The function may return -1 and set the following errno: