Hello,
I am new to this group and net-snmp, I am trying to
implement a table
with two objects and three indices. I am just trying
to fill the stub
values for testing purpose, querying the Table returns
the error "No
Entries".
Kindly look at the code and comment whether I am
implementing the
"get_first_data_point()" function correctly or not, if
wrong, please
suggest me the way to fix it.
XXXX.c
/***************************************************
* Setting up the table's definition
*/
netsnmp_table_helper_add_indexes(table_info,
ASN_INTEGER, /**
index:myIndex1 */
ASN_UNSIGNED,/**
index:myIndex2 */
ASN_INTEGER, /**
index:myIndex3 */
0);
XXXX_access.c
------------------------------------------------------------------------
----
netsnmp_variable_list *
myTestTable_get_first_data_point(void
**my_loop_context,
void
**my_data_context,
netsnmp_variable_list
*
put_index_data,
netsnmp_iterator_info
*mydata)
{
netsnmp_variable_list *vptr;
struct myTable_info *node;
vptr = put_index_data;
*my_loop_context = node;
*my_data_context = node;
node->myIndex1 = 1;
node->myIndex2 = 1;
node->myIndex3 = 1;
node->myTableObject1 = 1;
node->myTableObject2 = 1;
snmp_set_var_value(vptr, (u_char *)
&node->myIndex1,sizeof(node->myIndex1));
vptr = vptr->next_variable;
snmp_set_var_value(vptr, (u_char *)
&node->myIndex2,sizeof(node->myIndex2));
vptr = vptr->next_variable;
snmp_set_var_value(vptr, (u_char *)
&node->myIndex3,sizeof(node->myIndex3));
vptr = vptr->next_variable;
return put_index_data;
}
Thanks,
Bala
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders