Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Header: #include <applibs/networking.h>
Uses custom DNS server addresses for a Networking_IpConfig struct. Up to three addresses may be specified. Any existing DNS server configured via DHCP will be overridden.
void Networking_IpConfig_EnableCustomDns(Networking_IpConfig *ipConfig, const struct in_addr *dnsServerAddresses,
size_t serverCount);
Parameters
ipConfigA pointer to the Networking_IpConfig struct to update.dnsServerAddressesA pointer to an array of DNS server addresses.serverCountThe number of DNS server addresses in thednsServerAddressesarray.
Errors
Returns -1 if an error is encountered and sets errno to the error value.
EFAULT: the
ipConfigordnsServerAddressesparameter is NULL.EINVAL: more than three IP addresses were provided, or an address in
dnsServerAddressesequals INADDR_ANY.
Any other errno may also be specified; such errors aren't deterministic, and there's no guarantee that the same behavior will be retained through system updates.
Return value
Returns 0 for success, or -1 for failure, in which case errno is set to the error value.
Concepts and samples
Azure Sphere can run an external device on the network.