00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00041 #ifndef OW32_AsyncResolverNameSer_h
00042 #define OW32_AsyncResolverNameSer_h
00043
00044
00045
00046
00047 #define NS_PACKETSZ 512
00048 #define NS_MAXDNAME 1025
00049 #define NS_MAXCDNAME 255
00050 #define NS_MAXLABEL 63
00051 #define NS_HFIXEDSZ 12
00052 #define NS_QFIXEDSZ 4
00053 #define NS_RRFIXEDSZ 10
00054 #define NS_INT32SZ 4
00055 #define NS_INT16SZ 2
00056 #define NS_INT8SZ 1
00057 #define NS_INADDRSZ 4
00058 #define NS_IN6ADDRSZ 16
00059 #define NS_CMPRSFLGS 0xc0
00060 #define NS_DEFAULTPORT 53
00061
00062 #define PACKETSZ NS_PACKETSZ
00063 #define MAXDNAME NS_MAXDNAME
00064 #define MAXCDNAME NS_MAXCDNAME
00065 #define MAXLABEL NS_MAXLABEL
00066 #define HFIXEDSZ NS_HFIXEDSZ
00067 #define QFIXEDSZ NS_QFIXEDSZ
00068 #define RRFIXEDSZ NS_RRFIXEDSZ
00069 #define INT32SZ NS_INT32SZ
00070 #define INT16SZ NS_INT16SZ
00071 #define INADDRSZ NS_INADDRSZ
00072 #define IN6ADDRSZ NS_IN6ADDRSZ
00073 #define INDIR_MASK NS_CMPRSFLGS
00074 #define NAMESERVER_PORT NS_DEFAULTPORT
00075 #define MAXPACKET PACKETSZ
00076
00077
00078
00079
00080 typedef enum __ns_opcode {
00081 ns_o_query = 0,
00082 ns_o_iquery = 1,
00083 ns_o_status = 2,
00084
00085 ns_o_notify = 4,
00086 ns_o_update = 5,
00087 ns_o_max = 6
00088 } ns_opcode;
00089
00090 #define QUERY ns_o_query
00091 #define IQUERY ns_o_iquery
00092 #define STATUS ns_o_status
00093 #define NS_NOTIFY_OP ns_o_notify
00094 #define NS_UPDATE_OP ns_o_update
00095
00096
00097
00098
00099 typedef enum __ns_rcode {
00100 ns_r_noerror = 0,
00101 ns_r_formerr = 1,
00102 ns_r_servfail = 2,
00103 ns_r_nxdomain = 3,
00104 ns_r_notimpl = 4,
00105 ns_r_refused = 5,
00106
00107 ns_r_yxdomain = 6,
00108 ns_r_yxrrset = 7,
00109 ns_r_nxrrset = 8,
00110 ns_r_notauth = 9,
00111 ns_r_notzone = 10,
00112 ns_r_max = 11,
00113
00114 ns_r_badsig = 16,
00115 ns_r_badkey = 17,
00116 ns_r_badtime = 18
00117 } ns_rcode;
00118
00119
00120
00121
00122 typedef enum __ns_type {
00123 ns_t_invalid = 0,
00124 ns_t_a = 1,
00125 ns_t_ns = 2,
00126 ns_t_md = 3,
00127 ns_t_mf = 4,
00128 ns_t_cname = 5,
00129 ns_t_soa = 6,
00130 ns_t_mb = 7,
00131 ns_t_mg = 8,
00132 ns_t_mr = 9,
00133 ns_t_null = 10,
00134 ns_t_wks = 11,
00135 ns_t_ptr = 12,
00136 ns_t_hinfo = 13,
00137 ns_t_minfo = 14,
00138 ns_t_mx = 15,
00139 ns_t_txt = 16,
00140 ns_t_rp = 17,
00141 ns_t_afsdb = 18,
00142 ns_t_x25 = 19,
00143 ns_t_isdn = 20,
00144 ns_t_rt = 21,
00145 ns_t_nsap = 22,
00146 ns_t_nsap_ptr = 23,
00147 ns_t_sig = 24,
00148 ns_t_key = 25,
00149 ns_t_px = 26,
00150 ns_t_gpos = 27,
00151 ns_t_aaaa = 28,
00152 ns_t_loc = 29,
00153 ns_t_nxt = 30,
00154 ns_t_eid = 31,
00155 ns_t_nimloc = 32,
00156 ns_t_srv = 33,
00157 ns_t_atma = 34,
00158 ns_t_naptr = 35,
00159 ns_t_kx = 36,
00160 ns_t_cert = 37,
00161 ns_t_a6 = 38,
00162 ns_t_dname = 39,
00163 ns_t_sink = 40,
00164 ns_t_opt = 41,
00165 ns_t_tsig = 250,
00166 ns_t_ixfr = 251,
00167 ns_t_axfr = 252,
00168 ns_t_mailb = 253,
00169 ns_t_maila = 254,
00170 ns_t_any = 255,
00171 ns_t_zxfr = 256,
00172 ns_t_max = 65536
00173 } ns_type;
00174
00175
00176
00177
00178
00179 typedef enum __ns_class {
00180 ns_c_invalid = 0,
00181 ns_c_in = 1,
00182 ns_c_2 = 2,
00183 ns_c_chaos = 3,
00184 ns_c_hs = 4,
00185
00186 ns_c_none = 254,
00187 ns_c_any = 255,
00188 ns_c_max = 65536
00189 } ns_class;
00190
00191 #define T_A ns_t_a
00192 #define T_NS ns_t_ns
00193 #define T_MD ns_t_md
00194 #define T_MF ns_t_mf
00195 #define T_CNAME ns_t_cname
00196 #define T_SOA ns_t_soa
00197 #define T_MB ns_t_mb
00198 #define T_MG ns_t_mg
00199 #define T_MR ns_t_mr
00200 #define T_NULL ns_t_null
00201 #define T_WKS ns_t_wks
00202 #define T_PTR ns_t_ptr
00203 #define T_HINFO ns_t_hinfo
00204 #define T_MINFO ns_t_minfo
00205 #define T_MX ns_t_mx
00206 #define T_TXT ns_t_txt
00207 #define T_RP ns_t_rp
00208 #define T_AFSDB ns_t_afsdb
00209 #define T_X25 ns_t_x25
00210 #define T_ISDN ns_t_isdn
00211 #define T_RT ns_t_rt
00212 #define T_NSAP ns_t_nsap
00213 #define T_NSAP_PTR ns_t_nsap_ptr
00214 #define T_SIG ns_t_sig
00215 #define T_KEY ns_t_key
00216 #define T_PX ns_t_px
00217 #define T_GPOS ns_t_gpos
00218 #define T_AAAA ns_t_aaaa
00219 #define T_LOC ns_t_loc
00220 #define T_NXT ns_t_nxt
00221 #define T_EID ns_t_eid
00222 #define T_NIMLOC ns_t_nimloc
00223 #define T_SRV ns_t_srv
00224 #define T_ATMA ns_t_atma
00225 #define T_NAPTR ns_t_naptr
00226 #define T_TSIG ns_t_tsig
00227 #define T_IXFR ns_t_ixfr
00228 #define T_AXFR ns_t_axfr
00229 #define T_MAILB ns_t_mailb
00230 #define T_MAILA ns_t_maila
00231 #define T_ANY ns_t_any
00232
00233 #define C_IN ns_c_in
00234 #define C_CHAOS ns_c_chaos
00235 #define C_HS ns_c_hs
00236 #define C_ANY ns_c_any
00237
00238 #undef NOERROR
00239 #define NOERROR ns_r_noerror
00240 #define FORMERR ns_r_formerr
00241 #define SERVFAIL ns_r_servfail
00242 #define NXDOMAIN ns_r_nxdomain
00243 #define NOTIMP ns_r_notimpl
00244 #define REFUSED ns_r_refused
00245 #define YXDOMAIN ns_r_yxdomain
00246 #define YXRRSET ns_r_yxrrset
00247 #define NXRRSET ns_r_nxrrset
00248 #define NOTAUTH ns_r_notauth
00249 #define NOTZONE ns_r_notzone
00250
00251 #endif