[SNMP4J] community name in agent
Jeff Ramin
ramin at berbee.com
Wed Jul 30 16:17:29 CEST 2008
As I've posted before, I'm trying to figure out how to change the
community name of an existing MOServer...
I've been looking at the source code, and came across this method
in the TestAgent:
protected void addCommunities(SnmpCommunityMIB communityMIB) {
Variable[] com2sec = new Variable[] {
new OctetString("public"), // community name
new OctetString("cpublic"), // 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);
}
Is this how a community name is added/changed in an existing agent?
I was hoping it would be a simple setCommunityName(String) type of call,
but apparently not.
Is there any documentation that explains the various objects above? Things
like "security name", "local engine id", "context name", etc. don't mean
anything to me. I'd like to understand the relationship between these
objects/concepts, but looking at the javadoc doesn't suffice.
Thanks!
--
Jeffrey Ramin
Berbee
ramin at berbee.com
608.298.1024
More information about the SNMP4J
mailing list