SNMP: Started register table entries dynamically
Compile-time constant: SNMP_TABLE_DYNAMIC Added MIB SNMP erroir handling
This commit is contained in:
parent
eaab900698
commit
d9d377de6d
7 changed files with 88 additions and 62 deletions
|
|
@ -41,6 +41,12 @@ extern "C" {
|
|||
#ifndef _SNMP_LIB_H_
|
||||
#define _SNMP_LIB_H_
|
||||
|
||||
/*
|
||||
* Constants
|
||||
*/
|
||||
/* Need some way to multiplex SNMP_ and MIB errors on OE_SNMP error handler */
|
||||
#define CLIXON_ERR_SNMP_MIB 0x1000
|
||||
|
||||
/*
|
||||
* Types
|
||||
*/
|
||||
|
|
@ -48,7 +54,7 @@ extern "C" {
|
|||
*/
|
||||
struct clixon_snmp_handle {
|
||||
clicon_handle sh_h;
|
||||
yang_stmt *sh_ys;
|
||||
yang_stmt *sh_ys; /* Leaf for scalar, list for table */
|
||||
oid sh_oid[MAX_OID_LEN]; /* OID for debug, may be removed? */
|
||||
size_t sh_oidlen;
|
||||
char *sh_default; /* MIB default value leaf only */
|
||||
|
|
@ -77,6 +83,7 @@ int yang2xpath(yang_stmt *ys, cvec *keyvec, char **xpath);
|
|||
int snmp_body2oid(cxobj *xi, cg_var *cv);
|
||||
int snmp_agent_check(void);
|
||||
int snmp_agent_cleanup(void);
|
||||
int clixon_snmp_err_cb(void *handle, int suberr, cbuf *cb);
|
||||
|
||||
#endif /* _SNMP_LIB_H_ */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue