Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.9.0.2
openapi_snmp.h
Go to the documentation of this file.
1 
9 /**********************************************************************
10 *
11 * Copyright 2016-2020 Broadcom.
12 *
13 * Licensed under the Apache License, Version 2.0 (the "License");
14 * you may not use this file except in compliance with the License.
15 * You may obtain a copy of the License at
16 *
17 * http://www.apache.org/licenses/LICENSE-2.0
18 *
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
24 *
25 ***********************************************************************
26 *
27 * @filename openapi_snmp.h
28 *
29 * @purpose Simple Network Management Protocol (SNMP) Configuration
30 *
31 * @component OPEN
32 *
33 * @create 09/20/2013
34 *
35 * @end
36 *
37 *********************************************************************/
38 #ifndef OPENAPI_SNMP_H_INCLUDED
39 #define OPENAPI_SNMP_H_INCLUDED
40 
41 #include <stdbool.h>
42 #include "openapi_common.h"
43 
45 #define OPENAPI_SNMP_TAG_LIST_TRAP_NOTIFY_STR "TrapNotify"
46 #define OPENAPI_SNMP_TAG_LIST_INFORM_NOTIFY_STR "InformNotify"
47 #define OPENAPI_SNMP_UDP_IPV4_DOMAIN_STR "snmpUDPDomain"
48 #define OPENAPI_SNMP_UDP_IPV6_DOMAIN_STR "transportDomainUdpIpv6"
49 #define OPENAPI_SNMP_SECURITY_MODEL_SNMPV1_STR "snmpv1"
50 #define OPENAPI_SNMP_SECURITY_MODEL_SNMPV2C_STR "snmpv2c"
51 #define OPENAPI_SNMP_DEFAULT_GROUP_READ_STR "DefaultGroupRead"
52 #define OPENAPI_SNMP_DEFAULT_GROUP_WRITE_STR "DefaultGroupWrite"
53 #define OPENAPI_SNMP_DEFAULT_READ_STR "DefaultRead"
54 #define OPENAPI_SNMP_DEFAULT_WRITE_STR "DefaultWrite"
55 #define OPENAPI_SNMP_DEFAULT_SUPER_STR "DefaultSuper"
56 #define OPENAPI_SNMP_DEFAULT_VIEW_STR "Default"
58 #define OPENAPI_SNMP_INDEX_NOT_FOUND -1
59 #define OPENAPI_SNMP_COMMUNITY_NAME_MAX 21
60 
62 typedef enum
63 {
69 
71 typedef enum
72 {
76 
78 typedef enum
79 {
84 
86 typedef enum
87 {
95 
97 typedef enum
98 {
104 
106 typedef enum
107 {
112 
114 typedef enum
115 {
121 
123 typedef enum
124 {
128 
130 typedef enum
131 {
135 
137 typedef enum
138 {
142 
143 
145 typedef enum
146 {
160 
161 typedef enum
162 {
163  OPEN_SNMP_COMMUNITY_STATUS_VALID = 1,
164  OPEN_SNMP_COMMUNITY_STATUS_INVALID = 2,
165  OPEN_SNMP_COMMUNITY_STATUS_DELETE = 3,
166  OPEN_SNMP_COMMUNITY_STATUS_CONFIG = 4
167 } OPEN_SNMP_COMMUNITY_STATUS_t;
168 
169 typedef enum
170 {
171  OPEN_SNMP_TRAP_VER_NONE = 1,
172  OPEN_SNMP_TRAP_VER_SNMPV1 = 2,
173  OPEN_SNMP_TRAP_VER_SNMPV2C = 3
174 }OPEN_SNMP_TRAP_VERSION_t;
175 
176 typedef struct OPEN_SNMP_COMMUNITY_s
177 {
178  OPEN_SNMP_COMMUNITY_ACCESS_TYPE_t type; /* Community Access Type */
179  open_inet_addr_t ipAddr; /* IPv4 address (optional) */
180  open_inet_addr_t ipMask; /* IPv4 address mask (optional) */
181  OPEN_SNMP_COMMUNITY_STATUS_t status; /* Community Status */
183 
185 {
186  OPEN_SNMP_TRAP_VERSION_t version;
187  OPEN_SNMP_COMMUNITY_STATUS_t status;
189 
190 /*************************************************************************/
219  open_buffdesc *communityName,
221  open_buffdesc *viewName,
222  open_inet_addr_t addr);
223 
224 /*************************************************************************/
245  open_buffdesc *communityName);
246 
247 /*************************************************************************/
276  open_buffdesc *communityName,
278  open_buffdesc *viewName,
279  open_inet_addr_t *addr,
280  open_buffdesc *nextCommunityName);
281 
282 /*************************************************************************/
309  open_buffdesc *communityName,
310  open_buffdesc *groupName,
311  open_inet_addr_t addr);
312 
313 /*************************************************************************/
340  open_buffdesc *filterName,
341  open_buffdesc *oidTree,
342  OPEN_SNMP_NOTIFY_FILTER_TYPE_t filterType);
343 
344 /*************************************************************************/
369  open_buffdesc *filterName,
370  open_buffdesc *oidTree);
371 
372 /*************************************************************************/
404  open_buffdesc *filterName,
405  open_buffdesc *oidTree,
406  OPEN_SNMP_NOTIFY_FILTER_TYPE_t *filterType,
407  open_buffdesc *nextFilterName,
408  open_buffdesc *nextOidTree);
409 
410 /*************************************************************************/
446  open_buffdesc *groupName,
447  OPEN_SNMP_SECURITY_MODEL_t securityModel,
448  OPEN_SNMP_SECURITY_LEVEL_t securityLevel,
449  open_buffdesc *contextPrefix,
450  open_buffdesc *readView,
451  open_buffdesc *writeView,
452  open_buffdesc *notifyView);
453 
454 /*************************************************************************/
480  open_buffdesc *groupName,
481  OPEN_SNMP_SECURITY_MODEL_t securityModel,
482  OPEN_SNMP_SECURITY_LEVEL_t securityLevel,
483  open_buffdesc *contextPrefix);
484 
485 /*************************************************************************/
528  open_buffdesc *groupName,
529  OPEN_SNMP_SECURITY_MODEL_t *securityModel,
530  OPEN_SNMP_SECURITY_LEVEL_t *securityLevel,
531  open_buffdesc *contextPrefix,
532  open_buffdesc *readView,
533  open_buffdesc *writeView,
534  open_buffdesc *notifyView,
535  open_buffdesc *nextGroupName,
536  open_buffdesc *nextContextPrefix);
537 
538 /*************************************************************************/
557 
558 /*************************************************************************/
576  open_buffdesc *engineId);
577 
578 /*************************************************************************/
603  open_buffdesc *engineId);
604 
605 /*************************************************************************/
652  open_buffdesc *userName,
653  open_buffdesc *groupName,
655  open_buffdesc *authPwd,
656  open_buffdesc *authKey,
658  open_buffdesc *privPwd,
659  open_buffdesc *privKey,
660  open_buffdesc *engineId);
661 
662 /*************************************************************************/
688  open_buffdesc *userName,
689  open_buffdesc *engineId);
690 
691 /*************************************************************************/
728  open_buffdesc *userName,
729  open_buffdesc *engineId,
730  open_buffdesc *groupName,
733  open_buffdesc *nextUserName,
734  open_buffdesc *nextEngineId);
735 
736 /*************************************************************************/
774  open_buffdesc *host,
775  uint32_t serverPort,
776  open_buffdesc *securityName,
777  OPEN_SNMP_SECURITY_MODEL_t securityModel,
778  OPEN_SNMP_SECURITY_LEVEL_t securityLevel,
779  OPEN_SNMP_NOTIFY_TYPE_t notifyType,
780  uint32_t timeout,
781  uint32_t retries,
782  open_buffdesc *filter);
783 
784 /*************************************************************************/
804  open_buffdesc *host,
805  OPEN_SNMP_NOTIFY_TYPE_t notifyType);
806 
807 /*************************************************************************/
841  open_buffdesc *host,
842  uint32_t *serverPort,
843  open_buffdesc *securityName,
844  OPEN_SNMP_SECURITY_MODEL_t *securityModel,
845  OPEN_SNMP_SECURITY_LEVEL_t *securityLevel,
846  OPEN_SNMP_NOTIFY_TYPE_t *notifyType,
847  uint32_t *timeout,
848  uint32_t *retries,
849  open_buffdesc *filter,
850  open_buffdesc *nextHost);
851 
852 /*************************************************************************/
869  uint32_t trapFlag,
870  bool *mode);
871 
872 /*************************************************************************/
896  uint32_t trapFlags,
897  bool mode);
898 
899 /*************************************************************************/
920  uint32_t *intf,
921  OPEN_INTF_TYPE_t *type,
922  open_inet_addr_t *addr);
923 
924 /*************************************************************************/
946  uint32_t intf);
947 
948 /*************************************************************************/
975  open_buffdesc *viewName,
976  open_buffdesc *oidTree,
977  OPEN_SNMP_VIEW_TYPE_t viewType);
978 
979 /*************************************************************************/
1005  open_buffdesc *viewName,
1006  open_buffdesc *oidTree);
1007 
1008 /*************************************************************************/
1040  open_buffdesc *viewName,
1041  open_buffdesc *oidTree,
1042  OPEN_SNMP_VIEW_TYPE_t *viewType,
1043  open_buffdesc *nextViewName,
1044  open_buffdesc *nextOidTree);
1045 
1046 /*************************************************************************/
1074  open_buffdesc *name,
1075  open_buffdesc *oidTree,
1077  open_buffdesc *oidString);
1078 
1079 /*************************************************************************/
1108  open_buffdesc *name,
1109  open_buffdesc *oidTree,
1111  open_buffdesc *oidVal);
1112 
1113 /*************************************************************************/
1128  open_buffdesc *sysContact);
1129 
1130 /*************************************************************************/
1151  open_buffdesc *sysContact);
1152 
1153 /*************************************************************************/
1168  open_buffdesc *sysName);
1169 
1170 /*************************************************************************/
1191  open_buffdesc *sysName);
1192 
1193 /*************************************************************************/
1208  open_buffdesc *sysLocation);
1209 
1210 /*************************************************************************/
1230  open_buffdesc *sysLocation);
1231 
1232 /*************************************************************************/
1255  open_buffdesc *communityName,
1256  OPEN_SNMP_COMMUNITY_t community);
1257 
1258 /*************************************************************************/
1278  open_buffdesc *communityName);
1279 
1280 /*************************************************************************/
1301  open_buffdesc *communityName,
1302  open_buffdesc *nextCommunityName);
1303 
1304 /*************************************************************************/
1323  open_buffdesc *communityName,
1324  OPEN_SNMP_COMMUNITY_t *community);
1325 
1326 /*************************************************************************/
1348  open_buffdesc *communityName,
1349  open_inet_addr_t ipAddr,
1350  OPEN_SNMP_TRAP_CONFIG_t trapConfig);
1351 
1352 /*************************************************************************/
1373  open_buffdesc *communityName,
1374  open_inet_addr_t ipAddr);
1375 
1376 /*************************************************************************/
1396  open_buffdesc *communityName,
1397  open_inet_addr_t ipAddr,
1398  OPEN_SNMP_TRAP_CONFIG_t *trapConfig);
1399 
1400 /*************************************************************************/
1420  open_buffdesc *communityName,
1421  open_inet_addr_t ipAddr,
1422  open_buffdesc *nextCommunityName);
1423 
1424 /*************************************************************************/
1444  open_buffdesc *communityName,
1445  open_inet_addr_t ipAddr,
1446  open_inet_addr_t *nextIPAddr);
1447 
1448 #endif /* OPENAPI_SNMP_H_INCLUDED */
1449