cares.pxd 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. cdef extern from "ares.h":
  2. struct ares_options:
  3. int flags
  4. void* sock_state_cb
  5. void* sock_state_cb_data
  6. int timeout
  7. int tries
  8. int ndots
  9. unsigned short udp_port
  10. unsigned short tcp_port
  11. char **domains
  12. int ndomains
  13. char* lookups
  14. int ARES_OPT_FLAGS
  15. int ARES_OPT_SOCK_STATE_CB
  16. int ARES_OPT_TIMEOUTMS
  17. int ARES_OPT_TRIES
  18. int ARES_OPT_NDOTS
  19. int ARES_OPT_TCP_PORT
  20. int ARES_OPT_UDP_PORT
  21. int ARES_OPT_SERVERS
  22. int ARES_OPT_DOMAINS
  23. int ARES_OPT_LOOKUPS
  24. int ARES_FLAG_USEVC
  25. int ARES_FLAG_PRIMARY
  26. int ARES_FLAG_IGNTC
  27. int ARES_FLAG_NORECURSE
  28. int ARES_FLAG_STAYOPEN
  29. int ARES_FLAG_NOSEARCH
  30. int ARES_FLAG_NOALIASES
  31. int ARES_FLAG_NOCHECKRESP
  32. int ARES_LIB_INIT_ALL
  33. int ARES_SOCKET_BAD
  34. int ARES_SUCCESS
  35. int ARES_ENODATA
  36. int ARES_EFORMERR
  37. int ARES_ESERVFAIL
  38. int ARES_ENOTFOUND
  39. int ARES_ENOTIMP
  40. int ARES_EREFUSED
  41. int ARES_EBADQUERY
  42. int ARES_EBADNAME
  43. int ARES_EBADFAMILY
  44. int ARES_EBADRESP
  45. int ARES_ECONNREFUSED
  46. int ARES_ETIMEOUT
  47. int ARES_EOF
  48. int ARES_EFILE
  49. int ARES_ENOMEM
  50. int ARES_EDESTRUCTION
  51. int ARES_EBADSTR
  52. int ARES_EBADFLAGS
  53. int ARES_ENONAME
  54. int ARES_EBADHINTS
  55. int ARES_ENOTINITIALIZED
  56. int ARES_ELOADIPHLPAPI
  57. int ARES_EADDRGETNETWORKPARAMS
  58. int ARES_ECANCELLED
  59. int ARES_NI_NOFQDN
  60. int ARES_NI_NUMERICHOST
  61. int ARES_NI_NAMEREQD
  62. int ARES_NI_NUMERICSERV
  63. int ARES_NI_DGRAM
  64. int ARES_NI_TCP
  65. int ARES_NI_UDP
  66. int ARES_NI_SCTP
  67. int ARES_NI_DCCP
  68. int ARES_NI_NUMERICSCOPE
  69. int ARES_NI_LOOKUPHOST
  70. int ARES_NI_LOOKUPSERVICE
  71. int ares_library_init(int flags)
  72. void ares_library_cleanup()
  73. int ares_init_options(void *channelptr, ares_options *options, int)
  74. int ares_init(void *channelptr)
  75. void ares_destroy(void *channelptr)
  76. void ares_gethostbyname(void* channel, char *name, int family, void* callback, void *arg)
  77. void ares_gethostbyaddr(void* channel, void *addr, int addrlen, int family, void* callback, void *arg)
  78. void ares_process_fd(void* channel, int read_fd, int write_fd)
  79. char* ares_strerror(int code)
  80. void ares_cancel(void* channel)
  81. void ares_getnameinfo(void* channel, void* sa, int salen, int flags, void* callback, void *arg)
  82. struct in_addr:
  83. pass
  84. struct ares_in6_addr:
  85. pass
  86. struct addr_union:
  87. in_addr addr4
  88. ares_in6_addr addr6
  89. struct ares_addr_node:
  90. ares_addr_node *next
  91. int family
  92. addr_union addr
  93. int ares_set_servers(void* channel, ares_addr_node *servers)
  94. cdef extern from "cares_pton.h":
  95. int ares_inet_pton(int af, char *src, void *dst)