Re-reading a persistent store

[email protected]
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
I'm using v5.1.1 (soon to upgrade to v5.2.2) and I have a sub-agent
which stores data in a persisent store (/var/net-snmp/my-subagent.conf).
 In my subagent, I have:

    //----------------------------------------
    // Handle persistent storage of per-port link up/down trap enable

    // The read callback
    for (port = 1; port < numports; ++port) {
        char token[128];
        sprintf(token, "%s_%d", TRAP_CONFIG_TOKEN, port);
        register_config_handler(NULL, 
                                token,
                                parseTrapEnable,
                                NULL,
                                NULL);
    }

    // The store callback
    snmp_register_callback(SNMP_CALLBACK_LIBRARY,
                           SNMP_CALLBACK_STORE_DATA,
                           storeTrapEnable,
                           0);

On startup the values get read from the persistent store and on shutdown
the store is rewritten.  However, I want to be able to change the file
while snmpd (and the sub-agent) are running and have the values re-read.  

I found code in the agent to re-read configuration when a SIGHUP is
received but changing my-subagent.conf and issuing SIGHUP to snmpd
didn't reread the persistent store.  Am I missing something?  Is there
another callback I need to register for reconfig?  Do I need to send
SIGHUP to my sub-agent?


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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.