[Nagiosplug-devel] feature request -selecting yournetwork interface
Thomas Guyot-Sionnest
Thomas at zango.com
Fri Sep 29 20:47:05 CEST 2006
Only thing here is that I'm not what you can call a C programmer at all. I
do some Perl, I learned the basis of C some time ago... The hack for
check_ping was trivial as I only redirected an argument to another program.
And even for that simple hack I managed to segfault before getting it right
(I was checking for valid IP address though).
If you really insist and encourage me I'll try it :) But for now I don't
even have an idea how to set the source IP on a socket...
Thomas
> -----Original Message-----
> From: nagiosplug-devel-bounces at lists.sourceforge.net
> [mailto:nagiosplug-devel-bounces at lists.sourceforge.net] On
> Behalf Of Andreas Ericsson
> Sent: September 29, 2006 11:30
> To: Nagios Plugin Development Mailing List
> Subject: Re: [Nagiosplug-devel] feature request -selecting
> yournetwork interface
>
> Thomas Guyot-Sionnest wrote:
> >
> > Using Linux VLAN support I'd like to be able to have one IP
> per VLAN and
> > check all interconectivity between vlans and other sites.
> So for example I
> > may want to know if hosts in the .7 vlan can connect to the
> mail server in
> > the .4 vlan, but since I have an IP in the .4 vlan already
> it won't go
> > trough the firewall. So I must specify to sent it from the .7 vlan.
> >
>
> Ah. This makes your request make sense. If you wish for the outbound
> traffic to go through a specific interface, that's very easy
> to fix. You
> just need to bind(2) the socket to an IP specified by the
> user prior to
> calling connect(2) on it. The IP ofcourse have to exist and be
> associated with the interface you want to use for the
> outbound traffic.
>
> Provided you don't have two interfaces with the same IP (which would
> indeed be completely insane), this will work magnificently while
> avoiding the portability problems associated with finding a specific
> interface (have a look at check_dhcp for some true
> portability horror).
>
> Happy hacking, and make sure you send in the patch when you're done.
>
> --
> Andreas Ericsson andreas.ericsson at op5.se
> OP5 AB www.op5.se
> Tel: +46 8-230225 Fax: +46 8-230231
>
> --------------------------------------------------------------
> -----------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the
> chance to share your
> opinions on IT & business topics through brief surveys -- and
> earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge
> &CID=DEVDEV
> _______________________________________________________
> Nagios Plugin Development Mailing List
> Nagiosplug-devel at lists.sourceforge.net
> Unsubscribe at
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
> ::: Please include plugins version (-v) and OS when reporting
> any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3022 bytes
Desc: not available
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20060929/21ecbe71/attachment.bin>
More information about the Devel
mailing list