Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Data Structures | Macros | Typedefs | Enumerations | Functions
Simple Network Management Protocol (SNMP) Configuration [OPENAPI_SNMP]

Data Structures

struct  OPEN_SNMP_COMMUNITY_s
 
struct  OPEN_SNMP_TRAP_CONFIG_s
 

Macros

#define OPENAPI_SNMP_COMMUNITY_NAME_MAX   21
 
#define OPENAPI_SNMP_DEFAULT_GROUP_READ_STR   "DefaultGroupRead"
 default group read
 
#define OPENAPI_SNMP_DEFAULT_GROUP_WRITE_STR   "DefaultGroupWrite"
 default group write
 
#define OPENAPI_SNMP_DEFAULT_READ_STR   "DefaultRead"
 default RO read community
 
#define OPENAPI_SNMP_DEFAULT_SUPER_STR   "DefaultSuper"
 default SU Super community
 
#define OPENAPI_SNMP_DEFAULT_VIEW_STR   "Default"
 default view name
 
#define OPENAPI_SNMP_DEFAULT_WRITE_STR   "DefaultWrite"
 default RW write community
 
#define OPENAPI_SNMP_INDEX_NOT_FOUND   -1
 
#define OPENAPI_SNMP_SECURITY_MODEL_SNMPV1_STR   "snmpv1"
 security model name
 
#define OPENAPI_SNMP_SECURITY_MODEL_SNMPV2C_STR   "snmpv2c"
 security model name
 
#define OPENAPI_SNMP_TAG_LIST_INFORM_NOTIFY_STR   "InformNotify"
 Inform tag list.
 
#define OPENAPI_SNMP_TAG_LIST_TRAP_NOTIFY_STR   "TrapNotify"
 Common string names. More...
 
#define OPENAPI_SNMP_UDP_IPV4_DOMAIN_STR   "snmpUDPDomain"
 IPv4 domain.
 
#define OPENAPI_SNMP_UDP_IPV6_DOMAIN_STR   "transportDomainUdpIpv6"
 IPv6 domain.
 

Typedefs

typedef struct OPEN_SNMP_COMMUNITY_s OPEN_SNMP_COMMUNITY_t
 
typedef struct OPEN_SNMP_TRAP_CONFIG_s OPEN_SNMP_TRAP_CONFIG_t
 

Enumerations

enum  OPEN_SNMP_COMMUNITY_ACCESS_TYPE_t { OPEN_SNMP_COMMUNITY_ACCESS_NONE = 0, OPEN_SNMP_COMMUNITY_ACCESS_RO = 1, OPEN_SNMP_COMMUNITY_ACCESS_RW = 2, OPEN_SNMP_COMMUNITY_ACCESS_SU = 3 }
 SNMP Community access types. More...
 
enum  OPEN_SNMP_COMMUNITY_STATUS_t { OPEN_SNMP_COMMUNITY_STATUS_VALID = 1, OPEN_SNMP_COMMUNITY_STATUS_INVALID = 2, OPEN_SNMP_COMMUNITY_STATUS_DELETE = 3, OPEN_SNMP_COMMUNITY_STATUS_CONFIG = 4 }
 
enum  OPEN_SNMP_MESSAGE_PROCESSING_MODEL_t { OPEN_SNMP_MESSAGE_PROCESSING_MODEL_SNMPV1 = 0, OPEN_SNMP_MESSAGE_PROCESSING_MODEL_SNMPV2C = 1, OPEN_SNMP_MESSAGE_PROCESSING_MODEL_SNMPV2U = 2, OPEN_SNMP_MESSAGE_PROCESSING_MODEL_SNMPV3 = 3 }
 Message processing model, typically the SNMP version. More...
 
enum  OPEN_SNMP_NOTIFY_FILTER_TYPE_t { OPEN_SNMP_NOTIFY_FILTER_TYPE_INCLUDED = 1, OPEN_SNMP_NOTIFY_FILTER_TYPE_EXCLUDED = 2 }
 Exclusion value of the vacmFilterViewTreeFamilyType MIB object. More...
 
enum  OPEN_SNMP_NOTIFY_TYPE_t { OPEN_SNMP_NOTIFY_TYPE_TRAP = 1, OPEN_SNMP_NOTIFY_TYPE_INFORM = 2 }
 SNMP Notification types. More...
 
enum  OPEN_SNMP_SECURITY_LEVEL_t { OPEN_SNMP_SECURITY_LEVEL_NOAUTHNOPRIV = 1, OPEN_SNMP_SECURITY_LEVEL_AUTHNOPRIV = 2, OPEN_SNMP_SECURITY_LEVEL_AUTHPRIV = 3 }
 SNMPV3 Security levels. More...
 
enum  OPEN_SNMP_SECURITY_MODEL_t { OPEN_SNMP_SECURITY_MODEL_ANY = 0, OPEN_SNMP_SECURITY_MODEL_SNMPV1 = 1, OPEN_SNMP_SECURITY_MODEL_SNMPV2C = 2, OPEN_SNMP_SECURITY_MODEL_USM = 3 }
 Security model id. More...
 
enum  OPEN_SNMP_TRAP_FLAGS_t {
  OPEN_SNMP_ACL_TRAP_FLAG = 1, OPEN_SNMP_BOXS_FAN_STATUS_TRAP_FLAG = 2, OPEN_SNMP_BOXS_POWER_STATUS_TRAP_FLAG = 4, OPEN_SNMP_BOXS_TEMP_STATUS_TRAP_FLAG = 8,
  OPEN_SNMP_BGP_TRAP_FLAG = 16, OPEN_SNMP_LINK_MODE_TRAP_FLAG = 32, OPEN_SNMP_MULTI_USERS_TRAP_FLAG = 64, OPEN_SNMP_OSPFV2_TRAP_FLAG = 128,
  OPEN_SNMP_OSPFV3_TRAP_FLAG = 256, OPEN_SNMP_STP_MODE_TRAP_FLAG = 512, OPEN_SNMP_USER_AUTH_TRAP_FLAG = 1024, OPEN_SNMP_VIOLATION_TRAP_FLAG = 2048
}
 Supported SNMP trap flags. More...
 
enum  OPEN_SNMP_TRAP_VERSION_t { OPEN_SNMP_TRAP_VER_NONE = 1, OPEN_SNMP_TRAP_VER_SNMPV1 = 2, OPEN_SNMP_TRAP_VER_SNMPV2C = 3 }
 
enum  OPEN_SNMP_VACM_TREE_FAMILY_TYPE_t { OPEN_SNMP_VIEW_TREE = 1, OPEN_SNMP_FILTER_TREE = 2 }
 Used to identify tree family type MIB. More...
 
