杨伟 wrote:
> Now I am in the FindVarMethod type functioin.
So you're using the old v4-style approach for implementing a table.

> I am curious about how could  it jump from the end of a previous table 
> to the beginning of the next table?
Each table is implemented individually.
The FindVarMethod routine will be given an OID, and attempts to return
the next valid OID within that table.   If it can't then it returns NULL to
indicate failure.   That's all it knows about.

The main agent code has a list of registered tables.
When it receives an SNMP request, it identifies the
table that this request refers to, and calls that FindVarMethod
(or v5 equivalent) to provide the appropriate results.
   If the table handler returns NULL, then the agent
moves on to the next table, and so on.

So it's the agent driving code that jumps from one table to the next,
not the code for the individual tables.


Dave

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to