Hi,
I am using net-snmp-5.2.1, i had genrated mib2c code for myTable. Since the data of the myTable coloumn is not owned by net-snmp agent, If any get/set queries comes for this table i am calling one more server and sending response.
If any getbulk call comes for myTable, in mib2c code net-snmp invokes myTable_handler(). In that function i am having follwing switch case.
switch (reqinfo->mode)
{
case MODE_GETNEXT:
for (request = requests; request; request = request->next) {
table_info = netsnmp_extract_table_info(request);
switch (table_info->colnum) {
case COLUMN_MYCOLOUMN1:
snmp_set_var_typed_value (requests,ASN_INTEGER,(u_char *)&value,sizeof(value));
break;
}
}
case MODE_GETBULK:
snmp_log(LOG_INFO,"i am inside get bulk \n");
break;
case MODE_GET:
-----------
}
When i give getbulk request to this table, it is always comes to MODE_GETNEXT case? Is there any case it will invoke MODE_GETBULK?
Since the data of the table is not stored in SNMP Agent it self, i have to make call to one more server to send back the reply. While filling response, Is it enougth to filling response using snmp_set_var_typed_value()?
If the "-Cr5" option is given in the snmpgetbulk command, is my myTable_handler(), will be called 5 times with reqinfo->mode as MODE_GETNEXT?
Regards,
Kanda
Title: Sending response to Get Bulk from mib2c code
- Sending response to Get Bulk from mib2c code kanda.samy
- Re: Sending response to Get Bulk from mib2c code Dave Shield