enum  OPEN_SNMP_VIEW_TYPE_t { OPEN_SNMP_VIEW_TYPE_INCLUDED = 1, OPEN_SNMP_VIEW_TYPE_EXCLUDED = 2 }
 Exclusion value of the vacmViewTreeFamilyType MIB object. More...
 
enum  OPEN_USM_USER_AUTH_PROTOCOL_t { OPEN_USM_USER_AUTH_PROTOCOL_NONE = 0, OPEN_USM_USER_AUTH_PROTOCOL_SHA = 1, OPEN_USM_USER_AUTH_PROTOCOL_MD5 = 2 }
 User-Based Security Model Authentication protocols. More...
 
enum  OPEN_USM_USER_PRIV_PROTOCOL_t {
  OPEN_USM_USER_PRIV_PROTOCOL_NONE = 0, OPEN_USM_USER_PRIV_PROTOCOL_DES = 1, OPEN_USM_USER_PRIV_PROTOCOL_3DES = 2, OPEN_USM_USER_PRIV_PROTOCOL_AES128 = 3,
  OPEN_USM_USER_PRIV_PROTOCOL_AES192 = 4, OPEN_USM_USER_PRIV_PROTOCOL_AES256 = 5
}
 User-Based Security Model Privilege protocols. More...
 

Functions

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. More...
 
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 supported. More...
 
open_error_t openapiSnmpCommunityAndIPAddrGet (openapiClientHandle_t *client_handle, open_buffdesc *communityName, OPEN_SNMP_COMMUNITY_t *community)
 Gets an existing SNMP community. More...
 
open_error_t openapiSnmpCommunityAndIPAddrGetNext (openapiClientHandle_t *client_handle, open_buffdesc *communityName, open_buffdesc *nextCommunityName)
 Retrieve the next SNMP community entry based on community name. More...
 
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. More...
 
open_error_t openapiSnmpCommunityDelete (openapiClientHandle_t *client_handle, open_buffdesc *communityName)
 Delete an existing SNMP community entry and related securityToGroup entries and target tags. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
open_error_t openapiSnmpLocalEngineIdDelete (openapiClientHandle_t *client_handle)
 Delete the SNMP engine id on the local device. More...
 
open_error_t openapiSnmpLocalEngineIdGet (openapiClientHandle_t *client_handle, open_buffdesc *engineId)
 Get the SNMP engine id on the local device. More...
 
open_error_t openapiSnmpLocalEngineIdSet (openapiClientHandle_t *client_handle, open_buffdesc *engineId)
 Set the SNMP engine id on the local device. More...
 
open_error_t openapiSnmpSysContactGet (openapiClientHandle_t *client_handle, open_buffdesc *sysContact)
 Get the system contact information. More...
 
open_error_t openapiSnmpSysContactSet (openapiClientHandle_t *client_handle, open_buffdesc *sysContact)
 Set the SNMP system contact. More...
 
open_error_t openapiSnmpSysLocationGet (openapiClientHandle_t *client_handle, open_buffdesc *sysLocation)
 Get the system location information. More...
 
open_error_t openapiSnmpSysLocationSet (openapiClientHandle_t *client_handle, open_buffdesc *sysLocation)
 Set the SNMP system location. More...
 
open_error_t openapiSnmpSysNameGet (openapiClientHandle_t *client_handle, open_buffdesc *sysName)
 Get the system name. More...
 
open_error_t openapiSnmpSysNameSet (openapiClientHandle_t *client_handle, open_buffdesc *sysName)
 Set the SNMP system name. More...
 
open_error_t openapiSnmpTrapFlagGet (openapiClientHandle_t *client_handle, uint32_t trapFlag, bool *mode)
 Retrieve the trap mode for a single trap. More...
 
open_error_t openapiSnmpTrapFlagSet (openapiClientHandle_t *client_handle, uint32_t trapFlags, bool mode)
 Enable or disable the traps identified via the trapFlags selection. More...
 
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. More...
 
open_error_t openapiSnmpTrapSrcIntfSet (openapiClientHandle_t *client_handle, uint32_t intf)
 Set the source interface which SNMP trap originates. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

Detailed Description

Macro Definition Documentation

#define OPENAPI_SNMP_TAG_LIST_TRAP_NOTIFY_STR   "TrapNotify"

Common string names.

Trap tag list

Definition at line 45 of file openapi_snmp.h.

Enumeration Type Documentation

SNMP Community access types.

Enumerator
OPEN_SNMP_COMMUNITY_ACCESS_NONE 

Not specified.

OPEN_SNMP_COMMUNITY_ACCESS_RO 

Read-only type.

OPEN_SNMP_COMMUNITY_ACCESS_RW 

Read-write type.

OPEN_SNMP_COMMUNITY_ACCESS_SU 

Super-user type.

Definition at line 62 of file openapi_snmp.h.

Message processing model, typically the SNMP version.

Enumerator
OPEN_SNMP_MESSAGE_PROCESSING_MODEL_SNMPV1 

SNMP V1.

OPEN_SNMP_MESSAGE_PROCESSING_MODEL_SNMPV2C 

SNMP V2 community-based.

OPEN_SNMP_MESSAGE_PROCESSING_MODEL_SNMPV2U 

SNMP V2 user-based.

OPEN_SNMP_MESSAGE_PROCESSING_MODEL_SNMPV3 

SNMP V3.

Definition at line 114 of file openapi_snmp.h.

Exclusion value of the vacmFilterViewTreeFamilyType MIB object.

Enumerator
OPEN_SNMP_NOTIFY_FILTER_TYPE_INCLUDED 

Included in the MIB view.

OPEN_SNMP_NOTIFY_FILTER_TYPE_EXCLUDED 

Excluded from the MIB view.

Definition at line 130 of file openapi_snmp.h.

SNMP Notification types.

Enumerator
OPEN_SNMP_NOTIFY_TYPE_TRAP 

Unacknowledged trap type.

OPEN_SNMP_NOTIFY_TYPE_INFORM 

Acknowledged trap type.

Definition at line 71 of file openapi_snmp.h.

SNMPV3 Security levels.

Enumerator
OPEN_SNMP_SECURITY_LEVEL_NOAUTHNOPRIV 

Communication without authentication and privacy.

OPEN_SNMP_SECURITY_LEVEL_AUTHNOPRIV 

Communication with authentication and without privacy.

OPEN_SNMP_SECURITY_LEVEL_AUTHPRIV 

Communication with authentication and privacy.

Definition at line 106 of file openapi_snmp.h.

Security model id.

Enumerator
OPEN_SNMP_SECURITY_MODEL_ANY 

Any version.

OPEN_SNMP_SECURITY_MODEL_SNMPV1 

SNMP v1.

OPEN_SNMP_SECURITY_MODEL_SNMPV2C 

