how to delete a table row

Frank Fock Frank.Fock____t-online.de
Tue Aug 20 23:13:15 CEST 2002


Hi Dave,

Yes, you can call MibTable::remove_row directly. But make
sure that no other thread is accessing the table. If the
table is has not been locked yet, then you should lock
it using

table->start_synch();
table->remove_row(..);
table->end_synch();

Best regards,
Frank

Dave Mason wrote:
> Hello world,
> I'm learning my way around the MibTable methods, and have a question 
> about deleting table rows.  I would like write a method to delete a row 
> from the snmpTargetAddrTable.  The toolkit provides an add_row method 
> but no delete.  I looked around the code, and have a couple of guesses. 
> I could build a Set request to set the rowStatus to rowDestroy, then 
> call MibTable::set_value, or could I call MibTable::remove_row directly? 
> I'll have the index name, so I could do a find to get the MibTableRow*. 
> Maybe the elegant way to add this code would be to create a new subclass 
> of snmpTargetAddrEntry and put it there, but I'd be happy to call a 
> method or two from another class I'm working on.
> 
> Thanks,
> Dave
> 
> 
> 






More information about the AGENTPP mailing list