Patch for mrtg-2.10.pre5 ?
Rafael Martinez Torres <[email protected]> Tue, 8 Jul 2003 16:46:39 +0200 (CEST)
| Newsgroups | gmane.network.mrtg.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi all there: I do present this patch to be applied into mrtg-2.10.pre5. Basically: * General terms: IPv6 is activated automatically only if libraries are present. So user does not need to know on new flags "--enable-ipv6", and what is most important, configuration file format does not need any new parameter. "EnableIPv6","ipv4only"... 100% compatible backwards and forward. (Before only forward) Control code is cleaner, and all the managment of underlying IP-Network is shift entirely into SNMP modules. (Except some DNS resolution needed at mrtg) ./cfgmaker [email protected] ./cfgmaker public@[2003:a044::10]:162 ./cfgmaker [email protected] * SNMP_Session : update Now the "ipv4only" at DNS resolution is considered as a "corner case", just as the "lenient_source_*_matching" flags. -$VERSION = '0.97'; +$VERSION = '0.98'; +### Default value for "query_only_IPv4" +### +### Set this to non-zero when, given a DNS Agent name, resolving +### into both IPv6 and IPv4 addresses, your agent does not implement +### the SNMP v6, but only SNMP v4. +### +my $query_only_IPv4=0; - if ($ipv4only || ! $SNMP_Session::ipv6available) { + if ( ! $SNMP_Session::ipv6available) { - @res = getaddrinfo($remote_hostname, $port, AF_UNSPEC, SOCK_DGRAM); + @res = getaddrinfo($remote_hostname, $port, ($query_only_IPv4?AF_INET:AF_UNSPEC()), SOCK_DGRAM); This implies: - The interface for SNMP module is restored respect to those of mrtg-2.9.X. The open($$$$) does not need an extra flag, as "ipv4only" was - Independence of the IP protocol for the rest of the MRTG files. * MRTG_lib.pm: Only the parser for new IPv6 addresses is kept. Don't need to know for any new flag on the mrtg.cfg file. * SNMP_util.pm, mrtg, cfgmaker: ditto. * doc files. updated. -- Attached file removed by Ecartis and put at URL below -- -- Type: application/octet-stream -- Size: 16k (16398 bytes) -- URL : http://www.ee.ethz.ch/~slist/p/mrtg-2.10.0pre5-20030707.diff.z -- Unsubscribe mailto:[email protected]?subject=unsubscribe Help mailto:[email protected]?subject=help Archive http://www.ee.ethz.ch/~slist/mrtg-developers