SNMP V2c.

OPEN_SNMP_SECURITY_MODEL_USM 

User-Based Security Model.

Definition at line 97 of file openapi_snmp.h.

Supported SNMP trap flags.

Enumerator
OPEN_SNMP_ACL_TRAP_FLAG 

User authentication traps.

OPEN_SNMP_BOXS_FAN_STATUS_TRAP_FLAG 

Fan status traps.

OPEN_SNMP_BOXS_POWER_STATUS_TRAP_FLAG 

Power supply status traps.

OPEN_SNMP_BOXS_TEMP_STATUS_TRAP_FLAG 

Temperature status traps.

OPEN_SNMP_BGP_TRAP_FLAG 

All available BGP traps.

OPEN_SNMP_LINK_MODE_TRAP_FLAG 

Switch level link up/down traps.

OPEN_SNMP_MULTI_USERS_TRAP_FLAG 

When multiple logins are active.

OPEN_SNMP_OSPFV2_TRAP_FLAG 

All available OSPFv2 traps.

OPEN_SNMP_OSPFV3_TRAP_FLAG 

All available OSPFv3 traps.

OPEN_SNMP_STP_MODE_TRAP_FLAG 

Spanning Tree traps.

OPEN_SNMP_USER_AUTH_TRAP_FLAG 

User authentication traps.

OPEN_SNMP_VIOLATION_TRAP_FLAG 

All interfaces for Port MAC locking security violations.

Definition at line 145 of file openapi_snmp.h.

Used to identify tree family type MIB.

Enumerator
OPEN_SNMP_VIEW_TREE 

VACM view tree family.

OPEN_SNMP_FILTER_TREE 

VACM filter tree family.

Definition at line 137 of file openapi_snmp.h.

Exclusion value of the vacmViewTreeFamilyType MIB object.

Enumerator
OPEN_SNMP_VIEW_TYPE_INCLUDED 

Included in the MIB view.

OPEN_SNMP_VIEW_TYPE_EXCLUDED 

Excluded from the MIB view.

Definition at line 123 of file openapi_snmp.h.

User-Based Security Model Authentication protocols.

Enumerator
OPEN_USM_USER_AUTH_PROTOCOL_NONE 

Not specified.

OPEN_USM_USER_AUTH_PROTOCOL_SHA 

Secure Hash Algorithm.

OPEN_USM_USER_AUTH_PROTOCOL_MD5 

Message Digest Algorithm.

Definition at line 78 of file openapi_snmp.h.

User-Based Security Model Privilege protocols.

Enumerator
OPEN_USM_USER_PRIV_PROTOCOL_NONE 

Not specified.

OPEN_USM_USER_PRIV_PROTOCOL_DES 

Data Encryption Standard protocol.

OPEN_USM_USER_PRIV_PROTOCOL_3DES 

Not supported.

OPEN_USM_USER_PRIV_PROTOCOL_AES128 

Not supported.

OPEN_USM_USER_PRIV_PROTOCOL_AES192 

Not supported.

OPEN_USM_USER_PRIV_PROTOCOL_AES256 

Not supported.

Definition at line 86 of file openapi_snmp.h.

Function Documentation

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.

If the community name already exists, the entry is modifed with the new parameters.

Parameters
[in]client_handleclient handle from registration API
[in]communityNamecommunity name
[in]communitycommunity parameters
Return values
OPEN_E_NONECreate is successful
OPEN_E_FAILCreate failed
OPEN_E_ERRORThe set request is invalid
OPEN_E_PARAMError in parameter passed
OPEN_E_FULLCommunity table is full
OPEN_E_UNAVAILSNMP feature or SNMP config API is not supported on this platform.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.19

Examples:
snmp_example.c.
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 supported.

Parameters
[in]client_handleclient handle from registration API
[in]communityNamecommunity name
Return values
OPEN_E_NONEDelete is successful
OPEN_E_FAILDelete failed
OPEN_E_ERRORThe delete request is invalid
OPEN_E_PARAMError in parameter passed
OPEN_E_UNAVAILSNMP feature or SNMP config API is not supported on this platform.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.19

Examples:
snmp_example.c.
open_error_t openapiSnmpCommunityAndIPAddrGet ( openapiClientHandle_t client_handle,
open_buffdesc communityName,
OPEN_SNMP_COMMUNITY_t community 
)

Gets an existing SNMP community.

Parameters
[in]client_handleclient handle from registration API
[in]communityNamecommunity name
[out]communitycommunity parameters
Return values
OPEN_E_NONEGet successful
OPEN_E_FAILGet failed
OPEN_E_ERRORThe get request is invalid
OPEN_E_PARAMError in parameter passed
OPEN_E_UNAVAILSNMP feature or SNMP config API is not supported on this platform.

OpEN API Version: 1.19

Examples:
snmp_example.c.
open_error_t openapiSnmpCommunityAndIPAddrGetNext ( openapiClientHandle_t client_handle,
open_buffdesc communityName,
open_buffdesc nextCommunityName 
)

Retrieve the next SNMP community entry based on community name.

Calling this function with an initialized communityName fetches the first community entry. Iterative calls while replacing communityName with the next values continues to loop through the communities until the end of the list.

Parameters
[in]client_handleclient handle from registration API
[in]communityNamecommunity name
[out]nextCommunityNamenext community name
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILSNMP feature is not supported on this platform.

OpEN API Version: 1.19

Examples:
snmp_example.c.
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.

If the community name already exists, the entry is first deleted along with any related securityToGroup entries and/or target tags.

Parameters
[in]client_handleclient handle from registration API
[in]communityNamecommunity name
-Minimum value OPENAPI_SNMP_COMMUNITY_NAME_MIN
-Maximum value OPENAPI_SNMP_COMMUNITY_NAME_MAX
[in]accessTypeoptional community access
[in]viewNameoptional view name
-Minimum value OPENAPI_SNMP_VIEW_NAME_MIN
-Maximum value OPENAPI_SNMP_VIEW_NAME_MAX
[out]addroptional IPv4 address, for allowed access
Return values
OPEN_E_NONECreate is successful
OPEN_E_FAILCreate failed
OPEN_E_ERRORif the set request was invalid
OPEN_E_PARAMError in parameter passed
OPEN_E_UNAVAILSNMP feature is not supported on this platform.
Note
Calling this API will change the running configuration of the switch
If addr is used, then accessType OPEN_SNMP_COMMUNITY_ACCESS_RO is used.
If viewName is used, then accessType is not applicable.

OpEN API Version: 1.2

Examples:
snmp_example.c.
open_error_t openapiSnmpCommunityDelete ( openapiClientHandle_t client_handle,
open_buffdesc communityName 
)

Delete an existing SNMP community entry and related securityToGroup entries and target tags.

