|
|
1.1 root 1: /* domain.h - dn_cat */
2:
3: #ifndef DSERVER
4: #define DSERVER "128.10.2.8:53" /* Server IP address & UDP port */
5: #endif
6:
7: /* Definitions of bits in the operation and parameter field */
8:
9: #define DN_QR 0100000 /* Query (0) or request (1) bit */
10: #define DN_OPCDE 0074000 /* operation code for query: */
11: /* 0 => standard query */
12: /* 1 => inverse query, */
13: /* 2 => completion query, */
14: /* 3 => completion (1 answer), */
15: /* 4-15 => reserved. */
16: #define DN_AA 0002000 /* 1 if authoritative answer */
17: #define DN_TR 0001000 /* 1 if message truncated */
18: #define DN_RD 0000400 /* 1 if recursion desired */
19: #define DN_RA 0000200 /* 1 if recursion available */
20: #define DN_RESVD 0000160 /* reserved */
21: #define DN_RESP 0000017 /* response code: */
22: /* 0 => no errors in query */
23: /* 1 => format error in query */
24: /* 2 => server failure */
25: /* 3 => name does not exist */
26:
27: struct dn_mesg { /* domain system message format */
28: short dn_id; /* message id */
29: short dn_opparm; /* operation and parmameter bits*/
30: short dn_qcount; /* # entries in question seciton*/
31: short dn_acount; /* # RRs in answer section */
32: short dn_ncount; /* # RRs in nameserver section */
33: short dn_dcount; /* # RRs in additional section */
34: char dn_qaaa[1]; /* start of rest of the message */
35: /* remaining fields of the domain name message are of variable */
36: /* length, and consist of (1) a question section, (2) an answer */
37: /* section, (3) an authority section (which says where to find */
38: /* answers when they cannot be supplied), and (4) an addition */
39: /* information section. Entries in these are Resource Records. */
40: };
41:
42: struct dn_qsuf { /* question section name suffix */
43: short dn_type; /* type of this name */
44: short dn_clas; /* class of this name */
45: };
46:
47: #define DN_MLEN 128 /* message length (small query) */
48: #define dn_cat(t,f) {*t++ =(char)strlen(f);strcpy(t,f);t+=strlen(f);}
49:
50: /* Query type codes */
51:
52: #define DN_QTHA 1 /* Host address */
53: #define DN_QTNS 2 /* Authoratative name server */
54: #define DN_QTMD 3 /* Mail destination (obsolete) */
55: #define DN_QTMF 4 /* Mail forwarder (obsolete) */
56: #define DN_QTCN 5 /* Canonical name for an alias */
57: #define DN_QTSZ 6 /* Start of zone of authority */
58: #define DN_QTMB 7 /* Mailbox domain name */
59: #define DN_QTMG 8 /* Mail group member */
60: #define DN_QTMR 9 /* Mail rename domain name */
61: #define DN_QTNL 10 /* Null resource record */
62: #define DN_QTWK 11 /* Well-known service descriptor*/
63: #define DN_QTPR 12 /* Domain name pointer */
64: #define DN_QTHI 13 /* Host information */
65: #define DN_QTMI 14 /* Mailbox or mail list info. */
66: #define DN_QTMX 15 /* Mail, replaces MD & MF */
67:
68: /* Query class codes */
69:
70: #define DN_QCIN 1 /* The DARPA Internet */
71: #define DN_QCCS 2 /* CSNET (now obsolete) */
72: #define DN_QCHA 3 /* Chaos network */
73:
74: #define DN_CMPRS 0300 /* Compressed format is pointer */
75: #define DN_CPTR 037777 /* Compressed format bits of ptr*/
76: #define DN_RLEN 10 /* resource record heading len. */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.