Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Data Structures | Macros | Typedefs | Enumerations | Functions
openapi_snmp.h File Reference
#include <stdbool.h>
#include "openapi_common.h"

Go to the source code of this file.

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...