Parameters
[in]client_handleclient handle from registration API
[in]communityNamecommunity name
-Minimum value OPENAPI_SNMP_COMMUNITY_NAME_MIN
-Maximum value OPENAPI_SNMP_COMMUNITY_NAME_MAX
Return values
OPEN_E_NONEDelete is successful
OPEN_E_FAILDelete failed
OPEN_E_ERRORif the set request was invalid
OPEN_E_PARAMError in parameter passed
OPEN_E_UNAVAILSNMP feature is not supported on this platform.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.2

Examples:
snmp_example.c.
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.

Calling this function with an initialized communityName fetches the first community entry. Iterative calls while replacing communityName with the next values continues to loop through the communities until the end of the list.

Parameters
[in]client_handleclient handle from registration API
[in]communityNamecommunity name
-Minimum value OPENAPI_SNMP_COMMUNITY_NAME_MIN
-Maximum value OPENAPI_SNMP_COMMUNITY_NAME_MAX
[out]accessTypeoptional community access
[out]viewNameoptional view name
-Maximum value OPENAPI_SNMP_VIEW_NAME_MAX
[out]addroptional IPv4 address, for allowed access
[out]nextCommunityNamenext community name
-Minimum value OPENAPI_SNMP_COMMUNITY_NAME_MIN
-Maximum value OPENAPI_SNMP_COMMUNITY_NAME_MAX
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILSNMP feature is not supported on this platform.

OpEN API Version: 1.2

Examples:
snmp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]communityNamecommunity name
-Minimum value OPENAPI_SNMP_COMMUNITY_NAME_MIN
-Maximum value OPENAPI_SNMP_COMMUNITY_NAME_MAX
[in]groupNamegroup name
-Minimum value OPENAPI_SNMP_GROUP_NAME_MIN
-Maximum value OPENAPI_SNMP_GROUP_NAME_MAX
[in]addroptional IPv4 address, for allowed access
Return values
OPEN_E_NONECreate is successful
OPEN_E_FAILCreate failed
OPEN_E_ERRORif the set request was invalid
OPEN_E_PARAMError in parameter passed
OPEN_E_UNAVAILSNMP feature is not supported on this platform.
Note
Calling this API will change the running configuration of the switch
If the community already exists, it will be deleted along with its related securityToGroup entries and target tags.

OpEN API Version: 1.2

Examples:
snmp_example.c.
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.

If the filter already exists, the associated MIBS (vacmFilterTreeFamilySubtree and vacmFilterTreeFamilyMask) are updated according to the filterType flag.

Parameters
[in]client_handleclient handle from registration API
[in]filterNamefilter name
-Minimum value OPENAPI_SNMP_FILTER_NAME_MIN
-Maximum value OPENAPI_SNMP_FILTER_NAME_MAX
[in]oidTreeASN.1 subtree OID to be included/excluded from the filter
-Minimum value OPENAPI_SNMP_VIEW_TREE_MIN
-Maximum value OPENAPI_SNMP_VIEW_TREE_MAX
[in]filterTypeincluded or excluded from the MIB filter
Return values
OPEN_E_NONECreate is successful
OPEN_E_FAILCreate failed
OPEN_E_ERRORif the set request was invalid
OPEN_E_PARAMError in parameter passed
OPEN_E_UNAVAILSNMP feature is not supported on this platform.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.2

Examples:
snmp_example.c.
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.

If the oidTree is omitted, all views matching the filterName will be deleted.

Parameters
[in]client_handleclient handle from registration API
[in]filterNamefilter name
-Minimum value OPENAPI_SNMP_FILTER_NAME_MIN
-Maximum value OPENAPI_SNMP_FILTER_NAME_MAX
[in]oidTreeoptional ASN.1 subtree OID to be included/excluded from the view
-Minimum value OPENAPI_SNMP_VIEW_TREE_MIN
-Maximum value OPENAPI_SNMP_VIEW_TREE_MAX
Return values
OPEN_E_NONEDelete is successful
OPEN_E_FAILDelete failed
OPEN_E_ERRORif the set request was invalid
OPEN_E_PARAMError in parameter passed
OPEN_E_UNAVAILSNMP feature is not supported on this platform.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.2

Examples:
snmp_example.c.
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.

Calling this function with an initialized filter name and oidTree fetches the first filter entry. Iterative calls while replacing filterName and oidTree with the next values continues to loop through the filters until the end of the list.

Parameters
[in]client_handleclient handle from registration API
[in]filterNamefilter name
-Minimum value OPENAPI_SNMP_FILTER_NAME_MIN
-Maximum value OPENAPI_SNMP_FILTER_NAME_MAX
[in]oidTreeASN.1 subtree OID to be included/excluded from the filter
-Minimum value OPENAPI_SNMP_VIEW_TREE_MIN
-Maximum value OPENAPI_SNMP_VIEW_TREE_MAX
[out]filterTypeincluded or excluded from the MIB filter
[out]nextFilterNamenext filter name
-Minimum value OPENAPI_SNMP_FILTER_NAME_MIN
-Maximum value OPENAPI_SNMP_FILTER_NAME_MAX
[out]nextOidTreenext ASN.1 subtree OID to be included/excluded from the filter
-Minimum value OPENAPI_SNMP_VIEW_TREE_MIN
-Maximum value OPENAPI_SNMP_VIEW_TREE_MAX
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILSNMP feature is not supported on this platform.

OpEN API Version: 1.2

Examples:
snmp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]groupNamegroup name
-Minimum value OPENAPI_SNMP_GROUP_NAME_MIN
-Maximum value OPENAPI_SNMP_GROUP_NAME_MAX
[in]securityModelversion number
[in]securityLevelsecurity level (valid only for securityModel OPEN_SNMP_SECURITY_MODEL_USM)
[in]contextPrefixoptional prefix name to associate the group with
-Minimum value OPENAPI_SNMP_CONTEXT_NAME_MIN
-Maximum value OPENAPI_SNMP_CONTEXT_NAME_MAX
[in]readViewoptional, enables user to view the contents of the agent
-Minimum value OPENAPI_SNMP_VIEW_NAME_MIN
-Maximum value OPENAPI_SNMP_VIEW_NAME_MAX
[in]writeViewoptional, enables user to enter data and configure the contents of the agent
-Minimum value OPENAPI_SNMP_VIEW_NAME_MIN
-Maximum value OPENAPI_SNMP_VIEW_NAME_MAX
[in]notifyViewoptional, enables user to specify an inform or a trap
-Minimum value OPENAPI_SNMP_VIEW_NAME_MIN
-Maximum value OPENAPI_SNMP_VIEW_NAME_MAX
Return values
OPEN_E_NONECreate is successful
OPEN_E_FAILCreate failed
OPEN_E_ERRORif the set request was invalid
OPEN_E_EXISTSif SNMP group already exists
OPEN_E_PARAMError in parameter passed
OPEN_E_UNAVAILSNMP feature is not supported on this platform.
Note
Calling this API will change the running configuration of the switch.
The default readView named OPENAPI_SNMP_DEFAULT_VIEW_STR is used if no view is specified.

