Hi Frank,
I’ve got a question regarding to getSecurityName() of CommandResponderEvent class.
Scenario is:
I set a community & security name with addSnmpCommunityEntry() of SnmpCommunityMIB.
e.g. community is ‘comm-1’ and security name is ‘secName’.
I print log info in CommandProcessor -> processRequest() with ‘command.getSecurityName()’.
@Override
protected void processRequest(CommandResponderEvent command, CoexistenceInfo cinfo, RequestHandler<SnmpRequest> handler) {
LOGGER.info("SecurityName " + OctetString.fromByteArray(command.getSecurityName())
+ " SecurityModel " + command.getSecurityModel());
When I execute ‘snmpget -c comm-1 -v 2c 127.0.0.1 1.3.6.1.2.1.2.2.1.5.1’, I found the printed log info for ‘command.getSecurityName()’ is the community string ‘comm-1’, not the security name ‘secName’.
The ‘-c’ in net-snmp usage is for setting community string.
My expectation is ‘command.getSecurityName()’ could return the real security name ‘secName’ that corresponding to community string ‘comm-1’ in the snmpget command.
Would you please help to check, if this is my misunderstanding or any bug behind this behavior?
Very appreciated.
[vcapuser@localhost ~]$ snmpget
No hostname specified.
USAGE: snmpget [OPTIONS] AGENT OID [OID]...
Version: 5.7.2
Web: http://www.net-snmp.org/
Email: net-snmp-coders@lists.sourceforge.net
OPTIONS:
-h, --help display this help message
-H display configuration file directives understood
-v 1|2c|3 specifies SNMP version to use
-V, --version display package version number
SNMP Version 1 or 2c specific
-c COMMUNITY set the community string