diff options
Diffstat (limited to 'zebra/zebra_vty.c')
-rw-r--r-- | zebra/zebra_vty.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index e6f80f92a..a094ca585 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -51,6 +51,7 @@ #include "zebra/router-id.h" #include "zebra/ipforward.h" #include "zebra/zebra_vxlan_private.h" +#include "zebra/zebra_pbr.h" extern int allow_delete; @@ -3260,6 +3261,37 @@ DEFUN (show_evpn_neigh_vni_vtep, return CMD_SUCCESS; } +/* policy routing contexts */ +DEFUN (show_pbr_ipset, + show_pbr_ipset_cmd, + "show pbr ipset [WORD]", + SHOW_STR + "Policy-Based Routing\n" + "IPset Context information\n" + "IPset Name information\n") +{ + int idx = 0; + int found = 0; + found = argv_find(argv, argc, "WORD", &idx); + if (!found) + zebra_pbr_show_ipset_list(vty, NULL); + else + zebra_pbr_show_ipset_list(vty, argv[idx]->arg); + return CMD_SUCCESS; +} + +/* policy routing contexts */ +DEFUN (show_pbr_iptable, + show_pbr_iptable_cmd, + "show pbr iptable", + SHOW_STR + "Policy-Based Routing\n" + "IPtable Context information\n") +{ + zebra_pbr_show_iptable(vty); + return CMD_SUCCESS; +} + /* Static ip route configuration write function. */ static int zebra_ip_config(struct vty *vty) { @@ -3762,6 +3794,9 @@ void zebra_vty_init(void) install_element(VIEW_NODE, &show_evpn_neigh_vni_neigh_cmd); install_element(VIEW_NODE, &show_evpn_neigh_vni_vtep_cmd); + install_element(VIEW_NODE, &show_pbr_ipset_cmd); + install_element(VIEW_NODE, &show_pbr_iptable_cmd); + install_element(CONFIG_NODE, &default_vrf_vni_mapping_cmd); install_element(CONFIG_NODE, &no_default_vrf_vni_mapping_cmd); install_element(VRF_NODE, &vrf_vni_mapping_cmd); |