[SNMP4J] Sending v1 and v2 traps to the same target

Frank Fock fock at agentpp.com
Sat Mar 10 22:55:21 CET 2007


Matthieu,

You can change the target's version as long as
the PDU you send is compatible with the version
and as long as the target is not used concurrently
in another thread.

Best regards,
Frank

Matthieu Casanova wrote:
> Hi, I would like to send v1 and v2 traps to the same target.
> buf if I do
> target.setVersion(SnmpConstants.version2c);
> I can send v2 traps but not v1 traps.
> Is it allowed to do something like that ?
> 
> if (pdu instanceof PDUv1)
>  target.setVersion(SnmpConstants.version1);
> else
>  target.serVersion(SnmpConstants.version2c);
> 
> before sending the trap or I really need to have two target ?
> 
> Matthieu
> _______________________________________________
> 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