Vacm Class Reference

#include <vacm.h>

List of all members.

Public Member Functions

 Vacm ()
 Vacm (Mib &)
virtual ~Vacm ()
virtual int isAccessAllowed (const int securityModel, const NS_SNMP OctetStr &securityName, const int securityLevel, const int viewType, const NS_SNMP OctetStr &context, const Oidx &o)
 Does the user have the rights to access the Oid.
virtual int isAccessAllowed (const NS_SNMP OctetStr &viewName, const Oidx &o)
 Is the oid within the view.
virtual int getViewName (const int securityModel, const NS_SNMP OctetStr &securityName, const int securityLevel, const int viewType, const NS_SNMP OctetStr &context, NS_SNMP OctetStr &viewName)
 Get the view name for the given params.
void incUnknownContexts ()
NS_SNMP SnmpInt32 getUnknownContexts ()
boolean addNewContext (const NS_SNMP OctetStr &newContext)
 Add a new context to the VacmContextTable.
void deleteContext (const NS_SNMP OctetStr &context)
 Delete the given context from the VacmContextTable.
boolean addNewGroup (const int securityModel, const NS_SNMP OctetStr &securityName, const NS_SNMP OctetStr &groupName, const int storageType)
 Add a new security name to group mapping to the VacmSecurityToGroupTable.
void deleteGroup (const int securityModel, const NS_SNMP OctetStr &securityName)
 Delete the given securityName from the VacmSecurityToGroupTable.
boolean addNewAccessEntry (const NS_SNMP OctetStr &groupName, const NS_SNMP OctetStr &prefix, const int securityModel, const int securityLevel, const int match, const NS_SNMP OctetStr &readView, const NS_SNMP OctetStr &writeView, const NS_SNMP OctetStr &notifyView, const int storageType)
 Add a new entry to the VacmAccessTable.
void deleteAccessEntry (const NS_SNMP OctetStr &groupName, const NS_SNMP OctetStr &prefix, const int securityModel, const int securityLevel)
 Delete a entry from the VacmAccessTable.
boolean addNewView (const NS_SNMP OctetStr &viewName, const Oidx &subtree, const NS_SNMP OctetStr &mask, const int type, const int storageType)
 Add a new view to the VacmViewTreeFamilyTable.
void deleteView (const NS_SNMP OctetStr &viewName, const Oidx &subtree)
 Delete the subtree from the view from the VacmViewTreeFamilyTable.
ClassPointers get_vacm_tables ()
 Get the pointers to the VACM SNMP tables used by the VACM.

Static Public Member Functions

static const char * getErrorMsg (int nr)

Protected Attributes

ClassPointers vcp

Classes

struct  ClassPointers


Constructor & Destructor Documentation

Vacm::Vacm (  ) 

Vacm::Vacm ( Mib  ) 

virtual Vacm::~Vacm (  )  [virtual]


Member Function Documentation

virtual int Vacm::isAccessAllowed ( const int  securityModel,
const NS_SNMP OctetStr &  securityName,
const int  securityLevel,
const int  viewType,
const NS_SNMP OctetStr &  context,
const Oidx o 
) [virtual]

Does the user have the rights to access the Oid.

All parameters are used to check if access is allowed.

Parameters:
[in] securityModel The security model used
[in] securityName The security name of the user
[in] securityLevel The security level
[in] viewType Read, write or notify view
[in] context The MIB context
[in] o The Oid the user wants to access
Returns:
true if access is allowed

virtual int Vacm::isAccessAllowed ( const NS_SNMP OctetStr &  viewName,
const Oidx o 
) [virtual]

Is the oid within the view.

Check if the given Oid is within the named view.

Parameters:
[in] viewName Name of the view
[in] o Oid to check
Returns:
true if the oid is within the view

virtual int Vacm::getViewName ( const int  securityModel,
const NS_SNMP OctetStr &  securityName,
const int  securityLevel,
const int  viewType,
const NS_SNMP OctetStr &  context,
NS_SNMP OctetStr &  viewName 
) [virtual]

Get the view name for the given params.

