When shutting down ensure that any daemon operating with
snmp tells it to stop operating so no more data is sent.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
#include "linklist.h"
#include "lib/version.h"
#include "lib_errors.h"
+#include "hook.h"
+#include "libfrr.h"
#include "xref.h"
XREF_SETUP();
return CMD_WARNING_CONFIG_FAILED;
}
+static int smux_disable(void)
+{
+ agentx_enabled = false;
+
+ return 0;
+}
+
bool smux_enabled(void)
{
return agentx_enabled;
install_node(&agentx_node);
install_element(CONFIG_NODE, &agentx_enable_cmd);
install_element(CONFIG_NODE, &no_agentx_cmd);
+
+ hook_register(frr_early_fini, smux_disable);
}
void smux_agentx_enable(void)
#define SNMP_IP6ADDRESS(V) (*var_len = sizeof(struct in6_addr), (uint8_t *)&V)
+/*
+ * Check to see if snmp is enabled or not
+ */
extern bool smux_enabled(void);
extern void smux_init(struct thread_master *tm);