Merge tag 'rproc-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc...
[linux.git] / fs / nfs / dns_resolve.h
blobfe3b172c4de1d651089f2710acd38566902400ff
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_storage *sa, size_t salen);
37 #endif