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

  1. If the h_error_value is out of range or not found, "Unknown resolver error" will be returned.

Related Information


Example

See res_ninit() for an example of how hstrerror() is used.



API introduced: V5R1

[ Back to top | UNIX-Type APIs | APIs by category ]