Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.4.4.5
Welcome
ADK Documentation
API Reference
Files
File List
Globals
api
include
openapi_snmp.h
Go to the documentation of this file.
1
9
/**********************************************************************
10
*
11
* Copyright 2016-2018 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"
59
typedef enum
60
{
61
OPEN_SNMP_COMMUNITY_ACCESS_NONE
= 0,
62
OPEN_SNMP_COMMUNITY_ACCESS_RO
= 1,
63
OPEN_SNMP_COMMUNITY_ACCESS_RW
= 2,
64
OPEN_SNMP_COMMUNITY_ACCESS_SU
= 3
65
}
OPEN_SNMP_COMMUNITY_ACCESS_TYPE_t
;
66
68
typedef
enum
69
{
70
OPEN_SNMP_NOTIFY_TYPE_TRAP
= 1,
71
OPEN_SNMP_NOTIFY_TYPE_INFORM
= 2
72
}
OPEN_SNMP_NOTIFY_TYPE_t
;
73
75
typedef
enum
76
{
77
OPEN_USM_USER_AUTH_PROTOCOL_NONE
= 0,
78
OPEN_USM_USER_AUTH_PROTOCOL_SHA
= 1,
79
OPEN_USM_USER_AUTH_PROTOCOL_MD5
= 2
80
}
OPEN_USM_USER_AUTH_PROTOCOL_t
;
81
83
typedef
enum
84
{
85
OPEN_USM_USER_PRIV_PROTOCOL_NONE
= 0,
86
OPEN_USM_USER_PRIV_PROTOCOL_DES
= 1,
87
OPEN_USM_USER_PRIV_PROTOCOL_3DES
= 2,
88
OPEN_USM_USER_PRIV_PROTOCOL_AES128
= 3,
89
OPEN_USM_USER_PRIV_PROTOCOL_AES192
= 4,
90
OPEN_USM_USER_PRIV_PROTOCOL_AES256
= 5
91
}
OPEN_USM_USER_PRIV_PROTOCOL_t
;
92
94
typedef
enum
95
{
96
OPEN_SNMP_SECURITY_MODEL_ANY
= 0,
97
OPEN_SNMP_SECURITY_MODEL_SNMPV1
= 1,
98
OPEN_SNMP_SECURITY_MODEL_SNMPV2C
= 2,
99
OPEN_SNMP_SECURITY_MODEL_USM
= 3
100
}
OPEN_SNMP_SECURITY_MODEL_t
;
101
103
typedef
enum
104
{
105
OPEN_SNMP_SECURITY_LEVEL_NOAUTHNOPRIV
= 1,
106
OPEN_SNMP_SECURITY_LEVEL_AUTHNOPRIV
= 2,
107
OPEN_SNMP_SECURITY_LEVEL_AUTHPRIV
= 3
108
}
OPEN_SNMP_SECURITY_LEVEL_t
;
109
111
typedef
enum
112
{
113
OPEN_SNMP_MESSAGE_PROCESSING_MODEL_SNMPV1
= 0,
114
OPEN_SNMP_MESSAGE_PROCESSING_MODEL_SNMPV2C
= 1,
115
OPEN_SNMP_MESSAGE_PROCESSING_MODEL_SNMPV2U
= 2,
116
OPEN_SNMP_MESSAGE_PROCESSING_MODEL_SNMPV3
= 3
117
}
OPEN_SNMP_MESSAGE_PROCESSING_MODEL_t
;
118
120
typedef
enum
121
{
122
OPEN_SNMP_VIEW_TYPE_INCLUDED
= 1,
123
OPEN_SNMP_VIEW_TYPE_EXCLUDED
= 2
124
}
OPEN_SNMP_VIEW_TYPE_t
;
125
127
typedef
enum
128
{
129
OPEN_SNMP_NOTIFY_FILTER_TYPE_INCLUDED
= 1,
130
OPEN_SNMP_NOTIFY_FILTER_TYPE_EXCLUDED
= 2
131
}
OPEN_SNMP_NOTIFY_FILTER_TYPE_t
;
132
134
typedef
enum
135
{
136
OPEN_SNMP_VIEW_TREE
= 1,
137
OPEN_SNMP_FILTER_TREE
= 2
138
}
OPEN_SNMP_VACM_TREE_FAMILY_TYPE_t
;
139
140
142
typedef
enum
143
{
144
OPEN_SNMP_ACL_TRAP_FLAG
= 1,
145
OPEN_SNMP_BOXS_FAN_STATUS_TRAP_FLAG
= 2,
146
OPEN_SNMP_BOXS_POWER_STATUS_TRAP_FLAG
= 4,
147
OPEN_SNMP_BOXS_TEMP_STATUS_TRAP_FLAG
= 8,
148
OPEN_SNMP_BGP_TRAP_FLAG
= 16,
149
OPEN_SNMP_LINK_MODE_TRAP_FLAG
= 32,
150
OPEN_SNMP_MULTI_USERS_TRAP_FLAG
= 64,
151
OPEN_SNMP_OSPFV2_TRAP_FLAG
= 128,
152
OPEN_SNMP_OSPFV3_TRAP_FLAG
= 256,
153
OPEN_SNMP_STP_MODE_TRAP_FLAG
= 512,
154
OPEN_SNMP_USER_AUTH_TRAP_FLAG
= 1024,
155
OPEN_SNMP_VIOLATION_TRAP_FLAG
= 2048
156
}
OPEN_SNMP_TRAP_FLAGS_t
;
157
158
/*************************************************************************/
186
open_error_t
openapiSnmpCommunityCreate
(
openapiClientHandle_t
*client_handle,
187
open_buffdesc
*communityName,
188
OPEN_SNMP_COMMUNITY_ACCESS_TYPE_t
accessType,
189
open_buffdesc
*viewName,
190
open_inet_addr_t
addr);
191
192
/*************************************************************************/
212
open_error_t
openapiSnmpCommunityDelete
(
openapiClientHandle_t
*client_handle,
213
open_buffdesc
*communityName);
214
215
/*************************************************************************/
243
open_error_t
openapiSnmpCommunityGetNext
(
openapiClientHandle_t
*client_handle,
244
open_buffdesc
*communityName,
245
OPEN_SNMP_COMMUNITY_ACCESS_TYPE_t
*accessType,
246
open_buffdesc
*viewName,
247
open_inet_addr_t
*addr,
248
open_buffdesc
*nextCommunityName);
249
250
/*************************************************************************/
276
open_error_t
openapiSnmpCommunityGroupCreate
(
openapiClientHandle_t
*client_handle,
277
open_buffdesc
*communityName,
278
open_buffdesc
*groupName,
279
open_inet_addr_t
addr);
280
281
/*************************************************************************/
307
open_error_t
openapiSnmpFilterCreate
(
openapiClientHandle_t
*client_handle,
308
open_buffdesc
*filterName,
309
open_buffdesc
*oidTree,
310
OPEN_SNMP_NOTIFY_FILTER_TYPE_t
filterType);
311
312
/*************************************************************************/
336
open_error_t
openapiSnmpFilterDelete
(
openapiClientHandle_t
*client_handle,
337
open_buffdesc
*filterName,
338
open_buffdesc
*oidTree);
339
340
/*************************************************************************/
371
open_error_t
openapiSnmpFilterGetNext
(
openapiClientHandle_t
*client_handle,
372
open_buffdesc
*filterName,
373
open_buffdesc
*oidTree,
374
OPEN_SNMP_NOTIFY_FILTER_TYPE_t
*filterType,
375
open_buffdesc
*nextFilterName,
376
open_buffdesc
*nextOidTree);
377
378
/*************************************************************************/
413
open_error_t
openapiSnmpGroupCreate
(
openapiClientHandle_t
*client_handle,
414
open_buffdesc
*groupName,
415
OPEN_SNMP_SECURITY_MODEL_t
securityModel,
416
OPEN_SNMP_SECURITY_LEVEL_t
securityLevel,
417
open_buffdesc
*contextPrefix,
418
open_buffdesc
*readView,
419
open_buffdesc
*writeView,
420
open_buffdesc
*notifyView);
421
422
/*************************************************************************/
447
open_error_t
openapiSnmpGroupDelete
(
openapiClientHandle_t
*client_handle,
448
open_buffdesc
*groupName,
449
OPEN_SNMP_SECURITY_MODEL_t
securityModel,
450
OPEN_SNMP_SECURITY_LEVEL_t
securityLevel,
451
open_buffdesc
*contextPrefix);
452
453
/*************************************************************************/
495
open_error_t
openapiSnmpGroupGetNext
(
openapiClientHandle_t
*client_handle,
496
open_buffdesc
*groupName,
497
OPEN_SNMP_SECURITY_MODEL_t
*securityModel,
498
OPEN_SNMP_SECURITY_LEVEL_t
*securityLevel,
499
open_buffdesc
*contextPrefix,
500
open_buffdesc
*readView,
501
open_buffdesc
*writeView,
502
open_buffdesc
*notifyView,
503
open_buffdesc
*nextGroupName,
504
open_buffdesc
*nextContextPrefix);
505
506
/*************************************************************************/
524
open_error_t
openapiSnmpLocalEngineIdDelete
(
openapiClientHandle_t
*client_handle);
525
526
/*************************************************************************/
543
open_error_t
openapiSnmpLocalEngineIdGet
(
openapiClientHandle_t
*client_handle,
544
open_buffdesc
*engineId);
545
546
/*************************************************************************/
570
open_error_t
openapiSnmpLocalEngineIdSet
(
openapiClientHandle_t
*client_handle,
571
open_buffdesc
*engineId);
572
573
/*************************************************************************/
618
open_error_t
openapiSnmpUserCreate
(
openapiClientHandle_t
*client_handle,
619
open_buffdesc
*userName,
620
open_buffdesc
*groupName,
621
OPEN_USM_USER_AUTH_PROTOCOL_t
authProto,
622
open_buffdesc
*authPwd,
623
open_buffdesc
*authKey,
624
OPEN_USM_USER_PRIV_PROTOCOL_t
privProto,
625
open_buffdesc
*privPwd,
626
open_buffdesc
*privKey,
627
open_buffdesc
*engineId);
628
629
/*************************************************************************/
654
open_error_t
openapiSnmpUserDelete
(
openapiClientHandle_t
*client_handle,
655
open_buffdesc
*userName,
656
open_buffdesc
*engineId);
657
658
/*************************************************************************/
694
open_error_t
openapiSnmpUserGetNext
(
openapiClientHandle_t
*client_handle,
695
open_buffdesc
*userName,
696
open_buffdesc
*engineId,
697
open_buffdesc
*groupName,
698
OPEN_USM_USER_AUTH_PROTOCOL_t
*authProto,
699
OPEN_USM_USER_PRIV_PROTOCOL_t
*privProto,
700
open_buffdesc
*nextUserName,
701
open_buffdesc
*nextEngineId);
702
703
/*************************************************************************/
740
open_error_t
openapiSnmpHostCreate
(
openapiClientHandle_t
*client_handle,
741
open_buffdesc
*host,
742
uint32_t serverPort,
743
open_buffdesc
*securityName,
744
OPEN_SNMP_SECURITY_MODEL_t
securityModel,
745
OPEN_SNMP_SECURITY_LEVEL_t
securityLevel,
746
OPEN_SNMP_NOTIFY_TYPE_t
notifyType,
747
uint32_t timeout,
748
uint32_t retries,
749
open_buffdesc
*filter);
750
751
/*************************************************************************/
770
open_error_t
openapiSnmpHostDelete
(
openapiClientHandle_t
*client_handle,
771
open_buffdesc
*host,
772
OPEN_SNMP_NOTIFY_TYPE_t
notifyType);
773
774
/*************************************************************************/
807
open_error_t
openapiSnmpHostGetNext
(
openapiClientHandle_t
*client_handle,
808
open_buffdesc
*host,
809
uint32_t *serverPort,
810
open_buffdesc
*securityName,
811
OPEN_SNMP_SECURITY_MODEL_t
*securityModel,
812
OPEN_SNMP_SECURITY_LEVEL_t
*securityLevel,
813
OPEN_SNMP_NOTIFY_TYPE_t
*notifyType,
814
uint32_t *timeout,
815
uint32_t *retries,
816
open_buffdesc
*filter,
817
open_buffdesc
*nextHost);
818
819
/*************************************************************************/
835
open_error_t
openapiSnmpTrapFlagGet
(
openapiClientHandle_t
*client_handle,
836
uint32_t trapFlag,
837
bool
*mode);
838
839
/*************************************************************************/
861
open_error_t
openapiSnmpTrapFlagSet
(
openapiClientHandle_t
*client_handle,
862
uint32_t trapFlags,
863
bool
mode);
864
865
/*************************************************************************/
885
open_error_t
openapiSnmpTrapSrcIntfGet
(
openapiClientHandle_t
*client_handle,
886
uint32_t *intf,
887
OPEN_INTF_TYPE_t
*type,
888
open_inet_addr_t
*addr);
889
890
/*************************************************************************/
911
open_error_t
openapiSnmpTrapSrcIntfSet
(
openapiClientHandle_t
*client_handle,
912
uint32_t intf);
913
914
/*************************************************************************/
940
open_error_t
openapiSnmpViewCreate
(
openapiClientHandle_t
*client_handle,
941
open_buffdesc
*viewName,
942
open_buffdesc
*oidTree,
943
OPEN_SNMP_VIEW_TYPE_t
viewType);
944
945
/*************************************************************************/
970
open_error_t
openapiSnmpViewDelete
(
openapiClientHandle_t
*client_handle,
971
open_buffdesc
*viewName,
972
open_buffdesc
*oidTree);
973
974
/*************************************************************************/
1005
open_error_t
openapiSnmpViewGetNext
(
openapiClientHandle_t
*client_handle,
1006
open_buffdesc
*viewName,
1007
open_buffdesc
*oidTree,
1008
OPEN_SNMP_VIEW_TYPE_t
*viewType,
1009
open_buffdesc
*nextViewName,
1010
open_buffdesc
*nextOidTree);
1011
1012
/*************************************************************************/
1039
open_error_t
openapiSnmpTreeFamilyOidStringGet
(
openapiClientHandle_t
*client_handle,
1040
open_buffdesc
*name,
1041
open_buffdesc
*oidTree,
1042
OPEN_SNMP_VACM_TREE_FAMILY_TYPE_t
treeType,
1043
open_buffdesc
*oidString);
1044
1045
/*************************************************************************/
1073
open_error_t
openapiSnmpTreeFamilyOidValGet
(
openapiClientHandle_t
*client_handle,
1074
open_buffdesc
*name,
1075
open_buffdesc
*oidTree,
1076
OPEN_SNMP_VACM_TREE_FAMILY_TYPE_t
treeType,
1077
open_buffdesc
*oidVal);
1078
1079
/*************************************************************************/
1093
open_error_t
openapiSnmpSysContactGet
(
openapiClientHandle_t
*client_handle,
1094
open_buffdesc
*sysContact);
1095
1096
/*************************************************************************/
1116
open_error_t
openapiSnmpSysContactSet
(
openapiClientHandle_t
*client_handle,
1117
open_buffdesc
*sysContact);
1118
1119
/*************************************************************************/
1133
open_error_t
openapiSnmpSysNameGet
(
openapiClientHandle_t
*client_handle,
1134
open_buffdesc
*sysName);
1135
1136
/*************************************************************************/
1156
open_error_t
openapiSnmpSysNameSet
(
openapiClientHandle_t
*client_handle,
1157
open_buffdesc
*sysName);
1158
1159
/*************************************************************************/
1173
open_error_t
openapiSnmpSysLocationGet
(
openapiClientHandle_t
*client_handle,
1174
open_buffdesc
*sysLocation);
1175
1176
/*************************************************************************/
1195
open_error_t
openapiSnmpSysLocationSet
(
openapiClientHandle_t
*client_handle,
1196
open_buffdesc
*sysLocation);
1197
1198
#endif
/* OPENAPI_SNMP_H_INCLUDED */
1199
© 2020 by Broadcom. All rights reserved.