Re: mib2c usage on tables (bad tables!)

Joao Miguel Ferreira <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Got it.

I thought min_column and max_column were indexes for the rows and not
for the columns.

Now it is clear. Thanks

jmf



On Tue, 2007-03-27 at 14:38 +0100, Dave Shield wrote:
> On 07/03/07, Joao Miguel Ferreira <[email protected]> wrote:
> > About this piece of code generated by mib2c what is the usage/meaning of
> > min_column and max_column ??
> 
> 'min_column' is the column number of the first (accessible) column in the
> table, and 'max_column' is the column number of the last column.
> 
> For example, sysORTable (in SNMPv2-MIB) is defined as:
> 
> SysOREntry ::= SEQUENCE {
>     sysORIndex     INTEGER,
>     sysORID        OBJECT IDENTIFIER,
>     sysORDescr     DisplayString,
>     sysORUpTime    TimeStamp
> }
> 
> with
>     sysORID OBJECT-TYPE....  ::= { sysOREntry 2 }
> &
>     sysORUpTime OBJECT-TYPE....  ::= { sysOREntry 4 }
> 
> so   min_column=2 and max_column=4
> 
> (Note that sysORIndex is defined as "not-accessible", which
> is why min_column isn't 1)
> 
> 
> > This is part of the table initialization code.... Am I compromising the
> > future possible growth of the table or this is only for initialization
> > purposes ?
> 
> This doesn't affect the number of *rows* in the table - just the
> number of columns.   If the definition of the table changes, then
> you'd have to update these values.  But you'd need to add code
> to handle the new columns anyway.
> 
> 
> > Put it another way: if I simply do not initialize it (ex: max=0, min=0)
> > would the subsequent procedures work ?
> 
> No.
> The agent wouldn't know which columns were valid.
> 
> Dave


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.