|
Hi
I created code for “sampleTable” by using “mib2c -c
mib2c.create-dataset.conf sampleTable”. As per the instruction specified “no
need to write any code to perform get/set, add/remove row on this table. The code has following function to write
extra operation other than normal get/set, /** handles
requests for the SampleTable table, if anything else needs to be done */ int SampleTable_handler(
netsnmp_mib_handler
*handler,
netsnmp_handler_registration *reginfo,
netsnmp_agent_request_info *reqinfo,
netsnmp_request_info
*requests) {
/* perform anything here that you need to do. The requests have
already been processed by the master table_dataset handler, but
this gives you chance to act on the request in some other way
if need be. */
return SNMP_ERR_NOERROR; } I had put my server call in this
function…………….. Now the problem I faced is; 1)
After configuring and installing
this module with master agent , snmptable and snmpget for this table returns “error
in packet” But when I try
to do snmpwalk it is listing the tablename ( sampleTable ) in particular oid
(which is specified in the mib2c output code for the variable “static
oid SampleTable_oid[]= ” ). Is it necessary that at lest one row
value is must to list the column while doing snmpwalk . If yes can I able
to add rows using the snmpset in that table or I have to add in my coding
(if yes where subhandler/in init_SampleTable(void) ) or I have to add in
snmpd.conf file for initial row? 2)
To call my other server functions
I had included coding in SampleTable_handler(), Is it OK?, Is for every get/set
request this handler will be called ? With regards Sam |