OpEN API Version: 1.2

Examples:
snmp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]groupNamegroup name
-Minimum value OPENAPI_SNMP_GROUP_NAME_MIN
-Maximum value OPENAPI_SNMP_GROUP_NAME_MAX
[in]securityModelversion number
[in]securityLevelsecurity level (valid only for securityModel OPEN_SNMP_SECURITY_MODEL_USM)
[in]contextPrefixoptional prefix name to associate the group with
-Minimum value OPENAPI_SNMP_CONTEXT_NAME_MIN
-Maximum value OPENAPI_SNMP_CONTEXT_NAME_MAX
Return values
OPEN_E_NONEDelete is successful
OPEN_E_FAILDelete failed
OPEN_E_ERRORif the set request was invalid
OPEN_E_PARAMError in parameter passed
OPEN_E_UNAVAILSNMP feature is not supported on this platform.
Note
Calling this API will change the running configuration of the switch.
Attempting to delete a default group will fail with a OPEN_E_UNAVAIL return code.

OpEN API Version: 1.2

Examples:
snmp_example.c.
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.

Calling this function with the control parameters; groupName, securityModel, securityLevel, and contextPrefix initialized fetches the first group entry. Iterative calls while replacing the control parameters with the next group values continue to loop through the groups until the end of the list.

Parameters
[in]client_handleclient handle from registration API
[in]groupNamegroup name
-Minimum value OPENAPI_SNMP_GROUP_NAME_MIN
-Maximum value OPENAPI_SNMP_GROUP_NAME_MAX
[in,out]securityModelversion number
[in,out]securityLevelsecurity level (valid only for securityModel OPEN_SNMP_SECURITY_MODEL_USM)
[in]contextPrefixprefix name to associate the group with
-Minimum value OPENAPI_SNMP_CONTEXT_NAME_MIN
-Maximum value OPENAPI_SNMP_CONTEXT_NAME_MAX
[out]readViewenables user to view the contents of the agent
-Minimum value OPENAPI_SNMP_VIEW_NAME_MIN
-Maximum value OPENAPI_SNMP_VIEW_NAME_MAX
[out]writeViewenables user to enter data and configure the contents of the agent
-Minimum value OPENAPI_SNMP_VIEW_NAME_MIN
-Maximum value OPENAPI_SNMP_VIEW_NAME_MAX
[out]notifyViewenables user to specify an inform or a trap
-Minimum value OPENAPI_SNMP_VIEW_NAME_MIN
-Maximum value OPENAPI_SNMP_VIEW_NAME_MAX
[out]nextGroupNamenext group name
-Minimum value OPENAPI_SNMP_GROUP_NAME_MIN
-Maximum value OPENAPI_SNMP_GROUP_NAME_MAX
[out]nextContextPrefixnext prefix name
-Minimum value OPENAPI_SNMP_CONTEXT_NAME_MIN
-Maximum value OPENAPI_SNMP_CONTEXT_NAME_MAX
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILSNMP feature is not supported on this platform.

OpEN API Version: 1.2

Examples:
snmp_example.c.
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.

This includes the target address object and its various parameters, including an optional notification filter.

Parameters
[in]client_handleclient handle from registration API
[in]hostIPv4 or IPv6 address
-Maximum value OPENAPI_SNMP_HOST_NAME_MAX
[in]serverPortoptional host receiver port number.
-Default value OPENAPI_SNMP_SERVER_PORT_DEF
-Minimum value OPENAPI_SNMP_SERVER_PORT_MIN
-Maximum value OPENAPI_SNMP_SERVER_PORT_MAX
[in]securityNamecontext name (community or user name)
-Minimum value OPENAPI_SNMP_CONTEXT_NAME_MIN
-Maximum value OPENAPI_SNMP_CONTEXT_NAME_MAX
[in]securityModelversion number
[in]securityLevelsecurity level
[in]notifyTypenotification type
[in]timeoutoptional timeout in milliseconds for OPEN_SNMP_NOTIFY_TYPE_INFORM trap type
-Maximum value OPENAPI_SNMP_TIMEOUT_COUNT_MAX
[in]retriesoptional retries for OPEN_SNMP_NOTIFY_TYPE_INFORM trap type
-Maximum value OPENAPI_SNMP_RETRIES_COUNT_MAX
[in]filteroptional notification filter name
-Maximum value OPENAPI_SNMP_FILTER_NAME_MAX
Return values
OPEN_E_NONESet is successful
OPEN_E_FAILSet failed
OPEN_E_ERRORif the set request was invalid
OPEN_E_EXISTSif host already exists
OPEN_E_PARAMError in parameter passed
OPEN_E_UNAVAILSNMP feature is not supported on this platform.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.2

Examples:
snmp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]strHostIPv4 or IPv6 address
[in]notifyTypenotification type
-Maximum value OPENAPI_SNMP_HOST_NAME_MAX
Return values
OPEN_E_NONEDelete is successful
OPEN_E_FAILDelete failed
OPEN_E_ERRORif the set request was invalid
OPEN_E_PARAMError in parameter passed
OPEN_E_UNAVAILSNMP feature is not supported on this platform.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.2

Examples:
snmp_example.c.
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.

Calling this function with an initialized host fetches the first host entry. Iterative calls while replacing host with nextHost continues to loop through the host entries until the end of the list.

Parameters
[in]client_handleclient handle from registration API
[in]hostIPv4 or IPv6 address
-Maximum value OPENAPI_SNMP_HOST_NAME_MAX
[out]serverPortoptional host receiver port number.
[out]securityNamecontext name (community or user name)
-Minimum value OPENAPI_SNMP_CONTEXT_NAME_MIN
-Maximum value OPENAPI_SNMP_CONTEXT_NAME_MAX
[out]securityModelversion number
[out]securityLevelsecurity level
[out]notifyTypenotification type
[out]timeoutoptional timeout in milliseconds for OPEN_SNMP_NOTIFY_TYPE_INFORM trap type
[out]retriesoptional retries for OPEN_SNMP_NOTIFY_TYPE_INFORM trap type
[out]filteroptional notification filter name
-Minimum value OPENAPI_SNMP_FILTER_NAME_MIN
-Maximum value OPENAPI_SNMP_FILTER_NAME_MAX
[out]nextHostnext host
-Maximum value OPENAPI_SNMP_HOST_NAME_MAX
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILSNMP feature is not supported on this platform.

