The res_nisourserver() looks up the specified server
address in the ns_addr_list[] of the specified res structure.
Parameters
res
(Input) The pointer to the state structure.
server
(Input) The pointer to the server address to check. Although it is declared as
a const struct sockaddr_in*, it may be either a
const struct sockaddr_in* or a const struct sockaddr_in6*.
Authorities:
No authorization is required.
Return Value
(0) Server not found in ns_addr_list[].
(>0) Server found in ns_addr_list[].
(<0) Error.
Error Conditions
When the res_nisourserver() function returns an error,
errno will be set to one of the following:
[EFAULT]
The system detected a pointer that was invalid
while attempting to access an input pointer.
[EINVAL]
One of the following reasons:
A NULL pointer was passed to res_nisourserver()
The res appears to be initialized but the reserved field
is not set to zeros.