Modifier and Type | Field and Description |
---|---|
static int |
VACM_MATCH_EXACT |
static int |
VACM_MATCH_PREFIX |
static int |
VACM_VIEW_EXCLUDED |
static int |
VACM_VIEW_INCLUDED |
VACM_NO_ACCESS_ENTRY, VACM_NO_GROUP_NAME, VACM_NO_SUCH_CONTEXT, VACM_NO_SUCH_VIEW, VACM_NOT_IN_VIEW, VACM_OK, VACM_OTHER_ERROR, VIEW_NOTIFY, VIEW_READ, VIEW_WRITE
Modifier and Type | Method and Description |
---|---|
void |
addAccess(org.snmp4j.smi.OctetString groupName,
org.snmp4j.smi.OctetString prefix,
int securityModel,
int securityLevel,
int match,
org.snmp4j.smi.OctetString readView,
org.snmp4j.smi.OctetString writeView,
org.snmp4j.smi.OctetString notifyView,
int storageType)
Adds an access entry for the specified group name.
|
void |
addGroup(int securityModel,
org.snmp4j.smi.OctetString securityName,
org.snmp4j.smi.OctetString groupName,
int storageType)
Adds a security name to group mapping to the VACM.
|
void |
addViewTreeFamily(org.snmp4j.smi.OctetString viewName,
org.snmp4j.smi.OID subtree,
org.snmp4j.smi.OctetString mask,
int type,
int storageType)
Adds a view tree family to an VACM view.
|
boolean |
removeAccess(org.snmp4j.smi.OctetString groupName,
org.snmp4j.smi.OctetString prefix,
int securityModel,
int securityLevel)
Removes an access entry from the VACM.
|
boolean |
removeGroup(int securityModel,
org.snmp4j.smi.OctetString securityName)
Removes a security name to group mapping from the VACM.
|
boolean |
removeViewTreeFamily(org.snmp4j.smi.OctetString viewName,
org.snmp4j.smi.OID subtree)
Removes a view tree family from a VACM view.
|
getViewName, isAccessAllowed, isAccessAllowed
static final int VACM_MATCH_EXACT
static final int VACM_MATCH_PREFIX
static final int VACM_VIEW_INCLUDED
static final int VACM_VIEW_EXCLUDED
void addGroup(int securityModel, org.snmp4j.smi.OctetString securityName, org.snmp4j.smi.OctetString groupName, int storageType)
securityModel
- the security model the mapping is based on, see
SecurityModel
for possible values.securityName
- the security name to map to a group.groupName
- the name of the group.storageType
- the storage type to use for the entry. Possible values are defined
by StorageType
.boolean removeGroup(int securityModel, org.snmp4j.smi.OctetString securityName)
securityModel
- the security model the mapping is based on, see
SecurityModel
for possible values.securityName
- the mapped security name.true
if the entry has been removed, false
otherwise (i.e. if such an entry does not exists).void addAccess(org.snmp4j.smi.OctetString groupName, org.snmp4j.smi.OctetString prefix, int securityModel, int securityLevel, int match, org.snmp4j.smi.OctetString readView, org.snmp4j.smi.OctetString writeView, org.snmp4j.smi.OctetString notifyView, int storageType)
groupName
- the group name for which to create an access entry.prefix
- if match
is VACM_MATCH_PREFIX
the context name
checked by the VACM must exatcly match this value, otherwise a prefix
match is sufficient.securityModel
- the security model that must be used to gain access on behalf of this
entry, see SecurityModel
for possible values.securityLevel
- the minimum security level that must be used to gain access on behalf of
this entry, see SecurityLevel
for possible values.match
- specifies the type of context match used by this entry. Possible values
are VACM_MATCH_EXACT
and VACM_MATCH_PREFIX
.readView
- the MIB view of the SNMP context to which this conceptual row authorizes
read access. If the value is the empty string or if there is no active
MIB view having this value of vacmViewTreeFamilyViewName, then no access
is granted.writeView
- the MIB view of the SNMP context to which this conceptual row authorizes
write access. If the value is the empty string or if there is no active
MIB view having this value of vacmViewTreeFamilyViewName, then no access
is granted.notifyView
- the MIB view of the SNMP context to which this conceptual row authorizes
access for notifications. If the value is the empty string or if there
is no active MIB view having this value of vacmViewTreeFamilyViewName,
then no access is granted.storageType
- the storage type to use for the entry. Possible values are defined
by StorageType
.boolean removeAccess(org.snmp4j.smi.OctetString groupName, org.snmp4j.smi.OctetString prefix, int securityModel, int securityLevel)
groupName
- the group name for which to remove an access entry.prefix
- the context name or prefix of the access entry.securityModel
- the security model that must be used to gain access on behalf of this
entry, see SecurityModel
for possible values.securityLevel
- the minimum security level that must be used to gain access on behalf of
this entry, see SecurityLevel
for possible values.true
if the entry has been removed, false
otherwise (i.e. if such an entry does not exists).void addViewTreeFamily(org.snmp4j.smi.OctetString viewName, org.snmp4j.smi.OID subtree, org.snmp4j.smi.OctetString mask, int type, int storageType)
viewName
- the view name to which a tree family is to be added.subtree
- the MIB subtree which when combined with the corresponding instance of
mask
(vacmViewTreeFamilyMask) defines a family of view
subtrees.mask
- The bit mask which, in combination with the corresponding instance of
subtree
(vacmViewTreeFamilySubtree), defines a family of
view subtrees. See RFC 3415 vacmViewTreeFamilySubtree definition for
more details on the bit mask.type
- specifies whether the subtree is included VACM_VIEW_INCLUDED
or excluded VACM_VIEW_EXCLUDED
from the view.storageType
- the storage type to use for the entry. Possible values are defined
by StorageType
.boolean removeViewTreeFamily(org.snmp4j.smi.OctetString viewName, org.snmp4j.smi.OID subtree)
viewName
- the view name from which a subtree family is to be removed.subtree
- the MIB subtree associated with this entry.true
if the entry has been removed, false
otherwise (i.e. if such an entry does not exists).Copyright © 2016 SNMP4J.org. All rights reserved.