dns_resolve.h 527 B

123456789101112131415161718192021222324252627
  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. #define NFS_DNS_HOSTNAME_MAXLEN (128)
  7. #ifdef CONFIG_NFS_USE_KERNEL_DNS
  8. static inline int nfs_dns_resolver_init(void)
  9. {
  10. return 0;
  11. }
  12. static inline void nfs_dns_resolver_destroy(void)
  13. {}
  14. #else
  15. extern int nfs_dns_resolver_init(void);
  16. extern void nfs_dns_resolver_destroy(void);
  17. #endif
  18. extern ssize_t nfs_dns_resolve_name(char *name, size_t namelen,
  19. struct sockaddr *sa, size_t salen);
  20. #endif