snmp_agent_vacm.c
Go to the documentation of this file.
1 /**
2  * @file snmp_agent_vacm.c
3  * @brief View-based Access Control Model (VACM) for SNMP
4  *
5  * @section License
6  *
7  * Copyright (C) 2010-2018 Oryx Embedded SARL. All rights reserved.
8  *
9  * This file is part of CycloneTCP Open.
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software Foundation,
23  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24  *
25  * @section Description
26  *
27  * This module implements the View-based Access Control Model (VACM) for Simple
28  * Network Management Protocol (SNMP). Refer to RFC 3415 for complete details
29  *
30  * @author Oryx Embedded SARL (www.oryx-embedded.com)
31  * @version 1.9.0
32  **/
33 
34 //Switch to the appropriate trace level
35 #define TRACE_LEVEL SNMP_TRACE_LEVEL
36 
37 //Dependencies
38 #include "core/net.h"
39 #include "snmp/snmp_agent.h"
40 #include "snmp/snmp_agent_vacm.h"
41 #include "core/crypto.h"
42 #include "encoding/asn1.h"
43 #include "encoding/oid.h"
44 #include "debug.h"
45 
46 //Check TCP/IP stack configuration
47 #if (SNMP_AGENT_SUPPORT == ENABLED && SNMP_AGENT_VACM_SUPPORT == ENABLED)
48 
49 
50 /**
51  * @brief Access control verification
52  * @param[in] context Pointer to the SNMP agent context
53  * @param[in] message Pointer to the received SNMP message
54  * @param[in] oid OID for the managed object
55  * @param[in] oidLen Length of the OID, in bytes
56  * @return Error code
57  **/
58 
60  const SnmpMessage *message, const uint8_t *oid, size_t oidLen)
61 {
62  SnmpSecurityModel securityModel;
63  SnmpSecurityLevel securityLevel;
64  const char_t *securityName;
65  size_t securityNameLen;
66  const char_t *contextName;
67  size_t contextNameLen;
68  const char_t *viewName;
69  const SnmpGroupEntry *groupEntry;
70  const SnmpAccessEntry *accessEntry;
71  const SnmpViewEntry *viewEntry;
72 
73 #if (SNMP_V1_SUPPORT == ENABLED)
74  //SNMPv1 version?
75  if(message->version == SNMP_VERSION_1)
76  {
77  //Set security parameters
78  securityModel = SNMP_SECURITY_MODEL_V1;
80  securityName = message->community;
81  securityNameLen = message->communityLen;
82  contextName = context->contextName;
83  contextNameLen = strlen(context->contextName);
84  }
85  else
86 #endif
87 #if (SNMP_V2C_SUPPORT == ENABLED)
88  //SNMPv2c version?
89  if(message->version == SNMP_VERSION_2C)
90  {
91  //Set security parameters
92  securityModel = SNMP_SECURITY_MODEL_V2C;
94  securityName = message->community;
95  securityNameLen = message->communityLen;
96  contextName = context->contextName;
97  contextNameLen = strlen(context->contextName);
98  }
99  else
100 #endif
101 #if (SNMP_V3_SUPPORT == ENABLED)
102  //SNMPv3 version?
103  if(message->version == SNMP_VERSION_3)
104  {
105  //Set security parameters
106  securityModel = (SnmpSecurityModel) message->msgSecurityModel;
107  securityLevel = SNMP_SECURITY_LEVEL_NO_AUTH_NO_PRIV;
108  securityName = message->msgUserName;
109  securityNameLen = message->msgUserNameLen;
110  contextName = message->contextName;
111  contextNameLen = message->contextNameLen;
112 
113  //Check whether the authFlag is set
114  if(message->msgFlags & SNMP_MSG_FLAG_AUTH)
115  {
116  //Check whether the privFlag is set
117  if(message->msgFlags & SNMP_MSG_FLAG_PRIV)
118  securityLevel = SNMP_SECURITY_LEVEL_AUTH_PRIV;
119  else
120  securityLevel = SNMP_SECURITY_LEVEL_AUTH_NO_PRIV;
121  }
122  }
123  else
124 #endif
125  //Invalid SNMP version?
126  {
127  //Report an error
128  return ERROR_INVALID_VERSION;
129  }
130 
131  //The vacmContextTable is consulted for information about the SNMP
132  //context identified by the contextName. If information about this
133  //SNMP context is absent from the table, then an errorIndication
134  //(noSuchContext) is returned to the calling module
135  if(contextNameLen != strlen(context->contextName))
136  return ERROR_UNKNOWN_CONTEXT;
137 
138  //Check context name
139  if(strncmp(contextName, context->contextName, contextNameLen))
140  return ERROR_UNKNOWN_CONTEXT;
141 
142  //The vacmSecurityToGroupTable is consulted for mapping the securityModel
143  //and securityName to a groupName
144  groupEntry = snmpFindGroupEntry(context, securityModel,
145  securityName, securityNameLen);
146 
147  //If the information about this combination is absent from the table, then
148  //an errorIndication (noGroupName) is returned to the calling module
149  if(groupEntry == NULL)
151 
152  //The vacmAccessTable is consulted for information about the groupName,
153  //contextName, securityModel and securityLevel
154  accessEntry = snmpSelectAccessEntry(context, groupEntry->groupName,
155  contextName, contextNameLen, securityModel, securityLevel);
156 
157  //If information about this combination is absent from the table, then
158  //an errorIndication (noAccessEntry) is returned to the calling module
159  if(accessEntry == NULL)
161 
162  //Select the proper MIB view
163  if(message->pduType == SNMP_PDU_GET_REQUEST ||
164  message->pduType == SNMP_PDU_GET_NEXT_REQUEST ||
166  {
167  //The read view is used for checking access rights
168  viewName = accessEntry->readViewName;
169  }
170  else if(message->pduType == SNMP_PDU_SET_REQUEST)
171  {
172  //The write view is used for checking access rights
173  viewName = accessEntry->writeViewName;
174  }
175  else if(message->pduType == SNMP_PDU_TRAP ||
176  message->pduType == SNMP_PDU_TRAP_V2 ||
177  message->pduType == SNMP_PDU_INFORM_REQUEST)
178  {
179  //The notify view is used for checking access rights
180  viewName = accessEntry->notifyViewName;
181  }
182  else
183  {
184  //Report an error
186  }
187 
188  //If the view to be used is the empty view (zero length viewName) then
189  //an errorIndication (noSuchView) is returned to the calling module
190  if(viewName[0] == '\0')
192 
193  //Check whether the specified variableName is in the MIB view
194  viewEntry = snmpSelectViewEntry(context, viewName, oid, oidLen);
195 
196  //If there is no view configured for the specified viewType, then an
197  //errorIndication (noSuchView) is returned to the calling module
198  if(viewEntry == NULL)
200 
201  //If the specified variableName (object instance) is not in the MIB view,
202  //then an errorIndication (notInView) is returned to the calling module
203  if(viewEntry->type != SNMP_VIEW_TYPE_INCLUDED)
205 
206  //Otherwise, the specified variableName is in the MIB view
207  return NO_ERROR;
208 }
209 
210 
211 /**
212  * @brief Create a new group entry
213  * @param[in] context Pointer to the SNMP agent context
214  * @return Pointer to the newly created entry
215  **/
216 
218 {
219  uint_t i;
220  SnmpGroupEntry *entry;
221 
222  //Initialize pointer
223  entry = NULL;
224 
225  //Loop through the list of groups
226  for(i = 0; i < SNMP_AGENT_GROUP_TABLE_SIZE; i++)
227  {
228  //Check current status
229  if(context->groupTable[i].status == MIB_ROW_STATUS_UNUSED)
230  {
231  //An unused entry has been found
232  entry = &context->groupTable[i];
233  //We are done
234  break;
235  }
236  }
237 
238  //Check whether the group table runs out of space
239  if(entry == NULL)
240  {
241  //Loop through the list of groups
242  for(i = 0; i < SNMP_AGENT_GROUP_TABLE_SIZE; i++)
243  {
244  //Check current status
245  if(context->groupTable[i].status == MIB_ROW_STATUS_NOT_READY)
246  {
247  //Reuse the current entry
248  entry = &context->groupTable[i];
249  //We are done
250  break;
251  }
252  }
253  }
254 
255  //Return a pointer to the newly created entry
256  return entry;
257 }
258 
259 
260 /**
261  * @brief Search the group table
262  * @param[in] context Pointer to the SNMP agent context
263  * @param[in] securityModel Security model
264  * @param[in] securityName Pointer to the security name
265  * @param[in] securityNameLen Length of the security name
266  * @return Pointer to the matching entry
267  **/
268 
270  uint_t securityModel, const char_t *securityName, size_t securityNameLen)
271 {
272  uint_t i;
273  SnmpGroupEntry *entry;
274 
275  //Loop through the list of groups
276  for(i = 0; i < SNMP_AGENT_GROUP_TABLE_SIZE; i++)
277  {
278  //Point to the current entry
279  entry = &context->groupTable[i];
280 
281  //Check current status
282  if(entry->status != MIB_ROW_STATUS_UNUSED)
283  {
284  //Compare security model
285  if(entry->securityModel == securityModel)
286  {
287  //Check the length of the security name
288  if(strlen(entry->securityName) == securityNameLen)
289  {
290  //Compare security name
291  if(!strncmp(entry->securityName, securityName, securityNameLen))
292  {
293  //A matching entry has been found
294  break;
295  }
296  }
297  }
298  }
299  }
300 
301  //Any matching entry found?
303  return entry;
304  else
305  return NULL;
306 }
307 
308 
309 /**
310  * @brief Create a new access entry
311  * @param[in] context Pointer to the SNMP agent context
312  * @return Pointer to the newly created entry
313  **/
314 
316 {
317  uint_t i;
318  SnmpAccessEntry *entry;
319 
320  //Initialize pointer
321  entry = NULL;
322 
323  //Loop through the list of access rights
324  for(i = 0; i < SNMP_AGENT_ACCESS_TABLE_SIZE; i++)
325  {
326  //Check current status
327  if(context->accessTable[i].status == MIB_ROW_STATUS_UNUSED)
328  {
329  //An unused entry has been found
330  entry = &context->accessTable[i];
331  //We are done
332  break;
333  }
334  }
335 
336  //Check whether the group table runs out of space
337  if(entry == NULL)
338  {
339  //Loop through the list of access rights
340  for(i = 0; i < SNMP_AGENT_ACCESS_TABLE_SIZE; i++)
341  {
342  //Check current status
343  if(context->accessTable[i].status == MIB_ROW_STATUS_NOT_READY)
344  {
345  //Reuse the current entry
346  entry = &context->accessTable[i];
347  //We are done
348  break;
349  }
350  }
351  }
352 
353  //Return a pointer to the newly created entry
354  return entry;
355 }
356 
357 
358 /**
359  * @brief Search the access table for a given entry
360  * @param[in] context Pointer to the SNMP agent context
361  * @param[in] groupName Group name
362  * @param[in] contextPrefix Context name prefix
363  * @param[in] securityModel Security model
364  * @param[in] securityLevel Security level
365  * @return Pointer to the matching entry
366  **/
367 
369  const char_t *groupName, const char_t *contextPrefix,
370  uint_t securityModel, uint_t securityLevel)
371 {
372  uint_t i;
373  SnmpAccessEntry *entry;
374 
375  //Loop through the list of access rights
376  for(i = 0; i < SNMP_AGENT_ACCESS_TABLE_SIZE; i++)
377  {
378  //Point to the current entry
379  entry = &context->accessTable[i];
380 
381  //Check current status
382  if(entry->status != MIB_ROW_STATUS_UNUSED)
383  {
384  //Compare group name
385  if(!strcmp(entry->groupName, groupName))
386  {
387  //Compare context name prefix
388  if(!strcmp(entry->contextPrefix, contextPrefix))
389  {
390  //Compare security model and security level
391  if(entry->securityModel == securityModel &&
392  entry->securityLevel == securityLevel)
393  {
394  //A matching entry has been found
395  break;
396  }
397  }
398  }
399  }
400  }
401 
402  //Return a pointer to the matching entry
404  return entry;
405  else
406  return NULL;
407 }
408 
409 
410 /**
411  * @brief Find an access entry that matches the selection criteria
412  * @param[in] context Pointer to the SNMP agent context
413  * @param[in] groupName NULL-terminated string that contains the group name
414  * @param[in] contextName Pointer to the context name
415  * @param[in] contextNameLen Length of the context name
416  * @param[in] securityModel Security model
417  * @param[in] securityLevel Security level
418  * @return Pointer to the matching entry
419  **/
420 
422  const char_t *groupName, const char_t *contextName, size_t contextNameLen,
423  SnmpSecurityModel securityModel, SnmpSecurityLevel securityLevel)
424 {
425  uint_t i;
426  size_t n;
427  bool_t acceptable;
428  SnmpAccessEntry *entry;
429  SnmpAccessEntry *selectedEntry;
430 
431  //Initialize pointer
432  selectedEntry = NULL;
433 
434  //Loop through the list of access rights
435  for(i = 0; i < SNMP_AGENT_ACCESS_TABLE_SIZE; i++)
436  {
437  //Point to the current entry
438  entry = &context->accessTable[i];
439 
440  //Check current status
441  if(entry->status == MIB_ROW_STATUS_UNUSED)
442  continue;
443 
444  //Compare group name
445  if(strcmp(entry->groupName, groupName))
446  continue;
447 
448  //Compare security model
450  {
451  if(entry->securityModel != securityModel)
452  continue;
453  }
454 
455  //Compare security level
456  if(entry->securityLevel > securityLevel)
457  continue;
458 
459  //Retrieve the length of the context name prefix
460  n = strlen(entry->contextPrefix);
461 
462  //Check the length of the context name prefix
463  if(n > contextNameLen)
464  continue;
465 
466  //Compare context name prefix
467  if(strncmp(entry->contextPrefix, contextName, n))
468  continue;
469 
470  //Exact match?
472  {
473  //The contextName must match exactly
474  if(n != contextNameLen)
475  continue;
476  }
477 
478  //If this set has only one member, we're done otherwise, it comes down
479  //to deciding how to weight the preferences between ContextPrefixes,
480  //SecurityModels, and SecurityLevels (refer to RFC 3415, section 4)
481  if(selectedEntry == NULL)
482  acceptable = TRUE;
483  else if(entry->securityModel == SNMP_SECURITY_MODEL_ANY)
484  acceptable = FALSE;
485  else if(selectedEntry->securityModel == SNMP_SECURITY_MODEL_ANY)
486  acceptable = TRUE;
487  else if(strlen(selectedEntry->contextPrefix) == contextNameLen)
488  acceptable = FALSE;
489  else if(strlen(entry->contextPrefix) == contextNameLen)
490  acceptable = TRUE;
491  else if(strlen(selectedEntry->contextPrefix) > strlen(entry->contextPrefix))
492  acceptable = FALSE;
493  else if(strlen(entry->contextPrefix) > strlen(selectedEntry->contextPrefix))
494  acceptable = TRUE;
495  else if(selectedEntry->securityLevel >= entry->securityLevel)
496  acceptable = FALSE;
497  else
498  acceptable = TRUE;
499 
500  //Select the proper entry
501  if(acceptable)
502  selectedEntry = entry;
503  }
504 
505  //Return a pointer to the matching entry
506  return selectedEntry;
507 }
508 
509 
510 /**
511  * @brief Create a new view entry
512  * @param[in] context Pointer to the SNMP agent context
513  * @return Pointer to the newly created entry
514  **/
515 
517 {
518  uint_t i;
519  SnmpViewEntry *entry;
520 
521  //Initialize pointer
522  entry = NULL;
523 
524  //Loop through the list of MIB views
525  for(i = 0; i < SNMP_AGENT_VIEW_TABLE_SIZE; i++)
526  {
527  //Check current status
528  if(context->viewTable[i].status == MIB_ROW_STATUS_UNUSED)
529  {
530  //An unused entry has been found
531  entry = &context->viewTable[i];
532  //We are done
533  break;
534  }
535  }
536 
537  //Check whether the group table runs out of space
538  if(entry == NULL)
539  {
540  //Loop through the list of MIB views
541  for(i = 0; i < SNMP_AGENT_VIEW_TABLE_SIZE; i++)
542  {
543  //Check current status
544  if(context->viewTable[i].status == MIB_ROW_STATUS_NOT_READY)
545  {
546  //Reuse the current entry
547  entry = &context->viewTable[i];
548  //We are done
549  break;
550  }
551  }
552  }
553 
554  //Return a pointer to the newly created entry
555  return entry;
556 }
557 
558 
559 /**
560  * @brief Search the view table for a given entry
561  * @param[in] context Pointer to the SNMP agent context
562  * @param[in] viewName View name
563  * @param[in] subtree Pointer to the MIB subtree
564  * @param[in] subtreeLen Length of the MIB subtree
565  * @return Pointer to the matching entry
566  **/
567 
569  const char_t *viewName, const uint8_t *subtree, size_t subtreeLen)
570 {
571  uint_t i;
572  SnmpViewEntry *entry;
573 
574  //Loop through the list of MIB views
575  for(i = 0; i < SNMP_AGENT_VIEW_TABLE_SIZE; i++)
576  {
577  //Point to the current entry
578  entry = &context->viewTable[i];
579 
580  //Check current status
581  if(entry->status != MIB_ROW_STATUS_UNUSED)
582  {
583  //Compare view name
584  if(!strcmp(entry->viewName, viewName))
585  {
586  //Check the length of the subtree
587  if(entry->subtreeLen == subtreeLen)
588  {
589  //Compare subtree
590  if(!memcmp(entry->subtree, subtree, subtreeLen))
591  {
592  //A matching entry has been found
593  break;
594  }
595  }
596  }
597  }
598  }
599 
600  //Return a pointer to the matching entry
602  return entry;
603  else
604  return NULL;
605 }
606 
607 
608 /**
609  * @brief Find a view entry that matches the selection criteria
610  * @param[in] context Pointer to the SNMP agent context
611  * @param[in] viewName NULL-terminated string that contains the view name
612  * @param[in] oid OID for the managed object
613  * @param[in] oidLen Length of the OID, in bytes
614  * @return Pointer to the matching entry
615  **/
616 
618  const char_t *viewName, const uint8_t *oid, size_t oidLen)
619 {
620  uint_t i;
621  uint_t subtreeLen;
622  uint_t selectedSubtreeLen;
623  bool_t acceptable;
624  SnmpViewEntry *entry;
625  SnmpViewEntry *selectedEntry;
626 
627  //Initialize pointer
628  selectedEntry = NULL;
629 
630  //Loop through the list of MIB views
631  for(i = 0; i < SNMP_AGENT_VIEW_TABLE_SIZE; i++)
632  {
633  //Point to the current entry
634  entry = &context->viewTable[i];
635 
636  //Check current status
637  if(entry->status == MIB_ROW_STATUS_UNUSED)
638  continue;
639 
640  //Compare view name
641  if(strcmp(entry->viewName, viewName))
642  continue;
643 
644  //Check whether the OID matches the subtree (the mask allows for a
645  //simple form of wildcarding)
646  if(!oidMatch(oid, oidLen, entry->subtree, entry->subtreeLen,
647  entry->mask, entry->maskLen))
648  {
649  continue;
650  }
651 
652  //First matching entry?
653  if(selectedEntry == NULL)
654  {
655  acceptable = TRUE;
656  }
657  else
658  {
659  //Calculate the number of sub-identifiers of the subtree
660  subtreeLen = oidCountSubIdentifiers(entry->subtree,
661  entry->subtreeLen);
662 
663  //Calculate the number of sub-identifiers of the currently selected
664  //subtree
665  selectedSubtreeLen = oidCountSubIdentifiers(selectedEntry->subtree,
666  selectedEntry->subtreeLen);
667 
668  //If multiple entries match, then select the entry whose value of
669  //vacmViewTreeFamilySubtree has the most sub-identifiers. If multiple
670  //entries match and have the same number of sub-identifiers, then the
671  //lexicographically greatest instance of vacmViewTreeFamilyType is
672  //selected
673  if(selectedSubtreeLen > subtreeLen)
674  {
675  acceptable = FALSE;
676  }
677  else if(subtreeLen > selectedSubtreeLen)
678  {
679  acceptable = TRUE;
680  }
681  else if(oidComp(selectedEntry->subtree, selectedEntry->subtreeLen,
682  entry->subtree, entry->subtreeLen) > 0)
683  {
684  acceptable = FALSE;
685  }
686  else if(oidComp(entry->subtree, entry->subtreeLen,
687  selectedEntry->subtree, selectedEntry->subtreeLen) > 0)
688  {
689  acceptable = TRUE;
690  }
691  else if(selectedEntry->type >= entry->type)
692  {
693  acceptable = FALSE;
694  }
695  else
696  {
697  acceptable = TRUE;
698  }
699  }
700 
701  //Select the proper entry
702  if(acceptable)
703  selectedEntry = entry;
704  }
705 
706  //Return a pointer to the matching entry
707  return selectedEntry;
708 }
709 
710 #endif
char_t groupName[SNMP_MAX_GROUP_NAME_LEN+1]
SnmpAccessEntry * snmpCreateAccessEntry(SnmpAgentContext *context)
Create a new access entry.
MibRowStatus status
char char_t
Definition: compiler_port.h:41
#define SNMP_AGENT_ACCESS_TABLE_SIZE
Definition: snmp_agent.h:95
TCP/IP stack core.
uint8_t mask[SNMP_MAX_BIT_MASK_SIZE]
Debugging facilities.
error_t snmpIsAccessAllowed(SnmpAgentContext *context, const SnmpMessage *message, const uint8_t *oid, size_t oidLen)
Access control verification.
SnmpViewType type
uint8_t message[]
Definition: chap.h:150
General definitions for cryptographic algorithms.
SnmpAccessEntry * snmpFindAccessEntry(SnmpAgentContext *context, const char_t *groupName, const char_t *contextPrefix, uint_t securityModel, uint_t securityLevel)
Search the access table for a given entry.
uint8_t subtree[SNMP_MAX_OID_SIZE]
char_t writeViewName[SNMP_MAX_VIEW_NAME_LEN+1]
Access table entry.
char_t notifyViewName[SNMP_MAX_VIEW_NAME_LEN+1]
OID (Object Identifier)
SnmpContextMatch contextMatch
#define TRUE
Definition: os_port.h:48
SnmpSecurityLevel securityLevel
SnmpSecurityModel securityModel
char_t securityName[SNMP_MAX_GROUP_NAME_LEN+1]
size_t subtreeLen
SnmpAccessEntry * snmpSelectAccessEntry(SnmpAgentContext *context, const char_t *groupName, const char_t *contextName, size_t contextNameLen, SnmpSecurityModel securityModel, SnmpSecurityLevel securityLevel)
Find an access entry that matches the selection criteria.
ASN.1 (Abstract Syntax Notation One)
View-based Access Control Model (VACM) for SNMP.
#define SNMP_AGENT_VIEW_TABLE_SIZE
Definition: snmp_agent.h:102
SnmpGroupEntry * snmpFindGroupEntry(SnmpAgentContext *context, uint_t securityModel, const char_t *securityName, size_t securityNameLen)
Search the group table.
SNMP agent (Simple Network Management Protocol)
Group table entry.
char_t groupName[SNMP_MAX_GROUP_NAME_LEN+1]
SnmpViewEntry * snmpFindViewEntry(SnmpAgentContext *context, const char_t *viewName, const uint8_t *subtree, size_t subtreeLen)
Search the view table for a given entry.
uint_t oidCountSubIdentifiers(const uint8_t *oid, size_t oidLen)
Calculate the number of sub-identifiers.
Definition: oid.c:273
int_t oidComp(const uint8_t *oid1, size_t oidLen1, const uint8_t *oid2, size_t oidLen2)
Compare object identifiers.
Definition: oid.c:99
bool_t oidMatch(const uint8_t *oid, size_t oidLen, const uint8_t *subtree, size_t subtreeLen, const uint8_t *mask, size_t maskLen)
Check whether an OID matches the specified subtree.
Definition: oid.c:136
size_t maskLen
MibRowStatus status
Success.
Definition: error.h:42
SnmpViewEntry * snmpSelectViewEntry(SnmpAgentContext *context, const char_t *viewName, const uint8_t *oid, size_t oidLen)
Find a view entry that matches the selection criteria.
MibRowStatus status
Ipv6Addr contextPrefix
Definition: ndp.h:515
error_t
Error codes.
Definition: error.h:40
SNMP message.
char_t contextPrefix[SNMP_MAX_CONTEXT_NAME_LEN+1]
unsigned int uint_t
Definition: compiler_port.h:43
SnmpViewEntry * snmpCreateViewEntry(SnmpAgentContext *context)
Create a new view entry.
char_t viewName[SNMP_MAX_VIEW_NAME_LEN+1]
#define SNMP_AGENT_GROUP_TABLE_SIZE
Definition: snmp_agent.h:88
SnmpSecurityModel securityModel
SnmpGroupEntry * snmpCreateGroupEntry(SnmpAgentContext *context)
Create a new group entry.
SnmpSecurityModel
Security models.
char_t readViewName[SNMP_MAX_VIEW_NAME_LEN+1]
#define SnmpAgentContext
Definition: snmp_agent.h:34
uint8_t n
uint8_t oid[1]
Definition: mib_common.h:184
#define FALSE
Definition: os_port.h:44
View table entry.
int bool_t
Definition: compiler_port.h:47
SnmpSecurityLevel
Security levels.