#include <vacm.h>
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 ¬ifyView, 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 |
| Vacm::Vacm | ( | ) |
| Vacm::Vacm | ( | Mib & | ) |
| virtual Vacm::~Vacm | ( | ) | [virtual] |
| 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.
| [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 |
| 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.
| [in] | viewName | Name of the view |
| [in] | o | Oid to check |
| 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.
| [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 |
| 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.
| [in] | newContext | vacmContextName |
| void Vacm::deleteContext | ( | const NS_SNMP OctetStr & | context | ) |
| 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.
| [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.
| [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.
| [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.
| [in] | viewName | vacmViewTreeFamilyViewName |
| [in] | subtree | vacmViewTreeFamilySubtree |
| [in] | mask | vacmViewTreeFamilyMask |
| [in] | type | vacmViewTreeFamilyType (view_included or view_excluded) |
| [in] | storageType | vacmViewTreeFamilyStorageType (storageType_volatile, ...) |
| void Vacm::deleteView | ( | const NS_SNMP OctetStr & | viewName, | |
| const Oidx & | subtree | |||
| ) |
Delete the subtree from the view from the VacmViewTreeFamilyTable.
| [in] | viewName | vacmViewTreeFamilyViewName |
| [in] | subtree | vacmViewTreeFamilySubtree |
| ClassPointers Vacm::get_vacm_tables | ( | ) | [inline] |
Get the pointers to the VACM SNMP tables used by the VACM.
ClassPointers Vacm::vcp [protected] |
1.5.6