HP-UX C SIP Stack Programmer's Guide (Novembery 2007)

346 HP-UX C SIP Stack Programmers Guide
Resolver API
RESOLVER
C
ALLBACKS
The application has to specify an RvSipResolverReportDataEv() callback when
activating the resolver (by calling RvSipResolverResolve()). This callback will
pop whenever the DNS algorithm session has ended, and will indicate if the
algorithm session was successful or not.
After the callback has popped, the DNS list that you supplied the resolver
should contain the answers. You can obtain the list by using the
RvSipResolverGetDnsList() function. Once you are done using the resolver,
you can call RvSipResolverTerminate() to terminate the resolver. You will need
to destruct the DNS list manually.
RESOLVER MANAGER
FUNCTIONS
The ResolverMgr controls the SIP Stack collection of resolvers. You use the
Resolver Manager API to create new resolvers. In addition, the ResolverMgr
holds the list of DNS servers that the resolvers will contact to resolve DNS
names.
The following Resolver Manager API functions are provided:
RvSipResolverMgrCreateResolver()
Creates a new resolver and exchanges handles with the application. As soon as
the function returns a valid status code, the new resolver is ready for use.
RvSipResolverMgrSetDnsServers()/RvSipResolverMgrGetDnsServers()
Sets a new list of DNS servers to the ResolverMgr. In the process of address
resolution, host names are resolved to IP addresses by sending DNS queries to
the SIP Stack DNS servers. If one server fails the next DNS server on the list is
queried. When the SIP Stack is constructed, a DNS servers list is set to the SIP
Stack using the computer configuration. The ResolverMgr keeps the list. The
application can use the RvSipResolverMgrSetDnsServers() function to provide
a new set of DNS servers to the ResolverMgr. It can use the
RvSipResolverMgrGetDnsServers() function to get the current DNS servers list.
RvSipResolverMgrSetDnsDomains()/RvSipResolverMgrGetDnsDomains()
Sets a new list of DNS domains to the ResolverMgr. The SIP Stack provides
Domain Suffix Search Order capability, which specifies the DNS domain
suffixes to be appended to the host names during name resolution. When
attempting to resolve a fully qualified domain name (FQDN) from a host that
includes a name only, the system will first append the local domain name to the
host name and query DNS servers. If this is not successful, the system will use
the Domain Suffix list to create additional FQDNs in the order listed and will
query DNS servers for each FQDN. When the SIP Stack initializes, the DNS