Hi again ,

I'm trying to figure out the table get operations through example codes. I
generated a template with
mib2c -c mib2c.mfd.conf skynetPortStatusTable

My table is simple i have 1 integer as index and 2 strings in it.

I think i understand most of the generated code and filled the parts that
make my own module to stuff.
But some parts of the template are not clear to me :

1) I have filled the xxx_container_load(netsnmp_container *container)
function with my indexes as it says because
other data is expensive to fill here. I was expecting that function to be
called somewhere in my code when my
table module was initializing but there was no place that was used. So i
added it into generated xxx_interface.c in
_xxx_initialize_interface function ,is it the right behaviour to put it here
?

2) The second part that confuses me is the part that finds the row with
queried index. I was expecting to get
the incoming index, search the container and if i have it , to call the
xxx_row_prep to fill the found row with my data.
But as i see the function that calls xxx_row_prep which is
_mfd_xxx_object_lookup firstly does something like

skynetPortStatusTable_rowreq_ctx *rowreq_ctx =
                  netsnmp_container_table_row_extract(requests);

and founds my rowreq_ctx magically. I looked at the code but didnt get it ?
Also getting row like that and filling it after that doesnt seem to me very
efficient what happens
if i have 100000 rows all they stay in memory ? What is the best approach
here ?

Thanks for your answers in advance ...
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to