pub unsafe extern "C" fn nrf_setdnsaddr(
    family: c_int,
    in_addr: *const c_void,
    in_size: nrf_socklen_t
) -> c_int
Expand description

Set a secondary DNS address.

@details The secondary DNS address is only used in case the primary DNS address is unreachable, or if no DNS address is provided by the operator. The secondary DNS address does not override the primary DNS address.

@note It is not possible to unset a secondary DNS address set using this function.

  • family - Address family.
  • in_addr - An IPv4 or IPv6 address encoded in a nrf_in_addr or nrf_in6_addr structure, respectively.
  • in_size - Size of the structure pointed to by in_addr.

Returns 0 On success Returns -1 On error, and set * errno - to indicate the reason.

The function shall return -1 and set the following errno: