dnstraverse 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +674 -0
- data/README +4 -0
- data/Rakefile +19 -0
- data/a +44 -0
- data/bin/dnstraverse +300 -0
- data/doc.tar +0 -0
- data/doc/classes/DNSTraverse.html +198 -0
- data/doc/classes/DNSTraverse/CachingResolver.html +172 -0
- data/doc/classes/DNSTraverse/CachingResolver.src/M000055.html +21 -0
- data/doc/classes/DNSTraverse/CachingResolver.src/M000056.html +42 -0
- data/doc/classes/DNSTraverse/DecodedQuery.html +475 -0
- data/doc/classes/DNSTraverse/DecodedQuery.src/M000020.html +34 -0
- data/doc/classes/DNSTraverse/DecodedQuery.src/M000021.html +23 -0
- data/doc/classes/DNSTraverse/DecodedQuery.src/M000022.html +19 -0
- data/doc/classes/DNSTraverse/DecodedQuery.src/M000023.html +33 -0
- data/doc/classes/DNSTraverse/DecodedQuery.src/M000024.html +26 -0
- data/doc/classes/DNSTraverse/DecodedQuery.src/M000025.html +24 -0
- data/doc/classes/DNSTraverse/DecodedQuery.src/M000026.html +29 -0
- data/doc/classes/DNSTraverse/DecodedQuery.src/M000027.html +19 -0
- data/doc/classes/DNSTraverse/DecodedQuery.src/M000028.html +18 -0
- data/doc/classes/DNSTraverse/DecodedQuery.src/M000029.html +32 -0
- data/doc/classes/DNSTraverse/DecodedQuery.src/M000030.html +19 -0
- data/doc/classes/DNSTraverse/DecodedQuery.src/M000031.html +19 -0
- data/doc/classes/DNSTraverse/DecodedQuery.src/M000032.html +20 -0
- data/doc/classes/DNSTraverse/DecodedQuery.src/M000033.html +31 -0
- data/doc/classes/DNSTraverse/DecodedQueryCache.html +182 -0
- data/doc/classes/DNSTraverse/DecodedQueryCache.src/M000063.html +21 -0
- data/doc/classes/DNSTraverse/DecodedQueryCache.src/M000064.html +33 -0
- data/doc/classes/DNSTraverse/Fingerprint.html +277 -0
- data/doc/classes/DNSTraverse/Fingerprint.src/M000047.html +29 -0
- data/doc/classes/DNSTraverse/Fingerprint.src/M000048.html +18 -0
- data/doc/classes/DNSTraverse/Fingerprint.src/M000049.html +57 -0
- data/doc/classes/DNSTraverse/Fingerprint.src/M000050.html +28 -0
- data/doc/classes/DNSTraverse/Fingerprint.src/M000051.html +27 -0
- data/doc/classes/DNSTraverse/Fingerprint.src/M000052.html +35 -0
- data/doc/classes/DNSTraverse/Fingerprint.src/M000053.html +24 -0
- data/doc/classes/DNSTraverse/Fingerprint.src/M000054.html +29 -0
- data/doc/classes/DNSTraverse/InfoCache.html +235 -0
- data/doc/classes/DNSTraverse/InfoCache.src/M000034.html +20 -0
- data/doc/classes/DNSTraverse/InfoCache.src/M000035.html +23 -0
- data/doc/classes/DNSTraverse/InfoCache.src/M000036.html +28 -0
- data/doc/classes/DNSTraverse/InfoCache.src/M000037.html +25 -0
- data/doc/classes/DNSTraverse/InfoCache.src/M000038.html +27 -0
- data/doc/classes/DNSTraverse/InfoCache.src/M000039.html +33 -0
- data/doc/classes/DNSTraverse/MessageUtility.html +275 -0
- data/doc/classes/DNSTraverse/MessageUtility.src/M000011.html +35 -0
- data/doc/classes/DNSTraverse/MessageUtility.src/M000012.html +37 -0
- data/doc/classes/DNSTraverse/MessageUtility.src/M000013.html +28 -0
- data/doc/classes/DNSTraverse/MessageUtility.src/M000014.html +27 -0
- data/doc/classes/DNSTraverse/MessageUtility.src/M000015.html +30 -0
- data/doc/classes/DNSTraverse/MessageUtility.src/M000016.html +32 -0
- data/doc/classes/DNSTraverse/MessageUtility.src/M000017.html +34 -0
- data/doc/classes/DNSTraverse/MessageUtility.src/M000018.html +23 -0
- data/doc/classes/DNSTraverse/MessageUtility.src/M000019.html +36 -0
- data/doc/classes/DNSTraverse/Referral.html +641 -0
- data/doc/classes/DNSTraverse/Referral.src/M000065.html +22 -0
- data/doc/classes/DNSTraverse/Referral.src/M000066.html +21 -0
- data/doc/classes/DNSTraverse/Referral.src/M000067.html +23 -0
- data/doc/classes/DNSTraverse/Referral.src/M000068.html +19 -0
- data/doc/classes/DNSTraverse/Referral.src/M000069.html +18 -0
- data/doc/classes/DNSTraverse/Referral.src/M000070.html +54 -0
- data/doc/classes/DNSTraverse/Referral.src/M000071.html +25 -0
- data/doc/classes/DNSTraverse/Referral.src/M000072.html +27 -0
- data/doc/classes/DNSTraverse/Referral.src/M000073.html +23 -0
- data/doc/classes/DNSTraverse/Referral.src/M000074.html +20 -0
- data/doc/classes/DNSTraverse/Referral.src/M000075.html +40 -0
- data/doc/classes/DNSTraverse/Referral.src/M000076.html +52 -0
- data/doc/classes/DNSTraverse/Referral.src/M000077.html +29 -0
- data/doc/classes/DNSTraverse/Referral.src/M000078.html +54 -0
- data/doc/classes/DNSTraverse/Referral.src/M000079.html +18 -0
- data/doc/classes/DNSTraverse/Referral.src/M000080.html +22 -0
- data/doc/classes/DNSTraverse/Referral.src/M000081.html +20 -0
- data/doc/classes/DNSTraverse/Referral.src/M000082.html +29 -0
- data/doc/classes/DNSTraverse/Referral.src/M000083.html +28 -0
- data/doc/classes/DNSTraverse/Referral.src/M000084.html +29 -0
- data/doc/classes/DNSTraverse/Referral.src/M000085.html +55 -0
- data/doc/classes/DNSTraverse/Referral.src/M000086.html +30 -0
- data/doc/classes/DNSTraverse/Referral.src/M000087.html +24 -0
- data/doc/classes/DNSTraverse/Referral.src/M000088.html +20 -0
- data/doc/classes/DNSTraverse/Referral.src/M000089.html +58 -0
- data/doc/classes/DNSTraverse/ResolveError.html +111 -0
- data/doc/classes/DNSTraverse/Response.html +271 -0
- data/doc/classes/DNSTraverse/Response.src/M000057.html +27 -0
- data/doc/classes/DNSTraverse/Response.src/M000058.html +21 -0
- data/doc/classes/DNSTraverse/Response.src/M000059.html +19 -0
- data/doc/classes/DNSTraverse/Response.src/M000060.html +21 -0
- data/doc/classes/DNSTraverse/Response.src/M000061.html +31 -0
- data/doc/classes/DNSTraverse/Response.src/M000062.html +23 -0
- data/doc/classes/DNSTraverse/Response/NoGlue.html +222 -0
- data/doc/classes/DNSTraverse/Response/NoGlue.src/M000007.html +32 -0
- data/doc/classes/DNSTraverse/Response/NoGlue.src/M000008.html +18 -0
- data/doc/classes/DNSTraverse/Response/NoGlue.src/M000009.html +18 -0
- data/doc/classes/DNSTraverse/Response/NoGlue.src/M000010.html +18 -0
- data/doc/classes/DNSTraverse/Traverser.html +247 -0
- data/doc/classes/DNSTraverse/Traverser.src/M000040.html +17 -0
- data/doc/classes/DNSTraverse/Traverser.src/M000041.html +52 -0
- data/doc/classes/DNSTraverse/Traverser.src/M000042.html +61 -0
- data/doc/classes/DNSTraverse/Traverser.src/M000043.html +110 -0
- data/doc/classes/DNSTraverse/Traverser.src/M000044.html +63 -0
- data/doc/classes/DNSTraverse/Traverser.src/M000045.html +28 -0
- data/doc/classes/DNSTraverse/Traverser.src/M000046.html +18 -0
- data/doc/classes/FingerprintRules.html +175 -0
- data/doc/classes/Log.html +174 -0
- data/doc/classes/Log.src/M000002.html +18 -0
- data/doc/classes/Log.src/M000003.html +18 -0
- data/doc/classes/Log.src/M000004.html +18 -0
- data/doc/classes/Log/Formatter.html +165 -0
- data/doc/classes/Log/Formatter.src/M000005.html +22 -0
- data/doc/classes/Log/Formatter.src/M000006.html +24 -0
- data/doc/classes/TestFingerprint.html +137 -0
- data/doc/classes/TestFingerprint.src/M000001.html +22 -0
- data/doc/created.rid +1 -0
- data/doc/files/lib/dnstraverse/caching_resolver_rb.html +132 -0
- data/doc/files/lib/dnstraverse/decoded_query_cache_rb.html +132 -0
- data/doc/files/lib/dnstraverse/decoded_query_rb.html +132 -0
- data/doc/files/lib/dnstraverse/fingerprint_rb.html +134 -0
- data/doc/files/lib/dnstraverse/fingerprint_rules_rb.html +143 -0
- data/doc/files/lib/dnstraverse/info_cache_rb.html +131 -0
- data/doc/files/lib/dnstraverse/log_rb.html +131 -0
- data/doc/files/lib/dnstraverse/message_utility_rb.html +124 -0
- data/doc/files/lib/dnstraverse/referral_rb.html +134 -0
- data/doc/files/lib/dnstraverse/response_noglue_rb.html +124 -0
- data/doc/files/lib/dnstraverse/response_rb.html +132 -0
- data/doc/files/lib/dnstraverse/traverser_rb.html +137 -0
- data/doc/files/test/test_fingerprint_rb.html +133 -0
- data/doc/fr_class_index.html +43 -0
- data/doc/fr_file_index.html +39 -0
- data/doc/fr_method_index.html +115 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/lib/dnstraverse/caching_resolver.rb +63 -0
- data/lib/dnstraverse/decoded_query.rb +199 -0
- data/lib/dnstraverse/decoded_query_cache.rb +53 -0
- data/lib/dnstraverse/fingerprint.rb +166 -0
- data/lib/dnstraverse/fingerprint_rules.rb +389 -0
- data/lib/dnstraverse/info_cache.rb +108 -0
- data/lib/dnstraverse/log.rb +55 -0
- data/lib/dnstraverse/message_utility.rb +199 -0
- data/lib/dnstraverse/referral.rb +463 -0
- data/lib/dnstraverse/response.rb +92 -0
- data/lib/dnstraverse/response_noglue.rb +54 -0
- data/lib/dnstraverse/traverser.rb +291 -0
- data/test/test_fingerprint.rb +29 -0
- metadata +231 -0
@@ -0,0 +1,110 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>run (DNSTraverse::Traverser)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/dnstraverse/traverser.rb, line 122</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span>(<span class="ruby-identifier">r</span>, <span class="ruby-identifier">args</span> = {})
|
15
|
+
<span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span> { <span class="ruby-value str">"run entry, initialising stack to: "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">to_s</span> }
|
16
|
+
<span class="ruby-identifier">cleanup</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:cleanup</span>]
|
17
|
+
<span class="ruby-identifier">stack</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
18
|
+
<span class="ruby-identifier">stack</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">r</span>
|
19
|
+
<span class="ruby-keyword kw">while</span> <span class="ruby-identifier">stack</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-keyword kw">do</span>
|
20
|
+
<span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span> { <span class="ruby-node">"stack size is #{stack.size}"</span> }
|
21
|
+
<span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span> {
|
22
|
+
<span class="ruby-identifier">counter</span> = <span class="ruby-value">0</span>
|
23
|
+
<span class="ruby-identifier">output</span> = <span class="ruby-value str">""</span>
|
24
|
+
<span class="ruby-keyword kw">for</span> <span class="ruby-identifier">entry</span> <span class="ruby-keyword kw">in</span> <span class="ruby-identifier">stack</span>.<span class="ruby-identifier">reverse</span> <span class="ruby-keyword kw">do</span>
|
25
|
+
<span class="ruby-identifier">output</span><span class="ruby-operator">+=</span> <span class="ruby-identifier">sprintf</span> <span class="ruby-value str">"%04d %s\n"</span>, <span class="ruby-identifier">counter</span>, <span class="ruby-identifier">entry</span>.<span class="ruby-identifier">to_s</span>
|
26
|
+
<span class="ruby-identifier">counter</span><span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
27
|
+
<span class="ruby-keyword kw">end</span>
|
28
|
+
<span class="ruby-identifier">output</span>
|
29
|
+
}
|
30
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-value str">"bad stack"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">stack</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">></span> <span class="ruby-value">1000</span>
|
31
|
+
<span class="ruby-identifier">r</span> = <span class="ruby-identifier">stack</span>.<span class="ruby-identifier">pop</span>
|
32
|
+
<span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span> { <span class="ruby-node">"running on stack entry #{r}"</span> }
|
33
|
+
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">r</span>
|
34
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:calc_resolve</span>
|
35
|
+
<span class="ruby-identifier">r</span> = <span class="ruby-identifier">stack</span>.<span class="ruby-identifier">pop</span>
|
36
|
+
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">resolve_calculate</span>
|
37
|
+
<span class="ruby-identifier">refres</span> = <span class="ruby-identifier">r</span>.<span class="ruby-identifier">referral_resolution?</span>
|
38
|
+
<span class="ruby-identifier">p</span> = (<span class="ruby-identifier">refres</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">true</span> <span class="ruby-operator">?</span> <span class="ruby-ivar">@progress_resolve</span> <span class="ruby-operator">:</span> <span class="ruby-ivar">@progress_main</span>)
|
39
|
+
<span class="ruby-identifier">p</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">:state</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@state</span>, <span class="ruby-identifier">:referral</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">r</span>, <span class="ruby-identifier">:stage</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:resolve</span>)
|
40
|
+
<span class="ruby-identifier">stack</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">r</span> <span class="ruby-comment cmt"># now need to process</span>
|
41
|
+
<span class="ruby-keyword kw">next</span>
|
42
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:calc_answer</span>
|
43
|
+
<span class="ruby-identifier">r</span> = <span class="ruby-identifier">stack</span>.<span class="ruby-identifier">pop</span>
|
44
|
+
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">answer_calculate</span>
|
45
|
+
<span class="ruby-identifier">refres</span> = <span class="ruby-identifier">r</span>.<span class="ruby-identifier">referral_resolution?</span>
|
46
|
+
<span class="ruby-identifier">p</span> = (<span class="ruby-identifier">refres</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">true</span> <span class="ruby-operator">?</span> <span class="ruby-ivar">@progress_resolve</span> <span class="ruby-operator">:</span> <span class="ruby-ivar">@progress_main</span>)
|
47
|
+
<span class="ruby-identifier">p</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">:state</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@state</span>, <span class="ruby-identifier">:referral</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">r</span>, <span class="ruby-identifier">:stage</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:answer</span>)
|
48
|
+
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">cleanup</span>(<span class="ruby-identifier">cleanup</span>)
|
49
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@fast</span> <span class="ruby-keyword kw">then</span>
|
50
|
+
<span class="ruby-comment cmt"># store away in @answered hash so we can lookup later</span>
|
51
|
+
<span class="ruby-comment cmt"># XXX fast method should use IP and not server name?</span>
|
52
|
+
<span class="ruby-comment cmt"># or maybe we should append IPs to end... </span>
|
53
|
+
<span class="ruby-identifier">key</span> = <span class="ruby-node">"#{r.qname}:#{r.qclass}:#{r.qtype}:#{r.server}:#{r.txt_ips_verbose}"</span>
|
54
|
+
<span class="ruby-identifier">key</span>.<span class="ruby-identifier">downcase!</span>
|
55
|
+
<span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span> { <span class="ruby-node">"Fast mode cache store: #{key}"</span> }
|
56
|
+
<span class="ruby-ivar">@answered</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">r</span>
|
57
|
+
<span class="ruby-keyword kw">end</span>
|
58
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">server</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">then</span>
|
59
|
+
<span class="ruby-ivar">@seen</span>[<span class="ruby-identifier">r</span>.<span class="ruby-identifier">server</span>.<span class="ruby-identifier">downcase</span>] = [] <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@seen</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">r</span>.<span class="ruby-identifier">server</span>)
|
60
|
+
<span class="ruby-ivar">@seen</span>[<span class="ruby-identifier">r</span>.<span class="ruby-identifier">server</span>.<span class="ruby-identifier">downcase</span>].<span class="ruby-identifier">concat</span>(<span class="ruby-identifier">r</span>.<span class="ruby-identifier">ips_as_array</span>)
|
61
|
+
<span class="ruby-ivar">@seen</span>[<span class="ruby-identifier">r</span>.<span class="ruby-identifier">server</span>.<span class="ruby-identifier">downcase</span>].<span class="ruby-identifier">uniq!</span>
|
62
|
+
<span class="ruby-keyword kw">end</span>
|
63
|
+
<span class="ruby-keyword kw">next</span>
|
64
|
+
<span class="ruby-keyword kw">else</span>
|
65
|
+
<span class="ruby-identifier">refres</span> = <span class="ruby-identifier">r</span>.<span class="ruby-identifier">referral_resolution?</span>
|
66
|
+
<span class="ruby-identifier">p</span> = (<span class="ruby-identifier">refres</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">true</span> <span class="ruby-operator">?</span> <span class="ruby-ivar">@progress_resolve</span> <span class="ruby-operator">:</span> <span class="ruby-ivar">@progress_main</span>)
|
67
|
+
<span class="ruby-identifier">p</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">:state</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@state</span>, <span class="ruby-identifier">:referral</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">r</span>, <span class="ruby-identifier">:stage</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:start</span>)
|
68
|
+
<span class="ruby-keyword kw">end</span>
|
69
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">resolved?</span> <span class="ruby-keyword kw">then</span>
|
70
|
+
<span class="ruby-comment cmt"># get resolve Referral objects, place on stack with placeholder</span>
|
71
|
+
<span class="ruby-identifier">stack</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">r</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">:calc_resolve</span>
|
72
|
+
<span class="ruby-identifier">stack</span>.<span class="ruby-identifier">push</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">r</span>.<span class="ruby-identifier">resolve</span>({}).<span class="ruby-identifier">reverse</span>)
|
73
|
+
<span class="ruby-keyword kw">next</span>
|
74
|
+
<span class="ruby-keyword kw">end</span>
|
75
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">processed?</span> <span class="ruby-keyword kw">then</span>
|
76
|
+
<span class="ruby-comment cmt"># get Referral objects, place on stack with placeholder</span>
|
77
|
+
<span class="ruby-identifier">stack</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">r</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">:calc_answer</span>
|
78
|
+
<span class="ruby-identifier">children</span> = <span class="ruby-identifier">r</span>.<span class="ruby-identifier">process</span>({})
|
79
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@fast</span> <span class="ruby-keyword kw">then</span>
|
80
|
+
<span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span> { <span class="ruby-node">"Checking #{r} for already completed children"</span> }
|
81
|
+
<span class="ruby-identifier">newchildren</span> = []
|
82
|
+
<span class="ruby-keyword kw">for</span> <span class="ruby-identifier">c</span> <span class="ruby-keyword kw">in</span> <span class="ruby-identifier">children</span> <span class="ruby-keyword kw">do</span>
|
83
|
+
<span class="ruby-identifier">key</span> = <span class="ruby-node">"#{c.qname}:#{c.qclass}:#{c.qtype}:#{c.server}:#{c.txt_ips_verbose}"</span>
|
84
|
+
<span class="ruby-identifier">key</span>.<span class="ruby-identifier">downcase!</span>
|
85
|
+
<span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span> { <span class="ruby-node">"Fast mode cache lookup: #{key}"</span> }
|
86
|
+
<span class="ruby-comment cmt"># check for previously stored answer</span>
|
87
|
+
<span class="ruby-comment cmt"># special case noglue situation, don't use previous answer</span>
|
88
|
+
<span class="ruby-comment cmt"># because attributes are complicated for stats collection and</span>
|
89
|
+
<span class="ruby-comment cmt"># we don't want to merge them together - creating the noglue</span>
|
90
|
+
<span class="ruby-comment cmt"># response object is fast anyway</span>
|
91
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@answered</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-identifier">key</span>) <span class="ruby-keyword kw">and</span> (<span class="ruby-keyword kw">not</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">noglue?</span>) <span class="ruby-keyword kw">then</span>
|
92
|
+
<span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span> { <span class="ruby-node">"Fast method - completed #{c}"</span> }
|
93
|
+
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">replace_child</span>(<span class="ruby-identifier">c</span>, <span class="ruby-ivar">@answered</span>[<span class="ruby-identifier">key</span>])
|
94
|
+
<span class="ruby-identifier">refres</span> = <span class="ruby-identifier">r</span>.<span class="ruby-identifier">referral_resolution?</span>
|
95
|
+
<span class="ruby-identifier">p</span> = (<span class="ruby-identifier">refres</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">true</span> <span class="ruby-operator">?</span> <span class="ruby-ivar">@progress_resolve</span> <span class="ruby-operator">:</span> <span class="ruby-ivar">@progress_main</span>)
|
96
|
+
<span class="ruby-identifier">p</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">:state</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@state</span>, <span class="ruby-identifier">:referral</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">c</span>, <span class="ruby-identifier">:stage</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:answer_fast</span>)
|
97
|
+
<span class="ruby-keyword kw">else</span>
|
98
|
+
<span class="ruby-identifier">newchildren</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">c</span>
|
99
|
+
<span class="ruby-keyword kw">end</span>
|
100
|
+
<span class="ruby-keyword kw">end</span>
|
101
|
+
<span class="ruby-identifier">children</span> = <span class="ruby-identifier">newchildren</span>
|
102
|
+
<span class="ruby-keyword kw">end</span>
|
103
|
+
<span class="ruby-identifier">stack</span>.<span class="ruby-identifier">push</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">children</span>.<span class="ruby-identifier">reverse</span>)
|
104
|
+
<span class="ruby-keyword kw">next</span>
|
105
|
+
<span class="ruby-keyword kw">end</span>
|
106
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-node">"Fatal stack error at #{r} - size still #{stack.size}"</span>
|
107
|
+
<span class="ruby-keyword kw">end</span>
|
108
|
+
<span class="ruby-keyword kw">end</span></pre>
|
109
|
+
</body>
|
110
|
+
</html>
|
@@ -0,0 +1,63 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>find_all_roots (DNSTraverse::Traverser)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/dnstraverse/traverser.rb, line 220</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find_all_roots</span>(<span class="ruby-identifier">args</span>)
|
15
|
+
<span class="ruby-identifier">root</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:root</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'localhost'</span>
|
16
|
+
<span class="ruby-identifier">rootip</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:rootip</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'127.0.0.1'</span>
|
17
|
+
<span class="ruby-identifier">aaaa</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:aaaa</span>] <span class="ruby-operator">||</span> <span class="ruby-keyword kw">false</span>
|
18
|
+
<span class="ruby-identifier">types</span> = <span class="ruby-identifier">aaaa</span> <span class="ruby-value">? </span><span class="ruby-constant">TYPE_ARRAY_AAAA</span> <span class="ruby-operator">:</span> <span class="ruby-constant">TYPE_ARRAY_A</span>
|
19
|
+
<span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span> { <span class="ruby-node">"find_roots entry #{root}"</span> }
|
20
|
+
<span class="ruby-ivar">@resolver</span>.<span class="ruby-identifier">nameserver</span> = <span class="ruby-identifier">rootip</span>
|
21
|
+
<span class="ruby-comment cmt"># query for all the root nameservers</span>
|
22
|
+
<span class="ruby-identifier">msg</span> = <span class="ruby-ivar">@resolver</span>.<span class="ruby-identifier">query</span>(<span class="ruby-value str">''</span>, <span class="ruby-value str">'NS'</span>)
|
23
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-identifier">msg</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">msg</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Exception</span>
|
24
|
+
<span class="ruby-identifier">msg_validate</span>(<span class="ruby-identifier">msg</span>, <span class="ruby-identifier">:qname</span> =<span class="ruby-operator">></span> <span class="ruby-value str">''</span>, <span class="ruby-identifier">:qtype</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'NS'</span>)
|
25
|
+
<span class="ruby-identifier">msg_comment</span>(<span class="ruby-identifier">msg</span>, <span class="ruby-identifier">:want_recursion</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">false</span>)
|
26
|
+
<span class="ruby-identifier">ns</span> = <span class="ruby-identifier">msg_answers?</span>(<span class="ruby-identifier">msg</span>, <span class="ruby-identifier">:qname</span> =<span class="ruby-operator">></span> <span class="ruby-value str">''</span>, <span class="ruby-identifier">:qtype</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'NS'</span>)
|
27
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">ns</span>
|
28
|
+
<span class="ruby-identifier">roots</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
29
|
+
<span class="ruby-comment cmt"># look at each root in turn</span>
|
30
|
+
<span class="ruby-keyword kw">for</span> <span class="ruby-identifier">rr</span> <span class="ruby-keyword kw">in</span> <span class="ruby-identifier">ns</span> <span class="ruby-keyword kw">do</span>
|
31
|
+
<span class="ruby-identifier">ips</span> = []
|
32
|
+
<span class="ruby-comment cmt"># find IP addresses in the additional section</span>
|
33
|
+
<span class="ruby-keyword kw">for</span> <span class="ruby-identifier">type</span> <span class="ruby-keyword kw">in</span> <span class="ruby-identifier">types</span> <span class="ruby-keyword kw">do</span>
|
34
|
+
<span class="ruby-identifier">iprrs</span> = <span class="ruby-identifier">msg_additional?</span>(<span class="ruby-identifier">msg</span>, <span class="ruby-identifier">:qname</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">rr</span>.<span class="ruby-identifier">domainname</span>, <span class="ruby-identifier">:qtype</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">type</span>)
|
35
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">iprrs</span> <span class="ruby-keyword kw">then</span>
|
36
|
+
<span class="ruby-identifier">ips</span>.<span class="ruby-identifier">concat</span> <span class="ruby-identifier">iprrs</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">iprr</span><span class="ruby-operator">|</span> <span class="ruby-identifier">iprr</span>.<span class="ruby-identifier">address</span>.<span class="ruby-identifier">to_s</span> }
|
37
|
+
<span class="ruby-keyword kw">end</span>
|
38
|
+
<span class="ruby-keyword kw">end</span>
|
39
|
+
<span class="ruby-comment cmt"># if none, query for the IP addresses</span>
|
40
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">ips</span> <span class="ruby-keyword kw">then</span>
|
41
|
+
<span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span> { <span class="ruby-node">"Locally resolving root #{rr.domainname}"</span> }
|
42
|
+
<span class="ruby-keyword kw">for</span> <span class="ruby-identifier">type</span> <span class="ruby-keyword kw">in</span> <span class="ruby-identifier">types</span> <span class="ruby-keyword kw">do</span>
|
43
|
+
<span class="ruby-identifier">msg</span> = <span class="ruby-ivar">@lresolver</span>.<span class="ruby-identifier">query</span>(<span class="ruby-identifier">rr</span>.<span class="ruby-identifier">domainname</span>, <span class="ruby-identifier">type</span>)
|
44
|
+
<span class="ruby-identifier">msg_validate</span>(<span class="ruby-identifier">msg</span>, <span class="ruby-identifier">:qname</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">rr</span>.<span class="ruby-identifier">domainname</span>, <span class="ruby-identifier">:qtype</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">type</span>)
|
45
|
+
<span class="ruby-identifier">msg_comment</span>(<span class="ruby-identifier">msg</span>, <span class="ruby-identifier">:want_recursion</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span>)
|
46
|
+
<span class="ruby-identifier">iprrs</span> = <span class="ruby-identifier">msg_answers?</span>(<span class="ruby-identifier">msg</span>, <span class="ruby-identifier">:qname</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">rr</span>.<span class="ruby-identifier">domainname</span>, <span class="ruby-identifier">:qtype</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">type</span>)
|
47
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">iprrs</span> <span class="ruby-keyword kw">then</span>
|
48
|
+
<span class="ruby-identifier">ips</span>.<span class="ruby-identifier">concat</span> <span class="ruby-identifier">iprrs</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">iprr</span><span class="ruby-operator">|</span> <span class="ruby-identifier">iprr</span>.<span class="ruby-identifier">address</span>.<span class="ruby-identifier">to_s</span> }
|
49
|
+
<span class="ruby-keyword kw">end</span>
|
50
|
+
<span class="ruby-keyword kw">end</span>
|
51
|
+
<span class="ruby-keyword kw">end</span>
|
52
|
+
<span class="ruby-comment cmt"># if we still don't have any IP address, skip this root</span>
|
53
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">ips</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-keyword kw">then</span>
|
54
|
+
<span class="ruby-constant">Log</span>.<span class="ruby-identifier">warn</span> { <span class="ruby-node">"Failed to resolve #{rr.domainname} type #{qtype}"</span> }
|
55
|
+
<span class="ruby-keyword kw">next</span>
|
56
|
+
<span class="ruby-keyword kw">end</span>
|
57
|
+
<span class="ruby-identifier">roots</span>.<span class="ruby-identifier">push</span>({ <span class="ruby-identifier">:name</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">rr</span>.<span class="ruby-identifier">domainname</span>, <span class="ruby-identifier">:ips</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ips</span> })
|
58
|
+
<span class="ruby-keyword kw">end</span>
|
59
|
+
<span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span> { <span class="ruby-node">"find_roots exit, #{roots.map { |x| x[:name] }.join(', ') }"</span> }
|
60
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">roots</span>
|
61
|
+
<span class="ruby-keyword kw">end</span></pre>
|
62
|
+
</body>
|
63
|
+
</html>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>run_query (DNSTraverse::Traverser)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/dnstraverse/traverser.rb, line 269</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run_query</span>(<span class="ruby-identifier">args</span>)
|
15
|
+
<span class="ruby-identifier">qname</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:qname</span>]
|
16
|
+
<span class="ruby-identifier">qtype</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:qtype</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'A'</span>
|
17
|
+
<span class="ruby-identifier">maxdepth</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:maxdepth</span>] <span class="ruby-operator">||</span> <span class="ruby-value">10</span>
|
18
|
+
<span class="ruby-identifier">cleanup</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:cleanup</span>]
|
19
|
+
<span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span> { <span class="ruby-node">"run_query entry qname=#{qname} qtype=#{qtype}"</span> }
|
20
|
+
<span class="ruby-identifier">r</span> = <span class="ruby-constant">Referral</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:qname</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">qname</span>, <span class="ruby-identifier">:qtype</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">qtype</span>, <span class="ruby-identifier">:roots</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:roots</span>],
|
21
|
+
<span class="ruby-identifier">:maxdepth</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">maxdepth</span>, <span class="ruby-identifier">:resolver</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@resolver</span>,
|
22
|
+
<span class="ruby-identifier">:nsatype</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'A'</span>)
|
23
|
+
<span class="ruby-identifier">run</span>(<span class="ruby-identifier">r</span>, <span class="ruby-identifier">:cleanup</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">cleanup</span>)
|
24
|
+
<span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span> { <span class="ruby-value str">"run_query exit"</span> }
|
25
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">r</span>
|
26
|
+
<span class="ruby-keyword kw">end</span></pre>
|
27
|
+
</body>
|
28
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>servers_encountered (DNSTraverse::Traverser)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/dnstraverse/traverser.rb, line 285</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">servers_encountered</span>
|
15
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@seen</span>
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,175 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Module: FingerprintRules</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Module</strong></td>
|
53
|
+
<td class="class-name-in-header">FingerprintRules</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/lib/dnstraverse/fingerprint_rules_rb.html">
|
59
|
+
lib/dnstraverse/fingerprint_rules.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
</table>
|
66
|
+
</div>
|
67
|
+
<!-- banner header -->
|
68
|
+
|
69
|
+
<div id="bodyContent">
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
<div id="contextContent">
|
74
|
+
|
75
|
+
<div id="description">
|
76
|
+
<p>
|
77
|
+
$Id: Fingerprint.pm,v 1.17 2005/09/05 13:33:36 jakob Exp $
|
78
|
+
</p>
|
79
|
+
<p>
|
80
|
+
Copyright (c) 2003,2004,2005 Roy Arends & Jakob Schlyter. All rights
|
81
|
+
reserved.
|
82
|
+
</p>
|
83
|
+
<p>
|
84
|
+
Redistribution and use in source and binary forms, with or without
|
85
|
+
modification, are permitted provided that the following conditions are met:
|
86
|
+
</p>
|
87
|
+
<ol>
|
88
|
+
<li>Redistributions of source code must retain the above copyright notice, this
|
89
|
+
list of conditions and the following disclaimer.
|
90
|
+
|
91
|
+
</li>
|
92
|
+
<li>Redistributions in binary form must reproduce the above copyright notice,
|
93
|
+
this list of conditions and the following disclaimer in the documentation
|
94
|
+
and/or other materials provided with the distribution.
|
95
|
+
|
96
|
+
</li>
|
97
|
+
<li>The name of the authors may not be used to endorse or promote products
|
98
|
+
derived from this software without specific prior written permission.
|
99
|
+
|
100
|
+
</li>
|
101
|
+
</ol>
|
102
|
+
<p>
|
103
|
+
THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS’’ AND ANY
|
104
|
+
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
105
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
106
|
+
DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT,
|
107
|
+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
108
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
109
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
110
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
111
|
+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
112
|
+
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
113
|
+
DAMAGE.
|
114
|
+
</p>
|
115
|
+
|
116
|
+
</div>
|
117
|
+
|
118
|
+
|
119
|
+
</div>
|
120
|
+
|
121
|
+
|
122
|
+
</div>
|
123
|
+
|
124
|
+
|
125
|
+
<!-- if includes -->
|
126
|
+
|
127
|
+
<div id="section">
|
128
|
+
|
129
|
+
|
130
|
+
<div id="constants-list">
|
131
|
+
<h3 class="section-bar">Constants</h3>
|
132
|
+
|
133
|
+
<div class="name-list">
|
134
|
+
<table summary="Constants">
|
135
|
+
<tr class="top-aligned-row context-row">
|
136
|
+
<td class="context-item-name">QY</td>
|
137
|
+
<td>=</td>
|
138
|
+
<td class="context-item-value">[ "0,IQUERY,0,0,1,0,0,0,NOERROR,0,0,0,0", "0,NS_NOTIFY_OP,0,0,0,0,0,0,NOERROR,0,0,0,0", "0,QUERY,0,0,0,0,0,0,NOERROR,0,0,0,0", "0,IQUERY,0,0,0,0,1,1,NOERROR,0,0,0,0", "0,QUERY,0,0,0,0,0,0,NOTIMP,0,0,0,0", "0,IQUERY,1,0,1,1,1,1,NOERROR,0,0,0,0", "0,UPDATE,0,0,0,1,0,0,NOERROR,0,0,0,0", "0,QUERY,1,1,1,1,1,1,NOERROR,0,0,0,0", "0,QUERY,0,0,0,0,0,1,NOERROR,0,0,0,0", ].freeze</td>
|
139
|
+
</tr>
|
140
|
+
<tr class="top-aligned-row context-row">
|
141
|
+
<td class="context-item-name">INITRULE</td>
|
142
|
+
<td>=</td>
|
143
|
+
<td class="context-item-value">{ :header => QY[0], :query => ". IN A" }.freeze</td>
|
144
|
+
</tr>
|
145
|
+
<tr class="top-aligned-row context-row">
|
146
|
+
<td class="context-item-name">IQ</td>
|
147
|
+
<td>=</td>
|
148
|
+
<td class="context-item-value">[ "1,IQUERY,0,0,1,0,0,0,FORMERR,0,0,0,0", # iq0 "1,IQUERY,0,0,1,0,0,0,FORMERR,1,0,0,0", # iq1 "1,IQUERY,0,0,1,0,0,0,NOTIMP,0,0,0,0", # iq2 "1,IQUERY,0,0,1,0,0,0,NOTIMP,1,0,0,0", # iq3 "1,IQUERY,0,0,1,1,0,0,FORMERR,0,0,0,0", # iq4 "1,IQUERY,0,0,1,1,0,0,NOTIMP,0,0,0,0", # iq5 "1,IQUERY,0,0,1,1,0,0,NOTIMP,1,0,0,0", # iq6 "1,IQUERY,1,0,1,0,0,0,NOTIMP,1,0,0,0", # iq7 "1,QUERY,1,0,1,0,0,0,NOTIMP,1,0,0,0", "1,QUERY,0,0,0,0,0,0,NOTIMP,0,0,0,0", "1,IQUERY,0,0,1,1,0,0,FORMERR,1,0,0,0", # iq10 "1,NS_NOTIFY_OP,0,0,0,0,0,0,FORMERR,1,0,0,0", "1,NS_NOTIFY_OP,0,0,0,0,0,0,NOTIMP,0,0,0,0", "1,NS_NOTIFY_OP,0,0,0,0,0,0,NOTIMP,1,0,0,0", "1,NS_NOTIFY_OP,0,0,0,0,0,0,NXDOMAIN,1,0,0,0", "1,NS_NOTIFY_OP,0,0,0,0,0,0,REFUSED,1,0,0,0", "1,NS_NOTIFY_OP,0,0,0,0,0,0,SERVFAIL,1,0,0,0", "1,NS_NOTIFY_OP,0,0,0,1,0,0,FORMERR,1,0,0,0", "1,NS_NOTIFY_OP,0,0,0,1,0,0,NOTIMP,0,0,0,0", "1,NS_NOTIFY_OP,0,0,0,1,0,0,NOTIMP,1,0,0,0", "1,NS_NOTIFY_OP,0,0,0,1,0,0,REFUSED,1,0,0,0", # iq20 "1,NS_NOTIFY_OP,0,0,0,1,0,0,SERVFAIL,1,0,0,0", "1,NS_NOTIFY_OP,1,0,0,0,0,0,NOTIMP,1,0,0,0", "1,QUERY,1,0,0,0,0,0,NOTIMP,1,0,0,0", "1,NS_NOTIFY_OP,1,0,0,0,0,0,SERVFAIL,1,0,0,0", "1,IQUERY,0,0,0,0,1,1,NOTIMP,0,0,0,0", "1,IQUERY,0,0,0,0,0,0,NOTIMP,0,0,0,0", "1,IQUERY,0,0,1,1,1,1,FORMERR,0,0,0,0", "1,IQUERY,1,0,1,1,1,1,FORMERR,0,0,0,0", "1,QUERY,.,0,1,.,.,.,NOTIMP,.+,.+,.+,.+", "1,QUERY,.,0,1,.,.,.,.+,.+,.+,.+,.+", #iq30 "1,QUERY,0,0,.,.,0,0,NXDOMAIN,1,0,0,0", "1,QUERY,0,0,.,.,0,0,FORMERR,1,0,0,0", "1,UPDATE,0,0,0,0,0,0,NOTIMP,0,0,0,0", "1,UPDATE,0,0,0,1,0,0,NOTIMP,0,0,0,0", "1,QUERY,0,0,1,0,0,0,NOERROR,1,0,0,0", "1,QUERY,1,1,1,1,1,1,NOTIMP,1,0,0,0", "1,QUERY,0,0,0,0,0,0,NOERROR,1,0,.+,0", "1,QUERY,0,0,1,0,0,0,FORMERR,1,0,0,0", "1,IQUERY,0,0,1,0,1,1,NOTIMP,1,0,0,0", "1,IQUERY,0,0,0,1,1,1,REFUSED,1,0,0,0", #iq40 "1,UPDATE,0,0,0,1,0,0,REFUSED,1,0,0,0", "1,IQUERY,0,0,0,1,1,1,FORMERR,0,0,0,0", "1,IQUERY,0,0,0,1,0,0,NOTIMP,0,0,0,0", "1,QUERY,1,0,1,0,0,0,FORMERR,1,0,0,0", "1,UPDATE,0,0,0,0,0,0,FORMERR,1,0,0,0", "1,UPDATE,0,0,0,0,0,0,FORMERR,0,0,0,0", "1,QUERY,0,0,1,0,0,0,FORMERR,0,0,0,0", "1,QUERY,0,0,1,0,0,0,SERVFAIL,1,0,0,0", #iq48 "1,QUERY,1,0,1,0,0,0,NXDOMAIN,1,0,1,0", "1,QUERY,0,0,1,0,0,0,REFUSED,1,0,0,0", #iq50 "1,QUERY,0,0,1,0,0,0,NOERROR,1,1,0,0", "1,IQUERY,0,0,1,0,0,0,REFUSED,0,0,0,0", "1,QUERY,0,0,0,0,0,0,FORMERR,0,0,0,0", "1,QUERY,0,0,1,1,1,0,NOERROR,1,0,1,0", "1,QUERY,0,0,1,1,0,0,NOERROR,1,0,1,0", "1,QUERY,0,0,1,0,1,0,NOERROR,.+,.+,.+,.+", "1,QUERY,0,0,1,0,0,0,.+,.+,.+,.+,.+", "1,QUERY,1,0,1,0,0,0,NOERROR,1,1,0,0", "1,QUERY,0,0,1,1,0,0,SERVFAIL,1,0,0,0", "1,QUERY,1,0,1,1,0,0,NOERROR,1,1,0,0", #iq60 "1,QUERY,0,0,1,1,0,0,REFUSED,1,0,0,0", "1,QUERY,0,0,0,0,0,0,NOTIMP,1,0,0,0", "1,QUERY,1,0,1,1,0,0,NOERROR,1,0,1,0", "1,IQUERY,0,0,1,1,1,1,NOTIMP,0,0,0,0", "1,UPDATE,0,0,0,0,0,0,REFUSED,0,0,0,0", "1,IQUERY,0,0,0,1,1,1,NOTIMP,1,0,0,0", "1,IQUERY,0,0,0,1,0,0,NOTIMP,1,0,0,0", "1,QUERY,0,1,1,1,1,1,NOERROR,1,0,.,0", "1,QUERY,0,1,1,1,0,1,NOERROR,1,0,.,0", "1,IQUERY,0,0,1,0,0,0,REFUSED,1,0,0,0", #iq70 "1,IQUERY,1,0,1,1,1,1,NOTIMP,1,0,0,0", "1,IQUERY,0,0,1,0,0,0,NOERROR,1,0,0,0", "1,QUERY,1,0,1,1,0,0,NOERROR,1,0,0,0", "1,IQUERY,1,0,1,1,0,0,NXDOMAIN,1,0,0,0", "1,UPDATE,0,0,0,1,0,0,FORMERR,0,0,0,0", "1,IQUERY,1,0,1,0,0,0,NXDOMAIN,1,0,0,0", "1,QUERY,0,0,1,1,0,0,FORMERR,1,0,0,0", "1,QUERY,0,0,0,1,0,0,SERVFAIL,1,0,0,0", "1,QUERY,0,0,1,1,0,0,NOERROR,1,1,0,0", "1,IQUERY,1,0,1,0,0,0,NOERROR,1,0,0,0", #iq80 "1,IQUERY,1,0,1,1,0,0,NOTIMP,1,0,0,0", "1,QUERY,0,0,1,1,0,0,NOERROR,1,0,0,0", "1,QUERY,1,0,1,1,0,0,NOERROR,1,1,1,.+", "1,QUERY,0,0,1,1,0,0,REFUSED,0,0,0,0", "1,UPDATE,0,0,0,1,0,0,NOTIMP,1,0,0,0", "1,QUERY,1,0,0,1,0,0,NXDOMAIN,1,0,0,0", "1,QUERY,0,0,0,1,0,0,NOTIMP,0,0,0,0", "1,QUERY,0,0,0,0,0,0,REFUSED,1,0,0,0", "1,QUERY,1,0,1,1,0,0,NXDOMAIN,1,0,0,0", "1,QUERY,1,0,0,0,0,0,NOERROR,1,1,0,0", #iq90 "1,IQUERY,1,0,1,1,0,1,NOTIMP,1,0,0,0", "1,QUERY,0,0,0,1,0,0,NOTIMP,1,0,0,0", "1,QUERY,0,0,1,0,0,1,SERVFAIL,1,0,0,0", ].freeze</td>
|
149
|
+
</tr>
|
150
|
+
<tr class="top-aligned-row context-row">
|
151
|
+
<td class="context-item-name">RULESET</td>
|
152
|
+
<td>=</td>
|
153
|
+
<td class="context-item-value">[ { :fingerprint => "query timed out" , :header => QY[0], :query => "com. IN A", :ruleset => [ { :fingerprint => "query timed out", :header => QY[7], :query => ". CH A", :ruleset => [ { :fingerprint => "query timed out", :header => QY[6], :query => ". IN A", :ruleset => [ { :fingerprint => IQ[38], :result => { :vendor => "Digital Lumber", :product => "Oak DNS", :version =>"" }, :qv => ":version.oak",}, ## { :fingerprint => "query timed out", :result => "TIMEOUT",}, { :fingerprint => ".+", :state => "q0tq0tq7tq6r?", }, ]</td>
|
154
|
+
</tr>
|
155
|
+
</table>
|
156
|
+
</div>
|
157
|
+
</div>
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
<!-- if method_list -->
|
165
|
+
|
166
|
+
|
167
|
+
</div>
|
168
|
+
|
169
|
+
|
170
|
+
<div id="validator-badges">
|
171
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
172
|
+
</div>
|
173
|
+
|
174
|
+
</body>
|
175
|
+
</html>
|
@@ -0,0 +1,174 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Module: Log</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Module</strong></td>
|
53
|
+
<td class="class-name-in-header">Log</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/lib/dnstraverse/log_rb.html">
|
59
|
+
lib/dnstraverse/log.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
</table>
|
66
|
+
</div>
|
67
|
+
<!-- banner header -->
|
68
|
+
|
69
|
+
<div id="bodyContent">
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
<div id="contextContent">
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
</div>
|
78
|
+
|
79
|
+
<div id="method-list">
|
80
|
+
<h3 class="section-bar">Methods</h3>
|
81
|
+
|
82
|
+
<div class="name-list">
|
83
|
+
<a href="#M000002">level=</a>
|
84
|
+
<a href="#M000003">logger=</a>
|
85
|
+
<a href="#M000004">method_missing</a>
|
86
|
+
</div>
|
87
|
+
</div>
|
88
|
+
|
89
|
+
</div>
|
90
|
+
|
91
|
+
|
92
|
+
<!-- if includes -->
|
93
|
+
<div id="includes">
|
94
|
+
<h3 class="section-bar">Included Modules</h3>
|
95
|
+
|
96
|
+
<div id="includes-list">
|
97
|
+
<span class="include-name">Logger::Severity</span>
|
98
|
+
</div>
|
99
|
+
</div>
|
100
|
+
|
101
|
+
<div id="section">
|
102
|
+
|
103
|
+
<div id="class-list">
|
104
|
+
<h3 class="section-bar">Classes and Modules</h3>
|
105
|
+
|
106
|
+
Class <a href="Log/Formatter.html" class="link">Log::Formatter</a><br />
|
107
|
+
|
108
|
+
</div>
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
<!-- if method_list -->
|
117
|
+
<div id="methods">
|
118
|
+
<h3 class="section-bar">Public Class methods</h3>
|
119
|
+
|
120
|
+
<div id="method-M000002" class="method-detail">
|
121
|
+
<a name="M000002"></a>
|
122
|
+
|
123
|
+
<div class="method-heading">
|
124
|
+
<a href="Log.src/M000002.html" target="Code" class="method-signature"
|
125
|
+
onclick="popupCode('Log.src/M000002.html');return false;">
|
126
|
+
<span class="method-name">level=</span><span class="method-args">(l)</span>
|
127
|
+
</a>
|
128
|
+
</div>
|
129
|
+
|
130
|
+
<div class="method-description">
|
131
|
+
</div>
|
132
|
+
</div>
|
133
|
+
|
134
|
+
<div id="method-M000003" class="method-detail">
|
135
|
+
<a name="M000003"></a>
|
136
|
+
|
137
|
+
<div class="method-heading">
|
138
|
+
<a href="Log.src/M000003.html" target="Code" class="method-signature"
|
139
|
+
onclick="popupCode('Log.src/M000003.html');return false;">
|
140
|
+
<span class="method-name">logger=</span><span class="method-args">(logger)</span>
|
141
|
+
</a>
|
142
|
+
</div>
|
143
|
+
|
144
|
+
<div class="method-description">
|
145
|
+
</div>
|
146
|
+
</div>
|
147
|
+
|
148
|
+
<div id="method-M000004" class="method-detail">
|
149
|
+
<a name="M000004"></a>
|
150
|
+
|
151
|
+
<div class="method-heading">
|
152
|
+
<a href="Log.src/M000004.html" target="Code" class="method-signature"
|
153
|
+
onclick="popupCode('Log.src/M000004.html');return false;">
|
154
|
+
<span class="method-name">method_missing</span><span class="method-args">(key, *args, &b)</span>
|
155
|
+
</a>
|
156
|
+
</div>
|
157
|
+
|
158
|
+
<div class="method-description">
|
159
|
+
</div>
|
160
|
+
</div>
|
161
|
+
|
162
|
+
|
163
|
+
</div>
|
164
|
+
|
165
|
+
|
166
|
+
</div>
|
167
|
+
|
168
|
+
|
169
|
+
<div id="validator-badges">
|
170
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
171
|
+
</div>
|
172
|
+
|
173
|
+
</body>
|
174
|
+
</html>
|