resolv.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #ifndef _RESOLV_H_
  2. # ifndef _ISOMAC
  3. # include <stdbool.h>
  4. # define RES_SET_H_ERRNO(r,x) \
  5. do \
  6. { \
  7. (r)->res_h_errno = x; \
  8. __set_h_errno(x); \
  9. } \
  10. while (0)
  11. # endif
  12. #include <resolv/resolv.h>
  13. # if defined _RESOLV_H_ && !defined _ISOMAC
  14. # if IS_IN (libc)
  15. # define __resp __libc_resp
  16. # endif
  17. extern __thread struct __res_state *__resp attribute_tls_model_ie;
  18. # undef _res
  19. # define _res (*__resp)
  20. /* Now define the internal interfaces. */
  21. extern int __res_vinit (res_state, int) attribute_hidden;
  22. extern void _sethtent (int);
  23. extern struct hostent *_gethtent (void);
  24. extern struct hostent *_gethtbyname (const char *__name);
  25. extern struct hostent *_gethtbyname2 (const char *__name, int __af);
  26. struct hostent *_gethtbyaddr (const char *addr, size_t __len, int __af);
  27. extern uint32_t _getlong (const unsigned char *__src);
  28. extern uint16_t _getshort (const unsigned char *__src);
  29. extern void __res_iclose (res_state statp, bool free_addr);
  30. libc_hidden_proto (__res_ninit)
  31. libc_hidden_proto (__res_nclose)
  32. libc_hidden_proto (__res_iclose)
  33. libc_hidden_proto (__res_randomid)
  34. libc_hidden_proto (__res_state)
  35. libresolv_hidden_proto (_sethtent)
  36. libresolv_hidden_proto (_gethtent)
  37. libresolv_hidden_proto (_gethtbyaddr)
  38. libresolv_hidden_proto (_gethtbyname2)
  39. libresolv_hidden_proto (__putlong)
  40. libresolv_hidden_proto (__putshort)
  41. libresolv_hidden_proto (__p_cdnname)
  42. libresolv_hidden_proto (__p_fqnname)
  43. libresolv_hidden_proto (__p_option)
  44. libresolv_hidden_proto (__sym_ntos)
  45. libresolv_hidden_proto (__p_rcode)
  46. libresolv_hidden_proto (__p_class)
  47. libresolv_hidden_proto (__p_type)
  48. libresolv_hidden_proto (__loc_ntoa)
  49. libresolv_hidden_proto (__fp_nquery)
  50. libresolv_hidden_proto (__fp_query)
  51. libresolv_hidden_proto (__b64_ntop)
  52. libresolv_hidden_proto (__dn_count_labels)
  53. extern __typeof (dn_expand) __libc_dn_expand;
  54. libc_hidden_proto (__libc_dn_expand)
  55. extern __typeof (dn_skipname) __libc_dn_skipname;
  56. libc_hidden_proto (__libc_dn_skipname)
  57. extern __typeof (res_dnok) __libc_res_dnok;
  58. libc_hidden_proto (__libc_res_dnok)
  59. extern __typeof (res_hnok) __libc_res_hnok;
  60. libc_hidden_proto (__libc_res_hnok)
  61. extern __typeof (__res_nameinquery) __libc_res_nameinquery;
  62. libc_hidden_proto (__libc_res_nameinquery)
  63. extern __typeof (__res_queriesmatch) __libc_res_queriesmatch;
  64. libc_hidden_proto (__libc_res_queriesmatch)
  65. /* Variant of res_hnok which operates on binary (but uncompressed) names. */
  66. bool __res_binary_hnok (const unsigned char *dn) attribute_hidden;
  67. # endif /* _RESOLV_H_ && !_ISOMAC */
  68. #endif