summaryrefslogtreecommitdiff
path: root/nameser.h
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-09-17 00:07:49 +0000
committerYang Tse <yangsita@gmail.com>2008-09-17 00:07:49 +0000
commit861ea67ee80d47634b9ad2474a354a61a42f7965 (patch)
tree9e5182a18576bfb539063692ec84fa92242be0c6 /nameser.h
parent507c529dc031f6edec07becb62d859a4dcf05ecb (diff)
downloadc-ares-861ea67ee80d47634b9ad2474a354a61a42f7965.tar.gz
c-ares-861ea67ee80d47634b9ad2474a354a61a42f7965.tar.bz2
c-ares-861ea67ee80d47634b9ad2474a354a61a42f7965.zip
reorder some lines in file
Diffstat (limited to 'nameser.h')
-rw-r--r--nameser.h72
1 files changed, 32 insertions, 40 deletions
diff --git a/nameser.h b/nameser.h
index e28de9a..52c2972 100644
--- a/nameser.h
+++ b/nameser.h
@@ -5,13 +5,20 @@
/* header file provided by liren@vivisimo.com */
-#define NS_CMPRSFLGS 0xc0
-#define NS_IN6ADDRSZ 16
-#define NS_INT16SZ 2
-#define NS_INADDRSZ 4
- /* Flag bits indicating name compression. */
-#define INDIR_MASK NS_CMPRSFLGS
+
+#define NS_PACKETSZ 512 /* maximum packet size */
+#define NS_MAXDNAME 256 /* maximum domain name */
+#define NS_MAXCDNAME 255 /* maximum compressed domain name */
+#define NS_MAXLABEL 63
+#define NS_HFIXEDSZ 12 /* #/bytes of fixed data in header */
+#define NS_QFIXEDSZ 4 /* #/bytes of fixed data in query */
+#define NS_RRFIXEDSZ 10 /* #/bytes of fixed data in r record */
+#define NS_INT16SZ 2
+#define NS_INADDRSZ 4
+#define NS_IN6ADDRSZ 16
+#define NS_CMPRSFLGS 0xc0 /* Flag bits indicating name compression. */
+#define NS_DEFAULTPORT 53 /* For both TCP and UDP. */
typedef enum __ns_class {
ns_c_invalid = 0, /* Cookie. */
@@ -25,8 +32,6 @@ typedef enum __ns_class {
ns_c_max = 65536
} ns_class;
-#define C_IN ns_c_in
-
typedef enum __ns_type {
ns_t_invalid = 0, /* Cookie. */
ns_t_a = 1, /* Host address. */
@@ -82,19 +87,6 @@ typedef enum __ns_type {
ns_t_max = 65536
} ns_type;
-#define T_PTR ns_t_ptr
-#define T_A ns_t_a
-
-
-#define NS_DEFAULTPORT 53 /* For both TCP and UDP. */
-#define NAMESERVER_PORT NS_DEFAULTPORT
-
-#define NS_HFIXEDSZ 12 /* #/bytes of fixed data in header */
-#define HFIXEDSZ NS_HFIXEDSZ
-
-#define NS_QFIXEDSZ 4 /* #/bytes of fixed data in query */
-#define QFIXEDSZ NS_QFIXEDSZ
-
typedef enum __ns_opcode {
ns_o_query = 0, /* Standard query. */
ns_o_iquery = 1, /* Inverse query (deprecated/unsupported). */
@@ -105,25 +97,6 @@ typedef enum __ns_opcode {
ns_o_max = 6
} ns_opcode;
-#define QUERY ns_o_query
-
-#define NS_MAXLABEL 63
-#define MAXLABEL NS_MAXLABEL
-
-#define NS_RRFIXEDSZ 10 /* #/bytes of fixed data in r record */
-#define RRFIXEDSZ NS_RRFIXEDSZ
-
-#define T_CNAME ns_t_cname
-
-#define NS_MAXDNAME 256 /* maximum domain name */
-#define MAXDNAME NS_MAXDNAME
-
-#define NS_MAXCDNAME 255 /* maximum compressed domain name */
-#define MAXCDNAME NS_MAXCDNAME
-
-#define NS_PACKETSZ 512 /* maximum packet size */
-#define PACKETSZ NS_PACKETSZ
-
typedef enum __ns_rcode {
ns_r_noerror = 0, /* No error occurred. */
ns_r_formerr = 1, /* Format error. */
@@ -144,6 +117,22 @@ typedef enum __ns_rcode {
ns_r_badtime = 18
} ns_rcode;
+
+
+
+
+#define PACKETSZ NS_PACKETSZ
+#define MAXDNAME NS_MAXDNAME
+#define MAXCDNAME NS_MAXCDNAME
+#define MAXLABEL NS_MAXLABEL
+#define HFIXEDSZ NS_HFIXEDSZ
+#define QFIXEDSZ NS_QFIXEDSZ
+#define RRFIXEDSZ NS_RRFIXEDSZ
+#define INDIR_MASK NS_CMPRSFLGS
+#define NAMESERVER_PORT NS_DEFAULTPORT
+
+#define QUERY ns_o_query
+
#define SERVFAIL ns_r_servfail
#define NOTIMP ns_r_notimpl
#define REFUSED ns_r_refused
@@ -152,6 +141,7 @@ typedef enum __ns_rcode {
#define FORMERR ns_r_formerr
#define NXDOMAIN ns_r_nxdomain
+#define C_IN ns_c_in
#define C_CHAOS ns_c_chaos
#define C_HS ns_c_hs
#define C_NONE ns_c_none
@@ -199,4 +189,6 @@ typedef enum __ns_rcode {
#define T_MAILA ns_t_maila
#define T_ANY ns_t_any
+
+
#endif /* ARES_NAMESER_H */