Hello,

Can anyone help me. I have problem with stinrg index in net-snmp. I have a 
table with 2 indexes. The first is ASN_INTEGER, and the second is 
ASN_OCTET_STR. In The code, it looks like this:

netsnmp_table_helper_add_indexes(table_info,ASN_INTEGER,ASN_OCTET_STR,0);

and in the get_first_data_point and get_next_data_point, I set something like 
this:

int idx=1;
unsigned char idx2 [65535];

snmp_set_var_value(vptr,(u_char *)&idx,sizeof(idx));

strcpy(idx2,"ABCDEFGH");
snmp_set_var_value(vptr,idx1,strlen(idx1));

It seems OK and no problem. But when I try to query that table using snmpwalk, 
the output is something like (on of the example):

MIB::mibnodetableentry.1.'.ABCDE'.70.71.72 = INTEGER 21

My question is how to get an output something like:

MIB::mibnodetableentry.1.'ABCDEFGH' = INTEGER 21

Is that just the mechanism or how?
I confuse. Help me!!!

Thank u for response. 


      
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to