Hi,

I have few queries related to generated code using net snmp version 5.1.1. Also, my 
development enviornment is in linux.

1. I generated the code for the table and I understood that during runtime, if we have 
4 rows in a table, the get-next function being called for 4 * 5 times i.e, 20 times. 
am i right? 

We are in a situation to free some data only when the get next is executed for the 
last time( i.e., during the 20th time). For this scenario, how can we free that? also, 
currently, we are using data_free method which is called 20 times for the above 
scenario and noting down the count and once it touches the 20th time, we are freeing 
our data part? is there any other way apart from this?

our code looks like,

void XXX_data_free(void *data, netsnmp_iterator_info *iinfo)
{
    static int count = 0;
    free(data)
    count++;
    if (count == 20)
    {
       /* free some more data */
       count = 0;
    }
}


2. our get first function will be called for 4 times if we have 4 rows in a table 
during run-time. But, we need to restrict some data to be executed only once inside 
get-first for every request from the manager. currently, we have blocked the calling 
of our code inside get first only once by putting some condition check. but, we are 
trying to find some other place to put our code so that we are calling some block of 
code to be exectued only once for every request. is this possible?

Thanks for your help.


Thanks,
Karthik

-- 
______________________________________________
IndiaInfo Mail - the free e-mail service with a difference! www.indiainfo.com 
Check out our value-added Premium features, such as an extra 20MB for mail storage, 
POP3, e-mail forwarding, and ads-free mailboxes!

Powered by Outblaze


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to