On Wed, 20 Jul 2005 09:32:59 -0500 [EMAIL PROTECTED] wrote:
EYC> I have implemented several subagents for BRIDGE-MIB tables using mib2c and
EYC> mib2c.mfd.conf. They all worked well. Now I came across a problem with
EYC> RMON-MIB etherStatsTable etherStatsDataSource which is an oid type. If I
EYC> don't set etherStatsDataSource and let it be the default 0.0, the
EYC> etherStatsTable subagent works okay. But if I set etherStatsDataSource_len
EYC> to something not 0 (such as in the following code), it will cause
EYC> segmentation fault. Here is the code which set etherStatsDataSource in
EYC> etherStatsTable_cache_load(netsnmp_container * container):
EYC> 
EYC> oid etherStatsDataSource[] = {1,3,6,1,2,1,2,2,1,1,1};
EYC> rowreq_ctx->data.etherStatsDataSource_len = 11;
EYC> memcpy(rowreq_ctx->data.etherStatsDataSource, etherStatsDataSource,
EYC> rowreq_ctx->data.etherStatsDataSource_len *
EYC> sizeof(rowreq_ctx->data.etherStatsDataSource[0]));

When is this done? Is this a hard-coded t hing, or is this value being set
during processing of a SET request?

Can you post the data context definition from the header?

EYC> results: RMON-MIB::etherStatsDataSource.1 = OID: SNMPv2-SMI::org

This result seems to indicate the the copy wasn't successful, as it is a much
shorter OID.

-- 
NOTE: messages sent directly to me, instead of the lists, will be deleted
      unless they are requests for paid consulting services.

Robert Story; NET-SNMP Junkie
Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp>
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders>

You are lost in a twisty maze of little standards, all different. 


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to