|
Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.11.1.2
|
This document provides a brief description of the Simple Network Management Protocol (SNMP) OpEN APIs. The SNMP OpEN APIs allow processes outside of the EFOS main process (switchdrvr) access to the SNMP configuration.
Here is a summary of SNMP configuration and management related capabilities
All 'Set' operations affect the Switch behavior and configuration.
In the main function, the sample application initializes the OpEN API RPC service by calling openapiClientRegister() and waits for the RPC service in switchdrvr to start. A Client Handle is returned by openapiClientRegister() which is used while invoking the OpEN APIs. The application then exercises the associated OpEN APIs and logs informational and/or error messages on the console. The example application runs to its completion and exits.
snmp_example.c is a sample application that demonstrates the use of the SNMP OpEN API. The snmp_example executable is started from the command line. A -v command line option is available which enables verbose mode. In addition to configuring some basic system level objects, such as system name and location, the example performs 3 basic steps;
In addition to snmp_example.c, a python implementation has also been provided for demonstration purposes. This python snmp_example.py script essentially duplicates the snmp_example.c implementation.
In addition to snmp_example.c, a ruby implementation has also been provided for demonstration purposes. This ruby snmp_example.rb application essentially duplicates the snmp_example.c implementation.
| OPENAPITRAPMANAGERCONFIGGETNEXICLI Command | OpEN API Reference |
|---|---|
| (Config)# [no] snmp-server location <location> | openapiSnmpSysLocationSet() openapiSnmpSysLocationGet() |
| (Config)# [no] snmp-server sysname <sys-name> | openapiSnmpSysNameSet() openapiSnmpSysNameGet() |
| (Config)# [no] snmp-server contact <contact-name> | openapiSnmpSysContactSet() openapiSnmpSysContactGet() |
| (Config)# [no] snmp-server engineID local <engine-id> [default] | openapiSnmpLocalEngineIdSet() openapiSnmpLocalEngineIdGet() openapiSnmpLocalEngineIdDelete() |
| (Config)# [no] snmp-server user <name-name> <group-name> [auth] [auth-key] [remote] | openapiSnmpUserCreate() openapiSnmpUserDelete() openapiSnmpUserGetNext() |
| (Config)# [no] snmp-server group <group-name> <v1,v2,v3> [context] [read] [write] [notify] | openapiSnmpGroupCreate() openapiSnmpGroupDelete() openapiSnmpGroupGetNext() |
| (Config)# [no] snmp-server view <view-name> <oid-tree> <excluded, included> | openapiSnmpViewCreate() openapiSnmpViewDelete() openapiSnmpViewGetNext() |
| (Config)# [no] snmp-server filter <filer-name> <oid-tree> <excluded, included> | openapiSnmpFilterCreate() openapiSnmpFilterDelete() openapiSnmpFilterGetNext() |
| (Config)# [no] snmp-server host <host-address> <oid-tree> <community-name> [informs] [traps] | openapiSnmpHostCreate() openapiSnmpHostDelete() openapiSnmpHostGetNext() |
| (Config)# [no] snmp-server community <community-name> [ip-address] [ro] [rw] [su] [view] | openapiSnmpCommunityCreate() openapiSnmpCommunityDelete() openapiSnmpCommunityGetNext() |
| (Config)# [no] snmp-server community-group <community-name> <group-name> [ip-address] | openapiSnmpCommunityGroupCreate() |
| (Config)# [no] snmp-server enable traps [acl] [boxs-fan-status] [boxs-power-status] [boxs-temp-status] [bgp] [link-mode] [multi-users] [ospfv2] [ospfv3] [stp-mode] [user-auth] [violation] | openapiSnmpTrapFlagSet() openapiSnmpTrapFlagGet() |
| (Config)# [no] snmptrap source-interface <slot/port> [loopback] [tunnel] [vlan] | openapiSnmpTrapSrcIntfSet() openapiSnmpTrapSrcIntfGet() |
| (Config)# [no] snmp-server community <community-name> [ip-address] [ip-mask] [mode] [status] | openapiSnmpCommunityAndIPAddrCreate() openapiSnmpCommunityAndIPAddrDelete() openapiSnmpCommunityAndIPAddrGet() |
| (Config)# [no] snmptrap <community-name> ipaddr <ip-address> [version] [status] | openapiTrapManagerConfigCreate() openapiTrapManagerConfigDelete() openapiTrapManagerConfigGet() openapiTrapManagerConfigIPGetNext() |
| (Priv-User Mode)# show snmptrap | openapiTrapManagerConfigGet() openapiTrapManagerConfigIPGetNext() |
| (Priv-User Mode)# show snmpcommunity | openapiSnmpCommunityAndIPAddrGet() |