|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.adventnet.snmp.snmp2.SnmpACM
|
+--com.adventnet.snmp.snmp2.vacm.SnmpVacm
This class is used for VACM implementation and provides the method "isAccessAllowed" which does the access verifications. The access verifications are performed, only if the vacmUsed flag is set true. The method setVacmUsed, is used to set the vacmUsed flag. The constructor takes the SnmpAPI as a parameter. This is required as the SnmpAPI has a reference to the vacm tables i.e., VacmContextTable, VacmGroupTable, VacmGroupAccessTable and VacmViewTreeTable. The api user need not instantiate these four tables, as the SnmpAPI instantiates them. The SnmpAPI provides methods to get a reference to these tables. Before the "isAccessAllowed method" is called in, the vacm tables should have the necessary configuration.
| Field Summary | |
static int |
ACCESS_ALLOWED
Constant value for AccessAllowed |
(package private) VacmAccessEntry |
accessEntry
|
static byte |
AUTH_NO_PRIV
Used to specify that authenticated message be sent to the peer. |
static byte |
AUTH_PRIV
Used to specify that authentication and privacy are used in the communication with the peer. |
(package private) VacmContextEntry |
contextEntry
|
(package private) byte[] |
contextName
The contextName used for processing the isAccessAllowed. |
(package private) VacmContextTable |
contextTable
|
(package private) VacmFamilyEntry |
familyEntry
|
(package private) VacmGroupAccessEntry |
groupAccessEntry
|
(package private) VacmGroupAccessTable |
groupAccessTable
|
(package private) VacmGroupEntry |
groupEntry
|
(package private) byte[] |
groupName
|
(package private) VacmGroupTable |
groupTable
|
static int |
NO_ACCESS_ENTRY
Constant value for noAccessEntry |
static byte |
NO_AUTH_NO_PRIV
Used to specify that both authentication and privacy are not used. |
static int |
NO_GROUP_NAME
Constant value for noGroupName |
static int |
NO_SUCH_CONTEXT
Constant value for noSuchContext |
static int |
NO_SUCH_VIEW
Constant value for noSuchView |
static int |
NOT_IN_VIEW
Constant value for notInView |
(package private) int[] |
OID
|
static int |
OTHER_ERROR
Constant value for otherError |
(package private) SnmpPDU |
rpdu
|
(package private) byte |
securityLevel
The SecurityLevel used for processing the isAccessAllowed. |
(package private) int |
securityModel
The SecurityModel used for processing the isAccessAllowed. |
(package private) byte[] |
securityName
The SecurityName used for processing the isAccessAllowed. |
(package private) boolean |
vacmUsed
|
(package private) SnmpVarBind |
varb
|
(package private) java.util.Vector |
variables
|
(package private) VacmViewTreeTable |
viewTable
|
(package private) VacmViewTreeEntry |
viewTreeEntry
|
| Constructor Summary | |
SnmpVacm()
The constructor takes the SnmpAPI as parameter and initializes the vacm data structures. |
|
| Method Summary | |
VacmContextTable |
getContextTable()
Gets the VacmContextTable. |
VacmGroupAccessTable |
getGroupAccessTable()
Gets the VacmGroupAccessTable. |
VacmGroupTable |
getGroupTable()
Gets the VacmGroupTable. |
VacmViewTreeTable |
getViewTable()
Gets the VacmViewTreeTable. |
int |
isAccessAllowed(SnmpPDU pdu,
SnmpOID oid)
This method processess the isAccessAllowed request. |
boolean |
isAcmUsed()
Gets the status of the vacmUsed flag. |
(package private) static void |
logErrorMessage(java.lang.String error)
This method will log the message in the LogManager through the static "logErrorMessage(String)" method present in the LogManager class. |
(package private) static void |
logInfoMessage(java.lang.String info)
This method will log the message in the LogManager through the static "logInfoMessage(String)" method present in the LogManager class. |
(package private) static void |
logMessage(java.lang.String message)
This method will log the message in the LogManager through the static "logMessage(String)" method present in the LogManager class. |
(package private) static void |
logMessage(java.lang.String message,
int id)
This method will log the message in the LogManager through the static "logMessage(String, int)" method present in the LogManager class. |
void |
setAcmUsed(boolean used)
This method is used to set the vacmUsed flag. |
protected void |
setDBOperations(com.adventnet.utils.DatabaseOperations d)
|
protected void |
setV3DatabaseFlag(boolean dbFlag)
|
(package private) void |
setVacmData()
|
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public static final int ACCESS_ALLOWED
public static final int NO_ACCESS_ENTRY
public static final int NOT_IN_VIEW
public static final int NO_SUCH_VIEW
public static final int NO_SUCH_CONTEXT
public static final int NO_GROUP_NAME
public static final int OTHER_ERROR
public static final byte NO_AUTH_NO_PRIV
public static final byte AUTH_NO_PRIV
public static final byte AUTH_PRIV
SnmpPDU rpdu
SnmpVarBind varb
java.util.Vector variables
VacmContextEntry contextEntry
VacmContextTable contextTable
VacmGroupEntry groupEntry
VacmGroupTable groupTable
VacmAccessEntry accessEntry
VacmGroupAccessEntry groupAccessEntry
VacmGroupAccessTable groupAccessTable
VacmViewTreeEntry viewTreeEntry
VacmViewTreeTable viewTable
VacmFamilyEntry familyEntry
byte[] groupName
int[] OID
boolean vacmUsed
byte[] contextName
byte[] securityName
byte securityLevel
int securityModel
| Constructor Detail |
public SnmpVacm()
| Method Detail |
public void setAcmUsed(boolean used)
used - The boolean value to set the vacmUsed flag.protected void setDBOperations(com.adventnet.utils.DatabaseOperations d)
protected void setV3DatabaseFlag(boolean dbFlag)
public boolean isAcmUsed()
public VacmContextTable getContextTable()
public VacmGroupTable getGroupTable()
public VacmGroupAccessTable getGroupAccessTable()
public VacmViewTreeTable getViewTable()
public int isAccessAllowed(SnmpPDU pdu,
SnmpOID oid)
pdu - The SnmpPDU which has all the parameters required for
processing the isAccessAllowed.(context,securityName,securityModel etc.)oid - The SnmpOID. It has the Object Identifier for which the
access verifications are to be performed.void setVacmData()
static void logMessage(java.lang.String message)
static void logMessage(java.lang.String message,
int id)
static void logInfoMessage(java.lang.String info)
static void logErrorMessage(java.lang.String error)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||