OpEN API Version: 1.2

Examples:
snmp_example.c.
open_error_t openapiSnmpLocalEngineIdDelete ( openapiClientHandle_t client_handle)

Delete the SNMP engine id on the local device.

The engine id is actually reset to the default id which is automatically generated based on the local MAC address.

Parameters
[in]client_handleclient handle from registration API
Return values
OPEN_E_NONECreate is successful
OPEN_E_FAILCreate failed
OPEN_E_ERRORif the set request was invalid
OPEN_E_PARAMError in parameter passed
OPEN_E_UNAVAILSNMP feature is not supported on this platform.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.2

Examples:
snmp_example.c.
open_error_t openapiSnmpLocalEngineIdGet ( openapiClientHandle_t client_handle,
open_buffdesc engineId 
)

Get the SNMP engine id on the local device.

Parameters
[in]client_handleclient handle from registration API
[out]engineIdlocal engine id
-Minimum value OPENAPI_SNMP_ENGINE_ID_MIN
-Maximum value OPENAPI_SNMP_ENGINE_ID_MAX
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILSNMP feature is not supported on this platform.

OpEN API Version: 1.2

Examples:
snmp_example.c.
open_error_t openapiSnmpLocalEngineIdSet ( openapiClientHandle_t client_handle,
open_buffdesc engineId 
)

Set the SNMP engine id on the local device.

Parameters
[in]client_handleclient handle from registration API
[in]engineIdlocal engine id
-Default indicator OPENAPI_SNMP_ENGINE_ID_DEF
-Minimum value OPENAPI_SNMP_ENGINE_ID_MIN
-Maximum value OPENAPI_SNMP_ENGINE_ID_MAX
Return values
OPEN_E_NONECreate is successful
OPEN_E_FAILCreate failed
OPEN_E_ERRORif the set request was invalid
OPEN_E_PARAMError in parameter passed
OPEN_E_UNAVAILSNMP feature is not supported on this platform.
Note
Calling this API will change the running configuration of the switch
The engineId must be an even length of hexadecimal characters.
The default engine id is specified by using OPENAPI_SNMP_ENGINE_ID_DEF as the engineId in which case the engine id is automatically generated based on the local device MAC address.

OpEN API Version: 1.2

Examples:
snmp_example.c.
open_error_t openapiSnmpSysContactGet ( openapiClientHandle_t client_handle,
open_buffdesc sysContact 
)

Get the system contact information.

Parameters
[in]client_handleclient handle from registration API
[out]sysContactsystem contact
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.2

Examples:
snmp_example.c.
open_error_t openapiSnmpSysContactSet ( openapiClientHandle_t client_handle,
open_buffdesc sysContact 
)

Set the SNMP system contact.

The textual identification of the contact person for this managed node, together with information on how to contact this person.

Parameters
[in]client_handleclient handle from registration API
[in]sysContactsystem contact
-Minimum value 1
-Maximum value OPENAPI_SNMP_SYSTEM_CONTACT_MAX
Return values
OPEN_E_NONESet is successful
OPEN_E_FAILSet failed
OPEN_E_ERRORif the set request was invalid
OPEN_E_PARAMError in parameter passed
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.2

Examples:
snmp_example.c.
open_error_t openapiSnmpSysLocationGet ( openapiClientHandle_t client_handle,
open_buffdesc sysLocation 
)

Get the system location information.

Parameters
[in]client_handleclient handle from registration API
[out]sysLocationsystem location
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.2

Examples:
snmp_example.c.
open_error_t openapiSnmpSysLocationSet ( openapiClientHandle_t client_handle,
open_buffdesc sysLocation 
)

Set the SNMP system location.

The physical location of this node, for example; 'telephone closet' or '3rd floor'.

Parameters
[in]client_handleclient handle from registration API
[in]sysLocationsystem location
-Minimum value 1
-Maximum value OPENAPI_SNMP_SYSTEM_LOCATION_MAX
Return values
OPEN_E_NONESet is successful
OPEN_E_FAILSet failed
OPEN_E_ERRORif the set request was invalid
OPEN_E_PARAMError in parameter passed
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.2

Examples:
snmp_example.c.
open_error_t openapiSnmpSysNameGet ( openapiClientHandle_t client_handle,
open_buffdesc sysName 
)

Get the system name.

Parameters
[in]client_handleclient handle from registration API
[out]sysNamesystem name
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.2

Examples:
snmp_example.c.
open_error_t openapiSnmpSysNameSet ( openapiClientHandle_t client_handle,
open_buffdesc sysName 
)

Set the SNMP system name.

An administratively-assigned name for this managed node. By convention, this is the node's fully-qualified domain name.

Parameters
[in]client_handleclient handle from registration API
[in]sysNamesystem name
-Minimum value 1
-Maximum value OPENAPI_SNMP_SYSTEM_NAME_MAX
Return values
OPEN_E_NONESet is successful
OPEN_E_FAILSet failed
OPEN_E_ERRORif the set request was invalid
OPEN_E_PARAMError in parameter passed
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.2

Examples:
snmp_example.c.
open_error_t openapiSnmpTrapFlagGet ( openapiClientHandle_t client_handle,
uint32_t  trapFlag,
bool *  mode 
)

Retrieve the trap mode for a single trap.

Parameters
[in]client_handleclient handle from registration API
[in]trapFlagselected trap from OPEN_SNMP_TRAP_FLAGS_t
[out]modeSet on or off
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILSNMP feature is not supported on this platform.

OpEN API Version: 1.2

Examples:
snmp_example.c.
open_error_t openapiSnmpTrapFlagSet ( openapiClientHandle_t client_handle,
uint32_t  trapFlags,
bool  mode 
)

Enable or disable the traps identified via the trapFlags selection.

Parameters
[in]client_handleclient handle from registration API
[in]trapFlagsselected traps, a bitmask of OPEN_SNMP_TRAP_FLAGS_t
[in]modeSet on or off
Return values
OPEN_E_NONESet is successful
OPEN_E_FAILSet failed
OPEN_E_ERRORif the set request was invalid
OPEN_E_UNAVAILIf one or more trap sets failed due to the feature availability.
OPEN_E_PARAMError in parameter passed.
Note
Calling this API will change the running configuration of the switch
Set appropriate bits in OPEN_SNMP_TRAP_FLAGS_t to select specific traps
All available traps (FSM established and backward transition) are set for BGP (OPEN_SNMP_BGP_TRAP_FLAG)
All available traps (LSA, retransmit, state and overflow) are set for OSPFv2 (OPEN_SNMP_OSPFV2_TRAP_FLAG)
All available traps (LSA, retransmit, state and overflow) are set for OSPFv3 (OPEN_SNMP_OSPFV3_TRAP_FLAG)
Violation traps for all interfaces are set for Port MAC locking (OPEN_SNMP_VIOLATION_TRAP_FLAG)

