Chapter Contents

Previous

Next
herror

herror



Prints a Host Error Message

Portability: UNIX compatible


SYNOPSIS
DESCRIPTION
PORTABILITY
RELATED FUNCTIONS


SYNOPSIS

#include <netdb.h>

void herror(const char *string);


DESCRIPTION

herror writes an error message to stderr describing a failure in gethostbyname or gethostbyaddr . If string is not NULL , it is written first, followed by a colon, a space, and the error message corresponding to the h_errno value.

h_errno values and herrno text are as follows:

h_errno value herror text
HOST_NOT_FOUND Host not found
TRY_AGAIN Temporary failure, try later
NO_RECOVERY Nameserver failure
NO_DATA No data of this type associated with this name
NO_ADDRESS No address of this type associated with this name


PORTABILITY

herror is portable to other environments, including most UNIX systems, that implement BSD sockets.


RELATED FUNCTIONS

gethostbyaddr , gethostbyname


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.