On Tue, 2005-08-09 at 14:47 -0500, [EMAIL PROTECTED] wrote:
> Hi Robert,
> 
> Using the patch you sent me on 7/25, I still have problem with mib2c
> generated OID type such as historyControlDataSource. See the snmpwalk
> result below, the populated oid length is 4 times of it should be.
> 
> $ snmpwalk localhost historyControlDataSource
> RMON-MIB::historyControlDataSource.1 = OID:
> IF-MIB::ifIndex.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0
> 
> I attached mib2c generated template code, only
> historyControlTable_data_access.c is modified 

I'm immediately suspicious of the following statement:
(lines 196-198)

        rowreq_ctx->data.historyControlDataSource_len =
            historyControlDataSource_len *
            sizeof(rowreq_ctx->data.historyControlDataSource[0]);


Both OIDs and string values are held as (length,value) pairs, but
I'd expect the length field to be the number of array elements.
For strings, this is exactly the same as the amount of memory used,
but that's not true for OID values.


Try replacing this statement with:

        rowreq_ctx->data.historyControlDataSource_len =
            historyControlDataSource_len;

Dave


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to