This is the mail archive of the
mailing list for the glibc project.
[RFC PATCH 0/2] Add AF_VSOCK support to getnameinfo(3) and getaddrinfo(3)
- From: Stefan Hajnoczi <stefanha at redhat dot com>
- To: libc-alpha at sourceware dot org
- Cc: Jorgen Hansen <jhansen at vmware dot com>, Stefan Hajnoczi <stefanha at redhat dot com>
- Date: Thu, 29 Sep 2016 11:27:26 +0100
- Subject: [RFC PATCH 0/2] Add AF_VSOCK support to getnameinfo(3) and getaddrinfo(3)
- Authentication-results: sourceware.org; auth=none
The AF_VSOCK address family has been available in Linux since 3.9. It allows
virtual machines and hypervisors to communicate over a zero-configuration
transport without Ethernet or IP.
Many existing programs use getnameinfo(3) and getaddrinfo(3). Porting programs
to support AF_VSOCK is easy if the library functions can handle this address
family. Without support in glibc each program needs to duplicate address
parsing code and it becomes harder to port programs.
In Patch 1 I have commented on use of the <linux/vm_sockets.h> header which
declares struct sockaddr_vm. I'm not familiar with the process for syncing
Linux uapi headers with glibc headers. What is necessary to use this header
file (or write an equivalent inside glibc)?
I used #ifdef AF_VSOCK since not all the sysdeps/ will have this macro defined.
Is there a nicer way of handling this?
Stefan Hajnoczi (2):
getnameinfo: Add AF_VSOCK support
getaddrinfo: Add AF_VSOCK support
inet/getnameinfo.c | 52 ++++++++++++++++++++++
sysdeps/posix/getaddrinfo.c | 104 ++++++++++++++++++++++++++++++++++++++------
2 files changed, 143 insertions(+), 13 deletions(-)