On Fri, 2005-05-06 at 05:53, ericyosho wrote:
> i guess that the initial function is called only once
> when the agent is up.

Which "initial function" ?
The init_xxx routines are called once, when the agent
first starts up, yes.
  [Well, strictly speaking there are other times
   when the agent might re-initialise everything,
   but that's relatively unusual.  It's close enough
   to say this happens at startup time]

> or it is called each time when the agent receives a
> request?

Nope.

  
> > You wouldn't normally *update* the linked list.
> > The iterator hook routines will *search* this list
> > for the appropriate entry, and then the handler routine
> > will return the relevant column value from it.
>  
> i am now working with a readonly table with two
> indexes, which is intended to provide realtime
> information of a IP TUNNEL maintained by another
> process. so i have to update my data.

Does this other process change the number of rows
(or their indexes)?  Or are the rows fixed, and it's
just the data for each one that's updated?

What's the interface to this other process like?
Can you request the information for one particular
row, or can you only walk through the whole table?


> actually there are only two routines in the template
> code, initial fuction & **_handler function.
> where should i put my "update codes"?

Eh?  Doesn't sound right for the iterator helper.
What was the exact "mib2c" command that you ran to
generate the template?


> here is my working flow plan:
>   receive a request ->
>   get realtime information ->
>   form a new linked list -> 
>   parse the request to find the right node ->
>   return value ->
>   clear the linked list ->
>   done

How frequently will this "other process" be updating
the information?  If you ran a full walk twice within
three or four seconds, would you expect the results to
be the same, or to have changed?

Roughly how many rows will there typically be in the
whole table?  How many columns in each row?


> if my guess about initial function above is right,
> then i just cannot put these "update codes" in it.
> should i put them in the **_handler function or
> somewhere else?

They don't belong in the init routine, or the handler
function - no.  But I'm surprised that these are the
only two functions you've got to work with.
That doesn't sound right to me.

> after all is the iterate template suitable for me? 

Maybe.
It'll be easier to answer that once you've said a
bit more about the characteristics of the table.
(Hence all the questions above!)

Dave



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
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