[collectd] [PATCH] Interface option for network plugin

Max Henkel henkel at gmx.at
Sun Mar 14 13:09:40 CET 2010

Hello Sebastian and list!

On Tue, Mar 09, 2010 at 06:29:34PM +0100, Sebastian Harl wrote:
> On Tue, Mar 09, 2010 at 06:17:35PM +0100, Florian Forster wrote:
> > On Fri, Feb 26, 2010 at 12:49:02PM +0100, Max Henkel wrote:
> > > +		if (! IN_MULTICAST (ntohl (addr->sin_addr.s_addr)))
> > > +			return (0);
> > 
> > Doesn't it make sense to be able to set the interface in unicast mode,
> > too? For example if the host has multiple default gateways. The
> > socket(7) option "SO_BINDTODEVICE" could be used for this I guess.
> Please note that, iIrc, that option is Linux-specific. Not sure whether
> that also applies to the patch proposed by Max, though.

Thanks for the remark! The SO_BINDTODEVICE just wandered inside one
more #if block. ;-)

The patch itself tries to have a fallback to the current behaviour,
if the target platform wouldn't support the requested functionality.
Thus the patch shouldn't be Linux-specific, but if possible use the
available functionality.

Best regards,

< henkel at gmx dot at >

More information about the collectd mailing list