28 #ifdef AGENTPP_NAMESPACE
33 #define oidSnmpModules "1.3.6.1.6.3"
34 #define oidSnmpVacmMIB "1.3.6.1.6.3.16"
35 #define oidVacmMIBObjects "1.3.6.1.6.3.16.1"
36 #define oidVacmMIBConformance "1.3.6.1.6.3.16.2"
38 #define oidVacmContextTable "1.3.6.1.6.3.16.1.1"
39 #define oidVacmContextEntry "1.3.6.1.6.3.16.1.1.1"
40 #define oidVacmContextName "1.3.6.1.6.3.16.1.1.1.1"
42 #define oidVacmSecurityToGroupTable "1.3.6.1.6.3.16.1.2"
43 #define oidVacmSecurityToGroupEntry "1.3.6.1.6.3.16.1.2.1"
44 #define oidVacmSecurityModel "1.3.6.1.6.3.16.1.2.1.1" // 1.index
45 #define oidVacmSecurityName "1.3.6.1.6.3.16.1.2.1.2" // 2.index
46 #define oidVacmGroupName "1.3.6.1.6.3.16.1.2.1.3"
47 #define oidVacmSecurityToGroupStorageType "1.3.6.1.6.3.16.1.2.1.4"
48 #define oidVacmSecurityToGroupStatus "1.3.6.1.6.3.16.1.2.1.5"
50 #define oidVacmAccessTable "1.3.6.1.6.3.16.1.4"
51 #define oidVacmAccessEntry "1.3.6.1.6.3.16.1.4.1" // groupName 1. index
52 #define oidVacmAccessContextPrefix "1.3.6.1.6.3.16.1.4.1.1" // 2. index
53 #define oidVacmAccessSecurityModel "1.3.6.1.6.3.16.1.4.1.2" // 3. index
54 #define oidVacmAccessSecurityLevel "1.3.6.1.6.3.16.1.4.1.3" // 4. index
55 #define oidVacmAccessContextMatch "1.3.6.1.6.3.16.1.4.1.4"
56 #define oidVacmAccessReadViewName "1.3.6.1.6.3.16.1.4.1.5"
57 #define oidVacmAccessWriteViewName "1.3.6.1.6.3.16.1.4.1.6"
58 #define oidVacmAccessNotifyViewName "1.3.6.1.6.3.16.1.4.1.7"
59 #define oidVacmAccessStorageType "1.3.6.1.6.3.16.1.4.1.8"
60 #define oidVacmAccessStatus "1.3.6.1.6.3.16.1.4.1.9"
62 #define oidVacmMIBViews "1.3.6.1.6.3.16.1.5"
63 #define oidVacmViewSpinLock "1.3.6.1.6.3.16.1.5.1"
64 #define oidVacmViewTreeFamilyTable "1.3.6.1.6.3.16.1.5.2"
65 #define oidVacmViewTreeFamilyEntry "1.3.6.1.6.3.16.1.5.2.1"
66 #define oidVacmViewTreeFamilyViewName "1.3.6.1.6.3.16.1.5.2.1.1" // 1. index
67 #define oidVacmViewTreeFamilySubtree "1.3.6.1.6.3.16.1.5.2.1.2" // 2. index
68 #define oidVacmViewTreeFamilyMask "1.3.6.1.6.3.16.1.5.2.1.3"
69 #define oidVacmViewTreeFamilyType "1.3.6.1.6.3.16.1.5.2.1.4"
70 #define oidVacmViewTreeFamilyStorageType "1.3.6.1.6.3.16.1.5.2.1.5"
71 #define oidVacmViewTreeFamilyStatus "1.3.6.1.6.3.16.1.5.2.1.6"
73 #define oidVacmMIBCompliances "1.3.6.1.6.3.16.2.1"
74 #define oidVacmMIBGroups "1.3.6.1.6.3.16.2.2"
77 #ifndef oidSnmpUnavailableContexts
78 #define oidSnmpUnavailableContexts "1.3.6.1.6.3.12.1.4.0"
79 #define oidSnmpUnknownContexts "1.3.6.1.6.3.12.1.5.0"
90 #define VACM_accessAllowed 0
91 #define VACM_notInView 1
92 #define VACM_noSuchView 2
93 #define VACM_noSuchContext 3
94 #define VACM_noGroupName 4
95 #define VACM_noAccessEntry 5
96 #define VACM_otherError 6
98 #define VACM_viewFound 7
111 #define mibView_read 1
112 #define mibView_write 2
113 #define mibView_notify 3
115 #define storageType_other 1
116 #define storageType_volatile 2
117 #define storageType_nonVolatile 3
118 #define storageType_permanent 4
119 #define storageType_readOnly 5
121 #define match_exact 1
122 #define match_prefix 2
124 #define view_included 1
125 #define view_excluded 2
169 virtual int isAccessAllowed(
const int securityModel,
170 const NS_SNMP OctetStr &securityName,
171 const int securityLevel,
const int viewType,
184 virtual int isAccessAllowed(
const NS_SNMP OctetStr &viewName,
const Oidx &o);
198 virtual int getViewName(
const int securityModel,
const NS_SNMP OctetStr &securityName,
199 const int securityLevel,
const int viewType,
202 void incUnknownContexts();
203 NS_SNMP SnmpInt32 getUnknownContexts();
214 bool addNewContext(
const NS_SNMP OctetStr &newContext);
221 void deleteContext(
const NS_SNMP OctetStr &context);
231 bool addNewGroup(
const int securityModel,
232 const NS_SNMP OctetStr& securityName,
233 const NS_SNMP OctetStr& groupName,
234 const int storageType);
239 void deleteGroup(
const int securityModel,
const NS_SNMP OctetStr& securityName);
254 bool addNewAccessEntry(
const NS_SNMP OctetStr& groupName,
255 const NS_SNMP OctetStr& prefix,
256 const int securityModel,
const int securityLevel,
258 const NS_SNMP OctetStr& readView,
259 const NS_SNMP OctetStr& writeView,
260 const NS_SNMP OctetStr& notifyView,
261 const int storageType);
272 void deleteAccessEntry(
const NS_SNMP OctetStr& groupName,
273 const NS_SNMP OctetStr& prefix,
274 const int securityModel,
const int securityLevel);
287 bool addNewView(
const NS_SNMP OctetStr& viewName,
290 const int type,
const int storageType);
298 void deleteView(
const NS_SNMP OctetStr& viewName,
const Oidx& subtree);
363 bool isContextSupported(
const NS_SNMP OctetStr& context);
364 bool addNewRow(
const NS_SNMP OctetStr& context);
365 void deleteRow(
const NS_SNMP OctetStr& context);
385 virtual bool ready_for_service(
Vbx*,
int);
386 virtual bool could_ever_be_managed(
const Oidx&,
int&);
388 bool getGroupName(
const int& securiyModel,
389 const NS_SNMP OctetStr& securityName,
391 bool isGroupNameOK(
const NS_SNMP OctetStr&);
392 bool addNewRow(
const int securityModel,
393 const NS_SNMP OctetStr& securityName,
394 const NS_SNMP OctetStr& groupName,
const int storageType);
395 void deleteRow(
const int securityModel,
396 const NS_SNMP OctetStr& securityName);
411 virtual bool ready_for_service(
Vbx*,
int);
412 virtual bool could_ever_be_managed(
const Oidx&,
int&);
414 bool getViewName(
const NS_SNMP OctetStr& group,
415 const NS_SNMP OctetStr& context,
416 const int securityModel,
417 const int securityLevel,
421 bool addNewRow(
const NS_SNMP OctetStr& groupName,
422 const NS_SNMP OctetStr& prefix,
423 const int securityModel,
const int securityLevel,
424 const int match,
const NS_SNMP OctetStr& readView,
425 const NS_SNMP OctetStr& writeView,
426 const NS_SNMP OctetStr& notifyView,
const int storageType);
427 void deleteRow(
const NS_SNMP OctetStr& groupName,
const NS_SNMP OctetStr& prefix,
428 const int securityModel,
const int securityLevel);
467 #if !defined (AGENTPP_DECL_TEMPL_LIST_VIEWNAMEINDEX)
468 #define AGENTPP_DECL_TEMPL_LIST_VIEWNAMEINDEX
479 virtual bool ready_for_service(
Vbx*,
int);
480 virtual bool could_ever_be_managed(
const Oidx&,
int&);
486 int isInMibView(
const NS_SNMP OctetStr&,
const Oidx&);
487 bool addNewRow(
const NS_SNMP OctetStr& viewName,
const Oidx& subtree,
488 const NS_SNMP OctetStr& mask,
const int type,
489 const int storageType);
490 void deleteRow(
const NS_SNMP OctetStr& viewName,
const Oidx& subtree);
495 bool bit(
unsigned int,
NS_SNMP OctetStr&);
497 void buildViewNameIndex();
507 virtual int set(
const Vbx&);
526 #ifdef AGENTPP_NAMESPACE