]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blame - fs/nfs/dns_resolve.h
UBUNTU: Ubuntu-4.10.0-37.41
[mirror_ubuntu-zesty-kernel.git] / fs / nfs / dns_resolve.h
CommitLineData
e571cbf1
TM
1/*
2 * Resolve DNS hostnames into valid ip addresses
3 */
4#ifndef __LINUX_FS_NFS_DNS_RESOLVE_H
5#define __LINUX_FS_NFS_DNS_RESOLVE_H
6
7#define NFS_DNS_HOSTNAME_MAXLEN (128)
8
c2e8139c
BS
9
10#ifdef CONFIG_NFS_USE_KERNEL_DNS
11static inline int nfs_dns_resolver_init(void)
12{
13 return 0;
14}
15
16static inline void nfs_dns_resolver_destroy(void)
17{}
1b340d01
SK
18
19static inline int nfs_dns_resolver_cache_init(struct net *net)
20{
21 return 0;
22}
23
24static inline void nfs_dns_resolver_cache_destroy(struct net *net)
25{}
c2e8139c 26#else
e571cbf1
TM
27extern int nfs_dns_resolver_init(void);
28extern void nfs_dns_resolver_destroy(void);
1b340d01
SK
29extern int nfs_dns_resolver_cache_init(struct net *net);
30extern void nfs_dns_resolver_cache_destroy(struct net *net);
c2e8139c
BS
31#endif
32
1b340d01
SK
33extern ssize_t nfs_dns_resolve_name(struct net *net, char *name,
34 size_t namelen, struct sockaddr *sa, size_t salen);
e571cbf1
TM
35
36#endif