Hi All,
We are developing an subagent for one of the device for which mib is defined.
MIB is been loaded on to different Management Software and is getting uplaoded in all the
management tool.
For this MIB we are trying to develop a subagent. We are able to develop the code for all the scalar OID's
we are facing problem in generating the code for the Table.
Following is the Version of the Net-SNMP being used.
-net-snmp 5.2.1.2 on RHEL 3AS with kernal version 2.4.21-15.EL..
Problem of the Table.
Requirement for the table is to, devlop the agent with the default rows. Agent is not allowed to add any rows in the Table.
In the table we have got and intiger which is the index and the other column is an IP Address data type.
Following is the structure.
+--stbDNSTable(6)
|
+--stbDNSEntry(1)
| Index: stbDNSIndex
|
+-- -R-- INTEGER stbDNSIndex(1)
| Range: 0
+-- -R-- IpAddr dnsIPAddress(2)
|
+--stbDNSEntry(1)
| Index: stbDNSIndex
|
+-- -R-- INTEGER stbDNSIndex(1)
| Range: 0
+-- -R-- IpAddr dnsIPAddress(2)
In the code we have added the default values in the row. following is the code for the same
row = netsnmp_create_table_data_row();
/*
* set the index to the IETF WG name "snmpv3"
*/
netsnmp_table_row_add_index(row, ASN_INTEGER,0 ,sizeof(int));
/* Add the Date for the First Row
*/
netsnmp_set_row_column(row, 2, ASN_IPADDRESS, "16.138.56.91
", 16);
netsnmp_mark_row_column_writable(row, 2, 1);
/*
* add the row to the table
*/
netsnmp_table_dataset_add_row(table_set, row);
netsnmp_register_auto_data _table(table_set, NULL);
This is the part of the code. Binarries get generated for the code and after running the subagent. If we make the query we will get the
following values.
STB-SNMP-MIB::dnsIPAddress.0 = IpAddress: 49.54.46.49
but the actual value assigned is 16.138.56.91.
Please let me know, where should I look to solve the problem and what is causing the problem.
Any inputs for the problem is accepted. Thanks in Advance for the solution
regards
Ravi Kumar
