[ First - *please* don't mail me privately, without copying
any responses to the mailing list. I don't have the time
or inclination to offer private, unpaid, SNMP consultancy.
Keep discussions to the list, where others can both learn
and offer advice. Thanks. ]
2009/6/23 Roberto Gonzalo <[email protected]>:
>>What helper is used to implement this MIB?
>
> mib2c -c mib2c.table_data.conf
>>Many of the helpers will automatically convert GETNEXT requests into
>>the appropriate GET request, so that the handler routine doesn't need
>>to worry about this.
>
> Yes, I´ve read about this. But I need that the handler doesn´t convert my
> GETNEXT request into the appropiate GET request.
Then perhaps you shouldn't be using the table_data helper.
The model of this particular helper (and similarly for most of the other
table helpers) is that they know which rows of the table are valid.
When the agent receives a GETNEXT request, they can therefore decide
which is the next relevant row, and call the MIB-specific handler with a
GET request for that particular row.
> if an
> OID doesn´t returns a data I will returns the next OID available with data
> and the OID available only/just I know it.
What exactly do you mean by the OID not returning data?
Are you talking about individual columns being omitted from
an otherwise valid row? Or are you talking about a whole row
being empty?
In the first case, your handler can indicate that a particular instance
is unavailable, and the table_data helper chain will identify the next
valid row, and call your handler again.
The second case should be handled automatically, since you'll have
told the table_data helper exactly which rows are valid in the first
place. It will therefore skip over missing rows itself.
Your hanlder would only be called for rows that you said were valid.
(Of course, if you lie to the helper about this, then you will indeed get
called with an invalid row - but I'd have very little sympathy in that case!)
If you really insist on handling GETNEXT requests yourself, then
you should probably just be using the basic table helper.
In which case, you're effectively on your own. The mib2c templates
are designed for the more powerful helpers.
Dave
------------------------------------------------------------------------------
_______________________________________________
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