>>>>> On Thu, 18 Dec 2008 17:37:14 +0530 (IST), jayesh km >>>>> <[email protected]> said:
jk> My problem is the generated code doesn't gives me a method to jk> directly access the data from map using index when I issue a get jk> request. Instead it gives "get_first" and "get_next" function calls jk> to iterate through the table. I think this is very much inefficient jk> because I can directly access my data if I get the index (name) and jk> the column name of the table in the handler function. Same case for jk> set request also. If I get an Index (name) that does not exist in jk> table, I will create a new one. You're right that the itterator is designed for people that don't necessarily have direct access to the data; or more importantly might not successfully return the next object correctly when doing a GETNEXT. (GETNEXT's are very tricky to get right and getting it wrong can send the manager and agent into an infinite loop talking to each other). You might want to write a different handler type if you want to optimize your access directly by the indexes. You might see the examples in agent/mibgroup/testhandler.c (in particular, I think the multiplication table shows direct access of indexes and direct calculation of the response). -- Wes Hardaker Sparta, Inc. ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ 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
