Add bw, dns, and uptime checks.
[myops.git] / web / collect / client / DNS / Type.py
1 # -*- encoding: utf-8 -*-
2 """
3  $Id: Type.py,v 1.6.2.3 2011/03/16 20:06:39 customdesigned Exp $
4
5  This file is part of the pydns project.
6  Homepage: http://pydns.sourceforge.net
7
8  This code is covered by the standard Python License. See LICENSE for details.
9
10  TYPE values (section 3.2.2)
11 """
12
13 A = 1           # a host address
14 NS = 2          # an authoritative name server
15 MD = 3          # a mail destination (Obsolete - use MX)
16 MF = 4          # a mail forwarder (Obsolete - use MX)
17 CNAME = 5       # the canonical name for an alias
18 SOA = 6         # marks the start of a zone of authority
19 MB = 7          # a mailbox domain name (EXPERIMENTAL)
20 MG = 8          # a mail group member (EXPERIMENTAL)
21 MR = 9          # a mail rename domain name (EXPERIMENTAL)
22 NULL = 10       # a null RR (EXPERIMENTAL)
23 WKS = 11        # a well known service description
24 PTR = 12        # a domain name pointer
25 HINFO = 13      # host information
26 MINFO = 14      # mailbox or mail list information
27 MX = 15         # mail exchange
28 TXT = 16        # text strings
29 AAAA = 28       # IPv6 AAAA records (RFC 1886)
30 SRV = 33        # DNS RR for specifying the location of services (RFC 2782)
31 SPF = 99        # TXT RR for Sender Policy Framework
32
33 # Additional TYPE values from host.c source
34
35 UNAME = 110
36 MP = 240
37
38 # QTYPE values (section 3.2.3)
39
40 AXFR = 252      # A request for a transfer of an entire zone
41 MAILB = 253     # A request for mailbox-related records (MB, MG or MR)
42 MAILA = 254     # A request for mail agent RRs (Obsolete - see MX)
43 ANY = 255       # A request for all records
44
45 # Construct reverse mapping dictionary
46
47 _names = dir()
48 typemap = {}
49 for _name in _names:
50     if _name[0] != '_': typemap[eval(_name)] = _name
51
52 def typestr(type):
53     if typemap.has_key(type): return typemap[type]
54     else: return `type`
55 #
56 # $Log: Type.py,v $
57 # Revision 1.6.2.3  2011/03/16 20:06:39  customdesigned
58 # Refer to explicit LICENSE file.
59 #
60 # Revision 1.6.2.2  2009/06/09 18:39:06  customdesigned
61 # Built-in SPF support
62 #
63 # Revision 1.6.2.1  2007/05/22 20:20:39  customdesigned
64 # Mark utf-8 encoding
65 #
66 # Revision 1.6  2002/03/19 12:41:33  anthonybaxter
67 # tabnannied and reindented everything. 4 space indent, no tabs.
68 # yay.
69 #
70 # Revision 1.5  2002/03/19 12:26:13  anthonybaxter
71 # death to leading tabs.
72 #
73 # Revision 1.4  2001/08/09 09:08:55  anthonybaxter
74 # added identifying header to top of each file
75 #
76 # Revision 1.3  2001/07/19 07:38:28  anthony
77 # added type code for SRV. From Michael Ströder.
78 #
79 # Revision 1.2  2001/07/19 06:57:07  anthony
80 # cvs keywords added
81 #
82 #