dns_resolve.h (851B)
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 7 8#define NFS_DNS_HOSTNAME_MAXLEN (128) 9 10 11#ifdef CONFIG_NFS_USE_KERNEL_DNS 12static inline int nfs_dns_resolver_init(void) 13{ 14 return 0; 15} 16 17static inline void nfs_dns_resolver_destroy(void) 18{} 19 20static inline int nfs_dns_resolver_cache_init(struct net *net) 21{ 22 return 0; 23} 24 25static inline void nfs_dns_resolver_cache_destroy(struct net *net) 26{} 27#else 28extern int nfs_dns_resolver_init(void); 29extern void nfs_dns_resolver_destroy(void); 30extern int nfs_dns_resolver_cache_init(struct net *net); 31extern void nfs_dns_resolver_cache_destroy(struct net *net); 32#endif 33 34extern ssize_t nfs_dns_resolve_name(struct net *net, char *name, 35 size_t namelen, struct sockaddr *sa, size_t salen); 36 37#endif