Is there any API to clean up snmpTargetAddrExtTable?

Hi,
When I implement source IP filter function, I meet an issue that I don’t know how to clean up snmpTargetAddrExtTable.
I tried to call snmpTargetMIB.getSnmpTargetAddrEntry().removeAll() to remove all the entries in snmpTargetAddrExtTable.
But after that, I found that SnmpTargetMIB.snmpTargetAddrTagIndex is not cleaned-up. that will make the source IP filter function not working well when I re-configured new enties to snmpTargetAddrExtTable.

Could you please give me an advice which API I should use to clear snmpTargetAddrExtTable?
Thanks.

BR,
Terry

Hi Terry,

Please use the SnmpTargetMIB.removeTargetAddress(OctetString name) to remove a target address. That will remove the corresponding augmented row in SnmpTargetAddrExtEntry instance too.

This is a general approach in SNMP (and SNMP4J-Agent/AGENT++) that when you delete a base row, then augmented or extension rows are deleted automatically by the framework, when the relationship is properly configured. The other way around (augmenting row is being deleted) is not automated. Otherwise you would not be able to implement sparse tables with the framework.

Hope this helps.

Best regards,
Frank