1 20 21 22 23 24 25 package org.snmp4j.security; 26 27 import java.io.*; 28 import org.snmp4j.mp.StatusInformation; 29 import org.snmp4j.smi.OctetString; 30 import org.snmp4j.smi.Integer32; 31 import org.snmp4j.asn1.BERInputStream; 32 import org.snmp4j.mp.SnmpConstants; 34 import org.snmp4j.asn1.BEROutputStream; 35 36 42 public interface SecurityModel { 43 44 int SECURITY_MODEL_ANY = 0; 45 int SECURITY_MODEL_SNMPv1 = 1; 46 int SECURITY_MODEL_SNMPv2c = 2; 47 int SECURITY_MODEL_USM = 3; 48 49 59 int getID(); 60 61 67 SecurityParameters newSecurityParametersInstance(); 68 69 75 SecurityStateReference newSecurityStateReference(); 76 77 110 int generateRequestMessage(int messageProcessingModel, 111 byte[] globalData, 112 int maxMessageSize, 113 int securityModel, 114 byte[] securityEngineID, 115 byte[] securityName, 116 int securityLevel, 117 BERInputStream scopedPDU, 118 SecurityParameters securityParameters, 120 BEROutputStream wholeMsg) throws IOException; 121 122 158 int generateResponseMessage(int messageProcessingModel, 159 byte[] globalData, 160 int maxMessageSize, 161 int securityModel, 162 byte[] securityEngineID, 163 byte[] securityName, 164 int securityLevel, 165 BERInputStream scopedPDU, 166 SecurityStateReference securityStateReference, 167 SecurityParameters securityParameters, 169 BEROutputStream wholeMsg) throws IOException; 170 171 214 int processIncomingMsg(int messageProcessingModel, 215 int maxMessageSize, 216 SecurityParameters securityParameters, 217 SecurityModel securityModel, 218 int securityLevel, 219 BERInputStream wholeMsg, 220 OctetString securityEngineID, 221 OctetString securityName, 222 BEROutputStream scopedPDU, 224 Integer32 maxSizeResponseScopedPDU, 225 SecurityStateReference securityStateReference, 226 StatusInformation statusInfo) throws IOException; 227 228 } 229 230 | Popular Tags |