[PATCH] better getaddrinfo(3) support in ArgusAddHostList

Harry Bock harry at oshean.org
Fri Jul 10 13:12:52 EDT 2009


Oops, forgot to reply to all. Sorry!

On Fri, Jul 10, 2009 at 1:12 PM, Harry Bock <harry at oshean.org> wrote:

> Hi Carter,
>
> The purpose of this code is to make it so no matter how ArgusAddHostList
> queries the hostname of a remote Argus source, the hostname and addr fields
> are properly filled.  I need this so I can iterate over the ArgusRemoteHosts
> and ArgusActiveHosts queues to display information about them - whether they
> are connected, what's their hostname and what port is the Argus server on,
> what version is the server, etc.
>
> The problem was that if the getaddrinfo call was available,
> ArgusAddHostList would not bother filling in the hostname and addr members
> of the ArgusInput structure, which I'd like to have available no matter what
> system we're running on, for consistency's sake.
>
> In any case, one thing I'd like to see is the code to create an ArgusInput
> structure and fill in the remote host information without adding it to the
> ArgusRemoteHosts queue - mainly to get access to the ArgusInput pointer
> without worrying about a race condition, as right now I get at it by
> grabbing the end of the ArgusRemoteHosts queue after calling
> ArgusAddHostList.  I'd be happy to write and submit a patch today if you're
> okay with that goal.
>
> Harry
>
>
> On Fri, Jul 10, 2009 at 1:00 PM, Carter Bullard <carter at qosient.com>wrote:
>
>> Hey Harry,So, just to get context on what you're doing, what's the
>> problem and why is this a solution?
>> No problem with adding any code, just want to know what the goals are.
>>
>> Carter
>>
>> On Jul 10, 2009, at 12:33 PM, Harry Bock wrote:
>>
>> Hi Carter,
>>
>> Sorry for the lack of communication in recent weeks, but things have been
>> going very well in developing my Argus client.
>>
>> I hit a bit of a snag using ArgusAddHostList, where the resulting
>> ArgusInput structure does not fill in the 'hostname' or 'addr' fields when
>> using getaddrinfo(3) instead of gethostbyname(3).  Attached is a tested
>> patch against argus-clients-3.0.1-beta8 that provides support equivalent to
>> gethostbyname; it's small enough that hopefully it would still apply against
>> beta9, but I will rebase against that shortly anyway.
>>
>> Thanks,
>> Harry
>>
>> --
>> Harry Bock
>> Software Developer, Package Maintainer
>> OSHEAN, Inc.
>> Email: harry at oshean.org
>> PGP Key ID: 546CC353
>>  <argus_util.c.getaddrinfo.patch>
>>
>>
>>  Carter Bullard
>> CEO/President
>> QoSient, LLC
>> 150 E 57th Street Suite 12D
>> New York, New York  10022
>>
>> +1 212 588-9133 Phone
>> +1 212 588-9134 Fax
>>
>>
>>
>>
>
>
> --
> Harry Bock
> Software Developer, Package Maintainer
> OSHEAN, Inc.
> Email: harry at oshean.org
> PGP Key ID: 546CC353
>



-- 
Harry Bock
Software Developer, Package Maintainer
OSHEAN, Inc.
Email: harry at oshean.org
PGP Key ID: 546CC353
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist1.pair.net/pipermail/argus/attachments/20090710/f604b5d0/attachment.html>


More information about the argus mailing list