[SNMP4J] Agent send a V3 trap
Frank Fock
fock at agentpp.com
Wed Jul 25 01:54:29 CEST 2007
Hi Deepak,
MessageProcessingModel.MPv2c is 1 whereas the SNMP-TARGET-MIB
requires 2 for SNMPv2c. That's the error.
Best regards,
Frank
Saraswat, Deepak wrote:
> Hi All,
>
>
>
> I have just installed a Snmp4j agent and tries to send a Cold start trap
> and found out that it always send a V3 trap. However, I have added a
> target with MPv2c processing model. How to change it's configuration to
> send V1/V2 trap by default. I also found that when I added this target
> it was got added as a V2 target as shown in the code but during
> retrieval it got Message processing model to be MPV3.
>
>
>
> Thanks for the help in advance,
>
> Regards
>
> Deepak
>
>
>
> Here is the target adding code:
>
>
>
> protected void addNotificationTargets(SnmpTargetMIB targetMIB,
>
> SnmpNotificationMIB
> notificationMIB) {
>
> targetMIB.addDefaultTDomains();
>
>
>
> targetMIB.addTargetAddress(new OctetString("notification"),
>
> TransportDomains.transportDomainUdpIpv4,
>
> new OctetString(new
> UdpAddress("15.76.222.130/162").getValue()),
>
> 200, 1,
>
> new OctetString("notify"),
>
> new OctetString("v2c"),
>
> StorageType.permanent);
>
> targetMIB.addTargetParams(new OctetString("v2c"),
>
> MessageProcessingModel.MPv2c,
>
> SecurityModel.SECURITY_MODEL_SNMPv2c,
>
> new OctetString("cpublic"),
>
> SecurityLevel.NOAUTH_NOPRIV,
>
> StorageType.permanent);
>
> notificationMIB.addNotifyEntry(new OctetString("default"),
>
> new OctetString("notify"),
>
>
> SnmpNotificationMIB.SnmpNotifyTypeEnum.trap,
>
> StorageType.permanent);
>
> }
>
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j
--
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com
More information about the SNMP4J
mailing list