On Wed, 2005-09-21 at 10:41 -0700, Toth, Gregory S wrote:
> We wish to use a string as the second index to a
> two dimensional table in our agent.
Fair enough.
> Is this even possible to implement?
Yes - several of the tables in the Net-SNMP agent are
index (wholly or partially) by string values.
> If this is possible, then how do we specify instances of table members?
> For example, lets say the first element in the table had fooId of 123
> and fooName of "elementOne". How would we do an snmpget on fooValue for
> this element:
>
> snmpget -v 2c -c public localhost XXX-SNMP-MIB::fooValue.123.????
The Net-SNMP tools would recognise:
snmpget ..... XXX-SNMP-MIB::fooValue.123."elementOne"
(though in practise, you'd need to escape the quote characters:
XXX-SNMP-MIB::fooValue.123.\"elementOne\"
to protect them from being swallowed by the shell).
Internally, this would be expanded to the length plus individual
character values:
fooValue.1.10.69.108.101.109.101.110.164.79.110.101
See RFC 2578, section 7.7, clauses (2) and (3) for the details.
Dave
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders