[SNMP4J] How do I send a noAuthNoPriv INFORM?

Todd Wohlers twohlers at yahoo.com
Sat Dec 10 21:23:36 CET 2005


I am trying to send a noAuthNoPriv INFORM, but haven't
had much luck.  I have figured out how to send
authNoPriv and authPriv INFORMs, but not noAuthNoPriv.

Is a noAuthNoPriv INFORM supported by SNMP4J?

I tried the following, but UsmUser throws an exception
complaining that the passwords must be 8 characters. 
I didn't see a way to create or add a user name
without specifying passwords.  I also didn't see any
classes that predefined the OIDs for noAuth and noPriv
like AuthMD5.ID and PrivDES.IS, so I defined them
myself.

        UsmUser user = new UsmUser(new
OctetString("my-user"),
                    new OID("1.3.6.1.6.3.10.1.1.1"), 
//noAuth
                    null
                    new OID("1.3.6.1.6.3.10.1.2.1"), 
//noPriv
                    null);
        snmp.getUSM().addUser(new
OctetString("my-user"), createUser());

        Address targetAddress =
GenericAddress.parse("udp:localhost/162");
        UserTarget target = new UserTarget();
       
target.setSecurityLevel(SecurityLevel.NOAUTH_NOPRIV);
        target.setSecurityName(new
OctetString("my-user")),
        target.setVersion(SnmpConstants.version3);
        target.setAddress("1.2.3.4");

Thanks,

Todd

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the SNMP4J mailing list