On Wed, 2005-10-12 at 11:36 +0530, [EMAIL PROTECTED] wrote:

> Please do help me if anyone has implemented "RowStatus"
> for dynamic row creation/deletion.

There are assorted examples of dynamic row creation/deletion
in the source distribution, using a variety of MIB helpers.
I'm not sure whether there's anything written using the
iterate_access helpers, but there are basically two
relevant routines:

        yourTable_create_data_context
and
        yourTable_commit_row



The 'create_data_context' routine should create the data
structure for a new row in the table (but not actually insert
this row into the internal representation of the table).

The 'commit_row' routine should either insert this new
row into the table, or remove-and-delete the row - depending
on the value of the 'new_or_del' parameter.
  Something like:

int
yourTable_commit_row(void **my_data_context, int new_or_del)
{
    switch ( new_or_del ) {
    case 1:
        yourTable_addEntry( *my_data_context );
        break;
    case -1:
        yourTable_deleteEntry( *my_data_context );
        *my_data_context = NULL;
        break;
    }
    return SNMP_ERR_NOERROR;
}


(assuming suitable definitions for the two routines specified).


Dave


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to