PageRenderTime 53ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 0ms

/jni/include/c-ares/nameser.h

http://github.com/davidsun/LibAndroidHttp
C Header | 197 lines | 177 code | 15 blank | 5 comment | 0 complexity | f16c6e7a5c649d3dd44a80e51a9382c5 MD5 | raw file
  1. #ifndef ARES_NAMESER_H
  2. #define ARES_NAMESER_H
  3. /* header file provided by liren@vivisimo.com */
  4. #define NS_PACKETSZ 512 /* maximum packet size */
  5. #define NS_MAXDNAME 256 /* maximum domain name */
  6. #define NS_MAXCDNAME 255 /* maximum compressed domain name */
  7. #define NS_MAXLABEL 63
  8. #define NS_HFIXEDSZ 12 /* #/bytes of fixed data in header */
  9. #define NS_QFIXEDSZ 4 /* #/bytes of fixed data in query */
  10. #define NS_RRFIXEDSZ 10 /* #/bytes of fixed data in r record */
  11. #define NS_INT16SZ 2
  12. #define NS_INADDRSZ 4
  13. #define NS_IN6ADDRSZ 16
  14. #define NS_CMPRSFLGS 0xc0 /* Flag bits indicating name compression. */
  15. #define NS_DEFAULTPORT 53 /* For both TCP and UDP. */
  16. typedef enum __ns_class {
  17. ns_c_invalid = 0, /* Cookie. */
  18. ns_c_in = 1, /* Internet. */
  19. ns_c_2 = 2, /* unallocated/unsupported. */
  20. ns_c_chaos = 3, /* MIT Chaos-net. */
  21. ns_c_hs = 4, /* MIT Hesiod. */
  22. /* Query class values which do not appear in resource records */
  23. ns_c_none = 254, /* for prereq. sections in update requests */
  24. ns_c_any = 255, /* Wildcard match. */
  25. ns_c_max = 65536
  26. } ns_class;
  27. typedef enum __ns_type {
  28. ns_t_invalid = 0, /* Cookie. */
  29. ns_t_a = 1, /* Host address. */
  30. ns_t_ns = 2, /* Authoritative server. */
  31. ns_t_md = 3, /* Mail destination. */
  32. ns_t_mf = 4, /* Mail forwarder. */
  33. ns_t_cname = 5, /* Canonical name. */
  34. ns_t_soa = 6, /* Start of authority zone. */
  35. ns_t_mb = 7, /* Mailbox domain name. */
  36. ns_t_mg = 8, /* Mail group member. */
  37. ns_t_mr = 9, /* Mail rename name. */
  38. ns_t_null = 10, /* Null resource record. */
  39. ns_t_wks = 11, /* Well known service. */
  40. ns_t_ptr = 12, /* Domain name pointer. */
  41. ns_t_hinfo = 13, /* Host information. */
  42. ns_t_minfo = 14, /* Mailbox information. */
  43. ns_t_mx = 15, /* Mail routing information. */
  44. ns_t_txt = 16, /* Text strings. */
  45. ns_t_rp = 17, /* Responsible person. */
  46. ns_t_afsdb = 18, /* AFS cell database. */
  47. ns_t_x25 = 19, /* X_25 calling address. */
  48. ns_t_isdn = 20, /* ISDN calling address. */
  49. ns_t_rt = 21, /* Router. */
  50. ns_t_nsap = 22, /* NSAP address. */
  51. ns_t_nsap_ptr = 23, /* Reverse NSAP lookup (deprecated). */
  52. ns_t_sig = 24, /* Security signature. */
  53. ns_t_key = 25, /* Security key. */
  54. ns_t_px = 26, /* X.400 mail mapping. */
  55. ns_t_gpos = 27, /* Geographical position (withdrawn). */
  56. ns_t_aaaa = 28, /* Ip6 Address. */
  57. ns_t_loc = 29, /* Location Information. */
  58. ns_t_nxt = 30, /* Next domain (security). */
  59. ns_t_eid = 31, /* Endpoint identifier. */
  60. ns_t_nimloc = 32, /* Nimrod Locator. */
  61. ns_t_srv = 33, /* Server Selection. */
  62. ns_t_atma = 34, /* ATM Address */
  63. ns_t_naptr = 35, /* Naming Authority PoinTeR */
  64. ns_t_kx = 36, /* Key Exchange */
  65. ns_t_cert = 37, /* Certification record */
  66. ns_t_a6 = 38, /* IPv6 address (deprecates AAAA) */
  67. ns_t_dname = 39, /* Non-terminal DNAME (for IPv6) */
  68. ns_t_sink = 40, /* Kitchen sink (experimentatl) */
  69. ns_t_opt = 41, /* EDNS0 option (meta-RR) */
  70. ns_t_apl = 42, /* Address prefix list (RFC3123) */
  71. ns_t_ds = 43, /* Delegation Signer (RFC4034) */
  72. ns_t_sshfp = 44, /* SSH Key Fingerprint (RFC4255) */
  73. ns_t_rrsig = 46, /* Resource Record Signature (RFC4034) */
  74. ns_t_nsec = 47, /* Next Secure (RFC4034) */
  75. ns_t_dnskey = 48, /* DNS Public Key (RFC4034) */
  76. ns_t_tkey = 249, /* Transaction key */
  77. ns_t_tsig = 250, /* Transaction signature. */
  78. ns_t_ixfr = 251, /* Incremental zone transfer. */
  79. ns_t_axfr = 252, /* Transfer zone of authority. */
  80. ns_t_mailb = 253, /* Transfer mailbox records. */
  81. ns_t_maila = 254, /* Transfer mail agent records. */
  82. ns_t_any = 255, /* Wildcard match. */
  83. ns_t_zxfr = 256, /* BIND-specific, nonstandard. */
  84. ns_t_max = 65536
  85. } ns_type;
  86. typedef enum __ns_opcode {
  87. ns_o_query = 0, /* Standard query. */
  88. ns_o_iquery = 1, /* Inverse query (deprecated/unsupported). */
  89. ns_o_status = 2, /* Name server status query (unsupported). */
  90. /* Opcode 3 is undefined/reserved. */
  91. ns_o_notify = 4, /* Zone change notification. */
  92. ns_o_update = 5, /* Zone update message. */
  93. ns_o_max = 6
  94. } ns_opcode;
  95. typedef enum __ns_rcode {
  96. ns_r_noerror = 0, /* No error occurred. */
  97. ns_r_formerr = 1, /* Format error. */
  98. ns_r_servfail = 2, /* Server failure. */
  99. ns_r_nxdomain = 3, /* Name error. */
  100. ns_r_notimpl = 4, /* Unimplemented. */
  101. ns_r_refused = 5, /* Operation refused. */
  102. /* these are for BIND_UPDATE */
  103. ns_r_yxdomain = 6, /* Name exists */
  104. ns_r_yxrrset = 7, /* RRset exists */
  105. ns_r_nxrrset = 8, /* RRset does not exist */
  106. ns_r_notauth = 9, /* Not authoritative for zone */
  107. ns_r_notzone = 10, /* Zone of record different from zone section */
  108. ns_r_max = 11,
  109. /* The following are TSIG extended errors */
  110. ns_r_badsig = 16,
  111. ns_r_badkey = 17,
  112. ns_r_badtime = 18
  113. } ns_rcode;
  114. #define PACKETSZ NS_PACKETSZ
  115. #define MAXDNAME NS_MAXDNAME
  116. #define MAXCDNAME NS_MAXCDNAME
  117. #define MAXLABEL NS_MAXLABEL
  118. #define HFIXEDSZ NS_HFIXEDSZ
  119. #define QFIXEDSZ NS_QFIXEDSZ
  120. #define RRFIXEDSZ NS_RRFIXEDSZ
  121. #define INDIR_MASK NS_CMPRSFLGS
  122. #define NAMESERVER_PORT NS_DEFAULTPORT
  123. #define QUERY ns_o_query
  124. #define SERVFAIL ns_r_servfail
  125. #define NOTIMP ns_r_notimpl
  126. #define REFUSED ns_r_refused
  127. #undef NOERROR /* it seems this is already defined in winerror.h */
  128. #define NOERROR ns_r_noerror
  129. #define FORMERR ns_r_formerr
  130. #define NXDOMAIN ns_r_nxdomain
  131. #define C_IN ns_c_in
  132. #define C_CHAOS ns_c_chaos
  133. #define C_HS ns_c_hs
  134. #define C_NONE ns_c_none
  135. #define C_ANY ns_c_any
  136. #define T_A ns_t_a
  137. #define T_NS ns_t_ns
  138. #define T_MD ns_t_md
  139. #define T_MF ns_t_mf
  140. #define T_CNAME ns_t_cname
  141. #define T_SOA ns_t_soa
  142. #define T_MB ns_t_mb
  143. #define T_MG ns_t_mg
  144. #define T_MR ns_t_mr
  145. #define T_NULL ns_t_null
  146. #define T_WKS ns_t_wks
  147. #define T_PTR ns_t_ptr
  148. #define T_HINFO ns_t_hinfo
  149. #define T_MINFO ns_t_minfo
  150. #define T_MX ns_t_mx
  151. #define T_TXT ns_t_txt
  152. #define T_RP ns_t_rp
  153. #define T_AFSDB ns_t_afsdb
  154. #define T_X25 ns_t_x25
  155. #define T_ISDN ns_t_isdn
  156. #define T_RT ns_t_rt
  157. #define T_NSAP ns_t_nsap
  158. #define T_NSAP_PTR ns_t_nsap_ptr
  159. #define T_SIG ns_t_sig
  160. #define T_KEY ns_t_key
  161. #define T_PX ns_t_px
  162. #define T_GPOS ns_t_gpos
  163. #define T_AAAA ns_t_aaaa
  164. #define T_LOC ns_t_loc
  165. #define T_NXT ns_t_nxt
  166. #define T_EID ns_t_eid
  167. #define T_NIMLOC ns_t_nimloc
  168. #define T_SRV ns_t_srv
  169. #define T_ATMA ns_t_atma
  170. #define T_NAPTR ns_t_naptr
  171. #define T_DS ns_t_ds
  172. #define T_SSHFP ns_t_sshfp
  173. #define T_RRSIG ns_t_rrsig
  174. #define T_NSEC ns_t_nsec
  175. #define T_DNSKEY ns_t_dnskey
  176. #define T_TSIG ns_t_tsig
  177. #define T_IXFR ns_t_ixfr
  178. #define T_AXFR ns_t_axfr
  179. #define T_MAILB ns_t_mailb
  180. #define T_MAILA ns_t_maila
  181. #define T_ANY ns_t_any
  182. #endif /* ARES_NAMESER_H */