diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2010-06-22 10:41:03 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2010-06-22 16:04:53 -0400 |
commit | 94ce1eb94babb4c587b2826452fb053cba745098 (patch) | |
tree | 3fb09941085d89296ee6b6904f82b44058910f95 /support/include/exportfs.h | |
parent | 8d61f2518bebe11c5fd0624857f83de1dceca991 (diff) | |
download | nfs-utils-94ce1eb94babb4c587b2826452fb053cba745098.tar.gz nfs-utils-94ce1eb94babb4c587b2826452fb053cba745098.tar.xz nfs-utils-94ce1eb94babb4c587b2826452fb053cba745098.zip |
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 <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'support/include/exportfs.h')
-rw-r--r-- | support/include/exportfs.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/support/include/exportfs.h b/support/include/exportfs.h index 70bdd57..97bb68e 100644 --- a/support/include/exportfs.h +++ b/support/include/exportfs.h @@ -146,6 +146,19 @@ void xtab_append(nfs_export *); int secinfo_addflavor(struct flav_info *, struct exportent *); +char * host_ntop(const struct sockaddr *sap, + char *buf, const size_t buflen); +__attribute_malloc__ +struct addrinfo * host_pton(const char *paddr); +__attribute_malloc__ +struct addrinfo * host_addrinfo(const char *hostname); +__attribute_malloc__ +char * host_canonname(const struct sockaddr *sap); +__attribute_malloc__ +struct addrinfo * host_reliable_addrinfo(const struct sockaddr *sap); +__attribute_malloc__ +struct addrinfo * host_numeric_addrinfo(const struct sockaddr *sap); + int rmtab_read(void); struct nfskey * key_lookup(char *hname); |