процедуры распознавания (resolver routines)
Возвращаемое значение (Return value)
The res_ninit() and res_init() functions return 0 on success, or
-1 if an error occurs.
The res_nquery(), res_query(), res_nsearch(), res_search(),
res_nquerydomain(), res_querydomain(), res_nmkquery(),
res_mkquery(), res_nsend(), and res_send() functions return the
length of the response, or -1 if an error occurs.
The dn_comp() and dn_expand() functions return the length of the
compressed name, or -1 if an error occurs.
In the case of an error return from res_nquery(), res_query(),
res_nsearch(), res_search(), res_nquerydomain(), or
res_querydomain(), the global variable h_errno (see
gethostbyname(3)) can be consulted to determine the cause of the
error.