hi ..
i have a mib table to which i am adding rows using the
function shown below.
all the additions are fine and when i do a "snmpget"
on the individual rows the vlues returned are correct.
but when i do an snmpwalk starting at the table's oid.
i get the following error.
ERROR
-------
snmpwalk -v 2c -c public localhost
fileDownloadStatusTable
GENERIC-TEST-EVENT::Status."ZEN" = STRING: "FAIL"
GENERIC-TEST-EVENT::Status."FORD" = STRING: "SUCCESS"
GENERIC-TEST-EVENT::Status."FORD" = Wrong Type (should
be OCTET STRING): OID:
GENERIC-TEST-EVENT::fileDownloadFileName
Error: OID not increasing:
GENERIC-TEST-EVENT::Status."FORD"
>= GENERIC-TEST::Status."FORD"
-------------------------
the "fileDownloadFileName" in the error msg is
actually the next mib variable.
the table has two entries: VUID and STATUS.(both octet
string). VUID is the index.
i had entered only two rows into the table.
FORD / SUCCESS
ZEN / FAIL
but somehow FORD is being displayed twice in the walk.
the function for adding rows to the table is:
-----------------------
void addRowToTable(string vuid, const char* status)
{
netsnmp_table_row *row;
/*
* create the a row for the table, and add the
data
*/
row = netsnmp_create_table_data_row();
char *vuid_data = (const_cast<char *>
(vuid.data()));
/*
* set the index to the vuid
*/
netsnmp_table_row_add_index(row,
ASN_OCTET_STR,vuid_data ,
strlen(vuid_data));
/*
* set column 2 to be the status
*/
netsnmp_set_row_column(row, 2, ASN_OCTET_STR,
status, strlen(status));
netsnmp_mark_row_column_writable(row, 2, 1);
/* make writable via SETs */
/*
* add the row to the table
*/
netsnmp_table_dataset_add_row(table_set, row);
}
--------------------------
please help out and tell me where i have gone wrong at
the earliest.
regards,
sharath
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
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