31#ifndef _SNMP_AGENT_VACM_H
32#define _SNMP_AGENT_VACM_H
38#include "core/crypto.h"
41#ifndef SNMP_AGENT_VACM_SUPPORT
42 #define SNMP_AGENT_VACM_SUPPORT DISABLED
43#elif (SNMP_AGENT_VACM_SUPPORT != ENABLED && SNMP_AGENT_VACM_SUPPORT != DISABLED)
44 #error SNMP_AGENT_VACM_SUPPORT parameter is not valid
59 SNMP_CONTEXT_MATCH_INVALID = 0,
60 SNMP_CONTEXT_MATCH_EXACT = 1,
61 SNMP_CONTEXT_MATCH_PREFIX = 2
71 SNMP_VIEW_TYPE_INVALID = 0,
72 SNMP_VIEW_TYPE_INCLUDED = 1,
73 SNMP_VIEW_TYPE_EXCLUDED = 2
85 char_t securityName[SNMP_MAX_GROUP_NAME_LEN + 1];
86 char_t groupName[SNMP_MAX_GROUP_NAME_LEN + 1];
97 char_t groupName[SNMP_MAX_GROUP_NAME_LEN + 1];
98 char_t contextPrefix[SNMP_MAX_CONTEXT_NAME_LEN + 1];
102 char_t readViewName[SNMP_MAX_VIEW_NAME_LEN + 1];
103 char_t writeViewName[SNMP_MAX_VIEW_NAME_LEN + 1];
104 char_t notifyViewName[SNMP_MAX_VIEW_NAME_LEN + 1];
115 char_t viewName[SNMP_MAX_VIEW_NAME_LEN + 1];
116 uint8_t subtree[SNMP_MAX_OID_SIZE];
118 uint8_t mask[SNMP_MAX_BIT_MASK_SIZE];
125error_t snmpIsAccessAllowed(SnmpAgentContext *context,
126 const SnmpMessage *message,
const uint8_t *oid,
size_t oidLen);
131 uint_t securityModel,
const char_t *securityName,
size_t securityNameLen);
136 const char_t *groupName,
const char_t *contextPrefix,
137 uint_t securityModel, uint_t securityLevel);
140 const char_t *groupName,
const char_t *contextName,
size_t contextNameLen,
143SnmpViewEntry *snmpCreateViewEntry(SnmpAgentContext *context);
146 const char_t *viewName,
const uint8_t *subtree,
size_t subtreeLen);
149 const char_t *viewName,
const uint8_t *oid,
size_t oidLen);
error_t
Error codes.
Definition error.h:43
Common definitions for MIB modules.
MibRowStatus
Row status.
Definition mib_common.h:101
SNMP agent (Simple Network Management Protocol)
SnmpSecurityLevel
Security levels.
Definition snmp_agent_usm.h:219
SnmpSecurityModel
Security models.
Definition snmp_agent_usm.h:205
SnmpContextMatch
Context match.
Definition snmp_agent_vacm.h:58
SnmpViewType
View type.
Definition snmp_agent_vacm.h:70
Access table entry.
Definition snmp_agent_vacm.h:95
Group table entry.
Definition snmp_agent_vacm.h:82
SNMP message.
Definition snmp_agent_message.h:56
View table entry.
Definition snmp_agent_vacm.h:113