[RFC PATCH 0/2] Add AF_VSOCK support to getnameinfo(3) and getaddrinfo(3)
Florian Weimer
fweimer@redhat.com
Fri Oct 7 14:02:00 GMT 2016
On 10/06/2016 01:19 PM, Florian Weimer wrote:
>>> How do you expect that applications will know that they have to pass
>>> AF_VSOCK to getaddrinfo instead of AF_UNSPEC?
>>
>> For example ncat(1) has --unixsock and --udp command-line options. A
>> --vsock option can be added. At that point the program knows to use
>> AF_VSOCK and the same getaddrinfo(3) code path can be used by TCP, UDP,
>> UNIX, and vsock.
>
> ncat doesn't use getaddrinfo AFAICS, so this isn't going to help it. The
> larger nmap codebase has a call to getaddrinfo, but the code leading to
> it assumes 16-bit port numbers, so it won't be able to use getaddrinfo
> either.
>
> Do you have a better example?
I've looked briefly at nfs-utils. I don't see how you can patch in
AF_VSOCK support using the proposed getaddrinfo support, either. It
seems to do the address and service lookup separately.
Thanks,
Florian
More information about the Libc-alpha
mailing list