mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-09 13:46:39 +07:00
c2e8139c9f
Use the kernel DNS resolver to translate hostnames to IP addresses. Create a new config option to choose between the legacy DNS resolver and the new resolver. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
27 lines
527 B
C
27 lines
527 B
C
/*
|
|
* Resolve DNS hostnames into valid ip addresses
|
|
*/
|
|
#ifndef __LINUX_FS_NFS_DNS_RESOLVE_H
|
|
#define __LINUX_FS_NFS_DNS_RESOLVE_H
|
|
|
|
#define NFS_DNS_HOSTNAME_MAXLEN (128)
|
|
|
|
|
|
#ifdef CONFIG_NFS_USE_KERNEL_DNS
|
|
static inline int nfs_dns_resolver_init(void)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline void nfs_dns_resolver_destroy(void)
|
|
{}
|
|
#else
|
|
extern int nfs_dns_resolver_init(void);
|
|
extern void nfs_dns_resolver_destroy(void);
|
|
#endif
|
|
|
|
extern ssize_t nfs_dns_resolve_name(char *name, size_t namelen,
|
|
struct sockaddr *sa, size_t salen);
|
|
|
|
#endif
|