Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

[tcllib] dns::resolve and rbl-query
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


if I try www.google.it the dns query works well:
% set tok [dns::resolve www.google.it]
::dns::2
% dns::status $tok
ok


I also tried
dns::resolve {21.189.61.200.sbl-xbl.spamhaus.org}, and
dns::resolve "21.189.61.200.sbl-xbl.spamhaus.org" without changing
results.

Any hints about how to (not mis)use tcllib_dns in my case?


Thanks.


Ciao,
Giuseppe


--
"Guarda, una scimmia a tre teste!

Report this thread to moderator Post Follow-up to this message
Old Post
Giuppech
04-20-05 01:58 AM


Re: [tcllib] dns::resolve and rbl-query
Giuppech <apencil@tiscali.it> 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

Report this thread to moderator Post Follow-up to this message
Old Post
Pat Thoyts
04-21-05 09:00 PM


Re: [tcllib] dns::resolve and rbl-query
Il 2005-04-21, Pat Thoyts ha scritto:
> Giuppech <apencil@tiscali.it> writes:
> 
[...]

> % package require dns
> 1.2.1
[...]

Thanks for your answer and...
shame on me :-/

I found that my problem is archivied as closed-bug #1018934: "dns.tcl
incorrectly detecting query as a reverse lookup", fixed with
version 1.23 of dns.tcl, while I was using the "dns.tcl,v 1.22"...
now I've got the cvs version and all works fine.

Sorry for haven't find it before posting (I looked for), and thank
You again for your answer :-)


Ciao,
Giuseppe

--
"Guarda, una scimmia a tre teste!

Report this thread to moderator Post Follow-up to this message
Old Post
Giuppech
04-22-05 01:58 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Tcl archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:19 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.