From 94ce1eb94babb4c587b2826452fb053cba745098 Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Tue, 22 Jun 2010 10:41:03 -0400 Subject: libexport.a: Add helpers to manage DNS lookups Introduce DNS query helpers based on getaddrinfo(3) and getnameinfo(3). These will eventually replace the existing hostent-based functions in support/export/hostname.c. Put some of these new helpers to immediate use, where convenient. As they are part of libexport.a, I've added the forward declarations for these new functions in exportfs.h rather than misc.h, where the hostent-based forward declarations are currently. Signed-off-by: Chuck Lever Signed-off-by: Steve Dickson --- support/export/nfsctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'support/export/nfsctl.c') diff --git a/support/export/nfsctl.c b/support/export/nfsctl.c index ae357c7..3b9876a 100644 --- a/support/export/nfsctl.c +++ b/support/export/nfsctl.c @@ -79,7 +79,7 @@ cltsetup(struct nfsctl_client *cltarg, nfs_client *clp) j = 0; for (i = 0; i < cltarg->cl_naddr && i < NFSCLNT_ADDRMAX; i++) { - struct sockaddr_in *sin = get_addrlist_in(clp, i); + const struct sockaddr_in *sin = get_addrlist_in(clp, i); if (sin->sin_family == AF_INET) cltarg->cl_addrlist[j++] = sin->sin_addr; } -- cgit