unregister and free tables memory

Meilán García Antonio <[email protected]>
Newsgroups gmane.network.net-snmp.user
Organization TRedess 2010 S.L.
Message-ID <[email protected]>
Hi,

I would like to free all used memory for snmpd. How can I free or 
unregister used tables in a snmpd load module.

I send a -HUP signal to snmpd process, and my system does not retrieve 
all memory.

    reg =
        *netsnmp_create_handler_registration*("snmpTrapsDestinationTable",
                                            
snmpTrapsDestinationTable_handler,
                                            snmpTrapsDestinationTable_oid,
                                            
snmpTrapsDestinationTable_oid_len,
                                            HANDLER_CAN_RWRITE);

    table_info = *SNMP_MALLOC_TYPEDEF*(netsnmp_table_registration_info);
    netsnmp_table_helper_add_indexes(table_info, ASN_INTEGER,   /* 
index: snmpTrapsDestinationIndex */
                                     0);
    table_info->min_column = COLUMN_SNMPTRAPSDESTIONATIONENABLE;
    table_info->max_column = COLUMN_SNMPTRAPSDESTINATIONIP;

    iinfo = *SNMP_MALLOC_TYPEDEF*(netsnmp_iterator_info);
    iinfo->get_first_data_point =
        snmpTrapsDestinationTable_get_first_data_point;
    iinfo->get_next_data_point =
        snmpTrapsDestinationTable_get_next_data_point;
    iinfo->table_reginfo = table_info;

    *netsnmp_register_table_iterator*(reg, iinfo);


I use

void
*snmpTrapsDestinationTable_removeEntry*(struct
                                      snmpTrapsDestinationTable_entry
                                      *entry)

for freeing the nodes of the tables, but I think that I have to free 
something more, because the system does not retrieve all memory when I 
send a -HUP  signal.


Thanks in advance,
Antonio.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.