Problems with DNS package in TCLLIB and the TCLUDP package
- From: Andrew Falanga <not_real@xxxxxx>
- Date: Wed, 31 Aug 2005 08:34:50 -0600
Hi,
I've verified this happens on both the Linux and Windows platforms. After installing the TCLUDP extension I try to perform DNS queries. I've been able to determine that UDP packets are being sent and received almost instantly but the data isn't being read in into memory (by TCL that is) until a dns query is performed using tcp. For example, below is what I'm seeing from tcl shell (the latest UDPTCL extension is loaded too, TCLUDP 1.0.7):
% package require dns 1.2.1 % set u_tok [dns::resolve ietf.org] ::dns::1 % dns::status $u_tok connect % dns::name $u_tok can't read "state(reply)": no such element in array % set t_tok [dns::resolve ieee.org -protocol tcp] ::dns::2 % dns::status $u_tok ok % dns::name $u_tok ietf.org % dns::status $t_tok ok % dns::name $t_tok ieee.org
As I've mentioned above, I've been able to verify that the requests are being sent and received using UDP but for some reason the event handler being setup in the dns.tcl script isn't being called until I do a query in TCP. Does anyone have any ideas? I've been crawling around in the guts of the dns.tcl script for a few hours now and haven't been able to determine much. Some interesting things would be I noticed that by default the UDP socket is placed in a blocking state but the TCP socket is non-blocking. The manual page for fileevent says that this is usually a bad idea for writing event driven stuff like this. I modified the dns.tcl script to place the UDP socket in a non-blocking mode but I still get the same result. So, does anyone have any ideas as to what's causing this?
Also note that although not shown above I'm NOT using localhost as my namesever.
--------------------------------------------- Andrew R. Falanga (a non-HP employee) Hewlett-Packard Company 11311 Chinden Blvd. Boise, Idaho --------------------------------------------- Please note: The e-mail address is purposely mangled. I do not wish my account at HP to become a spam haven. .
- Prev by Date: Re: img::ps: couldn't recognize data in image file
- Next by Date: Expect: resource cleanup
- Previous by thread: Trying to unravel a copy/paste puzzle
- Next by thread: Expect: resource cleanup
- Index(es):
Relevant Pages
|