AcmChecker(SnmpMibRequest req) { engine = (SnmpEngineImpl) req.getEngine(); //We are in V3 architecture, ACM is in the picture. if(engine != null) { if(engine.isCheckOidActivated()) { try { if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) { SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpMib.class.getName(), "AcmChecker(SnmpMibRequest)", "SNMP V3 Access Control to be done"); } model = (SnmpAccessControlModel) engine.getAccessControlSubSystem(). getModel(SnmpDefinitions.snmpVersionThree); principal = req.getPrincipal(); securityLevel = req.getSecurityLevel(); pduType = req.getPdu().type; version = req.getRequestPduVersion(); securityModel = req.getSecurityModel(); contextName = req.getAccessContextName(); l = new LongList(); if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) { final StringBuilder strb = new StringBuilder() .append("Will check oid for : principal : ") .append(principal) .append("; securityLevel : ").append(securityLevel) .append("; pduType : ").append(pduType) .append("; version : ").append(version) .append("; securityModel : ").append(securityModel) .append("; contextName : ").append(contextName); SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpMib.class.getName(), "AcmChecker(SnmpMibRequest)", strb.toString()); } }catch(SnmpUnknownModelException e) { if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) { SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpMib.class.getName(), "AcmChecker(SnmpMibRequest)", "Unknown Model, no ACM check."); } } } } }
/** * Removes a model from this sub system. * @param id The model ID to remove. * @return The removed model. */ public SnmpModel removeModel(int id) throws SnmpUnknownModelException;
/** * Gets a model from this sub system. * @param id The model ID to get. * @return The model. */ public SnmpModel getModel(int id) throws SnmpUnknownModelException;