Robert,

It's easy to reproduce the problem in two steps:
1. Generate mib2c template for etherStatsTable using mib2c.mfd.conf ,
mib2c -c mib2c.mfd.conf etherStatsTable
2. The only change is to add the following lines in etherStatsTable_cache_load( )
oid etherStatsDataSource[] = {1,3,6,1,2,1,2,2,1,1,1};
rowreq_ctx->data.etherStatsDataSource_len = 11;
memcpy(rowreq_ctx->data.etherStatsDataSource, etherStatsDataSource,
rowreq_ctx->data.etherStatsDataSource_len *
sizeof(rowreq_ctx->data.etherStatsDataSource[0]));

I attached my etherStatsTabl_data_access.c for your reference. If you need other etherStatsTable_xxx template, please let me know, but there is no changes to them, just as it is generated.
(See attached file: etherStatsTable_data_access.c)
Thanks.
--
Emi

Inactive hide details for Robert Story <[EMAIL PROTECTED]>Robert Story <[EMAIL PROTECTED]>


          Robert Story <[EMAIL PROTECTED]>

          07/21/2005 06:52 AM

          Please respond to
          net-snmp-coders@lists.sourceforge.net

To

[EMAIL PROTECTED]

cc

net-snmp-coders@lists.sourceforge.net

Subject

Re: mib2c for oid type cause segmentation fault, e.g. etherStatsDataSource

On Wed, 20 Jul 2005 10:47:33 -0500 [EMAIL PROTECTED] wrote:
EYC> This is hard-coded just as the piece of code I copy&pasted in my email.

Ok, where is it? What function?

EYC> RMON-MIB::etherStatsDataSource = Wrong Type (should be OBJECT IDENTIFIER):
EYC> Variable has bad type

Which is odd, since the type should be hard-coded and set in the interface
file.

--
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.

GIF image

Attachment: etherStatsTable_data_access.c
Description: Binary data

Reply via email to