38 #ifndef OPENAPI_SNMP_H_INCLUDED
39 #define OPENAPI_SNMP_H_INCLUDED
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
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;
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;
181 OPEN_SNMP_COMMUNITY_STATUS_t status;
186 OPEN_SNMP_TRAP_VERSION_t version;
187 OPEN_SNMP_COMMUNITY_STATUS_t status;
841 uint32_t *serverPort,
open_error_t openapiSnmpCommunityCreate(openapiClientHandle_t *client_handle, open_buffdesc *communityName, OPEN_SNMP_COMMUNITY_ACCESS_TYPE_t accessType, open_buffdesc *viewName, open_inet_addr_t addr)
Create a new, or edit an existing SNMP community.
Unacknowledged trap type.
open_error_t openapiTrapManagerConfigIPGetNext(openapiClientHandle_t *client_handle, open_buffdesc *communityName, open_inet_addr_t ipAddr, open_inet_addr_t *nextIPAddr)
Get next IP address SNMP Trap information.
open_error_t openapiSnmpGroupGetNext(openapiClientHandle_t *client_handle, open_buffdesc *groupName, OPEN_SNMP_SECURITY_MODEL_t *securityModel, OPEN_SNMP_SECURITY_LEVEL_t *securityLevel, open_buffdesc *contextPrefix, open_buffdesc *readView, open_buffdesc *writeView, open_buffdesc *notifyView, open_buffdesc *nextGroupName, open_buffdesc *nextContextPrefix)
Retrieve the next SNMP group entry based on group name.
open_error_t openapiSnmpViewCreate(openapiClientHandle_t *client_handle, open_buffdesc *viewName, open_buffdesc *oidTree, OPEN_SNMP_VIEW_TYPE_t viewType)
Create a new, or edit an existing SNMP view.
open_error_t openapiSnmpFilterGetNext(openapiClientHandle_t *client_handle, open_buffdesc *filterName, open_buffdesc *oidTree, OPEN_SNMP_NOTIFY_FILTER_TYPE_t *filterType, open_buffdesc *nextFilterName, open_buffdesc *nextOidTree)
Retrieve the next SNMP filter entry based on filter name and oidTree.
open_error_t openapiSnmpSysNameGet(openapiClientHandle_t *client_handle, open_buffdesc *sysName)
Get the system name.
OPEN_SNMP_SECURITY_MODEL_t
Security model id.
Power supply status traps.
open_error_t openapiSnmpGroupDelete(openapiClientHandle_t *client_handle, open_buffdesc *groupName, OPEN_SNMP_SECURITY_MODEL_t securityModel, OPEN_SNMP_SECURITY_LEVEL_t securityLevel, open_buffdesc *contextPrefix)
Delete an existing SNMP group.
open_error_t openapiSnmpCommunityGetNext(openapiClientHandle_t *client_handle, open_buffdesc *communityName, OPEN_SNMP_COMMUNITY_ACCESS_TYPE_t *accessType, open_buffdesc *viewName, open_inet_addr_t *addr, open_buffdesc *nextCommunityName)
Retrieve the next SNMP community entry based on community name.
open_error_t openapiSnmpTrapFlagSet(openapiClientHandle_t *client_handle, uint32_t trapFlags, bool mode)
Enable or disable the traps identified via the trapFlags selection.
open_error_t openapiSnmpUserDelete(openapiClientHandle_t *client_handle, open_buffdesc *userName, open_buffdesc *engineId)
Delete an existing SNMP user name entry with a matching engine id.
Excluded from the MIB view.
open_error_t openapiSnmpFilterCreate(openapiClientHandle_t *client_handle, open_buffdesc *filterName, open_buffdesc *oidTree, OPEN_SNMP_NOTIFY_FILTER_TYPE_t filterType)
Create a new, or edit an existing SNMP filter entry.
All interfaces for Port MAC locking security violations.
Temperature status traps.
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiSnmpSysNameSet(openapiClientHandle_t *client_handle, open_buffdesc *sysName)
Set the SNMP system name.
open_error_t openapiSnmpSysContactGet(openapiClientHandle_t *client_handle, open_buffdesc *sysContact)
Get the system contact information.
Communication with authentication and without privacy.
open_error_t openapiSnmpSysLocationGet(openapiClientHandle_t *client_handle, open_buffdesc *sysLocation)
Get the system location information.
open_error_t openapiSnmpLocalEngineIdGet(openapiClientHandle_t *client_handle, open_buffdesc *engineId)
Get the SNMP engine id on the local device.
open_error_t openapiSnmpHostDelete(openapiClientHandle_t *client_handle, open_buffdesc *host, OPEN_SNMP_NOTIFY_TYPE_t notifyType)
Delete an existing SNMPv1/2 or v3 host entry.
OPEN_SNMP_SECURITY_LEVEL_t
SNMPV3 Security levels.
OPEN_SNMP_MESSAGE_PROCESSING_MODEL_t
Message processing model, typically the SNMP version.
open_error_t openapiSnmpLocalEngineIdSet(openapiClientHandle_t *client_handle, open_buffdesc *engineId)
Set the SNMP engine id on the local device.
OPEN_SNMP_VACM_TREE_FAMILY_TYPE_t
Used to identify tree family type MIB.
Communication with authentication and privacy.
Included in the MIB view.
OPEN_SNMP_VIEW_TYPE_t
Exclusion value of the vacmViewTreeFamilyType MIB object.
Included in the MIB view.
All available OSPFv3 traps.
When multiple logins are active.
open_error_t openapiSnmpFilterDelete(openapiClientHandle_t *client_handle, open_buffdesc *filterName, open_buffdesc *oidTree)
Delete an existing SNMP filter entry based on the filterName and optionally the oidTree.
OPEN_SNMP_NOTIFY_FILTER_TYPE_t
Exclusion value of the vacmFilterViewTreeFamilyType MIB object.
open_error_t openapiSnmpTreeFamilyOidValGet(openapiClientHandle_t *client_handle, open_buffdesc *name, open_buffdesc *oidTree, OPEN_SNMP_VACM_TREE_FAMILY_TYPE_t treeType, open_buffdesc *oidVal)
Get the actual OID value for the given view or filter.
open_error_t openapiSnmpSysLocationSet(openapiClientHandle_t *client_handle, open_buffdesc *sysLocation)
Set the SNMP system location.
Communication without authentication and privacy.
OPEN_USM_USER_PRIV_PROTOCOL_t
User-Based Security Model Privilege protocols.
Data Encryption Standard protocol.
open_error_t openapiSnmpLocalEngineIdDelete(openapiClientHandle_t *client_handle)
Delete the SNMP engine id on the local device.
open_error_t openapiSnmpViewDelete(openapiClientHandle_t *client_handle, open_buffdesc *viewName, open_buffdesc *oidTree)
Delete an existing SNMP view entry based on the viewName and optionally the oidTree.
open_error_t openapiSnmpCommunityDelete(openapiClientHandle_t *client_handle, open_buffdesc *communityName)
Delete an existing SNMP community entry and related securityToGroup entries and target tags...
open_error_t openapiSnmpTrapFlagGet(openapiClientHandle_t *client_handle, uint32_t trapFlag, bool *mode)
Retrieve the trap mode for a single trap.
open_error_t openapiSnmpCommunityAndIPAddrDelete(openapiClientHandle_t *client_handle, open_buffdesc *communityName)
Delete an existing SNMP community entry and related securityToGroup entries if SNMP config API is not...
open_error_t openapiSnmpCommunityAndIPAddrCreate(openapiClientHandle_t *client_handle, open_buffdesc *communityName, OPEN_SNMP_COMMUNITY_t community)
Create a new, or edit an existing SNMP community.
open_error_t openapiSnmpTreeFamilyOidStringGet(openapiClientHandle_t *client_handle, open_buffdesc *name, open_buffdesc *oidTree, OPEN_SNMP_VACM_TREE_FAMILY_TYPE_t treeType, open_buffdesc *oidString)
Get the translated string representation of an OID for the given view or filter.
open_error_t openapiTrapManagerConfigCreate(openapiClientHandle_t *client_handle, open_buffdesc *communityName, open_inet_addr_t ipAddr, OPEN_SNMP_TRAP_CONFIG_t trapConfig)
Create a new, or edit an existing SNMP Trap entry.
open_error_t openapiSnmpCommunityAndIPAddrGetNext(openapiClientHandle_t *client_handle, open_buffdesc *communityName, open_buffdesc *nextCommunityName)
Retrieve the next SNMP community entry based on community name.
open_error_t openapiSnmpTrapSrcIntfGet(openapiClientHandle_t *client_handle, uint32_t *intf, OPEN_INTF_TYPE_t *type, open_inet_addr_t *addr)
Get the source interface which SNMP trap originates.
User authentication traps.
Switch level link up/down traps.
open_error_t openapiSnmpHostCreate(openapiClientHandle_t *client_handle, open_buffdesc *host, uint32_t serverPort, open_buffdesc *securityName, OPEN_SNMP_SECURITY_MODEL_t securityModel, OPEN_SNMP_SECURITY_LEVEL_t securityLevel, OPEN_SNMP_NOTIFY_TYPE_t notifyType, uint32_t timeout, uint32_t retries, open_buffdesc *filter)
Create an SNMPv1/2 or v3 host.
OPEN_USM_USER_AUTH_PROTOCOL_t
User-Based Security Model Authentication protocols.
User-Based Security Model.
Message Digest Algorithm.
open_error_t openapiTrapManagerConfigCommunityGetNext(openapiClientHandle_t *client_handle, open_buffdesc *communityName, open_inet_addr_t ipAddr, open_buffdesc *nextCommunityName)
Get next community SNMP Trap information.
open_error_t openapiSnmpViewGetNext(openapiClientHandle_t *client_handle, open_buffdesc *viewName, open_buffdesc *oidTree, OPEN_SNMP_VIEW_TYPE_t *viewType, open_buffdesc *nextViewName, open_buffdesc *nextOidTree)
Retrieve the next SNMP view entry based on view name and oidTree.
OPEN_SNMP_TRAP_FLAGS_t
Supported SNMP trap flags.
open_error_t openapiSnmpCommunityAndIPAddrGet(openapiClientHandle_t *client_handle, open_buffdesc *communityName, OPEN_SNMP_COMMUNITY_t *community)
Gets an existing SNMP community.
OPEN_SNMP_COMMUNITY_ACCESS_TYPE_t
SNMP Community access types.
open_error_t openapiSnmpSysContactSet(openapiClientHandle_t *client_handle, open_buffdesc *sysContact)
Set the SNMP system contact.
open_error_t openapiSnmpTrapSrcIntfSet(openapiClientHandle_t *client_handle, uint32_t intf)
Set the source interface which SNMP trap originates.
OPEN_SNMP_NOTIFY_TYPE_t
SNMP Notification types.
User authentication traps.
open_error_t openapiTrapManagerConfigGet(openapiClientHandle_t *client_handle, open_buffdesc *communityName, open_inet_addr_t ipAddr, OPEN_SNMP_TRAP_CONFIG_t *trapConfig)
Get SNMP Trap information.
open_error_t openapiSnmpUserGetNext(openapiClientHandle_t *client_handle, open_buffdesc *userName, open_buffdesc *engineId, open_buffdesc *groupName, OPEN_USM_USER_AUTH_PROTOCOL_t *authProto, OPEN_USM_USER_PRIV_PROTOCOL_t *privProto, open_buffdesc *nextUserName, open_buffdesc *nextEngineId)
Retrieve the next SNMP user entry based on user name and engine id.
open_error_t openapiSnmpGroupCreate(openapiClientHandle_t *client_handle, open_buffdesc *groupName, OPEN_SNMP_SECURITY_MODEL_t securityModel, OPEN_SNMP_SECURITY_LEVEL_t securityLevel, open_buffdesc *contextPrefix, open_buffdesc *readView, open_buffdesc *writeView, open_buffdesc *notifyView)
Create a new SNMP group.
All available OSPFv2 traps.
Excluded from the MIB view.
open_error_t openapiTrapManagerConfigDelete(openapiClientHandle_t *client_handle, open_buffdesc *communityName, open_inet_addr_t ipAddr)
Deletes an existing SNMP Trap entry and related entries if SNMP config API is not supported...
open_error_t openapiSnmpCommunityGroupCreate(openapiClientHandle_t *client_handle, open_buffdesc *communityName, open_buffdesc *groupName, open_inet_addr_t addr)
Map a new internal security name for SNMP v1 and SNMP v2 security models to an existing group name...
open_error_t openapiSnmpUserCreate(openapiClientHandle_t *client_handle, open_buffdesc *userName, open_buffdesc *groupName, OPEN_USM_USER_AUTH_PROTOCOL_t authProto, open_buffdesc *authPwd, open_buffdesc *authKey, OPEN_USM_USER_PRIV_PROTOCOL_t privProto, open_buffdesc *privPwd, open_buffdesc *privKey, open_buffdesc *engineId)
Create a new SNMP user entry.
open_error_t openapiSnmpHostGetNext(openapiClientHandle_t *client_handle, open_buffdesc *host, uint32_t *serverPort, open_buffdesc *securityName, OPEN_SNMP_SECURITY_MODEL_t *securityModel, OPEN_SNMP_SECURITY_LEVEL_t *securityLevel, OPEN_SNMP_NOTIFY_TYPE_t *notifyType, uint32_t *timeout, uint32_t *retries, open_buffdesc *filter, open_buffdesc *nextHost)
Retrieve the next SNMPv1/2 or v3 host based on host IP address.