Advice on the lightweight resolver, lwres.
Dan Nelson
dnelson at allantgroup.com
Thu Mar 9 16:43:32 UTC 2006
In the last episode (Mar 09), othermark said:
> I was working on converting the STAF (staf.sourceforge.net) project
> to an freebsd port, and on my first attempt, I attempted to use the
> lightweight resolver library because of the thread safe functions
> _r() that were available.
>
> However once I finished a straight port, I found, that
> lwres_gethostbyname() always returns 61 (connection refused).
> Nothing ever shows up on tcpdump on any interface (yes, even lo0).
> Of course, just changing the netdb include and compiling without
> lwres works.
>
> example of slightly modified code from the staf project:
Are you running lwresd (the lwres lookup daemon)? Try trussing your
program:
socket(PF_INET,SOCK_DGRAM,17) = 3 (0x3)
connect(3,{ AF_INET 127.0.0.1:921 },16) = 0 (0x0)
According to the lwres manpage, lwresd needs to be running, and I'm
guessing it would listen on UDP port 921.
--
Dan Nelson
dnelson at allantgroup.com
More information about the freebsd-hackers
mailing list