[SNMP4J] About SNMP4J

Frank Fock fock at agentpp.com
Wed Feb 23 01:34:46 CET 2005


Hi Mauricio,

Please find my comments inline:

Mauricio Reyes wrote:

> 1. I need to build a Java program that calculates some statistics from 
> v3 traps received from net-snmp program. The idea is to have one 
> thread to listen to incoming traps and another thread to issue some 
> traps to a manager station, and on top of this two is the program I 
> need to build. Would SNMP4J work like this?
>
Yes.

> 2. Can SNMP4J send and receive SNMPv3 traps from net-snmp?
>
Yes.

> 3. I've been trying to test if SNMPv3 traps (I need them to be 
> authPriv traps, with authentication and encryption) are received with 
> the tool provided, like this:
>
> C:\Documents and 
> Settings\Nest\Desktop\test\snmp4j\snmp4j_tool\snmp4j_tool>SNMP4
> J -a MD5 -A nbaprueba -x DES -X nbaprueba -u nbatest -Ol 0.0.0.0/162
>
> But I get this message:
>
>    -Xmixed           mixed mode execution (default)
>    -Xint             interpreted mode execution only
>    

[snip]

>    -Xcheck:jni       perform additional checks for JNI functions
>
> The -X options are non-standard and subject to change without notice.
>
> And the program quits. How can I solve this? I need to receive SNMPv3 
> traps. For SNMPv2c traps it works fine. Am I missing something?
>
The -X option seems to be interpreted by the Java Virtual Machine.
You can either try to run the application using "java -jar SNMP4J.jar 
[options...]"
or at last resort, rename the -X parameter in the code and recompile it.
I will provide an alternate option name for the encryption passphrase in the
next release.

> 4. How can I send and receive traps from within the code?
>
Take a look at the JavaDoc of the Snmp class for an example.

Best regards,
Frank




More information about the SNMP4J mailing list