Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

AsyncResolverNameSer.h

Go to the documentation of this file.
00001 /*  AsyncResolverNameSer.h - nameser.h
00002     Copyright (C) 2004 Mark Weaver
00003     Written by Mark Weaver <mark@npsl.co.uk>
00004 
00005     Part of the Open-Win32 library.
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Library General Public
00008     License as published by the Free Software Foundation; either
00009     version 2 of the License, or (at your option) any later version.
00010 
00011     This library is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     Library General Public License for more details.
00015 
00016     You should have received a copy of the GNU Library General Public
00017     License along with this library; if not, write to the
00018     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00019     Boston, MA  02111-1307, USA.
00020 */
00021 
00022 /* Copyright 1998 by the Massachusetts Institute of Technology.
00023  *
00024  * Permission to use, copy, modify, and distribute this
00025  * software and its documentation for any purpose and without
00026  * fee is hereby granted, provided that the above copyright
00027  * notice appear in all copies and that both that copyright
00028  * notice and this permission notice appear in supporting
00029  * documentation, and that the name of M.I.T. not be used in
00030  * advertising or publicity pertaining to distribution of the
00031  * software without specific, written prior permission.
00032  * M.I.T. makes no representations about the suitability of
00033  * this software for any purpose.  It is provided "as is"
00034  * without express or implied warranty.
00035  */
00036 
00041 #ifndef OW32_AsyncResolverNameSer_h
00042 #define OW32_AsyncResolverNameSer_h
00043 
00044 /*
00045  * Define constants based on RFC 883, RFC 1034, RFC 1035
00046  */
00047 #define NS_PACKETSZ     512     /* maximum packet size */
00048 #define NS_MAXDNAME     1025    /* maximum domain name */
00049 #define NS_MAXCDNAME    255     /* maximum compressed domain name */
00050 #define NS_MAXLABEL     63      /* maximum length of domain label */
00051 #define NS_HFIXEDSZ     12      /* #/bytes of fixed data in header */
00052 #define NS_QFIXEDSZ     4       /* #/bytes of fixed data in query */
00053 #define NS_RRFIXEDSZ    10      /* #/bytes of fixed data in r record */
00054 #define NS_INT32SZ      4       /* #/bytes of data in a u_int32_t */
00055 #define NS_INT16SZ      2       /* #/bytes of data in a u_int16_t */
00056 #define NS_INT8SZ       1       /* #/bytes of data in a u_int8_t */
00057 #define NS_INADDRSZ     4       /* IPv4 T_A */
00058 #define NS_IN6ADDRSZ    16      /* IPv6 T_AAAA */
00059 #define NS_CMPRSFLGS    0xc0    /* Flag bits indicating name compression. */
00060 #define NS_DEFAULTPORT  53      /* For both TCP and UDP. */
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  * Currently defined opcodes.
00079  */
00080 typedef enum __ns_opcode {
00081     ns_o_query = 0,     /* Standard query. */
00082     ns_o_iquery = 1,    /* Inverse query (deprecated/unsupported). */
00083     ns_o_status = 2,    /* Name server status query (unsupported). */
00084                         /* Opcode 3 is undefined/reserved. */
00085     ns_o_notify = 4,    /* Zone change notification. */
00086     ns_o_update = 5,    /* Zone update message. */
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  * Currently defined response codes.
00098  */
00099 typedef enum __ns_rcode {
00100     ns_r_noerror = 0,   /* No error occurred. */
00101     ns_r_formerr = 1,   /* Format error. */
00102     ns_r_servfail = 2,  /* Server failure. */
00103     ns_r_nxdomain = 3,  /* Name error. */
00104     ns_r_notimpl = 4,   /* Unimplemented. */
00105     ns_r_refused = 5,   /* Operation refused. */
00106     /* these are for BIND_UPDATE */
00107     ns_r_yxdomain = 6,  /* Name exists */
00108     ns_r_yxrrset = 7,   /* RRset exists */
00109     ns_r_nxrrset = 8,   /* RRset does not exist */
00110     ns_r_notauth = 9,   /* Not authoritative for zone */
00111     ns_r_notzone = 10,  /* Zone of record different from zone section */
00112     ns_r_max = 11,
00113     /* The following are TSIG extended errors */
00114     ns_r_badsig = 16,
00115     ns_r_badkey = 17,
00116     ns_r_badtime = 18
00117 } ns_rcode;
00118 
00119 /*
00120  * Currently defined type values for resources and queries.
00121  */
00122 typedef enum __ns_type {
00123     ns_t_invalid = 0,   /* Cookie. */
00124     ns_t_a = 1,         /* Host address. */
00125     ns_t_ns = 2,        /* Authoritative server. */
00126     ns_t_md = 3,        /* Mail destination. */
00127     ns_t_mf = 4,        /* Mail forwarder. */
00128     ns_t_cname = 5,     /* Canonical name. */
00129     ns_t_soa = 6,       /* Start of authority zone. */
00130     ns_t_mb = 7,        /* Mailbox domain name. */
00131     ns_t_mg = 8,        /* Mail group member. */
00132     ns_t_mr = 9,        /* Mail rename name. */
00133     ns_t_null = 10,     /* Null resource record. */
00134     ns_t_wks = 11,      /* Well known service. */
00135     ns_t_ptr = 12,      /* Domain name pointer. */
00136     ns_t_hinfo = 13,    /* Host information. */
00137     ns_t_minfo = 14,    /* Mailbox information. */
00138     ns_t_mx = 15,       /* Mail routing information. */
00139     ns_t_txt = 16,      /* Text strings. */
00140     ns_t_rp = 17,       /* Responsible person. */
00141     ns_t_afsdb = 18,    /* AFS cell database. */
00142     ns_t_x25 = 19,      /* X_25 calling address. */
00143     ns_t_isdn = 20,     /* ISDN calling address. */
00144     ns_t_rt = 21,       /* Router. */
00145     ns_t_nsap = 22,     /* NSAP address. */
00146     ns_t_nsap_ptr = 23, /* Reverse NSAP lookup (deprecated). */
00147     ns_t_sig = 24,      /* Security signature. */
00148     ns_t_key = 25,      /* Security key. */
00149     ns_t_px = 26,       /* X.400 mail mapping. */
00150     ns_t_gpos = 27,     /* Geographical position (withdrawn). */
00151     ns_t_aaaa = 28,     /* Ip6 Address. */
00152     ns_t_loc = 29,      /* Location Information. */
00153     ns_t_nxt = 30,      /* Next domain (security). */
00154     ns_t_eid = 31,      /* Endpoint identifier. */
00155     ns_t_nimloc = 32,   /* Nimrod Locator. */
00156     ns_t_srv = 33,      /* Server Selection. */
00157     ns_t_atma = 34,     /* ATM Address */
00158     ns_t_naptr = 35,    /* Naming Authority PoinTeR */
00159     ns_t_kx = 36,       /* Key Exchange */
00160     ns_t_cert = 37,     /* Certification record */
00161     ns_t_a6 = 38,       /* IPv6 address (deprecates AAAA) */
00162     ns_t_dname = 39,    /* Non-terminal DNAME (for IPv6) */
00163     ns_t_sink = 40,     /* Kitchen sink (experimentatl) */
00164     ns_t_opt = 41,      /* EDNS0 option (meta-RR) */
00165     ns_t_tsig = 250,    /* Transaction signature. */
00166     ns_t_ixfr = 251,    /* Incremental zone transfer. */
00167     ns_t_axfr = 252,    /* Transfer zone of authority. */
00168     ns_t_mailb = 253,   /* Transfer mailbox records. */
00169     ns_t_maila = 254,   /* Transfer mail agent records. */
00170     ns_t_any = 255,     /* Wildcard match. */
00171     ns_t_zxfr = 256,    /* BIND-specific, nonstandard. */
00172     ns_t_max = 65536
00173 } ns_type;
00174 
00175 
00176 /*
00177  * Values for class field
00178  */
00179 typedef enum __ns_class {
00180     ns_c_invalid = 0,   /* Cookie. */
00181     ns_c_in = 1,        /* Internet. */
00182     ns_c_2 = 2,         /* unallocated/unsupported. */
00183     ns_c_chaos = 3,     /* MIT Chaos-net. */
00184     ns_c_hs = 4,        /* MIT Hesiod. */
00185     /* Query class values which do not appear in resource records */
00186     ns_c_none = 254,    /* for prereq. sections in update requests */
00187     ns_c_any = 255,     /* Wildcard match. */
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 /* OW32_AsyncResolverNameSer_h */

Generated on Sun Jun 5 01:29:17 2005 for OW32 by  doxygen 1.3.9.1