On Fri, 4 Jun 2004 03:00:53 +0900 Park wrote: PSJ> I'm writing a program to use array-user type table, whose name is PSJ> "serviceTable". In order to create row, according to comment I used PSJ> create_row( ) and CONTAINER_INSERT( ) in init_serviceTable( ). The PSJ> modified code is the same as follows. PSJ> /* PSJ> * TODO: perform any startup stuff here, such as PSJ> * populating the table with initial data. PSJ> * PSJ> * serviceTable_context * new_row = create_row(index); PSJ> * CONTAINER_INSERT(cb.container,new_row); PSJ> */ PSJ> PSJ> serviceTable_context *new_row = (serviceTable_context *)create_row( 0 PSJ> );
The comment is incorrect. It should have read: * serviceTable_context * new_row = serviceTable_create_row(index); So you'll also need to provide an index. Take a look at this page, too: http://www.net-snmp.org/faqs/rstory/array-user.html#create PSJ> Also, I wonder whether above code is correct. Four lines that start with PSJ> "new_row->" are initialization of my table row. The only part that I'd worry about would be the index. Check out what the serviceTable_create_row() does, and you'll see that dealing with the index is more complex that just setting the value in the table context. -- Robert Story; NET-SNMP Junkie <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp> Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders> You are lost in a twisty maze of little standards, all different. ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. >From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 _______________________________________________ Net-snmp-coders mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders