Source code: com/strangeberry/rendezvous/DNSConstants.java
1 // Copyright (C) 2002 Strangeberry Inc.
2 // @(#)DNSConstants.java, 1.7, 11/29/2002
3 //
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 //
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
18 package com.strangeberry.rendezvous;
19
20 /**
21 * DNS constants.
22 *
23 * @author Arthur van Hoff
24 * @version 1.7, 11/29/2002
25 */
26 abstract class DNSConstants
27 {
28 final static String MDNS_GROUP = "224.0.0.251";
29 final static int MDNS_PORT = 5353;
30 final static int DNS_PORT = 53;
31
32 final static int MAX_MSG_TYPICAL = 1460;
33 final static int MAX_MSG_ABSOLUTE = 8972;
34
35 final static int FLAGS_QR_MASK = 0x8000; // Query response mask
36 final static int FLAGS_QR_QUERY = 0x0000; // Query
37 final static int FLAGS_QR_RESPONSE = 0x8000; // Response
38
39 final static int FLAGS_AA = 0x0400; // Authorative answer
40 final static int FLAGS_TC = 0x0200; // Truncated
41 final static int FLAGS_RD = 0x0100; // Recursion desired
42 final static int FLAGS_RA = 0x8000; // Recursion available
43
44 final static int FLAGS_Z = 0x0040; // Zero
45 final static int FLAGS_AD = 0x0020; // Authentic data
46 final static int FLAGS_CD = 0x0010; // Checking disabled
47
48
49 final static int CLASS_IN = 1; // Final Static Internet
50 final static int CLASS_CS = 2; // CSNET
51 final static int CLASS_CH = 3; // CHAOS
52 final static int CLASS_HS = 4; // Hesiod
53 final static int CLASS_NONE = 254; // Used in DNS UPDATE [RFC 2136]
54 final static int CLASS_ANY = 255; // Not a DNS class, but a DNS query class, meaning "all classes"
55 final static int CLASS_MASK = 0x7FFF; // Multicast DNS uses the bottom 15 bits to identify the record class...
56 final static int CLASS_UNIQUE = 0x8000; // ... and the top bit indicates that all other cached records are now invalid
57
58 final static int TYPE_A = 1; // Address
59 final static int TYPE_NS = 2; // Name Server
60 final static int TYPE_MD = 3; // Mail Destination
61 final static int TYPE_MF = 4; // Mail Forwarder
62 final static int TYPE_CNAME = 5; // Canonical Name
63 final static int TYPE_SOA = 6; // Start of Authority
64 final static int TYPE_MB = 7; // Mailbox
65 final static int TYPE_MG = 8; // Mail Group
66 final static int TYPE_MR = 9; // Mail Rename
67 final static int TYPE_NULL = 10; // NULL RR
68 final static int TYPE_WKS = 11; // Well-known-service
69 final static int TYPE_PTR = 12; // Domain Name pofinal static inter
70 final static int TYPE_HINFO = 13; // Host information
71 final static int TYPE_MINFO = 14; // Mailbox information
72 final static int TYPE_MX = 15; // Mail exchanger
73 final static int TYPE_TXT = 16; // Arbitrary text string
74 final static int TYPE_SRV = 33; // Service record
75 final static int TYPE_ANY = 255;
76 }