3 * Copyright (C) 2018 Cumulus Networks, Inc.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the Free
8 * Software Foundation; either version 2 of the License, or (at your option)
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 * You should have received a copy of the GNU General Public License along
17 * with this program; see the file COPYING; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 #include "vrrp_memory.h"
29 //#ifndef VTYSH_EXTRACT_PL
30 //#include "vrrp/vrrp_vty_clippy.c"
34 #define VRRP_STR "Virtual Router Redundancy Protocol\n"
35 #define VRRP_VRID_STR "Virtual Router ID\n"
37 DEFUN_NOSH (show_debugging_vrrpd
,
38 show_debugging_vrrpd_cmd
,
39 "show debugging [vrrp]",
44 vty_out(vty
, "VRRP debugging status\n");
56 VTY_DECLVAR_CONTEXT(interface
, ifp
);
60 argv_find(argv
, argc
, "(1-255)", &idx
);
61 vrid
= strtoul(argv
[idx
]->arg
, NULL
, 10);
63 struct vrrp_vrouter
*vr
= vrrp_vrouter_create(ifp
, vrid
);
64 int ret
= vrrp_event(vr
, VRRP_EVENT_STARTUP
);
66 vty_out(vty
, "%% Failed to start VRRP instance\n");
67 return CMD_WARNING_CONFIG_FAILED
;
73 static struct cmd_node interface_node
= {
78 void vrrp_vty_init(void)
80 install_node(&interface_node
, NULL
);
82 install_element(VIEW_NODE
, &show_debugging_vrrpd_cmd
);
83 install_element(ENABLE_NODE
, &show_debugging_vrrpd_cmd
);
84 install_element(INTERFACE_NODE
, &vrrp_vrid_cmd
);