Re: getaddrinfo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Myra Nelson wrote:

> After some more searching, work, and this email from the libc help
> list [ http://sourceware.org/ml/libc-help/2011-12/msg00000.html
> ] , I've attempted the code from Ulrich Dreppers page at
> http://www.akkadia.org/drepper/userapi-ipv6.html . The newer version
> of the code (on the right ) which is supposed to be protocol
> independent returns getaddrinfo: Servname not supported for
> ai_socktype, while the older version ( on the left ) seg faults.

Read the manual page getaddrinfo(3).  I presume the error in the newer
version is:

  EAI_SERVICE
    The requested service is not available for the requested socket
    type.  It may be available through another socket type.  For
    example, this error could occur if service was "shell" (a service
    only available on stream sockets), and either hints.ai_protocol was
    IPPROTO_UDP, or hints.ai_socktype was SOCK_DGRAM; or the error could
    occur if service was not NULL, and hints.ai_socktype was SOCK_RAW (a
    socket type that does not support the concept of services).

How did you run the program?  If you use "http" instead of "echo", does
it work with some www host?

With the older version, did you perhaps forget some vital "&" or "*"?


clemens



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux