[SNMP4J] SecName values for v1v2Group
Saraswat, Deepak
deepak.saraswat at hp.com
Wed Jul 18 16:43:46 CEST 2007
Hi,
I have changed the security name (cpublic to public ) in the
addCommunities() function as in the code and there is no other place in
the code where I have used "cpublic" as secName. However, if I do a V2
Get or GetNext. I still saw a messages showing secName as "cpublic".
Why is it so???
Do we cached these values some places??
Thanks for the help and bearing with me as I am new a Snmp4j agent
api's.
Regards,
Deepak
1058767 [DefaultUDPTransportMapping_0.0.0.0/1611] DEBUG
org.snmp4j.agent.mo.snmp.SnmpCommunityMIB - Found coexistence info for
'public'=CoexistenceInfo[securityName=cpublic,contextEngineID=80:00:13:7
0:01:10:96:18:51,contextName=public,transportTag=]
1058767 [DefaultUDPTransportMapping_0.0.0.0/1611] DEBUG
org.snmp4j.agent.mo.snmp.SnmpCommunityMIB - Address 15.76.222.117/1551
passes filter, because transportTag is null
1058767 [RequestPool.0] DEBUG org.snmp4j.agent.mo.snmp.VacmMIB - Found
group name 'v1v2group' for secName 'cpublic and secModel 2
1058767 [RequestPool.0] DEBUG org.snmp4j.agent.mo.snmp.VacmMIB - Got
views
[DefaultMOMutableRow2PC[index=9.118.49.118.50.103.114.111.117.112.6.112.
117.98.108.105.99.0.1,values=[1, fullReadView, fullWriteView,
fullNotifyView, 3, 1]] for group name 'v1v2group'
1058767 [RequestPool.0] DEBUG org.snmp4j.agent.mo.snmp.VacmMIB -
Matching view found for group name 'v1v2group' is 'fullReadView'
Here is a code
==========
protected void addCommunities(SnmpCommunityMIB communityMIB) {
Variable[] com2sec = new Variable[] {
new OctetString("public"), // community name
new OctetString("public"), // security name
getAgent().getContextEngineID(), // local engine ID
new OctetString("public"), // default context name
new OctetString(), // transport tag
new Integer32(StorageType.nonVolatile), // storage type
new Integer32(RowStatus.active) // row status
};
MOTableRow row =
communityMIB.getSnmpCommunityEntry().createRow(
new OctetString("public2public").toSubIndex(true), com2sec);
communityMIB.getSnmpCommunityEntry().addRow(row);
// snmpCommunityMIB.setSourceAddressFiltering(true);
}
More information about the SNMP4J
mailing list