index shown as dot separated ascii values

"Rotem Tzuk" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
hi again
 
I have a table that is is indexed by integer & string:
 
netsnmp_table_helper_add_indexes(
table_info, // the table 
ASN_INTEGER, // ID 
ASN_OCTET_STR, // name 
0);

In my iterator handler I set both values:

vptr = put_index_data;
snmp_set_var_value(vptr, (u_char *)&id, sizeof(int) );
vptr = vptr->next_variable;
snmp_set_var_value(vptr, (u_char *)strStationName.c_str(),
strStationName.length() );

When I run snmpget MyMIB::MyVal.1, the indexes of the result items are
ID = 1, name = "Station1"
I get a correct result but the string Station1 is displayed as ascii
values separated by dot.

I get: MyMIB::MyValue.1.8.83.116.97.116.105.111.110.49  = Counter32: 40

I expect:  MyMIB::MyValue.1."Station1"  = Counter32: 40

Also running snmpget MyMIB::MyVal.\"Station1\" results in "No Such
Instance currently exists at this OID"

Am I missing something?

thanks

Rotem

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.