This is hard-coded just as the piece of code I copy&pasted in my email.
Please notice the following error happened before the error message in your email.
RMON-MIB::etherStatsDataSource = Wrong Type (should be OBJECT IDENTIFIER): Variable has bad type
I attached the head file etherStatsTable.h.
(See attached file: etherStatsTable.h)
Thanks.
--
Emi
Robert Story <[EMAIL PROTECTED]>
07/20/2005 10:27 AM
|
|
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.
etherStatsTable.h
Description: Binary data