dns client api. utilizing dns functionality baseline application kernel, stack, bsp dns integral...
TRANSCRIPT
![Page 1: DNS Client API. Utilizing DNS Functionality Baseline Application Kernel, Stack, BSP DNS Integral DNSAddServer() DNSRemoveServer() DNSGetServers() DNSgethostbyname()](https://reader036.vdocuments.mx/reader036/viewer/2022072010/56649da95503460f94a96aad/html5/thumbnails/1.jpg)
DNS Client API
![Page 2: DNS Client API. Utilizing DNS Functionality Baseline Application Kernel, Stack, BSP DNS Integral DNSAddServer() DNSRemoveServer() DNSGetServers() DNSgethostbyname()](https://reader036.vdocuments.mx/reader036/viewer/2022072010/56649da95503460f94a96aad/html5/thumbnails/2.jpg)
Utilizing DNS Functionality
BaselineApplicationKernel, Stack, BSP
DNS Integral
•DNSAddServer()
•DNSRemoveServer()
•DNSGetServers()
•DNSgethostbyname()
Get an IP Address Based on Host Name
Supplied API’s
![Page 3: DNS Client API. Utilizing DNS Functionality Baseline Application Kernel, Stack, BSP DNS Integral DNSAddServer() DNSRemoveServer() DNSGetServers() DNSgethostbyname()](https://reader036.vdocuments.mx/reader036/viewer/2022072010/56649da95503460f94a96aad/html5/thumbnails/3.jpg)
Typical DNS Implementation
•Informs Stack of DNS Server(s)•Via DHCP or Direct Call
•Returns an IP address if Successful
DNSAddServer(ULONG IP_Address)
DNSgethostbyname(char *name)
![Page 4: DNS Client API. Utilizing DNS Functionality Baseline Application Kernel, Stack, BSP DNS Integral DNSAddServer() DNSRemoveServer() DNSGetServers() DNSgethostbyname()](https://reader036.vdocuments.mx/reader036/viewer/2022072010/56649da95503460f94a96aad/html5/thumbnails/4.jpg)
Getting DNS Server IP Addresses
• Use DNSGetServers to retrieve list of DNS servers:
int DNSGetServers( unsigned long *IpAddrs, int nArraySize )
Server count
• Up to 3 DNS server IP addresses are returned in the IpAddrs array (which should therefore usually have 3 elements).
• Returns number of DNS servers, or –1 for failure.
• This function is especially useful when the DHCP client is used.
IP address array (3 elements)
Size of supplied IP address array