Merge tag 'regmap-fix-v5.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux/fpc-iii.git] / fs / nfs / dns_resolve.h
blob576ff4b54c82a84a1bfff8f970c2e309f40f0744
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Resolve DNS hostnames into valid ip addresses
4 */
5 #ifndef __LINUX_FS_NFS_DNS_RESOLVE_H
6 #define __LINUX_FS_NFS_DNS_RESOLVE_H
8 #define NFS_DNS_HOSTNAME_MAXLEN (128)
11 #ifdef CONFIG_NFS_USE_KERNEL_DNS
12 static inline int nfs_dns_resolver_init(void)
14 return 0;
17 static inline void nfs_dns_resolver_destroy(void)
20 static inline int nfs_dns_resolver_cache_init(struct net *net)
22 return 0;
25 static inline void nfs_dns_resolver_cache_destroy(struct net *net)
27 #else
28 extern int nfs_dns_resolver_init(void);
29 extern void nfs_dns_resolver_destroy(void);
30 extern int nfs_dns_resolver_cache_init(struct net *net);
31 extern void nfs_dns_resolver_cache_destroy(struct net *net);
32 #endif
34 extern ssize_t nfs_dns_resolve_name(struct net *net, char *name,
35 size_t namelen, struct sockaddr *sa, size_t salen);
37 #endif