I finished implementing tables in BRIDGE-MIB and started implementing scalar objects. After generated mib2c template using mib2c.scalar.conf, I've got GET request work correctly for dot1dStpPriority.
Now I have question about implementing SET request, what exactly I need to do in MODE_SET_RESERVE2? I searched in NetSNMP source tree, the most close example I found was agent/mibgroup/testhandler.c. I mimicked it and tried the following code,

long dot1dStpPriority;
long *dot1dStpPriority_cache = NULL;

case MODE_SET_RESERVE2:
memdup((u_char **) & dot1dStpPriority_cache,
(u_char *) & dot1dStpPriority, sizeof(dot1dStpPriority));
if (dot1dStpPriority_cache == NULL) {
netsnmp_set_request_error(reqinfo, requests,
SNMP_ERR_RESOURCEUNAVAILABLE);
return SNMP_ERR_NOERROR;
}
break;


but it didn't work for me. What I am wrong here? Please give me an example for implementing MODE_SET_XXX in mib2c.scalar.conf template.
Thanks.
--
Emi ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to