[collectd] dns plugin patch

Amit Gupta amit.gupta221 at gmail.com
Mon Feb 15 14:50:26 CET 2010


On Wed, Feb 10, 2010 at 7:04 PM, Florian Forster <octo at verplant.org> wrote:

> Hi Amit,
>
> On Wed, Feb 10, 2010 at 05:13:22PM +0530, Amit Gupta wrote:
> > There seems to be two issues:
> > - s_addr member already exists in netinet/in.h on Solaris/OpenSolaris
> >   and thus changing the variable name in utils_dns.c will fix this
> >   issue.
>
> > -    struct in6_addr s_addr;
> > +    struct in6_addr saddr;
> >      struct in6_addr d_addr;
>
> okay. Could you rename "s_addr" to "src_addr" and "d_addr" to "dst_addr"
> then?
>
Will do that.

>
> > - struct ip6_ext is defined in netinet/ip_compat.h for Solaris
> >   10/OpenSolaris and thus needs to be included in utils_dns.c.
>
> > +#define SOLARIS2 10
>
> What does this define do? Can you document that in the code so the
> casual reader knows what's going on?
>
This is needed by ip_compat.h on solaris to include the right structures and
include files for a particular version of solaris. I am thinking of moving
this define to the config.h.in and its value will be the solaris version
(extracted from $host_os)

>
> > +#include <netinet/ip_compat.h>
>
> That file isn't available under Debian Linux. Could you find out if
> that file needs to be included before / after some other file (there are
> such limitations under BSD for other netinet/*.h files) and add an
> appropriate check to the configure script?
>
I am not sure about this. I will try to figure out.

>
> >  # include <netinet/in_systm.h>
>
> It's probably a good idea to base the check for <netinet/ip_compat.h> on
> the check for <netinet/in_systm.h>.
>
Does including the ip_compat.h under "#if KERNEL_SOLARIS" makes sense given
that this is a solaris specific fix?

Regards
Amit

>
> Regards,
> —octo
> --
> Florian octo Forster
> Hacker in training
> GnuPG: 0x91523C3D
> http://verplant.org/
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFLcrYDHdggu3Q05IYRAkJkAJ9LszoIK6RyRJU/WT3Tfk9s2Vl8tQCfT9EG
> zIsbFjT5pjrqTdArnxJK6Tk=
> =VPQq
> -----END PGP SIGNATURE-----
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.verplant.org/pipermail/collectd/attachments/20100215/1405aa63/attachment.htm 


More information about the collectd mailing list