Parameters:
[in] securityModel The security model used
[in] securityName The security name of the user
[in] securityLevel The security level
[in] viewType Select one of mibView_read, write or notify
[in] context The MIB context
[out] viewName If found, the name of the matching view
Returns:
VACM_viewFound on success, error codes on failure

void Vacm::incUnknownContexts (  ) 

NS_SNMP SnmpInt32 Vacm::getUnknownContexts (  ) 

static const char* Vacm::getErrorMsg ( int  nr  )  [inline, static]

boolean Vacm::addNewContext ( const NS_SNMP OctetStr &  newContext  ) 

Add a new context to the VacmContextTable.

Parameters:
[in] newContext vacmContextName
Returns:
true, if the new context could be added. If the context already exists, false is returned.

void Vacm::deleteContext ( const NS_SNMP OctetStr &  context  ) 

Delete the given context from the VacmContextTable.

Parameters:
[in] context vacmContextName

boolean Vacm::addNewGroup ( const int  securityModel,
const NS_SNMP OctetStr &  securityName,
const NS_SNMP OctetStr &  groupName,
const int  storageType 
)

Add a new security name to group mapping to the VacmSecurityToGroupTable.

Parameters:
[in] securityModel vacmSecurityModel
[in] securityName vacmSecurityName
[in] groupName vacmGroupName
[in] storageType vacmSecurityToGroupStorageType

void Vacm::deleteGroup ( const int  securityModel,
const NS_SNMP OctetStr &  securityName 
)

Delete the given securityName from the VacmSecurityToGroupTable.

boolean Vacm::addNewAccessEntry ( const NS_SNMP OctetStr &  groupName,
const NS_SNMP OctetStr &  prefix,
const int  securityModel,
const int  securityLevel,
const int  match,
const NS_SNMP OctetStr &  readView,
const NS_SNMP OctetStr &  writeView,
const NS_SNMP OctetStr &  notifyView,
const int  storageType 
)

Add a new entry to the VacmAccessTable.

Parameters:
[in] groupName vacmGroupName
[in] prefix vacmAccessContextPrefix
[in] securityModel vacmAccessSecurityModel
[in] securityLevel vacmAccessSecurityLevel
[in] match vacmAccessContextMatch
[in] readView vacmAccessReadViewName
[in] writeView vacmAccessWriteViewName
[in] notifyView vacmAccessNotifyViewName
[in] storageType vacmAccessStorageType (storageType_volatile, ...)

void Vacm::deleteAccessEntry ( const NS_SNMP OctetStr &  groupName,
const NS_SNMP OctetStr &  prefix,
const int  securityModel,
const int  securityLevel 
)

Delete a entry from the VacmAccessTable.

Parameters:
[in] groupName vacmGroupName
[in] prefix vacmAccessContextPrefix
[in] securityModel vacmAccessSecurityModel
[in] securityLevel vacmAccessSecurityLevel

boolean Vacm::addNewView ( const NS_SNMP OctetStr &  viewName,
const Oidx subtree,
const NS_SNMP OctetStr &  mask,
const int  type,
const int  storageType 
)

Add a new view to the VacmViewTreeFamilyTable.

Parameters:
[in] viewName vacmViewTreeFamilyViewName
[in] subtree vacmViewTreeFamilySubtree
[in] mask vacmViewTreeFamilyMask
[in] type vacmViewTreeFamilyType (view_included or view_excluded)
[in] storageType vacmViewTreeFamilyStorageType (storageType_volatile, ...)
Returns:
true if the new row could be added. False, if it already exists.

void Vacm::deleteView ( const NS_SNMP OctetStr &  viewName,
const Oidx subtree 
)

Delete the subtree from the view from the VacmViewTreeFamilyTable.

Parameters:
[in] viewName vacmViewTreeFamilyViewName
[in] subtree vacmViewTreeFamilySubtree

ClassPointers Vacm::get_vacm_tables (  )  [inline]

Get the pointers to the VACM SNMP tables used by the VACM.

Returns:
a Vacm::ClassPointers instance containing the pointers of the SNMP tables used by the VACM.


Member Data Documentation

ClassPointers Vacm::vcp [protected]


The documentation for this class was generated from the following file:

Generated on Thu Sep 2 01:19:44 2010 for AGENT++ by  doxygen 1.5.6