On 16 March 2012 19:39, Simon Chamlian <[email protected]> wrote:
> In the request handler function:
> How can we get the instance of the request
> (i.e., the row number of the table) ?
The clean way:
for (request=requests; request; request=request->next) {
table_info = netsnmp_extract_table_info(request);
/** table_info->colnum contains the column number requested */
/** table_info->indexes contains a linked list of snmp variable
bindings for the indexes of the table. Values in the list
have been set corresponding to the indexes of the request */
:
}
The dirty way (relies on the OID being valid and complete,
and the table being indexed by a single integer)
for (request=requests; request; request=request->next) {
vb = request->requestvb;
idx = vb->name[ vb->name_length -1 ];
:
}
Dave
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users