OpEN API Version: 1.2

Examples:
snmp_example.c.
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.

Trap receivers with an enabled status are active and the SNMP agent sends traps to them with source IP address as source-interface address.

Parameters
[in]client_handleclient handle from registration API
[out]intfsource interface (internal interface number)
[out]typeinterface type
[out]addrIP address of interface
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILSNMP feature is not supported on this platform.
Note
The source interface state can be determined by calling openapiIfLinkStateGet().

OpEN API Version: 1.2

Examples:
snmp_example.c.
open_error_t openapiSnmpTrapSrcIntfSet ( openapiClientHandle_t client_handle,
uint32_t  intf 
)

Set the source interface which SNMP trap originates.

Trap receivers with an enabled status are active and the SNMP agent sends traps to them with source IP address as source-interface address.

Parameters
[in]client_handleclient handle from registration API
[in]intfsource interface (internal interface number) from which source IP is used by the SNMP Trap client
Return values
OPEN_E_NONESet is successful
OPEN_E_FAILSet failed
OPEN_E_ERRORif the set request was invalid
OPEN_E_UNAVAILSNMP feature is not supported on this platform.
Note
Calling this API will change the running configuration of the switch
The source interface must be a valid routing, loopback, tunnel, or VLAN interface.
OpEN API openapiIfFirstGet() can be used to obtain a list of available interfaces.

OpEN API Version: 1.2

Examples:
snmp_example.c.
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.

The first attempt is to convert the oid/mask to a prefix string. If that fails, an attempt is made to convert the OID directly to a prefix string. If that fails, then simply return the oidTree.

Parameters
[in]client_handleclient handle from registration API
[in]nameview or filter name
-Minimum value OPENAPI_SNMP_VIEW_NAME_MIN or OPENAPI_SNMP_FILTER_NAME_MIN
-Maximum value OPENAPI_SNMP_VIEW_NAME_MAX or OPENAPI_SNMP_FILTER_NAME_MAX
[in]oidTreeOID to translate (in various forms)
-Minimum value OPENAPI_SNMP_VIEW_TREE_MIN
-Maximum value OPENAPI_SNMP_VIEW_TREE_MAX
[in]treeTypeview or filter
[out]oidStringconverted OID
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILSNMP feature is not supported on this platform.
Note
This is a helper function such that it resolves a given OID into a readable OID string.

OpEN API Version: 1.2

Examples:
snmp_example.c.
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.

Essentially, convert the prefix of the given OID into a decimal OID, leaving the rest of the OID intact. Then check if the oid is supported at the SNMP level. Any asterisks '*' in the OID is replaced with a 0.

Parameters
[in]client_handleclient handle from registration API
[in]nameview or filter name
-Minimum value OPENAPI_SNMP_VIEW_NAME_MIN or OPENAPI_SNMP_FILTER_NAME_MIN
-Maximum value OPENAPI_SNMP_VIEW_NAME_MAX or OPENAPI_SNMP_FILTER_NAME_MAX
[in]oidTreeOID to translate (in various forms)
-Minimum value OPENAPI_SNMP_VIEW_TREE_MIN
-Maximum value OPENAPI_SNMP_VIEW_TREE_MAX
[in]treeTypeview or filter
[out]oidValconverted OID
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILSNMP feature is not supported on this platform.
Note
This is a helper function such that it resolves a given OID into an actual configured OID value. This OID can be used as a lookup when using openapiSnmpViewGetNext() or openapiSnmpFilterGetNext().

OpEN API Version: 1.2

Examples:
snmp_example.c.
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.

This function first validates the input parameters by checking their content and ranges. The user name and engine id combination is then checked to be unique. If so, then the user name, engine id, authorization, privilege, and group is set.

Parameters
[in]client_handleclient handle from registration API
[in]userNameuser name
-Minimum value OPENAPI_SNMP_USER_NAME_MIN
-Maximum value OPENAPI_SNMP_USER_NAME_MAX
[in]groupNamegroup name
-Minimum value OPENAPI_SNMP_GROUP_NAME_MIN
-Maximum value OPENAPI_SNMP_GROUP_NAME_MAX
[in]authProtoauthentication protocol type
[in]authPwdHMAC-MD5-96 or HMAC-SHA-96 authentication password
-Minimum value OPENAPI_SNMP_AUTH_PWD_MIN
-Maximum value OPENAPI_SNMP_AUTH_PWD_MAX
[in]authKeypre-generated key
-HMAC-MD5-96 key size OPENAPI_SNMP_MD5_KEY_SIZE
-HMAC-SHA-96 key size OPENAPI_SNMP_SHA_KEY_SIZE
[in]privProtoprivilege protocol type
[in]privPwdCBC-DES symmetric encryption password
-Minimum value OPENAPI_SNMP_AUTH_PWD_MIN
-Maximum value OPENAPI_SNMP_AUTH_PWD_MAX
[in]privKeypre-generated key
-HMAC-MD5-96 key size OPENAPI_SNMP_MD5_KEY_SIZE
[in]engineIdremote engine id
-Minimum value OPENAPI_SNMP_ENGINE_ID_MIN
-Maximum value OPENAPI_SNMP_ENGINE_ID_MAX
Return values
OPEN_E_NONECreate is successful
OPEN_E_FAILCreate failed
OPEN_E_ERRORif the set request was invalid
OPEN_E_EXISTSif userName and engineId already exists
OPEN_E_PARAMError in parameter passed
OPEN_E_UNAVAILSNMP feature is not supported on this platform.
Note
Calling this API will change the running configuration of the switch
As a result of creating a new user name, the group name will also be changed for all matching user name entries.
The engineId must be an even length of hexadecimal characters.

OpEN API Version: 1.2

Examples:
snmp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]userNameuser name
-Minimum value OPENAPI_SNMP_USER_NAME_MIN
-Maximum value OPENAPI_SNMP_USER_NAME_MAX
[in]engineIdremote engine id
-Minimum value OPENAPI_SNMP_ENGINE_ID_MIN
-Maximum value OPENAPI_SNMP_ENGINE_ID_MAX
Return values
OPEN_E_NONEDelete is successful
OPEN_E_FAILDelete failed
OPEN_E_ERRORif the set request was invalid
OPEN_E_PARAMError in parameter passed
OPEN_E_UNAVAILSNMP feature is not supported on this platform.
Note
Calling this API will change the running configuration of the switch
If there are no other user entries with the same name, the associated VACM security model is also deleted.
The engineId must be an even length of hexadecimal characters.

OpEN API Version: 1.2

Examples:
snmp_example.c.
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.

Calling this function with an initialized userName and engineId fetches the first user entry. Iterative calls while replacing userName and engineId with their next values continues to loop through the user entries until the end of the list.

Parameters
[in]client_handleclient handle from registration API
[in]userNameuser name
-Minimum value OPENAPI_SNMP_USER_NAME_MIN
-Maximum value OPENAPI_SNMP_USER_NAME_MAX
[in]engineIdremote engine id
-Minimum value OPENAPI_SNMP_ENGINE_ID_MIN
-Maximum value OPENAPI_SNMP_ENGINE_ID_MAX
[out]groupNamegroup name
-Minimum value OPENAPI_SNMP_GROUP_NAME_MIN
-Maximum value OPENAPI_SNMP_GROUP_NAME_MAX
[out]authProtoauthentication protocol type
[out]authKeypre-generated key
[out]privProtoprivilege protocol type
[out]nextUserNamenext user name
-Minimum value OPENAPI_SNMP_USER_NAME_MIN
-Maximum value OPENAPI_SNMP_USER_NAME_MAX
[out]nextEngineIdnext remote engine id
-Minimum value OPENAPI_SNMP_ENGINE_ID_MIN
-Maximum value OPENAPI_SNMP_ENGINE_ID_MAX
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILSNMP feature is not supported on this platform.

OpEN API Version: 1.2

Examples:
snmp_example.c.
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.

If the view name already exists, the associated MIBS (vacmViewTreeFamilySubtree and vacmViewTreeFamilyMask) are updated according to the viewType flag.

Parameters
[in]client_handleclient handle from registration API
[in]viewNameview name
-Minimum value OPENAPI_SNMP_VIEW_NAME_MIN
-Maximum value OPENAPI_SNMP_VIEW_NAME_MAX
[in]oidTreeASN.1 subtree OID to be included/excluded from the view
-Minimum value OPENAPI_SNMP_VIEW_TREE_MIN
-Maximum value OPENAPI_SNMP_VIEW_TREE_MAX
[in]viewTypeincluded or excluded from the MIB view
Return values
OPEN_E_NONECreate is successful
OPEN_E_FAILCreate failed
OPEN_E_ERRORif the set request was invalid
OPEN_E_PARAMError in parameter passed
OPEN_E_UNAVAILSNMP feature is not supported on this platform.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.2

Examples:
snmp_example.c.
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.

If the oidTree is omitted, all views matching the viewName will be deleted.

Parameters
[in]client_handleclient handle from registration API
[in]viewNameview name
-Minimum value OPENAPI_SNMP_VIEW_NAME_MIN
-Maximum value OPENAPI_SNMP_VIEW_NAME_MAX
[in]oidTreeoptional ASN.1 subtree OID to be included/excluded from the view
-Minimum value OPENAPI_SNMP_VIEW_TREE_MIN
-Maximum value OPENAPI_SNMP_VIEW_TREE_MAX
Return values
OPEN_E_NONEDelete is successful
OPEN_E_FAILDelete failed
OPEN_E_ERRORif the set request was invalid
OPEN_E_PARAMError in parameter passed
OPEN_E_UNAVAILSNMP feature is not supported on this platform.
Note
Calling this API will change the running configuration of the switch
Attempting to delete a default view will fail with a OPEN_E_UNAVAIL return code.

OpEN API Version: 1.2

Examples:
snmp_example.c.
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.

Calling this function with an initialized view name and oidTree fetches the first view entry. Iterative calls while replacing viewName and oidTree with the next values continues to loop through the views until the end of the list.

Parameters
[in]client_handleclient handle from registration API
[in]viewNameview name
-Minimum value OPENAPI_SNMP_VIEW_NAME_MIN
-Maximum value OPENAPI_SNMP_VIEW_NAME_MAX
[in]oidTreeASN.1 subtree OID to be included/excluded from the view
-Minimum value OPENAPI_SNMP_VIEW_TREE_MIN
-Maximum value OPENAPI_SNMP_VIEW_TREE_MAX
[out]viewTypeincluded or excluded from the MIB view
[out]nextViewNamenext view name
-Minimum value OPENAPI_SNMP_VIEW_NAME_MIN
-Maximum value OPENAPI_SNMP_VIEW_NAME_MAX
[out]nextOidTreenext ASN.1 subtree OID to be included/excluded from the view
-Minimum value OPENAPI_SNMP_VIEW_TREE_MIN
-Maximum value OPENAPI_SNMP_VIEW_TREE_MAX
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILSNMP feature is not supported on this platform.

OpEN API Version: 1.2

Examples:
snmp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]communityNamecommunity name
[in]ipAddrcommunity IP address
[out]nextCommunityNamenext community name
Return values
OPEN_E_NONEGet successful
OPEN_E_FAILGet failed
OPEN_E_ERRORif the set request was invalid
OPEN_E_PARAMError in parameter passed
OPEN_E_UNAVAILSNMP feature or SNMP config API is not supported on this platform.

OpEN API Version: 1.19

Examples:
snmp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]communityNamecommunity name
[in]ipAddrcommunity IP address
[in]trapConfigtrap configuration
Return values
OPEN_E_NONECreate is successful
OPEN_E_FAILCreate failed
OPEN_E_ERRORThe set request invalid
OPEN_E_PARAMError in parameter passed
OPEN_E_FULLTrap manager table is full
OPEN_E_UNAVAILSNMP feature or SNMP config API is not supported on this platform.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.19

Examples:
snmp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]communityNamecommunity name
[in]ipAddrcommunity IP address
Return values
OPEN_E_NONEDelete is successful
OPEN_E_FAILDelete failed
OPEN_E_ERRORThe delete request is invalid
OPEN_E_PARAMError in parameter passed
OPEN_E_UNAVAILSNMP feature or SNMP config API is not supported on this platform.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.19

Examples:
snmp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]communityNamecommunity name
[in]ipAddrcommunity IP address
[out]trapConfigTrap configuration
Return values
OPEN_E_NONEGet successful
OPEN_E_FAILGet failed
OPEN_E_ERRORThe get request is invalid
OPEN_E_PARAMError in parameter passed
OPEN_E_UNAVAILSNMP feature or SNMP config API is not supported on this platform.

OpEN API Version: 1.19

Examples:
snmp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]communityNamecommunity name
[in]ipAddrcommunity IP address
[out]nextIPAddrnext IP address
Return values
OPEN_E_NONEGet successful
OPEN_E_FAILGet failed
OPEN_E_ERRORThe set request is invalid
OPEN_E_PARAMError in parameter passed
OPEN_E_UNAVAILSNMP feature or SNMP config API is not supported on this platform.

OpEN API Version: 1.19

Examples:
snmp_example.c.