Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.6.0.3
|
The Domain Name System (DNS) is an Internet directory service. DNS is how domain names are translated into IP addresses.
A DNS Client is often referred to as a resolver. DNS client uses a defined protocol to obtain resource data from name servers on its network. It obtains the resource data from Name Servers as response to its requests. Resolvers must be able to access at least one Name Server and use that Name Server information to answer a query directly or pursue the query using referrals to other Name Servers.
This document provides a brief description of the DNS OpEN APIs. The DNS OpEN APIs allow processes outside of the ICOS main process (switchdrvr) access to DNS services. It provides the following services which correspond to DNS Client side activities.
All 'Set' operations may affect the Switch behavior and configuration.
In the main function, the sample application initializes the OpEN API RPC service by calling openapiClientRegister() and waits for the RPC service in switchdrvr to start. A Client Handle is returned by openapiClientRegister() which is used while invoking the OpEN APIs. The application then exercises the associated OpEN APIs and logs informational and/or error messages on the console. The example application runs to its completion and exits.
dns_example.c is a sample application that demonstrates the use of the DNS OpEN APIs. dns_example is started from the command line and has the following usage syntax:
Usage: dns_example <test#> <arg1> <arg2> ...
It exercises all the DNS OpEN APIs with appropriate arguments to manage the DNS component in the ICOS main process (switchdrvr).
CLI Command | OpEN API Reference |
---|---|
(Config)# [no] ip domain name <name> | openapiDNSDefaultDomainNameSet() openapiDNSDefaultDomainNameDelete() openapiDNSDefaultDomainNameGet() |
(Config)# ip name server <server-address1> [<server-address2>.....<server-address8>] | openapiDNSIpNameServerAdd() openapiDNSIpNameServersNextGet() |
(Config)# no ip name server [<server-address1>.....<server-address8>] | openapiDNSIpNameServerDelete() |
(Config)# ip host <name> <ipaddress> | openapiDNSStaticHostAddressMappingSet() openapiDNSStaticHostNextGet() openapiDNSStaticHostIpAddrGet() |
(Config)# no ip host <name> | openapiDNSStaticHostAddressMappingRemove() |
(Config)# no ip host <name> | openapiDNSStaticHostAddressMappingRemove() |
(Config)# [no] ip domain lookup | openapiDNSAdminModeSet() opeapiDNSAdminModeGet() |