Hello,
we have recently moved from net-snmp 5.3.3 to 5.5.
Our code used to retrieve user request errors using usmStats, but in 5.5 it has
been reimplemented and our code doesn't compile.
In detail, we used variable2 usmStats_variables[]... as defined in usmStats.h,
for example in this function:
/**
* @brief Delivers the count of SNMP request errors "unknown user name".
* @return number of request errors "unknown user name".
*/
static LONG32 get_usm_stats_unknown_user_names (void)
{
LONG32 long_ret; /* return value*/
struct variable var; /* SNMP variable */
/* OID of MIB node that stores the counter of
* request errors "unknown user name"
*/
oid o[MAX_OID_LEN] = { 1, 3, 6, 1, 6, 3, 15, 1, 1, 3, 0 };
size_t olen = 11; /* the OID's length */
/* store variable access */
var.acl = usmStats_variables[2].acl;
/* store find method */
var.findVar = usmStats_variables[2].findVar;
/* store magic number */
var.magic = usmStats_variables[2].magic;
/* store OID */
memcpy (var.name, o, sizeof (var.name));
var.namelen = olen; /* store OID length */
/* store variable type */
var.type = usmStats_variables[2].type;
/* get SMP variable value */
long_ret = snmp_get_statistic(var.magic + STAT_USM_STATS_START);
return long_ret; /* return error count number (SNMP variable value) */
}
But usmStats_variables is not declared anymore. Can you tell the way to
implement it now with 5.5?
Thank you!
Jose.
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users