|
|||||||||
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 |
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. |
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 |
static int |
OTHER_ERROR
Constant value for otherError |
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. |
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)
|
Methods inherited from class com.adventnet.snmp.snmp2.SnmpACM |
setDBOperations |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
Constructor Detail |
public SnmpVacm()
Method Detail |
public void setAcmUsed(boolean used)
setAcmUsed
in class SnmpACM
used
- The boolean value to set the vacmUsed flag.protected void setDBOperations(com.adventnet.utils.DatabaseOperations d)
protected void setV3DatabaseFlag(boolean dbFlag)
setV3DatabaseFlag
in class SnmpACM
public boolean isAcmUsed()
isAcmUsed
in class SnmpACM
public VacmContextTable getContextTable()
public VacmGroupTable getGroupTable()
public VacmGroupAccessTable getGroupAccessTable()
public VacmViewTreeTable getViewTable()
public int isAccessAllowed(SnmpPDU pdu, SnmpOID oid)
isAccessAllowed
in class SnmpACM
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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |