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,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>processed? (DNSTraverse::Referral)</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/referral.rb, line 282</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">processed?</span>
|
15
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@processed</span>
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,22 @@
|
|
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>resolved? (DNSTraverse::Referral)</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/referral.rb, line 286</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">resolved?</span>
|
15
|
+
<span class="ruby-comment cmt"># root-root is always resolved, otherwise check we have IP addresses</span>
|
16
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">is_rootroot?</span>
|
17
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@noglue</span>
|
18
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@serverips</span>.<span class="ruby-identifier">nil?</span>
|
19
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
|
20
|
+
<span class="ruby-keyword kw">end</span></pre>
|
21
|
+
</body>
|
22
|
+
</html>
|
@@ -0,0 +1,20 @@
|
|
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>is_rootroot? (DNSTraverse::Referral)</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/referral.rb, line 294</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">is_rootroot?</span>
|
15
|
+
<span class="ruby-comment cmt"># rootroot is the topmost object representing an automatic referral</span>
|
16
|
+
<span class="ruby-comment cmt"># to all the root servers</span>
|
17
|
+
<span class="ruby-ivar">@server</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">true</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">false</span>
|
18
|
+
<span class="ruby-keyword kw">end</span></pre>
|
19
|
+
</body>
|
20
|
+
</html>
|
@@ -0,0 +1,29 @@
|
|
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>process (DNSTraverse::Referral)</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/referral.rb, line 300</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process</span>(<span class="ruby-identifier">args</span>)
|
15
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-value str">"This Referral object has already been processed"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">processed?</span>
|
16
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-value str">"You need to resolve this Referral object"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resolved?</span>
|
17
|
+
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">server</span>) <span class="ruby-keyword kw">then</span>
|
18
|
+
<span class="ruby-identifier">process_normal</span>(<span class="ruby-identifier">args</span>)
|
19
|
+
<span class="ruby-keyword kw">else</span>
|
20
|
+
<span class="ruby-comment cmt"># special case - no server means start from the top with the roots</span>
|
21
|
+
<span class="ruby-identifier">process_add_roots</span>(<span class="ruby-identifier">args</span>)
|
22
|
+
<span class="ruby-keyword kw">end</span>
|
23
|
+
<span class="ruby-comment cmt"># return a set of Referral objects that need to be processed</span>
|
24
|
+
<span class="ruby-comment cmt"># XXX flatten really necessary?</span>
|
25
|
+
<span class="ruby-ivar">@processed</span> = <span class="ruby-keyword kw">true</span>
|
26
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@children</span>.<span class="ruby-identifier">values</span>.<span class="ruby-identifier">flatten</span>.<span class="ruby-identifier">select</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Referral</span>}
|
27
|
+
<span class="ruby-keyword kw">end</span></pre>
|
28
|
+
</body>
|
29
|
+
</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>process_add_roots (DNSTraverse::Referral)</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/referral.rb, line 315</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process_add_roots</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">"Special case processing, addding roots as referrals"</span> }
|
16
|
+
<span class="ruby-identifier">refid_prefix</span> = <span class="ruby-ivar">@refid</span> <span class="ruby-operator">==</span> <span class="ruby-value str">''</span> <span class="ruby-operator">?</span> <span class="ruby-value str">''</span> <span class="ruby-operator">:</span> <span class="ruby-node">"#{@refid}."</span>
|
17
|
+
<span class="ruby-identifier">refid</span> = <span class="ruby-value">1</span>
|
18
|
+
<span class="ruby-identifier">starters</span> = (<span class="ruby-ivar">@infocache</span>.<span class="ruby-identifier">get_startservers</span>(<span class="ruby-value str">''</span>, <span class="ruby-ivar">@nsatype</span>))[<span class="ruby-value">0</span>]
|
19
|
+
<span class="ruby-ivar">@children</span>[<span class="ruby-identifier">:rootroot</span>] = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span> <span class="ruby-comment cmt"># use 'rootroot' instead of IP address</span>
|
20
|
+
<span class="ruby-keyword kw">for</span> <span class="ruby-identifier">root</span> <span class="ruby-keyword kw">in</span> <span class="ruby-identifier">starters</span> <span class="ruby-keyword kw">do</span>
|
21
|
+
<span class="ruby-identifier">r</span> = <span class="ruby-identifier">make_referral</span>(<span class="ruby-identifier">:server</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">root</span>[<span class="ruby-identifier">:name</span>], <span class="ruby-identifier">:serverips</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">root</span>[<span class="ruby-identifier">:ips</span>],
|
22
|
+
<span class="ruby-identifier">:refid</span> =<span class="ruby-operator">></span> <span class="ruby-node">"#{refid_prefix}#{refid}"</span>)
|
23
|
+
<span class="ruby-ivar">@children</span>[<span class="ruby-identifier">:rootroot</span>].<span class="ruby-identifier">push</span> <span class="ruby-identifier">r</span>
|
24
|
+
<span class="ruby-identifier">refid</span><span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
25
|
+
<span class="ruby-keyword kw">end</span>
|
26
|
+
<span class="ruby-keyword kw">end</span></pre>
|
27
|
+
</body>
|
28
|
+
</html>
|
@@ -0,0 +1,29 @@
|
|
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>check_loop? (DNSTraverse::Referral)</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/referral.rb, line 329</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">check_loop?</span>(<span class="ruby-identifier">args</span>) <span class="ruby-comment cmt"># :ip, :qtype, :qname, :qclass</span>
|
15
|
+
<span class="ruby-identifier">parent</span> = <span class="ruby-ivar">@parent</span>
|
16
|
+
<span class="ruby-keyword kw">until</span> <span class="ruby-identifier">parent</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">do</span>
|
17
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">parent</span>.<span class="ruby-identifier">qname</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:qname</span>].<span class="ruby-identifier">to_s</span> <span class="ruby-keyword kw">and</span>
|
18
|
+
<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">qclass</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:qclass</span>].<span class="ruby-identifier">to_s</span> <span class="ruby-keyword kw">and</span>
|
19
|
+
<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">qtype</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:qtype</span>].<span class="ruby-identifier">to_s</span> <span class="ruby-keyword kw">and</span>
|
20
|
+
<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">serverips</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">parent</span>.<span class="ruby-identifier">serverips</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">args</span>[<span class="ruby-identifier">:ip</span>]) <span class="ruby-keyword kw">then</span>
|
21
|
+
<span class="ruby-identifier">exit</span> <span class="ruby-value">1</span> <span class="ruby-comment cmt"># XXX fix me</span>
|
22
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">RuntimeError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"Loop detected"</span>)
|
23
|
+
<span class="ruby-keyword kw">end</span>
|
24
|
+
<span class="ruby-identifier">parent</span> = <span class="ruby-identifier">parent</span>.<span class="ruby-identifier">parent</span>
|
25
|
+
<span class="ruby-keyword kw">end</span>
|
26
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
27
|
+
<span class="ruby-keyword kw">end</span></pre>
|
28
|
+
</body>
|
29
|
+
</html>
|
@@ -0,0 +1,55 @@
|
|
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>process_normal (DNSTraverse::Referral)</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/referral.rb, line 344</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process_normal</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">"process "</span> <span class="ruby-operator">+</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_s</span> }
|
16
|
+
<span class="ruby-comment cmt"># if l = check_loop?(:ip => ip, :qname => @qname,</span>
|
17
|
+
<span class="ruby-comment cmt"># :qtype => @qtype, :qclass => @qclass) then</span>
|
18
|
+
<span class="ruby-comment cmt"># for ip in @serverips do</span>
|
19
|
+
<span class="ruby-comment cmt"># @responses[ip] = l</span>
|
20
|
+
<span class="ruby-comment cmt"># done</span>
|
21
|
+
<span class="ruby-comment cmt"># return</span>
|
22
|
+
<span class="ruby-comment cmt"># end</span>
|
23
|
+
<span class="ruby-comment cmt"># end</span>
|
24
|
+
<span class="ruby-keyword kw">for</span> <span class="ruby-identifier">ip</span> <span class="ruby-keyword kw">in</span> <span class="ruby-ivar">@serverips</span> <span class="ruby-keyword kw">do</span>
|
25
|
+
<span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span> { <span class="ruby-node">"Process normal #{ip}"</span> }
|
26
|
+
<span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ip</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^key:/</span> <span class="ruby-comment cmt"># resolve failed on something</span>
|
27
|
+
<span class="ruby-identifier">m</span> = <span class="ruby-keyword kw">nil</span>
|
28
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@refid</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-regexp re">/\./</span>).<span class="ruby-identifier">length</span> <span class="ruby-operator">>=</span> <span class="ruby-ivar">@maxdepth</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-keyword kw">then</span>
|
29
|
+
<span class="ruby-identifier">m</span> = <span class="ruby-constant">RuntimeError</span>.<span class="ruby-identifier">new</span> <span class="ruby-node">"Maxdepth #{@maxdepth} exceeded"</span>
|
30
|
+
<span class="ruby-keyword kw">end</span>
|
31
|
+
<span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span> { <span class="ruby-node">"Process normal #{ip} - making response"</span> }
|
32
|
+
<span class="ruby-identifier">r</span> = <span class="ruby-constant">DNSTraverse</span><span class="ruby-operator">::</span><span class="ruby-constant">Response</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:message</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">m</span>, <span class="ruby-identifier">:qname</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@qname</span>,
|
33
|
+
<span class="ruby-identifier">:qclass</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@qclass</span>, <span class="ruby-identifier">:qtype</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@qtype</span>,
|
34
|
+
<span class="ruby-identifier">:bailiwick</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@bailiwick</span>,
|
35
|
+
<span class="ruby-identifier">:infocache</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@infocache</span>, <span class="ruby-identifier">:ip</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ip</span>,
|
36
|
+
<span class="ruby-identifier">:decoded_query_cache</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@decoded_query_cache</span>)
|
37
|
+
<span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span> { <span class="ruby-node">"Process normal #{ip} - done making response"</span> }
|
38
|
+
<span class="ruby-ivar">@responses</span>[<span class="ruby-identifier">ip</span>] = <span class="ruby-identifier">r</span>
|
39
|
+
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">status</span>
|
40
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:restart</span>, <span class="ruby-identifier">:referral</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">"Process normal #{ip} - making referrals"</span> }
|
42
|
+
<span class="ruby-ivar">@children</span>[<span class="ruby-identifier">ip</span>] = <span class="ruby-identifier">make_referrals</span>(<span class="ruby-identifier">:qname</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">endname</span>,
|
43
|
+
<span class="ruby-identifier">:starters</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">starters</span>,
|
44
|
+
<span class="ruby-identifier">:bailiwick</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">starters_bailiwick</span>,
|
45
|
+
<span class="ruby-identifier">:infocache</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">infocache</span>,
|
46
|
+
<span class="ruby-identifier">:parent_ip</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ip</span>)
|
47
|
+
<span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span> { <span class="ruby-node">"Process normal #{ip} - done making referrals"</span> }
|
48
|
+
<span class="ruby-comment cmt"># XXX shouldn't be any children unless referrals</span>
|
49
|
+
<span class="ruby-comment cmt">#when :referral_lame then</span>
|
50
|
+
<span class="ruby-comment cmt">#@children[ip] = RuntimeError.new "Improper or lame delegation"</span>
|
51
|
+
<span class="ruby-keyword kw">end</span>
|
52
|
+
<span class="ruby-keyword kw">end</span>
|
53
|
+
<span class="ruby-keyword kw">end</span></pre>
|
54
|
+
</body>
|
55
|
+
</html>
|
@@ -0,0 +1,30 @@
|
|
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>make_referrals (DNSTraverse::Referral)</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/referral.rb, line 385</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">make_referrals</span>(<span class="ruby-identifier">args</span>) <span class="ruby-comment cmt"># :starters can be @root or our own list</span>
|
15
|
+
<span class="ruby-identifier">starters</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:starters</span>]
|
16
|
+
<span class="ruby-identifier">children</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
17
|
+
<span class="ruby-identifier">child_refid</span> = <span class="ruby-value">1</span>
|
18
|
+
<span class="ruby-keyword kw">for</span> <span class="ruby-identifier">starter</span> <span class="ruby-keyword kw">in</span> <span class="ruby-identifier">starters</span> <span class="ruby-keyword kw">do</span>
|
19
|
+
<span class="ruby-identifier">refargs</span> = {
|
20
|
+
<span class="ruby-identifier">:server</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">starter</span>[<span class="ruby-identifier">:name</span>],
|
21
|
+
<span class="ruby-identifier">:serverips</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">starter</span>[<span class="ruby-identifier">:ips</span>],
|
22
|
+
<span class="ruby-identifier">:refid</span> =<span class="ruby-operator">></span> <span class="ruby-node">"#{refid}.#{child_refid}"</span>
|
23
|
+
}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">args</span>)
|
24
|
+
<span class="ruby-identifier">children</span>.<span class="ruby-identifier">push</span> <span class="ruby-identifier">make_referral</span>(<span class="ruby-identifier">refargs</span>)
|
25
|
+
<span class="ruby-identifier">child_refid</span><span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
26
|
+
<span class="ruby-keyword kw">end</span>
|
27
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">children</span>
|
28
|
+
<span class="ruby-keyword kw">end</span></pre>
|
29
|
+
</body>
|
30
|
+
</html>
|
@@ -0,0 +1,24 @@
|
|
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>make_referral (DNSTraverse::Referral)</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/referral.rb, line 401</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">make_referral</span>(<span class="ruby-identifier">args</span>)
|
15
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-value str">"Must pass new refid"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:refid</span>]
|
16
|
+
<span class="ruby-identifier">refargs</span> = { <span class="ruby-identifier">:qname</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@qname</span>, <span class="ruby-identifier">:qclass</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@qclass</span>,
|
17
|
+
<span class="ruby-identifier">:qtype</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@qtype</span>, <span class="ruby-identifier">:nsatype</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@nsatype</span>, <span class="ruby-identifier">:infocache</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@infocache</span>,
|
18
|
+
<span class="ruby-identifier">:referral_resolution</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@referral_resolution</span>,
|
19
|
+
<span class="ruby-identifier">:resolver</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@resolver</span>, <span class="ruby-identifier">:maxdepth</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@maxdepth</span>, <span class="ruby-identifier">:parent</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">self</span>,
|
20
|
+
<span class="ruby-identifier">:decoded_query_cache</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@decoded_query_cache</span> }.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">args</span>)
|
21
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">Referral</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">refargs</span>)
|
22
|
+
<span class="ruby-keyword kw">end</span></pre>
|
23
|
+
</body>
|
24
|
+
</html>
|
@@ -0,0 +1,20 @@
|
|
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>replace_child (DNSTraverse::Referral)</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/referral.rb, line 411</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">replace_child</span>(<span class="ruby-identifier">before</span>, <span class="ruby-identifier">after</span>)
|
15
|
+
<span class="ruby-ivar">@children</span>.<span class="ruby-identifier">each_key</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">ip</span> <span class="ruby-operator">|</span>
|
16
|
+
<span class="ruby-ivar">@children</span>[<span class="ruby-identifier">ip</span>].<span class="ruby-identifier">map!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">equal?</span>(<span class="ruby-identifier">before</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">after</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">c</span> }
|
17
|
+
<span class="ruby-keyword kw">end</span>
|
18
|
+
<span class="ruby-keyword kw">end</span></pre>
|
19
|
+
</body>
|
20
|
+
</html>
|
@@ -0,0 +1,58 @@
|
|
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>stats_display (DNSTraverse::Referral)</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/referral.rb, line 417</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stats_display</span>(<span class="ruby-identifier">args</span>)
|
15
|
+
<span class="ruby-identifier">spacing</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:spacing</span>] <span class="ruby-operator">||</span> <span class="ruby-keyword kw">false</span>
|
16
|
+
<span class="ruby-identifier">results</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:results</span>] <span class="ruby-operator">||</span> <span class="ruby-keyword kw">true</span>
|
17
|
+
<span class="ruby-identifier">prefix</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:prefix</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">''</span>
|
18
|
+
<span class="ruby-identifier">indent</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:indent</span>] <span class="ruby-operator">||</span> <span class="ruby-node">"#{prefix} "</span>
|
19
|
+
<span class="ruby-identifier">first</span> = <span class="ruby-keyword kw">true</span>
|
20
|
+
<span class="ruby-ivar">@stats</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">sort!</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">key</span> <span class="ruby-operator">|</span>
|
21
|
+
<span class="ruby-identifier">data</span> = <span class="ruby-ivar">@stats</span>[<span class="ruby-identifier">key</span>]
|
22
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">spacing</span> <span class="ruby-keyword kw">and</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">first</span>
|
23
|
+
<span class="ruby-identifier">first</span> = <span class="ruby-keyword kw">false</span>
|
24
|
+
<span class="ruby-identifier">printf</span> <span class="ruby-node">"#{prefix}%5.1f%%: "</span>, <span class="ruby-identifier">data</span>[<span class="ruby-identifier">:prob</span>] <span class="ruby-operator">*</span> <span class="ruby-value">100</span>
|
25
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">data</span>[<span class="ruby-identifier">:response</span>]
|
26
|
+
<span class="ruby-identifier">referral</span> = <span class="ruby-identifier">data</span>[<span class="ruby-identifier">:referral</span>]
|
27
|
+
<span class="ruby-identifier">where</span> = <span class="ruby-node">"#{referral.server} (#{response.ip})"</span>
|
28
|
+
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">status</span>
|
29
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:exception</span>
|
30
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"#{response.exception_message} at #{where}"</span>
|
31
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:noglue</span>
|
32
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"No glue at #{referral.parent.server} "</span> <span class="ruby-operator">+</span>
|
33
|
+
<span class="ruby-node">"(#{response.ip}) for #{response.server}"</span>
|
34
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:error</span>
|
35
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"#{response.error_message} at #{where}"</span>
|
36
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:nodata</span>
|
37
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"NODATA (for this type) at #{where})"</span>
|
38
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:answered</span>
|
39
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"Answer from #{where}"</span>
|
40
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">results</span> <span class="ruby-keyword kw">then</span>
|
41
|
+
<span class="ruby-keyword kw">for</span> <span class="ruby-identifier">rr</span> <span class="ruby-keyword kw">in</span> <span class="ruby-identifier">data</span>[<span class="ruby-identifier">:response</span>].<span class="ruby-identifier">answers</span> <span class="ruby-keyword kw">do</span>
|
42
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"#{indent}#{rr}"</span>
|
43
|
+
<span class="ruby-keyword kw">end</span>
|
44
|
+
<span class="ruby-keyword kw">end</span>
|
45
|
+
<span class="ruby-keyword kw">else</span>
|
46
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"Stopped at #{where})"</span>
|
47
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"#{indent}#{key}"</span>
|
48
|
+
<span class="ruby-keyword kw">end</span>
|
49
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">status</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">:answered</span> <span class="ruby-keyword kw">and</span>
|
50
|
+
((<span class="ruby-identifier">response</span>.<span class="ruby-identifier">qname</span> <span class="ruby-operator">!=</span> <span class="ruby-ivar">@qname</span>) <span class="ruby-keyword kw">or</span> (<span class="ruby-identifier">response</span>.<span class="ruby-identifier">qclass</span> <span class="ruby-operator">!=</span> <span class="ruby-ivar">@qclass</span>) <span class="ruby-keyword kw">or</span>
|
51
|
+
(<span class="ruby-identifier">response</span>.<span class="ruby-identifier">qtype</span> <span class="ruby-operator">!=</span> <span class="ruby-ivar">@qtype</span>)) <span class="ruby-keyword kw">then</span>
|
52
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"#{indent}While querying #{response.qname}/"</span> <span class="ruby-operator">+</span>
|
53
|
+
<span class="ruby-node">"#{response.qclass}/#{response.qtype}"</span>
|
54
|
+
<span class="ruby-keyword kw">end</span>
|
55
|
+
<span class="ruby-keyword kw">end</span>
|
56
|
+
<span class="ruby-keyword kw">end</span></pre>
|
57
|
+
</body>
|
58
|
+
</html>
|
@@ -0,0 +1,111 @@
|
|
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>Class: DNSTraverse::ResolveError</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>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">DNSTraverse::ResolveError</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/dnstraverse/message_utility_rb.html">
|
59
|
+
lib/dnstraverse/message_utility.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
RuntimeError
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
|
86
|
+
</div>
|
87
|
+
|
88
|
+
|
89
|
+
<!-- if includes -->
|
90
|
+
|
91
|
+
<div id="section">
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<!-- if method_list -->
|
101
|
+
|
102
|
+
|
103
|
+
</div>
|
104
|
+
|
105
|
+
|
106
|
+
<div id="validator-badges">
|
107
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
108
|
+
</div>
|
109
|
+
|
110
|
+
</body>
|
111
|
+
</html>
|