Re: [tcllib] dns::resolve and rbl-query
- From: Pat Thoyts <cng@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 21 Apr 2005 13:43:05 GMT
Giuppech <apencil@xxxxxxxxxx> writes:
>Hi all,
>I'm new in tcl (and in programming too, to be honest), so, if
>my question is not so interesting, please be patient :-)
>
>
>I'm trying to do a dns query using the tcllib_dns with the fqdn:
>21.189.61.200.sbl-xbl.spamhaus.org
>
>doing a query with dig or with nslookup gives me the right answer
>(at the moment I'm writing the ip 200.61.189.21 IS present in
>sbl-xbl.spamhaus.org); but with tcl I have this:
>
>% package require dns
>1.2.0
>% set tok [dns::resolve 21.189.61.200.sbl-xbl.spamhaus.org]
>::dns::1
>% dns::status $tok
>error
% package require dns
1.2.1
% set tok [dns::resolve dns://london/21.189.61.200.sbl-xbl.spamhaus.org]
::dns::1
% dns::status $tok
ok
% dns::result $tok
{name 21.189.61.200.sbl-xbl.spamhaus.org type A class IN ttl 3600
rdlength 4 rdata 127.0.0.6} {name 21.189.61.200.sbl-xbl.spamhaus.org
type A class IN ttl 3600 rdlength 4 rdata 127.0.0.4}
The above DNS URL syntax is equivalent to using
dns::configure -nameserver london
It isn't obvious if you are using tcp or udp. Some servers will only
work with UDP so that might be an answer. Get the tcludp package for
udp support. The DNS package will use UDP if it can find tcludp.
You might try dns::error $tok to see what the error information is.
--
Pat Thoyts http://www.patthoyts.tk/
To reply, rot13 the return address or read the X-Address header.
PGP fingerprint 2C 6E 98 07 2C 59 C8 97 10 CE 11 E6 04 E0 B9 DD
.
- Follow-Ups:
- Re: [tcllib] dns::resolve and rbl-query
- From: Giuppech
- Re: [tcllib] dns::resolve and rbl-query
- References:
- [tcllib] dns::resolve and rbl-query
- From: Giuppech
- [tcllib] dns::resolve and rbl-query
- Prev by Date: Re: tcllib: C extensions + tcl code ?
- Next by Date: Re: Airport Display
- Previous by thread: [tcllib] dns::resolve and rbl-query
- Next by thread: Re: [tcllib] dns::resolve and rbl-query
- Index(es):
Relevant Pages
|