On 08/28/2009 11:59 PM, Thomas Anders wrote:
> At the very least, NETSNMP_NO_LEGACY_DEFINITIONS is used at quite a few
> places already for exactly the same purpose as discussed here.
> I don't think it's the best time to introduce something that's inconsistent
> with the current approach that late in the release cycle.
>
> Are you willing to propose a revised version of the patch to get my vote?
> :-)
sure, here is second version of the patch, now with
NETSNMP_NO_LEGACY_DEFINITIONS
apcupsd has to be compiled with -DNETSNMP_NO_LEGACY_DEFINITIONS, but that's
something I can manage and I'll let them know.
Jan
---
net-snmp/agent/mibgroup/smux/snmp_bgp.c | 2 +-
net-snmp/agent/mibgroup/smux/snmp_ospf.c | 2 +-
net-snmp/agent/mibgroup/smux/snmp_rip2.c | 2 +-
net-snmp/include/net-snmp/library/mib.h | 6 +++++-
4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/net-snmp/agent/mibgroup/smux/snmp_bgp.c
b/net-snmp/agent/mibgroup/smux/snmp_bgp.c
index 6f626fa..70596a1 100644
--- a/net-snmp/agent/mibgroup/smux/snmp_bgp.c
+++ b/net-snmp/agent/mibgroup/smux/snmp_bgp.c
@@ -100,7 +100,7 @@ struct variable13 bgp_variables[] = {
var_bgp, 3, {5, 1, 6}}
};
-oid bgp_variables_oid[] = { MIB, 15 };
+oid bgp_variables_oid[] = { NETSNMP_MIB2_OID, 15 };
void
init_snmp_bdp(void)
diff --git a/net-snmp/agent/mibgroup/smux/snmp_ospf.c
b/net-snmp/agent/mibgroup/smux/snmp_ospf.c
index fcebce4..73f0e43 100644
--- a/net-snmp/agent/mibgroup/smux/snmp_ospf.c
+++ b/net-snmp/agent/mibgroup/smux/snmp_ospf.c
@@ -275,7 +275,7 @@ struct variable13 ospf_variables[] = {
var_ospf, 3, {14, 1, 6}}
};
-oid ospf_variables_oid[] = { MIB, 14 };
+oid ospf_variables_oid[] = { NETSNMP_MIB2_OID, 14 };
void
init_snmp_ospf(void)
diff --git a/net-snmp/agent/mibgroup/smux/snmp_rip2.c
b/net-snmp/agent/mibgroup/smux/snmp_rip2.c
index 6952ca7..b987a09 100644
--- a/net-snmp/agent/mibgroup/smux/snmp_rip2.c
+++ b/net-snmp/agent/mibgroup/smux/snmp_rip2.c
@@ -103,7 +103,7 @@ struct variable13 rip2_variables[] = {
var_rip2, 3, {4, 1, 6}}
};
-oid rip2_variables_oid[] = { MIB, 23 };
+oid rip2_variables_oid[] = { NETSNMP_MIB2_OID, 23 };
void
init_snmp_rip2(void)
diff --git a/net-snmp/include/net-snmp/library/mib.h
b/net-snmp/include/net-snmp/library/mib.h
index 8c1003e..299f310 100644
--- a/net-snmp/include/net-snmp/library/mib.h
+++ b/net-snmp/include/net-snmp/library/mib.h
@@ -36,7 +36,11 @@ SOFTWARE.
#include <net-snmp/mib_api.h>
-#define MIB 1, 3, 6, 1, 2, 1
+#define NETSNMP_MIB2_OID 1, 3, 6, 1, 2, 1
+
+#ifndef NETSNMP_NO_LEGACY_DEFINITIONS
+#define MIB NETSNMP_MIB2_OID
+#endif
#define MIB_IFTYPE_OTHER 1
#define MIB_IFTYPE_REGULAR1822 2
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders