[AGENT++] SNMP-COMMUNITY-MIB help needed.
Piotr Grudzinski
piotr at powersmiths.com
Fri May 11 17:54:54 CEST 2018
Hello,
Here is some code from: Agent++\agent++-4.1.1\agenpro\simagent\src\agent.cpp
void init(Mib& mib)
{
mib.add(new simSysGroup());
mib.add(new snmpGroup());
mib.add(new agentpp_simulation_mib());
mib.add(new TestAndIncr(oidSnmpSetSerialNo));
mib.add(new snmp_target_mib());
// Not added by default:
// mib.add(new snmp_community_mib());
mib.add(new snmp_notification_mib());
#ifdef _SNMPv3
UsmUserTable *uut = new UsmUserTable();
With the line:
mib.add(new snmp_community_mib());
included the compiler fails if _SNMPv3 is not defined.
There are two confusing things:
1. The code above indicates the snmp_community_mib can be used
without _SNMPv3 being defined.
2. Looking inside agent_pp/snmp_community_mib.h gives me an impression
that something is incorrect. Nothing will be included if _SNMPv3 is
not defined but at the same time there is another #ifdef _SNMPv3
inside the first one ( in the snmpTargetAddrExtEntry class).
So, the question is: can the snmp_community_mib class be used without
_SNMPv3 being defined?
Regards,
Piotr
More information about the AGENTPP
mailing list