])
+AM_CONDITIONAL(SNMP, test "x$SNMP_METHOD" = "xagentx")
+
dnl ---------------------------
dnl sockaddr and netinet checks
dnl ---------------------------
static struct cmd_node agentx_node =
{
SMUX_NODE,
- "" /* AgentX has no interface. */
+ "", /* AgentX has no interface. */
+ 1
};
/* Logging NetSNMP messages */
{
if (agentx_enabled)
vty_out (vty, "agentx%s", VTY_NEWLINE);
- return 0;
+ return 1;
}
DEFUN (agentx_enable,
return CMD_SUCCESS;
}
vty_out (vty, "SNMP AgentX already enabled%s", VTY_NEWLINE);
- return CMD_WARNING;
+ return CMD_SUCCESS;
}
DEFUN (no_agentx,
vtysh_scan += $(top_srcdir)/eigrpd/eigrp_vty.c
endif
+if SNMP
+vtysh_scan += $(top_srcdir)/lib/agentx.c
+endif
+
vtysh_cmd_FILES = $(vtysh_scan) \
$(top_srcdir)/lib/keychain.c $(top_srcdir)/lib/routemap.c \
$(top_srcdir)/lib/filter.c $(top_srcdir)/lib/plist.c \
elsif ($file =~ /lib\/filter\.c$/) {
$protocol = "VTYSH_ALL";
}
+ elsif ($file =~ /lib\/agentx\.c$/) {
+ $protocol = "VTYSH_RIPD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_BGPD|VTYSH_ZEBRA";
+ }
elsif ($file =~ /lib\/ns\.c$/) {
$protocol = "VTYSH_ZEBRA";
}
if (strncmp (line, "log", strlen ("log")) == 0
|| strncmp (line, "hostname", strlen ("hostname")) == 0
|| strncmp (line, "frr", strlen ("frr")) == 0
+ || strncmp (line, "agentx", strlen ("agentx")) == 0
)
config_add_line_uniq (config_top, line);
else