blob: 905ecb816dd8bd6dfe16b032539155f145a249f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
lappend auto_path [pwd]
package require dns
# Use google's DNS
dns::configure -nameserver 8.8.8.8
puts "Resolve with udp"
set tok [dns::resolve www.tcl.tk]
puts status=[dns::status $tok]
puts address=[dns::address $tok]
puts names=[dns::name $tok]
dns::cleanup $tok
# Now with tcp
dns::configure -protocol tcp
puts "Resolve with tcp"
set tok [dns::resolve www.google.com]
puts status=[dns::status $tok]
puts address=[dns::address $tok]
puts names=[dns::name $tok]
dns::cleanup $tok
|