> > So the first thing to get straight is how to handle the index column.
> > What is the MIB definition of this object?  In particular, what is the
> > MAX-ACCESS clause?

> For COLUMN_GATEWAYINDEX the MIB has defined as:
>   MAX-ACCESS  not-accessible

Right - then the COLUMN_GATEWAYINDEX line should *not* be included in the
   netsnmp_table_set_multi_add_default_row() call.
That should just include *accessible* objects - those with a MAX-ACCESS
clause of 'read-only', 'read-write' or 'read-create'.

And the correspnding "add_row" directive should be:
                       {indexes}     {column values}
   addrow  gatewayTable    1         "TrendGateway" ....



> I found some more errors:
> The COLUMN_PROCESSUPTIME was defined in MIB as Timestamp
> and COLUMN_MESSAGESFROMXCONNECT to COLUMN_MESSAGESTOEXTERIEUR were
> defined in MIB as Counter.
> After changing the MIB for all this columns to INTEGER adding a row succeeds.
> 
> This is somewhat unexpected on my side.
> Which column types are supported?

Should be all the ASN_xxx types.  I can't see why we'd omit any of them.




> > What feels less acceptable is:
> > >    COLUMN_PROCESSID,             ASN_INTEGER,    1,          NULL,  0,
> > >    COLUMN_PROCESSUPTIME,         ASN_COUNTER,    1,          NULL,  0,
> >
> > I strongly suspect that both of these should be "0, sizeof(int)"
> > rather than "NULL, 0"
> 
> Well, changing initialization of numeric COLUMN_PROCESSUPTIME
> from  ASN_COUNTER, 1, NULL, 0,
> to    ASN_INTEGER, 1, 0, sizeof( int ),
> make it better.

My gut reaction is that

    ASN_COUNTER, 1,  0, sizeof( int ),

would also work - i.e. the problem lies in passing a NULL pointer for
an integer-based value, rather than INTEGER vs COUNTER.


Dave



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
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

Reply via email to