Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

simple tables and dataset

0 views
Skip to first unread message

mo...@frakir.org

unread,
Dec 22, 2003, 12:26:37 PM12/22/03
to

I'm trying to implement an agent for some tables. Said tables are RAM
resident, but I do need a hook to make system changes when table
columns are changed, and to return an error if a system change fails.

This seemed like a problem for the dataset style with a table_handler.
I've got snmpsets and gets/walks working at a basic level. Problem:
nothing that I do in the table_handler function seems to let me return
an error. I tried making the whole function be just "fprintf(stderr,
"here\n"); return SNMP_ERR_GENERR;", and while I get "here" printed
out, snmpsets are still successful. The example disman code just has
stub handlers. Is there something I'm missing, or do I need to use a
different mib2c template (ie. iterate)?

Platform: netsnmp 5.1 compiled from source under linux.

Thanks!

- Morty


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Net-snmp-users mailing list
Net-snm...@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Dave Shield

unread,
Dec 23, 2003, 7:58:00 AM12/23/03
to

> Problem:
> nothing that I do in the table_handler function seems to let me return
> an error.

Use
netsnmp_set_request_error(reqinfo, request,
SNMP_ERR_GENERR);

to set an error for a given varbind.

Dave

0 new messages