On 2013-09-13, Kapetanakis Giannis <bil...@edu.physics.uoc.gr> wrote:
> On 13/09/13 17:36, Otto Moerbeek wrote:
>> ------------------------------------
>>
>> the program uses the following:
>> sendto(resfd, msg, len, 0, (struct sockaddr *)
>> &(_res.nsaddr_list[i]), sizeof(struct sockaddr))
>>
>> instead of sending requests to 192.168.0.1 it sends them to
>> 127.0.0.1 (from tcpdump)
>>
>> any further help/hints would be appreciated.
>>
>> G
>> Well, don't use _res bu use the results of e.g. gethostbyname();
>>
>>      -Otto
>>
>
> Well that would break the async resolver of the program and I guess it 
> would also make it slow
> since we're talking about many connections/sec
>
> Furthermore, it's not my code and this interface is used a lot in the 
> program to alter it in such a way.

the ISC resolver is available in ports/net/libbind, this is used in some
ports which fiddle with resolver internals in _res (e.g. net/mtr).

Reply via email to