Comtrol eCos User Manual

Page 525

Advertising
background image

Chapter 38. TCP/IP Library Reference

/*NOTREACHED*/

}

printf("host=%s\n", hbuf);

DIAGNOSTICS

The function indicates successful completion by a zero return value; a

non-zero return value indicates failure.

Error codes are as below:

EAI_AGAIN

The name could not be resolved at this time.

Future

attempts may succeed.

EAI_BADFLAGS

The flags had an invalid value.

EAI_FAIL

A non-recoverable error occurred.

EAI_FAMILY

The address family was not recognized or the address

length was invalid for the specified family.

EAI_MEMORY

There was a memory allocation failure.

EAI_NONAME

The name does not resolve for the supplied parameters.

NI_NAMEREQD is set and the host’s name cannot be

located, or both nodename and servname were null.

EAI_SYSTEM

A system error occurred.

The error code can be found

in errno.

SEE ALSO

getaddrinfo(3), gethostbyaddr(3), getservbyport(3), hosts(5),

resolv.conf(5), services(5), hostname(7), named(8)

R. Gilligan, S. Thomson, J. Bound, and W. Stevens, Basic Socket Interface

Extensions for IPv6, RFC2553, March 1999.

Tatsuya Jinmei and Atsushi Onoe, An Extension of Format for IPv6 Scoped

Addresses, internet draft, draft-ietf-ipngwg-scopedaddr-format-02.txt,

work in progress material.

Craig Metz, "Protocol Independence Using the Sockets API", Proceedings of

the freenix track: 2000 USENIX annual technical conference, June 2000.

HISTORY

The implementation first appeared in WIDE Hydrangea IPv6 protocol stack

kit.

STANDARDS

The getaddrinfo() function is defined IEEE POSIX 1003.1g draft specifica-

tion, and documented in “Basic Socket Interface Extensions for IPv6”

(RFC2553).

BUGS

The current implementation is not thread-safe.

The text was shamelessly copied from RFC2553.

421

Advertising