Hi, as Dave suggested, here is attempt to rename MIB to NETSNMP_MIB2_OID. Notice I did not rename any other identifier in the header file, IMHO it's a bit late now. And I am still a bit confused what is internal and public API - there is plenty of identifiers which are now pulled by snmp_client.h and which do not have netsnmp_ prefix and are generic enough that they could conflict with an application - like get_tree(), get_node(), struct variable_list etc.
Anyway, that's definitely different story, let's focus on fixing immediate problems with 5.5.rc2. With the patch below, apcupsd compiles successfully. I don't think that suggested NETSNMP_NO_LEGACY_DEFINITIONS is good idea - the application would see the old identifiers by default. IMHO it is better to advertise the new ones and show the old only if application (or its packager) explicitly ask so. Signed-off-by: Jan Safranek <[email protected]> --- 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..bce0813 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 + +#ifdef NETSNMP_COMPAT_5_4 +#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
