Ethereal-users: Re: [Ethereal-users] Ethereal Lockup on Linux

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxx>
Date: Tue, 5 Dec 2000 13:07:30 -0800 (PST)
> Guy Harris wrote:
> > 
> > happens irritatingly often - Ethereal tries to look up the host name,
> > calls "gethostbyname()" to look it up, the DNS resolver sends out a
> > request, and takes a Good Long Time to time out.
> 
> Would it be worth using one of the asynchronous resolver libraries like
> adns instead of gethostbyname()?

Sure, if they can use NIS as well as DNS....

(I.e., we don't want to directly use a *resolver library* to look up
host names, we want to use the OS's native interface, so that we don't
make possibly-incorrect assumptions about the way name lookups are done
on the machine in question.)

Another possibility would be to have a child process whose job is to do
DNS lookups, and to which we send messages over a pipe and from which we
receive replies over a pipe; with that, at least, we could put that pipe
in the list of file descriptors in the GTK+ main loop so that the GUI
doesn't lock up whilst doing a name lookup.

Doing that, however, would require that, whilst in the middle of doing a
name lookup, we're never in a state where doing something with the GUI
would cause a problem - e.g., we'd better be able to handle user input
while we're halfway through dissecting a packet.