Posted to tcl by patthoyts at Wed Nov 05 11:40:00 GMT 2008view raw

  1. (Release) 1 % wm with .
  2. (Release) 2 % package require dns
  3. 1.3.2
  4. (Release) 3 % dns::configure
  5. -loglevel warn -nameserver 172.16.5.103 -port 53 -protocol udp -search {} -timeout 30000
  6. (Release) 4 % proc Result {tok} {if {[dns::status $tok] eq "ok"} { puts "ok [dns::result $tok]"} else {puts "error: [dns::error $tok]" } ; dns::cleanup $tok}
  7. (Release) 5 % dns::resolve www.google.com -command Result
  8. ::dns::1
  9. ok {name www.google.com type CNAME class IN ttl 15659 rdlength 8 rdata www.l.google.com} {name www.l.google.com type A class IN ttl 300 rdlength 4 rdata 66.102.9.104} {name www.l.google.com type A class IN ttl 300 rdlength 4 rdata 66.102.9.147} {name www.l.google.com type A class IN ttl 300 rdlength 4 rdata 66.102.9.99}
  10. (Release) 6 %