hstrerror()--Retrieve Resolver Error Message
Syntax
#include <sys/types.h> #include <netinet/in.h> #include <arpa/nameser.h> #include <resolv.h> char* hstrerror(int h_error_value);
Service Program Name: QSOSRV2
Default Public Authority: *USE
Threadsafe: Yes
The hstrerror() function is used to retrieve the text string that describes a resolver h_errno value.
Parameters
- h_error_value (Input)
- The h_errno received from a resolver API.
Return Value
The hstrerror() API returns a pointer to the error text.
Authorities:
No authorization is required.
Error Conditions
None
Usage Notes
- If the h_error_value is out of range or not found, "Unknown resolver error" will be returned.
Related Information
- res_findzonecut()--Find the Enclosing Zone and
Servers
- res_hostalias()--Retrieve the host alias
- res_ninit()--Initialize res Structure
- res_nclose()--Close Socket and Reset res
Structure
- res_nmkquery()--Place Domain Query in
Buffer
- res_nmkupdate()--Construct an Update
Packet
- res_nquery()--Send Domain Query
- res_nsearch()--Search for Domain Name
- res_nsend()--Send Buffered Domain Query
- res_nsendsigned()--Send Authenticated Domain
Query
- res_nupdate()--Build and Send Dynamic
Updates
- res_xlate()--Translate DNS Packets
Example
See res_ninit() for an example of how hstrerror() is used.
API introduced: V5R1