[AGENT++] Turning off snmpv3 - Problems in agentx++
Andreas Pokorny
diemumiee at gmx.de
Wed Mar 17 17:33:20 CET 2004
Hi there,
Since we dont need SNMPv3 in our product, I tried to turn it off.
I added -D_NO_SNMPv3 to the flags in agent++ snmp++ and agentX++
Compiling worked fine for snmp++ and agent++. But there where problems
in agentX++.
In the file agentx.cpp in boolean AgentXMaster::validate_address,
compilation stops at
if ((snmpTargetAddrEntry::instance) && (snmpTargetAddrExtEntry::instance))
snmpTargetAddrExtEntry is part of agent++/snmp_community_mib.h,
but due to the definition of _NO_SNMPv3 the class is not available.
So i did the following:
if ((snmpTargetAddrEntry::instance)
#ifdef SNMPv3
&& (snmpTargetAddrExtEntry::instance)
#endif
)
{
#ifdef SNMPv3
if (snmpTargetAddrExtEntry::instance->passes_filter(fromAddress, tag))
{
#endif
delete tags;
return TRUE;
#ifdef SNMPv3
}
#endif
}
It compiles, but now i would like to know if I broke the behaviour of
the library.
Regards
Andreas Pokorny
More information about the AGENTPP
mailing list