a4dca0bf59
*** Security Fix *** Changes 5.3: *** Important Notes *** Several very significant changes have been made in Net-SNMP for this release that warrant special attention. - shared library version number no longer matches the release number. We now follow the versioning scheme recommended by libtool. For the 5.3 release this means that the libraries now have a SONAME ending with ".so.10", e.g. libnetsnmp.so.10. - snmpd has not been truncating log files at startup, as documented in the man pages, for a while now. This default behaviour has been restored. Please use the '-A' flag if you want to continue appending to your log files at startup. - snmptrapd will no longer accept all traps by default. It must be configured with authorized SNMPv1/v2c community strings and/or SNMPv3 users. Non-authorized traps/informs will be dropped. - Due to a copyright statement that didn't allow modifications, snmpnetstat has been completely rewritten. The new version now accepts the same command-line options as the other tools, which has introduced a number of incompatible changes. However, it does now finally support SNMPv3.
37 lines
1.4 KiB
Text
37 lines
1.4 KiB
Text
$NetBSD: patch-al,v 1.4 2006/01/24 22:16:55 adam Exp $
|
|
|
|
--- agent/mibgroup/host/hr_network.c.orig 2005-10-28 20:49:36.000000000 +0200
|
|
+++ agent/mibgroup/host/hr_network.c
|
|
@@ -193,6 +193,10 @@ static netsnmp_interface_entry *HRN_ifne
|
|
static char HRN_name[MAX_PHYSADDR_LEN];
|
|
static nmapi_phystat HRN_ifnet;
|
|
#define M_Interface_Scan_Next(a, b, c, d) Interface_Scan_Next(a, b, c)
|
|
+#elif defined darwin
|
|
+static char HRN_name[IFNAMSIZ];
|
|
+static struct if_msghdr HRN_ifnet;
|
|
+#define M_Interface_Scan_Next(a, b, c, d) Interface_Scan_Next(a, b, c, d)
|
|
#else /* hpux11 */
|
|
static char HRN_name[16];
|
|
#ifndef WIN32
|
|
@@ -222,7 +226,7 @@ int
|
|
Get_Next_HR_Network(void)
|
|
{
|
|
short HRN_index;
|
|
-#if !defined( solaris2) && ! defined( WIN32 )
|
|
+#if !defined(solaris2) && !defined(darwin) && !defined(WIN32)
|
|
if (M_Interface_Scan_Next(&HRN_index, HRN_name, &HRN_ifnet, NULL) == 0)
|
|
HRN_index = -1;
|
|
#else
|
|
@@ -245,7 +249,11 @@ Save_HR_Network_Info(void)
|
|
HRN_savedFlags = HRN_ifnet.if_entry.ifOper;
|
|
HRN_savedErrors = HRN_ifnet.if_entry.ifInErrors +
|
|
HRN_ifnet.if_entry.ifOutErrors;
|
|
-#else /* hpux11 */
|
|
+#elif defined(__APPLE__)
|
|
+ HRN_savedFlags = HRN_ifnet.ifm_flags;
|
|
+ HRN_savedFlags = HRN_ifnet.ifm_data.ifi_ierrors +
|
|
+ HRN_ifnet.ifm_data.ifi_oerrors;
|
|
+#else
|
|
#ifndef WIN32
|
|
HRN_savedFlags = HRN_ifnet.if_flags;
|
|
HRN_savedErrors = HRN_ifnet.if_ierrors + HRN_ifnet.if_oerrors;
|