No, request->index always returns 1 for single GET. The following appears to
work well enough. Thanks anyway.
long myNetSnmpGetLastOidIndex(const netsnmp_table_request_info* table_info,
const int expectedNumberOfIndexes)
{
if ((expectedNumberOfIndexes == table_info->number_indexes) &&
(table_info->index_oid_len > 0))
{
return (long)(table_info->index_oid[table_info->index_oid_len -
1]);
}
else
{
return -1;
}
}
index = myNetSnmpGetLastOidIndex(table_info, 1);
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of Dave Shield
Sent: Thursday, November 10, 2011 6:03 PM
To: STOTTS Timothy
Cc: [email protected]
Subject: Re: how to determine table query index in snmp subagent table handler?
On 10 November 2011 19:49, STOTTS Timothy
<[email protected]> wrote:
> how would I determine the lookup index in the SNMP GET/SET?
> Example handler code:
> int index;
> for (request=requests; request; request=request->next) {
> index = request->index;
Isn't this what you are looking for?
Dave
________________________________
CONFIDENTIALITY : This e-mail and any attachments are confidential and may be
privileged. If you are not a named recipient, please notify the sender
immediately and do not disclose the contents to another person, use it for any
purpose or store or copy the information in any medium.
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
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