1:
2:
3: /*************
4: * *
5: * SENTINEL *
6: * *
7: *************/
8:
9:
10: #ifndef WWWI_MIND_MIND_H
11: #define WWWI_MIND_MIND_H
12:
13:
14: /**********************
15: * *
16: * COMPILER INCLUDES *
17: * *
18: **********************/
19:
20:
21: #include "config.h"
22: #ifdef HAVE_OSTREAM
23: #include <ostream>
24: #endif
25: #ifdef HAVE_OSTREAM_H
26: #include <ostream.h>
27: #endif
28:
29:
30: /*********************
31: * *
32: * PROJECT INCLUDES *
33: * *
34: *********************/
35:
36:
37: #include "wwwi/types.h"
38:
39:
40: #ifdef USE_DEBUG_POINTERS
41: #include "debugptr.h"
42: #endif
43:
44:
45: using std::endl;
46: using std::ostream;
47: using WWWI::IPAddress;
48:
49:
50: /************
51: * *
52: * DEFINES *
53: * *
54: ************/
55:
56:
57: #ifdef USE_DEBUG_POINTERS
58:
59: #define DECL_POINTER_TYPES(CLASS) typedef DebugPtr<CLASS> CLASS##Ptr; \
60: typedef DebugPtr<const CLASS> CLASS##ConstPtr;
61:
62: #else
63:
64: #define DECL_POINTER_TYPES(CLASS) typedef CLASS *CLASS##Ptr; \
65: typedef const CLASS *CLASS##ConstPtr;
66:
67: #endif
68:
69:
70: /**********************
71: * *
72: * TYPE DECLARATIONS *
73: * *
74: **********************/
75:
76: /*
77: * MIND supports QUERY opcodes only.
78: */
79:
80: typedef enum { OPCODE_QUERY=0, // RFC1035
81: OPCODE_IQUERY=1, // RFC1035 (hopefully soon obsolete)
82: OPCODE_STATUS=2, // RFC1035 (undefined?)
83: OPCODE_NOTIFY=4, // RFC1996
84: OPCODE_UPDATE=5 // RFC2136
85: } Opcode;
86:
87:
88: typedef enum { RCODE_NOERROR=0, // RFC1035: No Error
89: RCODE_FORMERR=1, // RFC1035: Format Error
90: RCODE_SERVFAIL=2, // RFC1035: Server failure
91: RCODE_NXDOMAIN=3, // RFC1035: Non-existent domain
92: RCODE_NOTIMP=4, // RFC1035: Not implemented
93: RCODE_REFUSED=5, // RFC1035: Query refused
94: RCODE_YXDOMAIN=6, // RFC2136: Name exists when it should not
95: RCODE_YXRRSET=7, // RFC2136: RRSet exists when it should not
96: RCODE_NXRRSET=8, // RFC2136: RRSet that should exist does not
97: RCODE_NOTAUTH=9, // RFC2136: Server not authoritative for zone
98: RCODE_NOTZONE=10 // RFC2136: Name not contained in zone
99: } RCode;
100:
101:
102: /*
103: * MIND supports only the IN class.
104: */
105: enum rr_class_enum { CL_IN=1,
106: CL_CS=2,
107: CL_CH=3,
108: CL_HS=4,
109: CL_QANY=255 };
110: typedef enum rr_class_enum RRClass;
111:
112:
113: /*
114: * These are the types of RR records. Support is indicated by the RWC
115: * characters, which stand for Yes or No. R means the type will be read
116: * with compression. W means the type will be written with compression.
117: * C means the type may be cached.
118: */
119: // RWC RFC
120: typedef enum { TY_A=1, // NNY RFC1035 (AddressLens)
121: TY_NS=2, // YYY RFC1035 (NameLens)
122: TY_MD=3, // YYY RFC1035 OBSOLETE (NameLens)
123: TY_MF=4, // YYY RFC1035 OBSOLETE (NameLens)
124: TY_CNAME=5, // YYY RFC1035 (NameLens)
125: TY_SOA=6, // YYY RFC1035 (SOALens)
126: TY_MB=7, // YYY RFC1035 EXPERIMENTAL (NameLens)
127: TY_MG=8, // YYY RFC1035 EXPERIMENTAL (NameLens)
128: TY_MR=9, // YYY RFC1035 EXPERIMENTAL (NameLens)
129: TY_NULL=10, // NNY RFC1035 EXPERIMENTAL (RawLens)
130: TY_WKS=11, // NNY RFC1035 (RawLens)
131: TY_PTR=12, // YYY RFC1035 (NameLens)
132: TY_HINFO=13, // NNY RFC1035 (RawLens)
133: TY_MINFO=14, // NNN RFC1035 EXPERIMENTAL (Not Supported)
134: TY_MX=15, // YYY RFC1035 (MXLens)
135: TY_TXT=16, // NNY RFC1035 (RawLens)
136: TY_AAAA=28, // NNN IANA (RawLens)
137: TY_OPT=41, // NNN RFC2671 (Not Supported)
138:
139: TY_QIXFR=251, // RFC1995 (Not Supported)
140: TY_QAXFR=252, // RFC1035 (Not Supported)
141: TY_QMAILB=253, // RFC1035 EXPERIMENTAL (Not Supported)
142: TY_QMAILA=254, // RFC1035 OBSOLETE (Not Supported)
143: TY_QANY=255 // RFC1035
144: } RRType;
145:
146:
147: /************
148: * *
149: * THE END *
150: * *
151: ************/
152:
153:
154: #endif
155:
156:
157: