add more T_ types and inline the dns headers, all this for bind9 resolvers
authorLove Hörnquist Åstrand <lha@kth.se>
Sat, 6 Dec 2003 16:51:33 +0000 (16:51 +0000)
committerLove Hörnquist Åstrand <lha@kth.se>
Sat, 6 Dec 2003 16:51:33 +0000 (16:51 +0000)
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13185 ec53bebd-3082-4978-b11e-865c3cabbd6b

lib/roken/resolve.h

index c4347d89b88e385525ce45fa9ef5d8efae9b0fab..0ec360e351364fec3863aebb325d75135a7cda83 100644 (file)
 
 /* We use these, but they are not always present in <arpa/nameser.h> */
 
+#ifndef C_IN
+#define C_IN           1
+#endif
+
+#ifndef T_A
+#define T_A            1
+#endif
+#ifndef T_NS
+#define T_NS           2
+#endif
+#ifndef T_CNAME
+#define T_CNAME                5
+#endif
+#ifndef T_SOA
+#define T_SOA          5
+#endif
+#ifndef T_PTR
+#define T_PTR          12
+#endif
+#ifndef T_MX
+#define T_MX           15
+#endif
 #ifndef T_TXT
 #define T_TXT          16
 #endif
 #define T_CERT         37
 #endif
 
+#ifndef MAXDNAME
+#define MAXDNAME       1025
+#endif
+
 #define dns_query              rk_dns_query
 #define mx_record              rk_mx_record
 #define srv_record             rk_srv_record
@@ -149,8 +175,17 @@ struct resource_record{
 typedef int HEADER; /* will never be used */
 #endif
 
+struct dns_header {
+    u_int16_t id;
+    u_int16_t misc;
+    u_int16_t qdcount;
+    u_int16_t ancount;
+    u_int16_t nscount;
+    u_int16_t arcount;
+};
+
 struct dns_reply{
-    HEADER h;
+    struct dns_header h;
     struct dns_query q;
     struct resource_record *head;
 };