---------- Forwarded message ----------
From: 杨伟 <[EMAIL PROTECTED]>
Date: 2008-6-2 16:48
Subject: Re: something about netsnmp_index
To: Dave Shield <[EMAIL PROTECTED]>

Sorry for posing such a silly question.

I want to describe what we want to do.

We are tring to add a sub-agent to the original version. We are tring to
chang those callback function which are generated automatically by mib2c.

In the MIB file, we defined several tables. And in the c file, we found
those call back functions, and try to chang it.

Our problem now is those MIB informations is not under our control. We have
to pass this request information to another lib which will return those
informations of a sepcified OID.

Before we pass this message, we have to specify the OID of this request. I
think this is what I should do. So that I can call the lib and tell him
which object I want. Right?

So the problem we face is how to extract this OID? When the call back
function is invoked, I am sure this table is required. But which row? which
column? Can we get the exact OID in the call back function?

Do I make myself clear?

Sorry for bothering so many times, and thanks very much.

My Best Regard.




在08-6-2,Dave Shield <[EMAIL PROTECTED]> 写道:
>
> 2008/6/2 杨伟 <[EMAIL PROTECTED]>:
> > I use mib2c to convert a mib file to a c file. I found that for every
> table
> > entry , it adds an netsnmp_index variable automatically.
>
> Which mib2c template are you using?
>
> Many of the table helpers require a particular structure
> for the per-row data structure, so that they can compare
> an incoming request with the index for each row in the
> table, and hence identify which row is required.
> Sometimes this index value is hidden within "private"
> data structures, and the MIB module implementor will
> never see it.   For other helpers, the per-row index field
> is included within the main per-row data structure.
> That sounds like what you've got here.
>
>
> > When net-snmp get a get message, what is stored in this data type?
>
> It's not a question of what happens when an SNMP message arrives,
> it's more concerned with what happens when you load the internal
> representation of the table.
>   The 'net-snmp_index' field hold the index value for a given row.
>
> Dave
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to