From 2511cb40e6b0e88620f26b3506b2a454a773c93d Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 20 Sep 2016 21:43:46 -0400 Subject: lib, zebra: Fixup if.c to work in the new regime Signed-off-by: Donald Sharp --- zebra/interface.c | 1 - 1 file changed, 1 deletion(-) (limited to 'zebra') diff --git a/zebra/interface.c b/zebra/interface.c index 9be97e221..0546cb8f9 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -2960,7 +2960,6 @@ zebra_if_init (void) install_element (CONFIG_NODE, &zebra_interface_cmd); install_element (CONFIG_NODE, &zebra_interface_vrf_cmd); install_element (CONFIG_NODE, &no_interface_cmd); - install_element (CONFIG_NODE, &no_interface_vrf_cmd); install_default (INTERFACE_NODE); install_element (INTERFACE_NODE, &interface_desc_cmd); install_element (INTERFACE_NODE, &no_interface_desc_cmd); -- cgit v1.2.3 From 5c94274ff77b7ba53a27ed68eb4b0bcdafba47b2 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 20 Sep 2016 23:29:43 -0400 Subject: zebra: Fixup to use the new parser --- zebra/debug.c | 22 +-- zebra/interface.c | 60 +++--- zebra/irdp_interface.c | 18 +- zebra/router-id.c | 6 +- zebra/rtadv.c | 38 ++-- zebra/test_main.c | 2 +- zebra/zebra_routemap.c | 134 ++++++------- zebra/zebra_vty.c | 510 ++++++++++++++++++++++++------------------------- zebra/zserv.c | 2 +- 9 files changed, 396 insertions(+), 396 deletions(-) (limited to 'zebra') diff --git a/zebra/debug.c b/zebra/debug.c index cdf233879..1849ebde6 100644 --- a/zebra/debug.c +++ b/zebra/debug.c @@ -131,11 +131,11 @@ DEFUN (debug_zebra_packet_direct, "Debug option set for send packet\n") { zebra_debug_packet = ZEBRA_DEBUG_PACKET; - if (strncmp ("send", argv[0], strlen (argv[0])) == 0) + if (strncmp ("send", argv[0]->arg, strlen (argv[0]->arg)) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND); - if (strncmp ("recv", argv[0], strlen (argv[0])) == 0) + if (strncmp ("recv", argv[0]->arg, strlen (argv[0]->arg)) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV); - if (strncmp ("detail", argv[0], strlen (argv[0])) == 0) + if (strncmp ("detail", argv[0]->arg, strlen (argv[0]->arg)) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_DETAIL); return CMD_SUCCESS; } @@ -151,9 +151,9 @@ DEFUN (debug_zebra_packet_detail, "Debug option set detailed information\n") { zebra_debug_packet = ZEBRA_DEBUG_PACKET; - if (strncmp ("send", argv[0], strlen (argv[0])) == 0) + if (strncmp ("send", argv[0]->arg, strlen (argv[0]->arg)) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND); - if (strncmp ("recv", argv[0], strlen (argv[0])) == 0) + if (strncmp ("recv", argv[0]->arg, strlen (argv[0]->arg)) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV); SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_DETAIL); return CMD_SUCCESS; @@ -180,9 +180,9 @@ DEFUN (debug_zebra_kernel_msgdump, "Dump raw netlink messages received\n" "Dump raw netlink messages sent\n") { - if (!argv[1] || (argv[0] && strncmp(argv[0], "recv", strlen(argv[0])) == 0)) + if (!argv[1]->arg || (argv[0]->arg && strncmp(argv[0]->arg, "recv", strlen(argv[0]->arg)) == 0)) SET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV); - if (!argv[0] || (argv[1] && strncmp(argv[1], "send", strlen(argv[1])) == 0)) + if (!argv[0]->arg || (argv[1]->arg && strncmp(argv[1]->arg, "send", strlen(argv[1]->arg)) == 0)) SET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND); return CMD_SUCCESS; } @@ -267,9 +267,9 @@ DEFUN (no_debug_zebra_packet_direct, "Debug option set for receive packet\n" "Debug option set for send packet\n") { - if (strncmp ("send", argv[0], strlen (argv[0])) == 0) + if (strncmp ("send", argv[0]->arg, strlen (argv[0]->arg)) == 0) UNSET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND); - if (strncmp ("recv", argv[0], strlen (argv[0])) == 0) + if (strncmp ("recv", argv[0]->arg, strlen (argv[0]->arg)) == 0) UNSET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV); return CMD_SUCCESS; } @@ -296,9 +296,9 @@ DEFUN (no_debug_zebra_kernel_msgdump, "Dump raw netlink messages received\n" "Dump raw netlink messages sent\n") { - if (!argv[1] || (argv[0] && strncmp(argv[0], "recv", strlen(argv[0])) == 0)) + if (!argv[1]->arg || (argv[0]->arg && strncmp(argv[0]->arg, "recv", strlen(argv[0]->arg)) == 0)) UNSET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV); - if (!argv[0] || (argv[1] && strncmp(argv[1], "send", strlen(argv[1])) == 0)) + if (!argv[0]->arg || (argv[1]->arg && strncmp(argv[1]->arg, "send", strlen(argv[1]->arg)) == 0)) UNSET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND); return CMD_SUCCESS; } diff --git a/zebra/interface.c b/zebra/interface.c index 0546cb8f9..5469f8c29 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1317,7 +1317,7 @@ DEFUN (show_interface, show_interface_cmd, interface_update_stats (); if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[0]->arg); /* All interface print. */ for (ALL_LIST_ELEMENTS_RO (vrf_iflist (vrf_id), node, ifp)) @@ -1370,13 +1370,13 @@ DEFUN (show_interface_name_vrf, interface_update_stats (); if (argc > 1) - VRF_GET_ID (vrf_id, argv[1]); + VRF_GET_ID (vrf_id, argv[1]->arg); /* Specified interface print. */ - ifp = if_lookup_by_name_vrf (argv[0], vrf_id); + ifp = if_lookup_by_name_vrf (argv[0]->arg, vrf_id); if (ifp == NULL) { - vty_out (vty, "%% Can't find interface %s%s", argv[0], + vty_out (vty, "%% Can't find interface %s%s", argv[0]->arg, VTY_NEWLINE); return CMD_WARNING; } @@ -1403,7 +1403,7 @@ DEFUN (show_interface_name_vrf_all, show_interface_name_vrf_all_cmd, for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter)) { /* Specified interface print. */ - ifp = if_lookup_by_name_vrf (argv[0], vrf_iter2id (iter)); + ifp = if_lookup_by_name_vrf (argv[0]->arg, vrf_iter2id (iter)); if (ifp) { if_dump_vty (vty, ifp); @@ -1413,7 +1413,7 @@ DEFUN (show_interface_name_vrf_all, show_interface_name_vrf_all_cmd, if (!found) { - vty_out (vty, "%% Can't find interface %s%s", argv[0], VTY_NEWLINE); + vty_out (vty, "%% Can't find interface %s%s", argv[0]->arg, VTY_NEWLINE); return CMD_WARNING; } @@ -1476,7 +1476,7 @@ DEFUN (show_interface_desc, vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[0]->arg); if_show_description (vty, vrf_id); @@ -1679,7 +1679,7 @@ DEFUN (bandwidth_if, unsigned int bandwidth; ifp = (struct interface *) vty->index; - bandwidth = strtol(argv[0], NULL, 10); + bandwidth = strtol(argv[0]->arg, NULL, 10); /* bandwidth range is <1-100000> */ if (bandwidth < 1 || bandwidth > 100000) @@ -1843,7 +1843,7 @@ DEFUN (link_params_metric, struct if_link_params *iflp = if_link_params_get (ifp); u_int32_t metric; - VTY_GET_ULONG("metric", metric, argv[0]); + VTY_GET_ULONG("metric", metric, argv[0]->arg); /* Update TE metric if needed */ link_param_cmd_set_uint32 (ifp, &iflp->te_metric, LP_TE, metric); @@ -1876,7 +1876,7 @@ DEFUN (link_params_maxbw, float bw; - if (sscanf (argv[0], "%g", &bw) != 1) + if (sscanf (argv[0]->arg, "%g", &bw) != 1) { vty_out (vty, "link_params_maxbw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -1919,7 +1919,7 @@ DEFUN (link_params_max_rsv_bw, struct if_link_params *iflp = if_link_params_get (ifp); float bw; - if (sscanf (argv[0], "%g", &bw) != 1) + if (sscanf (argv[0]->arg, "%g", &bw) != 1) { vty_out (vty, "link_params_max_rsv_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -1954,14 +1954,14 @@ DEFUN (link_params_unrsv_bw, float bw; /* We don't have to consider about range check here. */ - if (sscanf (argv[0], "%d", &priority) != 1) + if (sscanf (argv[0]->arg, "%d", &priority) != 1) { vty_out (vty, "link_params_unrsv_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); return CMD_WARNING; } - if (sscanf (argv[1], "%g", &bw) != 1) + if (sscanf (argv[1]->arg, "%g", &bw) != 1) { vty_out (vty, "link_params_unrsv_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -1993,7 +1993,7 @@ DEFUN (link_params_admin_grp, struct if_link_params *iflp = if_link_params_get (ifp); unsigned long value; - if (sscanf (argv[0], "0x%lx", &value) != 1) + if (sscanf (argv[0]->arg, "0x%lx", &value) != 1) { vty_out (vty, "link_params_admin_grp: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2035,13 +2035,13 @@ DEFUN (link_params_inter_as, struct in_addr addr; u_int32_t as; - if (!inet_aton (argv[0], &addr)) + if (!inet_aton (argv[0]->arg, &addr)) { vty_out (vty, "Please specify Router-Addr by A.B.C.D%s", VTY_NEWLINE); return CMD_WARNING; } - VTY_GET_ULONG("AS number", as, argv[1]); + VTY_GET_ULONG("AS number", as, argv[1]->arg); /* Update Remote IP and Remote AS fields if needed */ if (IS_PARAM_UNSET(iflp, LP_RMT_AS) @@ -2096,7 +2096,7 @@ DEFUN (link_params_delay, u_int8_t update = 0; /* Get and Check new delay values */ - VTY_GET_ULONG("delay", delay, argv[0]); + VTY_GET_ULONG("delay", delay, argv[0]->arg); switch (argc) { case 1: @@ -2130,8 +2130,8 @@ DEFUN (link_params_delay, return CMD_WARNING; break; case 3: - VTY_GET_ULONG("minimum delay", low, argv[1]); - VTY_GET_ULONG("maximum delay", high, argv[2]); + VTY_GET_ULONG("minimum delay", low, argv[1]->arg); + VTY_GET_ULONG("maximum delay", high, argv[2]->arg); /* Check new delays value coherency */ if (delay <= low || delay >= high) { @@ -2209,7 +2209,7 @@ DEFUN (link_params_delay_var, struct if_link_params *iflp = if_link_params_get (ifp); u_int32_t value; - VTY_GET_ULONG("delay variation", value, argv[0]); + VTY_GET_ULONG("delay variation", value, argv[0]->arg); /* Update Delay Variation if needed */ link_param_cmd_set_uint32 (ifp, &iflp->delay_var, LP_DELAY_VAR, value); @@ -2241,7 +2241,7 @@ DEFUN (link_params_pkt_loss, struct if_link_params *iflp = if_link_params_get (ifp); float fval; - if (sscanf (argv[0], "%g", &fval) != 1) + if (sscanf (argv[0]->arg, "%g", &fval) != 1) { vty_out (vty, "link_params_pkt_loss: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2281,7 +2281,7 @@ DEFUN (link_params_res_bw, struct if_link_params *iflp = if_link_params_get (ifp); float bw; - if (sscanf (argv[0], "%g", &bw) != 1) + if (sscanf (argv[0]->arg, "%g", &bw) != 1) { vty_out (vty, "link_params_res_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2327,7 +2327,7 @@ DEFUN (link_params_ava_bw, struct if_link_params *iflp = if_link_params_get (ifp); float bw; - if (sscanf (argv[0], "%g", &bw) != 1) + if (sscanf (argv[0]->arg, "%g", &bw) != 1) { vty_out (vty, "link_params_ava_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2373,7 +2373,7 @@ DEFUN (link_params_use_bw, struct if_link_params *iflp = if_link_params_get (ifp); float bw; - if (sscanf (argv[0], "%g", &bw) != 1) + if (sscanf (argv[0]->arg, "%g", &bw) != 1) { vty_out (vty, "link_params_use_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2557,7 +2557,7 @@ DEFUN (ip_address, "Set the IP address of an interface\n" "IP address (e.g. 10.0.0.1/8)\n") { - return ip_address_install (vty, vty->index, argv[0], NULL, NULL); + return ip_address_install (vty, vty->index, argv[0]->arg, NULL, NULL); } DEFUN (no_ip_address, @@ -2568,7 +2568,7 @@ DEFUN (no_ip_address, "Set the IP address of an interface\n" "IP Address (e.g. 10.0.0.1/8)") { - return ip_address_uninstall (vty, vty->index, argv[0], NULL, NULL); + return ip_address_uninstall (vty, vty->index, argv[0]->arg, NULL, NULL); } @@ -2582,7 +2582,7 @@ DEFUN (ip_address_label, "Label of this address\n" "Label\n") { - return ip_address_install (vty, vty->index, argv[0], NULL, argv[1]); + return ip_address_install (vty, vty->index, argv[0]->arg, NULL, argv[1]->arg); } DEFUN (no_ip_address_label, @@ -2595,7 +2595,7 @@ DEFUN (no_ip_address_label, "Label of this address\n" "Label\n") { - return ip_address_uninstall (vty, vty->index, argv[0], NULL, argv[1]); + return ip_address_uninstall (vty, vty->index, argv[0]->arg, NULL, argv[1]->arg); } #endif /* HAVE_NETLINK */ @@ -2758,7 +2758,7 @@ DEFUN (ipv6_address, "Set the IP address of an interface\n" "IPv6 address (e.g. 3ffe:506::1/48)\n") { - return ipv6_address_install (vty, vty->index, argv[0], NULL, NULL, 0); + return ipv6_address_install (vty, vty->index, argv[0]->arg, NULL, NULL, 0); } DEFUN (no_ipv6_address, @@ -2769,7 +2769,7 @@ DEFUN (no_ipv6_address, "Set the IP address of an interface\n" "IPv6 address (e.g. 3ffe:506::1/48)\n") { - return ipv6_address_uninstall (vty, vty->index, argv[0], NULL, NULL, 0); + return ipv6_address_uninstall (vty, vty->index, argv[0]->arg, NULL, NULL, 0); } #endif /* HAVE_IPV6 */ diff --git a/zebra/irdp_interface.c b/zebra/irdp_interface.c index 8fb4fcad1..cbc89dee7 100644 --- a/zebra/irdp_interface.c +++ b/zebra/irdp_interface.c @@ -480,7 +480,7 @@ DEFUN (ip_irdp_holdtime, zi=ifp->info; irdp=&zi->irdp; - irdp->Lifetime = atoi(argv[0]); + irdp->Lifetime = atoi(argv[0]->arg); return CMD_SUCCESS; } @@ -503,8 +503,8 @@ DEFUN (ip_irdp_minadvertinterval, zi=ifp->info; irdp=&zi->irdp; - if( (unsigned) atoi(argv[0]) <= irdp->MaxAdvertInterval) { - irdp->MinAdvertInterval = atoi(argv[0]); + if( (unsigned) atoi(argv[0]->arg) <= irdp->MaxAdvertInterval) { + irdp->MinAdvertInterval = atoi(argv[0]->arg); return CMD_SUCCESS; } @@ -537,8 +537,8 @@ DEFUN (ip_irdp_maxadvertinterval, irdp=&zi->irdp; - if( irdp->MinAdvertInterval <= (unsigned) atoi(argv[0]) ) { - irdp->MaxAdvertInterval = atoi(argv[0]); + if( irdp->MinAdvertInterval <= (unsigned) atoi(argv[0]->arg) ) { + irdp->MaxAdvertInterval = atoi(argv[0]->arg); return CMD_SUCCESS; } @@ -575,7 +575,7 @@ DEFUN (ip_irdp_preference, zi=ifp->info; irdp=&zi->irdp; - irdp->Preference = atoi(argv[0]); + irdp->Preference = atoi(argv[0]->arg); return CMD_SUCCESS; } @@ -605,10 +605,10 @@ DEFUN (ip_irdp_address_preference, zi=ifp->info; irdp=&zi->irdp; - ret = inet_aton(argv[0], &ip); + ret = inet_aton(argv[0]->arg, &ip); if(!ret) return CMD_WARNING; - pref = atoi(argv[1]); + pref = atoi(argv[1]->arg); for (ALL_LIST_ELEMENTS_RO (irdp->AdvPrefList, node, adv)) if(adv->ip.s_addr == ip.s_addr) @@ -649,7 +649,7 @@ DEFUN (no_ip_irdp_address_preference, zi=ifp->info; irdp=&zi->irdp; - ret = inet_aton(argv[0], &ip); + ret = inet_aton(argv[0]->arg, &ip); if (!ret) return CMD_WARNING; diff --git a/zebra/router-id.c b/zebra/router-id.c index d5d9652c5..9891b6ce0 100644 --- a/zebra/router-id.c +++ b/zebra/router-id.c @@ -223,7 +223,7 @@ DEFUN (router_id, struct prefix rid; vrf_id_t vrf_id = VRF_DEFAULT; - rid.u.prefix4.s_addr = inet_addr (argv[0]); + rid.u.prefix4.s_addr = inet_addr (argv[0]->arg); if (!rid.u.prefix4.s_addr) return CMD_WARNING; @@ -231,7 +231,7 @@ DEFUN (router_id, rid.family = AF_INET; if (argc > 1) - VRF_GET_ID (vrf_id, argv[1]); + VRF_GET_ID (vrf_id, argv[1]->arg); router_id_set (&rid, vrf_id); @@ -259,7 +259,7 @@ DEFUN (no_router_id, rid.family = AF_INET; if (argc > 1) - VRF_GET_ID (vrf_id, argv[1]); + VRF_GET_ID (vrf_id, argv[1]->arg); router_id_set (&rid, vrf_id); diff --git a/zebra/rtadv.c b/zebra/rtadv.c index ac297890a..b84585405 100644 --- a/zebra/rtadv.c +++ b/zebra/rtadv.c @@ -930,7 +930,7 @@ DEFUN (ipv6_nd_ra_interval_msec, struct zebra_ns *zns; zns = zvrf->zns; - VTY_GET_INTEGER_RANGE ("router advertisement interval", interval, argv[0], 70, 1800000); + VTY_GET_INTEGER_RANGE ("router advertisement interval", interval, argv[0]->arg, 70, 1800000); if ((zif->rtadv.AdvDefaultLifetime != -1 && interval > (unsigned)zif->rtadv.AdvDefaultLifetime * 1000)) { vty_out (vty, "This ra-interval would conflict with configured ra-lifetime!%s", VTY_NEWLINE); @@ -965,7 +965,7 @@ DEFUN (ipv6_nd_ra_interval, struct zebra_ns *zns; zns = zvrf->zns; - VTY_GET_INTEGER_RANGE ("router advertisement interval", interval, argv[0], 1, 1800); + VTY_GET_INTEGER_RANGE ("router advertisement interval", interval, argv[0]->arg, 1, 1800); if ((zif->rtadv.AdvDefaultLifetime != -1 && interval > (unsigned)zif->rtadv.AdvDefaultLifetime)) { vty_out (vty, "This ra-interval would conflict with configured ra-lifetime!%s", VTY_NEWLINE); @@ -1045,7 +1045,7 @@ DEFUN (ipv6_nd_ra_lifetime, ifp = (struct interface *) vty->index; zif = ifp->info; - VTY_GET_INTEGER_RANGE ("router lifetime", lifetime, argv[0], 0, 9000); + VTY_GET_INTEGER_RANGE ("router lifetime", lifetime, argv[0]->arg, 0, 9000); /* The value to be placed in the Router Lifetime field * of Router Advertisements sent from the interface, @@ -1100,7 +1100,7 @@ DEFUN (ipv6_nd_reachable_time, { struct interface *ifp = (struct interface *) vty->index; struct zebra_if *zif = ifp->info; - VTY_GET_INTEGER_RANGE ("reachable time", zif->rtadv.AdvReachableTime, argv[0], 1, RTADV_MAX_REACHABLE_TIME); + VTY_GET_INTEGER_RANGE ("reachable time", zif->rtadv.AdvReachableTime, argv[0]->arg, 1, RTADV_MAX_REACHABLE_TIME); return CMD_SUCCESS; } @@ -1142,7 +1142,7 @@ DEFUN (ipv6_nd_homeagent_preference, { struct interface *ifp = (struct interface *) vty->index; struct zebra_if *zif = ifp->info; - VTY_GET_INTEGER_RANGE ("home agent preference", zif->rtadv.HomeAgentPreference, argv[0], 0, 65535); + VTY_GET_INTEGER_RANGE ("home agent preference", zif->rtadv.HomeAgentPreference, argv[0]->arg, 0, 65535); return CMD_SUCCESS; } @@ -1184,7 +1184,7 @@ DEFUN (ipv6_nd_homeagent_lifetime, { struct interface *ifp = (struct interface *) vty->index; struct zebra_if *zif = ifp->info; - VTY_GET_INTEGER_RANGE ("home agent lifetime", zif->rtadv.HomeAgentLifetime, argv[0], 0, RTADV_MAX_HALIFETIME); + VTY_GET_INTEGER_RANGE ("home agent lifetime", zif->rtadv.HomeAgentLifetime, argv[0]->arg, 0, RTADV_MAX_HALIFETIME); return CMD_SUCCESS; } @@ -1390,7 +1390,7 @@ DEFUN (ipv6_nd_prefix, ifp = (struct interface *) vty->index; zebra_if = ifp->info; - ret = str2prefix_ipv6 (argv[0], &rp.prefix); + ret = str2prefix_ipv6 (argv[0]->arg, &rp.prefix); if (!ret) { vty_out (vty, "Malformed IPv6 prefix%s", VTY_NEWLINE); @@ -1405,19 +1405,19 @@ DEFUN (ipv6_nd_prefix, if (argc > 1) { - if ((isdigit((unsigned char)argv[1][0])) - || strncmp (argv[1], "i", 1) == 0) + if ((isdigit((unsigned char)argv[1]->arg[0])) + || strncmp (argv[1]->arg, "i", 1) == 0) { - if ( strncmp (argv[1], "i", 1) == 0) + if ( strncmp (argv[1]->arg, "i", 1) == 0) rp.AdvValidLifetime = UINT32_MAX; else - rp.AdvValidLifetime = (u_int32_t) strtoll (argv[1], + rp.AdvValidLifetime = (u_int32_t) strtoll (argv[1]->arg, (char **)NULL, 10); - if ( strncmp (argv[2], "i", 1) == 0) + if ( strncmp (argv[2]->arg, "i", 1) == 0) rp.AdvPreferredLifetime = UINT32_MAX; else - rp.AdvPreferredLifetime = (u_int32_t) strtoll (argv[2], + rp.AdvPreferredLifetime = (u_int32_t) strtoll (argv[2]->arg, (char **)NULL, 10); if (rp.AdvPreferredLifetime > rp.AdvValidLifetime) @@ -1431,11 +1431,11 @@ DEFUN (ipv6_nd_prefix, { for (i = cursor; i < argc; i++) { - if (strncmp (argv[i], "of", 2) == 0) + if (strncmp (argv[i]->arg, "of", 2) == 0) rp.AdvOnLinkFlag = 0; - if (strncmp (argv[i], "no", 2) == 0) + if (strncmp (argv[i]->arg, "no", 2) == 0) rp.AdvAutonomousFlag = 0; - if (strncmp (argv[i], "ro", 2) == 0) + if (strncmp (argv[i]->arg, "ro", 2) == 0) rp.AdvRouterAddressFlag = 1; } } @@ -1619,7 +1619,7 @@ DEFUN (no_ipv6_nd_prefix, ifp = (struct interface *) vty->index; zebra_if = ifp->info; - ret = str2prefix_ipv6 (argv[0], &rp.prefix); + ret = str2prefix_ipv6 (argv[0]->arg, &rp.prefix); if (!ret) { vty_out (vty, "Malformed IPv6 prefix%s", VTY_NEWLINE); @@ -1810,7 +1810,7 @@ DEFUN (ipv6_nd_router_preference, while (0 != rtadv_pref_strs[i]) { - if (strncmp (argv[0], rtadv_pref_strs[i], 1) == 0) + if (strncmp (argv[0]->arg, rtadv_pref_strs[i], 1) == 0) { zif->rtadv.DefaultPreference = i; return CMD_SUCCESS; @@ -1861,7 +1861,7 @@ DEFUN (ipv6_nd_mtu, { struct interface *ifp = (struct interface *) vty->index; struct zebra_if *zif = ifp->info; - VTY_GET_INTEGER_RANGE ("MTU", zif->rtadv.AdvLinkMTU, argv[0], 1, 65535); + VTY_GET_INTEGER_RANGE ("MTU", zif->rtadv.AdvLinkMTU, argv[0]->arg, 1, 65535); return CMD_SUCCESS; } diff --git a/zebra/test_main.c b/zebra/test_main.c index bbaf45028..5bb4ee540 100644 --- a/zebra/test_main.c +++ b/zebra/test_main.c @@ -136,7 +136,7 @@ DEFUN (test_interface_state, ifp->flags = IFF_BROADCAST|IFF_MULTICAST; } - switch (argv[0][0]) + switch (argv[0]->arg[0]) { case 'u': SET_FLAG (ifp->flags, IFF_UP); diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c index e6c5a3e91..87bbbba3b 100644 --- a/zebra/zebra_routemap.c +++ b/zebra/zebra_routemap.c @@ -301,7 +301,7 @@ DEFUN (match_interface, "match first hop interface of route\n" "Interface name\n") { - return zebra_route_match_add (vty, vty->index, "interface", argv[0], + return zebra_route_match_add (vty, vty->index, "interface", argv[0]->arg, RMAP_EVENT_MATCH_ADDED); } @@ -315,7 +315,7 @@ DEFUN (no_match_interface, if (argc == 0) return zebra_route_match_delete (vty, vty->index, "interface", NULL, RMAP_EVENT_MATCH_DELETED); - return zebra_route_match_delete (vty, vty->index, "interface", argv[0], RMAP_EVENT_MATCH_DELETED); + return zebra_route_match_delete (vty, vty->index, "interface", argv[0]->arg, RMAP_EVENT_MATCH_DELETED); } ALIAS (no_match_interface, @@ -333,7 +333,7 @@ DEFUN (match_tag, "Match tag of route\n" "Tag value\n") { - return zebra_route_match_add (vty, vty->index, "tag", argv[0], + return zebra_route_match_add (vty, vty->index, "tag", argv[0]->arg, RMAP_EVENT_MATCH_ADDED); } @@ -348,7 +348,7 @@ DEFUN (no_match_tag, return zebra_route_match_delete (vty, vty->index, "tag", NULL, RMAP_EVENT_MATCH_DELETED); - return zebra_route_match_delete (vty, vty->index, "tag", argv[0], + return zebra_route_match_delete (vty, vty->index, "tag", argv[0]->arg, RMAP_EVENT_MATCH_DELETED); } @@ -369,7 +369,7 @@ DEFUN (match_ip_next_hop, "IP access-list number (expanded range)\n" "IP Access-list name\n") { - return zebra_route_match_add (vty, vty->index, "ip next-hop", argv[0], RMAP_EVENT_FILTER_ADDED); + return zebra_route_match_add (vty, vty->index, "ip next-hop", argv[0]->arg, RMAP_EVENT_FILTER_ADDED); } DEFUN (no_match_ip_next_hop, @@ -384,7 +384,7 @@ DEFUN (no_match_ip_next_hop, return zebra_route_match_delete (vty, vty->index, "ip next-hop", NULL, RMAP_EVENT_FILTER_DELETED); - return zebra_route_match_delete (vty, vty->index, "ip next-hop", argv[0], + return zebra_route_match_delete (vty, vty->index, "ip next-hop", argv[0]->arg, RMAP_EVENT_FILTER_DELETED); } @@ -409,7 +409,7 @@ DEFUN (match_ip_next_hop_prefix_list, "IP prefix-list name\n") { return zebra_route_match_add (vty, vty->index, "ip next-hop prefix-list", - argv[0], RMAP_EVENT_PLIST_ADDED); + argv[0]->arg, RMAP_EVENT_PLIST_ADDED); } DEFUN (no_match_ip_next_hop_prefix_list, @@ -427,7 +427,7 @@ DEFUN (no_match_ip_next_hop_prefix_list, RMAP_EVENT_PLIST_DELETED); return zebra_route_match_delete (vty, vty->index, - "ip next-hop prefix-list", argv[0], + "ip next-hop prefix-list", argv[0]->arg, RMAP_EVENT_PLIST_DELETED); } @@ -452,7 +452,7 @@ DEFUN (match_ip_address, "IP Access-list name\n") { - return zebra_route_match_add (vty, vty->index, "ip address", argv[0], + return zebra_route_match_add (vty, vty->index, "ip address", argv[0]->arg, RMAP_EVENT_FILTER_ADDED); } @@ -468,7 +468,7 @@ DEFUN (no_match_ip_address, return zebra_route_match_delete (vty, vty->index, "ip address", NULL, RMAP_EVENT_FILTER_DELETED); - return zebra_route_match_delete (vty, vty->index, "ip address", argv[0], + return zebra_route_match_delete (vty, vty->index, "ip address", argv[0]->arg, RMAP_EVENT_FILTER_DELETED); } @@ -493,7 +493,7 @@ DEFUN (match_ip_address_prefix_list, "IP prefix-list name\n") { return zebra_route_match_add (vty, vty->index, "ip address prefix-list", - argv[0], RMAP_EVENT_PLIST_ADDED); + argv[0]->arg, RMAP_EVENT_PLIST_ADDED); } DEFUN (no_match_ip_address_prefix_list, @@ -511,7 +511,7 @@ DEFUN (no_match_ip_address_prefix_list, RMAP_EVENT_PLIST_DELETED); return zebra_route_match_delete (vty, vty->index, - "ip address prefix-list", argv[0], + "ip address prefix-list", argv[0]->arg, RMAP_EVENT_PLIST_DELETED); } @@ -535,7 +535,7 @@ DEFUN (match_ip_address_prefix_len, "Prefix length\n") { return zebra_route_match_add (vty, vty->index, "ip address prefix-len", - argv[0], RMAP_EVENT_MATCH_ADDED); + argv[0]->arg, RMAP_EVENT_MATCH_ADDED); } DEFUN (no_match_ip_address_prefix_len, @@ -553,7 +553,7 @@ DEFUN (no_match_ip_address_prefix_len, RMAP_EVENT_MATCH_DELETED); return zebra_route_match_delete (vty, vty->index, - "ip address prefix-len", argv[0], + "ip address prefix-len", argv[0]->arg, RMAP_EVENT_MATCH_DELETED); } @@ -576,7 +576,7 @@ DEFUN (match_ip_nexthop_prefix_len, "Prefix length\n") { return zebra_route_match_add (vty, vty->index, "ip next-hop prefix-len", - argv[0], RMAP_EVENT_MATCH_ADDED); + argv[0]->arg, RMAP_EVENT_MATCH_ADDED); } DEFUN (no_match_ip_nexthop_prefix_len, @@ -594,7 +594,7 @@ DEFUN (no_match_ip_nexthop_prefix_len, RMAP_EVENT_MATCH_DELETED); return zebra_route_match_delete (vty, vty->index, - "ip next-hop prefix-len", argv[0], + "ip next-hop prefix-len", argv[0]->arg, RMAP_EVENT_MATCH_DELETED); } @@ -613,15 +613,15 @@ DEFUN (match_source_protocol, { int i; - i = proto_name2num(argv[0]); + i = proto_name2num(argv[0]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", VTY_NEWLINE); return CMD_WARNING; } return zebra_route_match_add (vty, vty->index, "source-protocol", - argv[0], RMAP_EVENT_MATCH_ADDED); + argv[0]->arg, RMAP_EVENT_MATCH_ADDED); } DEFUN (no_match_source_protocol, @@ -635,16 +635,16 @@ DEFUN (no_match_source_protocol, if (argc >= 1) { - i = proto_name2num(argv[0]); + i = proto_name2num(argv[0]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", VTY_NEWLINE); return CMD_WARNING; } } return zebra_route_match_delete (vty, vty->index, - "source-protocol", argv[0] ? argv[0] : NULL, + "source-protocol", argv[0]->arg ? argv[0]->arg : NULL, RMAP_EVENT_MATCH_DELETED); } @@ -663,9 +663,9 @@ DEFUN (set_src, struct prefix p; vrf_iter_t iter; - if (inet_pton(AF_INET, argv[0], &src.ipv4) != 1) + if (inet_pton(AF_INET, argv[0]->arg, &src.ipv4) != 1) { - if (inet_pton(AF_INET6, argv[0], &src.ipv6) != 1) + if (inet_pton(AF_INET6, argv[0]->arg, &src.ipv6) != 1) { vty_out (vty, "%% not a valid IPv4/v6 address%s", VTY_NEWLINE); return CMD_WARNING; @@ -706,7 +706,7 @@ DEFUN (set_src, vty_out (vty, "%% not a local address%s", VTY_NEWLINE); return CMD_WARNING; } - return zebra_route_set_add (vty, vty->index, "src", argv[0]); + return zebra_route_set_add (vty, vty->index, "src", argv[0]->arg); } DEFUN (no_set_src, @@ -719,7 +719,7 @@ DEFUN (no_set_src, if (argc == 0) return zebra_route_set_delete (vty, vty->index, "src", NULL); - return zebra_route_set_delete (vty, vty->index, "src", argv[0]); + return zebra_route_set_delete (vty, vty->index, "src", argv[0]->arg); } DEFUN (zebra_route_map_timer, @@ -730,7 +730,7 @@ DEFUN (zebra_route_map_timer, { u_int32_t rmap_delay_timer; - VTY_GET_INTEGER_RANGE ("delay-timer", rmap_delay_timer, argv[0], 0, 600); + VTY_GET_INTEGER_RANGE ("delay-timer", rmap_delay_timer, argv[0]->arg, 0, 600); zebra_route_map_set_delay_timer(rmap_delay_timer); return (CMD_SUCCESS); @@ -766,28 +766,28 @@ DEFUN (ip_protocol, { int i; - if (strcasecmp(argv[0], "any") == 0) + if (strcasecmp(argv[0]->arg, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]); + i = proto_name2num(argv[0]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", VTY_NEWLINE); return CMD_WARNING; } if (proto_rm[AFI_IP][i]) { - if (strcmp(proto_rm[AFI_IP][i], argv[1]) == 0) + if (strcmp(proto_rm[AFI_IP][i], argv[1]->arg) == 0) return CMD_SUCCESS; XFREE (MTYPE_ROUTE_MAP_NAME, proto_rm[AFI_IP][i]); } - proto_rm[AFI_IP][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]); + proto_rm[AFI_IP][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]->arg); if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug ("%u: IPv4 Routemap config for protocol %s, scheduling RIB processing", - VRF_DEFAULT, argv[0]); + VRF_DEFAULT, argv[0]->arg); rib_update(VRF_DEFAULT, RIB_UPDATE_RMAP_CHANGE); return CMD_SUCCESS; @@ -804,20 +804,20 @@ DEFUN (no_ip_protocol, { int i; - if (strcasecmp(argv[0], "any") == 0) + if (strcasecmp(argv[0]->arg, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]); + i = proto_name2num(argv[0]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", VTY_NEWLINE); return CMD_WARNING; } if (!proto_rm[AFI_IP][i]) return CMD_SUCCESS; - if ((argc == 2 && strcmp(argv[1], proto_rm[AFI_IP][i]) == 0) || + if ((argc == 2 && strcmp(argv[1]->arg, proto_rm[AFI_IP][i]) == 0) || (argc < 2)) { XFREE (MTYPE_ROUTE_MAP_NAME, proto_rm[AFI_IP][i]); @@ -825,7 +825,7 @@ DEFUN (no_ip_protocol, if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug ("%u: IPv4 Routemap unconfig for protocol %s, scheduling RIB processing", - VRF_DEFAULT, argv[0]); + VRF_DEFAULT, argv[0]->arg); rib_update(VRF_DEFAULT, RIB_UPDATE_RMAP_CHANGE); } return CMD_SUCCESS; @@ -879,28 +879,28 @@ DEFUN (ipv6_protocol, { int i; - if (strcasecmp(argv[0], "any") == 0) + if (strcasecmp(argv[0]->arg, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]); + i = proto_name2num(argv[0]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", VTY_NEWLINE); return CMD_WARNING; } if (proto_rm[AFI_IP6][i]) { - if (strcmp(proto_rm[AFI_IP6][i], argv[1]) == 0) + if (strcmp(proto_rm[AFI_IP6][i], argv[1]->arg) == 0) return CMD_SUCCESS; XFREE (MTYPE_ROUTE_MAP_NAME, proto_rm[AFI_IP6][i]); } - proto_rm[AFI_IP6][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]); + proto_rm[AFI_IP6][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]->arg); if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug ("%u: IPv6 Routemap config for protocol %s, scheduling RIB processing", - VRF_DEFAULT, argv[0]); + VRF_DEFAULT, argv[0]->arg); rib_update(VRF_DEFAULT, RIB_UPDATE_RMAP_CHANGE); return CMD_SUCCESS; @@ -917,20 +917,20 @@ DEFUN (no_ipv6_protocol, { int i; - if (strcasecmp(argv[0], "any") == 0) + if (strcasecmp(argv[0]->arg, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]); + i = proto_name2num(argv[0]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", VTY_NEWLINE); return CMD_WARNING; } if (!proto_rm[AFI_IP6][i]) return CMD_SUCCESS; - if ((argc == 2 && strcmp(argv[1], proto_rm[AFI_IP6][i]) == 0) || + if ((argc == 2 && strcmp(argv[1]->arg, proto_rm[AFI_IP6][i]) == 0) || (argc < 2)) { XFREE (MTYPE_ROUTE_MAP_NAME, proto_rm[AFI_IP6][i]); @@ -938,7 +938,7 @@ DEFUN (no_ipv6_protocol, if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug ("%u: IPv6 Routemap unconfig for protocol %s, scheduling RIB processing", - VRF_DEFAULT, argv[0]); + VRF_DEFAULT, argv[0]->arg); rib_update(VRF_DEFAULT, RIB_UPDATE_RMAP_CHANGE); } @@ -993,25 +993,25 @@ DEFUN (ip_protocol_nht_rmap, { int i; - if (strcasecmp(argv[0], "any") == 0) + if (strcasecmp(argv[0]->arg, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]); + i = proto_name2num(argv[0]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", VTY_NEWLINE); return CMD_WARNING; } if (nht_rm[AFI_IP][i]) { - if (strcmp(nht_rm[AFI_IP][i], argv[1]) == 0) + if (strcmp(nht_rm[AFI_IP][i], argv[1]->arg) == 0) return CMD_SUCCESS; XFREE (MTYPE_ROUTE_MAP_NAME, nht_rm[AFI_IP][i]); } - nht_rm[AFI_IP][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]); + nht_rm[AFI_IP][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]->arg); zebra_evaluate_rnh(0, AF_INET, 1, RNH_NEXTHOP_TYPE, NULL); return CMD_SUCCESS; @@ -1027,20 +1027,20 @@ DEFUN (no_ip_protocol_nht_rmap, { int i; - if (strcasecmp(argv[0], "any") == 0) + if (strcasecmp(argv[0]->arg, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]); + i = proto_name2num(argv[0]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", VTY_NEWLINE); return CMD_WARNING; } if (!nht_rm[AFI_IP][i]) return CMD_SUCCESS; - if ((argc == 2 && strcmp(argv[1], nht_rm[AFI_IP][i]) == 0) || + if ((argc == 2 && strcmp(argv[1]->arg, nht_rm[AFI_IP][i]) == 0) || (argc < 2)) { XFREE (MTYPE_ROUTE_MAP_NAME, nht_rm[AFI_IP][i]); @@ -1097,19 +1097,19 @@ DEFUN (ipv6_protocol_nht_rmap, { int i; - if (strcasecmp(argv[0], "any") == 0) + if (strcasecmp(argv[0]->arg, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]); + i = proto_name2num(argv[0]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", VTY_NEWLINE); return CMD_WARNING; } if (nht_rm[AFI_IP6][i]) XFREE (MTYPE_ROUTE_MAP_NAME, nht_rm[AFI_IP6][i]); - nht_rm[AFI_IP6][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]); + nht_rm[AFI_IP6][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]->arg); zebra_evaluate_rnh(0, AF_INET6, 1, RNH_NEXTHOP_TYPE, NULL); return CMD_SUCCESS; @@ -1125,20 +1125,20 @@ DEFUN (no_ipv6_protocol_nht_rmap, { int i; - if (strcasecmp(argv[0], "any") == 0) + if (strcasecmp(argv[0]->arg, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]); + i = proto_name2num(argv[0]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", VTY_NEWLINE); return CMD_WARNING; } - if (nht_rm[AFI_IP6][i] && argc == 2 && strcmp(argv[1], nht_rm[AFI_IP6][i])) + if (nht_rm[AFI_IP6][i] && argc == 2 && strcmp(argv[1]->arg, nht_rm[AFI_IP6][i])) { - vty_out (vty, "invalid route-map \"%s\"%s", argv[1], VTY_NEWLINE); + vty_out (vty, "invalid route-map \"%s\"%s", argv[1]->arg, VTY_NEWLINE); return CMD_WARNING; } diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index a7ee63d87..8878d8ffe 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -191,7 +191,7 @@ DEFUN (ip_mroute_dist, "Nexthop interface name\n" "Distance\n") { - return zebra_static_ipv4 (vty, SAFI_MULTICAST, 1, argv[0], NULL, argv[1], NULL, NULL, argc > 2 ? argv[2] : NULL, NULL); + return zebra_static_ipv4 (vty, SAFI_MULTICAST, 1, argv[0]->arg, NULL, argv[1]->arg, NULL, NULL, argc > 2 ? argv[2]->arg : NULL, NULL); } ALIAS (ip_mroute_dist, @@ -213,7 +213,7 @@ DEFUN (no_ip_mroute_dist, "Nexthop interface name\n" "Distance\n") { - return zebra_static_ipv4 (vty, SAFI_MULTICAST, 0, argv[0], NULL, argv[1], NULL, NULL, argc > 2 ? argv[2] : NULL, NULL); + return zebra_static_ipv4 (vty, SAFI_MULTICAST, 0, argv[0]->arg, NULL, argv[1]->arg, NULL, NULL, argc > 2 ? argv[2]->arg : NULL, NULL); } ALIAS (no_ip_mroute_dist, @@ -239,15 +239,15 @@ DEFUN (ip_multicast_mode, "Lookup both, use entry with longer prefix\n") { - if (!strncmp (argv[0], "u", 1)) + if (!strncmp (argv[0]->arg, "u", 1)) multicast_mode_ipv4_set (MCAST_URIB_ONLY); - else if (!strncmp (argv[0], "mrib-o", 6)) + else if (!strncmp (argv[0]->arg, "mrib-o", 6)) multicast_mode_ipv4_set (MCAST_MRIB_ONLY); - else if (!strncmp (argv[0], "mrib-t", 6)) + else if (!strncmp (argv[0]->arg, "mrib-t", 6)) multicast_mode_ipv4_set (MCAST_MIX_MRIB_FIRST); - else if (!strncmp (argv[0], "low", 3)) + else if (!strncmp (argv[0]->arg, "low", 3)) multicast_mode_ipv4_set (MCAST_MIX_DISTANCE); - else if (!strncmp (argv[0], "lon", 3)) + else if (!strncmp (argv[0]->arg, "lon", 3)) multicast_mode_ipv4_set (MCAST_MIX_PFXLEN); else { @@ -306,7 +306,7 @@ DEFUN (show_ip_rpf_addr, struct rib *rib; int ret; - ret = inet_aton (argv[0], &addr); + ret = inet_aton (argv[0]->arg, &addr); if (ret == 0) { vty_out (vty, "%% Malformed address%s", VTY_NEWLINE); @@ -334,7 +334,7 @@ DEFUN (ip_route, "IP gateway interface name\n" "Null interface\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, NULL, NULL, NULL, NULL); } @@ -350,7 +350,7 @@ DEFUN (ip_route_tag, "Set tag for this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, argv[2], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, NULL, argv[2]->arg, NULL, NULL); } @@ -365,7 +365,7 @@ DEFUN (ip_route_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, argv[2]->arg, NULL, NULL, NULL); } @@ -383,7 +383,7 @@ DEFUN (ip_route_flags_tag, "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], argv[3], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, NULL); } @@ -396,7 +396,7 @@ DEFUN (ip_route_flags2, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, NULL, argv[1]->arg, NULL, NULL, NULL); } @@ -412,7 +412,7 @@ DEFUN (ip_route_flags2_tag, "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], argv[2], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, NULL, argv[1]->arg, argv[2]->arg, NULL, NULL); } @@ -428,7 +428,7 @@ DEFUN (ip_route_mask, "IP gateway interface name\n" "Null interface\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, NULL, NULL); } @@ -446,7 +446,7 @@ DEFUN (ip_route_mask_tag, "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, argv[3], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL); } @@ -462,7 +462,7 @@ DEFUN (ip_route_mask_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, NULL, NULL); } @@ -481,7 +481,7 @@ DEFUN (ip_route_mask_flags_tag, "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], argv[4], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL); } @@ -495,7 +495,7 @@ DEFUN (ip_route_mask_flags2, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, NULL, NULL); } @@ -511,7 +511,7 @@ DEFUN (ip_route_mask_flags2_tag, "Set tag for this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], argv[3], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, NULL, NULL); } @@ -527,8 +527,8 @@ DEFUN (ip_route_distance, "Null interface\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, NULL, - argv[2], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, NULL, NULL, + argv[2]->arg, NULL); } DEFUN (ip_route_tag_distance, @@ -545,8 +545,8 @@ DEFUN (ip_route_tag_distance, "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, argv[2], - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, NULL, argv[2]->arg, + argv[3]->arg, NULL); } DEFUN (ip_route_flags_distance, @@ -561,8 +561,8 @@ DEFUN (ip_route_flags_distance, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], NULL, - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, argv[2]->arg, NULL, + argv[3]->arg, NULL); } DEFUN (ip_route_flags_tag_distance, @@ -579,8 +579,8 @@ DEFUN (ip_route_flags_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], argv[3], - argv[4], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, argv[2]->arg, argv[3]->arg, + argv[4]->arg, NULL); } DEFUN (ip_route_flags_distance2, @@ -593,8 +593,8 @@ DEFUN (ip_route_flags_distance2, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], NULL, - argv[2], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, NULL, argv[1]->arg, NULL, + argv[2]->arg, NULL); } DEFUN (ip_route_flags_tag_distance2, @@ -609,8 +609,8 @@ DEFUN (ip_route_flags_tag_distance2, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], argv[2], - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, NULL, argv[1]->arg, argv[2]->arg, + argv[3]->arg, NULL); } DEFUN (ip_route_mask_distance, @@ -625,8 +625,8 @@ DEFUN (ip_route_mask_distance, "Null interface\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, NULL, - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, + argv[3]->arg, NULL); } DEFUN (ip_route_mask_tag_distance, @@ -643,8 +643,8 @@ DEFUN (ip_route_mask_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, argv[3], - argv[4], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, + argv[4]->arg, NULL); } DEFUN (ip_route_mask_flags_tag_distance, @@ -662,8 +662,8 @@ DEFUN (ip_route_mask_flags_tag_distance, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], argv[4], - argv[5], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, + argv[5]->arg, NULL); } @@ -680,8 +680,8 @@ DEFUN (ip_route_mask_flags_distance, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], NULL, - argv[4], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, + argv[4]->arg, NULL); } DEFUN (ip_route_mask_flags_distance2, @@ -695,8 +695,8 @@ DEFUN (ip_route_mask_flags_distance2, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], NULL, - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, + argv[3]->arg, NULL); } DEFUN (ip_route_mask_flags_tag_distance2, @@ -712,8 +712,8 @@ DEFUN (ip_route_mask_flags_tag_distance2, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], argv[3], - argv[4], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, + argv[4]->arg, NULL); } DEFUN (no_ip_route, @@ -727,7 +727,7 @@ DEFUN (no_ip_route, "IP gateway interface name\n" "Null interface\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, argv[1]->arg, NULL, NULL, NULL, NULL); } @@ -744,7 +744,7 @@ DEFUN (no_ip_route_tag, "Tag of this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, argv[2], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, argv[1]->arg, NULL, argv[2]->arg, NULL, NULL); } @@ -784,7 +784,7 @@ DEFUN (no_ip_route_flags2, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, NULL, NULL, NULL, NULL, NULL); } @@ -800,7 +800,7 @@ DEFUN (no_ip_route_flags2_tag, "Tag of this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, NULL, argv[1], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, NULL, NULL, argv[1]->arg, NULL, NULL); } @@ -816,7 +816,7 @@ DEFUN (no_ip_route_mask, "IP gateway interface name\n" "Null interface\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, NULL, NULL); } @@ -834,7 +834,7 @@ DEFUN (no_ip_route_mask_tag, "Tag of this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, argv[3], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL); } @@ -877,7 +877,7 @@ DEFUN (no_ip_route_mask_flags2, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, NULL, NULL, NULL, NULL, NULL); } @@ -894,7 +894,7 @@ DEFUN (no_ip_route_mask_flags2_tag, "Tag of this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, NULL, argv[2], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, NULL, NULL, argv[2]->arg, NULL, NULL); } @@ -910,8 +910,8 @@ DEFUN (no_ip_route_distance, "Null interface\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, NULL, - argv[2], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, argv[1]->arg, NULL, NULL, + argv[2]->arg, NULL); } DEFUN (no_ip_route_tag_distance, @@ -928,8 +928,8 @@ DEFUN (no_ip_route_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, argv[2], - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, argv[1]->arg, NULL, argv[2]->arg, + argv[3]->arg, NULL); } DEFUN (no_ip_route_flags_distance, @@ -945,8 +945,8 @@ DEFUN (no_ip_route_flags_distance, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], NULL, - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, argv[1]->arg, argv[2]->arg, NULL, + argv[3]->arg, NULL); } DEFUN (no_ip_route_flags_tag_distance, @@ -964,8 +964,8 @@ DEFUN (no_ip_route_flags_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], argv[3], - argv[4], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, argv[1]->arg, argv[2]->arg, argv[3]->arg, + argv[4]->arg, NULL); } DEFUN (no_ip_route_flags_distance2, @@ -979,8 +979,8 @@ DEFUN (no_ip_route_flags_distance2, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], NULL, - argv[2], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, NULL, argv[1]->arg, NULL, + argv[2]->arg, NULL); } DEFUN (no_ip_route_flags_tag_distance2, @@ -996,8 +996,8 @@ DEFUN (no_ip_route_flags_tag_distance2, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], argv[2], - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, NULL, argv[1]->arg, argv[2]->arg, + argv[3]->arg, NULL); } DEFUN (no_ip_route_mask_distance, @@ -1013,8 +1013,8 @@ DEFUN (no_ip_route_mask_distance, "Null interface\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, NULL, - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, + argv[3]->arg, NULL); } DEFUN (no_ip_route_mask_tag_distance, @@ -1032,8 +1032,8 @@ DEFUN (no_ip_route_mask_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, argv[3], - argv[4], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, + argv[4]->arg, NULL); } DEFUN (no_ip_route_mask_flags_distance, @@ -1050,8 +1050,8 @@ DEFUN (no_ip_route_mask_flags_distance, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], NULL, - argv[4], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, + argv[4]->arg, NULL); } DEFUN (no_ip_route_mask_flags_tag_distance, @@ -1070,8 +1070,8 @@ DEFUN (no_ip_route_mask_flags_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], argv[4], - argv[5], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, + argv[5]->arg, NULL); } DEFUN (no_ip_route_mask_flags_distance2, @@ -1086,8 +1086,8 @@ DEFUN (no_ip_route_mask_flags_distance2, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], NULL, - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, + argv[3]->arg, NULL); } DEFUN (no_ip_route_mask_flags_tag_distance2, @@ -1104,8 +1104,8 @@ DEFUN (no_ip_route_mask_flags_tag_distance2, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], argv[3], - argv[4], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, + argv[4]->arg, NULL); } /* Static route configuration. */ @@ -1120,7 +1120,7 @@ DEFUN (ip_route_vrf, "Null interface\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, NULL, NULL, argv[2]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, NULL, NULL, NULL, argv[2]->arg); } DEFUN (ip_route_tag_vrf, @@ -1136,7 +1136,7 @@ DEFUN (ip_route_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, argv[2], NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, NULL, argv[2]->arg, NULL, argv[3]->arg); } DEFUN (ip_route_flags_vrf, @@ -1151,7 +1151,7 @@ DEFUN (ip_route_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], NULL, NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, argv[2]->arg, NULL, NULL, argv[3]->arg); } DEFUN (ip_route_flags_tag_vrf, @@ -1169,7 +1169,7 @@ DEFUN (ip_route_flags_tag_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], argv[3], NULL, argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg); } DEFUN (ip_route_flags2_vrf, @@ -1182,7 +1182,7 @@ DEFUN (ip_route_flags2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], NULL, NULL, argv[2]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, NULL, argv[1]->arg, NULL, NULL, argv[2]->arg); } DEFUN (ip_route_flags2_tag_vrf, @@ -1198,7 +1198,7 @@ DEFUN (ip_route_flags2_tag_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], argv[2], NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, NULL, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg); } /* Mask as A.B.C.D format. */ @@ -1214,7 +1214,7 @@ DEFUN (ip_route_mask_vrf, "Null interface\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, NULL, NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, NULL, argv[3]->arg); } DEFUN (ip_route_mask_tag_vrf, @@ -1232,7 +1232,7 @@ DEFUN (ip_route_mask_tag_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, argv[3], NULL, argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[4]->arg); } DEFUN (ip_route_mask_flags_vrf, @@ -1248,7 +1248,7 @@ DEFUN (ip_route_mask_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], NULL, NULL, argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[4]->arg); } DEFUN (ip_route_mask_flags_tag_vrf, @@ -1267,7 +1267,7 @@ DEFUN (ip_route_mask_flags_tag_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg); } DEFUN (ip_route_mask_flags2_vrf, @@ -1281,7 +1281,7 @@ DEFUN (ip_route_mask_flags2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], NULL, NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, NULL, argv[3]->arg); } DEFUN (ip_route_mask_flags2_tag_vrf, @@ -1297,7 +1297,7 @@ DEFUN (ip_route_mask_flags2_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], argv[3], NULL, argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg); } /* Distance option value. */ @@ -1313,7 +1313,7 @@ DEFUN (ip_route_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, NULL, argv[2], argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, NULL, NULL, argv[2]->arg, argv[3]->arg); } DEFUN (ip_route_tag_distance_vrf, @@ -1331,7 +1331,7 @@ DEFUN (ip_route_tag_distance_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, argv[2], argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg); } DEFUN (ip_route_flags_distance_vrf, @@ -1347,7 +1347,7 @@ DEFUN (ip_route_flags_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], NULL, argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg); } DEFUN (ip_route_flags_tag_distance_vrf, @@ -1365,7 +1365,7 @@ DEFUN (ip_route_flags_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], argv[3], argv[4],argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg,argv[5]->arg); } DEFUN (ip_route_flags_distance2_vrf, @@ -1379,7 +1379,7 @@ DEFUN (ip_route_flags_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], NULL, argv[2], argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, NULL, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg); } DEFUN (ip_route_flags_tag_distance2_vrf, @@ -1395,7 +1395,7 @@ DEFUN (ip_route_flags_tag_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], argv[2], argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, NULL, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg); } DEFUN (ip_route_mask_distance_vrf, @@ -1411,7 +1411,7 @@ DEFUN (ip_route_mask_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, NULL, argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[4]->arg); } DEFUN (ip_route_mask_tag_distance_vrf, @@ -1429,7 +1429,7 @@ DEFUN (ip_route_mask_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[5]->arg); } DEFUN (ip_route_mask_flags_tag_distance_vrf, @@ -1448,7 +1448,7 @@ DEFUN (ip_route_mask_flags_tag_distance_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg); } @@ -1466,7 +1466,7 @@ DEFUN (ip_route_mask_flags_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg); } DEFUN (ip_route_mask_flags_distance2_vrf, @@ -1481,7 +1481,7 @@ DEFUN (ip_route_mask_flags_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], NULL, argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg); } DEFUN (ip_route_mask_flags_tag_distance2_vrf, @@ -1498,7 +1498,7 @@ DEFUN (ip_route_mask_flags_tag_distance2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg); } DEFUN (no_ip_route_vrf, @@ -1513,7 +1513,7 @@ DEFUN (no_ip_route_vrf, "Null interface\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, NULL, NULL, argv[2]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, argv[1]->arg, NULL, NULL, NULL, argv[2]->arg); } DEFUN (no_ip_route_flags_vrf, @@ -1529,7 +1529,7 @@ DEFUN (no_ip_route_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], NULL, NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, argv[1]->arg, argv[2]->arg, NULL, NULL, argv[3]->arg); } DEFUN (no_ip_route_tag_vrf, @@ -1546,7 +1546,7 @@ DEFUN (no_ip_route_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, argv[2], NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, argv[1]->arg, NULL, argv[2]->arg, NULL, argv[3]->arg); } DEFUN (no_ip_route_flags_tag_vrf, @@ -1564,7 +1564,7 @@ DEFUN (no_ip_route_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], argv[3], NULL, argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg); } DEFUN (no_ip_route_flags2_vrf, @@ -1578,7 +1578,7 @@ DEFUN (no_ip_route_flags2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], NULL, NULL, argv[2]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, NULL, argv[1]->arg, NULL, NULL, argv[2]->arg); } DEFUN (no_ip_route_flags2_tag_vrf, @@ -1594,7 +1594,7 @@ DEFUN (no_ip_route_flags2_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], argv[2], NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, NULL, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg); } DEFUN (no_ip_route_mask_vrf, @@ -1610,7 +1610,7 @@ DEFUN (no_ip_route_mask_vrf, "Null interface\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, NULL, NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, NULL, argv[3]->arg); } DEFUN (no_ip_route_mask_flags_vrf, @@ -1627,7 +1627,7 @@ DEFUN (no_ip_route_mask_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], NULL, NULL, argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[4]->arg); } DEFUN (no_ip_route_mask_tag_vrf, @@ -1645,7 +1645,7 @@ DEFUN (no_ip_route_mask_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, argv[3], NULL, argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[4]->arg); } DEFUN (no_ip_route_mask_flags_tag_vrf, @@ -1664,7 +1664,7 @@ DEFUN (no_ip_route_mask_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg); } DEFUN (no_ip_route_mask_flags2_vrf, @@ -1679,7 +1679,7 @@ DEFUN (no_ip_route_mask_flags2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], NULL, NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, NULL, argv[3]->arg); } DEFUN (no_ip_route_mask_flags2_tag_vrf, @@ -1696,7 +1696,7 @@ DEFUN (no_ip_route_mask_flags2_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], argv[3], NULL, argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg); } @@ -1713,7 +1713,7 @@ DEFUN (no_ip_route_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, NULL, argv[2], argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, argv[1]->arg, NULL, NULL, argv[2]->arg, argv[3]->arg); } DEFUN (no_ip_route_tag_distance_vrf, @@ -1731,7 +1731,7 @@ DEFUN (no_ip_route_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, argv[2], argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg); } DEFUN (no_ip_route_flags_distance_vrf, @@ -1748,7 +1748,7 @@ DEFUN (no_ip_route_flags_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], NULL, argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg); } DEFUN (no_ip_route_flags_tag_distance_vrf, @@ -1767,7 +1767,7 @@ DEFUN (no_ip_route_flags_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], argv[3], argv[4],argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg,argv[5]->arg); } DEFUN (no_ip_route_flags_distance2_vrf, @@ -1782,7 +1782,7 @@ DEFUN (no_ip_route_flags_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], NULL, argv[2], argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, NULL, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg); } DEFUN (no_ip_route_flags_tag_distance2_vrf, @@ -1799,7 +1799,7 @@ DEFUN (no_ip_route_flags_tag_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], argv[2] , argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, NULL, argv[1]->arg, argv[2]->arg , argv[3]->arg, argv[4]->arg); } DEFUN (no_ip_route_mask_distance_vrf, @@ -1816,7 +1816,7 @@ DEFUN (no_ip_route_mask_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, NULL, argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[4]->arg); } DEFUN (no_ip_route_mask_tag_distance_vrf, @@ -1835,7 +1835,7 @@ DEFUN (no_ip_route_mask_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[5]->arg); } DEFUN (no_ip_route_mask_flags_distance_vrf, @@ -1853,7 +1853,7 @@ DEFUN (no_ip_route_mask_flags_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg); } DEFUN (no_ip_route_mask_flags_tag_distance_vrf, @@ -1873,7 +1873,7 @@ DEFUN (no_ip_route_mask_flags_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg); } DEFUN (no_ip_route_mask_flags_distance2_vrf, @@ -1889,7 +1889,7 @@ DEFUN (no_ip_route_mask_flags_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], NULL, argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg); } DEFUN (no_ip_route_mask_flags_tag_distance2_vrf, @@ -1907,7 +1907,7 @@ DEFUN (no_ip_route_mask_flags_tag_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg); } /* New RIB. Detailed information for IPv4 route. */ @@ -2433,7 +2433,7 @@ DEFUN (show_ip_route_vrf, if (argc == 1 && uj) return do_show_ip_route (vty, NULL, SAFI_UNICAST, uj); else - return do_show_ip_route (vty, argv[0], SAFI_UNICAST, uj); + return do_show_ip_route (vty, argv[0]->arg, SAFI_UNICAST, uj); } DEFUN (show_ip_nht, @@ -2446,7 +2446,7 @@ DEFUN (show_ip_nht, vrf_id_t vrf_id = VRF_DEFAULT; if (argc) - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[0]->arg); zebra_print_rnh_table(vrf_id, AF_INET, vty, RNH_NEXTHOP_TYPE); return CMD_SUCCESS; @@ -2491,7 +2491,7 @@ DEFUN (show_ipv6_nht, vrf_id_t vrf_id = VRF_DEFAULT; if (argc) - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[0]->arg); zebra_print_rnh_table(vrf_id, AF_INET6, vty, RNH_NEXTHOP_TYPE); return CMD_SUCCESS; @@ -2606,11 +2606,11 @@ DEFUN (show_ip_route_tag, if (argc > 1) { - tag = atoi(argv[1]); - VRF_GET_ID (vrf_id, argv[0]); + tag = atoi(argv[1]->arg); + VRF_GET_ID (vrf_id, argv[0]->arg); } else - tag = atoi(argv[0]); + tag = atoi(argv[0]->arg); table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); if (! table) @@ -2662,11 +2662,11 @@ DEFUN (show_ip_route_prefix_longer, if (argc > 1) { - ret = str2prefix (argv[1], &p); - VRF_GET_ID (vrf_id, argv[0]); + ret = str2prefix (argv[1]->arg, &p); + VRF_GET_ID (vrf_id, argv[0]->arg); } else - ret = str2prefix (argv[0], &p); + ret = str2prefix (argv[0]->arg, &p); if (! ret) { @@ -2719,7 +2719,7 @@ DEFUN (show_ip_route_supernets, vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[0]->arg); table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); if (! table) @@ -2772,11 +2772,11 @@ DEFUN (show_ip_route_protocol, if (argc > 1) { - type = proto_redistnum (AFI_IP, argv[1]); - VRF_GET_ID (vrf_id, argv[0]); + type = proto_redistnum (AFI_IP, argv[1]->arg); + VRF_GET_ID (vrf_id, argv[0]->arg); } else - type = proto_redistnum (AFI_IP, argv[0]); + type = proto_redistnum (AFI_IP, argv[0]->arg); if (type < 0) { @@ -2827,7 +2827,7 @@ DEFUN (show_ip_route_ospf_instance, int first = 1; u_short instance = 0; - VTY_GET_INTEGER ("Instance", instance, argv[0]); + VTY_GET_INTEGER ("Instance", instance, argv[0]->arg); table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, VRF_DEFAULT); if (! table) @@ -2864,11 +2864,11 @@ DEFUN (show_ip_route_addr, if (argc > 1) { - VRF_GET_ID (vrf_id, argv[0]); - ret = str2prefix_ipv4 (argv[1], &p); + VRF_GET_ID (vrf_id, argv[0]->arg); + ret = str2prefix_ipv4 (argv[1]->arg, &p); } else - ret = str2prefix_ipv4 (argv[0], &p); + ret = str2prefix_ipv4 (argv[0]->arg, &p); if (ret <= 0) { @@ -2919,11 +2919,11 @@ DEFUN (show_ip_route_prefix, if (argc > 1) { - VRF_GET_ID (vrf_id, argv[0]); - ret = str2prefix_ipv4 (argv[1], &p); + VRF_GET_ID (vrf_id, argv[0]->arg); + ret = str2prefix_ipv4 (argv[1]->arg, &p); } else - ret = str2prefix_ipv4 (argv[0], &p); + ret = str2prefix_ipv4 (argv[0]->arg, &p); if (ret <= 0) { @@ -3120,7 +3120,7 @@ DEFUN (show_ip_route_summary, vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[0]->arg); table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); if (! table) @@ -3154,7 +3154,7 @@ DEFUN (show_ip_route_summary_prefix, vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[0]->arg); table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); if (! table) @@ -3239,8 +3239,8 @@ DEFUN (show_ip_route_vrf_all_tag, int vrf_header = 1; u_short tag = 0; - if (argv[0]) - tag = atoi(argv[0]); + if (argv[0]->arg) + tag = atoi(argv[0]->arg); for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter)) { @@ -3293,7 +3293,7 @@ DEFUN (show_ip_route_vrf_all_prefix_longer, int first = 1; int vrf_header = 1; - ret = str2prefix (argv[0], &p); + ret = str2prefix (argv[0]->arg, &p); if (! ret) { vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE); @@ -3402,7 +3402,7 @@ DEFUN (show_ip_route_vrf_all_protocol, int first = 1; int vrf_header = 1; - type = proto_redistnum (AFI_IP, argv[0]); + type = proto_redistnum (AFI_IP, argv[0]->arg); if (type < 0) { vty_out (vty, "Unknown route type%s", VTY_NEWLINE); @@ -3455,7 +3455,7 @@ DEFUN (show_ip_route_vrf_all_addr, struct zebra_vrf *zvrf; vrf_iter_t iter; - ret = str2prefix_ipv4 (argv[0], &p); + ret = str2prefix_ipv4 (argv[0]->arg, &p); if (ret <= 0) { vty_out (vty, "%% Malformed IPv4 address%s", VTY_NEWLINE); @@ -3496,7 +3496,7 @@ DEFUN (show_ip_route_vrf_all_prefix, struct zebra_vrf *zvrf; vrf_iter_t iter; - ret = str2prefix_ipv4 (argv[0], &p); + ret = str2prefix_ipv4 (argv[0]->arg, &p); if (ret <= 0) { vty_out (vty, "%% Malformed IPv4 address%s", VTY_NEWLINE); @@ -3755,7 +3755,7 @@ DEFUN (ipv6_route, "IPv6 gateway address\n" "IPv6 gateway interface name\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, NULL, NULL, NULL); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, NULL, NULL, NULL, NULL); } DEFUN (ipv6_route_tag, @@ -3769,7 +3769,7 @@ DEFUN (ipv6_route_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, argv[2], NULL, NULL); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, NULL, argv[2]->arg, NULL, NULL); } DEFUN (ipv6_route_flags, @@ -3783,7 +3783,7 @@ DEFUN (ipv6_route_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], NULL, NULL, NULL); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, NULL, NULL); } DEFUN (ipv6_route_flags_tag, @@ -3799,7 +3799,7 @@ DEFUN (ipv6_route_flags_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], argv[3], NULL, NULL); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, NULL, NULL); } DEFUN (ipv6_route_ifname, @@ -3811,7 +3811,7 @@ DEFUN (ipv6_route_ifname, "IPv6 gateway address\n" "IPv6 gateway interface name\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, NULL, NULL, NULL); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, NULL, NULL); } DEFUN (ipv6_route_ifname_tag, ipv6_route_ifname_tag_cmd, @@ -3824,7 +3824,7 @@ DEFUN (ipv6_route_ifname_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, argv[3], NULL, NULL); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL); } DEFUN (ipv6_route_ifname_flags, @@ -3838,7 +3838,7 @@ DEFUN (ipv6_route_ifname_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], NULL, NULL, NULL); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, NULL, NULL); } DEFUN (ipv6_route_ifname_flags_tag, @@ -3854,7 +3854,7 @@ DEFUN (ipv6_route_ifname_flags_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, NULL); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL); } DEFUN (ipv6_route_pref, @@ -3867,7 +3867,7 @@ DEFUN (ipv6_route_pref, "IPv6 gateway interface name\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, NULL, argv[2], NULL); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, NULL, NULL, argv[2]->arg, NULL); } DEFUN (ipv6_route_pref_tag, @@ -3882,7 +3882,7 @@ DEFUN (ipv6_route_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, argv[2], argv[3], NULL); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, NULL, argv[2]->arg, argv[3]->arg, NULL); } DEFUN (ipv6_route_flags_pref, @@ -3897,7 +3897,7 @@ DEFUN (ipv6_route_flags_pref, "Silently discard pkts when matched\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], NULL, argv[3], NULL); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, argv[3]->arg, NULL); } DEFUN (ipv6_route_flags_pref_tag, @@ -3914,7 +3914,7 @@ DEFUN (ipv6_route_flags_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], NULL); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL); } DEFUN (ipv6_route_ifname_pref, @@ -3927,7 +3927,7 @@ DEFUN (ipv6_route_ifname_pref, "IPv6 gateway interface name\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, NULL, argv[3], NULL); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, argv[3]->arg, NULL); } DEFUN (ipv6_route_ifname_pref_tag, @@ -3942,7 +3942,7 @@ DEFUN (ipv6_route_ifname_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], NULL); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL); } DEFUN (ipv6_route_ifname_flags_pref, @@ -3957,7 +3957,7 @@ DEFUN (ipv6_route_ifname_flags_pref, "Silently discard pkts when matched\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], NULL); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL); } DEFUN (ipv6_route_ifname_flags_pref_tag, @@ -3974,7 +3974,7 @@ DEFUN (ipv6_route_ifname_flags_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], NULL); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL); } DEFUN (no_ipv6_route, @@ -3987,7 +3987,7 @@ DEFUN (no_ipv6_route, "IPv6 gateway address\n" "IPv6 gateway interface name\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, NULL, NULL, NULL); + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, NULL, NULL, NULL, NULL); } DEFUN (no_ipv6_route_tag, @@ -4002,7 +4002,7 @@ DEFUN (no_ipv6_route_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, argv[2], NULL, NULL); + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, NULL, argv[2]->arg, NULL, NULL); } DEFUN (no_ipv6_route_flags, @@ -4017,7 +4017,7 @@ DEFUN (no_ipv6_route_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], NULL, NULL, NULL); + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, NULL, NULL); } DEFUN (no_ipv6_route_flags_tag, @@ -4034,7 +4034,7 @@ DEFUN (no_ipv6_route_flags_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], argv[3], NULL, NULL); + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, NULL, NULL); } DEFUN (no_ipv6_route_ifname, @@ -4047,7 +4047,7 @@ DEFUN (no_ipv6_route_ifname, "IPv6 gateway address\n" "IPv6 gateway interface name\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, NULL, NULL, NULL); + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, NULL, NULL); } DEFUN (no_ipv6_route_ifname_tag, @@ -4062,7 +4062,7 @@ DEFUN (no_ipv6_route_ifname_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, argv[3], NULL, NULL); + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL); } DEFUN (no_ipv6_route_ifname_flags, @@ -4077,7 +4077,7 @@ DEFUN (no_ipv6_route_ifname_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], NULL, NULL, NULL); + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, NULL, NULL); } DEFUN (no_ipv6_route_ifname_flags_tag, @@ -4094,7 +4094,7 @@ DEFUN (no_ipv6_route_ifname_flags_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, NULL); + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL); } DEFUN (no_ipv6_route_pref, @@ -4108,7 +4108,7 @@ DEFUN (no_ipv6_route_pref, "IPv6 gateway interface name\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, NULL, argv[2], NULL); + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, NULL, NULL, argv[2]->arg, NULL); } DEFUN (no_ipv6_route_pref_tag, @@ -4124,7 +4124,7 @@ DEFUN (no_ipv6_route_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, argv[2], argv[3], NULL); + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, NULL, argv[2]->arg, argv[3]->arg, NULL); } DEFUN (no_ipv6_route_flags_pref, @@ -4140,8 +4140,8 @@ DEFUN (no_ipv6_route_flags_pref, "Silently discard pkts when matched\n" "Distance value for this prefix\n") { - /* We do not care about argv[2] */ - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], NULL, argv[3], NULL); + /* We do not care about argv[2]->arg */ + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, argv[3]->arg, NULL); } DEFUN (no_ipv6_route_flags_pref_tag, @@ -4159,8 +4159,8 @@ DEFUN (no_ipv6_route_flags_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - /* We do not care about argv[2] */ - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], NULL); + /* We do not care about argv[2]->arg */ + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL); } DEFUN (no_ipv6_route_ifname_pref, @@ -4174,7 +4174,7 @@ DEFUN (no_ipv6_route_ifname_pref, "IPv6 gateway interface name\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, NULL, argv[3], NULL); + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, argv[3]->arg, NULL); } DEFUN (no_ipv6_route_ifname_pref_tag, @@ -4190,7 +4190,7 @@ DEFUN (no_ipv6_route_ifname_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], NULL); + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL); } DEFUN (no_ipv6_route_ifname_flags_pref, @@ -4206,7 +4206,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref, "Silently discard pkts when matched\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], NULL); + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL); } DEFUN (no_ipv6_route_ifname_flags_pref_tag, @@ -4224,7 +4224,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], NULL); + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL); } DEFUN (ipv6_route_vrf, @@ -4237,7 +4237,7 @@ DEFUN (ipv6_route_vrf, "IPv6 gateway interface name\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, NULL, NULL, argv[2]); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, NULL, NULL, NULL, argv[2]->arg); } DEFUN (ipv6_route_tag_vrf, @@ -4252,7 +4252,7 @@ DEFUN (ipv6_route_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, argv[2], NULL, argv[3]); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, NULL, argv[2]->arg, NULL, argv[3]->arg); } DEFUN (ipv6_route_flags_vrf, @@ -4267,7 +4267,7 @@ DEFUN (ipv6_route_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], NULL, NULL, argv[3]); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, NULL, argv[3]->arg); } DEFUN (ipv6_route_flags_tag_vrf, @@ -4284,7 +4284,7 @@ DEFUN (ipv6_route_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], argv[3], NULL, argv[4]); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg); } DEFUN (ipv6_route_ifname_vrf, @@ -4297,7 +4297,7 @@ DEFUN (ipv6_route_ifname_vrf, "IPv6 gateway interface name\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, NULL, NULL, argv[3]); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, NULL, argv[3]->arg); } DEFUN (ipv6_route_ifname_tag_vrf, ipv6_route_ifname_tag_vrf_cmd, @@ -4311,7 +4311,7 @@ DEFUN (ipv6_route_ifname_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, argv[3], NULL, argv[4]); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[4]->arg); } DEFUN (ipv6_route_ifname_flags_vrf, @@ -4326,7 +4326,7 @@ DEFUN (ipv6_route_ifname_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], NULL, NULL, argv[4]); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[4]->arg); } DEFUN (ipv6_route_ifname_flags_tag_vrf, @@ -4343,7 +4343,7 @@ DEFUN (ipv6_route_ifname_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, argv[5]); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg); } DEFUN (ipv6_route_pref_vrf, @@ -4357,7 +4357,7 @@ DEFUN (ipv6_route_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, NULL, argv[2], argv[3]); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, NULL, NULL, argv[2]->arg, argv[3]->arg); } DEFUN (ipv6_route_pref_tag_vrf, @@ -4373,7 +4373,7 @@ DEFUN (ipv6_route_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, argv[2], argv[3], argv[4]); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg); } DEFUN (ipv6_route_flags_pref_vrf, @@ -4389,7 +4389,7 @@ DEFUN (ipv6_route_flags_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], NULL, argv[3], argv[4]); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg); } DEFUN (ipv6_route_flags_pref_tag_vrf, @@ -4407,7 +4407,7 @@ DEFUN (ipv6_route_flags_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], argv[5]); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg); } DEFUN (ipv6_route_ifname_pref_vrf, @@ -4421,7 +4421,7 @@ DEFUN (ipv6_route_ifname_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, NULL, argv[3], argv[4]); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[4]->arg); } DEFUN (ipv6_route_ifname_pref_tag_vrf, @@ -4437,7 +4437,7 @@ DEFUN (ipv6_route_ifname_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], argv[5]); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[5]->arg); } DEFUN (ipv6_route_ifname_flags_pref_vrf, @@ -4453,7 +4453,7 @@ DEFUN (ipv6_route_ifname_flags_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], argv[5]); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg); } DEFUN (ipv6_route_ifname_flags_pref_tag_vrf, @@ -4471,7 +4471,7 @@ DEFUN (ipv6_route_ifname_flags_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); + return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg); } DEFUN (no_ipv6_route_vrf, @@ -4485,7 +4485,7 @@ DEFUN (no_ipv6_route_vrf, "IPv6 gateway interface name\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, NULL, NULL, argv[2]); + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, NULL, NULL, NULL, argv[2]->arg); } DEFUN (no_ipv6_route_tag_vrf, @@ -4501,7 +4501,7 @@ DEFUN (no_ipv6_route_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, argv[2], NULL, argv[3]); + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, NULL, argv[2]->arg, NULL, argv[3]->arg); } DEFUN (no_ipv6_route_flags_vrf, @@ -4517,7 +4517,7 @@ DEFUN (no_ipv6_route_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], NULL, NULL, argv[3]); + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, NULL, argv[3]->arg); } DEFUN (no_ipv6_route_flags_tag_vrf, @@ -4535,7 +4535,7 @@ DEFUN (no_ipv6_route_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], argv[3], NULL, argv[4]); + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg); } DEFUN (no_ipv6_route_ifname_vrf, @@ -4549,7 +4549,7 @@ DEFUN (no_ipv6_route_ifname_vrf, "IPv6 gateway interface name\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, NULL, NULL, argv[3]); + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, NULL, argv[3]->arg); } DEFUN (no_ipv6_route_ifname_tag_vrf, @@ -4565,7 +4565,7 @@ DEFUN (no_ipv6_route_ifname_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, argv[3], NULL, argv[4]); + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[4]->arg); } DEFUN (no_ipv6_route_ifname_flags_vrf, @@ -4581,7 +4581,7 @@ DEFUN (no_ipv6_route_ifname_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], NULL, NULL, argv[4]); + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[4]->arg); } DEFUN (no_ipv6_route_ifname_flags_tag_vrf, @@ -4599,7 +4599,7 @@ DEFUN (no_ipv6_route_ifname_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, argv[5]); + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg); } DEFUN (no_ipv6_route_pref_vrf, @@ -4614,7 +4614,7 @@ DEFUN (no_ipv6_route_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, NULL, argv[2], argv[3]); + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, NULL, NULL, argv[2]->arg, argv[3]->arg); } DEFUN (no_ipv6_route_pref_tag_vrf, @@ -4631,7 +4631,7 @@ DEFUN (no_ipv6_route_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, argv[2], argv[3], argv[4]); + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg); } DEFUN (no_ipv6_route_flags_pref_vrf, @@ -4648,8 +4648,8 @@ DEFUN (no_ipv6_route_flags_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - /* We do not care about argv[2] */ - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], NULL, argv[3], argv[4]); + /* We do not care about argv[2]->arg */ + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg); } DEFUN (no_ipv6_route_flags_pref_tag_vrf, @@ -4668,8 +4668,8 @@ DEFUN (no_ipv6_route_flags_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - /* We do not care about argv[2] */ - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], argv[5]); + /* We do not care about argv[2]->arg */ + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg); } DEFUN (no_ipv6_route_ifname_pref_vrf, @@ -4684,7 +4684,7 @@ DEFUN (no_ipv6_route_ifname_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, NULL, argv[3], argv[4]); + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[4]->arg); } DEFUN (no_ipv6_route_ifname_pref_tag_vrf, @@ -4701,7 +4701,7 @@ DEFUN (no_ipv6_route_ifname_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], argv[5]); + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[5]->arg); } DEFUN (no_ipv6_route_ifname_flags_pref_vrf, @@ -4718,7 +4718,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], argv[5]); + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg); } DEFUN (no_ipv6_route_ifname_flags_pref_tag_vrf, @@ -4737,7 +4737,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); + return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg); } DEFUN (show_ipv6_route, @@ -4758,14 +4758,14 @@ DEFUN (show_ipv6_route, json_object *json_prefix = NULL; u_char uj = use_json(argc, argv); - if (argc > 0 && argv[0] && strcmp(argv[0], "json") != 0) + if (argc > 0 && argv[0]->arg && strcmp(argv[0]->arg, "json") != 0) { - if (!(zvrf = zebra_vrf_list_lookup_by_name (argv[0]))) + if (!(zvrf = zebra_vrf_list_lookup_by_name (argv[0]->arg))) { if (uj) vty_out (vty, "{}%s", VTY_NEWLINE); else - vty_out (vty, "vrf %s not defined%s", argv[0], VTY_NEWLINE); + vty_out (vty, "vrf %s not defined%s", argv[0]->arg, VTY_NEWLINE); return CMD_SUCCESS; } @@ -4774,7 +4774,7 @@ DEFUN (show_ipv6_route, if (uj) vty_out (vty, "{}%s", VTY_NEWLINE); else - vty_out (vty, "vrf %s inactive%s", argv[0], VTY_NEWLINE); + vty_out (vty, "vrf %s inactive%s", argv[0]->arg, VTY_NEWLINE); return CMD_SUCCESS; } else @@ -4860,11 +4860,11 @@ DEFUN (show_ipv6_route_tag, if (argc > 1) { - VRF_GET_ID (vrf_id, argv[0]); - tag = atoi(argv[1]); + VRF_GET_ID (vrf_id, argv[0]->arg); + tag = atoi(argv[1]->arg); } else - tag = atoi(argv[0]); + tag = atoi(argv[0]->arg); table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id); if (! table) @@ -4916,11 +4916,11 @@ DEFUN (show_ipv6_route_prefix_longer, if (argc > 1) { - VRF_GET_ID (vrf_id, argv[0]); - ret = str2prefix (argv[1], &p); + VRF_GET_ID (vrf_id, argv[0]->arg); + ret = str2prefix (argv[1]->arg, &p); } else - ret = str2prefix (argv[0], &p); + ret = str2prefix (argv[0]->arg, &p); if (! ret) { @@ -4974,11 +4974,11 @@ DEFUN (show_ipv6_route_protocol, if ( argc >1 ) { - VRF_GET_ID (vrf_id, argv[0]); - type = proto_redistnum (AFI_IP6, argv[1]); + VRF_GET_ID (vrf_id, argv[0]->arg); + type = proto_redistnum (AFI_IP6, argv[1]->arg); } else - type = proto_redistnum (AFI_IP6, argv[0]); + type = proto_redistnum (AFI_IP6, argv[0]->arg); if (type < 0) { @@ -5030,11 +5030,11 @@ DEFUN (show_ipv6_route_addr, if (argc > 1 ) { - VRF_GET_ID (vrf_id, argv[0]); - ret = str2prefix_ipv6 (argv[1], &p); + VRF_GET_ID (vrf_id, argv[0]->arg); + ret = str2prefix_ipv6 (argv[1]->arg, &p); } else - ret = str2prefix_ipv6 (argv[0], &p); + ret = str2prefix_ipv6 (argv[0]->arg, &p); if (ret <= 0) { @@ -5085,11 +5085,11 @@ DEFUN (show_ipv6_route_prefix, if (argc > 1) { - VRF_GET_ID (vrf_id, argv[0]); - ret = str2prefix_ipv6 (argv[1], &p); + VRF_GET_ID (vrf_id, argv[0]->arg); + ret = str2prefix_ipv6 (argv[1]->arg, &p); } else - ret = str2prefix_ipv6 (argv[0], &p); + ret = str2prefix_ipv6 (argv[0]->arg, &p); if (ret <= 0) { @@ -5137,7 +5137,7 @@ DEFUN (show_ipv6_route_summary, vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[0]->arg); table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id); if (! table) @@ -5171,7 +5171,7 @@ DEFUN (show_ipv6_route_summary_prefix, vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[0]->arg); table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id); if (! table) @@ -5211,7 +5211,7 @@ DEFUN (show_ipv6_mroute, vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[0]->arg); table = zebra_vrf_table (AFI_IP6, SAFI_MULTICAST, vrf_id); if (! table) @@ -5303,8 +5303,8 @@ DEFUN (show_ipv6_route_vrf_all_tag, int vrf_header = 1; u_short tag = 0; - if (argv[0]) - tag = atoi(argv[0]); + if (argv[0]->arg) + tag = atoi(argv[0]->arg); for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter)) { @@ -5358,7 +5358,7 @@ DEFUN (show_ipv6_route_vrf_all_prefix_longer, int first = 1; int vrf_header = 1; - ret = str2prefix (argv[0], &p); + ret = str2prefix (argv[0]->arg, &p); if (! ret) { vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE); @@ -5413,7 +5413,7 @@ DEFUN (show_ipv6_route_vrf_all_protocol, int first = 1; int vrf_header = 1; - type = proto_redistnum (AFI_IP6, argv[0]); + type = proto_redistnum (AFI_IP6, argv[0]->arg); if (type < 0) { vty_out (vty, "Unknown route type%s", VTY_NEWLINE); @@ -5466,7 +5466,7 @@ DEFUN (show_ipv6_route_vrf_all_addr, struct zebra_vrf *zvrf; vrf_iter_t iter; - ret = str2prefix_ipv6 (argv[0], &p); + ret = str2prefix_ipv6 (argv[0]->arg, &p); if (ret <= 0) { vty_out (vty, "Malformed IPv6 address%s", VTY_NEWLINE); @@ -5507,7 +5507,7 @@ DEFUN (show_ipv6_route_vrf_all_prefix, struct zebra_vrf *zvrf; vrf_iter_t iter; - ret = str2prefix_ipv6 (argv[0], &p); + ret = str2prefix_ipv6 (argv[0]->arg, &p); if (ret <= 0) { vty_out (vty, "Malformed IPv6 prefix%s", VTY_NEWLINE); @@ -5751,7 +5751,7 @@ DEFUN (ip_zebra_import_table_distance, int distance = ZEBRA_TABLE_DISTANCE_DEFAULT; if (argc) - VTY_GET_INTEGER("table", table_id, argv[0]); + VTY_GET_INTEGER("table", table_id, argv[0]->arg); if (!is_zebra_valid_kernel_table(table_id)) { @@ -5768,7 +5768,7 @@ DEFUN (ip_zebra_import_table_distance, } if (argc > 1) - VTY_GET_INTEGER_RANGE("distance", distance, argv[1], 1, 255); + VTY_GET_INTEGER_RANGE("distance", distance, argv[1]->arg, 1, 255); return (zebra_import_table(AFI_IP, table_id, distance, NULL, 1)); } @@ -5796,7 +5796,7 @@ DEFUN (ip_zebra_import_table_distance_routemap, const char *rmap_name; if (argc) - VTY_GET_INTEGER("table", table_id, argv[0]); + VTY_GET_INTEGER("table", table_id, argv[0]->arg); if (!is_zebra_valid_kernel_table(table_id)) { @@ -5814,11 +5814,11 @@ DEFUN (ip_zebra_import_table_distance_routemap, if (argc > 2) { - VTY_GET_INTEGER_RANGE("distance", distance, argv[1], 1, 255); - rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[2]); + VTY_GET_INTEGER_RANGE("distance", distance, argv[1]->arg, 1, 255); + rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[2]->arg); } else - rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]); + rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]->arg); return (zebra_import_table(AFI_IP, table_id, distance, rmap_name, 1)); } @@ -5843,7 +5843,7 @@ DEFUN (no_ip_zebra_import_table, u_int32_t table_id = 0; if (argc) - VTY_GET_INTEGER("table", table_id, argv[0]); + VTY_GET_INTEGER("table", table_id, argv[0]->arg); if (!is_zebra_valid_kernel_table(table_id)) { diff --git a/zebra/zserv.c b/zebra/zserv.c index 3402bf1df..c05858835 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -2263,7 +2263,7 @@ DEFUN (config_table, "Configure target kernel routing table\n" "TABLE integer\n") { - zebrad.rtm_table_default = strtol (argv[0], (char**)0, 10); + zebrad.rtm_table_default = strtol (argv[0]->arg, (char**)0, 10); return CMD_SUCCESS; } -- cgit v1.2.3 From ed5c254baf80bca107c083c61b4bbb7118925a15 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Thu, 22 Sep 2016 18:21:59 +0000 Subject: Revert "zebra: Fixup to use the new parser" This reverts commit 5c94274ff77b7ba53a27ed68eb4b0bcdafba47b2. --- zebra/debug.c | 22 +-- zebra/interface.c | 60 +++--- zebra/irdp_interface.c | 18 +- zebra/router-id.c | 6 +- zebra/rtadv.c | 38 ++-- zebra/test_main.c | 2 +- zebra/zebra_routemap.c | 134 ++++++------- zebra/zebra_vty.c | 510 ++++++++++++++++++++++++------------------------- zebra/zserv.c | 2 +- 9 files changed, 396 insertions(+), 396 deletions(-) (limited to 'zebra') diff --git a/zebra/debug.c b/zebra/debug.c index 1849ebde6..cdf233879 100644 --- a/zebra/debug.c +++ b/zebra/debug.c @@ -131,11 +131,11 @@ DEFUN (debug_zebra_packet_direct, "Debug option set for send packet\n") { zebra_debug_packet = ZEBRA_DEBUG_PACKET; - if (strncmp ("send", argv[0]->arg, strlen (argv[0]->arg)) == 0) + if (strncmp ("send", argv[0], strlen (argv[0])) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND); - if (strncmp ("recv", argv[0]->arg, strlen (argv[0]->arg)) == 0) + if (strncmp ("recv", argv[0], strlen (argv[0])) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV); - if (strncmp ("detail", argv[0]->arg, strlen (argv[0]->arg)) == 0) + if (strncmp ("detail", argv[0], strlen (argv[0])) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_DETAIL); return CMD_SUCCESS; } @@ -151,9 +151,9 @@ DEFUN (debug_zebra_packet_detail, "Debug option set detailed information\n") { zebra_debug_packet = ZEBRA_DEBUG_PACKET; - if (strncmp ("send", argv[0]->arg, strlen (argv[0]->arg)) == 0) + if (strncmp ("send", argv[0], strlen (argv[0])) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND); - if (strncmp ("recv", argv[0]->arg, strlen (argv[0]->arg)) == 0) + if (strncmp ("recv", argv[0], strlen (argv[0])) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV); SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_DETAIL); return CMD_SUCCESS; @@ -180,9 +180,9 @@ DEFUN (debug_zebra_kernel_msgdump, "Dump raw netlink messages received\n" "Dump raw netlink messages sent\n") { - if (!argv[1]->arg || (argv[0]->arg && strncmp(argv[0]->arg, "recv", strlen(argv[0]->arg)) == 0)) + if (!argv[1] || (argv[0] && strncmp(argv[0], "recv", strlen(argv[0])) == 0)) SET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV); - if (!argv[0]->arg || (argv[1]->arg && strncmp(argv[1]->arg, "send", strlen(argv[1]->arg)) == 0)) + if (!argv[0] || (argv[1] && strncmp(argv[1], "send", strlen(argv[1])) == 0)) SET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND); return CMD_SUCCESS; } @@ -267,9 +267,9 @@ DEFUN (no_debug_zebra_packet_direct, "Debug option set for receive packet\n" "Debug option set for send packet\n") { - if (strncmp ("send", argv[0]->arg, strlen (argv[0]->arg)) == 0) + if (strncmp ("send", argv[0], strlen (argv[0])) == 0) UNSET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND); - if (strncmp ("recv", argv[0]->arg, strlen (argv[0]->arg)) == 0) + if (strncmp ("recv", argv[0], strlen (argv[0])) == 0) UNSET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV); return CMD_SUCCESS; } @@ -296,9 +296,9 @@ DEFUN (no_debug_zebra_kernel_msgdump, "Dump raw netlink messages received\n" "Dump raw netlink messages sent\n") { - if (!argv[1]->arg || (argv[0]->arg && strncmp(argv[0]->arg, "recv", strlen(argv[0]->arg)) == 0)) + if (!argv[1] || (argv[0] && strncmp(argv[0], "recv", strlen(argv[0])) == 0)) UNSET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV); - if (!argv[0]->arg || (argv[1]->arg && strncmp(argv[1]->arg, "send", strlen(argv[1]->arg)) == 0)) + if (!argv[0] || (argv[1] && strncmp(argv[1], "send", strlen(argv[1])) == 0)) UNSET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND); return CMD_SUCCESS; } diff --git a/zebra/interface.c b/zebra/interface.c index 5469f8c29..0546cb8f9 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1317,7 +1317,7 @@ DEFUN (show_interface, show_interface_cmd, interface_update_stats (); if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]->arg); + VRF_GET_ID (vrf_id, argv[0]); /* All interface print. */ for (ALL_LIST_ELEMENTS_RO (vrf_iflist (vrf_id), node, ifp)) @@ -1370,13 +1370,13 @@ DEFUN (show_interface_name_vrf, interface_update_stats (); if (argc > 1) - VRF_GET_ID (vrf_id, argv[1]->arg); + VRF_GET_ID (vrf_id, argv[1]); /* Specified interface print. */ - ifp = if_lookup_by_name_vrf (argv[0]->arg, vrf_id); + ifp = if_lookup_by_name_vrf (argv[0], vrf_id); if (ifp == NULL) { - vty_out (vty, "%% Can't find interface %s%s", argv[0]->arg, + vty_out (vty, "%% Can't find interface %s%s", argv[0], VTY_NEWLINE); return CMD_WARNING; } @@ -1403,7 +1403,7 @@ DEFUN (show_interface_name_vrf_all, show_interface_name_vrf_all_cmd, for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter)) { /* Specified interface print. */ - ifp = if_lookup_by_name_vrf (argv[0]->arg, vrf_iter2id (iter)); + ifp = if_lookup_by_name_vrf (argv[0], vrf_iter2id (iter)); if (ifp) { if_dump_vty (vty, ifp); @@ -1413,7 +1413,7 @@ DEFUN (show_interface_name_vrf_all, show_interface_name_vrf_all_cmd, if (!found) { - vty_out (vty, "%% Can't find interface %s%s", argv[0]->arg, VTY_NEWLINE); + vty_out (vty, "%% Can't find interface %s%s", argv[0], VTY_NEWLINE); return CMD_WARNING; } @@ -1476,7 +1476,7 @@ DEFUN (show_interface_desc, vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]->arg); + VRF_GET_ID (vrf_id, argv[0]); if_show_description (vty, vrf_id); @@ -1679,7 +1679,7 @@ DEFUN (bandwidth_if, unsigned int bandwidth; ifp = (struct interface *) vty->index; - bandwidth = strtol(argv[0]->arg, NULL, 10); + bandwidth = strtol(argv[0], NULL, 10); /* bandwidth range is <1-100000> */ if (bandwidth < 1 || bandwidth > 100000) @@ -1843,7 +1843,7 @@ DEFUN (link_params_metric, struct if_link_params *iflp = if_link_params_get (ifp); u_int32_t metric; - VTY_GET_ULONG("metric", metric, argv[0]->arg); + VTY_GET_ULONG("metric", metric, argv[0]); /* Update TE metric if needed */ link_param_cmd_set_uint32 (ifp, &iflp->te_metric, LP_TE, metric); @@ -1876,7 +1876,7 @@ DEFUN (link_params_maxbw, float bw; - if (sscanf (argv[0]->arg, "%g", &bw) != 1) + if (sscanf (argv[0], "%g", &bw) != 1) { vty_out (vty, "link_params_maxbw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -1919,7 +1919,7 @@ DEFUN (link_params_max_rsv_bw, struct if_link_params *iflp = if_link_params_get (ifp); float bw; - if (sscanf (argv[0]->arg, "%g", &bw) != 1) + if (sscanf (argv[0], "%g", &bw) != 1) { vty_out (vty, "link_params_max_rsv_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -1954,14 +1954,14 @@ DEFUN (link_params_unrsv_bw, float bw; /* We don't have to consider about range check here. */ - if (sscanf (argv[0]->arg, "%d", &priority) != 1) + if (sscanf (argv[0], "%d", &priority) != 1) { vty_out (vty, "link_params_unrsv_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); return CMD_WARNING; } - if (sscanf (argv[1]->arg, "%g", &bw) != 1) + if (sscanf (argv[1], "%g", &bw) != 1) { vty_out (vty, "link_params_unrsv_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -1993,7 +1993,7 @@ DEFUN (link_params_admin_grp, struct if_link_params *iflp = if_link_params_get (ifp); unsigned long value; - if (sscanf (argv[0]->arg, "0x%lx", &value) != 1) + if (sscanf (argv[0], "0x%lx", &value) != 1) { vty_out (vty, "link_params_admin_grp: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2035,13 +2035,13 @@ DEFUN (link_params_inter_as, struct in_addr addr; u_int32_t as; - if (!inet_aton (argv[0]->arg, &addr)) + if (!inet_aton (argv[0], &addr)) { vty_out (vty, "Please specify Router-Addr by A.B.C.D%s", VTY_NEWLINE); return CMD_WARNING; } - VTY_GET_ULONG("AS number", as, argv[1]->arg); + VTY_GET_ULONG("AS number", as, argv[1]); /* Update Remote IP and Remote AS fields if needed */ if (IS_PARAM_UNSET(iflp, LP_RMT_AS) @@ -2096,7 +2096,7 @@ DEFUN (link_params_delay, u_int8_t update = 0; /* Get and Check new delay values */ - VTY_GET_ULONG("delay", delay, argv[0]->arg); + VTY_GET_ULONG("delay", delay, argv[0]); switch (argc) { case 1: @@ -2130,8 +2130,8 @@ DEFUN (link_params_delay, return CMD_WARNING; break; case 3: - VTY_GET_ULONG("minimum delay", low, argv[1]->arg); - VTY_GET_ULONG("maximum delay", high, argv[2]->arg); + VTY_GET_ULONG("minimum delay", low, argv[1]); + VTY_GET_ULONG("maximum delay", high, argv[2]); /* Check new delays value coherency */ if (delay <= low || delay >= high) { @@ -2209,7 +2209,7 @@ DEFUN (link_params_delay_var, struct if_link_params *iflp = if_link_params_get (ifp); u_int32_t value; - VTY_GET_ULONG("delay variation", value, argv[0]->arg); + VTY_GET_ULONG("delay variation", value, argv[0]); /* Update Delay Variation if needed */ link_param_cmd_set_uint32 (ifp, &iflp->delay_var, LP_DELAY_VAR, value); @@ -2241,7 +2241,7 @@ DEFUN (link_params_pkt_loss, struct if_link_params *iflp = if_link_params_get (ifp); float fval; - if (sscanf (argv[0]->arg, "%g", &fval) != 1) + if (sscanf (argv[0], "%g", &fval) != 1) { vty_out (vty, "link_params_pkt_loss: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2281,7 +2281,7 @@ DEFUN (link_params_res_bw, struct if_link_params *iflp = if_link_params_get (ifp); float bw; - if (sscanf (argv[0]->arg, "%g", &bw) != 1) + if (sscanf (argv[0], "%g", &bw) != 1) { vty_out (vty, "link_params_res_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2327,7 +2327,7 @@ DEFUN (link_params_ava_bw, struct if_link_params *iflp = if_link_params_get (ifp); float bw; - if (sscanf (argv[0]->arg, "%g", &bw) != 1) + if (sscanf (argv[0], "%g", &bw) != 1) { vty_out (vty, "link_params_ava_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2373,7 +2373,7 @@ DEFUN (link_params_use_bw, struct if_link_params *iflp = if_link_params_get (ifp); float bw; - if (sscanf (argv[0]->arg, "%g", &bw) != 1) + if (sscanf (argv[0], "%g", &bw) != 1) { vty_out (vty, "link_params_use_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2557,7 +2557,7 @@ DEFUN (ip_address, "Set the IP address of an interface\n" "IP address (e.g. 10.0.0.1/8)\n") { - return ip_address_install (vty, vty->index, argv[0]->arg, NULL, NULL); + return ip_address_install (vty, vty->index, argv[0], NULL, NULL); } DEFUN (no_ip_address, @@ -2568,7 +2568,7 @@ DEFUN (no_ip_address, "Set the IP address of an interface\n" "IP Address (e.g. 10.0.0.1/8)") { - return ip_address_uninstall (vty, vty->index, argv[0]->arg, NULL, NULL); + return ip_address_uninstall (vty, vty->index, argv[0], NULL, NULL); } @@ -2582,7 +2582,7 @@ DEFUN (ip_address_label, "Label of this address\n" "Label\n") { - return ip_address_install (vty, vty->index, argv[0]->arg, NULL, argv[1]->arg); + return ip_address_install (vty, vty->index, argv[0], NULL, argv[1]); } DEFUN (no_ip_address_label, @@ -2595,7 +2595,7 @@ DEFUN (no_ip_address_label, "Label of this address\n" "Label\n") { - return ip_address_uninstall (vty, vty->index, argv[0]->arg, NULL, argv[1]->arg); + return ip_address_uninstall (vty, vty->index, argv[0], NULL, argv[1]); } #endif /* HAVE_NETLINK */ @@ -2758,7 +2758,7 @@ DEFUN (ipv6_address, "Set the IP address of an interface\n" "IPv6 address (e.g. 3ffe:506::1/48)\n") { - return ipv6_address_install (vty, vty->index, argv[0]->arg, NULL, NULL, 0); + return ipv6_address_install (vty, vty->index, argv[0], NULL, NULL, 0); } DEFUN (no_ipv6_address, @@ -2769,7 +2769,7 @@ DEFUN (no_ipv6_address, "Set the IP address of an interface\n" "IPv6 address (e.g. 3ffe:506::1/48)\n") { - return ipv6_address_uninstall (vty, vty->index, argv[0]->arg, NULL, NULL, 0); + return ipv6_address_uninstall (vty, vty->index, argv[0], NULL, NULL, 0); } #endif /* HAVE_IPV6 */ diff --git a/zebra/irdp_interface.c b/zebra/irdp_interface.c index cbc89dee7..8fb4fcad1 100644 --- a/zebra/irdp_interface.c +++ b/zebra/irdp_interface.c @@ -480,7 +480,7 @@ DEFUN (ip_irdp_holdtime, zi=ifp->info; irdp=&zi->irdp; - irdp->Lifetime = atoi(argv[0]->arg); + irdp->Lifetime = atoi(argv[0]); return CMD_SUCCESS; } @@ -503,8 +503,8 @@ DEFUN (ip_irdp_minadvertinterval, zi=ifp->info; irdp=&zi->irdp; - if( (unsigned) atoi(argv[0]->arg) <= irdp->MaxAdvertInterval) { - irdp->MinAdvertInterval = atoi(argv[0]->arg); + if( (unsigned) atoi(argv[0]) <= irdp->MaxAdvertInterval) { + irdp->MinAdvertInterval = atoi(argv[0]); return CMD_SUCCESS; } @@ -537,8 +537,8 @@ DEFUN (ip_irdp_maxadvertinterval, irdp=&zi->irdp; - if( irdp->MinAdvertInterval <= (unsigned) atoi(argv[0]->arg) ) { - irdp->MaxAdvertInterval = atoi(argv[0]->arg); + if( irdp->MinAdvertInterval <= (unsigned) atoi(argv[0]) ) { + irdp->MaxAdvertInterval = atoi(argv[0]); return CMD_SUCCESS; } @@ -575,7 +575,7 @@ DEFUN (ip_irdp_preference, zi=ifp->info; irdp=&zi->irdp; - irdp->Preference = atoi(argv[0]->arg); + irdp->Preference = atoi(argv[0]); return CMD_SUCCESS; } @@ -605,10 +605,10 @@ DEFUN (ip_irdp_address_preference, zi=ifp->info; irdp=&zi->irdp; - ret = inet_aton(argv[0]->arg, &ip); + ret = inet_aton(argv[0], &ip); if(!ret) return CMD_WARNING; - pref = atoi(argv[1]->arg); + pref = atoi(argv[1]); for (ALL_LIST_ELEMENTS_RO (irdp->AdvPrefList, node, adv)) if(adv->ip.s_addr == ip.s_addr) @@ -649,7 +649,7 @@ DEFUN (no_ip_irdp_address_preference, zi=ifp->info; irdp=&zi->irdp; - ret = inet_aton(argv[0]->arg, &ip); + ret = inet_aton(argv[0], &ip); if (!ret) return CMD_WARNING; diff --git a/zebra/router-id.c b/zebra/router-id.c index 9891b6ce0..d5d9652c5 100644 --- a/zebra/router-id.c +++ b/zebra/router-id.c @@ -223,7 +223,7 @@ DEFUN (router_id, struct prefix rid; vrf_id_t vrf_id = VRF_DEFAULT; - rid.u.prefix4.s_addr = inet_addr (argv[0]->arg); + rid.u.prefix4.s_addr = inet_addr (argv[0]); if (!rid.u.prefix4.s_addr) return CMD_WARNING; @@ -231,7 +231,7 @@ DEFUN (router_id, rid.family = AF_INET; if (argc > 1) - VRF_GET_ID (vrf_id, argv[1]->arg); + VRF_GET_ID (vrf_id, argv[1]); router_id_set (&rid, vrf_id); @@ -259,7 +259,7 @@ DEFUN (no_router_id, rid.family = AF_INET; if (argc > 1) - VRF_GET_ID (vrf_id, argv[1]->arg); + VRF_GET_ID (vrf_id, argv[1]); router_id_set (&rid, vrf_id); diff --git a/zebra/rtadv.c b/zebra/rtadv.c index b84585405..ac297890a 100644 --- a/zebra/rtadv.c +++ b/zebra/rtadv.c @@ -930,7 +930,7 @@ DEFUN (ipv6_nd_ra_interval_msec, struct zebra_ns *zns; zns = zvrf->zns; - VTY_GET_INTEGER_RANGE ("router advertisement interval", interval, argv[0]->arg, 70, 1800000); + VTY_GET_INTEGER_RANGE ("router advertisement interval", interval, argv[0], 70, 1800000); if ((zif->rtadv.AdvDefaultLifetime != -1 && interval > (unsigned)zif->rtadv.AdvDefaultLifetime * 1000)) { vty_out (vty, "This ra-interval would conflict with configured ra-lifetime!%s", VTY_NEWLINE); @@ -965,7 +965,7 @@ DEFUN (ipv6_nd_ra_interval, struct zebra_ns *zns; zns = zvrf->zns; - VTY_GET_INTEGER_RANGE ("router advertisement interval", interval, argv[0]->arg, 1, 1800); + VTY_GET_INTEGER_RANGE ("router advertisement interval", interval, argv[0], 1, 1800); if ((zif->rtadv.AdvDefaultLifetime != -1 && interval > (unsigned)zif->rtadv.AdvDefaultLifetime)) { vty_out (vty, "This ra-interval would conflict with configured ra-lifetime!%s", VTY_NEWLINE); @@ -1045,7 +1045,7 @@ DEFUN (ipv6_nd_ra_lifetime, ifp = (struct interface *) vty->index; zif = ifp->info; - VTY_GET_INTEGER_RANGE ("router lifetime", lifetime, argv[0]->arg, 0, 9000); + VTY_GET_INTEGER_RANGE ("router lifetime", lifetime, argv[0], 0, 9000); /* The value to be placed in the Router Lifetime field * of Router Advertisements sent from the interface, @@ -1100,7 +1100,7 @@ DEFUN (ipv6_nd_reachable_time, { struct interface *ifp = (struct interface *) vty->index; struct zebra_if *zif = ifp->info; - VTY_GET_INTEGER_RANGE ("reachable time", zif->rtadv.AdvReachableTime, argv[0]->arg, 1, RTADV_MAX_REACHABLE_TIME); + VTY_GET_INTEGER_RANGE ("reachable time", zif->rtadv.AdvReachableTime, argv[0], 1, RTADV_MAX_REACHABLE_TIME); return CMD_SUCCESS; } @@ -1142,7 +1142,7 @@ DEFUN (ipv6_nd_homeagent_preference, { struct interface *ifp = (struct interface *) vty->index; struct zebra_if *zif = ifp->info; - VTY_GET_INTEGER_RANGE ("home agent preference", zif->rtadv.HomeAgentPreference, argv[0]->arg, 0, 65535); + VTY_GET_INTEGER_RANGE ("home agent preference", zif->rtadv.HomeAgentPreference, argv[0], 0, 65535); return CMD_SUCCESS; } @@ -1184,7 +1184,7 @@ DEFUN (ipv6_nd_homeagent_lifetime, { struct interface *ifp = (struct interface *) vty->index; struct zebra_if *zif = ifp->info; - VTY_GET_INTEGER_RANGE ("home agent lifetime", zif->rtadv.HomeAgentLifetime, argv[0]->arg, 0, RTADV_MAX_HALIFETIME); + VTY_GET_INTEGER_RANGE ("home agent lifetime", zif->rtadv.HomeAgentLifetime, argv[0], 0, RTADV_MAX_HALIFETIME); return CMD_SUCCESS; } @@ -1390,7 +1390,7 @@ DEFUN (ipv6_nd_prefix, ifp = (struct interface *) vty->index; zebra_if = ifp->info; - ret = str2prefix_ipv6 (argv[0]->arg, &rp.prefix); + ret = str2prefix_ipv6 (argv[0], &rp.prefix); if (!ret) { vty_out (vty, "Malformed IPv6 prefix%s", VTY_NEWLINE); @@ -1405,19 +1405,19 @@ DEFUN (ipv6_nd_prefix, if (argc > 1) { - if ((isdigit((unsigned char)argv[1]->arg[0])) - || strncmp (argv[1]->arg, "i", 1) == 0) + if ((isdigit((unsigned char)argv[1][0])) + || strncmp (argv[1], "i", 1) == 0) { - if ( strncmp (argv[1]->arg, "i", 1) == 0) + if ( strncmp (argv[1], "i", 1) == 0) rp.AdvValidLifetime = UINT32_MAX; else - rp.AdvValidLifetime = (u_int32_t) strtoll (argv[1]->arg, + rp.AdvValidLifetime = (u_int32_t) strtoll (argv[1], (char **)NULL, 10); - if ( strncmp (argv[2]->arg, "i", 1) == 0) + if ( strncmp (argv[2], "i", 1) == 0) rp.AdvPreferredLifetime = UINT32_MAX; else - rp.AdvPreferredLifetime = (u_int32_t) strtoll (argv[2]->arg, + rp.AdvPreferredLifetime = (u_int32_t) strtoll (argv[2], (char **)NULL, 10); if (rp.AdvPreferredLifetime > rp.AdvValidLifetime) @@ -1431,11 +1431,11 @@ DEFUN (ipv6_nd_prefix, { for (i = cursor; i < argc; i++) { - if (strncmp (argv[i]->arg, "of", 2) == 0) + if (strncmp (argv[i], "of", 2) == 0) rp.AdvOnLinkFlag = 0; - if (strncmp (argv[i]->arg, "no", 2) == 0) + if (strncmp (argv[i], "no", 2) == 0) rp.AdvAutonomousFlag = 0; - if (strncmp (argv[i]->arg, "ro", 2) == 0) + if (strncmp (argv[i], "ro", 2) == 0) rp.AdvRouterAddressFlag = 1; } } @@ -1619,7 +1619,7 @@ DEFUN (no_ipv6_nd_prefix, ifp = (struct interface *) vty->index; zebra_if = ifp->info; - ret = str2prefix_ipv6 (argv[0]->arg, &rp.prefix); + ret = str2prefix_ipv6 (argv[0], &rp.prefix); if (!ret) { vty_out (vty, "Malformed IPv6 prefix%s", VTY_NEWLINE); @@ -1810,7 +1810,7 @@ DEFUN (ipv6_nd_router_preference, while (0 != rtadv_pref_strs[i]) { - if (strncmp (argv[0]->arg, rtadv_pref_strs[i], 1) == 0) + if (strncmp (argv[0], rtadv_pref_strs[i], 1) == 0) { zif->rtadv.DefaultPreference = i; return CMD_SUCCESS; @@ -1861,7 +1861,7 @@ DEFUN (ipv6_nd_mtu, { struct interface *ifp = (struct interface *) vty->index; struct zebra_if *zif = ifp->info; - VTY_GET_INTEGER_RANGE ("MTU", zif->rtadv.AdvLinkMTU, argv[0]->arg, 1, 65535); + VTY_GET_INTEGER_RANGE ("MTU", zif->rtadv.AdvLinkMTU, argv[0], 1, 65535); return CMD_SUCCESS; } diff --git a/zebra/test_main.c b/zebra/test_main.c index 5bb4ee540..bbaf45028 100644 --- a/zebra/test_main.c +++ b/zebra/test_main.c @@ -136,7 +136,7 @@ DEFUN (test_interface_state, ifp->flags = IFF_BROADCAST|IFF_MULTICAST; } - switch (argv[0]->arg[0]) + switch (argv[0][0]) { case 'u': SET_FLAG (ifp->flags, IFF_UP); diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c index 87bbbba3b..e6c5a3e91 100644 --- a/zebra/zebra_routemap.c +++ b/zebra/zebra_routemap.c @@ -301,7 +301,7 @@ DEFUN (match_interface, "match first hop interface of route\n" "Interface name\n") { - return zebra_route_match_add (vty, vty->index, "interface", argv[0]->arg, + return zebra_route_match_add (vty, vty->index, "interface", argv[0], RMAP_EVENT_MATCH_ADDED); } @@ -315,7 +315,7 @@ DEFUN (no_match_interface, if (argc == 0) return zebra_route_match_delete (vty, vty->index, "interface", NULL, RMAP_EVENT_MATCH_DELETED); - return zebra_route_match_delete (vty, vty->index, "interface", argv[0]->arg, RMAP_EVENT_MATCH_DELETED); + return zebra_route_match_delete (vty, vty->index, "interface", argv[0], RMAP_EVENT_MATCH_DELETED); } ALIAS (no_match_interface, @@ -333,7 +333,7 @@ DEFUN (match_tag, "Match tag of route\n" "Tag value\n") { - return zebra_route_match_add (vty, vty->index, "tag", argv[0]->arg, + return zebra_route_match_add (vty, vty->index, "tag", argv[0], RMAP_EVENT_MATCH_ADDED); } @@ -348,7 +348,7 @@ DEFUN (no_match_tag, return zebra_route_match_delete (vty, vty->index, "tag", NULL, RMAP_EVENT_MATCH_DELETED); - return zebra_route_match_delete (vty, vty->index, "tag", argv[0]->arg, + return zebra_route_match_delete (vty, vty->index, "tag", argv[0], RMAP_EVENT_MATCH_DELETED); } @@ -369,7 +369,7 @@ DEFUN (match_ip_next_hop, "IP access-list number (expanded range)\n" "IP Access-list name\n") { - return zebra_route_match_add (vty, vty->index, "ip next-hop", argv[0]->arg, RMAP_EVENT_FILTER_ADDED); + return zebra_route_match_add (vty, vty->index, "ip next-hop", argv[0], RMAP_EVENT_FILTER_ADDED); } DEFUN (no_match_ip_next_hop, @@ -384,7 +384,7 @@ DEFUN (no_match_ip_next_hop, return zebra_route_match_delete (vty, vty->index, "ip next-hop", NULL, RMAP_EVENT_FILTER_DELETED); - return zebra_route_match_delete (vty, vty->index, "ip next-hop", argv[0]->arg, + return zebra_route_match_delete (vty, vty->index, "ip next-hop", argv[0], RMAP_EVENT_FILTER_DELETED); } @@ -409,7 +409,7 @@ DEFUN (match_ip_next_hop_prefix_list, "IP prefix-list name\n") { return zebra_route_match_add (vty, vty->index, "ip next-hop prefix-list", - argv[0]->arg, RMAP_EVENT_PLIST_ADDED); + argv[0], RMAP_EVENT_PLIST_ADDED); } DEFUN (no_match_ip_next_hop_prefix_list, @@ -427,7 +427,7 @@ DEFUN (no_match_ip_next_hop_prefix_list, RMAP_EVENT_PLIST_DELETED); return zebra_route_match_delete (vty, vty->index, - "ip next-hop prefix-list", argv[0]->arg, + "ip next-hop prefix-list", argv[0], RMAP_EVENT_PLIST_DELETED); } @@ -452,7 +452,7 @@ DEFUN (match_ip_address, "IP Access-list name\n") { - return zebra_route_match_add (vty, vty->index, "ip address", argv[0]->arg, + return zebra_route_match_add (vty, vty->index, "ip address", argv[0], RMAP_EVENT_FILTER_ADDED); } @@ -468,7 +468,7 @@ DEFUN (no_match_ip_address, return zebra_route_match_delete (vty, vty->index, "ip address", NULL, RMAP_EVENT_FILTER_DELETED); - return zebra_route_match_delete (vty, vty->index, "ip address", argv[0]->arg, + return zebra_route_match_delete (vty, vty->index, "ip address", argv[0], RMAP_EVENT_FILTER_DELETED); } @@ -493,7 +493,7 @@ DEFUN (match_ip_address_prefix_list, "IP prefix-list name\n") { return zebra_route_match_add (vty, vty->index, "ip address prefix-list", - argv[0]->arg, RMAP_EVENT_PLIST_ADDED); + argv[0], RMAP_EVENT_PLIST_ADDED); } DEFUN (no_match_ip_address_prefix_list, @@ -511,7 +511,7 @@ DEFUN (no_match_ip_address_prefix_list, RMAP_EVENT_PLIST_DELETED); return zebra_route_match_delete (vty, vty->index, - "ip address prefix-list", argv[0]->arg, + "ip address prefix-list", argv[0], RMAP_EVENT_PLIST_DELETED); } @@ -535,7 +535,7 @@ DEFUN (match_ip_address_prefix_len, "Prefix length\n") { return zebra_route_match_add (vty, vty->index, "ip address prefix-len", - argv[0]->arg, RMAP_EVENT_MATCH_ADDED); + argv[0], RMAP_EVENT_MATCH_ADDED); } DEFUN (no_match_ip_address_prefix_len, @@ -553,7 +553,7 @@ DEFUN (no_match_ip_address_prefix_len, RMAP_EVENT_MATCH_DELETED); return zebra_route_match_delete (vty, vty->index, - "ip address prefix-len", argv[0]->arg, + "ip address prefix-len", argv[0], RMAP_EVENT_MATCH_DELETED); } @@ -576,7 +576,7 @@ DEFUN (match_ip_nexthop_prefix_len, "Prefix length\n") { return zebra_route_match_add (vty, vty->index, "ip next-hop prefix-len", - argv[0]->arg, RMAP_EVENT_MATCH_ADDED); + argv[0], RMAP_EVENT_MATCH_ADDED); } DEFUN (no_match_ip_nexthop_prefix_len, @@ -594,7 +594,7 @@ DEFUN (no_match_ip_nexthop_prefix_len, RMAP_EVENT_MATCH_DELETED); return zebra_route_match_delete (vty, vty->index, - "ip next-hop prefix-len", argv[0]->arg, + "ip next-hop prefix-len", argv[0], RMAP_EVENT_MATCH_DELETED); } @@ -613,15 +613,15 @@ DEFUN (match_source_protocol, { int i; - i = proto_name2num(argv[0]->arg); + i = proto_name2num(argv[0]); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", VTY_NEWLINE); return CMD_WARNING; } return zebra_route_match_add (vty, vty->index, "source-protocol", - argv[0]->arg, RMAP_EVENT_MATCH_ADDED); + argv[0], RMAP_EVENT_MATCH_ADDED); } DEFUN (no_match_source_protocol, @@ -635,16 +635,16 @@ DEFUN (no_match_source_protocol, if (argc >= 1) { - i = proto_name2num(argv[0]->arg); + i = proto_name2num(argv[0]); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", VTY_NEWLINE); return CMD_WARNING; } } return zebra_route_match_delete (vty, vty->index, - "source-protocol", argv[0]->arg ? argv[0]->arg : NULL, + "source-protocol", argv[0] ? argv[0] : NULL, RMAP_EVENT_MATCH_DELETED); } @@ -663,9 +663,9 @@ DEFUN (set_src, struct prefix p; vrf_iter_t iter; - if (inet_pton(AF_INET, argv[0]->arg, &src.ipv4) != 1) + if (inet_pton(AF_INET, argv[0], &src.ipv4) != 1) { - if (inet_pton(AF_INET6, argv[0]->arg, &src.ipv6) != 1) + if (inet_pton(AF_INET6, argv[0], &src.ipv6) != 1) { vty_out (vty, "%% not a valid IPv4/v6 address%s", VTY_NEWLINE); return CMD_WARNING; @@ -706,7 +706,7 @@ DEFUN (set_src, vty_out (vty, "%% not a local address%s", VTY_NEWLINE); return CMD_WARNING; } - return zebra_route_set_add (vty, vty->index, "src", argv[0]->arg); + return zebra_route_set_add (vty, vty->index, "src", argv[0]); } DEFUN (no_set_src, @@ -719,7 +719,7 @@ DEFUN (no_set_src, if (argc == 0) return zebra_route_set_delete (vty, vty->index, "src", NULL); - return zebra_route_set_delete (vty, vty->index, "src", argv[0]->arg); + return zebra_route_set_delete (vty, vty->index, "src", argv[0]); } DEFUN (zebra_route_map_timer, @@ -730,7 +730,7 @@ DEFUN (zebra_route_map_timer, { u_int32_t rmap_delay_timer; - VTY_GET_INTEGER_RANGE ("delay-timer", rmap_delay_timer, argv[0]->arg, 0, 600); + VTY_GET_INTEGER_RANGE ("delay-timer", rmap_delay_timer, argv[0], 0, 600); zebra_route_map_set_delay_timer(rmap_delay_timer); return (CMD_SUCCESS); @@ -766,28 +766,28 @@ DEFUN (ip_protocol, { int i; - if (strcasecmp(argv[0]->arg, "any") == 0) + if (strcasecmp(argv[0], "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]->arg); + i = proto_name2num(argv[0]); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", VTY_NEWLINE); return CMD_WARNING; } if (proto_rm[AFI_IP][i]) { - if (strcmp(proto_rm[AFI_IP][i], argv[1]->arg) == 0) + if (strcmp(proto_rm[AFI_IP][i], argv[1]) == 0) return CMD_SUCCESS; XFREE (MTYPE_ROUTE_MAP_NAME, proto_rm[AFI_IP][i]); } - proto_rm[AFI_IP][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]->arg); + proto_rm[AFI_IP][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]); if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug ("%u: IPv4 Routemap config for protocol %s, scheduling RIB processing", - VRF_DEFAULT, argv[0]->arg); + VRF_DEFAULT, argv[0]); rib_update(VRF_DEFAULT, RIB_UPDATE_RMAP_CHANGE); return CMD_SUCCESS; @@ -804,20 +804,20 @@ DEFUN (no_ip_protocol, { int i; - if (strcasecmp(argv[0]->arg, "any") == 0) + if (strcasecmp(argv[0], "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]->arg); + i = proto_name2num(argv[0]); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", VTY_NEWLINE); return CMD_WARNING; } if (!proto_rm[AFI_IP][i]) return CMD_SUCCESS; - if ((argc == 2 && strcmp(argv[1]->arg, proto_rm[AFI_IP][i]) == 0) || + if ((argc == 2 && strcmp(argv[1], proto_rm[AFI_IP][i]) == 0) || (argc < 2)) { XFREE (MTYPE_ROUTE_MAP_NAME, proto_rm[AFI_IP][i]); @@ -825,7 +825,7 @@ DEFUN (no_ip_protocol, if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug ("%u: IPv4 Routemap unconfig for protocol %s, scheduling RIB processing", - VRF_DEFAULT, argv[0]->arg); + VRF_DEFAULT, argv[0]); rib_update(VRF_DEFAULT, RIB_UPDATE_RMAP_CHANGE); } return CMD_SUCCESS; @@ -879,28 +879,28 @@ DEFUN (ipv6_protocol, { int i; - if (strcasecmp(argv[0]->arg, "any") == 0) + if (strcasecmp(argv[0], "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]->arg); + i = proto_name2num(argv[0]); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", VTY_NEWLINE); return CMD_WARNING; } if (proto_rm[AFI_IP6][i]) { - if (strcmp(proto_rm[AFI_IP6][i], argv[1]->arg) == 0) + if (strcmp(proto_rm[AFI_IP6][i], argv[1]) == 0) return CMD_SUCCESS; XFREE (MTYPE_ROUTE_MAP_NAME, proto_rm[AFI_IP6][i]); } - proto_rm[AFI_IP6][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]->arg); + proto_rm[AFI_IP6][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]); if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug ("%u: IPv6 Routemap config for protocol %s, scheduling RIB processing", - VRF_DEFAULT, argv[0]->arg); + VRF_DEFAULT, argv[0]); rib_update(VRF_DEFAULT, RIB_UPDATE_RMAP_CHANGE); return CMD_SUCCESS; @@ -917,20 +917,20 @@ DEFUN (no_ipv6_protocol, { int i; - if (strcasecmp(argv[0]->arg, "any") == 0) + if (strcasecmp(argv[0], "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]->arg); + i = proto_name2num(argv[0]); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", VTY_NEWLINE); return CMD_WARNING; } if (!proto_rm[AFI_IP6][i]) return CMD_SUCCESS; - if ((argc == 2 && strcmp(argv[1]->arg, proto_rm[AFI_IP6][i]) == 0) || + if ((argc == 2 && strcmp(argv[1], proto_rm[AFI_IP6][i]) == 0) || (argc < 2)) { XFREE (MTYPE_ROUTE_MAP_NAME, proto_rm[AFI_IP6][i]); @@ -938,7 +938,7 @@ DEFUN (no_ipv6_protocol, if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug ("%u: IPv6 Routemap unconfig for protocol %s, scheduling RIB processing", - VRF_DEFAULT, argv[0]->arg); + VRF_DEFAULT, argv[0]); rib_update(VRF_DEFAULT, RIB_UPDATE_RMAP_CHANGE); } @@ -993,25 +993,25 @@ DEFUN (ip_protocol_nht_rmap, { int i; - if (strcasecmp(argv[0]->arg, "any") == 0) + if (strcasecmp(argv[0], "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]->arg); + i = proto_name2num(argv[0]); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", VTY_NEWLINE); return CMD_WARNING; } if (nht_rm[AFI_IP][i]) { - if (strcmp(nht_rm[AFI_IP][i], argv[1]->arg) == 0) + if (strcmp(nht_rm[AFI_IP][i], argv[1]) == 0) return CMD_SUCCESS; XFREE (MTYPE_ROUTE_MAP_NAME, nht_rm[AFI_IP][i]); } - nht_rm[AFI_IP][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]->arg); + nht_rm[AFI_IP][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]); zebra_evaluate_rnh(0, AF_INET, 1, RNH_NEXTHOP_TYPE, NULL); return CMD_SUCCESS; @@ -1027,20 +1027,20 @@ DEFUN (no_ip_protocol_nht_rmap, { int i; - if (strcasecmp(argv[0]->arg, "any") == 0) + if (strcasecmp(argv[0], "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]->arg); + i = proto_name2num(argv[0]); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", VTY_NEWLINE); return CMD_WARNING; } if (!nht_rm[AFI_IP][i]) return CMD_SUCCESS; - if ((argc == 2 && strcmp(argv[1]->arg, nht_rm[AFI_IP][i]) == 0) || + if ((argc == 2 && strcmp(argv[1], nht_rm[AFI_IP][i]) == 0) || (argc < 2)) { XFREE (MTYPE_ROUTE_MAP_NAME, nht_rm[AFI_IP][i]); @@ -1097,19 +1097,19 @@ DEFUN (ipv6_protocol_nht_rmap, { int i; - if (strcasecmp(argv[0]->arg, "any") == 0) + if (strcasecmp(argv[0], "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]->arg); + i = proto_name2num(argv[0]); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", VTY_NEWLINE); return CMD_WARNING; } if (nht_rm[AFI_IP6][i]) XFREE (MTYPE_ROUTE_MAP_NAME, nht_rm[AFI_IP6][i]); - nht_rm[AFI_IP6][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]->arg); + nht_rm[AFI_IP6][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]); zebra_evaluate_rnh(0, AF_INET6, 1, RNH_NEXTHOP_TYPE, NULL); return CMD_SUCCESS; @@ -1125,20 +1125,20 @@ DEFUN (no_ipv6_protocol_nht_rmap, { int i; - if (strcasecmp(argv[0]->arg, "any") == 0) + if (strcasecmp(argv[0], "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]->arg); + i = proto_name2num(argv[0]); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0]->arg ? argv[0]->arg : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", VTY_NEWLINE); return CMD_WARNING; } - if (nht_rm[AFI_IP6][i] && argc == 2 && strcmp(argv[1]->arg, nht_rm[AFI_IP6][i])) + if (nht_rm[AFI_IP6][i] && argc == 2 && strcmp(argv[1], nht_rm[AFI_IP6][i])) { - vty_out (vty, "invalid route-map \"%s\"%s", argv[1]->arg, VTY_NEWLINE); + vty_out (vty, "invalid route-map \"%s\"%s", argv[1], VTY_NEWLINE); return CMD_WARNING; } diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 8878d8ffe..a7ee63d87 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -191,7 +191,7 @@ DEFUN (ip_mroute_dist, "Nexthop interface name\n" "Distance\n") { - return zebra_static_ipv4 (vty, SAFI_MULTICAST, 1, argv[0]->arg, NULL, argv[1]->arg, NULL, NULL, argc > 2 ? argv[2]->arg : NULL, NULL); + return zebra_static_ipv4 (vty, SAFI_MULTICAST, 1, argv[0], NULL, argv[1], NULL, NULL, argc > 2 ? argv[2] : NULL, NULL); } ALIAS (ip_mroute_dist, @@ -213,7 +213,7 @@ DEFUN (no_ip_mroute_dist, "Nexthop interface name\n" "Distance\n") { - return zebra_static_ipv4 (vty, SAFI_MULTICAST, 0, argv[0]->arg, NULL, argv[1]->arg, NULL, NULL, argc > 2 ? argv[2]->arg : NULL, NULL); + return zebra_static_ipv4 (vty, SAFI_MULTICAST, 0, argv[0], NULL, argv[1], NULL, NULL, argc > 2 ? argv[2] : NULL, NULL); } ALIAS (no_ip_mroute_dist, @@ -239,15 +239,15 @@ DEFUN (ip_multicast_mode, "Lookup both, use entry with longer prefix\n") { - if (!strncmp (argv[0]->arg, "u", 1)) + if (!strncmp (argv[0], "u", 1)) multicast_mode_ipv4_set (MCAST_URIB_ONLY); - else if (!strncmp (argv[0]->arg, "mrib-o", 6)) + else if (!strncmp (argv[0], "mrib-o", 6)) multicast_mode_ipv4_set (MCAST_MRIB_ONLY); - else if (!strncmp (argv[0]->arg, "mrib-t", 6)) + else if (!strncmp (argv[0], "mrib-t", 6)) multicast_mode_ipv4_set (MCAST_MIX_MRIB_FIRST); - else if (!strncmp (argv[0]->arg, "low", 3)) + else if (!strncmp (argv[0], "low", 3)) multicast_mode_ipv4_set (MCAST_MIX_DISTANCE); - else if (!strncmp (argv[0]->arg, "lon", 3)) + else if (!strncmp (argv[0], "lon", 3)) multicast_mode_ipv4_set (MCAST_MIX_PFXLEN); else { @@ -306,7 +306,7 @@ DEFUN (show_ip_rpf_addr, struct rib *rib; int ret; - ret = inet_aton (argv[0]->arg, &addr); + ret = inet_aton (argv[0], &addr); if (ret == 0) { vty_out (vty, "%% Malformed address%s", VTY_NEWLINE); @@ -334,7 +334,7 @@ DEFUN (ip_route, "IP gateway interface name\n" "Null interface\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, NULL, NULL, NULL); } @@ -350,7 +350,7 @@ DEFUN (ip_route_tag, "Set tag for this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, NULL, argv[2]->arg, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, argv[2], NULL, NULL); } @@ -365,7 +365,7 @@ DEFUN (ip_route_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, argv[2]->arg, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], NULL, NULL, NULL); } @@ -383,7 +383,7 @@ DEFUN (ip_route_flags_tag, "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, argv[2]->arg, argv[3]->arg, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], argv[3], NULL, NULL); } @@ -396,7 +396,7 @@ DEFUN (ip_route_flags2, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, NULL, argv[1]->arg, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], NULL, NULL, NULL); } @@ -412,7 +412,7 @@ DEFUN (ip_route_flags2_tag, "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, NULL, argv[1]->arg, argv[2]->arg, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], argv[2], NULL, NULL); } @@ -428,7 +428,7 @@ DEFUN (ip_route_mask, "IP gateway interface name\n" "Null interface\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, NULL, NULL, NULL); } @@ -446,7 +446,7 @@ DEFUN (ip_route_mask_tag, "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, argv[3], NULL, NULL); } @@ -462,7 +462,7 @@ DEFUN (ip_route_mask_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], NULL, NULL, NULL); } @@ -481,7 +481,7 @@ DEFUN (ip_route_mask_flags_tag, "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, NULL); } @@ -495,7 +495,7 @@ DEFUN (ip_route_mask_flags2, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], NULL, NULL, NULL); } @@ -511,7 +511,7 @@ DEFUN (ip_route_mask_flags2_tag, "Set tag for this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], argv[3], NULL, NULL); } @@ -527,8 +527,8 @@ DEFUN (ip_route_distance, "Null interface\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, NULL, NULL, - argv[2]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, NULL, + argv[2], NULL); } DEFUN (ip_route_tag_distance, @@ -545,8 +545,8 @@ DEFUN (ip_route_tag_distance, "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, NULL, argv[2]->arg, - argv[3]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, argv[2], + argv[3], NULL); } DEFUN (ip_route_flags_distance, @@ -561,8 +561,8 @@ DEFUN (ip_route_flags_distance, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, argv[2]->arg, NULL, - argv[3]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], NULL, + argv[3], NULL); } DEFUN (ip_route_flags_tag_distance, @@ -579,8 +579,8 @@ DEFUN (ip_route_flags_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, argv[2]->arg, argv[3]->arg, - argv[4]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], argv[3], + argv[4], NULL); } DEFUN (ip_route_flags_distance2, @@ -593,8 +593,8 @@ DEFUN (ip_route_flags_distance2, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, NULL, argv[1]->arg, NULL, - argv[2]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], NULL, + argv[2], NULL); } DEFUN (ip_route_flags_tag_distance2, @@ -609,8 +609,8 @@ DEFUN (ip_route_flags_tag_distance2, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, NULL, argv[1]->arg, argv[2]->arg, - argv[3]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], argv[2], + argv[3], NULL); } DEFUN (ip_route_mask_distance, @@ -625,8 +625,8 @@ DEFUN (ip_route_mask_distance, "Null interface\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, - argv[3]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, NULL, + argv[3], NULL); } DEFUN (ip_route_mask_tag_distance, @@ -643,8 +643,8 @@ DEFUN (ip_route_mask_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, - argv[4]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, argv[3], + argv[4], NULL); } DEFUN (ip_route_mask_flags_tag_distance, @@ -662,8 +662,8 @@ DEFUN (ip_route_mask_flags_tag_distance, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, - argv[5]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], argv[4], + argv[5], NULL); } @@ -680,8 +680,8 @@ DEFUN (ip_route_mask_flags_distance, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, - argv[4]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], NULL, + argv[4], NULL); } DEFUN (ip_route_mask_flags_distance2, @@ -695,8 +695,8 @@ DEFUN (ip_route_mask_flags_distance2, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, - argv[3]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], NULL, + argv[3], NULL); } DEFUN (ip_route_mask_flags_tag_distance2, @@ -712,8 +712,8 @@ DEFUN (ip_route_mask_flags_tag_distance2, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, - argv[4]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], argv[3], + argv[4], NULL); } DEFUN (no_ip_route, @@ -727,7 +727,7 @@ DEFUN (no_ip_route, "IP gateway interface name\n" "Null interface\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, argv[1]->arg, NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, NULL, NULL, NULL); } @@ -744,7 +744,7 @@ DEFUN (no_ip_route_tag, "Tag of this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, argv[1]->arg, NULL, argv[2]->arg, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, argv[2], NULL, NULL); } @@ -784,7 +784,7 @@ DEFUN (no_ip_route_flags2, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, NULL, NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, NULL, NULL, NULL, NULL); } @@ -800,7 +800,7 @@ DEFUN (no_ip_route_flags2_tag, "Tag of this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, NULL, NULL, argv[1]->arg, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, NULL, argv[1], NULL, NULL); } @@ -816,7 +816,7 @@ DEFUN (no_ip_route_mask, "IP gateway interface name\n" "Null interface\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, NULL, NULL, NULL); } @@ -834,7 +834,7 @@ DEFUN (no_ip_route_mask_tag, "Tag of this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, argv[3], NULL, NULL); } @@ -877,7 +877,7 @@ DEFUN (no_ip_route_mask_flags2, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, NULL, NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, NULL, NULL, NULL, NULL); } @@ -894,7 +894,7 @@ DEFUN (no_ip_route_mask_flags2_tag, "Tag of this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, NULL, NULL, argv[2]->arg, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, NULL, argv[2], NULL, NULL); } @@ -910,8 +910,8 @@ DEFUN (no_ip_route_distance, "Null interface\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, argv[1]->arg, NULL, NULL, - argv[2]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, NULL, + argv[2], NULL); } DEFUN (no_ip_route_tag_distance, @@ -928,8 +928,8 @@ DEFUN (no_ip_route_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, argv[1]->arg, NULL, argv[2]->arg, - argv[3]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, argv[2], + argv[3], NULL); } DEFUN (no_ip_route_flags_distance, @@ -945,8 +945,8 @@ DEFUN (no_ip_route_flags_distance, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, argv[1]->arg, argv[2]->arg, NULL, - argv[3]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], NULL, + argv[3], NULL); } DEFUN (no_ip_route_flags_tag_distance, @@ -964,8 +964,8 @@ DEFUN (no_ip_route_flags_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, argv[1]->arg, argv[2]->arg, argv[3]->arg, - argv[4]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], argv[3], + argv[4], NULL); } DEFUN (no_ip_route_flags_distance2, @@ -979,8 +979,8 @@ DEFUN (no_ip_route_flags_distance2, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, NULL, argv[1]->arg, NULL, - argv[2]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], NULL, + argv[2], NULL); } DEFUN (no_ip_route_flags_tag_distance2, @@ -996,8 +996,8 @@ DEFUN (no_ip_route_flags_tag_distance2, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, NULL, argv[1]->arg, argv[2]->arg, - argv[3]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], argv[2], + argv[3], NULL); } DEFUN (no_ip_route_mask_distance, @@ -1013,8 +1013,8 @@ DEFUN (no_ip_route_mask_distance, "Null interface\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, - argv[3]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, NULL, + argv[3], NULL); } DEFUN (no_ip_route_mask_tag_distance, @@ -1032,8 +1032,8 @@ DEFUN (no_ip_route_mask_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, - argv[4]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, argv[3], + argv[4], NULL); } DEFUN (no_ip_route_mask_flags_distance, @@ -1050,8 +1050,8 @@ DEFUN (no_ip_route_mask_flags_distance, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, - argv[4]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], NULL, + argv[4], NULL); } DEFUN (no_ip_route_mask_flags_tag_distance, @@ -1070,8 +1070,8 @@ DEFUN (no_ip_route_mask_flags_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, - argv[5]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], argv[4], + argv[5], NULL); } DEFUN (no_ip_route_mask_flags_distance2, @@ -1086,8 +1086,8 @@ DEFUN (no_ip_route_mask_flags_distance2, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, - argv[3]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], NULL, + argv[3], NULL); } DEFUN (no_ip_route_mask_flags_tag_distance2, @@ -1104,8 +1104,8 @@ DEFUN (no_ip_route_mask_flags_tag_distance2, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, - argv[4]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], argv[3], + argv[4], NULL); } /* Static route configuration. */ @@ -1120,7 +1120,7 @@ DEFUN (ip_route_vrf, "Null interface\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, NULL, NULL, NULL, argv[2]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, NULL, NULL, argv[2]); } DEFUN (ip_route_tag_vrf, @@ -1136,7 +1136,7 @@ DEFUN (ip_route_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, NULL, argv[2]->arg, NULL, argv[3]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, argv[2], NULL, argv[3]); } DEFUN (ip_route_flags_vrf, @@ -1151,7 +1151,7 @@ DEFUN (ip_route_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, argv[2]->arg, NULL, NULL, argv[3]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], NULL, NULL, argv[3]); } DEFUN (ip_route_flags_tag_vrf, @@ -1169,7 +1169,7 @@ DEFUN (ip_route_flags_tag_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], argv[3], NULL, argv[4]); } DEFUN (ip_route_flags2_vrf, @@ -1182,7 +1182,7 @@ DEFUN (ip_route_flags2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, NULL, argv[1]->arg, NULL, NULL, argv[2]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], NULL, NULL, argv[2]); } DEFUN (ip_route_flags2_tag_vrf, @@ -1198,7 +1198,7 @@ DEFUN (ip_route_flags2_tag_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, NULL, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], argv[2], NULL, argv[3]); } /* Mask as A.B.C.D format. */ @@ -1214,7 +1214,7 @@ DEFUN (ip_route_mask_vrf, "Null interface\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, NULL, argv[3]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, NULL, NULL, argv[3]); } DEFUN (ip_route_mask_tag_vrf, @@ -1232,7 +1232,7 @@ DEFUN (ip_route_mask_tag_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, argv[3], NULL, argv[4]); } DEFUN (ip_route_mask_flags_vrf, @@ -1248,7 +1248,7 @@ DEFUN (ip_route_mask_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], NULL, NULL, argv[4]); } DEFUN (ip_route_mask_flags_tag_vrf, @@ -1267,7 +1267,7 @@ DEFUN (ip_route_mask_flags_tag_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, argv[5]); } DEFUN (ip_route_mask_flags2_vrf, @@ -1281,7 +1281,7 @@ DEFUN (ip_route_mask_flags2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, NULL, argv[3]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], NULL, NULL, argv[3]); } DEFUN (ip_route_mask_flags2_tag_vrf, @@ -1297,7 +1297,7 @@ DEFUN (ip_route_mask_flags2_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], argv[3], NULL, argv[4]); } /* Distance option value. */ @@ -1313,7 +1313,7 @@ DEFUN (ip_route_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, NULL, NULL, argv[2]->arg, argv[3]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, NULL, argv[2], argv[3]); } DEFUN (ip_route_tag_distance_vrf, @@ -1331,7 +1331,7 @@ DEFUN (ip_route_tag_distance_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, argv[2], argv[3], argv[4]); } DEFUN (ip_route_flags_distance_vrf, @@ -1347,7 +1347,7 @@ DEFUN (ip_route_flags_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], NULL, argv[3], argv[4]); } DEFUN (ip_route_flags_tag_distance_vrf, @@ -1365,7 +1365,7 @@ DEFUN (ip_route_flags_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg,argv[5]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], argv[3], argv[4],argv[5]); } DEFUN (ip_route_flags_distance2_vrf, @@ -1379,7 +1379,7 @@ DEFUN (ip_route_flags_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, NULL, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], NULL, argv[2], argv[3]); } DEFUN (ip_route_flags_tag_distance2_vrf, @@ -1395,7 +1395,7 @@ DEFUN (ip_route_flags_tag_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, NULL, NULL, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], argv[2], argv[3], argv[4]); } DEFUN (ip_route_mask_distance_vrf, @@ -1411,7 +1411,7 @@ DEFUN (ip_route_mask_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, NULL, argv[3], argv[4]); } DEFUN (ip_route_mask_tag_distance_vrf, @@ -1429,7 +1429,7 @@ DEFUN (ip_route_mask_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[5]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], argv[5]); } DEFUN (ip_route_mask_flags_tag_distance_vrf, @@ -1448,7 +1448,7 @@ DEFUN (ip_route_mask_flags_tag_distance_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } @@ -1466,7 +1466,7 @@ DEFUN (ip_route_mask_flags_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], argv[5]); } DEFUN (ip_route_mask_flags_distance2_vrf, @@ -1481,7 +1481,7 @@ DEFUN (ip_route_mask_flags_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], NULL, argv[3], argv[4]); } DEFUN (ip_route_mask_flags_tag_distance2_vrf, @@ -1498,7 +1498,7 @@ DEFUN (ip_route_mask_flags_tag_distance2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], argv[5]); } DEFUN (no_ip_route_vrf, @@ -1513,7 +1513,7 @@ DEFUN (no_ip_route_vrf, "Null interface\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, argv[1]->arg, NULL, NULL, NULL, argv[2]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, NULL, NULL, argv[2]); } DEFUN (no_ip_route_flags_vrf, @@ -1529,7 +1529,7 @@ DEFUN (no_ip_route_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, argv[1]->arg, argv[2]->arg, NULL, NULL, argv[3]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], NULL, NULL, argv[3]); } DEFUN (no_ip_route_tag_vrf, @@ -1546,7 +1546,7 @@ DEFUN (no_ip_route_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, argv[1]->arg, NULL, argv[2]->arg, NULL, argv[3]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, argv[2], NULL, argv[3]); } DEFUN (no_ip_route_flags_tag_vrf, @@ -1564,7 +1564,7 @@ DEFUN (no_ip_route_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], argv[3], NULL, argv[4]); } DEFUN (no_ip_route_flags2_vrf, @@ -1578,7 +1578,7 @@ DEFUN (no_ip_route_flags2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, NULL, argv[1]->arg, NULL, NULL, argv[2]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], NULL, NULL, argv[2]); } DEFUN (no_ip_route_flags2_tag_vrf, @@ -1594,7 +1594,7 @@ DEFUN (no_ip_route_flags2_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, NULL, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], argv[2], NULL, argv[3]); } DEFUN (no_ip_route_mask_vrf, @@ -1610,7 +1610,7 @@ DEFUN (no_ip_route_mask_vrf, "Null interface\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, NULL, argv[3]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, NULL, NULL, argv[3]); } DEFUN (no_ip_route_mask_flags_vrf, @@ -1627,7 +1627,7 @@ DEFUN (no_ip_route_mask_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], NULL, NULL, argv[4]); } DEFUN (no_ip_route_mask_tag_vrf, @@ -1645,7 +1645,7 @@ DEFUN (no_ip_route_mask_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, argv[3], NULL, argv[4]); } DEFUN (no_ip_route_mask_flags_tag_vrf, @@ -1664,7 +1664,7 @@ DEFUN (no_ip_route_mask_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, argv[5]); } DEFUN (no_ip_route_mask_flags2_vrf, @@ -1679,7 +1679,7 @@ DEFUN (no_ip_route_mask_flags2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, NULL, argv[3]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], NULL, NULL, argv[3]); } DEFUN (no_ip_route_mask_flags2_tag_vrf, @@ -1696,7 +1696,7 @@ DEFUN (no_ip_route_mask_flags2_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], argv[3], NULL, argv[4]); } @@ -1713,7 +1713,7 @@ DEFUN (no_ip_route_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, argv[1]->arg, NULL, NULL, argv[2]->arg, argv[3]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, NULL, argv[2], argv[3]); } DEFUN (no_ip_route_tag_distance_vrf, @@ -1731,7 +1731,7 @@ DEFUN (no_ip_route_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, argv[2], argv[3], argv[4]); } DEFUN (no_ip_route_flags_distance_vrf, @@ -1748,7 +1748,7 @@ DEFUN (no_ip_route_flags_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], NULL, argv[3], argv[4]); } DEFUN (no_ip_route_flags_tag_distance_vrf, @@ -1767,7 +1767,7 @@ DEFUN (no_ip_route_flags_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg,argv[5]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], argv[3], argv[4],argv[5]); } DEFUN (no_ip_route_flags_distance2_vrf, @@ -1782,7 +1782,7 @@ DEFUN (no_ip_route_flags_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, NULL, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], NULL, argv[2], argv[3]); } DEFUN (no_ip_route_flags_tag_distance2_vrf, @@ -1799,7 +1799,7 @@ DEFUN (no_ip_route_flags_tag_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, NULL, NULL, argv[1]->arg, argv[2]->arg , argv[3]->arg, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], argv[2] , argv[3], argv[4]); } DEFUN (no_ip_route_mask_distance_vrf, @@ -1816,7 +1816,7 @@ DEFUN (no_ip_route_mask_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, NULL, argv[3], argv[4]); } DEFUN (no_ip_route_mask_tag_distance_vrf, @@ -1835,7 +1835,7 @@ DEFUN (no_ip_route_mask_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[5]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], argv[5]); } DEFUN (no_ip_route_mask_flags_distance_vrf, @@ -1853,7 +1853,7 @@ DEFUN (no_ip_route_mask_flags_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], argv[5]); } DEFUN (no_ip_route_mask_flags_tag_distance_vrf, @@ -1873,7 +1873,7 @@ DEFUN (no_ip_route_mask_flags_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } DEFUN (no_ip_route_mask_flags_distance2_vrf, @@ -1889,7 +1889,7 @@ DEFUN (no_ip_route_mask_flags_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], NULL, argv[3], argv[4]); } DEFUN (no_ip_route_mask_flags_tag_distance2_vrf, @@ -1907,7 +1907,7 @@ DEFUN (no_ip_route_mask_flags_tag_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], argv[5]); } /* New RIB. Detailed information for IPv4 route. */ @@ -2433,7 +2433,7 @@ DEFUN (show_ip_route_vrf, if (argc == 1 && uj) return do_show_ip_route (vty, NULL, SAFI_UNICAST, uj); else - return do_show_ip_route (vty, argv[0]->arg, SAFI_UNICAST, uj); + return do_show_ip_route (vty, argv[0], SAFI_UNICAST, uj); } DEFUN (show_ip_nht, @@ -2446,7 +2446,7 @@ DEFUN (show_ip_nht, vrf_id_t vrf_id = VRF_DEFAULT; if (argc) - VRF_GET_ID (vrf_id, argv[0]->arg); + VRF_GET_ID (vrf_id, argv[0]); zebra_print_rnh_table(vrf_id, AF_INET, vty, RNH_NEXTHOP_TYPE); return CMD_SUCCESS; @@ -2491,7 +2491,7 @@ DEFUN (show_ipv6_nht, vrf_id_t vrf_id = VRF_DEFAULT; if (argc) - VRF_GET_ID (vrf_id, argv[0]->arg); + VRF_GET_ID (vrf_id, argv[0]); zebra_print_rnh_table(vrf_id, AF_INET6, vty, RNH_NEXTHOP_TYPE); return CMD_SUCCESS; @@ -2606,11 +2606,11 @@ DEFUN (show_ip_route_tag, if (argc > 1) { - tag = atoi(argv[1]->arg); - VRF_GET_ID (vrf_id, argv[0]->arg); + tag = atoi(argv[1]); + VRF_GET_ID (vrf_id, argv[0]); } else - tag = atoi(argv[0]->arg); + tag = atoi(argv[0]); table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); if (! table) @@ -2662,11 +2662,11 @@ DEFUN (show_ip_route_prefix_longer, if (argc > 1) { - ret = str2prefix (argv[1]->arg, &p); - VRF_GET_ID (vrf_id, argv[0]->arg); + ret = str2prefix (argv[1], &p); + VRF_GET_ID (vrf_id, argv[0]); } else - ret = str2prefix (argv[0]->arg, &p); + ret = str2prefix (argv[0], &p); if (! ret) { @@ -2719,7 +2719,7 @@ DEFUN (show_ip_route_supernets, vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]->arg); + VRF_GET_ID (vrf_id, argv[0]); table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); if (! table) @@ -2772,11 +2772,11 @@ DEFUN (show_ip_route_protocol, if (argc > 1) { - type = proto_redistnum (AFI_IP, argv[1]->arg); - VRF_GET_ID (vrf_id, argv[0]->arg); + type = proto_redistnum (AFI_IP, argv[1]); + VRF_GET_ID (vrf_id, argv[0]); } else - type = proto_redistnum (AFI_IP, argv[0]->arg); + type = proto_redistnum (AFI_IP, argv[0]); if (type < 0) { @@ -2827,7 +2827,7 @@ DEFUN (show_ip_route_ospf_instance, int first = 1; u_short instance = 0; - VTY_GET_INTEGER ("Instance", instance, argv[0]->arg); + VTY_GET_INTEGER ("Instance", instance, argv[0]); table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, VRF_DEFAULT); if (! table) @@ -2864,11 +2864,11 @@ DEFUN (show_ip_route_addr, if (argc > 1) { - VRF_GET_ID (vrf_id, argv[0]->arg); - ret = str2prefix_ipv4 (argv[1]->arg, &p); + VRF_GET_ID (vrf_id, argv[0]); + ret = str2prefix_ipv4 (argv[1], &p); } else - ret = str2prefix_ipv4 (argv[0]->arg, &p); + ret = str2prefix_ipv4 (argv[0], &p); if (ret <= 0) { @@ -2919,11 +2919,11 @@ DEFUN (show_ip_route_prefix, if (argc > 1) { - VRF_GET_ID (vrf_id, argv[0]->arg); - ret = str2prefix_ipv4 (argv[1]->arg, &p); + VRF_GET_ID (vrf_id, argv[0]); + ret = str2prefix_ipv4 (argv[1], &p); } else - ret = str2prefix_ipv4 (argv[0]->arg, &p); + ret = str2prefix_ipv4 (argv[0], &p); if (ret <= 0) { @@ -3120,7 +3120,7 @@ DEFUN (show_ip_route_summary, vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]->arg); + VRF_GET_ID (vrf_id, argv[0]); table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); if (! table) @@ -3154,7 +3154,7 @@ DEFUN (show_ip_route_summary_prefix, vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]->arg); + VRF_GET_ID (vrf_id, argv[0]); table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); if (! table) @@ -3239,8 +3239,8 @@ DEFUN (show_ip_route_vrf_all_tag, int vrf_header = 1; u_short tag = 0; - if (argv[0]->arg) - tag = atoi(argv[0]->arg); + if (argv[0]) + tag = atoi(argv[0]); for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter)) { @@ -3293,7 +3293,7 @@ DEFUN (show_ip_route_vrf_all_prefix_longer, int first = 1; int vrf_header = 1; - ret = str2prefix (argv[0]->arg, &p); + ret = str2prefix (argv[0], &p); if (! ret) { vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE); @@ -3402,7 +3402,7 @@ DEFUN (show_ip_route_vrf_all_protocol, int first = 1; int vrf_header = 1; - type = proto_redistnum (AFI_IP, argv[0]->arg); + type = proto_redistnum (AFI_IP, argv[0]); if (type < 0) { vty_out (vty, "Unknown route type%s", VTY_NEWLINE); @@ -3455,7 +3455,7 @@ DEFUN (show_ip_route_vrf_all_addr, struct zebra_vrf *zvrf; vrf_iter_t iter; - ret = str2prefix_ipv4 (argv[0]->arg, &p); + ret = str2prefix_ipv4 (argv[0], &p); if (ret <= 0) { vty_out (vty, "%% Malformed IPv4 address%s", VTY_NEWLINE); @@ -3496,7 +3496,7 @@ DEFUN (show_ip_route_vrf_all_prefix, struct zebra_vrf *zvrf; vrf_iter_t iter; - ret = str2prefix_ipv4 (argv[0]->arg, &p); + ret = str2prefix_ipv4 (argv[0], &p); if (ret <= 0) { vty_out (vty, "%% Malformed IPv4 address%s", VTY_NEWLINE); @@ -3755,7 +3755,7 @@ DEFUN (ipv6_route, "IPv6 gateway address\n" "IPv6 gateway interface name\n") { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, NULL, NULL, NULL, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, NULL, NULL, NULL); } DEFUN (ipv6_route_tag, @@ -3769,7 +3769,7 @@ DEFUN (ipv6_route_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, NULL, argv[2]->arg, NULL, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, argv[2], NULL, NULL); } DEFUN (ipv6_route_flags, @@ -3783,7 +3783,7 @@ DEFUN (ipv6_route_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, NULL, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], NULL, NULL, NULL); } DEFUN (ipv6_route_flags_tag, @@ -3799,7 +3799,7 @@ DEFUN (ipv6_route_flags_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, NULL, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], argv[3], NULL, NULL); } DEFUN (ipv6_route_ifname, @@ -3811,7 +3811,7 @@ DEFUN (ipv6_route_ifname, "IPv6 gateway address\n" "IPv6 gateway interface name\n") { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, NULL, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, NULL, NULL, NULL); } DEFUN (ipv6_route_ifname_tag, ipv6_route_ifname_tag_cmd, @@ -3824,7 +3824,7 @@ DEFUN (ipv6_route_ifname_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, argv[3], NULL, NULL); } DEFUN (ipv6_route_ifname_flags, @@ -3838,7 +3838,7 @@ DEFUN (ipv6_route_ifname_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, NULL, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], NULL, NULL, NULL); } DEFUN (ipv6_route_ifname_flags_tag, @@ -3854,7 +3854,7 @@ DEFUN (ipv6_route_ifname_flags_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, NULL); } DEFUN (ipv6_route_pref, @@ -3867,7 +3867,7 @@ DEFUN (ipv6_route_pref, "IPv6 gateway interface name\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, NULL, NULL, argv[2]->arg, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, NULL, argv[2], NULL); } DEFUN (ipv6_route_pref_tag, @@ -3882,7 +3882,7 @@ DEFUN (ipv6_route_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, NULL, argv[2]->arg, argv[3]->arg, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, argv[2], argv[3], NULL); } DEFUN (ipv6_route_flags_pref, @@ -3897,7 +3897,7 @@ DEFUN (ipv6_route_flags_pref, "Silently discard pkts when matched\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, argv[3]->arg, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], NULL, argv[3], NULL); } DEFUN (ipv6_route_flags_pref_tag, @@ -3914,7 +3914,7 @@ DEFUN (ipv6_route_flags_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], NULL); } DEFUN (ipv6_route_ifname_pref, @@ -3927,7 +3927,7 @@ DEFUN (ipv6_route_ifname_pref, "IPv6 gateway interface name\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, argv[3]->arg, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, NULL, argv[3], NULL); } DEFUN (ipv6_route_ifname_pref_tag, @@ -3942,7 +3942,7 @@ DEFUN (ipv6_route_ifname_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], NULL); } DEFUN (ipv6_route_ifname_flags_pref, @@ -3957,7 +3957,7 @@ DEFUN (ipv6_route_ifname_flags_pref, "Silently discard pkts when matched\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], NULL); } DEFUN (ipv6_route_ifname_flags_pref_tag, @@ -3974,7 +3974,7 @@ DEFUN (ipv6_route_ifname_flags_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], NULL); } DEFUN (no_ipv6_route, @@ -3987,7 +3987,7 @@ DEFUN (no_ipv6_route, "IPv6 gateway address\n" "IPv6 gateway interface name\n") { - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, NULL, NULL, NULL, NULL); + return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, NULL, NULL, NULL); } DEFUN (no_ipv6_route_tag, @@ -4002,7 +4002,7 @@ DEFUN (no_ipv6_route_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, NULL, argv[2]->arg, NULL, NULL); + return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, argv[2], NULL, NULL); } DEFUN (no_ipv6_route_flags, @@ -4017,7 +4017,7 @@ DEFUN (no_ipv6_route_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, NULL, NULL); + return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], NULL, NULL, NULL); } DEFUN (no_ipv6_route_flags_tag, @@ -4034,7 +4034,7 @@ DEFUN (no_ipv6_route_flags_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, NULL, NULL); + return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], argv[3], NULL, NULL); } DEFUN (no_ipv6_route_ifname, @@ -4047,7 +4047,7 @@ DEFUN (no_ipv6_route_ifname, "IPv6 gateway address\n" "IPv6 gateway interface name\n") { - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, NULL, NULL); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, NULL, NULL, NULL); } DEFUN (no_ipv6_route_ifname_tag, @@ -4062,7 +4062,7 @@ DEFUN (no_ipv6_route_ifname_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, argv[3], NULL, NULL); } DEFUN (no_ipv6_route_ifname_flags, @@ -4077,7 +4077,7 @@ DEFUN (no_ipv6_route_ifname_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, NULL, NULL); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], NULL, NULL, NULL); } DEFUN (no_ipv6_route_ifname_flags_tag, @@ -4094,7 +4094,7 @@ DEFUN (no_ipv6_route_ifname_flags_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, NULL); } DEFUN (no_ipv6_route_pref, @@ -4108,7 +4108,7 @@ DEFUN (no_ipv6_route_pref, "IPv6 gateway interface name\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, NULL, NULL, argv[2]->arg, NULL); + return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, NULL, argv[2], NULL); } DEFUN (no_ipv6_route_pref_tag, @@ -4124,7 +4124,7 @@ DEFUN (no_ipv6_route_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, NULL, argv[2]->arg, argv[3]->arg, NULL); + return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, argv[2], argv[3], NULL); } DEFUN (no_ipv6_route_flags_pref, @@ -4140,8 +4140,8 @@ DEFUN (no_ipv6_route_flags_pref, "Silently discard pkts when matched\n" "Distance value for this prefix\n") { - /* We do not care about argv[2]->arg */ - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, argv[3]->arg, NULL); + /* We do not care about argv[2] */ + return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], NULL, argv[3], NULL); } DEFUN (no_ipv6_route_flags_pref_tag, @@ -4159,8 +4159,8 @@ DEFUN (no_ipv6_route_flags_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - /* We do not care about argv[2]->arg */ - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL); + /* We do not care about argv[2] */ + return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], NULL); } DEFUN (no_ipv6_route_ifname_pref, @@ -4174,7 +4174,7 @@ DEFUN (no_ipv6_route_ifname_pref, "IPv6 gateway interface name\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, argv[3]->arg, NULL); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, NULL, argv[3], NULL); } DEFUN (no_ipv6_route_ifname_pref_tag, @@ -4190,7 +4190,7 @@ DEFUN (no_ipv6_route_ifname_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], NULL); } DEFUN (no_ipv6_route_ifname_flags_pref, @@ -4206,7 +4206,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref, "Silently discard pkts when matched\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], NULL); } DEFUN (no_ipv6_route_ifname_flags_pref_tag, @@ -4224,7 +4224,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], NULL); } DEFUN (ipv6_route_vrf, @@ -4237,7 +4237,7 @@ DEFUN (ipv6_route_vrf, "IPv6 gateway interface name\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, NULL, NULL, NULL, argv[2]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, NULL, NULL, argv[2]); } DEFUN (ipv6_route_tag_vrf, @@ -4252,7 +4252,7 @@ DEFUN (ipv6_route_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, NULL, argv[2]->arg, NULL, argv[3]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, argv[2], NULL, argv[3]); } DEFUN (ipv6_route_flags_vrf, @@ -4267,7 +4267,7 @@ DEFUN (ipv6_route_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, NULL, argv[3]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], NULL, NULL, argv[3]); } DEFUN (ipv6_route_flags_tag_vrf, @@ -4284,7 +4284,7 @@ DEFUN (ipv6_route_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], argv[3], NULL, argv[4]); } DEFUN (ipv6_route_ifname_vrf, @@ -4297,7 +4297,7 @@ DEFUN (ipv6_route_ifname_vrf, "IPv6 gateway interface name\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, NULL, argv[3]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, NULL, NULL, argv[3]); } DEFUN (ipv6_route_ifname_tag_vrf, ipv6_route_ifname_tag_vrf_cmd, @@ -4311,7 +4311,7 @@ DEFUN (ipv6_route_ifname_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[4]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, argv[3], NULL, argv[4]); } DEFUN (ipv6_route_ifname_flags_vrf, @@ -4326,7 +4326,7 @@ DEFUN (ipv6_route_ifname_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[4]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], NULL, NULL, argv[4]); } DEFUN (ipv6_route_ifname_flags_tag_vrf, @@ -4343,7 +4343,7 @@ DEFUN (ipv6_route_ifname_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, argv[5]); } DEFUN (ipv6_route_pref_vrf, @@ -4357,7 +4357,7 @@ DEFUN (ipv6_route_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, NULL, NULL, argv[2]->arg, argv[3]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, NULL, argv[2], argv[3]); } DEFUN (ipv6_route_pref_tag_vrf, @@ -4373,7 +4373,7 @@ DEFUN (ipv6_route_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, argv[2], argv[3], argv[4]); } DEFUN (ipv6_route_flags_pref_vrf, @@ -4389,7 +4389,7 @@ DEFUN (ipv6_route_flags_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], NULL, argv[3], argv[4]); } DEFUN (ipv6_route_flags_pref_tag_vrf, @@ -4407,7 +4407,7 @@ DEFUN (ipv6_route_flags_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], argv[5]); } DEFUN (ipv6_route_ifname_pref_vrf, @@ -4421,7 +4421,7 @@ DEFUN (ipv6_route_ifname_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[4]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, NULL, argv[3], argv[4]); } DEFUN (ipv6_route_ifname_pref_tag_vrf, @@ -4437,7 +4437,7 @@ DEFUN (ipv6_route_ifname_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[5]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], argv[5]); } DEFUN (ipv6_route_ifname_flags_pref_vrf, @@ -4453,7 +4453,7 @@ DEFUN (ipv6_route_ifname_flags_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], argv[5]); } DEFUN (ipv6_route_ifname_flags_pref_tag_vrf, @@ -4471,7 +4471,7 @@ DEFUN (ipv6_route_ifname_flags_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg); + return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } DEFUN (no_ipv6_route_vrf, @@ -4485,7 +4485,7 @@ DEFUN (no_ipv6_route_vrf, "IPv6 gateway interface name\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, NULL, NULL, NULL, argv[2]->arg); + return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, NULL, NULL, argv[2]); } DEFUN (no_ipv6_route_tag_vrf, @@ -4501,7 +4501,7 @@ DEFUN (no_ipv6_route_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, NULL, argv[2]->arg, NULL, argv[3]->arg); + return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, argv[2], NULL, argv[3]); } DEFUN (no_ipv6_route_flags_vrf, @@ -4517,7 +4517,7 @@ DEFUN (no_ipv6_route_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, NULL, argv[3]->arg); + return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], NULL, NULL, argv[3]); } DEFUN (no_ipv6_route_flags_tag_vrf, @@ -4535,7 +4535,7 @@ DEFUN (no_ipv6_route_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg); + return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], argv[3], NULL, argv[4]); } DEFUN (no_ipv6_route_ifname_vrf, @@ -4549,7 +4549,7 @@ DEFUN (no_ipv6_route_ifname_vrf, "IPv6 gateway interface name\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, NULL, argv[3]->arg); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, NULL, NULL, argv[3]); } DEFUN (no_ipv6_route_ifname_tag_vrf, @@ -4565,7 +4565,7 @@ DEFUN (no_ipv6_route_ifname_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[4]->arg); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, argv[3], NULL, argv[4]); } DEFUN (no_ipv6_route_ifname_flags_vrf, @@ -4581,7 +4581,7 @@ DEFUN (no_ipv6_route_ifname_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[4]->arg); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], NULL, NULL, argv[4]); } DEFUN (no_ipv6_route_ifname_flags_tag_vrf, @@ -4599,7 +4599,7 @@ DEFUN (no_ipv6_route_ifname_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, argv[5]); } DEFUN (no_ipv6_route_pref_vrf, @@ -4614,7 +4614,7 @@ DEFUN (no_ipv6_route_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, NULL, NULL, argv[2]->arg, argv[3]->arg); + return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, NULL, argv[2], argv[3]); } DEFUN (no_ipv6_route_pref_tag_vrf, @@ -4631,7 +4631,7 @@ DEFUN (no_ipv6_route_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg); + return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, argv[2], argv[3], argv[4]); } DEFUN (no_ipv6_route_flags_pref_vrf, @@ -4648,8 +4648,8 @@ DEFUN (no_ipv6_route_flags_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - /* We do not care about argv[2]->arg */ - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg); + /* We do not care about argv[2] */ + return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], NULL, argv[3], argv[4]); } DEFUN (no_ipv6_route_flags_pref_tag_vrf, @@ -4668,8 +4668,8 @@ DEFUN (no_ipv6_route_flags_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - /* We do not care about argv[2]->arg */ - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, NULL, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg); + /* We do not care about argv[2] */ + return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], argv[5]); } DEFUN (no_ipv6_route_ifname_pref_vrf, @@ -4684,7 +4684,7 @@ DEFUN (no_ipv6_route_ifname_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[4]->arg); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, NULL, argv[3], argv[4]); } DEFUN (no_ipv6_route_ifname_pref_tag_vrf, @@ -4701,7 +4701,7 @@ DEFUN (no_ipv6_route_ifname_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[5]->arg); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], argv[5]); } DEFUN (no_ipv6_route_ifname_flags_pref_vrf, @@ -4718,7 +4718,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], argv[5]); } DEFUN (no_ipv6_route_ifname_flags_pref_tag_vrf, @@ -4737,7 +4737,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0]->arg, argv[1]->arg, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg); + return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } DEFUN (show_ipv6_route, @@ -4758,14 +4758,14 @@ DEFUN (show_ipv6_route, json_object *json_prefix = NULL; u_char uj = use_json(argc, argv); - if (argc > 0 && argv[0]->arg && strcmp(argv[0]->arg, "json") != 0) + if (argc > 0 && argv[0] && strcmp(argv[0], "json") != 0) { - if (!(zvrf = zebra_vrf_list_lookup_by_name (argv[0]->arg))) + if (!(zvrf = zebra_vrf_list_lookup_by_name (argv[0]))) { if (uj) vty_out (vty, "{}%s", VTY_NEWLINE); else - vty_out (vty, "vrf %s not defined%s", argv[0]->arg, VTY_NEWLINE); + vty_out (vty, "vrf %s not defined%s", argv[0], VTY_NEWLINE); return CMD_SUCCESS; } @@ -4774,7 +4774,7 @@ DEFUN (show_ipv6_route, if (uj) vty_out (vty, "{}%s", VTY_NEWLINE); else - vty_out (vty, "vrf %s inactive%s", argv[0]->arg, VTY_NEWLINE); + vty_out (vty, "vrf %s inactive%s", argv[0], VTY_NEWLINE); return CMD_SUCCESS; } else @@ -4860,11 +4860,11 @@ DEFUN (show_ipv6_route_tag, if (argc > 1) { - VRF_GET_ID (vrf_id, argv[0]->arg); - tag = atoi(argv[1]->arg); + VRF_GET_ID (vrf_id, argv[0]); + tag = atoi(argv[1]); } else - tag = atoi(argv[0]->arg); + tag = atoi(argv[0]); table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id); if (! table) @@ -4916,11 +4916,11 @@ DEFUN (show_ipv6_route_prefix_longer, if (argc > 1) { - VRF_GET_ID (vrf_id, argv[0]->arg); - ret = str2prefix (argv[1]->arg, &p); + VRF_GET_ID (vrf_id, argv[0]); + ret = str2prefix (argv[1], &p); } else - ret = str2prefix (argv[0]->arg, &p); + ret = str2prefix (argv[0], &p); if (! ret) { @@ -4974,11 +4974,11 @@ DEFUN (show_ipv6_route_protocol, if ( argc >1 ) { - VRF_GET_ID (vrf_id, argv[0]->arg); - type = proto_redistnum (AFI_IP6, argv[1]->arg); + VRF_GET_ID (vrf_id, argv[0]); + type = proto_redistnum (AFI_IP6, argv[1]); } else - type = proto_redistnum (AFI_IP6, argv[0]->arg); + type = proto_redistnum (AFI_IP6, argv[0]); if (type < 0) { @@ -5030,11 +5030,11 @@ DEFUN (show_ipv6_route_addr, if (argc > 1 ) { - VRF_GET_ID (vrf_id, argv[0]->arg); - ret = str2prefix_ipv6 (argv[1]->arg, &p); + VRF_GET_ID (vrf_id, argv[0]); + ret = str2prefix_ipv6 (argv[1], &p); } else - ret = str2prefix_ipv6 (argv[0]->arg, &p); + ret = str2prefix_ipv6 (argv[0], &p); if (ret <= 0) { @@ -5085,11 +5085,11 @@ DEFUN (show_ipv6_route_prefix, if (argc > 1) { - VRF_GET_ID (vrf_id, argv[0]->arg); - ret = str2prefix_ipv6 (argv[1]->arg, &p); + VRF_GET_ID (vrf_id, argv[0]); + ret = str2prefix_ipv6 (argv[1], &p); } else - ret = str2prefix_ipv6 (argv[0]->arg, &p); + ret = str2prefix_ipv6 (argv[0], &p); if (ret <= 0) { @@ -5137,7 +5137,7 @@ DEFUN (show_ipv6_route_summary, vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]->arg); + VRF_GET_ID (vrf_id, argv[0]); table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id); if (! table) @@ -5171,7 +5171,7 @@ DEFUN (show_ipv6_route_summary_prefix, vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]->arg); + VRF_GET_ID (vrf_id, argv[0]); table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id); if (! table) @@ -5211,7 +5211,7 @@ DEFUN (show_ipv6_mroute, vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]->arg); + VRF_GET_ID (vrf_id, argv[0]); table = zebra_vrf_table (AFI_IP6, SAFI_MULTICAST, vrf_id); if (! table) @@ -5303,8 +5303,8 @@ DEFUN (show_ipv6_route_vrf_all_tag, int vrf_header = 1; u_short tag = 0; - if (argv[0]->arg) - tag = atoi(argv[0]->arg); + if (argv[0]) + tag = atoi(argv[0]); for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter)) { @@ -5358,7 +5358,7 @@ DEFUN (show_ipv6_route_vrf_all_prefix_longer, int first = 1; int vrf_header = 1; - ret = str2prefix (argv[0]->arg, &p); + ret = str2prefix (argv[0], &p); if (! ret) { vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE); @@ -5413,7 +5413,7 @@ DEFUN (show_ipv6_route_vrf_all_protocol, int first = 1; int vrf_header = 1; - type = proto_redistnum (AFI_IP6, argv[0]->arg); + type = proto_redistnum (AFI_IP6, argv[0]); if (type < 0) { vty_out (vty, "Unknown route type%s", VTY_NEWLINE); @@ -5466,7 +5466,7 @@ DEFUN (show_ipv6_route_vrf_all_addr, struct zebra_vrf *zvrf; vrf_iter_t iter; - ret = str2prefix_ipv6 (argv[0]->arg, &p); + ret = str2prefix_ipv6 (argv[0], &p); if (ret <= 0) { vty_out (vty, "Malformed IPv6 address%s", VTY_NEWLINE); @@ -5507,7 +5507,7 @@ DEFUN (show_ipv6_route_vrf_all_prefix, struct zebra_vrf *zvrf; vrf_iter_t iter; - ret = str2prefix_ipv6 (argv[0]->arg, &p); + ret = str2prefix_ipv6 (argv[0], &p); if (ret <= 0) { vty_out (vty, "Malformed IPv6 prefix%s", VTY_NEWLINE); @@ -5751,7 +5751,7 @@ DEFUN (ip_zebra_import_table_distance, int distance = ZEBRA_TABLE_DISTANCE_DEFAULT; if (argc) - VTY_GET_INTEGER("table", table_id, argv[0]->arg); + VTY_GET_INTEGER("table", table_id, argv[0]); if (!is_zebra_valid_kernel_table(table_id)) { @@ -5768,7 +5768,7 @@ DEFUN (ip_zebra_import_table_distance, } if (argc > 1) - VTY_GET_INTEGER_RANGE("distance", distance, argv[1]->arg, 1, 255); + VTY_GET_INTEGER_RANGE("distance", distance, argv[1], 1, 255); return (zebra_import_table(AFI_IP, table_id, distance, NULL, 1)); } @@ -5796,7 +5796,7 @@ DEFUN (ip_zebra_import_table_distance_routemap, const char *rmap_name; if (argc) - VTY_GET_INTEGER("table", table_id, argv[0]->arg); + VTY_GET_INTEGER("table", table_id, argv[0]); if (!is_zebra_valid_kernel_table(table_id)) { @@ -5814,11 +5814,11 @@ DEFUN (ip_zebra_import_table_distance_routemap, if (argc > 2) { - VTY_GET_INTEGER_RANGE("distance", distance, argv[1]->arg, 1, 255); - rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[2]->arg); + VTY_GET_INTEGER_RANGE("distance", distance, argv[1], 1, 255); + rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[2]); } else - rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]->arg); + rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]); return (zebra_import_table(AFI_IP, table_id, distance, rmap_name, 1)); } @@ -5843,7 +5843,7 @@ DEFUN (no_ip_zebra_import_table, u_int32_t table_id = 0; if (argc) - VTY_GET_INTEGER("table", table_id, argv[0]->arg); + VTY_GET_INTEGER("table", table_id, argv[0]); if (!is_zebra_valid_kernel_table(table_id)) { diff --git a/zebra/zserv.c b/zebra/zserv.c index c05858835..3402bf1df 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -2263,7 +2263,7 @@ DEFUN (config_table, "Configure target kernel routing table\n" "TABLE integer\n") { - zebrad.rtm_table_default = strtol (argv[0]->arg, (char**)0, 10); + zebrad.rtm_table_default = strtol (argv[0], (char**)0, 10); return CMD_SUCCESS; } -- cgit v1.2.3 From bcff2289ed40d7715011ba6cd01fe78c5e0f4108 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Thu, 22 Sep 2016 18:23:21 +0000 Subject: Revert "lib, zebra: Fixup if.c to work in the new regime" This reverts commit 2511cb40e6b0e88620f26b3506b2a454a773c93d. --- lib/if.c | 77 +++++++++++++++++++++++++++++++++++-------------------- lib/if.h | 3 +++ lib/vrf.h | 2 +- zebra/interface.c | 1 + 4 files changed, 54 insertions(+), 29 deletions(-) (limited to 'zebra') diff --git a/lib/if.c b/lib/if.c index 01baa5392..bd6079c0f 100644 --- a/lib/if.c +++ b/lib/if.c @@ -750,37 +750,36 @@ if_sunwzebra_get (const char *name, size_t nlen, vrf_id_t vrf_id) DEFUN (interface, interface_cmd, - "interface IFNAME" VRF_CMD_STR_OPT, + "interface IFNAME", "Select an interface to configure\n" - "Interface's name\n" - VRF_CMD_HELP_STR) + "Interface's name\n") { struct interface *ifp; size_t sl; vrf_id_t vrf_id = VRF_DEFAULT; - if ((sl = strlen(argv[0]->arg)) > INTERFACE_NAMSIZ) + if ((sl = strlen(argv[0])) > INTERFACE_NAMSIZ) { vty_out (vty, "%% Interface name %s is invalid: length exceeds " "%d characters%s", - argv[0]->arg, INTERFACE_NAMSIZ, VTY_NEWLINE); + argv[0], INTERFACE_NAMSIZ, VTY_NEWLINE); return CMD_WARNING; } /*Pending: need proper vrf name based lookup/(possible creation of VRF) Imagine forward reference of a vrf by name in this interface config */ if (argc > 1) - VRF_GET_ID (vrf_id, argv[1]->arg); + VRF_GET_ID (vrf_id, argv[1]); #ifdef SUNOS_5 - ifp = if_sunwzebra_get (argv[0]->arg, sl, vrf_id); + ifp = if_sunwzebra_get (argv[0], sl, vrf_id); #else - ifp = if_get_by_name_len_vrf (argv[0]->arg, sl, vrf_id, 1); + ifp = if_get_by_name_len_vrf (argv[0], sl, vrf_id, 1); #endif /* SUNOS_5 */ if (!ifp) { - vty_out (vty, "%% interface %s not in %s%s", argv[0]->arg, argv[1]->arg, VTY_NEWLINE); + vty_out (vty, "%% interface %s not in %s%s", argv[0], argv[1], VTY_NEWLINE); return CMD_WARNING; } vty->index = ifp; @@ -789,26 +788,32 @@ DEFUN (interface, return CMD_SUCCESS; } +ALIAS (interface, + interface_vrf_cmd, + "interface IFNAME " VRF_CMD_STR, + "Select an interface to configure\n" + "Interface's name\n" + VRF_CMD_HELP_STR) + DEFUN_NOSH (no_interface, no_interface_cmd, - "no interface IFNAME" VRF_CMD_STR_OPT, + "no interface IFNAME", NO_STR "Delete a pseudo interface's configuration\n" - "Interface's name\n" - VRF_CMD_HELP_STR) + "Interface's name\n") { // deleting interface struct interface *ifp; vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 1) - VRF_GET_ID (vrf_id, argv[1]->arg); + VRF_GET_ID (vrf_id, argv[1]); - ifp = if_lookup_by_name_vrf (argv[0]->arg, vrf_id); + ifp = if_lookup_by_name_vrf (argv[0], vrf_id); if (ifp == NULL) { - vty_out (vty, "%% Interface %s does not exist%s", argv[0]->arg, VTY_NEWLINE); + vty_out (vty, "%% Interface %s does not exist%s", argv[0], VTY_NEWLINE); return CMD_WARNING; } @@ -824,23 +829,32 @@ DEFUN_NOSH (no_interface, return CMD_SUCCESS; } +ALIAS (no_interface, + no_interface_vrf_cmd, + "no interface IFNAME " VRF_CMD_STR, + NO_STR + "Delete a pseudo interface's configuration\n" + "Interface's name\n" + VRF_CMD_HELP_STR) + DEFUN (vrf, vrf_cmd, - VRF_CMD_STR, - VRF_CMD_HELP_STR) + "vrf NAME", + "Select a VRF to configure\n" + "VRF's name\n") { struct vrf *vrfp; size_t sl; - if ((sl = strlen(argv[0]->arg)) > VRF_NAMSIZ) + if ((sl = strlen(argv[0])) > VRF_NAMSIZ) { vty_out (vty, "%% VRF name %s is invalid: length exceeds " "%d characters%s", - argv[0]->arg, VRF_NAMSIZ, VTY_NEWLINE); + argv[0], VRF_NAMSIZ, VTY_NEWLINE); return CMD_WARNING; } - vrfp = vrf_get (VRF_UNKNOWN, argv[0]->arg); + vrfp = vrf_get (VRF_UNKNOWN, argv[0]); vty->index = vrfp; vty->node = VRF_NODE; @@ -850,17 +864,18 @@ DEFUN (vrf, DEFUN_NOSH (no_vrf, no_vrf_cmd, - "no " VRF_CMD_STR, + "no vrf NAME", NO_STR - VRF_CMD_HELP_STR) + "Delete a pseudo VRF's configuration\n" + "VRF's name\n") { struct vrf *vrfp; - vrfp = vrf_list_lookup_by_name (argv[0]->arg); + vrfp = vrf_list_lookup_by_name (argv[0]); if (vrfp == NULL) { - vty_out (vty, "%% VRF %s does not exist%s", argv[0]->arg, VTY_NEWLINE); + vty_out (vty, "%% VRF %s does not exist%s", argv[0], VTY_NEWLINE); return CMD_WARNING; } @@ -880,10 +895,9 @@ DEFUN_NOSH (no_vrf, /* For debug purpose. */ DEFUN (show_address, show_address_cmd, - "show address" VRF_CMD_STR_OPT, + "show address", SHOW_STR - "address\n" - VRF_CMD_HELP_STR) + "address\n") { struct listnode *node; struct listnode *node2; @@ -893,7 +907,7 @@ DEFUN (show_address, vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]->arg); + VRF_GET_ID (vrf_id, argv[0]); for (ALL_LIST_ELEMENTS_RO (vrf_iflist (vrf_id), node, ifp)) { @@ -909,6 +923,13 @@ DEFUN (show_address, return CMD_SUCCESS; } +ALIAS (show_address, + show_address_vrf_cmd, + "show address " VRF_CMD_STR, + SHOW_STR + "address\n" + VRF_CMD_HELP_STR) + DEFUN (show_address_vrf_all, show_address_vrf_all_cmd, "show address " VRF_ALL_CMD_STR, diff --git a/lib/if.h b/lib/if.h index 4913d8c8b..d1875e695 100644 --- a/lib/if.h +++ b/lib/if.h @@ -491,9 +491,12 @@ extern struct cmd_element interface_desc_cmd; extern struct cmd_element no_interface_desc_cmd; extern struct cmd_element interface_cmd; extern struct cmd_element no_interface_cmd; +extern struct cmd_element interface_vrf_cmd; +extern struct cmd_element no_interface_vrf_cmd; extern struct cmd_element interface_pseudo_cmd; extern struct cmd_element no_interface_pseudo_cmd; extern struct cmd_element show_address_cmd; +extern struct cmd_element show_address_vrf_cmd; extern struct cmd_element show_address_vrf_all_cmd; extern struct cmd_element vrf_cmd; extern struct cmd_element no_vrf_cmd; diff --git a/lib/vrf.h b/lib/vrf.h index c4260769a..dcc115563 100644 --- a/lib/vrf.h +++ b/lib/vrf.h @@ -50,7 +50,7 @@ enum { /* * The command strings */ -#define VRF_CMD_STR_OPT "[vrf NAME]" + #define VRF_CMD_STR "vrf NAME" #define VRF_CMD_HELP_STR "Specify the VRF\nThe VRF name\n" diff --git a/zebra/interface.c b/zebra/interface.c index 0546cb8f9..9be97e221 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -2960,6 +2960,7 @@ zebra_if_init (void) install_element (CONFIG_NODE, &zebra_interface_cmd); install_element (CONFIG_NODE, &zebra_interface_vrf_cmd); install_element (CONFIG_NODE, &no_interface_cmd); + install_element (CONFIG_NODE, &no_interface_vrf_cmd); install_default (INTERFACE_NODE); install_element (INTERFACE_NODE, &interface_desc_cmd); install_element (INTERFACE_NODE, &no_interface_desc_cmd); -- cgit v1.2.3 From 8b3f0677108242c08a944cc9c114011958410809 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Thu, 22 Sep 2016 20:00:23 +0000 Subject: zebra: argv update for all but zebra_vty.c Signed-off-by: Daniel Walton --- tools/argv_translator.py | 24 ++- zebra/debug.c | 22 +-- zebra/interface.c | 69 +++---- zebra/irdp_interface.c | 18 +- zebra/router-id.c | 2 +- zebra/rtadv.c | 33 ++-- zebra/test_main.c | 2 +- zebra/zebra_routemap.c | 90 ++++----- zebra/zebra_vty.c | 476 +++++++++++++++++++++++------------------------ 9 files changed, 378 insertions(+), 358 deletions(-) (limited to 'zebra') diff --git a/tools/argv_translator.py b/tools/argv_translator.py index 8547715d3..f21e99d08 100755 --- a/tools/argv_translator.py +++ b/tools/argv_translator.py @@ -30,6 +30,11 @@ def token_is_variable(line_number, token): if token in ('WORD', '.LINE', # where is this defined? 'LINE', + 'BANDWIDTH', + 'INTERFACE', + 'PERCENTAGE', + 'IFNAME', + 'NAME', 'BITPATTERN', 'PATH', 'A.B.C.D', @@ -133,12 +138,15 @@ def get_argv_translator(line_number, line): old_style_index = 0 for (token_index, token) in enumerate(line_to_tokens(line)): + if not token: + continue + if token_is_variable(line_number, token): - # print "%s is a token" % token + print "%s is a token" % token table[old_style_index] = token_index old_style_index += 1 else: - # print "%s is NOT a token" % token + print "%s is NOT a token" % token pass return table @@ -159,7 +167,7 @@ def update_argvs(filename): if state is None: if line.startswith('DEFUN ('): - assert line.count(',') == 1, "Too many commas in\n%s" % line + assert line.count(',') == 1, "%d: Too many commas in\n%s" % (line_number, line) state = 'DEFUN_HEADER' defun_line_number = line_number @@ -185,6 +193,10 @@ def update_argvs(filename): line = line.replace('" QUAGGA_IP6_REDIST_STR_BGPD "', '(kernel|connected|static|ripng|ospf6|isis|table)') line = line.replace('" OSPF_LSA_TYPES_CMD_STR "', 'asbr-summary|external|network|router|summary|nssa-external|opaque-link|opaque-area|opaque-as') line = line.replace('" QUAGGA_REDIST_STR_OSPFD "', '(kernel|connected|static|rip|isis|bgp|pim|table)') + line = line.replace('" VRF_CMD_STR "', 'vrf NAME') + line = line.replace('" VRF_ALL_CMD_STR "', 'vrf all') + line = line.replace('" QUAGGA_IP_PROTOCOL_MAP_STR_ZEBRA "', '(kernel|connected|static|rip|ospf|isis|bgp|pim|table|any)') + line = line.replace('" QUAGGA_IP6_PROTOCOL_MAP_STR_ZEBRA "', '(kernel|connected|static|ripng|ospf6|isis|bgp|table|any)') # endswith line = line.replace('" CMD_AS_RANGE,', ' <1-4294967295>",') @@ -201,6 +213,12 @@ def update_argvs(filename): line = line.replace('" QUAGGA_IP_REDIST_STR_BGPD,', ' (kernel|connected|static|rip|ospf|isis|pim|table)",') line = line.replace('" QUAGGA_IP6_REDIST_STR_BGPD,', ' (kernel|connected|static|ripng|ospf6|isis|table)",') line = line.replace('" QUAGGA_REDIST_STR_OSPFD,', ' (kernel|connected|static|rip|isis|bgp|pim|table)",') + line = line.replace('" VRF_CMD_STR,', ' vrf NAME",') + line = line.replace('" VRF_ALL_CMD_STR,', ' vrf all",') + line = line.replace('" QUAGGA_IP_REDIST_STR_ZEBRA,', ' (kernel|connected|static|rip|ospf|isis|bgp|pim|table)",') + line = line.replace('" QUAGGA_IP6_REDIST_STR_ZEBRA,', ' (kernel|connected|static|ripng|ospf6|isis|bgp|table)",') + line = line.replace('" QUAGGA_IP_PROTOCOL_MAP_STR_ZEBRA,', ' (kernel|connected|static|rip|ospf|isis|bgp|pim|table|any)",') + line = line.replace('" QUAGGA_IP6_PROTOCOL_MAP_STR_ZEBRA,', ' (kernel|connected|static|ripng|ospf6|isis|bgp|table|any)",') # startswith line = line.replace('LISTEN_RANGE_CMD "', '"bgp listen range (A.B.C.D/M|X:X::X:X/M) ') diff --git a/zebra/debug.c b/zebra/debug.c index cdf233879..fb3887c67 100644 --- a/zebra/debug.c +++ b/zebra/debug.c @@ -131,11 +131,11 @@ DEFUN (debug_zebra_packet_direct, "Debug option set for send packet\n") { zebra_debug_packet = ZEBRA_DEBUG_PACKET; - if (strncmp ("send", argv[0], strlen (argv[0])) == 0) + if (strncmp ("send", argv[3]->arg, strlen (argv[3]->arg)) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND); - if (strncmp ("recv", argv[0], strlen (argv[0])) == 0) + if (strncmp ("recv", argv[3]->arg, strlen (argv[3]->arg)) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV); - if (strncmp ("detail", argv[0], strlen (argv[0])) == 0) + if (strncmp ("detail", argv[3]->arg, strlen (argv[3]->arg)) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_DETAIL); return CMD_SUCCESS; } @@ -151,9 +151,9 @@ DEFUN (debug_zebra_packet_detail, "Debug option set detailed information\n") { zebra_debug_packet = ZEBRA_DEBUG_PACKET; - if (strncmp ("send", argv[0], strlen (argv[0])) == 0) + if (strncmp ("send", argv[3]->arg, strlen (argv[3]->arg)) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND); - if (strncmp ("recv", argv[0], strlen (argv[0])) == 0) + if (strncmp ("recv", argv[3]->arg, strlen (argv[3]->arg)) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV); SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_DETAIL); return CMD_SUCCESS; @@ -180,9 +180,9 @@ DEFUN (debug_zebra_kernel_msgdump, "Dump raw netlink messages received\n" "Dump raw netlink messages sent\n") { - if (!argv[1] || (argv[0] && strncmp(argv[0], "recv", strlen(argv[0])) == 0)) + if (argv[4]->arg && strncmp(argv[4]->arg, "recv", strlen(argv[4]->arg)) == 0) SET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV); - if (!argv[0] || (argv[1] && strncmp(argv[1], "send", strlen(argv[1])) == 0)) + if (!argv[4]->arg || strncmp(argv[4]->arg, "send", strlen(argv[4]->arg)) == 0) SET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND); return CMD_SUCCESS; } @@ -267,9 +267,9 @@ DEFUN (no_debug_zebra_packet_direct, "Debug option set for receive packet\n" "Debug option set for send packet\n") { - if (strncmp ("send", argv[0], strlen (argv[0])) == 0) + if (strncmp ("send", argv[4]->arg, strlen (argv[4]->arg)) == 0) UNSET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND); - if (strncmp ("recv", argv[0], strlen (argv[0])) == 0) + if (strncmp ("recv", argv[4]->arg, strlen (argv[4]->arg)) == 0) UNSET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV); return CMD_SUCCESS; } @@ -296,9 +296,9 @@ DEFUN (no_debug_zebra_kernel_msgdump, "Dump raw netlink messages received\n" "Dump raw netlink messages sent\n") { - if (!argv[1] || (argv[0] && strncmp(argv[0], "recv", strlen(argv[0])) == 0)) + if (!argv[1] || (argv[5]->arg && strncmp(argv[5]->arg, "recv", strlen(argv[5]->arg)) == 0)) UNSET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV); - if (!argv[0] || (argv[1] && strncmp(argv[1], "send", strlen(argv[1])) == 0)) + if (!argv[5]->arg || (argv[5]->arg && strncmp(argv[5]->arg, "send", strlen(argv[5]->arg)) == 0)) UNSET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND); return CMD_SUCCESS; } diff --git a/zebra/interface.c b/zebra/interface.c index 9be97e221..737bf9665 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1305,7 +1305,8 @@ struct cmd_node vrf_node = }; /* Show all interfaces to vty. */ -DEFUN (show_interface, show_interface_cmd, +DEFUN (show_interface, + show_interface_cmd, "show interface", SHOW_STR "Interface status and configuration\n") @@ -1317,7 +1318,7 @@ DEFUN (show_interface, show_interface_cmd, interface_update_stats (); if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[2]->arg); /* All interface print. */ for (ALL_LIST_ELEMENTS_RO (vrf_iflist (vrf_id), node, ifp)) @@ -1334,7 +1335,8 @@ ALIAS (show_interface, VRF_CMD_HELP_STR) /* Show all interfaces to vty. */ -DEFUN (show_interface_vrf_all, show_interface_vrf_all_cmd, +DEFUN (show_interface_vrf_all, + show_interface_vrf_all_cmd, "show interface " VRF_ALL_CMD_STR, SHOW_STR "Interface status and configuration\n" @@ -1370,13 +1372,13 @@ DEFUN (show_interface_name_vrf, interface_update_stats (); if (argc > 1) - VRF_GET_ID (vrf_id, argv[1]); + VRF_GET_ID (vrf_id, argv[3]->arg); /* Specified interface print. */ - ifp = if_lookup_by_name_vrf (argv[0], vrf_id); + ifp = if_lookup_by_name_vrf (argv[2]->arg, vrf_id); if (ifp == NULL) { - vty_out (vty, "%% Can't find interface %s%s", argv[0], + vty_out (vty, "%% Can't find interface %s%s", argv[2]->arg, VTY_NEWLINE); return CMD_WARNING; } @@ -1386,7 +1388,8 @@ DEFUN (show_interface_name_vrf, } /* Show specified interface to vty. */ -DEFUN (show_interface_name_vrf_all, show_interface_name_vrf_all_cmd, +DEFUN (show_interface_name_vrf_all, + show_interface_name_vrf_all_cmd, "show interface IFNAME " VRF_ALL_CMD_STR, SHOW_STR "Interface status and configuration\n" @@ -1403,7 +1406,7 @@ DEFUN (show_interface_name_vrf_all, show_interface_name_vrf_all_cmd, for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter)) { /* Specified interface print. */ - ifp = if_lookup_by_name_vrf (argv[0], vrf_iter2id (iter)); + ifp = if_lookup_by_name_vrf (argv[2]->arg, vrf_iter2id (iter)); if (ifp) { if_dump_vty (vty, ifp); @@ -1413,7 +1416,7 @@ DEFUN (show_interface_name_vrf_all, show_interface_name_vrf_all_cmd, if (!found) { - vty_out (vty, "%% Can't find interface %s%s", argv[0], VTY_NEWLINE); + vty_out (vty, "%% Can't find interface %s%s", argv[2]->arg, VTY_NEWLINE); return CMD_WARNING; } @@ -1476,7 +1479,7 @@ DEFUN (show_interface_desc, vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[3]->arg); if_show_description (vty, vrf_id); @@ -1679,7 +1682,7 @@ DEFUN (bandwidth_if, unsigned int bandwidth; ifp = (struct interface *) vty->index; - bandwidth = strtol(argv[0], NULL, 10); + bandwidth = strtol(argv[1]->arg, NULL, 10); /* bandwidth range is <1-100000> */ if (bandwidth < 1 || bandwidth > 100000) @@ -1843,7 +1846,7 @@ DEFUN (link_params_metric, struct if_link_params *iflp = if_link_params_get (ifp); u_int32_t metric; - VTY_GET_ULONG("metric", metric, argv[0]); + VTY_GET_ULONG("metric", metric, argv[1]->arg); /* Update TE metric if needed */ link_param_cmd_set_uint32 (ifp, &iflp->te_metric, LP_TE, metric); @@ -1876,7 +1879,7 @@ DEFUN (link_params_maxbw, float bw; - if (sscanf (argv[0], "%g", &bw) != 1) + if (sscanf (argv[1]->arg, "%g", &bw) != 1) { vty_out (vty, "link_params_maxbw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -1919,7 +1922,7 @@ DEFUN (link_params_max_rsv_bw, struct if_link_params *iflp = if_link_params_get (ifp); float bw; - if (sscanf (argv[0], "%g", &bw) != 1) + if (sscanf (argv[1]->arg, "%g", &bw) != 1) { vty_out (vty, "link_params_max_rsv_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -1954,14 +1957,14 @@ DEFUN (link_params_unrsv_bw, float bw; /* We don't have to consider about range check here. */ - if (sscanf (argv[0], "%d", &priority) != 1) + if (sscanf (argv[1]->arg, "%d", &priority) != 1) { vty_out (vty, "link_params_unrsv_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); return CMD_WARNING; } - if (sscanf (argv[1], "%g", &bw) != 1) + if (sscanf (argv[2]->arg, "%g", &bw) != 1) { vty_out (vty, "link_params_unrsv_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -1993,7 +1996,7 @@ DEFUN (link_params_admin_grp, struct if_link_params *iflp = if_link_params_get (ifp); unsigned long value; - if (sscanf (argv[0], "0x%lx", &value) != 1) + if (sscanf (argv[1]->arg, "0x%lx", &value) != 1) { vty_out (vty, "link_params_admin_grp: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2035,13 +2038,13 @@ DEFUN (link_params_inter_as, struct in_addr addr; u_int32_t as; - if (!inet_aton (argv[0], &addr)) + if (!inet_aton (argv[1]->arg, &addr)) { vty_out (vty, "Please specify Router-Addr by A.B.C.D%s", VTY_NEWLINE); return CMD_WARNING; } - VTY_GET_ULONG("AS number", as, argv[1]); + VTY_GET_ULONG("AS number", as, argv[3]->arg); /* Update Remote IP and Remote AS fields if needed */ if (IS_PARAM_UNSET(iflp, LP_RMT_AS) @@ -2096,7 +2099,7 @@ DEFUN (link_params_delay, u_int8_t update = 0; /* Get and Check new delay values */ - VTY_GET_ULONG("delay", delay, argv[0]); + VTY_GET_ULONG("delay", delay, argv[1]->arg); switch (argc) { case 1: @@ -2130,8 +2133,8 @@ DEFUN (link_params_delay, return CMD_WARNING; break; case 3: - VTY_GET_ULONG("minimum delay", low, argv[1]); - VTY_GET_ULONG("maximum delay", high, argv[2]); + VTY_GET_ULONG("minimum delay", low, argv[3]->arg); + VTY_GET_ULONG("maximum delay", high, argv[5]->arg); /* Check new delays value coherency */ if (delay <= low || delay >= high) { @@ -2209,7 +2212,7 @@ DEFUN (link_params_delay_var, struct if_link_params *iflp = if_link_params_get (ifp); u_int32_t value; - VTY_GET_ULONG("delay variation", value, argv[0]); + VTY_GET_ULONG("delay variation", value, argv[1]->arg); /* Update Delay Variation if needed */ link_param_cmd_set_uint32 (ifp, &iflp->delay_var, LP_DELAY_VAR, value); @@ -2241,7 +2244,7 @@ DEFUN (link_params_pkt_loss, struct if_link_params *iflp = if_link_params_get (ifp); float fval; - if (sscanf (argv[0], "%g", &fval) != 1) + if (sscanf (argv[1]->arg, "%g", &fval) != 1) { vty_out (vty, "link_params_pkt_loss: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2281,7 +2284,7 @@ DEFUN (link_params_res_bw, struct if_link_params *iflp = if_link_params_get (ifp); float bw; - if (sscanf (argv[0], "%g", &bw) != 1) + if (sscanf (argv[1]->arg, "%g", &bw) != 1) { vty_out (vty, "link_params_res_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2327,7 +2330,7 @@ DEFUN (link_params_ava_bw, struct if_link_params *iflp = if_link_params_get (ifp); float bw; - if (sscanf (argv[0], "%g", &bw) != 1) + if (sscanf (argv[1]->arg, "%g", &bw) != 1) { vty_out (vty, "link_params_ava_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2373,7 +2376,7 @@ DEFUN (link_params_use_bw, struct if_link_params *iflp = if_link_params_get (ifp); float bw; - if (sscanf (argv[0], "%g", &bw) != 1) + if (sscanf (argv[1]->arg, "%g", &bw) != 1) { vty_out (vty, "link_params_use_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2557,7 +2560,7 @@ DEFUN (ip_address, "Set the IP address of an interface\n" "IP address (e.g. 10.0.0.1/8)\n") { - return ip_address_install (vty, vty->index, argv[0], NULL, NULL); + return ip_address_install (vty, vty->index, argv[2]->arg, NULL, NULL); } DEFUN (no_ip_address, @@ -2568,7 +2571,7 @@ DEFUN (no_ip_address, "Set the IP address of an interface\n" "IP Address (e.g. 10.0.0.1/8)") { - return ip_address_uninstall (vty, vty->index, argv[0], NULL, NULL); + return ip_address_uninstall (vty, vty->index, argv[3]->arg, NULL, NULL); } @@ -2582,7 +2585,7 @@ DEFUN (ip_address_label, "Label of this address\n" "Label\n") { - return ip_address_install (vty, vty->index, argv[0], NULL, argv[1]); + return ip_address_install (vty, vty->index, argv[2]->arg, NULL, argv[4]->arg); } DEFUN (no_ip_address_label, @@ -2595,7 +2598,7 @@ DEFUN (no_ip_address_label, "Label of this address\n" "Label\n") { - return ip_address_uninstall (vty, vty->index, argv[0], NULL, argv[1]); + return ip_address_uninstall (vty, vty->index, argv[3]->arg, NULL, argv[5]->arg); } #endif /* HAVE_NETLINK */ @@ -2758,7 +2761,7 @@ DEFUN (ipv6_address, "Set the IP address of an interface\n" "IPv6 address (e.g. 3ffe:506::1/48)\n") { - return ipv6_address_install (vty, vty->index, argv[0], NULL, NULL, 0); + return ipv6_address_install (vty, vty->index, argv[2]->arg, NULL, NULL, 0); } DEFUN (no_ipv6_address, @@ -2769,7 +2772,7 @@ DEFUN (no_ipv6_address, "Set the IP address of an interface\n" "IPv6 address (e.g. 3ffe:506::1/48)\n") { - return ipv6_address_uninstall (vty, vty->index, argv[0], NULL, NULL, 0); + return ipv6_address_uninstall (vty, vty->index, argv[3]->arg, NULL, NULL, 0); } #endif /* HAVE_IPV6 */ diff --git a/zebra/irdp_interface.c b/zebra/irdp_interface.c index 8fb4fcad1..d41373369 100644 --- a/zebra/irdp_interface.c +++ b/zebra/irdp_interface.c @@ -480,7 +480,7 @@ DEFUN (ip_irdp_holdtime, zi=ifp->info; irdp=&zi->irdp; - irdp->Lifetime = atoi(argv[0]); + irdp->Lifetime = atoi(argv[3]->arg); return CMD_SUCCESS; } @@ -503,8 +503,8 @@ DEFUN (ip_irdp_minadvertinterval, zi=ifp->info; irdp=&zi->irdp; - if( (unsigned) atoi(argv[0]) <= irdp->MaxAdvertInterval) { - irdp->MinAdvertInterval = atoi(argv[0]); + if( (unsigned) atoi(argv[3]->arg) <= irdp->MaxAdvertInterval) { + irdp->MinAdvertInterval = atoi(argv[3]->arg); return CMD_SUCCESS; } @@ -537,8 +537,8 @@ DEFUN (ip_irdp_maxadvertinterval, irdp=&zi->irdp; - if( irdp->MinAdvertInterval <= (unsigned) atoi(argv[0]) ) { - irdp->MaxAdvertInterval = atoi(argv[0]); + if( irdp->MinAdvertInterval <= (unsigned) atoi(argv[3]->arg) ) { + irdp->MaxAdvertInterval = atoi(argv[3]->arg); return CMD_SUCCESS; } @@ -575,7 +575,7 @@ DEFUN (ip_irdp_preference, zi=ifp->info; irdp=&zi->irdp; - irdp->Preference = atoi(argv[0]); + irdp->Preference = atoi(argv[3]->arg); return CMD_SUCCESS; } @@ -605,10 +605,10 @@ DEFUN (ip_irdp_address_preference, zi=ifp->info; irdp=&zi->irdp; - ret = inet_aton(argv[0], &ip); + ret = inet_aton(argv[3]->arg, &ip); if(!ret) return CMD_WARNING; - pref = atoi(argv[1]); + pref = atoi(argv[5]->arg); for (ALL_LIST_ELEMENTS_RO (irdp->AdvPrefList, node, adv)) if(adv->ip.s_addr == ip.s_addr) @@ -649,7 +649,7 @@ DEFUN (no_ip_irdp_address_preference, zi=ifp->info; irdp=&zi->irdp; - ret = inet_aton(argv[0], &ip); + ret = inet_aton(argv[4]->arg, &ip); if (!ret) return CMD_WARNING; diff --git a/zebra/router-id.c b/zebra/router-id.c index d5d9652c5..fbd9e2b0c 100644 --- a/zebra/router-id.c +++ b/zebra/router-id.c @@ -223,7 +223,7 @@ DEFUN (router_id, struct prefix rid; vrf_id_t vrf_id = VRF_DEFAULT; - rid.u.prefix4.s_addr = inet_addr (argv[0]); + rid.u.prefix4.s_addr = inet_addr (argv[1]->arg); if (!rid.u.prefix4.s_addr) return CMD_WARNING; diff --git a/zebra/rtadv.c b/zebra/rtadv.c index ac297890a..331838e92 100644 --- a/zebra/rtadv.c +++ b/zebra/rtadv.c @@ -930,7 +930,7 @@ DEFUN (ipv6_nd_ra_interval_msec, struct zebra_ns *zns; zns = zvrf->zns; - VTY_GET_INTEGER_RANGE ("router advertisement interval", interval, argv[0], 70, 1800000); + VTY_GET_INTEGER_RANGE ("router advertisement interval", interval, argv[4]->arg, 70, 1800000); if ((zif->rtadv.AdvDefaultLifetime != -1 && interval > (unsigned)zif->rtadv.AdvDefaultLifetime * 1000)) { vty_out (vty, "This ra-interval would conflict with configured ra-lifetime!%s", VTY_NEWLINE); @@ -965,7 +965,7 @@ DEFUN (ipv6_nd_ra_interval, struct zebra_ns *zns; zns = zvrf->zns; - VTY_GET_INTEGER_RANGE ("router advertisement interval", interval, argv[0], 1, 1800); + VTY_GET_INTEGER_RANGE ("router advertisement interval", interval, argv[3]->arg, 1, 1800); if ((zif->rtadv.AdvDefaultLifetime != -1 && interval > (unsigned)zif->rtadv.AdvDefaultLifetime)) { vty_out (vty, "This ra-interval would conflict with configured ra-lifetime!%s", VTY_NEWLINE); @@ -1045,7 +1045,7 @@ DEFUN (ipv6_nd_ra_lifetime, ifp = (struct interface *) vty->index; zif = ifp->info; - VTY_GET_INTEGER_RANGE ("router lifetime", lifetime, argv[0], 0, 9000); + VTY_GET_INTEGER_RANGE ("router lifetime", lifetime, argv[3]->arg, 0, 9000); /* The value to be placed in the Router Lifetime field * of Router Advertisements sent from the interface, @@ -1100,7 +1100,7 @@ DEFUN (ipv6_nd_reachable_time, { struct interface *ifp = (struct interface *) vty->index; struct zebra_if *zif = ifp->info; - VTY_GET_INTEGER_RANGE ("reachable time", zif->rtadv.AdvReachableTime, argv[0], 1, RTADV_MAX_REACHABLE_TIME); + VTY_GET_INTEGER_RANGE ("reachable time", zif->rtadv.AdvReachableTime, argv[3]->arg, 1, RTADV_MAX_REACHABLE_TIME); return CMD_SUCCESS; } @@ -1142,7 +1142,7 @@ DEFUN (ipv6_nd_homeagent_preference, { struct interface *ifp = (struct interface *) vty->index; struct zebra_if *zif = ifp->info; - VTY_GET_INTEGER_RANGE ("home agent preference", zif->rtadv.HomeAgentPreference, argv[0], 0, 65535); + VTY_GET_INTEGER_RANGE ("home agent preference", zif->rtadv.HomeAgentPreference, argv[3]->arg, 0, 65535); return CMD_SUCCESS; } @@ -1184,7 +1184,7 @@ DEFUN (ipv6_nd_homeagent_lifetime, { struct interface *ifp = (struct interface *) vty->index; struct zebra_if *zif = ifp->info; - VTY_GET_INTEGER_RANGE ("home agent lifetime", zif->rtadv.HomeAgentLifetime, argv[0], 0, RTADV_MAX_HALIFETIME); + VTY_GET_INTEGER_RANGE ("home agent lifetime", zif->rtadv.HomeAgentLifetime, argv[3]->arg, 0, RTADV_MAX_HALIFETIME); return CMD_SUCCESS; } @@ -1366,8 +1366,7 @@ DEFUN (no_ipv6_nd_other_config_flag, DEFUN (ipv6_nd_prefix, ipv6_nd_prefix_cmd, - "ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) " - "(<0-4294967295>|infinite) (off-link|) (no-autoconfig|) (router-address|)", + "ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) (<0-4294967295>|infinite) (off-link|) (no-autoconfig|) (router-address|)", "Interface IPv6 config commands\n" "Neighbor discovery\n" "Prefix information\n" @@ -1390,7 +1389,7 @@ DEFUN (ipv6_nd_prefix, ifp = (struct interface *) vty->index; zebra_if = ifp->info; - ret = str2prefix_ipv6 (argv[0], &rp.prefix); + ret = str2prefix_ipv6 (argv[3]->arg, &rp.prefix); if (!ret) { vty_out (vty, "Malformed IPv6 prefix%s", VTY_NEWLINE); @@ -1405,19 +1404,19 @@ DEFUN (ipv6_nd_prefix, if (argc > 1) { - if ((isdigit((unsigned char)argv[1][0])) - || strncmp (argv[1], "i", 1) == 0) + if ((isdigit((unsigned char)argv[4]->arg[0])) + || strncmp (argv[4]->arg, "i", 1) == 0) { - if ( strncmp (argv[1], "i", 1) == 0) + if ( strncmp (argv[4]->arg, "i", 1) == 0) rp.AdvValidLifetime = UINT32_MAX; else - rp.AdvValidLifetime = (u_int32_t) strtoll (argv[1], + rp.AdvValidLifetime = (u_int32_t) strtoll (argv[4]->arg, (char **)NULL, 10); - if ( strncmp (argv[2], "i", 1) == 0) + if ( strncmp (argv[5]->arg, "i", 1) == 0) rp.AdvPreferredLifetime = UINT32_MAX; else - rp.AdvPreferredLifetime = (u_int32_t) strtoll (argv[2], + rp.AdvPreferredLifetime = (u_int32_t) strtoll (argv[5]->arg, (char **)NULL, 10); if (rp.AdvPreferredLifetime > rp.AdvValidLifetime) @@ -1810,7 +1809,7 @@ DEFUN (ipv6_nd_router_preference, while (0 != rtadv_pref_strs[i]) { - if (strncmp (argv[0], rtadv_pref_strs[i], 1) == 0) + if (strncmp (argv[3]->arg, rtadv_pref_strs[i], 1) == 0) { zif->rtadv.DefaultPreference = i; return CMD_SUCCESS; @@ -1861,7 +1860,7 @@ DEFUN (ipv6_nd_mtu, { struct interface *ifp = (struct interface *) vty->index; struct zebra_if *zif = ifp->info; - VTY_GET_INTEGER_RANGE ("MTU", zif->rtadv.AdvLinkMTU, argv[0], 1, 65535); + VTY_GET_INTEGER_RANGE ("MTU", zif->rtadv.AdvLinkMTU, argv[3]->arg, 1, 65535); return CMD_SUCCESS; } diff --git a/zebra/test_main.c b/zebra/test_main.c index bbaf45028..722151288 100644 --- a/zebra/test_main.c +++ b/zebra/test_main.c @@ -136,7 +136,7 @@ DEFUN (test_interface_state, ifp->flags = IFF_BROADCAST|IFF_MULTICAST; } - switch (argv[0][0]) + switch (argv[1]->arg[0]) { case 'u': SET_FLAG (ifp->flags, IFF_UP); diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c index e6c5a3e91..c70b207d6 100644 --- a/zebra/zebra_routemap.c +++ b/zebra/zebra_routemap.c @@ -301,7 +301,7 @@ DEFUN (match_interface, "match first hop interface of route\n" "Interface name\n") { - return zebra_route_match_add (vty, vty->index, "interface", argv[0], + return zebra_route_match_add (vty, vty->index, "interface", argv[2]->arg, RMAP_EVENT_MATCH_ADDED); } @@ -333,7 +333,7 @@ DEFUN (match_tag, "Match tag of route\n" "Tag value\n") { - return zebra_route_match_add (vty, vty->index, "tag", argv[0], + return zebra_route_match_add (vty, vty->index, "tag", argv[2]->arg, RMAP_EVENT_MATCH_ADDED); } @@ -369,7 +369,7 @@ DEFUN (match_ip_next_hop, "IP access-list number (expanded range)\n" "IP Access-list name\n") { - return zebra_route_match_add (vty, vty->index, "ip next-hop", argv[0], RMAP_EVENT_FILTER_ADDED); + return zebra_route_match_add (vty, vty->index, "ip next-hop", argv[3]->arg, RMAP_EVENT_FILTER_ADDED); } DEFUN (no_match_ip_next_hop, @@ -409,7 +409,7 @@ DEFUN (match_ip_next_hop_prefix_list, "IP prefix-list name\n") { return zebra_route_match_add (vty, vty->index, "ip next-hop prefix-list", - argv[0], RMAP_EVENT_PLIST_ADDED); + argv[4]->arg, RMAP_EVENT_PLIST_ADDED); } DEFUN (no_match_ip_next_hop_prefix_list, @@ -452,7 +452,7 @@ DEFUN (match_ip_address, "IP Access-list name\n") { - return zebra_route_match_add (vty, vty->index, "ip address", argv[0], + return zebra_route_match_add (vty, vty->index, "ip address", argv[3]->arg, RMAP_EVENT_FILTER_ADDED); } @@ -493,7 +493,7 @@ DEFUN (match_ip_address_prefix_list, "IP prefix-list name\n") { return zebra_route_match_add (vty, vty->index, "ip address prefix-list", - argv[0], RMAP_EVENT_PLIST_ADDED); + argv[4]->arg, RMAP_EVENT_PLIST_ADDED); } DEFUN (no_match_ip_address_prefix_list, @@ -613,15 +613,15 @@ DEFUN (match_source_protocol, { int i; - i = proto_name2num(argv[0]); + i = proto_name2num(argv[2]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[2]->arg ? argv[2]->arg : "", VTY_NEWLINE); return CMD_WARNING; } return zebra_route_match_add (vty, vty->index, "source-protocol", - argv[0], RMAP_EVENT_MATCH_ADDED); + argv[2]->arg, RMAP_EVENT_MATCH_ADDED); } DEFUN (no_match_source_protocol, @@ -635,16 +635,16 @@ DEFUN (no_match_source_protocol, if (argc >= 1) { - i = proto_name2num(argv[0]); + i = proto_name2num(argv[3]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[3]->arg ? argv[3]->arg : "", VTY_NEWLINE); return CMD_WARNING; } } return zebra_route_match_delete (vty, vty->index, - "source-protocol", argv[0] ? argv[0] : NULL, + "source-protocol", argv[3]->arg ? argv[3]->arg : NULL, RMAP_EVENT_MATCH_DELETED); } @@ -663,9 +663,9 @@ DEFUN (set_src, struct prefix p; vrf_iter_t iter; - if (inet_pton(AF_INET, argv[0], &src.ipv4) != 1) + if (inet_pton(AF_INET, argv[2]->arg, &src.ipv4) != 1) { - if (inet_pton(AF_INET6, argv[0], &src.ipv6) != 1) + if (inet_pton(AF_INET6, argv[2]->arg, &src.ipv6) != 1) { vty_out (vty, "%% not a valid IPv4/v6 address%s", VTY_NEWLINE); return CMD_WARNING; @@ -706,7 +706,7 @@ DEFUN (set_src, vty_out (vty, "%% not a local address%s", VTY_NEWLINE); return CMD_WARNING; } - return zebra_route_set_add (vty, vty->index, "src", argv[0]); + return zebra_route_set_add (vty, vty->index, "src", argv[2]->arg); } DEFUN (no_set_src, @@ -719,7 +719,7 @@ DEFUN (no_set_src, if (argc == 0) return zebra_route_set_delete (vty, vty->index, "src", NULL); - return zebra_route_set_delete (vty, vty->index, "src", argv[0]); + return zebra_route_set_delete (vty, vty->index, "src", argv[3]->arg); } DEFUN (zebra_route_map_timer, @@ -730,7 +730,7 @@ DEFUN (zebra_route_map_timer, { u_int32_t rmap_delay_timer; - VTY_GET_INTEGER_RANGE ("delay-timer", rmap_delay_timer, argv[0], 0, 600); + VTY_GET_INTEGER_RANGE ("delay-timer", rmap_delay_timer, argv[3]->arg, 0, 600); zebra_route_map_set_delay_timer(rmap_delay_timer); return (CMD_SUCCESS); @@ -766,13 +766,13 @@ DEFUN (ip_protocol, { int i; - if (strcasecmp(argv[0], "any") == 0) + if (strcasecmp(argv[2]->arg, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]); + i = proto_name2num(argv[2]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[2]->arg ? argv[2]->arg : "", VTY_NEWLINE); return CMD_WARNING; } @@ -787,7 +787,7 @@ DEFUN (ip_protocol, if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug ("%u: IPv4 Routemap config for protocol %s, scheduling RIB processing", - VRF_DEFAULT, argv[0]); + VRF_DEFAULT, argv[2]->arg); rib_update(VRF_DEFAULT, RIB_UPDATE_RMAP_CHANGE); return CMD_SUCCESS; @@ -804,13 +804,13 @@ DEFUN (no_ip_protocol, { int i; - if (strcasecmp(argv[0], "any") == 0) + if (strcasecmp(argv[4]->arg, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]); + i = proto_name2num(argv[4]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[4]->arg ? argv[4]->arg : "", VTY_NEWLINE); return CMD_WARNING; } @@ -825,7 +825,7 @@ DEFUN (no_ip_protocol, if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug ("%u: IPv4 Routemap unconfig for protocol %s, scheduling RIB processing", - VRF_DEFAULT, argv[0]); + VRF_DEFAULT, argv[4]->arg); rib_update(VRF_DEFAULT, RIB_UPDATE_RMAP_CHANGE); } return CMD_SUCCESS; @@ -879,13 +879,13 @@ DEFUN (ipv6_protocol, { int i; - if (strcasecmp(argv[0], "any") == 0) + if (strcasecmp(argv[2]->arg, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]); + i = proto_name2num(argv[2]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[2]->arg ? argv[2]->arg : "", VTY_NEWLINE); return CMD_WARNING; } @@ -900,7 +900,7 @@ DEFUN (ipv6_protocol, if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug ("%u: IPv6 Routemap config for protocol %s, scheduling RIB processing", - VRF_DEFAULT, argv[0]); + VRF_DEFAULT, argv[2]->arg); rib_update(VRF_DEFAULT, RIB_UPDATE_RMAP_CHANGE); return CMD_SUCCESS; @@ -917,13 +917,13 @@ DEFUN (no_ipv6_protocol, { int i; - if (strcasecmp(argv[0], "any") == 0) + if (strcasecmp(argv[4]->arg, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]); + i = proto_name2num(argv[4]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[4]->arg ? argv[4]->arg : "", VTY_NEWLINE); return CMD_WARNING; } @@ -938,7 +938,7 @@ DEFUN (no_ipv6_protocol, if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug ("%u: IPv6 Routemap unconfig for protocol %s, scheduling RIB processing", - VRF_DEFAULT, argv[0]); + VRF_DEFAULT, argv[4]->arg); rib_update(VRF_DEFAULT, RIB_UPDATE_RMAP_CHANGE); } @@ -993,13 +993,13 @@ DEFUN (ip_protocol_nht_rmap, { int i; - if (strcasecmp(argv[0], "any") == 0) + if (strcasecmp(argv[2]->arg, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]); + i = proto_name2num(argv[2]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[2]->arg ? argv[2]->arg : "", VTY_NEWLINE); return CMD_WARNING; } @@ -1027,13 +1027,13 @@ DEFUN (no_ip_protocol_nht_rmap, { int i; - if (strcasecmp(argv[0], "any") == 0) + if (strcasecmp(argv[4]->arg, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]); + i = proto_name2num(argv[4]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[4]->arg ? argv[4]->arg : "", VTY_NEWLINE); return CMD_WARNING; } @@ -1097,13 +1097,13 @@ DEFUN (ipv6_protocol_nht_rmap, { int i; - if (strcasecmp(argv[0], "any") == 0) + if (strcasecmp(argv[2]->arg, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]); + i = proto_name2num(argv[2]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[2]->arg ? argv[2]->arg : "", VTY_NEWLINE); return CMD_WARNING; } @@ -1125,13 +1125,13 @@ DEFUN (no_ipv6_protocol_nht_rmap, { int i; - if (strcasecmp(argv[0], "any") == 0) + if (strcasecmp(argv[4]->arg, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[0]); + i = proto_name2num(argv[4]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[0] ? argv[0] : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[4]->arg ? argv[4]->arg : "", VTY_NEWLINE); return CMD_WARNING; } diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index a7ee63d87..dfcf1829d 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -191,7 +191,7 @@ DEFUN (ip_mroute_dist, "Nexthop interface name\n" "Distance\n") { - return zebra_static_ipv4 (vty, SAFI_MULTICAST, 1, argv[0], NULL, argv[1], NULL, NULL, argc > 2 ? argv[2] : NULL, NULL); + return zebra_static_ipv4 (vty, SAFI_MULTICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL, argc > 2 ? argv[4]->arg : NULL, NULL); } ALIAS (ip_mroute_dist, @@ -213,7 +213,7 @@ DEFUN (no_ip_mroute_dist, "Nexthop interface name\n" "Distance\n") { - return zebra_static_ipv4 (vty, SAFI_MULTICAST, 0, argv[0], NULL, argv[1], NULL, NULL, argc > 2 ? argv[2] : NULL, NULL); + return zebra_static_ipv4 (vty, SAFI_MULTICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, argc > 2 ? argv[5]->arg : NULL, NULL); } ALIAS (no_ip_mroute_dist, @@ -239,15 +239,15 @@ DEFUN (ip_multicast_mode, "Lookup both, use entry with longer prefix\n") { - if (!strncmp (argv[0], "u", 1)) + if (!strncmp (argv[3]->arg, "u", 1)) multicast_mode_ipv4_set (MCAST_URIB_ONLY); - else if (!strncmp (argv[0], "mrib-o", 6)) + else if (!strncmp (argv[3]->arg, "mrib-o", 6)) multicast_mode_ipv4_set (MCAST_MRIB_ONLY); - else if (!strncmp (argv[0], "mrib-t", 6)) + else if (!strncmp (argv[3]->arg, "mrib-t", 6)) multicast_mode_ipv4_set (MCAST_MIX_MRIB_FIRST); - else if (!strncmp (argv[0], "low", 3)) + else if (!strncmp (argv[3]->arg, "low", 3)) multicast_mode_ipv4_set (MCAST_MIX_DISTANCE); - else if (!strncmp (argv[0], "lon", 3)) + else if (!strncmp (argv[3]->arg, "lon", 3)) multicast_mode_ipv4_set (MCAST_MIX_PFXLEN); else { @@ -306,7 +306,7 @@ DEFUN (show_ip_rpf_addr, struct rib *rib; int ret; - ret = inet_aton (argv[0], &addr); + ret = inet_aton (argv[3]->arg, &addr); if (ret == 0) { vty_out (vty, "%% Malformed address%s", VTY_NEWLINE); @@ -334,7 +334,7 @@ DEFUN (ip_route, "IP gateway interface name\n" "Null interface\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL, NULL, NULL); } @@ -350,7 +350,7 @@ DEFUN (ip_route_tag, "Set tag for this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, argv[2], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[5]->arg, NULL, NULL); } @@ -365,7 +365,7 @@ DEFUN (ip_route_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL); } @@ -383,7 +383,7 @@ DEFUN (ip_route_flags_tag, "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], argv[3], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[6]->arg, NULL, NULL); } @@ -396,7 +396,7 @@ DEFUN (ip_route_flags2, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, NULL, NULL, NULL); } @@ -412,7 +412,7 @@ DEFUN (ip_route_flags2_tag, "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], argv[2], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[5]->arg, NULL, NULL); } @@ -428,7 +428,7 @@ DEFUN (ip_route_mask, "IP gateway interface name\n" "Null interface\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, NULL); } @@ -446,7 +446,7 @@ DEFUN (ip_route_mask_tag, "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, argv[3], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, NULL, NULL); } @@ -462,7 +462,7 @@ DEFUN (ip_route_mask_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, NULL); } @@ -481,7 +481,7 @@ DEFUN (ip_route_mask_flags_tag, "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], argv[4], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, NULL, NULL); } @@ -495,7 +495,7 @@ DEFUN (ip_route_mask_flags2, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, NULL); } @@ -511,7 +511,7 @@ DEFUN (ip_route_mask_flags2_tag, "Set tag for this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], argv[3], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, NULL, NULL); } @@ -527,8 +527,8 @@ DEFUN (ip_route_distance, "Null interface\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, NULL, - argv[2], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL, + argv[4]->arg, NULL); } DEFUN (ip_route_tag_distance, @@ -545,8 +545,8 @@ DEFUN (ip_route_tag_distance, "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, argv[2], - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[5]->arg, + argv[6]->arg, NULL); } DEFUN (ip_route_flags_distance, @@ -561,8 +561,8 @@ DEFUN (ip_route_flags_distance, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], NULL, - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL, + argv[5]->arg, NULL); } DEFUN (ip_route_flags_tag_distance, @@ -579,8 +579,8 @@ DEFUN (ip_route_flags_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], argv[3], - argv[4], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[6]->arg, + argv[7]->arg, NULL); } DEFUN (ip_route_flags_distance2, @@ -593,8 +593,8 @@ DEFUN (ip_route_flags_distance2, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], NULL, - argv[2], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, NULL, + argv[4]->arg, NULL); } DEFUN (ip_route_flags_tag_distance2, @@ -609,8 +609,8 @@ DEFUN (ip_route_flags_tag_distance2, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], argv[2], - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[5]->arg, + argv[6]->arg, NULL); } DEFUN (ip_route_mask_distance, @@ -625,8 +625,8 @@ DEFUN (ip_route_mask_distance, "Null interface\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, NULL, - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, + argv[5]->arg, NULL); } DEFUN (ip_route_mask_tag_distance, @@ -643,8 +643,8 @@ DEFUN (ip_route_mask_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, argv[3], - argv[4], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, + argv[7]->arg, NULL); } DEFUN (ip_route_mask_flags_tag_distance, @@ -662,8 +662,8 @@ DEFUN (ip_route_mask_flags_tag_distance, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], argv[4], - argv[5], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[8]->arg, + argv[9]->arg, NULL); } @@ -680,8 +680,8 @@ DEFUN (ip_route_mask_flags_distance, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], NULL, - argv[4], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, + argv[6]->arg, NULL); } DEFUN (ip_route_mask_flags_distance2, @@ -695,8 +695,8 @@ DEFUN (ip_route_mask_flags_distance2, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], NULL, - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, + argv[5]->arg, NULL); } DEFUN (ip_route_mask_flags_tag_distance2, @@ -712,8 +712,8 @@ DEFUN (ip_route_mask_flags_tag_distance2, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], argv[3], - argv[4], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, + argv[7]->arg, NULL); } DEFUN (no_ip_route, @@ -727,7 +727,7 @@ DEFUN (no_ip_route, "IP gateway interface name\n" "Null interface\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, NULL, NULL); } @@ -744,7 +744,7 @@ DEFUN (no_ip_route_tag, "Tag of this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, argv[2], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[6]->arg, NULL, NULL); } @@ -784,7 +784,7 @@ DEFUN (no_ip_route_flags2, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, NULL, NULL, NULL, NULL); } @@ -800,7 +800,7 @@ DEFUN (no_ip_route_flags2_tag, "Tag of this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, NULL, argv[1], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, NULL, argv[4]->arg, NULL, NULL); } @@ -816,7 +816,7 @@ DEFUN (no_ip_route_mask, "IP gateway interface name\n" "Null interface\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, NULL, NULL); } @@ -834,7 +834,7 @@ DEFUN (no_ip_route_mask_tag, "Tag of this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, argv[3], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, NULL, NULL); } @@ -877,7 +877,7 @@ DEFUN (no_ip_route_mask_flags2, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, NULL, NULL, + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, NULL, NULL); } @@ -894,7 +894,7 @@ DEFUN (no_ip_route_mask_flags2_tag, "Tag of this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, NULL, argv[2], + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[5]->arg, NULL, NULL); } @@ -910,8 +910,8 @@ DEFUN (no_ip_route_distance, "Null interface\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, NULL, - argv[2], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, + argv[5]->arg, NULL); } DEFUN (no_ip_route_tag_distance, @@ -928,8 +928,8 @@ DEFUN (no_ip_route_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, argv[2], - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[6]->arg, + argv[7]->arg, NULL); } DEFUN (no_ip_route_flags_distance, @@ -945,8 +945,8 @@ DEFUN (no_ip_route_flags_distance, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], NULL, - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, NULL, + argv[6]->arg, NULL); } DEFUN (no_ip_route_flags_tag_distance, @@ -964,8 +964,8 @@ DEFUN (no_ip_route_flags_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], argv[3], - argv[4], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, argv[7]->arg, + argv[8]->arg, NULL); } DEFUN (no_ip_route_flags_distance2, @@ -979,8 +979,8 @@ DEFUN (no_ip_route_flags_distance2, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], NULL, - argv[2], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, NULL, + argv[5]->arg, NULL); } DEFUN (no_ip_route_flags_tag_distance2, @@ -996,8 +996,8 @@ DEFUN (no_ip_route_flags_tag_distance2, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], argv[2], - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, argv[6]->arg, + argv[7]->arg, NULL); } DEFUN (no_ip_route_mask_distance, @@ -1013,8 +1013,8 @@ DEFUN (no_ip_route_mask_distance, "Null interface\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, NULL, - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, + argv[6]->arg, NULL); } DEFUN (no_ip_route_mask_tag_distance, @@ -1032,8 +1032,8 @@ DEFUN (no_ip_route_mask_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, argv[3], - argv[4], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, + argv[8]->arg, NULL); } DEFUN (no_ip_route_mask_flags_distance, @@ -1050,8 +1050,8 @@ DEFUN (no_ip_route_mask_flags_distance, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], NULL, - argv[4], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, + argv[7]->arg, NULL); } DEFUN (no_ip_route_mask_flags_tag_distance, @@ -1070,8 +1070,8 @@ DEFUN (no_ip_route_mask_flags_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], argv[4], - argv[5], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, + argv[9]->arg, NULL); } DEFUN (no_ip_route_mask_flags_distance2, @@ -1086,8 +1086,8 @@ DEFUN (no_ip_route_mask_flags_distance2, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], NULL, - argv[3], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, + argv[6]->arg, NULL); } DEFUN (no_ip_route_mask_flags_tag_distance2, @@ -1104,8 +1104,8 @@ DEFUN (no_ip_route_mask_flags_tag_distance2, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], argv[3], - argv[4], NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, + argv[8]->arg, NULL); } /* Static route configuration. */ @@ -1120,7 +1120,7 @@ DEFUN (ip_route_vrf, "Null interface\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, NULL, NULL, argv[2]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL, NULL, argv[6]->arg); } DEFUN (ip_route_tag_vrf, @@ -1136,7 +1136,7 @@ DEFUN (ip_route_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, argv[2], NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[5]->arg, NULL, argv[8]->arg); } DEFUN (ip_route_flags_vrf, @@ -1151,7 +1151,7 @@ DEFUN (ip_route_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], NULL, NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[7]->arg); } DEFUN (ip_route_flags_tag_vrf, @@ -1169,7 +1169,7 @@ DEFUN (ip_route_flags_tag_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], argv[3], NULL, argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[6]->arg, NULL, argv[9]->arg); } DEFUN (ip_route_flags2_vrf, @@ -1182,7 +1182,7 @@ DEFUN (ip_route_flags2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], NULL, NULL, argv[2]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, NULL, NULL, argv[6]->arg); } DEFUN (ip_route_flags2_tag_vrf, @@ -1198,7 +1198,7 @@ DEFUN (ip_route_flags2_tag_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], argv[2], NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[5]->arg, NULL, argv[8]->arg); } /* Mask as A.B.C.D format. */ @@ -1214,7 +1214,7 @@ DEFUN (ip_route_mask_vrf, "Null interface\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, NULL, NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, argv[7]->arg); } DEFUN (ip_route_mask_tag_vrf, @@ -1232,7 +1232,7 @@ DEFUN (ip_route_mask_tag_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, argv[3], NULL, argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, NULL, argv[9]->arg); } DEFUN (ip_route_mask_flags_vrf, @@ -1248,7 +1248,7 @@ DEFUN (ip_route_mask_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], NULL, NULL, argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[8]->arg); } DEFUN (ip_route_mask_flags_tag_vrf, @@ -1267,7 +1267,7 @@ DEFUN (ip_route_mask_flags_tag_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, NULL, argv[10]->arg); } DEFUN (ip_route_mask_flags2_vrf, @@ -1281,7 +1281,7 @@ DEFUN (ip_route_mask_flags2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], NULL, NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, argv[7]->arg); } DEFUN (ip_route_mask_flags2_tag_vrf, @@ -1297,7 +1297,7 @@ DEFUN (ip_route_mask_flags2_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], argv[3], NULL, argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, NULL, argv[9]->arg); } /* Distance option value. */ @@ -1313,7 +1313,7 @@ DEFUN (ip_route_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, NULL, argv[2], argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL, argv[4]->arg, argv[7]->arg); } DEFUN (ip_route_tag_distance_vrf, @@ -1331,7 +1331,7 @@ DEFUN (ip_route_tag_distance_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], NULL, argv[2], argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[5]->arg, argv[6]->arg, argv[9]->arg); } DEFUN (ip_route_flags_distance_vrf, @@ -1347,7 +1347,7 @@ DEFUN (ip_route_flags_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], NULL, argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[8]->arg); } DEFUN (ip_route_flags_tag_distance_vrf, @@ -1365,7 +1365,7 @@ DEFUN (ip_route_flags_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, argv[1], argv[2], argv[3], argv[4],argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[6]->arg, argv[7]->arg,argv[10]->arg); } DEFUN (ip_route_flags_distance2_vrf, @@ -1379,7 +1379,7 @@ DEFUN (ip_route_flags_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], NULL, argv[2], argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, NULL, argv[4]->arg, argv[7]->arg); } DEFUN (ip_route_flags_tag_distance2_vrf, @@ -1395,7 +1395,7 @@ DEFUN (ip_route_flags_tag_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], NULL, NULL, argv[1], argv[2], argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[5]->arg, argv[6]->arg, argv[9]->arg); } DEFUN (ip_route_mask_distance_vrf, @@ -1411,7 +1411,7 @@ DEFUN (ip_route_mask_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, NULL, argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[5]->arg, argv[8]->arg); } DEFUN (ip_route_mask_tag_distance_vrf, @@ -1429,7 +1429,7 @@ DEFUN (ip_route_mask_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, argv[7]->arg, argv[10]->arg); } DEFUN (ip_route_mask_flags_tag_distance_vrf, @@ -1448,7 +1448,7 @@ DEFUN (ip_route_mask_flags_tag_distance_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[8]->arg, argv[9]->arg, argv[12]->arg); } @@ -1466,7 +1466,7 @@ DEFUN (ip_route_mask_flags_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[6]->arg, argv[9]->arg); } DEFUN (ip_route_mask_flags_distance2_vrf, @@ -1481,7 +1481,7 @@ DEFUN (ip_route_mask_flags_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], NULL, argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[5]->arg, argv[8]->arg); } DEFUN (ip_route_mask_flags_tag_distance2_vrf, @@ -1498,7 +1498,7 @@ DEFUN (ip_route_mask_flags_tag_distance2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, argv[7]->arg, argv[10]->arg); } DEFUN (no_ip_route_vrf, @@ -1513,7 +1513,7 @@ DEFUN (no_ip_route_vrf, "Null interface\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, NULL, NULL, argv[2]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, NULL, argv[7]->arg); } DEFUN (no_ip_route_flags_vrf, @@ -1529,7 +1529,7 @@ DEFUN (no_ip_route_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], NULL, NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[8]->arg); } DEFUN (no_ip_route_tag_vrf, @@ -1546,7 +1546,7 @@ DEFUN (no_ip_route_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, argv[2], NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[6]->arg, NULL, argv[9]->arg); } DEFUN (no_ip_route_flags_tag_vrf, @@ -1564,7 +1564,7 @@ DEFUN (no_ip_route_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], argv[3], NULL, argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, argv[7]->arg, NULL, argv[10]->arg); } DEFUN (no_ip_route_flags2_vrf, @@ -1578,7 +1578,7 @@ DEFUN (no_ip_route_flags2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], NULL, NULL, argv[2]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, NULL, NULL, argv[7]->arg); } DEFUN (no_ip_route_flags2_tag_vrf, @@ -1594,7 +1594,7 @@ DEFUN (no_ip_route_flags2_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], argv[2], NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, argv[6]->arg, NULL, argv[9]->arg); } DEFUN (no_ip_route_mask_vrf, @@ -1610,7 +1610,7 @@ DEFUN (no_ip_route_mask_vrf, "Null interface\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, NULL, NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, NULL, argv[8]->arg); } DEFUN (no_ip_route_mask_flags_vrf, @@ -1627,7 +1627,7 @@ DEFUN (no_ip_route_mask_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], NULL, NULL, argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, NULL, argv[9]->arg); } DEFUN (no_ip_route_mask_tag_vrf, @@ -1645,7 +1645,7 @@ DEFUN (no_ip_route_mask_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, argv[3], NULL, argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, NULL, argv[10]->arg); } DEFUN (no_ip_route_mask_flags_tag_vrf, @@ -1664,7 +1664,7 @@ DEFUN (no_ip_route_mask_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, NULL, argv[11]->arg); } DEFUN (no_ip_route_mask_flags2_vrf, @@ -1679,7 +1679,7 @@ DEFUN (no_ip_route_mask_flags2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], NULL, NULL, argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, NULL, argv[8]->arg); } DEFUN (no_ip_route_mask_flags2_tag_vrf, @@ -1696,7 +1696,7 @@ DEFUN (no_ip_route_mask_flags2_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], argv[3], NULL, argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, NULL, argv[10]->arg); } @@ -1713,7 +1713,7 @@ DEFUN (no_ip_route_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, NULL, argv[2], argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, argv[5]->arg, argv[8]->arg); } DEFUN (no_ip_route_tag_distance_vrf, @@ -1731,7 +1731,7 @@ DEFUN (no_ip_route_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], NULL, argv[2], argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[6]->arg, argv[7]->arg, argv[10]->arg); } DEFUN (no_ip_route_flags_distance_vrf, @@ -1748,7 +1748,7 @@ DEFUN (no_ip_route_flags_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], NULL, argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, NULL, argv[6]->arg, argv[9]->arg); } DEFUN (no_ip_route_flags_tag_distance_vrf, @@ -1767,7 +1767,7 @@ DEFUN (no_ip_route_flags_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, argv[1], argv[2], argv[3], argv[4],argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, argv[7]->arg, argv[8]->arg,argv[11]->arg); } DEFUN (no_ip_route_flags_distance2_vrf, @@ -1782,7 +1782,7 @@ DEFUN (no_ip_route_flags_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], NULL, argv[2], argv[3]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, NULL, argv[5]->arg, argv[8]->arg); } DEFUN (no_ip_route_flags_tag_distance2_vrf, @@ -1799,7 +1799,7 @@ DEFUN (no_ip_route_flags_tag_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], NULL, NULL, argv[1], argv[2] , argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, argv[6]->arg , argv[7]->arg, argv[10]->arg); } DEFUN (no_ip_route_mask_distance_vrf, @@ -1816,7 +1816,7 @@ DEFUN (no_ip_route_mask_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, NULL, argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[6]->arg, argv[9]->arg); } DEFUN (no_ip_route_mask_tag_distance_vrf, @@ -1835,7 +1835,7 @@ DEFUN (no_ip_route_mask_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, argv[8]->arg, argv[11]->arg); } DEFUN (no_ip_route_mask_flags_distance_vrf, @@ -1853,7 +1853,7 @@ DEFUN (no_ip_route_mask_flags_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, argv[7]->arg, argv[10]->arg); } DEFUN (no_ip_route_mask_flags_tag_distance_vrf, @@ -1873,7 +1873,7 @@ DEFUN (no_ip_route_mask_flags_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, argv[9]->arg, argv[12]->arg); } DEFUN (no_ip_route_mask_flags_distance2_vrf, @@ -1889,7 +1889,7 @@ DEFUN (no_ip_route_mask_flags_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], NULL, argv[3], argv[4]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, argv[6]->arg, argv[9]->arg); } DEFUN (no_ip_route_mask_flags_tag_distance2_vrf, @@ -1907,7 +1907,7 @@ DEFUN (no_ip_route_mask_flags_tag_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], argv[5]); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, argv[8]->arg, argv[11]->arg); } /* New RIB. Detailed information for IPv4 route. */ @@ -2433,7 +2433,7 @@ DEFUN (show_ip_route_vrf, if (argc == 1 && uj) return do_show_ip_route (vty, NULL, SAFI_UNICAST, uj); else - return do_show_ip_route (vty, argv[0], SAFI_UNICAST, uj); + return do_show_ip_route (vty, argv[5]->arg, SAFI_UNICAST, uj); } DEFUN (show_ip_nht, @@ -2607,10 +2607,10 @@ DEFUN (show_ip_route_tag, if (argc > 1) { tag = atoi(argv[1]); - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[4]->arg); } else - tag = atoi(argv[0]); + tag = atoi(argv[4]->arg); table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); if (! table) @@ -2663,10 +2663,10 @@ DEFUN (show_ip_route_prefix_longer, if (argc > 1) { ret = str2prefix (argv[1], &p); - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[3]->arg); } else - ret = str2prefix (argv[0], &p); + ret = str2prefix (argv[3]->arg, &p); if (! ret) { @@ -2773,10 +2773,10 @@ DEFUN (show_ip_route_protocol, if (argc > 1) { type = proto_redistnum (AFI_IP, argv[1]); - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[4]->arg); } else - type = proto_redistnum (AFI_IP, argv[0]); + type = proto_redistnum (AFI_IP, argv[4]->arg); if (type < 0) { @@ -2827,7 +2827,7 @@ DEFUN (show_ip_route_ospf_instance, int first = 1; u_short instance = 0; - VTY_GET_INTEGER ("Instance", instance, argv[0]); + VTY_GET_INTEGER ("Instance", instance, argv[4]->arg); table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, VRF_DEFAULT); if (! table) @@ -2864,11 +2864,11 @@ DEFUN (show_ip_route_addr, if (argc > 1) { - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[3]->arg); ret = str2prefix_ipv4 (argv[1], &p); } else - ret = str2prefix_ipv4 (argv[0], &p); + ret = str2prefix_ipv4 (argv[3]->arg, &p); if (ret <= 0) { @@ -2919,11 +2919,11 @@ DEFUN (show_ip_route_prefix, if (argc > 1) { - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[3]->arg); ret = str2prefix_ipv4 (argv[1], &p); } else - ret = str2prefix_ipv4 (argv[0], &p); + ret = str2prefix_ipv4 (argv[3]->arg, &p); if (ret <= 0) { @@ -3239,8 +3239,8 @@ DEFUN (show_ip_route_vrf_all_tag, int vrf_header = 1; u_short tag = 0; - if (argv[0]) - tag = atoi(argv[0]); + if (argv[6]->arg) + tag = atoi(argv[6]->arg); for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter)) { @@ -3293,7 +3293,7 @@ DEFUN (show_ip_route_vrf_all_prefix_longer, int first = 1; int vrf_header = 1; - ret = str2prefix (argv[0], &p); + ret = str2prefix (argv[5]->arg, &p); if (! ret) { vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE); @@ -3332,7 +3332,7 @@ DEFUN (show_ip_route_vrf_all_prefix_longer, DEFUN (show_ip_route_vrf_all_supernets, show_ip_route_vrf_all_supernets_cmd, - "show ip route " VRF_ALL_CMD_STR " supernets-only", + "show ip route " VRF_ALL_CMD_STR " supernets-only", SHOW_STR IP_STR "IP routing table\n" @@ -3402,7 +3402,7 @@ DEFUN (show_ip_route_vrf_all_protocol, int first = 1; int vrf_header = 1; - type = proto_redistnum (AFI_IP, argv[0]); + type = proto_redistnum (AFI_IP, argv[7]->arg); if (type < 0) { vty_out (vty, "Unknown route type%s", VTY_NEWLINE); @@ -3455,7 +3455,7 @@ DEFUN (show_ip_route_vrf_all_addr, struct zebra_vrf *zvrf; vrf_iter_t iter; - ret = str2prefix_ipv4 (argv[0], &p); + ret = str2prefix_ipv4 (argv[6]->arg, &p); if (ret <= 0) { vty_out (vty, "%% Malformed IPv4 address%s", VTY_NEWLINE); @@ -3496,7 +3496,7 @@ DEFUN (show_ip_route_vrf_all_prefix, struct zebra_vrf *zvrf; vrf_iter_t iter; - ret = str2prefix_ipv4 (argv[0], &p); + ret = str2prefix_ipv4 (argv[5]->arg, &p); if (ret <= 0) { vty_out (vty, "%% Malformed IPv4 address%s", VTY_NEWLINE); @@ -3755,7 +3755,7 @@ DEFUN (ipv6_route, "IPv6 gateway address\n" "IPv6 gateway interface name\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, NULL, NULL, NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, NULL, NULL, NULL); } DEFUN (ipv6_route_tag, @@ -3769,7 +3769,7 @@ DEFUN (ipv6_route_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, argv[2], NULL, NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[5]->arg, NULL, NULL); } DEFUN (ipv6_route_flags, @@ -3783,7 +3783,7 @@ DEFUN (ipv6_route_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], NULL, NULL, NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, NULL); } DEFUN (ipv6_route_flags_tag, @@ -3799,7 +3799,7 @@ DEFUN (ipv6_route_flags_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], argv[3], NULL, NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, NULL, NULL); } DEFUN (ipv6_route_ifname, @@ -3811,7 +3811,7 @@ DEFUN (ipv6_route_ifname, "IPv6 gateway address\n" "IPv6 gateway interface name\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, NULL, NULL, NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, NULL); } DEFUN (ipv6_route_ifname_tag, ipv6_route_ifname_tag_cmd, @@ -3824,7 +3824,7 @@ DEFUN (ipv6_route_ifname_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, argv[3], NULL, NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, NULL, NULL); } DEFUN (ipv6_route_ifname_flags, @@ -3838,7 +3838,7 @@ DEFUN (ipv6_route_ifname_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], NULL, NULL, NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, NULL); } DEFUN (ipv6_route_ifname_flags_tag, @@ -3854,7 +3854,7 @@ DEFUN (ipv6_route_ifname_flags_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, NULL, NULL); } DEFUN (ipv6_route_pref, @@ -3867,7 +3867,7 @@ DEFUN (ipv6_route_pref, "IPv6 gateway interface name\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, NULL, argv[2], NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, NULL, argv[4]->arg, NULL); } DEFUN (ipv6_route_pref_tag, @@ -3882,7 +3882,7 @@ DEFUN (ipv6_route_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, argv[2], argv[3], NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[5]->arg, argv[6]->arg, NULL); } DEFUN (ipv6_route_flags_pref, @@ -3897,7 +3897,7 @@ DEFUN (ipv6_route_flags_pref, "Silently discard pkts when matched\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], NULL, argv[3], NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[5]->arg, NULL); } DEFUN (ipv6_route_flags_pref_tag, @@ -3914,7 +3914,7 @@ DEFUN (ipv6_route_flags_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, argv[7]->arg, NULL); } DEFUN (ipv6_route_ifname_pref, @@ -3927,7 +3927,7 @@ DEFUN (ipv6_route_ifname_pref, "IPv6 gateway interface name\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, NULL, argv[3], NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[5]->arg, NULL); } DEFUN (ipv6_route_ifname_pref_tag, @@ -3942,7 +3942,7 @@ DEFUN (ipv6_route_ifname_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, argv[7]->arg, NULL); } DEFUN (ipv6_route_ifname_flags_pref, @@ -3957,7 +3957,7 @@ DEFUN (ipv6_route_ifname_flags_pref, "Silently discard pkts when matched\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[6]->arg, NULL); } DEFUN (ipv6_route_ifname_flags_pref_tag, @@ -3974,7 +3974,7 @@ DEFUN (ipv6_route_ifname_flags_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], NULL); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, argv[8]->arg, NULL); } DEFUN (no_ipv6_route, @@ -3987,7 +3987,7 @@ DEFUN (no_ipv6_route, "IPv6 gateway address\n" "IPv6 gateway interface name\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, NULL, NULL, NULL); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, NULL, NULL); } DEFUN (no_ipv6_route_tag, @@ -4002,7 +4002,7 @@ DEFUN (no_ipv6_route_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, argv[2], NULL, NULL); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[6]->arg, NULL, NULL); } DEFUN (no_ipv6_route_flags, @@ -4017,7 +4017,7 @@ DEFUN (no_ipv6_route_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], NULL, NULL, NULL); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, NULL, NULL); } DEFUN (no_ipv6_route_flags_tag, @@ -4034,7 +4034,7 @@ DEFUN (no_ipv6_route_flags_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], argv[3], NULL, NULL); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, NULL, NULL); } DEFUN (no_ipv6_route_ifname, @@ -4047,7 +4047,7 @@ DEFUN (no_ipv6_route_ifname, "IPv6 gateway address\n" "IPv6 gateway interface name\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, NULL, NULL, NULL); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, NULL, NULL); } DEFUN (no_ipv6_route_ifname_tag, @@ -4062,7 +4062,7 @@ DEFUN (no_ipv6_route_ifname_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, argv[3], NULL, NULL); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, NULL, NULL); } DEFUN (no_ipv6_route_ifname_flags, @@ -4077,7 +4077,7 @@ DEFUN (no_ipv6_route_ifname_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], NULL, NULL, NULL); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, NULL, NULL); } DEFUN (no_ipv6_route_ifname_flags_tag, @@ -4094,7 +4094,7 @@ DEFUN (no_ipv6_route_ifname_flags_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, NULL); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, NULL, NULL); } DEFUN (no_ipv6_route_pref, @@ -4108,7 +4108,7 @@ DEFUN (no_ipv6_route_pref, "IPv6 gateway interface name\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, NULL, argv[2], NULL); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, argv[5]->arg, NULL); } DEFUN (no_ipv6_route_pref_tag, @@ -4124,7 +4124,7 @@ DEFUN (no_ipv6_route_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, argv[2], argv[3], NULL); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[6]->arg, argv[7]->arg, NULL); } DEFUN (no_ipv6_route_flags_pref, @@ -4140,8 +4140,8 @@ DEFUN (no_ipv6_route_flags_pref, "Silently discard pkts when matched\n" "Distance value for this prefix\n") { - /* We do not care about argv[2] */ - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], NULL, argv[3], NULL); + /* We do not care about argv[5]->arg */ + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, argv[6]->arg, NULL); } DEFUN (no_ipv6_route_flags_pref_tag, @@ -4159,8 +4159,8 @@ DEFUN (no_ipv6_route_flags_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - /* We do not care about argv[2] */ - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], NULL); + /* We do not care about argv[5]->arg */ + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, argv[8]->arg, NULL); } DEFUN (no_ipv6_route_ifname_pref, @@ -4174,7 +4174,7 @@ DEFUN (no_ipv6_route_ifname_pref, "IPv6 gateway interface name\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, NULL, argv[3], NULL); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[6]->arg, NULL); } DEFUN (no_ipv6_route_ifname_pref_tag, @@ -4190,7 +4190,7 @@ DEFUN (no_ipv6_route_ifname_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], NULL); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, argv[8]->arg, NULL); } DEFUN (no_ipv6_route_ifname_flags_pref, @@ -4206,7 +4206,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref, "Silently discard pkts when matched\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], NULL); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, argv[7]->arg, NULL); } DEFUN (no_ipv6_route_ifname_flags_pref_tag, @@ -4224,7 +4224,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], NULL); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, argv[9]->arg, NULL); } DEFUN (ipv6_route_vrf, @@ -4237,7 +4237,7 @@ DEFUN (ipv6_route_vrf, "IPv6 gateway interface name\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, NULL, NULL, argv[2]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, NULL, NULL, argv[6]->arg); } DEFUN (ipv6_route_tag_vrf, @@ -4252,7 +4252,7 @@ DEFUN (ipv6_route_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, argv[2], NULL, argv[3]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[5]->arg, NULL, argv[8]->arg); } DEFUN (ipv6_route_flags_vrf, @@ -4267,7 +4267,7 @@ DEFUN (ipv6_route_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], NULL, NULL, argv[3]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, argv[7]->arg); } DEFUN (ipv6_route_flags_tag_vrf, @@ -4284,7 +4284,7 @@ DEFUN (ipv6_route_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], argv[3], NULL, argv[4]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, NULL, argv[9]->arg); } DEFUN (ipv6_route_ifname_vrf, @@ -4297,7 +4297,7 @@ DEFUN (ipv6_route_ifname_vrf, "IPv6 gateway interface name\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, NULL, NULL, argv[3]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, argv[7]->arg); } DEFUN (ipv6_route_ifname_tag_vrf, ipv6_route_ifname_tag_vrf_cmd, @@ -4311,7 +4311,7 @@ DEFUN (ipv6_route_ifname_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, argv[3], NULL, argv[4]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, NULL, argv[9]->arg); } DEFUN (ipv6_route_ifname_flags_vrf, @@ -4326,7 +4326,7 @@ DEFUN (ipv6_route_ifname_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], NULL, NULL, argv[4]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[8]->arg); } DEFUN (ipv6_route_ifname_flags_tag_vrf, @@ -4343,7 +4343,7 @@ DEFUN (ipv6_route_ifname_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, argv[5]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, NULL, argv[10]->arg); } DEFUN (ipv6_route_pref_vrf, @@ -4357,7 +4357,7 @@ DEFUN (ipv6_route_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, NULL, argv[2], argv[3]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, NULL, argv[4]->arg, argv[7]->arg); } DEFUN (ipv6_route_pref_tag_vrf, @@ -4373,7 +4373,7 @@ DEFUN (ipv6_route_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, NULL, argv[2], argv[3], argv[4]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[5]->arg, argv[6]->arg, argv[9]->arg); } DEFUN (ipv6_route_flags_pref_vrf, @@ -4389,7 +4389,7 @@ DEFUN (ipv6_route_flags_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], NULL, argv[3], argv[4]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[5]->arg, argv[8]->arg); } DEFUN (ipv6_route_flags_pref_tag_vrf, @@ -4407,7 +4407,7 @@ DEFUN (ipv6_route_flags_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], argv[5]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, argv[7]->arg, argv[10]->arg); } DEFUN (ipv6_route_ifname_pref_vrf, @@ -4421,7 +4421,7 @@ DEFUN (ipv6_route_ifname_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, NULL, argv[3], argv[4]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[5]->arg, argv[8]->arg); } DEFUN (ipv6_route_ifname_pref_tag_vrf, @@ -4437,7 +4437,7 @@ DEFUN (ipv6_route_ifname_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], argv[5]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, argv[7]->arg, argv[10]->arg); } DEFUN (ipv6_route_ifname_flags_pref_vrf, @@ -4453,7 +4453,7 @@ DEFUN (ipv6_route_ifname_flags_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], argv[5]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[6]->arg, argv[9]->arg); } DEFUN (ipv6_route_ifname_flags_pref_tag_vrf, @@ -4471,7 +4471,7 @@ DEFUN (ipv6_route_ifname_flags_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, argv[8]->arg, argv[11]->arg); } DEFUN (no_ipv6_route_vrf, @@ -4485,7 +4485,7 @@ DEFUN (no_ipv6_route_vrf, "IPv6 gateway interface name\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, NULL, NULL, argv[2]); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, NULL, argv[7]->arg); } DEFUN (no_ipv6_route_tag_vrf, @@ -4501,7 +4501,7 @@ DEFUN (no_ipv6_route_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, argv[2], NULL, argv[3]); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[6]->arg, NULL, argv[9]->arg); } DEFUN (no_ipv6_route_flags_vrf, @@ -4517,7 +4517,7 @@ DEFUN (no_ipv6_route_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], NULL, NULL, argv[3]); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, NULL, argv[8]->arg); } DEFUN (no_ipv6_route_flags_tag_vrf, @@ -4535,7 +4535,7 @@ DEFUN (no_ipv6_route_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], argv[3], NULL, argv[4]); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, NULL, argv[10]->arg); } DEFUN (no_ipv6_route_ifname_vrf, @@ -4549,7 +4549,7 @@ DEFUN (no_ipv6_route_ifname_vrf, "IPv6 gateway interface name\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, NULL, NULL, argv[3]); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, NULL, argv[8]->arg); } DEFUN (no_ipv6_route_ifname_tag_vrf, @@ -4565,7 +4565,7 @@ DEFUN (no_ipv6_route_ifname_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, argv[3], NULL, argv[4]); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, NULL, argv[10]->arg); } DEFUN (no_ipv6_route_ifname_flags_vrf, @@ -4581,7 +4581,7 @@ DEFUN (no_ipv6_route_ifname_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], NULL, NULL, argv[4]); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, NULL, argv[9]->arg); } DEFUN (no_ipv6_route_ifname_flags_tag_vrf, @@ -4599,7 +4599,7 @@ DEFUN (no_ipv6_route_ifname_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], argv[4], NULL, argv[5]); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, NULL, argv[11]->arg); } DEFUN (no_ipv6_route_pref_vrf, @@ -4614,7 +4614,7 @@ DEFUN (no_ipv6_route_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, NULL, argv[2], argv[3]); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, argv[5]->arg, argv[8]->arg); } DEFUN (no_ipv6_route_pref_tag_vrf, @@ -4631,7 +4631,7 @@ DEFUN (no_ipv6_route_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, NULL, argv[2], argv[3], argv[4]); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[6]->arg, argv[7]->arg, argv[10]->arg); } DEFUN (no_ipv6_route_flags_pref_vrf, @@ -4648,8 +4648,8 @@ DEFUN (no_ipv6_route_flags_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - /* We do not care about argv[2] */ - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], NULL, argv[3], argv[4]); + /* We do not care about argv[5]->arg */ + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, argv[6]->arg, argv[9]->arg); } DEFUN (no_ipv6_route_flags_pref_tag_vrf, @@ -4668,8 +4668,8 @@ DEFUN (no_ipv6_route_flags_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - /* We do not care about argv[2] */ - return static_ipv6_func (vty, 0, argv[0], argv[1], NULL, argv[2], argv[3], argv[4], argv[5]); + /* We do not care about argv[5]->arg */ + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, argv[8]->arg, argv[11]->arg); } DEFUN (no_ipv6_route_ifname_pref_vrf, @@ -4684,7 +4684,7 @@ DEFUN (no_ipv6_route_ifname_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, NULL, argv[3], argv[4]); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[6]->arg, argv[9]->arg); } DEFUN (no_ipv6_route_ifname_pref_tag_vrf, @@ -4701,7 +4701,7 @@ DEFUN (no_ipv6_route_ifname_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], NULL, argv[3], argv[4], argv[5]); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, argv[8]->arg, argv[11]->arg); } DEFUN (no_ipv6_route_ifname_flags_pref_vrf, @@ -4718,7 +4718,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], NULL, argv[4], argv[5]); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, argv[7]->arg, argv[10]->arg); } DEFUN (no_ipv6_route_ifname_flags_pref_tag_vrf, @@ -4737,7 +4737,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, argv[9]->arg, argv[12]->arg); } DEFUN (show_ipv6_route, @@ -4758,14 +4758,14 @@ DEFUN (show_ipv6_route, json_object *json_prefix = NULL; u_char uj = use_json(argc, argv); - if (argc > 0 && argv[0] && strcmp(argv[0], "json") != 0) + if (argc > 0 && argv[3]->arg && strcmp(argv[3]->arg, "json") != 0) { - if (!(zvrf = zebra_vrf_list_lookup_by_name (argv[0]))) + if (!(zvrf = zebra_vrf_list_lookup_by_name (argv[3]->arg))) { if (uj) vty_out (vty, "{}%s", VTY_NEWLINE); else - vty_out (vty, "vrf %s not defined%s", argv[0], VTY_NEWLINE); + vty_out (vty, "vrf %s not defined%s", argv[3]->arg, VTY_NEWLINE); return CMD_SUCCESS; } @@ -4774,7 +4774,7 @@ DEFUN (show_ipv6_route, if (uj) vty_out (vty, "{}%s", VTY_NEWLINE); else - vty_out (vty, "vrf %s inactive%s", argv[0], VTY_NEWLINE); + vty_out (vty, "vrf %s inactive%s", argv[3]->arg, VTY_NEWLINE); return CMD_SUCCESS; } else @@ -4860,11 +4860,11 @@ DEFUN (show_ipv6_route_tag, if (argc > 1) { - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[4]->arg); tag = atoi(argv[1]); } else - tag = atoi(argv[0]); + tag = atoi(argv[4]->arg); table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id); if (! table) @@ -4916,11 +4916,11 @@ DEFUN (show_ipv6_route_prefix_longer, if (argc > 1) { - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[3]->arg); ret = str2prefix (argv[1], &p); } else - ret = str2prefix (argv[0], &p); + ret = str2prefix (argv[3]->arg, &p); if (! ret) { @@ -4974,11 +4974,11 @@ DEFUN (show_ipv6_route_protocol, if ( argc >1 ) { - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[4]->arg); type = proto_redistnum (AFI_IP6, argv[1]); } else - type = proto_redistnum (AFI_IP6, argv[0]); + type = proto_redistnum (AFI_IP6, argv[4]->arg); if (type < 0) { @@ -5030,11 +5030,11 @@ DEFUN (show_ipv6_route_addr, if (argc > 1 ) { - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[3]->arg); ret = str2prefix_ipv6 (argv[1], &p); } else - ret = str2prefix_ipv6 (argv[0], &p); + ret = str2prefix_ipv6 (argv[3]->arg, &p); if (ret <= 0) { @@ -5085,11 +5085,11 @@ DEFUN (show_ipv6_route_prefix, if (argc > 1) { - VRF_GET_ID (vrf_id, argv[0]); + VRF_GET_ID (vrf_id, argv[3]->arg); ret = str2prefix_ipv6 (argv[1], &p); } else - ret = str2prefix_ipv6 (argv[0], &p); + ret = str2prefix_ipv6 (argv[3]->arg, &p); if (ret <= 0) { @@ -5303,8 +5303,8 @@ DEFUN (show_ipv6_route_vrf_all_tag, int vrf_header = 1; u_short tag = 0; - if (argv[0]) - tag = atoi(argv[0]); + if (argv[6]->arg) + tag = atoi(argv[6]->arg); for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter)) { @@ -5358,7 +5358,7 @@ DEFUN (show_ipv6_route_vrf_all_prefix_longer, int first = 1; int vrf_header = 1; - ret = str2prefix (argv[0], &p); + ret = str2prefix (argv[5]->arg, &p); if (! ret) { vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE); @@ -5413,7 +5413,7 @@ DEFUN (show_ipv6_route_vrf_all_protocol, int first = 1; int vrf_header = 1; - type = proto_redistnum (AFI_IP6, argv[0]); + type = proto_redistnum (AFI_IP6, argv[6]->arg); if (type < 0) { vty_out (vty, "Unknown route type%s", VTY_NEWLINE); @@ -5466,7 +5466,7 @@ DEFUN (show_ipv6_route_vrf_all_addr, struct zebra_vrf *zvrf; vrf_iter_t iter; - ret = str2prefix_ipv6 (argv[0], &p); + ret = str2prefix_ipv6 (argv[5]->arg, &p); if (ret <= 0) { vty_out (vty, "Malformed IPv6 address%s", VTY_NEWLINE); @@ -5507,7 +5507,7 @@ DEFUN (show_ipv6_route_vrf_all_prefix, struct zebra_vrf *zvrf; vrf_iter_t iter; - ret = str2prefix_ipv6 (argv[0], &p); + ret = str2prefix_ipv6 (argv[5]->arg, &p); if (ret <= 0) { vty_out (vty, "Malformed IPv6 prefix%s", VTY_NEWLINE); @@ -5751,7 +5751,7 @@ DEFUN (ip_zebra_import_table_distance, int distance = ZEBRA_TABLE_DISTANCE_DEFAULT; if (argc) - VTY_GET_INTEGER("table", table_id, argv[0]); + VTY_GET_INTEGER("table", table_id, argv[2]->arg); if (!is_zebra_valid_kernel_table(table_id)) { @@ -5768,7 +5768,7 @@ DEFUN (ip_zebra_import_table_distance, } if (argc > 1) - VTY_GET_INTEGER_RANGE("distance", distance, argv[1], 1, 255); + VTY_GET_INTEGER_RANGE("distance", distance, argv[4]->arg, 1, 255); return (zebra_import_table(AFI_IP, table_id, distance, NULL, 1)); } @@ -5796,7 +5796,7 @@ DEFUN (ip_zebra_import_table_distance_routemap, const char *rmap_name; if (argc) - VTY_GET_INTEGER("table", table_id, argv[0]); + VTY_GET_INTEGER("table", table_id, argv[2]->arg); if (!is_zebra_valid_kernel_table(table_id)) { @@ -5814,11 +5814,11 @@ DEFUN (ip_zebra_import_table_distance_routemap, if (argc > 2) { - VTY_GET_INTEGER_RANGE("distance", distance, argv[1], 1, 255); - rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[2]); + VTY_GET_INTEGER_RANGE("distance", distance, argv[4]->arg, 1, 255); + rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[6]->arg); } else - rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]); + rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[4]->arg); return (zebra_import_table(AFI_IP, table_id, distance, rmap_name, 1)); } @@ -5843,7 +5843,7 @@ DEFUN (no_ip_zebra_import_table, u_int32_t table_id = 0; if (argc) - VTY_GET_INTEGER("table", table_id, argv[0]); + VTY_GET_INTEGER("table", table_id, argv[3]->arg); if (!is_zebra_valid_kernel_table(table_id)) { -- cgit v1.2.3 From f412b39a337b55e07c5d361f7d7c4ae845fb34e8 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Fri, 23 Sep 2016 03:55:26 +0000 Subject: ALIAS removal for bgp, ospf, pim, isis, rip, ripng, lib and zebra Signed-off-by: Daniel Walton --- bgpd/bgp_bfd.c | 23 +- bgpd/bgp_debug.c | 15 +- bgpd/bgp_route.c | 3872 ++++++++++++++--------------- bgpd/bgp_routemap.c | 785 +++--- bgpd/bgp_vty.c | 6041 ++++++++++++++++++++++------------------------ isisd/isis_routemap.c | 101 +- isisd/isis_vty.c | 604 ++--- isisd/isisd.c | 15 +- lib/command.c | 59 +- lib/filter.c | 48 +- lib/if_rmap.c | 40 +- lib/plist.c | 42 +- lib/routemap.c | 48 +- lib/vty.c | 15 +- ospf6d/ospf6_area.c | 118 +- ospf6d/ospf6_asbr.c | 62 +- ospf6d/ospf6_interface.c | 147 +- ospf6d/ospf6_lsa.c | 42 +- ospf6d/ospf6_message.c | 76 +- ospf6d/ospf6_neighbor.c | 70 +- ospf6d/ospf6_spf.c | 23 +- ospf6d/ospf6_top.c | 96 +- ospf6d/ospf6_zebra.c | 38 +- ospf6d/ospf6d.c | 1052 ++++---- ospfd/ospf_bfd.c | 23 +- ospfd/ospf_dump.c | 668 +++-- ospfd/ospf_opaque.c | 28 +- ospfd/ospf_ri.c | 13 +- ospfd/ospf_routemap.c | 175 +- ospfd/ospf_te.c | 15 +- ospfd/ospf_vty.c | 2195 ++++++++--------- pimd/pim_cmd.c | 233 +- ripd/rip_interface.c | 164 +- ripd/rip_routemap.c | 229 +- ripd/ripd.c | 51 +- ripngd/ripng_interface.c | 19 +- ripngd/ripng_routemap.c | 108 +- ripngd/ripng_zebra.c | 51 +- ripngd/ripngd.c | 36 +- zebra/interface.c | 92 +- zebra/router-id.c | 44 +- zebra/rtadv.c | 727 +++--- zebra/zebra_routemap.c | 249 +- zebra/zebra_vty.c | 612 ++--- 44 files changed, 9241 insertions(+), 9923 deletions(-) (limited to 'zebra') diff --git a/bgpd/bgp_bfd.c b/bgpd/bgp_bfd.c index ad221d922..170b207a8 100644 --- a/bgpd/bgp_bfd.c +++ b/bgpd/bgp_bfd.c @@ -638,6 +638,18 @@ DEFUN_HIDDEN (neighbor_bfd_type, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * NO_NEIGHBOR_CMD2 "bfd " BFD_CMD_DETECT_MULT_RANGE BFD_CMD_MIN_RX_RANGE BFD_CMD_MIN_TX_RANGE, + * NO_STR + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "Disables BFD support\n" + * "Detect Multiplier\n" + * "Required min receive interval\n" + * "Desired min transmit interval\n" + * + */ DEFUN (no_neighbor_bfd, no_neighbor_bfd_cmd, NO_NEIGHBOR_CMD2 "bfd", @@ -660,16 +672,6 @@ DEFUN (no_neighbor_bfd, return CMD_SUCCESS; } -ALIAS (no_neighbor_bfd, - no_neighbor_bfd_val_cmd, - NO_NEIGHBOR_CMD2 "bfd " BFD_CMD_DETECT_MULT_RANGE BFD_CMD_MIN_RX_RANGE BFD_CMD_MIN_TX_RANGE, - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Disables BFD support\n" - "Detect Multiplier\n" - "Required min receive interval\n" - "Desired min transmit interval\n") DEFUN_HIDDEN (no_neighbor_bfd_type, no_neighbor_bfd_type_cmd, @@ -711,6 +713,5 @@ bgp_bfd_init(void) install_element (BGP_NODE, &neighbor_bfd_param_cmd); install_element (BGP_NODE, &neighbor_bfd_type_cmd); install_element (BGP_NODE, &no_neighbor_bfd_cmd); - install_element (BGP_NODE, &no_neighbor_bfd_val_cmd); install_element (BGP_NODE, &no_neighbor_bfd_type_cmd); } diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c index bf865afdc..e64730624 100644 --- a/bgpd/bgp_debug.c +++ b/bgpd/bgp_debug.c @@ -1538,6 +1538,14 @@ DEFUN (debug_bgp_allow_martians, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "undebug bgp allow-martians", + * UNDEBUG_STR + * BGP_STR + * "BGP allow martian next hops\n" + * + */ DEFUN (no_debug_bgp_allow_martians, no_debug_bgp_allow_martians_cmd, "no debug bgp allow-martians", @@ -1556,12 +1564,6 @@ DEFUN (no_debug_bgp_allow_martians, return CMD_SUCCESS; } -ALIAS (no_debug_bgp_allow_martians, - undebug_bgp_allow_martians_cmd, - "undebug bgp allow-martians", - UNDEBUG_STR - BGP_STR - "BGP allow martian next hops\n") /* debug bgp update-groups */ DEFUN (debug_bgp_update_groups, @@ -1862,7 +1864,6 @@ bgp_debug_init (void) install_element (ENABLE_NODE, &no_debug_bgp_zebra_cmd); install_element (CONFIG_NODE, &no_debug_bgp_zebra_cmd); install_element (ENABLE_NODE, &no_debug_bgp_allow_martians_cmd); - install_element (ENABLE_NODE, &undebug_bgp_allow_martians_cmd); install_element (CONFIG_NODE, &no_debug_bgp_allow_martians_cmd); install_element (ENABLE_NODE, &no_debug_bgp_update_groups_cmd); install_element (CONFIG_NODE, &no_debug_bgp_update_groups_cmd); diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 2472511fe..37009e1ab 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -4442,6 +4442,22 @@ DEFUN (bgp_network_mask_natural_backdoor, NULL, 1); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no network A.B.C.D/M route-map WORD", + * NO_STR + * "Specify a network to announce via BGP\n" + * "IP prefix /, e.g., 35.0.0.0/8\n" + * "Route-map to modify the attributes\n" + * "Name of the route map\n" + * + * "no network A.B.C.D/M backdoor", + * NO_STR + * "Specify a network to announce via BGP\n" + * "IP prefix /, e.g., 35.0.0.0/8\n" + * "Specify a BGP backdoor route\n" + * + */ DEFUN (no_bgp_network, no_bgp_network_cmd, "no network A.B.C.D/M", @@ -4453,23 +4469,28 @@ DEFUN (no_bgp_network, bgp_node_safi (vty)); } -ALIAS (no_bgp_network, - no_bgp_network_route_map_cmd, - "no network A.B.C.D/M route-map WORD", - NO_STR - "Specify a network to announce via BGP\n" - "IP prefix /, e.g., 35.0.0.0/8\n" - "Route-map to modify the attributes\n" - "Name of the route map\n") -ALIAS (no_bgp_network, - no_bgp_network_backdoor_cmd, - "no network A.B.C.D/M backdoor", - NO_STR - "Specify a network to announce via BGP\n" - "IP prefix /, e.g., 35.0.0.0/8\n" - "Specify a BGP backdoor route\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no network A.B.C.D mask A.B.C.D backdoor", + * NO_STR + * "Specify a network to announce via BGP\n" + * "Network number\n" + * "Network mask\n" + * "Network mask\n" + * "Specify a BGP backdoor route\n" + * + * "no network A.B.C.D mask A.B.C.D route-map WORD", + * NO_STR + * "Specify a network to announce via BGP\n" + * "Network number\n" + * "Network mask\n" + * "Network mask\n" + * "Route-map to modify the attributes\n" + * "Name of the route map\n" + * + */ DEFUN (no_bgp_network_mask, no_bgp_network_mask_cmd, "no network A.B.C.D mask A.B.C.D", @@ -4493,27 +4514,24 @@ DEFUN (no_bgp_network_mask, bgp_node_safi (vty)); } -ALIAS (no_bgp_network_mask, - no_bgp_network_mask_route_map_cmd, - "no network A.B.C.D mask A.B.C.D route-map WORD", - NO_STR - "Specify a network to announce via BGP\n" - "Network number\n" - "Network mask\n" - "Network mask\n" - "Route-map to modify the attributes\n" - "Name of the route map\n") -ALIAS (no_bgp_network_mask, - no_bgp_network_mask_backdoor_cmd, - "no network A.B.C.D mask A.B.C.D backdoor", - NO_STR - "Specify a network to announce via BGP\n" - "Network number\n" - "Network mask\n" - "Network mask\n" - "Specify a BGP backdoor route\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no network A.B.C.D backdoor", + * NO_STR + * "Specify a network to announce via BGP\n" + * "Network number\n" + * "Specify a BGP backdoor route\n" + * + * "no network A.B.C.D route-map WORD", + * NO_STR + * "Specify a network to announce via BGP\n" + * "Network number\n" + * "Route-map to modify the attributes\n" + * "Name of the route map\n" + * + */ DEFUN (no_bgp_network_mask_natural, no_bgp_network_mask_natural_cmd, "no network A.B.C.D", @@ -4535,24 +4553,18 @@ DEFUN (no_bgp_network_mask_natural, bgp_node_safi (vty)); } -ALIAS (no_bgp_network_mask_natural, - no_bgp_network_mask_natural_route_map_cmd, - "no network A.B.C.D route-map WORD", - NO_STR - "Specify a network to announce via BGP\n" - "Network number\n" - "Route-map to modify the attributes\n" - "Name of the route map\n") -ALIAS (no_bgp_network_mask_natural, - no_bgp_network_mask_natural_backdoor_cmd, - "no network A.B.C.D backdoor", - NO_STR - "Specify a network to announce via BGP\n" - "Network number\n" - "Specify a BGP backdoor route\n") #ifdef HAVE_IPV6 +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "ipv6 bgp network X:X::X:X/M", + * IPV6_STR + * BGP_STR + * "Specify a network to announce via BGP\n" + * "IPv6 prefix /, e.g., 3ffe::/16\n" + * + */ DEFUN (ipv6_bgp_network, ipv6_bgp_network_cmd, "network X:X::X:X/M", @@ -4575,6 +4587,23 @@ DEFUN (ipv6_bgp_network_route_map, bgp_node_safi (vty), argv[3]->arg, 0); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no network X:X::X:X/M route-map WORD", + * NO_STR + * "Specify a network to announce via BGP\n" + * "IPv6 prefix /\n" + * "Route-map to modify the attributes\n" + * "Name of the route map\n" + * + * "no ipv6 bgp network X:X::X:X/M", + * NO_STR + * IPV6_STR + * BGP_STR + * "Specify a network to announce via BGP\n" + * "IPv6 prefix /, e.g., 3ffe::/16\n" + * + */ DEFUN (no_ipv6_bgp_network, no_ipv6_bgp_network_cmd, "no network X:X::X:X/M", @@ -4585,31 +4614,8 @@ DEFUN (no_ipv6_bgp_network, return bgp_static_unset (vty, vty->index, argv[2]->arg, AFI_IP6, bgp_node_safi(vty)); } -ALIAS (no_ipv6_bgp_network, - no_ipv6_bgp_network_route_map_cmd, - "no network X:X::X:X/M route-map WORD", - NO_STR - "Specify a network to announce via BGP\n" - "IPv6 prefix /\n" - "Route-map to modify the attributes\n" - "Name of the route map\n") -ALIAS (ipv6_bgp_network, - old_ipv6_bgp_network_cmd, - "ipv6 bgp network X:X::X:X/M", - IPV6_STR - BGP_STR - "Specify a network to announce via BGP\n" - "IPv6 prefix /, e.g., 3ffe::/16\n") -ALIAS (no_ipv6_bgp_network, - old_no_ipv6_bgp_network_cmd, - "no ipv6 bgp network X:X::X:X/M", - NO_STR - IPV6_STR - BGP_STR - "Specify a network to announce via BGP\n" - "IPv6 prefix /, e.g., 3ffe::/16\n") #endif /* HAVE_IPV6 */ /* Aggreagete address: @@ -5313,6 +5319,15 @@ DEFUN (aggregate_address_mask_as_set, } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "aggregate-address A.B.C.D/M summary-only as-set", + * "Configure BGP aggregate entries\n" + * "Aggregate prefix\n" + * "Filter more specific routes from updates\n" + * "Generate AS set path information\n" + * + */ DEFUN (aggregate_address_as_set_summary, aggregate_address_as_set_summary_cmd, "aggregate-address A.B.C.D/M as-set summary-only", @@ -5325,14 +5340,17 @@ DEFUN (aggregate_address_as_set_summary, AGGREGATE_SUMMARY_ONLY, AGGREGATE_AS_SET); } -ALIAS (aggregate_address_as_set_summary, - aggregate_address_summary_as_set_cmd, - "aggregate-address A.B.C.D/M summary-only as-set", - "Configure BGP aggregate entries\n" - "Aggregate prefix\n" - "Filter more specific routes from updates\n" - "Generate AS set path information\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "aggregate-address A.B.C.D A.B.C.D summary-only as-set", + * "Configure BGP aggregate entries\n" + * "Aggregate address\n" + * "Aggregate mask\n" + * "Filter more specific routes from updates\n" + * "Generate AS set path information\n" + * + */ DEFUN (aggregate_address_mask_as_set_summary, aggregate_address_mask_as_set_summary_cmd, "aggregate-address A.B.C.D A.B.C.D as-set summary-only", @@ -5357,15 +5375,36 @@ DEFUN (aggregate_address_mask_as_set_summary, AGGREGATE_SUMMARY_ONLY, AGGREGATE_AS_SET); } -ALIAS (aggregate_address_mask_as_set_summary, - aggregate_address_mask_summary_as_set_cmd, - "aggregate-address A.B.C.D A.B.C.D summary-only as-set", - "Configure BGP aggregate entries\n" - "Aggregate address\n" - "Aggregate mask\n" - "Filter more specific routes from updates\n" - "Generate AS set path information\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no aggregate-address A.B.C.D/M summary-only", + * NO_STR + * "Configure BGP aggregate entries\n" + * "Aggregate prefix\n" + * "Filter more specific routes from updates\n" + * + * "no aggregate-address A.B.C.D/M as-set summary-only", + * NO_STR + * "Configure BGP aggregate entries\n" + * "Aggregate prefix\n" + * "Generate AS set path information\n" + * "Filter more specific routes from updates\n" + * + * "no aggregate-address A.B.C.D/M summary-only as-set", + * NO_STR + * "Configure BGP aggregate entries\n" + * "Aggregate prefix\n" + * "Filter more specific routes from updates\n" + * "Generate AS set path information\n" + * + * "no aggregate-address A.B.C.D/M as-set", + * NO_STR + * "Configure BGP aggregate entries\n" + * "Aggregate prefix\n" + * "Generate AS set path information\n" + * + */ DEFUN (no_aggregate_address, no_aggregate_address_cmd, "no aggregate-address A.B.C.D/M", @@ -5376,40 +5415,43 @@ DEFUN (no_aggregate_address, return bgp_aggregate_unset (vty, argv[2]->arg, AFI_IP, bgp_node_safi (vty)); } -ALIAS (no_aggregate_address, - no_aggregate_address_summary_only_cmd, - "no aggregate-address A.B.C.D/M summary-only", - NO_STR - "Configure BGP aggregate entries\n" - "Aggregate prefix\n" - "Filter more specific routes from updates\n") -ALIAS (no_aggregate_address, - no_aggregate_address_as_set_cmd, - "no aggregate-address A.B.C.D/M as-set", - NO_STR - "Configure BGP aggregate entries\n" - "Aggregate prefix\n" - "Generate AS set path information\n") -ALIAS (no_aggregate_address, - no_aggregate_address_as_set_summary_cmd, - "no aggregate-address A.B.C.D/M as-set summary-only", - NO_STR - "Configure BGP aggregate entries\n" - "Aggregate prefix\n" - "Generate AS set path information\n" - "Filter more specific routes from updates\n") -ALIAS (no_aggregate_address, - no_aggregate_address_summary_as_set_cmd, - "no aggregate-address A.B.C.D/M summary-only as-set", - NO_STR - "Configure BGP aggregate entries\n" - "Aggregate prefix\n" - "Filter more specific routes from updates\n" - "Generate AS set path information\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no aggregate-address A.B.C.D A.B.C.D summary-only as-set", + * NO_STR + * "Configure BGP aggregate entries\n" + * "Aggregate address\n" + * "Aggregate mask\n" + * "Filter more specific routes from updates\n" + * "Generate AS set path information\n" + * + * "no aggregate-address A.B.C.D A.B.C.D as-set summary-only", + * NO_STR + * "Configure BGP aggregate entries\n" + * "Aggregate address\n" + * "Aggregate mask\n" + * "Generate AS set path information\n" + * "Filter more specific routes from updates\n" + * + * "no aggregate-address A.B.C.D A.B.C.D summary-only", + * NO_STR + * "Configure BGP aggregate entries\n" + * "Aggregate address\n" + * "Aggregate mask\n" + * "Filter more specific routes from updates\n" + * + * "no aggregate-address A.B.C.D A.B.C.D as-set", + * NO_STR + * "Configure BGP aggregate entries\n" + * "Aggregate address\n" + * "Aggregate mask\n" + * "Generate AS set path information\n" + * + */ DEFUN (no_aggregate_address_mask, no_aggregate_address_mask_cmd, "no aggregate-address A.B.C.D A.B.C.D", @@ -5432,45 +5474,20 @@ DEFUN (no_aggregate_address_mask, return bgp_aggregate_unset (vty, prefix_str, AFI_IP, bgp_node_safi (vty)); } -ALIAS (no_aggregate_address_mask, - no_aggregate_address_mask_summary_only_cmd, - "no aggregate-address A.B.C.D A.B.C.D summary-only", - NO_STR - "Configure BGP aggregate entries\n" - "Aggregate address\n" - "Aggregate mask\n" - "Filter more specific routes from updates\n") -ALIAS (no_aggregate_address_mask, - no_aggregate_address_mask_as_set_cmd, - "no aggregate-address A.B.C.D A.B.C.D as-set", - NO_STR - "Configure BGP aggregate entries\n" - "Aggregate address\n" - "Aggregate mask\n" - "Generate AS set path information\n") -ALIAS (no_aggregate_address_mask, - no_aggregate_address_mask_as_set_summary_cmd, - "no aggregate-address A.B.C.D A.B.C.D as-set summary-only", - NO_STR - "Configure BGP aggregate entries\n" - "Aggregate address\n" - "Aggregate mask\n" - "Generate AS set path information\n" - "Filter more specific routes from updates\n") -ALIAS (no_aggregate_address_mask, - no_aggregate_address_mask_summary_as_set_cmd, - "no aggregate-address A.B.C.D A.B.C.D summary-only as-set", - NO_STR - "Configure BGP aggregate entries\n" - "Aggregate address\n" - "Aggregate mask\n" - "Filter more specific routes from updates\n" - "Generate AS set path information\n") #ifdef HAVE_IPV6 +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "ipv6 bgp aggregate-address X:X::X:X/M", + * IPV6_STR + * BGP_STR + * "Configure BGP aggregate entries\n" + * "Aggregate prefix\n" + * + */ DEFUN (ipv6_aggregate_address, ipv6_aggregate_address_cmd, "aggregate-address X:X::X:X/M", @@ -5480,6 +5497,16 @@ DEFUN (ipv6_aggregate_address, return bgp_aggregate_set (vty, argv[1]->arg, AFI_IP6, SAFI_UNICAST, 0, 0); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "ipv6 bgp aggregate-address X:X::X:X/M summary-only", + * IPV6_STR + * BGP_STR + * "Configure BGP aggregate entries\n" + * "Aggregate prefix\n" + * "Filter more specific routes from updates\n" + * + */ DEFUN (ipv6_aggregate_address_summary_only, ipv6_aggregate_address_summary_only_cmd, "aggregate-address X:X::X:X/M summary-only", @@ -5491,6 +5518,16 @@ DEFUN (ipv6_aggregate_address_summary_only, AGGREGATE_SUMMARY_ONLY, 0); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ipv6 bgp aggregate-address X:X::X:X/M", + * NO_STR + * IPV6_STR + * BGP_STR + * "Configure BGP aggregate entries\n" + * "Aggregate prefix\n" + * + */ DEFUN (no_ipv6_aggregate_address, no_ipv6_aggregate_address_cmd, "no aggregate-address X:X::X:X/M", @@ -5501,6 +5538,17 @@ DEFUN (no_ipv6_aggregate_address, return bgp_aggregate_unset (vty, argv[2]->arg, AFI_IP6, SAFI_UNICAST); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ipv6 bgp aggregate-address X:X::X:X/M summary-only", + * NO_STR + * IPV6_STR + * BGP_STR + * "Configure BGP aggregate entries\n" + * "Aggregate prefix\n" + * "Filter more specific routes from updates\n" + * + */ DEFUN (no_ipv6_aggregate_address_summary_only, no_ipv6_aggregate_address_summary_only_cmd, "no aggregate-address X:X::X:X/M summary-only", @@ -5512,41 +5560,9 @@ DEFUN (no_ipv6_aggregate_address_summary_only, return bgp_aggregate_unset (vty, argv[2]->arg, AFI_IP6, SAFI_UNICAST); } -ALIAS (ipv6_aggregate_address, - old_ipv6_aggregate_address_cmd, - "ipv6 bgp aggregate-address X:X::X:X/M", - IPV6_STR - BGP_STR - "Configure BGP aggregate entries\n" - "Aggregate prefix\n") -ALIAS (ipv6_aggregate_address_summary_only, - old_ipv6_aggregate_address_summary_only_cmd, - "ipv6 bgp aggregate-address X:X::X:X/M summary-only", - IPV6_STR - BGP_STR - "Configure BGP aggregate entries\n" - "Aggregate prefix\n" - "Filter more specific routes from updates\n") -ALIAS (no_ipv6_aggregate_address, - old_no_ipv6_aggregate_address_cmd, - "no ipv6 bgp aggregate-address X:X::X:X/M", - NO_STR - IPV6_STR - BGP_STR - "Configure BGP aggregate entries\n" - "Aggregate prefix\n") -ALIAS (no_ipv6_aggregate_address_summary_only, - old_no_ipv6_aggregate_address_summary_only_cmd, - "no ipv6 bgp aggregate-address X:X::X:X/M summary-only", - NO_STR - IPV6_STR - BGP_STR - "Configure BGP aggregate entries\n" - "Aggregate prefix\n" - "Filter more specific routes from updates\n") #endif /* HAVE_IPV6 */ /* Redistribute route treatment. */ @@ -7934,6 +7950,17 @@ DEFUN (show_ip_bgp, return bgp_show (vty, NULL, AFI_IP, SAFI_UNICAST, bgp_show_type_normal, NULL, use_json(argc, argv)); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp ipv4 (unicast|multicast) {json}", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_ip_bgp_ipv4, show_ip_bgp_ipv4_cmd, "show ip bgp ipv4 (unicast|multicast) {json}", @@ -7954,15 +7981,6 @@ DEFUN (show_ip_bgp_ipv4, return bgp_show (vty, NULL, AFI_IP, SAFI_UNICAST, bgp_show_type_normal, NULL, uj); } -ALIAS (show_ip_bgp_ipv4, - show_bgp_ipv4_safi_cmd, - "show bgp ipv4 (unicast|multicast) {json}", - SHOW_STR - BGP_STR - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - "JavaScript Object Notation\n") DEFUN (show_ip_bgp_route, show_ip_bgp_route_cmd, @@ -8058,6 +8076,18 @@ DEFUN (show_bgp_ipv6_prefix, return bgp_show_route (vty, NULL, argv[3]->arg, AFI_IP6, SAFI_UNICAST, NULL, 1, BGP_PATH_ALL, use_json (argc,argv)); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp ipv4 (unicast|multicast) A.B.C.D {json}", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * "Network in the BGP routing table to display\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_ip_bgp_ipv4_route, show_ip_bgp_ipv4_route_cmd, "show ip bgp ipv4 (unicast|multicast) A.B.C.D {json}", @@ -8078,16 +8108,6 @@ DEFUN (show_ip_bgp_ipv4_route, return bgp_show_route (vty, NULL, argv[5]->arg, AFI_IP, SAFI_UNICAST, NULL, 0, BGP_PATH_ALL, uj); } -ALIAS (show_ip_bgp_ipv4_route, - show_bgp_ipv4_safi_route_cmd, - "show bgp ipv4 (unicast|multicast) A.B.C.D {json}", - SHOW_STR - BGP_STR - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - "Network in the BGP routing table to display\n" - "JavaScript Object Notation\n") DEFUN (show_ip_bgp_vpnv4_all_route, show_ip_bgp_vpnv4_all_route_cmd, @@ -8232,6 +8252,18 @@ DEFUN (show_ip_bgp_prefix_pathtype, return bgp_show_route (vty, NULL, argv[3]->arg, AFI_IP, SAFI_UNICAST, NULL, 1, BGP_PATH_MULTIPATH, uj); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp ipv4 (unicast|multicast) A.B.C.D/M {json}", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * "IP prefix /, e.g., 35.0.0.0/8\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_ip_bgp_ipv4_prefix, show_ip_bgp_ipv4_prefix_cmd, "show ip bgp ipv4 (unicast|multicast) A.B.C.D/M {json}", @@ -8252,17 +8284,21 @@ DEFUN (show_ip_bgp_ipv4_prefix, return bgp_show_route (vty, NULL, argv[5]->arg, AFI_IP, SAFI_UNICAST, NULL, 1, BGP_PATH_ALL, uj); } -ALIAS (show_ip_bgp_ipv4_prefix, - show_bgp_ipv4_safi_prefix_cmd, - "show bgp ipv4 (unicast|multicast) A.B.C.D/M {json}", - SHOW_STR - BGP_STR - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - "IP prefix /, e.g., 35.0.0.0/8\n" - "JavaScript Object Notation\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp ipv4 (unicast|multicast) A.B.C.D/M (bestpath|multipath) {json}", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * "IP prefix /, e.g., 35.0.0.0/8\n" + * "Display only the bestpath\n" + * "Display only multipaths\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_ip_bgp_ipv4_prefix_pathtype, show_ip_bgp_ipv4_prefix_pathtype_cmd, "show ip bgp ipv4 (unicast|multicast) A.B.C.D/M (bestpath|multipath) {json}", @@ -8291,18 +8327,6 @@ DEFUN (show_ip_bgp_ipv4_prefix_pathtype, return bgp_show_route (vty, NULL, argv[5]->arg, AFI_IP, SAFI_UNICAST, NULL, 1, BGP_PATH_MULTIPATH, uj); } -ALIAS (show_ip_bgp_ipv4_prefix_pathtype, - show_bgp_ipv4_safi_prefix_pathtype_cmd, - "show bgp ipv4 (unicast|multicast) A.B.C.D/M (bestpath|multipath) {json}", - SHOW_STR - BGP_STR - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - "IP prefix /, e.g., 35.0.0.0/8\n" - "Display only the bestpath\n" - "Display only multipaths\n" - "JavaScript Object Notation\n") DEFUN (show_ip_bgp_vpnv4_all_prefix, show_ip_bgp_vpnv4_all_prefix_cmd, @@ -8445,6 +8469,15 @@ DEFUN (show_ip_bgp_instance_prefix_pathtype, } #ifdef HAVE_IPV6 +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp ipv6 {json}", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_bgp, show_bgp_cmd, "show bgp {json}", @@ -8456,13 +8489,6 @@ DEFUN (show_bgp, NULL, use_json(argc, argv)); } -ALIAS (show_bgp, - show_bgp_ipv6_cmd, - "show bgp ipv6 {json}", - SHOW_STR - BGP_STR - "Address family\n" - "JavaScript Object Notation\n") DEFUN (show_bgp_ipv6_safi, show_bgp_ipv6_safi_cmd, @@ -8533,6 +8559,18 @@ DEFUN (show_bgp_ipv6_safi_route, return bgp_show_route (vty, NULL, argv[4]->arg, AFI_IP6, SAFI_UNICAST, NULL, 0, BGP_PATH_ALL, uj); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp ipv6 X:X::X:X (bestpath|multipath) {json}", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Network in the BGP routing table to display\n" + * "Display only the bestpath\n" + * "Display only multipaths\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_bgp_route_pathtype, show_bgp_route_pathtype_cmd, "show bgp X:X::X:X (bestpath|multipath) {json}", @@ -8550,16 +8588,6 @@ DEFUN (show_bgp_route_pathtype, return bgp_show_route (vty, NULL, argv[2]->arg, AFI_IP6, SAFI_UNICAST, NULL, 0, BGP_PATH_MULTIPATH, uj); } -ALIAS (show_bgp_route_pathtype, - show_bgp_ipv6_route_pathtype_cmd, - "show bgp ipv6 X:X::X:X (bestpath|multipath) {json}", - SHOW_STR - BGP_STR - "Address family\n" - "Network in the BGP routing table to display\n" - "Display only the bestpath\n" - "Display only multipaths\n" - "JavaScript Object Notation\n") DEFUN (show_bgp_ipv6_safi_route_pathtype, show_bgp_ipv6_safi_route_pathtype_cmd, @@ -8630,6 +8658,18 @@ DEFUN (show_bgp_ipv6_safi_prefix, return bgp_show_route (vty, NULL, argv[4]->arg, AFI_IP6, SAFI_UNICAST, NULL, 1, BGP_PATH_ALL, uj); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp ipv6 X:X::X:X/M (bestpath|multipath) {json}", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "IPv6 prefix /\n" + * "Display only the bestpath\n" + * "Display only multipaths\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_bgp_prefix_pathtype, show_bgp_prefix_pathtype_cmd, "show bgp X:X::X:X/M (bestpath|multipath) {json}", @@ -8647,16 +8687,6 @@ DEFUN (show_bgp_prefix_pathtype, return bgp_show_route (vty, NULL, argv[2]->arg, AFI_IP6, SAFI_UNICAST, NULL, 1, BGP_PATH_MULTIPATH, uj); } -ALIAS (show_bgp_prefix_pathtype, - show_bgp_ipv6_prefix_pathtype_cmd, - "show bgp ipv6 X:X::X:X/M (bestpath|multipath) {json}", - SHOW_STR - BGP_STR - "Address family\n" - "IPv6 prefix /\n" - "Display only the bestpath\n" - "Display only multipaths\n" - "JavaScript Object Notation\n") DEFUN (show_bgp_ipv6_safi_prefix_pathtype, show_bgp_ipv6_safi_prefix_pathtype_cmd, @@ -8698,6 +8728,16 @@ DEFUN (show_ipv6_bgp_prefix, return bgp_show_route (vty, NULL, argv[3]->arg, AFI_IP6, SAFI_UNICAST, NULL, 1, BGP_PATH_ALL, use_json(argc, argv)); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp " BGP_INSTANCE_CMD " ipv6 {json}", + * SHOW_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_bgp_view, show_bgp_instance_cmd, "show bgp " BGP_INSTANCE_CMD " {json}", @@ -8733,15 +8773,18 @@ DEFUN (show_bgp_instance_all, return CMD_SUCCESS; } -ALIAS (show_bgp_view, - show_bgp_instance_ipv6_cmd, - "show bgp " BGP_INSTANCE_CMD " ipv6 {json}", - SHOW_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "JavaScript Object Notation\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp " BGP_INSTANCE_CMD " ipv6 X:X::X:X {json}", + * SHOW_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Network in the BGP routing table to display\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_bgp_instance_route, show_bgp_instance_route_cmd, "show bgp " BGP_INSTANCE_CMD " X:X::X:X {json}", @@ -8754,16 +8797,20 @@ DEFUN (show_bgp_instance_route, return bgp_show_route (vty, argv[3]->arg, argv[4]->arg, AFI_IP6, SAFI_UNICAST, NULL, 0, BGP_PATH_ALL, use_json(argc, argv)); } -ALIAS (show_bgp_instance_route, - show_bgp_instance_ipv6_route_cmd, - "show bgp " BGP_INSTANCE_CMD " ipv6 X:X::X:X {json}", - SHOW_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Network in the BGP routing table to display\n" - "JavaScript Object Notation\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp " BGP_INSTANCE_CMD " ipv6 X:X::X:X (bestpath|multipath) {json}", + * SHOW_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Network in the BGP routing table to display\n" + * "Display only the bestpath\n" + * "Display only multipaths\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_bgp_instance_route_pathtype, show_bgp_instance_route_pathtype_cmd, "show bgp " BGP_INSTANCE_CMD " X:X::X:X (bestpath|multipath) {json}", @@ -8782,18 +8829,18 @@ DEFUN (show_bgp_instance_route_pathtype, return bgp_show_route (vty, argv[3]->arg, argv[4]->arg, AFI_IP6, SAFI_UNICAST, NULL, 0, BGP_PATH_MULTIPATH, uj); } -ALIAS (show_bgp_instance_route_pathtype, - show_bgp_instance_ipv6_route_pathtype_cmd, - "show bgp " BGP_INSTANCE_CMD " ipv6 X:X::X:X (bestpath|multipath) {json}", - SHOW_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Network in the BGP routing table to display\n" - "Display only the bestpath\n" - "Display only multipaths\n" - "JavaScript Object Notation\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp " BGP_INSTANCE_CMD " ipv6 X:X::X:X/M {json}", + * SHOW_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "IPv6 prefix /\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_bgp_instance_prefix, show_bgp_instance_prefix_cmd, "show bgp " BGP_INSTANCE_CMD " X:X::X:X/M {json}", @@ -8806,16 +8853,20 @@ DEFUN (show_bgp_instance_prefix, return bgp_show_route (vty, argv[3]->arg, argv[4]->arg, AFI_IP6, SAFI_UNICAST, NULL, 1, BGP_PATH_ALL, use_json(argc, argv)); } -ALIAS (show_bgp_instance_prefix, - show_bgp_instance_ipv6_prefix_cmd, - "show bgp " BGP_INSTANCE_CMD " ipv6 X:X::X:X/M {json}", - SHOW_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "IPv6 prefix /\n" - "JavaScript Object Notation\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp " BGP_INSTANCE_CMD " ipv6 X:X::X:X/M (bestpath|multipath) {json}", + * SHOW_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "IPv6 prefix /\n" + * "Display only the bestpath\n" + * "Display only multipaths\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_bgp_instance_prefix_pathtype, show_bgp_instance_prefix_pathtype_cmd, "show bgp " BGP_INSTANCE_CMD " X:X::X:X/M (bestpath|multipath) {json}", @@ -8834,18 +8885,18 @@ DEFUN (show_bgp_instance_prefix_pathtype, return bgp_show_route (vty, argv[3]->arg, argv[4]->arg, AFI_IP6, SAFI_UNICAST, NULL, 1, BGP_PATH_MULTIPATH, uj); } -ALIAS (show_bgp_instance_prefix_pathtype, - show_bgp_instance_ipv6_prefix_pathtype_cmd, - "show bgp " BGP_INSTANCE_CMD " ipv6 X:X::X:X/M (bestpath|multipath) {json}", - SHOW_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "IPv6 prefix /\n" - "Display only the bestpath\n" - "Display only multipaths\n" - "JavaScript Object Notation\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp " BGP_INSTANCE_CMD " ipv6 prefix-list WORD", + * SHOW_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Display routes conforming to the prefix-list\n" + * "IPv6 prefix-list name\n" + * + */ DEFUN (show_bgp_instance_prefix_list, show_bgp_instance_prefix_list_cmd, "show bgp " BGP_INSTANCE_CMD " prefix-list WORD", @@ -8859,16 +8910,18 @@ DEFUN (show_bgp_instance_prefix_list, bgp_show_type_prefix_list); } -ALIAS (show_bgp_instance_prefix_list, - show_bgp_instance_ipv6_prefix_list_cmd, - "show bgp " BGP_INSTANCE_CMD " ipv6 prefix-list WORD", - SHOW_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Display routes conforming to the prefix-list\n" - "IPv6 prefix-list name\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp " BGP_INSTANCE_CMD " ipv6 filter-list WORD", + * SHOW_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Display routes conforming to the filter-list\n" + * "Regular expression access list name\n" + * + */ DEFUN (show_bgp_instance_filter_list, show_bgp_instance_filter_list_cmd, "show bgp " BGP_INSTANCE_CMD " filter-list WORD", @@ -8882,16 +8935,18 @@ DEFUN (show_bgp_instance_filter_list, bgp_show_type_filter_list); } -ALIAS (show_bgp_instance_filter_list, - show_bgp_instance_ipv6_filter_list_cmd, - "show bgp " BGP_INSTANCE_CMD " ipv6 filter-list WORD", - SHOW_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Display routes conforming to the filter-list\n" - "Regular expression access list name\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp " BGP_INSTANCE_CMD " ipv6 route-map WORD", + * SHOW_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Display routes matching the route-map\n" + * "A route-map to match on\n" + * + */ DEFUN (show_bgp_instance_route_map, show_bgp_instance_route_map_cmd, "show bgp " BGP_INSTANCE_CMD " route-map WORD", @@ -8905,16 +8960,19 @@ DEFUN (show_bgp_instance_route_map, bgp_show_type_route_map); } -ALIAS (show_bgp_instance_route_map, - show_bgp_instance_ipv6_route_map_cmd, - "show bgp " BGP_INSTANCE_CMD " ipv6 route-map WORD", - SHOW_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Display routes matching the route-map\n" - "A route-map to match on\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp " BGP_INSTANCE_CMD " ipv6 community-list (<1-500>|WORD)", + * SHOW_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Display routes matching the community-list\n" + * "community-list number\n" + * "community-list name\n" + * + */ DEFUN (show_bgp_instance_community_list, show_bgp_instance_community_list_cmd, "show bgp " BGP_INSTANCE_CMD " community-list (<1-500>|WORD)", @@ -8928,17 +8986,18 @@ DEFUN (show_bgp_instance_community_list, return bgp_show_community_list (vty, argv[3]->arg, argv[5]->arg, 0, AFI_IP6, SAFI_UNICAST); } -ALIAS (show_bgp_instance_community_list, - show_bgp_instance_ipv6_community_list_cmd, - "show bgp " BGP_INSTANCE_CMD " ipv6 community-list (<1-500>|WORD)", - SHOW_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Display routes matching the community-list\n" - "community-list number\n" - "community-list name\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp " BGP_INSTANCE_CMD " ipv6 X:X::X:X/M longer-prefixes", + * SHOW_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "IPv6 prefix /\n" + * "Display route and more specific routes\n" + * + */ DEFUN (show_bgp_instance_prefix_longer, show_bgp_instance_prefix_longer_cmd, "show bgp " BGP_INSTANCE_CMD " X:X::X:X/M longer-prefixes", @@ -8952,15 +9011,6 @@ DEFUN (show_bgp_instance_prefix_longer, bgp_show_type_prefix_longer); } -ALIAS (show_bgp_instance_prefix_longer, - show_bgp_instance_ipv6_prefix_longer_cmd, - "show bgp " BGP_INSTANCE_CMD " ipv6 X:X::X:X/M longer-prefixes", - SHOW_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "IPv6 prefix /\n" - "Display route and more specific routes\n") /* old command */ DEFUN (show_ipv6_mbgp, @@ -9051,7 +9101,7 @@ bgp_show_regexp (struct vty *vty, int argc, struct cmd_token **argv, afi_t afi, return rc; } -DEFUN (show_ip_bgp_regexp, +DEFUN (show_ip_bgp_regexp, show_ip_bgp_regexp_cmd, "show ip bgp regexp .LINE", SHOW_STR @@ -9064,7 +9114,19 @@ DEFUN (show_ip_bgp_regexp, bgp_show_type_regexp); } -DEFUN (show_ip_bgp_flap_regexp, +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip bgp dampening flap-statistics regexp .LINE", + * SHOW_STR + * IP_STR + * BGP_STR + * "Display detailed information about dampening\n" + * "Display flap statistics of routes\n" + * "Display routes matching the AS path regular expression\n" + * "A regular-expression to match the BGP AS paths\n" + * + */ +DEFUN (show_ip_bgp_flap_regexp, show_ip_bgp_flap_regexp_cmd, "show ip bgp flap-statistics regexp .LINE", SHOW_STR @@ -9078,18 +9140,8 @@ DEFUN (show_ip_bgp_flap_regexp, bgp_show_type_flap_regexp); } -ALIAS (show_ip_bgp_flap_regexp, - show_ip_bgp_damp_flap_regexp_cmd, - "show ip bgp dampening flap-statistics regexp .LINE", - SHOW_STR - IP_STR - BGP_STR - "Display detailed information about dampening\n" - "Display flap statistics of routes\n" - "Display routes matching the AS path regular expression\n" - "A regular-expression to match the BGP AS paths\n") -DEFUN (show_ip_bgp_ipv4_regexp, +DEFUN (show_ip_bgp_ipv4_regexp, show_ip_bgp_ipv4_regexp_cmd, "show ip bgp ipv4 (unicast|multicast) regexp .LINE", SHOW_STR @@ -9110,7 +9162,17 @@ DEFUN (show_ip_bgp_ipv4_regexp, } #ifdef HAVE_IPV6 -DEFUN (show_bgp_regexp, +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp ipv6 regexp .LINE", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Display routes matching the AS path regular expression\n" + * "A regular-expression to match the BGP AS paths\n" + * + */ +DEFUN (show_bgp_regexp, show_bgp_regexp_cmd, "show bgp regexp .LINE", SHOW_STR @@ -9122,17 +9184,9 @@ DEFUN (show_bgp_regexp, bgp_show_type_regexp); } -ALIAS (show_bgp_regexp, - show_bgp_ipv6_regexp_cmd, - "show bgp ipv6 regexp .LINE", - SHOW_STR - BGP_STR - "Address family\n" - "Display routes matching the AS path regular expression\n" - "A regular-expression to match the BGP AS paths\n") /* old command */ -DEFUN (show_ipv6_bgp_regexp, +DEFUN (show_ipv6_bgp_regexp, show_ipv6_bgp_regexp_cmd, "show ipv6 bgp regexp .LINE", SHOW_STR @@ -9147,7 +9201,7 @@ DEFUN (show_ipv6_bgp_regexp, } /* old command */ -DEFUN (show_ipv6_mbgp_regexp, +DEFUN (show_ipv6_mbgp_regexp, show_ipv6_mbgp_regexp_cmd, "show ipv6 mbgp regexp .LINE", SHOW_STR @@ -9187,7 +9241,7 @@ bgp_show_prefix_list (struct vty *vty, const char *name, return bgp_show (vty, bgp, afi, safi, type, plist, 0); } -DEFUN (show_ip_bgp_prefix_list, +DEFUN (show_ip_bgp_prefix_list, show_ip_bgp_prefix_list_cmd, "show ip bgp prefix-list WORD", SHOW_STR @@ -9214,7 +9268,19 @@ DEFUN (show_ip_bgp_instance_prefix_list, bgp_show_type_prefix_list); } -DEFUN (show_ip_bgp_flap_prefix_list, +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip bgp dampening flap-statistics prefix-list WORD", + * SHOW_STR + * IP_STR + * BGP_STR + * "Display detailed information about dampening\n" + * "Display flap statistics of routes\n" + * "Display routes conforming to the prefix-list\n" + * "IP prefix-list name\n" + * + */ +DEFUN (show_ip_bgp_flap_prefix_list, show_ip_bgp_flap_prefix_list_cmd, "show ip bgp flap-statistics prefix-list WORD", SHOW_STR @@ -9228,18 +9294,8 @@ DEFUN (show_ip_bgp_flap_prefix_list, bgp_show_type_flap_prefix_list); } -ALIAS (show_ip_bgp_flap_prefix_list, - show_ip_bgp_damp_flap_prefix_list_cmd, - "show ip bgp dampening flap-statistics prefix-list WORD", - SHOW_STR - IP_STR - BGP_STR - "Display detailed information about dampening\n" - "Display flap statistics of routes\n" - "Display routes conforming to the prefix-list\n" - "IP prefix-list name\n") -DEFUN (show_ip_bgp_ipv4_prefix_list, +DEFUN (show_ip_bgp_ipv4_prefix_list, show_ip_bgp_ipv4_prefix_list_cmd, "show ip bgp ipv4 (unicast|multicast) prefix-list WORD", SHOW_STR @@ -9260,7 +9316,17 @@ DEFUN (show_ip_bgp_ipv4_prefix_list, } #ifdef HAVE_IPV6 -DEFUN (show_bgp_prefix_list, +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp ipv6 prefix-list WORD", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Display routes conforming to the prefix-list\n" + * "IPv6 prefix-list name\n" + * + */ +DEFUN (show_bgp_prefix_list, show_bgp_prefix_list_cmd, "show bgp prefix-list WORD", SHOW_STR @@ -9272,17 +9338,9 @@ DEFUN (show_bgp_prefix_list, bgp_show_type_prefix_list); } -ALIAS (show_bgp_prefix_list, - show_bgp_ipv6_prefix_list_cmd, - "show bgp ipv6 prefix-list WORD", - SHOW_STR - BGP_STR - "Address family\n" - "Display routes conforming to the prefix-list\n" - "IPv6 prefix-list name\n") /* old command */ -DEFUN (show_ipv6_bgp_prefix_list, +DEFUN (show_ipv6_bgp_prefix_list, show_ipv6_bgp_prefix_list_cmd, "show ipv6 bgp prefix-list WORD", SHOW_STR @@ -9297,7 +9355,7 @@ DEFUN (show_ipv6_bgp_prefix_list, } /* old command */ -DEFUN (show_ipv6_mbgp_prefix_list, +DEFUN (show_ipv6_mbgp_prefix_list, show_ipv6_mbgp_prefix_list_cmd, "show ipv6 mbgp prefix-list WORD", SHOW_STR @@ -9336,7 +9394,7 @@ bgp_show_filter_list (struct vty *vty, const char *name, return bgp_show (vty, bgp, afi, safi, type, as_list, 0); } -DEFUN (show_ip_bgp_filter_list, +DEFUN (show_ip_bgp_filter_list, show_ip_bgp_filter_list_cmd, "show ip bgp filter-list WORD", SHOW_STR @@ -9363,7 +9421,19 @@ DEFUN (show_ip_bgp_instance_filter_list, bgp_show_type_filter_list); } -DEFUN (show_ip_bgp_flap_filter_list, +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip bgp dampening flap-statistics filter-list WORD", + * SHOW_STR + * IP_STR + * BGP_STR + * "Display detailed information about dampening\n" + * "Display flap statistics of routes\n" + * "Display routes conforming to the filter-list\n" + * "Regular expression access list name\n" + * + */ +DEFUN (show_ip_bgp_flap_filter_list, show_ip_bgp_flap_filter_list_cmd, "show ip bgp flap-statistics filter-list WORD", SHOW_STR @@ -9377,18 +9447,8 @@ DEFUN (show_ip_bgp_flap_filter_list, bgp_show_type_flap_filter_list); } -ALIAS (show_ip_bgp_flap_filter_list, - show_ip_bgp_damp_flap_filter_list_cmd, - "show ip bgp dampening flap-statistics filter-list WORD", - SHOW_STR - IP_STR - BGP_STR - "Display detailed information about dampening\n" - "Display flap statistics of routes\n" - "Display routes conforming to the filter-list\n" - "Regular expression access list name\n") -DEFUN (show_ip_bgp_ipv4_filter_list, +DEFUN (show_ip_bgp_ipv4_filter_list, show_ip_bgp_ipv4_filter_list_cmd, "show ip bgp ipv4 (unicast|multicast) filter-list WORD", SHOW_STR @@ -9409,7 +9469,17 @@ DEFUN (show_ip_bgp_ipv4_filter_list, } #ifdef HAVE_IPV6 -DEFUN (show_bgp_filter_list, +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp ipv6 filter-list WORD", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Display routes conforming to the filter-list\n" + * "Regular expression access list name\n" + * + */ +DEFUN (show_bgp_filter_list, show_bgp_filter_list_cmd, "show bgp filter-list WORD", SHOW_STR @@ -9421,17 +9491,9 @@ DEFUN (show_bgp_filter_list, bgp_show_type_filter_list); } -ALIAS (show_bgp_filter_list, - show_bgp_ipv6_filter_list_cmd, - "show bgp ipv6 filter-list WORD", - SHOW_STR - BGP_STR - "Address family\n" - "Display routes conforming to the filter-list\n" - "Regular expression access list name\n") /* old command */ -DEFUN (show_ipv6_bgp_filter_list, +DEFUN (show_ipv6_bgp_filter_list, show_ipv6_bgp_filter_list_cmd, "show ipv6 bgp filter-list WORD", SHOW_STR @@ -9446,7 +9508,7 @@ DEFUN (show_ipv6_bgp_filter_list, } /* old command */ -DEFUN (show_ipv6_mbgp_filter_list, +DEFUN (show_ipv6_mbgp_filter_list, show_ipv6_mbgp_filter_list_cmd, "show ipv6 mbgp filter-list WORD", SHOW_STR @@ -9558,7 +9620,7 @@ bgp_show_route_map (struct vty *vty, const char *name, return bgp_show (vty, bgp, afi, safi, type, rmap, 0); } -DEFUN (show_ip_bgp_route_map, +DEFUN (show_ip_bgp_route_map, show_ip_bgp_route_map_cmd, "show ip bgp route-map WORD", SHOW_STR @@ -9585,7 +9647,19 @@ DEFUN (show_ip_bgp_instance_route_map, bgp_show_type_route_map); } -DEFUN (show_ip_bgp_flap_route_map, +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip bgp dampening flap-statistics route-map WORD", + * SHOW_STR + * IP_STR + * BGP_STR + * "Display detailed information about dampening\n" + * "Display flap statistics of routes\n" + * "Display routes matching the route-map\n" + * "A route-map to match on\n" + * + */ +DEFUN (show_ip_bgp_flap_route_map, show_ip_bgp_flap_route_map_cmd, "show ip bgp flap-statistics route-map WORD", SHOW_STR @@ -9599,18 +9673,8 @@ DEFUN (show_ip_bgp_flap_route_map, bgp_show_type_flap_route_map); } -ALIAS (show_ip_bgp_flap_route_map, - show_ip_bgp_damp_flap_route_map_cmd, - "show ip bgp dampening flap-statistics route-map WORD", - SHOW_STR - IP_STR - BGP_STR - "Display detailed information about dampening\n" - "Display flap statistics of routes\n" - "Display routes matching the route-map\n" - "A route-map to match on\n") -DEFUN (show_ip_bgp_ipv4_route_map, +DEFUN (show_ip_bgp_ipv4_route_map, show_ip_bgp_ipv4_route_map_cmd, "show ip bgp ipv4 (unicast|multicast) route-map WORD", SHOW_STR @@ -9630,7 +9694,17 @@ DEFUN (show_ip_bgp_ipv4_route_map, bgp_show_type_route_map); } -DEFUN (show_bgp_route_map, +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp ipv6 route-map WORD", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Display routes matching the route-map\n" + * "A route-map to match on\n" + * + */ +DEFUN (show_bgp_route_map, show_bgp_route_map_cmd, "show bgp route-map WORD", SHOW_STR @@ -9642,14 +9716,6 @@ DEFUN (show_bgp_route_map, bgp_show_type_route_map); } -ALIAS (show_bgp_route_map, - show_bgp_ipv6_route_map_cmd, - "show bgp ipv6 route-map WORD", - SHOW_STR - BGP_STR - "Address family\n" - "Display routes matching the route-map\n" - "A route-map to match on\n") DEFUN (show_ip_bgp_cidr_only, show_ip_bgp_cidr_only_cmd, @@ -9663,6 +9729,17 @@ DEFUN (show_ip_bgp_cidr_only, bgp_show_type_cidr_only, NULL, 0); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip bgp dampening flap-statistics cidr-only", + * SHOW_STR + * IP_STR + * BGP_STR + * "Display detailed information about dampening\n" + * "Display flap statistics of routes\n" + * "Display only routes with non-natural netmasks\n" + * + */ DEFUN (show_ip_bgp_flap_cidr_only, show_ip_bgp_flap_cidr_only_cmd, "show ip bgp flap-statistics cidr-only", @@ -9676,15 +9753,6 @@ DEFUN (show_ip_bgp_flap_cidr_only, bgp_show_type_flap_cidr_only, NULL, 0); } -ALIAS (show_ip_bgp_flap_cidr_only, - show_ip_bgp_damp_flap_cidr_only_cmd, - "show ip bgp dampening flap-statistics cidr-only", - SHOW_STR - IP_STR - BGP_STR - "Display detailed information about dampening\n" - "Display flap statistics of routes\n" - "Display only routes with non-natural netmasks\n") DEFUN (show_ip_bgp_ipv4_cidr_only, show_ip_bgp_ipv4_cidr_only_cmd, @@ -9737,6 +9805,15 @@ DEFUN (show_ip_bgp_ipv4_community_all, } #ifdef HAVE_IPV6 +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp ipv6 community", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Display routes matching the communities\n" + * + */ DEFUN (show_bgp_community_all, show_bgp_community_all_cmd, "show bgp community", @@ -9748,13 +9825,6 @@ DEFUN (show_bgp_community_all, bgp_show_type_community_all, NULL, 0); } -ALIAS (show_bgp_community_all, - show_bgp_ipv6_community_all_cmd, - "show bgp ipv6 community", - SHOW_STR - BGP_STR - "Address family\n" - "Display routes matching the communities\n") /* old command */ DEFUN (show_ipv6_bgp_community_all, @@ -9848,6 +9918,63 @@ bgp_show_community (struct vty *vty, const char *view_name, int argc, bgp_show_type_community), com, 0); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", + * SHOW_STR + * IP_STR + * BGP_STR + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * + * "show ip bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", + * SHOW_STR + * IP_STR + * BGP_STR + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * + * "show ip bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", + * SHOW_STR + * IP_STR + * BGP_STR + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * + */ DEFUN (show_ip_bgp_community, show_ip_bgp_community_cmd, "show ip bgp community (AA:NN|local-AS|no-advertise|no-export)", @@ -9863,66 +9990,75 @@ DEFUN (show_ip_bgp_community, return bgp_show_community (vty, NULL, argc, argv, 0, AFI_IP, SAFI_UNICAST); } -ALIAS (show_ip_bgp_community, - show_ip_bgp_community2_cmd, - "show ip bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", - SHOW_STR - IP_STR - BGP_STR - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n") -ALIAS (show_ip_bgp_community, - show_ip_bgp_community3_cmd, - "show ip bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", - SHOW_STR - IP_STR - BGP_STR - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n") -ALIAS (show_ip_bgp_community, - show_ip_bgp_community4_cmd, - "show ip bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", - SHOW_STR - IP_STR - BGP_STR - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip bgp ipv4 (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", + * SHOW_STR + * IP_STR + * BGP_STR + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * + * "show ip bgp ipv4 (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", + * SHOW_STR + * IP_STR + * BGP_STR + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * + * "show ip bgp ipv4 (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", + * SHOW_STR + * IP_STR + * BGP_STR + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * + */ DEFUN (show_ip_bgp_ipv4_community, show_ip_bgp_ipv4_community_cmd, "show ip bgp ipv4 (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export)", @@ -9944,114 +10080,117 @@ DEFUN (show_ip_bgp_ipv4_community, return bgp_show_community (vty, NULL, argc, argv, 0, AFI_IP, SAFI_UNICAST); } -ALIAS (show_ip_bgp_ipv4_community, - show_ip_bgp_ipv4_community2_cmd, - "show ip bgp ipv4 (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", + + + +DEFUN (show_bgp_instance_afi_safi_community_all, + show_bgp_instance_afi_safi_community_all_cmd, + "show bgp " BGP_INSTANCE_CMD " (ipv4|ipv6) (unicast|multicast) community", SHOW_STR - IP_STR BGP_STR + BGP_INSTANCE_HELP_STR + "Address family\n" "Address family\n" "Address Family modifier\n" "Address Family modifier\n" - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n") - -ALIAS (show_ip_bgp_ipv4_community, - show_ip_bgp_ipv4_community3_cmd, - "show ip bgp ipv4 (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", - SHOW_STR - IP_STR - BGP_STR - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n") - -ALIAS (show_ip_bgp_ipv4_community, - show_ip_bgp_ipv4_community4_cmd, - "show ip bgp ipv4 (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", - SHOW_STR - IP_STR - BGP_STR - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n") - -DEFUN (show_bgp_instance_afi_safi_community_all, - show_bgp_instance_afi_safi_community_all_cmd, - "show bgp " BGP_INSTANCE_CMD " (ipv4|ipv6) (unicast|multicast) community", - SHOW_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - "Display routes matching the communities\n") -{ - int afi; - int safi; - struct bgp *bgp; - - /* BGP structure lookup. */ - bgp = bgp_lookup_by_name (argv[3]->arg); - if (bgp == NULL) - { - vty_out (vty, "Can't find BGP instance %s%s", argv[3]->arg, VTY_NEWLINE); - return CMD_WARNING; - } - - afi = (strncmp (argv[4]->arg, "ipv6", 4) == 0) ? AFI_IP6 : AFI_IP; - safi = (strncmp (argv[5]->arg, "m", 1) == 0) ? SAFI_MULTICAST : SAFI_UNICAST; - return bgp_show (vty, bgp, afi, safi, bgp_show_type_community_all, NULL, 0); -} - -DEFUN (show_bgp_instance_afi_safi_community, - show_bgp_instance_afi_safi_community_cmd, - "show bgp " BGP_INSTANCE_CMD " (ipv4|ipv6) (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export)", - SHOW_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Address family\n" - "Address family modifier\n" - "Address family modifier\n" + "Display routes matching the communities\n") +{ + int afi; + int safi; + struct bgp *bgp; + + /* BGP structure lookup. */ + bgp = bgp_lookup_by_name (argv[3]->arg); + if (bgp == NULL) + { + vty_out (vty, "Can't find BGP instance %s%s", argv[3]->arg, VTY_NEWLINE); + return CMD_WARNING; + } + + afi = (strncmp (argv[4]->arg, "ipv6", 4) == 0) ? AFI_IP6 : AFI_IP; + safi = (strncmp (argv[5]->arg, "m", 1) == 0) ? SAFI_MULTICAST : SAFI_UNICAST; + return bgp_show (vty, bgp, afi, safi, bgp_show_type_community_all, NULL, 0); +} + +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp " BGP_INSTANCE_CMD " (ipv4|ipv6) (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", + * SHOW_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Address family\n" + * "Address family modifier\n" + * "Address family modifier\n" + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * + * "show bgp " BGP_INSTANCE_CMD " (ipv4|ipv6) (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", + * SHOW_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Address family\n" + * "Address family modifier\n" + * "Address family modifier\n" + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * + * "show bgp " BGP_INSTANCE_CMD " (ipv4|ipv6) (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", + * SHOW_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Address family\n" + * "Address family modifier\n" + * "Address family modifier\n" + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * + */ +DEFUN (show_bgp_instance_afi_safi_community, + show_bgp_instance_afi_safi_community_cmd, + "show bgp " BGP_INSTANCE_CMD " (ipv4|ipv6) (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export)", + SHOW_STR + BGP_STR + BGP_INSTANCE_HELP_STR + "Address family\n" + "Address family\n" + "Address family modifier\n" + "Address family modifier\n" "Display routes matching the communities\n" COMMUNITY_AANN_STR "Do not send outside local AS (well-known community)\n" @@ -10066,78 +10205,69 @@ DEFUN (show_bgp_instance_afi_safi_community, return bgp_show_community (vty, argv[3]->arg, argc, argv, 0, afi, safi); } -ALIAS (show_bgp_instance_afi_safi_community, - show_bgp_instance_afi_safi_community2_cmd, - "show bgp " BGP_INSTANCE_CMD " (ipv4|ipv6) (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", - SHOW_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Address family\n" - "Address family modifier\n" - "Address family modifier\n" - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n") -ALIAS (show_bgp_instance_afi_safi_community, - show_bgp_instance_afi_safi_community3_cmd, - "show bgp " BGP_INSTANCE_CMD " (ipv4|ipv6) (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", - SHOW_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Address family\n" - "Address family modifier\n" - "Address family modifier\n" - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n") -ALIAS (show_bgp_instance_afi_safi_community, - show_bgp_instance_afi_safi_community4_cmd, - "show bgp " BGP_INSTANCE_CMD " (ipv4|ipv6) (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", - SHOW_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Address family\n" - "Address family modifier\n" - "Address family modifier\n" - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", + * SHOW_STR + * IP_STR + * BGP_STR + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * "Exact match of the communities" + * + * "show ip bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", + * SHOW_STR + * IP_STR + * BGP_STR + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * "Exact match of the communities" + * + * "show ip bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", + * SHOW_STR + * IP_STR + * BGP_STR + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * "Exact match of the communities" + * + */ DEFUN (show_ip_bgp_community_exact, show_ip_bgp_community_exact_cmd, "show ip bgp community (AA:NN|local-AS|no-advertise|no-export) exact-match", @@ -10154,69 +10284,78 @@ DEFUN (show_ip_bgp_community_exact, return bgp_show_community (vty, NULL, argc, argv, 1, AFI_IP, SAFI_UNICAST); } -ALIAS (show_ip_bgp_community_exact, - show_ip_bgp_community2_exact_cmd, - "show ip bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", - SHOW_STR - IP_STR - BGP_STR - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - "Exact match of the communities") -ALIAS (show_ip_bgp_community_exact, - show_ip_bgp_community3_exact_cmd, - "show ip bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", - SHOW_STR - IP_STR - BGP_STR - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - "Exact match of the communities") -ALIAS (show_ip_bgp_community_exact, - show_ip_bgp_community4_exact_cmd, - "show ip bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", - SHOW_STR - IP_STR - BGP_STR - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - "Exact match of the communities") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip bgp ipv4 (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", + * SHOW_STR + * IP_STR + * BGP_STR + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * "Exact match of the communities" + * + * "show ip bgp ipv4 (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", + * SHOW_STR + * IP_STR + * BGP_STR + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * "Exact match of the communities" + * + * "show ip bgp ipv4 (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", + * SHOW_STR + * IP_STR + * BGP_STR + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * "Exact match of the communities" + * + */ DEFUN (show_ip_bgp_ipv4_community_exact, show_ip_bgp_ipv4_community_exact_cmd, "show ip bgp ipv4 (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) exact-match", @@ -10239,230 +10378,214 @@ DEFUN (show_ip_bgp_ipv4_community_exact, return bgp_show_community (vty, NULL, argc, argv, 1, AFI_IP, SAFI_UNICAST); } -ALIAS (show_ip_bgp_ipv4_community_exact, - show_ip_bgp_ipv4_community2_exact_cmd, - "show ip bgp ipv4 (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", + + + +#ifdef HAVE_IPV6 +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp ipv6 community (AA:NN|local-AS|no-advertise|no-export)", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * + * "show bgp ipv6 community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * + * "show bgp ipv6 community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * + * "show bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", + * SHOW_STR + * BGP_STR + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * + * "show bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", + * SHOW_STR + * BGP_STR + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * + * "show bgp ipv6 community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * + * "show bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", + * SHOW_STR + * BGP_STR + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * + */ +DEFUN (show_bgp_community, + show_bgp_community_cmd, + "show bgp community (AA:NN|local-AS|no-advertise|no-export)", SHOW_STR - IP_STR BGP_STR - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" "Display routes matching the communities\n" COMMUNITY_AANN_STR "Do not send outside local AS (well-known community)\n" "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - "Exact match of the communities") - -ALIAS (show_ip_bgp_ipv4_community_exact, - show_ip_bgp_ipv4_community3_exact_cmd, - "show ip bgp ipv4 (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", - SHOW_STR - IP_STR - BGP_STR - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - "Exact match of the communities") - -ALIAS (show_ip_bgp_ipv4_community_exact, - show_ip_bgp_ipv4_community4_exact_cmd, - "show ip bgp ipv4 (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", - SHOW_STR - IP_STR - BGP_STR - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - "Exact match of the communities") - -#ifdef HAVE_IPV6 -DEFUN (show_bgp_community, - show_bgp_community_cmd, - "show bgp community (AA:NN|local-AS|no-advertise|no-export)", - SHOW_STR - BGP_STR - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n") -{ - return bgp_show_community (vty, NULL, argc, argv, 0, AFI_IP6, SAFI_UNICAST); -} - -ALIAS (show_bgp_community, - show_bgp_ipv6_community_cmd, - "show bgp ipv6 community (AA:NN|local-AS|no-advertise|no-export)", - SHOW_STR - BGP_STR - "Address family\n" - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n") - -ALIAS (show_bgp_community, - show_bgp_community2_cmd, - "show bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", - SHOW_STR - BGP_STR - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n") - -ALIAS (show_bgp_community, - show_bgp_ipv6_community2_cmd, - "show bgp ipv6 community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", - SHOW_STR - BGP_STR - "Address family\n" - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n") - -ALIAS (show_bgp_community, - show_bgp_community3_cmd, - "show bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", - SHOW_STR - BGP_STR - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n") - -ALIAS (show_bgp_community, - show_bgp_ipv6_community3_cmd, - "show bgp ipv6 community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", - SHOW_STR - BGP_STR - "Address family\n" - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n") - -ALIAS (show_bgp_community, - show_bgp_community4_cmd, - "show bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", - SHOW_STR - BGP_STR - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n") - -ALIAS (show_bgp_community, - show_bgp_ipv6_community4_cmd, - "show bgp ipv6 community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", - SHOW_STR - BGP_STR - "Address family\n" - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n") - -/* old command */ -DEFUN (show_ipv6_bgp_community, - show_ipv6_bgp_community_cmd, - "show ipv6 bgp community (AA:NN|local-AS|no-advertise|no-export)", - SHOW_STR - IPV6_STR - BGP_STR - "Display routes matching the communities\n" + "Do not export to next AS (well-known community)\n") +{ + return bgp_show_community (vty, NULL, argc, argv, 0, AFI_IP6, SAFI_UNICAST); +} + + + + + + + + +/* old command */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", + * SHOW_STR + * IPV6_STR + * BGP_STR + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * + * "show ipv6 bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", + * SHOW_STR + * IPV6_STR + * BGP_STR + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * + * "show ipv6 bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", + * SHOW_STR + * IPV6_STR + * BGP_STR + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * + */ +DEFUN (show_ipv6_bgp_community, + show_ipv6_bgp_community_cmd, + "show ipv6 bgp community (AA:NN|local-AS|no-advertise|no-export)", + SHOW_STR + IPV6_STR + BGP_STR + "Display routes matching the communities\n" COMMUNITY_AANN_STR "Do not send outside local AS (well-known community)\n" "Do not advertise to any peer (well-known community)\n" @@ -10473,68 +10596,136 @@ DEFUN (show_ipv6_bgp_community, } /* old command */ -ALIAS (show_ipv6_bgp_community, - show_ipv6_bgp_community2_cmd, - "show ipv6 bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", - SHOW_STR - IPV6_STR - BGP_STR - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n") /* old command */ -ALIAS (show_ipv6_bgp_community, - show_ipv6_bgp_community3_cmd, - "show ipv6 bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", - SHOW_STR - IPV6_STR - BGP_STR - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n") /* old command */ -ALIAS (show_ipv6_bgp_community, - show_ipv6_bgp_community4_cmd, - "show ipv6 bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", - SHOW_STR - IPV6_STR - BGP_STR - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", + * SHOW_STR + * BGP_STR + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * "Exact match of the communities" + * + * "show bgp ipv6 community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * "Exact match of the communities" + * + * "show bgp ipv6 community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * "Exact match of the communities" + * + * "show bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", + * SHOW_STR + * BGP_STR + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * "Exact match of the communities" + * + * "show bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", + * SHOW_STR + * BGP_STR + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * "Exact match of the communities" + * + * "show bgp ipv6 community (AA:NN|local-AS|no-advertise|no-export) exact-match", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * "Exact match of the communities" + * + * "show bgp ipv6 community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * "Exact match of the communities" + * + */ DEFUN (show_bgp_community_exact, show_bgp_community_exact_cmd, "show bgp community (AA:NN|local-AS|no-advertise|no-export) exact-match", @@ -10550,143 +10741,74 @@ DEFUN (show_bgp_community_exact, return bgp_show_community (vty, NULL, argc, argv, 1, AFI_IP6, SAFI_UNICAST); } -ALIAS (show_bgp_community_exact, - show_bgp_ipv6_community_exact_cmd, - "show bgp ipv6 community (AA:NN|local-AS|no-advertise|no-export) exact-match", - SHOW_STR - BGP_STR - "Address family\n" - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - "Exact match of the communities") -ALIAS (show_bgp_community_exact, - show_bgp_community2_exact_cmd, - "show bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", - SHOW_STR - BGP_STR - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - "Exact match of the communities") -ALIAS (show_bgp_community_exact, - show_bgp_ipv6_community2_exact_cmd, - "show bgp ipv6 community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", - SHOW_STR - BGP_STR - "Address family\n" - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - "Exact match of the communities") -ALIAS (show_bgp_community_exact, - show_bgp_community3_exact_cmd, - "show bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", - SHOW_STR - BGP_STR - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - "Exact match of the communities") -ALIAS (show_bgp_community_exact, - show_bgp_ipv6_community3_exact_cmd, - "show bgp ipv6 community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", - SHOW_STR - BGP_STR - "Address family\n" - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - "Exact match of the communities") -ALIAS (show_bgp_community_exact, - show_bgp_community4_exact_cmd, - "show bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", - SHOW_STR - BGP_STR - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - "Exact match of the communities") -ALIAS (show_bgp_community_exact, - show_bgp_ipv6_community4_exact_cmd, - "show bgp ipv6 community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", - SHOW_STR - BGP_STR - "Address family\n" - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - "Exact match of the communities") /* old command */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", + * SHOW_STR + * IPV6_STR + * BGP_STR + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * "Exact match of the communities" + * + * "show ipv6 bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", + * SHOW_STR + * IPV6_STR + * BGP_STR + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * "Exact match of the communities" + * + * "show ipv6 bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", + * SHOW_STR + * IPV6_STR + * BGP_STR + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * "Exact match of the communities" + * + */ DEFUN (show_ipv6_bgp_community_exact, show_ipv6_bgp_community_exact_cmd, "show ipv6 bgp community (AA:NN|local-AS|no-advertise|no-export) exact-match", @@ -10699,78 +10821,75 @@ DEFUN (show_ipv6_bgp_community_exact, "Do not advertise to any peer (well-known community)\n" "Do not export to next AS (well-known community)\n" "Exact match of the communities") -{ - bgp_show_ipv6_bgp_deprecate_warning(vty); - return bgp_show_community (vty, NULL, argc, argv, 1, AFI_IP6, SAFI_UNICAST); -} - -/* old command */ -ALIAS (show_ipv6_bgp_community_exact, - show_ipv6_bgp_community2_exact_cmd, - "show ipv6 bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", - SHOW_STR - IPV6_STR - BGP_STR - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - "Exact match of the communities") - -/* old command */ -ALIAS (show_ipv6_bgp_community_exact, - show_ipv6_bgp_community3_exact_cmd, - "show ipv6 bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", - SHOW_STR - IPV6_STR - BGP_STR - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - "Exact match of the communities") - -/* old command */ -ALIAS (show_ipv6_bgp_community_exact, - show_ipv6_bgp_community4_exact_cmd, - "show ipv6 bgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", - SHOW_STR - IPV6_STR - BGP_STR - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - "Exact match of the communities") +{ + bgp_show_ipv6_bgp_deprecate_warning(vty); + return bgp_show_community (vty, NULL, argc, argv, 1, AFI_IP6, SAFI_UNICAST); +} + +/* old command */ + +/* old command */ + +/* old command */ /* old command */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 mbgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", + * SHOW_STR + * IPV6_STR + * MBGP_STR + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * + * "show ipv6 mbgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", + * SHOW_STR + * IPV6_STR + * MBGP_STR + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * + * "show ipv6 mbgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", + * SHOW_STR + * IPV6_STR + * MBGP_STR + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * + */ DEFUN (show_ipv6_mbgp_community, show_ipv6_mbgp_community_cmd, "show ipv6 mbgp community (AA:NN|local-AS|no-advertise|no-export)", @@ -10788,69 +10907,72 @@ DEFUN (show_ipv6_mbgp_community, } /* old command */ -ALIAS (show_ipv6_mbgp_community, - show_ipv6_mbgp_community2_cmd, - "show ipv6 mbgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", - SHOW_STR - IPV6_STR - MBGP_STR - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n") /* old command */ -ALIAS (show_ipv6_mbgp_community, - show_ipv6_mbgp_community3_cmd, - "show ipv6 mbgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", - SHOW_STR - IPV6_STR - MBGP_STR - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n") /* old command */ -ALIAS (show_ipv6_mbgp_community, - show_ipv6_mbgp_community4_cmd, - "show ipv6 mbgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", - SHOW_STR - IPV6_STR - MBGP_STR - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n") /* old command */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 mbgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", + * SHOW_STR + * IPV6_STR + * MBGP_STR + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * "Exact match of the communities" + * + * "show ipv6 mbgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", + * SHOW_STR + * IPV6_STR + * MBGP_STR + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * "Exact match of the communities" + * + * "show ipv6 mbgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", + * SHOW_STR + * IPV6_STR + * MBGP_STR + * "Display routes matching the communities\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * COMMUNITY_AANN_STR + * "Do not send outside local AS (well-known community)\n" + * "Do not advertise to any peer (well-known community)\n" + * "Do not export to next AS (well-known community)\n" + * "Exact match of the communities" + * + */ DEFUN (show_ipv6_mbgp_community_exact, show_ipv6_mbgp_community_exact_cmd, "show ipv6 mbgp community (AA:NN|local-AS|no-advertise|no-export) exact-match", @@ -10869,70 +10991,10 @@ DEFUN (show_ipv6_mbgp_community_exact, } /* old command */ -ALIAS (show_ipv6_mbgp_community_exact, - show_ipv6_mbgp_community2_exact_cmd, - "show ipv6 mbgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", - SHOW_STR - IPV6_STR - MBGP_STR - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - "Exact match of the communities") /* old command */ -ALIAS (show_ipv6_mbgp_community_exact, - show_ipv6_mbgp_community3_exact_cmd, - "show ipv6 mbgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", - SHOW_STR - IPV6_STR - MBGP_STR - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - "Exact match of the communities") /* old command */ -ALIAS (show_ipv6_mbgp_community_exact, - show_ipv6_mbgp_community4_exact_cmd, - "show ipv6 mbgp community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) exact-match", - SHOW_STR - IPV6_STR - MBGP_STR - "Display routes matching the communities\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - COMMUNITY_AANN_STR - "Do not send outside local AS (well-known community)\n" - "Do not advertise to any peer (well-known community)\n" - "Do not export to next AS (well-known community)\n" - "Exact match of the communities") #endif /* HAVE_IPV6 */ static int @@ -11043,6 +11105,17 @@ DEFUN (show_ip_bgp_ipv4_community_list_exact, } #ifdef HAVE_IPV6 +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp ipv6 community-list (<1-500>|WORD)", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Display routes matching the community-list\n" + * "community-list number\n" + * "community-list name\n" + * + */ DEFUN (show_bgp_community_list, show_bgp_community_list_cmd, "show bgp community-list (<1-500>|WORD)", @@ -11055,15 +11128,6 @@ DEFUN (show_bgp_community_list, return bgp_show_community_list (vty, NULL, argv[3]->arg, 0, AFI_IP6, SAFI_UNICAST); } -ALIAS (show_bgp_community_list, - show_bgp_ipv6_community_list_cmd, - "show bgp ipv6 community-list (<1-500>|WORD)", - SHOW_STR - BGP_STR - "Address family\n" - "Display routes matching the community-list\n" - "community-list number\n" - "community-list name\n") /* old command */ DEFUN (show_ipv6_bgp_community_list, @@ -11093,6 +11157,18 @@ DEFUN (show_ipv6_mbgp_community_list, return bgp_show_community_list (vty, NULL, argv[4]->arg, 0, AFI_IP6, SAFI_MULTICAST); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp ipv6 community-list (<1-500>|WORD) exact-match", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Display routes matching the community-list\n" + * "community-list number\n" + * "community-list name\n" + * "Exact match of the communities\n" + * + */ DEFUN (show_bgp_community_list_exact, show_bgp_community_list_exact_cmd, "show bgp community-list (<1-500>|WORD) exact-match", @@ -11106,16 +11182,6 @@ DEFUN (show_bgp_community_list_exact, return bgp_show_community_list (vty, NULL, argv[3]->arg, 1, AFI_IP6, SAFI_UNICAST); } -ALIAS (show_bgp_community_list_exact, - show_bgp_ipv6_community_list_exact_cmd, - "show bgp ipv6 community-list (<1-500>|WORD) exact-match", - SHOW_STR - BGP_STR - "Address family\n" - "Display routes matching the community-list\n" - "community-list number\n" - "community-list name\n" - "Exact match of the communities\n") /* old command */ DEFUN (show_ipv6_bgp_community_list_exact, @@ -11204,6 +11270,18 @@ DEFUN (show_ip_bgp_instance_prefix_longer, bgp_show_type_prefix_longer); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip bgp dampening flap-statistics A.B.C.D/M longer-prefixes", + * SHOW_STR + * IP_STR + * BGP_STR + * "Display detailed information about dampening\n" + * "Display flap statistics of routes\n" + * "IP prefix /, e.g., 35.0.0.0/8\n" + * "Display route and more specific routes\n" + * + */ DEFUN (show_ip_bgp_flap_prefix_longer, show_ip_bgp_flap_prefix_longer_cmd, "show ip bgp flap-statistics A.B.C.D/M longer-prefixes", @@ -11218,16 +11296,6 @@ DEFUN (show_ip_bgp_flap_prefix_longer, bgp_show_type_flap_prefix_longer); } -ALIAS (show_ip_bgp_flap_prefix_longer, - show_ip_bgp_damp_flap_prefix_longer_cmd, - "show ip bgp dampening flap-statistics A.B.C.D/M longer-prefixes", - SHOW_STR - IP_STR - BGP_STR - "Display detailed information about dampening\n" - "Display flap statistics of routes\n" - "IP prefix /, e.g., 35.0.0.0/8\n" - "Display route and more specific routes\n") DEFUN (show_ip_bgp_ipv4_prefix_longer, show_ip_bgp_ipv4_prefix_longer_cmd, @@ -11249,6 +11317,17 @@ DEFUN (show_ip_bgp_ipv4_prefix_longer, bgp_show_type_prefix_longer); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip bgp dampening flap-statistics A.B.C.D", + * SHOW_STR + * IP_STR + * BGP_STR + * "Display detailed information about dampening\n" + * "Display flap statistics of routes\n" + * "Network in the BGP routing table to display\n" + * + */ DEFUN (show_ip_bgp_flap_address, show_ip_bgp_flap_address_cmd, "show ip bgp flap-statistics A.B.C.D", @@ -11262,16 +11341,18 @@ DEFUN (show_ip_bgp_flap_address, bgp_show_type_flap_address); } -ALIAS (show_ip_bgp_flap_address, - show_ip_bgp_damp_flap_address_cmd, - "show ip bgp dampening flap-statistics A.B.C.D", - SHOW_STR - IP_STR - BGP_STR - "Display detailed information about dampening\n" - "Display flap statistics of routes\n" - "Network in the BGP routing table to display\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip bgp dampening flap-statistics A.B.C.D/M", + * SHOW_STR + * IP_STR + * BGP_STR + * "Display detailed information about dampening\n" + * "Display flap statistics of routes\n" + * "IP prefix /, e.g., 35.0.0.0/8\n" + * + */ DEFUN (show_ip_bgp_flap_prefix, show_ip_bgp_flap_prefix_cmd, "show ip bgp flap-statistics A.B.C.D/M", @@ -11285,17 +11366,18 @@ DEFUN (show_ip_bgp_flap_prefix, bgp_show_type_flap_prefix); } -ALIAS (show_ip_bgp_flap_prefix, - show_ip_bgp_damp_flap_prefix_cmd, - "show ip bgp dampening flap-statistics A.B.C.D/M", - SHOW_STR - IP_STR - BGP_STR - "Display detailed information about dampening\n" - "Display flap statistics of routes\n" - "IP prefix /, e.g., 35.0.0.0/8\n") #ifdef HAVE_IPV6 +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp ipv6 X:X::X:X/M longer-prefixes", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "IPv6 prefix /\n" + * "Display route and more specific routes\n" + * + */ DEFUN (show_bgp_prefix_longer, show_bgp_prefix_longer_cmd, "show bgp X:X::X:X/M longer-prefixes", @@ -11308,14 +11390,6 @@ DEFUN (show_bgp_prefix_longer, bgp_show_type_prefix_longer); } -ALIAS (show_bgp_prefix_longer, - show_bgp_ipv6_prefix_longer_cmd, - "show bgp ipv6 X:X::X:X/M longer-prefixes", - SHOW_STR - BGP_STR - "Address family\n" - "IPv6 prefix /\n" - "Display route and more specific routes\n") /* old command */ DEFUN (show_ipv6_bgp_prefix_longer, @@ -12358,6 +12432,21 @@ peer_adj_routes (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes route-map WORD {json}", + * SHOW_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "Neighbor to display information about\n" + * "Neighbor on bgp configured interface\n" + * "Display the routes advertised to a BGP neighbor\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_ip_bgp_instance_neighbor_advertised_route, show_ip_bgp_instance_neighbor_advertised_route_cmd, "show ip bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes {json}", @@ -12385,6 +12474,20 @@ DEFUN (show_ip_bgp_instance_neighbor_advertised_route, return peer_adj_routes (vty, peer, AFI_IP, SAFI_UNICAST, 0, NULL, uj); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes route-map WORD {json}", + * SHOW_STR + * IP_STR + * BGP_STR + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "Neighbor to display information about\n" + * "Neighbor on bgp configured interface\n" + * "Display the routes advertised to a BGP neighbor\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_ip_bgp_neighbor_advertised_route, show_ip_bgp_neighbor_advertised_route_cmd, "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes {json}", @@ -12415,32 +12518,25 @@ DEFUN (show_ip_bgp_neighbor_advertised_route, return peer_adj_routes (vty, peer, AFI_IP, SAFI_UNICAST, 0, rmap_name, uj); } -ALIAS (show_ip_bgp_neighbor_advertised_route, - show_ip_bgp_neighbor_advertised_route_rmap_cmd, - "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes route-map WORD {json}", - SHOW_STR - IP_STR - BGP_STR - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Neighbor on bgp configured interface\n" - "Display the routes advertised to a BGP neighbor\n" - "JavaScript Object Notation\n") -ALIAS (show_ip_bgp_instance_neighbor_advertised_route, - show_ip_bgp_instance_neighbor_advertised_route_rmap_cmd, - "show ip bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes route-map WORD {json}", - SHOW_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Neighbor on bgp configured interface\n" - "Display the routes advertised to a BGP neighbor\n" - "JavaScript Object Notation\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes route-map WORD {json}", + * SHOW_STR + * IP_STR + * BGP_STR + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "Neighbor to display information about\n" + * "Neighbor on bgp configured interface\n" + * "Display the routes advertised to a BGP neighbor\n" + * "Route-map to control what is displayed\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_ip_bgp_ipv4_neighbor_advertised_route, show_ip_bgp_ipv4_neighbor_advertised_route_cmd, "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes {json}", @@ -12474,24 +12570,23 @@ DEFUN (show_ip_bgp_ipv4_neighbor_advertised_route, return peer_adj_routes (vty, peer, AFI_IP, SAFI_UNICAST, 0, rmap_name, uj); } -ALIAS (show_ip_bgp_ipv4_neighbor_advertised_route, - show_ip_bgp_ipv4_neighbor_advertised_route_rmap_cmd, - "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes route-map WORD {json}", - SHOW_STR - IP_STR - BGP_STR - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Neighbor on bgp configured interface\n" - "Display the routes advertised to a BGP neighbor\n" - "Route-map to control what is displayed\n" - "JavaScript Object Notation\n") #ifdef HAVE_IPV6 +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes {json}", + * SHOW_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "Neighbor to display information about\n" + * "Neighbor on bgp configured interface\n" + * "Display the routes advertised to a BGP neighbor\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_bgp_instance_neighbor_advertised_route, show_bgp_instance_neighbor_advertised_route_cmd, "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes {json}", @@ -12519,20 +12614,32 @@ DEFUN (show_bgp_instance_neighbor_advertised_route, return peer_adj_routes (vty, peer, AFI_IP6, SAFI_UNICAST, 0, NULL, uj); } -ALIAS (show_bgp_instance_neighbor_advertised_route, - show_bgp_instance_ipv6_neighbor_advertised_route_cmd, - "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes {json}", - SHOW_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Neighbor on bgp configured interface\n" - "Display the routes advertised to a BGP neighbor\n" - "JavaScript Object Notation\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes {json}", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "Neighbor to display information about\n" + * "Neighbor on bgp configured interface\n" + * "Display the routes advertised to a BGP neighbor\n" + * "JavaScript Object Notation\n" + * + * "show ipv6 bgp neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes {json}", + * SHOW_STR + * IPV6_STR + * BGP_STR + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "Neighbor to display information about\n" + * "Neighbor on bgp configured interface\n" + * "Display the routes advertised to a BGP neighbor\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_bgp_neighbor_advertised_route, show_bgp_neighbor_advertised_route_cmd, "show bgp neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes {json}", @@ -12558,35 +12665,11 @@ DEFUN (show_bgp_neighbor_advertised_route, if (argc == 3 || (argc == 2 && argv[5]->arg && strcmp(argv[5]->arg, "json") != 0)) rmap_name = argv[5]->arg; - return peer_adj_routes (vty, peer, AFI_IP6, SAFI_UNICAST, 0, rmap_name, uj); -} - -ALIAS (show_bgp_neighbor_advertised_route, - show_bgp_ipv6_neighbor_advertised_route_cmd, - "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes {json}", - SHOW_STR - BGP_STR - "Address family\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Neighbor on bgp configured interface\n" - "Display the routes advertised to a BGP neighbor\n" - "JavaScript Object Notation\n") - + return peer_adj_routes (vty, peer, AFI_IP6, SAFI_UNICAST, 0, rmap_name, uj); +} + + /* old command */ -ALIAS (show_bgp_neighbor_advertised_route, - ipv6_bgp_neighbor_advertised_route_cmd, - "show ipv6 bgp neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes {json}", - SHOW_STR - IPV6_STR - BGP_STR - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Neighbor on bgp configured interface\n" - "Display the routes advertised to a BGP neighbor\n" - "JavaScript Object Notation\n") /* old command */ DEFUN (ipv6_mbgp_neighbor_advertised_route, @@ -12615,6 +12698,21 @@ DEFUN (ipv6_mbgp_neighbor_advertised_route, } #endif /* HAVE_IPV6 */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) received-routes {json}", + * SHOW_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "Neighbor to display information about\n" + * "Neighbor on bgp configured interface\n" + * "Display the received routes from neighbor\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_bgp_instance_neighbor_received_routes, show_bgp_instance_neighbor_received_routes_cmd, "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) received-routes {json}", @@ -12638,6 +12736,21 @@ DEFUN (show_bgp_instance_neighbor_received_routes, return peer_adj_routes (vty, peer, AFI_IP6, SAFI_UNICAST, 1, NULL, uj); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) received-routes route-map WORD {json}", + * SHOW_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "Neighbor to display information about\n" + * "Neighbor on bgp configured interface\n" + * "Display the received routes from neighbor\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_ip_bgp_instance_neighbor_received_routes, show_ip_bgp_instance_neighbor_received_routes_cmd, "show ip bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) received-routes {json}", @@ -12662,20 +12775,21 @@ DEFUN (show_ip_bgp_instance_neighbor_received_routes, return peer_adj_routes (vty, peer, AFI_IP, SAFI_UNICAST, 1, NULL, uj); } -ALIAS (show_bgp_instance_neighbor_received_routes, - show_bgp_instance_ipv6_neighbor_received_routes_cmd, - "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) received-routes {json}", - SHOW_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Neighbor on bgp configured interface\n" - "Display the received routes from neighbor\n" - "JavaScript Object Notation\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) received-routes route-map WORD {json}", + * SHOW_STR + * IP_STR + * BGP_STR + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "Neighbor to display information about\n" + * "Neighbor on bgp configured interface\n" + * "Display the received routes from neighbor\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_ip_bgp_neighbor_received_routes, show_ip_bgp_neighbor_received_routes_cmd, "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) received-routes {json}", @@ -12705,33 +12819,25 @@ DEFUN (show_ip_bgp_neighbor_received_routes, return peer_adj_routes (vty, peer, AFI_IP, SAFI_UNICAST, 1, rmap_name, uj); } -ALIAS (show_ip_bgp_neighbor_received_routes, - show_ip_bgp_neighbor_received_routes_rmap_cmd, - "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) received-routes route-map WORD {json}", - SHOW_STR - IP_STR - BGP_STR - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Neighbor on bgp configured interface\n" - "Display the received routes from neighbor\n" - "JavaScript Object Notation\n") -ALIAS (show_ip_bgp_instance_neighbor_received_routes, - show_ip_bgp_instance_neighbor_received_routes_rmap_cmd, - "show ip bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) received-routes route-map WORD {json}", - SHOW_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Neighbor on bgp configured interface\n" - "Display the received routes from neighbor\n" - "JavaScript Object Notation\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) received-routes route-map WORD {json}", + * SHOW_STR + * IP_STR + * BGP_STR + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "Neighbor to display information about\n" + * "Neighbor on bgp configured interface\n" + * "Display the received routes from neighbor\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_ip_bgp_ipv4_neighbor_received_routes, show_ip_bgp_ipv4_neighbor_received_routes_cmd, "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) received-routes {json}", @@ -12765,21 +12871,6 @@ DEFUN (show_ip_bgp_ipv4_neighbor_received_routes, return peer_adj_routes (vty, peer, AFI_IP, SAFI_UNICAST, 1, rmap_name, uj); } -ALIAS (show_ip_bgp_ipv4_neighbor_received_routes, - show_ip_bgp_ipv4_neighbor_received_routes_rmap_cmd, - "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) received-routes route-map WORD {json}", - SHOW_STR - IP_STR - BGP_STR - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Neighbor on bgp configured interface\n" - "Display the received routes from neighbor\n" - "JavaScript Object Notation\n") DEFUN (show_bgp_instance_afi_safi_neighbor_adv_recd_routes, show_bgp_instance_afi_safi_neighbor_adv_recd_routes_cmd, @@ -13021,6 +13112,31 @@ DEFUN (show_ip_bgp_ipv4_neighbor_received_prefix_filter, return CMD_SUCCESS; } #ifdef HAVE_IPV6 +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) received-routes {json}", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "Neighbor to display information about\n" + * "Neighbor on bgp configured interface\n" + * "Display the received routes from neighbor\n" + * "JavaScript Object Notation\n" + * + * "show ipv6 bgp neighbors (A.B.C.D|X:X::X:X|WORD) received-routes {json}", + * SHOW_STR + * IPV6_STR + * BGP_STR + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "Neighbor to display information about\n" + * "Neighbor on bgp configured interface\n" + * "Display the received routes from neighbor\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_bgp_neighbor_received_routes, show_bgp_neighbor_received_routes_cmd, "show bgp neighbors (A.B.C.D|X:X::X:X|WORD) received-routes {json}", @@ -13048,19 +13164,22 @@ DEFUN (show_bgp_neighbor_received_routes, return peer_adj_routes (vty, peer, AFI_IP6, SAFI_UNICAST, 1, rmap_name, uj); } -ALIAS (show_bgp_neighbor_received_routes, - show_bgp_ipv6_neighbor_received_routes_cmd, - "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) received-routes {json}", - SHOW_STR - BGP_STR - "Address family\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Neighbor on bgp configured interface\n" - "Display the received routes from neighbor\n" - "JavaScript Object Notation\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) received prefix-filter {json}", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "Neighbor to display information about\n" + * "Neighbor on bgp configured interface\n" + * "Display information received from a BGP neighbor\n" + * "Display the prefixlist filter\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_bgp_neighbor_received_prefix_filter, show_bgp_neighbor_received_prefix_filter_cmd, "show bgp neighbors (A.B.C.D|X:X::X:X|WORD) received prefix-filter {json}", @@ -13147,33 +13266,8 @@ DEFUN (show_bgp_neighbor_received_prefix_filter, return CMD_SUCCESS; } -ALIAS (show_bgp_neighbor_received_prefix_filter, - show_bgp_ipv6_neighbor_received_prefix_filter_cmd, - "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) received prefix-filter {json}", - SHOW_STR - BGP_STR - "Address family\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Neighbor on bgp configured interface\n" - "Display information received from a BGP neighbor\n" - "Display the prefixlist filter\n" - "JavaScript Object Notation\n") /* old command */ -ALIAS (show_bgp_neighbor_received_routes, - ipv6_bgp_neighbor_received_routes_cmd, - "show ipv6 bgp neighbors (A.B.C.D|X:X::X:X|WORD) received-routes {json}", - SHOW_STR - IPV6_STR - BGP_STR - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Neighbor on bgp configured interface\n" - "Display the received routes from neighbor\n" - "JavaScript Object Notation\n") /* old command */ DEFUN (ipv6_mbgp_neighbor_received_routes, @@ -13200,6 +13294,22 @@ DEFUN (ipv6_mbgp_neighbor_received_routes, return peer_adj_routes (vty, peer, AFI_IP6, SAFI_MULTICAST, 1, NULL, uj); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) received prefix-filter {json}", + * SHOW_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "Neighbor to display information about\n" + * "Neighbor on bgp configured interface\n" + * "Display information received from a BGP neighbor\n" + * "Display the prefixlist filter\n" + * "JavaScript Object NOtation\n" + * + */ DEFUN (show_bgp_instance_neighbor_received_prefix_filter, show_bgp_instance_neighbor_received_prefix_filter_cmd, "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) received prefix-filter {json}", @@ -13292,20 +13402,6 @@ DEFUN (show_bgp_instance_neighbor_received_prefix_filter, return CMD_SUCCESS; } -ALIAS (show_bgp_instance_neighbor_received_prefix_filter, - show_bgp_instance_ipv6_neighbor_received_prefix_filter_cmd, - "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) received prefix-filter {json}", - SHOW_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Neighbor on bgp configured interface\n" - "Display information received from a BGP neighbor\n" - "Display the prefixlist filter\n" - "JavaScript Object NOtation\n") #endif /* HAVE_IPV6 */ static int @@ -13459,6 +13555,21 @@ DEFUN (show_ip_bgp_ipv4_neighbor_routes, } #ifdef HAVE_IPV6 +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) routes {json}", + * SHOW_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "Neighbor to display information about\n" + * "Neighbor on bgp configured interface\n" + * "Display routes learned from neighbor\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_bgp_instance_neighbor_routes, show_bgp_instance_neighbor_routes_cmd, "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) routes {json}", @@ -13483,20 +13594,43 @@ DEFUN (show_bgp_instance_neighbor_routes, bgp_show_type_neighbor, uj); } -ALIAS (show_bgp_instance_neighbor_routes, - show_bgp_instance_ipv6_neighbor_routes_cmd, - "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) routes {json}", - SHOW_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Neighbor on bgp configured interface\n" - "Display routes learned from neighbor\n" - "JavaScript Object Notation\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp neighbors (A.B.C.D|X:X::X:X|WORD) dampened-routes {json}", + * SHOW_STR + * BGP_STR + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "Neighbor to display information about\n" + * "Neighbor on bgp configured interface\n" + * "Display the dampened routes received from neighbor\n" + * "JavaScript Object Notation\n" + * + * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) dampened-routes {json}", + * SHOW_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "Neighbor to display information about\n" + * "Neighbor on bgp configured interface\n" + * "Display the dampened routes received from neighbor\n" + * "JavaScript Object Notation\n" + * + * "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) dampened-routes {json}", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "Neighbor to display information about\n" + * "Neighbor on bgp configured interface\n" + * "Display the dampened routes received from neighbor\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_bgp_instance_neighbor_damp, show_bgp_instance_neighbor_damp_cmd, "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) dampened-routes {json}", @@ -13526,20 +13660,43 @@ DEFUN (show_bgp_instance_neighbor_damp, bgp_show_type_damp_neighbor, uj); } -ALIAS (show_bgp_instance_neighbor_damp, - show_bgp_instance_ipv6_neighbor_damp_cmd, - "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) dampened-routes {json}", - SHOW_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Neighbor on bgp configured interface\n" - "Display the dampened routes received from neighbor\n" - "JavaScript Object Notation\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp neighbors (A.B.C.D|X:X::X:X|WORD) flap-statistics {json}", + * SHOW_STR + * BGP_STR + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "Neighbor to display information about\n" + * "Neighbor on bgp configured interface\n" + * "Display flap statistics of the routes learned from neighbor\n" + * "JavaScript Object Notation\n" + * + * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) flap-statistics {json}", + * SHOW_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "Neighbor to display information about\n" + * "Neighbor on bgp configured interface\n" + * "Display flap statistics of the routes learned from neighbor\n" + * "JavaScript Object Notation\n" + * + * "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) flap-statistics {json}", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "Neighbor to display information about\n" + * "Neighbor on bgp configured interface\n" + * "Display flap statistics of the routes learned from neighbor\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_bgp_instance_neighbor_flap, show_bgp_instance_neighbor_flap_cmd, "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) flap-statistics {json}", @@ -13569,20 +13726,32 @@ DEFUN (show_bgp_instance_neighbor_flap, bgp_show_type_flap_neighbor, uj); } -ALIAS (show_bgp_instance_neighbor_flap, - show_bgp_instance_ipv6_neighbor_flap_cmd, - "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) flap-statistics {json}", - SHOW_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Neighbor on bgp configured interface\n" - "Display flap statistics of the routes learned from neighbor\n" - "JavaScript Object Notation\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 bgp neighbors (A.B.C.D|X:X::X:X|WORD) routes {json}", + * SHOW_STR + * IPV6_STR + * BGP_STR + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "Neighbor to display information about\n" + * "Neighbor on bgp configured interface\n" + * "Display routes learned from neighbor\n" + * "JavaScript Object Notation\n" + * + * "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) routes {json}", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "Neighbor to display information about\n" + * "Neighbor on bgp configured interface\n" + * "Display routes learned from neighbor\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_bgp_neighbor_routes, show_bgp_neighbor_routes_cmd, "show bgp neighbors (A.B.C.D|X:X::X:X|WORD) routes {json}", @@ -13607,32 +13776,8 @@ DEFUN (show_bgp_neighbor_routes, } -ALIAS (show_bgp_neighbor_routes, - show_bgp_ipv6_neighbor_routes_cmd, - "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) routes {json}", - SHOW_STR - BGP_STR - "Address family\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Neighbor on bgp configured interface\n" - "Display routes learned from neighbor\n" - "JavaScript Object Notation\n") /* old command */ -ALIAS (show_bgp_neighbor_routes, - ipv6_bgp_neighbor_routes_cmd, - "show ipv6 bgp neighbors (A.B.C.D|X:X::X:X|WORD) routes {json}", - SHOW_STR - IPV6_STR - BGP_STR - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Neighbor on bgp configured interface\n" - "Display routes learned from neighbor\n" - "JavaScript Object Notation\n") /* old command */ DEFUN (ipv6_mbgp_neighbor_routes, @@ -13660,55 +13805,9 @@ DEFUN (ipv6_mbgp_neighbor_routes, bgp_show_type_neighbor, uj); } -ALIAS (show_bgp_instance_neighbor_flap, - show_bgp_neighbor_flap_cmd, - "show bgp neighbors (A.B.C.D|X:X::X:X|WORD) flap-statistics {json}", - SHOW_STR - BGP_STR - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Neighbor on bgp configured interface\n" - "Display flap statistics of the routes learned from neighbor\n" - "JavaScript Object Notation\n") -ALIAS (show_bgp_instance_neighbor_flap, - show_bgp_ipv6_neighbor_flap_cmd, - "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) flap-statistics {json}", - SHOW_STR - BGP_STR - "Address family\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Neighbor on bgp configured interface\n" - "Display flap statistics of the routes learned from neighbor\n" - "JavaScript Object Notation\n") -ALIAS (show_bgp_instance_neighbor_damp, - show_bgp_neighbor_damp_cmd, - "show bgp neighbors (A.B.C.D|X:X::X:X|WORD) dampened-routes {json}", - SHOW_STR - BGP_STR - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Neighbor on bgp configured interface\n" - "Display the dampened routes received from neighbor\n" - "JavaScript Object Notation\n") -ALIAS (show_bgp_instance_neighbor_damp, - show_bgp_ipv6_neighbor_damp_cmd, - "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) dampened-routes {json}", - SHOW_STR - BGP_STR - "Address family\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Neighbor on bgp configured interface\n" - "Display the dampened routes received from neighbor\n" - "JavaScript Object Notation\n") #endif /* HAVE_IPV6 */ @@ -13919,6 +14018,14 @@ DEFUN (bgp_distance, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no distance bgp", + * NO_STR + * "Define an administrative distance\n" + * "BGP distance\n" + * + */ DEFUN (no_bgp_distance, no_bgp_distance_cmd, "no distance bgp <1-255> <1-255> <1-255>", @@ -13939,12 +14046,6 @@ DEFUN (no_bgp_distance, return CMD_SUCCESS; } -ALIAS (no_bgp_distance, - no_bgp_distance2_cmd, - "no distance bgp", - NO_STR - "Define an administrative distance\n" - "BGP distance\n") DEFUN (bgp_distance_source, bgp_distance_source_cmd, @@ -13994,6 +14095,18 @@ DEFUN (no_bgp_distance_source_access_list, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "bgp dampening", + * "BGP Specific commands\n" + * "Enable route-flap dampening\n" + * + * "bgp dampening <1-45>", + * "BGP Specific commands\n" + * "Enable route-flap dampening\n" + * "Half-life time for the penalty\n" + * + */ DEFUN (bgp_damp_set, bgp_damp_set_cmd, "bgp dampening <1-45> <1-20000> <1-20000> <1-255>", @@ -14036,19 +14149,26 @@ DEFUN (bgp_damp_set, half, reuse, suppress, max); } -ALIAS (bgp_damp_set, - bgp_damp_set2_cmd, - "bgp dampening <1-45>", - "BGP Specific commands\n" - "Enable route-flap dampening\n" - "Half-life time for the penalty\n") -ALIAS (bgp_damp_set, - bgp_damp_set3_cmd, - "bgp dampening", - "BGP Specific commands\n" - "Enable route-flap dampening\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no bgp dampening <1-45>", + * NO_STR + * "BGP Specific commands\n" + * "Enable route-flap dampening\n" + * "Half-life time for the penalty\n" + * + * "no bgp dampening <1-45> <1-20000> <1-20000> <1-255>", + * NO_STR + * "BGP Specific commands\n" + * "Enable route-flap dampening\n" + * "Half-life time for the penalty\n" + * "Value to start reusing a route\n" + * "Value to start suppressing a route\n" + * "Maximum duration to suppress a stable route\n" + * + */ DEFUN (bgp_damp_unset, bgp_damp_unset_cmd, "no bgp dampening", @@ -14062,25 +14182,18 @@ DEFUN (bgp_damp_unset, return bgp_damp_disable (bgp, bgp_node_afi (vty), bgp_node_safi (vty)); } -ALIAS (bgp_damp_unset, - bgp_damp_unset2_cmd, - "no bgp dampening <1-45> <1-20000> <1-20000> <1-255>", - NO_STR - "BGP Specific commands\n" - "Enable route-flap dampening\n" - "Half-life time for the penalty\n" - "Value to start reusing a route\n" - "Value to start suppressing a route\n" - "Maximum duration to suppress a stable route\n") -ALIAS (bgp_damp_unset, - bgp_damp_unset3_cmd, - "no bgp dampening <1-45>", - NO_STR - "BGP Specific commands\n" - "Enable route-flap dampening\n" - "Half-life time for the penalty\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip bgp dampening dampened-paths", + * SHOW_STR + * IP_STR + * BGP_STR + * "Display detailed information about dampening\n" + * "Display paths suppressed due to dampening\n" + * + */ DEFUN (show_ip_bgp_dampened_paths, show_ip_bgp_dampened_paths_cmd, "show ip bgp dampened-paths", @@ -14093,15 +14206,17 @@ DEFUN (show_ip_bgp_dampened_paths, NULL, 0); } -ALIAS (show_ip_bgp_dampened_paths, - show_ip_bgp_damp_dampened_paths_cmd, - "show ip bgp dampening dampened-paths", - SHOW_STR - IP_STR - BGP_STR - "Display detailed information about dampening\n" - "Display paths suppressed due to dampening\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip bgp dampening flap-statistics", + * SHOW_STR + * IP_STR + * BGP_STR + * "Display detailed information about dampening\n" + * "Display flap statistics of routes\n" + * + */ DEFUN (show_ip_bgp_flap_statistics, show_ip_bgp_flap_statistics_cmd, "show ip bgp flap-statistics", @@ -14114,14 +14229,6 @@ DEFUN (show_ip_bgp_flap_statistics, bgp_show_type_flap_statistics, NULL, 0); } -ALIAS (show_ip_bgp_flap_statistics, - show_ip_bgp_damp_flap_statistics_cmd, - "show ip bgp dampening flap-statistics", - SHOW_STR - IP_STR - BGP_STR - "Display detailed information about dampening\n" - "Display flap statistics of routes\n") /* Display specified route of BGP table. */ static int @@ -14478,12 +14585,6 @@ bgp_route_init (void) install_element (BGP_NODE, &no_bgp_network_cmd); install_element (BGP_NODE, &no_bgp_network_mask_cmd); install_element (BGP_NODE, &no_bgp_network_mask_natural_cmd); - install_element (BGP_NODE, &no_bgp_network_route_map_cmd); - install_element (BGP_NODE, &no_bgp_network_mask_route_map_cmd); - install_element (BGP_NODE, &no_bgp_network_mask_natural_route_map_cmd); - install_element (BGP_NODE, &no_bgp_network_backdoor_cmd); - install_element (BGP_NODE, &no_bgp_network_mask_backdoor_cmd); - install_element (BGP_NODE, &no_bgp_network_mask_natural_backdoor_cmd); install_element (BGP_NODE, &aggregate_address_cmd); install_element (BGP_NODE, &aggregate_address_mask_cmd); @@ -14493,18 +14594,8 @@ bgp_route_init (void) install_element (BGP_NODE, &aggregate_address_mask_as_set_cmd); install_element (BGP_NODE, &aggregate_address_as_set_summary_cmd); install_element (BGP_NODE, &aggregate_address_mask_as_set_summary_cmd); - install_element (BGP_NODE, &aggregate_address_summary_as_set_cmd); - install_element (BGP_NODE, &aggregate_address_mask_summary_as_set_cmd); install_element (BGP_NODE, &no_aggregate_address_cmd); - install_element (BGP_NODE, &no_aggregate_address_summary_only_cmd); - install_element (BGP_NODE, &no_aggregate_address_as_set_cmd); - install_element (BGP_NODE, &no_aggregate_address_as_set_summary_cmd); - install_element (BGP_NODE, &no_aggregate_address_summary_as_set_cmd); install_element (BGP_NODE, &no_aggregate_address_mask_cmd); - install_element (BGP_NODE, &no_aggregate_address_mask_summary_only_cmd); - install_element (BGP_NODE, &no_aggregate_address_mask_as_set_cmd); - install_element (BGP_NODE, &no_aggregate_address_mask_as_set_summary_cmd); - install_element (BGP_NODE, &no_aggregate_address_mask_summary_as_set_cmd); /* IPv4 unicast configuration. */ install_element (BGP_IPV4_NODE, &bgp_table_map_cmd); @@ -14518,9 +14609,6 @@ bgp_route_init (void) install_element (BGP_IPV4_NODE, &no_bgp_network_cmd); install_element (BGP_IPV4_NODE, &no_bgp_network_mask_cmd); install_element (BGP_IPV4_NODE, &no_bgp_network_mask_natural_cmd); - install_element (BGP_IPV4_NODE, &no_bgp_network_route_map_cmd); - install_element (BGP_IPV4_NODE, &no_bgp_network_mask_route_map_cmd); - install_element (BGP_IPV4_NODE, &no_bgp_network_mask_natural_route_map_cmd); install_element (BGP_IPV4_NODE, &aggregate_address_cmd); install_element (BGP_IPV4_NODE, &aggregate_address_mask_cmd); @@ -14530,18 +14618,8 @@ bgp_route_init (void) install_element (BGP_IPV4_NODE, &aggregate_address_mask_as_set_cmd); install_element (BGP_IPV4_NODE, &aggregate_address_as_set_summary_cmd); install_element (BGP_IPV4_NODE, &aggregate_address_mask_as_set_summary_cmd); - install_element (BGP_IPV4_NODE, &aggregate_address_summary_as_set_cmd); - install_element (BGP_IPV4_NODE, &aggregate_address_mask_summary_as_set_cmd); install_element (BGP_IPV4_NODE, &no_aggregate_address_cmd); - install_element (BGP_IPV4_NODE, &no_aggregate_address_summary_only_cmd); - install_element (BGP_IPV4_NODE, &no_aggregate_address_as_set_cmd); - install_element (BGP_IPV4_NODE, &no_aggregate_address_as_set_summary_cmd); - install_element (BGP_IPV4_NODE, &no_aggregate_address_summary_as_set_cmd); install_element (BGP_IPV4_NODE, &no_aggregate_address_mask_cmd); - install_element (BGP_IPV4_NODE, &no_aggregate_address_mask_summary_only_cmd); - install_element (BGP_IPV4_NODE, &no_aggregate_address_mask_as_set_cmd); - install_element (BGP_IPV4_NODE, &no_aggregate_address_mask_as_set_summary_cmd); - install_element (BGP_IPV4_NODE, &no_aggregate_address_mask_summary_as_set_cmd); /* IPv4 multicast configuration. */ install_element (BGP_IPV4M_NODE, &bgp_table_map_cmd); @@ -14555,9 +14633,6 @@ bgp_route_init (void) install_element (BGP_IPV4M_NODE, &no_bgp_network_cmd); install_element (BGP_IPV4M_NODE, &no_bgp_network_mask_cmd); install_element (BGP_IPV4M_NODE, &no_bgp_network_mask_natural_cmd); - install_element (BGP_IPV4M_NODE, &no_bgp_network_route_map_cmd); - install_element (BGP_IPV4M_NODE, &no_bgp_network_mask_route_map_cmd); - install_element (BGP_IPV4M_NODE, &no_bgp_network_mask_natural_route_map_cmd); install_element (BGP_IPV4M_NODE, &aggregate_address_cmd); install_element (BGP_IPV4M_NODE, &aggregate_address_mask_cmd); install_element (BGP_IPV4M_NODE, &aggregate_address_summary_only_cmd); @@ -14566,39 +14641,25 @@ bgp_route_init (void) install_element (BGP_IPV4M_NODE, &aggregate_address_mask_as_set_cmd); install_element (BGP_IPV4M_NODE, &aggregate_address_as_set_summary_cmd); install_element (BGP_IPV4M_NODE, &aggregate_address_mask_as_set_summary_cmd); - install_element (BGP_IPV4M_NODE, &aggregate_address_summary_as_set_cmd); - install_element (BGP_IPV4M_NODE, &aggregate_address_mask_summary_as_set_cmd); install_element (BGP_IPV4M_NODE, &no_aggregate_address_cmd); - install_element (BGP_IPV4M_NODE, &no_aggregate_address_summary_only_cmd); - install_element (BGP_IPV4M_NODE, &no_aggregate_address_as_set_cmd); - install_element (BGP_IPV4M_NODE, &no_aggregate_address_as_set_summary_cmd); - install_element (BGP_IPV4M_NODE, &no_aggregate_address_summary_as_set_cmd); install_element (BGP_IPV4M_NODE, &no_aggregate_address_mask_cmd); - install_element (BGP_IPV4M_NODE, &no_aggregate_address_mask_summary_only_cmd); - install_element (BGP_IPV4M_NODE, &no_aggregate_address_mask_as_set_cmd); - install_element (BGP_IPV4M_NODE, &no_aggregate_address_mask_as_set_summary_cmd); - install_element (BGP_IPV4M_NODE, &no_aggregate_address_mask_summary_as_set_cmd); install_element (VIEW_NODE, &show_ip_bgp_cmd); install_element (VIEW_NODE, &show_ip_bgp_instance_cmd); install_element (VIEW_NODE, &show_ip_bgp_instance_all_cmd); install_element (VIEW_NODE, &show_ip_bgp_ipv4_cmd); - install_element (VIEW_NODE, &show_bgp_ipv4_safi_cmd); install_element (VIEW_NODE, &show_ip_bgp_route_cmd); install_element (VIEW_NODE, &show_ip_bgp_instance_route_cmd); install_element (VIEW_NODE, &show_ip_bgp_route_pathtype_cmd); install_element (VIEW_NODE, &show_ip_bgp_instance_route_pathtype_cmd); install_element (VIEW_NODE, &show_bgp_ipv4_safi_route_pathtype_cmd); install_element (VIEW_NODE, &show_ip_bgp_ipv4_route_cmd); - install_element (VIEW_NODE, &show_bgp_ipv4_safi_route_cmd); install_element (VIEW_NODE, &show_ip_bgp_vpnv4_all_route_cmd); install_element (VIEW_NODE, &show_ip_bgp_vpnv4_rd_route_cmd); install_element (VIEW_NODE, &show_ip_bgp_prefix_cmd); install_element (VIEW_NODE, &show_ip_bgp_instance_prefix_cmd); install_element (VIEW_NODE, &show_ip_bgp_ipv4_prefix_cmd); install_element (VIEW_NODE, &show_ip_bgp_ipv4_prefix_pathtype_cmd); - install_element (VIEW_NODE, &show_bgp_ipv4_safi_prefix_pathtype_cmd); - install_element (VIEW_NODE, &show_bgp_ipv4_safi_prefix_cmd); install_element (VIEW_NODE, &show_ip_bgp_prefix_pathtype_cmd); install_element (VIEW_NODE, &show_ip_bgp_instance_prefix_pathtype_cmd); install_element (VIEW_NODE, &show_ip_bgp_vpnv4_all_prefix_cmd); @@ -14620,26 +14681,11 @@ bgp_route_init (void) install_element (VIEW_NODE, &show_ip_bgp_community_all_cmd); install_element (VIEW_NODE, &show_ip_bgp_ipv4_community_all_cmd); install_element (VIEW_NODE, &show_ip_bgp_community_cmd); - install_element (VIEW_NODE, &show_ip_bgp_community2_cmd); - install_element (VIEW_NODE, &show_ip_bgp_community3_cmd); - install_element (VIEW_NODE, &show_ip_bgp_community4_cmd); install_element (VIEW_NODE, &show_ip_bgp_ipv4_community_cmd); - install_element (VIEW_NODE, &show_ip_bgp_ipv4_community2_cmd); - install_element (VIEW_NODE, &show_ip_bgp_ipv4_community3_cmd); - install_element (VIEW_NODE, &show_ip_bgp_ipv4_community4_cmd); install_element (VIEW_NODE, &show_bgp_instance_afi_safi_community_all_cmd); install_element (VIEW_NODE, &show_bgp_instance_afi_safi_community_cmd); - install_element (VIEW_NODE, &show_bgp_instance_afi_safi_community2_cmd); - install_element (VIEW_NODE, &show_bgp_instance_afi_safi_community3_cmd); - install_element (VIEW_NODE, &show_bgp_instance_afi_safi_community4_cmd); install_element (VIEW_NODE, &show_ip_bgp_community_exact_cmd); - install_element (VIEW_NODE, &show_ip_bgp_community2_exact_cmd); - install_element (VIEW_NODE, &show_ip_bgp_community3_exact_cmd); - install_element (VIEW_NODE, &show_ip_bgp_community4_exact_cmd); install_element (VIEW_NODE, &show_ip_bgp_ipv4_community_exact_cmd); - install_element (VIEW_NODE, &show_ip_bgp_ipv4_community2_exact_cmd); - install_element (VIEW_NODE, &show_ip_bgp_ipv4_community3_exact_cmd); - install_element (VIEW_NODE, &show_ip_bgp_ipv4_community4_exact_cmd); install_element (VIEW_NODE, &show_ip_bgp_community_list_cmd); install_element (VIEW_NODE, &show_ip_bgp_instance_community_list_cmd); install_element (VIEW_NODE, &show_ip_bgp_ipv4_community_list_cmd); @@ -14650,16 +14696,10 @@ bgp_route_init (void) install_element (VIEW_NODE, &show_ip_bgp_ipv4_prefix_longer_cmd); install_element (VIEW_NODE, &show_ip_bgp_neighbor_advertised_route_cmd); install_element (VIEW_NODE, &show_ip_bgp_instance_neighbor_advertised_route_cmd); - install_element (VIEW_NODE, &show_ip_bgp_neighbor_advertised_route_rmap_cmd); - install_element (VIEW_NODE, &show_ip_bgp_instance_neighbor_advertised_route_rmap_cmd); install_element (VIEW_NODE, &show_ip_bgp_ipv4_neighbor_advertised_route_cmd); - install_element (VIEW_NODE, &show_ip_bgp_ipv4_neighbor_advertised_route_rmap_cmd); install_element (VIEW_NODE, &show_ip_bgp_neighbor_received_routes_cmd); install_element (VIEW_NODE, &show_ip_bgp_instance_neighbor_received_routes_cmd); - install_element (VIEW_NODE, &show_ip_bgp_neighbor_received_routes_rmap_cmd); - install_element (VIEW_NODE, &show_ip_bgp_instance_neighbor_received_routes_rmap_cmd); install_element (VIEW_NODE, &show_ip_bgp_ipv4_neighbor_received_routes_cmd); - install_element (VIEW_NODE, &show_ip_bgp_ipv4_neighbor_received_routes_rmap_cmd); install_element (VIEW_NODE, &show_bgp_instance_afi_safi_neighbor_adv_recd_routes_cmd); install_element (VIEW_NODE, &show_ip_bgp_neighbor_routes_cmd); install_element (VIEW_NODE, &show_ip_bgp_instance_neighbor_routes_cmd); @@ -14671,23 +14711,15 @@ bgp_route_init (void) install_element (VIEW_NODE, &show_ip_bgp_dampened_paths_cmd); install_element (VIEW_NODE, &show_ip_bgp_ipv4_dampening_dampd_paths_cmd); install_element (VIEW_NODE, &show_ip_bgp_ipv4_dampening_flap_stats_cmd); - install_element (VIEW_NODE, &show_ip_bgp_damp_dampened_paths_cmd); install_element (VIEW_NODE, &show_ip_bgp_flap_statistics_cmd); - install_element (VIEW_NODE, &show_ip_bgp_damp_flap_statistics_cmd); install_element (VIEW_NODE, &show_ip_bgp_flap_address_cmd); - install_element (VIEW_NODE, &show_ip_bgp_damp_flap_address_cmd); install_element (VIEW_NODE, &show_ip_bgp_flap_prefix_cmd); install_element (VIEW_NODE, &show_ip_bgp_flap_cidr_only_cmd); - install_element (VIEW_NODE, &show_ip_bgp_damp_flap_cidr_only_cmd); install_element (VIEW_NODE, &show_ip_bgp_flap_regexp_cmd); install_element (VIEW_NODE, &show_ip_bgp_flap_filter_list_cmd); - install_element (VIEW_NODE, &show_ip_bgp_damp_flap_filter_list_cmd); install_element (VIEW_NODE, &show_ip_bgp_flap_prefix_list_cmd); - install_element (VIEW_NODE, &show_ip_bgp_damp_flap_prefix_list_cmd); install_element (VIEW_NODE, &show_ip_bgp_flap_prefix_longer_cmd); - install_element (VIEW_NODE, &show_ip_bgp_damp_flap_prefix_longer_cmd); install_element (VIEW_NODE, &show_ip_bgp_flap_route_map_cmd); - install_element (VIEW_NODE, &show_ip_bgp_damp_flap_route_map_cmd); install_element (VIEW_NODE, &show_ip_bgp_neighbor_flap_cmd); install_element (VIEW_NODE, &show_ip_bgp_neighbor_damp_cmd); @@ -14698,14 +14730,11 @@ bgp_route_init (void) install_element (RESTRICTED_NODE, &show_ip_bgp_instance_route_pathtype_cmd); install_element (RESTRICTED_NODE, &show_bgp_ipv4_safi_route_pathtype_cmd); install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_route_cmd); - install_element (RESTRICTED_NODE, &show_bgp_ipv4_safi_route_cmd); install_element (RESTRICTED_NODE, &show_ip_bgp_vpnv4_rd_route_cmd); install_element (RESTRICTED_NODE, &show_ip_bgp_prefix_cmd); install_element (RESTRICTED_NODE, &show_ip_bgp_instance_prefix_cmd); install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_prefix_cmd); install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_prefix_pathtype_cmd); - install_element (RESTRICTED_NODE, &show_bgp_ipv4_safi_prefix_pathtype_cmd); - install_element (RESTRICTED_NODE, &show_bgp_ipv4_safi_prefix_cmd); install_element (RESTRICTED_NODE, &show_ip_bgp_prefix_pathtype_cmd); install_element (RESTRICTED_NODE, &show_ip_bgp_instance_prefix_pathtype_cmd); install_element (RESTRICTED_NODE, &show_ip_bgp_vpnv4_all_prefix_cmd); @@ -14713,47 +14742,28 @@ bgp_route_init (void) install_element (RESTRICTED_NODE, &show_ip_bgp_instance_route_cmd); install_element (RESTRICTED_NODE, &show_ip_bgp_instance_prefix_cmd); install_element (RESTRICTED_NODE, &show_ip_bgp_community_cmd); - install_element (RESTRICTED_NODE, &show_ip_bgp_community2_cmd); - install_element (RESTRICTED_NODE, &show_ip_bgp_community3_cmd); - install_element (RESTRICTED_NODE, &show_ip_bgp_community4_cmd); install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_community_cmd); - install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_community2_cmd); - install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_community3_cmd); - install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_community4_cmd); install_element (RESTRICTED_NODE, &show_bgp_instance_afi_safi_community_all_cmd); install_element (RESTRICTED_NODE, &show_bgp_instance_afi_safi_community_cmd); - install_element (RESTRICTED_NODE, &show_bgp_instance_afi_safi_community2_cmd); - install_element (RESTRICTED_NODE, &show_bgp_instance_afi_safi_community3_cmd); - install_element (RESTRICTED_NODE, &show_bgp_instance_afi_safi_community4_cmd); install_element (RESTRICTED_NODE, &show_ip_bgp_community_exact_cmd); - install_element (RESTRICTED_NODE, &show_ip_bgp_community2_exact_cmd); - install_element (RESTRICTED_NODE, &show_ip_bgp_community3_exact_cmd); - install_element (RESTRICTED_NODE, &show_ip_bgp_community4_exact_cmd); install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_community_exact_cmd); - install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_community2_exact_cmd); - install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_community3_exact_cmd); - install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_community4_exact_cmd); install_element (ENABLE_NODE, &show_ip_bgp_cmd); install_element (ENABLE_NODE, &show_ip_bgp_instance_cmd); install_element (ENABLE_NODE, &show_ip_bgp_instance_all_cmd); install_element (ENABLE_NODE, &show_ip_bgp_ipv4_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv4_safi_cmd); install_element (ENABLE_NODE, &show_ip_bgp_route_cmd); install_element (ENABLE_NODE, &show_ip_bgp_instance_route_cmd); install_element (ENABLE_NODE, &show_ip_bgp_route_pathtype_cmd); install_element (ENABLE_NODE, &show_ip_bgp_instance_route_pathtype_cmd); install_element (ENABLE_NODE, &show_bgp_ipv4_safi_route_pathtype_cmd); install_element (ENABLE_NODE, &show_ip_bgp_ipv4_route_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv4_safi_route_cmd); install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_all_route_cmd); install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_rd_route_cmd); install_element (ENABLE_NODE, &show_ip_bgp_prefix_cmd); install_element (ENABLE_NODE, &show_ip_bgp_instance_prefix_cmd); install_element (ENABLE_NODE, &show_ip_bgp_ipv4_prefix_cmd); install_element (ENABLE_NODE, &show_ip_bgp_ipv4_prefix_pathtype_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv4_safi_prefix_pathtype_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv4_safi_prefix_cmd); install_element (ENABLE_NODE, &show_ip_bgp_prefix_pathtype_cmd); install_element (ENABLE_NODE, &show_ip_bgp_instance_prefix_pathtype_cmd); install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_all_prefix_cmd); @@ -14775,26 +14785,11 @@ bgp_route_init (void) install_element (ENABLE_NODE, &show_ip_bgp_community_all_cmd); install_element (ENABLE_NODE, &show_ip_bgp_ipv4_community_all_cmd); install_element (ENABLE_NODE, &show_ip_bgp_community_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_community2_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_community3_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_community4_cmd); install_element (ENABLE_NODE, &show_ip_bgp_ipv4_community_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_ipv4_community2_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_ipv4_community3_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_ipv4_community4_cmd); install_element (ENABLE_NODE, &show_bgp_instance_afi_safi_community_all_cmd); install_element (ENABLE_NODE, &show_bgp_instance_afi_safi_community_cmd); - install_element (ENABLE_NODE, &show_bgp_instance_afi_safi_community2_cmd); - install_element (ENABLE_NODE, &show_bgp_instance_afi_safi_community3_cmd); - install_element (ENABLE_NODE, &show_bgp_instance_afi_safi_community4_cmd); install_element (ENABLE_NODE, &show_ip_bgp_community_exact_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_community2_exact_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_community3_exact_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_community4_exact_cmd); install_element (ENABLE_NODE, &show_ip_bgp_ipv4_community_exact_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_ipv4_community2_exact_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_ipv4_community3_exact_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_ipv4_community4_exact_cmd); install_element (ENABLE_NODE, &show_ip_bgp_community_list_cmd); install_element (ENABLE_NODE, &show_ip_bgp_instance_community_list_cmd); install_element (ENABLE_NODE, &show_ip_bgp_ipv4_community_list_cmd); @@ -14805,16 +14800,10 @@ bgp_route_init (void) install_element (ENABLE_NODE, &show_ip_bgp_ipv4_prefix_longer_cmd); install_element (ENABLE_NODE, &show_ip_bgp_neighbor_advertised_route_cmd); install_element (ENABLE_NODE, &show_ip_bgp_instance_neighbor_advertised_route_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_neighbor_advertised_route_rmap_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_instance_neighbor_advertised_route_rmap_cmd); install_element (ENABLE_NODE, &show_ip_bgp_ipv4_neighbor_advertised_route_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_ipv4_neighbor_advertised_route_rmap_cmd); install_element (ENABLE_NODE, &show_ip_bgp_neighbor_received_routes_cmd); install_element (ENABLE_NODE, &show_ip_bgp_instance_neighbor_received_routes_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_neighbor_received_routes_rmap_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_instance_neighbor_received_routes_rmap_cmd); install_element (ENABLE_NODE, &show_ip_bgp_ipv4_neighbor_received_routes_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_ipv4_neighbor_received_routes_rmap_cmd); install_element (ENABLE_NODE, &show_bgp_instance_afi_safi_neighbor_adv_recd_routes_cmd); install_element (ENABLE_NODE, &show_ip_bgp_neighbor_routes_cmd); install_element (ENABLE_NODE, &show_ip_bgp_instance_neighbor_routes_cmd); @@ -14826,25 +14815,15 @@ bgp_route_init (void) install_element (ENABLE_NODE, &show_ip_bgp_ipv4_dampening_parameters_cmd); install_element (ENABLE_NODE, &show_ip_bgp_ipv4_dampening_dampd_paths_cmd); install_element (ENABLE_NODE, &show_ip_bgp_ipv4_dampening_flap_stats_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_damp_dampened_paths_cmd); install_element (ENABLE_NODE, &show_ip_bgp_flap_statistics_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_damp_flap_statistics_cmd); install_element (ENABLE_NODE, &show_ip_bgp_flap_address_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_damp_flap_address_cmd); install_element (ENABLE_NODE, &show_ip_bgp_flap_prefix_cmd); install_element (ENABLE_NODE, &show_ip_bgp_flap_cidr_only_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_damp_flap_cidr_only_cmd); install_element (ENABLE_NODE, &show_ip_bgp_flap_regexp_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_damp_flap_regexp_cmd); install_element (ENABLE_NODE, &show_ip_bgp_flap_filter_list_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_damp_flap_filter_list_cmd); install_element (ENABLE_NODE, &show_ip_bgp_flap_prefix_list_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_damp_flap_prefix_list_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_damp_flap_prefix_list_cmd); install_element (ENABLE_NODE, &show_ip_bgp_flap_prefix_longer_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_damp_flap_prefix_longer_cmd); install_element (ENABLE_NODE, &show_ip_bgp_flap_route_map_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_damp_flap_route_map_cmd); install_element (ENABLE_NODE, &show_ip_bgp_neighbor_flap_cmd); install_element (ENABLE_NODE, &show_ip_bgp_neighbor_damp_cmd); @@ -14881,7 +14860,6 @@ bgp_route_init (void) install_element (BGP_IPV6_NODE, &ipv6_bgp_network_route_map_cmd); install_element (BGP_IPV6_NODE, &no_bgp_table_map_cmd); install_element (BGP_IPV6_NODE, &no_ipv6_bgp_network_cmd); - install_element (BGP_IPV6_NODE, &no_ipv6_bgp_network_route_map_cmd); install_element (BGP_IPV6_NODE, &ipv6_aggregate_address_cmd); install_element (BGP_IPV6_NODE, &ipv6_aggregate_address_summary_only_cmd); @@ -14892,106 +14870,51 @@ bgp_route_init (void) install_element (BGP_IPV6M_NODE, &no_ipv6_bgp_network_cmd); /* Old config IPv6 BGP commands. */ - install_element (BGP_NODE, &old_ipv6_bgp_network_cmd); - install_element (BGP_NODE, &old_no_ipv6_bgp_network_cmd); - install_element (BGP_NODE, &old_ipv6_aggregate_address_cmd); - install_element (BGP_NODE, &old_ipv6_aggregate_address_summary_only_cmd); - install_element (BGP_NODE, &old_no_ipv6_aggregate_address_cmd); - install_element (BGP_NODE, &old_no_ipv6_aggregate_address_summary_only_cmd); install_element (VIEW_NODE, &show_bgp_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_cmd); install_element (VIEW_NODE, &show_bgp_ipv6_safi_cmd); install_element (VIEW_NODE, &show_bgp_route_cmd); install_element (VIEW_NODE, &show_bgp_ipv6_route_cmd); install_element (VIEW_NODE, &show_bgp_ipv6_safi_route_cmd); install_element (VIEW_NODE, &show_bgp_route_pathtype_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_route_pathtype_cmd); install_element (VIEW_NODE, &show_bgp_ipv6_safi_route_pathtype_cmd); install_element (VIEW_NODE, &show_bgp_prefix_cmd); install_element (VIEW_NODE, &show_bgp_ipv6_prefix_cmd); install_element (VIEW_NODE, &show_bgp_ipv6_safi_prefix_cmd); install_element (VIEW_NODE, &show_bgp_prefix_pathtype_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_prefix_pathtype_cmd); install_element (VIEW_NODE, &show_bgp_ipv6_safi_prefix_pathtype_cmd); install_element (VIEW_NODE, &show_bgp_regexp_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_regexp_cmd); install_element (VIEW_NODE, &show_bgp_prefix_list_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_prefix_list_cmd); install_element (VIEW_NODE, &show_bgp_filter_list_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_filter_list_cmd); install_element (VIEW_NODE, &show_bgp_route_map_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_route_map_cmd); install_element (VIEW_NODE, &show_bgp_community_all_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_community_all_cmd); install_element (VIEW_NODE, &show_bgp_community_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_community_cmd); - install_element (VIEW_NODE, &show_bgp_community2_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_community2_cmd); - install_element (VIEW_NODE, &show_bgp_community3_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_community3_cmd); - install_element (VIEW_NODE, &show_bgp_community4_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_community4_cmd); install_element (VIEW_NODE, &show_bgp_community_exact_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_community_exact_cmd); - install_element (VIEW_NODE, &show_bgp_community2_exact_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_community2_exact_cmd); - install_element (VIEW_NODE, &show_bgp_community3_exact_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_community3_exact_cmd); - install_element (VIEW_NODE, &show_bgp_community4_exact_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_community4_exact_cmd); install_element (VIEW_NODE, &show_bgp_community_list_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_community_list_cmd); install_element (VIEW_NODE, &show_bgp_community_list_exact_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_community_list_exact_cmd); install_element (VIEW_NODE, &show_bgp_prefix_longer_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_prefix_longer_cmd); install_element (VIEW_NODE, &show_bgp_neighbor_advertised_route_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_neighbor_advertised_route_cmd); install_element (VIEW_NODE, &show_bgp_neighbor_received_routes_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_neighbor_received_routes_cmd); install_element (VIEW_NODE, &show_bgp_neighbor_routes_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_neighbor_routes_cmd); install_element (VIEW_NODE, &show_bgp_neighbor_received_prefix_filter_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_neighbor_received_prefix_filter_cmd); - install_element (VIEW_NODE, &show_bgp_neighbor_flap_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_neighbor_flap_cmd); - install_element (VIEW_NODE, &show_bgp_neighbor_damp_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_neighbor_damp_cmd); install_element (VIEW_NODE, &show_bgp_instance_cmd); install_element (VIEW_NODE, &show_bgp_instance_all_cmd); - install_element (VIEW_NODE, &show_bgp_instance_ipv6_cmd); install_element (VIEW_NODE, &show_bgp_instance_route_cmd); - install_element (VIEW_NODE, &show_bgp_instance_ipv6_route_cmd); install_element (VIEW_NODE, &show_bgp_instance_route_pathtype_cmd); - install_element (VIEW_NODE, &show_bgp_instance_ipv6_route_pathtype_cmd); install_element (VIEW_NODE, &show_bgp_instance_prefix_cmd); - install_element (VIEW_NODE, &show_bgp_instance_ipv6_prefix_cmd); install_element (VIEW_NODE, &show_bgp_instance_prefix_pathtype_cmd); - install_element (VIEW_NODE, &show_bgp_instance_ipv6_prefix_pathtype_cmd); install_element (VIEW_NODE, &show_bgp_instance_prefix_list_cmd); - install_element (VIEW_NODE, &show_bgp_instance_ipv6_prefix_list_cmd); install_element (VIEW_NODE, &show_bgp_instance_filter_list_cmd); - install_element (VIEW_NODE, &show_bgp_instance_ipv6_filter_list_cmd); install_element (VIEW_NODE, &show_bgp_instance_route_map_cmd); - install_element (VIEW_NODE, &show_bgp_instance_ipv6_route_map_cmd); install_element (VIEW_NODE, &show_bgp_instance_community_list_cmd); - install_element (VIEW_NODE, &show_bgp_instance_ipv6_community_list_cmd); install_element (VIEW_NODE, &show_bgp_instance_prefix_longer_cmd); - install_element (VIEW_NODE, &show_bgp_instance_ipv6_prefix_longer_cmd); install_element (VIEW_NODE, &show_bgp_instance_neighbor_advertised_route_cmd); - install_element (VIEW_NODE, &show_bgp_instance_ipv6_neighbor_advertised_route_cmd); install_element (VIEW_NODE, &show_bgp_instance_neighbor_received_routes_cmd); - install_element (VIEW_NODE, &show_bgp_instance_ipv6_neighbor_received_routes_cmd); install_element (VIEW_NODE, &show_bgp_instance_neighbor_routes_cmd); - install_element (VIEW_NODE, &show_bgp_instance_ipv6_neighbor_routes_cmd); install_element (VIEW_NODE, &show_bgp_instance_neighbor_received_prefix_filter_cmd); - install_element (VIEW_NODE, &show_bgp_instance_ipv6_neighbor_received_prefix_filter_cmd); install_element (VIEW_NODE, &show_bgp_instance_neighbor_flap_cmd); - install_element (VIEW_NODE, &show_bgp_instance_ipv6_neighbor_flap_cmd); install_element (VIEW_NODE, &show_bgp_instance_neighbor_damp_cmd); - install_element (VIEW_NODE, &show_bgp_instance_ipv6_neighbor_damp_cmd); /* Restricted: * VIEW_NODE - (set of dangerous commands) - (commands dependent on prev) @@ -15000,131 +14923,62 @@ bgp_route_init (void) install_element (RESTRICTED_NODE, &show_bgp_ipv6_route_cmd); install_element (RESTRICTED_NODE, &show_bgp_ipv6_safi_route_cmd); install_element (RESTRICTED_NODE, &show_bgp_route_pathtype_cmd); - install_element (RESTRICTED_NODE, &show_bgp_ipv6_route_pathtype_cmd); install_element (RESTRICTED_NODE, &show_bgp_ipv6_safi_route_pathtype_cmd); install_element (RESTRICTED_NODE, &show_bgp_prefix_cmd); install_element (RESTRICTED_NODE, &show_bgp_ipv6_prefix_cmd); install_element (RESTRICTED_NODE, &show_bgp_ipv6_safi_prefix_cmd); install_element (RESTRICTED_NODE, &show_bgp_prefix_pathtype_cmd); - install_element (RESTRICTED_NODE, &show_bgp_ipv6_prefix_pathtype_cmd); install_element (RESTRICTED_NODE, &show_bgp_ipv6_safi_prefix_pathtype_cmd); install_element (RESTRICTED_NODE, &show_bgp_community_cmd); - install_element (RESTRICTED_NODE, &show_bgp_ipv6_community_cmd); - install_element (RESTRICTED_NODE, &show_bgp_community2_cmd); - install_element (RESTRICTED_NODE, &show_bgp_ipv6_community2_cmd); - install_element (RESTRICTED_NODE, &show_bgp_community3_cmd); - install_element (RESTRICTED_NODE, &show_bgp_ipv6_community3_cmd); - install_element (RESTRICTED_NODE, &show_bgp_community4_cmd); - install_element (RESTRICTED_NODE, &show_bgp_ipv6_community4_cmd); install_element (RESTRICTED_NODE, &show_bgp_community_exact_cmd); - install_element (RESTRICTED_NODE, &show_bgp_ipv6_community_exact_cmd); - install_element (RESTRICTED_NODE, &show_bgp_community2_exact_cmd); - install_element (RESTRICTED_NODE, &show_bgp_ipv6_community2_exact_cmd); - install_element (RESTRICTED_NODE, &show_bgp_community3_exact_cmd); - install_element (RESTRICTED_NODE, &show_bgp_ipv6_community3_exact_cmd); - install_element (RESTRICTED_NODE, &show_bgp_community4_exact_cmd); - install_element (RESTRICTED_NODE, &show_bgp_ipv6_community4_exact_cmd); install_element (RESTRICTED_NODE, &show_bgp_instance_route_cmd); - install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_route_cmd); install_element (RESTRICTED_NODE, &show_bgp_instance_route_pathtype_cmd); - install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_route_pathtype_cmd); install_element (RESTRICTED_NODE, &show_bgp_instance_prefix_cmd); - install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_prefix_cmd); install_element (RESTRICTED_NODE, &show_bgp_instance_neighbor_received_prefix_filter_cmd); - install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_neighbor_received_prefix_filter_cmd); install_element (ENABLE_NODE, &show_bgp_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv6_cmd); install_element (ENABLE_NODE, &show_bgp_ipv6_safi_cmd); install_element (ENABLE_NODE, &show_bgp_route_cmd); install_element (ENABLE_NODE, &show_bgp_ipv6_route_cmd); install_element (ENABLE_NODE, &show_bgp_ipv6_safi_route_cmd); install_element (ENABLE_NODE, &show_bgp_route_pathtype_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv6_route_pathtype_cmd); install_element (ENABLE_NODE, &show_bgp_ipv6_safi_route_pathtype_cmd); install_element (ENABLE_NODE, &show_bgp_prefix_cmd); install_element (ENABLE_NODE, &show_bgp_prefix_pathtype_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv6_prefix_pathtype_cmd); install_element (ENABLE_NODE, &show_bgp_ipv6_safi_prefix_pathtype_cmd); install_element (ENABLE_NODE, &show_bgp_ipv6_prefix_cmd); install_element (ENABLE_NODE, &show_bgp_ipv6_safi_prefix_cmd); install_element (ENABLE_NODE, &show_bgp_regexp_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv6_regexp_cmd); install_element (ENABLE_NODE, &show_bgp_prefix_list_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv6_prefix_list_cmd); install_element (ENABLE_NODE, &show_bgp_filter_list_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv6_filter_list_cmd); install_element (ENABLE_NODE, &show_bgp_route_map_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv6_route_map_cmd); install_element (ENABLE_NODE, &show_bgp_community_all_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv6_community_all_cmd); install_element (ENABLE_NODE, &show_bgp_community_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv6_community_cmd); - install_element (ENABLE_NODE, &show_bgp_community2_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv6_community2_cmd); - install_element (ENABLE_NODE, &show_bgp_community3_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv6_community3_cmd); - install_element (ENABLE_NODE, &show_bgp_community4_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv6_community4_cmd); install_element (ENABLE_NODE, &show_bgp_community_exact_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv6_community_exact_cmd); - install_element (ENABLE_NODE, &show_bgp_community2_exact_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv6_community2_exact_cmd); - install_element (ENABLE_NODE, &show_bgp_community3_exact_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv6_community3_exact_cmd); - install_element (ENABLE_NODE, &show_bgp_community4_exact_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv6_community4_exact_cmd); install_element (ENABLE_NODE, &show_bgp_community_list_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv6_community_list_cmd); install_element (ENABLE_NODE, &show_bgp_community_list_exact_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv6_community_list_exact_cmd); install_element (ENABLE_NODE, &show_bgp_prefix_longer_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv6_prefix_longer_cmd); install_element (ENABLE_NODE, &show_bgp_neighbor_advertised_route_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv6_neighbor_advertised_route_cmd); install_element (ENABLE_NODE, &show_bgp_neighbor_received_routes_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv6_neighbor_received_routes_cmd); install_element (ENABLE_NODE, &show_bgp_neighbor_routes_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv6_neighbor_routes_cmd); install_element (ENABLE_NODE, &show_bgp_neighbor_received_prefix_filter_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv6_neighbor_received_prefix_filter_cmd); - install_element (ENABLE_NODE, &show_bgp_neighbor_flap_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv6_neighbor_flap_cmd); - install_element (ENABLE_NODE, &show_bgp_neighbor_damp_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv6_neighbor_damp_cmd); install_element (ENABLE_NODE, &show_bgp_instance_cmd); install_element (ENABLE_NODE, &show_bgp_instance_all_cmd); - install_element (ENABLE_NODE, &show_bgp_instance_ipv6_cmd); install_element (ENABLE_NODE, &show_bgp_instance_route_cmd); - install_element (ENABLE_NODE, &show_bgp_instance_ipv6_route_cmd); install_element (ENABLE_NODE, &show_bgp_instance_route_pathtype_cmd); - install_element (ENABLE_NODE, &show_bgp_instance_ipv6_route_pathtype_cmd); install_element (ENABLE_NODE, &show_bgp_instance_prefix_cmd); - install_element (ENABLE_NODE, &show_bgp_instance_ipv6_prefix_cmd); install_element (ENABLE_NODE, &show_bgp_instance_prefix_pathtype_cmd); - install_element (ENABLE_NODE, &show_bgp_instance_ipv6_prefix_pathtype_cmd); install_element (ENABLE_NODE, &show_bgp_instance_prefix_list_cmd); - install_element (ENABLE_NODE, &show_bgp_instance_ipv6_prefix_list_cmd); install_element (ENABLE_NODE, &show_bgp_instance_filter_list_cmd); - install_element (ENABLE_NODE, &show_bgp_instance_ipv6_filter_list_cmd); install_element (ENABLE_NODE, &show_bgp_instance_route_map_cmd); - install_element (ENABLE_NODE, &show_bgp_instance_ipv6_route_map_cmd); install_element (ENABLE_NODE, &show_bgp_instance_community_list_cmd); - install_element (ENABLE_NODE, &show_bgp_instance_ipv6_community_list_cmd); install_element (ENABLE_NODE, &show_bgp_instance_prefix_longer_cmd); - install_element (ENABLE_NODE, &show_bgp_instance_ipv6_prefix_longer_cmd); install_element (ENABLE_NODE, &show_bgp_instance_neighbor_advertised_route_cmd); - install_element (ENABLE_NODE, &show_bgp_instance_ipv6_neighbor_advertised_route_cmd); install_element (ENABLE_NODE, &show_bgp_instance_neighbor_received_routes_cmd); - install_element (ENABLE_NODE, &show_bgp_instance_ipv6_neighbor_received_routes_cmd); install_element (ENABLE_NODE, &show_bgp_instance_neighbor_routes_cmd); - install_element (ENABLE_NODE, &show_bgp_instance_ipv6_neighbor_routes_cmd); install_element (ENABLE_NODE, &show_bgp_instance_neighbor_received_prefix_filter_cmd); - install_element (ENABLE_NODE, &show_bgp_instance_ipv6_neighbor_received_prefix_filter_cmd); install_element (ENABLE_NODE, &show_bgp_instance_neighbor_flap_cmd); - install_element (ENABLE_NODE, &show_bgp_instance_ipv6_neighbor_flap_cmd); install_element (ENABLE_NODE, &show_bgp_instance_neighbor_damp_cmd); - install_element (ENABLE_NODE, &show_bgp_instance_ipv6_neighbor_damp_cmd); /* Statistics */ install_element (ENABLE_NODE, &show_bgp_statistics_cmd); @@ -15141,13 +14995,7 @@ bgp_route_init (void) install_element (VIEW_NODE, &show_ipv6_bgp_filter_list_cmd); install_element (VIEW_NODE, &show_ipv6_bgp_community_all_cmd); install_element (VIEW_NODE, &show_ipv6_bgp_community_cmd); - install_element (VIEW_NODE, &show_ipv6_bgp_community2_cmd); - install_element (VIEW_NODE, &show_ipv6_bgp_community3_cmd); - install_element (VIEW_NODE, &show_ipv6_bgp_community4_cmd); install_element (VIEW_NODE, &show_ipv6_bgp_community_exact_cmd); - install_element (VIEW_NODE, &show_ipv6_bgp_community2_exact_cmd); - install_element (VIEW_NODE, &show_ipv6_bgp_community3_exact_cmd); - install_element (VIEW_NODE, &show_ipv6_bgp_community4_exact_cmd); install_element (VIEW_NODE, &show_ipv6_bgp_community_list_cmd); install_element (VIEW_NODE, &show_ipv6_bgp_community_list_exact_cmd); install_element (VIEW_NODE, &show_ipv6_bgp_prefix_longer_cmd); @@ -15159,13 +15007,7 @@ bgp_route_init (void) install_element (VIEW_NODE, &show_ipv6_mbgp_filter_list_cmd); install_element (VIEW_NODE, &show_ipv6_mbgp_community_all_cmd); install_element (VIEW_NODE, &show_ipv6_mbgp_community_cmd); - install_element (VIEW_NODE, &show_ipv6_mbgp_community2_cmd); - install_element (VIEW_NODE, &show_ipv6_mbgp_community3_cmd); - install_element (VIEW_NODE, &show_ipv6_mbgp_community4_cmd); install_element (VIEW_NODE, &show_ipv6_mbgp_community_exact_cmd); - install_element (VIEW_NODE, &show_ipv6_mbgp_community2_exact_cmd); - install_element (VIEW_NODE, &show_ipv6_mbgp_community3_exact_cmd); - install_element (VIEW_NODE, &show_ipv6_mbgp_community4_exact_cmd); install_element (VIEW_NODE, &show_ipv6_mbgp_community_list_cmd); install_element (VIEW_NODE, &show_ipv6_mbgp_community_list_exact_cmd); install_element (VIEW_NODE, &show_ipv6_mbgp_prefix_longer_cmd); @@ -15179,13 +15021,7 @@ bgp_route_init (void) install_element (ENABLE_NODE, &show_ipv6_bgp_filter_list_cmd); install_element (ENABLE_NODE, &show_ipv6_bgp_community_all_cmd); install_element (ENABLE_NODE, &show_ipv6_bgp_community_cmd); - install_element (ENABLE_NODE, &show_ipv6_bgp_community2_cmd); - install_element (ENABLE_NODE, &show_ipv6_bgp_community3_cmd); - install_element (ENABLE_NODE, &show_ipv6_bgp_community4_cmd); install_element (ENABLE_NODE, &show_ipv6_bgp_community_exact_cmd); - install_element (ENABLE_NODE, &show_ipv6_bgp_community2_exact_cmd); - install_element (ENABLE_NODE, &show_ipv6_bgp_community3_exact_cmd); - install_element (ENABLE_NODE, &show_ipv6_bgp_community4_exact_cmd); install_element (ENABLE_NODE, &show_ipv6_bgp_community_list_cmd); install_element (ENABLE_NODE, &show_ipv6_bgp_community_list_exact_cmd); install_element (ENABLE_NODE, &show_ipv6_bgp_prefix_longer_cmd); @@ -15197,63 +15033,39 @@ bgp_route_init (void) install_element (ENABLE_NODE, &show_ipv6_mbgp_filter_list_cmd); install_element (ENABLE_NODE, &show_ipv6_mbgp_community_all_cmd); install_element (ENABLE_NODE, &show_ipv6_mbgp_community_cmd); - install_element (ENABLE_NODE, &show_ipv6_mbgp_community2_cmd); - install_element (ENABLE_NODE, &show_ipv6_mbgp_community3_cmd); - install_element (ENABLE_NODE, &show_ipv6_mbgp_community4_cmd); install_element (ENABLE_NODE, &show_ipv6_mbgp_community_exact_cmd); - install_element (ENABLE_NODE, &show_ipv6_mbgp_community2_exact_cmd); - install_element (ENABLE_NODE, &show_ipv6_mbgp_community3_exact_cmd); - install_element (ENABLE_NODE, &show_ipv6_mbgp_community4_exact_cmd); install_element (ENABLE_NODE, &show_ipv6_mbgp_community_list_cmd); install_element (ENABLE_NODE, &show_ipv6_mbgp_community_list_exact_cmd); install_element (ENABLE_NODE, &show_ipv6_mbgp_prefix_longer_cmd); /* old command */ - install_element (VIEW_NODE, &ipv6_bgp_neighbor_advertised_route_cmd); - install_element (ENABLE_NODE, &ipv6_bgp_neighbor_advertised_route_cmd); install_element (VIEW_NODE, &ipv6_mbgp_neighbor_advertised_route_cmd); install_element (ENABLE_NODE, &ipv6_mbgp_neighbor_advertised_route_cmd); /* old command */ - install_element (VIEW_NODE, &ipv6_bgp_neighbor_received_routes_cmd); - install_element (ENABLE_NODE, &ipv6_bgp_neighbor_received_routes_cmd); install_element (VIEW_NODE, &ipv6_mbgp_neighbor_received_routes_cmd); install_element (ENABLE_NODE, &ipv6_mbgp_neighbor_received_routes_cmd); /* old command */ - install_element (VIEW_NODE, &ipv6_bgp_neighbor_routes_cmd); - install_element (ENABLE_NODE, &ipv6_bgp_neighbor_routes_cmd); install_element (VIEW_NODE, &ipv6_mbgp_neighbor_routes_cmd); install_element (ENABLE_NODE, &ipv6_mbgp_neighbor_routes_cmd); #endif /* HAVE_IPV6 */ install_element (BGP_NODE, &bgp_distance_cmd); install_element (BGP_NODE, &no_bgp_distance_cmd); - install_element (BGP_NODE, &no_bgp_distance2_cmd); install_element (BGP_NODE, &bgp_distance_source_cmd); install_element (BGP_NODE, &no_bgp_distance_source_cmd); install_element (BGP_NODE, &bgp_distance_source_access_list_cmd); install_element (BGP_NODE, &no_bgp_distance_source_access_list_cmd); install_element (BGP_NODE, &bgp_damp_set_cmd); - install_element (BGP_NODE, &bgp_damp_set2_cmd); - install_element (BGP_NODE, &bgp_damp_set3_cmd); install_element (BGP_NODE, &bgp_damp_unset_cmd); - install_element (BGP_NODE, &bgp_damp_unset2_cmd); - install_element (BGP_NODE, &bgp_damp_unset3_cmd); install_element (BGP_IPV4_NODE, &bgp_damp_set_cmd); - install_element (BGP_IPV4_NODE, &bgp_damp_set2_cmd); - install_element (BGP_IPV4_NODE, &bgp_damp_set3_cmd); install_element (BGP_IPV4_NODE, &bgp_damp_unset_cmd); - install_element (BGP_IPV4_NODE, &bgp_damp_unset2_cmd); - install_element (BGP_IPV4_NODE, &bgp_damp_unset3_cmd); /* IPv4 Multicast Mode */ install_element (BGP_IPV4M_NODE, &bgp_damp_set_cmd); - install_element (BGP_IPV4M_NODE, &bgp_damp_set2_cmd); - install_element (BGP_IPV4M_NODE, &bgp_damp_set3_cmd); install_element (BGP_IPV4M_NODE, &bgp_damp_unset_cmd); - install_element (BGP_IPV4M_NODE, &bgp_damp_unset2_cmd); } void diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index 286975f4a..5b170f88f 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -3005,7 +3005,7 @@ DEFUN (match_peer, } DEFUN (match_peer_local, - match_peer_local_cmd, + match_peer_local_cmd, "match peer local", MATCH_STR "Match peer address\n" @@ -3015,6 +3015,22 @@ DEFUN (match_peer_local, RMAP_EVENT_MATCH_DELETED); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match peer local", + * NO_STR + * MATCH_STR + * "Match peer address\n" + * "Static or Redistributed routes\n" + * + * "no match peer (A.B.C.D|X:X::X:X)", + * NO_STR + * MATCH_STR + * "Match peer address\n" + * "IP address of peer\n" + * "IPv6 address of peer\n" + * + */ DEFUN (no_match_peer, no_match_peer_cmd, "no match peer", @@ -3026,24 +3042,9 @@ DEFUN (no_match_peer, RMAP_EVENT_MATCH_DELETED); } -ALIAS (no_match_peer, - no_match_peer_val_cmd, - "no match peer (A.B.C.D|X:X::X:X)", - NO_STR - MATCH_STR - "Match peer address\n" - "IP address of peer\n" - "IPv6 address of peer\n") -ALIAS (no_match_peer, - no_match_peer_local_cmd, - "no match peer local", - NO_STR - MATCH_STR - "Match peer address\n" - "Static or Redistributed routes\n") -DEFUN (match_ip_address, +DEFUN (match_ip_address, match_ip_address_cmd, "match ip address (<1-199>|<1300-2699>|WORD)", MATCH_STR @@ -3057,7 +3058,19 @@ DEFUN (match_ip_address, RMAP_EVENT_FILTER_ADDED); } -DEFUN (no_match_ip_address, +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match ip address (<1-199>|<1300-2699>|WORD)", + * NO_STR + * MATCH_STR + * IP_STR + * "Match address of route\n" + * "IP access-list number\n" + * "IP access-list number (expanded range)\n" + * "IP Access-list name\n" + * + */ +DEFUN (no_match_ip_address, no_match_ip_address_cmd, "no match ip address", NO_STR @@ -3069,18 +3082,8 @@ DEFUN (no_match_ip_address, RMAP_EVENT_FILTER_DELETED); } -ALIAS (no_match_ip_address, - no_match_ip_address_val_cmd, - "no match ip address (<1-199>|<1300-2699>|WORD)", - NO_STR - MATCH_STR - IP_STR - "Match address of route\n" - "IP access-list number\n" - "IP access-list number (expanded range)\n" - "IP Access-list name\n") -DEFUN (match_ip_next_hop, +DEFUN (match_ip_next_hop, match_ip_next_hop_cmd, "match ip next-hop (<1-199>|<1300-2699>|WORD)", MATCH_STR @@ -3094,6 +3097,18 @@ DEFUN (match_ip_next_hop, RMAP_EVENT_FILTER_ADDED); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match ip next-hop (<1-199>|<1300-2699>|WORD)", + * NO_STR + * MATCH_STR + * IP_STR + * "Match next-hop address of route\n" + * "IP access-list number\n" + * "IP access-list number (expanded range)\n" + * "IP Access-list name\n" + * + */ DEFUN (no_match_ip_next_hop, no_match_ip_next_hop_cmd, "no match ip next-hop", @@ -3106,16 +3121,6 @@ DEFUN (no_match_ip_next_hop, RMAP_EVENT_FILTER_DELETED); } -ALIAS (no_match_ip_next_hop, - no_match_ip_next_hop_val_cmd, - "no match ip next-hop (<1-199>|<1300-2699>|WORD)", - NO_STR - MATCH_STR - IP_STR - "Match next-hop address of route\n" - "IP access-list number\n" - "IP access-list number (expanded range)\n" - "IP Access-list name\n") /* match probability { */ @@ -3130,6 +3135,15 @@ DEFUN (match_probability, RMAP_EVENT_MATCH_ADDED); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match probability <1-99>", + * NO_STR + * MATCH_STR + * "Match portion of routes defined by percentage value\n" + * "Percentage of routes\n" + * + */ DEFUN (no_match_probability, no_match_probability_cmd, "no match probability", @@ -3141,17 +3155,10 @@ DEFUN (no_match_probability, RMAP_EVENT_MATCH_DELETED); } -ALIAS (no_match_probability, - no_match_probability_val_cmd, - "no match probability <1-99>", - NO_STR - MATCH_STR - "Match portion of routes defined by percentage value\n" - "Percentage of routes\n") /* } */ -DEFUN (match_ip_route_source, +DEFUN (match_ip_route_source, match_ip_route_source_cmd, "match ip route-source (<1-199>|<1300-2699>|WORD)", MATCH_STR @@ -3165,6 +3172,18 @@ DEFUN (match_ip_route_source, RMAP_EVENT_FILTER_ADDED); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match ip route-source (<1-199>|<1300-2699>|WORD)", + * NO_STR + * MATCH_STR + * IP_STR + * "Match advertising source address of route\n" + * "IP access-list number\n" + * "IP access-list number (expanded range)\n" + * "IP standard access-list name\n" + * + */ DEFUN (no_match_ip_route_source, no_match_ip_route_source_cmd, "no match ip route-source", @@ -3177,18 +3196,8 @@ DEFUN (no_match_ip_route_source, argv[4]->arg, RMAP_EVENT_FILTER_DELETED); } -ALIAS (no_match_ip_route_source, - no_match_ip_route_source_val_cmd, - "no match ip route-source (<1-199>|<1300-2699>|WORD)", - NO_STR - MATCH_STR - IP_STR - "Match advertising source address of route\n" - "IP access-list number\n" - "IP access-list number (expanded range)\n" - "IP standard access-list name\n") -DEFUN (match_ip_address_prefix_list, +DEFUN (match_ip_address_prefix_list, match_ip_address_prefix_list_cmd, "match ip address prefix-list WORD", MATCH_STR @@ -3201,6 +3210,17 @@ DEFUN (match_ip_address_prefix_list, argv[4]->arg, RMAP_EVENT_PLIST_ADDED); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match ip address prefix-list WORD", + * NO_STR + * MATCH_STR + * IP_STR + * "Match address of route\n" + * "Match entries of prefix-lists\n" + * "IP prefix-list name\n" + * + */ DEFUN (no_match_ip_address_prefix_list, no_match_ip_address_prefix_list_cmd, "no match ip address prefix-list", @@ -3214,17 +3234,8 @@ DEFUN (no_match_ip_address_prefix_list, argv[5]->arg, RMAP_EVENT_PLIST_DELETED); } -ALIAS (no_match_ip_address_prefix_list, - no_match_ip_address_prefix_list_val_cmd, - "no match ip address prefix-list WORD", - NO_STR - MATCH_STR - IP_STR - "Match address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") -DEFUN (match_ip_next_hop_prefix_list, +DEFUN (match_ip_next_hop_prefix_list, match_ip_next_hop_prefix_list_cmd, "match ip next-hop prefix-list WORD", MATCH_STR @@ -3237,6 +3248,17 @@ DEFUN (match_ip_next_hop_prefix_list, argv[4]->arg, RMAP_EVENT_PLIST_ADDED); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match ip next-hop prefix-list WORD", + * NO_STR + * MATCH_STR + * IP_STR + * "Match next-hop address of route\n" + * "Match entries of prefix-lists\n" + * "IP prefix-list name\n" + * + */ DEFUN (no_match_ip_next_hop_prefix_list, no_match_ip_next_hop_prefix_list_cmd, "no match ip next-hop prefix-list", @@ -3250,17 +3272,8 @@ DEFUN (no_match_ip_next_hop_prefix_list, argv[5]->arg, RMAP_EVENT_PLIST_DELETED); } -ALIAS (no_match_ip_next_hop_prefix_list, - no_match_ip_next_hop_prefix_list_val_cmd, - "no match ip next-hop prefix-list WORD", - NO_STR - MATCH_STR - IP_STR - "Match next-hop address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") -DEFUN (match_ip_route_source_prefix_list, +DEFUN (match_ip_route_source_prefix_list, match_ip_route_source_prefix_list_cmd, "match ip route-source prefix-list WORD", MATCH_STR @@ -3273,6 +3286,17 @@ DEFUN (match_ip_route_source_prefix_list, argv[4]->arg, RMAP_EVENT_PLIST_ADDED); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match ip route-source prefix-list WORD", + * NO_STR + * MATCH_STR + * IP_STR + * "Match advertising source address of route\n" + * "Match entries of prefix-lists\n" + * "IP prefix-list name\n" + * + */ DEFUN (no_match_ip_route_source_prefix_list, no_match_ip_route_source_prefix_list_cmd, "no match ip route-source prefix-list", @@ -3286,17 +3310,8 @@ DEFUN (no_match_ip_route_source_prefix_list, argv[5]->arg, RMAP_EVENT_PLIST_DELETED); } -ALIAS (no_match_ip_route_source_prefix_list, - no_match_ip_route_source_prefix_list_val_cmd, - "no match ip route-source prefix-list WORD", - NO_STR - MATCH_STR - IP_STR - "Match advertising source address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") -DEFUN (match_metric, +DEFUN (match_metric, match_metric_cmd, "match metric <0-4294967295>", MATCH_STR @@ -3307,6 +3322,15 @@ DEFUN (match_metric, RMAP_EVENT_MATCH_ADDED); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match metric <0-4294967295>", + * NO_STR + * MATCH_STR + * "Match metric of route\n" + * "Metric value\n" + * + */ DEFUN (no_match_metric, no_match_metric_cmd, "no match metric", @@ -3319,13 +3343,6 @@ DEFUN (no_match_metric, RMAP_EVENT_MATCH_DELETED); } -ALIAS (no_match_metric, - no_match_metric_val_cmd, - "no match metric <0-4294967295>", - NO_STR - MATCH_STR - "Match metric of route\n" - "Metric value\n") DEFUN (match_local_pref, match_local_pref_cmd, @@ -3338,6 +3355,15 @@ DEFUN (match_local_pref, RMAP_EVENT_MATCH_ADDED); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match local-preference <0-4294967295>", + * NO_STR + * MATCH_STR + * "Match local preference of route\n" + * "Local preference value\n" + * + */ DEFUN (no_match_local_pref, no_match_local_pref_cmd, "no match local-preference", @@ -3350,15 +3376,8 @@ DEFUN (no_match_local_pref, RMAP_EVENT_MATCH_DELETED); } -ALIAS (no_match_local_pref, - no_match_local_pref_val_cmd, - "no match local-preference <0-4294967295>", - NO_STR - MATCH_STR - "Match local preference of route\n" - "Local preference value\n") -DEFUN (match_community, +DEFUN (match_community, match_community_cmd, "match community (<1-99>|<100-500>|WORD)", MATCH_STR @@ -3371,7 +3390,7 @@ DEFUN (match_community, RMAP_EVENT_CLIST_ADDED); } -DEFUN (match_community_exact, +DEFUN (match_community_exact, match_community_exact_cmd, "match community (<1-99>|<100-500>|WORD) exact-match", MATCH_STR @@ -3397,6 +3416,26 @@ DEFUN (match_community_exact, return ret; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match community (<1-99>|<100-500>|WORD)", + * NO_STR + * MATCH_STR + * "Match BGP community list\n" + * "Community-list number (standard)\n" + * "Community-list number (expanded)\n" + * "Community-list name\n" + * + * "no match community (<1-99>|<100-500>|WORD) exact-match", + * NO_STR + * MATCH_STR + * "Match BGP community list\n" + * "Community-list number (standard)\n" + * "Community-list number (expanded)\n" + * "Community-list name\n" + * "Do exact matching of communities\n" + * + */ DEFUN (no_match_community, no_match_community_cmd, "no match community", @@ -3408,28 +3447,9 @@ DEFUN (no_match_community, RMAP_EVENT_CLIST_DELETED); } -ALIAS (no_match_community, - no_match_community_val_cmd, - "no match community (<1-99>|<100-500>|WORD)", - NO_STR - MATCH_STR - "Match BGP community list\n" - "Community-list number (standard)\n" - "Community-list number (expanded)\n" - "Community-list name\n") -ALIAS (no_match_community, - no_match_community_exact_cmd, - "no match community (<1-99>|<100-500>|WORD) exact-match", - NO_STR - MATCH_STR - "Match BGP community list\n" - "Community-list number (standard)\n" - "Community-list number (expanded)\n" - "Community-list name\n" - "Do exact matching of communities\n") -DEFUN (match_ecommunity, +DEFUN (match_ecommunity, match_ecommunity_cmd, "match extcommunity (<1-99>|<100-500>|WORD)", MATCH_STR @@ -3442,6 +3462,17 @@ DEFUN (match_ecommunity, RMAP_EVENT_ECLIST_ADDED); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match extcommunity (<1-99>|<100-500>|WORD)", + * NO_STR + * MATCH_STR + * "Match BGP/VPN extended community list\n" + * "Extended community-list number (standard)\n" + * "Extended community-list number (expanded)\n" + * "Extended community-list name\n" + * + */ DEFUN (no_match_ecommunity, no_match_ecommunity_cmd, "no match extcommunity", @@ -3453,15 +3484,6 @@ DEFUN (no_match_ecommunity, RMAP_EVENT_ECLIST_DELETED); } -ALIAS (no_match_ecommunity, - no_match_ecommunity_val_cmd, - "no match extcommunity (<1-99>|<100-500>|WORD)", - NO_STR - MATCH_STR - "Match BGP/VPN extended community list\n" - "Extended community-list number (standard)\n" - "Extended community-list number (expanded)\n" - "Extended community-list name\n") DEFUN (match_aspath, match_aspath_cmd, @@ -3474,6 +3496,15 @@ DEFUN (match_aspath, RMAP_EVENT_ASLIST_ADDED); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match as-path WORD", + * NO_STR + * MATCH_STR + * "Match BGP AS path list\n" + * "AS path access-list name\n" + * + */ DEFUN (no_match_aspath, no_match_aspath_cmd, "no match as-path", @@ -3485,13 +3516,6 @@ DEFUN (no_match_aspath, RMAP_EVENT_ASLIST_DELETED); } -ALIAS (no_match_aspath, - no_match_aspath_val_cmd, - "no match as-path WORD", - NO_STR - MATCH_STR - "Match BGP AS path list\n" - "AS path access-list name\n") DEFUN (match_origin, match_origin_cmd, @@ -3515,6 +3539,17 @@ DEFUN (match_origin, return CMD_WARNING; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match origin (egp|igp|incomplete)", + * NO_STR + * MATCH_STR + * "BGP origin code\n" + * "remote EGP\n" + * "local IGP\n" + * "unknown heritage\n" + * + */ DEFUN (no_match_origin, no_match_origin_cmd, "no match origin", @@ -3526,15 +3561,6 @@ DEFUN (no_match_origin, RMAP_EVENT_MATCH_DELETED); } -ALIAS (no_match_origin, - no_match_origin_val_cmd, - "no match origin (egp|igp|incomplete)", - NO_STR - MATCH_STR - "BGP origin code\n" - "remote EGP\n" - "local IGP\n" - "unknown heritage\n") DEFUN (match_interface, match_interface_cmd, @@ -3547,6 +3573,15 @@ DEFUN (match_interface, RMAP_EVENT_MATCH_ADDED); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match interface WORD", + * NO_STR + * MATCH_STR + * "Match first hop interface of route\n" + * "Interface name\n" + * + */ DEFUN (no_match_interface, no_match_interface_cmd, "no match interface", @@ -3558,13 +3593,6 @@ DEFUN (no_match_interface, RMAP_EVENT_MATCH_DELETED); } -ALIAS (no_match_interface, - no_match_interface_val_cmd, - "no match interface WORD", - NO_STR - MATCH_STR - "Match first hop interface of route\n" - "Interface name\n") DEFUN (match_tag, match_tag_cmd, @@ -3577,6 +3605,15 @@ DEFUN (match_tag, RMAP_EVENT_MATCH_ADDED); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match tag <1-65535>", + * NO_STR + * MATCH_STR + * "Match tag of route\n" + * "Tag value\n" + * + */ DEFUN (no_match_tag, no_match_tag_cmd, "no match tag", @@ -3588,13 +3625,6 @@ DEFUN (no_match_tag, RMAP_EVENT_MATCH_DELETED); } -ALIAS (no_match_tag, - no_match_tag_val_cmd, - "no match tag <1-65535>", - NO_STR - MATCH_STR - "Match tag of route\n" - "Tag value\n") DEFUN (set_ip_nexthop, @@ -3647,6 +3677,23 @@ DEFUN (set_ip_nexthop_unchanged, return bgp_route_set_add (vty, vty->index, "ip next-hop", "unchanged"); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no set ip next-hop peer-address", + * NO_STR + * SET_STR + * IP_STR + * "Next hop address\n" + * "Use peer address (for BGP only)\n" + * + * "no set ip next-hop A.B.C.D", + * NO_STR + * SET_STR + * IP_STR + * "Next hop address\n" + * "IP address of next hop\n" + * + */ DEFUN (no_set_ip_nexthop, no_set_ip_nexthop_cmd, "no set ip next-hop", @@ -3657,24 +3704,23 @@ DEFUN (no_set_ip_nexthop, return bgp_route_set_delete (vty, vty->index, "ip next-hop", argv[4]->arg); } -ALIAS (no_set_ip_nexthop, - no_set_ip_nexthop_val_cmd, - "no set ip next-hop A.B.C.D", - NO_STR - SET_STR - IP_STR - "Next hop address\n" - "IP address of next hop\n") -ALIAS (no_set_ip_nexthop, - no_set_ip_nexthop_peer_cmd, - "no set ip next-hop peer-address", - NO_STR - SET_STR - IP_STR - "Next hop address\n" - "Use peer address (for BGP only)\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "set metric (rtt|+rtt|-rtt)", + * SET_STR + * "Metric value for destination routing protocol\n" + * "Assign round trip time\n" + * "Add round trip time\n" + * "Subtract round trip time\n" + * + * "set metric <+/-metric>", + * SET_STR + * "Metric value for destination routing protocol\n" + * "Add or subtract metric\n" + * + */ DEFUN (set_metric, set_metric_cmd, "set metric <0-4294967295>", @@ -3685,22 +3731,17 @@ DEFUN (set_metric, return bgp_route_set_add (vty, vty->index, "metric", argv[2]->arg); } -ALIAS (set_metric, - set_metric_addsub_cmd, - "set metric <+/-metric>", - SET_STR - "Metric value for destination routing protocol\n" - "Add or subtract metric\n") -ALIAS (set_metric, - set_metric_rtt_cmd, - "set metric (rtt|+rtt|-rtt)", - SET_STR - "Metric value for destination routing protocol\n" - "Assign round trip time\n" - "Add round trip time\n" - "Subtract round trip time\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no set metric <0-4294967295>", + * NO_STR + * SET_STR + * "Metric value for destination routing protocol\n" + * "Metric value\n" + * + */ DEFUN (no_set_metric, no_set_metric_cmd, "no set metric", @@ -3711,13 +3752,6 @@ DEFUN (no_set_metric, return bgp_route_set_delete (vty, vty->index, "metric", argv[3]->arg); } -ALIAS (no_set_metric, - no_set_metric_val_cmd, - "no set metric <0-4294967295>", - NO_STR - SET_STR - "Metric value for destination routing protocol\n" - "Metric value\n") DEFUN (set_local_pref, set_local_pref_cmd, @@ -3729,6 +3763,15 @@ DEFUN (set_local_pref, return bgp_route_set_add (vty, vty->index, "local-preference", argv[2]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no set local-preference <0-4294967295>", + * NO_STR + * SET_STR + * "BGP local preference path attribute\n" + * "Preference value\n" + * + */ DEFUN (no_set_local_pref, no_set_local_pref_cmd, "no set local-preference", @@ -3739,13 +3782,6 @@ DEFUN (no_set_local_pref, return bgp_route_set_delete (vty, vty->index, "local-preference", argv[3]->arg); } -ALIAS (no_set_local_pref, - no_set_local_pref_val_cmd, - "no set local-preference <0-4294967295>", - NO_STR - SET_STR - "BGP local preference path attribute\n" - "Preference value\n") DEFUN (set_weight, set_weight_cmd, @@ -3757,6 +3793,15 @@ DEFUN (set_weight, return bgp_route_set_add (vty, vty->index, "weight", argv[2]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no set weight <0-4294967295>", + * NO_STR + * SET_STR + * "BGP weight for routing table\n" + * "Weight value\n" + * + */ DEFUN (no_set_weight, no_set_weight_cmd, "no set weight", @@ -3767,14 +3812,17 @@ DEFUN (no_set_weight, return bgp_route_set_delete (vty, vty->index, "weight", argv[3]->arg); } -ALIAS (no_set_weight, - no_set_weight_val_cmd, - "no set weight <0-4294967295>", - NO_STR - SET_STR - "BGP weight for routing table\n" - "Weight value\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "set as-path prepend (last-as) <1-10>", + * SET_STR + * "Transform BGP AS_PATH attribute\n" + * "Prepend to the as-path\n" + * "Use the peer's AS-number\n" + * "Number of times to insert" + * + */ DEFUN (set_aspath_prepend, set_aspath_prepend_cmd, "set as-path prepend ." CMD_AS_RANGE, @@ -3793,15 +3841,17 @@ DEFUN (set_aspath_prepend, return ret; } -ALIAS (set_aspath_prepend, - set_aspath_prepend_lastas_cmd, - "set as-path prepend (last-as) <1-10>", - SET_STR - "Transform BGP AS_PATH attribute\n" - "Prepend to the as-path\n" - "Use the peer's AS-number\n" - "Number of times to insert") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no set as-path prepend ." CMD_AS_RANGE, + * NO_STR + * SET_STR + * "Transform BGP AS_PATH attribute\n" + * "Prepend to the as-path\n" + * "AS number\n" + * + */ DEFUN (no_set_aspath_prepend, no_set_aspath_prepend_cmd, "no set as-path prepend", @@ -3819,14 +3869,6 @@ DEFUN (no_set_aspath_prepend, return ret; } -ALIAS (no_set_aspath_prepend, - no_set_aspath_prepend_val_cmd, - "no set as-path prepend ." CMD_AS_RANGE, - NO_STR - SET_STR - "Transform BGP AS_PATH attribute\n" - "Prepend to the as-path\n" - "AS number\n") DEFUN (set_aspath_exclude, set_aspath_exclude_cmd, @@ -3845,6 +3887,16 @@ DEFUN (set_aspath_exclude, return ret; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no set as-path exclude ." CMD_AS_RANGE, + * NO_STR + * SET_STR + * "Transform BGP AS_PATH attribute\n" + * "Exclude from the as-path\n" + * "AS number\n" + * + */ DEFUN (no_set_aspath_exclude, no_set_aspath_exclude_cmd, "no set as-path exclude", @@ -3862,14 +3914,6 @@ DEFUN (no_set_aspath_exclude, return ret; } -ALIAS (no_set_aspath_exclude, - no_set_aspath_exclude_val_cmd, - "no set as-path exclude ." CMD_AS_RANGE, - NO_STR - SET_STR - "Transform BGP AS_PATH attribute\n" - "Exclude from the as-path\n" - "AS number\n") DEFUN (set_community, set_community_cmd, @@ -3974,6 +4018,21 @@ DEFUN (set_community_none, return bgp_route_set_add (vty, vty->index, "community", "none"); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no set community none", + * NO_STR + * SET_STR + * "BGP community attribute\n" + * "No community attribute\n" + * + * "no set community .AA:NN", + * NO_STR + * SET_STR + * "BGP community attribute\n" + * COMMUNITY_VAL_STR + * + */ DEFUN (no_set_community, no_set_community_cmd, "no set community", @@ -3984,21 +4043,7 @@ DEFUN (no_set_community, return bgp_route_set_delete (vty, vty->index, "community", NULL); } -ALIAS (no_set_community, - no_set_community_val_cmd, - "no set community .AA:NN", - NO_STR - SET_STR - "BGP community attribute\n" - COMMUNITY_VAL_STR) -ALIAS (no_set_community, - no_set_community_none_cmd, - "no set community none", - NO_STR - SET_STR - "BGP community attribute\n" - "No community attribute\n") DEFUN (set_community_delete, set_community_delete_cmd, @@ -4022,6 +4067,18 @@ DEFUN (set_community_delete, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no set comm-list (<1-99>|<100-500>|WORD) delete", + * NO_STR + * SET_STR + * "set BGP community list (for deletion)\n" + * "Community-list number (standard)\n" + * "Community-list number (expanded)\n" + * "Community-list name\n" + * "Delete matching communities\n" + * + */ DEFUN (no_set_community_delete, no_set_community_delete_cmd, "no set comm-list", @@ -4032,16 +4089,6 @@ DEFUN (no_set_community_delete, return bgp_route_set_delete (vty, vty->index, "comm-list", NULL); } -ALIAS (no_set_community_delete, - no_set_community_delete_val_cmd, - "no set comm-list (<1-99>|<100-500>|WORD) delete", - NO_STR - SET_STR - "set BGP community list (for deletion)\n" - "Community-list number (standard)\n" - "Community-list number (expanded)\n" - "Community-list name\n" - "Delete matching communities\n") DEFUN (set_ecommunity_rt, set_ecommunity_rt_cmd, @@ -4061,6 +4108,16 @@ DEFUN (set_ecommunity_rt, return ret; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no set extcommunity rt .ASN:nn_or_IP-address:nn", + * NO_STR + * SET_STR + * "BGP extended community attribute\n" + * "Route Target extended community\n" + * "VPN extended community\n" + * + */ DEFUN (no_set_ecommunity_rt, no_set_ecommunity_rt_cmd, "no set extcommunity rt", @@ -4072,14 +4129,6 @@ DEFUN (no_set_ecommunity_rt, return bgp_route_set_delete (vty, vty->index, "extcommunity rt", NULL); } -ALIAS (no_set_ecommunity_rt, - no_set_ecommunity_rt_val_cmd, - "no set extcommunity rt .ASN:nn_or_IP-address:nn", - NO_STR - SET_STR - "BGP extended community attribute\n" - "Route Target extended community\n" - "VPN extended community\n") DEFUN (set_ecommunity_soo, set_ecommunity_soo_cmd, @@ -4098,6 +4147,16 @@ DEFUN (set_ecommunity_soo, return ret; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no set extcommunity soo .ASN:nn_or_IP-address:nn", + * NO_STR + * SET_STR + * "BGP extended community attribute\n" + * "Site-of-Origin extended community\n" + * "VPN extended community\n" + * + */ DEFUN (no_set_ecommunity_soo, no_set_ecommunity_soo_cmd, "no set extcommunity soo", @@ -4109,14 +4168,6 @@ DEFUN (no_set_ecommunity_soo, return bgp_route_set_delete (vty, vty->index, "extcommunity soo", NULL); } -ALIAS (no_set_ecommunity_soo, - no_set_ecommunity_soo_val_cmd, - "no set extcommunity soo .ASN:nn_or_IP-address:nn", - NO_STR - SET_STR - "BGP extended community attribute\n" - "Site-of-Origin extended community\n" - "VPN extended community\n") DEFUN (set_origin, set_origin_cmd, @@ -4137,6 +4188,17 @@ DEFUN (set_origin, return CMD_WARNING; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no set origin (egp|igp|incomplete)", + * NO_STR + * SET_STR + * "BGP origin code\n" + * "remote EGP\n" + * "local IGP\n" + * "unknown heritage\n" + * + */ DEFUN (no_set_origin, no_set_origin_cmd, "no set origin", @@ -4147,15 +4209,6 @@ DEFUN (no_set_origin, return bgp_route_set_delete (vty, vty->index, "origin", NULL); } -ALIAS (no_set_origin, - no_set_origin_val_cmd, - "no set origin (egp|igp|incomplete)", - NO_STR - SET_STR - "BGP origin code\n" - "remote EGP\n" - "local IGP\n" - "unknown heritage\n") DEFUN (set_atomic_aggregate, set_atomic_aggregate_cmd, @@ -4208,6 +4261,17 @@ DEFUN (set_aggregator_as, return ret; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no set aggregator as " CMD_AS_RANGE " A.B.C.D", + * NO_STR + * SET_STR + * "BGP aggregator attribute\n" + * "AS number of aggregator\n" + * "AS number\n" + * "IP address of aggregator\n" + * + */ DEFUN (no_set_aggregator_as, no_set_aggregator_as_cmd, "no set aggregator as", @@ -4242,15 +4306,6 @@ DEFUN (no_set_aggregator_as, return ret; } -ALIAS (no_set_aggregator_as, - no_set_aggregator_as_val_cmd, - "no set aggregator as " CMD_AS_RANGE " A.B.C.D", - NO_STR - SET_STR - "BGP aggregator attribute\n" - "AS number of aggregator\n" - "AS number\n" - "IP address of aggregator\n") DEFUN (set_tag, set_tag_cmd, @@ -4262,6 +4317,15 @@ DEFUN (set_tag, return bgp_route_set_add (vty, vty->index, "tag", argv[2]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no set tag <1-65535>", + * NO_STR + * SET_STR + * "Tag value for routing protocol\n" + * "Tag value\n" + * + */ DEFUN (no_set_tag, no_set_tag_cmd, "no set tag", @@ -4272,17 +4336,10 @@ DEFUN (no_set_tag, return bgp_route_set_delete (vty, vty->index, "tag", argv[3]->arg); } -ALIAS (no_set_tag, - no_set_tag_val_cmd, - "no set tag <1-65535>", - NO_STR - SET_STR - "Tag value for routing protocol\n" - "Tag value\n") #ifdef HAVE_IPV6 -DEFUN (match_ipv6_address, +DEFUN (match_ipv6_address, match_ipv6_address_cmd, "match ipv6 address WORD", MATCH_STR @@ -4294,7 +4351,7 @@ DEFUN (match_ipv6_address, RMAP_EVENT_FILTER_ADDED); } -DEFUN (no_match_ipv6_address, +DEFUN (no_match_ipv6_address, no_match_ipv6_address_cmd, "no match ipv6 address WORD", NO_STR @@ -4307,7 +4364,7 @@ DEFUN (no_match_ipv6_address, RMAP_EVENT_FILTER_DELETED); } -DEFUN (match_ipv6_next_hop, +DEFUN (match_ipv6_next_hop, match_ipv6_next_hop_cmd, "match ipv6 next-hop X:X::X:X", MATCH_STR @@ -4332,7 +4389,7 @@ DEFUN (no_match_ipv6_next_hop, RMAP_EVENT_MATCH_DELETED); } -DEFUN (match_ipv6_address_prefix_list, +DEFUN (match_ipv6_address_prefix_list, match_ipv6_address_prefix_list_cmd, "match ipv6 address prefix-list WORD", MATCH_STR @@ -4435,6 +4492,17 @@ DEFUN (set_ipv6_nexthop_global, return bgp_route_set_add (vty, vty->index, "ipv6 next-hop global", argv[4]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no set ipv6 next-hop global X:X::X:X", + * NO_STR + * SET_STR + * IPV6_STR + * "IPv6 next-hop address\n" + * "IPv6 global address\n" + * "IPv6 address of next hop\n" + * + */ DEFUN (no_set_ipv6_nexthop_global, no_set_ipv6_nexthop_global_cmd, "no set ipv6 next-hop global", @@ -4447,15 +4515,6 @@ DEFUN (no_set_ipv6_nexthop_global, return bgp_route_set_delete (vty, vty->index, "ipv6 next-hop global", argv[5]->arg); } -ALIAS (no_set_ipv6_nexthop_global, - no_set_ipv6_nexthop_global_val_cmd, - "no set ipv6 next-hop global X:X::X:X", - NO_STR - SET_STR - IPV6_STR - "IPv6 next-hop address\n" - "IPv6 global address\n" - "IPv6 address of next hop\n") DEFUN (set_ipv6_nexthop_local, set_ipv6_nexthop_local_cmd, @@ -4484,6 +4543,17 @@ DEFUN (set_ipv6_nexthop_local, return bgp_route_set_add (vty, vty->index, "ipv6 next-hop local", argv[4]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no set ipv6 next-hop local X:X::X:X", + * NO_STR + * SET_STR + * IPV6_STR + * "IPv6 next-hop address\n" + * "IPv6 local address\n" + * "IPv6 address of next hop\n" + * + */ DEFUN (no_set_ipv6_nexthop_local, no_set_ipv6_nexthop_local_cmd, "no set ipv6 next-hop local", @@ -4496,15 +4566,6 @@ DEFUN (no_set_ipv6_nexthop_local, return bgp_route_set_delete (vty, vty->index, "ipv6 next-hop local", argv[5]->arg); } -ALIAS (no_set_ipv6_nexthop_local, - no_set_ipv6_nexthop_local_val_cmd, - "no set ipv6 next-hop local X:X::X:X", - NO_STR - SET_STR - IPV6_STR - "IPv6 next-hop address\n" - "IPv6 local address\n" - "IPv6 address of next hop\n") #endif /* HAVE_IPV6 */ DEFUN (set_vpnv4_nexthop, @@ -4518,6 +4579,16 @@ DEFUN (set_vpnv4_nexthop, return bgp_route_set_add (vty, vty->index, "vpnv4 next-hop", argv[3]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no set vpnv4 next-hop A.B.C.D", + * NO_STR + * SET_STR + * "VPNv4 information\n" + * "VPNv4 next-hop address\n" + * "IP address of next hop\n" + * + */ DEFUN (no_set_vpnv4_nexthop, no_set_vpnv4_nexthop_cmd, "no set vpnv4 next-hop", @@ -4529,14 +4600,6 @@ DEFUN (no_set_vpnv4_nexthop, return bgp_route_set_delete (vty, vty->index, "vpnv4 next-hop", argv[4]->arg); } -ALIAS (no_set_vpnv4_nexthop, - no_set_vpnv4_nexthop_val_cmd, - "no set vpnv4 next-hop A.B.C.D", - NO_STR - SET_STR - "VPNv4 information\n" - "VPNv4 next-hop address\n" - "IP address of next hop\n") DEFUN (set_originator_id, set_originator_id_cmd, @@ -4548,6 +4611,15 @@ DEFUN (set_originator_id, return bgp_route_set_add (vty, vty->index, "originator-id", argv[2]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no set originator-id A.B.C.D", + * NO_STR + * SET_STR + * "BGP originator ID attribute\n" + * "IP address of originator\n" + * + */ DEFUN (no_set_originator_id, no_set_originator_id_cmd, "no set originator-id", @@ -4558,13 +4630,6 @@ DEFUN (no_set_originator_id, return bgp_route_set_delete (vty, vty->index, "originator-id", argv[3]->arg); } -ALIAS (no_set_originator_id, - no_set_originator_id_val_cmd, - "no set originator-id A.B.C.D", - NO_STR - SET_STR - "BGP originator ID attribute\n" - "IP address of originator\n") /* Initialization of route map. */ void @@ -4614,112 +4679,74 @@ bgp_route_map_init (void) install_element (RMAP_NODE, &match_peer_cmd); install_element (RMAP_NODE, &match_peer_local_cmd); install_element (RMAP_NODE, &no_match_peer_cmd); - install_element (RMAP_NODE, &no_match_peer_val_cmd); - install_element (RMAP_NODE, &no_match_peer_local_cmd); install_element (RMAP_NODE, &match_ip_address_cmd); install_element (RMAP_NODE, &no_match_ip_address_cmd); - install_element (RMAP_NODE, &no_match_ip_address_val_cmd); install_element (RMAP_NODE, &match_ip_next_hop_cmd); install_element (RMAP_NODE, &no_match_ip_next_hop_cmd); - install_element (RMAP_NODE, &no_match_ip_next_hop_val_cmd); install_element (RMAP_NODE, &match_ip_route_source_cmd); install_element (RMAP_NODE, &no_match_ip_route_source_cmd); - install_element (RMAP_NODE, &no_match_ip_route_source_val_cmd); install_element (RMAP_NODE, &match_ip_address_prefix_list_cmd); install_element (RMAP_NODE, &no_match_ip_address_prefix_list_cmd); - install_element (RMAP_NODE, &no_match_ip_address_prefix_list_val_cmd); install_element (RMAP_NODE, &match_ip_next_hop_prefix_list_cmd); install_element (RMAP_NODE, &no_match_ip_next_hop_prefix_list_cmd); - install_element (RMAP_NODE, &no_match_ip_next_hop_prefix_list_val_cmd); install_element (RMAP_NODE, &match_ip_route_source_prefix_list_cmd); install_element (RMAP_NODE, &no_match_ip_route_source_prefix_list_cmd); - install_element (RMAP_NODE, &no_match_ip_route_source_prefix_list_val_cmd); install_element (RMAP_NODE, &match_aspath_cmd); install_element (RMAP_NODE, &no_match_aspath_cmd); - install_element (RMAP_NODE, &no_match_aspath_val_cmd); install_element (RMAP_NODE, &match_metric_cmd); install_element (RMAP_NODE, &no_match_metric_cmd); - install_element (RMAP_NODE, &no_match_metric_val_cmd); install_element (RMAP_NODE, &match_local_pref_cmd); install_element (RMAP_NODE, &no_match_local_pref_cmd); - install_element (RMAP_NODE, &no_match_local_pref_val_cmd); install_element (RMAP_NODE, &match_community_cmd); install_element (RMAP_NODE, &match_community_exact_cmd); install_element (RMAP_NODE, &no_match_community_cmd); - install_element (RMAP_NODE, &no_match_community_val_cmd); - install_element (RMAP_NODE, &no_match_community_exact_cmd); install_element (RMAP_NODE, &match_ecommunity_cmd); install_element (RMAP_NODE, &no_match_ecommunity_cmd); - install_element (RMAP_NODE, &no_match_ecommunity_val_cmd); install_element (RMAP_NODE, &match_origin_cmd); install_element (RMAP_NODE, &no_match_origin_cmd); - install_element (RMAP_NODE, &no_match_origin_val_cmd); install_element (RMAP_NODE, &match_probability_cmd); install_element (RMAP_NODE, &no_match_probability_cmd); - install_element (RMAP_NODE, &no_match_probability_val_cmd); install_element (RMAP_NODE, &match_interface_cmd); install_element (RMAP_NODE, &no_match_interface_cmd); - install_element (RMAP_NODE, &no_match_interface_val_cmd); install_element (RMAP_NODE, &match_tag_cmd); install_element (RMAP_NODE, &no_match_tag_cmd); - install_element (RMAP_NODE, &no_match_tag_val_cmd); install_element (RMAP_NODE, &set_ip_nexthop_cmd); install_element (RMAP_NODE, &set_ip_nexthop_peer_cmd); install_element (RMAP_NODE, &set_ip_nexthop_unchanged_cmd); install_element (RMAP_NODE, &no_set_ip_nexthop_cmd); - install_element (RMAP_NODE, &no_set_ip_nexthop_val_cmd); - install_element (RMAP_NODE, &no_set_ip_nexthop_peer_cmd); install_element (RMAP_NODE, &set_local_pref_cmd); install_element (RMAP_NODE, &no_set_local_pref_cmd); - install_element (RMAP_NODE, &no_set_local_pref_val_cmd); install_element (RMAP_NODE, &set_weight_cmd); install_element (RMAP_NODE, &no_set_weight_cmd); - install_element (RMAP_NODE, &no_set_weight_val_cmd); install_element (RMAP_NODE, &set_metric_cmd); - install_element (RMAP_NODE, &set_metric_addsub_cmd); - install_element (RMAP_NODE, &set_metric_rtt_cmd); install_element (RMAP_NODE, &no_set_metric_cmd); - install_element (RMAP_NODE, &no_set_metric_val_cmd); install_element (RMAP_NODE, &set_aspath_prepend_cmd); - install_element (RMAP_NODE, &set_aspath_prepend_lastas_cmd); install_element (RMAP_NODE, &set_aspath_exclude_cmd); install_element (RMAP_NODE, &no_set_aspath_prepend_cmd); - install_element (RMAP_NODE, &no_set_aspath_prepend_val_cmd); install_element (RMAP_NODE, &no_set_aspath_exclude_cmd); - install_element (RMAP_NODE, &no_set_aspath_exclude_val_cmd); install_element (RMAP_NODE, &set_origin_cmd); install_element (RMAP_NODE, &no_set_origin_cmd); - install_element (RMAP_NODE, &no_set_origin_val_cmd); install_element (RMAP_NODE, &set_atomic_aggregate_cmd); install_element (RMAP_NODE, &no_set_atomic_aggregate_cmd); install_element (RMAP_NODE, &set_aggregator_as_cmd); install_element (RMAP_NODE, &no_set_aggregator_as_cmd); - install_element (RMAP_NODE, &no_set_aggregator_as_val_cmd); install_element (RMAP_NODE, &set_community_cmd); install_element (RMAP_NODE, &set_community_none_cmd); install_element (RMAP_NODE, &no_set_community_cmd); - install_element (RMAP_NODE, &no_set_community_val_cmd); - install_element (RMAP_NODE, &no_set_community_none_cmd); install_element (RMAP_NODE, &set_community_delete_cmd); install_element (RMAP_NODE, &no_set_community_delete_cmd); - install_element (RMAP_NODE, &no_set_community_delete_val_cmd); install_element (RMAP_NODE, &set_ecommunity_rt_cmd); install_element (RMAP_NODE, &no_set_ecommunity_rt_cmd); - install_element (RMAP_NODE, &no_set_ecommunity_rt_val_cmd); install_element (RMAP_NODE, &set_ecommunity_soo_cmd); install_element (RMAP_NODE, &no_set_ecommunity_soo_cmd); - install_element (RMAP_NODE, &no_set_ecommunity_soo_val_cmd); install_element (RMAP_NODE, &set_vpnv4_nexthop_cmd); install_element (RMAP_NODE, &no_set_vpnv4_nexthop_cmd); - install_element (RMAP_NODE, &no_set_vpnv4_nexthop_val_cmd); install_element (RMAP_NODE, &set_originator_id_cmd); install_element (RMAP_NODE, &no_set_originator_id_cmd); - install_element (RMAP_NODE, &no_set_originator_id_val_cmd); install_element (RMAP_NODE, &set_tag_cmd); install_element (RMAP_NODE, &no_set_tag_cmd); - install_element (RMAP_NODE, &no_set_tag_val_cmd); #ifdef HAVE_IPV6 route_map_install_match (&route_match_ipv6_address_cmd); @@ -4738,12 +4765,10 @@ bgp_route_map_init (void) install_element (RMAP_NODE, &no_match_ipv6_address_prefix_list_cmd); install_element (RMAP_NODE, &set_ipv6_nexthop_global_cmd); install_element (RMAP_NODE, &no_set_ipv6_nexthop_global_cmd); - install_element (RMAP_NODE, &no_set_ipv6_nexthop_global_val_cmd); install_element (RMAP_NODE, &set_ipv6_nexthop_prefer_global_cmd); install_element (RMAP_NODE, &no_set_ipv6_nexthop_prefer_global_cmd); install_element (RMAP_NODE, &set_ipv6_nexthop_local_cmd); install_element (RMAP_NODE, &no_set_ipv6_nexthop_local_cmd); - install_element (RMAP_NODE, &no_set_ipv6_nexthop_local_val_cmd); install_element (RMAP_NODE, &set_ipv6_nexthop_peer_cmd); install_element (RMAP_NODE, &no_set_ipv6_nexthop_peer_cmd); #endif /* HAVE_IPV6 */ diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 32506c4e2..60e8d36c9 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -622,6 +622,16 @@ DEFUN (bgp_config_type, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no bgp config-type (cisco|zebra)", + * NO_STR + * BGP_STR + * "Configuration type\n" + * "cisco\n" + * "zebra\n" + * + */ DEFUN (no_bgp_config_type, no_bgp_config_type_cmd, "no bgp config-type", @@ -633,14 +643,6 @@ DEFUN (no_bgp_config_type, return CMD_SUCCESS; } -ALIAS (no_bgp_config_type, - no_bgp_config_type_val_cmd, - "no bgp config-type (cisco|zebra)", - NO_STR - BGP_STR - "Configuration type\n" - "cisco\n" - "zebra\n") DEFUN (no_synchronization, no_synchronization_cmd, @@ -661,8 +663,22 @@ DEFUN (no_auto_summary, } /* "router bgp" commands. */ -DEFUN (router_bgp, - router_bgp_cmd, +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "router bgp", + * ROUTER_STR + * BGP_STR + * + * "router bgp " CMD_AS_RANGE " (view|vrf) WORD", + * ROUTER_STR + * BGP_STR + * AS_STR + * "BGP view\nBGP VRF\n" + * "View/VRF name\n" + * + */ +DEFUN (router_bgp, + router_bgp_cmd, "router bgp " CMD_AS_RANGE, ROUTER_STR BGP_STR @@ -734,22 +750,25 @@ DEFUN (router_bgp, return CMD_SUCCESS; } -ALIAS (router_bgp, - router_bgp_instance_cmd, - "router bgp " CMD_AS_RANGE " (view|vrf) WORD", - ROUTER_STR - BGP_STR - AS_STR - "BGP view\nBGP VRF\n" - "View/VRF name\n") -ALIAS (router_bgp, - router_bgp_noasn_cmd, - "router bgp", - ROUTER_STR - BGP_STR) /* "no router bgp" commands. */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no router bgp", + * NO_STR + * ROUTER_STR + * BGP_STR + * + * "no router bgp " CMD_AS_RANGE " (view|vrf) WORD", + * NO_STR + * ROUTER_STR + * BGP_STR + * AS_STR + * "BGP view\nBGP VRF\n" + * "View/VRF name\n" + * + */ DEFUN (no_router_bgp, no_router_bgp_cmd, "no router bgp " CMD_AS_RANGE, @@ -802,22 +821,7 @@ DEFUN (no_router_bgp, return CMD_SUCCESS; } -ALIAS (no_router_bgp, - no_router_bgp_instance_cmd, - "no router bgp " CMD_AS_RANGE " (view|vrf) WORD", - NO_STR - ROUTER_STR - BGP_STR - AS_STR - "BGP view\nBGP VRF\n" - "View/VRF name\n") -ALIAS (no_router_bgp, - no_router_bgp_noasn_cmd, - "no router bgp", - NO_STR - ROUTER_STR - BGP_STR) /* BGP router-id. */ @@ -846,6 +850,15 @@ DEFUN (bgp_router_id, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no bgp router-id A.B.C.D", + * NO_STR + * BGP_STR + * "Override configured router identifier\n" + * "Manually configured router identifier\n" + * + */ DEFUN (no_bgp_router_id, no_bgp_router_id_cmd, "no bgp router-id", @@ -881,16 +894,17 @@ DEFUN (no_bgp_router_id, return CMD_SUCCESS; } -ALIAS (no_bgp_router_id, - no_bgp_router_id_val_cmd, - "no bgp router-id A.B.C.D", - NO_STR - BGP_STR - "Override configured router identifier\n" - "Manually configured router identifier\n") /* BGP Cluster ID. */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "bgp cluster-id <1-4294967295>", + * BGP_STR + * "Configure Route-Reflector Cluster-id\n" + * "Route-Reflector Cluster-id as 32 bit quantity\n" + * + */ DEFUN (bgp_cluster_id, bgp_cluster_id_cmd, "bgp cluster-id A.B.C.D", @@ -917,13 +931,22 @@ DEFUN (bgp_cluster_id, return CMD_SUCCESS; } -ALIAS (bgp_cluster_id, - bgp_cluster_id32_cmd, - "bgp cluster-id <1-4294967295>", - BGP_STR - "Configure Route-Reflector Cluster-id\n" - "Route-Reflector Cluster-id as 32 bit quantity\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no bgp cluster-id A.B.C.D", + * NO_STR + * BGP_STR + * "Configure Route-Reflector Cluster-id\n" + * "Route-Reflector Cluster-id in IP address format\n" + * + * "no bgp cluster-id <1-4294967295>", + * NO_STR + * BGP_STR + * "Configure Route-Reflector Cluster-id\n" + * "Route-Reflector Cluster-id as 32 bit quantity\n" + * + */ DEFUN (no_bgp_cluster_id, no_bgp_cluster_id_cmd, "no bgp cluster-id", @@ -953,21 +976,7 @@ DEFUN (no_bgp_cluster_id, return CMD_SUCCESS; } -ALIAS (no_bgp_cluster_id, - no_bgp_cluster_id_ip_cmd, - "no bgp cluster-id A.B.C.D", - NO_STR - BGP_STR - "Configure Route-Reflector Cluster-id\n" - "Route-Reflector Cluster-id in IP address format\n") -ALIAS (no_bgp_cluster_id, - no_bgp_cluster_id_decimal_cmd, - "no bgp cluster-id <1-4294967295>", - NO_STR - BGP_STR - "Configure Route-Reflector Cluster-id\n" - "Route-Reflector Cluster-id as 32 bit quantity\n") DEFUN (bgp_confederation_identifier, bgp_confederation_identifier_cmd, @@ -989,6 +998,16 @@ DEFUN (bgp_confederation_identifier, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no bgp confederation identifier " CMD_AS_RANGE, + * NO_STR + * "BGP specific commands\n" + * "AS confederation parameters\n" + * "AS number\n" + * "Set routing domain confederation AS\n" + * + */ DEFUN (no_bgp_confederation_identifier, no_bgp_confederation_identifier_cmd, "no bgp confederation identifier", @@ -1006,14 +1025,6 @@ DEFUN (no_bgp_confederation_identifier, return CMD_SUCCESS; } -ALIAS (no_bgp_confederation_identifier, - no_bgp_confederation_identifier_arg_cmd, - "no bgp confederation identifier " CMD_AS_RANGE, - NO_STR - "BGP specific commands\n" - "AS confederation parameters\n" - "AS number\n" - "Set routing domain confederation AS\n") DEFUN (bgp_confederation_peers, bgp_confederation_peers_cmd, @@ -1152,6 +1163,16 @@ DEFUN (bgp_maxmed_admin_medv, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no bgp max-med administrative <0-4294967294>", + * NO_STR + * BGP_STR + * "Advertise routes with max-med\n" + * "Administratively applied, for an indefinite period\n" + * "Max MED value to be used\n" + * + */ DEFUN (no_bgp_maxmed_admin, no_bgp_maxmed_admin_cmd, "no bgp max-med administrative", @@ -1172,14 +1193,6 @@ DEFUN (no_bgp_maxmed_admin, return CMD_SUCCESS; } -ALIAS (no_bgp_maxmed_admin, - no_bgp_maxmed_admin_medv_cmd, - "no bgp max-med administrative <0-4294967294>", - NO_STR - BGP_STR - "Advertise routes with max-med\n" - "Administratively applied, for an indefinite period\n" - "Max MED value to be used\n") DEFUN (bgp_maxmed_onstartup, @@ -1235,6 +1248,24 @@ DEFUN (bgp_maxmed_onstartup_medv, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no bgp max-med on-startup <5-86400> <0-4294967294>", + * NO_STR + * BGP_STR + * "Advertise routes with max-med\n" + * "Effective on a startup\n" + * "Time (seconds) period for max-med\n" + * "Max MED value to be used\n" + * + * "no bgp max-med on-startup <5-86400>", + * NO_STR + * BGP_STR + * "Advertise routes with max-med\n" + * "Effective on a startup\n" + * "Time (seconds) period for max-med\n" + * + */ DEFUN (no_bgp_maxmed_onstartup, no_bgp_maxmed_onstartup_cmd, "no bgp max-med on-startup", @@ -1262,24 +1293,7 @@ DEFUN (no_bgp_maxmed_onstartup, return CMD_SUCCESS; } -ALIAS (no_bgp_maxmed_onstartup, - no_bgp_maxmed_onstartup_period_cmd, - "no bgp max-med on-startup <5-86400>", - NO_STR - BGP_STR - "Advertise routes with max-med\n" - "Effective on a startup\n" - "Time (seconds) period for max-med\n") -ALIAS (no_bgp_maxmed_onstartup, - no_bgp_maxmed_onstartup_period_medv_cmd, - "no bgp max-med on-startup <5-86400> <0-4294967294>", - NO_STR - BGP_STR - "Advertise routes with max-med\n" - "Effective on a startup\n" - "Time (seconds) period for max-med\n" - "Max MED value to be used\n") static int bgp_update_delay_config_vty (struct vty *vty, const char *delay, @@ -1367,6 +1381,15 @@ DEFUN (bgp_update_delay_establish_wait, } /* Update-delay deconfiguration */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no update-delay <0-3600> <1-3600>", + * "Force initial delay for best-path and updates\n" + * "Seconds\n" + * "Wait for peers to be established\n" + * "Seconds\n" + * + */ DEFUN (no_bgp_update_delay, no_bgp_update_delay_cmd, "no update-delay <0-3600>", @@ -1376,13 +1399,6 @@ DEFUN (no_bgp_update_delay, return bgp_update_delay_deconfig_vty(vty); } -ALIAS (no_bgp_update_delay, - no_bgp_update_delay_establish_wait_cmd, - "no update-delay <0-3600> <1-3600>", - "Force initial delay for best-path and updates\n" - "Seconds\n" - "Wait for peers to be established\n" - "Seconds\n") static int bgp_wpkt_quanta_config_vty (struct vty *vty, const char *num, char set) @@ -1508,6 +1524,14 @@ DEFUN (bgp_maxpaths_ibgp_cluster, BGP_FLAG_IBGP_MULTIPATH_SAME_CLUSTERLEN, 1); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no maximum-paths " CMD_RANGE_STR(1, MULTIPATH_NUM), + * NO_STR + * "Forward packets over multiple paths\n" + * "Number of paths\n" + * + */ DEFUN (no_bgp_maxpaths, no_bgp_maxpaths_cmd, "no maximum-paths", @@ -1518,13 +1542,23 @@ DEFUN (no_bgp_maxpaths, return bgp_maxpaths_config_vty(vty, BGP_PEER_EBGP, NULL, 0, 0); } -ALIAS (no_bgp_maxpaths, - no_bgp_maxpaths_arg_cmd, - "no maximum-paths " CMD_RANGE_STR(1, MULTIPATH_NUM), - NO_STR - "Forward packets over multiple paths\n" - "Number of paths\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no maximum-paths ibgp " CMD_RANGE_STR(1, MULTIPATH_NUM) " equal-cluster-length", + * NO_STR + * "Forward packets over multiple paths\n" + * "iBGP-multipath\n" + * "Number of paths\n" + * "Match the cluster length\n" + * + * "no maximum-paths ibgp " CMD_RANGE_STR(1, MULTIPATH_NUM), + * NO_STR + * "Forward packets over multiple paths\n" + * "iBGP-multipath\n" + * "Number of paths\n" + * + */ DEFUN (no_bgp_maxpaths_ibgp, no_bgp_maxpaths_ibgp_cmd, "no maximum-paths ibgp", @@ -1536,22 +1570,7 @@ DEFUN (no_bgp_maxpaths_ibgp, return bgp_maxpaths_config_vty(vty, BGP_PEER_IBGP, NULL, 0, 0); } -ALIAS (no_bgp_maxpaths_ibgp, - no_bgp_maxpaths_ibgp_arg_cmd, - "no maximum-paths ibgp " CMD_RANGE_STR(1, MULTIPATH_NUM), - NO_STR - "Forward packets over multiple paths\n" - "iBGP-multipath\n" - "Number of paths\n") -ALIAS (no_bgp_maxpaths_ibgp, - no_bgp_maxpaths_ibgp_cluster_cmd, - "no maximum-paths ibgp " CMD_RANGE_STR(1, MULTIPATH_NUM) " equal-cluster-length", - NO_STR - "Forward packets over multiple paths\n" - "iBGP-multipath\n" - "Number of paths\n" - "Match the cluster length\n") int bgp_config_write_maxpaths (struct vty *vty, struct bgp *bgp, afi_t afi, @@ -1610,6 +1629,16 @@ DEFUN (bgp_timers, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no timers bgp <0-65535> <0-65535>", + * NO_STR + * "Adjust routing timers\n" + * "BGP timers\n" + * "Keepalive interval\n" + * "Holdtime\n" + * + */ DEFUN (no_bgp_timers, no_bgp_timers_cmd, "no timers bgp", @@ -1625,14 +1654,6 @@ DEFUN (no_bgp_timers, return CMD_SUCCESS; } -ALIAS (no_bgp_timers, - no_bgp_timers_arg_cmd, - "no timers bgp <0-65535> <0-65535>", - NO_STR - "Adjust routing timers\n" - "BGP timers\n" - "Keepalive interval\n" - "Holdtime\n") DEFUN (bgp_client_to_client_reflection, bgp_client_to_client_reflection_cmd, @@ -1837,6 +1858,16 @@ DEFUN (bgp_graceful_restart_restart_time, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no bgp graceful-restart stalepath-time <1-3600>", + * NO_STR + * "BGP specific commands\n" + * "Graceful restart capability parameters\n" + * "Set the max time to hold onto restarting peer's stale paths\n" + * "Delay value (seconds)\n" + * + */ DEFUN (no_bgp_graceful_restart_stalepath_time, no_bgp_graceful_restart_stalepath_time_cmd, "no bgp graceful-restart stalepath-time", @@ -1855,6 +1886,16 @@ DEFUN (no_bgp_graceful_restart_stalepath_time, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no bgp graceful-restart restart-time <1-3600>", + * NO_STR + * "BGP specific commands\n" + * "Graceful restart capability parameters\n" + * "Set the time to wait to delete stale routes before a BGP open message is received\n" + * "Delay value (seconds)\n" + * + */ DEFUN (no_bgp_graceful_restart_restart_time, no_bgp_graceful_restart_restart_time_cmd, "no bgp graceful-restart restart-time", @@ -1873,23 +1914,7 @@ DEFUN (no_bgp_graceful_restart_restart_time, return CMD_SUCCESS; } -ALIAS (no_bgp_graceful_restart_stalepath_time, - no_bgp_graceful_restart_stalepath_time_val_cmd, - "no bgp graceful-restart stalepath-time <1-3600>", - NO_STR - "BGP specific commands\n" - "Graceful restart capability parameters\n" - "Set the max time to hold onto restarting peer's stale paths\n" - "Delay value (seconds)\n") -ALIAS (no_bgp_graceful_restart_restart_time, - no_bgp_graceful_restart_restart_time_val_cmd, - "no bgp graceful-restart restart-time <1-3600>", - NO_STR - "BGP specific commands\n" - "Graceful restart capability parameters\n" - "Set the time to wait to delete stale routes before a BGP open message is received\n" - "Delay value (seconds)\n") /* "bgp fast-external-failover" configuration. */ DEFUN (bgp_fast_external_failover, @@ -2158,6 +2183,16 @@ DEFUN (bgp_bestpath_med, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "bgp bestpath med missing-as-worst confed", + * "BGP specific commands\n" + * "Change the default bestpath selection\n" + * "MED attribute\n" + * "Treat missing MED as the least preferred one\n" + * "Compare MED among confederation paths\n" + * + */ DEFUN (bgp_bestpath_med2, bgp_bestpath_med2_cmd, "bgp bestpath med confed missing-as-worst", @@ -2177,14 +2212,6 @@ DEFUN (bgp_bestpath_med2, return CMD_SUCCESS; } -ALIAS (bgp_bestpath_med2, - bgp_bestpath_med3_cmd, - "bgp bestpath med missing-as-worst confed", - "BGP specific commands\n" - "Change the default bestpath selection\n" - "MED attribute\n" - "Treat missing MED as the least preferred one\n" - "Compare MED among confederation paths\n") DEFUN (no_bgp_bestpath_med, no_bgp_bestpath_med_cmd, @@ -2210,6 +2237,17 @@ DEFUN (no_bgp_bestpath_med, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no bgp bestpath med missing-as-worst confed", + * NO_STR + * "BGP specific commands\n" + * "Change the default bestpath selection\n" + * "MED attribute\n" + * "Treat missing MED as the least preferred one\n" + * "Compare MED among confederation paths\n" + * + */ DEFUN (no_bgp_bestpath_med2, no_bgp_bestpath_med2_cmd, "no bgp bestpath med confed missing-as-worst", @@ -2230,15 +2268,6 @@ DEFUN (no_bgp_bestpath_med2, return CMD_SUCCESS; } -ALIAS (no_bgp_bestpath_med2, - no_bgp_bestpath_med3_cmd, - "no bgp bestpath med missing-as-worst confed", - NO_STR - "BGP specific commands\n" - "Change the default bestpath selection\n" - "MED attribute\n" - "Treat missing MED as the least preferred one\n" - "Compare MED among confederation paths\n") /* "no bgp default ipv4-unicast". */ DEFUN (no_bgp_default_ipv4_unicast, @@ -2369,6 +2398,16 @@ DEFUN (bgp_default_local_preference, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no bgp default local-preference <0-4294967295>", + * NO_STR + * "BGP specific commands\n" + * "Configure BGP defaults\n" + * "local preference (higher=more preferred)\n" + * "Configure default local preference value\n" + * + */ DEFUN (no_bgp_default_local_preference, no_bgp_default_local_preference_cmd, "no bgp default local-preference", @@ -2386,14 +2425,6 @@ DEFUN (no_bgp_default_local_preference, return CMD_SUCCESS; } -ALIAS (no_bgp_default_local_preference, - no_bgp_default_local_preference_val_cmd, - "no bgp default local-preference <0-4294967295>", - NO_STR - "BGP specific commands\n" - "Configure BGP defaults\n" - "local preference (higher=more preferred)\n" - "Configure default local preference value\n") DEFUN (bgp_default_subgroup_pkt_queue_max, bgp_default_subgroup_pkt_queue_max_cmd, @@ -2415,6 +2446,16 @@ DEFUN (bgp_default_subgroup_pkt_queue_max, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no bgp default subgroup-pkt-queue-max <20-100>", + * NO_STR + * "BGP specific commands\n" + * "Configure BGP defaults\n" + * "subgroup-pkt-queue-max\n" + * "Configure subgroup packet queue max\n" + * + */ DEFUN (no_bgp_default_subgroup_pkt_queue_max, no_bgp_default_subgroup_pkt_queue_max_cmd, "no bgp default subgroup-pkt-queue-max", @@ -2430,14 +2471,6 @@ DEFUN (no_bgp_default_subgroup_pkt_queue_max, return CMD_SUCCESS; } -ALIAS (no_bgp_default_subgroup_pkt_queue_max, - no_bgp_default_subgroup_pkt_queue_max_val_cmd, - "no bgp default subgroup-pkt-queue-max <20-100>", - NO_STR - "BGP specific commands\n" - "Configure BGP defaults\n" - "subgroup-pkt-queue-max\n" - "Configure subgroup packet queue max\n") DEFUN (bgp_rr_allow_outbound_policy, bgp_rr_allow_outbound_policy_cmd, @@ -2504,6 +2537,16 @@ DEFUN (bgp_listen_limit, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no bgp listen limit " DYNAMIC_NEIGHBOR_LIMIT_RANGE, + * NO_STR + * "BGP specific commands\n" + * "Configure BGP defaults\n" + * "maximum number of BGP Dynamic Neighbors that can be created\n" + * "Configure Dynamic Neighbors listen limit value\n" + * + */ DEFUN (no_bgp_listen_limit, no_bgp_listen_limit_cmd, "no bgp listen limit", @@ -2519,14 +2562,6 @@ DEFUN (no_bgp_listen_limit, return CMD_SUCCESS; } -ALIAS (no_bgp_listen_limit, - no_bgp_listen_limit_val_cmd, - "no bgp listen limit " DYNAMIC_NEIGHBOR_LIMIT_RANGE, - NO_STR - "BGP specific commands\n" - "Configure BGP defaults\n" - "maximum number of BGP Dynamic Neighbors that can be created\n" - "Configure Dynamic Neighbors listen limit value\n") /* * Check if this listen range is already configured. Check for exact @@ -2928,6 +2963,16 @@ peer_conf_interface_get (struct vty *vty, const char *conf_if, afi_t afi, return bgp_vty_return (vty, ret); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "neighbor WORD interface peer-group WORD", + * NEIGHBOR_STR + * "Interface name or neighbor tag\n" + * "Enable BGP on interface\n" + * "Member of the peer-group\n" + * "peer-group name\n" + * + */ DEFUN (neighbor_interface_config, neighbor_interface_config_cmd, "neighbor WORD interface", @@ -2943,15 +2988,18 @@ DEFUN (neighbor_interface_config, NULL, NULL); } -ALIAS (neighbor_interface_config, - neighbor_interface_config_peergroup_cmd, - "neighbor WORD interface peer-group WORD", - NEIGHBOR_STR - "Interface name or neighbor tag\n" - "Enable BGP on interface\n" - "Member of the peer-group\n" - "peer-group name\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "neighbor WORD interface v6only peer-group WORD", + * NEIGHBOR_STR + * "Interface name or neighbor tag\n" + * "Enable BGP on interface\n" + * "Enable BGP with v6 link-local only\n" + * "Member of the peer-group\n" + * "peer-group name\n" + * + */ DEFUN (neighbor_interface_config_v6only, neighbor_interface_config_v6only_cmd, "neighbor WORD interface v6only", @@ -2964,15 +3012,6 @@ DEFUN (neighbor_interface_config_v6only, argv[5]->arg, NULL); } -ALIAS (neighbor_interface_config_v6only, - neighbor_interface_config_v6only_peergroup_cmd, - "neighbor WORD interface v6only peer-group WORD", - NEIGHBOR_STR - "Interface name or neighbor tag\n" - "Enable BGP on interface\n" - "Enable BGP with v6 link-local only\n" - "Member of the peer-group\n" - "peer-group name\n") DEFUN (neighbor_interface_config_remote_as, neighbor_interface_config_remote_as_cmd, @@ -3024,6 +3063,16 @@ DEFUN (neighbor_peer_group, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * NO_NEIGHBOR_CMD "remote-as (" CMD_AS_RANGE "|internal|external)", + * NO_STR + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR + * "Specify a BGP neighbor\n" + * AS_STR + * + */ DEFUN (no_neighbor, no_neighbor_cmd, NO_NEIGHBOR_CMD2, @@ -3082,15 +3131,49 @@ DEFUN (no_neighbor, return CMD_SUCCESS; } -ALIAS (no_neighbor, - no_neighbor_remote_as_cmd, - NO_NEIGHBOR_CMD "remote-as (" CMD_AS_RANGE "|internal|external)", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR - "Specify a BGP neighbor\n" - AS_STR) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no neighbor WORD interface remote-as (" CMD_AS_RANGE "|internal|external)", + * NO_STR + * NEIGHBOR_STR + * "Interface name\n" + * "Configure BGP on interface\n" + * AS_STR + * + * "no neighbor WORD interface v6only peer-group WORD", + * NO_STR + * NEIGHBOR_STR + * "Interface name\n" + * "Configure BGP on interface\n" + * "Enable BGP with v6 link-local only\n" + * "Member of the peer-group\n" + * "peer-group name\n" + * + * "no neighbor WORD interface v6only remote-as (" CMD_AS_RANGE "|internal|external)", + * NO_STR + * NEIGHBOR_STR + * "Interface name\n" + * "Configure BGP on interface\n" + * "Enable BGP with v6 link-local only\n" + * AS_STR + * + * "no neighbor WORD interface v6only", + * NO_STR + * NEIGHBOR_STR + * "Interface name\n" + * "Configure BGP on interface\n" + * "Enable BGP with v6 link-local only\n" + * + * "no neighbor WORD interface peer-group WORD", + * NO_STR + * NEIGHBOR_STR + * "Interface name\n" + * "Configure BGP on interface\n" + * "Member of the peer-group\n" + * "peer-group name\n" + * + */ DEFUN (no_neighbor_interface_config, no_neighbor_interface_config_cmd, "no neighbor WORD interface", @@ -3118,54 +3201,10 @@ DEFUN (no_neighbor_interface_config, return CMD_SUCCESS; } -ALIAS (no_neighbor_interface_config, - no_neighbor_interface_config_peergroup_cmd, - "no neighbor WORD interface peer-group WORD", - NO_STR - NEIGHBOR_STR - "Interface name\n" - "Configure BGP on interface\n" - "Member of the peer-group\n" - "peer-group name\n") -ALIAS (no_neighbor_interface_config, - no_neighbor_interface_config_v6only_cmd, - "no neighbor WORD interface v6only", - NO_STR - NEIGHBOR_STR - "Interface name\n" - "Configure BGP on interface\n" - "Enable BGP with v6 link-local only\n") -ALIAS (no_neighbor_interface_config, - no_neighbor_interface_config_v6only_peergroup_cmd, - "no neighbor WORD interface v6only peer-group WORD", - NO_STR - NEIGHBOR_STR - "Interface name\n" - "Configure BGP on interface\n" - "Enable BGP with v6 link-local only\n" - "Member of the peer-group\n" - "peer-group name\n") -ALIAS (no_neighbor_interface_config, - no_neighbor_interface_config_remote_as_cmd, - "no neighbor WORD interface remote-as (" CMD_AS_RANGE "|internal|external)", - NO_STR - NEIGHBOR_STR - "Interface name\n" - "Configure BGP on interface\n" - AS_STR) -ALIAS (no_neighbor_interface_config, - no_neighbor_interface_config_v6only_remote_as_cmd, - "no neighbor WORD interface v6only remote-as (" CMD_AS_RANGE "|internal|external)", - NO_STR - NEIGHBOR_STR - "Interface name\n" - "Configure BGP on interface\n" - "Enable BGP with v6 link-local only\n" - AS_STR) DEFUN (no_neighbor_peer_group, no_neighbor_peer_group_cmd, @@ -3280,6 +3319,33 @@ DEFUN (neighbor_local_as_no_prepend_replace_as, } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * NO_NEIGHBOR_CMD2 "local-as " CMD_AS_RANGE, + * NO_STR + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "Specify a local-as number\n" + * "AS number used as local AS\n" + * + * NO_NEIGHBOR_CMD2 "local-as " CMD_AS_RANGE " no-prepend", + * NO_STR + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "Specify a local-as number\n" + * "AS number used as local AS\n" + * "Do not prepend local-as to updates from ebgp peers\n" + * + * NO_NEIGHBOR_CMD2 "local-as " CMD_AS_RANGE " no-prepend replace-as", + * NO_STR + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "Specify a local-as number\n" + * "AS number used as local AS\n" + * "Do not prepend local-as to updates from ebgp peers\n" + * "Do not prepend local-as to updates from ibgp peers\n" + * + */ DEFUN (no_neighbor_local_as, no_neighbor_local_as_cmd, NO_NEIGHBOR_CMD2 "local-as", @@ -3299,35 +3365,8 @@ DEFUN (no_neighbor_local_as, return bgp_vty_return (vty, ret); } -ALIAS (no_neighbor_local_as, - no_neighbor_local_as_val_cmd, - NO_NEIGHBOR_CMD2 "local-as " CMD_AS_RANGE, - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Specify a local-as number\n" - "AS number used as local AS\n") -ALIAS (no_neighbor_local_as, - no_neighbor_local_as_val2_cmd, - NO_NEIGHBOR_CMD2 "local-as " CMD_AS_RANGE " no-prepend", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Specify a local-as number\n" - "AS number used as local AS\n" - "Do not prepend local-as to updates from ebgp peers\n") -ALIAS (no_neighbor_local_as, - no_neighbor_local_as_val3_cmd, - NO_NEIGHBOR_CMD2 "local-as " CMD_AS_RANGE " no-prepend replace-as", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Specify a local-as number\n" - "AS number used as local AS\n" - "Do not prepend local-as to updates from ebgp peers\n" - "Do not prepend local-as to updates from ibgp peers\n") DEFUN (neighbor_solo, neighbor_solo_cmd, @@ -3385,6 +3424,16 @@ DEFUN (neighbor_password, return bgp_vty_return (vty, ret); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * NO_NEIGHBOR_CMD2 "password LINE", + * NO_STR + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "Set a password\n" + * "The password\n" + * + */ DEFUN (no_neighbor_password, no_neighbor_password_cmd, NO_NEIGHBOR_CMD2 "password", @@ -3404,14 +3453,6 @@ DEFUN (no_neighbor_password, return bgp_vty_return (vty, ret); } -ALIAS (no_neighbor_password, - no_neighbor_password_val_cmd, - NO_NEIGHBOR_CMD2 "password LINE", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Set a password\n" - "The password\n") DEFUN (neighbor_activate, neighbor_activate_cmd, @@ -4183,6 +4224,57 @@ DEFUN (no_neighbor_nexthop_local_unchanged, PEER_FLAG_NEXTHOP_LOCAL_UNCHANGED ); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * NEIGHBOR_CMD2 "attribute-unchanged med next-hop as-path", + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "BGP attribute is propagated unchanged to this neighbor\n" + * "Med attribute\n" + * "Nexthop attribute\n" + * "As-path attribute\n" + * + * NEIGHBOR_CMD2 "attribute-unchanged med as-path next-hop", + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "BGP attribute is propagated unchanged to this neighbor\n" + * "Med attribute\n" + * "As-path attribute\n" + * "Nexthop attribute\n" + * + * NEIGHBOR_CMD2 "attribute-unchanged as-path next-hop med", + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "BGP attribute is propagated unchanged to this neighbor\n" + * "As-path attribute\n" + * "Nexthop attribute\n" + * "Med attribute\n" + * + * NEIGHBOR_CMD2 "attribute-unchanged next-hop as-path med", + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "BGP attribute is propagated unchanged to this neighbor\n" + * "Nexthop attribute\n" + * "As-path attribute\n" + * "Med attribute\n" + * + * NEIGHBOR_CMD2 "attribute-unchanged as-path med next-hop", + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "BGP attribute is propagated unchanged to this neighbor\n" + * "As-path attribute\n" + * "Med attribute\n" + * "Nexthop attribute\n" + * + * NEIGHBOR_CMD2 "attribute-unchanged next-hop med as-path", + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "BGP attribute is propagated unchanged to this neighbor\n" + * "Nexthop attribute\n" + * "Med attribute\n" + * "As-path attribute\n" + * + */ DEFUN (neighbor_attr_unchanged, neighbor_attr_unchanged_cmd, NEIGHBOR_CMD2 "attribute-unchanged", @@ -4284,66 +4376,69 @@ DEFUN (neighbor_attr_unchanged4, bgp_node_safi (vty), flags); } -ALIAS (neighbor_attr_unchanged, - neighbor_attr_unchanged5_cmd, - NEIGHBOR_CMD2 "attribute-unchanged as-path next-hop med", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "BGP attribute is propagated unchanged to this neighbor\n" - "As-path attribute\n" - "Nexthop attribute\n" - "Med attribute\n") -ALIAS (neighbor_attr_unchanged, - neighbor_attr_unchanged6_cmd, - NEIGHBOR_CMD2 "attribute-unchanged as-path med next-hop", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "BGP attribute is propagated unchanged to this neighbor\n" - "As-path attribute\n" - "Med attribute\n" - "Nexthop attribute\n") -ALIAS (neighbor_attr_unchanged, - neighbor_attr_unchanged7_cmd, - NEIGHBOR_CMD2 "attribute-unchanged next-hop med as-path", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "BGP attribute is propagated unchanged to this neighbor\n" - "Nexthop attribute\n" - "Med attribute\n" - "As-path attribute\n") -ALIAS (neighbor_attr_unchanged, - neighbor_attr_unchanged8_cmd, - NEIGHBOR_CMD2 "attribute-unchanged next-hop as-path med", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "BGP attribute is propagated unchanged to this neighbor\n" - "Nexthop attribute\n" - "As-path attribute\n" - "Med attribute\n") -ALIAS (neighbor_attr_unchanged, - neighbor_attr_unchanged9_cmd, - NEIGHBOR_CMD2 "attribute-unchanged med next-hop as-path", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "BGP attribute is propagated unchanged to this neighbor\n" - "Med attribute\n" - "Nexthop attribute\n" - "As-path attribute\n") -ALIAS (neighbor_attr_unchanged, - neighbor_attr_unchanged10_cmd, - NEIGHBOR_CMD2 "attribute-unchanged med as-path next-hop", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "BGP attribute is propagated unchanged to this neighbor\n" - "Med attribute\n" - "As-path attribute\n" - "Nexthop attribute\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * NO_NEIGHBOR_CMD2 "attribute-unchanged next-hop med as-path", + * NO_STR + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "BGP attribute is propagated unchanged to this neighbor\n" + * "Nexthop attribute\n" + * "Med attribute\n" + * "As-path attribute\n" + * + * NO_NEIGHBOR_CMD2 "attribute-unchanged as-path med next-hop", + * NO_STR + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "BGP attribute is propagated unchanged to this neighbor\n" + * "As-path attribute\n" + * "Med attribute\n" + * "Nexthop attribute\n" + * + * NO_NEIGHBOR_CMD2 "attribute-unchanged med as-path next-hop", + * NO_STR + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "BGP attribute is propagated unchanged to this neighbor\n" + * "Med attribute\n" + * "As-path attribute\n" + * "Nexthop attribute\n" + * + * NO_NEIGHBOR_CMD2 "attribute-unchanged next-hop as-path med", + * NO_STR + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "BGP attribute is propagated unchanged to this neighbor\n" + * "Nexthop attribute\n" + * "As-path attribute\n" + * "Med attribute\n" + * + * NO_NEIGHBOR_CMD2 "attribute-unchanged as-path next-hop med", + * NO_STR + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "BGP attribute is propagated unchanged to this neighbor\n" + * "As-path attribute\n" + * "Nexthop attribute\n" + * "Med attribute\n" + * + * NO_NEIGHBOR_CMD2 "attribute-unchanged med next-hop as-path", + * NO_STR + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "BGP attribute is propagated unchanged to this neighbor\n" + * "Med attribute\n" + * "Nexthop attribute\n" + * "As-path attribute\n" + * + */ DEFUN (no_neighbor_attr_unchanged, no_neighbor_attr_unchanged_cmd, NO_NEIGHBOR_CMD2 "attribute-unchanged", @@ -4449,71 +4544,11 @@ DEFUN (no_neighbor_attr_unchanged4, bgp_node_safi (vty), flags); } -ALIAS (no_neighbor_attr_unchanged, - no_neighbor_attr_unchanged5_cmd, - NO_NEIGHBOR_CMD2 "attribute-unchanged as-path next-hop med", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "BGP attribute is propagated unchanged to this neighbor\n" - "As-path attribute\n" - "Nexthop attribute\n" - "Med attribute\n") -ALIAS (no_neighbor_attr_unchanged, - no_neighbor_attr_unchanged6_cmd, - NO_NEIGHBOR_CMD2 "attribute-unchanged as-path med next-hop", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "BGP attribute is propagated unchanged to this neighbor\n" - "As-path attribute\n" - "Med attribute\n" - "Nexthop attribute\n") -ALIAS (no_neighbor_attr_unchanged, - no_neighbor_attr_unchanged7_cmd, - NO_NEIGHBOR_CMD2 "attribute-unchanged next-hop med as-path", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "BGP attribute is propagated unchanged to this neighbor\n" - "Nexthop attribute\n" - "Med attribute\n" - "As-path attribute\n") -ALIAS (no_neighbor_attr_unchanged, - no_neighbor_attr_unchanged8_cmd, - NO_NEIGHBOR_CMD2 "attribute-unchanged next-hop as-path med", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "BGP attribute is propagated unchanged to this neighbor\n" - "Nexthop attribute\n" - "As-path attribute\n" - "Med attribute\n") -ALIAS (no_neighbor_attr_unchanged, - no_neighbor_attr_unchanged9_cmd, - NO_NEIGHBOR_CMD2 "attribute-unchanged med next-hop as-path", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "BGP attribute is propagated unchanged to this neighbor\n" - "Med attribute\n" - "Nexthop attribute\n" - "As-path attribute\n") -ALIAS (no_neighbor_attr_unchanged, - no_neighbor_attr_unchanged10_cmd, - NO_NEIGHBOR_CMD2 "attribute-unchanged med as-path next-hop", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "BGP attribute is propagated unchanged to this neighbor\n" - "Med attribute\n" - "As-path attribute\n" - "Nexthop attribute\n") /* EBGP multihop configuration. */ static int @@ -4572,6 +4607,16 @@ DEFUN (neighbor_ebgp_multihop_ttl, return peer_ebgp_multihop_set_vty (vty, argv[1]->arg, argv[3]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * NO_NEIGHBOR_CMD2 "ebgp-multihop " CMD_RANGE_STR(1, MAXTTL), + * NO_STR + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "Allow EBGP neighbors not on directly connected networks\n" + * "maximum hop count\n" + * + */ DEFUN (no_neighbor_ebgp_multihop, no_neighbor_ebgp_multihop_cmd, NO_NEIGHBOR_CMD2 "ebgp-multihop", @@ -4583,16 +4628,16 @@ DEFUN (no_neighbor_ebgp_multihop, return peer_ebgp_multihop_unset_vty (vty, argv[2]->arg); } -ALIAS (no_neighbor_ebgp_multihop, - no_neighbor_ebgp_multihop_ttl_cmd, - NO_NEIGHBOR_CMD2 "ebgp-multihop " CMD_RANGE_STR(1, MAXTTL), - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Allow EBGP neighbors not on directly connected networks\n" - "maximum hop count\n") /* disable-connected-check */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * NEIGHBOR_CMD2 "enforce-multihop", + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "Enforce EBGP neighbors perform multihop\n" + * + */ DEFUN (neighbor_disable_connected_check, neighbor_disable_connected_check_cmd, NEIGHBOR_CMD2 "disable-connected-check", @@ -4603,6 +4648,15 @@ DEFUN (neighbor_disable_connected_check, return peer_flag_set_vty (vty, argv[1]->arg, PEER_FLAG_DISABLE_CONNECTED_CHECK); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * NO_NEIGHBOR_CMD2 "enforce-multihop", + * NO_STR + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "Enforce EBGP neighbors perform multihop\n" + * + */ DEFUN (no_neighbor_disable_connected_check, no_neighbor_disable_connected_check_cmd, NO_NEIGHBOR_CMD2 "disable-connected-check", @@ -4615,21 +4669,8 @@ DEFUN (no_neighbor_disable_connected_check, } /* Enforce multihop. */ -ALIAS (neighbor_disable_connected_check, - neighbor_enforce_multihop_cmd, - NEIGHBOR_CMD2 "enforce-multihop", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Enforce EBGP neighbors perform multihop\n") /* Enforce multihop. */ -ALIAS (no_neighbor_disable_connected_check, - no_neighbor_enforce_multihop_cmd, - NO_NEIGHBOR_CMD2 "enforce-multihop", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Enforce EBGP neighbors perform multihop\n") DEFUN (neighbor_description, neighbor_description_cmd, @@ -4658,6 +4699,16 @@ DEFUN (neighbor_description, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * NO_NEIGHBOR_CMD2 "description .LINE", + * NO_STR + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "Neighbor specific description\n" + * "Up to 80 characters describing this neighbor\n" + * + */ DEFUN (no_neighbor_description, no_neighbor_description_cmd, NO_NEIGHBOR_CMD2 "description", @@ -4677,14 +4728,6 @@ DEFUN (no_neighbor_description, return CMD_SUCCESS; } -ALIAS (no_neighbor_description, - no_neighbor_description_val_cmd, - NO_NEIGHBOR_CMD2 "description .LINE", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Neighbor specific description\n" - "Up to 80 characters describing this neighbor\n") /* Neighbor update-source. */ static int @@ -4792,6 +4835,17 @@ DEFUN (neighbor_default_originate_rmap, bgp_node_safi (vty), argv[4]->arg, 1); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * NO_NEIGHBOR_CMD2 "default-originate route-map WORD", + * NO_STR + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "Originate default route to this neighbor\n" + * "Route-map to specify criteria to originate default\n" + * "route-map name\n" + * + */ DEFUN (no_neighbor_default_originate, no_neighbor_default_originate_cmd, NO_NEIGHBOR_CMD2 "default-originate", @@ -4804,15 +4858,6 @@ DEFUN (no_neighbor_default_originate, bgp_node_safi (vty), NULL, 0); } -ALIAS (no_neighbor_default_originate, - no_neighbor_default_originate_rmap_cmd, - NO_NEIGHBOR_CMD2 "default-originate route-map WORD", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Originate default route to this neighbor\n" - "Route-map to specify criteria to originate default\n" - "route-map name\n") /* Set neighbor's BGP port. */ static int @@ -4854,6 +4899,16 @@ DEFUN (neighbor_port, return peer_port_vty (vty, argv[1]->arg, AFI_IP, argv[3]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * NO_NEIGHBOR_CMD "port <0-65535>", + * NO_STR + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR + * "Neighbor's BGP port\n" + * "TCP port number\n" + * + */ DEFUN (no_neighbor_port, no_neighbor_port_cmd, NO_NEIGHBOR_CMD "port", @@ -4865,14 +4920,6 @@ DEFUN (no_neighbor_port, return peer_port_vty (vty, argv[2]->arg, AFI_IP, NULL); } -ALIAS (no_neighbor_port, - no_neighbor_port_val_cmd, - NO_NEIGHBOR_CMD "port <0-65535>", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR - "Neighbor's BGP port\n" - "TCP port number\n") /* neighbor weight. */ static int @@ -4918,6 +4965,16 @@ DEFUN (neighbor_weight, return peer_weight_set_vty (vty, argv[1]->arg, argv[3]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * NO_NEIGHBOR_CMD2 "weight <0-65535>", + * NO_STR + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "Set default weight for routes from this neighbor\n" + * "default weight\n" + * + */ DEFUN (no_neighbor_weight, no_neighbor_weight_cmd, NO_NEIGHBOR_CMD2 "weight", @@ -4929,14 +4986,6 @@ DEFUN (no_neighbor_weight, return peer_weight_unset_vty (vty, argv[2]->arg); } -ALIAS (no_neighbor_weight, - no_neighbor_weight_val_cmd, - NO_NEIGHBOR_CMD2 "weight <0-65535>", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Set default weight for routes from this neighbor\n" - "default weight\n") /* Override capability negotiation. */ DEFUN (neighbor_override_capability, @@ -5029,6 +5078,17 @@ DEFUN (neighbor_timers, return peer_timers_set_vty (vty, argv[1]->arg, argv[3]->arg, argv[4]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * NO_NEIGHBOR_CMD2 "timers <0-65535> <0-65535>", + * NO_STR + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "BGP per neighbor timers\n" + * "Keepalive interval\n" + * "Holdtime\n" + * + */ DEFUN (no_neighbor_timers, no_neighbor_timers_cmd, NO_NEIGHBOR_CMD2 "timers", @@ -5040,15 +5100,6 @@ DEFUN (no_neighbor_timers, return peer_timers_unset_vty (vty, argv[2]->arg); } -ALIAS (no_neighbor_timers, - no_neighbor_timers_val_cmd, - NO_NEIGHBOR_CMD2 "timers <0-65535> <0-65535>", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "BGP per neighbor timers\n" - "Keepalive interval\n" - "Holdtime\n") static int peer_timers_connect_set_vty (struct vty *vty, const char *ip_str, @@ -5096,6 +5147,17 @@ DEFUN (neighbor_timers_connect, return peer_timers_connect_set_vty (vty, argv[1]->arg, argv[4]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * NO_NEIGHBOR_CMD2 "timers connect <1-65535>", + * NO_STR + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "BGP per neighbor timers\n" + * "BGP connect timer\n" + * "Connect timer\n" + * + */ DEFUN (no_neighbor_timers_connect, no_neighbor_timers_connect_cmd, NO_NEIGHBOR_CMD2 "timers connect", @@ -5108,15 +5170,6 @@ DEFUN (no_neighbor_timers_connect, return peer_timers_connect_unset_vty (vty, argv[2]->arg); } -ALIAS (no_neighbor_timers_connect, - no_neighbor_timers_connect_val_cmd, - NO_NEIGHBOR_CMD2 "timers connect <1-65535>", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "BGP per neighbor timers\n" - "BGP connect timer\n" - "Connect timer\n") static int peer_advertise_interval_vty (struct vty *vty, const char *ip_str, @@ -5152,6 +5205,16 @@ DEFUN (neighbor_advertise_interval, return peer_advertise_interval_vty (vty, argv[1]->arg, argv[3]->arg, 1); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * NO_NEIGHBOR_CMD2 "advertisement-interval <0-600>", + * NO_STR + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "Minimum interval between sending BGP routing updates\n" + * "time in seconds\n" + * + */ DEFUN (no_neighbor_advertise_interval, no_neighbor_advertise_interval_cmd, NO_NEIGHBOR_CMD2 "advertisement-interval", @@ -5163,14 +5226,6 @@ DEFUN (no_neighbor_advertise_interval, return peer_advertise_interval_vty (vty, argv[2]->arg, NULL, 0); } -ALIAS (no_neighbor_advertise_interval, - no_neighbor_advertise_interval_val_cmd, - NO_NEIGHBOR_CMD2 "advertisement-interval <0-600>", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Minimum interval between sending BGP routing updates\n" - "time in seconds\n") /* Time to wait before processing route-map updates */ DEFUN (bgp_set_route_map_delay_timer, @@ -5202,6 +5257,15 @@ DEFUN (bgp_set_route_map_delay_timer, return CMD_WARNING; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no bgp route-map delay-timer <0-600>", + * NO_STR + * "Default BGP route-map delay timer\n" + * "Reset to default time to wait for processing route-map changes\n" + * "0 disables the timer, no route updates happen when route-maps change\n" + * + */ DEFUN (no_bgp_set_route_map_delay_timer, no_bgp_set_route_map_delay_timer_cmd, "no bgp route-map delay-timer", @@ -5215,13 +5279,6 @@ DEFUN (no_bgp_set_route_map_delay_timer, return CMD_SUCCESS; } -ALIAS (no_bgp_set_route_map_delay_timer, - no_bgp_set_route_map_delay_timer_val_cmd, - "no bgp route-map delay-timer <0-600>", - NO_STR - "Default BGP route-map delay timer\n" - "Reset to default time to wait for processing route-map changes\n" - "0 disables the timer, no route updates happen when route-maps change\n") /* neighbor interface */ static int @@ -5773,6 +5830,60 @@ DEFUN (neighbor_maximum_prefix_threshold_restart, bgp_node_safi (vty), argv[3]->arg, argv[4]->arg, 0, argv[6]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295>", + * NO_STR + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "Maximum number of prefix accept from this peer\n" + * "maximum no. of prefix limit\n" + * + * NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> <1-100> restart <1-65535>", + * NO_STR + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "Maximum number of prefix accept from this peer\n" + * "maximum no. of prefix limit\n" + * "Threshold value (%) at which to generate a warning msg\n" + * "Restart bgp connection after limit is exceeded\n" + * "Restart interval in minutes" + * + * NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> warning-only", + * NO_STR + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "Maximum number of prefix accept from this peer\n" + * "maximum no. of prefix limit\n" + * "Only give warning message when limit is exceeded\n" + * + * NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> restart <1-65535>", + * NO_STR + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "Maximum number of prefix accept from this peer\n" + * "maximum no. of prefix limit\n" + * "Restart bgp connection after limit is exceeded\n" + * "Restart interval in minutes" + * + * NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> <1-100> warning-only", + * NO_STR + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "Maximum number of prefix accept from this peer\n" + * "maximum no. of prefix limit\n" + * "Threshold value (%) at which to generate a warning msg\n" + * "Only give warning message when limit is exceeded\n" + * + * NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> <1-100>", + * NO_STR + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "Maximum number of prefix accept from this peer\n" + * "maximum no. of prefix limit\n" + * "Threshold value (%) at which to generate a warning msg\n" + * + */ DEFUN (no_neighbor_maximum_prefix, no_neighbor_maximum_prefix_cmd, NO_NEIGHBOR_CMD2 "maximum-prefix", @@ -5785,70 +5896,22 @@ DEFUN (no_neighbor_maximum_prefix, bgp_node_safi (vty)); } -ALIAS (no_neighbor_maximum_prefix, - no_neighbor_maximum_prefix_val_cmd, - NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295>", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Maximum number of prefix accept from this peer\n" - "maximum no. of prefix limit\n") -ALIAS (no_neighbor_maximum_prefix, - no_neighbor_maximum_prefix_threshold_cmd, - NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> <1-100>", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Maximum number of prefix accept from this peer\n" - "maximum no. of prefix limit\n" - "Threshold value (%) at which to generate a warning msg\n") -ALIAS (no_neighbor_maximum_prefix, - no_neighbor_maximum_prefix_warning_cmd, - NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> warning-only", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Maximum number of prefix accept from this peer\n" - "maximum no. of prefix limit\n" - "Only give warning message when limit is exceeded\n") -ALIAS (no_neighbor_maximum_prefix, - no_neighbor_maximum_prefix_threshold_warning_cmd, - NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> <1-100> warning-only", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Maximum number of prefix accept from this peer\n" - "maximum no. of prefix limit\n" - "Threshold value (%) at which to generate a warning msg\n" - "Only give warning message when limit is exceeded\n") -ALIAS (no_neighbor_maximum_prefix, - no_neighbor_maximum_prefix_restart_cmd, - NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> restart <1-65535>", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Maximum number of prefix accept from this peer\n" - "maximum no. of prefix limit\n" - "Restart bgp connection after limit is exceeded\n" - "Restart interval in minutes") -ALIAS (no_neighbor_maximum_prefix, - no_neighbor_maximum_prefix_threshold_restart_cmd, - NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> <1-100> restart <1-65535>", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Maximum number of prefix accept from this peer\n" - "maximum no. of prefix limit\n" - "Threshold value (%) at which to generate a warning msg\n" - "Restart bgp connection after limit is exceeded\n" - "Restart interval in minutes") /* "neighbor allowas-in" */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * NEIGHBOR_CMD2 "allowas-in <1-10>", + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "Accept as-path with my AS present in it\n" + * "Number of occurances of AS number\n" + * + */ DEFUN (neighbor_allowas_in, neighbor_allowas_in_cmd, NEIGHBOR_CMD2 "allowas-in", @@ -5875,14 +5938,17 @@ DEFUN (neighbor_allowas_in, return bgp_vty_return (vty, ret); } -ALIAS (neighbor_allowas_in, - neighbor_allowas_in_arg_cmd, - NEIGHBOR_CMD2 "allowas-in <1-10>", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Accept as-path with my AS present in it\n" - "Number of occurances of AS number\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * NO_NEIGHBOR_CMD2 "allowas-in <1-10>", + * NO_STR + * NEIGHBOR_STR + * NEIGHBOR_ADDR_STR2 + * "allow local ASN appears in aspath attribute\n" + * "Number of occurances of AS number\n" + * + */ DEFUN (no_neighbor_allowas_in, no_neighbor_allowas_in_cmd, NO_NEIGHBOR_CMD2 "allowas-in", @@ -5903,14 +5969,6 @@ DEFUN (no_neighbor_allowas_in, return bgp_vty_return (vty, ret); } -ALIAS (no_neighbor_allowas_in, - no_neighbor_allowas_in_val_cmd, - NO_NEIGHBOR_CMD2 "allowas-in <1-10>", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "allow local ASN appears in aspath attribute\n" - "Number of occurances of AS number\n") DEFUN (neighbor_ttl_security, neighbor_ttl_security_cmd, @@ -6074,6 +6132,14 @@ DEFUN (address_family_ipv6_safi, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "address-family vpnv4 unicast", + * "Enter Address Family command mode\n" + * "Address family\n" + * "Address Family Modifier\n" + * + */ DEFUN (address_family_vpnv4, address_family_vpnv4_cmd, "address-family vpnv4", @@ -6084,13 +6150,15 @@ DEFUN (address_family_vpnv4, return CMD_SUCCESS; } -ALIAS (address_family_vpnv4, - address_family_vpnv4_unicast_cmd, - "address-family vpnv4 unicast", - "Enter Address Family command mode\n" - "Address family\n" - "Address Family Modifier\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "address-family vpnv6 unicast", + * "Enter Address Family command mode\n" + * "Address family\n" + * "Address Family Modifier\n" + * + */ DEFUN (address_family_vpnv6, address_family_vpnv6_cmd, "address-family vpnv6", @@ -6101,13 +6169,14 @@ DEFUN (address_family_vpnv6, return CMD_SUCCESS; } -ALIAS (address_family_vpnv6, - address_family_vpnv6_unicast_cmd, - "address-family vpnv6 unicast", - "Enter Address Family command mode\n" - "Address family\n" - "Address Family Modifier\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "address-family encapv4", + * "Enter Address Family command mode\n" + * "Address family\n" + * + */ DEFUN (address_family_encap, address_family_encap_cmd, "address-family encap", @@ -6118,11 +6187,6 @@ DEFUN (address_family_encap, return CMD_SUCCESS; } -ALIAS (address_family_encap, - address_family_encapv4_cmd, - "address-family encapv4", - "Enter Address Family command mode\n" - "Address family\n") DEFUN (address_family_encapv6, address_family_encapv6_cmd, @@ -6232,6 +6296,40 @@ bgp_clear_prefix (struct vty *vty, const char *view_name, const char *ip_str, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear bgp *", + * CLEAR_STR + * BGP_STR + * "Clear all peers\n" + * + * "clear bgp " BGP_INSTANCE_CMD " ipv6 *", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Clear all peers\n" + * + * "clear ip bgp " BGP_INSTANCE_CMD " *", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all peers\n" + * + * "clear bgp ipv6 *", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "Clear all peers\n" + * + * "clear bgp " BGP_INSTANCE_CMD " *", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all peers\n" + * + */ DEFUN (clear_ip_bgp_all, clear_ip_bgp_all_cmd, "clear ip bgp *", @@ -6243,49 +6341,57 @@ DEFUN (clear_ip_bgp_all, return bgp_clear_vty (vty, argv[4]->arg, 0, 0, clear_all, BGP_CLEAR_SOFT_NONE, NULL); } -ALIAS (clear_ip_bgp_all, - clear_ip_bgp_instance_all_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " *", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all peers\n") -ALIAS (clear_ip_bgp_all, - clear_bgp_all_cmd, - "clear bgp *", - CLEAR_STR - BGP_STR - "Clear all peers\n") -ALIAS (clear_ip_bgp_all, - clear_bgp_instance_all_cmd, - "clear bgp " BGP_INSTANCE_CMD " *", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all peers\n") -ALIAS (clear_ip_bgp_all, - clear_bgp_ipv6_all_cmd, - "clear bgp ipv6 *", - CLEAR_STR - BGP_STR - "Address family\n" - "Clear all peers\n") -ALIAS (clear_ip_bgp_all, - clear_bgp_instance_ipv6_all_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 *", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Clear all peers\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear bgp " BGP_INSTANCE_CMD " (A.B.C.D|X:X::X:X|WORD)", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "BGP neighbor IP address to clear\n" + * "BGP IPv6 neighbor to clear\n" + * "BGP neighbor on interface to clear\n" + * + * "clear bgp ipv6 (A.B.C.D|X:X::X:X|WORD)", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "BGP neighbor address to clear\n" + * "BGP IPv6 neighbor to clear\n" + * "BGP neighbor on interface to clear\n" + * + * "clear bgp " BGP_INSTANCE_CMD " ipv6 (A.B.C.D|X:X::X:X|WORD)", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "BGP neighbor IP address to clear\n" + * "BGP IPv6 neighbor to clear\n" + * "BGP neighbor on interface to clear\n" + * + * "clear bgp (A.B.C.D|X:X::X:X|WORD)", + * CLEAR_STR + * BGP_STR + * "BGP neighbor address to clear\n" + * "BGP IPv6 neighbor to clear\n" + * "BGP neighbor on interface to clear\n" + * + * "clear ip bgp " BGP_INSTANCE_CMD " (A.B.C.D|X:X::X:X|WORD)", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "BGP neighbor IP address to clear\n" + * "BGP IPv6 neighbor to clear\n" + * "BGP neighbor on interface to clear\n" + * + */ DEFUN (clear_ip_bgp_peer, - clear_ip_bgp_peer_cmd, + clear_ip_bgp_peer_cmd, "clear ip bgp (A.B.C.D|X:X::X:X|WORD)", CLEAR_STR IP_STR @@ -6300,59 +6406,52 @@ DEFUN (clear_ip_bgp_peer, return bgp_clear_vty (vty, NULL, 0, 0, clear_peer, BGP_CLEAR_SOFT_NONE, argv[3]->arg); } -ALIAS (clear_ip_bgp_peer, - clear_ip_bgp_instance_peer_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " (A.B.C.D|X:X::X:X|WORD)", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "BGP neighbor IP address to clear\n" - "BGP IPv6 neighbor to clear\n" - "BGP neighbor on interface to clear\n") -ALIAS (clear_ip_bgp_peer, - clear_bgp_peer_cmd, - "clear bgp (A.B.C.D|X:X::X:X|WORD)", - CLEAR_STR - BGP_STR - "BGP neighbor address to clear\n" - "BGP IPv6 neighbor to clear\n" - "BGP neighbor on interface to clear\n") -ALIAS (clear_ip_bgp_peer, - clear_bgp_instance_peer_cmd, - "clear bgp " BGP_INSTANCE_CMD " (A.B.C.D|X:X::X:X|WORD)", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "BGP neighbor IP address to clear\n" - "BGP IPv6 neighbor to clear\n" - "BGP neighbor on interface to clear\n") -ALIAS (clear_ip_bgp_peer, - clear_bgp_ipv6_peer_cmd, - "clear bgp ipv6 (A.B.C.D|X:X::X:X|WORD)", - CLEAR_STR - BGP_STR - "Address family\n" - "BGP neighbor address to clear\n" - "BGP IPv6 neighbor to clear\n" - "BGP neighbor on interface to clear\n") -ALIAS (clear_ip_bgp_peer, - clear_bgp_instance_ipv6_peer_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 (A.B.C.D|X:X::X:X|WORD)", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "BGP neighbor IP address to clear\n" - "BGP IPv6 neighbor to clear\n" - "BGP neighbor on interface to clear\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear bgp peer-group WORD", + * CLEAR_STR + * BGP_STR + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * + * "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * + * "clear bgp " BGP_INSTANCE_CMD " ipv6 peer-group WORD", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * + * "clear bgp " BGP_INSTANCE_CMD " peer-group WORD", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * + * "clear bgp ipv6 peer-group WORD", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * + */ DEFUN (clear_ip_bgp_peer_group, - clear_ip_bgp_peer_group_cmd, + clear_ip_bgp_peer_group_cmd, "clear ip bgp peer-group WORD", CLEAR_STR IP_STR @@ -6366,52 +6465,45 @@ DEFUN (clear_ip_bgp_peer_group, return bgp_clear_vty (vty, NULL, 0, 0, clear_group, BGP_CLEAR_SOFT_NONE, argv[4]->arg); } -ALIAS (clear_ip_bgp_peer_group, - clear_ip_bgp_instance_peer_group_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all members of peer-group\n" - "BGP peer-group name\n") -ALIAS (clear_ip_bgp_peer_group, - clear_bgp_peer_group_cmd, - "clear bgp peer-group WORD", - CLEAR_STR - BGP_STR - "Clear all members of peer-group\n" - "BGP peer-group name\n") -ALIAS (clear_ip_bgp_peer_group, - clear_bgp_instance_peer_group_cmd, - "clear bgp " BGP_INSTANCE_CMD " peer-group WORD", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all members of peer-group\n" - "BGP peer-group name\n") -ALIAS (clear_ip_bgp_peer_group, - clear_bgp_ipv6_peer_group_cmd, - "clear bgp ipv6 peer-group WORD", - CLEAR_STR - BGP_STR - "Address family\n" - "Clear all members of peer-group\n" - "BGP peer-group name\n") -ALIAS (clear_ip_bgp_peer_group, - clear_bgp_instance_ipv6_peer_group_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 peer-group WORD", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Clear all members of peer-group\n" - "BGP peer-group name\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear bgp " BGP_INSTANCE_CMD " ipv6 external", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Clear all external peers\n" + * + * "clear bgp " BGP_INSTANCE_CMD " external", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all external peers\n" + * + * "clear bgp external", + * CLEAR_STR + * BGP_STR + * "Clear all external peers\n" + * + * "clear bgp ipv6 external", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "Clear all external peers\n" + * + * "clear ip bgp " BGP_INSTANCE_CMD " external", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all external peers\n" + * + */ DEFUN (clear_ip_bgp_external, clear_ip_bgp_external_cmd, "clear ip bgp external", @@ -6426,47 +6518,35 @@ DEFUN (clear_ip_bgp_external, return bgp_clear_vty (vty, NULL, 0, 0, clear_external, BGP_CLEAR_SOFT_NONE, NULL); } -ALIAS (clear_ip_bgp_external, - clear_ip_bgp_instance_external_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " external", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all external peers\n") -ALIAS (clear_ip_bgp_external, - clear_bgp_external_cmd, - "clear bgp external", - CLEAR_STR - BGP_STR - "Clear all external peers\n") -ALIAS (clear_ip_bgp_external, - clear_bgp_instance_external_cmd, - "clear bgp " BGP_INSTANCE_CMD " external", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all external peers\n") -ALIAS (clear_ip_bgp_external, - clear_bgp_ipv6_external_cmd, - "clear bgp ipv6 external", - CLEAR_STR - BGP_STR - "Address family\n" - "Clear all external peers\n") -ALIAS (clear_ip_bgp_external, - clear_bgp_instance_ipv6_external_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 external", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Clear all external peers\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear bgp " BGP_INSTANCE_CMD " prefix A.B.C.D/M", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear bestpath and re-advertise\n" + * "IP prefix /, e.g., 35.0.0.0/8\n" + * + * "clear ip bgp " BGP_INSTANCE_CMD " prefix A.B.C.D/M", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear bestpath and re-advertise\n" + * "IP prefix /, e.g., 35.0.0.0/8\n" + * + * "clear bgp prefix A.B.C.D/M", + * CLEAR_STR + * BGP_STR + * "Clear bestpath and re-advertise\n" + * "IP prefix /, e.g., 35.0.0.0/8\n" + * + */ DEFUN (clear_ip_bgp_prefix, clear_ip_bgp_prefix_cmd, "clear ip bgp prefix A.B.C.D/M", @@ -6482,33 +6562,43 @@ DEFUN (clear_ip_bgp_prefix, return bgp_clear_prefix (vty, NULL, argv[4]->arg, AFI_IP, SAFI_UNICAST, NULL); } -ALIAS (clear_ip_bgp_prefix, - clear_ip_bgp_instance_prefix_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " prefix A.B.C.D/M", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear bestpath and re-advertise\n" - "IP prefix /, e.g., 35.0.0.0/8\n") -ALIAS (clear_ip_bgp_prefix, - clear_bgp_prefix_cmd, - "clear bgp prefix A.B.C.D/M", - CLEAR_STR - BGP_STR - "Clear bestpath and re-advertise\n" - "IP prefix /, e.g., 35.0.0.0/8\n") -ALIAS (clear_ip_bgp_prefix, - clear_bgp_instance_prefix_cmd, - "clear bgp " BGP_INSTANCE_CMD " prefix A.B.C.D/M", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear bestpath and re-advertise\n" - "IP prefix /, e.g., 35.0.0.0/8\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE, + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear peers with the AS number\n" + * + * "clear bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE, + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear peers with the AS number\n" + * + * "clear bgp ipv6 " CMD_AS_RANGE, + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "Clear peers with the AS number\n" + * + * "clear bgp " BGP_INSTANCE_CMD " ipv6 " CMD_AS_RANGE, + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Clear peers with the AS number\n" + * + * "clear bgp " CMD_AS_RANGE, + * CLEAR_STR + * BGP_STR + * "Clear peers with the AS number\n" + * + */ DEFUN (clear_ip_bgp_as, clear_ip_bgp_as_cmd, "clear ip bgp " CMD_AS_RANGE, @@ -6523,48 +6613,39 @@ DEFUN (clear_ip_bgp_as, return bgp_clear_vty (vty, NULL, 0, 0, clear_as, BGP_CLEAR_SOFT_NONE, argv[3]->arg); } -ALIAS (clear_ip_bgp_as, - clear_ip_bgp_instance_as_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE, - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear peers with the AS number\n") -ALIAS (clear_ip_bgp_as, - clear_bgp_as_cmd, - "clear bgp " CMD_AS_RANGE, - CLEAR_STR - BGP_STR - "Clear peers with the AS number\n") -ALIAS (clear_ip_bgp_as, - clear_bgp_instance_as_cmd, - "clear bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE, - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear peers with the AS number\n") -ALIAS (clear_ip_bgp_as, - clear_bgp_ipv6_as_cmd, - "clear bgp ipv6 " CMD_AS_RANGE, - CLEAR_STR - BGP_STR - "Address family\n" - "Clear peers with the AS number\n") -ALIAS (clear_ip_bgp_as, - clear_bgp_instance_ipv6_as_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 " CMD_AS_RANGE, - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Clear peers with the AS number\n") /* Outbound soft-reconfiguration */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " BGP_INSTANCE_CMD " * out", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all peers\n" + * BGP_SOFT_OUT_STR + * + * "clear ip bgp " BGP_INSTANCE_CMD " * soft out", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all peers\n" + * BGP_SOFT_STR + * BGP_SOFT_OUT_STR + * + * "clear ip bgp * out", + * CLEAR_STR + * IP_STR + * BGP_STR + * "Clear all peers\n" + * BGP_SOFT_OUT_STR + * + */ DEFUN (clear_ip_bgp_all_soft_out, clear_ip_bgp_all_soft_out_cmd, "clear ip bgp * soft out", @@ -6583,36 +6664,22 @@ DEFUN (clear_ip_bgp_all_soft_out, BGP_CLEAR_SOFT_OUT, NULL); } -ALIAS (clear_ip_bgp_all_soft_out, - clear_ip_bgp_instance_all_soft_out_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " * soft out", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all peers\n" - BGP_SOFT_STR - BGP_SOFT_OUT_STR) -ALIAS (clear_ip_bgp_all_soft_out, - clear_ip_bgp_all_out_cmd, - "clear ip bgp * out", - CLEAR_STR - IP_STR - BGP_STR - "Clear all peers\n" - BGP_SOFT_OUT_STR) -ALIAS (clear_ip_bgp_all_soft_out, - clear_ip_bgp_instance_all_out_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " * out", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all peers\n" - BGP_SOFT_OUT_STR) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp * ipv4 (unicast|multicast) out", + * CLEAR_STR + * IP_STR + * BGP_STR + * "Clear all peers\n" + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * BGP_SOFT_OUT_STR + * + */ DEFUN (clear_ip_bgp_all_ipv4_soft_out, clear_ip_bgp_all_ipv4_soft_out_cmd, "clear ip bgp * ipv4 (unicast|multicast) soft out", @@ -6634,6 +6701,20 @@ DEFUN (clear_ip_bgp_all_ipv4_soft_out, BGP_CLEAR_SOFT_OUT, NULL); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " BGP_INSTANCE_CMD " * ipv4 (unicast|multicast) out", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all peers\n" + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * BGP_SOFT_OUT_STR + * + */ DEFUN (clear_ip_bgp_instance_all_ipv4_soft_out, clear_ip_bgp_instance_all_ipv4_soft_out_cmd, "clear ip bgp " BGP_INSTANCE_CMD " * ipv4 (unicast|multicast) soft out", @@ -6655,31 +6736,20 @@ DEFUN (clear_ip_bgp_instance_all_ipv4_soft_out, BGP_CLEAR_SOFT_OUT, NULL); } -ALIAS (clear_ip_bgp_all_ipv4_soft_out, - clear_ip_bgp_all_ipv4_out_cmd, - "clear ip bgp * ipv4 (unicast|multicast) out", - CLEAR_STR - IP_STR - BGP_STR - "Clear all peers\n" - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - BGP_SOFT_OUT_STR) -ALIAS (clear_ip_bgp_instance_all_ipv4_soft_out, - clear_ip_bgp_instance_all_ipv4_out_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " * ipv4 (unicast|multicast) out", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all peers\n" - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - BGP_SOFT_OUT_STR) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp * vpnv4 unicast out", + * CLEAR_STR + * IP_STR + * BGP_STR + * "Clear all peers\n" + * "Address family\n" + * "Address Family Modifier\n" + * BGP_SOFT_OUT_STR + * + */ DEFUN (clear_ip_bgp_all_vpnv4_soft_out, clear_ip_bgp_all_vpnv4_soft_out_cmd, "clear ip bgp * vpnv4 unicast soft out", @@ -6696,17 +6766,19 @@ DEFUN (clear_ip_bgp_all_vpnv4_soft_out, BGP_CLEAR_SOFT_OUT, NULL); } -ALIAS (clear_ip_bgp_all_vpnv4_soft_out, - clear_ip_bgp_all_vpnv4_out_cmd, - "clear ip bgp * vpnv4 unicast out", - CLEAR_STR - IP_STR - BGP_STR - "Clear all peers\n" - "Address family\n" - "Address Family Modifier\n" - BGP_SOFT_OUT_STR) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp * encap unicast out", + * CLEAR_STR + * IP_STR + * BGP_STR + * "Clear all peers\n" + * "Address family\n" + * "Address Family Modifier\n" + * "Soft reconfig outbound update\n" + * + */ DEFUN (clear_ip_bgp_all_encap_soft_out, clear_ip_bgp_all_encap_soft_out_cmd, "clear ip bgp * encap unicast soft out", @@ -6723,17 +6795,63 @@ DEFUN (clear_ip_bgp_all_encap_soft_out, BGP_CLEAR_SOFT_OUT, NULL); } -ALIAS (clear_ip_bgp_all_encap_soft_out, - clear_ip_bgp_all_encap_out_cmd, - "clear ip bgp * encap unicast out", - CLEAR_STR - IP_STR - BGP_STR - "Clear all peers\n" - "Address family\n" - "Address Family Modifier\n" - "Soft reconfig outbound update\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear bgp " BGP_INSTANCE_CMD " ipv6 * soft out", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Clear all peers\n" + * BGP_SOFT_STR + * BGP_SOFT_OUT_STR + * + * "clear bgp ipv6 * soft out", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "Clear all peers\n" + * BGP_SOFT_STR + * BGP_SOFT_OUT_STR + * + * "clear bgp " BGP_INSTANCE_CMD " * soft out", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all peers\n" + * BGP_SOFT_STR + * BGP_SOFT_OUT_STR + * + * "clear bgp ipv6 * out", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "Clear all peers\n" + * BGP_SOFT_OUT_STR + * + * "clear bgp * out", + * CLEAR_STR + * BGP_STR + * "Clear all peers\n" + * BGP_SOFT_OUT_STR + * + * "clear bgp " BGP_INSTANCE_CMD " * out", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all peers\n" + * BGP_SOFT_OUT_STR + * + * "clear bgp " BGP_INSTANCE_CMD " ipv6 * out", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Clear all peers\n" + * BGP_SOFT_OUT_STR + * + */ DEFUN (clear_bgp_all_soft_out, clear_bgp_all_soft_out_cmd, "clear bgp * soft out", @@ -6751,72 +6869,12 @@ DEFUN (clear_bgp_all_soft_out, BGP_CLEAR_SOFT_OUT, NULL); } -ALIAS (clear_bgp_all_soft_out, - clear_bgp_instance_all_soft_out_cmd, - "clear bgp " BGP_INSTANCE_CMD " * soft out", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all peers\n" - BGP_SOFT_STR - BGP_SOFT_OUT_STR) -ALIAS (clear_bgp_all_soft_out, - clear_bgp_all_out_cmd, - "clear bgp * out", - CLEAR_STR - BGP_STR - "Clear all peers\n" - BGP_SOFT_OUT_STR) -ALIAS (clear_bgp_all_soft_out, - clear_bgp_instance_all_out_cmd, - "clear bgp " BGP_INSTANCE_CMD " * out", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all peers\n" - BGP_SOFT_OUT_STR) -ALIAS (clear_bgp_all_soft_out, - clear_bgp_ipv6_all_soft_out_cmd, - "clear bgp ipv6 * soft out", - CLEAR_STR - BGP_STR - "Address family\n" - "Clear all peers\n" - BGP_SOFT_STR - BGP_SOFT_OUT_STR) -ALIAS (clear_bgp_all_soft_out, - clear_bgp_instance_ipv6_all_soft_out_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 * soft out", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Clear all peers\n" - BGP_SOFT_STR - BGP_SOFT_OUT_STR) -ALIAS (clear_bgp_all_soft_out, - clear_bgp_ipv6_all_out_cmd, - "clear bgp ipv6 * out", - CLEAR_STR - BGP_STR - "Address family\n" - "Clear all peers\n" - BGP_SOFT_OUT_STR) -ALIAS (clear_bgp_all_soft_out, - clear_bgp_instance_ipv6_all_out_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 * out", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Clear all peers\n" - BGP_SOFT_OUT_STR) DEFUN (clear_bgp_ipv6_safi_prefix, clear_bgp_ipv6_safi_prefix_cmd, @@ -6851,6 +6909,36 @@ DEFUN (clear_bgp_instance_ipv6_safi_prefix, return bgp_clear_prefix (vty, argv[3]->arg, argv[7]->arg, AFI_IP6, SAFI_UNICAST, NULL); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " BGP_INSTANCE_CMD " (A.B.C.D|WORD) soft out", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "BGP neighbor address to clear\n" + * "BGP neighbor on interface to clear\n" + * BGP_SOFT_STR + * BGP_SOFT_OUT_STR + * + * "clear ip bgp (A.B.C.D|WORD) out", + * CLEAR_STR + * IP_STR + * BGP_STR + * "BGP neighbor address to clear\n" + * "BGP neighbor on interface to clear\n" + * BGP_SOFT_OUT_STR + * + * "clear ip bgp " BGP_INSTANCE_CMD " (A.B.C.D|WORD) out", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "BGP neighbor address to clear\n" + * "BGP neighbor on interface to clear\n" + * BGP_SOFT_OUT_STR + * + */ DEFUN (clear_ip_bgp_peer_soft_out, clear_ip_bgp_peer_soft_out_cmd, "clear ip bgp (A.B.C.D|WORD) soft out", @@ -6870,39 +6958,23 @@ DEFUN (clear_ip_bgp_peer_soft_out, BGP_CLEAR_SOFT_OUT, argv[3]->arg); } -ALIAS (clear_ip_bgp_peer_soft_out, - clear_ip_bgp_instance_peer_soft_out_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " (A.B.C.D|WORD) soft out", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "BGP neighbor address to clear\n" - "BGP neighbor on interface to clear\n" - BGP_SOFT_STR - BGP_SOFT_OUT_STR) -ALIAS (clear_ip_bgp_peer_soft_out, - clear_ip_bgp_peer_out_cmd, - "clear ip bgp (A.B.C.D|WORD) out", - CLEAR_STR - IP_STR - BGP_STR - "BGP neighbor address to clear\n" - "BGP neighbor on interface to clear\n" - BGP_SOFT_OUT_STR) -ALIAS (clear_ip_bgp_peer_soft_out, - clear_ip_bgp_instance_peer_out_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " (A.B.C.D|WORD) out", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "BGP neighbor address to clear\n" - "BGP neighbor on interface to clear\n" - BGP_SOFT_OUT_STR) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp (A.B.C.D|WORD) ipv4 (unicast|multicast) out", + * CLEAR_STR + * IP_STR + * BGP_STR + * "BGP neighbor address to clear\n" + * "BGP neighbor on interface to clear\n" + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * BGP_SOFT_OUT_STR + * + */ DEFUN (clear_ip_bgp_peer_ipv4_soft_out, clear_ip_bgp_peer_ipv4_soft_out_cmd, "clear ip bgp (A.B.C.D|WORD) ipv4 (unicast|multicast) soft out", @@ -6925,6 +6997,21 @@ DEFUN (clear_ip_bgp_peer_ipv4_soft_out, BGP_CLEAR_SOFT_OUT, argv[3]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " BGP_INSTANCE_CMD " (A.B.C.D|WORD) ipv4 (unicast|multicast) out", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "BGP neighbor address to clear\n" + * "BGP neighbor on interface to clear\n" + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * BGP_SOFT_OUT_STR + * + */ DEFUN (clear_ip_bgp_instance_peer_ipv4_soft_out, clear_ip_bgp_instance_peer_ipv4_soft_out_cmd, "clear ip bgp " BGP_INSTANCE_CMD " (A.B.C.D|WORD) ipv4 (unicast|multicast) soft out", @@ -6948,34 +7035,22 @@ DEFUN (clear_ip_bgp_instance_peer_ipv4_soft_out, BGP_CLEAR_SOFT_OUT, argv[5]->arg); } -ALIAS (clear_ip_bgp_peer_ipv4_soft_out, - clear_ip_bgp_peer_ipv4_out_cmd, - "clear ip bgp (A.B.C.D|WORD) ipv4 (unicast|multicast) out", - CLEAR_STR - IP_STR - BGP_STR - "BGP neighbor address to clear\n" - "BGP neighbor on interface to clear\n" - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - BGP_SOFT_OUT_STR) -ALIAS (clear_ip_bgp_instance_peer_ipv4_soft_out, - clear_ip_bgp_instance_peer_ipv4_out_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " (A.B.C.D|WORD) ipv4 (unicast|multicast) out", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "BGP neighbor address to clear\n" - "BGP neighbor on interface to clear\n" - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - BGP_SOFT_OUT_STR) /* NOTE: WORD peers have not been tested for vpnv4 */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp (A.B.C.D|WORD) vpnv4 unicast out", + * CLEAR_STR + * IP_STR + * BGP_STR + * "BGP neighbor address to clear\n" + * "BGP neighbor on interface to clear\n" + * "Address family\n" + * "Address Family Modifier\n" + * BGP_SOFT_OUT_STR + * + */ DEFUN (clear_ip_bgp_peer_vpnv4_soft_out, clear_ip_bgp_peer_vpnv4_soft_out_cmd, "clear ip bgp (A.B.C.D|WORD) vpnv4 unicast soft out", @@ -6993,18 +7068,19 @@ DEFUN (clear_ip_bgp_peer_vpnv4_soft_out, BGP_CLEAR_SOFT_OUT, argv[3]->arg); } -ALIAS (clear_ip_bgp_peer_vpnv4_soft_out, - clear_ip_bgp_peer_vpnv4_out_cmd, - "clear ip bgp (A.B.C.D|WORD) vpnv4 unicast out", - CLEAR_STR - IP_STR - BGP_STR - "BGP neighbor address to clear\n" - "BGP neighbor on interface to clear\n" - "Address family\n" - "Address Family Modifier\n" - BGP_SOFT_OUT_STR) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp A.B.C.D encap unicast out", + * CLEAR_STR + * IP_STR + * BGP_STR + * "BGP neighbor address to clear\n" + * "Address family\n" + * "Address Family Modifier\n" + * "Soft reconfig outbound update\n" + * + */ DEFUN (clear_ip_bgp_peer_encap_soft_out, clear_ip_bgp_peer_encap_soft_out_cmd, "clear ip bgp A.B.C.D encap unicast soft out", @@ -7021,17 +7097,77 @@ DEFUN (clear_ip_bgp_peer_encap_soft_out, BGP_CLEAR_SOFT_OUT, argv[3]->arg); } -ALIAS (clear_ip_bgp_peer_encap_soft_out, - clear_ip_bgp_peer_encap_out_cmd, - "clear ip bgp A.B.C.D encap unicast out", - CLEAR_STR - IP_STR - BGP_STR - "BGP neighbor address to clear\n" - "Address family\n" - "Address Family Modifier\n" - "Soft reconfig outbound update\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear bgp " BGP_INSTANCE_CMD " ipv6 (A.B.C.D|X:X::X:X|WORD) soft out", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "BGP neighbor address to clear\n" + * "BGP IPv6 neighbor to clear\n" + * "BGP neighbor on interface to clear\n" + * BGP_SOFT_STR + * BGP_SOFT_OUT_STR + * + * "clear bgp ipv6 (A.B.C.D|X:X::X:X|WORD) out", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "BGP neighbor address to clear\n" + * "BGP IPv6 neighbor to clear\n" + * "BGP neighbor on interface to clear\n" + * BGP_SOFT_OUT_STR + * + * "clear bgp " BGP_INSTANCE_CMD " (A.B.C.D|X:X::X:X|WORD) soft out", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "BGP neighbor address to clear\n" + * "BGP IPv6 neighbor to clear\n" + * "BGP neighbor on interface to clear\n" + * BGP_SOFT_STR + * BGP_SOFT_OUT_STR + * + * "clear bgp ipv6 (A.B.C.D|X:X::X:X|WORD) soft out", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "BGP neighbor address to clear\n" + * "BGP IPv6 neighbor to clear\n" + * "BGP neighbor on interface to clear\n" + * BGP_SOFT_STR + * BGP_SOFT_OUT_STR + * + * "clear bgp " BGP_INSTANCE_CMD " ipv6 (A.B.C.D|X:X::X:X|WORD) out", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "BGP neighbor address to clear\n" + * "BGP IPv6 neighbor to clear\n" + * "BGP neighbor on interface to clear\n" + * BGP_SOFT_OUT_STR + * + * "clear bgp (A.B.C.D|X:X::X:X|WORD) out", + * CLEAR_STR + * BGP_STR + * "BGP neighbor address to clear\n" + * "BGP IPv6 neighbor to clear\n" + * "BGP neighbor on interface to clear\n" + * BGP_SOFT_OUT_STR + * + * "clear bgp " BGP_INSTANCE_CMD " (A.B.C.D|X:X::X:X|WORD) out", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "BGP neighbor address to clear\n" + * "BGP IPv6 neighbor to clear\n" + * "BGP neighbor on interface to clear\n" + * BGP_SOFT_OUT_STR + * + */ DEFUN (clear_bgp_peer_soft_out, clear_bgp_peer_soft_out_cmd, "clear bgp (A.B.C.D|X:X::X:X|WORD) soft out", @@ -7051,139 +7187,79 @@ DEFUN (clear_bgp_peer_soft_out, BGP_CLEAR_SOFT_OUT, argv[2]->arg); } -ALIAS (clear_bgp_peer_soft_out, - clear_bgp_instance_peer_soft_out_cmd, - "clear bgp " BGP_INSTANCE_CMD " (A.B.C.D|X:X::X:X|WORD) soft out", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "BGP neighbor address to clear\n" - "BGP IPv6 neighbor to clear\n" - "BGP neighbor on interface to clear\n" - BGP_SOFT_STR - BGP_SOFT_OUT_STR) -ALIAS (clear_bgp_peer_soft_out, - clear_bgp_ipv6_peer_soft_out_cmd, - "clear bgp ipv6 (A.B.C.D|X:X::X:X|WORD) soft out", + + + + + + +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp peer-group WORD out", + * CLEAR_STR + * IP_STR + * BGP_STR + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * BGP_SOFT_OUT_STR + * + * "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD soft out", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * BGP_SOFT_STR + * BGP_SOFT_OUT_STR + * + * "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD out", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * BGP_SOFT_OUT_STR + * + */ +DEFUN (clear_ip_bgp_peer_group_soft_out, + clear_ip_bgp_peer_group_soft_out_cmd, + "clear ip bgp peer-group WORD soft out", CLEAR_STR + IP_STR BGP_STR - "Address family\n" - "BGP neighbor address to clear\n" - "BGP IPv6 neighbor to clear\n" - "BGP neighbor on interface to clear\n" + "Clear all members of peer-group\n" + "BGP peer-group name\n" BGP_SOFT_STR BGP_SOFT_OUT_STR) - -ALIAS (clear_bgp_peer_soft_out, - clear_bgp_instance_ipv6_peer_soft_out_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 (A.B.C.D|X:X::X:X|WORD) soft out", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "BGP neighbor address to clear\n" - "BGP IPv6 neighbor to clear\n" - "BGP neighbor on interface to clear\n" - BGP_SOFT_STR - BGP_SOFT_OUT_STR) - -ALIAS (clear_bgp_peer_soft_out, - clear_bgp_peer_out_cmd, - "clear bgp (A.B.C.D|X:X::X:X|WORD) out", - CLEAR_STR - BGP_STR - "BGP neighbor address to clear\n" - "BGP IPv6 neighbor to clear\n" - "BGP neighbor on interface to clear\n" - BGP_SOFT_OUT_STR) - -ALIAS (clear_bgp_peer_soft_out, - clear_bgp_instance_peer_out_cmd, - "clear bgp " BGP_INSTANCE_CMD " (A.B.C.D|X:X::X:X|WORD) out", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "BGP neighbor address to clear\n" - "BGP IPv6 neighbor to clear\n" - "BGP neighbor on interface to clear\n" - BGP_SOFT_OUT_STR) - -ALIAS (clear_bgp_peer_soft_out, - clear_bgp_ipv6_peer_out_cmd, - "clear bgp ipv6 (A.B.C.D|X:X::X:X|WORD) out", - CLEAR_STR - BGP_STR - "Address family\n" - "BGP neighbor address to clear\n" - "BGP IPv6 neighbor to clear\n" - "BGP neighbor on interface to clear\n" - BGP_SOFT_OUT_STR) - -ALIAS (clear_bgp_peer_soft_out, - clear_bgp_instance_ipv6_peer_out_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 (A.B.C.D|X:X::X:X|WORD) out", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "BGP neighbor address to clear\n" - "BGP IPv6 neighbor to clear\n" - "BGP neighbor on interface to clear\n" - BGP_SOFT_OUT_STR) - -DEFUN (clear_ip_bgp_peer_group_soft_out, - clear_ip_bgp_peer_group_soft_out_cmd, - "clear ip bgp peer-group WORD soft out", - CLEAR_STR - IP_STR - BGP_STR - "Clear all members of peer-group\n" - "BGP peer-group name\n" - BGP_SOFT_STR - BGP_SOFT_OUT_STR) -{ - if (argc == 3) - return bgp_clear_vty (vty, argv[1], AFI_IP, SAFI_UNICAST, clear_group, - BGP_CLEAR_SOFT_OUT, argv[2]); +{ + if (argc == 3) + return bgp_clear_vty (vty, argv[1], AFI_IP, SAFI_UNICAST, clear_group, + BGP_CLEAR_SOFT_OUT, argv[2]); return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_group, BGP_CLEAR_SOFT_OUT, argv[4]->arg); } -ALIAS (clear_ip_bgp_peer_group_soft_out, - clear_ip_bgp_instance_peer_group_soft_out_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD soft out", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all members of peer-group\n" - "BGP peer-group name\n" - BGP_SOFT_STR - BGP_SOFT_OUT_STR) -ALIAS (clear_ip_bgp_peer_group_soft_out, - clear_ip_bgp_peer_group_out_cmd, - "clear ip bgp peer-group WORD out", - CLEAR_STR - IP_STR - BGP_STR - "Clear all members of peer-group\n" - "BGP peer-group name\n" - BGP_SOFT_OUT_STR) -ALIAS (clear_ip_bgp_peer_group_soft_out, - clear_ip_bgp_instance_peer_group_out_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD out", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all members of peer-group\n" - "BGP peer-group name\n" - BGP_SOFT_OUT_STR) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp peer-group WORD ipv4 (unicast|multicast) out", + * CLEAR_STR + * IP_STR + * BGP_STR + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * BGP_SOFT_OUT_STR + * + */ DEFUN (clear_ip_bgp_peer_group_ipv4_soft_out, clear_ip_bgp_peer_group_ipv4_soft_out_cmd, "clear ip bgp peer-group WORD ipv4 (unicast|multicast) soft out", @@ -7206,6 +7282,21 @@ DEFUN (clear_ip_bgp_peer_group_ipv4_soft_out, BGP_CLEAR_SOFT_OUT, argv[4]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD ipv4 (unicast|multicast) out", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * BGP_SOFT_OUT_STR + * + */ DEFUN (clear_ip_bgp_instance_peer_group_ipv4_soft_out, clear_ip_bgp_instance_peer_group_ipv4_soft_out_cmd, "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD ipv4 (unicast|multicast) soft out", @@ -7229,33 +7320,71 @@ DEFUN (clear_ip_bgp_instance_peer_group_ipv4_soft_out, BGP_CLEAR_SOFT_OUT, argv[6]->arg); } -ALIAS (clear_ip_bgp_peer_group_ipv4_soft_out, - clear_ip_bgp_peer_group_ipv4_out_cmd, - "clear ip bgp peer-group WORD ipv4 (unicast|multicast) out", - CLEAR_STR - IP_STR - BGP_STR - "Clear all members of peer-group\n" - "BGP peer-group name\n" - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - BGP_SOFT_OUT_STR) -ALIAS (clear_ip_bgp_instance_peer_group_ipv4_soft_out, - clear_ip_bgp_instance_peer_group_ipv4_out_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD ipv4 (unicast|multicast) out", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all members of peer-group\n" - "BGP peer-group name\n" - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - BGP_SOFT_OUT_STR) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear bgp " BGP_INSTANCE_CMD " peer-group WORD soft out", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * BGP_SOFT_STR + * BGP_SOFT_OUT_STR + * + * "clear bgp " BGP_INSTANCE_CMD " ipv6 peer-group WORD out", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * BGP_SOFT_OUT_STR + * + * "clear bgp " BGP_INSTANCE_CMD " peer-group WORD out", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * BGP_SOFT_OUT_STR + * + * "clear bgp ipv6 peer-group WORD soft out", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * BGP_SOFT_STR + * BGP_SOFT_OUT_STR + * + * "clear bgp peer-group WORD out", + * CLEAR_STR + * BGP_STR + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * BGP_SOFT_OUT_STR + * + * "clear bgp ipv6 peer-group WORD out", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * BGP_SOFT_OUT_STR + * + * "clear bgp " BGP_INSTANCE_CMD " ipv6 peer-group WORD soft out", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * BGP_SOFT_STR + * BGP_SOFT_OUT_STR + * + */ DEFUN (clear_bgp_peer_group_soft_out, clear_bgp_peer_group_soft_out_cmd, "clear bgp peer-group WORD soft out", @@ -7274,82 +7403,42 @@ DEFUN (clear_bgp_peer_group_soft_out, BGP_CLEAR_SOFT_OUT, argv[3]->arg); } -ALIAS (clear_bgp_peer_group_soft_out, - clear_bgp_instance_peer_group_soft_out_cmd, - "clear bgp " BGP_INSTANCE_CMD " peer-group WORD soft out", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all members of peer-group\n" - "BGP peer-group name\n" - BGP_SOFT_STR - BGP_SOFT_OUT_STR) -ALIAS (clear_bgp_peer_group_soft_out, - clear_bgp_ipv6_peer_group_soft_out_cmd, - "clear bgp ipv6 peer-group WORD soft out", - CLEAR_STR - BGP_STR - "Address family\n" - "Clear all members of peer-group\n" - "BGP peer-group name\n" - BGP_SOFT_STR - BGP_SOFT_OUT_STR) -ALIAS (clear_bgp_peer_group_soft_out, - clear_bgp_instance_ipv6_peer_group_soft_out_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 peer-group WORD soft out", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Clear all members of peer-group\n" - "BGP peer-group name\n" - BGP_SOFT_STR - BGP_SOFT_OUT_STR) -ALIAS (clear_bgp_peer_group_soft_out, - clear_bgp_peer_group_out_cmd, - "clear bgp peer-group WORD out", - CLEAR_STR - BGP_STR - "Clear all members of peer-group\n" - "BGP peer-group name\n" - BGP_SOFT_OUT_STR) -ALIAS (clear_bgp_peer_group_soft_out, - clear_bgp_instance_peer_group_out_cmd, - "clear bgp " BGP_INSTANCE_CMD " peer-group WORD out", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all members of peer-group\n" - "BGP peer-group name\n" - BGP_SOFT_OUT_STR) -ALIAS (clear_bgp_peer_group_soft_out, - clear_bgp_ipv6_peer_group_out_cmd, - "clear bgp ipv6 peer-group WORD out", - CLEAR_STR - BGP_STR - "Address family\n" - "Clear all members of peer-group\n" - "BGP peer-group name\n" - BGP_SOFT_OUT_STR) -ALIAS (clear_bgp_peer_group_soft_out, - clear_bgp_instance_ipv6_peer_group_out_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 peer-group WORD out", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Clear all members of peer-group\n" - "BGP peer-group name\n" - BGP_SOFT_OUT_STR) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " BGP_INSTANCE_CMD " external soft out", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all external peers\n" + * BGP_SOFT_STR + * BGP_SOFT_OUT_STR + * + * "clear ip bgp " BGP_INSTANCE_CMD " external out", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all external peers\n" + * BGP_SOFT_OUT_STR + * + * "clear ip bgp external out", + * CLEAR_STR + * IP_STR + * BGP_STR + * "Clear all external peers\n" + * BGP_SOFT_OUT_STR + * + */ DEFUN (clear_ip_bgp_external_soft_out, - clear_ip_bgp_external_soft_out_cmd, + clear_ip_bgp_external_soft_out_cmd, "clear ip bgp external soft out", CLEAR_STR IP_STR @@ -7366,36 +7455,22 @@ DEFUN (clear_ip_bgp_external_soft_out, BGP_CLEAR_SOFT_OUT, NULL); } -ALIAS (clear_ip_bgp_external_soft_out, - clear_ip_bgp_instance_external_soft_out_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " external soft out", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all external peers\n" - BGP_SOFT_STR - BGP_SOFT_OUT_STR) -ALIAS (clear_ip_bgp_external_soft_out, - clear_ip_bgp_external_out_cmd, - "clear ip bgp external out", - CLEAR_STR - IP_STR - BGP_STR - "Clear all external peers\n" - BGP_SOFT_OUT_STR) -ALIAS (clear_ip_bgp_external_soft_out, - clear_ip_bgp_instance_external_out_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " external out", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all external peers\n" - BGP_SOFT_OUT_STR) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp external ipv4 (unicast|multicast) out", + * CLEAR_STR + * IP_STR + * BGP_STR + * "Clear all external peers\n" + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * BGP_SOFT_OUT_STR + * + */ DEFUN (clear_ip_bgp_external_ipv4_soft_out, clear_ip_bgp_external_ipv4_soft_out_cmd, "clear ip bgp external ipv4 (unicast|multicast) soft out", @@ -7417,6 +7492,20 @@ DEFUN (clear_ip_bgp_external_ipv4_soft_out, BGP_CLEAR_SOFT_OUT, NULL); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " BGP_INSTANCE_CMD " external ipv4 (unicast|multicast) out", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all external peers\n" + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * BGP_SOFT_OUT_STR + * + */ DEFUN (clear_ip_bgp_instance_external_ipv4_soft_out, clear_ip_bgp_instance_external_ipv4_soft_out_cmd, "clear ip bgp " BGP_INSTANCE_CMD " external ipv4 (unicast|multicast) soft out", @@ -7439,31 +7528,64 @@ DEFUN (clear_ip_bgp_instance_external_ipv4_soft_out, BGP_CLEAR_SOFT_OUT, NULL); } -ALIAS (clear_ip_bgp_external_ipv4_soft_out, - clear_ip_bgp_external_ipv4_out_cmd, - "clear ip bgp external ipv4 (unicast|multicast) out", - CLEAR_STR - IP_STR - BGP_STR - "Clear all external peers\n" - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - BGP_SOFT_OUT_STR) -ALIAS (clear_ip_bgp_instance_external_ipv4_soft_out, - clear_ip_bgp_instance_external_ipv4_out_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " external ipv4 (unicast|multicast) out", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all external peers\n" - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - BGP_SOFT_OUT_STR) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear bgp ipv6 external WORD out", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "Clear all external peers\n" + * BGP_SOFT_OUT_STR + * + * "clear bgp " BGP_INSTANCE_CMD " external soft out", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all external peers\n" + * BGP_SOFT_STR + * BGP_SOFT_OUT_STR + * + * "clear bgp " BGP_INSTANCE_CMD " external out", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all external peers\n" + * BGP_SOFT_OUT_STR + * + * "clear bgp " BGP_INSTANCE_CMD " ipv6 external WORD out", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Clear all external peers\n" + * BGP_SOFT_OUT_STR + * + * "clear bgp " BGP_INSTANCE_CMD " ipv6 external soft out", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Clear all external peers\n" + * BGP_SOFT_STR + * BGP_SOFT_OUT_STR + * + * "clear bgp ipv6 external soft out", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "Clear all external peers\n" + * BGP_SOFT_STR + * BGP_SOFT_OUT_STR + * + * "clear bgp external out", + * CLEAR_STR + * BGP_STR + * "Clear all external peers\n" + * BGP_SOFT_OUT_STR + * + */ DEFUN (clear_bgp_external_soft_out, clear_bgp_external_soft_out_cmd, "clear bgp external soft out", @@ -7481,73 +7603,40 @@ DEFUN (clear_bgp_external_soft_out, BGP_CLEAR_SOFT_OUT, NULL); } -ALIAS (clear_bgp_external_soft_out, - clear_bgp_instance_external_soft_out_cmd, - "clear bgp " BGP_INSTANCE_CMD " external soft out", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all external peers\n" - BGP_SOFT_STR - BGP_SOFT_OUT_STR) -ALIAS (clear_bgp_external_soft_out, - clear_bgp_ipv6_external_soft_out_cmd, - "clear bgp ipv6 external soft out", - CLEAR_STR - BGP_STR - "Address family\n" - "Clear all external peers\n" - BGP_SOFT_STR - BGP_SOFT_OUT_STR) -ALIAS (clear_bgp_external_soft_out, - clear_bgp_instance_ipv6_external_soft_out_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 external soft out", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Clear all external peers\n" - BGP_SOFT_STR - BGP_SOFT_OUT_STR) -ALIAS (clear_bgp_external_soft_out, - clear_bgp_external_out_cmd, - "clear bgp external out", - CLEAR_STR - BGP_STR - "Clear all external peers\n" - BGP_SOFT_OUT_STR) -ALIAS (clear_bgp_external_soft_out, - clear_bgp_instance_external_out_cmd, - "clear bgp " BGP_INSTANCE_CMD " external out", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all external peers\n" - BGP_SOFT_OUT_STR) -ALIAS (clear_bgp_external_soft_out, - clear_bgp_ipv6_external_out_cmd, - "clear bgp ipv6 external WORD out", - CLEAR_STR - BGP_STR - "Address family\n" - "Clear all external peers\n" - BGP_SOFT_OUT_STR) -ALIAS (clear_bgp_external_soft_out, - clear_bgp_instance_ipv6_external_out_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 external WORD out", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Clear all external peers\n" - BGP_SOFT_OUT_STR) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " soft out", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear peers with the AS number\n" + * BGP_SOFT_STR + * BGP_SOFT_OUT_STR + * + * "clear ip bgp " CMD_AS_RANGE " out", + * CLEAR_STR + * IP_STR + * BGP_STR + * "Clear peers with the AS number\n" + * BGP_SOFT_OUT_STR + * + * "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " out", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear peers with the AS number\n" + * BGP_SOFT_OUT_STR + * + */ DEFUN (clear_ip_bgp_as_soft_out, clear_ip_bgp_as_soft_out_cmd, "clear ip bgp " CMD_AS_RANGE " soft out", @@ -7566,36 +7655,22 @@ DEFUN (clear_ip_bgp_as_soft_out, BGP_CLEAR_SOFT_OUT, argv[3]->arg); } -ALIAS (clear_ip_bgp_as_soft_out, - clear_ip_bgp_instance_as_soft_out_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " soft out", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear peers with the AS number\n" - BGP_SOFT_STR - BGP_SOFT_OUT_STR) -ALIAS (clear_ip_bgp_as_soft_out, - clear_ip_bgp_as_out_cmd, - "clear ip bgp " CMD_AS_RANGE " out", - CLEAR_STR - IP_STR - BGP_STR - "Clear peers with the AS number\n" - BGP_SOFT_OUT_STR) -ALIAS (clear_ip_bgp_as_soft_out, - clear_ip_bgp_instance_as_out_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " out", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear peers with the AS number\n" - BGP_SOFT_OUT_STR) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " CMD_AS_RANGE " ipv4 (unicast|multicast) out", + * CLEAR_STR + * IP_STR + * BGP_STR + * "Clear peers with the AS number\n" + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * BGP_SOFT_OUT_STR + * + */ DEFUN (clear_ip_bgp_as_ipv4_soft_out, clear_ip_bgp_as_ipv4_soft_out_cmd, "clear ip bgp " CMD_AS_RANGE " ipv4 (unicast|multicast) soft out", @@ -7617,6 +7692,20 @@ DEFUN (clear_ip_bgp_as_ipv4_soft_out, BGP_CLEAR_SOFT_OUT, argv[3]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " ipv4 (unicast|multicast) out", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear peers with the AS number\n" + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * BGP_SOFT_OUT_STR + * + */ DEFUN (clear_ip_bgp_instance_as_ipv4_soft_out, clear_ip_bgp_instance_as_ipv4_soft_out_cmd, "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " ipv4 (unicast|multicast) soft out", @@ -7639,31 +7728,20 @@ DEFUN (clear_ip_bgp_instance_as_ipv4_soft_out, BGP_CLEAR_SOFT_OUT, argv[5]->arg); } -ALIAS (clear_ip_bgp_as_ipv4_soft_out, - clear_ip_bgp_as_ipv4_out_cmd, - "clear ip bgp " CMD_AS_RANGE " ipv4 (unicast|multicast) out", - CLEAR_STR - IP_STR - BGP_STR - "Clear peers with the AS number\n" - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - BGP_SOFT_OUT_STR) -ALIAS (clear_ip_bgp_instance_as_ipv4_soft_out, - clear_ip_bgp_instance_as_ipv4_out_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " ipv4 (unicast|multicast) out", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear peers with the AS number\n" - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - BGP_SOFT_OUT_STR) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " CMD_AS_RANGE " vpnv4 unicast out", + * CLEAR_STR + * IP_STR + * BGP_STR + * "Clear peers with the AS number\n" + * "Address family\n" + * "Address Family modifier\n" + * BGP_SOFT_OUT_STR + * + */ DEFUN (clear_ip_bgp_as_vpnv4_soft_out, clear_ip_bgp_as_vpnv4_soft_out_cmd, "clear ip bgp " CMD_AS_RANGE " vpnv4 unicast soft out", @@ -7680,17 +7758,19 @@ DEFUN (clear_ip_bgp_as_vpnv4_soft_out, BGP_CLEAR_SOFT_OUT, argv[3]->arg); } -ALIAS (clear_ip_bgp_as_vpnv4_soft_out, - clear_ip_bgp_as_vpnv4_out_cmd, - "clear ip bgp " CMD_AS_RANGE " vpnv4 unicast out", - CLEAR_STR - IP_STR - BGP_STR - "Clear peers with the AS number\n" - "Address family\n" - "Address Family modifier\n" - BGP_SOFT_OUT_STR) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " CMD_AS_RANGE " encap unicast out", + * CLEAR_STR + * IP_STR + * BGP_STR + * "Clear peers with the AS number\n" + * "Address family\n" + * "Address Family modifier\n" + * "Soft reconfig outbound update\n" + * + */ DEFUN (clear_ip_bgp_as_encap_soft_out, clear_ip_bgp_as_encap_soft_out_cmd, "clear ip bgp " CMD_AS_RANGE " encap unicast soft out", @@ -7707,17 +7787,63 @@ DEFUN (clear_ip_bgp_as_encap_soft_out, BGP_CLEAR_SOFT_OUT, argv[3]->arg); } -ALIAS (clear_ip_bgp_as_encap_soft_out, - clear_ip_bgp_as_encap_out_cmd, - "clear ip bgp " CMD_AS_RANGE " encap unicast out", - CLEAR_STR - IP_STR - BGP_STR - "Clear peers with the AS number\n" - "Address family\n" - "Address Family modifier\n" - "Soft reconfig outbound update\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear bgp ipv6 " CMD_AS_RANGE " soft out", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "Clear peers with the AS number\n" + * BGP_SOFT_STR + * BGP_SOFT_OUT_STR + * + * "clear bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " out", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear peers with the AS number\n" + * BGP_SOFT_OUT_STR + * + * "clear bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " soft out", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear peers with the AS number\n" + * BGP_SOFT_STR + * BGP_SOFT_OUT_STR + * + * "clear bgp " BGP_INSTANCE_CMD " ipv6 " CMD_AS_RANGE " out", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Clear peers with the AS number\n" + * BGP_SOFT_OUT_STR + * + * "clear bgp " CMD_AS_RANGE " out", + * CLEAR_STR + * BGP_STR + * "Clear peers with the AS number\n" + * BGP_SOFT_OUT_STR + * + * "clear bgp ipv6 " CMD_AS_RANGE " out", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "Clear peers with the AS number\n" + * BGP_SOFT_OUT_STR + * + * "clear bgp " BGP_INSTANCE_CMD " ipv6 " CMD_AS_RANGE " soft out", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Clear peers with the AS number\n" + * BGP_SOFT_STR + * BGP_SOFT_OUT_STR + * + */ DEFUN (clear_bgp_as_soft_out, clear_bgp_as_soft_out_cmd, "clear bgp " CMD_AS_RANGE " soft out", @@ -7735,74 +7861,41 @@ DEFUN (clear_bgp_as_soft_out, BGP_CLEAR_SOFT_OUT, argv[2]->arg); } -ALIAS (clear_bgp_as_soft_out, - clear_bgp_instance_as_soft_out_cmd, - "clear bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " soft out", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear peers with the AS number\n" - BGP_SOFT_STR - BGP_SOFT_OUT_STR) -ALIAS (clear_bgp_as_soft_out, - clear_bgp_ipv6_as_soft_out_cmd, - "clear bgp ipv6 " CMD_AS_RANGE " soft out", - CLEAR_STR - BGP_STR - "Address family\n" - "Clear peers with the AS number\n" - BGP_SOFT_STR - BGP_SOFT_OUT_STR) -ALIAS (clear_bgp_as_soft_out, - clear_bgp_instance_ipv6_as_soft_out_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 " CMD_AS_RANGE " soft out", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Clear peers with the AS number\n" - BGP_SOFT_STR - BGP_SOFT_OUT_STR) -ALIAS (clear_bgp_as_soft_out, - clear_bgp_as_out_cmd, - "clear bgp " CMD_AS_RANGE " out", - CLEAR_STR - BGP_STR - "Clear peers with the AS number\n" - BGP_SOFT_OUT_STR) -ALIAS (clear_bgp_as_soft_out, - clear_bgp_instance_as_out_cmd, - "clear bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " out", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear peers with the AS number\n" - BGP_SOFT_OUT_STR) -ALIAS (clear_bgp_as_soft_out, - clear_bgp_ipv6_as_out_cmd, - "clear bgp ipv6 " CMD_AS_RANGE " out", - CLEAR_STR - BGP_STR - "Address family\n" - "Clear peers with the AS number\n" - BGP_SOFT_OUT_STR) -ALIAS (clear_bgp_as_soft_out, - clear_bgp_instance_ipv6_as_out_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 " CMD_AS_RANGE " out", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Clear peers with the AS number\n" - BGP_SOFT_OUT_STR) /* Inbound soft-reconfiguration */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " BGP_INSTANCE_CMD " * in", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all peers\n" + * BGP_SOFT_IN_STR + * + * "clear ip bgp " BGP_INSTANCE_CMD " * soft in", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all peers\n" + * BGP_SOFT_STR + * BGP_SOFT_IN_STR + * + * "clear ip bgp * in", + * CLEAR_STR + * IP_STR + * BGP_STR + * "Clear all peers\n" + * BGP_SOFT_IN_STR + * + */ DEFUN (clear_ip_bgp_all_soft_in, clear_ip_bgp_all_soft_in_cmd, "clear ip bgp * soft in", @@ -7821,35 +7914,8 @@ DEFUN (clear_ip_bgp_all_soft_in, BGP_CLEAR_SOFT_IN, NULL); } -ALIAS (clear_ip_bgp_all_soft_in, - clear_ip_bgp_instance_all_soft_in_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " * soft in", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all peers\n" - BGP_SOFT_STR - BGP_SOFT_IN_STR) -ALIAS (clear_ip_bgp_all_soft_in, - clear_ip_bgp_all_in_cmd, - "clear ip bgp * in", - CLEAR_STR - IP_STR - BGP_STR - "Clear all peers\n" - BGP_SOFT_IN_STR) -ALIAS (clear_ip_bgp_all_soft_in, - clear_ip_bgp_instance_all_in_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " * in", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all peers\n" - BGP_SOFT_IN_STR) DEFUN (clear_ip_bgp_all_in_prefix_filter, clear_ip_bgp_all_in_prefix_filter_cmd, @@ -7869,6 +7935,19 @@ DEFUN (clear_ip_bgp_all_in_prefix_filter, BGP_CLEAR_SOFT_IN_ORF_PREFIX, NULL); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp * ipv4 (unicast|multicast) in", + * CLEAR_STR + * IP_STR + * BGP_STR + * "Clear all peers\n" + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * BGP_SOFT_IN_STR + * + */ DEFUN (clear_ip_bgp_all_ipv4_soft_in, clear_ip_bgp_all_ipv4_soft_in_cmd, "clear ip bgp * ipv4 (unicast|multicast) soft in", @@ -7890,6 +7969,20 @@ DEFUN (clear_ip_bgp_all_ipv4_soft_in, BGP_CLEAR_SOFT_IN, NULL); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " BGP_INSTANCE_CMD " * ipv4 (unicast|multicast) in", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all peers\n" + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * BGP_SOFT_IN_STR + * + */ DEFUN (clear_ip_bgp_instance_all_ipv4_soft_in, clear_ip_bgp_instance_all_ipv4_soft_in_cmd, "clear ip bgp " BGP_INSTANCE_CMD " * ipv4 (unicast|multicast) soft in", @@ -7912,30 +8005,7 @@ DEFUN (clear_ip_bgp_instance_all_ipv4_soft_in, BGP_CLEAR_SOFT_IN, NULL); } -ALIAS (clear_ip_bgp_all_ipv4_soft_in, - clear_ip_bgp_all_ipv4_in_cmd, - "clear ip bgp * ipv4 (unicast|multicast) in", - CLEAR_STR - IP_STR - BGP_STR - "Clear all peers\n" - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - BGP_SOFT_IN_STR) -ALIAS (clear_ip_bgp_instance_all_ipv4_soft_in, - clear_ip_bgp_instance_all_ipv4_in_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " * ipv4 (unicast|multicast) in", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all peers\n" - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - BGP_SOFT_IN_STR) DEFUN (clear_ip_bgp_all_ipv4_in_prefix_filter, clear_ip_bgp_all_ipv4_in_prefix_filter_cmd, @@ -7958,6 +8028,18 @@ DEFUN (clear_ip_bgp_all_ipv4_in_prefix_filter, BGP_CLEAR_SOFT_IN_ORF_PREFIX, NULL); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp * vpnv4 unicast in", + * CLEAR_STR + * IP_STR + * BGP_STR + * "Clear all peers\n" + * "Address family\n" + * "Address Family Modifier\n" + * BGP_SOFT_IN_STR + * + */ DEFUN (clear_ip_bgp_all_vpnv4_soft_in, clear_ip_bgp_all_vpnv4_soft_in_cmd, "clear ip bgp * vpnv4 unicast soft in", @@ -7974,17 +8056,19 @@ DEFUN (clear_ip_bgp_all_vpnv4_soft_in, BGP_CLEAR_SOFT_IN, NULL); } -ALIAS (clear_ip_bgp_all_vpnv4_soft_in, - clear_ip_bgp_all_vpnv4_in_cmd, - "clear ip bgp * vpnv4 unicast in", - CLEAR_STR - IP_STR - BGP_STR - "Clear all peers\n" - "Address family\n" - "Address Family Modifier\n" - BGP_SOFT_IN_STR) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp * encap unicast in", + * CLEAR_STR + * IP_STR + * BGP_STR + * "Clear all peers\n" + * "Address family\n" + * "Address Family Modifier\n" + * "Soft reconfig inbound update\n" + * + */ DEFUN (clear_ip_bgp_all_encap_soft_in, clear_ip_bgp_all_encap_soft_in_cmd, "clear ip bgp * encap unicast soft in", @@ -8001,17 +8085,63 @@ DEFUN (clear_ip_bgp_all_encap_soft_in, BGP_CLEAR_SOFT_IN, NULL); } -ALIAS (clear_ip_bgp_all_encap_soft_in, - clear_ip_bgp_all_encap_in_cmd, - "clear ip bgp * encap unicast in", - CLEAR_STR - IP_STR - BGP_STR - "Clear all peers\n" - "Address family\n" - "Address Family Modifier\n" - "Soft reconfig inbound update\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear bgp ipv6 * soft in", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "Clear all peers\n" + * BGP_SOFT_STR + * BGP_SOFT_IN_STR + * + * "clear bgp " BGP_INSTANCE_CMD " ipv6 * in", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Clear all peers\n" + * BGP_SOFT_IN_STR + * + * "clear bgp * in", + * CLEAR_STR + * BGP_STR + * "Clear all peers\n" + * BGP_SOFT_IN_STR + * + * "clear bgp " BGP_INSTANCE_CMD " * in", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all peers\n" + * BGP_SOFT_IN_STR + * + * "clear bgp " BGP_INSTANCE_CMD " ipv6 * soft in", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Clear all peers\n" + * BGP_SOFT_STR + * BGP_SOFT_IN_STR + * + * "clear bgp ipv6 * in", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "Clear all peers\n" + * BGP_SOFT_IN_STR + * + * "clear bgp " BGP_INSTANCE_CMD " * soft in", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all peers\n" + * BGP_SOFT_STR + * BGP_SOFT_IN_STR + * + */ DEFUN (clear_bgp_all_soft_in, clear_bgp_all_soft_in_cmd, "clear bgp * soft in", @@ -8029,73 +8159,24 @@ DEFUN (clear_bgp_all_soft_in, BGP_CLEAR_SOFT_IN, NULL); } -ALIAS (clear_bgp_all_soft_in, - clear_bgp_instance_all_soft_in_cmd, - "clear bgp " BGP_INSTANCE_CMD " * soft in", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all peers\n" - BGP_SOFT_STR - BGP_SOFT_IN_STR) -ALIAS (clear_bgp_all_soft_in, - clear_bgp_ipv6_all_soft_in_cmd, - "clear bgp ipv6 * soft in", - CLEAR_STR - BGP_STR - "Address family\n" - "Clear all peers\n" - BGP_SOFT_STR - BGP_SOFT_IN_STR) -ALIAS (clear_bgp_all_soft_in, - clear_bgp_instance_ipv6_all_soft_in_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 * soft in", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Clear all peers\n" - BGP_SOFT_STR - BGP_SOFT_IN_STR) -ALIAS (clear_bgp_all_soft_in, - clear_bgp_all_in_cmd, - "clear bgp * in", - CLEAR_STR - BGP_STR - "Clear all peers\n" - BGP_SOFT_IN_STR) -ALIAS (clear_bgp_all_soft_in, - clear_bgp_instance_all_in_cmd, - "clear bgp " BGP_INSTANCE_CMD " * in", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all peers\n" - BGP_SOFT_IN_STR) -ALIAS (clear_bgp_all_soft_in, - clear_bgp_ipv6_all_in_cmd, - "clear bgp ipv6 * in", - CLEAR_STR - BGP_STR - "Address family\n" - "Clear all peers\n" - BGP_SOFT_IN_STR) -ALIAS (clear_bgp_all_soft_in, - clear_bgp_instance_ipv6_all_in_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 * in", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Clear all peers\n" - BGP_SOFT_IN_STR) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear bgp ipv6 * in prefix-filter", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "Clear all peers\n" + * BGP_SOFT_IN_STR + * "Push out prefix-list ORF and do inbound soft reconfig\n" + * + */ DEFUN (clear_bgp_all_in_prefix_filter, clear_bgp_all_in_prefix_filter_cmd, "clear bgp * in prefix-filter", @@ -8109,16 +8190,37 @@ DEFUN (clear_bgp_all_in_prefix_filter, BGP_CLEAR_SOFT_IN_ORF_PREFIX, NULL); } -ALIAS (clear_bgp_all_in_prefix_filter, - clear_bgp_ipv6_all_in_prefix_filter_cmd, - "clear bgp ipv6 * in prefix-filter", - CLEAR_STR - BGP_STR - "Address family\n" - "Clear all peers\n" - BGP_SOFT_IN_STR - "Push out prefix-list ORF and do inbound soft reconfig\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " BGP_INSTANCE_CMD " (A.B.C.D|WORD) in", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "BGP neighbor address to clear\n" + * "BGP neighbor on interface to clear\n" + * BGP_SOFT_IN_STR + * + * "clear ip bgp " BGP_INSTANCE_CMD " (A.B.C.D|WORD) soft in", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "BGP neighbor address to clear\n" + * "BGP neighbor on interface to clear\n" + * BGP_SOFT_STR + * BGP_SOFT_IN_STR + * + * "clear ip bgp (A.B.C.D|WORD) in", + * CLEAR_STR + * IP_STR + * BGP_STR + * "BGP neighbor address to clear\n" + * "BGP neighbor on interface to clear\n" + * BGP_SOFT_IN_STR + * + */ DEFUN (clear_ip_bgp_peer_soft_in, clear_ip_bgp_peer_soft_in_cmd, "clear ip bgp (A.B.C.D|WORD) soft in", @@ -8138,38 +8240,8 @@ DEFUN (clear_ip_bgp_peer_soft_in, BGP_CLEAR_SOFT_IN, argv[3]->arg); } -ALIAS (clear_ip_bgp_peer_soft_in, - clear_ip_bgp_instance_peer_soft_in_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " (A.B.C.D|WORD) soft in", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "BGP neighbor address to clear\n" - "BGP neighbor on interface to clear\n" - BGP_SOFT_STR - BGP_SOFT_IN_STR) -ALIAS (clear_ip_bgp_peer_soft_in, - clear_ip_bgp_peer_in_cmd, - "clear ip bgp (A.B.C.D|WORD) in", - CLEAR_STR - IP_STR - BGP_STR - "BGP neighbor address to clear\n" - "BGP neighbor on interface to clear\n" - BGP_SOFT_IN_STR) -ALIAS (clear_ip_bgp_peer_soft_in, - clear_ip_bgp_instance_peer_in_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " (A.B.C.D|WORD) in", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "BGP neighbor address to clear\n" - "BGP neighbor on interface to clear\n" - BGP_SOFT_IN_STR) DEFUN (clear_ip_bgp_peer_in_prefix_filter, clear_ip_bgp_peer_in_prefix_filter_cmd, @@ -8186,6 +8258,20 @@ DEFUN (clear_ip_bgp_peer_in_prefix_filter, BGP_CLEAR_SOFT_IN_ORF_PREFIX, argv[3]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp (A.B.C.D|WORD) ipv4 (unicast|multicast) in", + * CLEAR_STR + * IP_STR + * BGP_STR + * "BGP neighbor address to clear\n" + * "BGP neighbor on interface to clear\n" + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * BGP_SOFT_IN_STR + * + */ DEFUN (clear_ip_bgp_peer_ipv4_soft_in, clear_ip_bgp_peer_ipv4_soft_in_cmd, "clear ip bgp (A.B.C.D|WORD) ipv4 (unicast|multicast) soft in", @@ -8208,6 +8294,21 @@ DEFUN (clear_ip_bgp_peer_ipv4_soft_in, BGP_CLEAR_SOFT_IN, argv[3]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " BGP_INSTANCE_CMD " (A.B.C.D|WORD) ipv4 (unicast|multicast) in", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "BGP neighbor address to clear\n" + * "BGP neighbor on interface to clear\n" + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * BGP_SOFT_IN_STR + * + */ DEFUN (clear_ip_bgp_instance_peer_ipv4_soft_in, clear_ip_bgp_instance_peer_ipv4_soft_in_cmd, "clear ip bgp " BGP_INSTANCE_CMD " (A.B.C.D|WORD) ipv4 (unicast|multicast) soft in", @@ -8231,32 +8332,7 @@ DEFUN (clear_ip_bgp_instance_peer_ipv4_soft_in, BGP_CLEAR_SOFT_IN, argv[5]->arg); } -ALIAS (clear_ip_bgp_peer_ipv4_soft_in, - clear_ip_bgp_peer_ipv4_in_cmd, - "clear ip bgp (A.B.C.D|WORD) ipv4 (unicast|multicast) in", - CLEAR_STR - IP_STR - BGP_STR - "BGP neighbor address to clear\n" - "BGP neighbor on interface to clear\n" - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - BGP_SOFT_IN_STR) -ALIAS (clear_ip_bgp_instance_peer_ipv4_soft_in, - clear_ip_bgp_instance_peer_ipv4_in_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " (A.B.C.D|WORD) ipv4 (unicast|multicast) in", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "BGP neighbor address to clear\n" - "BGP neighbor on interface to clear\n" - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - BGP_SOFT_IN_STR) DEFUN (clear_ip_bgp_peer_ipv4_in_prefix_filter, clear_ip_bgp_peer_ipv4_in_prefix_filter_cmd, @@ -8280,6 +8356,19 @@ DEFUN (clear_ip_bgp_peer_ipv4_in_prefix_filter, BGP_CLEAR_SOFT_IN_ORF_PREFIX, argv[3]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp (A.B.C.D|WORD) vpnv4 unicast in", + * CLEAR_STR + * IP_STR + * BGP_STR + * "BGP neighbor address to clear\n" + * "BGP neighbor on interface to clear\n" + * "Address family\n" + * "Address Family Modifier\n" + * BGP_SOFT_IN_STR + * + */ DEFUN (clear_ip_bgp_peer_vpnv4_soft_in, clear_ip_bgp_peer_vpnv4_soft_in_cmd, "clear ip bgp (A.B.C.D|WORD) vpnv4 unicast soft in", @@ -8290,152 +8379,152 @@ DEFUN (clear_ip_bgp_peer_vpnv4_soft_in, "BGP neighbor on interface to clear\n" "Address family\n" "Address Family Modifier\n" - BGP_SOFT_STR - BGP_SOFT_IN_STR) -{ - return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN, clear_peer, - BGP_CLEAR_SOFT_IN, argv[3]->arg); -} - -ALIAS (clear_ip_bgp_peer_vpnv4_soft_in, - clear_ip_bgp_peer_vpnv4_in_cmd, - "clear ip bgp (A.B.C.D|WORD) vpnv4 unicast in", - CLEAR_STR - IP_STR - BGP_STR - "BGP neighbor address to clear\n" - "BGP neighbor on interface to clear\n" - "Address family\n" - "Address Family Modifier\n" - BGP_SOFT_IN_STR) - -DEFUN (clear_ip_bgp_peer_encap_soft_in, - clear_ip_bgp_peer_encap_soft_in_cmd, - "clear ip bgp A.B.C.D encap unicast soft in", - CLEAR_STR - IP_STR - BGP_STR - "BGP neighbor address to clear\n" - "Address family\n" - "Address Family Modifier\n" - "Soft reconfig\n" - "Soft reconfig inbound update\n") -{ - return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_ENCAP, clear_peer, - BGP_CLEAR_SOFT_IN, argv[3]->arg); -} - -ALIAS (clear_ip_bgp_peer_encap_soft_in, - clear_ip_bgp_peer_encap_in_cmd, - "clear ip bgp A.B.C.D encap unicast in", - CLEAR_STR - IP_STR - BGP_STR - "BGP neighbor address to clear\n" - "Address family\n" - "Address Family Modifier\n" - "Soft reconfig inbound update\n") - -DEFUN (clear_bgp_peer_soft_in, - clear_bgp_peer_soft_in_cmd, - "clear bgp (A.B.C.D|X:X::X:X|WORD) soft in", - CLEAR_STR - BGP_STR - "BGP neighbor address to clear\n" - "BGP IPv6 neighbor to clear\n" - "BGP neighbor on interface to clear\n" - BGP_SOFT_STR - BGP_SOFT_IN_STR) -{ - if (argc == 3) - return bgp_clear_vty (vty, argv[1], AFI_IP6, SAFI_UNICAST, clear_peer, - BGP_CLEAR_SOFT_IN, argv[2]); - - return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_peer, - BGP_CLEAR_SOFT_IN, argv[2]->arg); -} - -ALIAS (clear_bgp_peer_soft_in, - clear_bgp_instance_peer_soft_in_cmd, - "clear bgp " BGP_INSTANCE_CMD " (A.B.C.D|X:X::X:X|WORD) soft in", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "BGP neighbor address to clear\n" - "BGP IPv6 neighbor to clear\n" - "BGP neighbor on interface to clear\n" - BGP_SOFT_STR - BGP_SOFT_IN_STR) - -ALIAS (clear_bgp_peer_soft_in, - clear_bgp_ipv6_peer_soft_in_cmd, - "clear bgp ipv6 (A.B.C.D|X:X::X:X|WORD) soft in", - CLEAR_STR - BGP_STR - "Address family\n" - "BGP neighbor address to clear\n" - "BGP IPv6 neighbor to clear\n" - "BGP neighbor on interface to clear\n" - BGP_SOFT_STR - BGP_SOFT_IN_STR) - -ALIAS (clear_bgp_peer_soft_in, - clear_bgp_instance_ipv6_peer_soft_in_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 (A.B.C.D|X:X::X:X|WORD) soft in", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "BGP neighbor address to clear\n" - "BGP IPv6 neighbor to clear\n" - "BGP neighbor on interface to clear\n" - BGP_SOFT_STR - BGP_SOFT_IN_STR) - -ALIAS (clear_bgp_peer_soft_in, - clear_bgp_peer_in_cmd, - "clear bgp (A.B.C.D|X:X::X:X|WORD) in", - CLEAR_STR - BGP_STR - "BGP neighbor address to clear\n" - "BGP IPv6 neighbor to clear\n" - "BGP neighbor on interface to clear\n" - BGP_SOFT_IN_STR) - -ALIAS (clear_bgp_peer_soft_in, - clear_bgp_instance_peer_in_cmd, - "clear bgp " BGP_INSTANCE_CMD " (A.B.C.D|X:X::X:X|WORD) in", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "BGP neighbor address to clear\n" - "BGP IPv6 neighbor to clear\n" - "BGP neighbor on interface to clear\n" + BGP_SOFT_STR BGP_SOFT_IN_STR) +{ + return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN, clear_peer, + BGP_CLEAR_SOFT_IN, argv[3]->arg); +} + -ALIAS (clear_bgp_peer_soft_in, - clear_bgp_ipv6_peer_in_cmd, - "clear bgp ipv6 (A.B.C.D|X:X::X:X|WORD) in", +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp A.B.C.D encap unicast in", + * CLEAR_STR + * IP_STR + * BGP_STR + * "BGP neighbor address to clear\n" + * "Address family\n" + * "Address Family Modifier\n" + * "Soft reconfig inbound update\n" + * + */ +DEFUN (clear_ip_bgp_peer_encap_soft_in, + clear_ip_bgp_peer_encap_soft_in_cmd, + "clear ip bgp A.B.C.D encap unicast soft in", CLEAR_STR + IP_STR BGP_STR - "Address family\n" "BGP neighbor address to clear\n" - "BGP IPv6 neighbor to clear\n" - "BGP neighbor on interface to clear\n" - BGP_SOFT_IN_STR) + "Address family\n" + "Address Family Modifier\n" + "Soft reconfig\n" + "Soft reconfig inbound update\n") +{ + return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_ENCAP, clear_peer, + BGP_CLEAR_SOFT_IN, argv[3]->arg); +} -ALIAS (clear_bgp_peer_soft_in, - clear_bgp_instance_ipv6_peer_in_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 (A.B.C.D|X:X::X:X|WORD) in", + +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear bgp ipv6 (A.B.C.D|X:X::X:X|WORD) in", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "BGP neighbor address to clear\n" + * "BGP IPv6 neighbor to clear\n" + * "BGP neighbor on interface to clear\n" + * BGP_SOFT_IN_STR + * + * "clear bgp " BGP_INSTANCE_CMD " ipv6 (A.B.C.D|X:X::X:X|WORD) soft in", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "BGP neighbor address to clear\n" + * "BGP IPv6 neighbor to clear\n" + * "BGP neighbor on interface to clear\n" + * BGP_SOFT_STR + * BGP_SOFT_IN_STR + * + * "clear bgp ipv6 (A.B.C.D|X:X::X:X|WORD) soft in", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "BGP neighbor address to clear\n" + * "BGP IPv6 neighbor to clear\n" + * "BGP neighbor on interface to clear\n" + * BGP_SOFT_STR + * BGP_SOFT_IN_STR + * + * "clear bgp (A.B.C.D|X:X::X:X|WORD) in", + * CLEAR_STR + * BGP_STR + * "BGP neighbor address to clear\n" + * "BGP IPv6 neighbor to clear\n" + * "BGP neighbor on interface to clear\n" + * BGP_SOFT_IN_STR + * + * "clear bgp " BGP_INSTANCE_CMD " (A.B.C.D|X:X::X:X|WORD) soft in", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "BGP neighbor address to clear\n" + * "BGP IPv6 neighbor to clear\n" + * "BGP neighbor on interface to clear\n" + * BGP_SOFT_STR + * BGP_SOFT_IN_STR + * + * "clear bgp " BGP_INSTANCE_CMD " ipv6 (A.B.C.D|X:X::X:X|WORD) in", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "BGP neighbor address to clear\n" + * "BGP IPv6 neighbor to clear\n" + * "BGP neighbor on interface to clear\n" + * BGP_SOFT_IN_STR + * + * "clear bgp " BGP_INSTANCE_CMD " (A.B.C.D|X:X::X:X|WORD) in", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "BGP neighbor address to clear\n" + * "BGP IPv6 neighbor to clear\n" + * "BGP neighbor on interface to clear\n" + * BGP_SOFT_IN_STR + * + */ +DEFUN (clear_bgp_peer_soft_in, + clear_bgp_peer_soft_in_cmd, + "clear bgp (A.B.C.D|X:X::X:X|WORD) soft in", CLEAR_STR BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" "BGP neighbor address to clear\n" "BGP IPv6 neighbor to clear\n" "BGP neighbor on interface to clear\n" + BGP_SOFT_STR BGP_SOFT_IN_STR) +{ + if (argc == 3) + return bgp_clear_vty (vty, argv[1], AFI_IP6, SAFI_UNICAST, clear_peer, + BGP_CLEAR_SOFT_IN, argv[2]); + + return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_peer, + BGP_CLEAR_SOFT_IN, argv[2]->arg); +} + + + + + + + +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear bgp ipv6 (A.B.C.D|X:X::X:X|WORD) in prefix-filter", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "BGP neighbor address to clear\n" + * "BGP IPv6 neighbor to clear\n" + * "BGP neighbor on interface to clear\n" + * BGP_SOFT_IN_STR + * "Push out the existing ORF prefix-list\n" + * + */ DEFUN (clear_bgp_peer_in_prefix_filter, clear_bgp_peer_in_prefix_filter_cmd, "clear bgp (A.B.C.D|X:X::X:X|WORD) in prefix-filter", @@ -8451,18 +8540,37 @@ DEFUN (clear_bgp_peer_in_prefix_filter, BGP_CLEAR_SOFT_IN_ORF_PREFIX, argv[2]->arg); } -ALIAS (clear_bgp_peer_in_prefix_filter, - clear_bgp_ipv6_peer_in_prefix_filter_cmd, - "clear bgp ipv6 (A.B.C.D|X:X::X:X|WORD) in prefix-filter", - CLEAR_STR - BGP_STR - "Address family\n" - "BGP neighbor address to clear\n" - "BGP IPv6 neighbor to clear\n" - "BGP neighbor on interface to clear\n" - BGP_SOFT_IN_STR - "Push out the existing ORF prefix-list\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD soft in", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * BGP_SOFT_STR + * BGP_SOFT_IN_STR + * + * "clear ip bgp peer-group WORD in", + * CLEAR_STR + * IP_STR + * BGP_STR + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * BGP_SOFT_IN_STR + * + * "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD in", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * BGP_SOFT_IN_STR + * + */ DEFUN (clear_ip_bgp_peer_group_soft_in, clear_ip_bgp_peer_group_soft_in_cmd, "clear ip bgp peer-group WORD soft in", @@ -8482,38 +8590,8 @@ DEFUN (clear_ip_bgp_peer_group_soft_in, BGP_CLEAR_SOFT_IN, argv[4]->arg); } -ALIAS (clear_ip_bgp_peer_group_soft_in, - clear_ip_bgp_instance_peer_group_soft_in_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD soft in", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all members of peer-group\n" - "BGP peer-group name\n" - BGP_SOFT_STR - BGP_SOFT_IN_STR) -ALIAS (clear_ip_bgp_peer_group_soft_in, - clear_ip_bgp_peer_group_in_cmd, - "clear ip bgp peer-group WORD in", - CLEAR_STR - IP_STR - BGP_STR - "Clear all members of peer-group\n" - "BGP peer-group name\n" - BGP_SOFT_IN_STR) -ALIAS (clear_ip_bgp_peer_group_soft_in, - clear_ip_bgp_instance_peer_group_in_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD in", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all members of peer-group\n" - "BGP peer-group name\n" - BGP_SOFT_IN_STR) DEFUN (clear_ip_bgp_peer_group_in_prefix_filter, clear_ip_bgp_peer_group_in_prefix_filter_cmd, @@ -8530,6 +8608,20 @@ DEFUN (clear_ip_bgp_peer_group_in_prefix_filter, BGP_CLEAR_SOFT_IN_ORF_PREFIX, argv[4]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp peer-group WORD ipv4 (unicast|multicast) in", + * CLEAR_STR + * IP_STR + * BGP_STR + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * BGP_SOFT_IN_STR + * + */ DEFUN (clear_ip_bgp_peer_group_ipv4_soft_in, clear_ip_bgp_peer_group_ipv4_soft_in_cmd, "clear ip bgp peer-group WORD ipv4 (unicast|multicast) soft in", @@ -8552,6 +8644,21 @@ DEFUN (clear_ip_bgp_peer_group_ipv4_soft_in, BGP_CLEAR_SOFT_IN, argv[4]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD ipv4 (unicast|multicast) in", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * BGP_SOFT_IN_STR + * + */ DEFUN (clear_ip_bgp_instance_peer_group_ipv4_soft_in, clear_ip_bgp_instance_peer_group_ipv4_soft_in_cmd, "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD ipv4 (unicast|multicast) soft in", @@ -8575,32 +8682,7 @@ DEFUN (clear_ip_bgp_instance_peer_group_ipv4_soft_in, BGP_CLEAR_SOFT_IN, argv[6]->arg); } -ALIAS (clear_ip_bgp_peer_group_ipv4_soft_in, - clear_ip_bgp_peer_group_ipv4_in_cmd, - "clear ip bgp peer-group WORD ipv4 (unicast|multicast) in", - CLEAR_STR - IP_STR - BGP_STR - "Clear all members of peer-group\n" - "BGP peer-group name\n" - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - BGP_SOFT_IN_STR) -ALIAS (clear_ip_bgp_instance_peer_group_ipv4_soft_in, - clear_ip_bgp_instance_peer_group_ipv4_in_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD ipv4 (unicast|multicast) in", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all members of peer-group\n" - "BGP peer-group name\n" - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - BGP_SOFT_IN_STR) DEFUN (clear_ip_bgp_peer_group_ipv4_in_prefix_filter, clear_ip_bgp_peer_group_ipv4_in_prefix_filter_cmd, @@ -8624,6 +8706,69 @@ DEFUN (clear_ip_bgp_peer_group_ipv4_in_prefix_filter, BGP_CLEAR_SOFT_IN_ORF_PREFIX, argv[4]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear bgp ipv6 peer-group WORD in", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * BGP_SOFT_IN_STR + * + * "clear bgp " BGP_INSTANCE_CMD " ipv6 peer-group WORD soft in", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * BGP_SOFT_STR + * BGP_SOFT_IN_STR + * + * "clear bgp " BGP_INSTANCE_CMD " peer-group WORD soft in", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * BGP_SOFT_STR + * BGP_SOFT_IN_STR + * + * "clear bgp peer-group WORD in", + * CLEAR_STR + * BGP_STR + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * BGP_SOFT_IN_STR + * + * "clear bgp " BGP_INSTANCE_CMD " peer-group WORD in", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * BGP_SOFT_IN_STR + * + * "clear bgp ipv6 peer-group WORD soft in", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * BGP_SOFT_STR + * BGP_SOFT_IN_STR + * + * "clear bgp " BGP_INSTANCE_CMD " ipv6 peer-group WORD in", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * BGP_SOFT_IN_STR + * + */ DEFUN (clear_bgp_peer_group_soft_in, clear_bgp_peer_group_soft_in_cmd, "clear bgp peer-group WORD soft in", @@ -8642,80 +8787,25 @@ DEFUN (clear_bgp_peer_group_soft_in, BGP_CLEAR_SOFT_IN, argv[3]->arg); } -ALIAS (clear_bgp_peer_group_soft_in, - clear_bgp_instance_peer_group_soft_in_cmd, - "clear bgp " BGP_INSTANCE_CMD " peer-group WORD soft in", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all members of peer-group\n" - "BGP peer-group name\n" - BGP_SOFT_STR - BGP_SOFT_IN_STR) -ALIAS (clear_bgp_peer_group_soft_in, - clear_bgp_ipv6_peer_group_soft_in_cmd, - "clear bgp ipv6 peer-group WORD soft in", - CLEAR_STR - BGP_STR - "Address family\n" - "Clear all members of peer-group\n" - "BGP peer-group name\n" - BGP_SOFT_STR - BGP_SOFT_IN_STR) -ALIAS (clear_bgp_peer_group_soft_in, - clear_bgp_instance_ipv6_peer_group_soft_in_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 peer-group WORD soft in", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Clear all members of peer-group\n" - "BGP peer-group name\n" - BGP_SOFT_STR - BGP_SOFT_IN_STR) -ALIAS (clear_bgp_peer_group_soft_in, - clear_bgp_peer_group_in_cmd, - "clear bgp peer-group WORD in", - CLEAR_STR - BGP_STR - "Clear all members of peer-group\n" - "BGP peer-group name\n" - BGP_SOFT_IN_STR) -ALIAS (clear_bgp_peer_group_soft_in, - clear_bgp_instance_peer_group_in_cmd, - "clear bgp " BGP_INSTANCE_CMD " peer-group WORD in", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all members of peer-group\n" - "BGP peer-group name\n" - BGP_SOFT_IN_STR) -ALIAS (clear_bgp_peer_group_soft_in, - clear_bgp_ipv6_peer_group_in_cmd, - "clear bgp ipv6 peer-group WORD in", - CLEAR_STR - BGP_STR - "Address family\n" - "Clear all members of peer-group\n" - "BGP peer-group name\n" - BGP_SOFT_IN_STR) -ALIAS (clear_bgp_peer_group_soft_in, - clear_bgp_instance_ipv6_peer_group_in_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 peer-group WORD in", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Clear all members of peer-group\n" - "BGP peer-group name\n" - BGP_SOFT_IN_STR) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear bgp ipv6 peer-group WORD in prefix-filter", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * BGP_SOFT_IN_STR + * "Push out prefix-list ORF and do inbound soft reconfig\n" + * + */ DEFUN (clear_bgp_peer_group_in_prefix_filter, clear_bgp_peer_group_in_prefix_filter_cmd, "clear bgp peer-group WORD in prefix-filter", @@ -8730,17 +8820,34 @@ DEFUN (clear_bgp_peer_group_in_prefix_filter, BGP_CLEAR_SOFT_IN_ORF_PREFIX, argv[3]->arg); } -ALIAS (clear_bgp_peer_group_in_prefix_filter, - clear_bgp_ipv6_peer_group_in_prefix_filter_cmd, - "clear bgp ipv6 peer-group WORD in prefix-filter", - CLEAR_STR - BGP_STR - "Address family\n" - "Clear all members of peer-group\n" - "BGP peer-group name\n" - BGP_SOFT_IN_STR - "Push out prefix-list ORF and do inbound soft reconfig\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp external in", + * CLEAR_STR + * IP_STR + * BGP_STR + * "Clear all external peers\n" + * BGP_SOFT_IN_STR + * + * "clear ip bgp " BGP_INSTANCE_CMD " external in", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all external peers\n" + * BGP_SOFT_IN_STR + * + * "clear ip bgp " BGP_INSTANCE_CMD " external soft in", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all external peers\n" + * BGP_SOFT_STR + * BGP_SOFT_IN_STR + * + */ DEFUN (clear_ip_bgp_external_soft_in, clear_ip_bgp_external_soft_in_cmd, "clear ip bgp external soft in", @@ -8759,35 +8866,8 @@ DEFUN (clear_ip_bgp_external_soft_in, BGP_CLEAR_SOFT_IN, NULL); } -ALIAS (clear_ip_bgp_external_soft_in, - clear_ip_bgp_instance_external_soft_in_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " external soft in", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all external peers\n" - BGP_SOFT_STR - BGP_SOFT_IN_STR) -ALIAS (clear_ip_bgp_external_soft_in, - clear_ip_bgp_external_in_cmd, - "clear ip bgp external in", - CLEAR_STR - IP_STR - BGP_STR - "Clear all external peers\n" - BGP_SOFT_IN_STR) -ALIAS (clear_ip_bgp_external_soft_in, - clear_ip_bgp_instance_external_in_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " external in", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all external peers\n" - BGP_SOFT_IN_STR) DEFUN (clear_ip_bgp_external_in_prefix_filter, clear_ip_bgp_external_in_prefix_filter_cmd, @@ -8803,6 +8883,19 @@ DEFUN (clear_ip_bgp_external_in_prefix_filter, BGP_CLEAR_SOFT_IN_ORF_PREFIX, NULL); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp external ipv4 (unicast|multicast) in", + * CLEAR_STR + * IP_STR + * BGP_STR + * "Clear all external peers\n" + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * BGP_SOFT_IN_STR + * + */ DEFUN (clear_ip_bgp_external_ipv4_soft_in, clear_ip_bgp_external_ipv4_soft_in_cmd, "clear ip bgp external ipv4 (unicast|multicast) soft in", @@ -8824,6 +8917,20 @@ DEFUN (clear_ip_bgp_external_ipv4_soft_in, BGP_CLEAR_SOFT_IN, NULL); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " BGP_INSTANCE_CMD " external ipv4 (unicast|multicast) in", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all external peers\n" + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * BGP_SOFT_IN_STR + * + */ DEFUN (clear_ip_bgp_instance_external_ipv4_soft_in, clear_ip_bgp_instance_external_ipv4_soft_in_cmd, "clear ip bgp " BGP_INSTANCE_CMD " external ipv4 (unicast|multicast) soft in", @@ -8846,30 +8953,7 @@ DEFUN (clear_ip_bgp_instance_external_ipv4_soft_in, BGP_CLEAR_SOFT_IN, NULL); } -ALIAS (clear_ip_bgp_external_ipv4_soft_in, - clear_ip_bgp_external_ipv4_in_cmd, - "clear ip bgp external ipv4 (unicast|multicast) in", - CLEAR_STR - IP_STR - BGP_STR - "Clear all external peers\n" - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - BGP_SOFT_IN_STR) -ALIAS (clear_ip_bgp_instance_external_ipv4_soft_in, - clear_ip_bgp_instance_external_ipv4_in_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " external ipv4 (unicast|multicast) in", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all external peers\n" - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - BGP_SOFT_IN_STR) DEFUN (clear_ip_bgp_external_ipv4_in_prefix_filter, clear_ip_bgp_external_ipv4_in_prefix_filter_cmd, @@ -8892,6 +8976,62 @@ DEFUN (clear_ip_bgp_external_ipv4_in_prefix_filter, BGP_CLEAR_SOFT_IN_ORF_PREFIX, NULL); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear bgp " BGP_INSTANCE_CMD " external in", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all external peers\n" + * BGP_SOFT_IN_STR + * + * "clear bgp " BGP_INSTANCE_CMD " ipv6 external soft in", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Clear all external peers\n" + * BGP_SOFT_STR + * BGP_SOFT_IN_STR + * + * "clear bgp " BGP_INSTANCE_CMD " external soft in", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all external peers\n" + * BGP_SOFT_STR + * BGP_SOFT_IN_STR + * + * "clear bgp " BGP_INSTANCE_CMD " ipv6 external WORD in", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Clear all external peers\n" + * BGP_SOFT_IN_STR + * + * "clear bgp ipv6 external soft in", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "Clear all external peers\n" + * BGP_SOFT_STR + * BGP_SOFT_IN_STR + * + * "clear bgp ipv6 external WORD in", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "Clear all external peers\n" + * BGP_SOFT_IN_STR + * + * "clear bgp external in", + * CLEAR_STR + * BGP_STR + * "Clear all external peers\n" + * BGP_SOFT_IN_STR + * + */ DEFUN (clear_bgp_external_soft_in, clear_bgp_external_soft_in_cmd, "clear bgp external soft in", @@ -8909,73 +9049,24 @@ DEFUN (clear_bgp_external_soft_in, BGP_CLEAR_SOFT_IN, NULL); } -ALIAS (clear_bgp_external_soft_in, - clear_bgp_instance_external_soft_in_cmd, - "clear bgp " BGP_INSTANCE_CMD " external soft in", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all external peers\n" - BGP_SOFT_STR - BGP_SOFT_IN_STR) -ALIAS (clear_bgp_external_soft_in, - clear_bgp_ipv6_external_soft_in_cmd, - "clear bgp ipv6 external soft in", - CLEAR_STR - BGP_STR - "Address family\n" - "Clear all external peers\n" - BGP_SOFT_STR - BGP_SOFT_IN_STR) -ALIAS (clear_bgp_external_soft_in, - clear_bgp_instance_ipv6_external_soft_in_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 external soft in", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Clear all external peers\n" - BGP_SOFT_STR - BGP_SOFT_IN_STR) -ALIAS (clear_bgp_external_soft_in, - clear_bgp_external_in_cmd, - "clear bgp external in", - CLEAR_STR - BGP_STR - "Clear all external peers\n" - BGP_SOFT_IN_STR) -ALIAS (clear_bgp_external_soft_in, - clear_bgp_instance_external_in_cmd, - "clear bgp " BGP_INSTANCE_CMD " external in", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all external peers\n" - BGP_SOFT_IN_STR) -ALIAS (clear_bgp_external_soft_in, - clear_bgp_ipv6_external_in_cmd, - "clear bgp ipv6 external WORD in", - CLEAR_STR - BGP_STR - "Address family\n" - "Clear all external peers\n" - BGP_SOFT_IN_STR) -ALIAS (clear_bgp_external_soft_in, - clear_bgp_instance_ipv6_external_in_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 external WORD in", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Clear all external peers\n" - BGP_SOFT_IN_STR) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear bgp ipv6 external in prefix-filter", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "Clear all external peers\n" + * BGP_SOFT_IN_STR + * "Push out prefix-list ORF and do inbound soft reconfig\n" + * + */ DEFUN (clear_bgp_external_in_prefix_filter, clear_bgp_external_in_prefix_filter_cmd, "clear bgp external in prefix-filter", @@ -8984,21 +9075,39 @@ DEFUN (clear_bgp_external_in_prefix_filter, "Clear all external peers\n" BGP_SOFT_IN_STR "Push out prefix-list ORF and do inbound soft reconfig\n") -{ - return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_external, - BGP_CLEAR_SOFT_IN_ORF_PREFIX, NULL); -} - -ALIAS (clear_bgp_external_in_prefix_filter, - clear_bgp_ipv6_external_in_prefix_filter_cmd, - "clear bgp ipv6 external in prefix-filter", - CLEAR_STR - BGP_STR - "Address family\n" - "Clear all external peers\n" - BGP_SOFT_IN_STR - "Push out prefix-list ORF and do inbound soft reconfig\n") +{ + return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_external, + BGP_CLEAR_SOFT_IN_ORF_PREFIX, NULL); +} + +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " CMD_AS_RANGE " in", + * CLEAR_STR + * IP_STR + * BGP_STR + * "Clear peers with the AS number\n" + * BGP_SOFT_IN_STR + * + * "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " in", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear peers with the AS number\n" + * BGP_SOFT_IN_STR + * + * "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " soft in", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear peers with the AS number\n" + * BGP_SOFT_STR + * BGP_SOFT_IN_STR + * + */ DEFUN (clear_ip_bgp_as_soft_in, clear_ip_bgp_as_soft_in_cmd, "clear ip bgp " CMD_AS_RANGE " soft in", @@ -9017,35 +9126,8 @@ DEFUN (clear_ip_bgp_as_soft_in, BGP_CLEAR_SOFT_IN, argv[3]->arg); } -ALIAS (clear_ip_bgp_as_soft_in, - clear_ip_bgp_instance_as_soft_in_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " soft in", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear peers with the AS number\n" - BGP_SOFT_STR - BGP_SOFT_IN_STR) -ALIAS (clear_ip_bgp_as_soft_in, - clear_ip_bgp_as_in_cmd, - "clear ip bgp " CMD_AS_RANGE " in", - CLEAR_STR - IP_STR - BGP_STR - "Clear peers with the AS number\n" - BGP_SOFT_IN_STR) -ALIAS (clear_ip_bgp_as_soft_in, - clear_ip_bgp_instance_as_in_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " in", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear peers with the AS number\n" - BGP_SOFT_IN_STR) DEFUN (clear_ip_bgp_as_in_prefix_filter, clear_ip_bgp_as_in_prefix_filter_cmd, @@ -9061,6 +9143,19 @@ DEFUN (clear_ip_bgp_as_in_prefix_filter, BGP_CLEAR_SOFT_IN_ORF_PREFIX, argv[3]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " CMD_AS_RANGE " ipv4 (unicast|multicast) in", + * CLEAR_STR + * IP_STR + * BGP_STR + * "Clear peers with the AS number\n" + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * BGP_SOFT_IN_STR + * + */ DEFUN (clear_ip_bgp_as_ipv4_soft_in, clear_ip_bgp_as_ipv4_soft_in_cmd, "clear ip bgp " CMD_AS_RANGE " ipv4 (unicast|multicast) soft in", @@ -9082,6 +9177,20 @@ DEFUN (clear_ip_bgp_as_ipv4_soft_in, BGP_CLEAR_SOFT_IN, argv[3]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " ipv4 (unicast|multicast) in", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear peers with the AS number\n" + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * BGP_SOFT_IN_STR + * + */ DEFUN (clear_ip_bgp_instance_as_ipv4_soft_in, clear_ip_bgp_instance_as_ipv4_soft_in_cmd, "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " ipv4 (unicast|multicast) soft in", @@ -9104,30 +9213,7 @@ DEFUN (clear_ip_bgp_instance_as_ipv4_soft_in, BGP_CLEAR_SOFT_IN, argv[5]->arg); } -ALIAS (clear_ip_bgp_as_ipv4_soft_in, - clear_ip_bgp_as_ipv4_in_cmd, - "clear ip bgp " CMD_AS_RANGE " ipv4 (unicast|multicast) in", - CLEAR_STR - IP_STR - BGP_STR - "Clear peers with the AS number\n" - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - BGP_SOFT_IN_STR) -ALIAS (clear_ip_bgp_instance_as_ipv4_soft_in, - clear_ip_bgp_instance_as_ipv4_in_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " ipv4 (unicast|multicast) in", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear peers with the AS number\n" - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - BGP_SOFT_IN_STR) DEFUN (clear_ip_bgp_as_ipv4_in_prefix_filter, clear_ip_bgp_as_ipv4_in_prefix_filter_cmd, @@ -9150,6 +9236,18 @@ DEFUN (clear_ip_bgp_as_ipv4_in_prefix_filter, BGP_CLEAR_SOFT_IN_ORF_PREFIX, argv[3]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " CMD_AS_RANGE " vpnv4 unicast in", + * CLEAR_STR + * IP_STR + * BGP_STR + * "Clear peers with the AS number\n" + * "Address family\n" + * "Address Family modifier\n" + * BGP_SOFT_IN_STR + * + */ DEFUN (clear_ip_bgp_as_vpnv4_soft_in, clear_ip_bgp_as_vpnv4_soft_in_cmd, "clear ip bgp " CMD_AS_RANGE " vpnv4 unicast soft in", @@ -9166,17 +9264,19 @@ DEFUN (clear_ip_bgp_as_vpnv4_soft_in, BGP_CLEAR_SOFT_IN, argv[3]->arg); } -ALIAS (clear_ip_bgp_as_vpnv4_soft_in, - clear_ip_bgp_as_vpnv4_in_cmd, - "clear ip bgp " CMD_AS_RANGE " vpnv4 unicast in", - CLEAR_STR - IP_STR - BGP_STR - "Clear peers with the AS number\n" - "Address family\n" - "Address Family modifier\n" - BGP_SOFT_IN_STR) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " CMD_AS_RANGE " encap unicast in", + * CLEAR_STR + * IP_STR + * BGP_STR + * "Clear peers with the AS number\n" + * "Address family\n" + * "Address Family modifier\n" + * "Soft reconfig inbound update\n" + * + */ DEFUN (clear_ip_bgp_as_encap_soft_in, clear_ip_bgp_as_encap_soft_in_cmd, "clear ip bgp " CMD_AS_RANGE " encap unicast soft in", @@ -9193,17 +9293,63 @@ DEFUN (clear_ip_bgp_as_encap_soft_in, BGP_CLEAR_SOFT_IN, argv[3]->arg); } -ALIAS (clear_ip_bgp_as_encap_soft_in, - clear_ip_bgp_as_encap_in_cmd, - "clear ip bgp " CMD_AS_RANGE " encap unicast in", - CLEAR_STR - IP_STR - BGP_STR - "Clear peers with the AS number\n" - "Address family\n" - "Address Family modifier\n" - "Soft reconfig inbound update\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear bgp ipv6 " CMD_AS_RANGE " in", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "Clear peers with the AS number\n" + * BGP_SOFT_IN_STR + * + * "clear bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " in", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear peers with the AS number\n" + * BGP_SOFT_IN_STR + * + * "clear bgp " BGP_INSTANCE_CMD " ipv6 " CMD_AS_RANGE " in", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Clear peers with the AS number\n" + * BGP_SOFT_IN_STR + * + * "clear bgp ipv6 " CMD_AS_RANGE " soft in", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "Clear peers with the AS number\n" + * BGP_SOFT_STR + * BGP_SOFT_IN_STR + * + * "clear bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " soft in", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear peers with the AS number\n" + * BGP_SOFT_STR + * BGP_SOFT_IN_STR + * + * "clear bgp " CMD_AS_RANGE " in", + * CLEAR_STR + * BGP_STR + * "Clear peers with the AS number\n" + * BGP_SOFT_IN_STR + * + * "clear bgp " BGP_INSTANCE_CMD " ipv6 " CMD_AS_RANGE " soft in", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Clear peers with the AS number\n" + * BGP_SOFT_STR + * BGP_SOFT_IN_STR + * + */ DEFUN (clear_bgp_as_soft_in, clear_bgp_as_soft_in_cmd, "clear bgp " CMD_AS_RANGE " soft in", @@ -9221,73 +9367,24 @@ DEFUN (clear_bgp_as_soft_in, BGP_CLEAR_SOFT_IN, argv[2]->arg); } -ALIAS (clear_bgp_as_soft_in, - clear_bgp_instance_as_soft_in_cmd, - "clear bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " soft in", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear peers with the AS number\n" - BGP_SOFT_STR - BGP_SOFT_IN_STR) -ALIAS (clear_bgp_as_soft_in, - clear_bgp_ipv6_as_soft_in_cmd, - "clear bgp ipv6 " CMD_AS_RANGE " soft in", - CLEAR_STR - BGP_STR - "Address family\n" - "Clear peers with the AS number\n" - BGP_SOFT_STR - BGP_SOFT_IN_STR) -ALIAS (clear_bgp_as_soft_in, - clear_bgp_instance_ipv6_as_soft_in_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 " CMD_AS_RANGE " soft in", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Clear peers with the AS number\n" - BGP_SOFT_STR - BGP_SOFT_IN_STR) -ALIAS (clear_bgp_as_soft_in, - clear_bgp_as_in_cmd, - "clear bgp " CMD_AS_RANGE " in", - CLEAR_STR - BGP_STR - "Clear peers with the AS number\n" - BGP_SOFT_IN_STR) -ALIAS (clear_bgp_as_soft_in, - clear_bgp_instance_as_in_cmd, - "clear bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " in", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear peers with the AS number\n" - BGP_SOFT_IN_STR) -ALIAS (clear_bgp_as_soft_in, - clear_bgp_ipv6_as_in_cmd, - "clear bgp ipv6 " CMD_AS_RANGE " in", - CLEAR_STR - BGP_STR - "Address family\n" - "Clear peers with the AS number\n" - BGP_SOFT_IN_STR) -ALIAS (clear_bgp_as_soft_in, - clear_bgp_instance_ipv6_as_in_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 " CMD_AS_RANGE " in", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Clear peers with the AS number\n" - BGP_SOFT_IN_STR) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear bgp ipv6 " CMD_AS_RANGE " in prefix-filter", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "Clear peers with the AS number\n" + * BGP_SOFT_IN_STR + * "Push out prefix-list ORF and do inbound soft reconfig\n" + * + */ DEFUN (clear_bgp_as_in_prefix_filter, clear_bgp_as_in_prefix_filter_cmd, "clear bgp " CMD_AS_RANGE " in prefix-filter", @@ -9301,17 +9398,19 @@ DEFUN (clear_bgp_as_in_prefix_filter, BGP_CLEAR_SOFT_IN_ORF_PREFIX, argv[2]->arg); } -ALIAS (clear_bgp_as_in_prefix_filter, - clear_bgp_ipv6_as_in_prefix_filter_cmd, - "clear bgp ipv6 " CMD_AS_RANGE " in prefix-filter", - CLEAR_STR - BGP_STR - "Address family\n" - "Clear peers with the AS number\n" - BGP_SOFT_IN_STR - "Push out prefix-list ORF and do inbound soft reconfig\n") /* Both soft-reconfiguration */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " BGP_INSTANCE_CMD " * soft", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all peers\n" + * BGP_SOFT_STR + * + */ DEFUN (clear_ip_bgp_all_soft, clear_ip_bgp_all_soft_cmd, "clear ip bgp * soft", @@ -9329,15 +9428,6 @@ DEFUN (clear_ip_bgp_all_soft, BGP_CLEAR_SOFT_BOTH, NULL); } -ALIAS (clear_ip_bgp_all_soft, - clear_ip_bgp_instance_all_soft_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " * soft", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all peers\n" - BGP_SOFT_STR) DEFUN (clear_ip_bgp_all_ipv4_soft, @@ -9411,6 +9501,31 @@ DEFUN (clear_ip_bgp_all_encap_soft, BGP_CLEAR_SOFT_BOTH, argv[0]); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear bgp ipv6 * soft", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "Clear all peers\n" + * BGP_SOFT_STR + * + * "clear bgp " BGP_INSTANCE_CMD " * soft", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all peers\n" + * BGP_SOFT_STR + * + * "clear bgp " BGP_INSTANCE_CMD " ipv6 * soft", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Clear all peers\n" + * BGP_SOFT_STR + * + */ DEFUN (clear_bgp_all_soft, clear_bgp_all_soft_cmd, "clear bgp * soft", @@ -9427,34 +9542,21 @@ DEFUN (clear_bgp_all_soft, BGP_CLEAR_SOFT_BOTH, NULL); } -ALIAS (clear_bgp_all_soft, - clear_bgp_instance_all_soft_cmd, - "clear bgp " BGP_INSTANCE_CMD " * soft", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all peers\n" - BGP_SOFT_STR) -ALIAS (clear_bgp_all_soft, - clear_bgp_ipv6_all_soft_cmd, - "clear bgp ipv6 * soft", - CLEAR_STR - BGP_STR - "Address family\n" - "Clear all peers\n" - BGP_SOFT_STR) -ALIAS (clear_bgp_all_soft, - clear_bgp_instance_ipv6_all_soft_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 * soft", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Clear all peers\n" - BGP_SOFT_STR) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " BGP_INSTANCE_CMD " (A.B.C.D|WORD) soft", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "BGP neighbor address to clear\n" + * "BGP neighbor on interface to clear\n" + * BGP_SOFT_STR + * + */ DEFUN (clear_ip_bgp_peer_soft, clear_ip_bgp_peer_soft_cmd, "clear ip bgp (A.B.C.D|WORD) soft", @@ -9473,16 +9575,6 @@ DEFUN (clear_ip_bgp_peer_soft, BGP_CLEAR_SOFT_BOTH, argv[3]->arg); } -ALIAS (clear_ip_bgp_peer_soft, - clear_ip_bgp_instance_peer_soft_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " (A.B.C.D|WORD) soft", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "BGP neighbor address to clear\n" - "BGP neighbor on interface to clear\n" - BGP_SOFT_STR) DEFUN (clear_ip_bgp_peer_ipv4_soft, clear_ip_bgp_peer_ipv4_soft_cmd, @@ -9558,6 +9650,37 @@ DEFUN (clear_ip_bgp_peer_encap_soft, BGP_CLEAR_SOFT_BOTH, argv[3]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear bgp ipv6 (A.B.C.D|X:X::X:X|WORD) soft", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "BGP neighbor address to clear\n" + * "BGP IPv6 neighbor to clear\n" + * "BGP neighbor on interface to clear\n" + * BGP_SOFT_STR + * + * "clear bgp " BGP_INSTANCE_CMD " ipv6 (A.B.C.D|X:X::X:X|WORD) soft", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "BGP neighbor address to clear\n" + * "BGP IPv6 neighbor to clear\n" + * "BGP neighbor on interface to clear\n" + * BGP_SOFT_STR + * + * "clear bgp " BGP_INSTANCE_CMD " (A.B.C.D|X:X::X:X|WORD) soft", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "BGP neighbor address to clear\n" + * "BGP IPv6 neighbor to clear\n" + * "BGP neighbor on interface to clear\n" + * BGP_SOFT_STR + * + */ DEFUN (clear_bgp_peer_soft, clear_bgp_peer_soft_cmd, "clear bgp (A.B.C.D|X:X::X:X|WORD) soft", @@ -9576,40 +9699,21 @@ DEFUN (clear_bgp_peer_soft, BGP_CLEAR_SOFT_BOTH, argv[2]->arg); } -ALIAS (clear_bgp_peer_soft, - clear_bgp_instance_peer_soft_cmd, - "clear bgp " BGP_INSTANCE_CMD " (A.B.C.D|X:X::X:X|WORD) soft", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "BGP neighbor address to clear\n" - "BGP IPv6 neighbor to clear\n" - "BGP neighbor on interface to clear\n" - BGP_SOFT_STR) -ALIAS (clear_bgp_peer_soft, - clear_bgp_ipv6_peer_soft_cmd, - "clear bgp ipv6 (A.B.C.D|X:X::X:X|WORD) soft", - CLEAR_STR - BGP_STR - "Address family\n" - "BGP neighbor address to clear\n" - "BGP IPv6 neighbor to clear\n" - "BGP neighbor on interface to clear\n" - BGP_SOFT_STR) -ALIAS (clear_bgp_peer_soft, - clear_bgp_instance_ipv6_peer_soft_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 (A.B.C.D|X:X::X:X|WORD) soft", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "BGP neighbor address to clear\n" - "BGP IPv6 neighbor to clear\n" - "BGP neighbor on interface to clear\n" - BGP_SOFT_STR) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD soft", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * BGP_SOFT_STR + * + */ DEFUN (clear_ip_bgp_peer_group_soft, clear_ip_bgp_peer_group_soft_cmd, "clear ip bgp peer-group WORD soft", @@ -9628,16 +9732,6 @@ DEFUN (clear_ip_bgp_peer_group_soft, BGP_CLEAR_SOFT_BOTH, argv[4]->arg); } -ALIAS (clear_ip_bgp_peer_group_soft, - clear_ip_bgp_instance_peer_group_soft_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD soft", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all members of peer-group\n" - "BGP peer-group name\n" - BGP_SOFT_STR) DEFUN (clear_ip_bgp_peer_group_ipv4_soft, clear_ip_bgp_peer_group_ipv4_soft_cmd, @@ -9682,6 +9776,34 @@ DEFUN (clear_ip_bgp_instance_peer_group_ipv4_soft, BGP_CLEAR_SOFT_BOTH, argv[6]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear bgp " BGP_INSTANCE_CMD " ipv6 peer-group WORD soft", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * BGP_SOFT_STR + * + * "clear bgp " BGP_INSTANCE_CMD " peer-group WORD soft", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * BGP_SOFT_STR + * + * "clear bgp ipv6 peer-group WORD soft", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "Clear all members of peer-group\n" + * "BGP peer-group name\n" + * BGP_SOFT_STR + * + */ DEFUN (clear_bgp_peer_group_soft, clear_bgp_peer_group_soft_cmd, "clear bgp peer-group WORD soft", @@ -9699,37 +9821,20 @@ DEFUN (clear_bgp_peer_group_soft, BGP_CLEAR_SOFT_BOTH, argv[3]->arg); } -ALIAS (clear_bgp_peer_group_soft, - clear_bgp_instance_peer_group_soft_cmd, - "clear bgp " BGP_INSTANCE_CMD " peer-group WORD soft", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all members of peer-group\n" - "BGP peer-group name\n" - BGP_SOFT_STR) -ALIAS (clear_bgp_peer_group_soft, - clear_bgp_ipv6_peer_group_soft_cmd, - "clear bgp ipv6 peer-group WORD soft", - CLEAR_STR - BGP_STR - "Address family\n" - "Clear all members of peer-group\n" - "BGP peer-group name\n" - BGP_SOFT_STR) -ALIAS (clear_bgp_peer_group_soft, - clear_bgp_instance_ipv6_peer_group_soft_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 peer-group WORD soft", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Clear all members of peer-group\n" - "BGP peer-group name\n" - BGP_SOFT_STR) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " BGP_INSTANCE_CMD " external soft", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all external peers\n" + * BGP_SOFT_STR + * + */ DEFUN (clear_ip_bgp_external_soft, clear_ip_bgp_external_soft_cmd, "clear ip bgp external soft", @@ -9747,15 +9852,6 @@ DEFUN (clear_ip_bgp_external_soft, BGP_CLEAR_SOFT_BOTH, NULL); } -ALIAS (clear_ip_bgp_external_soft, - clear_ip_bgp_instance_external_soft_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " external soft", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all external peers\n" - BGP_SOFT_STR) DEFUN (clear_ip_bgp_external_ipv4_soft, clear_ip_bgp_external_ipv4_soft_cmd, @@ -9798,6 +9894,31 @@ DEFUN (clear_ip_bgp_instance_external_ipv4_soft, BGP_CLEAR_SOFT_BOTH, NULL); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear bgp " BGP_INSTANCE_CMD " external soft", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear all external peers\n" + * BGP_SOFT_STR + * + * "clear bgp " BGP_INSTANCE_CMD " ipv6 external soft", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Clear all external peers\n" + * BGP_SOFT_STR + * + * "clear bgp ipv6 external soft", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "Clear all external peers\n" + * BGP_SOFT_STR + * + */ DEFUN (clear_bgp_external_soft, clear_bgp_external_soft_cmd, "clear bgp external soft", @@ -9814,34 +9935,20 @@ DEFUN (clear_bgp_external_soft, BGP_CLEAR_SOFT_BOTH, NULL); } -ALIAS (clear_bgp_external_soft, - clear_bgp_instance_external_soft_cmd, - "clear bgp " BGP_INSTANCE_CMD " external soft", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear all external peers\n" - BGP_SOFT_STR) -ALIAS (clear_bgp_external_soft, - clear_bgp_ipv6_external_soft_cmd, - "clear bgp ipv6 external soft", - CLEAR_STR - BGP_STR - "Address family\n" - "Clear all external peers\n" - BGP_SOFT_STR) -ALIAS (clear_bgp_external_soft, - clear_bgp_instance_ipv6_external_soft_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 external soft", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Clear all external peers\n" - BGP_SOFT_STR) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " soft", + * CLEAR_STR + * IP_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear peers with the AS number\n" + * BGP_SOFT_STR + * + */ DEFUN (clear_ip_bgp_as_soft, clear_ip_bgp_as_soft_cmd, "clear ip bgp " CMD_AS_RANGE " soft", @@ -9859,15 +9966,6 @@ DEFUN (clear_ip_bgp_as_soft, BGP_CLEAR_SOFT_BOTH, argv[3]->arg); } -ALIAS (clear_ip_bgp_as_soft, - clear_ip_bgp_instance_as_soft_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " soft", - CLEAR_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear peers with the AS number\n" - BGP_SOFT_STR) DEFUN (clear_ip_bgp_as_ipv4_soft, clear_ip_bgp_as_ipv4_soft_cmd, @@ -9940,6 +10038,31 @@ DEFUN (clear_ip_bgp_as_encap_soft, BGP_CLEAR_SOFT_BOTH, argv[3]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "clear bgp ipv6 " CMD_AS_RANGE " soft", + * CLEAR_STR + * BGP_STR + * "Address family\n" + * "Clear peers with the AS number\n" + * BGP_SOFT_STR + * + * "clear bgp " BGP_INSTANCE_CMD " ipv6 " CMD_AS_RANGE " soft", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Clear peers with the AS number\n" + * BGP_SOFT_STR + * + * "clear bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " soft", + * CLEAR_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Clear peers with the AS number\n" + * BGP_SOFT_STR + * + */ DEFUN (clear_bgp_as_soft, clear_bgp_as_soft_cmd, "clear bgp " CMD_AS_RANGE " soft", @@ -9956,33 +10079,8 @@ DEFUN (clear_bgp_as_soft, BGP_CLEAR_SOFT_BOTH, argv[2]->arg); } -ALIAS (clear_bgp_as_soft, - clear_bgp_instance_as_soft_cmd, - "clear bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " soft", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Clear peers with the AS number\n" - BGP_SOFT_STR) - -ALIAS (clear_bgp_as_soft, - clear_bgp_ipv6_as_soft_cmd, - "clear bgp ipv6 " CMD_AS_RANGE " soft", - CLEAR_STR - BGP_STR - "Address family\n" - "Clear peers with the AS number\n" - BGP_SOFT_STR) - -ALIAS (clear_bgp_as_soft, - clear_bgp_instance_ipv6_as_soft_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 " CMD_AS_RANGE " soft", - CLEAR_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Clear peers with the AS number\n" - BGP_SOFT_STR) + + DEFUN (show_bgp_views, show_bgp_views_cmd, @@ -10123,7 +10221,7 @@ DEFUN (show_bgp_vrfs, return CMD_SUCCESS; } -DEFUN (show_bgp_memory, +DEFUN (show_bgp_memory, show_bgp_memory_cmd, "show bgp memory", SHOW_STR @@ -10704,7 +10802,18 @@ DEFUN (show_ip_bgp_instance_all_summary, return CMD_SUCCESS; } -DEFUN (show_ip_bgp_ipv4_summary, +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp ipv4 (unicast|multicast) summary {json}", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * "Summary of BGP neighbor status\n" + * + */ +DEFUN (show_ip_bgp_ipv4_summary, show_ip_bgp_ipv4_summary_cmd, "show ip bgp ipv4 (unicast|multicast) summary {json}", SHOW_STR @@ -10723,15 +10832,6 @@ DEFUN (show_ip_bgp_ipv4_summary, return bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_UNICAST, uj); } -ALIAS (show_ip_bgp_ipv4_summary, - show_bgp_ipv4_safi_summary_cmd, - "show bgp ipv4 (unicast|multicast) summary {json}", - SHOW_STR - BGP_STR - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - "Summary of BGP neighbor status\n") DEFUN (show_bgp_ipv4_vpn_summary, show_bgp_ipv4_vpn_summary_cmd, @@ -10760,6 +10860,19 @@ DEFUN (show_bgp_ipv6_vpn_summary, return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_MPLS_VPN, use_json (argc, argv)); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp view WORD ipv4 (unicast|multicast) summary {json}", + * SHOW_STR + * BGP_STR + * "BGP view\n" + * "View name\n" + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * "Summary of BGP neighbor status\n" + * + */ DEFUN (show_ip_bgp_instance_ipv4_summary, show_ip_bgp_instance_ipv4_summary_cmd, "show ip bgp view WORD ipv4 (unicast|multicast) summary {json}", @@ -10781,17 +10894,6 @@ DEFUN (show_ip_bgp_instance_ipv4_summary, return bgp_show_summary_vty (vty, argv[4]->arg, AFI_IP, SAFI_UNICAST, uj); } -ALIAS (show_ip_bgp_instance_ipv4_summary, - show_bgp_instance_ipv4_safi_summary_cmd, - "show bgp view WORD ipv4 (unicast|multicast) summary {json}", - SHOW_STR - BGP_STR - "BGP view\n" - "View name\n" - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - "Summary of BGP neighbor status\n") DEFUN (show_ip_bgp_vpnv4_all_summary, show_ip_bgp_vpnv4_all_summary_cmd, @@ -10835,6 +10937,15 @@ DEFUN (show_ip_bgp_vpnv4_rd_summary, } #ifdef HAVE_IPV6 +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp ipv6 summary {json}", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Summary of BGP neighbor status\n" + * + */ DEFUN (show_bgp_summary, show_bgp_summary_cmd, "show bgp summary {json}", @@ -10846,6 +10957,16 @@ DEFUN (show_bgp_summary, return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, use_json(argc, argv)); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp " BGP_INSTANCE_CMD " ipv6 summary {json}", + * SHOW_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Summary of BGP neighbor status\n" + * + */ DEFUN (show_bgp_instance_summary, show_bgp_instance_summary_cmd, "show bgp " BGP_INSTANCE_CMD " summary {json}", @@ -10873,22 +10994,7 @@ DEFUN (show_bgp_instance_all_summary, return CMD_SUCCESS; } -ALIAS (show_bgp_summary, - show_bgp_ipv6_summary_cmd, - "show bgp ipv6 summary {json}", - SHOW_STR - BGP_STR - "Address family\n" - "Summary of BGP neighbor status\n") -ALIAS (show_bgp_instance_summary, - show_bgp_instance_ipv6_summary_cmd, - "show bgp " BGP_INSTANCE_CMD " ipv6 summary {json}", - SHOW_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Summary of BGP neighbor status\n") DEFUN (show_bgp_ipv6_safi_summary, show_bgp_ipv6_safi_summary_cmd, @@ -10928,7 +11034,7 @@ DEFUN (show_bgp_instance_ipv6_safi_summary, } /* old command */ -DEFUN (show_ipv6_bgp_summary, +DEFUN (show_ipv6_bgp_summary, show_ipv6_bgp_summary_cmd, "show ipv6 bgp summary {json}", SHOW_STR @@ -10942,7 +11048,7 @@ DEFUN (show_ipv6_bgp_summary, } /* old command */ -DEFUN (show_ipv6_mbgp_summary, +DEFUN (show_ipv6_mbgp_summary, show_ipv6_mbgp_summary_cmd, "show ipv6 mbgp summary {json}", SHOW_STR @@ -12786,6 +12892,51 @@ bgp_show_all_instances_neighbors_vty (struct vty *vty, u_char use_json) } /* "show ip bgp neighbors" commands. */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip bgp vpnv4 rd ASN:nn_or_IP-address:nn neighbors {json}", + * SHOW_STR + * IP_STR + * BGP_STR + * "Display VPNv4 NLRI specific information\n" + * "Display information for a route distinguisher\n" + * "VPN Route Distinguisher\n" + * "Detailed information on TCP and BGP neighbor connections\n" + * "JavaScript Object Notation\n" + * + * "show bgp neighbors {json}", + * SHOW_STR + * BGP_STR + * "Detailed information on TCP and BGP neighbor connections\n" + * "JavaScript Object Notation\n" + * + * "show ip bgp vpnv4 all neighbors {json}", + * SHOW_STR + * IP_STR + * BGP_STR + * "Display VPNv4 NLRI specific information\n" + * "Display information about all VPNv4 NLRIs\n" + * "Detailed information on TCP and BGP neighbor connections\n" + * "JavaScript Object Notation\n" + * + * "show ip bgp ipv4 (unicast|multicast) neighbors {json}", + * SHOW_STR + * IP_STR + * BGP_STR + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * "Detailed information on TCP and BGP neighbor connections\n" + * "JavaScript Object Notation\n" + * + * "show bgp ipv6 neighbors {json}", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Detailed information on TCP and BGP neighbor connections\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_ip_bgp_neighbors, show_ip_bgp_neighbors_cmd, "show ip bgp neighbors {json}", @@ -12800,58 +12951,66 @@ DEFUN (show_ip_bgp_neighbors, return bgp_show_neighbor_vty (vty, NULL, show_all, NULL, uj, NULL); } -ALIAS (show_ip_bgp_neighbors, - show_ip_bgp_ipv4_neighbors_cmd, - "show ip bgp ipv4 (unicast|multicast) neighbors {json}", - SHOW_STR - IP_STR - BGP_STR - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - "Detailed information on TCP and BGP neighbor connections\n" - "JavaScript Object Notation\n") -ALIAS (show_ip_bgp_neighbors, - show_ip_bgp_vpnv4_all_neighbors_cmd, - "show ip bgp vpnv4 all neighbors {json}", - SHOW_STR - IP_STR - BGP_STR - "Display VPNv4 NLRI specific information\n" - "Display information about all VPNv4 NLRIs\n" - "Detailed information on TCP and BGP neighbor connections\n" - "JavaScript Object Notation\n") -ALIAS (show_ip_bgp_neighbors, - show_ip_bgp_vpnv4_rd_neighbors_cmd, - "show ip bgp vpnv4 rd ASN:nn_or_IP-address:nn neighbors {json}", - SHOW_STR - IP_STR - BGP_STR - "Display VPNv4 NLRI specific information\n" - "Display information for a route distinguisher\n" - "VPN Route Distinguisher\n" - "Detailed information on TCP and BGP neighbor connections\n" - "JavaScript Object Notation\n") -ALIAS (show_ip_bgp_neighbors, - show_bgp_neighbors_cmd, - "show bgp neighbors {json}", - SHOW_STR - BGP_STR - "Detailed information on TCP and BGP neighbor connections\n" - "JavaScript Object Notation\n") -ALIAS (show_ip_bgp_neighbors, - show_bgp_ipv6_neighbors_cmd, - "show bgp ipv6 neighbors {json}", - SHOW_STR - BGP_STR - "Address family\n" - "Detailed information on TCP and BGP neighbor connections\n" - "JavaScript Object Notation\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) {json}", + * SHOW_STR + * IP_STR + * BGP_STR + * "Address family\n" + * "Address Family modifier\n" + * "Address Family modifier\n" + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "Neighbor to display information about\n" + * "Neighbor on bgp configured interface\n" + * "JavaScript Object Notation\n" + * + * "show ip bgp vpnv4 rd ASN:nn_or_IP-address:nn neighbors A.B.C.D {json}", + * SHOW_STR + * IP_STR + * BGP_STR + * "Display VPNv4 NLRI specific information\n" + * "Display information about all VPNv4 NLRIs\n" + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "JavaScript Object Notation\n" + * + * "show ip bgp vpnv4 all neighbors A.B.C.D {json}", + * SHOW_STR + * IP_STR + * BGP_STR + * "Display VPNv4 NLRI specific information\n" + * "Display information about all VPNv4 NLRIs\n" + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "JavaScript Object Notation\n" + * + * "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) {json}", + * SHOW_STR + * BGP_STR + * "Address family\n" + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "Neighbor to display information about\n" + * "Neighbor on bgp configured interface\n" + * "JavaScript Object Notation\n" + * + * "show bgp neighbors (A.B.C.D|X:X::X:X|WORD) {json}", + * SHOW_STR + * BGP_STR + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "Neighbor to display information about\n" + * "Neighbor on bgp configured interface\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_ip_bgp_neighbors_peer, show_ip_bgp_neighbors_peer_cmd, "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) {json}", @@ -12869,68 +13028,29 @@ DEFUN (show_ip_bgp_neighbors_peer, return bgp_show_neighbor_vty (vty, NULL, show_peer, argv[argc - 2], uj, NULL); } -ALIAS (show_ip_bgp_neighbors_peer, - show_ip_bgp_ipv4_neighbors_peer_cmd, - "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) {json}", - SHOW_STR - IP_STR - BGP_STR - "Address family\n" - "Address Family modifier\n" - "Address Family modifier\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Neighbor on bgp configured interface\n" - "JavaScript Object Notation\n") -ALIAS (show_ip_bgp_neighbors_peer, - show_ip_bgp_vpnv4_all_neighbors_peer_cmd, - "show ip bgp vpnv4 all neighbors A.B.C.D {json}", - SHOW_STR - IP_STR - BGP_STR - "Display VPNv4 NLRI specific information\n" - "Display information about all VPNv4 NLRIs\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "JavaScript Object Notation\n") -ALIAS (show_ip_bgp_neighbors_peer, - show_ip_bgp_vpnv4_rd_neighbors_peer_cmd, - "show ip bgp vpnv4 rd ASN:nn_or_IP-address:nn neighbors A.B.C.D {json}", - SHOW_STR - IP_STR - BGP_STR - "Display VPNv4 NLRI specific information\n" - "Display information about all VPNv4 NLRIs\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "JavaScript Object Notation\n") -ALIAS (show_ip_bgp_neighbors_peer, - show_bgp_neighbors_peer_cmd, - "show bgp neighbors (A.B.C.D|X:X::X:X|WORD) {json}", - SHOW_STR - BGP_STR - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Neighbor on bgp configured interface\n" - "JavaScript Object Notation\n") -ALIAS (show_ip_bgp_neighbors_peer, - show_bgp_ipv6_neighbors_peer_cmd, - "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) {json}", - SHOW_STR - BGP_STR - "Address family\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Neighbor on bgp configured interface\n" - "JavaScript Object Notation\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp " BGP_INSTANCE_CMD " neighbors {json}", + * SHOW_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Detailed information on TCP and BGP neighbor connections\n" + * "JavaScript Object Notation\n" + * + * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors {json}", + * SHOW_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Detailed information on TCP and BGP neighbor connections\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_ip_bgp_instance_neighbors, show_ip_bgp_instance_neighbors_cmd, "show ip bgp " BGP_INSTANCE_CMD " neighbors {json}", @@ -12962,25 +13082,32 @@ DEFUN (show_ip_bgp_instance_all_neighbors, return CMD_SUCCESS; } -ALIAS (show_ip_bgp_instance_neighbors, - show_bgp_instance_neighbors_cmd, - "show bgp " BGP_INSTANCE_CMD " neighbors {json}", - SHOW_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Detailed information on TCP and BGP neighbor connections\n" - "JavaScript Object Notation\n") -ALIAS (show_ip_bgp_instance_neighbors, - show_bgp_instance_ipv6_neighbors_cmd, - "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors {json}", - SHOW_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Detailed information on TCP and BGP neighbor connections\n" - "JavaScript Object Notation\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) {json}", + * SHOW_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Address family\n" + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "Neighbor to display information about\n" + * "Neighbor on bgp configured interface\n" + * "JavaScript Object Notation\n" + * + * "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) {json}", + * SHOW_STR + * BGP_STR + * BGP_INSTANCE_HELP_STR + * "Detailed information on TCP and BGP neighbor connections\n" + * "Neighbor to display information about\n" + * "Neighbor to display information about\n" + * "Neighbor on bgp configured interface\n" + * "JavaScript Object Notation\n" + * + */ DEFUN (show_ip_bgp_instance_neighbors_peer, show_ip_bgp_instance_neighbors_peer_cmd, "show ip bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) {json}", @@ -12999,35 +13126,12 @@ DEFUN (show_ip_bgp_instance_neighbors_peer, return bgp_show_neighbor_vty (vty, argv[4]->arg, show_peer, argv[6]->arg, uj, NULL); } -ALIAS (show_ip_bgp_instance_neighbors_peer, - show_bgp_instance_neighbors_peer_cmd, - "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) {json}", - SHOW_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Neighbor on bgp configured interface\n" - "JavaScript Object Notation\n") -ALIAS (show_ip_bgp_instance_neighbors_peer, - show_bgp_instance_ipv6_neighbors_peer_cmd, - "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) {json}", - SHOW_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "Address family\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Neighbor on bgp configured interface\n" - "JavaScript Object Notation\n") /* Show BGP's AS paths internal data. There are both `show ip bgp paths' and `show ip mbgp paths'. Those functions results are the same.*/ -DEFUN (show_ip_bgp_paths, +DEFUN (show_ip_bgp_paths, show_ip_bgp_paths_cmd, "show ip bgp paths", SHOW_STR @@ -13040,7 +13144,7 @@ DEFUN (show_ip_bgp_paths, return CMD_SUCCESS; } -DEFUN (show_ip_bgp_ipv4_paths, +DEFUN (show_ip_bgp_ipv4_paths, show_ip_bgp_ipv4_paths_cmd, "show ip bgp ipv4 (unicast|multicast) paths", SHOW_STR @@ -13070,7 +13174,7 @@ community_show_all_iterator (struct hash_backet *backet, struct vty *vty) } /* Show BGP's community internal data. */ -DEFUN (show_ip_bgp_community_info, +DEFUN (show_ip_bgp_community_info, show_ip_bgp_community_info_cmd, "show ip bgp community-info", SHOW_STR @@ -13088,7 +13192,7 @@ DEFUN (show_ip_bgp_community_info, return CMD_SUCCESS; } -DEFUN (show_ip_bgp_attr_info, +DEFUN (show_ip_bgp_attr_info, show_ip_bgp_attr_info_cmd, "show ip bgp attribute-info", SHOW_STR @@ -14026,6 +14130,49 @@ DEFUN (bgp_redistribute_ipv4_ospf_metric_rmap, return bgp_redistribute_set (vty->index, AFI_IP, protocol, instance); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no redistribute (ospf|table) <1-65535> route-map WORD", + * NO_STR + * "Redistribute information from another routing protocol\n" + * "Open Shortest Path First (OSPFv2)\n" + * "Non-main Kernel Routing Table\n" + * "Instance ID/Table ID\n" + * "Route map reference\n" + * "Pointer to route-map entries\n" + * + * "no redistribute (ospf|table) <1-65535> metric <0-4294967295>", + * NO_STR + * "Redistribute information from another routing protocol\n" + * "Open Shortest Path First (OSPFv2)\n" + * "Non-main Kernel Routing Table\n" + * "Instance ID/Table ID\n" + * "Metric for redistributed routes\n" + * "Default metric\n" + * + * "no redistribute (ospf|table) <1-65535> route-map WORD metric <0-4294967295>", + * NO_STR + * "Redistribute information from another routing protocol\n" + * "Open Shortest Path First (OSPFv2)\n" + * "Non-main Kernel Routing Table\n" + * "Instance ID/Table ID\n" + * "Route map reference\n" + * "Pointer to route-map entries\n" + * "Metric for redistributed routes\n" + * "Default metric\n" + * + * "no redistribute (ospf|table) <1-65535> metric <0-4294967295> route-map WORD", + * NO_STR + * "Redistribute information from another routing protocol\n" + * "Open Shortest Path First (OSPFv2)\n" + * "Non-main Kernel Routing Table\n" + * "Instance ID/Table ID\n" + * "Metric for redistributed routes\n" + * "Default metric\n" + * "Route map reference\n" + * "Pointer to route-map entries\n" + * + */ DEFUN (no_bgp_redistribute_ipv4_ospf, no_bgp_redistribute_ipv4_ospf_cmd, "no redistribute (ospf|table) <1-65535>", @@ -14047,54 +14194,45 @@ DEFUN (no_bgp_redistribute_ipv4_ospf, return bgp_redistribute_unset (vty->index, AFI_IP, protocol, instance); } -ALIAS (no_bgp_redistribute_ipv4_ospf, - no_bgp_redistribute_ipv4_ospf_rmap_cmd, - "no redistribute (ospf|table) <1-65535> route-map WORD", - NO_STR - "Redistribute information from another routing protocol\n" - "Open Shortest Path First (OSPFv2)\n" - "Non-main Kernel Routing Table\n" - "Instance ID/Table ID\n" - "Route map reference\n" - "Pointer to route-map entries\n") -ALIAS (no_bgp_redistribute_ipv4_ospf, - no_bgp_redistribute_ipv4_ospf_metric_cmd, - "no redistribute (ospf|table) <1-65535> metric <0-4294967295>", - NO_STR - "Redistribute information from another routing protocol\n" - "Open Shortest Path First (OSPFv2)\n" - "Non-main Kernel Routing Table\n" - "Instance ID/Table ID\n" - "Metric for redistributed routes\n" - "Default metric\n") -ALIAS (no_bgp_redistribute_ipv4_ospf, - no_bgp_redistribute_ipv4_ospf_rmap_metric_cmd, - "no redistribute (ospf|table) <1-65535> route-map WORD metric <0-4294967295>", - NO_STR - "Redistribute information from another routing protocol\n" - "Open Shortest Path First (OSPFv2)\n" - "Non-main Kernel Routing Table\n" - "Instance ID/Table ID\n" - "Route map reference\n" - "Pointer to route-map entries\n" - "Metric for redistributed routes\n" - "Default metric\n") -ALIAS (no_bgp_redistribute_ipv4_ospf, - no_bgp_redistribute_ipv4_ospf_metric_rmap_cmd, - "no redistribute (ospf|table) <1-65535> metric <0-4294967295> route-map WORD", - NO_STR - "Redistribute information from another routing protocol\n" - "Open Shortest Path First (OSPFv2)\n" - "Non-main Kernel Routing Table\n" - "Instance ID/Table ID\n" - "Metric for redistributed routes\n" - "Default metric\n" - "Route map reference\n" - "Pointer to route-map entries\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no redistribute " QUAGGA_IP_REDIST_STR_BGPD " metric <0-4294967295> route-map WORD", + * NO_STR + * "Redistribute information from another routing protocol\n" + * QUAGGA_IP_REDIST_HELP_STR_BGPD + * "Metric for redistributed routes\n" + * "Default metric\n" + * "Route map reference\n" + * "Pointer to route-map entries\n" + * + * "no redistribute " QUAGGA_IP_REDIST_STR_BGPD " route-map WORD", + * NO_STR + * "Redistribute information from another routing protocol\n" + * QUAGGA_IP_REDIST_HELP_STR_BGPD + * "Route map reference\n" + * "Pointer to route-map entries\n" + * + * "no redistribute " QUAGGA_IP_REDIST_STR_BGPD " route-map WORD metric <0-4294967295>", + * NO_STR + * "Redistribute information from another routing protocol\n" + * QUAGGA_IP_REDIST_HELP_STR_BGPD + * "Route map reference\n" + * "Pointer to route-map entries\n" + * "Metric for redistributed routes\n" + * "Default metric\n" + * + * "no redistribute " QUAGGA_IP_REDIST_STR_BGPD " metric <0-4294967295>", + * NO_STR + * "Redistribute information from another routing protocol\n" + * QUAGGA_IP_REDIST_HELP_STR_BGPD + * "Metric for redistributed routes\n" + * "Default metric\n" + * + */ DEFUN (no_bgp_redistribute_ipv4, no_bgp_redistribute_ipv4_cmd, "no redistribute " QUAGGA_IP_REDIST_STR_BGPD, @@ -14113,45 +14251,9 @@ DEFUN (no_bgp_redistribute_ipv4, return bgp_redistribute_unset (vty->index, AFI_IP, type, 0); } -ALIAS (no_bgp_redistribute_ipv4, - no_bgp_redistribute_ipv4_rmap_cmd, - "no redistribute " QUAGGA_IP_REDIST_STR_BGPD " route-map WORD", - NO_STR - "Redistribute information from another routing protocol\n" - QUAGGA_IP_REDIST_HELP_STR_BGPD - "Route map reference\n" - "Pointer to route-map entries\n") -ALIAS (no_bgp_redistribute_ipv4, - no_bgp_redistribute_ipv4_metric_cmd, - "no redistribute " QUAGGA_IP_REDIST_STR_BGPD " metric <0-4294967295>", - NO_STR - "Redistribute information from another routing protocol\n" - QUAGGA_IP_REDIST_HELP_STR_BGPD - "Metric for redistributed routes\n" - "Default metric\n") -ALIAS (no_bgp_redistribute_ipv4, - no_bgp_redistribute_ipv4_rmap_metric_cmd, - "no redistribute " QUAGGA_IP_REDIST_STR_BGPD " route-map WORD metric <0-4294967295>", - NO_STR - "Redistribute information from another routing protocol\n" - QUAGGA_IP_REDIST_HELP_STR_BGPD - "Route map reference\n" - "Pointer to route-map entries\n" - "Metric for redistributed routes\n" - "Default metric\n") -ALIAS (no_bgp_redistribute_ipv4, - no_bgp_redistribute_ipv4_metric_rmap_cmd, - "no redistribute " QUAGGA_IP_REDIST_STR_BGPD " metric <0-4294967295> route-map WORD", - NO_STR - "Redistribute information from another routing protocol\n" - QUAGGA_IP_REDIST_HELP_STR_BGPD - "Metric for redistributed routes\n" - "Default metric\n" - "Route map reference\n" - "Pointer to route-map entries\n") #ifdef HAVE_IPV6 DEFUN (bgp_redistribute_ipv6, @@ -14277,6 +14379,41 @@ DEFUN (bgp_redistribute_ipv6_metric_rmap, return bgp_redistribute_set (vty->index, AFI_IP6, type, 0); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no redistribute " QUAGGA_IP6_REDIST_STR_BGPD " route-map WORD", + * NO_STR + * "Redistribute information from another routing protocol\n" + * QUAGGA_IP6_REDIST_HELP_STR_BGPD + * "Route map reference\n" + * "Pointer to route-map entries\n" + * + * "no redistribute " QUAGGA_IP6_REDIST_STR_BGPD " route-map WORD metric <0-4294967295>", + * NO_STR + * "Redistribute information from another routing protocol\n" + * QUAGGA_IP6_REDIST_HELP_STR_BGPD + * "Route map reference\n" + * "Pointer to route-map entries\n" + * "Metric for redistributed routes\n" + * "Default metric\n" + * + * "no redistribute " QUAGGA_IP6_REDIST_STR_BGPD " metric <0-4294967295> route-map WORD", + * NO_STR + * "Redistribute information from another routing protocol\n" + * QUAGGA_IP6_REDIST_HELP_STR_BGPD + * "Metric for redistributed routes\n" + * "Default metric\n" + * "Route map reference\n" + * "Pointer to route-map entries\n" + * + * "no redistribute " QUAGGA_IP6_REDIST_STR_BGPD " metric <0-4294967295>", + * NO_STR + * "Redistribute information from another routing protocol\n" + * QUAGGA_IP6_REDIST_HELP_STR_BGPD + * "Metric for redistributed routes\n" + * "Default metric\n" + * + */ DEFUN (no_bgp_redistribute_ipv6, no_bgp_redistribute_ipv6_cmd, "no redistribute " QUAGGA_IP6_REDIST_STR_BGPD, @@ -14296,45 +14433,9 @@ DEFUN (no_bgp_redistribute_ipv6, return bgp_redistribute_unset (vty->index, AFI_IP6, type, 0); } -ALIAS (no_bgp_redistribute_ipv6, - no_bgp_redistribute_ipv6_rmap_cmd, - "no redistribute " QUAGGA_IP6_REDIST_STR_BGPD " route-map WORD", - NO_STR - "Redistribute information from another routing protocol\n" - QUAGGA_IP6_REDIST_HELP_STR_BGPD - "Route map reference\n" - "Pointer to route-map entries\n") -ALIAS (no_bgp_redistribute_ipv6, - no_bgp_redistribute_ipv6_metric_cmd, - "no redistribute " QUAGGA_IP6_REDIST_STR_BGPD " metric <0-4294967295>", - NO_STR - "Redistribute information from another routing protocol\n" - QUAGGA_IP6_REDIST_HELP_STR_BGPD - "Metric for redistributed routes\n" - "Default metric\n") -ALIAS (no_bgp_redistribute_ipv6, - no_bgp_redistribute_ipv6_rmap_metric_cmd, - "no redistribute " QUAGGA_IP6_REDIST_STR_BGPD " route-map WORD metric <0-4294967295>", - NO_STR - "Redistribute information from another routing protocol\n" - QUAGGA_IP6_REDIST_HELP_STR_BGPD - "Route map reference\n" - "Pointer to route-map entries\n" - "Metric for redistributed routes\n" - "Default metric\n") -ALIAS (no_bgp_redistribute_ipv6, - no_bgp_redistribute_ipv6_metric_rmap_cmd, - "no redistribute " QUAGGA_IP6_REDIST_STR_BGPD " metric <0-4294967295> route-map WORD", - NO_STR - "Redistribute information from another routing protocol\n" - QUAGGA_IP6_REDIST_HELP_STR_BGPD - "Metric for redistributed routes\n" - "Default metric\n" - "Route map reference\n" - "Pointer to route-map entries\n") #endif /* HAVE_IPV6 */ int @@ -14477,12 +14578,10 @@ bgp_vty_init (void) /* "bgp config-type" commands. */ install_element (CONFIG_NODE, &bgp_config_type_cmd); - install_element (CONFIG_NODE, &no_bgp_config_type_val_cmd); /* bgp route-map delay-timer commands. */ install_element (CONFIG_NODE, &bgp_set_route_map_delay_timer_cmd); install_element (CONFIG_NODE, &no_bgp_set_route_map_delay_timer_cmd); - install_element (CONFIG_NODE, &no_bgp_set_route_map_delay_timer_val_cmd); /* Dummy commands (Currently not supported) */ install_element (BGP_NODE, &no_synchronization_cmd); @@ -14490,30 +14589,21 @@ bgp_vty_init (void) /* "router bgp" commands. */ install_element (CONFIG_NODE, &router_bgp_cmd); - install_element (CONFIG_NODE, &router_bgp_instance_cmd); - install_element (CONFIG_NODE, &router_bgp_noasn_cmd); /* "no router bgp" commands. */ install_element (CONFIG_NODE, &no_router_bgp_cmd); - install_element (CONFIG_NODE, &no_router_bgp_instance_cmd); - install_element (CONFIG_NODE, &no_router_bgp_noasn_cmd); /* "bgp router-id" commands. */ install_element (BGP_NODE, &bgp_router_id_cmd); install_element (BGP_NODE, &no_bgp_router_id_cmd); - install_element (BGP_NODE, &no_bgp_router_id_val_cmd); /* "bgp cluster-id" commands. */ install_element (BGP_NODE, &bgp_cluster_id_cmd); - install_element (BGP_NODE, &bgp_cluster_id32_cmd); install_element (BGP_NODE, &no_bgp_cluster_id_cmd); - install_element (BGP_NODE, &no_bgp_cluster_id_ip_cmd); - install_element (BGP_NODE, &no_bgp_cluster_id_decimal_cmd); /* "bgp confederation" commands. */ install_element (BGP_NODE, &bgp_confederation_identifier_cmd); install_element (BGP_NODE, &no_bgp_confederation_identifier_cmd); - install_element (BGP_NODE, &no_bgp_confederation_identifier_arg_cmd); /* "bgp confederation peers" commands. */ install_element (BGP_NODE, &bgp_confederation_peers_cmd); @@ -14523,12 +14613,9 @@ bgp_vty_init (void) install_element (BGP_NODE, &bgp_maxmed_admin_cmd); install_element (BGP_NODE, &no_bgp_maxmed_admin_cmd); install_element (BGP_NODE, &bgp_maxmed_admin_medv_cmd); - install_element (BGP_NODE, &no_bgp_maxmed_admin_medv_cmd); install_element (BGP_NODE, &bgp_maxmed_onstartup_cmd); install_element (BGP_NODE, &no_bgp_maxmed_onstartup_cmd); - install_element (BGP_NODE, &no_bgp_maxmed_onstartup_period_cmd); install_element (BGP_NODE, &bgp_maxmed_onstartup_medv_cmd); - install_element (BGP_NODE, &no_bgp_maxmed_onstartup_period_medv_cmd); /* bgp disable-ebgp-connected-nh-check */ install_element (BGP_NODE, &bgp_disable_connected_route_check_cmd); @@ -14538,7 +14625,6 @@ bgp_vty_init (void) install_element (BGP_NODE, &bgp_update_delay_cmd); install_element (BGP_NODE, &no_bgp_update_delay_cmd); install_element (BGP_NODE, &bgp_update_delay_establish_wait_cmd); - install_element (BGP_NODE, &no_bgp_update_delay_establish_wait_cmd); install_element (BGP_NODE, &bgp_wpkt_quanta_cmd); install_element (BGP_NODE, &no_bgp_wpkt_quanta_cmd); @@ -14549,38 +14635,27 @@ bgp_vty_init (void) /* "maximum-paths" commands. */ install_element (BGP_NODE, &bgp_maxpaths_cmd); install_element (BGP_NODE, &no_bgp_maxpaths_cmd); - install_element (BGP_NODE, &no_bgp_maxpaths_arg_cmd); install_element (BGP_IPV4_NODE, &bgp_maxpaths_cmd); install_element (BGP_IPV4_NODE, &no_bgp_maxpaths_cmd); - install_element (BGP_IPV4_NODE, &no_bgp_maxpaths_arg_cmd); install_element (BGP_IPV6_NODE, &bgp_maxpaths_cmd); install_element (BGP_IPV6_NODE, &no_bgp_maxpaths_cmd); - install_element (BGP_IPV6_NODE, &no_bgp_maxpaths_arg_cmd); install_element (BGP_NODE, &bgp_maxpaths_ibgp_cmd); install_element(BGP_NODE, &bgp_maxpaths_ibgp_cluster_cmd); install_element (BGP_NODE, &no_bgp_maxpaths_ibgp_cmd); - install_element (BGP_NODE, &no_bgp_maxpaths_ibgp_arg_cmd); - install_element (BGP_NODE, &no_bgp_maxpaths_ibgp_cluster_cmd); install_element (BGP_IPV4_NODE, &bgp_maxpaths_ibgp_cmd); install_element(BGP_IPV4_NODE, &bgp_maxpaths_ibgp_cluster_cmd); install_element (BGP_IPV4_NODE, &no_bgp_maxpaths_ibgp_cmd); - install_element (BGP_IPV4_NODE, &no_bgp_maxpaths_ibgp_cluster_cmd); - install_element (BGP_IPV4_NODE, &no_bgp_maxpaths_ibgp_arg_cmd); install_element (BGP_IPV6_NODE, &bgp_maxpaths_ibgp_cmd); install_element(BGP_IPV6_NODE, &bgp_maxpaths_ibgp_cluster_cmd); install_element (BGP_IPV6_NODE, &no_bgp_maxpaths_ibgp_cmd); - install_element (BGP_IPV6_NODE, &no_bgp_maxpaths_ibgp_arg_cmd); - install_element (BGP_IPV6_NODE, &no_bgp_maxpaths_ibgp_cluster_cmd); /* "timers bgp" commands. */ install_element (BGP_NODE, &bgp_timers_cmd); install_element (BGP_NODE, &no_bgp_timers_cmd); - install_element (BGP_NODE, &no_bgp_timers_arg_cmd); /* route-map delay-timer commands - per instance for backwards compat. */ install_element (BGP_NODE, &bgp_set_route_map_delay_timer_cmd); install_element (BGP_NODE, &no_bgp_set_route_map_delay_timer_cmd); - install_element (BGP_NODE, &no_bgp_set_route_map_delay_timer_val_cmd); /* "bgp client-to-client reflection" commands */ install_element (BGP_NODE, &no_bgp_client_to_client_reflection_cmd); @@ -14599,10 +14674,8 @@ bgp_vty_init (void) install_element (BGP_NODE, &no_bgp_graceful_restart_cmd); install_element (BGP_NODE, &bgp_graceful_restart_stalepath_time_cmd); install_element (BGP_NODE, &no_bgp_graceful_restart_stalepath_time_cmd); - install_element (BGP_NODE, &no_bgp_graceful_restart_stalepath_time_val_cmd); install_element (BGP_NODE, &bgp_graceful_restart_restart_time_cmd); install_element (BGP_NODE, &no_bgp_graceful_restart_restart_time_cmd); - install_element (BGP_NODE, &no_bgp_graceful_restart_restart_time_val_cmd); /* "bgp fast-external-failover" commands */ install_element (BGP_NODE, &bgp_fast_external_failover_cmd); @@ -14635,10 +14708,8 @@ bgp_vty_init (void) /* "bgp bestpath med" commands */ install_element (BGP_NODE, &bgp_bestpath_med_cmd); install_element (BGP_NODE, &bgp_bestpath_med2_cmd); - install_element (BGP_NODE, &bgp_bestpath_med3_cmd); install_element (BGP_NODE, &no_bgp_bestpath_med_cmd); install_element (BGP_NODE, &no_bgp_bestpath_med2_cmd); - install_element (BGP_NODE, &no_bgp_bestpath_med3_cmd); /* "no bgp default ipv4-unicast" commands. */ install_element (BGP_NODE, &no_bgp_default_ipv4_unicast_cmd); @@ -14652,7 +14723,6 @@ bgp_vty_init (void) /* "bgp default local-preference" commands. */ install_element (BGP_NODE, &bgp_default_local_preference_cmd); install_element (BGP_NODE, &no_bgp_default_local_preference_cmd); - install_element (BGP_NODE, &no_bgp_default_local_preference_val_cmd); /* bgp default show-hostname */ install_element (BGP_NODE, &bgp_default_show_hostname_cmd); @@ -14661,7 +14731,6 @@ bgp_vty_init (void) /* "bgp default subgroup-pkt-queue-max" commands. */ install_element (BGP_NODE, &bgp_default_subgroup_pkt_queue_max_cmd); install_element (BGP_NODE, &no_bgp_default_subgroup_pkt_queue_max_cmd); - install_element (BGP_NODE, &no_bgp_default_subgroup_pkt_queue_max_val_cmd); /* bgp ibgp-allow-policy-mods command */ install_element (BGP_NODE, &bgp_rr_allow_outbound_policy_cmd); @@ -14670,7 +14739,6 @@ bgp_vty_init (void) /* "bgp listen limit" commands. */ install_element (BGP_NODE, &bgp_listen_limit_cmd); install_element (BGP_NODE, &no_bgp_listen_limit_cmd); - install_element (BGP_NODE, &no_bgp_listen_limit_val_cmd); /* "bgp listen range" commands. */ install_element (BGP_NODE, &bgp_listen_range_cmd); @@ -14680,18 +14748,10 @@ bgp_vty_init (void) install_element (BGP_NODE, &neighbor_remote_as_cmd); install_element (BGP_NODE, &neighbor_interface_config_cmd); install_element (BGP_NODE, &neighbor_interface_config_v6only_cmd); - install_element (BGP_NODE, &neighbor_interface_config_peergroup_cmd); - install_element (BGP_NODE, &neighbor_interface_config_v6only_peergroup_cmd); install_element (BGP_NODE, &neighbor_interface_config_remote_as_cmd); install_element (BGP_NODE, &neighbor_interface_v6only_config_remote_as_cmd); install_element (BGP_NODE, &no_neighbor_cmd); - install_element (BGP_NODE, &no_neighbor_remote_as_cmd); install_element (BGP_NODE, &no_neighbor_interface_config_cmd); - install_element (BGP_NODE, &no_neighbor_interface_config_v6only_cmd); - install_element (BGP_NODE, &no_neighbor_interface_config_peergroup_cmd); - install_element (BGP_NODE, &no_neighbor_interface_config_v6only_peergroup_cmd); - install_element (BGP_NODE, &no_neighbor_interface_config_remote_as_cmd); - install_element (BGP_NODE, &no_neighbor_interface_config_v6only_remote_as_cmd); /* "neighbor peer-group" commands. */ install_element (BGP_NODE, &neighbor_peer_group_cmd); @@ -14703,9 +14763,6 @@ bgp_vty_init (void) install_element (BGP_NODE, &neighbor_local_as_no_prepend_cmd); install_element (BGP_NODE, &neighbor_local_as_no_prepend_replace_as_cmd); install_element (BGP_NODE, &no_neighbor_local_as_cmd); - install_element (BGP_NODE, &no_neighbor_local_as_val_cmd); - install_element (BGP_NODE, &no_neighbor_local_as_val2_cmd); - install_element (BGP_NODE, &no_neighbor_local_as_val3_cmd); /* "neighbor solo" commands. */ install_element (BGP_NODE, &neighbor_solo_cmd); @@ -14714,7 +14771,6 @@ bgp_vty_init (void) /* "neighbor password" commands. */ install_element (BGP_NODE, &neighbor_password_cmd); install_element (BGP_NODE, &no_neighbor_password_cmd); - install_element (BGP_NODE, &no_neighbor_password_val_cmd); /* "neighbor activate" commands. */ install_element (BGP_NODE, &neighbor_activate_cmd); @@ -14791,201 +14847,93 @@ bgp_vty_init (void) install_element (BGP_NODE, &neighbor_attr_unchanged2_cmd); install_element (BGP_NODE, &neighbor_attr_unchanged3_cmd); install_element (BGP_NODE, &neighbor_attr_unchanged4_cmd); - install_element (BGP_NODE, &neighbor_attr_unchanged5_cmd); - install_element (BGP_NODE, &neighbor_attr_unchanged6_cmd); - install_element (BGP_NODE, &neighbor_attr_unchanged7_cmd); - install_element (BGP_NODE, &neighbor_attr_unchanged8_cmd); - install_element (BGP_NODE, &neighbor_attr_unchanged9_cmd); - install_element (BGP_NODE, &neighbor_attr_unchanged10_cmd); install_element (BGP_NODE, &no_neighbor_attr_unchanged_cmd); install_element (BGP_NODE, &no_neighbor_attr_unchanged1_cmd); install_element (BGP_NODE, &no_neighbor_attr_unchanged2_cmd); install_element (BGP_NODE, &no_neighbor_attr_unchanged3_cmd); install_element (BGP_NODE, &no_neighbor_attr_unchanged4_cmd); - install_element (BGP_NODE, &no_neighbor_attr_unchanged5_cmd); - install_element (BGP_NODE, &no_neighbor_attr_unchanged6_cmd); - install_element (BGP_NODE, &no_neighbor_attr_unchanged7_cmd); - install_element (BGP_NODE, &no_neighbor_attr_unchanged8_cmd); - install_element (BGP_NODE, &no_neighbor_attr_unchanged9_cmd); - install_element (BGP_NODE, &no_neighbor_attr_unchanged10_cmd); install_element (BGP_IPV4_NODE, &neighbor_attr_unchanged_cmd); install_element (BGP_IPV4_NODE, &neighbor_attr_unchanged1_cmd); install_element (BGP_IPV4_NODE, &neighbor_attr_unchanged2_cmd); install_element (BGP_IPV4_NODE, &neighbor_attr_unchanged3_cmd); install_element (BGP_IPV4_NODE, &neighbor_attr_unchanged4_cmd); - install_element (BGP_IPV4_NODE, &neighbor_attr_unchanged5_cmd); - install_element (BGP_IPV4_NODE, &neighbor_attr_unchanged6_cmd); - install_element (BGP_IPV4_NODE, &neighbor_attr_unchanged7_cmd); - install_element (BGP_IPV4_NODE, &neighbor_attr_unchanged8_cmd); - install_element (BGP_IPV4_NODE, &neighbor_attr_unchanged9_cmd); - install_element (BGP_IPV4_NODE, &neighbor_attr_unchanged10_cmd); install_element (BGP_IPV4_NODE, &no_neighbor_attr_unchanged_cmd); install_element (BGP_IPV4_NODE, &no_neighbor_attr_unchanged1_cmd); install_element (BGP_IPV4_NODE, &no_neighbor_attr_unchanged2_cmd); install_element (BGP_IPV4_NODE, &no_neighbor_attr_unchanged3_cmd); install_element (BGP_IPV4_NODE, &no_neighbor_attr_unchanged4_cmd); - install_element (BGP_IPV4_NODE, &no_neighbor_attr_unchanged5_cmd); - install_element (BGP_IPV4_NODE, &no_neighbor_attr_unchanged6_cmd); - install_element (BGP_IPV4_NODE, &no_neighbor_attr_unchanged7_cmd); - install_element (BGP_IPV4_NODE, &no_neighbor_attr_unchanged8_cmd); - install_element (BGP_IPV4_NODE, &no_neighbor_attr_unchanged9_cmd); - install_element (BGP_IPV4_NODE, &no_neighbor_attr_unchanged10_cmd); install_element (BGP_IPV4M_NODE, &neighbor_attr_unchanged_cmd); install_element (BGP_IPV4M_NODE, &neighbor_attr_unchanged1_cmd); install_element (BGP_IPV4M_NODE, &neighbor_attr_unchanged2_cmd); install_element (BGP_IPV4M_NODE, &neighbor_attr_unchanged3_cmd); install_element (BGP_IPV4M_NODE, &neighbor_attr_unchanged4_cmd); - install_element (BGP_IPV4M_NODE, &neighbor_attr_unchanged5_cmd); - install_element (BGP_IPV4M_NODE, &neighbor_attr_unchanged6_cmd); - install_element (BGP_IPV4M_NODE, &neighbor_attr_unchanged7_cmd); - install_element (BGP_IPV4M_NODE, &neighbor_attr_unchanged8_cmd); - install_element (BGP_IPV4M_NODE, &neighbor_attr_unchanged9_cmd); - install_element (BGP_IPV4M_NODE, &neighbor_attr_unchanged10_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_attr_unchanged_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_attr_unchanged1_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_attr_unchanged2_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_attr_unchanged3_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_attr_unchanged4_cmd); - install_element (BGP_IPV4M_NODE, &no_neighbor_attr_unchanged5_cmd); - install_element (BGP_IPV4M_NODE, &no_neighbor_attr_unchanged6_cmd); - install_element (BGP_IPV4M_NODE, &no_neighbor_attr_unchanged7_cmd); - install_element (BGP_IPV4M_NODE, &no_neighbor_attr_unchanged8_cmd); - install_element (BGP_IPV4M_NODE, &no_neighbor_attr_unchanged9_cmd); - install_element (BGP_IPV4M_NODE, &no_neighbor_attr_unchanged10_cmd); install_element (BGP_IPV6_NODE, &neighbor_attr_unchanged_cmd); install_element (BGP_IPV6_NODE, &neighbor_attr_unchanged1_cmd); install_element (BGP_IPV6_NODE, &neighbor_attr_unchanged2_cmd); install_element (BGP_IPV6_NODE, &neighbor_attr_unchanged3_cmd); install_element (BGP_IPV6_NODE, &neighbor_attr_unchanged4_cmd); - install_element (BGP_IPV6_NODE, &neighbor_attr_unchanged5_cmd); - install_element (BGP_IPV6_NODE, &neighbor_attr_unchanged6_cmd); - install_element (BGP_IPV6_NODE, &neighbor_attr_unchanged7_cmd); - install_element (BGP_IPV6_NODE, &neighbor_attr_unchanged8_cmd); - install_element (BGP_IPV6_NODE, &neighbor_attr_unchanged9_cmd); - install_element (BGP_IPV6_NODE, &neighbor_attr_unchanged10_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_attr_unchanged_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_attr_unchanged1_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_attr_unchanged2_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_attr_unchanged3_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_attr_unchanged4_cmd); - install_element (BGP_IPV6_NODE, &no_neighbor_attr_unchanged5_cmd); - install_element (BGP_IPV6_NODE, &no_neighbor_attr_unchanged6_cmd); - install_element (BGP_IPV6_NODE, &no_neighbor_attr_unchanged7_cmd); - install_element (BGP_IPV6_NODE, &no_neighbor_attr_unchanged8_cmd); - install_element (BGP_IPV6_NODE, &no_neighbor_attr_unchanged9_cmd); - install_element (BGP_IPV6_NODE, &no_neighbor_attr_unchanged10_cmd); install_element (BGP_IPV6M_NODE, &neighbor_attr_unchanged_cmd); install_element (BGP_IPV6M_NODE, &neighbor_attr_unchanged1_cmd); install_element (BGP_IPV6M_NODE, &neighbor_attr_unchanged2_cmd); install_element (BGP_IPV6M_NODE, &neighbor_attr_unchanged3_cmd); install_element (BGP_IPV6M_NODE, &neighbor_attr_unchanged4_cmd); - install_element (BGP_IPV6M_NODE, &neighbor_attr_unchanged5_cmd); - install_element (BGP_IPV6M_NODE, &neighbor_attr_unchanged6_cmd); - install_element (BGP_IPV6M_NODE, &neighbor_attr_unchanged7_cmd); - install_element (BGP_IPV6M_NODE, &neighbor_attr_unchanged8_cmd); - install_element (BGP_IPV6M_NODE, &neighbor_attr_unchanged9_cmd); - install_element (BGP_IPV6M_NODE, &neighbor_attr_unchanged10_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_attr_unchanged_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_attr_unchanged1_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_attr_unchanged2_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_attr_unchanged3_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_attr_unchanged4_cmd); - install_element (BGP_IPV6M_NODE, &no_neighbor_attr_unchanged5_cmd); - install_element (BGP_IPV6M_NODE, &no_neighbor_attr_unchanged6_cmd); - install_element (BGP_IPV6M_NODE, &no_neighbor_attr_unchanged7_cmd); - install_element (BGP_IPV6M_NODE, &no_neighbor_attr_unchanged8_cmd); - install_element (BGP_IPV6M_NODE, &no_neighbor_attr_unchanged9_cmd); - install_element (BGP_IPV6M_NODE, &no_neighbor_attr_unchanged10_cmd); install_element (BGP_VPNV4_NODE, &neighbor_attr_unchanged_cmd); install_element (BGP_VPNV4_NODE, &neighbor_attr_unchanged1_cmd); install_element (BGP_VPNV4_NODE, &neighbor_attr_unchanged2_cmd); install_element (BGP_VPNV4_NODE, &neighbor_attr_unchanged3_cmd); install_element (BGP_VPNV4_NODE, &neighbor_attr_unchanged4_cmd); - install_element (BGP_VPNV4_NODE, &neighbor_attr_unchanged5_cmd); - install_element (BGP_VPNV4_NODE, &neighbor_attr_unchanged6_cmd); - install_element (BGP_VPNV4_NODE, &neighbor_attr_unchanged7_cmd); - install_element (BGP_VPNV4_NODE, &neighbor_attr_unchanged8_cmd); - install_element (BGP_VPNV4_NODE, &neighbor_attr_unchanged9_cmd); - install_element (BGP_VPNV4_NODE, &neighbor_attr_unchanged10_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_attr_unchanged_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_attr_unchanged1_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_attr_unchanged2_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_attr_unchanged3_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_attr_unchanged4_cmd); - install_element (BGP_VPNV4_NODE, &no_neighbor_attr_unchanged5_cmd); - install_element (BGP_VPNV4_NODE, &no_neighbor_attr_unchanged6_cmd); - install_element (BGP_VPNV4_NODE, &no_neighbor_attr_unchanged7_cmd); - install_element (BGP_VPNV4_NODE, &no_neighbor_attr_unchanged8_cmd); - install_element (BGP_VPNV4_NODE, &no_neighbor_attr_unchanged9_cmd); - install_element (BGP_VPNV4_NODE, &no_neighbor_attr_unchanged10_cmd); install_element (BGP_VPNV6_NODE, &neighbor_attr_unchanged_cmd); install_element (BGP_VPNV6_NODE, &neighbor_attr_unchanged1_cmd); install_element (BGP_VPNV6_NODE, &neighbor_attr_unchanged2_cmd); install_element (BGP_VPNV6_NODE, &neighbor_attr_unchanged3_cmd); install_element (BGP_VPNV6_NODE, &neighbor_attr_unchanged4_cmd); - install_element (BGP_VPNV6_NODE, &neighbor_attr_unchanged5_cmd); - install_element (BGP_VPNV6_NODE, &neighbor_attr_unchanged6_cmd); - install_element (BGP_VPNV6_NODE, &neighbor_attr_unchanged7_cmd); - install_element (BGP_VPNV6_NODE, &neighbor_attr_unchanged8_cmd); - install_element (BGP_VPNV6_NODE, &neighbor_attr_unchanged9_cmd); - install_element (BGP_VPNV6_NODE, &neighbor_attr_unchanged10_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_attr_unchanged_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_attr_unchanged1_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_attr_unchanged2_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_attr_unchanged3_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_attr_unchanged4_cmd); - install_element (BGP_VPNV6_NODE, &no_neighbor_attr_unchanged5_cmd); - install_element (BGP_VPNV6_NODE, &no_neighbor_attr_unchanged6_cmd); - install_element (BGP_VPNV6_NODE, &no_neighbor_attr_unchanged7_cmd); - install_element (BGP_VPNV6_NODE, &no_neighbor_attr_unchanged8_cmd); - install_element (BGP_VPNV6_NODE, &no_neighbor_attr_unchanged9_cmd); - install_element (BGP_VPNV6_NODE, &no_neighbor_attr_unchanged10_cmd); install_element (BGP_ENCAP_NODE, &neighbor_attr_unchanged_cmd); install_element (BGP_ENCAP_NODE, &neighbor_attr_unchanged1_cmd); install_element (BGP_ENCAP_NODE, &neighbor_attr_unchanged2_cmd); install_element (BGP_ENCAP_NODE, &neighbor_attr_unchanged3_cmd); install_element (BGP_ENCAP_NODE, &neighbor_attr_unchanged4_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_attr_unchanged5_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_attr_unchanged6_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_attr_unchanged7_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_attr_unchanged8_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_attr_unchanged9_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_attr_unchanged10_cmd); install_element (BGP_ENCAP_NODE, &no_neighbor_attr_unchanged_cmd); install_element (BGP_ENCAP_NODE, &no_neighbor_attr_unchanged1_cmd); install_element (BGP_ENCAP_NODE, &no_neighbor_attr_unchanged2_cmd); install_element (BGP_ENCAP_NODE, &no_neighbor_attr_unchanged3_cmd); install_element (BGP_ENCAP_NODE, &no_neighbor_attr_unchanged4_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_attr_unchanged5_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_attr_unchanged6_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_attr_unchanged7_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_attr_unchanged8_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_attr_unchanged9_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_attr_unchanged10_cmd); install_element (BGP_ENCAPV6_NODE, &neighbor_attr_unchanged_cmd); install_element (BGP_ENCAPV6_NODE, &neighbor_attr_unchanged1_cmd); install_element (BGP_ENCAPV6_NODE, &neighbor_attr_unchanged2_cmd); install_element (BGP_ENCAPV6_NODE, &neighbor_attr_unchanged3_cmd); install_element (BGP_ENCAPV6_NODE, &neighbor_attr_unchanged4_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_attr_unchanged5_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_attr_unchanged6_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_attr_unchanged7_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_attr_unchanged8_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_attr_unchanged9_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_attr_unchanged10_cmd); install_element (BGP_ENCAPV6_NODE, &no_neighbor_attr_unchanged_cmd); install_element (BGP_ENCAPV6_NODE, &no_neighbor_attr_unchanged1_cmd); install_element (BGP_ENCAPV6_NODE, &no_neighbor_attr_unchanged2_cmd); install_element (BGP_ENCAPV6_NODE, &no_neighbor_attr_unchanged3_cmd); install_element (BGP_ENCAPV6_NODE, &no_neighbor_attr_unchanged4_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_attr_unchanged5_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_attr_unchanged6_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_attr_unchanged7_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_attr_unchanged8_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_attr_unchanged9_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_attr_unchanged10_cmd); /* "nexthop-local unchanged" commands */ install_element (BGP_IPV6_NODE, &neighbor_nexthop_local_unchanged_cmd); @@ -15252,18 +15200,14 @@ bgp_vty_init (void) install_element (BGP_NODE, &neighbor_ebgp_multihop_cmd); install_element (BGP_NODE, &neighbor_ebgp_multihop_ttl_cmd); install_element (BGP_NODE, &no_neighbor_ebgp_multihop_cmd); - install_element (BGP_NODE, &no_neighbor_ebgp_multihop_ttl_cmd); /* "neighbor disable-connected-check" commands. */ install_element (BGP_NODE, &neighbor_disable_connected_check_cmd); install_element (BGP_NODE, &no_neighbor_disable_connected_check_cmd); - install_element (BGP_NODE, &neighbor_enforce_multihop_cmd); - install_element (BGP_NODE, &no_neighbor_enforce_multihop_cmd); /* "neighbor description" commands. */ install_element (BGP_NODE, &neighbor_description_cmd); install_element (BGP_NODE, &no_neighbor_description_cmd); - install_element (BGP_NODE, &no_neighbor_description_val_cmd); /* "neighbor update-source" commands. "*/ install_element (BGP_NODE, &neighbor_update_source_cmd); @@ -15273,33 +15217,26 @@ bgp_vty_init (void) install_element (BGP_NODE, &neighbor_default_originate_cmd); install_element (BGP_NODE, &neighbor_default_originate_rmap_cmd); install_element (BGP_NODE, &no_neighbor_default_originate_cmd); - install_element (BGP_NODE, &no_neighbor_default_originate_rmap_cmd); install_element (BGP_IPV4_NODE, &neighbor_default_originate_cmd); install_element (BGP_IPV4_NODE, &neighbor_default_originate_rmap_cmd); install_element (BGP_IPV4_NODE, &no_neighbor_default_originate_cmd); - install_element (BGP_IPV4_NODE, &no_neighbor_default_originate_rmap_cmd); install_element (BGP_IPV4M_NODE, &neighbor_default_originate_cmd); install_element (BGP_IPV4M_NODE, &neighbor_default_originate_rmap_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_default_originate_cmd); - install_element (BGP_IPV4M_NODE, &no_neighbor_default_originate_rmap_cmd); install_element (BGP_IPV6_NODE, &neighbor_default_originate_cmd); install_element (BGP_IPV6_NODE, &neighbor_default_originate_rmap_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_default_originate_cmd); - install_element (BGP_IPV6_NODE, &no_neighbor_default_originate_rmap_cmd); install_element (BGP_IPV6M_NODE, &neighbor_default_originate_cmd); install_element (BGP_IPV6M_NODE, &neighbor_default_originate_rmap_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_default_originate_cmd); - install_element (BGP_IPV6M_NODE, &no_neighbor_default_originate_rmap_cmd); /* "neighbor port" commands. */ install_element (BGP_NODE, &neighbor_port_cmd); install_element (BGP_NODE, &no_neighbor_port_cmd); - install_element (BGP_NODE, &no_neighbor_port_val_cmd); /* "neighbor weight" commands. */ install_element (BGP_NODE, &neighbor_weight_cmd); install_element (BGP_NODE, &no_neighbor_weight_cmd); - install_element (BGP_NODE, &no_neighbor_weight_val_cmd); /* "neighbor override-capability" commands. */ install_element (BGP_NODE, &neighbor_override_capability_cmd); @@ -15312,17 +15249,14 @@ bgp_vty_init (void) /* "neighbor timers" commands. */ install_element (BGP_NODE, &neighbor_timers_cmd); install_element (BGP_NODE, &no_neighbor_timers_cmd); - install_element (BGP_NODE, &no_neighbor_timers_val_cmd); /* "neighbor timers connect" commands. */ install_element (BGP_NODE, &neighbor_timers_connect_cmd); install_element (BGP_NODE, &no_neighbor_timers_connect_cmd); - install_element (BGP_NODE, &no_neighbor_timers_connect_val_cmd); /* "neighbor advertisement-interval" commands. */ install_element (BGP_NODE, &neighbor_advertise_interval_cmd); install_element (BGP_NODE, &no_neighbor_advertise_interval_cmd); - install_element (BGP_NODE, &no_neighbor_advertise_interval_val_cmd); /* "neighbor interface" commands. */ install_element (BGP_NODE, &neighbor_interface_cmd); @@ -15436,12 +15370,6 @@ bgp_vty_init (void) install_element (BGP_NODE, &neighbor_maximum_prefix_restart_cmd); install_element (BGP_NODE, &neighbor_maximum_prefix_threshold_restart_cmd); install_element (BGP_NODE, &no_neighbor_maximum_prefix_cmd); - install_element (BGP_NODE, &no_neighbor_maximum_prefix_val_cmd); - install_element (BGP_NODE, &no_neighbor_maximum_prefix_threshold_cmd); - install_element (BGP_NODE, &no_neighbor_maximum_prefix_warning_cmd); - install_element (BGP_NODE, &no_neighbor_maximum_prefix_threshold_warning_cmd); - install_element (BGP_NODE, &no_neighbor_maximum_prefix_restart_cmd); - install_element (BGP_NODE, &no_neighbor_maximum_prefix_threshold_restart_cmd); install_element (BGP_IPV4_NODE, &neighbor_maximum_prefix_cmd); install_element (BGP_IPV4_NODE, &neighbor_maximum_prefix_threshold_cmd); install_element (BGP_IPV4_NODE, &neighbor_maximum_prefix_warning_cmd); @@ -15449,12 +15377,6 @@ bgp_vty_init (void) install_element (BGP_IPV4_NODE, &neighbor_maximum_prefix_restart_cmd); install_element (BGP_IPV4_NODE, &neighbor_maximum_prefix_threshold_restart_cmd); install_element (BGP_IPV4_NODE, &no_neighbor_maximum_prefix_cmd); - install_element (BGP_IPV4_NODE, &no_neighbor_maximum_prefix_val_cmd); - install_element (BGP_IPV4_NODE, &no_neighbor_maximum_prefix_threshold_cmd); - install_element (BGP_IPV4_NODE, &no_neighbor_maximum_prefix_warning_cmd); - install_element (BGP_IPV4_NODE, &no_neighbor_maximum_prefix_threshold_warning_cmd); - install_element (BGP_IPV4_NODE, &no_neighbor_maximum_prefix_restart_cmd); - install_element (BGP_IPV4_NODE, &no_neighbor_maximum_prefix_threshold_restart_cmd); install_element (BGP_IPV4M_NODE, &neighbor_maximum_prefix_cmd); install_element (BGP_IPV4M_NODE, &neighbor_maximum_prefix_threshold_cmd); install_element (BGP_IPV4M_NODE, &neighbor_maximum_prefix_warning_cmd); @@ -15462,12 +15384,6 @@ bgp_vty_init (void) install_element (BGP_IPV4M_NODE, &neighbor_maximum_prefix_restart_cmd); install_element (BGP_IPV4M_NODE, &neighbor_maximum_prefix_threshold_restart_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_maximum_prefix_cmd); - install_element (BGP_IPV4M_NODE, &no_neighbor_maximum_prefix_val_cmd); - install_element (BGP_IPV4M_NODE, &no_neighbor_maximum_prefix_threshold_cmd); - install_element (BGP_IPV4M_NODE, &no_neighbor_maximum_prefix_warning_cmd); - install_element (BGP_IPV4M_NODE, &no_neighbor_maximum_prefix_threshold_warning_cmd); - install_element (BGP_IPV4M_NODE, &no_neighbor_maximum_prefix_restart_cmd); - install_element (BGP_IPV4M_NODE, &no_neighbor_maximum_prefix_threshold_restart_cmd); install_element (BGP_IPV6_NODE, &neighbor_maximum_prefix_cmd); install_element (BGP_IPV6_NODE, &neighbor_maximum_prefix_threshold_cmd); install_element (BGP_IPV6_NODE, &neighbor_maximum_prefix_warning_cmd); @@ -15475,12 +15391,6 @@ bgp_vty_init (void) install_element (BGP_IPV6_NODE, &neighbor_maximum_prefix_restart_cmd); install_element (BGP_IPV6_NODE, &neighbor_maximum_prefix_threshold_restart_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_maximum_prefix_cmd); - install_element (BGP_IPV6_NODE, &no_neighbor_maximum_prefix_val_cmd); - install_element (BGP_IPV6_NODE, &no_neighbor_maximum_prefix_threshold_cmd); - install_element (BGP_IPV6_NODE, &no_neighbor_maximum_prefix_warning_cmd); - install_element (BGP_IPV6_NODE, &no_neighbor_maximum_prefix_threshold_warning_cmd); - install_element (BGP_IPV6_NODE, &no_neighbor_maximum_prefix_restart_cmd); - install_element (BGP_IPV6_NODE, &no_neighbor_maximum_prefix_threshold_restart_cmd); install_element (BGP_IPV6M_NODE, &neighbor_maximum_prefix_cmd); install_element (BGP_IPV6M_NODE, &neighbor_maximum_prefix_threshold_cmd); install_element (BGP_IPV6M_NODE, &neighbor_maximum_prefix_warning_cmd); @@ -15488,12 +15398,6 @@ bgp_vty_init (void) install_element (BGP_IPV6M_NODE, &neighbor_maximum_prefix_restart_cmd); install_element (BGP_IPV6M_NODE, &neighbor_maximum_prefix_threshold_restart_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_maximum_prefix_cmd); - install_element (BGP_IPV6M_NODE, &no_neighbor_maximum_prefix_val_cmd); - install_element (BGP_IPV6M_NODE, &no_neighbor_maximum_prefix_threshold_cmd); - install_element (BGP_IPV6M_NODE, &no_neighbor_maximum_prefix_warning_cmd); - install_element (BGP_IPV6M_NODE, &no_neighbor_maximum_prefix_threshold_warning_cmd); - install_element (BGP_IPV6M_NODE, &no_neighbor_maximum_prefix_restart_cmd); - install_element (BGP_IPV6M_NODE, &no_neighbor_maximum_prefix_threshold_restart_cmd); install_element (BGP_VPNV4_NODE, &neighbor_maximum_prefix_cmd); install_element (BGP_VPNV4_NODE, &neighbor_maximum_prefix_threshold_cmd); install_element (BGP_VPNV4_NODE, &neighbor_maximum_prefix_warning_cmd); @@ -15501,12 +15405,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &neighbor_maximum_prefix_restart_cmd); install_element (BGP_VPNV4_NODE, &neighbor_maximum_prefix_threshold_restart_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_maximum_prefix_cmd); - install_element (BGP_VPNV4_NODE, &no_neighbor_maximum_prefix_val_cmd); - install_element (BGP_VPNV4_NODE, &no_neighbor_maximum_prefix_threshold_cmd); - install_element (BGP_VPNV4_NODE, &no_neighbor_maximum_prefix_warning_cmd); - install_element (BGP_VPNV4_NODE, &no_neighbor_maximum_prefix_threshold_warning_cmd); - install_element (BGP_VPNV4_NODE, &no_neighbor_maximum_prefix_restart_cmd); - install_element (BGP_VPNV4_NODE, &no_neighbor_maximum_prefix_threshold_restart_cmd); install_element (BGP_VPNV6_NODE, &neighbor_maximum_prefix_cmd); install_element (BGP_VPNV6_NODE, &neighbor_maximum_prefix_threshold_cmd); install_element (BGP_VPNV6_NODE, &neighbor_maximum_prefix_warning_cmd); @@ -15514,12 +15412,6 @@ bgp_vty_init (void) install_element (BGP_VPNV6_NODE, &neighbor_maximum_prefix_restart_cmd); install_element (BGP_VPNV6_NODE, &neighbor_maximum_prefix_threshold_restart_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_maximum_prefix_cmd); - install_element (BGP_VPNV6_NODE, &no_neighbor_maximum_prefix_val_cmd); - install_element (BGP_VPNV6_NODE, &no_neighbor_maximum_prefix_threshold_cmd); - install_element (BGP_VPNV6_NODE, &no_neighbor_maximum_prefix_warning_cmd); - install_element (BGP_VPNV6_NODE, &no_neighbor_maximum_prefix_threshold_warning_cmd); - install_element (BGP_VPNV6_NODE, &no_neighbor_maximum_prefix_restart_cmd); - install_element (BGP_VPNV6_NODE, &no_neighbor_maximum_prefix_threshold_restart_cmd); install_element (BGP_ENCAP_NODE, &neighbor_maximum_prefix_cmd); install_element (BGP_ENCAP_NODE, &neighbor_maximum_prefix_threshold_cmd); @@ -15528,12 +15420,6 @@ bgp_vty_init (void) install_element (BGP_ENCAP_NODE, &neighbor_maximum_prefix_restart_cmd); install_element (BGP_ENCAP_NODE, &neighbor_maximum_prefix_threshold_restart_cmd); install_element (BGP_ENCAP_NODE, &no_neighbor_maximum_prefix_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_maximum_prefix_val_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_maximum_prefix_threshold_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_maximum_prefix_warning_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_maximum_prefix_threshold_warning_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_maximum_prefix_restart_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_maximum_prefix_threshold_restart_cmd); install_element (BGP_ENCAPV6_NODE, &neighbor_maximum_prefix_cmd); install_element (BGP_ENCAPV6_NODE, &neighbor_maximum_prefix_threshold_cmd); @@ -15542,47 +15428,25 @@ bgp_vty_init (void) install_element (BGP_ENCAPV6_NODE, &neighbor_maximum_prefix_restart_cmd); install_element (BGP_ENCAPV6_NODE, &neighbor_maximum_prefix_threshold_restart_cmd); install_element (BGP_ENCAPV6_NODE, &no_neighbor_maximum_prefix_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_maximum_prefix_val_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_maximum_prefix_threshold_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_maximum_prefix_warning_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_maximum_prefix_threshold_warning_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_maximum_prefix_restart_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_maximum_prefix_threshold_restart_cmd); /* "neighbor allowas-in" */ install_element (BGP_NODE, &neighbor_allowas_in_cmd); - install_element (BGP_NODE, &neighbor_allowas_in_arg_cmd); install_element (BGP_NODE, &no_neighbor_allowas_in_cmd); - install_element (BGP_NODE, &no_neighbor_allowas_in_val_cmd); install_element (BGP_IPV4_NODE, &neighbor_allowas_in_cmd); - install_element (BGP_IPV4_NODE, &neighbor_allowas_in_arg_cmd); install_element (BGP_IPV4_NODE, &no_neighbor_allowas_in_cmd); - install_element (BGP_IPV4_NODE, &no_neighbor_allowas_in_val_cmd); install_element (BGP_IPV4M_NODE, &neighbor_allowas_in_cmd); - install_element (BGP_IPV4M_NODE, &neighbor_allowas_in_arg_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_allowas_in_cmd); - install_element (BGP_IPV4M_NODE, &no_neighbor_allowas_in_val_cmd); install_element (BGP_IPV6_NODE, &neighbor_allowas_in_cmd); - install_element (BGP_IPV6_NODE, &neighbor_allowas_in_arg_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_allowas_in_cmd); - install_element (BGP_IPV6_NODE, &no_neighbor_allowas_in_val_cmd); install_element (BGP_IPV6M_NODE, &neighbor_allowas_in_cmd); - install_element (BGP_IPV6M_NODE, &neighbor_allowas_in_arg_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_allowas_in_cmd); - install_element (BGP_IPV6M_NODE, &no_neighbor_allowas_in_val_cmd); install_element (BGP_VPNV4_NODE, &neighbor_allowas_in_cmd); - install_element (BGP_VPNV4_NODE, &neighbor_allowas_in_arg_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_allowas_in_cmd); - install_element (BGP_VPNV4_NODE, &no_neighbor_allowas_in_val_cmd); install_element (BGP_VPNV6_NODE, &neighbor_allowas_in_cmd); - install_element (BGP_VPNV6_NODE, &neighbor_allowas_in_arg_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_allowas_in_cmd); - install_element (BGP_VPNV6_NODE, &no_neighbor_allowas_in_val_cmd); install_element (BGP_ENCAP_NODE, &neighbor_allowas_in_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_allowas_in_arg_cmd); install_element (BGP_ENCAP_NODE, &no_neighbor_allowas_in_cmd); install_element (BGP_ENCAPV6_NODE, &neighbor_allowas_in_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_allowas_in_arg_cmd); install_element (BGP_ENCAPV6_NODE, &no_neighbor_allowas_in_cmd); /* address-family commands. */ @@ -15593,13 +15457,10 @@ bgp_vty_init (void) install_element (BGP_NODE, &address_family_ipv6_safi_cmd); #endif /* HAVE_IPV6 */ install_element (BGP_NODE, &address_family_vpnv4_cmd); - install_element (BGP_NODE, &address_family_vpnv4_unicast_cmd); install_element (BGP_NODE, &address_family_vpnv6_cmd); - install_element (BGP_NODE, &address_family_vpnv6_unicast_cmd); install_element (BGP_NODE, &address_family_encap_cmd); - install_element (BGP_NODE, &address_family_encapv4_cmd); #ifdef HAVE_IPV6 install_element (BGP_NODE, &address_family_encapv6_cmd); #endif @@ -15616,262 +15477,94 @@ bgp_vty_init (void) /* "clear ip bgp commands" */ install_element (ENABLE_NODE, &clear_ip_bgp_all_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_all_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_as_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_as_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_peer_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_peer_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_peer_group_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_peer_group_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_external_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_external_cmd); - - install_element (ENABLE_NODE, &clear_bgp_all_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_all_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_all_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_all_cmd); - install_element (ENABLE_NODE, &clear_bgp_peer_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_peer_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_peer_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_peer_cmd); - install_element (ENABLE_NODE, &clear_bgp_peer_group_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_peer_group_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_peer_group_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_peer_group_cmd); - install_element (ENABLE_NODE, &clear_bgp_external_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_external_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_external_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_external_cmd); - install_element (ENABLE_NODE, &clear_bgp_as_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_as_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_as_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_as_cmd); + /* "clear ip bgp neighbor soft in" */ install_element (ENABLE_NODE, &clear_ip_bgp_all_soft_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_all_soft_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_all_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_all_in_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_all_in_prefix_filter_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_peer_soft_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_peer_soft_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_peer_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_peer_in_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_peer_in_prefix_filter_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_peer_group_soft_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_peer_group_soft_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_peer_group_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_peer_group_in_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_peer_group_in_prefix_filter_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_external_soft_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_external_soft_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_external_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_external_in_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_external_in_prefix_filter_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_as_soft_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_as_soft_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_as_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_as_in_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_as_in_prefix_filter_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_all_ipv4_soft_in_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_instance_all_ipv4_soft_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_all_ipv4_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_all_ipv4_in_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_all_ipv4_in_prefix_filter_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_peer_ipv4_soft_in_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_instance_peer_ipv4_soft_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_peer_ipv4_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_peer_ipv4_in_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_peer_ipv4_in_prefix_filter_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_peer_group_ipv4_soft_in_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_instance_peer_group_ipv4_soft_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_peer_group_ipv4_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_peer_group_ipv4_in_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_peer_group_ipv4_in_prefix_filter_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_external_ipv4_soft_in_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_instance_external_ipv4_soft_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_external_ipv4_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_external_ipv4_in_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_external_ipv4_in_prefix_filter_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_as_ipv4_soft_in_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_instance_as_ipv4_soft_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_as_ipv4_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_as_ipv4_in_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_as_ipv4_in_prefix_filter_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_all_vpnv4_soft_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_all_vpnv4_in_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_peer_vpnv4_soft_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_peer_vpnv4_in_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_as_vpnv4_soft_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_as_vpnv4_in_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_all_encap_soft_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_all_encap_in_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_peer_encap_soft_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_peer_encap_in_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_as_encap_soft_in_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_as_encap_in_cmd); install_element (ENABLE_NODE, &clear_bgp_all_soft_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_all_soft_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_all_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_all_in_cmd); install_element (ENABLE_NODE, &clear_bgp_all_in_prefix_filter_cmd); install_element (ENABLE_NODE, &clear_bgp_peer_soft_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_peer_soft_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_peer_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_peer_in_cmd); install_element (ENABLE_NODE, &clear_bgp_peer_in_prefix_filter_cmd); install_element (ENABLE_NODE, &clear_bgp_peer_group_soft_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_peer_group_soft_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_peer_group_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_peer_group_in_cmd); install_element (ENABLE_NODE, &clear_bgp_peer_group_in_prefix_filter_cmd); install_element (ENABLE_NODE, &clear_bgp_external_soft_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_external_soft_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_external_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_external_in_cmd); install_element (ENABLE_NODE, &clear_bgp_external_in_prefix_filter_cmd); install_element (ENABLE_NODE, &clear_bgp_as_soft_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_as_soft_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_as_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_as_in_cmd); install_element (ENABLE_NODE, &clear_bgp_as_in_prefix_filter_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_all_soft_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_all_soft_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_all_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_all_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_all_in_prefix_filter_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_peer_soft_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_peer_soft_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_peer_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_peer_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_peer_in_prefix_filter_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_peer_group_soft_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_peer_group_soft_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_peer_group_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_peer_group_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_peer_group_in_prefix_filter_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_external_soft_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_external_soft_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_external_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_external_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_external_in_prefix_filter_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_as_soft_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_as_soft_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_as_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_as_in_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_as_in_prefix_filter_cmd); /* clear ip bgp prefix */ install_element (ENABLE_NODE, &clear_ip_bgp_prefix_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_prefix_cmd); install_element (ENABLE_NODE, &clear_bgp_ipv6_safi_prefix_cmd); install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_safi_prefix_cmd); /* "clear ip bgp neighbor soft out" */ install_element (ENABLE_NODE, &clear_ip_bgp_all_soft_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_all_soft_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_all_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_all_out_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_peer_soft_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_peer_soft_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_peer_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_peer_out_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_peer_group_soft_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_peer_group_soft_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_peer_group_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_peer_group_out_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_external_soft_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_external_soft_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_external_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_external_out_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_as_soft_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_as_soft_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_as_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_as_out_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_all_ipv4_soft_out_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_instance_all_ipv4_soft_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_all_ipv4_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_all_ipv4_out_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_peer_ipv4_soft_out_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_instance_peer_ipv4_soft_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_peer_ipv4_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_peer_ipv4_out_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_peer_group_ipv4_soft_out_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_instance_peer_group_ipv4_soft_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_peer_group_ipv4_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_peer_group_ipv4_out_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_external_ipv4_soft_out_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_instance_external_ipv4_soft_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_external_ipv4_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_external_ipv4_out_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_as_ipv4_soft_out_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_instance_as_ipv4_soft_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_as_ipv4_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_as_ipv4_out_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_all_vpnv4_soft_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_all_vpnv4_out_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_peer_vpnv4_soft_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_peer_vpnv4_out_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_as_vpnv4_soft_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_as_vpnv4_out_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_all_encap_soft_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_all_encap_out_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_peer_encap_soft_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_peer_encap_out_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_as_encap_soft_out_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_as_encap_out_cmd); install_element (ENABLE_NODE, &clear_bgp_all_soft_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_all_soft_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_all_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_all_out_cmd); install_element (ENABLE_NODE, &clear_bgp_peer_soft_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_peer_soft_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_peer_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_peer_out_cmd); install_element (ENABLE_NODE, &clear_bgp_peer_group_soft_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_peer_group_soft_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_peer_group_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_peer_group_out_cmd); install_element (ENABLE_NODE, &clear_bgp_external_soft_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_external_soft_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_external_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_external_out_cmd); install_element (ENABLE_NODE, &clear_bgp_as_soft_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_as_soft_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_as_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_as_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_all_soft_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_all_soft_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_all_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_all_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_peer_soft_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_peer_soft_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_peer_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_peer_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_peer_group_soft_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_peer_group_soft_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_peer_group_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_peer_group_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_external_soft_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_external_soft_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_external_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_external_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_as_soft_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_as_soft_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_as_out_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_as_out_cmd); /* "clear ip bgp neighbor soft" */ install_element (ENABLE_NODE, &clear_ip_bgp_all_soft_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_all_soft_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_peer_soft_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_peer_soft_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_peer_group_soft_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_peer_group_soft_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_external_soft_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_external_soft_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_as_soft_cmd); - install_element (ENABLE_NODE, &clear_ip_bgp_instance_as_soft_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_all_ipv4_soft_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_instance_all_ipv4_soft_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_peer_ipv4_soft_cmd); @@ -15889,25 +15582,10 @@ bgp_vty_init (void) install_element (ENABLE_NODE, &clear_ip_bgp_peer_encap_soft_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_as_encap_soft_cmd); install_element (ENABLE_NODE, &clear_bgp_all_soft_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_all_soft_cmd); install_element (ENABLE_NODE, &clear_bgp_peer_soft_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_peer_soft_cmd); install_element (ENABLE_NODE, &clear_bgp_peer_group_soft_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_peer_group_soft_cmd); install_element (ENABLE_NODE, &clear_bgp_external_soft_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_external_soft_cmd); install_element (ENABLE_NODE, &clear_bgp_as_soft_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_as_soft_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_all_soft_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_all_soft_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_peer_soft_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_peer_soft_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_peer_group_soft_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_peer_group_soft_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_external_soft_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_external_soft_cmd); - install_element (ENABLE_NODE, &clear_bgp_ipv6_as_soft_cmd); - install_element (ENABLE_NODE, &clear_bgp_instance_ipv6_as_soft_cmd); /* "show ip bgp summary" commands. */ install_element (VIEW_NODE, &show_ip_bgp_summary_cmd); @@ -15936,18 +15614,14 @@ bgp_vty_init (void) install_element (VIEW_NODE, &show_ip_bgp_instance_summary_cmd); install_element (VIEW_NODE, &show_ip_bgp_instance_all_summary_cmd); install_element (VIEW_NODE, &show_ip_bgp_ipv4_summary_cmd); - install_element (VIEW_NODE, &show_bgp_ipv4_safi_summary_cmd); install_element (VIEW_NODE, &show_ip_bgp_instance_ipv4_summary_cmd); - install_element (VIEW_NODE, &show_bgp_instance_ipv4_safi_summary_cmd); install_element (VIEW_NODE, &show_ip_bgp_vpnv4_all_summary_cmd); install_element (VIEW_NODE, &show_ip_bgp_vpnv4_rd_summary_cmd); #ifdef HAVE_IPV6 install_element (VIEW_NODE, &show_bgp_summary_cmd); install_element (VIEW_NODE, &show_bgp_instance_summary_cmd); install_element (VIEW_NODE, &show_bgp_instance_all_summary_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_summary_cmd); install_element (VIEW_NODE, &show_bgp_ipv6_safi_summary_cmd); - install_element (VIEW_NODE, &show_bgp_instance_ipv6_summary_cmd); install_element (VIEW_NODE, &show_bgp_instance_ipv6_safi_summary_cmd); #endif /* HAVE_IPV6 */ install_element (RESTRICTED_NODE, &show_ip_bgp_summary_cmd); @@ -15976,18 +15650,14 @@ bgp_vty_init (void) install_element (RESTRICTED_NODE, &show_ip_bgp_instance_summary_cmd); install_element (RESTRICTED_NODE, &show_ip_bgp_instance_all_summary_cmd); install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_summary_cmd); - install_element (RESTRICTED_NODE, &show_bgp_ipv4_safi_summary_cmd); install_element (RESTRICTED_NODE, &show_ip_bgp_instance_ipv4_summary_cmd); - install_element (RESTRICTED_NODE, &show_bgp_instance_ipv4_safi_summary_cmd); install_element (RESTRICTED_NODE, &show_ip_bgp_vpnv4_all_summary_cmd); install_element (RESTRICTED_NODE, &show_ip_bgp_vpnv4_rd_summary_cmd); #ifdef HAVE_IPV6 install_element (RESTRICTED_NODE, &show_bgp_summary_cmd); install_element (RESTRICTED_NODE, &show_bgp_instance_summary_cmd); install_element (RESTRICTED_NODE, &show_bgp_instance_all_summary_cmd); - install_element (RESTRICTED_NODE, &show_bgp_ipv6_summary_cmd); install_element (RESTRICTED_NODE, &show_bgp_ipv6_safi_summary_cmd); - install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_summary_cmd); install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_safi_summary_cmd); #endif /* HAVE_IPV6 */ install_element (ENABLE_NODE, &show_ip_bgp_summary_cmd); @@ -16016,18 +15686,14 @@ bgp_vty_init (void) install_element (ENABLE_NODE, &show_ip_bgp_instance_summary_cmd); install_element (ENABLE_NODE, &show_ip_bgp_instance_all_summary_cmd); install_element (ENABLE_NODE, &show_ip_bgp_ipv4_summary_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv4_safi_summary_cmd); install_element (ENABLE_NODE, &show_ip_bgp_instance_ipv4_summary_cmd); - install_element (ENABLE_NODE, &show_bgp_instance_ipv4_safi_summary_cmd); install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_all_summary_cmd); install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_rd_summary_cmd); #ifdef HAVE_IPV6 install_element (ENABLE_NODE, &show_bgp_summary_cmd); install_element (ENABLE_NODE, &show_bgp_instance_summary_cmd); install_element (ENABLE_NODE, &show_bgp_instance_all_summary_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv6_summary_cmd); install_element (ENABLE_NODE, &show_bgp_ipv6_safi_summary_cmd); - install_element (ENABLE_NODE, &show_bgp_instance_ipv6_summary_cmd); install_element (ENABLE_NODE, &show_bgp_instance_ipv6_safi_summary_cmd); #endif /* HAVE_IPV6 */ @@ -16039,54 +15705,19 @@ bgp_vty_init (void) /* "show ip bgp neighbors" commands. */ install_element (VIEW_NODE, &show_ip_bgp_neighbors_cmd); - install_element (VIEW_NODE, &show_ip_bgp_ipv4_neighbors_cmd); install_element (VIEW_NODE, &show_ip_bgp_neighbors_peer_cmd); - install_element (VIEW_NODE, &show_ip_bgp_ipv4_neighbors_peer_cmd); - install_element (VIEW_NODE, &show_ip_bgp_vpnv4_all_neighbors_cmd); - install_element (VIEW_NODE, &show_ip_bgp_vpnv4_rd_neighbors_cmd); - install_element (VIEW_NODE, &show_ip_bgp_vpnv4_all_neighbors_peer_cmd); - install_element (VIEW_NODE, &show_ip_bgp_vpnv4_rd_neighbors_peer_cmd); install_element (VIEW_NODE, &show_ip_bgp_instance_neighbors_cmd); install_element (VIEW_NODE, &show_ip_bgp_instance_all_neighbors_cmd); install_element (VIEW_NODE, &show_ip_bgp_instance_neighbors_peer_cmd); install_element (RESTRICTED_NODE, &show_ip_bgp_neighbors_peer_cmd); - install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_neighbors_peer_cmd); - install_element (RESTRICTED_NODE, &show_ip_bgp_vpnv4_all_neighbors_peer_cmd); - install_element (RESTRICTED_NODE, &show_ip_bgp_vpnv4_rd_neighbors_peer_cmd); install_element (RESTRICTED_NODE, &show_ip_bgp_instance_neighbors_peer_cmd); install_element (ENABLE_NODE, &show_ip_bgp_neighbors_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_ipv4_neighbors_cmd); install_element (ENABLE_NODE, &show_ip_bgp_neighbors_peer_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_ipv4_neighbors_peer_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_all_neighbors_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_rd_neighbors_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_all_neighbors_peer_cmd); - install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_rd_neighbors_peer_cmd); install_element (ENABLE_NODE, &show_ip_bgp_instance_neighbors_cmd); install_element (ENABLE_NODE, &show_ip_bgp_instance_all_neighbors_cmd); install_element (ENABLE_NODE, &show_ip_bgp_instance_neighbors_peer_cmd); #ifdef HAVE_IPV6 - install_element (VIEW_NODE, &show_bgp_neighbors_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_neighbors_cmd); - install_element (VIEW_NODE, &show_bgp_neighbors_peer_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_neighbors_peer_cmd); - install_element (VIEW_NODE, &show_bgp_instance_neighbors_cmd); - install_element (VIEW_NODE, &show_bgp_instance_ipv6_neighbors_cmd); - install_element (VIEW_NODE, &show_bgp_instance_neighbors_peer_cmd); - install_element (VIEW_NODE, &show_bgp_instance_ipv6_neighbors_peer_cmd); - install_element (RESTRICTED_NODE, &show_bgp_neighbors_peer_cmd); - install_element (RESTRICTED_NODE, &show_bgp_ipv6_neighbors_peer_cmd); - install_element (RESTRICTED_NODE, &show_bgp_instance_neighbors_peer_cmd); - install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_neighbors_peer_cmd); - install_element (ENABLE_NODE, &show_bgp_neighbors_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv6_neighbors_cmd); - install_element (ENABLE_NODE, &show_bgp_neighbors_peer_cmd); - install_element (ENABLE_NODE, &show_bgp_ipv6_neighbors_peer_cmd); - install_element (ENABLE_NODE, &show_bgp_instance_neighbors_cmd); - install_element (ENABLE_NODE, &show_bgp_instance_ipv6_neighbors_cmd); - install_element (ENABLE_NODE, &show_bgp_instance_neighbors_peer_cmd); - install_element (ENABLE_NODE, &show_bgp_instance_ipv6_neighbors_peer_cmd); /* Old commands. */ install_element (VIEW_NODE, &show_ipv6_bgp_summary_cmd); @@ -16123,54 +15754,34 @@ bgp_vty_init (void) install_element (BGP_NODE, &bgp_redistribute_ipv4_cmd); install_element (BGP_NODE, &no_bgp_redistribute_ipv4_cmd); install_element (BGP_NODE, &bgp_redistribute_ipv4_rmap_cmd); - install_element (BGP_NODE, &no_bgp_redistribute_ipv4_rmap_cmd); install_element (BGP_NODE, &bgp_redistribute_ipv4_metric_cmd); - install_element (BGP_NODE, &no_bgp_redistribute_ipv4_metric_cmd); install_element (BGP_NODE, &bgp_redistribute_ipv4_rmap_metric_cmd); install_element (BGP_NODE, &bgp_redistribute_ipv4_metric_rmap_cmd); - install_element (BGP_NODE, &no_bgp_redistribute_ipv4_rmap_metric_cmd); - install_element (BGP_NODE, &no_bgp_redistribute_ipv4_metric_rmap_cmd); install_element (BGP_NODE, &bgp_redistribute_ipv4_ospf_cmd); install_element (BGP_NODE, &no_bgp_redistribute_ipv4_ospf_cmd); install_element (BGP_NODE, &bgp_redistribute_ipv4_ospf_rmap_cmd); - install_element (BGP_NODE, &no_bgp_redistribute_ipv4_ospf_rmap_cmd); install_element (BGP_NODE, &bgp_redistribute_ipv4_ospf_metric_cmd); - install_element (BGP_NODE, &no_bgp_redistribute_ipv4_ospf_metric_cmd); install_element (BGP_NODE, &bgp_redistribute_ipv4_ospf_rmap_metric_cmd); - install_element (BGP_NODE, &no_bgp_redistribute_ipv4_ospf_rmap_metric_cmd); install_element (BGP_NODE, &bgp_redistribute_ipv4_ospf_metric_rmap_cmd); - install_element (BGP_NODE, &no_bgp_redistribute_ipv4_ospf_metric_rmap_cmd); install_element (BGP_IPV4_NODE, &bgp_redistribute_ipv4_cmd); install_element (BGP_IPV4_NODE, &no_bgp_redistribute_ipv4_cmd); install_element (BGP_IPV4_NODE, &bgp_redistribute_ipv4_rmap_cmd); - install_element (BGP_IPV4_NODE, &no_bgp_redistribute_ipv4_rmap_cmd); install_element (BGP_IPV4_NODE, &bgp_redistribute_ipv4_metric_cmd); - install_element (BGP_IPV4_NODE, &no_bgp_redistribute_ipv4_metric_cmd); install_element (BGP_IPV4_NODE, &bgp_redistribute_ipv4_rmap_metric_cmd); install_element (BGP_IPV4_NODE, &bgp_redistribute_ipv4_metric_rmap_cmd); - install_element (BGP_IPV4_NODE, &no_bgp_redistribute_ipv4_rmap_metric_cmd); - install_element (BGP_IPV4_NODE, &no_bgp_redistribute_ipv4_metric_rmap_cmd); install_element (BGP_IPV4_NODE, &bgp_redistribute_ipv4_ospf_cmd); install_element (BGP_IPV4_NODE, &no_bgp_redistribute_ipv4_ospf_cmd); install_element (BGP_IPV4_NODE, &bgp_redistribute_ipv4_ospf_rmap_cmd); - install_element (BGP_IPV4_NODE, &no_bgp_redistribute_ipv4_ospf_rmap_cmd); install_element (BGP_IPV4_NODE, &bgp_redistribute_ipv4_ospf_metric_cmd); - install_element (BGP_IPV4_NODE, &no_bgp_redistribute_ipv4_ospf_metric_cmd); install_element (BGP_IPV4_NODE, &bgp_redistribute_ipv4_ospf_rmap_metric_cmd); - install_element (BGP_IPV4_NODE, &no_bgp_redistribute_ipv4_ospf_rmap_metric_cmd); install_element (BGP_IPV4_NODE, &bgp_redistribute_ipv4_ospf_metric_rmap_cmd); - install_element (BGP_IPV4_NODE, &no_bgp_redistribute_ipv4_ospf_metric_rmap_cmd); #ifdef HAVE_IPV6 install_element (BGP_IPV6_NODE, &bgp_redistribute_ipv6_cmd); install_element (BGP_IPV6_NODE, &no_bgp_redistribute_ipv6_cmd); install_element (BGP_IPV6_NODE, &bgp_redistribute_ipv6_rmap_cmd); - install_element (BGP_IPV6_NODE, &no_bgp_redistribute_ipv6_rmap_cmd); install_element (BGP_IPV6_NODE, &bgp_redistribute_ipv6_metric_cmd); - install_element (BGP_IPV6_NODE, &no_bgp_redistribute_ipv6_metric_cmd); install_element (BGP_IPV6_NODE, &bgp_redistribute_ipv6_rmap_metric_cmd); install_element (BGP_IPV6_NODE, &bgp_redistribute_ipv6_metric_rmap_cmd); - install_element (BGP_IPV6_NODE, &no_bgp_redistribute_ipv6_rmap_metric_cmd); - install_element (BGP_IPV6_NODE, &no_bgp_redistribute_ipv6_metric_rmap_cmd); #endif /* HAVE_IPV6 */ /* ttl_security commands */ @@ -16339,6 +15950,16 @@ community_list_unset_vty (struct vty *vty, int argc, const char **argv, /* "community-list" keyword help string. */ #define COMMUNITY_LIST_STR "Add a community list entry\n" +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "ip community-list <1-99> (deny|permit)", + * IP_STR + * COMMUNITY_LIST_STR + * "Community list number (standard)\n" + * "Specify community to reject\n" + * "Specify community to accept\n" + * + */ DEFUN (ip_community_list_standard, ip_community_list_standard_cmd, "ip community-list <1-99> (deny|permit) .AA:NN", @@ -16352,14 +15973,6 @@ DEFUN (ip_community_list_standard, return community_list_set_vty (vty, argc, argv, COMMUNITY_LIST_STANDARD, 0); } -ALIAS (ip_community_list_standard, - ip_community_list_standard2_cmd, - "ip community-list <1-99> (deny|permit)", - IP_STR - COMMUNITY_LIST_STR - "Community list number (standard)\n" - "Specify community to reject\n" - "Specify community to accept\n") DEFUN (ip_community_list_expanded, ip_community_list_expanded_cmd, @@ -16374,6 +15987,17 @@ DEFUN (ip_community_list_expanded, return community_list_set_vty (vty, argc, argv, COMMUNITY_LIST_EXPANDED, 0); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "ip community-list standard WORD (deny|permit)", + * IP_STR + * COMMUNITY_LIST_STR + * "Add a standard community-list entry\n" + * "Community list name\n" + * "Specify community to reject\n" + * "Specify community to accept\n" + * + */ DEFUN (ip_community_list_name_standard, ip_community_list_name_standard_cmd, "ip community-list standard WORD (deny|permit) .AA:NN", @@ -16388,15 +16012,6 @@ DEFUN (ip_community_list_name_standard, return community_list_set_vty (vty, argc, argv, COMMUNITY_LIST_STANDARD, 1); } -ALIAS (ip_community_list_name_standard, - ip_community_list_name_standard2_cmd, - "ip community-list standard WORD (deny|permit)", - IP_STR - COMMUNITY_LIST_STR - "Add a standard community-list entry\n" - "Community list name\n" - "Specify community to reject\n" - "Specify community to accept\n") DEFUN (ip_community_list_name_expanded, ip_community_list_name_expanded_cmd, @@ -16717,6 +16332,16 @@ extcommunity_list_unset_vty (struct vty *vty, int argc, struct cmd_token **argv, #define EXTCOMMUNITY_LIST_STR "Add a extended community list entry\n" #define EXTCOMMUNITY_VAL_STR "Extended community attribute in 'rt aa:nn_or_IPaddr:nn' OR 'soo aa:nn_or_IPaddr:nn' format\n" +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "ip extcommunity-list <1-99> (deny|permit)", + * IP_STR + * EXTCOMMUNITY_LIST_STR + * "Extended Community list number (standard)\n" + * "Specify community to reject\n" + * "Specify community to accept\n" + * + */ DEFUN (ip_extcommunity_list_standard, ip_extcommunity_list_standard_cmd, "ip extcommunity-list <1-99> (deny|permit) .AA:NN", @@ -16730,14 +16355,6 @@ DEFUN (ip_extcommunity_list_standard, return extcommunity_list_set_vty (vty, argc, argv, EXTCOMMUNITY_LIST_STANDARD, 0); } -ALIAS (ip_extcommunity_list_standard, - ip_extcommunity_list_standard2_cmd, - "ip extcommunity-list <1-99> (deny|permit)", - IP_STR - EXTCOMMUNITY_LIST_STR - "Extended Community list number (standard)\n" - "Specify community to reject\n" - "Specify community to accept\n") DEFUN (ip_extcommunity_list_expanded, ip_extcommunity_list_expanded_cmd, @@ -16752,6 +16369,17 @@ DEFUN (ip_extcommunity_list_expanded, return extcommunity_list_set_vty (vty, argc, argv, EXTCOMMUNITY_LIST_EXPANDED, 0); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "ip extcommunity-list standard WORD (deny|permit)", + * IP_STR + * EXTCOMMUNITY_LIST_STR + * "Specify standard extcommunity-list\n" + * "Extended Community list name\n" + * "Specify community to reject\n" + * "Specify community to accept\n" + * + */ DEFUN (ip_extcommunity_list_name_standard, ip_extcommunity_list_name_standard_cmd, "ip extcommunity-list standard WORD (deny|permit) .AA:NN", @@ -16766,15 +16394,6 @@ DEFUN (ip_extcommunity_list_name_standard, return extcommunity_list_set_vty (vty, argc, argv, EXTCOMMUNITY_LIST_STANDARD, 1); } -ALIAS (ip_extcommunity_list_name_standard, - ip_extcommunity_list_name_standard2_cmd, - "ip extcommunity-list standard WORD (deny|permit)", - IP_STR - EXTCOMMUNITY_LIST_STR - "Specify standard extcommunity-list\n" - "Extended Community list name\n" - "Specify community to reject\n" - "Specify community to accept\n") DEFUN (ip_extcommunity_list_name_expanded, ip_extcommunity_list_name_expanded_cmd, @@ -17088,10 +16707,8 @@ community_list_vty (void) /* Community-list. */ install_element (CONFIG_NODE, &ip_community_list_standard_cmd); - install_element (CONFIG_NODE, &ip_community_list_standard2_cmd); install_element (CONFIG_NODE, &ip_community_list_expanded_cmd); install_element (CONFIG_NODE, &ip_community_list_name_standard_cmd); - install_element (CONFIG_NODE, &ip_community_list_name_standard2_cmd); install_element (CONFIG_NODE, &ip_community_list_name_expanded_cmd); install_element (CONFIG_NODE, &no_ip_community_list_standard_all_cmd); install_element (CONFIG_NODE, &no_ip_community_list_standard_direction_cmd); @@ -17110,10 +16727,8 @@ community_list_vty (void) /* Extcommunity-list. */ install_element (CONFIG_NODE, &ip_extcommunity_list_standard_cmd); - install_element (CONFIG_NODE, &ip_extcommunity_list_standard2_cmd); install_element (CONFIG_NODE, &ip_extcommunity_list_expanded_cmd); install_element (CONFIG_NODE, &ip_extcommunity_list_name_standard_cmd); - install_element (CONFIG_NODE, &ip_extcommunity_list_name_standard2_cmd); install_element (CONFIG_NODE, &ip_extcommunity_list_name_expanded_cmd); install_element (CONFIG_NODE, &no_ip_extcommunity_list_standard_all_cmd); install_element (CONFIG_NODE, &no_ip_extcommunity_list_standard_direction_cmd); diff --git a/isisd/isis_routemap.c b/isisd/isis_routemap.c index 86d5efd77..35781ef2c 100644 --- a/isisd/isis_routemap.c +++ b/isisd/isis_routemap.c @@ -357,6 +357,15 @@ DEFUN (match_ip_address, return isis_route_match_add(vty, vty->index, "ip address", argv[3]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match ip address", + * NO_STR + * MATCH_STR + * IP_STR + * "Match address of route\n" + * + */ DEFUN (no_match_ip_address, no_match_ip_address_val_cmd, "no match ip address (<1-199>|<1300-2699>|WORD)", @@ -373,13 +382,6 @@ DEFUN (no_match_ip_address, return isis_route_match_delete(vty, vty->index, "ip address", argv[4]->arg); } -ALIAS (no_match_ip_address, - no_match_ip_address_cmd, - "no match ip address", - NO_STR - MATCH_STR - IP_STR - "Match address of route\n") /* ------------------------------------------------------------*/ @@ -395,6 +397,17 @@ DEFUN (match_ip_address_prefix_list, return isis_route_match_add(vty, vty->index, "ip address prefix-list", argv[4]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match ip address prefix-list WORD", + * NO_STR + * MATCH_STR + * IP_STR + * "Match address of route\n" + * "Match entries of prefix-lists\n" + * "IP prefix-list name\n" + * + */ DEFUN (no_match_ip_address_prefix_list, no_match_ip_address_prefix_list_cmd, "no match ip address prefix-list", @@ -409,15 +422,6 @@ DEFUN (no_match_ip_address_prefix_list, return isis_route_match_delete (vty, vty->index, "ip address prefix-list", argv[0]); } -ALIAS (no_match_ip_address_prefix_list, - no_match_ip_address_prefix_list_val_cmd, - "no match ip address prefix-list WORD", - NO_STR - MATCH_STR - IP_STR - "Match address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") /* ------------------------------------------------------------*/ @@ -432,6 +436,15 @@ DEFUN (match_ipv6_address, return isis_route_match_add(vty, vty->index, "ipv6 address", argv[3]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match ipv6 address", + * NO_STR + * MATCH_STR + * IPV6_STR + * "Match IPv6 address of route\n" + * + */ DEFUN (no_match_ipv6_address, no_match_ipv6_address_val_cmd, "no match ipv6 address WORD", @@ -446,13 +459,6 @@ DEFUN (no_match_ipv6_address, return isis_route_match_delete(vty, vty->index, "ipv6 address", argv[4]->arg); } -ALIAS (no_match_ipv6_address, - no_match_ipv6_address_cmd, - "no match ipv6 address", - NO_STR - MATCH_STR - IPV6_STR - "Match IPv6 address of route\n") /* ------------------------------------------------------------*/ @@ -468,6 +474,17 @@ DEFUN (match_ipv6_address_prefix_list, return isis_route_match_add(vty, vty->index, "ipv6 address prefix-list", argv[4]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match ipv6 address prefix-list WORD", + * NO_STR + * MATCH_STR + * IPV6_STR + * "Match address of route\n" + * "Match entries of prefix-lists\n" + * "IP prefix-list name\n" + * + */ DEFUN (no_match_ipv6_address_prefix_list, no_match_ipv6_address_prefix_list_cmd, "no match ipv6 address prefix-list", @@ -482,15 +499,6 @@ DEFUN (no_match_ipv6_address_prefix_list, return isis_route_match_delete (vty, vty->index, "ipv6 address prefix-list", argv[0]); } -ALIAS (no_match_ipv6_address_prefix_list, - no_match_ipv6_address_prefix_list_val_cmd, - "no match ipv6 address prefix-list WORD", - NO_STR - MATCH_STR - IPV6_STR - "Match address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") /* ------------------------------------------------------------*/ @@ -498,7 +506,7 @@ ALIAS (no_match_ipv6_address_prefix_list, * commands at the same node, therefore add set metric with the same 32-bit range as ospf and * verify that the input is a valid isis metric */ DEFUN (set_metric, - set_metric_cmd, + set_metric_cmd, "set metric <0-4294967295>", SET_STR "Metric vale for destination routing protocol\n" @@ -507,8 +515,19 @@ DEFUN (set_metric, return isis_route_set_add(vty, vty->index, "metric", argv[2]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no set metric", + * NO_STR + * SET_STR + * "Metric vale for destination routing protocol\n"); + * + * void + * isis_route_map_init(void + * + */ DEFUN (no_set_metric, - no_set_metric_val_cmd, + no_set_metric_val_cmd, "no set metric <0-4294967295>", NO_STR SET_STR @@ -520,15 +539,6 @@ DEFUN (no_set_metric, return isis_route_set_delete(vty, vty->index, "metric", argv[3]->arg); } -ALIAS (no_set_metric, - no_set_metric_cmd, - "no set metric", - NO_STR - SET_STR - "Metric vale for destination routing protocol\n"); - -void -isis_route_map_init(void) { route_map_init(); route_map_init_vty(); @@ -536,25 +546,20 @@ isis_route_map_init(void) route_map_install_match(&route_match_ip_address_cmd); install_element(RMAP_NODE, &match_ip_address_cmd); install_element(RMAP_NODE, &no_match_ip_address_val_cmd); - install_element(RMAP_NODE, &no_match_ip_address_cmd); route_map_install_match(&route_match_ip_address_prefix_list_cmd); install_element(RMAP_NODE, &match_ip_address_prefix_list_cmd); - install_element(RMAP_NODE, &no_match_ip_address_prefix_list_val_cmd); install_element(RMAP_NODE, &no_match_ip_address_prefix_list_cmd); route_map_install_match(&route_match_ipv6_address_cmd); install_element(RMAP_NODE, &match_ipv6_address_cmd); install_element(RMAP_NODE, &no_match_ipv6_address_val_cmd); - install_element(RMAP_NODE, &no_match_ipv6_address_cmd); route_map_install_match(&route_match_ipv6_address_prefix_list_cmd); install_element(RMAP_NODE, &match_ipv6_address_prefix_list_cmd); - install_element(RMAP_NODE, &no_match_ipv6_address_prefix_list_val_cmd); install_element(RMAP_NODE, &no_match_ipv6_address_prefix_list_cmd); route_map_install_set(&route_set_metric_cmd); install_element(RMAP_NODE, &set_metric_cmd); install_element(RMAP_NODE, &no_set_metric_val_cmd); - install_element(RMAP_NODE, &no_set_metric_cmd); } diff --git a/isisd/isis_vty.c b/isisd/isis_vty.c index 79fbdc4d2..b0976177f 100644 --- a/isisd/isis_vty.c +++ b/isisd/isis_vty.c @@ -323,6 +323,17 @@ DEFUN (isis_passwd, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no isis password (md5|clear) WORD", + * NO_STR + * "IS-IS commands\n" + * "Configure the authentication password for a circuit\n" + * "HMAC-MD5 authentication\n" + * "Cleartext password\n" + * "Circuit password\n" + * + */ DEFUN (no_isis_passwd, no_isis_passwd_cmd, "no isis password", @@ -339,15 +350,6 @@ DEFUN (no_isis_passwd, return CMD_SUCCESS; } -ALIAS (no_isis_passwd, - no_isis_passwd_arg_cmd, - "no isis password (md5|clear) WORD", - NO_STR - "IS-IS commands\n" - "Configure the authentication password for a circuit\n" - "HMAC-MD5 authentication\n" - "Cleartext password\n" - "Circuit password\n") DEFUN (isis_priority, isis_priority_cmd, @@ -375,6 +377,15 @@ DEFUN (isis_priority, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no isis priority <0-127>", + * NO_STR + * "IS-IS commands\n" + * "Set priority for Designated Router election\n" + * "Priority value\n" + * + */ DEFUN (no_isis_priority, no_isis_priority_cmd, "no isis priority", @@ -392,13 +403,6 @@ DEFUN (no_isis_priority, return CMD_SUCCESS; } -ALIAS (no_isis_priority, - no_isis_priority_arg_cmd, - "no isis priority <0-127>", - NO_STR - "IS-IS commands\n" - "Set priority for Designated Router election\n" - "Priority value\n") DEFUN (isis_priority_l1, isis_priority_l1_cmd, @@ -426,6 +430,16 @@ DEFUN (isis_priority_l1, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no isis priority <0-127> level-1", + * NO_STR + * "IS-IS commands\n" + * "Set priority for Designated Router election\n" + * "Priority value\n" + * "Specify priority for level-1 routing\n" + * + */ DEFUN (no_isis_priority_l1, no_isis_priority_l1_cmd, "no isis priority level-1", @@ -443,14 +457,6 @@ DEFUN (no_isis_priority_l1, return CMD_SUCCESS; } -ALIAS (no_isis_priority_l1, - no_isis_priority_l1_arg_cmd, - "no isis priority <0-127> level-1", - NO_STR - "IS-IS commands\n" - "Set priority for Designated Router election\n" - "Priority value\n" - "Specify priority for level-1 routing\n") DEFUN (isis_priority_l2, isis_priority_l2_cmd, @@ -478,6 +484,16 @@ DEFUN (isis_priority_l2, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no isis priority <0-127> level-2", + * NO_STR + * "IS-IS commands\n" + * "Set priority for Designated Router election\n" + * "Priority value\n" + * "Specify priority for level-2 routing\n" + * + */ DEFUN (no_isis_priority_l2, no_isis_priority_l2_cmd, "no isis priority level-2", @@ -495,14 +511,6 @@ DEFUN (no_isis_priority_l2, return CMD_SUCCESS; } -ALIAS (no_isis_priority_l2, - no_isis_priority_l2_arg_cmd, - "no isis priority <0-127> level-2", - NO_STR - "IS-IS commands\n" - "Set priority for Designated Router election\n" - "Priority value\n" - "Specify priority for level-2 routing\n") /* Metric command */ DEFUN (isis_metric, @@ -544,6 +552,15 @@ DEFUN (isis_metric, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no isis metric <0-16777215>", + * NO_STR + * "IS-IS commands\n" + * "Set default metric for circuit\n" + * "Default metric value\n" + * + */ DEFUN (no_isis_metric, no_isis_metric_cmd, "no isis metric", @@ -560,13 +577,6 @@ DEFUN (no_isis_metric, return CMD_SUCCESS; } -ALIAS (no_isis_metric, - no_isis_metric_arg_cmd, - "no isis metric <0-16777215>", - NO_STR - "IS-IS commands\n" - "Set default metric for circuit\n" - "Default metric value\n") DEFUN (isis_metric_l1, isis_metric_l1_cmd, @@ -607,6 +617,16 @@ DEFUN (isis_metric_l1, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no isis metric <0-16777215> level-1", + * NO_STR + * "IS-IS commands\n" + * "Set default metric for circuit\n" + * "Default metric value\n" + * "Specify metric for level-1 routing\n" + * + */ DEFUN (no_isis_metric_l1, no_isis_metric_l1_cmd, "no isis metric level-1", @@ -623,14 +643,6 @@ DEFUN (no_isis_metric_l1, return CMD_SUCCESS; } -ALIAS (no_isis_metric_l1, - no_isis_metric_l1_arg_cmd, - "no isis metric <0-16777215> level-1", - NO_STR - "IS-IS commands\n" - "Set default metric for circuit\n" - "Default metric value\n" - "Specify metric for level-1 routing\n") DEFUN (isis_metric_l2, isis_metric_l2_cmd, @@ -671,6 +683,16 @@ DEFUN (isis_metric_l2, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no isis metric <0-16777215> level-2", + * NO_STR + * "IS-IS commands\n" + * "Set default metric for circuit\n" + * "Default metric value\n" + * "Specify metric for level-2 routing\n" + * + */ DEFUN (no_isis_metric_l2, no_isis_metric_l2_cmd, "no isis metric level-2", @@ -687,14 +709,6 @@ DEFUN (no_isis_metric_l2, return CMD_SUCCESS; } -ALIAS (no_isis_metric_l2, - no_isis_metric_l2_arg_cmd, - "no isis metric <0-16777215> level-2", - NO_STR - "IS-IS commands\n" - "Set default metric for circuit\n" - "Default metric value\n" - "Specify metric for level-2 routing\n") /* end of metrics */ DEFUN (isis_hello_interval, @@ -724,6 +738,16 @@ DEFUN (isis_hello_interval, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no isis hello-interval <1-600>", + * NO_STR + * "IS-IS commands\n" + * "Set Hello interval\n" + * "Hello interval value\n" + * "Holdtime 1 second, interval depends on multiplier\n" + * + */ DEFUN (no_isis_hello_interval, no_isis_hello_interval_cmd, "no isis hello-interval", @@ -741,14 +765,6 @@ DEFUN (no_isis_hello_interval, return CMD_SUCCESS; } -ALIAS (no_isis_hello_interval, - no_isis_hello_interval_arg_cmd, - "no isis hello-interval <1-600>", - NO_STR - "IS-IS commands\n" - "Set Hello interval\n" - "Hello interval value\n" - "Holdtime 1 second, interval depends on multiplier\n") DEFUN (isis_hello_interval_l1, isis_hello_interval_l1_cmd, @@ -777,6 +793,17 @@ DEFUN (isis_hello_interval_l1, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no isis hello-interval <1-600> level-1", + * NO_STR + * "IS-IS commands\n" + * "Set Hello interval\n" + * "Hello interval value\n" + * "Holdtime 1 second, interval depends on multiplier\n" + * "Specify hello-interval for level-1 IIHs\n" + * + */ DEFUN (no_isis_hello_interval_l1, no_isis_hello_interval_l1_cmd, "no isis hello-interval level-1", @@ -794,15 +821,6 @@ DEFUN (no_isis_hello_interval_l1, return CMD_SUCCESS; } -ALIAS (no_isis_hello_interval_l1, - no_isis_hello_interval_l1_arg_cmd, - "no isis hello-interval <1-600> level-1", - NO_STR - "IS-IS commands\n" - "Set Hello interval\n" - "Hello interval value\n" - "Holdtime 1 second, interval depends on multiplier\n" - "Specify hello-interval for level-1 IIHs\n") DEFUN (isis_hello_interval_l2, isis_hello_interval_l2_cmd, @@ -831,6 +849,17 @@ DEFUN (isis_hello_interval_l2, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no isis hello-interval <1-600> level-2", + * NO_STR + * "IS-IS commands\n" + * "Set Hello interval\n" + * "Hello interval value\n" + * "Holdtime 1 second, interval depends on multiplier\n" + * "Specify hello-interval for level-2 IIHs\n" + * + */ DEFUN (no_isis_hello_interval_l2, no_isis_hello_interval_l2_cmd, "no isis hello-interval level-2", @@ -848,15 +877,6 @@ DEFUN (no_isis_hello_interval_l2, return CMD_SUCCESS; } -ALIAS (no_isis_hello_interval_l2, - no_isis_hello_interval_l2_arg_cmd, - "no isis hello-interval <1-600> level-2", - NO_STR - "IS-IS commands\n" - "Set Hello interval\n" - "Hello interval value\n" - "Holdtime 1 second, interval depends on multiplier\n" - "Specify hello-interval for level-2 IIHs\n") DEFUN (isis_hello_multiplier, isis_hello_multiplier_cmd, @@ -884,6 +904,15 @@ DEFUN (isis_hello_multiplier, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no isis hello-multiplier <2-100>", + * NO_STR + * "IS-IS commands\n" + * "Set multiplier for Hello holding time\n" + * "Hello multiplier value\n" + * + */ DEFUN (no_isis_hello_multiplier, no_isis_hello_multiplier_cmd, "no isis hello-multiplier", @@ -901,13 +930,6 @@ DEFUN (no_isis_hello_multiplier, return CMD_SUCCESS; } -ALIAS (no_isis_hello_multiplier, - no_isis_hello_multiplier_arg_cmd, - "no isis hello-multiplier <2-100>", - NO_STR - "IS-IS commands\n" - "Set multiplier for Hello holding time\n" - "Hello multiplier value\n") DEFUN (isis_hello_multiplier_l1, isis_hello_multiplier_l1_cmd, @@ -935,6 +957,16 @@ DEFUN (isis_hello_multiplier_l1, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no isis hello-multiplier <2-100> level-1", + * NO_STR + * "IS-IS commands\n" + * "Set multiplier for Hello holding time\n" + * "Hello multiplier value\n" + * "Specify hello multiplier for level-1 IIHs\n" + * + */ DEFUN (no_isis_hello_multiplier_l1, no_isis_hello_multiplier_l1_cmd, "no isis hello-multiplier level-1", @@ -952,14 +984,6 @@ DEFUN (no_isis_hello_multiplier_l1, return CMD_SUCCESS; } -ALIAS (no_isis_hello_multiplier_l1, - no_isis_hello_multiplier_l1_arg_cmd, - "no isis hello-multiplier <2-100> level-1", - NO_STR - "IS-IS commands\n" - "Set multiplier for Hello holding time\n" - "Hello multiplier value\n" - "Specify hello multiplier for level-1 IIHs\n") DEFUN (isis_hello_multiplier_l2, isis_hello_multiplier_l2_cmd, @@ -987,6 +1011,16 @@ DEFUN (isis_hello_multiplier_l2, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no isis hello-multiplier <2-100> level-2", + * NO_STR + * "IS-IS commands\n" + * "Set multiplier for Hello holding time\n" + * "Hello multiplier value\n" + * "Specify hello multiplier for level-2 IIHs\n" + * + */ DEFUN (no_isis_hello_multiplier_l2, no_isis_hello_multiplier_l2_cmd, "no isis hello-multiplier level-2", @@ -1004,14 +1038,6 @@ DEFUN (no_isis_hello_multiplier_l2, return CMD_SUCCESS; } -ALIAS (no_isis_hello_multiplier_l2, - no_isis_hello_multiplier_l2_arg_cmd, - "no isis hello-multiplier <2-100> level-2", - NO_STR - "IS-IS commands\n" - "Set multiplier for Hello holding time\n" - "Hello multiplier value\n" - "Specify hello multiplier for level-2 IIHs\n") DEFUN (isis_hello_padding, isis_hello_padding_cmd, @@ -1074,6 +1100,15 @@ DEFUN (csnp_interval, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no isis csnp-interval <1-600>", + * NO_STR + * "IS-IS commands\n" + * "Set CSNP interval in seconds\n" + * "CSNP interval value\n" + * + */ DEFUN (no_csnp_interval, no_csnp_interval_cmd, "no isis csnp-interval", @@ -1091,13 +1126,6 @@ DEFUN (no_csnp_interval, return CMD_SUCCESS; } -ALIAS (no_csnp_interval, - no_csnp_interval_arg_cmd, - "no isis csnp-interval <1-600>", - NO_STR - "IS-IS commands\n" - "Set CSNP interval in seconds\n" - "CSNP interval value\n") DEFUN (csnp_interval_l1, csnp_interval_l1_cmd, @@ -1125,6 +1153,16 @@ DEFUN (csnp_interval_l1, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no isis csnp-interval <1-600> level-1", + * NO_STR + * "IS-IS commands\n" + * "Set CSNP interval in seconds\n" + * "CSNP interval value\n" + * "Specify interval for level-1 CSNPs\n" + * + */ DEFUN (no_csnp_interval_l1, no_csnp_interval_l1_cmd, "no isis csnp-interval level-1", @@ -1142,14 +1180,6 @@ DEFUN (no_csnp_interval_l1, return CMD_SUCCESS; } -ALIAS (no_csnp_interval_l1, - no_csnp_interval_l1_arg_cmd, - "no isis csnp-interval <1-600> level-1", - NO_STR - "IS-IS commands\n" - "Set CSNP interval in seconds\n" - "CSNP interval value\n" - "Specify interval for level-1 CSNPs\n") DEFUN (csnp_interval_l2, csnp_interval_l2_cmd, @@ -1177,6 +1207,16 @@ DEFUN (csnp_interval_l2, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no isis csnp-interval <1-600> level-2", + * NO_STR + * "IS-IS commands\n" + * "Set CSNP interval in seconds\n" + * "CSNP interval value\n" + * "Specify interval for level-2 CSNPs\n" + * + */ DEFUN (no_csnp_interval_l2, no_csnp_interval_l2_cmd, "no isis csnp-interval level-2", @@ -1194,14 +1234,6 @@ DEFUN (no_csnp_interval_l2, return CMD_SUCCESS; } -ALIAS (no_csnp_interval_l2, - no_csnp_interval_l2_arg_cmd, - "no isis csnp-interval <1-600> level-2", - NO_STR - "IS-IS commands\n" - "Set CSNP interval in seconds\n" - "CSNP interval value\n" - "Specify interval for level-2 CSNPs\n") DEFUN (psnp_interval, psnp_interval_cmd, @@ -1229,6 +1261,15 @@ DEFUN (psnp_interval, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no isis psnp-interval <1-120>", + * NO_STR + * "IS-IS commands\n" + * "Set PSNP interval in seconds\n" + * "PSNP interval value\n" + * + */ DEFUN (no_psnp_interval, no_psnp_interval_cmd, "no isis psnp-interval", @@ -1246,13 +1287,6 @@ DEFUN (no_psnp_interval, return CMD_SUCCESS; } -ALIAS (no_psnp_interval, - no_psnp_interval_arg_cmd, - "no isis psnp-interval <1-120>", - NO_STR - "IS-IS commands\n" - "Set PSNP interval in seconds\n" - "PSNP interval value\n") DEFUN (psnp_interval_l1, psnp_interval_l1_cmd, @@ -1280,6 +1314,16 @@ DEFUN (psnp_interval_l1, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no isis psnp-interval <1-120> level-1", + * NO_STR + * "IS-IS commands\n" + * "Set PSNP interval in seconds\n" + * "PSNP interval value\n" + * "Specify interval for level-1 PSNPs\n" + * + */ DEFUN (no_psnp_interval_l1, no_psnp_interval_l1_cmd, "no isis psnp-interval level-1", @@ -1297,14 +1341,6 @@ DEFUN (no_psnp_interval_l1, return CMD_SUCCESS; } -ALIAS (no_psnp_interval_l1, - no_psnp_interval_l1_arg_cmd, - "no isis psnp-interval <1-120> level-1", - NO_STR - "IS-IS commands\n" - "Set PSNP interval in seconds\n" - "PSNP interval value\n" - "Specify interval for level-1 PSNPs\n") DEFUN (psnp_interval_l2, psnp_interval_l2_cmd, @@ -1332,6 +1368,16 @@ DEFUN (psnp_interval_l2, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no isis psnp-interval <1-120> level-2", + * NO_STR + * "IS-IS commands\n" + * "Set PSNP interval in seconds\n" + * "PSNP interval value\n" + * "Specify interval for level-2 PSNPs\n" + * + */ DEFUN (no_psnp_interval_l2, no_psnp_interval_l2_cmd, "no isis psnp-interval level-2", @@ -1349,14 +1395,6 @@ DEFUN (no_psnp_interval_l2, return CMD_SUCCESS; } -ALIAS (no_psnp_interval_l2, - no_psnp_interval_l2_arg_cmd, - "no isis psnp-interval <1-120> level-2", - NO_STR - "IS-IS commands\n" - "Set PSNP interval in seconds\n" - "PSNP interval value\n" - "Specify interval for level-2 PSNPs\n") static int validate_metric_style_narrow (struct vty *vty, struct isis_area *area) @@ -1566,6 +1604,14 @@ DEFUN (area_lsp_mtu, return area_lsp_mtu_set(vty, lsp_mtu); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no lsp-mtu <128-4352>", + * NO_STR + * "Configure the maximum size of generated LSPs\n" + * "Maximum size of generated LSPs\n" + * + */ DEFUN (no_area_lsp_mtu, no_area_lsp_mtu_cmd, "no lsp-mtu", @@ -1575,12 +1621,6 @@ DEFUN (no_area_lsp_mtu, return area_lsp_mtu_set(vty, DEFAULT_LSP_MTU); } -ALIAS (no_area_lsp_mtu, - no_area_lsp_mtu_arg_cmd, - "no lsp-mtu <128-4352>", - NO_STR - "Configure the maximum size of generated LSPs\n" - "Maximum size of generated LSPs\n"); DEFUN (is_type, is_type_cmd, @@ -1689,6 +1729,14 @@ DEFUN (lsp_gen_interval, return set_lsp_gen_interval (vty, area, interval, level); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no lsp-gen-interval <1-120>", + * NO_STR + * "Minimum interval between regenerating same LSP\n" + * "Minimum interval in seconds\n" + * + */ DEFUN (no_lsp_gen_interval, no_lsp_gen_interval_cmd, "no lsp-gen-interval", @@ -1705,12 +1753,6 @@ DEFUN (no_lsp_gen_interval, return set_lsp_gen_interval (vty, area, interval, level); } -ALIAS (no_lsp_gen_interval, - no_lsp_gen_interval_arg_cmd, - "no lsp-gen-interval <1-120>", - NO_STR - "Minimum interval between regenerating same LSP\n" - "Minimum interval in seconds\n") DEFUN (lsp_gen_interval_l1, lsp_gen_interval_l1_cmd, @@ -1729,6 +1771,15 @@ DEFUN (lsp_gen_interval_l1, return set_lsp_gen_interval (vty, area, interval, level); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no lsp-gen-interval level-1 <1-120>", + * NO_STR + * "Minimum interval between regenerating same LSP\n" + * "Set interval for level 1 only\n" + * "Minimum interval in seconds\n" + * + */ DEFUN (no_lsp_gen_interval_l1, no_lsp_gen_interval_l1_cmd, "no lsp-gen-interval level-1", @@ -1746,13 +1797,6 @@ DEFUN (no_lsp_gen_interval_l1, return set_lsp_gen_interval (vty, area, interval, level); } -ALIAS (no_lsp_gen_interval_l1, - no_lsp_gen_interval_l1_arg_cmd, - "no lsp-gen-interval level-1 <1-120>", - NO_STR - "Minimum interval between regenerating same LSP\n" - "Set interval for level 1 only\n" - "Minimum interval in seconds\n") DEFUN (lsp_gen_interval_l2, lsp_gen_interval_l2_cmd, @@ -1771,6 +1815,15 @@ DEFUN (lsp_gen_interval_l2, return set_lsp_gen_interval (vty, area, interval, level); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no lsp-gen-interval level-2 <1-120>", + * NO_STR + * "Minimum interval between regenerating same LSP\n" + * "Set interval for level 2 only\n" + * "Minimum interval in seconds\n" + * + */ DEFUN (no_lsp_gen_interval_l2, no_lsp_gen_interval_l2_cmd, "no lsp-gen-interval level-2", @@ -1788,13 +1841,6 @@ DEFUN (no_lsp_gen_interval_l2, return set_lsp_gen_interval (vty, area, interval, level); } -ALIAS (no_lsp_gen_interval_l2, - no_lsp_gen_interval_l2_arg_cmd, - "no lsp-gen-interval level-2 <1-120>", - NO_STR - "Minimum interval between regenerating same LSP\n" - "Set interval for level 2 only\n" - "Minimum interval in seconds\n") DEFUN (spf_interval, spf_interval_cmd, @@ -1813,6 +1859,26 @@ DEFUN (spf_interval, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no spf-interval level-2 <1-120>", + * NO_STR + * "Minimum interval between SPF calculations\n" + * "Set interval for level 2 only\n" + * "Minimum interval between consecutive SPFs in seconds\n" + * + * "no spf-interval <1-120>", + * NO_STR + * "Minimum interval between SPF calculations\n" + * "Minimum interval between consecutive SPFs in seconds\n" + * + * "no spf-interval level-1 <1-120>", + * NO_STR + * "Minimum interval between SPF calculations\n" + * "Set interval for level 1 only\n" + * "Minimum interval between consecutive SPFs in seconds\n" + * + */ DEFUN (no_spf_interval, no_spf_interval_cmd, "no spf-interval", @@ -1829,12 +1895,6 @@ DEFUN (no_spf_interval, return CMD_SUCCESS; } -ALIAS (no_spf_interval, - no_spf_interval_arg_cmd, - "no spf-interval <1-120>", - NO_STR - "Minimum interval between SPF calculations\n" - "Minimum interval between consecutive SPFs in seconds\n") DEFUN (spf_interval_l1, spf_interval_l1_cmd, @@ -1869,13 +1929,6 @@ DEFUN (no_spf_interval_l1, return CMD_SUCCESS; } -ALIAS (no_spf_interval, - no_spf_interval_l1_arg_cmd, - "no spf-interval level-1 <1-120>", - NO_STR - "Minimum interval between SPF calculations\n" - "Set interval for level 1 only\n" - "Minimum interval between consecutive SPFs in seconds\n") DEFUN (spf_interval_l2, spf_interval_l2_cmd, @@ -1910,13 +1963,6 @@ DEFUN (no_spf_interval_l2, return CMD_SUCCESS; } -ALIAS (no_spf_interval, - no_spf_interval_l2_arg_cmd, - "no spf-interval level-2 <1-120>", - NO_STR - "Minimum interval between SPF calculations\n" - "Set interval for level 2 only\n" - "Minimum interval between consecutive SPFs in seconds\n") static int area_max_lsp_lifetime_set(struct vty *vty, int level, @@ -1979,6 +2025,14 @@ DEFUN (max_lsp_lifetime, return area_max_lsp_lifetime_set(vty, IS_LEVEL_1_AND_2, atoi(argv[1]->arg)); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no max-lsp-lifetime <350-65535>", + * NO_STR + * "Maximum LSP lifetime\n" + * "LSP lifetime in seconds\n" + * + */ DEFUN (no_max_lsp_lifetime, no_max_lsp_lifetime_cmd, "no max-lsp-lifetime", @@ -1989,12 +2043,6 @@ DEFUN (no_max_lsp_lifetime, DEFAULT_LSP_LIFETIME); } -ALIAS (no_max_lsp_lifetime, - no_max_lsp_lifetime_arg_cmd, - "no max-lsp-lifetime <350-65535>", - NO_STR - "Maximum LSP lifetime\n" - "LSP lifetime in seconds\n") DEFUN (max_lsp_lifetime_l1, max_lsp_lifetime_l1_cmd, @@ -2005,6 +2053,14 @@ DEFUN (max_lsp_lifetime_l1, return area_max_lsp_lifetime_set(vty, IS_LEVEL_1, atoi(argv[2]->arg)); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no max-lsp-lifetime level-1 <350-65535>", + * NO_STR + * "Maximum LSP lifetime for Level 1 only\n" + * "LSP lifetime for Level 1 only in seconds\n" + * + */ DEFUN (no_max_lsp_lifetime_l1, no_max_lsp_lifetime_l1_cmd, "no max-lsp-lifetime level-1", @@ -2014,12 +2070,6 @@ DEFUN (no_max_lsp_lifetime_l1, return area_max_lsp_lifetime_set(vty, IS_LEVEL_1, DEFAULT_LSP_LIFETIME); } -ALIAS (no_max_lsp_lifetime_l1, - no_max_lsp_lifetime_l1_arg_cmd, - "no max-lsp-lifetime level-1 <350-65535>", - NO_STR - "Maximum LSP lifetime for Level 1 only\n" - "LSP lifetime for Level 1 only in seconds\n") DEFUN (max_lsp_lifetime_l2, max_lsp_lifetime_l2_cmd, @@ -2030,6 +2080,14 @@ DEFUN (max_lsp_lifetime_l2, return area_max_lsp_lifetime_set(vty, IS_LEVEL_2, atoi(argv[2]->arg)); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no max-lsp-lifetime level-2 <350-65535>", + * NO_STR + * "Maximum LSP lifetime for Level 2 only\n" + * "LSP lifetime for Level 2 only in seconds\n" + * + */ DEFUN (no_max_lsp_lifetime_l2, no_max_lsp_lifetime_l2_cmd, "no max-lsp-lifetime level-2", @@ -2039,12 +2097,6 @@ DEFUN (no_max_lsp_lifetime_l2, return area_max_lsp_lifetime_set(vty, IS_LEVEL_2, DEFAULT_LSP_LIFETIME); } -ALIAS (no_max_lsp_lifetime_l2, - no_max_lsp_lifetime_l2_arg_cmd, - "no max-lsp-lifetime level-2 <350-65535>", - NO_STR - "Maximum LSP lifetime for Level 2 only\n" - "LSP lifetime for Level 2 only in seconds\n") static int area_lsp_refresh_interval_set(struct vty *vty, int level, uint16_t interval) @@ -2099,6 +2151,14 @@ DEFUN (lsp_refresh_interval, return area_lsp_refresh_interval_set(vty, IS_LEVEL_1_AND_2, atoi(argv[1]->arg)); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no lsp-refresh-interval <1-65235>", + * NO_STR + * "LSP refresh interval\n" + * "LSP refresh interval in seconds\n" + * + */ DEFUN (no_lsp_refresh_interval, no_lsp_refresh_interval_cmd, "no lsp-refresh-interval", @@ -2109,12 +2169,6 @@ DEFUN (no_lsp_refresh_interval, DEFAULT_MAX_LSP_GEN_INTERVAL); } -ALIAS (no_lsp_refresh_interval, - no_lsp_refresh_interval_arg_cmd, - "no lsp-refresh-interval <1-65235>", - NO_STR - "LSP refresh interval\n" - "LSP refresh interval in seconds\n") DEFUN (lsp_refresh_interval_l1, lsp_refresh_interval_l1_cmd, @@ -2125,6 +2179,14 @@ DEFUN (lsp_refresh_interval_l1, return area_lsp_refresh_interval_set(vty, IS_LEVEL_1, atoi(argv[2]->arg)); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no lsp-refresh-interval level-1 <1-65235>", + * NO_STR + * "LSP refresh interval for Level 1 only\n" + * "LSP refresh interval for Level 1 only in seconds\n" + * + */ DEFUN (no_lsp_refresh_interval_l1, no_lsp_refresh_interval_l1_cmd, "no lsp-refresh-interval level-1", @@ -2135,12 +2197,6 @@ DEFUN (no_lsp_refresh_interval_l1, DEFAULT_MAX_LSP_GEN_INTERVAL); } -ALIAS (no_lsp_refresh_interval_l1, - no_lsp_refresh_interval_l1_arg_cmd, - "no lsp-refresh-interval level-1 <1-65235>", - NO_STR - "LSP refresh interval for Level 1 only\n" - "LSP refresh interval for Level 1 only in seconds\n") DEFUN (lsp_refresh_interval_l2, lsp_refresh_interval_l2_cmd, @@ -2151,6 +2207,14 @@ DEFUN (lsp_refresh_interval_l2, return area_lsp_refresh_interval_set(vty, IS_LEVEL_2, atoi(argv[2]->arg)); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no lsp-refresh-interval level-2 <1-65235>", + * NO_STR + * "LSP refresh interval for Level 2 only\n" + * "LSP refresh interval for Level 2 only in seconds\n" + * + */ DEFUN (no_lsp_refresh_interval_l2, no_lsp_refresh_interval_l2_cmd, "no lsp-refresh-interval level-2", @@ -2161,12 +2225,6 @@ DEFUN (no_lsp_refresh_interval_l2, DEFAULT_MAX_LSP_GEN_INTERVAL); } -ALIAS (no_lsp_refresh_interval_l2, - no_lsp_refresh_interval_l2_arg_cmd, - "no lsp-refresh-interval level-2 <1-65235>", - NO_STR - "LSP refresh interval for Level 2 only\n" - "LSP refresh interval for Level 2 only in seconds\n") static int area_passwd_set(struct vty *vty, int level, @@ -2192,6 +2250,19 @@ area_passwd_set(struct vty *vty, int level, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "(area-password|domain-password) md5 WORD authenticate snp (send-only|validate)", + * "Configure the authentication password for an area\n" + * "Set the authentication password for a routing domain\n" + * "Authentication type\n" + * "Level-wide password\n" + * "Authentication\n" + * "SNP PDUs\n" + * "Send but do not check PDUs on receiving\n" + * "Send and check PDUs on receiving\n" + * + */ DEFUN (area_passwd_md5, area_passwd_md5_cmd, "(area-password|domain-password) md5 WORD", @@ -2214,18 +2285,20 @@ DEFUN (area_passwd_md5, argv[2]->arg, snp_auth); } -ALIAS (area_passwd_md5, - area_passwd_md5_snpauth_cmd, - "(area-password|domain-password) md5 WORD authenticate snp (send-only|validate)", - "Configure the authentication password for an area\n" - "Set the authentication password for a routing domain\n" - "Authentication type\n" - "Level-wide password\n" - "Authentication\n" - "SNP PDUs\n" - "Send but do not check PDUs on receiving\n" - "Send and check PDUs on receiving\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "(area-password|domain-password) clear WORD authenticate snp (send-only|validate)", + * "Configure the authentication password for an area\n" + * "Set the authentication password for a routing domain\n" + * "Authentication type\n" + * "Area password\n" + * "Authentication\n" + * "SNP PDUs\n" + * "Send but do not check PDUs on receiving\n" + * "Send and check PDUs on receiving\n" + * + */ DEFUN (area_passwd_clear, area_passwd_clear_cmd, "(area-password|domain-password) clear WORD", @@ -2248,17 +2321,6 @@ DEFUN (area_passwd_clear, argv[2]->arg, snp_auth); } -ALIAS (area_passwd_clear, - area_passwd_clear_snpauth_cmd, - "(area-password|domain-password) clear WORD authenticate snp (send-only|validate)", - "Configure the authentication password for an area\n" - "Set the authentication password for a routing domain\n" - "Authentication type\n" - "Area password\n" - "Authentication\n" - "SNP PDUs\n" - "Send but do not check PDUs on receiving\n" - "Send and check PDUs on receiving\n") DEFUN (no_area_passwd, no_area_passwd_cmd, @@ -2296,70 +2358,51 @@ isis_vty_init (void) install_element (INTERFACE_NODE, &isis_passwd_cmd); install_element (INTERFACE_NODE, &no_isis_passwd_cmd); - install_element (INTERFACE_NODE, &no_isis_passwd_arg_cmd); install_element (INTERFACE_NODE, &isis_priority_cmd); install_element (INTERFACE_NODE, &no_isis_priority_cmd); - install_element (INTERFACE_NODE, &no_isis_priority_arg_cmd); install_element (INTERFACE_NODE, &isis_priority_l1_cmd); install_element (INTERFACE_NODE, &no_isis_priority_l1_cmd); - install_element (INTERFACE_NODE, &no_isis_priority_l1_arg_cmd); install_element (INTERFACE_NODE, &isis_priority_l2_cmd); install_element (INTERFACE_NODE, &no_isis_priority_l2_cmd); - install_element (INTERFACE_NODE, &no_isis_priority_l2_arg_cmd); install_element (INTERFACE_NODE, &isis_metric_cmd); install_element (INTERFACE_NODE, &no_isis_metric_cmd); - install_element (INTERFACE_NODE, &no_isis_metric_arg_cmd); install_element (INTERFACE_NODE, &isis_metric_l1_cmd); install_element (INTERFACE_NODE, &no_isis_metric_l1_cmd); - install_element (INTERFACE_NODE, &no_isis_metric_l1_arg_cmd); install_element (INTERFACE_NODE, &isis_metric_l2_cmd); install_element (INTERFACE_NODE, &no_isis_metric_l2_cmd); - install_element (INTERFACE_NODE, &no_isis_metric_l2_arg_cmd); install_element (INTERFACE_NODE, &isis_hello_interval_cmd); install_element (INTERFACE_NODE, &no_isis_hello_interval_cmd); - install_element (INTERFACE_NODE, &no_isis_hello_interval_arg_cmd); install_element (INTERFACE_NODE, &isis_hello_interval_l1_cmd); install_element (INTERFACE_NODE, &no_isis_hello_interval_l1_cmd); - install_element (INTERFACE_NODE, &no_isis_hello_interval_l1_arg_cmd); install_element (INTERFACE_NODE, &isis_hello_interval_l2_cmd); install_element (INTERFACE_NODE, &no_isis_hello_interval_l2_cmd); - install_element (INTERFACE_NODE, &no_isis_hello_interval_l2_arg_cmd); install_element (INTERFACE_NODE, &isis_hello_multiplier_cmd); install_element (INTERFACE_NODE, &no_isis_hello_multiplier_cmd); - install_element (INTERFACE_NODE, &no_isis_hello_multiplier_arg_cmd); install_element (INTERFACE_NODE, &isis_hello_multiplier_l1_cmd); install_element (INTERFACE_NODE, &no_isis_hello_multiplier_l1_cmd); - install_element (INTERFACE_NODE, &no_isis_hello_multiplier_l1_arg_cmd); install_element (INTERFACE_NODE, &isis_hello_multiplier_l2_cmd); install_element (INTERFACE_NODE, &no_isis_hello_multiplier_l2_cmd); - install_element (INTERFACE_NODE, &no_isis_hello_multiplier_l2_arg_cmd); install_element (INTERFACE_NODE, &isis_hello_padding_cmd); install_element (INTERFACE_NODE, &no_isis_hello_padding_cmd); install_element (INTERFACE_NODE, &csnp_interval_cmd); install_element (INTERFACE_NODE, &no_csnp_interval_cmd); - install_element (INTERFACE_NODE, &no_csnp_interval_arg_cmd); install_element (INTERFACE_NODE, &csnp_interval_l1_cmd); install_element (INTERFACE_NODE, &no_csnp_interval_l1_cmd); - install_element (INTERFACE_NODE, &no_csnp_interval_l1_arg_cmd); install_element (INTERFACE_NODE, &csnp_interval_l2_cmd); install_element (INTERFACE_NODE, &no_csnp_interval_l2_cmd); - install_element (INTERFACE_NODE, &no_csnp_interval_l2_arg_cmd); install_element (INTERFACE_NODE, &psnp_interval_cmd); install_element (INTERFACE_NODE, &no_psnp_interval_cmd); - install_element (INTERFACE_NODE, &no_psnp_interval_arg_cmd); install_element (INTERFACE_NODE, &psnp_interval_l1_cmd); install_element (INTERFACE_NODE, &no_psnp_interval_l1_cmd); - install_element (INTERFACE_NODE, &no_psnp_interval_l1_arg_cmd); install_element (INTERFACE_NODE, &psnp_interval_l2_cmd); install_element (INTERFACE_NODE, &no_psnp_interval_l2_cmd); - install_element (INTERFACE_NODE, &no_psnp_interval_l2_arg_cmd); install_element (ISIS_NODE, &metric_style_cmd); install_element (ISIS_NODE, &no_metric_style_cmd); @@ -2375,54 +2418,39 @@ isis_vty_init (void) install_element (ISIS_NODE, &area_lsp_mtu_cmd); install_element (ISIS_NODE, &no_area_lsp_mtu_cmd); - install_element (ISIS_NODE, &no_area_lsp_mtu_arg_cmd); install_element (ISIS_NODE, &is_type_cmd); install_element (ISIS_NODE, &no_is_type_cmd); install_element (ISIS_NODE, &lsp_gen_interval_cmd); install_element (ISIS_NODE, &no_lsp_gen_interval_cmd); - install_element (ISIS_NODE, &no_lsp_gen_interval_arg_cmd); install_element (ISIS_NODE, &lsp_gen_interval_l1_cmd); install_element (ISIS_NODE, &no_lsp_gen_interval_l1_cmd); - install_element (ISIS_NODE, &no_lsp_gen_interval_l1_arg_cmd); install_element (ISIS_NODE, &lsp_gen_interval_l2_cmd); install_element (ISIS_NODE, &no_lsp_gen_interval_l2_cmd); - install_element (ISIS_NODE, &no_lsp_gen_interval_l2_arg_cmd); install_element (ISIS_NODE, &spf_interval_cmd); install_element (ISIS_NODE, &no_spf_interval_cmd); - install_element (ISIS_NODE, &no_spf_interval_arg_cmd); install_element (ISIS_NODE, &spf_interval_l1_cmd); install_element (ISIS_NODE, &no_spf_interval_l1_cmd); - install_element (ISIS_NODE, &no_spf_interval_l1_arg_cmd); install_element (ISIS_NODE, &spf_interval_l2_cmd); install_element (ISIS_NODE, &no_spf_interval_l2_cmd); - install_element (ISIS_NODE, &no_spf_interval_l2_arg_cmd); install_element (ISIS_NODE, &max_lsp_lifetime_cmd); install_element (ISIS_NODE, &no_max_lsp_lifetime_cmd); - install_element (ISIS_NODE, &no_max_lsp_lifetime_arg_cmd); install_element (ISIS_NODE, &max_lsp_lifetime_l1_cmd); install_element (ISIS_NODE, &no_max_lsp_lifetime_l1_cmd); - install_element (ISIS_NODE, &no_max_lsp_lifetime_l1_arg_cmd); install_element (ISIS_NODE, &max_lsp_lifetime_l2_cmd); install_element (ISIS_NODE, &no_max_lsp_lifetime_l2_cmd); - install_element (ISIS_NODE, &no_max_lsp_lifetime_l2_arg_cmd); install_element (ISIS_NODE, &lsp_refresh_interval_cmd); install_element (ISIS_NODE, &no_lsp_refresh_interval_cmd); - install_element (ISIS_NODE, &no_lsp_refresh_interval_arg_cmd); install_element (ISIS_NODE, &lsp_refresh_interval_l1_cmd); install_element (ISIS_NODE, &no_lsp_refresh_interval_l1_cmd); - install_element (ISIS_NODE, &no_lsp_refresh_interval_l1_arg_cmd); install_element (ISIS_NODE, &lsp_refresh_interval_l2_cmd); install_element (ISIS_NODE, &no_lsp_refresh_interval_l2_cmd); - install_element (ISIS_NODE, &no_lsp_refresh_interval_l2_arg_cmd); install_element (ISIS_NODE, &area_passwd_md5_cmd); - install_element (ISIS_NODE, &area_passwd_md5_snpauth_cmd); install_element (ISIS_NODE, &area_passwd_clear_cmd); - install_element (ISIS_NODE, &area_passwd_clear_snpauth_cmd); install_element (ISIS_NODE, &no_area_passwd_cmd); } diff --git a/isisd/isisd.c b/isisd/isisd.c index c1401ac13..bfee7a810 100644 --- a/isisd/isisd.c +++ b/isisd/isisd.c @@ -1978,6 +1978,14 @@ DEFUN (topology_baseis, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no topology base-is", + * NO_STR + * "Topology generation for IS-IS\n" + * "A Network IS Base for this topology\n" + * + */ DEFUN (no_topology_baseis, no_topology_baseis_cmd, "no topology base-is WORD", @@ -1995,12 +2003,6 @@ DEFUN (no_topology_baseis, return CMD_SUCCESS; } -ALIAS (no_topology_baseis, - no_topology_baseis_noid_cmd, - "no topology base-is", - NO_STR - "Topology generation for IS-IS\n" - "A Network IS Base for this topology\n") DEFUN (topology_basedynh, topology_basedynh_cmd, @@ -2418,7 +2420,6 @@ isis_init () install_element (ISIS_NODE, &topology_baseis_cmd); install_element (ISIS_NODE, &topology_basedynh_cmd); install_element (ISIS_NODE, &no_topology_baseis_cmd); - install_element (ISIS_NODE, &no_topology_baseis_noid_cmd); install_element (VIEW_NODE, &show_isis_generated_topology_cmd); install_element (ENABLE_NODE, &show_isis_generated_topology_cmd); #endif /* TOPOLOGY_GENERATE */ diff --git a/lib/command.c b/lib/command.c index 680d32b03..b676b0c9d 100644 --- a/lib/command.c +++ b/lib/command.c @@ -952,6 +952,12 @@ DEFUN (disable, } /* Down vty node level. */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "quit", + * "Exit current mode and down to previous mode\n" + * + */ DEFUN (config_exit, config_exit_cmd, "exit", @@ -1011,10 +1017,6 @@ DEFUN (config_exit, } /* quit is alias of exit. */ -ALIAS (config_exit, - config_quit_cmd, - "quit", - "Exit current mode and down to previous mode\n") /* End of configuration. */ DEFUN (config_end, @@ -1124,6 +1126,18 @@ DEFUN (config_list, } /* Write current configuration into file. */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "copy running-config startup-config", + * "Copy configuration\n" + * "Copy running config to... \n" + * "Copy running config to startup config (same as write file)\n" + * + * "show running-config", + * SHOW_STR + * "running configuration\n" + * + */ DEFUN (config_write, config_write_cmd, "write []", @@ -1268,19 +1282,8 @@ finished: return ret; } -ALIAS (config_write, - copy_runningconfig_startupconfig_cmd, - "copy running-config startup-config", - "Copy configuration\n" - "Copy running config to... \n" - "Copy running config to startup config (same as write file)\n") /* Write current configuration into the terminal. */ -ALIAS (config_write, - show_running_config_cmd, - "show running-config", - SHOW_STR - "running configuration\n") /* Write startup configuration into the terminal. */ DEFUN (show_startup_config, @@ -1352,7 +1355,8 @@ DEFUN (config_no_hostname, } /* VTY interface password set. */ -DEFUN (config_password, password_cmd, +DEFUN (config_password, + password_cmd, "password [8] WORD", "Assign the terminal connection password\n" "Specifies a HIDDEN password will follow\n" @@ -1393,7 +1397,8 @@ DEFUN (config_password, password_cmd, } /* VTY enable password set. */ -DEFUN (config_enable_password, enable_password_cmd, +DEFUN (config_enable_password, + enable_password_cmd, "enable password [8] WORD", "Modify enable password parameters\n" "Assign the privileged level password\n" @@ -1448,7 +1453,8 @@ DEFUN (config_enable_password, enable_password_cmd, } /* VTY enable password delete. */ -DEFUN (no_config_enable_password, no_enable_password_cmd, +DEFUN (no_config_enable_password, + no_enable_password_cmd, "no enable password", NO_STR "Modify enable password parameters\n" @@ -1515,7 +1521,8 @@ DEFUN (no_service_password_encrypt, return CMD_SUCCESS; } -DEFUN (config_terminal_length, config_terminal_length_cmd, +DEFUN (config_terminal_length, + config_terminal_length_cmd, "terminal length (0-512)", "Set terminal line parameters\n" "Set number of lines on a screen\n" @@ -1535,7 +1542,8 @@ DEFUN (config_terminal_length, config_terminal_length_cmd, return CMD_SUCCESS; } -DEFUN (config_terminal_no_length, config_terminal_no_length_cmd, +DEFUN (config_terminal_no_length, + config_terminal_no_length_cmd, "terminal no length", "Set terminal line parameters\n" NO_STR @@ -1545,7 +1553,8 @@ DEFUN (config_terminal_no_length, config_terminal_no_length_cmd, return CMD_SUCCESS; } -DEFUN (service_terminal_length, service_terminal_length_cmd, +DEFUN (service_terminal_length, + service_terminal_length_cmd, "service terminal-length (0-512)", "Set up miscellaneous service\n" "System wide terminal length configuration\n" @@ -1565,7 +1574,8 @@ DEFUN (service_terminal_length, service_terminal_length_cmd, return CMD_SUCCESS; } -DEFUN (no_service_terminal_length, no_service_terminal_length_cmd, +DEFUN (no_service_terminal_length, + no_service_terminal_length_cmd, "no service terminal-length [(0-512)]", NO_STR "Set up miscellaneous service\n" @@ -2085,13 +2095,11 @@ void install_default (enum node_type node) { install_element (node, &config_exit_cmd); - install_element (node, &config_quit_cmd); install_element (node, &config_end_cmd); install_element (node, &config_help_cmd); install_element (node, &config_list_cmd); install_element (node, &config_write_cmd); - install_element (node, &show_running_config_cmd); } /* Initialize command interface. Install basic nodes and commands. */ @@ -2125,7 +2133,6 @@ cmd_init (int terminal) { install_element (VIEW_NODE, &config_list_cmd); install_element (VIEW_NODE, &config_exit_cmd); - install_element (VIEW_NODE, &config_quit_cmd); install_element (VIEW_NODE, &config_help_cmd); install_element (VIEW_NODE, &config_enable_cmd); install_element (VIEW_NODE, &config_terminal_length_cmd); @@ -2136,7 +2143,6 @@ cmd_init (int terminal) install_element (RESTRICTED_NODE, &config_list_cmd); install_element (RESTRICTED_NODE, &config_exit_cmd); - install_element (RESTRICTED_NODE, &config_quit_cmd); install_element (RESTRICTED_NODE, &config_help_cmd); install_element (RESTRICTED_NODE, &config_enable_cmd); install_element (RESTRICTED_NODE, &config_terminal_length_cmd); @@ -2149,7 +2155,6 @@ cmd_init (int terminal) install_default (ENABLE_NODE); install_element (ENABLE_NODE, &config_disable_cmd); install_element (ENABLE_NODE, &config_terminal_cmd); - install_element (ENABLE_NODE, ©_runningconfig_startupconfig_cmd); } install_element (ENABLE_NODE, &show_startup_config_cmd); install_element (ENABLE_NODE, &show_version_cmd); diff --git a/lib/filter.c b/lib/filter.c index 33801ca11..dee752f22 100644 --- a/lib/filter.c +++ b/lib/filter.c @@ -1381,6 +1381,20 @@ DEFUN (access_list_remark, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no access-list (<1-99>|<100-199>|<1300-1999>|<2000-2699>|WORD) remark .LINE", + * NO_STR + * "Add an access list entry\n" + * "IP standard access list\n" + * "IP extended access list\n" + * "IP standard access list (expanded range)\n" + * "IP extended access list (expanded range)\n" + * "IP zebra access-list\n" + * "Access list entry comment\n" + * "Comment up to 100 characters\n" + * + */ DEFUN (no_access_list_remark, no_access_list_remark_cmd, "no access-list (<1-99>|<100-199>|<1300-1999>|<2000-2699>|WORD) remark", @@ -1396,18 +1410,6 @@ DEFUN (no_access_list_remark, return vty_access_list_remark_unset (vty, AFI_IP, argv[2]->arg); } -ALIAS (no_access_list_remark, - no_access_list_remark_arg_cmd, - "no access-list (<1-99>|<100-199>|<1300-1999>|<2000-2699>|WORD) remark .LINE", - NO_STR - "Add an access list entry\n" - "IP standard access list\n" - "IP extended access list\n" - "IP standard access list (expanded range)\n" - "IP extended access list (expanded range)\n" - "IP zebra access-list\n" - "Access list entry comment\n" - "Comment up to 100 characters\n") #ifdef HAVE_IPV6 DEFUN (ipv6_access_list, @@ -1550,6 +1552,17 @@ DEFUN (ipv6_access_list_remark, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ipv6 access-list WORD remark .LINE", + * NO_STR + * IPV6_STR + * "Add an access list entry\n" + * "IPv6 zebra access-list\n" + * "Access list entry comment\n" + * "Comment up to 100 characters\n" + * + */ DEFUN (no_ipv6_access_list_remark, no_ipv6_access_list_remark_cmd, "no ipv6 access-list WORD remark", @@ -1562,15 +1575,6 @@ DEFUN (no_ipv6_access_list_remark, return vty_access_list_remark_unset (vty, AFI_IP6, argv[3]->arg); } -ALIAS (no_ipv6_access_list_remark, - no_ipv6_access_list_remark_arg_cmd, - "no ipv6 access-list WORD remark .LINE", - NO_STR - IPV6_STR - "Add an access list entry\n" - "IPv6 zebra access-list\n" - "Access list entry comment\n" - "Comment up to 100 characters\n") #endif /* HAVE_IPV6 */ void config_write_access_zebra (struct vty *, struct filter *); @@ -1958,7 +1962,6 @@ access_list_init_ipv4 (void) install_element (CONFIG_NODE, &access_list_remark_cmd); install_element (CONFIG_NODE, &no_access_list_all_cmd); install_element (CONFIG_NODE, &no_access_list_remark_cmd); - install_element (CONFIG_NODE, &no_access_list_remark_arg_cmd); } #ifdef HAVE_IPV6 @@ -2022,7 +2025,6 @@ access_list_init_ipv6 (void) install_element (CONFIG_NODE, &no_ipv6_access_list_all_cmd); install_element (CONFIG_NODE, &ipv6_access_list_remark_cmd); install_element (CONFIG_NODE, &no_ipv6_access_list_remark_cmd); - install_element (CONFIG_NODE, &no_ipv6_access_list_remark_arg_cmd); } #endif /* HAVE_IPV6 */ diff --git a/lib/if_rmap.c b/lib/if_rmap.c index 0e1199f21..240a03cab 100644 --- a/lib/if_rmap.c +++ b/lib/if_rmap.c @@ -209,6 +209,16 @@ if_rmap_unset (const char *ifname, enum if_rmap_type type, return 1; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "route-map RMAP_NAME (in|out) IFNAME", + * "Route map set\n" + * "Route map name\n" + * "Route map set for input filtering\n" + * "Route map set for output filtering\n" + * "Route map interface name\n" + * + */ DEFUN (if_rmap, if_rmap_cmd, "route-map RMAP_NAME (in|out) IFNAME", @@ -235,15 +245,18 @@ DEFUN (if_rmap, return CMD_SUCCESS; } -ALIAS (if_rmap, - if_ipv6_rmap_cmd, - "route-map RMAP_NAME (in|out) IFNAME", - "Route map set\n" - "Route map name\n" - "Route map set for input filtering\n" - "Route map set for output filtering\n" - "Route map interface name\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no route-map ROUTEMAP_NAME (in|out) IFNAME", + * NO_STR + * "Route map unset\n" + * "Route map name\n" + * "Route map for input filtering\n" + * "Route map for output filtering\n" + * "Route map interface name\n" + * + */ DEFUN (no_if_rmap, no_if_rmap_cmd, "no route-map ROUTEMAP_NAME (in|out) IFNAME", @@ -276,15 +289,6 @@ DEFUN (no_if_rmap, return CMD_SUCCESS; } -ALIAS (no_if_rmap, - no_if_ipv6_rmap_cmd, - "no route-map ROUTEMAP_NAME (in|out) IFNAME", - NO_STR - "Route map unset\n" - "Route map name\n" - "Route map for input filtering\n" - "Route map for output filtering\n" - "Route map interface name\n") /* Configuration write function. */ int @@ -333,8 +337,6 @@ if_rmap_init (int node) { ifrmaphash = hash_create (if_rmap_hash_make, if_rmap_hash_cmp); if (node == RIPNG_NODE) { - install_element (RIPNG_NODE, &if_ipv6_rmap_cmd); - install_element (RIPNG_NODE, &no_if_ipv6_rmap_cmd); } else if (node == RIP_NODE) { install_element (RIP_NODE, &if_rmap_cmd); install_element (RIP_NODE, &no_if_rmap_cmd); diff --git a/lib/plist.c b/lib/plist.c index 3de92887b..d874e1d02 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -1824,6 +1824,17 @@ DEFUN (ip_prefix_list_description, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ip prefix-list WORD description .LINE", + * NO_STR + * IP_STR + * PREFIX_LIST_STR + * "Name of a prefix list\n" + * "Prefix-list specific description\n" + * "Up to 80 characters describing this prefix-list\n" + * + */ DEFUN (no_ip_prefix_list_description, no_ip_prefix_list_description_cmd, "no ip prefix-list WORD description", @@ -1836,15 +1847,6 @@ DEFUN (no_ip_prefix_list_description, return vty_prefix_list_desc_unset (vty, AFI_IP, argv[3]->arg); } -ALIAS (no_ip_prefix_list_description, - no_ip_prefix_list_description_arg_cmd, - "no ip prefix-list WORD description .LINE", - NO_STR - IP_STR - PREFIX_LIST_STR - "Name of a prefix list\n" - "Prefix-list specific description\n" - "Up to 80 characters describing this prefix-list\n") DEFUN (show_ip_prefix_list, show_ip_prefix_list_cmd, @@ -2420,6 +2422,17 @@ DEFUN (ipv6_prefix_list_description, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ipv6 prefix-list WORD description .LINE", + * NO_STR + * IPV6_STR + * PREFIX_LIST_STR + * "Name of a prefix list\n" + * "Prefix-list specific description\n" + * "Up to 80 characters describing this prefix-list\n" + * + */ DEFUN (no_ipv6_prefix_list_description, no_ipv6_prefix_list_description_cmd, "no ipv6 prefix-list WORD description", @@ -2432,15 +2445,6 @@ DEFUN (no_ipv6_prefix_list_description, return vty_prefix_list_desc_unset (vty, AFI_IP6, argv[3]->arg); } -ALIAS (no_ipv6_prefix_list_description, - no_ipv6_prefix_list_description_arg_cmd, - "no ipv6 prefix-list WORD description .LINE", - NO_STR - IPV6_STR - PREFIX_LIST_STR - "Name of a prefix list\n" - "Prefix-list specific description\n" - "Up to 80 characters describing this prefix-list\n") DEFUN (show_ipv6_prefix_list, show_ipv6_prefix_list_cmd, @@ -2946,7 +2950,6 @@ prefix_list_init_ipv4 (void) install_element (CONFIG_NODE, &ip_prefix_list_description_cmd); install_element (CONFIG_NODE, &no_ip_prefix_list_description_cmd); - install_element (CONFIG_NODE, &no_ip_prefix_list_description_arg_cmd); install_element (CONFIG_NODE, &ip_prefix_list_sequence_number_cmd); install_element (CONFIG_NODE, &no_ip_prefix_list_sequence_number_cmd); @@ -3023,7 +3026,6 @@ prefix_list_init_ipv6 (void) install_element (CONFIG_NODE, &ipv6_prefix_list_description_cmd); install_element (CONFIG_NODE, &no_ipv6_prefix_list_description_cmd); - install_element (CONFIG_NODE, &no_ipv6_prefix_list_description_arg_cmd); install_element (CONFIG_NODE, &ipv6_prefix_list_sequence_number_cmd); install_element (CONFIG_NODE, &no_ipv6_prefix_list_sequence_number_cmd); diff --git a/lib/routemap.c b/lib/routemap.c index 2d7a8be66..f89d07802 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -1530,6 +1530,16 @@ DEFUN (no_rmap_onmatch_next, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "continue", + * "Continue on a different entry within the route-map\n" + * + * "continue (1-65535)", + * "Continue on a different entry within the route-map\n" + * "Route-map entry sequence number\n" + * + */ DEFUN (rmap_onmatch_goto, rmap_onmatch_goto_cmd, "on-match goto (1-65535)", @@ -1578,6 +1588,18 @@ DEFUN (rmap_onmatch_goto, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no continue", + * NO_STR + * "Continue on a different entry within the route-map\n" + * + * "no continue (1-65535)", + * NO_STR + * "Continue on a different entry within the route-map\n" + * "Route-map entry sequence number\n" + * + */ DEFUN (no_rmap_onmatch_goto, no_rmap_onmatch_goto_cmd, "no on-match goto", @@ -1596,30 +1618,10 @@ DEFUN (no_rmap_onmatch_goto, } /* Cisco/GNU Zebra compatible ALIASes for on-match next */ -ALIAS (rmap_onmatch_goto, - rmap_continue_cmd, - "continue", - "Continue on a different entry within the route-map\n") - -ALIAS (no_rmap_onmatch_goto, - no_rmap_continue_cmd, - "no continue", - NO_STR - "Continue on a different entry within the route-map\n") + /* GNU Zebra compatible */ -ALIAS (rmap_onmatch_goto, - rmap_continue_seq_cmd, - "continue (1-65535)", - "Continue on a different entry within the route-map\n" - "Route-map entry sequence number\n") - -ALIAS (no_rmap_onmatch_goto, - no_rmap_continue_seq, - "no continue (1-65535)", - NO_STR - "Continue on a different entry within the route-map\n" - "Route-map entry sequence number\n") + DEFUN (rmap_show_name, rmap_show_name_cmd, @@ -1809,8 +1811,6 @@ route_map_init_vty (void) install_element (RMAP_NODE, &no_rmap_onmatch_goto_cmd); /* Install the continue stuff (ALIAS of on-match). */ - install_element (RMAP_NODE, &rmap_continue_cmd); - install_element (RMAP_NODE, &no_rmap_continue_cmd); /* Install the call stuff. */ install_element (RMAP_NODE, &rmap_call_cmd); diff --git a/lib/vty.c b/lib/vty.c index a106d5d24..2ecd1d5e0 100644 --- a/lib/vty.c +++ b/lib/vty.c @@ -2923,6 +2923,14 @@ DEFUN (terminal_monitor, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no terminal monitor", + * NO_STR + * "Set terminal line parameters\n" + * "Copy debug output to the current terminal line\n" + * + */ DEFUN (terminal_no_monitor, terminal_no_monitor_cmd, "terminal no monitor", @@ -2934,12 +2942,6 @@ DEFUN (terminal_no_monitor, return CMD_SUCCESS; } -ALIAS (terminal_no_monitor, - no_terminal_monitor_cmd, - "no terminal monitor", - NO_STR - "Set terminal line parameters\n" - "Copy debug output to the current terminal line\n") DEFUN (show_history, show_history_cmd, @@ -3149,7 +3151,6 @@ vty_init (struct thread_master *master_thread) install_element (CONFIG_NODE, &log_commands_cmd); install_element (ENABLE_NODE, &terminal_monitor_cmd); install_element (ENABLE_NODE, &terminal_no_monitor_cmd); - install_element (ENABLE_NODE, &no_terminal_monitor_cmd); install_element (ENABLE_NODE, &show_history_cmd); install_default (VTY_NODE); diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c index cd11cd2a8..4863342ef 100644 --- a/ospf6d/ospf6_area.c +++ b/ospf6d/ospf6_area.c @@ -433,6 +433,32 @@ ospf6_area_show (struct vty *vty, struct ospf6_area *oa) oa = ospf6_area_get (area_id, ospf6); \ } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "area (A.B.C.D|<0-4294967295>) range X:X::X:X/M advertise cost <0-16777215>", + * "OSPF area parameters\n" + * OSPF6_AREA_ID_STR + * "Summarize routes matching address/mask (border routers only)\n" + * "Area range prefix\n" + * "User specified metric for this range\n" + * "Advertised metric for this range\n" + * + * "area A.B.C.D range X:X::X:X/M (advertise|not-advertise)", + * "OSPF area parameters\n" + * OSPF6_AREA_ID_STR + * "Configured address range\n" + * "Specify IPv6 prefix\n" + * + * + * "area (A.B.C.D|<0-4294967295>) range X:X::X:X/M cost <0-16777215>", + * "OSPF area parameters\n" + * OSPF6_AREA_ID_STR + * "Summarize routes matching address/mask (border routers only)\n" + * "Area range prefix\n" + * "User specified metric for this range\n" + * "Advertised metric for this range\n" + * + */ DEFUN (area_range, area_range_cmd, "area A.B.C.D range X:X::X:X/M", @@ -503,35 +529,37 @@ DEFUN (area_range, return CMD_SUCCESS; } -ALIAS (area_range, - area_range_advertise_cmd, - "area A.B.C.D range X:X::X:X/M (advertise|not-advertise)", - "OSPF area parameters\n" - OSPF6_AREA_ID_STR - "Configured address range\n" - "Specify IPv6 prefix\n" - ) -ALIAS (area_range, - area_range_cost_cmd, - "area (A.B.C.D|<0-4294967295>) range X:X::X:X/M cost <0-16777215>", - "OSPF area parameters\n" - OSPF6_AREA_ID_STR - "Summarize routes matching address/mask (border routers only)\n" - "Area range prefix\n" - "User specified metric for this range\n" - "Advertised metric for this range\n") - -ALIAS (area_range, - area_range_advertise_cost_cmd, - "area (A.B.C.D|<0-4294967295>) range X:X::X:X/M advertise cost <0-16777215>", - "OSPF area parameters\n" - OSPF6_AREA_ID_STR - "Summarize routes matching address/mask (border routers only)\n" - "Area range prefix\n" - "User specified metric for this range\n" - "Advertised metric for this range\n") + +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no area (A.B.C.D|<0-4294967295>) range X:X::X:X/M advertise cost <0-16777215>", + * NO_STR + * "OSPF area parameters\n" + * OSPF6_AREA_ID_STR + * "Summarize routes matching address/mask (border routers only)\n" + * "Area range prefix\n" + * "User specified metric for this range\n" + * "Advertised metric for this range\n" + * + * "no area A.B.C.D range X:X::X:X/M (advertise|not-advertise)", + * NO_STR + * "OSPF area parameters\n" + * OSPF6_AREA_ID_STR + * "Configured address range\n" + * "Specify IPv6 prefix\n" + * + * "no area (A.B.C.D|<0-4294967295>) range X:X::X:X/M cost <0-16777215>", + * NO_STR + * "OSPF area parameters\n" + * OSPF6_AREA_ID_STR + * "Summarize routes matching address/mask (border routers only)\n" + * "Area range prefix\n" + * "User specified metric for this range\n" + * "Advertised metric for this range\n" + * + */ DEFUN (no_area_range, no_area_range_cmd, "no area A.B.C.D range X:X::X:X/M", @@ -584,36 +612,8 @@ DEFUN (no_area_range, return CMD_SUCCESS; } -ALIAS (no_area_range, - no_area_range_advertise_cmd, - "no area A.B.C.D range X:X::X:X/M (advertise|not-advertise)", - NO_STR - "OSPF area parameters\n" - OSPF6_AREA_ID_STR - "Configured address range\n" - "Specify IPv6 prefix\n") -ALIAS (no_area_range, - no_area_range_cost_cmd, - "no area (A.B.C.D|<0-4294967295>) range X:X::X:X/M cost <0-16777215>", - NO_STR - "OSPF area parameters\n" - OSPF6_AREA_ID_STR - "Summarize routes matching address/mask (border routers only)\n" - "Area range prefix\n" - "User specified metric for this range\n" - "Advertised metric for this range\n") - -ALIAS (no_area_range, - no_area_range_advertise_cost_cmd, - "no area (A.B.C.D|<0-4294967295>) range X:X::X:X/M advertise cost <0-16777215>", - NO_STR - "OSPF area parameters\n" - OSPF6_AREA_ID_STR - "Summarize routes matching address/mask (border routers only)\n" - "Area range prefix\n" - "User specified metric for this range\n" - "Advertised metric for this range\n") + void ospf6_area_config_write (struct vty *vty) @@ -1094,13 +1094,7 @@ ospf6_area_init (void) install_element (ENABLE_NODE, &show_ipv6_ospf6_simulate_spf_tree_root_cmd); install_element (OSPF6_NODE, &area_range_cmd); - install_element (OSPF6_NODE, &area_range_advertise_cmd); - install_element (OSPF6_NODE, &area_range_cost_cmd); - install_element (OSPF6_NODE, &area_range_advertise_cost_cmd); install_element (OSPF6_NODE, &no_area_range_cmd); - install_element (OSPF6_NODE, &no_area_range_advertise_cmd); - install_element (OSPF6_NODE, &no_area_range_cost_cmd); - install_element (OSPF6_NODE, &no_area_range_advertise_cost_cmd); install_element (OSPF6_NODE, &ospf6_area_stub_no_summary_cmd); install_element (OSPF6_NODE, &ospf6_area_stub_cmd); install_element (OSPF6_NODE, &no_ospf6_area_stub_no_summary_cmd); diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index f513e68f7..696f18f03 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -679,6 +679,16 @@ DEFUN (ospf6_redistribute_routemap, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no redistribute " QUAGGA_REDIST_STR_OSPF6D " route-map WORD", + * NO_STR + * "Redistribute\n" + * QUAGGA_REDIST_HELP_STR_OSPF6D + * "Route map reference\n" + * "Route map name\n" + * + */ DEFUN (no_ospf6_redistribute, no_ospf6_redistribute_cmd, "no redistribute " QUAGGA_REDIST_STR_OSPF6D, @@ -698,14 +708,6 @@ DEFUN (no_ospf6_redistribute, return CMD_SUCCESS; } -ALIAS (no_ospf6_redistribute, - no_ospf6_redistribute_route_map_cmd, - "no redistribute " QUAGGA_REDIST_STR_OSPF6D " route-map WORD", - NO_STR - "Redistribute\n" - QUAGGA_REDIST_HELP_STR_OSPF6D - "Route map reference\n" - "Route map name\n") int ospf6_redistribute_config_write (struct vty *vty) @@ -1051,6 +1053,15 @@ DEFUN (ospf6_routemap_match_interface, } /* "no match interface WORD" */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match interface WORD", + * MATCH_STR + * NO_STR + * "Match first hop interface of route\n" + * "Interface name\n" + * + */ DEFUN (ospf6_routemap_no_match_interface, ospf6_routemap_no_match_interface_cmd, "no match interface", @@ -1063,13 +1074,6 @@ DEFUN (ospf6_routemap_no_match_interface, return route_map_command_status (vty, ret); } -ALIAS (ospf6_routemap_no_match_interface, - ospf6_routemap_no_match_interface_val_cmd, - "no match interface WORD", - MATCH_STR - NO_STR - "Match first hop interface of route\n" - "Interface name\n") /* add "set metric-type" */ DEFUN (ospf6_routemap_set_metric_type, @@ -1114,6 +1118,15 @@ DEFUN (set_metric, } /* delete "set metric" */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no set metric <0-4294967295>", + * NO_STR + * SET_STR + * "Metric value for destination routing protocol\n" + * "Metric value\n" + * + */ DEFUN (no_set_metric, no_set_metric_cmd, "no set metric", @@ -1132,13 +1145,6 @@ DEFUN (no_set_metric, return route_map_command_status (vty, ret); } -ALIAS (no_set_metric, - no_set_metric_val_cmd, - "no set metric <0-4294967295>", - NO_STR - SET_STR - "Metric value for destination routing protocol\n" - "Metric value\n") /* add "set forwarding-address" */ DEFUN (ospf6_routemap_set_forwarding, @@ -1189,7 +1195,6 @@ ospf6_routemap_init (void) /* Match interface */ install_element (RMAP_NODE, &ospf6_routemap_match_interface_cmd); install_element (RMAP_NODE, &ospf6_routemap_no_match_interface_cmd); - install_element (RMAP_NODE, &ospf6_routemap_no_match_interface_val_cmd); /* ASE Metric Type (e.g. Type-1/Type-2) */ install_element (RMAP_NODE, &ospf6_routemap_set_metric_type_cmd); @@ -1198,7 +1203,6 @@ ospf6_routemap_init (void) /* ASE Metric */ install_element (RMAP_NODE, &set_metric_cmd); install_element (RMAP_NODE, &no_set_metric_cmd); - install_element (RMAP_NODE, &no_set_metric_val_cmd); /* ASE Metric */ install_element (RMAP_NODE, &ospf6_routemap_set_forwarding_cmd); @@ -1351,7 +1355,6 @@ ospf6_asbr_init (void) install_element (OSPF6_NODE, &ospf6_redistribute_cmd); install_element (OSPF6_NODE, &ospf6_redistribute_routemap_cmd); install_element (OSPF6_NODE, &no_ospf6_redistribute_cmd); - install_element (OSPF6_NODE, &no_ospf6_redistribute_route_map_cmd); } void @@ -1408,12 +1411,3 @@ config_write_ospf6_debug_asbr (struct vty *vty) } void -install_element_ospf6_debug_asbr () -{ - install_element (ENABLE_NODE, &debug_ospf6_asbr_cmd); - install_element (ENABLE_NODE, &no_debug_ospf6_asbr_cmd); - install_element (CONFIG_NODE, &debug_ospf6_asbr_cmd); - install_element (CONFIG_NODE, &no_debug_ospf6_asbr_cmd); -} - - diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index e53fb2180..66cc59bc3 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -986,6 +986,16 @@ ospf6_interface_show (struct vty *vty, struct interface *ifp) } /* show interface */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 ospf6 interface", + * SHOW_STR + * IP6_STR + * OSPF6_STR + * INTERFACE_STR + * + * + */ DEFUN (show_ipv6_ospf6_interface, show_ipv6_ospf6_interface_ifname_cmd, "show ipv6 ospf6 interface IFNAME", @@ -1019,15 +1029,34 @@ DEFUN (show_ipv6_ospf6_interface, return CMD_SUCCESS; } -ALIAS (show_ipv6_ospf6_interface, - show_ipv6_ospf6_interface_cmd, - "show ipv6 ospf6 interface", - SHOW_STR - IP6_STR - OSPF6_STR - INTERFACE_STR - ) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 ospf6 interface IFNAME prefix (X:X::X:X|X:X::X:X/M|detail)", + * SHOW_STR + * IP6_STR + * OSPF6_STR + * INTERFACE_STR + * IFNAME_STR + * "Display connected prefixes to advertise\n" + * OSPF6_ROUTE_ADDRESS_STR + * OSPF6_ROUTE_PREFIX_STR + * "Display details of the prefixes\n" + * + * + * "show ipv6 ospf6 interface IFNAME prefix X:X::X:X/M (match|detail)", + * SHOW_STR + * IP6_STR + * OSPF6_STR + * INTERFACE_STR + * IFNAME_STR + * "Display connected prefixes to advertise\n" + * OSPF6_ROUTE_PREFIX_STR + * OSPF6_ROUTE_MATCH_STR + * "Display details of the prefixes\n" + * + * + */ DEFUN (show_ipv6_ospf6_interface_ifname_prefix, show_ipv6_ospf6_interface_ifname_prefix_cmd, "show ipv6 ospf6 interface IFNAME prefix", @@ -1063,34 +1092,33 @@ DEFUN (show_ipv6_ospf6_interface_ifname_prefix, return CMD_SUCCESS; } -ALIAS (show_ipv6_ospf6_interface_ifname_prefix, - show_ipv6_ospf6_interface_ifname_prefix_detail_cmd, - "show ipv6 ospf6 interface IFNAME prefix (X:X::X:X|X:X::X:X/M|detail)", - SHOW_STR - IP6_STR - OSPF6_STR - INTERFACE_STR - IFNAME_STR - "Display connected prefixes to advertise\n" - OSPF6_ROUTE_ADDRESS_STR - OSPF6_ROUTE_PREFIX_STR - "Display details of the prefixes\n" - ) -ALIAS (show_ipv6_ospf6_interface_ifname_prefix, - show_ipv6_ospf6_interface_ifname_prefix_match_cmd, - "show ipv6 ospf6 interface IFNAME prefix X:X::X:X/M (match|detail)", - SHOW_STR - IP6_STR - OSPF6_STR - INTERFACE_STR - IFNAME_STR - "Display connected prefixes to advertise\n" - OSPF6_ROUTE_PREFIX_STR - OSPF6_ROUTE_MATCH_STR - "Display details of the prefixes\n" - ) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 ospf6 interface prefix X:X::X:X/M (match|detail)", + * SHOW_STR + * IP6_STR + * OSPF6_STR + * INTERFACE_STR + * "Display connected prefixes to advertise\n" + * OSPF6_ROUTE_PREFIX_STR + * OSPF6_ROUTE_MATCH_STR + * "Display details of the prefixes\n" + * + * + * "show ipv6 ospf6 interface prefix (X:X::X:X|X:X::X:X/M|detail)", + * SHOW_STR + * IP6_STR + * OSPF6_STR + * INTERFACE_STR + * "Display connected prefixes to advertise\n" + * OSPF6_ROUTE_ADDRESS_STR + * OSPF6_ROUTE_PREFIX_STR + * "Display details of the prefixes\n" + * + * + */ DEFUN (show_ipv6_ospf6_interface_prefix, show_ipv6_ospf6_interface_prefix_cmd, "show ipv6 ospf6 interface prefix", @@ -1117,31 +1145,7 @@ DEFUN (show_ipv6_ospf6_interface_prefix, return CMD_SUCCESS; } -ALIAS (show_ipv6_ospf6_interface_prefix, - show_ipv6_ospf6_interface_prefix_detail_cmd, - "show ipv6 ospf6 interface prefix (X:X::X:X|X:X::X:X/M|detail)", - SHOW_STR - IP6_STR - OSPF6_STR - INTERFACE_STR - "Display connected prefixes to advertise\n" - OSPF6_ROUTE_ADDRESS_STR - OSPF6_ROUTE_PREFIX_STR - "Display details of the prefixes\n" - ) -ALIAS (show_ipv6_ospf6_interface_prefix, - show_ipv6_ospf6_interface_prefix_match_cmd, - "show ipv6 ospf6 interface prefix X:X::X:X/M (match|detail)", - SHOW_STR - IP6_STR - OSPF6_STR - INTERFACE_STR - "Display connected prefixes to advertise\n" - OSPF6_ROUTE_PREFIX_STR - OSPF6_ROUTE_MATCH_STR - "Display details of the prefixes\n" - ) /* interface variable set command */ @@ -1352,6 +1356,15 @@ DEFUN (auto_cost_reference_bandwidth, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no auto-cost reference-bandwidth <1-4294967>", + * NO_STR + * "Calculate OSPF interface cost according to bandwidth\n" + * "Use reference bandwidth method to assign OSPF cost\n" + * "The reference bandwidth in terms of Mbits per second\n" + * + */ DEFUN (no_auto_cost_reference_bandwidth, no_auto_cost_reference_bandwidth_cmd, "no auto-cost reference-bandwidth", @@ -1375,13 +1388,6 @@ DEFUN (no_auto_cost_reference_bandwidth, return CMD_SUCCESS; } -ALIAS (no_auto_cost_reference_bandwidth, - no_auto_cost_reference_bandwidth_val_cmd, - "no auto-cost reference-bandwidth <1-4294967>", - NO_STR - "Calculate OSPF interface cost according to bandwidth\n" - "Use reference bandwidth method to assign OSPF cost\n" - "The reference bandwidth in terms of Mbits per second\n") DEFUN (ipv6_ospf6_hellointerval, ipv6_ospf6_hellointerval_cmd, @@ -1899,22 +1905,12 @@ ospf6_interface_init (void) /* Install interface node. */ install_node (&interface_node, config_write_ospf6_interface); - install_element (VIEW_NODE, &show_ipv6_ospf6_interface_cmd); install_element (VIEW_NODE, &show_ipv6_ospf6_interface_prefix_cmd); - install_element (VIEW_NODE, &show_ipv6_ospf6_interface_prefix_detail_cmd); - install_element (VIEW_NODE, &show_ipv6_ospf6_interface_prefix_match_cmd); install_element (VIEW_NODE, &show_ipv6_ospf6_interface_ifname_cmd); install_element (VIEW_NODE, &show_ipv6_ospf6_interface_ifname_prefix_cmd); - install_element (VIEW_NODE, &show_ipv6_ospf6_interface_ifname_prefix_detail_cmd); - install_element (VIEW_NODE, &show_ipv6_ospf6_interface_ifname_prefix_match_cmd); - install_element (ENABLE_NODE, &show_ipv6_ospf6_interface_cmd); install_element (ENABLE_NODE, &show_ipv6_ospf6_interface_prefix_cmd); - install_element (ENABLE_NODE, &show_ipv6_ospf6_interface_prefix_detail_cmd); - install_element (ENABLE_NODE, &show_ipv6_ospf6_interface_prefix_match_cmd); install_element (ENABLE_NODE, &show_ipv6_ospf6_interface_ifname_cmd); install_element (ENABLE_NODE, &show_ipv6_ospf6_interface_ifname_prefix_cmd); - install_element (ENABLE_NODE, &show_ipv6_ospf6_interface_ifname_prefix_detail_cmd); - install_element (ENABLE_NODE, &show_ipv6_ospf6_interface_ifname_prefix_match_cmd); install_element (CONFIG_NODE, &interface_cmd); install_default (INTERFACE_NODE); @@ -1946,7 +1942,6 @@ ospf6_interface_init (void) /* reference bandwidth commands */ install_element (OSPF6_NODE, &auto_cost_reference_bandwidth_cmd); install_element (OSPF6_NODE, &no_auto_cost_reference_bandwidth_cmd); - install_element (OSPF6_NODE, &no_auto_cost_reference_bandwidth_val_cmd); } /* Clear the specified interface structure */ diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index fbc72d6fe..d58ab567b 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -816,6 +816,16 @@ ospf6_lsa_handler_name (struct ospf6_lsa_handler *h) return buf; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "debug ospf6 lsa (router|network|inter-prefix|inter-router|as-external|link|intra-prefix|unknown) (originate|examine|flooding)", + * DEBUG_STR + * OSPF6_STR + * "Debug Link State Advertisements (LSAs)\n" + * "Specify LS type as Hexadecimal\n" + * + * + */ DEFUN (debug_ospf6_lsa_type, debug_ospf6_lsa_hex_cmd, "debug ospf6 lsa (router|network|inter-prefix|inter-router|as-external|link|intra-prefix|unknown)", @@ -860,15 +870,18 @@ DEFUN (debug_ospf6_lsa_type, return CMD_SUCCESS; } -ALIAS (debug_ospf6_lsa_type, - debug_ospf6_lsa_hex_detail_cmd, - "debug ospf6 lsa (router|network|inter-prefix|inter-router|as-external|link|intra-prefix|unknown) (originate|examine|flooding)", - DEBUG_STR - OSPF6_STR - "Debug Link State Advertisements (LSAs)\n" - "Specify LS type as Hexadecimal\n" - ) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no debug ospf6 lsa (router|network|inter-prefix|inter-router|as-external|link|intra-prefix) (originate|examine|flooding)", + * NO_STR + * DEBUG_STR + * OSPF6_STR + * "Debug Link State Advertisements (LSAs)\n" + * "Specify LS type as Hexadecimal\n" + * + * + */ DEFUN (no_debug_ospf6_lsa_type, no_debug_ospf6_lsa_hex_cmd, "no debug ospf6 lsa (router|network|inter-prefix|inter-router|as-external|link|intra-prefix|unknown)", @@ -913,27 +926,14 @@ DEFUN (no_debug_ospf6_lsa_type, return CMD_SUCCESS; } -ALIAS (no_debug_ospf6_lsa_type, - no_debug_ospf6_lsa_hex_detail_cmd, - "no debug ospf6 lsa (router|network|inter-prefix|inter-router|as-external|link|intra-prefix) (originate|examine|flooding)", - NO_STR - DEBUG_STR - OSPF6_STR - "Debug Link State Advertisements (LSAs)\n" - "Specify LS type as Hexadecimal\n" - ) void install_element_ospf6_debug_lsa (void) { install_element (ENABLE_NODE, &debug_ospf6_lsa_hex_cmd); - install_element (ENABLE_NODE, &debug_ospf6_lsa_hex_detail_cmd); install_element (ENABLE_NODE, &no_debug_ospf6_lsa_hex_cmd); - install_element (ENABLE_NODE, &no_debug_ospf6_lsa_hex_detail_cmd); install_element (CONFIG_NODE, &debug_ospf6_lsa_hex_cmd); - install_element (CONFIG_NODE, &debug_ospf6_lsa_hex_detail_cmd); install_element (CONFIG_NODE, &no_debug_ospf6_lsa_hex_cmd); - install_element (CONFIG_NODE, &no_debug_ospf6_lsa_hex_detail_cmd); } int diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c index adaef2f9f..e8f4990c9 100644 --- a/ospf6d/ospf6_message.c +++ b/ospf6d/ospf6_message.c @@ -2338,6 +2338,24 @@ ospf6_lsack_send_interface (struct thread *thread) /* Commands */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "debug ospf6 message (unknown|hello|dbdesc|lsreq|lsupdate|lsack|all) (send|recv)", + * DEBUG_STR + * OSPF6_STR + * "Debug OSPFv3 message\n" + * "Debug Unknown message\n" + * "Debug Hello message\n" + * "Debug Database Description message\n" + * "Debug Link State Request message\n" + * "Debug Link State Update message\n" + * "Debug Link State Acknowledgement message\n" + * "Debug All message\n" + * "Debug only sending message\n" + * "Debug only receiving message\n" + * + * + */ DEFUN (debug_ospf6_message, debug_ospf6_message_cmd, "debug ospf6 message (unknown|hello|dbdesc|lsreq|lsupdate|lsack|all)", @@ -2393,24 +2411,28 @@ DEFUN (debug_ospf6_message, return CMD_SUCCESS; } -ALIAS (debug_ospf6_message, - debug_ospf6_message_sendrecv_cmd, - "debug ospf6 message (unknown|hello|dbdesc|lsreq|lsupdate|lsack|all) (send|recv)", - DEBUG_STR - OSPF6_STR - "Debug OSPFv3 message\n" - "Debug Unknown message\n" - "Debug Hello message\n" - "Debug Database Description message\n" - "Debug Link State Request message\n" - "Debug Link State Update message\n" - "Debug Link State Acknowledgement message\n" - "Debug All message\n" - "Debug only sending message\n" - "Debug only receiving message\n" - ) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no debug ospf6 message " + * "(unknown|hello|dbdesc|lsreq|lsupdate|lsack|all) (send|recv)", + * NO_STR + * DEBUG_STR + * OSPF6_STR + * "Debug OSPFv3 message\n" + * "Debug Unknown message\n" + * "Debug Hello message\n" + * "Debug Database Description message\n" + * "Debug Link State Request message\n" + * "Debug Link State Update message\n" + * "Debug Link State Acknowledgement message\n" + * "Debug All message\n" + * "Debug only sending message\n" + * "Debug only receiving message\n" + * + * + */ DEFUN (no_debug_ospf6_message, no_debug_ospf6_message_cmd, "no debug ospf6 message (unknown|hello|dbdesc|lsreq|lsupdate|lsack|all)", @@ -2467,24 +2489,6 @@ DEFUN (no_debug_ospf6_message, return CMD_SUCCESS; } -ALIAS (no_debug_ospf6_message, - no_debug_ospf6_message_sendrecv_cmd, - "no debug ospf6 message " - "(unknown|hello|dbdesc|lsreq|lsupdate|lsack|all) (send|recv)", - NO_STR - DEBUG_STR - OSPF6_STR - "Debug OSPFv3 message\n" - "Debug Unknown message\n" - "Debug Hello message\n" - "Debug Database Description message\n" - "Debug Link State Request message\n" - "Debug Link State Update message\n" - "Debug Link State Acknowledgement message\n" - "Debug All message\n" - "Debug only sending message\n" - "Debug only receiving message\n" - ) int config_write_ospf6_debug_message (struct vty *vty) @@ -2549,12 +2553,8 @@ install_element_ospf6_debug_message (void) { install_element (ENABLE_NODE, &debug_ospf6_message_cmd); install_element (ENABLE_NODE, &no_debug_ospf6_message_cmd); - install_element (ENABLE_NODE, &debug_ospf6_message_sendrecv_cmd); - install_element (ENABLE_NODE, &no_debug_ospf6_message_sendrecv_cmd); install_element (CONFIG_NODE, &debug_ospf6_message_cmd); install_element (CONFIG_NODE, &no_debug_ospf6_message_cmd); - install_element (CONFIG_NODE, &debug_ospf6_message_sendrecv_cmd); - install_element (CONFIG_NODE, &no_debug_ospf6_message_sendrecv_cmd); } diff --git a/ospf6d/ospf6_neighbor.c b/ospf6d/ospf6_neighbor.c index 3e0977162..fbf0efed8 100644 --- a/ospf6d/ospf6_neighbor.c +++ b/ospf6d/ospf6_neighbor.c @@ -827,6 +827,18 @@ ospf6_neighbor_show_detail (struct vty *vty, struct ospf6_neighbor *on) ospf6_bfd_show_info(vty, on->bfd_info, 0); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 ospf6 neighbor (detail|drchoice)", + * SHOW_STR + * IP6_STR + * OSPF6_STR + * "Neighbor list\n" + * "Display details\n" + * "Display DR choices\n" + * + * + */ DEFUN (show_ipv6_ospf6_neighbor, show_ipv6_ospf6_neighbor_cmd, "show ipv6 ospf6 neighbor", @@ -870,16 +882,6 @@ DEFUN (show_ipv6_ospf6_neighbor, return CMD_SUCCESS; } -ALIAS (show_ipv6_ospf6_neighbor, - show_ipv6_ospf6_neighbor_detail_cmd, - "show ipv6 ospf6 neighbor (detail|drchoice)", - SHOW_STR - IP6_STR - OSPF6_STR - "Neighbor list\n" - "Display details\n" - "Display DR choices\n" - ) DEFUN (show_ipv6_ospf6_neighbor_one, show_ipv6_ospf6_neighbor_one_cmd, @@ -920,11 +922,20 @@ void ospf6_neighbor_init (void) { install_element (VIEW_NODE, &show_ipv6_ospf6_neighbor_cmd); - install_element (VIEW_NODE, &show_ipv6_ospf6_neighbor_detail_cmd); install_element (ENABLE_NODE, &show_ipv6_ospf6_neighbor_cmd); - install_element (ENABLE_NODE, &show_ipv6_ospf6_neighbor_detail_cmd); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "debug ospf6 neighbor (state|event)", + * DEBUG_STR + * OSPF6_STR + * "Debug OSPFv3 Neighbor\n" + * "Debug OSPFv3 Neighbor State Change\n" + * "Debug OSPFv3 Neighbor Event\n" + * + * + */ DEFUN (debug_ospf6_neighbor, debug_ospf6_neighbor_cmd, "debug ospf6 neighbor", @@ -948,16 +959,19 @@ DEFUN (debug_ospf6_neighbor, return CMD_SUCCESS; } -ALIAS (debug_ospf6_neighbor, - debug_ospf6_neighbor_detail_cmd, - "debug ospf6 neighbor (state|event)", - DEBUG_STR - OSPF6_STR - "Debug OSPFv3 Neighbor\n" - "Debug OSPFv3 Neighbor State Change\n" - "Debug OSPFv3 Neighbor Event\n" - ) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no debug ospf6 neighbor (state|event)", + * NO_STR + * DEBUG_STR + * OSPF6_STR + * "Debug OSPFv3 Neighbor\n" + * "Debug OSPFv3 Neighbor State Change\n" + * "Debug OSPFv3 Neighbor Event\n" + * + * + */ DEFUN (no_debug_ospf6_neighbor, no_debug_ospf6_neighbor_cmd, "no debug ospf6 neighbor", @@ -982,16 +996,6 @@ DEFUN (no_debug_ospf6_neighbor, return CMD_SUCCESS; } -ALIAS (no_debug_ospf6_neighbor, - no_debug_ospf6_neighbor_detail_cmd, - "no debug ospf6 neighbor (state|event)", - NO_STR - DEBUG_STR - OSPF6_STR - "Debug OSPFv3 Neighbor\n" - "Debug OSPFv3 Neighbor State Change\n" - "Debug OSPFv3 Neighbor Event\n" - ) DEFUN (no_debug_ospf6, no_debug_ospf6_cmd, @@ -1054,14 +1058,10 @@ void install_element_ospf6_debug_neighbor (void) { install_element (ENABLE_NODE, &debug_ospf6_neighbor_cmd); - install_element (ENABLE_NODE, &debug_ospf6_neighbor_detail_cmd); install_element (ENABLE_NODE, &no_debug_ospf6_neighbor_cmd); - install_element (ENABLE_NODE, &no_debug_ospf6_neighbor_detail_cmd); install_element (ENABLE_NODE, &no_debug_ospf6_cmd); install_element (CONFIG_NODE, &debug_ospf6_neighbor_cmd); - install_element (CONFIG_NODE, &debug_ospf6_neighbor_detail_cmd); install_element (CONFIG_NODE, &no_debug_ospf6_neighbor_cmd); - install_element (CONFIG_NODE, &no_debug_ospf6_neighbor_detail_cmd); install_element (CONFIG_NODE, &no_debug_ospf6_cmd); } diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c index fe5006b24..6511d0b36 100644 --- a/ospf6d/ospf6_spf.c +++ b/ospf6d/ospf6_spf.c @@ -900,6 +900,18 @@ DEFUN (ospf6_timers_throttle_spf, return ospf6_timers_spf_set (vty, delay, hold, max); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no timers throttle spf <0-600000> <0-600000> <0-600000>", + * NO_STR + * "Adjust routing timers\n" + * "Throttling adaptive timer\n" + * "OSPF6 SPF timers\n" + * "Delay (msec) from first change received till SPF calculation\n" + * "Initial hold time (msec) between consecutive SPF calculations\n" + * "Maximum hold time (msec)\n" + * + */ DEFUN (no_ospf6_timers_throttle_spf, no_ospf6_timers_throttle_spf_cmd, "no timers throttle spf", @@ -914,16 +926,6 @@ DEFUN (no_ospf6_timers_throttle_spf, OSPF_SPF_MAX_HOLDTIME_DEFAULT); } -ALIAS (no_ospf6_timers_throttle_spf, - no_ospf6_timers_throttle_spf_val_cmd, - "no timers throttle spf <0-600000> <0-600000> <0-600000>", - NO_STR - "Adjust routing timers\n" - "Throttling adaptive timer\n" - "OSPF6 SPF timers\n" - "Delay (msec) from first change received till SPF calculation\n" - "Initial hold time (msec) between consecutive SPF calculations\n" - "Maximum hold time (msec)\n") int config_write_ospf6_debug_spf (struct vty *vty) @@ -972,5 +974,4 @@ ospf6_spf_init (void) { install_element (OSPF6_NODE, &ospf6_timers_throttle_spf_cmd); install_element (OSPF6_NODE, &no_ospf6_timers_throttle_spf_cmd); - install_element (OSPF6_NODE, &no_ospf6_timers_throttle_spf_val_cmd); } diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index e04f22fd0..8ddc6cfc8 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -423,6 +423,16 @@ DEFUN (ospf6_timers_lsa, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no timers lsa min-arrival <0-600000>", + * NO_STR + * "Adjust routing timers\n" + * "OSPF6 LSA timers\n" + * "Minimum delay in receiving new version of a LSA\n" + * "Delay in milliseconds\n" + * + */ DEFUN (no_ospf6_timers_lsa, no_ospf6_timers_lsa_cmd, "no timers lsa min-arrival", @@ -451,14 +461,6 @@ DEFUN (no_ospf6_timers_lsa, return CMD_SUCCESS; } -ALIAS (no_ospf6_timers_lsa, - no_ospf6_timers_lsa_val_cmd, - "no timers lsa min-arrival <0-600000>", - NO_STR - "Adjust routing timers\n" - "OSPF6 LSA timers\n" - "Minimum delay in receiving new version of a LSA\n" - "Delay in milliseconds\n") DEFUN (ospf6_interface_area, ospf6_interface_area_cmd, @@ -774,6 +776,31 @@ DEFUN (show_ipv6_ospf6, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 ospf6 route (intra-area|inter-area|external-1|external-2)", + * SHOW_STR + * IP6_STR + * OSPF6_STR + * ROUTE_STR + * "Display Intra-Area routes\n" + * "Display Inter-Area routes\n" + * "Display Type-1 External routes\n" + * "Display Type-2 External routes\n" + * + * + * "show ipv6 ospf6 route (X:X::X:X|X:X::X:X/M|detail|summary)", + * SHOW_STR + * IP6_STR + * OSPF6_STR + * ROUTE_STR + * "Specify IPv6 address\n" + * "Specify IPv6 prefix\n" + * "Detailed information\n" + * "Summary of route table\n" + * + * + */ DEFUN (show_ipv6_ospf6_route, show_ipv6_ospf6_route_cmd, "show ipv6 ospf6 route", @@ -789,19 +816,19 @@ DEFUN (show_ipv6_ospf6_route, return CMD_SUCCESS; } -ALIAS (show_ipv6_ospf6_route, - show_ipv6_ospf6_route_detail_cmd, - "show ipv6 ospf6 route (X:X::X:X|X:X::X:X/M|detail|summary)", - SHOW_STR - IP6_STR - OSPF6_STR - ROUTE_STR - "Specify IPv6 address\n" - "Specify IPv6 prefix\n" - "Detailed information\n" - "Summary of route table\n" - ) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 ospf6 route X:X::X:X/M longer", + * SHOW_STR + * IP6_STR + * OSPF6_STR + * ROUTE_STR + * "Specify IPv6 prefix\n" + * "Display routes longer than the specified route\n" + * + * + */ DEFUN (show_ipv6_ospf6_route_match, show_ipv6_ospf6_route_match_cmd, "show ipv6 ospf6 route X:X::X:X/M match", @@ -837,29 +864,7 @@ DEFUN (show_ipv6_ospf6_route_match_detail, return CMD_SUCCESS; } -ALIAS (show_ipv6_ospf6_route_match, - show_ipv6_ospf6_route_longer_cmd, - "show ipv6 ospf6 route X:X::X:X/M longer", - SHOW_STR - IP6_STR - OSPF6_STR - ROUTE_STR - "Specify IPv6 prefix\n" - "Display routes longer than the specified route\n" - ) -ALIAS (show_ipv6_ospf6_route, - show_ipv6_ospf6_route_type_cmd, - "show ipv6 ospf6 route (intra-area|inter-area|external-1|external-2)", - SHOW_STR - IP6_STR - OSPF6_STR - ROUTE_STR - "Display Intra-Area routes\n" - "Display Inter-Area routes\n" - "Display Type-1 External routes\n" - "Display Type-2 External routes\n" - ) DEFUN (show_ipv6_ospf6_route_type_detail, show_ipv6_ospf6_route_type_detail_cmd, @@ -965,18 +970,12 @@ ospf6_top_init (void) install_element (CONFIG_NODE, &no_router_ospf6_cmd); install_element (VIEW_NODE, &show_ipv6_ospf6_route_cmd); - install_element (VIEW_NODE, &show_ipv6_ospf6_route_detail_cmd); install_element (VIEW_NODE, &show_ipv6_ospf6_route_match_cmd); install_element (VIEW_NODE, &show_ipv6_ospf6_route_match_detail_cmd); - install_element (VIEW_NODE, &show_ipv6_ospf6_route_longer_cmd); - install_element (VIEW_NODE, &show_ipv6_ospf6_route_type_cmd); install_element (VIEW_NODE, &show_ipv6_ospf6_route_type_detail_cmd); install_element (ENABLE_NODE, &show_ipv6_ospf6_route_cmd); - install_element (ENABLE_NODE, &show_ipv6_ospf6_route_detail_cmd); install_element (ENABLE_NODE, &show_ipv6_ospf6_route_match_cmd); install_element (ENABLE_NODE, &show_ipv6_ospf6_route_match_detail_cmd); - install_element (ENABLE_NODE, &show_ipv6_ospf6_route_longer_cmd); - install_element (ENABLE_NODE, &show_ipv6_ospf6_route_type_cmd); install_element (ENABLE_NODE, &show_ipv6_ospf6_route_type_detail_cmd); install_default (OSPF6_NODE); @@ -989,7 +988,6 @@ ospf6_top_init (void) /* LSA timers commands */ install_element (OSPF6_NODE, &ospf6_timers_lsa_cmd); install_element (OSPF6_NODE, &no_ospf6_timers_lsa_cmd); - install_element (OSPF6_NODE, &no_ospf6_timers_lsa_val_cmd); install_element (OSPF6_NODE, &ospf6_interface_area_cmd); install_element (OSPF6_NODE, &no_ospf6_interface_area_cmd); diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c index 1e22a3517..f172b50f0 100644 --- a/ospf6d/ospf6_zebra.c +++ b/ospf6d/ospf6_zebra.c @@ -707,6 +707,15 @@ ospf6_zebra_init (struct thread_master *master) /* Debug */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "debug ospf6 zebra", + * DEBUG_STR + * OSPF6_STR + * "Debug connection between zebra\n" + * + * + */ DEFUN (debug_ospf6_zebra_sendrecv, debug_ospf6_zebra_sendrecv_cmd, "debug ospf6 zebra (send|recv)", @@ -733,15 +742,18 @@ DEFUN (debug_ospf6_zebra_sendrecv, return CMD_SUCCESS; } -ALIAS (debug_ospf6_zebra_sendrecv, - debug_ospf6_zebra_cmd, - "debug ospf6 zebra", - DEBUG_STR - OSPF6_STR - "Debug connection between zebra\n" - ) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no debug ospf6 zebra", + * NO_STR + * DEBUG_STR + * OSPF6_STR + * "Debug connection between zebra\n" + * + * + */ DEFUN (no_debug_ospf6_zebra_sendrecv, no_debug_ospf6_zebra_sendrecv_cmd, "no debug ospf6 zebra (send|recv)", @@ -769,14 +781,6 @@ DEFUN (no_debug_ospf6_zebra_sendrecv, return CMD_SUCCESS; } -ALIAS (no_debug_ospf6_zebra_sendrecv, - no_debug_ospf6_zebra_cmd, - "no debug ospf6 zebra", - NO_STR - DEBUG_STR - OSPF6_STR - "Debug connection between zebra\n" - ) int config_write_ospf6_debug_zebra (struct vty *vty) @@ -796,12 +800,8 @@ config_write_ospf6_debug_zebra (struct vty *vty) void install_element_ospf6_debug_zebra (void) { - install_element (ENABLE_NODE, &debug_ospf6_zebra_cmd); - install_element (ENABLE_NODE, &no_debug_ospf6_zebra_cmd); install_element (ENABLE_NODE, &debug_ospf6_zebra_sendrecv_cmd); install_element (ENABLE_NODE, &no_debug_ospf6_zebra_sendrecv_cmd); - install_element (CONFIG_NODE, &debug_ospf6_zebra_cmd); - install_element (CONFIG_NODE, &no_debug_ospf6_zebra_cmd); install_element (CONFIG_NODE, &debug_ospf6_zebra_sendrecv_cmd); install_element (CONFIG_NODE, &no_debug_ospf6_zebra_sendrecv_cmd); } diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c index ecd0c0471..74ca444d4 100644 --- a/ospf6d/ospf6d.c +++ b/ospf6d/ospf6d.c @@ -165,6 +165,19 @@ parse_type_spec (int argc, struct cmd_token **argv) return type; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 ospf6 database (detail|dump|internal)", + * SHOW_STR + * IPV6_STR + * OSPF6_STR + * "Display Link state database\n" + * "Display details of LSAs\n" + * "Dump LSAs\n" + * "Display LSA's internal information\n" + * + * + */ DEFUN (show_ipv6_ospf6_database, show_ipv6_ospf6_database_cmd, "show ipv6 ospf6 database", @@ -207,18 +220,32 @@ DEFUN (show_ipv6_ospf6_database, return CMD_SUCCESS; } -ALIAS (show_ipv6_ospf6_database, - show_ipv6_ospf6_database_detail_cmd, - "show ipv6 ospf6 database (detail|dump|internal)", - SHOW_STR - IPV6_STR - OSPF6_STR - "Display Link state database\n" - "Display details of LSAs\n" - "Dump LSAs\n" - "Display LSA's internal information\n" - ) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 ospf6 database " + * "(router|network|inter-prefix|inter-router|as-external|" + * "group-membership|type-7|link|intra-prefix) " + * "(detail|dump|internal)", + * SHOW_STR + * IPV6_STR + * OSPF6_STR + * "Display Link state database\n" + * "Display Router LSAs\n" + * "Display Network LSAs\n" + * "Display Inter-Area-Prefix LSAs\n" + * "Display Inter-Area-Router LSAs\n" + * "Display As-External LSAs\n" + * "Display Group-Membership LSAs\n" + * "Display Type-7 LSAs\n" + * "Display Link LSAs\n" + * "Display Intra-Area-Prefix LSAs\n" + * "Display details of LSAs\n" + * "Dump LSAs\n" + * "Display LSA's internal information\n" + * + * + */ DEFUN (show_ipv6_ospf6_database_type, show_ipv6_ospf6_database_type_cmd, "show ipv6 ospf6 database (router|network|inter-prefix|inter-router|as-external|group-membership|type-7|link|intra-prefix)", @@ -287,30 +314,45 @@ DEFUN (show_ipv6_ospf6_database_type, return CMD_SUCCESS; } -ALIAS (show_ipv6_ospf6_database_type, - show_ipv6_ospf6_database_type_detail_cmd, - "show ipv6 ospf6 database " - "(router|network|inter-prefix|inter-router|as-external|" - "group-membership|type-7|link|intra-prefix) " - "(detail|dump|internal)", - SHOW_STR - IPV6_STR - OSPF6_STR - "Display Link state database\n" - "Display Router LSAs\n" - "Display Network LSAs\n" - "Display Inter-Area-Prefix LSAs\n" - "Display Inter-Area-Router LSAs\n" - "Display As-External LSAs\n" - "Display Group-Membership LSAs\n" - "Display Type-7 LSAs\n" - "Display Link LSAs\n" - "Display Intra-Area-Prefix LSAs\n" - "Display details of LSAs\n" - "Dump LSAs\n" - "Display LSA's internal information\n" - ) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 ospf6 database * A.B.C.D " + * "(detail|dump|internal)", + * SHOW_STR + * IPV6_STR + * OSPF6_STR + * "Display Link state database\n" + * "Any Link state Type\n" + * "Specify Link state ID as IPv4 address notation\n" + * "Display details of LSAs\n" + * "Dump LSAs\n" + * "Display LSA's internal information\n" + * + * + * "show ipv6 ospf6 database linkstate-id A.B.C.D " + * "(detail|dump|internal)", + * SHOW_STR + * IPV6_STR + * OSPF6_STR + * "Display Link state database\n" + * "Search by Link state ID\n" + * "Specify Link state ID as IPv4 address notation\n" + * "Display details of LSAs\n" + * "Dump LSAs\n" + * "Display LSA's internal information\n" + * + * + * "show ipv6 ospf6 database linkstate-id A.B.C.D", + * SHOW_STR + * IPV6_STR + * OSPF6_STR + * "Display Link state database\n" + * "Search by Link state ID\n" + * "Specify Link state ID as IPv4 address notation\n" + * + * + */ DEFUN (show_ipv6_ospf6_database_id, show_ipv6_ospf6_database_id_cmd, "show ipv6 ospf6 database * A.B.C.D", @@ -365,47 +407,48 @@ DEFUN (show_ipv6_ospf6_database_id, return CMD_SUCCESS; } -ALIAS (show_ipv6_ospf6_database_id, - show_ipv6_ospf6_database_id_detail_cmd, - "show ipv6 ospf6 database * A.B.C.D " - "(detail|dump|internal)", - SHOW_STR - IPV6_STR - OSPF6_STR - "Display Link state database\n" - "Any Link state Type\n" - "Specify Link state ID as IPv4 address notation\n" - "Display details of LSAs\n" - "Dump LSAs\n" - "Display LSA's internal information\n" - ) -ALIAS (show_ipv6_ospf6_database_id, - show_ipv6_ospf6_database_linkstate_id_cmd, - "show ipv6 ospf6 database linkstate-id A.B.C.D", - SHOW_STR - IPV6_STR - OSPF6_STR - "Display Link state database\n" - "Search by Link state ID\n" - "Specify Link state ID as IPv4 address notation\n" - ) -ALIAS (show_ipv6_ospf6_database_id, - show_ipv6_ospf6_database_linkstate_id_detail_cmd, - "show ipv6 ospf6 database linkstate-id A.B.C.D " - "(detail|dump|internal)", - SHOW_STR - IPV6_STR - OSPF6_STR - "Display Link state database\n" - "Search by Link state ID\n" - "Specify Link state ID as IPv4 address notation\n" - "Display details of LSAs\n" - "Dump LSAs\n" - "Display LSA's internal information\n" - ) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 ospf6 database * * A.B.C.D " + * "(detail|dump|internal)", + * SHOW_STR + * IPV6_STR + * OSPF6_STR + * "Display Link state database\n" + * "Any Link state Type\n" + * "Any Link state ID\n" + * "Specify Advertising Router as IPv4 address notation\n" + * "Display details of LSAs\n" + * "Dump LSAs\n" + * "Display LSA's internal information\n" + * + * + * "show ipv6 ospf6 database adv-router A.B.C.D", + * SHOW_STR + * IPV6_STR + * OSPF6_STR + * "Display Link state database\n" + * "Search by Advertising Router\n" + * "Specify Advertising Router as IPv4 address notation\n" + * + * + * "show ipv6 ospf6 database adv-router A.B.C.D " + * "(detail|dump|internal)", + * SHOW_STR + * IPV6_STR + * OSPF6_STR + * "Display Link state database\n" + * "Search by Advertising Router\n" + * "Specify Advertising Router as IPv4 address notation\n" + * "Display details of LSAs\n" + * "Dump LSAs\n" + * "Display LSA's internal information\n" + * + * + */ DEFUN (show_ipv6_ospf6_database_router, show_ipv6_ospf6_database_router_cmd, "show ipv6 ospf6 database * * A.B.C.D", @@ -461,48 +504,79 @@ DEFUN (show_ipv6_ospf6_database_router, return CMD_SUCCESS; } -ALIAS (show_ipv6_ospf6_database_router, - show_ipv6_ospf6_database_router_detail_cmd, - "show ipv6 ospf6 database * * A.B.C.D " - "(detail|dump|internal)", - SHOW_STR - IPV6_STR - OSPF6_STR - "Display Link state database\n" - "Any Link state Type\n" - "Any Link state ID\n" - "Specify Advertising Router as IPv4 address notation\n" - "Display details of LSAs\n" - "Dump LSAs\n" - "Display LSA's internal information\n" - ) -ALIAS (show_ipv6_ospf6_database_router, - show_ipv6_ospf6_database_adv_router_cmd, - "show ipv6 ospf6 database adv-router A.B.C.D", - SHOW_STR - IPV6_STR - OSPF6_STR - "Display Link state database\n" - "Search by Advertising Router\n" - "Specify Advertising Router as IPv4 address notation\n" - ) -ALIAS (show_ipv6_ospf6_database_router, - show_ipv6_ospf6_database_adv_router_detail_cmd, - "show ipv6 ospf6 database adv-router A.B.C.D " - "(detail|dump|internal)", - SHOW_STR - IPV6_STR - OSPF6_STR - "Display Link state database\n" - "Search by Advertising Router\n" - "Specify Advertising Router as IPv4 address notation\n" - "Display details of LSAs\n" - "Dump LSAs\n" - "Display LSA's internal information\n" - ) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 ospf6 database " + * "(router|network|inter-prefix|inter-router|as-external|" + * "group-membership|type-7|link|intra-prefix) linkstate-id A.B.C.D " + * "(detail|dump|internal)", + * SHOW_STR + * IPV6_STR + * OSPF6_STR + * "Display Link state database\n" + * "Display Router LSAs\n" + * "Display Network LSAs\n" + * "Display Inter-Area-Prefix LSAs\n" + * "Display Inter-Area-Router LSAs\n" + * "Display As-External LSAs\n" + * "Display Group-Membership LSAs\n" + * "Display Type-7 LSAs\n" + * "Display Link LSAs\n" + * "Display Intra-Area-Prefix LSAs\n" + * "Search by Link state ID\n" + * "Specify Link state ID as IPv4 address notation\n" + * "Display details of LSAs\n" + * "Dump LSAs\n" + * "Display LSA's internal information\n" + * + * + * "show ipv6 ospf6 database " + * "(router|network|inter-prefix|inter-router|as-external|" + * "group-membership|type-7|link|intra-prefix) A.B.C.D " + * "(detail|dump|internal)", + * SHOW_STR + * IPV6_STR + * OSPF6_STR + * "Display Link state database\n" + * "Display Router LSAs\n" + * "Display Network LSAs\n" + * "Display Inter-Area-Prefix LSAs\n" + * "Display Inter-Area-Router LSAs\n" + * "Display As-External LSAs\n" + * "Display Group-Membership LSAs\n" + * "Display Type-7 LSAs\n" + * "Display Link LSAs\n" + * "Display Intra-Area-Prefix LSAs\n" + * "Specify Link state ID as IPv4 address notation\n" + * "Display details of LSAs\n" + * "Dump LSAs\n" + * "Display LSA's internal information\n" + * + * + * "show ipv6 ospf6 database " + * "(router|network|inter-prefix|inter-router|as-external|" + * "group-membership|type-7|link|intra-prefix) linkstate-id A.B.C.D", + * SHOW_STR + * IPV6_STR + * OSPF6_STR + * "Display Link state database\n" + * "Display Router LSAs\n" + * "Display Network LSAs\n" + * "Display Inter-Area-Prefix LSAs\n" + * "Display Inter-Area-Router LSAs\n" + * "Display As-External LSAs\n" + * "Display Group-Membership LSAs\n" + * "Display Type-7 LSAs\n" + * "Display Link LSAs\n" + * "Display Intra-Area-Prefix LSAs\n" + * "Search by Link state ID\n" + * "Specify Link state ID as IPv4 address notation\n" + * + * + */ DEFUN (show_ipv6_ospf6_database_type_id, show_ipv6_ospf6_database_type_id_cmd, "show ipv6 ospf6 database (router|network|inter-prefix|inter-router|as-external|group-membership|type-7|link|intra-prefix) A.B.C.D", @@ -583,79 +657,80 @@ DEFUN (show_ipv6_ospf6_database_type_id, return CMD_SUCCESS; } -ALIAS (show_ipv6_ospf6_database_type_id, - show_ipv6_ospf6_database_type_id_detail_cmd, - "show ipv6 ospf6 database " - "(router|network|inter-prefix|inter-router|as-external|" - "group-membership|type-7|link|intra-prefix) A.B.C.D " - "(detail|dump|internal)", - SHOW_STR - IPV6_STR - OSPF6_STR - "Display Link state database\n" - "Display Router LSAs\n" - "Display Network LSAs\n" - "Display Inter-Area-Prefix LSAs\n" - "Display Inter-Area-Router LSAs\n" - "Display As-External LSAs\n" - "Display Group-Membership LSAs\n" - "Display Type-7 LSAs\n" - "Display Link LSAs\n" - "Display Intra-Area-Prefix LSAs\n" - "Specify Link state ID as IPv4 address notation\n" - "Display details of LSAs\n" - "Dump LSAs\n" - "Display LSA's internal information\n" - ) -ALIAS (show_ipv6_ospf6_database_type_id, - show_ipv6_ospf6_database_type_linkstate_id_cmd, - "show ipv6 ospf6 database " - "(router|network|inter-prefix|inter-router|as-external|" - "group-membership|type-7|link|intra-prefix) linkstate-id A.B.C.D", - SHOW_STR - IPV6_STR - OSPF6_STR - "Display Link state database\n" - "Display Router LSAs\n" - "Display Network LSAs\n" - "Display Inter-Area-Prefix LSAs\n" - "Display Inter-Area-Router LSAs\n" - "Display As-External LSAs\n" - "Display Group-Membership LSAs\n" - "Display Type-7 LSAs\n" - "Display Link LSAs\n" - "Display Intra-Area-Prefix LSAs\n" - "Search by Link state ID\n" - "Specify Link state ID as IPv4 address notation\n" - ) -ALIAS (show_ipv6_ospf6_database_type_id, - show_ipv6_ospf6_database_type_linkstate_id_detail_cmd, - "show ipv6 ospf6 database " - "(router|network|inter-prefix|inter-router|as-external|" - "group-membership|type-7|link|intra-prefix) linkstate-id A.B.C.D " - "(detail|dump|internal)", - SHOW_STR - IPV6_STR - OSPF6_STR - "Display Link state database\n" - "Display Router LSAs\n" - "Display Network LSAs\n" - "Display Inter-Area-Prefix LSAs\n" - "Display Inter-Area-Router LSAs\n" - "Display As-External LSAs\n" - "Display Group-Membership LSAs\n" - "Display Type-7 LSAs\n" - "Display Link LSAs\n" - "Display Intra-Area-Prefix LSAs\n" - "Search by Link state ID\n" - "Specify Link state ID as IPv4 address notation\n" - "Display details of LSAs\n" - "Dump LSAs\n" - "Display LSA's internal information\n" - ) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 ospf6 database " + * "(router|network|inter-prefix|inter-router|as-external|" + * "group-membership|type-7|link|intra-prefix) * A.B.C.D " + * "(detail|dump|internal)", + * SHOW_STR + * IPV6_STR + * OSPF6_STR + * "Display Link state database\n" + * "Display Router LSAs\n" + * "Display Network LSAs\n" + * "Display Inter-Area-Prefix LSAs\n" + * "Display Inter-Area-Router LSAs\n" + * "Display As-External LSAs\n" + * "Display Group-Membership LSAs\n" + * "Display Type-7 LSAs\n" + * "Display Link LSAs\n" + * "Display Intra-Area-Prefix LSAs\n" + * "Any Link state ID\n" + * "Specify Advertising Router as IPv4 address notation\n" + * "Display details of LSAs\n" + * "Dump LSAs\n" + * "Display LSA's internal information\n" + * + * + * "show ipv6 ospf6 database " + * "(router|network|inter-prefix|inter-router|as-external|" + * "group-membership|type-7|link|intra-prefix) adv-router A.B.C.D " + * "(detail|dump|internal)", + * SHOW_STR + * IPV6_STR + * OSPF6_STR + * "Display Link state database\n" + * "Display Router LSAs\n" + * "Display Network LSAs\n" + * "Display Inter-Area-Prefix LSAs\n" + * "Display Inter-Area-Router LSAs\n" + * "Display As-External LSAs\n" + * "Display Group-Membership LSAs\n" + * "Display Type-7 LSAs\n" + * "Display Link LSAs\n" + * "Display Intra-Area-Prefix LSAs\n" + * "Search by Advertising Router\n" + * "Specify Advertising Router as IPv4 address notation\n" + * "Display details of LSAs\n" + * "Dump LSAs\n" + * "Display LSA's internal information\n" + * + * + * "show ipv6 ospf6 database " + * "(router|network|inter-prefix|inter-router|as-external|" + * "group-membership|type-7|link|intra-prefix) adv-router A.B.C.D", + * SHOW_STR + * IPV6_STR + * OSPF6_STR + * "Display Link state database\n" + * "Display Router LSAs\n" + * "Display Network LSAs\n" + * "Display Inter-Area-Prefix LSAs\n" + * "Display Inter-Area-Router LSAs\n" + * "Display As-External LSAs\n" + * "Display Group-Membership LSAs\n" + * "Display Type-7 LSAs\n" + * "Display Link LSAs\n" + * "Display Intra-Area-Prefix LSAs\n" + * "Search by Advertising Router\n" + * "Specify Advertising Router as IPv4 address notation\n" + * + * + */ DEFUN (show_ipv6_ospf6_database_type_router, show_ipv6_ospf6_database_type_router_cmd, "show ipv6 ospf6 database (router|network|inter-prefix|inter-router|as-external|group-membership|type-7|link|intra-prefix) * A.B.C.D", @@ -737,80 +812,26 @@ DEFUN (show_ipv6_ospf6_database_type_router, return CMD_SUCCESS; } -ALIAS (show_ipv6_ospf6_database_type_router, - show_ipv6_ospf6_database_type_router_detail_cmd, - "show ipv6 ospf6 database " - "(router|network|inter-prefix|inter-router|as-external|" - "group-membership|type-7|link|intra-prefix) * A.B.C.D " - "(detail|dump|internal)", - SHOW_STR - IPV6_STR - OSPF6_STR - "Display Link state database\n" - "Display Router LSAs\n" - "Display Network LSAs\n" - "Display Inter-Area-Prefix LSAs\n" - "Display Inter-Area-Router LSAs\n" - "Display As-External LSAs\n" - "Display Group-Membership LSAs\n" - "Display Type-7 LSAs\n" - "Display Link LSAs\n" - "Display Intra-Area-Prefix LSAs\n" - "Any Link state ID\n" - "Specify Advertising Router as IPv4 address notation\n" - "Display details of LSAs\n" - "Dump LSAs\n" - "Display LSA's internal information\n" - ) -ALIAS (show_ipv6_ospf6_database_type_router, - show_ipv6_ospf6_database_type_adv_router_cmd, - "show ipv6 ospf6 database " - "(router|network|inter-prefix|inter-router|as-external|" - "group-membership|type-7|link|intra-prefix) adv-router A.B.C.D", - SHOW_STR - IPV6_STR - OSPF6_STR - "Display Link state database\n" - "Display Router LSAs\n" - "Display Network LSAs\n" - "Display Inter-Area-Prefix LSAs\n" - "Display Inter-Area-Router LSAs\n" - "Display As-External LSAs\n" - "Display Group-Membership LSAs\n" - "Display Type-7 LSAs\n" - "Display Link LSAs\n" - "Display Intra-Area-Prefix LSAs\n" - "Search by Advertising Router\n" - "Specify Advertising Router as IPv4 address notation\n" - ) -ALIAS (show_ipv6_ospf6_database_type_router, - show_ipv6_ospf6_database_type_adv_router_detail_cmd, - "show ipv6 ospf6 database " - "(router|network|inter-prefix|inter-router|as-external|" - "group-membership|type-7|link|intra-prefix) adv-router A.B.C.D " - "(detail|dump|internal)", - SHOW_STR - IPV6_STR - OSPF6_STR - "Display Link state database\n" - "Display Router LSAs\n" - "Display Network LSAs\n" - "Display Inter-Area-Prefix LSAs\n" - "Display Inter-Area-Router LSAs\n" - "Display As-External LSAs\n" - "Display Group-Membership LSAs\n" - "Display Type-7 LSAs\n" - "Display Link LSAs\n" - "Display Intra-Area-Prefix LSAs\n" - "Search by Advertising Router\n" - "Specify Advertising Router as IPv4 address notation\n" - "Display details of LSAs\n" - "Dump LSAs\n" - "Display LSA's internal information\n" - ) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 ospf6 database * A.B.C.D A.B.C.D " + * "(detail|dump|internal)", + * SHOW_STR + * IPV6_STR + * OSPF6_STR + * "Display Link state database\n" + * "Any Link state Type\n" + * "Specify Link state ID as IPv4 address notation\n" + * "Specify Advertising Router as IPv4 address notation\n" + * "Display details of LSAs\n" + * "Dump LSAs\n" + * "Display LSA's internal information\n" + * + * + */ DEFUN (show_ipv6_ospf6_database_id_router, show_ipv6_ospf6_database_id_router_cmd, "show ipv6 ospf6 database * A.B.C.D A.B.C.D", @@ -877,22 +898,25 @@ DEFUN (show_ipv6_ospf6_database_id_router, return CMD_SUCCESS; } -ALIAS (show_ipv6_ospf6_database_id_router, - show_ipv6_ospf6_database_id_router_detail_cmd, - "show ipv6 ospf6 database * A.B.C.D A.B.C.D " - "(detail|dump|internal)", - SHOW_STR - IPV6_STR - OSPF6_STR - "Display Link state database\n" - "Any Link state Type\n" - "Specify Link state ID as IPv4 address notation\n" - "Specify Advertising Router as IPv4 address notation\n" - "Display details of LSAs\n" - "Dump LSAs\n" - "Display LSA's internal information\n" - ) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 ospf6 database adv-router A.B.C.D linkstate-id A.B.C.D " + * "(detail|dump|internal)", + * SHOW_STR + * IPV6_STR + * OSPF6_STR + * "Display Link state database\n" + * "Search by Advertising Router\n" + * "Specify Advertising Router as IPv4 address notation\n" + * "Search by Link state ID\n" + * "Specify Link state ID as IPv4 address notation\n" + * "Display details of LSAs\n" + * "Dump LSAs\n" + * "Display LSA's internal information\n" + * + * + */ DEFUN (show_ipv6_ospf6_database_adv_router_linkstate_id, show_ipv6_ospf6_database_adv_router_linkstate_id_cmd, "show ipv6 ospf6 database adv-router A.B.C.D linkstate-id A.B.C.D", @@ -960,23 +984,33 @@ DEFUN (show_ipv6_ospf6_database_adv_router_linkstate_id, return CMD_SUCCESS; } -ALIAS (show_ipv6_ospf6_database_adv_router_linkstate_id, - show_ipv6_ospf6_database_adv_router_linkstate_id_detail_cmd, - "show ipv6 ospf6 database adv-router A.B.C.D linkstate-id A.B.C.D " - "(detail|dump|internal)", - SHOW_STR - IPV6_STR - OSPF6_STR - "Display Link state database\n" - "Search by Advertising Router\n" - "Specify Advertising Router as IPv4 address notation\n" - "Search by Link state ID\n" - "Specify Link state ID as IPv4 address notation\n" - "Display details of LSAs\n" - "Dump LSAs\n" - "Display LSA's internal information\n" - ) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 ospf6 database " + * "(router|network|inter-prefix|inter-router|as-external|" + * "group-membership|type-7|link|intra-prefix) A.B.C.D A.B.C.D " + * "(dump|internal)", + * SHOW_STR + * IPV6_STR + * OSPF6_STR + * "Display Link state database\n" + * "Display Router LSAs\n" + * "Display Network LSAs\n" + * "Display Inter-Area-Prefix LSAs\n" + * "Display Inter-Area-Router LSAs\n" + * "Display As-External LSAs\n" + * "Display Group-Membership LSAs\n" + * "Display Type-7 LSAs\n" + * "Display Link LSAs\n" + * "Display Intra-Area-Prefix LSAs\n" + * "Specify Link state ID as IPv4 address notation\n" + * "Specify Advertising Router as IPv4 address notation\n" + * "Dump LSAs\n" + * "Display LSA's internal information\n" + * + * + */ DEFUN (show_ipv6_ospf6_database_type_id_router, show_ipv6_ospf6_database_type_id_router_cmd, "show ipv6 ospf6 database (router|network|inter-prefix|inter-router|as-external|group-membership|type-7|link|intra-prefix) A.B.C.D A.B.C.D", @@ -1069,31 +1103,36 @@ DEFUN (show_ipv6_ospf6_database_type_id_router, return CMD_SUCCESS; } -ALIAS (show_ipv6_ospf6_database_type_id_router, - show_ipv6_ospf6_database_type_id_router_detail_cmd, - "show ipv6 ospf6 database " - "(router|network|inter-prefix|inter-router|as-external|" - "group-membership|type-7|link|intra-prefix) A.B.C.D A.B.C.D " - "(dump|internal)", - SHOW_STR - IPV6_STR - OSPF6_STR - "Display Link state database\n" - "Display Router LSAs\n" - "Display Network LSAs\n" - "Display Inter-Area-Prefix LSAs\n" - "Display Inter-Area-Router LSAs\n" - "Display As-External LSAs\n" - "Display Group-Membership LSAs\n" - "Display Type-7 LSAs\n" - "Display Link LSAs\n" - "Display Intra-Area-Prefix LSAs\n" - "Specify Link state ID as IPv4 address notation\n" - "Specify Advertising Router as IPv4 address notation\n" - "Dump LSAs\n" - "Display LSA's internal information\n" - ) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 ospf6 database " + * "(router|network|inter-prefix|inter-router|as-external|" + * "group-membership|type-7|link|intra-prefix) " + * "adv-router A.B.C.D linkstate-id A.B.C.D " + * "(dump|internal)", + * SHOW_STR + * IPV6_STR + * OSPF6_STR + * "Display Link state database\n" + * "Display Router LSAs\n" + * "Display Network LSAs\n" + * "Display Inter-Area-Prefix LSAs\n" + * "Display Inter-Area-Router LSAs\n" + * "Display As-External LSAs\n" + * "Display Group-Membership LSAs\n" + * "Display Type-7 LSAs\n" + * "Display Link LSAs\n" + * "Display Intra-Area-Prefix LSAs\n" + * "Search by Advertising Router\n" + * "Specify Advertising Router as IPv4 address notation\n" + * "Search by Link state ID\n" + * "Specify Link state ID as IPv4 address notation\n" + * "Dump LSAs\n" + * "Display LSA's internal information\n" + * + * + */ DEFUN (show_ipv6_ospf6_database_type_adv_router_linkstate_id, show_ipv6_ospf6_database_type_adv_router_linkstate_id_cmd, "show ipv6 ospf6 database (router|network|inter-prefix|inter-router|as-external|group-membership|type-7|link|intra-prefix) adv-router A.B.C.D linkstate-id A.B.C.D", @@ -1188,34 +1227,21 @@ DEFUN (show_ipv6_ospf6_database_type_adv_router_linkstate_id, return CMD_SUCCESS; } -ALIAS (show_ipv6_ospf6_database_type_adv_router_linkstate_id, - show_ipv6_ospf6_database_type_adv_router_linkstate_id_detail_cmd, - "show ipv6 ospf6 database " - "(router|network|inter-prefix|inter-router|as-external|" - "group-membership|type-7|link|intra-prefix) " - "adv-router A.B.C.D linkstate-id A.B.C.D " - "(dump|internal)", - SHOW_STR - IPV6_STR - OSPF6_STR - "Display Link state database\n" - "Display Router LSAs\n" - "Display Network LSAs\n" - "Display Inter-Area-Prefix LSAs\n" - "Display Inter-Area-Router LSAs\n" - "Display As-External LSAs\n" - "Display Group-Membership LSAs\n" - "Display Type-7 LSAs\n" - "Display Link LSAs\n" - "Display Intra-Area-Prefix LSAs\n" - "Search by Advertising Router\n" - "Specify Advertising Router as IPv4 address notation\n" - "Search by Link state ID\n" - "Specify Link state ID as IPv4 address notation\n" - "Dump LSAs\n" - "Display LSA's internal information\n" - ) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 ospf6 database self-originated " + * "(detail|dump|internal)", + * SHOW_STR + * IPV6_STR + * OSPF6_STR + * "Display Self-originated LSAs\n" + * "Display details of LSAs\n" + * "Dump LSAs\n" + * "Display LSA's internal information\n" + * + * + */ DEFUN (show_ipv6_ospf6_database_self_originated, show_ipv6_ospf6_database_self_originated_cmd, "show ipv6 ospf6 database self-originated", @@ -1261,19 +1287,33 @@ DEFUN (show_ipv6_ospf6_database_self_originated, return CMD_SUCCESS; } -ALIAS (show_ipv6_ospf6_database_self_originated, - show_ipv6_ospf6_database_self_originated_detail_cmd, - "show ipv6 ospf6 database self-originated " - "(detail|dump|internal)", - SHOW_STR - IPV6_STR - OSPF6_STR - "Display Self-originated LSAs\n" - "Display details of LSAs\n" - "Dump LSAs\n" - "Display LSA's internal information\n" - ) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 ospf6 database " + * "(router|network|inter-prefix|inter-router|as-external|" + * "group-membership|type-7|link|intra-prefix) self-originated " + * "(detail|dump|internal)", + * SHOW_STR + * IPV6_STR + * OSPF6_STR + * "Display Link state database\n" + * "Display Router LSAs\n" + * "Display Network LSAs\n" + * "Display Inter-Area-Prefix LSAs\n" + * "Display Inter-Area-Router LSAs\n" + * "Display As-External LSAs\n" + * "Display Group-Membership LSAs\n" + * "Display Type-7 LSAs\n" + * "Display Link LSAs\n" + * "Display Intra-Area-Prefix LSAs\n" + * "Display Self-originated LSAs\n" + * "Display details of LSAs\n" + * "Dump LSAs\n" + * "Display LSA's internal information\n" + * + * + */ DEFUN (show_ipv6_ospf6_database_type_self_originated, show_ipv6_ospf6_database_type_self_originated_cmd, "show ipv6 ospf6 database (router|network|inter-prefix|inter-router|as-external|group-membership|type-7|link|intra-prefix) self-originated", @@ -1346,31 +1386,35 @@ DEFUN (show_ipv6_ospf6_database_type_self_originated, return CMD_SUCCESS; } -ALIAS (show_ipv6_ospf6_database_type_self_originated, - show_ipv6_ospf6_database_type_self_originated_detail_cmd, - "show ipv6 ospf6 database " - "(router|network|inter-prefix|inter-router|as-external|" - "group-membership|type-7|link|intra-prefix) self-originated " - "(detail|dump|internal)", - SHOW_STR - IPV6_STR - OSPF6_STR - "Display Link state database\n" - "Display Router LSAs\n" - "Display Network LSAs\n" - "Display Inter-Area-Prefix LSAs\n" - "Display Inter-Area-Router LSAs\n" - "Display As-External LSAs\n" - "Display Group-Membership LSAs\n" - "Display Type-7 LSAs\n" - "Display Link LSAs\n" - "Display Intra-Area-Prefix LSAs\n" - "Display Self-originated LSAs\n" - "Display details of LSAs\n" - "Dump LSAs\n" - "Display LSA's internal information\n" - ) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 ospf6 database " + * "(router|network|inter-prefix|inter-router|as-external|" + * "group-membership|type-7|link|intra-prefix) self-originated " + * "linkstate-id A.B.C.D (detail|dump|internal)", + * SHOW_STR + * IPV6_STR + * OSPF6_STR + * "Display Link state database\n" + * "Display Router LSAs\n" + * "Display Network LSAs\n" + * "Display Inter-Area-Prefix LSAs\n" + * "Display Inter-Area-Router LSAs\n" + * "Display As-External LSAs\n" + * "Display Group-Membership LSAs\n" + * "Display Type-7 LSAs\n" + * "Display Link LSAs\n" + * "Display Intra-Area-Prefix LSAs\n" + * "Display Self-originated LSAs\n" + * "Search by Link state ID\n" + * "Specify Link state ID as IPv4 address notation\n" + * "Display details of LSAs\n" + * "Dump LSAs\n" + * "Display LSA's internal information\n" + * + * + */ DEFUN (show_ipv6_ospf6_database_type_self_originated_linkstate_id, show_ipv6_ospf6_database_type_self_originated_linkstate_id_cmd, "show ipv6 ospf6 database (router|network|inter-prefix|inter-router|as-external|group-membership|type-7|link|intra-prefix) self-originated linkstate-id A.B.C.D", @@ -1456,33 +1500,35 @@ DEFUN (show_ipv6_ospf6_database_type_self_originated_linkstate_id, return CMD_SUCCESS; } -ALIAS (show_ipv6_ospf6_database_type_self_originated_linkstate_id, - show_ipv6_ospf6_database_type_self_originated_linkstate_id_detail_cmd, - "show ipv6 ospf6 database " - "(router|network|inter-prefix|inter-router|as-external|" - "group-membership|type-7|link|intra-prefix) self-originated " - "linkstate-id A.B.C.D (detail|dump|internal)", - SHOW_STR - IPV6_STR - OSPF6_STR - "Display Link state database\n" - "Display Router LSAs\n" - "Display Network LSAs\n" - "Display Inter-Area-Prefix LSAs\n" - "Display Inter-Area-Router LSAs\n" - "Display As-External LSAs\n" - "Display Group-Membership LSAs\n" - "Display Type-7 LSAs\n" - "Display Link LSAs\n" - "Display Intra-Area-Prefix LSAs\n" - "Display Self-originated LSAs\n" - "Search by Link state ID\n" - "Specify Link state ID as IPv4 address notation\n" - "Display details of LSAs\n" - "Dump LSAs\n" - "Display LSA's internal information\n" - ) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 ospf6 database " + * "(router|network|inter-prefix|inter-router|as-external|" + * "group-membership|type-7|link|intra-prefix) A.B.C.D self-originated " + * "(detail|dump|internal)", + * SHOW_STR + * IPV6_STR + * OSPF6_STR + * "Display Link state database\n" + * "Display Router LSAs\n" + * "Display Network LSAs\n" + * "Display Inter-Area-Prefix LSAs\n" + * "Display Inter-Area-Router LSAs\n" + * "Display As-External LSAs\n" + * "Display Group-Membership LSAs\n" + * "Display Type-7 LSAs\n" + * "Display Link LSAs\n" + * "Display Intra-Area-Prefix LSAs\n" + * "Display Self-originated LSAs\n" + * "Search by Link state ID\n" + * "Specify Link state ID as IPv4 address notation\n" + * "Display details of LSAs\n" + * "Dump LSAs\n" + * "Display LSA's internal information\n" + * + * + */ DEFUN (show_ipv6_ospf6_database_type_id_self_originated, show_ipv6_ospf6_database_type_id_self_originated_cmd, "show ipv6 ospf6 database (router|network|inter-prefix|inter-router|as-external|group-membership|type-7|link|intra-prefix) A.B.C.D self-originated", @@ -1567,34 +1613,20 @@ DEFUN (show_ipv6_ospf6_database_type_id_self_originated, return CMD_SUCCESS; } -ALIAS (show_ipv6_ospf6_database_type_id_self_originated, - show_ipv6_ospf6_database_type_id_self_originated_detail_cmd, - "show ipv6 ospf6 database " - "(router|network|inter-prefix|inter-router|as-external|" - "group-membership|type-7|link|intra-prefix) A.B.C.D self-originated " - "(detail|dump|internal)", - SHOW_STR - IPV6_STR - OSPF6_STR - "Display Link state database\n" - "Display Router LSAs\n" - "Display Network LSAs\n" - "Display Inter-Area-Prefix LSAs\n" - "Display Inter-Area-Router LSAs\n" - "Display As-External LSAs\n" - "Display Group-Membership LSAs\n" - "Display Type-7 LSAs\n" - "Display Link LSAs\n" - "Display Intra-Area-Prefix LSAs\n" - "Display Self-originated LSAs\n" - "Search by Link state ID\n" - "Specify Link state ID as IPv4 address notation\n" - "Display details of LSAs\n" - "Dump LSAs\n" - "Display LSA's internal information\n" - ) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 ospf6 border-routers (A.B.C.D|detail)", + * SHOW_STR + * IP6_STR + * OSPF6_STR + * "Display routing table for ABR and ASBR\n" + * "Specify Router-ID\n" + * "Display Detail\n" + * + * + */ DEFUN (show_ipv6_ospf6_border_routers, show_ipv6_ospf6_border_routers_cmd, "show ipv6 ospf6 border-routers", @@ -1650,17 +1682,29 @@ DEFUN (show_ipv6_ospf6_border_routers, return CMD_SUCCESS; } -ALIAS (show_ipv6_ospf6_border_routers, - show_ipv6_ospf6_border_routers_detail_cmd, - "show ipv6 ospf6 border-routers (A.B.C.D|detail)", - SHOW_STR - IP6_STR - OSPF6_STR - "Display routing table for ABR and ASBR\n" - "Specify Router-ID\n" - "Display Detail\n" - ) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 ospf6 linkstate network A.B.C.D A.B.C.D", + * SHOW_STR + * IP6_STR + * OSPF6_STR + * "Display linkstate routing table\n" + * "Display Network Entry\n" + * "Specify Router ID as IPv4 address notation\n" + * "Specify Link state ID as IPv4 address notation\n" + * + * + * "show ipv6 ospf6 linkstate router A.B.C.D", + * SHOW_STR + * IP6_STR + * OSPF6_STR + * "Display linkstate routing table\n" + * "Display Router Entry\n" + * "Specify Router ID as IPv4 address notation\n" + * + * + */ DEFUN (show_ipv6_ospf6_linkstate, show_ipv6_ospf6_linkstate_cmd, "show ipv6 ospf6 linkstate", @@ -1686,28 +1730,7 @@ DEFUN (show_ipv6_ospf6_linkstate, return CMD_SUCCESS; } -ALIAS (show_ipv6_ospf6_linkstate, - show_ipv6_ospf6_linkstate_router_cmd, - "show ipv6 ospf6 linkstate router A.B.C.D", - SHOW_STR - IP6_STR - OSPF6_STR - "Display linkstate routing table\n" - "Display Router Entry\n" - "Specify Router ID as IPv4 address notation\n" - ) -ALIAS (show_ipv6_ospf6_linkstate, - show_ipv6_ospf6_linkstate_network_cmd, - "show ipv6 ospf6 linkstate network A.B.C.D A.B.C.D", - SHOW_STR - IP6_STR - OSPF6_STR - "Display linkstate routing table\n" - "Display Network Entry\n" - "Specify Router ID as IPv4 address notation\n" - "Specify Link state ID as IPv4 address notation\n" - ) DEFUN (show_ipv6_ospf6_linkstate_detail, show_ipv6_ospf6_linkstate_detail_cmd, @@ -1757,126 +1780,3 @@ ospf6_init (void) ospf6_bfd_init(); install_node (&debug_node, config_write_ospf6_debug); - install_element_ospf6_debug_message (); - install_element_ospf6_debug_lsa (); - install_element_ospf6_debug_interface (); - install_element_ospf6_debug_neighbor (); - install_element_ospf6_debug_zebra (); - install_element_ospf6_debug_spf (); - install_element_ospf6_debug_route (); - install_element_ospf6_debug_brouter (); - install_element_ospf6_debug_asbr (); - install_element_ospf6_debug_abr (); - install_element_ospf6_debug_flood (); - - install_element_ospf6_clear_interface (); - - install_element (VIEW_NODE, &show_version_ospf6_cmd); - install_element (ENABLE_NODE, &show_version_ospf6_cmd); - - install_element (VIEW_NODE, &show_ipv6_ospf6_border_routers_cmd); - install_element (VIEW_NODE, &show_ipv6_ospf6_border_routers_detail_cmd); - install_element (ENABLE_NODE, &show_ipv6_ospf6_border_routers_cmd); - install_element (ENABLE_NODE, &show_ipv6_ospf6_border_routers_detail_cmd); - - install_element (VIEW_NODE, &show_ipv6_ospf6_linkstate_cmd); - install_element (VIEW_NODE, &show_ipv6_ospf6_linkstate_router_cmd); - install_element (VIEW_NODE, &show_ipv6_ospf6_linkstate_network_cmd); - install_element (VIEW_NODE, &show_ipv6_ospf6_linkstate_detail_cmd); - install_element (ENABLE_NODE, &show_ipv6_ospf6_linkstate_cmd); - install_element (ENABLE_NODE, &show_ipv6_ospf6_linkstate_router_cmd); - install_element (ENABLE_NODE, &show_ipv6_ospf6_linkstate_network_cmd); - install_element (ENABLE_NODE, &show_ipv6_ospf6_linkstate_detail_cmd); - -#define INSTALL(n,c) \ - install_element (n ## _NODE, &show_ipv6_ospf6_ ## c) - - INSTALL (VIEW, database_cmd); - INSTALL (VIEW, database_detail_cmd); - INSTALL (VIEW, database_type_cmd); - INSTALL (VIEW, database_type_detail_cmd); - INSTALL (VIEW, database_id_cmd); - INSTALL (VIEW, database_id_detail_cmd); - INSTALL (VIEW, database_linkstate_id_cmd); - INSTALL (VIEW, database_linkstate_id_detail_cmd); - INSTALL (VIEW, database_router_cmd); - INSTALL (VIEW, database_router_detail_cmd); - INSTALL (VIEW, database_adv_router_cmd); - INSTALL (VIEW, database_adv_router_detail_cmd); - INSTALL (VIEW, database_type_id_cmd); - INSTALL (VIEW, database_type_id_detail_cmd); - INSTALL (VIEW, database_type_linkstate_id_cmd); - INSTALL (VIEW, database_type_linkstate_id_detail_cmd); - INSTALL (VIEW, database_type_router_cmd); - INSTALL (VIEW, database_type_router_detail_cmd); - INSTALL (VIEW, database_type_adv_router_cmd); - INSTALL (VIEW, database_type_adv_router_detail_cmd); - INSTALL (VIEW, database_adv_router_linkstate_id_cmd); - INSTALL (VIEW, database_adv_router_linkstate_id_detail_cmd); - INSTALL (VIEW, database_id_router_cmd); - INSTALL (VIEW, database_id_router_detail_cmd); - INSTALL (VIEW, database_type_id_router_cmd); - INSTALL (VIEW, database_type_id_router_detail_cmd); - INSTALL (VIEW, database_type_adv_router_linkstate_id_cmd); - INSTALL (VIEW, database_type_adv_router_linkstate_id_detail_cmd); - INSTALL (VIEW, database_self_originated_cmd); - INSTALL (VIEW, database_self_originated_detail_cmd); - INSTALL (VIEW, database_type_self_originated_cmd); - INSTALL (VIEW, database_type_self_originated_detail_cmd); - INSTALL (VIEW, database_type_id_self_originated_cmd); - INSTALL (VIEW, database_type_id_self_originated_detail_cmd); - INSTALL (VIEW, database_type_self_originated_linkstate_id_cmd); - INSTALL (VIEW, database_type_self_originated_linkstate_id_detail_cmd); - - INSTALL (ENABLE, database_cmd); - INSTALL (ENABLE, database_detail_cmd); - INSTALL (ENABLE, database_type_cmd); - INSTALL (ENABLE, database_type_detail_cmd); - INSTALL (ENABLE, database_id_cmd); - INSTALL (ENABLE, database_id_detail_cmd); - INSTALL (ENABLE, database_linkstate_id_cmd); - INSTALL (ENABLE, database_linkstate_id_detail_cmd); - INSTALL (ENABLE, database_router_cmd); - INSTALL (ENABLE, database_router_detail_cmd); - INSTALL (ENABLE, database_adv_router_cmd); - INSTALL (ENABLE, database_adv_router_detail_cmd); - INSTALL (ENABLE, database_type_id_cmd); - INSTALL (ENABLE, database_type_id_detail_cmd); - INSTALL (ENABLE, database_type_linkstate_id_cmd); - INSTALL (ENABLE, database_type_linkstate_id_detail_cmd); - INSTALL (ENABLE, database_type_router_cmd); - INSTALL (ENABLE, database_type_router_detail_cmd); - INSTALL (ENABLE, database_type_adv_router_cmd); - INSTALL (ENABLE, database_type_adv_router_detail_cmd); - INSTALL (ENABLE, database_adv_router_linkstate_id_cmd); - INSTALL (ENABLE, database_adv_router_linkstate_id_detail_cmd); - INSTALL (ENABLE, database_id_router_cmd); - INSTALL (ENABLE, database_id_router_detail_cmd); - INSTALL (ENABLE, database_type_id_router_cmd); - INSTALL (ENABLE, database_type_id_router_detail_cmd); - INSTALL (ENABLE, database_type_adv_router_linkstate_id_cmd); - INSTALL (ENABLE, database_type_adv_router_linkstate_id_detail_cmd); - INSTALL (ENABLE, database_self_originated_cmd); - INSTALL (ENABLE, database_self_originated_detail_cmd); - INSTALL (ENABLE, database_type_self_originated_cmd); - INSTALL (ENABLE, database_type_self_originated_detail_cmd); - INSTALL (ENABLE, database_type_id_self_originated_cmd); - INSTALL (ENABLE, database_type_id_self_originated_detail_cmd); - INSTALL (ENABLE, database_type_self_originated_linkstate_id_cmd); - INSTALL (ENABLE, database_type_self_originated_linkstate_id_detail_cmd); - - /* Make ospf protocol socket. */ - ospf6_serv_sock (); - thread_add_read (master, ospf6_receive, NULL, ospf6_sock); -} - -void -ospf6_clean (void) -{ - if (!ospf6) - return; - if (ospf6->route_table) - ospf6_route_remove_all (ospf6->route_table); - if (ospf6->brouter_table) - ospf6_route_remove_all (ospf6->brouter_table); -} diff --git a/ospfd/ospf_bfd.c b/ospfd/ospf_bfd.c index dd44ab2ac..2689cecc4 100644 --- a/ospfd/ospf_bfd.c +++ b/ospfd/ospf_bfd.c @@ -404,6 +404,18 @@ DEFUN (ip_ospf_bfd_param, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ip ospf bfd " BFD_CMD_DETECT_MULT_RANGE BFD_CMD_MIN_RX_RANGE BFD_CMD_MIN_TX_RANGE, + * NO_STR + * "IP Information\n" + * "OSPF interface commands\n" + * "Enables BFD support\n" + * "Detect Multiplier\n" + * "Required min receive interval\n" + * "Desired min transmit interval\n" + * + */ DEFUN (no_ip_ospf_bfd, no_ip_ospf_bfd_cmd, "no ip ospf bfd", @@ -427,16 +439,6 @@ DEFUN (no_ip_ospf_bfd, return CMD_SUCCESS; } -ALIAS (no_ip_ospf_bfd, - no_ip_ospf_bfd_param_cmd, - "no ip ospf bfd " BFD_CMD_DETECT_MULT_RANGE BFD_CMD_MIN_RX_RANGE BFD_CMD_MIN_TX_RANGE, - NO_STR - "IP Information\n" - "OSPF interface commands\n" - "Enables BFD support\n" - "Detect Multiplier\n" - "Required min receive interval\n" - "Desired min transmit interval\n") void ospf_bfd_init(void) @@ -451,5 +453,4 @@ ospf_bfd_init(void) install_element (INTERFACE_NODE, &ip_ospf_bfd_cmd); install_element (INTERFACE_NODE, &ip_ospf_bfd_param_cmd); install_element (INTERFACE_NODE, &no_ip_ospf_bfd_cmd); - install_element (INTERFACE_NODE, &no_ip_ospf_bfd_param_cmd); } diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c index 583a4d85d..60356e774 100644 --- a/ospfd/ospf_dump.c +++ b/ospfd/ospf_dump.c @@ -814,6 +814,37 @@ debug_ospf_packet_common (struct vty *vty, int arg_base, int argc, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) (detail|)", + * "Debugging functions\n" + * "OSPF information\n" + * "OSPF packets\n" + * "OSPF Hello\n" + * "OSPF Database Description\n" + * "OSPF Link State Request\n" + * "OSPF Link State Update\n" + * "OSPF Link State Acknowledgment\n" + * "OSPF all packets\n" + * "Packet sent\n" + * "Packet received\n" + * "Detail Information\n" + * + * "debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv|detail)", + * "Debugging functions\n" + * "OSPF information\n" + * "OSPF packets\n" + * "OSPF Hello\n" + * "OSPF Database Description\n" + * "OSPF Link State Request\n" + * "OSPF Link State Update\n" + * "OSPF Link State Acknowledgment\n" + * "OSPF all packets\n" + * "Packet sent\n" + * "Packet received\n" + * "Detail information\n" + * + */ DEFUN (debug_ospf_packet, debug_ospf_packet_all_cmd, "debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all)", @@ -830,38 +861,41 @@ DEFUN (debug_ospf_packet, return (debug_ospf_packet_common(vty, 0, argc, argv)); } -ALIAS (debug_ospf_packet, - debug_ospf_packet_send_recv_cmd, - "debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv|detail)", - "Debugging functions\n" - "OSPF information\n" - "OSPF packets\n" - "OSPF Hello\n" - "OSPF Database Description\n" - "OSPF Link State Request\n" - "OSPF Link State Update\n" - "OSPF Link State Acknowledgment\n" - "OSPF all packets\n" - "Packet sent\n" - "Packet received\n" - "Detail information\n") - -ALIAS (debug_ospf_packet, - debug_ospf_packet_send_recv_detail_cmd, - "debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) (detail|)", - "Debugging functions\n" - "OSPF information\n" - "OSPF packets\n" - "OSPF Hello\n" - "OSPF Database Description\n" - "OSPF Link State Request\n" - "OSPF Link State Update\n" - "OSPF Link State Acknowledgment\n" - "OSPF all packets\n" - "Packet sent\n" - "Packet received\n" - "Detail Information\n") + +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "debug ospf <1-65535> packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv|detail)", + * "Debugging functions\n" + * "OSPF information\n" + * "Instance ID\n" + * "OSPF packets\n" + * "OSPF Hello\n" + * "OSPF Database Description\n" + * "OSPF Link State Request\n" + * "OSPF Link State Update\n" + * "OSPF Link State Acknowledgment\n" + * "OSPF all packets\n" + * "Packet sent\n" + * "Packet received\n" + * "Detail information\n" + * + * "debug ospf <1-65535> packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) (detail|)", + * "Debugging functions\n" + * "OSPF information\n" + * "Instance ID\n" + * "OSPF packets\n" + * "OSPF Hello\n" + * "OSPF Database Description\n" + * "OSPF Link State Request\n" + * "OSPF Link State Update\n" + * "OSPF Link State Acknowledgment\n" + * "OSPF all packets\n" + * "Packet sent\n" + * "Packet received\n" + * "Detail Information\n" + * + */ DEFUN (debug_ospf_instance_packet, debug_ospf_instance_packet_all_cmd, "debug ospf <1-65535> packet (hello|dd|ls-request|ls-update|ls-ack|all)", @@ -885,39 +919,7 @@ DEFUN (debug_ospf_instance_packet, return (debug_ospf_packet_common(vty, 1, argc, argv)); } -ALIAS (debug_ospf_instance_packet, - debug_ospf_instance_packet_send_recv_cmd, - "debug ospf <1-65535> packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv|detail)", - "Debugging functions\n" - "OSPF information\n" - "Instance ID\n" - "OSPF packets\n" - "OSPF Hello\n" - "OSPF Database Description\n" - "OSPF Link State Request\n" - "OSPF Link State Update\n" - "OSPF Link State Acknowledgment\n" - "OSPF all packets\n" - "Packet sent\n" - "Packet received\n" - "Detail information\n") - -ALIAS (debug_ospf_instance_packet, - debug_ospf_instance_packet_send_recv_detail_cmd, - "debug ospf <1-65535> packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) (detail|)", - "Debugging functions\n" - "OSPF information\n" - "Instance ID\n" - "OSPF packets\n" - "OSPF Hello\n" - "OSPF Database Description\n" - "OSPF Link State Request\n" - "OSPF Link State Update\n" - "OSPF Link State Acknowledgment\n" - "OSPF all packets\n" - "Packet sent\n" - "Packet received\n" - "Detail Information\n") + static int no_debug_ospf_packet_common (struct vty *vty, int arg_base, int argc, @@ -982,6 +984,39 @@ no_debug_ospf_packet_common (struct vty *vty, int arg_base, int argc, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv|detail)", + * NO_STR + * "Debugging functions\n" + * "OSPF information\n" + * "OSPF packets\n" + * "OSPF Hello\n" + * "OSPF Database Description\n" + * "OSPF Link State Request\n" + * "OSPF Link State Update\n" + * "OSPF Link State Acknowledgment\n" + * "OSPF all packets\n" + * "Packet sent\n" + * "Packet received\n" + * "Detail Information\n" + * + * "no debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) (detail|)", + * NO_STR + * "Debugging functions\n" + * "OSPF information\n" + * "OSPF packets\n" + * "OSPF Hello\n" + * "OSPF Database Description\n" + * "OSPF Link State Request\n" + * "OSPF Link State Update\n" + * "OSPF Link State Acknowledgment\n" + * "OSPF all packets\n" + * "Packet sent\n" + * "Packet received\n" + * "Detail Information\n" + * + */ DEFUN (no_debug_ospf_packet, no_debug_ospf_packet_all_cmd, "no debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all)", @@ -999,40 +1034,43 @@ DEFUN (no_debug_ospf_packet, return no_debug_ospf_packet_common(vty, 0, argc, argv); } -ALIAS (no_debug_ospf_packet, - no_debug_ospf_packet_send_recv_cmd, - "no debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv|detail)", - NO_STR - "Debugging functions\n" - "OSPF information\n" - "OSPF packets\n" - "OSPF Hello\n" - "OSPF Database Description\n" - "OSPF Link State Request\n" - "OSPF Link State Update\n" - "OSPF Link State Acknowledgment\n" - "OSPF all packets\n" - "Packet sent\n" - "Packet received\n" - "Detail Information\n") - -ALIAS (no_debug_ospf_packet, - no_debug_ospf_packet_send_recv_detail_cmd, - "no debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) (detail|)", - NO_STR - "Debugging functions\n" - "OSPF information\n" - "OSPF packets\n" - "OSPF Hello\n" - "OSPF Database Description\n" - "OSPF Link State Request\n" - "OSPF Link State Update\n" - "OSPF Link State Acknowledgment\n" - "OSPF all packets\n" - "Packet sent\n" - "Packet received\n" - "Detail Information\n") + +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no debug ospf <1-65535> packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv|detail)", + * NO_STR + * "Debugging functions\n" + * "OSPF information\n" + * "Instance ID\n" + * "OSPF packets\n" + * "OSPF Hello\n" + * "OSPF Database Description\n" + * "OSPF Link State Request\n" + * "OSPF Link State Update\n" + * "OSPF Link State Acknowledgment\n" + * "OSPF all packets\n" + * "Packet sent\n" + * "Packet received\n" + * "Detail Information\n" + * + * "no debug ospf <1-65535> packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) (detail|)", + * NO_STR + * "Debugging functions\n" + * "OSPF information\n" + * "Instance ID\n" + * "OSPF packets\n" + * "OSPF Hello\n" + * "OSPF Database Description\n" + * "OSPF Link State Request\n" + * "OSPF Link State Update\n" + * "OSPF Link State Acknowledgment\n" + * "OSPF all packets\n" + * "Packet sent\n" + * "Packet received\n" + * "Detail Information\n" + * + */ DEFUN (no_debug_ospf_instance_packet, no_debug_ospf_instance_packet_all_cmd, "no debug ospf <1-65535> packet (hello|dd|ls-request|ls-update|ls-ack|all)", @@ -1057,41 +1095,7 @@ DEFUN (no_debug_ospf_instance_packet, return (no_debug_ospf_packet_common(vty, 1, argc, argv)); } -ALIAS (no_debug_ospf_instance_packet, - no_debug_ospf_instance_packet_send_recv_cmd, - "no debug ospf <1-65535> packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv|detail)", - NO_STR - "Debugging functions\n" - "OSPF information\n" - "Instance ID\n" - "OSPF packets\n" - "OSPF Hello\n" - "OSPF Database Description\n" - "OSPF Link State Request\n" - "OSPF Link State Update\n" - "OSPF Link State Acknowledgment\n" - "OSPF all packets\n" - "Packet sent\n" - "Packet received\n" - "Detail Information\n") - -ALIAS (no_debug_ospf_instance_packet, - no_debug_ospf_instance_packet_send_recv_detail_cmd, - "no debug ospf <1-65535> packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) (detail|)", - NO_STR - "Debugging functions\n" - "OSPF information\n" - "Instance ID\n" - "OSPF packets\n" - "OSPF Hello\n" - "OSPF Database Description\n" - "OSPF Link State Request\n" - "OSPF Link State Update\n" - "OSPF Link State Acknowledgment\n" - "OSPF all packets\n" - "Packet sent\n" - "Packet received\n" - "Detail Information\n") + static int @@ -1130,6 +1134,17 @@ debug_ospf_ism_common (struct vty *vty, int arg_base, int argc, struct cmd_token return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "debug ospf ism (status|events|timers)", + * DEBUG_STR + * OSPF_STR + * "OSPF Interface State Machine\n" + * "ISM Status Information\n" + * "ISM Event Information\n" + * "ISM TImer Information\n" + * + */ DEFUN (debug_ospf_ism, debug_ospf_ism_cmd, "debug ospf ism", @@ -1140,16 +1155,19 @@ DEFUN (debug_ospf_ism, return debug_ospf_ism_common(vty, 0, argc, argv); } -ALIAS (debug_ospf_ism, - debug_ospf_ism_sub_cmd, - "debug ospf ism (status|events|timers)", - DEBUG_STR - OSPF_STR - "OSPF Interface State Machine\n" - "ISM Status Information\n" - "ISM Event Information\n" - "ISM TImer Information\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "debug ospf <1-65535> ism (status|events|timers)", + * DEBUG_STR + * OSPF_STR + * "Instance ID\n" + * "OSPF Interface State Machine\n" + * "ISM Status Information\n" + * "ISM Event Information\n" + * "ISM TImer Information\n" + * + */ DEFUN (debug_ospf_instance_ism, debug_ospf_instance_ism_cmd, "debug ospf <1-65535> ism", @@ -1167,16 +1185,6 @@ DEFUN (debug_ospf_instance_ism, return debug_ospf_ism_common(vty, 1, argc, argv); } -ALIAS (debug_ospf_instance_ism, - debug_ospf_instance_ism_sub_cmd, - "debug ospf <1-65535> ism (status|events|timers)", - DEBUG_STR - OSPF_STR - "Instance ID\n" - "OSPF Interface State Machine\n" - "ISM Status Information\n" - "ISM Event Information\n" - "ISM TImer Information\n") static int no_debug_ospf_ism_common(struct vty *vty, int arg_base, int argc, @@ -1214,6 +1222,18 @@ no_debug_ospf_ism_common(struct vty *vty, int arg_base, int argc, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no debug ospf ism (status|events|timers)", + * NO_STR + * "Debugging functions\n" + * "OSPF information\n" + * "OSPF Interface State Machine\n" + * "ISM Status Information\n" + * "ISM Event Information\n" + * "ISM Timer Information\n" + * + */ DEFUN (no_debug_ospf_ism, no_debug_ospf_ism_cmd, "no debug ospf ism", @@ -1225,17 +1245,20 @@ DEFUN (no_debug_ospf_ism, return no_debug_ospf_ism_common(vty, 0, argc, argv); } -ALIAS (no_debug_ospf_ism, - no_debug_ospf_ism_sub_cmd, - "no debug ospf ism (status|events|timers)", - NO_STR - "Debugging functions\n" - "OSPF information\n" - "OSPF Interface State Machine\n" - "ISM Status Information\n" - "ISM Event Information\n" - "ISM Timer Information\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no debug ospf <1-65535> ism (status|events|timers)", + * NO_STR + * "Debugging functions\n" + * "OSPF information\n" + * "Instance ID\n" + * "OSPF Interface State Machine\n" + * "ISM Status Information\n" + * "ISM Event Information\n" + * "ISM Timer Information\n" + * + */ DEFUN (no_debug_ospf_instance_ism, no_debug_ospf_instance_ism_cmd, "no debug ospf <1-65535> ism", @@ -1254,17 +1277,6 @@ DEFUN (no_debug_ospf_instance_ism, return no_debug_ospf_ism_common(vty, 1, argc, argv); } -ALIAS (no_debug_ospf_instance_ism, - no_debug_ospf_instance_ism_sub_cmd, - "no debug ospf <1-65535> ism (status|events|timers)", - NO_STR - "Debugging functions\n" - "OSPF information\n" - "Instance ID\n" - "OSPF Interface State Machine\n" - "ISM Status Information\n" - "ISM Event Information\n" - "ISM Timer Information\n") static int debug_ospf_nsm_common (struct vty *vty, int arg_base, int argc, struct cmd_token **argv) @@ -1302,6 +1314,17 @@ debug_ospf_nsm_common (struct vty *vty, int arg_base, int argc, struct cmd_token return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "debug ospf nsm (status|events|timers)", + * DEBUG_STR + * OSPF_STR + * "OSPF Neighbor State Machine\n" + * "NSM Status Information\n" + * "NSM Event Information\n" + * "NSM Timer Information\n" + * + */ DEFUN (debug_ospf_nsm, debug_ospf_nsm_cmd, "debug ospf nsm", @@ -1312,16 +1335,19 @@ DEFUN (debug_ospf_nsm, return debug_ospf_nsm_common (vty, 0, argc, argv); } -ALIAS (debug_ospf_nsm, - debug_ospf_nsm_sub_cmd, - "debug ospf nsm (status|events|timers)", - DEBUG_STR - OSPF_STR - "OSPF Neighbor State Machine\n" - "NSM Status Information\n" - "NSM Event Information\n" - "NSM Timer Information\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "debug ospf <1-65535> nsm (status|events|timers)", + * DEBUG_STR + * OSPF_STR + * "Instance ID\n" + * "OSPF Neighbor State Machine\n" + * "NSM Status Information\n" + * "NSM Event Information\n" + * "NSM Timer Information\n" + * + */ DEFUN (debug_ospf_instance_nsm, debug_ospf_instance_nsm_cmd, "debug ospf <1-65535> nsm", @@ -1339,16 +1365,6 @@ DEFUN (debug_ospf_instance_nsm, return debug_ospf_nsm_common (vty, 1, argc, argv); } -ALIAS (debug_ospf_instance_nsm, - debug_ospf_instance_nsm_sub_cmd, - "debug ospf <1-65535> nsm (status|events|timers)", - DEBUG_STR - OSPF_STR - "Instance ID\n" - "OSPF Neighbor State Machine\n" - "NSM Status Information\n" - "NSM Event Information\n" - "NSM Timer Information\n") static int no_debug_ospf_nsm_common (struct vty *vty, int arg_base, int argc, struct cmd_token **argv) @@ -1386,6 +1402,18 @@ no_debug_ospf_nsm_common (struct vty *vty, int arg_base, int argc, struct cmd_to return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no debug ospf nsm (status|events|timers)", + * NO_STR + * "Debugging functions\n" + * "OSPF information\n" + * "OSPF Interface State Machine\n" + * "NSM Status Information\n" + * "NSM Event Information\n" + * "NSM Timer Information\n" + * + */ DEFUN (no_debug_ospf_nsm, no_debug_ospf_nsm_cmd, "no debug ospf nsm", @@ -1397,17 +1425,20 @@ DEFUN (no_debug_ospf_nsm, return no_debug_ospf_nsm_common(vty, 0, argc, argv); } -ALIAS (no_debug_ospf_nsm, - no_debug_ospf_nsm_sub_cmd, - "no debug ospf nsm (status|events|timers)", - NO_STR - "Debugging functions\n" - "OSPF information\n" - "OSPF Interface State Machine\n" - "NSM Status Information\n" - "NSM Event Information\n" - "NSM Timer Information\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no debug ospf <1-65535> nsm (status|events|timers)", + * NO_STR + * "Debugging functions\n" + * "OSPF information\n" + * "Instance ID\n" + * "OSPF Interface State Machine\n" + * "NSM Status Information\n" + * "NSM Event Information\n" + * "NSM Timer Information\n" + * + */ DEFUN (no_debug_ospf_instance_nsm, no_debug_ospf_instance_nsm_cmd, "no debug ospf <1-65535> nsm", @@ -1426,17 +1457,6 @@ DEFUN (no_debug_ospf_instance_nsm, return no_debug_ospf_nsm_common(vty, 1, argc, argv); } -ALIAS (no_debug_ospf_instance_nsm, - no_debug_ospf_instance_nsm_sub_cmd, - "no debug ospf <1-65535> nsm (status|events|timers)", - NO_STR - "Debugging functions\n" - "OSPF information\n" - "Instance ID\n" - "OSPF Interface State Machine\n" - "NSM Status Information\n" - "NSM Event Information\n" - "NSM Timer Information\n") static int @@ -1479,6 +1499,18 @@ debug_ospf_lsa_common (struct vty *vty, int arg_base, int argc, struct cmd_token return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "debug ospf lsa (generate|flooding|install|refresh)", + * DEBUG_STR + * OSPF_STR + * "OSPF Link State Advertisement\n" + * "LSA Generation\n" + * "LSA Flooding\n" + * "LSA Install/Delete\n" + * "LSA Refresh\n" + * + */ DEFUN (debug_ospf_lsa, debug_ospf_lsa_cmd, "debug ospf lsa", @@ -1489,17 +1521,20 @@ DEFUN (debug_ospf_lsa, return debug_ospf_lsa_common(vty, 0, argc, argv); } -ALIAS (debug_ospf_lsa, - debug_ospf_lsa_sub_cmd, - "debug ospf lsa (generate|flooding|install|refresh)", - DEBUG_STR - OSPF_STR - "OSPF Link State Advertisement\n" - "LSA Generation\n" - "LSA Flooding\n" - "LSA Install/Delete\n" - "LSA Refresh\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "debug ospf <1-65535> lsa (generate|flooding|install|refresh)", + * DEBUG_STR + * OSPF_STR + * "Instance ID\n" + * "OSPF Link State Advertisement\n" + * "LSA Generation\n" + * "LSA Flooding\n" + * "LSA Install/Delete\n" + * "LSA Refresh\n" + * + */ DEFUN (debug_ospf_instance_lsa, debug_ospf_instance_lsa_cmd, "debug ospf <1-65535> lsa", @@ -1517,17 +1552,6 @@ DEFUN (debug_ospf_instance_lsa, return debug_ospf_lsa_common(vty, 1, argc, argv); } -ALIAS (debug_ospf_instance_lsa, - debug_ospf_instance_lsa_sub_cmd, - "debug ospf <1-65535> lsa (generate|flooding|install|refresh)", - DEBUG_STR - OSPF_STR - "Instance ID\n" - "OSPF Link State Advertisement\n" - "LSA Generation\n" - "LSA Flooding\n" - "LSA Install/Delete\n" - "LSA Refresh\n") static int no_debug_ospf_lsa_common (struct vty *vty, int arg_base, int argc, struct cmd_token **argv) @@ -1569,6 +1593,19 @@ no_debug_ospf_lsa_common (struct vty *vty, int arg_base, int argc, struct cmd_to return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no debug ospf lsa (generate|flooding|install|refresh)", + * NO_STR + * DEBUG_STR + * OSPF_STR + * "OSPF Link State Advertisement\n" + * "LSA Generation\n" + * "LSA Flooding\n" + * "LSA Install/Delete\n" + * "LSA Refres\n" + * + */ DEFUN (no_debug_ospf_lsa, no_debug_ospf_lsa_cmd, "no debug ospf lsa", @@ -1580,18 +1617,21 @@ DEFUN (no_debug_ospf_lsa, return no_debug_ospf_lsa_common (vty, 0, argc, argv); } -ALIAS (no_debug_ospf_lsa, - no_debug_ospf_lsa_sub_cmd, - "no debug ospf lsa (generate|flooding|install|refresh)", - NO_STR - DEBUG_STR - OSPF_STR - "OSPF Link State Advertisement\n" - "LSA Generation\n" - "LSA Flooding\n" - "LSA Install/Delete\n" - "LSA Refres\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no debug ospf <1-65535> lsa (generate|flooding|install|refresh)", + * NO_STR + * DEBUG_STR + * OSPF_STR + * "Instance ID\n" + * "OSPF Link State Advertisement\n" + * "LSA Generation\n" + * "LSA Flooding\n" + * "LSA Install/Delete\n" + * "LSA Refres\n" + * + */ DEFUN (no_debug_ospf_instance_lsa, no_debug_ospf_instance_lsa_cmd, "no debug ospf <1-65535> lsa", @@ -1610,18 +1650,6 @@ DEFUN (no_debug_ospf_instance_lsa, return no_debug_ospf_lsa_common (vty, 1, argc, argv); } -ALIAS (no_debug_ospf_instance_lsa, - no_debug_ospf_instance_lsa_sub_cmd, - "no debug ospf <1-65535> lsa (generate|flooding|install|refresh)", - NO_STR - DEBUG_STR - OSPF_STR - "Instance ID\n" - "OSPF Link State Advertisement\n" - "LSA Generation\n" - "LSA Flooding\n" - "LSA Install/Delete\n" - "LSA Refres\n") static int @@ -1656,6 +1684,16 @@ debug_ospf_zebra_common (struct vty *vty, int arg_base, int argc, struct cmd_tok return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "debug ospf zebra (interface|redistribute)", + * DEBUG_STR + * OSPF_STR + * "OSPF Zebra information\n" + * "Zebra interface\n" + * "Zebra redistribute\n" + * + */ DEFUN (debug_ospf_zebra, debug_ospf_zebra_cmd, "debug ospf zebra", @@ -1666,15 +1704,18 @@ DEFUN (debug_ospf_zebra, return debug_ospf_zebra_common(vty, 0, argc, argv); } -ALIAS (debug_ospf_zebra, - debug_ospf_zebra_sub_cmd, - "debug ospf zebra (interface|redistribute)", - DEBUG_STR - OSPF_STR - "OSPF Zebra information\n" - "Zebra interface\n" - "Zebra redistribute\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "debug ospf <1-65535> zebra (interface|redistribute)", + * DEBUG_STR + * OSPF_STR + * "Instance ID\n" + * "OSPF Zebra information\n" + * "Zebra interface\n" + * "Zebra redistribute\n" + * + */ DEFUN (debug_ospf_instance_zebra, debug_ospf_instance_zebra_cmd, "debug ospf <1-65535> zebra", @@ -1692,15 +1733,6 @@ DEFUN (debug_ospf_instance_zebra, return debug_ospf_zebra_common(vty, 1, argc, argv); } -ALIAS (debug_ospf_instance_zebra, - debug_ospf_instance_zebra_sub_cmd, - "debug ospf <1-65535> zebra (interface|redistribute)", - DEBUG_STR - OSPF_STR - "Instance ID\n" - "OSPF Zebra information\n" - "Zebra interface\n" - "Zebra redistribute\n") static int no_debug_ospf_zebra_common(struct vty *vty, int arg_base, int argc, @@ -1735,6 +1767,17 @@ no_debug_ospf_zebra_common(struct vty *vty, int arg_base, int argc, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no debug ospf zebra (interface|redistribute)", + * NO_STR + * DEBUG_STR + * OSPF_STR + * "OSPF Zebra information\n" + * "Zebra interface\n" + * "Zebra redistribute\n" + * + */ DEFUN (no_debug_ospf_zebra, no_debug_ospf_zebra_cmd, "no debug ospf zebra", @@ -1746,16 +1789,19 @@ DEFUN (no_debug_ospf_zebra, return no_debug_ospf_zebra_common(vty, 0, argc, argv); } -ALIAS (no_debug_ospf_zebra, - no_debug_ospf_zebra_sub_cmd, - "no debug ospf zebra (interface|redistribute)", - NO_STR - DEBUG_STR - OSPF_STR - "OSPF Zebra information\n" - "Zebra interface\n" - "Zebra redistribute\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no debug ospf <1-65535> zebra (interface|redistribute)", + * NO_STR + * DEBUG_STR + * OSPF_STR + * "Instance ID\n" + * "OSPF Zebra information\n" + * "Zebra interface\n" + * "Zebra redistribute\n" + * + */ DEFUN (no_debug_ospf_instance_zebra, no_debug_ospf_instance_zebra_cmd, "no debug ospf <1-65535> zebra", @@ -1774,16 +1820,6 @@ DEFUN (no_debug_ospf_instance_zebra, return no_debug_ospf_zebra_common(vty, 1, argc, argv); } -ALIAS (no_debug_ospf_instance_zebra, - no_debug_ospf_instance_zebra_sub_cmd, - "no debug ospf <1-65535> zebra (interface|redistribute)", - NO_STR - DEBUG_STR - OSPF_STR - "Instance ID\n" - "OSPF Zebra information\n" - "Zebra interface\n" - "Zebra redistribute\n") DEFUN (debug_ospf_event, @@ -2286,116 +2322,68 @@ debug_init () install_node (&debug_node, config_write_debug); install_element (ENABLE_NODE, &show_debugging_ospf_cmd); - install_element (ENABLE_NODE, &debug_ospf_packet_send_recv_detail_cmd); - install_element (ENABLE_NODE, &debug_ospf_packet_send_recv_cmd); install_element (ENABLE_NODE, &debug_ospf_packet_all_cmd); - install_element (ENABLE_NODE, &debug_ospf_ism_sub_cmd); install_element (ENABLE_NODE, &debug_ospf_ism_cmd); - install_element (ENABLE_NODE, &debug_ospf_nsm_sub_cmd); install_element (ENABLE_NODE, &debug_ospf_nsm_cmd); - install_element (ENABLE_NODE, &debug_ospf_lsa_sub_cmd); install_element (ENABLE_NODE, &debug_ospf_lsa_cmd); - install_element (ENABLE_NODE, &debug_ospf_zebra_sub_cmd); install_element (ENABLE_NODE, &debug_ospf_zebra_cmd); install_element (ENABLE_NODE, &debug_ospf_event_cmd); install_element (ENABLE_NODE, &debug_ospf_nssa_cmd); install_element (ENABLE_NODE, &debug_ospf_te_cmd); - install_element (ENABLE_NODE, &no_debug_ospf_packet_send_recv_detail_cmd); - install_element (ENABLE_NODE, &no_debug_ospf_packet_send_recv_cmd); install_element (ENABLE_NODE, &no_debug_ospf_packet_all_cmd); - install_element (ENABLE_NODE, &no_debug_ospf_ism_sub_cmd); install_element (ENABLE_NODE, &no_debug_ospf_ism_cmd); - install_element (ENABLE_NODE, &no_debug_ospf_nsm_sub_cmd); install_element (ENABLE_NODE, &no_debug_ospf_nsm_cmd); - install_element (ENABLE_NODE, &no_debug_ospf_lsa_sub_cmd); install_element (ENABLE_NODE, &no_debug_ospf_lsa_cmd); - install_element (ENABLE_NODE, &no_debug_ospf_zebra_sub_cmd); install_element (ENABLE_NODE, &no_debug_ospf_zebra_cmd); install_element (ENABLE_NODE, &no_debug_ospf_event_cmd); install_element (ENABLE_NODE, &no_debug_ospf_nssa_cmd); install_element (ENABLE_NODE, &no_debug_ospf_te_cmd); install_element (ENABLE_NODE, &show_debugging_ospf_instance_cmd); - install_element (ENABLE_NODE, &debug_ospf_instance_packet_send_recv_detail_cmd); - install_element (ENABLE_NODE, &debug_ospf_instance_packet_send_recv_cmd); install_element (ENABLE_NODE, &debug_ospf_instance_packet_all_cmd); - install_element (ENABLE_NODE, &debug_ospf_instance_ism_sub_cmd); install_element (ENABLE_NODE, &debug_ospf_instance_ism_cmd); - install_element (ENABLE_NODE, &debug_ospf_instance_nsm_sub_cmd); install_element (ENABLE_NODE, &debug_ospf_instance_nsm_cmd); - install_element (ENABLE_NODE, &debug_ospf_instance_lsa_sub_cmd); install_element (ENABLE_NODE, &debug_ospf_instance_lsa_cmd); - install_element (ENABLE_NODE, &debug_ospf_instance_zebra_sub_cmd); install_element (ENABLE_NODE, &debug_ospf_instance_zebra_cmd); install_element (ENABLE_NODE, &debug_ospf_instance_event_cmd); install_element (ENABLE_NODE, &debug_ospf_instance_nssa_cmd); - install_element (ENABLE_NODE, &no_debug_ospf_instance_packet_send_recv_detail_cmd); - install_element (ENABLE_NODE, &no_debug_ospf_instance_packet_send_recv_cmd); install_element (ENABLE_NODE, &no_debug_ospf_instance_packet_all_cmd); - install_element (ENABLE_NODE, &no_debug_ospf_instance_ism_sub_cmd); install_element (ENABLE_NODE, &no_debug_ospf_instance_ism_cmd); - install_element (ENABLE_NODE, &no_debug_ospf_instance_nsm_sub_cmd); install_element (ENABLE_NODE, &no_debug_ospf_instance_nsm_cmd); - install_element (ENABLE_NODE, &no_debug_ospf_instance_lsa_sub_cmd); install_element (ENABLE_NODE, &no_debug_ospf_instance_lsa_cmd); - install_element (ENABLE_NODE, &no_debug_ospf_instance_zebra_sub_cmd); install_element (ENABLE_NODE, &no_debug_ospf_instance_zebra_cmd); install_element (ENABLE_NODE, &no_debug_ospf_instance_event_cmd); install_element (ENABLE_NODE, &no_debug_ospf_instance_nssa_cmd); install_element (ENABLE_NODE, &no_debug_ospf_cmd); - install_element (CONFIG_NODE, &debug_ospf_packet_send_recv_detail_cmd); - install_element (CONFIG_NODE, &debug_ospf_packet_send_recv_cmd); install_element (CONFIG_NODE, &debug_ospf_packet_all_cmd); - install_element (CONFIG_NODE, &debug_ospf_ism_sub_cmd); install_element (CONFIG_NODE, &debug_ospf_ism_cmd); - install_element (CONFIG_NODE, &debug_ospf_nsm_sub_cmd); install_element (CONFIG_NODE, &debug_ospf_nsm_cmd); - install_element (CONFIG_NODE, &debug_ospf_lsa_sub_cmd); install_element (CONFIG_NODE, &debug_ospf_lsa_cmd); - install_element (CONFIG_NODE, &debug_ospf_zebra_sub_cmd); install_element (CONFIG_NODE, &debug_ospf_zebra_cmd); install_element (CONFIG_NODE, &debug_ospf_event_cmd); install_element (CONFIG_NODE, &debug_ospf_nssa_cmd); install_element (CONFIG_NODE, &debug_ospf_te_cmd); - install_element (CONFIG_NODE, &no_debug_ospf_packet_send_recv_detail_cmd); - install_element (CONFIG_NODE, &no_debug_ospf_packet_send_recv_cmd); install_element (CONFIG_NODE, &no_debug_ospf_packet_all_cmd); - install_element (CONFIG_NODE, &no_debug_ospf_ism_sub_cmd); install_element (CONFIG_NODE, &no_debug_ospf_ism_cmd); - install_element (CONFIG_NODE, &no_debug_ospf_nsm_sub_cmd); install_element (CONFIG_NODE, &no_debug_ospf_nsm_cmd); - install_element (CONFIG_NODE, &no_debug_ospf_lsa_sub_cmd); install_element (CONFIG_NODE, &no_debug_ospf_lsa_cmd); - install_element (CONFIG_NODE, &no_debug_ospf_zebra_sub_cmd); install_element (CONFIG_NODE, &no_debug_ospf_zebra_cmd); install_element (CONFIG_NODE, &no_debug_ospf_event_cmd); install_element (CONFIG_NODE, &no_debug_ospf_nssa_cmd); install_element (CONFIG_NODE, &no_debug_ospf_te_cmd); - install_element (CONFIG_NODE, &debug_ospf_instance_packet_send_recv_detail_cmd); - install_element (CONFIG_NODE, &debug_ospf_instance_packet_send_recv_cmd); install_element (CONFIG_NODE, &debug_ospf_instance_packet_all_cmd); - install_element (CONFIG_NODE, &debug_ospf_instance_ism_sub_cmd); install_element (CONFIG_NODE, &debug_ospf_instance_ism_cmd); - install_element (CONFIG_NODE, &debug_ospf_instance_nsm_sub_cmd); install_element (CONFIG_NODE, &debug_ospf_instance_nsm_cmd); - install_element (CONFIG_NODE, &debug_ospf_instance_lsa_sub_cmd); install_element (CONFIG_NODE, &debug_ospf_instance_lsa_cmd); - install_element (CONFIG_NODE, &debug_ospf_instance_zebra_sub_cmd); install_element (CONFIG_NODE, &debug_ospf_instance_zebra_cmd); install_element (CONFIG_NODE, &debug_ospf_instance_event_cmd); install_element (CONFIG_NODE, &debug_ospf_instance_nssa_cmd); - install_element (CONFIG_NODE, &no_debug_ospf_instance_packet_send_recv_detail_cmd); - install_element (CONFIG_NODE, &no_debug_ospf_instance_packet_send_recv_cmd); install_element (CONFIG_NODE, &no_debug_ospf_instance_packet_all_cmd); - install_element (CONFIG_NODE, &no_debug_ospf_instance_ism_sub_cmd); install_element (CONFIG_NODE, &no_debug_ospf_instance_ism_cmd); - install_element (CONFIG_NODE, &no_debug_ospf_instance_nsm_sub_cmd); install_element (CONFIG_NODE, &no_debug_ospf_instance_nsm_cmd); - install_element (CONFIG_NODE, &no_debug_ospf_instance_lsa_sub_cmd); install_element (CONFIG_NODE, &no_debug_ospf_instance_lsa_cmd); - install_element (CONFIG_NODE, &no_debug_ospf_instance_zebra_sub_cmd); install_element (CONFIG_NODE, &no_debug_ospf_instance_zebra_cmd); install_element (CONFIG_NODE, &no_debug_ospf_instance_event_cmd); install_element (CONFIG_NODE, &no_debug_ospf_instance_nssa_cmd); diff --git a/ospfd/ospf_opaque.c b/ospfd/ospf_opaque.c index 33980b35c..9ffb50896 100644 --- a/ospfd/ospf_opaque.c +++ b/ospfd/ospf_opaque.c @@ -763,6 +763,13 @@ out: * Followings are (vty) configuration functions for Opaque-LSAs handling. *------------------------------------------------------------------------*/ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "ospf opaque-lsa", + * "OSPF specific commands\n" + * "Enable the Opaque-LSA capability (rfc2370)\n" + * + */ DEFUN (capability_opaque, capability_opaque_cmd, "capability opaque", @@ -786,12 +793,15 @@ DEFUN (capability_opaque, return CMD_SUCCESS; } -ALIAS (capability_opaque, - ospf_opaque_capable_cmd, - "ospf opaque-lsa", - "OSPF specific commands\n" - "Enable the Opaque-LSA capability (rfc2370)\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ospf opaque-lsa", + * NO_STR + * "OSPF specific commands\n" + * "Disable the Opaque-LSA capability (rfc2370)\n" + * + */ DEFUN (no_capability_opaque, no_capability_opaque_cmd, "no capability opaque", @@ -816,20 +826,12 @@ DEFUN (no_capability_opaque, return CMD_SUCCESS; } -ALIAS (no_capability_opaque, - no_ospf_opaque_capable_cmd, - "no ospf opaque-lsa", - NO_STR - "OSPF specific commands\n" - "Disable the Opaque-LSA capability (rfc2370)\n") static void ospf_opaque_register_vty (void) { install_element (OSPF_NODE, &capability_opaque_cmd); install_element (OSPF_NODE, &no_capability_opaque_cmd); - install_element (OSPF_NODE, &ospf_opaque_capable_cmd); - install_element (OSPF_NODE, &no_ospf_opaque_capable_cmd); return; } diff --git a/ospfd/ospf_ri.c b/ospfd/ospf_ri.c index 0ea25ceb9..04601b994 100644 --- a/ospfd/ospf_ri.c +++ b/ospfd/ospf_ri.c @@ -1174,6 +1174,13 @@ ospf_router_info_config_write_router (struct vty *vty) * Followings are vty command functions. *------------------------------------------------------------------------*/ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "router-info as", + * OSPF_RI_STR + * "Enable the Router Information functionality with AS flooding scope\n" + * + */ DEFUN (router_info, router_info_area_cmd, "router-info area A.B.C.D", @@ -1236,11 +1243,6 @@ DEFUN (router_info, } -ALIAS (router_info, - router_info_as_cmd, - "router-info as", - OSPF_RI_STR - "Enable the Router Information functionality with AS flooding scope\n") DEFUN (no_router_info, no_router_info_cmd, @@ -1625,7 +1627,6 @@ ospf_router_info_register_vty (void) install_element (ENABLE_NODE, &show_ip_ospf_router_info_pce_cmd); install_element (OSPF_NODE, &router_info_area_cmd); - install_element (OSPF_NODE, &router_info_as_cmd); install_element (OSPF_NODE, &no_router_info_cmd); install_element (OSPF_NODE, &pce_address_cmd); install_element (OSPF_NODE, &pce_path_scope_cmd); diff --git a/ospfd/ospf_routemap.c b/ospfd/ospf_routemap.c index 183666084..f38e45e42 100644 --- a/ospfd/ospf_routemap.c +++ b/ospfd/ospf_routemap.c @@ -703,6 +703,18 @@ DEFUN (match_ip_nexthop, return ospf_route_match_add (vty, vty->index, "ip next-hop", argv[3]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match ip next-hop (<1-199>|<1300-2699>|WORD)", + * NO_STR + * MATCH_STR + * IP_STR + * "Match next-hop address of route\n" + * "IP access-list number\n" + * "IP access-list number (expanded range)\n" + * "IP access-list name\n" + * + */ DEFUN (no_match_ip_nexthop, no_match_ip_nexthop_cmd, "no match ip next-hop", @@ -714,16 +726,6 @@ DEFUN (no_match_ip_nexthop, return ospf_route_match_delete (vty, vty->index, "ip next-hop", argv[4]->arg); } -ALIAS (no_match_ip_nexthop, - no_match_ip_nexthop_val_cmd, - "no match ip next-hop (<1-199>|<1300-2699>|WORD)", - NO_STR - MATCH_STR - IP_STR - "Match next-hop address of route\n" - "IP access-list number\n" - "IP access-list number (expanded range)\n" - "IP access-list name\n") DEFUN (match_ip_next_hop_prefix_list, match_ip_next_hop_prefix_list_cmd, @@ -738,6 +740,17 @@ DEFUN (match_ip_next_hop_prefix_list, argv[4]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match ip next-hop prefix-list WORD", + * NO_STR + * MATCH_STR + * IP_STR + * "Match next-hop address of route\n" + * "Match entries of prefix-lists\n" + * "IP prefix-list name\n" + * + */ DEFUN (no_match_ip_next_hop_prefix_list, no_match_ip_next_hop_prefix_list_cmd, "no match ip next-hop prefix-list", @@ -751,15 +764,6 @@ DEFUN (no_match_ip_next_hop_prefix_list, argv[5]->arg); } -ALIAS (no_match_ip_next_hop_prefix_list, - no_match_ip_next_hop_prefix_list_val_cmd, - "no match ip next-hop prefix-list WORD", - NO_STR - MATCH_STR - IP_STR - "Match next-hop address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") DEFUN (match_ip_address, match_ip_address_cmd, @@ -774,6 +778,18 @@ DEFUN (match_ip_address, return ospf_route_match_add (vty, vty->index, "ip address", argv[3]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match ip address (<1-199>|<1300-2699>|WORD)", + * NO_STR + * MATCH_STR + * IP_STR + * "Match address of route\n" + * "IP access-list number\n" + * "IP access-list number (expanded range)\n" + * "IP access-list name\n" + * + */ DEFUN (no_match_ip_address, no_match_ip_address_cmd, "no match ip address", @@ -785,16 +801,6 @@ DEFUN (no_match_ip_address, return ospf_route_match_delete (vty, vty->index, "ip address", argv[4]->arg); } -ALIAS (no_match_ip_address, - no_match_ip_address_val_cmd, - "no match ip address (<1-199>|<1300-2699>|WORD)", - NO_STR - MATCH_STR - IP_STR - "Match address of route\n" - "IP access-list number\n" - "IP access-list number (expanded range)\n" - "IP access-list name\n") DEFUN (match_ip_address_prefix_list, match_ip_address_prefix_list_cmd, @@ -809,6 +815,17 @@ DEFUN (match_ip_address_prefix_list, argv[4]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match ip address prefix-list WORD", + * NO_STR + * MATCH_STR + * IP_STR + * "Match address of route\n" + * "Match entries of prefix-lists\n" + * "IP prefix-list name\n" + * + */ DEFUN (no_match_ip_address_prefix_list, no_match_ip_address_prefix_list_cmd, "no match ip address prefix-list", @@ -822,15 +839,6 @@ DEFUN (no_match_ip_address_prefix_list, argv[5]->arg); } -ALIAS (no_match_ip_address_prefix_list, - no_match_ip_address_prefix_list_val_cmd, - "no match ip address prefix-list WORD", - NO_STR - MATCH_STR - IP_STR - "Match address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") DEFUN (match_interface, match_interface_cmd, @@ -842,6 +850,15 @@ DEFUN (match_interface, return ospf_route_match_add (vty, vty->index, "interface", argv[2]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match interface WORD", + * NO_STR + * MATCH_STR + * "Match first hop interface of route\n" + * "Interface name\n" + * + */ DEFUN (no_match_interface, no_match_interface_cmd, "no match interface", @@ -852,13 +869,6 @@ DEFUN (no_match_interface, return ospf_route_match_delete (vty, vty->index, "interface", argv[3]->arg); } -ALIAS (no_match_interface, - no_match_interface_val_cmd, - "no match interface WORD", - NO_STR - MATCH_STR - "Match first hop interface of route\n" - "Interface name\n") DEFUN (match_tag, match_tag_cmd, @@ -870,6 +880,15 @@ DEFUN (match_tag, return ospf_route_match_add (vty, vty->index, "tag", argv[2]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match tag <1-65535>", + * NO_STR + * MATCH_STR + * "Match tag of route\n" + * "Tag value\n" + * + */ DEFUN (no_match_tag, no_match_tag_cmd, "no match tag", @@ -880,13 +899,6 @@ DEFUN (no_match_tag, return ospf_route_match_delete (vty, vty->index, "tag", argv[3]->arg); } -ALIAS (no_match_tag, - no_match_tag_val_cmd, - "no match tag <1-65535>", - NO_STR - MATCH_STR - "Match tag of route\n" - "Tag value\n") DEFUN (set_metric, set_metric_cmd, @@ -898,6 +910,15 @@ DEFUN (set_metric, return ospf_route_set_add (vty, vty->index, "metric", argv[2]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no set metric <0-4294967295>", + * NO_STR + * SET_STR + * "Metric value for destination routing protocol\n" + * "Metric value\n" + * + */ DEFUN (no_set_metric, no_set_metric_cmd, "no set metric", @@ -908,13 +929,6 @@ DEFUN (no_set_metric, return ospf_route_set_delete (vty, vty->index, "metric", argv[3]->arg); } -ALIAS (no_set_metric, - no_set_metric_val_cmd, - "no set metric <0-4294967295>", - NO_STR - SET_STR - "Metric value for destination routing protocol\n" - "Metric value\n") DEFUN (set_metric_type, set_metric_type_cmd, @@ -932,6 +946,16 @@ DEFUN (set_metric_type, return ospf_route_set_add (vty, vty->index, "metric-type", argv[2]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no set metric-type (type-1|type-2)", + * NO_STR + * SET_STR + * "Type of metric for destination routing protocol\n" + * "OSPF[6] external type 1 metric\n" + * "OSPF[6] external type 2 metric\n" + * + */ DEFUN (no_set_metric_type, no_set_metric_type_cmd, "no set metric-type", @@ -942,14 +966,6 @@ DEFUN (no_set_metric_type, return ospf_route_set_delete (vty, vty->index, "metric-type", argv[3]->arg); } -ALIAS (no_set_metric_type, - no_set_metric_type_val_cmd, - "no set metric-type (type-1|type-2)", - NO_STR - SET_STR - "Type of metric for destination routing protocol\n" - "OSPF[6] external type 1 metric\n" - "OSPF[6] external type 2 metric\n") DEFUN (set_tag, set_tag_cmd, @@ -961,6 +977,15 @@ DEFUN (set_tag, return ospf_route_set_add (vty, vty->index, "tag", argv[2]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no set tag <1-65535>", + * NO_STR + * SET_STR + * "Tag value for routing protocol\n" + * "Tag value\n" + * + */ DEFUN (no_set_tag, no_set_tag_cmd, "no set tag", @@ -971,13 +996,6 @@ DEFUN (no_set_tag, return ospf_route_set_delete (vty, vty->index, "tag", argv[3]->arg); } -ALIAS (no_set_tag, - no_set_tag_val_cmd, - "no set tag <1-65535>", - NO_STR - SET_STR - "Tag value for routing protocol\n" - "Tag value\n") /* Route-map init */ void @@ -1003,30 +1021,21 @@ ospf_route_map_init (void) install_element (RMAP_NODE, &match_ip_nexthop_cmd); install_element (RMAP_NODE, &no_match_ip_nexthop_cmd); - install_element (RMAP_NODE, &no_match_ip_nexthop_val_cmd); install_element (RMAP_NODE, &match_ip_next_hop_prefix_list_cmd); install_element (RMAP_NODE, &no_match_ip_next_hop_prefix_list_cmd); - install_element (RMAP_NODE, &no_match_ip_next_hop_prefix_list_val_cmd); install_element (RMAP_NODE, &match_ip_address_cmd); install_element (RMAP_NODE, &no_match_ip_address_cmd); - install_element (RMAP_NODE, &no_match_ip_address_val_cmd); install_element (RMAP_NODE, &match_ip_address_prefix_list_cmd); install_element (RMAP_NODE, &no_match_ip_address_prefix_list_cmd); - install_element (RMAP_NODE, &no_match_ip_address_prefix_list_val_cmd); install_element (RMAP_NODE, &match_interface_cmd); install_element (RMAP_NODE, &no_match_interface_cmd); - install_element (RMAP_NODE, &no_match_interface_val_cmd); install_element (RMAP_NODE, &match_tag_cmd); install_element (RMAP_NODE, &no_match_tag_cmd); - install_element (RMAP_NODE, &no_match_tag_val_cmd); install_element (RMAP_NODE, &set_metric_cmd); install_element (RMAP_NODE, &no_set_metric_cmd); - install_element (RMAP_NODE, &no_set_metric_val_cmd); install_element (RMAP_NODE, &set_metric_type_cmd); install_element (RMAP_NODE, &no_set_metric_type_cmd); - install_element (RMAP_NODE, &no_set_metric_type_val_cmd); install_element (RMAP_NODE, &set_tag_cmd); install_element (RMAP_NODE, &no_set_tag_cmd); - install_element (RMAP_NODE, &no_set_tag_val_cmd); } diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c index 4b0247526..4505fb3c4 100644 --- a/ospfd/ospf_te.c +++ b/ospfd/ospf_te.c @@ -2297,6 +2297,14 @@ DEFUN (ospf_mpls_te_on, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no mpls-te on", + * NO_STR + * MPLS_TE_STR + * "Disable the MPLS-TE functionality\n" + * + */ DEFUN (no_ospf_mpls_te, no_ospf_mpls_te_cmd, "no mpls-te", @@ -2325,12 +2333,6 @@ DEFUN (no_ospf_mpls_te, return CMD_SUCCESS; } -ALIAS (no_ospf_mpls_te, - no_ospf_mpls_te_val_cmd, - "no mpls-te on", - NO_STR - MPLS_TE_STR - "Disable the MPLS-TE functionality\n") DEFUN (ospf_mpls_te_router_addr, ospf_mpls_te_router_addr_cmd, @@ -2655,7 +2657,6 @@ ospf_mpls_te_register_vty (void) install_element (OSPF_NODE, &ospf_mpls_te_on_cmd); install_element (OSPF_NODE, &no_ospf_mpls_te_cmd); - install_element (OSPF_NODE, &no_ospf_mpls_te_val_cmd); install_element (OSPF_NODE, &ospf_mpls_te_router_addr_cmd); install_element (OSPF_NODE, &ospf_mpls_te_inter_as_cmd); install_element (OSPF_NODE, &ospf_mpls_te_inter_as_area_cmd); diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index 30c63ea35..e88f9789e 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -144,6 +144,14 @@ ospf_oi_count (struct interface *ifp) } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "router ospf <1-65535>", + * "Enable a routing process\n" + * "Start OSPF configuration\n" + * "Instance ID\n" + * + */ DEFUN (router_ospf, router_ospf_cmd, "router ospf", @@ -181,13 +189,16 @@ DEFUN (router_ospf, return CMD_SUCCESS; } -ALIAS (router_ospf, - router_ospf_instance_cmd, - "router ospf <1-65535>", - "Enable a routing process\n" - "Start OSPF configuration\n" - "Instance ID\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no router ospf <1-65535>", + * NO_STR + * "Enable a routing process\n" + * "Start OSPF configuration\n" + * "Instance ID\n" + * + */ DEFUN (no_router_ospf, no_router_ospf_cmd, "no router ospf", @@ -209,13 +220,6 @@ DEFUN (no_router_ospf, return CMD_SUCCESS; } -ALIAS (no_router_ospf, - no_router_ospf_instance_cmd, - "no router ospf <1-65535>", - NO_STR - "Enable a routing process\n" - "Start OSPF configuration\n" - "Instance ID\n") DEFUN (ospf_router_id, ospf_router_id_cmd, @@ -261,6 +265,15 @@ ALIAS_HIDDEN (ospf_router_id, "router-id for the OSPF process\n" "OSPF router-id in IP address format\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ospf router-id A.B.C.D", + * NO_STR + * "OSPF specific commands\n" + * "router-id for the OSPF process\n" + * "OSPF router-id in IP address format\n" + * + */ DEFUN (no_ospf_router_id, no_ospf_router_id_cmd, "no ospf router-id", @@ -290,13 +303,6 @@ DEFUN (no_ospf_router_id, return CMD_SUCCESS; } -ALIAS (no_ospf_router_id, - no_ospf_router_id_val_cmd, - "no ospf router-id A.B.C.D", - NO_STR - "OSPF specific commands\n" - "router-id for the OSPF process\n" - "OSPF router-id in IP address format\n") static void ospf_passive_interface_default (struct ospf *ospf, u_char newval) @@ -361,6 +367,17 @@ ospf_passive_interface_update (struct ospf *ospf, struct interface *ifp, } } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "passive-interface IFNAME", + * "Suppress routing updates on an interface\n" + * "Interface's name\n" + * + * "passive-interface default", + * "Suppress routing updates on an interface\n" + * "Suppress routing updates on interfaces by default\n" + * + */ DEFUN (ospf_passive_interface, ospf_passive_interface_addr_cmd, "passive-interface IFNAME A.B.C.D", @@ -430,18 +447,21 @@ DEFUN (ospf_passive_interface, return CMD_SUCCESS; } -ALIAS (ospf_passive_interface, - ospf_passive_interface_cmd, - "passive-interface IFNAME", - "Suppress routing updates on an interface\n" - "Interface's name\n") -ALIAS (ospf_passive_interface, - ospf_passive_interface_default_cmd, - "passive-interface default", - "Suppress routing updates on an interface\n" - "Suppress routing updates on interfaces by default\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no passive-interface default", + * NO_STR + * "Allow routing updates on an interface\n" + * "Allow routing updates on interfaces by default\n" + * + * "no passive-interface IFNAME", + * NO_STR + * "Allow routing updates on an interface\n" + * "Interface's name\n" + * + */ DEFUN (no_ospf_passive_interface, no_ospf_passive_interface_addr_cmd, "no passive-interface IFNAME A.B.C.D", @@ -505,19 +525,7 @@ DEFUN (no_ospf_passive_interface, return CMD_SUCCESS; } -ALIAS (no_ospf_passive_interface, - no_ospf_passive_interface_cmd, - "no passive-interface IFNAME", - NO_STR - "Allow routing updates on an interface\n" - "Interface's name\n") -ALIAS (no_ospf_passive_interface, - no_ospf_passive_interface_default_cmd, - "no passive-interface default", - NO_STR - "Allow routing updates on an interface\n" - "Allow routing updates on interfaces by default\n") DEFUN (ospf_network_area, ospf_network_area_cmd, @@ -605,6 +613,36 @@ DEFUN (no_ospf_network_area, } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "area (A.B.C.D|<0-4294967295>) range A.B.C.D/M advertise", + * "OSPF area parameters\n" + * "OSPF area ID in IP address format\n" + * "OSPF area ID as a decimal value\n" + * "OSPF area range for route advertise (default)\n" + * "Area range prefix\n" + * "Advertise this range (default)\n" + * + * "area (A.B.C.D|<0-4294967295>) range A.B.C.D/M cost <0-16777215>", + * "OSPF area parameters\n" + * "OSPF area ID in IP address format\n" + * "OSPF area ID as a decimal value\n" + * "Summarize routes matching address/mask (border routers only)\n" + * "Area range prefix\n" + * "User specified metric for this range\n" + * "Advertised metric for this range\n" + * + * "area (A.B.C.D|<0-4294967295>) range A.B.C.D/M advertise cost <0-16777215>", + * "OSPF area parameters\n" + * "OSPF area ID in IP address format\n" + * "OSPF area ID as a decimal value\n" + * "Summarize routes matching address/mask (border routers only)\n" + * "Area range prefix\n" + * "Advertise this range (default)\n" + * "User specified metric for this range\n" + * "Advertised metric for this range\n" + * + */ DEFUN (ospf_area_range, ospf_area_range_cmd, "area (A.B.C.D|<0-4294967295>) range A.B.C.D/M", @@ -636,38 +674,8 @@ DEFUN (ospf_area_range, return CMD_SUCCESS; } -ALIAS (ospf_area_range, - ospf_area_range_advertise_cmd, - "area (A.B.C.D|<0-4294967295>) range A.B.C.D/M advertise", - "OSPF area parameters\n" - "OSPF area ID in IP address format\n" - "OSPF area ID as a decimal value\n" - "OSPF area range for route advertise (default)\n" - "Area range prefix\n" - "Advertise this range (default)\n") -ALIAS (ospf_area_range, - ospf_area_range_cost_cmd, - "area (A.B.C.D|<0-4294967295>) range A.B.C.D/M cost <0-16777215>", - "OSPF area parameters\n" - "OSPF area ID in IP address format\n" - "OSPF area ID as a decimal value\n" - "Summarize routes matching address/mask (border routers only)\n" - "Area range prefix\n" - "User specified metric for this range\n" - "Advertised metric for this range\n") -ALIAS (ospf_area_range, - ospf_area_range_advertise_cost_cmd, - "area (A.B.C.D|<0-4294967295>) range A.B.C.D/M advertise cost <0-16777215>", - "OSPF area parameters\n" - "OSPF area ID in IP address format\n" - "OSPF area ID as a decimal value\n" - "Summarize routes matching address/mask (border routers only)\n" - "Area range prefix\n" - "Advertise this range (default)\n" - "User specified metric for this range\n" - "Advertised metric for this range\n") DEFUN (ospf_area_range_not_advertise, ospf_area_range_not_advertise_cmd, @@ -695,6 +703,40 @@ DEFUN (ospf_area_range_not_advertise, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no area (A.B.C.D|<0-4294967295>) range A.B.C.D/M (advertise|not-advertise)", + * NO_STR + * "OSPF area parameters\n" + * "OSPF area ID in IP address format\n" + * "OSPF area ID as a decimal value\n" + * "Summarize routes matching address/mask (border routers only)\n" + * "Area range prefix\n" + * "Advertise this range (default)\n" + * "DoNotAdvertise this range\n" + * + * "no area (A.B.C.D|<0-4294967295>) range A.B.C.D/M advertise cost <0-16777215>", + * NO_STR + * "OSPF area parameters\n" + * "OSPF area ID in IP address format\n" + * "OSPF area ID as a decimal value\n" + * "Summarize routes matching address/mask (border routers only)\n" + * "Area range prefix\n" + * "Advertise this range (default)\n" + * "User specified metric for this range\n" + * "Advertised metric for this range\n" + * + * "no area (A.B.C.D|<0-4294967295>) range A.B.C.D/M cost <0-16777215>", + * NO_STR + * "OSPF area parameters\n" + * "OSPF area ID in IP address format\n" + * "OSPF area ID as a decimal value\n" + * "Summarize routes matching address/mask (border routers only)\n" + * "Area range prefix\n" + * "User specified metric for this range\n" + * "Advertised metric for this range\n" + * + */ DEFUN (no_ospf_area_range, no_ospf_area_range_cmd, "no area (A.B.C.D|<0-4294967295>) range A.B.C.D/M", @@ -721,42 +763,8 @@ DEFUN (no_ospf_area_range, return CMD_SUCCESS; } -ALIAS (no_ospf_area_range, - no_ospf_area_range_advertise_cmd, - "no area (A.B.C.D|<0-4294967295>) range A.B.C.D/M (advertise|not-advertise)", - NO_STR - "OSPF area parameters\n" - "OSPF area ID in IP address format\n" - "OSPF area ID as a decimal value\n" - "Summarize routes matching address/mask (border routers only)\n" - "Area range prefix\n" - "Advertise this range (default)\n" - "DoNotAdvertise this range\n") -ALIAS (no_ospf_area_range, - no_ospf_area_range_cost_cmd, - "no area (A.B.C.D|<0-4294967295>) range A.B.C.D/M cost <0-16777215>", - NO_STR - "OSPF area parameters\n" - "OSPF area ID in IP address format\n" - "OSPF area ID as a decimal value\n" - "Summarize routes matching address/mask (border routers only)\n" - "Area range prefix\n" - "User specified metric for this range\n" - "Advertised metric for this range\n") -ALIAS (no_ospf_area_range, - no_ospf_area_range_advertise_cost_cmd, - "no area (A.B.C.D|<0-4294967295>) range A.B.C.D/M advertise cost <0-16777215>", - NO_STR - "OSPF area parameters\n" - "OSPF area ID in IP address format\n" - "OSPF area ID as a decimal value\n" - "Summarize routes matching address/mask (border routers only)\n" - "Area range prefix\n" - "Advertise this range (default)\n" - "User specified metric for this range\n" - "Advertised metric for this range\n") DEFUN (ospf_area_range_substitute, ospf_area_range_substitute_cmd, @@ -1069,6 +1077,89 @@ ospf_vl_set (struct ospf *ospf, struct ospf_vl_config_data *vl_config) "Use MD5 algorithm\n" \ "The OSPF password (key)" +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " + * "(authentication|) (message-digest|null) " + * "(authentication-key|) AUTH_KEY", + * VLINK_HELPSTR_IPADDR + * VLINK_HELPSTR_AUTHTYPE_ALL + * VLINK_HELPSTR_AUTH_SIMPLE + * + * "area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " + * "(authentication|) " + * "(authentication-key|) AUTH_KEY", + * VLINK_HELPSTR_IPADDR + * VLINK_HELPSTR_AUTHTYPE_SIMPLE + * VLINK_HELPSTR_AUTH_SIMPLE + * + * "area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " + * "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535> " + * "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535>", + * VLINK_HELPSTR_IPADDR + * VLINK_HELPSTR_TIME_PARAM + * VLINK_HELPSTR_TIME_PARAM + * + * "area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " + * "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535> " + * "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535> " + * "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535>", + * VLINK_HELPSTR_IPADDR + * VLINK_HELPSTR_TIME_PARAM + * VLINK_HELPSTR_TIME_PARAM + * VLINK_HELPSTR_TIME_PARAM + * + * "area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " + * "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535> " + * "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535> " + * "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535> " + * "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535>", + * VLINK_HELPSTR_IPADDR + * VLINK_HELPSTR_TIME_PARAM + * VLINK_HELPSTR_TIME_PARAM + * VLINK_HELPSTR_TIME_PARAM + * VLINK_HELPSTR_TIME_PARAM + * + * "area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " + * "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535>", + * VLINK_HELPSTR_IPADDR + * VLINK_HELPSTR_TIME_PARAM + * + * "area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " + * "(authentication|) (message-digest|null)", + * VLINK_HELPSTR_IPADDR + * VLINK_HELPSTR_AUTHTYPE_ALL + * + * "area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " + * "(message-digest-key|) <1-255> md5 KEY", + * VLINK_HELPSTR_IPADDR + * VLINK_HELPSTR_AUTH_MD5 + * + * "area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " + * "(authentication|) " + * "(message-digest-key|) <1-255> md5 KEY", + * VLINK_HELPSTR_IPADDR + * VLINK_HELPSTR_AUTHTYPE_SIMPLE + * VLINK_HELPSTR_AUTH_MD5 + * + * "area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " + * "(authentication|) (message-digest|null) " + * "(message-digest-key|) <1-255> md5 KEY", + * VLINK_HELPSTR_IPADDR + * VLINK_HELPSTR_AUTHTYPE_ALL + * VLINK_HELPSTR_AUTH_MD5 + * + * "area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " + * "(authentication|)", + * VLINK_HELPSTR_IPADDR + * VLINK_HELPSTR_AUTHTYPE_SIMPLE + * + * "area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " + * "(authentication-key|) AUTH_KEY", + * VLINK_HELPSTR_IPADDR + * VLINK_HELPSTR_AUTH_SIMPLE + * + */ DEFUN (ospf_area_vlink, ospf_area_vlink_cmd, "area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D", @@ -1206,6 +1297,101 @@ DEFUN (ospf_area_vlink, } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " + * "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535> " + * "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535> " + * "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535>", + * NO_STR + * VLINK_HELPSTR_IPADDR + * VLINK_HELPSTR_TIME_PARAM + * VLINK_HELPSTR_TIME_PARAM + * VLINK_HELPSTR_TIME_PARAM + * + * "no area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " + * "(authentication|) " + * "(message-digest-key|) <1-255> md5 KEY", + * NO_STR + * VLINK_HELPSTR_IPADDR + * VLINK_HELPSTR_AUTHTYPE_SIMPLE + * VLINK_HELPSTR_AUTH_MD5 + * + * "no area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " + * "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535> " + * "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535>", + * NO_STR + * VLINK_HELPSTR_IPADDR + * VLINK_HELPSTR_TIME_PARAM + * VLINK_HELPSTR_TIME_PARAM + * + * "no area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " + * "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535> " + * "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535> " + * "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535> " + * "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535>", + * NO_STR + * VLINK_HELPSTR_IPADDR + * VLINK_HELPSTR_TIME_PARAM + * VLINK_HELPSTR_TIME_PARAM + * VLINK_HELPSTR_TIME_PARAM + * VLINK_HELPSTR_TIME_PARAM + * + * "no area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " + * "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535>", + * NO_STR + * VLINK_HELPSTR_IPADDR + * VLINK_HELPSTR_TIME_PARAM + * + * "no area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " + * "(message-digest-key|) <1-255> md5 KEY", + * NO_STR + * VLINK_HELPSTR_IPADDR + * VLINK_HELPSTR_AUTH_MD5 + * + * "no area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " + * "(authentication|)", + * NO_STR + * VLINK_HELPSTR_IPADDR + * VLINK_HELPSTR_AUTHTYPE_SIMPLE + * + * "no area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " + * "(authentication|) (message-digest|null) " + * "(message-digest-key|) <1-255> md5 KEY", + * NO_STR + * VLINK_HELPSTR_IPADDR + * VLINK_HELPSTR_AUTHTYPE_ALL + * VLINK_HELPSTR_AUTH_MD5 + * + * "no area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " + * "(authentication|) " + * "(authentication-key|) AUTH_KEY", + * NO_STR + * VLINK_HELPSTR_IPADDR + * VLINK_HELPSTR_AUTHTYPE_SIMPLE + * VLINK_HELPSTR_AUTH_SIMPLE + * + * "no area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " + * "(authentication-key|) AUTH_KEY", + * NO_STR + * VLINK_HELPSTR_IPADDR + * VLINK_HELPSTR_AUTH_SIMPLE + * + * "no area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " + * "(authentication|) (message-digest|null)", + * NO_STR + * VLINK_HELPSTR_IPADDR + * VLINK_HELPSTR_AUTHTYPE_ALL + * + * "no area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " + * "(authentication|) (message-digest|null) " + * "(authentication-key|) AUTH_KEY", + * NO_STR + * VLINK_HELPSTR_IPADDR + * VLINK_HELPSTR_AUTHTYPE_ALL + * VLINK_HELPSTR_AUTH_SIMPLE + * + */ DEFUN (no_ospf_area_vlink, no_ospf_area_vlink_cmd, "no area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D", @@ -1325,225 +1511,29 @@ DEFUN (no_ospf_area_vlink, return ospf_vl_set (ospf, &vl_config); } -ALIAS (ospf_area_vlink, - ospf_area_vlink_param1_cmd, - "area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " - "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535>", - VLINK_HELPSTR_IPADDR - VLINK_HELPSTR_TIME_PARAM) -ALIAS (no_ospf_area_vlink, - no_ospf_area_vlink_param1_cmd, - "no area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " - "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535>", - NO_STR - VLINK_HELPSTR_IPADDR - VLINK_HELPSTR_TIME_PARAM) - -ALIAS (ospf_area_vlink, - ospf_area_vlink_param2_cmd, - "area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " - "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535> " - "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535>", - VLINK_HELPSTR_IPADDR - VLINK_HELPSTR_TIME_PARAM - VLINK_HELPSTR_TIME_PARAM) - -ALIAS (no_ospf_area_vlink, - no_ospf_area_vlink_param2_cmd, - "no area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " - "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535> " - "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535>", - NO_STR - VLINK_HELPSTR_IPADDR - VLINK_HELPSTR_TIME_PARAM - VLINK_HELPSTR_TIME_PARAM) - -ALIAS (ospf_area_vlink, - ospf_area_vlink_param3_cmd, - "area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " - "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535> " - "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535> " - "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535>", - VLINK_HELPSTR_IPADDR - VLINK_HELPSTR_TIME_PARAM - VLINK_HELPSTR_TIME_PARAM - VLINK_HELPSTR_TIME_PARAM) - -ALIAS (no_ospf_area_vlink, - no_ospf_area_vlink_param3_cmd, - "no area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " - "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535> " - "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535> " - "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535>", - NO_STR - VLINK_HELPSTR_IPADDR - VLINK_HELPSTR_TIME_PARAM - VLINK_HELPSTR_TIME_PARAM - VLINK_HELPSTR_TIME_PARAM) - -ALIAS (ospf_area_vlink, - ospf_area_vlink_param4_cmd, - "area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " - "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535> " - "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535> " - "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535> " - "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535>", - VLINK_HELPSTR_IPADDR - VLINK_HELPSTR_TIME_PARAM - VLINK_HELPSTR_TIME_PARAM - VLINK_HELPSTR_TIME_PARAM - VLINK_HELPSTR_TIME_PARAM) - -ALIAS (no_ospf_area_vlink, - no_ospf_area_vlink_param4_cmd, - "no area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " - "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535> " - "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535> " - "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535> " - "(hello-interval|retransmit-interval|transmit-delay|dead-interval) <1-65535>", - NO_STR - VLINK_HELPSTR_IPADDR - VLINK_HELPSTR_TIME_PARAM - VLINK_HELPSTR_TIME_PARAM - VLINK_HELPSTR_TIME_PARAM - VLINK_HELPSTR_TIME_PARAM) - -ALIAS (ospf_area_vlink, - ospf_area_vlink_authtype_args_cmd, - "area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " - "(authentication|) (message-digest|null)", - VLINK_HELPSTR_IPADDR - VLINK_HELPSTR_AUTHTYPE_ALL) - -ALIAS (no_ospf_area_vlink, - no_ospf_area_vlink_authtype_args_cmd, - "no area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " - "(authentication|) (message-digest|null)", - NO_STR - VLINK_HELPSTR_IPADDR - VLINK_HELPSTR_AUTHTYPE_ALL) - -ALIAS (ospf_area_vlink, - ospf_area_vlink_authtype_cmd, - "area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " - "(authentication|)", - VLINK_HELPSTR_IPADDR - VLINK_HELPSTR_AUTHTYPE_SIMPLE) - -ALIAS (no_ospf_area_vlink, - no_ospf_area_vlink_authtype_cmd, - "no area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " - "(authentication|)", - NO_STR - VLINK_HELPSTR_IPADDR - VLINK_HELPSTR_AUTHTYPE_SIMPLE) - -ALIAS (ospf_area_vlink, - ospf_area_vlink_md5_cmd, - "area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " - "(message-digest-key|) <1-255> md5 KEY", - VLINK_HELPSTR_IPADDR - VLINK_HELPSTR_AUTH_MD5) - -ALIAS (no_ospf_area_vlink, - no_ospf_area_vlink_md5_cmd, - "no area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " - "(message-digest-key|) <1-255> md5 KEY", - NO_STR - VLINK_HELPSTR_IPADDR - VLINK_HELPSTR_AUTH_MD5) - -ALIAS (ospf_area_vlink, - ospf_area_vlink_authkey_cmd, - "area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " - "(authentication-key|) AUTH_KEY", - VLINK_HELPSTR_IPADDR - VLINK_HELPSTR_AUTH_SIMPLE) - -ALIAS (no_ospf_area_vlink, - no_ospf_area_vlink_authkey_cmd, - "no area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " - "(authentication-key|) AUTH_KEY", - NO_STR - VLINK_HELPSTR_IPADDR - VLINK_HELPSTR_AUTH_SIMPLE) - -ALIAS (ospf_area_vlink, - ospf_area_vlink_authtype_args_authkey_cmd, - "area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " - "(authentication|) (message-digest|null) " - "(authentication-key|) AUTH_KEY", - VLINK_HELPSTR_IPADDR - VLINK_HELPSTR_AUTHTYPE_ALL - VLINK_HELPSTR_AUTH_SIMPLE) - -ALIAS (no_ospf_area_vlink, - no_ospf_area_vlink_authtype_args_authkey_cmd, - "no area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " - "(authentication|) (message-digest|null) " - "(authentication-key|) AUTH_KEY", - NO_STR - VLINK_HELPSTR_IPADDR - VLINK_HELPSTR_AUTHTYPE_ALL - VLINK_HELPSTR_AUTH_SIMPLE) - -ALIAS (ospf_area_vlink, - ospf_area_vlink_authtype_authkey_cmd, - "area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " - "(authentication|) " - "(authentication-key|) AUTH_KEY", - VLINK_HELPSTR_IPADDR - VLINK_HELPSTR_AUTHTYPE_SIMPLE - VLINK_HELPSTR_AUTH_SIMPLE) - -ALIAS (no_ospf_area_vlink, - no_ospf_area_vlink_authtype_authkey_cmd, - "no area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " - "(authentication|) " - "(authentication-key|) AUTH_KEY", - NO_STR - VLINK_HELPSTR_IPADDR - VLINK_HELPSTR_AUTHTYPE_SIMPLE - VLINK_HELPSTR_AUTH_SIMPLE) - -ALIAS (ospf_area_vlink, - ospf_area_vlink_authtype_args_md5_cmd, - "area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " - "(authentication|) (message-digest|null) " - "(message-digest-key|) <1-255> md5 KEY", - VLINK_HELPSTR_IPADDR - VLINK_HELPSTR_AUTHTYPE_ALL - VLINK_HELPSTR_AUTH_MD5) - -ALIAS (no_ospf_area_vlink, - no_ospf_area_vlink_authtype_args_md5_cmd, - "no area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " - "(authentication|) (message-digest|null) " - "(message-digest-key|) <1-255> md5 KEY", - NO_STR - VLINK_HELPSTR_IPADDR - VLINK_HELPSTR_AUTHTYPE_ALL - VLINK_HELPSTR_AUTH_MD5) - -ALIAS (ospf_area_vlink, - ospf_area_vlink_authtype_md5_cmd, - "area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " - "(authentication|) " - "(message-digest-key|) <1-255> md5 KEY", - VLINK_HELPSTR_IPADDR - VLINK_HELPSTR_AUTHTYPE_SIMPLE - VLINK_HELPSTR_AUTH_MD5) - -ALIAS (no_ospf_area_vlink, - no_ospf_area_vlink_authtype_md5_cmd, - "no area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D " - "(authentication|) " - "(message-digest-key|) <1-255> md5 KEY", - NO_STR - VLINK_HELPSTR_IPADDR - VLINK_HELPSTR_AUTHTYPE_SIMPLE - VLINK_HELPSTR_AUTH_MD5) + + + + + + + + + + + + + + + + + + + + + + DEFUN (ospf_area_shortcut, @@ -1829,6 +1819,20 @@ DEFUN (ospf_area_nssa_no_summary, return ospf_area_nssa_cmd_handler (vty, argc, argv, 1); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no area (A.B.C.D|<0-4294967295>) nssa (translate-candidate|translate-never|translate-always|) {no-summary}", + * NO_STR + * "OSPF area parameters\n" + * "OSPF area ID in IP address format\n" + * "OSPF area ID as a decimal value\n" + * "Configure OSPF area as nssa\n" + * "Configure NSSA-ABR for translate election (default)\n" + * "Configure NSSA-ABR to never translate\n" + * "Configure NSSA-ABR to always translate\n" + * "Do not inject inter-area routes into nssa\n" + * + */ DEFUN (no_ospf_area_nssa, no_ospf_area_nssa_cmd, "no area (A.B.C.D|<0-4294967295>) nssa", @@ -1855,18 +1859,6 @@ DEFUN (no_ospf_area_nssa, return CMD_SUCCESS; } -ALIAS (no_ospf_area_nssa, - no_ospf_area_nssa_no_summary_cmd, - "no area (A.B.C.D|<0-4294967295>) nssa (translate-candidate|translate-never|translate-always|) {no-summary}", - NO_STR - "OSPF area parameters\n" - "OSPF area ID in IP address format\n" - "OSPF area ID as a decimal value\n" - "Configure OSPF area as nssa\n" - "Configure NSSA-ABR for translate election (default)\n" - "Configure NSSA-ABR to never translate\n" - "Configure NSSA-ABR to always translate\n" - "Do not inject inter-area routes into nssa\n") DEFUN (ospf_area_default_cost, ospf_area_default_cost_cmd, @@ -2394,6 +2386,13 @@ DEFUN (no_ospf_log_adjacency_changes_detail, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "ospf rfc1583compatibility", + * "OSPF specific commands\n" + * "Enable the RFC1583Compatibility flag\n" + * + */ DEFUN (ospf_compatible_rfc1583, ospf_compatible_rfc1583_cmd, "compatible rfc1583", @@ -2413,6 +2412,14 @@ DEFUN (ospf_compatible_rfc1583, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ospf rfc1583compatibility", + * NO_STR + * "OSPF specific commands\n" + * "Disable the RFC1583Compatibility flag\n" + * + */ DEFUN (no_ospf_compatible_rfc1583, no_ospf_compatible_rfc1583_cmd, "no compatible rfc1583", @@ -2433,18 +2440,7 @@ DEFUN (no_ospf_compatible_rfc1583, return CMD_SUCCESS; } -ALIAS (ospf_compatible_rfc1583, - ospf_rfc1583_flag_cmd, - "ospf rfc1583compatibility", - "OSPF specific commands\n" - "Enable the RFC1583Compatibility flag\n") -ALIAS (no_ospf_compatible_rfc1583, - no_ospf_rfc1583_flag_cmd, - "no ospf rfc1583compatibility", - NO_STR - "OSPF specific commands\n" - "Disable the RFC1583Compatibility flag\n") static int ospf_timers_spf_set (struct vty *vty, unsigned int delay, @@ -2491,6 +2487,17 @@ DEFUN (ospf_timers_min_ls_interval, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no timers throttle lsa all <0-5000>", + * NO_STR + * "Adjust routing timers\n" + * "Throttling adaptive timer\n" + * "LSA delay between transmissions\n" + * "All LSA types\n" + * "Delay (msec) between sending LSAs\n" + * + */ DEFUN (no_ospf_timers_min_ls_interval, no_ospf_timers_min_ls_interval_cmd, "no timers throttle lsa all", @@ -2506,15 +2513,6 @@ DEFUN (no_ospf_timers_min_ls_interval, return CMD_SUCCESS; } -ALIAS (no_ospf_timers_min_ls_interval, - no_ospf_timers_min_ls_interval_val_cmd, - "no timers throttle lsa all <0-5000>", - NO_STR - "Adjust routing timers\n" - "Throttling adaptive timer\n" - "LSA delay between transmissions\n" - "All LSA types\n" - "Delay (msec) between sending LSAs\n") DEFUN (ospf_timers_min_ls_arrival, ospf_timers_min_ls_arrival_cmd, @@ -2543,6 +2541,16 @@ DEFUN (ospf_timers_min_ls_arrival, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no timers lsa arrival <0-1000>", + * NO_STR + * "Adjust routing timers\n" + * "Throttling link state advertisement delays\n" + * "OSPF minimum arrival interval delay\n" + * "Delay (msec) between accepted LSAs\n" + * + */ DEFUN (no_ospf_timers_min_ls_arrival, no_ospf_timers_min_ls_arrival_cmd, "no timers lsa arrival", @@ -2561,14 +2569,6 @@ DEFUN (no_ospf_timers_min_ls_arrival, return CMD_SUCCESS; } -ALIAS (no_ospf_timers_min_ls_arrival, - no_ospf_timers_min_ls_arrival_val_cmd, - "no timers lsa arrival <0-1000>", - NO_STR - "Adjust routing timers\n" - "Throttling link state advertisement delays\n" - "OSPF minimum arrival interval delay\n" - "Delay (msec) between accepted LSAs\n") DEFUN (ospf_timers_throttle_spf, ospf_timers_throttle_spf_cmd, @@ -2595,6 +2595,18 @@ DEFUN (ospf_timers_throttle_spf, return ospf_timers_spf_set (vty, delay, hold, max); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no timers throttle spf <0-600000> <0-600000> <0-600000>", + * NO_STR + * "Adjust routing timers\n" + * "Throttling adaptive timer\n" + * "OSPF SPF timers\n" + * "Delay (msec) from first change received till SPF calculation\n" + * "Initial hold time (msec) between consecutive SPF calculations\n" + * "Maximum hold time (msec)\n" + * + */ DEFUN (no_ospf_timers_throttle_spf, no_ospf_timers_throttle_spf_cmd, "no timers throttle spf", @@ -2609,16 +2621,6 @@ DEFUN (no_ospf_timers_throttle_spf, OSPF_SPF_MAX_HOLDTIME_DEFAULT); } -ALIAS (no_ospf_timers_throttle_spf, - no_ospf_timers_throttle_spf_val_cmd, - "no timers throttle spf <0-600000> <0-600000> <0-600000>", - NO_STR - "Adjust routing timers\n" - "Throttling adaptive timer\n" - "OSPF SPF timers\n" - "Delay (msec) from first change received till SPF calculation\n" - "Initial hold time (msec) between consecutive SPF calculations\n" - "Maximum hold time (msec)\n") DEFUN (ospf_timers_lsa, ospf_timers_lsa_cmd, @@ -2647,6 +2649,16 @@ DEFUN (ospf_timers_lsa, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no timers lsa min-arrival <0-600000>", + * NO_STR + * "Adjust routing timers\n" + * "OSPF LSA timers\n" + * "Minimum delay in receiving new version of a LSA\n" + * "Delay in milliseconds\n" + * + */ DEFUN (no_ospf_timers_lsa, no_ospf_timers_lsa_cmd, "no timers lsa min-arrival", @@ -2675,16 +2687,25 @@ DEFUN (no_ospf_timers_lsa, return CMD_SUCCESS; } -ALIAS (no_ospf_timers_lsa, - no_ospf_timers_lsa_val_cmd, - "no timers lsa min-arrival <0-600000>", - NO_STR - "Adjust routing timers\n" - "OSPF LSA timers\n" - "Minimum delay in receiving new version of a LSA\n" - "Delay in milliseconds\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "neighbor A.B.C.D priority <0-255> poll-interval <1-65535>", + * NEIGHBOR_STR + * "Neighbor IP address\n" + * "Neighbor Priority\n" + * "Priority\n" + * "Dead Neighbor Polling interval\n" + * "Seconds\n" + * + * "neighbor A.B.C.D priority <0-255>", + * NEIGHBOR_STR + * "Neighbor IP address\n" + * "Neighbor Priority\n" + * "Seconds\n" + * + */ DEFUN (ospf_neighbor, ospf_neighbor_cmd, "neighbor A.B.C.D", @@ -2716,24 +2737,19 @@ DEFUN (ospf_neighbor, return CMD_SUCCESS; } -ALIAS (ospf_neighbor, - ospf_neighbor_priority_poll_interval_cmd, - "neighbor A.B.C.D priority <0-255> poll-interval <1-65535>", - NEIGHBOR_STR - "Neighbor IP address\n" - "Neighbor Priority\n" - "Priority\n" - "Dead Neighbor Polling interval\n" - "Seconds\n") -ALIAS (ospf_neighbor, - ospf_neighbor_priority_cmd, - "neighbor A.B.C.D priority <0-255>", - NEIGHBOR_STR - "Neighbor IP address\n" - "Neighbor Priority\n" - "Seconds\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "neighbor A.B.C.D poll-interval <1-65535> priority <0-255>", + * NEIGHBOR_STR + * "Neighbor address\n" + * "OSPF dead-router polling interval\n" + * "Seconds\n" + * "OSPF priority of non-broadcast neighbor\n" + * "Priority\n" + * + */ DEFUN (ospf_neighbor_poll_interval, ospf_neighbor_poll_interval_cmd, "neighbor A.B.C.D poll-interval <1-65535>", @@ -2767,16 +2783,42 @@ DEFUN (ospf_neighbor_poll_interval, return CMD_SUCCESS; } -ALIAS (ospf_neighbor_poll_interval, - ospf_neighbor_poll_interval_priority_cmd, - "neighbor A.B.C.D poll-interval <1-65535> priority <0-255>", - NEIGHBOR_STR - "Neighbor address\n" - "OSPF dead-router polling interval\n" - "Seconds\n" - "OSPF priority of non-broadcast neighbor\n" - "Priority\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no neighbor A.B.C.D priority <0-255> poll-interval <1-65535>", + * NO_STR + * NEIGHBOR_STR + * "Neighbor IP address\n" + * "Neighbor Priority\n" + * "Priority\n" + * "Dead Neighbor Polling interval\n" + * "Seconds\n" + * + * "no neighbor A.B.C.D priority <0-255>", + * NO_STR + * NEIGHBOR_STR + * "Neighbor IP address\n" + * "Neighbor Priority\n" + * "Priority\n" + * + * "no neighbor A.B.C.D poll-interval <1-65535>", + * NO_STR + * NEIGHBOR_STR + * "Neighbor IP address\n" + * "Dead Neighbor Polling interval\n" + * "Seconds\n" + * + * "no neighbor A.B.C.D poll-interval <1-65535> priority <0-255>", + * NO_STR + * NEIGHBOR_STR + * "Neighbor IP address\n" + * "Dead Neighbor Polling interval\n" + * "Seconds\n" + * "OSPF priority of non-broadcast neighbor\n" + * "Priority\n" + * + */ DEFUN (no_ospf_neighbor, no_ospf_neighbor_cmd, "no neighbor A.B.C.D", @@ -2797,45 +2839,9 @@ DEFUN (no_ospf_neighbor, return CMD_SUCCESS; } -ALIAS (no_ospf_neighbor, - no_ospf_neighbor_priority_cmd, - "no neighbor A.B.C.D priority <0-255>", - NO_STR - NEIGHBOR_STR - "Neighbor IP address\n" - "Neighbor Priority\n" - "Priority\n") -ALIAS (no_ospf_neighbor, - no_ospf_neighbor_poll_interval_cmd, - "no neighbor A.B.C.D poll-interval <1-65535>", - NO_STR - NEIGHBOR_STR - "Neighbor IP address\n" - "Dead Neighbor Polling interval\n" - "Seconds\n") -ALIAS (no_ospf_neighbor, - no_ospf_neighbor_poll_interval_priority_cmd, - "no neighbor A.B.C.D poll-interval <1-65535> priority <0-255>", - NO_STR - NEIGHBOR_STR - "Neighbor IP address\n" - "Dead Neighbor Polling interval\n" - "Seconds\n" - "OSPF priority of non-broadcast neighbor\n" - "Priority\n") -ALIAS (no_ospf_neighbor, - no_ospf_neighbor_priority_pollinterval_cmd, - "no neighbor A.B.C.D priority <0-255> poll-interval <1-65535>", - NO_STR - NEIGHBOR_STR - "Neighbor IP address\n" - "Neighbor Priority\n" - "Priority\n" - "Dead Neighbor Polling interval\n" - "Seconds\n") DEFUN (ospf_refresh_timer, ospf_refresh_timer_cmd, @@ -2858,6 +2864,13 @@ DEFUN (ospf_refresh_timer, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no refresh timer", + * "Adjust refresh parameters\n" + * "Unset refresh timer\n" + * + */ DEFUN (no_ospf_refresh_timer, no_ospf_refresh_timer_val_cmd, "no refresh timer <10-1800>", @@ -2885,11 +2898,6 @@ DEFUN (no_ospf_refresh_timer, return CMD_SUCCESS; } -ALIAS (no_ospf_refresh_timer, - no_ospf_refresh_timer_cmd, - "no refresh timer", - "Adjust refresh parameters\n" - "Unset refresh timer\n") DEFUN (ospf_auto_cost_reference_bandwidth, ospf_auto_cost_reference_bandwidth_cmd, @@ -2924,6 +2932,15 @@ DEFUN (ospf_auto_cost_reference_bandwidth, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no auto-cost reference-bandwidth <1-4294967>", + * NO_STR + * "Calculate OSPF interface cost according to bandwidth\n" + * "Use reference bandwidth method to assign OSPF cost\n" + * "The reference bandwidth in terms of Mbits per second\n" + * + */ DEFUN (no_ospf_auto_cost_reference_bandwidth, no_ospf_auto_cost_reference_bandwidth_cmd, "no auto-cost reference-bandwidth", @@ -2951,14 +2968,14 @@ DEFUN (no_ospf_auto_cost_reference_bandwidth, return CMD_SUCCESS; } -ALIAS (no_ospf_auto_cost_reference_bandwidth, - no_ospf_auto_cost_reference_bandwidth_val_cmd, - "no auto-cost reference-bandwidth <1-4294967>", - NO_STR - "Calculate OSPF interface cost according to bandwidth\n" - "Use reference bandwidth method to assign OSPF cost\n" - "The reference bandwidth in terms of Mbits per second\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "write-multiplier <1-100>", + * "Write multiplier\n" + * "Maximum number of interface serviced per write\n" + * + */ DEFUN (ospf_write_multiplier, ospf_write_multiplier_cmd, "ospf write-multiplier <1-100>", @@ -2983,12 +3000,19 @@ DEFUN (ospf_write_multiplier, return CMD_SUCCESS; } -ALIAS (ospf_write_multiplier, - write_multiplier_cmd, - "write-multiplier <1-100>", - "Write multiplier\n" - "Maximum number of interface serviced per write\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no write-multiplier", + * NO_STR + * "Write multiplier\n" + * + * "no write-multiplier <1-100>", + * NO_STR + * "Write multiplier\n" + * "Maximum number of interface serviced per write\n" + * + */ DEFUN (no_ospf_write_multiplier, no_ospf_write_multiplier_cmd, "no ospf write-multiplier <1-100>", @@ -3006,18 +3030,7 @@ DEFUN (no_ospf_write_multiplier, return CMD_SUCCESS; } -ALIAS (no_ospf_write_multiplier, - no_write_multiplier_cmd, - "no write-multiplier", - NO_STR - "Write multiplier\n") -ALIAS (no_ospf_write_multiplier, - no_write_multiplier_val_cmd, - "no write-multiplier <1-100>", - NO_STR - "Write multiplier\n" - "Maximum number of interface serviced per write\n") const char *ospf_abr_type_descr_str[] = { @@ -5770,6 +5783,46 @@ show_ip_ospf_database_common (struct vty *vty, struct ospf *ospf, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip ospf database (" OSPF_LSA_TYPES_CMD_STR ") A.B.C.D", + * SHOW_STR + * IP_STR + * "OSPF information\n" + * "Database summary\n" + * OSPF_LSA_TYPES_DESC + * "Link State ID (as an IP address)\n" + * + * "show ip ospf database (" OSPF_LSA_TYPES_CMD_STR ") A.B.C.D (self-originate|)", + * SHOW_STR + * IP_STR + * "OSPF information\n" + * "Database summary\n" + * OSPF_LSA_TYPES_DESC + * "Link State ID (as an IP address)\n" + * "Self-originated link states\n" + * "\n" + * + * "show ip ospf database (" OSPF_LSA_TYPES_CMD_STR ") A.B.C.D adv-router A.B.C.D", + * SHOW_STR + * IP_STR + * "OSPF information\n" + * "Database summary\n" + * OSPF_LSA_TYPES_DESC + * "Link State ID (as an IP address)\n" + * "Advertising Router link states\n" + * "Advertising Router (as an IP address)\n" + * + * "show ip ospf database (" OSPF_LSA_TYPES_CMD_STR "|max-age|self-originate)", + * SHOW_STR + * IP_STR + * "OSPF information\n" + * "Database summary\n" + * OSPF_LSA_TYPES_DESC + * "LSAs in MaxAge list\n" + * "Self-originated link states\n" + * + */ DEFUN (show_ip_ospf_database, show_ip_ospf_database_cmd, "show ip ospf database", @@ -5786,54 +5839,57 @@ DEFUN (show_ip_ospf_database, return (show_ip_ospf_database_common(vty, ospf, 0, argc, argv)); } -ALIAS (show_ip_ospf_database, - show_ip_ospf_database_type_cmd, - "show ip ospf database (" OSPF_LSA_TYPES_CMD_STR "|max-age|self-originate)", - SHOW_STR - IP_STR - "OSPF information\n" - "Database summary\n" - OSPF_LSA_TYPES_DESC - "LSAs in MaxAge list\n" - "Self-originated link states\n") - -ALIAS (show_ip_ospf_database, - show_ip_ospf_database_type_id_cmd, - "show ip ospf database (" OSPF_LSA_TYPES_CMD_STR ") A.B.C.D", - SHOW_STR - IP_STR - "OSPF information\n" - "Database summary\n" - OSPF_LSA_TYPES_DESC - "Link State ID (as an IP address)\n") - -ALIAS (show_ip_ospf_database, - show_ip_ospf_database_type_id_adv_router_cmd, - "show ip ospf database (" OSPF_LSA_TYPES_CMD_STR ") A.B.C.D adv-router A.B.C.D", - SHOW_STR - IP_STR - "OSPF information\n" - "Database summary\n" - OSPF_LSA_TYPES_DESC - "Link State ID (as an IP address)\n" - "Advertising Router link states\n" - "Advertising Router (as an IP address)\n") - -ALIAS (show_ip_ospf_database, - show_ip_ospf_database_type_id_self_cmd, - "show ip ospf database (" OSPF_LSA_TYPES_CMD_STR ") A.B.C.D (self-originate|)", - SHOW_STR - IP_STR - "OSPF information\n" - "Database summary\n" - OSPF_LSA_TYPES_DESC - "Link State ID (as an IP address)\n" - "Self-originated link states\n" - "\n") - -DEFUN (show_ip_ospf_instance_database, - show_ip_ospf_instance_database_cmd, - "show ip ospf <1-65535> database", + + + + +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip ospf <1-65535> database (" OSPF_LSA_TYPES_CMD_STR ") A.B.C.D adv-router A.B.C.D", + * SHOW_STR + * IP_STR + * "OSPF information\n" + * "Instance ID\n" + * "Database summary\n" + * OSPF_LSA_TYPES_DESC + * "Link State ID (as an IP address)\n" + * "Advertising Router link states\n" + * "Advertising Router (as an IP address)\n" + * + * "show ip ospf <1-65535> database (" OSPF_LSA_TYPES_CMD_STR ") A.B.C.D", + * SHOW_STR + * IP_STR + * "OSPF information\n" + * "Instance ID\n" + * "Database summary\n" + * OSPF_LSA_TYPES_DESC + * "Link State ID (as an IP address)\n" + * + * "show ip ospf <1-65535> database (" OSPF_LSA_TYPES_CMD_STR ") A.B.C.D (self-originate|)", + * SHOW_STR + * IP_STR + * "OSPF information\n" + * "Instance ID\n" + * "Database summary\n" + * OSPF_LSA_TYPES_DESC + * "Link State ID (as an IP address)\n" + * "Self-originated link states\n" + * "\n" + * + * "show ip ospf <1-65535> database (" OSPF_LSA_TYPES_CMD_STR "|max-age|self-originate)", + * SHOW_STR + * IP_STR + * "OSPF information\n" + * "Instance ID\n" + * "Database summary\n" + * OSPF_LSA_TYPES_DESC + * "LSAs in MaxAge list\n" + * "Self-originated link states\n" + * + */ +DEFUN (show_ip_ospf_instance_database, + show_ip_ospf_instance_database_cmd, + "show ip ospf <1-65535> database", SHOW_STR IP_STR "OSPF information\n" @@ -5851,54 +5907,9 @@ DEFUN (show_ip_ospf_instance_database, return (show_ip_ospf_database_common(vty, ospf, 1, argc, argv)); } -ALIAS (show_ip_ospf_instance_database, - show_ip_ospf_instance_database_type_cmd, - "show ip ospf <1-65535> database (" OSPF_LSA_TYPES_CMD_STR "|max-age|self-originate)", - SHOW_STR - IP_STR - "OSPF information\n" - "Instance ID\n" - "Database summary\n" - OSPF_LSA_TYPES_DESC - "LSAs in MaxAge list\n" - "Self-originated link states\n") -ALIAS (show_ip_ospf_instance_database, - show_ip_ospf_instance_database_type_id_cmd, - "show ip ospf <1-65535> database (" OSPF_LSA_TYPES_CMD_STR ") A.B.C.D", - SHOW_STR - IP_STR - "OSPF information\n" - "Instance ID\n" - "Database summary\n" - OSPF_LSA_TYPES_DESC - "Link State ID (as an IP address)\n") -ALIAS (show_ip_ospf_instance_database, - show_ip_ospf_instance_database_type_id_adv_router_cmd, - "show ip ospf <1-65535> database (" OSPF_LSA_TYPES_CMD_STR ") A.B.C.D adv-router A.B.C.D", - SHOW_STR - IP_STR - "OSPF information\n" - "Instance ID\n" - "Database summary\n" - OSPF_LSA_TYPES_DESC - "Link State ID (as an IP address)\n" - "Advertising Router link states\n" - "Advertising Router (as an IP address)\n") -ALIAS (show_ip_ospf_instance_database, - show_ip_ospf_instance_database_type_id_self_cmd, - "show ip ospf <1-65535> database (" OSPF_LSA_TYPES_CMD_STR ") A.B.C.D (self-originate|)", - SHOW_STR - IP_STR - "OSPF information\n" - "Instance ID\n" - "Database summary\n" - OSPF_LSA_TYPES_DESC - "Link State ID (as an IP address)\n" - "Self-originated link states\n" - "\n") static int @@ -5955,6 +5966,17 @@ show_ip_ospf_database_type_adv_router_common (struct vty *vty, struct ospf *ospf return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip ospf database (" OSPF_LSA_TYPES_CMD_STR ") (self-originate|)", + * SHOW_STR + * IP_STR + * "OSPF information\n" + * "Database summary\n" + * OSPF_LSA_TYPES_DESC + * "Self-originated link states\n" + * + */ DEFUN (show_ip_ospf_database_type_adv_router, show_ip_ospf_database_type_adv_router_cmd, "show ip ospf database (" OSPF_LSA_TYPES_CMD_STR ") adv-router A.B.C.D", @@ -5974,16 +5996,19 @@ DEFUN (show_ip_ospf_database_type_adv_router, return (show_ip_ospf_database_type_adv_router_common(vty, ospf, 0, argc, argv)); } -ALIAS (show_ip_ospf_database_type_adv_router, - show_ip_ospf_database_type_self_cmd, - "show ip ospf database (" OSPF_LSA_TYPES_CMD_STR ") (self-originate|)", - SHOW_STR - IP_STR - "OSPF information\n" - "Database summary\n" - OSPF_LSA_TYPES_DESC - "Self-originated link states\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip ospf <1-65535> database (" OSPF_LSA_TYPES_CMD_STR ") (self-originate|)", + * SHOW_STR + * IP_STR + * "OSPF information\n" + * "Instance ID\n" + * "Database summary\n" + * OSPF_LSA_TYPES_DESC + * "Self-originated link states\n" + * + */ DEFUN (show_ip_ospf_instance_database_type_adv_router, show_ip_ospf_instance_database_type_adv_router_cmd, "show ip ospf <1-65535> database (" OSPF_LSA_TYPES_CMD_STR ") adv-router A.B.C.D", @@ -6007,17 +6032,17 @@ DEFUN (show_ip_ospf_instance_database_type_adv_router, return (show_ip_ospf_database_type_adv_router_common(vty, ospf, 1, argc, argv)); } -ALIAS (show_ip_ospf_instance_database_type_adv_router, - show_ip_ospf_instance_database_type_self_cmd, - "show ip ospf <1-65535> database (" OSPF_LSA_TYPES_CMD_STR ") (self-originate|)", - SHOW_STR - IP_STR - "OSPF information\n" - "Instance ID\n" - "Database summary\n" - OSPF_LSA_TYPES_DESC - "Self-originated link states\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "ip ospf authentication (null|message-digest)", + * "IP Information\n" + * "OSPF interface commands\n" + * "Enable authentication on this interface\n" + * "Use null authentication\n" + * "Use message-digest authentication\n" + * + */ DEFUN (ip_ospf_authentication_args, ip_ospf_authentication_args_addr_cmd, "ip ospf authentication (null|message-digest) A.B.C.D", @@ -6070,15 +6095,15 @@ DEFUN (ip_ospf_authentication_args, return CMD_WARNING; } -ALIAS (ip_ospf_authentication_args, - ip_ospf_authentication_args_cmd, - "ip ospf authentication (null|message-digest)", - "IP Information\n" - "OSPF interface commands\n" - "Enable authentication on this interface\n" - "Use null authentication\n" - "Use message-digest authentication\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "ip ospf authentication", + * "IP Information\n" + * "OSPF interface commands\n" + * "Enable authentication on this interface\n" + * + */ DEFUN (ip_ospf_authentication, ip_ospf_authentication_addr_cmd, "ip ospf authentication A.B.C.D", @@ -6115,13 +6140,18 @@ DEFUN (ip_ospf_authentication, return CMD_SUCCESS; } -ALIAS (ip_ospf_authentication, - ip_ospf_authentication_cmd, - "ip ospf authentication", - "IP Information\n" - "OSPF interface commands\n" - "Enable authentication on this interface\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ip ospf authentication (null|message-digest)", + * NO_STR + * "IP Information\n" + * "OSPF interface commands\n" + * "Enable authentication on this interface\n" + * "Use null authentication\n" + * "Use message-digest authentication\n" + * + */ DEFUN (no_ip_ospf_authentication_args, no_ip_ospf_authentication_args_addr_cmd, "no ip ospf authentication (null|message-digest) A.B.C.D", @@ -6215,16 +6245,16 @@ DEFUN (no_ip_ospf_authentication_args, return CMD_SUCCESS; } -ALIAS (no_ip_ospf_authentication_args, - no_ip_ospf_authentication_args_cmd, - "no ip ospf authentication (null|message-digest)", - NO_STR - "IP Information\n" - "OSPF interface commands\n" - "Enable authentication on this interface\n" - "Use null authentication\n" - "Use message-digest authentication\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ip ospf authentication", + * NO_STR + * "IP Information\n" + * "OSPF interface commands\n" + * "Enable authentication on this interface\n" + * + */ DEFUN (no_ip_ospf_authentication, no_ip_ospf_authentication_addr_cmd, "no ip ospf authentication A.B.C.D", @@ -6307,14 +6337,16 @@ DEFUN (no_ip_ospf_authentication, return CMD_SUCCESS; } -ALIAS (no_ip_ospf_authentication, - no_ip_ospf_authentication_cmd, - "no ip ospf authentication", - NO_STR - "IP Information\n" - "OSPF interface commands\n" - "Enable authentication on this interface\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "ip ospf authentication-key AUTH_KEY", + * "IP Information\n" + * "OSPF interface commands\n" + * "Authentication password (key)\n" + * "The OSPF password (key)" + * + */ DEFUN (ip_ospf_authentication_key, ip_ospf_authentication_key_addr_cmd, "ip ospf authentication-key AUTH_KEY A.B.C.D", @@ -6353,13 +6385,6 @@ DEFUN (ip_ospf_authentication_key, return CMD_SUCCESS; } -ALIAS (ip_ospf_authentication_key, - ip_ospf_authentication_key_cmd, - "ip ospf authentication-key AUTH_KEY", - "IP Information\n" - "OSPF interface commands\n" - "Authentication password (key)\n" - "The OSPF password (key)") ALIAS_HIDDEN (ip_ospf_authentication_key, ospf_authentication_key_cmd, @@ -6368,6 +6393,39 @@ ALIAS_HIDDEN (ip_ospf_authentication_key, "Authentication password (key)\n" "The OSPF password (key)") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ospf authentication-key AUTH_KEY A.B.C.D", + * NO_STR + * "OSPF interface commands\n" + * "Authentication password (key)\n" + * "The OSPF password (key)\n" + * "Address of interface" + * + * "no ospf authentication-key AUTH_KEY", + * NO_STR + * "OSPF interface commands\n" + * "Authentication password (key)\n" + * "The OSPF password (key)\n" + * + * "no ip ospf authentication-key", + * NO_STR + * "IP Information\n" + * "OSPF interface commands\n" + * "Authentication password (key)\n" + * + * "no ip ospf authentication-key AUTH_KEY", + * NO_STR + * "IP Information\n" + * "OSPF interface commands\n" + * "Authentication password (key)\n" + * + * "no ospf authentication-key", + * NO_STR + * "OSPF interface commands\n" + * "Authentication password (key)\n" + * + */ DEFUN (no_ip_ospf_authentication_key, no_ip_ospf_authentication_key_authkey_addr_cmd, "no ip ospf authentication-key AUTH_KEY A.B.C.D", @@ -6412,46 +6470,22 @@ DEFUN (no_ip_ospf_authentication_key, return CMD_SUCCESS; } -ALIAS (no_ip_ospf_authentication_key, - no_ip_ospf_authentication_key_authkey_cmd, - "no ip ospf authentication-key AUTH_KEY", - NO_STR - "IP Information\n" - "OSPF interface commands\n" - "Authentication password (key)\n") -ALIAS (no_ip_ospf_authentication_key, - no_ip_ospf_authentication_key_cmd, - "no ip ospf authentication-key", - NO_STR - "IP Information\n" - "OSPF interface commands\n" - "Authentication password (key)\n") -ALIAS (no_ip_ospf_authentication_key, - no_ospf_authentication_key_cmd, - "no ospf authentication-key", - NO_STR - "OSPF interface commands\n" - "Authentication password (key)\n") -ALIAS (no_ip_ospf_authentication_key, - no_ospf_authentication_key_authkey_cmd, - "no ospf authentication-key AUTH_KEY", - NO_STR - "OSPF interface commands\n" - "Authentication password (key)\n" - "The OSPF password (key)\n") -ALIAS (no_ip_ospf_authentication_key, - no_ospf_authentication_key_authkey_ip_cmd, - "no ospf authentication-key AUTH_KEY A.B.C.D", - NO_STR - "OSPF interface commands\n" - "Authentication password (key)\n" - "The OSPF password (key)\n" - "Address of interface") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "ip ospf message-digest-key <1-255> md5 KEY", + * "IP Information\n" + * "OSPF interface commands\n" + * "Message digest authentication password (key)\n" + * "Key ID\n" + * "Use MD5 algorithm\n" + * "The OSPF password (key)" + * + */ DEFUN (ip_ospf_message_digest_key, ip_ospf_message_digest_key_addr_cmd, "ip ospf message-digest-key <1-255> md5 KEY A.B.C.D", @@ -6505,15 +6539,6 @@ DEFUN (ip_ospf_message_digest_key, return CMD_SUCCESS; } -ALIAS (ip_ospf_message_digest_key, - ip_ospf_message_digest_key_cmd, - "ip ospf message-digest-key <1-255> md5 KEY", - "IP Information\n" - "OSPF interface commands\n" - "Message digest authentication password (key)\n" - "Key ID\n" - "Use MD5 algorithm\n" - "The OSPF password (key)") ALIAS_HIDDEN (ip_ospf_message_digest_key, ospf_message_digest_key_cmd, @@ -6524,6 +6549,18 @@ ALIAS_HIDDEN (ip_ospf_message_digest_key, "Use MD5 algorithm\n" "The OSPF password (key)") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ip ospf message-digest-key <1-255> md5 KEY", + * NO_STR + * "IP Information\n" + * "OSPF interface commands\n" + * "Message digest authentication password (key)\n" + * "Key ID\n" + * "Use MD5 algorithm\n" + * "The OSPF password (key)" + * + */ DEFUN (no_ip_ospf_message_digest_key_md5, no_ip_ospf_message_digest_key_md5_addr_cmd, "no ip ospf message-digest-key <1-255> md5 KEY A.B.C.D", @@ -6580,17 +6617,23 @@ DEFUN (no_ip_ospf_message_digest_key_md5, return CMD_SUCCESS; } -ALIAS (no_ip_ospf_message_digest_key_md5, - no_ip_ospf_message_digest_key_md5_cmd, - "no ip ospf message-digest-key <1-255> md5 KEY", - NO_STR - "IP Information\n" - "OSPF interface commands\n" - "Message digest authentication password (key)\n" - "Key ID\n" - "Use MD5 algorithm\n" - "The OSPF password (key)") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ip ospf message-digest-key <1-255>", + * NO_STR + * "IP Information\n" + * "OSPF interface commands\n" + * "Message digest authentication password (key)\n" + * "Key ID\n" + * + * "no ospf message-digest-key <1-255>", + * NO_STR + * "OSPF interface commands\n" + * "Message digest authentication password (key)\n" + * "Key ID\n" + * + */ DEFUN (no_ip_ospf_message_digest_key, no_ip_ospf_message_digest_key_addr_cmd, "no ip ospf message-digest-key <1-255> A.B.C.D", @@ -6645,23 +6688,17 @@ DEFUN (no_ip_ospf_message_digest_key, return CMD_SUCCESS; } -ALIAS (no_ip_ospf_message_digest_key, - no_ip_ospf_message_digest_key_cmd, - "no ip ospf message-digest-key <1-255>", - NO_STR - "IP Information\n" - "OSPF interface commands\n" - "Message digest authentication password (key)\n" - "Key ID\n") -ALIAS (no_ip_ospf_message_digest_key, - no_ospf_message_digest_key_cmd, - "no ospf message-digest-key <1-255>", - NO_STR - "OSPF interface commands\n" - "Message digest authentication password (key)\n" - "Key ID\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "ip ospf cost <1-65535>", + * "IP Information\n" + * "OSPF interface commands\n" + * "Interface cost\n" + * "Cost" + * + */ DEFUN (ip_ospf_cost, ip_ospf_cost_u32_inet4_cmd, "ip ospf cost <1-65535> A.B.C.D", @@ -6710,13 +6747,6 @@ DEFUN (ip_ospf_cost, return CMD_SUCCESS; } -ALIAS (ip_ospf_cost, - ip_ospf_cost_u32_cmd, - "ip ospf cost <1-65535>", - "IP Information\n" - "OSPF interface commands\n" - "Interface cost\n" - "Cost") ALIAS_HIDDEN (ip_ospf_cost, ospf_cost_u32_cmd, @@ -6733,6 +6763,26 @@ ALIAS_HIDDEN (ip_ospf_cost, "Cost\n" "Address of interface") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ospf cost A.B.C.D", + * NO_STR + * "OSPF interface commands\n" + * "Interface cost\n" + * "Address of interface" + * + * "no ospf cost", + * NO_STR + * "OSPF interface commands\n" + * "Interface cost\n" + * + * "no ip ospf cost", + * NO_STR + * "IP Information\n" + * "OSPF interface commands\n" + * "Interface cost\n" + * + */ DEFUN (no_ip_ospf_cost, no_ip_ospf_cost_inet4_cmd, "no ip ospf cost A.B.C.D", @@ -6778,29 +6828,33 @@ DEFUN (no_ip_ospf_cost, return CMD_SUCCESS; } -ALIAS (no_ip_ospf_cost, - no_ip_ospf_cost_cmd, - "no ip ospf cost", - NO_STR - "IP Information\n" - "OSPF interface commands\n" - "Interface cost\n") -ALIAS (no_ip_ospf_cost, - no_ospf_cost_cmd, - "no ospf cost", - NO_STR - "OSPF interface commands\n" - "Interface cost\n") -ALIAS (no_ip_ospf_cost, - no_ospf_cost_inet4_cmd, - "no ospf cost A.B.C.D", - NO_STR - "OSPF interface commands\n" - "Interface cost\n" - "Address of interface") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ospf cost <1-65535>", + * NO_STR + * "OSPF interface commands\n" + * "Interface cost\n" + * "Cost" + * + * "no ospf cost <1-65535> A.B.C.D", + * NO_STR + * "OSPF interface commands\n" + * "Interface cost\n" + * "Cost\n" + * "Address of interface" + * + * "no ip ospf cost <1-65535> A.B.C.D", + * NO_STR + * "IP Information\n" + * "OSPF interface commands\n" + * "Interface cost\n" + * "Cost\n" + * "Address of interface" + * + */ DEFUN (no_ip_ospf_cost2, no_ip_ospf_cost_u32_cmd, "no ip ospf cost <1-65535>", @@ -6859,32 +6913,8 @@ DEFUN (no_ip_ospf_cost2, return CMD_SUCCESS; } -ALIAS (no_ip_ospf_cost2, - no_ospf_cost_u32_cmd, - "no ospf cost <1-65535>", - NO_STR - "OSPF interface commands\n" - "Interface cost\n" - "Cost") -ALIAS (no_ip_ospf_cost2, - no_ip_ospf_cost_u32_inet4_cmd, - "no ip ospf cost <1-65535> A.B.C.D", - NO_STR - "IP Information\n" - "OSPF interface commands\n" - "Interface cost\n" - "Cost\n" - "Address of interface") -ALIAS (no_ip_ospf_cost2, - no_ospf_cost_u32_inet4_cmd, - "no ospf cost <1-65535> A.B.C.D", - NO_STR - "OSPF interface commands\n" - "Interface cost\n" - "Cost\n" - "Address of interface") static void ospf_nbr_timer_update (struct ospf_interface *oi) @@ -6982,6 +7012,15 @@ ospf_vty_dead_interval_set (struct vty *vty, const char *interval_str, } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "ip ospf dead-interval <1-65535>", + * "IP Information\n" + * "OSPF interface commands\n" + * "Interval after which a neighbor is declared dead\n" + * "Seconds\n" + * + */ DEFUN (ip_ospf_dead_interval, ip_ospf_dead_interval_addr_cmd, "ip ospf dead-interval <1-65535> A.B.C.D", @@ -6997,13 +7036,6 @@ DEFUN (ip_ospf_dead_interval, return ospf_vty_dead_interval_set (vty, argv[3]->arg, NULL, NULL); } -ALIAS (ip_ospf_dead_interval, - ip_ospf_dead_interval_cmd, - "ip ospf dead-interval <1-65535>", - "IP Information\n" - "OSPF interface commands\n" - "Interval after which a neighbor is declared dead\n" - "Seconds\n") ALIAS_HIDDEN (ip_ospf_dead_interval, ospf_dead_interval_cmd, @@ -7012,6 +7044,17 @@ ALIAS_HIDDEN (ip_ospf_dead_interval, "Interval after which a neighbor is declared dead\n" "Seconds\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "ip ospf dead-interval minimal hello-multiplier <1-10>", + * "IP Information\n" + * "OSPF interface commands\n" + * "Interval after which a neighbor is declared dead\n" + * "Minimal 1s dead-interval with fast sub-second hellos\n" + * "Hello multiplier factor\n" + * "Number of Hellos to send each second\n" + * + */ DEFUN (ip_ospf_dead_interval_minimal, ip_ospf_dead_interval_minimal_addr_cmd, "ip ospf dead-interval minimal hello-multiplier <1-10> A.B.C.D", @@ -7029,16 +7072,47 @@ DEFUN (ip_ospf_dead_interval_minimal, return ospf_vty_dead_interval_set (vty, NULL, NULL, argv[5]->arg); } -ALIAS (ip_ospf_dead_interval_minimal, - ip_ospf_dead_interval_minimal_cmd, - "ip ospf dead-interval minimal hello-multiplier <1-10>", - "IP Information\n" - "OSPF interface commands\n" - "Interval after which a neighbor is declared dead\n" - "Minimal 1s dead-interval with fast sub-second hellos\n" - "Hello multiplier factor\n" - "Number of Hellos to send each second\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ospf dead-interval", + * NO_STR + * "OSPF interface commands\n" + * "Interval after which a neighbor is declared dead\n" + * + * "no ip ospf dead-interval minimal hello-multiplier <1-10>", + * NO_STR + * "IP Information\n" + * "OSPF interface commands\n" + * "Interval after which a neighbor is declared dead\n" + * "Minimal 1s dead-interval with fast sub-second hellos\n" + * "Hello multiplier factor\n" + * "Number of Hellos to send each second\n" + * + * "no ip ospf dead-interval <1-65535>", + * NO_STR + * "IP Information\n" + * "OSPF interface commands\n" + * "Interval after which a neighbor is declared dead\n" + * "Seconds\n" + * + * "no ip ospf dead-interval", + * NO_STR + * "IP Information\n" + * "OSPF interface commands\n" + * "Interval after which a neighbor is declared dead\n" + * + * "no ip ospf dead-interval minimal hello-multiplier <1-10> A.B.C.D", + * NO_STR + * "IP Information\n" + * "OSPF interface commands\n" + * "Interval after which a neighbor is declared dead\n" + * "Minimal 1s dead-interval with fast sub-second hellos\n" + * "Hello multiplier factor\n" + * "Number of Hellos to send each second\n" + * "Address of interface\n" + * + */ DEFUN (no_ip_ospf_dead_interval, no_ip_ospf_dead_interval_addr_cmd, "no ip ospf dead-interval <1-65535> A.B.C.D", @@ -7108,53 +7182,20 @@ DEFUN (no_ip_ospf_dead_interval, return CMD_SUCCESS; } -ALIAS (no_ip_ospf_dead_interval, - no_ip_ospf_dead_interval_seconds_cmd, - "no ip ospf dead-interval <1-65535>", - NO_STR - "IP Information\n" - "OSPF interface commands\n" - "Interval after which a neighbor is declared dead\n" - "Seconds\n") -ALIAS (no_ip_ospf_dead_interval, - no_ip_ospf_dead_interval_cmd, - "no ip ospf dead-interval", - NO_STR - "IP Information\n" - "OSPF interface commands\n" - "Interval after which a neighbor is declared dead\n") -ALIAS (no_ip_ospf_dead_interval, - no_ospf_dead_interval_cmd, - "no ospf dead-interval", - NO_STR - "OSPF interface commands\n" - "Interval after which a neighbor is declared dead\n") -ALIAS (no_ip_ospf_dead_interval, - no_ip_ospf_dead_interval_minimal_addr_cmd, - "no ip ospf dead-interval minimal hello-multiplier <1-10> A.B.C.D", - NO_STR - "IP Information\n" - "OSPF interface commands\n" - "Interval after which a neighbor is declared dead\n" - "Minimal 1s dead-interval with fast sub-second hellos\n" - "Hello multiplier factor\n" - "Number of Hellos to send each second\n" - "Address of interface\n") -ALIAS (no_ip_ospf_dead_interval, - no_ip_ospf_dead_interval_minimal_cmd, - "no ip ospf dead-interval minimal hello-multiplier <1-10>", - NO_STR - "IP Information\n" - "OSPF interface commands\n" - "Interval after which a neighbor is declared dead\n" - "Minimal 1s dead-interval with fast sub-second hellos\n" - "Hello multiplier factor\n" - "Number of Hellos to send each second\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "ip ospf hello-interval <1-65535>", + * "IP Information\n" + * "OSPF interface commands\n" + * "Time between HELLO packets\n" + * "Seconds\n" + * + */ DEFUN (ip_ospf_hello_interval, ip_ospf_hello_interval_addr_cmd, "ip ospf hello-interval <1-65535> A.B.C.D", @@ -7201,13 +7242,6 @@ DEFUN (ip_ospf_hello_interval, return CMD_SUCCESS; } -ALIAS (ip_ospf_hello_interval, - ip_ospf_hello_interval_cmd, - "ip ospf hello-interval <1-65535>", - "IP Information\n" - "OSPF interface commands\n" - "Time between HELLO packets\n" - "Seconds\n") ALIAS_HIDDEN (ip_ospf_hello_interval, ospf_hello_interval_cmd, @@ -7216,6 +7250,28 @@ ALIAS_HIDDEN (ip_ospf_hello_interval, "Time between HELLO packets\n" "Seconds\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ip ospf hello-interval <1-65535>", + * NO_STR + * "IP Information\n" + * "OSPF interface commands\n" + * "Time between HELLO packets\n" + * "Seconds\n" + * + * "no ip ospf hello-interval", + * NO_STR + * "IP Information\n" + * "OSPF interface commands\n" + * "Time between HELLO packets\n" + * + * "no ospf hello-interval <1-65535>", + * NO_STR + * "OSPF interface commands\n" + * "Time between HELLO packets\n" + * "Seconds\n" + * + */ DEFUN (no_ip_ospf_hello_interval, no_ip_ospf_hello_interval_addr_cmd, "no ip ospf hello-interval <1-65535> A.B.C.D", @@ -7261,30 +7317,8 @@ DEFUN (no_ip_ospf_hello_interval, return CMD_SUCCESS; } -ALIAS (no_ip_ospf_hello_interval, - no_ip_ospf_hello_interval_seconds_cmd, - "no ip ospf hello-interval <1-65535>", - NO_STR - "IP Information\n" - "OSPF interface commands\n" - "Time between HELLO packets\n" - "Seconds\n") -ALIAS (no_ip_ospf_hello_interval, - no_ip_ospf_hello_interval_cmd, - "no ip ospf hello-interval", - NO_STR - "IP Information\n" - "OSPF interface commands\n" - "Time between HELLO packets\n") -ALIAS (no_ip_ospf_hello_interval, - no_ospf_hello_interval_cmd, - "no ospf hello-interval <1-65535>", - NO_STR - "OSPF interface commands\n" - "Time between HELLO packets\n" - "Seconds\n") DEFUN (ip_ospf_network, ip_ospf_network_cmd, @@ -7350,6 +7384,33 @@ ALIAS_HIDDEN (ip_ospf_network, "Specify OSPF point-to-multipoint network\n" "Specify OSPF point-to-point network\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ospf network (broadcast|non-broadcast|point-to-multipoint|point-to-point)", + * NO_STR + * "OSPF interface commands\n" + * "Network type\n" + * "Specify OSPF broadcast multi-access network\n" + * "Specify OSPF NBMA network\n" + * "Specify OSPF point-to-multipoint network\n" + * "Specify OSPF point-to-point network\n" + * + * "no ospf network", + * NO_STR + * "OSPF interface commands\n" + * "Network type\n" + * + * "no ip ospf network (broadcast|non-broadcast|point-to-multipoint|point-to-point)", + * NO_STR + * "IP Information\n" + * "OSPF interface commands\n" + * "Network type\n" + * "Specify OSPF broadcast multi-access network\n" + * "Specify OSPF NBMA network\n" + * "Specify OSPF point-to-multipoint network\n" + * "Specify OSPF point-to-point network\n" + * + */ DEFUN (no_ip_ospf_network, no_ip_ospf_network_cmd, "no ip ospf network", @@ -7386,36 +7447,18 @@ DEFUN (no_ip_ospf_network, return CMD_SUCCESS; } -ALIAS (no_ip_ospf_network, - no_ip_ospf_network_val_cmd, - "no ip ospf network (broadcast|non-broadcast|point-to-multipoint|point-to-point)", - NO_STR - "IP Information\n" - "OSPF interface commands\n" - "Network type\n" - "Specify OSPF broadcast multi-access network\n" - "Specify OSPF NBMA network\n" - "Specify OSPF point-to-multipoint network\n" - "Specify OSPF point-to-point network\n") -ALIAS (no_ip_ospf_network, - no_ospf_network_cmd, - "no ospf network", - NO_STR - "OSPF interface commands\n" - "Network type\n") -ALIAS (no_ip_ospf_network, - no_ospf_network_val_cmd, - "no ospf network (broadcast|non-broadcast|point-to-multipoint|point-to-point)", - NO_STR - "OSPF interface commands\n" - "Network type\n" - "Specify OSPF broadcast multi-access network\n" - "Specify OSPF NBMA network\n" - "Specify OSPF point-to-multipoint network\n" - "Specify OSPF point-to-point network\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "ip ospf priority <0-255>", + * "IP Information\n" + * "OSPF interface commands\n" + * "Router priority\n" + * "Priority\n" + * + */ DEFUN (ip_ospf_priority, ip_ospf_priority_addr_cmd, "ip ospf priority <0-255> A.B.C.D", @@ -7478,13 +7521,6 @@ DEFUN (ip_ospf_priority, return CMD_SUCCESS; } -ALIAS (ip_ospf_priority, - ip_ospf_priority_cmd, - "ip ospf priority <0-255>", - "IP Information\n" - "OSPF interface commands\n" - "Router priority\n" - "Priority\n") ALIAS_HIDDEN (ip_ospf_priority, ospf_priority_cmd, @@ -7493,6 +7529,28 @@ ALIAS_HIDDEN (ip_ospf_priority, "Router priority\n" "Priority\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ip ospf priority", + * NO_STR + * "IP Information\n" + * "OSPF interface commands\n" + * "Router priority\n" + * + * "no ip ospf priority <0-255>", + * NO_STR + * "IP Information\n" + * "OSPF interface commands\n" + * "Router priority\n" + * "Priority\n" + * + * "no ospf priority <0-255>", + * NO_STR + * "OSPF interface commands\n" + * "Router priority\n" + * "Priority\n" + * + */ DEFUN (no_ip_ospf_priority, no_ip_ospf_priority_addr_cmd, "no ip ospf priority <0-255> A.B.C.D", @@ -7554,32 +7612,19 @@ DEFUN (no_ip_ospf_priority, return CMD_SUCCESS; } -ALIAS (no_ip_ospf_priority, - no_ip_ospf_priority_no_param_cmd, - "no ip ospf priority", - NO_STR - "IP Information\n" - "OSPF interface commands\n" - "Router priority\n"); -ALIAS (no_ip_ospf_priority, - no_ip_ospf_priority_cmd, - "no ip ospf priority <0-255>", - NO_STR - "IP Information\n" - "OSPF interface commands\n" - "Router priority\n" - "Priority\n") -ALIAS (no_ip_ospf_priority, - no_ospf_priority_cmd, - "no ospf priority <0-255>", - NO_STR - "OSPF interface commands\n" - "Router priority\n" - "Priority\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "ip ospf retransmit-interval <3-65535>", + * "IP Information\n" + * "OSPF interface commands\n" + * "Time between retransmitting lost link state advertisements\n" + * "Seconds\n" + * + */ DEFUN (ip_ospf_retransmit_interval, ip_ospf_retransmit_interval_addr_cmd, "ip ospf retransmit-interval <3-65535> A.B.C.D", @@ -7626,13 +7671,6 @@ DEFUN (ip_ospf_retransmit_interval, return CMD_SUCCESS; } -ALIAS (ip_ospf_retransmit_interval, - ip_ospf_retransmit_interval_cmd, - "ip ospf retransmit-interval <3-65535>", - "IP Information\n" - "OSPF interface commands\n" - "Time between retransmitting lost link state advertisements\n" - "Seconds\n") ALIAS_HIDDEN (ip_ospf_retransmit_interval, ospf_retransmit_interval_cmd, @@ -7641,6 +7679,28 @@ ALIAS_HIDDEN (ip_ospf_retransmit_interval, "Time between retransmitting lost link state advertisements\n" "Seconds\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ip ospf retransmit-interval <3-65535> A.B.C.D", + * NO_STR + * "IP Information\n" + * "OSPF interface commands\n" + * "Time between retransmitting lost link state advertisements\n" + * "Seconds\n" + * "Address of interface" + * + * "no ip ospf retransmit-interval", + * NO_STR + * "IP Information\n" + * "OSPF interface commands\n" + * "Time between retransmitting lost link state advertisements\n" + * + * "no ospf retransmit-interval", + * NO_STR + * "OSPF interface commands\n" + * "Time between retransmitting lost link state advertisements\n" + * + */ DEFUN (no_ip_ospf_retransmit_interval, no_ip_ospf_retransmit_interval_addr_cmd, "no ip ospf retransmit-interval A.B.C.D", @@ -7691,30 +7751,8 @@ DEFUN (no_ip_ospf_retransmit_interval, return CMD_SUCCESS; } -ALIAS (no_ip_ospf_retransmit_interval, - no_ip_ospf_retransmit_interval_sec_addr_cmd, - "no ip ospf retransmit-interval <3-65535> A.B.C.D", - NO_STR - "IP Information\n" - "OSPF interface commands\n" - "Time between retransmitting lost link state advertisements\n" - "Seconds\n" - "Address of interface") -ALIAS (no_ip_ospf_retransmit_interval, - no_ip_ospf_retransmit_interval_cmd, - "no ip ospf retransmit-interval", - NO_STR - "IP Information\n" - "OSPF interface commands\n" - "Time between retransmitting lost link state advertisements\n") -ALIAS (no_ip_ospf_retransmit_interval, - no_ospf_retransmit_interval_cmd, - "no ospf retransmit-interval", - NO_STR - "OSPF interface commands\n" - "Time between retransmitting lost link state advertisements\n") DEFUN (no_ip_ospf_retransmit_interval_sec, no_ip_ospf_retransmit_interval_sec_cmd, @@ -7738,6 +7776,15 @@ DEFUN (no_ip_ospf_retransmit_interval_sec, } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "ip ospf transmit-delay <1-65535>", + * "IP Information\n" + * "OSPF interface commands\n" + * "Link state transmit delay\n" + * "Seconds\n" + * + */ DEFUN (ip_ospf_transmit_delay, ip_ospf_transmit_delay_addr_cmd, "ip ospf transmit-delay <1-65535> A.B.C.D", @@ -7783,13 +7830,6 @@ DEFUN (ip_ospf_transmit_delay, return CMD_SUCCESS; } -ALIAS (ip_ospf_transmit_delay, - ip_ospf_transmit_delay_cmd, - "ip ospf transmit-delay <1-65535>", - "IP Information\n" - "OSPF interface commands\n" - "Link state transmit delay\n" - "Seconds\n") ALIAS_HIDDEN (ip_ospf_transmit_delay, ospf_transmit_delay_cmd, @@ -7798,6 +7838,28 @@ ALIAS_HIDDEN (ip_ospf_transmit_delay, "Link state transmit delay\n" "Seconds\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ospf transmit-delay", + * NO_STR + * "OSPF interface commands\n" + * "Link state transmit delay\n" + * + * "no ip ospf transmit-delay", + * NO_STR + * "IP Information\n" + * "OSPF interface commands\n" + * "Link state transmit delay\n" + * + * "no ip ospf transmit-delay <1-65535> A.B.C.D", + * NO_STR + * "IP Information\n" + * "OSPF interface commands\n" + * "Link state transmit delay\n" + * "Seconds\n" + * "Address of interface" + * + */ DEFUN (no_ip_ospf_transmit_delay, no_ip_ospf_transmit_delay_addr_cmd, "no ip ospf transmit-delay A.B.C.D", @@ -7848,30 +7910,8 @@ DEFUN (no_ip_ospf_transmit_delay, return CMD_SUCCESS; } -ALIAS (no_ip_ospf_transmit_delay, - no_ip_ospf_transmit_delay_sec_addr_cmd, - "no ip ospf transmit-delay <1-65535> A.B.C.D", - NO_STR - "IP Information\n" - "OSPF interface commands\n" - "Link state transmit delay\n" - "Seconds\n" - "Address of interface") -ALIAS (no_ip_ospf_transmit_delay, - no_ip_ospf_transmit_delay_cmd, - "no ip ospf transmit-delay", - NO_STR - "IP Information\n" - "OSPF interface commands\n" - "Link state transmit delay\n") -ALIAS (no_ip_ospf_transmit_delay, - no_ospf_transmit_delay_cmd, - "no ospf transmit-delay", - NO_STR - "OSPF interface commands\n" - "Link state transmit delay\n") DEFUN (no_ip_ospf_transmit_delay_sec, no_ip_ospf_transmit_delay_sec_cmd, @@ -7895,6 +7935,17 @@ DEFUN (no_ip_ospf_transmit_delay_sec, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "ip ospf <1-65535> area (A.B.C.D|<0-4294967295>)", + * "IP Information\n" + * "OSPF interface commands\n" + * "Instance ID\n" + * "Enable OSPF on this interface\n" + * "OSPF area ID in IP address format\n" + * "OSPF area ID as a decimal value\n" + * + */ DEFUN (ip_ospf_area, ip_ospf_area_cmd, "ip ospf area (A.B.C.D|<0-4294967295>)", @@ -7966,16 +8017,18 @@ DEFUN (ip_ospf_area, return CMD_SUCCESS; } -ALIAS (ip_ospf_area, - ip_ospf_instance_area_cmd, - "ip ospf <1-65535> area (A.B.C.D|<0-4294967295>)", - "IP Information\n" - "OSPF interface commands\n" - "Instance ID\n" - "Enable OSPF on this interface\n" - "OSPF area ID in IP address format\n" - "OSPF area ID as a decimal value\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ip ospf area (A.B.C.D|<0-4294967295>)", + * NO_STR + * "IP Information\n" + * "OSPF interface commands\n" + * "Disable OSPF on this interface\n" + * "OSPF area ID in IP address format\n" + * "OSPF area ID as a decimal value\n" + * + */ DEFUN (no_ip_ospf_area, no_ip_ospf_area_cmd, "no ip ospf area", @@ -8004,16 +8057,19 @@ DEFUN (no_ip_ospf_area, return CMD_SUCCESS; } -ALIAS (no_ip_ospf_area, - no_ip_ospf_area_val_cmd, - "no ip ospf area (A.B.C.D|<0-4294967295>)", - NO_STR - "IP Information\n" - "OSPF interface commands\n" - "Disable OSPF on this interface\n" - "OSPF area ID in IP address format\n" - "OSPF area ID as a decimal value\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ip ospf <1-65535> area (A.B.C.D|<0-4294967295>)", + * NO_STR + * "IP Information\n" + * "OSPF interface commands\n" + * "Instance ID\n" + * "Disable OSPF on this interface\n" + * "OSPF area ID in IP address format\n" + * "OSPF area ID as a decimal value\n" + * + */ DEFUN (no_ip_ospf_instance_area, no_ip_ospf_instance_area_cmd, "no ip ospf <1-65535> area", @@ -8045,16 +8101,6 @@ DEFUN (no_ip_ospf_instance_area, return CMD_SUCCESS; } -ALIAS (no_ip_ospf_instance_area, - no_ip_ospf_instance_area_val_cmd, - "no ip ospf <1-65535> area (A.B.C.D|<0-4294967295>)", - NO_STR - "IP Information\n" - "OSPF interface commands\n" - "Instance ID\n" - "Disable OSPF on this interface\n" - "OSPF area ID in IP address format\n" - "OSPF area ID as a decimal value\n") DEFUN (ospf_redistribute_source, ospf_redistribute_source_cmd, @@ -8421,6 +8467,14 @@ DEFUN (ospf_default_metric, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no default-metric <0-16777214>", + * NO_STR + * "Set metric of redistributed routes\n" + * "Default metric\n" + * + */ DEFUN (no_ospf_default_metric, no_ospf_default_metric_cmd, "no default-metric", @@ -8437,12 +8491,6 @@ DEFUN (no_ospf_default_metric, return CMD_SUCCESS; } -ALIAS (no_ospf_default_metric, - no_ospf_default_metric_val_cmd, - "no default-metric <0-16777214>", - NO_STR - "Set metric of redistributed routes\n" - "Default metric\n") DEFUN (ospf_distance, ospf_distance_cmd, @@ -8632,6 +8680,14 @@ DEFUN (no_ospf_distance_source_access_list, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "ip ospf mtu-ignore", + * "IP Information\n" + * "OSPF interface commands\n" + * "Disable mtu mismatch detection\n" + * + */ DEFUN (ip_ospf_mtu_ignore, ip_ospf_mtu_ignore_addr_cmd, "ip ospf mtu-ignore A.B.C.D", @@ -8674,14 +8730,16 @@ DEFUN (ip_ospf_mtu_ignore, return CMD_SUCCESS; } -ALIAS (ip_ospf_mtu_ignore, - ip_ospf_mtu_ignore_cmd, - "ip ospf mtu-ignore", - "IP Information\n" - "OSPF interface commands\n" - "Disable mtu mismatch detection\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ip ospf mtu-ignore", + * "IP Information\n" + * "OSPF interface commands\n" + * "Disable mtu mismatch detection\n" + * + */ DEFUN (no_ip_ospf_mtu_ignore, no_ip_ospf_mtu_ignore_addr_cmd, "no ip ospf mtu-ignore A.B.C.D", @@ -8724,12 +8782,6 @@ DEFUN (no_ip_ospf_mtu_ignore, return CMD_SUCCESS; } -ALIAS (no_ip_ospf_mtu_ignore, - no_ip_ospf_mtu_ignore_cmd, - "no ip ospf mtu-ignore", - "IP Information\n" - "OSPF interface commands\n" - "Disable mtu mismatch detection\n") DEFUN (ospf_max_metric_router_lsa_admin, ospf_max_metric_router_lsa_admin_cmd, @@ -8817,6 +8869,15 @@ DEFUN (ospf_max_metric_router_lsa_startup, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no max-metric router-lsa on-startup", + * NO_STR + * "OSPF maximum / infinite-distance metric\n" + * "Advertise own Router-LSA with infinite distance (stub router)\n" + * "Automatically advertise stub Router-LSA on startup of OSPF\n" + * + */ DEFUN (no_ospf_max_metric_router_lsa_startup, no_ospf_max_metric_router_lsa_startup_cmd, "no max-metric router-lsa on-startup <5-86400>", @@ -8850,13 +8911,6 @@ DEFUN (no_ospf_max_metric_router_lsa_startup, return CMD_SUCCESS; } -ALIAS (no_ospf_max_metric_router_lsa_startup, - no_ospf_max_metric_router_lsa_startup_no_param_cmd, - "no max-metric router-lsa on-startup", - NO_STR - "OSPF maximum / infinite-distance metric\n" - "Advertise own Router-LSA with infinite distance (stub router)\n" - "Automatically advertise stub Router-LSA on startup of OSPF\n"); DEFUN (ospf_max_metric_router_lsa_shutdown, ospf_max_metric_router_lsa_shutdown_cmd, @@ -8885,6 +8939,18 @@ DEFUN (ospf_max_metric_router_lsa_shutdown, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no max-metric router-lsa on-shutdown", + * NO_STR + * "OSPF maximum / infinite-distance metric\n" + * "Advertise own Router-LSA with infinite distance (stub router)\n" + * "Advertise stub-router prior to full shutdown of OSPF\n"); + * + * static void + * config_write_stub_router (struct vty *vty, struct ospf *ospf + * + */ DEFUN (no_ospf_max_metric_router_lsa_shutdown, no_ospf_max_metric_router_lsa_shutdown_cmd, "no max-metric router-lsa on-shutdown <5-100>", @@ -8904,16 +8970,6 @@ DEFUN (no_ospf_max_metric_router_lsa_shutdown, return CMD_SUCCESS; } -ALIAS (no_ospf_max_metric_router_lsa_shutdown, - no_ospf_max_metric_router_lsa_shutdown_no_param_cmd, - "no max-metric router-lsa on-shutdown", - NO_STR - "OSPF maximum / infinite-distance metric\n" - "Advertise own Router-LSA with infinite distance (stub router)\n" - "Advertise stub-router prior to full shutdown of OSPF\n"); - -static void -config_write_stub_router (struct vty *vty, struct ospf *ospf) { struct listnode *ln; struct ospf_area *area; @@ -9977,34 +10033,14 @@ ospf_vty_show_init (void) install_element (ENABLE_NODE, &show_ip_ospf_instance_cmd); /* "show ip ospf database" commands. */ - install_element (VIEW_NODE, &show_ip_ospf_database_type_cmd); - install_element (VIEW_NODE, &show_ip_ospf_database_type_id_cmd); - install_element (VIEW_NODE, &show_ip_ospf_database_type_id_adv_router_cmd); install_element (VIEW_NODE, &show_ip_ospf_database_type_adv_router_cmd); - install_element (VIEW_NODE, &show_ip_ospf_database_type_id_self_cmd); - install_element (VIEW_NODE, &show_ip_ospf_database_type_self_cmd); install_element (VIEW_NODE, &show_ip_ospf_database_cmd); - install_element (ENABLE_NODE, &show_ip_ospf_database_type_cmd); - install_element (ENABLE_NODE, &show_ip_ospf_database_type_id_cmd); - install_element (ENABLE_NODE, &show_ip_ospf_database_type_id_adv_router_cmd); install_element (ENABLE_NODE, &show_ip_ospf_database_type_adv_router_cmd); - install_element (ENABLE_NODE, &show_ip_ospf_database_type_id_self_cmd); - install_element (ENABLE_NODE, &show_ip_ospf_database_type_self_cmd); install_element (ENABLE_NODE, &show_ip_ospf_database_cmd); - install_element (VIEW_NODE, &show_ip_ospf_instance_database_type_cmd); - install_element (VIEW_NODE, &show_ip_ospf_instance_database_type_id_cmd); - install_element (VIEW_NODE, &show_ip_ospf_instance_database_type_id_adv_router_cmd); install_element (VIEW_NODE, &show_ip_ospf_instance_database_type_adv_router_cmd); - install_element (VIEW_NODE, &show_ip_ospf_instance_database_type_id_self_cmd); - install_element (VIEW_NODE, &show_ip_ospf_instance_database_type_self_cmd); install_element (VIEW_NODE, &show_ip_ospf_instance_database_cmd); - install_element (ENABLE_NODE, &show_ip_ospf_instance_database_type_cmd); - install_element (ENABLE_NODE, &show_ip_ospf_instance_database_type_id_cmd); - install_element (ENABLE_NODE, &show_ip_ospf_instance_database_type_id_adv_router_cmd); install_element (ENABLE_NODE, &show_ip_ospf_instance_database_type_adv_router_cmd); - install_element (ENABLE_NODE, &show_ip_ospf_instance_database_type_id_self_cmd); - install_element (ENABLE_NODE, &show_ip_ospf_instance_database_type_self_cmd); install_element (ENABLE_NODE, &show_ip_ospf_instance_database_cmd); /* "show ip ospf interface" commands. */ @@ -10083,121 +10119,69 @@ ospf_vty_if_init (void) /* "ip ospf authentication" commands. */ install_element (INTERFACE_NODE, &ip_ospf_authentication_args_addr_cmd); - install_element (INTERFACE_NODE, &ip_ospf_authentication_args_cmd); install_element (INTERFACE_NODE, &ip_ospf_authentication_addr_cmd); - install_element (INTERFACE_NODE, &ip_ospf_authentication_cmd); install_element (INTERFACE_NODE, &no_ip_ospf_authentication_args_addr_cmd); - install_element (INTERFACE_NODE, &no_ip_ospf_authentication_args_cmd); install_element (INTERFACE_NODE, &no_ip_ospf_authentication_addr_cmd); - install_element (INTERFACE_NODE, &no_ip_ospf_authentication_cmd); install_element (INTERFACE_NODE, &ip_ospf_authentication_key_addr_cmd); - install_element (INTERFACE_NODE, &ip_ospf_authentication_key_cmd); install_element (INTERFACE_NODE, &no_ip_ospf_authentication_key_authkey_addr_cmd); - install_element (INTERFACE_NODE, &no_ip_ospf_authentication_key_authkey_cmd); - install_element (INTERFACE_NODE, &no_ip_ospf_authentication_key_cmd); /* "ip ospf message-digest-key" commands. */ install_element (INTERFACE_NODE, &ip_ospf_message_digest_key_addr_cmd); - install_element (INTERFACE_NODE, &ip_ospf_message_digest_key_cmd); install_element (INTERFACE_NODE, &no_ip_ospf_message_digest_key_addr_cmd); - install_element (INTERFACE_NODE, &no_ip_ospf_message_digest_key_cmd); install_element (INTERFACE_NODE, &no_ip_ospf_message_digest_key_md5_addr_cmd); - install_element (INTERFACE_NODE, &no_ip_ospf_message_digest_key_md5_cmd); /* "ip ospf cost" commands. */ install_element (INTERFACE_NODE, &ip_ospf_cost_u32_inet4_cmd); - install_element (INTERFACE_NODE, &ip_ospf_cost_u32_cmd); install_element (INTERFACE_NODE, &no_ip_ospf_cost_u32_cmd); - install_element (INTERFACE_NODE, &no_ip_ospf_cost_u32_inet4_cmd); install_element (INTERFACE_NODE, &no_ip_ospf_cost_inet4_cmd); - install_element (INTERFACE_NODE, &no_ip_ospf_cost_cmd); /* "ip ospf mtu-ignore" commands. */ install_element (INTERFACE_NODE, &ip_ospf_mtu_ignore_addr_cmd); - install_element (INTERFACE_NODE, &ip_ospf_mtu_ignore_cmd); install_element (INTERFACE_NODE, &no_ip_ospf_mtu_ignore_addr_cmd); - install_element (INTERFACE_NODE, &no_ip_ospf_mtu_ignore_cmd); /* "ip ospf dead-interval" commands. */ install_element (INTERFACE_NODE, &ip_ospf_dead_interval_addr_cmd); - install_element (INTERFACE_NODE, &ip_ospf_dead_interval_cmd); install_element (INTERFACE_NODE, &ip_ospf_dead_interval_minimal_addr_cmd); - install_element (INTERFACE_NODE, &ip_ospf_dead_interval_minimal_cmd); install_element (INTERFACE_NODE, &no_ip_ospf_dead_interval_addr_cmd); - install_element (INTERFACE_NODE, &no_ip_ospf_dead_interval_cmd); - install_element (INTERFACE_NODE, &no_ip_ospf_dead_interval_seconds_cmd); /* "ip ospf hello-interval" commands. */ install_element (INTERFACE_NODE, &ip_ospf_hello_interval_addr_cmd); - install_element (INTERFACE_NODE, &ip_ospf_hello_interval_cmd); install_element (INTERFACE_NODE, &no_ip_ospf_hello_interval_addr_cmd); - install_element (INTERFACE_NODE, &no_ip_ospf_hello_interval_cmd); - install_element (INTERFACE_NODE, &no_ip_ospf_hello_interval_seconds_cmd); /* "ip ospf network" commands. */ install_element (INTERFACE_NODE, &ip_ospf_network_cmd); install_element (INTERFACE_NODE, &no_ip_ospf_network_cmd); - install_element (INTERFACE_NODE, &no_ip_ospf_network_val_cmd); /* "ip ospf priority" commands. */ install_element (INTERFACE_NODE, &ip_ospf_priority_addr_cmd); - install_element (INTERFACE_NODE, &ip_ospf_priority_cmd); - install_element (INTERFACE_NODE, &no_ip_ospf_priority_cmd); - install_element (INTERFACE_NODE, &no_ip_ospf_priority_no_param_cmd); install_element (INTERFACE_NODE, &no_ip_ospf_priority_addr_cmd); /* "ip ospf retransmit-interval" commands. */ install_element (INTERFACE_NODE, &ip_ospf_retransmit_interval_addr_cmd); - install_element (INTERFACE_NODE, &ip_ospf_retransmit_interval_cmd); install_element (INTERFACE_NODE, &no_ip_ospf_retransmit_interval_addr_cmd); - install_element (INTERFACE_NODE, &no_ip_ospf_retransmit_interval_cmd); - install_element (INTERFACE_NODE, &no_ip_ospf_retransmit_interval_sec_addr_cmd); install_element (INTERFACE_NODE, &no_ip_ospf_retransmit_interval_sec_cmd); /* "ip ospf transmit-delay" commands. */ install_element (INTERFACE_NODE, &ip_ospf_transmit_delay_addr_cmd); - install_element (INTERFACE_NODE, &ip_ospf_transmit_delay_cmd); install_element (INTERFACE_NODE, &no_ip_ospf_transmit_delay_addr_cmd); - install_element (INTERFACE_NODE, &no_ip_ospf_transmit_delay_cmd); - install_element (INTERFACE_NODE, &no_ip_ospf_transmit_delay_sec_addr_cmd); install_element (INTERFACE_NODE, &no_ip_ospf_transmit_delay_sec_cmd); /* "ip ospf area" commands. */ install_element (INTERFACE_NODE, &ip_ospf_area_cmd); install_element (INTERFACE_NODE, &no_ip_ospf_area_cmd); - install_element (INTERFACE_NODE, &no_ip_ospf_area_val_cmd); - install_element (INTERFACE_NODE, &ip_ospf_instance_area_cmd); install_element (INTERFACE_NODE, &no_ip_ospf_instance_area_cmd); - install_element (INTERFACE_NODE, &no_ip_ospf_instance_area_val_cmd); /* These commands are compatibitliy for previous version. */ install_element (INTERFACE_NODE, &ospf_authentication_key_cmd); - install_element (INTERFACE_NODE, &no_ospf_authentication_key_cmd); - install_element (INTERFACE_NODE, &no_ospf_authentication_key_authkey_cmd); - install_element (INTERFACE_NODE, &no_ospf_authentication_key_authkey_ip_cmd); install_element (INTERFACE_NODE, &ospf_message_digest_key_cmd); - install_element (INTERFACE_NODE, &no_ospf_message_digest_key_cmd); install_element (INTERFACE_NODE, &ospf_cost_u32_cmd); install_element (INTERFACE_NODE, &ospf_cost_u32_inet4_cmd); - install_element (INTERFACE_NODE, &no_ospf_cost_cmd); - install_element (INTERFACE_NODE, &no_ospf_cost_u32_cmd); - install_element (INTERFACE_NODE, &no_ospf_cost_u32_inet4_cmd); - install_element (INTERFACE_NODE, &no_ospf_cost_inet4_cmd); install_element (INTERFACE_NODE, &ospf_dead_interval_cmd); - install_element (INTERFACE_NODE, &no_ospf_dead_interval_cmd); - install_element (INTERFACE_NODE, &no_ip_ospf_dead_interval_minimal_addr_cmd); - install_element (INTERFACE_NODE, &no_ip_ospf_dead_interval_minimal_cmd); install_element (INTERFACE_NODE, &ospf_hello_interval_cmd); - install_element (INTERFACE_NODE, &no_ospf_hello_interval_cmd); install_element (INTERFACE_NODE, &ospf_network_cmd); - install_element (INTERFACE_NODE, &no_ospf_network_cmd); - install_element (INTERFACE_NODE, &no_ospf_network_val_cmd); install_element (INTERFACE_NODE, &ospf_priority_cmd); - install_element (INTERFACE_NODE, &no_ospf_priority_cmd); install_element (INTERFACE_NODE, &ospf_retransmit_interval_cmd); - install_element (INTERFACE_NODE, &no_ospf_retransmit_interval_cmd); install_element (INTERFACE_NODE, &ospf_transmit_delay_cmd); - install_element (INTERFACE_NODE, &no_ospf_transmit_delay_cmd); } static void @@ -10216,7 +10200,6 @@ ospf_vty_zebra_init (void) install_element (OSPF_NODE, &ospf_default_metric_cmd); install_element (OSPF_NODE, &no_ospf_default_metric_cmd); - install_element (OSPF_NODE, &no_ospf_default_metric_val_cmd); install_element (OSPF_NODE, &ospf_distance_cmd); install_element (OSPF_NODE, &no_ospf_distance_cmd); @@ -10294,8 +10277,6 @@ ospf_vty_init (void) install_element (CONFIG_NODE, &router_ospf_cmd); install_element (CONFIG_NODE, &no_router_ospf_cmd); - install_element (CONFIG_NODE, &router_ospf_instance_cmd); - install_element (CONFIG_NODE, &no_router_ospf_instance_cmd); install_default (OSPF_NODE); @@ -10303,15 +10284,10 @@ ospf_vty_init (void) install_element (OSPF_NODE, &ospf_router_id_cmd); install_element (OSPF_NODE, &ospf_router_id_old_cmd); install_element (OSPF_NODE, &no_ospf_router_id_cmd); - install_element (OSPF_NODE, &no_ospf_router_id_val_cmd); /* "passive-interface" commands. */ install_element (OSPF_NODE, &ospf_passive_interface_addr_cmd); - install_element (OSPF_NODE, &ospf_passive_interface_cmd); - install_element (OSPF_NODE, &ospf_passive_interface_default_cmd); install_element (OSPF_NODE, &no_ospf_passive_interface_addr_cmd); - install_element (OSPF_NODE, &no_ospf_passive_interface_cmd); - install_element (OSPF_NODE, &no_ospf_passive_interface_default_cmd); /* "ospf abr-type" commands. */ install_element (OSPF_NODE, &ospf_abr_type_cmd); @@ -10324,8 +10300,6 @@ ospf_vty_init (void) install_element (OSPF_NODE, &no_ospf_log_adjacency_changes_detail_cmd); /* "ospf rfc1583-compatible" commands. */ - install_element (OSPF_NODE, &ospf_rfc1583_flag_cmd); - install_element (OSPF_NODE, &no_ospf_rfc1583_flag_cmd); install_element (OSPF_NODE, &ospf_compatible_rfc1583_cmd); install_element (OSPF_NODE, &no_ospf_compatible_rfc1583_cmd); @@ -10340,14 +10314,8 @@ ospf_vty_init (void) /* "area range" commands. */ install_element (OSPF_NODE, &ospf_area_range_cmd); - install_element (OSPF_NODE, &ospf_area_range_advertise_cmd); - install_element (OSPF_NODE, &ospf_area_range_cost_cmd); - install_element (OSPF_NODE, &ospf_area_range_advertise_cost_cmd); install_element (OSPF_NODE, &ospf_area_range_not_advertise_cmd); install_element (OSPF_NODE, &no_ospf_area_range_cmd); - install_element (OSPF_NODE, &no_ospf_area_range_advertise_cmd); - install_element (OSPF_NODE, &no_ospf_area_range_cost_cmd); - install_element (OSPF_NODE, &no_ospf_area_range_advertise_cost_cmd); install_element (OSPF_NODE, &ospf_area_range_substitute_cmd); install_element (OSPF_NODE, &no_ospf_area_range_substitute_cmd); @@ -10355,38 +10323,14 @@ ospf_vty_init (void) install_element (OSPF_NODE, &ospf_area_vlink_cmd); install_element (OSPF_NODE, &no_ospf_area_vlink_cmd); - install_element (OSPF_NODE, &ospf_area_vlink_param1_cmd); - install_element (OSPF_NODE, &no_ospf_area_vlink_param1_cmd); - install_element (OSPF_NODE, &ospf_area_vlink_param2_cmd); - install_element (OSPF_NODE, &no_ospf_area_vlink_param2_cmd); - install_element (OSPF_NODE, &ospf_area_vlink_param3_cmd); - install_element (OSPF_NODE, &no_ospf_area_vlink_param3_cmd); - install_element (OSPF_NODE, &ospf_area_vlink_param4_cmd); - install_element (OSPF_NODE, &no_ospf_area_vlink_param4_cmd); - install_element (OSPF_NODE, &ospf_area_vlink_authtype_args_cmd); - install_element (OSPF_NODE, &no_ospf_area_vlink_authtype_args_cmd); - install_element (OSPF_NODE, &ospf_area_vlink_authtype_cmd); - install_element (OSPF_NODE, &no_ospf_area_vlink_authtype_cmd); - install_element (OSPF_NODE, &ospf_area_vlink_md5_cmd); - install_element (OSPF_NODE, &no_ospf_area_vlink_md5_cmd); - install_element (OSPF_NODE, &ospf_area_vlink_authkey_cmd); - install_element (OSPF_NODE, &no_ospf_area_vlink_authkey_cmd); - install_element (OSPF_NODE, &ospf_area_vlink_authtype_args_authkey_cmd); - install_element (OSPF_NODE, &no_ospf_area_vlink_authtype_args_authkey_cmd); - install_element (OSPF_NODE, &ospf_area_vlink_authtype_authkey_cmd); - install_element (OSPF_NODE, &no_ospf_area_vlink_authtype_authkey_cmd); - install_element (OSPF_NODE, &ospf_area_vlink_authtype_args_md5_cmd); - install_element (OSPF_NODE, &no_ospf_area_vlink_authtype_args_md5_cmd); - install_element (OSPF_NODE, &ospf_area_vlink_authtype_md5_cmd); - install_element (OSPF_NODE, &no_ospf_area_vlink_authtype_md5_cmd); /* "area stub" commands. */ install_element (OSPF_NODE, &ospf_area_stub_no_summary_cmd); @@ -10400,7 +10344,6 @@ ospf_vty_init (void) install_element (OSPF_NODE, &ospf_area_nssa_translate_cmd); install_element (OSPF_NODE, &ospf_area_nssa_no_summary_cmd); install_element (OSPF_NODE, &no_ospf_area_nssa_cmd); - install_element (OSPF_NODE, &no_ospf_area_nssa_no_summary_cmd); install_element (OSPF_NODE, &ospf_area_default_cost_cmd); install_element (OSPF_NODE, &no_ospf_area_default_cost_cmd); @@ -10420,57 +10363,39 @@ ospf_vty_init (void) /* SPF timer commands */ install_element (OSPF_NODE, &ospf_timers_throttle_spf_cmd); install_element (OSPF_NODE, &no_ospf_timers_throttle_spf_cmd); - install_element (OSPF_NODE, &no_ospf_timers_throttle_spf_val_cmd); /* LSA timers commands */ install_element (OSPF_NODE, &ospf_timers_min_ls_interval_cmd); install_element (OSPF_NODE, &no_ospf_timers_min_ls_interval_cmd); - install_element (OSPF_NODE, &no_ospf_timers_min_ls_interval_val_cmd); install_element (OSPF_NODE, &ospf_timers_min_ls_arrival_cmd); install_element (OSPF_NODE, &no_ospf_timers_min_ls_arrival_cmd); - install_element (OSPF_NODE, &no_ospf_timers_min_ls_arrival_val_cmd); install_element (OSPF_NODE, &ospf_timers_lsa_cmd); install_element (OSPF_NODE, &no_ospf_timers_lsa_cmd); - install_element (OSPF_NODE, &no_ospf_timers_lsa_val_cmd); /* refresh timer commands */ install_element (OSPF_NODE, &ospf_refresh_timer_cmd); install_element (OSPF_NODE, &no_ospf_refresh_timer_val_cmd); - install_element (OSPF_NODE, &no_ospf_refresh_timer_cmd); /* max-metric commands */ install_element (OSPF_NODE, &ospf_max_metric_router_lsa_admin_cmd); install_element (OSPF_NODE, &no_ospf_max_metric_router_lsa_admin_cmd); install_element (OSPF_NODE, &ospf_max_metric_router_lsa_startup_cmd); install_element (OSPF_NODE, &no_ospf_max_metric_router_lsa_startup_cmd); - install_element (OSPF_NODE, &no_ospf_max_metric_router_lsa_startup_no_param_cmd); install_element (OSPF_NODE, &ospf_max_metric_router_lsa_shutdown_cmd); install_element (OSPF_NODE, &no_ospf_max_metric_router_lsa_shutdown_cmd); - install_element (OSPF_NODE, &no_ospf_max_metric_router_lsa_shutdown_no_param_cmd); /* reference bandwidth commands */ install_element (OSPF_NODE, &ospf_auto_cost_reference_bandwidth_cmd); install_element (OSPF_NODE, &no_ospf_auto_cost_reference_bandwidth_cmd); - install_element (OSPF_NODE, &no_ospf_auto_cost_reference_bandwidth_val_cmd); /* "neighbor" commands. */ install_element (OSPF_NODE, &ospf_neighbor_cmd); - install_element (OSPF_NODE, &ospf_neighbor_priority_poll_interval_cmd); - install_element (OSPF_NODE, &ospf_neighbor_priority_cmd); install_element (OSPF_NODE, &ospf_neighbor_poll_interval_cmd); - install_element (OSPF_NODE, &ospf_neighbor_poll_interval_priority_cmd); install_element (OSPF_NODE, &no_ospf_neighbor_cmd); - install_element (OSPF_NODE, &no_ospf_neighbor_priority_cmd); - install_element (OSPF_NODE, &no_ospf_neighbor_poll_interval_cmd); - install_element (OSPF_NODE, &no_ospf_neighbor_poll_interval_priority_cmd); - install_element (OSPF_NODE, &no_ospf_neighbor_priority_pollinterval_cmd); /* write multiplier commands */ install_element (OSPF_NODE, &ospf_write_multiplier_cmd); install_element (OSPF_NODE, &no_ospf_write_multiplier_cmd); - install_element (OSPF_NODE, &write_multiplier_cmd); - install_element (OSPF_NODE, &no_write_multiplier_cmd); - install_element (OSPF_NODE, &no_write_multiplier_val_cmd); /* Init interface related vty commands. */ ospf_vty_if_init (); diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index 875310651..62159ad08 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -3531,6 +3531,16 @@ DEFUN (interface_no_ip_mroute_source, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "ip pim hello <1-180> <1-180>", + * IP_STR + * PIM_STR + * IFACE_PIM_HELLO_STR + * IFACE_PIM_HELLO_TIME_STR + * IFACE_PIM_HELLO_HOLD_STR + * + */ DEFUN (interface_ip_pim_hello, interface_ip_pim_hello_cmd, "ip pim hello <1-180>", @@ -3558,14 +3568,6 @@ DEFUN (interface_ip_pim_hello, return CMD_SUCCESS; } -ALIAS (interface_ip_pim_hello, - interface_ip_pim_hello_hold_cmd, - "ip pim hello <1-180> <1-180>", - IP_STR - PIM_STR - IFACE_PIM_HELLO_STR - IFACE_PIM_HELLO_TIME_STR - IFACE_PIM_HELLO_HOLD_STR) DEFUN (interface_no_ip_pim_hello, @@ -3607,6 +3609,13 @@ DEFUN (debug_igmp, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "undebug igmp", + * UNDEBUG_STR + * DEBUG_IGMP_STR + * + */ DEFUN (no_debug_igmp, no_debug_igmp_cmd, "no debug igmp", @@ -3620,11 +3629,6 @@ DEFUN (no_debug_igmp, return CMD_SUCCESS; } -ALIAS (no_debug_igmp, - undebug_igmp_cmd, - "undebug igmp", - UNDEBUG_STR - DEBUG_IGMP_STR) DEFUN (debug_igmp_events, debug_igmp_events_cmd, @@ -3637,6 +3641,14 @@ DEFUN (debug_igmp_events, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "undebug igmp events", + * UNDEBUG_STR + * DEBUG_IGMP_STR + * DEBUG_IGMP_EVENTS_STR + * + */ DEFUN (no_debug_igmp_events, no_debug_igmp_events_cmd, "no debug igmp events", @@ -3649,12 +3661,6 @@ DEFUN (no_debug_igmp_events, return CMD_SUCCESS; } -ALIAS (no_debug_igmp_events, - undebug_igmp_events_cmd, - "undebug igmp events", - UNDEBUG_STR - DEBUG_IGMP_STR - DEBUG_IGMP_EVENTS_STR) DEFUN (debug_igmp_packets, debug_igmp_packets_cmd, @@ -3667,6 +3673,14 @@ DEFUN (debug_igmp_packets, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "undebug igmp packets", + * UNDEBUG_STR + * DEBUG_IGMP_STR + * DEBUG_IGMP_PACKETS_STR + * + */ DEFUN (no_debug_igmp_packets, no_debug_igmp_packets_cmd, "no debug igmp packets", @@ -3679,12 +3693,6 @@ DEFUN (no_debug_igmp_packets, return CMD_SUCCESS; } -ALIAS (no_debug_igmp_packets, - undebug_igmp_packets_cmd, - "undebug igmp packets", - UNDEBUG_STR - DEBUG_IGMP_STR - DEBUG_IGMP_PACKETS_STR) DEFUN (debug_igmp_trace, debug_igmp_trace_cmd, @@ -3697,6 +3705,14 @@ DEFUN (debug_igmp_trace, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "undebug igmp trace", + * UNDEBUG_STR + * DEBUG_IGMP_STR + * DEBUG_IGMP_TRACE_STR + * + */ DEFUN (no_debug_igmp_trace, no_debug_igmp_trace_cmd, "no debug igmp trace", @@ -3709,12 +3725,6 @@ DEFUN (no_debug_igmp_trace, return CMD_SUCCESS; } -ALIAS (no_debug_igmp_trace, - undebug_igmp_trace_cmd, - "undebug igmp trace", - UNDEBUG_STR - DEBUG_IGMP_STR - DEBUG_IGMP_TRACE_STR) DEFUN (debug_mroute, debug_mroute_cmd, @@ -3726,6 +3736,13 @@ DEFUN (debug_mroute, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "undebug mroute", + * UNDEBUG_STR + * DEBUG_MROUTE_STR + * + */ DEFUN (no_debug_mroute, no_debug_mroute_cmd, "no debug mroute", @@ -3737,11 +3754,6 @@ DEFUN (no_debug_mroute, return CMD_SUCCESS; } -ALIAS (no_debug_mroute, - undebug_mroute_cmd, - "undebug mroute", - UNDEBUG_STR - DEBUG_MROUTE_STR) DEFUN (debug_static, debug_static_cmd, @@ -3753,6 +3765,13 @@ DEFUN (debug_static, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "undebug static", + * UNDEBUG_STR + * DEBUG_STATIC_STR + * + */ DEFUN (no_debug_static, no_debug_static_cmd, "no debug static", @@ -3764,11 +3783,6 @@ DEFUN (no_debug_static, return CMD_SUCCESS; } -ALIAS (no_debug_static, - undebug_static_cmd, - "undebug static", - UNDEBUG_STR - DEBUG_STATIC_STR) DEFUN (debug_pim, debug_pim_cmd, @@ -3782,6 +3796,13 @@ DEFUN (debug_pim, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "undebug pim", + * UNDEBUG_STR + * DEBUG_PIM_STR + * + */ DEFUN (no_debug_pim, no_debug_pim_cmd, "no debug pim", @@ -3799,11 +3820,6 @@ DEFUN (no_debug_pim, return CMD_SUCCESS; } -ALIAS (no_debug_pim, - undebug_pim_cmd, - "undebug pim", - UNDEBUG_STR - DEBUG_PIM_STR) DEFUN (debug_pim_events, debug_pim_events_cmd, @@ -3816,6 +3832,14 @@ DEFUN (debug_pim_events, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "undebug pim events", + * UNDEBUG_STR + * DEBUG_PIM_STR + * DEBUG_PIM_EVENTS_STR + * + */ DEFUN (no_debug_pim_events, no_debug_pim_events_cmd, "no debug pim events", @@ -3828,12 +3852,6 @@ DEFUN (no_debug_pim_events, return CMD_SUCCESS; } -ALIAS (no_debug_pim_events, - undebug_pim_events_cmd, - "undebug pim events", - UNDEBUG_STR - DEBUG_PIM_STR - DEBUG_PIM_EVENTS_STR) DEFUN (debug_pim_packets, debug_pim_packets_cmd, @@ -3869,6 +3887,14 @@ DEFUN (debug_pim_packets_filter, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "undebug pim packets", + * UNDEBUG_STR + * DEBUG_PIM_STR + * DEBUG_PIM_PACKETS_STR + * + */ DEFUN (no_debug_pim_packets, no_debug_pim_packets_cmd, "no debug pim packets", @@ -3907,12 +3933,6 @@ DEFUN (no_debug_pim_packets_filter, return CMD_SUCCESS; } -ALIAS (no_debug_pim_packets, - undebug_pim_packets_cmd, - "undebug pim packets", - UNDEBUG_STR - DEBUG_PIM_STR - DEBUG_PIM_PACKETS_STR) DEFUN (debug_pim_packetdump_send, debug_pim_packetdump_send_cmd, @@ -3926,6 +3946,15 @@ DEFUN (debug_pim_packetdump_send, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "undebug pim packet-dump send", + * UNDEBUG_STR + * DEBUG_PIM_STR + * DEBUG_PIM_PACKETDUMP_STR + * DEBUG_PIM_PACKETDUMP_SEND_STR + * + */ DEFUN (no_debug_pim_packetdump_send, no_debug_pim_packetdump_send_cmd, "no debug pim packet-dump send", @@ -3939,13 +3968,6 @@ DEFUN (no_debug_pim_packetdump_send, return CMD_SUCCESS; } -ALIAS (no_debug_pim_packetdump_send, - undebug_pim_packetdump_send_cmd, - "undebug pim packet-dump send", - UNDEBUG_STR - DEBUG_PIM_STR - DEBUG_PIM_PACKETDUMP_STR - DEBUG_PIM_PACKETDUMP_SEND_STR) DEFUN (debug_pim_packetdump_recv, debug_pim_packetdump_recv_cmd, @@ -3959,6 +3981,15 @@ DEFUN (debug_pim_packetdump_recv, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "undebug pim packet-dump receive", + * UNDEBUG_STR + * DEBUG_PIM_STR + * DEBUG_PIM_PACKETDUMP_STR + * DEBUG_PIM_PACKETDUMP_RECV_STR + * + */ DEFUN (no_debug_pim_packetdump_recv, no_debug_pim_packetdump_recv_cmd, "no debug pim packet-dump receive", @@ -3972,13 +4003,6 @@ DEFUN (no_debug_pim_packetdump_recv, return CMD_SUCCESS; } -ALIAS (no_debug_pim_packetdump_recv, - undebug_pim_packetdump_recv_cmd, - "undebug pim packet-dump receive", - UNDEBUG_STR - DEBUG_PIM_STR - DEBUG_PIM_PACKETDUMP_STR - DEBUG_PIM_PACKETDUMP_RECV_STR) DEFUN (debug_pim_trace, debug_pim_trace_cmd, @@ -3991,6 +4015,14 @@ DEFUN (debug_pim_trace, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "undebug pim trace", + * UNDEBUG_STR + * DEBUG_PIM_STR + * DEBUG_PIM_TRACE_STR + * + */ DEFUN (no_debug_pim_trace, no_debug_pim_trace_cmd, "no debug pim trace", @@ -4003,12 +4035,6 @@ DEFUN (no_debug_pim_trace, return CMD_SUCCESS; } -ALIAS (no_debug_pim_trace, - undebug_pim_trace_cmd, - "undebug pim trace", - UNDEBUG_STR - DEBUG_PIM_STR - DEBUG_PIM_TRACE_STR) DEFUN (debug_ssmpingd, debug_ssmpingd_cmd, @@ -4021,6 +4047,14 @@ DEFUN (debug_ssmpingd, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "undebug ssmpingd", + * UNDEBUG_STR + * DEBUG_PIM_STR + * DEBUG_SSMPINGD_STR + * + */ DEFUN (no_debug_ssmpingd, no_debug_ssmpingd_cmd, "no debug ssmpingd", @@ -4033,12 +4067,6 @@ DEFUN (no_debug_ssmpingd, return CMD_SUCCESS; } -ALIAS (no_debug_ssmpingd, - undebug_ssmpingd_cmd, - "undebug ssmpingd", - UNDEBUG_STR - DEBUG_PIM_STR - DEBUG_SSMPINGD_STR) DEFUN (debug_pim_zebra, debug_pim_zebra_cmd, @@ -4051,6 +4079,14 @@ DEFUN (debug_pim_zebra, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "undebug pim zebra", + * UNDEBUG_STR + * DEBUG_PIM_STR + * DEBUG_PIM_ZEBRA_STR + * + */ DEFUN (no_debug_pim_zebra, no_debug_pim_zebra_cmd, "no debug pim zebra", @@ -4063,12 +4099,6 @@ DEFUN (no_debug_pim_zebra, return CMD_SUCCESS; } -ALIAS (no_debug_pim_zebra, - undebug_pim_zebra_cmd, - "undebug pim zebra", - UNDEBUG_STR - DEBUG_PIM_STR - DEBUG_PIM_ZEBRA_STR) DEFUN (show_debugging_pim, show_debugging_pim_cmd, @@ -4901,7 +4931,6 @@ void pim_cmd_init() install_element (INTERFACE_NODE, &interface_ip_pim_drprio_cmd); install_element (INTERFACE_NODE, &interface_no_ip_pim_drprio_cmd); install_element (INTERFACE_NODE, &interface_ip_pim_hello_cmd); - install_element (INTERFACE_NODE, &interface_ip_pim_hello_hold_cmd); install_element (INTERFACE_NODE, &interface_no_ip_pim_hello_cmd); // Static mroutes NEB @@ -4991,81 +5020,59 @@ void pim_cmd_init() install_element (ENABLE_NODE, &debug_igmp_cmd); install_element (ENABLE_NODE, &no_debug_igmp_cmd); - install_element (ENABLE_NODE, &undebug_igmp_cmd); install_element (ENABLE_NODE, &debug_igmp_events_cmd); install_element (ENABLE_NODE, &no_debug_igmp_events_cmd); - install_element (ENABLE_NODE, &undebug_igmp_events_cmd); install_element (ENABLE_NODE, &debug_igmp_packets_cmd); install_element (ENABLE_NODE, &no_debug_igmp_packets_cmd); - install_element (ENABLE_NODE, &undebug_igmp_packets_cmd); install_element (ENABLE_NODE, &debug_igmp_trace_cmd); install_element (ENABLE_NODE, &no_debug_igmp_trace_cmd); - install_element (ENABLE_NODE, &undebug_igmp_trace_cmd); install_element (ENABLE_NODE, &debug_mroute_cmd); install_element (ENABLE_NODE, &no_debug_mroute_cmd); install_element (ENABLE_NODE, &debug_static_cmd); install_element (ENABLE_NODE, &no_debug_static_cmd); install_element (ENABLE_NODE, &debug_pim_cmd); install_element (ENABLE_NODE, &no_debug_pim_cmd); - install_element (ENABLE_NODE, &undebug_pim_cmd); install_element (ENABLE_NODE, &debug_pim_events_cmd); install_element (ENABLE_NODE, &no_debug_pim_events_cmd); - install_element (ENABLE_NODE, &undebug_pim_events_cmd); install_element (ENABLE_NODE, &debug_pim_packets_cmd); install_element (ENABLE_NODE, &debug_pim_packets_filter_cmd); install_element (ENABLE_NODE, &no_debug_pim_packets_cmd); install_element (ENABLE_NODE, &no_debug_pim_packets_filter_cmd); - install_element (ENABLE_NODE, &undebug_pim_packets_cmd); install_element (ENABLE_NODE, &debug_pim_packetdump_send_cmd); install_element (ENABLE_NODE, &no_debug_pim_packetdump_send_cmd); - install_element (ENABLE_NODE, &undebug_pim_packetdump_send_cmd); install_element (ENABLE_NODE, &debug_pim_packetdump_recv_cmd); install_element (ENABLE_NODE, &no_debug_pim_packetdump_recv_cmd); - install_element (ENABLE_NODE, &undebug_pim_packetdump_recv_cmd); install_element (ENABLE_NODE, &debug_pim_trace_cmd); install_element (ENABLE_NODE, &no_debug_pim_trace_cmd); - install_element (ENABLE_NODE, &undebug_pim_trace_cmd); install_element (ENABLE_NODE, &debug_ssmpingd_cmd); install_element (ENABLE_NODE, &no_debug_ssmpingd_cmd); - install_element (ENABLE_NODE, &undebug_ssmpingd_cmd); install_element (ENABLE_NODE, &debug_pim_zebra_cmd); install_element (ENABLE_NODE, &no_debug_pim_zebra_cmd); - install_element (ENABLE_NODE, &undebug_pim_zebra_cmd); install_element (CONFIG_NODE, &debug_igmp_cmd); install_element (CONFIG_NODE, &no_debug_igmp_cmd); - install_element (CONFIG_NODE, &undebug_igmp_cmd); install_element (CONFIG_NODE, &debug_igmp_events_cmd); install_element (CONFIG_NODE, &no_debug_igmp_events_cmd); - install_element (CONFIG_NODE, &undebug_igmp_events_cmd); install_element (CONFIG_NODE, &debug_igmp_packets_cmd); install_element (CONFIG_NODE, &no_debug_igmp_packets_cmd); - install_element (CONFIG_NODE, &undebug_igmp_packets_cmd); install_element (CONFIG_NODE, &debug_igmp_trace_cmd); install_element (CONFIG_NODE, &no_debug_igmp_trace_cmd); - install_element (CONFIG_NODE, &undebug_igmp_trace_cmd); install_element (CONFIG_NODE, &debug_mroute_cmd); install_element (CONFIG_NODE, &no_debug_mroute_cmd); install_element (CONFIG_NODE, &debug_static_cmd); install_element (CONFIG_NODE, &no_debug_static_cmd); install_element (CONFIG_NODE, &debug_pim_cmd); install_element (CONFIG_NODE, &no_debug_pim_cmd); - install_element (CONFIG_NODE, &undebug_pim_cmd); install_element (CONFIG_NODE, &debug_pim_events_cmd); install_element (CONFIG_NODE, &no_debug_pim_events_cmd); - install_element (CONFIG_NODE, &undebug_pim_events_cmd); install_element (CONFIG_NODE, &debug_pim_packets_cmd); install_element (CONFIG_NODE, &debug_pim_packets_filter_cmd); install_element (CONFIG_NODE, &no_debug_pim_packets_cmd); install_element (CONFIG_NODE, &no_debug_pim_packets_filter_cmd); - install_element (CONFIG_NODE, &undebug_pim_packets_cmd); install_element (CONFIG_NODE, &debug_pim_trace_cmd); install_element (CONFIG_NODE, &no_debug_pim_trace_cmd); - install_element (CONFIG_NODE, &undebug_pim_trace_cmd); install_element (CONFIG_NODE, &debug_ssmpingd_cmd); install_element (CONFIG_NODE, &no_debug_ssmpingd_cmd); - install_element (CONFIG_NODE, &undebug_ssmpingd_cmd); install_element (CONFIG_NODE, &debug_pim_zebra_cmd); install_element (CONFIG_NODE, &no_debug_pim_zebra_cmd); - install_element (CONFIG_NODE, &undebug_pim_zebra_cmd); } diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c index 749939da2..122a53eba 100644 --- a/ripd/rip_interface.c +++ b/ripd/rip_interface.c @@ -1393,6 +1393,18 @@ DEFUN (ip_rip_receive_version_2, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ip rip receive version (1|2)", + * NO_STR + * IP_STR + * "Routing Information Protocol\n" + * "Advertisement reception\n" + * "Version control\n" + * "Version 1\n" + * "Version 2\n" + * + */ DEFUN (no_ip_rip_receive_version, no_ip_rip_receive_version_cmd, "no ip rip receive version", @@ -1412,16 +1424,6 @@ DEFUN (no_ip_rip_receive_version, return CMD_SUCCESS; } -ALIAS (no_ip_rip_receive_version, - no_ip_rip_receive_version_num_cmd, - "no ip rip receive version (1|2)", - NO_STR - IP_STR - "Routing Information Protocol\n" - "Advertisement reception\n" - "Version control\n" - "Version 1\n" - "Version 2\n") DEFUN (ip_rip_send_version, ip_rip_send_version_cmd, @@ -1495,6 +1497,18 @@ DEFUN (ip_rip_send_version_2, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ip rip send version (1|2)", + * NO_STR + * IP_STR + * "Routing Information Protocol\n" + * "Advertisement transmission\n" + * "Version control\n" + * "Version 1\n" + * "Version 2\n" + * + */ DEFUN (no_ip_rip_send_version, no_ip_rip_send_version_cmd, "no ip rip send version", @@ -1514,17 +1528,21 @@ DEFUN (no_ip_rip_send_version, return CMD_SUCCESS; } -ALIAS (no_ip_rip_send_version, - no_ip_rip_send_version_num_cmd, - "no ip rip send version (1|2)", - NO_STR - IP_STR - "Routing Information Protocol\n" - "Advertisement transmission\n" - "Version control\n" - "Version 1\n" - "Version 2\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "ip rip authentication mode (md5|text) auth-length (rfc|old-ripd)", + * IP_STR + * "Routing Information Protocol\n" + * "Authentication control\n" + * "Authentication mode\n" + * "Keyed message digest\n" + * "Clear text authentication\n" + * "MD5 authentication data length\n" + * "RFC compatible\n" + * "Old ripd compatible\n" + * + */ DEFUN (ip_rip_authentication_mode, ip_rip_authentication_mode_cmd, "ip rip authentication mode (md5|text)", @@ -1582,19 +1600,31 @@ DEFUN (ip_rip_authentication_mode, return CMD_SUCCESS; } -ALIAS (ip_rip_authentication_mode, - ip_rip_authentication_mode_authlen_cmd, - "ip rip authentication mode (md5|text) auth-length (rfc|old-ripd)", - IP_STR - "Routing Information Protocol\n" - "Authentication control\n" - "Authentication mode\n" - "Keyed message digest\n" - "Clear text authentication\n" - "MD5 authentication data length\n" - "RFC compatible\n" - "Old ripd compatible\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ip rip authentication mode (md5|text)", + * NO_STR + * IP_STR + * "Routing Information Protocol\n" + * "Authentication control\n" + * "Authentication mode\n" + * "Keyed message digest\n" + * "Clear text authentication\n" + * + * "no ip rip authentication mode (md5|text) auth-length (rfc|old-ripd)", + * NO_STR + * IP_STR + * "Routing Information Protocol\n" + * "Authentication control\n" + * "Authentication mode\n" + * "Keyed message digest\n" + * "Clear text authentication\n" + * "MD5 authentication data length\n" + * "RFC compatible\n" + * "Old ripd compatible\n" + * + */ DEFUN (no_ip_rip_authentication_mode, no_ip_rip_authentication_mode_cmd, "no ip rip authentication mode", @@ -1616,30 +1646,7 @@ DEFUN (no_ip_rip_authentication_mode, return CMD_SUCCESS; } -ALIAS (no_ip_rip_authentication_mode, - no_ip_rip_authentication_mode_type_cmd, - "no ip rip authentication mode (md5|text)", - NO_STR - IP_STR - "Routing Information Protocol\n" - "Authentication control\n" - "Authentication mode\n" - "Keyed message digest\n" - "Clear text authentication\n") -ALIAS (no_ip_rip_authentication_mode, - no_ip_rip_authentication_mode_type_authlen_cmd, - "no ip rip authentication mode (md5|text) auth-length (rfc|old-ripd)", - NO_STR - IP_STR - "Routing Information Protocol\n" - "Authentication control\n" - "Authentication mode\n" - "Keyed message digest\n" - "Clear text authentication\n" - "MD5 authentication data length\n" - "RFC compatible\n" - "Old ripd compatible\n") DEFUN (ip_rip_authentication_string, ip_rip_authentication_string_cmd, @@ -1677,6 +1684,17 @@ DEFUN (ip_rip_authentication_string, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ip rip authentication string LINE", + * NO_STR + * IP_STR + * "Routing Information Protocol\n" + * "Authentication control\n" + * "Authentication string\n" + * "Authentication string\n" + * + */ DEFUN (no_ip_rip_authentication_string, no_ip_rip_authentication_string_cmd, "no ip rip authentication string", @@ -1700,15 +1718,6 @@ DEFUN (no_ip_rip_authentication_string, return CMD_SUCCESS; } -ALIAS (no_ip_rip_authentication_string, - no_ip_rip_authentication_string2_cmd, - "no ip rip authentication string LINE", - NO_STR - IP_STR - "Routing Information Protocol\n" - "Authentication control\n" - "Authentication string\n" - "Authentication string\n") DEFUN (ip_rip_authentication_key_chain, ip_rip_authentication_key_chain_cmd, @@ -1740,6 +1749,17 @@ DEFUN (ip_rip_authentication_key_chain, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ip rip authentication key-chain LINE", + * NO_STR + * IP_STR + * "Routing Information Protocol\n" + * "Authentication control\n" + * "Authentication key-chain\n" + * "name of key-chain\n" + * + */ DEFUN (no_ip_rip_authentication_key_chain, no_ip_rip_authentication_key_chain_cmd, "no ip rip authentication key-chain", @@ -1763,15 +1783,6 @@ DEFUN (no_ip_rip_authentication_key_chain, return CMD_SUCCESS; } -ALIAS (no_ip_rip_authentication_key_chain, - no_ip_rip_authentication_key_chain2_cmd, - "no ip rip authentication key-chain LINE", - NO_STR - IP_STR - "Routing Information Protocol\n" - "Authentication control\n" - "Authentication key-chain\n" - "name of key-chain\n") /* CHANGED: ip rip split-horizon Cisco and Zebra's command is @@ -2098,27 +2109,20 @@ rip_if_init (void) install_element (INTERFACE_NODE, &ip_rip_send_version_1_cmd); install_element (INTERFACE_NODE, &ip_rip_send_version_2_cmd); install_element (INTERFACE_NODE, &no_ip_rip_send_version_cmd); - install_element (INTERFACE_NODE, &no_ip_rip_send_version_num_cmd); install_element (INTERFACE_NODE, &ip_rip_receive_version_cmd); install_element (INTERFACE_NODE, &ip_rip_receive_version_1_cmd); install_element (INTERFACE_NODE, &ip_rip_receive_version_2_cmd); install_element (INTERFACE_NODE, &no_ip_rip_receive_version_cmd); - install_element (INTERFACE_NODE, &no_ip_rip_receive_version_num_cmd); install_element (INTERFACE_NODE, &ip_rip_authentication_mode_cmd); - install_element (INTERFACE_NODE, &ip_rip_authentication_mode_authlen_cmd); install_element (INTERFACE_NODE, &no_ip_rip_authentication_mode_cmd); - install_element (INTERFACE_NODE, &no_ip_rip_authentication_mode_type_cmd); - install_element (INTERFACE_NODE, &no_ip_rip_authentication_mode_type_authlen_cmd); install_element (INTERFACE_NODE, &ip_rip_authentication_key_chain_cmd); install_element (INTERFACE_NODE, &no_ip_rip_authentication_key_chain_cmd); - install_element (INTERFACE_NODE, &no_ip_rip_authentication_key_chain2_cmd); install_element (INTERFACE_NODE, &ip_rip_authentication_string_cmd); install_element (INTERFACE_NODE, &no_ip_rip_authentication_string_cmd); - install_element (INTERFACE_NODE, &no_ip_rip_authentication_string2_cmd); install_element (INTERFACE_NODE, &ip_rip_split_horizon_cmd); install_element (INTERFACE_NODE, &ip_rip_split_horizon_poisoned_reverse_cmd); diff --git a/ripd/rip_routemap.c b/ripd/rip_routemap.c index 76186cdf6..4bb5958e9 100644 --- a/ripd/rip_routemap.c +++ b/ripd/rip_routemap.c @@ -735,7 +735,7 @@ static struct route_map_rule_cmd route_set_tag_cmd = #define MATCH_STR "Match values from routing table\n" #define SET_STR "Set values in destination routing protocol\n" -DEFUN (match_metric, +DEFUN (match_metric, match_metric_cmd, "match metric <0-4294967295>", MATCH_STR @@ -745,6 +745,15 @@ DEFUN (match_metric, return rip_route_match_add (vty, vty->index, "metric", argv[2]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match metric <0-4294967295>", + * NO_STR + * MATCH_STR + * "Match metric of route\n" + * "Metric value\n" + * + */ DEFUN (no_match_metric, no_match_metric_cmd, "no match metric", @@ -755,13 +764,6 @@ DEFUN (no_match_metric, return rip_route_match_delete (vty, vty->index, "metric", argv[3]->arg); } -ALIAS (no_match_metric, - no_match_metric_val_cmd, - "no match metric <0-4294967295>", - NO_STR - MATCH_STR - "Match metric of route\n" - "Metric value\n") DEFUN (match_interface, match_interface_cmd, @@ -773,6 +775,15 @@ DEFUN (match_interface, return rip_route_match_add (vty, vty->index, "interface", argv[2]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match interface WORD", + * NO_STR + * MATCH_STR + * "Match first hop interface of route\n" + * "Interface name\n" + * + */ DEFUN (no_match_interface, no_match_interface_cmd, "no match interface", @@ -783,13 +794,6 @@ DEFUN (no_match_interface, return rip_route_match_delete (vty, vty->index, "interface", argv[3]->arg); } -ALIAS (no_match_interface, - no_match_interface_val_cmd, - "no match interface WORD", - NO_STR - MATCH_STR - "Match first hop interface of route\n" - "Interface name\n") DEFUN (match_ip_next_hop, match_ip_next_hop_cmd, @@ -804,6 +808,18 @@ DEFUN (match_ip_next_hop, return rip_route_match_add (vty, vty->index, "ip next-hop", argv[3]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match ip next-hop (<1-199>|<1300-2699>|WORD)", + * NO_STR + * MATCH_STR + * IP_STR + * "Match next-hop address of route\n" + * "IP access-list number\n" + * "IP access-list number (expanded range)\n" + * "IP Access-list name\n" + * + */ DEFUN (no_match_ip_next_hop, no_match_ip_next_hop_cmd, "no match ip next-hop", @@ -815,16 +831,6 @@ DEFUN (no_match_ip_next_hop, return rip_route_match_delete (vty, vty->index, "ip next-hop", argv[4]->arg); } -ALIAS (no_match_ip_next_hop, - no_match_ip_next_hop_val_cmd, - "no match ip next-hop (<1-199>|<1300-2699>|WORD)", - NO_STR - MATCH_STR - IP_STR - "Match next-hop address of route\n" - "IP access-list number\n" - "IP access-list number (expanded range)\n" - "IP Access-list name\n") DEFUN (match_ip_next_hop_prefix_list, match_ip_next_hop_prefix_list_cmd, @@ -838,6 +844,17 @@ DEFUN (match_ip_next_hop_prefix_list, return rip_route_match_add (vty, vty->index, "ip next-hop prefix-list", argv[4]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match ip next-hop prefix-list WORD", + * NO_STR + * MATCH_STR + * IP_STR + * "Match next-hop address of route\n" + * "Match entries of prefix-lists\n" + * "IP prefix-list name\n" + * + */ DEFUN (no_match_ip_next_hop_prefix_list, no_match_ip_next_hop_prefix_list_cmd, "no match ip next-hop prefix-list", @@ -850,15 +867,6 @@ DEFUN (no_match_ip_next_hop_prefix_list, return rip_route_match_delete (vty, vty->index, "ip next-hop prefix-list", argv[5]->arg); } -ALIAS (no_match_ip_next_hop_prefix_list, - no_match_ip_next_hop_prefix_list_val_cmd, - "no match ip next-hop prefix-list WORD", - NO_STR - MATCH_STR - IP_STR - "Match next-hop address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") DEFUN (match_ip_address, match_ip_address_cmd, @@ -874,7 +882,19 @@ DEFUN (match_ip_address, return rip_route_match_add (vty, vty->index, "ip address", argv[3]->arg); } -DEFUN (no_match_ip_address, +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match ip address (<1-199>|<1300-2699>|WORD)", + * NO_STR + * MATCH_STR + * IP_STR + * "Match address of route\n" + * "IP access-list number\n" + * "IP access-list number (expanded range)\n" + * "IP Access-list name\n" + * + */ +DEFUN (no_match_ip_address, no_match_ip_address_cmd, "no match ip address", NO_STR @@ -885,18 +905,8 @@ DEFUN (no_match_ip_address, return rip_route_match_delete (vty, vty->index, "ip address", argv[4]->arg); } -ALIAS (no_match_ip_address, - no_match_ip_address_val_cmd, - "no match ip address (<1-199>|<1300-2699>|WORD)", - NO_STR - MATCH_STR - IP_STR - "Match address of route\n" - "IP access-list number\n" - "IP access-list number (expanded range)\n" - "IP Access-list name\n") -DEFUN (match_ip_address_prefix_list, +DEFUN (match_ip_address_prefix_list, match_ip_address_prefix_list_cmd, "match ip address prefix-list WORD", MATCH_STR @@ -908,6 +918,17 @@ DEFUN (match_ip_address_prefix_list, return rip_route_match_add (vty, vty->index, "ip address prefix-list", argv[4]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match ip address prefix-list WORD", + * NO_STR + * MATCH_STR + * IP_STR + * "Match address of route\n" + * "Match entries of prefix-lists\n" + * "IP prefix-list name\n" + * + */ DEFUN (no_match_ip_address_prefix_list, no_match_ip_address_prefix_list_cmd, "no match ip address prefix-list", @@ -920,17 +941,8 @@ DEFUN (no_match_ip_address_prefix_list, return rip_route_match_delete (vty, vty->index, "ip address prefix-list", argv[5]->arg); } -ALIAS (no_match_ip_address_prefix_list, - no_match_ip_address_prefix_list_val_cmd, - "no match ip address prefix-list WORD", - NO_STR - MATCH_STR - IP_STR - "Match address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") -DEFUN (match_tag, +DEFUN (match_tag, match_tag_cmd, "match tag <1-65535>", MATCH_STR @@ -940,6 +952,15 @@ DEFUN (match_tag, return rip_route_match_add (vty, vty->index, "tag", argv[2]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match tag <1-65535>", + * NO_STR + * MATCH_STR + * "Match tag of route\n" + * "Metric value\n" + * + */ DEFUN (no_match_tag, no_match_tag_cmd, "no match tag", @@ -950,16 +971,17 @@ DEFUN (no_match_tag, return rip_route_match_delete (vty, vty->index, "tag", argv[3]->arg); } -ALIAS (no_match_tag, - no_match_tag_val_cmd, - "no match tag <1-65535>", - NO_STR - MATCH_STR - "Match tag of route\n" - "Metric value\n") /* set functions */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "set metric <+/-metric>", + * SET_STR + * "Metric value for destination routing protocol\n" + * "Add or subtract metric\n" + * + */ DEFUN (set_metric, set_metric_cmd, "set metric <0-4294967295>", @@ -970,13 +992,22 @@ DEFUN (set_metric, return rip_route_set_add (vty, vty->index, "metric", argv[2]->arg); } -ALIAS (set_metric, - set_metric_addsub_cmd, - "set metric <+/-metric>", - SET_STR - "Metric value for destination routing protocol\n" - "Add or subtract metric\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no set metric <+/-metric>", + * NO_STR + * SET_STR + * "Metric value for destination routing protocol\n" + * "Add or subtract metric\n" + * + * "no set metric <0-4294967295>", + * NO_STR + * SET_STR + * "Metric value for destination routing protocol\n" + * "Metric value\n" + * + */ DEFUN (no_set_metric, no_set_metric_cmd, "no set metric", @@ -987,21 +1018,7 @@ DEFUN (no_set_metric, return rip_route_set_delete (vty, vty->index, "metric", argv[3]->arg); } -ALIAS (no_set_metric, - no_set_metric_val_cmd, - "no set metric <0-4294967295>", - NO_STR - SET_STR - "Metric value for destination routing protocol\n" - "Metric value\n") -ALIAS (no_set_metric, - no_set_metric_addsub_cmd, - "no set metric <+/-metric>", - NO_STR - SET_STR - "Metric value for destination routing protocol\n" - "Add or subtract metric\n") DEFUN (set_ip_nexthop, set_ip_nexthop_cmd, @@ -1031,6 +1048,16 @@ DEFUN (set_ip_nexthop, return rip_route_set_add (vty, vty->index, "ip next-hop", argv[3]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no set ip next-hop A.B.C.D", + * NO_STR + * SET_STR + * IP_STR + * "Next hop address\n" + * "IP address of next hop\n" + * + */ DEFUN (no_set_ip_nexthop, no_set_ip_nexthop_cmd, "no set ip next-hop", @@ -1042,14 +1069,6 @@ DEFUN (no_set_ip_nexthop, return rip_route_set_delete (vty, vty->index, "ip next-hop", argv[4]->arg); } -ALIAS (no_set_ip_nexthop, - no_set_ip_nexthop_val_cmd, - "no set ip next-hop A.B.C.D", - NO_STR - SET_STR - IP_STR - "Next hop address\n" - "IP address of next hop\n") DEFUN (set_tag, set_tag_cmd, @@ -1061,6 +1080,15 @@ DEFUN (set_tag, return rip_route_set_add (vty, vty->index, "tag", argv[2]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no set tag <1-65535>", + * NO_STR + * SET_STR + * "Tag value for routing protocol\n" + * "Tag value\n" + * + */ DEFUN (no_set_tag, no_set_tag_cmd, "no set tag", @@ -1071,13 +1099,6 @@ DEFUN (no_set_tag, return rip_route_set_delete (vty, vty->index, "tag", argv[3]->arg); } -ALIAS (no_set_tag, - no_set_tag_val_cmd, - "no set tag <1-65535>", - NO_STR - SET_STR - "Tag value for routing protocol\n" - "Tag value\n") void rip_route_map_reset () @@ -1108,35 +1129,23 @@ rip_route_map_init () install_element (RMAP_NODE, &match_metric_cmd); install_element (RMAP_NODE, &no_match_metric_cmd); - install_element (RMAP_NODE, &no_match_metric_val_cmd); install_element (RMAP_NODE, &match_interface_cmd); install_element (RMAP_NODE, &no_match_interface_cmd); - install_element (RMAP_NODE, &no_match_interface_val_cmd); install_element (RMAP_NODE, &match_ip_next_hop_cmd); install_element (RMAP_NODE, &no_match_ip_next_hop_cmd); - install_element (RMAP_NODE, &no_match_ip_next_hop_val_cmd); install_element (RMAP_NODE, &match_ip_next_hop_prefix_list_cmd); install_element (RMAP_NODE, &no_match_ip_next_hop_prefix_list_cmd); - install_element (RMAP_NODE, &no_match_ip_next_hop_prefix_list_val_cmd); install_element (RMAP_NODE, &match_ip_address_cmd); install_element (RMAP_NODE, &no_match_ip_address_cmd); - install_element (RMAP_NODE, &no_match_ip_address_val_cmd); install_element (RMAP_NODE, &match_ip_address_prefix_list_cmd); install_element (RMAP_NODE, &no_match_ip_address_prefix_list_cmd); - install_element (RMAP_NODE, &no_match_ip_address_prefix_list_val_cmd); install_element (RMAP_NODE, &match_tag_cmd); install_element (RMAP_NODE, &no_match_tag_cmd); - install_element (RMAP_NODE, &no_match_tag_val_cmd); install_element (RMAP_NODE, &set_metric_cmd); - install_element (RMAP_NODE, &set_metric_addsub_cmd); install_element (RMAP_NODE, &no_set_metric_cmd); - install_element (RMAP_NODE, &no_set_metric_val_cmd); - install_element (RMAP_NODE, &no_set_metric_addsub_cmd); install_element (RMAP_NODE, &set_ip_nexthop_cmd); install_element (RMAP_NODE, &no_set_ip_nexthop_cmd); - install_element (RMAP_NODE, &no_set_ip_nexthop_val_cmd); install_element (RMAP_NODE, &set_tag_cmd); install_element (RMAP_NODE, &no_set_tag_cmd); - install_element (RMAP_NODE, &no_set_tag_val_cmd); } diff --git a/ripd/ripd.c b/ripd/ripd.c index 3446bb579..d483d1ef3 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -2962,6 +2962,14 @@ DEFUN (rip_version, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no version <1-2>", + * NO_STR + * "Set routing protocol version\n" + * "version\n" + * + */ DEFUN (no_rip_version, no_rip_version_cmd, "no version", @@ -2975,12 +2983,6 @@ DEFUN (no_rip_version, return CMD_SUCCESS; } -ALIAS (no_rip_version, - no_rip_version_val_cmd, - "no version <1-2>", - NO_STR - "Set routing protocol version\n" - "version\n") DEFUN (rip_route, rip_route_cmd, @@ -3085,6 +3087,14 @@ DEFUN (rip_default_metric, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no default-metric <1-16>", + * NO_STR + * "Set a metric of redistribute routes\n" + * "Default metric\n" + * + */ DEFUN (no_rip_default_metric, no_rip_default_metric_cmd, "no default-metric", @@ -3100,12 +3110,6 @@ DEFUN (no_rip_default_metric, return CMD_SUCCESS; } -ALIAS (no_rip_default_metric, - no_rip_default_metric_val_cmd, - "no default-metric <1-16>", - NO_STR - "Set a metric of redistribute routes\n" - "Default metric\n") DEFUN (rip_timers, rip_timers_cmd, @@ -3155,6 +3159,17 @@ DEFUN (rip_timers, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no timers basic <0-65535> <0-65535> <0-65535>", + * NO_STR + * "Adjust routing timers\n" + * "Basic routing protocol update timers\n" + * "Routing table update timer value in second. Default is 30.\n" + * "Routing information timeout timer. Default is 180.\n" + * "Garbage collection timer. Default is 120.\n" + * + */ DEFUN (no_rip_timers, no_rip_timers_cmd, "no timers basic", @@ -3173,15 +3188,6 @@ DEFUN (no_rip_timers, return CMD_SUCCESS; } -ALIAS (no_rip_timers, - no_rip_timers_val_cmd, - "no timers basic <0-65535> <0-65535> <0-65535>", - NO_STR - "Adjust routing timers\n" - "Basic routing protocol update timers\n" - "Routing table update timer value in second. Default is 30.\n" - "Routing information timeout timer. Default is 180.\n" - "Garbage collection timer. Default is 120.\n") struct route_table *rip_distance_table; @@ -4156,13 +4162,10 @@ rip_init (void) install_default (RIP_NODE); install_element (RIP_NODE, &rip_version_cmd); install_element (RIP_NODE, &no_rip_version_cmd); - install_element (RIP_NODE, &no_rip_version_val_cmd); install_element (RIP_NODE, &rip_default_metric_cmd); install_element (RIP_NODE, &no_rip_default_metric_cmd); - install_element (RIP_NODE, &no_rip_default_metric_val_cmd); install_element (RIP_NODE, &rip_timers_cmd); install_element (RIP_NODE, &no_rip_timers_cmd); - install_element (RIP_NODE, &no_rip_timers_val_cmd); install_element (RIP_NODE, &rip_route_cmd); install_element (RIP_NODE, &no_rip_route_cmd); install_element (RIP_NODE, &rip_distance_cmd); diff --git a/ripngd/ripng_interface.c b/ripngd/ripng_interface.c index c6167dad6..930752abd 100644 --- a/ripngd/ripng_interface.c +++ b/ripngd/ripng_interface.c @@ -1038,6 +1038,16 @@ DEFUN (ipv6_ripng_split_horizon_poisoned_reverse, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ipv6 ripng split-horizon poisoned-reverse", + * NO_STR + * IPV6_STR + * "Routing Information Protocol\n" + * "Perform split horizon\n" + * "With poisoned-reverse\n" + * + */ DEFUN (no_ipv6_ripng_split_horizon, no_ipv6_ripng_split_horizon_cmd, "no ipv6 ripng split-horizon", @@ -1056,14 +1066,6 @@ DEFUN (no_ipv6_ripng_split_horizon, return CMD_SUCCESS; } -ALIAS (no_ipv6_ripng_split_horizon, - no_ipv6_ripng_split_horizon_poisoned_reverse_cmd, - "no ipv6 ripng split-horizon poisoned-reverse", - NO_STR - IPV6_STR - "Routing Information Protocol\n" - "Perform split horizon\n" - "With poisoned-reverse\n") DEFUN (ripng_passive_interface, ripng_passive_interface_cmd, @@ -1210,5 +1212,4 @@ ripng_if_init () install_element (INTERFACE_NODE, &ipv6_ripng_split_horizon_cmd); install_element (INTERFACE_NODE, &ipv6_ripng_split_horizon_poisoned_reverse_cmd); install_element (INTERFACE_NODE, &no_ipv6_ripng_split_horizon_cmd); - install_element (INTERFACE_NODE, &no_ipv6_ripng_split_horizon_poisoned_reverse_cmd); } diff --git a/ripngd/ripng_routemap.c b/ripngd/ripng_routemap.c index 52495aa3f..9c25d6003 100644 --- a/ripngd/ripng_routemap.c +++ b/ripngd/ripng_routemap.c @@ -500,7 +500,7 @@ static struct route_map_rule_cmd route_set_tag_cmd = #define MATCH_STR "Match values from routing table\n" #define SET_STR "Set values in destination routing protocol\n" -DEFUN (match_metric, +DEFUN (match_metric, match_metric_cmd, "match metric <0-4294967295>", MATCH_STR @@ -510,6 +510,15 @@ DEFUN (match_metric, return ripng_route_match_add (vty, vty->index, "metric", argv[2]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match metric <0-4294967295>", + * NO_STR + * MATCH_STR + * "Match metric of route\n" + * "Metric value\n" + * + */ DEFUN (no_match_metric, no_match_metric_cmd, "no match metric", @@ -520,13 +529,6 @@ DEFUN (no_match_metric, return ripng_route_match_delete (vty, vty->index, "metric", argv[3]->arg); } -ALIAS (no_match_metric, - no_match_metric_val_cmd, - "no match metric <0-4294967295>", - NO_STR - MATCH_STR - "Match metric of route\n" - "Metric value\n") DEFUN (match_interface, match_interface_cmd, @@ -538,6 +540,15 @@ DEFUN (match_interface, return ripng_route_match_add (vty, vty->index, "interface", argv[2]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match interface WORD", + * NO_STR + * MATCH_STR + * "Match first hop interface of route\n" + * "Interface name\n" + * + */ DEFUN (no_match_interface, no_match_interface_cmd, "no match interface", @@ -548,13 +559,6 @@ DEFUN (no_match_interface, return ripng_route_match_delete (vty, vty->index, "interface", argv[3]->arg); } -ALIAS (no_match_interface, - no_match_interface_val_cmd, - "no match interface WORD", - NO_STR - MATCH_STR - "Match first hop interface of route\n" - "Interface name\n") DEFUN (match_tag, match_tag_cmd, @@ -566,6 +570,15 @@ DEFUN (match_tag, return ripng_route_match_add (vty, vty->index, "tag", argv[2]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match tag <1-65535>", + * NO_STR + * MATCH_STR + * "Match tag of route\n" + * "Metric value\n" + * + */ DEFUN (no_match_tag, no_match_tag_cmd, "no match tag", @@ -576,13 +589,6 @@ DEFUN (no_match_tag, return ripng_route_match_delete (vty, vty->index, "tag", argv[3]->arg); } -ALIAS (no_match_tag, - no_match_tag_val_cmd, - "no match tag <1-65535>", - NO_STR - MATCH_STR - "Match tag of route\n" - "Metric value\n") /* set functions */ @@ -596,6 +602,15 @@ DEFUN (set_metric, return ripng_route_set_add (vty, vty->index, "metric", argv[2]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no set metric <0-4294967295>", + * NO_STR + * SET_STR + * "Metric value for destination routing protocol\n" + * "Metric value\n" + * + */ DEFUN (no_set_metric, no_set_metric_cmd, "no set metric", @@ -606,13 +621,6 @@ DEFUN (no_set_metric, return ripng_route_set_delete (vty, vty->index, "metric", argv[3]->arg); } -ALIAS (no_set_metric, - no_set_metric_val_cmd, - "no set metric <0-4294967295>", - NO_STR - SET_STR - "Metric value for destination routing protocol\n" - "Metric value\n") DEFUN (set_ipv6_nexthop_local, set_ipv6_nexthop_local_cmd, @@ -642,6 +650,17 @@ DEFUN (set_ipv6_nexthop_local, return ripng_route_set_add (vty, vty->index, "ipv6 next-hop local", argv[4]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no set ipv6 next-hop local X:X::X:X", + * NO_STR + * SET_STR + * IPV6_STR + * "IPv6 next-hop address\n" + * "IPv6 local address\n" + * "IPv6 address of next hop\n" + * + */ DEFUN (no_set_ipv6_nexthop_local, no_set_ipv6_nexthop_local_cmd, "no set ipv6 next-hop local", @@ -654,15 +673,6 @@ DEFUN (no_set_ipv6_nexthop_local, return ripng_route_set_delete (vty, vty->index, "ipv6 next-hop local", argv[5]->arg); } -ALIAS (no_set_ipv6_nexthop_local, - no_set_ipv6_nexthop_local_val_cmd, - "no set ipv6 next-hop local X:X::X:X", - NO_STR - SET_STR - IPV6_STR - "IPv6 next-hop address\n" - "IPv6 local address\n" - "IPv6 address of next hop\n") DEFUN (set_tag, set_tag_cmd, @@ -674,6 +684,15 @@ DEFUN (set_tag, return ripng_route_set_add (vty, vty->index, "tag", argv[2]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no set tag <1-65535>", + * NO_STR + * SET_STR + * "Tag value for routing protocol\n" + * "Tag value\n" + * + */ DEFUN (no_set_tag, no_set_tag_cmd, "no set tag", @@ -684,13 +703,6 @@ DEFUN (no_set_tag, return ripng_route_set_delete (vty, vty->index, "tag", argv[3]->arg); } -ALIAS (no_set_tag, - no_set_tag_val_cmd, - "no set tag <1-65535>", - NO_STR - SET_STR - "Tag value for routing protocol\n" - "Tag value\n") void ripng_route_map_reset () @@ -715,21 +727,15 @@ ripng_route_map_init () install_element (RMAP_NODE, &match_metric_cmd); install_element (RMAP_NODE, &no_match_metric_cmd); - install_element (RMAP_NODE, &no_match_metric_val_cmd); install_element (RMAP_NODE, &match_interface_cmd); install_element (RMAP_NODE, &no_match_interface_cmd); - install_element (RMAP_NODE, &no_match_interface_val_cmd); install_element (RMAP_NODE, &match_tag_cmd); install_element (RMAP_NODE, &no_match_tag_cmd); - install_element (RMAP_NODE, &no_match_tag_val_cmd); install_element (RMAP_NODE, &set_metric_cmd); install_element (RMAP_NODE, &no_set_metric_cmd); - install_element (RMAP_NODE, &no_set_metric_val_cmd); install_element (RMAP_NODE, &set_ipv6_nexthop_local_cmd); install_element (RMAP_NODE, &no_set_ipv6_nexthop_local_cmd); - install_element (RMAP_NODE, &no_set_ipv6_nexthop_local_val_cmd); install_element (RMAP_NODE, &set_tag_cmd); install_element (RMAP_NODE, &no_set_tag_cmd); - install_element (RMAP_NODE, &no_set_tag_val_cmd); } diff --git a/ripngd/ripng_zebra.c b/ripngd/ripng_zebra.c index 06ff558ab..055a074cc 100644 --- a/ripngd/ripng_zebra.c +++ b/ripngd/ripng_zebra.c @@ -345,6 +345,30 @@ DEFUN (ripng_redistribute_type, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no redistribute " QUAGGA_REDIST_STR_RIPNGD " metric <0-16> route-map WORD", + * NO_STR + * "Redistribute\n" + * QUAGGA_REDIST_HELP_STR_RIPNGD + * "Route map reference\n" + * "Pointer to route-map entries\n" + * + * "no redistribute " QUAGGA_REDIST_STR_RIPNGD " metric <0-16>", + * NO_STR + * "Redistribute\n" + * QUAGGA_REDIST_HELP_STR_RIPNGD + * "Metric\n" + * "Metric value\n" + * + * "no redistribute " QUAGGA_REDIST_STR_RIPNGD " route-map WORD", + * NO_STR + * "Redistribute\n" + * QUAGGA_REDIST_HELP_STR_RIPNGD + * "Route map reference\n" + * "Pointer to route-map entries\n" + * + */ DEFUN (no_ripng_redistribute_type, no_ripng_redistribute_type_cmd, "no redistribute " QUAGGA_REDIST_STR_RIPNGD, @@ -394,14 +418,6 @@ DEFUN (ripng_redistribute_type_metric, return CMD_SUCCESS; } -ALIAS (no_ripng_redistribute_type, - no_ripng_redistribute_type_metric_cmd, - "no redistribute " QUAGGA_REDIST_STR_RIPNGD " metric <0-16>", - NO_STR - "Redistribute\n" - QUAGGA_REDIST_HELP_STR_RIPNGD - "Metric\n" - "Metric value\n") DEFUN (ripng_redistribute_type_routemap, ripng_redistribute_type_routemap_cmd, @@ -427,14 +443,6 @@ DEFUN (ripng_redistribute_type_routemap, return CMD_SUCCESS; } -ALIAS (no_ripng_redistribute_type, - no_ripng_redistribute_type_routemap_cmd, - "no redistribute " QUAGGA_REDIST_STR_RIPNGD " route-map WORD", - NO_STR - "Redistribute\n" - QUAGGA_REDIST_HELP_STR_RIPNGD - "Route map reference\n" - "Pointer to route-map entries\n") DEFUN (ripng_redistribute_type_metric_routemap, ripng_redistribute_type_metric_routemap_cmd, @@ -464,14 +472,6 @@ DEFUN (ripng_redistribute_type_metric_routemap, return CMD_SUCCESS; } -ALIAS (no_ripng_redistribute_type, - no_ripng_redistribute_type_metric_routemap_cmd, - "no redistribute " QUAGGA_REDIST_STR_RIPNGD " metric <0-16> route-map WORD", - NO_STR - "Redistribute\n" - QUAGGA_REDIST_HELP_STR_RIPNGD - "Route map reference\n" - "Pointer to route-map entries\n") void ripng_redistribute_write (struct vty *vty, int config_mode) @@ -582,7 +582,4 @@ zebra_init (struct thread_master *master) install_element (RIPNG_NODE, &ripng_redistribute_type_metric_cmd); install_element (RIPNG_NODE, &ripng_redistribute_type_metric_routemap_cmd); install_element (RIPNG_NODE, &no_ripng_redistribute_type_cmd); - install_element (RIPNG_NODE, &no_ripng_redistribute_type_routemap_cmd); - install_element (RIPNG_NODE, &no_ripng_redistribute_type_metric_cmd); - install_element (RIPNG_NODE, &no_ripng_redistribute_type_metric_routemap_cmd); } diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c index dc00d9629..dd8f1fc39 100644 --- a/ripngd/ripngd.c +++ b/ripngd/ripngd.c @@ -2400,6 +2400,14 @@ DEFUN (ripng_default_metric, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no default-metric <1-16>", + * NO_STR + * "Set a metric of redistribute routes\n" + * "Default metric\n" + * + */ DEFUN (no_ripng_default_metric, no_ripng_default_metric_cmd, "no default-metric", @@ -2414,12 +2422,6 @@ DEFUN (no_ripng_default_metric, return CMD_SUCCESS; } -ALIAS (no_ripng_default_metric, - no_ripng_default_metric_val_cmd, - "no default-metric <1-16>", - NO_STR - "Set a metric of redistribute routes\n" - "Default metric\n") #if 0 /* RIPng update timer setup. */ @@ -2552,6 +2554,17 @@ DEFUN (ripng_timers, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no timers basic <0-65535> <0-65535> <0-65535>", + * NO_STR + * "RIPng timers setup\n" + * "Basic timer\n" + * "Routing table update timer value in second. Default is 30.\n" + * "Routing information timeout timer. Default is 180.\n" + * "Garbage collection timer. Default is 120.\n" + * + */ DEFUN (no_ripng_timers, no_ripng_timers_cmd, "no timers basic", @@ -2570,15 +2583,6 @@ DEFUN (no_ripng_timers, return CMD_SUCCESS; } -ALIAS (no_ripng_timers, - no_ripng_timers_val_cmd, - "no timers basic <0-65535> <0-65535> <0-65535>", - NO_STR - "RIPng timers setup\n" - "Basic timer\n" - "Routing table update timer value in second. Default is 30.\n" - "Routing information timeout timer. Default is 180.\n" - "Garbage collection timer. Default is 120.\n") DEFUN (show_ipv6_protocols, show_ipv6_protocols_cmd, @@ -3110,11 +3114,9 @@ ripng_init () install_element (RIPNG_NODE, &ripng_default_metric_cmd); install_element (RIPNG_NODE, &no_ripng_default_metric_cmd); - install_element (RIPNG_NODE, &no_ripng_default_metric_val_cmd); install_element (RIPNG_NODE, &ripng_timers_cmd); install_element (RIPNG_NODE, &no_ripng_timers_cmd); - install_element (RIPNG_NODE, &no_ripng_timers_val_cmd); #if 0 install_element (RIPNG_NODE, &ripng_update_timer_cmd); install_element (RIPNG_NODE, &no_ripng_update_timer_cmd); diff --git a/zebra/interface.c b/zebra/interface.c index 737bf9665..5e2f64b54 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1249,13 +1249,6 @@ DEFUN_NOSH (zebra_interface, return ret; } -ALIAS (zebra_interface, - zebra_interface_vrf_cmd, - "interface IFNAME " VRF_CMD_STR, - "Select an interface to configure\n" - "Interface's name\n" - VRF_CMD_HELP_STR) - static void interface_update_stats (void) { @@ -1305,6 +1298,14 @@ struct cmd_node vrf_node = }; /* Show all interfaces to vty. */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show interface " VRF_CMD_STR, + * SHOW_STR + * "Interface status and configuration\n" + * VRF_CMD_HELP_STR + * + */ DEFUN (show_interface, show_interface_cmd, "show interface", @@ -1327,12 +1328,6 @@ DEFUN (show_interface, return CMD_SUCCESS; } -ALIAS (show_interface, - show_interface_vrf_cmd, - "show interface " VRF_CMD_STR, - SHOW_STR - "Interface status and configuration\n" - VRF_CMD_HELP_STR) /* Show all interfaces to vty. */ DEFUN (show_interface_vrf_all, @@ -1388,6 +1383,14 @@ DEFUN (show_interface_name_vrf, } /* Show specified interface to vty. */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show interface IFNAME", + * SHOW_STR + * "Interface status and configuration\n" + * "Interface name\n" + * + */ DEFUN (show_interface_name_vrf_all, show_interface_name_vrf_all_cmd, "show interface IFNAME " VRF_ALL_CMD_STR, @@ -1423,11 +1426,6 @@ DEFUN (show_interface_name_vrf_all, return CMD_SUCCESS; } -ALIAS (show_interface_name_vrf_all, show_interface_name_cmd, - "show interface IFNAME", - SHOW_STR - "Interface status and configuration\n" - "Interface name\n") static void if_show_description (struct vty *vty, vrf_id_t vrf_id) @@ -1469,6 +1467,15 @@ if_show_description (struct vty *vty, vrf_id_t vrf_id) } } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show interface description " VRF_CMD_STR, + * SHOW_STR + * "Interface status and configuration\n" + * "Interface description\n" + * VRF_CMD_HELP_STR + * + */ DEFUN (show_interface_desc, show_interface_desc_cmd, "show interface description", @@ -1486,13 +1493,6 @@ DEFUN (show_interface_desc, return CMD_SUCCESS; } -ALIAS (show_interface_desc, - show_interface_desc_vrf_cmd, - "show interface description " VRF_CMD_STR, - SHOW_STR - "Interface status and configuration\n" - "Interface description\n" - VRF_CMD_HELP_STR) DEFUN (show_interface_desc_vrf_all, show_interface_desc_vrf_all_cmd, @@ -1700,6 +1700,14 @@ DEFUN (bandwidth_if, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no bandwidth <1-100000>", + * NO_STR + * "Set bandwidth informational parameter\n" + * "Bandwidth in megabits\n" + * + */ DEFUN (no_bandwidth_if, no_bandwidth_if_cmd, "no bandwidth", @@ -1719,12 +1727,6 @@ DEFUN (no_bandwidth_if, return CMD_SUCCESS; } -ALIAS (no_bandwidth_if, - no_bandwidth_if_val_cmd, - "no bandwidth <1-100000>", - NO_STR - "Set bandwidth informational parameter\n" - "Bandwidth in megabits\n") struct cmd_node link_params_node = { @@ -2086,6 +2088,17 @@ DEFUN (no_link_params_inter_as, } /* RFC7471: OSPF Traffic Engineering (TE) Metric extensions & draft-ietf-isis-metric-extensions-07.txt */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "delay <0-16777215> min <0-16777215> max <0-16777215>", + * "Unidirectional Average Link Delay (optionally Minimum and Maximum delays)\n" + * "Average delay in micro-second as decimal (0...16777215)\n" + * "Minimum delay\n" + * "Minimum delay in micro-second as decimal (0...16777215)\n" + * "Maximum delay\n" + * "Maximum delay in micro-second as decimal (0...16777215)\n" + * + */ DEFUN (link_params_delay, link_params_delay_cmd, "delay <0-16777215>", @@ -2169,15 +2182,6 @@ DEFUN (link_params_delay, return CMD_SUCCESS; } -ALIAS (link_params_delay, - link_params_delay_mm_cmd, - "delay <0-16777215> min <0-16777215> max <0-16777215>", - "Unidirectional Average Link Delay (optionally Minimum and Maximum delays)\n" - "Average delay in micro-second as decimal (0...16777215)\n" - "Minimum delay\n" - "Minimum delay in micro-second as decimal (0...16777215)\n" - "Maximum delay\n" - "Maximum delay in micro-second as decimal (0...16777215)\n") DEFUN (no_link_params_delay, no_link_params_delay_cmd, @@ -2946,22 +2950,16 @@ zebra_if_init (void) install_node (&vrf_node, vrf_config_write); install_element (VIEW_NODE, &show_interface_cmd); - install_element (VIEW_NODE, &show_interface_vrf_cmd); install_element (VIEW_NODE, &show_interface_vrf_all_cmd); - install_element (VIEW_NODE, &show_interface_name_cmd); install_element (VIEW_NODE, &show_interface_name_vrf_cmd); install_element (VIEW_NODE, &show_interface_name_vrf_all_cmd); install_element (ENABLE_NODE, &show_interface_cmd); - install_element (ENABLE_NODE, &show_interface_vrf_cmd); install_element (ENABLE_NODE, &show_interface_vrf_all_cmd); - install_element (ENABLE_NODE, &show_interface_name_cmd); install_element (ENABLE_NODE, &show_interface_name_vrf_cmd); install_element (ENABLE_NODE, &show_interface_name_vrf_all_cmd); install_element (ENABLE_NODE, &show_interface_desc_cmd); - install_element (ENABLE_NODE, &show_interface_desc_vrf_cmd); install_element (ENABLE_NODE, &show_interface_desc_vrf_all_cmd); install_element (CONFIG_NODE, &zebra_interface_cmd); - install_element (CONFIG_NODE, &zebra_interface_vrf_cmd); install_element (CONFIG_NODE, &no_interface_cmd); install_element (CONFIG_NODE, &no_interface_vrf_cmd); install_default (INTERFACE_NODE); @@ -2975,7 +2973,6 @@ zebra_if_init (void) install_element (INTERFACE_NODE, &no_shutdown_if_cmd); install_element (INTERFACE_NODE, &bandwidth_if_cmd); install_element (INTERFACE_NODE, &no_bandwidth_if_cmd); - install_element (INTERFACE_NODE, &no_bandwidth_if_val_cmd); install_element (INTERFACE_NODE, &ip_address_cmd); install_element (INTERFACE_NODE, &no_ip_address_cmd); #ifdef HAVE_IPV6 @@ -2998,7 +2995,6 @@ zebra_if_init (void) install_element(LINK_PARAMS_NODE, &link_params_inter_as_cmd); install_element(LINK_PARAMS_NODE, &no_link_params_inter_as_cmd); install_element(LINK_PARAMS_NODE, &link_params_delay_cmd); - install_element(LINK_PARAMS_NODE, &link_params_delay_mm_cmd); install_element(LINK_PARAMS_NODE, &link_params_delay_var_cmd); install_element(LINK_PARAMS_NODE, &link_params_pkt_loss_cmd); install_element(LINK_PARAMS_NODE, &link_params_ava_bw_cmd); diff --git a/zebra/router-id.c b/zebra/router-id.c index fbd9e2b0c..05eee8ad3 100644 --- a/zebra/router-id.c +++ b/zebra/router-id.c @@ -214,6 +214,14 @@ router_id_write (struct vty *vty) } } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "router-id A.B.C.D " VRF_CMD_STR, + * "Manually set the router-id\n" + * "IP address to use for router-id\n" + * VRF_CMD_HELP_STR + * + */ DEFUN (router_id, router_id_cmd, "router-id A.B.C.D", @@ -238,13 +246,21 @@ DEFUN (router_id, return CMD_SUCCESS; } -ALIAS (router_id, - router_id_vrf_cmd, - "router-id A.B.C.D " VRF_CMD_STR, - "Manually set the router-id\n" - "IP address to use for router-id\n" - VRF_CMD_HELP_STR) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no router-id A.B.C.D", + * NO_STR + * "Remove the manually configured router-id\n" + * "IP address to use for router-id\n" + * + * "no router-id A.B.C.D " VRF_CMD_STR, + * NO_STR + * "Remove the manually configured router-id\n" + * "IP address to use for router-id\n" + * VRF_CMD_HELP_STR + * + */ DEFUN (no_router_id, no_router_id_cmd, "no router-id", @@ -266,20 +282,7 @@ DEFUN (no_router_id, return CMD_SUCCESS; } -ALIAS (no_router_id, - no_router_id_val_cmd, - "no router-id A.B.C.D", - NO_STR - "Remove the manually configured router-id\n" - "IP address to use for router-id\n") -ALIAS (no_router_id, - no_router_id_vrf_cmd, - "no router-id A.B.C.D " VRF_CMD_STR, - NO_STR - "Remove the manually configured router-id\n" - "IP address to use for router-id\n" - VRF_CMD_HELP_STR) static int router_id_cmp (void *a, void *b) @@ -295,9 +298,6 @@ router_id_cmd_init (void) { install_element (CONFIG_NODE, &router_id_cmd); install_element (CONFIG_NODE, &no_router_id_cmd); - install_element (CONFIG_NODE, &router_id_vrf_cmd); - install_element (CONFIG_NODE, &no_router_id_val_cmd); - install_element (CONFIG_NODE, &no_router_id_vrf_cmd); } void diff --git a/zebra/rtadv.c b/zebra/rtadv.c index 331838e92..d372c985f 100644 --- a/zebra/rtadv.c +++ b/zebra/rtadv.c @@ -985,6 +985,22 @@ DEFUN (ipv6_nd_ra_interval, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ipv6 nd ra-interval <1-1800>", + * NO_STR + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Router Advertisement interval\n" + * + * "no ipv6 nd ra-interval msec <1-1800000>", + * NO_STR + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Router Advertisement interval\n" + * "Router Advertisement interval in milliseconds\n" + * + */ DEFUN (no_ipv6_nd_ra_interval, no_ipv6_nd_ra_interval_cmd, "no ipv6 nd ra-interval", @@ -1013,22 +1029,7 @@ DEFUN (no_ipv6_nd_ra_interval, return CMD_SUCCESS; } -ALIAS (no_ipv6_nd_ra_interval, - no_ipv6_nd_ra_interval_val_cmd, - "no ipv6 nd ra-interval <1-1800>", - NO_STR - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Router Advertisement interval\n") -ALIAS (no_ipv6_nd_ra_interval, - no_ipv6_nd_ra_interval_msec_val_cmd, - "no ipv6 nd ra-interval msec <1-1800000>", - NO_STR - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Router Advertisement interval\n" - "Router Advertisement interval in milliseconds\n") DEFUN (ipv6_nd_ra_lifetime, ipv6_nd_ra_lifetime_cmd, @@ -1062,6 +1063,16 @@ DEFUN (ipv6_nd_ra_lifetime, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ipv6 nd ra-lifetime <0-9000>", + * NO_STR + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Router lifetime\n" + * "Router lifetime in seconds (0 stands for a non-default gw)\n" + * + */ DEFUN (no_ipv6_nd_ra_lifetime, no_ipv6_nd_ra_lifetime_cmd, "no ipv6 nd ra-lifetime", @@ -1081,14 +1092,6 @@ DEFUN (no_ipv6_nd_ra_lifetime, return CMD_SUCCESS; } -ALIAS (no_ipv6_nd_ra_lifetime, - no_ipv6_nd_ra_lifetime_val_cmd, - "no ipv6 nd ra-lifetime <0-9000>", - NO_STR - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Router lifetime\n" - "Router lifetime in seconds (0 stands for a non-default gw)\n") DEFUN (ipv6_nd_reachable_time, ipv6_nd_reachable_time_cmd, @@ -1104,6 +1107,16 @@ DEFUN (ipv6_nd_reachable_time, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ipv6 nd reachable-time <1-3600000>", + * NO_STR + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Reachable time\n" + * "Reachable time in milliseconds\n" + * + */ DEFUN (no_ipv6_nd_reachable_time, no_ipv6_nd_reachable_time_cmd, "no ipv6 nd reachable-time", @@ -1123,14 +1136,6 @@ DEFUN (no_ipv6_nd_reachable_time, return CMD_SUCCESS; } -ALIAS (no_ipv6_nd_reachable_time, - no_ipv6_nd_reachable_time_val_cmd, - "no ipv6 nd reachable-time <1-3600000>", - NO_STR - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Reachable time\n" - "Reachable time in milliseconds\n") DEFUN (ipv6_nd_homeagent_preference, ipv6_nd_homeagent_preference_cmd, @@ -1146,6 +1151,16 @@ DEFUN (ipv6_nd_homeagent_preference, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ipv6 nd home-agent-preference <0-65535>", + * NO_STR + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Home Agent preference\n" + * "preference value (default is 0, least preferred)\n" + * + */ DEFUN (no_ipv6_nd_homeagent_preference, no_ipv6_nd_homeagent_preference_cmd, "no ipv6 nd home-agent-preference", @@ -1165,14 +1180,6 @@ DEFUN (no_ipv6_nd_homeagent_preference, return CMD_SUCCESS; } -ALIAS (no_ipv6_nd_homeagent_preference, - no_ipv6_nd_homeagent_preference_val_cmd, - "no ipv6 nd home-agent-preference <0-65535>", - NO_STR - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Home Agent preference\n" - "preference value (default is 0, least preferred)\n") DEFUN (ipv6_nd_homeagent_lifetime, ipv6_nd_homeagent_lifetime_cmd, @@ -1188,6 +1195,16 @@ DEFUN (ipv6_nd_homeagent_lifetime, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ipv6 nd home-agent-lifetime <0-65520>", + * NO_STR + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Home Agent lifetime\n" + * "Home Agent lifetime in seconds (0 to track ra-lifetime)\n" + * + */ DEFUN (no_ipv6_nd_homeagent_lifetime, no_ipv6_nd_homeagent_lifetime_cmd, "no ipv6 nd home-agent-lifetime", @@ -1207,14 +1224,6 @@ DEFUN (no_ipv6_nd_homeagent_lifetime, return CMD_SUCCESS; } -ALIAS (no_ipv6_nd_homeagent_lifetime, - no_ipv6_nd_homeagent_lifetime_val_cmd, - "no ipv6 nd home-agent-lifetime <0-65520>", - NO_STR - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Home Agent lifetime\n" - "Home Agent lifetime in seconds (0 to track ra-lifetime)\n") DEFUN (ipv6_nd_managed_config_flag, ipv6_nd_managed_config_flag_cmd, @@ -1364,6 +1373,139 @@ DEFUN (no_ipv6_nd_other_config_flag, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "ipv6 nd prefix X:X::X:X/M (no-autoconfig|)", + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Prefix information\n" + * "IPv6 prefix\n" + * "Do not use prefix for autoconfiguration\n" + * + * "ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) " + * "(<0-4294967295>|infinite)", + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Prefix information\n" + * "IPv6 prefix\n" + * "Valid lifetime in seconds\n" + * "Infinite valid lifetime\n" + * "Preferred lifetime in seconds\n" + * "Infinite preferred lifetime\n" + * + * "ipv6 nd prefix X:X::X:X/M (off-link|) (no-autoconfig|)", + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Prefix information\n" + * "IPv6 prefix\n" + * "Do not use prefix for onlink determination\n" + * "Do not use prefix for autoconfiguration\n" + * + * "ipv6 nd prefix X:X::X:X/M (router-address|)", + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Prefix information\n" + * "IPv6 prefix\n" + * "Set Router Address flag\n" + * + * "ipv6 nd prefix X:X::X:X/M (no-autoconfig|) (off-link|)", + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Prefix information\n" + * "IPv6 prefix\n" + * "Do not use prefix for autoconfiguration\n" + * "Do not use prefix for onlink determination\n" + * + * "ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) " + * "(<0-4294967295>|infinite) (router-address|)", + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Prefix information\n" + * "IPv6 prefix\n" + * "Valid lifetime in seconds\n" + * "Infinite valid lifetime\n" + * "Preferred lifetime in seconds\n" + * "Infinite preferred lifetime\n" + * "Set Router Address flag\n" + * + * "ipv6 nd prefix X:X::X:X/M", + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Prefix information\n" + * "IPv6 prefix\n" + * + * "ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) " + * "(<0-4294967295>|infinite) (off-link|) (no-autoconfig|)", + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Prefix information\n" + * "IPv6 prefix\n" + * "Valid lifetime in seconds\n" + * "Infinite valid lifetime\n" + * "Preferred lifetime in seconds\n" + * "Infinite preferred lifetime\n" + * "Do not use prefix for onlink determination\n" + * "Do not use prefix for autoconfiguration\n" + * + * "ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) " + * "(<0-4294967295>|infinite) (no-autoconfig|) (off-link|)", + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Prefix information\n" + * "IPv6 prefix\n" + * "Valid lifetime in seconds\n" + * "Infinite valid lifetime\n" + * "Preferred lifetime in seconds\n" + * "Infinite preferred lifetime\n" + * "Do not use prefix for autoconfiguration\n" + * "Do not use prefix for onlink determination\n" + * + * "ipv6 nd prefix X:X::X:X/M (off-link|)", + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Prefix information\n" + * "IPv6 prefix\n" + * "Do not use prefix for onlink determination\n" + * + * "ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) " + * "(<0-4294967295>|infinite) (no-autoconfig|)", + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Prefix information\n" + * "IPv6 prefix\n" + * "Valid lifetime in seconds\n" + * "Infinite valid lifetime\n" + * "Preferred lifetime in seconds\n" + * "Infinite preferred lifetime\n" + * "Do not use prefix for autoconfiguration" + * + * "ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) " + * "(<0-4294967295>|infinite) (off-link|)", + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Prefix information\n" + * "IPv6 prefix\n" + * "Valid lifetime in seconds\n" + * "Infinite valid lifetime\n" + * "Preferred lifetime in seconds\n" + * "Infinite preferred lifetime\n" + * "Do not use prefix for onlink determination\n" + * + * "ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) " + * "(<0-4294967295>|infinite) (no-autoconfig|) (off-link|) (router-address|)", + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Prefix information\n" + * "IPv6 prefix\n" + * "Valid lifetime in seconds\n" + * "Infinite valid lifetime\n" + * "Preferred lifetime in seconds\n" + * "Infinite preferred lifetime\n" + * "Do not use prefix for autoconfiguration\n" + * "Do not use prefix for onlink determination\n" + * "Set Router Address flag\n" + * + */ DEFUN (ipv6_nd_prefix, ipv6_nd_prefix_cmd, "ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) (<0-4294967295>|infinite) (off-link|) (no-autoconfig|) (router-address|)", @@ -1445,162 +1587,152 @@ DEFUN (ipv6_nd_prefix, return CMD_SUCCESS; } -ALIAS (ipv6_nd_prefix, - ipv6_nd_prefix_val_nortaddr_cmd, - "ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) " - "(<0-4294967295>|infinite) (off-link|) (no-autoconfig|)", - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Prefix information\n" - "IPv6 prefix\n" - "Valid lifetime in seconds\n" - "Infinite valid lifetime\n" - "Preferred lifetime in seconds\n" - "Infinite preferred lifetime\n" - "Do not use prefix for onlink determination\n" - "Do not use prefix for autoconfiguration\n") -ALIAS (ipv6_nd_prefix, - ipv6_nd_prefix_val_rev_cmd, - "ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) " - "(<0-4294967295>|infinite) (no-autoconfig|) (off-link|)", - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Prefix information\n" - "IPv6 prefix\n" - "Valid lifetime in seconds\n" - "Infinite valid lifetime\n" - "Preferred lifetime in seconds\n" - "Infinite preferred lifetime\n" - "Do not use prefix for autoconfiguration\n" - "Do not use prefix for onlink determination\n") -ALIAS (ipv6_nd_prefix, - ipv6_nd_prefix_val_rev_rtaddr_cmd, - "ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) " - "(<0-4294967295>|infinite) (no-autoconfig|) (off-link|) (router-address|)", - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Prefix information\n" - "IPv6 prefix\n" - "Valid lifetime in seconds\n" - "Infinite valid lifetime\n" - "Preferred lifetime in seconds\n" - "Infinite preferred lifetime\n" - "Do not use prefix for autoconfiguration\n" - "Do not use prefix for onlink determination\n" - "Set Router Address flag\n") -ALIAS (ipv6_nd_prefix, - ipv6_nd_prefix_val_noauto_cmd, - "ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) " - "(<0-4294967295>|infinite) (no-autoconfig|)", - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Prefix information\n" - "IPv6 prefix\n" - "Valid lifetime in seconds\n" - "Infinite valid lifetime\n" - "Preferred lifetime in seconds\n" - "Infinite preferred lifetime\n" - "Do not use prefix for autoconfiguration") -ALIAS (ipv6_nd_prefix, - ipv6_nd_prefix_val_offlink_cmd, - "ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) " - "(<0-4294967295>|infinite) (off-link|)", - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Prefix information\n" - "IPv6 prefix\n" - "Valid lifetime in seconds\n" - "Infinite valid lifetime\n" - "Preferred lifetime in seconds\n" - "Infinite preferred lifetime\n" - "Do not use prefix for onlink determination\n") -ALIAS (ipv6_nd_prefix, - ipv6_nd_prefix_val_rtaddr_cmd, - "ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) " - "(<0-4294967295>|infinite) (router-address|)", - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Prefix information\n" - "IPv6 prefix\n" - "Valid lifetime in seconds\n" - "Infinite valid lifetime\n" - "Preferred lifetime in seconds\n" - "Infinite preferred lifetime\n" - "Set Router Address flag\n") -ALIAS (ipv6_nd_prefix, - ipv6_nd_prefix_val_cmd, - "ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) " - "(<0-4294967295>|infinite)", - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Prefix information\n" - "IPv6 prefix\n" - "Valid lifetime in seconds\n" - "Infinite valid lifetime\n" - "Preferred lifetime in seconds\n" - "Infinite preferred lifetime\n") -ALIAS (ipv6_nd_prefix, - ipv6_nd_prefix_noval_cmd, - "ipv6 nd prefix X:X::X:X/M (no-autoconfig|) (off-link|)", - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Prefix information\n" - "IPv6 prefix\n" - "Do not use prefix for autoconfiguration\n" - "Do not use prefix for onlink determination\n") -ALIAS (ipv6_nd_prefix, - ipv6_nd_prefix_noval_rev_cmd, - "ipv6 nd prefix X:X::X:X/M (off-link|) (no-autoconfig|)", - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Prefix information\n" - "IPv6 prefix\n" - "Do not use prefix for onlink determination\n" - "Do not use prefix for autoconfiguration\n") -ALIAS (ipv6_nd_prefix, - ipv6_nd_prefix_noval_noauto_cmd, - "ipv6 nd prefix X:X::X:X/M (no-autoconfig|)", - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Prefix information\n" - "IPv6 prefix\n" - "Do not use prefix for autoconfiguration\n") -ALIAS (ipv6_nd_prefix, - ipv6_nd_prefix_noval_offlink_cmd, - "ipv6 nd prefix X:X::X:X/M (off-link|)", - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Prefix information\n" - "IPv6 prefix\n" - "Do not use prefix for onlink determination\n") -ALIAS (ipv6_nd_prefix, - ipv6_nd_prefix_noval_rtaddr_cmd, - "ipv6 nd prefix X:X::X:X/M (router-address|)", - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Prefix information\n" - "IPv6 prefix\n" - "Set Router Address flag\n") -ALIAS (ipv6_nd_prefix, - ipv6_nd_prefix_prefix_cmd, - "ipv6 nd prefix X:X::X:X/M", - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Prefix information\n" - "IPv6 prefix\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) (<0-4294967295>|infinite) (no-autoconfig|) (off-link|)", + * NO_STR + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Prefix information\n" + * "IPv6 prefix\n" + * "Valid lifetime in seconds\n" + * "Infinite valid lifetime\n" + * "Preferred lifetime in seconds\n" + * "Infinite preferred lifetime\n" + * "Do not use prefix for autoconfiguration\n" + * "Do not use prefix for onlink determination\n" + * + * "no ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) (<0-4294967295>|infinite) (no-autoconfig|)", + * NO_STR + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Prefix information\n" + * "IPv6 prefix\n" + * "Valid lifetime in seconds\n" + * "Infinite valid lifetime\n" + * "Preferred lifetime in seconds\n" + * "Infinite preferred lifetime\n" + * "Do not use prefix for autoconfiguration" + * + * "no ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) (<0-4294967295>|infinite) (off-link|) (no-autoconfig|) (router-address|)", + * NO_STR + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Prefix information\n" + * "IPv6 prefix\n" + * "Valid lifetime in seconds\n" + * "Infinite valid lifetime\n" + * "Preferred lifetime in seconds\n" + * "Infinite preferred lifetime\n" + * "Do not use prefix for onlink determination\n" + * "Do not use prefix for autoconfiguration\n" + * "Set Router Address flag\n" + * + * "no ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) (<0-4294967295>|infinite) (off-link|)", + * NO_STR + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Prefix information\n" + * "IPv6 prefix\n" + * "Valid lifetime in seconds\n" + * "Infinite valid lifetime\n" + * "Preferred lifetime in seconds\n" + * "Infinite preferred lifetime\n" + * "Do not use prefix for onlink determination\n" + * + * "no ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) (<0-4294967295>|infinite) (no-autoconfig|) (off-link|) (router-address|)", + * NO_STR + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Prefix information\n" + * "IPv6 prefix\n" + * "Valid lifetime in seconds\n" + * "Infinite valid lifetime\n" + * "Preferred lifetime in seconds\n" + * "Infinite preferred lifetime\n" + * "Do not use prefix for autoconfiguration\n" + * "Do not use prefix for onlink determination\n" + * "Set Router Address flag\n" + * + * "no ipv6 nd prefix X:X::X:X/M (router-address|)", + * NO_STR + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Prefix information\n" + * "IPv6 prefix\n" + * "Set Router Address flag\n" + * + * "no ipv6 nd prefix X:X::X:X/M (off-link|)", + * NO_STR + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Prefix information\n" + * "IPv6 prefix\n" + * "Do not use prefix for onlink determination\n" + * + * "no ipv6 nd prefix X:X::X:X/M (no-autoconfig|)", + * NO_STR + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Prefix information\n" + * "IPv6 prefix\n" + * "Do not use prefix for autoconfiguration\n" + * + * "no ipv6 nd prefix X:X::X:X/M (no-autoconfig|) (off-link|)", + * NO_STR + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Prefix information\n" + * "IPv6 prefix\n" + * "Do not use prefix for autoconfiguration\n" + * "Do not use prefix for onlink determination\n" + * + * "no ipv6 nd prefix X:X::X:X/M (off-link|) (no-autoconfig|)", + * NO_STR + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Prefix information\n" + * "IPv6 prefix\n" + * "Do not use prefix for onlink determination\n" + * "Do not use prefix for autoconfiguration\n" + * + * "no ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) (<0-4294967295>|infinite) (router-address|)", + * NO_STR + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Prefix information\n" + * "IPv6 prefix\n" + * "Valid lifetime in seconds\n" + * "Infinite valid lifetime\n" + * "Preferred lifetime in seconds\n" + * "Infinite preferred lifetime\n" + * "Set Router Address flag\n" + * + * "no ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) (<0-4294967295>|infinite)", + * NO_STR + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Prefix information\n" + * "IPv6 prefix\n" + * "Valid lifetime in seconds\n" + * "Infinite valid lifetime\n" + * "Preferred lifetime in seconds\n" + * "Infinite preferred lifetime\n" + * + */ DEFUN (no_ipv6_nd_prefix, no_ipv6_nd_prefix_cmd, "no ipv6 nd prefix IPV6PREFIX", @@ -1636,159 +1768,17 @@ DEFUN (no_ipv6_nd_prefix, return CMD_SUCCESS; } -ALIAS (no_ipv6_nd_prefix, - no_ipv6_nd_prefix_val_nortaddr_cmd, - "no ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) (<0-4294967295>|infinite) (off-link|) (no-autoconfig|) (router-address|)", - NO_STR - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Prefix information\n" - "IPv6 prefix\n" - "Valid lifetime in seconds\n" - "Infinite valid lifetime\n" - "Preferred lifetime in seconds\n" - "Infinite preferred lifetime\n" - "Do not use prefix for onlink determination\n" - "Do not use prefix for autoconfiguration\n" - "Set Router Address flag\n") -ALIAS (no_ipv6_nd_prefix, - no_ipv6_nd_prefix_val_rev_cmd, - "no ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) (<0-4294967295>|infinite) (no-autoconfig|) (off-link|)", - NO_STR - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Prefix information\n" - "IPv6 prefix\n" - "Valid lifetime in seconds\n" - "Infinite valid lifetime\n" - "Preferred lifetime in seconds\n" - "Infinite preferred lifetime\n" - "Do not use prefix for autoconfiguration\n" - "Do not use prefix for onlink determination\n") -ALIAS (no_ipv6_nd_prefix, - no_ipv6_nd_prefix_val_rev_rtaddr_cmd, - "no ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) (<0-4294967295>|infinite) (no-autoconfig|) (off-link|) (router-address|)", - NO_STR - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Prefix information\n" - "IPv6 prefix\n" - "Valid lifetime in seconds\n" - "Infinite valid lifetime\n" - "Preferred lifetime in seconds\n" - "Infinite preferred lifetime\n" - "Do not use prefix for autoconfiguration\n" - "Do not use prefix for onlink determination\n" - "Set Router Address flag\n") -ALIAS (no_ipv6_nd_prefix, - no_ipv6_nd_prefix_val_noauto_cmd, - "no ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) (<0-4294967295>|infinite) (no-autoconfig|)", - NO_STR - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Prefix information\n" - "IPv6 prefix\n" - "Valid lifetime in seconds\n" - "Infinite valid lifetime\n" - "Preferred lifetime in seconds\n" - "Infinite preferred lifetime\n" - "Do not use prefix for autoconfiguration") -ALIAS (no_ipv6_nd_prefix, - no_ipv6_nd_prefix_val_offlink_cmd, - "no ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) (<0-4294967295>|infinite) (off-link|)", - NO_STR - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Prefix information\n" - "IPv6 prefix\n" - "Valid lifetime in seconds\n" - "Infinite valid lifetime\n" - "Preferred lifetime in seconds\n" - "Infinite preferred lifetime\n" - "Do not use prefix for onlink determination\n") -ALIAS (no_ipv6_nd_prefix, - no_ipv6_nd_prefix_val_rtaddr_cmd, - "no ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) (<0-4294967295>|infinite) (router-address|)", - NO_STR - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Prefix information\n" - "IPv6 prefix\n" - "Valid lifetime in seconds\n" - "Infinite valid lifetime\n" - "Preferred lifetime in seconds\n" - "Infinite preferred lifetime\n" - "Set Router Address flag\n") -ALIAS (no_ipv6_nd_prefix, - no_ipv6_nd_prefix_val_cmd, - "no ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) (<0-4294967295>|infinite)", - NO_STR - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Prefix information\n" - "IPv6 prefix\n" - "Valid lifetime in seconds\n" - "Infinite valid lifetime\n" - "Preferred lifetime in seconds\n" - "Infinite preferred lifetime\n") -ALIAS (no_ipv6_nd_prefix, - no_ipv6_nd_prefix_noval_cmd, - "no ipv6 nd prefix X:X::X:X/M (no-autoconfig|) (off-link|)", - NO_STR - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Prefix information\n" - "IPv6 prefix\n" - "Do not use prefix for autoconfiguration\n" - "Do not use prefix for onlink determination\n") -ALIAS (no_ipv6_nd_prefix, - no_ipv6_nd_prefix_noval_rev_cmd, - "no ipv6 nd prefix X:X::X:X/M (off-link|) (no-autoconfig|)", - NO_STR - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Prefix information\n" - "IPv6 prefix\n" - "Do not use prefix for onlink determination\n" - "Do not use prefix for autoconfiguration\n") -ALIAS (no_ipv6_nd_prefix, - no_ipv6_nd_prefix_noval_noauto_cmd, - "no ipv6 nd prefix X:X::X:X/M (no-autoconfig|)", - NO_STR - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Prefix information\n" - "IPv6 prefix\n" - "Do not use prefix for autoconfiguration\n") -ALIAS (no_ipv6_nd_prefix, - no_ipv6_nd_prefix_noval_offlink_cmd, - "no ipv6 nd prefix X:X::X:X/M (off-link|)", - NO_STR - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Prefix information\n" - "IPv6 prefix\n" - "Do not use prefix for onlink determination\n") -ALIAS (no_ipv6_nd_prefix, - no_ipv6_nd_prefix_noval_rtaddr_cmd, - "no ipv6 nd prefix X:X::X:X/M (router-address|)", - NO_STR - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Prefix information\n" - "IPv6 prefix\n" - "Set Router Address flag\n") DEFUN (ipv6_nd_router_preference, ipv6_nd_router_preference_cmd, @@ -1820,6 +1810,18 @@ DEFUN (ipv6_nd_router_preference, return CMD_ERR_NO_MATCH; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ipv6 nd router-preference (high|medium|low)", + * NO_STR + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Default router preference\n" + * "High default router preference\n" + * "Low default router preference\n" + * "Medium default router preference (default)\n" + * + */ DEFUN (no_ipv6_nd_router_preference, no_ipv6_nd_router_preference_cmd, "no ipv6 nd router-preference", @@ -1839,16 +1841,6 @@ DEFUN (no_ipv6_nd_router_preference, return CMD_SUCCESS; } -ALIAS (no_ipv6_nd_router_preference, - no_ipv6_nd_router_preference_val_cmd, - "no ipv6 nd router-preference (high|medium|low)", - NO_STR - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Default router preference\n" - "High default router preference\n" - "Low default router preference\n" - "Medium default router preference (default)\n") DEFUN (ipv6_nd_mtu, ipv6_nd_mtu_cmd, @@ -1864,6 +1856,16 @@ DEFUN (ipv6_nd_mtu, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ipv6 nd mtu <1-65535>", + * NO_STR + * "Interface IPv6 config commands\n" + * "Neighbor discovery\n" + * "Advertised MTU\n" + * "MTU in bytes\n" + * + */ DEFUN (no_ipv6_nd_mtu, no_ipv6_nd_mtu_cmd, "no ipv6 nd mtu", @@ -1878,14 +1880,6 @@ DEFUN (no_ipv6_nd_mtu, return CMD_SUCCESS; } -ALIAS (no_ipv6_nd_mtu, - no_ipv6_nd_mtu_val_cmd, - "no ipv6 nd mtu <1-65535>", - NO_STR - "Interface IPv6 config commands\n" - "Neighbor discovery\n" - "Advertised MTU\n" - "MTU in bytes\n") /* Write configuration about router advertisement. */ void @@ -2052,14 +2046,10 @@ rtadv_cmd_init (void) install_element (INTERFACE_NODE, &ipv6_nd_ra_interval_cmd); install_element (INTERFACE_NODE, &ipv6_nd_ra_interval_msec_cmd); install_element (INTERFACE_NODE, &no_ipv6_nd_ra_interval_cmd); - install_element (INTERFACE_NODE, &no_ipv6_nd_ra_interval_val_cmd); - install_element (INTERFACE_NODE, &no_ipv6_nd_ra_interval_msec_val_cmd); install_element (INTERFACE_NODE, &ipv6_nd_ra_lifetime_cmd); install_element (INTERFACE_NODE, &no_ipv6_nd_ra_lifetime_cmd); - install_element (INTERFACE_NODE, &no_ipv6_nd_ra_lifetime_val_cmd); install_element (INTERFACE_NODE, &ipv6_nd_reachable_time_cmd); install_element (INTERFACE_NODE, &no_ipv6_nd_reachable_time_cmd); - install_element (INTERFACE_NODE, &no_ipv6_nd_reachable_time_val_cmd); install_element (INTERFACE_NODE, &ipv6_nd_managed_config_flag_cmd); install_element (INTERFACE_NODE, &no_ipv6_nd_managed_config_flag_cmd); install_element (INTERFACE_NODE, &ipv6_nd_other_config_flag_cmd); @@ -2068,45 +2058,16 @@ rtadv_cmd_init (void) install_element (INTERFACE_NODE, &no_ipv6_nd_homeagent_config_flag_cmd); install_element (INTERFACE_NODE, &ipv6_nd_homeagent_preference_cmd); install_element (INTERFACE_NODE, &no_ipv6_nd_homeagent_preference_cmd); - install_element (INTERFACE_NODE, &no_ipv6_nd_homeagent_preference_val_cmd); install_element (INTERFACE_NODE, &ipv6_nd_homeagent_lifetime_cmd); install_element (INTERFACE_NODE, &no_ipv6_nd_homeagent_lifetime_cmd); - install_element (INTERFACE_NODE, &no_ipv6_nd_homeagent_lifetime_val_cmd); install_element (INTERFACE_NODE, &ipv6_nd_adv_interval_config_option_cmd); install_element (INTERFACE_NODE, &no_ipv6_nd_adv_interval_config_option_cmd); install_element (INTERFACE_NODE, &ipv6_nd_prefix_cmd); - install_element (INTERFACE_NODE, &ipv6_nd_prefix_val_rev_rtaddr_cmd); - install_element (INTERFACE_NODE, &ipv6_nd_prefix_val_nortaddr_cmd); - install_element (INTERFACE_NODE, &ipv6_nd_prefix_val_rev_cmd); - install_element (INTERFACE_NODE, &ipv6_nd_prefix_val_noauto_cmd); - install_element (INTERFACE_NODE, &ipv6_nd_prefix_val_offlink_cmd); - install_element (INTERFACE_NODE, &ipv6_nd_prefix_val_rtaddr_cmd); - install_element (INTERFACE_NODE, &ipv6_nd_prefix_val_cmd); - install_element (INTERFACE_NODE, &ipv6_nd_prefix_noval_cmd); - install_element (INTERFACE_NODE, &ipv6_nd_prefix_noval_rev_cmd); - install_element (INTERFACE_NODE, &ipv6_nd_prefix_noval_noauto_cmd); - install_element (INTERFACE_NODE, &ipv6_nd_prefix_noval_offlink_cmd); - install_element (INTERFACE_NODE, &ipv6_nd_prefix_noval_rtaddr_cmd); - install_element (INTERFACE_NODE, &ipv6_nd_prefix_prefix_cmd); install_element (INTERFACE_NODE, &no_ipv6_nd_prefix_cmd); - install_element (INTERFACE_NODE, &no_ipv6_nd_prefix_val_rev_rtaddr_cmd); - install_element (INTERFACE_NODE, &no_ipv6_nd_prefix_val_nortaddr_cmd); - install_element (INTERFACE_NODE, &no_ipv6_nd_prefix_val_rev_cmd); - install_element (INTERFACE_NODE, &no_ipv6_nd_prefix_val_noauto_cmd); - install_element (INTERFACE_NODE, &no_ipv6_nd_prefix_val_offlink_cmd); - install_element (INTERFACE_NODE, &no_ipv6_nd_prefix_val_rtaddr_cmd); - install_element (INTERFACE_NODE, &no_ipv6_nd_prefix_val_cmd); - install_element (INTERFACE_NODE, &no_ipv6_nd_prefix_noval_cmd); - install_element (INTERFACE_NODE, &no_ipv6_nd_prefix_noval_rev_cmd); - install_element (INTERFACE_NODE, &no_ipv6_nd_prefix_noval_noauto_cmd); - install_element (INTERFACE_NODE, &no_ipv6_nd_prefix_noval_offlink_cmd); - install_element (INTERFACE_NODE, &no_ipv6_nd_prefix_noval_rtaddr_cmd); install_element (INTERFACE_NODE, &ipv6_nd_router_preference_cmd); install_element (INTERFACE_NODE, &no_ipv6_nd_router_preference_cmd); - install_element (INTERFACE_NODE, &no_ipv6_nd_router_preference_val_cmd); install_element (INTERFACE_NODE, &ipv6_nd_mtu_cmd); install_element (INTERFACE_NODE, &no_ipv6_nd_mtu_cmd); - install_element (INTERFACE_NODE, &no_ipv6_nd_mtu_val_cmd); } static int diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c index c70b207d6..88cc7977f 100644 --- a/zebra/zebra_routemap.c +++ b/zebra/zebra_routemap.c @@ -305,6 +305,15 @@ DEFUN (match_interface, RMAP_EVENT_MATCH_ADDED); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match interface WORD", + * NO_STR + * MATCH_STR + * "Match first hop interface of route\n" + * "Interface name\n" + * + */ DEFUN (no_match_interface, no_match_interface_cmd, "no match interface", @@ -318,13 +327,6 @@ DEFUN (no_match_interface, return zebra_route_match_delete (vty, vty->index, "interface", argv[0], RMAP_EVENT_MATCH_DELETED); } -ALIAS (no_match_interface, - no_match_interface_val_cmd, - "no match interface WORD", - NO_STR - MATCH_STR - "Match first hop interface of route\n" - "Interface name\n") DEFUN (match_tag, match_tag_cmd, @@ -337,6 +339,14 @@ DEFUN (match_tag, RMAP_EVENT_MATCH_ADDED); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match tag <1-65535>", + * NO_STR + * MATCH_STR + * "Match tag of route\n" + * + */ DEFUN (no_match_tag, no_match_tag_cmd, "no match tag", @@ -352,12 +362,6 @@ DEFUN (no_match_tag, RMAP_EVENT_MATCH_DELETED); } -ALIAS (no_match_tag, - no_match_tag_val_cmd, - "no match tag <1-65535>", - NO_STR - MATCH_STR - "Match tag of route\n") DEFUN (match_ip_next_hop, match_ip_next_hop_cmd, @@ -372,6 +376,18 @@ DEFUN (match_ip_next_hop, return zebra_route_match_add (vty, vty->index, "ip next-hop", argv[3]->arg, RMAP_EVENT_FILTER_ADDED); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match ip next-hop (<1-199>|<1300-2699>|WORD)", + * NO_STR + * MATCH_STR + * IP_STR + * "Match next-hop address of route\n" + * "IP access-list number\n" + * "IP access-list number (expanded range)\n" + * "IP Access-list name\n" + * + */ DEFUN (no_match_ip_next_hop, no_match_ip_next_hop_cmd, "no match ip next-hop", @@ -388,16 +404,6 @@ DEFUN (no_match_ip_next_hop, RMAP_EVENT_FILTER_DELETED); } -ALIAS (no_match_ip_next_hop, - no_match_ip_next_hop_val_cmd, - "no match ip next-hop (<1-199>|<1300-2699>|WORD)", - NO_STR - MATCH_STR - IP_STR - "Match next-hop address of route\n" - "IP access-list number\n" - "IP access-list number (expanded range)\n" - "IP Access-list name\n") DEFUN (match_ip_next_hop_prefix_list, match_ip_next_hop_prefix_list_cmd, @@ -412,6 +418,17 @@ DEFUN (match_ip_next_hop_prefix_list, argv[4]->arg, RMAP_EVENT_PLIST_ADDED); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match ip next-hop prefix-list WORD", + * NO_STR + * MATCH_STR + * IP_STR + * "Match next-hop address of route\n" + * "Match entries of prefix-lists\n" + * "IP prefix-list name\n" + * + */ DEFUN (no_match_ip_next_hop_prefix_list, no_match_ip_next_hop_prefix_list_cmd, "no match ip next-hop prefix-list", @@ -431,15 +448,6 @@ DEFUN (no_match_ip_next_hop_prefix_list, RMAP_EVENT_PLIST_DELETED); } -ALIAS (no_match_ip_next_hop_prefix_list, - no_match_ip_next_hop_prefix_list_val_cmd, - "no match ip next-hop prefix-list WORD", - NO_STR - MATCH_STR - IP_STR - "Match next-hop address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") DEFUN (match_ip_address, match_ip_address_cmd, @@ -456,7 +464,19 @@ DEFUN (match_ip_address, RMAP_EVENT_FILTER_ADDED); } -DEFUN (no_match_ip_address, +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match ip address (<1-199>|<1300-2699>|WORD)", + * NO_STR + * MATCH_STR + * IP_STR + * "Match address of route\n" + * "IP access-list number\n" + * "IP access-list number (expanded range)\n" + * "IP Access-list name\n" + * + */ +DEFUN (no_match_ip_address, no_match_ip_address_cmd, "no match ip address", NO_STR @@ -472,18 +492,8 @@ DEFUN (no_match_ip_address, RMAP_EVENT_FILTER_DELETED); } -ALIAS (no_match_ip_address, - no_match_ip_address_val_cmd, - "no match ip address (<1-199>|<1300-2699>|WORD)", - NO_STR - MATCH_STR - IP_STR - "Match address of route\n" - "IP access-list number\n" - "IP access-list number (expanded range)\n" - "IP Access-list name\n") -DEFUN (match_ip_address_prefix_list, +DEFUN (match_ip_address_prefix_list, match_ip_address_prefix_list_cmd, "match ip address prefix-list WORD", MATCH_STR @@ -496,6 +506,17 @@ DEFUN (match_ip_address_prefix_list, argv[4]->arg, RMAP_EVENT_PLIST_ADDED); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match ip address prefix-list WORD", + * NO_STR + * MATCH_STR + * IP_STR + * "Match address of route\n" + * "Match entries of prefix-lists\n" + * "IP prefix-list name\n" + * + */ DEFUN (no_match_ip_address_prefix_list, no_match_ip_address_prefix_list_cmd, "no match ip address prefix-list", @@ -515,15 +536,6 @@ DEFUN (no_match_ip_address_prefix_list, RMAP_EVENT_PLIST_DELETED); } -ALIAS (no_match_ip_address_prefix_list, - no_match_ip_address_prefix_list_val_cmd, - "no match ip address prefix-list WORD", - NO_STR - MATCH_STR - IP_STR - "Match address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") DEFUN (match_ip_address_prefix_len, match_ip_address_prefix_len_cmd, @@ -538,6 +550,16 @@ DEFUN (match_ip_address_prefix_len, argv[0], RMAP_EVENT_MATCH_ADDED); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match ip address prefix-len NUMBER", + * NO_STR + * MATCH_STR + * IP_STR + * "Match prefixlen of ip address of route\n" + * "prefix length of ip address\n" + * + */ DEFUN (no_match_ip_address_prefix_len, no_match_ip_address_prefix_len_cmd, "no match ip address prefix-len", @@ -557,14 +579,6 @@ DEFUN (no_match_ip_address_prefix_len, RMAP_EVENT_MATCH_DELETED); } -ALIAS (no_match_ip_address_prefix_len, - no_match_ip_address_prefix_len_val_cmd, - "no match ip address prefix-len NUMBER", - NO_STR - MATCH_STR - IP_STR - "Match prefixlen of ip address of route\n" - "prefix length of ip address\n") DEFUN (match_ip_nexthop_prefix_len, match_ip_nexthop_prefix_len_cmd, @@ -579,6 +593,14 @@ DEFUN (match_ip_nexthop_prefix_len, argv[0], RMAP_EVENT_MATCH_ADDED); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no match ip next-hop prefix-len NUMBER", + * MATCH_STR + * "Match prefixlen of ip address of route\n" + * "prefix length of ip address\n" + * + */ DEFUN (no_match_ip_nexthop_prefix_len, no_match_ip_nexthop_prefix_len_cmd, "no match ip next-hop prefix-len", @@ -598,12 +620,6 @@ DEFUN (no_match_ip_nexthop_prefix_len, RMAP_EVENT_MATCH_DELETED); } -ALIAS (no_match_ip_nexthop_prefix_len, - no_match_ip_nexthop_prefix_len_val_cmd, - "no match ip next-hop prefix-len NUMBER", - MATCH_STR - "Match prefixlen of ip address of route\n" - "prefix length of ip address\n") DEFUN (match_source_protocol, match_source_protocol_cmd, @@ -736,6 +752,15 @@ DEFUN (zebra_route_map_timer, return (CMD_SUCCESS); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no zebra route-map delay-timer <0-600>", + * NO_STR + * "Time to wait before route-map updates are processed\n" + * "Reset delay-timer to default value, 30 secs\n" + * "0 means event-driven updates are disabled\n" + * + */ DEFUN (no_zebra_route_map_timer, no_zebra_route_map_timer_cmd, "no zebra route-map delay-timer", @@ -748,13 +773,6 @@ DEFUN (no_zebra_route_map_timer, return (CMD_SUCCESS); } -ALIAS (no_zebra_route_map_timer, - no_zebra_route_map_timer_val_cmd, - "no zebra route-map delay-timer <0-600>", - NO_STR - "Time to wait before route-map updates are processed\n" - "Reset delay-timer to default value, 30 secs\n" - "0 means event-driven updates are disabled\n") DEFUN (ip_protocol, ip_protocol_cmd, @@ -793,6 +811,16 @@ DEFUN (ip_protocol, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ip protocol " QUAGGA_IP_PROTOCOL_MAP_STR_ZEBRA " route-map ROUTE-MAP", + * NO_STR + * IP_STR + * "Stop filtering routing info between zebra and protocol\n" + * QUAGGA_IP_PROTOCOL_MAP_HELP_STR_ZEBRA + * "route map name" + * + */ DEFUN (no_ip_protocol, no_ip_protocol_cmd, "no ip protocol " QUAGGA_IP_PROTOCOL_MAP_STR_ZEBRA, @@ -831,14 +859,6 @@ DEFUN (no_ip_protocol, return CMD_SUCCESS; } -ALIAS (no_ip_protocol, - no_ip_protocol_val_cmd, - "no ip protocol " QUAGGA_IP_PROTOCOL_MAP_STR_ZEBRA " route-map ROUTE-MAP", - NO_STR - IP_STR - "Stop filtering routing info between zebra and protocol\n" - QUAGGA_IP_PROTOCOL_MAP_HELP_STR_ZEBRA - "route map name") DEFUN (show_ip_protocol, show_ip_protocol_cmd, @@ -906,6 +926,16 @@ DEFUN (ipv6_protocol, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ipv6 protocol " QUAGGA_IP6_PROTOCOL_MAP_STR_ZEBRA " route-map ROUTE-MAP", + * NO_STR + * IP6_STR + * "Stop filtering IPv6 routing info between zebra and protocol\n" + * QUAGGA_IP6_PROTOCOL_MAP_HELP_STR_ZEBRA + * "route map name" + * + */ DEFUN (no_ipv6_protocol, no_ipv6_protocol_cmd, "no ipv6 protocol " QUAGGA_IP6_PROTOCOL_MAP_STR_ZEBRA, @@ -945,14 +975,6 @@ DEFUN (no_ipv6_protocol, return CMD_SUCCESS; } -ALIAS (no_ipv6_protocol, - no_ipv6_protocol_val_cmd, - "no ipv6 protocol " QUAGGA_IP6_PROTOCOL_MAP_STR_ZEBRA " route-map ROUTE-MAP", - NO_STR - IP6_STR - "Stop filtering IPv6 routing info between zebra and protocol\n" - QUAGGA_IP6_PROTOCOL_MAP_HELP_STR_ZEBRA - "route map name") DEFUN (show_ipv6_protocol, show_ipv6_protocol_cmd, @@ -1017,6 +1039,15 @@ DEFUN (ip_protocol_nht_rmap, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ip nht " QUAGGA_IP_PROTOCOL_MAP_STR_ZEBRA " route-map ROUTE-MAP", + * IP_STR + * "Filter Next Hop tracking route resolution\n" + * QUAGGA_IP_PROTOCOL_MAP_HELP_STR_ZEBRA + * "Route map name\n" + * + */ DEFUN (no_ip_protocol_nht_rmap, no_ip_protocol_nht_rmap_cmd, "no ip nht " QUAGGA_IP_PROTOCOL_MAP_STR_ZEBRA, @@ -1050,13 +1081,6 @@ DEFUN (no_ip_protocol_nht_rmap, return CMD_SUCCESS; } -ALIAS (no_ip_protocol_nht_rmap, - no_ip_protocol_nht_rmap_val_cmd, - "no ip nht " QUAGGA_IP_PROTOCOL_MAP_STR_ZEBRA " route-map ROUTE-MAP", - IP_STR - "Filter Next Hop tracking route resolution\n" - QUAGGA_IP_PROTOCOL_MAP_HELP_STR_ZEBRA - "Route map name\n") DEFUN (show_ip_protocol_nht, show_ip_protocol_nht_cmd, @@ -1115,6 +1139,16 @@ DEFUN (ipv6_protocol_nht_rmap, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ipv6 nht " QUAGGA_IP6_PROTOCOL_MAP_STR_ZEBRA " route-map ROUTE-MAP", + * NO_STR + * IP6_STR + * "Filter Next Hop tracking route resolution\n" + * QUAGGA_IP6_PROTOCOL_MAP_HELP_STR_ZEBRA + * "Route map name\n" + * + */ DEFUN (no_ipv6_protocol_nht_rmap, no_ipv6_protocol_nht_rmap_cmd, "no ipv6 nht " QUAGGA_IP6_PROTOCOL_MAP_STR_ZEBRA, @@ -1153,14 +1187,6 @@ DEFUN (no_ipv6_protocol_nht_rmap, return CMD_SUCCESS; } -ALIAS (no_ipv6_protocol_nht_rmap, - no_ipv6_protocol_nht_rmap_val_cmd, - "no ipv6 nht " QUAGGA_IP6_PROTOCOL_MAP_STR_ZEBRA " route-map ROUTE-MAP", - NO_STR - IP6_STR - "Filter Next Hop tracking route resolution\n" - QUAGGA_IP6_PROTOCOL_MAP_HELP_STR_ZEBRA - "Route map name\n") DEFUN (show_ipv6_protocol_nht, show_ipv6_protocol_nht_cmd, @@ -1816,27 +1842,22 @@ zebra_route_map_init () { install_element (CONFIG_NODE, &ip_protocol_cmd); install_element (CONFIG_NODE, &no_ip_protocol_cmd); - install_element (CONFIG_NODE, &no_ip_protocol_val_cmd); install_element (VIEW_NODE, &show_ip_protocol_cmd); install_element (ENABLE_NODE, &show_ip_protocol_cmd); install_element (CONFIG_NODE, &ipv6_protocol_cmd); install_element (CONFIG_NODE, &no_ipv6_protocol_cmd); - install_element (CONFIG_NODE, &no_ipv6_protocol_val_cmd); install_element (VIEW_NODE, &show_ipv6_protocol_cmd); install_element (ENABLE_NODE, &show_ipv6_protocol_cmd); install_element (CONFIG_NODE, &ip_protocol_nht_rmap_cmd); install_element (CONFIG_NODE, &no_ip_protocol_nht_rmap_cmd); - install_element (CONFIG_NODE, &no_ip_protocol_nht_rmap_val_cmd); install_element (VIEW_NODE, &show_ip_protocol_nht_cmd); install_element (ENABLE_NODE, &show_ip_protocol_nht_cmd); install_element (CONFIG_NODE, &ipv6_protocol_nht_rmap_cmd); install_element (CONFIG_NODE, &no_ipv6_protocol_nht_rmap_cmd); - install_element (CONFIG_NODE, &no_ipv6_protocol_nht_rmap_val_cmd); install_element (VIEW_NODE, &show_ipv6_protocol_nht_cmd); install_element (ENABLE_NODE, &show_ipv6_protocol_nht_cmd); install_element (CONFIG_NODE, &zebra_route_map_timer_cmd); install_element (CONFIG_NODE, &no_zebra_route_map_timer_cmd); - install_element (CONFIG_NODE, &no_zebra_route_map_timer_val_cmd); route_map_init (); route_map_init_vty (); @@ -1859,28 +1880,20 @@ zebra_route_map_init () /* */ install_element (RMAP_NODE, &match_tag_cmd); install_element (RMAP_NODE, &no_match_tag_cmd); - install_element (RMAP_NODE, &no_match_tag_val_cmd); install_element (RMAP_NODE, &match_interface_cmd); install_element (RMAP_NODE, &no_match_interface_cmd); - install_element (RMAP_NODE, &no_match_interface_val_cmd); install_element (RMAP_NODE, &match_ip_next_hop_cmd); install_element (RMAP_NODE, &no_match_ip_next_hop_cmd); - install_element (RMAP_NODE, &no_match_ip_next_hop_val_cmd); install_element (RMAP_NODE, &match_ip_next_hop_prefix_list_cmd); install_element (RMAP_NODE, &no_match_ip_next_hop_prefix_list_cmd); - install_element (RMAP_NODE, &no_match_ip_next_hop_prefix_list_val_cmd); install_element (RMAP_NODE, &match_ip_address_cmd); install_element (RMAP_NODE, &no_match_ip_address_cmd); - install_element (RMAP_NODE, &no_match_ip_address_val_cmd); install_element (RMAP_NODE, &match_ip_address_prefix_list_cmd); install_element (RMAP_NODE, &no_match_ip_address_prefix_list_cmd); - install_element (RMAP_NODE, &no_match_ip_address_prefix_list_val_cmd); install_element (RMAP_NODE, &match_ip_nexthop_prefix_len_cmd); install_element (RMAP_NODE, &no_match_ip_nexthop_prefix_len_cmd); - install_element (RMAP_NODE, &no_match_ip_nexthop_prefix_len_val_cmd); install_element (RMAP_NODE, &match_ip_address_prefix_len_cmd); install_element (RMAP_NODE, &no_match_ip_address_prefix_len_cmd); - install_element (RMAP_NODE, &no_match_ip_address_prefix_len_val_cmd); install_element (RMAP_NODE, &match_source_protocol_cmd); install_element (RMAP_NODE, &no_match_source_protocol_cmd); /* */ diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index dfcf1829d..491abbba4 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -181,6 +181,16 @@ zebra_static_ipv4 (struct vty *vty, safi_t safi, int add_cmd, } /* Static unicast routes for multicast RPF lookup. */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "ip mroute A.B.C.D/M (A.B.C.D|INTERFACE)", + * IP_STR + * "Configure static unicast route into MRIB for multicast RPF lookup\n" + * "IP destination prefix (e.g. 10.0.0.0/8)\n" + * "Nexthop address\n" + * "Nexthop interface name\n" + * + */ DEFUN (ip_mroute_dist, ip_mroute_dist_cmd, "ip mroute A.B.C.D/M (A.B.C.D|INTERFACE) <1-255>", @@ -194,15 +204,18 @@ DEFUN (ip_mroute_dist, return zebra_static_ipv4 (vty, SAFI_MULTICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL, argc > 2 ? argv[4]->arg : NULL, NULL); } -ALIAS (ip_mroute_dist, - ip_mroute_cmd, - "ip mroute A.B.C.D/M (A.B.C.D|INTERFACE)", - IP_STR - "Configure static unicast route into MRIB for multicast RPF lookup\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "Nexthop address\n" - "Nexthop interface name\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ip mroute A.B.C.D/M (A.B.C.D|INTERFACE)", + * NO_STR + * IP_STR + * "Configure static unicast route into MRIB for multicast RPF lookup\n" + * "IP destination prefix (e.g. 10.0.0.0/8)\n" + * "Nexthop address\n" + * "Nexthop interface name\n" + * + */ DEFUN (no_ip_mroute_dist, no_ip_mroute_dist_cmd, "no ip mroute A.B.C.D/M (A.B.C.D|INTERFACE) <1-255>", @@ -216,15 +229,6 @@ DEFUN (no_ip_mroute_dist, return zebra_static_ipv4 (vty, SAFI_MULTICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, argc > 2 ? argv[5]->arg : NULL, NULL); } -ALIAS (no_ip_mroute_dist, - no_ip_mroute_cmd, - "no ip mroute A.B.C.D/M (A.B.C.D|INTERFACE)", - NO_STR - IP_STR - "Configure static unicast route into MRIB for multicast RPF lookup\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "Nexthop address\n" - "Nexthop interface name\n") DEFUN (ip_multicast_mode, ip_multicast_mode_cmd, @@ -258,6 +262,15 @@ DEFUN (ip_multicast_mode, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ip multicast rpf-lookup-mode", + * NO_STR + * IP_STR + * "Multicast options\n" + * "RPF lookup behavior\n" + * + */ DEFUN (no_ip_multicast_mode, no_ip_multicast_mode_cmd, "no ip multicast rpf-lookup-mode (urib-only|mrib-only|mrib-then-urib|lower-distance|longer-prefix)", @@ -275,13 +288,6 @@ DEFUN (no_ip_multicast_mode, return CMD_SUCCESS; } -ALIAS (no_ip_multicast_mode, - no_ip_multicast_mode_noarg_cmd, - "no ip multicast rpf-lookup-mode", - NO_STR - IP_STR - "Multicast options\n" - "RPF lookup behavior\n") DEFUN (show_ip_rpf, show_ip_rpf_cmd, @@ -324,7 +330,7 @@ DEFUN (show_ip_rpf_addr, } /* Static route configuration. */ -DEFUN (ip_route, +DEFUN (ip_route, ip_route_cmd, "ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0)", IP_STR @@ -716,7 +722,20 @@ DEFUN (ip_route_mask_flags_tag_distance2, argv[7]->arg, NULL); } -DEFUN (no_ip_route, +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole)", + * NO_STR + * IP_STR + * "Establish static routes\n" + * "IP destination prefix (e.g. 10.0.0.0/8)\n" + * "IP gateway address\n" + * "IP gateway interface name\n" + * "Emit an ICMP unreachable when matched\n" + * "Silently discard pkts when matched\n" + * + */ +DEFUN (no_ip_route, no_ip_route_cmd, "no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0)", NO_STR @@ -731,6 +750,21 @@ DEFUN (no_ip_route, NULL, NULL); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535>", + * NO_STR + * IP_STR + * "Establish static routes\n" + * "IP destination prefix (e.g. 10.0.0.0/8)\n" + * "IP gateway address\n" + * "IP gateway interface name\n" + * "Emit an ICMP unreachable when matched\n" + * "Silently discard pkts when matched\n" + * "Tag of this route\n" + * "Tag value\n" + * + */ DEFUN (no_ip_route_tag, no_ip_route_tag_cmd, "no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535>", @@ -748,31 +782,7 @@ DEFUN (no_ip_route_tag, NULL, NULL); } -ALIAS (no_ip_route, - no_ip_route_flags_cmd, - "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole)", - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n") -ALIAS (no_ip_route_tag, - no_ip_route_flags_tag_cmd, - "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535>", - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Tag of this route\n" - "Tag value\n") DEFUN (no_ip_route_flags2, no_ip_route_flags2_cmd, @@ -804,6 +814,20 @@ DEFUN (no_ip_route_flags2_tag, NULL, NULL); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole)", + * NO_STR + * IP_STR + * "Establish static routes\n" + * "IP destination prefix\n" + * "IP destination prefix mask\n" + * "IP gateway address\n" + * "IP gateway interface name\n" + * "Emit an ICMP unreachable when matched\n" + * "Silently discard pkts when matched\n" + * + */ DEFUN (no_ip_route_mask, no_ip_route_mask_cmd, "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0)", @@ -820,6 +844,22 @@ DEFUN (no_ip_route_mask, NULL, NULL); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535>", + * NO_STR + * IP_STR + * "Establish static routes\n" + * "IP destination prefix\n" + * "IP destination prefix mask\n" + * "IP gateway address\n" + * "IP gateway interface name\n" + * "Emit an ICMP unreachable when matched\n" + * "Silently discard pkts when matched\n" + * "Tag of this route\n" + * "Tag value\n" + * + */ DEFUN (no_ip_route_mask_tag, no_ip_route_mask_tag_cmd, "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-65535>", @@ -838,33 +878,7 @@ DEFUN (no_ip_route_mask_tag, NULL, NULL); } -ALIAS (no_ip_route_mask, - no_ip_route_mask_flags_cmd, - "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole)", - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n") -ALIAS (no_ip_route_mask_tag, - no_ip_route_mask_flags_tag_cmd, - "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535>", - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Tag of this route\n" - "Tag value\n") DEFUN (no_ip_route_mask_flags2, no_ip_route_mask_flags2_cmd, @@ -1109,7 +1123,7 @@ DEFUN (no_ip_route_mask_flags_tag_distance2, } /* Static route configuration. */ -DEFUN (ip_route_vrf, +DEFUN (ip_route_vrf, ip_route_vrf_cmd, "ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) " VRF_CMD_STR, IP_STR @@ -1501,7 +1515,7 @@ DEFUN (ip_route_mask_flags_tag_distance2_vrf, return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, argv[7]->arg, argv[10]->arg); } -DEFUN (no_ip_route_vrf, +DEFUN (no_ip_route_vrf, no_ip_route_vrf_cmd, "no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) " VRF_CMD_STR, NO_STR @@ -2436,6 +2450,15 @@ DEFUN (show_ip_route_vrf, return do_show_ip_route (vty, argv[5]->arg, SAFI_UNICAST, uj); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip nht " VRF_CMD_STR, + * SHOW_STR + * IP_STR + * "IP nexthop tracking table\n" + * VRF_CMD_HELP_STR + * + */ DEFUN (show_ip_nht, show_ip_nht_cmd, "show ip nht", @@ -2452,13 +2475,6 @@ DEFUN (show_ip_nht, return CMD_SUCCESS; } -ALIAS (show_ip_nht, - show_ip_nht_vrf_cmd, - "show ip nht " VRF_CMD_STR, - SHOW_STR - IP_STR - "IP nexthop tracking table\n" - VRF_CMD_HELP_STR) DEFUN (show_ip_nht_vrf_all, show_ip_nht_vrf_all_cmd, @@ -2481,6 +2497,15 @@ DEFUN (show_ip_nht_vrf_all, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 nht " VRF_CMD_STR, + * SHOW_STR + * IPV6_STR + * "IPv6 nexthop tracking table\n" + * VRF_CMD_HELP_STR + * + */ DEFUN (show_ipv6_nht, show_ipv6_nht_cmd, "show ipv6 nht", @@ -2497,13 +2522,6 @@ DEFUN (show_ipv6_nht, return CMD_SUCCESS; } -ALIAS (show_ipv6_nht, - show_ipv6_nht_vrf_cmd, - "show ipv6 nht " VRF_CMD_STR, - SHOW_STR - IPV6_STR - "IPv6 nexthop tracking table\n" - VRF_CMD_HELP_STR) DEFUN (show_ipv6_nht_vrf_all, show_ipv6_nht_vrf_all_cmd, @@ -2588,6 +2606,17 @@ DEFUN (no_ipv6_nht_default_route, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip route " VRF_CMD_STR " tag <1-65535>", + * SHOW_STR + * IP_STR + * "IP routing table\n" + * VRF_CMD_HELP_STR + * "Show only routes with tag\n" + * "Tag value\n" + * + */ DEFUN (show_ip_route_tag, show_ip_route_tag_cmd, "show ip route tag <1-65535>", @@ -2633,16 +2662,18 @@ DEFUN (show_ip_route_tag, return CMD_SUCCESS; } -ALIAS (show_ip_route_tag, - show_ip_route_vrf_tag_cmd, - "show ip route " VRF_CMD_STR " tag <1-65535>", - SHOW_STR - IP_STR - "IP routing table\n" - VRF_CMD_HELP_STR - "Show only routes with tag\n" - "Tag value\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip route " VRF_CMD_STR " A.B.C.D/M longer-prefixes", + * SHOW_STR + * IP_STR + * "IP routing table\n" + * VRF_CMD_HELP_STR + * "IP prefix /, e.g., 35.0.0.0/8\n" + * "Show route matching the specified Network/Mask pair only\n" + * + */ DEFUN (show_ip_route_prefix_longer, show_ip_route_prefix_longer_cmd, "show ip route A.B.C.D/M longer-prefixes", @@ -2693,16 +2724,17 @@ DEFUN (show_ip_route_prefix_longer, return CMD_SUCCESS; } -ALIAS (show_ip_route_prefix_longer, - show_ip_route_vrf_prefix_longer_cmd, - "show ip route " VRF_CMD_STR " A.B.C.D/M longer-prefixes", - SHOW_STR - IP_STR - "IP routing table\n" - VRF_CMD_HELP_STR - "IP prefix /, e.g., 35.0.0.0/8\n" - "Show route matching the specified Network/Mask pair only\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip route " VRF_CMD_STR " supernets-only", + * SHOW_STR + * IP_STR + * "IP routing table\n" + * VRF_CMD_HELP_STR + * "Show supernet entries only\n" + * + */ DEFUN (show_ip_route_supernets, show_ip_route_supernets_cmd, "show ip route supernets-only", @@ -2746,15 +2778,17 @@ DEFUN (show_ip_route_supernets, return CMD_SUCCESS; } -ALIAS (show_ip_route_supernets, - show_ip_route_vrf_supernets_cmd, - "show ip route " VRF_CMD_STR " supernets-only", - SHOW_STR - IP_STR - "IP routing table\n" - VRF_CMD_HELP_STR - "Show supernet entries only\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip route " VRF_CMD_STR " " QUAGGA_IP_REDIST_STR_ZEBRA, + * SHOW_STR + * IP_STR + * "IP routing table\n" + * VRF_CMD_HELP_STR + * QUAGGA_IP_REDIST_HELP_STR_ZEBRA + * + */ DEFUN (show_ip_route_protocol, show_ip_route_protocol_cmd, "show ip route " QUAGGA_IP_REDIST_STR_ZEBRA, @@ -2803,14 +2837,6 @@ DEFUN (show_ip_route_protocol, return CMD_SUCCESS; } -ALIAS (show_ip_route_protocol, - show_ip_route_vrf_protocol_cmd, - "show ip route " VRF_CMD_STR " " QUAGGA_IP_REDIST_STR_ZEBRA, - SHOW_STR - IP_STR - "IP routing table\n" - VRF_CMD_HELP_STR - QUAGGA_IP_REDIST_HELP_STR_ZEBRA) DEFUN (show_ip_route_ospf_instance, show_ip_route_ospf_instance_cmd, @@ -2848,6 +2874,16 @@ DEFUN (show_ip_route_ospf_instance, return CMD_SUCCESS; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip route " VRF_CMD_STR " A.B.C.D", + * SHOW_STR + * IP_STR + * "IP routing table\n" + * VRF_CMD_HELP_STR + * "Network in the IP routing table to display\n" + * + */ DEFUN (show_ip_route_addr, show_ip_route_addr_cmd, "show ip route A.B.C.D", @@ -2894,15 +2930,17 @@ DEFUN (show_ip_route_addr, return CMD_SUCCESS; } -ALIAS (show_ip_route_addr, - show_ip_route_vrf_addr_cmd, - "show ip route " VRF_CMD_STR " A.B.C.D", - SHOW_STR - IP_STR - "IP routing table\n" - VRF_CMD_HELP_STR - "Network in the IP routing table to display\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip route " VRF_CMD_STR " A.B.C.D/M", + * SHOW_STR + * IP_STR + * "IP routing table\n" + * VRF_CMD_HELP_STR + * "IP prefix /, e.g., 35.0.0.0/8\n" + * + */ DEFUN (show_ip_route_prefix, show_ip_route_prefix_cmd, "show ip route A.B.C.D/M", @@ -2949,14 +2987,6 @@ DEFUN (show_ip_route_prefix, return CMD_SUCCESS; } -ALIAS (show_ip_route_prefix, - show_ip_route_vrf_prefix_cmd, - "show ip route " VRF_CMD_STR " A.B.C.D/M", - SHOW_STR - IP_STR - "IP routing table\n" - VRF_CMD_HELP_STR - "IP prefix /, e.g., 35.0.0.0/8\n") static void vty_show_ip_route_summary (struct vty *vty, struct route_table *table) @@ -3108,6 +3138,16 @@ vty_show_ip_route_summary_prefix (struct vty *vty, struct route_table *table) } /* Show route summary. */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip route " VRF_CMD_STR " summary", + * SHOW_STR + * IP_STR + * "IP routing table\n" + * VRF_CMD_HELP_STR + * "Summary of all routes\n" + * + */ DEFUN (show_ip_route_summary, show_ip_route_summary_cmd, "show ip route summary", @@ -3131,16 +3171,19 @@ DEFUN (show_ip_route_summary, return CMD_SUCCESS; } -ALIAS (show_ip_route_summary, - show_ip_route_vrf_summary_cmd, - "show ip route " VRF_CMD_STR " summary", - SHOW_STR - IP_STR - "IP routing table\n" - VRF_CMD_HELP_STR - "Summary of all routes\n") /* Show route summary prefix. */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ip route " VRF_CMD_STR " summary prefix", + * SHOW_STR + * IP_STR + * "IP routing table\n" + * VRF_CMD_HELP_STR + * "Summary of all routes\n" + * "Prefix routes\n" + * + */ DEFUN (show_ip_route_summary_prefix, show_ip_route_summary_prefix_cmd, "show ip route summary prefix", @@ -3165,15 +3208,6 @@ DEFUN (show_ip_route_summary_prefix, return CMD_SUCCESS; } -ALIAS (show_ip_route_summary_prefix, - show_ip_route_vrf_summary_prefix_cmd, - "show ip route " VRF_CMD_STR " summary prefix", - SHOW_STR - IP_STR - "IP routing table\n" - VRF_CMD_HELP_STR - "Summary of all routes\n" - "Prefix routes\n") DEFUN (show_ip_route_vrf_all, show_ip_route_vrf_all_cmd, @@ -4740,6 +4774,15 @@ DEFUN (no_ipv6_route_ifname_flags_pref_tag_vrf, return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, argv[9]->arg, argv[12]->arg); } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 route " VRF_CMD_STR " {json}", + * SHOW_STR + * IP_STR + * "IPv6 routing table\n" + * VRF_CMD_HELP_STR + * + */ DEFUN (show_ipv6_route, show_ipv6_route_cmd, "show ipv6 route {json}", @@ -4834,14 +4877,18 @@ DEFUN (show_ipv6_route, return CMD_SUCCESS; } -ALIAS (show_ipv6_route, - show_ipv6_route_vrf_cmd, - "show ipv6 route " VRF_CMD_STR " {json}", - SHOW_STR - IP_STR - "IPv6 routing table\n" - VRF_CMD_HELP_STR) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 route " VRF_CMD_STR " tag <1-65535>", + * SHOW_STR + * IP_STR + * "IPv6 routing table\n" + * VRF_CMD_HELP_STR + * "Show only routes with tag\n" + * "Tag value\n" + * + */ DEFUN (show_ipv6_route_tag, show_ipv6_route_tag_cmd, "show ipv6 route tag <1-65535>", @@ -4887,16 +4934,18 @@ DEFUN (show_ipv6_route_tag, return CMD_SUCCESS; } -ALIAS (show_ipv6_route_tag, - show_ipv6_route_vrf_tag_cmd, - "show ipv6 route " VRF_CMD_STR " tag <1-65535>", - SHOW_STR - IP_STR - "IPv6 routing table\n" - VRF_CMD_HELP_STR - "Show only routes with tag\n" - "Tag value\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 route " VRF_CMD_STR " X:X::X:X/M longer-prefixes", + * SHOW_STR + * IP_STR + * "IPv6 routing table\n" + * VRF_CMD_HELP_STR + * "IPv6 prefix\n" + * "Show route matching the specified Network/Mask pair only\n" + * + */ DEFUN (show_ipv6_route_prefix_longer, show_ipv6_route_prefix_longer_cmd, "show ipv6 route X:X::X:X/M longer-prefixes", @@ -4947,16 +4996,17 @@ DEFUN (show_ipv6_route_prefix_longer, return CMD_SUCCESS; } -ALIAS (show_ipv6_route_prefix_longer, - show_ipv6_route_vrf_prefix_longer_cmd, - "show ipv6 route " VRF_CMD_STR " X:X::X:X/M longer-prefixes", - SHOW_STR - IP_STR - "IPv6 routing table\n" - VRF_CMD_HELP_STR - "IPv6 prefix\n" - "Show route matching the specified Network/Mask pair only\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 route " VRF_CMD_STR " " QUAGGA_IP6_REDIST_STR_ZEBRA, + * SHOW_STR + * IP_STR + * "IP routing table\n" + * VRF_CMD_HELP_STR + * QUAGGA_IP6_REDIST_HELP_STR_ZEBRA + * + */ DEFUN (show_ipv6_route_protocol, show_ipv6_route_protocol_cmd, "show ipv6 route " QUAGGA_IP6_REDIST_STR_ZEBRA, @@ -5005,15 +5055,17 @@ DEFUN (show_ipv6_route_protocol, return CMD_SUCCESS; } -ALIAS (show_ipv6_route_protocol, - show_ipv6_route_vrf_protocol_cmd, - "show ipv6 route " VRF_CMD_STR " " QUAGGA_IP6_REDIST_STR_ZEBRA, - SHOW_STR - IP_STR - "IP routing table\n" - VRF_CMD_HELP_STR - QUAGGA_IP6_REDIST_HELP_STR_ZEBRA) +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 route " VRF_CMD_STR " X:X::X:X", + * SHOW_STR + * IP_STR + * "IPv6 routing table\n" + * VRF_CMD_HELP_STR + * "IPv6 Address\n" + * + */ DEFUN (show_ipv6_route_addr, show_ipv6_route_addr_cmd, "show ipv6 route X:X::X:X", @@ -5060,15 +5112,17 @@ DEFUN (show_ipv6_route_addr, return CMD_SUCCESS; } -ALIAS (show_ipv6_route_addr, - show_ipv6_route_vrf_addr_cmd, - "show ipv6 route " VRF_CMD_STR " X:X::X:X", - SHOW_STR - IP_STR - "IPv6 routing table\n" - VRF_CMD_HELP_STR - "IPv6 Address\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 route " VRF_CMD_STR " X:X::X:X/M ", + * SHOW_STR + * IP_STR + * "IPv6 routing table\n" + * VRF_CMD_HELP_STR + * "IPv6 prefix\n" + * + */ DEFUN (show_ipv6_route_prefix, show_ipv6_route_prefix_cmd, "show ipv6 route X:X::X:X/M", @@ -5115,16 +5169,18 @@ DEFUN (show_ipv6_route_prefix, return CMD_SUCCESS; } -ALIAS (show_ipv6_route_prefix, - show_ipv6_route_vrf_prefix_cmd, - "show ipv6 route " VRF_CMD_STR " X:X::X:X/M ", - SHOW_STR - IP_STR - "IPv6 routing table\n" - VRF_CMD_HELP_STR - "IPv6 prefix\n") /* Show route summary. */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 route " VRF_CMD_STR " summary", + * SHOW_STR + * IP_STR + * "IPv6 routing table\n" + * VRF_CMD_HELP_STR + * "Summary of all IPv6 routes\n" + * + */ DEFUN (show_ipv6_route_summary, show_ipv6_route_summary_cmd, "show ipv6 route summary", @@ -5148,16 +5204,19 @@ DEFUN (show_ipv6_route_summary, return CMD_SUCCESS; } -ALIAS (show_ipv6_route_summary, - show_ipv6_route_vrf_summary_cmd, - "show ipv6 route " VRF_CMD_STR " summary", - SHOW_STR - IP_STR - "IPv6 routing table\n" - VRF_CMD_HELP_STR - "Summary of all IPv6 routes\n") /* Show ipv6 route summary prefix. */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 route " VRF_CMD_STR " summary prefix", + * SHOW_STR + * IP_STR + * "IPv6 routing table\n" + * VRF_CMD_HELP_STR + * "Summary of all IPv6 routes\n" + * "Prefix routes\n" + * + */ DEFUN (show_ipv6_route_summary_prefix, show_ipv6_route_summary_prefix_cmd, "show ipv6 route summary prefix", @@ -5182,21 +5241,21 @@ DEFUN (show_ipv6_route_summary_prefix, return CMD_SUCCESS; } -ALIAS (show_ipv6_route_summary_prefix, - show_ipv6_route_vrf_summary_prefix_cmd, - "show ipv6 route " VRF_CMD_STR " summary prefix", - SHOW_STR - IP_STR - "IPv6 routing table\n" - VRF_CMD_HELP_STR - "Summary of all IPv6 routes\n" - "Prefix routes\n") /* * Show IPv6 mroute command.Used to dump * the Multicast routing table. */ +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "show ipv6 mroute " VRF_CMD_STR, + * SHOW_STR + * IP_STR + * "IPv6 Multicast routing table\n" + * VRF_CMD_HELP_STR + * + */ DEFUN (show_ipv6_mroute, show_ipv6_mroute_cmd, "show ipv6 mroute", @@ -5231,13 +5290,6 @@ DEFUN (show_ipv6_mroute, return CMD_SUCCESS; } -ALIAS (show_ipv6_mroute, - show_ipv6_mroute_vrf_cmd, - "show ipv6 mroute " VRF_CMD_STR, - SHOW_STR - IP_STR - "IPv6 Multicast routing table\n" - VRF_CMD_HELP_STR) DEFUN (show_ipv6_route_vrf_all, show_ipv6_route_vrf_all_cmd, @@ -5738,6 +5790,14 @@ zebra_ip_config (struct vty *vty) return write; } +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "ip import-table <1-252>", + * IP_STR + * "import routes from non-main kernel table\n" + * "kernel routing table id\n" + * + */ DEFUN (ip_zebra_import_table_distance, ip_zebra_import_table_distance_cmd, "ip import-table <1-252> distance <1-255>", @@ -5773,13 +5833,17 @@ DEFUN (ip_zebra_import_table_distance, } -ALIAS (ip_zebra_import_table_distance, - ip_zebra_import_table_cmd, - "ip import-table <1-252>", - IP_STR - "import routes from non-main kernel table\n" - "kernel routing table id\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "ip import-table <1-252> route-map WORD", + * IP_STR + * "import routes from non-main kernel table\n" + * "kernel routing table id\n" + * "route-map for filtering\n" + * "route-map name\n" + * + */ DEFUN (ip_zebra_import_table_distance_routemap, ip_zebra_import_table_distance_routemap_cmd, "ip import-table <1-252> distance <1-255> route-map WORD", @@ -5823,15 +5887,16 @@ DEFUN (ip_zebra_import_table_distance_routemap, return (zebra_import_table(AFI_IP, table_id, distance, rmap_name, 1)); } -ALIAS (ip_zebra_import_table_distance_routemap, - ip_zebra_import_table_routemap_cmd, - "ip import-table <1-252> route-map WORD", - IP_STR - "import routes from non-main kernel table\n" - "kernel routing table id\n" - "route-map for filtering\n" - "route-map name\n") +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ip import-table <1-252> distance <1-255> {route-map NAME}", + * IP_STR + * "import routes from non-main kernel table to main table" + * "kernel routing table id\n" + * "distance to be used\n" + * + */ DEFUN (no_ip_zebra_import_table, no_ip_zebra_import_table_cmd, "no ip import-table <1-252> {route-map NAME}", @@ -5865,13 +5930,6 @@ DEFUN (no_ip_zebra_import_table, return (zebra_import_table(AFI_IP, table_id, 0, NULL, 0)); } -ALIAS (no_ip_zebra_import_table, - no_ip_zebra_import_table_distance_cmd, - "no ip import-table <1-252> distance <1-255> {route-map NAME}", - IP_STR - "import routes from non-main kernel table to main table" - "kernel routing table id\n" - "distance to be used\n") static int config_write_protocol (struct vty *vty) @@ -5914,13 +5972,10 @@ zebra_vty_init (void) install_element (CONFIG_NODE, &allow_external_route_update_cmd); install_element (CONFIG_NODE, &no_allow_external_route_update_cmd); - install_element (CONFIG_NODE, &ip_mroute_cmd); install_element (CONFIG_NODE, &ip_mroute_dist_cmd); - install_element (CONFIG_NODE, &no_ip_mroute_cmd); install_element (CONFIG_NODE, &no_ip_mroute_dist_cmd); install_element (CONFIG_NODE, &ip_multicast_mode_cmd); install_element (CONFIG_NODE, &no_ip_multicast_mode_cmd); - install_element (CONFIG_NODE, &no_ip_multicast_mode_noarg_cmd); install_element (CONFIG_NODE, &ip_route_cmd); install_element (CONFIG_NODE, &ip_route_tag_cmd); install_element (CONFIG_NODE, &ip_route_flags_cmd); @@ -5935,14 +5990,10 @@ zebra_vty_init (void) install_element (CONFIG_NODE, &ip_route_mask_flags2_tag_cmd); install_element (CONFIG_NODE, &no_ip_route_cmd); install_element (CONFIG_NODE, &no_ip_route_tag_cmd); - install_element (CONFIG_NODE, &no_ip_route_flags_cmd); - install_element (CONFIG_NODE, &no_ip_route_flags_tag_cmd); install_element (CONFIG_NODE, &no_ip_route_flags2_cmd); install_element (CONFIG_NODE, &no_ip_route_flags2_tag_cmd); install_element (CONFIG_NODE, &no_ip_route_mask_cmd); install_element (CONFIG_NODE, &no_ip_route_mask_tag_cmd); - install_element (CONFIG_NODE, &no_ip_route_mask_flags_cmd); - install_element (CONFIG_NODE, &no_ip_route_mask_flags_tag_cmd); install_element (CONFIG_NODE, &no_ip_route_mask_flags2_cmd); install_element (CONFIG_NODE, &no_ip_route_mask_flags2_tag_cmd); install_element (CONFIG_NODE, &ip_route_distance_cmd); @@ -5969,22 +6020,17 @@ zebra_vty_init (void) install_element (CONFIG_NODE, &no_ip_route_mask_flags_tag_distance_cmd); install_element (CONFIG_NODE, &no_ip_route_mask_flags_distance2_cmd); install_element (CONFIG_NODE, &no_ip_route_mask_flags_tag_distance2_cmd); - install_element (CONFIG_NODE, &ip_zebra_import_table_cmd); install_element (CONFIG_NODE, &ip_zebra_import_table_distance_cmd); - install_element (CONFIG_NODE, &ip_zebra_import_table_routemap_cmd); install_element (CONFIG_NODE, &ip_zebra_import_table_distance_routemap_cmd); install_element (CONFIG_NODE, &no_ip_zebra_import_table_cmd); - install_element (CONFIG_NODE, &no_ip_zebra_import_table_distance_cmd); install_element (VIEW_NODE, &show_vrf_cmd); install_element (VIEW_NODE, &show_ip_route_cmd); install_element (VIEW_NODE, &show_ip_route_ospf_instance_cmd); install_element (VIEW_NODE, &show_ip_route_tag_cmd); install_element (VIEW_NODE, &show_ip_nht_cmd); - install_element (VIEW_NODE, &show_ip_nht_vrf_cmd); install_element (VIEW_NODE, &show_ip_nht_vrf_all_cmd); install_element (VIEW_NODE, &show_ipv6_nht_cmd); - install_element (VIEW_NODE, &show_ipv6_nht_vrf_cmd); install_element (VIEW_NODE, &show_ipv6_nht_vrf_all_cmd); install_element (VIEW_NODE, &show_ip_route_addr_cmd); install_element (VIEW_NODE, &show_ip_route_prefix_cmd); @@ -5998,10 +6044,8 @@ zebra_vty_init (void) install_element (ENABLE_NODE, &show_ip_route_ospf_instance_cmd); install_element (ENABLE_NODE, &show_ip_route_tag_cmd); install_element (ENABLE_NODE, &show_ip_nht_cmd); - install_element (ENABLE_NODE, &show_ip_nht_vrf_cmd); install_element (ENABLE_NODE, &show_ip_nht_vrf_all_cmd); install_element (ENABLE_NODE, &show_ipv6_nht_cmd); - install_element (ENABLE_NODE, &show_ipv6_nht_vrf_cmd); install_element (ENABLE_NODE, &show_ipv6_nht_vrf_all_cmd); install_element (ENABLE_NODE, &show_ip_route_addr_cmd); install_element (ENABLE_NODE, &show_ip_route_prefix_cmd); @@ -6068,23 +6112,7 @@ zebra_vty_init (void) install_element (CONFIG_NODE, &no_ip_route_mask_flags_tag_distance2_vrf_cmd); install_element (VIEW_NODE, &show_ip_route_vrf_cmd); - install_element (VIEW_NODE, &show_ip_route_vrf_addr_cmd); - install_element (VIEW_NODE, &show_ip_route_vrf_tag_cmd); - install_element (VIEW_NODE, &show_ip_route_vrf_prefix_cmd); - install_element (VIEW_NODE, &show_ip_route_vrf_prefix_longer_cmd); - install_element (VIEW_NODE, &show_ip_route_vrf_protocol_cmd); - install_element (VIEW_NODE, &show_ip_route_vrf_supernets_cmd); - install_element (VIEW_NODE, &show_ip_route_vrf_summary_cmd); - install_element (VIEW_NODE, &show_ip_route_vrf_summary_prefix_cmd); install_element (ENABLE_NODE, &show_ip_route_vrf_cmd); - install_element (ENABLE_NODE, &show_ip_route_vrf_addr_cmd); - install_element (ENABLE_NODE, &show_ip_route_vrf_tag_cmd); - install_element (ENABLE_NODE, &show_ip_route_vrf_prefix_cmd); - install_element (ENABLE_NODE, &show_ip_route_vrf_prefix_longer_cmd); - install_element (ENABLE_NODE, &show_ip_route_vrf_protocol_cmd); - install_element (ENABLE_NODE, &show_ip_route_vrf_supernets_cmd); - install_element (ENABLE_NODE, &show_ip_route_vrf_summary_cmd); - install_element (ENABLE_NODE, &show_ip_route_vrf_summary_prefix_cmd); install_element (VIEW_NODE, &show_ip_route_vrf_all_cmd); install_element (VIEW_NODE, &show_ip_route_vrf_all_tag_cmd); @@ -6198,22 +6226,6 @@ zebra_vty_init (void) install_element (CONFIG_NODE, &no_ipv6_route_ifname_flags_pref_tag_vrf_cmd); - install_element (VIEW_NODE, &show_ipv6_route_vrf_cmd); - install_element (VIEW_NODE, &show_ipv6_route_vrf_tag_cmd); - install_element (VIEW_NODE, &show_ipv6_route_vrf_summary_cmd); - install_element (VIEW_NODE, &show_ipv6_route_vrf_summary_prefix_cmd); - install_element (VIEW_NODE, &show_ipv6_route_vrf_protocol_cmd); - install_element (VIEW_NODE, &show_ipv6_route_vrf_addr_cmd); - install_element (VIEW_NODE, &show_ipv6_route_vrf_prefix_cmd); - install_element (VIEW_NODE, &show_ipv6_route_vrf_prefix_longer_cmd); - install_element (ENABLE_NODE, &show_ipv6_route_vrf_cmd); - install_element (ENABLE_NODE, &show_ipv6_route_vrf_tag_cmd); - install_element (ENABLE_NODE, &show_ipv6_route_vrf_protocol_cmd); - install_element (ENABLE_NODE, &show_ipv6_route_vrf_addr_cmd); - install_element (ENABLE_NODE, &show_ipv6_route_vrf_prefix_cmd); - install_element (ENABLE_NODE, &show_ipv6_route_vrf_prefix_longer_cmd); - install_element (ENABLE_NODE, &show_ipv6_route_vrf_summary_cmd); - install_element (ENABLE_NODE, &show_ipv6_route_vrf_summary_prefix_cmd); install_element (VIEW_NODE, &show_ipv6_route_vrf_all_cmd); install_element (VIEW_NODE, &show_ipv6_route_vrf_all_tag_cmd); @@ -6232,8 +6244,6 @@ zebra_vty_init (void) install_element (ENABLE_NODE, &show_ipv6_route_vrf_all_summary_cmd); install_element (ENABLE_NODE, &show_ipv6_route_vrf_all_summary_prefix_cmd); - install_element (VIEW_NODE, &show_ipv6_mroute_vrf_cmd); - install_element (ENABLE_NODE, &show_ipv6_mroute_vrf_cmd); install_element (VIEW_NODE, &show_ipv6_mroute_vrf_all_cmd); install_element (ENABLE_NODE, &show_ipv6_mroute_vrf_all_cmd); -- cgit v1.2.3 From b162fa7858af5503570065690f139b4ccdd3a9c3 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Fri, 23 Sep 2016 11:39:50 +0000 Subject: Change {json} to [json] Signed-off-by: Daniel Walton --- bgpd/bgp_mplsvpn.c | 16 ++-- bgpd/bgp_route.c | 234 ++++++++++++++++++++++++++--------------------------- bgpd/bgp_vty.c | 80 +++++++++--------- ospfd/ospf_vty.c | 36 ++++----- zebra/zebra_vty.c | 8 +- 5 files changed, 187 insertions(+), 187 deletions(-) (limited to 'zebra') diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c index 4721a2e8e..629cfffb3 100644 --- a/bgpd/bgp_mplsvpn.c +++ b/bgpd/bgp_mplsvpn.c @@ -760,7 +760,7 @@ bgp_show_mpls_vpn (struct vty *vty, afi_t afi, struct prefix_rd *prd, DEFUN (show_bgp_ivp4_vpn, show_bgp_ipv4_vpn_cmd, - "show bgp ipv4 vpn {json}", + "show bgp ipv4 vpn [json]", SHOW_STR BGP_STR "Address Family\n" @@ -771,7 +771,7 @@ DEFUN (show_bgp_ivp4_vpn, DEFUN (show_bgp_ipv6_vpn, show_bgp_ipv6_vpn_cmd, - "show bgp ipv6 vpn {json}", + "show bgp ipv6 vpn [json]", SHOW_STR BGP_STR "Address Family\n" @@ -782,7 +782,7 @@ DEFUN (show_bgp_ipv6_vpn, DEFUN (show_bgp_ipv4_vpn_rd, show_bgp_ipv4_vpn_rd_cmd, - "show bgp ipv4 vpn rd ASN:nn_or_IP-address:nn {json}", + "show bgp ipv4 vpn rd ASN:nn_or_IP-address:nn [json]", SHOW_STR BGP_STR "Address Family\n" @@ -805,7 +805,7 @@ DEFUN (show_bgp_ipv4_vpn_rd, DEFUN (show_bgp_ipv6_vpn_rd, show_bgp_ipv6_vpn_rd_cmd, - "show bgp ipv6 vpn rd ASN:nn_or_IP-address:nn {json}", + "show bgp ipv6 vpn rd ASN:nn_or_IP-address:nn [json]", SHOW_STR BGP_STR "Address Family\n" @@ -899,7 +899,7 @@ DEFUN (show_ip_bgp_vpnv4_rd_tags, DEFUN (show_ip_bgp_vpnv4_all_neighbor_routes, show_ip_bgp_vpnv4_all_neighbor_routes_cmd, - "show ip bgp vpnv4 all neighbors A.B.C.D routes {json}", + "show ip bgp vpnv4 all neighbors A.B.C.D routes [json]", SHOW_STR IP_STR BGP_STR @@ -952,7 +952,7 @@ DEFUN (show_ip_bgp_vpnv4_all_neighbor_routes, DEFUN (show_ip_bgp_vpnv4_rd_neighbor_routes, show_ip_bgp_vpnv4_rd_neighbor_routes_cmd, - "show ip bgp vpnv4 rd ASN:nn_or_IP-address:nn neighbors A.B.C.D routes {json}", + "show ip bgp vpnv4 rd ASN:nn_or_IP-address:nn neighbors A.B.C.D routes [json]", SHOW_STR IP_STR BGP_STR @@ -1023,7 +1023,7 @@ DEFUN (show_ip_bgp_vpnv4_rd_neighbor_routes, DEFUN (show_ip_bgp_vpnv4_all_neighbor_advertised_routes, show_ip_bgp_vpnv4_all_neighbor_advertised_routes_cmd, - "show ip bgp vpnv4 all neighbors A.B.C.D advertised-routes {json}", + "show ip bgp vpnv4 all neighbors A.B.C.D advertised-routes [json]", SHOW_STR IP_STR BGP_STR @@ -1075,7 +1075,7 @@ DEFUN (show_ip_bgp_vpnv4_all_neighbor_advertised_routes, DEFUN (show_ip_bgp_vpnv4_rd_neighbor_advertised_routes, show_ip_bgp_vpnv4_rd_neighbor_advertised_routes_cmd, - "show ip bgp vpnv4 rd ASN:nn_or_IP-address:nn neighbors A.B.C.D advertised-routes {json}", + "show ip bgp vpnv4 rd ASN:nn_or_IP-address:nn neighbors A.B.C.D advertised-routes [json]", SHOW_STR IP_STR BGP_STR diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 37009e1ab..e408154f2 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -7941,7 +7941,7 @@ bgp_show_route (struct vty *vty, const char *view_name, const char *ip_str, /* BGP route print out function. */ DEFUN (show_ip_bgp, show_ip_bgp_cmd, - "show ip bgp {json}", + "show ip bgp [json]", SHOW_STR IP_STR BGP_STR @@ -7952,7 +7952,7 @@ DEFUN (show_ip_bgp, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp ipv4 (unicast|multicast) {json}", + * "show bgp ipv4 (unicast|multicast) [json]", * SHOW_STR * BGP_STR * "Address family\n" @@ -7963,7 +7963,7 @@ DEFUN (show_ip_bgp, */ DEFUN (show_ip_bgp_ipv4, show_ip_bgp_ipv4_cmd, - "show ip bgp ipv4 (unicast|multicast) {json}", + "show ip bgp ipv4 (unicast|multicast) [json]", SHOW_STR IP_STR BGP_STR @@ -7984,7 +7984,7 @@ DEFUN (show_ip_bgp_ipv4, DEFUN (show_ip_bgp_route, show_ip_bgp_route_cmd, - "show ip bgp A.B.C.D {json}", + "show ip bgp A.B.C.D [json]", SHOW_STR IP_STR BGP_STR @@ -7996,7 +7996,7 @@ DEFUN (show_ip_bgp_route, DEFUN (show_ip_bgp_route_pathtype, show_ip_bgp_route_pathtype_cmd, - "show ip bgp A.B.C.D (bestpath|multipath) {json}", + "show ip bgp A.B.C.D (bestpath|multipath) [json]", SHOW_STR IP_STR BGP_STR @@ -8015,7 +8015,7 @@ DEFUN (show_ip_bgp_route_pathtype, DEFUN (show_bgp_ipv4_safi_route_pathtype, show_bgp_ipv4_safi_route_pathtype_cmd, - "show bgp ipv4 (unicast|multicast) A.B.C.D (bestpath|multipath) {json}", + "show bgp ipv4 (unicast|multicast) A.B.C.D (bestpath|multipath) [json]", SHOW_STR BGP_STR "Address family\n" @@ -8042,7 +8042,7 @@ DEFUN (show_bgp_ipv4_safi_route_pathtype, DEFUN (show_bgp_ipv4_prefix, show_bgp_ipv4_prefix_cmd, - "show bgp ipv4 A.B.C.D/M {json}", + "show bgp ipv4 A.B.C.D/M [json]", SHOW_STR BGP_STR IP_STR @@ -8054,7 +8054,7 @@ DEFUN (show_bgp_ipv4_prefix, DEFUN (show_bgp_ipv6_route, show_bgp_ipv6_route_cmd, - "show bgp ipv6 X:X::X:X {JSON}", + "show bgp ipv6 X:X::X:X [json]", SHOW_STR BGP_STR "Address family\n" @@ -8066,7 +8066,7 @@ DEFUN (show_bgp_ipv6_route, DEFUN (show_bgp_ipv6_prefix, show_bgp_ipv6_prefix_cmd, - "show bgp ipv6 X:X::X:X/M {json}", + "show bgp ipv6 X:X::X:X/M [json]", SHOW_STR BGP_STR IP_STR @@ -8078,7 +8078,7 @@ DEFUN (show_bgp_ipv6_prefix, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp ipv4 (unicast|multicast) A.B.C.D {json}", + * "show bgp ipv4 (unicast|multicast) A.B.C.D [json]", * SHOW_STR * BGP_STR * "Address family\n" @@ -8090,7 +8090,7 @@ DEFUN (show_bgp_ipv6_prefix, */ DEFUN (show_ip_bgp_ipv4_route, show_ip_bgp_ipv4_route_cmd, - "show ip bgp ipv4 (unicast|multicast) A.B.C.D {json}", + "show ip bgp ipv4 (unicast|multicast) A.B.C.D [json]", SHOW_STR IP_STR BGP_STR @@ -8111,7 +8111,7 @@ DEFUN (show_ip_bgp_ipv4_route, DEFUN (show_ip_bgp_vpnv4_all_route, show_ip_bgp_vpnv4_all_route_cmd, - "show ip bgp vpnv4 all A.B.C.D {json}", + "show ip bgp vpnv4 all A.B.C.D [json]", SHOW_STR IP_STR BGP_STR @@ -8125,7 +8125,7 @@ DEFUN (show_ip_bgp_vpnv4_all_route, DEFUN (show_bgp_ipv4_vpn_route, show_bgp_ipv4_vpn_route_cmd, - "show bgp ipv4 vpn A.B.C.D {json}", + "show bgp ipv4 vpn A.B.C.D [json]", SHOW_STR BGP_STR "Address Family\n" @@ -8138,7 +8138,7 @@ DEFUN (show_bgp_ipv4_vpn_route, DEFUN (show_bgp_ipv6_vpn_route, show_bgp_ipv6_vpn_route_cmd, - "show bgp ipv6 vpn X:X::X:X {json}", + "show bgp ipv6 vpn X:X::X:X [json]", SHOW_STR BGP_STR "Address Family\n" @@ -8151,7 +8151,7 @@ DEFUN (show_bgp_ipv6_vpn_route, DEFUN (show_bgp_ipv4_vpn_rd_route, show_bgp_ipv4_vpn_rd_route_cmd, - "show bgp ipv4 vpn rd ASN:nn_or_IP-address:nn A.B.C.D {json}", + "show bgp ipv4 vpn rd ASN:nn_or_IP-address:nn A.B.C.D [json]", SHOW_STR BGP_STR IP_STR @@ -8175,7 +8175,7 @@ DEFUN (show_bgp_ipv4_vpn_rd_route, DEFUN (show_bgp_ipv6_vpn_rd_route, show_bgp_ipv6_vpn_rd_route_cmd, - "show bgp ipv6 vpn rd ASN:nn_or_IP-address:nn X:X::X:X {json}", + "show bgp ipv6 vpn rd ASN:nn_or_IP-address:nn X:X::X:X [json]", SHOW_STR BGP_STR "Address Family\n" @@ -8199,7 +8199,7 @@ DEFUN (show_bgp_ipv6_vpn_rd_route, DEFUN (show_ip_bgp_vpnv4_rd_route, show_ip_bgp_vpnv4_rd_route_cmd, - "show ip bgp vpnv4 rd ASN:nn_or_IP-address:nn A.B.C.D {json}", + "show ip bgp vpnv4 rd ASN:nn_or_IP-address:nn A.B.C.D [json]", SHOW_STR IP_STR BGP_STR @@ -8224,7 +8224,7 @@ DEFUN (show_ip_bgp_vpnv4_rd_route, DEFUN (show_ip_bgp_prefix, show_ip_bgp_prefix_cmd, - "show ip bgp A.B.C.D/M {json}", + "show ip bgp A.B.C.D/M [json]", SHOW_STR IP_STR BGP_STR @@ -8236,7 +8236,7 @@ DEFUN (show_ip_bgp_prefix, DEFUN (show_ip_bgp_prefix_pathtype, show_ip_bgp_prefix_pathtype_cmd, - "show ip bgp A.B.C.D/M (bestpath|multipath) {json}", + "show ip bgp A.B.C.D/M (bestpath|multipath) [json]", SHOW_STR IP_STR BGP_STR @@ -8254,7 +8254,7 @@ DEFUN (show_ip_bgp_prefix_pathtype, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp ipv4 (unicast|multicast) A.B.C.D/M {json}", + * "show bgp ipv4 (unicast|multicast) A.B.C.D/M [json]", * SHOW_STR * BGP_STR * "Address family\n" @@ -8266,7 +8266,7 @@ DEFUN (show_ip_bgp_prefix_pathtype, */ DEFUN (show_ip_bgp_ipv4_prefix, show_ip_bgp_ipv4_prefix_cmd, - "show ip bgp ipv4 (unicast|multicast) A.B.C.D/M {json}", + "show ip bgp ipv4 (unicast|multicast) A.B.C.D/M [json]", SHOW_STR IP_STR BGP_STR @@ -8287,7 +8287,7 @@ DEFUN (show_ip_bgp_ipv4_prefix, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp ipv4 (unicast|multicast) A.B.C.D/M (bestpath|multipath) {json}", + * "show bgp ipv4 (unicast|multicast) A.B.C.D/M (bestpath|multipath) [json]", * SHOW_STR * BGP_STR * "Address family\n" @@ -8301,7 +8301,7 @@ DEFUN (show_ip_bgp_ipv4_prefix, */ DEFUN (show_ip_bgp_ipv4_prefix_pathtype, show_ip_bgp_ipv4_prefix_pathtype_cmd, - "show ip bgp ipv4 (unicast|multicast) A.B.C.D/M (bestpath|multipath) {json}", + "show ip bgp ipv4 (unicast|multicast) A.B.C.D/M (bestpath|multipath) [json]", SHOW_STR IP_STR BGP_STR @@ -8330,7 +8330,7 @@ DEFUN (show_ip_bgp_ipv4_prefix_pathtype, DEFUN (show_ip_bgp_vpnv4_all_prefix, show_ip_bgp_vpnv4_all_prefix_cmd, - "show ip bgp vpnv4 all A.B.C.D/M {json}", + "show ip bgp vpnv4 all A.B.C.D/M [json]", SHOW_STR IP_STR BGP_STR @@ -8344,7 +8344,7 @@ DEFUN (show_ip_bgp_vpnv4_all_prefix, DEFUN (show_ip_bgp_vpnv4_rd_prefix, show_ip_bgp_vpnv4_rd_prefix_cmd, - "show ip bgp vpnv4 rd ASN:nn_or_IP-address:nn A.B.C.D/M {json}", + "show ip bgp vpnv4 rd ASN:nn_or_IP-address:nn A.B.C.D/M [json]", SHOW_STR IP_STR BGP_STR @@ -8368,7 +8368,7 @@ DEFUN (show_ip_bgp_vpnv4_rd_prefix, DEFUN (show_ip_bgp_view, show_ip_bgp_instance_cmd, - "show ip bgp " BGP_INSTANCE_CMD " {json}", + "show ip bgp " BGP_INSTANCE_CMD " [json]", SHOW_STR IP_STR BGP_STR @@ -8390,7 +8390,7 @@ DEFUN (show_ip_bgp_view, DEFUN (show_ip_bgp_instance_all, show_ip_bgp_instance_all_cmd, - "show ip bgp " BGP_INSTANCE_ALL_CMD " {json}", + "show ip bgp " BGP_INSTANCE_ALL_CMD " [json]", SHOW_STR IP_STR BGP_STR @@ -8405,7 +8405,7 @@ DEFUN (show_ip_bgp_instance_all, DEFUN (show_ip_bgp_instance_route, show_ip_bgp_instance_route_cmd, - "show ip bgp " BGP_INSTANCE_CMD " A.B.C.D {json}", + "show ip bgp " BGP_INSTANCE_CMD " A.B.C.D [json]", SHOW_STR IP_STR BGP_STR @@ -8418,7 +8418,7 @@ DEFUN (show_ip_bgp_instance_route, DEFUN (show_ip_bgp_instance_route_pathtype, show_ip_bgp_instance_route_pathtype_cmd, - "show ip bgp " BGP_INSTANCE_CMD " A.B.C.D (bestpath|multipath) {json}", + "show ip bgp " BGP_INSTANCE_CMD " A.B.C.D (bestpath|multipath) [json]", SHOW_STR IP_STR BGP_STR @@ -8438,7 +8438,7 @@ DEFUN (show_ip_bgp_instance_route_pathtype, DEFUN (show_ip_bgp_instance_prefix, show_ip_bgp_instance_prefix_cmd, - "show ip bgp " BGP_INSTANCE_CMD " A.B.C.D/M {json}", + "show ip bgp " BGP_INSTANCE_CMD " A.B.C.D/M [json]", SHOW_STR IP_STR BGP_STR @@ -8451,7 +8451,7 @@ DEFUN (show_ip_bgp_instance_prefix, DEFUN (show_ip_bgp_instance_prefix_pathtype, show_ip_bgp_instance_prefix_pathtype_cmd, - "show ip bgp " BGP_INSTANCE_CMD " A.B.C.D/M (bestpath|multipath) {json}", + "show ip bgp " BGP_INSTANCE_CMD " A.B.C.D/M (bestpath|multipath) [json]", SHOW_STR IP_STR BGP_STR @@ -8471,7 +8471,7 @@ DEFUN (show_ip_bgp_instance_prefix_pathtype, #ifdef HAVE_IPV6 /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp ipv6 {json}", + * "show bgp ipv6 [json]", * SHOW_STR * BGP_STR * "Address family\n" @@ -8480,7 +8480,7 @@ DEFUN (show_ip_bgp_instance_prefix_pathtype, */ DEFUN (show_bgp, show_bgp_cmd, - "show bgp {json}", + "show bgp [json]", SHOW_STR BGP_STR "JavaScript Object Notation\n") @@ -8492,7 +8492,7 @@ DEFUN (show_bgp, DEFUN (show_bgp_ipv6_safi, show_bgp_ipv6_safi_cmd, - "show bgp ipv6 (unicast|multicast) {json}", + "show bgp ipv6 (unicast|multicast) [json]", SHOW_STR BGP_STR "Address family\n" @@ -8519,7 +8519,7 @@ bgp_show_ipv6_bgp_deprecate_warning (struct vty *vty) /* old command */ DEFUN (show_ipv6_bgp, show_ipv6_bgp_cmd, - "show ipv6 bgp {json}", + "show ipv6 bgp [json]", SHOW_STR IP_STR BGP_STR @@ -8532,7 +8532,7 @@ DEFUN (show_ipv6_bgp, DEFUN (show_bgp_route, show_bgp_route_cmd, - "show bgp X:X::X:X {json}", + "show bgp X:X::X:X [json]", SHOW_STR BGP_STR "Network in the BGP routing table to display\n" @@ -8543,7 +8543,7 @@ DEFUN (show_bgp_route, DEFUN (show_bgp_ipv6_safi_route, show_bgp_ipv6_safi_route_cmd, - "show bgp ipv6 (unicast|multicast) X:X::X:X {json}", + "show bgp ipv6 (unicast|multicast) X:X::X:X [json]", SHOW_STR BGP_STR "Address family\n" @@ -8561,7 +8561,7 @@ DEFUN (show_bgp_ipv6_safi_route, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp ipv6 X:X::X:X (bestpath|multipath) {json}", + * "show bgp ipv6 X:X::X:X (bestpath|multipath) [json]", * SHOW_STR * BGP_STR * "Address family\n" @@ -8573,7 +8573,7 @@ DEFUN (show_bgp_ipv6_safi_route, */ DEFUN (show_bgp_route_pathtype, show_bgp_route_pathtype_cmd, - "show bgp X:X::X:X (bestpath|multipath) {json}", + "show bgp X:X::X:X (bestpath|multipath) [json]", SHOW_STR BGP_STR "Network in the BGP routing table to display\n" @@ -8591,7 +8591,7 @@ DEFUN (show_bgp_route_pathtype, DEFUN (show_bgp_ipv6_safi_route_pathtype, show_bgp_ipv6_safi_route_pathtype_cmd, - "show bgp ipv6 (unicast|multicast) X:X::X:X (bestpath|multipath) {json}", + "show bgp ipv6 (unicast|multicast) X:X::X:X (bestpath|multipath) [json]", SHOW_STR BGP_STR "Address family\n" @@ -8618,7 +8618,7 @@ DEFUN (show_bgp_ipv6_safi_route_pathtype, /* old command */ DEFUN (show_ipv6_bgp_route, show_ipv6_bgp_route_cmd, - "show ipv6 bgp X:X::X:X {json}", + "show ipv6 bgp X:X::X:X [json]", SHOW_STR IP_STR BGP_STR @@ -8631,7 +8631,7 @@ DEFUN (show_ipv6_bgp_route, DEFUN (show_bgp_prefix, show_bgp_prefix_cmd, - "show bgp X:X::X:X/M {json}", + "show bgp X:X::X:X/M [json]", SHOW_STR BGP_STR "IPv6 prefix /\n" @@ -8642,7 +8642,7 @@ DEFUN (show_bgp_prefix, DEFUN (show_bgp_ipv6_safi_prefix, show_bgp_ipv6_safi_prefix_cmd, - "show bgp ipv6 (unicast|multicast) X:X::X:X/M {json}", + "show bgp ipv6 (unicast|multicast) X:X::X:X/M [json]", SHOW_STR BGP_STR "Address family\n" @@ -8660,7 +8660,7 @@ DEFUN (show_bgp_ipv6_safi_prefix, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp ipv6 X:X::X:X/M (bestpath|multipath) {json}", + * "show bgp ipv6 X:X::X:X/M (bestpath|multipath) [json]", * SHOW_STR * BGP_STR * "Address family\n" @@ -8672,7 +8672,7 @@ DEFUN (show_bgp_ipv6_safi_prefix, */ DEFUN (show_bgp_prefix_pathtype, show_bgp_prefix_pathtype_cmd, - "show bgp X:X::X:X/M (bestpath|multipath) {json}", + "show bgp X:X::X:X/M (bestpath|multipath) [json]", SHOW_STR BGP_STR "IPv6 prefix /\n" @@ -8690,7 +8690,7 @@ DEFUN (show_bgp_prefix_pathtype, DEFUN (show_bgp_ipv6_safi_prefix_pathtype, show_bgp_ipv6_safi_prefix_pathtype_cmd, - "show bgp ipv6 (unicast|multicast) X:X::X:X/M (bestpath|multipath) {json}", + "show bgp ipv6 (unicast|multicast) X:X::X:X/M (bestpath|multipath) [json]", SHOW_STR BGP_STR "Address family\n" @@ -8717,7 +8717,7 @@ DEFUN (show_bgp_ipv6_safi_prefix_pathtype, /* old command */ DEFUN (show_ipv6_bgp_prefix, show_ipv6_bgp_prefix_cmd, - "show ipv6 bgp X:X::X:X/M {json}", + "show ipv6 bgp X:X::X:X/M [json]", SHOW_STR IP_STR BGP_STR @@ -8730,7 +8730,7 @@ DEFUN (show_ipv6_bgp_prefix, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " ipv6 {json}", + * "show bgp " BGP_INSTANCE_CMD " ipv6 [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -8740,7 +8740,7 @@ DEFUN (show_ipv6_bgp_prefix, */ DEFUN (show_bgp_view, show_bgp_instance_cmd, - "show bgp " BGP_INSTANCE_CMD " {json}", + "show bgp " BGP_INSTANCE_CMD " [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -8761,7 +8761,7 @@ DEFUN (show_bgp_view, DEFUN (show_bgp_instance_all, show_bgp_instance_all_cmd, - "show bgp " BGP_INSTANCE_ALL_CMD " {json}", + "show bgp " BGP_INSTANCE_ALL_CMD " [json]", SHOW_STR BGP_STR BGP_INSTANCE_ALL_HELP_STR @@ -8776,7 +8776,7 @@ DEFUN (show_bgp_instance_all, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " ipv6 X:X::X:X {json}", + * "show bgp " BGP_INSTANCE_CMD " ipv6 X:X::X:X [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -8787,7 +8787,7 @@ DEFUN (show_bgp_instance_all, */ DEFUN (show_bgp_instance_route, show_bgp_instance_route_cmd, - "show bgp " BGP_INSTANCE_CMD " X:X::X:X {json}", + "show bgp " BGP_INSTANCE_CMD " X:X::X:X [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -8800,7 +8800,7 @@ DEFUN (show_bgp_instance_route, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " ipv6 X:X::X:X (bestpath|multipath) {json}", + * "show bgp " BGP_INSTANCE_CMD " ipv6 X:X::X:X (bestpath|multipath) [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -8813,7 +8813,7 @@ DEFUN (show_bgp_instance_route, */ DEFUN (show_bgp_instance_route_pathtype, show_bgp_instance_route_pathtype_cmd, - "show bgp " BGP_INSTANCE_CMD " X:X::X:X (bestpath|multipath) {json}", + "show bgp " BGP_INSTANCE_CMD " X:X::X:X (bestpath|multipath) [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -8832,7 +8832,7 @@ DEFUN (show_bgp_instance_route_pathtype, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " ipv6 X:X::X:X/M {json}", + * "show bgp " BGP_INSTANCE_CMD " ipv6 X:X::X:X/M [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -8843,7 +8843,7 @@ DEFUN (show_bgp_instance_route_pathtype, */ DEFUN (show_bgp_instance_prefix, show_bgp_instance_prefix_cmd, - "show bgp " BGP_INSTANCE_CMD " X:X::X:X/M {json}", + "show bgp " BGP_INSTANCE_CMD " X:X::X:X/M [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -8856,7 +8856,7 @@ DEFUN (show_bgp_instance_prefix, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " ipv6 X:X::X:X/M (bestpath|multipath) {json}", + * "show bgp " BGP_INSTANCE_CMD " ipv6 X:X::X:X/M (bestpath|multipath) [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -8869,7 +8869,7 @@ DEFUN (show_bgp_instance_prefix, */ DEFUN (show_bgp_instance_prefix_pathtype, show_bgp_instance_prefix_pathtype_cmd, - "show bgp " BGP_INSTANCE_CMD " X:X::X:X/M (bestpath|multipath) {json}", + "show bgp " BGP_INSTANCE_CMD " X:X::X:X/M (bestpath|multipath) [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -9015,7 +9015,7 @@ DEFUN (show_bgp_instance_prefix_longer, /* old command */ DEFUN (show_ipv6_mbgp, show_ipv6_mbgp_cmd, - "show ipv6 mbgp {json}", + "show ipv6 mbgp [json]", SHOW_STR IP_STR MBGP_STR @@ -9029,7 +9029,7 @@ DEFUN (show_ipv6_mbgp, /* old command */ DEFUN (show_ipv6_mbgp_route, show_ipv6_mbgp_route_cmd, - "show ipv6 mbgp X:X::X:X {json}", + "show ipv6 mbgp X:X::X:X [json]", SHOW_STR IP_STR MBGP_STR @@ -9043,7 +9043,7 @@ DEFUN (show_ipv6_mbgp_route, /* old command */ DEFUN (show_ipv6_mbgp_prefix, show_ipv6_mbgp_prefix_cmd, - "show ipv6 mbgp X:X::X:X/M {json}", + "show ipv6 mbgp X:X::X:X/M [json]", SHOW_STR IP_STR MBGP_STR @@ -12045,7 +12045,7 @@ bgp_peer_counts (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi, u_c DEFUN (show_ip_bgp_neighbor_prefix_counts, show_ip_bgp_neighbor_prefix_counts_cmd, - "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) prefix-counts {json}", + "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) prefix-counts [json]", SHOW_STR IP_STR BGP_STR @@ -12068,7 +12068,7 @@ DEFUN (show_ip_bgp_neighbor_prefix_counts, DEFUN (show_ip_bgp_instance_neighbor_prefix_counts, show_ip_bgp_instance_neighbor_prefix_counts_cmd, - "show ip bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) prefix-counts {json}", + "show ip bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) prefix-counts [json]", SHOW_STR IP_STR BGP_STR @@ -12092,7 +12092,7 @@ DEFUN (show_ip_bgp_instance_neighbor_prefix_counts, DEFUN (show_bgp_ipv6_neighbor_prefix_counts, show_bgp_ipv6_neighbor_prefix_counts_cmd, - "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) prefix-counts {json}", + "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) prefix-counts [json]", SHOW_STR BGP_STR "Address family\n" @@ -12115,7 +12115,7 @@ DEFUN (show_bgp_ipv6_neighbor_prefix_counts, DEFUN (show_bgp_instance_ipv6_neighbor_prefix_counts, show_bgp_instance_ipv6_neighbor_prefix_counts_cmd, - "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) prefix-counts {json}", + "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) prefix-counts [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -12139,7 +12139,7 @@ DEFUN (show_bgp_instance_ipv6_neighbor_prefix_counts, DEFUN (show_ip_bgp_ipv4_neighbor_prefix_counts, show_ip_bgp_ipv4_neighbor_prefix_counts_cmd, - "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) prefix-counts {json}", + "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) prefix-counts [json]", SHOW_STR IP_STR BGP_STR @@ -12168,7 +12168,7 @@ DEFUN (show_ip_bgp_ipv4_neighbor_prefix_counts, DEFUN (show_ip_bgp_vpnv4_neighbor_prefix_counts, show_ip_bgp_vpnv4_neighbor_prefix_counts_cmd, - "show ip bgp vpnv4 all neighbors (A.B.C.D|X:X::X:X|WORD) prefix-counts {json}", + "show ip bgp vpnv4 all neighbors (A.B.C.D|X:X::X:X|WORD) prefix-counts [json]", SHOW_STR IP_STR BGP_STR @@ -12434,7 +12434,7 @@ peer_adj_routes (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ip bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes route-map WORD {json}", + * "show ip bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes route-map WORD [json]", * SHOW_STR * IP_STR * BGP_STR @@ -12449,7 +12449,7 @@ peer_adj_routes (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi, */ DEFUN (show_ip_bgp_instance_neighbor_advertised_route, show_ip_bgp_instance_neighbor_advertised_route_cmd, - "show ip bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes {json}", + "show ip bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes [json]", SHOW_STR IP_STR BGP_STR @@ -12476,7 +12476,7 @@ DEFUN (show_ip_bgp_instance_neighbor_advertised_route, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes route-map WORD {json}", + * "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes route-map WORD [json]", * SHOW_STR * IP_STR * BGP_STR @@ -12490,7 +12490,7 @@ DEFUN (show_ip_bgp_instance_neighbor_advertised_route, */ DEFUN (show_ip_bgp_neighbor_advertised_route, show_ip_bgp_neighbor_advertised_route_cmd, - "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes {json}", + "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes [json]", SHOW_STR IP_STR BGP_STR @@ -12521,7 +12521,7 @@ DEFUN (show_ip_bgp_neighbor_advertised_route, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes route-map WORD {json}", + * "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes route-map WORD [json]", * SHOW_STR * IP_STR * BGP_STR @@ -12539,7 +12539,7 @@ DEFUN (show_ip_bgp_neighbor_advertised_route, */ DEFUN (show_ip_bgp_ipv4_neighbor_advertised_route, show_ip_bgp_ipv4_neighbor_advertised_route_cmd, - "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes {json}", + "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes [json]", SHOW_STR IP_STR BGP_STR @@ -12574,7 +12574,7 @@ DEFUN (show_ip_bgp_ipv4_neighbor_advertised_route, #ifdef HAVE_IPV6 /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes {json}", + * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -12589,7 +12589,7 @@ DEFUN (show_ip_bgp_ipv4_neighbor_advertised_route, */ DEFUN (show_bgp_instance_neighbor_advertised_route, show_bgp_instance_neighbor_advertised_route_cmd, - "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes {json}", + "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -12617,7 +12617,7 @@ DEFUN (show_bgp_instance_neighbor_advertised_route, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes {json}", + * "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes [json]", * SHOW_STR * BGP_STR * "Address family\n" @@ -12628,7 +12628,7 @@ DEFUN (show_bgp_instance_neighbor_advertised_route, * "Display the routes advertised to a BGP neighbor\n" * "JavaScript Object Notation\n" * - * "show ipv6 bgp neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes {json}", + * "show ipv6 bgp neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes [json]", * SHOW_STR * IPV6_STR * BGP_STR @@ -12642,7 +12642,7 @@ DEFUN (show_bgp_instance_neighbor_advertised_route, */ DEFUN (show_bgp_neighbor_advertised_route, show_bgp_neighbor_advertised_route_cmd, - "show bgp neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes {json}", + "show bgp neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes [json]", SHOW_STR BGP_STR "Detailed information on TCP and BGP neighbor connections\n" @@ -12674,7 +12674,7 @@ DEFUN (show_bgp_neighbor_advertised_route, /* old command */ DEFUN (ipv6_mbgp_neighbor_advertised_route, ipv6_mbgp_neighbor_advertised_route_cmd, - "show ipv6 mbgp neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes {json}", + "show ipv6 mbgp neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes [json]", SHOW_STR IPV6_STR MBGP_STR @@ -12700,7 +12700,7 @@ DEFUN (ipv6_mbgp_neighbor_advertised_route, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) received-routes {json}", + * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) received-routes [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -12715,7 +12715,7 @@ DEFUN (ipv6_mbgp_neighbor_advertised_route, */ DEFUN (show_bgp_instance_neighbor_received_routes, show_bgp_instance_neighbor_received_routes_cmd, - "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) received-routes {json}", + "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) received-routes [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -12738,7 +12738,7 @@ DEFUN (show_bgp_instance_neighbor_received_routes, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ip bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) received-routes route-map WORD {json}", + * "show ip bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) received-routes route-map WORD [json]", * SHOW_STR * IP_STR * BGP_STR @@ -12753,7 +12753,7 @@ DEFUN (show_bgp_instance_neighbor_received_routes, */ DEFUN (show_ip_bgp_instance_neighbor_received_routes, show_ip_bgp_instance_neighbor_received_routes_cmd, - "show ip bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) received-routes {json}", + "show ip bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) received-routes [json]", SHOW_STR IP_STR BGP_STR @@ -12778,7 +12778,7 @@ DEFUN (show_ip_bgp_instance_neighbor_received_routes, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) received-routes route-map WORD {json}", + * "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) received-routes route-map WORD [json]", * SHOW_STR * IP_STR * BGP_STR @@ -12792,7 +12792,7 @@ DEFUN (show_ip_bgp_instance_neighbor_received_routes, */ DEFUN (show_ip_bgp_neighbor_received_routes, show_ip_bgp_neighbor_received_routes_cmd, - "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) received-routes {json}", + "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) received-routes [json]", SHOW_STR IP_STR BGP_STR @@ -12823,7 +12823,7 @@ DEFUN (show_ip_bgp_neighbor_received_routes, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) received-routes route-map WORD {json}", + * "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) received-routes route-map WORD [json]", * SHOW_STR * IP_STR * BGP_STR @@ -12840,7 +12840,7 @@ DEFUN (show_ip_bgp_neighbor_received_routes, */ DEFUN (show_ip_bgp_ipv4_neighbor_received_routes, show_ip_bgp_ipv4_neighbor_received_routes_cmd, - "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) received-routes {json}", + "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) received-routes [json]", SHOW_STR IP_STR BGP_STR @@ -12874,7 +12874,7 @@ DEFUN (show_ip_bgp_ipv4_neighbor_received_routes, DEFUN (show_bgp_instance_afi_safi_neighbor_adv_recd_routes, show_bgp_instance_afi_safi_neighbor_adv_recd_routes_cmd, - "show bgp " BGP_INSTANCE_CMD " (ipv4|ipv6) (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) (advertised-routes|received-routes) {json}", + "show bgp " BGP_INSTANCE_CMD " (ipv4|ipv6) (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) (advertised-routes|received-routes) [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -12910,7 +12910,7 @@ DEFUN (show_bgp_instance_afi_safi_neighbor_adv_recd_routes, DEFUN (show_ip_bgp_neighbor_received_prefix_filter, show_ip_bgp_neighbor_received_prefix_filter_cmd, - "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) received prefix-filter {json}", + "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) received prefix-filter [json]", SHOW_STR IP_STR BGP_STR @@ -12997,7 +12997,7 @@ DEFUN (show_ip_bgp_neighbor_received_prefix_filter, DEFUN (show_ip_bgp_ipv4_neighbor_received_prefix_filter, show_ip_bgp_ipv4_neighbor_received_prefix_filter_cmd, - "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) received prefix-filter {json}", + "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) received prefix-filter [json]", SHOW_STR IP_STR BGP_STR @@ -13114,7 +13114,7 @@ DEFUN (show_ip_bgp_ipv4_neighbor_received_prefix_filter, #ifdef HAVE_IPV6 /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) received-routes {json}", + * "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) received-routes [json]", * SHOW_STR * BGP_STR * "Address family\n" @@ -13125,7 +13125,7 @@ DEFUN (show_ip_bgp_ipv4_neighbor_received_prefix_filter, * "Display the received routes from neighbor\n" * "JavaScript Object Notation\n" * - * "show ipv6 bgp neighbors (A.B.C.D|X:X::X:X|WORD) received-routes {json}", + * "show ipv6 bgp neighbors (A.B.C.D|X:X::X:X|WORD) received-routes [json]", * SHOW_STR * IPV6_STR * BGP_STR @@ -13139,7 +13139,7 @@ DEFUN (show_ip_bgp_ipv4_neighbor_received_prefix_filter, */ DEFUN (show_bgp_neighbor_received_routes, show_bgp_neighbor_received_routes_cmd, - "show bgp neighbors (A.B.C.D|X:X::X:X|WORD) received-routes {json}", + "show bgp neighbors (A.B.C.D|X:X::X:X|WORD) received-routes [json]", SHOW_STR BGP_STR "Detailed information on TCP and BGP neighbor connections\n" @@ -13167,7 +13167,7 @@ DEFUN (show_bgp_neighbor_received_routes, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) received prefix-filter {json}", + * "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) received prefix-filter [json]", * SHOW_STR * BGP_STR * "Address family\n" @@ -13182,7 +13182,7 @@ DEFUN (show_bgp_neighbor_received_routes, */ DEFUN (show_bgp_neighbor_received_prefix_filter, show_bgp_neighbor_received_prefix_filter_cmd, - "show bgp neighbors (A.B.C.D|X:X::X:X|WORD) received prefix-filter {json}", + "show bgp neighbors (A.B.C.D|X:X::X:X|WORD) received prefix-filter [json]", SHOW_STR BGP_STR "Detailed information on TCP and BGP neighbor connections\n" @@ -13272,7 +13272,7 @@ DEFUN (show_bgp_neighbor_received_prefix_filter, /* old command */ DEFUN (ipv6_mbgp_neighbor_received_routes, ipv6_mbgp_neighbor_received_routes_cmd, - "show ipv6 mbgp neighbors (A.B.C.D|X:X::X:X|WORD) received-routes {json}", + "show ipv6 mbgp neighbors (A.B.C.D|X:X::X:X|WORD) received-routes [json]", SHOW_STR IPV6_STR MBGP_STR @@ -13296,7 +13296,7 @@ DEFUN (ipv6_mbgp_neighbor_received_routes, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) received prefix-filter {json}", + * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) received prefix-filter [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -13312,7 +13312,7 @@ DEFUN (ipv6_mbgp_neighbor_received_routes, */ DEFUN (show_bgp_instance_neighbor_received_prefix_filter, show_bgp_instance_neighbor_received_prefix_filter_cmd, - "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) received prefix-filter {json}", + "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) received prefix-filter [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -13428,7 +13428,7 @@ bgp_show_neighbor_route (struct vty *vty, struct peer *peer, afi_t afi, DEFUN (show_ip_bgp_neighbor_routes, show_ip_bgp_neighbor_routes_cmd, - "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) routes {json}", + "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) routes [json]", SHOW_STR IP_STR BGP_STR @@ -13452,7 +13452,7 @@ DEFUN (show_ip_bgp_neighbor_routes, DEFUN (show_ip_bgp_instance_neighbor_routes, show_ip_bgp_instance_neighbor_routes_cmd, - "show ip bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) routes {json}", + "show ip bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) routes [json]", SHOW_STR IP_STR BGP_STR @@ -13477,7 +13477,7 @@ DEFUN (show_ip_bgp_instance_neighbor_routes, DEFUN (show_ip_bgp_neighbor_flap, show_ip_bgp_neighbor_flap_cmd, - "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) flap-statistics {json}", + "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) flap-statistics [json]", SHOW_STR IP_STR BGP_STR @@ -13501,7 +13501,7 @@ DEFUN (show_ip_bgp_neighbor_flap, DEFUN (show_ip_bgp_neighbor_damp, show_ip_bgp_neighbor_damp_cmd, - "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) dampened-routes {json}", + "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) dampened-routes [json]", SHOW_STR IP_STR BGP_STR @@ -13525,7 +13525,7 @@ DEFUN (show_ip_bgp_neighbor_damp, DEFUN (show_ip_bgp_ipv4_neighbor_routes, show_ip_bgp_ipv4_neighbor_routes_cmd, - "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) routes {json}", + "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) routes [json]", SHOW_STR IP_STR BGP_STR @@ -13557,7 +13557,7 @@ DEFUN (show_ip_bgp_ipv4_neighbor_routes, #ifdef HAVE_IPV6 /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) routes {json}", + * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) routes [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -13572,7 +13572,7 @@ DEFUN (show_ip_bgp_ipv4_neighbor_routes, */ DEFUN (show_bgp_instance_neighbor_routes, show_bgp_instance_neighbor_routes_cmd, - "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) routes {json}", + "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) routes [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -13597,7 +13597,7 @@ DEFUN (show_bgp_instance_neighbor_routes, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp neighbors (A.B.C.D|X:X::X:X|WORD) dampened-routes {json}", + * "show bgp neighbors (A.B.C.D|X:X::X:X|WORD) dampened-routes [json]", * SHOW_STR * BGP_STR * "Detailed information on TCP and BGP neighbor connections\n" @@ -13607,7 +13607,7 @@ DEFUN (show_bgp_instance_neighbor_routes, * "Display the dampened routes received from neighbor\n" * "JavaScript Object Notation\n" * - * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) dampened-routes {json}", + * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) dampened-routes [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -13619,7 +13619,7 @@ DEFUN (show_bgp_instance_neighbor_routes, * "Display the dampened routes received from neighbor\n" * "JavaScript Object Notation\n" * - * "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) dampened-routes {json}", + * "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) dampened-routes [json]", * SHOW_STR * BGP_STR * "Address family\n" @@ -13633,7 +13633,7 @@ DEFUN (show_bgp_instance_neighbor_routes, */ DEFUN (show_bgp_instance_neighbor_damp, show_bgp_instance_neighbor_damp_cmd, - "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) dampened-routes {json}", + "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) dampened-routes [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -13663,7 +13663,7 @@ DEFUN (show_bgp_instance_neighbor_damp, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp neighbors (A.B.C.D|X:X::X:X|WORD) flap-statistics {json}", + * "show bgp neighbors (A.B.C.D|X:X::X:X|WORD) flap-statistics [json]", * SHOW_STR * BGP_STR * "Detailed information on TCP and BGP neighbor connections\n" @@ -13673,7 +13673,7 @@ DEFUN (show_bgp_instance_neighbor_damp, * "Display flap statistics of the routes learned from neighbor\n" * "JavaScript Object Notation\n" * - * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) flap-statistics {json}", + * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) flap-statistics [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -13685,7 +13685,7 @@ DEFUN (show_bgp_instance_neighbor_damp, * "Display flap statistics of the routes learned from neighbor\n" * "JavaScript Object Notation\n" * - * "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) flap-statistics {json}", + * "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) flap-statistics [json]", * SHOW_STR * BGP_STR * "Address family\n" @@ -13699,7 +13699,7 @@ DEFUN (show_bgp_instance_neighbor_damp, */ DEFUN (show_bgp_instance_neighbor_flap, show_bgp_instance_neighbor_flap_cmd, - "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) flap-statistics {json}", + "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) flap-statistics [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -13729,7 +13729,7 @@ DEFUN (show_bgp_instance_neighbor_flap, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ipv6 bgp neighbors (A.B.C.D|X:X::X:X|WORD) routes {json}", + * "show ipv6 bgp neighbors (A.B.C.D|X:X::X:X|WORD) routes [json]", * SHOW_STR * IPV6_STR * BGP_STR @@ -13740,7 +13740,7 @@ DEFUN (show_bgp_instance_neighbor_flap, * "Display routes learned from neighbor\n" * "JavaScript Object Notation\n" * - * "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) routes {json}", + * "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) routes [json]", * SHOW_STR * BGP_STR * "Address family\n" @@ -13754,7 +13754,7 @@ DEFUN (show_bgp_instance_neighbor_flap, */ DEFUN (show_bgp_neighbor_routes, show_bgp_neighbor_routes_cmd, - "show bgp neighbors (A.B.C.D|X:X::X:X|WORD) routes {json}", + "show bgp neighbors (A.B.C.D|X:X::X:X|WORD) routes [json]", SHOW_STR BGP_STR "Detailed information on TCP and BGP neighbor connections\n" @@ -13782,7 +13782,7 @@ DEFUN (show_bgp_neighbor_routes, /* old command */ DEFUN (ipv6_mbgp_neighbor_routes, ipv6_mbgp_neighbor_routes_cmd, - "show ipv6 mbgp neighbors (A.B.C.D|X:X::X:X|WORD) routes {json}", + "show ipv6 mbgp neighbors (A.B.C.D|X:X::X:X|WORD) routes [json]", SHOW_STR IPV6_STR MBGP_STR diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 60e8d36c9..5a06dd8e8 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -10115,7 +10115,7 @@ DEFUN (show_bgp_views, DEFUN (show_bgp_vrfs, show_bgp_vrfs_cmd, - "show bgp vrfs {json}", + "show bgp vrfs [json]", SHOW_STR BGP_STR "Show BGP VRFs\n" @@ -10761,7 +10761,7 @@ bgp_show_all_instances_summary_vty (struct vty *vty, afi_t afi, safi_t safi, /* `show ip bgp summary' commands. */ DEFUN (show_ip_bgp_summary, show_ip_bgp_summary_cmd, - "show ip bgp summary {json}", + "show ip bgp summary [json]", SHOW_STR IP_STR BGP_STR @@ -10774,7 +10774,7 @@ DEFUN (show_ip_bgp_summary, DEFUN (show_ip_bgp_instance_summary, show_ip_bgp_instance_summary_cmd, - "show ip bgp " BGP_INSTANCE_CMD " summary {json}", + "show ip bgp " BGP_INSTANCE_CMD " summary [json]", SHOW_STR IP_STR BGP_STR @@ -10788,7 +10788,7 @@ DEFUN (show_ip_bgp_instance_summary, DEFUN (show_ip_bgp_instance_all_summary, show_ip_bgp_instance_all_summary_cmd, - "show ip bgp " BGP_INSTANCE_ALL_CMD " summary {json}", + "show ip bgp " BGP_INSTANCE_ALL_CMD " summary [json]", SHOW_STR IP_STR BGP_STR @@ -10804,7 +10804,7 @@ DEFUN (show_ip_bgp_instance_all_summary, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp ipv4 (unicast|multicast) summary {json}", + * "show bgp ipv4 (unicast|multicast) summary [json]", * SHOW_STR * BGP_STR * "Address family\n" @@ -10815,7 +10815,7 @@ DEFUN (show_ip_bgp_instance_all_summary, */ DEFUN (show_ip_bgp_ipv4_summary, show_ip_bgp_ipv4_summary_cmd, - "show ip bgp ipv4 (unicast|multicast) summary {json}", + "show ip bgp ipv4 (unicast|multicast) summary [json]", SHOW_STR IP_STR BGP_STR @@ -10835,7 +10835,7 @@ DEFUN (show_ip_bgp_ipv4_summary, DEFUN (show_bgp_ipv4_vpn_summary, show_bgp_ipv4_vpn_summary_cmd, - "show bgp ipv4 vpn summary {json}", + "show bgp ipv4 vpn summary [json]", SHOW_STR BGP_STR "IPv4\n" @@ -10849,7 +10849,7 @@ DEFUN (show_bgp_ipv4_vpn_summary, /* `show ip bgp summary' commands. */ DEFUN (show_bgp_ipv6_vpn_summary, show_bgp_ipv6_vpn_summary_cmd, - "show bgp ipv6 vpn summary {json}", + "show bgp ipv6 vpn summary [json]", SHOW_STR BGP_STR "IPv6\n" @@ -10862,7 +10862,7 @@ DEFUN (show_bgp_ipv6_vpn_summary, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp view WORD ipv4 (unicast|multicast) summary {json}", + * "show bgp view WORD ipv4 (unicast|multicast) summary [json]", * SHOW_STR * BGP_STR * "BGP view\n" @@ -10875,7 +10875,7 @@ DEFUN (show_bgp_ipv6_vpn_summary, */ DEFUN (show_ip_bgp_instance_ipv4_summary, show_ip_bgp_instance_ipv4_summary_cmd, - "show ip bgp view WORD ipv4 (unicast|multicast) summary {json}", + "show ip bgp view WORD ipv4 (unicast|multicast) summary [json]", SHOW_STR IP_STR BGP_STR @@ -10897,7 +10897,7 @@ DEFUN (show_ip_bgp_instance_ipv4_summary, DEFUN (show_ip_bgp_vpnv4_all_summary, show_ip_bgp_vpnv4_all_summary_cmd, - "show ip bgp vpnv4 all summary {json}", + "show ip bgp vpnv4 all summary [json]", SHOW_STR IP_STR BGP_STR @@ -10912,7 +10912,7 @@ DEFUN (show_ip_bgp_vpnv4_all_summary, DEFUN (show_ip_bgp_vpnv4_rd_summary, show_ip_bgp_vpnv4_rd_summary_cmd, - "show ip bgp vpnv4 rd ASN:nn_or_IP-address:nn summary {json}", + "show ip bgp vpnv4 rd ASN:nn_or_IP-address:nn summary [json]", SHOW_STR IP_STR BGP_STR @@ -10939,7 +10939,7 @@ DEFUN (show_ip_bgp_vpnv4_rd_summary, #ifdef HAVE_IPV6 /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp ipv6 summary {json}", + * "show bgp ipv6 summary [json]", * SHOW_STR * BGP_STR * "Address family\n" @@ -10948,7 +10948,7 @@ DEFUN (show_ip_bgp_vpnv4_rd_summary, */ DEFUN (show_bgp_summary, show_bgp_summary_cmd, - "show bgp summary {json}", + "show bgp summary [json]", SHOW_STR BGP_STR "Summary of BGP neighbor status\n" @@ -10959,7 +10959,7 @@ DEFUN (show_bgp_summary, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " ipv6 summary {json}", + * "show bgp " BGP_INSTANCE_CMD " ipv6 summary [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -10969,7 +10969,7 @@ DEFUN (show_bgp_summary, */ DEFUN (show_bgp_instance_summary, show_bgp_instance_summary_cmd, - "show bgp " BGP_INSTANCE_CMD " summary {json}", + "show bgp " BGP_INSTANCE_CMD " summary [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -10981,7 +10981,7 @@ DEFUN (show_bgp_instance_summary, DEFUN (show_bgp_instance_all_summary, show_bgp_instance_all_summary_cmd, - "show bgp " BGP_INSTANCE_ALL_CMD " summary {json}", + "show bgp " BGP_INSTANCE_ALL_CMD " summary [json]", SHOW_STR BGP_STR BGP_INSTANCE_ALL_HELP_STR @@ -10998,7 +10998,7 @@ DEFUN (show_bgp_instance_all_summary, DEFUN (show_bgp_ipv6_safi_summary, show_bgp_ipv6_safi_summary_cmd, - "show bgp ipv6 (unicast|multicast) summary {json}", + "show bgp ipv6 (unicast|multicast) summary [json]", SHOW_STR BGP_STR "Address family\n" @@ -11016,7 +11016,7 @@ DEFUN (show_bgp_ipv6_safi_summary, DEFUN (show_bgp_instance_ipv6_safi_summary, show_bgp_instance_ipv6_safi_summary_cmd, - "show bgp " BGP_INSTANCE_CMD " ipv6 (unicast|multicast) summary {json}", + "show bgp " BGP_INSTANCE_CMD " ipv6 (unicast|multicast) summary [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -11036,7 +11036,7 @@ DEFUN (show_bgp_instance_ipv6_safi_summary, /* old command */ DEFUN (show_ipv6_bgp_summary, show_ipv6_bgp_summary_cmd, - "show ipv6 bgp summary {json}", + "show ipv6 bgp summary [json]", SHOW_STR IPV6_STR BGP_STR @@ -11050,7 +11050,7 @@ DEFUN (show_ipv6_bgp_summary, /* old command */ DEFUN (show_ipv6_mbgp_summary, show_ipv6_mbgp_summary_cmd, - "show ipv6 mbgp summary {json}", + "show ipv6 mbgp summary [json]", SHOW_STR IPV6_STR MBGP_STR @@ -12894,7 +12894,7 @@ bgp_show_all_instances_neighbors_vty (struct vty *vty, u_char use_json) /* "show ip bgp neighbors" commands. */ /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ip bgp vpnv4 rd ASN:nn_or_IP-address:nn neighbors {json}", + * "show ip bgp vpnv4 rd ASN:nn_or_IP-address:nn neighbors [json]", * SHOW_STR * IP_STR * BGP_STR @@ -12904,13 +12904,13 @@ bgp_show_all_instances_neighbors_vty (struct vty *vty, u_char use_json) * "Detailed information on TCP and BGP neighbor connections\n" * "JavaScript Object Notation\n" * - * "show bgp neighbors {json}", + * "show bgp neighbors [json]", * SHOW_STR * BGP_STR * "Detailed information on TCP and BGP neighbor connections\n" * "JavaScript Object Notation\n" * - * "show ip bgp vpnv4 all neighbors {json}", + * "show ip bgp vpnv4 all neighbors [json]", * SHOW_STR * IP_STR * BGP_STR @@ -12919,7 +12919,7 @@ bgp_show_all_instances_neighbors_vty (struct vty *vty, u_char use_json) * "Detailed information on TCP and BGP neighbor connections\n" * "JavaScript Object Notation\n" * - * "show ip bgp ipv4 (unicast|multicast) neighbors {json}", + * "show ip bgp ipv4 (unicast|multicast) neighbors [json]", * SHOW_STR * IP_STR * BGP_STR @@ -12929,7 +12929,7 @@ bgp_show_all_instances_neighbors_vty (struct vty *vty, u_char use_json) * "Detailed information on TCP and BGP neighbor connections\n" * "JavaScript Object Notation\n" * - * "show bgp ipv6 neighbors {json}", + * "show bgp ipv6 neighbors [json]", * SHOW_STR * BGP_STR * "Address family\n" @@ -12939,7 +12939,7 @@ bgp_show_all_instances_neighbors_vty (struct vty *vty, u_char use_json) */ DEFUN (show_ip_bgp_neighbors, show_ip_bgp_neighbors_cmd, - "show ip bgp neighbors {json}", + "show ip bgp neighbors [json]", SHOW_STR IP_STR BGP_STR @@ -12958,7 +12958,7 @@ DEFUN (show_ip_bgp_neighbors, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) {json}", + * "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) [json]", * SHOW_STR * IP_STR * BGP_STR @@ -12971,7 +12971,7 @@ DEFUN (show_ip_bgp_neighbors, * "Neighbor on bgp configured interface\n" * "JavaScript Object Notation\n" * - * "show ip bgp vpnv4 rd ASN:nn_or_IP-address:nn neighbors A.B.C.D {json}", + * "show ip bgp vpnv4 rd ASN:nn_or_IP-address:nn neighbors A.B.C.D [json]", * SHOW_STR * IP_STR * BGP_STR @@ -12981,7 +12981,7 @@ DEFUN (show_ip_bgp_neighbors, * "Neighbor to display information about\n" * "JavaScript Object Notation\n" * - * "show ip bgp vpnv4 all neighbors A.B.C.D {json}", + * "show ip bgp vpnv4 all neighbors A.B.C.D [json]", * SHOW_STR * IP_STR * BGP_STR @@ -12991,7 +12991,7 @@ DEFUN (show_ip_bgp_neighbors, * "Neighbor to display information about\n" * "JavaScript Object Notation\n" * - * "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) {json}", + * "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) [json]", * SHOW_STR * BGP_STR * "Address family\n" @@ -13001,7 +13001,7 @@ DEFUN (show_ip_bgp_neighbors, * "Neighbor on bgp configured interface\n" * "JavaScript Object Notation\n" * - * "show bgp neighbors (A.B.C.D|X:X::X:X|WORD) {json}", + * "show bgp neighbors (A.B.C.D|X:X::X:X|WORD) [json]", * SHOW_STR * BGP_STR * "Detailed information on TCP and BGP neighbor connections\n" @@ -13013,7 +13013,7 @@ DEFUN (show_ip_bgp_neighbors, */ DEFUN (show_ip_bgp_neighbors_peer, show_ip_bgp_neighbors_peer_cmd, - "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) {json}", + "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) [json]", SHOW_STR IP_STR BGP_STR @@ -13035,14 +13035,14 @@ DEFUN (show_ip_bgp_neighbors_peer, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " neighbors {json}", + * "show bgp " BGP_INSTANCE_CMD " neighbors [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR * "Detailed information on TCP and BGP neighbor connections\n" * "JavaScript Object Notation\n" * - * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors {json}", + * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -13053,7 +13053,7 @@ DEFUN (show_ip_bgp_neighbors_peer, */ DEFUN (show_ip_bgp_instance_neighbors, show_ip_bgp_instance_neighbors_cmd, - "show ip bgp " BGP_INSTANCE_CMD " neighbors {json}", + "show ip bgp " BGP_INSTANCE_CMD " neighbors [json]", SHOW_STR IP_STR BGP_STR @@ -13068,7 +13068,7 @@ DEFUN (show_ip_bgp_instance_neighbors, DEFUN (show_ip_bgp_instance_all_neighbors, show_ip_bgp_instance_all_neighbors_cmd, - "show ip bgp " BGP_INSTANCE_ALL_CMD " neighbors {json}", + "show ip bgp " BGP_INSTANCE_ALL_CMD " neighbors [json]", SHOW_STR IP_STR BGP_STR @@ -13086,7 +13086,7 @@ DEFUN (show_ip_bgp_instance_all_neighbors, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) {json}", + * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -13097,7 +13097,7 @@ DEFUN (show_ip_bgp_instance_all_neighbors, * "Neighbor on bgp configured interface\n" * "JavaScript Object Notation\n" * - * "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) {json}", + * "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -13110,7 +13110,7 @@ DEFUN (show_ip_bgp_instance_all_neighbors, */ DEFUN (show_ip_bgp_instance_neighbors_peer, show_ip_bgp_instance_neighbors_peer_cmd, - "show ip bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) {json}", + "show ip bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) [json]", SHOW_STR IP_STR BGP_STR diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index e88f9789e..e34c0bbeb 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -3601,7 +3601,7 @@ show_ip_ospf_common (struct vty *vty, struct ospf *ospf, u_char use_json) DEFUN (show_ip_ospf, show_ip_ospf_cmd, - "show ip ospf {json}", + "show ip ospf [json]", SHOW_STR IP_STR "OSPF information\n" @@ -3618,7 +3618,7 @@ DEFUN (show_ip_ospf, DEFUN (show_ip_ospf_instance, show_ip_ospf_instance_cmd, - "show ip ospf <1-65535> {json}", + "show ip ospf <1-65535> [json]", SHOW_STR IP_STR "OSPF information\n" @@ -4009,7 +4009,7 @@ show_ip_ospf_interface_common (struct vty *vty, struct ospf *ospf, int argc, DEFUN (show_ip_ospf_interface, show_ip_ospf_interface_cmd, - "show ip ospf interface [INTERFACE] {json}", + "show ip ospf interface [INTERFACE] [json]", SHOW_STR IP_STR "OSPF information\n" @@ -4028,7 +4028,7 @@ DEFUN (show_ip_ospf_interface, DEFUN (show_ip_ospf_instance_interface, show_ip_ospf_instance_interface_cmd, - "show ip ospf <1-65535> interface [INTERFACE] {json}", + "show ip ospf <1-65535> interface [INTERFACE] [json]", SHOW_STR IP_STR "OSPF information\n" @@ -4166,7 +4166,7 @@ show_ip_ospf_neighbor_common (struct vty *vty, struct ospf *ospf, u_char use_jso DEFUN (show_ip_ospf_neighbor, show_ip_ospf_neighbor_cmd, - "show ip ospf neighbor {json}", + "show ip ospf neighbor [json]", SHOW_STR IP_STR "OSPF information\n" @@ -4185,7 +4185,7 @@ DEFUN (show_ip_ospf_neighbor, DEFUN (show_ip_ospf_instance_neighbor, show_ip_ospf_instance_neighbor_cmd, - "show ip ospf <1-65535> neighbor {json}", + "show ip ospf <1-65535> neighbor [json]", SHOW_STR IP_STR "OSPF information\n" @@ -4277,7 +4277,7 @@ show_ip_ospf_neighbor_all_common (struct vty *vty, struct ospf *ospf, u_char use DEFUN (show_ip_ospf_neighbor_all, show_ip_ospf_neighbor_all_cmd, - "show ip ospf neighbor all {json}", + "show ip ospf neighbor all [json]", SHOW_STR IP_STR "OSPF information\n" @@ -4296,7 +4296,7 @@ DEFUN (show_ip_ospf_neighbor_all, DEFUN (show_ip_ospf_instance_neighbor_all, show_ip_ospf_instance_neighbor_all_cmd, - "show ip ospf <1-65535> neighbor all {json}", + "show ip ospf <1-65535> neighbor all [json]", SHOW_STR IP_STR "OSPF information\n" @@ -4371,7 +4371,7 @@ show_ip_ospf_neighbor_int_common (struct vty *vty, struct ospf *ospf, int arg_ba DEFUN (show_ip_ospf_neighbor_int, show_ip_ospf_neighbor_int_cmd, - "show ip ospf neighbor IFNAME {json}", + "show ip ospf neighbor IFNAME [json]", SHOW_STR IP_STR "OSPF information\n" @@ -4390,7 +4390,7 @@ DEFUN (show_ip_ospf_neighbor_int, DEFUN (show_ip_ospf_instance_neighbor_int, show_ip_ospf_instance_neighbor_int_cmd, - "show ip ospf <1-65535> neighbor IFNAME {json}", + "show ip ospf <1-65535> neighbor IFNAME [json]", SHOW_STR IP_STR "OSPF information\n" @@ -4737,7 +4737,7 @@ show_ip_ospf_neighbor_id_common (struct vty *vty, struct ospf *ospf, DEFUN (show_ip_ospf_neighbor_id, show_ip_ospf_neighbor_id_cmd, - "show ip ospf neighbor A.B.C.D {json}", + "show ip ospf neighbor A.B.C.D [json]", SHOW_STR IP_STR "OSPF information\n" @@ -4756,7 +4756,7 @@ DEFUN (show_ip_ospf_neighbor_id, DEFUN (show_ip_ospf_instance_neighbor_id, show_ip_ospf_instance_neighbor_id_cmd, - "show ip ospf <1-65535> neighbor A.B.C.D {json}", + "show ip ospf <1-65535> neighbor A.B.C.D [json]", SHOW_STR IP_STR "OSPF information\n" @@ -4828,7 +4828,7 @@ show_ip_ospf_neighbor_detail_common (struct vty *vty, struct ospf *ospf, u_char DEFUN (show_ip_ospf_neighbor_detail, show_ip_ospf_neighbor_detail_cmd, - "show ip ospf neighbor detail {json}", + "show ip ospf neighbor detail [json]", SHOW_STR IP_STR "OSPF information\n" @@ -4847,7 +4847,7 @@ DEFUN (show_ip_ospf_neighbor_detail, DEFUN (show_ip_ospf_instance_neighbor_detail, show_ip_ospf_instance_neighbor_detail_cmd, - "show ip ospf <1-65535> neighbor detail {json}", + "show ip ospf <1-65535> neighbor detail [json]", SHOW_STR IP_STR "OSPF information\n" @@ -4925,7 +4925,7 @@ show_ip_ospf_neighbor_detail_all_common (struct vty *vty, struct ospf *ospf, u_c DEFUN (show_ip_ospf_neighbor_detail_all, show_ip_ospf_neighbor_detail_all_cmd, - "show ip ospf neighbor detail all {json}", + "show ip ospf neighbor detail all [json]", SHOW_STR IP_STR "OSPF information\n" @@ -4945,7 +4945,7 @@ DEFUN (show_ip_ospf_neighbor_detail_all, DEFUN (show_ip_ospf_instance_neighbor_detail_all, show_ip_ospf_instance_neighbor_detail_all_cmd, - "show ip ospf <1-65535> neighbor detail all {json}", + "show ip ospf <1-65535> neighbor detail all [json]", SHOW_STR IP_STR "OSPF information\n" @@ -5027,7 +5027,7 @@ show_ip_ospf_neighbor_int_detail_common (struct vty *vty, struct ospf *ospf, DEFUN (show_ip_ospf_neighbor_int_detail, show_ip_ospf_neighbor_int_detail_cmd, - "show ip ospf neighbor IFNAME detail {json}", + "show ip ospf neighbor IFNAME detail [json]", SHOW_STR IP_STR "OSPF information\n" @@ -5047,7 +5047,7 @@ DEFUN (show_ip_ospf_neighbor_int_detail, DEFUN (show_ip_ospf_instance_neighbor_int_detail, show_ip_ospf_instance_neighbor_int_detail_cmd, - "show ip ospf <1-65535> neighbor IFNAME detail {json}", + "show ip ospf <1-65535> neighbor IFNAME detail [json]", SHOW_STR IP_STR "OSPF information\n" diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 491abbba4..f4a663ab3 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -2342,7 +2342,7 @@ vty_show_ip_route (struct vty *vty, struct route_node *rn, struct rib *rib, DEFUN (show_ip_route, show_ip_route_cmd, - "show ip route {json}", + "show ip route [json]", SHOW_STR IP_STR "IP routing table\n") @@ -2436,7 +2436,7 @@ do_show_ip_route (struct vty *vty, const char *vrf_name, safi_t safi, DEFUN (show_ip_route_vrf, show_ip_route_vrf_cmd, - "show ip route " VRF_CMD_STR " {json}", + "show ip route " VRF_CMD_STR " [json]", SHOW_STR IP_STR "IP routing table\n" @@ -4776,7 +4776,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref_tag_vrf, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ipv6 route " VRF_CMD_STR " {json}", + * "show ipv6 route " VRF_CMD_STR " [json]", * SHOW_STR * IP_STR * "IPv6 routing table\n" @@ -4785,7 +4785,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref_tag_vrf, */ DEFUN (show_ipv6_route, show_ipv6_route_cmd, - "show ipv6 route {json}", + "show ipv6 route [json]", SHOW_STR IP_STR "IPv6 routing table\n") -- cgit v1.2.3 From 6147e2c694b53647895f048645182065bc25fd05 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Fri, 23 Sep 2016 13:47:20 +0000 Subject: convert <1-255> to (1-255), ()s to <>s, etc Signed-off-by: Daniel Walton --- bgpd/bgp_debug.c | 28 ++-- bgpd/bgp_dump.c | 4 +- bgpd/bgp_encap.c | 8 +- bgpd/bgp_filter.c | 4 +- bgpd/bgp_route.c | 180 ++++++++++++------------- bgpd/bgp_routemap.c | 36 ++--- bgpd/bgp_vty.c | 340 +++++++++++++++++++++++------------------------ isisd/isis_redist.c | 8 +- isisd/isis_routemap.c | 8 +- isisd/isis_te.c | 2 +- isisd/isis_vty.c | 84 ++++++------ isisd/isisd.c | 2 +- lib/command.c | 12 +- lib/filter.c | 84 ++++++------ lib/if.c | 4 +- lib/if_rmap.c | 4 +- lib/keychain.c | 36 ++--- lib/ns.c | 4 +- lib/plist.c | 84 ++++++------ lib/vrf.c | 4 +- ospf6d/ospf6_area.c | 12 +- ospf6d/ospf6_asbr.c | 6 +- ospf6d/ospf6_interface.c | 20 +-- ospf6d/ospf6_lsa.c | 4 +- ospf6d/ospf6_message.c | 4 +- ospf6d/ospf6_route.c | 4 +- ospf6d/ospf6_spf.c | 2 +- ospf6d/ospf6_top.c | 8 +- ospf6d/ospf6_zebra.c | 4 +- ospf6d/ospf6d.c | 16 +-- ospfd/ospf_dump.c | 34 ++--- ospfd/ospf_ri.c | 8 +- ospfd/ospf_routemap.c | 12 +- ospfd/ospf_te.c | 2 +- ospfd/ospf_vty.c | 194 +++++++++++++-------------- ripd/rip_debug.c | 4 +- ripd/rip_interface.c | 14 +- ripd/rip_offset.c | 8 +- ripd/rip_routemap.c | 12 +- ripd/rip_zebra.c | 8 +- ripd/ripd.c | 18 +-- ripngd/ripng_debug.c | 4 +- ripngd/ripng_offset.c | 8 +- ripngd/ripng_routemap.c | 8 +- ripngd/ripng_zebra.c | 4 +- ripngd/ripngd.c | 4 +- tools/argv_translator.py | 8 +- vtysh/vtysh.c | 6 +- zebra/debug.c | 10 +- zebra/interface.c | 14 +- zebra/irdp_interface.c | 12 +- zebra/rtadv.c | 18 +-- zebra/test_main.c | 2 +- zebra/zebra_routemap.c | 16 +-- zebra/zebra_vty.c | 330 ++++++++++++++++++++++----------------------- zebra/zserv.c | 2 +- 56 files changed, 891 insertions(+), 885 deletions(-) (limited to 'zebra') diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c index e64730624..89b970d97 100644 --- a/bgpd/bgp_debug.c +++ b/bgpd/bgp_debug.c @@ -622,7 +622,7 @@ DEFUN (debug_bgp_neighbor_events, DEFUN (debug_bgp_neighbor_events_peer, debug_bgp_neighbor_events_peer_cmd, - "debug bgp neighbor-events (A.B.C.D|X:X::X:X|WORD)", + "debug bgp neighbor-events ", DEBUG_STR BGP_STR "BGP Neighbor Events\n" @@ -675,7 +675,7 @@ DEFUN (no_debug_bgp_neighbor_events, DEFUN (no_debug_bgp_neighbor_events_peer, no_debug_bgp_neighbor_events_peer_cmd, - "no debug bgp neighbor-events (A.B.C.D|X:X::X:X|WORD)", + "no debug bgp neighbor-events ", NO_STR DEBUG_STR BGP_STR @@ -766,7 +766,7 @@ DEFUN (debug_bgp_keepalive, DEFUN (debug_bgp_keepalive_peer, debug_bgp_keepalive_peer_cmd, - "debug bgp keepalives (A.B.C.D|X:X::X:X|WORD)", + "debug bgp keepalives ", DEBUG_STR BGP_STR "BGP Neighbor Events\n" @@ -819,7 +819,7 @@ DEFUN (no_debug_bgp_keepalive, DEFUN (no_debug_bgp_keepalive_peer, no_debug_bgp_keepalive_peer_cmd, - "no debug bgp keepalives (A.B.C.D|X:X::X:X|WORD)", + "no debug bgp keepalives ", NO_STR DEBUG_STR BGP_STR @@ -855,7 +855,7 @@ DEFUN (no_debug_bgp_keepalive_peer, /* debug bgp bestpath */ DEFUN (debug_bgp_bestpath_prefix, debug_bgp_bestpath_prefix_cmd, - "debug bgp bestpath (A.B.C.D/M|X:X::X:X/M)", + "debug bgp bestpath ", DEBUG_STR BGP_STR "BGP bestpath\n" @@ -902,7 +902,7 @@ DEFUN (debug_bgp_bestpath_prefix, DEFUN (no_debug_bgp_bestpath_prefix, no_debug_bgp_bestpath_prefix_cmd, - "no debug bgp bestpath (A.B.C.D/M|X:X::X:X/M)", + "no debug bgp bestpath ", NO_STR DEBUG_STR BGP_STR @@ -998,7 +998,7 @@ DEFUN (debug_bgp_update, DEFUN (debug_bgp_update_direct, debug_bgp_update_direct_cmd, - "debug bgp updates (in|out)", + "debug bgp updates ", DEBUG_STR BGP_STR "BGP updates\n" @@ -1036,7 +1036,7 @@ DEFUN (debug_bgp_update_direct, DEFUN (debug_bgp_update_direct_peer, debug_bgp_update_direct_peer_cmd, - "debug bgp updates (in|out) (A.B.C.D|X:X::X:X|WORD)", + "debug bgp updates ", DEBUG_STR BGP_STR "BGP updates\n" @@ -1130,7 +1130,7 @@ DEFUN (debug_bgp_update_direct_peer, DEFUN (no_debug_bgp_update_direct, no_debug_bgp_update_direct_cmd, - "no debug bgp updates (in|out)", + "no debug bgp updates ", NO_STR DEBUG_STR BGP_STR @@ -1172,7 +1172,7 @@ DEFUN (no_debug_bgp_update_direct, DEFUN (no_debug_bgp_update_direct_peer, no_debug_bgp_update_direct_peer_cmd, - "no debug bgp updates (in|out) (A.B.C.D|X:X::X:X|WORD)", + "no debug bgp updates ", NO_STR DEBUG_STR BGP_STR @@ -1262,7 +1262,7 @@ DEFUN (no_debug_bgp_update_direct_peer, DEFUN (debug_bgp_update_prefix, debug_bgp_update_prefix_cmd, - "debug bgp updates prefix (A.B.C.D/M|X:X::X:X/M)", + "debug bgp updates prefix ", DEBUG_STR BGP_STR "BGP updates\n" @@ -1310,7 +1310,7 @@ DEFUN (debug_bgp_update_prefix, DEFUN (no_debug_bgp_update_prefix, no_debug_bgp_update_prefix_cmd, - "no debug bgp updates prefix (A.B.C.D/M|X:X::X:X/M)", + "no debug bgp updates prefix ", NO_STR DEBUG_STR BGP_STR @@ -1409,7 +1409,7 @@ DEFUN (debug_bgp_zebra, DEFUN (debug_bgp_zebra_prefix, debug_bgp_zebra_prefix_cmd, - "debug bgp zebra prefix (A.B.C.D/M|X:X::X:X/M)", + "debug bgp zebra prefix ", DEBUG_STR BGP_STR "BGP Zebra messages\n" @@ -1474,7 +1474,7 @@ DEFUN (no_debug_bgp_zebra, DEFUN (no_debug_bgp_zebra_prefix, no_debug_bgp_zebra_prefix_cmd, - "no debug bgp zebra prefix (A.B.C.D/M|X:X::X:X/M)", + "no debug bgp zebra prefix ", NO_STR DEBUG_STR BGP_STR diff --git a/bgpd/bgp_dump.c b/bgpd/bgp_dump.c index 52989385d..c5fc05200 100644 --- a/bgpd/bgp_dump.c +++ b/bgpd/bgp_dump.c @@ -727,7 +727,7 @@ bgp_dump_unset (struct vty *vty, struct bgp_dump *bgp_dump) DEFUN (dump_bgp_all, dump_bgp_all_cmd, - "dump bgp (all|all-et|updates|updates-et|routes-mrt) PATH [INTERVAL]", + "dump bgp PATH [INTERVAL]", "Dump packet\n" "BGP packet dump\n" "Dump all BGP packets\nDump all BGP packets (Extended Timestamp Header)\n" @@ -771,7 +771,7 @@ DEFUN (dump_bgp_all, DEFUN (no_dump_bgp_all, no_dump_bgp_all_cmd, - "no dump bgp (all|all-et|updates|updates-et|routes-mrt) [PATH] [INTERVAL]", + "no dump bgp [PATH] [INTERVAL]", NO_STR "Stop dump packet\n" "Stop BGP packet dump\n" diff --git a/bgpd/bgp_encap.c b/bgpd/bgp_encap.c index 4b1b6757a..0c7657f8b 100644 --- a/bgpd/bgp_encap.c +++ b/bgpd/bgp_encap.c @@ -707,7 +707,7 @@ DEFUN (show_bgp_ipv6_encap_neighbor_routes, DEFUN (show_bgp_ipv4_encap_rd_neighbor_routes, show_bgp_ipv4_encap_rd_neighbor_routes_cmd, - "show bgp ipv4 encap rd ASN:nn_or_IP-address:nn neighbors (A.B.C.D|X:X::X:X) routes", + "show bgp ipv4 encap rd ASN:nn_or_IP-address:nn neighbors routes", SHOW_STR BGP_STR "Address Family\n" @@ -750,7 +750,7 @@ DEFUN (show_bgp_ipv4_encap_rd_neighbor_routes, #ifdef HAVE_IPV6 DEFUN (show_bgp_ipv6_encap_rd_neighbor_routes, show_bgp_ipv6_encap_rd_neighbor_routes_cmd, - "show bgp ipv6 encap rd ASN:nn_or_IP-address:nn neighbors (A.B.C.D|X:X::X:X) routes", + "show bgp ipv6 encap rd ASN:nn_or_IP-address:nn neighbors routes", SHOW_STR BGP_STR "Address Family\n" @@ -857,7 +857,7 @@ DEFUN (show_bgp_ipv6_encap_neighbor_advertised_routes, DEFUN (show_bgp_ipv4_encap_rd_neighbor_advertised_routes, show_bgp_ipv4_encap_rd_neighbor_advertised_routes_cmd, - "show bgp ipv4 encap rd ASN:nn_or_IP-address:nn neighbors (A.B.C.D|X:X::X:X) advertised-routes", + "show bgp ipv4 encap rd ASN:nn_or_IP-address:nn neighbors advertised-routes", SHOW_STR BGP_STR "Address Family\n" @@ -899,7 +899,7 @@ DEFUN (show_bgp_ipv4_encap_rd_neighbor_advertised_routes, #ifdef HAVE_IPV6 DEFUN (show_bgp_ipv6_encap_rd_neighbor_advertised_routes, show_bgp_ipv6_encap_rd_neighbor_advertised_routes_cmd, - "show bgp ipv6 encap rd ASN:nn_or_IP-address:nn neighbors (A.B.C.D|X:X::X:X) advertised-routes", + "show bgp ipv6 encap rd ASN:nn_or_IP-address:nn neighbors advertised-routes", SHOW_STR BGP_STR "Address Family\n" diff --git a/bgpd/bgp_filter.c b/bgpd/bgp_filter.c index 1235e50d2..6a39d0217 100644 --- a/bgpd/bgp_filter.c +++ b/bgpd/bgp_filter.c @@ -428,7 +428,7 @@ as_list_dup_check (struct as_list *aslist, struct as_filter *new) DEFUN (ip_as_path, ip_as_path_cmd, - "ip as-path access-list WORD (deny|permit) .LINE", + "ip as-path access-list WORD .LINE", IP_STR "BGP autonomous system path filter\n" "Specify an access list name\n" @@ -484,7 +484,7 @@ DEFUN (ip_as_path, DEFUN (no_ip_as_path, no_ip_as_path_cmd, - "no ip as-path access-list WORD (deny|permit) .LINE", + "no ip as-path access-list WORD .LINE", NO_STR IP_STR "BGP autonomous system path filter\n" diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index e408154f2..d0eff6e20 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -7963,7 +7963,7 @@ DEFUN (show_ip_bgp, */ DEFUN (show_ip_bgp_ipv4, show_ip_bgp_ipv4_cmd, - "show ip bgp ipv4 (unicast|multicast) [json]", + "show ip bgp ipv4 [json]", SHOW_STR IP_STR BGP_STR @@ -7996,7 +7996,7 @@ DEFUN (show_ip_bgp_route, DEFUN (show_ip_bgp_route_pathtype, show_ip_bgp_route_pathtype_cmd, - "show ip bgp A.B.C.D (bestpath|multipath) [json]", + "show ip bgp A.B.C.D [json]", SHOW_STR IP_STR BGP_STR @@ -8015,7 +8015,7 @@ DEFUN (show_ip_bgp_route_pathtype, DEFUN (show_bgp_ipv4_safi_route_pathtype, show_bgp_ipv4_safi_route_pathtype_cmd, - "show bgp ipv4 (unicast|multicast) A.B.C.D (bestpath|multipath) [json]", + "show bgp ipv4 A.B.C.D [json]", SHOW_STR BGP_STR "Address family\n" @@ -8090,7 +8090,7 @@ DEFUN (show_bgp_ipv6_prefix, */ DEFUN (show_ip_bgp_ipv4_route, show_ip_bgp_ipv4_route_cmd, - "show ip bgp ipv4 (unicast|multicast) A.B.C.D [json]", + "show ip bgp ipv4 A.B.C.D [json]", SHOW_STR IP_STR BGP_STR @@ -8236,7 +8236,7 @@ DEFUN (show_ip_bgp_prefix, DEFUN (show_ip_bgp_prefix_pathtype, show_ip_bgp_prefix_pathtype_cmd, - "show ip bgp A.B.C.D/M (bestpath|multipath) [json]", + "show ip bgp A.B.C.D/M [json]", SHOW_STR IP_STR BGP_STR @@ -8266,7 +8266,7 @@ DEFUN (show_ip_bgp_prefix_pathtype, */ DEFUN (show_ip_bgp_ipv4_prefix, show_ip_bgp_ipv4_prefix_cmd, - "show ip bgp ipv4 (unicast|multicast) A.B.C.D/M [json]", + "show ip bgp ipv4 A.B.C.D/M [json]", SHOW_STR IP_STR BGP_STR @@ -8301,7 +8301,7 @@ DEFUN (show_ip_bgp_ipv4_prefix, */ DEFUN (show_ip_bgp_ipv4_prefix_pathtype, show_ip_bgp_ipv4_prefix_pathtype_cmd, - "show ip bgp ipv4 (unicast|multicast) A.B.C.D/M (bestpath|multipath) [json]", + "show ip bgp ipv4 A.B.C.D/M [json]", SHOW_STR IP_STR BGP_STR @@ -8418,7 +8418,7 @@ DEFUN (show_ip_bgp_instance_route, DEFUN (show_ip_bgp_instance_route_pathtype, show_ip_bgp_instance_route_pathtype_cmd, - "show ip bgp " BGP_INSTANCE_CMD " A.B.C.D (bestpath|multipath) [json]", + "show ip bgp " BGP_INSTANCE_CMD " A.B.C.D [json]", SHOW_STR IP_STR BGP_STR @@ -8451,7 +8451,7 @@ DEFUN (show_ip_bgp_instance_prefix, DEFUN (show_ip_bgp_instance_prefix_pathtype, show_ip_bgp_instance_prefix_pathtype_cmd, - "show ip bgp " BGP_INSTANCE_CMD " A.B.C.D/M (bestpath|multipath) [json]", + "show ip bgp " BGP_INSTANCE_CMD " A.B.C.D/M [json]", SHOW_STR IP_STR BGP_STR @@ -8492,7 +8492,7 @@ DEFUN (show_bgp, DEFUN (show_bgp_ipv6_safi, show_bgp_ipv6_safi_cmd, - "show bgp ipv6 (unicast|multicast) [json]", + "show bgp ipv6 [json]", SHOW_STR BGP_STR "Address family\n" @@ -8543,7 +8543,7 @@ DEFUN (show_bgp_route, DEFUN (show_bgp_ipv6_safi_route, show_bgp_ipv6_safi_route_cmd, - "show bgp ipv6 (unicast|multicast) X:X::X:X [json]", + "show bgp ipv6 X:X::X:X [json]", SHOW_STR BGP_STR "Address family\n" @@ -8573,7 +8573,7 @@ DEFUN (show_bgp_ipv6_safi_route, */ DEFUN (show_bgp_route_pathtype, show_bgp_route_pathtype_cmd, - "show bgp X:X::X:X (bestpath|multipath) [json]", + "show bgp X:X::X:X [json]", SHOW_STR BGP_STR "Network in the BGP routing table to display\n" @@ -8591,7 +8591,7 @@ DEFUN (show_bgp_route_pathtype, DEFUN (show_bgp_ipv6_safi_route_pathtype, show_bgp_ipv6_safi_route_pathtype_cmd, - "show bgp ipv6 (unicast|multicast) X:X::X:X (bestpath|multipath) [json]", + "show bgp ipv6 X:X::X:X [json]", SHOW_STR BGP_STR "Address family\n" @@ -8642,7 +8642,7 @@ DEFUN (show_bgp_prefix, DEFUN (show_bgp_ipv6_safi_prefix, show_bgp_ipv6_safi_prefix_cmd, - "show bgp ipv6 (unicast|multicast) X:X::X:X/M [json]", + "show bgp ipv6 X:X::X:X/M [json]", SHOW_STR BGP_STR "Address family\n" @@ -8672,7 +8672,7 @@ DEFUN (show_bgp_ipv6_safi_prefix, */ DEFUN (show_bgp_prefix_pathtype, show_bgp_prefix_pathtype_cmd, - "show bgp X:X::X:X/M (bestpath|multipath) [json]", + "show bgp X:X::X:X/M [json]", SHOW_STR BGP_STR "IPv6 prefix /\n" @@ -8690,7 +8690,7 @@ DEFUN (show_bgp_prefix_pathtype, DEFUN (show_bgp_ipv6_safi_prefix_pathtype, show_bgp_ipv6_safi_prefix_pathtype_cmd, - "show bgp ipv6 (unicast|multicast) X:X::X:X/M (bestpath|multipath) [json]", + "show bgp ipv6 X:X::X:X/M [json]", SHOW_STR BGP_STR "Address family\n" @@ -8813,7 +8813,7 @@ DEFUN (show_bgp_instance_route, */ DEFUN (show_bgp_instance_route_pathtype, show_bgp_instance_route_pathtype_cmd, - "show bgp " BGP_INSTANCE_CMD " X:X::X:X (bestpath|multipath) [json]", + "show bgp " BGP_INSTANCE_CMD " X:X::X:X [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -8869,7 +8869,7 @@ DEFUN (show_bgp_instance_prefix, */ DEFUN (show_bgp_instance_prefix_pathtype, show_bgp_instance_prefix_pathtype_cmd, - "show bgp " BGP_INSTANCE_CMD " X:X::X:X/M (bestpath|multipath) [json]", + "show bgp " BGP_INSTANCE_CMD " X:X::X:X/M [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -8975,7 +8975,7 @@ DEFUN (show_bgp_instance_route_map, */ DEFUN (show_bgp_instance_community_list, show_bgp_instance_community_list_cmd, - "show bgp " BGP_INSTANCE_CMD " community-list (<1-500>|WORD)", + "show bgp " BGP_INSTANCE_CMD " community-list <(1-500)|WORD>", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -9143,7 +9143,7 @@ DEFUN (show_ip_bgp_flap_regexp, DEFUN (show_ip_bgp_ipv4_regexp, show_ip_bgp_ipv4_regexp_cmd, - "show ip bgp ipv4 (unicast|multicast) regexp .LINE", + "show ip bgp ipv4 regexp .LINE", SHOW_STR IP_STR BGP_STR @@ -9297,7 +9297,7 @@ DEFUN (show_ip_bgp_flap_prefix_list, DEFUN (show_ip_bgp_ipv4_prefix_list, show_ip_bgp_ipv4_prefix_list_cmd, - "show ip bgp ipv4 (unicast|multicast) prefix-list WORD", + "show ip bgp ipv4 prefix-list WORD", SHOW_STR IP_STR BGP_STR @@ -9450,7 +9450,7 @@ DEFUN (show_ip_bgp_flap_filter_list, DEFUN (show_ip_bgp_ipv4_filter_list, show_ip_bgp_ipv4_filter_list_cmd, - "show ip bgp ipv4 (unicast|multicast) filter-list WORD", + "show ip bgp ipv4 filter-list WORD", SHOW_STR IP_STR BGP_STR @@ -9538,7 +9538,7 @@ DEFUN (show_ip_bgp_dampening_info, DEFUN (show_ip_bgp_ipv4_dampening_parameters, show_ip_bgp_ipv4_dampening_parameters_cmd, - "show ip bgp ipv4 (unicast|multicast) dampening parameters", + "show ip bgp ipv4 dampening parameters", SHOW_STR IP_STR BGP_STR @@ -9557,7 +9557,7 @@ DEFUN (show_ip_bgp_ipv4_dampening_parameters, DEFUN (show_ip_bgp_ipv4_dampening_flap_stats, show_ip_bgp_ipv4_dampening_flap_stats_cmd, - "show ip bgp ipv4 (unicast|multicast) dampening flap-statistics", + "show ip bgp ipv4 dampening flap-statistics", SHOW_STR IP_STR BGP_STR @@ -9577,7 +9577,7 @@ DEFUN (show_ip_bgp_ipv4_dampening_flap_stats, DEFUN (show_ip_bgp_ipv4_dampening_dampd_paths, show_ip_bgp_ipv4_dampening_dampd_paths_cmd, - "show ip bgp ipv4 (unicast|multicast) dampening dampened-paths", + "show ip bgp ipv4 dampening dampened-paths", SHOW_STR IP_STR BGP_STR @@ -9676,7 +9676,7 @@ DEFUN (show_ip_bgp_flap_route_map, DEFUN (show_ip_bgp_ipv4_route_map, show_ip_bgp_ipv4_route_map_cmd, - "show ip bgp ipv4 (unicast|multicast) route-map WORD", + "show ip bgp ipv4 route-map WORD", SHOW_STR IP_STR BGP_STR @@ -9756,7 +9756,7 @@ DEFUN (show_ip_bgp_flap_cidr_only, DEFUN (show_ip_bgp_ipv4_cidr_only, show_ip_bgp_ipv4_cidr_only_cmd, - "show ip bgp ipv4 (unicast|multicast) cidr-only", + "show ip bgp ipv4 cidr-only", SHOW_STR IP_STR BGP_STR @@ -9787,7 +9787,7 @@ DEFUN (show_ip_bgp_community_all, DEFUN (show_ip_bgp_ipv4_community_all, show_ip_bgp_ipv4_community_all_cmd, - "show ip bgp ipv4 (unicast|multicast) community", + "show ip bgp ipv4 community", SHOW_STR IP_STR BGP_STR @@ -9977,7 +9977,7 @@ bgp_show_community (struct vty *vty, const char *view_name, int argc, */ DEFUN (show_ip_bgp_community, show_ip_bgp_community_cmd, - "show ip bgp community (AA:NN|local-AS|no-advertise|no-export)", + "show ip bgp community ", SHOW_STR IP_STR BGP_STR @@ -10061,7 +10061,7 @@ DEFUN (show_ip_bgp_community, */ DEFUN (show_ip_bgp_ipv4_community, show_ip_bgp_ipv4_community_cmd, - "show ip bgp ipv4 (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export)", + "show ip bgp ipv4 community ", SHOW_STR IP_STR BGP_STR @@ -10085,7 +10085,7 @@ DEFUN (show_ip_bgp_ipv4_community, DEFUN (show_bgp_instance_afi_safi_community_all, show_bgp_instance_afi_safi_community_all_cmd, - "show bgp " BGP_INSTANCE_CMD " (ipv4|ipv6) (unicast|multicast) community", + "show bgp " BGP_INSTANCE_CMD " community", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -10183,7 +10183,7 @@ DEFUN (show_bgp_instance_afi_safi_community_all, */ DEFUN (show_bgp_instance_afi_safi_community, show_bgp_instance_afi_safi_community_cmd, - "show bgp " BGP_INSTANCE_CMD " (ipv4|ipv6) (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export)", + "show bgp " BGP_INSTANCE_CMD " community ", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -10270,7 +10270,7 @@ DEFUN (show_bgp_instance_afi_safi_community, */ DEFUN (show_ip_bgp_community_exact, show_ip_bgp_community_exact_cmd, - "show ip bgp community (AA:NN|local-AS|no-advertise|no-export) exact-match", + "show ip bgp community exact-match", SHOW_STR IP_STR BGP_STR @@ -10358,7 +10358,7 @@ DEFUN (show_ip_bgp_community_exact, */ DEFUN (show_ip_bgp_ipv4_community_exact, show_ip_bgp_ipv4_community_exact_cmd, - "show ip bgp ipv4 (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) exact-match", + "show ip bgp ipv4 community exact-match", SHOW_STR IP_STR BGP_STR @@ -10502,7 +10502,7 @@ DEFUN (show_ip_bgp_ipv4_community_exact, */ DEFUN (show_bgp_community, show_bgp_community_cmd, - "show bgp community (AA:NN|local-AS|no-advertise|no-export)", + "show bgp community ", SHOW_STR BGP_STR "Display routes matching the communities\n" @@ -10581,7 +10581,7 @@ DEFUN (show_bgp_community, */ DEFUN (show_ipv6_bgp_community, show_ipv6_bgp_community_cmd, - "show ipv6 bgp community (AA:NN|local-AS|no-advertise|no-export)", + "show ipv6 bgp community ", SHOW_STR IPV6_STR BGP_STR @@ -10728,7 +10728,7 @@ DEFUN (show_ipv6_bgp_community, */ DEFUN (show_bgp_community_exact, show_bgp_community_exact_cmd, - "show bgp community (AA:NN|local-AS|no-advertise|no-export) exact-match", + "show bgp community exact-match", SHOW_STR BGP_STR "Display routes matching the communities\n" @@ -10811,7 +10811,7 @@ DEFUN (show_bgp_community_exact, */ DEFUN (show_ipv6_bgp_community_exact, show_ipv6_bgp_community_exact_cmd, - "show ipv6 bgp community (AA:NN|local-AS|no-advertise|no-export) exact-match", + "show ipv6 bgp community exact-match", SHOW_STR IPV6_STR BGP_STR @@ -10892,7 +10892,7 @@ DEFUN (show_ipv6_bgp_community_exact, */ DEFUN (show_ipv6_mbgp_community, show_ipv6_mbgp_community_cmd, - "show ipv6 mbgp community (AA:NN|local-AS|no-advertise|no-export)", + "show ipv6 mbgp community ", SHOW_STR IPV6_STR MBGP_STR @@ -10975,7 +10975,7 @@ DEFUN (show_ipv6_mbgp_community, */ DEFUN (show_ipv6_mbgp_community_exact, show_ipv6_mbgp_community_exact_cmd, - "show ipv6 mbgp community (AA:NN|local-AS|no-advertise|no-export) exact-match", + "show ipv6 mbgp community exact-match", SHOW_STR IPV6_STR MBGP_STR @@ -11026,7 +11026,7 @@ bgp_show_community_list (struct vty *vty, const char *name, DEFUN (show_ip_bgp_community_list, show_ip_bgp_community_list_cmd, - "show ip bgp community-list (<1-500>|WORD)", + "show ip bgp community-list <(1-500)|WORD>", SHOW_STR IP_STR BGP_STR @@ -11039,7 +11039,7 @@ DEFUN (show_ip_bgp_community_list, DEFUN (show_ip_bgp_instance_community_list, show_ip_bgp_instance_community_list_cmd, - "show ip bgp " BGP_INSTANCE_CMD " community-list (<1-500>|WORD)", + "show ip bgp " BGP_INSTANCE_CMD " community-list <(1-500)|WORD>", SHOW_STR IP_STR BGP_STR @@ -11053,7 +11053,7 @@ DEFUN (show_ip_bgp_instance_community_list, DEFUN (show_ip_bgp_ipv4_community_list, show_ip_bgp_ipv4_community_list_cmd, - "show ip bgp ipv4 (unicast|multicast) community-list (<1-500>|WORD)", + "show ip bgp ipv4 community-list <(1-500)|WORD>", SHOW_STR IP_STR BGP_STR @@ -11072,7 +11072,7 @@ DEFUN (show_ip_bgp_ipv4_community_list, DEFUN (show_ip_bgp_community_list_exact, show_ip_bgp_community_list_exact_cmd, - "show ip bgp community-list (<1-500>|WORD) exact-match", + "show ip bgp community-list <(1-500)|WORD> exact-match", SHOW_STR IP_STR BGP_STR @@ -11086,7 +11086,7 @@ DEFUN (show_ip_bgp_community_list_exact, DEFUN (show_ip_bgp_ipv4_community_list_exact, show_ip_bgp_ipv4_community_list_exact_cmd, - "show ip bgp ipv4 (unicast|multicast) community-list (<1-500>|WORD) exact-match", + "show ip bgp ipv4 community-list <(1-500)|WORD> exact-match", SHOW_STR IP_STR BGP_STR @@ -11118,7 +11118,7 @@ DEFUN (show_ip_bgp_ipv4_community_list_exact, */ DEFUN (show_bgp_community_list, show_bgp_community_list_cmd, - "show bgp community-list (<1-500>|WORD)", + "show bgp community-list <(1-500)|WORD>", SHOW_STR BGP_STR "Display routes matching the community-list\n" @@ -11171,7 +11171,7 @@ DEFUN (show_ipv6_mbgp_community_list, */ DEFUN (show_bgp_community_list_exact, show_bgp_community_list_exact_cmd, - "show bgp community-list (<1-500>|WORD) exact-match", + "show bgp community-list <(1-500)|WORD> exact-match", SHOW_STR BGP_STR "Display routes matching the community-list\n" @@ -11299,7 +11299,7 @@ DEFUN (show_ip_bgp_flap_prefix_longer, DEFUN (show_ip_bgp_ipv4_prefix_longer, show_ip_bgp_ipv4_prefix_longer_cmd, - "show ip bgp ipv4 (unicast|multicast) A.B.C.D/M longer-prefixes", + "show ip bgp ipv4 A.B.C.D/M longer-prefixes", SHOW_STR IP_STR BGP_STR @@ -11821,7 +11821,7 @@ bgp_table_stats_vty (struct vty *vty, const char *name, DEFUN (show_bgp_statistics, show_bgp_statistics_cmd, - "show bgp (ipv4|ipv6) (encap|multicast|unicast|vpn) statistics", + "show bgp statistics", SHOW_STR BGP_STR "Address family\n" @@ -11837,7 +11837,7 @@ DEFUN (show_bgp_statistics, DEFUN (show_bgp_statistics_view, show_bgp_statistics_view_cmd, - "show bgp " BGP_INSTANCE_CMD " (ipv4|ipv6) (unicast|multicast|vpn|encap) statistics", + "show bgp " BGP_INSTANCE_CMD " statistics", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -12045,7 +12045,7 @@ bgp_peer_counts (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi, u_c DEFUN (show_ip_bgp_neighbor_prefix_counts, show_ip_bgp_neighbor_prefix_counts_cmd, - "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) prefix-counts [json]", + "show ip bgp neighbors prefix-counts [json]", SHOW_STR IP_STR BGP_STR @@ -12068,7 +12068,7 @@ DEFUN (show_ip_bgp_neighbor_prefix_counts, DEFUN (show_ip_bgp_instance_neighbor_prefix_counts, show_ip_bgp_instance_neighbor_prefix_counts_cmd, - "show ip bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) prefix-counts [json]", + "show ip bgp " BGP_INSTANCE_CMD " neighbors prefix-counts [json]", SHOW_STR IP_STR BGP_STR @@ -12092,7 +12092,7 @@ DEFUN (show_ip_bgp_instance_neighbor_prefix_counts, DEFUN (show_bgp_ipv6_neighbor_prefix_counts, show_bgp_ipv6_neighbor_prefix_counts_cmd, - "show bgp ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) prefix-counts [json]", + "show bgp ipv6 neighbors prefix-counts [json]", SHOW_STR BGP_STR "Address family\n" @@ -12115,7 +12115,7 @@ DEFUN (show_bgp_ipv6_neighbor_prefix_counts, DEFUN (show_bgp_instance_ipv6_neighbor_prefix_counts, show_bgp_instance_ipv6_neighbor_prefix_counts_cmd, - "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) prefix-counts [json]", + "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors prefix-counts [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -12139,7 +12139,7 @@ DEFUN (show_bgp_instance_ipv6_neighbor_prefix_counts, DEFUN (show_ip_bgp_ipv4_neighbor_prefix_counts, show_ip_bgp_ipv4_neighbor_prefix_counts_cmd, - "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) prefix-counts [json]", + "show ip bgp ipv4 neighbors prefix-counts [json]", SHOW_STR IP_STR BGP_STR @@ -12168,7 +12168,7 @@ DEFUN (show_ip_bgp_ipv4_neighbor_prefix_counts, DEFUN (show_ip_bgp_vpnv4_neighbor_prefix_counts, show_ip_bgp_vpnv4_neighbor_prefix_counts_cmd, - "show ip bgp vpnv4 all neighbors (A.B.C.D|X:X::X:X|WORD) prefix-counts [json]", + "show ip bgp vpnv4 all neighbors prefix-counts [json]", SHOW_STR IP_STR BGP_STR @@ -12449,7 +12449,7 @@ peer_adj_routes (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi, */ DEFUN (show_ip_bgp_instance_neighbor_advertised_route, show_ip_bgp_instance_neighbor_advertised_route_cmd, - "show ip bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes [json]", + "show ip bgp " BGP_INSTANCE_CMD " neighbors advertised-routes [json]", SHOW_STR IP_STR BGP_STR @@ -12490,7 +12490,7 @@ DEFUN (show_ip_bgp_instance_neighbor_advertised_route, */ DEFUN (show_ip_bgp_neighbor_advertised_route, show_ip_bgp_neighbor_advertised_route_cmd, - "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes [json]", + "show ip bgp neighbors advertised-routes [json]", SHOW_STR IP_STR BGP_STR @@ -12539,7 +12539,7 @@ DEFUN (show_ip_bgp_neighbor_advertised_route, */ DEFUN (show_ip_bgp_ipv4_neighbor_advertised_route, show_ip_bgp_ipv4_neighbor_advertised_route_cmd, - "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes [json]", + "show ip bgp ipv4 neighbors advertised-routes [json]", SHOW_STR IP_STR BGP_STR @@ -12589,7 +12589,7 @@ DEFUN (show_ip_bgp_ipv4_neighbor_advertised_route, */ DEFUN (show_bgp_instance_neighbor_advertised_route, show_bgp_instance_neighbor_advertised_route_cmd, - "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes [json]", + "show bgp " BGP_INSTANCE_CMD " neighbors advertised-routes [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -12642,7 +12642,7 @@ DEFUN (show_bgp_instance_neighbor_advertised_route, */ DEFUN (show_bgp_neighbor_advertised_route, show_bgp_neighbor_advertised_route_cmd, - "show bgp neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes [json]", + "show bgp neighbors advertised-routes [json]", SHOW_STR BGP_STR "Detailed information on TCP and BGP neighbor connections\n" @@ -12674,7 +12674,7 @@ DEFUN (show_bgp_neighbor_advertised_route, /* old command */ DEFUN (ipv6_mbgp_neighbor_advertised_route, ipv6_mbgp_neighbor_advertised_route_cmd, - "show ipv6 mbgp neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes [json]", + "show ipv6 mbgp neighbors advertised-routes [json]", SHOW_STR IPV6_STR MBGP_STR @@ -12715,7 +12715,7 @@ DEFUN (ipv6_mbgp_neighbor_advertised_route, */ DEFUN (show_bgp_instance_neighbor_received_routes, show_bgp_instance_neighbor_received_routes_cmd, - "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) received-routes [json]", + "show bgp " BGP_INSTANCE_CMD " neighbors received-routes [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -12753,7 +12753,7 @@ DEFUN (show_bgp_instance_neighbor_received_routes, */ DEFUN (show_ip_bgp_instance_neighbor_received_routes, show_ip_bgp_instance_neighbor_received_routes_cmd, - "show ip bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) received-routes [json]", + "show ip bgp " BGP_INSTANCE_CMD " neighbors received-routes [json]", SHOW_STR IP_STR BGP_STR @@ -12792,7 +12792,7 @@ DEFUN (show_ip_bgp_instance_neighbor_received_routes, */ DEFUN (show_ip_bgp_neighbor_received_routes, show_ip_bgp_neighbor_received_routes_cmd, - "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) received-routes [json]", + "show ip bgp neighbors received-routes [json]", SHOW_STR IP_STR BGP_STR @@ -12840,7 +12840,7 @@ DEFUN (show_ip_bgp_neighbor_received_routes, */ DEFUN (show_ip_bgp_ipv4_neighbor_received_routes, show_ip_bgp_ipv4_neighbor_received_routes_cmd, - "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) received-routes [json]", + "show ip bgp ipv4 neighbors received-routes [json]", SHOW_STR IP_STR BGP_STR @@ -12874,7 +12874,7 @@ DEFUN (show_ip_bgp_ipv4_neighbor_received_routes, DEFUN (show_bgp_instance_afi_safi_neighbor_adv_recd_routes, show_bgp_instance_afi_safi_neighbor_adv_recd_routes_cmd, - "show bgp " BGP_INSTANCE_CMD " (ipv4|ipv6) (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) (advertised-routes|received-routes) [json]", + "show bgp " BGP_INSTANCE_CMD " neighbors [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -12910,7 +12910,7 @@ DEFUN (show_bgp_instance_afi_safi_neighbor_adv_recd_routes, DEFUN (show_ip_bgp_neighbor_received_prefix_filter, show_ip_bgp_neighbor_received_prefix_filter_cmd, - "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) received prefix-filter [json]", + "show ip bgp neighbors received prefix-filter [json]", SHOW_STR IP_STR BGP_STR @@ -12997,7 +12997,7 @@ DEFUN (show_ip_bgp_neighbor_received_prefix_filter, DEFUN (show_ip_bgp_ipv4_neighbor_received_prefix_filter, show_ip_bgp_ipv4_neighbor_received_prefix_filter_cmd, - "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) received prefix-filter [json]", + "show ip bgp ipv4 neighbors received prefix-filter [json]", SHOW_STR IP_STR BGP_STR @@ -13139,7 +13139,7 @@ DEFUN (show_ip_bgp_ipv4_neighbor_received_prefix_filter, */ DEFUN (show_bgp_neighbor_received_routes, show_bgp_neighbor_received_routes_cmd, - "show bgp neighbors (A.B.C.D|X:X::X:X|WORD) received-routes [json]", + "show bgp neighbors received-routes [json]", SHOW_STR BGP_STR "Detailed information on TCP and BGP neighbor connections\n" @@ -13182,7 +13182,7 @@ DEFUN (show_bgp_neighbor_received_routes, */ DEFUN (show_bgp_neighbor_received_prefix_filter, show_bgp_neighbor_received_prefix_filter_cmd, - "show bgp neighbors (A.B.C.D|X:X::X:X|WORD) received prefix-filter [json]", + "show bgp neighbors received prefix-filter [json]", SHOW_STR BGP_STR "Detailed information on TCP and BGP neighbor connections\n" @@ -13272,7 +13272,7 @@ DEFUN (show_bgp_neighbor_received_prefix_filter, /* old command */ DEFUN (ipv6_mbgp_neighbor_received_routes, ipv6_mbgp_neighbor_received_routes_cmd, - "show ipv6 mbgp neighbors (A.B.C.D|X:X::X:X|WORD) received-routes [json]", + "show ipv6 mbgp neighbors received-routes [json]", SHOW_STR IPV6_STR MBGP_STR @@ -13312,7 +13312,7 @@ DEFUN (ipv6_mbgp_neighbor_received_routes, */ DEFUN (show_bgp_instance_neighbor_received_prefix_filter, show_bgp_instance_neighbor_received_prefix_filter_cmd, - "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) received prefix-filter [json]", + "show bgp " BGP_INSTANCE_CMD " neighbors received prefix-filter [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -13428,7 +13428,7 @@ bgp_show_neighbor_route (struct vty *vty, struct peer *peer, afi_t afi, DEFUN (show_ip_bgp_neighbor_routes, show_ip_bgp_neighbor_routes_cmd, - "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) routes [json]", + "show ip bgp neighbors routes [json]", SHOW_STR IP_STR BGP_STR @@ -13452,7 +13452,7 @@ DEFUN (show_ip_bgp_neighbor_routes, DEFUN (show_ip_bgp_instance_neighbor_routes, show_ip_bgp_instance_neighbor_routes_cmd, - "show ip bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) routes [json]", + "show ip bgp " BGP_INSTANCE_CMD " neighbors routes [json]", SHOW_STR IP_STR BGP_STR @@ -13477,7 +13477,7 @@ DEFUN (show_ip_bgp_instance_neighbor_routes, DEFUN (show_ip_bgp_neighbor_flap, show_ip_bgp_neighbor_flap_cmd, - "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) flap-statistics [json]", + "show ip bgp neighbors flap-statistics [json]", SHOW_STR IP_STR BGP_STR @@ -13501,7 +13501,7 @@ DEFUN (show_ip_bgp_neighbor_flap, DEFUN (show_ip_bgp_neighbor_damp, show_ip_bgp_neighbor_damp_cmd, - "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) dampened-routes [json]", + "show ip bgp neighbors dampened-routes [json]", SHOW_STR IP_STR BGP_STR @@ -13525,7 +13525,7 @@ DEFUN (show_ip_bgp_neighbor_damp, DEFUN (show_ip_bgp_ipv4_neighbor_routes, show_ip_bgp_ipv4_neighbor_routes_cmd, - "show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X|WORD) routes [json]", + "show ip bgp ipv4 neighbors routes [json]", SHOW_STR IP_STR BGP_STR @@ -13572,7 +13572,7 @@ DEFUN (show_ip_bgp_ipv4_neighbor_routes, */ DEFUN (show_bgp_instance_neighbor_routes, show_bgp_instance_neighbor_routes_cmd, - "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) routes [json]", + "show bgp " BGP_INSTANCE_CMD " neighbors routes [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -13633,7 +13633,7 @@ DEFUN (show_bgp_instance_neighbor_routes, */ DEFUN (show_bgp_instance_neighbor_damp, show_bgp_instance_neighbor_damp_cmd, - "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) dampened-routes [json]", + "show bgp " BGP_INSTANCE_CMD " neighbors dampened-routes [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -13699,7 +13699,7 @@ DEFUN (show_bgp_instance_neighbor_damp, */ DEFUN (show_bgp_instance_neighbor_flap, show_bgp_instance_neighbor_flap_cmd, - "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) flap-statistics [json]", + "show bgp " BGP_INSTANCE_CMD " neighbors flap-statistics [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -13754,7 +13754,7 @@ DEFUN (show_bgp_instance_neighbor_flap, */ DEFUN (show_bgp_neighbor_routes, show_bgp_neighbor_routes_cmd, - "show bgp neighbors (A.B.C.D|X:X::X:X|WORD) routes [json]", + "show bgp neighbors routes [json]", SHOW_STR BGP_STR "Detailed information on TCP and BGP neighbor connections\n" @@ -13782,7 +13782,7 @@ DEFUN (show_bgp_neighbor_routes, /* old command */ DEFUN (ipv6_mbgp_neighbor_routes, ipv6_mbgp_neighbor_routes_cmd, - "show ipv6 mbgp neighbors (A.B.C.D|X:X::X:X|WORD) routes [json]", + "show ipv6 mbgp neighbors routes [json]", SHOW_STR IPV6_STR MBGP_STR @@ -14001,7 +14001,7 @@ bgp_distance_apply (struct prefix *p, struct bgp_info *rinfo, struct bgp *bgp) DEFUN (bgp_distance, bgp_distance_cmd, - "distance bgp <1-255> <1-255> <1-255>", + "distance bgp (1-255) (1-255) (1-255)", "Define an administrative distance\n" "BGP distance\n" "Distance for routes external to the AS\n" @@ -14028,7 +14028,7 @@ DEFUN (bgp_distance, */ DEFUN (no_bgp_distance, no_bgp_distance_cmd, - "no distance bgp <1-255> <1-255> <1-255>", + "no distance bgp (1-255) (1-255) (1-255)", NO_STR "Define an administrative distance\n" "BGP distance\n" @@ -14049,7 +14049,7 @@ DEFUN (no_bgp_distance, DEFUN (bgp_distance_source, bgp_distance_source_cmd, - "distance <1-255> A.B.C.D/M", + "distance (1-255) A.B.C.D/M", "Define an administrative distance\n" "Administrative distance\n" "IP source prefix\n") @@ -14060,7 +14060,7 @@ DEFUN (bgp_distance_source, DEFUN (no_bgp_distance_source, no_bgp_distance_source_cmd, - "no distance <1-255> A.B.C.D/M", + "no distance (1-255) A.B.C.D/M", NO_STR "Define an administrative distance\n" "Administrative distance\n" @@ -14072,7 +14072,7 @@ DEFUN (no_bgp_distance_source, DEFUN (bgp_distance_source_access_list, bgp_distance_source_access_list_cmd, - "distance <1-255> A.B.C.D/M WORD", + "distance (1-255) A.B.C.D/M WORD", "Define an administrative distance\n" "Administrative distance\n" "IP source prefix\n" @@ -14084,7 +14084,7 @@ DEFUN (bgp_distance_source_access_list, DEFUN (no_bgp_distance_source_access_list, no_bgp_distance_source_access_list_cmd, - "no distance <1-255> A.B.C.D/M WORD", + "no distance (1-255) A.B.C.D/M WORD", NO_STR "Define an administrative distance\n" "Administrative distance\n" @@ -14109,7 +14109,7 @@ DEFUN (no_bgp_distance_source_access_list, */ DEFUN (bgp_damp_set, bgp_damp_set_cmd, - "bgp dampening <1-45> <1-20000> <1-20000> <1-255>", + "bgp dampening (1-45) (1-20000) (1-20000) (1-255)", "BGP Specific commands\n" "Enable route-flap dampening\n" "Half-life time for the penalty\n" diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index 5b170f88f..dc342b110 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -2994,7 +2994,7 @@ bgp_route_map_event (route_map_event_t event, const char *rmap_name) DEFUN (match_peer, match_peer_cmd, - "match peer (A.B.C.D|X:X::X:X)", + "match peer ", MATCH_STR "Match peer address\n" "IP address of peer\n" @@ -3046,7 +3046,7 @@ DEFUN (no_match_peer, DEFUN (match_ip_address, match_ip_address_cmd, - "match ip address (<1-199>|<1300-2699>|WORD)", + "match ip address <(1-199)|(1300-2699)|WORD>", MATCH_STR IP_STR "Match address of route\n" @@ -3085,7 +3085,7 @@ DEFUN (no_match_ip_address, DEFUN (match_ip_next_hop, match_ip_next_hop_cmd, - "match ip next-hop (<1-199>|<1300-2699>|WORD)", + "match ip next-hop <(1-199)|(1300-2699)|WORD>", MATCH_STR IP_STR "Match next-hop address of route\n" @@ -3126,7 +3126,7 @@ DEFUN (no_match_ip_next_hop, DEFUN (match_probability, match_probability_cmd, - "match probability <0-100>", + "match probability (0-100)", MATCH_STR "Match portion of routes defined by percentage value\n" "Percentage of routes\n") @@ -3160,7 +3160,7 @@ DEFUN (no_match_probability, DEFUN (match_ip_route_source, match_ip_route_source_cmd, - "match ip route-source (<1-199>|<1300-2699>|WORD)", + "match ip route-source <(1-199)|(1300-2699)|WORD>", MATCH_STR IP_STR "Match advertising source address of route\n" @@ -3313,7 +3313,7 @@ DEFUN (no_match_ip_route_source_prefix_list, DEFUN (match_metric, match_metric_cmd, - "match metric <0-4294967295>", + "match metric (0-4294967295)", MATCH_STR "Match metric of route\n" "Metric value\n") @@ -3346,7 +3346,7 @@ DEFUN (no_match_metric, DEFUN (match_local_pref, match_local_pref_cmd, - "match local-preference <0-4294967295>", + "match local-preference (0-4294967295)", MATCH_STR "Match local-preference of route\n" "Metric value\n") @@ -3379,7 +3379,7 @@ DEFUN (no_match_local_pref, DEFUN (match_community, match_community_cmd, - "match community (<1-99>|<100-500>|WORD)", + "match community <(1-99)|(100-500)|WORD>", MATCH_STR "Match BGP community list\n" "Community-list number (standard)\n" @@ -3392,7 +3392,7 @@ DEFUN (match_community, DEFUN (match_community_exact, match_community_exact_cmd, - "match community (<1-99>|<100-500>|WORD) exact-match", + "match community <(1-99)|(100-500)|WORD> exact-match", MATCH_STR "Match BGP community list\n" "Community-list number (standard)\n" @@ -3451,7 +3451,7 @@ DEFUN (no_match_community, DEFUN (match_ecommunity, match_ecommunity_cmd, - "match extcommunity (<1-99>|<100-500>|WORD)", + "match extcommunity <(1-99)|(100-500)|WORD>", MATCH_STR "Match BGP/VPN extended community list\n" "Extended community-list number (standard)\n" @@ -3519,7 +3519,7 @@ DEFUN (no_match_aspath, DEFUN (match_origin, match_origin_cmd, - "match origin (egp|igp|incomplete)", + "match origin ", MATCH_STR "BGP origin code\n" "remote EGP\n" @@ -3596,7 +3596,7 @@ DEFUN (no_match_interface, DEFUN (match_tag, match_tag_cmd, - "match tag <1-65535>", + "match tag (1-65535)", MATCH_STR "Match tag of route\n" "Tag value\n") @@ -3723,7 +3723,7 @@ DEFUN (no_set_ip_nexthop, */ DEFUN (set_metric, set_metric_cmd, - "set metric <0-4294967295>", + "set metric (0-4294967295)", SET_STR "Metric value for destination routing protocol\n" "Metric value\n") @@ -3755,7 +3755,7 @@ DEFUN (no_set_metric, DEFUN (set_local_pref, set_local_pref_cmd, - "set local-preference <0-4294967295>", + "set local-preference (0-4294967295)", SET_STR "BGP local preference path attribute\n" "Preference value\n") @@ -3785,7 +3785,7 @@ DEFUN (no_set_local_pref, DEFUN (set_weight, set_weight_cmd, - "set weight <0-4294967295>", + "set weight (0-4294967295)", SET_STR "BGP weight for routing table\n" "Weight value\n") @@ -4047,7 +4047,7 @@ DEFUN (no_set_community, DEFUN (set_community_delete, set_community_delete_cmd, - "set comm-list (<1-99>|<100-500>|WORD) delete", + "set comm-list <(1-99)|(100-500)|WORD> delete", SET_STR "set BGP community list (for deletion)\n" "Community-list number (standard)\n" @@ -4171,7 +4171,7 @@ DEFUN (no_set_ecommunity_soo, DEFUN (set_origin, set_origin_cmd, - "set origin (egp|igp|incomplete)", + "set origin ", SET_STR "BGP origin code\n" "remote EGP\n" @@ -4309,7 +4309,7 @@ DEFUN (no_set_aggregator_as, DEFUN (set_tag, set_tag_cmd, - "set tag <1-65535>", + "set tag (1-65535)", SET_STR "Tag value for routing protocol\n" "Tag value\n") diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 5a06dd8e8..3d2ddacbb 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -608,7 +608,7 @@ DEFUN (no_bgp_multiple_instance, DEFUN (bgp_config_type, bgp_config_type_cmd, - "bgp config-type (cisco|zebra)", + "bgp config-type ", BGP_STR "Configuration type\n" "cisco\n" @@ -1145,7 +1145,7 @@ DEFUN (bgp_maxmed_admin, DEFUN (bgp_maxmed_admin_medv, bgp_maxmed_admin_medv_cmd, - "bgp max-med administrative <0-4294967294>", + "bgp max-med administrative (0-4294967294)", BGP_STR "Advertise routes with max-med\n" "Administratively applied, for an indefinite period\n" @@ -1197,7 +1197,7 @@ DEFUN (no_bgp_maxmed_admin, DEFUN (bgp_maxmed_onstartup, bgp_maxmed_onstartup_cmd, - "bgp max-med on-startup <5-86400>", + "bgp max-med on-startup (5-86400)", BGP_STR "Advertise routes with max-med\n" "Effective on a startup\n" @@ -1223,7 +1223,7 @@ DEFUN (bgp_maxmed_onstartup, DEFUN (bgp_maxmed_onstartup_medv, bgp_maxmed_onstartup_medv_cmd, - "bgp max-med on-startup <5-86400> <0-4294967294>", + "bgp max-med on-startup (5-86400) (0-4294967294)", BGP_STR "Advertise routes with max-med\n" "Effective on a startup\n" @@ -1362,7 +1362,7 @@ bgp_config_write_update_delay (struct vty *vty, struct bgp *bgp) /* Update-delay configuration */ DEFUN (bgp_update_delay, bgp_update_delay_cmd, - "update-delay <0-3600>", + "update-delay (0-3600)", "Force initial delay for best-path and updates\n" "Seconds\n") { @@ -1371,7 +1371,7 @@ DEFUN (bgp_update_delay, DEFUN (bgp_update_delay_establish_wait, bgp_update_delay_establish_wait_cmd, - "update-delay <0-3600> <1-3600>", + "update-delay (0-3600) (1-3600)", "Force initial delay for best-path and updates\n" "Seconds\n" "Wait for peers to be established\n" @@ -1392,7 +1392,7 @@ DEFUN (bgp_update_delay_establish_wait, */ DEFUN (no_bgp_update_delay, no_bgp_update_delay_cmd, - "no update-delay <0-3600>", + "no update-delay (0-3600)", "Force initial delay for best-path and updates\n" "Seconds\n") { @@ -1430,7 +1430,7 @@ bgp_config_write_wpkt_quanta (struct vty *vty, struct bgp *bgp) /* Update-delay configuration */ DEFUN (bgp_wpkt_quanta, bgp_wpkt_quanta_cmd, - "write-quanta <1-10000>", + "write-quanta (1-10000)", "How many packets to write to peer socket per run\n" "Number of packets\n") { @@ -1440,7 +1440,7 @@ DEFUN (bgp_wpkt_quanta, /* Update-delay deconfiguration */ DEFUN (no_bgp_wpkt_quanta, no_bgp_wpkt_quanta_cmd, - "no write-quanta <1-10000>", + "no write-quanta (1-10000)", "How many packets to write to peer socket per run\n" "Number of packets\n") { @@ -1476,7 +1476,7 @@ bgp_config_write_coalesce_time (struct vty *vty, struct bgp *bgp) DEFUN (bgp_coalesce_time, bgp_coalesce_time_cmd, - "coalesce-time <0-4294967295>", + "coalesce-time (0-4294967295)", "Subgroup coalesce timer\n" "Subgroup coalesce timer value (in ms)\n") { @@ -1485,7 +1485,7 @@ DEFUN (bgp_coalesce_time, DEFUN (no_bgp_coalesce_time, no_bgp_coalesce_time_cmd, - "no coalesce-time <0-4294967295>", + "no coalesce-time (0-4294967295)", "Subgroup coalesce timer\n" "Subgroup coalesce timer value (in ms)\n") { @@ -1495,7 +1495,7 @@ DEFUN (no_bgp_coalesce_time, /* Maximum-paths configuration */ DEFUN (bgp_maxpaths, bgp_maxpaths_cmd, - "maximum-paths " CMD_RANGE_STR(1, MULTIPATH_NUM), + "maximum-paths " CMD_RANGE_STR<1, MULTIPATH_NUM>, "Forward packets over multiple paths\n" "Number of paths\n") { @@ -1504,7 +1504,7 @@ DEFUN (bgp_maxpaths, DEFUN (bgp_maxpaths_ibgp, bgp_maxpaths_ibgp_cmd, - "maximum-paths ibgp " CMD_RANGE_STR(1, MULTIPATH_NUM), + "maximum-paths ibgp " CMD_RANGE_STR<1, MULTIPATH_NUM>, "Forward packets over multiple paths\n" "iBGP-multipath\n" "Number of paths\n") @@ -1514,7 +1514,7 @@ DEFUN (bgp_maxpaths_ibgp, DEFUN (bgp_maxpaths_ibgp_cluster, bgp_maxpaths_ibgp_cluster_cmd, - "maximum-paths ibgp " CMD_RANGE_STR(1, MULTIPATH_NUM) " equal-cluster-length", + "maximum-paths ibgp " CMD_RANGE_STR<1, MULTIPATH_NUM> " equal-cluster-length", "Forward packets over multiple paths\n" "iBGP-multipath\n" "Number of paths\n" @@ -1601,7 +1601,7 @@ bgp_config_write_maxpaths (struct vty *vty, struct bgp *bgp, afi_t afi, DEFUN (bgp_timers, bgp_timers_cmd, - "timers bgp <0-65535> <0-65535>", + "timers bgp (0-65535) (0-65535)", "Adjust routing timers\n" "BGP timers\n" "Keepalive interval\n" @@ -1820,7 +1820,7 @@ DEFUN (no_bgp_graceful_restart, DEFUN (bgp_graceful_restart_stalepath_time, bgp_graceful_restart_stalepath_time_cmd, - "bgp graceful-restart stalepath-time <1-3600>", + "bgp graceful-restart stalepath-time (1-3600)", "BGP specific commands\n" "Graceful restart capability parameters\n" "Set the max time to hold onto restarting peer's stale paths\n" @@ -1840,7 +1840,7 @@ DEFUN (bgp_graceful_restart_stalepath_time, DEFUN (bgp_graceful_restart_restart_time, bgp_graceful_restart_restart_time_cmd, - "bgp graceful-restart restart-time <1-3600>", + "bgp graceful-restart restart-time (1-3600)", "BGP specific commands\n" "Graceful restart capability parameters\n" "Set the time to wait to delete stale routes before a BGP open message is received\n" @@ -2085,7 +2085,7 @@ DEFUN (no_bgp_bestpath_aspath_confed, /* "bgp bestpath as-path multipath-relax" configuration. */ DEFUN (bgp_bestpath_aspath_multipath_relax, bgp_bestpath_aspath_multipath_relax_cmd, - "bgp bestpath as-path multipath-relax {as-set|no-as-set}", + "bgp bestpath as-path multipath-relax [as-set|no-as-set]", "BGP specific commands\n" "Change the default bestpath selection\n" "AS-path attribute\n" @@ -2112,7 +2112,7 @@ DEFUN (bgp_bestpath_aspath_multipath_relax, DEFUN (no_bgp_bestpath_aspath_multipath_relax, no_bgp_bestpath_aspath_multipath_relax_cmd, - "no bgp bestpath as-path multipath-relax {as-set|no-as-set}", + "no bgp bestpath as-path multipath-relax [as-set|no-as-set]", NO_STR "BGP specific commands\n" "Change the default bestpath selection\n" @@ -2162,7 +2162,7 @@ DEFUN (no_bgp_log_neighbor_changes, /* "bgp bestpath med" configuration. */ DEFUN (bgp_bestpath_med, bgp_bestpath_med_cmd, - "bgp bestpath med (confed|missing-as-worst)", + "bgp bestpath med ", "BGP specific commands\n" "Change the default bestpath selection\n" "MED attribute\n" @@ -2215,7 +2215,7 @@ DEFUN (bgp_bestpath_med2, DEFUN (no_bgp_bestpath_med, no_bgp_bestpath_med_cmd, - "no bgp bestpath med (confed|missing-as-worst)", + "no bgp bestpath med ", NO_STR "BGP specific commands\n" "Change the default bestpath selection\n" @@ -2379,7 +2379,7 @@ DEFUN (no_bgp_network_import_check, DEFUN (bgp_default_local_preference, bgp_default_local_preference_cmd, - "bgp default local-preference <0-4294967295>", + "bgp default local-preference (0-4294967295)", "BGP specific commands\n" "Configure BGP defaults\n" "local preference (higher=more preferred)\n" @@ -2428,7 +2428,7 @@ DEFUN (no_bgp_default_local_preference, DEFUN (bgp_default_subgroup_pkt_queue_max, bgp_default_subgroup_pkt_queue_max_cmd, - "bgp default subgroup-pkt-queue-max <20-100>", + "bgp default subgroup-pkt-queue-max (20-100)", "BGP specific commands\n" "Configure BGP defaults\n" "subgroup-pkt-queue-max\n" @@ -2852,7 +2852,7 @@ peer_remote_as_vty (struct vty *vty, const char *peer_str, DEFUN (neighbor_remote_as, neighbor_remote_as_cmd, - NEIGHBOR_CMD2 "remote-as (" CMD_AS_RANGE "|external|internal)", + NEIGHBOR_CMD2 "remote-as <" CMD_AS_RANGE "|external|internal>", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Specify a BGP neighbor\n" @@ -3015,7 +3015,7 @@ DEFUN (neighbor_interface_config_v6only, DEFUN (neighbor_interface_config_remote_as, neighbor_interface_config_remote_as_cmd, - "neighbor WORD interface remote-as (" CMD_AS_RANGE "|external|internal)", + "neighbor WORD interface remote-as <" CMD_AS_RANGE "|external|internal>", NEIGHBOR_STR "Interface name or neighbor tag\n" "Enable BGP on interface\n" @@ -3027,7 +3027,7 @@ DEFUN (neighbor_interface_config_remote_as, DEFUN (neighbor_interface_v6only_config_remote_as, neighbor_interface_v6only_config_remote_as_cmd, - "neighbor WORD interface v6only remote-as (" CMD_AS_RANGE "|external|internal)", + "neighbor WORD interface v6only remote-as <" CMD_AS_RANGE "|external|internal>", NEIGHBOR_STR "Interface name or neighbor tag\n" "Enable BGP on interface\n" @@ -3229,7 +3229,7 @@ DEFUN (no_neighbor_peer_group, DEFUN (no_neighbor_interface_peer_group_remote_as, no_neighbor_interface_peer_group_remote_as_cmd, - "no neighbor WORD remote-as (" CMD_AS_RANGE "|internal|external)", + "no neighbor WORD remote-as <" CMD_AS_RANGE "|internal|external>", NO_STR NEIGHBOR_STR "Interface name or neighbor tag\n" @@ -3786,7 +3786,7 @@ peer_af_flag_unset_vty (struct vty *vty, const char *peer_str, afi_t afi, /* neighbor capability orf prefix-list. */ DEFUN (neighbor_capability_orf_prefix, neighbor_capability_orf_prefix_cmd, - NEIGHBOR_CMD2 "capability orf prefix-list (both|send|receive)", + NEIGHBOR_CMD2 "capability orf prefix-list ", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Advertise capability to the peer\n" @@ -3813,7 +3813,7 @@ DEFUN (neighbor_capability_orf_prefix, DEFUN (no_neighbor_capability_orf_prefix, no_neighbor_capability_orf_prefix_cmd, - NO_NEIGHBOR_CMD2 "capability orf prefix-list (both|send|receive)", + NO_NEIGHBOR_CMD2 "capability orf prefix-list ", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -4057,7 +4057,7 @@ DEFUN (no_neighbor_send_community, /* neighbor send-community extended. */ DEFUN (neighbor_send_community_type, neighbor_send_community_type_cmd, - NEIGHBOR_CMD2 "send-community (both|extended|standard)", + NEIGHBOR_CMD2 "send-community ", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Send Community attribute to this neighbor\n" @@ -4082,7 +4082,7 @@ DEFUN (neighbor_send_community_type, DEFUN (no_neighbor_send_community_type, no_neighbor_send_community_type_cmd, - NO_NEIGHBOR_CMD2 "send-community (both|extended|standard)", + NO_NEIGHBOR_CMD2 "send-community ", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -4291,7 +4291,7 @@ DEFUN (neighbor_attr_unchanged, DEFUN (neighbor_attr_unchanged1, neighbor_attr_unchanged1_cmd, - NEIGHBOR_CMD2 "attribute-unchanged (as-path|next-hop|med)", + NEIGHBOR_CMD2 "attribute-unchanged ", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "BGP attribute is propagated unchanged to this neighbor\n" @@ -4314,7 +4314,7 @@ DEFUN (neighbor_attr_unchanged1, DEFUN (neighbor_attr_unchanged2, neighbor_attr_unchanged2_cmd, - NEIGHBOR_CMD2 "attribute-unchanged as-path (next-hop|med)", + NEIGHBOR_CMD2 "attribute-unchanged as-path ", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "BGP attribute is propagated unchanged to this neighbor\n" @@ -4336,7 +4336,7 @@ DEFUN (neighbor_attr_unchanged2, DEFUN (neighbor_attr_unchanged3, neighbor_attr_unchanged3_cmd, - NEIGHBOR_CMD2 "attribute-unchanged next-hop (as-path|med)", + NEIGHBOR_CMD2 "attribute-unchanged next-hop ", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "BGP attribute is propagated unchanged to this neighbor\n" @@ -4357,7 +4357,7 @@ DEFUN (neighbor_attr_unchanged3, DEFUN (neighbor_attr_unchanged4, neighbor_attr_unchanged4_cmd, - NEIGHBOR_CMD2 "attribute-unchanged med (as-path|next-hop)", + NEIGHBOR_CMD2 "attribute-unchanged med ", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "BGP attribute is propagated unchanged to this neighbor\n" @@ -4456,7 +4456,7 @@ DEFUN (no_neighbor_attr_unchanged, DEFUN (no_neighbor_attr_unchanged1, no_neighbor_attr_unchanged1_cmd, - NO_NEIGHBOR_CMD2 "attribute-unchanged (as-path|next-hop|med)", + NO_NEIGHBOR_CMD2 "attribute-unchanged ", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -4480,7 +4480,7 @@ DEFUN (no_neighbor_attr_unchanged1, DEFUN (no_neighbor_attr_unchanged2, no_neighbor_attr_unchanged2_cmd, - NO_NEIGHBOR_CMD2 "attribute-unchanged as-path (next-hop|med)", + NO_NEIGHBOR_CMD2 "attribute-unchanged as-path ", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -4502,7 +4502,7 @@ DEFUN (no_neighbor_attr_unchanged2, DEFUN (no_neighbor_attr_unchanged3, no_neighbor_attr_unchanged3_cmd, - NO_NEIGHBOR_CMD2 "attribute-unchanged next-hop (as-path|med)", + NO_NEIGHBOR_CMD2 "attribute-unchanged next-hop ", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -4524,7 +4524,7 @@ DEFUN (no_neighbor_attr_unchanged3, DEFUN (no_neighbor_attr_unchanged4, no_neighbor_attr_unchanged4_cmd, - NO_NEIGHBOR_CMD2 "attribute-unchanged med (as-path|next-hop)", + NO_NEIGHBOR_CMD2 "attribute-unchanged med ", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -4598,7 +4598,7 @@ DEFUN (neighbor_ebgp_multihop, DEFUN (neighbor_ebgp_multihop_ttl, neighbor_ebgp_multihop_ttl_cmd, - NEIGHBOR_CMD2 "ebgp-multihop " CMD_RANGE_STR(1, MAXTTL), + NEIGHBOR_CMD2 "ebgp-multihop " CMD_RANGE_STR<1, MAXTTL>, NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Allow EBGP neighbors not on directly connected networks\n" @@ -4890,7 +4890,7 @@ peer_port_vty (struct vty *vty, const char *ip_str, int afi, /* Set specified peer's BGP port. */ DEFUN (neighbor_port, neighbor_port_cmd, - NEIGHBOR_CMD "port <0-65535>", + NEIGHBOR_CMD "port (0-65535)", NEIGHBOR_STR NEIGHBOR_ADDR_STR "Neighbor's BGP port\n" @@ -4956,7 +4956,7 @@ peer_weight_unset_vty (struct vty *vty, const char *ip_str) DEFUN (neighbor_weight, neighbor_weight_cmd, - NEIGHBOR_CMD2 "weight <0-65535>", + NEIGHBOR_CMD2 "weight (0-65535)", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Set default weight for routes from this neighbor\n" @@ -5068,7 +5068,7 @@ peer_timers_unset_vty (struct vty *vty, const char *ip_str) DEFUN (neighbor_timers, neighbor_timers_cmd, - NEIGHBOR_CMD2 "timers <0-65535> <0-65535>", + NEIGHBOR_CMD2 "timers (0-65535) (0-65535)", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "BGP per neighbor timers\n" @@ -5137,7 +5137,7 @@ peer_timers_connect_unset_vty (struct vty *vty, const char *ip_str) DEFUN (neighbor_timers_connect, neighbor_timers_connect_cmd, - NEIGHBOR_CMD2 "timers connect <1-65535>", + NEIGHBOR_CMD2 "timers connect (1-65535)", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "BGP per neighbor timers\n" @@ -5196,7 +5196,7 @@ peer_advertise_interval_vty (struct vty *vty, const char *ip_str, DEFUN (neighbor_advertise_interval, neighbor_advertise_interval_cmd, - NEIGHBOR_CMD2 "advertisement-interval <0-600>", + NEIGHBOR_CMD2 "advertisement-interval (0-600)", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Minimum interval between sending BGP routing updates\n" @@ -5230,7 +5230,7 @@ DEFUN (no_neighbor_advertise_interval, /* Time to wait before processing route-map updates */ DEFUN (bgp_set_route_map_delay_timer, bgp_set_route_map_delay_timer_cmd, - "bgp route-map delay-timer <0-600>", + "bgp route-map delay-timer (0-600)", SET_STR "BGP route-map delay timer\n" "Time in secs to wait before processing route-map changes\n" @@ -5374,7 +5374,7 @@ peer_distribute_unset_vty (struct vty *vty, const char *ip_str, afi_t afi, DEFUN (neighbor_distribute_list, neighbor_distribute_list_cmd, - NEIGHBOR_CMD2 "distribute-list (<1-199>|<1300-2699>|WORD) (in|out)", + NEIGHBOR_CMD2 "distribute-list <(1-199)|(1300-2699)|WORD> ", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Filter updates to/from this neighbor\n" @@ -5390,7 +5390,7 @@ DEFUN (neighbor_distribute_list, DEFUN (no_neighbor_distribute_list, no_neighbor_distribute_list_cmd, - NO_NEIGHBOR_CMD2 "distribute-list (<1-199>|<1300-2699>|WORD) (in|out)", + NO_NEIGHBOR_CMD2 "distribute-list <(1-199)|(1300-2699)|WORD> ", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -5455,7 +5455,7 @@ peer_prefix_list_unset_vty (struct vty *vty, const char *ip_str, afi_t afi, DEFUN (neighbor_prefix_list, neighbor_prefix_list_cmd, - NEIGHBOR_CMD2 "prefix-list WORD (in|out)", + NEIGHBOR_CMD2 "prefix-list WORD ", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Filter updates to/from this neighbor\n" @@ -5469,7 +5469,7 @@ DEFUN (neighbor_prefix_list, DEFUN (no_neighbor_prefix_list, no_neighbor_prefix_list_cmd, - NO_NEIGHBOR_CMD2 "prefix-list WORD (in|out)", + NO_NEIGHBOR_CMD2 "prefix-list WORD ", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -5532,7 +5532,7 @@ peer_aslist_unset_vty (struct vty *vty, const char *ip_str, DEFUN (neighbor_filter_list, neighbor_filter_list_cmd, - NEIGHBOR_CMD2 "filter-list WORD (in|out)", + NEIGHBOR_CMD2 "filter-list WORD ", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Establish BGP filters\n" @@ -5546,7 +5546,7 @@ DEFUN (neighbor_filter_list, DEFUN (no_neighbor_filter_list, no_neighbor_filter_list_cmd, - NO_NEIGHBOR_CMD2 "filter-list WORD (in|out)", + NO_NEIGHBOR_CMD2 "filter-list WORD ", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -5609,7 +5609,7 @@ peer_route_map_unset_vty (struct vty *vty, const char *ip_str, afi_t afi, DEFUN (neighbor_route_map, neighbor_route_map_cmd, - NEIGHBOR_CMD2 "route-map WORD (in|out)", + NEIGHBOR_CMD2 "route-map WORD ", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Apply route map to neighbor\n" @@ -5623,7 +5623,7 @@ DEFUN (neighbor_route_map, DEFUN (no_neighbor_route_map, no_neighbor_route_map_cmd, - NO_NEIGHBOR_CMD2 "route-map WORD (in|out)", + NO_NEIGHBOR_CMD2 "route-map WORD ", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -5748,7 +5748,7 @@ peer_maximum_prefix_unset_vty (struct vty *vty, const char *ip_str, afi_t afi, each peer configuration. */ DEFUN (neighbor_maximum_prefix, neighbor_maximum_prefix_cmd, - NEIGHBOR_CMD2 "maximum-prefix <1-4294967295>", + NEIGHBOR_CMD2 "maximum-prefix (1-4294967295)", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Maximum number of prefix accept from this peer\n" @@ -5761,7 +5761,7 @@ DEFUN (neighbor_maximum_prefix, DEFUN (neighbor_maximum_prefix_threshold, neighbor_maximum_prefix_threshold_cmd, - NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> <1-100>", + NEIGHBOR_CMD2 "maximum-prefix (1-4294967295) (1-100)", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Maximum number of prefix accept from this peer\n" @@ -5775,7 +5775,7 @@ DEFUN (neighbor_maximum_prefix_threshold, DEFUN (neighbor_maximum_prefix_warning, neighbor_maximum_prefix_warning_cmd, - NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> warning-only", + NEIGHBOR_CMD2 "maximum-prefix (1-4294967295) warning-only", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Maximum number of prefix accept from this peer\n" @@ -5789,7 +5789,7 @@ DEFUN (neighbor_maximum_prefix_warning, DEFUN (neighbor_maximum_prefix_threshold_warning, neighbor_maximum_prefix_threshold_warning_cmd, - NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> <1-100> warning-only", + NEIGHBOR_CMD2 "maximum-prefix (1-4294967295) (1-100) warning-only", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Maximum number of prefix accept from this peer\n" @@ -5803,7 +5803,7 @@ DEFUN (neighbor_maximum_prefix_threshold_warning, DEFUN (neighbor_maximum_prefix_restart, neighbor_maximum_prefix_restart_cmd, - NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> restart <1-65535>", + NEIGHBOR_CMD2 "maximum-prefix (1-4294967295) restart (1-65535)", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Maximum number of prefix accept from this peer\n" @@ -5817,7 +5817,7 @@ DEFUN (neighbor_maximum_prefix_restart, DEFUN (neighbor_maximum_prefix_threshold_restart, neighbor_maximum_prefix_threshold_restart_cmd, - NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> <1-100> restart <1-65535>", + NEIGHBOR_CMD2 "maximum-prefix (1-4294967295) (1-100) restart (1-65535)", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Maximum number of prefix accept from this peer\n" @@ -5972,7 +5972,7 @@ DEFUN (no_neighbor_allowas_in, DEFUN (neighbor_ttl_security, neighbor_ttl_security_cmd, - NEIGHBOR_CMD2 "ttl-security hops <1-254>", + NEIGHBOR_CMD2 "ttl-security hops (1-254)", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Specify the maximum number of hops to the BGP peer\n") @@ -6001,7 +6001,7 @@ DEFUN (neighbor_ttl_security, DEFUN (no_neighbor_ttl_security, no_neighbor_ttl_security_cmd, - NO_NEIGHBOR_CMD2 "ttl-security hops <1-254>", + NO_NEIGHBOR_CMD2 "ttl-security hops (1-254)", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -6092,7 +6092,7 @@ DEFUN (address_family_ipv4, DEFUN (address_family_ipv4_safi, address_family_ipv4_safi_cmd, - "address-family ipv4 (unicast|multicast)", + "address-family ipv4 ", "Enter Address Family command mode\n" "Address family\n" "Address Family modifier\n" @@ -6118,7 +6118,7 @@ DEFUN (address_family_ipv6, DEFUN (address_family_ipv6_safi, address_family_ipv6_safi_cmd, - "address-family ipv6 (unicast|multicast)", + "address-family ipv6 ", "Enter Address Family command mode\n" "Address family\n" "Address Family modifier\n" @@ -6392,7 +6392,7 @@ DEFUN (clear_ip_bgp_all, */ DEFUN (clear_ip_bgp_peer, clear_ip_bgp_peer_cmd, - "clear ip bgp (A.B.C.D|X:X::X:X|WORD)", + "clear ip bgp ", CLEAR_STR IP_STR BGP_STR @@ -6682,7 +6682,7 @@ DEFUN (clear_ip_bgp_all_soft_out, */ DEFUN (clear_ip_bgp_all_ipv4_soft_out, clear_ip_bgp_all_ipv4_soft_out_cmd, - "clear ip bgp * ipv4 (unicast|multicast) soft out", + "clear ip bgp * ipv4 soft out", CLEAR_STR IP_STR BGP_STR @@ -6717,7 +6717,7 @@ DEFUN (clear_ip_bgp_all_ipv4_soft_out, */ DEFUN (clear_ip_bgp_instance_all_ipv4_soft_out, clear_ip_bgp_instance_all_ipv4_soft_out_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " * ipv4 (unicast|multicast) soft out", + "clear ip bgp " BGP_INSTANCE_CMD " * ipv4 soft out", CLEAR_STR IP_STR BGP_STR @@ -6878,7 +6878,7 @@ DEFUN (clear_bgp_all_soft_out, DEFUN (clear_bgp_ipv6_safi_prefix, clear_bgp_ipv6_safi_prefix_cmd, - "clear bgp ipv6 (unicast|multicast) prefix X:X::X:X/M", + "clear bgp ipv6 prefix X:X::X:X/M", CLEAR_STR BGP_STR "Address family\n" @@ -6894,7 +6894,7 @@ DEFUN (clear_bgp_ipv6_safi_prefix, DEFUN (clear_bgp_instance_ipv6_safi_prefix, clear_bgp_instance_ipv6_safi_prefix_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 (unicast|multicast) prefix X:X::X:X/M", + "clear bgp " BGP_INSTANCE_CMD " ipv6 prefix X:X::X:X/M", CLEAR_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -6941,7 +6941,7 @@ DEFUN (clear_bgp_instance_ipv6_safi_prefix, */ DEFUN (clear_ip_bgp_peer_soft_out, clear_ip_bgp_peer_soft_out_cmd, - "clear ip bgp (A.B.C.D|WORD) soft out", + "clear ip bgp soft out", CLEAR_STR IP_STR BGP_STR @@ -6977,7 +6977,7 @@ DEFUN (clear_ip_bgp_peer_soft_out, */ DEFUN (clear_ip_bgp_peer_ipv4_soft_out, clear_ip_bgp_peer_ipv4_soft_out_cmd, - "clear ip bgp (A.B.C.D|WORD) ipv4 (unicast|multicast) soft out", + "clear ip bgp ipv4 soft out", CLEAR_STR IP_STR BGP_STR @@ -7014,7 +7014,7 @@ DEFUN (clear_ip_bgp_peer_ipv4_soft_out, */ DEFUN (clear_ip_bgp_instance_peer_ipv4_soft_out, clear_ip_bgp_instance_peer_ipv4_soft_out_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " (A.B.C.D|WORD) ipv4 (unicast|multicast) soft out", + "clear ip bgp " BGP_INSTANCE_CMD " ipv4 soft out", CLEAR_STR IP_STR BGP_STR @@ -7053,7 +7053,7 @@ DEFUN (clear_ip_bgp_instance_peer_ipv4_soft_out, */ DEFUN (clear_ip_bgp_peer_vpnv4_soft_out, clear_ip_bgp_peer_vpnv4_soft_out_cmd, - "clear ip bgp (A.B.C.D|WORD) vpnv4 unicast soft out", + "clear ip bgp vpnv4 unicast soft out", CLEAR_STR IP_STR BGP_STR @@ -7170,7 +7170,7 @@ DEFUN (clear_ip_bgp_peer_encap_soft_out, */ DEFUN (clear_bgp_peer_soft_out, clear_bgp_peer_soft_out_cmd, - "clear bgp (A.B.C.D|X:X::X:X|WORD) soft out", + "clear bgp soft out", CLEAR_STR BGP_STR "BGP neighbor address to clear\n" @@ -7262,7 +7262,7 @@ DEFUN (clear_ip_bgp_peer_group_soft_out, */ DEFUN (clear_ip_bgp_peer_group_ipv4_soft_out, clear_ip_bgp_peer_group_ipv4_soft_out_cmd, - "clear ip bgp peer-group WORD ipv4 (unicast|multicast) soft out", + "clear ip bgp peer-group WORD ipv4 soft out", CLEAR_STR IP_STR BGP_STR @@ -7299,7 +7299,7 @@ DEFUN (clear_ip_bgp_peer_group_ipv4_soft_out, */ DEFUN (clear_ip_bgp_instance_peer_group_ipv4_soft_out, clear_ip_bgp_instance_peer_group_ipv4_soft_out_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD ipv4 (unicast|multicast) soft out", + "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD ipv4 soft out", CLEAR_STR IP_STR BGP_STR @@ -7473,7 +7473,7 @@ DEFUN (clear_ip_bgp_external_soft_out, */ DEFUN (clear_ip_bgp_external_ipv4_soft_out, clear_ip_bgp_external_ipv4_soft_out_cmd, - "clear ip bgp external ipv4 (unicast|multicast) soft out", + "clear ip bgp external ipv4 soft out", CLEAR_STR IP_STR BGP_STR @@ -7508,7 +7508,7 @@ DEFUN (clear_ip_bgp_external_ipv4_soft_out, */ DEFUN (clear_ip_bgp_instance_external_ipv4_soft_out, clear_ip_bgp_instance_external_ipv4_soft_out_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " external ipv4 (unicast|multicast) soft out", + "clear ip bgp " BGP_INSTANCE_CMD " external ipv4 soft out", CLEAR_STR IP_STR BGP_STR @@ -7673,7 +7673,7 @@ DEFUN (clear_ip_bgp_as_soft_out, */ DEFUN (clear_ip_bgp_as_ipv4_soft_out, clear_ip_bgp_as_ipv4_soft_out_cmd, - "clear ip bgp " CMD_AS_RANGE " ipv4 (unicast|multicast) soft out", + "clear ip bgp " CMD_AS_RANGE " ipv4 soft out", CLEAR_STR IP_STR BGP_STR @@ -7708,7 +7708,7 @@ DEFUN (clear_ip_bgp_as_ipv4_soft_out, */ DEFUN (clear_ip_bgp_instance_as_ipv4_soft_out, clear_ip_bgp_instance_as_ipv4_soft_out_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " ipv4 (unicast|multicast) soft out", + "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " ipv4 soft out", CLEAR_STR IP_STR BGP_STR @@ -7950,7 +7950,7 @@ DEFUN (clear_ip_bgp_all_in_prefix_filter, */ DEFUN (clear_ip_bgp_all_ipv4_soft_in, clear_ip_bgp_all_ipv4_soft_in_cmd, - "clear ip bgp * ipv4 (unicast|multicast) soft in", + "clear ip bgp * ipv4 soft in", CLEAR_STR IP_STR BGP_STR @@ -7985,7 +7985,7 @@ DEFUN (clear_ip_bgp_all_ipv4_soft_in, */ DEFUN (clear_ip_bgp_instance_all_ipv4_soft_in, clear_ip_bgp_instance_all_ipv4_soft_in_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " * ipv4 (unicast|multicast) soft in", + "clear ip bgp " BGP_INSTANCE_CMD " * ipv4 soft in", CLEAR_STR IP_STR BGP_STR @@ -8009,7 +8009,7 @@ DEFUN (clear_ip_bgp_instance_all_ipv4_soft_in, DEFUN (clear_ip_bgp_all_ipv4_in_prefix_filter, clear_ip_bgp_all_ipv4_in_prefix_filter_cmd, - "clear ip bgp * ipv4 (unicast|multicast) in prefix-filter", + "clear ip bgp * ipv4 in prefix-filter", CLEAR_STR IP_STR BGP_STR @@ -8223,7 +8223,7 @@ DEFUN (clear_bgp_all_in_prefix_filter, */ DEFUN (clear_ip_bgp_peer_soft_in, clear_ip_bgp_peer_soft_in_cmd, - "clear ip bgp (A.B.C.D|WORD) soft in", + "clear ip bgp soft in", CLEAR_STR IP_STR BGP_STR @@ -8245,7 +8245,7 @@ DEFUN (clear_ip_bgp_peer_soft_in, DEFUN (clear_ip_bgp_peer_in_prefix_filter, clear_ip_bgp_peer_in_prefix_filter_cmd, - "clear ip bgp (A.B.C.D|WORD) in prefix-filter", + "clear ip bgp in prefix-filter", CLEAR_STR IP_STR BGP_STR @@ -8274,7 +8274,7 @@ DEFUN (clear_ip_bgp_peer_in_prefix_filter, */ DEFUN (clear_ip_bgp_peer_ipv4_soft_in, clear_ip_bgp_peer_ipv4_soft_in_cmd, - "clear ip bgp (A.B.C.D|WORD) ipv4 (unicast|multicast) soft in", + "clear ip bgp ipv4 soft in", CLEAR_STR IP_STR BGP_STR @@ -8311,7 +8311,7 @@ DEFUN (clear_ip_bgp_peer_ipv4_soft_in, */ DEFUN (clear_ip_bgp_instance_peer_ipv4_soft_in, clear_ip_bgp_instance_peer_ipv4_soft_in_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " (A.B.C.D|WORD) ipv4 (unicast|multicast) soft in", + "clear ip bgp " BGP_INSTANCE_CMD " ipv4 soft in", CLEAR_STR IP_STR BGP_STR @@ -8336,7 +8336,7 @@ DEFUN (clear_ip_bgp_instance_peer_ipv4_soft_in, DEFUN (clear_ip_bgp_peer_ipv4_in_prefix_filter, clear_ip_bgp_peer_ipv4_in_prefix_filter_cmd, - "clear ip bgp (A.B.C.D|WORD) ipv4 (unicast|multicast) in prefix-filter", + "clear ip bgp ipv4 in prefix-filter", CLEAR_STR IP_STR BGP_STR @@ -8371,7 +8371,7 @@ DEFUN (clear_ip_bgp_peer_ipv4_in_prefix_filter, */ DEFUN (clear_ip_bgp_peer_vpnv4_soft_in, clear_ip_bgp_peer_vpnv4_soft_in_cmd, - "clear ip bgp (A.B.C.D|WORD) vpnv4 unicast soft in", + "clear ip bgp vpnv4 unicast soft in", CLEAR_STR IP_STR BGP_STR @@ -8488,7 +8488,7 @@ DEFUN (clear_ip_bgp_peer_encap_soft_in, */ DEFUN (clear_bgp_peer_soft_in, clear_bgp_peer_soft_in_cmd, - "clear bgp (A.B.C.D|X:X::X:X|WORD) soft in", + "clear bgp soft in", CLEAR_STR BGP_STR "BGP neighbor address to clear\n" @@ -8527,7 +8527,7 @@ DEFUN (clear_bgp_peer_soft_in, */ DEFUN (clear_bgp_peer_in_prefix_filter, clear_bgp_peer_in_prefix_filter_cmd, - "clear bgp (A.B.C.D|X:X::X:X|WORD) in prefix-filter", + "clear bgp in prefix-filter", CLEAR_STR BGP_STR "BGP neighbor address to clear\n" @@ -8624,7 +8624,7 @@ DEFUN (clear_ip_bgp_peer_group_in_prefix_filter, */ DEFUN (clear_ip_bgp_peer_group_ipv4_soft_in, clear_ip_bgp_peer_group_ipv4_soft_in_cmd, - "clear ip bgp peer-group WORD ipv4 (unicast|multicast) soft in", + "clear ip bgp peer-group WORD ipv4 soft in", CLEAR_STR IP_STR BGP_STR @@ -8661,7 +8661,7 @@ DEFUN (clear_ip_bgp_peer_group_ipv4_soft_in, */ DEFUN (clear_ip_bgp_instance_peer_group_ipv4_soft_in, clear_ip_bgp_instance_peer_group_ipv4_soft_in_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD ipv4 (unicast|multicast) soft in", + "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD ipv4 soft in", CLEAR_STR IP_STR BGP_STR @@ -8686,7 +8686,7 @@ DEFUN (clear_ip_bgp_instance_peer_group_ipv4_soft_in, DEFUN (clear_ip_bgp_peer_group_ipv4_in_prefix_filter, clear_ip_bgp_peer_group_ipv4_in_prefix_filter_cmd, - "clear ip bgp peer-group WORD ipv4 (unicast|multicast) in prefix-filter", + "clear ip bgp peer-group WORD ipv4 in prefix-filter", CLEAR_STR IP_STR BGP_STR @@ -8898,7 +8898,7 @@ DEFUN (clear_ip_bgp_external_in_prefix_filter, */ DEFUN (clear_ip_bgp_external_ipv4_soft_in, clear_ip_bgp_external_ipv4_soft_in_cmd, - "clear ip bgp external ipv4 (unicast|multicast) soft in", + "clear ip bgp external ipv4 soft in", CLEAR_STR IP_STR BGP_STR @@ -8933,7 +8933,7 @@ DEFUN (clear_ip_bgp_external_ipv4_soft_in, */ DEFUN (clear_ip_bgp_instance_external_ipv4_soft_in, clear_ip_bgp_instance_external_ipv4_soft_in_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " external ipv4 (unicast|multicast) soft in", + "clear ip bgp " BGP_INSTANCE_CMD " external ipv4 soft in", CLEAR_STR IP_STR BGP_STR @@ -8957,7 +8957,7 @@ DEFUN (clear_ip_bgp_instance_external_ipv4_soft_in, DEFUN (clear_ip_bgp_external_ipv4_in_prefix_filter, clear_ip_bgp_external_ipv4_in_prefix_filter_cmd, - "clear ip bgp external ipv4 (unicast|multicast) in prefix-filter", + "clear ip bgp external ipv4 in prefix-filter", CLEAR_STR IP_STR BGP_STR @@ -9158,7 +9158,7 @@ DEFUN (clear_ip_bgp_as_in_prefix_filter, */ DEFUN (clear_ip_bgp_as_ipv4_soft_in, clear_ip_bgp_as_ipv4_soft_in_cmd, - "clear ip bgp " CMD_AS_RANGE " ipv4 (unicast|multicast) soft in", + "clear ip bgp " CMD_AS_RANGE " ipv4 soft in", CLEAR_STR IP_STR BGP_STR @@ -9193,7 +9193,7 @@ DEFUN (clear_ip_bgp_as_ipv4_soft_in, */ DEFUN (clear_ip_bgp_instance_as_ipv4_soft_in, clear_ip_bgp_instance_as_ipv4_soft_in_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " ipv4 (unicast|multicast) soft in", + "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " ipv4 soft in", CLEAR_STR IP_STR BGP_STR @@ -9217,7 +9217,7 @@ DEFUN (clear_ip_bgp_instance_as_ipv4_soft_in, DEFUN (clear_ip_bgp_as_ipv4_in_prefix_filter, clear_ip_bgp_as_ipv4_in_prefix_filter_cmd, - "clear ip bgp " CMD_AS_RANGE " ipv4 (unicast|multicast) in prefix-filter", + "clear ip bgp " CMD_AS_RANGE " ipv4 in prefix-filter", CLEAR_STR IP_STR BGP_STR @@ -9432,7 +9432,7 @@ DEFUN (clear_ip_bgp_all_soft, DEFUN (clear_ip_bgp_all_ipv4_soft, clear_ip_bgp_all_ipv4_soft_cmd, - "clear ip bgp * ipv4 (unicast|multicast) soft", + "clear ip bgp * ipv4 soft", CLEAR_STR IP_STR BGP_STR @@ -9452,7 +9452,7 @@ DEFUN (clear_ip_bgp_all_ipv4_soft, DEFUN (clear_ip_bgp_instance_all_ipv4_soft, clear_ip_bgp_instance_all_ipv4_soft_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " * ipv4 (unicast|multicast) soft", + "clear ip bgp " BGP_INSTANCE_CMD " * ipv4 soft", CLEAR_STR IP_STR BGP_STR @@ -9559,7 +9559,7 @@ DEFUN (clear_bgp_all_soft, */ DEFUN (clear_ip_bgp_peer_soft, clear_ip_bgp_peer_soft_cmd, - "clear ip bgp (A.B.C.D|WORD) soft", + "clear ip bgp soft", CLEAR_STR IP_STR BGP_STR @@ -9578,7 +9578,7 @@ DEFUN (clear_ip_bgp_peer_soft, DEFUN (clear_ip_bgp_peer_ipv4_soft, clear_ip_bgp_peer_ipv4_soft_cmd, - "clear ip bgp (A.B.C.D|WORD) ipv4 (unicast|multicast) soft", + "clear ip bgp ipv4 soft", CLEAR_STR IP_STR BGP_STR @@ -9599,7 +9599,7 @@ DEFUN (clear_ip_bgp_peer_ipv4_soft, DEFUN (clear_ip_bgp_instance_peer_ipv4_soft, clear_ip_bgp_instance_peer_ipv4_soft_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " (A.B.C.D|WORD) ipv4 (unicast|multicast) soft", + "clear ip bgp " BGP_INSTANCE_CMD " ipv4 soft", CLEAR_STR IP_STR BGP_STR @@ -9621,7 +9621,7 @@ DEFUN (clear_ip_bgp_instance_peer_ipv4_soft, DEFUN (clear_ip_bgp_peer_vpnv4_soft, clear_ip_bgp_peer_vpnv4_soft_cmd, - "clear ip bgp (A.B.C.D|WORD) vpnv4 unicast soft", + "clear ip bgp vpnv4 unicast soft", CLEAR_STR IP_STR BGP_STR @@ -9683,7 +9683,7 @@ DEFUN (clear_ip_bgp_peer_encap_soft, */ DEFUN (clear_bgp_peer_soft, clear_bgp_peer_soft_cmd, - "clear bgp (A.B.C.D|X:X::X:X|WORD) soft", + "clear bgp soft", CLEAR_STR BGP_STR "BGP neighbor address to clear\n" @@ -9735,7 +9735,7 @@ DEFUN (clear_ip_bgp_peer_group_soft, DEFUN (clear_ip_bgp_peer_group_ipv4_soft, clear_ip_bgp_peer_group_ipv4_soft_cmd, - "clear ip bgp peer-group WORD ipv4 (unicast|multicast) soft", + "clear ip bgp peer-group WORD ipv4 soft", CLEAR_STR IP_STR BGP_STR @@ -9756,7 +9756,7 @@ DEFUN (clear_ip_bgp_peer_group_ipv4_soft, DEFUN (clear_ip_bgp_instance_peer_group_ipv4_soft, clear_ip_bgp_instance_peer_group_ipv4_soft_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD ipv4 (unicast|multicast) soft", + "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD ipv4 soft", CLEAR_STR IP_STR BGP_STR @@ -9855,7 +9855,7 @@ DEFUN (clear_ip_bgp_external_soft, DEFUN (clear_ip_bgp_external_ipv4_soft, clear_ip_bgp_external_ipv4_soft_cmd, - "clear ip bgp external ipv4 (unicast|multicast) soft", + "clear ip bgp external ipv4 soft", CLEAR_STR IP_STR BGP_STR @@ -9875,7 +9875,7 @@ DEFUN (clear_ip_bgp_external_ipv4_soft, DEFUN (clear_ip_bgp_instance_external_ipv4_soft, clear_ip_bgp_instance_external_ipv4_soft_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " external ipv4 (unicast|multicast) soft", + "clear ip bgp " BGP_INSTANCE_CMD " external ipv4 soft", CLEAR_STR IP_STR BGP_STR @@ -9969,7 +9969,7 @@ DEFUN (clear_ip_bgp_as_soft, DEFUN (clear_ip_bgp_as_ipv4_soft, clear_ip_bgp_as_ipv4_soft_cmd, - "clear ip bgp " CMD_AS_RANGE " ipv4 (unicast|multicast) soft", + "clear ip bgp " CMD_AS_RANGE " ipv4 soft", CLEAR_STR IP_STR BGP_STR @@ -9989,7 +9989,7 @@ DEFUN (clear_ip_bgp_as_ipv4_soft, DEFUN (clear_ip_bgp_instance_as_ipv4_soft, clear_ip_bgp_instance_as_ipv4_soft_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " ipv4 (unicast|multicast) soft", + "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " ipv4 soft", CLEAR_STR IP_STR BGP_STR @@ -10815,7 +10815,7 @@ DEFUN (show_ip_bgp_instance_all_summary, */ DEFUN (show_ip_bgp_ipv4_summary, show_ip_bgp_ipv4_summary_cmd, - "show ip bgp ipv4 (unicast|multicast) summary [json]", + "show ip bgp ipv4 summary [json]", SHOW_STR IP_STR BGP_STR @@ -10875,7 +10875,7 @@ DEFUN (show_bgp_ipv6_vpn_summary, */ DEFUN (show_ip_bgp_instance_ipv4_summary, show_ip_bgp_instance_ipv4_summary_cmd, - "show ip bgp view WORD ipv4 (unicast|multicast) summary [json]", + "show ip bgp view WORD ipv4 summary [json]", SHOW_STR IP_STR BGP_STR @@ -10998,7 +10998,7 @@ DEFUN (show_bgp_instance_all_summary, DEFUN (show_bgp_ipv6_safi_summary, show_bgp_ipv6_safi_summary_cmd, - "show bgp ipv6 (unicast|multicast) summary [json]", + "show bgp ipv6 summary [json]", SHOW_STR BGP_STR "Address family\n" @@ -11016,7 +11016,7 @@ DEFUN (show_bgp_ipv6_safi_summary, DEFUN (show_bgp_instance_ipv6_safi_summary, show_bgp_instance_ipv6_safi_summary_cmd, - "show bgp " BGP_INSTANCE_CMD " ipv6 (unicast|multicast) summary [json]", + "show bgp " BGP_INSTANCE_CMD " ipv6 summary [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -13013,7 +13013,7 @@ DEFUN (show_ip_bgp_neighbors, */ DEFUN (show_ip_bgp_neighbors_peer, show_ip_bgp_neighbors_peer_cmd, - "show ip bgp neighbors (A.B.C.D|X:X::X:X|WORD) [json]", + "show ip bgp neighbors [json]", SHOW_STR IP_STR BGP_STR @@ -13110,7 +13110,7 @@ DEFUN (show_ip_bgp_instance_all_neighbors, */ DEFUN (show_ip_bgp_instance_neighbors_peer, show_ip_bgp_instance_neighbors_peer_cmd, - "show ip bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) [json]", + "show ip bgp " BGP_INSTANCE_CMD " neighbors [json]", SHOW_STR IP_STR BGP_STR @@ -13146,7 +13146,7 @@ DEFUN (show_ip_bgp_paths, DEFUN (show_ip_bgp_ipv4_paths, show_ip_bgp_ipv4_paths_cmd, - "show ip bgp ipv4 (unicast|multicast) paths", + "show ip bgp ipv4 paths", SHOW_STR IP_STR BGP_STR @@ -13307,7 +13307,7 @@ DEFUN (show_bgp_instance_all_ipv6_updgrps, DEFUN (show_bgp_updgrps, show_bgp_updgrps_cmd, - "show bgp (ipv4|ipv6) (unicast|multicast) update-groups", + "show bgp update-groups", SHOW_STR BGP_STR "Address family\n" @@ -13385,7 +13385,7 @@ DEFUN (show_bgp_instance_ipv6_updgrps_s, DEFUN (show_bgp_updgrps_s, show_bgp_updgrps_s_cmd, - "show bgp (ipv4|ipv6) (unicast|multicast) update-groups SUBGROUP-ID", + "show bgp update-groups SUBGROUP-ID", SHOW_STR BGP_STR "Address family\n" @@ -13466,7 +13466,7 @@ show_bgp_updgrps_adj_info_aux (struct vty *vty, const char *name, DEFUN (show_ip_bgp_updgrps_adj, show_ip_bgp_updgrps_adj_cmd, - "show ip bgp update-groups (advertise-queue|advertised-routes|packet-queue)", + "show ip bgp update-groups ", SHOW_STR IP_STR BGP_STR @@ -13482,7 +13482,7 @@ DEFUN (show_ip_bgp_updgrps_adj, DEFUN (show_ip_bgp_instance_updgrps_adj, show_ip_bgp_instance_updgrps_adj_cmd, - "show ip bgp " BGP_INSTANCE_CMD " update-groups (advertise-queue|advertised-routes|packet-queue)", + "show ip bgp " BGP_INSTANCE_CMD " update-groups ", SHOW_STR IP_STR BGP_STR @@ -13499,7 +13499,7 @@ DEFUN (show_ip_bgp_instance_updgrps_adj, DEFUN (show_bgp_updgrps_afi_adj, show_bgp_updgrps_afi_adj_cmd, - "show bgp (ipv4|ipv6) (unicast|multicast) update-groups (advertise-queue|advertised-routes|packet-queue)", + "show bgp update-groups ", SHOW_STR BGP_STR "Address family\n" @@ -13523,7 +13523,7 @@ DEFUN (show_bgp_updgrps_afi_adj, DEFUN (show_bgp_updgrps_adj, show_bgp_updgrps_adj_cmd, - "show bgp update-groups (advertise-queue|advertised-routes|packet-queue)", + "show bgp update-groups ", SHOW_STR BGP_STR "BGP update groups\n" @@ -13537,7 +13537,7 @@ DEFUN (show_bgp_updgrps_adj, DEFUN (show_bgp_instance_updgrps_adj, show_bgp_instance_updgrps_adj_cmd, - "show bgp " BGP_INSTANCE_CMD " update-groups (advertise-queue|advertised-routes|packet-queue)", + "show bgp " BGP_INSTANCE_CMD " update-groups ", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -13552,7 +13552,7 @@ DEFUN (show_bgp_instance_updgrps_adj, DEFUN (show_ip_bgp_updgrps_adj_s, show_ip_bgp_updgrps_adj_s_cmd, - "show ip bgp update-groups SUBGROUP-ID (advertise-queue|advertised-routes|packet-queue)", + "show ip bgp update-groups SUBGROUP-ID ", SHOW_STR IP_STR BGP_STR @@ -13573,7 +13573,7 @@ DEFUN (show_ip_bgp_updgrps_adj_s, DEFUN (show_ip_bgp_instance_updgrps_adj_s, show_ip_bgp_instance_updgrps_adj_s_cmd, - "show ip bgp " BGP_INSTANCE_CMD " update-groups SUBGROUP-ID (advertise-queue|advertised-routes|packet-queue)", + "show ip bgp " BGP_INSTANCE_CMD " update-groups SUBGROUP-ID ", SHOW_STR IP_STR BGP_STR @@ -13595,7 +13595,7 @@ DEFUN (show_ip_bgp_instance_updgrps_adj_s, DEFUN (show_bgp_updgrps_afi_adj_s, show_bgp_updgrps_afi_adj_s_cmd, - "show bgp (ipv4|ipv6) (unicast|multicast) update-groups SUBGROUP-ID (advertise-queue|advertised-routes|packet-queue)", + "show bgp update-groups SUBGROUP-ID ", SHOW_STR BGP_STR "Address family\n" @@ -13623,7 +13623,7 @@ DEFUN (show_bgp_updgrps_afi_adj_s, DEFUN (show_bgp_updgrps_adj_s, show_bgp_updgrps_adj_s_cmd, - "show bgp update-groups SUBGROUP-ID (advertise-queue|advertised-routes|packet-queue)", + "show bgp update-groups SUBGROUP-ID ", SHOW_STR BGP_STR "BGP update groups\n" @@ -13642,7 +13642,7 @@ DEFUN (show_bgp_updgrps_adj_s, DEFUN (show_bgp_instance_updgrps_adj_s, show_bgp_instance_updgrps_adj_s_cmd, - "show bgp " BGP_INSTANCE_CMD " update-groups SUBGROUP-ID (advertise-queue|advertised-routes|packet-queue)", + "show bgp " BGP_INSTANCE_CMD " update-groups SUBGROUP-ID ", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -13914,7 +13914,7 @@ DEFUN (bgp_redistribute_ipv4_rmap, DEFUN (bgp_redistribute_ipv4_metric, bgp_redistribute_ipv4_metric_cmd, - "redistribute " QUAGGA_IP_REDIST_STR_BGPD " metric <0-4294967295>", + "redistribute " QUAGGA_IP_REDIST_STR_BGPD " metric (0-4294967295)", "Redistribute information from another routing protocol\n" QUAGGA_IP_REDIST_HELP_STR_BGPD "Metric for redistributed routes\n" @@ -13939,7 +13939,7 @@ DEFUN (bgp_redistribute_ipv4_metric, DEFUN (bgp_redistribute_ipv4_rmap_metric, bgp_redistribute_ipv4_rmap_metric_cmd, - "redistribute " QUAGGA_IP_REDIST_STR_BGPD " route-map WORD metric <0-4294967295>", + "redistribute " QUAGGA_IP_REDIST_STR_BGPD " route-map WORD metric (0-4294967295)", "Redistribute information from another routing protocol\n" QUAGGA_IP_REDIST_HELP_STR_BGPD "Route map reference\n" @@ -13967,7 +13967,7 @@ DEFUN (bgp_redistribute_ipv4_rmap_metric, DEFUN (bgp_redistribute_ipv4_metric_rmap, bgp_redistribute_ipv4_metric_rmap_cmd, - "redistribute " QUAGGA_IP_REDIST_STR_BGPD " metric <0-4294967295> route-map WORD", + "redistribute " QUAGGA_IP_REDIST_STR_BGPD " metric (0-4294967295) route-map WORD", "Redistribute information from another routing protocol\n" QUAGGA_IP_REDIST_HELP_STR_BGPD "Metric for redistributed routes\n" @@ -13995,7 +13995,7 @@ DEFUN (bgp_redistribute_ipv4_metric_rmap, DEFUN (bgp_redistribute_ipv4_ospf, bgp_redistribute_ipv4_ospf_cmd, - "redistribute (ospf|table) <1-65535>", + "redistribute (1-65535)", "Redistribute information from another routing protocol\n" "Open Shortest Path First (OSPFv2)\n" "Non-main Kernel Routing Table\n" @@ -14017,7 +14017,7 @@ DEFUN (bgp_redistribute_ipv4_ospf, DEFUN (bgp_redistribute_ipv4_ospf_rmap, bgp_redistribute_ipv4_ospf_rmap_cmd, - "redistribute (ospf|table) <1-65535> route-map WORD", + "redistribute (1-65535) route-map WORD", "Redistribute information from another routing protocol\n" "Open Shortest Path First (OSPFv2)\n" "Non-main Kernel Routing Table\n" @@ -14042,7 +14042,7 @@ DEFUN (bgp_redistribute_ipv4_ospf_rmap, DEFUN (bgp_redistribute_ipv4_ospf_metric, bgp_redistribute_ipv4_ospf_metric_cmd, - "redistribute (ospf|table) <1-65535> metric <0-4294967295>", + "redistribute (1-65535) metric (0-4294967295)", "Redistribute information from another routing protocol\n" "Open Shortest Path First (OSPFv2)\n" "Non-main Kernel Routing Table\n" @@ -14070,7 +14070,7 @@ DEFUN (bgp_redistribute_ipv4_ospf_metric, DEFUN (bgp_redistribute_ipv4_ospf_rmap_metric, bgp_redistribute_ipv4_ospf_rmap_metric_cmd, - "redistribute (ospf|table) <1-65535> route-map WORD metric <0-4294967295>", + "redistribute (1-65535) route-map WORD metric (0-4294967295)", "Redistribute information from another routing protocol\n" "Open Shortest Path First (OSPFv2)\n" "Non-main Kernel Routing Table\n" @@ -14101,7 +14101,7 @@ DEFUN (bgp_redistribute_ipv4_ospf_rmap_metric, DEFUN (bgp_redistribute_ipv4_ospf_metric_rmap, bgp_redistribute_ipv4_ospf_metric_rmap_cmd, - "redistribute (ospf|table) <1-65535> metric <0-4294967295> route-map WORD", + "redistribute (1-65535) metric (0-4294967295) route-map WORD", "Redistribute information from another routing protocol\n" "Open Shortest Path First (OSPFv2)\n" "Non-main Kernel Routing Table\n" @@ -14175,7 +14175,7 @@ DEFUN (bgp_redistribute_ipv4_ospf_metric_rmap, */ DEFUN (no_bgp_redistribute_ipv4_ospf, no_bgp_redistribute_ipv4_ospf_cmd, - "no redistribute (ospf|table) <1-65535>", + "no redistribute (1-65535)", NO_STR "Redistribute information from another routing protocol\n" "Open Shortest Path First (OSPFv2)\n" @@ -14300,7 +14300,7 @@ DEFUN (bgp_redistribute_ipv6_rmap, DEFUN (bgp_redistribute_ipv6_metric, bgp_redistribute_ipv6_metric_cmd, - "redistribute " QUAGGA_IP6_REDIST_STR_BGPD " metric <0-4294967295>", + "redistribute " QUAGGA_IP6_REDIST_STR_BGPD " metric (0-4294967295)", "Redistribute information from another routing protocol\n" QUAGGA_IP6_REDIST_HELP_STR_BGPD "Metric for redistributed routes\n" @@ -14325,7 +14325,7 @@ DEFUN (bgp_redistribute_ipv6_metric, DEFUN (bgp_redistribute_ipv6_rmap_metric, bgp_redistribute_ipv6_rmap_metric_cmd, - "redistribute " QUAGGA_IP6_REDIST_STR_BGPD " route-map WORD metric <0-4294967295>", + "redistribute " QUAGGA_IP6_REDIST_STR_BGPD " route-map WORD metric (0-4294967295)", "Redistribute information from another routing protocol\n" QUAGGA_IP6_REDIST_HELP_STR_BGPD "Route map reference\n" @@ -14353,7 +14353,7 @@ DEFUN (bgp_redistribute_ipv6_rmap_metric, DEFUN (bgp_redistribute_ipv6_metric_rmap, bgp_redistribute_ipv6_metric_rmap_cmd, - "redistribute " QUAGGA_IP6_REDIST_STR_BGPD " metric <0-4294967295> route-map WORD", + "redistribute " QUAGGA_IP6_REDIST_STR_BGPD " metric (0-4294967295) route-map WORD", "Redistribute information from another routing protocol\n" QUAGGA_IP6_REDIST_HELP_STR_BGPD "Metric for redistributed routes\n" @@ -15962,7 +15962,7 @@ community_list_unset_vty (struct vty *vty, int argc, const char **argv, */ DEFUN (ip_community_list_standard, ip_community_list_standard_cmd, - "ip community-list <1-99> (deny|permit) .AA:NN", + "ip community-list (1-99) .AA:NN", IP_STR COMMUNITY_LIST_STR "Community list number (standard)\n" @@ -15976,7 +15976,7 @@ DEFUN (ip_community_list_standard, DEFUN (ip_community_list_expanded, ip_community_list_expanded_cmd, - "ip community-list <100-500> (deny|permit) .LINE", + "ip community-list (100-500) .LINE", IP_STR COMMUNITY_LIST_STR "Community list number (expanded)\n" @@ -16000,7 +16000,7 @@ DEFUN (ip_community_list_expanded, */ DEFUN (ip_community_list_name_standard, ip_community_list_name_standard_cmd, - "ip community-list standard WORD (deny|permit) .AA:NN", + "ip community-list standard WORD .AA:NN", IP_STR COMMUNITY_LIST_STR "Add a standard community-list entry\n" @@ -16015,7 +16015,7 @@ DEFUN (ip_community_list_name_standard, DEFUN (ip_community_list_name_expanded, ip_community_list_name_expanded_cmd, - "ip community-list expanded WORD (deny|permit) .LINE", + "ip community-list expanded WORD .LINE", IP_STR COMMUNITY_LIST_STR "Add an expanded community-list entry\n" @@ -16029,7 +16029,7 @@ DEFUN (ip_community_list_name_expanded, DEFUN (no_ip_community_list_standard_all, no_ip_community_list_standard_all_cmd, - "no ip community-list <1-99>", + "no ip community-list (1-99)", NO_STR IP_STR COMMUNITY_LIST_STR @@ -16040,7 +16040,7 @@ DEFUN (no_ip_community_list_standard_all, DEFUN (no_ip_community_list_standard_direction, no_ip_community_list_standard_direction_cmd, - "no ip community-list <1-99> (deny|permit)", + "no ip community-list (1-99) ", NO_STR IP_STR COMMUNITY_LIST_STR @@ -16054,7 +16054,7 @@ DEFUN (no_ip_community_list_standard_direction, DEFUN (no_ip_community_list_expanded_all, no_ip_community_list_expanded_all_cmd, - "no ip community-list <100-500>", + "no ip community-list (100-500)", NO_STR IP_STR COMMUNITY_LIST_STR @@ -16089,7 +16089,7 @@ DEFUN (no_ip_community_list_name_expanded_all, DEFUN (no_ip_community_list_standard, no_ip_community_list_standard_cmd, - "no ip community-list <1-99> (deny|permit) .AA:NN", + "no ip community-list (1-99) .AA:NN", NO_STR IP_STR COMMUNITY_LIST_STR @@ -16103,7 +16103,7 @@ DEFUN (no_ip_community_list_standard, DEFUN (no_ip_community_list_expanded, no_ip_community_list_expanded_cmd, - "no ip community-list <100-500> (deny|permit) .LINE", + "no ip community-list (100-500) .LINE", NO_STR IP_STR COMMUNITY_LIST_STR @@ -16117,7 +16117,7 @@ DEFUN (no_ip_community_list_expanded, DEFUN (no_ip_community_list_name_standard, no_ip_community_list_name_standard_cmd, - "no ip community-list standard WORD (deny|permit) .AA:NN", + "no ip community-list standard WORD .AA:NN", NO_STR IP_STR COMMUNITY_LIST_STR @@ -16132,7 +16132,7 @@ DEFUN (no_ip_community_list_name_standard, DEFUN (no_ip_community_list_name_standard_brief, no_ip_community_list_name_standard_brief_cmd, - "no ip community-list standard WORD (deny|permit)", + "no ip community-list standard WORD ", NO_STR IP_STR COMMUNITY_LIST_STR @@ -16146,7 +16146,7 @@ DEFUN (no_ip_community_list_name_standard_brief, DEFUN (no_ip_community_list_name_expanded, no_ip_community_list_name_expanded_cmd, - "no ip community-list expanded WORD (deny|permit) .LINE", + "no ip community-list expanded WORD .LINE", NO_STR IP_STR COMMUNITY_LIST_STR @@ -16216,7 +16216,7 @@ DEFUN (show_ip_community_list, DEFUN (show_ip_community_list_arg, show_ip_community_list_arg_cmd, - "show ip community-list (<1-500>|WORD)", + "show ip community-list <(1-500)|WORD>", SHOW_STR IP_STR "List community-list\n" @@ -16344,7 +16344,7 @@ extcommunity_list_unset_vty (struct vty *vty, int argc, struct cmd_token **argv, */ DEFUN (ip_extcommunity_list_standard, ip_extcommunity_list_standard_cmd, - "ip extcommunity-list <1-99> (deny|permit) .AA:NN", + "ip extcommunity-list (1-99) .AA:NN", IP_STR EXTCOMMUNITY_LIST_STR "Extended Community list number (standard)\n" @@ -16358,7 +16358,7 @@ DEFUN (ip_extcommunity_list_standard, DEFUN (ip_extcommunity_list_expanded, ip_extcommunity_list_expanded_cmd, - "ip extcommunity-list <100-500> (deny|permit) .LINE", + "ip extcommunity-list (100-500) .LINE", IP_STR EXTCOMMUNITY_LIST_STR "Extended Community list number (expanded)\n" @@ -16382,7 +16382,7 @@ DEFUN (ip_extcommunity_list_expanded, */ DEFUN (ip_extcommunity_list_name_standard, ip_extcommunity_list_name_standard_cmd, - "ip extcommunity-list standard WORD (deny|permit) .AA:NN", + "ip extcommunity-list standard WORD .AA:NN", IP_STR EXTCOMMUNITY_LIST_STR "Specify standard extcommunity-list\n" @@ -16397,7 +16397,7 @@ DEFUN (ip_extcommunity_list_name_standard, DEFUN (ip_extcommunity_list_name_expanded, ip_extcommunity_list_name_expanded_cmd, - "ip extcommunity-list expanded WORD (deny|permit) .LINE", + "ip extcommunity-list expanded WORD .LINE", IP_STR EXTCOMMUNITY_LIST_STR "Specify expanded extcommunity-list\n" @@ -16411,7 +16411,7 @@ DEFUN (ip_extcommunity_list_name_expanded, DEFUN (no_ip_extcommunity_list_standard_all, no_ip_extcommunity_list_standard_all_cmd, - "no ip extcommunity-list <1-99>", + "no ip extcommunity-list (1-99)", NO_STR IP_STR EXTCOMMUNITY_LIST_STR @@ -16422,7 +16422,7 @@ DEFUN (no_ip_extcommunity_list_standard_all, DEFUN (no_ip_extcommunity_list_standard_direction, no_ip_extcommunity_list_standard_direction_cmd, - "no ip extcommunity-list <1-99> (deny|permit)", + "no ip extcommunity-list (1-99) ", NO_STR IP_STR EXTCOMMUNITY_LIST_STR @@ -16435,7 +16435,7 @@ DEFUN (no_ip_extcommunity_list_standard_direction, DEFUN (no_ip_extcommunity_list_expanded_all, no_ip_extcommunity_list_expanded_all_cmd, - "no ip extcommunity-list <100-500>", + "no ip extcommunity-list (100-500)", NO_STR IP_STR EXTCOMMUNITY_LIST_STR @@ -16470,7 +16470,7 @@ DEFUN (no_ip_extcommunity_list_name_expanded_all, DEFUN (no_ip_extcommunity_list_standard, no_ip_extcommunity_list_standard_cmd, - "no ip extcommunity-list <1-99> (deny|permit) .AA:NN", + "no ip extcommunity-list (1-99) .AA:NN", NO_STR IP_STR EXTCOMMUNITY_LIST_STR @@ -16484,7 +16484,7 @@ DEFUN (no_ip_extcommunity_list_standard, DEFUN (no_ip_extcommunity_list_expanded, no_ip_extcommunity_list_expanded_cmd, - "no ip extcommunity-list <100-500> (deny|permit) .LINE", + "no ip extcommunity-list (100-500) .LINE", NO_STR IP_STR EXTCOMMUNITY_LIST_STR @@ -16498,7 +16498,7 @@ DEFUN (no_ip_extcommunity_list_expanded, DEFUN (no_ip_extcommunity_list_name_standard, no_ip_extcommunity_list_name_standard_cmd, - "no ip extcommunity-list standard WORD (deny|permit) .AA:NN", + "no ip extcommunity-list standard WORD .AA:NN", NO_STR IP_STR EXTCOMMUNITY_LIST_STR @@ -16513,7 +16513,7 @@ DEFUN (no_ip_extcommunity_list_name_standard, DEFUN (no_ip_extcommunity_list_name_standard_brief, no_ip_extcommunity_list_name_standard_brief_cmd, - "no ip extcommunity-list standard WORD (deny|permit)", + "no ip extcommunity-list standard WORD ", NO_STR IP_STR EXTCOMMUNITY_LIST_STR @@ -16527,7 +16527,7 @@ DEFUN (no_ip_extcommunity_list_name_standard_brief, DEFUN (no_ip_extcommunity_list_name_expanded, no_ip_extcommunity_list_name_expanded_cmd, - "no ip extcommunity-list expanded WORD (deny|permit) .LINE", + "no ip extcommunity-list expanded WORD .LINE", NO_STR IP_STR EXTCOMMUNITY_LIST_STR @@ -16597,7 +16597,7 @@ DEFUN (show_ip_extcommunity_list, DEFUN (show_ip_extcommunity_list_arg, show_ip_extcommunity_list_arg_cmd, - "show ip extcommunity-list (<1-500>|WORD)", + "show ip extcommunity-list <(1-500)|WORD>", SHOW_STR IP_STR "List extended-community list\n" diff --git a/isisd/isis_redist.c b/isisd/isis_redist.c index cf598cd5d..62b057eab 100644 --- a/isisd/isis_redist.c +++ b/isisd/isis_redist.c @@ -539,7 +539,7 @@ isis_redist_area_finish(struct isis_area *area) DEFUN (isis_redistribute, isis_redistribute_cmd, - "redistribute (ipv4|ipv6) " QUAGGA_REDIST_STR_ISISD " (level-1|level-2) {metric <0-16777215>|route-map WORD}", + "redistribute " QUAGGA_REDIST_STR_ISISD " [metric (0-16777215)|route-map WORD]", REDIST_STR "Redistribute IPv4 routes\n" "Redistribute IPv6 routes\n" @@ -607,7 +607,7 @@ DEFUN (isis_redistribute, DEFUN (no_isis_redistribute, no_isis_redistribute_cmd, - "no redistribute (ipv4|ipv6) " QUAGGA_REDIST_STR_ISISD " (level-1|level-2)", + "no redistribute " QUAGGA_REDIST_STR_ISISD " ", NO_STR REDIST_STR "Redistribute IPv4 routes\n" @@ -650,7 +650,7 @@ DEFUN (no_isis_redistribute, DEFUN (isis_default_originate, isis_default_originate_cmd, - "default-information originate (ipv4|ipv6) (level-1|level-2) {always|metric <0-16777215>|route-map WORD}", + "default-information originate [always|metric (0-16777215)|route-map WORD]", "Control distribution of default information\n" "Distribute a default route\n" "Distribute default route for IPv4\n" @@ -721,7 +721,7 @@ DEFUN (isis_default_originate, DEFUN (no_isis_default_originate, no_isis_default_originate_cmd, - "no default-information originate (ipv4|ipv6) (level-1|level-2)", + "no default-information originate ", NO_STR "Control distribution of default information\n" "Distribute a default route\n" diff --git a/isisd/isis_routemap.c b/isisd/isis_routemap.c index 35781ef2c..fd6bff848 100644 --- a/isisd/isis_routemap.c +++ b/isisd/isis_routemap.c @@ -346,7 +346,7 @@ isis_route_set_delete (struct vty *vty, struct route_map_index *index, DEFUN (match_ip_address, match_ip_address_cmd, - "match ip address (<1-199>|<1300-2699>|WORD)", + "match ip address <(1-199)|(1300-2699)|WORD>", MATCH_STR IP_STR "Match address of route\n" @@ -368,7 +368,7 @@ DEFUN (match_ip_address, */ DEFUN (no_match_ip_address, no_match_ip_address_val_cmd, - "no match ip address (<1-199>|<1300-2699>|WORD)", + "no match ip address <(1-199)|(1300-2699)|WORD>", NO_STR MATCH_STR IP_STR @@ -507,7 +507,7 @@ DEFUN (no_match_ipv6_address_prefix_list, * verify that the input is a valid isis metric */ DEFUN (set_metric, set_metric_cmd, - "set metric <0-4294967295>", + "set metric (0-4294967295)", SET_STR "Metric vale for destination routing protocol\n" "Metric value\n") @@ -528,7 +528,7 @@ DEFUN (set_metric, */ DEFUN (no_set_metric, no_set_metric_val_cmd, - "no set metric <0-4294967295>", + "no set metric (0-4294967295)", NO_STR SET_STR "Metric value for destination routing protocol\n" diff --git a/isisd/isis_te.c b/isisd/isis_te.c index 0a327c754..b958f0a21 100644 --- a/isisd/isis_te.c +++ b/isisd/isis_te.c @@ -1190,7 +1190,7 @@ DEFUN (isis_mpls_te_router_addr, DEFUN (isis_mpls_te_inter_as, isis_mpls_te_inter_as_cmd, - "mpls-te inter-as (level-1|level-1-2|level-2-only)", + "mpls-te inter-as ", MPLS_TE_STR "Configure MPLS-TE Inter-AS support\n" "AREA native mode self originate INTER-AS LSP with L1 only flooding scope)\n" diff --git a/isisd/isis_vty.c b/isisd/isis_vty.c index b0976177f..a3890a595 100644 --- a/isisd/isis_vty.c +++ b/isisd/isis_vty.c @@ -55,7 +55,7 @@ isis_circuit_lookup (struct vty *vty) DEFUN (ip_router_isis, ip_router_isis_cmd, - "(ip|ipv6) router isis WORD", + " router isis WORD", "Interface Internet Protocol config commands\n" "IP router interface commands\n" "IS-IS Routing for IP\n" @@ -108,7 +108,7 @@ DEFUN (ip_router_isis, DEFUN (no_ip_router_isis, no_ip_router_isis_cmd, - "no (ip|ipv6) router isis WORD", + "no router isis WORD", NO_STR "Interface Internet Protocol config commands\n" "IP router interface commands\n" @@ -192,7 +192,7 @@ DEFUN (no_isis_passive, DEFUN (isis_circuit_type, isis_circuit_type_cmd, - "isis circuit-type (level-1|level-1-2|level-2-only)", + "isis circuit-type ", "IS-IS commands\n" "Configure circuit type for interface\n" "Level-1 only adjacencies are formed\n" @@ -226,7 +226,7 @@ DEFUN (isis_circuit_type, DEFUN (no_isis_circuit_type, no_isis_circuit_type_cmd, - "no isis circuit-type (level-1|level-1-2|level-2-only)", + "no isis circuit-type ", NO_STR "IS-IS commands\n" "Configure circuit type for interface\n" @@ -298,7 +298,7 @@ DEFUN (no_isis_network, DEFUN (isis_passwd, isis_passwd_cmd, - "isis password (md5|clear) WORD", + "isis password WORD", "IS-IS commands\n" "Configure the authentication password for a circuit\n" "HMAC-MD5 authentication\n" @@ -353,7 +353,7 @@ DEFUN (no_isis_passwd, DEFUN (isis_priority, isis_priority_cmd, - "isis priority <0-127>", + "isis priority (0-127)", "IS-IS commands\n" "Set priority for Designated Router election\n" "Priority value\n") @@ -406,7 +406,7 @@ DEFUN (no_isis_priority, DEFUN (isis_priority_l1, isis_priority_l1_cmd, - "isis priority <0-127> level-1", + "isis priority (0-127) level-1", "IS-IS commands\n" "Set priority for Designated Router election\n" "Priority value\n" @@ -460,7 +460,7 @@ DEFUN (no_isis_priority_l1, DEFUN (isis_priority_l2, isis_priority_l2_cmd, - "isis priority <0-127> level-2", + "isis priority (0-127) level-2", "IS-IS commands\n" "Set priority for Designated Router election\n" "Priority value\n" @@ -515,7 +515,7 @@ DEFUN (no_isis_priority_l2, /* Metric command */ DEFUN (isis_metric, isis_metric_cmd, - "isis metric <0-16777215>", + "isis metric (0-16777215)", "IS-IS commands\n" "Set default metric for circuit\n" "Default metric value\n") @@ -580,7 +580,7 @@ DEFUN (no_isis_metric, DEFUN (isis_metric_l1, isis_metric_l1_cmd, - "isis metric <0-16777215> level-1", + "isis metric (0-16777215) level-1", "IS-IS commands\n" "Set default metric for circuit\n" "Default metric value\n" @@ -646,7 +646,7 @@ DEFUN (no_isis_metric_l1, DEFUN (isis_metric_l2, isis_metric_l2_cmd, - "isis metric <0-16777215> level-2", + "isis metric (0-16777215) level-2", "IS-IS commands\n" "Set default metric for circuit\n" "Default metric value\n" @@ -713,7 +713,7 @@ DEFUN (no_isis_metric_l2, DEFUN (isis_hello_interval, isis_hello_interval_cmd, - "isis hello-interval <1-600>", + "isis hello-interval (1-600)", "IS-IS commands\n" "Set Hello interval\n" "Hello interval value\n" @@ -768,7 +768,7 @@ DEFUN (no_isis_hello_interval, DEFUN (isis_hello_interval_l1, isis_hello_interval_l1_cmd, - "isis hello-interval <1-600> level-1", + "isis hello-interval (1-600) level-1", "IS-IS commands\n" "Set Hello interval\n" "Hello interval value\n" @@ -824,7 +824,7 @@ DEFUN (no_isis_hello_interval_l1, DEFUN (isis_hello_interval_l2, isis_hello_interval_l2_cmd, - "isis hello-interval <1-600> level-2", + "isis hello-interval (1-600) level-2", "IS-IS commands\n" "Set Hello interval\n" "Hello interval value\n" @@ -880,7 +880,7 @@ DEFUN (no_isis_hello_interval_l2, DEFUN (isis_hello_multiplier, isis_hello_multiplier_cmd, - "isis hello-multiplier <2-100>", + "isis hello-multiplier (2-100)", "IS-IS commands\n" "Set multiplier for Hello holding time\n" "Hello multiplier value\n") @@ -933,7 +933,7 @@ DEFUN (no_isis_hello_multiplier, DEFUN (isis_hello_multiplier_l1, isis_hello_multiplier_l1_cmd, - "isis hello-multiplier <2-100> level-1", + "isis hello-multiplier (2-100) level-1", "IS-IS commands\n" "Set multiplier for Hello holding time\n" "Hello multiplier value\n" @@ -987,7 +987,7 @@ DEFUN (no_isis_hello_multiplier_l1, DEFUN (isis_hello_multiplier_l2, isis_hello_multiplier_l2_cmd, - "isis hello-multiplier <2-100> level-2", + "isis hello-multiplier (2-100) level-2", "IS-IS commands\n" "Set multiplier for Hello holding time\n" "Hello multiplier value\n" @@ -1076,7 +1076,7 @@ DEFUN (no_isis_hello_padding, DEFUN (csnp_interval, csnp_interval_cmd, - "isis csnp-interval <1-600>", + "isis csnp-interval (1-600)", "IS-IS commands\n" "Set CSNP interval in seconds\n" "CSNP interval value\n") @@ -1129,7 +1129,7 @@ DEFUN (no_csnp_interval, DEFUN (csnp_interval_l1, csnp_interval_l1_cmd, - "isis csnp-interval <1-600> level-1", + "isis csnp-interval (1-600) level-1", "IS-IS commands\n" "Set CSNP interval in seconds\n" "CSNP interval value\n" @@ -1183,7 +1183,7 @@ DEFUN (no_csnp_interval_l1, DEFUN (csnp_interval_l2, csnp_interval_l2_cmd, - "isis csnp-interval <1-600> level-2", + "isis csnp-interval (1-600) level-2", "IS-IS commands\n" "Set CSNP interval in seconds\n" "CSNP interval value\n" @@ -1237,7 +1237,7 @@ DEFUN (no_csnp_interval_l2, DEFUN (psnp_interval, psnp_interval_cmd, - "isis psnp-interval <1-120>", + "isis psnp-interval (1-120)", "IS-IS commands\n" "Set PSNP interval in seconds\n" "PSNP interval value\n") @@ -1290,7 +1290,7 @@ DEFUN (no_psnp_interval, DEFUN (psnp_interval_l1, psnp_interval_l1_cmd, - "isis psnp-interval <1-120> level-1", + "isis psnp-interval (1-120) level-1", "IS-IS commands\n" "Set PSNP interval in seconds\n" "PSNP interval value\n" @@ -1344,7 +1344,7 @@ DEFUN (no_psnp_interval_l1, DEFUN (psnp_interval_l2, psnp_interval_l2_cmd, - "isis psnp-interval <1-120> level-2", + "isis psnp-interval (1-120) level-2", "IS-IS commands\n" "Set PSNP interval in seconds\n" "PSNP interval value\n" @@ -1436,7 +1436,7 @@ validate_metric_style_narrow (struct vty *vty, struct isis_area *area) DEFUN (metric_style, metric_style_cmd, - "metric-style (narrow|transition|wide)", + "metric-style ", "Use old-style (ISO 10589) or new-style packet formats\n" "Use old style of TLVs with narrow metric\n" "Send and accept both styles of TLVs during transition\n" @@ -1593,7 +1593,7 @@ static int area_lsp_mtu_set(struct vty *vty, unsigned int lsp_mtu) DEFUN (area_lsp_mtu, area_lsp_mtu_cmd, - "lsp-mtu <128-4352>", + "lsp-mtu (128-4352)", "Configure the maximum size of generated LSPs\n" "Maximum size of generated LSPs\n") { @@ -1624,7 +1624,7 @@ DEFUN (no_area_lsp_mtu, DEFUN (is_type, is_type_cmd, - "is-type (level-1|level-1-2|level-2-only)", + "is-type ", "IS Level for this routing process (OSI only)\n" "Act as a station router only\n" "Act as both a station router and an area router\n" @@ -1655,7 +1655,7 @@ DEFUN (is_type, DEFUN (no_is_type, no_is_type_cmd, - "no is-type (level-1|level-1-2|level-2-only)", + "no is-type ", NO_STR "IS Level for this routing process (OSI only)\n" "Act as a station router only\n" @@ -1715,7 +1715,7 @@ set_lsp_gen_interval (struct vty *vty, struct isis_area *area, DEFUN (lsp_gen_interval, lsp_gen_interval_cmd, - "lsp-gen-interval <1-120>", + "lsp-gen-interval (1-120)", "Minimum interval between regenerating same LSP\n" "Minimum interval in seconds\n") { @@ -1756,7 +1756,7 @@ DEFUN (no_lsp_gen_interval, DEFUN (lsp_gen_interval_l1, lsp_gen_interval_l1_cmd, - "lsp-gen-interval level-1 <1-120>", + "lsp-gen-interval level-1 (1-120)", "Minimum interval between regenerating same LSP\n" "Set interval for level 1 only\n" "Minimum interval in seconds\n") @@ -1800,7 +1800,7 @@ DEFUN (no_lsp_gen_interval_l1, DEFUN (lsp_gen_interval_l2, lsp_gen_interval_l2_cmd, - "lsp-gen-interval level-2 <1-120>", + "lsp-gen-interval level-2 (1-120)", "Minimum interval between regenerating same LSP\n" "Set interval for level 2 only\n" "Minimum interval in seconds\n") @@ -1844,7 +1844,7 @@ DEFUN (no_lsp_gen_interval_l2, DEFUN (spf_interval, spf_interval_cmd, - "spf-interval <1-120>", + "spf-interval (1-120)", "Minimum interval between SPF calculations\n" "Minimum interval between consecutive SPFs in seconds\n") { @@ -1898,7 +1898,7 @@ DEFUN (no_spf_interval, DEFUN (spf_interval_l1, spf_interval_l1_cmd, - "spf-interval level-1 <1-120>", + "spf-interval level-1 (1-120)", "Minimum interval between SPF calculations\n" "Set interval for level 1 only\n" "Minimum interval between consecutive SPFs in seconds\n") @@ -1932,7 +1932,7 @@ DEFUN (no_spf_interval_l1, DEFUN (spf_interval_l2, spf_interval_l2_cmd, - "spf-interval level-2 <1-120>", + "spf-interval level-2 (1-120)", "Minimum interval between SPF calculations\n" "Set interval for level 2 only\n" "Minimum interval between consecutive SPFs in seconds\n") @@ -2018,7 +2018,7 @@ area_max_lsp_lifetime_set(struct vty *vty, int level, DEFUN (max_lsp_lifetime, max_lsp_lifetime_cmd, - "max-lsp-lifetime <350-65535>", + "max-lsp-lifetime (350-65535)", "Maximum LSP lifetime\n" "LSP lifetime in seconds\n") { @@ -2046,7 +2046,7 @@ DEFUN (no_max_lsp_lifetime, DEFUN (max_lsp_lifetime_l1, max_lsp_lifetime_l1_cmd, - "max-lsp-lifetime level-1 <350-65535>", + "max-lsp-lifetime level-1 (350-65535)", "Maximum LSP lifetime for Level 1 only\n" "LSP lifetime for Level 1 only in seconds\n") { @@ -2073,7 +2073,7 @@ DEFUN (no_max_lsp_lifetime_l1, DEFUN (max_lsp_lifetime_l2, max_lsp_lifetime_l2_cmd, - "max-lsp-lifetime level-2 <350-65535>", + "max-lsp-lifetime level-2 (350-65535)", "Maximum LSP lifetime for Level 2 only\n" "LSP lifetime for Level 2 only in seconds\n") { @@ -2144,7 +2144,7 @@ area_lsp_refresh_interval_set(struct vty *vty, int level, uint16_t interval) DEFUN (lsp_refresh_interval, lsp_refresh_interval_cmd, - "lsp-refresh-interval <1-65235>", + "lsp-refresh-interval (1-65235)", "LSP refresh interval\n" "LSP refresh interval in seconds\n") { @@ -2172,7 +2172,7 @@ DEFUN (no_lsp_refresh_interval, DEFUN (lsp_refresh_interval_l1, lsp_refresh_interval_l1_cmd, - "lsp-refresh-interval level-1 <1-65235>", + "lsp-refresh-interval level-1 (1-65235)", "LSP refresh interval for Level 1 only\n" "LSP refresh interval for Level 1 only in seconds\n") { @@ -2200,7 +2200,7 @@ DEFUN (no_lsp_refresh_interval_l1, DEFUN (lsp_refresh_interval_l2, lsp_refresh_interval_l2_cmd, - "lsp-refresh-interval level-2 <1-65235>", + "lsp-refresh-interval level-2 (1-65235)", "LSP refresh interval for Level 2 only\n" "LSP refresh interval for Level 2 only in seconds\n") { @@ -2265,7 +2265,7 @@ area_passwd_set(struct vty *vty, int level, */ DEFUN (area_passwd_md5, area_passwd_md5_cmd, - "(area-password|domain-password) md5 WORD", + " md5 WORD", "Configure the authentication password for an area\n" "Set the authentication password for a routing domain\n" "Authentication type\n" @@ -2301,7 +2301,7 @@ DEFUN (area_passwd_md5, */ DEFUN (area_passwd_clear, area_passwd_clear_cmd, - "(area-password|domain-password) clear WORD", + " clear WORD", "Configure the authentication password for an area\n" "Set the authentication password for a routing domain\n" "Authentication type\n" @@ -2324,7 +2324,7 @@ DEFUN (area_passwd_clear, DEFUN (no_area_passwd, no_area_passwd_cmd, - "no (area-password|domain-password)", + "no ", NO_STR "Configure the authentication password for an area\n" "Set the authentication password for a routing domain\n") diff --git a/isisd/isisd.c b/isisd/isisd.c index bfee7a810..263fa63a3 100644 --- a/isisd/isisd.c +++ b/isisd/isisd.c @@ -1896,7 +1896,7 @@ DEFUN (no_log_adj_changes, DEFUN (topology_generate_grid, topology_generate_grid_cmd, - "topology generate grid <1-100> <1-100> <1-65000> [param] [param] [param]", + "topology generate grid (1-100) (1-100) (1-65000) [param] [param] [param]", "Topology generation for IS-IS\n" "Topology generation\n" "Grid topology\n" diff --git a/lib/command.c b/lib/command.c index b676b0c9d..7cc2c3b23 100644 --- a/lib/command.c +++ b/lib/command.c @@ -1869,7 +1869,7 @@ DEFUN_DEPRECATED (config_log_syslog_facility, DEFUN (no_config_log_syslog, no_config_log_syslog_cmd, - "no log syslog [" LOG_FACILITIES "] ["LOG_LEVELS"]", + "no log syslog [" LOG_FACILITIES "] [" LOG_LEVELS "]", NO_STR "Logging control\n" "Cancel logging to syslog\n" @@ -1882,7 +1882,7 @@ DEFUN (no_config_log_syslog, DEFUN (config_log_facility, config_log_facility_cmd, - "log facility "LOG_FACILITIES, + "log facility " LOG_FACILITIES, "Logging control\n" "Facility parameter for syslog messages\n" LOG_FACILITY_DESC) @@ -1895,7 +1895,7 @@ DEFUN (config_log_facility, DEFUN (no_config_log_facility, no_config_log_facility_cmd, - "no log facility ["LOG_FACILITIES"]", + "no log facility [" LOG_FACILITIES "]", NO_STR "Logging control\n" "Reset syslog facility to default (daemon)\n" @@ -1907,7 +1907,7 @@ DEFUN (no_config_log_facility, DEFUN_DEPRECATED (config_log_trap, config_log_trap_cmd, - "log trap "LOG_LEVELS, + "log trap " LOG_LEVELS, "Logging control\n" "(Deprecated) Set logging level and default for all destinations\n" LOG_LEVEL_DESC) @@ -1927,7 +1927,7 @@ DEFUN_DEPRECATED (config_log_trap, DEFUN_DEPRECATED (no_config_log_trap, no_config_log_trap_cmd, - "no log trap ["LOG_LEVELS"]", + "no log trap [" LOG_LEVELS "]", NO_STR "Logging control\n" "Permit all logging information\n" @@ -1960,7 +1960,7 @@ DEFUN (no_config_log_record_priority, DEFUN (config_log_timestamp_precision, config_log_timestamp_precision_cmd, - "log timestamp precision <0-6>", + "log timestamp precision (0-6)", "Logging control\n" "Timestamp configuration\n" "Set the timestamp precision\n" diff --git a/lib/filter.c b/lib/filter.c index dee752f22..a25c8cdc9 100644 --- a/lib/filter.c +++ b/lib/filter.c @@ -704,7 +704,7 @@ filter_set_cisco (struct vty *vty, const char *name_str, const char *type_str, /* Standard access-list */ DEFUN (access_list_standard, access_list_standard_cmd, - "access-list (<1-99>|<1300-1999>) (deny|permit) A.B.C.D A.B.C.D", + "access-list <(1-99)|(1300-1999)> A.B.C.D A.B.C.D", "Add an access list entry\n" "IP standard access list\n" "IP standard access list (expanded range)\n" @@ -719,7 +719,7 @@ DEFUN (access_list_standard, DEFUN (access_list_standard_nomask, access_list_standard_nomask_cmd, - "access-list (<1-99>|<1300-1999>) (deny|permit) A.B.C.D", + "access-list <(1-99)|(1300-1999)> A.B.C.D", "Add an access list entry\n" "IP standard access list\n" "IP standard access list (expanded range)\n" @@ -733,7 +733,7 @@ DEFUN (access_list_standard_nomask, DEFUN (access_list_standard_host, access_list_standard_host_cmd, - "access-list (<1-99>|<1300-1999>) (deny|permit) host A.B.C.D", + "access-list <(1-99)|(1300-1999)> host A.B.C.D", "Add an access list entry\n" "IP standard access list\n" "IP standard access list (expanded range)\n" @@ -748,7 +748,7 @@ DEFUN (access_list_standard_host, DEFUN (access_list_standard_any, access_list_standard_any_cmd, - "access-list (<1-99>|<1300-1999>) (deny|permit) any", + "access-list <(1-99)|(1300-1999)> any", "Add an access list entry\n" "IP standard access list\n" "IP standard access list (expanded range)\n" @@ -762,7 +762,7 @@ DEFUN (access_list_standard_any, DEFUN (no_access_list_standard, no_access_list_standard_cmd, - "no access-list (<1-99>|<1300-1999>) (deny|permit) A.B.C.D A.B.C.D", + "no access-list <(1-99)|(1300-1999)> A.B.C.D A.B.C.D", NO_STR "Add an access list entry\n" "IP standard access list\n" @@ -778,7 +778,7 @@ DEFUN (no_access_list_standard, DEFUN (no_access_list_standard_nomask, no_access_list_standard_nomask_cmd, - "no access-list (<1-99>|<1300-1999>) (deny|permit) A.B.C.D", + "no access-list <(1-99)|(1300-1999)> A.B.C.D", NO_STR "Add an access list entry\n" "IP standard access list\n" @@ -793,7 +793,7 @@ DEFUN (no_access_list_standard_nomask, DEFUN (no_access_list_standard_host, no_access_list_standard_host_cmd, - "no access-list (<1-99>|<1300-1999>) (deny|permit) host A.B.C.D", + "no access-list <(1-99)|(1300-1999)> host A.B.C.D", NO_STR "Add an access list entry\n" "IP standard access list\n" @@ -809,7 +809,7 @@ DEFUN (no_access_list_standard_host, DEFUN (no_access_list_standard_any, no_access_list_standard_any_cmd, - "no access-list (<1-99>|<1300-1999>) (deny|permit) any", + "no access-list <(1-99)|(1300-1999)> any", NO_STR "Add an access list entry\n" "IP standard access list\n" @@ -825,7 +825,7 @@ DEFUN (no_access_list_standard_any, /* Extended access-list */ DEFUN (access_list_extended, access_list_extended_cmd, - "access-list (<100-199>|<2000-2699>) (deny|permit) ip A.B.C.D A.B.C.D A.B.C.D A.B.C.D", + "access-list <(100-199)|(2000-2699)> ip A.B.C.D A.B.C.D A.B.C.D A.B.C.D", "Add an access list entry\n" "IP extended access list\n" "IP extended access list (expanded range)\n" @@ -843,7 +843,7 @@ DEFUN (access_list_extended, DEFUN (access_list_extended_mask_any, access_list_extended_mask_any_cmd, - "access-list (<100-199>|<2000-2699>) (deny|permit) ip A.B.C.D A.B.C.D any", + "access-list <(100-199)|(2000-2699)> ip A.B.C.D A.B.C.D any", "Add an access list entry\n" "IP extended access list\n" "IP extended access list (expanded range)\n" @@ -861,7 +861,7 @@ DEFUN (access_list_extended_mask_any, DEFUN (access_list_extended_any_mask, access_list_extended_any_mask_cmd, - "access-list (<100-199>|<2000-2699>) (deny|permit) ip any A.B.C.D A.B.C.D", + "access-list <(100-199)|(2000-2699)> ip any A.B.C.D A.B.C.D", "Add an access list entry\n" "IP extended access list\n" "IP extended access list (expanded range)\n" @@ -879,7 +879,7 @@ DEFUN (access_list_extended_any_mask, DEFUN (access_list_extended_any_any, access_list_extended_any_any_cmd, - "access-list (<100-199>|<2000-2699>) (deny|permit) ip any any", + "access-list <(100-199)|(2000-2699)> ip any any", "Add an access list entry\n" "IP extended access list\n" "IP extended access list (expanded range)\n" @@ -896,7 +896,7 @@ DEFUN (access_list_extended_any_any, DEFUN (access_list_extended_mask_host, access_list_extended_mask_host_cmd, - "access-list (<100-199>|<2000-2699>) (deny|permit) ip A.B.C.D A.B.C.D host A.B.C.D", + "access-list <(100-199)|(2000-2699)> ip A.B.C.D A.B.C.D host A.B.C.D", "Add an access list entry\n" "IP extended access list\n" "IP extended access list (expanded range)\n" @@ -915,7 +915,7 @@ DEFUN (access_list_extended_mask_host, DEFUN (access_list_extended_host_mask, access_list_extended_host_mask_cmd, - "access-list (<100-199>|<2000-2699>) (deny|permit) ip host A.B.C.D A.B.C.D A.B.C.D", + "access-list <(100-199)|(2000-2699)> ip host A.B.C.D A.B.C.D A.B.C.D", "Add an access list entry\n" "IP extended access list\n" "IP extended access list (expanded range)\n" @@ -934,7 +934,7 @@ DEFUN (access_list_extended_host_mask, DEFUN (access_list_extended_host_host, access_list_extended_host_host_cmd, - "access-list (<100-199>|<2000-2699>) (deny|permit) ip host A.B.C.D host A.B.C.D", + "access-list <(100-199)|(2000-2699)> ip host A.B.C.D host A.B.C.D", "Add an access list entry\n" "IP extended access list\n" "IP extended access list (expanded range)\n" @@ -953,7 +953,7 @@ DEFUN (access_list_extended_host_host, DEFUN (access_list_extended_any_host, access_list_extended_any_host_cmd, - "access-list (<100-199>|<2000-2699>) (deny|permit) ip any host A.B.C.D", + "access-list <(100-199)|(2000-2699)> ip any host A.B.C.D", "Add an access list entry\n" "IP extended access list\n" "IP extended access list (expanded range)\n" @@ -971,7 +971,7 @@ DEFUN (access_list_extended_any_host, DEFUN (access_list_extended_host_any, access_list_extended_host_any_cmd, - "access-list (<100-199>|<2000-2699>) (deny|permit) ip host A.B.C.D any", + "access-list <(100-199)|(2000-2699)> ip host A.B.C.D any", "Add an access list entry\n" "IP extended access list\n" "IP extended access list (expanded range)\n" @@ -989,7 +989,7 @@ DEFUN (access_list_extended_host_any, DEFUN (no_access_list_extended, no_access_list_extended_cmd, - "no access-list (<100-199>|<2000-2699>) (deny|permit) ip A.B.C.D A.B.C.D A.B.C.D A.B.C.D", + "no access-list <(100-199)|(2000-2699)> ip A.B.C.D A.B.C.D A.B.C.D A.B.C.D", NO_STR "Add an access list entry\n" "IP extended access list\n" @@ -1008,7 +1008,7 @@ DEFUN (no_access_list_extended, DEFUN (no_access_list_extended_mask_any, no_access_list_extended_mask_any_cmd, - "no access-list (<100-199>|<2000-2699>) (deny|permit) ip A.B.C.D A.B.C.D any", + "no access-list <(100-199)|(2000-2699)> ip A.B.C.D A.B.C.D any", NO_STR "Add an access list entry\n" "IP extended access list\n" @@ -1027,7 +1027,7 @@ DEFUN (no_access_list_extended_mask_any, DEFUN (no_access_list_extended_any_mask, no_access_list_extended_any_mask_cmd, - "no access-list (<100-199>|<2000-2699>) (deny|permit) ip any A.B.C.D A.B.C.D", + "no access-list <(100-199)|(2000-2699)> ip any A.B.C.D A.B.C.D", NO_STR "Add an access list entry\n" "IP extended access list\n" @@ -1046,7 +1046,7 @@ DEFUN (no_access_list_extended_any_mask, DEFUN (no_access_list_extended_any_any, no_access_list_extended_any_any_cmd, - "no access-list (<100-199>|<2000-2699>) (deny|permit) ip any any", + "no access-list <(100-199)|(2000-2699)> ip any any", NO_STR "Add an access list entry\n" "IP extended access list\n" @@ -1064,7 +1064,7 @@ DEFUN (no_access_list_extended_any_any, DEFUN (no_access_list_extended_mask_host, no_access_list_extended_mask_host_cmd, - "no access-list (<100-199>|<2000-2699>) (deny|permit) ip A.B.C.D A.B.C.D host A.B.C.D", + "no access-list <(100-199)|(2000-2699)> ip A.B.C.D A.B.C.D host A.B.C.D", NO_STR "Add an access list entry\n" "IP extended access list\n" @@ -1084,7 +1084,7 @@ DEFUN (no_access_list_extended_mask_host, DEFUN (no_access_list_extended_host_mask, no_access_list_extended_host_mask_cmd, - "no access-list (<100-199>|<2000-2699>) (deny|permit) ip host A.B.C.D A.B.C.D A.B.C.D", + "no access-list <(100-199)|(2000-2699)> ip host A.B.C.D A.B.C.D A.B.C.D", NO_STR "Add an access list entry\n" "IP extended access list\n" @@ -1104,7 +1104,7 @@ DEFUN (no_access_list_extended_host_mask, DEFUN (no_access_list_extended_host_host, no_access_list_extended_host_host_cmd, - "no access-list (<100-199>|<2000-2699>) (deny|permit) ip host A.B.C.D host A.B.C.D", + "no access-list <(100-199)|(2000-2699)> ip host A.B.C.D host A.B.C.D", NO_STR "Add an access list entry\n" "IP extended access list\n" @@ -1124,7 +1124,7 @@ DEFUN (no_access_list_extended_host_host, DEFUN (no_access_list_extended_any_host, no_access_list_extended_any_host_cmd, - "no access-list (<100-199>|<2000-2699>) (deny|permit) ip any host A.B.C.D", + "no access-list <(100-199)|(2000-2699)> ip any host A.B.C.D", NO_STR "Add an access list entry\n" "IP extended access list\n" @@ -1143,7 +1143,7 @@ DEFUN (no_access_list_extended_any_host, DEFUN (no_access_list_extended_host_any, no_access_list_extended_host_any_cmd, - "no access-list (<100-199>|<2000-2699>) (deny|permit) ip host A.B.C.D any", + "no access-list <(100-199)|(2000-2699)> ip host A.B.C.D any", NO_STR "Add an access list entry\n" "IP extended access list\n" @@ -1244,7 +1244,7 @@ filter_set_zebra (struct vty *vty, const char *name_str, const char *type_str, /* Zebra access-list */ DEFUN (access_list, access_list_cmd, - "access-list WORD (deny|permit) A.B.C.D/M", + "access-list WORD A.B.C.D/M", "Add an access list entry\n" "IP zebra access-list name\n" "Specify packets to reject\n" @@ -1256,7 +1256,7 @@ DEFUN (access_list, DEFUN (access_list_exact, access_list_exact_cmd, - "access-list WORD (deny|permit) A.B.C.D/M exact-match", + "access-list WORD A.B.C.D/M exact-match", "Add an access list entry\n" "IP zebra access-list name\n" "Specify packets to reject\n" @@ -1269,7 +1269,7 @@ DEFUN (access_list_exact, DEFUN (access_list_any, access_list_any_cmd, - "access-list WORD (deny|permit) any", + "access-list WORD any", "Add an access list entry\n" "IP zebra access-list name\n" "Specify packets to reject\n" @@ -1281,7 +1281,7 @@ DEFUN (access_list_any, DEFUN (no_access_list, no_access_list_cmd, - "no access-list WORD (deny|permit) A.B.C.D/M", + "no access-list WORD A.B.C.D/M", NO_STR "Add an access list entry\n" "IP zebra access-list name\n" @@ -1294,7 +1294,7 @@ DEFUN (no_access_list, DEFUN (no_access_list_exact, no_access_list_exact_cmd, - "no access-list WORD (deny|permit) A.B.C.D/M exact-match", + "no access-list WORD A.B.C.D/M exact-match", NO_STR "Add an access list entry\n" "IP zebra access-list name\n" @@ -1308,7 +1308,7 @@ DEFUN (no_access_list_exact, DEFUN (no_access_list_any, no_access_list_any_cmd, - "no access-list WORD (deny|permit) any", + "no access-list WORD any", NO_STR "Add an access list entry\n" "IP zebra access-list name\n" @@ -1321,7 +1321,7 @@ DEFUN (no_access_list_any, DEFUN (no_access_list_all, no_access_list_all_cmd, - "no access-list (<1-99>|<100-199>|<1300-1999>|<2000-2699>|WORD)", + "no access-list <(1-99)|(100-199)|(1300-1999)|(2000-2699)|WORD>", NO_STR "Add an access list entry\n" "IP standard access list\n" @@ -1357,7 +1357,7 @@ DEFUN (no_access_list_all, DEFUN (access_list_remark, access_list_remark_cmd, - "access-list (<1-99>|<100-199>|<1300-1999>|<2000-2699>|WORD) remark .LINE", + "access-list <(1-99)|(100-199)|(1300-1999)|(2000-2699)|WORD> remark .LINE", "Add an access list entry\n" "IP standard access list\n" "IP extended access list\n" @@ -1397,7 +1397,7 @@ DEFUN (access_list_remark, */ DEFUN (no_access_list_remark, no_access_list_remark_cmd, - "no access-list (<1-99>|<100-199>|<1300-1999>|<2000-2699>|WORD) remark", + "no access-list <(1-99)|(100-199)|(1300-1999)|(2000-2699)|WORD> remark", NO_STR "Add an access list entry\n" "IP standard access list\n" @@ -1414,7 +1414,7 @@ DEFUN (no_access_list_remark, #ifdef HAVE_IPV6 DEFUN (ipv6_access_list, ipv6_access_list_cmd, - "ipv6 access-list WORD (deny|permit) X:X::X:X/M", + "ipv6 access-list WORD X:X::X:X/M", IPV6_STR "Add an access list entry\n" "IPv6 zebra access-list\n" @@ -1427,7 +1427,7 @@ DEFUN (ipv6_access_list, DEFUN (ipv6_access_list_exact, ipv6_access_list_exact_cmd, - "ipv6 access-list WORD (deny|permit) X:X::X:X/M exact-match", + "ipv6 access-list WORD X:X::X:X/M exact-match", IPV6_STR "Add an access list entry\n" "IPv6 zebra access-list\n" @@ -1441,7 +1441,7 @@ DEFUN (ipv6_access_list_exact, DEFUN (ipv6_access_list_any, ipv6_access_list_any_cmd, - "ipv6 access-list WORD (deny|permit) any", + "ipv6 access-list WORD any", IPV6_STR "Add an access list entry\n" "IPv6 zebra access-list\n" @@ -1454,7 +1454,7 @@ DEFUN (ipv6_access_list_any, DEFUN (no_ipv6_access_list, no_ipv6_access_list_cmd, - "no ipv6 access-list WORD (deny|permit) X:X::X:X/M", + "no ipv6 access-list WORD X:X::X:X/M", NO_STR IPV6_STR "Add an access list entry\n" @@ -1468,7 +1468,7 @@ DEFUN (no_ipv6_access_list, DEFUN (no_ipv6_access_list_exact, no_ipv6_access_list_exact_cmd, - "no ipv6 access-list WORD (deny|permit) X:X::X:X/M exact-match", + "no ipv6 access-list WORD X:X::X:X/M exact-match", NO_STR IPV6_STR "Add an access list entry\n" @@ -1483,7 +1483,7 @@ DEFUN (no_ipv6_access_list_exact, DEFUN (no_ipv6_access_list_any, no_ipv6_access_list_any_cmd, - "no ipv6 access-list WORD (deny|permit) any", + "no ipv6 access-list WORD any", NO_STR IPV6_STR "Add an access list entry\n" @@ -1699,7 +1699,7 @@ DEFUN (show_ip_access_list, DEFUN (show_ip_access_list_name, show_ip_access_list_name_cmd, - "show ip access-list (<1-99>|<100-199>|<1300-1999>|<2000-2699>|WORD)", + "show ip access-list <(1-99)|(100-199)|(1300-1999)|(2000-2699)|WORD>", SHOW_STR IP_STR "List IP access lists\n" diff --git a/lib/if.c b/lib/if.c index 646f33354..c19b8d1f8 100644 --- a/lib/if.c +++ b/lib/if.c @@ -671,7 +671,7 @@ if_dump_all (void) if_dump (p); } -DEFUN (interface_desc, +DEFUN (interface_desc, interface_desc_cmd, "description LINE...", "Interface specific description\n" @@ -690,7 +690,7 @@ DEFUN (interface_desc, return CMD_SUCCESS; } -DEFUN (no_interface_desc, +DEFUN (no_interface_desc, no_interface_desc_cmd, "no description", NO_STR diff --git a/lib/if_rmap.c b/lib/if_rmap.c index 240a03cab..abed32c9e 100644 --- a/lib/if_rmap.c +++ b/lib/if_rmap.c @@ -221,7 +221,7 @@ if_rmap_unset (const char *ifname, enum if_rmap_type type, */ DEFUN (if_rmap, if_rmap_cmd, - "route-map RMAP_NAME (in|out) IFNAME", + "route-map RMAP_NAME IFNAME", "Route map set\n" "Route map name\n" "Route map set for input filtering\n" @@ -259,7 +259,7 @@ DEFUN (if_rmap, */ DEFUN (no_if_rmap, no_if_rmap_cmd, - "no route-map ROUTEMAP_NAME (in|out) IFNAME", + "no route-map ROUTEMAP_NAME IFNAME", NO_STR "Route map unset\n" "Route map name\n" diff --git a/lib/keychain.c b/lib/keychain.c index 1997496d3..0796d81f1 100644 --- a/lib/keychain.c +++ b/lib/keychain.c @@ -271,7 +271,7 @@ DEFUN (no_key_chain, DEFUN (key, key_cmd, - "key <0-2147483647>", + "key (0-2147483647)", "Configure a key\n" "Key identifier number\n") { @@ -291,7 +291,7 @@ DEFUN (key, DEFUN (no_key, no_key_cmd, - "no key <0-2147483647>", + "no key (0-2147483647)", NO_STR "Delete a key\n" "Key identifier number\n") @@ -541,7 +541,7 @@ key_lifetime_infinite_set (struct vty *vty, struct key_range *krange, DEFUN (accept_lifetime_day_month_day_month, accept_lifetime_day_month_day_month_cmd, - "accept-lifetime HH:MM:SS <1-31> MONTH <1993-2035> HH:MM:SS <1-31> MONTH <1993-2035>", + "accept-lifetime HH:MM:SS (1-31) MONTH (1993-2035) HH:MM:SS (1-31) MONTH (1993-2035)", "Set accept lifetime of the key\n" "Time to start\n" "Day of th month to start\n" @@ -562,7 +562,7 @@ DEFUN (accept_lifetime_day_month_day_month, DEFUN (accept_lifetime_day_month_month_day, accept_lifetime_day_month_month_day_cmd, - "accept-lifetime HH:MM:SS <1-31> MONTH <1993-2035> HH:MM:SS MONTH <1-31> <1993-2035>", + "accept-lifetime HH:MM:SS (1-31) MONTH (1993-2035) HH:MM:SS MONTH (1-31) (1993-2035)", "Set accept lifetime of the key\n" "Time to start\n" "Day of th month to start\n" @@ -583,7 +583,7 @@ DEFUN (accept_lifetime_day_month_month_day, DEFUN (accept_lifetime_month_day_day_month, accept_lifetime_month_day_day_month_cmd, - "accept-lifetime HH:MM:SS MONTH <1-31> <1993-2035> HH:MM:SS <1-31> MONTH <1993-2035>", + "accept-lifetime HH:MM:SS MONTH (1-31) (1993-2035) HH:MM:SS (1-31) MONTH (1993-2035)", "Set accept lifetime of the key\n" "Time to start\n" "Month of the year to start\n" @@ -604,7 +604,7 @@ DEFUN (accept_lifetime_month_day_day_month, DEFUN (accept_lifetime_month_day_month_day, accept_lifetime_month_day_month_day_cmd, - "accept-lifetime HH:MM:SS MONTH <1-31> <1993-2035> HH:MM:SS MONTH <1-31> <1993-2035>", + "accept-lifetime HH:MM:SS MONTH (1-31) (1993-2035) HH:MM:SS MONTH (1-31) (1993-2035)", "Set accept lifetime of the key\n" "Time to start\n" "Month of the year to start\n" @@ -625,7 +625,7 @@ DEFUN (accept_lifetime_month_day_month_day, DEFUN (accept_lifetime_infinite_day_month, accept_lifetime_infinite_day_month_cmd, - "accept-lifetime HH:MM:SS <1-31> MONTH <1993-2035> infinite", + "accept-lifetime HH:MM:SS (1-31) MONTH (1993-2035) infinite", "Set accept lifetime of the key\n" "Time to start\n" "Day of th month to start\n" @@ -643,7 +643,7 @@ DEFUN (accept_lifetime_infinite_day_month, DEFUN (accept_lifetime_infinite_month_day, accept_lifetime_infinite_month_day_cmd, - "accept-lifetime HH:MM:SS MONTH <1-31> <1993-2035> infinite", + "accept-lifetime HH:MM:SS MONTH (1-31) (1993-2035) infinite", "Set accept lifetime of the key\n" "Time to start\n" "Month of the year to start\n" @@ -661,7 +661,7 @@ DEFUN (accept_lifetime_infinite_month_day, DEFUN (accept_lifetime_duration_day_month, accept_lifetime_duration_day_month_cmd, - "accept-lifetime HH:MM:SS <1-31> MONTH <1993-2035> duration <1-2147483646>", + "accept-lifetime HH:MM:SS (1-31) MONTH (1993-2035) duration (1-2147483646)", "Set accept lifetime of the key\n" "Time to start\n" "Day of th month to start\n" @@ -680,7 +680,7 @@ DEFUN (accept_lifetime_duration_day_month, DEFUN (accept_lifetime_duration_month_day, accept_lifetime_duration_month_day_cmd, - "accept-lifetime HH:MM:SS MONTH <1-31> <1993-2035> duration <1-2147483646>", + "accept-lifetime HH:MM:SS MONTH (1-31) (1993-2035) duration (1-2147483646)", "Set accept lifetime of the key\n" "Time to start\n" "Month of the year to start\n" @@ -699,7 +699,7 @@ DEFUN (accept_lifetime_duration_month_day, DEFUN (send_lifetime_day_month_day_month, send_lifetime_day_month_day_month_cmd, - "send-lifetime HH:MM:SS <1-31> MONTH <1993-2035> HH:MM:SS <1-31> MONTH <1993-2035>", + "send-lifetime HH:MM:SS (1-31) MONTH (1993-2035) HH:MM:SS (1-31) MONTH (1993-2035)", "Set send lifetime of the key\n" "Time to start\n" "Day of th month to start\n" @@ -720,7 +720,7 @@ DEFUN (send_lifetime_day_month_day_month, DEFUN (send_lifetime_day_month_month_day, send_lifetime_day_month_month_day_cmd, - "send-lifetime HH:MM:SS <1-31> MONTH <1993-2035> HH:MM:SS MONTH <1-31> <1993-2035>", + "send-lifetime HH:MM:SS (1-31) MONTH (1993-2035) HH:MM:SS MONTH (1-31) (1993-2035)", "Set send lifetime of the key\n" "Time to start\n" "Day of th month to start\n" @@ -741,7 +741,7 @@ DEFUN (send_lifetime_day_month_month_day, DEFUN (send_lifetime_month_day_day_month, send_lifetime_month_day_day_month_cmd, - "send-lifetime HH:MM:SS MONTH <1-31> <1993-2035> HH:MM:SS <1-31> MONTH <1993-2035>", + "send-lifetime HH:MM:SS MONTH (1-31) (1993-2035) HH:MM:SS (1-31) MONTH (1993-2035)", "Set send lifetime of the key\n" "Time to start\n" "Month of the year to start\n" @@ -762,7 +762,7 @@ DEFUN (send_lifetime_month_day_day_month, DEFUN (send_lifetime_month_day_month_day, send_lifetime_month_day_month_day_cmd, - "send-lifetime HH:MM:SS MONTH <1-31> <1993-2035> HH:MM:SS MONTH <1-31> <1993-2035>", + "send-lifetime HH:MM:SS MONTH (1-31) (1993-2035) HH:MM:SS MONTH (1-31) (1993-2035)", "Set send lifetime of the key\n" "Time to start\n" "Month of the year to start\n" @@ -783,7 +783,7 @@ DEFUN (send_lifetime_month_day_month_day, DEFUN (send_lifetime_infinite_day_month, send_lifetime_infinite_day_month_cmd, - "send-lifetime HH:MM:SS <1-31> MONTH <1993-2035> infinite", + "send-lifetime HH:MM:SS (1-31) MONTH (1993-2035) infinite", "Set send lifetime of the key\n" "Time to start\n" "Day of th month to start\n" @@ -801,7 +801,7 @@ DEFUN (send_lifetime_infinite_day_month, DEFUN (send_lifetime_infinite_month_day, send_lifetime_infinite_month_day_cmd, - "send-lifetime HH:MM:SS MONTH <1-31> <1993-2035> infinite", + "send-lifetime HH:MM:SS MONTH (1-31) (1993-2035) infinite", "Set send lifetime of the key\n" "Time to start\n" "Month of the year to start\n" @@ -819,7 +819,7 @@ DEFUN (send_lifetime_infinite_month_day, DEFUN (send_lifetime_duration_day_month, send_lifetime_duration_day_month_cmd, - "send-lifetime HH:MM:SS <1-31> MONTH <1993-2035> duration <1-2147483646>", + "send-lifetime HH:MM:SS (1-31) MONTH (1993-2035) duration (1-2147483646)", "Set send lifetime of the key\n" "Time to start\n" "Day of th month to start\n" @@ -838,7 +838,7 @@ DEFUN (send_lifetime_duration_day_month, DEFUN (send_lifetime_duration_month_day, send_lifetime_duration_month_day_cmd, - "send-lifetime HH:MM:SS MONTH <1-31> <1993-2035> duration <1-2147483646>", + "send-lifetime HH:MM:SS MONTH (1-31) (1993-2035) duration (1-2147483646)", "Set send lifetime of the key\n" "Time to start\n" "Month of the year to start\n" diff --git a/lib/ns.c b/lib/ns.c index 58b640651..9480546e3 100644 --- a/lib/ns.c +++ b/lib/ns.c @@ -551,7 +551,7 @@ ns_netns_pathname (struct vty *vty, const char *name) DEFUN (ns_netns, ns_netns_cmd, - "logical-router <1-65535> ns NAME", + "logical-router (1-65535) ns NAME", "Enable a logical-router\n" "Specify the logical-router indentifier\n" "The Name Space\n" @@ -589,7 +589,7 @@ DEFUN (ns_netns, DEFUN (no_ns_netns, no_ns_netns_cmd, - "no logical-router <1-65535> ns NAME", + "no logical-router (1-65535) ns NAME", NO_STR "Enable a Logical-Router\n" "Specify the Logical-Router identifier\n" diff --git a/lib/plist.c b/lib/plist.c index d874e1d02..164bc1d7e 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -1406,7 +1406,7 @@ vty_clear_prefix_list (struct vty *vty, afi_t afi, const char *name, DEFUN (ip_prefix_list, ip_prefix_list_cmd, - "ip prefix-list WORD (deny|permit) (A.B.C.D/M|any)", + "ip prefix-list WORD ", IP_STR PREFIX_LIST_STR "Name of a prefix list\n" @@ -1421,7 +1421,7 @@ DEFUN (ip_prefix_list, DEFUN (ip_prefix_list_ge, ip_prefix_list_ge_cmd, - "ip prefix-list WORD (deny|permit) A.B.C.D/M ge <0-32>", + "ip prefix-list WORD A.B.C.D/M ge (0-32)", IP_STR PREFIX_LIST_STR "Name of a prefix list\n" @@ -1437,7 +1437,7 @@ DEFUN (ip_prefix_list_ge, DEFUN (ip_prefix_list_ge_le, ip_prefix_list_ge_le_cmd, - "ip prefix-list WORD (deny|permit) A.B.C.D/M ge <0-32> le <0-32>", + "ip prefix-list WORD A.B.C.D/M ge (0-32) le (0-32)", IP_STR PREFIX_LIST_STR "Name of a prefix list\n" @@ -1455,7 +1455,7 @@ DEFUN (ip_prefix_list_ge_le, DEFUN (ip_prefix_list_le, ip_prefix_list_le_cmd, - "ip prefix-list WORD (deny|permit) A.B.C.D/M le <0-32>", + "ip prefix-list WORD A.B.C.D/M le (0-32)", IP_STR PREFIX_LIST_STR "Name of a prefix list\n" @@ -1471,7 +1471,7 @@ DEFUN (ip_prefix_list_le, DEFUN (ip_prefix_list_le_ge, ip_prefix_list_le_ge_cmd, - "ip prefix-list WORD (deny|permit) A.B.C.D/M le <0-32> ge <0-32>", + "ip prefix-list WORD A.B.C.D/M le (0-32) ge (0-32)", IP_STR PREFIX_LIST_STR "Name of a prefix list\n" @@ -1489,7 +1489,7 @@ DEFUN (ip_prefix_list_le_ge, DEFUN (ip_prefix_list_seq, ip_prefix_list_seq_cmd, - "ip prefix-list WORD seq <1-4294967295> (deny|permit) (A.B.C.D/M|any)", + "ip prefix-list WORD seq (1-4294967295) ", IP_STR PREFIX_LIST_STR "Name of a prefix list\n" @@ -1506,7 +1506,7 @@ DEFUN (ip_prefix_list_seq, DEFUN (ip_prefix_list_seq_ge, ip_prefix_list_seq_ge_cmd, - "ip prefix-list WORD seq <1-4294967295> (deny|permit) A.B.C.D/M ge <0-32>", + "ip prefix-list WORD seq (1-4294967295) A.B.C.D/M ge (0-32)", IP_STR PREFIX_LIST_STR "Name of a prefix list\n" @@ -1524,7 +1524,7 @@ DEFUN (ip_prefix_list_seq_ge, DEFUN (ip_prefix_list_seq_ge_le, ip_prefix_list_seq_ge_le_cmd, - "ip prefix-list WORD seq <1-4294967295> (deny|permit) A.B.C.D/M ge <0-32> le <0-32>", + "ip prefix-list WORD seq (1-4294967295) A.B.C.D/M ge (0-32) le (0-32)", IP_STR PREFIX_LIST_STR "Name of a prefix list\n" @@ -1544,7 +1544,7 @@ DEFUN (ip_prefix_list_seq_ge_le, DEFUN (ip_prefix_list_seq_le, ip_prefix_list_seq_le_cmd, - "ip prefix-list WORD seq <1-4294967295> (deny|permit) A.B.C.D/M le <0-32>", + "ip prefix-list WORD seq (1-4294967295) A.B.C.D/M le (0-32)", IP_STR PREFIX_LIST_STR "Name of a prefix list\n" @@ -1562,7 +1562,7 @@ DEFUN (ip_prefix_list_seq_le, DEFUN (ip_prefix_list_seq_le_ge, ip_prefix_list_seq_le_ge_cmd, - "ip prefix-list WORD seq <1-4294967295> (deny|permit) A.B.C.D/M le <0-32> ge <0-32>", + "ip prefix-list WORD seq (1-4294967295) A.B.C.D/M le (0-32) ge (0-32)", IP_STR PREFIX_LIST_STR "Name of a prefix list\n" @@ -1594,7 +1594,7 @@ DEFUN (no_ip_prefix_list, DEFUN (no_ip_prefix_list_prefix, no_ip_prefix_list_prefix_cmd, - "no ip prefix-list WORD (deny|permit) (A.B.C.D/M|any)", + "no ip prefix-list WORD ", NO_STR IP_STR PREFIX_LIST_STR @@ -1610,7 +1610,7 @@ DEFUN (no_ip_prefix_list_prefix, DEFUN (no_ip_prefix_list_ge, no_ip_prefix_list_ge_cmd, - "no ip prefix-list WORD (deny|permit) A.B.C.D/M ge <0-32>", + "no ip prefix-list WORD A.B.C.D/M ge (0-32)", NO_STR IP_STR PREFIX_LIST_STR @@ -1627,7 +1627,7 @@ DEFUN (no_ip_prefix_list_ge, DEFUN (no_ip_prefix_list_ge_le, no_ip_prefix_list_ge_le_cmd, - "no ip prefix-list WORD (deny|permit) A.B.C.D/M ge <0-32> le <0-32>", + "no ip prefix-list WORD A.B.C.D/M ge (0-32) le (0-32)", NO_STR IP_STR PREFIX_LIST_STR @@ -1646,7 +1646,7 @@ DEFUN (no_ip_prefix_list_ge_le, DEFUN (no_ip_prefix_list_le, no_ip_prefix_list_le_cmd, - "no ip prefix-list WORD (deny|permit) A.B.C.D/M le <0-32>", + "no ip prefix-list WORD A.B.C.D/M le (0-32)", NO_STR IP_STR PREFIX_LIST_STR @@ -1663,7 +1663,7 @@ DEFUN (no_ip_prefix_list_le, DEFUN (no_ip_prefix_list_le_ge, no_ip_prefix_list_le_ge_cmd, - "no ip prefix-list WORD (deny|permit) A.B.C.D/M le <0-32> ge <0-32>", + "no ip prefix-list WORD A.B.C.D/M le (0-32) ge (0-32)", NO_STR IP_STR PREFIX_LIST_STR @@ -1682,7 +1682,7 @@ DEFUN (no_ip_prefix_list_le_ge, DEFUN (no_ip_prefix_list_seq, no_ip_prefix_list_seq_cmd, - "no ip prefix-list WORD seq <1-4294967295> (deny|permit) (A.B.C.D/M|any)", + "no ip prefix-list WORD seq (1-4294967295) ", NO_STR IP_STR PREFIX_LIST_STR @@ -1700,7 +1700,7 @@ DEFUN (no_ip_prefix_list_seq, DEFUN (no_ip_prefix_list_seq_ge, no_ip_prefix_list_seq_ge_cmd, - "no ip prefix-list WORD seq <1-4294967295> (deny|permit) A.B.C.D/M ge <0-32>", + "no ip prefix-list WORD seq (1-4294967295) A.B.C.D/M ge (0-32)", NO_STR IP_STR PREFIX_LIST_STR @@ -1719,7 +1719,7 @@ DEFUN (no_ip_prefix_list_seq_ge, DEFUN (no_ip_prefix_list_seq_ge_le, no_ip_prefix_list_seq_ge_le_cmd, - "no ip prefix-list WORD seq <1-4294967295> (deny|permit) A.B.C.D/M ge <0-32> le <0-32>", + "no ip prefix-list WORD seq (1-4294967295) A.B.C.D/M ge (0-32) le (0-32)", NO_STR IP_STR PREFIX_LIST_STR @@ -1740,7 +1740,7 @@ DEFUN (no_ip_prefix_list_seq_ge_le, DEFUN (no_ip_prefix_list_seq_le, no_ip_prefix_list_seq_le_cmd, - "no ip prefix-list WORD seq <1-4294967295> (deny|permit) A.B.C.D/M le <0-32>", + "no ip prefix-list WORD seq (1-4294967295) A.B.C.D/M le (0-32)", NO_STR IP_STR PREFIX_LIST_STR @@ -1759,7 +1759,7 @@ DEFUN (no_ip_prefix_list_seq_le, DEFUN (no_ip_prefix_list_seq_le_ge, no_ip_prefix_list_seq_le_ge_cmd, - "no ip prefix-list WORD seq <1-4294967295> (deny|permit) A.B.C.D/M le <0-32> ge <0-32>", + "no ip prefix-list WORD seq (1-4294967295) A.B.C.D/M le (0-32) ge (0-32)", NO_STR IP_STR PREFIX_LIST_STR @@ -1871,7 +1871,7 @@ DEFUN (show_ip_prefix_list_name, DEFUN (show_ip_prefix_list_name_seq, show_ip_prefix_list_name_seq_cmd, - "show ip prefix-list WORD seq <1-4294967295>", + "show ip prefix-list WORD seq (1-4294967295)", SHOW_STR IP_STR PREFIX_LIST_STR @@ -2003,7 +2003,7 @@ DEFUN (clear_ip_prefix_list_name_prefix, #ifdef HAVE_IPV6 DEFUN (ipv6_prefix_list, ipv6_prefix_list_cmd, - "ipv6 prefix-list WORD (deny|permit) (X:X::X:X/M|any)", + "ipv6 prefix-list WORD ", IPV6_STR PREFIX_LIST_STR "Name of a prefix list\n" @@ -2018,7 +2018,7 @@ DEFUN (ipv6_prefix_list, DEFUN (ipv6_prefix_list_ge, ipv6_prefix_list_ge_cmd, - "ipv6 prefix-list WORD (deny|permit) X:X::X:X/M ge <0-128>", + "ipv6 prefix-list WORD X:X::X:X/M ge (0-128)", IPV6_STR PREFIX_LIST_STR "Name of a prefix list\n" @@ -2034,7 +2034,7 @@ DEFUN (ipv6_prefix_list_ge, DEFUN (ipv6_prefix_list_ge_le, ipv6_prefix_list_ge_le_cmd, - "ipv6 prefix-list WORD (deny|permit) X:X::X:X/M ge <0-128> le <0-128>", + "ipv6 prefix-list WORD X:X::X:X/M ge (0-128) le (0-128)", IPV6_STR PREFIX_LIST_STR "Name of a prefix list\n" @@ -2053,7 +2053,7 @@ DEFUN (ipv6_prefix_list_ge_le, DEFUN (ipv6_prefix_list_le, ipv6_prefix_list_le_cmd, - "ipv6 prefix-list WORD (deny|permit) X:X::X:X/M le <0-128>", + "ipv6 prefix-list WORD X:X::X:X/M le (0-128)", IPV6_STR PREFIX_LIST_STR "Name of a prefix list\n" @@ -2069,7 +2069,7 @@ DEFUN (ipv6_prefix_list_le, DEFUN (ipv6_prefix_list_le_ge, ipv6_prefix_list_le_ge_cmd, - "ipv6 prefix-list WORD (deny|permit) X:X::X:X/M le <0-128> ge <0-128>", + "ipv6 prefix-list WORD X:X::X:X/M le (0-128) ge (0-128)", IPV6_STR PREFIX_LIST_STR "Name of a prefix list\n" @@ -2087,7 +2087,7 @@ DEFUN (ipv6_prefix_list_le_ge, DEFUN (ipv6_prefix_list_seq, ipv6_prefix_list_seq_cmd, - "ipv6 prefix-list WORD seq <1-4294967295> (deny|permit) (X:X::X:X/M|any)", + "ipv6 prefix-list WORD seq (1-4294967295) ", IPV6_STR PREFIX_LIST_STR "Name of a prefix list\n" @@ -2104,7 +2104,7 @@ DEFUN (ipv6_prefix_list_seq, DEFUN (ipv6_prefix_list_seq_ge, ipv6_prefix_list_seq_ge_cmd, - "ipv6 prefix-list WORD seq <1-4294967295> (deny|permit) X:X::X:X/M ge <0-128>", + "ipv6 prefix-list WORD seq (1-4294967295) X:X::X:X/M ge (0-128)", IPV6_STR PREFIX_LIST_STR "Name of a prefix list\n" @@ -2122,7 +2122,7 @@ DEFUN (ipv6_prefix_list_seq_ge, DEFUN (ipv6_prefix_list_seq_ge_le, ipv6_prefix_list_seq_ge_le_cmd, - "ipv6 prefix-list WORD seq <1-4294967295> (deny|permit) X:X::X:X/M ge <0-128> le <0-128>", + "ipv6 prefix-list WORD seq (1-4294967295) X:X::X:X/M ge (0-128) le (0-128)", IPV6_STR PREFIX_LIST_STR "Name of a prefix list\n" @@ -2142,7 +2142,7 @@ DEFUN (ipv6_prefix_list_seq_ge_le, DEFUN (ipv6_prefix_list_seq_le, ipv6_prefix_list_seq_le_cmd, - "ipv6 prefix-list WORD seq <1-4294967295> (deny|permit) X:X::X:X/M le <0-128>", + "ipv6 prefix-list WORD seq (1-4294967295) X:X::X:X/M le (0-128)", IPV6_STR PREFIX_LIST_STR "Name of a prefix list\n" @@ -2160,7 +2160,7 @@ DEFUN (ipv6_prefix_list_seq_le, DEFUN (ipv6_prefix_list_seq_le_ge, ipv6_prefix_list_seq_le_ge_cmd, - "ipv6 prefix-list WORD seq <1-4294967295> (deny|permit) X:X::X:X/M le <0-128> ge <0-128>", + "ipv6 prefix-list WORD seq (1-4294967295) X:X::X:X/M le (0-128) ge (0-128)", IPV6_STR PREFIX_LIST_STR "Name of a prefix list\n" @@ -2192,7 +2192,7 @@ DEFUN (no_ipv6_prefix_list, DEFUN (no_ipv6_prefix_list_prefix, no_ipv6_prefix_list_prefix_cmd, - "no ipv6 prefix-list WORD (deny|permit) (X:X::X:X/M|any)", + "no ipv6 prefix-list WORD ", NO_STR IPV6_STR PREFIX_LIST_STR @@ -2208,7 +2208,7 @@ DEFUN (no_ipv6_prefix_list_prefix, DEFUN (no_ipv6_prefix_list_ge, no_ipv6_prefix_list_ge_cmd, - "no ipv6 prefix-list WORD (deny|permit) X:X::X:X/M ge <0-128>", + "no ipv6 prefix-list WORD X:X::X:X/M ge (0-128)", NO_STR IPV6_STR PREFIX_LIST_STR @@ -2225,7 +2225,7 @@ DEFUN (no_ipv6_prefix_list_ge, DEFUN (no_ipv6_prefix_list_ge_le, no_ipv6_prefix_list_ge_le_cmd, - "no ipv6 prefix-list WORD (deny|permit) X:X::X:X/M ge <0-128> le <0-128>", + "no ipv6 prefix-list WORD X:X::X:X/M ge (0-128) le (0-128)", NO_STR IPV6_STR PREFIX_LIST_STR @@ -2244,7 +2244,7 @@ DEFUN (no_ipv6_prefix_list_ge_le, DEFUN (no_ipv6_prefix_list_le, no_ipv6_prefix_list_le_cmd, - "no ipv6 prefix-list WORD (deny|permit) X:X::X:X/M le <0-128>", + "no ipv6 prefix-list WORD X:X::X:X/M le (0-128)", NO_STR IPV6_STR PREFIX_LIST_STR @@ -2261,7 +2261,7 @@ DEFUN (no_ipv6_prefix_list_le, DEFUN (no_ipv6_prefix_list_le_ge, no_ipv6_prefix_list_le_ge_cmd, - "no ipv6 prefix-list WORD (deny|permit) X:X::X:X/M le <0-128> ge <0-128>", + "no ipv6 prefix-list WORD X:X::X:X/M le (0-128) ge (0-128)", NO_STR IPV6_STR PREFIX_LIST_STR @@ -2280,7 +2280,7 @@ DEFUN (no_ipv6_prefix_list_le_ge, DEFUN (no_ipv6_prefix_list_seq, no_ipv6_prefix_list_seq_cmd, - "no ipv6 prefix-list WORD seq <1-4294967295> (deny|permit) (X:X::X:X/M|any)", + "no ipv6 prefix-list WORD seq (1-4294967295) ", NO_STR IPV6_STR PREFIX_LIST_STR @@ -2298,7 +2298,7 @@ DEFUN (no_ipv6_prefix_list_seq, DEFUN (no_ipv6_prefix_list_seq_ge, no_ipv6_prefix_list_seq_ge_cmd, - "no ipv6 prefix-list WORD seq <1-4294967295> (deny|permit) X:X::X:X/M ge <0-128>", + "no ipv6 prefix-list WORD seq (1-4294967295) X:X::X:X/M ge (0-128)", NO_STR IPV6_STR PREFIX_LIST_STR @@ -2317,7 +2317,7 @@ DEFUN (no_ipv6_prefix_list_seq_ge, DEFUN (no_ipv6_prefix_list_seq_ge_le, no_ipv6_prefix_list_seq_ge_le_cmd, - "no ipv6 prefix-list WORD seq <1-4294967295> (deny|permit) X:X::X:X/M ge <0-128> le <0-128>", + "no ipv6 prefix-list WORD seq (1-4294967295) X:X::X:X/M ge (0-128) le (0-128)", NO_STR IPV6_STR PREFIX_LIST_STR @@ -2338,7 +2338,7 @@ DEFUN (no_ipv6_prefix_list_seq_ge_le, DEFUN (no_ipv6_prefix_list_seq_le, no_ipv6_prefix_list_seq_le_cmd, - "no ipv6 prefix-list WORD seq <1-4294967295> (deny|permit) X:X::X:X/M le <0-128>", + "no ipv6 prefix-list WORD seq (1-4294967295) X:X::X:X/M le (0-128)", NO_STR IPV6_STR PREFIX_LIST_STR @@ -2357,7 +2357,7 @@ DEFUN (no_ipv6_prefix_list_seq_le, DEFUN (no_ipv6_prefix_list_seq_le_ge, no_ipv6_prefix_list_seq_le_ge_cmd, - "no ipv6 prefix-list WORD seq <1-4294967295> (deny|permit) X:X::X:X/M le <0-128> ge <0-128>", + "no ipv6 prefix-list WORD seq (1-4294967295) X:X::X:X/M le (0-128) ge (0-128)", NO_STR IPV6_STR PREFIX_LIST_STR @@ -2469,7 +2469,7 @@ DEFUN (show_ipv6_prefix_list_name, DEFUN (show_ipv6_prefix_list_name_seq, show_ipv6_prefix_list_name_seq_cmd, - "show ipv6 prefix-list WORD seq <1-4294967295>", + "show ipv6 prefix-list WORD seq (1-4294967295)", SHOW_STR IPV6_STR PREFIX_LIST_STR diff --git a/lib/vrf.c b/lib/vrf.c index 7d79b3dc9..6de224f8c 100644 --- a/lib/vrf.c +++ b/lib/vrf.c @@ -738,7 +738,7 @@ vrf_socket (int domain, int type, int protocol, vrf_id_t vrf_id) * Debug CLI for vrf's */ DEFUN (vrf_debug, - vrf_debug_cmd, + vrf_debug_cmd, "debug vrf", DEBUG_STR "VRF Debugging\n") @@ -749,7 +749,7 @@ DEFUN (vrf_debug, } DEFUN (no_vrf_debug, - no_vrf_debug_cmd, + no_vrf_debug_cmd, "no debug vrf", NO_STR DEBUG_STR diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c index 4863342ef..1c1a524e4 100644 --- a/ospf6d/ospf6_area.c +++ b/ospf6d/ospf6_area.c @@ -668,7 +668,7 @@ ospf6_area_config_write (struct vty *vty) DEFUN (area_filter_list, area_filter_list_cmd, - "area A.B.C.D filter-list prefix WORD (in|out)", + "area A.B.C.D filter-list prefix WORD ", "OSPFv6 area parameters\n" "OSPFv6 area ID in IP address format\n" "Filter networks between OSPFv6 areas\n" @@ -709,7 +709,7 @@ DEFUN (area_filter_list, DEFUN (no_area_filter_list, no_area_filter_list_cmd, - "no area A.B.C.D filter-list prefix WORD (in|out)", + "no area A.B.C.D filter-list prefix WORD ", NO_STR "OSPFv6 area parameters\n" "OSPFv6 area ID in IP address format\n" @@ -996,7 +996,7 @@ DEFUN (show_ipv6_ospf6_simulate_spf_tree_root, DEFUN (ospf6_area_stub, ospf6_area_stub_cmd, - "area (A.B.C.D|<0-4294967295>) stub", + "area stub", "OSPF6 area parameters\n" "OSPF6 area ID in IP address format\n" "OSPF6 area ID as a decimal value\n" @@ -1020,7 +1020,7 @@ DEFUN (ospf6_area_stub, DEFUN (ospf6_area_stub_no_summary, ospf6_area_stub_no_summary_cmd, - "area (A.B.C.D|<0-4294967295>) stub no-summary", + "area stub no-summary", "OSPF6 stub parameters\n" "OSPF6 area ID in IP address format\n" "OSPF6 area ID as a decimal value\n" @@ -1045,7 +1045,7 @@ DEFUN (ospf6_area_stub_no_summary, DEFUN (no_ospf6_area_stub, no_ospf6_area_stub_cmd, - "no area (A.B.C.D|<0-4294967295>) stub", + "no area stub", NO_STR "OSPF6 area parameters\n" "OSPF6 area ID in IP address format\n" @@ -1064,7 +1064,7 @@ DEFUN (no_ospf6_area_stub, DEFUN (no_ospf6_area_stub_no_summary, no_ospf6_area_stub_no_summary_cmd, - "no area (A.B.C.D|<0-4294967295>) stub no-summary", + "no area stub no-summary", NO_STR "OSPF6 area parameters\n" "OSPF6 area ID in IP address format\n" diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index 696f18f03..143278b42 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -1078,7 +1078,7 @@ DEFUN (ospf6_routemap_no_match_interface, /* add "set metric-type" */ DEFUN (ospf6_routemap_set_metric_type, ospf6_routemap_set_metric_type_cmd, - "set metric-type (type-1|type-2)", + "set metric-type ", "Set value\n" "Type of metric\n" "OSPF6 external type 1 metric\n" @@ -1092,7 +1092,7 @@ DEFUN (ospf6_routemap_set_metric_type, /* delete "set metric-type" */ DEFUN (ospf6_routemap_no_set_metric_type, ospf6_routemap_no_set_metric_type_cmd, - "no set metric-type (type-1|type-2)", + "no set metric-type ", NO_STR "Set value\n" "Type of metric\n" @@ -1107,7 +1107,7 @@ DEFUN (ospf6_routemap_no_set_metric_type, /* add "set metric" */ DEFUN (set_metric, set_metric_cmd, - "set metric <0-4294967295>", + "set metric (0-4294967295)", "Set value\n" "Metric value\n" "Metric value\n") diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index 66cc59bc3..2b7d180a8 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -1151,7 +1151,7 @@ DEFUN (show_ipv6_ospf6_interface_prefix, /* interface variable set command */ DEFUN (ipv6_ospf6_ifmtu, ipv6_ospf6_ifmtu_cmd, - "ipv6 ospf6 ifmtu <1-65535>", + "ipv6 ospf6 ifmtu (1-65535)", IP6_STR OSPF6_STR "Interface MTU\n" @@ -1259,7 +1259,7 @@ DEFUN (no_ipv6_ospf6_ifmtu, DEFUN (ipv6_ospf6_cost, ipv6_ospf6_cost_cmd, - "ipv6 ospf6 cost <1-65535>", + "ipv6 ospf6 cost (1-65535)", IP6_STR OSPF6_STR "Interface cost\n" @@ -1326,7 +1326,7 @@ DEFUN (no_ipv6_ospf6_cost, DEFUN (auto_cost_reference_bandwidth, auto_cost_reference_bandwidth_cmd, - "auto-cost reference-bandwidth <1-4294967>", + "auto-cost reference-bandwidth (1-4294967)", "Calculate OSPF interface cost according to bandwidth\n" "Use reference bandwidth method to assign OSPF cost\n" "The reference bandwidth in terms of Mbits per second\n") @@ -1391,7 +1391,7 @@ DEFUN (no_auto_cost_reference_bandwidth, DEFUN (ipv6_ospf6_hellointerval, ipv6_ospf6_hellointerval_cmd, - "ipv6 ospf6 hello-interval <1-65535>", + "ipv6 ospf6 hello-interval (1-65535)", IP6_STR OSPF6_STR "Interval time of Hello packets\n" @@ -1416,7 +1416,7 @@ DEFUN (ipv6_ospf6_hellointerval, /* interface variable set command */ DEFUN (ipv6_ospf6_deadinterval, ipv6_ospf6_deadinterval_cmd, - "ipv6 ospf6 dead-interval <1-65535>", + "ipv6 ospf6 dead-interval (1-65535)", IP6_STR OSPF6_STR "Interval time after which a neighbor is declared down\n" @@ -1441,7 +1441,7 @@ DEFUN (ipv6_ospf6_deadinterval, /* interface variable set command */ DEFUN (ipv6_ospf6_transmitdelay, ipv6_ospf6_transmitdelay_cmd, - "ipv6 ospf6 transmit-delay <1-3600>", + "ipv6 ospf6 transmit-delay (1-3600)", IP6_STR OSPF6_STR "Transmit delay of this interface\n" @@ -1466,7 +1466,7 @@ DEFUN (ipv6_ospf6_transmitdelay, /* interface variable set command */ DEFUN (ipv6_ospf6_retransmitinterval, ipv6_ospf6_retransmitinterval_cmd, - "ipv6 ospf6 retransmit-interval <1-65535>", + "ipv6 ospf6 retransmit-interval (1-65535)", IP6_STR OSPF6_STR "Time between retransmitting lost link state advertisements\n" @@ -1491,7 +1491,7 @@ DEFUN (ipv6_ospf6_retransmitinterval, /* interface variable set command */ DEFUN (ipv6_ospf6_priority, ipv6_ospf6_priority_cmd, - "ipv6 ospf6 priority <0-255>", + "ipv6 ospf6 priority (0-255)", IP6_STR OSPF6_STR "Router priority\n" @@ -1522,7 +1522,7 @@ DEFUN (ipv6_ospf6_priority, DEFUN (ipv6_ospf6_instance, ipv6_ospf6_instance_cmd, - "ipv6 ospf6 instance-id <0-255>", + "ipv6 ospf6 instance-id (0-255)", IP6_STR OSPF6_STR "Instance ID for this interface\n" @@ -1740,7 +1740,7 @@ DEFUN (no_ipv6_ospf6_advertise_prefix_list, DEFUN (ipv6_ospf6_network, ipv6_ospf6_network_cmd, - "ipv6 ospf6 network (broadcast|point-to-point)", + "ipv6 ospf6 network ", IP6_STR OSPF6_STR "Network Type\n" diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index d58ab567b..db34214e1 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -828,7 +828,7 @@ ospf6_lsa_handler_name (struct ospf6_lsa_handler *h) */ DEFUN (debug_ospf6_lsa_type, debug_ospf6_lsa_hex_cmd, - "debug ospf6 lsa (router|network|inter-prefix|inter-router|as-external|link|intra-prefix|unknown)", + "debug ospf6 lsa ", DEBUG_STR OSPF6_STR "Debug Link State Advertisements (LSAs)\n" @@ -884,7 +884,7 @@ DEFUN (debug_ospf6_lsa_type, */ DEFUN (no_debug_ospf6_lsa_type, no_debug_ospf6_lsa_hex_cmd, - "no debug ospf6 lsa (router|network|inter-prefix|inter-router|as-external|link|intra-prefix|unknown)", + "no debug ospf6 lsa ", NO_STR DEBUG_STR OSPF6_STR diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c index e8f4990c9..b2dd6b6ce 100644 --- a/ospf6d/ospf6_message.c +++ b/ospf6d/ospf6_message.c @@ -2358,7 +2358,7 @@ ospf6_lsack_send_interface (struct thread *thread) */ DEFUN (debug_ospf6_message, debug_ospf6_message_cmd, - "debug ospf6 message (unknown|hello|dbdesc|lsreq|lsupdate|lsack|all)", + "debug ospf6 message ", DEBUG_STR OSPF6_STR "Debug OSPFv3 message\n" @@ -2435,7 +2435,7 @@ DEFUN (debug_ospf6_message, */ DEFUN (no_debug_ospf6_message, no_debug_ospf6_message_cmd, - "no debug ospf6 message (unknown|hello|dbdesc|lsreq|lsupdate|lsack|all)", + "no debug ospf6 message ", NO_STR DEBUG_STR OSPF6_STR diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c index d5267354a..8cf819695 100644 --- a/ospf6d/ospf6_route.c +++ b/ospf6d/ospf6_route.c @@ -1563,7 +1563,7 @@ ospf6_brouter_show (struct vty *vty, struct ospf6_route *route) DEFUN (debug_ospf6_route, debug_ospf6_route_cmd, - "debug ospf6 route (table|intra-area|inter-area|memory)", + "debug ospf6 route ", DEBUG_STR OSPF6_STR "Debug route table calculation\n" @@ -1589,7 +1589,7 @@ DEFUN (debug_ospf6_route, DEFUN (no_debug_ospf6_route, no_debug_ospf6_route_cmd, - "no debug ospf6 route (table|intra-area|inter-area|memory)", + "no debug ospf6 route ", NO_STR DEBUG_STR OSPF6_STR diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c index 6511d0b36..80fb90416 100644 --- a/ospf6d/ospf6_spf.c +++ b/ospf6d/ospf6_spf.c @@ -877,7 +877,7 @@ ospf6_timers_spf_set (struct vty *vty, unsigned int delay, DEFUN (ospf6_timers_throttle_spf, ospf6_timers_throttle_spf_cmd, - "timers throttle spf <0-600000> <0-600000> <0-600000>", + "timers throttle spf (0-600000) (0-600000) (0-600000)", "Adjust routing timers\n" "Throttling adaptive timer\n" "OSPF6 SPF timers\n" diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index 8ddc6cfc8..9c51b4ee7 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -398,7 +398,7 @@ DEFUN (no_ospf6_log_adjacency_changes_detail, DEFUN (ospf6_timers_lsa, ospf6_timers_lsa_cmd, - "timers lsa min-arrival <0-600000>", + "timers lsa min-arrival (0-600000)", "Adjust routing timers\n" "OSPF6 LSA timers\n" "Minimum delay in receiving new version of a LSA\n" @@ -640,7 +640,7 @@ DEFUN (no_ospf6_stub_router_admin, DEFUN (ospf6_stub_router_startup, ospf6_stub_router_startup_cmd, - "stub-router on-startup <5-86400>", + "stub-router on-startup (5-86400)", "Make router a stub router\n" "Advertise inability to be a transit router\n" "Automatically advertise as stub-router on startup of OSPF6\n" @@ -663,7 +663,7 @@ DEFUN (no_ospf6_stub_router_startup, DEFUN (ospf6_stub_router_shutdown, ospf6_stub_router_shutdown_cmd, - "stub-router on-shutdown <5-86400>", + "stub-router on-shutdown (5-86400)", "Make router a stub router\n" "Advertise inability to be a transit router\n" "Automatically advertise as stub-router before shutdown\n" @@ -868,7 +868,7 @@ DEFUN (show_ipv6_ospf6_route_match_detail, DEFUN (show_ipv6_ospf6_route_type_detail, show_ipv6_ospf6_route_type_detail_cmd, - "show ipv6 ospf6 route (intra-area|inter-area|external-1|external-2) detail", + "show ipv6 ospf6 route detail", SHOW_STR IP6_STR OSPF6_STR diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c index f172b50f0..10b6b27a8 100644 --- a/ospf6d/ospf6_zebra.c +++ b/ospf6d/ospf6_zebra.c @@ -718,7 +718,7 @@ ospf6_zebra_init (struct thread_master *master) */ DEFUN (debug_ospf6_zebra_sendrecv, debug_ospf6_zebra_sendrecv_cmd, - "debug ospf6 zebra (send|recv)", + "debug ospf6 zebra ", DEBUG_STR OSPF6_STR "Debug connection between zebra\n" @@ -756,7 +756,7 @@ DEFUN (debug_ospf6_zebra_sendrecv, */ DEFUN (no_debug_ospf6_zebra_sendrecv, no_debug_ospf6_zebra_sendrecv_cmd, - "no debug ospf6 zebra (send|recv)", + "no debug ospf6 zebra ", NO_STR DEBUG_STR OSPF6_STR diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c index 74ca444d4..907cd118a 100644 --- a/ospf6d/ospf6d.c +++ b/ospf6d/ospf6d.c @@ -248,7 +248,7 @@ DEFUN (show_ipv6_ospf6_database, */ DEFUN (show_ipv6_ospf6_database_type, show_ipv6_ospf6_database_type_cmd, - "show ipv6 ospf6 database (router|network|inter-prefix|inter-router|as-external|group-membership|type-7|link|intra-prefix)", + "show ipv6 ospf6 database ", SHOW_STR IPV6_STR OSPF6_STR @@ -579,7 +579,7 @@ DEFUN (show_ipv6_ospf6_database_router, */ DEFUN (show_ipv6_ospf6_database_type_id, show_ipv6_ospf6_database_type_id_cmd, - "show ipv6 ospf6 database (router|network|inter-prefix|inter-router|as-external|group-membership|type-7|link|intra-prefix) A.B.C.D", + "show ipv6 ospf6 database A.B.C.D", SHOW_STR IPV6_STR OSPF6_STR @@ -733,7 +733,7 @@ DEFUN (show_ipv6_ospf6_database_type_id, */ DEFUN (show_ipv6_ospf6_database_type_router, show_ipv6_ospf6_database_type_router_cmd, - "show ipv6 ospf6 database (router|network|inter-prefix|inter-router|as-external|group-membership|type-7|link|intra-prefix) * A.B.C.D", + "show ipv6 ospf6 database * A.B.C.D", SHOW_STR IPV6_STR OSPF6_STR @@ -1013,7 +1013,7 @@ DEFUN (show_ipv6_ospf6_database_adv_router_linkstate_id, */ DEFUN (show_ipv6_ospf6_database_type_id_router, show_ipv6_ospf6_database_type_id_router_cmd, - "show ipv6 ospf6 database (router|network|inter-prefix|inter-router|as-external|group-membership|type-7|link|intra-prefix) A.B.C.D A.B.C.D", + "show ipv6 ospf6 database A.B.C.D A.B.C.D", SHOW_STR IPV6_STR OSPF6_STR @@ -1135,7 +1135,7 @@ DEFUN (show_ipv6_ospf6_database_type_id_router, */ DEFUN (show_ipv6_ospf6_database_type_adv_router_linkstate_id, show_ipv6_ospf6_database_type_adv_router_linkstate_id_cmd, - "show ipv6 ospf6 database (router|network|inter-prefix|inter-router|as-external|group-membership|type-7|link|intra-prefix) adv-router A.B.C.D linkstate-id A.B.C.D", + "show ipv6 ospf6 database adv-router A.B.C.D linkstate-id A.B.C.D", SHOW_STR IPV6_STR OSPF6_STR @@ -1316,7 +1316,7 @@ DEFUN (show_ipv6_ospf6_database_self_originated, */ DEFUN (show_ipv6_ospf6_database_type_self_originated, show_ipv6_ospf6_database_type_self_originated_cmd, - "show ipv6 ospf6 database (router|network|inter-prefix|inter-router|as-external|group-membership|type-7|link|intra-prefix) self-originated", + "show ipv6 ospf6 database self-originated", SHOW_STR IPV6_STR OSPF6_STR @@ -1417,7 +1417,7 @@ DEFUN (show_ipv6_ospf6_database_type_self_originated, */ DEFUN (show_ipv6_ospf6_database_type_self_originated_linkstate_id, show_ipv6_ospf6_database_type_self_originated_linkstate_id_cmd, - "show ipv6 ospf6 database (router|network|inter-prefix|inter-router|as-external|group-membership|type-7|link|intra-prefix) self-originated linkstate-id A.B.C.D", + "show ipv6 ospf6 database self-originated linkstate-id A.B.C.D", SHOW_STR IPV6_STR OSPF6_STR @@ -1531,7 +1531,7 @@ DEFUN (show_ipv6_ospf6_database_type_self_originated_linkstate_id, */ DEFUN (show_ipv6_ospf6_database_type_id_self_originated, show_ipv6_ospf6_database_type_id_self_originated_cmd, - "show ipv6 ospf6 database (router|network|inter-prefix|inter-router|as-external|group-membership|type-7|link|intra-prefix) A.B.C.D self-originated", + "show ipv6 ospf6 database A.B.C.D self-originated", SHOW_STR IPV6_STR OSPF6_STR diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c index 60356e774..5c5e5ceb5 100644 --- a/ospfd/ospf_dump.c +++ b/ospfd/ospf_dump.c @@ -847,7 +847,7 @@ debug_ospf_packet_common (struct vty *vty, int arg_base, int argc, */ DEFUN (debug_ospf_packet, debug_ospf_packet_all_cmd, - "debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all)", + "debug ospf packet ", DEBUG_STR OSPF_STR "OSPF packets\n" @@ -898,7 +898,7 @@ DEFUN (debug_ospf_packet, */ DEFUN (debug_ospf_instance_packet, debug_ospf_instance_packet_all_cmd, - "debug ospf <1-65535> packet (hello|dd|ls-request|ls-update|ls-ack|all)", + "debug ospf (1-65535) packet ", DEBUG_STR OSPF_STR "Instance ID\n" @@ -1019,7 +1019,7 @@ no_debug_ospf_packet_common (struct vty *vty, int arg_base, int argc, */ DEFUN (no_debug_ospf_packet, no_debug_ospf_packet_all_cmd, - "no debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all)", + "no debug ospf packet ", NO_STR DEBUG_STR OSPF_STR @@ -1073,7 +1073,7 @@ DEFUN (no_debug_ospf_packet, */ DEFUN (no_debug_ospf_instance_packet, no_debug_ospf_instance_packet_all_cmd, - "no debug ospf <1-65535> packet (hello|dd|ls-request|ls-update|ls-ack|all)", + "no debug ospf (1-65535) packet ", NO_STR DEBUG_STR OSPF_STR @@ -1170,7 +1170,7 @@ DEFUN (debug_ospf_ism, */ DEFUN (debug_ospf_instance_ism, debug_ospf_instance_ism_cmd, - "debug ospf <1-65535> ism", + "debug ospf (1-65535) ism", DEBUG_STR OSPF_STR "Instance ID\n" @@ -1261,7 +1261,7 @@ DEFUN (no_debug_ospf_ism, */ DEFUN (no_debug_ospf_instance_ism, no_debug_ospf_instance_ism_cmd, - "no debug ospf <1-65535> ism", + "no debug ospf (1-65535) ism", NO_STR DEBUG_STR OSPF_STR @@ -1350,7 +1350,7 @@ DEFUN (debug_ospf_nsm, */ DEFUN (debug_ospf_instance_nsm, debug_ospf_instance_nsm_cmd, - "debug ospf <1-65535> nsm", + "debug ospf (1-65535) nsm", DEBUG_STR OSPF_STR "Instance ID\n" @@ -1441,7 +1441,7 @@ DEFUN (no_debug_ospf_nsm, */ DEFUN (no_debug_ospf_instance_nsm, no_debug_ospf_instance_nsm_cmd, - "no debug ospf <1-65535> nsm", + "no debug ospf (1-65535) nsm", NO_STR DEBUG_STR OSPF_STR @@ -1537,7 +1537,7 @@ DEFUN (debug_ospf_lsa, */ DEFUN (debug_ospf_instance_lsa, debug_ospf_instance_lsa_cmd, - "debug ospf <1-65535> lsa", + "debug ospf (1-65535) lsa", DEBUG_STR OSPF_STR "Instance ID\n" @@ -1634,7 +1634,7 @@ DEFUN (no_debug_ospf_lsa, */ DEFUN (no_debug_ospf_instance_lsa, no_debug_ospf_instance_lsa_cmd, - "no debug ospf <1-65535> lsa", + "no debug ospf (1-65535) lsa", NO_STR DEBUG_STR OSPF_STR @@ -1718,7 +1718,7 @@ DEFUN (debug_ospf_zebra, */ DEFUN (debug_ospf_instance_zebra, debug_ospf_instance_zebra_cmd, - "debug ospf <1-65535> zebra", + "debug ospf (1-65535) zebra", DEBUG_STR OSPF_STR "Instance ID\n" @@ -1804,7 +1804,7 @@ DEFUN (no_debug_ospf_zebra, */ DEFUN (no_debug_ospf_instance_zebra, no_debug_ospf_instance_zebra_cmd, - "no debug ospf <1-65535> zebra", + "no debug ospf (1-65535) zebra", NO_STR DEBUG_STR OSPF_STR @@ -1851,7 +1851,7 @@ DEFUN (no_debug_ospf_event, DEFUN (debug_ospf_instance_event, debug_ospf_instance_event_cmd, - "debug ospf <1-65535> event", + "debug ospf (1-65535) event", DEBUG_STR OSPF_STR "Instance ID\n" @@ -1871,7 +1871,7 @@ DEFUN (debug_ospf_instance_event, DEFUN (no_debug_ospf_instance_event, no_debug_ospf_instance_event_cmd, - "no debug ospf <1-65535> event", + "no debug ospf (1-65535) event", NO_STR DEBUG_STR OSPF_STR @@ -1919,7 +1919,7 @@ DEFUN (no_debug_ospf_nssa, DEFUN (debug_ospf_instance_nssa, debug_ospf_instance_nssa_cmd, - "debug ospf <1-65535> nssa", + "debug ospf (1-65535) nssa", DEBUG_STR OSPF_STR "Instance ID\n" @@ -1939,7 +1939,7 @@ DEFUN (debug_ospf_instance_nssa, DEFUN (no_debug_ospf_instance_nssa, no_debug_ospf_instance_nssa_cmd, - "no debug ospf <1-65535> nssa", + "no debug ospf (1-65535) nssa", NO_STR DEBUG_STR OSPF_STR @@ -2160,7 +2160,7 @@ DEFUN (show_debugging_ospf, DEFUN (show_debugging_ospf_instance, show_debugging_ospf_instance_cmd, - "show debugging ospf <1-65535>", + "show debugging ospf (1-65535)", SHOW_STR DEBUG_STR OSPF_STR diff --git a/ospfd/ospf_ri.c b/ospfd/ospf_ri.c index 04601b994..b70433b87 100644 --- a/ospfd/ospf_ri.c +++ b/ospfd/ospf_ri.c @@ -1363,7 +1363,7 @@ DEFUN (no_pce_path_scope, DEFUN (pce_domain, pce_domain_cmd, - "pce domain as <0-65535>", + "pce domain as (0-65535)", PCE_STR "Configure PCE domain AS number\n" "AS number where the PCE as visibilities for path computation\n" @@ -1401,7 +1401,7 @@ out:return CMD_SUCCESS; DEFUN (no_pce_domain, no_pce_domain_cmd, - "no pce domain as <0-65535>", + "no pce domain as (0-65535)", NO_STR PCE_STR "Disable PCE domain AS number\n" @@ -1431,7 +1431,7 @@ DEFUN (no_pce_domain, DEFUN (pce_neigbhor, pce_neighbor_cmd, - "pce neighbor as <0-65535>", + "pce neighbor as (0-65535)", PCE_STR "Configure PCE neighbor domain AS number\n" "AS number of PCE neighbors\n" @@ -1469,7 +1469,7 @@ out:return CMD_SUCCESS; DEFUN (no_pce_neighbor, no_pce_neighbor_cmd, - "no pce neighbor as <0-65535>", + "no pce neighbor as (0-65535)", NO_STR PCE_STR "Disable PCE neighbor AS number\n" diff --git a/ospfd/ospf_routemap.c b/ospfd/ospf_routemap.c index f38e45e42..f1fc484e3 100644 --- a/ospfd/ospf_routemap.c +++ b/ospfd/ospf_routemap.c @@ -692,7 +692,7 @@ struct route_map_rule_cmd route_set_tag_cmd = DEFUN (match_ip_nexthop, match_ip_nexthop_cmd, - "match ip next-hop (<1-199>|<1300-2699>|WORD)", + "match ip next-hop <(1-199)|(1300-2699)|WORD>", MATCH_STR IP_STR "Match next-hop address of route\n" @@ -767,7 +767,7 @@ DEFUN (no_match_ip_next_hop_prefix_list, DEFUN (match_ip_address, match_ip_address_cmd, - "match ip address (<1-199>|<1300-2699>|WORD)", + "match ip address <(1-199)|(1300-2699)|WORD>", MATCH_STR IP_STR "Match address of route\n" @@ -872,7 +872,7 @@ DEFUN (no_match_interface, DEFUN (match_tag, match_tag_cmd, - "match tag <1-65535>", + "match tag (1-65535)", MATCH_STR "Match tag of route\n" "Tag value\n") @@ -902,7 +902,7 @@ DEFUN (no_match_tag, DEFUN (set_metric, set_metric_cmd, - "set metric <0-4294967295>", + "set metric (0-4294967295)", SET_STR "Metric value for destination routing protocol\n" "Metric value\n") @@ -932,7 +932,7 @@ DEFUN (no_set_metric, DEFUN (set_metric_type, set_metric_type_cmd, - "set metric-type (type-1|type-2)", + "set metric-type ", SET_STR "Type of metric for destination routing protocol\n" "OSPF[6] external type 1 metric\n" @@ -969,7 +969,7 @@ DEFUN (no_set_metric_type, DEFUN (set_tag, set_tag_cmd, - "set tag <1-65535>", + "set tag (1-65535)", SET_STR "Tag value for routing protocol\n" "Tag value\n") diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c index 4505fb3c4..c90a5b2c4 100644 --- a/ospfd/ospf_te.c +++ b/ospfd/ospf_te.c @@ -2475,7 +2475,7 @@ DEFUN (ospf_mpls_te_inter_as_as, DEFUN (ospf_mpls_te_inter_as_area, ospf_mpls_te_inter_as_area_cmd, - "mpls-te inter-as area (A.B.C.D|<0-4294967295>)", + "mpls-te inter-as area ", MPLS_TE_STR "Configure MPLS-TE Inter-AS support\n" "AREA native mode self originate INTER_AS LSA with Type 10 (area flooding scope)\n" diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index e34c0bbeb..8d0fb1d5d 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -529,7 +529,7 @@ DEFUN (no_ospf_passive_interface, DEFUN (ospf_network_area, ospf_network_area_cmd, - "network A.B.C.D/M area (A.B.C.D|<0-4294967295>)", + "network A.B.C.D/M area ", "Enable routing on an IP network\n" "OSPF network prefix\n" "Set the OSPF area ID\n" @@ -574,7 +574,7 @@ DEFUN (ospf_network_area, DEFUN (no_ospf_network_area, no_ospf_network_area_cmd, - "no network A.B.C.D/M area (A.B.C.D|<0-4294967295>)", + "no network A.B.C.D/M area ", NO_STR "Enable routing on an IP network\n" "OSPF network prefix\n" @@ -645,7 +645,7 @@ DEFUN (no_ospf_network_area, */ DEFUN (ospf_area_range, ospf_area_range_cmd, - "area (A.B.C.D|<0-4294967295>) range A.B.C.D/M", + "area range A.B.C.D/M", "OSPF area parameters\n" "OSPF area ID in IP address format\n" "OSPF area ID as a decimal value\n" @@ -679,7 +679,7 @@ DEFUN (ospf_area_range, DEFUN (ospf_area_range_not_advertise, ospf_area_range_not_advertise_cmd, - "area (A.B.C.D|<0-4294967295>) range A.B.C.D/M not-advertise", + "area range A.B.C.D/M not-advertise", "OSPF area parameters\n" "OSPF area ID in IP address format\n" "OSPF area ID as a decimal value\n" @@ -739,7 +739,7 @@ DEFUN (ospf_area_range_not_advertise, */ DEFUN (no_ospf_area_range, no_ospf_area_range_cmd, - "no area (A.B.C.D|<0-4294967295>) range A.B.C.D/M", + "no area range A.B.C.D/M", NO_STR "OSPF area parameters\n" "OSPF area ID in IP address format\n" @@ -768,7 +768,7 @@ DEFUN (no_ospf_area_range, DEFUN (ospf_area_range_substitute, ospf_area_range_substitute_cmd, - "area (A.B.C.D|<0-4294967295>) range A.B.C.D/M substitute A.B.C.D/M", + "area range A.B.C.D/M substitute A.B.C.D/M", "OSPF area parameters\n" "OSPF area ID in IP address format\n" "OSPF area ID as a decimal value\n" @@ -796,7 +796,7 @@ DEFUN (ospf_area_range_substitute, DEFUN (no_ospf_area_range_substitute, no_ospf_area_range_substitute_cmd, - "no area (A.B.C.D|<0-4294967295>) range A.B.C.D/M substitute A.B.C.D/M", + "no area range A.B.C.D/M substitute A.B.C.D/M", NO_STR "OSPF area parameters\n" "OSPF area ID in IP address format\n" @@ -1162,7 +1162,7 @@ ospf_vl_set (struct ospf *ospf, struct ospf_vl_config_data *vl_config) */ DEFUN (ospf_area_vlink, ospf_area_vlink_cmd, - "area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D", + "area virtual-link A.B.C.D", VLINK_HELPSTR_IPADDR) { struct ospf *ospf = vty->index; @@ -1394,7 +1394,7 @@ DEFUN (ospf_area_vlink, */ DEFUN (no_ospf_area_vlink, no_ospf_area_vlink_cmd, - "no area (A.B.C.D|<0-4294967295>) virtual-link A.B.C.D", + "no area virtual-link A.B.C.D", NO_STR VLINK_HELPSTR_IPADDR) { @@ -1538,7 +1538,7 @@ DEFUN (no_ospf_area_vlink, DEFUN (ospf_area_shortcut, ospf_area_shortcut_cmd, - "area (A.B.C.D|<0-4294967295>) shortcut (default|enable|disable)", + "area shortcut ", "OSPF area parameters\n" "OSPF area ID in IP address format\n" "OSPF area ID as a decimal value\n" @@ -1581,7 +1581,7 @@ DEFUN (ospf_area_shortcut, DEFUN (no_ospf_area_shortcut, no_ospf_area_shortcut_cmd, - "no area (A.B.C.D|<0-4294967295>) shortcut (enable|disable)", + "no area shortcut ", NO_STR "OSPF area parameters\n" "OSPF area ID in IP address format\n" @@ -1612,7 +1612,7 @@ DEFUN (no_ospf_area_shortcut, DEFUN (ospf_area_stub, ospf_area_stub_cmd, - "area (A.B.C.D|<0-4294967295>) stub", + "area stub", "OSPF area parameters\n" "OSPF area ID in IP address format\n" "OSPF area ID as a decimal value\n" @@ -1642,7 +1642,7 @@ DEFUN (ospf_area_stub, DEFUN (ospf_area_stub_no_summary, ospf_area_stub_no_summary_cmd, - "area (A.B.C.D|<0-4294967295>) stub no-summary", + "area stub no-summary", "OSPF stub parameters\n" "OSPF area ID in IP address format\n" "OSPF area ID as a decimal value\n" @@ -1673,7 +1673,7 @@ DEFUN (ospf_area_stub_no_summary, DEFUN (no_ospf_area_stub, no_ospf_area_stub_cmd, - "no area (A.B.C.D|<0-4294967295>) stub", + "no area stub", NO_STR "OSPF area parameters\n" "OSPF area ID in IP address format\n" @@ -1697,7 +1697,7 @@ DEFUN (no_ospf_area_stub, DEFUN (no_ospf_area_stub_no_summary, no_ospf_area_stub_no_summary_cmd, - "no area (A.B.C.D|<0-4294967295>) stub no-summary", + "no area stub no-summary", NO_STR "OSPF area parameters\n" "OSPF area ID in IP address format\n" @@ -1769,7 +1769,7 @@ ospf_area_nssa_cmd_handler (struct vty *vty, int argc, const char *argv[], DEFUN (ospf_area_nssa_translate_no_summary, ospf_area_nssa_translate_no_summary_cmd, - "area (A.B.C.D|<0-4294967295>) nssa (translate-candidate|translate-never|translate-always) no-summary", + "area nssa no-summary", "OSPF area parameters\n" "OSPF area ID in IP address format\n" "OSPF area ID as a decimal value\n" @@ -1784,7 +1784,7 @@ DEFUN (ospf_area_nssa_translate_no_summary, DEFUN (ospf_area_nssa_translate, ospf_area_nssa_translate_cmd, - "area (A.B.C.D|<0-4294967295>) nssa (translate-candidate|translate-never|translate-always)", + "area nssa ", "OSPF area parameters\n" "OSPF area ID in IP address format\n" "OSPF area ID as a decimal value\n" @@ -1798,7 +1798,7 @@ DEFUN (ospf_area_nssa_translate, DEFUN (ospf_area_nssa, ospf_area_nssa_cmd, - "area (A.B.C.D|<0-4294967295>) nssa", + "area nssa", "OSPF area parameters\n" "OSPF area ID in IP address format\n" "OSPF area ID as a decimal value\n" @@ -1809,7 +1809,7 @@ DEFUN (ospf_area_nssa, DEFUN (ospf_area_nssa_no_summary, ospf_area_nssa_no_summary_cmd, - "area (A.B.C.D|<0-4294967295>) nssa no-summary", + "area nssa no-summary", "OSPF area parameters\n" "OSPF area ID in IP address format\n" "OSPF area ID as a decimal value\n" @@ -1835,7 +1835,7 @@ DEFUN (ospf_area_nssa_no_summary, */ DEFUN (no_ospf_area_nssa, no_ospf_area_nssa_cmd, - "no area (A.B.C.D|<0-4294967295>) nssa", + "no area nssa", NO_STR "OSPF area parameters\n" "OSPF area ID in IP address format\n" @@ -1862,7 +1862,7 @@ DEFUN (no_ospf_area_nssa, DEFUN (ospf_area_default_cost, ospf_area_default_cost_cmd, - "area (A.B.C.D|<0-4294967295>) default-cost <0-16777215>", + "area default-cost (0-16777215)", "OSPF area parameters\n" "OSPF area ID in IP address format\n" "OSPF area ID as a decimal value\n" @@ -1906,7 +1906,7 @@ DEFUN (ospf_area_default_cost, DEFUN (no_ospf_area_default_cost, no_ospf_area_default_cost_cmd, - "no area (A.B.C.D|<0-4294967295>) default-cost <0-16777215>", + "no area default-cost (0-16777215)", NO_STR "OSPF area parameters\n" "OSPF area ID in IP address format\n" @@ -1955,7 +1955,7 @@ DEFUN (no_ospf_area_default_cost, DEFUN (ospf_area_export_list, ospf_area_export_list_cmd, - "area (A.B.C.D|<0-4294967295>) export-list NAME", + "area export-list NAME", "OSPF area parameters\n" "OSPF area ID in IP address format\n" "OSPF area ID as a decimal value\n" @@ -1980,7 +1980,7 @@ DEFUN (ospf_area_export_list, DEFUN (no_ospf_area_export_list, no_ospf_area_export_list_cmd, - "no area (A.B.C.D|<0-4294967295>) export-list NAME", + "no area export-list NAME", NO_STR "OSPF area parameters\n" "OSPF area ID in IP address format\n" @@ -2010,7 +2010,7 @@ DEFUN (no_ospf_area_export_list, DEFUN (ospf_area_import_list, ospf_area_import_list_cmd, - "area (A.B.C.D|<0-4294967295>) import-list NAME", + "area import-list NAME", "OSPF area parameters\n" "OSPF area ID in IP address format\n" "OSPF area ID as a decimal value\n" @@ -2035,7 +2035,7 @@ DEFUN (ospf_area_import_list, DEFUN (no_ospf_area_import_list, no_ospf_area_import_list_cmd, - "no area (A.B.C.D|<0-4294967295>) import-list NAME", + "no area import-list NAME", NO_STR "OSPF area parameters\n" "OSPF area ID in IP address format\n" @@ -2064,7 +2064,7 @@ DEFUN (no_ospf_area_import_list, DEFUN (ospf_area_filter_list, ospf_area_filter_list_cmd, - "area (A.B.C.D|<0-4294967295>) filter-list prefix WORD (in|out)", + "area filter-list prefix WORD ", "OSPF area parameters\n" "OSPF area ID in IP address format\n" "OSPF area ID as a decimal value\n" @@ -2111,7 +2111,7 @@ DEFUN (ospf_area_filter_list, DEFUN (no_ospf_area_filter_list, no_ospf_area_filter_list_cmd, - "no area (A.B.C.D|<0-4294967295>) filter-list prefix WORD (in|out)", + "no area filter-list prefix WORD ", NO_STR "OSPF area parameters\n" "OSPF area ID in IP address format\n" @@ -2170,7 +2170,7 @@ DEFUN (no_ospf_area_filter_list, DEFUN (ospf_area_authentication_message_digest, ospf_area_authentication_message_digest_cmd, - "area (A.B.C.D|<0-4294967295>) authentication message-digest", + "area authentication message-digest", "OSPF area parameters\n" "OSPF area ID in IP address format\n" "OSPF area ID as a decimal value\n" @@ -2195,7 +2195,7 @@ DEFUN (ospf_area_authentication_message_digest, DEFUN (ospf_area_authentication, ospf_area_authentication_cmd, - "area (A.B.C.D|<0-4294967295>) authentication", + "area authentication", "OSPF area parameters\n" "OSPF area ID in IP address format\n" "OSPF area ID as a decimal value\n" @@ -2219,7 +2219,7 @@ DEFUN (ospf_area_authentication, DEFUN (no_ospf_area_authentication, no_ospf_area_authentication_cmd, - "no area (A.B.C.D|<0-4294967295>) authentication", + "no area authentication", NO_STR "OSPF area parameters\n" "OSPF area ID in IP address format\n" @@ -2250,7 +2250,7 @@ DEFUN (no_ospf_area_authentication, DEFUN (ospf_abr_type, ospf_abr_type_cmd, - "ospf abr-type (cisco|ibm|shortcut|standard)", + "ospf abr-type ", "OSPF specific commands\n" "Set OSPF ABR type\n" "Alternative ABR, cisco implementation\n" @@ -2287,7 +2287,7 @@ DEFUN (ospf_abr_type, DEFUN (no_ospf_abr_type, no_ospf_abr_type_cmd, - "no ospf abr-type (cisco|ibm|shortcut|standard)", + "no ospf abr-type ", NO_STR "OSPF specific commands\n" "Set OSPF ABR type\n" @@ -2461,7 +2461,7 @@ ospf_timers_spf_set (struct vty *vty, unsigned int delay, DEFUN (ospf_timers_min_ls_interval, ospf_timers_min_ls_interval_cmd, - "timers throttle lsa all <0-5000>", + "timers throttle lsa all (0-5000)", "Adjust routing timers\n" "Throttling adaptive timer\n" "LSA delay between transmissions\n" @@ -2516,7 +2516,7 @@ DEFUN (no_ospf_timers_min_ls_interval, DEFUN (ospf_timers_min_ls_arrival, ospf_timers_min_ls_arrival_cmd, - "timers lsa arrival <0-1000>", + "timers lsa arrival (0-1000)", "Adjust routing timers\n" "Throttling link state advertisement delays\n" "OSPF minimum arrival interval delay\n" @@ -2572,7 +2572,7 @@ DEFUN (no_ospf_timers_min_ls_arrival, DEFUN (ospf_timers_throttle_spf, ospf_timers_throttle_spf_cmd, - "timers throttle spf <0-600000> <0-600000> <0-600000>", + "timers throttle spf (0-600000) (0-600000) (0-600000)", "Adjust routing timers\n" "Throttling adaptive timer\n" "OSPF SPF timers\n" @@ -2624,7 +2624,7 @@ DEFUN (no_ospf_timers_throttle_spf, DEFUN (ospf_timers_lsa, ospf_timers_lsa_cmd, - "timers lsa min-arrival <0-600000>", + "timers lsa min-arrival (0-600000)", "Adjust routing timers\n" "OSPF LSA timers\n" "Minimum delay in receiving new version of a LSA\n" @@ -2752,7 +2752,7 @@ DEFUN (ospf_neighbor, */ DEFUN (ospf_neighbor_poll_interval, ospf_neighbor_poll_interval_cmd, - "neighbor A.B.C.D poll-interval <1-65535>", + "neighbor A.B.C.D poll-interval (1-65535)", NEIGHBOR_STR "Neighbor IP address\n" "Dead Neighbor Polling interval\n" @@ -2845,7 +2845,7 @@ DEFUN (no_ospf_neighbor, DEFUN (ospf_refresh_timer, ospf_refresh_timer_cmd, - "refresh timer <10-1800>", + "refresh timer (10-1800)", "Adjust refresh parameters\n" "Set refresh timer\n" "Timer value in seconds\n") @@ -2873,7 +2873,7 @@ DEFUN (ospf_refresh_timer, */ DEFUN (no_ospf_refresh_timer, no_ospf_refresh_timer_val_cmd, - "no refresh timer <10-1800>", + "no refresh timer (10-1800)", "Adjust refresh parameters\n" "Unset refresh timer\n" "Timer value in seconds\n") @@ -2901,7 +2901,7 @@ DEFUN (no_ospf_refresh_timer, DEFUN (ospf_auto_cost_reference_bandwidth, ospf_auto_cost_reference_bandwidth_cmd, - "auto-cost reference-bandwidth <1-4294967>", + "auto-cost reference-bandwidth (1-4294967)", "Calculate OSPF interface cost according to bandwidth\n" "Use reference bandwidth method to assign OSPF cost\n" "The reference bandwidth in terms of Mbits per second\n") @@ -2978,7 +2978,7 @@ DEFUN (no_ospf_auto_cost_reference_bandwidth, */ DEFUN (ospf_write_multiplier, ospf_write_multiplier_cmd, - "ospf write-multiplier <1-100>", + "ospf write-multiplier (1-100)", "OSPF specific commands\n" "Write multiplier\n" "Maximum number of interface serviced per write\n") @@ -3015,7 +3015,7 @@ DEFUN (ospf_write_multiplier, */ DEFUN (no_ospf_write_multiplier, no_ospf_write_multiplier_cmd, - "no ospf write-multiplier <1-100>", + "no ospf write-multiplier (1-100)", NO_STR "OSPF specific commands\n" "Write multiplier\n" @@ -3618,7 +3618,7 @@ DEFUN (show_ip_ospf, DEFUN (show_ip_ospf_instance, show_ip_ospf_instance_cmd, - "show ip ospf <1-65535> [json]", + "show ip ospf (1-65535) [json]", SHOW_STR IP_STR "OSPF information\n" @@ -4028,7 +4028,7 @@ DEFUN (show_ip_ospf_interface, DEFUN (show_ip_ospf_instance_interface, show_ip_ospf_instance_interface_cmd, - "show ip ospf <1-65535> interface [INTERFACE] [json]", + "show ip ospf (1-65535) interface [INTERFACE] [json]", SHOW_STR IP_STR "OSPF information\n" @@ -4185,7 +4185,7 @@ DEFUN (show_ip_ospf_neighbor, DEFUN (show_ip_ospf_instance_neighbor, show_ip_ospf_instance_neighbor_cmd, - "show ip ospf <1-65535> neighbor [json]", + "show ip ospf (1-65535) neighbor [json]", SHOW_STR IP_STR "OSPF information\n" @@ -4296,7 +4296,7 @@ DEFUN (show_ip_ospf_neighbor_all, DEFUN (show_ip_ospf_instance_neighbor_all, show_ip_ospf_instance_neighbor_all_cmd, - "show ip ospf <1-65535> neighbor all [json]", + "show ip ospf (1-65535) neighbor all [json]", SHOW_STR IP_STR "OSPF information\n" @@ -4390,7 +4390,7 @@ DEFUN (show_ip_ospf_neighbor_int, DEFUN (show_ip_ospf_instance_neighbor_int, show_ip_ospf_instance_neighbor_int_cmd, - "show ip ospf <1-65535> neighbor IFNAME [json]", + "show ip ospf (1-65535) neighbor IFNAME [json]", SHOW_STR IP_STR "OSPF information\n" @@ -4756,7 +4756,7 @@ DEFUN (show_ip_ospf_neighbor_id, DEFUN (show_ip_ospf_instance_neighbor_id, show_ip_ospf_instance_neighbor_id_cmd, - "show ip ospf <1-65535> neighbor A.B.C.D [json]", + "show ip ospf (1-65535) neighbor A.B.C.D [json]", SHOW_STR IP_STR "OSPF information\n" @@ -4847,7 +4847,7 @@ DEFUN (show_ip_ospf_neighbor_detail, DEFUN (show_ip_ospf_instance_neighbor_detail, show_ip_ospf_instance_neighbor_detail_cmd, - "show ip ospf <1-65535> neighbor detail [json]", + "show ip ospf (1-65535) neighbor detail [json]", SHOW_STR IP_STR "OSPF information\n" @@ -4945,7 +4945,7 @@ DEFUN (show_ip_ospf_neighbor_detail_all, DEFUN (show_ip_ospf_instance_neighbor_detail_all, show_ip_ospf_instance_neighbor_detail_all_cmd, - "show ip ospf <1-65535> neighbor detail all [json]", + "show ip ospf (1-65535) neighbor detail all [json]", SHOW_STR IP_STR "OSPF information\n" @@ -5047,7 +5047,7 @@ DEFUN (show_ip_ospf_neighbor_int_detail, DEFUN (show_ip_ospf_instance_neighbor_int_detail, show_ip_ospf_instance_neighbor_int_detail_cmd, - "show ip ospf <1-65535> neighbor IFNAME detail [json]", + "show ip ospf (1-65535) neighbor IFNAME detail [json]", SHOW_STR IP_STR "OSPF information\n" @@ -5889,7 +5889,7 @@ DEFUN (show_ip_ospf_database, */ DEFUN (show_ip_ospf_instance_database, show_ip_ospf_instance_database_cmd, - "show ip ospf <1-65535> database", + "show ip ospf (1-65535) database", SHOW_STR IP_STR "OSPF information\n" @@ -5979,7 +5979,7 @@ show_ip_ospf_database_type_adv_router_common (struct vty *vty, struct ospf *ospf */ DEFUN (show_ip_ospf_database_type_adv_router, show_ip_ospf_database_type_adv_router_cmd, - "show ip ospf database (" OSPF_LSA_TYPES_CMD_STR ") adv-router A.B.C.D", + "show ip ospf database <" OSPF_LSA_TYPES_CMD_STR "> adv-router A.B.C.D", SHOW_STR IP_STR "OSPF information\n" @@ -6011,7 +6011,7 @@ DEFUN (show_ip_ospf_database_type_adv_router, */ DEFUN (show_ip_ospf_instance_database_type_adv_router, show_ip_ospf_instance_database_type_adv_router_cmd, - "show ip ospf <1-65535> database (" OSPF_LSA_TYPES_CMD_STR ") adv-router A.B.C.D", + "show ip ospf (1-65535) database <" OSPF_LSA_TYPES_CMD_STR "> adv-router A.B.C.D", SHOW_STR IP_STR "OSPF information\n" @@ -6045,7 +6045,7 @@ DEFUN (show_ip_ospf_instance_database_type_adv_router, */ DEFUN (ip_ospf_authentication_args, ip_ospf_authentication_args_addr_cmd, - "ip ospf authentication (null|message-digest) A.B.C.D", + "ip ospf authentication A.B.C.D", "IP Information\n" "OSPF interface commands\n" "Enable authentication on this interface\n" @@ -6154,7 +6154,7 @@ DEFUN (ip_ospf_authentication, */ DEFUN (no_ip_ospf_authentication_args, no_ip_ospf_authentication_args_addr_cmd, - "no ip ospf authentication (null|message-digest) A.B.C.D", + "no ip ospf authentication A.B.C.D", NO_STR "IP Information\n" "OSPF interface commands\n" @@ -6488,7 +6488,7 @@ DEFUN (no_ip_ospf_authentication_key, */ DEFUN (ip_ospf_message_digest_key, ip_ospf_message_digest_key_addr_cmd, - "ip ospf message-digest-key <1-255> md5 KEY A.B.C.D", + "ip ospf message-digest-key (1-255) md5 KEY A.B.C.D", "IP Information\n" "OSPF interface commands\n" "Message digest authentication password (key)\n" @@ -6563,7 +6563,7 @@ ALIAS_HIDDEN (ip_ospf_message_digest_key, */ DEFUN (no_ip_ospf_message_digest_key_md5, no_ip_ospf_message_digest_key_md5_addr_cmd, - "no ip ospf message-digest-key <1-255> md5 KEY A.B.C.D", + "no ip ospf message-digest-key (1-255) md5 KEY A.B.C.D", NO_STR "IP Information\n" "OSPF interface commands\n" @@ -6636,7 +6636,7 @@ DEFUN (no_ip_ospf_message_digest_key_md5, */ DEFUN (no_ip_ospf_message_digest_key, no_ip_ospf_message_digest_key_addr_cmd, - "no ip ospf message-digest-key <1-255> A.B.C.D", + "no ip ospf message-digest-key (1-255) A.B.C.D", NO_STR "IP Information\n" "OSPF interface commands\n" @@ -6701,7 +6701,7 @@ DEFUN (no_ip_ospf_message_digest_key, */ DEFUN (ip_ospf_cost, ip_ospf_cost_u32_inet4_cmd, - "ip ospf cost <1-65535> A.B.C.D", + "ip ospf cost (1-65535) A.B.C.D", "IP Information\n" "OSPF interface commands\n" "Interface cost\n" @@ -6857,7 +6857,7 @@ DEFUN (no_ip_ospf_cost, */ DEFUN (no_ip_ospf_cost2, no_ip_ospf_cost_u32_cmd, - "no ip ospf cost <1-65535>", + "no ip ospf cost (1-65535)", NO_STR "IP Information\n" "OSPF interface commands\n" @@ -7023,7 +7023,7 @@ ospf_vty_dead_interval_set (struct vty *vty, const char *interval_str, */ DEFUN (ip_ospf_dead_interval, ip_ospf_dead_interval_addr_cmd, - "ip ospf dead-interval <1-65535> A.B.C.D", + "ip ospf dead-interval (1-65535) A.B.C.D", "IP Information\n" "OSPF interface commands\n" "Interval after which a neighbor is declared dead\n" @@ -7057,7 +7057,7 @@ ALIAS_HIDDEN (ip_ospf_dead_interval, */ DEFUN (ip_ospf_dead_interval_minimal, ip_ospf_dead_interval_minimal_addr_cmd, - "ip ospf dead-interval minimal hello-multiplier <1-10> A.B.C.D", + "ip ospf dead-interval minimal hello-multiplier (1-10) A.B.C.D", "IP Information\n" "OSPF interface commands\n" "Interval after which a neighbor is declared dead\n" @@ -7115,7 +7115,7 @@ DEFUN (ip_ospf_dead_interval_minimal, */ DEFUN (no_ip_ospf_dead_interval, no_ip_ospf_dead_interval_addr_cmd, - "no ip ospf dead-interval <1-65535> A.B.C.D", + "no ip ospf dead-interval (1-65535) A.B.C.D", NO_STR "IP Information\n" "OSPF interface commands\n" @@ -7198,7 +7198,7 @@ DEFUN (no_ip_ospf_dead_interval, */ DEFUN (ip_ospf_hello_interval, ip_ospf_hello_interval_addr_cmd, - "ip ospf hello-interval <1-65535> A.B.C.D", + "ip ospf hello-interval (1-65535) A.B.C.D", "IP Information\n" "OSPF interface commands\n" "Time between HELLO packets\n" @@ -7274,7 +7274,7 @@ ALIAS_HIDDEN (ip_ospf_hello_interval, */ DEFUN (no_ip_ospf_hello_interval, no_ip_ospf_hello_interval_addr_cmd, - "no ip ospf hello-interval <1-65535> A.B.C.D", + "no ip ospf hello-interval (1-65535) A.B.C.D", NO_STR "IP Information\n" "OSPF interface commands\n" @@ -7322,7 +7322,7 @@ DEFUN (no_ip_ospf_hello_interval, DEFUN (ip_ospf_network, ip_ospf_network_cmd, - "ip ospf network (broadcast|non-broadcast|point-to-multipoint|point-to-point)", + "ip ospf network ", "IP Information\n" "OSPF interface commands\n" "Network type\n" @@ -7461,7 +7461,7 @@ DEFUN (no_ip_ospf_network, */ DEFUN (ip_ospf_priority, ip_ospf_priority_addr_cmd, - "ip ospf priority <0-255> A.B.C.D", + "ip ospf priority (0-255) A.B.C.D", "IP Information\n" "OSPF interface commands\n" "Router priority\n" @@ -7553,7 +7553,7 @@ ALIAS_HIDDEN (ip_ospf_priority, */ DEFUN (no_ip_ospf_priority, no_ip_ospf_priority_addr_cmd, - "no ip ospf priority <0-255> A.B.C.D", + "no ip ospf priority (0-255) A.B.C.D", NO_STR "IP Information\n" "OSPF interface commands\n" @@ -7627,7 +7627,7 @@ DEFUN (no_ip_ospf_priority, */ DEFUN (ip_ospf_retransmit_interval, ip_ospf_retransmit_interval_addr_cmd, - "ip ospf retransmit-interval <3-65535> A.B.C.D", + "ip ospf retransmit-interval (3-65535) A.B.C.D", "IP Information\n" "OSPF interface commands\n" "Time between retransmitting lost link state advertisements\n" @@ -7756,7 +7756,7 @@ DEFUN (no_ip_ospf_retransmit_interval, DEFUN (no_ip_ospf_retransmit_interval_sec, no_ip_ospf_retransmit_interval_sec_cmd, - "no ip ospf retransmit-interval <3-65535>", + "no ip ospf retransmit-interval (3-65535)", NO_STR "IP Information\n" "OSPF interface commands\n" @@ -7787,7 +7787,7 @@ DEFUN (no_ip_ospf_retransmit_interval_sec, */ DEFUN (ip_ospf_transmit_delay, ip_ospf_transmit_delay_addr_cmd, - "ip ospf transmit-delay <1-65535> A.B.C.D", + "ip ospf transmit-delay (1-65535) A.B.C.D", "IP Information\n" "OSPF interface commands\n" "Link state transmit delay\n" @@ -7915,7 +7915,7 @@ DEFUN (no_ip_ospf_transmit_delay, DEFUN (no_ip_ospf_transmit_delay_sec, no_ip_ospf_transmit_delay_sec_cmd, - "no ip ospf transmit-delay <1-65535>", + "no ip ospf transmit-delay (1-65535)", NO_STR "IP Information\n" "OSPF interface commands\n" @@ -7948,7 +7948,7 @@ DEFUN (no_ip_ospf_transmit_delay_sec, */ DEFUN (ip_ospf_area, ip_ospf_area_cmd, - "ip ospf area (A.B.C.D|<0-4294967295>)", + "ip ospf area ", "IP Information\n" "OSPF interface commands\n" "Enable OSPF on this interface\n" @@ -8072,7 +8072,7 @@ DEFUN (no_ip_ospf_area, */ DEFUN (no_ip_ospf_instance_area, no_ip_ospf_instance_area_cmd, - "no ip ospf <1-65535> area", + "no ip ospf (1-65535) area", NO_STR "IP Information\n" "OSPF interface commands\n" @@ -8104,7 +8104,7 @@ DEFUN (no_ip_ospf_instance_area, DEFUN (ospf_redistribute_source, ospf_redistribute_source_cmd, - "redistribute " QUAGGA_REDIST_STR_OSPFD " {metric <0-16777214>|metric-type (1|2)|route-map WORD}", + "redistribute " QUAGGA_REDIST_STR_OSPFD " [metric (0-16777214)|metric-type <1|2>|route-map WORD]", REDIST_STR QUAGGA_REDIST_HELP_STR_OSPFD "Metric for redistributed routes\n" @@ -8157,7 +8157,7 @@ DEFUN (ospf_redistribute_source, DEFUN (no_ospf_redistribute_source, no_ospf_redistribute_source_cmd, - "no redistribute " QUAGGA_REDIST_STR_OSPFD " {metric <0-16777214>|metric-type (1|2)|route-map WORD}", + "no redistribute " QUAGGA_REDIST_STR_OSPFD " [metric (0-16777214)|metric-type <1|2>|route-map WORD]", NO_STR REDIST_STR QUAGGA_REDIST_HELP_STR_OSPFD @@ -8189,7 +8189,7 @@ DEFUN (no_ospf_redistribute_source, DEFUN (ospf_redistribute_instance_source, ospf_redistribute_instance_source_cmd, - "redistribute (ospf|table) <1-65535> {metric <0-16777214>|metric-type (1|2)|route-map WORD}", + "redistribute (1-65535) [metric (0-16777214)|metric-type <1|2>|route-map WORD]", REDIST_STR "Open Shortest Path First\n" "Non-main Kernel Routing Table\n" @@ -8257,7 +8257,7 @@ DEFUN (ospf_redistribute_instance_source, DEFUN (no_ospf_redistribute_instance_source, no_ospf_redistribute_instance_source_cmd, - "no redistribute (ospf|table) <1-65535> {metric <0-16777214>|metric-type (1|2)|route-map WORD}", + "no redistribute (1-65535) [metric (0-16777214)|metric-type <1|2>|route-map WORD]", NO_STR REDIST_STR "Open Shortest Path First\n" @@ -8355,7 +8355,7 @@ DEFUN (no_ospf_distribute_list_out, /* Default information originate. */ DEFUN (ospf_default_information_originate, ospf_default_information_originate_cmd, - "default-information originate {always|metric <0-16777214>|metric-type (1|2)|route-map WORD}", + "default-information originate [always|metric (0-16777214)|metric-type <1|2>|route-map WORD]", "Control distribution of default information\n" "Distribute a default route\n" "Always advertise default route\n" @@ -8406,7 +8406,7 @@ DEFUN (ospf_default_information_originate, DEFUN (no_ospf_default_information_originate, no_ospf_default_information_originate_cmd, - "no default-information originate {always|metric <0-16777214>|metric-type (1|2)|route-map WORD}", + "no default-information originate [always|metric (0-16777214)|metric-type <1|2>|route-map WORD]", NO_STR "Control distribution of default information\n" "Distribute a default route\n" @@ -8449,7 +8449,7 @@ DEFUN (no_ospf_default_information_originate, DEFUN (ospf_default_metric, ospf_default_metric_cmd, - "default-metric <0-16777214>", + "default-metric (0-16777214)", "Set metric of redistributed routes\n" "Default metric\n") { @@ -8494,7 +8494,7 @@ DEFUN (no_ospf_default_metric, DEFUN (ospf_distance, ospf_distance_cmd, - "distance <1-255>", + "distance (1-255)", "Define an administrative distance\n" "OSPF Administrative distance\n") { @@ -8510,7 +8510,7 @@ DEFUN (ospf_distance, DEFUN (no_ospf_distance, no_ospf_distance_cmd, - "no distance <1-255>", + "no distance (1-255)", NO_STR "Define an administrative distance\n" "OSPF Administrative distance\n") @@ -8527,7 +8527,7 @@ DEFUN (no_ospf_distance, DEFUN (no_ospf_distance_ospf, no_ospf_distance_ospf_cmd, - "no distance ospf {intra-area <1-255>|inter-area <1-255>|external <1-255>}", + "no distance ospf [intra-area (1-255)|inter-area (1-255)|external (1-255)]", NO_STR "Define an administrative distance\n" "OSPF Administrative distance\n" @@ -8571,7 +8571,7 @@ DEFUN (no_ospf_distance_ospf, DEFUN (ospf_distance_ospf, ospf_distance_ospf_cmd, - "distance ospf {intra-area <1-255>|inter-area <1-255>|external <1-255>}", + "distance ospf [intra-area (1-255)|inter-area (1-255)|external (1-255)]", "Define an administrative distance\n" "OSPF Administrative distance\n" "Intra-area routes\n" @@ -8610,7 +8610,7 @@ DEFUN (ospf_distance_ospf, DEFUN (ospf_distance_source, ospf_distance_source_cmd, - "distance <1-255> A.B.C.D/M", + "distance (1-255) A.B.C.D/M", "Administrative distance\n" "Distance value\n" "IP source prefix\n") @@ -8627,7 +8627,7 @@ DEFUN (ospf_distance_source, DEFUN (no_ospf_distance_source, no_ospf_distance_source_cmd, - "no distance <1-255> A.B.C.D/M", + "no distance (1-255) A.B.C.D/M", NO_STR "Administrative distance\n" "Distance value\n" @@ -8645,7 +8645,7 @@ DEFUN (no_ospf_distance_source, DEFUN (ospf_distance_source_access_list, ospf_distance_source_access_list_cmd, - "distance <1-255> A.B.C.D/M WORD", + "distance (1-255) A.B.C.D/M WORD", "Administrative distance\n" "Distance value\n" "IP source prefix\n" @@ -8663,7 +8663,7 @@ DEFUN (ospf_distance_source_access_list, DEFUN (no_ospf_distance_source_access_list, no_ospf_distance_source_access_list_cmd, - "no distance <1-255> A.B.C.D/M WORD", + "no distance (1-255) A.B.C.D/M WORD", NO_STR "Administrative distance\n" "Distance value\n" @@ -8844,7 +8844,7 @@ DEFUN (no_ospf_max_metric_router_lsa_admin, DEFUN (ospf_max_metric_router_lsa_startup, ospf_max_metric_router_lsa_startup_cmd, - "max-metric router-lsa on-startup <5-86400>", + "max-metric router-lsa on-startup (5-86400)", "OSPF maximum / infinite-distance metric\n" "Advertise own Router-LSA with infinite distance (stub router)\n" "Automatically advertise stub Router-LSA on startup of OSPF\n" @@ -8880,7 +8880,7 @@ DEFUN (ospf_max_metric_router_lsa_startup, */ DEFUN (no_ospf_max_metric_router_lsa_startup, no_ospf_max_metric_router_lsa_startup_cmd, - "no max-metric router-lsa on-startup <5-86400>", + "no max-metric router-lsa on-startup (5-86400)", NO_STR "OSPF maximum / infinite-distance metric\n" "Advertise own Router-LSA with infinite distance (stub router)\n" @@ -8914,7 +8914,7 @@ DEFUN (no_ospf_max_metric_router_lsa_startup, DEFUN (ospf_max_metric_router_lsa_shutdown, ospf_max_metric_router_lsa_shutdown_cmd, - "max-metric router-lsa on-shutdown <5-100>", + "max-metric router-lsa on-shutdown (5-100)", "OSPF maximum / infinite-distance metric\n" "Advertise own Router-LSA with infinite distance (stub router)\n" "Advertise stub-router prior to full shutdown of OSPF\n" @@ -8953,7 +8953,7 @@ DEFUN (ospf_max_metric_router_lsa_shutdown, */ DEFUN (no_ospf_max_metric_router_lsa_shutdown, no_ospf_max_metric_router_lsa_shutdown_cmd, - "no max-metric router-lsa on-shutdown <5-100>", + "no max-metric router-lsa on-shutdown (5-100)", NO_STR "OSPF maximum / infinite-distance metric\n" "Advertise own Router-LSA with infinite distance (stub router)\n" @@ -9187,7 +9187,7 @@ DEFUN (show_ip_ospf_border_routers, DEFUN (show_ip_ospf_instance_border_routers, show_ip_ospf_instance_border_routers_cmd, - "show ip ospf <1-65535> border-routers", + "show ip ospf (1-65535) border-routers", SHOW_STR IP_STR "OSPF information\n" @@ -9249,7 +9249,7 @@ DEFUN (show_ip_ospf_route, DEFUN (show_ip_ospf_instance_route, show_ip_ospf_instance_route_cmd, - "show ip ospf <1-65535> route", + "show ip ospf (1-65535) route", SHOW_STR IP_STR "OSPF information\n" diff --git a/ripd/rip_debug.c b/ripd/rip_debug.c index 0567f4f20..3566d28ff 100644 --- a/ripd/rip_debug.c +++ b/ripd/rip_debug.c @@ -90,7 +90,7 @@ DEFUN (debug_rip_packet, DEFUN (debug_rip_packet_direct, debug_rip_packet_direct_cmd, - "debug rip packet (recv|send)", + "debug rip packet ", DEBUG_STR RIP_STR "RIP packet\n" @@ -142,7 +142,7 @@ DEFUN (no_debug_rip_packet, DEFUN (no_debug_rip_packet_direct, no_debug_rip_packet_direct_cmd, - "no debug rip packet (recv|send)", + "no debug rip packet ", NO_STR DEBUG_STR RIP_STR diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c index 122a53eba..4ad750304 100644 --- a/ripd/rip_interface.c +++ b/ripd/rip_interface.c @@ -1220,7 +1220,7 @@ rip_passive_nondefault_clean (void) /* RIP enable network or interface configuration. */ DEFUN (rip_network, rip_network_cmd, - "network (A.B.C.D/M|WORD)", + "network ", "Enable routing on an IP network\n" "IP prefix /, e.g., 35.0.0.0/8\n" "Interface name\n") @@ -1248,7 +1248,7 @@ DEFUN (rip_network, /* RIP enable network or interface configuration. */ DEFUN (no_rip_network, no_rip_network_cmd, - "no network (A.B.C.D/M|WORD)", + "no network ", NO_STR "Enable routing on an IP network\n" "IP prefix /, e.g., 35.0.0.0/8\n" @@ -1323,7 +1323,7 @@ DEFUN (no_rip_neighbor, DEFUN (ip_rip_receive_version, ip_rip_receive_version_cmd, - "ip rip receive version (1|2)", + "ip rip receive version <1|2>", IP_STR "Routing Information Protocol\n" "Advertisement reception\n" @@ -1427,7 +1427,7 @@ DEFUN (no_ip_rip_receive_version, DEFUN (ip_rip_send_version, ip_rip_send_version_cmd, - "ip rip send version (1|2)", + "ip rip send version <1|2>", IP_STR "Routing Information Protocol\n" "Advertisement transmission\n" @@ -1545,7 +1545,7 @@ DEFUN (no_ip_rip_send_version, */ DEFUN (ip_rip_authentication_mode, ip_rip_authentication_mode_cmd, - "ip rip authentication mode (md5|text)", + "ip rip authentication mode ", IP_STR "Routing Information Protocol\n" "Authentication control\n" @@ -1873,7 +1873,7 @@ DEFUN (no_ip_rip_split_horizon_poisoned_reverse, DEFUN (rip_passive_interface, rip_passive_interface_cmd, - "passive-interface (IFNAME|default)", + "passive-interface ", "Suppress routing updates on an interface\n" "Interface name\n" "default for all interfaces\n") @@ -1893,7 +1893,7 @@ DEFUN (rip_passive_interface, DEFUN (no_rip_passive_interface, no_rip_passive_interface_cmd, - "no passive-interface (IFNAME|default)", + "no passive-interface ", NO_STR "Suppress routing updates on an interface\n" "Interface name\n" diff --git a/ripd/rip_offset.c b/ripd/rip_offset.c index be734c66d..f57c6684e 100644 --- a/ripd/rip_offset.c +++ b/ripd/rip_offset.c @@ -282,7 +282,7 @@ rip_offset_list_apply_out (struct prefix_ipv4 *p, struct interface *ifp, DEFUN (rip_offset_list, rip_offset_list_cmd, - "offset-list WORD (in|out) <0-16>", + "offset-list WORD (0-16)", "Modify RIP metric\n" "Access-list name\n" "For incoming updates\n" @@ -294,7 +294,7 @@ DEFUN (rip_offset_list, DEFUN (rip_offset_list_ifname, rip_offset_list_ifname_cmd, - "offset-list WORD (in|out) <0-16> IFNAME", + "offset-list WORD (0-16) IFNAME", "Modify RIP metric\n" "Access-list name\n" "For incoming updates\n" @@ -307,7 +307,7 @@ DEFUN (rip_offset_list_ifname, DEFUN (no_rip_offset_list, no_rip_offset_list_cmd, - "no offset-list WORD (in|out) <0-16>", + "no offset-list WORD (0-16)", NO_STR "Modify RIP metric\n" "Access-list name\n" @@ -320,7 +320,7 @@ DEFUN (no_rip_offset_list, DEFUN (no_rip_offset_list_ifname, no_rip_offset_list_ifname_cmd, - "no offset-list WORD (in|out) <0-16> IFNAME", + "no offset-list WORD (0-16) IFNAME", NO_STR "Modify RIP metric\n" "Access-list name\n" diff --git a/ripd/rip_routemap.c b/ripd/rip_routemap.c index 4bb5958e9..35e869172 100644 --- a/ripd/rip_routemap.c +++ b/ripd/rip_routemap.c @@ -737,7 +737,7 @@ static struct route_map_rule_cmd route_set_tag_cmd = DEFUN (match_metric, match_metric_cmd, - "match metric <0-4294967295>", + "match metric (0-4294967295)", MATCH_STR "Match metric of route\n" "Metric value\n") @@ -797,7 +797,7 @@ DEFUN (no_match_interface, DEFUN (match_ip_next_hop, match_ip_next_hop_cmd, - "match ip next-hop (<1-199>|<1300-2699>|WORD)", + "match ip next-hop <(1-199)|(1300-2699)|WORD>", MATCH_STR IP_STR "Match next-hop address of route\n" @@ -870,7 +870,7 @@ DEFUN (no_match_ip_next_hop_prefix_list, DEFUN (match_ip_address, match_ip_address_cmd, - "match ip address (<1-199>|<1300-2699>|WORD)", + "match ip address <(1-199)|(1300-2699)|WORD>", MATCH_STR IP_STR "Match address of route\n" @@ -944,7 +944,7 @@ DEFUN (no_match_ip_address_prefix_list, DEFUN (match_tag, match_tag_cmd, - "match tag <1-65535>", + "match tag (1-65535)", MATCH_STR "Match tag of route\n" "Metric value\n") @@ -984,7 +984,7 @@ DEFUN (no_match_tag, */ DEFUN (set_metric, set_metric_cmd, - "set metric <0-4294967295>", + "set metric (0-4294967295)", SET_STR "Metric value for destination routing protocol\n" "Metric value\n") @@ -1072,7 +1072,7 @@ DEFUN (no_set_ip_nexthop, DEFUN (set_tag, set_tag_cmd, - "set tag <1-65535>", + "set tag (1-65535)", SET_STR "Tag value for routing protocol\n" "Tag value\n") diff --git a/ripd/rip_zebra.c b/ripd/rip_zebra.c index 4ede048f9..56f4623f3 100644 --- a/ripd/rip_zebra.c +++ b/ripd/rip_zebra.c @@ -467,7 +467,7 @@ DEFUN (no_rip_redistribute_type_routemap, DEFUN (rip_redistribute_type_metric, rip_redistribute_type_metric_cmd, - "redistribute " QUAGGA_REDIST_STR_RIPD " metric <0-16>", + "redistribute " QUAGGA_REDIST_STR_RIPD " metric (0-16)", REDIST_STR QUAGGA_REDIST_HELP_STR_RIPD "Metric\n" @@ -497,7 +497,7 @@ DEFUN (rip_redistribute_type_metric, DEFUN (no_rip_redistribute_type_metric, no_rip_redistribute_type_metric_cmd, - "no redistribute " QUAGGA_REDIST_STR_RIPD " metric <0-16>", + "no redistribute " QUAGGA_REDIST_STR_RIPD " metric (0-16)", NO_STR REDIST_STR QUAGGA_REDIST_HELP_STR_RIPD @@ -526,7 +526,7 @@ DEFUN (no_rip_redistribute_type_metric, DEFUN (rip_redistribute_type_metric_routemap, rip_redistribute_type_metric_routemap_cmd, - "redistribute " QUAGGA_REDIST_STR_RIPD " metric <0-16> route-map WORD", + "redistribute " QUAGGA_REDIST_STR_RIPD " metric (0-16) route-map WORD", REDIST_STR QUAGGA_REDIST_HELP_STR_RIPD "Metric\n" @@ -560,7 +560,7 @@ DEFUN (rip_redistribute_type_metric_routemap, DEFUN (no_rip_redistribute_type_metric_routemap, no_rip_redistribute_type_metric_routemap_cmd, - "no redistribute " QUAGGA_REDIST_STR_RIPD " metric <0-16> route-map WORD", + "no redistribute " QUAGGA_REDIST_STR_RIPD " metric (0-16) route-map WORD", NO_STR REDIST_STR QUAGGA_REDIST_HELP_STR_RIPD diff --git a/ripd/ripd.c b/ripd/ripd.c index d483d1ef3..9fa11ef9a 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -2943,7 +2943,7 @@ DEFUN (no_router_rip, DEFUN (rip_version, rip_version_cmd, - "version <1-2>", + "version (1-2)", "Set routing protocol version\n" "version\n") { @@ -3075,7 +3075,7 @@ rip_update_default_metric (void) DEFUN (rip_default_metric, rip_default_metric_cmd, - "default-metric <1-16>", + "default-metric (1-16)", "Set a metric of redistribute routes\n" "Default metric\n") { @@ -3113,7 +3113,7 @@ DEFUN (no_rip_default_metric, DEFUN (rip_timers, rip_timers_cmd, - "timers basic <5-2147483647> <5-2147483647> <5-2147483647>", + "timers basic (5-2147483647) (5-2147483647) (5-2147483647)", "Adjust routing timers\n" "Basic routing protocol update timers\n" "Routing table update timer value in second. Default is 30.\n" @@ -3388,7 +3388,7 @@ rip_distance_show (struct vty *vty) DEFUN (rip_distance, rip_distance_cmd, - "distance <1-255>", + "distance (1-255)", "Administrative distance\n" "Distance value\n") { @@ -3398,7 +3398,7 @@ DEFUN (rip_distance, DEFUN (no_rip_distance, no_rip_distance_cmd, - "no distance <1-255>", + "no distance (1-255)", NO_STR "Administrative distance\n" "Distance value\n") @@ -3409,7 +3409,7 @@ DEFUN (no_rip_distance, DEFUN (rip_distance_source, rip_distance_source_cmd, - "distance <1-255> A.B.C.D/M", + "distance (1-255) A.B.C.D/M", "Administrative distance\n" "Distance value\n" "IP source prefix\n") @@ -3420,7 +3420,7 @@ DEFUN (rip_distance_source, DEFUN (no_rip_distance_source, no_rip_distance_source_cmd, - "no distance <1-255> A.B.C.D/M", + "no distance (1-255) A.B.C.D/M", NO_STR "Administrative distance\n" "Distance value\n" @@ -3432,7 +3432,7 @@ DEFUN (no_rip_distance_source, DEFUN (rip_distance_source_access_list, rip_distance_source_access_list_cmd, - "distance <1-255> A.B.C.D/M WORD", + "distance (1-255) A.B.C.D/M WORD", "Administrative distance\n" "Distance value\n" "IP source prefix\n" @@ -3444,7 +3444,7 @@ DEFUN (rip_distance_source_access_list, DEFUN (no_rip_distance_source_access_list, no_rip_distance_source_access_list_cmd, - "no distance <1-255> A.B.C.D/M WORD", + "no distance (1-255) A.B.C.D/M WORD", NO_STR "Administrative distance\n" "Distance value\n" diff --git a/ripngd/ripng_debug.c b/ripngd/ripng_debug.c index 73bfcb4d6..ecbba5b30 100644 --- a/ripngd/ripng_debug.c +++ b/ripngd/ripng_debug.c @@ -91,7 +91,7 @@ DEFUN (debug_ripng_packet, DEFUN (debug_ripng_packet_direct, debug_ripng_packet_direct_cmd, - "debug ripng packet (recv|send)", + "debug ripng packet ", DEBUG_STR "RIPng configuration\n" "Debug option set for ripng packet\n" @@ -144,7 +144,7 @@ DEFUN (no_debug_ripng_packet, DEFUN (no_debug_ripng_packet_direct, no_debug_ripng_packet_direct_cmd, - "no debug ripng packet (recv|send)", + "no debug ripng packet ", NO_STR DEBUG_STR "RIPng configuration\n" diff --git a/ripngd/ripng_offset.c b/ripngd/ripng_offset.c index 2fbfb33e3..46ca818c4 100644 --- a/ripngd/ripng_offset.c +++ b/ripngd/ripng_offset.c @@ -290,7 +290,7 @@ ripng_offset_list_apply_out (struct prefix_ipv6 *p, struct interface *ifp, DEFUN (ripng_offset_list, ripng_offset_list_cmd, - "offset-list WORD (in|out) <0-16>", + "offset-list WORD (0-16)", "Modify RIPng metric\n" "Access-list name\n" "For incoming updates\n" @@ -302,7 +302,7 @@ DEFUN (ripng_offset_list, DEFUN (ripng_offset_list_ifname, ripng_offset_list_ifname_cmd, - "offset-list WORD (in|out) <0-16> IFNAME", + "offset-list WORD (0-16) IFNAME", "Modify RIPng metric\n" "Access-list name\n" "For incoming updates\n" @@ -315,7 +315,7 @@ DEFUN (ripng_offset_list_ifname, DEFUN (no_ripng_offset_list, no_ripng_offset_list_cmd, - "no offset-list WORD (in|out) <0-16>", + "no offset-list WORD (0-16)", NO_STR "Modify RIPng metric\n" "Access-list name\n" @@ -328,7 +328,7 @@ DEFUN (no_ripng_offset_list, DEFUN (no_ripng_offset_list_ifname, no_ripng_offset_list_ifname_cmd, - "no offset-list WORD (in|out) <0-16> IFNAME", + "no offset-list WORD (0-16) IFNAME", NO_STR "Modify RIPng metric\n" "Access-list name\n" diff --git a/ripngd/ripng_routemap.c b/ripngd/ripng_routemap.c index 9c25d6003..0910f94a7 100644 --- a/ripngd/ripng_routemap.c +++ b/ripngd/ripng_routemap.c @@ -502,7 +502,7 @@ static struct route_map_rule_cmd route_set_tag_cmd = DEFUN (match_metric, match_metric_cmd, - "match metric <0-4294967295>", + "match metric (0-4294967295)", MATCH_STR "Match metric of route\n" "Metric value\n") @@ -562,7 +562,7 @@ DEFUN (no_match_interface, DEFUN (match_tag, match_tag_cmd, - "match tag <1-65535>", + "match tag (1-65535)", MATCH_STR "Match tag of route\n" "Metric value\n") @@ -594,7 +594,7 @@ DEFUN (no_match_tag, DEFUN (set_metric, set_metric_cmd, - "set metric <0-4294967295>", + "set metric (0-4294967295)", "Set value\n" "Metric value for destination routing protocol\n" "Metric value\n") @@ -676,7 +676,7 @@ DEFUN (no_set_ipv6_nexthop_local, DEFUN (set_tag, set_tag_cmd, - "set tag <1-65535>", + "set tag (1-65535)", SET_STR "Tag value for routing protocol\n" "Tag value\n") diff --git a/ripngd/ripng_zebra.c b/ripngd/ripng_zebra.c index 055a074cc..e45521195 100644 --- a/ripngd/ripng_zebra.c +++ b/ripngd/ripng_zebra.c @@ -394,7 +394,7 @@ DEFUN (no_ripng_redistribute_type, DEFUN (ripng_redistribute_type_metric, ripng_redistribute_type_metric_cmd, - "redistribute " QUAGGA_REDIST_STR_RIPNGD " metric <0-16>", + "redistribute " QUAGGA_REDIST_STR_RIPNGD " metric (0-16)", "Redistribute\n" QUAGGA_REDIST_HELP_STR_RIPNGD "Metric\n" @@ -446,7 +446,7 @@ DEFUN (ripng_redistribute_type_routemap, DEFUN (ripng_redistribute_type_metric_routemap, ripng_redistribute_type_metric_routemap_cmd, - "redistribute " QUAGGA_REDIST_STR_RIPNGD " metric <0-16> route-map WORD", + "redistribute " QUAGGA_REDIST_STR_RIPNGD " metric (0-16) route-map WORD", "Redistribute\n" QUAGGA_REDIST_HELP_STR_RIPNGD "Metric\n" diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c index dd8f1fc39..5e53d44b6 100644 --- a/ripngd/ripngd.c +++ b/ripngd/ripngd.c @@ -2389,7 +2389,7 @@ DEFUN (no_ripng_aggregate_address, DEFUN (ripng_default_metric, ripng_default_metric_cmd, - "default-metric <1-16>", + "default-metric (1-16)", "Set a metric of redistribute routes\n" "Default metric\n") { @@ -2528,7 +2528,7 @@ DEFUN (no_ripng_garbage_timer, DEFUN (ripng_timers, ripng_timers_cmd, - "timers basic <0-65535> <0-65535> <0-65535>", + "timers basic (0-65535) (0-65535) (0-65535)", "RIPng timers setup\n" "Basic timer\n" "Routing table update timer value in second. Default is 30.\n" diff --git a/tools/argv_translator.py b/tools/argv_translator.py index 08a680066..1c8f0c7e5 100755 --- a/tools/argv_translator.py +++ b/tools/argv_translator.py @@ -21,6 +21,10 @@ def token_is_variable(line_number, token): assert token.endswith(']'), "%d: token %s should end with ]" % (line_number, token) return True + if token.startswith('<'): + assert token.endswith('>'), "%d: token %s should end with >" % (line_number, token) + return True + if token.startswith('{'): # I don't really care about checking for this I just put # these asserts in here to bug sharpd @@ -246,7 +250,7 @@ DEFUN (no_bgp_maxmed_onstartup, while re_argv: index = int(re_argv.group(1)) if index not in variable_indexes and index <= max_index: - raise Exception("%d: index %s is not a variable in the command string" % (self.line_number, index)) + print "%d: index %s is not a variable in the command string" % (self.line_number, index) tmp_line = re_argv.group(2) re_argv = re.search('^.*?argv\[(\d+)\]->arg(.*)$', tmp_line) @@ -341,6 +345,7 @@ def update_argvs(filename): line = line.replace('" QUAGGA_REDIST_STR_RIPD "', '(kernel|connected|static|ospf|isis|bgp|pim|table)') line = line.replace('" QUAGGA_REDIST_STR_OSPF6D "', '(kernel|connected|static|ripng|isis|bgp|table)') line = line.replace('" QUAGGA_REDIST_STR_ISISD "', '(kernel|connected|static|rip|ripng|ospf|ospf6|bgp|pim|table)') + line = line.replace('" LOG_FACILITIES "', '(kern|user|mail|daemon|auth|syslog|lpr|news|uucp|cron|local0|local1|local2|local3|local4|local5|local6|local7)') # endswith line = line.replace('" CMD_AS_RANGE,', ' <1-4294967295>",') @@ -371,6 +376,7 @@ def update_argvs(filename): line = line.replace('" PIM_CMD_IP_IGMP_QUERY_MAX_RESPONSE_TIME,', ' ip igmp query-max-response-time",') line = line.replace('" QUAGGA_REDIST_STR_OSPF6D,', ' (kernel|connected|static|ripng|isis|bgp|table)",') line = line.replace('" QUAGGA_REDIST_STR_ISISD,', ' (kernel|connected|static|rip|ripng|ospf|ospf6|bgp|pim|table)",') + line = line.replace('" LOG_FACILITIES,', ' (kern|user|mail|daemon|auth|syslog|lpr|news|uucp|cron|local0|local1|local2|local3|local4|local5|local6|local7)",') # startswith line = line.replace('LISTEN_RANGE_CMD "', '"bgp listen range (A.B.C.D/M|X:X::X:X/M) ') diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index f767c64d3..dd4131b70 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -1772,7 +1772,7 @@ DEFUN (vtysh_show_work_queues, DEFUN (vtysh_show_work_queues_daemon, vtysh_show_work_queues_daemon_cmd, - "show work-queues (zebra|ripd|ripngd|ospfd|ospf6d|bgpd|isisd)", + "show work-queues ", SHOW_STR "Work Queue information\n" "For the zebra daemon\n" @@ -2224,7 +2224,7 @@ DEFUN (vtysh_write_terminal, DEFUN (vtysh_write_terminal_daemon, vtysh_write_terminal_daemon_cmd, - "write terminal (zebra|ripd|ripngd|ospfd|ospf6d|bgpd|isisd|pimd)", + "write terminal ", "Write running configuration to memory, network, or terminal\n" "Write to terminal\n" "For the zebra daemon\n" @@ -2435,7 +2435,7 @@ ALIAS (vtysh_write_terminal, DEFUN (vtysh_terminal_length, vtysh_terminal_length_cmd, - "terminal length <0-512>", + "terminal length (0-512)", "Set terminal line parameters\n" "Set number of lines on a screen\n" "Number of lines on screen (0 for no pausing)\n") diff --git a/zebra/debug.c b/zebra/debug.c index fb3887c67..cbdcdf27f 100644 --- a/zebra/debug.c +++ b/zebra/debug.c @@ -123,7 +123,7 @@ DEFUN (debug_zebra_packet, DEFUN (debug_zebra_packet_direct, debug_zebra_packet_direct_cmd, - "debug zebra packet (recv|send|detail)", + "debug zebra packet ", DEBUG_STR "Zebra configuration\n" "Debug option set for zebra packet\n" @@ -142,7 +142,7 @@ DEFUN (debug_zebra_packet_direct, DEFUN (debug_zebra_packet_detail, debug_zebra_packet_detail_cmd, - "debug zebra packet (recv|send) detail", + "debug zebra packet detail", DEBUG_STR "Zebra configuration\n" "Debug option set for zebra packet\n" @@ -172,7 +172,7 @@ DEFUN (debug_zebra_kernel, DEFUN (debug_zebra_kernel_msgdump, debug_zebra_kernel_msgdump_cmd, - "debug zebra kernel msgdump {recv|send}", + "debug zebra kernel msgdump [recv|send]", DEBUG_STR "Zebra configuration\n" "Debug option set for zebra between kernel interface\n" @@ -259,7 +259,7 @@ DEFUN (no_debug_zebra_packet, DEFUN (no_debug_zebra_packet_direct, no_debug_zebra_packet_direct_cmd, - "no debug zebra packet (recv|send)", + "no debug zebra packet ", NO_STR DEBUG_STR "Zebra configuration\n" @@ -288,7 +288,7 @@ DEFUN (no_debug_zebra_kernel, DEFUN (no_debug_zebra_kernel_msgdump, no_debug_zebra_kernel_msgdump_cmd, - "no debug zebra kernel msgdump {recv|send}", + "no debug zebra kernel msgdump [recv|send]", DEBUG_STR "Zebra configuration\n" "Debug option set for zebra between kernel interface\n" diff --git a/zebra/interface.c b/zebra/interface.c index 5e2f64b54..1f1146e24 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1367,7 +1367,7 @@ DEFUN (show_interface_name_vrf, interface_update_stats (); if (argc > 1) - VRF_GET_ID (vrf_id, argv[3]->arg); + VRF_GET_ID (vrf_id, argv[4]->arg); /* Specified interface print. */ ifp = if_lookup_by_name_vrf (argv[2]->arg, vrf_id); @@ -1674,7 +1674,7 @@ DEFUN (no_shutdown_if, DEFUN (bandwidth_if, bandwidth_if_cmd, - "bandwidth <1-100000>", + "bandwidth (1-100000)", "Set bandwidth informational parameter\n" "Bandwidth in megabits\n") { @@ -1840,7 +1840,7 @@ DEFUN (no_link_params_enable, /* STANDARD TE metrics */ DEFUN (link_params_metric, link_params_metric_cmd, - "metric <0-4294967295>", + "metric (0-4294967295)", "Link metric for MPLS-TE purpose\n" "Metric value in decimal\n") { @@ -1948,7 +1948,7 @@ DEFUN (link_params_max_rsv_bw, DEFUN (link_params_unrsv_bw, link_params_unrsv_bw_cmd, - "unrsv-bw <0-7> BANDWIDTH", + "unrsv-bw (0-7) BANDWIDTH", "Unreserved bandwidth at each priority level\n" "Priority\n" "Bytes/second (IEEE floating point format)\n") @@ -2028,7 +2028,7 @@ DEFUN (no_link_params_admin_grp, /* RFC5392 & RFC5316: INTER-AS */ DEFUN (link_params_inter_as, link_params_inter_as_cmd, - "neighbor A.B.C.D as <1-4294967295>", + "neighbor A.B.C.D as (1-4294967295)", "Configure remote ASBR information (Neighbor IP address and AS number)\n" "Remote IP address in dot decimal A.B.C.D\n" "Remote AS number\n" @@ -2101,7 +2101,7 @@ DEFUN (no_link_params_inter_as, */ DEFUN (link_params_delay, link_params_delay_cmd, - "delay <0-16777215>", + "delay (0-16777215)", "Unidirectional Average Link Delay\n" "Average delay in micro-second as decimal (0...16777215)\n") { @@ -2208,7 +2208,7 @@ DEFUN (no_link_params_delay, DEFUN (link_params_delay_var, link_params_delay_var_cmd, - "delay-variation <0-16777215>", + "delay-variation (0-16777215)", "Unidirectional Link Delay Variation\n" "delay variation in micro-second as decimal (0...16777215)\n") { diff --git a/zebra/irdp_interface.c b/zebra/irdp_interface.c index d41373369..424f02788 100644 --- a/zebra/irdp_interface.c +++ b/zebra/irdp_interface.c @@ -463,7 +463,7 @@ DEFUN (no_ip_irdp_shutdown, DEFUN (ip_irdp_holdtime, ip_irdp_holdtime_cmd, - "ip irdp holdtime <0-9000>", + "ip irdp holdtime (0-9000)", IP_STR "ICMP Router discovery on this interface\n" "Set holdtime value\n" @@ -486,7 +486,7 @@ DEFUN (ip_irdp_holdtime, DEFUN (ip_irdp_minadvertinterval, ip_irdp_minadvertinterval_cmd, - "ip irdp minadvertinterval <3-1800>", + "ip irdp minadvertinterval (3-1800)", IP_STR "ICMP Router discovery on this interface\n" "Set minimum time between advertisement\n" @@ -519,7 +519,7 @@ DEFUN (ip_irdp_minadvertinterval, DEFUN (ip_irdp_maxadvertinterval, ip_irdp_maxadvertinterval_cmd, - "ip irdp maxadvertinterval <4-1800>", + "ip irdp maxadvertinterval (4-1800)", IP_STR "ICMP Router discovery on this interface\n" "Set maximum time between advertisement\n" @@ -558,7 +558,7 @@ DEFUN (ip_irdp_maxadvertinterval, DEFUN (ip_irdp_preference, ip_irdp_preference_cmd, - "ip irdp preference <0-2147483647>", + "ip irdp preference (0-2147483647)", IP_STR "ICMP Router discovery on this interface\n" "Set default preference level for this interface\n" @@ -581,7 +581,7 @@ DEFUN (ip_irdp_preference, DEFUN (ip_irdp_address_preference, ip_irdp_address_preference_cmd, - "ip irdp address A.B.C.D preference <0-2147483647>", + "ip irdp address A.B.C.D preference (0-2147483647)", IP_STR "Alter ICMP Router discovery preference this interface\n" "Specify IRDP non-default preference to advertise\n" @@ -625,7 +625,7 @@ DEFUN (ip_irdp_address_preference, DEFUN (no_ip_irdp_address_preference, no_ip_irdp_address_preference_cmd, - "no ip irdp address A.B.C.D preference <0-2147483647>", + "no ip irdp address A.B.C.D preference (0-2147483647)", NO_STR IP_STR "Alter ICMP Router discovery preference this interface\n" diff --git a/zebra/rtadv.c b/zebra/rtadv.c index d372c985f..c13d85a4d 100644 --- a/zebra/rtadv.c +++ b/zebra/rtadv.c @@ -917,7 +917,7 @@ DEFUN (no_ipv6_nd_suppress_ra, DEFUN (ipv6_nd_ra_interval_msec, ipv6_nd_ra_interval_msec_cmd, - "ipv6 nd ra-interval msec <70-1800000>", + "ipv6 nd ra-interval msec (70-1800000)", "Interface IPv6 config commands\n" "Neighbor discovery\n" "Router Advertisement interval\n" @@ -952,7 +952,7 @@ DEFUN (ipv6_nd_ra_interval_msec, DEFUN (ipv6_nd_ra_interval, ipv6_nd_ra_interval_cmd, - "ipv6 nd ra-interval <1-1800>", + "ipv6 nd ra-interval (1-1800)", "Interface IPv6 config commands\n" "Neighbor discovery\n" "Router Advertisement interval\n" @@ -1033,7 +1033,7 @@ DEFUN (no_ipv6_nd_ra_interval, DEFUN (ipv6_nd_ra_lifetime, ipv6_nd_ra_lifetime_cmd, - "ipv6 nd ra-lifetime <0-9000>", + "ipv6 nd ra-lifetime (0-9000)", "Interface IPv6 config commands\n" "Neighbor discovery\n" "Router lifetime\n" @@ -1095,7 +1095,7 @@ DEFUN (no_ipv6_nd_ra_lifetime, DEFUN (ipv6_nd_reachable_time, ipv6_nd_reachable_time_cmd, - "ipv6 nd reachable-time <1-3600000>", + "ipv6 nd reachable-time (1-3600000)", "Interface IPv6 config commands\n" "Neighbor discovery\n" "Reachable time\n" @@ -1139,7 +1139,7 @@ DEFUN (no_ipv6_nd_reachable_time, DEFUN (ipv6_nd_homeagent_preference, ipv6_nd_homeagent_preference_cmd, - "ipv6 nd home-agent-preference <0-65535>", + "ipv6 nd home-agent-preference (0-65535)", "Interface IPv6 config commands\n" "Neighbor discovery\n" "Home Agent preference\n" @@ -1183,7 +1183,7 @@ DEFUN (no_ipv6_nd_homeagent_preference, DEFUN (ipv6_nd_homeagent_lifetime, ipv6_nd_homeagent_lifetime_cmd, - "ipv6 nd home-agent-lifetime <0-65520>", + "ipv6 nd home-agent-lifetime (0-65520)", "Interface IPv6 config commands\n" "Neighbor discovery\n" "Home Agent lifetime\n" @@ -1508,7 +1508,7 @@ DEFUN (no_ipv6_nd_other_config_flag, */ DEFUN (ipv6_nd_prefix, ipv6_nd_prefix_cmd, - "ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) (<0-4294967295>|infinite) (off-link|) (no-autoconfig|) (router-address|)", + "ipv6 nd prefix X:X::X:X/M <(0-4294967295)|infinite> <(0-4294967295)|infinite> ", "Interface IPv6 config commands\n" "Neighbor discovery\n" "Prefix information\n" @@ -1782,7 +1782,7 @@ DEFUN (no_ipv6_nd_prefix, DEFUN (ipv6_nd_router_preference, ipv6_nd_router_preference_cmd, - "ipv6 nd router-preference (high|medium|low)", + "ipv6 nd router-preference ", "Interface IPv6 config commands\n" "Neighbor discovery\n" "Default router preference\n" @@ -1844,7 +1844,7 @@ DEFUN (no_ipv6_nd_router_preference, DEFUN (ipv6_nd_mtu, ipv6_nd_mtu_cmd, - "ipv6 nd mtu <1-65535>", + "ipv6 nd mtu (1-65535)", "Interface IPv6 config commands\n" "Neighbor discovery\n" "Advertised MTU\n" diff --git a/zebra/test_main.c b/zebra/test_main.c index 722151288..2908ddd94 100644 --- a/zebra/test_main.c +++ b/zebra/test_main.c @@ -119,7 +119,7 @@ static ifindex_t test_ifindex = 0; /* testrib commands */ DEFUN (test_interface_state, test_interface_state_cmd, - "state (up|down)", + "state ", "configure interface\n" "up\n" "down\n") diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c index 88cc7977f..6dcc7624e 100644 --- a/zebra/zebra_routemap.c +++ b/zebra/zebra_routemap.c @@ -330,7 +330,7 @@ DEFUN (no_match_interface, DEFUN (match_tag, match_tag_cmd, - "match tag <1-65535>", + "match tag (1-65535)", MATCH_STR "Match tag of route\n" "Tag value\n") @@ -365,7 +365,7 @@ DEFUN (no_match_tag, DEFUN (match_ip_next_hop, match_ip_next_hop_cmd, - "match ip next-hop (<1-199>|<1300-2699>|WORD)", + "match ip next-hop <(1-199)|(1300-2699)|WORD>", MATCH_STR IP_STR "Match next-hop address of route\n" @@ -451,7 +451,7 @@ DEFUN (no_match_ip_next_hop_prefix_list, DEFUN (match_ip_address, match_ip_address_cmd, - "match ip address (<1-199>|<1300-2699>|WORD)", + "match ip address <(1-199)|(1300-2699)|WORD>", MATCH_STR IP_STR "Match address of route\n" @@ -623,7 +623,7 @@ DEFUN (no_match_ip_nexthop_prefix_len, DEFUN (match_source_protocol, match_source_protocol_cmd, - "match source-protocol (bgp|ospf|rip|ripng|isis|ospf6|connected|system|kernel|static)", + "match source-protocol ", MATCH_STR "Match protocol via which the route was learnt\n") { @@ -642,7 +642,7 @@ DEFUN (match_source_protocol, DEFUN (no_match_source_protocol, no_match_source_protocol_cmd, - "no match source-protocol (bgp|ospf|rip|ripng|isis|ospf6|connected|system|kernel|static)", + "no match source-protocol ", NO_STR MATCH_STR "No match protocol via which the route was learnt\n") @@ -668,7 +668,7 @@ DEFUN (no_match_source_protocol, DEFUN (set_src, set_src_cmd, - "set src (A.B.C.D|X:X::X:X)", + "set src ", SET_STR "src address for route\n" "src address\n") @@ -727,7 +727,7 @@ DEFUN (set_src, DEFUN (no_set_src, no_set_src_cmd, - "no set src {A.B.C.D|X:X::X:X}", + "no set src [A.B.C.D|X:X::X:X]", NO_STR SET_STR "Source address for route\n") @@ -740,7 +740,7 @@ DEFUN (no_set_src, DEFUN (zebra_route_map_timer, zebra_route_map_timer_cmd, - "zebra route-map delay-timer <0-600>", + "zebra route-map delay-timer (0-600)", "Time to wait before route-map updates are processed\n" "0 means event-driven updates are disabled\n") { diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index f4a663ab3..d395c11a1 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -193,7 +193,7 @@ zebra_static_ipv4 (struct vty *vty, safi_t safi, int add_cmd, */ DEFUN (ip_mroute_dist, ip_mroute_dist_cmd, - "ip mroute A.B.C.D/M (A.B.C.D|INTERFACE) <1-255>", + "ip mroute A.B.C.D/M (1-255)", IP_STR "Configure static unicast route into MRIB for multicast RPF lookup\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -218,7 +218,7 @@ DEFUN (ip_mroute_dist, */ DEFUN (no_ip_mroute_dist, no_ip_mroute_dist_cmd, - "no ip mroute A.B.C.D/M (A.B.C.D|INTERFACE) <1-255>", + "no ip mroute A.B.C.D/M (1-255)", IP_STR "Configure static unicast route into MRIB for multicast RPF lookup\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -232,7 +232,7 @@ DEFUN (no_ip_mroute_dist, DEFUN (ip_multicast_mode, ip_multicast_mode_cmd, - "ip multicast rpf-lookup-mode (urib-only|mrib-only|mrib-then-urib|lower-distance|longer-prefix)", + "ip multicast rpf-lookup-mode ", IP_STR "Multicast options\n" "RPF lookup behavior\n" @@ -273,7 +273,7 @@ DEFUN (ip_multicast_mode, */ DEFUN (no_ip_multicast_mode, no_ip_multicast_mode_cmd, - "no ip multicast rpf-lookup-mode (urib-only|mrib-only|mrib-then-urib|lower-distance|longer-prefix)", + "no ip multicast rpf-lookup-mode ", NO_STR IP_STR "Multicast options\n" @@ -332,7 +332,7 @@ DEFUN (show_ip_rpf_addr, /* Static route configuration. */ DEFUN (ip_route, ip_route_cmd, - "ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0)", + "ip route A.B.C.D/M ", IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -346,7 +346,7 @@ DEFUN (ip_route, DEFUN (ip_route_tag, ip_route_tag_cmd, - "ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535>", + "ip route A.B.C.D/M tag (1-65535)", IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -362,7 +362,7 @@ DEFUN (ip_route_tag, DEFUN (ip_route_flags, ip_route_flags_cmd, - "ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole)", + "ip route A.B.C.D/M ", IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -377,7 +377,7 @@ DEFUN (ip_route_flags, DEFUN (ip_route_flags_tag, ip_route_flags_tag_cmd, - "ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535>", + "ip route A.B.C.D/M tag (1-65535)", IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -395,7 +395,7 @@ DEFUN (ip_route_flags_tag, DEFUN (ip_route_flags2, ip_route_flags2_cmd, - "ip route A.B.C.D/M (reject|blackhole)", + "ip route A.B.C.D/M ", IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -408,7 +408,7 @@ DEFUN (ip_route_flags2, DEFUN (ip_route_flags2_tag, ip_route_flags2_tag_cmd, - "ip route A.B.C.D/M (reject|blackhole) tag <1-65535>", + "ip route A.B.C.D/M tag (1-65535)", IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -425,7 +425,7 @@ DEFUN (ip_route_flags2_tag, /* Mask as A.B.C.D format. */ DEFUN (ip_route_mask, ip_route_mask_cmd, - "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0)", + "ip route A.B.C.D A.B.C.D ", IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -440,7 +440,7 @@ DEFUN (ip_route_mask, DEFUN (ip_route_mask_tag, ip_route_mask_tag_cmd, - "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-65535>", + "ip route A.B.C.D A.B.C.D tag (1-65535)", IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -458,7 +458,7 @@ DEFUN (ip_route_mask_tag, DEFUN (ip_route_mask_flags, ip_route_mask_flags_cmd, - "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole)", + "ip route A.B.C.D A.B.C.D ", IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -474,7 +474,7 @@ DEFUN (ip_route_mask_flags, DEFUN (ip_route_mask_flags_tag, ip_route_mask_flags_tag_cmd, - "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535>", + "ip route A.B.C.D A.B.C.D tag (1-65535)", IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -493,7 +493,7 @@ DEFUN (ip_route_mask_flags_tag, DEFUN (ip_route_mask_flags2, ip_route_mask_flags2_cmd, - "ip route A.B.C.D A.B.C.D (reject|blackhole)", + "ip route A.B.C.D A.B.C.D ", IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -507,7 +507,7 @@ DEFUN (ip_route_mask_flags2, DEFUN (ip_route_mask_flags2_tag, ip_route_mask_flags2_tag_cmd, - "ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-65535>", + "ip route A.B.C.D A.B.C.D tag (1-65535)", IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -524,7 +524,7 @@ DEFUN (ip_route_mask_flags2_tag, /* Distance option value. */ DEFUN (ip_route_distance, ip_route_distance_cmd, - "ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) <1-255>", + "ip route A.B.C.D/M (1-255)", IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -539,7 +539,7 @@ DEFUN (ip_route_distance, DEFUN (ip_route_tag_distance, ip_route_tag_distance_cmd, - "ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535> <1-255>", + "ip route A.B.C.D/M tag (1-65535) (1-255)", IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -557,7 +557,7 @@ DEFUN (ip_route_tag_distance, DEFUN (ip_route_flags_distance, ip_route_flags_distance_cmd, - "ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) <1-255>", + "ip route A.B.C.D/M (1-255)", IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -573,7 +573,7 @@ DEFUN (ip_route_flags_distance, DEFUN (ip_route_flags_tag_distance, ip_route_flags_tag_distance_cmd, - "ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535> <1-255>", + "ip route A.B.C.D/M tag (1-65535) (1-255)", IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -591,7 +591,7 @@ DEFUN (ip_route_flags_tag_distance, DEFUN (ip_route_flags_distance2, ip_route_flags_distance2_cmd, - "ip route A.B.C.D/M (reject|blackhole) <1-255>", + "ip route A.B.C.D/M (1-255)", IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -605,7 +605,7 @@ DEFUN (ip_route_flags_distance2, DEFUN (ip_route_flags_tag_distance2, ip_route_flags_tag_distance2_cmd, - "ip route A.B.C.D/M (reject|blackhole) tag <1-65535> <1-255>", + "ip route A.B.C.D/M tag (1-65535) (1-255)", IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -621,7 +621,7 @@ DEFUN (ip_route_flags_tag_distance2, DEFUN (ip_route_mask_distance, ip_route_mask_distance_cmd, - "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) <1-255>", + "ip route A.B.C.D A.B.C.D (1-255)", IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -637,7 +637,7 @@ DEFUN (ip_route_mask_distance, DEFUN (ip_route_mask_tag_distance, ip_route_mask_tag_distance_cmd, - "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-65535> <1-255>", + "ip route A.B.C.D A.B.C.D tag (1-65535) (1-255)", IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -655,7 +655,7 @@ DEFUN (ip_route_mask_tag_distance, DEFUN (ip_route_mask_flags_tag_distance, ip_route_mask_flags_tag_distance_cmd, - "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535> <1-255>", + "ip route A.B.C.D A.B.C.D tag (1-65535) (1-255)", IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -675,7 +675,7 @@ DEFUN (ip_route_mask_flags_tag_distance, DEFUN (ip_route_mask_flags_distance, ip_route_mask_flags_distance_cmd, - "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) <1-255>", + "ip route A.B.C.D A.B.C.D (1-255)", IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -692,7 +692,7 @@ DEFUN (ip_route_mask_flags_distance, DEFUN (ip_route_mask_flags_distance2, ip_route_mask_flags_distance2_cmd, - "ip route A.B.C.D A.B.C.D (reject|blackhole) <1-255>", + "ip route A.B.C.D A.B.C.D (1-255)", IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -707,7 +707,7 @@ DEFUN (ip_route_mask_flags_distance2, DEFUN (ip_route_mask_flags_tag_distance2, ip_route_mask_flags_tag_distance2_cmd, - "ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-65535> <1-255>", + "ip route A.B.C.D A.B.C.D tag (1-65535) (1-255)", IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -737,7 +737,7 @@ DEFUN (ip_route_mask_flags_tag_distance2, */ DEFUN (no_ip_route, no_ip_route_cmd, - "no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0)", + "no ip route A.B.C.D/M ", NO_STR IP_STR "Establish static routes\n" @@ -767,7 +767,7 @@ DEFUN (no_ip_route, */ DEFUN (no_ip_route_tag, no_ip_route_tag_cmd, - "no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535>", + "no ip route A.B.C.D/M tag (1-65535)", NO_STR IP_STR "Establish static routes\n" @@ -786,7 +786,7 @@ DEFUN (no_ip_route_tag, DEFUN (no_ip_route_flags2, no_ip_route_flags2_cmd, - "no ip route A.B.C.D/M (reject|blackhole)", + "no ip route A.B.C.D/M ", NO_STR IP_STR "Establish static routes\n" @@ -800,7 +800,7 @@ DEFUN (no_ip_route_flags2, DEFUN (no_ip_route_flags2_tag, no_ip_route_flags2_tag_cmd, - "no ip route A.B.C.D/M (reject|blackhole) tag <1-65535>", + "no ip route A.B.C.D/M tag (1-65535)", NO_STR IP_STR "Establish static routes\n" @@ -830,7 +830,7 @@ DEFUN (no_ip_route_flags2_tag, */ DEFUN (no_ip_route_mask, no_ip_route_mask_cmd, - "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0)", + "no ip route A.B.C.D A.B.C.D ", NO_STR IP_STR "Establish static routes\n" @@ -862,7 +862,7 @@ DEFUN (no_ip_route_mask, */ DEFUN (no_ip_route_mask_tag, no_ip_route_mask_tag_cmd, - "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-65535>", + "no ip route A.B.C.D A.B.C.D tag (1-65535)", NO_STR IP_STR "Establish static routes\n" @@ -882,7 +882,7 @@ DEFUN (no_ip_route_mask_tag, DEFUN (no_ip_route_mask_flags2, no_ip_route_mask_flags2_cmd, - "no ip route A.B.C.D A.B.C.D (reject|blackhole)", + "no ip route A.B.C.D A.B.C.D ", NO_STR IP_STR "Establish static routes\n" @@ -897,7 +897,7 @@ DEFUN (no_ip_route_mask_flags2, DEFUN (no_ip_route_mask_flags2_tag, no_ip_route_mask_flags2_tag_cmd, - "no ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-65535>", + "no ip route A.B.C.D A.B.C.D tag (1-65535)", NO_STR IP_STR "Establish static routes\n" @@ -914,7 +914,7 @@ DEFUN (no_ip_route_mask_flags2_tag, DEFUN (no_ip_route_distance, no_ip_route_distance_cmd, - "no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) <1-255>", + "no ip route A.B.C.D/M (1-255)", NO_STR IP_STR "Establish static routes\n" @@ -930,7 +930,7 @@ DEFUN (no_ip_route_distance, DEFUN (no_ip_route_tag_distance, no_ip_route_tag_distance_cmd, - "no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535> <1-255>", + "no ip route A.B.C.D/M tag (1-65535) (1-255)", NO_STR IP_STR "Establish static routes\n" @@ -948,7 +948,7 @@ DEFUN (no_ip_route_tag_distance, DEFUN (no_ip_route_flags_distance, no_ip_route_flags_distance_cmd, - "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) <1-255>", + "no ip route A.B.C.D/M (1-255)", NO_STR IP_STR "Establish static routes\n" @@ -965,7 +965,7 @@ DEFUN (no_ip_route_flags_distance, DEFUN (no_ip_route_flags_tag_distance, no_ip_route_flags_tag_distance_cmd, - "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535> <1-255>", + "no ip route A.B.C.D/M tag (1-65535) (1-255)", NO_STR IP_STR "Establish static routes\n" @@ -984,7 +984,7 @@ DEFUN (no_ip_route_flags_tag_distance, DEFUN (no_ip_route_flags_distance2, no_ip_route_flags_distance2_cmd, - "no ip route A.B.C.D/M (reject|blackhole) <1-255>", + "no ip route A.B.C.D/M (1-255)", NO_STR IP_STR "Establish static routes\n" @@ -999,7 +999,7 @@ DEFUN (no_ip_route_flags_distance2, DEFUN (no_ip_route_flags_tag_distance2, no_ip_route_flags_tag_distance2_cmd, - "no ip route A.B.C.D/M (reject|blackhole) tag <1-65535> <1-255>", + "no ip route A.B.C.D/M tag (1-65535) (1-255)", NO_STR IP_STR "Establish static routes\n" @@ -1016,7 +1016,7 @@ DEFUN (no_ip_route_flags_tag_distance2, DEFUN (no_ip_route_mask_distance, no_ip_route_mask_distance_cmd, - "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) <1-255>", + "no ip route A.B.C.D A.B.C.D (1-255)", NO_STR IP_STR "Establish static routes\n" @@ -1033,7 +1033,7 @@ DEFUN (no_ip_route_mask_distance, DEFUN (no_ip_route_mask_tag_distance, no_ip_route_mask_tag_distance_cmd, - "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-65535> <1-255>", + "no ip route A.B.C.D A.B.C.D tag (1-65535) (1-255)", NO_STR IP_STR "Establish static routes\n" @@ -1052,7 +1052,7 @@ DEFUN (no_ip_route_mask_tag_distance, DEFUN (no_ip_route_mask_flags_distance, no_ip_route_mask_flags_distance_cmd, - "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) <1-255>", + "no ip route A.B.C.D A.B.C.D (1-255)", NO_STR IP_STR "Establish static routes\n" @@ -1070,7 +1070,7 @@ DEFUN (no_ip_route_mask_flags_distance, DEFUN (no_ip_route_mask_flags_tag_distance, no_ip_route_mask_flags_tag_distance_cmd, - "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535> <1-255>", + "no ip route A.B.C.D A.B.C.D tag (1-65535) (1-255)", NO_STR IP_STR "Establish static routes\n" @@ -1090,7 +1090,7 @@ DEFUN (no_ip_route_mask_flags_tag_distance, DEFUN (no_ip_route_mask_flags_distance2, no_ip_route_mask_flags_distance2_cmd, - "no ip route A.B.C.D A.B.C.D (reject|blackhole) <1-255>", + "no ip route A.B.C.D A.B.C.D (1-255)", NO_STR IP_STR "Establish static routes\n" @@ -1106,7 +1106,7 @@ DEFUN (no_ip_route_mask_flags_distance2, DEFUN (no_ip_route_mask_flags_tag_distance2, no_ip_route_mask_flags_tag_distance2_cmd, - "no ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-65535> <1-255>", + "no ip route A.B.C.D A.B.C.D tag (1-65535) (1-255)", NO_STR IP_STR "Establish static routes\n" @@ -1125,7 +1125,7 @@ DEFUN (no_ip_route_mask_flags_tag_distance2, /* Static route configuration. */ DEFUN (ip_route_vrf, ip_route_vrf_cmd, - "ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) " VRF_CMD_STR, + "ip route A.B.C.D/M " VRF_CMD_STR, IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -1139,7 +1139,7 @@ DEFUN (ip_route_vrf, DEFUN (ip_route_tag_vrf, ip_route_tag_vrf_cmd, - "ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535> " VRF_CMD_STR, + "ip route A.B.C.D/M tag (1-65535) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -1155,7 +1155,7 @@ DEFUN (ip_route_tag_vrf, DEFUN (ip_route_flags_vrf, ip_route_flags_vrf_cmd, - "ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) " VRF_CMD_STR, + "ip route A.B.C.D/M " VRF_CMD_STR, IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -1170,7 +1170,7 @@ DEFUN (ip_route_flags_vrf, DEFUN (ip_route_flags_tag_vrf, ip_route_flags_tag_vrf_cmd, - "ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535> " VRF_CMD_STR, + "ip route A.B.C.D/M tag (1-65535) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -1188,7 +1188,7 @@ DEFUN (ip_route_flags_tag_vrf, DEFUN (ip_route_flags2_vrf, ip_route_flags2_vrf_cmd, - "ip route A.B.C.D/M (reject|blackhole) " VRF_CMD_STR, + "ip route A.B.C.D/M " VRF_CMD_STR, IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -1201,7 +1201,7 @@ DEFUN (ip_route_flags2_vrf, DEFUN (ip_route_flags2_tag_vrf, ip_route_flags2_tag_vrf_cmd, - "ip route A.B.C.D/M (reject|blackhole) tag <1-65535> " VRF_CMD_STR, + "ip route A.B.C.D/M tag (1-65535) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -1218,7 +1218,7 @@ DEFUN (ip_route_flags2_tag_vrf, /* Mask as A.B.C.D format. */ DEFUN (ip_route_mask_vrf, ip_route_mask_vrf_cmd, - "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) " VRF_CMD_STR, + "ip route A.B.C.D A.B.C.D " VRF_CMD_STR, IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -1233,7 +1233,7 @@ DEFUN (ip_route_mask_vrf, DEFUN (ip_route_mask_tag_vrf, ip_route_mask_tag_vrf_cmd, - "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-65535> " VRF_CMD_STR, + "ip route A.B.C.D A.B.C.D tag (1-65535) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -1251,7 +1251,7 @@ DEFUN (ip_route_mask_tag_vrf, DEFUN (ip_route_mask_flags_vrf, ip_route_mask_flags_vrf_cmd, - "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) " VRF_CMD_STR, + "ip route A.B.C.D A.B.C.D " VRF_CMD_STR, IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -1267,7 +1267,7 @@ DEFUN (ip_route_mask_flags_vrf, DEFUN (ip_route_mask_flags_tag_vrf, ip_route_mask_flags_tag_vrf_cmd, - "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535> " VRF_CMD_STR, + "ip route A.B.C.D A.B.C.D tag (1-65535) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -1286,7 +1286,7 @@ DEFUN (ip_route_mask_flags_tag_vrf, DEFUN (ip_route_mask_flags2_vrf, ip_route_mask_flags2_vrf_cmd, - "ip route A.B.C.D A.B.C.D (reject|blackhole) " VRF_CMD_STR, + "ip route A.B.C.D A.B.C.D " VRF_CMD_STR, IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -1300,7 +1300,7 @@ DEFUN (ip_route_mask_flags2_vrf, DEFUN (ip_route_mask_flags2_tag_vrf, ip_route_mask_flags2_tag_vrf_cmd, - "ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-65535> " VRF_CMD_STR, + "ip route A.B.C.D A.B.C.D tag (1-65535) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -1317,7 +1317,7 @@ DEFUN (ip_route_mask_flags2_tag_vrf, /* Distance option value. */ DEFUN (ip_route_distance_vrf, ip_route_distance_vrf_cmd, - "ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) <1-255> " VRF_CMD_STR, + "ip route A.B.C.D/M (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -1332,7 +1332,7 @@ DEFUN (ip_route_distance_vrf, DEFUN (ip_route_tag_distance_vrf, ip_route_tag_distance_vrf_cmd, - "ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535> <1-255> " VRF_CMD_STR, + "ip route A.B.C.D/M tag (1-65535) (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -1350,7 +1350,7 @@ DEFUN (ip_route_tag_distance_vrf, DEFUN (ip_route_flags_distance_vrf, ip_route_flags_distance_vrf_cmd, - "ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) <1-255> " VRF_CMD_STR, + "ip route A.B.C.D/M (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -1366,7 +1366,7 @@ DEFUN (ip_route_flags_distance_vrf, DEFUN (ip_route_flags_tag_distance_vrf, ip_route_flags_tag_distance_vrf_cmd, - "ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535> <1-255> " VRF_CMD_STR, + "ip route A.B.C.D/M tag (1-65535) (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -1384,7 +1384,7 @@ DEFUN (ip_route_flags_tag_distance_vrf, DEFUN (ip_route_flags_distance2_vrf, ip_route_flags_distance2_vrf_cmd, - "ip route A.B.C.D/M (reject|blackhole) <1-255> " VRF_CMD_STR, + "ip route A.B.C.D/M (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -1398,7 +1398,7 @@ DEFUN (ip_route_flags_distance2_vrf, DEFUN (ip_route_flags_tag_distance2_vrf, ip_route_flags_tag_distance2_vrf_cmd, - "ip route A.B.C.D/M (reject|blackhole) tag <1-65535> <1-255> " VRF_CMD_STR, + "ip route A.B.C.D/M tag (1-65535) (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -1414,7 +1414,7 @@ DEFUN (ip_route_flags_tag_distance2_vrf, DEFUN (ip_route_mask_distance_vrf, ip_route_mask_distance_vrf_cmd, - "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) <1-255> " VRF_CMD_STR, + "ip route A.B.C.D A.B.C.D (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -1430,7 +1430,7 @@ DEFUN (ip_route_mask_distance_vrf, DEFUN (ip_route_mask_tag_distance_vrf, ip_route_mask_tag_distance_vrf_cmd, - "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-65535> <1-255> " VRF_CMD_STR, + "ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -1448,7 +1448,7 @@ DEFUN (ip_route_mask_tag_distance_vrf, DEFUN (ip_route_mask_flags_tag_distance_vrf, ip_route_mask_flags_tag_distance_vrf_cmd, - "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535> <1-255> " VRF_CMD_STR, + "ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -1462,13 +1462,13 @@ DEFUN (ip_route_mask_flags_tag_distance_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[8]->arg, argv[9]->arg, argv[12]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, argv[8]->arg, argv[10]->arg); } DEFUN (ip_route_mask_flags_distance_vrf, ip_route_mask_flags_distance_vrf_cmd, - "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) <1-255> " VRF_CMD_STR, + "ip route A.B.C.D A.B.C.D (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -1485,7 +1485,7 @@ DEFUN (ip_route_mask_flags_distance_vrf, DEFUN (ip_route_mask_flags_distance2_vrf, ip_route_mask_flags_distance2_vrf_cmd, - "ip route A.B.C.D A.B.C.D (reject|blackhole) <1-255> " VRF_CMD_STR, + "ip route A.B.C.D A.B.C.D (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -1500,7 +1500,7 @@ DEFUN (ip_route_mask_flags_distance2_vrf, DEFUN (ip_route_mask_flags_tag_distance2_vrf, ip_route_mask_flags_tag_distance2_vrf_cmd, - "ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-65535> <1-255> " VRF_CMD_STR, + "ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -1517,7 +1517,7 @@ DEFUN (ip_route_mask_flags_tag_distance2_vrf, DEFUN (no_ip_route_vrf, no_ip_route_vrf_cmd, - "no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) " VRF_CMD_STR, + "no ip route A.B.C.D/M " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1532,7 +1532,7 @@ DEFUN (no_ip_route_vrf, DEFUN (no_ip_route_flags_vrf, no_ip_route_flags_vrf_cmd, - "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) " VRF_CMD_STR, + "no ip route A.B.C.D/M " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1548,7 +1548,7 @@ DEFUN (no_ip_route_flags_vrf, DEFUN (no_ip_route_tag_vrf, no_ip_route_tag_vrf_cmd, - "no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535> " VRF_CMD_STR, + "no ip route A.B.C.D/M tag (1-65535) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1565,7 +1565,7 @@ DEFUN (no_ip_route_tag_vrf, DEFUN (no_ip_route_flags_tag_vrf, no_ip_route_flags_tag_vrf_cmd, - "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535> " VRF_CMD_STR, + "no ip route A.B.C.D/M tag (1-65535) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1583,7 +1583,7 @@ DEFUN (no_ip_route_flags_tag_vrf, DEFUN (no_ip_route_flags2_vrf, no_ip_route_flags2_vrf_cmd, - "no ip route A.B.C.D/M (reject|blackhole) " VRF_CMD_STR, + "no ip route A.B.C.D/M " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1597,7 +1597,7 @@ DEFUN (no_ip_route_flags2_vrf, DEFUN (no_ip_route_flags2_tag_vrf, no_ip_route_flags2_tag_vrf_cmd, - "no ip route A.B.C.D/M (reject|blackhole) tag <1-65535> " VRF_CMD_STR, + "no ip route A.B.C.D/M tag (1-65535) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1613,7 +1613,7 @@ DEFUN (no_ip_route_flags2_tag_vrf, DEFUN (no_ip_route_mask_vrf, no_ip_route_mask_vrf_cmd, - "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) " VRF_CMD_STR, + "no ip route A.B.C.D A.B.C.D " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1629,7 +1629,7 @@ DEFUN (no_ip_route_mask_vrf, DEFUN (no_ip_route_mask_flags_vrf, no_ip_route_mask_flags_vrf_cmd, - "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) " VRF_CMD_STR, + "no ip route A.B.C.D A.B.C.D " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1646,7 +1646,7 @@ DEFUN (no_ip_route_mask_flags_vrf, DEFUN (no_ip_route_mask_tag_vrf, no_ip_route_mask_tag_vrf_cmd, - "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-65535> " VRF_CMD_STR, + "no ip route A.B.C.D A.B.C.D tag (1-65535) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1664,7 +1664,7 @@ DEFUN (no_ip_route_mask_tag_vrf, DEFUN (no_ip_route_mask_flags_tag_vrf, no_ip_route_mask_flags_tag_vrf_cmd, - "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535> " VRF_CMD_STR, + "no ip route A.B.C.D A.B.C.D tag (1-65535) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1683,7 +1683,7 @@ DEFUN (no_ip_route_mask_flags_tag_vrf, DEFUN (no_ip_route_mask_flags2_vrf, no_ip_route_mask_flags2_vrf_cmd, - "no ip route A.B.C.D A.B.C.D (reject|blackhole) " VRF_CMD_STR, + "no ip route A.B.C.D A.B.C.D " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1698,7 +1698,7 @@ DEFUN (no_ip_route_mask_flags2_vrf, DEFUN (no_ip_route_mask_flags2_tag_vrf, no_ip_route_mask_flags2_tag_vrf_cmd, - "no ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-65535> " VRF_CMD_STR, + "no ip route A.B.C.D A.B.C.D tag (1-65535) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1716,7 +1716,7 @@ DEFUN (no_ip_route_mask_flags2_tag_vrf, DEFUN (no_ip_route_distance_vrf, no_ip_route_distance_vrf_cmd, - "no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) <1-255> " VRF_CMD_STR, + "no ip route A.B.C.D/M (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1732,7 +1732,7 @@ DEFUN (no_ip_route_distance_vrf, DEFUN (no_ip_route_tag_distance_vrf, no_ip_route_tag_distance_vrf_cmd, - "no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535> <1-255> " VRF_CMD_STR, + "no ip route A.B.C.D/M tag (1-65535) (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1750,7 +1750,7 @@ DEFUN (no_ip_route_tag_distance_vrf, DEFUN (no_ip_route_flags_distance_vrf, no_ip_route_flags_distance_vrf_cmd, - "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) <1-255> " VRF_CMD_STR, + "no ip route A.B.C.D/M (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1767,7 +1767,7 @@ DEFUN (no_ip_route_flags_distance_vrf, DEFUN (no_ip_route_flags_tag_distance_vrf, no_ip_route_flags_tag_distance_vrf_cmd, - "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535> <1-255> " VRF_CMD_STR, + "no ip route A.B.C.D/M tag (1-65535) (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1786,7 +1786,7 @@ DEFUN (no_ip_route_flags_tag_distance_vrf, DEFUN (no_ip_route_flags_distance2_vrf, no_ip_route_flags_distance2_vrf_cmd, - "no ip route A.B.C.D/M (reject|blackhole) <1-255> " VRF_CMD_STR, + "no ip route A.B.C.D/M (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1801,7 +1801,7 @@ DEFUN (no_ip_route_flags_distance2_vrf, DEFUN (no_ip_route_flags_tag_distance2_vrf, no_ip_route_flags_tag_distance2_vrf_cmd, - "no ip route A.B.C.D/M (reject|blackhole) tag <1-65535> <1-255> " VRF_CMD_STR, + "no ip route A.B.C.D/M tag (1-65535) (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1818,7 +1818,7 @@ DEFUN (no_ip_route_flags_tag_distance2_vrf, DEFUN (no_ip_route_mask_distance_vrf, no_ip_route_mask_distance_vrf_cmd, - "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) <1-255> " VRF_CMD_STR, + "no ip route A.B.C.D A.B.C.D (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1835,7 +1835,7 @@ DEFUN (no_ip_route_mask_distance_vrf, DEFUN (no_ip_route_mask_tag_distance_vrf, no_ip_route_mask_tag_distance_vrf_cmd, - "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-65535> <1-255> " VRF_CMD_STR, + "no ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1854,7 +1854,7 @@ DEFUN (no_ip_route_mask_tag_distance_vrf, DEFUN (no_ip_route_mask_flags_distance_vrf, no_ip_route_mask_flags_distance_vrf_cmd, - "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) <1-255> " VRF_CMD_STR, + "no ip route A.B.C.D A.B.C.D (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1872,7 +1872,7 @@ DEFUN (no_ip_route_mask_flags_distance_vrf, DEFUN (no_ip_route_mask_flags_tag_distance_vrf, no_ip_route_mask_flags_tag_distance_vrf_cmd, - "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535> <1-255> " VRF_CMD_STR, + "no ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1892,7 +1892,7 @@ DEFUN (no_ip_route_mask_flags_tag_distance_vrf, DEFUN (no_ip_route_mask_flags_distance2_vrf, no_ip_route_mask_flags_distance2_vrf_cmd, - "no ip route A.B.C.D A.B.C.D (reject|blackhole) <1-255> " VRF_CMD_STR, + "no ip route A.B.C.D A.B.C.D (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1908,7 +1908,7 @@ DEFUN (no_ip_route_mask_flags_distance2_vrf, DEFUN (no_ip_route_mask_flags_tag_distance2_vrf, no_ip_route_mask_flags_tag_distance2_vrf_cmd, - "no ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-65535> <1-255> " VRF_CMD_STR, + "no ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -2619,7 +2619,7 @@ DEFUN (no_ipv6_nht_default_route, */ DEFUN (show_ip_route_tag, show_ip_route_tag_cmd, - "show ip route tag <1-65535>", + "show ip route tag (1-65535)", SHOW_STR IP_STR "IP routing table\n" @@ -2840,7 +2840,7 @@ DEFUN (show_ip_route_protocol, DEFUN (show_ip_route_ospf_instance, show_ip_route_ospf_instance_cmd, - "show ip route ospf <1-65535>", + "show ip route ospf (1-65535)", SHOW_STR IP_STR "IP routing table\n" @@ -3256,7 +3256,7 @@ DEFUN (show_ip_route_vrf_all, DEFUN (show_ip_route_vrf_all_tag, show_ip_route_vrf_all_tag_cmd, - "show ip route " VRF_ALL_CMD_STR " tag <1-65535>", + "show ip route " VRF_ALL_CMD_STR " tag (1-65535)", SHOW_STR IP_STR "IP routing table\n" @@ -3782,7 +3782,7 @@ static_ipv6_func (struct vty *vty, int add_cmd, const char *dest_str, DEFUN (ipv6_route, ipv6_route_cmd, - "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE)", + "ipv6 route X:X::X:X/M ", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -3794,7 +3794,7 @@ DEFUN (ipv6_route, DEFUN (ipv6_route_tag, ipv6_route_tag_cmd, - "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-65535>", + "ipv6 route X:X::X:X/M tag (1-65535)", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -3808,7 +3808,7 @@ DEFUN (ipv6_route_tag, DEFUN (ipv6_route_flags, ipv6_route_flags_cmd, - "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole)", + "ipv6 route X:X::X:X/M ", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -3822,7 +3822,7 @@ DEFUN (ipv6_route_flags, DEFUN (ipv6_route_flags_tag, ipv6_route_flags_tag_cmd, - "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-65535>", + "ipv6 route X:X::X:X/M tag (1-65535)", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -3849,7 +3849,7 @@ DEFUN (ipv6_route_ifname, } DEFUN (ipv6_route_ifname_tag, ipv6_route_ifname_tag_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-65535>", + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535)", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -3863,7 +3863,7 @@ DEFUN (ipv6_route_ifname_tag, DEFUN (ipv6_route_ifname_flags, ipv6_route_ifname_flags_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole)", + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE ", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -3877,7 +3877,7 @@ DEFUN (ipv6_route_ifname_flags, DEFUN (ipv6_route_ifname_flags_tag, ipv6_route_ifname_flags_tag_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-65535>", + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535)", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -3893,7 +3893,7 @@ DEFUN (ipv6_route_ifname_flags_tag, DEFUN (ipv6_route_pref, ipv6_route_pref_cmd, - "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) <1-255>", + "ipv6 route X:X::X:X/M (1-255)", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -3906,7 +3906,7 @@ DEFUN (ipv6_route_pref, DEFUN (ipv6_route_pref_tag, ipv6_route_pref_tag_cmd, - "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-65535> <1-255>", + "ipv6 route X:X::X:X/M tag (1-65535) (1-255)", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -3921,7 +3921,7 @@ DEFUN (ipv6_route_pref_tag, DEFUN (ipv6_route_flags_pref, ipv6_route_flags_pref_cmd, - "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) <1-255>", + "ipv6 route X:X::X:X/M (1-255)", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -3936,7 +3936,7 @@ DEFUN (ipv6_route_flags_pref, DEFUN (ipv6_route_flags_pref_tag, ipv6_route_flags_pref_tag_cmd, - "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-65535> <1-255>", + "ipv6 route X:X::X:X/M tag (1-65535) (1-255)", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -3953,7 +3953,7 @@ DEFUN (ipv6_route_flags_pref_tag, DEFUN (ipv6_route_ifname_pref, ipv6_route_ifname_pref_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE <1-255>", + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255)", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -3966,7 +3966,7 @@ DEFUN (ipv6_route_ifname_pref, DEFUN (ipv6_route_ifname_pref_tag, ipv6_route_ifname_pref_tag_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-65535> <1-255>", + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255)", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -3981,7 +3981,7 @@ DEFUN (ipv6_route_ifname_pref_tag, DEFUN (ipv6_route_ifname_flags_pref, ipv6_route_ifname_flags_pref_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) <1-255>", + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255)", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -3996,7 +3996,7 @@ DEFUN (ipv6_route_ifname_flags_pref, DEFUN (ipv6_route_ifname_flags_pref_tag, ipv6_route_ifname_flags_pref_tag_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-65535> <1-255>", + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255)", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4013,7 +4013,7 @@ DEFUN (ipv6_route_ifname_flags_pref_tag, DEFUN (no_ipv6_route, no_ipv6_route_cmd, - "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE)", + "no ipv6 route X:X::X:X/M ", NO_STR IP_STR "Establish static routes\n" @@ -4026,7 +4026,7 @@ DEFUN (no_ipv6_route, DEFUN (no_ipv6_route_tag, no_ipv6_route_tag_cmd, - "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-65535>", + "no ipv6 route X:X::X:X/M tag (1-65535)", NO_STR IP_STR "Establish static routes\n" @@ -4041,7 +4041,7 @@ DEFUN (no_ipv6_route_tag, DEFUN (no_ipv6_route_flags, no_ipv6_route_flags_cmd, - "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole)", + "no ipv6 route X:X::X:X/M ", NO_STR IP_STR "Establish static routes\n" @@ -4056,7 +4056,7 @@ DEFUN (no_ipv6_route_flags, DEFUN (no_ipv6_route_flags_tag, no_ipv6_route_flags_tag_cmd, - "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-65535>", + "no ipv6 route X:X::X:X/M tag (1-65535)", NO_STR IP_STR "Establish static routes\n" @@ -4086,7 +4086,7 @@ DEFUN (no_ipv6_route_ifname, DEFUN (no_ipv6_route_ifname_tag, no_ipv6_route_ifname_tag_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-65535>", + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535)", NO_STR IP_STR "Establish static routes\n" @@ -4101,7 +4101,7 @@ DEFUN (no_ipv6_route_ifname_tag, DEFUN (no_ipv6_route_ifname_flags, no_ipv6_route_ifname_flags_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole)", + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE ", NO_STR IP_STR "Establish static routes\n" @@ -4116,7 +4116,7 @@ DEFUN (no_ipv6_route_ifname_flags, DEFUN (no_ipv6_route_ifname_flags_tag, no_ipv6_route_ifname_flags_tag_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-65535>", + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535)", NO_STR IP_STR "Establish static routes\n" @@ -4133,7 +4133,7 @@ DEFUN (no_ipv6_route_ifname_flags_tag, DEFUN (no_ipv6_route_pref, no_ipv6_route_pref_cmd, - "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) <1-255>", + "no ipv6 route X:X::X:X/M (1-255)", NO_STR IP_STR "Establish static routes\n" @@ -4147,7 +4147,7 @@ DEFUN (no_ipv6_route_pref, DEFUN (no_ipv6_route_pref_tag, no_ipv6_route_pref_tag_cmd, - "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-65535> <1-255>", + "no ipv6 route X:X::X:X/M tag (1-65535) (1-255)", NO_STR IP_STR "Establish static routes\n" @@ -4163,7 +4163,7 @@ DEFUN (no_ipv6_route_pref_tag, DEFUN (no_ipv6_route_flags_pref, no_ipv6_route_flags_pref_cmd, - "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) <1-255>", + "no ipv6 route X:X::X:X/M (1-255)", NO_STR IP_STR "Establish static routes\n" @@ -4180,7 +4180,7 @@ DEFUN (no_ipv6_route_flags_pref, DEFUN (no_ipv6_route_flags_pref_tag, no_ipv6_route_flags_pref_tag_cmd, - "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-65535> <1-255>", + "no ipv6 route X:X::X:X/M tag (1-65535) (1-255)", NO_STR IP_STR "Establish static routes\n" @@ -4199,7 +4199,7 @@ DEFUN (no_ipv6_route_flags_pref_tag, DEFUN (no_ipv6_route_ifname_pref, no_ipv6_route_ifname_pref_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE <1-255>", + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255)", NO_STR IP_STR "Establish static routes\n" @@ -4213,7 +4213,7 @@ DEFUN (no_ipv6_route_ifname_pref, DEFUN (no_ipv6_route_ifname_pref_tag, no_ipv6_route_ifname_pref_tag_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-65535> <1-255>", + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255)", NO_STR IP_STR "Establish static routes\n" @@ -4229,7 +4229,7 @@ DEFUN (no_ipv6_route_ifname_pref_tag, DEFUN (no_ipv6_route_ifname_flags_pref, no_ipv6_route_ifname_flags_pref_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) <1-255>", + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255)", NO_STR IP_STR "Establish static routes\n" @@ -4245,7 +4245,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref, DEFUN (no_ipv6_route_ifname_flags_pref_tag, no_ipv6_route_ifname_flags_pref_tag_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-65535> <1-255>", + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255)", NO_STR IP_STR "Establish static routes\n" @@ -4263,7 +4263,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref_tag, DEFUN (ipv6_route_vrf, ipv6_route_vrf_cmd, - "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) " VRF_CMD_STR, + "ipv6 route X:X::X:X/M " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4276,7 +4276,7 @@ DEFUN (ipv6_route_vrf, DEFUN (ipv6_route_tag_vrf, ipv6_route_tag_vrf_cmd, - "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-65535> " VRF_CMD_STR, + "ipv6 route X:X::X:X/M tag (1-65535) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4291,7 +4291,7 @@ DEFUN (ipv6_route_tag_vrf, DEFUN (ipv6_route_flags_vrf, ipv6_route_flags_vrf_cmd, - "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) " VRF_CMD_STR, + "ipv6 route X:X::X:X/M " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4306,7 +4306,7 @@ DEFUN (ipv6_route_flags_vrf, DEFUN (ipv6_route_flags_tag_vrf, ipv6_route_flags_tag_vrf_cmd, - "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-65535> " VRF_CMD_STR, + "ipv6 route X:X::X:X/M tag (1-65535) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4335,7 +4335,7 @@ DEFUN (ipv6_route_ifname_vrf, } DEFUN (ipv6_route_ifname_tag_vrf, ipv6_route_ifname_tag_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-65535> " VRF_CMD_STR, + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4350,7 +4350,7 @@ DEFUN (ipv6_route_ifname_tag_vrf, DEFUN (ipv6_route_ifname_flags_vrf, ipv6_route_ifname_flags_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) " VRF_CMD_STR, + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4365,7 +4365,7 @@ DEFUN (ipv6_route_ifname_flags_vrf, DEFUN (ipv6_route_ifname_flags_tag_vrf, ipv6_route_ifname_flags_tag_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-65535> " VRF_CMD_STR, + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4382,7 +4382,7 @@ DEFUN (ipv6_route_ifname_flags_tag_vrf, DEFUN (ipv6_route_pref_vrf, ipv6_route_pref_vrf_cmd, - "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) <1-255> " VRF_CMD_STR, + "ipv6 route X:X::X:X/M (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4396,7 +4396,7 @@ DEFUN (ipv6_route_pref_vrf, DEFUN (ipv6_route_pref_tag_vrf, ipv6_route_pref_tag_vrf_cmd, - "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-65535> <1-255> " VRF_CMD_STR, + "ipv6 route X:X::X:X/M tag (1-65535) (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4412,7 +4412,7 @@ DEFUN (ipv6_route_pref_tag_vrf, DEFUN (ipv6_route_flags_pref_vrf, ipv6_route_flags_pref_vrf_cmd, - "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) <1-255> " VRF_CMD_STR, + "ipv6 route X:X::X:X/M (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4428,7 +4428,7 @@ DEFUN (ipv6_route_flags_pref_vrf, DEFUN (ipv6_route_flags_pref_tag_vrf, ipv6_route_flags_pref_tag_vrf_cmd, - "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-65535> <1-255> " VRF_CMD_STR, + "ipv6 route X:X::X:X/M tag (1-65535) (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4446,7 +4446,7 @@ DEFUN (ipv6_route_flags_pref_tag_vrf, DEFUN (ipv6_route_ifname_pref_vrf, ipv6_route_ifname_pref_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE <1-255> " VRF_CMD_STR, + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4460,7 +4460,7 @@ DEFUN (ipv6_route_ifname_pref_vrf, DEFUN (ipv6_route_ifname_pref_tag_vrf, ipv6_route_ifname_pref_tag_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-65535> <1-255> " VRF_CMD_STR, + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4476,7 +4476,7 @@ DEFUN (ipv6_route_ifname_pref_tag_vrf, DEFUN (ipv6_route_ifname_flags_pref_vrf, ipv6_route_ifname_flags_pref_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) <1-255> " VRF_CMD_STR, + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4492,7 +4492,7 @@ DEFUN (ipv6_route_ifname_flags_pref_vrf, DEFUN (ipv6_route_ifname_flags_pref_tag_vrf, ipv6_route_ifname_flags_pref_tag_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-65535> <1-255> " VRF_CMD_STR, + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4510,7 +4510,7 @@ DEFUN (ipv6_route_ifname_flags_pref_tag_vrf, DEFUN (no_ipv6_route_vrf, no_ipv6_route_vrf_cmd, - "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -4524,7 +4524,7 @@ DEFUN (no_ipv6_route_vrf, DEFUN (no_ipv6_route_tag_vrf, no_ipv6_route_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-65535> " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M tag (1-65535) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -4540,7 +4540,7 @@ DEFUN (no_ipv6_route_tag_vrf, DEFUN (no_ipv6_route_flags_vrf, no_ipv6_route_flags_vrf_cmd, - "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -4556,7 +4556,7 @@ DEFUN (no_ipv6_route_flags_vrf, DEFUN (no_ipv6_route_flags_tag_vrf, no_ipv6_route_flags_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-65535> " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M tag (1-65535) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -4588,7 +4588,7 @@ DEFUN (no_ipv6_route_ifname_vrf, DEFUN (no_ipv6_route_ifname_tag_vrf, no_ipv6_route_ifname_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-65535> " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -4604,7 +4604,7 @@ DEFUN (no_ipv6_route_ifname_tag_vrf, DEFUN (no_ipv6_route_ifname_flags_vrf, no_ipv6_route_ifname_flags_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -4620,7 +4620,7 @@ DEFUN (no_ipv6_route_ifname_flags_vrf, DEFUN (no_ipv6_route_ifname_flags_tag_vrf, no_ipv6_route_ifname_flags_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-65535> " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -4638,7 +4638,7 @@ DEFUN (no_ipv6_route_ifname_flags_tag_vrf, DEFUN (no_ipv6_route_pref_vrf, no_ipv6_route_pref_vrf_cmd, - "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) <1-255> " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -4653,7 +4653,7 @@ DEFUN (no_ipv6_route_pref_vrf, DEFUN (no_ipv6_route_pref_tag_vrf, no_ipv6_route_pref_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-65535> <1-255> " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M tag (1-65535) (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -4670,7 +4670,7 @@ DEFUN (no_ipv6_route_pref_tag_vrf, DEFUN (no_ipv6_route_flags_pref_vrf, no_ipv6_route_flags_pref_vrf_cmd, - "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) <1-255> " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -4688,7 +4688,7 @@ DEFUN (no_ipv6_route_flags_pref_vrf, DEFUN (no_ipv6_route_flags_pref_tag_vrf, no_ipv6_route_flags_pref_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-65535> <1-255> " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M tag (1-65535) (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -4708,7 +4708,7 @@ DEFUN (no_ipv6_route_flags_pref_tag_vrf, DEFUN (no_ipv6_route_ifname_pref_vrf, no_ipv6_route_ifname_pref_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE <1-255> " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -4723,7 +4723,7 @@ DEFUN (no_ipv6_route_ifname_pref_vrf, DEFUN (no_ipv6_route_ifname_pref_tag_vrf, no_ipv6_route_ifname_pref_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-65535> <1-255> " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -4740,7 +4740,7 @@ DEFUN (no_ipv6_route_ifname_pref_tag_vrf, DEFUN (no_ipv6_route_ifname_flags_pref_vrf, no_ipv6_route_ifname_flags_pref_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) <1-255> " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -4757,7 +4757,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref_vrf, DEFUN (no_ipv6_route_ifname_flags_pref_tag_vrf, no_ipv6_route_ifname_flags_pref_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-65535> <1-255> " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -4891,7 +4891,7 @@ DEFUN (show_ipv6_route, */ DEFUN (show_ipv6_route_tag, show_ipv6_route_tag_cmd, - "show ipv6 route tag <1-65535>", + "show ipv6 route tag (1-65535)", SHOW_STR IP_STR "IPv6 routing table\n" @@ -5338,7 +5338,7 @@ DEFUN (show_ipv6_route_vrf_all, DEFUN (show_ipv6_route_vrf_all_tag, show_ipv6_route_vrf_all_tag_cmd, - "show ipv6 route " VRF_ALL_CMD_STR " tag <1-65535>", + "show ipv6 route " VRF_ALL_CMD_STR " tag (1-65535)", SHOW_STR IP_STR "IPv6 routing table\n" @@ -5800,7 +5800,7 @@ zebra_ip_config (struct vty *vty) */ DEFUN (ip_zebra_import_table_distance, ip_zebra_import_table_distance_cmd, - "ip import-table <1-252> distance <1-255>", + "ip import-table (1-252) distance (1-255)", IP_STR "import routes from non-main kernel table\n" "kernel routing table id\n" @@ -5846,7 +5846,7 @@ DEFUN (ip_zebra_import_table_distance, */ DEFUN (ip_zebra_import_table_distance_routemap, ip_zebra_import_table_distance_routemap_cmd, - "ip import-table <1-252> distance <1-255> route-map WORD", + "ip import-table (1-252) distance (1-255) route-map WORD", IP_STR "import routes from non-main kernel table\n" "kernel routing table id\n" @@ -5899,7 +5899,7 @@ DEFUN (ip_zebra_import_table_distance_routemap, */ DEFUN (no_ip_zebra_import_table, no_ip_zebra_import_table_cmd, - "no ip import-table <1-252> {route-map NAME}", + "no ip import-table (1-252) [route-map NAME]", NO_STR IP_STR "import routes from non-main kernel table\n" diff --git a/zebra/zserv.c b/zebra/zserv.c index 3402bf1df..fc7b41954 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -2257,7 +2257,7 @@ DEFUN (show_table, return CMD_SUCCESS; } -DEFUN (config_table, +DEFUN (config_table, config_table_cmd, "table TABLENO", "Configure target kernel routing table\n" -- cgit v1.2.3 From 0c515adf432ee0d02d38edc34de7666faaf323ba Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Fri, 23 Sep 2016 14:02:55 +0000 Subject: zebra: compress multiple whitespaces in command string Signed-off-by: Daniel Walton --- tools/argv_translator.py | 8 ++++++++ zebra/zebra_vty.c | 10 +++++----- 2 files changed, 13 insertions(+), 5 deletions(-) (limited to 'zebra') diff --git a/tools/argv_translator.py b/tools/argv_translator.py index 1c8f0c7e5..4ee0831ed 100755 --- a/tools/argv_translator.py +++ b/tools/argv_translator.py @@ -267,6 +267,11 @@ DEFUN (no_bgp_maxmed_onstartup, line = line.replace('}', ']') re_range = re.search('^(.*?)<(\d+-\d+)>(.*)$', line) + # A one off to handle "CMD_RANGE_STR(1, MULTIPATH_NUM)" + if 'CMD_RANGE_STR<' in line: + line = line.replace('CMD_RANGE_STR<', 'CMD_RANGE_STR(') + line = line.replace('>', ')') + while re_range: line = "%s(%s)%s" % (re_range.group(1), re_range.group(2), re_range.group(3)) re_range = re.search('^(.*?)<(\d+-\d+)>(.*)$', line) @@ -274,6 +279,9 @@ DEFUN (no_bgp_maxmed_onstartup, if not line.endswith('\n'): line += '\n' + # compress duplicate whitespaces + re_space = re.search('^(\s*).*(\s*)$', line) + line = re_space.group(1) + ' '.join(line.split()) + re_space.group(2) return line def dump(self): diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index d395c11a1..3188799f2 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -655,7 +655,7 @@ DEFUN (ip_route_mask_tag_distance, DEFUN (ip_route_mask_flags_tag_distance, ip_route_mask_flags_tag_distance_cmd, - "ip route A.B.C.D A.B.C.D tag (1-65535) (1-255)", + "ip route A.B.C.D A.B.C.D tag (1-65535) (1-255)", IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -1448,7 +1448,7 @@ DEFUN (ip_route_mask_tag_distance_vrf, DEFUN (ip_route_mask_flags_tag_distance_vrf, ip_route_mask_flags_tag_distance_vrf_cmd, - "ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) " VRF_CMD_STR, + "ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -2436,7 +2436,7 @@ do_show_ip_route (struct vty *vty, const char *vrf_name, safi_t safi, DEFUN (show_ip_route_vrf, show_ip_route_vrf_cmd, - "show ip route " VRF_CMD_STR " [json]", + "show ip route " VRF_CMD_STR " [json]", SHOW_STR IP_STR "IP routing table\n" @@ -3420,7 +3420,7 @@ DEFUN (show_ip_route_vrf_all_supernets, DEFUN (show_ip_route_vrf_all_protocol, show_ip_route_vrf_all_protocol_cmd, - "show ip route " VRF_ALL_CMD_STR " " QUAGGA_IP_REDIST_STR_ZEBRA, + "show ip route " VRF_ALL_CMD_STR " " QUAGGA_IP_REDIST_STR_ZEBRA, SHOW_STR IP_STR "IP routing table\n" @@ -3475,7 +3475,7 @@ DEFUN (show_ip_route_vrf_all_protocol, DEFUN (show_ip_route_vrf_all_addr, show_ip_route_vrf_all_addr_cmd, - "show ip route " VRF_ALL_CMD_STR " A.B.C.D", + "show ip route " VRF_ALL_CMD_STR " A.B.C.D", SHOW_STR IP_STR "IP routing table\n" -- cgit v1.2.3 From 0a3e73dd2723912e14a22b077718e602cbad27c8 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Fri, 23 Sep 2016 17:22:42 +0000 Subject: zebra: fix vrf argv index numbers Signed-off-by: Daniel Walton --- zebra/zebra_vty.c | 170 +++++++++++++++++++++++++++--------------------------- 1 file changed, 85 insertions(+), 85 deletions(-) (limited to 'zebra') diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 3188799f2..505da4923 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -668,8 +668,8 @@ DEFUN (ip_route_mask_flags_tag_distance, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[8]->arg, - argv[9]->arg, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, + argv[8]->arg, NULL); } @@ -1134,7 +1134,7 @@ DEFUN (ip_route_vrf, "Null interface\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL, NULL, argv[6]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL, NULL, argv[5]->arg); } DEFUN (ip_route_tag_vrf, @@ -1150,7 +1150,7 @@ DEFUN (ip_route_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[5]->arg, NULL, argv[8]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[5]->arg, NULL, argv[7]->arg); } DEFUN (ip_route_flags_vrf, @@ -1165,7 +1165,7 @@ DEFUN (ip_route_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[7]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[6]->arg); } DEFUN (ip_route_flags_tag_vrf, @@ -1183,7 +1183,7 @@ DEFUN (ip_route_flags_tag_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[6]->arg, NULL, argv[9]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[6]->arg, NULL, argv[8]->arg); } DEFUN (ip_route_flags2_vrf, @@ -1196,7 +1196,7 @@ DEFUN (ip_route_flags2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, NULL, NULL, argv[6]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, NULL, NULL, argv[5]->arg); } DEFUN (ip_route_flags2_tag_vrf, @@ -1212,7 +1212,7 @@ DEFUN (ip_route_flags2_tag_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[5]->arg, NULL, argv[8]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[5]->arg, NULL, argv[7]->arg); } /* Mask as A.B.C.D format. */ @@ -1228,7 +1228,7 @@ DEFUN (ip_route_mask_vrf, "Null interface\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, argv[7]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, argv[6]->arg); } DEFUN (ip_route_mask_tag_vrf, @@ -1246,7 +1246,7 @@ DEFUN (ip_route_mask_tag_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, NULL, argv[9]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, NULL, argv[8]->arg); } DEFUN (ip_route_mask_flags_vrf, @@ -1262,7 +1262,7 @@ DEFUN (ip_route_mask_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[8]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[7]->arg); } DEFUN (ip_route_mask_flags_tag_vrf, @@ -1281,7 +1281,7 @@ DEFUN (ip_route_mask_flags_tag_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, NULL, argv[10]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, NULL, argv[9]->arg); } DEFUN (ip_route_mask_flags2_vrf, @@ -1295,7 +1295,7 @@ DEFUN (ip_route_mask_flags2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, argv[7]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, argv[6]->arg); } DEFUN (ip_route_mask_flags2_tag_vrf, @@ -1311,7 +1311,7 @@ DEFUN (ip_route_mask_flags2_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, NULL, argv[9]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, NULL, argv[8]->arg); } /* Distance option value. */ @@ -1327,7 +1327,7 @@ DEFUN (ip_route_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL, argv[4]->arg, argv[7]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL, argv[4]->arg, argv[6]->arg); } DEFUN (ip_route_tag_distance_vrf, @@ -1345,7 +1345,7 @@ DEFUN (ip_route_tag_distance_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[5]->arg, argv[6]->arg, argv[9]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[5]->arg, argv[6]->arg, argv[8]->arg); } DEFUN (ip_route_flags_distance_vrf, @@ -1361,7 +1361,7 @@ DEFUN (ip_route_flags_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[8]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg); } DEFUN (ip_route_flags_tag_distance_vrf, @@ -1379,7 +1379,7 @@ DEFUN (ip_route_flags_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[6]->arg, argv[7]->arg,argv[10]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[6]->arg, argv[7]->arg, argv[9]->arg); } DEFUN (ip_route_flags_distance2_vrf, @@ -1393,7 +1393,7 @@ DEFUN (ip_route_flags_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, NULL, argv[4]->arg, argv[7]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg); } DEFUN (ip_route_flags_tag_distance2_vrf, @@ -1409,7 +1409,7 @@ DEFUN (ip_route_flags_tag_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[5]->arg, argv[6]->arg, argv[9]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg); } DEFUN (ip_route_mask_distance_vrf, @@ -1425,7 +1425,7 @@ DEFUN (ip_route_mask_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[5]->arg, argv[8]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[5]->arg, argv[7]->arg); } DEFUN (ip_route_mask_tag_distance_vrf, @@ -1443,7 +1443,7 @@ DEFUN (ip_route_mask_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, argv[7]->arg, argv[10]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, argv[7]->arg, argv[9]->arg); } DEFUN (ip_route_mask_flags_tag_distance_vrf, @@ -1480,7 +1480,7 @@ DEFUN (ip_route_mask_flags_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[6]->arg, argv[9]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[6]->arg, argv[8]->arg); } DEFUN (ip_route_mask_flags_distance2_vrf, @@ -1495,7 +1495,7 @@ DEFUN (ip_route_mask_flags_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[5]->arg, argv[8]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg); } DEFUN (ip_route_mask_flags_tag_distance2_vrf, @@ -1512,7 +1512,7 @@ DEFUN (ip_route_mask_flags_tag_distance2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, argv[7]->arg, argv[10]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, argv[7]->arg, argv[9]->arg); } DEFUN (no_ip_route_vrf, @@ -1527,7 +1527,7 @@ DEFUN (no_ip_route_vrf, "Null interface\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, NULL, argv[7]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, NULL, argv[6]->arg); } DEFUN (no_ip_route_flags_vrf, @@ -1543,7 +1543,7 @@ DEFUN (no_ip_route_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[8]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[7]->arg); } DEFUN (no_ip_route_tag_vrf, @@ -1560,7 +1560,7 @@ DEFUN (no_ip_route_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[6]->arg, NULL, argv[9]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[6]->arg, NULL, argv[8]->arg); } DEFUN (no_ip_route_flags_tag_vrf, @@ -1578,7 +1578,7 @@ DEFUN (no_ip_route_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, argv[7]->arg, NULL, argv[10]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, argv[7]->arg, NULL, argv[9]->arg); } DEFUN (no_ip_route_flags2_vrf, @@ -1592,7 +1592,7 @@ DEFUN (no_ip_route_flags2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, NULL, NULL, argv[7]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, NULL, NULL, argv[6]->arg); } DEFUN (no_ip_route_flags2_tag_vrf, @@ -1608,7 +1608,7 @@ DEFUN (no_ip_route_flags2_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, argv[6]->arg, NULL, argv[9]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, argv[6]->arg, NULL, argv[8]->arg); } DEFUN (no_ip_route_mask_vrf, @@ -1624,7 +1624,7 @@ DEFUN (no_ip_route_mask_vrf, "Null interface\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, NULL, argv[8]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, NULL, argv[7]->arg); } DEFUN (no_ip_route_mask_flags_vrf, @@ -1641,7 +1641,7 @@ DEFUN (no_ip_route_mask_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, NULL, argv[9]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, NULL, argv[8]->arg); } DEFUN (no_ip_route_mask_tag_vrf, @@ -1659,7 +1659,7 @@ DEFUN (no_ip_route_mask_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, NULL, argv[10]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, NULL, argv[9]->arg); } DEFUN (no_ip_route_mask_flags_tag_vrf, @@ -1678,7 +1678,7 @@ DEFUN (no_ip_route_mask_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, NULL, argv[11]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, NULL, argv[10]->arg); } DEFUN (no_ip_route_mask_flags2_vrf, @@ -1693,7 +1693,7 @@ DEFUN (no_ip_route_mask_flags2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, NULL, argv[8]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, NULL, argv[7]->arg); } DEFUN (no_ip_route_mask_flags2_tag_vrf, @@ -1710,7 +1710,7 @@ DEFUN (no_ip_route_mask_flags2_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, NULL, argv[10]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, NULL, argv[9]->arg); } @@ -1727,7 +1727,7 @@ DEFUN (no_ip_route_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, argv[5]->arg, argv[8]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, argv[5]->arg, argv[7]->arg); } DEFUN (no_ip_route_tag_distance_vrf, @@ -1745,7 +1745,7 @@ DEFUN (no_ip_route_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[6]->arg, argv[7]->arg, argv[10]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[6]->arg, argv[7]->arg, argv[9]->arg); } DEFUN (no_ip_route_flags_distance_vrf, @@ -1762,7 +1762,7 @@ DEFUN (no_ip_route_flags_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, NULL, argv[6]->arg, argv[9]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, NULL, argv[6]->arg, argv[8]->arg); } DEFUN (no_ip_route_flags_tag_distance_vrf, @@ -1781,7 +1781,7 @@ DEFUN (no_ip_route_flags_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, argv[7]->arg, argv[8]->arg,argv[11]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, argv[7]->arg, argv[8]->arg,argv[10]->arg); } DEFUN (no_ip_route_flags_distance2_vrf, @@ -1796,7 +1796,7 @@ DEFUN (no_ip_route_flags_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, NULL, argv[5]->arg, argv[8]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg); } DEFUN (no_ip_route_flags_tag_distance2_vrf, @@ -1813,7 +1813,7 @@ DEFUN (no_ip_route_flags_tag_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, argv[6]->arg , argv[7]->arg, argv[10]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, argv[6]->arg , argv[7]->arg, argv[9]->arg); } DEFUN (no_ip_route_mask_distance_vrf, @@ -1830,7 +1830,7 @@ DEFUN (no_ip_route_mask_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[6]->arg, argv[9]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[6]->arg, argv[8]->arg); } DEFUN (no_ip_route_mask_tag_distance_vrf, @@ -1849,7 +1849,7 @@ DEFUN (no_ip_route_mask_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, argv[8]->arg, argv[11]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, argv[8]->arg, argv[10]->arg); } DEFUN (no_ip_route_mask_flags_distance_vrf, @@ -1867,7 +1867,7 @@ DEFUN (no_ip_route_mask_flags_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, argv[7]->arg, argv[10]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, argv[7]->arg, argv[9]->arg); } DEFUN (no_ip_route_mask_flags_tag_distance_vrf, @@ -1887,7 +1887,7 @@ DEFUN (no_ip_route_mask_flags_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, argv[9]->arg, argv[12]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, argv[9]->arg, argv[11]->arg); } DEFUN (no_ip_route_mask_flags_distance2_vrf, @@ -1903,7 +1903,7 @@ DEFUN (no_ip_route_mask_flags_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, argv[6]->arg, argv[9]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, argv[6]->arg, argv[8]->arg); } DEFUN (no_ip_route_mask_flags_tag_distance2_vrf, @@ -1921,7 +1921,7 @@ DEFUN (no_ip_route_mask_flags_tag_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, argv[8]->arg, argv[11]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, argv[8]->arg, argv[10]->arg); } /* New RIB. Detailed information for IPv4 route. */ @@ -3436,7 +3436,7 @@ DEFUN (show_ip_route_vrf_all_protocol, int first = 1; int vrf_header = 1; - type = proto_redistnum (AFI_IP, argv[7]->arg); + type = proto_redistnum (AFI_IP, argv[6]->arg); if (type < 0) { vty_out (vty, "Unknown route type%s", VTY_NEWLINE); @@ -3489,7 +3489,7 @@ DEFUN (show_ip_route_vrf_all_addr, struct zebra_vrf *zvrf; vrf_iter_t iter; - ret = str2prefix_ipv4 (argv[6]->arg, &p); + ret = str2prefix_ipv4 (argv[5]->arg, &p); if (ret <= 0) { vty_out (vty, "%% Malformed IPv4 address%s", VTY_NEWLINE); @@ -4271,7 +4271,7 @@ DEFUN (ipv6_route_vrf, "IPv6 gateway interface name\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, NULL, NULL, argv[6]->arg); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, NULL, NULL, argv[5]->arg); } DEFUN (ipv6_route_tag_vrf, @@ -4286,7 +4286,7 @@ DEFUN (ipv6_route_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[5]->arg, NULL, argv[8]->arg); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[5]->arg, NULL, argv[7]->arg); } DEFUN (ipv6_route_flags_vrf, @@ -4301,7 +4301,7 @@ DEFUN (ipv6_route_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, argv[7]->arg); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, argv[6]->arg); } DEFUN (ipv6_route_flags_tag_vrf, @@ -4318,7 +4318,7 @@ DEFUN (ipv6_route_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, NULL, argv[9]->arg); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, NULL, argv[8]->arg); } DEFUN (ipv6_route_ifname_vrf, @@ -4331,7 +4331,7 @@ DEFUN (ipv6_route_ifname_vrf, "IPv6 gateway interface name\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, argv[7]->arg); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, argv[6]->arg); } DEFUN (ipv6_route_ifname_tag_vrf, ipv6_route_ifname_tag_vrf_cmd, @@ -4345,7 +4345,7 @@ DEFUN (ipv6_route_ifname_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, NULL, argv[9]->arg); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, NULL, argv[8]->arg); } DEFUN (ipv6_route_ifname_flags_vrf, @@ -4360,7 +4360,7 @@ DEFUN (ipv6_route_ifname_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[8]->arg); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[7]->arg); } DEFUN (ipv6_route_ifname_flags_tag_vrf, @@ -4377,7 +4377,7 @@ DEFUN (ipv6_route_ifname_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, NULL, argv[10]->arg); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, NULL, argv[9]->arg); } DEFUN (ipv6_route_pref_vrf, @@ -4391,7 +4391,7 @@ DEFUN (ipv6_route_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, NULL, argv[4]->arg, argv[7]->arg); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, NULL, argv[4]->arg, argv[6]->arg); } DEFUN (ipv6_route_pref_tag_vrf, @@ -4407,7 +4407,7 @@ DEFUN (ipv6_route_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[5]->arg, argv[6]->arg, argv[9]->arg); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[5]->arg, argv[6]->arg, argv[8]->arg); } DEFUN (ipv6_route_flags_pref_vrf, @@ -4423,7 +4423,7 @@ DEFUN (ipv6_route_flags_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[5]->arg, argv[8]->arg); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg); } DEFUN (ipv6_route_flags_pref_tag_vrf, @@ -4441,7 +4441,7 @@ DEFUN (ipv6_route_flags_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, argv[7]->arg, argv[10]->arg); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, argv[7]->arg, argv[9]->arg); } DEFUN (ipv6_route_ifname_pref_vrf, @@ -4455,7 +4455,7 @@ DEFUN (ipv6_route_ifname_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[5]->arg, argv[8]->arg); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[5]->arg, argv[7]->arg); } DEFUN (ipv6_route_ifname_pref_tag_vrf, @@ -4471,7 +4471,7 @@ DEFUN (ipv6_route_ifname_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, argv[7]->arg, argv[10]->arg); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, argv[7]->arg, argv[9]->arg); } DEFUN (ipv6_route_ifname_flags_pref_vrf, @@ -4487,7 +4487,7 @@ DEFUN (ipv6_route_ifname_flags_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[6]->arg, argv[9]->arg); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[6]->arg, argv[8]->arg); } DEFUN (ipv6_route_ifname_flags_pref_tag_vrf, @@ -4505,7 +4505,7 @@ DEFUN (ipv6_route_ifname_flags_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, argv[8]->arg, argv[11]->arg); + return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, argv[8]->arg, argv[10]->arg); } DEFUN (no_ipv6_route_vrf, @@ -4519,7 +4519,7 @@ DEFUN (no_ipv6_route_vrf, "IPv6 gateway interface name\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, NULL, argv[7]->arg); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, NULL, argv[6]->arg); } DEFUN (no_ipv6_route_tag_vrf, @@ -4535,7 +4535,7 @@ DEFUN (no_ipv6_route_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[6]->arg, NULL, argv[9]->arg); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[6]->arg, NULL, argv[8]->arg); } DEFUN (no_ipv6_route_flags_vrf, @@ -4551,7 +4551,7 @@ DEFUN (no_ipv6_route_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, NULL, argv[8]->arg); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, NULL, argv[7]->arg); } DEFUN (no_ipv6_route_flags_tag_vrf, @@ -4569,7 +4569,7 @@ DEFUN (no_ipv6_route_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, NULL, argv[10]->arg); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, NULL, argv[9]->arg); } DEFUN (no_ipv6_route_ifname_vrf, @@ -4583,7 +4583,7 @@ DEFUN (no_ipv6_route_ifname_vrf, "IPv6 gateway interface name\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, NULL, argv[8]->arg); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, NULL, argv[7]->arg); } DEFUN (no_ipv6_route_ifname_tag_vrf, @@ -4599,7 +4599,7 @@ DEFUN (no_ipv6_route_ifname_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, NULL, argv[10]->arg); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, NULL, argv[9]->arg); } DEFUN (no_ipv6_route_ifname_flags_vrf, @@ -4615,7 +4615,7 @@ DEFUN (no_ipv6_route_ifname_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, NULL, argv[9]->arg); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, NULL, argv[8]->arg); } DEFUN (no_ipv6_route_ifname_flags_tag_vrf, @@ -4633,7 +4633,7 @@ DEFUN (no_ipv6_route_ifname_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, NULL, argv[11]->arg); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, NULL, argv[10]->arg); } DEFUN (no_ipv6_route_pref_vrf, @@ -4648,7 +4648,7 @@ DEFUN (no_ipv6_route_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, argv[5]->arg, argv[8]->arg); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, argv[5]->arg, argv[7]->arg); } DEFUN (no_ipv6_route_pref_tag_vrf, @@ -4665,7 +4665,7 @@ DEFUN (no_ipv6_route_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[6]->arg, argv[7]->arg, argv[10]->arg); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[6]->arg, argv[7]->arg, argv[9]->arg); } DEFUN (no_ipv6_route_flags_pref_vrf, @@ -4683,7 +4683,7 @@ DEFUN (no_ipv6_route_flags_pref_vrf, VRF_CMD_HELP_STR) { /* We do not care about argv[5]->arg */ - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, argv[6]->arg, argv[9]->arg); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, argv[6]->arg, argv[8]->arg); } DEFUN (no_ipv6_route_flags_pref_tag_vrf, @@ -4703,7 +4703,7 @@ DEFUN (no_ipv6_route_flags_pref_tag_vrf, VRF_CMD_HELP_STR) { /* We do not care about argv[5]->arg */ - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, argv[8]->arg, argv[11]->arg); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, argv[8]->arg, argv[10]->arg); } DEFUN (no_ipv6_route_ifname_pref_vrf, @@ -4718,7 +4718,7 @@ DEFUN (no_ipv6_route_ifname_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[6]->arg, argv[9]->arg); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[6]->arg, argv[8]->arg); } DEFUN (no_ipv6_route_ifname_pref_tag_vrf, @@ -4735,7 +4735,7 @@ DEFUN (no_ipv6_route_ifname_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, argv[8]->arg, argv[11]->arg); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, argv[8]->arg, argv[10]->arg); } DEFUN (no_ipv6_route_ifname_flags_pref_vrf, @@ -4752,7 +4752,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, argv[7]->arg, argv[10]->arg); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, argv[7]->arg, argv[9]->arg); } DEFUN (no_ipv6_route_ifname_flags_pref_tag_vrf, @@ -4771,7 +4771,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, argv[9]->arg, argv[12]->arg); + return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, argv[9]->arg, argv[11]->arg); } /* @@ -5025,7 +5025,7 @@ DEFUN (show_ipv6_route_protocol, if ( argc >1 ) { VRF_GET_ID (vrf_id, argv[4]->arg); - type = proto_redistnum (AFI_IP6, argv[1]); + type = proto_redistnum (AFI_IP6, argv[3]->arg); } else type = proto_redistnum (AFI_IP6, argv[4]->arg); @@ -5465,7 +5465,7 @@ DEFUN (show_ipv6_route_vrf_all_protocol, int first = 1; int vrf_header = 1; - type = proto_redistnum (AFI_IP6, argv[6]->arg); + type = proto_redistnum (AFI_IP6, argv[4]->arg); if (type < 0) { vty_out (vty, "Unknown route type%s", VTY_NEWLINE); -- cgit v1.2.3 From 7c022376c83e8eb72ee02ff22916e925ef68430c Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Fri, 23 Sep 2016 19:26:31 +0000 Subject: zebra: add 'int idx_foo' argv index variables Signed-off-by: Daniel Walton --- tools/argv_translator.py | 363 ++++++++++---- zebra/debug.c | 27 +- zebra/interface.c | 78 ++- zebra/irdp_interface.c | 25 +- zebra/router-id.c | 3 +- zebra/rtadv.c | 43 +- zebra/test_main.c | 3 +- zebra/zebra_routemap.c | 77 +-- zebra/zebra_vty.c | 1182 +++++++++++++++++++++++++++++++++++++--------- 9 files changed, 1394 insertions(+), 407 deletions(-) (limited to 'zebra') diff --git a/tools/argv_translator.py b/tools/argv_translator.py index 4ee0831ed..eff05a412 100755 --- a/tools/argv_translator.py +++ b/tools/argv_translator.py @@ -4,6 +4,7 @@ import re import sys import os import subprocess +from collections import OrderedDict from copy import deepcopy from pprint import pformat, pprint @@ -156,7 +157,7 @@ def get_argv_translator(line_number, line): return table ''' -def get_argv_variable_indexes(line_number, line): +def get_command_string_variable_indexes(line_number, line): indexes = {} line = line.strip() @@ -177,6 +178,230 @@ def get_argv_variable_indexes(line_number, line): return (max_index, indexes) +def get_token_index_variable_name(line_number, token): + + re_range = re.search('\(\d+-\d+\)', token) + + if token.startswith('['): + assert token.endswith(']'), "Token %s should end with ]" % token + token = token[1:-1] + + if token.startswith('<'): + assert token.endswith('>'), "Token %s should end with >" % token + token = token[1:-1] + + if token == 'A.B.C.D': + return 'idx_ipv4' + + elif token == 'A.B.C.D/M': + return 'idx_ipv4_prefixlen' + + elif token == 'X:X::X:X': + return 'idx_ipv6' + + elif token == 'X:X::X:X/M': + return 'idx_ipv6_prefixlen' + + elif token == 'ASN:nn_or_IP-address:nn': + return 'idx_ext_community' + + elif token == '.AA:NN': + return 'idx_community' + + elif token == 'WORD': + return 'idx_word' + + elif token == 'json': + return 'idx_json' + + elif token == '.LINE': + return 'idx_regex' + + elif token == 'A.B.C.D|INTERFACE': + return 'idx_ipv4_ifname' + + elif token == 'A.B.C.D|INTERFACE|null0': + return 'idx_ipv4_ifname_null' + + elif token == 'X:X::X:X|INTERFACE': + return 'idx_ipv6_ifname' + + elif token == 'reject|blackhole': + return 'idx_reject_blackhole' + + elif token == 'route-map NAME': + return 'idx_route_map' + + elif token == 'recv|send|detail': + return 'idx_recv_send' + + elif token == 'recv|send': + return 'idx_recv_send' + + elif token == 'up|down': + return 'idx_up_down' + + elif token == 'off-link': + return 'idx_off_link' + + elif token == 'no-autoconfig': + return 'idx_no_autoconfig' + + elif token == 'router-address': + return 'idx_router_address' + + elif token == 'high|medium|low': + return 'idx_high_medium_low' + + elif token == '(0-4294967295)|infinite': + return 'idx_number_infinite' + + elif token == '(1-199)|(1300-2699)|WORD': + return 'idx_acl' + + elif token == 'A.B.C.D|X:X::X:X': + return 'idx_ip' + + elif token == 'urib-only|mrib-only|mrib-then-urib|lower-distance|longer-prefix': + return 'idx_rpf_lookup_mode' + + elif token in ('kernel|connected|static|rip|ospf|isis|pim|table', + 'kernel|connected|static|ripng|ospf6|isis|table', + 'kernel|connected|static|rip|isis|bgp|pim|table', + 'kernel|connected|static|rip|ospf|isis|bgp|pim|table', + 'kernel|connected|static|rip|ospf|isis|bgp|pim|table', + 'kernel|connected|static|rip|ospf|isis|bgp|pim|table|any', + 'kernel|connected|static|ripng|ospf6|isis|bgp|table|any', + 'kernel|connected|static|ripng|ospf6|isis|bgp|table', + 'kernel|connected|static|ospf6|isis|bgp|table', + 'kernel|connected|static|ospf|isis|bgp|pim|table', + 'kernel|connected|static|ripng|isis|bgp|table', + # '', + 'bgp|ospf|rip|ripng|isis|ospf6|connected|system|kernel|static', + 'kernel|connected|static|rip|ripng|ospf|ospf6|bgp|pim|table'): + return 'idx_protocol' + + elif '|' in token: + raise Exception("%d: what variable name for %s" % (line_number, token)) + + elif re_range: + return 'idx_number' + + elif token.upper() == token: + return 'idx_%s' % token.lower() + + else: + raise Exception("%d: what variable name for %s" % (line_number, token)) + + +def get_command_string_index_variable_table(line_number, line): + """ + Return a table that maps an index position to a variable name such as 'idx_ipv4' + """ + indexes = OrderedDict() + + line = line.strip() + assert line.startswith('"'), "line does not start with \"\n%s" % (line) + assert line.endswith('",'), "line does not end with \",\n%s" % (line) + line = line[1:-2] + max_index = 0 + + for (token_index, token) in enumerate(line_to_tokens(line_number, line)): + if not token: + raise Exception("%d: empty token" % line_number) + + if token_is_variable(line_number, token): + # print "%s is a token" % token + idx_variable_name = get_token_index_variable_name(line_number, token) + count = 0 + for tmp in indexes.itervalues(): + if tmp == idx_variable_name: + count += 1 + elif re.search('^%s_\d+' % idx_variable_name, tmp): + count += 1 + if count: + idx_variable_name = "%s_%d" % (idx_variable_name, count + 1) + indexes[token_index] = idx_variable_name + + return indexes + +def expand_command_string(line): + + # in the middle + line = line.replace('" CMD_AS_RANGE "', '(1-4294967295)') + line = line.replace('" DYNAMIC_NEIGHBOR_LIMIT_RANGE "', '(1-5000)') + line = line.replace('" BGP_INSTANCE_CMD "', ' WORD') + line = line.replace('" BGP_INSTANCE_ALL_CMD "', ' all') + line = line.replace('" CMD_RANGE_STR(1, MULTIPATH_NUM) "', '(1-255)') + line = line.replace('" QUAGGA_IP_REDIST_STR_BGPD "', '') + line = line.replace('" QUAGGA_IP6_REDIST_STR_BGPD "', '') + line = line.replace('" OSPF_LSA_TYPES_CMD_STR "', 'asbr-summary|external|network|router|summary|nssa-external|opaque-link|opaque-area|opaque-as') + line = line.replace('" QUAGGA_REDIST_STR_OSPFD "', '') + line = line.replace('" VRF_CMD_STR "', 'vrf NAME') + line = line.replace('" VRF_ALL_CMD_STR "', 'vrf all') + line = line.replace('" QUAGGA_IP_PROTOCOL_MAP_STR_ZEBRA "', '') + line = line.replace('" QUAGGA_IP6_PROTOCOL_MAP_STR_ZEBRA "', '') + line = line.replace('" QUAGGA_REDIST_STR_RIPNGD "', '') + line = line.replace('" QUAGGA_REDIST_STR_RIPD "', '') + line = line.replace('" QUAGGA_REDIST_STR_OSPF6D "', '') + line = line.replace('" QUAGGA_REDIST_STR_ISISD "', '') + line = line.replace('" LOG_FACILITIES "', '') + + # endswith + line = line.replace('" CMD_AS_RANGE,', ' (1-4294967295)",') + line = line.replace('" DYNAMIC_NEIGHBOR_LIMIT_RANGE,', ' (1-5000)",') + line = line.replace('" BGP_INSTANCE_CMD,', ' WORD",') + line = line.replace('" BGP_INSTANCE_ALL_CMD,', ' all",') + line = line.replace('" CMD_RANGE_STR(1, MULTIPATH_NUM),', '(1-255)",') + line = line.replace('" CMD_RANGE_STR(1, MAXTTL),', '(1-255)",') + line = line.replace('" BFD_CMD_DETECT_MULT_RANGE BFD_CMD_MIN_RX_RANGE BFD_CMD_MIN_TX_RANGE,', '(2-255) (50-60000) (50-60000)",') + line = line.replace('" OSPF_LSA_TYPES_CMD_STR,', + ' asbr-summary|external|network|router|summary|nssa-external|opaque-link|opaque-area|opaque-as",') + line = line.replace('" BGP_UPDATE_SOURCE_REQ_STR,', ' ",') + line = line.replace('" BGP_UPDATE_SOURCE_OPT_STR,', ' [A.B.C.D|X:X::X:X|WORD]",') + line = line.replace('" QUAGGA_IP_REDIST_STR_BGPD,', ' ",') + line = line.replace('" QUAGGA_IP6_REDIST_STR_BGPD,', ' ",') + line = line.replace('" QUAGGA_REDIST_STR_OSPFD,', ' ",') + line = line.replace('" VRF_CMD_STR,', ' vrf NAME",') + line = line.replace('" VRF_ALL_CMD_STR,', ' vrf all",') + line = line.replace('" QUAGGA_IP_REDIST_STR_ZEBRA,', ' ",') + line = line.replace('" QUAGGA_IP6_REDIST_STR_ZEBRA,', ' ",') + line = line.replace('" QUAGGA_IP_PROTOCOL_MAP_STR_ZEBRA,', ' ",') + line = line.replace('" QUAGGA_IP6_PROTOCOL_MAP_STR_ZEBRA,', ' ",') + line = line.replace('" QUAGGA_REDIST_STR_RIPNGD,', ' ",') + line = line.replace('" QUAGGA_REDIST_STR_RIPD,', ' ",') + line = line.replace('" PIM_CMD_IP_MULTICAST_ROUTING,', ' ip multicast-routing",') + line = line.replace('" PIM_CMD_IP_IGMP_QUERY_INTERVAL,', ' ip igmp query-interval",') + line = line.replace('" PIM_CMD_IP_IGMP_QUERY_MAX_RESPONSE_TIME_DSEC,', ' ip igmp query-max-response-time-dsec",') + line = line.replace('" PIM_CMD_IP_IGMP_QUERY_MAX_RESPONSE_TIME,', ' ip igmp query-max-response-time",') + line = line.replace('" QUAGGA_REDIST_STR_OSPF6D,', ' ",') + line = line.replace('" QUAGGA_REDIST_STR_ISISD,', ' ",') + line = line.replace('" LOG_FACILITIES,', ' ",') + + # startswith + line = line.replace('LISTEN_RANGE_CMD "', '"bgp listen range ') + line = line.replace('NO_NEIGHBOR_CMD2 "', '"no neighbor ') + line = line.replace('NEIGHBOR_CMD2 "', '"neighbor ') + line = line.replace('NO_NEIGHBOR_CMD "', '"no neighbor ') + line = line.replace('NEIGHBOR_CMD "', '"neighbor ') + line = line.replace('PIM_CMD_NO "', '"no ') + line = line.replace('PIM_CMD_IP_IGMP_QUERY_INTERVAL "', '"ip igmp query-interval ') + line = line.replace('PIM_CMD_IP_IGMP_QUERY_MAX_RESPONSE_TIME "', '"ip igmp query-max-response-time ') + line = line.replace('PIM_CMD_IP_IGMP_QUERY_MAX_RESPONSE_TIME_DSEC "', '"ip igmp query-max-response-time-dsec ') + + # solo + line = line.replace('NO_NEIGHBOR_CMD2,', '"no neighbor ",') + line = line.replace('NEIGHBOR_CMD2,', '"neighbor ",') + line = line.replace('NO_NEIGHBOR_CMD,', '"no neighbor ",') + line = line.replace('NEIGHBOR_CMD,', '"neighbor ",') + line = line.replace('PIM_CMD_IP_MULTICAST_ROUTING,', '"ip multicast-routing",') + + if line.rstrip().endswith('" ,'): + line = line.replace('" ,', '",') + + return line + + class DEFUN(object): def __init__(self, line_number, command_string_expanded, lines): @@ -216,14 +441,14 @@ DEFUN (no_bgp_maxmed_onstartup, elif state == 'HELP': if line.strip() == '{': - self.guts.append(line) + # self.guts.append(line) state = 'BODY' else: self.help_strings.append(line) elif state == 'BODY': if line.rstrip() == '}': - self.guts.append(line) + # self.guts.append(line) state = None else: self.guts.append(line) @@ -239,7 +464,7 @@ DEFUN (no_bgp_maxmed_onstartup, return self.name def sanity_check(self): - (max_index, variable_indexes) = get_argv_variable_indexes(self.line_number, self.command_string_expanded) + (max_index, variable_indexes) = get_command_string_variable_indexes(self.line_number, self.command_string_expanded) # sanity check that each argv index matches a variable in the command string for line in self.guts: @@ -256,7 +481,6 @@ DEFUN (no_bgp_maxmed_onstartup, def get_new_command_string(self): line = self.command_string - # dwalton # Change <1-255> to (1-255) # Change (foo|bar) to # Change {wazzup} to [wazzup]....there shouldn't be many of these @@ -284,16 +508,66 @@ DEFUN (no_bgp_maxmed_onstartup, line = re_space.group(1) + ' '.join(line.split()) + re_space.group(2) return line + def get_used_idx_variables(self, idx_table): + used = {} + + # sanity check that each argv index matches a variable in the command string + for line in self.guts: + if 'argv[' in line and '->arg' in line: + tmp_line = deepcopy(line) + re_argv = re.search('^.*?argv\[(\w+)\]->arg(.*)$', tmp_line) + + while re_argv: + index = re_argv.group(1) + + if index.isdigit(): + index = int(index) + if index in idx_table: + used[index] = idx_table[index] + else: + print "%d: could not find idx variable for %d" % (self.line_number, index) + else: + for (key, value) in idx_table.iteritems(): + if value == index: + used[key] = value + break + + tmp_line = re_argv.group(2) + re_argv = re.search('^.*?argv\[(\w+)\]->arg(.*)$', tmp_line) + + return used + def dump(self): + new_command_string = self.get_new_command_string() + new_command_string_expanded = expand_command_string(new_command_string) lines = [] lines.append("DEFUN (%s,\n" % self.name) lines.append(" %s,\n" % self.name_cmd) - lines.append(self.get_new_command_string()) + lines.append(new_command_string) lines.extend(self.help_strings) - lines.extend(self.guts) - return ''.join(lines) + lines.append('{\n') + # only print the variables that will be used else we get a compile error + idx_table = get_command_string_index_variable_table(self.line_number, new_command_string_expanded) + idx_table_used = self.get_used_idx_variables(idx_table) + for index in sorted(idx_table_used.keys()): + idx_variable = idx_table_used[index] + lines.append(" int %s = %d;\n" % (idx_variable, index)) + + # sanity check that each argv index matches a variable in the command string + for line in self.guts: + if line.startswith(' int idx_'): + pass + elif 'argv[' in line and '->arg' in line: + for (index, idx_variable) in idx_table.iteritems(): + line = line.replace("argv[%d]->arg" % index, "argv[%s]->arg" % idx_variable) + lines.append(line) + else: + lines.append(line) + + lines.append('}\n') + return ''.join(lines) def update_argvs(filename): @@ -334,78 +608,7 @@ def update_argvs(filename): state = 'DEFUN_BODY' elif line_number == defun_line_number + 2: - - # in the middle - line = line.replace('" CMD_AS_RANGE "', '<1-4294967295>') - line = line.replace('" DYNAMIC_NEIGHBOR_LIMIT_RANGE "', '<1-5000>') - line = line.replace('" BGP_INSTANCE_CMD "', '(view|vrf) WORD') - line = line.replace('" BGP_INSTANCE_ALL_CMD "', '(view|vrf) all') - line = line.replace('" CMD_RANGE_STR(1, MULTIPATH_NUM) "', '<1-255>') - line = line.replace('" QUAGGA_IP_REDIST_STR_BGPD "', '(kernel|connected|static|rip|ospf|isis|pim|table)') - line = line.replace('" QUAGGA_IP6_REDIST_STR_BGPD "', '(kernel|connected|static|ripng|ospf6|isis|table)') - line = line.replace('" OSPF_LSA_TYPES_CMD_STR "', 'asbr-summary|external|network|router|summary|nssa-external|opaque-link|opaque-area|opaque-as') - line = line.replace('" QUAGGA_REDIST_STR_OSPFD "', '(kernel|connected|static|rip|isis|bgp|pim|table)') - line = line.replace('" VRF_CMD_STR "', 'vrf NAME') - line = line.replace('" VRF_ALL_CMD_STR "', 'vrf all') - line = line.replace('" QUAGGA_IP_PROTOCOL_MAP_STR_ZEBRA "', '(kernel|connected|static|rip|ospf|isis|bgp|pim|table|any)') - line = line.replace('" QUAGGA_IP6_PROTOCOL_MAP_STR_ZEBRA "', '(kernel|connected|static|ripng|ospf6|isis|bgp|table|any)') - line = line.replace('" QUAGGA_REDIST_STR_RIPNGD "', '(kernel|connected|static|ospf6|isis|bgp|table)') - line = line.replace('" QUAGGA_REDIST_STR_RIPD "', '(kernel|connected|static|ospf|isis|bgp|pim|table)') - line = line.replace('" QUAGGA_REDIST_STR_OSPF6D "', '(kernel|connected|static|ripng|isis|bgp|table)') - line = line.replace('" QUAGGA_REDIST_STR_ISISD "', '(kernel|connected|static|rip|ripng|ospf|ospf6|bgp|pim|table)') - line = line.replace('" LOG_FACILITIES "', '(kern|user|mail|daemon|auth|syslog|lpr|news|uucp|cron|local0|local1|local2|local3|local4|local5|local6|local7)') - - # endswith - line = line.replace('" CMD_AS_RANGE,', ' <1-4294967295>",') - line = line.replace('" DYNAMIC_NEIGHBOR_LIMIT_RANGE,', ' <1-5000>",') - line = line.replace('" BGP_INSTANCE_CMD,', ' (view|vrf) WORD",') - line = line.replace('" BGP_INSTANCE_ALL_CMD,', ' (view|vrf) all",') - line = line.replace('" CMD_RANGE_STR(1, MULTIPATH_NUM),', '<1-255>",') - line = line.replace('" CMD_RANGE_STR(1, MAXTTL),', '<1-255>",') - line = line.replace('" BFD_CMD_DETECT_MULT_RANGE BFD_CMD_MIN_RX_RANGE BFD_CMD_MIN_TX_RANGE,', '<2-255> <50-60000> <50-60000>",') - line = line.replace('" OSPF_LSA_TYPES_CMD_STR,', - ' asbr-summary|external|network|router|summary|nssa-external|opaque-link|opaque-area|opaque-as",') - line = line.replace('" BGP_UPDATE_SOURCE_REQ_STR,', ' (A.B.C.D|X:X::X:X|WORD)",') - line = line.replace('" BGP_UPDATE_SOURCE_OPT_STR,', ' {A.B.C.D|X:X::X:X|WORD}",') - line = line.replace('" QUAGGA_IP_REDIST_STR_BGPD,', ' (kernel|connected|static|rip|ospf|isis|pim|table)",') - line = line.replace('" QUAGGA_IP6_REDIST_STR_BGPD,', ' (kernel|connected|static|ripng|ospf6|isis|table)",') - line = line.replace('" QUAGGA_REDIST_STR_OSPFD,', ' (kernel|connected|static|rip|isis|bgp|pim|table)",') - line = line.replace('" VRF_CMD_STR,', ' vrf NAME",') - line = line.replace('" VRF_ALL_CMD_STR,', ' vrf all",') - line = line.replace('" QUAGGA_IP_REDIST_STR_ZEBRA,', ' (kernel|connected|static|rip|ospf|isis|bgp|pim|table)",') - line = line.replace('" QUAGGA_IP6_REDIST_STR_ZEBRA,', ' (kernel|connected|static|ripng|ospf6|isis|bgp|table)",') - line = line.replace('" QUAGGA_IP_PROTOCOL_MAP_STR_ZEBRA,', ' (kernel|connected|static|rip|ospf|isis|bgp|pim|table|any)",') - line = line.replace('" QUAGGA_IP6_PROTOCOL_MAP_STR_ZEBRA,', ' (kernel|connected|static|ripng|ospf6|isis|bgp|table|any)",') - line = line.replace('" QUAGGA_REDIST_STR_RIPNGD,', ' (kernel|connected|static|ospf6|isis|bgp|table)",') - line = line.replace('" QUAGGA_REDIST_STR_RIPD,', ' (kernel|connected|static|ospf|isis|bgp|pim|table)",') - line = line.replace('" PIM_CMD_IP_MULTICAST_ROUTING,', ' ip multicast-routing",') - line = line.replace('" PIM_CMD_IP_IGMP_QUERY_INTERVAL,', ' ip igmp query-interval",') - line = line.replace('" PIM_CMD_IP_IGMP_QUERY_MAX_RESPONSE_TIME_DSEC,', ' ip igmp query-max-response-time-dsec",') - line = line.replace('" PIM_CMD_IP_IGMP_QUERY_MAX_RESPONSE_TIME,', ' ip igmp query-max-response-time",') - line = line.replace('" QUAGGA_REDIST_STR_OSPF6D,', ' (kernel|connected|static|ripng|isis|bgp|table)",') - line = line.replace('" QUAGGA_REDIST_STR_ISISD,', ' (kernel|connected|static|rip|ripng|ospf|ospf6|bgp|pim|table)",') - line = line.replace('" LOG_FACILITIES,', ' (kern|user|mail|daemon|auth|syslog|lpr|news|uucp|cron|local0|local1|local2|local3|local4|local5|local6|local7)",') - - # startswith - line = line.replace('LISTEN_RANGE_CMD "', '"bgp listen range (A.B.C.D/M|X:X::X:X/M) ') - line = line.replace('NO_NEIGHBOR_CMD2 "', '"no neighbor (A.B.C.D|X:X::X:X|WORD) ') - line = line.replace('NEIGHBOR_CMD2 "', '"neighbor (A.B.C.D|X:X::X:X|WORD) ') - line = line.replace('NO_NEIGHBOR_CMD "', '"no neighbor (A.B.C.D|X:X::X:X) ') - line = line.replace('NEIGHBOR_CMD "', '"neighbor (A.B.C.D|X:X::X:X) ') - line = line.replace('PIM_CMD_NO "', '"no ') - line = line.replace('PIM_CMD_IP_IGMP_QUERY_INTERVAL "', '"ip igmp query-interval ') - line = line.replace('PIM_CMD_IP_IGMP_QUERY_MAX_RESPONSE_TIME "', '"ip igmp query-max-response-time ') - line = line.replace('PIM_CMD_IP_IGMP_QUERY_MAX_RESPONSE_TIME_DSEC "', '"ip igmp query-max-response-time-dsec ') - - # solo - line = line.replace('NO_NEIGHBOR_CMD2,', '"no neighbor (A.B.C.D|X:X::X:X|WORD)",') - line = line.replace('NEIGHBOR_CMD2,', '"neighbor (A.B.C.D|X:X::X:X|WORD)",') - line = line.replace('NO_NEIGHBOR_CMD,', '"no neighbor (A.B.C.D|X:X::X:X)",') - line = line.replace('NEIGHBOR_CMD,', '"neighbor (A.B.C.D|X:X::X:X)",') - line = line.replace('PIM_CMD_IP_MULTICAST_ROUTING,', '"ip multicast-routing",') - - if line.rstrip().endswith('" ,'): - line = line.replace('" ,', '",') + line = expand_command_string(line) command_string = line ''' diff --git a/zebra/debug.c b/zebra/debug.c index cbdcdf27f..3714ffe3f 100644 --- a/zebra/debug.c +++ b/zebra/debug.c @@ -130,12 +130,13 @@ DEFUN (debug_zebra_packet_direct, "Debug option set for receive packet\n" "Debug option set for send packet\n") { + int idx_recv_send = 3; zebra_debug_packet = ZEBRA_DEBUG_PACKET; - if (strncmp ("send", argv[3]->arg, strlen (argv[3]->arg)) == 0) + if (strncmp ("send", argv[idx_recv_send]->arg, strlen (argv[idx_recv_send]->arg)) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND); - if (strncmp ("recv", argv[3]->arg, strlen (argv[3]->arg)) == 0) + if (strncmp ("recv", argv[idx_recv_send]->arg, strlen (argv[idx_recv_send]->arg)) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV); - if (strncmp ("detail", argv[3]->arg, strlen (argv[3]->arg)) == 0) + if (strncmp ("detail", argv[idx_recv_send]->arg, strlen (argv[idx_recv_send]->arg)) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_DETAIL); return CMD_SUCCESS; } @@ -150,10 +151,11 @@ DEFUN (debug_zebra_packet_detail, "Debug option set for send packet\n" "Debug option set detailed information\n") { + int idx_recv_send = 3; zebra_debug_packet = ZEBRA_DEBUG_PACKET; - if (strncmp ("send", argv[3]->arg, strlen (argv[3]->arg)) == 0) + if (strncmp ("send", argv[idx_recv_send]->arg, strlen (argv[idx_recv_send]->arg)) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND); - if (strncmp ("recv", argv[3]->arg, strlen (argv[3]->arg)) == 0) + if (strncmp ("recv", argv[idx_recv_send]->arg, strlen (argv[idx_recv_send]->arg)) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV); SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_DETAIL); return CMD_SUCCESS; @@ -180,9 +182,10 @@ DEFUN (debug_zebra_kernel_msgdump, "Dump raw netlink messages received\n" "Dump raw netlink messages sent\n") { - if (argv[4]->arg && strncmp(argv[4]->arg, "recv", strlen(argv[4]->arg)) == 0) + int idx_recv_send = 4; + if (argv[idx_recv_send]->arg && strncmp(argv[idx_recv_send]->arg, "recv", strlen(argv[idx_recv_send]->arg)) == 0) SET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV); - if (!argv[4]->arg || strncmp(argv[4]->arg, "send", strlen(argv[4]->arg)) == 0) + if (!argv[idx_recv_send]->arg || strncmp(argv[idx_recv_send]->arg, "send", strlen(argv[idx_recv_send]->arg)) == 0) SET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND); return CMD_SUCCESS; } @@ -267,9 +270,10 @@ DEFUN (no_debug_zebra_packet_direct, "Debug option set for receive packet\n" "Debug option set for send packet\n") { - if (strncmp ("send", argv[4]->arg, strlen (argv[4]->arg)) == 0) + int idx_recv_send = 4; + if (strncmp ("send", argv[idx_recv_send]->arg, strlen (argv[idx_recv_send]->arg)) == 0) UNSET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND); - if (strncmp ("recv", argv[4]->arg, strlen (argv[4]->arg)) == 0) + if (strncmp ("recv", argv[idx_recv_send]->arg, strlen (argv[idx_recv_send]->arg)) == 0) UNSET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV); return CMD_SUCCESS; } @@ -296,9 +300,10 @@ DEFUN (no_debug_zebra_kernel_msgdump, "Dump raw netlink messages received\n" "Dump raw netlink messages sent\n") { - if (!argv[1] || (argv[5]->arg && strncmp(argv[5]->arg, "recv", strlen(argv[5]->arg)) == 0)) + int idx_recv_send = 5; + if (!argv[1] || (argv[idx_recv_send]->arg && strncmp(argv[idx_recv_send]->arg, "recv", strlen(argv[idx_recv_send]->arg)) == 0)) UNSET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV); - if (!argv[5]->arg || (argv[5]->arg && strncmp(argv[5]->arg, "send", strlen(argv[5]->arg)) == 0)) + if (!argv[idx_recv_send]->arg || (argv[idx_recv_send]->arg && strncmp(argv[idx_recv_send]->arg, "send", strlen(argv[idx_recv_send]->arg)) == 0)) UNSET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND); return CMD_SUCCESS; } diff --git a/zebra/interface.c b/zebra/interface.c index 1f1146e24..26315bd6c 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1361,19 +1361,21 @@ DEFUN (show_interface_name_vrf, "Interface name\n" VRF_CMD_HELP_STR) { + int idx_ifname = 2; + int idx_name = 4; struct interface *ifp; vrf_id_t vrf_id = VRF_DEFAULT; interface_update_stats (); if (argc > 1) - VRF_GET_ID (vrf_id, argv[4]->arg); + VRF_GET_ID (vrf_id, argv[idx_name]->arg); /* Specified interface print. */ - ifp = if_lookup_by_name_vrf (argv[2]->arg, vrf_id); + ifp = if_lookup_by_name_vrf (argv[idx_ifname]->arg, vrf_id); if (ifp == NULL) { - vty_out (vty, "%% Can't find interface %s%s", argv[2]->arg, + vty_out (vty, "%% Can't find interface %s%s", argv[idx_ifname]->arg, VTY_NEWLINE); return CMD_WARNING; } @@ -1399,6 +1401,7 @@ DEFUN (show_interface_name_vrf_all, "Interface name\n" VRF_ALL_CMD_HELP_STR) { + int idx_ifname = 2; struct interface *ifp; vrf_iter_t iter; int found = 0; @@ -1409,7 +1412,7 @@ DEFUN (show_interface_name_vrf_all, for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter)) { /* Specified interface print. */ - ifp = if_lookup_by_name_vrf (argv[2]->arg, vrf_iter2id (iter)); + ifp = if_lookup_by_name_vrf (argv[idx_ifname]->arg, vrf_iter2id (iter)); if (ifp) { if_dump_vty (vty, ifp); @@ -1419,7 +1422,7 @@ DEFUN (show_interface_name_vrf_all, if (!found) { - vty_out (vty, "%% Can't find interface %s%s", argv[2]->arg, VTY_NEWLINE); + vty_out (vty, "%% Can't find interface %s%s", argv[idx_ifname]->arg, VTY_NEWLINE); return CMD_WARNING; } @@ -1678,11 +1681,12 @@ DEFUN (bandwidth_if, "Set bandwidth informational parameter\n" "Bandwidth in megabits\n") { + int idx_number = 1; struct interface *ifp; unsigned int bandwidth; ifp = (struct interface *) vty->index; - bandwidth = strtol(argv[1]->arg, NULL, 10); + bandwidth = strtol(argv[idx_number]->arg, NULL, 10); /* bandwidth range is <1-100000> */ if (bandwidth < 1 || bandwidth > 100000) @@ -1844,11 +1848,12 @@ DEFUN (link_params_metric, "Link metric for MPLS-TE purpose\n" "Metric value in decimal\n") { + int idx_number = 1; struct interface *ifp = (struct interface *) vty->index; struct if_link_params *iflp = if_link_params_get (ifp); u_int32_t metric; - VTY_GET_ULONG("metric", metric, argv[1]->arg); + VTY_GET_ULONG("metric", metric, argv[idx_number]->arg); /* Update TE metric if needed */ link_param_cmd_set_uint32 (ifp, &iflp->te_metric, LP_TE, metric); @@ -1876,12 +1881,13 @@ DEFUN (link_params_maxbw, "Maximum bandwidth that can be used\n" "Bytes/second (IEEE floating point format)\n") { + int idx_bandwidth = 1; struct interface *ifp = (struct interface *) vty->index; struct if_link_params *iflp = if_link_params_get (ifp); float bw; - if (sscanf (argv[1]->arg, "%g", &bw) != 1) + if (sscanf (argv[idx_bandwidth]->arg, "%g", &bw) != 1) { vty_out (vty, "link_params_maxbw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -1920,11 +1926,12 @@ DEFUN (link_params_max_rsv_bw, "Maximum bandwidth that may be reserved\n" "Bytes/second (IEEE floating point format)\n") { + int idx_bandwidth = 1; struct interface *ifp = (struct interface *) vty->index; struct if_link_params *iflp = if_link_params_get (ifp); float bw; - if (sscanf (argv[1]->arg, "%g", &bw) != 1) + if (sscanf (argv[idx_bandwidth]->arg, "%g", &bw) != 1) { vty_out (vty, "link_params_max_rsv_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -1953,20 +1960,22 @@ DEFUN (link_params_unrsv_bw, "Priority\n" "Bytes/second (IEEE floating point format)\n") { + int idx_number = 1; + int idx_bandwidth = 2; struct interface *ifp = (struct interface *) vty->index; struct if_link_params *iflp = if_link_params_get (ifp); int priority; float bw; /* We don't have to consider about range check here. */ - if (sscanf (argv[1]->arg, "%d", &priority) != 1) + if (sscanf (argv[idx_number]->arg, "%d", &priority) != 1) { vty_out (vty, "link_params_unrsv_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); return CMD_WARNING; } - if (sscanf (argv[2]->arg, "%g", &bw) != 1) + if (sscanf (argv[idx_bandwidth]->arg, "%g", &bw) != 1) { vty_out (vty, "link_params_unrsv_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -1994,11 +2003,12 @@ DEFUN (link_params_admin_grp, "Administrative group membership\n" "32-bit Hexadecimal value (e.g. 0xa1)\n") { + int idx_bitpattern = 1; struct interface *ifp = (struct interface *) vty->index; struct if_link_params *iflp = if_link_params_get (ifp); unsigned long value; - if (sscanf (argv[1]->arg, "0x%lx", &value) != 1) + if (sscanf (argv[idx_bitpattern]->arg, "0x%lx", &value) != 1) { vty_out (vty, "link_params_admin_grp: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2034,19 +2044,21 @@ DEFUN (link_params_inter_as, "Remote AS number\n" "AS number in the range <1-4294967295>\n") { + int idx_ipv4 = 1; + int idx_number = 3; struct interface *ifp = (struct interface *) vty->index; struct if_link_params *iflp = if_link_params_get (ifp); struct in_addr addr; u_int32_t as; - if (!inet_aton (argv[1]->arg, &addr)) + if (!inet_aton (argv[idx_ipv4]->arg, &addr)) { vty_out (vty, "Please specify Router-Addr by A.B.C.D%s", VTY_NEWLINE); return CMD_WARNING; } - VTY_GET_ULONG("AS number", as, argv[3]->arg); + VTY_GET_ULONG("AS number", as, argv[idx_number]->arg); /* Update Remote IP and Remote AS fields if needed */ if (IS_PARAM_UNSET(iflp, LP_RMT_AS) @@ -2105,6 +2117,7 @@ DEFUN (link_params_delay, "Unidirectional Average Link Delay\n" "Average delay in micro-second as decimal (0...16777215)\n") { + int idx_number = 1; struct interface *ifp = (struct interface *) vty->index; struct if_link_params *iflp = if_link_params_get (ifp); @@ -2112,7 +2125,7 @@ DEFUN (link_params_delay, u_int8_t update = 0; /* Get and Check new delay values */ - VTY_GET_ULONG("delay", delay, argv[1]->arg); + VTY_GET_ULONG("delay", delay, argv[idx_number]->arg); switch (argc) { case 1: @@ -2212,11 +2225,12 @@ DEFUN (link_params_delay_var, "Unidirectional Link Delay Variation\n" "delay variation in micro-second as decimal (0...16777215)\n") { + int idx_number = 1; struct interface *ifp = (struct interface *) vty->index; struct if_link_params *iflp = if_link_params_get (ifp); u_int32_t value; - VTY_GET_ULONG("delay variation", value, argv[1]->arg); + VTY_GET_ULONG("delay variation", value, argv[idx_number]->arg); /* Update Delay Variation if needed */ link_param_cmd_set_uint32 (ifp, &iflp->delay_var, LP_DELAY_VAR, value); @@ -2244,11 +2258,12 @@ DEFUN (link_params_pkt_loss, "Unidirectional Link Packet Loss\n" "percentage of total traffic by 0.000003% step and less than 50.331642%\n") { + int idx_percentage = 1; struct interface *ifp = (struct interface *) vty->index; struct if_link_params *iflp = if_link_params_get (ifp); float fval; - if (sscanf (argv[1]->arg, "%g", &fval) != 1) + if (sscanf (argv[idx_percentage]->arg, "%g", &fval) != 1) { vty_out (vty, "link_params_pkt_loss: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2284,11 +2299,12 @@ DEFUN (link_params_res_bw, "Unidirectional Residual Bandwidth\n" "Bytes/second (IEEE floating point format)\n") { + int idx_bandwidth = 1; struct interface *ifp = (struct interface *) vty->index; struct if_link_params *iflp = if_link_params_get (ifp); float bw; - if (sscanf (argv[1]->arg, "%g", &bw) != 1) + if (sscanf (argv[idx_bandwidth]->arg, "%g", &bw) != 1) { vty_out (vty, "link_params_res_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2330,11 +2346,12 @@ DEFUN (link_params_ava_bw, "Unidirectional Available Bandwidth\n" "Bytes/second (IEEE floating point format)\n") { + int idx_bandwidth = 1; struct interface *ifp = (struct interface *) vty->index; struct if_link_params *iflp = if_link_params_get (ifp); float bw; - if (sscanf (argv[1]->arg, "%g", &bw) != 1) + if (sscanf (argv[idx_bandwidth]->arg, "%g", &bw) != 1) { vty_out (vty, "link_params_ava_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2376,11 +2393,12 @@ DEFUN (link_params_use_bw, "Unidirectional Utilised Bandwidth\n" "Bytes/second (IEEE floating point format)\n") { + int idx_bandwidth = 1; struct interface *ifp = (struct interface *) vty->index; struct if_link_params *iflp = if_link_params_get (ifp); float bw; - if (sscanf (argv[1]->arg, "%g", &bw) != 1) + if (sscanf (argv[idx_bandwidth]->arg, "%g", &bw) != 1) { vty_out (vty, "link_params_use_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE); @@ -2564,7 +2582,8 @@ DEFUN (ip_address, "Set the IP address of an interface\n" "IP address (e.g. 10.0.0.1/8)\n") { - return ip_address_install (vty, vty->index, argv[2]->arg, NULL, NULL); + int idx_ipv4_prefixlen = 2; + return ip_address_install (vty, vty->index, argv[idx_ipv4_prefixlen]->arg, NULL, NULL); } DEFUN (no_ip_address, @@ -2575,7 +2594,8 @@ DEFUN (no_ip_address, "Set the IP address of an interface\n" "IP Address (e.g. 10.0.0.1/8)") { - return ip_address_uninstall (vty, vty->index, argv[3]->arg, NULL, NULL); + int idx_ipv4_prefixlen = 3; + return ip_address_uninstall (vty, vty->index, argv[idx_ipv4_prefixlen]->arg, NULL, NULL); } @@ -2589,7 +2609,9 @@ DEFUN (ip_address_label, "Label of this address\n" "Label\n") { - return ip_address_install (vty, vty->index, argv[2]->arg, NULL, argv[4]->arg); + int idx_ipv4_prefixlen = 2; + int idx_line = 4; + return ip_address_install (vty, vty->index, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_line]->arg); } DEFUN (no_ip_address_label, @@ -2602,7 +2624,9 @@ DEFUN (no_ip_address_label, "Label of this address\n" "Label\n") { - return ip_address_uninstall (vty, vty->index, argv[3]->arg, NULL, argv[5]->arg); + int idx_ipv4_prefixlen = 3; + int idx_line = 5; + return ip_address_uninstall (vty, vty->index, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_line]->arg); } #endif /* HAVE_NETLINK */ @@ -2765,7 +2789,8 @@ DEFUN (ipv6_address, "Set the IP address of an interface\n" "IPv6 address (e.g. 3ffe:506::1/48)\n") { - return ipv6_address_install (vty, vty->index, argv[2]->arg, NULL, NULL, 0); + int idx_ipv6_prefixlen = 2; + return ipv6_address_install (vty, vty->index, argv[idx_ipv6_prefixlen]->arg, NULL, NULL, 0); } DEFUN (no_ipv6_address, @@ -2776,7 +2801,8 @@ DEFUN (no_ipv6_address, "Set the IP address of an interface\n" "IPv6 address (e.g. 3ffe:506::1/48)\n") { - return ipv6_address_uninstall (vty, vty->index, argv[3]->arg, NULL, NULL, 0); + int idx_ipv6_prefixlen = 3; + return ipv6_address_uninstall (vty, vty->index, argv[idx_ipv6_prefixlen]->arg, NULL, NULL, 0); } #endif /* HAVE_IPV6 */ diff --git a/zebra/irdp_interface.c b/zebra/irdp_interface.c index 424f02788..2f741380f 100644 --- a/zebra/irdp_interface.c +++ b/zebra/irdp_interface.c @@ -469,6 +469,7 @@ DEFUN (ip_irdp_holdtime, "Set holdtime value\n" "Holdtime value in seconds. Default is 1800 seconds\n") { + int idx_number = 3; struct interface *ifp; struct zebra_if *zi; struct irdp_interface *irdp; @@ -480,7 +481,7 @@ DEFUN (ip_irdp_holdtime, zi=ifp->info; irdp=&zi->irdp; - irdp->Lifetime = atoi(argv[3]->arg); + irdp->Lifetime = atoi(argv[idx_number]->arg); return CMD_SUCCESS; } @@ -492,6 +493,7 @@ DEFUN (ip_irdp_minadvertinterval, "Set minimum time between advertisement\n" "Minimum advertisement interval in seconds\n") { + int idx_number = 3; struct interface *ifp; struct zebra_if *zi; struct irdp_interface *irdp; @@ -503,8 +505,8 @@ DEFUN (ip_irdp_minadvertinterval, zi=ifp->info; irdp=&zi->irdp; - if( (unsigned) atoi(argv[3]->arg) <= irdp->MaxAdvertInterval) { - irdp->MinAdvertInterval = atoi(argv[3]->arg); + if( (unsigned) atoi(argv[idx_number]->arg) <= irdp->MaxAdvertInterval) { + irdp->MinAdvertInterval = atoi(argv[idx_number]->arg); return CMD_SUCCESS; } @@ -525,6 +527,7 @@ DEFUN (ip_irdp_maxadvertinterval, "Set maximum time between advertisement\n" "Maximum advertisement interval in seconds\n") { + int idx_number = 3; struct interface *ifp; struct zebra_if *zi; struct irdp_interface *irdp; @@ -537,8 +540,8 @@ DEFUN (ip_irdp_maxadvertinterval, irdp=&zi->irdp; - if( irdp->MinAdvertInterval <= (unsigned) atoi(argv[3]->arg) ) { - irdp->MaxAdvertInterval = atoi(argv[3]->arg); + if( irdp->MinAdvertInterval <= (unsigned) atoi(argv[idx_number]->arg) ) { + irdp->MaxAdvertInterval = atoi(argv[idx_number]->arg); return CMD_SUCCESS; } @@ -564,6 +567,7 @@ DEFUN (ip_irdp_preference, "Set default preference level for this interface\n" "Preference level\n") { + int idx_number = 3; struct interface *ifp; struct zebra_if *zi; struct irdp_interface *irdp; @@ -575,7 +579,7 @@ DEFUN (ip_irdp_preference, zi=ifp->info; irdp=&zi->irdp; - irdp->Preference = atoi(argv[3]->arg); + irdp->Preference = atoi(argv[idx_number]->arg); return CMD_SUCCESS; } @@ -588,6 +592,8 @@ DEFUN (ip_irdp_address_preference, "Set IRDP address for advertise\n" "Preference level\n") { + int idx_ipv4 = 3; + int idx_number = 5; struct listnode *node; struct in_addr ip; int pref; @@ -605,10 +611,10 @@ DEFUN (ip_irdp_address_preference, zi=ifp->info; irdp=&zi->irdp; - ret = inet_aton(argv[3]->arg, &ip); + ret = inet_aton(argv[idx_ipv4]->arg, &ip); if(!ret) return CMD_WARNING; - pref = atoi(argv[5]->arg); + pref = atoi(argv[idx_number]->arg); for (ALL_LIST_ELEMENTS_RO (irdp->AdvPrefList, node, adv)) if(adv->ip.s_addr == ip.s_addr) @@ -633,6 +639,7 @@ DEFUN (no_ip_irdp_address_preference, "Select IRDP address\n" "Old preference level\n") { + int idx_ipv4 = 4; struct listnode *node, *nnode; struct in_addr ip; int ret; @@ -649,7 +656,7 @@ DEFUN (no_ip_irdp_address_preference, zi=ifp->info; irdp=&zi->irdp; - ret = inet_aton(argv[4]->arg, &ip); + ret = inet_aton(argv[idx_ipv4]->arg, &ip); if (!ret) return CMD_WARNING; diff --git a/zebra/router-id.c b/zebra/router-id.c index 05eee8ad3..6e1d434ec 100644 --- a/zebra/router-id.c +++ b/zebra/router-id.c @@ -228,10 +228,11 @@ DEFUN (router_id, "Manually set the router-id\n" "IP address to use for router-id\n") { + int idx_ipv4 = 1; struct prefix rid; vrf_id_t vrf_id = VRF_DEFAULT; - rid.u.prefix4.s_addr = inet_addr (argv[1]->arg); + rid.u.prefix4.s_addr = inet_addr (argv[idx_ipv4]->arg); if (!rid.u.prefix4.s_addr) return CMD_WARNING; diff --git a/zebra/rtadv.c b/zebra/rtadv.c index c13d85a4d..ec4736463 100644 --- a/zebra/rtadv.c +++ b/zebra/rtadv.c @@ -923,6 +923,7 @@ DEFUN (ipv6_nd_ra_interval_msec, "Router Advertisement interval\n" "Router Advertisement interval in milliseconds\n") { + int idx_number = 4; unsigned interval; struct interface *ifp = (struct interface *) vty->index; struct zebra_if *zif = ifp->info; @@ -930,7 +931,7 @@ DEFUN (ipv6_nd_ra_interval_msec, struct zebra_ns *zns; zns = zvrf->zns; - VTY_GET_INTEGER_RANGE ("router advertisement interval", interval, argv[4]->arg, 70, 1800000); + VTY_GET_INTEGER_RANGE ("router advertisement interval", interval, argv[idx_number]->arg, 70, 1800000); if ((zif->rtadv.AdvDefaultLifetime != -1 && interval > (unsigned)zif->rtadv.AdvDefaultLifetime * 1000)) { vty_out (vty, "This ra-interval would conflict with configured ra-lifetime!%s", VTY_NEWLINE); @@ -958,6 +959,7 @@ DEFUN (ipv6_nd_ra_interval, "Router Advertisement interval\n" "Router Advertisement interval in seconds\n") { + int idx_number = 3; unsigned interval; struct interface *ifp = (struct interface *) vty->index; struct zebra_if *zif = ifp->info; @@ -965,7 +967,7 @@ DEFUN (ipv6_nd_ra_interval, struct zebra_ns *zns; zns = zvrf->zns; - VTY_GET_INTEGER_RANGE ("router advertisement interval", interval, argv[3]->arg, 1, 1800); + VTY_GET_INTEGER_RANGE ("router advertisement interval", interval, argv[idx_number]->arg, 1, 1800); if ((zif->rtadv.AdvDefaultLifetime != -1 && interval > (unsigned)zif->rtadv.AdvDefaultLifetime)) { vty_out (vty, "This ra-interval would conflict with configured ra-lifetime!%s", VTY_NEWLINE); @@ -1039,6 +1041,7 @@ DEFUN (ipv6_nd_ra_lifetime, "Router lifetime\n" "Router lifetime in seconds (0 stands for a non-default gw)\n") { + int idx_number = 3; int lifetime; struct interface *ifp; struct zebra_if *zif; @@ -1046,7 +1049,7 @@ DEFUN (ipv6_nd_ra_lifetime, ifp = (struct interface *) vty->index; zif = ifp->info; - VTY_GET_INTEGER_RANGE ("router lifetime", lifetime, argv[3]->arg, 0, 9000); + VTY_GET_INTEGER_RANGE ("router lifetime", lifetime, argv[idx_number]->arg, 0, 9000); /* The value to be placed in the Router Lifetime field * of Router Advertisements sent from the interface, @@ -1101,9 +1104,10 @@ DEFUN (ipv6_nd_reachable_time, "Reachable time\n" "Reachable time in milliseconds\n") { + int idx_number = 3; struct interface *ifp = (struct interface *) vty->index; struct zebra_if *zif = ifp->info; - VTY_GET_INTEGER_RANGE ("reachable time", zif->rtadv.AdvReachableTime, argv[3]->arg, 1, RTADV_MAX_REACHABLE_TIME); + VTY_GET_INTEGER_RANGE ("reachable time", zif->rtadv.AdvReachableTime, argv[idx_number]->arg, 1, RTADV_MAX_REACHABLE_TIME); return CMD_SUCCESS; } @@ -1145,9 +1149,10 @@ DEFUN (ipv6_nd_homeagent_preference, "Home Agent preference\n" "preference value (default is 0, least preferred)\n") { + int idx_number = 3; struct interface *ifp = (struct interface *) vty->index; struct zebra_if *zif = ifp->info; - VTY_GET_INTEGER_RANGE ("home agent preference", zif->rtadv.HomeAgentPreference, argv[3]->arg, 0, 65535); + VTY_GET_INTEGER_RANGE ("home agent preference", zif->rtadv.HomeAgentPreference, argv[idx_number]->arg, 0, 65535); return CMD_SUCCESS; } @@ -1189,9 +1194,10 @@ DEFUN (ipv6_nd_homeagent_lifetime, "Home Agent lifetime\n" "Home Agent lifetime in seconds (0 to track ra-lifetime)\n") { + int idx_number = 3; struct interface *ifp = (struct interface *) vty->index; struct zebra_if *zif = ifp->info; - VTY_GET_INTEGER_RANGE ("home agent lifetime", zif->rtadv.HomeAgentLifetime, argv[3]->arg, 0, RTADV_MAX_HALIFETIME); + VTY_GET_INTEGER_RANGE ("home agent lifetime", zif->rtadv.HomeAgentLifetime, argv[idx_number]->arg, 0, RTADV_MAX_HALIFETIME); return CMD_SUCCESS; } @@ -1508,7 +1514,7 @@ DEFUN (no_ipv6_nd_other_config_flag, */ DEFUN (ipv6_nd_prefix, ipv6_nd_prefix_cmd, - "ipv6 nd prefix X:X::X:X/M <(0-4294967295)|infinite> <(0-4294967295)|infinite> ", + "ipv6 nd prefix X:X::X:X/M <(0-4294967295)|infinite> <(0-4294967295)|infinite> ", "Interface IPv6 config commands\n" "Neighbor discovery\n" "Prefix information\n" @@ -1521,6 +1527,9 @@ DEFUN (ipv6_nd_prefix, "Do not use prefix for autoconfiguration\n" "Set Router Address flag\n") { + int idx_ipv6_prefixlen = 3; + int idx_number_infinite = 4; + int idx_number_infinite_2 = 5; int i; int ret; int cursor = 1; @@ -1531,7 +1540,7 @@ DEFUN (ipv6_nd_prefix, ifp = (struct interface *) vty->index; zebra_if = ifp->info; - ret = str2prefix_ipv6 (argv[3]->arg, &rp.prefix); + ret = str2prefix_ipv6 (argv[idx_ipv6_prefixlen]->arg, &rp.prefix); if (!ret) { vty_out (vty, "Malformed IPv6 prefix%s", VTY_NEWLINE); @@ -1546,19 +1555,19 @@ DEFUN (ipv6_nd_prefix, if (argc > 1) { - if ((isdigit((unsigned char)argv[4]->arg[0])) - || strncmp (argv[4]->arg, "i", 1) == 0) + if ((isdigit((unsigned char)argv[idx_number_infinite]->arg[0])) + || strncmp (argv[idx_number_infinite]->arg, "i", 1) == 0) { - if ( strncmp (argv[4]->arg, "i", 1) == 0) + if ( strncmp (argv[idx_number_infinite]->arg, "i", 1) == 0) rp.AdvValidLifetime = UINT32_MAX; else - rp.AdvValidLifetime = (u_int32_t) strtoll (argv[4]->arg, + rp.AdvValidLifetime = (u_int32_t) strtoll (argv[idx_number_infinite]->arg, (char **)NULL, 10); - if ( strncmp (argv[5]->arg, "i", 1) == 0) + if ( strncmp (argv[idx_number_infinite_2]->arg, "i", 1) == 0) rp.AdvPreferredLifetime = UINT32_MAX; else - rp.AdvPreferredLifetime = (u_int32_t) strtoll (argv[5]->arg, + rp.AdvPreferredLifetime = (u_int32_t) strtoll (argv[idx_number_infinite_2]->arg, (char **)NULL, 10); if (rp.AdvPreferredLifetime > rp.AdvValidLifetime) @@ -1790,6 +1799,7 @@ DEFUN (ipv6_nd_router_preference, "Low default router preference\n" "Medium default router preference (default)\n") { + int idx_high_medium_low = 3; struct interface *ifp; struct zebra_if *zif; int i = 0; @@ -1799,7 +1809,7 @@ DEFUN (ipv6_nd_router_preference, while (0 != rtadv_pref_strs[i]) { - if (strncmp (argv[3]->arg, rtadv_pref_strs[i], 1) == 0) + if (strncmp (argv[idx_high_medium_low]->arg, rtadv_pref_strs[i], 1) == 0) { zif->rtadv.DefaultPreference = i; return CMD_SUCCESS; @@ -1850,9 +1860,10 @@ DEFUN (ipv6_nd_mtu, "Advertised MTU\n" "MTU in bytes\n") { + int idx_number = 3; struct interface *ifp = (struct interface *) vty->index; struct zebra_if *zif = ifp->info; - VTY_GET_INTEGER_RANGE ("MTU", zif->rtadv.AdvLinkMTU, argv[3]->arg, 1, 65535); + VTY_GET_INTEGER_RANGE ("MTU", zif->rtadv.AdvLinkMTU, argv[idx_number]->arg, 1, 65535); return CMD_SUCCESS; } diff --git a/zebra/test_main.c b/zebra/test_main.c index 2908ddd94..4dd3e897f 100644 --- a/zebra/test_main.c +++ b/zebra/test_main.c @@ -124,6 +124,7 @@ DEFUN (test_interface_state, "up\n" "down\n") { + int idx_up_down = 1; struct interface *ifp; if (argc < 1) return CMD_WARNING; @@ -136,7 +137,7 @@ DEFUN (test_interface_state, ifp->flags = IFF_BROADCAST|IFF_MULTICAST; } - switch (argv[1]->arg[0]) + switch (argv[idx_up_down]->arg[0]) { case 'u': SET_FLAG (ifp->flags, IFF_UP); diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c index 6dcc7624e..9ca4cd947 100644 --- a/zebra/zebra_routemap.c +++ b/zebra/zebra_routemap.c @@ -301,7 +301,8 @@ DEFUN (match_interface, "match first hop interface of route\n" "Interface name\n") { - return zebra_route_match_add (vty, vty->index, "interface", argv[2]->arg, + int idx_word = 2; + return zebra_route_match_add (vty, vty->index, "interface", argv[idx_word]->arg, RMAP_EVENT_MATCH_ADDED); } @@ -335,7 +336,8 @@ DEFUN (match_tag, "Match tag of route\n" "Tag value\n") { - return zebra_route_match_add (vty, vty->index, "tag", argv[2]->arg, + int idx_number = 2; + return zebra_route_match_add (vty, vty->index, "tag", argv[idx_number]->arg, RMAP_EVENT_MATCH_ADDED); } @@ -373,7 +375,8 @@ DEFUN (match_ip_next_hop, "IP access-list number (expanded range)\n" "IP Access-list name\n") { - return zebra_route_match_add (vty, vty->index, "ip next-hop", argv[3]->arg, RMAP_EVENT_FILTER_ADDED); + int idx_acl = 3; + return zebra_route_match_add (vty, vty->index, "ip next-hop", argv[idx_acl]->arg, RMAP_EVENT_FILTER_ADDED); } /* @@ -414,8 +417,9 @@ DEFUN (match_ip_next_hop_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { + int idx_word = 4; return zebra_route_match_add (vty, vty->index, "ip next-hop prefix-list", - argv[4]->arg, RMAP_EVENT_PLIST_ADDED); + argv[idx_word]->arg, RMAP_EVENT_PLIST_ADDED); } /* @@ -460,7 +464,8 @@ DEFUN (match_ip_address, "IP Access-list name\n") { - return zebra_route_match_add (vty, vty->index, "ip address", argv[3]->arg, + int idx_acl = 3; + return zebra_route_match_add (vty, vty->index, "ip address", argv[idx_acl]->arg, RMAP_EVENT_FILTER_ADDED); } @@ -502,8 +507,9 @@ DEFUN (match_ip_address_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { + int idx_word = 4; return zebra_route_match_add (vty, vty->index, "ip address prefix-list", - argv[4]->arg, RMAP_EVENT_PLIST_ADDED); + argv[idx_word]->arg, RMAP_EVENT_PLIST_ADDED); } /* @@ -627,17 +633,18 @@ DEFUN (match_source_protocol, MATCH_STR "Match protocol via which the route was learnt\n") { + int idx_protocol = 2; int i; - i = proto_name2num(argv[2]->arg); + i = proto_name2num(argv[idx_protocol]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[2]->arg ? argv[2]->arg : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[idx_protocol]->arg ? argv[idx_protocol]->arg : "", VTY_NEWLINE); return CMD_WARNING; } return zebra_route_match_add (vty, vty->index, "source-protocol", - argv[2]->arg, RMAP_EVENT_MATCH_ADDED); + argv[idx_protocol]->arg, RMAP_EVENT_MATCH_ADDED); } DEFUN (no_match_source_protocol, @@ -647,20 +654,21 @@ DEFUN (no_match_source_protocol, MATCH_STR "No match protocol via which the route was learnt\n") { + int idx_protocol = 3; int i; if (argc >= 1) { - i = proto_name2num(argv[3]->arg); + i = proto_name2num(argv[idx_protocol]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[3]->arg ? argv[3]->arg : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[idx_protocol]->arg ? argv[idx_protocol]->arg : "", VTY_NEWLINE); return CMD_WARNING; } } return zebra_route_match_delete (vty, vty->index, - "source-protocol", argv[3]->arg ? argv[3]->arg : NULL, + "source-protocol", argv[idx_protocol]->arg ? argv[idx_protocol]->arg : NULL, RMAP_EVENT_MATCH_DELETED); } @@ -673,15 +681,16 @@ DEFUN (set_src, "src address for route\n" "src address\n") { + int idx_ip = 2; union g_addr src; struct interface *pif = NULL; int family; struct prefix p; vrf_iter_t iter; - if (inet_pton(AF_INET, argv[2]->arg, &src.ipv4) != 1) + if (inet_pton(AF_INET, argv[idx_ip]->arg, &src.ipv4) != 1) { - if (inet_pton(AF_INET6, argv[2]->arg, &src.ipv6) != 1) + if (inet_pton(AF_INET6, argv[idx_ip]->arg, &src.ipv6) != 1) { vty_out (vty, "%% not a valid IPv4/v6 address%s", VTY_NEWLINE); return CMD_WARNING; @@ -722,7 +731,7 @@ DEFUN (set_src, vty_out (vty, "%% not a local address%s", VTY_NEWLINE); return CMD_WARNING; } - return zebra_route_set_add (vty, vty->index, "src", argv[2]->arg); + return zebra_route_set_add (vty, vty->index, "src", argv[idx_ip]->arg); } DEFUN (no_set_src, @@ -732,10 +741,11 @@ DEFUN (no_set_src, SET_STR "Source address for route\n") { + int idx_ip = 3; if (argc == 0) return zebra_route_set_delete (vty, vty->index, "src", NULL); - return zebra_route_set_delete (vty, vty->index, "src", argv[3]->arg); + return zebra_route_set_delete (vty, vty->index, "src", argv[idx_ip]->arg); } DEFUN (zebra_route_map_timer, @@ -744,9 +754,10 @@ DEFUN (zebra_route_map_timer, "Time to wait before route-map updates are processed\n" "0 means event-driven updates are disabled\n") { + int idx_number = 3; u_int32_t rmap_delay_timer; - VTY_GET_INTEGER_RANGE ("delay-timer", rmap_delay_timer, argv[3]->arg, 0, 600); + VTY_GET_INTEGER_RANGE ("delay-timer", rmap_delay_timer, argv[idx_number]->arg, 0, 600); zebra_route_map_set_delay_timer(rmap_delay_timer); return (CMD_SUCCESS); @@ -782,15 +793,16 @@ DEFUN (ip_protocol, QUAGGA_IP_PROTOCOL_MAP_HELP_STR_ZEBRA "Route map name\n") { + int idx_protocol = 2; int i; - if (strcasecmp(argv[2]->arg, "any") == 0) + if (strcasecmp(argv[idx_protocol]->arg, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[2]->arg); + i = proto_name2num(argv[idx_protocol]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[2]->arg ? argv[2]->arg : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[idx_protocol]->arg ? argv[idx_protocol]->arg : "", VTY_NEWLINE); return CMD_WARNING; } @@ -805,7 +817,7 @@ DEFUN (ip_protocol, if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug ("%u: IPv4 Routemap config for protocol %s, scheduling RIB processing", - VRF_DEFAULT, argv[2]->arg); + VRF_DEFAULT, argv[idx_protocol]->arg); rib_update(VRF_DEFAULT, RIB_UPDATE_RMAP_CHANGE); return CMD_SUCCESS; @@ -897,15 +909,16 @@ DEFUN (ipv6_protocol, QUAGGA_IP6_PROTOCOL_MAP_HELP_STR_ZEBRA "Route map name\n") { + int idx_protocol = 2; int i; - if (strcasecmp(argv[2]->arg, "any") == 0) + if (strcasecmp(argv[idx_protocol]->arg, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[2]->arg); + i = proto_name2num(argv[idx_protocol]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[2]->arg ? argv[2]->arg : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[idx_protocol]->arg ? argv[idx_protocol]->arg : "", VTY_NEWLINE); return CMD_WARNING; } @@ -920,7 +933,7 @@ DEFUN (ipv6_protocol, if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug ("%u: IPv6 Routemap config for protocol %s, scheduling RIB processing", - VRF_DEFAULT, argv[2]->arg); + VRF_DEFAULT, argv[idx_protocol]->arg); rib_update(VRF_DEFAULT, RIB_UPDATE_RMAP_CHANGE); return CMD_SUCCESS; @@ -1013,15 +1026,16 @@ DEFUN (ip_protocol_nht_rmap, QUAGGA_IP_PROTOCOL_MAP_HELP_STR_ZEBRA "Route map name\n") { + int idx_protocol = 2; int i; - if (strcasecmp(argv[2]->arg, "any") == 0) + if (strcasecmp(argv[idx_protocol]->arg, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[2]->arg); + i = proto_name2num(argv[idx_protocol]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[2]->arg ? argv[2]->arg : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[idx_protocol]->arg ? argv[idx_protocol]->arg : "", VTY_NEWLINE); return CMD_WARNING; } @@ -1119,15 +1133,16 @@ DEFUN (ipv6_protocol_nht_rmap, QUAGGA_IP6_PROTOCOL_MAP_HELP_STR_ZEBRA "Route map name\n") { + int idx_protocol = 2; int i; - if (strcasecmp(argv[2]->arg, "any") == 0) + if (strcasecmp(argv[idx_protocol]->arg, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[2]->arg); + i = proto_name2num(argv[idx_protocol]->arg); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[2]->arg ? argv[2]->arg : "", + vty_out (vty, "invalid protocol name \"%s\"%s", argv[idx_protocol]->arg ? argv[idx_protocol]->arg : "", VTY_NEWLINE); return CMD_WARNING; } diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 505da4923..99d7bd6fd 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -201,7 +201,10 @@ DEFUN (ip_mroute_dist, "Nexthop interface name\n" "Distance\n") { - return zebra_static_ipv4 (vty, SAFI_MULTICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL, argc > 2 ? argv[4]->arg : NULL, NULL); + int idx_ipv4_prefixlen = 2; + int idx_ipv4_ifname = 3; + int idx_number = 4; + return zebra_static_ipv4 (vty, SAFI_MULTICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, NULL, NULL, argc > 2 ? argv[idx_number]->arg : NULL, NULL); } @@ -226,7 +229,10 @@ DEFUN (no_ip_mroute_dist, "Nexthop interface name\n" "Distance\n") { - return zebra_static_ipv4 (vty, SAFI_MULTICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, argc > 2 ? argv[5]->arg : NULL, NULL); + int idx_ipv4_prefixlen = 3; + int idx_ipv4_ifname = 4; + int idx_number = 5; + return zebra_static_ipv4 (vty, SAFI_MULTICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, NULL, NULL, argc > 2 ? argv[idx_number]->arg : NULL, NULL); } @@ -242,16 +248,17 @@ DEFUN (ip_multicast_mode, "Lookup both, use entry with lower distance\n" "Lookup both, use entry with longer prefix\n") { + int idx_rpf_lookup_mode = 3; - if (!strncmp (argv[3]->arg, "u", 1)) + if (!strncmp (argv[idx_rpf_lookup_mode]->arg, "u", 1)) multicast_mode_ipv4_set (MCAST_URIB_ONLY); - else if (!strncmp (argv[3]->arg, "mrib-o", 6)) + else if (!strncmp (argv[idx_rpf_lookup_mode]->arg, "mrib-o", 6)) multicast_mode_ipv4_set (MCAST_MRIB_ONLY); - else if (!strncmp (argv[3]->arg, "mrib-t", 6)) + else if (!strncmp (argv[idx_rpf_lookup_mode]->arg, "mrib-t", 6)) multicast_mode_ipv4_set (MCAST_MIX_MRIB_FIRST); - else if (!strncmp (argv[3]->arg, "low", 3)) + else if (!strncmp (argv[idx_rpf_lookup_mode]->arg, "low", 3)) multicast_mode_ipv4_set (MCAST_MIX_DISTANCE); - else if (!strncmp (argv[3]->arg, "lon", 3)) + else if (!strncmp (argv[idx_rpf_lookup_mode]->arg, "lon", 3)) multicast_mode_ipv4_set (MCAST_MIX_PFXLEN); else { @@ -307,12 +314,13 @@ DEFUN (show_ip_rpf_addr, "Display RPF information for multicast source\n" "IP multicast source address (e.g. 10.0.0.0)\n") { + int idx_ipv4 = 3; struct in_addr addr; struct route_node *rn; struct rib *rib; int ret; - ret = inet_aton (argv[3]->arg, &addr); + ret = inet_aton (argv[idx_ipv4]->arg, &addr); if (ret == 0) { vty_out (vty, "%% Malformed address%s", VTY_NEWLINE); @@ -340,7 +348,9 @@ DEFUN (ip_route, "IP gateway interface name\n" "Null interface\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL, + int idx_ipv4_prefixlen = 2; + int idx_ipv4_ifname_null = 3; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, NULL, NULL); } @@ -356,7 +366,10 @@ DEFUN (ip_route_tag, "Set tag for this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[5]->arg, + int idx_ipv4_prefixlen = 2; + int idx_ipv4_ifname_null = 3; + int idx_number = 5; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, NULL, NULL); } @@ -371,7 +384,10 @@ DEFUN (ip_route_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL, + int idx_ipv4_prefixlen = 2; + int idx_ipv4_ifname = 3; + int idx_reject_blackhole = 4; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, NULL, NULL); } @@ -389,7 +405,11 @@ DEFUN (ip_route_flags_tag, "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[6]->arg, + int idx_ipv4_prefixlen = 2; + int idx_ipv4_ifname = 3; + int idx_reject_blackhole = 4; + int idx_number = 6; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, NULL); } @@ -402,7 +422,9 @@ DEFUN (ip_route_flags2, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, NULL, + int idx_ipv4_prefixlen = 2; + int idx_reject_blackhole = 3; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, NULL, NULL, NULL); } @@ -418,7 +440,10 @@ DEFUN (ip_route_flags2_tag, "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[5]->arg, + int idx_ipv4_prefixlen = 2; + int idx_reject_blackhole = 3; + int idx_number = 5; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, NULL); } @@ -434,7 +459,10 @@ DEFUN (ip_route_mask, "IP gateway interface name\n" "Null interface\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, + int idx_ipv4 = 2; + int idx_ipv4_2 = 3; + int idx_ipv4_ifname_null = 4; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, NULL, NULL); } @@ -452,7 +480,11 @@ DEFUN (ip_route_mask_tag, "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, + int idx_ipv4 = 2; + int idx_ipv4_2 = 3; + int idx_ipv4_ifname_null = 4; + int idx_number = 6; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, NULL, NULL); } @@ -468,7 +500,11 @@ DEFUN (ip_route_mask_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, + int idx_ipv4 = 2; + int idx_ipv4_2 = 3; + int idx_ipv4_ifname = 4; + int idx_reject_blackhole = 5; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, NULL, NULL); } @@ -487,7 +523,12 @@ DEFUN (ip_route_mask_flags_tag, "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, + int idx_ipv4 = 2; + int idx_ipv4_2 = 3; + int idx_ipv4_ifname = 4; + int idx_reject_blackhole = 5; + int idx_number = 7; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, NULL); } @@ -501,7 +542,10 @@ DEFUN (ip_route_mask_flags2, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, + int idx_ipv4 = 2; + int idx_ipv4_2 = 3; + int idx_reject_blackhole = 4; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, NULL, NULL); } @@ -517,7 +561,11 @@ DEFUN (ip_route_mask_flags2_tag, "Set tag for this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, + int idx_ipv4 = 2; + int idx_ipv4_2 = 3; + int idx_reject_blackhole = 4; + int idx_number = 6; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, NULL); } @@ -533,8 +581,11 @@ DEFUN (ip_route_distance, "Null interface\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL, - argv[4]->arg, NULL); + int idx_ipv4_prefixlen = 2; + int idx_ipv4_ifname_null = 3; + int idx_number = 4; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, + argv[idx_number]->arg, NULL); } DEFUN (ip_route_tag_distance, @@ -551,8 +602,12 @@ DEFUN (ip_route_tag_distance, "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[5]->arg, - argv[6]->arg, NULL); + int idx_ipv4_prefixlen = 2; + int idx_ipv4_ifname_null = 3; + int idx_number = 5; + int idx_number_2 = 6; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, + argv[idx_number_2]->arg, NULL); } DEFUN (ip_route_flags_distance, @@ -567,8 +622,12 @@ DEFUN (ip_route_flags_distance, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL, - argv[5]->arg, NULL); + int idx_ipv4_prefixlen = 2; + int idx_ipv4_ifname = 3; + int idx_reject_blackhole = 4; + int idx_number = 5; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, + argv[idx_number]->arg, NULL); } DEFUN (ip_route_flags_tag_distance, @@ -585,8 +644,13 @@ DEFUN (ip_route_flags_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[6]->arg, - argv[7]->arg, NULL); + int idx_ipv4_prefixlen = 2; + int idx_ipv4_ifname = 3; + int idx_reject_blackhole = 4; + int idx_number = 6; + int idx_number_2 = 7; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, + argv[idx_number_2]->arg, NULL); } DEFUN (ip_route_flags_distance2, @@ -599,8 +663,11 @@ DEFUN (ip_route_flags_distance2, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, NULL, - argv[4]->arg, NULL); + int idx_ipv4_prefixlen = 2; + int idx_reject_blackhole = 3; + int idx_number = 4; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, NULL, + argv[idx_number]->arg, NULL); } DEFUN (ip_route_flags_tag_distance2, @@ -615,8 +682,12 @@ DEFUN (ip_route_flags_tag_distance2, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[5]->arg, - argv[6]->arg, NULL); + int idx_ipv4_prefixlen = 2; + int idx_reject_blackhole = 3; + int idx_number = 5; + int idx_number_2 = 6; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, + argv[idx_number_2]->arg, NULL); } DEFUN (ip_route_mask_distance, @@ -631,8 +702,12 @@ DEFUN (ip_route_mask_distance, "Null interface\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, - argv[5]->arg, NULL); + int idx_ipv4 = 2; + int idx_ipv4_2 = 3; + int idx_ipv4_ifname_null = 4; + int idx_number = 5; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, + argv[idx_number]->arg, NULL); } DEFUN (ip_route_mask_tag_distance, @@ -649,8 +724,13 @@ DEFUN (ip_route_mask_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, - argv[7]->arg, NULL); + int idx_ipv4 = 2; + int idx_ipv4_2 = 3; + int idx_ipv4_ifname_null = 4; + int idx_number = 6; + int idx_number_2 = 7; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, + argv[idx_number_2]->arg, NULL); } DEFUN (ip_route_mask_flags_tag_distance, @@ -668,8 +748,14 @@ DEFUN (ip_route_mask_flags_tag_distance, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, - argv[8]->arg, NULL); + int idx_ipv4 = 2; + int idx_ipv4_2 = 3; + int idx_ipv4_ifname = 4; + int idx_reject_blackhole = 5; + int idx_number = 7; + int idx_number_2 = 8; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, + argv[idx_number_2]->arg, NULL); } @@ -686,8 +772,13 @@ DEFUN (ip_route_mask_flags_distance, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, - argv[6]->arg, NULL); + int idx_ipv4 = 2; + int idx_ipv4_2 = 3; + int idx_ipv4_ifname = 4; + int idx_reject_blackhole = 5; + int idx_number = 6; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, + argv[idx_number]->arg, NULL); } DEFUN (ip_route_mask_flags_distance2, @@ -701,8 +792,12 @@ DEFUN (ip_route_mask_flags_distance2, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, - argv[5]->arg, NULL); + int idx_ipv4 = 2; + int idx_ipv4_2 = 3; + int idx_reject_blackhole = 4; + int idx_number = 5; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, + argv[idx_number]->arg, NULL); } DEFUN (ip_route_mask_flags_tag_distance2, @@ -718,8 +813,13 @@ DEFUN (ip_route_mask_flags_tag_distance2, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, - argv[7]->arg, NULL); + int idx_ipv4 = 2; + int idx_ipv4_2 = 3; + int idx_reject_blackhole = 4; + int idx_number = 6; + int idx_number_2 = 7; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, + argv[idx_number_2]->arg, NULL); } /* @@ -746,7 +846,9 @@ DEFUN (no_ip_route, "IP gateway interface name\n" "Null interface\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, + int idx_ipv4_prefixlen = 3; + int idx_ipv4_ifname_null = 4; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, NULL, NULL); } @@ -778,7 +880,10 @@ DEFUN (no_ip_route_tag, "Tag of this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[6]->arg, + int idx_ipv4_prefixlen = 3; + int idx_ipv4_ifname_null = 4; + int idx_number = 6; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, NULL, NULL); } @@ -794,7 +899,8 @@ DEFUN (no_ip_route_flags2, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, NULL, NULL, + int idx_ipv4_prefixlen = 3; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, NULL, NULL, NULL, NULL); } @@ -810,7 +916,9 @@ DEFUN (no_ip_route_flags2_tag, "Tag of this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, NULL, argv[4]->arg, + int idx_ipv4_prefixlen = 3; + int idx_reject_blackhole = 4; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, NULL, argv[idx_reject_blackhole]->arg, NULL, NULL); } @@ -840,7 +948,10 @@ DEFUN (no_ip_route_mask, "IP gateway interface name\n" "Null interface\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, + int idx_ipv4 = 3; + int idx_ipv4_2 = 4; + int idx_ipv4_ifname_null = 5; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, NULL, NULL); } @@ -874,7 +985,11 @@ DEFUN (no_ip_route_mask_tag, "Tag of this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, + int idx_ipv4 = 3; + int idx_ipv4_2 = 4; + int idx_ipv4_ifname_null = 5; + int idx_number = 7; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, NULL, NULL); } @@ -891,7 +1006,9 @@ DEFUN (no_ip_route_mask_flags2, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, + int idx_ipv4 = 3; + int idx_ipv4_2 = 4; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, NULL, NULL, NULL, NULL); } @@ -908,7 +1025,10 @@ DEFUN (no_ip_route_mask_flags2_tag, "Tag of this route\n" "Tag value\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[5]->arg, + int idx_ipv4 = 3; + int idx_ipv4_2 = 4; + int idx_reject_blackhole = 5; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, NULL, NULL); } @@ -924,8 +1044,11 @@ DEFUN (no_ip_route_distance, "Null interface\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, - argv[5]->arg, NULL); + int idx_ipv4_prefixlen = 3; + int idx_ipv4_ifname_null = 4; + int idx_number = 5; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, + argv[idx_number]->arg, NULL); } DEFUN (no_ip_route_tag_distance, @@ -942,8 +1065,12 @@ DEFUN (no_ip_route_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[6]->arg, - argv[7]->arg, NULL); + int idx_ipv4_prefixlen = 3; + int idx_ipv4_ifname_null = 4; + int idx_number = 6; + int idx_number_2 = 7; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, + argv[idx_number_2]->arg, NULL); } DEFUN (no_ip_route_flags_distance, @@ -959,8 +1086,12 @@ DEFUN (no_ip_route_flags_distance, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, NULL, - argv[6]->arg, NULL); + int idx_ipv4_prefixlen = 3; + int idx_ipv4_ifname = 4; + int idx_reject_blackhole = 5; + int idx_number = 6; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, + argv[idx_number]->arg, NULL); } DEFUN (no_ip_route_flags_tag_distance, @@ -978,8 +1109,13 @@ DEFUN (no_ip_route_flags_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, argv[7]->arg, - argv[8]->arg, NULL); + int idx_ipv4_prefixlen = 3; + int idx_ipv4_ifname = 4; + int idx_reject_blackhole = 5; + int idx_number = 7; + int idx_number_2 = 8; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, + argv[idx_number_2]->arg, NULL); } DEFUN (no_ip_route_flags_distance2, @@ -993,8 +1129,11 @@ DEFUN (no_ip_route_flags_distance2, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, NULL, - argv[5]->arg, NULL); + int idx_ipv4_prefixlen = 3; + int idx_reject_blackhole = 4; + int idx_number = 5; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, NULL, + argv[idx_number]->arg, NULL); } DEFUN (no_ip_route_flags_tag_distance2, @@ -1010,8 +1149,12 @@ DEFUN (no_ip_route_flags_tag_distance2, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, argv[6]->arg, - argv[7]->arg, NULL); + int idx_ipv4_prefixlen = 3; + int idx_reject_blackhole = 4; + int idx_number = 6; + int idx_number_2 = 7; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, + argv[idx_number_2]->arg, NULL); } DEFUN (no_ip_route_mask_distance, @@ -1027,8 +1170,12 @@ DEFUN (no_ip_route_mask_distance, "Null interface\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, - argv[6]->arg, NULL); + int idx_ipv4 = 3; + int idx_ipv4_2 = 4; + int idx_ipv4_ifname_null = 5; + int idx_number = 6; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, + argv[idx_number]->arg, NULL); } DEFUN (no_ip_route_mask_tag_distance, @@ -1046,8 +1193,13 @@ DEFUN (no_ip_route_mask_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, - argv[8]->arg, NULL); + int idx_ipv4 = 3; + int idx_ipv4_2 = 4; + int idx_ipv4_ifname_null = 5; + int idx_number = 7; + int idx_number_2 = 8; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, + argv[idx_number_2]->arg, NULL); } DEFUN (no_ip_route_mask_flags_distance, @@ -1064,8 +1216,13 @@ DEFUN (no_ip_route_mask_flags_distance, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, - argv[7]->arg, NULL); + int idx_ipv4 = 3; + int idx_ipv4_2 = 4; + int idx_ipv4_ifname = 5; + int idx_reject_blackhole = 6; + int idx_number = 7; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, + argv[idx_number]->arg, NULL); } DEFUN (no_ip_route_mask_flags_tag_distance, @@ -1084,8 +1241,14 @@ DEFUN (no_ip_route_mask_flags_tag_distance, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, - argv[9]->arg, NULL); + int idx_ipv4 = 3; + int idx_ipv4_2 = 4; + int idx_ipv4_ifname = 5; + int idx_reject_blackhole = 6; + int idx_number = 8; + int idx_number_2 = 9; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, + argv[idx_number_2]->arg, NULL); } DEFUN (no_ip_route_mask_flags_distance2, @@ -1100,8 +1263,12 @@ DEFUN (no_ip_route_mask_flags_distance2, "Silently discard pkts when matched\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, - argv[6]->arg, NULL); + int idx_ipv4 = 3; + int idx_ipv4_2 = 4; + int idx_reject_blackhole = 5; + int idx_number = 6; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, + argv[idx_number]->arg, NULL); } DEFUN (no_ip_route_mask_flags_tag_distance2, @@ -1118,8 +1285,13 @@ DEFUN (no_ip_route_mask_flags_tag_distance2, "Tag value\n" "Distance value for this route\n") { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, - argv[8]->arg, NULL); + int idx_ipv4 = 3; + int idx_ipv4_2 = 4; + int idx_reject_blackhole = 5; + int idx_number = 7; + int idx_number_2 = 8; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, + argv[idx_number_2]->arg, NULL); } /* Static route configuration. */ @@ -1134,7 +1306,10 @@ DEFUN (ip_route_vrf, "Null interface\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL, NULL, argv[5]->arg); + int idx_ipv4_prefixlen = 2; + int idx_ipv4_ifname_null = 3; + int idx_name = 5; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, NULL, argv[idx_name]->arg); } DEFUN (ip_route_tag_vrf, @@ -1150,7 +1325,11 @@ DEFUN (ip_route_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[5]->arg, NULL, argv[7]->arg); + int idx_ipv4_prefixlen = 2; + int idx_ipv4_ifname_null = 3; + int idx_number = 5; + int idx_name = 7; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, NULL, argv[idx_name]->arg); } DEFUN (ip_route_flags_vrf, @@ -1165,7 +1344,11 @@ DEFUN (ip_route_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[6]->arg); + int idx_ipv4_prefixlen = 2; + int idx_ipv4_ifname = 3; + int idx_reject_blackhole = 4; + int idx_name = 6; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg); } DEFUN (ip_route_flags_tag_vrf, @@ -1183,7 +1366,12 @@ DEFUN (ip_route_flags_tag_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[6]->arg, NULL, argv[8]->arg); + int idx_ipv4_prefixlen = 2; + int idx_ipv4_ifname = 3; + int idx_reject_blackhole = 4; + int idx_number = 6; + int idx_name = 8; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg); } DEFUN (ip_route_flags2_vrf, @@ -1196,7 +1384,10 @@ DEFUN (ip_route_flags2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, NULL, NULL, argv[5]->arg); + int idx_ipv4_prefixlen = 2; + int idx_reject_blackhole = 3; + int idx_name = 5; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg); } DEFUN (ip_route_flags2_tag_vrf, @@ -1212,7 +1403,11 @@ DEFUN (ip_route_flags2_tag_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[5]->arg, NULL, argv[7]->arg); + int idx_ipv4_prefixlen = 2; + int idx_reject_blackhole = 3; + int idx_number = 5; + int idx_name = 7; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg); } /* Mask as A.B.C.D format. */ @@ -1228,7 +1423,11 @@ DEFUN (ip_route_mask_vrf, "Null interface\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, argv[6]->arg); + int idx_ipv4 = 2; + int idx_ipv4_2 = 3; + int idx_ipv4_ifname_null = 4; + int idx_name = 6; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, NULL, argv[idx_name]->arg); } DEFUN (ip_route_mask_tag_vrf, @@ -1246,7 +1445,12 @@ DEFUN (ip_route_mask_tag_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, NULL, argv[8]->arg); + int idx_ipv4 = 2; + int idx_ipv4_2 = 3; + int idx_ipv4_ifname_null = 4; + int idx_number = 6; + int idx_name = 8; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, NULL, argv[idx_name]->arg); } DEFUN (ip_route_mask_flags_vrf, @@ -1262,7 +1466,12 @@ DEFUN (ip_route_mask_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[7]->arg); + int idx_ipv4 = 2; + int idx_ipv4_2 = 3; + int idx_ipv4_ifname = 4; + int idx_reject_blackhole = 5; + int idx_name = 7; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg); } DEFUN (ip_route_mask_flags_tag_vrf, @@ -1281,7 +1490,13 @@ DEFUN (ip_route_mask_flags_tag_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, NULL, argv[9]->arg); + int idx_ipv4 = 2; + int idx_ipv4_2 = 3; + int idx_ipv4_ifname = 4; + int idx_reject_blackhole = 5; + int idx_number = 7; + int idx_name = 9; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg); } DEFUN (ip_route_mask_flags2_vrf, @@ -1295,7 +1510,11 @@ DEFUN (ip_route_mask_flags2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, argv[6]->arg); + int idx_ipv4 = 2; + int idx_ipv4_2 = 3; + int idx_reject_blackhole = 4; + int idx_name = 6; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg); } DEFUN (ip_route_mask_flags2_tag_vrf, @@ -1311,7 +1530,12 @@ DEFUN (ip_route_mask_flags2_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, NULL, argv[8]->arg); + int idx_ipv4 = 2; + int idx_ipv4_2 = 3; + int idx_reject_blackhole = 4; + int idx_number = 6; + int idx_name = 8; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg); } /* Distance option value. */ @@ -1327,7 +1551,11 @@ DEFUN (ip_route_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL, argv[4]->arg, argv[6]->arg); + int idx_ipv4_prefixlen = 2; + int idx_ipv4_ifname_null = 3; + int idx_number = 4; + int idx_name = 6; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_name]->arg); } DEFUN (ip_route_tag_distance_vrf, @@ -1345,7 +1573,12 @@ DEFUN (ip_route_tag_distance_vrf, VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[5]->arg, argv[6]->arg, argv[8]->arg); + int idx_ipv4_prefixlen = 2; + int idx_ipv4_ifname_null = 3; + int idx_number = 5; + int idx_number_2 = 6; + int idx_name = 8; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); } DEFUN (ip_route_flags_distance_vrf, @@ -1361,7 +1594,12 @@ DEFUN (ip_route_flags_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg); + int idx_ipv4_prefixlen = 2; + int idx_ipv4_ifname = 3; + int idx_reject_blackhole = 4; + int idx_number = 5; + int idx_name = 7; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg); } DEFUN (ip_route_flags_tag_distance_vrf, @@ -1379,7 +1617,13 @@ DEFUN (ip_route_flags_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, argv[6]->arg, argv[7]->arg, argv[9]->arg); + int idx_ipv4_prefixlen = 2; + int idx_ipv4_ifname = 3; + int idx_reject_blackhole = 4; + int idx_number = 6; + int idx_number_2 = 7; + int idx_name = 9; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); } DEFUN (ip_route_flags_distance2_vrf, @@ -1393,7 +1637,11 @@ DEFUN (ip_route_flags_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg); + int idx_ipv4_prefixlen = 2; + int idx_reject_blackhole = 3; + int idx_number = 4; + int idx_name = 6; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg); } DEFUN (ip_route_flags_tag_distance2_vrf, @@ -1409,7 +1657,12 @@ DEFUN (ip_route_flags_tag_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, NULL, argv[3]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg); + int idx_ipv4_prefixlen = 2; + int idx_reject_blackhole = 3; + int idx_number = 5; + int idx_number_2 = 6; + int idx_name = 8; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); } DEFUN (ip_route_mask_distance_vrf, @@ -1425,7 +1678,12 @@ DEFUN (ip_route_mask_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[5]->arg, argv[7]->arg); + int idx_ipv4 = 2; + int idx_ipv4_2 = 3; + int idx_ipv4_ifname_null = 4; + int idx_number = 5; + int idx_name = 7; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_name]->arg); } DEFUN (ip_route_mask_tag_distance_vrf, @@ -1443,7 +1701,13 @@ DEFUN (ip_route_mask_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, argv[7]->arg, argv[9]->arg); + int idx_ipv4 = 2; + int idx_ipv4_2 = 3; + int idx_ipv4_ifname_null = 4; + int idx_number = 6; + int idx_number_2 = 7; + int idx_name = 9; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); } DEFUN (ip_route_mask_flags_tag_distance_vrf, @@ -1462,7 +1726,14 @@ DEFUN (ip_route_mask_flags_tag_distance_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, argv[8]->arg, argv[10]->arg); + int idx_ipv4 = 2; + int idx_ipv4_2 = 3; + int idx_ipv4_ifname = 4; + int idx_reject_blackhole = 5; + int idx_number = 7; + int idx_number_2 = 8; + int idx_name = 10; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); } @@ -1480,7 +1751,13 @@ DEFUN (ip_route_mask_flags_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[6]->arg, argv[8]->arg); + int idx_ipv4 = 2; + int idx_ipv4_2 = 3; + int idx_ipv4_ifname = 4; + int idx_reject_blackhole = 5; + int idx_number = 6; + int idx_name = 8; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg); } DEFUN (ip_route_mask_flags_distance2_vrf, @@ -1495,7 +1772,12 @@ DEFUN (ip_route_mask_flags_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg); + int idx_ipv4 = 2; + int idx_ipv4_2 = 3; + int idx_reject_blackhole = 4; + int idx_number = 5; + int idx_name = 7; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg); } DEFUN (ip_route_mask_flags_tag_distance2_vrf, @@ -1512,7 +1794,13 @@ DEFUN (ip_route_mask_flags_tag_distance2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, argv[7]->arg, argv[9]->arg); + int idx_ipv4 = 2; + int idx_ipv4_2 = 3; + int idx_reject_blackhole = 4; + int idx_number = 6; + int idx_number_2 = 7; + int idx_name = 9; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); } DEFUN (no_ip_route_vrf, @@ -1527,7 +1815,10 @@ DEFUN (no_ip_route_vrf, "Null interface\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, NULL, argv[6]->arg); + int idx_ipv4_prefixlen = 3; + int idx_ipv4_ifname_null = 4; + int idx_name = 6; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, NULL, argv[idx_name]->arg); } DEFUN (no_ip_route_flags_vrf, @@ -1543,7 +1834,11 @@ DEFUN (no_ip_route_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[7]->arg); + int idx_ipv4_prefixlen = 3; + int idx_ipv4_ifname = 4; + int idx_reject_blackhole = 5; + int idx_name = 7; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg); } DEFUN (no_ip_route_tag_vrf, @@ -1560,7 +1855,11 @@ DEFUN (no_ip_route_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[6]->arg, NULL, argv[8]->arg); + int idx_ipv4_prefixlen = 3; + int idx_ipv4_ifname_null = 4; + int idx_number = 6; + int idx_name = 8; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, NULL, argv[idx_name]->arg); } DEFUN (no_ip_route_flags_tag_vrf, @@ -1578,7 +1877,12 @@ DEFUN (no_ip_route_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, argv[7]->arg, NULL, argv[9]->arg); + int idx_ipv4_prefixlen = 3; + int idx_ipv4_ifname = 4; + int idx_reject_blackhole = 5; + int idx_number = 7; + int idx_name = 9; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg); } DEFUN (no_ip_route_flags2_vrf, @@ -1592,7 +1896,10 @@ DEFUN (no_ip_route_flags2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, NULL, NULL, argv[6]->arg); + int idx_ipv4_prefixlen = 3; + int idx_reject_blackhole = 4; + int idx_name = 6; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg); } DEFUN (no_ip_route_flags2_tag_vrf, @@ -1608,7 +1915,11 @@ DEFUN (no_ip_route_flags2_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, argv[6]->arg, NULL, argv[8]->arg); + int idx_ipv4_prefixlen = 3; + int idx_reject_blackhole = 4; + int idx_number = 6; + int idx_name = 8; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg); } DEFUN (no_ip_route_mask_vrf, @@ -1624,7 +1935,11 @@ DEFUN (no_ip_route_mask_vrf, "Null interface\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, NULL, argv[7]->arg); + int idx_ipv4 = 3; + int idx_ipv4_2 = 4; + int idx_ipv4_ifname_null = 5; + int idx_name = 7; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, NULL, argv[idx_name]->arg); } DEFUN (no_ip_route_mask_flags_vrf, @@ -1641,7 +1956,12 @@ DEFUN (no_ip_route_mask_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, NULL, argv[8]->arg); + int idx_ipv4 = 3; + int idx_ipv4_2 = 4; + int idx_ipv4_ifname = 5; + int idx_reject_blackhole = 6; + int idx_name = 8; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg); } DEFUN (no_ip_route_mask_tag_vrf, @@ -1659,7 +1979,12 @@ DEFUN (no_ip_route_mask_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, NULL, argv[9]->arg); + int idx_ipv4 = 3; + int idx_ipv4_2 = 4; + int idx_ipv4_ifname_null = 5; + int idx_number = 7; + int idx_name = 9; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, NULL, argv[idx_name]->arg); } DEFUN (no_ip_route_mask_flags_tag_vrf, @@ -1678,7 +2003,13 @@ DEFUN (no_ip_route_mask_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, NULL, argv[10]->arg); + int idx_ipv4 = 3; + int idx_ipv4_2 = 4; + int idx_ipv4_ifname = 5; + int idx_reject_blackhole = 6; + int idx_number = 8; + int idx_name = 10; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg); } DEFUN (no_ip_route_mask_flags2_vrf, @@ -1693,7 +2024,11 @@ DEFUN (no_ip_route_mask_flags2_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, NULL, argv[7]->arg); + int idx_ipv4 = 3; + int idx_ipv4_2 = 4; + int idx_reject_blackhole = 5; + int idx_name = 7; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg); } DEFUN (no_ip_route_mask_flags2_tag_vrf, @@ -1710,7 +2045,12 @@ DEFUN (no_ip_route_mask_flags2_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, NULL, argv[9]->arg); + int idx_ipv4 = 3; + int idx_ipv4_2 = 4; + int idx_reject_blackhole = 5; + int idx_number = 7; + int idx_name = 9; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg); } @@ -1727,7 +2067,11 @@ DEFUN (no_ip_route_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, argv[5]->arg, argv[7]->arg); + int idx_ipv4_prefixlen = 3; + int idx_ipv4_ifname_null = 4; + int idx_number = 5; + int idx_name = 7; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_name]->arg); } DEFUN (no_ip_route_tag_distance_vrf, @@ -1745,7 +2089,12 @@ DEFUN (no_ip_route_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[6]->arg, argv[7]->arg, argv[9]->arg); + int idx_ipv4_prefixlen = 3; + int idx_ipv4_ifname_null = 4; + int idx_number = 6; + int idx_number_2 = 7; + int idx_name = 9; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); } DEFUN (no_ip_route_flags_distance_vrf, @@ -1762,7 +2111,12 @@ DEFUN (no_ip_route_flags_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, NULL, argv[6]->arg, argv[8]->arg); + int idx_ipv4_prefixlen = 3; + int idx_ipv4_ifname = 4; + int idx_reject_blackhole = 5; + int idx_number = 6; + int idx_name = 8; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg); } DEFUN (no_ip_route_flags_tag_distance_vrf, @@ -1781,7 +2135,13 @@ DEFUN (no_ip_route_flags_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, argv[7]->arg, argv[8]->arg,argv[10]->arg); + int idx_ipv4_prefixlen = 3; + int idx_ipv4_ifname = 4; + int idx_reject_blackhole = 5; + int idx_number = 7; + int idx_number_2 = 8; + int idx_name = 10; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg,argv[idx_name]->arg); } DEFUN (no_ip_route_flags_distance2_vrf, @@ -1796,7 +2156,11 @@ DEFUN (no_ip_route_flags_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg); + int idx_ipv4_prefixlen = 3; + int idx_reject_blackhole = 4; + int idx_number = 5; + int idx_name = 7; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg); } DEFUN (no_ip_route_flags_tag_distance2_vrf, @@ -1813,7 +2177,12 @@ DEFUN (no_ip_route_flags_tag_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, NULL, argv[4]->arg, argv[6]->arg , argv[7]->arg, argv[9]->arg); + int idx_ipv4_prefixlen = 3; + int idx_reject_blackhole = 4; + int idx_number = 6; + int idx_number_2 = 7; + int idx_name = 9; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg , argv[idx_number_2]->arg, argv[idx_name]->arg); } DEFUN (no_ip_route_mask_distance_vrf, @@ -1830,7 +2199,12 @@ DEFUN (no_ip_route_mask_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[6]->arg, argv[8]->arg); + int idx_ipv4 = 3; + int idx_ipv4_2 = 4; + int idx_ipv4_ifname_null = 5; + int idx_number = 6; + int idx_name = 8; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_name]->arg); } DEFUN (no_ip_route_mask_tag_distance_vrf, @@ -1849,7 +2223,13 @@ DEFUN (no_ip_route_mask_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, argv[8]->arg, argv[10]->arg); + int idx_ipv4 = 3; + int idx_ipv4_2 = 4; + int idx_ipv4_ifname_null = 5; + int idx_number = 7; + int idx_number_2 = 8; + int idx_name = 10; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); } DEFUN (no_ip_route_mask_flags_distance_vrf, @@ -1867,7 +2247,13 @@ DEFUN (no_ip_route_mask_flags_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, argv[7]->arg, argv[9]->arg); + int idx_ipv4 = 3; + int idx_ipv4_2 = 4; + int idx_ipv4_ifname = 5; + int idx_reject_blackhole = 6; + int idx_number = 7; + int idx_name = 9; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg); } DEFUN (no_ip_route_mask_flags_tag_distance_vrf, @@ -1887,7 +2273,14 @@ DEFUN (no_ip_route_mask_flags_tag_distance_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, argv[9]->arg, argv[11]->arg); + int idx_ipv4 = 3; + int idx_ipv4_2 = 4; + int idx_ipv4_ifname = 5; + int idx_reject_blackhole = 6; + int idx_number = 8; + int idx_number_2 = 9; + int idx_name = 11; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); } DEFUN (no_ip_route_mask_flags_distance2_vrf, @@ -1903,7 +2296,12 @@ DEFUN (no_ip_route_mask_flags_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, argv[6]->arg, argv[8]->arg); + int idx_ipv4 = 3; + int idx_ipv4_2 = 4; + int idx_reject_blackhole = 5; + int idx_number = 6; + int idx_name = 8; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg); } DEFUN (no_ip_route_mask_flags_tag_distance2_vrf, @@ -1921,7 +2319,13 @@ DEFUN (no_ip_route_mask_flags_tag_distance2_vrf, "Distance value for this route\n" VRF_CMD_HELP_STR) { - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, argv[8]->arg, argv[10]->arg); + int idx_ipv4 = 3; + int idx_ipv4_2 = 4; + int idx_reject_blackhole = 5; + int idx_number = 7; + int idx_number_2 = 8; + int idx_name = 10; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); } /* New RIB. Detailed information for IPv4 route. */ @@ -2442,12 +2846,13 @@ DEFUN (show_ip_route_vrf, "IP routing table\n" VRF_CMD_HELP_STR) { + int idx_json = 5; u_char uj = use_json(argc, argv); if (argc == 1 && uj) return do_show_ip_route (vty, NULL, SAFI_UNICAST, uj); else - return do_show_ip_route (vty, argv[5]->arg, SAFI_UNICAST, uj); + return do_show_ip_route (vty, argv[idx_json]->arg, SAFI_UNICAST, uj); } /* @@ -2626,6 +3031,7 @@ DEFUN (show_ip_route_tag, "Show only routes with tag\n" "Tag value\n") { + int idx_number = 4; struct route_table *table; struct route_node *rn; struct rib *rib; @@ -2636,10 +3042,10 @@ DEFUN (show_ip_route_tag, if (argc > 1) { tag = atoi(argv[1]); - VRF_GET_ID (vrf_id, argv[4]->arg); + VRF_GET_ID (vrf_id, argv[idx_number]->arg); } else - tag = atoi(argv[4]->arg); + tag = atoi(argv[idx_number]->arg); table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); if (! table) @@ -2683,6 +3089,7 @@ DEFUN (show_ip_route_prefix_longer, "IP prefix /, e.g., 35.0.0.0/8\n" "Show route matching the specified Network/Mask pair only\n") { + int idx_ipv4_prefixlen = 3; struct route_table *table; struct route_node *rn; struct rib *rib; @@ -2694,10 +3101,10 @@ DEFUN (show_ip_route_prefix_longer, if (argc > 1) { ret = str2prefix (argv[1], &p); - VRF_GET_ID (vrf_id, argv[3]->arg); + VRF_GET_ID (vrf_id, argv[idx_ipv4_prefixlen]->arg); } else - ret = str2prefix (argv[3]->arg, &p); + ret = str2prefix (argv[idx_ipv4_prefixlen]->arg, &p); if (! ret) { @@ -2847,13 +3254,14 @@ DEFUN (show_ip_route_ospf_instance, "Open Shortest Path First (OSPFv2)\n" "Instance ID\n") { + int idx_number = 4; struct route_table *table; struct route_node *rn; struct rib *rib; int first = 1; u_short instance = 0; - VTY_GET_INTEGER ("Instance", instance, argv[4]->arg); + VTY_GET_INTEGER ("Instance", instance, argv[idx_number]->arg); table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, VRF_DEFAULT); if (! table) @@ -2892,6 +3300,7 @@ DEFUN (show_ip_route_addr, "IP routing table\n" "Network in the IP routing table to display\n") { + int idx_ipv4 = 3; int ret; struct prefix_ipv4 p; struct route_table *table; @@ -2900,11 +3309,11 @@ DEFUN (show_ip_route_addr, if (argc > 1) { - VRF_GET_ID (vrf_id, argv[3]->arg); + VRF_GET_ID (vrf_id, argv[idx_ipv4]->arg); ret = str2prefix_ipv4 (argv[1], &p); } else - ret = str2prefix_ipv4 (argv[3]->arg, &p); + ret = str2prefix_ipv4 (argv[idx_ipv4]->arg, &p); if (ret <= 0) { @@ -2949,6 +3358,7 @@ DEFUN (show_ip_route_prefix, "IP routing table\n" "IP prefix /, e.g., 35.0.0.0/8\n") { + int idx_ipv4_prefixlen = 3; int ret; struct prefix_ipv4 p; struct route_table *table; @@ -2957,11 +3367,11 @@ DEFUN (show_ip_route_prefix, if (argc > 1) { - VRF_GET_ID (vrf_id, argv[3]->arg); + VRF_GET_ID (vrf_id, argv[idx_ipv4_prefixlen]->arg); ret = str2prefix_ipv4 (argv[1], &p); } else - ret = str2prefix_ipv4 (argv[3]->arg, &p); + ret = str2prefix_ipv4 (argv[idx_ipv4_prefixlen]->arg, &p); if (ret <= 0) { @@ -3264,6 +3674,7 @@ DEFUN (show_ip_route_vrf_all_tag, "Show only routes with tag\n" "Tag value\n") { + int idx_number = 6; struct route_table *table; struct route_node *rn; struct rib *rib; @@ -3273,8 +3684,8 @@ DEFUN (show_ip_route_vrf_all_tag, int vrf_header = 1; u_short tag = 0; - if (argv[6]->arg) - tag = atoi(argv[6]->arg); + if (argv[idx_number]->arg) + tag = atoi(argv[idx_number]->arg); for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter)) { @@ -3317,6 +3728,7 @@ DEFUN (show_ip_route_vrf_all_prefix_longer, "IP prefix /, e.g., 35.0.0.0/8\n" "Show route matching the specified Network/Mask pair only\n") { + int idx_ipv4_prefixlen = 5; struct route_table *table; struct route_node *rn; struct rib *rib; @@ -3327,7 +3739,7 @@ DEFUN (show_ip_route_vrf_all_prefix_longer, int first = 1; int vrf_header = 1; - ret = str2prefix (argv[5]->arg, &p); + ret = str2prefix (argv[idx_ipv4_prefixlen]->arg, &p); if (! ret) { vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE); @@ -3482,6 +3894,7 @@ DEFUN (show_ip_route_vrf_all_addr, VRF_ALL_CMD_HELP_STR "Network in the IP routing table to display\n") { + int idx_ipv4 = 5; int ret; struct prefix_ipv4 p; struct route_table *table; @@ -3489,7 +3902,7 @@ DEFUN (show_ip_route_vrf_all_addr, struct zebra_vrf *zvrf; vrf_iter_t iter; - ret = str2prefix_ipv4 (argv[5]->arg, &p); + ret = str2prefix_ipv4 (argv[idx_ipv4]->arg, &p); if (ret <= 0) { vty_out (vty, "%% Malformed IPv4 address%s", VTY_NEWLINE); @@ -3523,6 +3936,7 @@ DEFUN (show_ip_route_vrf_all_prefix, VRF_ALL_CMD_HELP_STR "IP prefix /, e.g., 35.0.0.0/8\n") { + int idx_ipv4_prefixlen = 5; int ret; struct prefix_ipv4 p; struct route_table *table; @@ -3530,7 +3944,7 @@ DEFUN (show_ip_route_vrf_all_prefix, struct zebra_vrf *zvrf; vrf_iter_t iter; - ret = str2prefix_ipv4 (argv[5]->arg, &p); + ret = str2prefix_ipv4 (argv[idx_ipv4_prefixlen]->arg, &p); if (ret <= 0) { vty_out (vty, "%% Malformed IPv4 address%s", VTY_NEWLINE); @@ -3789,7 +4203,9 @@ DEFUN (ipv6_route, "IPv6 gateway address\n" "IPv6 gateway interface name\n") { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, NULL, NULL, NULL); + int idx_ipv6_prefixlen = 2; + int idx_ipv6_ifname = 3; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, NULL, NULL, NULL); } DEFUN (ipv6_route_tag, @@ -3803,7 +4219,10 @@ DEFUN (ipv6_route_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[5]->arg, NULL, NULL); + int idx_ipv6_prefixlen = 2; + int idx_ipv6_ifname = 3; + int idx_number = 5; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, argv[idx_number]->arg, NULL, NULL); } DEFUN (ipv6_route_flags, @@ -3817,7 +4236,10 @@ DEFUN (ipv6_route_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, NULL); + int idx_ipv6_prefixlen = 2; + int idx_ipv6_ifname = 3; + int idx_reject_blackhole = 4; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, NULL, NULL); } DEFUN (ipv6_route_flags_tag, @@ -3833,7 +4255,11 @@ DEFUN (ipv6_route_flags_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, NULL, NULL); + int idx_ipv6_prefixlen = 2; + int idx_ipv6_ifname = 3; + int idx_reject_blackhole = 4; + int idx_number = 6; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, NULL); } DEFUN (ipv6_route_ifname, @@ -3845,7 +4271,10 @@ DEFUN (ipv6_route_ifname, "IPv6 gateway address\n" "IPv6 gateway interface name\n") { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, NULL); + int idx_ipv6_prefixlen = 2; + int idx_ipv6 = 3; + int idx_interface = 4; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, NULL, NULL, NULL); } DEFUN (ipv6_route_ifname_tag, ipv6_route_ifname_tag_cmd, @@ -3858,7 +4287,11 @@ DEFUN (ipv6_route_ifname_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, NULL, NULL); + int idx_ipv6_prefixlen = 2; + int idx_ipv6 = 3; + int idx_interface = 4; + int idx_number = 6; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, argv[idx_number]->arg, NULL, NULL); } DEFUN (ipv6_route_ifname_flags, @@ -3872,7 +4305,11 @@ DEFUN (ipv6_route_ifname_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, NULL); + int idx_ipv6_prefixlen = 2; + int idx_ipv6 = 3; + int idx_interface = 4; + int idx_reject_blackhole = 5; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, NULL, NULL, NULL); } DEFUN (ipv6_route_ifname_flags_tag, @@ -3888,7 +4325,12 @@ DEFUN (ipv6_route_ifname_flags_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, NULL, NULL); + int idx_ipv6_prefixlen = 2; + int idx_ipv6 = 3; + int idx_interface = 4; + int idx_reject_blackhole = 5; + int idx_number = 7; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, NULL); } DEFUN (ipv6_route_pref, @@ -3901,7 +4343,10 @@ DEFUN (ipv6_route_pref, "IPv6 gateway interface name\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, NULL, argv[4]->arg, NULL); + int idx_ipv6_prefixlen = 2; + int idx_ipv6_ifname = 3; + int idx_number = 4; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, NULL, argv[idx_number]->arg, NULL); } DEFUN (ipv6_route_pref_tag, @@ -3916,7 +4361,11 @@ DEFUN (ipv6_route_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[5]->arg, argv[6]->arg, NULL); + int idx_ipv6_prefixlen = 2; + int idx_ipv6_ifname = 3; + int idx_number = 5; + int idx_number_2 = 6; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, NULL); } DEFUN (ipv6_route_flags_pref, @@ -3931,7 +4380,11 @@ DEFUN (ipv6_route_flags_pref, "Silently discard pkts when matched\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[5]->arg, NULL); + int idx_ipv6_prefixlen = 2; + int idx_ipv6_ifname = 3; + int idx_reject_blackhole = 4; + int idx_number = 5; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, NULL); } DEFUN (ipv6_route_flags_pref_tag, @@ -3948,7 +4401,12 @@ DEFUN (ipv6_route_flags_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, argv[7]->arg, NULL); + int idx_ipv6_prefixlen = 2; + int idx_ipv6_ifname = 3; + int idx_reject_blackhole = 4; + int idx_number = 6; + int idx_number_2 = 7; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, NULL); } DEFUN (ipv6_route_ifname_pref, @@ -3961,7 +4419,11 @@ DEFUN (ipv6_route_ifname_pref, "IPv6 gateway interface name\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[5]->arg, NULL); + int idx_ipv6_prefixlen = 2; + int idx_ipv6 = 3; + int idx_interface = 4; + int idx_number = 5; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, NULL, argv[idx_number]->arg, NULL); } DEFUN (ipv6_route_ifname_pref_tag, @@ -3976,7 +4438,12 @@ DEFUN (ipv6_route_ifname_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, argv[7]->arg, NULL); + int idx_ipv6_prefixlen = 2; + int idx_ipv6 = 3; + int idx_interface = 4; + int idx_number = 6; + int idx_number_2 = 7; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, NULL); } DEFUN (ipv6_route_ifname_flags_pref, @@ -3991,7 +4458,12 @@ DEFUN (ipv6_route_ifname_flags_pref, "Silently discard pkts when matched\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[6]->arg, NULL); + int idx_ipv6_prefixlen = 2; + int idx_ipv6 = 3; + int idx_interface = 4; + int idx_reject_blackhole = 5; + int idx_number = 6; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, NULL); } DEFUN (ipv6_route_ifname_flags_pref_tag, @@ -4008,7 +4480,13 @@ DEFUN (ipv6_route_ifname_flags_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, argv[8]->arg, NULL); + int idx_ipv6_prefixlen = 2; + int idx_ipv6 = 3; + int idx_interface = 4; + int idx_reject_blackhole = 5; + int idx_number = 7; + int idx_number_2 = 8; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, NULL); } DEFUN (no_ipv6_route, @@ -4021,7 +4499,9 @@ DEFUN (no_ipv6_route, "IPv6 gateway address\n" "IPv6 gateway interface name\n") { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, NULL, NULL); + int idx_ipv6_prefixlen = 3; + int idx_ipv6_ifname = 4; + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, NULL, NULL, NULL); } DEFUN (no_ipv6_route_tag, @@ -4036,7 +4516,10 @@ DEFUN (no_ipv6_route_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[6]->arg, NULL, NULL); + int idx_ipv6_prefixlen = 3; + int idx_ipv6_ifname = 4; + int idx_number = 6; + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, argv[idx_number]->arg, NULL, NULL); } DEFUN (no_ipv6_route_flags, @@ -4051,7 +4534,10 @@ DEFUN (no_ipv6_route_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, NULL, NULL); + int idx_ipv6_prefixlen = 3; + int idx_ipv6_ifname = 4; + int idx_reject_blackhole = 5; + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, NULL, NULL); } DEFUN (no_ipv6_route_flags_tag, @@ -4068,7 +4554,11 @@ DEFUN (no_ipv6_route_flags_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, NULL, NULL); + int idx_ipv6_prefixlen = 3; + int idx_ipv6_ifname = 4; + int idx_reject_blackhole = 5; + int idx_number = 7; + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, NULL); } DEFUN (no_ipv6_route_ifname, @@ -4081,7 +4571,10 @@ DEFUN (no_ipv6_route_ifname, "IPv6 gateway address\n" "IPv6 gateway interface name\n") { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, NULL, NULL); + int idx_ipv6_prefixlen = 3; + int idx_ipv6 = 4; + int idx_interface = 5; + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, NULL, NULL, NULL); } DEFUN (no_ipv6_route_ifname_tag, @@ -4096,7 +4589,11 @@ DEFUN (no_ipv6_route_ifname_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, NULL, NULL); + int idx_ipv6_prefixlen = 3; + int idx_ipv6 = 4; + int idx_interface = 5; + int idx_number = 7; + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, argv[idx_number]->arg, NULL, NULL); } DEFUN (no_ipv6_route_ifname_flags, @@ -4111,7 +4608,11 @@ DEFUN (no_ipv6_route_ifname_flags, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n") { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, NULL, NULL); + int idx_ipv6_prefixlen = 3; + int idx_ipv6 = 4; + int idx_interface = 5; + int idx_reject_blackhole = 6; + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, NULL, NULL, NULL); } DEFUN (no_ipv6_route_ifname_flags_tag, @@ -4128,7 +4629,12 @@ DEFUN (no_ipv6_route_ifname_flags_tag, "Set tag for this route\n" "Tag value\n") { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, NULL, NULL); + int idx_ipv6_prefixlen = 3; + int idx_ipv6 = 4; + int idx_interface = 5; + int idx_reject_blackhole = 6; + int idx_number = 8; + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, NULL); } DEFUN (no_ipv6_route_pref, @@ -4142,7 +4648,10 @@ DEFUN (no_ipv6_route_pref, "IPv6 gateway interface name\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, argv[5]->arg, NULL); + int idx_ipv6_prefixlen = 3; + int idx_ipv6_ifname = 4; + int idx_number = 5; + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, NULL, argv[idx_number]->arg, NULL); } DEFUN (no_ipv6_route_pref_tag, @@ -4158,7 +4667,11 @@ DEFUN (no_ipv6_route_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[6]->arg, argv[7]->arg, NULL); + int idx_ipv6_prefixlen = 3; + int idx_ipv6_ifname = 4; + int idx_number = 6; + int idx_number_2 = 7; + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, NULL); } DEFUN (no_ipv6_route_flags_pref, @@ -4174,8 +4687,12 @@ DEFUN (no_ipv6_route_flags_pref, "Silently discard pkts when matched\n" "Distance value for this prefix\n") { - /* We do not care about argv[5]->arg */ - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, argv[6]->arg, NULL); + int idx_ipv6_prefixlen = 3; + int idx_ipv6_ifname = 4; + int idx_reject_blackhole = 5; + int idx_number = 6; + /* We do not care about argv[idx_reject_blackhole]->arg */ + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, NULL); } DEFUN (no_ipv6_route_flags_pref_tag, @@ -4193,8 +4710,13 @@ DEFUN (no_ipv6_route_flags_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - /* We do not care about argv[5]->arg */ - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, argv[8]->arg, NULL); + int idx_ipv6_prefixlen = 3; + int idx_ipv6_ifname = 4; + int idx_reject_blackhole = 5; + int idx_number = 7; + int idx_number_2 = 8; + /* We do not care about argv[idx_reject_blackhole]->arg */ + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, NULL); } DEFUN (no_ipv6_route_ifname_pref, @@ -4208,7 +4730,11 @@ DEFUN (no_ipv6_route_ifname_pref, "IPv6 gateway interface name\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[6]->arg, NULL); + int idx_ipv6_prefixlen = 3; + int idx_ipv6 = 4; + int idx_interface = 5; + int idx_number = 6; + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, NULL, argv[idx_number]->arg, NULL); } DEFUN (no_ipv6_route_ifname_pref_tag, @@ -4224,7 +4750,12 @@ DEFUN (no_ipv6_route_ifname_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, argv[8]->arg, NULL); + int idx_ipv6_prefixlen = 3; + int idx_ipv6 = 4; + int idx_interface = 5; + int idx_number = 7; + int idx_number_2 = 8; + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, NULL); } DEFUN (no_ipv6_route_ifname_flags_pref, @@ -4240,7 +4771,12 @@ DEFUN (no_ipv6_route_ifname_flags_pref, "Silently discard pkts when matched\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, argv[7]->arg, NULL); + int idx_ipv6_prefixlen = 3; + int idx_ipv6 = 4; + int idx_interface = 5; + int idx_reject_blackhole = 6; + int idx_number = 7; + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, NULL); } DEFUN (no_ipv6_route_ifname_flags_pref_tag, @@ -4258,7 +4794,13 @@ DEFUN (no_ipv6_route_ifname_flags_pref_tag, "Tag value\n" "Distance value for this prefix\n") { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, argv[9]->arg, NULL); + int idx_ipv6_prefixlen = 3; + int idx_ipv6 = 4; + int idx_interface = 5; + int idx_reject_blackhole = 6; + int idx_number = 8; + int idx_number_2 = 9; + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, NULL); } DEFUN (ipv6_route_vrf, @@ -4271,7 +4813,10 @@ DEFUN (ipv6_route_vrf, "IPv6 gateway interface name\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, NULL, NULL, argv[5]->arg); + int idx_ipv6_prefixlen = 2; + int idx_ipv6_ifname = 3; + int idx_name = 5; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, NULL, NULL, argv[idx_name]->arg); } DEFUN (ipv6_route_tag_vrf, @@ -4286,7 +4831,11 @@ DEFUN (ipv6_route_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[5]->arg, NULL, argv[7]->arg); + int idx_ipv6_prefixlen = 2; + int idx_ipv6_ifname = 3; + int idx_number = 5; + int idx_name = 7; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, argv[idx_number]->arg, NULL, argv[idx_name]->arg); } DEFUN (ipv6_route_flags_vrf, @@ -4301,7 +4850,11 @@ DEFUN (ipv6_route_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, argv[6]->arg); + int idx_ipv6_prefixlen = 2; + int idx_ipv6_ifname = 3; + int idx_reject_blackhole = 4; + int idx_name = 6; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg); } DEFUN (ipv6_route_flags_tag_vrf, @@ -4318,7 +4871,12 @@ DEFUN (ipv6_route_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, NULL, argv[8]->arg); + int idx_ipv6_prefixlen = 2; + int idx_ipv6_ifname = 3; + int idx_reject_blackhole = 4; + int idx_number = 6; + int idx_name = 8; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg); } DEFUN (ipv6_route_ifname_vrf, @@ -4331,7 +4889,11 @@ DEFUN (ipv6_route_ifname_vrf, "IPv6 gateway interface name\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, argv[6]->arg); + int idx_ipv6_prefixlen = 2; + int idx_ipv6 = 3; + int idx_interface = 4; + int idx_name = 6; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, NULL, NULL, argv[idx_name]->arg); } DEFUN (ipv6_route_ifname_tag_vrf, ipv6_route_ifname_tag_vrf_cmd, @@ -4345,7 +4907,12 @@ DEFUN (ipv6_route_ifname_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, NULL, argv[8]->arg); + int idx_ipv6_prefixlen = 2; + int idx_ipv6 = 3; + int idx_interface = 4; + int idx_number = 6; + int idx_name = 8; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, argv[idx_number]->arg, NULL, argv[idx_name]->arg); } DEFUN (ipv6_route_ifname_flags_vrf, @@ -4360,7 +4927,12 @@ DEFUN (ipv6_route_ifname_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[7]->arg); + int idx_ipv6_prefixlen = 2; + int idx_ipv6 = 3; + int idx_interface = 4; + int idx_reject_blackhole = 5; + int idx_name = 7; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg); } DEFUN (ipv6_route_ifname_flags_tag_vrf, @@ -4377,7 +4949,13 @@ DEFUN (ipv6_route_ifname_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, NULL, argv[9]->arg); + int idx_ipv6_prefixlen = 2; + int idx_ipv6 = 3; + int idx_interface = 4; + int idx_reject_blackhole = 5; + int idx_number = 7; + int idx_name = 9; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg); } DEFUN (ipv6_route_pref_vrf, @@ -4391,7 +4969,11 @@ DEFUN (ipv6_route_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, NULL, argv[4]->arg, argv[6]->arg); + int idx_ipv6_prefixlen = 2; + int idx_ipv6_ifname = 3; + int idx_number = 4; + int idx_name = 6; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, NULL, argv[idx_number]->arg, argv[idx_name]->arg); } DEFUN (ipv6_route_pref_tag_vrf, @@ -4407,7 +4989,12 @@ DEFUN (ipv6_route_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, NULL, argv[5]->arg, argv[6]->arg, argv[8]->arg); + int idx_ipv6_prefixlen = 2; + int idx_ipv6_ifname = 3; + int idx_number = 5; + int idx_number_2 = 6; + int idx_name = 8; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); } DEFUN (ipv6_route_flags_pref_vrf, @@ -4423,7 +5010,12 @@ DEFUN (ipv6_route_flags_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg); + int idx_ipv6_prefixlen = 2; + int idx_ipv6_ifname = 3; + int idx_reject_blackhole = 4; + int idx_number = 5; + int idx_name = 7; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg); } DEFUN (ipv6_route_flags_pref_tag_vrf, @@ -4441,7 +5033,13 @@ DEFUN (ipv6_route_flags_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, NULL, argv[4]->arg, argv[6]->arg, argv[7]->arg, argv[9]->arg); + int idx_ipv6_prefixlen = 2; + int idx_ipv6_ifname = 3; + int idx_reject_blackhole = 4; + int idx_number = 6; + int idx_number_2 = 7; + int idx_name = 9; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); } DEFUN (ipv6_route_ifname_pref_vrf, @@ -4455,7 +5053,12 @@ DEFUN (ipv6_route_ifname_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[5]->arg, argv[7]->arg); + int idx_ipv6_prefixlen = 2; + int idx_ipv6 = 3; + int idx_interface = 4; + int idx_number = 5; + int idx_name = 7; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_name]->arg); } DEFUN (ipv6_route_ifname_pref_tag_vrf, @@ -4471,7 +5074,13 @@ DEFUN (ipv6_route_ifname_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, argv[7]->arg, argv[9]->arg); + int idx_ipv6_prefixlen = 2; + int idx_ipv6 = 3; + int idx_interface = 4; + int idx_number = 6; + int idx_number_2 = 7; + int idx_name = 9; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); } DEFUN (ipv6_route_ifname_flags_pref_vrf, @@ -4487,7 +5096,13 @@ DEFUN (ipv6_route_ifname_flags_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[6]->arg, argv[8]->arg); + int idx_ipv6_prefixlen = 2; + int idx_ipv6 = 3; + int idx_interface = 4; + int idx_reject_blackhole = 5; + int idx_number = 6; + int idx_name = 8; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg); } DEFUN (ipv6_route_ifname_flags_pref_tag_vrf, @@ -4505,7 +5120,14 @@ DEFUN (ipv6_route_ifname_flags_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[7]->arg, argv[8]->arg, argv[10]->arg); + int idx_ipv6_prefixlen = 2; + int idx_ipv6 = 3; + int idx_interface = 4; + int idx_reject_blackhole = 5; + int idx_number = 7; + int idx_number_2 = 8; + int idx_name = 10; + return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); } DEFUN (no_ipv6_route_vrf, @@ -4519,7 +5141,10 @@ DEFUN (no_ipv6_route_vrf, "IPv6 gateway interface name\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, NULL, argv[6]->arg); + int idx_ipv6_prefixlen = 3; + int idx_ipv6_ifname = 4; + int idx_name = 6; + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, NULL, NULL, argv[idx_name]->arg); } DEFUN (no_ipv6_route_tag_vrf, @@ -4535,7 +5160,11 @@ DEFUN (no_ipv6_route_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[6]->arg, NULL, argv[8]->arg); + int idx_ipv6_prefixlen = 3; + int idx_ipv6_ifname = 4; + int idx_number = 6; + int idx_name = 8; + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, argv[idx_number]->arg, NULL, argv[idx_name]->arg); } DEFUN (no_ipv6_route_flags_vrf, @@ -4551,7 +5180,11 @@ DEFUN (no_ipv6_route_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, NULL, argv[7]->arg); + int idx_ipv6_prefixlen = 3; + int idx_ipv6_ifname = 4; + int idx_reject_blackhole = 5; + int idx_name = 7; + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg); } DEFUN (no_ipv6_route_flags_tag_vrf, @@ -4569,7 +5202,12 @@ DEFUN (no_ipv6_route_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, NULL, argv[9]->arg); + int idx_ipv6_prefixlen = 3; + int idx_ipv6_ifname = 4; + int idx_reject_blackhole = 5; + int idx_number = 7; + int idx_name = 9; + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg); } DEFUN (no_ipv6_route_ifname_vrf, @@ -4583,7 +5221,11 @@ DEFUN (no_ipv6_route_ifname_vrf, "IPv6 gateway interface name\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, NULL, argv[7]->arg); + int idx_ipv6_prefixlen = 3; + int idx_ipv6 = 4; + int idx_interface = 5; + int idx_name = 7; + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, NULL, NULL, argv[idx_name]->arg); } DEFUN (no_ipv6_route_ifname_tag_vrf, @@ -4599,7 +5241,12 @@ DEFUN (no_ipv6_route_ifname_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, NULL, argv[9]->arg); + int idx_ipv6_prefixlen = 3; + int idx_ipv6 = 4; + int idx_interface = 5; + int idx_number = 7; + int idx_name = 9; + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, argv[idx_number]->arg, NULL, argv[idx_name]->arg); } DEFUN (no_ipv6_route_ifname_flags_vrf, @@ -4615,7 +5262,12 @@ DEFUN (no_ipv6_route_ifname_flags_vrf, "Silently discard pkts when matched\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, NULL, argv[8]->arg); + int idx_ipv6_prefixlen = 3; + int idx_ipv6 = 4; + int idx_interface = 5; + int idx_reject_blackhole = 6; + int idx_name = 8; + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg); } DEFUN (no_ipv6_route_ifname_flags_tag_vrf, @@ -4633,7 +5285,13 @@ DEFUN (no_ipv6_route_ifname_flags_tag_vrf, "Tag value\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, NULL, argv[10]->arg); + int idx_ipv6_prefixlen = 3; + int idx_ipv6 = 4; + int idx_interface = 5; + int idx_reject_blackhole = 6; + int idx_number = 8; + int idx_name = 10; + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg); } DEFUN (no_ipv6_route_pref_vrf, @@ -4648,7 +5306,11 @@ DEFUN (no_ipv6_route_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, argv[5]->arg, argv[7]->arg); + int idx_ipv6_prefixlen = 3; + int idx_ipv6_ifname = 4; + int idx_number = 5; + int idx_name = 7; + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, NULL, argv[idx_number]->arg, argv[idx_name]->arg); } DEFUN (no_ipv6_route_pref_tag_vrf, @@ -4665,7 +5327,12 @@ DEFUN (no_ipv6_route_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[6]->arg, argv[7]->arg, argv[9]->arg); + int idx_ipv6_prefixlen = 3; + int idx_ipv6_ifname = 4; + int idx_number = 6; + int idx_number_2 = 7; + int idx_name = 9; + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); } DEFUN (no_ipv6_route_flags_pref_vrf, @@ -4682,8 +5349,13 @@ DEFUN (no_ipv6_route_flags_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - /* We do not care about argv[5]->arg */ - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, NULL, argv[6]->arg, argv[8]->arg); + int idx_ipv6_prefixlen = 3; + int idx_ipv6_ifname = 4; + int idx_reject_blackhole = 5; + int idx_number = 6; + int idx_name = 8; + /* We do not care about argv[idx_reject_blackhole]->arg */ + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg); } DEFUN (no_ipv6_route_flags_pref_tag_vrf, @@ -4702,8 +5374,14 @@ DEFUN (no_ipv6_route_flags_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - /* We do not care about argv[5]->arg */ - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, NULL, argv[5]->arg, argv[7]->arg, argv[8]->arg, argv[10]->arg); + int idx_ipv6_prefixlen = 3; + int idx_ipv6_ifname = 4; + int idx_reject_blackhole = 5; + int idx_number = 7; + int idx_number_2 = 8; + int idx_name = 10; + /* We do not care about argv[idx_reject_blackhole]->arg */ + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); } DEFUN (no_ipv6_route_ifname_pref_vrf, @@ -4718,7 +5396,12 @@ DEFUN (no_ipv6_route_ifname_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[6]->arg, argv[8]->arg); + int idx_ipv6_prefixlen = 3; + int idx_ipv6 = 4; + int idx_interface = 5; + int idx_number = 6; + int idx_name = 8; + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_name]->arg); } DEFUN (no_ipv6_route_ifname_pref_tag_vrf, @@ -4735,7 +5418,13 @@ DEFUN (no_ipv6_route_ifname_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, argv[8]->arg, argv[10]->arg); + int idx_ipv6_prefixlen = 3; + int idx_ipv6 = 4; + int idx_interface = 5; + int idx_number = 7; + int idx_number_2 = 8; + int idx_name = 10; + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); } DEFUN (no_ipv6_route_ifname_flags_pref_vrf, @@ -4752,7 +5441,13 @@ DEFUN (no_ipv6_route_ifname_flags_pref_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, NULL, argv[7]->arg, argv[9]->arg); + int idx_ipv6_prefixlen = 3; + int idx_ipv6 = 4; + int idx_interface = 5; + int idx_reject_blackhole = 6; + int idx_number = 7; + int idx_name = 9; + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg); } DEFUN (no_ipv6_route_ifname_flags_pref_tag_vrf, @@ -4771,7 +5466,14 @@ DEFUN (no_ipv6_route_ifname_flags_pref_tag_vrf, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - return static_ipv6_func (vty, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, argv[6]->arg, argv[8]->arg, argv[9]->arg, argv[11]->arg); + int idx_ipv6_prefixlen = 3; + int idx_ipv6 = 4; + int idx_interface = 5; + int idx_reject_blackhole = 6; + int idx_number = 8; + int idx_number_2 = 9; + int idx_name = 11; + return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); } /* @@ -4790,6 +5492,7 @@ DEFUN (show_ipv6_route, IP_STR "IPv6 routing table\n") { + int idx_json = 3; struct route_table *table; struct route_node *rn; struct rib *rib; @@ -4801,14 +5504,14 @@ DEFUN (show_ipv6_route, json_object *json_prefix = NULL; u_char uj = use_json(argc, argv); - if (argc > 0 && argv[3]->arg && strcmp(argv[3]->arg, "json") != 0) + if (argc > 0 && argv[idx_json]->arg && strcmp(argv[idx_json]->arg, "json") != 0) { - if (!(zvrf = zebra_vrf_list_lookup_by_name (argv[3]->arg))) + if (!(zvrf = zebra_vrf_list_lookup_by_name (argv[idx_json]->arg))) { if (uj) vty_out (vty, "{}%s", VTY_NEWLINE); else - vty_out (vty, "vrf %s not defined%s", argv[3]->arg, VTY_NEWLINE); + vty_out (vty, "vrf %s not defined%s", argv[idx_json]->arg, VTY_NEWLINE); return CMD_SUCCESS; } @@ -4817,7 +5520,7 @@ DEFUN (show_ipv6_route, if (uj) vty_out (vty, "{}%s", VTY_NEWLINE); else - vty_out (vty, "vrf %s inactive%s", argv[3]->arg, VTY_NEWLINE); + vty_out (vty, "vrf %s inactive%s", argv[idx_json]->arg, VTY_NEWLINE); return CMD_SUCCESS; } else @@ -4898,6 +5601,7 @@ DEFUN (show_ipv6_route_tag, "Show only routes with tag\n" "Tag value\n") { + int idx_number = 4; struct route_table *table; struct route_node *rn; struct rib *rib; @@ -4907,11 +5611,11 @@ DEFUN (show_ipv6_route_tag, if (argc > 1) { - VRF_GET_ID (vrf_id, argv[4]->arg); + VRF_GET_ID (vrf_id, argv[idx_number]->arg); tag = atoi(argv[1]); } else - tag = atoi(argv[4]->arg); + tag = atoi(argv[idx_number]->arg); table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id); if (! table) @@ -4955,6 +5659,7 @@ DEFUN (show_ipv6_route_prefix_longer, "IPv6 prefix\n" "Show route matching the specified Network/Mask pair only\n") { + int idx_ipv6_prefixlen = 3; struct route_table *table; struct route_node *rn; struct rib *rib; @@ -4965,11 +5670,11 @@ DEFUN (show_ipv6_route_prefix_longer, if (argc > 1) { - VRF_GET_ID (vrf_id, argv[3]->arg); + VRF_GET_ID (vrf_id, argv[idx_ipv6_prefixlen]->arg); ret = str2prefix (argv[1], &p); } else - ret = str2prefix (argv[3]->arg, &p); + ret = str2prefix (argv[idx_ipv6_prefixlen]->arg, &p); if (! ret) { @@ -5015,6 +5720,7 @@ DEFUN (show_ipv6_route_protocol, "IP routing table\n" QUAGGA_IP6_REDIST_HELP_STR_ZEBRA) { + int idx_protocol = 3; int type; struct route_table *table; struct route_node *rn; @@ -5025,7 +5731,7 @@ DEFUN (show_ipv6_route_protocol, if ( argc >1 ) { VRF_GET_ID (vrf_id, argv[4]->arg); - type = proto_redistnum (AFI_IP6, argv[3]->arg); + type = proto_redistnum (AFI_IP6, argv[idx_protocol]->arg); } else type = proto_redistnum (AFI_IP6, argv[4]->arg); @@ -5074,6 +5780,7 @@ DEFUN (show_ipv6_route_addr, "IPv6 routing table\n" "IPv6 Address\n") { + int idx_ipv6 = 3; int ret; struct prefix_ipv6 p; struct route_table *table; @@ -5082,11 +5789,11 @@ DEFUN (show_ipv6_route_addr, if (argc > 1 ) { - VRF_GET_ID (vrf_id, argv[3]->arg); + VRF_GET_ID (vrf_id, argv[idx_ipv6]->arg); ret = str2prefix_ipv6 (argv[1], &p); } else - ret = str2prefix_ipv6 (argv[3]->arg, &p); + ret = str2prefix_ipv6 (argv[idx_ipv6]->arg, &p); if (ret <= 0) { @@ -5131,6 +5838,7 @@ DEFUN (show_ipv6_route_prefix, "IPv6 routing table\n" "IPv6 prefix\n") { + int idx_ipv6_prefixlen = 3; int ret; struct prefix_ipv6 p; struct route_table *table; @@ -5139,11 +5847,11 @@ DEFUN (show_ipv6_route_prefix, if (argc > 1) { - VRF_GET_ID (vrf_id, argv[3]->arg); + VRF_GET_ID (vrf_id, argv[idx_ipv6_prefixlen]->arg); ret = str2prefix_ipv6 (argv[1], &p); } else - ret = str2prefix_ipv6 (argv[3]->arg, &p); + ret = str2prefix_ipv6 (argv[idx_ipv6_prefixlen]->arg, &p); if (ret <= 0) { @@ -5346,6 +6054,7 @@ DEFUN (show_ipv6_route_vrf_all_tag, "Show only routes with tag\n" "Tag value\n") { + int idx_number = 6; struct route_table *table; struct route_node *rn; struct rib *rib; @@ -5355,8 +6064,8 @@ DEFUN (show_ipv6_route_vrf_all_tag, int vrf_header = 1; u_short tag = 0; - if (argv[6]->arg) - tag = atoi(argv[6]->arg); + if (argv[idx_number]->arg) + tag = atoi(argv[idx_number]->arg); for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter)) { @@ -5400,6 +6109,7 @@ DEFUN (show_ipv6_route_vrf_all_prefix_longer, "IPv6 prefix\n" "Show route matching the specified Network/Mask pair only\n") { + int idx_ipv6_prefixlen = 5; struct route_table *table; struct route_node *rn; struct rib *rib; @@ -5410,7 +6120,7 @@ DEFUN (show_ipv6_route_vrf_all_prefix_longer, int first = 1; int vrf_header = 1; - ret = str2prefix (argv[5]->arg, &p); + ret = str2prefix (argv[idx_ipv6_prefixlen]->arg, &p); if (! ret) { vty_out (vty, "%% Malformed Prefix%s", VTY_NEWLINE); @@ -5511,6 +6221,7 @@ DEFUN (show_ipv6_route_vrf_all_addr, VRF_ALL_CMD_HELP_STR "IPv6 Address\n") { + int idx_ipv6 = 5; int ret; struct prefix_ipv6 p; struct route_table *table; @@ -5518,7 +6229,7 @@ DEFUN (show_ipv6_route_vrf_all_addr, struct zebra_vrf *zvrf; vrf_iter_t iter; - ret = str2prefix_ipv6 (argv[5]->arg, &p); + ret = str2prefix_ipv6 (argv[idx_ipv6]->arg, &p); if (ret <= 0) { vty_out (vty, "Malformed IPv6 address%s", VTY_NEWLINE); @@ -5552,6 +6263,7 @@ DEFUN (show_ipv6_route_vrf_all_prefix, VRF_ALL_CMD_HELP_STR "IPv6 prefix\n") { + int idx_ipv6_prefixlen = 5; int ret; struct prefix_ipv6 p; struct route_table *table; @@ -5559,7 +6271,7 @@ DEFUN (show_ipv6_route_vrf_all_prefix, struct zebra_vrf *zvrf; vrf_iter_t iter; - ret = str2prefix_ipv6 (argv[5]->arg, &p); + ret = str2prefix_ipv6 (argv[idx_ipv6_prefixlen]->arg, &p); if (ret <= 0) { vty_out (vty, "Malformed IPv6 prefix%s", VTY_NEWLINE); @@ -5807,11 +6519,13 @@ DEFUN (ip_zebra_import_table_distance, "Distance for imported routes\n" "Default distance value\n") { + int idx_number = 2; + int idx_number_2 = 4; u_int32_t table_id = 0; int distance = ZEBRA_TABLE_DISTANCE_DEFAULT; if (argc) - VTY_GET_INTEGER("table", table_id, argv[2]->arg); + VTY_GET_INTEGER("table", table_id, argv[idx_number]->arg); if (!is_zebra_valid_kernel_table(table_id)) { @@ -5828,7 +6542,7 @@ DEFUN (ip_zebra_import_table_distance, } if (argc > 1) - VTY_GET_INTEGER_RANGE("distance", distance, argv[4]->arg, 1, 255); + VTY_GET_INTEGER_RANGE("distance", distance, argv[idx_number_2]->arg, 1, 255); return (zebra_import_table(AFI_IP, table_id, distance, NULL, 1)); } @@ -5855,12 +6569,15 @@ DEFUN (ip_zebra_import_table_distance_routemap, "route-map for filtering\n" "route-map name\n") { + int idx_number = 2; + int idx_number_2 = 4; + int idx_word = 6; u_int32_t table_id = 0; int distance = ZEBRA_TABLE_DISTANCE_DEFAULT; const char *rmap_name; if (argc) - VTY_GET_INTEGER("table", table_id, argv[2]->arg); + VTY_GET_INTEGER("table", table_id, argv[idx_number]->arg); if (!is_zebra_valid_kernel_table(table_id)) { @@ -5878,11 +6595,11 @@ DEFUN (ip_zebra_import_table_distance_routemap, if (argc > 2) { - VTY_GET_INTEGER_RANGE("distance", distance, argv[4]->arg, 1, 255); - rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[6]->arg); + VTY_GET_INTEGER_RANGE("distance", distance, argv[idx_number_2]->arg, 1, 255); + rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[idx_word]->arg); } else - rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[4]->arg); + rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[idx_number_2]->arg); return (zebra_import_table(AFI_IP, table_id, distance, rmap_name, 1)); } @@ -5905,10 +6622,11 @@ DEFUN (no_ip_zebra_import_table, "import routes from non-main kernel table\n" "kernel routing table id\n") { + int idx_number = 3; u_int32_t table_id = 0; if (argc) - VTY_GET_INTEGER("table", table_id, argv[3]->arg); + VTY_GET_INTEGER("table", table_id, argv[idx_number]->arg); if (!is_zebra_valid_kernel_table(table_id)) { -- cgit v1.2.3 From 9bf96c846d927972101ddc0a0a8c9e2fc7f3b6c4 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Fri, 23 Sep 2016 21:17:10 +0000 Subject: zebra: zebra_vty.c compiles Signed-off-by: Daniel Walton --- zebra/zebra_vty.c | 377 ++++++++++++++++-------------------------------------- 1 file changed, 111 insertions(+), 266 deletions(-) (limited to 'zebra') diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 99d7bd6fd..17e9538ba 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -2855,26 +2855,19 @@ DEFUN (show_ip_route_vrf, return do_show_ip_route (vty, argv[idx_json]->arg, SAFI_UNICAST, uj); } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ip nht " VRF_CMD_STR, - * SHOW_STR - * IP_STR - * "IP nexthop tracking table\n" - * VRF_CMD_HELP_STR - * - */ DEFUN (show_ip_nht, show_ip_nht_cmd, - "show ip nht", + "show ip nht [vrf NAME]", SHOW_STR IP_STR - "IP nexthop tracking table\n") + "IP nexthop tracking table\n" + VRF_CMD_HELP_STR) { + int idx_vrf = 4; vrf_id_t vrf_id = VRF_DEFAULT; - if (argc) - VRF_GET_ID (vrf_id, argv[0]); + if (argc == 5) + VRF_GET_ID (vrf_id, argv[idx_vrf]->arg); zebra_print_rnh_table(vrf_id, AF_INET, vty, RNH_NEXTHOP_TYPE); return CMD_SUCCESS; @@ -2902,26 +2895,19 @@ DEFUN (show_ip_nht_vrf_all, return CMD_SUCCESS; } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ipv6 nht " VRF_CMD_STR, - * SHOW_STR - * IPV6_STR - * "IPv6 nexthop tracking table\n" - * VRF_CMD_HELP_STR - * - */ DEFUN (show_ipv6_nht, show_ipv6_nht_cmd, - "show ipv6 nht", + "show ipv6 nht [vrf NAME]", SHOW_STR IPV6_STR - "IPv6 nexthop tracking table\n") + "IPv6 nexthop tracking table\n" + VRF_CMD_HELP_STR) { + int idx_vrf = 4; vrf_id_t vrf_id = VRF_DEFAULT; - if (argc) - VRF_GET_ID (vrf_id, argv[0]); + if (argc == 5) + VRF_GET_ID (vrf_id, argv[idx_vrf]->arg); zebra_print_rnh_table(vrf_id, AF_INET6, vty, RNH_NEXTHOP_TYPE); return CMD_SUCCESS; @@ -3011,41 +2997,32 @@ DEFUN (no_ipv6_nht_default_route, return CMD_SUCCESS; } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ip route " VRF_CMD_STR " tag <1-65535>", - * SHOW_STR - * IP_STR - * "IP routing table\n" - * VRF_CMD_HELP_STR - * "Show only routes with tag\n" - * "Tag value\n" - * - */ DEFUN (show_ip_route_tag, show_ip_route_tag_cmd, - "show ip route tag (1-65535)", + "show ip route [vrf NAME] tag (1-65535)", SHOW_STR IP_STR "IP routing table\n" + VRF_CMD_HELP_STR "Show only routes with tag\n" "Tag value\n") { - int idx_number = 4; struct route_table *table; struct route_node *rn; struct rib *rib; int first = 1; u_short tag = 0; vrf_id_t vrf_id = VRF_DEFAULT; - - if (argc > 1) - { - tag = atoi(argv[1]); - VRF_GET_ID (vrf_id, argv[idx_number]->arg); - } - else - tag = atoi(argv[idx_number]->arg); + + if (strcmp(argv[3]->text, "vrf")) + { + VRF_GET_ID (vrf_id, argv[4]->arg); + tag = atoi(argv[6]->arg); + } + else + { + tag = atoi(argv[4]->arg); + } table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); if (! table) @@ -3068,28 +3045,16 @@ DEFUN (show_ip_route_tag, return CMD_SUCCESS; } - -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ip route " VRF_CMD_STR " A.B.C.D/M longer-prefixes", - * SHOW_STR - * IP_STR - * "IP routing table\n" - * VRF_CMD_HELP_STR - * "IP prefix /, e.g., 35.0.0.0/8\n" - * "Show route matching the specified Network/Mask pair only\n" - * - */ DEFUN (show_ip_route_prefix_longer, show_ip_route_prefix_longer_cmd, - "show ip route A.B.C.D/M longer-prefixes", + "show ip route [vrf NAME] A.B.C.D/M longer-prefixes", SHOW_STR IP_STR "IP routing table\n" + VRF_CMD_HELP_STR "IP prefix /, e.g., 35.0.0.0/8\n" "Show route matching the specified Network/Mask pair only\n") { - int idx_ipv4_prefixlen = 3; struct route_table *table; struct route_node *rn; struct rib *rib; @@ -3098,13 +3063,15 @@ DEFUN (show_ip_route_prefix_longer, int first = 1; vrf_id_t vrf_id = VRF_DEFAULT; - if (argc > 1) + if (strcmp(argv[3]->text, "vrf")) { - ret = str2prefix (argv[1], &p); - VRF_GET_ID (vrf_id, argv[idx_ipv4_prefixlen]->arg); + VRF_GET_ID (vrf_id, argv[4]->arg); + ret = str2prefix (argv[5]->arg, &p); } else - ret = str2prefix (argv[idx_ipv4_prefixlen]->arg, &p); + { + ret = str2prefix (argv[3]->arg, &p); + } if (! ret) { @@ -3131,23 +3098,13 @@ DEFUN (show_ip_route_prefix_longer, return CMD_SUCCESS; } - -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ip route " VRF_CMD_STR " supernets-only", - * SHOW_STR - * IP_STR - * "IP routing table\n" - * VRF_CMD_HELP_STR - * "Show supernet entries only\n" - * - */ DEFUN (show_ip_route_supernets, show_ip_route_supernets_cmd, - "show ip route supernets-only", + "show ip route [vrf NAME] supernets-only", SHOW_STR IP_STR "IP routing table\n" + VRF_CMD_HELP_STR "Show supernet entries only\n") { struct route_table *table; @@ -3157,8 +3114,8 @@ DEFUN (show_ip_route_supernets, int first = 1; vrf_id_t vrf_id = VRF_DEFAULT; - if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]); + if (strcmp(argv[3]->text, "vrf")) + VRF_GET_ID (vrf_id, argv[4]->arg); table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); if (! table) @@ -3185,23 +3142,13 @@ DEFUN (show_ip_route_supernets, return CMD_SUCCESS; } - -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ip route " VRF_CMD_STR " " QUAGGA_IP_REDIST_STR_ZEBRA, - * SHOW_STR - * IP_STR - * "IP routing table\n" - * VRF_CMD_HELP_STR - * QUAGGA_IP_REDIST_HELP_STR_ZEBRA - * - */ DEFUN (show_ip_route_protocol, show_ip_route_protocol_cmd, - "show ip route " QUAGGA_IP_REDIST_STR_ZEBRA, + "show ip route [vrf NAME] " QUAGGA_IP_REDIST_STR_ZEBRA, SHOW_STR IP_STR "IP routing table\n" + VRF_CMD_HELP_STR QUAGGA_IP_REDIST_HELP_STR_ZEBRA) { int type; @@ -3211,13 +3158,15 @@ DEFUN (show_ip_route_protocol, int first = 1; vrf_id_t vrf_id = VRF_DEFAULT; - if (argc > 1) + if (strcmp(argv[3]->text, "vrf")) { - type = proto_redistnum (AFI_IP, argv[1]); + type = proto_redistnum (AFI_IP, argv[5]->arg); VRF_GET_ID (vrf_id, argv[4]->arg); - } + } else - type = proto_redistnum (AFI_IP, argv[4]->arg); + { + type = proto_redistnum (AFI_IP, argv[3]->arg); + } if (type < 0) { @@ -3282,38 +3231,30 @@ DEFUN (show_ip_route_ospf_instance, return CMD_SUCCESS; } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ip route " VRF_CMD_STR " A.B.C.D", - * SHOW_STR - * IP_STR - * "IP routing table\n" - * VRF_CMD_HELP_STR - * "Network in the IP routing table to display\n" - * - */ DEFUN (show_ip_route_addr, show_ip_route_addr_cmd, - "show ip route A.B.C.D", + "show ip route [vrf NAME] A.B.C.D", SHOW_STR IP_STR "IP routing table\n" + VRF_CMD_HELP_STR "Network in the IP routing table to display\n") { - int idx_ipv4 = 3; int ret; struct prefix_ipv4 p; struct route_table *table; struct route_node *rn; vrf_id_t vrf_id = VRF_DEFAULT; - if (argc > 1) + if (strcmp(argv[3]->text, "vrf")) { - VRF_GET_ID (vrf_id, argv[idx_ipv4]->arg); - ret = str2prefix_ipv4 (argv[1], &p); + VRF_GET_ID (vrf_id, argv[4]->arg); + ret = str2prefix_ipv4 (argv[5]->arg, &p); } else - ret = str2prefix_ipv4 (argv[idx_ipv4]->arg, &p); + { + ret = str2prefix_ipv4 (argv[3]->arg, &p); + } if (ret <= 0) { @@ -3339,39 +3280,30 @@ DEFUN (show_ip_route_addr, return CMD_SUCCESS; } - -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ip route " VRF_CMD_STR " A.B.C.D/M", - * SHOW_STR - * IP_STR - * "IP routing table\n" - * VRF_CMD_HELP_STR - * "IP prefix /, e.g., 35.0.0.0/8\n" - * - */ DEFUN (show_ip_route_prefix, show_ip_route_prefix_cmd, - "show ip route A.B.C.D/M", + "show ip route [vrf NAME] A.B.C.D/M", SHOW_STR IP_STR "IP routing table\n" + VRF_CMD_HELP_STR "IP prefix /, e.g., 35.0.0.0/8\n") { - int idx_ipv4_prefixlen = 3; int ret; struct prefix_ipv4 p; struct route_table *table; struct route_node *rn; vrf_id_t vrf_id = VRF_DEFAULT; - if (argc > 1) + if (strcmp(argv[3]->text, "vrf")) { - VRF_GET_ID (vrf_id, argv[idx_ipv4_prefixlen]->arg); - ret = str2prefix_ipv4 (argv[1], &p); + VRF_GET_ID (vrf_id, argv[4]->arg); + ret = str2prefix_ipv4 (argv[5]->arg, &p); } else - ret = str2prefix_ipv4 (argv[idx_ipv4_prefixlen]->arg, &p); + { + ret = str2prefix_ipv4 (argv[3]->arg, &p); + } if (ret <= 0) { @@ -3548,29 +3480,20 @@ vty_show_ip_route_summary_prefix (struct vty *vty, struct route_table *table) } /* Show route summary. */ -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ip route " VRF_CMD_STR " summary", - * SHOW_STR - * IP_STR - * "IP routing table\n" - * VRF_CMD_HELP_STR - * "Summary of all routes\n" - * - */ DEFUN (show_ip_route_summary, show_ip_route_summary_cmd, - "show ip route summary", + "show ip route [vrf NAME] summary", SHOW_STR IP_STR "IP routing table\n" + VRF_CMD_HELP_STR "Summary of all routes\n") { struct route_table *table; vrf_id_t vrf_id = VRF_DEFAULT; - if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]); + if (strcmp(argv[3]->text, "vrf")) + VRF_GET_ID (vrf_id, argv[4]->arg); table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); if (! table) @@ -3583,31 +3506,21 @@ DEFUN (show_ip_route_summary, /* Show route summary prefix. */ -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ip route " VRF_CMD_STR " summary prefix", - * SHOW_STR - * IP_STR - * "IP routing table\n" - * VRF_CMD_HELP_STR - * "Summary of all routes\n" - * "Prefix routes\n" - * - */ DEFUN (show_ip_route_summary_prefix, show_ip_route_summary_prefix_cmd, - "show ip route summary prefix", + "show ip route [vrf NAME] summary prefix", SHOW_STR IP_STR "IP routing table\n" + VRF_CMD_HELP_STR "Summary of all routes\n" "Prefix routes\n") { struct route_table *table; vrf_id_t vrf_id = VRF_DEFAULT; - if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]); + if (strcmp(argv[3]->text, "vrf")) + VRF_GET_ID (vrf_id, argv[4]->arg); table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); if (! table) @@ -5580,28 +5493,16 @@ DEFUN (show_ipv6_route, return CMD_SUCCESS; } - -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ipv6 route " VRF_CMD_STR " tag <1-65535>", - * SHOW_STR - * IP_STR - * "IPv6 routing table\n" - * VRF_CMD_HELP_STR - * "Show only routes with tag\n" - * "Tag value\n" - * - */ DEFUN (show_ipv6_route_tag, show_ipv6_route_tag_cmd, - "show ipv6 route tag (1-65535)", + "show ipv6 route [vrf NAME] tag (1-65535)", SHOW_STR IP_STR "IPv6 routing table\n" + VRF_CMD_HELP_STR "Show only routes with tag\n" "Tag value\n") { - int idx_number = 4; struct route_table *table; struct route_node *rn; struct rib *rib; @@ -5609,13 +5510,15 @@ DEFUN (show_ipv6_route_tag, u_short tag = 0; vrf_id_t vrf_id = VRF_DEFAULT; - if (argc > 1) + if (strcmp(argv[3]->text, "vrf")) { - VRF_GET_ID (vrf_id, argv[idx_number]->arg); - tag = atoi(argv[1]); + VRF_GET_ID (vrf_id, argv[4]->arg); + tag = atoi(argv[6]->arg); } else - tag = atoi(argv[idx_number]->arg); + { + tag = atoi(argv[4]->arg); + } table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id); if (! table) @@ -5638,28 +5541,16 @@ DEFUN (show_ipv6_route_tag, return CMD_SUCCESS; } - -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ipv6 route " VRF_CMD_STR " X:X::X:X/M longer-prefixes", - * SHOW_STR - * IP_STR - * "IPv6 routing table\n" - * VRF_CMD_HELP_STR - * "IPv6 prefix\n" - * "Show route matching the specified Network/Mask pair only\n" - * - */ DEFUN (show_ipv6_route_prefix_longer, show_ipv6_route_prefix_longer_cmd, - "show ipv6 route X:X::X:X/M longer-prefixes", + "show ipv6 route [vrf NAME] X:X::X:X/M longer-prefixes", SHOW_STR IP_STR "IPv6 routing table\n" + VRF_CMD_HELP_STR "IPv6 prefix\n" "Show route matching the specified Network/Mask pair only\n") { - int idx_ipv6_prefixlen = 3; struct route_table *table; struct route_node *rn; struct rib *rib; @@ -5668,13 +5559,15 @@ DEFUN (show_ipv6_route_prefix_longer, int first = 1; vrf_id_t vrf_id = VRF_DEFAULT; - if (argc > 1) + if (strcmp(argv[3]->text, "vrf")) { - VRF_GET_ID (vrf_id, argv[idx_ipv6_prefixlen]->arg); - ret = str2prefix (argv[1], &p); + VRF_GET_ID (vrf_id, argv[4]->arg); + ret = str2prefix (argv[5]->arg, &p); } else - ret = str2prefix (argv[idx_ipv6_prefixlen]->arg, &p); + { + ret = str2prefix (argv[3]->arg, &p); + } if (! ret) { @@ -5761,39 +5654,30 @@ DEFUN (show_ipv6_route_protocol, return CMD_SUCCESS; } - -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ipv6 route " VRF_CMD_STR " X:X::X:X", - * SHOW_STR - * IP_STR - * "IPv6 routing table\n" - * VRF_CMD_HELP_STR - * "IPv6 Address\n" - * - */ DEFUN (show_ipv6_route_addr, show_ipv6_route_addr_cmd, - "show ipv6 route X:X::X:X", + "show ipv6 route [vrf NAME] X:X::X:X", SHOW_STR IP_STR "IPv6 routing table\n" + VRF_CMD_HELP_STR "IPv6 Address\n") { - int idx_ipv6 = 3; int ret; struct prefix_ipv6 p; struct route_table *table; struct route_node *rn; vrf_id_t vrf_id = VRF_DEFAULT; - if (argc > 1 ) + if (strcmp(argv[3]->text, "vrf")) { - VRF_GET_ID (vrf_id, argv[idx_ipv6]->arg); - ret = str2prefix_ipv6 (argv[1], &p); + VRF_GET_ID (vrf_id, argv[4]->arg); + ret = str2prefix_ipv6 (argv[5]->arg, &p); } else - ret = str2prefix_ipv6 (argv[idx_ipv6]->arg, &p); + { + ret = str2prefix_ipv6 (argv[3]->arg, &p); + } if (ret <= 0) { @@ -5819,39 +5703,28 @@ DEFUN (show_ipv6_route_addr, return CMD_SUCCESS; } - -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ipv6 route " VRF_CMD_STR " X:X::X:X/M ", - * SHOW_STR - * IP_STR - * "IPv6 routing table\n" - * VRF_CMD_HELP_STR - * "IPv6 prefix\n" - * - */ DEFUN (show_ipv6_route_prefix, show_ipv6_route_prefix_cmd, - "show ipv6 route X:X::X:X/M", + "show ipv6 route [vrf NAME] X:X::X:X/M", SHOW_STR IP_STR "IPv6 routing table\n" + VRF_CMD_HELP_STR "IPv6 prefix\n") { - int idx_ipv6_prefixlen = 3; int ret; struct prefix_ipv6 p; struct route_table *table; struct route_node *rn; vrf_id_t vrf_id = VRF_DEFAULT; - if (argc > 1) + if (strcmp(argv[3]->text, "vrf")) { - VRF_GET_ID (vrf_id, argv[idx_ipv6_prefixlen]->arg); - ret = str2prefix_ipv6 (argv[1], &p); + VRF_GET_ID (vrf_id, argv[4]->arg); + ret = str2prefix_ipv6 (argv[5]->arg, &p); } else - ret = str2prefix_ipv6 (argv[idx_ipv6_prefixlen]->arg, &p); + ret = str2prefix_ipv6 (argv[3]->arg, &p); if (ret <= 0) { @@ -5879,29 +5752,20 @@ DEFUN (show_ipv6_route_prefix, /* Show route summary. */ -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ipv6 route " VRF_CMD_STR " summary", - * SHOW_STR - * IP_STR - * "IPv6 routing table\n" - * VRF_CMD_HELP_STR - * "Summary of all IPv6 routes\n" - * - */ DEFUN (show_ipv6_route_summary, show_ipv6_route_summary_cmd, - "show ipv6 route summary", + "show ipv6 route [vrf NAME] summary", SHOW_STR IP_STR "IPv6 routing table\n" + VRF_CMD_HELP_STR "Summary of all IPv6 routes\n") { struct route_table *table; vrf_id_t vrf_id = VRF_DEFAULT; - if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]); + if (strcmp(argv[3]->text, "vrf")) + VRF_GET_ID (vrf_id, argv[4]->arg); table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id); if (! table) @@ -5914,31 +5778,21 @@ DEFUN (show_ipv6_route_summary, /* Show ipv6 route summary prefix. */ -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ipv6 route " VRF_CMD_STR " summary prefix", - * SHOW_STR - * IP_STR - * "IPv6 routing table\n" - * VRF_CMD_HELP_STR - * "Summary of all IPv6 routes\n" - * "Prefix routes\n" - * - */ DEFUN (show_ipv6_route_summary_prefix, show_ipv6_route_summary_prefix_cmd, - "show ipv6 route summary prefix", + "show ipv6 route [vrf NAME] summary prefix", SHOW_STR IP_STR "IPv6 routing table\n" + VRF_CMD_HELP_STR "Summary of all IPv6 routes\n" "Prefix routes\n") { struct route_table *table; vrf_id_t vrf_id = VRF_DEFAULT; - if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]); + if (strcmp(argv[3]->text, "vrf")) + VRF_GET_ID (vrf_id, argv[4]->arg); table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id); if (! table) @@ -5954,22 +5808,13 @@ DEFUN (show_ipv6_route_summary_prefix, * Show IPv6 mroute command.Used to dump * the Multicast routing table. */ - -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ipv6 mroute " VRF_CMD_STR, - * SHOW_STR - * IP_STR - * "IPv6 Multicast routing table\n" - * VRF_CMD_HELP_STR - * - */ DEFUN (show_ipv6_mroute, show_ipv6_mroute_cmd, - "show ipv6 mroute", + "show ipv6 mroute [vrf NAME]", SHOW_STR IP_STR - "IPv6 Multicast routing table\n") + "IPv6 Multicast routing table\n" + VRF_CMD_HELP_STR) { struct route_table *table; struct route_node *rn; @@ -5977,8 +5822,8 @@ DEFUN (show_ipv6_mroute, int first = 1; vrf_id_t vrf_id = VRF_DEFAULT; - if (argc > 0) - VRF_GET_ID (vrf_id, argv[0]); + if (strcmp(argv[3]->text, "vrf")) + VRF_GET_ID (vrf_id, argv[4]->arg); table = zebra_vrf_table (AFI_IP6, SAFI_MULTICAST, vrf_id); if (! table) -- cgit v1.2.3 From 412e5cd94f087fbb68a6c8805a8465f526e45bee Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Fri, 23 Sep 2016 22:12:11 +0000 Subject: lib: added strmatch() Signed-off-by: Daniel Walton --- lib/str.c | 8 ++++++++ lib/str.h | 2 ++ zebra/zebra_vty.c | 30 +++++++++++++++--------------- 3 files changed, 25 insertions(+), 15 deletions(-) (limited to 'zebra') diff --git a/lib/str.c b/lib/str.c index 16f759c07..cfdb6e024 100644 --- a/lib/str.c +++ b/lib/str.c @@ -133,3 +133,11 @@ strndup (const char *s, size_t maxlen) return (char *) memcpy (new, s, len); } #endif + +extern int +strmatch (const char *str1, const char *str2) +{ + if (!strcmp(str1, str2)) + return 1; + return 0; +} diff --git a/lib/str.h b/lib/str.h index 7b83fe1cb..dc8e7e5d6 100644 --- a/lib/str.h +++ b/lib/str.h @@ -29,5 +29,7 @@ extern size_t strnlen(const char *s, size_t maxlen); extern char * strndup (const char *, size_t); #endif +extern int strmatch (const char *, const char *); + #endif /* _ZEBRA_STR_H */ diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 17e9538ba..ebe0ca405 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -3014,7 +3014,7 @@ DEFUN (show_ip_route_tag, u_short tag = 0; vrf_id_t vrf_id = VRF_DEFAULT; - if (strcmp(argv[3]->text, "vrf")) + if (strmatch(argv[3]->text, "vrf")) { VRF_GET_ID (vrf_id, argv[4]->arg); tag = atoi(argv[6]->arg); @@ -3063,7 +3063,7 @@ DEFUN (show_ip_route_prefix_longer, int first = 1; vrf_id_t vrf_id = VRF_DEFAULT; - if (strcmp(argv[3]->text, "vrf")) + if (strmatch(argv[3]->text, "vrf")) { VRF_GET_ID (vrf_id, argv[4]->arg); ret = str2prefix (argv[5]->arg, &p); @@ -3114,7 +3114,7 @@ DEFUN (show_ip_route_supernets, int first = 1; vrf_id_t vrf_id = VRF_DEFAULT; - if (strcmp(argv[3]->text, "vrf")) + if (strmatch(argv[3]->text, "vrf")) VRF_GET_ID (vrf_id, argv[4]->arg); table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); @@ -3158,7 +3158,7 @@ DEFUN (show_ip_route_protocol, int first = 1; vrf_id_t vrf_id = VRF_DEFAULT; - if (strcmp(argv[3]->text, "vrf")) + if (strmatch(argv[3]->text, "vrf")) { type = proto_redistnum (AFI_IP, argv[5]->arg); VRF_GET_ID (vrf_id, argv[4]->arg); @@ -3246,7 +3246,7 @@ DEFUN (show_ip_route_addr, struct route_node *rn; vrf_id_t vrf_id = VRF_DEFAULT; - if (strcmp(argv[3]->text, "vrf")) + if (strmatch(argv[3]->text, "vrf")) { VRF_GET_ID (vrf_id, argv[4]->arg); ret = str2prefix_ipv4 (argv[5]->arg, &p); @@ -3295,7 +3295,7 @@ DEFUN (show_ip_route_prefix, struct route_node *rn; vrf_id_t vrf_id = VRF_DEFAULT; - if (strcmp(argv[3]->text, "vrf")) + if (strmatch(argv[3]->text, "vrf")) { VRF_GET_ID (vrf_id, argv[4]->arg); ret = str2prefix_ipv4 (argv[5]->arg, &p); @@ -3492,7 +3492,7 @@ DEFUN (show_ip_route_summary, struct route_table *table; vrf_id_t vrf_id = VRF_DEFAULT; - if (strcmp(argv[3]->text, "vrf")) + if (strmatch(argv[3]->text, "vrf")) VRF_GET_ID (vrf_id, argv[4]->arg); table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); @@ -3519,7 +3519,7 @@ DEFUN (show_ip_route_summary_prefix, struct route_table *table; vrf_id_t vrf_id = VRF_DEFAULT; - if (strcmp(argv[3]->text, "vrf")) + if (strmatch(argv[3]->text, "vrf")) VRF_GET_ID (vrf_id, argv[4]->arg); table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); @@ -5510,7 +5510,7 @@ DEFUN (show_ipv6_route_tag, u_short tag = 0; vrf_id_t vrf_id = VRF_DEFAULT; - if (strcmp(argv[3]->text, "vrf")) + if (strmatch(argv[3]->text, "vrf")) { VRF_GET_ID (vrf_id, argv[4]->arg); tag = atoi(argv[6]->arg); @@ -5559,7 +5559,7 @@ DEFUN (show_ipv6_route_prefix_longer, int first = 1; vrf_id_t vrf_id = VRF_DEFAULT; - if (strcmp(argv[3]->text, "vrf")) + if (strmatch(argv[3]->text, "vrf")) { VRF_GET_ID (vrf_id, argv[4]->arg); ret = str2prefix (argv[5]->arg, &p); @@ -5669,7 +5669,7 @@ DEFUN (show_ipv6_route_addr, struct route_node *rn; vrf_id_t vrf_id = VRF_DEFAULT; - if (strcmp(argv[3]->text, "vrf")) + if (strmatch(argv[3]->text, "vrf")) { VRF_GET_ID (vrf_id, argv[4]->arg); ret = str2prefix_ipv6 (argv[5]->arg, &p); @@ -5718,7 +5718,7 @@ DEFUN (show_ipv6_route_prefix, struct route_node *rn; vrf_id_t vrf_id = VRF_DEFAULT; - if (strcmp(argv[3]->text, "vrf")) + if (strmatch(argv[3]->text, "vrf")) { VRF_GET_ID (vrf_id, argv[4]->arg); ret = str2prefix_ipv6 (argv[5]->arg, &p); @@ -5764,7 +5764,7 @@ DEFUN (show_ipv6_route_summary, struct route_table *table; vrf_id_t vrf_id = VRF_DEFAULT; - if (strcmp(argv[3]->text, "vrf")) + if (strmatch(argv[3]->text, "vrf")) VRF_GET_ID (vrf_id, argv[4]->arg); table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id); @@ -5791,7 +5791,7 @@ DEFUN (show_ipv6_route_summary_prefix, struct route_table *table; vrf_id_t vrf_id = VRF_DEFAULT; - if (strcmp(argv[3]->text, "vrf")) + if (strmatch(argv[3]->text, "vrf")) VRF_GET_ID (vrf_id, argv[4]->arg); table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id); @@ -5822,7 +5822,7 @@ DEFUN (show_ipv6_mroute, int first = 1; vrf_id_t vrf_id = VRF_DEFAULT; - if (strcmp(argv[3]->text, "vrf")) + if (strmatch(argv[3]->text, "vrf")) VRF_GET_ID (vrf_id, argv[4]->arg); table = zebra_vrf_table (AFI_IP6, SAFI_MULTICAST, vrf_id); -- cgit v1.2.3 From 7757e5e1aea9ba91b460a2c5cac03456a5b90529 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Sat, 24 Sep 2016 17:42:34 +0000 Subject: zebra: fix zebra_routemap.c checkme's Signed-off-by: Quentin Young --- zebra/zebra_routemap.c | 434 ++++++++++++++++--------------------------------- 1 file changed, 141 insertions(+), 293 deletions(-) (limited to 'zebra') diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c index 9ca4cd947..ed90042b8 100644 --- a/zebra/zebra_routemap.c +++ b/zebra/zebra_routemap.c @@ -306,26 +306,16 @@ DEFUN (match_interface, RMAP_EVENT_MATCH_ADDED); } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no match interface WORD", - * NO_STR - * MATCH_STR - * "Match first hop interface of route\n" - * "Interface name\n" - * - */ DEFUN (no_match_interface, no_match_interface_cmd, - "no match interface", + "no match interface [WORD]", NO_STR MATCH_STR - "Match first hop interface of route\n") + "Match first hop interface of route\n" + "Interface name\n") { - if (argc == 0) - return zebra_route_match_delete (vty, vty->index, "interface", NULL, RMAP_EVENT_MATCH_DELETED); - - return zebra_route_match_delete (vty, vty->index, "interface", argv[0], RMAP_EVENT_MATCH_DELETED); + char *iface = (argc == 4) ? argv[3]->arg : NULL; + return zebra_route_match_delete (vty, vty->index, "interface", iface, RMAP_EVENT_MATCH_DELETED); } @@ -341,27 +331,15 @@ DEFUN (match_tag, RMAP_EVENT_MATCH_ADDED); } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no match tag <1-65535>", - * NO_STR - * MATCH_STR - * "Match tag of route\n" - * - */ DEFUN (no_match_tag, no_match_tag_cmd, - "no match tag", + "no match tag [(1-65535)]", NO_STR MATCH_STR "Match tag of route\n") { - if (argc == 0) - return zebra_route_match_delete (vty, vty->index, "tag", NULL, - RMAP_EVENT_MATCH_DELETED); - - return zebra_route_match_delete (vty, vty->index, "tag", argv[0], - RMAP_EVENT_MATCH_DELETED); + char *tag = (argc == 4) ? argv[3]->arg : NULL; + return zebra_route_match_delete (vty, vty->index, "tag", tag, RMAP_EVENT_MATCH_DELETED); } @@ -379,32 +357,19 @@ DEFUN (match_ip_next_hop, return zebra_route_match_add (vty, vty->index, "ip next-hop", argv[idx_acl]->arg, RMAP_EVENT_FILTER_ADDED); } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no match ip next-hop (<1-199>|<1300-2699>|WORD)", - * NO_STR - * MATCH_STR - * IP_STR - * "Match next-hop address of route\n" - * "IP access-list number\n" - * "IP access-list number (expanded range)\n" - * "IP Access-list name\n" - * - */ DEFUN (no_match_ip_next_hop, no_match_ip_next_hop_cmd, - "no match ip next-hop", + "no match ip next-hop [<(1-199)|(1300-2699)|WORD>]", NO_STR MATCH_STR IP_STR - "Match next-hop address of route\n") + "Match next-hop address of route\n" + "IP access-list number\n" + "IP access-list number (expanded range)\n" + "IP Access-list name\n") { - if (argc == 0) - return zebra_route_match_delete (vty, vty->index, "ip next-hop", NULL, - RMAP_EVENT_FILTER_DELETED); - - return zebra_route_match_delete (vty, vty->index, "ip next-hop", argv[0], - RMAP_EVENT_FILTER_DELETED); + char *al = (argc == 5) ? argv[4]->arg : NULL; + return zebra_route_match_delete (vty, vty->index, "ip next-hop", al, RMAP_EVENT_FILTER_DELETED); } @@ -422,33 +387,19 @@ DEFUN (match_ip_next_hop_prefix_list, argv[idx_word]->arg, RMAP_EVENT_PLIST_ADDED); } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no match ip next-hop prefix-list WORD", - * NO_STR - * MATCH_STR - * IP_STR - * "Match next-hop address of route\n" - * "Match entries of prefix-lists\n" - * "IP prefix-list name\n" - * - */ DEFUN (no_match_ip_next_hop_prefix_list, no_match_ip_next_hop_prefix_list_cmd, - "no match ip next-hop prefix-list", + "no match ip next-hop prefix-list [WORD]", NO_STR MATCH_STR IP_STR "Match next-hop address of route\n" - "Match entries of prefix-lists\n") + "Match entries of prefix-lists\n" + "IP prefix-list name\n") { - if (argc == 0) - return zebra_route_match_delete (vty, vty->index, - "ip next-hop prefix-list", NULL, - RMAP_EVENT_PLIST_DELETED); - + char *plist = (argc == 6) ? argv[5]->arg : NULL; return zebra_route_match_delete (vty, vty->index, - "ip next-hop prefix-list", argv[0], + "ip next-hop prefix-list", plist, RMAP_EVENT_PLIST_DELETED); } @@ -469,32 +420,19 @@ DEFUN (match_ip_address, RMAP_EVENT_FILTER_ADDED); } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no match ip address (<1-199>|<1300-2699>|WORD)", - * NO_STR - * MATCH_STR - * IP_STR - * "Match address of route\n" - * "IP access-list number\n" - * "IP access-list number (expanded range)\n" - * "IP Access-list name\n" - * - */ DEFUN (no_match_ip_address, no_match_ip_address_cmd, - "no match ip address", + "no match ip address [<(1-199)|(1300-2699)|WORD>]", NO_STR MATCH_STR IP_STR - "Match address of route\n") + "Match address of route\n" + "IP access-list number\n" + "IP access-list number (expanded range)\n" + "IP Access-list name\n") { - if (argc == 0) - return zebra_route_match_delete (vty, vty->index, "ip address", NULL, - RMAP_EVENT_FILTER_DELETED); - - return zebra_route_match_delete (vty, vty->index, "ip address", argv[0], - RMAP_EVENT_FILTER_DELETED); + char *al = (argc == 5) ? argv[4]->arg : NULL; + return zebra_route_match_delete (vty, vty->index, "ip address", al, RMAP_EVENT_FILTER_DELETED); } @@ -512,40 +450,26 @@ DEFUN (match_ip_address_prefix_list, argv[idx_word]->arg, RMAP_EVENT_PLIST_ADDED); } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no match ip address prefix-list WORD", - * NO_STR - * MATCH_STR - * IP_STR - * "Match address of route\n" - * "Match entries of prefix-lists\n" - * "IP prefix-list name\n" - * - */ DEFUN (no_match_ip_address_prefix_list, no_match_ip_address_prefix_list_cmd, - "no match ip address prefix-list", + "no match ip address prefix-list [WORD]", NO_STR MATCH_STR IP_STR "Match address of route\n" - "Match entries of prefix-lists\n") + "Match entries of prefix-lists\n" + "IP prefix-list name\n") { - if (argc == 0) - return zebra_route_match_delete (vty, vty->index, - "ip address prefix-list", NULL, - RMAP_EVENT_PLIST_DELETED); - + char *plist = (argc == 6) ? argv[5]->arg : NULL; return zebra_route_match_delete (vty, vty->index, - "ip address prefix-list", argv[0], + "ip address prefix-list", plist, RMAP_EVENT_PLIST_DELETED); } DEFUN (match_ip_address_prefix_len, match_ip_address_prefix_len_cmd, - "match ip address prefix-len NUMBER", + "match ip address prefix-len (0-32)", MATCH_STR IP_STR "Match prefix length of ip address\n" @@ -553,42 +477,28 @@ DEFUN (match_ip_address_prefix_len, "Prefix length\n") { return zebra_route_match_add (vty, vty->index, "ip address prefix-len", - argv[0], RMAP_EVENT_MATCH_ADDED); + argv[4]->arg, RMAP_EVENT_MATCH_ADDED); } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no match ip address prefix-len NUMBER", - * NO_STR - * MATCH_STR - * IP_STR - * "Match prefixlen of ip address of route\n" - * "prefix length of ip address\n" - * - */ DEFUN (no_match_ip_address_prefix_len, no_match_ip_address_prefix_len_cmd, - "no match ip address prefix-len", + "no match ip address prefix-len [(0-32)]", NO_STR MATCH_STR IP_STR "Match prefixlen of ip address of route\n" - "prefix length of ip address\n") + "Prefix length\n") { - if (argc == 0) - return zebra_route_match_delete (vty, vty->index, - "ip address prefix-len", NULL, - RMAP_EVENT_MATCH_DELETED); - + char *plen = (argc == 6) ? argv[5]->arg : NULL; return zebra_route_match_delete (vty, vty->index, - "ip address prefix-len", argv[0], + "ip address prefix-len", plen, RMAP_EVENT_MATCH_DELETED); } DEFUN (match_ip_nexthop_prefix_len, match_ip_nexthop_prefix_len_cmd, - "match ip next-hop prefix-len NUMBER", + "match ip next-hop prefix-len (0-32)", MATCH_STR IP_STR "Match prefixlen of nexthop ip address\n" @@ -596,33 +506,22 @@ DEFUN (match_ip_nexthop_prefix_len, "Prefix length\n") { return zebra_route_match_add (vty, vty->index, "ip next-hop prefix-len", - argv[0], RMAP_EVENT_MATCH_ADDED); + argv[4]->arg, RMAP_EVENT_MATCH_ADDED); } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no match ip next-hop prefix-len NUMBER", - * MATCH_STR - * "Match prefixlen of ip address of route\n" - * "prefix length of ip address\n" - * - */ DEFUN (no_match_ip_nexthop_prefix_len, no_match_ip_nexthop_prefix_len_cmd, - "no match ip next-hop prefix-len", + "no match ip next-hop prefix-len [(0-32)]", NO_STR MATCH_STR IP_STR "Match prefixlen of nexthop ip address\n" - "Match prefix length of nexthop\n") + "Match prefix length of nexthop\n" + "Prefix length\n") { - if (argc == 0) - return zebra_route_match_delete (vty, vty->index, - "ip next-hop prefix-len", NULL, - RMAP_EVENT_MATCH_DELETED); - + char *plen = (argc == 6) ? argv[5]->arg : NULL; return zebra_route_match_delete (vty, vty->index, - "ip next-hop prefix-len", argv[0], + "ip next-hop prefix-len", plen, RMAP_EVENT_MATCH_DELETED); } @@ -633,43 +532,28 @@ DEFUN (match_source_protocol, MATCH_STR "Match protocol via which the route was learnt\n") { - int idx_protocol = 2; + char *proto = argv[2]->text; int i; - i = proto_name2num(argv[idx_protocol]->arg); + i = proto_name2num(proto); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[idx_protocol]->arg ? argv[idx_protocol]->arg : "", - VTY_NEWLINE); + vty_out (vty, "invalid protocol name \"%s\"%s", proto, VTY_NEWLINE); return CMD_WARNING; } - return zebra_route_match_add (vty, vty->index, "source-protocol", - argv[idx_protocol]->arg, RMAP_EVENT_MATCH_ADDED); + return zebra_route_match_add (vty, vty->index, "source-protocol", proto, RMAP_EVENT_MATCH_ADDED); } DEFUN (no_match_source_protocol, no_match_source_protocol_cmd, - "no match source-protocol ", + "no match source-protocol []", NO_STR MATCH_STR - "No match protocol via which the route was learnt\n") + "No match protocol via which the route was learnt\n" + ) { - int idx_protocol = 3; - int i; - - if (argc >= 1) - { - i = proto_name2num(argv[idx_protocol]->arg); - if (i < 0) - { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[idx_protocol]->arg ? argv[idx_protocol]->arg : "", - VTY_NEWLINE); - return CMD_WARNING; - } - } - return zebra_route_match_delete (vty, vty->index, - "source-protocol", argv[idx_protocol]->arg ? argv[idx_protocol]->arg : NULL, - RMAP_EVENT_MATCH_DELETED); + char *proto = (argc == 4) ? argv[3]->text : NULL; + return zebra_route_match_delete (vty, vty->index, "source-protocol", proto, RMAP_EVENT_MATCH_DELETED); } /* set functions */ @@ -709,8 +593,8 @@ DEFUN (set_src, if (!zebra_check_addr(&p)) { - vty_out (vty, "%% not a valid source IPv4/v6 address%s", VTY_NEWLINE); - return CMD_WARNING; + vty_out (vty, "%% not a valid source IPv4/v6 address%s", VTY_NEWLINE); + return CMD_WARNING; } for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter)) @@ -736,16 +620,13 @@ DEFUN (set_src, DEFUN (no_set_src, no_set_src_cmd, - "no set src [A.B.C.D|X:X::X:X]", + "no set src []", NO_STR SET_STR "Source address for route\n") { - int idx_ip = 3; - if (argc == 0) - return zebra_route_set_delete (vty, vty->index, "src", NULL); - - return zebra_route_set_delete (vty, vty->index, "src", argv[idx_ip]->arg); + char *ip = (argc == 4) ? argv[3]->arg : NULL; + return zebra_route_set_delete (vty, vty->index, "src", ip); } DEFUN (zebra_route_map_timer, @@ -763,21 +644,14 @@ DEFUN (zebra_route_map_timer, return (CMD_SUCCESS); } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no zebra route-map delay-timer <0-600>", - * NO_STR - * "Time to wait before route-map updates are processed\n" - * "Reset delay-timer to default value, 30 secs\n" - * "0 means event-driven updates are disabled\n" - * - */ DEFUN (no_zebra_route_map_timer, no_zebra_route_map_timer_cmd, - "no zebra route-map delay-timer", + "no zebra route-map delay-timer [(0-600)]", NO_STR "Time to wait before route-map updates are processed\n" - "Reset delay-timer to default value, 30 secs\n") + "Reset delay-timer to default value, 30 secs\n" + "0 means event-driven updates are disabled\n") + { zebra_route_map_set_delay_timer(ZEBRA_RMAP_DEFAULT_UPDATE_TIMER); @@ -791,81 +665,75 @@ DEFUN (ip_protocol, IP_STR "Filter routing info exchanged between zebra and protocol\n" QUAGGA_IP_PROTOCOL_MAP_HELP_STR_ZEBRA + "Specify route-map\n" "Route map name\n") { - int idx_protocol = 2; + char *proto = argv[2]->text; + char *rmap = argv[4]->arg; int i; - if (strcasecmp(argv[idx_protocol]->arg, "any") == 0) + if (strcasecmp(proto, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[idx_protocol]->arg); + i = proto_name2num(proto); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[idx_protocol]->arg ? argv[idx_protocol]->arg : "", - VTY_NEWLINE); + vty_out (vty, "invalid protocol name \"%s\"%s", proto, VTY_NEWLINE); return CMD_WARNING; } if (proto_rm[AFI_IP][i]) { - if (strcmp(proto_rm[AFI_IP][i], argv[1]) == 0) + if (strcmp(proto_rm[AFI_IP][i], rmap) == 0) return CMD_SUCCESS; XFREE (MTYPE_ROUTE_MAP_NAME, proto_rm[AFI_IP][i]); } - proto_rm[AFI_IP][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]); + proto_rm[AFI_IP][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, rmap); if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug ("%u: IPv4 Routemap config for protocol %s, scheduling RIB processing", - VRF_DEFAULT, argv[idx_protocol]->arg); + VRF_DEFAULT, proto); rib_update(VRF_DEFAULT, RIB_UPDATE_RMAP_CHANGE); return CMD_SUCCESS; } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no ip protocol " QUAGGA_IP_PROTOCOL_MAP_STR_ZEBRA " route-map ROUTE-MAP", - * NO_STR - * IP_STR - * "Stop filtering routing info between zebra and protocol\n" - * QUAGGA_IP_PROTOCOL_MAP_HELP_STR_ZEBRA - * "route map name" - * - */ DEFUN (no_ip_protocol, no_ip_protocol_cmd, - "no ip protocol " QUAGGA_IP_PROTOCOL_MAP_STR_ZEBRA, + "no ip protocol " QUAGGA_IP_PROTOCOL_MAP_STR_ZEBRA " [route-map ROUTE-MAP]", NO_STR IP_STR "Stop filtering routing info between zebra and protocol\n" QUAGGA_IP_PROTOCOL_MAP_HELP_STR_ZEBRA - "Protocol from which to stop filtering routes\n") + "Specify route map\n" + "Route map name\n") { + char *proto = argv[3]->text; + char *rmap = (argc == 6) ? argv[5]->arg : NULL; int i; - if (strcasecmp(argv[4]->arg, "any") == 0) + if (strcasecmp(proto, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[4]->arg); + i = proto_name2num(proto); + if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[4]->arg ? argv[4]->arg : "", - VTY_NEWLINE); + vty_out (vty, "invalid protocol name \"%s\"%s", proto, VTY_NEWLINE); return CMD_WARNING; } + if (!proto_rm[AFI_IP][i]) return CMD_SUCCESS; - if ((argc == 2 && strcmp(argv[1], proto_rm[AFI_IP][i]) == 0) || - (argc < 2)) + if (!rmap || strcmp (rmap, proto_rm[AFI_IP][i]) == 0) { XFREE (MTYPE_ROUTE_MAP_NAME, proto_rm[AFI_IP][i]); proto_rm[AFI_IP][i] = NULL; if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug ("%u: IPv4 Routemap unconfig for protocol %s, scheduling RIB processing", - VRF_DEFAULT, argv[4]->arg); + VRF_DEFAULT, proto); rib_update(VRF_DEFAULT, RIB_UPDATE_RMAP_CHANGE); } return CMD_SUCCESS; @@ -907,81 +775,73 @@ DEFUN (ipv6_protocol, IP6_STR "Filter IPv6 routing info exchanged between zebra and protocol\n" QUAGGA_IP6_PROTOCOL_MAP_HELP_STR_ZEBRA + "Specify route map\n" "Route map name\n") { - int idx_protocol = 2; + char *proto = argv[2]->text; + char *rmap = argv[4]->arg; int i; - if (strcasecmp(argv[idx_protocol]->arg, "any") == 0) + if (strcasecmp(proto, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[idx_protocol]->arg); + i = proto_name2num(proto); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[idx_protocol]->arg ? argv[idx_protocol]->arg : "", - VTY_NEWLINE); + vty_out (vty, "invalid protocol name \"%s\"%s", proto, VTY_NEWLINE); return CMD_WARNING; } if (proto_rm[AFI_IP6][i]) { - if (strcmp(proto_rm[AFI_IP6][i], argv[1]) == 0) + if (strcmp(proto_rm[AFI_IP6][i], rmap) == 0) return CMD_SUCCESS; XFREE (MTYPE_ROUTE_MAP_NAME, proto_rm[AFI_IP6][i]); } - proto_rm[AFI_IP6][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]); + proto_rm[AFI_IP6][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, rmap); if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug ("%u: IPv6 Routemap config for protocol %s, scheduling RIB processing", - VRF_DEFAULT, argv[idx_protocol]->arg); + VRF_DEFAULT, proto); rib_update(VRF_DEFAULT, RIB_UPDATE_RMAP_CHANGE); return CMD_SUCCESS; } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no ipv6 protocol " QUAGGA_IP6_PROTOCOL_MAP_STR_ZEBRA " route-map ROUTE-MAP", - * NO_STR - * IP6_STR - * "Stop filtering IPv6 routing info between zebra and protocol\n" - * QUAGGA_IP6_PROTOCOL_MAP_HELP_STR_ZEBRA - * "route map name" - * - */ DEFUN (no_ipv6_protocol, no_ipv6_protocol_cmd, - "no ipv6 protocol " QUAGGA_IP6_PROTOCOL_MAP_STR_ZEBRA, + "no ipv6 protocol " QUAGGA_IP6_PROTOCOL_MAP_STR_ZEBRA " [route-map ROUTE-MAP]", NO_STR IP6_STR "Stop filtering IPv6 routing info between zebra and protocol\n" QUAGGA_IP6_PROTOCOL_MAP_HELP_STR_ZEBRA - "Protocol from which to stop filtering routes\n") + "Specify route map\n" + "Route map name\n") { + const char *proto = argv[3]->text; + const char *rmap = (argc == 6) ? argv[5]->arg : NULL; int i; - if (strcasecmp(argv[4]->arg, "any") == 0) + if (strcasecmp(proto, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[4]->arg); + i = proto_name2num(proto); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[4]->arg ? argv[4]->arg : "", - VTY_NEWLINE); + vty_out (vty, "invalid protocol name \"%s\"%s", proto, VTY_NEWLINE); return CMD_WARNING; } if (!proto_rm[AFI_IP6][i]) return CMD_SUCCESS; - if ((argc == 2 && strcmp(argv[1], proto_rm[AFI_IP6][i]) == 0) || - (argc < 2)) + if (!rmap || strcmp(rmap, proto_rm[AFI_IP6][i]) == 0) { XFREE (MTYPE_ROUTE_MAP_NAME, proto_rm[AFI_IP6][i]); proto_rm[AFI_IP6][i] = NULL; if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug ("%u: IPv6 Routemap unconfig for protocol %s, scheduling RIB processing", - VRF_DEFAULT, argv[4]->arg); + VRF_DEFAULT, proto); rib_update(VRF_DEFAULT, RIB_UPDATE_RMAP_CHANGE); } @@ -1024,69 +884,63 @@ DEFUN (ip_protocol_nht_rmap, IP_STR "Filter Next Hop tracking route resolution\n" QUAGGA_IP_PROTOCOL_MAP_HELP_STR_ZEBRA + "Specify route map\n" "Route map name\n") { - int idx_protocol = 2; + char *proto = argv[2]->text; + char *rmap = argv[4]->arg; int i; - if (strcasecmp(argv[idx_protocol]->arg, "any") == 0) + if (strcasecmp(proto, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[idx_protocol]->arg); + i = proto_name2num(proto); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[idx_protocol]->arg ? argv[idx_protocol]->arg : "", - VTY_NEWLINE); + vty_out (vty, "invalid protocol name \"%s\"%s", proto, VTY_NEWLINE); return CMD_WARNING; } if (nht_rm[AFI_IP][i]) { - if (strcmp(nht_rm[AFI_IP][i], argv[1]) == 0) + if (strcmp(nht_rm[AFI_IP][i], rmap) == 0) return CMD_SUCCESS; XFREE (MTYPE_ROUTE_MAP_NAME, nht_rm[AFI_IP][i]); } - nht_rm[AFI_IP][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]); + nht_rm[AFI_IP][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, rmap); zebra_evaluate_rnh(0, AF_INET, 1, RNH_NEXTHOP_TYPE, NULL); return CMD_SUCCESS; } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no ip nht " QUAGGA_IP_PROTOCOL_MAP_STR_ZEBRA " route-map ROUTE-MAP", - * IP_STR - * "Filter Next Hop tracking route resolution\n" - * QUAGGA_IP_PROTOCOL_MAP_HELP_STR_ZEBRA - * "Route map name\n" - * - */ DEFUN (no_ip_protocol_nht_rmap, no_ip_protocol_nht_rmap_cmd, - "no ip nht " QUAGGA_IP_PROTOCOL_MAP_STR_ZEBRA, + "no ip nht " QUAGGA_IP_PROTOCOL_MAP_STR_ZEBRA " [route-map ROUTE-MAP]", NO_STR IP_STR "Filter Next Hop tracking route resolution\n" - QUAGGA_IP_PROTOCOL_MAP_HELP_STR_ZEBRA) + QUAGGA_IP_PROTOCOL_MAP_HELP_STR_ZEBRA + "Specify route map\n" + "Route map name\n") { + char *proto = argv[3]->text; + char *rmap = (argc == 6) ? argv[5]->arg : NULL; int i; - if (strcasecmp(argv[4]->arg, "any") == 0) + if (strcasecmp(proto, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[4]->arg); + i = proto_name2num(proto); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[4]->arg ? argv[4]->arg : "", - VTY_NEWLINE); - return CMD_WARNING; + vty_out (vty, "invalid protocol name \"%s\"%s", proto, VTY_NEWLINE); + return CMD_WARNING; } if (!nht_rm[AFI_IP][i]) return CMD_SUCCESS; - if ((argc == 2 && strcmp(argv[1], nht_rm[AFI_IP][i]) == 0) || - (argc < 2)) + if (!rmap && strcmp(rmap, nht_rm[AFI_IP][i]) == 0) { XFREE (MTYPE_ROUTE_MAP_NAME, nht_rm[AFI_IP][i]); nht_rm[AFI_IP][i] = NULL; @@ -1131,63 +985,57 @@ DEFUN (ipv6_protocol_nht_rmap, IP6_STR "Filter Next Hop tracking route resolution\n" QUAGGA_IP6_PROTOCOL_MAP_HELP_STR_ZEBRA + "Specify route map\n" "Route map name\n") { - int idx_protocol = 2; + char *proto = argv[2]->text; + char *rmap = argv[4]->arg; int i; - if (strcasecmp(argv[idx_protocol]->arg, "any") == 0) + if (strcasecmp(proto, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[idx_protocol]->arg); + i = proto_name2num(proto); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[idx_protocol]->arg ? argv[idx_protocol]->arg : "", - VTY_NEWLINE); + vty_out (vty, "invalid protocol name \"%s\"%s", proto, VTY_NEWLINE); return CMD_WARNING; } if (nht_rm[AFI_IP6][i]) XFREE (MTYPE_ROUTE_MAP_NAME, nht_rm[AFI_IP6][i]); - nht_rm[AFI_IP6][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[1]); + nht_rm[AFI_IP6][i] = XSTRDUP (MTYPE_ROUTE_MAP_NAME, rmap); zebra_evaluate_rnh(0, AF_INET6, 1, RNH_NEXTHOP_TYPE, NULL); return CMD_SUCCESS; } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no ipv6 nht " QUAGGA_IP6_PROTOCOL_MAP_STR_ZEBRA " route-map ROUTE-MAP", - * NO_STR - * IP6_STR - * "Filter Next Hop tracking route resolution\n" - * QUAGGA_IP6_PROTOCOL_MAP_HELP_STR_ZEBRA - * "Route map name\n" - * - */ DEFUN (no_ipv6_protocol_nht_rmap, no_ipv6_protocol_nht_rmap_cmd, - "no ipv6 nht " QUAGGA_IP6_PROTOCOL_MAP_STR_ZEBRA, + "no ipv6 nht " QUAGGA_IP6_PROTOCOL_MAP_STR_ZEBRA " [route-map ROUTE-MAP]", NO_STR IP6_STR "Filter Next Hop tracking route resolution\n" - QUAGGA_IP6_PROTOCOL_MAP_HELP_STR_ZEBRA) + QUAGGA_IP6_PROTOCOL_MAP_HELP_STR_ZEBRA + "Specify route map\n" + "Route map name\n") { + char *proto = argv[3]->text; + char *rmap = (argc == 6) ? argv[5]->arg : NULL; int i; - if (strcasecmp(argv[4]->arg, "any") == 0) + if (strcasecmp(proto, "any") == 0) i = ZEBRA_ROUTE_MAX; else - i = proto_name2num(argv[4]->arg); + i = proto_name2num(proto); if (i < 0) { - vty_out (vty, "invalid protocol name \"%s\"%s", argv[4]->arg ? argv[4]->arg : "", - VTY_NEWLINE); - return CMD_WARNING; + vty_out (vty, "invalid protocol name \"%s\"%s", proto, VTY_NEWLINE); + return CMD_WARNING; } - if (nht_rm[AFI_IP6][i] && argc == 2 && strcmp(argv[1], nht_rm[AFI_IP6][i])) + if (nht_rm[AFI_IP6][i] && rmap && strcmp(rmap, nht_rm[AFI_IP6][i])) { - vty_out (vty, "invalid route-map \"%s\"%s", argv[1], VTY_NEWLINE); + vty_out (vty, "invalid route-map \"%s\"%s", rmap, VTY_NEWLINE); return CMD_WARNING; } -- cgit v1.2.3 From 6af6be86163306886fe85e10a3b324cf57038957 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Sat, 24 Sep 2016 21:58:50 +0000 Subject: zebra: refactor zserv.c Signed-off-by: Quentin Young --- zebra/zserv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'zebra') diff --git a/zebra/zserv.c b/zebra/zserv.c index fc7b41954..5c4957a68 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -2263,13 +2263,13 @@ DEFUN (config_table, "Configure target kernel routing table\n" "TABLE integer\n") { - zebrad.rtm_table_default = strtol (argv[0], (char**)0, 10); + zebrad.rtm_table_default = strtol (argv[1]->arg, (char**)0, 10); return CMD_SUCCESS; } DEFUN (no_config_table, no_config_table_cmd, - "no table TABLENO", + "no table [TABLENO]", NO_STR "Configure target kernel routing table\n" "TABLE integer\n") -- cgit v1.2.3 From 34ccea1ec54a69dbf260dcb20240dc8124a5591f Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Sun, 25 Sep 2016 02:13:43 +0000 Subject: zebra: refactor rtadv.c Signed-off-by: Quentin Young --- zebra/rtadv.c | 528 ++++++++++------------------------------------------------ 1 file changed, 85 insertions(+), 443 deletions(-) (limited to 'zebra') diff --git a/zebra/rtadv.c b/zebra/rtadv.c index ec4736463..7edba5595 100644 --- a/zebra/rtadv.c +++ b/zebra/rtadv.c @@ -1,4 +1,5 @@ /* Router advertisement + * Copyright (C) 2016 Cumulus Networks * Copyright (C) 2005 6WIND * Copyright (C) 1999 Kunihiro Ishiguro * @@ -987,29 +988,16 @@ DEFUN (ipv6_nd_ra_interval, return CMD_SUCCESS; } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no ipv6 nd ra-interval <1-1800>", - * NO_STR - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Router Advertisement interval\n" - * - * "no ipv6 nd ra-interval msec <1-1800000>", - * NO_STR - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Router Advertisement interval\n" - * "Router Advertisement interval in milliseconds\n" - * - */ DEFUN (no_ipv6_nd_ra_interval, no_ipv6_nd_ra_interval_cmd, - "no ipv6 nd ra-interval", + "no ipv6 nd ra-interval [<(1-1800)|msec (1-1800000)>]", NO_STR "Interface IPv6 config commands\n" "Neighbor discovery\n" - "Router Advertisement interval\n") + "Router Advertisement interval\n" + "Router Advertisement interval in seconds\n" + "Specify millisecond router advertisement interval\n" + "Router Advertisement interval in milliseconds\n") { struct interface *ifp; struct zebra_if *zif; @@ -1031,8 +1019,6 @@ DEFUN (no_ipv6_nd_ra_interval, return CMD_SUCCESS; } - - DEFUN (ipv6_nd_ra_lifetime, ipv6_nd_ra_lifetime_cmd, "ipv6 nd ra-lifetime (0-9000)", @@ -1066,23 +1052,14 @@ DEFUN (ipv6_nd_ra_lifetime, return CMD_SUCCESS; } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no ipv6 nd ra-lifetime <0-9000>", - * NO_STR - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Router lifetime\n" - * "Router lifetime in seconds (0 stands for a non-default gw)\n" - * - */ DEFUN (no_ipv6_nd_ra_lifetime, no_ipv6_nd_ra_lifetime_cmd, - "no ipv6 nd ra-lifetime", + "no ipv6 nd ra-lifetime [(0-9000)]", NO_STR "Interface IPv6 config commands\n" "Neighbor discovery\n" - "Router lifetime\n") + "Router lifetime\n" + "Router lifetime in seconds (0 stands for a non-default gw)\n") { struct interface *ifp; struct zebra_if *zif; @@ -1095,7 +1072,6 @@ DEFUN (no_ipv6_nd_ra_lifetime, return CMD_SUCCESS; } - DEFUN (ipv6_nd_reachable_time, ipv6_nd_reachable_time_cmd, "ipv6 nd reachable-time (1-3600000)", @@ -1111,23 +1087,14 @@ DEFUN (ipv6_nd_reachable_time, return CMD_SUCCESS; } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no ipv6 nd reachable-time <1-3600000>", - * NO_STR - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Reachable time\n" - * "Reachable time in milliseconds\n" - * - */ DEFUN (no_ipv6_nd_reachable_time, no_ipv6_nd_reachable_time_cmd, - "no ipv6 nd reachable-time", + "no ipv6 nd reachable-time [(1-3600000)]", NO_STR "Interface IPv6 config commands\n" "Neighbor discovery\n" - "Reachable time\n") + "Reachable time\n" + "Reachable time in milliseconds\n") { struct interface *ifp; struct zebra_if *zif; @@ -1140,7 +1107,6 @@ DEFUN (no_ipv6_nd_reachable_time, return CMD_SUCCESS; } - DEFUN (ipv6_nd_homeagent_preference, ipv6_nd_homeagent_preference_cmd, "ipv6 nd home-agent-preference (0-65535)", @@ -1156,23 +1122,14 @@ DEFUN (ipv6_nd_homeagent_preference, return CMD_SUCCESS; } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no ipv6 nd home-agent-preference <0-65535>", - * NO_STR - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Home Agent preference\n" - * "preference value (default is 0, least preferred)\n" - * - */ DEFUN (no_ipv6_nd_homeagent_preference, no_ipv6_nd_homeagent_preference_cmd, - "no ipv6 nd home-agent-preference", + "no ipv6 nd home-agent-preference [(0-65535)]", NO_STR "Interface IPv6 config commands\n" "Neighbor discovery\n" - "Home Agent preference\n") + "Home Agent preference\n" + "preference value (default is 0, least preferred)\n") { struct interface *ifp; struct zebra_if *zif; @@ -1185,7 +1142,6 @@ DEFUN (no_ipv6_nd_homeagent_preference, return CMD_SUCCESS; } - DEFUN (ipv6_nd_homeagent_lifetime, ipv6_nd_homeagent_lifetime_cmd, "ipv6 nd home-agent-lifetime (0-65520)", @@ -1201,23 +1157,14 @@ DEFUN (ipv6_nd_homeagent_lifetime, return CMD_SUCCESS; } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no ipv6 nd home-agent-lifetime <0-65520>", - * NO_STR - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Home Agent lifetime\n" - * "Home Agent lifetime in seconds (0 to track ra-lifetime)\n" - * - */ DEFUN (no_ipv6_nd_homeagent_lifetime, no_ipv6_nd_homeagent_lifetime_cmd, - "no ipv6 nd home-agent-lifetime", + "no ipv6 nd home-agent-lifetime [(0-65520)]", NO_STR "Interface IPv6 config commands\n" "Neighbor discovery\n" - "Home Agent lifetime\n") + "Home Agent lifetime\n" + "Home Agent lifetime in seconds (0 to track ra-lifetime)\n") { struct interface *ifp; struct zebra_if *zif; @@ -1230,7 +1177,6 @@ DEFUN (no_ipv6_nd_homeagent_lifetime, return CMD_SUCCESS; } - DEFUN (ipv6_nd_managed_config_flag, ipv6_nd_managed_config_flag_cmd, "ipv6 nd managed-config-flag", @@ -1379,142 +1325,9 @@ DEFUN (no_ipv6_nd_other_config_flag, return CMD_SUCCESS; } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "ipv6 nd prefix X:X::X:X/M (no-autoconfig|)", - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Prefix information\n" - * "IPv6 prefix\n" - * "Do not use prefix for autoconfiguration\n" - * - * "ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) " - * "(<0-4294967295>|infinite)", - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Prefix information\n" - * "IPv6 prefix\n" - * "Valid lifetime in seconds\n" - * "Infinite valid lifetime\n" - * "Preferred lifetime in seconds\n" - * "Infinite preferred lifetime\n" - * - * "ipv6 nd prefix X:X::X:X/M (off-link|) (no-autoconfig|)", - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Prefix information\n" - * "IPv6 prefix\n" - * "Do not use prefix for onlink determination\n" - * "Do not use prefix for autoconfiguration\n" - * - * "ipv6 nd prefix X:X::X:X/M (router-address|)", - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Prefix information\n" - * "IPv6 prefix\n" - * "Set Router Address flag\n" - * - * "ipv6 nd prefix X:X::X:X/M (no-autoconfig|) (off-link|)", - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Prefix information\n" - * "IPv6 prefix\n" - * "Do not use prefix for autoconfiguration\n" - * "Do not use prefix for onlink determination\n" - * - * "ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) " - * "(<0-4294967295>|infinite) (router-address|)", - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Prefix information\n" - * "IPv6 prefix\n" - * "Valid lifetime in seconds\n" - * "Infinite valid lifetime\n" - * "Preferred lifetime in seconds\n" - * "Infinite preferred lifetime\n" - * "Set Router Address flag\n" - * - * "ipv6 nd prefix X:X::X:X/M", - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Prefix information\n" - * "IPv6 prefix\n" - * - * "ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) " - * "(<0-4294967295>|infinite) (off-link|) (no-autoconfig|)", - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Prefix information\n" - * "IPv6 prefix\n" - * "Valid lifetime in seconds\n" - * "Infinite valid lifetime\n" - * "Preferred lifetime in seconds\n" - * "Infinite preferred lifetime\n" - * "Do not use prefix for onlink determination\n" - * "Do not use prefix for autoconfiguration\n" - * - * "ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) " - * "(<0-4294967295>|infinite) (no-autoconfig|) (off-link|)", - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Prefix information\n" - * "IPv6 prefix\n" - * "Valid lifetime in seconds\n" - * "Infinite valid lifetime\n" - * "Preferred lifetime in seconds\n" - * "Infinite preferred lifetime\n" - * "Do not use prefix for autoconfiguration\n" - * "Do not use prefix for onlink determination\n" - * - * "ipv6 nd prefix X:X::X:X/M (off-link|)", - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Prefix information\n" - * "IPv6 prefix\n" - * "Do not use prefix for onlink determination\n" - * - * "ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) " - * "(<0-4294967295>|infinite) (no-autoconfig|)", - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Prefix information\n" - * "IPv6 prefix\n" - * "Valid lifetime in seconds\n" - * "Infinite valid lifetime\n" - * "Preferred lifetime in seconds\n" - * "Infinite preferred lifetime\n" - * "Do not use prefix for autoconfiguration" - * - * "ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) " - * "(<0-4294967295>|infinite) (off-link|)", - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Prefix information\n" - * "IPv6 prefix\n" - * "Valid lifetime in seconds\n" - * "Infinite valid lifetime\n" - * "Preferred lifetime in seconds\n" - * "Infinite preferred lifetime\n" - * "Do not use prefix for onlink determination\n" - * - * "ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) " - * "(<0-4294967295>|infinite) (no-autoconfig|) (off-link|) (router-address|)", - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Prefix information\n" - * "IPv6 prefix\n" - * "Valid lifetime in seconds\n" - * "Infinite valid lifetime\n" - * "Preferred lifetime in seconds\n" - * "Infinite preferred lifetime\n" - * "Do not use prefix for autoconfiguration\n" - * "Do not use prefix for onlink determination\n" - * "Set Router Address flag\n" - * - */ DEFUN (ipv6_nd_prefix, ipv6_nd_prefix_cmd, - "ipv6 nd prefix X:X::X:X/M <(0-4294967295)|infinite> <(0-4294967295)|infinite> ", + "ipv6 nd prefix X:X::X:X/M [<(0-4294967295)|infinite> <(0-4294967295)|infinite>] []", "Interface IPv6 config commands\n" "Neighbor discovery\n" "Prefix information\n" @@ -1523,16 +1336,38 @@ DEFUN (ipv6_nd_prefix, "Infinite valid lifetime\n" "Preferred lifetime in seconds\n" "Infinite preferred lifetime\n" + "Set Router Address flag\n" "Do not use prefix for onlink determination\n" "Do not use prefix for autoconfiguration\n" - "Set Router Address flag\n") + "Do not use prefix for autoconfiguration\n" + "Do not use prefix for onlink determination\n") { - int idx_ipv6_prefixlen = 3; - int idx_number_infinite = 4; - int idx_number_infinite_2 = 5; - int i; + /* prelude */ + char *prefix = argv[3]->arg; + int lifetimes = (argc > 4) && (argv[4]->type == RANGE_TKN || strmatch (argv[4]->text, "infinite")); + int routeropts = lifetimes ? argc > 6 : argc > 4; + + int idx_routeropts = routeropts ? (lifetimes ? 6 : 4) : 0; + + char *lifetime = NULL, *preflifetime = NULL; + int routeraddr = 0, offlink = 0, noautoconf = 0; + if (lifetimes) + { + lifetime = argv[4]->type == RANGE_TKN ? argv[4]->arg : argv[4]->text; + preflifetime = argv[5]->type == RANGE_TKN ? argv[5]->arg : argv[5]->text; + } + if (routeropts) + { + routeraddr = strmatch (argv[idx_routeropts]->text, "router-address"); + if (!routeraddr) + { + offlink = (argc > idx_routeropts + 1 || strmatch (argv[idx_routeropts]->text, "off-link")); + noautoconf = (argc > idx_routeropts + 1 || strmatch (argv[idx_routeropts]->text, "no-autoconfig")); + } + } + + /* business */ int ret; - int cursor = 1; struct interface *ifp; struct zebra_if *zebra_if; struct rtadv_prefix rp; @@ -1540,226 +1375,64 @@ DEFUN (ipv6_nd_prefix, ifp = (struct interface *) vty->index; zebra_if = ifp->info; - ret = str2prefix_ipv6 (argv[idx_ipv6_prefixlen]->arg, &rp.prefix); + ret = str2prefix_ipv6 (prefix, &rp.prefix); if (!ret) { vty_out (vty, "Malformed IPv6 prefix%s", VTY_NEWLINE); return CMD_WARNING; } apply_mask_ipv6 (&rp.prefix); /* RFC4861 4.6.2 */ - rp.AdvOnLinkFlag = 1; - rp.AdvAutonomousFlag = 1; - rp.AdvRouterAddressFlag = 0; + rp.AdvOnLinkFlag = !offlink; + rp.AdvAutonomousFlag = !noautoconf; + rp.AdvRouterAddressFlag = routeraddr; rp.AdvValidLifetime = RTADV_VALID_LIFETIME; rp.AdvPreferredLifetime = RTADV_PREFERRED_LIFETIME; - if (argc > 1) - { - if ((isdigit((unsigned char)argv[idx_number_infinite]->arg[0])) - || strncmp (argv[idx_number_infinite]->arg, "i", 1) == 0) - { - if ( strncmp (argv[idx_number_infinite]->arg, "i", 1) == 0) - rp.AdvValidLifetime = UINT32_MAX; - else - rp.AdvValidLifetime = (u_int32_t) strtoll (argv[idx_number_infinite]->arg, - (char **)NULL, 10); - - if ( strncmp (argv[idx_number_infinite_2]->arg, "i", 1) == 0) - rp.AdvPreferredLifetime = UINT32_MAX; - else - rp.AdvPreferredLifetime = (u_int32_t) strtoll (argv[idx_number_infinite_2]->arg, - (char **)NULL, 10); - - if (rp.AdvPreferredLifetime > rp.AdvValidLifetime) - { - vty_out (vty, "Invalid preferred lifetime%s", VTY_NEWLINE); - return CMD_WARNING; - } - cursor = cursor + 2; - } - if (argc > cursor) - { - for (i = cursor; i < argc; i++) - { - if (strncmp (argv[i], "of", 2) == 0) - rp.AdvOnLinkFlag = 0; - if (strncmp (argv[i], "no", 2) == 0) - rp.AdvAutonomousFlag = 0; - if (strncmp (argv[i], "ro", 2) == 0) - rp.AdvRouterAddressFlag = 1; - } - } - } + if (lifetimes) + { + rp.AdvValidLifetime = strmatch (lifetime, "infinite") ? UINT32_MAX : strtoll (lifetime, NULL, 10); + rp.AdvPreferredLifetime = strmatch (preflifetime, "infinite") ? UINT32_MAX : strtoll (preflifetime, NULL, 10); + if (rp.AdvPreferredLifetime > rp.AdvValidLifetime) + { + vty_out (vty, "Invalid preferred lifetime%s", VTY_NEWLINE); + return CMD_WARNING; + } + } rtadv_prefix_set (zebra_if, &rp); return CMD_SUCCESS; } - - - - - - - - - - - - - -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) (<0-4294967295>|infinite) (no-autoconfig|) (off-link|)", - * NO_STR - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Prefix information\n" - * "IPv6 prefix\n" - * "Valid lifetime in seconds\n" - * "Infinite valid lifetime\n" - * "Preferred lifetime in seconds\n" - * "Infinite preferred lifetime\n" - * "Do not use prefix for autoconfiguration\n" - * "Do not use prefix for onlink determination\n" - * - * "no ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) (<0-4294967295>|infinite) (no-autoconfig|)", - * NO_STR - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Prefix information\n" - * "IPv6 prefix\n" - * "Valid lifetime in seconds\n" - * "Infinite valid lifetime\n" - * "Preferred lifetime in seconds\n" - * "Infinite preferred lifetime\n" - * "Do not use prefix for autoconfiguration" - * - * "no ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) (<0-4294967295>|infinite) (off-link|) (no-autoconfig|) (router-address|)", - * NO_STR - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Prefix information\n" - * "IPv6 prefix\n" - * "Valid lifetime in seconds\n" - * "Infinite valid lifetime\n" - * "Preferred lifetime in seconds\n" - * "Infinite preferred lifetime\n" - * "Do not use prefix for onlink determination\n" - * "Do not use prefix for autoconfiguration\n" - * "Set Router Address flag\n" - * - * "no ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) (<0-4294967295>|infinite) (off-link|)", - * NO_STR - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Prefix information\n" - * "IPv6 prefix\n" - * "Valid lifetime in seconds\n" - * "Infinite valid lifetime\n" - * "Preferred lifetime in seconds\n" - * "Infinite preferred lifetime\n" - * "Do not use prefix for onlink determination\n" - * - * "no ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) (<0-4294967295>|infinite) (no-autoconfig|) (off-link|) (router-address|)", - * NO_STR - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Prefix information\n" - * "IPv6 prefix\n" - * "Valid lifetime in seconds\n" - * "Infinite valid lifetime\n" - * "Preferred lifetime in seconds\n" - * "Infinite preferred lifetime\n" - * "Do not use prefix for autoconfiguration\n" - * "Do not use prefix for onlink determination\n" - * "Set Router Address flag\n" - * - * "no ipv6 nd prefix X:X::X:X/M (router-address|)", - * NO_STR - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Prefix information\n" - * "IPv6 prefix\n" - * "Set Router Address flag\n" - * - * "no ipv6 nd prefix X:X::X:X/M (off-link|)", - * NO_STR - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Prefix information\n" - * "IPv6 prefix\n" - * "Do not use prefix for onlink determination\n" - * - * "no ipv6 nd prefix X:X::X:X/M (no-autoconfig|)", - * NO_STR - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Prefix information\n" - * "IPv6 prefix\n" - * "Do not use prefix for autoconfiguration\n" - * - * "no ipv6 nd prefix X:X::X:X/M (no-autoconfig|) (off-link|)", - * NO_STR - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Prefix information\n" - * "IPv6 prefix\n" - * "Do not use prefix for autoconfiguration\n" - * "Do not use prefix for onlink determination\n" - * - * "no ipv6 nd prefix X:X::X:X/M (off-link|) (no-autoconfig|)", - * NO_STR - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Prefix information\n" - * "IPv6 prefix\n" - * "Do not use prefix for onlink determination\n" - * "Do not use prefix for autoconfiguration\n" - * - * "no ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) (<0-4294967295>|infinite) (router-address|)", - * NO_STR - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Prefix information\n" - * "IPv6 prefix\n" - * "Valid lifetime in seconds\n" - * "Infinite valid lifetime\n" - * "Preferred lifetime in seconds\n" - * "Infinite preferred lifetime\n" - * "Set Router Address flag\n" - * - * "no ipv6 nd prefix X:X::X:X/M (<0-4294967295>|infinite) (<0-4294967295>|infinite)", - * NO_STR - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Prefix information\n" - * "IPv6 prefix\n" - * "Valid lifetime in seconds\n" - * "Infinite valid lifetime\n" - * "Preferred lifetime in seconds\n" - * "Infinite preferred lifetime\n" - * - */ DEFUN (no_ipv6_nd_prefix, no_ipv6_nd_prefix_cmd, - "no ipv6 nd prefix IPV6PREFIX", - NO_STR + "no ipv6 nd prefix X:X::X:X/M [<(0-4294967295)|infinite> <(0-4294967295)|infinite>] []", + NO_STR "Interface IPv6 config commands\n" "Neighbor discovery\n" "Prefix information\n" - "IPv6 prefix\n") + "IPv6 prefix\n" + "Valid lifetime in seconds\n" + "Infinite valid lifetime\n" + "Preferred lifetime in seconds\n" + "Infinite preferred lifetime\n" + "Set Router Address flag\n" + "Do not use prefix for onlink determination\n" + "Do not use prefix for autoconfiguration\n" + "Do not use prefix for autoconfiguration\n" + "Do not use prefix for onlink determination\n") { int ret; struct interface *ifp; struct zebra_if *zebra_if; struct rtadv_prefix rp; + char *prefix = argv[4]->arg; + ifp = (struct interface *) vty->index; zebra_if = ifp->info; - ret = str2prefix_ipv6 (argv[0], &rp.prefix); + ret = str2prefix_ipv6 (prefix, &rp.prefix); if (!ret) { vty_out (vty, "Malformed IPv6 prefix%s", VTY_NEWLINE); @@ -1770,25 +1443,13 @@ DEFUN (no_ipv6_nd_prefix, ret = rtadv_prefix_reset (zebra_if, &rp); if (!ret) { - vty_out (vty, "Non-exist IPv6 prefix%s", VTY_NEWLINE); + vty_out (vty, "Non-existant IPv6 prefix%s", VTY_NEWLINE); return CMD_WARNING; } return CMD_SUCCESS; } - - - - - - - - - - - - DEFUN (ipv6_nd_router_preference, ipv6_nd_router_preference_cmd, "ipv6 nd router-preference ", @@ -1820,25 +1481,16 @@ DEFUN (ipv6_nd_router_preference, return CMD_ERR_NO_MATCH; } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no ipv6 nd router-preference (high|medium|low)", - * NO_STR - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Default router preference\n" - * "High default router preference\n" - * "Low default router preference\n" - * "Medium default router preference (default)\n" - * - */ DEFUN (no_ipv6_nd_router_preference, no_ipv6_nd_router_preference_cmd, - "no ipv6 nd router-preference", + "no ipv6 nd router-preference []", NO_STR "Interface IPv6 config commands\n" "Neighbor discovery\n" - "Default router preference\n") + "Default router preference\n" + "High default router preference\n" + "Medium default router preference (default)\n" + "Low default router preference\n") { struct interface *ifp; struct zebra_if *zif; @@ -1851,7 +1503,6 @@ DEFUN (no_ipv6_nd_router_preference, return CMD_SUCCESS; } - DEFUN (ipv6_nd_mtu, ipv6_nd_mtu_cmd, "ipv6 nd mtu (1-65535)", @@ -1867,23 +1518,14 @@ DEFUN (ipv6_nd_mtu, return CMD_SUCCESS; } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no ipv6 nd mtu <1-65535>", - * NO_STR - * "Interface IPv6 config commands\n" - * "Neighbor discovery\n" - * "Advertised MTU\n" - * "MTU in bytes\n" - * - */ DEFUN (no_ipv6_nd_mtu, no_ipv6_nd_mtu_cmd, - "no ipv6 nd mtu", + "no ipv6 nd mtu [(1-65535)]", NO_STR "Interface IPv6 config commands\n" "Neighbor discovery\n" - "Advertised MTU\n") + "Advertised MTU\n" + "MTU in bytes\n") { struct interface *ifp = (struct interface *) vty->index; struct zebra_if *zif = ifp->info; -- cgit v1.2.3 From 92300491f60ef24128054bbf42b1b22ed12f2f9e Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Sun, 25 Sep 2016 03:00:04 +0000 Subject: zebra: CHECK ME fixes Signed-off-by: Daniel Walton --- ospf6d/ospf6_asbr.c | 7 +++++ ospf6d/ospf6d.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++ zebra/interface.c | 1 - zebra/router-id.c | 46 +++++++++++---------------------- 4 files changed, 95 insertions(+), 32 deletions(-) (limited to 'zebra') diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index 014320a2f..c35b30a65 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -1421,3 +1421,10 @@ config_write_ospf6_debug_asbr (struct vty *vty) } void +install_element_ospf6_debug_asbr () +{ + install_element (ENABLE_NODE, &debug_ospf6_asbr_cmd); + install_element (ENABLE_NODE, &no_debug_ospf6_asbr_cmd); + install_element (CONFIG_NODE, &debug_ospf6_asbr_cmd); + install_element (CONFIG_NODE, &no_debug_ospf6_asbr_cmd); +} diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c index c72dde0ac..b57228885 100644 --- a/ospf6d/ospf6d.c +++ b/ospf6d/ospf6d.c @@ -1790,3 +1790,76 @@ ospf6_init (void) ospf6_bfd_init(); install_node (&debug_node, config_write_ospf6_debug); + install_element_ospf6_debug_message (); + install_element_ospf6_debug_lsa (); + install_element_ospf6_debug_interface (); + install_element_ospf6_debug_neighbor (); + install_element_ospf6_debug_zebra (); + install_element_ospf6_debug_spf (); + install_element_ospf6_debug_route (); + install_element_ospf6_debug_brouter (); + install_element_ospf6_debug_asbr (); + install_element_ospf6_debug_abr (); + install_element_ospf6_debug_flood (); + + install_element_ospf6_clear_interface (); + + install_element (VIEW_NODE, &show_version_ospf6_cmd); + install_element (ENABLE_NODE, &show_version_ospf6_cmd); + + install_element (VIEW_NODE, &show_ipv6_ospf6_border_routers_cmd); + install_element (ENABLE_NODE, &show_ipv6_ospf6_border_routers_cmd); + + install_element (VIEW_NODE, &show_ipv6_ospf6_linkstate_cmd); + install_element (VIEW_NODE, &show_ipv6_ospf6_linkstate_detail_cmd); + install_element (ENABLE_NODE, &show_ipv6_ospf6_linkstate_cmd); + install_element (ENABLE_NODE, &show_ipv6_ospf6_linkstate_detail_cmd); + +#define INSTALL(n,c) \ + install_element (n ## _NODE, &show_ipv6_ospf6_ ## c) + + INSTALL (VIEW, database_cmd); + INSTALL (VIEW, database_type_cmd); + INSTALL (VIEW, database_id_cmd); + INSTALL (VIEW, database_router_cmd); + INSTALL (VIEW, database_type_id_cmd); + INSTALL (VIEW, database_type_router_cmd); + INSTALL (VIEW, database_adv_router_linkstate_id_cmd); + INSTALL (VIEW, database_id_router_cmd); + INSTALL (VIEW, database_type_id_router_cmd); + INSTALL (VIEW, database_type_adv_router_linkstate_id_cmd); + INSTALL (VIEW, database_self_originated_cmd); + INSTALL (VIEW, database_type_self_originated_cmd); + INSTALL (VIEW, database_type_id_self_originated_cmd); + INSTALL (VIEW, database_type_self_originated_linkstate_id_cmd); + + INSTALL (ENABLE, database_cmd); + INSTALL (ENABLE, database_type_cmd); + INSTALL (ENABLE, database_id_cmd); + INSTALL (ENABLE, database_router_cmd); + INSTALL (ENABLE, database_type_id_cmd); + INSTALL (ENABLE, database_type_router_cmd); + INSTALL (ENABLE, database_adv_router_linkstate_id_cmd); + INSTALL (ENABLE, database_id_router_cmd); + INSTALL (ENABLE, database_type_id_router_cmd); + INSTALL (ENABLE, database_type_adv_router_linkstate_id_cmd); + INSTALL (ENABLE, database_self_originated_cmd); + INSTALL (ENABLE, database_type_self_originated_cmd); + INSTALL (ENABLE, database_type_id_self_originated_cmd); + INSTALL (ENABLE, database_type_self_originated_linkstate_id_cmd); + + /* Make ospf protocol socket. */ + ospf6_serv_sock (); + thread_add_read (master, ospf6_receive, NULL, ospf6_sock); +} + +void +ospf6_clean (void) +{ + if (!ospf6) + return; + if (ospf6->route_table) + ospf6_route_remove_all (ospf6->route_table); + if (ospf6->brouter_table) + ospf6_route_remove_all (ospf6->brouter_table); +} diff --git a/zebra/interface.c b/zebra/interface.c index 26315bd6c..d1f21c17b 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -2987,7 +2987,6 @@ zebra_if_init (void) install_element (ENABLE_NODE, &show_interface_desc_vrf_all_cmd); install_element (CONFIG_NODE, &zebra_interface_cmd); install_element (CONFIG_NODE, &no_interface_cmd); - install_element (CONFIG_NODE, &no_interface_vrf_cmd); install_default (INTERFACE_NODE); install_element (INTERFACE_NODE, &interface_desc_cmd); install_element (INTERFACE_NODE, &no_interface_desc_cmd); diff --git a/zebra/router-id.c b/zebra/router-id.c index 6e1d434ec..23b8cc743 100644 --- a/zebra/router-id.c +++ b/zebra/router-id.c @@ -214,21 +214,16 @@ router_id_write (struct vty *vty) } } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "router-id A.B.C.D " VRF_CMD_STR, - * "Manually set the router-id\n" - * "IP address to use for router-id\n" - * VRF_CMD_HELP_STR - * - */ DEFUN (router_id, router_id_cmd, - "router-id A.B.C.D", + "router-id A.B.C.D [vrf NAME]", "Manually set the router-id\n" - "IP address to use for router-id\n") + "IP address to use for router-id\n" + VRF_CMD_HELP_STR) { int idx_ipv4 = 1; + int idx_name = 3; + struct prefix rid; vrf_id_t vrf_id = VRF_DEFAULT; @@ -239,35 +234,24 @@ DEFUN (router_id, rid.prefixlen = 32; rid.family = AF_INET; - if (argc > 1) - VRF_GET_ID (vrf_id, argv[1]); + if (argc > 2) + VRF_GET_ID (vrf_id, argv[idx_name]->arg); router_id_set (&rid, vrf_id); return CMD_SUCCESS; } - -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no router-id A.B.C.D", - * NO_STR - * "Remove the manually configured router-id\n" - * "IP address to use for router-id\n" - * - * "no router-id A.B.C.D " VRF_CMD_STR, - * NO_STR - * "Remove the manually configured router-id\n" - * "IP address to use for router-id\n" - * VRF_CMD_HELP_STR - * - */ DEFUN (no_router_id, no_router_id_cmd, - "no router-id", + "no router-id [A.B.C.D [vrf NAME]]", NO_STR - "Remove the manually configured router-id\n") + "Remove the manually configured router-id\n" + "IP address to use for router-id\n" + VRF_CMD_HELP_STR) { + int idx_name = 4; + struct prefix rid; vrf_id_t vrf_id = VRF_DEFAULT; @@ -275,8 +259,8 @@ DEFUN (no_router_id, rid.prefixlen = 0; rid.family = AF_INET; - if (argc > 1) - VRF_GET_ID (vrf_id, argv[1]); + if (argc > 3) + VRF_GET_ID (vrf_id, argv[idx_name]->arg); router_id_set (&rid, vrf_id); -- cgit v1.2.3 From 9ccf14f739123d3fa6aa89f12749c56da86c2992 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Sun, 25 Sep 2016 14:10:48 +0000 Subject: Expand #defines in command strings Signed-off-by: Daniel Walton --- bgpd/bgp_bfd.c | 6 +- bgpd/bgp_nexthop.c | 6 +- bgpd/bgp_route.c | 116 +++++------ bgpd/bgp_routemap.c | 12 +- bgpd/bgp_vty.c | 518 +++++++++++++++++++++++------------------------ isisd/isis_redist.c | 4 +- lib/command.c | 6 +- lib/if.c | 2 +- ospf6d/ospf6_asbr.c | 8 +- ospf6d/ospf6_bfd.c | 2 +- ospfd/ospf_bfd.c | 4 +- ospfd/ospf_vty.c | 32 +-- pimd/pim_cmd.c | 16 +- ripd/rip_zebra.c | 16 +- ripngd/ripng_zebra.c | 16 +- tools/argv_translator.py | 39 +++- zebra/interface.c | 12 +- zebra/zebra_routemap.c | 16 +- zebra/zebra_vty.c | 210 +++++++++---------- 19 files changed, 529 insertions(+), 512 deletions(-) (limited to 'zebra') diff --git a/bgpd/bgp_bfd.c b/bgpd/bgp_bfd.c index 170b207a8..bb8f4ceee 100644 --- a/bgpd/bgp_bfd.c +++ b/bgpd/bgp_bfd.c @@ -555,7 +555,7 @@ bgp_bfd_show_info(struct vty *vty, struct peer *peer, u_char use_json, json_obje DEFUN (neighbor_bfd, neighbor_bfd_cmd, - NEIGHBOR_CMD2 "bfd", + "neighbor bfd", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Enables BFD support\n") @@ -578,7 +578,7 @@ DEFUN (neighbor_bfd, DEFUN (neighbor_bfd_param, neighbor_bfd_param_cmd, - NEIGHBOR_CMD2 "bfd " BFD_CMD_DETECT_MULT_RANGE BFD_CMD_MIN_RX_RANGE BFD_CMD_MIN_TX_RANGE, + "neighbor bfd (2-255) (50-60000) (50-60000)", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Enables BFD support\n" @@ -652,7 +652,7 @@ DEFUN_HIDDEN (neighbor_bfd_type, */ DEFUN (no_neighbor_bfd, no_neighbor_bfd_cmd, - NO_NEIGHBOR_CMD2 "bfd", + "no neighbor bfd", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c index e648af91e..f59971c1b 100644 --- a/bgpd/bgp_nexthop.c +++ b/bgpd/bgp_nexthop.c @@ -513,7 +513,7 @@ DEFUN (show_ip_bgp_nexthop_detail, DEFUN (show_ip_bgp_instance_nexthop, show_ip_bgp_instance_nexthop_cmd, - "show ip bgp " BGP_INSTANCE_CMD " nexthop", + "show ip bgp WORD nexthop", SHOW_STR IP_STR BGP_STR @@ -526,7 +526,7 @@ DEFUN (show_ip_bgp_instance_nexthop, DEFUN (show_ip_bgp_instance_all_nexthop, show_ip_bgp_instance_all_nexthop_cmd, - "show ip bgp " BGP_INSTANCE_ALL_CMD " nexthop", + "show ip bgp all nexthop", SHOW_STR IP_STR BGP_STR @@ -539,7 +539,7 @@ DEFUN (show_ip_bgp_instance_all_nexthop, DEFUN (show_ip_bgp_instance_nexthop_detail, show_ip_bgp_instance_nexthop_detail_cmd, - "show ip bgp " BGP_INSTANCE_CMD " nexthop detail", + "show ip bgp WORD nexthop detail", SHOW_STR IP_STR BGP_STR diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 6238f28dd..14aaf7eeb 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -8444,7 +8444,7 @@ DEFUN (show_ip_bgp_vpnv4_rd_prefix, DEFUN (show_ip_bgp_view, show_ip_bgp_instance_cmd, - "show ip bgp " BGP_INSTANCE_CMD " [json]", + "show ip bgp WORD [json]", SHOW_STR IP_STR BGP_STR @@ -8467,7 +8467,7 @@ DEFUN (show_ip_bgp_view, DEFUN (show_ip_bgp_instance_all, show_ip_bgp_instance_all_cmd, - "show ip bgp " BGP_INSTANCE_ALL_CMD " [json]", + "show ip bgp all [json]", SHOW_STR IP_STR BGP_STR @@ -8482,7 +8482,7 @@ DEFUN (show_ip_bgp_instance_all, DEFUN (show_ip_bgp_instance_route, show_ip_bgp_instance_route_cmd, - "show ip bgp " BGP_INSTANCE_CMD " A.B.C.D [json]", + "show ip bgp WORD A.B.C.D [json]", SHOW_STR IP_STR BGP_STR @@ -8497,7 +8497,7 @@ DEFUN (show_ip_bgp_instance_route, DEFUN (show_ip_bgp_instance_route_pathtype, show_ip_bgp_instance_route_pathtype_cmd, - "show ip bgp " BGP_INSTANCE_CMD " A.B.C.D [json]", + "show ip bgp WORD A.B.C.D [json]", SHOW_STR IP_STR BGP_STR @@ -8520,7 +8520,7 @@ DEFUN (show_ip_bgp_instance_route_pathtype, DEFUN (show_ip_bgp_instance_prefix, show_ip_bgp_instance_prefix_cmd, - "show ip bgp " BGP_INSTANCE_CMD " A.B.C.D/M [json]", + "show ip bgp WORD A.B.C.D/M [json]", SHOW_STR IP_STR BGP_STR @@ -8535,7 +8535,7 @@ DEFUN (show_ip_bgp_instance_prefix, DEFUN (show_ip_bgp_instance_prefix_pathtype, show_ip_bgp_instance_prefix_pathtype_cmd, - "show ip bgp " BGP_INSTANCE_CMD " A.B.C.D/M [json]", + "show ip bgp WORD A.B.C.D/M [json]", SHOW_STR IP_STR BGP_STR @@ -8836,7 +8836,7 @@ DEFUN (show_ipv6_bgp_prefix, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " ipv6 [json]", + * "show bgp WORD ipv6 [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -8846,7 +8846,7 @@ DEFUN (show_ipv6_bgp_prefix, */ DEFUN (show_bgp_view, show_bgp_instance_cmd, - "show bgp " BGP_INSTANCE_CMD " [json]", + "show bgp WORD [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -8868,7 +8868,7 @@ DEFUN (show_bgp_view, DEFUN (show_bgp_instance_all, show_bgp_instance_all_cmd, - "show bgp " BGP_INSTANCE_ALL_CMD " [json]", + "show bgp all [json]", SHOW_STR BGP_STR BGP_INSTANCE_ALL_HELP_STR @@ -8883,7 +8883,7 @@ DEFUN (show_bgp_instance_all, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " ipv6 X:X::X:X [json]", + * "show bgp WORD ipv6 X:X::X:X [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -8894,7 +8894,7 @@ DEFUN (show_bgp_instance_all, */ DEFUN (show_bgp_instance_route, show_bgp_instance_route_cmd, - "show bgp " BGP_INSTANCE_CMD " X:X::X:X [json]", + "show bgp WORD X:X::X:X [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -8909,7 +8909,7 @@ DEFUN (show_bgp_instance_route, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " ipv6 X:X::X:X (bestpath|multipath) [json]", + * "show bgp WORD ipv6 X:X::X:X (bestpath|multipath) [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -8922,7 +8922,7 @@ DEFUN (show_bgp_instance_route, */ DEFUN (show_bgp_instance_route_pathtype, show_bgp_instance_route_pathtype_cmd, - "show bgp " BGP_INSTANCE_CMD " X:X::X:X [json]", + "show bgp WORD X:X::X:X [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -8944,7 +8944,7 @@ DEFUN (show_bgp_instance_route_pathtype, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " ipv6 X:X::X:X/M [json]", + * "show bgp WORD ipv6 X:X::X:X/M [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -8955,7 +8955,7 @@ DEFUN (show_bgp_instance_route_pathtype, */ DEFUN (show_bgp_instance_prefix, show_bgp_instance_prefix_cmd, - "show bgp " BGP_INSTANCE_CMD " X:X::X:X/M [json]", + "show bgp WORD X:X::X:X/M [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -8970,7 +8970,7 @@ DEFUN (show_bgp_instance_prefix, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " ipv6 X:X::X:X/M (bestpath|multipath) [json]", + * "show bgp WORD ipv6 X:X::X:X/M (bestpath|multipath) [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -8983,7 +8983,7 @@ DEFUN (show_bgp_instance_prefix, */ DEFUN (show_bgp_instance_prefix_pathtype, show_bgp_instance_prefix_pathtype_cmd, - "show bgp " BGP_INSTANCE_CMD " X:X::X:X/M [json]", + "show bgp WORD X:X::X:X/M [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -9005,7 +9005,7 @@ DEFUN (show_bgp_instance_prefix_pathtype, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " ipv6 prefix-list WORD", + * "show bgp WORD ipv6 prefix-list WORD", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -9016,7 +9016,7 @@ DEFUN (show_bgp_instance_prefix_pathtype, */ DEFUN (show_bgp_instance_prefix_list, show_bgp_instance_prefix_list_cmd, - "show bgp " BGP_INSTANCE_CMD " prefix-list WORD", + "show bgp WORD prefix-list WORD", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -9032,7 +9032,7 @@ DEFUN (show_bgp_instance_prefix_list, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " ipv6 filter-list WORD", + * "show bgp WORD ipv6 filter-list WORD", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -9043,7 +9043,7 @@ DEFUN (show_bgp_instance_prefix_list, */ DEFUN (show_bgp_instance_filter_list, show_bgp_instance_filter_list_cmd, - "show bgp " BGP_INSTANCE_CMD " filter-list WORD", + "show bgp WORD filter-list WORD", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -9059,7 +9059,7 @@ DEFUN (show_bgp_instance_filter_list, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " ipv6 route-map WORD", + * "show bgp WORD ipv6 route-map WORD", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -9070,7 +9070,7 @@ DEFUN (show_bgp_instance_filter_list, */ DEFUN (show_bgp_instance_route_map, show_bgp_instance_route_map_cmd, - "show bgp " BGP_INSTANCE_CMD " route-map WORD", + "show bgp WORD route-map WORD", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -9086,7 +9086,7 @@ DEFUN (show_bgp_instance_route_map, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " ipv6 community-list (<1-500>|WORD)", + * "show bgp WORD ipv6 community-list (<1-500>|WORD)", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -9098,7 +9098,7 @@ DEFUN (show_bgp_instance_route_map, */ DEFUN (show_bgp_instance_community_list, show_bgp_instance_community_list_cmd, - "show bgp " BGP_INSTANCE_CMD " community-list <(1-500)|WORD>", + "show bgp WORD community-list <(1-500)|WORD>", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -9114,7 +9114,7 @@ DEFUN (show_bgp_instance_community_list, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " ipv6 X:X::X:X/M longer-prefixes", + * "show bgp WORD ipv6 X:X::X:X/M longer-prefixes", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -9125,7 +9125,7 @@ DEFUN (show_bgp_instance_community_list, */ DEFUN (show_bgp_instance_prefix_longer, show_bgp_instance_prefix_longer_cmd, - "show bgp " BGP_INSTANCE_CMD " X:X::X:X/M longer-prefixes", + "show bgp WORD X:X::X:X/M longer-prefixes", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -9387,7 +9387,7 @@ DEFUN (show_ip_bgp_prefix_list, DEFUN (show_ip_bgp_instance_prefix_list, show_ip_bgp_instance_prefix_list_cmd, - "show ip bgp " BGP_INSTANCE_CMD " prefix-list WORD", + "show ip bgp WORD prefix-list WORD", SHOW_STR IP_STR BGP_STR @@ -9549,7 +9549,7 @@ DEFUN (show_ip_bgp_filter_list, DEFUN (show_ip_bgp_instance_filter_list, show_ip_bgp_instance_filter_list_cmd, - "show ip bgp " BGP_INSTANCE_CMD " filter-list WORD", + "show ip bgp WORD filter-list WORD", SHOW_STR IP_STR BGP_STR @@ -9787,7 +9787,7 @@ DEFUN (show_ip_bgp_route_map, DEFUN (show_ip_bgp_instance_route_map, show_ip_bgp_instance_route_map_cmd, - "show ip bgp " BGP_INSTANCE_CMD " route-map WORD", + "show ip bgp WORD route-map WORD", SHOW_STR IP_STR BGP_STR @@ -10246,7 +10246,7 @@ DEFUN (show_ip_bgp_ipv4_community, DEFUN (show_bgp_instance_afi_safi_community_all, show_bgp_instance_afi_safi_community_all_cmd, - "show bgp " BGP_INSTANCE_CMD " community", + "show bgp WORD community", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -10278,7 +10278,7 @@ DEFUN (show_bgp_instance_afi_safi_community_all, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " (ipv4|ipv6) (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", + * "show bgp WORD (ipv4|ipv6) (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -10300,7 +10300,7 @@ DEFUN (show_bgp_instance_afi_safi_community_all, * "Do not advertise to any peer (well-known community)\n" * "Do not export to next AS (well-known community)\n" * - * "show bgp " BGP_INSTANCE_CMD " (ipv4|ipv6) (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", + * "show bgp WORD (ipv4|ipv6) (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -10326,7 +10326,7 @@ DEFUN (show_bgp_instance_afi_safi_community_all, * "Do not advertise to any peer (well-known community)\n" * "Do not export to next AS (well-known community)\n" * - * "show bgp " BGP_INSTANCE_CMD " (ipv4|ipv6) (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", + * "show bgp WORD (ipv4|ipv6) (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -10347,7 +10347,7 @@ DEFUN (show_bgp_instance_afi_safi_community_all, */ DEFUN (show_bgp_instance_afi_safi_community, show_bgp_instance_afi_safi_community_cmd, - "show bgp " BGP_INSTANCE_CMD " community ", + "show bgp WORD community ", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -11208,7 +11208,7 @@ DEFUN (show_ip_bgp_community_list, DEFUN (show_ip_bgp_instance_community_list, show_ip_bgp_instance_community_list_cmd, - "show ip bgp " BGP_INSTANCE_CMD " community-list <(1-500)|WORD>", + "show ip bgp WORD community-list <(1-500)|WORD>", SHOW_STR IP_STR BGP_STR @@ -11441,7 +11441,7 @@ DEFUN (show_ip_bgp_prefix_longer, DEFUN (show_ip_bgp_instance_prefix_longer, show_ip_bgp_instance_prefix_longer_cmd, - "show ip bgp " BGP_INSTANCE_CMD " A.B.C.D/M longer-prefixes", + "show ip bgp WORD A.B.C.D/M longer-prefixes", SHOW_STR IP_STR BGP_STR @@ -12032,7 +12032,7 @@ DEFUN (show_bgp_statistics, DEFUN (show_bgp_statistics_view, show_bgp_statistics_view_cmd, - "show bgp " BGP_INSTANCE_CMD " statistics", + "show bgp WORD statistics", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -12266,7 +12266,7 @@ DEFUN (show_ip_bgp_neighbor_prefix_counts, DEFUN (show_ip_bgp_instance_neighbor_prefix_counts, show_ip_bgp_instance_neighbor_prefix_counts_cmd, - "show ip bgp " BGP_INSTANCE_CMD " neighbors prefix-counts [json]", + "show ip bgp WORD neighbors prefix-counts [json]", SHOW_STR IP_STR BGP_STR @@ -12316,7 +12316,7 @@ DEFUN (show_bgp_ipv6_neighbor_prefix_counts, DEFUN (show_bgp_instance_ipv6_neighbor_prefix_counts, show_bgp_instance_ipv6_neighbor_prefix_counts_cmd, - "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors prefix-counts [json]", + "show bgp WORD ipv6 neighbors prefix-counts [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -12640,7 +12640,7 @@ peer_adj_routes (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ip bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes route-map WORD [json]", + * "show ip bgp WORD neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes route-map WORD [json]", * SHOW_STR * IP_STR * BGP_STR @@ -12655,7 +12655,7 @@ peer_adj_routes (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi, */ DEFUN (show_ip_bgp_instance_neighbor_advertised_route, show_ip_bgp_instance_neighbor_advertised_route_cmd, - "show ip bgp " BGP_INSTANCE_CMD " neighbors advertised-routes [json]", + "show ip bgp WORD neighbors advertised-routes [json]", SHOW_STR IP_STR BGP_STR @@ -12787,7 +12787,7 @@ DEFUN (show_ip_bgp_ipv4_neighbor_advertised_route, #ifdef HAVE_IPV6 /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes [json]", + * "show bgp WORD ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) advertised-routes [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -12802,7 +12802,7 @@ DEFUN (show_ip_bgp_ipv4_neighbor_advertised_route, */ DEFUN (show_bgp_instance_neighbor_advertised_route, show_bgp_instance_neighbor_advertised_route_cmd, - "show bgp " BGP_INSTANCE_CMD " neighbors advertised-routes [json]", + "show bgp WORD neighbors advertised-routes [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -12918,7 +12918,7 @@ DEFUN (ipv6_mbgp_neighbor_advertised_route, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) received-routes [json]", + * "show bgp WORD ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) received-routes [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -12933,7 +12933,7 @@ DEFUN (ipv6_mbgp_neighbor_advertised_route, */ DEFUN (show_bgp_instance_neighbor_received_routes, show_bgp_instance_neighbor_received_routes_cmd, - "show bgp " BGP_INSTANCE_CMD " neighbors received-routes [json]", + "show bgp WORD neighbors received-routes [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -12958,7 +12958,7 @@ DEFUN (show_bgp_instance_neighbor_received_routes, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ip bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) received-routes route-map WORD [json]", + * "show ip bgp WORD neighbors (A.B.C.D|X:X::X:X|WORD) received-routes route-map WORD [json]", * SHOW_STR * IP_STR * BGP_STR @@ -12973,7 +12973,7 @@ DEFUN (show_bgp_instance_neighbor_received_routes, */ DEFUN (show_ip_bgp_instance_neighbor_received_routes, show_ip_bgp_instance_neighbor_received_routes_cmd, - "show ip bgp " BGP_INSTANCE_CMD " neighbors received-routes [json]", + "show ip bgp WORD neighbors received-routes [json]", SHOW_STR IP_STR BGP_STR @@ -13101,7 +13101,7 @@ DEFUN (show_ip_bgp_ipv4_neighbor_received_routes, DEFUN (show_bgp_instance_afi_safi_neighbor_adv_recd_routes, show_bgp_instance_afi_safi_neighbor_adv_recd_routes_cmd, - "show bgp " BGP_INSTANCE_CMD " neighbors [json]", + "show bgp WORD neighbors [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -13535,7 +13535,7 @@ DEFUN (ipv6_mbgp_neighbor_received_routes, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) received prefix-filter [json]", + * "show bgp WORD ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) received prefix-filter [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -13551,7 +13551,7 @@ DEFUN (ipv6_mbgp_neighbor_received_routes, */ DEFUN (show_bgp_instance_neighbor_received_prefix_filter, show_bgp_instance_neighbor_received_prefix_filter_cmd, - "show bgp " BGP_INSTANCE_CMD " neighbors received prefix-filter [json]", + "show bgp WORD neighbors received prefix-filter [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -13694,7 +13694,7 @@ DEFUN (show_ip_bgp_neighbor_routes, DEFUN (show_ip_bgp_instance_neighbor_routes, show_ip_bgp_instance_neighbor_routes_cmd, - "show ip bgp " BGP_INSTANCE_CMD " neighbors routes [json]", + "show ip bgp WORD neighbors routes [json]", SHOW_STR IP_STR BGP_STR @@ -13805,7 +13805,7 @@ DEFUN (show_ip_bgp_ipv4_neighbor_routes, #ifdef HAVE_IPV6 /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) routes [json]", + * "show bgp WORD ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) routes [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -13820,7 +13820,7 @@ DEFUN (show_ip_bgp_ipv4_neighbor_routes, */ DEFUN (show_bgp_instance_neighbor_routes, show_bgp_instance_neighbor_routes_cmd, - "show bgp " BGP_INSTANCE_CMD " neighbors routes [json]", + "show bgp WORD neighbors routes [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -13857,7 +13857,7 @@ DEFUN (show_bgp_instance_neighbor_routes, * "Display the dampened routes received from neighbor\n" * "JavaScript Object Notation\n" * - * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) dampened-routes [json]", + * "show bgp WORD ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) dampened-routes [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -13883,7 +13883,7 @@ DEFUN (show_bgp_instance_neighbor_routes, */ DEFUN (show_bgp_instance_neighbor_damp, show_bgp_instance_neighbor_damp_cmd, - "show bgp " BGP_INSTANCE_CMD " neighbors dampened-routes [json]", + "show bgp WORD neighbors dampened-routes [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -13926,7 +13926,7 @@ DEFUN (show_bgp_instance_neighbor_damp, * "Display flap statistics of the routes learned from neighbor\n" * "JavaScript Object Notation\n" * - * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) flap-statistics [json]", + * "show bgp WORD ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) flap-statistics [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -13952,7 +13952,7 @@ DEFUN (show_bgp_instance_neighbor_damp, */ DEFUN (show_bgp_instance_neighbor_flap, show_bgp_instance_neighbor_flap_cmd, - "show bgp " BGP_INSTANCE_CMD " neighbors flap-statistics [json]", + "show bgp WORD neighbors flap-statistics [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index 0b43b14e6..e1d8ca896 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -3846,7 +3846,7 @@ DEFUN (no_set_weight, */ DEFUN (set_aspath_prepend, set_aspath_prepend_cmd, - "set as-path prepend ." CMD_AS_RANGE, + "set as-path prepend . (1-4294967295)", SET_STR "Transform BGP AS_PATH attribute\n" "Prepend to the as-path\n" @@ -3865,7 +3865,7 @@ DEFUN (set_aspath_prepend, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no set as-path prepend ." CMD_AS_RANGE, + * "no set as-path prepend . (1-4294967295)", * NO_STR * SET_STR * "Transform BGP AS_PATH attribute\n" @@ -3893,7 +3893,7 @@ DEFUN (no_set_aspath_prepend, DEFUN (set_aspath_exclude, set_aspath_exclude_cmd, - "set as-path exclude ." CMD_AS_RANGE, + "set as-path exclude . (1-4294967295)", SET_STR "Transform BGP AS-path attribute\n" "Exclude from the as-path\n" @@ -3910,7 +3910,7 @@ DEFUN (set_aspath_exclude, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no set as-path exclude ." CMD_AS_RANGE, + * "no set as-path exclude . (1-4294967295)", * NO_STR * SET_STR * "Transform BGP AS_PATH attribute\n" @@ -4254,7 +4254,7 @@ DEFUN (no_set_atomic_aggregate, DEFUN (set_aggregator_as, set_aggregator_as_cmd, - "set aggregator as " CMD_AS_RANGE " A.B.C.D", + "set aggregator as (1-4294967295) A.B.C.D", SET_STR "BGP aggregator attribute\n" "AS number of aggregator\n" @@ -4288,7 +4288,7 @@ DEFUN (set_aggregator_as, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no set aggregator as " CMD_AS_RANGE " A.B.C.D", + * "no set aggregator as (1-4294967295) A.B.C.D", * NO_STR * SET_STR * "BGP aggregator attribute\n" diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index c7d0102a4..f1411ea5e 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -662,7 +662,7 @@ DEFUN (no_auto_summary, * ROUTER_STR * BGP_STR * - * "router bgp " CMD_AS_RANGE " (view|vrf) WORD", + * "router bgp (1-4294967295) (view|vrf) WORD", * ROUTER_STR * BGP_STR * AS_STR @@ -672,7 +672,7 @@ DEFUN (no_auto_summary, */ DEFUN (router_bgp, router_bgp_cmd, - "router bgp " CMD_AS_RANGE, + "router bgp (1-4294967295)", ROUTER_STR BGP_STR AS_STR) @@ -752,7 +752,7 @@ DEFUN (router_bgp, * ROUTER_STR * BGP_STR * - * "no router bgp " CMD_AS_RANGE " (view|vrf) WORD", + * "no router bgp (1-4294967295) (view|vrf) WORD", * NO_STR * ROUTER_STR * BGP_STR @@ -763,7 +763,7 @@ DEFUN (router_bgp, */ DEFUN (no_router_bgp, no_router_bgp_cmd, - "no router bgp " CMD_AS_RANGE, + "no router bgp (1-4294967295)", NO_STR ROUTER_STR BGP_STR @@ -938,7 +938,7 @@ DEFUN (no_bgp_cluster_id, DEFUN (bgp_confederation_identifier, bgp_confederation_identifier_cmd, - "bgp confederation identifier " CMD_AS_RANGE, + "bgp confederation identifier (1-4294967295)", "BGP specific commands\n" "AS confederation parameters\n" "AS number\n" @@ -975,7 +975,7 @@ DEFUN (no_bgp_confederation_identifier, DEFUN (bgp_confederation_peers, bgp_confederation_peers_cmd, - "bgp confederation peers ." CMD_AS_RANGE, + "bgp confederation peers . (1-4294967295)", "BGP specific commands\n" "AS confederation parameters\n" "Peer ASs in BGP confederation\n" @@ -1005,7 +1005,7 @@ DEFUN (bgp_confederation_peers, DEFUN (no_bgp_confederation_peers, no_bgp_confederation_peers_cmd, - "no bgp confederation peers ." CMD_AS_RANGE, + "no bgp confederation peers . (1-4294967295)", NO_STR "BGP specific commands\n" "AS confederation parameters\n" @@ -1415,7 +1415,7 @@ DEFUN (no_bgp_coalesce_time, /* Maximum-paths configuration */ DEFUN (bgp_maxpaths, bgp_maxpaths_cmd, - "maximum-paths " CMD_RANGE_STR(1, MULTIPATH_NUM), + "maximum-paths (1-255)", "Forward packets over multiple paths\n" "Number of paths\n") { @@ -1425,7 +1425,7 @@ DEFUN (bgp_maxpaths, DEFUN (bgp_maxpaths_ibgp, bgp_maxpaths_ibgp_cmd, - "maximum-paths ibgp " CMD_RANGE_STR(1, MULTIPATH_NUM), + "maximum-paths ibgp (1-255)", "Forward packets over multiple paths\n" "iBGP-multipath\n" "Number of paths\n") @@ -1436,7 +1436,7 @@ DEFUN (bgp_maxpaths_ibgp, DEFUN (bgp_maxpaths_ibgp_cluster, bgp_maxpaths_ibgp_cluster_cmd, - "maximum-paths ibgp " CMD_RANGE_STR(1, MULTIPATH_NUM) " equal-cluster-length", + "maximum-paths ibgp (1-255) equal-cluster-length", "Forward packets over multiple paths\n" "iBGP-multipath\n" "Number of paths\n" @@ -1449,7 +1449,7 @@ DEFUN (bgp_maxpaths_ibgp_cluster, DEFUN (no_bgp_maxpaths, no_bgp_maxpaths_cmd, - "no maximum-paths [" CMD_RANGE_STR(1, MULTIPATH_NUM) "]", + "no maximum-paths [(1-255)]", NO_STR "Forward packets over multiple paths\n" "Number of paths\n") @@ -1459,7 +1459,7 @@ DEFUN (no_bgp_maxpaths, DEFUN (no_bgp_maxpaths_ibgp, no_bgp_maxpaths_ibgp_cmd, - "no maximum-paths ibgp [" CMD_RANGE_STR(1, MULTIPATH_NUM) " [equal-cluster-length]]", + "no maximum-paths ibgp [(1-255) [equal-cluster-length]]", NO_STR "Forward packets over multiple paths\n" "iBGP-multipath\n" @@ -2357,7 +2357,7 @@ DEFUN (no_bgp_rr_allow_outbound_policy, DEFUN (bgp_listen_limit, bgp_listen_limit_cmd, - "bgp listen limit " DYNAMIC_NEIGHBOR_LIMIT_RANGE, + "bgp listen limit (1-5000)", "BGP specific commands\n" "Configure BGP defaults\n" "maximum number of BGP Dynamic Neighbors that can be created\n" @@ -2429,7 +2429,7 @@ listen_range_exists (struct bgp *bgp, struct prefix *range, int exact) DEFUN (bgp_listen_range, bgp_listen_range_cmd, - LISTEN_RANGE_CMD "peer-group WORD" , + "bgp listen range peer-group WORD", "BGP specific commands\n" "Configure BGP Dynamic Neighbors\n" "add a listening range for Dynamic Neighbors\n" @@ -2503,7 +2503,7 @@ DEFUN (bgp_listen_range, DEFUN (no_bgp_listen_range, no_bgp_listen_range_cmd, - "no bgp listen range A.B.C.D/M peer-group WORD" , + "no bgp listen range A.B.C.D/M peer-group WORD", "BGP specific commands\n" "Configure BGP defaults\n" "delete a listening range for Dynamic Neighbors\n" @@ -2688,7 +2688,7 @@ peer_remote_as_vty (struct vty *vty, const char *peer_str, DEFUN (neighbor_remote_as, neighbor_remote_as_cmd, - NEIGHBOR_CMD2 "remote-as <" CMD_AS_RANGE "|external|internal>", + "neighbor remote-as <(1-4294967295)|external|internal>", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Specify a BGP neighbor\n" @@ -2855,7 +2855,7 @@ DEFUN (neighbor_interface_config_v6only, DEFUN (neighbor_interface_config_remote_as, neighbor_interface_config_remote_as_cmd, - "neighbor WORD interface remote-as <" CMD_AS_RANGE "|external|internal>", + "neighbor WORD interface remote-as <(1-4294967295)|external|internal>", NEIGHBOR_STR "Interface name or neighbor tag\n" "Enable BGP on interface\n" @@ -2869,7 +2869,7 @@ DEFUN (neighbor_interface_config_remote_as, DEFUN (neighbor_interface_v6only_config_remote_as, neighbor_interface_v6only_config_remote_as_cmd, - "neighbor WORD interface v6only remote-as <" CMD_AS_RANGE "|external|internal>", + "neighbor WORD interface v6only remote-as <(1-4294967295)|external|internal>", NEIGHBOR_STR "Interface name or neighbor tag\n" "Enable BGP on interface\n" @@ -2920,7 +2920,7 @@ DEFUN (neighbor_peer_group, */ DEFUN (no_neighbor, no_neighbor_cmd, - NO_NEIGHBOR_CMD2, + "no neighbor ", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2) @@ -2980,7 +2980,7 @@ DEFUN (no_neighbor, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no neighbor WORD interface remote-as (" CMD_AS_RANGE "|internal|external)", + * "no neighbor WORD interface remote-as ((1-4294967295)|internal|external)", * NO_STR * NEIGHBOR_STR * "Interface name\n" @@ -2996,7 +2996,7 @@ DEFUN (no_neighbor, * "Member of the peer-group\n" * "peer-group name\n" * - * "no neighbor WORD interface v6only remote-as (" CMD_AS_RANGE "|internal|external)", + * "no neighbor WORD interface v6only remote-as ((1-4294967295)|internal|external)", * NO_STR * NEIGHBOR_STR * "Interface name\n" @@ -3072,7 +3072,7 @@ DEFUN (no_neighbor_peer_group, DEFUN (no_neighbor_interface_peer_group_remote_as, no_neighbor_interface_peer_group_remote_as_cmd, - "no neighbor WORD remote-as <" CMD_AS_RANGE "|internal|external>", + "no neighbor WORD remote-as <(1-4294967295)|internal|external>", NO_STR NEIGHBOR_STR "Interface name or neighbor tag\n" @@ -3104,7 +3104,7 @@ DEFUN (no_neighbor_interface_peer_group_remote_as, DEFUN (neighbor_local_as, neighbor_local_as_cmd, - NEIGHBOR_CMD2 "local-as " CMD_AS_RANGE, + "neighbor local-as (1-4294967295)", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Specify a local-as number\n" @@ -3125,7 +3125,7 @@ DEFUN (neighbor_local_as, DEFUN (neighbor_local_as_no_prepend, neighbor_local_as_no_prepend_cmd, - NEIGHBOR_CMD2 "local-as " CMD_AS_RANGE " no-prepend", + "neighbor local-as (1-4294967295) no-prepend", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Specify a local-as number\n" @@ -3147,7 +3147,7 @@ DEFUN (neighbor_local_as_no_prepend, DEFUN (neighbor_local_as_no_prepend_replace_as, neighbor_local_as_no_prepend_replace_as_cmd, - NEIGHBOR_CMD2 "local-as " CMD_AS_RANGE " no-prepend replace-as", + "neighbor local-as (1-4294967295) no-prepend replace-as", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Specify a local-as number\n" @@ -3198,7 +3198,7 @@ DEFUN (neighbor_local_as_no_prepend_replace_as, */ DEFUN (no_neighbor_local_as, no_neighbor_local_as_cmd, - NO_NEIGHBOR_CMD2 "local-as", + "no neighbor local-as", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -3221,7 +3221,7 @@ DEFUN (no_neighbor_local_as, DEFUN (neighbor_solo, neighbor_solo_cmd, - NEIGHBOR_CMD2 "solo", + "neighbor solo", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Solo peer - part of its own update group\n") @@ -3240,7 +3240,7 @@ DEFUN (neighbor_solo, DEFUN (no_neighbor_solo, no_neighbor_solo_cmd, - NO_NEIGHBOR_CMD2 "solo", + "no neighbor solo", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -3260,7 +3260,7 @@ DEFUN (no_neighbor_solo, DEFUN (neighbor_password, neighbor_password_cmd, - NEIGHBOR_CMD2 "password LINE", + "neighbor password LINE", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Set a password\n" @@ -3291,7 +3291,7 @@ DEFUN (neighbor_password, */ DEFUN (no_neighbor_password, no_neighbor_password_cmd, - NO_NEIGHBOR_CMD2 "password", + "no neighbor password", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -3312,7 +3312,7 @@ DEFUN (no_neighbor_password, DEFUN (neighbor_activate, neighbor_activate_cmd, - NEIGHBOR_CMD2 "activate", + "neighbor activate", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Enable the Address Family for this Neighbor\n") @@ -3334,7 +3334,7 @@ DEFUN (neighbor_activate, DEFUN (no_neighbor_activate, no_neighbor_activate_cmd, - NO_NEIGHBOR_CMD2 "activate", + "no neighbor activate", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -3358,7 +3358,7 @@ DEFUN (no_neighbor_activate, DEFUN (neighbor_set_peer_group, neighbor_set_peer_group_cmd, - NEIGHBOR_CMD2 "peer-group WORD", + "neighbor peer-group WORD", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Member of the peer-group\n" @@ -3425,7 +3425,7 @@ DEFUN (neighbor_set_peer_group, DEFUN (no_neighbor_set_peer_group, no_neighbor_set_peer_group_cmd, - NO_NEIGHBOR_CMD2 "peer-group WORD", + "no neighbor peer-group WORD", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -3501,7 +3501,7 @@ peer_flag_unset_vty (struct vty *vty, const char *ip_str, u_int16_t flag) /* neighbor passive. */ DEFUN (neighbor_passive, neighbor_passive_cmd, - NEIGHBOR_CMD2 "passive", + "neighbor passive", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Don't send open messages to this neighbor\n") @@ -3512,7 +3512,7 @@ DEFUN (neighbor_passive, DEFUN (no_neighbor_passive, no_neighbor_passive_cmd, - NO_NEIGHBOR_CMD2 "passive", + "no neighbor passive", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -3525,7 +3525,7 @@ DEFUN (no_neighbor_passive, /* neighbor shutdown. */ DEFUN (neighbor_shutdown, neighbor_shutdown_cmd, - NEIGHBOR_CMD2 "shutdown", + "neighbor shutdown", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Administratively shut down this neighbor\n") @@ -3536,7 +3536,7 @@ DEFUN (neighbor_shutdown, DEFUN (no_neighbor_shutdown, no_neighbor_shutdown_cmd, - NO_NEIGHBOR_CMD2 "shutdown", + "no neighbor shutdown", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -3549,7 +3549,7 @@ DEFUN (no_neighbor_shutdown, /* neighbor capability dynamic. */ DEFUN (neighbor_capability_dynamic, neighbor_capability_dynamic_cmd, - NEIGHBOR_CMD2 "capability dynamic", + "neighbor capability dynamic", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Advertise capability to the peer\n" @@ -3561,7 +3561,7 @@ DEFUN (neighbor_capability_dynamic, DEFUN (no_neighbor_capability_dynamic, no_neighbor_capability_dynamic_cmd, - NO_NEIGHBOR_CMD2 "capability dynamic", + "no neighbor capability dynamic", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -3575,7 +3575,7 @@ DEFUN (no_neighbor_capability_dynamic, /* neighbor dont-capability-negotiate */ DEFUN (neighbor_dont_capability_negotiate, neighbor_dont_capability_negotiate_cmd, - NEIGHBOR_CMD2 "dont-capability-negotiate", + "neighbor dont-capability-negotiate", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Do not perform capability negotiation\n") @@ -3586,7 +3586,7 @@ DEFUN (neighbor_dont_capability_negotiate, DEFUN (no_neighbor_dont_capability_negotiate, no_neighbor_dont_capability_negotiate_cmd, - NO_NEIGHBOR_CMD2 "dont-capability-negotiate", + "no neighbor dont-capability-negotiate", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -3599,7 +3599,7 @@ DEFUN (no_neighbor_dont_capability_negotiate, /* neighbor capability extended next hop encoding */ DEFUN (neighbor_capability_enhe, neighbor_capability_enhe_cmd, - NEIGHBOR_CMD2 "capability extended-nexthop", + "neighbor capability extended-nexthop", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Advertise capability to the peer\n" @@ -3611,7 +3611,7 @@ DEFUN (neighbor_capability_enhe, DEFUN (no_neighbor_capability_enhe, no_neighbor_capability_enhe_cmd, - NO_NEIGHBOR_CMD2 "capability extended-nexthop", + "no neighbor capability extended-nexthop", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -3658,7 +3658,7 @@ peer_af_flag_unset_vty (struct vty *vty, const char *peer_str, afi_t afi, /* neighbor capability orf prefix-list. */ DEFUN (neighbor_capability_orf_prefix, neighbor_capability_orf_prefix_cmd, - NEIGHBOR_CMD2 "capability orf prefix-list ", + "neighbor capability orf prefix-list ", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Advertise capability to the peer\n" @@ -3687,7 +3687,7 @@ DEFUN (neighbor_capability_orf_prefix, DEFUN (no_neighbor_capability_orf_prefix, no_neighbor_capability_orf_prefix_cmd, - NO_NEIGHBOR_CMD2 "capability orf prefix-list ", + "no neighbor capability orf prefix-list ", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -3718,7 +3718,7 @@ DEFUN (no_neighbor_capability_orf_prefix, /* neighbor next-hop-self. */ DEFUN (neighbor_nexthop_self, neighbor_nexthop_self_cmd, - NEIGHBOR_CMD2 "next-hop-self", + "neighbor next-hop-self", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Disable the next hop calculation for this neighbor\n") @@ -3731,7 +3731,7 @@ DEFUN (neighbor_nexthop_self, /* neighbor next-hop-self. */ DEFUN (neighbor_nexthop_self_force, neighbor_nexthop_self_force_cmd, - NEIGHBOR_CMD2 "next-hop-self force", + "neighbor next-hop-self force", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Disable the next hop calculation for this neighbor\n" @@ -3745,7 +3745,7 @@ DEFUN (neighbor_nexthop_self_force, DEFUN (no_neighbor_nexthop_self, no_neighbor_nexthop_self_cmd, - NO_NEIGHBOR_CMD2 "next-hop-self", + "no neighbor next-hop-self", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -3759,7 +3759,7 @@ DEFUN (no_neighbor_nexthop_self, DEFUN (no_neighbor_nexthop_self_force, no_neighbor_nexthop_self_force_cmd, - NO_NEIGHBOR_CMD2 "next-hop-self force", + "no neighbor next-hop-self force", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -3775,7 +3775,7 @@ DEFUN (no_neighbor_nexthop_self_force, /* neighbor as-override */ DEFUN (neighbor_as_override, neighbor_as_override_cmd, - NEIGHBOR_CMD2 "as-override", + "neighbor as-override", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Override ASNs in outbound updates if aspath equals remote-as\n") @@ -3788,7 +3788,7 @@ DEFUN (neighbor_as_override, DEFUN (no_neighbor_as_override, no_neighbor_as_override_cmd, - NO_NEIGHBOR_CMD2 "as-override", + "no neighbor as-override", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -3803,7 +3803,7 @@ DEFUN (no_neighbor_as_override, /* neighbor remove-private-AS. */ DEFUN (neighbor_remove_private_as, neighbor_remove_private_as_cmd, - NEIGHBOR_CMD2 "remove-private-AS", + "neighbor remove-private-AS", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Remove private ASNs in outbound updates\n") @@ -3816,7 +3816,7 @@ DEFUN (neighbor_remove_private_as, DEFUN (neighbor_remove_private_as_all, neighbor_remove_private_as_all_cmd, - NEIGHBOR_CMD2 "remove-private-AS all", + "neighbor remove-private-AS all", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Remove private ASNs in outbound updates\n" @@ -3830,7 +3830,7 @@ DEFUN (neighbor_remove_private_as_all, DEFUN (neighbor_remove_private_as_replace_as, neighbor_remove_private_as_replace_as_cmd, - NEIGHBOR_CMD2 "remove-private-AS replace-AS", + "neighbor remove-private-AS replace-AS", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Remove private ASNs in outbound updates\n" @@ -3844,7 +3844,7 @@ DEFUN (neighbor_remove_private_as_replace_as, DEFUN (neighbor_remove_private_as_all_replace_as, neighbor_remove_private_as_all_replace_as_cmd, - NEIGHBOR_CMD2 "remove-private-AS all replace-AS", + "neighbor remove-private-AS all replace-AS", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Remove private ASNs in outbound updates\n" @@ -3859,7 +3859,7 @@ DEFUN (neighbor_remove_private_as_all_replace_as, DEFUN (no_neighbor_remove_private_as, no_neighbor_remove_private_as_cmd, - NO_NEIGHBOR_CMD2 "remove-private-AS", + "no neighbor remove-private-AS", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -3873,7 +3873,7 @@ DEFUN (no_neighbor_remove_private_as, DEFUN (no_neighbor_remove_private_as_all, no_neighbor_remove_private_as_all_cmd, - NO_NEIGHBOR_CMD2 "remove-private-AS all", + "no neighbor remove-private-AS all", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -3888,7 +3888,7 @@ DEFUN (no_neighbor_remove_private_as_all, DEFUN (no_neighbor_remove_private_as_replace_as, no_neighbor_remove_private_as_replace_as_cmd, - NO_NEIGHBOR_CMD2 "remove-private-AS replace-AS", + "no neighbor remove-private-AS replace-AS", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -3903,7 +3903,7 @@ DEFUN (no_neighbor_remove_private_as_replace_as, DEFUN (no_neighbor_remove_private_as_all_replace_as, no_neighbor_remove_private_as_all_replace_as_cmd, - NO_NEIGHBOR_CMD2 "remove-private-AS all replace-AS", + "no neighbor remove-private-AS all replace-AS", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -3921,7 +3921,7 @@ DEFUN (no_neighbor_remove_private_as_all_replace_as, /* neighbor send-community. */ DEFUN (neighbor_send_community, neighbor_send_community_cmd, - NEIGHBOR_CMD2 "send-community", + "neighbor send-community", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Send Community attribute to this neighbor\n") @@ -3934,7 +3934,7 @@ DEFUN (neighbor_send_community, DEFUN (no_neighbor_send_community, no_neighbor_send_community_cmd, - NO_NEIGHBOR_CMD2 "send-community", + "no neighbor send-community", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -3949,7 +3949,7 @@ DEFUN (no_neighbor_send_community, /* neighbor send-community extended. */ DEFUN (neighbor_send_community_type, neighbor_send_community_type_cmd, - NEIGHBOR_CMD2 "send-community ", + "neighbor send-community ", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Send Community attribute to this neighbor\n" @@ -3976,7 +3976,7 @@ DEFUN (neighbor_send_community_type, DEFUN (no_neighbor_send_community_type, no_neighbor_send_community_type_cmd, - NO_NEIGHBOR_CMD2 "send-community ", + "no neighbor send-community ", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -4005,7 +4005,7 @@ DEFUN (no_neighbor_send_community_type, /* neighbor soft-reconfig. */ DEFUN (neighbor_soft_reconfiguration, neighbor_soft_reconfiguration_cmd, - NEIGHBOR_CMD2 "soft-reconfiguration inbound", + "neighbor soft-reconfiguration inbound", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Per neighbor soft reconfiguration\n" @@ -4019,7 +4019,7 @@ DEFUN (neighbor_soft_reconfiguration, DEFUN (no_neighbor_soft_reconfiguration, no_neighbor_soft_reconfiguration_cmd, - NO_NEIGHBOR_CMD2 "soft-reconfiguration inbound", + "no neighbor soft-reconfiguration inbound", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -4034,7 +4034,7 @@ DEFUN (no_neighbor_soft_reconfiguration, DEFUN (neighbor_route_reflector_client, neighbor_route_reflector_client_cmd, - NEIGHBOR_CMD2 "route-reflector-client", + "neighbor route-reflector-client", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Configure a neighbor as Route Reflector client\n") @@ -4054,7 +4054,7 @@ DEFUN (neighbor_route_reflector_client, DEFUN (no_neighbor_route_reflector_client, no_neighbor_route_reflector_client_cmd, - NO_NEIGHBOR_CMD2 "route-reflector-client", + "no neighbor route-reflector-client", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -4069,7 +4069,7 @@ DEFUN (no_neighbor_route_reflector_client, /* neighbor route-server-client. */ DEFUN (neighbor_route_server_client, neighbor_route_server_client_cmd, - NEIGHBOR_CMD2 "route-server-client", + "neighbor route-server-client", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Configure a neighbor as Route Server client\n") @@ -4087,7 +4087,7 @@ DEFUN (neighbor_route_server_client, DEFUN (no_neighbor_route_server_client, no_neighbor_route_server_client_cmd, - NO_NEIGHBOR_CMD2 "route-server-client", + "no neighbor route-server-client", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -4101,7 +4101,7 @@ DEFUN (no_neighbor_route_server_client, DEFUN (neighbor_nexthop_local_unchanged, neighbor_nexthop_local_unchanged_cmd, - NEIGHBOR_CMD2 "nexthop-local unchanged", + "neighbor nexthop-local unchanged", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Configure treatment of outgoing link-local nexthop attribute\n" @@ -4115,7 +4115,7 @@ DEFUN (neighbor_nexthop_local_unchanged, DEFUN (no_neighbor_nexthop_local_unchanged, no_neighbor_nexthop_local_unchanged_cmd, - NO_NEIGHBOR_CMD2 "nexthop-local unchanged", + "no neighbor nexthop-local unchanged", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -4181,7 +4181,7 @@ DEFUN (no_neighbor_nexthop_local_unchanged, */ DEFUN (neighbor_attr_unchanged, neighbor_attr_unchanged_cmd, - NEIGHBOR_CMD2 "attribute-unchanged", + "neighbor attribute-unchanged", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "BGP attribute is propagated unchanged to this neighbor\n") @@ -4196,7 +4196,7 @@ DEFUN (neighbor_attr_unchanged, DEFUN (neighbor_attr_unchanged1, neighbor_attr_unchanged1_cmd, - NEIGHBOR_CMD2 "attribute-unchanged ", + "neighbor attribute-unchanged ", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "BGP attribute is propagated unchanged to this neighbor\n" @@ -4221,7 +4221,7 @@ DEFUN (neighbor_attr_unchanged1, DEFUN (neighbor_attr_unchanged2, neighbor_attr_unchanged2_cmd, - NEIGHBOR_CMD2 "attribute-unchanged as-path ", + "neighbor attribute-unchanged as-path ", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "BGP attribute is propagated unchanged to this neighbor\n" @@ -4245,7 +4245,7 @@ DEFUN (neighbor_attr_unchanged2, DEFUN (neighbor_attr_unchanged3, neighbor_attr_unchanged3_cmd, - NEIGHBOR_CMD2 "attribute-unchanged next-hop ", + "neighbor attribute-unchanged next-hop ", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "BGP attribute is propagated unchanged to this neighbor\n" @@ -4268,7 +4268,7 @@ DEFUN (neighbor_attr_unchanged3, DEFUN (neighbor_attr_unchanged4, neighbor_attr_unchanged4_cmd, - NEIGHBOR_CMD2 "attribute-unchanged med ", + "neighbor attribute-unchanged med ", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "BGP attribute is propagated unchanged to this neighbor\n" @@ -4354,7 +4354,7 @@ DEFUN (neighbor_attr_unchanged4, */ DEFUN (no_neighbor_attr_unchanged, no_neighbor_attr_unchanged_cmd, - NO_NEIGHBOR_CMD2 "attribute-unchanged", + "no neighbor attribute-unchanged", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -4370,7 +4370,7 @@ DEFUN (no_neighbor_attr_unchanged, DEFUN (no_neighbor_attr_unchanged1, no_neighbor_attr_unchanged1_cmd, - NO_NEIGHBOR_CMD2 "attribute-unchanged ", + "no neighbor attribute-unchanged ", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -4396,7 +4396,7 @@ DEFUN (no_neighbor_attr_unchanged1, DEFUN (no_neighbor_attr_unchanged2, no_neighbor_attr_unchanged2_cmd, - NO_NEIGHBOR_CMD2 "attribute-unchanged as-path ", + "no neighbor attribute-unchanged as-path ", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -4420,7 +4420,7 @@ DEFUN (no_neighbor_attr_unchanged2, DEFUN (no_neighbor_attr_unchanged3, no_neighbor_attr_unchanged3_cmd, - NO_NEIGHBOR_CMD2 "attribute-unchanged next-hop ", + "no neighbor attribute-unchanged next-hop ", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -4444,7 +4444,7 @@ DEFUN (no_neighbor_attr_unchanged3, DEFUN (no_neighbor_attr_unchanged4, no_neighbor_attr_unchanged4_cmd, - NO_NEIGHBOR_CMD2 "attribute-unchanged med ", + "no neighbor attribute-unchanged med ", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -4510,7 +4510,7 @@ peer_ebgp_multihop_unset_vty (struct vty *vty, const char *ip_str) /* neighbor ebgp-multihop. */ DEFUN (neighbor_ebgp_multihop, neighbor_ebgp_multihop_cmd, - NEIGHBOR_CMD2 "ebgp-multihop", + "neighbor ebgp-multihop", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Allow EBGP neighbors not on directly connected networks\n") @@ -4521,7 +4521,7 @@ DEFUN (neighbor_ebgp_multihop, DEFUN (neighbor_ebgp_multihop_ttl, neighbor_ebgp_multihop_ttl_cmd, - NEIGHBOR_CMD2 "ebgp-multihop " CMD_RANGE_STR(1, MAXTTL), + "neighbor ebgp-multihop (1-255)", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Allow EBGP neighbors not on directly connected networks\n" @@ -4544,7 +4544,7 @@ DEFUN (neighbor_ebgp_multihop_ttl, */ DEFUN (no_neighbor_ebgp_multihop, no_neighbor_ebgp_multihop_cmd, - NO_NEIGHBOR_CMD2 "ebgp-multihop", + "no neighbor ebgp-multihop", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -4566,7 +4566,7 @@ DEFUN (no_neighbor_ebgp_multihop, */ DEFUN (neighbor_disable_connected_check, neighbor_disable_connected_check_cmd, - NEIGHBOR_CMD2 "disable-connected-check", + "neighbor disable-connected-check", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "one-hop away EBGP peer using loopback address\n") @@ -4586,7 +4586,7 @@ DEFUN (neighbor_disable_connected_check, */ DEFUN (no_neighbor_disable_connected_check, no_neighbor_disable_connected_check_cmd, - NO_NEIGHBOR_CMD2 "disable-connected-check", + "no neighbor disable-connected-check", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -4602,7 +4602,7 @@ DEFUN (no_neighbor_disable_connected_check, DEFUN (neighbor_description, neighbor_description_cmd, - NEIGHBOR_CMD2 "description .LINE", + "neighbor description .LINE", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Neighbor specific description\n" @@ -4640,7 +4640,7 @@ DEFUN (neighbor_description, */ DEFUN (no_neighbor_description, no_neighbor_description_cmd, - NO_NEIGHBOR_CMD2 "description", + "no neighbor description", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -4699,7 +4699,7 @@ peer_update_source_vty (struct vty *vty, const char *peer_str, DEFUN (neighbor_update_source, neighbor_update_source_cmd, - NEIGHBOR_CMD2 "update-source " BGP_UPDATE_SOURCE_REQ_STR, + "neighbor update-source ", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Source of routing updates\n" @@ -4712,7 +4712,7 @@ DEFUN (neighbor_update_source, DEFUN (no_neighbor_update_source, no_neighbor_update_source_cmd, - NO_NEIGHBOR_CMD2 "update-source " BGP_UPDATE_SOURCE_OPT_STR, + "no neighbor update-source [A.B.C.D|X:X::X:X|WORD]", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -4746,7 +4746,7 @@ peer_default_originate_set_vty (struct vty *vty, const char *peer_str, /* neighbor default-originate. */ DEFUN (neighbor_default_originate, neighbor_default_originate_cmd, - NEIGHBOR_CMD2 "default-originate", + "neighbor default-originate", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Originate default route to this neighbor\n") @@ -4758,7 +4758,7 @@ DEFUN (neighbor_default_originate, DEFUN (neighbor_default_originate_rmap, neighbor_default_originate_rmap_cmd, - NEIGHBOR_CMD2 "default-originate route-map WORD", + "neighbor default-originate route-map WORD", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Originate default route to this neighbor\n" @@ -4784,7 +4784,7 @@ DEFUN (neighbor_default_originate_rmap, */ DEFUN (no_neighbor_default_originate, no_neighbor_default_originate_cmd, - NO_NEIGHBOR_CMD2 "default-originate", + "no neighbor default-originate", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -4827,7 +4827,7 @@ peer_port_vty (struct vty *vty, const char *ip_str, int afi, /* Set specified peer's BGP port. */ DEFUN (neighbor_port, neighbor_port_cmd, - NEIGHBOR_CMD "port (0-65535)", + "neighbor port (0-65535)", NEIGHBOR_STR NEIGHBOR_ADDR_STR "Neighbor's BGP port\n" @@ -4840,7 +4840,7 @@ DEFUN (neighbor_port, DEFUN (no_neighbor_port, no_neighbor_port_cmd, - NO_NEIGHBOR_CMD "port [(0-65535)]", + "no neighbor port [(0-65535)]", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR @@ -4887,7 +4887,7 @@ peer_weight_unset_vty (struct vty *vty, const char *ip_str) DEFUN (neighbor_weight, neighbor_weight_cmd, - NEIGHBOR_CMD2 "weight (0-65535)", + "neighbor weight (0-65535)", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Set default weight for routes from this neighbor\n" @@ -4900,7 +4900,7 @@ DEFUN (neighbor_weight, DEFUN (no_neighbor_weight, no_neighbor_weight_cmd, - NO_NEIGHBOR_CMD2 "weight [(0-65535)]", + "no neighbor weight [(0-65535)]", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -4915,7 +4915,7 @@ DEFUN (no_neighbor_weight, /* Override capability negotiation. */ DEFUN (neighbor_override_capability, neighbor_override_capability_cmd, - NEIGHBOR_CMD2 "override-capability", + "neighbor override-capability", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Override capability negotiation result\n") @@ -4926,7 +4926,7 @@ DEFUN (neighbor_override_capability, DEFUN (no_neighbor_override_capability, no_neighbor_override_capability_cmd, - NO_NEIGHBOR_CMD2 "override-capability", + "no neighbor override-capability", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -4938,7 +4938,7 @@ DEFUN (no_neighbor_override_capability, DEFUN (neighbor_strict_capability, neighbor_strict_capability_cmd, - NEIGHBOR_CMD "strict-capability-match", + "neighbor strict-capability-match", NEIGHBOR_STR NEIGHBOR_ADDR_STR "Strict capability negotiation match\n") @@ -4949,7 +4949,7 @@ DEFUN (neighbor_strict_capability, DEFUN (no_neighbor_strict_capability, no_neighbor_strict_capability_cmd, - NO_NEIGHBOR_CMD "strict-capability-match", + "no neighbor strict-capability-match", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR @@ -4997,7 +4997,7 @@ peer_timers_unset_vty (struct vty *vty, const char *ip_str) DEFUN (neighbor_timers, neighbor_timers_cmd, - NEIGHBOR_CMD2 "timers (0-65535) (0-65535)", + "neighbor timers (0-65535) (0-65535)", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "BGP per neighbor timers\n" @@ -5012,7 +5012,7 @@ DEFUN (neighbor_timers, DEFUN (no_neighbor_timers, no_neighbor_timers_cmd, - NO_NEIGHBOR_CMD2 "timers [(0-65535) (0-65535)]", + "no neighbor timers [(0-65535) (0-65535)]", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -5061,7 +5061,7 @@ peer_timers_connect_unset_vty (struct vty *vty, const char *ip_str) DEFUN (neighbor_timers_connect, neighbor_timers_connect_cmd, - NEIGHBOR_CMD2 "timers connect (1-65535)", + "neighbor timers connect (1-65535)", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "BGP per neighbor timers\n" @@ -5075,7 +5075,7 @@ DEFUN (neighbor_timers_connect, DEFUN (no_neighbor_timers_connect, no_neighbor_timers_connect_cmd, - NO_NEIGHBOR_CMD2 "timers connect [(1-65535)]", + "no neighbor timers connect [(1-65535)]", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -5113,7 +5113,7 @@ peer_advertise_interval_vty (struct vty *vty, const char *ip_str, DEFUN (neighbor_advertise_interval, neighbor_advertise_interval_cmd, - NEIGHBOR_CMD2 "advertisement-interval (0-600)", + "neighbor advertisement-interval (0-600)", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Minimum interval between sending BGP routing updates\n" @@ -5126,7 +5126,7 @@ DEFUN (neighbor_advertise_interval, DEFUN (no_neighbor_advertise_interval, no_neighbor_advertise_interval_cmd, - NO_NEIGHBOR_CMD2 "advertisement-interval [(0-600)]", + "no neighbor advertisement-interval [(0-600)]", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -5204,7 +5204,7 @@ peer_interface_vty (struct vty *vty, const char *ip_str, const char *str) DEFUN (neighbor_interface, neighbor_interface_cmd, - NEIGHBOR_CMD "interface WORD", + "neighbor interface WORD", NEIGHBOR_STR NEIGHBOR_ADDR_STR "Interface\n" @@ -5220,7 +5220,7 @@ DEFUN (neighbor_interface, DEFUN (no_neighbor_interface, no_neighbor_interface_cmd, - NO_NEIGHBOR_CMD2 "interface WORD", + "no neighbor interface WORD", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR @@ -5281,7 +5281,7 @@ peer_distribute_unset_vty (struct vty *vty, const char *ip_str, afi_t afi, DEFUN (neighbor_distribute_list, neighbor_distribute_list_cmd, - NEIGHBOR_CMD2 "distribute-list <(1-199)|(1300-2699)|WORD> ", + "neighbor distribute-list <(1-199)|(1300-2699)|WORD> ", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Filter updates to/from this neighbor\n" @@ -5300,7 +5300,7 @@ DEFUN (neighbor_distribute_list, DEFUN (no_neighbor_distribute_list, no_neighbor_distribute_list_cmd, - NO_NEIGHBOR_CMD2 "distribute-list <(1-199)|(1300-2699)|WORD> ", + "no neighbor distribute-list <(1-199)|(1300-2699)|WORD> ", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -5367,7 +5367,7 @@ peer_prefix_list_unset_vty (struct vty *vty, const char *ip_str, afi_t afi, DEFUN (neighbor_prefix_list, neighbor_prefix_list_cmd, - NEIGHBOR_CMD2 "prefix-list WORD ", + "neighbor prefix-list WORD ", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Filter updates to/from this neighbor\n" @@ -5384,7 +5384,7 @@ DEFUN (neighbor_prefix_list, DEFUN (no_neighbor_prefix_list, no_neighbor_prefix_list_cmd, - NO_NEIGHBOR_CMD2 "prefix-list WORD ", + "no neighbor prefix-list WORD ", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -5449,7 +5449,7 @@ peer_aslist_unset_vty (struct vty *vty, const char *ip_str, DEFUN (neighbor_filter_list, neighbor_filter_list_cmd, - NEIGHBOR_CMD2 "filter-list WORD ", + "neighbor filter-list WORD ", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Establish BGP filters\n" @@ -5466,7 +5466,7 @@ DEFUN (neighbor_filter_list, DEFUN (no_neighbor_filter_list, no_neighbor_filter_list_cmd, - NO_NEIGHBOR_CMD2 "filter-list WORD ", + "no neighbor filter-list WORD ", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -5531,7 +5531,7 @@ peer_route_map_unset_vty (struct vty *vty, const char *ip_str, afi_t afi, DEFUN (neighbor_route_map, neighbor_route_map_cmd, - NEIGHBOR_CMD2 "route-map WORD ", + "neighbor route-map WORD ", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Apply route map to neighbor\n" @@ -5548,7 +5548,7 @@ DEFUN (neighbor_route_map, DEFUN (no_neighbor_route_map, no_neighbor_route_map_cmd, - NO_NEIGHBOR_CMD2 "route-map WORD ", + "no neighbor route-map WORD ", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -5599,7 +5599,7 @@ peer_unsuppress_map_unset_vty (struct vty *vty, const char *ip_str, afi_t afi, DEFUN (neighbor_unsuppress_map, neighbor_unsuppress_map_cmd, - NEIGHBOR_CMD2 "unsuppress-map WORD", + "neighbor unsuppress-map WORD", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Route-map to selectively unsuppress suppressed routes\n" @@ -5613,7 +5613,7 @@ DEFUN (neighbor_unsuppress_map, DEFUN (no_neighbor_unsuppress_map, no_neighbor_unsuppress_map_cmd, - NO_NEIGHBOR_CMD2 "unsuppress-map WORD", + "no neighbor unsuppress-map WORD", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -5678,7 +5678,7 @@ peer_maximum_prefix_unset_vty (struct vty *vty, const char *ip_str, afi_t afi, each peer configuration. */ DEFUN (neighbor_maximum_prefix, neighbor_maximum_prefix_cmd, - NEIGHBOR_CMD2 "maximum-prefix (1-4294967295)", + "neighbor maximum-prefix (1-4294967295)", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Maximum number of prefix accept from this peer\n" @@ -5693,7 +5693,7 @@ DEFUN (neighbor_maximum_prefix, DEFUN (neighbor_maximum_prefix_threshold, neighbor_maximum_prefix_threshold_cmd, - NEIGHBOR_CMD2 "maximum-prefix (1-4294967295) (1-100)", + "neighbor maximum-prefix (1-4294967295) (1-100)", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Maximum number of prefix accept from this peer\n" @@ -5710,7 +5710,7 @@ DEFUN (neighbor_maximum_prefix_threshold, DEFUN (neighbor_maximum_prefix_warning, neighbor_maximum_prefix_warning_cmd, - NEIGHBOR_CMD2 "maximum-prefix (1-4294967295) warning-only", + "neighbor maximum-prefix (1-4294967295) warning-only", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Maximum number of prefix accept from this peer\n" @@ -5726,7 +5726,7 @@ DEFUN (neighbor_maximum_prefix_warning, DEFUN (neighbor_maximum_prefix_threshold_warning, neighbor_maximum_prefix_threshold_warning_cmd, - NEIGHBOR_CMD2 "maximum-prefix (1-4294967295) (1-100) warning-only", + "neighbor maximum-prefix (1-4294967295) (1-100) warning-only", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Maximum number of prefix accept from this peer\n" @@ -5743,7 +5743,7 @@ DEFUN (neighbor_maximum_prefix_threshold_warning, DEFUN (neighbor_maximum_prefix_restart, neighbor_maximum_prefix_restart_cmd, - NEIGHBOR_CMD2 "maximum-prefix (1-4294967295) restart (1-65535)", + "neighbor maximum-prefix (1-4294967295) restart (1-65535)", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Maximum number of prefix accept from this peer\n" @@ -5760,7 +5760,7 @@ DEFUN (neighbor_maximum_prefix_restart, DEFUN (neighbor_maximum_prefix_threshold_restart, neighbor_maximum_prefix_threshold_restart_cmd, - NEIGHBOR_CMD2 "maximum-prefix (1-4294967295) (1-100) restart (1-65535)", + "neighbor maximum-prefix (1-4294967295) (1-100) restart (1-65535)", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Maximum number of prefix accept from this peer\n" @@ -5833,7 +5833,7 @@ DEFUN (neighbor_maximum_prefix_threshold_restart, */ DEFUN (no_neighbor_maximum_prefix, no_neighbor_maximum_prefix_cmd, - NO_NEIGHBOR_CMD2 "maximum-prefix", + "no neighbor maximum-prefix", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -5862,7 +5862,7 @@ DEFUN (no_neighbor_maximum_prefix, */ DEFUN (neighbor_allowas_in, neighbor_allowas_in_cmd, - NEIGHBOR_CMD2 "allowas-in", + "neighbor allowas-in", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Accept as-path with my AS present in it\n") @@ -5889,7 +5889,7 @@ DEFUN (neighbor_allowas_in, DEFUN (no_neighbor_allowas_in, no_neighbor_allowas_in_cmd, - NO_NEIGHBOR_CMD2 "allowas-in [(1-10)]", + "no neighbor allowas-in [(1-10)]", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -5912,7 +5912,7 @@ DEFUN (no_neighbor_allowas_in, DEFUN (neighbor_ttl_security, neighbor_ttl_security_cmd, - NEIGHBOR_CMD2 "ttl-security hops (1-254)", + "neighbor ttl-security hops (1-254)", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Specify the maximum number of hops to the BGP peer\n") @@ -5943,7 +5943,7 @@ DEFUN (neighbor_ttl_security, DEFUN (no_neighbor_ttl_security, no_neighbor_ttl_security_cmd, - NO_NEIGHBOR_CMD2 "ttl-security hops (1-254)", + "no neighbor ttl-security hops (1-254)", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -5961,7 +5961,7 @@ DEFUN (no_neighbor_ttl_security, DEFUN (neighbor_addpath_tx_all_paths, neighbor_addpath_tx_all_paths_cmd, - NEIGHBOR_CMD2 "addpath-tx-all-paths", + "neighbor addpath-tx-all-paths", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Use addpath to advertise all paths to a neighbor\n") @@ -5980,7 +5980,7 @@ DEFUN (neighbor_addpath_tx_all_paths, DEFUN (no_neighbor_addpath_tx_all_paths, no_neighbor_addpath_tx_all_paths_cmd, - NO_NEIGHBOR_CMD2 "addpath-tx-all-paths", + "no neighbor addpath-tx-all-paths", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -5994,7 +5994,7 @@ DEFUN (no_neighbor_addpath_tx_all_paths, DEFUN (neighbor_addpath_tx_bestpath_per_as, neighbor_addpath_tx_bestpath_per_as_cmd, - NEIGHBOR_CMD2 "addpath-tx-bestpath-per-AS", + "neighbor addpath-tx-bestpath-per-AS", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Use addpath to advertise the bestpath per each neighboring AS\n") @@ -6013,7 +6013,7 @@ DEFUN (neighbor_addpath_tx_bestpath_per_as, DEFUN (no_neighbor_addpath_tx_bestpath_per_as, no_neighbor_addpath_tx_bestpath_per_as_cmd, - NO_NEIGHBOR_CMD2 "addpath-tx-bestpath-per-AS", + "no neighbor addpath-tx-bestpath-per-AS", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 @@ -6230,7 +6230,7 @@ bgp_clear_prefix (struct vty *vty, const char *view_name, const char *ip_str, * BGP_STR * "Clear all peers\n" * - * "clear bgp " BGP_INSTANCE_CMD " ipv6 *", + * "clear bgp WORD ipv6 *", * CLEAR_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -6313,7 +6313,7 @@ DEFUN (clear_ip_bgp_peer, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "clear bgp " BGP_INSTANCE_CMD " ipv6 external", + * "clear bgp WORD ipv6 external", * CLEAR_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -6387,13 +6387,13 @@ DEFUN (clear_ip_bgp_prefix, * CHECK ME - The following ALIASes need to be implemented in this DEFUN * need ipv6 options * - * "clear bgp ipv6 " CMD_AS_RANGE, + * "clear bgp ipv6 (1-4294967295)", * CLEAR_STR * BGP_STR * "Address family\n" * "Clear peers with the AS number\n" * - * "clear bgp " BGP_INSTANCE_CMD " ipv6 " CMD_AS_RANGE, + * "clear bgp WORD ipv6 (1-4294967295)", * CLEAR_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -6402,7 +6402,7 @@ DEFUN (clear_ip_bgp_prefix, */ DEFUN (clear_ip_bgp_as, clear_ip_bgp_as_cmd, - "clear [ip] bgp [ WORD] " CMD_AS_RANGE, + "clear [ip] bgp [ WORD] (1-4294967295)", CLEAR_STR IP_STR BGP_STR @@ -6476,7 +6476,7 @@ DEFUN (clear_ip_bgp_all_ipv4_soft_out, DEFUN (clear_ip_bgp_instance_all_ipv4_soft_out, clear_ip_bgp_instance_all_ipv4_soft_out_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " * ipv4 [soft] out", + "clear ip bgp WORD * ipv4 [soft] out", CLEAR_STR IP_STR BGP_STR @@ -6574,7 +6574,7 @@ DEFUN (clear_bgp_ipv6_safi_prefix, DEFUN (clear_bgp_instance_ipv6_safi_prefix, clear_bgp_instance_ipv6_safi_prefix_cmd, - "clear bgp " BGP_INSTANCE_CMD " ipv6 prefix X:X::X:X/M", + "clear bgp WORD ipv6 prefix X:X::X:X/M", CLEAR_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -6644,7 +6644,7 @@ DEFUN (clear_ip_bgp_peer_ipv4_soft_out, DEFUN (clear_ip_bgp_instance_peer_ipv4_soft_out, clear_ip_bgp_instance_peer_ipv4_soft_out_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " ipv4 [soft] out", + "clear ip bgp WORD ipv4 [soft] out", CLEAR_STR IP_STR BGP_STR @@ -6790,7 +6790,7 @@ DEFUN (clear_ip_bgp_peer_group_ipv4_soft_out, DEFUN (clear_ip_bgp_instance_peer_group_ipv4_soft_out, clear_ip_bgp_instance_peer_group_ipv4_soft_out_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD ipv4 [soft] out", + "clear ip bgp WORD peer-group WORD ipv4 [soft] out", CLEAR_STR IP_STR BGP_STR @@ -6892,7 +6892,7 @@ DEFUN (clear_ip_bgp_external_ipv4_soft_out, DEFUN (clear_ip_bgp_instance_external_ipv4_soft_out, clear_ip_bgp_instance_external_ipv4_soft_out_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " external ipv4 [soft] out", + "clear ip bgp WORD external ipv4 [soft] out", CLEAR_STR IP_STR BGP_STR @@ -6937,7 +6937,7 @@ DEFUN (clear_bgp_external_soft_out, DEFUN (clear_ip_bgp_as_soft_out, clear_ip_bgp_as_soft_out_cmd, - "clear ip bgp [ WORD] " CMD_AS_RANGE " [soft] out", + "clear ip bgp [ WORD] (1-4294967295) [soft] out", CLEAR_STR IP_STR BGP_STR @@ -6962,7 +6962,7 @@ DEFUN (clear_ip_bgp_as_soft_out, DEFUN (clear_ip_bgp_as_ipv4_soft_out, clear_ip_bgp_as_ipv4_soft_out_cmd, - "clear ip bgp " CMD_AS_RANGE " ipv4 [soft] out", + "clear ip bgp (1-4294967295) ipv4 [soft] out", CLEAR_STR IP_STR BGP_STR @@ -6985,7 +6985,7 @@ DEFUN (clear_ip_bgp_as_ipv4_soft_out, DEFUN (clear_ip_bgp_instance_as_ipv4_soft_out, clear_ip_bgp_instance_as_ipv4_soft_out_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " ipv4 [soft] out", + "clear ip bgp WORD (1-4294967295) ipv4 [soft] out", CLEAR_STR IP_STR BGP_STR @@ -7010,7 +7010,7 @@ DEFUN (clear_ip_bgp_instance_as_ipv4_soft_out, DEFUN (clear_ip_bgp_as_vpnv4_soft_out, clear_ip_bgp_as_vpnv4_soft_out_cmd, - "clear ip bgp " CMD_AS_RANGE " vpnv4 unicast [soft] out", + "clear ip bgp (1-4294967295) vpnv4 unicast [soft] out", CLEAR_STR IP_STR BGP_STR @@ -7027,7 +7027,7 @@ DEFUN (clear_ip_bgp_as_vpnv4_soft_out, DEFUN (clear_ip_bgp_as_encap_soft_out, clear_ip_bgp_as_encap_soft_out_cmd, - "clear ip bgp " CMD_AS_RANGE " encap unicast [soft] out", + "clear ip bgp (1-4294967295) encap unicast [soft] out", CLEAR_STR IP_STR BGP_STR @@ -7044,7 +7044,7 @@ DEFUN (clear_ip_bgp_as_encap_soft_out, DEFUN (clear_bgp_as_soft_out, clear_bgp_as_soft_out_cmd, - "clear bgp [ WORD] [ipv6] " CMD_AS_RANGE " [soft] out", + "clear bgp [ WORD] [ipv6] (1-4294967295) [soft] out", CLEAR_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -7138,7 +7138,7 @@ DEFUN (clear_ip_bgp_all_ipv4_soft_in, DEFUN (clear_ip_bgp_instance_all_ipv4_soft_in, clear_ip_bgp_instance_all_ipv4_soft_in_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " * ipv4 [soft] in", + "clear ip bgp WORD * ipv4 [soft] in", CLEAR_STR IP_STR BGP_STR @@ -7321,7 +7321,7 @@ DEFUN (clear_ip_bgp_peer_ipv4_soft_in, DEFUN (clear_ip_bgp_instance_peer_ipv4_soft_in, clear_ip_bgp_instance_peer_ipv4_soft_in_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " ipv4 [soft] in", + "clear ip bgp WORD ipv4 [soft] in", CLEAR_STR IP_STR BGP_STR @@ -7472,7 +7472,7 @@ DEFUN (clear_bgp_peer_in_prefix_filter, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD soft in", + * "clear ip bgp WORD peer-group WORD soft in", * CLEAR_STR * IP_STR * BGP_STR @@ -7490,7 +7490,7 @@ DEFUN (clear_bgp_peer_in_prefix_filter, * "BGP peer-group name\n" * BGP_SOFT_IN_STR * - * "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD in", + * "clear ip bgp WORD peer-group WORD in", * CLEAR_STR * IP_STR * BGP_STR @@ -7565,7 +7565,7 @@ DEFUN (clear_ip_bgp_peer_group_ipv4_soft_in, DEFUN (clear_ip_bgp_instance_peer_group_ipv4_soft_in, clear_ip_bgp_instance_peer_group_ipv4_soft_in_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD ipv4 [soft] in", + "clear ip bgp WORD peer-group WORD ipv4 [soft] in", CLEAR_STR IP_STR BGP_STR @@ -7625,7 +7625,7 @@ DEFUN (clear_ip_bgp_peer_group_ipv4_in_prefix_filter, * "BGP peer-group name\n" * BGP_SOFT_IN_STR * - * "clear bgp " BGP_INSTANCE_CMD " ipv6 peer-group WORD soft in", + * "clear bgp WORD ipv6 peer-group WORD soft in", * CLEAR_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -7635,7 +7635,7 @@ DEFUN (clear_ip_bgp_peer_group_ipv4_in_prefix_filter, * BGP_SOFT_STR * BGP_SOFT_IN_STR * - * "clear bgp " BGP_INSTANCE_CMD " peer-group WORD soft in", + * "clear bgp WORD peer-group WORD soft in", * CLEAR_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -7651,7 +7651,7 @@ DEFUN (clear_ip_bgp_peer_group_ipv4_in_prefix_filter, * "BGP peer-group name\n" * BGP_SOFT_IN_STR * - * "clear bgp " BGP_INSTANCE_CMD " peer-group WORD in", + * "clear bgp WORD peer-group WORD in", * CLEAR_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -7668,7 +7668,7 @@ DEFUN (clear_ip_bgp_peer_group_ipv4_in_prefix_filter, * BGP_SOFT_STR * BGP_SOFT_IN_STR * - * "clear bgp " BGP_INSTANCE_CMD " ipv6 peer-group WORD in", + * "clear bgp WORD ipv6 peer-group WORD in", * CLEAR_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -7734,7 +7734,7 @@ DEFUN (clear_bgp_peer_group_in_prefix_filter, * "Clear all external peers\n" * BGP_SOFT_IN_STR * - * "clear ip bgp " BGP_INSTANCE_CMD " external in", + * "clear ip bgp WORD external in", * CLEAR_STR * IP_STR * BGP_STR @@ -7742,7 +7742,7 @@ DEFUN (clear_bgp_peer_group_in_prefix_filter, * "Clear all external peers\n" * BGP_SOFT_IN_STR * - * "clear ip bgp " BGP_INSTANCE_CMD " external soft in", + * "clear ip bgp WORD external soft in", * CLEAR_STR * IP_STR * BGP_STR @@ -7811,7 +7811,7 @@ DEFUN (clear_ip_bgp_external_ipv4_soft_in, DEFUN (clear_ip_bgp_instance_external_ipv4_soft_in, clear_ip_bgp_instance_external_ipv4_soft_in_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " external ipv4 [soft] in", + "clear ip bgp WORD external ipv4 [soft] in", CLEAR_STR IP_STR BGP_STR @@ -7859,14 +7859,14 @@ DEFUN (clear_ip_bgp_external_ipv4_in_prefix_filter, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "clear bgp " BGP_INSTANCE_CMD " external in", + * "clear bgp WORD external in", * CLEAR_STR * BGP_STR * BGP_INSTANCE_HELP_STR * "Clear all external peers\n" * BGP_SOFT_IN_STR * - * "clear bgp " BGP_INSTANCE_CMD " ipv6 external soft in", + * "clear bgp WORD ipv6 external soft in", * CLEAR_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -7875,7 +7875,7 @@ DEFUN (clear_ip_bgp_external_ipv4_in_prefix_filter, * BGP_SOFT_STR * BGP_SOFT_IN_STR * - * "clear bgp " BGP_INSTANCE_CMD " external soft in", + * "clear bgp WORD external soft in", * CLEAR_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -7883,7 +7883,7 @@ DEFUN (clear_ip_bgp_external_ipv4_in_prefix_filter, * BGP_SOFT_STR * BGP_SOFT_IN_STR * - * "clear bgp " BGP_INSTANCE_CMD " ipv6 external WORD in", + * "clear bgp WORD ipv6 external WORD in", * CLEAR_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -7957,14 +7957,14 @@ DEFUN (clear_bgp_external_in_prefix_filter, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "clear ip bgp " CMD_AS_RANGE " in", + * "clear ip bgp (1-4294967295) in", * CLEAR_STR * IP_STR * BGP_STR * "Clear peers with the AS number\n" * BGP_SOFT_IN_STR * - * "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " in", + * "clear ip bgp WORD (1-4294967295) in", * CLEAR_STR * IP_STR * BGP_STR @@ -7972,7 +7972,7 @@ DEFUN (clear_bgp_external_in_prefix_filter, * "Clear peers with the AS number\n" * BGP_SOFT_IN_STR * - * "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " soft in", + * "clear ip bgp WORD (1-4294967295) soft in", * CLEAR_STR * IP_STR * BGP_STR @@ -7984,7 +7984,7 @@ DEFUN (clear_bgp_external_in_prefix_filter, */ DEFUN (clear_ip_bgp_as_soft_in, clear_ip_bgp_as_soft_in_cmd, - "clear ip bgp " CMD_AS_RANGE " soft in", + "clear ip bgp (1-4294967295) soft in", CLEAR_STR IP_STR BGP_STR @@ -8003,7 +8003,7 @@ DEFUN (clear_ip_bgp_as_soft_in, DEFUN (clear_ip_bgp_as_in_prefix_filter, clear_ip_bgp_as_in_prefix_filter_cmd, - "clear ip bgp " CMD_AS_RANGE " in prefix-filter", + "clear ip bgp (1-4294967295) in prefix-filter", CLEAR_STR IP_STR BGP_STR @@ -8018,7 +8018,7 @@ DEFUN (clear_ip_bgp_as_in_prefix_filter, DEFUN (clear_ip_bgp_as_ipv4_soft_in, clear_ip_bgp_as_ipv4_soft_in_cmd, - "clear ip bgp " CMD_AS_RANGE " ipv4 [soft] in", + "clear ip bgp (1-4294967295) ipv4 [soft] in", CLEAR_STR IP_STR BGP_STR @@ -8041,7 +8041,7 @@ DEFUN (clear_ip_bgp_as_ipv4_soft_in, DEFUN (clear_ip_bgp_instance_as_ipv4_soft_in, clear_ip_bgp_instance_as_ipv4_soft_in_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " ipv4 [soft] in", + "clear ip bgp WORD (1-4294967295) ipv4 [soft] in", CLEAR_STR IP_STR BGP_STR @@ -8066,7 +8066,7 @@ DEFUN (clear_ip_bgp_instance_as_ipv4_soft_in, DEFUN (clear_ip_bgp_as_ipv4_in_prefix_filter, clear_ip_bgp_as_ipv4_in_prefix_filter_cmd, - "clear ip bgp " CMD_AS_RANGE " ipv4 in prefix-filter", + "clear ip bgp (1-4294967295) ipv4 in prefix-filter", CLEAR_STR IP_STR BGP_STR @@ -8089,7 +8089,7 @@ DEFUN (clear_ip_bgp_as_ipv4_in_prefix_filter, DEFUN (clear_ip_bgp_as_vpnv4_soft_in, clear_ip_bgp_as_vpnv4_soft_in_cmd, - "clear ip bgp " CMD_AS_RANGE " vpnv4 unicast [soft] in", + "clear ip bgp (1-4294967295) vpnv4 unicast [soft] in", CLEAR_STR IP_STR BGP_STR @@ -8106,7 +8106,7 @@ DEFUN (clear_ip_bgp_as_vpnv4_soft_in, DEFUN (clear_ip_bgp_as_encap_soft_in, clear_ip_bgp_as_encap_soft_in_cmd, - "clear ip bgp " CMD_AS_RANGE " encap unicast [soft] in", + "clear ip bgp (1-4294967295) encap unicast [soft] in", CLEAR_STR IP_STR BGP_STR @@ -8123,21 +8123,21 @@ DEFUN (clear_ip_bgp_as_encap_soft_in, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "clear bgp ipv6 " CMD_AS_RANGE " in", + * "clear bgp ipv6 (1-4294967295) in", * CLEAR_STR * BGP_STR * "Address family\n" * "Clear peers with the AS number\n" * BGP_SOFT_IN_STR * - * "clear bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " in", + * "clear bgp WORD (1-4294967295) in", * CLEAR_STR * BGP_STR * BGP_INSTANCE_HELP_STR * "Clear peers with the AS number\n" * BGP_SOFT_IN_STR * - * "clear bgp " BGP_INSTANCE_CMD " ipv6 " CMD_AS_RANGE " in", + * "clear bgp WORD ipv6 (1-4294967295) in", * CLEAR_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -8145,7 +8145,7 @@ DEFUN (clear_ip_bgp_as_encap_soft_in, * "Clear peers with the AS number\n" * BGP_SOFT_IN_STR * - * "clear bgp ipv6 " CMD_AS_RANGE " soft in", + * "clear bgp ipv6 (1-4294967295) soft in", * CLEAR_STR * BGP_STR * "Address family\n" @@ -8153,7 +8153,7 @@ DEFUN (clear_ip_bgp_as_encap_soft_in, * BGP_SOFT_STR * BGP_SOFT_IN_STR * - * "clear bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " soft in", + * "clear bgp WORD (1-4294967295) soft in", * CLEAR_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -8161,13 +8161,13 @@ DEFUN (clear_ip_bgp_as_encap_soft_in, * BGP_SOFT_STR * BGP_SOFT_IN_STR * - * "clear bgp " CMD_AS_RANGE " in", + * "clear bgp (1-4294967295) in", * CLEAR_STR * BGP_STR * "Clear peers with the AS number\n" * BGP_SOFT_IN_STR * - * "clear bgp " BGP_INSTANCE_CMD " ipv6 " CMD_AS_RANGE " soft in", + * "clear bgp WORD ipv6 (1-4294967295) soft in", * CLEAR_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -8179,7 +8179,7 @@ DEFUN (clear_ip_bgp_as_encap_soft_in, */ DEFUN (clear_bgp_as_soft_in, clear_bgp_as_soft_in_cmd, - "clear bgp " CMD_AS_RANGE " soft in", + "clear bgp (1-4294967295) soft in", CLEAR_STR BGP_STR "Clear peers with the AS number\n" @@ -8197,7 +8197,7 @@ DEFUN (clear_bgp_as_soft_in, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "clear bgp ipv6 " CMD_AS_RANGE " in prefix-filter", + * "clear bgp ipv6 (1-4294967295) in prefix-filter", * CLEAR_STR * BGP_STR * "Address family\n" @@ -8208,7 +8208,7 @@ DEFUN (clear_bgp_as_soft_in, */ DEFUN (clear_bgp_as_in_prefix_filter, clear_bgp_as_in_prefix_filter_cmd, - "clear bgp " CMD_AS_RANGE " in prefix-filter", + "clear bgp (1-4294967295) in prefix-filter", CLEAR_STR BGP_STR "Clear peers with the AS number\n" @@ -8224,7 +8224,7 @@ DEFUN (clear_bgp_as_in_prefix_filter, /* Both soft-reconfiguration */ /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "clear ip bgp " BGP_INSTANCE_CMD " * soft", + * "clear ip bgp WORD * soft", * CLEAR_STR * IP_STR * BGP_STR @@ -8273,7 +8273,7 @@ DEFUN (clear_ip_bgp_all_ipv4_soft, DEFUN (clear_ip_bgp_instance_all_ipv4_soft, clear_ip_bgp_instance_all_ipv4_soft_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " * ipv4 soft", + "clear ip bgp WORD * ipv4 soft", CLEAR_STR IP_STR BGP_STR @@ -8333,14 +8333,14 @@ DEFUN (clear_ip_bgp_all_encap_soft, * "Clear all peers\n" * BGP_SOFT_STR * - * "clear bgp " BGP_INSTANCE_CMD " * soft", + * "clear bgp WORD * soft", * CLEAR_STR * BGP_STR * BGP_INSTANCE_HELP_STR * "Clear all peers\n" * BGP_SOFT_STR * - * "clear bgp " BGP_INSTANCE_CMD " ipv6 * soft", + * "clear bgp WORD ipv6 * soft", * CLEAR_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -8367,7 +8367,7 @@ DEFUN (clear_bgp_all_soft, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "clear ip bgp " BGP_INSTANCE_CMD " (A.B.C.D|WORD) soft", + * "clear ip bgp WORD (A.B.C.D|WORD) soft", * CLEAR_STR * IP_STR * BGP_STR @@ -8422,7 +8422,7 @@ DEFUN (clear_ip_bgp_peer_ipv4_soft, DEFUN (clear_ip_bgp_instance_peer_ipv4_soft, clear_ip_bgp_instance_peer_ipv4_soft_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " ipv4 soft", + "clear ip bgp WORD ipv4 soft", CLEAR_STR IP_STR BGP_STR @@ -8489,7 +8489,7 @@ DEFUN (clear_ip_bgp_peer_encap_soft, * "BGP neighbor on interface to clear\n" * BGP_SOFT_STR * - * "clear bgp " BGP_INSTANCE_CMD " ipv6 (A.B.C.D|X:X::X:X|WORD) soft", + * "clear bgp WORD ipv6 (A.B.C.D|X:X::X:X|WORD) soft", * CLEAR_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -8499,7 +8499,7 @@ DEFUN (clear_ip_bgp_peer_encap_soft, * "BGP neighbor on interface to clear\n" * BGP_SOFT_STR * - * "clear bgp " BGP_INSTANCE_CMD " (A.B.C.D|X:X::X:X|WORD) soft", + * "clear bgp WORD (A.B.C.D|X:X::X:X|WORD) soft", * CLEAR_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -8533,7 +8533,7 @@ DEFUN (clear_bgp_peer_soft, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD soft", + * "clear ip bgp WORD peer-group WORD soft", * CLEAR_STR * IP_STR * BGP_STR @@ -8588,7 +8588,7 @@ DEFUN (clear_ip_bgp_peer_group_ipv4_soft, DEFUN (clear_ip_bgp_instance_peer_group_ipv4_soft, clear_ip_bgp_instance_peer_group_ipv4_soft_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " peer-group WORD ipv4 soft", + "clear ip bgp WORD peer-group WORD ipv4 soft", CLEAR_STR IP_STR BGP_STR @@ -8613,7 +8613,7 @@ DEFUN (clear_ip_bgp_instance_peer_group_ipv4_soft, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "clear bgp " BGP_INSTANCE_CMD " ipv6 peer-group WORD soft", + * "clear bgp WORD ipv6 peer-group WORD soft", * CLEAR_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -8622,7 +8622,7 @@ DEFUN (clear_ip_bgp_instance_peer_group_ipv4_soft, * "BGP peer-group name\n" * BGP_SOFT_STR * - * "clear bgp " BGP_INSTANCE_CMD " peer-group WORD soft", + * "clear bgp WORD peer-group WORD soft", * CLEAR_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -8659,7 +8659,7 @@ DEFUN (clear_bgp_peer_group_soft, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "clear ip bgp " BGP_INSTANCE_CMD " external soft", + * "clear ip bgp WORD external soft", * CLEAR_STR * IP_STR * BGP_STR @@ -8709,7 +8709,7 @@ DEFUN (clear_ip_bgp_external_ipv4_soft, DEFUN (clear_ip_bgp_instance_external_ipv4_soft, clear_ip_bgp_instance_external_ipv4_soft_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " external ipv4 soft", + "clear ip bgp WORD external ipv4 soft", CLEAR_STR IP_STR BGP_STR @@ -8732,14 +8732,14 @@ DEFUN (clear_ip_bgp_instance_external_ipv4_soft, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "clear bgp " BGP_INSTANCE_CMD " external soft", + * "clear bgp WORD external soft", * CLEAR_STR * BGP_STR * BGP_INSTANCE_HELP_STR * "Clear all external peers\n" * BGP_SOFT_STR * - * "clear bgp " BGP_INSTANCE_CMD " ipv6 external soft", + * "clear bgp WORD ipv6 external soft", * CLEAR_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -8773,7 +8773,7 @@ DEFUN (clear_bgp_external_soft, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " soft", + * "clear ip bgp WORD (1-4294967295) soft", * CLEAR_STR * IP_STR * BGP_STR @@ -8784,7 +8784,7 @@ DEFUN (clear_bgp_external_soft, */ DEFUN (clear_ip_bgp_as_soft, clear_ip_bgp_as_soft_cmd, - "clear ip bgp " CMD_AS_RANGE " soft", + "clear ip bgp (1-4294967295) soft", CLEAR_STR IP_STR BGP_STR @@ -8803,7 +8803,7 @@ DEFUN (clear_ip_bgp_as_soft, DEFUN (clear_ip_bgp_as_ipv4_soft, clear_ip_bgp_as_ipv4_soft_cmd, - "clear ip bgp " CMD_AS_RANGE " ipv4 soft", + "clear ip bgp (1-4294967295) ipv4 soft", CLEAR_STR IP_STR BGP_STR @@ -8825,7 +8825,7 @@ DEFUN (clear_ip_bgp_as_ipv4_soft, DEFUN (clear_ip_bgp_instance_as_ipv4_soft, clear_ip_bgp_instance_as_ipv4_soft_cmd, - "clear ip bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " ipv4 soft", + "clear ip bgp WORD (1-4294967295) ipv4 soft", CLEAR_STR IP_STR BGP_STR @@ -8849,7 +8849,7 @@ DEFUN (clear_ip_bgp_instance_as_ipv4_soft, DEFUN (clear_ip_bgp_as_vpnv4_soft, clear_ip_bgp_as_vpnv4_soft_cmd, - "clear ip bgp " CMD_AS_RANGE " vpnv4 unicast soft", + "clear ip bgp (1-4294967295) vpnv4 unicast soft", CLEAR_STR IP_STR BGP_STR @@ -8865,7 +8865,7 @@ DEFUN (clear_ip_bgp_as_vpnv4_soft, DEFUN (clear_ip_bgp_as_encap_soft, clear_ip_bgp_as_encap_soft_cmd, - "clear ip bgp " CMD_AS_RANGE " encap unicast soft", + "clear ip bgp (1-4294967295) encap unicast soft", CLEAR_STR IP_STR BGP_STR @@ -8881,14 +8881,14 @@ DEFUN (clear_ip_bgp_as_encap_soft, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "clear bgp ipv6 " CMD_AS_RANGE " soft", + * "clear bgp ipv6 (1-4294967295) soft", * CLEAR_STR * BGP_STR * "Address family\n" * "Clear peers with the AS number\n" * BGP_SOFT_STR * - * "clear bgp " BGP_INSTANCE_CMD " ipv6 " CMD_AS_RANGE " soft", + * "clear bgp WORD ipv6 (1-4294967295) soft", * CLEAR_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -8896,7 +8896,7 @@ DEFUN (clear_ip_bgp_as_encap_soft, * "Clear peers with the AS number\n" * BGP_SOFT_STR * - * "clear bgp " BGP_INSTANCE_CMD " " CMD_AS_RANGE " soft", + * "clear bgp WORD (1-4294967295) soft", * CLEAR_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -8906,7 +8906,7 @@ DEFUN (clear_ip_bgp_as_encap_soft, */ DEFUN (clear_bgp_as_soft, clear_bgp_as_soft_cmd, - "clear bgp " CMD_AS_RANGE " soft", + "clear bgp (1-4294967295) soft", CLEAR_STR BGP_STR "Clear peers with the AS number\n" @@ -9616,7 +9616,7 @@ DEFUN (show_ip_bgp_summary, DEFUN (show_ip_bgp_instance_summary, show_ip_bgp_instance_summary_cmd, - "show ip bgp " BGP_INSTANCE_CMD " summary [json]", + "show ip bgp WORD summary [json]", SHOW_STR IP_STR BGP_STR @@ -9631,7 +9631,7 @@ DEFUN (show_ip_bgp_instance_summary, DEFUN (show_ip_bgp_instance_all_summary, show_ip_bgp_instance_all_summary_cmd, - "show ip bgp " BGP_INSTANCE_ALL_CMD " summary [json]", + "show ip bgp all summary [json]", SHOW_STR IP_STR BGP_STR @@ -9806,7 +9806,7 @@ DEFUN (show_bgp_summary, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " ipv6 summary [json]", + * "show bgp WORD ipv6 summary [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -9816,7 +9816,7 @@ DEFUN (show_bgp_summary, */ DEFUN (show_bgp_instance_summary, show_bgp_instance_summary_cmd, - "show bgp " BGP_INSTANCE_CMD " summary [json]", + "show bgp WORD summary [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -9829,7 +9829,7 @@ DEFUN (show_bgp_instance_summary, DEFUN (show_bgp_instance_all_summary, show_bgp_instance_all_summary_cmd, - "show bgp " BGP_INSTANCE_ALL_CMD " summary [json]", + "show bgp all summary [json]", SHOW_STR BGP_STR BGP_INSTANCE_ALL_HELP_STR @@ -9865,7 +9865,7 @@ DEFUN (show_bgp_ipv6_safi_summary, DEFUN (show_bgp_instance_ipv6_safi_summary, show_bgp_instance_ipv6_safi_summary_cmd, - "show bgp " BGP_INSTANCE_CMD " ipv6 summary [json]", + "show bgp WORD ipv6 summary [json]", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -11886,14 +11886,14 @@ DEFUN (show_ip_bgp_neighbors_peer, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " neighbors [json]", + * "show bgp WORD neighbors [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR * "Detailed information on TCP and BGP neighbor connections\n" * "JavaScript Object Notation\n" * - * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors [json]", + * "show bgp WORD ipv6 neighbors [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -11904,7 +11904,7 @@ DEFUN (show_ip_bgp_neighbors_peer, */ DEFUN (show_ip_bgp_instance_neighbors, show_ip_bgp_instance_neighbors_cmd, - "show ip bgp " BGP_INSTANCE_CMD " neighbors [json]", + "show ip bgp WORD neighbors [json]", SHOW_STR IP_STR BGP_STR @@ -11920,7 +11920,7 @@ DEFUN (show_ip_bgp_instance_neighbors, DEFUN (show_ip_bgp_instance_all_neighbors, show_ip_bgp_instance_all_neighbors_cmd, - "show ip bgp " BGP_INSTANCE_ALL_CMD " neighbors [json]", + "show ip bgp all neighbors [json]", SHOW_STR IP_STR BGP_STR @@ -11938,7 +11938,7 @@ DEFUN (show_ip_bgp_instance_all_neighbors, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show bgp " BGP_INSTANCE_CMD " ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) [json]", + * "show bgp WORD ipv6 neighbors (A.B.C.D|X:X::X:X|WORD) [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -11949,7 +11949,7 @@ DEFUN (show_ip_bgp_instance_all_neighbors, * "Neighbor on bgp configured interface\n" * "JavaScript Object Notation\n" * - * "show bgp " BGP_INSTANCE_CMD " neighbors (A.B.C.D|X:X::X:X|WORD) [json]", + * "show bgp WORD neighbors (A.B.C.D|X:X::X:X|WORD) [json]", * SHOW_STR * BGP_STR * BGP_INSTANCE_HELP_STR @@ -11962,7 +11962,7 @@ DEFUN (show_ip_bgp_instance_all_neighbors, */ DEFUN (show_ip_bgp_instance_neighbors_peer, show_ip_bgp_instance_neighbors_peer_cmd, - "show ip bgp " BGP_INSTANCE_CMD " neighbors [json]", + "show ip bgp WORD neighbors [json]", SHOW_STR IP_STR BGP_STR @@ -12103,7 +12103,7 @@ DEFUN (show_ip_bgp_updgrps, DEFUN (show_ip_bgp_instance_updgrps, show_ip_bgp_instance_updgrps_cmd, - "show ip bgp " BGP_INSTANCE_CMD " update-groups", + "show ip bgp WORD update-groups", SHOW_STR IP_STR BGP_STR @@ -12116,7 +12116,7 @@ DEFUN (show_ip_bgp_instance_updgrps, DEFUN (show_ip_bgp_instance_all_updgrps, show_ip_bgp_instance_all_updgrps_cmd, - "show ip bgp " BGP_INSTANCE_ALL_CMD " update-groups", + "show ip bgp all update-groups", SHOW_STR IP_STR BGP_STR @@ -12139,7 +12139,7 @@ DEFUN (show_bgp_ipv6_updgrps, DEFUN (show_bgp_instance_ipv6_updgrps, show_bgp_instance_ipv6_updgrps_cmd, - "show bgp " BGP_INSTANCE_CMD " update-groups", + "show bgp WORD update-groups", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -12151,7 +12151,7 @@ DEFUN (show_bgp_instance_ipv6_updgrps, DEFUN (show_bgp_instance_all_ipv6_updgrps, show_bgp_instance_all_ipv6_updgrps_cmd, - "show bgp " BGP_INSTANCE_ALL_CMD " update-groups", + "show bgp all update-groups", SHOW_STR BGP_STR BGP_INSTANCE_ALL_HELP_STR @@ -12199,7 +12199,7 @@ DEFUN (show_ip_bgp_updgrps_s, DEFUN (show_ip_bgp_instance_updgrps_s, show_ip_bgp_instance_updgrps_s_cmd, - "show ip bgp " BGP_INSTANCE_CMD " update-groups SUBGROUP-ID", + "show ip bgp WORD update-groups SUBGROUP-ID", SHOW_STR IP_STR BGP_STR @@ -12230,7 +12230,7 @@ DEFUN (show_bgp_ipv6_updgrps_s, DEFUN (show_bgp_instance_ipv6_updgrps_s, show_bgp_instance_ipv6_updgrps_s_cmd, - "show bgp " BGP_INSTANCE_CMD " update-groups SUBGROUP-ID", + "show bgp WORD update-groups SUBGROUP-ID", SHOW_STR BGP_STR "Detailed info about v6 dynamic update groups\n" @@ -12287,7 +12287,7 @@ DEFUN (show_bgp_updgrps_stats, DEFUN (show_bgp_instance_updgrps_stats, show_bgp_instance_updgrps_stats_cmd, - "show bgp " BGP_INSTANCE_CMD " update-groups statistics", + "show bgp WORD update-groups statistics", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -12346,7 +12346,7 @@ DEFUN (show_ip_bgp_updgrps_adj, DEFUN (show_ip_bgp_instance_updgrps_adj, show_ip_bgp_instance_updgrps_adj_cmd, - "show ip bgp " BGP_INSTANCE_CMD " update-groups ", + "show ip bgp WORD update-groups ", SHOW_STR IP_STR BGP_STR @@ -12407,7 +12407,7 @@ DEFUN (show_bgp_updgrps_adj, DEFUN (show_bgp_instance_updgrps_adj, show_bgp_instance_updgrps_adj_cmd, - "show bgp " BGP_INSTANCE_CMD " update-groups ", + "show bgp WORD update-groups ", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -12446,7 +12446,7 @@ DEFUN (show_ip_bgp_updgrps_adj_s, DEFUN (show_ip_bgp_instance_updgrps_adj_s, show_ip_bgp_instance_updgrps_adj_s_cmd, - "show ip bgp " BGP_INSTANCE_CMD " update-groups SUBGROUP-ID ", + "show ip bgp WORD update-groups SUBGROUP-ID ", SHOW_STR IP_STR BGP_STR @@ -12521,7 +12521,7 @@ DEFUN (show_bgp_updgrps_adj_s, DEFUN (show_bgp_instance_updgrps_adj_s, show_bgp_instance_updgrps_adj_s_cmd, - "show bgp " BGP_INSTANCE_CMD " update-groups SUBGROUP-ID ", + "show bgp WORD update-groups SUBGROUP-ID ", SHOW_STR BGP_STR BGP_INSTANCE_HELP_STR @@ -12715,7 +12715,7 @@ DEFUN (show_ip_bgp_peer_groups, DEFUN (show_ip_bgp_instance_peer_groups, show_ip_bgp_instance_peer_groups_cmd, - "show ip bgp " BGP_INSTANCE_CMD " peer-group", + "show ip bgp WORD peer-group", SHOW_STR IP_STR BGP_STR @@ -12741,7 +12741,7 @@ DEFUN (show_ip_bgp_peer_group, DEFUN (show_ip_bgp_instance_peer_group, show_ip_bgp_instance_peer_group_cmd, - "show ip bgp " BGP_INSTANCE_CMD " peer-group WORD", + "show ip bgp WORD peer-group WORD", SHOW_STR IP_STR BGP_STR @@ -12758,7 +12758,7 @@ DEFUN (show_ip_bgp_instance_peer_group, DEFUN (bgp_redistribute_ipv4, bgp_redistribute_ipv4_cmd, - "redistribute " QUAGGA_IP_REDIST_STR_BGPD, + "redistribute ", "Redistribute information from another routing protocol\n" QUAGGA_IP_REDIST_HELP_STR_BGPD) { @@ -12777,7 +12777,7 @@ DEFUN (bgp_redistribute_ipv4, DEFUN (bgp_redistribute_ipv4_rmap, bgp_redistribute_ipv4_rmap_cmd, - "redistribute " QUAGGA_IP_REDIST_STR_BGPD " route-map WORD", + "redistribute route-map WORD", "Redistribute information from another routing protocol\n" QUAGGA_IP_REDIST_HELP_STR_BGPD "Route map reference\n" @@ -12802,7 +12802,7 @@ DEFUN (bgp_redistribute_ipv4_rmap, DEFUN (bgp_redistribute_ipv4_metric, bgp_redistribute_ipv4_metric_cmd, - "redistribute " QUAGGA_IP_REDIST_STR_BGPD " metric (0-4294967295)", + "redistribute metric (0-4294967295)", "Redistribute information from another routing protocol\n" QUAGGA_IP_REDIST_HELP_STR_BGPD "Metric for redistributed routes\n" @@ -12829,7 +12829,7 @@ DEFUN (bgp_redistribute_ipv4_metric, DEFUN (bgp_redistribute_ipv4_rmap_metric, bgp_redistribute_ipv4_rmap_metric_cmd, - "redistribute " QUAGGA_IP_REDIST_STR_BGPD " route-map WORD metric (0-4294967295)", + "redistribute route-map WORD metric (0-4294967295)", "Redistribute information from another routing protocol\n" QUAGGA_IP_REDIST_HELP_STR_BGPD "Route map reference\n" @@ -12860,7 +12860,7 @@ DEFUN (bgp_redistribute_ipv4_rmap_metric, DEFUN (bgp_redistribute_ipv4_metric_rmap, bgp_redistribute_ipv4_metric_rmap_cmd, - "redistribute " QUAGGA_IP_REDIST_STR_BGPD " metric (0-4294967295) route-map WORD", + "redistribute metric (0-4294967295) route-map WORD", "Redistribute information from another routing protocol\n" QUAGGA_IP_REDIST_HELP_STR_BGPD "Metric for redistributed routes\n" @@ -13114,7 +13114,7 @@ DEFUN (no_bgp_redistribute_ipv4_ospf, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no redistribute " QUAGGA_IP_REDIST_STR_BGPD " metric <0-4294967295> route-map WORD", + * "no redistribute metric <0-4294967295> route-map WORD", * NO_STR * "Redistribute information from another routing protocol\n" * QUAGGA_IP_REDIST_HELP_STR_BGPD @@ -13123,14 +13123,14 @@ DEFUN (no_bgp_redistribute_ipv4_ospf, * "Route map reference\n" * "Pointer to route-map entries\n" * - * "no redistribute " QUAGGA_IP_REDIST_STR_BGPD " route-map WORD", + * "no redistribute route-map WORD", * NO_STR * "Redistribute information from another routing protocol\n" * QUAGGA_IP_REDIST_HELP_STR_BGPD * "Route map reference\n" * "Pointer to route-map entries\n" * - * "no redistribute " QUAGGA_IP_REDIST_STR_BGPD " route-map WORD metric <0-4294967295>", + * "no redistribute route-map WORD metric <0-4294967295>", * NO_STR * "Redistribute information from another routing protocol\n" * QUAGGA_IP_REDIST_HELP_STR_BGPD @@ -13139,7 +13139,7 @@ DEFUN (no_bgp_redistribute_ipv4_ospf, * "Metric for redistributed routes\n" * "Default metric\n" * - * "no redistribute " QUAGGA_IP_REDIST_STR_BGPD " metric <0-4294967295>", + * "no redistribute metric <0-4294967295>", * NO_STR * "Redistribute information from another routing protocol\n" * QUAGGA_IP_REDIST_HELP_STR_BGPD @@ -13149,7 +13149,7 @@ DEFUN (no_bgp_redistribute_ipv4_ospf, */ DEFUN (no_bgp_redistribute_ipv4, no_bgp_redistribute_ipv4_cmd, - "no redistribute " QUAGGA_IP_REDIST_STR_BGPD, + "no redistribute ", NO_STR "Redistribute information from another routing protocol\n" QUAGGA_IP_REDIST_HELP_STR_BGPD) @@ -13173,7 +13173,7 @@ DEFUN (no_bgp_redistribute_ipv4, #ifdef HAVE_IPV6 DEFUN (bgp_redistribute_ipv6, bgp_redistribute_ipv6_cmd, - "redistribute " QUAGGA_IP6_REDIST_STR_BGPD, + "redistribute ", "Redistribute information from another routing protocol\n" QUAGGA_IP6_REDIST_HELP_STR_BGPD) { @@ -13193,7 +13193,7 @@ DEFUN (bgp_redistribute_ipv6, DEFUN (bgp_redistribute_ipv6_rmap, bgp_redistribute_ipv6_rmap_cmd, - "redistribute " QUAGGA_IP6_REDIST_STR_BGPD " route-map WORD", + "redistribute route-map WORD", "Redistribute information from another routing protocol\n" QUAGGA_IP6_REDIST_HELP_STR_BGPD "Route map reference\n" @@ -13218,7 +13218,7 @@ DEFUN (bgp_redistribute_ipv6_rmap, DEFUN (bgp_redistribute_ipv6_metric, bgp_redistribute_ipv6_metric_cmd, - "redistribute " QUAGGA_IP6_REDIST_STR_BGPD " metric (0-4294967295)", + "redistribute metric (0-4294967295)", "Redistribute information from another routing protocol\n" QUAGGA_IP6_REDIST_HELP_STR_BGPD "Metric for redistributed routes\n" @@ -13245,7 +13245,7 @@ DEFUN (bgp_redistribute_ipv6_metric, DEFUN (bgp_redistribute_ipv6_rmap_metric, bgp_redistribute_ipv6_rmap_metric_cmd, - "redistribute " QUAGGA_IP6_REDIST_STR_BGPD " route-map WORD metric (0-4294967295)", + "redistribute route-map WORD metric (0-4294967295)", "Redistribute information from another routing protocol\n" QUAGGA_IP6_REDIST_HELP_STR_BGPD "Route map reference\n" @@ -13276,7 +13276,7 @@ DEFUN (bgp_redistribute_ipv6_rmap_metric, DEFUN (bgp_redistribute_ipv6_metric_rmap, bgp_redistribute_ipv6_metric_rmap_cmd, - "redistribute " QUAGGA_IP6_REDIST_STR_BGPD " metric (0-4294967295) route-map WORD", + "redistribute metric (0-4294967295) route-map WORD", "Redistribute information from another routing protocol\n" QUAGGA_IP6_REDIST_HELP_STR_BGPD "Metric for redistributed routes\n" @@ -13307,14 +13307,14 @@ DEFUN (bgp_redistribute_ipv6_metric_rmap, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no redistribute " QUAGGA_IP6_REDIST_STR_BGPD " route-map WORD", + * "no redistribute route-map WORD", * NO_STR * "Redistribute information from another routing protocol\n" * QUAGGA_IP6_REDIST_HELP_STR_BGPD * "Route map reference\n" * "Pointer to route-map entries\n" * - * "no redistribute " QUAGGA_IP6_REDIST_STR_BGPD " route-map WORD metric <0-4294967295>", + * "no redistribute route-map WORD metric <0-4294967295>", * NO_STR * "Redistribute information from another routing protocol\n" * QUAGGA_IP6_REDIST_HELP_STR_BGPD @@ -13323,7 +13323,7 @@ DEFUN (bgp_redistribute_ipv6_metric_rmap, * "Metric for redistributed routes\n" * "Default metric\n" * - * "no redistribute " QUAGGA_IP6_REDIST_STR_BGPD " metric <0-4294967295> route-map WORD", + * "no redistribute metric <0-4294967295> route-map WORD", * NO_STR * "Redistribute information from another routing protocol\n" * QUAGGA_IP6_REDIST_HELP_STR_BGPD @@ -13332,7 +13332,7 @@ DEFUN (bgp_redistribute_ipv6_metric_rmap, * "Route map reference\n" * "Pointer to route-map entries\n" * - * "no redistribute " QUAGGA_IP6_REDIST_STR_BGPD " metric <0-4294967295>", + * "no redistribute metric <0-4294967295>", * NO_STR * "Redistribute information from another routing protocol\n" * QUAGGA_IP6_REDIST_HELP_STR_BGPD @@ -13342,7 +13342,7 @@ DEFUN (bgp_redistribute_ipv6_metric_rmap, */ DEFUN (no_bgp_redistribute_ipv6, no_bgp_redistribute_ipv6_cmd, - "no redistribute " QUAGGA_IP6_REDIST_STR_BGPD, + "no redistribute ", NO_STR "Redistribute information from another routing protocol\n" QUAGGA_IP6_REDIST_HELP_STR_BGPD) diff --git a/isisd/isis_redist.c b/isisd/isis_redist.c index fcdc11bba..a0ca5ad2c 100644 --- a/isisd/isis_redist.c +++ b/isisd/isis_redist.c @@ -539,7 +539,7 @@ isis_redist_area_finish(struct isis_area *area) DEFUN (isis_redistribute, isis_redistribute_cmd, - "redistribute " QUAGGA_REDIST_STR_ISISD " [metric (0-16777215)|route-map WORD]", + "redistribute [metric (0-16777215)|route-map WORD]", REDIST_STR "Redistribute IPv4 routes\n" "Redistribute IPv6 routes\n" @@ -611,7 +611,7 @@ DEFUN (isis_redistribute, DEFUN (no_isis_redistribute, no_isis_redistribute_cmd, - "no redistribute " QUAGGA_REDIST_STR_ISISD " ", + "no redistribute ", NO_STR REDIST_STR "Redistribute IPv4 routes\n" diff --git a/lib/command.c b/lib/command.c index ed2c30ad6..6fb265f97 100644 --- a/lib/command.c +++ b/lib/command.c @@ -1893,7 +1893,7 @@ DEFUN_DEPRECATED (config_log_syslog_facility, DEFUN (no_config_log_syslog, no_config_log_syslog_cmd, - "no log syslog [" LOG_FACILITIES "] [" LOG_LEVELS "]", + "no log syslog [] [" LOG_LEVELS "]", NO_STR "Logging control\n" "Cancel logging to syslog\n" @@ -1906,7 +1906,7 @@ DEFUN (no_config_log_syslog, DEFUN (config_log_facility, config_log_facility_cmd, - "log facility " LOG_FACILITIES, + "log facility ", "Logging control\n" "Facility parameter for syslog messages\n" LOG_FACILITY_DESC) @@ -1920,7 +1920,7 @@ DEFUN (config_log_facility, DEFUN (no_config_log_facility, no_config_log_facility_cmd, - "no log facility [" LOG_FACILITIES "]", + "no log facility []", NO_STR "Logging control\n" "Reset syslog facility to default (daemon)\n" diff --git a/lib/if.c b/lib/if.c index 4c4b66cda..a0083933f 100644 --- a/lib/if.c +++ b/lib/if.c @@ -926,7 +926,7 @@ DEFUN (show_address, DEFUN (show_address_vrf_all, show_address_vrf_all_cmd, - "show address " VRF_ALL_CMD_STR, + "show address vrf all", SHOW_STR "address\n" VRF_ALL_CMD_HELP_STR) diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index c35b30a65..379320e86 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -642,7 +642,7 @@ ospf6_asbr_redistribute_remove (int type, ifindex_t ifindex, DEFUN (ospf6_redistribute, ospf6_redistribute_cmd, - "redistribute " QUAGGA_REDIST_STR_OSPF6D, + "redistribute ", "Redistribute\n" QUAGGA_REDIST_HELP_STR_OSPF6D ) @@ -660,7 +660,7 @@ DEFUN (ospf6_redistribute, DEFUN (ospf6_redistribute_routemap, ospf6_redistribute_routemap_cmd, - "redistribute " QUAGGA_REDIST_STR_OSPF6D " route-map WORD", + "redistribute route-map WORD", "Redistribute\n" QUAGGA_REDIST_HELP_STR_OSPF6D "Route map reference\n" @@ -683,7 +683,7 @@ DEFUN (ospf6_redistribute_routemap, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no redistribute " QUAGGA_REDIST_STR_OSPF6D " route-map WORD", + * "no redistribute route-map WORD", * NO_STR * "Redistribute\n" * QUAGGA_REDIST_HELP_STR_OSPF6D @@ -693,7 +693,7 @@ DEFUN (ospf6_redistribute_routemap, */ DEFUN (no_ospf6_redistribute, no_ospf6_redistribute_cmd, - "no redistribute " QUAGGA_REDIST_STR_OSPF6D, + "no redistribute ", NO_STR "Redistribute\n" QUAGGA_REDIST_HELP_STR_OSPF6D diff --git a/ospf6d/ospf6_bfd.c b/ospf6d/ospf6_bfd.c index 5d1eae3e3..ffbefd139 100644 --- a/ospf6d/ospf6_bfd.c +++ b/ospf6d/ospf6_bfd.c @@ -346,7 +346,7 @@ DEFUN (ipv6_ospf6_bfd, DEFUN (ipv6_ospf6_bfd_param, ipv6_ospf6_bfd_param_cmd, - "ipv6 ospf6 bfd " BFD_CMD_DETECT_MULT_RANGE BFD_CMD_MIN_RX_RANGE BFD_CMD_MIN_TX_RANGE, + "ipv6 ospf6 bfd (2-255) (50-60000) (50-60000)", IP6_STR OSPF6_STR "Enables BFD support\n" diff --git a/ospfd/ospf_bfd.c b/ospfd/ospf_bfd.c index d8fefab9c..ae4691efa 100644 --- a/ospfd/ospf_bfd.c +++ b/ospfd/ospf_bfd.c @@ -379,7 +379,7 @@ DEFUN (ip_ospf_bfd, DEFUN (ip_ospf_bfd_param, ip_ospf_bfd_param_cmd, - "ip ospf bfd " BFD_CMD_DETECT_MULT_RANGE BFD_CMD_MIN_RX_RANGE BFD_CMD_MIN_TX_RANGE, + "ip ospf bfd (2-255) (50-60000) (50-60000)", "IP Information\n" "OSPF interface commands\n" "Enables BFD support\n" @@ -409,7 +409,7 @@ DEFUN (ip_ospf_bfd_param, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no ip ospf bfd " BFD_CMD_DETECT_MULT_RANGE BFD_CMD_MIN_RX_RANGE BFD_CMD_MIN_TX_RANGE, + * "no ip ospf bfd (2-255) (50-60000) (50-60000)", * NO_STR * "IP Information\n" * "OSPF interface commands\n" diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index b3019b465..b022261d2 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -5858,7 +5858,7 @@ show_ip_ospf_database_common (struct vty *vty, struct ospf *ospf, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ip ospf database (" OSPF_LSA_TYPES_CMD_STR ") A.B.C.D", + * "show ip ospf database (asbr-summary|external|network|router|summary|nssa-external|opaque-link|opaque-area|opaque-as) A.B.C.D", * SHOW_STR * IP_STR * "OSPF information\n" @@ -5866,7 +5866,7 @@ show_ip_ospf_database_common (struct vty *vty, struct ospf *ospf, * OSPF_LSA_TYPES_DESC * "Link State ID (as an IP address)\n" * - * "show ip ospf database (" OSPF_LSA_TYPES_CMD_STR ") A.B.C.D (self-originate|)", + * "show ip ospf database (asbr-summary|external|network|router|summary|nssa-external|opaque-link|opaque-area|opaque-as) A.B.C.D (self-originate|)", * SHOW_STR * IP_STR * "OSPF information\n" @@ -5876,7 +5876,7 @@ show_ip_ospf_database_common (struct vty *vty, struct ospf *ospf, * "Self-originated link states\n" * "\n" * - * "show ip ospf database (" OSPF_LSA_TYPES_CMD_STR ") A.B.C.D adv-router A.B.C.D", + * "show ip ospf database (asbr-summary|external|network|router|summary|nssa-external|opaque-link|opaque-area|opaque-as) A.B.C.D adv-router A.B.C.D", * SHOW_STR * IP_STR * "OSPF information\n" @@ -5886,7 +5886,7 @@ show_ip_ospf_database_common (struct vty *vty, struct ospf *ospf, * "Advertising Router link states\n" * "Advertising Router (as an IP address)\n" * - * "show ip ospf database (" OSPF_LSA_TYPES_CMD_STR "|max-age|self-originate)", + * "show ip ospf database (asbr-summary|external|network|router|summary|nssa-external|opaque-link|opaque-area|opaque-as|max-age|self-originate)", * SHOW_STR * IP_STR * "OSPF information\n" @@ -5918,7 +5918,7 @@ DEFUN (show_ip_ospf_database, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ip ospf <1-65535> database (" OSPF_LSA_TYPES_CMD_STR ") A.B.C.D adv-router A.B.C.D", + * "show ip ospf <1-65535> database (asbr-summary|external|network|router|summary|nssa-external|opaque-link|opaque-area|opaque-as) A.B.C.D adv-router A.B.C.D", * SHOW_STR * IP_STR * "OSPF information\n" @@ -5929,7 +5929,7 @@ DEFUN (show_ip_ospf_database, * "Advertising Router link states\n" * "Advertising Router (as an IP address)\n" * - * "show ip ospf <1-65535> database (" OSPF_LSA_TYPES_CMD_STR ") A.B.C.D", + * "show ip ospf <1-65535> database (asbr-summary|external|network|router|summary|nssa-external|opaque-link|opaque-area|opaque-as) A.B.C.D", * SHOW_STR * IP_STR * "OSPF information\n" @@ -5938,7 +5938,7 @@ DEFUN (show_ip_ospf_database, * OSPF_LSA_TYPES_DESC * "Link State ID (as an IP address)\n" * - * "show ip ospf <1-65535> database (" OSPF_LSA_TYPES_CMD_STR ") A.B.C.D (self-originate|)", + * "show ip ospf <1-65535> database (asbr-summary|external|network|router|summary|nssa-external|opaque-link|opaque-area|opaque-as) A.B.C.D (self-originate|)", * SHOW_STR * IP_STR * "OSPF information\n" @@ -5949,7 +5949,7 @@ DEFUN (show_ip_ospf_database, * "Self-originated link states\n" * "\n" * - * "show ip ospf <1-65535> database (" OSPF_LSA_TYPES_CMD_STR "|max-age|self-originate)", + * "show ip ospf <1-65535> database (asbr-summary|external|network|router|summary|nssa-external|opaque-link|opaque-area|opaque-as|max-age|self-originate)", * SHOW_STR * IP_STR * "OSPF information\n" @@ -6042,7 +6042,7 @@ show_ip_ospf_database_type_adv_router_common (struct vty *vty, struct ospf *ospf /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ip ospf database (" OSPF_LSA_TYPES_CMD_STR ") (self-originate|)", + * "show ip ospf database (asbr-summary|external|network|router|summary|nssa-external|opaque-link|opaque-area|opaque-as) (self-originate|)", * SHOW_STR * IP_STR * "OSPF information\n" @@ -6053,7 +6053,7 @@ show_ip_ospf_database_type_adv_router_common (struct vty *vty, struct ospf *ospf */ DEFUN (show_ip_ospf_database_type_adv_router, show_ip_ospf_database_type_adv_router_cmd, - "show ip ospf database <" OSPF_LSA_TYPES_CMD_STR "> adv-router A.B.C.D", + "show ip ospf database adv-router A.B.C.D", SHOW_STR IP_STR "OSPF information\n" @@ -6073,7 +6073,7 @@ DEFUN (show_ip_ospf_database_type_adv_router, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ip ospf <1-65535> database (" OSPF_LSA_TYPES_CMD_STR ") (self-originate|)", + * "show ip ospf <1-65535> database (asbr-summary|external|network|router|summary|nssa-external|opaque-link|opaque-area|opaque-as) (self-originate|)", * SHOW_STR * IP_STR * "OSPF information\n" @@ -6085,7 +6085,7 @@ DEFUN (show_ip_ospf_database_type_adv_router, */ DEFUN (show_ip_ospf_instance_database_type_adv_router, show_ip_ospf_instance_database_type_adv_router_cmd, - "show ip ospf (1-65535) database <" OSPF_LSA_TYPES_CMD_STR "> adv-router A.B.C.D", + "show ip ospf (1-65535) database adv-router A.B.C.D", SHOW_STR IP_STR "OSPF information\n" @@ -8213,7 +8213,7 @@ DEFUN (no_ip_ospf_instance_area, DEFUN (ospf_redistribute_source, ospf_redistribute_source_cmd, - "redistribute " QUAGGA_REDIST_STR_OSPFD " [metric (0-16777214)|metric-type <1|2>|route-map WORD]", + "redistribute [metric (0-16777214)|metric-type <1|2>|route-map WORD]", REDIST_STR QUAGGA_REDIST_HELP_STR_OSPFD "Metric for redistributed routes\n" @@ -8268,7 +8268,7 @@ DEFUN (ospf_redistribute_source, DEFUN (no_ospf_redistribute_source, no_ospf_redistribute_source_cmd, - "no redistribute " QUAGGA_REDIST_STR_OSPFD " [metric (0-16777214)|metric-type <1|2>|route-map WORD]", + "no redistribute [metric (0-16777214)|metric-type <1|2>|route-map WORD]", NO_STR REDIST_STR QUAGGA_REDIST_HELP_STR_OSPFD @@ -8427,7 +8427,7 @@ DEFUN (no_ospf_redistribute_instance_source, DEFUN (ospf_distribute_list_out, ospf_distribute_list_out_cmd, - "distribute-list WORD out " QUAGGA_REDIST_STR_OSPFD, + "distribute-list WORD out ", "Filter networks in routing updates\n" "Access-list name\n" OUT_STR @@ -8450,7 +8450,7 @@ DEFUN (ospf_distribute_list_out, DEFUN (no_ospf_distribute_list_out, no_ospf_distribute_list_out_cmd, - "no distribute-list WORD out " QUAGGA_REDIST_STR_OSPFD, + "no distribute-list WORD out ", NO_STR "Filter networks in routing updates\n" "Access-list name\n" diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index 9232c48e7..52302a646 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -2501,7 +2501,7 @@ DEFUN (no_ip_pim_rp, DEFUN (ip_multicast_routing, ip_multicast_routing_cmd, - PIM_CMD_IP_MULTICAST_ROUTING, + "ip multicast-routing", IP_STR "Enable IP multicast forwarding\n") { @@ -2514,7 +2514,7 @@ DEFUN (ip_multicast_routing, DEFUN (no_ip_multicast_routing, no_ip_multicast_routing_cmd, - PIM_CMD_NO " " PIM_CMD_IP_MULTICAST_ROUTING, + "no ip multicast-routing", NO_STR IP_STR "Global IP configuration subcommands\n" @@ -2874,7 +2874,7 @@ static void change_query_max_response_time(struct pim_interface *pim_ifp, DEFUN (interface_ip_igmp_query_interval, interface_ip_igmp_query_interval_cmd, - PIM_CMD_IP_IGMP_QUERY_INTERVAL " (1-1800)", + "ip igmp query-interval (1-1800)", IP_STR IFACE_IGMP_STR IFACE_IGMP_QUERY_INTERVAL_STR @@ -2933,7 +2933,7 @@ DEFUN (interface_ip_igmp_query_interval, DEFUN (interface_no_ip_igmp_query_interval, interface_no_ip_igmp_query_interval_cmd, - PIM_CMD_NO " " PIM_CMD_IP_IGMP_QUERY_INTERVAL, + "no ip igmp query-interval", NO_STR IP_STR IFACE_IGMP_STR @@ -2969,7 +2969,7 @@ DEFUN (interface_no_ip_igmp_query_interval, DEFUN (interface_ip_igmp_query_max_response_time, interface_ip_igmp_query_max_response_time_cmd, - PIM_CMD_IP_IGMP_QUERY_MAX_RESPONSE_TIME " (1-25)", + "ip igmp query-max-response-time (1-25)", IP_STR IFACE_IGMP_STR IFACE_IGMP_QUERY_MAX_RESPONSE_TIME_STR @@ -3026,7 +3026,7 @@ DEFUN (interface_ip_igmp_query_max_response_time, DEFUN (interface_no_ip_igmp_query_max_response_time, interface_no_ip_igmp_query_max_response_time_cmd, - PIM_CMD_NO " " PIM_CMD_IP_IGMP_QUERY_MAX_RESPONSE_TIME, + "no ip igmp query-max-response-time", NO_STR IP_STR IFACE_IGMP_STR @@ -3062,7 +3062,7 @@ DEFUN (interface_no_ip_igmp_query_max_response_time, DEFUN (interface_ip_igmp_query_max_response_time_dsec, interface_ip_igmp_query_max_response_time_dsec_cmd, - PIM_CMD_IP_IGMP_QUERY_MAX_RESPONSE_TIME_DSEC " (10-250)", + "ip igmp query-max-response-time-dsec (10-250)", IP_STR IFACE_IGMP_STR IFACE_IGMP_QUERY_MAX_RESPONSE_TIME_DSEC_STR @@ -3122,7 +3122,7 @@ DEFUN (interface_ip_igmp_query_max_response_time_dsec, DEFUN (interface_no_ip_igmp_query_max_response_time_dsec, interface_no_ip_igmp_query_max_response_time_dsec_cmd, - PIM_CMD_NO " " PIM_CMD_IP_IGMP_QUERY_MAX_RESPONSE_TIME_DSEC, + "no ip igmp query-max-response-time-dsec", NO_STR IP_STR IFACE_IGMP_STR diff --git a/ripd/rip_zebra.c b/ripd/rip_zebra.c index 3596938bb..f4cca7e8a 100644 --- a/ripd/rip_zebra.c +++ b/ripd/rip_zebra.c @@ -359,7 +359,7 @@ DEFUN (no_rip_redistribute_rip, DEFUN (rip_redistribute_type, rip_redistribute_type_cmd, - "redistribute " QUAGGA_REDIST_STR_RIPD, + "redistribute ", REDIST_STR QUAGGA_REDIST_HELP_STR_RIPD) { @@ -384,7 +384,7 @@ DEFUN (rip_redistribute_type, DEFUN (no_rip_redistribute_type, no_rip_redistribute_type_cmd, - "no redistribute " QUAGGA_REDIST_STR_RIPD, + "no redistribute ", NO_STR REDIST_STR QUAGGA_REDIST_HELP_STR_RIPD) @@ -411,7 +411,7 @@ DEFUN (no_rip_redistribute_type, DEFUN (rip_redistribute_type_routemap, rip_redistribute_type_routemap_cmd, - "redistribute " QUAGGA_REDIST_STR_RIPD " route-map WORD", + "redistribute route-map WORD", REDIST_STR QUAGGA_REDIST_HELP_STR_RIPD "Route map reference\n" @@ -440,7 +440,7 @@ DEFUN (rip_redistribute_type_routemap, DEFUN (no_rip_redistribute_type_routemap, no_rip_redistribute_type_routemap_cmd, - "no redistribute " QUAGGA_REDIST_STR_RIPD " route-map WORD", + "no redistribute route-map WORD", NO_STR REDIST_STR QUAGGA_REDIST_HELP_STR_RIPD @@ -471,7 +471,7 @@ DEFUN (no_rip_redistribute_type_routemap, DEFUN (rip_redistribute_type_metric, rip_redistribute_type_metric_cmd, - "redistribute " QUAGGA_REDIST_STR_RIPD " metric (0-16)", + "redistribute metric (0-16)", REDIST_STR QUAGGA_REDIST_HELP_STR_RIPD "Metric\n" @@ -503,7 +503,7 @@ DEFUN (rip_redistribute_type_metric, DEFUN (no_rip_redistribute_type_metric, no_rip_redistribute_type_metric_cmd, - "no redistribute " QUAGGA_REDIST_STR_RIPD " metric (0-16)", + "no redistribute metric (0-16)", NO_STR REDIST_STR QUAGGA_REDIST_HELP_STR_RIPD @@ -534,7 +534,7 @@ DEFUN (no_rip_redistribute_type_metric, DEFUN (rip_redistribute_type_metric_routemap, rip_redistribute_type_metric_routemap_cmd, - "redistribute " QUAGGA_REDIST_STR_RIPD " metric (0-16) route-map WORD", + "redistribute metric (0-16) route-map WORD", REDIST_STR QUAGGA_REDIST_HELP_STR_RIPD "Metric\n" @@ -571,7 +571,7 @@ DEFUN (rip_redistribute_type_metric_routemap, DEFUN (no_rip_redistribute_type_metric_routemap, no_rip_redistribute_type_metric_routemap_cmd, - "no redistribute " QUAGGA_REDIST_STR_RIPD " metric (0-16) route-map WORD", + "no redistribute metric (0-16) route-map WORD", NO_STR REDIST_STR QUAGGA_REDIST_HELP_STR_RIPD diff --git a/ripngd/ripng_zebra.c b/ripngd/ripng_zebra.c index a6dc20072..07c51ca6d 100644 --- a/ripngd/ripng_zebra.c +++ b/ripngd/ripng_zebra.c @@ -327,7 +327,7 @@ DEFUN (no_ripng_redistribute_ripng, DEFUN (ripng_redistribute_type, ripng_redistribute_type_cmd, - "redistribute " QUAGGA_REDIST_STR_RIPNGD, + "redistribute ", "Redistribute\n" QUAGGA_REDIST_HELP_STR_RIPNGD) { @@ -347,21 +347,21 @@ DEFUN (ripng_redistribute_type, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no redistribute " QUAGGA_REDIST_STR_RIPNGD " metric <0-16> route-map WORD", + * "no redistribute metric <0-16> route-map WORD", * NO_STR * "Redistribute\n" * QUAGGA_REDIST_HELP_STR_RIPNGD * "Route map reference\n" * "Pointer to route-map entries\n" * - * "no redistribute " QUAGGA_REDIST_STR_RIPNGD " metric <0-16>", + * "no redistribute metric <0-16>", * NO_STR * "Redistribute\n" * QUAGGA_REDIST_HELP_STR_RIPNGD * "Metric\n" * "Metric value\n" * - * "no redistribute " QUAGGA_REDIST_STR_RIPNGD " route-map WORD", + * "no redistribute route-map WORD", * NO_STR * "Redistribute\n" * QUAGGA_REDIST_HELP_STR_RIPNGD @@ -371,7 +371,7 @@ DEFUN (ripng_redistribute_type, */ DEFUN (no_ripng_redistribute_type, no_ripng_redistribute_type_cmd, - "no redistribute " QUAGGA_REDIST_STR_RIPNGD, + "no redistribute ", NO_STR "Redistribute\n" QUAGGA_REDIST_HELP_STR_RIPNGD) @@ -394,7 +394,7 @@ DEFUN (no_ripng_redistribute_type, DEFUN (ripng_redistribute_type_metric, ripng_redistribute_type_metric_cmd, - "redistribute " QUAGGA_REDIST_STR_RIPNGD " metric (0-16)", + "redistribute metric (0-16)", "Redistribute\n" QUAGGA_REDIST_HELP_STR_RIPNGD "Metric\n" @@ -423,7 +423,7 @@ DEFUN (ripng_redistribute_type_metric, DEFUN (ripng_redistribute_type_routemap, ripng_redistribute_type_routemap_cmd, - "redistribute " QUAGGA_REDIST_STR_RIPNGD " route-map WORD", + "redistribute route-map WORD", "Redistribute\n" QUAGGA_REDIST_HELP_STR_RIPNGD "Route map reference\n" @@ -450,7 +450,7 @@ DEFUN (ripng_redistribute_type_routemap, DEFUN (ripng_redistribute_type_metric_routemap, ripng_redistribute_type_metric_routemap_cmd, - "redistribute " QUAGGA_REDIST_STR_RIPNGD " metric (0-16) route-map WORD", + "redistribute metric (0-16) route-map WORD", "Redistribute\n" QUAGGA_REDIST_HELP_STR_RIPNGD "Metric\n" diff --git a/tools/argv_translator.py b/tools/argv_translator.py index a35f0e082..8a4a0b8cf 100755 --- a/tools/argv_translator.py +++ b/tools/argv_translator.py @@ -4,7 +4,6 @@ Usage: argv_translator.py rebuild-defuns [] - argv_translator.py idx-logic Help: rebuild-defuns : foo @@ -500,11 +499,6 @@ def get_command_string_index_variable_table(line_number, line): return indexes -def get_idx_logic(wildcard): - # dwalton - return None - - def expand_command_string(line): # in the middle @@ -579,6 +573,10 @@ def expand_command_string(line): if line.rstrip().endswith('" ,'): line = line.replace('" ,', '",') + # compress duplicate white spaces + re_space = re.search('^(\s*).*(\s*)$', line) + line = re_space.group(1) + ' '.join(line.split()) + re_space.group(2) + return line @@ -721,9 +719,12 @@ DEFUN (no_bgp_maxmed_onstartup, new_command_string = self.get_new_command_string() new_command_string_expanded = expand_command_string(new_command_string) lines = [] + + # dwalton lines.append("DEFUN (%s,\n" % self.name) lines.append(" %s,\n" % self.name_cmd) - lines.append(new_command_string) + # lines.append(new_command_string) + lines.append(new_command_string_expanded) lines.extend(self.help_strings) lines.append('{\n') @@ -847,10 +848,14 @@ def update_argvs(filename): with open(filename, 'w') as fh: state = None - for line in lines: + for (line_number, line) in enumerate(lines): if state is None: - if line.startswith('DEFUN ('): + if 'The following ALIASes need to be implemented in this DEFUN' in line: + state = 'CHANGE ME' + fh.write(line) + + elif line.startswith('DEFUN ('): state = 'DEFUN_HEADER' re_name = re.search('DEFUN \((.*),', line.strip()) name = re_name.group(1) @@ -859,6 +864,17 @@ def update_argvs(filename): else: fh.write(line) + elif state == 'CHANGE ME': + if line.strip() == '*/': + state = None + fh.write(line) + elif line.strip().startswith('* "'): + # dwalton + new_line = expand_command_string(line[3:]) # chop the leading " * " + fh.write(" * %s" % new_line) + else: + fh.write(line) + elif state == 'DEFUN_HEADER': if line.strip() == '{': state = 'DEFUN_BODY' @@ -867,6 +883,9 @@ def update_argvs(filename): if line.rstrip() == '}': state = None + # uncomment to debug state machine + # print "%5d %12s: %s" % (line_number, state, line.rstrip()) + if __name__ == '__main__': (print_options, ended_with_space, sys.argv) = get_network_docopt_info(sys.argv) @@ -888,5 +907,3 @@ if __name__ == '__main__': filename = filename.strip() print "crunching %s" % filename update_argvs(filename) - elif cli.get('idx-logic'): - print get_idx_logic(cli.args.get('')) diff --git a/zebra/interface.c b/zebra/interface.c index d1f21c17b..c1fbc9cdd 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1300,7 +1300,7 @@ struct cmd_node vrf_node = /* Show all interfaces to vty. */ /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show interface " VRF_CMD_STR, + * "show interface vrf NAME", * SHOW_STR * "Interface status and configuration\n" * VRF_CMD_HELP_STR @@ -1332,7 +1332,7 @@ DEFUN (show_interface, /* Show all interfaces to vty. */ DEFUN (show_interface_vrf_all, show_interface_vrf_all_cmd, - "show interface " VRF_ALL_CMD_STR, + "show interface vrf all", SHOW_STR "Interface status and configuration\n" VRF_ALL_CMD_HELP_STR) @@ -1355,7 +1355,7 @@ DEFUN (show_interface_vrf_all, DEFUN (show_interface_name_vrf, show_interface_name_vrf_cmd, - "show interface IFNAME " VRF_CMD_STR, + "show interface IFNAME vrf NAME", SHOW_STR "Interface status and configuration\n" "Interface name\n" @@ -1395,7 +1395,7 @@ DEFUN (show_interface_name_vrf, */ DEFUN (show_interface_name_vrf_all, show_interface_name_vrf_all_cmd, - "show interface IFNAME " VRF_ALL_CMD_STR, + "show interface IFNAME vrf all", SHOW_STR "Interface status and configuration\n" "Interface name\n" @@ -1472,7 +1472,7 @@ if_show_description (struct vty *vty, vrf_id_t vrf_id) /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show interface description " VRF_CMD_STR, + * "show interface description vrf NAME", * SHOW_STR * "Interface status and configuration\n" * "Interface description\n" @@ -1499,7 +1499,7 @@ DEFUN (show_interface_desc, DEFUN (show_interface_desc_vrf_all, show_interface_desc_vrf_all_cmd, - "show interface description " VRF_ALL_CMD_STR, + "show interface description vrf all", SHOW_STR "Interface status and configuration\n" "Interface description\n" diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c index ed90042b8..6b861d780 100644 --- a/zebra/zebra_routemap.c +++ b/zebra/zebra_routemap.c @@ -661,7 +661,7 @@ DEFUN (no_zebra_route_map_timer, DEFUN (ip_protocol, ip_protocol_cmd, - "ip protocol " QUAGGA_IP_PROTOCOL_MAP_STR_ZEBRA " route-map ROUTE-MAP", + "ip protocol route-map ROUTE-MAP", IP_STR "Filter routing info exchanged between zebra and protocol\n" QUAGGA_IP_PROTOCOL_MAP_HELP_STR_ZEBRA @@ -700,7 +700,7 @@ DEFUN (ip_protocol, DEFUN (no_ip_protocol, no_ip_protocol_cmd, - "no ip protocol " QUAGGA_IP_PROTOCOL_MAP_STR_ZEBRA " [route-map ROUTE-MAP]", + "no ip protocol [route-map ROUTE-MAP]", NO_STR IP_STR "Stop filtering routing info between zebra and protocol\n" @@ -771,7 +771,7 @@ DEFUN (show_ip_protocol, DEFUN (ipv6_protocol, ipv6_protocol_cmd, - "ipv6 protocol " QUAGGA_IP6_PROTOCOL_MAP_STR_ZEBRA " route-map ROUTE-MAP", + "ipv6 protocol route-map ROUTE-MAP", IP6_STR "Filter IPv6 routing info exchanged between zebra and protocol\n" QUAGGA_IP6_PROTOCOL_MAP_HELP_STR_ZEBRA @@ -810,7 +810,7 @@ DEFUN (ipv6_protocol, DEFUN (no_ipv6_protocol, no_ipv6_protocol_cmd, - "no ipv6 protocol " QUAGGA_IP6_PROTOCOL_MAP_STR_ZEBRA " [route-map ROUTE-MAP]", + "no ipv6 protocol [route-map ROUTE-MAP]", NO_STR IP6_STR "Stop filtering IPv6 routing info between zebra and protocol\n" @@ -880,7 +880,7 @@ DEFUN (show_ipv6_protocol, DEFUN (ip_protocol_nht_rmap, ip_protocol_nht_rmap_cmd, - "ip nht " QUAGGA_IP_PROTOCOL_MAP_STR_ZEBRA " route-map ROUTE-MAP", + "ip nht route-map ROUTE-MAP", IP_STR "Filter Next Hop tracking route resolution\n" QUAGGA_IP_PROTOCOL_MAP_HELP_STR_ZEBRA @@ -916,7 +916,7 @@ DEFUN (ip_protocol_nht_rmap, DEFUN (no_ip_protocol_nht_rmap, no_ip_protocol_nht_rmap_cmd, - "no ip nht " QUAGGA_IP_PROTOCOL_MAP_STR_ZEBRA " [route-map ROUTE-MAP]", + "no ip nht [route-map ROUTE-MAP]", NO_STR IP_STR "Filter Next Hop tracking route resolution\n" @@ -981,7 +981,7 @@ DEFUN (show_ip_protocol_nht, DEFUN (ipv6_protocol_nht_rmap, ipv6_protocol_nht_rmap_cmd, - "ipv6 nht " QUAGGA_IP6_PROTOCOL_MAP_STR_ZEBRA " route-map ROUTE-MAP", + "ipv6 nht route-map ROUTE-MAP", IP6_STR "Filter Next Hop tracking route resolution\n" QUAGGA_IP6_PROTOCOL_MAP_HELP_STR_ZEBRA @@ -1011,7 +1011,7 @@ DEFUN (ipv6_protocol_nht_rmap, DEFUN (no_ipv6_protocol_nht_rmap, no_ipv6_protocol_nht_rmap_cmd, - "no ipv6 nht " QUAGGA_IP6_PROTOCOL_MAP_STR_ZEBRA " [route-map ROUTE-MAP]", + "no ipv6 nht [route-map ROUTE-MAP]", NO_STR IP6_STR "Filter Next Hop tracking route resolution\n" diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index ebe0ca405..878af09ee 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -1297,7 +1297,7 @@ DEFUN (no_ip_route_mask_flags_tag_distance2, /* Static route configuration. */ DEFUN (ip_route_vrf, ip_route_vrf_cmd, - "ip route A.B.C.D/M " VRF_CMD_STR, + "ip route A.B.C.D/M vrf NAME", IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -1314,7 +1314,7 @@ DEFUN (ip_route_vrf, DEFUN (ip_route_tag_vrf, ip_route_tag_vrf_cmd, - "ip route A.B.C.D/M tag (1-65535) " VRF_CMD_STR, + "ip route A.B.C.D/M tag (1-65535) vrf NAME", IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -1334,7 +1334,7 @@ DEFUN (ip_route_tag_vrf, DEFUN (ip_route_flags_vrf, ip_route_flags_vrf_cmd, - "ip route A.B.C.D/M " VRF_CMD_STR, + "ip route A.B.C.D/M vrf NAME", IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -1353,7 +1353,7 @@ DEFUN (ip_route_flags_vrf, DEFUN (ip_route_flags_tag_vrf, ip_route_flags_tag_vrf_cmd, - "ip route A.B.C.D/M tag (1-65535) " VRF_CMD_STR, + "ip route A.B.C.D/M tag (1-65535) vrf NAME", IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -1376,7 +1376,7 @@ DEFUN (ip_route_flags_tag_vrf, DEFUN (ip_route_flags2_vrf, ip_route_flags2_vrf_cmd, - "ip route A.B.C.D/M " VRF_CMD_STR, + "ip route A.B.C.D/M vrf NAME", IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -1392,7 +1392,7 @@ DEFUN (ip_route_flags2_vrf, DEFUN (ip_route_flags2_tag_vrf, ip_route_flags2_tag_vrf_cmd, - "ip route A.B.C.D/M tag (1-65535) " VRF_CMD_STR, + "ip route A.B.C.D/M tag (1-65535) vrf NAME", IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -1413,7 +1413,7 @@ DEFUN (ip_route_flags2_tag_vrf, /* Mask as A.B.C.D format. */ DEFUN (ip_route_mask_vrf, ip_route_mask_vrf_cmd, - "ip route A.B.C.D A.B.C.D " VRF_CMD_STR, + "ip route A.B.C.D A.B.C.D vrf NAME", IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -1432,7 +1432,7 @@ DEFUN (ip_route_mask_vrf, DEFUN (ip_route_mask_tag_vrf, ip_route_mask_tag_vrf_cmd, - "ip route A.B.C.D A.B.C.D tag (1-65535) " VRF_CMD_STR, + "ip route A.B.C.D A.B.C.D tag (1-65535) vrf NAME", IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -1455,7 +1455,7 @@ DEFUN (ip_route_mask_tag_vrf, DEFUN (ip_route_mask_flags_vrf, ip_route_mask_flags_vrf_cmd, - "ip route A.B.C.D A.B.C.D " VRF_CMD_STR, + "ip route A.B.C.D A.B.C.D vrf NAME", IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -1476,7 +1476,7 @@ DEFUN (ip_route_mask_flags_vrf, DEFUN (ip_route_mask_flags_tag_vrf, ip_route_mask_flags_tag_vrf_cmd, - "ip route A.B.C.D A.B.C.D tag (1-65535) " VRF_CMD_STR, + "ip route A.B.C.D A.B.C.D tag (1-65535) vrf NAME", IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -1501,7 +1501,7 @@ DEFUN (ip_route_mask_flags_tag_vrf, DEFUN (ip_route_mask_flags2_vrf, ip_route_mask_flags2_vrf_cmd, - "ip route A.B.C.D A.B.C.D " VRF_CMD_STR, + "ip route A.B.C.D A.B.C.D vrf NAME", IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -1519,7 +1519,7 @@ DEFUN (ip_route_mask_flags2_vrf, DEFUN (ip_route_mask_flags2_tag_vrf, ip_route_mask_flags2_tag_vrf_cmd, - "ip route A.B.C.D A.B.C.D tag (1-65535) " VRF_CMD_STR, + "ip route A.B.C.D A.B.C.D tag (1-65535) vrf NAME", IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -1541,7 +1541,7 @@ DEFUN (ip_route_mask_flags2_tag_vrf, /* Distance option value. */ DEFUN (ip_route_distance_vrf, ip_route_distance_vrf_cmd, - "ip route A.B.C.D/M (1-255) " VRF_CMD_STR, + "ip route A.B.C.D/M (1-255) vrf NAME", IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -1560,7 +1560,7 @@ DEFUN (ip_route_distance_vrf, DEFUN (ip_route_tag_distance_vrf, ip_route_tag_distance_vrf_cmd, - "ip route A.B.C.D/M tag (1-65535) (1-255) " VRF_CMD_STR, + "ip route A.B.C.D/M tag (1-65535) (1-255) vrf NAME", IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -1583,7 +1583,7 @@ DEFUN (ip_route_tag_distance_vrf, DEFUN (ip_route_flags_distance_vrf, ip_route_flags_distance_vrf_cmd, - "ip route A.B.C.D/M (1-255) " VRF_CMD_STR, + "ip route A.B.C.D/M (1-255) vrf NAME", IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -1604,7 +1604,7 @@ DEFUN (ip_route_flags_distance_vrf, DEFUN (ip_route_flags_tag_distance_vrf, ip_route_flags_tag_distance_vrf_cmd, - "ip route A.B.C.D/M tag (1-65535) (1-255) " VRF_CMD_STR, + "ip route A.B.C.D/M tag (1-65535) (1-255) vrf NAME", IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -1628,7 +1628,7 @@ DEFUN (ip_route_flags_tag_distance_vrf, DEFUN (ip_route_flags_distance2_vrf, ip_route_flags_distance2_vrf_cmd, - "ip route A.B.C.D/M (1-255) " VRF_CMD_STR, + "ip route A.B.C.D/M (1-255) vrf NAME", IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -1646,7 +1646,7 @@ DEFUN (ip_route_flags_distance2_vrf, DEFUN (ip_route_flags_tag_distance2_vrf, ip_route_flags_tag_distance2_vrf_cmd, - "ip route A.B.C.D/M tag (1-65535) (1-255) " VRF_CMD_STR, + "ip route A.B.C.D/M tag (1-65535) (1-255) vrf NAME", IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -1667,7 +1667,7 @@ DEFUN (ip_route_flags_tag_distance2_vrf, DEFUN (ip_route_mask_distance_vrf, ip_route_mask_distance_vrf_cmd, - "ip route A.B.C.D A.B.C.D (1-255) " VRF_CMD_STR, + "ip route A.B.C.D A.B.C.D (1-255) vrf NAME", IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -1688,7 +1688,7 @@ DEFUN (ip_route_mask_distance_vrf, DEFUN (ip_route_mask_tag_distance_vrf, ip_route_mask_tag_distance_vrf_cmd, - "ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) " VRF_CMD_STR, + "ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) vrf NAME", IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -1712,7 +1712,7 @@ DEFUN (ip_route_mask_tag_distance_vrf, DEFUN (ip_route_mask_flags_tag_distance_vrf, ip_route_mask_flags_tag_distance_vrf_cmd, - "ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) " VRF_CMD_STR, + "ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) vrf NAME", IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -1739,7 +1739,7 @@ DEFUN (ip_route_mask_flags_tag_distance_vrf, DEFUN (ip_route_mask_flags_distance_vrf, ip_route_mask_flags_distance_vrf_cmd, - "ip route A.B.C.D A.B.C.D (1-255) " VRF_CMD_STR, + "ip route A.B.C.D A.B.C.D (1-255) vrf NAME", IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -1762,7 +1762,7 @@ DEFUN (ip_route_mask_flags_distance_vrf, DEFUN (ip_route_mask_flags_distance2_vrf, ip_route_mask_flags_distance2_vrf_cmd, - "ip route A.B.C.D A.B.C.D (1-255) " VRF_CMD_STR, + "ip route A.B.C.D A.B.C.D (1-255) vrf NAME", IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -1782,7 +1782,7 @@ DEFUN (ip_route_mask_flags_distance2_vrf, DEFUN (ip_route_mask_flags_tag_distance2_vrf, ip_route_mask_flags_tag_distance2_vrf_cmd, - "ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) " VRF_CMD_STR, + "ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) vrf NAME", IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -1805,7 +1805,7 @@ DEFUN (ip_route_mask_flags_tag_distance2_vrf, DEFUN (no_ip_route_vrf, no_ip_route_vrf_cmd, - "no ip route A.B.C.D/M " VRF_CMD_STR, + "no ip route A.B.C.D/M vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -1823,7 +1823,7 @@ DEFUN (no_ip_route_vrf, DEFUN (no_ip_route_flags_vrf, no_ip_route_flags_vrf_cmd, - "no ip route A.B.C.D/M " VRF_CMD_STR, + "no ip route A.B.C.D/M vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -1843,7 +1843,7 @@ DEFUN (no_ip_route_flags_vrf, DEFUN (no_ip_route_tag_vrf, no_ip_route_tag_vrf_cmd, - "no ip route A.B.C.D/M tag (1-65535) " VRF_CMD_STR, + "no ip route A.B.C.D/M tag (1-65535) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -1864,7 +1864,7 @@ DEFUN (no_ip_route_tag_vrf, DEFUN (no_ip_route_flags_tag_vrf, no_ip_route_flags_tag_vrf_cmd, - "no ip route A.B.C.D/M tag (1-65535) " VRF_CMD_STR, + "no ip route A.B.C.D/M tag (1-65535) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -1887,7 +1887,7 @@ DEFUN (no_ip_route_flags_tag_vrf, DEFUN (no_ip_route_flags2_vrf, no_ip_route_flags2_vrf_cmd, - "no ip route A.B.C.D/M " VRF_CMD_STR, + "no ip route A.B.C.D/M vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -1904,7 +1904,7 @@ DEFUN (no_ip_route_flags2_vrf, DEFUN (no_ip_route_flags2_tag_vrf, no_ip_route_flags2_tag_vrf_cmd, - "no ip route A.B.C.D/M tag (1-65535) " VRF_CMD_STR, + "no ip route A.B.C.D/M tag (1-65535) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -1924,7 +1924,7 @@ DEFUN (no_ip_route_flags2_tag_vrf, DEFUN (no_ip_route_mask_vrf, no_ip_route_mask_vrf_cmd, - "no ip route A.B.C.D A.B.C.D " VRF_CMD_STR, + "no ip route A.B.C.D A.B.C.D vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -1944,7 +1944,7 @@ DEFUN (no_ip_route_mask_vrf, DEFUN (no_ip_route_mask_flags_vrf, no_ip_route_mask_flags_vrf_cmd, - "no ip route A.B.C.D A.B.C.D " VRF_CMD_STR, + "no ip route A.B.C.D A.B.C.D vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -1966,7 +1966,7 @@ DEFUN (no_ip_route_mask_flags_vrf, DEFUN (no_ip_route_mask_tag_vrf, no_ip_route_mask_tag_vrf_cmd, - "no ip route A.B.C.D A.B.C.D tag (1-65535) " VRF_CMD_STR, + "no ip route A.B.C.D A.B.C.D tag (1-65535) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -1989,7 +1989,7 @@ DEFUN (no_ip_route_mask_tag_vrf, DEFUN (no_ip_route_mask_flags_tag_vrf, no_ip_route_mask_flags_tag_vrf_cmd, - "no ip route A.B.C.D A.B.C.D tag (1-65535) " VRF_CMD_STR, + "no ip route A.B.C.D A.B.C.D tag (1-65535) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -2014,7 +2014,7 @@ DEFUN (no_ip_route_mask_flags_tag_vrf, DEFUN (no_ip_route_mask_flags2_vrf, no_ip_route_mask_flags2_vrf_cmd, - "no ip route A.B.C.D A.B.C.D " VRF_CMD_STR, + "no ip route A.B.C.D A.B.C.D vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -2033,7 +2033,7 @@ DEFUN (no_ip_route_mask_flags2_vrf, DEFUN (no_ip_route_mask_flags2_tag_vrf, no_ip_route_mask_flags2_tag_vrf_cmd, - "no ip route A.B.C.D A.B.C.D tag (1-65535) " VRF_CMD_STR, + "no ip route A.B.C.D A.B.C.D tag (1-65535) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -2056,7 +2056,7 @@ DEFUN (no_ip_route_mask_flags2_tag_vrf, DEFUN (no_ip_route_distance_vrf, no_ip_route_distance_vrf_cmd, - "no ip route A.B.C.D/M (1-255) " VRF_CMD_STR, + "no ip route A.B.C.D/M (1-255) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -2076,7 +2076,7 @@ DEFUN (no_ip_route_distance_vrf, DEFUN (no_ip_route_tag_distance_vrf, no_ip_route_tag_distance_vrf_cmd, - "no ip route A.B.C.D/M tag (1-65535) (1-255) " VRF_CMD_STR, + "no ip route A.B.C.D/M tag (1-65535) (1-255) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -2099,7 +2099,7 @@ DEFUN (no_ip_route_tag_distance_vrf, DEFUN (no_ip_route_flags_distance_vrf, no_ip_route_flags_distance_vrf_cmd, - "no ip route A.B.C.D/M (1-255) " VRF_CMD_STR, + "no ip route A.B.C.D/M (1-255) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -2121,7 +2121,7 @@ DEFUN (no_ip_route_flags_distance_vrf, DEFUN (no_ip_route_flags_tag_distance_vrf, no_ip_route_flags_tag_distance_vrf_cmd, - "no ip route A.B.C.D/M tag (1-65535) (1-255) " VRF_CMD_STR, + "no ip route A.B.C.D/M tag (1-65535) (1-255) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -2146,7 +2146,7 @@ DEFUN (no_ip_route_flags_tag_distance_vrf, DEFUN (no_ip_route_flags_distance2_vrf, no_ip_route_flags_distance2_vrf_cmd, - "no ip route A.B.C.D/M (1-255) " VRF_CMD_STR, + "no ip route A.B.C.D/M (1-255) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -2165,7 +2165,7 @@ DEFUN (no_ip_route_flags_distance2_vrf, DEFUN (no_ip_route_flags_tag_distance2_vrf, no_ip_route_flags_tag_distance2_vrf_cmd, - "no ip route A.B.C.D/M tag (1-65535) (1-255) " VRF_CMD_STR, + "no ip route A.B.C.D/M tag (1-65535) (1-255) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -2187,7 +2187,7 @@ DEFUN (no_ip_route_flags_tag_distance2_vrf, DEFUN (no_ip_route_mask_distance_vrf, no_ip_route_mask_distance_vrf_cmd, - "no ip route A.B.C.D A.B.C.D (1-255) " VRF_CMD_STR, + "no ip route A.B.C.D A.B.C.D (1-255) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -2209,7 +2209,7 @@ DEFUN (no_ip_route_mask_distance_vrf, DEFUN (no_ip_route_mask_tag_distance_vrf, no_ip_route_mask_tag_distance_vrf_cmd, - "no ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) " VRF_CMD_STR, + "no ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -2234,7 +2234,7 @@ DEFUN (no_ip_route_mask_tag_distance_vrf, DEFUN (no_ip_route_mask_flags_distance_vrf, no_ip_route_mask_flags_distance_vrf_cmd, - "no ip route A.B.C.D A.B.C.D (1-255) " VRF_CMD_STR, + "no ip route A.B.C.D A.B.C.D (1-255) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -2258,7 +2258,7 @@ DEFUN (no_ip_route_mask_flags_distance_vrf, DEFUN (no_ip_route_mask_flags_tag_distance_vrf, no_ip_route_mask_flags_tag_distance_vrf_cmd, - "no ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) " VRF_CMD_STR, + "no ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -2285,7 +2285,7 @@ DEFUN (no_ip_route_mask_flags_tag_distance_vrf, DEFUN (no_ip_route_mask_flags_distance2_vrf, no_ip_route_mask_flags_distance2_vrf_cmd, - "no ip route A.B.C.D A.B.C.D (1-255) " VRF_CMD_STR, + "no ip route A.B.C.D A.B.C.D (1-255) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -2306,7 +2306,7 @@ DEFUN (no_ip_route_mask_flags_distance2_vrf, DEFUN (no_ip_route_mask_flags_tag_distance2_vrf, no_ip_route_mask_flags_tag_distance2_vrf_cmd, - "no ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) " VRF_CMD_STR, + "no ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -2840,7 +2840,7 @@ do_show_ip_route (struct vty *vty, const char *vrf_name, safi_t safi, DEFUN (show_ip_route_vrf, show_ip_route_vrf_cmd, - "show ip route " VRF_CMD_STR " [json]", + "show ip route vrf NAME [json]", SHOW_STR IP_STR "IP routing table\n" @@ -2876,7 +2876,7 @@ DEFUN (show_ip_nht, DEFUN (show_ip_nht_vrf_all, show_ip_nht_vrf_all_cmd, - "show ip nht " VRF_ALL_CMD_STR, + "show ip nht vrf all", SHOW_STR IP_STR "IP nexthop tracking table\n" @@ -2916,7 +2916,7 @@ DEFUN (show_ipv6_nht, DEFUN (show_ipv6_nht_vrf_all, show_ipv6_nht_vrf_all_cmd, - "show ipv6 nht " VRF_ALL_CMD_STR, + "show ipv6 nht vrf all", SHOW_STR IP_STR "IPv6 nexthop tracking table\n" @@ -3144,7 +3144,7 @@ DEFUN (show_ip_route_supernets, DEFUN (show_ip_route_protocol, show_ip_route_protocol_cmd, - "show ip route [vrf NAME] " QUAGGA_IP_REDIST_STR_ZEBRA, + "show ip route [vrf NAME] ", SHOW_STR IP_STR "IP routing table\n" @@ -3534,7 +3534,7 @@ DEFUN (show_ip_route_summary_prefix, DEFUN (show_ip_route_vrf_all, show_ip_route_vrf_all_cmd, - "show ip route " VRF_ALL_CMD_STR, + "show ip route vrf all", SHOW_STR IP_STR "IP routing table\n" @@ -3579,7 +3579,7 @@ DEFUN (show_ip_route_vrf_all, DEFUN (show_ip_route_vrf_all_tag, show_ip_route_vrf_all_tag_cmd, - "show ip route " VRF_ALL_CMD_STR " tag (1-65535)", + "show ip route vrf all tag (1-65535)", SHOW_STR IP_STR "IP routing table\n" @@ -3633,7 +3633,7 @@ DEFUN (show_ip_route_vrf_all_tag, DEFUN (show_ip_route_vrf_all_prefix_longer, show_ip_route_vrf_all_prefix_longer_cmd, - "show ip route " VRF_ALL_CMD_STR " A.B.C.D/M longer-prefixes", + "show ip route vrf all A.B.C.D/M longer-prefixes", SHOW_STR IP_STR "IP routing table\n" @@ -3691,7 +3691,7 @@ DEFUN (show_ip_route_vrf_all_prefix_longer, DEFUN (show_ip_route_vrf_all_supernets, show_ip_route_vrf_all_supernets_cmd, - "show ip route " VRF_ALL_CMD_STR " supernets-only", + "show ip route vrf all supernets-only", SHOW_STR IP_STR "IP routing table\n" @@ -3745,7 +3745,7 @@ DEFUN (show_ip_route_vrf_all_supernets, DEFUN (show_ip_route_vrf_all_protocol, show_ip_route_vrf_all_protocol_cmd, - "show ip route " VRF_ALL_CMD_STR " " QUAGGA_IP_REDIST_STR_ZEBRA, + "show ip route vrf all ", SHOW_STR IP_STR "IP routing table\n" @@ -3800,7 +3800,7 @@ DEFUN (show_ip_route_vrf_all_protocol, DEFUN (show_ip_route_vrf_all_addr, show_ip_route_vrf_all_addr_cmd, - "show ip route " VRF_ALL_CMD_STR " A.B.C.D", + "show ip route vrf all A.B.C.D", SHOW_STR IP_STR "IP routing table\n" @@ -3842,7 +3842,7 @@ DEFUN (show_ip_route_vrf_all_addr, DEFUN (show_ip_route_vrf_all_prefix, show_ip_route_vrf_all_prefix_cmd, - "show ip route " VRF_ALL_CMD_STR " A.B.C.D/M", + "show ip route vrf all A.B.C.D/M", SHOW_STR IP_STR "IP routing table\n" @@ -3889,7 +3889,7 @@ DEFUN (show_ip_route_vrf_all_prefix, DEFUN (show_ip_route_vrf_all_summary, show_ip_route_vrf_all_summary_cmd, - "show ip route " VRF_ALL_CMD_STR " summary ", + "show ip route vrf all summary ", SHOW_STR IP_STR "IP routing table\n" @@ -3908,7 +3908,7 @@ DEFUN (show_ip_route_vrf_all_summary, DEFUN (show_ip_route_vrf_all_summary_prefix, show_ip_route_vrf_all_summary_prefix_cmd, - "show ip route " VRF_ALL_CMD_STR " summary prefix", + "show ip route vrf all summary prefix", SHOW_STR IP_STR "IP routing table\n" @@ -4718,7 +4718,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref_tag, DEFUN (ipv6_route_vrf, ipv6_route_vrf_cmd, - "ipv6 route X:X::X:X/M " VRF_CMD_STR, + "ipv6 route X:X::X:X/M vrf NAME", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4734,7 +4734,7 @@ DEFUN (ipv6_route_vrf, DEFUN (ipv6_route_tag_vrf, ipv6_route_tag_vrf_cmd, - "ipv6 route X:X::X:X/M tag (1-65535) " VRF_CMD_STR, + "ipv6 route X:X::X:X/M tag (1-65535) vrf NAME", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4753,7 +4753,7 @@ DEFUN (ipv6_route_tag_vrf, DEFUN (ipv6_route_flags_vrf, ipv6_route_flags_vrf_cmd, - "ipv6 route X:X::X:X/M " VRF_CMD_STR, + "ipv6 route X:X::X:X/M vrf NAME", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4772,7 +4772,7 @@ DEFUN (ipv6_route_flags_vrf, DEFUN (ipv6_route_flags_tag_vrf, ipv6_route_flags_tag_vrf_cmd, - "ipv6 route X:X::X:X/M tag (1-65535) " VRF_CMD_STR, + "ipv6 route X:X::X:X/M tag (1-65535) vrf NAME", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4794,7 +4794,7 @@ DEFUN (ipv6_route_flags_tag_vrf, DEFUN (ipv6_route_ifname_vrf, ipv6_route_ifname_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE " VRF_CMD_STR, + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE vrf NAME", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4810,7 +4810,7 @@ DEFUN (ipv6_route_ifname_vrf, } DEFUN (ipv6_route_ifname_tag_vrf, ipv6_route_ifname_tag_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) " VRF_CMD_STR, + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) vrf NAME", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4830,7 +4830,7 @@ DEFUN (ipv6_route_ifname_tag_vrf, DEFUN (ipv6_route_ifname_flags_vrf, ipv6_route_ifname_flags_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE " VRF_CMD_STR, + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE vrf NAME", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4850,7 +4850,7 @@ DEFUN (ipv6_route_ifname_flags_vrf, DEFUN (ipv6_route_ifname_flags_tag_vrf, ipv6_route_ifname_flags_tag_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) " VRF_CMD_STR, + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) vrf NAME", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4873,7 +4873,7 @@ DEFUN (ipv6_route_ifname_flags_tag_vrf, DEFUN (ipv6_route_pref_vrf, ipv6_route_pref_vrf_cmd, - "ipv6 route X:X::X:X/M (1-255) " VRF_CMD_STR, + "ipv6 route X:X::X:X/M (1-255) vrf NAME", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4891,7 +4891,7 @@ DEFUN (ipv6_route_pref_vrf, DEFUN (ipv6_route_pref_tag_vrf, ipv6_route_pref_tag_vrf_cmd, - "ipv6 route X:X::X:X/M tag (1-65535) (1-255) " VRF_CMD_STR, + "ipv6 route X:X::X:X/M tag (1-65535) (1-255) vrf NAME", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4912,7 +4912,7 @@ DEFUN (ipv6_route_pref_tag_vrf, DEFUN (ipv6_route_flags_pref_vrf, ipv6_route_flags_pref_vrf_cmd, - "ipv6 route X:X::X:X/M (1-255) " VRF_CMD_STR, + "ipv6 route X:X::X:X/M (1-255) vrf NAME", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4933,7 +4933,7 @@ DEFUN (ipv6_route_flags_pref_vrf, DEFUN (ipv6_route_flags_pref_tag_vrf, ipv6_route_flags_pref_tag_vrf_cmd, - "ipv6 route X:X::X:X/M tag (1-65535) (1-255) " VRF_CMD_STR, + "ipv6 route X:X::X:X/M tag (1-65535) (1-255) vrf NAME", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4957,7 +4957,7 @@ DEFUN (ipv6_route_flags_pref_tag_vrf, DEFUN (ipv6_route_ifname_pref_vrf, ipv6_route_ifname_pref_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255) " VRF_CMD_STR, + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255) vrf NAME", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4976,7 +4976,7 @@ DEFUN (ipv6_route_ifname_pref_vrf, DEFUN (ipv6_route_ifname_pref_tag_vrf, ipv6_route_ifname_pref_tag_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255) " VRF_CMD_STR, + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255) vrf NAME", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4998,7 +4998,7 @@ DEFUN (ipv6_route_ifname_pref_tag_vrf, DEFUN (ipv6_route_ifname_flags_pref_vrf, ipv6_route_ifname_flags_pref_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255) " VRF_CMD_STR, + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255) vrf NAME", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -5020,7 +5020,7 @@ DEFUN (ipv6_route_ifname_flags_pref_vrf, DEFUN (ipv6_route_ifname_flags_pref_tag_vrf, ipv6_route_ifname_flags_pref_tag_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255) " VRF_CMD_STR, + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255) vrf NAME", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -5045,7 +5045,7 @@ DEFUN (ipv6_route_ifname_flags_pref_tag_vrf, DEFUN (no_ipv6_route_vrf, no_ipv6_route_vrf_cmd, - "no ipv6 route X:X::X:X/M " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -5062,7 +5062,7 @@ DEFUN (no_ipv6_route_vrf, DEFUN (no_ipv6_route_tag_vrf, no_ipv6_route_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M tag (1-65535) " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M tag (1-65535) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -5082,7 +5082,7 @@ DEFUN (no_ipv6_route_tag_vrf, DEFUN (no_ipv6_route_flags_vrf, no_ipv6_route_flags_vrf_cmd, - "no ipv6 route X:X::X:X/M " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -5102,7 +5102,7 @@ DEFUN (no_ipv6_route_flags_vrf, DEFUN (no_ipv6_route_flags_tag_vrf, no_ipv6_route_flags_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M tag (1-65535) " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M tag (1-65535) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -5125,7 +5125,7 @@ DEFUN (no_ipv6_route_flags_tag_vrf, DEFUN (no_ipv6_route_ifname_vrf, no_ipv6_route_ifname_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -5143,7 +5143,7 @@ DEFUN (no_ipv6_route_ifname_vrf, DEFUN (no_ipv6_route_ifname_tag_vrf, no_ipv6_route_ifname_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -5164,7 +5164,7 @@ DEFUN (no_ipv6_route_ifname_tag_vrf, DEFUN (no_ipv6_route_ifname_flags_vrf, no_ipv6_route_ifname_flags_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -5185,7 +5185,7 @@ DEFUN (no_ipv6_route_ifname_flags_vrf, DEFUN (no_ipv6_route_ifname_flags_tag_vrf, no_ipv6_route_ifname_flags_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -5209,7 +5209,7 @@ DEFUN (no_ipv6_route_ifname_flags_tag_vrf, DEFUN (no_ipv6_route_pref_vrf, no_ipv6_route_pref_vrf_cmd, - "no ipv6 route X:X::X:X/M (1-255) " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M (1-255) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -5228,7 +5228,7 @@ DEFUN (no_ipv6_route_pref_vrf, DEFUN (no_ipv6_route_pref_tag_vrf, no_ipv6_route_pref_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M tag (1-65535) (1-255) " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M tag (1-65535) (1-255) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -5250,7 +5250,7 @@ DEFUN (no_ipv6_route_pref_tag_vrf, DEFUN (no_ipv6_route_flags_pref_vrf, no_ipv6_route_flags_pref_vrf_cmd, - "no ipv6 route X:X::X:X/M (1-255) " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M (1-255) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -5273,7 +5273,7 @@ DEFUN (no_ipv6_route_flags_pref_vrf, DEFUN (no_ipv6_route_flags_pref_tag_vrf, no_ipv6_route_flags_pref_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M tag (1-65535) (1-255) " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M tag (1-65535) (1-255) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -5299,7 +5299,7 @@ DEFUN (no_ipv6_route_flags_pref_tag_vrf, DEFUN (no_ipv6_route_ifname_pref_vrf, no_ipv6_route_ifname_pref_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255) " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -5319,7 +5319,7 @@ DEFUN (no_ipv6_route_ifname_pref_vrf, DEFUN (no_ipv6_route_ifname_pref_tag_vrf, no_ipv6_route_ifname_pref_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255) " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -5342,7 +5342,7 @@ DEFUN (no_ipv6_route_ifname_pref_tag_vrf, DEFUN (no_ipv6_route_ifname_flags_pref_vrf, no_ipv6_route_ifname_flags_pref_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255) " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -5365,7 +5365,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref_vrf, DEFUN (no_ipv6_route_ifname_flags_pref_tag_vrf, no_ipv6_route_ifname_flags_pref_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255) " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255) vrf NAME", NO_STR IP_STR "Establish static routes\n" @@ -5391,7 +5391,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref_tag_vrf, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ipv6 route " VRF_CMD_STR " [json]", + * "show ipv6 route vrf NAME [json]", * SHOW_STR * IP_STR * "IPv6 routing table\n" @@ -5597,7 +5597,7 @@ DEFUN (show_ipv6_route_prefix_longer, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ipv6 route " VRF_CMD_STR " " QUAGGA_IP6_REDIST_STR_ZEBRA, + * "show ipv6 route " VRF_CMD_STR " ", * SHOW_STR * IP_STR * "IP routing table\n" @@ -5607,7 +5607,7 @@ DEFUN (show_ipv6_route_prefix_longer, */ DEFUN (show_ipv6_route_protocol, show_ipv6_route_protocol_cmd, - "show ipv6 route " QUAGGA_IP6_REDIST_STR_ZEBRA, + "show ipv6 route ", SHOW_STR IP_STR "IP routing table\n" @@ -5846,7 +5846,7 @@ DEFUN (show_ipv6_mroute, DEFUN (show_ipv6_route_vrf_all, show_ipv6_route_vrf_all_cmd, - "show ipv6 route " VRF_ALL_CMD_STR, + "show ipv6 route vrf all", SHOW_STR IP_STR "IPv6 routing table\n" @@ -5891,7 +5891,7 @@ DEFUN (show_ipv6_route_vrf_all, DEFUN (show_ipv6_route_vrf_all_tag, show_ipv6_route_vrf_all_tag_cmd, - "show ipv6 route " VRF_ALL_CMD_STR " tag (1-65535)", + "show ipv6 route vrf all tag (1-65535)", SHOW_STR IP_STR "IPv6 routing table\n" @@ -5946,7 +5946,7 @@ DEFUN (show_ipv6_route_vrf_all_tag, DEFUN (show_ipv6_route_vrf_all_prefix_longer, show_ipv6_route_vrf_all_prefix_longer_cmd, - "show ipv6 route " VRF_ALL_CMD_STR " X:X::X:X/M longer-prefixes", + "show ipv6 route vrf all X:X::X:X/M longer-prefixes", SHOW_STR IP_STR "IPv6 routing table\n" @@ -6004,7 +6004,7 @@ DEFUN (show_ipv6_route_vrf_all_prefix_longer, DEFUN (show_ipv6_route_vrf_all_protocol, show_ipv6_route_vrf_all_protocol_cmd, - "show ipv6 route " VRF_ALL_CMD_STR " " QUAGGA_IP6_REDIST_STR_ZEBRA, + "show ipv6 route vrf all ", SHOW_STR IP_STR "IP routing table\n" @@ -6059,7 +6059,7 @@ DEFUN (show_ipv6_route_vrf_all_protocol, DEFUN (show_ipv6_route_vrf_all_addr, show_ipv6_route_vrf_all_addr_cmd, - "show ipv6 route " VRF_ALL_CMD_STR " X:X::X:X", + "show ipv6 route vrf all X:X::X:X", SHOW_STR IP_STR "IPv6 routing table\n" @@ -6101,7 +6101,7 @@ DEFUN (show_ipv6_route_vrf_all_addr, DEFUN (show_ipv6_route_vrf_all_prefix, show_ipv6_route_vrf_all_prefix_cmd, - "show ipv6 route " VRF_ALL_CMD_STR " X:X::X:X/M", + "show ipv6 route vrf all X:X::X:X/M", SHOW_STR IP_STR "IPv6 routing table\n" @@ -6148,7 +6148,7 @@ DEFUN (show_ipv6_route_vrf_all_prefix, DEFUN (show_ipv6_route_vrf_all_summary, show_ipv6_route_vrf_all_summary_cmd, - "show ipv6 route " VRF_ALL_CMD_STR " summary", + "show ipv6 route vrf all summary", SHOW_STR IP_STR "IPv6 routing table\n" @@ -6167,7 +6167,7 @@ DEFUN (show_ipv6_route_vrf_all_summary, DEFUN (show_ipv6_mroute_vrf_all, show_ipv6_mroute_vrf_all_cmd, - "show ipv6 mroute " VRF_ALL_CMD_STR, + "show ipv6 mroute vrf all", SHOW_STR IP_STR "IPv6 Multicast routing table\n" @@ -6203,7 +6203,7 @@ DEFUN (show_ipv6_mroute_vrf_all, DEFUN (show_ipv6_route_vrf_all_summary_prefix, show_ipv6_route_vrf_all_summary_prefix_cmd, - "show ipv6 route " VRF_ALL_CMD_STR " summary prefix", + "show ipv6 route vrf all summary prefix", SHOW_STR IP_STR "IPv6 routing table\n" -- cgit v1.2.3 From 3ce54f781213b28bea95449f294ffc07630c9412 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Sun, 25 Sep 2016 14:22:48 +0000 Subject: Expand #defines in command strings Signed-off-by: Daniel Walton Reviewed-by: Donald Sharp Reviewed-by: Don Slice Reviewed-by: Sam Tannous Ticket: --- bgpd/bgp_bfd.c | 2 +- bgpd/bgp_vty.c | 58 ++++++++++++++++++++++++------------------------ lib/command.c | 6 ++--- tools/argv_translator.py | 6 +++-- zebra/zebra_vty.c | 2 +- 5 files changed, 38 insertions(+), 36 deletions(-) (limited to 'zebra') diff --git a/bgpd/bgp_bfd.c b/bgpd/bgp_bfd.c index bb8f4ceee..72ea3c60a 100644 --- a/bgpd/bgp_bfd.c +++ b/bgpd/bgp_bfd.c @@ -640,7 +640,7 @@ DEFUN_HIDDEN (neighbor_bfd_type, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * NO_NEIGHBOR_CMD2 "bfd " BFD_CMD_DETECT_MULT_RANGE BFD_CMD_MIN_RX_RANGE BFD_CMD_MIN_TX_RANGE, + * "no neighbor bfd (2-255) (50-60000) (50-60000)", * NO_STR * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index f1411ea5e..4dcba02c2 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -2910,7 +2910,7 @@ DEFUN (neighbor_peer_group, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * NO_NEIGHBOR_CMD "remote-as (" CMD_AS_RANGE "|internal|external)", + * "no neighbor remote-as ((1-4294967295)|internal|external)", * NO_STR * NEIGHBOR_STR * NEIGHBOR_ADDR_STR @@ -3171,14 +3171,14 @@ DEFUN (neighbor_local_as_no_prepend_replace_as, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * NO_NEIGHBOR_CMD2 "local-as " CMD_AS_RANGE, + * "no neighbor local-as (1-4294967295)", * NO_STR * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 * "Specify a local-as number\n" * "AS number used as local AS\n" * - * NO_NEIGHBOR_CMD2 "local-as " CMD_AS_RANGE " no-prepend", + * "no neighbor local-as (1-4294967295) no-prepend", * NO_STR * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 @@ -3186,7 +3186,7 @@ DEFUN (neighbor_local_as_no_prepend_replace_as, * "AS number used as local AS\n" * "Do not prepend local-as to updates from ebgp peers\n" * - * NO_NEIGHBOR_CMD2 "local-as " CMD_AS_RANGE " no-prepend replace-as", + * "no neighbor local-as (1-4294967295) no-prepend replace-as", * NO_STR * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 @@ -3281,7 +3281,7 @@ DEFUN (neighbor_password, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * NO_NEIGHBOR_CMD2 "password LINE", + * "no neighbor password LINE", * NO_STR * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 @@ -4130,7 +4130,7 @@ DEFUN (no_neighbor_nexthop_local_unchanged, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * NEIGHBOR_CMD2 "attribute-unchanged med next-hop as-path", + * "neighbor attribute-unchanged med next-hop as-path", * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 * "BGP attribute is propagated unchanged to this neighbor\n" @@ -4138,7 +4138,7 @@ DEFUN (no_neighbor_nexthop_local_unchanged, * "Nexthop attribute\n" * "As-path attribute\n" * - * NEIGHBOR_CMD2 "attribute-unchanged med as-path next-hop", + * "neighbor attribute-unchanged med as-path next-hop", * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 * "BGP attribute is propagated unchanged to this neighbor\n" @@ -4146,7 +4146,7 @@ DEFUN (no_neighbor_nexthop_local_unchanged, * "As-path attribute\n" * "Nexthop attribute\n" * - * NEIGHBOR_CMD2 "attribute-unchanged as-path next-hop med", + * "neighbor attribute-unchanged as-path next-hop med", * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 * "BGP attribute is propagated unchanged to this neighbor\n" @@ -4154,7 +4154,7 @@ DEFUN (no_neighbor_nexthop_local_unchanged, * "Nexthop attribute\n" * "Med attribute\n" * - * NEIGHBOR_CMD2 "attribute-unchanged next-hop as-path med", + * "neighbor attribute-unchanged next-hop as-path med", * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 * "BGP attribute is propagated unchanged to this neighbor\n" @@ -4162,7 +4162,7 @@ DEFUN (no_neighbor_nexthop_local_unchanged, * "As-path attribute\n" * "Med attribute\n" * - * NEIGHBOR_CMD2 "attribute-unchanged as-path med next-hop", + * "neighbor attribute-unchanged as-path med next-hop", * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 * "BGP attribute is propagated unchanged to this neighbor\n" @@ -4170,7 +4170,7 @@ DEFUN (no_neighbor_nexthop_local_unchanged, * "Med attribute\n" * "Nexthop attribute\n" * - * NEIGHBOR_CMD2 "attribute-unchanged next-hop med as-path", + * "neighbor attribute-unchanged next-hop med as-path", * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 * "BGP attribute is propagated unchanged to this neighbor\n" @@ -4297,7 +4297,7 @@ DEFUN (neighbor_attr_unchanged4, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * NO_NEIGHBOR_CMD2 "attribute-unchanged next-hop med as-path", + * "no neighbor attribute-unchanged next-hop med as-path", * NO_STR * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 @@ -4306,7 +4306,7 @@ DEFUN (neighbor_attr_unchanged4, * "Med attribute\n" * "As-path attribute\n" * - * NO_NEIGHBOR_CMD2 "attribute-unchanged as-path med next-hop", + * "no neighbor attribute-unchanged as-path med next-hop", * NO_STR * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 @@ -4315,7 +4315,7 @@ DEFUN (neighbor_attr_unchanged4, * "Med attribute\n" * "Nexthop attribute\n" * - * NO_NEIGHBOR_CMD2 "attribute-unchanged med as-path next-hop", + * "no neighbor attribute-unchanged med as-path next-hop", * NO_STR * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 @@ -4324,7 +4324,7 @@ DEFUN (neighbor_attr_unchanged4, * "As-path attribute\n" * "Nexthop attribute\n" * - * NO_NEIGHBOR_CMD2 "attribute-unchanged next-hop as-path med", + * "no neighbor attribute-unchanged next-hop as-path med", * NO_STR * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 @@ -4333,7 +4333,7 @@ DEFUN (neighbor_attr_unchanged4, * "As-path attribute\n" * "Med attribute\n" * - * NO_NEIGHBOR_CMD2 "attribute-unchanged as-path next-hop med", + * "no neighbor attribute-unchanged as-path next-hop med", * NO_STR * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 @@ -4342,7 +4342,7 @@ DEFUN (neighbor_attr_unchanged4, * "Nexthop attribute\n" * "Med attribute\n" * - * NO_NEIGHBOR_CMD2 "attribute-unchanged med next-hop as-path", + * "no neighbor attribute-unchanged med next-hop as-path", * NO_STR * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 @@ -4534,7 +4534,7 @@ DEFUN (neighbor_ebgp_multihop_ttl, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * NO_NEIGHBOR_CMD2 "ebgp-multihop " CMD_RANGE_STR(1, MAXTTL), + * "no neighbor ebgp-multihop (1-255)", * NO_STR * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 @@ -4558,7 +4558,7 @@ DEFUN (no_neighbor_ebgp_multihop, /* disable-connected-check */ /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * NEIGHBOR_CMD2 "enforce-multihop", + * "neighbor enforce-multihop", * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 * "Enforce EBGP neighbors perform multihop\n" @@ -4577,7 +4577,7 @@ DEFUN (neighbor_disable_connected_check, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * NO_NEIGHBOR_CMD2 "enforce-multihop", + * "no neighbor enforce-multihop", * NO_STR * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 @@ -4630,7 +4630,7 @@ DEFUN (neighbor_description, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * NO_NEIGHBOR_CMD2 "description .LINE", + * "no neighbor description .LINE", * NO_STR * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 @@ -4773,7 +4773,7 @@ DEFUN (neighbor_default_originate_rmap, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * NO_NEIGHBOR_CMD2 "default-originate route-map WORD", + * "no neighbor default-originate route-map WORD", * NO_STR * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 @@ -5779,14 +5779,14 @@ DEFUN (neighbor_maximum_prefix_threshold_restart, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295>", + * "no neighbor maximum-prefix <1-4294967295>", * NO_STR * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 * "Maximum number of prefix accept from this peer\n" * "maximum no. of prefix limit\n" * - * NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> <1-100> restart <1-65535>", + * "no neighbor maximum-prefix <1-4294967295> <1-100> restart <1-65535>", * NO_STR * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 @@ -5796,7 +5796,7 @@ DEFUN (neighbor_maximum_prefix_threshold_restart, * "Restart bgp connection after limit is exceeded\n" * "Restart interval in minutes" * - * NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> warning-only", + * "no neighbor maximum-prefix <1-4294967295> warning-only", * NO_STR * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 @@ -5804,7 +5804,7 @@ DEFUN (neighbor_maximum_prefix_threshold_restart, * "maximum no. of prefix limit\n" * "Only give warning message when limit is exceeded\n" * - * NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> restart <1-65535>", + * "no neighbor maximum-prefix <1-4294967295> restart <1-65535>", * NO_STR * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 @@ -5813,7 +5813,7 @@ DEFUN (neighbor_maximum_prefix_threshold_restart, * "Restart bgp connection after limit is exceeded\n" * "Restart interval in minutes" * - * NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> <1-100> warning-only", + * "no neighbor maximum-prefix <1-4294967295> <1-100> warning-only", * NO_STR * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 @@ -5822,7 +5822,7 @@ DEFUN (neighbor_maximum_prefix_threshold_restart, * "Threshold value (%) at which to generate a warning msg\n" * "Only give warning message when limit is exceeded\n" * - * NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> <1-100>", + * "no neighbor maximum-prefix <1-4294967295> <1-100>", * NO_STR * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 @@ -5853,7 +5853,7 @@ DEFUN (no_neighbor_maximum_prefix, /* "neighbor allowas-in" */ /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * NEIGHBOR_CMD2 "allowas-in <1-10>", + * "neighbor allowas-in <1-10>", * NEIGHBOR_STR * NEIGHBOR_ADDR_STR2 * "Accept as-path with my AS present in it\n" diff --git a/lib/command.c b/lib/command.c index 6fb265f97..10448ef6f 100644 --- a/lib/command.c +++ b/lib/command.c @@ -1814,7 +1814,7 @@ set_log_file(struct vty *vty, const char *fname, int loglevel) DEFUN (config_log_file, config_log_file_cmd, - "log file FILENAME [" LOG_LEVELS "]", + "log file FILENAME [emergencies|alerts|critical|errors|warnings|notifications|informational|debugging]", "Logging control\n" "Logging to file\n" "Logging filename\n" @@ -1855,7 +1855,7 @@ DEFUN (no_config_log_file, DEFUN (config_log_syslog, config_log_syslog_cmd, - "log syslog [" LOG_LEVELS "]", + "log syslog [emergencies|alerts|critical|errors|warnings|notifications|informational|debugging]", "Logging control\n" "Set syslog logging level\n" LOG_LEVEL_DESC) @@ -1893,7 +1893,7 @@ DEFUN_DEPRECATED (config_log_syslog_facility, DEFUN (no_config_log_syslog, no_config_log_syslog_cmd, - "no log syslog [] [" LOG_LEVELS "]", + "no log syslog [] [emergencies|alerts|critical|errors|warnings|notifications|informational|debugging]", NO_STR "Logging control\n" "Cancel logging to syslog\n" diff --git a/tools/argv_translator.py b/tools/argv_translator.py index 8a4a0b8cf..4845c08d0 100755 --- a/tools/argv_translator.py +++ b/tools/argv_translator.py @@ -520,6 +520,7 @@ def expand_command_string(line): line = line.replace('" QUAGGA_REDIST_STR_OSPF6D "', '') line = line.replace('" QUAGGA_REDIST_STR_ISISD "', '') line = line.replace('" LOG_FACILITIES "', '') + line = line.replace('" LOG_LEVELS "', ' (emergencies|alerts|critical|errors|warnings|notifications|informational|debugging)') # endswith line = line.replace('" CMD_AS_RANGE,', ' (1-4294967295)",') @@ -551,6 +552,7 @@ def expand_command_string(line): line = line.replace('" QUAGGA_REDIST_STR_OSPF6D,', ' ",') line = line.replace('" QUAGGA_REDIST_STR_ISISD,', ' ",') line = line.replace('" LOG_FACILITIES,', ' ",') + line = line.replace('" LOG_LEVELS,', ' (emergencies|alerts|critical|errors|warnings|notifications|informational|debugging)",') # startswith line = line.replace('LISTEN_RANGE_CMD "', '"bgp listen range ') @@ -562,6 +564,7 @@ def expand_command_string(line): line = line.replace('PIM_CMD_IP_IGMP_QUERY_INTERVAL "', '"ip igmp query-interval ') line = line.replace('PIM_CMD_IP_IGMP_QUERY_MAX_RESPONSE_TIME "', '"ip igmp query-max-response-time ') line = line.replace('PIM_CMD_IP_IGMP_QUERY_MAX_RESPONSE_TIME_DSEC "', '"ip igmp query-max-response-time-dsec ') + line = line.replace('LOG_LEVELS "', '"(emergencies|alerts|critical|errors|warnings|notifications|informational|debugging) ') # solo line = line.replace('NO_NEIGHBOR_CMD2,', '"no neighbor ",') @@ -720,7 +723,6 @@ DEFUN (no_bgp_maxmed_onstartup, new_command_string_expanded = expand_command_string(new_command_string) lines = [] - # dwalton lines.append("DEFUN (%s,\n" % self.name) lines.append(" %s,\n" % self.name_cmd) # lines.append(new_command_string) @@ -868,7 +870,7 @@ def update_argvs(filename): if line.strip() == '*/': state = None fh.write(line) - elif line.strip().startswith('* "'): + elif line.strip().startswith('* ') and not line.strip().startswith('* '): # dwalton new_line = expand_command_string(line[3:]) # chop the leading " * " fh.write(" * %s" % new_line) diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 878af09ee..005c9370b 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -5597,7 +5597,7 @@ DEFUN (show_ipv6_route_prefix_longer, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ipv6 route " VRF_CMD_STR " ", + * "show ipv6 route vrf NAME ", * SHOW_STR * IP_STR * "IP routing table\n" -- cgit v1.2.3 From 030721b7efef08e4706441172eaf4353a09bbbd3 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 26 Sep 2016 11:25:28 -0400 Subject: zebra: Refactore "ip route XXXXXX" commands Convert all 'ip route XXXX' commands to use the new syntax and collapse all functions that we can easily do. Signed-off-by: Donald Sharp --- zebra/zebra_vty.c | 1361 +++++++++++------------------------------------------ 1 file changed, 271 insertions(+), 1090 deletions(-) (limited to 'zebra') diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 005c9370b..97fc6d2ab 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -337,26 +337,39 @@ DEFUN (show_ip_rpf_addr, return CMD_SUCCESS; } -/* Static route configuration. */ -DEFUN (ip_route, - ip_route_cmd, - "ip route A.B.C.D/M ", - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Null interface\n") +static void +zebra_vty_ip_route_tdv_helper (int argc, struct cmd_token *argv[], + int idx_curr, char **tag, + char **distance, char **vrf) { - int idx_ipv4_prefixlen = 2; - int idx_ipv4_ifname_null = 3; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, - NULL, NULL); + if (argc > idx_curr) + { + if (strmatch (argv[idx_curr]->text, "tag")) + { + *tag = argv[idx_curr]->arg; + idx_curr++; + } + + if (strmatch (argv[idx_curr]->text, "vrf")) + { + *distance = NULL; + *vrf = argv[idx_curr]->arg; + } + else + { + *distance = argv[idx_curr]->arg; + *vrf = argv[++idx_curr]->arg; + } + } + + return; } -DEFUN (ip_route_tag, - ip_route_tag_cmd, - "ip route A.B.C.D/M tag (1-65535)", + +/* Static route configuration. */ +DEFUN (ip_route, + ip_route_cmd, + "ip route A.B.C.D/M [tag (1-65535)] [(1-255)] [vrf NAME]", IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -364,36 +377,29 @@ DEFUN (ip_route_tag, "IP gateway interface name\n" "Null interface\n" "Set tag for this route\n" - "Tag value\n") + "Tag value\n" + "Distance value for this route\n" + VRF_CMD_HELP_STR) { int idx_ipv4_prefixlen = 2; int idx_ipv4_ifname_null = 3; - int idx_number = 5; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, - NULL, NULL); + int idx_curr = 4; + char *tag, *distance, *vrf; + + tag = distance = vrf = NULL; + zebra_vty_ip_route_tdv_helper (argc, argv, idx_curr, &tag, &distance, &vrf); + + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, + argv[idx_ipv4_prefixlen]->arg, + NULL, + argv[idx_ipv4_ifname_null]->arg, + NULL, + tag, distance, vrf); } DEFUN (ip_route_flags, ip_route_flags_cmd, - "ip route A.B.C.D/M ", - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n") -{ - int idx_ipv4_prefixlen = 2; - int idx_ipv4_ifname = 3; - int idx_reject_blackhole = 4; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, - NULL, NULL); -} - -DEFUN (ip_route_flags_tag, - ip_route_flags_tag_cmd, - "ip route A.B.C.D/M tag (1-65535)", + "ip route A.B.C.D/M [tag (1-65535)] [(1-255)] [vrf NAME]", IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -402,73 +408,60 @@ DEFUN (ip_route_flags_tag, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n" "Set tag for this route\n" - "Tag value\n") - + "Tag value\n" + "Distance value for this route\n" + VRF_CMD_HELP_STR) { int idx_ipv4_prefixlen = 2; int idx_ipv4_ifname = 3; int idx_reject_blackhole = 4; - int idx_number = 6; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, - NULL, NULL); + int idx_curr = 5; + char *tag, *distance, *vrf; + + tag = distance = vrf = NULL; + zebra_vty_ip_route_tdv_helper (argc, argv, idx_curr, &tag, &distance, &vrf); + + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, + argv[idx_ipv4_prefixlen]->arg, + NULL, + argv[idx_ipv4_ifname]->arg, + argv[idx_reject_blackhole]->arg, + tag, distance, vrf); } DEFUN (ip_route_flags2, ip_route_flags2_cmd, - "ip route A.B.C.D/M ", - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n") -{ - int idx_ipv4_prefixlen = 2; - int idx_reject_blackhole = 3; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, NULL, - NULL, NULL); -} - -DEFUN (ip_route_flags2_tag, - ip_route_flags2_tag_cmd, - "ip route A.B.C.D/M tag (1-65535)", + "ip route A.B.C.D/M [tag (1-65535)] [(1-255)] [vrf NAME]", IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n" "Set tag for this route\n" - "Tag value\n") - + "Tag value\n" + "Distance value for this route\n" + VRF_CMD_HELP_STR) { int idx_ipv4_prefixlen = 2; int idx_reject_blackhole = 3; - int idx_number = 5; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, - NULL, NULL); + int idx_curr = 4; + char *tag, *distance, *vrf; + + tag = distance = vrf = NULL; + zebra_vty_ip_route_tdv_helper (argc, argv, idx_curr, &tag, &distance, &vrf); + + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, + argv[idx_ipv4_prefixlen]->arg, + NULL, + NULL, + argv[idx_reject_blackhole]->arg, + tag, distance, vrf); } /* Mask as A.B.C.D format. */ DEFUN (ip_route_mask, ip_route_mask_cmd, - "ip route A.B.C.D A.B.C.D ", - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Null interface\n") -{ - int idx_ipv4 = 2; - int idx_ipv4_2 = 3; - int idx_ipv4_ifname_null = 4; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, - NULL, NULL); -} - -DEFUN (ip_route_mask_tag, - ip_route_mask_tag_cmd, - "ip route A.B.C.D A.B.C.D tag (1-65535)", + "ip route A.B.C.D A.B.C.D [tag (1-65535)] [(1-255)] [vrf NAME]", IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -477,40 +470,29 @@ DEFUN (ip_route_mask_tag, "IP gateway interface name\n" "Null interface\n" "Set tag for this route\n" - "Tag value\n") - + "Tag value\n" + "Distance value for this route\n" + VRF_CMD_HELP_STR) { int idx_ipv4 = 2; int idx_ipv4_2 = 3; int idx_ipv4_ifname_null = 4; - int idx_number = 6; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, - NULL, NULL); + int idx_curr = 5; + char *tag, *distance, *vrf; + + tag = distance = vrf = NULL; + zebra_vty_ip_route_tdv_helper (argc, argv, idx_curr, &tag, &distance, &vrf); + + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, + argv[idx_ipv4]->arg, + argv[idx_ipv4_2]->arg, + argv[idx_ipv4_ifname_null]->arg, + NULL, tag, distance, vrf); } DEFUN (ip_route_mask_flags, ip_route_mask_flags_cmd, - "ip route A.B.C.D A.B.C.D ", - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n") -{ - int idx_ipv4 = 2; - int idx_ipv4_2 = 3; - int idx_ipv4_ifname = 4; - int idx_reject_blackhole = 5; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, - NULL, NULL); -} - -DEFUN (ip_route_mask_flags_tag, - ip_route_mask_flags_tag_cmd, - "ip route A.B.C.D A.B.C.D tag (1-65535)", + "ip route A.B.C.D A.B.C.D [tag (1-65535)] [(1-255)] [vrf NAME]", IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -520,38 +502,32 @@ DEFUN (ip_route_mask_flags_tag, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n" "Set tag for this route\n" - "Tag value\n") - + "Tag value\n" + "Distance value for this route\n" + VRF_CMD_HELP_STR) { int idx_ipv4 = 2; int idx_ipv4_2 = 3; int idx_ipv4_ifname = 4; int idx_reject_blackhole = 5; - int idx_number = 7; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, - NULL, NULL); + int idx_curr = 6; + char *tag, *distance, *vrf; + + tag = distance = vrf = NULL; + zebra_vty_ip_route_tdv_helper (argc, argv, idx_curr, &tag, &distance, &vrf); + + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, + argv[idx_ipv4]->arg, + argv[idx_ipv4_2]->arg, + argv[idx_ipv4_ifname]->arg, + argv[idx_reject_blackhole]->arg, + tag, distance, vrf); } + DEFUN (ip_route_mask_flags2, ip_route_mask_flags2_cmd, - "ip route A.B.C.D A.B.C.D ", - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n") -{ - int idx_ipv4 = 2; - int idx_ipv4_2 = 3; - int idx_reject_blackhole = 4; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, - NULL, NULL); -} - -DEFUN (ip_route_mask_flags2_tag, - ip_route_mask_flags2_tag_cmd, - "ip route A.B.C.D A.B.C.D tag (1-65535)", + "ip route A.B.C.D A.B.C.D [tag (1-65535)] [(1-255)] [vrf NAME]", IP_STR "Establish static routes\n" "IP destination prefix\n" @@ -559,367 +535,123 @@ DEFUN (ip_route_mask_flags2_tag, "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n" "Set tag for this route\n" - "Tag value\n") + "Tag value\n" + "Distance value for this route\n" + VRF_CMD_HELP_STR) { int idx_ipv4 = 2; int idx_ipv4_2 = 3; int idx_reject_blackhole = 4; - int idx_number = 6; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, - NULL, NULL); + int idx_curr = 5; + char *tag, *distance, *vrf; + + tag = distance = vrf = NULL; + zebra_vty_ip_route_tdv_helper (argc, argv, idx_curr, &tag, &distance, &vrf); + + return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, + argv[idx_ipv4]->arg, + argv[idx_ipv4_2]->arg, + NULL, + argv[idx_reject_blackhole]->arg, + tag, distance, vrf); } -/* Distance option value. */ -DEFUN (ip_route_distance, - ip_route_distance_cmd, - "ip route A.B.C.D/M (1-255)", +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole)", + * NO_STR + * IP_STR + * "Establish static routes\n" + * "IP destination prefix (e.g. 10.0.0.0/8)\n" + * "IP gateway address\n" + * "IP gateway interface name\n" + * "Emit an ICMP unreachable when matched\n" + * "Silently discard pkts when matched\n" + * + */ +DEFUN (no_ip_route, + no_ip_route_cmd, + "no ip route A.B.C.D/M ", + NO_STR IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" "IP gateway address\n" "IP gateway interface name\n" - "Null interface\n" - "Distance value for this route\n") + "Null interface\n") { - int idx_ipv4_prefixlen = 2; - int idx_ipv4_ifname_null = 3; - int idx_number = 4; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, - argv[idx_number]->arg, NULL); + int idx_ipv4_prefixlen = 3; + int idx_ipv4_ifname_null = 4; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, + NULL, NULL); } -DEFUN (ip_route_tag_distance, - ip_route_tag_distance_cmd, - "ip route A.B.C.D/M tag (1-65535) (1-255)", +/* + * CHECK ME - The following ALIASes need to be implemented in this DEFUN + * "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535>", + * NO_STR + * IP_STR + * "Establish static routes\n" + * "IP destination prefix (e.g. 10.0.0.0/8)\n" + * "IP gateway address\n" + * "IP gateway interface name\n" + * "Emit an ICMP unreachable when matched\n" + * "Silently discard pkts when matched\n" + * "Tag of this route\n" + * "Tag value\n" + * + */ +DEFUN (no_ip_route_tag, + no_ip_route_tag_cmd, + "no ip route A.B.C.D/M tag (1-65535)", + NO_STR IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" "IP gateway address\n" "IP gateway interface name\n" "Null interface\n" - "Set tag for this route\n" - "Tag value\n" - "Distance value for this route\n") - + "Tag of this route\n" + "Tag value\n") { - int idx_ipv4_prefixlen = 2; - int idx_ipv4_ifname_null = 3; - int idx_number = 5; - int idx_number_2 = 6; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, - argv[idx_number_2]->arg, NULL); + int idx_ipv4_prefixlen = 3; + int idx_ipv4_ifname_null = 4; + int idx_number = 6; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, + NULL, NULL); } -DEFUN (ip_route_flags_distance, - ip_route_flags_distance_cmd, - "ip route A.B.C.D/M (1-255)", +DEFUN (no_ip_route_flags2, + no_ip_route_flags2_cmd, + "no ip route A.B.C.D/M ", + NO_STR IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Distance value for this route\n") + "Silently discard pkts when matched\n") { - int idx_ipv4_prefixlen = 2; - int idx_ipv4_ifname = 3; - int idx_reject_blackhole = 4; - int idx_number = 5; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, - argv[idx_number]->arg, NULL); + int idx_ipv4_prefixlen = 3; + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, NULL, NULL, + NULL, NULL); } -DEFUN (ip_route_flags_tag_distance, - ip_route_flags_tag_distance_cmd, - "ip route A.B.C.D/M tag (1-65535) (1-255)", +DEFUN (no_ip_route_flags2_tag, + no_ip_route_flags2_tag_cmd, + "no ip route A.B.C.D/M tag (1-65535)", + NO_STR IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n" - "Set tag for this route\n" - "Tag value\n" - "Distance value for this route\n") + "Tag of this route\n" + "Tag value\n") { - int idx_ipv4_prefixlen = 2; - int idx_ipv4_ifname = 3; + int idx_ipv4_prefixlen = 3; int idx_reject_blackhole = 4; - int idx_number = 6; - int idx_number_2 = 7; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, - argv[idx_number_2]->arg, NULL); -} - -DEFUN (ip_route_flags_distance2, - ip_route_flags_distance2_cmd, - "ip route A.B.C.D/M (1-255)", - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Distance value for this route\n") -{ - int idx_ipv4_prefixlen = 2; - int idx_reject_blackhole = 3; - int idx_number = 4; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, NULL, - argv[idx_number]->arg, NULL); -} - -DEFUN (ip_route_flags_tag_distance2, - ip_route_flags_tag_distance2_cmd, - "ip route A.B.C.D/M tag (1-65535) (1-255)", - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Set tag for this route\n" - "Tag value\n" - "Distance value for this route\n") -{ - int idx_ipv4_prefixlen = 2; - int idx_reject_blackhole = 3; - int idx_number = 5; - int idx_number_2 = 6; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, - argv[idx_number_2]->arg, NULL); -} - -DEFUN (ip_route_mask_distance, - ip_route_mask_distance_cmd, - "ip route A.B.C.D A.B.C.D (1-255)", - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Null interface\n" - "Distance value for this route\n") -{ - int idx_ipv4 = 2; - int idx_ipv4_2 = 3; - int idx_ipv4_ifname_null = 4; - int idx_number = 5; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, - argv[idx_number]->arg, NULL); -} - -DEFUN (ip_route_mask_tag_distance, - ip_route_mask_tag_distance_cmd, - "ip route A.B.C.D A.B.C.D tag (1-65535) (1-255)", - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Null interface\n" - "Set tag for this route\n" - "Tag value\n" - "Distance value for this route\n") -{ - int idx_ipv4 = 2; - int idx_ipv4_2 = 3; - int idx_ipv4_ifname_null = 4; - int idx_number = 6; - int idx_number_2 = 7; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, - argv[idx_number_2]->arg, NULL); -} - -DEFUN (ip_route_mask_flags_tag_distance, - ip_route_mask_flags_tag_distance_cmd, - "ip route A.B.C.D A.B.C.D tag (1-65535) (1-255)", - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Set tag for this route\n" - "Tag value\n" - "Distance value for this route\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n") -{ - int idx_ipv4 = 2; - int idx_ipv4_2 = 3; - int idx_ipv4_ifname = 4; - int idx_reject_blackhole = 5; - int idx_number = 7; - int idx_number_2 = 8; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, - argv[idx_number_2]->arg, NULL); -} - - -DEFUN (ip_route_mask_flags_distance, - ip_route_mask_flags_distance_cmd, - "ip route A.B.C.D A.B.C.D (1-255)", - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Distance value for this route\n") -{ - int idx_ipv4 = 2; - int idx_ipv4_2 = 3; - int idx_ipv4_ifname = 4; - int idx_reject_blackhole = 5; - int idx_number = 6; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, - argv[idx_number]->arg, NULL); -} - -DEFUN (ip_route_mask_flags_distance2, - ip_route_mask_flags_distance2_cmd, - "ip route A.B.C.D A.B.C.D (1-255)", - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Distance value for this route\n") -{ - int idx_ipv4 = 2; - int idx_ipv4_2 = 3; - int idx_reject_blackhole = 4; - int idx_number = 5; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, - argv[idx_number]->arg, NULL); -} - -DEFUN (ip_route_mask_flags_tag_distance2, - ip_route_mask_flags_tag_distance2_cmd, - "ip route A.B.C.D A.B.C.D tag (1-65535) (1-255)", - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "Set tag for this route\n" - "Tag value\n" - "Distance value for this route\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n") -{ - int idx_ipv4 = 2; - int idx_ipv4_2 = 3; - int idx_reject_blackhole = 4; - int idx_number = 6; - int idx_number_2 = 7; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, - argv[idx_number_2]->arg, NULL); -} - -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole)", - * NO_STR - * IP_STR - * "Establish static routes\n" - * "IP destination prefix (e.g. 10.0.0.0/8)\n" - * "IP gateway address\n" - * "IP gateway interface name\n" - * "Emit an ICMP unreachable when matched\n" - * "Silently discard pkts when matched\n" - * - */ -DEFUN (no_ip_route, - no_ip_route_cmd, - "no ip route A.B.C.D/M ", - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Null interface\n") -{ - int idx_ipv4_prefixlen = 3; - int idx_ipv4_ifname_null = 4; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, - NULL, NULL); -} - -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535>", - * NO_STR - * IP_STR - * "Establish static routes\n" - * "IP destination prefix (e.g. 10.0.0.0/8)\n" - * "IP gateway address\n" - * "IP gateway interface name\n" - * "Emit an ICMP unreachable when matched\n" - * "Silently discard pkts when matched\n" - * "Tag of this route\n" - * "Tag value\n" - * - */ -DEFUN (no_ip_route_tag, - no_ip_route_tag_cmd, - "no ip route A.B.C.D/M tag (1-65535)", - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Null interface\n" - "Tag of this route\n" - "Tag value\n") -{ - int idx_ipv4_prefixlen = 3; - int idx_ipv4_ifname_null = 4; - int idx_number = 6; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, - NULL, NULL); -} - - - -DEFUN (no_ip_route_flags2, - no_ip_route_flags2_cmd, - "no ip route A.B.C.D/M ", - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n") -{ - int idx_ipv4_prefixlen = 3; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, NULL, NULL, - NULL, NULL); -} - -DEFUN (no_ip_route_flags2_tag, - no_ip_route_flags2_tag_cmd, - "no ip route A.B.C.D/M tag (1-65535)", - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Tag of this route\n" - "Tag value\n") -{ - int idx_ipv4_prefixlen = 3; - int idx_reject_blackhole = 4; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, NULL, argv[idx_reject_blackhole]->arg, - NULL, NULL); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, NULL, argv[idx_reject_blackhole]->arg, + NULL, NULL); } /* @@ -1294,518 +1026,9 @@ DEFUN (no_ip_route_mask_flags_tag_distance2, argv[idx_number_2]->arg, NULL); } -/* Static route configuration. */ -DEFUN (ip_route_vrf, - ip_route_vrf_cmd, - "ip route A.B.C.D/M vrf NAME", - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Null interface\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4_prefixlen = 2; - int idx_ipv4_ifname_null = 3; - int idx_name = 5; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, NULL, argv[idx_name]->arg); -} - -DEFUN (ip_route_tag_vrf, - ip_route_tag_vrf_cmd, - "ip route A.B.C.D/M tag (1-65535) vrf NAME", - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Null interface\n" - "Set tag for this route\n" - "Tag value\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4_prefixlen = 2; - int idx_ipv4_ifname_null = 3; - int idx_number = 5; - int idx_name = 7; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, NULL, argv[idx_name]->arg); -} - -DEFUN (ip_route_flags_vrf, - ip_route_flags_vrf_cmd, - "ip route A.B.C.D/M vrf NAME", - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4_prefixlen = 2; - int idx_ipv4_ifname = 3; - int idx_reject_blackhole = 4; - int idx_name = 6; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg); -} - -DEFUN (ip_route_flags_tag_vrf, - ip_route_flags_tag_vrf_cmd, - "ip route A.B.C.D/M tag (1-65535) vrf NAME", - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Set tag for this route\n" - "Tag value\n" - VRF_CMD_HELP_STR) - -{ - int idx_ipv4_prefixlen = 2; - int idx_ipv4_ifname = 3; - int idx_reject_blackhole = 4; - int idx_number = 6; - int idx_name = 8; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg); -} - -DEFUN (ip_route_flags2_vrf, - ip_route_flags2_vrf_cmd, - "ip route A.B.C.D/M vrf NAME", - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4_prefixlen = 2; - int idx_reject_blackhole = 3; - int idx_name = 5; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg); -} - -DEFUN (ip_route_flags2_tag_vrf, - ip_route_flags2_tag_vrf_cmd, - "ip route A.B.C.D/M tag (1-65535) vrf NAME", - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Set tag for this route\n" - "Tag value\n" - VRF_CMD_HELP_STR) - -{ - int idx_ipv4_prefixlen = 2; - int idx_reject_blackhole = 3; - int idx_number = 5; - int idx_name = 7; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg); -} - -/* Mask as A.B.C.D format. */ -DEFUN (ip_route_mask_vrf, - ip_route_mask_vrf_cmd, - "ip route A.B.C.D A.B.C.D vrf NAME", - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Null interface\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4 = 2; - int idx_ipv4_2 = 3; - int idx_ipv4_ifname_null = 4; - int idx_name = 6; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, NULL, argv[idx_name]->arg); -} - -DEFUN (ip_route_mask_tag_vrf, - ip_route_mask_tag_vrf_cmd, - "ip route A.B.C.D A.B.C.D tag (1-65535) vrf NAME", - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Null interface\n" - "Set tag for this route\n" - "Tag value\n" - VRF_CMD_HELP_STR) - -{ - int idx_ipv4 = 2; - int idx_ipv4_2 = 3; - int idx_ipv4_ifname_null = 4; - int idx_number = 6; - int idx_name = 8; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, NULL, argv[idx_name]->arg); -} - -DEFUN (ip_route_mask_flags_vrf, - ip_route_mask_flags_vrf_cmd, - "ip route A.B.C.D A.B.C.D vrf NAME", - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4 = 2; - int idx_ipv4_2 = 3; - int idx_ipv4_ifname = 4; - int idx_reject_blackhole = 5; - int idx_name = 7; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg); -} - -DEFUN (ip_route_mask_flags_tag_vrf, - ip_route_mask_flags_tag_vrf_cmd, - "ip route A.B.C.D A.B.C.D tag (1-65535) vrf NAME", - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Set tag for this route\n" - "Tag value\n" - VRF_CMD_HELP_STR) - -{ - int idx_ipv4 = 2; - int idx_ipv4_2 = 3; - int idx_ipv4_ifname = 4; - int idx_reject_blackhole = 5; - int idx_number = 7; - int idx_name = 9; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg); -} - -DEFUN (ip_route_mask_flags2_vrf, - ip_route_mask_flags2_vrf_cmd, - "ip route A.B.C.D A.B.C.D vrf NAME", - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4 = 2; - int idx_ipv4_2 = 3; - int idx_reject_blackhole = 4; - int idx_name = 6; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg); -} - -DEFUN (ip_route_mask_flags2_tag_vrf, - ip_route_mask_flags2_tag_vrf_cmd, - "ip route A.B.C.D A.B.C.D tag (1-65535) vrf NAME", - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Set tag for this route\n" - "Tag value\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4 = 2; - int idx_ipv4_2 = 3; - int idx_reject_blackhole = 4; - int idx_number = 6; - int idx_name = 8; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg); -} - -/* Distance option value. */ -DEFUN (ip_route_distance_vrf, - ip_route_distance_vrf_cmd, - "ip route A.B.C.D/M (1-255) vrf NAME", - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Null interface\n" - "Distance value for this route\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4_prefixlen = 2; - int idx_ipv4_ifname_null = 3; - int idx_number = 4; - int idx_name = 6; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_name]->arg); -} - -DEFUN (ip_route_tag_distance_vrf, - ip_route_tag_distance_vrf_cmd, - "ip route A.B.C.D/M tag (1-65535) (1-255) vrf NAME", - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Null interface\n" - "Set tag for this route\n" - "Tag value\n" - "Distance value for this route\n" - VRF_CMD_HELP_STR) - -{ - int idx_ipv4_prefixlen = 2; - int idx_ipv4_ifname_null = 3; - int idx_number = 5; - int idx_number_2 = 6; - int idx_name = 8; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); -} - -DEFUN (ip_route_flags_distance_vrf, - ip_route_flags_distance_vrf_cmd, - "ip route A.B.C.D/M (1-255) vrf NAME", - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Distance value for this route\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4_prefixlen = 2; - int idx_ipv4_ifname = 3; - int idx_reject_blackhole = 4; - int idx_number = 5; - int idx_name = 7; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg); -} - -DEFUN (ip_route_flags_tag_distance_vrf, - ip_route_flags_tag_distance_vrf_cmd, - "ip route A.B.C.D/M tag (1-65535) (1-255) vrf NAME", - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Set tag for this route\n" - "Tag value\n" - "Distance value for this route\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4_prefixlen = 2; - int idx_ipv4_ifname = 3; - int idx_reject_blackhole = 4; - int idx_number = 6; - int idx_number_2 = 7; - int idx_name = 9; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); -} - -DEFUN (ip_route_flags_distance2_vrf, - ip_route_flags_distance2_vrf_cmd, - "ip route A.B.C.D/M (1-255) vrf NAME", - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Distance value for this route\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4_prefixlen = 2; - int idx_reject_blackhole = 3; - int idx_number = 4; - int idx_name = 6; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg); -} - -DEFUN (ip_route_flags_tag_distance2_vrf, - ip_route_flags_tag_distance2_vrf_cmd, - "ip route A.B.C.D/M tag (1-65535) (1-255) vrf NAME", - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Set tag for this route\n" - "Tag value\n" - "Distance value for this route\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4_prefixlen = 2; - int idx_reject_blackhole = 3; - int idx_number = 5; - int idx_number_2 = 6; - int idx_name = 8; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); -} - -DEFUN (ip_route_mask_distance_vrf, - ip_route_mask_distance_vrf_cmd, - "ip route A.B.C.D A.B.C.D (1-255) vrf NAME", - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Null interface\n" - "Distance value for this route\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4 = 2; - int idx_ipv4_2 = 3; - int idx_ipv4_ifname_null = 4; - int idx_number = 5; - int idx_name = 7; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_name]->arg); -} - -DEFUN (ip_route_mask_tag_distance_vrf, - ip_route_mask_tag_distance_vrf_cmd, - "ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) vrf NAME", - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Null interface\n" - "Set tag for this route\n" - "Tag value\n" - "Distance value for this route\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4 = 2; - int idx_ipv4_2 = 3; - int idx_ipv4_ifname_null = 4; - int idx_number = 6; - int idx_number_2 = 7; - int idx_name = 9; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); -} - -DEFUN (ip_route_mask_flags_tag_distance_vrf, - ip_route_mask_flags_tag_distance_vrf_cmd, - "ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) vrf NAME", - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Set tag for this route\n" - "Tag value\n" - "Distance value for this route\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4 = 2; - int idx_ipv4_2 = 3; - int idx_ipv4_ifname = 4; - int idx_reject_blackhole = 5; - int idx_number = 7; - int idx_number_2 = 8; - int idx_name = 10; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); -} - - -DEFUN (ip_route_mask_flags_distance_vrf, - ip_route_mask_flags_distance_vrf_cmd, - "ip route A.B.C.D A.B.C.D (1-255) vrf NAME", - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Distance value for this route\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4 = 2; - int idx_ipv4_2 = 3; - int idx_ipv4_ifname = 4; - int idx_reject_blackhole = 5; - int idx_number = 6; - int idx_name = 8; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg); -} - -DEFUN (ip_route_mask_flags_distance2_vrf, - ip_route_mask_flags_distance2_vrf_cmd, - "ip route A.B.C.D A.B.C.D (1-255) vrf NAME", - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Distance value for this route\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4 = 2; - int idx_ipv4_2 = 3; - int idx_reject_blackhole = 4; - int idx_number = 5; - int idx_name = 7; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg); -} - -DEFUN (ip_route_mask_flags_tag_distance2_vrf, - ip_route_mask_flags_tag_distance2_vrf_cmd, - "ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) vrf NAME", - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "Set tag for this route\n" - "Tag value\n" - "Distance value for this route\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4 = 2; - int idx_ipv4_2 = 3; - int idx_reject_blackhole = 4; - int idx_number = 6; - int idx_number_2 = 7; - int idx_name = 9; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); -} - DEFUN (no_ip_route_vrf, no_ip_route_vrf_cmd, - "no ip route A.B.C.D/M vrf NAME", + "no ip route A.B.C.D/M " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1823,7 +1046,7 @@ DEFUN (no_ip_route_vrf, DEFUN (no_ip_route_flags_vrf, no_ip_route_flags_vrf_cmd, - "no ip route A.B.C.D/M vrf NAME", + "no ip route A.B.C.D/M " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1843,7 +1066,7 @@ DEFUN (no_ip_route_flags_vrf, DEFUN (no_ip_route_tag_vrf, no_ip_route_tag_vrf_cmd, - "no ip route A.B.C.D/M tag (1-65535) vrf NAME", + "no ip route A.B.C.D/M tag (1-65535) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1864,7 +1087,7 @@ DEFUN (no_ip_route_tag_vrf, DEFUN (no_ip_route_flags_tag_vrf, no_ip_route_flags_tag_vrf_cmd, - "no ip route A.B.C.D/M tag (1-65535) vrf NAME", + "no ip route A.B.C.D/M tag (1-65535) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1887,7 +1110,7 @@ DEFUN (no_ip_route_flags_tag_vrf, DEFUN (no_ip_route_flags2_vrf, no_ip_route_flags2_vrf_cmd, - "no ip route A.B.C.D/M vrf NAME", + "no ip route A.B.C.D/M " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1904,7 +1127,7 @@ DEFUN (no_ip_route_flags2_vrf, DEFUN (no_ip_route_flags2_tag_vrf, no_ip_route_flags2_tag_vrf_cmd, - "no ip route A.B.C.D/M tag (1-65535) vrf NAME", + "no ip route A.B.C.D/M tag (1-65535) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1924,7 +1147,7 @@ DEFUN (no_ip_route_flags2_tag_vrf, DEFUN (no_ip_route_mask_vrf, no_ip_route_mask_vrf_cmd, - "no ip route A.B.C.D A.B.C.D vrf NAME", + "no ip route A.B.C.D A.B.C.D " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1944,7 +1167,7 @@ DEFUN (no_ip_route_mask_vrf, DEFUN (no_ip_route_mask_flags_vrf, no_ip_route_mask_flags_vrf_cmd, - "no ip route A.B.C.D A.B.C.D vrf NAME", + "no ip route A.B.C.D A.B.C.D " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1966,7 +1189,7 @@ DEFUN (no_ip_route_mask_flags_vrf, DEFUN (no_ip_route_mask_tag_vrf, no_ip_route_mask_tag_vrf_cmd, - "no ip route A.B.C.D A.B.C.D tag (1-65535) vrf NAME", + "no ip route A.B.C.D A.B.C.D tag (1-65535) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -1989,7 +1212,7 @@ DEFUN (no_ip_route_mask_tag_vrf, DEFUN (no_ip_route_mask_flags_tag_vrf, no_ip_route_mask_flags_tag_vrf_cmd, - "no ip route A.B.C.D A.B.C.D tag (1-65535) vrf NAME", + "no ip route A.B.C.D A.B.C.D tag (1-65535) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -2014,7 +1237,7 @@ DEFUN (no_ip_route_mask_flags_tag_vrf, DEFUN (no_ip_route_mask_flags2_vrf, no_ip_route_mask_flags2_vrf_cmd, - "no ip route A.B.C.D A.B.C.D vrf NAME", + "no ip route A.B.C.D A.B.C.D " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -2033,7 +1256,7 @@ DEFUN (no_ip_route_mask_flags2_vrf, DEFUN (no_ip_route_mask_flags2_tag_vrf, no_ip_route_mask_flags2_tag_vrf_cmd, - "no ip route A.B.C.D A.B.C.D tag (1-65535) vrf NAME", + "no ip route A.B.C.D A.B.C.D tag (1-65535) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -2056,7 +1279,7 @@ DEFUN (no_ip_route_mask_flags2_tag_vrf, DEFUN (no_ip_route_distance_vrf, no_ip_route_distance_vrf_cmd, - "no ip route A.B.C.D/M (1-255) vrf NAME", + "no ip route A.B.C.D/M (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -2076,7 +1299,7 @@ DEFUN (no_ip_route_distance_vrf, DEFUN (no_ip_route_tag_distance_vrf, no_ip_route_tag_distance_vrf_cmd, - "no ip route A.B.C.D/M tag (1-65535) (1-255) vrf NAME", + "no ip route A.B.C.D/M tag (1-65535) (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -2099,7 +1322,7 @@ DEFUN (no_ip_route_tag_distance_vrf, DEFUN (no_ip_route_flags_distance_vrf, no_ip_route_flags_distance_vrf_cmd, - "no ip route A.B.C.D/M (1-255) vrf NAME", + "no ip route A.B.C.D/M (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -2121,7 +1344,7 @@ DEFUN (no_ip_route_flags_distance_vrf, DEFUN (no_ip_route_flags_tag_distance_vrf, no_ip_route_flags_tag_distance_vrf_cmd, - "no ip route A.B.C.D/M tag (1-65535) (1-255) vrf NAME", + "no ip route A.B.C.D/M tag (1-65535) (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -2146,7 +1369,7 @@ DEFUN (no_ip_route_flags_tag_distance_vrf, DEFUN (no_ip_route_flags_distance2_vrf, no_ip_route_flags_distance2_vrf_cmd, - "no ip route A.B.C.D/M (1-255) vrf NAME", + "no ip route A.B.C.D/M (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -2165,7 +1388,7 @@ DEFUN (no_ip_route_flags_distance2_vrf, DEFUN (no_ip_route_flags_tag_distance2_vrf, no_ip_route_flags_tag_distance2_vrf_cmd, - "no ip route A.B.C.D/M tag (1-65535) (1-255) vrf NAME", + "no ip route A.B.C.D/M tag (1-65535) (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -2187,7 +1410,7 @@ DEFUN (no_ip_route_flags_tag_distance2_vrf, DEFUN (no_ip_route_mask_distance_vrf, no_ip_route_mask_distance_vrf_cmd, - "no ip route A.B.C.D A.B.C.D (1-255) vrf NAME", + "no ip route A.B.C.D A.B.C.D (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -2209,7 +1432,7 @@ DEFUN (no_ip_route_mask_distance_vrf, DEFUN (no_ip_route_mask_tag_distance_vrf, no_ip_route_mask_tag_distance_vrf_cmd, - "no ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) vrf NAME", + "no ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -2234,7 +1457,7 @@ DEFUN (no_ip_route_mask_tag_distance_vrf, DEFUN (no_ip_route_mask_flags_distance_vrf, no_ip_route_mask_flags_distance_vrf_cmd, - "no ip route A.B.C.D A.B.C.D (1-255) vrf NAME", + "no ip route A.B.C.D A.B.C.D (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -2258,7 +1481,7 @@ DEFUN (no_ip_route_mask_flags_distance_vrf, DEFUN (no_ip_route_mask_flags_tag_distance_vrf, no_ip_route_mask_flags_tag_distance_vrf_cmd, - "no ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) vrf NAME", + "no ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -2285,7 +1508,7 @@ DEFUN (no_ip_route_mask_flags_tag_distance_vrf, DEFUN (no_ip_route_mask_flags_distance2_vrf, no_ip_route_mask_flags_distance2_vrf_cmd, - "no ip route A.B.C.D A.B.C.D (1-255) vrf NAME", + "no ip route A.B.C.D A.B.C.D (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -2306,7 +1529,7 @@ DEFUN (no_ip_route_mask_flags_distance2_vrf, DEFUN (no_ip_route_mask_flags_tag_distance2_vrf, no_ip_route_mask_flags_tag_distance2_vrf_cmd, - "no ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) vrf NAME", + "no ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -2840,7 +2063,7 @@ do_show_ip_route (struct vty *vty, const char *vrf_name, safi_t safi, DEFUN (show_ip_route_vrf, show_ip_route_vrf_cmd, - "show ip route vrf NAME [json]", + "show ip route " VRF_CMD_STR " [json]", SHOW_STR IP_STR "IP routing table\n" @@ -2876,7 +2099,7 @@ DEFUN (show_ip_nht, DEFUN (show_ip_nht_vrf_all, show_ip_nht_vrf_all_cmd, - "show ip nht vrf all", + "show ip nht " VRF_ALL_CMD_STR, SHOW_STR IP_STR "IP nexthop tracking table\n" @@ -2916,7 +2139,7 @@ DEFUN (show_ipv6_nht, DEFUN (show_ipv6_nht_vrf_all, show_ipv6_nht_vrf_all_cmd, - "show ipv6 nht vrf all", + "show ipv6 nht " VRF_ALL_CMD_STR, SHOW_STR IP_STR "IPv6 nexthop tracking table\n" @@ -3144,7 +2367,7 @@ DEFUN (show_ip_route_supernets, DEFUN (show_ip_route_protocol, show_ip_route_protocol_cmd, - "show ip route [vrf NAME] ", + "show ip route [vrf NAME] " QUAGGA_IP_REDIST_STR_ZEBRA, SHOW_STR IP_STR "IP routing table\n" @@ -3534,7 +2757,7 @@ DEFUN (show_ip_route_summary_prefix, DEFUN (show_ip_route_vrf_all, show_ip_route_vrf_all_cmd, - "show ip route vrf all", + "show ip route " VRF_ALL_CMD_STR, SHOW_STR IP_STR "IP routing table\n" @@ -3579,7 +2802,7 @@ DEFUN (show_ip_route_vrf_all, DEFUN (show_ip_route_vrf_all_tag, show_ip_route_vrf_all_tag_cmd, - "show ip route vrf all tag (1-65535)", + "show ip route " VRF_ALL_CMD_STR " tag (1-65535)", SHOW_STR IP_STR "IP routing table\n" @@ -3633,7 +2856,7 @@ DEFUN (show_ip_route_vrf_all_tag, DEFUN (show_ip_route_vrf_all_prefix_longer, show_ip_route_vrf_all_prefix_longer_cmd, - "show ip route vrf all A.B.C.D/M longer-prefixes", + "show ip route " VRF_ALL_CMD_STR " A.B.C.D/M longer-prefixes", SHOW_STR IP_STR "IP routing table\n" @@ -3691,7 +2914,7 @@ DEFUN (show_ip_route_vrf_all_prefix_longer, DEFUN (show_ip_route_vrf_all_supernets, show_ip_route_vrf_all_supernets_cmd, - "show ip route vrf all supernets-only", + "show ip route " VRF_ALL_CMD_STR " supernets-only", SHOW_STR IP_STR "IP routing table\n" @@ -3745,7 +2968,7 @@ DEFUN (show_ip_route_vrf_all_supernets, DEFUN (show_ip_route_vrf_all_protocol, show_ip_route_vrf_all_protocol_cmd, - "show ip route vrf all ", + "show ip route " VRF_ALL_CMD_STR " " QUAGGA_IP_REDIST_STR_ZEBRA, SHOW_STR IP_STR "IP routing table\n" @@ -3800,7 +3023,7 @@ DEFUN (show_ip_route_vrf_all_protocol, DEFUN (show_ip_route_vrf_all_addr, show_ip_route_vrf_all_addr_cmd, - "show ip route vrf all A.B.C.D", + "show ip route " VRF_ALL_CMD_STR " A.B.C.D", SHOW_STR IP_STR "IP routing table\n" @@ -3842,7 +3065,7 @@ DEFUN (show_ip_route_vrf_all_addr, DEFUN (show_ip_route_vrf_all_prefix, show_ip_route_vrf_all_prefix_cmd, - "show ip route vrf all A.B.C.D/M", + "show ip route " VRF_ALL_CMD_STR " A.B.C.D/M", SHOW_STR IP_STR "IP routing table\n" @@ -3889,7 +3112,7 @@ DEFUN (show_ip_route_vrf_all_prefix, DEFUN (show_ip_route_vrf_all_summary, show_ip_route_vrf_all_summary_cmd, - "show ip route vrf all summary ", + "show ip route " VRF_ALL_CMD_STR " summary ", SHOW_STR IP_STR "IP routing table\n" @@ -3908,7 +3131,7 @@ DEFUN (show_ip_route_vrf_all_summary, DEFUN (show_ip_route_vrf_all_summary_prefix, show_ip_route_vrf_all_summary_prefix_cmd, - "show ip route vrf all summary prefix", + "show ip route " VRF_ALL_CMD_STR " summary prefix", SHOW_STR IP_STR "IP routing table\n" @@ -4718,7 +3941,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref_tag, DEFUN (ipv6_route_vrf, ipv6_route_vrf_cmd, - "ipv6 route X:X::X:X/M vrf NAME", + "ipv6 route X:X::X:X/M " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4734,7 +3957,7 @@ DEFUN (ipv6_route_vrf, DEFUN (ipv6_route_tag_vrf, ipv6_route_tag_vrf_cmd, - "ipv6 route X:X::X:X/M tag (1-65535) vrf NAME", + "ipv6 route X:X::X:X/M tag (1-65535) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4753,7 +3976,7 @@ DEFUN (ipv6_route_tag_vrf, DEFUN (ipv6_route_flags_vrf, ipv6_route_flags_vrf_cmd, - "ipv6 route X:X::X:X/M vrf NAME", + "ipv6 route X:X::X:X/M " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4772,7 +3995,7 @@ DEFUN (ipv6_route_flags_vrf, DEFUN (ipv6_route_flags_tag_vrf, ipv6_route_flags_tag_vrf_cmd, - "ipv6 route X:X::X:X/M tag (1-65535) vrf NAME", + "ipv6 route X:X::X:X/M tag (1-65535) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4794,7 +4017,7 @@ DEFUN (ipv6_route_flags_tag_vrf, DEFUN (ipv6_route_ifname_vrf, ipv6_route_ifname_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE vrf NAME", + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4810,7 +4033,7 @@ DEFUN (ipv6_route_ifname_vrf, } DEFUN (ipv6_route_ifname_tag_vrf, ipv6_route_ifname_tag_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) vrf NAME", + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4830,7 +4053,7 @@ DEFUN (ipv6_route_ifname_tag_vrf, DEFUN (ipv6_route_ifname_flags_vrf, ipv6_route_ifname_flags_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE vrf NAME", + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4850,7 +4073,7 @@ DEFUN (ipv6_route_ifname_flags_vrf, DEFUN (ipv6_route_ifname_flags_tag_vrf, ipv6_route_ifname_flags_tag_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) vrf NAME", + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4873,7 +4096,7 @@ DEFUN (ipv6_route_ifname_flags_tag_vrf, DEFUN (ipv6_route_pref_vrf, ipv6_route_pref_vrf_cmd, - "ipv6 route X:X::X:X/M (1-255) vrf NAME", + "ipv6 route X:X::X:X/M (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4891,7 +4114,7 @@ DEFUN (ipv6_route_pref_vrf, DEFUN (ipv6_route_pref_tag_vrf, ipv6_route_pref_tag_vrf_cmd, - "ipv6 route X:X::X:X/M tag (1-65535) (1-255) vrf NAME", + "ipv6 route X:X::X:X/M tag (1-65535) (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4912,7 +4135,7 @@ DEFUN (ipv6_route_pref_tag_vrf, DEFUN (ipv6_route_flags_pref_vrf, ipv6_route_flags_pref_vrf_cmd, - "ipv6 route X:X::X:X/M (1-255) vrf NAME", + "ipv6 route X:X::X:X/M (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4933,7 +4156,7 @@ DEFUN (ipv6_route_flags_pref_vrf, DEFUN (ipv6_route_flags_pref_tag_vrf, ipv6_route_flags_pref_tag_vrf_cmd, - "ipv6 route X:X::X:X/M tag (1-65535) (1-255) vrf NAME", + "ipv6 route X:X::X:X/M tag (1-65535) (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4957,7 +4180,7 @@ DEFUN (ipv6_route_flags_pref_tag_vrf, DEFUN (ipv6_route_ifname_pref_vrf, ipv6_route_ifname_pref_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255) vrf NAME", + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4976,7 +4199,7 @@ DEFUN (ipv6_route_ifname_pref_vrf, DEFUN (ipv6_route_ifname_pref_tag_vrf, ipv6_route_ifname_pref_tag_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255) vrf NAME", + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -4998,7 +4221,7 @@ DEFUN (ipv6_route_ifname_pref_tag_vrf, DEFUN (ipv6_route_ifname_flags_pref_vrf, ipv6_route_ifname_flags_pref_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255) vrf NAME", + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -5020,7 +4243,7 @@ DEFUN (ipv6_route_ifname_flags_pref_vrf, DEFUN (ipv6_route_ifname_flags_pref_tag_vrf, ipv6_route_ifname_flags_pref_tag_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255) vrf NAME", + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255) " VRF_CMD_STR, IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -5045,7 +4268,7 @@ DEFUN (ipv6_route_ifname_flags_pref_tag_vrf, DEFUN (no_ipv6_route_vrf, no_ipv6_route_vrf_cmd, - "no ipv6 route X:X::X:X/M vrf NAME", + "no ipv6 route X:X::X:X/M " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -5062,7 +4285,7 @@ DEFUN (no_ipv6_route_vrf, DEFUN (no_ipv6_route_tag_vrf, no_ipv6_route_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M tag (1-65535) vrf NAME", + "no ipv6 route X:X::X:X/M tag (1-65535) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -5082,7 +4305,7 @@ DEFUN (no_ipv6_route_tag_vrf, DEFUN (no_ipv6_route_flags_vrf, no_ipv6_route_flags_vrf_cmd, - "no ipv6 route X:X::X:X/M vrf NAME", + "no ipv6 route X:X::X:X/M " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -5102,7 +4325,7 @@ DEFUN (no_ipv6_route_flags_vrf, DEFUN (no_ipv6_route_flags_tag_vrf, no_ipv6_route_flags_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M tag (1-65535) vrf NAME", + "no ipv6 route X:X::X:X/M tag (1-65535) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -5125,7 +4348,7 @@ DEFUN (no_ipv6_route_flags_tag_vrf, DEFUN (no_ipv6_route_ifname_vrf, no_ipv6_route_ifname_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE vrf NAME", + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -5143,7 +4366,7 @@ DEFUN (no_ipv6_route_ifname_vrf, DEFUN (no_ipv6_route_ifname_tag_vrf, no_ipv6_route_ifname_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) vrf NAME", + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -5164,7 +4387,7 @@ DEFUN (no_ipv6_route_ifname_tag_vrf, DEFUN (no_ipv6_route_ifname_flags_vrf, no_ipv6_route_ifname_flags_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE vrf NAME", + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -5185,7 +4408,7 @@ DEFUN (no_ipv6_route_ifname_flags_vrf, DEFUN (no_ipv6_route_ifname_flags_tag_vrf, no_ipv6_route_ifname_flags_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) vrf NAME", + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -5209,7 +4432,7 @@ DEFUN (no_ipv6_route_ifname_flags_tag_vrf, DEFUN (no_ipv6_route_pref_vrf, no_ipv6_route_pref_vrf_cmd, - "no ipv6 route X:X::X:X/M (1-255) vrf NAME", + "no ipv6 route X:X::X:X/M (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -5228,7 +4451,7 @@ DEFUN (no_ipv6_route_pref_vrf, DEFUN (no_ipv6_route_pref_tag_vrf, no_ipv6_route_pref_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M tag (1-65535) (1-255) vrf NAME", + "no ipv6 route X:X::X:X/M tag (1-65535) (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -5250,7 +4473,7 @@ DEFUN (no_ipv6_route_pref_tag_vrf, DEFUN (no_ipv6_route_flags_pref_vrf, no_ipv6_route_flags_pref_vrf_cmd, - "no ipv6 route X:X::X:X/M (1-255) vrf NAME", + "no ipv6 route X:X::X:X/M (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -5273,7 +4496,7 @@ DEFUN (no_ipv6_route_flags_pref_vrf, DEFUN (no_ipv6_route_flags_pref_tag_vrf, no_ipv6_route_flags_pref_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M tag (1-65535) (1-255) vrf NAME", + "no ipv6 route X:X::X:X/M tag (1-65535) (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -5299,7 +4522,7 @@ DEFUN (no_ipv6_route_flags_pref_tag_vrf, DEFUN (no_ipv6_route_ifname_pref_vrf, no_ipv6_route_ifname_pref_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255) vrf NAME", + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -5319,7 +4542,7 @@ DEFUN (no_ipv6_route_ifname_pref_vrf, DEFUN (no_ipv6_route_ifname_pref_tag_vrf, no_ipv6_route_ifname_pref_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255) vrf NAME", + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -5342,7 +4565,7 @@ DEFUN (no_ipv6_route_ifname_pref_tag_vrf, DEFUN (no_ipv6_route_ifname_flags_pref_vrf, no_ipv6_route_ifname_flags_pref_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255) vrf NAME", + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -5365,7 +4588,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref_vrf, DEFUN (no_ipv6_route_ifname_flags_pref_tag_vrf, no_ipv6_route_ifname_flags_pref_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255) vrf NAME", + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255) " VRF_CMD_STR, NO_STR IP_STR "Establish static routes\n" @@ -5391,7 +4614,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref_tag_vrf, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ipv6 route vrf NAME [json]", + * "show ipv6 route " VRF_CMD_STR " [json]", * SHOW_STR * IP_STR * "IPv6 routing table\n" @@ -5597,7 +4820,7 @@ DEFUN (show_ipv6_route_prefix_longer, /* * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ipv6 route vrf NAME ", + * "show ipv6 route " VRF_CMD_STR " " QUAGGA_IP6_REDIST_STR_ZEBRA, * SHOW_STR * IP_STR * "IP routing table\n" @@ -5607,7 +4830,7 @@ DEFUN (show_ipv6_route_prefix_longer, */ DEFUN (show_ipv6_route_protocol, show_ipv6_route_protocol_cmd, - "show ipv6 route ", + "show ipv6 route " QUAGGA_IP6_REDIST_STR_ZEBRA, SHOW_STR IP_STR "IP routing table\n" @@ -5846,7 +5069,7 @@ DEFUN (show_ipv6_mroute, DEFUN (show_ipv6_route_vrf_all, show_ipv6_route_vrf_all_cmd, - "show ipv6 route vrf all", + "show ipv6 route " VRF_ALL_CMD_STR, SHOW_STR IP_STR "IPv6 routing table\n" @@ -5891,7 +5114,7 @@ DEFUN (show_ipv6_route_vrf_all, DEFUN (show_ipv6_route_vrf_all_tag, show_ipv6_route_vrf_all_tag_cmd, - "show ipv6 route vrf all tag (1-65535)", + "show ipv6 route " VRF_ALL_CMD_STR " tag (1-65535)", SHOW_STR IP_STR "IPv6 routing table\n" @@ -5946,7 +5169,7 @@ DEFUN (show_ipv6_route_vrf_all_tag, DEFUN (show_ipv6_route_vrf_all_prefix_longer, show_ipv6_route_vrf_all_prefix_longer_cmd, - "show ipv6 route vrf all X:X::X:X/M longer-prefixes", + "show ipv6 route " VRF_ALL_CMD_STR " X:X::X:X/M longer-prefixes", SHOW_STR IP_STR "IPv6 routing table\n" @@ -6004,7 +5227,7 @@ DEFUN (show_ipv6_route_vrf_all_prefix_longer, DEFUN (show_ipv6_route_vrf_all_protocol, show_ipv6_route_vrf_all_protocol_cmd, - "show ipv6 route vrf all ", + "show ipv6 route " VRF_ALL_CMD_STR " " QUAGGA_IP6_REDIST_STR_ZEBRA, SHOW_STR IP_STR "IP routing table\n" @@ -6059,7 +5282,7 @@ DEFUN (show_ipv6_route_vrf_all_protocol, DEFUN (show_ipv6_route_vrf_all_addr, show_ipv6_route_vrf_all_addr_cmd, - "show ipv6 route vrf all X:X::X:X", + "show ipv6 route " VRF_ALL_CMD_STR " X:X::X:X", SHOW_STR IP_STR "IPv6 routing table\n" @@ -6101,7 +5324,7 @@ DEFUN (show_ipv6_route_vrf_all_addr, DEFUN (show_ipv6_route_vrf_all_prefix, show_ipv6_route_vrf_all_prefix_cmd, - "show ipv6 route vrf all X:X::X:X/M", + "show ipv6 route " VRF_ALL_CMD_STR " X:X::X:X/M", SHOW_STR IP_STR "IPv6 routing table\n" @@ -6148,7 +5371,7 @@ DEFUN (show_ipv6_route_vrf_all_prefix, DEFUN (show_ipv6_route_vrf_all_summary, show_ipv6_route_vrf_all_summary_cmd, - "show ipv6 route vrf all summary", + "show ipv6 route " VRF_ALL_CMD_STR " summary", SHOW_STR IP_STR "IPv6 routing table\n" @@ -6167,7 +5390,7 @@ DEFUN (show_ipv6_route_vrf_all_summary, DEFUN (show_ipv6_mroute_vrf_all, show_ipv6_mroute_vrf_all_cmd, - "show ipv6 mroute vrf all", + "show ipv6 mroute " VRF_ALL_CMD_STR, SHOW_STR IP_STR "IPv6 Multicast routing table\n" @@ -6203,7 +5426,7 @@ DEFUN (show_ipv6_mroute_vrf_all, DEFUN (show_ipv6_route_vrf_all_summary_prefix, show_ipv6_route_vrf_all_summary_prefix_cmd, - "show ipv6 route vrf all summary prefix", + "show ipv6 route " VRF_ALL_CMD_STR " summary prefix", SHOW_STR IP_STR "IPv6 routing table\n" @@ -6540,17 +5763,11 @@ zebra_vty_init (void) install_element (CONFIG_NODE, &ip_multicast_mode_cmd); install_element (CONFIG_NODE, &no_ip_multicast_mode_cmd); install_element (CONFIG_NODE, &ip_route_cmd); - install_element (CONFIG_NODE, &ip_route_tag_cmd); install_element (CONFIG_NODE, &ip_route_flags_cmd); - install_element (CONFIG_NODE, &ip_route_flags_tag_cmd); install_element (CONFIG_NODE, &ip_route_flags2_cmd); - install_element (CONFIG_NODE, &ip_route_flags2_tag_cmd); install_element (CONFIG_NODE, &ip_route_mask_cmd); - install_element (CONFIG_NODE, &ip_route_mask_tag_cmd); install_element (CONFIG_NODE, &ip_route_mask_flags_cmd); - install_element (CONFIG_NODE, &ip_route_mask_flags_tag_cmd); install_element (CONFIG_NODE, &ip_route_mask_flags2_cmd); - install_element (CONFIG_NODE, &ip_route_mask_flags2_tag_cmd); install_element (CONFIG_NODE, &no_ip_route_cmd); install_element (CONFIG_NODE, &no_ip_route_tag_cmd); install_element (CONFIG_NODE, &no_ip_route_flags2_cmd); @@ -6559,18 +5776,6 @@ zebra_vty_init (void) install_element (CONFIG_NODE, &no_ip_route_mask_tag_cmd); install_element (CONFIG_NODE, &no_ip_route_mask_flags2_cmd); install_element (CONFIG_NODE, &no_ip_route_mask_flags2_tag_cmd); - install_element (CONFIG_NODE, &ip_route_distance_cmd); - install_element (CONFIG_NODE, &ip_route_tag_distance_cmd); - install_element (CONFIG_NODE, &ip_route_flags_distance_cmd); - install_element (CONFIG_NODE, &ip_route_flags_tag_distance_cmd); - install_element (CONFIG_NODE, &ip_route_flags_distance2_cmd); - install_element (CONFIG_NODE, &ip_route_flags_tag_distance2_cmd); - install_element (CONFIG_NODE, &ip_route_mask_distance_cmd); - install_element (CONFIG_NODE, &ip_route_mask_tag_distance_cmd); - install_element (CONFIG_NODE, &ip_route_mask_flags_distance_cmd); - install_element (CONFIG_NODE, &ip_route_mask_flags_tag_distance_cmd); - install_element (CONFIG_NODE, &ip_route_mask_flags_distance2_cmd); - install_element (CONFIG_NODE, &ip_route_mask_flags_tag_distance2_cmd); install_element (CONFIG_NODE, &no_ip_route_distance_cmd); install_element (CONFIG_NODE, &no_ip_route_tag_distance_cmd); install_element (CONFIG_NODE, &no_ip_route_flags_distance_cmd); @@ -6625,18 +5830,6 @@ zebra_vty_init (void) /* Commands for VRF */ - install_element (CONFIG_NODE, &ip_route_vrf_cmd); - install_element (CONFIG_NODE, &ip_route_tag_vrf_cmd); - install_element (CONFIG_NODE, &ip_route_flags_vrf_cmd); - install_element (CONFIG_NODE, &ip_route_flags_tag_vrf_cmd); - install_element (CONFIG_NODE, &ip_route_flags2_vrf_cmd); - install_element (CONFIG_NODE, &ip_route_flags2_tag_vrf_cmd); - install_element (CONFIG_NODE, &ip_route_mask_vrf_cmd); - install_element (CONFIG_NODE, &ip_route_mask_tag_vrf_cmd); - install_element (CONFIG_NODE, &ip_route_mask_flags_vrf_cmd); - install_element (CONFIG_NODE, &ip_route_mask_flags_tag_vrf_cmd); - install_element (CONFIG_NODE, &ip_route_mask_flags2_vrf_cmd); - install_element (CONFIG_NODE, &ip_route_mask_flags2_tag_vrf_cmd); install_element (CONFIG_NODE, &no_ip_route_vrf_cmd); install_element (CONFIG_NODE, &no_ip_route_tag_vrf_cmd); install_element (CONFIG_NODE, &no_ip_route_flags_vrf_cmd); @@ -6649,18 +5842,6 @@ zebra_vty_init (void) install_element (CONFIG_NODE, &no_ip_route_mask_flags_tag_vrf_cmd); install_element (CONFIG_NODE, &no_ip_route_mask_flags2_vrf_cmd); install_element (CONFIG_NODE, &no_ip_route_mask_flags2_tag_vrf_cmd); - install_element (CONFIG_NODE, &ip_route_distance_vrf_cmd); - install_element (CONFIG_NODE, &ip_route_tag_distance_vrf_cmd); - install_element (CONFIG_NODE, &ip_route_flags_distance_vrf_cmd); - install_element (CONFIG_NODE, &ip_route_flags_tag_distance_vrf_cmd); - install_element (CONFIG_NODE, &ip_route_flags_distance2_vrf_cmd); - install_element (CONFIG_NODE, &ip_route_flags_tag_distance2_vrf_cmd); - install_element (CONFIG_NODE, &ip_route_mask_distance_vrf_cmd); - install_element (CONFIG_NODE, &ip_route_mask_tag_distance_vrf_cmd); - install_element (CONFIG_NODE, &ip_route_mask_flags_distance_vrf_cmd); - install_element (CONFIG_NODE, &ip_route_mask_flags_tag_distance_vrf_cmd); - install_element (CONFIG_NODE, &ip_route_mask_flags_distance2_vrf_cmd); - install_element (CONFIG_NODE, &ip_route_mask_flags_tag_distance2_vrf_cmd); install_element (CONFIG_NODE, &no_ip_route_distance_vrf_cmd); install_element (CONFIG_NODE, &no_ip_route_tag_distance_vrf_cmd); install_element (CONFIG_NODE, &no_ip_route_flags_distance_vrf_cmd); -- cgit v1.2.3 From fb5b479d9d6bae7d80923f81fa214fe244a0a943 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 26 Sep 2016 08:10:57 -0400 Subject: zebra: Fixup 'no ip route....' Rework the 'no ip route XXXX' commands to use the new cli and collapse all DEFUN's that we could into a much smaller set of commands. Signed-off-by: Donald Sharp --- zebra/zebra_vty.c | 1038 +++++------------------------------------------------ 1 file changed, 95 insertions(+), 943 deletions(-) (limited to 'zebra') diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 97fc6d2ab..abdab53e4 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -556,750 +556,9 @@ DEFUN (ip_route_mask_flags2, tag, distance, vrf); } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole)", - * NO_STR - * IP_STR - * "Establish static routes\n" - * "IP destination prefix (e.g. 10.0.0.0/8)\n" - * "IP gateway address\n" - * "IP gateway interface name\n" - * "Emit an ICMP unreachable when matched\n" - * "Silently discard pkts when matched\n" - * - */ -DEFUN (no_ip_route, - no_ip_route_cmd, - "no ip route A.B.C.D/M ", - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Null interface\n") -{ - int idx_ipv4_prefixlen = 3; - int idx_ipv4_ifname_null = 4; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, - NULL, NULL); -} - -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535>", - * NO_STR - * IP_STR - * "Establish static routes\n" - * "IP destination prefix (e.g. 10.0.0.0/8)\n" - * "IP gateway address\n" - * "IP gateway interface name\n" - * "Emit an ICMP unreachable when matched\n" - * "Silently discard pkts when matched\n" - * "Tag of this route\n" - * "Tag value\n" - * - */ -DEFUN (no_ip_route_tag, - no_ip_route_tag_cmd, - "no ip route A.B.C.D/M tag (1-65535)", - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Null interface\n" - "Tag of this route\n" - "Tag value\n") -{ - int idx_ipv4_prefixlen = 3; - int idx_ipv4_ifname_null = 4; - int idx_number = 6; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, - NULL, NULL); -} - -DEFUN (no_ip_route_flags2, - no_ip_route_flags2_cmd, - "no ip route A.B.C.D/M ", - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n") -{ - int idx_ipv4_prefixlen = 3; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, NULL, NULL, - NULL, NULL); -} - -DEFUN (no_ip_route_flags2_tag, - no_ip_route_flags2_tag_cmd, - "no ip route A.B.C.D/M tag (1-65535)", - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Tag of this route\n" - "Tag value\n") -{ - int idx_ipv4_prefixlen = 3; - int idx_reject_blackhole = 4; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, NULL, argv[idx_reject_blackhole]->arg, - NULL, NULL); -} - -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole)", - * NO_STR - * IP_STR - * "Establish static routes\n" - * "IP destination prefix\n" - * "IP destination prefix mask\n" - * "IP gateway address\n" - * "IP gateway interface name\n" - * "Emit an ICMP unreachable when matched\n" - * "Silently discard pkts when matched\n" - * - */ -DEFUN (no_ip_route_mask, - no_ip_route_mask_cmd, - "no ip route A.B.C.D A.B.C.D ", - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Null interface\n") -{ - int idx_ipv4 = 3; - int idx_ipv4_2 = 4; - int idx_ipv4_ifname_null = 5; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, - NULL, NULL); -} - -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535>", - * NO_STR - * IP_STR - * "Establish static routes\n" - * "IP destination prefix\n" - * "IP destination prefix mask\n" - * "IP gateway address\n" - * "IP gateway interface name\n" - * "Emit an ICMP unreachable when matched\n" - * "Silently discard pkts when matched\n" - * "Tag of this route\n" - * "Tag value\n" - * - */ -DEFUN (no_ip_route_mask_tag, - no_ip_route_mask_tag_cmd, - "no ip route A.B.C.D A.B.C.D tag (1-65535)", - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Null interface\n" - "Tag of this route\n" - "Tag value\n") -{ - int idx_ipv4 = 3; - int idx_ipv4_2 = 4; - int idx_ipv4_ifname_null = 5; - int idx_number = 7; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, - NULL, NULL); -} - - - -DEFUN (no_ip_route_mask_flags2, - no_ip_route_mask_flags2_cmd, - "no ip route A.B.C.D A.B.C.D ", - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n") -{ - int idx_ipv4 = 3; - int idx_ipv4_2 = 4; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, NULL, NULL, - NULL, NULL); -} - -DEFUN (no_ip_route_mask_flags2_tag, - no_ip_route_mask_flags2_tag_cmd, - "no ip route A.B.C.D A.B.C.D tag (1-65535)", - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Tag of this route\n" - "Tag value\n") -{ - int idx_ipv4 = 3; - int idx_ipv4_2 = 4; - int idx_reject_blackhole = 5; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, - NULL, NULL); -} - -DEFUN (no_ip_route_distance, - no_ip_route_distance_cmd, - "no ip route A.B.C.D/M (1-255)", - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Null interface\n" - "Distance value for this route\n") -{ - int idx_ipv4_prefixlen = 3; - int idx_ipv4_ifname_null = 4; - int idx_number = 5; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, - argv[idx_number]->arg, NULL); -} - -DEFUN (no_ip_route_tag_distance, - no_ip_route_tag_distance_cmd, - "no ip route A.B.C.D/M tag (1-65535) (1-255)", - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Null interface\n" - "Tag of this route\n" - "Tag value\n" - "Distance value for this route\n") -{ - int idx_ipv4_prefixlen = 3; - int idx_ipv4_ifname_null = 4; - int idx_number = 6; - int idx_number_2 = 7; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, - argv[idx_number_2]->arg, NULL); -} - -DEFUN (no_ip_route_flags_distance, - no_ip_route_flags_distance_cmd, - "no ip route A.B.C.D/M (1-255)", - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Distance value for this route\n") -{ - int idx_ipv4_prefixlen = 3; - int idx_ipv4_ifname = 4; - int idx_reject_blackhole = 5; - int idx_number = 6; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, - argv[idx_number]->arg, NULL); -} - -DEFUN (no_ip_route_flags_tag_distance, - no_ip_route_flags_tag_distance_cmd, - "no ip route A.B.C.D/M tag (1-65535) (1-255)", - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Tag of this route\n" - "Tag value\n" - "Distance value for this route\n") -{ - int idx_ipv4_prefixlen = 3; - int idx_ipv4_ifname = 4; - int idx_reject_blackhole = 5; - int idx_number = 7; - int idx_number_2 = 8; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, - argv[idx_number_2]->arg, NULL); -} - -DEFUN (no_ip_route_flags_distance2, - no_ip_route_flags_distance2_cmd, - "no ip route A.B.C.D/M (1-255)", - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Distance value for this route\n") -{ - int idx_ipv4_prefixlen = 3; - int idx_reject_blackhole = 4; - int idx_number = 5; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, NULL, - argv[idx_number]->arg, NULL); -} - -DEFUN (no_ip_route_flags_tag_distance2, - no_ip_route_flags_tag_distance2_cmd, - "no ip route A.B.C.D/M tag (1-65535) (1-255)", - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Tag of this route\n" - "Tag value\n" - "Distance value for this route\n") -{ - int idx_ipv4_prefixlen = 3; - int idx_reject_blackhole = 4; - int idx_number = 6; - int idx_number_2 = 7; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, - argv[idx_number_2]->arg, NULL); -} - -DEFUN (no_ip_route_mask_distance, - no_ip_route_mask_distance_cmd, - "no ip route A.B.C.D A.B.C.D (1-255)", - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Null interface\n" - "Distance value for this route\n") -{ - int idx_ipv4 = 3; - int idx_ipv4_2 = 4; - int idx_ipv4_ifname_null = 5; - int idx_number = 6; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, - argv[idx_number]->arg, NULL); -} - -DEFUN (no_ip_route_mask_tag_distance, - no_ip_route_mask_tag_distance_cmd, - "no ip route A.B.C.D A.B.C.D tag (1-65535) (1-255)", - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Null interface\n" - "Tag of this route\n" - "Tag value\n" - "Distance value for this route\n") -{ - int idx_ipv4 = 3; - int idx_ipv4_2 = 4; - int idx_ipv4_ifname_null = 5; - int idx_number = 7; - int idx_number_2 = 8; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, - argv[idx_number_2]->arg, NULL); -} - -DEFUN (no_ip_route_mask_flags_distance, - no_ip_route_mask_flags_distance_cmd, - "no ip route A.B.C.D A.B.C.D (1-255)", - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Distance value for this route\n") -{ - int idx_ipv4 = 3; - int idx_ipv4_2 = 4; - int idx_ipv4_ifname = 5; - int idx_reject_blackhole = 6; - int idx_number = 7; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, - argv[idx_number]->arg, NULL); -} - -DEFUN (no_ip_route_mask_flags_tag_distance, - no_ip_route_mask_flags_tag_distance_cmd, - "no ip route A.B.C.D A.B.C.D tag (1-65535) (1-255)", - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Tag of this route\n" - "Tag value\n" - "Distance value for this route\n") -{ - int idx_ipv4 = 3; - int idx_ipv4_2 = 4; - int idx_ipv4_ifname = 5; - int idx_reject_blackhole = 6; - int idx_number = 8; - int idx_number_2 = 9; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, - argv[idx_number_2]->arg, NULL); -} - -DEFUN (no_ip_route_mask_flags_distance2, - no_ip_route_mask_flags_distance2_cmd, - "no ip route A.B.C.D A.B.C.D (1-255)", - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Distance value for this route\n") -{ - int idx_ipv4 = 3; - int idx_ipv4_2 = 4; - int idx_reject_blackhole = 5; - int idx_number = 6; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, - argv[idx_number]->arg, NULL); -} - -DEFUN (no_ip_route_mask_flags_tag_distance2, - no_ip_route_mask_flags_tag_distance2_cmd, - "no ip route A.B.C.D A.B.C.D tag (1-65535) (1-255)", - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Tag of this route\n" - "Tag value\n" - "Distance value for this route\n") -{ - int idx_ipv4 = 3; - int idx_ipv4_2 = 4; - int idx_reject_blackhole = 5; - int idx_number = 7; - int idx_number_2 = 8; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, - argv[idx_number_2]->arg, NULL); -} - -DEFUN (no_ip_route_vrf, - no_ip_route_vrf_cmd, - "no ip route A.B.C.D/M " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Null interface\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4_prefixlen = 3; - int idx_ipv4_ifname_null = 4; - int idx_name = 6; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, NULL, argv[idx_name]->arg); -} - -DEFUN (no_ip_route_flags_vrf, - no_ip_route_flags_vrf_cmd, - "no ip route A.B.C.D/M " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4_prefixlen = 3; - int idx_ipv4_ifname = 4; - int idx_reject_blackhole = 5; - int idx_name = 7; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg); -} - -DEFUN (no_ip_route_tag_vrf, - no_ip_route_tag_vrf_cmd, - "no ip route A.B.C.D/M tag (1-65535) " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Null interface\n" - "Tag of this route\n" - "Tag value\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4_prefixlen = 3; - int idx_ipv4_ifname_null = 4; - int idx_number = 6; - int idx_name = 8; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, NULL, argv[idx_name]->arg); -} - -DEFUN (no_ip_route_flags_tag_vrf, - no_ip_route_flags_tag_vrf_cmd, - "no ip route A.B.C.D/M tag (1-65535) " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Tag of this route\n" - "Tag value\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4_prefixlen = 3; - int idx_ipv4_ifname = 4; - int idx_reject_blackhole = 5; - int idx_number = 7; - int idx_name = 9; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg); -} - -DEFUN (no_ip_route_flags2_vrf, - no_ip_route_flags2_vrf_cmd, - "no ip route A.B.C.D/M " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4_prefixlen = 3; - int idx_reject_blackhole = 4; - int idx_name = 6; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg); -} - -DEFUN (no_ip_route_flags2_tag_vrf, - no_ip_route_flags2_tag_vrf_cmd, - "no ip route A.B.C.D/M tag (1-65535) " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Tag of this route\n" - "Tag value\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4_prefixlen = 3; - int idx_reject_blackhole = 4; - int idx_number = 6; - int idx_name = 8; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg); -} - -DEFUN (no_ip_route_mask_vrf, - no_ip_route_mask_vrf_cmd, - "no ip route A.B.C.D A.B.C.D " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Null interface\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4 = 3; - int idx_ipv4_2 = 4; - int idx_ipv4_ifname_null = 5; - int idx_name = 7; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, NULL, argv[idx_name]->arg); -} - -DEFUN (no_ip_route_mask_flags_vrf, - no_ip_route_mask_flags_vrf_cmd, - "no ip route A.B.C.D A.B.C.D " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4 = 3; - int idx_ipv4_2 = 4; - int idx_ipv4_ifname = 5; - int idx_reject_blackhole = 6; - int idx_name = 8; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg); -} - -DEFUN (no_ip_route_mask_tag_vrf, - no_ip_route_mask_tag_vrf_cmd, - "no ip route A.B.C.D A.B.C.D tag (1-65535) " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Null interface\n" - "Tag of this route\n" - "Tag value\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4 = 3; - int idx_ipv4_2 = 4; - int idx_ipv4_ifname_null = 5; - int idx_number = 7; - int idx_name = 9; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, NULL, argv[idx_name]->arg); -} - -DEFUN (no_ip_route_mask_flags_tag_vrf, - no_ip_route_mask_flags_tag_vrf_cmd, - "no ip route A.B.C.D A.B.C.D tag (1-65535) " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Tag of this route\n" - "Tag value\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4 = 3; - int idx_ipv4_2 = 4; - int idx_ipv4_ifname = 5; - int idx_reject_blackhole = 6; - int idx_number = 8; - int idx_name = 10; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg); -} - -DEFUN (no_ip_route_mask_flags2_vrf, - no_ip_route_mask_flags2_vrf_cmd, - "no ip route A.B.C.D A.B.C.D " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4 = 3; - int idx_ipv4_2 = 4; - int idx_reject_blackhole = 5; - int idx_name = 7; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg); -} - -DEFUN (no_ip_route_mask_flags2_tag_vrf, - no_ip_route_mask_flags2_tag_vrf_cmd, - "no ip route A.B.C.D A.B.C.D tag (1-65535) " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Tag of this route\n" - "Tag value\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4 = 3; - int idx_ipv4_2 = 4; - int idx_reject_blackhole = 5; - int idx_number = 7; - int idx_name = 9; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg); -} - - -DEFUN (no_ip_route_distance_vrf, - no_ip_route_distance_vrf_cmd, - "no ip route A.B.C.D/M (1-255) " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Null interface\n" - "Distance value for this route\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4_prefixlen = 3; - int idx_ipv4_ifname_null = 4; - int idx_number = 5; - int idx_name = 7; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_name]->arg); -} - -DEFUN (no_ip_route_tag_distance_vrf, - no_ip_route_tag_distance_vrf_cmd, - "no ip route A.B.C.D/M tag (1-65535) (1-255) " VRF_CMD_STR, +DEFUN (no_ip_route, + no_ip_route_cmd, + "no ip route A.B.C.D/M [tag (1-65535)] [(1-255)] [vrf NAME]", NO_STR IP_STR "Establish static routes\n" @@ -1314,43 +573,27 @@ DEFUN (no_ip_route_tag_distance_vrf, { int idx_ipv4_prefixlen = 3; int idx_ipv4_ifname_null = 4; - int idx_number = 6; - int idx_number_2 = 7; - int idx_name = 9; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); -} + int idx_curr = 5; + char *tag, *distance, *vrf; -DEFUN (no_ip_route_flags_distance_vrf, - no_ip_route_flags_distance_vrf_cmd, - "no ip route A.B.C.D/M (1-255) " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Distance value for this route\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4_prefixlen = 3; - int idx_ipv4_ifname = 4; - int idx_reject_blackhole = 5; - int idx_number = 6; - int idx_name = 8; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg); + tag = distance = vrf = NULL; + zebra_vty_ip_route_tdv_helper (argc, argv, idx_curr, &tag, &distance, &vrf); + + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, + argv[idx_ipv4_prefixlen]->arg, + NULL, + argv[idx_ipv4_ifname_null]->arg, + NULL, + tag, distance, vrf); } -DEFUN (no_ip_route_flags_tag_distance_vrf, - no_ip_route_flags_tag_distance_vrf_cmd, - "no ip route A.B.C.D/M tag (1-65535) (1-255) " VRF_CMD_STR, +DEFUN (no_ip_route_flags2, + no_ip_route_flags2_cmd, + "no ip route A.B.C.D/M [tag (1-65535)] [(1-255)] [vrf NAME]", NO_STR IP_STR "Establish static routes\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" - "IP gateway address\n" - "IP gateway interface name\n" "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n" "Tag of this route\n" @@ -1359,58 +602,21 @@ DEFUN (no_ip_route_flags_tag_distance_vrf, VRF_CMD_HELP_STR) { int idx_ipv4_prefixlen = 3; - int idx_ipv4_ifname = 4; - int idx_reject_blackhole = 5; - int idx_number = 7; - int idx_number_2 = 8; - int idx_name = 10; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg,argv[idx_name]->arg); -} + int idx_curr = 5; + char *tag, *distance, *vrf; -DEFUN (no_ip_route_flags_distance2_vrf, - no_ip_route_flags_distance2_vrf_cmd, - "no ip route A.B.C.D/M (1-255) " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Distance value for this route\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4_prefixlen = 3; - int idx_reject_blackhole = 4; - int idx_number = 5; - int idx_name = 7; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg); -} + tag = distance = vrf = NULL; + zebra_vty_ip_route_tdv_helper (argc, argv, idx_curr, &tag, &distance, &vrf); -DEFUN (no_ip_route_flags_tag_distance2_vrf, - no_ip_route_flags_tag_distance2_vrf_cmd, - "no ip route A.B.C.D/M tag (1-65535) (1-255) " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix (e.g. 10.0.0.0/8)\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Tag of this route\n" - "Tag value\n" - "Distance value for this route\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4_prefixlen = 3; - int idx_reject_blackhole = 4; - int idx_number = 6; - int idx_number_2 = 7; - int idx_name = 9; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg , argv[idx_number_2]->arg, argv[idx_name]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, + argv[idx_ipv4_prefixlen]->arg, + NULL, NULL, NULL, + tag, distance, vrf); } -DEFUN (no_ip_route_mask_distance_vrf, - no_ip_route_mask_distance_vrf_cmd, - "no ip route A.B.C.D A.B.C.D (1-255) " VRF_CMD_STR, +DEFUN (no_ip_route_mask, + no_ip_route_mask_cmd, + "no ip route A.B.C.D A.B.C.D [tag (1-65535)] [(1-255)] [vrf NAME]", NO_STR IP_STR "Establish static routes\n" @@ -1419,28 +625,38 @@ DEFUN (no_ip_route_mask_distance_vrf, "IP gateway address\n" "IP gateway interface name\n" "Null interface\n" + "Tag of this route\n" + "Tag value\n" "Distance value for this route\n" VRF_CMD_HELP_STR) { int idx_ipv4 = 3; int idx_ipv4_2 = 4; int idx_ipv4_ifname_null = 5; - int idx_number = 6; - int idx_name = 8; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_name]->arg); + int idx_curr = 6; + char *tag, *distance, *vrf; + + tag = distance = vrf = NULL; + zebra_vty_ip_route_tdv_helper (argc, argv, idx_curr, &tag, &distance, &vrf); + + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, + argv[idx_ipv4]->arg, + argv[idx_ipv4_2]->arg, + argv[idx_ipv4_ifname_null]->arg, + NULL, + tag, distance, vrf); } -DEFUN (no_ip_route_mask_tag_distance_vrf, - no_ip_route_mask_tag_distance_vrf_cmd, - "no ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) " VRF_CMD_STR, +DEFUN (no_ip_route_mask_flags2, + no_ip_route_mask_flags2_cmd, + "no ip route A.B.C.D A.B.C.D [tag (1-65535)] [(1-255)] [vrf NAME]", NO_STR IP_STR "Establish static routes\n" "IP destination prefix\n" "IP destination prefix mask\n" - "IP gateway address\n" - "IP gateway interface name\n" - "Null interface\n" + "Emit an ICMP unreachable when matched\n" + "Silently discard pkts when matched\n" "Tag of this route\n" "Tag value\n" "Distance value for this route\n" @@ -1448,40 +664,55 @@ DEFUN (no_ip_route_mask_tag_distance_vrf, { int idx_ipv4 = 3; int idx_ipv4_2 = 4; - int idx_ipv4_ifname_null = 5; - int idx_number = 7; - int idx_number_2 = 8; - int idx_name = 10; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname_null]->arg, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); + int idx_curr = 6; + char *tag, *distance, *vrf; + + tag = distance = vrf = NULL; + zebra_vty_ip_route_tdv_helper (argc, argv, idx_curr, &tag, &distance, &vrf); + + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, + argv[idx_ipv4]->arg, + argv[idx_ipv4_2]->arg, + NULL, NULL, + tag, distance, vrf); } -DEFUN (no_ip_route_mask_flags_distance_vrf, - no_ip_route_mask_flags_distance_vrf_cmd, - "no ip route A.B.C.D A.B.C.D (1-255) " VRF_CMD_STR, +DEFUN (no_ip_route_flags, + no_ip_route_flags_cmd, + "no ip route A.B.C.D/M [tag (1-65535)] [(1-255)] [vrf NAME]", NO_STR IP_STR "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" + "IP destination prefix (e.g. 10.0.0.0/8)\n" "IP gateway address\n" "IP gateway interface name\n" "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n" + "Tag of this route\n" + "Tag value\n" "Distance value for this route\n" VRF_CMD_HELP_STR) { - int idx_ipv4 = 3; - int idx_ipv4_2 = 4; - int idx_ipv4_ifname = 5; - int idx_reject_blackhole = 6; - int idx_number = 7; - int idx_name = 9; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg); + int idx_ipv4_prefixlen = 3; + int idx_ipv4_ifname = 4; + int idx_reject_blackhole = 5; + int idx_curr = 6; + char *tag, *distance, *vrf; + + tag = distance = vrf = NULL; + zebra_vty_ip_route_tdv_helper (argc, argv, idx_curr, &tag, &distance, &vrf); + + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, + argv[idx_ipv4_prefixlen]->arg, + NULL, + argv[idx_ipv4_ifname]->arg, + argv[idx_reject_blackhole]->arg, + tag, distance, vrf); } -DEFUN (no_ip_route_mask_flags_tag_distance_vrf, - no_ip_route_mask_flags_tag_distance_vrf_cmd, - "no ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) " VRF_CMD_STR, +DEFUN (no_ip_route_mask_flags, + no_ip_route_mask_flags_cmd, + "no ip route A.B.C.D A.B.C.D [tag (1-65535)] [(1-255)] [vrf NAME]", NO_STR IP_STR "Establish static routes\n" @@ -1500,57 +731,21 @@ DEFUN (no_ip_route_mask_flags_tag_distance_vrf, int idx_ipv4_2 = 4; int idx_ipv4_ifname = 5; int idx_reject_blackhole = 6; - int idx_number = 8; - int idx_number_2 = 9; - int idx_name = 11; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, argv[idx_ipv4_ifname]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); -} + int idx_curr = 7; + char *tag, *distance, *vrf; -DEFUN (no_ip_route_mask_flags_distance2_vrf, - no_ip_route_mask_flags_distance2_vrf_cmd, - "no ip route A.B.C.D A.B.C.D (1-255) " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Distance value for this route\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4 = 3; - int idx_ipv4_2 = 4; - int idx_reject_blackhole = 5; - int idx_number = 6; - int idx_name = 8; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg); -} + tag = distance = vrf = NULL; + zebra_vty_ip_route_tdv_helper (argc, argv, idx_curr, &tag, &distance, &vrf); -DEFUN (no_ip_route_mask_flags_tag_distance2_vrf, - no_ip_route_mask_flags_tag_distance2_vrf_cmd, - "no ip route A.B.C.D A.B.C.D tag (1-65535) (1-255) " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IP destination prefix\n" - "IP destination prefix mask\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Tag of this route\n" - "Tag value\n" - "Distance value for this route\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv4 = 3; - int idx_ipv4_2 = 4; - int idx_reject_blackhole = 5; - int idx_number = 7; - int idx_number_2 = 8; - int idx_name = 10; - return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[idx_ipv4]->arg, argv[idx_ipv4_2]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); + return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, + argv[idx_ipv4]->arg, + argv[idx_ipv4_2]->arg, + argv[idx_ipv4_ifname]->arg, + argv[idx_reject_blackhole]->arg, + tag, distance, vrf); } + /* New RIB. Detailed information for IPv4 route. */ static void vty_show_ip_route_detail (struct vty *vty, struct route_node *rn, int mcast) @@ -5769,25 +4964,9 @@ zebra_vty_init (void) install_element (CONFIG_NODE, &ip_route_mask_flags_cmd); install_element (CONFIG_NODE, &ip_route_mask_flags2_cmd); install_element (CONFIG_NODE, &no_ip_route_cmd); - install_element (CONFIG_NODE, &no_ip_route_tag_cmd); install_element (CONFIG_NODE, &no_ip_route_flags2_cmd); - install_element (CONFIG_NODE, &no_ip_route_flags2_tag_cmd); install_element (CONFIG_NODE, &no_ip_route_mask_cmd); - install_element (CONFIG_NODE, &no_ip_route_mask_tag_cmd); install_element (CONFIG_NODE, &no_ip_route_mask_flags2_cmd); - install_element (CONFIG_NODE, &no_ip_route_mask_flags2_tag_cmd); - install_element (CONFIG_NODE, &no_ip_route_distance_cmd); - install_element (CONFIG_NODE, &no_ip_route_tag_distance_cmd); - install_element (CONFIG_NODE, &no_ip_route_flags_distance_cmd); - install_element (CONFIG_NODE, &no_ip_route_flags_tag_distance_cmd); - install_element (CONFIG_NODE, &no_ip_route_flags_distance2_cmd); - install_element (CONFIG_NODE, &no_ip_route_flags_tag_distance2_cmd); - install_element (CONFIG_NODE, &no_ip_route_mask_distance_cmd); - install_element (CONFIG_NODE, &no_ip_route_mask_tag_distance_cmd); - install_element (CONFIG_NODE, &no_ip_route_mask_flags_distance_cmd); - install_element (CONFIG_NODE, &no_ip_route_mask_flags_tag_distance_cmd); - install_element (CONFIG_NODE, &no_ip_route_mask_flags_distance2_cmd); - install_element (CONFIG_NODE, &no_ip_route_mask_flags_tag_distance2_cmd); install_element (CONFIG_NODE, &ip_zebra_import_table_distance_cmd); install_element (CONFIG_NODE, &ip_zebra_import_table_distance_routemap_cmd); install_element (CONFIG_NODE, &no_ip_zebra_import_table_cmd); @@ -5830,30 +5009,8 @@ zebra_vty_init (void) /* Commands for VRF */ - install_element (CONFIG_NODE, &no_ip_route_vrf_cmd); - install_element (CONFIG_NODE, &no_ip_route_tag_vrf_cmd); - install_element (CONFIG_NODE, &no_ip_route_flags_vrf_cmd); - install_element (CONFIG_NODE, &no_ip_route_flags_tag_vrf_cmd); - install_element (CONFIG_NODE, &no_ip_route_flags2_vrf_cmd); - install_element (CONFIG_NODE, &no_ip_route_flags2_tag_vrf_cmd); - install_element (CONFIG_NODE, &no_ip_route_mask_vrf_cmd); - install_element (CONFIG_NODE, &no_ip_route_mask_tag_vrf_cmd); - install_element (CONFIG_NODE, &no_ip_route_mask_flags_vrf_cmd); - install_element (CONFIG_NODE, &no_ip_route_mask_flags_tag_vrf_cmd); - install_element (CONFIG_NODE, &no_ip_route_mask_flags2_vrf_cmd); - install_element (CONFIG_NODE, &no_ip_route_mask_flags2_tag_vrf_cmd); - install_element (CONFIG_NODE, &no_ip_route_distance_vrf_cmd); - install_element (CONFIG_NODE, &no_ip_route_tag_distance_vrf_cmd); - install_element (CONFIG_NODE, &no_ip_route_flags_distance_vrf_cmd); - install_element (CONFIG_NODE, &no_ip_route_flags_tag_distance_vrf_cmd); - install_element (CONFIG_NODE, &no_ip_route_flags_distance2_vrf_cmd); - install_element (CONFIG_NODE, &no_ip_route_flags_tag_distance2_vrf_cmd); - install_element (CONFIG_NODE, &no_ip_route_mask_distance_vrf_cmd); - install_element (CONFIG_NODE, &no_ip_route_mask_tag_distance_vrf_cmd); - install_element (CONFIG_NODE, &no_ip_route_mask_flags_distance_vrf_cmd); - install_element (CONFIG_NODE, &no_ip_route_mask_flags_tag_distance_vrf_cmd); - install_element (CONFIG_NODE, &no_ip_route_mask_flags_distance2_vrf_cmd); - install_element (CONFIG_NODE, &no_ip_route_mask_flags_tag_distance2_vrf_cmd); + install_element (CONFIG_NODE, &no_ip_route_flags_cmd); + install_element (CONFIG_NODE, &no_ip_route_mask_flags_cmd); install_element (VIEW_NODE, &show_ip_route_vrf_cmd); install_element (ENABLE_NODE, &show_ip_route_vrf_cmd); @@ -5877,7 +5034,6 @@ zebra_vty_init (void) install_element (ENABLE_NODE, &show_ip_route_vrf_all_summary_cmd); install_element (ENABLE_NODE, &show_ip_route_vrf_all_summary_prefix_cmd); -#ifdef HAVE_IPV6 install_element (CONFIG_NODE, &ipv6_route_cmd); install_element (CONFIG_NODE, &ipv6_route_flags_cmd); install_element (CONFIG_NODE, &ipv6_route_ifname_cmd); @@ -5969,8 +5125,6 @@ zebra_vty_init (void) install_element (CONFIG_NODE, &no_ipv6_route_ifname_pref_tag_vrf_cmd); install_element (CONFIG_NODE, &no_ipv6_route_ifname_flags_pref_tag_vrf_cmd); - - install_element (VIEW_NODE, &show_ipv6_route_vrf_all_cmd); install_element (VIEW_NODE, &show_ipv6_route_vrf_all_tag_cmd); install_element (VIEW_NODE, &show_ipv6_route_vrf_all_summary_cmd); @@ -5988,8 +5142,6 @@ zebra_vty_init (void) install_element (ENABLE_NODE, &show_ipv6_route_vrf_all_summary_cmd); install_element (ENABLE_NODE, &show_ipv6_route_vrf_all_summary_prefix_cmd); - install_element (VIEW_NODE, &show_ipv6_mroute_vrf_all_cmd); install_element (ENABLE_NODE, &show_ipv6_mroute_vrf_all_cmd); -#endif /* HAVE_IPV6 */ } -- cgit v1.2.3 From 96121d19fa270325a4d3860e130c3a5d0d057639 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 26 Sep 2016 09:23:26 -0400 Subject: zebra: Refactor 'ipv6 route XXXX' for new cli Take existing code for 'ipv6 route XXX' and refactor to use the new cli. Signed-off-by: Donald Sharp --- zebra/zebra_vty.c | 648 ++++++------------------------------------------------ 1 file changed, 62 insertions(+), 586 deletions(-) (limited to 'zebra') diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index abdab53e4..ea911653f 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -2527,181 +2527,36 @@ static_ipv6_func (struct vty *vty, int add_cmd, const char *dest_str, DEFUN (ipv6_route, ipv6_route_cmd, - "ipv6 route X:X::X:X/M ", - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n") -{ - int idx_ipv6_prefixlen = 2; - int idx_ipv6_ifname = 3; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, NULL, NULL, NULL); -} - -DEFUN (ipv6_route_tag, - ipv6_route_tag_cmd, - "ipv6 route X:X::X:X/M tag (1-65535)", + "ipv6 route X:X::X:X/M [tag (1-65535)] [(1-255)] [vrf NAME]", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" "IPv6 gateway address\n" "IPv6 gateway interface name\n" "Set tag for this route\n" - "Tag value\n") -{ - int idx_ipv6_prefixlen = 2; - int idx_ipv6_ifname = 3; - int idx_number = 5; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, argv[idx_number]->arg, NULL, NULL); -} - -DEFUN (ipv6_route_flags, - ipv6_route_flags_cmd, - "ipv6 route X:X::X:X/M ", - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n") -{ - int idx_ipv6_prefixlen = 2; - int idx_ipv6_ifname = 3; - int idx_reject_blackhole = 4; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, NULL, NULL); -} - -DEFUN (ipv6_route_flags_tag, - ipv6_route_flags_tag_cmd, - "ipv6 route X:X::X:X/M tag (1-65535)", - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Set tag for this route\n" - "Tag value\n") + "Tag value\n" + "Distance value for this prefix\n" + VRF_CMD_HELP_STR) { int idx_ipv6_prefixlen = 2; int idx_ipv6_ifname = 3; - int idx_reject_blackhole = 4; - int idx_number = 6; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, NULL); -} - -DEFUN (ipv6_route_ifname, - ipv6_route_ifname_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE", - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n") -{ - int idx_ipv6_prefixlen = 2; - int idx_ipv6 = 3; - int idx_interface = 4; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, NULL, NULL, NULL); -} -DEFUN (ipv6_route_ifname_tag, - ipv6_route_ifname_tag_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535)", - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Set tag for this route\n" - "Tag value\n") -{ - int idx_ipv6_prefixlen = 2; - int idx_ipv6 = 3; - int idx_interface = 4; - int idx_number = 6; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, argv[idx_number]->arg, NULL, NULL); -} + int idx_curr = 4; + char *tag, *distance, *vrf; -DEFUN (ipv6_route_ifname_flags, - ipv6_route_ifname_flags_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE ", - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n") -{ - int idx_ipv6_prefixlen = 2; - int idx_ipv6 = 3; - int idx_interface = 4; - int idx_reject_blackhole = 5; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, NULL, NULL, NULL); -} + tag = distance = vrf = NULL; + zebra_vty_ip_route_tdv_helper (argc, argv, idx_curr, &tag, &distance, &vrf); -DEFUN (ipv6_route_ifname_flags_tag, - ipv6_route_ifname_flags_tag_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535)", - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Set tag for this route\n" - "Tag value\n") -{ - int idx_ipv6_prefixlen = 2; - int idx_ipv6 = 3; - int idx_interface = 4; - int idx_reject_blackhole = 5; - int idx_number = 7; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, NULL); + return static_ipv6_func (vty, 1, + argv[idx_ipv6_prefixlen]->arg, + argv[idx_ipv6_ifname]->arg, + NULL, NULL, + tag, distance, vrf); } -DEFUN (ipv6_route_pref, - ipv6_route_pref_cmd, - "ipv6 route X:X::X:X/M (1-255)", - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Distance value for this prefix\n") -{ - int idx_ipv6_prefixlen = 2; - int idx_ipv6_ifname = 3; - int idx_number = 4; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, NULL, argv[idx_number]->arg, NULL); -} -DEFUN (ipv6_route_pref_tag, - ipv6_route_pref_tag_cmd, - "ipv6 route X:X::X:X/M tag (1-65535) (1-255)", - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Set tag for this route\n" - "Tag value\n" - "Distance value for this prefix\n") -{ - int idx_ipv6_prefixlen = 2; - int idx_ipv6_ifname = 3; - int idx_number = 5; - int idx_number_2 = 6; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, NULL); -} - -DEFUN (ipv6_route_flags_pref, - ipv6_route_flags_pref_cmd, - "ipv6 route X:X::X:X/M (1-255)", +DEFUN (ipv6_route_flags, + ipv6_route_flags_cmd, + "ipv6 route X:X::X:X/M [tag (1-65535)] [(1-255)] [vrf NAME]", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -2709,57 +2564,32 @@ DEFUN (ipv6_route_flags_pref, "IPv6 gateway interface name\n" "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n" - "Distance value for this prefix\n") -{ - int idx_ipv6_prefixlen = 2; - int idx_ipv6_ifname = 3; - int idx_reject_blackhole = 4; - int idx_number = 5; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, NULL); -} - -DEFUN (ipv6_route_flags_pref_tag, - ipv6_route_flags_pref_tag_cmd, - "ipv6 route X:X::X:X/M tag (1-65535) (1-255)", - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Emit an ICMP unreachable when matched\n" "Silently discard pkts when matched\n" "Set tag for this route\n" "Tag value\n" - "Distance value for this prefix\n") + "Distance value for this prefix\n" + VRF_CMD_HELP_STR) { int idx_ipv6_prefixlen = 2; int idx_ipv6_ifname = 3; int idx_reject_blackhole = 4; - int idx_number = 6; - int idx_number_2 = 7; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, NULL); -} + int idx_curr = 5; + char *tag, *distance, *vrf; -DEFUN (ipv6_route_ifname_pref, - ipv6_route_ifname_pref_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255)", - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Distance value for this prefix\n") -{ - int idx_ipv6_prefixlen = 2; - int idx_ipv6 = 3; - int idx_interface = 4; - int idx_number = 5; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, NULL, argv[idx_number]->arg, NULL); + tag = distance = vrf = NULL; + zebra_vty_ip_route_tdv_helper (argc, argv, idx_curr, &tag, &distance, &vrf); + + return static_ipv6_func (vty, 1, + argv[idx_ipv6_prefixlen]->arg, + argv[idx_ipv6_ifname]->arg, + NULL, + argv[idx_reject_blackhole]->arg, + tag, distance, vrf); } -DEFUN (ipv6_route_ifname_pref_tag, - ipv6_route_ifname_pref_tag_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255)", +DEFUN (ipv6_route_ifname, + ipv6_route_ifname_cmd, + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE [tag (1-65535)] [(1-255)] [vrf NAME]", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -2767,39 +2597,29 @@ DEFUN (ipv6_route_ifname_pref_tag, "IPv6 gateway interface name\n" "Set tag for this route\n" "Tag value\n" - "Distance value for this prefix\n") + "Distance value for this prefix\n" + VRF_CMD_HELP_STR) { int idx_ipv6_prefixlen = 2; int idx_ipv6 = 3; int idx_interface = 4; - int idx_number = 6; - int idx_number_2 = 7; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, NULL); -} + int idx_curr = 5; + char *tag, *distance, *vrf; -DEFUN (ipv6_route_ifname_flags_pref, - ipv6_route_ifname_flags_pref_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255)", - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Distance value for this prefix\n") -{ - int idx_ipv6_prefixlen = 2; - int idx_ipv6 = 3; - int idx_interface = 4; - int idx_reject_blackhole = 5; - int idx_number = 6; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, NULL); + tag = distance = vrf = NULL; + zebra_vty_ip_route_tdv_helper (argc, argv, idx_curr, &tag, &distance, &vrf); + + return static_ipv6_func (vty, 1, + argv[idx_ipv6_prefixlen]->arg, + argv[idx_ipv6]->arg, + argv[idx_interface]->arg, + NULL, + tag, distance, vrf); } -DEFUN (ipv6_route_ifname_flags_pref_tag, - ipv6_route_ifname_flags_pref_tag_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255)", +DEFUN (ipv6_route_ifname_flags, + ipv6_route_ifname_flags_cmd, + "ipv6 route X:X::X:X/M X:X::X:X INTERFACE [tag (1-65535)] [(1-255)] [vrf NAME]", IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" @@ -2809,15 +2629,25 @@ DEFUN (ipv6_route_ifname_flags_pref_tag, "Silently discard pkts when matched\n" "Set tag for this route\n" "Tag value\n" - "Distance value for this prefix\n") + "Distance value for this prefix\n" + VRF_CMD_HELP_STR) { int idx_ipv6_prefixlen = 2; int idx_ipv6 = 3; int idx_interface = 4; int idx_reject_blackhole = 5; - int idx_number = 7; - int idx_number_2 = 8; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, NULL); + int idx_curr = 6; + char *tag, *distance, *vrf; + + tag = distance = vrf = NULL; + zebra_vty_ip_route_tdv_helper (argc, argv, idx_curr, &tag, &distance, &vrf); + + return static_ipv6_func (vty, 1, + argv[idx_ipv6_prefixlen]->arg, + argv[idx_ipv6]->arg, + argv[idx_interface]->arg, + argv[idx_reject_blackhole]->arg, + tag, distance, vrf); } DEFUN (no_ipv6_route, @@ -3134,332 +2964,6 @@ DEFUN (no_ipv6_route_ifname_flags_pref_tag, return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, NULL); } -DEFUN (ipv6_route_vrf, - ipv6_route_vrf_cmd, - "ipv6 route X:X::X:X/M " VRF_CMD_STR, - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv6_prefixlen = 2; - int idx_ipv6_ifname = 3; - int idx_name = 5; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, NULL, NULL, argv[idx_name]->arg); -} - -DEFUN (ipv6_route_tag_vrf, - ipv6_route_tag_vrf_cmd, - "ipv6 route X:X::X:X/M tag (1-65535) " VRF_CMD_STR, - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Set tag for this route\n" - "Tag value\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv6_prefixlen = 2; - int idx_ipv6_ifname = 3; - int idx_number = 5; - int idx_name = 7; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, argv[idx_number]->arg, NULL, argv[idx_name]->arg); -} - -DEFUN (ipv6_route_flags_vrf, - ipv6_route_flags_vrf_cmd, - "ipv6 route X:X::X:X/M " VRF_CMD_STR, - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv6_prefixlen = 2; - int idx_ipv6_ifname = 3; - int idx_reject_blackhole = 4; - int idx_name = 6; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg); -} - -DEFUN (ipv6_route_flags_tag_vrf, - ipv6_route_flags_tag_vrf_cmd, - "ipv6 route X:X::X:X/M tag (1-65535) " VRF_CMD_STR, - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Set tag for this route\n" - "Tag value\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv6_prefixlen = 2; - int idx_ipv6_ifname = 3; - int idx_reject_blackhole = 4; - int idx_number = 6; - int idx_name = 8; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg); -} - -DEFUN (ipv6_route_ifname_vrf, - ipv6_route_ifname_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE " VRF_CMD_STR, - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv6_prefixlen = 2; - int idx_ipv6 = 3; - int idx_interface = 4; - int idx_name = 6; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, NULL, NULL, argv[idx_name]->arg); -} -DEFUN (ipv6_route_ifname_tag_vrf, - ipv6_route_ifname_tag_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) " VRF_CMD_STR, - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Set tag for this route\n" - "Tag value\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv6_prefixlen = 2; - int idx_ipv6 = 3; - int idx_interface = 4; - int idx_number = 6; - int idx_name = 8; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, argv[idx_number]->arg, NULL, argv[idx_name]->arg); -} - -DEFUN (ipv6_route_ifname_flags_vrf, - ipv6_route_ifname_flags_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE " VRF_CMD_STR, - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv6_prefixlen = 2; - int idx_ipv6 = 3; - int idx_interface = 4; - int idx_reject_blackhole = 5; - int idx_name = 7; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg); -} - -DEFUN (ipv6_route_ifname_flags_tag_vrf, - ipv6_route_ifname_flags_tag_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) " VRF_CMD_STR, - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Set tag for this route\n" - "Tag value\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv6_prefixlen = 2; - int idx_ipv6 = 3; - int idx_interface = 4; - int idx_reject_blackhole = 5; - int idx_number = 7; - int idx_name = 9; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg); -} - -DEFUN (ipv6_route_pref_vrf, - ipv6_route_pref_vrf_cmd, - "ipv6 route X:X::X:X/M (1-255) " VRF_CMD_STR, - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Distance value for this prefix\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv6_prefixlen = 2; - int idx_ipv6_ifname = 3; - int idx_number = 4; - int idx_name = 6; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, NULL, argv[idx_number]->arg, argv[idx_name]->arg); -} - -DEFUN (ipv6_route_pref_tag_vrf, - ipv6_route_pref_tag_vrf_cmd, - "ipv6 route X:X::X:X/M tag (1-65535) (1-255) " VRF_CMD_STR, - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Set tag for this route\n" - "Tag value\n" - "Distance value for this prefix\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv6_prefixlen = 2; - int idx_ipv6_ifname = 3; - int idx_number = 5; - int idx_number_2 = 6; - int idx_name = 8; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); -} - -DEFUN (ipv6_route_flags_pref_vrf, - ipv6_route_flags_pref_vrf_cmd, - "ipv6 route X:X::X:X/M (1-255) " VRF_CMD_STR, - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Distance value for this prefix\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv6_prefixlen = 2; - int idx_ipv6_ifname = 3; - int idx_reject_blackhole = 4; - int idx_number = 5; - int idx_name = 7; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg); -} - -DEFUN (ipv6_route_flags_pref_tag_vrf, - ipv6_route_flags_pref_tag_vrf_cmd, - "ipv6 route X:X::X:X/M tag (1-65535) (1-255) " VRF_CMD_STR, - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Set tag for this route\n" - "Tag value\n" - "Distance value for this prefix\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv6_prefixlen = 2; - int idx_ipv6_ifname = 3; - int idx_reject_blackhole = 4; - int idx_number = 6; - int idx_number_2 = 7; - int idx_name = 9; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); -} - -DEFUN (ipv6_route_ifname_pref_vrf, - ipv6_route_ifname_pref_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255) " VRF_CMD_STR, - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Distance value for this prefix\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv6_prefixlen = 2; - int idx_ipv6 = 3; - int idx_interface = 4; - int idx_number = 5; - int idx_name = 7; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_name]->arg); -} - -DEFUN (ipv6_route_ifname_pref_tag_vrf, - ipv6_route_ifname_pref_tag_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255) " VRF_CMD_STR, - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Set tag for this route\n" - "Tag value\n" - "Distance value for this prefix\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv6_prefixlen = 2; - int idx_ipv6 = 3; - int idx_interface = 4; - int idx_number = 6; - int idx_number_2 = 7; - int idx_name = 9; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); -} - -DEFUN (ipv6_route_ifname_flags_pref_vrf, - ipv6_route_ifname_flags_pref_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255) " VRF_CMD_STR, - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Distance value for this prefix\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv6_prefixlen = 2; - int idx_ipv6 = 3; - int idx_interface = 4; - int idx_reject_blackhole = 5; - int idx_number = 6; - int idx_name = 8; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg); -} - -DEFUN (ipv6_route_ifname_flags_pref_tag_vrf, - ipv6_route_ifname_flags_pref_tag_vrf_cmd, - "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255) " VRF_CMD_STR, - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Set tag for this route\n" - "Tag value\n" - "Distance value for this prefix\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv6_prefixlen = 2; - int idx_ipv6 = 3; - int idx_interface = 4; - int idx_reject_blackhole = 5; - int idx_number = 7; - int idx_number_2 = 8; - int idx_name = 10; - return static_ipv6_func (vty, 1, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); -} DEFUN (no_ipv6_route_vrf, no_ipv6_route_vrf_cmd, @@ -5042,22 +4546,10 @@ zebra_vty_init (void) install_element (CONFIG_NODE, &no_ipv6_route_flags_cmd); install_element (CONFIG_NODE, &no_ipv6_route_ifname_cmd); install_element (CONFIG_NODE, &no_ipv6_route_ifname_flags_cmd); - install_element (CONFIG_NODE, &ipv6_route_pref_cmd); - install_element (CONFIG_NODE, &ipv6_route_flags_pref_cmd); - install_element (CONFIG_NODE, &ipv6_route_ifname_pref_cmd); - install_element (CONFIG_NODE, &ipv6_route_ifname_flags_pref_cmd); install_element (CONFIG_NODE, &no_ipv6_route_pref_cmd); install_element (CONFIG_NODE, &no_ipv6_route_flags_pref_cmd); install_element (CONFIG_NODE, &no_ipv6_route_ifname_pref_cmd); install_element (CONFIG_NODE, &no_ipv6_route_ifname_flags_pref_cmd); - install_element (CONFIG_NODE, &ipv6_route_tag_cmd); - install_element (CONFIG_NODE, &ipv6_route_flags_tag_cmd); - install_element (CONFIG_NODE, &ipv6_route_ifname_tag_cmd); - install_element (CONFIG_NODE, &ipv6_route_ifname_flags_tag_cmd); - install_element (CONFIG_NODE, &ipv6_route_pref_tag_cmd); - install_element (CONFIG_NODE, &ipv6_route_flags_pref_tag_cmd); - install_element (CONFIG_NODE, &ipv6_route_ifname_pref_tag_cmd); - install_element (CONFIG_NODE, &ipv6_route_ifname_flags_pref_tag_cmd); install_element (CONFIG_NODE, &no_ipv6_route_tag_cmd); install_element (CONFIG_NODE, &no_ipv6_route_flags_tag_cmd); install_element (CONFIG_NODE, &no_ipv6_route_ifname_tag_cmd); @@ -5092,30 +4584,14 @@ zebra_vty_init (void) /* Commands for VRF */ - install_element (CONFIG_NODE, &ipv6_route_vrf_cmd); - install_element (CONFIG_NODE, &ipv6_route_flags_vrf_cmd); - install_element (CONFIG_NODE, &ipv6_route_ifname_vrf_cmd); - install_element (CONFIG_NODE, &ipv6_route_ifname_flags_vrf_cmd); install_element (CONFIG_NODE, &no_ipv6_route_vrf_cmd); install_element (CONFIG_NODE, &no_ipv6_route_flags_vrf_cmd); install_element (CONFIG_NODE, &no_ipv6_route_ifname_vrf_cmd); install_element (CONFIG_NODE, &no_ipv6_route_ifname_flags_vrf_cmd); - install_element (CONFIG_NODE, &ipv6_route_pref_vrf_cmd); - install_element (CONFIG_NODE, &ipv6_route_flags_pref_vrf_cmd); - install_element (CONFIG_NODE, &ipv6_route_ifname_pref_vrf_cmd); - install_element (CONFIG_NODE, &ipv6_route_ifname_flags_pref_vrf_cmd); install_element (CONFIG_NODE, &no_ipv6_route_pref_vrf_cmd); install_element (CONFIG_NODE, &no_ipv6_route_flags_pref_vrf_cmd); install_element (CONFIG_NODE, &no_ipv6_route_ifname_pref_vrf_cmd); install_element (CONFIG_NODE, &no_ipv6_route_ifname_flags_pref_vrf_cmd); - install_element (CONFIG_NODE, &ipv6_route_tag_vrf_cmd); - install_element (CONFIG_NODE, &ipv6_route_flags_tag_vrf_cmd); - install_element (CONFIG_NODE, &ipv6_route_ifname_tag_vrf_cmd); - install_element (CONFIG_NODE, &ipv6_route_ifname_flags_tag_vrf_cmd); - install_element (CONFIG_NODE, &ipv6_route_pref_tag_vrf_cmd); - install_element (CONFIG_NODE, &ipv6_route_flags_pref_tag_vrf_cmd); - install_element (CONFIG_NODE, &ipv6_route_ifname_pref_tag_vrf_cmd); - install_element (CONFIG_NODE, &ipv6_route_ifname_flags_pref_tag_vrf_cmd); install_element (CONFIG_NODE, &no_ipv6_route_tag_vrf_cmd); install_element (CONFIG_NODE, &no_ipv6_route_flags_tag_vrf_cmd); install_element (CONFIG_NODE, &no_ipv6_route_ifname_tag_vrf_cmd); -- cgit v1.2.3 From 28dadafced1b918b9095d22ffc6a3bfe6349d6f7 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 26 Sep 2016 10:01:50 -0400 Subject: zebra: Refactor 'no ipv6 route XXXX' for new cli Refactor the 'no ipv6 route XXXX' commands to work under the new cli and to collapse the code to a much smaller set. Signed-off-by: Donald Sharp --- zebra/zebra_vty.c | 674 +++++------------------------------------------------- 1 file changed, 53 insertions(+), 621 deletions(-) (limited to 'zebra') diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index ea911653f..121c0c0c0 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -2406,7 +2406,6 @@ static_config_ipv4 (struct vty *vty, safi_t safi, const char *cmd) return write; } -#ifdef HAVE_IPV6 /* General fucntion for IPv6 static route. */ static int static_ipv6_func (struct vty *vty, int add_cmd, const char *dest_str, @@ -2652,550 +2651,36 @@ DEFUN (ipv6_route_ifname_flags, DEFUN (no_ipv6_route, no_ipv6_route_cmd, - "no ipv6 route X:X::X:X/M ", - NO_STR - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n") -{ - int idx_ipv6_prefixlen = 3; - int idx_ipv6_ifname = 4; - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, NULL, NULL, NULL); -} - -DEFUN (no_ipv6_route_tag, - no_ipv6_route_tag_cmd, - "no ipv6 route X:X::X:X/M tag (1-65535)", - NO_STR - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Set tag for this route\n" - "Tag value\n") -{ - int idx_ipv6_prefixlen = 3; - int idx_ipv6_ifname = 4; - int idx_number = 6; - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, argv[idx_number]->arg, NULL, NULL); -} - -DEFUN (no_ipv6_route_flags, - no_ipv6_route_flags_cmd, - "no ipv6 route X:X::X:X/M ", - NO_STR - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n") -{ - int idx_ipv6_prefixlen = 3; - int idx_ipv6_ifname = 4; - int idx_reject_blackhole = 5; - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, NULL, NULL); -} - -DEFUN (no_ipv6_route_flags_tag, - no_ipv6_route_flags_tag_cmd, - "no ipv6 route X:X::X:X/M tag (1-65535)", - NO_STR - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Set tag for this route\n" - "Tag value\n") -{ - int idx_ipv6_prefixlen = 3; - int idx_ipv6_ifname = 4; - int idx_reject_blackhole = 5; - int idx_number = 7; - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, NULL); -} - -DEFUN (no_ipv6_route_ifname, - no_ipv6_route_ifname_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE", - NO_STR - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n") -{ - int idx_ipv6_prefixlen = 3; - int idx_ipv6 = 4; - int idx_interface = 5; - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, NULL, NULL, NULL); -} - -DEFUN (no_ipv6_route_ifname_tag, - no_ipv6_route_ifname_tag_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535)", - NO_STR - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Set tag for this route\n" - "Tag value\n") -{ - int idx_ipv6_prefixlen = 3; - int idx_ipv6 = 4; - int idx_interface = 5; - int idx_number = 7; - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, argv[idx_number]->arg, NULL, NULL); -} - -DEFUN (no_ipv6_route_ifname_flags, - no_ipv6_route_ifname_flags_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE ", - NO_STR - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n") -{ - int idx_ipv6_prefixlen = 3; - int idx_ipv6 = 4; - int idx_interface = 5; - int idx_reject_blackhole = 6; - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, NULL, NULL, NULL); -} - -DEFUN (no_ipv6_route_ifname_flags_tag, - no_ipv6_route_ifname_flags_tag_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535)", - NO_STR - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Set tag for this route\n" - "Tag value\n") -{ - int idx_ipv6_prefixlen = 3; - int idx_ipv6 = 4; - int idx_interface = 5; - int idx_reject_blackhole = 6; - int idx_number = 8; - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, NULL); -} - -DEFUN (no_ipv6_route_pref, - no_ipv6_route_pref_cmd, - "no ipv6 route X:X::X:X/M (1-255)", - NO_STR - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Distance value for this prefix\n") -{ - int idx_ipv6_prefixlen = 3; - int idx_ipv6_ifname = 4; - int idx_number = 5; - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, NULL, argv[idx_number]->arg, NULL); -} - -DEFUN (no_ipv6_route_pref_tag, - no_ipv6_route_pref_tag_cmd, - "no ipv6 route X:X::X:X/M tag (1-65535) (1-255)", - NO_STR - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Set tag for this route\n" - "Tag value\n" - "Distance value for this prefix\n") -{ - int idx_ipv6_prefixlen = 3; - int idx_ipv6_ifname = 4; - int idx_number = 6; - int idx_number_2 = 7; - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, NULL); -} - -DEFUN (no_ipv6_route_flags_pref, - no_ipv6_route_flags_pref_cmd, - "no ipv6 route X:X::X:X/M (1-255)", - NO_STR - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Distance value for this prefix\n") -{ - int idx_ipv6_prefixlen = 3; - int idx_ipv6_ifname = 4; - int idx_reject_blackhole = 5; - int idx_number = 6; - /* We do not care about argv[idx_reject_blackhole]->arg */ - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, NULL); -} - -DEFUN (no_ipv6_route_flags_pref_tag, - no_ipv6_route_flags_pref_tag_cmd, - "no ipv6 route X:X::X:X/M tag (1-65535) (1-255)", - NO_STR - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Set tag for this route\n" - "Tag value\n" - "Distance value for this prefix\n") -{ - int idx_ipv6_prefixlen = 3; - int idx_ipv6_ifname = 4; - int idx_reject_blackhole = 5; - int idx_number = 7; - int idx_number_2 = 8; - /* We do not care about argv[idx_reject_blackhole]->arg */ - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, NULL); -} - -DEFUN (no_ipv6_route_ifname_pref, - no_ipv6_route_ifname_pref_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255)", - NO_STR - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Distance value for this prefix\n") -{ - int idx_ipv6_prefixlen = 3; - int idx_ipv6 = 4; - int idx_interface = 5; - int idx_number = 6; - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, NULL, argv[idx_number]->arg, NULL); -} - -DEFUN (no_ipv6_route_ifname_pref_tag, - no_ipv6_route_ifname_pref_tag_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255)", - NO_STR - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Set tag for this route\n" - "Tag value\n" - "Distance value for this prefix\n") -{ - int idx_ipv6_prefixlen = 3; - int idx_ipv6 = 4; - int idx_interface = 5; - int idx_number = 7; - int idx_number_2 = 8; - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, NULL); -} - -DEFUN (no_ipv6_route_ifname_flags_pref, - no_ipv6_route_ifname_flags_pref_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255)", - NO_STR - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Distance value for this prefix\n") -{ - int idx_ipv6_prefixlen = 3; - int idx_ipv6 = 4; - int idx_interface = 5; - int idx_reject_blackhole = 6; - int idx_number = 7; - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, NULL); -} - -DEFUN (no_ipv6_route_ifname_flags_pref_tag, - no_ipv6_route_ifname_flags_pref_tag_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255)", - NO_STR - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Set tag for this route\n" - "Tag value\n" - "Distance value for this prefix\n") -{ - int idx_ipv6_prefixlen = 3; - int idx_ipv6 = 4; - int idx_interface = 5; - int idx_reject_blackhole = 6; - int idx_number = 8; - int idx_number_2 = 9; - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, NULL); -} - - -DEFUN (no_ipv6_route_vrf, - no_ipv6_route_vrf_cmd, - "no ipv6 route X:X::X:X/M " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv6_prefixlen = 3; - int idx_ipv6_ifname = 4; - int idx_name = 6; - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, NULL, NULL, argv[idx_name]->arg); -} - -DEFUN (no_ipv6_route_tag_vrf, - no_ipv6_route_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M tag (1-65535) " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Set tag for this route\n" - "Tag value\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv6_prefixlen = 3; - int idx_ipv6_ifname = 4; - int idx_number = 6; - int idx_name = 8; - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, argv[idx_number]->arg, NULL, argv[idx_name]->arg); -} - -DEFUN (no_ipv6_route_flags_vrf, - no_ipv6_route_flags_vrf_cmd, - "no ipv6 route X:X::X:X/M " VRF_CMD_STR, + "no ipv6 route X:X::X:X/M [tag (1-65535)] [(1-255)] [vrf NAME]", NO_STR IP_STR "Establish static routes\n" "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" "IPv6 gateway address\n" "IPv6 gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv6_prefixlen = 3; - int idx_ipv6_ifname = 4; - int idx_reject_blackhole = 5; - int idx_name = 7; - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg); -} - -DEFUN (no_ipv6_route_flags_tag_vrf, - no_ipv6_route_flags_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M tag (1-65535) " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" "Set tag for this route\n" "Tag value\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv6_prefixlen = 3; - int idx_ipv6_ifname = 4; - int idx_reject_blackhole = 5; - int idx_number = 7; - int idx_name = 9; - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg); -} - -DEFUN (no_ipv6_route_ifname_vrf, - no_ipv6_route_ifname_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv6_prefixlen = 3; - int idx_ipv6 = 4; - int idx_interface = 5; - int idx_name = 7; - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, NULL, NULL, argv[idx_name]->arg); -} - -DEFUN (no_ipv6_route_ifname_tag_vrf, - no_ipv6_route_ifname_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Set tag for this route\n" - "Tag value\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv6_prefixlen = 3; - int idx_ipv6 = 4; - int idx_interface = 5; - int idx_number = 7; - int idx_name = 9; - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, argv[idx_number]->arg, NULL, argv[idx_name]->arg); -} - -DEFUN (no_ipv6_route_ifname_flags_vrf, - no_ipv6_route_ifname_flags_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv6_prefixlen = 3; - int idx_ipv6 = 4; - int idx_interface = 5; - int idx_reject_blackhole = 6; - int idx_name = 8; - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, NULL, NULL, argv[idx_name]->arg); -} - -DEFUN (no_ipv6_route_ifname_flags_tag_vrf, - no_ipv6_route_ifname_flags_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Set tag for this route\n" - "Tag value\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv6_prefixlen = 3; - int idx_ipv6 = 4; - int idx_interface = 5; - int idx_reject_blackhole = 6; - int idx_number = 8; - int idx_name = 10; - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, NULL, argv[idx_name]->arg); -} - -DEFUN (no_ipv6_route_pref_vrf, - no_ipv6_route_pref_vrf_cmd, - "no ipv6 route X:X::X:X/M (1-255) " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" "Distance value for this prefix\n" VRF_CMD_HELP_STR) { int idx_ipv6_prefixlen = 3; int idx_ipv6_ifname = 4; - int idx_number = 5; - int idx_name = 7; - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, NULL, argv[idx_number]->arg, argv[idx_name]->arg); -} + int idx_curr = 5; + char *tag, *distance, *vrf; -DEFUN (no_ipv6_route_pref_tag_vrf, - no_ipv6_route_pref_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M tag (1-65535) (1-255) " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Set tag for this route\n" - "Tag value\n" - "Distance value for this prefix\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv6_prefixlen = 3; - int idx_ipv6_ifname = 4; - int idx_number = 6; - int idx_number_2 = 7; - int idx_name = 9; - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); -} + tag = distance = vrf = NULL; + zebra_vty_ip_route_tdv_helper (argc, argv, idx_curr, &tag, &distance, &vrf); -DEFUN (no_ipv6_route_flags_pref_vrf, - no_ipv6_route_flags_pref_vrf_cmd, - "no ipv6 route X:X::X:X/M (1-255) " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Distance value for this prefix\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv6_prefixlen = 3; - int idx_ipv6_ifname = 4; - int idx_reject_blackhole = 5; - int idx_number = 6; - int idx_name = 8; - /* We do not care about argv[idx_reject_blackhole]->arg */ - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg); + return static_ipv6_func (vty, 0, + argv[idx_ipv6_prefixlen]->arg, + argv[idx_ipv6_ifname]->arg, + NULL, NULL, + tag, distance, vrf); } -DEFUN (no_ipv6_route_flags_pref_tag_vrf, - no_ipv6_route_flags_pref_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M tag (1-65535) (1-255) " VRF_CMD_STR, +DEFUN (no_ipv6_route_flags, + no_ipv6_route_flags_cmd, + "no ipv6 route X:X::X:X/M [tag (1-65535)] [(1-255)] [vrf NAME]", NO_STR IP_STR "Establish static routes\n" @@ -3212,36 +2697,23 @@ DEFUN (no_ipv6_route_flags_pref_tag_vrf, int idx_ipv6_prefixlen = 3; int idx_ipv6_ifname = 4; int idx_reject_blackhole = 5; - int idx_number = 7; - int idx_number_2 = 8; - int idx_name = 10; - /* We do not care about argv[idx_reject_blackhole]->arg */ - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6_ifname]->arg, NULL, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); -} + int idx_curr = 5; + char *tag, *distance, *vrf; -DEFUN (no_ipv6_route_ifname_pref_vrf, - no_ipv6_route_ifname_pref_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255) " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Distance value for this prefix\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv6_prefixlen = 3; - int idx_ipv6 = 4; - int idx_interface = 5; - int idx_number = 6; - int idx_name = 8; - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, NULL, argv[idx_number]->arg, argv[idx_name]->arg); + tag = distance = vrf = NULL; + zebra_vty_ip_route_tdv_helper (argc, argv, idx_curr, &tag, &distance, &vrf); + + return static_ipv6_func (vty, 0, + argv[idx_ipv6_prefixlen]->arg, + argv[idx_ipv6_ifname]->arg, + NULL, + argv[idx_reject_blackhole]->arg, + tag, distance, vrf); } -DEFUN (no_ipv6_route_ifname_pref_tag_vrf, - no_ipv6_route_ifname_pref_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255) " VRF_CMD_STR, +DEFUN (no_ipv6_route_ifname, + no_ipv6_route_ifname_cmd, + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE [tag (1-65535)] [(1-255)] [vrf NAME]", NO_STR IP_STR "Establish static routes\n" @@ -3256,38 +2728,23 @@ DEFUN (no_ipv6_route_ifname_pref_tag_vrf, int idx_ipv6_prefixlen = 3; int idx_ipv6 = 4; int idx_interface = 5; - int idx_number = 7; - int idx_number_2 = 8; - int idx_name = 10; - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, NULL, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); -} + int idx_curr = 6; + char *tag, *distance, *vrf; -DEFUN (no_ipv6_route_ifname_flags_pref_vrf, - no_ipv6_route_ifname_flags_pref_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (1-255) " VRF_CMD_STR, - NO_STR - IP_STR - "Establish static routes\n" - "IPv6 destination prefix (e.g. 3ffe:506::/32)\n" - "IPv6 gateway address\n" - "IPv6 gateway interface name\n" - "Emit an ICMP unreachable when matched\n" - "Silently discard pkts when matched\n" - "Distance value for this prefix\n" - VRF_CMD_HELP_STR) -{ - int idx_ipv6_prefixlen = 3; - int idx_ipv6 = 4; - int idx_interface = 5; - int idx_reject_blackhole = 6; - int idx_number = 7; - int idx_name = 9; - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, NULL, argv[idx_number]->arg, argv[idx_name]->arg); + tag = distance = vrf = NULL; + zebra_vty_ip_route_tdv_helper (argc, argv, idx_curr, &tag, &distance, &vrf); + + return static_ipv6_func (vty, 0, + argv[idx_ipv6_prefixlen]->arg, + argv[idx_ipv6]->arg, + argv[idx_interface]->arg, + NULL, + tag, distance, vrf); } -DEFUN (no_ipv6_route_ifname_flags_pref_tag_vrf, - no_ipv6_route_ifname_flags_pref_tag_vrf_cmd, - "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag (1-65535) (1-255) " VRF_CMD_STR, +DEFUN (no_ipv6_route_ifname_flags, + no_ipv6_route_ifname_flags_cmd, + "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE [tag (1-65535)] [(1-255)] [vrf NAME]", NO_STR IP_STR "Establish static routes\n" @@ -3305,10 +2762,18 @@ DEFUN (no_ipv6_route_ifname_flags_pref_tag_vrf, int idx_ipv6 = 4; int idx_interface = 5; int idx_reject_blackhole = 6; - int idx_number = 8; - int idx_number_2 = 9; - int idx_name = 11; - return static_ipv6_func (vty, 0, argv[idx_ipv6_prefixlen]->arg, argv[idx_ipv6]->arg, argv[idx_interface]->arg, argv[idx_reject_blackhole]->arg, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_name]->arg); + int idx_curr = 7; + char *tag, *distance, *vrf; + + tag = distance = vrf = NULL; + zebra_vty_ip_route_tdv_helper (argc, argv, idx_curr, &tag, &distance, &vrf); + + return static_ipv6_func (vty, 0, + argv[idx_ipv6_prefixlen]->arg, + argv[idx_ipv6]->arg, + argv[idx_interface]->arg, + argv[idx_reject_blackhole]->arg, + tag, distance, vrf); } /* @@ -4204,7 +3669,6 @@ static_config_ipv6 (struct vty *vty) } return write; } -#endif /* HAVE_IPV6 */ DEFUN (allow_external_route_update, allow_external_route_update_cmd, @@ -4261,9 +3725,7 @@ zebra_ip_config (struct vty *vty) write += static_config_ipv4 (vty, SAFI_UNICAST, "ip route"); write += static_config_ipv4 (vty, SAFI_MULTICAST, "ip mroute"); -#ifdef HAVE_IPV6 write += static_config_ipv6 (vty); -#endif /* HAVE_IPV6 */ write += zebra_import_table_config (vty); return write; @@ -4546,18 +4008,6 @@ zebra_vty_init (void) install_element (CONFIG_NODE, &no_ipv6_route_flags_cmd); install_element (CONFIG_NODE, &no_ipv6_route_ifname_cmd); install_element (CONFIG_NODE, &no_ipv6_route_ifname_flags_cmd); - install_element (CONFIG_NODE, &no_ipv6_route_pref_cmd); - install_element (CONFIG_NODE, &no_ipv6_route_flags_pref_cmd); - install_element (CONFIG_NODE, &no_ipv6_route_ifname_pref_cmd); - install_element (CONFIG_NODE, &no_ipv6_route_ifname_flags_pref_cmd); - install_element (CONFIG_NODE, &no_ipv6_route_tag_cmd); - install_element (CONFIG_NODE, &no_ipv6_route_flags_tag_cmd); - install_element (CONFIG_NODE, &no_ipv6_route_ifname_tag_cmd); - install_element (CONFIG_NODE, &no_ipv6_route_ifname_flags_tag_cmd); - install_element (CONFIG_NODE, &no_ipv6_route_pref_tag_cmd); - install_element (CONFIG_NODE, &no_ipv6_route_flags_pref_tag_cmd); - install_element (CONFIG_NODE, &no_ipv6_route_ifname_pref_tag_cmd); - install_element (CONFIG_NODE, &no_ipv6_route_ifname_flags_pref_tag_cmd); install_element (CONFIG_NODE, &ip_nht_default_route_cmd); install_element (CONFIG_NODE, &no_ip_nht_default_route_cmd); install_element (CONFIG_NODE, &ipv6_nht_default_route_cmd); @@ -4583,24 +4033,6 @@ zebra_vty_init (void) install_element (ENABLE_NODE, &show_ipv6_mroute_cmd); /* Commands for VRF */ - - install_element (CONFIG_NODE, &no_ipv6_route_vrf_cmd); - install_element (CONFIG_NODE, &no_ipv6_route_flags_vrf_cmd); - install_element (CONFIG_NODE, &no_ipv6_route_ifname_vrf_cmd); - install_element (CONFIG_NODE, &no_ipv6_route_ifname_flags_vrf_cmd); - install_element (CONFIG_NODE, &no_ipv6_route_pref_vrf_cmd); - install_element (CONFIG_NODE, &no_ipv6_route_flags_pref_vrf_cmd); - install_element (CONFIG_NODE, &no_ipv6_route_ifname_pref_vrf_cmd); - install_element (CONFIG_NODE, &no_ipv6_route_ifname_flags_pref_vrf_cmd); - install_element (CONFIG_NODE, &no_ipv6_route_tag_vrf_cmd); - install_element (CONFIG_NODE, &no_ipv6_route_flags_tag_vrf_cmd); - install_element (CONFIG_NODE, &no_ipv6_route_ifname_tag_vrf_cmd); - install_element (CONFIG_NODE, &no_ipv6_route_ifname_flags_tag_vrf_cmd); - install_element (CONFIG_NODE, &no_ipv6_route_pref_tag_vrf_cmd); - install_element (CONFIG_NODE, &no_ipv6_route_flags_pref_tag_vrf_cmd); - install_element (CONFIG_NODE, &no_ipv6_route_ifname_pref_tag_vrf_cmd); - install_element (CONFIG_NODE, &no_ipv6_route_ifname_flags_pref_tag_vrf_cmd); - install_element (VIEW_NODE, &show_ipv6_route_vrf_all_cmd); install_element (VIEW_NODE, &show_ipv6_route_vrf_all_tag_cmd); install_element (VIEW_NODE, &show_ipv6_route_vrf_all_summary_cmd); -- cgit v1.2.3 From 5bebf56884d86291cdf95825a79aea420b6fe93f Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 26 Sep 2016 11:51:10 -0400 Subject: zebra: Put back missing code When pulling forward the zebra_vty.c changes I accidently dropped these changes from earlier commits. Signed-off-by: Donald Sharp --- zebra/zebra_vty.c | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'zebra') diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 121c0c0c0..a9f0e8701 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -1258,7 +1258,7 @@ do_show_ip_route (struct vty *vty, const char *vrf_name, safi_t safi, DEFUN (show_ip_route_vrf, show_ip_route_vrf_cmd, - "show ip route " VRF_CMD_STR " [json]", + "show ip route vrf NAME [json]", SHOW_STR IP_STR "IP routing table\n" @@ -1294,7 +1294,7 @@ DEFUN (show_ip_nht, DEFUN (show_ip_nht_vrf_all, show_ip_nht_vrf_all_cmd, - "show ip nht " VRF_ALL_CMD_STR, + "show ip nht vrf all", SHOW_STR IP_STR "IP nexthop tracking table\n" @@ -1334,7 +1334,7 @@ DEFUN (show_ipv6_nht, DEFUN (show_ipv6_nht_vrf_all, show_ipv6_nht_vrf_all_cmd, - "show ipv6 nht " VRF_ALL_CMD_STR, + "show ipv6 nht vrf all", SHOW_STR IP_STR "IPv6 nexthop tracking table\n" @@ -1952,7 +1952,7 @@ DEFUN (show_ip_route_summary_prefix, DEFUN (show_ip_route_vrf_all, show_ip_route_vrf_all_cmd, - "show ip route " VRF_ALL_CMD_STR, + "show ip route vrf all", SHOW_STR IP_STR "IP routing table\n" @@ -1997,7 +1997,7 @@ DEFUN (show_ip_route_vrf_all, DEFUN (show_ip_route_vrf_all_tag, show_ip_route_vrf_all_tag_cmd, - "show ip route " VRF_ALL_CMD_STR " tag (1-65535)", + "show ip route vrf all tag (1-65535)", SHOW_STR IP_STR "IP routing table\n" @@ -2051,7 +2051,7 @@ DEFUN (show_ip_route_vrf_all_tag, DEFUN (show_ip_route_vrf_all_prefix_longer, show_ip_route_vrf_all_prefix_longer_cmd, - "show ip route " VRF_ALL_CMD_STR " A.B.C.D/M longer-prefixes", + "show ip route vrf all A.B.C.D/M longer-prefixes", SHOW_STR IP_STR "IP routing table\n" @@ -2109,7 +2109,7 @@ DEFUN (show_ip_route_vrf_all_prefix_longer, DEFUN (show_ip_route_vrf_all_supernets, show_ip_route_vrf_all_supernets_cmd, - "show ip route " VRF_ALL_CMD_STR " supernets-only", + "show ip route vrf all supernets-only", SHOW_STR IP_STR "IP routing table\n" @@ -2163,7 +2163,7 @@ DEFUN (show_ip_route_vrf_all_supernets, DEFUN (show_ip_route_vrf_all_protocol, show_ip_route_vrf_all_protocol_cmd, - "show ip route " VRF_ALL_CMD_STR " " QUAGGA_IP_REDIST_STR_ZEBRA, + "show ip route vrf all " QUAGGA_IP_REDIST_STR_ZEBRA, SHOW_STR IP_STR "IP routing table\n" @@ -2218,7 +2218,7 @@ DEFUN (show_ip_route_vrf_all_protocol, DEFUN (show_ip_route_vrf_all_addr, show_ip_route_vrf_all_addr_cmd, - "show ip route " VRF_ALL_CMD_STR " A.B.C.D", + "show ip route vrf all A.B.C.D", SHOW_STR IP_STR "IP routing table\n" @@ -2260,7 +2260,7 @@ DEFUN (show_ip_route_vrf_all_addr, DEFUN (show_ip_route_vrf_all_prefix, show_ip_route_vrf_all_prefix_cmd, - "show ip route " VRF_ALL_CMD_STR " A.B.C.D/M", + "show ip route vrf all A.B.C.D/M", SHOW_STR IP_STR "IP routing table\n" @@ -2307,7 +2307,7 @@ DEFUN (show_ip_route_vrf_all_prefix, DEFUN (show_ip_route_vrf_all_summary, show_ip_route_vrf_all_summary_cmd, - "show ip route " VRF_ALL_CMD_STR " summary ", + "show ip route vrf all summary ", SHOW_STR IP_STR "IP routing table\n" @@ -2326,7 +2326,7 @@ DEFUN (show_ip_route_vrf_all_summary, DEFUN (show_ip_route_vrf_all_summary_prefix, show_ip_route_vrf_all_summary_prefix_cmd, - "show ip route " VRF_ALL_CMD_STR " summary prefix", + "show ip route vrf all summary prefix", SHOW_STR IP_STR "IP routing table\n" @@ -2994,11 +2994,11 @@ DEFUN (show_ipv6_route_prefix_longer, */ DEFUN (show_ipv6_route_protocol, show_ipv6_route_protocol_cmd, - "show ipv6 route " QUAGGA_IP6_REDIST_STR_ZEBRA, + "show ipv6 route ", SHOW_STR IP_STR "IP routing table\n" - QUAGGA_IP6_REDIST_HELP_STR_ZEBRA) + QUAGGA_IP6_REDIST_HELP_STR_ZEBRA) { int idx_protocol = 3; int type; @@ -3233,7 +3233,7 @@ DEFUN (show_ipv6_mroute, DEFUN (show_ipv6_route_vrf_all, show_ipv6_route_vrf_all_cmd, - "show ipv6 route " VRF_ALL_CMD_STR, + "show ipv6 route vrf all", SHOW_STR IP_STR "IPv6 routing table\n" @@ -3278,7 +3278,7 @@ DEFUN (show_ipv6_route_vrf_all, DEFUN (show_ipv6_route_vrf_all_tag, show_ipv6_route_vrf_all_tag_cmd, - "show ipv6 route " VRF_ALL_CMD_STR " tag (1-65535)", + "show ipv6 route vrf all tag (1-65535)", SHOW_STR IP_STR "IPv6 routing table\n" @@ -3333,7 +3333,7 @@ DEFUN (show_ipv6_route_vrf_all_tag, DEFUN (show_ipv6_route_vrf_all_prefix_longer, show_ipv6_route_vrf_all_prefix_longer_cmd, - "show ipv6 route " VRF_ALL_CMD_STR " X:X::X:X/M longer-prefixes", + "show ipv6 route vrf all X:X::X:X/M longer-prefixes", SHOW_STR IP_STR "IPv6 routing table\n" @@ -3391,7 +3391,7 @@ DEFUN (show_ipv6_route_vrf_all_prefix_longer, DEFUN (show_ipv6_route_vrf_all_protocol, show_ipv6_route_vrf_all_protocol_cmd, - "show ipv6 route " VRF_ALL_CMD_STR " " QUAGGA_IP6_REDIST_STR_ZEBRA, + "show ipv6 route vrf all ", SHOW_STR IP_STR "IP routing table\n" @@ -3446,7 +3446,7 @@ DEFUN (show_ipv6_route_vrf_all_protocol, DEFUN (show_ipv6_route_vrf_all_addr, show_ipv6_route_vrf_all_addr_cmd, - "show ipv6 route " VRF_ALL_CMD_STR " X:X::X:X", + "show ipv6 route vrf all X:X::X:X", SHOW_STR IP_STR "IPv6 routing table\n" @@ -3488,7 +3488,7 @@ DEFUN (show_ipv6_route_vrf_all_addr, DEFUN (show_ipv6_route_vrf_all_prefix, show_ipv6_route_vrf_all_prefix_cmd, - "show ipv6 route " VRF_ALL_CMD_STR " X:X::X:X/M", + "show ipv6 route vrf all X:X::X:X/M", SHOW_STR IP_STR "IPv6 routing table\n" @@ -3535,7 +3535,7 @@ DEFUN (show_ipv6_route_vrf_all_prefix, DEFUN (show_ipv6_route_vrf_all_summary, show_ipv6_route_vrf_all_summary_cmd, - "show ipv6 route " VRF_ALL_CMD_STR " summary", + "show ipv6 route vrf all summary", SHOW_STR IP_STR "IPv6 routing table\n" @@ -3554,7 +3554,7 @@ DEFUN (show_ipv6_route_vrf_all_summary, DEFUN (show_ipv6_mroute_vrf_all, show_ipv6_mroute_vrf_all_cmd, - "show ipv6 mroute " VRF_ALL_CMD_STR, + "show ipv6 mroute vrf all", SHOW_STR IP_STR "IPv6 Multicast routing table\n" @@ -3590,7 +3590,7 @@ DEFUN (show_ipv6_mroute_vrf_all, DEFUN (show_ipv6_route_vrf_all_summary_prefix, show_ipv6_route_vrf_all_summary_prefix_cmd, - "show ipv6 route " VRF_ALL_CMD_STR " summary prefix", + "show ipv6 route vrf all summary prefix", SHOW_STR IP_STR "IPv6 routing table\n" -- cgit v1.2.3 From e961923c7217b935027107cad30c35c3907c936f Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Tue, 27 Sep 2016 00:07:46 +0000 Subject: bgpd, etc: changed .LINE to LINE... Signed-off-by: Daniel Walton --- bgpd/bgp_filter.c | 4 ++-- bgpd/bgp_routemap.c | 4 ++-- bgpd/bgp_vty.c | 18 +++++++++--------- lib/filter.c | 4 ++-- lib/plist.c | 4 ++-- pimd/pim_cmd.c | 4 ++-- tests/heavy-thread.c | 2 +- tests/heavy-wq.c | 2 +- tests/heavy.c | 2 +- vtysh/vtysh.c | 2 +- zebra/zebra_vty.c | 4 ++-- 11 files changed, 25 insertions(+), 25 deletions(-) (limited to 'zebra') diff --git a/bgpd/bgp_filter.c b/bgpd/bgp_filter.c index 05d5eafae..5af840810 100644 --- a/bgpd/bgp_filter.c +++ b/bgpd/bgp_filter.c @@ -428,7 +428,7 @@ as_list_dup_check (struct as_list *aslist, struct as_filter *new) DEFUN (ip_as_path, ip_as_path_cmd, - "ip as-path access-list WORD .LINE", + "ip as-path access-list WORD LINE...", IP_STR "BGP autonomous system path filter\n" "Specify an access list name\n" @@ -486,7 +486,7 @@ DEFUN (ip_as_path, DEFUN (no_ip_as_path, no_ip_as_path_cmd, - "no ip as-path access-list WORD .LINE", + "no ip as-path access-list WORD LINE...", NO_STR IP_STR "BGP autonomous system path filter\n" diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index e1d8ca896..dc90094f6 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -3938,7 +3938,7 @@ DEFUN (no_set_aspath_exclude, DEFUN (set_community, set_community_cmd, - "set community .AA:NN", + "set community AA:NN...", SET_STR "BGP community attribute\n" COMMUNITY_VAL_STR) @@ -4047,7 +4047,7 @@ DEFUN (set_community_none, * "BGP community attribute\n" * "No community attribute\n" * - * "no set community .AA:NN", + * "no set community AA:NN...", * NO_STR * SET_STR * "BGP community attribute\n" diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 46072a8c6..1fcdede2d 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -4338,7 +4338,7 @@ DEFUN (no_neighbor_disable_connected_check, DEFUN (neighbor_description, neighbor_description_cmd, - "neighbor description .LINE", + "neighbor description LINE...", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Neighbor specific description\n" @@ -11293,7 +11293,7 @@ community_list_unset_vty (struct vty *vty, int argc, struct cmd_token **argv, /* ip community-list standard */ DEFUN (ip_community_list_standard, ip_community_list_standard_cmd, - "ip community-list <(1-99)|standard WORD> [.AA:NN]", + "ip community-list <(1-99)|standard WORD> AA:NN...", IP_STR COMMUNITY_LIST_STR "Community list number (standard)\n" @@ -11308,7 +11308,7 @@ DEFUN (ip_community_list_standard, DEFUN (no_ip_community_list_standard_all, no_ip_community_list_standard_all_cmd, - "no ip community-list <(1-99)|standard WORD> [ [.AA:NN]]", + "no ip community-list <(1-99)|standard WORD> AA:NN...", NO_STR IP_STR COMMUNITY_LIST_STR @@ -11325,7 +11325,7 @@ DEFUN (no_ip_community_list_standard_all, /* ip community-list expanded */ DEFUN (ip_community_list_expanded_all, ip_community_list_expanded_all_cmd, - "ip community-list <(100-500)|expanded WORD> [ [.LINE]]", + "ip community-list <(100-500)|expanded WORD> LINE...", IP_STR COMMUNITY_LIST_STR "Community list number (expanded)\n" @@ -11340,7 +11340,7 @@ DEFUN (ip_community_list_expanded_all, DEFUN (no_ip_community_list_expanded_all, no_ip_community_list_expanded_all_cmd, - "no ip community-list <(100-500)|expanded WORD> [ [.LINE]]", + "no ip community-list <(100-500)|expanded WORD> LINE...", NO_STR IP_STR COMMUNITY_LIST_STR @@ -11532,7 +11532,7 @@ extcommunity_list_unset_vty (struct vty *vty, int argc, struct cmd_token **argv, DEFUN (ip_extcommunity_list_standard, ip_extcommunity_list_standard_cmd, - "ip extcommunity-list <(1-99)|standard WORD> [.AA:NN]", + "ip extcommunity-list <(1-99)|standard WORD> AA:NN...", IP_STR EXTCOMMUNITY_LIST_STR "Extended Community list number (standard)\n" @@ -11547,7 +11547,7 @@ DEFUN (ip_extcommunity_list_standard, DEFUN (ip_extcommunity_list_name_expanded, ip_extcommunity_list_name_expanded_cmd, - "ip extcommunity-list <(100-500)|expanded WORD> [.LINE]", + "ip extcommunity-list <(100-500)|expanded WORD> LINE...", IP_STR EXTCOMMUNITY_LIST_STR "Extended Community list number (expanded)\n" @@ -11562,7 +11562,7 @@ DEFUN (ip_extcommunity_list_name_expanded, DEFUN (no_ip_extcommunity_list_standard_all, no_ip_extcommunity_list_standard_all_cmd, - "no ip extcommunity-list <(1-99)|standard WORD> [.AA:NN]", + "no ip extcommunity-list <(1-99)|standard WORD> AA:NN...", NO_STR IP_STR EXTCOMMUNITY_LIST_STR @@ -11578,7 +11578,7 @@ DEFUN (no_ip_extcommunity_list_standard_all, DEFUN (no_ip_extcommunity_list_expanded_all, no_ip_extcommunity_list_expanded_all_cmd, - "no ip extcommunity-list <(100-500)|expanded WORD> [.LINE]", + "no ip extcommunity-list <(100-500)|expanded WORD> LINE...", NO_STR IP_STR EXTCOMMUNITY_LIST_STR diff --git a/lib/filter.c b/lib/filter.c index 40bf0a339..11dd7cd1c 100644 --- a/lib/filter.c +++ b/lib/filter.c @@ -1470,7 +1470,7 @@ DEFUN (no_access_list_all, DEFUN (access_list_remark, access_list_remark_cmd, - "access-list <(1-99)|(100-199)|(1300-1999)|(2000-2699)|WORD> remark .LINE", + "access-list <(1-99)|(100-199)|(1300-1999)|(2000-2699)|WORD> remark LINE...", "Add an access list entry\n" "IP standard access list\n" "IP extended access list\n" @@ -1666,7 +1666,7 @@ DEFUN (no_ipv6_access_list_all, DEFUN (ipv6_access_list_remark, ipv6_access_list_remark_cmd, - "ipv6 access-list WORD remark .LINE", + "ipv6 access-list WORD remark LINE...", IPV6_STR "Add an access list entry\n" "IPv6 zebra access-list\n" diff --git a/lib/plist.c b/lib/plist.c index 5911d6cf7..0d1cafde6 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -1898,7 +1898,7 @@ DEFUN (no_ip_prefix_list_sequence_number, DEFUN (ip_prefix_list_description, ip_prefix_list_description_cmd, - "ip prefix-list WORD description .LINE", + "ip prefix-list WORD description LINE...", IP_STR PREFIX_LIST_STR "Name of a prefix list\n" @@ -2609,7 +2609,7 @@ DEFUN (no_ipv6_prefix_list_sequence_number, DEFUN (ipv6_prefix_list_description, ipv6_prefix_list_description_cmd, - "ipv6 prefix-list WORD description .LINE", + "ipv6 prefix-list WORD description LINE...", IPV6_STR PREFIX_LIST_STR "Name of a prefix list\n" diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index 52302a646..f1c275352 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -4160,7 +4160,7 @@ static struct igmp_sock *find_igmp_sock_by_fd(int fd) DEFUN (test_igmp_receive_report, test_igmp_receive_report_cmd, - "test igmp receive report (0-65535) A.B.C.D (1-6) .LINE", + "test igmp receive report (0-65535) A.B.C.D (1-6) LINE...", "Test\n" "Test IGMP protocol\n" "Test IGMP message\n" @@ -4276,7 +4276,7 @@ static int hexval(uint8_t ch) DEFUN (test_pim_receive_dump, test_pim_receive_dump_cmd, - "test pim receive dump INTERFACE A.B.C.D .LINE", + "test pim receive dump INTERFACE A.B.C.D LINE...", "Test\n" "Test PIM protocol\n" "Test PIM message reception\n" diff --git a/tests/heavy-thread.c b/tests/heavy-thread.c index c2e71c17d..c43fa76c0 100644 --- a/tests/heavy-thread.c +++ b/tests/heavy-thread.c @@ -104,7 +104,7 @@ clear_something (struct thread *thread) DEFUN (clear_foo, clear_foo_cmd, - "clear foo .LINE", + "clear foo LINE...", "clear command\n" "arbitrary string\n") { diff --git a/tests/heavy-wq.c b/tests/heavy-wq.c index 2d15dc37b..97371face 100644 --- a/tests/heavy-wq.c +++ b/tests/heavy-wq.c @@ -140,7 +140,7 @@ clear_something (struct vty *vty, const char *str) DEFUN (clear_foo, clear_foo_cmd, - "clear foo .LINE", + "clear foo LINE...", "clear command\n" "arbitrary string\n") { diff --git a/tests/heavy.c b/tests/heavy.c index 9af46c88f..6ba8d9aa6 100644 --- a/tests/heavy.c +++ b/tests/heavy.c @@ -82,7 +82,7 @@ clear_something (struct vty *vty, const char *str) DEFUN (clear_foo, clear_foo_cmd, - "clear foo .LINE", + "clear foo LINE...", "clear command\n" "arbitrary string\n") { diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 05fb03818..e6aebd6b1 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -1700,7 +1700,7 @@ ALIAS (vtysh_exit_vrf, * and isisd. */ DEFSH (VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_OSPFD, interface_desc_cmd, - "description .LINE", + "description LINE...", "Interface specific description\n" "Characters describing this interface\n") diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index a9f0e8701..88036f44b 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -1562,7 +1562,7 @@ DEFUN (show_ip_route_supernets, DEFUN (show_ip_route_protocol, show_ip_route_protocol_cmd, - "show ip route [vrf NAME] " QUAGGA_IP_REDIST_STR_ZEBRA, + "show ip route [vrf NAME] ", SHOW_STR IP_STR "IP routing table\n" @@ -2163,7 +2163,7 @@ DEFUN (show_ip_route_vrf_all_supernets, DEFUN (show_ip_route_vrf_all_protocol, show_ip_route_vrf_all_protocol_cmd, - "show ip route vrf all " QUAGGA_IP_REDIST_STR_ZEBRA, + "show ip route vrf all ", SHOW_STR IP_STR "IP routing table\n" -- cgit v1.2.3 From b62ecea584664417f78d13d5658e3800b86abdfe Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Wed, 28 Sep 2016 04:47:43 +0000 Subject: zebra: finish all zebra CHECK ME's Signed-off-by: Quentin Young --- zebra/interface.c | 201 ++++++++++++++++------------------------- zebra/zebra_vty.c | 261 +++++++++++++++--------------------------------------- 2 files changed, 147 insertions(+), 315 deletions(-) (limited to 'zebra') diff --git a/zebra/interface.c b/zebra/interface.c index c1fbc9cdd..676b6ed0d 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1298,19 +1298,12 @@ struct cmd_node vrf_node = }; /* Show all interfaces to vty. */ -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show interface vrf NAME", - * SHOW_STR - * "Interface status and configuration\n" - * VRF_CMD_HELP_STR - * - */ DEFUN (show_interface, show_interface_cmd, - "show interface", + "show interface [vrf NAME]", SHOW_STR - "Interface status and configuration\n") + "Interface status and configuration\n" + VRF_CMD_HELP_STR) { struct listnode *node; struct interface *ifp; @@ -1318,8 +1311,8 @@ DEFUN (show_interface, interface_update_stats (); - if (argc > 0) - VRF_GET_ID (vrf_id, argv[2]->arg); + if (argc > 2) + VRF_GET_ID (vrf_id, argv[3]->arg); /* All interface print. */ for (ALL_LIST_ELEMENTS_RO (vrf_iflist (vrf_id), node, ifp)) @@ -1385,17 +1378,9 @@ DEFUN (show_interface_name_vrf, } /* Show specified interface to vty. */ -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show interface IFNAME", - * SHOW_STR - * "Interface status and configuration\n" - * "Interface name\n" - * - */ DEFUN (show_interface_name_vrf_all, show_interface_name_vrf_all_cmd, - "show interface IFNAME vrf all", + "show interface IFNAME [vrf all]", SHOW_STR "Interface status and configuration\n" "Interface name\n" @@ -1470,26 +1455,18 @@ if_show_description (struct vty *vty, vrf_id_t vrf_id) } } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show interface description vrf NAME", - * SHOW_STR - * "Interface status and configuration\n" - * "Interface description\n" - * VRF_CMD_HELP_STR - * - */ DEFUN (show_interface_desc, show_interface_desc_cmd, - "show interface description", + "show interface description [vrf NAME]", SHOW_STR "Interface status and configuration\n" - "Interface description\n") + "Interface description\n" + VRF_CMD_HELP_STR) { vrf_id_t vrf_id = VRF_DEFAULT; - if (argc > 0) - VRF_GET_ID (vrf_id, argv[3]->arg); + if (argc > 3) + VRF_GET_ID (vrf_id, argv[4]->arg); if_show_description (vty, vrf_id); @@ -1704,19 +1681,12 @@ DEFUN (bandwidth_if, return CMD_SUCCESS; } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no bandwidth <1-100000>", - * NO_STR - * "Set bandwidth informational parameter\n" - * "Bandwidth in megabits\n" - * - */ DEFUN (no_bandwidth_if, no_bandwidth_if_cmd, - "no bandwidth", + "no bandwidth [(1-100000)]", NO_STR - "Set bandwidth informational parameter\n") + "Set bandwidth informational parameter\n" + "Bandwidth in megabits\n") { struct interface *ifp; @@ -2100,93 +2070,79 @@ DEFUN (no_link_params_inter_as, } /* RFC7471: OSPF Traffic Engineering (TE) Metric extensions & draft-ietf-isis-metric-extensions-07.txt */ -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "delay <0-16777215> min <0-16777215> max <0-16777215>", - * "Unidirectional Average Link Delay (optionally Minimum and Maximum delays)\n" - * "Average delay in micro-second as decimal (0...16777215)\n" - * "Minimum delay\n" - * "Minimum delay in micro-second as decimal (0...16777215)\n" - * "Maximum delay\n" - * "Maximum delay in micro-second as decimal (0...16777215)\n" - * - */ DEFUN (link_params_delay, link_params_delay_cmd, - "delay (0-16777215)", + "delay (0-16777215) [min (0-16777215) max (0-16777215)]", "Unidirectional Average Link Delay\n" - "Average delay in micro-second as decimal (0...16777215)\n") + "Average delay in micro-second as decimal (0...16777215)\n" + "Minimum delay\n" + "Minimum delay in micro-second as decimal (0...16777215)\n" + "Maximum delay\n" + "Maximum delay in micro-second as decimal (0...16777215)\n") { - int idx_number = 1; + /* Get and Check new delay values */ + u_int32_t delay = 0, low = 0, high = 0; + VTY_GET_ULONG("delay", delay, argv[1]->arg); + if (argc == 6) + { + VTY_GET_ULONG("minimum delay", low, argv[3]->arg); + VTY_GET_ULONG("maximum delay", high, argv[5]->arg); + } struct interface *ifp = (struct interface *) vty->index; struct if_link_params *iflp = if_link_params_get (ifp); - u_int32_t delay = 0, low = 0, high = 0; u_int8_t update = 0; - /* Get and Check new delay values */ - VTY_GET_ULONG("delay", delay, argv[idx_number]->arg); - switch (argc) - { - case 1: - /* Check new delay value against old Min and Max delays if set */ - if (IS_PARAM_SET(iflp, LP_MM_DELAY) - && (delay <= iflp->min_delay || delay >= iflp->max_delay)) - { - vty_out (vty, "Average delay should be comprise between Min (%d) and Max (%d) delay%s", - iflp->min_delay, iflp->max_delay, VTY_NEWLINE); - return CMD_WARNING; - } - /* Update delay if value is not set or change */ - if (IS_PARAM_UNSET(iflp, LP_DELAY)|| iflp->av_delay != delay) - { - iflp->av_delay = delay; - SET_PARAM(iflp, LP_DELAY); - update = 1; - } - /* Unset Min and Max delays if already set */ - if (IS_PARAM_SET(iflp, LP_MM_DELAY)) - { - iflp->min_delay = 0; - iflp->max_delay = 0; - UNSET_PARAM(iflp, LP_MM_DELAY); - update = 1; - } - break; - case 2: - vty_out (vty, "You should specify both Minimum and Maximum delay with Average delay%s", - VTY_NEWLINE); - return CMD_WARNING; - break; - case 3: - VTY_GET_ULONG("minimum delay", low, argv[3]->arg); - VTY_GET_ULONG("maximum delay", high, argv[5]->arg); - /* Check new delays value coherency */ - if (delay <= low || delay >= high) - { - vty_out (vty, "Average delay should be comprise between Min (%d) and Max (%d) delay%s", - low, high, VTY_NEWLINE); - return CMD_WARNING; - } - /* Update Delays if needed */ - if (IS_PARAM_UNSET(iflp, LP_DELAY) - || IS_PARAM_UNSET(iflp, LP_MM_DELAY) - || iflp->av_delay != delay - || iflp->min_delay != low - || iflp->max_delay != high) - { - iflp->av_delay = delay; - SET_PARAM(iflp, LP_DELAY); - iflp->min_delay = low; - iflp->max_delay = high; - SET_PARAM(iflp, LP_MM_DELAY); - update = 1; - } - break; - default: - return CMD_WARNING; - break; - } + if (argc == 2) + { + /* Check new delay value against old Min and Max delays if set */ + if (IS_PARAM_SET(iflp, LP_MM_DELAY) + && (delay <= iflp->min_delay || delay >= iflp->max_delay)) + { + vty_out (vty, "Average delay should be comprise between Min (%d) and Max (%d) delay%s", + iflp->min_delay, iflp->max_delay, VTY_NEWLINE); + return CMD_WARNING; + } + /* Update delay if value is not set or change */ + if (IS_PARAM_UNSET(iflp, LP_DELAY)|| iflp->av_delay != delay) + { + iflp->av_delay = delay; + SET_PARAM(iflp, LP_DELAY); + update = 1; + } + /* Unset Min and Max delays if already set */ + if (IS_PARAM_SET(iflp, LP_MM_DELAY)) + { + iflp->min_delay = 0; + iflp->max_delay = 0; + UNSET_PARAM(iflp, LP_MM_DELAY); + update = 1; + } + } + else + { + /* Check new delays value coherency */ + if (delay <= low || delay >= high) + { + vty_out (vty, "Average delay should be comprise between Min (%d) and Max (%d) delay%s", + low, high, VTY_NEWLINE); + return CMD_WARNING; + } + /* Update Delays if needed */ + if (IS_PARAM_UNSET(iflp, LP_DELAY) + || IS_PARAM_UNSET(iflp, LP_MM_DELAY) + || iflp->av_delay != delay + || iflp->min_delay != low + || iflp->max_delay != high) + { + iflp->av_delay = delay; + SET_PARAM(iflp, LP_DELAY); + iflp->min_delay = low; + iflp->max_delay = high; + SET_PARAM(iflp, LP_MM_DELAY); + update = 1; + } + } /* force protocols to update LINK STATE due to parameters change */ if (update == 1 && if_is_operative (ifp)) @@ -2195,7 +2151,6 @@ DEFUN (link_params_delay, return CMD_SUCCESS; } - DEFUN (no_link_params_delay, no_link_params_delay_cmd, "no delay", diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 88036f44b..ddcffb5d4 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -181,19 +181,9 @@ zebra_static_ipv4 (struct vty *vty, safi_t safi, int add_cmd, } /* Static unicast routes for multicast RPF lookup. */ -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "ip mroute A.B.C.D/M (A.B.C.D|INTERFACE)", - * IP_STR - * "Configure static unicast route into MRIB for multicast RPF lookup\n" - * "IP destination prefix (e.g. 10.0.0.0/8)\n" - * "Nexthop address\n" - * "Nexthop interface name\n" - * - */ DEFUN (ip_mroute_dist, ip_mroute_dist_cmd, - "ip mroute A.B.C.D/M (1-255)", + "ip mroute A.B.C.D/M [(1-255)]", IP_STR "Configure static unicast route into MRIB for multicast RPF lookup\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -201,27 +191,16 @@ DEFUN (ip_mroute_dist, "Nexthop interface name\n" "Distance\n") { - int idx_ipv4_prefixlen = 2; - int idx_ipv4_ifname = 3; - int idx_number = 4; - return zebra_static_ipv4 (vty, SAFI_MULTICAST, 1, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, NULL, NULL, argc > 2 ? argv[idx_number]->arg : NULL, NULL); -} + char *destprefix = argv[2]->arg; + char *nexthop = argv[3]->arg; + char *distance = (argc == 5) ? argv[4]->arg : NULL; + return zebra_static_ipv4 (vty, SAFI_MULTICAST, 1, destprefix, NULL, nexthop, NULL, NULL, distance, NULL); +} -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no ip mroute A.B.C.D/M (A.B.C.D|INTERFACE)", - * NO_STR - * IP_STR - * "Configure static unicast route into MRIB for multicast RPF lookup\n" - * "IP destination prefix (e.g. 10.0.0.0/8)\n" - * "Nexthop address\n" - * "Nexthop interface name\n" - * - */ DEFUN (no_ip_mroute_dist, no_ip_mroute_dist_cmd, - "no ip mroute A.B.C.D/M (1-255)", + "no ip mroute A.B.C.D/M [(1-255)]", IP_STR "Configure static unicast route into MRIB for multicast RPF lookup\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -229,12 +208,12 @@ DEFUN (no_ip_mroute_dist, "Nexthop interface name\n" "Distance\n") { - int idx_ipv4_prefixlen = 3; - int idx_ipv4_ifname = 4; - int idx_number = 5; - return zebra_static_ipv4 (vty, SAFI_MULTICAST, 0, argv[idx_ipv4_prefixlen]->arg, NULL, argv[idx_ipv4_ifname]->arg, NULL, NULL, argc > 2 ? argv[idx_number]->arg : NULL, NULL); -} + char *destprefix = argv[2]->arg; + char *nexthop = argv[3]->arg; + char *distance = (argc == 5) ? argv[4]->arg : NULL; + return zebra_static_ipv4 (vty, SAFI_MULTICAST, 0, destprefix, NULL, nexthop, NULL, NULL, distance, NULL); +} DEFUN (ip_multicast_mode, ip_multicast_mode_cmd, @@ -248,17 +227,17 @@ DEFUN (ip_multicast_mode, "Lookup both, use entry with lower distance\n" "Lookup both, use entry with longer prefix\n") { - int idx_rpf_lookup_mode = 3; + char *mode = argv[3]->text; - if (!strncmp (argv[idx_rpf_lookup_mode]->arg, "u", 1)) + if (strmatch (mode, "urib-only")) multicast_mode_ipv4_set (MCAST_URIB_ONLY); - else if (!strncmp (argv[idx_rpf_lookup_mode]->arg, "mrib-o", 6)) + else if (strmatch (mode, "mrib-only")) multicast_mode_ipv4_set (MCAST_MRIB_ONLY); - else if (!strncmp (argv[idx_rpf_lookup_mode]->arg, "mrib-t", 6)) + else if (strmatch (mode, "mrib-then-urib")) multicast_mode_ipv4_set (MCAST_MIX_MRIB_FIRST); - else if (!strncmp (argv[idx_rpf_lookup_mode]->arg, "low", 3)) + else if (strmatch (mode, "lower-distance")) multicast_mode_ipv4_set (MCAST_MIX_DISTANCE); - else if (!strncmp (argv[idx_rpf_lookup_mode]->arg, "lon", 3)) + else if (strmatch (mode, "longer-prefix")) multicast_mode_ipv4_set (MCAST_MIX_PFXLEN); else { @@ -269,18 +248,9 @@ DEFUN (ip_multicast_mode, return CMD_SUCCESS; } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no ip multicast rpf-lookup-mode", - * NO_STR - * IP_STR - * "Multicast options\n" - * "RPF lookup behavior\n" - * - */ DEFUN (no_ip_multicast_mode, no_ip_multicast_mode_cmd, - "no ip multicast rpf-lookup-mode ", + "no ip multicast rpf-lookup-mode []", NO_STR IP_STR "Multicast options\n" @@ -2776,23 +2746,15 @@ DEFUN (no_ipv6_route_ifname_flags, tag, distance, vrf); } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ipv6 route " VRF_CMD_STR " [json]", - * SHOW_STR - * IP_STR - * "IPv6 routing table\n" - * VRF_CMD_HELP_STR - * - */ DEFUN (show_ipv6_route, show_ipv6_route_cmd, - "show ipv6 route [json]", + "show ipv6 route [vrf NAME] [json]", SHOW_STR IP_STR - "IPv6 routing table\n") + "IPv6 routing table\n" + VRF_CMD_HELP_STR + "Output JSON\n") { - int idx_json = 3; struct route_table *table; struct route_node *rn; struct rib *rib; @@ -2802,33 +2764,36 @@ DEFUN (show_ipv6_route, char buf[BUFSIZ]; json_object *json = NULL; json_object *json_prefix = NULL; - u_char uj = use_json(argc, argv); - if (argc > 0 && argv[idx_json]->arg && strcmp(argv[idx_json]->arg, "json") != 0) - { - if (!(zvrf = zebra_vrf_list_lookup_by_name (argv[idx_json]->arg))) - { - if (uj) - vty_out (vty, "{}%s", VTY_NEWLINE); - else - vty_out (vty, "vrf %s not defined%s", argv[idx_json]->arg, VTY_NEWLINE); - return CMD_SUCCESS; - } + int vrf = (argc > 3 && strmatch (argv[3]->text, "vrf")); + int uj = vrf ? argc == 6 : argc == 4; + char *vrfname = vrf ? argv[4]->arg : NULL; - if (zvrf->vrf_id == VRF_UNKNOWN) - { - if (uj) - vty_out (vty, "{}%s", VTY_NEWLINE); - else - vty_out (vty, "vrf %s inactive%s", argv[idx_json]->arg, VTY_NEWLINE); - return CMD_SUCCESS; - } - else - vrf_id = zvrf->vrf_id; - } + if (vrf) + { + if (!(zvrf = zebra_vrf_list_lookup_by_name (vrfname))) + { + if (uj) + vty_out (vty, "{}%s", VTY_NEWLINE); + else + vty_out (vty, "vrf %s not defined%s", vrfname, VTY_NEWLINE); + return CMD_SUCCESS; + } + + if (zvrf->vrf_id == VRF_UNKNOWN) + { + if (uj) + vty_out (vty, "{}%s", VTY_NEWLINE); + else + vty_out (vty, "vrf %s inactive%s", vrfname, VTY_NEWLINE); + return CMD_SUCCESS; + } + else + vrf_id = zvrf->vrf_id; + } table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id); - if (! table) + if (!table) { if (uj) vty_out (vty, "{}%s", VTY_NEWLINE); @@ -2981,26 +2946,15 @@ DEFUN (show_ipv6_route_prefix_longer, return CMD_SUCCESS; } - -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "show ipv6 route " VRF_CMD_STR " " QUAGGA_IP6_REDIST_STR_ZEBRA, - * SHOW_STR - * IP_STR - * "IP routing table\n" - * VRF_CMD_HELP_STR - * QUAGGA_IP6_REDIST_HELP_STR_ZEBRA - * - */ DEFUN (show_ipv6_route_protocol, show_ipv6_route_protocol_cmd, - "show ipv6 route ", + "show ipv6 route [vrf NAME] ", SHOW_STR IP_STR "IP routing table\n" + VRF_CMD_HELP_STR QUAGGA_IP6_REDIST_HELP_STR_ZEBRA) { - int idx_protocol = 3; int type; struct route_table *table; struct route_node *rn; @@ -3008,13 +2962,16 @@ DEFUN (show_ipv6_route_protocol, int first = 1; vrf_id_t vrf_id = VRF_DEFAULT; - if ( argc >1 ) + char *vrfname = (argc == 6) ? argv[4]->arg : NULL; + char *proto = argv[argc - 1]->text; + + if (vrfname) { - VRF_GET_ID (vrf_id, argv[4]->arg); - type = proto_redistnum (AFI_IP6, argv[idx_protocol]->arg); + VRF_GET_ID (vrf_id, vrfname); + type = proto_redistnum (AFI_IP6, proto); } else - type = proto_redistnum (AFI_IP6, argv[4]->arg); + type = proto_redistnum (AFI_IP6, proto); if (type < 0) { @@ -3731,65 +3688,9 @@ zebra_ip_config (struct vty *vty) return write; } -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "ip import-table <1-252>", - * IP_STR - * "import routes from non-main kernel table\n" - * "kernel routing table id\n" - * - */ DEFUN (ip_zebra_import_table_distance, ip_zebra_import_table_distance_cmd, - "ip import-table (1-252) distance (1-255)", - IP_STR - "import routes from non-main kernel table\n" - "kernel routing table id\n" - "Distance for imported routes\n" - "Default distance value\n") -{ - int idx_number = 2; - int idx_number_2 = 4; - u_int32_t table_id = 0; - int distance = ZEBRA_TABLE_DISTANCE_DEFAULT; - - if (argc) - VTY_GET_INTEGER("table", table_id, argv[idx_number]->arg); - - if (!is_zebra_valid_kernel_table(table_id)) - { - vty_out(vty, "Invalid routing table ID, %d. Must be in range 1-252%s", - table_id, VTY_NEWLINE); - return CMD_WARNING; - } - - if (is_zebra_main_routing_table(table_id)) - { - vty_out(vty, "Invalid routing table ID, %d. Must be non-default table%s", - table_id, VTY_NEWLINE); - return CMD_WARNING; - } - - if (argc > 1) - VTY_GET_INTEGER_RANGE("distance", distance, argv[idx_number_2]->arg, 1, 255); - return (zebra_import_table(AFI_IP, table_id, distance, NULL, 1)); - -} - - -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "ip import-table <1-252> route-map WORD", - * IP_STR - * "import routes from non-main kernel table\n" - * "kernel routing table id\n" - * "route-map for filtering\n" - * "route-map name\n" - * - */ -DEFUN (ip_zebra_import_table_distance_routemap, - ip_zebra_import_table_distance_routemap_cmd, - "ip import-table (1-252) distance (1-255) route-map WORD", + "ip import-table (1-252) [distance (1-255)] [route-map WORD>]", IP_STR "import routes from non-main kernel table\n" "kernel routing table id\n" @@ -3798,15 +3699,14 @@ DEFUN (ip_zebra_import_table_distance_routemap, "route-map for filtering\n" "route-map name\n") { - int idx_number = 2; - int idx_number_2 = 4; - int idx_word = 6; u_int32_t table_id = 0; - int distance = ZEBRA_TABLE_DISTANCE_DEFAULT; - const char *rmap_name; - if (argc) - VTY_GET_INTEGER("table", table_id, argv[idx_number]->arg); + VTY_GET_INTEGER("table", table_id, argv[2]->arg); + int distance = ZEBRA_TABLE_DISTANCE_DEFAULT; + char *rmap = strmatch (argv[argc - 2]->text, "route-map") ? + XSTRDUP(MTYPE_ROUTE_MAP_NAME, argv[argc - 1]->arg) : NULL; + if (argc == 7 || (argc == 5 && !rmap)) + VTY_GET_INTEGER_RANGE("distance", distance, argv[4]->arg, 1, 255); if (!is_zebra_valid_kernel_table(table_id)) { @@ -3818,44 +3718,23 @@ DEFUN (ip_zebra_import_table_distance_routemap, if (is_zebra_main_routing_table(table_id)) { vty_out(vty, "Invalid routing table ID, %d. Must be non-default table%s", - table_id, VTY_NEWLINE); + table_id, VTY_NEWLINE); return CMD_WARNING; } - if (argc > 2) - { - VTY_GET_INTEGER_RANGE("distance", distance, argv[idx_number_2]->arg, 1, 255); - rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[idx_word]->arg); - } - else - rmap_name = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[idx_number_2]->arg); - - return (zebra_import_table(AFI_IP, table_id, distance, rmap_name, 1)); + return (zebra_import_table(AFI_IP, table_id, distance, rmap, 1)); } - -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no ip import-table <1-252> distance <1-255> {route-map NAME}", - * IP_STR - * "import routes from non-main kernel table to main table" - * "kernel routing table id\n" - * "distance to be used\n" - * - */ DEFUN (no_ip_zebra_import_table, no_ip_zebra_import_table_cmd, - "no ip import-table (1-252) [route-map NAME]", + "no ip import-table (1-252) [distance (1-255)] [route-map NAME]", NO_STR IP_STR "import routes from non-main kernel table\n" "kernel routing table id\n") { - int idx_number = 3; u_int32_t table_id = 0; - - if (argc) - VTY_GET_INTEGER("table", table_id, argv[idx_number]->arg); + VTY_GET_INTEGER("table", table_id, argv[3]->arg); if (!is_zebra_valid_kernel_table(table_id)) { @@ -3877,7 +3756,6 @@ DEFUN (no_ip_zebra_import_table, return (zebra_import_table(AFI_IP, table_id, 0, NULL, 0)); } - static int config_write_protocol (struct vty *vty) { @@ -3934,7 +3812,6 @@ zebra_vty_init (void) install_element (CONFIG_NODE, &no_ip_route_mask_cmd); install_element (CONFIG_NODE, &no_ip_route_mask_flags2_cmd); install_element (CONFIG_NODE, &ip_zebra_import_table_distance_cmd); - install_element (CONFIG_NODE, &ip_zebra_import_table_distance_routemap_cmd); install_element (CONFIG_NODE, &no_ip_zebra_import_table_cmd); install_element (VIEW_NODE, &show_vrf_cmd); -- cgit v1.2.3 From 67656e9b65ab7c6bb979be72b4917cfd4a2241b6 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Thu, 29 Sep 2016 17:48:57 +0000 Subject: all: added CHECK ME for DEFUNs that look at argc Signed-off-by: Daniel Walton --- bgpd/bgp_dump.c | 1 + bgpd/bgp_filter.c | 2 ++ bgpd/bgp_mplsvpn.c | 4 ++++ bgpd/bgp_route.c | 14 ++++++++++++++ bgpd/bgp_routemap.c | 27 +++++++++++++++++++++++++++ bgpd/bgp_vty.c | 27 +++++++++++++++++++++++++++ isisd/isis_redist.c | 3 +++ isisd/isis_routemap.c | 5 +++++ isisd/isis_te.c | 1 + isisd/isis_vty.c | 2 ++ isisd/isisd.c | 1 + lib/command.c | 11 +++++++++++ lib/distribute.c | 2 ++ lib/filter.c | 4 ++++ lib/grammar_sandbox.c | 3 +++ lib/if.c | 3 +++ lib/plist.c | 4 ++++ lib/routemap.c | 5 +++++ lib/thread.c | 2 ++ lib/vty.c | 3 +++ ospf6d/ospf6_area.c | 4 ++++ ospf6d/ospf6_asbr.c | 1 + ospf6d/ospf6_interface.c | 4 ++++ ospf6d/ospf6_lsa.c | 2 ++ ospf6d/ospf6_message.c | 2 ++ ospf6d/ospf6_neighbor.c | 3 +++ ospf6d/ospf6_spf.c | 1 + ospf6d/ospf6_top.c | 6 ++++++ ospf6d/ospf6_zebra.c | 2 ++ ospf6d/ospf6d.c | 17 +++++++++++++++++ ospfd/ospf_dump.c | 16 ++++++++++++++++ ospfd/ospf_opaque.c | 2 ++ ospfd/ospf_ri.c | 1 + ospfd/ospf_routemap.c | 9 +++++++++ ospfd/ospf_te.c | 1 + pimd/pim_cmd.c | 6 ++++++ ripd/rip_interface.c | 1 + ripd/rip_routemap.c | 9 +++++++++ ripngd/ripng_routemap.c | 6 ++++++ tools/argv_translator.py | 14 ++++++++++++++ vtysh/vtysh.c | 2 ++ zebra/interface.c | 4 ++++ zebra/router-id.c | 2 ++ zebra/rtadv.c | 1 + zebra/test_main.c | 1 + zebra/zebra_routemap.c | 14 ++++++++++++++ zebra/zebra_vty.c | 29 +++++++++++++++++++++++++++++ 47 files changed, 284 insertions(+) (limited to 'zebra') diff --git a/bgpd/bgp_dump.c b/bgpd/bgp_dump.c index 48c43b7f6..cb2dd931d 100644 --- a/bgpd/bgp_dump.c +++ b/bgpd/bgp_dump.c @@ -736,6 +736,7 @@ DEFUN (dump_bgp_all, "Output filename\n" "Interval of output\n") { + /* CHECK ME argc referenced below */ int idx_dump_routes = 2; int idx_path = 3; int idx_interval = 4; diff --git a/bgpd/bgp_filter.c b/bgpd/bgp_filter.c index 5af840810..255f6c2b6 100644 --- a/bgpd/bgp_filter.c +++ b/bgpd/bgp_filter.c @@ -437,6 +437,7 @@ DEFUN (ip_as_path, "Specify packets to forward\n" "A regular-expression to match the BGP AS paths\n") { + /* CHECK ME argc referenced below */ int idx_word = 3; int idx_permit_deny = 4; enum as_filter_type type; @@ -496,6 +497,7 @@ DEFUN (no_ip_as_path, "Specify packets to forward\n" "A regular-expression to match the BGP AS paths\n") { + /* CHECK ME argc referenced below */ int idx_word = 4; int idx_permit_deny = 5; enum as_filter_type type; diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c index 48baedcea..03d712e71 100644 --- a/bgpd/bgp_mplsvpn.c +++ b/bgpd/bgp_mplsvpn.c @@ -924,6 +924,7 @@ DEFUN (show_ip_bgp_vpnv4_all_neighbor_routes, "Display routes learned from neighbor\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_ipv4 = 6; union sockunion su; struct peer *peer; @@ -979,6 +980,7 @@ DEFUN (show_ip_bgp_vpnv4_rd_neighbor_routes, "Display routes learned from neighbor\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_ext_community = 5; int idx_ipv4 = 7; int ret; @@ -1051,6 +1053,7 @@ DEFUN (show_ip_bgp_vpnv4_all_neighbor_advertised_routes, "Display the routes advertised to a BGP neighbor\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_ipv4 = 6; int ret; struct peer *peer; @@ -1105,6 +1108,7 @@ DEFUN (show_ip_bgp_vpnv4_rd_neighbor_advertised_routes, "Display the routes advertised to a BGP neighbor\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_ext_community = 5; int idx_ipv4 = 7; int ret; diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 68a1ca7a3..ac2d0ffc7 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -7772,6 +7772,7 @@ DEFUN (show_ip_bgp_ipv4, "Display route and more specific routes\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_view_vrf = 3; int idx_vrf = 4; int idx_afi; @@ -7879,6 +7880,7 @@ DEFUN (show_ip_bgp_route, "Display only multipaths\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_view_vrf = 3; int idx_vrf = 4; int idx_afi; @@ -7930,6 +7932,7 @@ DEFUN (show_ip_bgp_instance_all, BGP_INSTANCE_ALL_HELP_STR "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ u_char uj = use_json(argc, argv); /* CHECK ME we need to revisit all of the bgp_show_all_ commands */ @@ -7945,6 +7948,7 @@ DEFUN (show_bgp_instance_all, BGP_INSTANCE_ALL_HELP_STR "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ u_char uj = use_json(argc, argv); bgp_show_all_instances_routes_vty (vty, AFI_IP6, SAFI_UNICAST, uj); @@ -8861,6 +8865,7 @@ DEFUN (show_ip_bgp_neighbor_prefix_counts, "Display detailed prefix count information\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_peer = 4; struct peer *peer; u_char uj = use_json(argc, argv); @@ -8886,6 +8891,7 @@ DEFUN (show_ip_bgp_instance_neighbor_prefix_counts, "Display detailed prefix count information\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_word = 4; int idx_peer = 6; struct peer *peer; @@ -8911,6 +8917,7 @@ DEFUN (show_bgp_ipv6_neighbor_prefix_counts, "Display detailed prefix count information\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_peer = 4; struct peer *peer; u_char uj = use_json(argc, argv); @@ -8936,6 +8943,7 @@ DEFUN (show_bgp_instance_ipv6_neighbor_prefix_counts, "Display detailed prefix count information\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_word = 3; int idx_peer = 6; struct peer *peer; @@ -8964,6 +8972,7 @@ DEFUN (show_ip_bgp_ipv4_neighbor_prefix_counts, "Display detailed prefix count information\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_safi = 4; int idx_peer = 6; struct peer *peer; @@ -8995,6 +9004,7 @@ DEFUN (show_ip_bgp_vpnv4_neighbor_prefix_counts, "Display detailed prefix count information\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_peer = 6; struct peer *peer; u_char uj = use_json(argc, argv); @@ -9271,6 +9281,7 @@ DEFUN (show_ip_bgp_instance_neighbor_advertised_route, "Name of the route map\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_view_vrf = 3; int idx_vrf = 4; int idx_afi = 5; @@ -9333,6 +9344,7 @@ DEFUN (show_ip_bgp_neighbor_received_prefix_filter, "Display the prefixlist filter\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_view_vrf = 3; int idx_vrf = 4; int idx_afi; @@ -9442,6 +9454,7 @@ DEFUN (show_ip_bgp_neighbor_routes, "Display flap statistics of the routes learned from neighbor\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_view_vrf = 3; int idx_vrf = 4; int idx_afi; @@ -9779,6 +9792,7 @@ DEFUN (bgp_damp_set, "Value to start suppressing a route\n" "Maximum duration to suppress a stable route\n") { + /* CHECK ME argc referenced below */ int idx_half_life = 2; int idx_reuse = 3; int idx_suppress = 4; diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index dff42ec0d..7e1e20458 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -3026,6 +3026,7 @@ DEFUN (no_match_peer, "IP address of peer\n" "IPv6 address of peer\n") { + /* CHECK ME argc referenced below */ int idx_peer = 3; if (argc <= idx_peer) @@ -3064,6 +3065,7 @@ DEFUN (no_match_ip_address, "IP access-list number (expanded range)\n" "IP Access-list name\n") { + /* CHECK ME argc referenced below */ int idx_word = 4; if (argc <= idx_word) return bgp_route_match_delete (vty, vty->index, "ip address", NULL, @@ -3100,6 +3102,7 @@ DEFUN (no_match_ip_next_hop, "IP access-list number (expanded range)\n" "IP Access-list name\n") { + /* CHECK ME argc referenced below */ int idx_word = 4; if (argc <= idx_word) return bgp_route_match_delete (vty, vty->index, "ip next-hop", NULL, @@ -3131,6 +3134,7 @@ DEFUN (no_match_probability, "Match portion of routes defined by percentage value\n" "Percentage of routes\n") { + /* CHECK ME argc referenced below */ int idx_number = 3; if (argc <= idx_number) return bgp_route_match_delete (vty, vty->index, "probability", NULL, @@ -3167,6 +3171,7 @@ DEFUN (no_match_ip_route_source, "IP access-list number (expanded range)\n" "IP standard access-list name\n") { + /* CHECK ME argc referenced below */ int idx_number = 4; if (argc <= idx_number) return bgp_route_match_delete (vty, vty->index, "ip route-source", @@ -3201,6 +3206,7 @@ DEFUN (no_match_ip_address_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { + /* CHECK ME argc referenced below */ int idx_word = 5; if (argc <= idx_word) return bgp_route_match_delete (vty, vty->index, "ip address prefix-list", @@ -3234,6 +3240,7 @@ DEFUN (no_match_ip_next_hop_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { + /* CHECK ME argc referenced below */ int idx_word = 5; if (argc <= idx_word) return bgp_route_match_delete (vty, vty->index, "ip next-hop prefix-list", @@ -3268,6 +3275,7 @@ DEFUN (no_match_ip_route_source_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { + /* CHECK ME argc referenced below */ int idx_word = 5; if (argc <= idx_word) return bgp_route_match_delete (vty, vty->index, "ip route-source prefix-list", @@ -3298,6 +3306,7 @@ DEFUN (no_match_metric, "Match metric of route\n" "Metric value\n") { + /* CHECK ME argc referenced below */ int idx_number = 3; if (argc <= idx_number) return bgp_route_match_delete (vty, vty->index, "metric", @@ -3329,6 +3338,7 @@ DEFUN (no_match_local_pref, "Match local preference of route\n" "Local preference value\n") { + /* CHECK ME argc referenced below */ int idx_localpref = 3; if (argc <= idx_localpref) return bgp_route_match_delete (vty, vty->index, "local-preference", @@ -3605,6 +3615,7 @@ DEFUN (no_set_ip_nexthop, "Use peer address (for BGP only)\n" "IP address of next hop\n") { + /* CHECK ME argc referenced below */ int idx_peer = 4; if (argc <= idx_peer) return bgp_route_set_delete (vty, vty->index, "ip next-hop", NULL); @@ -3648,6 +3659,7 @@ DEFUN (no_set_metric, "Metric value for destination routing protocol\n" "Metric value\n") { + /* CHECK ME argc referenced below */ int idx_number = 3; if (argc <= idx_number) return bgp_route_set_delete (vty, vty->index, "metric", NULL); @@ -3675,6 +3687,7 @@ DEFUN (no_set_local_pref, "BGP local preference path attribute\n" "Preference value\n") { + /* CHECK ME argc referenced below */ int idx_localpref = 3; if (argc <= idx_localpref) return bgp_route_set_delete (vty, vty->index, "local-preference", NULL); @@ -3702,6 +3715,7 @@ DEFUN (no_set_weight, "BGP weight for routing table\n" "Weight value\n") { + /* CHECK ME argc referenced below */ int idx_weight = 3; if (argc <= idx_weight) return bgp_route_set_delete (vty, vty->index, "weight", NULL); @@ -3719,6 +3733,7 @@ DEFUN (set_aspath_prepend, "Use the peer's AS-number\n" "Number of times to insert") { + /* CHECK ME argc referenced below */ int ret; char *str; @@ -3739,6 +3754,7 @@ DEFUN (no_set_aspath_prepend, "Prepend to the as-path\n" "AS number\n") { + /* CHECK ME argc referenced below */ int ret; char *str; @@ -3757,6 +3773,7 @@ DEFUN (set_aspath_exclude, "Exclude from the as-path\n" "AS number\n") { + /* CHECK ME argc referenced below */ int ret; char *str; @@ -3775,6 +3792,7 @@ DEFUN (no_set_aspath_exclude, "Exclude from the as-path\n" "AS number\n") { + /* CHECK ME argc referenced below */ int ret; char *str; @@ -3792,6 +3810,7 @@ DEFUN (set_community, "BGP community attribute\n" COMMUNITY_VAL_STR) { + /* CHECK ME argc referenced below */ int i; int first = 0; int additive = 0; @@ -3942,6 +3961,7 @@ DEFUN (set_ecommunity_rt, "Route Target extended community\n" "VPN extended community\n") { + /* CHECK ME argc referenced below */ int ret; char *str; @@ -3972,6 +3992,7 @@ DEFUN (set_ecommunity_soo, "Site-of-Origin extended community\n" "VPN extended community\n") { + /* CHECK ME argc referenced below */ int ret; char *str; @@ -4090,6 +4111,7 @@ DEFUN (no_set_aggregator_as, "AS number\n" "IP address of aggregator\n") { + /* CHECK ME argc referenced below */ int idx_asn = 4; int idx_ip = 5; int ret; @@ -4139,6 +4161,7 @@ DEFUN (no_set_tag, "Tag value for routing protocol\n" "Tag value\n") { + /* CHECK ME argc referenced below */ int idx_number = 3; if (argc <= idx_number) return bgp_route_set_delete (vty, vty->index, "tag", NULL); @@ -4319,6 +4342,7 @@ DEFUN (no_set_ipv6_nexthop_global, "IPv6 global address\n" "IPv6 address of next hop\n") { + /* CHECK ME argc referenced below */ int idx_ipv6 = 5; if (argc <= idx_ipv6) return bgp_route_set_delete (vty, vty->index, "ipv6 next-hop global", NULL); @@ -4365,6 +4389,7 @@ DEFUN (no_set_ipv6_nexthop_local, "IPv6 local address\n" "IPv6 address of next hop\n") { + /* CHECK ME argc referenced below */ int idx_ipv6 = 5; if (argc <= idx_ipv6) return bgp_route_set_delete (vty, vty->index, "ipv6 next-hop local", NULL); @@ -4395,6 +4420,7 @@ DEFUN (no_set_vpnv4_nexthop, "VPNv4 next-hop address\n" "IP address of next hop\n") { + /* CHECK ME argc referenced below */ int idx_ipv4 = 4; if (argc <= idx_ipv4) return bgp_route_set_delete (vty, vty->index, "vpnv4 next-hop", NULL); @@ -4422,6 +4448,7 @@ DEFUN (no_set_originator_id, "BGP originator ID attribute\n" "IP address of originator\n") { + /* CHECK ME argc referenced below */ int idx_id = 3; if (argc < idx_id) return bgp_route_set_delete (vty, vty->index, "originator-id", NULL); diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index a7a3520da..362e7db0f 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -664,6 +664,7 @@ DEFUN (router_bgp, AS_STR BGP_INSTANCE_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_asn = 2; int idx_view_vrf = 3; int idx_vrf = 4; @@ -744,6 +745,7 @@ DEFUN (no_router_bgp, AS_STR BGP_INSTANCE_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_asn = 3; int idx_vrf = 5; as_t as; @@ -827,6 +829,7 @@ DEFUN (no_bgp_router_id, "Override configured router identifier\n" "Manually configured router identifier\n") { + /* CHECK ME argc referenced below */ int idx_router_id = 3; int ret; struct in_addr id; @@ -949,6 +952,7 @@ DEFUN (bgp_confederation_peers, "Peer ASs in BGP confederation\n" AS_STR) { + /* CHECK ME argc referenced below */ struct bgp *bgp; as_t as; int i; @@ -980,6 +984,7 @@ DEFUN (no_bgp_confederation_peers, "Peer ASs in BGP confederation\n" AS_STR) { + /* CHECK ME argc referenced below */ struct bgp *bgp; as_t as; int i; @@ -1106,6 +1111,7 @@ DEFUN (bgp_maxmed_onstartup, "Effective on a startup\n" "Time (seconds) period for max-med\n") { + /* CHECK ME argc referenced below */ int idx_number = 3; struct bgp *bgp; @@ -1134,6 +1140,7 @@ DEFUN (bgp_maxmed_onstartup_medv, "Time (seconds) period for max-med\n" "Max MED value to be used\n") { + /* CHECK ME argc referenced below */ int idx_number = 3; int idx_number_2 = 4; struct bgp *bgp; @@ -2778,6 +2785,7 @@ DEFUN (neighbor_interface_config, "Member of the peer-group\n" "peer-group name\n") { + /* CHECK ME argc referenced below */ int idx_word = 1; int idx_peer_group_word = 4; @@ -2799,6 +2807,7 @@ DEFUN (neighbor_interface_config_v6only, "Member of the peer-group\n" "peer-group name\n") { + /* CHECK ME argc referenced below */ int idx_word = 1; int idx_peer_group_word = 5; @@ -4343,6 +4352,7 @@ DEFUN (neighbor_description, "Neighbor specific description\n" "Up to 80 characters describing this neighbor\n") { + /* CHECK ME argc referenced below */ int idx_peer = 1; struct peer *peer; char *str; @@ -4924,6 +4934,7 @@ DEFUN (neighbor_interface, "Interface\n" "Interface name\n") { + /* CHECK ME argc referenced below */ int idx_ip = 1; int idx_word = 3; if (argc == 3) @@ -5519,6 +5530,7 @@ DEFUN (neighbor_allowas_in, "Accept as-path with my AS present in it\n" "Number of occurances of AS number\n") { + /* CHECK ME argc referenced below */ int idx_peer = 1; int idx_number = 3; int ret; @@ -6012,6 +6024,7 @@ DEFUN (clear_ip_bgp_all, BGP_SOFT_IN_STR BGP_SOFT_OUT_STR) { + /* CHECK ME argc referenced below */ int idx_view_vrf = 3; int idx_vrf = 4; int idx_clr_sort = 5; @@ -6205,6 +6218,7 @@ DEFUN (show_bgp_vrfs, "Show BGP VRFs\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ struct list *inst = bm->bgp; struct listnode *node; struct bgp *bgp; @@ -6860,6 +6874,7 @@ DEFUN (show_ip_bgp_summary, "Summary of BGP neighbor status\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_view_vrf = 3; int idx_vrf = 4; int idx_afi; @@ -6886,6 +6901,7 @@ DEFUN (show_ip_bgp_instance_all_summary, "Summary of BGP neighbor status\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ u_char uj = use_json(argc, argv); bgp_show_all_instances_summary_vty (vty, AFI_IP, SAFI_UNICAST, uj); @@ -8737,6 +8753,7 @@ DEFUN (show_ip_bgp_neighbors, "Neighbor on bgp configured interface\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ int idx_ip = 1; int idx_view_vrf = 3; int idx_vrf = 4; @@ -8784,6 +8801,7 @@ DEFUN (show_ip_bgp_instance_all_neighbors, "Detailed information on TCP and BGP neighbor connections\n" "JavaScript Object Notation\n") { + /* CHECK ME argc referenced below */ u_char uj = use_json(argc, argv); bgp_show_all_instances_neighbors_vty (vty, uj); @@ -8918,6 +8936,7 @@ DEFUN (show_ip_bgp_updgrps, "Detailed info about dynamic update groups\n" "Specific subgroup to display detailed info for\n") { + /* CHECK ME argc referenced below */ int idx_view_vrf = 3; int idx_vrf = 4; int idx_afi; @@ -11302,6 +11321,7 @@ DEFUN (ip_community_list_standard, "Specify community to accept\n" COMMUNITY_VAL_STR) { + /* CHECK ME argc referenced below */ return community_list_set_vty (vty, argc, argv, COMMUNITY_LIST_STANDARD); } @@ -11318,6 +11338,7 @@ DEFUN (no_ip_community_list_standard_all, "Specify community to accept\n" COMMUNITY_VAL_STR) { + /* CHECK ME argc referenced below */ return community_list_unset_vty (vty, argc, argv, COMMUNITY_LIST_STANDARD); } @@ -11334,6 +11355,7 @@ DEFUN (ip_community_list_expanded_all, "Specify community to accept\n" COMMUNITY_VAL_STR) { + /* CHECK ME argc referenced below */ return community_list_set_vty (vty, argc, argv, COMMUNITY_LIST_EXPANDED); } @@ -11350,6 +11372,7 @@ DEFUN (no_ip_community_list_expanded_all, "Specify community to accept\n" COMMUNITY_VAL_STR) { + /* CHECK ME argc referenced below */ return community_list_unset_vty (vty, argc, argv, COMMUNITY_LIST_EXPANDED); } @@ -11541,6 +11564,7 @@ DEFUN (ip_extcommunity_list_standard, "Specify community to accept\n" EXTCOMMUNITY_VAL_STR) { + /* CHECK ME argc referenced below */ return extcommunity_list_set_vty (vty, argc, argv, EXTCOMMUNITY_LIST_STANDARD); } @@ -11556,6 +11580,7 @@ DEFUN (ip_extcommunity_list_name_expanded, "Specify community to accept\n" "An ordered list as a regular-expression\n") { + /* CHECK ME argc referenced below */ return extcommunity_list_set_vty (vty, argc, argv, EXTCOMMUNITY_LIST_EXPANDED); } @@ -11572,6 +11597,7 @@ DEFUN (no_ip_extcommunity_list_standard_all, "Specify community to accept\n" EXTCOMMUNITY_VAL_STR) { + /* CHECK ME argc referenced below */ return extcommunity_list_unset_vty (vty, argc, argv, EXTCOMMUNITY_LIST_EXPANDED); } @@ -11588,6 +11614,7 @@ DEFUN (no_ip_extcommunity_list_expanded_all, "Specify community to accept\n" "An ordered list as a regular-expression\n") { + /* CHECK ME argc referenced below */ return extcommunity_list_unset_vty (vty, argc, argv, EXTCOMMUNITY_LIST_EXPANDED); } diff --git a/isisd/isis_redist.c b/isisd/isis_redist.c index 66a2d9825..038fba77e 100644 --- a/isisd/isis_redist.c +++ b/isisd/isis_redist.c @@ -618,6 +618,7 @@ DEFUN (no_isis_redistribute, "Redistribute into level-1\n" "Redistribute into level-2\n") { + /* CHECK ME argc referenced below */ int idx_afi = 2; int idx_protocol = 3; int idx_level = 4; @@ -668,6 +669,7 @@ DEFUN (isis_default_originate, "Route map reference\n" "Pointer to route-map entries\n") { + /* CHECK ME argc referenced below */ int idx_afi = 2; int idx_level = 3; int idx_metric_rmap = 4; @@ -739,6 +741,7 @@ DEFUN (no_isis_default_originate, "Distribute default route into level-1\n" "Distribute default route into level-2\n") { + /* CHECK ME argc referenced below */ int idx_afi = 3; int idx_level = 4; struct isis_area *area = vty->index; diff --git a/isisd/isis_routemap.c b/isisd/isis_routemap.c index a1f087548..6d130d08d 100644 --- a/isisd/isis_routemap.c +++ b/isisd/isis_routemap.c @@ -370,6 +370,7 @@ DEFUN (no_match_ip_address, "IP access-list number (expanded range)\n" "IP Access-list name\n") { + /* CHECK ME argc referenced below */ int idx_acl = 4; if (argc <= idx_acl) return isis_route_match_delete(vty, vty->index, "ip address", NULL); @@ -403,6 +404,7 @@ DEFUN (no_match_ip_address_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { + /* CHECK ME argc referenced below */ int idx_word = 5; if (argc <= idx_word) return isis_route_match_delete (vty, vty->index, "ip address prefix-list", NULL); @@ -434,6 +436,7 @@ DEFUN (no_match_ipv6_address, "Match IPv6 address of route\n" "IPv6 access-list name\n") { + /* CHECK ME argc referenced below */ int idx_word = 4; if (argc <= idx_word) return isis_route_match_delete(vty, vty->index, "ipv6 address", NULL); @@ -466,6 +469,7 @@ DEFUN (no_match_ipv6_address_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { + /* CHECK ME argc referenced below */ int idx_word = 5; if (argc <= idx_word) return isis_route_match_delete (vty, vty->index, "ipv6 address prefix-list", NULL); @@ -497,6 +501,7 @@ DEFUN (no_set_metric, "Metric value for destination routing protocol\n" "Metric value\n") { + /* CHECK ME argc referenced below */ int idx_number = 3; if (argc <= idx_number) return isis_route_set_delete(vty, vty->index, "metric", NULL); diff --git a/isisd/isis_te.c b/isisd/isis_te.c index b9e75bcf2..2a5122a9d 100644 --- a/isisd/isis_te.c +++ b/isisd/isis_te.c @@ -1318,6 +1318,7 @@ DEFUN (show_isis_mpls_te_interface, "Interface information\n" "Interface name\n") { + /* CHECK ME argc referenced below */ int idx_interface = 4; struct interface *ifp; struct listnode *node; diff --git a/isisd/isis_vty.c b/isisd/isis_vty.c index a1970a901..91a7e2bde 100644 --- a/isisd/isis_vty.c +++ b/isisd/isis_vty.c @@ -2067,6 +2067,7 @@ DEFUN (area_passwd_md5, "Send but do not check PDUs on receiving\n" "Send and check PDUs on receiving\n") { + /* CHECK ME argc referenced below */ int idx_password = 0; int idx_word = 2; int idx_type = 5; @@ -2097,6 +2098,7 @@ DEFUN (area_passwd_clear, "Send but do not check PDUs on receiving\n" "Send and check PDUs on receiving\n") { + /* CHECK ME argc referenced below */ int idx_password = 0; int idx_word = 2; int idx_type = 5; diff --git a/isisd/isisd.c b/isisd/isisd.c index ffe17b364..8ee3ad4da 100644 --- a/isisd/isisd.c +++ b/isisd/isisd.c @@ -1918,6 +1918,7 @@ DEFUN (topology_generate_grid, "Optional param 3\n" "Topology\n") { + /* CHECK ME argc referenced below */ struct isis_area *area; area = vty->index; diff --git a/lib/command.c b/lib/command.c index 22416ea73..4be178e12 100644 --- a/lib/command.c +++ b/lib/command.c @@ -1016,6 +1016,7 @@ DEFUN (config_quit, "quit", "Exit current mode and down to previous mode\n") { + /* CHECK ME argc referenced below */ return config_exit (self, vty, argc, argv); } @@ -1137,6 +1138,7 @@ DEFUN (config_write, "Write configuration currently in memory\n" "Write configuration to terminal\n") { + /* CHECK ME argc referenced below */ int idx_type = 1; unsigned int i; int fd; @@ -1282,6 +1284,7 @@ DEFUN (show_running_config, SHOW_STR "running configuration (same as write terminal/memory)\n") { + /* CHECK ME argc referenced below */ return config_write (self, vty, argc, argv); } @@ -1293,6 +1296,7 @@ DEFUN (copy_runningconf_startupconf, "Copy running config to... \n" "Copy running config to startup config (same as write file)\n") { + /* CHECK ME argc referenced below */ return config_write (self, vty, argc, argv); } /** -- **/ @@ -1374,6 +1378,7 @@ DEFUN (config_password, "Specifies a HIDDEN password will follow\n" "The password string\n") { + /* CHECK ME argc referenced below */ int idx_8 = 1; int idx_word = 2; if (argc == 3) // '8' was specified @@ -1420,6 +1425,7 @@ DEFUN (config_enable_password, "dummy string \n" "The HIDDEN 'enable' password string\n") { + /* CHECK ME argc referenced below */ int idx_8 = 2; int idx_word = 3; /* Crypt type is specified. */ @@ -1626,6 +1632,7 @@ DEFUN (config_logmsg, LOG_LEVEL_DESC "The message to send\n") { + /* CHECK ME argc referenced below */ int idx_log_level = 1; int level; char *message; @@ -1699,6 +1706,7 @@ DEFUN (config_log_stdout, "Set stdout logging level\n" LOG_LEVEL_DESC) { + /* CHECK ME argc referenced below */ int idx_log_level = 2; if (argc == 2) { @@ -1732,6 +1740,7 @@ DEFUN (config_log_monitor, "Set terminal line (monitor) logging level\n" LOG_LEVEL_DESC) { + /* CHECK ME argc referenced below */ int idx_log_level = 2; if (argc == 2) { @@ -1820,6 +1829,7 @@ DEFUN (config_log_file, "Logging filename\n" LOG_LEVEL_DESC) { + /* CHECK ME argc referenced below */ int idx_filename = 2; int idx_log_levels = 3; if (argc == 4) @@ -1860,6 +1870,7 @@ DEFUN (config_log_syslog, "Set syslog logging level\n" LOG_LEVEL_DESC) { + /* CHECK ME argc referenced below */ int idx_log_levels = 2; if (argc == 3) { diff --git a/lib/distribute.c b/lib/distribute.c index 8a0083391..e0b4f0468 100644 --- a/lib/distribute.c +++ b/lib/distribute.c @@ -308,6 +308,7 @@ DEFUN (distribute_list, "Filter outgoing routing updates\n" "Interface name\n") { + /* CHECK ME argc referenced below */ int prefix = (argv[1]->type == WORD_TKN) ? 1 : 0; /* Check of distribute list type. */ @@ -339,6 +340,7 @@ DEFUN (no_distribute_list, "Filter outgoing routing updates\n" "Interface name\n") { + /* CHECK ME argc referenced below */ int prefix = (argv[2]->type == WORD_TKN) ? 1 : 0; /* Check of distribute list type. */ diff --git a/lib/filter.c b/lib/filter.c index 11dd7cd1c..fd80b2a63 100644 --- a/lib/filter.c +++ b/lib/filter.c @@ -1480,6 +1480,7 @@ DEFUN (access_list_remark, "Access list entry comment\n" "Comment up to 100 characters\n") { + /* CHECK ME argc referenced below */ int idx_acl = 1; struct access_list *access; @@ -1525,6 +1526,7 @@ DEFUN (no_access_list_remark_comment, "Access list entry comment\n" "Comment up to 100 characters\n") { + /* CHECK ME argc referenced below */ return no_access_list_remark (self, vty, argc, argv); } @@ -1673,6 +1675,7 @@ DEFUN (ipv6_access_list_remark, "Access list entry comment\n" "Comment up to 100 characters\n") { + /* CHECK ME argc referenced below */ int idx_word = 2; struct access_list *access; @@ -1712,6 +1715,7 @@ DEFUN (no_ipv6_access_list_remark_comment, "Access list entry comment\n" "Comment up to 100 characters\n") { + /* CHECK ME argc referenced below */ return no_ipv6_access_list_remark (self, vty, argc, argv); } diff --git a/lib/grammar_sandbox.c b/lib/grammar_sandbox.c index 41fee1c1c..34e0b8106 100644 --- a/lib/grammar_sandbox.c +++ b/lib/grammar_sandbox.c @@ -57,6 +57,7 @@ DEFUN (grammar_test, GRAMMAR_STR "command to pass to new parser\n") { + /* CHECK ME argc referenced below */ // make a string from tokenized command line char *command = argv_concat (argv, argc, 0); @@ -80,6 +81,7 @@ DEFUN (grammar_test_complete, "attempt to complete input on DFA\n" "command to complete") { + /* CHECK ME argc referenced below */ char *cmdstr = argv_concat (argv, argc, 0); vector command = cmd_make_strvec (cmdstr); @@ -129,6 +131,7 @@ DEFUN (grammar_test_match, "attempt to match input on DFA\n" "command to match") { + /* CHECK ME argc referenced below */ if (argv[0][0] == '#') return CMD_SUCCESS; diff --git a/lib/if.c b/lib/if.c index 3afba9879..7b55a327c 100644 --- a/lib/if.c +++ b/lib/if.c @@ -677,6 +677,7 @@ DEFUN (interface_desc, "Interface specific description\n" "Characters describing this interface\n") { + /* CHECK ME argc referenced below */ struct interface *ifp; if (argc == 1) @@ -755,6 +756,7 @@ DEFUN (interface, "Interface's name\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ifname = 1; const char *ifname = argv[idx_ifname]->arg; const char *vrfname = (argc > 2) ? argv[3]->arg : NULL; @@ -899,6 +901,7 @@ DEFUN (show_address, "address\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_vrf_cmd_str = 2; struct listnode *node; struct listnode *node2; diff --git a/lib/plist.c b/lib/plist.c index 0d1cafde6..4170230d8 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -1905,6 +1905,7 @@ DEFUN (ip_prefix_list_description, "Prefix-list specific description\n" "Up to 80 characters describing this prefix-list\n") { + /* CHECK ME argc referenced below */ int idx_word = 2; struct prefix_list *plist; @@ -1944,6 +1945,7 @@ DEFUN (no_ip_prefix_list_description_comment, "Prefix-list specific description\n" "Up to 80 characters describing this prefix-list\n") { + /* CHECK ME argc referenced below */ return no_ip_prefix_list_description (self, vty, argc, argv); } @@ -2616,6 +2618,7 @@ DEFUN (ipv6_prefix_list_description, "Prefix-list specific description\n" "Up to 80 characters describing this prefix-list\n") { + /* CHECK ME argc referenced below */ int idx_word = 2; struct prefix_list *plist; @@ -2655,6 +2658,7 @@ DEFUN (no_ipv6_prefix_list_description_comment, "Prefix-list specific description\n" "Up to 80 characters describing this prefix-list\n") { + /* CHECK ME argc referenced below */ return no_ipv6_prefix_list_description_comment (self, vty, argc, argv); } diff --git a/lib/routemap.c b/lib/routemap.c index 7ad75b415..2b4ec0c67 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -1544,6 +1544,7 @@ DEFUN (rmap_onmatch_goto, "Goto Clause number\n" "Number\n") { + /* CHECK ME argc referenced below */ int idx_number = 2; char *num = NULL; if (!strcmp (argv[0]->text, "continue")) @@ -1609,6 +1610,7 @@ DEFUN (rmap_continue, "Continue on a different entry within the route-map\n" "Route-map entry sequence number\n") { + /* CHECK ME argc referenced below */ return rmap_onmatch_goto (self, vty, argc, argv); } @@ -1620,6 +1622,7 @@ DEFUN (no_rmap_continue, "Continue on a different entry within the route-map\n" "Route-map entry sequence number\n") { + /* CHECK ME argc referenced below */ return no_rmap_onmatch_goto (self, vty, argc, argv); } @@ -1631,6 +1634,7 @@ DEFUN (rmap_show_name, "route-map information\n" "route-map name\n") { + /* CHECK ME argc referenced below */ int idx_word = 2; const char *name = (argc == 3) ? argv[idx_word]->arg : NULL; return vty_show_route_map (vty, name); @@ -1694,6 +1698,7 @@ DEFUN (rmap_description, "Route-map comment\n" "Comment describing this route-map rule\n") { + /* CHECK ME argc referenced below */ struct route_map_index *index; index = vty->index; diff --git a/lib/thread.c b/lib/thread.c index 76acd0778..eb85d57af 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -299,6 +299,7 @@ DEFUN (show_thread_cpu, "Thread CPU usage\n" "Display filter (rwtexb)\n") { + /* CHECK ME argc referenced below */ int idx_filter = 3; int i = 0; thread_type filter = (thread_type) -1U; @@ -382,6 +383,7 @@ DEFUN (clear_thread_cpu, "Thread CPU usage\n" "Display filter (rwtexb)\n") { + /* CHECK ME argc referenced below */ int idx_filter = 3; int i = 0; thread_type filter = (thread_type) -1U; diff --git a/lib/vty.c b/lib/vty.c index e922c672a..7fcf4565a 100644 --- a/lib/vty.c +++ b/lib/vty.c @@ -2797,6 +2797,7 @@ DEFUN (no_vty_access_class, "Filter connections based on an IP access list\n" "IP access list\n") { + /* CHECK ME argc referenced below */ int idx_word = 2; const char *accesslist = (argc == 3) ? argv[idx_word]->arg : NULL; if (! vty_accesslist_name || (argc && strcmp(vty_accesslist_name, accesslist))) @@ -2840,6 +2841,7 @@ DEFUN (no_vty_ipv6_access_class, "Filter connections based on an IP access list\n" "IPv6 access list\n") { + /* CHECK ME argc referenced below */ int idx_word = 3; const char *accesslist = (argc == 4) ? argv[idx_word]->arg : NULL; @@ -2948,6 +2950,7 @@ DEFUN (no_terminal_monitor, "Set terminal line parameters\n" "Copy debug output to the current terminal line\n") { + /* CHECK ME argc referenced below */ return terminal_no_monitor (self, vty, argc, argv); } diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c index d67621d7c..75c1bd2f6 100644 --- a/ospf6d/ospf6_area.c +++ b/ospf6d/ospf6_area.c @@ -468,6 +468,7 @@ DEFUN (area_range, "Specify IPv6 prefix\n" ) { + /* CHECK ME argc referenced below */ int idx_ipv4 = 1; int idx_ipv6_prefixlen = 3; int ret; @@ -571,6 +572,7 @@ DEFUN (no_area_range, "Configured address range\n" "Specify IPv6 prefix\n") { + /* CHECK ME argc referenced below */ int idx_ipv4 = 2; int ret; struct ospf6_area *oa; @@ -680,6 +682,7 @@ DEFUN (area_filter_list, "Filter networks sent to this area\n" "Filter networks sent from this area\n") { + /* CHECK ME argc referenced below */ int idx_ipv4 = 1; int idx_word = 4; struct ospf6_area *area; @@ -724,6 +727,7 @@ DEFUN (no_area_filter_list, "Filter networks sent to this area\n" "Filter networks sent from this area\n") { + /* CHECK ME argc referenced below */ int idx_ipv4 = 2; int idx_word = 5; struct ospf6_area *area; diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index 379320e86..3798f85df 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -1142,6 +1142,7 @@ DEFUN (no_set_metric, SET_STR "Metric value for destination routing protocol\n") { + /* CHECK ME argc referenced below */ int ret = 0; if (argc == 0) diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index e9d66419d..e15fb9971 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -1006,6 +1006,7 @@ DEFUN (show_ipv6_ospf6_interface, IFNAME_STR ) { + /* CHECK ME argc referenced below */ int idx_ifname = 4; struct interface *ifp; struct listnode *i; @@ -1069,6 +1070,7 @@ DEFUN (show_ipv6_ospf6_interface_ifname_prefix, "Display connected prefixes to advertise\n" ) { + /* CHECK ME argc referenced below */ int idx_ifname = 4; struct interface *ifp; struct ospf6_interface *oi; @@ -1131,6 +1133,7 @@ DEFUN (show_ipv6_ospf6_interface_prefix, "Display connected prefixes to advertise\n" ) { + /* CHECK ME argc referenced below */ struct listnode *i; struct ospf6_interface *oi; struct interface *ifp; @@ -1990,6 +1993,7 @@ DEFUN (clear_ipv6_ospf6_interface, IFNAME_STR ) { + /* CHECK ME argc referenced below */ int idx_ifname = 4; struct interface *ifp; struct listnode *node; diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index a70e450f6..7aa78048d 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -835,6 +835,7 @@ DEFUN (debug_ospf6_lsa_type, "Specify LS type as Hexadecimal\n" ) { + /* CHECK ME argc referenced below */ int idx_lsa = 3; unsigned int i; struct ospf6_lsa_handler *handler = NULL; @@ -893,6 +894,7 @@ DEFUN (no_debug_ospf6_lsa_type, "Specify LS type as Hexadecimal\n" ) { + /* CHECK ME argc referenced below */ int idx_lsa = 4; u_int i; struct ospf6_lsa_handler *handler = NULL; diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c index 2cedc59ee..8c4684081 100644 --- a/ospf6d/ospf6_message.c +++ b/ospf6d/ospf6_message.c @@ -2371,6 +2371,7 @@ DEFUN (debug_ospf6_message, "Debug All message\n" ) { + /* CHECK ME argc referenced below */ int idx_packet = 3; unsigned char level = 0; int type = 0; @@ -2450,6 +2451,7 @@ DEFUN (no_debug_ospf6_message, "Debug All message\n" ) { + /* CHECK ME argc referenced below */ int idx_packet = 4; unsigned char level = 0; int type = 0; diff --git a/ospf6d/ospf6_neighbor.c b/ospf6d/ospf6_neighbor.c index 76c3862ec..573fced39 100644 --- a/ospf6d/ospf6_neighbor.c +++ b/ospf6d/ospf6_neighbor.c @@ -848,6 +848,7 @@ DEFUN (show_ipv6_ospf6_neighbor, "Neighbor list\n" ) { + /* CHECK ME argc referenced below */ struct ospf6_neighbor *on; struct ospf6_interface *oi; struct ospf6_area *oa; @@ -945,6 +946,7 @@ DEFUN (debug_ospf6_neighbor, "Debug OSPFv3 Neighbor\n" ) { + /* CHECK ME argc referenced below */ unsigned char level = 0; if (argc) { @@ -982,6 +984,7 @@ DEFUN (no_debug_ospf6_neighbor, "Debug OSPFv3 Neighbor\n" ) { + /* CHECK ME argc referenced below */ unsigned char level = 0; if (argc) { diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c index 3aa653814..659078353 100644 --- a/ospf6d/ospf6_spf.c +++ b/ospf6d/ospf6_spf.c @@ -885,6 +885,7 @@ DEFUN (ospf6_timers_throttle_spf, "Initial hold time (msec) between consecutive SPF calculations\n" "Maximum hold time (msec)\n") { + /* CHECK ME argc referenced below */ int idx_number = 3; int idx_number_2 = 4; int idx_number_3 = 5; diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index 5fef06d7c..49e136c99 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -405,6 +405,7 @@ DEFUN (ospf6_timers_lsa, "Minimum delay in receiving new version of a LSA\n" "Delay in milliseconds\n") { + /* CHECK ME argc referenced below */ int idx_number = 3; unsigned int minarrival; struct ospf6 *ospf = vty->index; @@ -443,6 +444,7 @@ DEFUN (no_ospf6_timers_lsa, "OSPF6 LSA timers\n" "Minimum delay in receiving new version of a LSA\n") { + /* CHECK ME argc referenced below */ unsigned int minarrival; struct ospf6 *ospf = vty->index; @@ -816,6 +818,7 @@ DEFUN (show_ipv6_ospf6_route, ROUTE_STR ) { + /* CHECK ME argc referenced below */ OSPF6_CMD_CHECK_RUNNING (); ospf6_route_table_show (vty, argc, argv, ospf6->route_table); @@ -846,6 +849,7 @@ DEFUN (show_ipv6_ospf6_route_match, "Display routes which match the specified route\n" ) { + /* CHECK ME argc referenced below */ OSPF6_CMD_CHECK_RUNNING (); ospf6_route_table_show (vty, argc, argv, ospf6->route_table); @@ -864,6 +868,7 @@ DEFUN (show_ipv6_ospf6_route_match_detail, "Detailed information\n" ) { + /* CHECK ME argc referenced below */ OSPF6_CMD_CHECK_RUNNING (); ospf6_route_table_show (vty, argc, argv, ospf6->route_table); @@ -886,6 +891,7 @@ DEFUN (show_ipv6_ospf6_route_type_detail, "Detailed information\n" ) { + /* CHECK ME argc referenced below */ OSPF6_CMD_CHECK_RUNNING (); ospf6_route_table_show (vty, argc, argv, ospf6->route_table); diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c index 6599fbc6c..44d1bbfaf 100644 --- a/ospf6d/ospf6_zebra.c +++ b/ospf6d/ospf6_zebra.c @@ -726,6 +726,7 @@ DEFUN (debug_ospf6_zebra_sendrecv, "Debug Receiving zebra\n" ) { + /* CHECK ME argc referenced below */ int idx_send_recv = 3; unsigned char level = 0; @@ -766,6 +767,7 @@ DEFUN (no_debug_ospf6_zebra_sendrecv, "Debug Receiving zebra\n" ) { + /* CHECK ME argc referenced below */ int idx_send_recv = 4; unsigned char level = 0; diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c index b57228885..c67b0878c 100644 --- a/ospf6d/ospf6d.c +++ b/ospf6d/ospf6d.c @@ -187,6 +187,7 @@ DEFUN (show_ipv6_ospf6_database, "Display Link state database\n" ) { + /* CHECK ME argc referenced below */ int level; struct listnode *i, *j; struct ospf6 *o = ospf6; @@ -264,6 +265,7 @@ DEFUN (show_ipv6_ospf6_database_type, "Display Intra-Area-Prefix LSAs\n" ) { + /* CHECK ME argc referenced below */ int level; struct listnode *i, *j; struct ospf6 *o = ospf6; @@ -364,6 +366,7 @@ DEFUN (show_ipv6_ospf6_database_id, "Specify Link state ID as IPv4 address notation\n" ) { + /* CHECK ME argc referenced below */ int idx_ipv4 = 5; int level; struct listnode *i, *j; @@ -462,6 +465,7 @@ DEFUN (show_ipv6_ospf6_database_router, "Specify Advertising Router as IPv4 address notation\n" ) { + /* CHECK ME argc referenced below */ int idx_ipv4 = 6; int level; struct listnode *i, *j; @@ -598,6 +602,7 @@ DEFUN (show_ipv6_ospf6_database_type_id, "Specify Link state ID as IPv4 address notation\n" ) { + /* CHECK ME argc referenced below */ int idx_lsa = 4; int level; struct listnode *i, *j; @@ -754,6 +759,7 @@ DEFUN (show_ipv6_ospf6_database_type_router, "Specify Advertising Router as IPv4 address notation\n" ) { + /* CHECK ME argc referenced below */ int idx_lsa = 4; int level; struct listnode *i, *j; @@ -848,6 +854,7 @@ DEFUN (show_ipv6_ospf6_database_id_router, "Specify Advertising Router as IPv4 address notation\n" ) { + /* CHECK ME argc referenced below */ int idx_ipv4 = 5; int level; struct listnode *i, *j; @@ -935,6 +942,7 @@ DEFUN (show_ipv6_ospf6_database_adv_router_linkstate_id, "Specify Link state ID as IPv4 address notation\n" ) { + /* CHECK ME argc referenced below */ int idx_ipv4 = 5; int level; struct listnode *i, *j; @@ -1037,6 +1045,7 @@ DEFUN (show_ipv6_ospf6_database_type_id_router, "Specify Advertising Router as IPv4 address notation\n" ) { + /* CHECK ME argc referenced below */ int idx_lsa = 4; int level; struct listnode *i, *j; @@ -1162,6 +1171,7 @@ DEFUN (show_ipv6_ospf6_database_type_adv_router_linkstate_id, "Specify Link state ID as IPv4 address notation\n" ) { + /* CHECK ME argc referenced below */ int idx_lsa = 4; int level; struct listnode *i, *j; @@ -1259,6 +1269,7 @@ DEFUN (show_ipv6_ospf6_database_self_originated, "Display Self-originated LSAs\n" ) { + /* CHECK ME argc referenced below */ int level; struct listnode *i, *j; struct ospf6 *o = ospf6; @@ -1341,6 +1352,7 @@ DEFUN (show_ipv6_ospf6_database_type_self_originated, "Display Self-originated LSAs\n" ) { + /* CHECK ME argc referenced below */ int level; struct listnode *i, *j; struct ospf6 *o = ospf6; @@ -1444,6 +1456,7 @@ DEFUN (show_ipv6_ospf6_database_type_self_originated_linkstate_id, "Specify Link state ID as IPv4 address notation\n" ) { + /* CHECK ME argc referenced below */ int idx_lsa = 4; int level; struct listnode *i, *j; @@ -1558,6 +1571,7 @@ DEFUN (show_ipv6_ospf6_database_type_id_self_originated, "Display Self-originated LSAs\n" ) { + /* CHECK ME argc referenced below */ int idx_lsa = 4; int level; struct listnode *i, *j; @@ -1646,6 +1660,7 @@ DEFUN (show_ipv6_ospf6_border_routers, "Display routing table for ABR and ASBR\n" ) { + /* CHECK ME argc referenced below */ u_int32_t adv_router; void (*showfunc) (struct vty *, struct ospf6_route *); struct ospf6_route *ro; @@ -1724,6 +1739,7 @@ DEFUN (show_ipv6_ospf6_linkstate, "Display linkstate routing table\n" ) { + /* CHECK ME argc referenced below */ struct listnode *node; struct ospf6_area *oa; @@ -1751,6 +1767,7 @@ DEFUN (show_ipv6_ospf6_linkstate_detail, "Display linkstate routing table\n" ) { + /* CHECK ME argc referenced below */ struct listnode *node; struct ospf6_area *oa; diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c index f2b332053..c55ce1de8 100644 --- a/ospfd/ospf_dump.c +++ b/ospfd/ospf_dump.c @@ -772,6 +772,7 @@ DEFUN (debug_ospf_packet, "Detail Information\n" "Detail Information\n") { + /* CHECK ME argc referenced below */ int inst = (argv[2]->type == RANGE_TKN) ? 1 : 0; int detail = strmatch (argv[argc - 1]->text, "detail"); int send = strmatch (argv[argc - (1+detail)]->text, "send"); @@ -849,6 +850,7 @@ DEFUN (no_debug_ospf_packet, "Detail Information\n" "Detail Information\n") { + /* CHECK ME argc referenced below */ int inst = (argv[3]->type == RANGE_TKN) ? 1 : 0; int detail = strmatch (argv[argc - 1]->text, "detail"); int send = strmatch (argv[argc - (1+detail)]->text, "send"); @@ -924,6 +926,7 @@ DEFUN (debug_ospf_ism, "ISM Event Information\n" "ISM TImer Information\n") { + /* CHECK ME argc referenced below */ int inst = (argv[2]->type == RANGE_TKN); char *dbgparam = (argc == 4 + inst) ? argv[argc - 1]->text : NULL; @@ -977,6 +980,7 @@ DEFUN (no_debug_ospf_ism, "ISM Event Information\n" "ISM TImer Information\n") { + /* CHECK ME argc referenced below */ int inst = (argv[3]->type == RANGE_TKN); char *dbgparam = (argc == 5 + inst) ? argv[argc - 1]->text : NULL; @@ -1073,6 +1077,7 @@ DEFUN (debug_ospf_nsm, OSPF_STR "OSPF Neighbor State Machine\n") { + /* CHECK ME argc referenced below */ return debug_ospf_nsm_common (vty, 0, argc, argv); } @@ -1097,6 +1102,7 @@ DEFUN (debug_ospf_instance_nsm, "Instance ID\n" "OSPF Neighbor State Machine\n") { + /* CHECK ME argc referenced below */ int idx_number = 2; u_short instance = 0; @@ -1164,6 +1170,7 @@ DEFUN (no_debug_ospf_nsm, OSPF_STR "OSPF Neighbor State Machine") { + /* CHECK ME argc referenced below */ return no_debug_ospf_nsm_common(vty, 0, argc, argv); } @@ -1190,6 +1197,7 @@ DEFUN (no_debug_ospf_instance_nsm, "Instance ID\n" "OSPF Neighbor State Machine") { + /* CHECK ME argc referenced below */ int idx_number = 3; u_short instance = 0; @@ -1261,6 +1269,7 @@ DEFUN (debug_ospf_lsa, OSPF_STR "OSPF Link State Advertisement\n") { + /* CHECK ME argc referenced below */ return debug_ospf_lsa_common(vty, 0, argc, argv); } @@ -1286,6 +1295,7 @@ DEFUN (debug_ospf_instance_lsa, "Instance ID\n" "OSPF Link State Advertisement\n") { + /* CHECK ME argc referenced below */ int idx_number = 2; u_short instance = 0; @@ -1358,6 +1368,7 @@ DEFUN (no_debug_ospf_lsa, OSPF_STR "OSPF Link State Advertisement\n") { + /* CHECK ME argc referenced below */ return no_debug_ospf_lsa_common (vty, 0, argc, argv); } @@ -1385,6 +1396,7 @@ DEFUN (no_debug_ospf_instance_lsa, "Instance ID\n" "OSPF Link State Advertisement\n") { + /* CHECK ME argc referenced below */ int idx_number = 3; u_short instance = 0; @@ -1446,6 +1458,7 @@ DEFUN (debug_ospf_zebra, OSPF_STR "OSPF Zebra information\n") { + /* CHECK ME argc referenced below */ return debug_ospf_zebra_common(vty, 0, argc, argv); } @@ -1469,6 +1482,7 @@ DEFUN (debug_ospf_instance_zebra, "Instance ID\n" "OSPF Zebra information\n") { + /* CHECK ME argc referenced below */ int idx_number = 2; u_short instance = 0; @@ -1532,6 +1546,7 @@ DEFUN (no_debug_ospf_zebra, OSPF_STR "OSPF Zebra information\n") { + /* CHECK ME argc referenced below */ return no_debug_ospf_zebra_common(vty, 0, argc, argv); } @@ -1557,6 +1572,7 @@ DEFUN (no_debug_ospf_instance_zebra, "Instance ID\n" "OSPF Zebra information\n") { + /* CHECK ME argc referenced below */ int idx_number = 3; u_short instance = 0; diff --git a/ospfd/ospf_opaque.c b/ospfd/ospf_opaque.c index a1981be86..ecf883c69 100644 --- a/ospfd/ospf_opaque.c +++ b/ospfd/ospf_opaque.c @@ -792,6 +792,7 @@ DEFUN (ospf_opaque, "OSPF specific commands\n" "Enable the Opaque-LSA capability (rfc2370)\n") { + /* CHECK ME argc referenced below */ return capability_opaque (self, vty, argc, argv); } @@ -826,6 +827,7 @@ DEFUN (no_ospf_opaque, "OSPF specific commands\n" "Enable the Opaque-LSA capability (rfc2370)\n") { + /* CHECK ME argc referenced below */ return no_capability_opaque (self, vty, argc, argv); } diff --git a/ospfd/ospf_ri.c b/ospfd/ospf_ri.c index bcb1cd8e2..463671f7d 100644 --- a/ospfd/ospf_ri.c +++ b/ospfd/ospf_ri.c @@ -1182,6 +1182,7 @@ DEFUN (router_info, "Enable the Router Information functionality with Area flooding scope\n" "OSPF area ID in IP format") { + /* CHECK ME argc referenced below */ int idx_ipv4 = 2; char *area = (argc == 3) ? argv[idx_ipv4]->arg : NULL; diff --git a/ospfd/ospf_routemap.c b/ospfd/ospf_routemap.c index 33ddc67fc..1cb29f3ef 100644 --- a/ospfd/ospf_routemap.c +++ b/ospfd/ospf_routemap.c @@ -715,6 +715,7 @@ DEFUN (no_match_ip_nexthop, "IP access-list number (expanded range)\n" "IP access-list name\n") { + /* CHECK ME argc referenced below */ char *al = (argc == 5) ? argv[4]->arg : NULL; return ospf_route_match_delete (vty, vty->index, "ip next-hop", al); } @@ -744,6 +745,7 @@ DEFUN (no_match_ip_next_hop_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { + /* CHECK ME argc referenced below */ char *pl = (argc == 6) ? argv[5]->arg : NULL; return ospf_route_match_delete (vty, vty->index, "ip next-hop prefix-list", pl); } @@ -774,6 +776,7 @@ DEFUN (no_match_ip_address, "IP access-list number (expanded range)\n" "IP access-list name\n") { + /* CHECK ME argc referenced below */ char *al = (argc == 5) ? argv[4]->arg : NULL; return ospf_route_match_delete (vty, vty->index, "ip address", al); } @@ -802,6 +805,7 @@ DEFUN (no_match_ip_address_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { + /* CHECK ME argc referenced below */ char *pl = (argc == 6) ? argv[5]->arg : NULL; return ospf_route_match_delete (vty, vty->index, "ip address prefix-list", pl); } @@ -825,6 +829,7 @@ DEFUN (no_match_interface, "Match first hop interface of route\n" "Interface name\n") { + /* CHECK ME argc referenced below */ char *iface = (argc == 4) ? argv[3]->arg : NULL; return ospf_route_match_delete (vty, vty->index, "interface", iface); } @@ -848,6 +853,7 @@ DEFUN (no_match_tag, "Match tag of route\n" "Tag value\n") { + /* CHECK ME argc referenced below */ char *tag = (argc == 4) ? argv[3]->arg : NULL; return ospf_route_match_delete (vty, vty->index, "tag", tag); } @@ -871,6 +877,7 @@ DEFUN (no_set_metric, "Metric value for destination routing protocol\n" "Metric value\n") { + /* CHECK ME argc referenced below */ char *mval = (argc == 4) ? argv[3]->arg : NULL; return ospf_route_set_delete (vty, vty->index, "metric", mval); } @@ -896,6 +903,7 @@ DEFUN (no_set_metric_type, "OSPF[6] external type 1 metric\n" "OSPF[6] external type 2 metric\n") { + /* CHECK ME argc referenced below */ char *ext = (argc == 4) ? argv[3]->text : NULL; return ospf_route_set_delete (vty, vty->index, "metric-type", ext); } @@ -919,6 +927,7 @@ DEFUN (no_set_tag, "Tag value for routing protocol\n" "Tag value\n") { + /* CHECK ME argc referenced below */ char *tag = (argc == 4) ? argv[3]->arg : NULL; return ospf_route_set_delete (vty, vty->index, "tag", tag); } diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c index 2044500f1..ac9f9c7d3 100644 --- a/ospfd/ospf_te.c +++ b/ospfd/ospf_te.c @@ -2620,6 +2620,7 @@ DEFUN (show_ip_ospf_mpls_te_link, "Interface information\n" "Interface name\n") { + /* CHECK ME argc referenced below */ int idx_interface = 5; struct interface *ifp; struct listnode *node, *nnode; diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index b27088366..bf68e3a51 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -2534,6 +2534,7 @@ DEFUN (ip_ssmpingd, CONF_SSMPINGD_STR "Source address\n") { + /* CHECK ME argc referenced below */ int idx_ipv4 = 2; int result; struct in_addr source_addr; @@ -2564,6 +2565,7 @@ DEFUN (no_ip_ssmpingd, CONF_SSMPINGD_STR "Source address\n") { + /* CHECK ME argc referenced below */ int idx_ipv4 = 3; int result; struct in_addr source_addr; @@ -3560,6 +3562,7 @@ DEFUN (interface_ip_pim_hello, IFACE_PIM_HELLO_TIME_STR IFACE_PIM_HELLO_HOLD_STR) { + /* CHECK ME argc referenced below */ int idx_time = 3; int idx_hold = 4; struct interface *ifp; @@ -4052,6 +4055,7 @@ DEFUN (test_igmp_receive_report, "Record type\n" "Sources\n") { + /* CHECK ME argc referenced below */ int idx_number = 4; int idx_ipv4 = 5; int idx_number_2 = 6; @@ -4167,6 +4171,7 @@ DEFUN (test_pim_receive_dump, "Neighbor address\n" "Packet dump\n") { + /* CHECK ME argc referenced below */ int idx_interface = 4; int idx_ipv4 = 5; uint8_t buf[1000]; @@ -4287,6 +4292,7 @@ DEFUN (test_pim_receive_hello, "Neighbor LAN prune delay T-bit\n" "Neighbor secondary addresses\n") { + /* CHECK ME argc referenced below */ int idx_interface = 4; int idx_ipv4 = 5; int idx_number = 6; diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c index d6686399c..6b2fef7f5 100644 --- a/ripd/rip_interface.c +++ b/ripd/rip_interface.c @@ -1528,6 +1528,7 @@ DEFUN (ip_rip_authentication_mode, "RFC compatible\n" "Old ripd compatible\n") { + /* CHECK ME argc referenced below */ char *cryptmode = argv[4]->text; char *authlen = (argc > 5) ? argv[6]->text : NULL; struct interface *ifp; diff --git a/ripd/rip_routemap.c b/ripd/rip_routemap.c index e1017cfb2..e43c398c4 100644 --- a/ripd/rip_routemap.c +++ b/ripd/rip_routemap.c @@ -754,6 +754,7 @@ DEFUN (no_match_metric, "Match metric of route\n" "Metric value\n") { + /* CHECK ME argc referenced below */ char *mval = (argc == 4) ? argv[3]->arg : NULL; return rip_route_match_delete (vty, vty->index, "metric", mval); } @@ -778,6 +779,7 @@ DEFUN (no_match_interface, "Match first hop interface of route\n" "Interface name\n") { + /* CHECK ME argc referenced below */ char *iface = (argc == 4) ? argv[3]->arg : NULL; return rip_route_match_delete (vty, vty->index, "interface", iface); } @@ -807,6 +809,7 @@ DEFUN (no_match_ip_next_hop, "IP access-list number (expanded range)\n" "IP Access-list name\n") { + /* CHECK ME argc referenced below */ char *al = (argc == 5) ? argv[4]->arg : NULL; return rip_route_match_delete (vty, vty->index, "ip next-hop", al); } @@ -834,6 +837,7 @@ DEFUN (no_match_ip_next_hop_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { + /* CHECK ME argc referenced below */ char *plist = (argc == 6) ? argv[5]->arg : NULL; return rip_route_match_delete (vty, vty->index, "ip next-hop prefix-list", plist); } @@ -865,6 +869,7 @@ DEFUN (no_match_ip_address, "IP access-list number (expanded range)\n" "IP Access-list name\n") { + /* CHECK ME argc referenced below */ char *al = (argc == 5) ? argv[4]->arg : NULL; return rip_route_match_delete (vty, vty->index, "ip address", al); } @@ -893,6 +898,7 @@ DEFUN (no_match_ip_address_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { + /* CHECK ME argc referenced below */ char *plist = (argc == 6) ? argv[5]->arg : NULL; return rip_route_match_delete (vty, vty->index, "ip address prefix-list", plist); } @@ -917,6 +923,7 @@ DEFUN (no_match_tag, "Match tag of route\n" "Metric value\n") { + /* CHECK ME argc referenced below */ char *mval = (argc == 4) ? argv[3]->arg : NULL; return rip_route_match_delete (vty, vty->index, "tag", mval); } @@ -989,6 +996,7 @@ DEFUN (no_set_ip_nexthop, "Next hop address\n" "IP address of next hop\n") { + /* CHECK ME argc referenced below */ char *addr = (argc == 5) ? argv[4]->arg : NULL; return rip_route_set_delete (vty, vty->index, "ip next-hop", addr); } @@ -1013,6 +1021,7 @@ DEFUN (no_set_tag, "Tag value for routing protocol\n" "Tag value\n") { + /* CHECK ME argc referenced below */ char *tag = (argc == 4) ? argv[3]->arg : NULL; return rip_route_set_delete (vty, vty->index, "tag", tag); } diff --git a/ripngd/ripng_routemap.c b/ripngd/ripng_routemap.c index 6ecf08466..52aae9aff 100644 --- a/ripngd/ripng_routemap.c +++ b/ripngd/ripng_routemap.c @@ -519,6 +519,7 @@ DEFUN (no_match_metric, "Match metric of route\n" "Metric value\n") { + /* CHECK ME argc referenced below */ char *mval = (argc == 4) ? argv[3]->arg : NULL; return ripng_route_match_delete (vty, vty->index, "metric", mval); } @@ -543,6 +544,7 @@ DEFUN (no_match_interface, "Match first hop interface of route\n" "Interface name\n") { + /* CHECK ME argc referenced below */ char *iface = (argc == 4) ? argv[3]->arg : NULL; return ripng_route_match_delete (vty, vty->index, "interface", iface); } @@ -567,6 +569,7 @@ DEFUN (no_match_tag, "Match tag of route\n" "Metric value\n") { + /* CHECK ME argc referenced below */ char *mval = (argc == 4) ? argv[3]->arg : NULL; return ripng_route_match_delete (vty, vty->index, "tag", mval); } @@ -593,6 +596,7 @@ DEFUN (no_set_metric, "Metric value for destination routing protocol\n" "Metric value\n") { + /* CHECK ME argc referenced below */ char *mval = (argc == 4) ? argv[3]->arg : NULL; return ripng_route_set_delete (vty, vty->index, "metric", mval); } @@ -637,6 +641,7 @@ DEFUN (no_set_ipv6_nexthop_local, "IPv6 local address\n" "IPv6 address of next hop\n") { + /* CHECK ME argc referenced below */ char *addr = (argc == 6) ? argv[5]->arg : NULL; return ripng_route_set_delete (vty, vty->index, "ipv6 next-hop local", addr); } @@ -661,6 +666,7 @@ DEFUN (no_set_tag, "Tag value for routing protocol\n" "Tag value\n") { + /* CHECK ME argc referenced below */ char *tag = (argc == 4) ? argv[3]->arg : NULL; return ripng_route_set_delete (vty, vty->index, "tag", tag); } diff --git a/tools/argv_translator.py b/tools/argv_translator.py index 523954a6f..6c0d20b80 100755 --- a/tools/argv_translator.py +++ b/tools/argv_translator.py @@ -718,6 +718,18 @@ DEFUN (no_bgp_maxmed_onstartup, return used + def uses_argc(self): + for line in self.guts: + if 'CHECK ME argc referenced below' in line: + return False + + if 'use_json (argc, argv)' in line: + continue + + if 'argc' in line: + return True + return False + def dump(self): new_command_string = self.get_new_command_string() new_command_string_expanded = expand_command_string(new_command_string) @@ -730,6 +742,8 @@ DEFUN (no_bgp_maxmed_onstartup, lines.extend(self.help_strings) lines.append('{\n') + if self.uses_argc(): + lines.append(" /* CHECK ME argc referenced below */\n") lines.extend(self.guts) ''' diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index e6aebd6b1..44985adbf 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -1732,6 +1732,7 @@ DEFUN (vtysh_show_thread, "Thread CPU usage\n" "Display filter (rwtexb)\n") { + /* CHECK ME argc referenced below */ unsigned int i; int ret = CMD_SUCCESS; char line[100]; @@ -2176,6 +2177,7 @@ DEFUN (vtysh_write_terminal, "Write running configuration to memory, network, or terminal\n" "Write to terminal\n") { + /* CHECK ME argc referenced below */ u_int i; char line[] = "write terminal\n"; FILE *fp = NULL; diff --git a/zebra/interface.c b/zebra/interface.c index 676b6ed0d..f49ab4903 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1305,6 +1305,7 @@ DEFUN (show_interface, "Interface status and configuration\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ struct listnode *node; struct interface *ifp; vrf_id_t vrf_id = VRF_DEFAULT; @@ -1354,6 +1355,7 @@ DEFUN (show_interface_name_vrf, "Interface name\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ifname = 2; int idx_name = 4; struct interface *ifp; @@ -1463,6 +1465,7 @@ DEFUN (show_interface_desc, "Interface description\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 3) @@ -2080,6 +2083,7 @@ DEFUN (link_params_delay, "Maximum delay\n" "Maximum delay in micro-second as decimal (0...16777215)\n") { + /* CHECK ME argc referenced below */ /* Get and Check new delay values */ u_int32_t delay = 0, low = 0, high = 0; VTY_GET_ULONG("delay", delay, argv[1]->arg); diff --git a/zebra/router-id.c b/zebra/router-id.c index 23b8cc743..80ad0afa6 100644 --- a/zebra/router-id.c +++ b/zebra/router-id.c @@ -221,6 +221,7 @@ DEFUN (router_id, "IP address to use for router-id\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv4 = 1; int idx_name = 3; @@ -250,6 +251,7 @@ DEFUN (no_router_id, "IP address to use for router-id\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_name = 4; struct prefix rid; diff --git a/zebra/rtadv.c b/zebra/rtadv.c index 7edba5595..277cf4f06 100644 --- a/zebra/rtadv.c +++ b/zebra/rtadv.c @@ -1342,6 +1342,7 @@ DEFUN (ipv6_nd_prefix, "Do not use prefix for autoconfiguration\n" "Do not use prefix for onlink determination\n") { + /* CHECK ME argc referenced below */ /* prelude */ char *prefix = argv[3]->arg; int lifetimes = (argc > 4) && (argv[4]->type == RANGE_TKN || strmatch (argv[4]->text, "infinite")); diff --git a/zebra/test_main.c b/zebra/test_main.c index 4dd3e897f..0e850f162 100644 --- a/zebra/test_main.c +++ b/zebra/test_main.c @@ -124,6 +124,7 @@ DEFUN (test_interface_state, "up\n" "down\n") { + /* CHECK ME argc referenced below */ int idx_up_down = 1; struct interface *ifp; if (argc < 1) diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c index 6b861d780..87dc85dd2 100644 --- a/zebra/zebra_routemap.c +++ b/zebra/zebra_routemap.c @@ -314,6 +314,7 @@ DEFUN (no_match_interface, "Match first hop interface of route\n" "Interface name\n") { + /* CHECK ME argc referenced below */ char *iface = (argc == 4) ? argv[3]->arg : NULL; return zebra_route_match_delete (vty, vty->index, "interface", iface, RMAP_EVENT_MATCH_DELETED); } @@ -338,6 +339,7 @@ DEFUN (no_match_tag, MATCH_STR "Match tag of route\n") { + /* CHECK ME argc referenced below */ char *tag = (argc == 4) ? argv[3]->arg : NULL; return zebra_route_match_delete (vty, vty->index, "tag", tag, RMAP_EVENT_MATCH_DELETED); } @@ -368,6 +370,7 @@ DEFUN (no_match_ip_next_hop, "IP access-list number (expanded range)\n" "IP Access-list name\n") { + /* CHECK ME argc referenced below */ char *al = (argc == 5) ? argv[4]->arg : NULL; return zebra_route_match_delete (vty, vty->index, "ip next-hop", al, RMAP_EVENT_FILTER_DELETED); } @@ -397,6 +400,7 @@ DEFUN (no_match_ip_next_hop_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { + /* CHECK ME argc referenced below */ char *plist = (argc == 6) ? argv[5]->arg : NULL; return zebra_route_match_delete (vty, vty->index, "ip next-hop prefix-list", plist, @@ -431,6 +435,7 @@ DEFUN (no_match_ip_address, "IP access-list number (expanded range)\n" "IP Access-list name\n") { + /* CHECK ME argc referenced below */ char *al = (argc == 5) ? argv[4]->arg : NULL; return zebra_route_match_delete (vty, vty->index, "ip address", al, RMAP_EVENT_FILTER_DELETED); } @@ -460,6 +465,7 @@ DEFUN (no_match_ip_address_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { + /* CHECK ME argc referenced below */ char *plist = (argc == 6) ? argv[5]->arg : NULL; return zebra_route_match_delete (vty, vty->index, "ip address prefix-list", plist, @@ -489,6 +495,7 @@ DEFUN (no_match_ip_address_prefix_len, "Match prefixlen of ip address of route\n" "Prefix length\n") { + /* CHECK ME argc referenced below */ char *plen = (argc == 6) ? argv[5]->arg : NULL; return zebra_route_match_delete (vty, vty->index, "ip address prefix-len", plen, @@ -519,6 +526,7 @@ DEFUN (no_match_ip_nexthop_prefix_len, "Match prefix length of nexthop\n" "Prefix length\n") { + /* CHECK ME argc referenced below */ char *plen = (argc == 6) ? argv[5]->arg : NULL; return zebra_route_match_delete (vty, vty->index, "ip next-hop prefix-len", plen, @@ -552,6 +560,7 @@ DEFUN (no_match_source_protocol, "No match protocol via which the route was learnt\n" ) { + /* CHECK ME argc referenced below */ char *proto = (argc == 4) ? argv[3]->text : NULL; return zebra_route_match_delete (vty, vty->index, "source-protocol", proto, RMAP_EVENT_MATCH_DELETED); } @@ -625,6 +634,7 @@ DEFUN (no_set_src, SET_STR "Source address for route\n") { + /* CHECK ME argc referenced below */ char *ip = (argc == 4) ? argv[3]->arg : NULL; return zebra_route_set_delete (vty, vty->index, "src", ip); } @@ -708,6 +718,7 @@ DEFUN (no_ip_protocol, "Specify route map\n" "Route map name\n") { + /* CHECK ME argc referenced below */ char *proto = argv[3]->text; char *rmap = (argc == 6) ? argv[5]->arg : NULL; int i; @@ -818,6 +829,7 @@ DEFUN (no_ipv6_protocol, "Specify route map\n" "Route map name\n") { + /* CHECK ME argc referenced below */ const char *proto = argv[3]->text; const char *rmap = (argc == 6) ? argv[5]->arg : NULL; int i; @@ -924,6 +936,7 @@ DEFUN (no_ip_protocol_nht_rmap, "Specify route map\n" "Route map name\n") { + /* CHECK ME argc referenced below */ char *proto = argv[3]->text; char *rmap = (argc == 6) ? argv[5]->arg : NULL; int i; @@ -1019,6 +1032,7 @@ DEFUN (no_ipv6_protocol_nht_rmap, "Specify route map\n" "Route map name\n") { + /* CHECK ME argc referenced below */ char *proto = argv[3]->text; char *rmap = (argc == 6) ? argv[5]->arg : NULL; int i; diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index ddcffb5d4..b57634a8f 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -191,6 +191,7 @@ DEFUN (ip_mroute_dist, "Nexthop interface name\n" "Distance\n") { + /* CHECK ME argc referenced below */ char *destprefix = argv[2]->arg; char *nexthop = argv[3]->arg; char *distance = (argc == 5) ? argv[4]->arg : NULL; @@ -208,6 +209,7 @@ DEFUN (no_ip_mroute_dist, "Nexthop interface name\n" "Distance\n") { + /* CHECK ME argc referenced below */ char *destprefix = argv[2]->arg; char *nexthop = argv[3]->arg; char *distance = (argc == 5) ? argv[4]->arg : NULL; @@ -351,6 +353,7 @@ DEFUN (ip_route, "Distance value for this route\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv4_prefixlen = 2; int idx_ipv4_ifname_null = 3; int idx_curr = 4; @@ -382,6 +385,7 @@ DEFUN (ip_route_flags, "Distance value for this route\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv4_prefixlen = 2; int idx_ipv4_ifname = 3; int idx_reject_blackhole = 4; @@ -412,6 +416,7 @@ DEFUN (ip_route_flags2, "Distance value for this route\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv4_prefixlen = 2; int idx_reject_blackhole = 3; int idx_curr = 4; @@ -444,6 +449,7 @@ DEFUN (ip_route_mask, "Distance value for this route\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv4 = 2; int idx_ipv4_2 = 3; int idx_ipv4_ifname_null = 4; @@ -476,6 +482,7 @@ DEFUN (ip_route_mask_flags, "Distance value for this route\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv4 = 2; int idx_ipv4_2 = 3; int idx_ipv4_ifname = 4; @@ -509,6 +516,7 @@ DEFUN (ip_route_mask_flags2, "Distance value for this route\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv4 = 2; int idx_ipv4_2 = 3; int idx_reject_blackhole = 4; @@ -541,6 +549,7 @@ DEFUN (no_ip_route, "Distance value for this route\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv4_prefixlen = 3; int idx_ipv4_ifname_null = 4; int idx_curr = 5; @@ -571,6 +580,7 @@ DEFUN (no_ip_route_flags2, "Distance value for this route\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv4_prefixlen = 3; int idx_curr = 5; char *tag, *distance, *vrf; @@ -600,6 +610,7 @@ DEFUN (no_ip_route_mask, "Distance value for this route\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv4 = 3; int idx_ipv4_2 = 4; int idx_ipv4_ifname_null = 5; @@ -632,6 +643,7 @@ DEFUN (no_ip_route_mask_flags2, "Distance value for this route\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv4 = 3; int idx_ipv4_2 = 4; int idx_curr = 6; @@ -663,6 +675,7 @@ DEFUN (no_ip_route_flags, "Distance value for this route\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv4_prefixlen = 3; int idx_ipv4_ifname = 4; int idx_reject_blackhole = 5; @@ -697,6 +710,7 @@ DEFUN (no_ip_route_mask_flags, "Distance value for this route\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv4 = 3; int idx_ipv4_2 = 4; int idx_ipv4_ifname = 5; @@ -1139,6 +1153,7 @@ DEFUN (show_ip_route, IP_STR "IP routing table\n") { + /* CHECK ME argc referenced below */ return do_show_ip_route (vty, VRF_DEFAULT_NAME, SAFI_UNICAST, use_json(argc, argv)); } @@ -1234,6 +1249,7 @@ DEFUN (show_ip_route_vrf, "IP routing table\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_json = 5; u_char uj = use_json(argc, argv); @@ -1251,6 +1267,7 @@ DEFUN (show_ip_nht, "IP nexthop tracking table\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_vrf = 4; vrf_id_t vrf_id = VRF_DEFAULT; @@ -1291,6 +1308,7 @@ DEFUN (show_ipv6_nht, "IPv6 nexthop tracking table\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_vrf = 4; vrf_id_t vrf_id = VRF_DEFAULT; @@ -2507,6 +2525,7 @@ DEFUN (ipv6_route, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv6_prefixlen = 2; int idx_ipv6_ifname = 3; int idx_curr = 4; @@ -2539,6 +2558,7 @@ DEFUN (ipv6_route_flags, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv6_prefixlen = 2; int idx_ipv6_ifname = 3; int idx_reject_blackhole = 4; @@ -2569,6 +2589,7 @@ DEFUN (ipv6_route_ifname, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv6_prefixlen = 2; int idx_ipv6 = 3; int idx_interface = 4; @@ -2601,6 +2622,7 @@ DEFUN (ipv6_route_ifname_flags, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv6_prefixlen = 2; int idx_ipv6 = 3; int idx_interface = 4; @@ -2633,6 +2655,7 @@ DEFUN (no_ipv6_route, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv6_prefixlen = 3; int idx_ipv6_ifname = 4; int idx_curr = 5; @@ -2664,6 +2687,7 @@ DEFUN (no_ipv6_route_flags, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv6_prefixlen = 3; int idx_ipv6_ifname = 4; int idx_reject_blackhole = 5; @@ -2695,6 +2719,7 @@ DEFUN (no_ipv6_route_ifname, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv6_prefixlen = 3; int idx_ipv6 = 4; int idx_interface = 5; @@ -2728,6 +2753,7 @@ DEFUN (no_ipv6_route_ifname_flags, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { + /* CHECK ME argc referenced below */ int idx_ipv6_prefixlen = 3; int idx_ipv6 = 4; int idx_interface = 5; @@ -2755,6 +2781,7 @@ DEFUN (show_ipv6_route, VRF_CMD_HELP_STR "Output JSON\n") { + /* CHECK ME argc referenced below */ struct route_table *table; struct route_node *rn; struct rib *rib; @@ -2955,6 +2982,7 @@ DEFUN (show_ipv6_route_protocol, VRF_CMD_HELP_STR QUAGGA_IP6_REDIST_HELP_STR_ZEBRA) { + /* CHECK ME argc referenced below */ int type; struct route_table *table; struct route_node *rn; @@ -3699,6 +3727,7 @@ DEFUN (ip_zebra_import_table_distance, "route-map for filtering\n" "route-map name\n") { + /* CHECK ME argc referenced below */ u_int32_t table_id = 0; VTY_GET_INTEGER("table", table_id, argv[2]->arg); -- cgit v1.2.3 From 00d7d2d345bb027733e6a3172b6d8b87a9329b88 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Thu, 29 Sep 2016 18:21:36 +0000 Subject: bgpd and zebra: scrubbed argc CHECK MEs Signed-off-by: Daniel Walton --- bgpd/bgp_dump.c | 3 +-- bgpd/bgp_mplsvpn.c | 4 ---- bgpd/bgp_route.c | 14 -------------- bgpd/bgp_routemap.c | 20 -------------------- bgpd/bgp_vty.c | 45 +-------------------------------------------- tools/argv_translator.py | 17 +++++++++++++++-- zebra/interface.c | 7 +------ zebra/router-id.c | 2 -- zebra/test_main.c | 3 --- zebra/zebra_routemap.c | 14 -------------- zebra/zebra_vty.c | 32 ++------------------------------ 11 files changed, 20 insertions(+), 141 deletions(-) (limited to 'zebra') diff --git a/bgpd/bgp_dump.c b/bgpd/bgp_dump.c index cb2dd931d..162642d2b 100644 --- a/bgpd/bgp_dump.c +++ b/bgpd/bgp_dump.c @@ -736,7 +736,6 @@ DEFUN (dump_bgp_all, "Output filename\n" "Interval of output\n") { - /* CHECK ME argc referenced below */ int idx_dump_routes = 2; int idx_path = 3; int idx_interval = 4; @@ -766,7 +765,7 @@ DEFUN (dump_bgp_all, } /* When an interval is given */ - if (argc == 3) + if (argc == idx_interval + 1) interval = argv[idx_interval]->arg; return bgp_dump_set (vty, bgp_dump_struct, bgp_dump_type, diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c index 03d712e71..48baedcea 100644 --- a/bgpd/bgp_mplsvpn.c +++ b/bgpd/bgp_mplsvpn.c @@ -924,7 +924,6 @@ DEFUN (show_ip_bgp_vpnv4_all_neighbor_routes, "Display routes learned from neighbor\n" "JavaScript Object Notation\n") { - /* CHECK ME argc referenced below */ int idx_ipv4 = 6; union sockunion su; struct peer *peer; @@ -980,7 +979,6 @@ DEFUN (show_ip_bgp_vpnv4_rd_neighbor_routes, "Display routes learned from neighbor\n" "JavaScript Object Notation\n") { - /* CHECK ME argc referenced below */ int idx_ext_community = 5; int idx_ipv4 = 7; int ret; @@ -1053,7 +1051,6 @@ DEFUN (show_ip_bgp_vpnv4_all_neighbor_advertised_routes, "Display the routes advertised to a BGP neighbor\n" "JavaScript Object Notation\n") { - /* CHECK ME argc referenced below */ int idx_ipv4 = 6; int ret; struct peer *peer; @@ -1108,7 +1105,6 @@ DEFUN (show_ip_bgp_vpnv4_rd_neighbor_advertised_routes, "Display the routes advertised to a BGP neighbor\n" "JavaScript Object Notation\n") { - /* CHECK ME argc referenced below */ int idx_ext_community = 5; int idx_ipv4 = 7; int ret; diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index ac2d0ffc7..68a1ca7a3 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -7772,7 +7772,6 @@ DEFUN (show_ip_bgp_ipv4, "Display route and more specific routes\n" "JavaScript Object Notation\n") { - /* CHECK ME argc referenced below */ int idx_view_vrf = 3; int idx_vrf = 4; int idx_afi; @@ -7880,7 +7879,6 @@ DEFUN (show_ip_bgp_route, "Display only multipaths\n" "JavaScript Object Notation\n") { - /* CHECK ME argc referenced below */ int idx_view_vrf = 3; int idx_vrf = 4; int idx_afi; @@ -7932,7 +7930,6 @@ DEFUN (show_ip_bgp_instance_all, BGP_INSTANCE_ALL_HELP_STR "JavaScript Object Notation\n") { - /* CHECK ME argc referenced below */ u_char uj = use_json(argc, argv); /* CHECK ME we need to revisit all of the bgp_show_all_ commands */ @@ -7948,7 +7945,6 @@ DEFUN (show_bgp_instance_all, BGP_INSTANCE_ALL_HELP_STR "JavaScript Object Notation\n") { - /* CHECK ME argc referenced below */ u_char uj = use_json(argc, argv); bgp_show_all_instances_routes_vty (vty, AFI_IP6, SAFI_UNICAST, uj); @@ -8865,7 +8861,6 @@ DEFUN (show_ip_bgp_neighbor_prefix_counts, "Display detailed prefix count information\n" "JavaScript Object Notation\n") { - /* CHECK ME argc referenced below */ int idx_peer = 4; struct peer *peer; u_char uj = use_json(argc, argv); @@ -8891,7 +8886,6 @@ DEFUN (show_ip_bgp_instance_neighbor_prefix_counts, "Display detailed prefix count information\n" "JavaScript Object Notation\n") { - /* CHECK ME argc referenced below */ int idx_word = 4; int idx_peer = 6; struct peer *peer; @@ -8917,7 +8911,6 @@ DEFUN (show_bgp_ipv6_neighbor_prefix_counts, "Display detailed prefix count information\n" "JavaScript Object Notation\n") { - /* CHECK ME argc referenced below */ int idx_peer = 4; struct peer *peer; u_char uj = use_json(argc, argv); @@ -8943,7 +8936,6 @@ DEFUN (show_bgp_instance_ipv6_neighbor_prefix_counts, "Display detailed prefix count information\n" "JavaScript Object Notation\n") { - /* CHECK ME argc referenced below */ int idx_word = 3; int idx_peer = 6; struct peer *peer; @@ -8972,7 +8964,6 @@ DEFUN (show_ip_bgp_ipv4_neighbor_prefix_counts, "Display detailed prefix count information\n" "JavaScript Object Notation\n") { - /* CHECK ME argc referenced below */ int idx_safi = 4; int idx_peer = 6; struct peer *peer; @@ -9004,7 +8995,6 @@ DEFUN (show_ip_bgp_vpnv4_neighbor_prefix_counts, "Display detailed prefix count information\n" "JavaScript Object Notation\n") { - /* CHECK ME argc referenced below */ int idx_peer = 6; struct peer *peer; u_char uj = use_json(argc, argv); @@ -9281,7 +9271,6 @@ DEFUN (show_ip_bgp_instance_neighbor_advertised_route, "Name of the route map\n" "JavaScript Object Notation\n") { - /* CHECK ME argc referenced below */ int idx_view_vrf = 3; int idx_vrf = 4; int idx_afi = 5; @@ -9344,7 +9333,6 @@ DEFUN (show_ip_bgp_neighbor_received_prefix_filter, "Display the prefixlist filter\n" "JavaScript Object Notation\n") { - /* CHECK ME argc referenced below */ int idx_view_vrf = 3; int idx_vrf = 4; int idx_afi; @@ -9454,7 +9442,6 @@ DEFUN (show_ip_bgp_neighbor_routes, "Display flap statistics of the routes learned from neighbor\n" "JavaScript Object Notation\n") { - /* CHECK ME argc referenced below */ int idx_view_vrf = 3; int idx_vrf = 4; int idx_afi; @@ -9792,7 +9779,6 @@ DEFUN (bgp_damp_set, "Value to start suppressing a route\n" "Maximum duration to suppress a stable route\n") { - /* CHECK ME argc referenced below */ int idx_half_life = 2; int idx_reuse = 3; int idx_suppress = 4; diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index 7e1e20458..3ddfef4be 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -3026,7 +3026,6 @@ DEFUN (no_match_peer, "IP address of peer\n" "IPv6 address of peer\n") { - /* CHECK ME argc referenced below */ int idx_peer = 3; if (argc <= idx_peer) @@ -3065,7 +3064,6 @@ DEFUN (no_match_ip_address, "IP access-list number (expanded range)\n" "IP Access-list name\n") { - /* CHECK ME argc referenced below */ int idx_word = 4; if (argc <= idx_word) return bgp_route_match_delete (vty, vty->index, "ip address", NULL, @@ -3102,7 +3100,6 @@ DEFUN (no_match_ip_next_hop, "IP access-list number (expanded range)\n" "IP Access-list name\n") { - /* CHECK ME argc referenced below */ int idx_word = 4; if (argc <= idx_word) return bgp_route_match_delete (vty, vty->index, "ip next-hop", NULL, @@ -3134,7 +3131,6 @@ DEFUN (no_match_probability, "Match portion of routes defined by percentage value\n" "Percentage of routes\n") { - /* CHECK ME argc referenced below */ int idx_number = 3; if (argc <= idx_number) return bgp_route_match_delete (vty, vty->index, "probability", NULL, @@ -3171,7 +3167,6 @@ DEFUN (no_match_ip_route_source, "IP access-list number (expanded range)\n" "IP standard access-list name\n") { - /* CHECK ME argc referenced below */ int idx_number = 4; if (argc <= idx_number) return bgp_route_match_delete (vty, vty->index, "ip route-source", @@ -3206,7 +3201,6 @@ DEFUN (no_match_ip_address_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { - /* CHECK ME argc referenced below */ int idx_word = 5; if (argc <= idx_word) return bgp_route_match_delete (vty, vty->index, "ip address prefix-list", @@ -3240,7 +3234,6 @@ DEFUN (no_match_ip_next_hop_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { - /* CHECK ME argc referenced below */ int idx_word = 5; if (argc <= idx_word) return bgp_route_match_delete (vty, vty->index, "ip next-hop prefix-list", @@ -3275,7 +3268,6 @@ DEFUN (no_match_ip_route_source_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { - /* CHECK ME argc referenced below */ int idx_word = 5; if (argc <= idx_word) return bgp_route_match_delete (vty, vty->index, "ip route-source prefix-list", @@ -3306,7 +3298,6 @@ DEFUN (no_match_metric, "Match metric of route\n" "Metric value\n") { - /* CHECK ME argc referenced below */ int idx_number = 3; if (argc <= idx_number) return bgp_route_match_delete (vty, vty->index, "metric", @@ -3338,7 +3329,6 @@ DEFUN (no_match_local_pref, "Match local preference of route\n" "Local preference value\n") { - /* CHECK ME argc referenced below */ int idx_localpref = 3; if (argc <= idx_localpref) return bgp_route_match_delete (vty, vty->index, "local-preference", @@ -3615,7 +3605,6 @@ DEFUN (no_set_ip_nexthop, "Use peer address (for BGP only)\n" "IP address of next hop\n") { - /* CHECK ME argc referenced below */ int idx_peer = 4; if (argc <= idx_peer) return bgp_route_set_delete (vty, vty->index, "ip next-hop", NULL); @@ -3659,7 +3648,6 @@ DEFUN (no_set_metric, "Metric value for destination routing protocol\n" "Metric value\n") { - /* CHECK ME argc referenced below */ int idx_number = 3; if (argc <= idx_number) return bgp_route_set_delete (vty, vty->index, "metric", NULL); @@ -3687,7 +3675,6 @@ DEFUN (no_set_local_pref, "BGP local preference path attribute\n" "Preference value\n") { - /* CHECK ME argc referenced below */ int idx_localpref = 3; if (argc <= idx_localpref) return bgp_route_set_delete (vty, vty->index, "local-preference", NULL); @@ -3715,7 +3702,6 @@ DEFUN (no_set_weight, "BGP weight for routing table\n" "Weight value\n") { - /* CHECK ME argc referenced below */ int idx_weight = 3; if (argc <= idx_weight) return bgp_route_set_delete (vty, vty->index, "weight", NULL); @@ -4111,7 +4097,6 @@ DEFUN (no_set_aggregator_as, "AS number\n" "IP address of aggregator\n") { - /* CHECK ME argc referenced below */ int idx_asn = 4; int idx_ip = 5; int ret; @@ -4161,7 +4146,6 @@ DEFUN (no_set_tag, "Tag value for routing protocol\n" "Tag value\n") { - /* CHECK ME argc referenced below */ int idx_number = 3; if (argc <= idx_number) return bgp_route_set_delete (vty, vty->index, "tag", NULL); @@ -4342,7 +4326,6 @@ DEFUN (no_set_ipv6_nexthop_global, "IPv6 global address\n" "IPv6 address of next hop\n") { - /* CHECK ME argc referenced below */ int idx_ipv6 = 5; if (argc <= idx_ipv6) return bgp_route_set_delete (vty, vty->index, "ipv6 next-hop global", NULL); @@ -4389,7 +4372,6 @@ DEFUN (no_set_ipv6_nexthop_local, "IPv6 local address\n" "IPv6 address of next hop\n") { - /* CHECK ME argc referenced below */ int idx_ipv6 = 5; if (argc <= idx_ipv6) return bgp_route_set_delete (vty, vty->index, "ipv6 next-hop local", NULL); @@ -4420,7 +4402,6 @@ DEFUN (no_set_vpnv4_nexthop, "VPNv4 next-hop address\n" "IP address of next hop\n") { - /* CHECK ME argc referenced below */ int idx_ipv4 = 4; if (argc <= idx_ipv4) return bgp_route_set_delete (vty, vty->index, "vpnv4 next-hop", NULL); @@ -4448,7 +4429,6 @@ DEFUN (no_set_originator_id, "BGP originator ID attribute\n" "IP address of originator\n") { - /* CHECK ME argc referenced below */ int idx_id = 3; if (argc < idx_id) return bgp_route_set_delete (vty, vty->index, "originator-id", NULL); diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 362e7db0f..4e4571a01 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -664,7 +664,6 @@ DEFUN (router_bgp, AS_STR BGP_INSTANCE_HELP_STR) { - /* CHECK ME argc referenced below */ int idx_asn = 2; int idx_view_vrf = 3; int idx_vrf = 4; @@ -745,7 +744,6 @@ DEFUN (no_router_bgp, AS_STR BGP_INSTANCE_HELP_STR) { - /* CHECK ME argc referenced below */ int idx_asn = 3; int idx_vrf = 5; as_t as; @@ -829,7 +827,6 @@ DEFUN (no_bgp_router_id, "Override configured router identifier\n" "Manually configured router identifier\n") { - /* CHECK ME argc referenced below */ int idx_router_id = 3; int ret; struct in_addr id; @@ -1111,21 +1108,12 @@ DEFUN (bgp_maxmed_onstartup, "Effective on a startup\n" "Time (seconds) period for max-med\n") { - /* CHECK ME argc referenced below */ int idx_number = 3; struct bgp *bgp; bgp = vty->index; - - if (argc != 1) - { - vty_out (vty, "%% Must supply max-med on-startup period"); - return CMD_WARNING; - } - VTY_GET_INTEGER ("max-med on-startup period", bgp->v_maxmed_onstartup, argv[idx_number]->arg); bgp->maxmed_onstartup_value = BGP_MAXMED_VALUE_DEFAULT; - bgp_maxmed_update(bgp); return CMD_SUCCESS; @@ -1140,22 +1128,13 @@ DEFUN (bgp_maxmed_onstartup_medv, "Time (seconds) period for max-med\n" "Max MED value to be used\n") { - /* CHECK ME argc referenced below */ int idx_number = 3; int idx_number_2 = 4; struct bgp *bgp; bgp = vty->index; - - if (argc != 2) - { - vty_out (vty, "%% Must supply max-med on-startup period and med value"); - return CMD_WARNING; - } - VTY_GET_INTEGER ("max-med on-startup period", bgp->v_maxmed_onstartup, argv[idx_number]->arg); VTY_GET_INTEGER ("max-med on-startup med-value", bgp->maxmed_onstartup_value, argv[idx_number_2]->arg); - bgp_maxmed_update(bgp); return CMD_SUCCESS; @@ -2785,7 +2764,6 @@ DEFUN (neighbor_interface_config, "Member of the peer-group\n" "peer-group name\n") { - /* CHECK ME argc referenced below */ int idx_word = 1; int idx_peer_group_word = 4; @@ -2807,7 +2785,6 @@ DEFUN (neighbor_interface_config_v6only, "Member of the peer-group\n" "peer-group name\n") { - /* CHECK ME argc referenced below */ int idx_word = 1; int idx_peer_group_word = 5; @@ -4934,13 +4911,9 @@ DEFUN (neighbor_interface, "Interface\n" "Interface name\n") { - /* CHECK ME argc referenced below */ int idx_ip = 1; int idx_word = 3; - if (argc == 3) - return peer_interface_vty (vty, argv[idx_ip]->arg, argv[idx_word]->arg); - else - return peer_interface_vty (vty, argv[idx_ip]->arg, argv[idx_word]->arg); + return peer_interface_vty (vty, argv[idx_ip]->arg, argv[idx_word]->arg); } DEFUN (no_neighbor_interface, @@ -5530,7 +5503,6 @@ DEFUN (neighbor_allowas_in, "Accept as-path with my AS present in it\n" "Number of occurances of AS number\n") { - /* CHECK ME argc referenced below */ int idx_peer = 1; int idx_number = 3; int ret; @@ -6024,7 +5996,6 @@ DEFUN (clear_ip_bgp_all, BGP_SOFT_IN_STR BGP_SOFT_OUT_STR) { - /* CHECK ME argc referenced below */ int idx_view_vrf = 3; int idx_vrf = 4; int idx_clr_sort = 5; @@ -6218,7 +6189,6 @@ DEFUN (show_bgp_vrfs, "Show BGP VRFs\n" "JavaScript Object Notation\n") { - /* CHECK ME argc referenced below */ struct list *inst = bm->bgp; struct listnode *node; struct bgp *bgp; @@ -6874,7 +6844,6 @@ DEFUN (show_ip_bgp_summary, "Summary of BGP neighbor status\n" "JavaScript Object Notation\n") { - /* CHECK ME argc referenced below */ int idx_view_vrf = 3; int idx_vrf = 4; int idx_afi; @@ -6901,7 +6870,6 @@ DEFUN (show_ip_bgp_instance_all_summary, "Summary of BGP neighbor status\n" "JavaScript Object Notation\n") { - /* CHECK ME argc referenced below */ u_char uj = use_json(argc, argv); bgp_show_all_instances_summary_vty (vty, AFI_IP, SAFI_UNICAST, uj); @@ -8753,7 +8721,6 @@ DEFUN (show_ip_bgp_neighbors, "Neighbor on bgp configured interface\n" "JavaScript Object Notation\n") { - /* CHECK ME argc referenced below */ int idx_ip = 1; int idx_view_vrf = 3; int idx_vrf = 4; @@ -8801,7 +8768,6 @@ DEFUN (show_ip_bgp_instance_all_neighbors, "Detailed information on TCP and BGP neighbor connections\n" "JavaScript Object Notation\n") { - /* CHECK ME argc referenced below */ u_char uj = use_json(argc, argv); bgp_show_all_instances_neighbors_vty (vty, uj); @@ -8936,7 +8902,6 @@ DEFUN (show_ip_bgp_updgrps, "Detailed info about dynamic update groups\n" "Specific subgroup to display detailed info for\n") { - /* CHECK ME argc referenced below */ int idx_view_vrf = 3; int idx_vrf = 4; int idx_afi; @@ -11321,7 +11286,6 @@ DEFUN (ip_community_list_standard, "Specify community to accept\n" COMMUNITY_VAL_STR) { - /* CHECK ME argc referenced below */ return community_list_set_vty (vty, argc, argv, COMMUNITY_LIST_STANDARD); } @@ -11338,7 +11302,6 @@ DEFUN (no_ip_community_list_standard_all, "Specify community to accept\n" COMMUNITY_VAL_STR) { - /* CHECK ME argc referenced below */ return community_list_unset_vty (vty, argc, argv, COMMUNITY_LIST_STANDARD); } @@ -11355,7 +11318,6 @@ DEFUN (ip_community_list_expanded_all, "Specify community to accept\n" COMMUNITY_VAL_STR) { - /* CHECK ME argc referenced below */ return community_list_set_vty (vty, argc, argv, COMMUNITY_LIST_EXPANDED); } @@ -11372,7 +11334,6 @@ DEFUN (no_ip_community_list_expanded_all, "Specify community to accept\n" COMMUNITY_VAL_STR) { - /* CHECK ME argc referenced below */ return community_list_unset_vty (vty, argc, argv, COMMUNITY_LIST_EXPANDED); } @@ -11564,7 +11525,6 @@ DEFUN (ip_extcommunity_list_standard, "Specify community to accept\n" EXTCOMMUNITY_VAL_STR) { - /* CHECK ME argc referenced below */ return extcommunity_list_set_vty (vty, argc, argv, EXTCOMMUNITY_LIST_STANDARD); } @@ -11580,7 +11540,6 @@ DEFUN (ip_extcommunity_list_name_expanded, "Specify community to accept\n" "An ordered list as a regular-expression\n") { - /* CHECK ME argc referenced below */ return extcommunity_list_set_vty (vty, argc, argv, EXTCOMMUNITY_LIST_EXPANDED); } @@ -11597,7 +11556,6 @@ DEFUN (no_ip_extcommunity_list_standard_all, "Specify community to accept\n" EXTCOMMUNITY_VAL_STR) { - /* CHECK ME argc referenced below */ return extcommunity_list_unset_vty (vty, argc, argv, EXTCOMMUNITY_LIST_EXPANDED); } @@ -11614,7 +11572,6 @@ DEFUN (no_ip_extcommunity_list_expanded_all, "Specify community to accept\n" "An ordered list as a regular-expression\n") { - /* CHECK ME argc referenced below */ return extcommunity_list_unset_vty (vty, argc, argv, EXTCOMMUNITY_LIST_EXPANDED); } diff --git a/tools/argv_translator.py b/tools/argv_translator.py index 6c0d20b80..02e7bac68 100755 --- a/tools/argv_translator.py +++ b/tools/argv_translator.py @@ -726,6 +726,18 @@ DEFUN (no_bgp_maxmed_onstartup, if 'use_json (argc, argv)' in line: continue + if 'use_json(argc, argv)' in line: + continue + + if 'bgp_get_argv_vrf (argc,)' in line: + continue + + if 'bgp_get_argv_afi_safi (argc,' in line: + continue + + if 'zebra_vty_ip_route_tdv_helper (argc,' in line: + continue + if 'argc' in line: return True return False @@ -742,8 +754,9 @@ DEFUN (no_bgp_maxmed_onstartup, lines.extend(self.help_strings) lines.append('{\n') - if self.uses_argc(): - lines.append(" /* CHECK ME argc referenced below */\n") + # uncomment this to do ospf_vty.c + # if self.uses_argc(): + # lines.append(" /* CHECK ME argc referenced below */\n") lines.extend(self.guts) ''' diff --git a/zebra/interface.c b/zebra/interface.c index f49ab4903..62340a460 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1305,7 +1305,6 @@ DEFUN (show_interface, "Interface status and configuration\n" VRF_CMD_HELP_STR) { - /* CHECK ME argc referenced below */ struct listnode *node; struct interface *ifp; vrf_id_t vrf_id = VRF_DEFAULT; @@ -1355,7 +1354,6 @@ DEFUN (show_interface_name_vrf, "Interface name\n" VRF_CMD_HELP_STR) { - /* CHECK ME argc referenced below */ int idx_ifname = 2; int idx_name = 4; struct interface *ifp; @@ -1363,8 +1361,7 @@ DEFUN (show_interface_name_vrf, interface_update_stats (); - if (argc > 1) - VRF_GET_ID (vrf_id, argv[idx_name]->arg); + VRF_GET_ID (vrf_id, argv[idx_name]->arg); /* Specified interface print. */ ifp = if_lookup_by_name_vrf (argv[idx_ifname]->arg, vrf_id); @@ -1465,7 +1462,6 @@ DEFUN (show_interface_desc, "Interface description\n" VRF_CMD_HELP_STR) { - /* CHECK ME argc referenced below */ vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 3) @@ -2083,7 +2079,6 @@ DEFUN (link_params_delay, "Maximum delay\n" "Maximum delay in micro-second as decimal (0...16777215)\n") { - /* CHECK ME argc referenced below */ /* Get and Check new delay values */ u_int32_t delay = 0, low = 0, high = 0; VTY_GET_ULONG("delay", delay, argv[1]->arg); diff --git a/zebra/router-id.c b/zebra/router-id.c index 80ad0afa6..23b8cc743 100644 --- a/zebra/router-id.c +++ b/zebra/router-id.c @@ -221,7 +221,6 @@ DEFUN (router_id, "IP address to use for router-id\n" VRF_CMD_HELP_STR) { - /* CHECK ME argc referenced below */ int idx_ipv4 = 1; int idx_name = 3; @@ -251,7 +250,6 @@ DEFUN (no_router_id, "IP address to use for router-id\n" VRF_CMD_HELP_STR) { - /* CHECK ME argc referenced below */ int idx_name = 4; struct prefix rid; diff --git a/zebra/test_main.c b/zebra/test_main.c index 0e850f162..d3813d735 100644 --- a/zebra/test_main.c +++ b/zebra/test_main.c @@ -124,11 +124,8 @@ DEFUN (test_interface_state, "up\n" "down\n") { - /* CHECK ME argc referenced below */ int idx_up_down = 1; struct interface *ifp; - if (argc < 1) - return CMD_WARNING; ifp = vty->index; if (ifp->ifindex == IFINDEX_INTERNAL) diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c index 87dc85dd2..6b861d780 100644 --- a/zebra/zebra_routemap.c +++ b/zebra/zebra_routemap.c @@ -314,7 +314,6 @@ DEFUN (no_match_interface, "Match first hop interface of route\n" "Interface name\n") { - /* CHECK ME argc referenced below */ char *iface = (argc == 4) ? argv[3]->arg : NULL; return zebra_route_match_delete (vty, vty->index, "interface", iface, RMAP_EVENT_MATCH_DELETED); } @@ -339,7 +338,6 @@ DEFUN (no_match_tag, MATCH_STR "Match tag of route\n") { - /* CHECK ME argc referenced below */ char *tag = (argc == 4) ? argv[3]->arg : NULL; return zebra_route_match_delete (vty, vty->index, "tag", tag, RMAP_EVENT_MATCH_DELETED); } @@ -370,7 +368,6 @@ DEFUN (no_match_ip_next_hop, "IP access-list number (expanded range)\n" "IP Access-list name\n") { - /* CHECK ME argc referenced below */ char *al = (argc == 5) ? argv[4]->arg : NULL; return zebra_route_match_delete (vty, vty->index, "ip next-hop", al, RMAP_EVENT_FILTER_DELETED); } @@ -400,7 +397,6 @@ DEFUN (no_match_ip_next_hop_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { - /* CHECK ME argc referenced below */ char *plist = (argc == 6) ? argv[5]->arg : NULL; return zebra_route_match_delete (vty, vty->index, "ip next-hop prefix-list", plist, @@ -435,7 +431,6 @@ DEFUN (no_match_ip_address, "IP access-list number (expanded range)\n" "IP Access-list name\n") { - /* CHECK ME argc referenced below */ char *al = (argc == 5) ? argv[4]->arg : NULL; return zebra_route_match_delete (vty, vty->index, "ip address", al, RMAP_EVENT_FILTER_DELETED); } @@ -465,7 +460,6 @@ DEFUN (no_match_ip_address_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { - /* CHECK ME argc referenced below */ char *plist = (argc == 6) ? argv[5]->arg : NULL; return zebra_route_match_delete (vty, vty->index, "ip address prefix-list", plist, @@ -495,7 +489,6 @@ DEFUN (no_match_ip_address_prefix_len, "Match prefixlen of ip address of route\n" "Prefix length\n") { - /* CHECK ME argc referenced below */ char *plen = (argc == 6) ? argv[5]->arg : NULL; return zebra_route_match_delete (vty, vty->index, "ip address prefix-len", plen, @@ -526,7 +519,6 @@ DEFUN (no_match_ip_nexthop_prefix_len, "Match prefix length of nexthop\n" "Prefix length\n") { - /* CHECK ME argc referenced below */ char *plen = (argc == 6) ? argv[5]->arg : NULL; return zebra_route_match_delete (vty, vty->index, "ip next-hop prefix-len", plen, @@ -560,7 +552,6 @@ DEFUN (no_match_source_protocol, "No match protocol via which the route was learnt\n" ) { - /* CHECK ME argc referenced below */ char *proto = (argc == 4) ? argv[3]->text : NULL; return zebra_route_match_delete (vty, vty->index, "source-protocol", proto, RMAP_EVENT_MATCH_DELETED); } @@ -634,7 +625,6 @@ DEFUN (no_set_src, SET_STR "Source address for route\n") { - /* CHECK ME argc referenced below */ char *ip = (argc == 4) ? argv[3]->arg : NULL; return zebra_route_set_delete (vty, vty->index, "src", ip); } @@ -718,7 +708,6 @@ DEFUN (no_ip_protocol, "Specify route map\n" "Route map name\n") { - /* CHECK ME argc referenced below */ char *proto = argv[3]->text; char *rmap = (argc == 6) ? argv[5]->arg : NULL; int i; @@ -829,7 +818,6 @@ DEFUN (no_ipv6_protocol, "Specify route map\n" "Route map name\n") { - /* CHECK ME argc referenced below */ const char *proto = argv[3]->text; const char *rmap = (argc == 6) ? argv[5]->arg : NULL; int i; @@ -936,7 +924,6 @@ DEFUN (no_ip_protocol_nht_rmap, "Specify route map\n" "Route map name\n") { - /* CHECK ME argc referenced below */ char *proto = argv[3]->text; char *rmap = (argc == 6) ? argv[5]->arg : NULL; int i; @@ -1032,7 +1019,6 @@ DEFUN (no_ipv6_protocol_nht_rmap, "Specify route map\n" "Route map name\n") { - /* CHECK ME argc referenced below */ char *proto = argv[3]->text; char *rmap = (argc == 6) ? argv[5]->arg : NULL; int i; diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index b57634a8f..02b68201e 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -191,7 +191,6 @@ DEFUN (ip_mroute_dist, "Nexthop interface name\n" "Distance\n") { - /* CHECK ME argc referenced below */ char *destprefix = argv[2]->arg; char *nexthop = argv[3]->arg; char *distance = (argc == 5) ? argv[4]->arg : NULL; @@ -209,7 +208,6 @@ DEFUN (no_ip_mroute_dist, "Nexthop interface name\n" "Distance\n") { - /* CHECK ME argc referenced below */ char *destprefix = argv[2]->arg; char *nexthop = argv[3]->arg; char *distance = (argc == 5) ? argv[4]->arg : NULL; @@ -353,7 +351,6 @@ DEFUN (ip_route, "Distance value for this route\n" VRF_CMD_HELP_STR) { - /* CHECK ME argc referenced below */ int idx_ipv4_prefixlen = 2; int idx_ipv4_ifname_null = 3; int idx_curr = 4; @@ -385,7 +382,6 @@ DEFUN (ip_route_flags, "Distance value for this route\n" VRF_CMD_HELP_STR) { - /* CHECK ME argc referenced below */ int idx_ipv4_prefixlen = 2; int idx_ipv4_ifname = 3; int idx_reject_blackhole = 4; @@ -416,7 +412,6 @@ DEFUN (ip_route_flags2, "Distance value for this route\n" VRF_CMD_HELP_STR) { - /* CHECK ME argc referenced below */ int idx_ipv4_prefixlen = 2; int idx_reject_blackhole = 3; int idx_curr = 4; @@ -449,7 +444,6 @@ DEFUN (ip_route_mask, "Distance value for this route\n" VRF_CMD_HELP_STR) { - /* CHECK ME argc referenced below */ int idx_ipv4 = 2; int idx_ipv4_2 = 3; int idx_ipv4_ifname_null = 4; @@ -482,7 +476,6 @@ DEFUN (ip_route_mask_flags, "Distance value for this route\n" VRF_CMD_HELP_STR) { - /* CHECK ME argc referenced below */ int idx_ipv4 = 2; int idx_ipv4_2 = 3; int idx_ipv4_ifname = 4; @@ -516,7 +509,6 @@ DEFUN (ip_route_mask_flags2, "Distance value for this route\n" VRF_CMD_HELP_STR) { - /* CHECK ME argc referenced below */ int idx_ipv4 = 2; int idx_ipv4_2 = 3; int idx_reject_blackhole = 4; @@ -549,7 +541,6 @@ DEFUN (no_ip_route, "Distance value for this route\n" VRF_CMD_HELP_STR) { - /* CHECK ME argc referenced below */ int idx_ipv4_prefixlen = 3; int idx_ipv4_ifname_null = 4; int idx_curr = 5; @@ -580,7 +571,6 @@ DEFUN (no_ip_route_flags2, "Distance value for this route\n" VRF_CMD_HELP_STR) { - /* CHECK ME argc referenced below */ int idx_ipv4_prefixlen = 3; int idx_curr = 5; char *tag, *distance, *vrf; @@ -610,7 +600,6 @@ DEFUN (no_ip_route_mask, "Distance value for this route\n" VRF_CMD_HELP_STR) { - /* CHECK ME argc referenced below */ int idx_ipv4 = 3; int idx_ipv4_2 = 4; int idx_ipv4_ifname_null = 5; @@ -643,7 +632,6 @@ DEFUN (no_ip_route_mask_flags2, "Distance value for this route\n" VRF_CMD_HELP_STR) { - /* CHECK ME argc referenced below */ int idx_ipv4 = 3; int idx_ipv4_2 = 4; int idx_curr = 6; @@ -675,7 +663,6 @@ DEFUN (no_ip_route_flags, "Distance value for this route\n" VRF_CMD_HELP_STR) { - /* CHECK ME argc referenced below */ int idx_ipv4_prefixlen = 3; int idx_ipv4_ifname = 4; int idx_reject_blackhole = 5; @@ -710,7 +697,6 @@ DEFUN (no_ip_route_mask_flags, "Distance value for this route\n" VRF_CMD_HELP_STR) { - /* CHECK ME argc referenced below */ int idx_ipv4 = 3; int idx_ipv4_2 = 4; int idx_ipv4_ifname = 5; @@ -1153,7 +1139,6 @@ DEFUN (show_ip_route, IP_STR "IP routing table\n") { - /* CHECK ME argc referenced below */ return do_show_ip_route (vty, VRF_DEFAULT_NAME, SAFI_UNICAST, use_json(argc, argv)); } @@ -1249,14 +1234,11 @@ DEFUN (show_ip_route_vrf, "IP routing table\n" VRF_CMD_HELP_STR) { - /* CHECK ME argc referenced below */ + int idx_vrf = 4; int idx_json = 5; u_char uj = use_json(argc, argv); - if (argc == 1 && uj) - return do_show_ip_route (vty, NULL, SAFI_UNICAST, uj); - else - return do_show_ip_route (vty, argv[idx_json]->arg, SAFI_UNICAST, uj); + return do_show_ip_route (vty, argv[idx_vrf]->arg, SAFI_UNICAST, uj); } DEFUN (show_ip_nht, @@ -1267,7 +1249,6 @@ DEFUN (show_ip_nht, "IP nexthop tracking table\n" VRF_CMD_HELP_STR) { - /* CHECK ME argc referenced below */ int idx_vrf = 4; vrf_id_t vrf_id = VRF_DEFAULT; @@ -1308,7 +1289,6 @@ DEFUN (show_ipv6_nht, "IPv6 nexthop tracking table\n" VRF_CMD_HELP_STR) { - /* CHECK ME argc referenced below */ int idx_vrf = 4; vrf_id_t vrf_id = VRF_DEFAULT; @@ -2525,7 +2505,6 @@ DEFUN (ipv6_route, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - /* CHECK ME argc referenced below */ int idx_ipv6_prefixlen = 2; int idx_ipv6_ifname = 3; int idx_curr = 4; @@ -2558,7 +2537,6 @@ DEFUN (ipv6_route_flags, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - /* CHECK ME argc referenced below */ int idx_ipv6_prefixlen = 2; int idx_ipv6_ifname = 3; int idx_reject_blackhole = 4; @@ -2589,7 +2567,6 @@ DEFUN (ipv6_route_ifname, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - /* CHECK ME argc referenced below */ int idx_ipv6_prefixlen = 2; int idx_ipv6 = 3; int idx_interface = 4; @@ -2622,7 +2599,6 @@ DEFUN (ipv6_route_ifname_flags, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - /* CHECK ME argc referenced below */ int idx_ipv6_prefixlen = 2; int idx_ipv6 = 3; int idx_interface = 4; @@ -2655,7 +2631,6 @@ DEFUN (no_ipv6_route, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - /* CHECK ME argc referenced below */ int idx_ipv6_prefixlen = 3; int idx_ipv6_ifname = 4; int idx_curr = 5; @@ -2687,7 +2662,6 @@ DEFUN (no_ipv6_route_flags, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - /* CHECK ME argc referenced below */ int idx_ipv6_prefixlen = 3; int idx_ipv6_ifname = 4; int idx_reject_blackhole = 5; @@ -2719,7 +2693,6 @@ DEFUN (no_ipv6_route_ifname, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - /* CHECK ME argc referenced below */ int idx_ipv6_prefixlen = 3; int idx_ipv6 = 4; int idx_interface = 5; @@ -2753,7 +2726,6 @@ DEFUN (no_ipv6_route_ifname_flags, "Distance value for this prefix\n" VRF_CMD_HELP_STR) { - /* CHECK ME argc referenced below */ int idx_ipv6_prefixlen = 3; int idx_ipv6 = 4; int idx_interface = 5; -- cgit v1.2.3 From 58749582a9a2c5930d907d88a3ad0d0c5c24f627 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Fri, 30 Sep 2016 00:16:31 +0000 Subject: all: scrubbed some argc CHECK MEs Signed-off-by: Daniel Walton --- bgpd/bgp_filter.c | 6 ++---- bgpd/bgp_routemap.c | 28 ++++++++++++++-------------- bgpd/bgp_vty.c | 15 ++++++--------- lib/command.c | 23 ++++++++--------------- lib/filter.c | 10 ++++------ lib/grammar_sandbox.c | 12 ++++++------ lib/if.c | 9 +++------ lib/plist.c | 10 ++++------ lib/routemap.c | 6 ++---- lib/vty.c | 1 - ospfd/ospf_dump.c | 4 ---- ospfd/ospf_ri.c | 1 - ospfd/ospf_routemap.c | 9 --------- pimd/pim_cmd.c | 12 ++++++------ zebra/rtadv.c | 1 - zebra/zebra_vty.c | 4 ---- 16 files changed, 55 insertions(+), 96 deletions(-) (limited to 'zebra') diff --git a/bgpd/bgp_filter.c b/bgpd/bgp_filter.c index 255f6c2b6..cee68e4d4 100644 --- a/bgpd/bgp_filter.c +++ b/bgpd/bgp_filter.c @@ -437,7 +437,6 @@ DEFUN (ip_as_path, "Specify packets to forward\n" "A regular-expression to match the BGP AS paths\n") { - /* CHECK ME argc referenced below */ int idx_word = 3; int idx_permit_deny = 4; enum as_filter_type type; @@ -458,7 +457,7 @@ DEFUN (ip_as_path, } /* Check AS path regex. */ - regstr = argv_concat(argv, argc, 2); + regstr = argv_concat(argv, argc, idx_permit_deny); regex = bgp_regcomp (regstr); if (!regex) @@ -497,7 +496,6 @@ DEFUN (no_ip_as_path, "Specify packets to forward\n" "A regular-expression to match the BGP AS paths\n") { - /* CHECK ME argc referenced below */ int idx_word = 4; int idx_permit_deny = 5; enum as_filter_type type; @@ -527,7 +525,7 @@ DEFUN (no_ip_as_path, } /* Compile AS path. */ - regstr = argv_concat(argv, argc, 2); + regstr = argv_concat(argv, argc, idx_permit_deny); regex = bgp_regcomp (regstr); if (!regex) diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index 3ddfef4be..d57d58866 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -3719,11 +3719,11 @@ DEFUN (set_aspath_prepend, "Use the peer's AS-number\n" "Number of times to insert") { - /* CHECK ME argc referenced below */ + int idx_asn = 3; int ret; char *str; - str = argv_concat (argv, argc, 0); + str = argv_concat (argv, argc, idx_asn); ret = bgp_route_set_add (vty, vty->index, "as-path prepend", str); XFREE (MTYPE_TMP, str); @@ -3740,11 +3740,11 @@ DEFUN (no_set_aspath_prepend, "Prepend to the as-path\n" "AS number\n") { - /* CHECK ME argc referenced below */ + int idx_asn = 4; int ret; char *str; - str = argv_concat (argv, argc, 0); + str = argv_concat (argv, argc, idx_asn); ret = bgp_route_set_delete (vty, vty->index, "as-path prepend", str); XFREE (MTYPE_TMP, str); return ret; @@ -3759,11 +3759,11 @@ DEFUN (set_aspath_exclude, "Exclude from the as-path\n" "AS number\n") { - /* CHECK ME argc referenced below */ + int idx_asn = 3; int ret; char *str; - str = argv_concat (argv, argc, 0); + str = argv_concat (argv, argc, idx_asn); ret = bgp_route_set_add (vty, vty->index, "as-path exclude", str); XFREE (MTYPE_TMP, str); return ret; @@ -3778,11 +3778,11 @@ DEFUN (no_set_aspath_exclude, "Exclude from the as-path\n" "AS number\n") { - /* CHECK ME argc referenced below */ + int idx_asn = 4; int ret; char *str; - str = argv_concat (argv, argc, 0); + str = argv_concat (argv, argc, idx_asn); ret = bgp_route_set_delete (vty, vty->index, "as-path exclude", str); XFREE (MTYPE_TMP, str); return ret; @@ -3796,7 +3796,7 @@ DEFUN (set_community, "BGP community attribute\n" COMMUNITY_VAL_STR) { - /* CHECK ME argc referenced below */ + int idx_aa_nn = 2; int i; int first = 0; int additive = 0; @@ -3808,7 +3808,7 @@ DEFUN (set_community, b = buffer_new (1024); - for (i = 0; i < argc; i++) + for (i = idx_aa_nn; i < argc; i++) { if (strncmp (argv[i]->arg, "additive", strlen (argv[i]->arg)) == 0) { @@ -3947,11 +3947,11 @@ DEFUN (set_ecommunity_rt, "Route Target extended community\n" "VPN extended community\n") { - /* CHECK ME argc referenced below */ + int idx_asn_nn = 3; int ret; char *str; - str = argv_concat (argv, argc, 0); + str = argv_concat (argv, argc, idx_asn_nn); ret = bgp_route_set_add (vty, vty->index, "extcommunity rt", str); XFREE (MTYPE_TMP, str); @@ -3978,11 +3978,11 @@ DEFUN (set_ecommunity_soo, "Site-of-Origin extended community\n" "VPN extended community\n") { - /* CHECK ME argc referenced below */ + int idx_asn_nn = 3; int ret; char *str; - str = argv_concat (argv, argc, 0); + str = argv_concat (argv, argc, idx_asn_nn); ret = bgp_route_set_add (vty, vty->index, "extcommunity soo", str); XFREE (MTYPE_TMP, str); return ret; diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 4e4571a01..0ced86023 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -949,14 +949,14 @@ DEFUN (bgp_confederation_peers, "Peer ASs in BGP confederation\n" AS_STR) { - /* CHECK ME argc referenced below */ + int idx_asn = 3; struct bgp *bgp; as_t as; int i; bgp = vty->index; - for (i = 0; i < argc; i++) + for (i = idx_asn; i < argc; i++) { VTY_GET_INTEGER_RANGE ("AS", as, argv[i]->arg, 1, BGP_AS4_MAX); @@ -981,14 +981,14 @@ DEFUN (no_bgp_confederation_peers, "Peer ASs in BGP confederation\n" AS_STR) { - /* CHECK ME argc referenced below */ + int idx_asn = 4; struct bgp *bgp; as_t as; int i; bgp = vty->index; - for (i = 0; i < argc; i++) + for (i = idx_asn; i < argc; i++) { VTY_GET_INTEGER_RANGE ("AS", as, argv[i]->arg, 1, BGP_AS4_MAX); @@ -4329,8 +4329,8 @@ DEFUN (neighbor_description, "Neighbor specific description\n" "Up to 80 characters describing this neighbor\n") { - /* CHECK ME argc referenced below */ int idx_peer = 1; + int idx_line = 3; struct peer *peer; char *str; @@ -4338,10 +4338,7 @@ DEFUN (neighbor_description, if (! peer) return CMD_WARNING; - if (argc == 1) - return CMD_SUCCESS; - - str = argv_concat(argv, argc, 1); + str = argv_concat(argv, argc, idx_line); peer_description_set (peer, str); diff --git a/lib/command.c b/lib/command.c index 4be178e12..95d69cdbf 100644 --- a/lib/command.c +++ b/lib/command.c @@ -1016,7 +1016,6 @@ DEFUN (config_quit, "quit", "Exit current mode and down to previous mode\n") { - /* CHECK ME argc referenced below */ return config_exit (self, vty, argc, argv); } @@ -1138,7 +1137,6 @@ DEFUN (config_write, "Write configuration currently in memory\n" "Write configuration to terminal\n") { - /* CHECK ME argc referenced below */ int idx_type = 1; unsigned int i; int fd; @@ -1284,7 +1282,6 @@ DEFUN (show_running_config, SHOW_STR "running configuration (same as write terminal/memory)\n") { - /* CHECK ME argc referenced below */ return config_write (self, vty, argc, argv); } @@ -1296,7 +1293,6 @@ DEFUN (copy_runningconf_startupconf, "Copy running config to... \n" "Copy running config to startup config (same as write file)\n") { - /* CHECK ME argc referenced below */ return config_write (self, vty, argc, argv); } /** -- **/ @@ -1378,7 +1374,6 @@ DEFUN (config_password, "Specifies a HIDDEN password will follow\n" "The password string\n") { - /* CHECK ME argc referenced below */ int idx_8 = 1; int idx_word = 2; if (argc == 3) // '8' was specified @@ -1425,9 +1420,9 @@ DEFUN (config_enable_password, "dummy string \n" "The HIDDEN 'enable' password string\n") { - /* CHECK ME argc referenced below */ int idx_8 = 2; int idx_word = 3; + /* Crypt type is specified. */ if (argc == 4) { @@ -1618,7 +1613,7 @@ DEFUN_HIDDEN (do_echo, { char *message; - vty_out (vty, "%s%s", ((message = argv_concat (argv, argc, 0)) ? message : ""), + vty_out (vty, "%s%s", ((message = argv_concat (argv, argc, 1)) ? message : ""), VTY_NEWLINE); if (message) XFREE(MTYPE_TMP, message); @@ -1632,15 +1627,15 @@ DEFUN (config_logmsg, LOG_LEVEL_DESC "The message to send\n") { - /* CHECK ME argc referenced below */ int idx_log_level = 1; + int idx_message = 2; int level; char *message; if ((level = level_match(argv[idx_log_level]->arg)) == ZLOG_DISABLED) return CMD_ERR_NO_MATCH; - zlog(NULL, level, "%s", ((message = argv_concat(argv, argc, 1)) ? message : "")); + zlog(NULL, level, "%s", ((message = argv_concat(argv, argc, idx_message)) ? message : "")); if (message) XFREE(MTYPE_TMP, message); return CMD_SUCCESS; @@ -1706,9 +1701,9 @@ DEFUN (config_log_stdout, "Set stdout logging level\n" LOG_LEVEL_DESC) { - /* CHECK ME argc referenced below */ int idx_log_level = 2; - if (argc == 2) + + if (argc == idx_log_level) { zlog_set_level (NULL, ZLOG_DEST_STDOUT, zlog_default->default_lvl); return CMD_SUCCESS; @@ -1740,9 +1735,9 @@ DEFUN (config_log_monitor, "Set terminal line (monitor) logging level\n" LOG_LEVEL_DESC) { - /* CHECK ME argc referenced below */ int idx_log_level = 2; - if (argc == 2) + + if (argc == idx_log_level) { zlog_set_level (NULL, ZLOG_DEST_MONITOR, zlog_default->default_lvl); return CMD_SUCCESS; @@ -1829,7 +1824,6 @@ DEFUN (config_log_file, "Logging filename\n" LOG_LEVEL_DESC) { - /* CHECK ME argc referenced below */ int idx_filename = 2; int idx_log_levels = 3; if (argc == 4) @@ -1870,7 +1864,6 @@ DEFUN (config_log_syslog, "Set syslog logging level\n" LOG_LEVEL_DESC) { - /* CHECK ME argc referenced below */ int idx_log_levels = 2; if (argc == 3) { diff --git a/lib/filter.c b/lib/filter.c index fd80b2a63..501b28f2d 100644 --- a/lib/filter.c +++ b/lib/filter.c @@ -1480,8 +1480,8 @@ DEFUN (access_list_remark, "Access list entry comment\n" "Comment up to 100 characters\n") { - /* CHECK ME argc referenced below */ int idx_acl = 1; + int idx_remark = 3; struct access_list *access; access = access_list_get (AFI_IP, argv[idx_acl]->arg); @@ -1491,7 +1491,7 @@ DEFUN (access_list_remark, XFREE (MTYPE_TMP, access->remark); access->remark = NULL; } - access->remark = argv_concat(argv, argc, 1); + access->remark = argv_concat(argv, argc, idx_remark); return CMD_SUCCESS; } @@ -1526,7 +1526,6 @@ DEFUN (no_access_list_remark_comment, "Access list entry comment\n" "Comment up to 100 characters\n") { - /* CHECK ME argc referenced below */ return no_access_list_remark (self, vty, argc, argv); } @@ -1675,8 +1674,8 @@ DEFUN (ipv6_access_list_remark, "Access list entry comment\n" "Comment up to 100 characters\n") { - /* CHECK ME argc referenced below */ int idx_word = 2; + int idx_line = 4; struct access_list *access; access = access_list_get (AFI_IP6, argv[idx_word]->arg); @@ -1686,7 +1685,7 @@ DEFUN (ipv6_access_list_remark, XFREE (MTYPE_TMP, access->remark); access->remark = NULL; } - access->remark = argv_concat(argv, argc, 1); + access->remark = argv_concat(argv, argc, idx_line); return CMD_SUCCESS; } @@ -1715,7 +1714,6 @@ DEFUN (no_ipv6_access_list_remark_comment, "Access list entry comment\n" "Comment up to 100 characters\n") { - /* CHECK ME argc referenced below */ return no_ipv6_access_list_remark (self, vty, argc, argv); } diff --git a/lib/grammar_sandbox.c b/lib/grammar_sandbox.c index 34e0b8106..c4ae2d7d7 100644 --- a/lib/grammar_sandbox.c +++ b/lib/grammar_sandbox.c @@ -57,9 +57,9 @@ DEFUN (grammar_test, GRAMMAR_STR "command to pass to new parser\n") { - /* CHECK ME argc referenced below */ + int idx_command = 2; // make a string from tokenized command line - char *command = argv_concat (argv, argc, 0); + char *command = argv_concat (argv, argc, idx_command); // create cmd_element for parser struct cmd_element *cmd = XCALLOC (MTYPE_CMD_TOKENS, sizeof (struct cmd_element)); @@ -81,8 +81,8 @@ DEFUN (grammar_test_complete, "attempt to complete input on DFA\n" "command to complete") { - /* CHECK ME argc referenced below */ - char *cmdstr = argv_concat (argv, argc, 0); + int idx_command = 2; + char *cmdstr = argv_concat (argv, argc, idx_command); vector command = cmd_make_strvec (cmdstr); // generate completions of user input @@ -131,11 +131,11 @@ DEFUN (grammar_test_match, "attempt to match input on DFA\n" "command to match") { - /* CHECK ME argc referenced below */ + int idx_command = 2; if (argv[0][0] == '#') return CMD_SUCCESS; - char *cmdstr = argv_concat(argv, argc, 0); + char *cmdstr = argv_concat(argv, argc, idx_command); vector command = cmd_make_strvec (cmdstr); struct list *argvv = NULL; diff --git a/lib/if.c b/lib/if.c index 382e69d61..dd8922ee9 100644 --- a/lib/if.c +++ b/lib/if.c @@ -677,16 +677,13 @@ DEFUN (interface_desc, "Interface specific description\n" "Characters describing this interface\n") { - /* CHECK ME argc referenced below */ + int idx_line = 1; struct interface *ifp; - if (argc == 1) - return CMD_SUCCESS; - ifp = vty->index; if (ifp->desc) XFREE (MTYPE_TMP, ifp->desc); - ifp->desc = argv_concat(argv, argc, 1); + ifp->desc = argv_concat(argv, argc, idx_line); return CMD_SUCCESS; } @@ -910,7 +907,7 @@ DEFUN (show_address, vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 2) - VRF_GET_ID (vrf_id, argv[idx_vrf_cmd_str]->arg); + VRF_GET_ID (vrf_id, argv[idx_vrf]->arg); for (ALL_LIST_ELEMENTS_RO (vrf_iflist (vrf_id), node, ifp)) { diff --git a/lib/plist.c b/lib/plist.c index 4170230d8..23d580bd6 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -1905,8 +1905,8 @@ DEFUN (ip_prefix_list_description, "Prefix-list specific description\n" "Up to 80 characters describing this prefix-list\n") { - /* CHECK ME argc referenced below */ int idx_word = 2; + int idx_line = 4; struct prefix_list *plist; plist = prefix_list_get (AFI_IP, 0, argv[idx_word]->arg); @@ -1916,7 +1916,7 @@ DEFUN (ip_prefix_list_description, XFREE (MTYPE_TMP, plist->desc); plist->desc = NULL; } - plist->desc = argv_concat(argv, argc, 1); + plist->desc = argv_concat(argv, argc, idx_line); return CMD_SUCCESS; } @@ -1945,7 +1945,6 @@ DEFUN (no_ip_prefix_list_description_comment, "Prefix-list specific description\n" "Up to 80 characters describing this prefix-list\n") { - /* CHECK ME argc referenced below */ return no_ip_prefix_list_description (self, vty, argc, argv); } @@ -2618,8 +2617,8 @@ DEFUN (ipv6_prefix_list_description, "Prefix-list specific description\n" "Up to 80 characters describing this prefix-list\n") { - /* CHECK ME argc referenced below */ int idx_word = 2; + int iddx_line = 4; struct prefix_list *plist; plist = prefix_list_get (AFI_IP6, 0, argv[idx_word]->arg); @@ -2629,7 +2628,7 @@ DEFUN (ipv6_prefix_list_description, XFREE (MTYPE_TMP, plist->desc); plist->desc = NULL; } - plist->desc = argv_concat(argv, argc, 1); + plist->desc = argv_concat(argv, argc, iddx_line); return CMD_SUCCESS; } @@ -2658,7 +2657,6 @@ DEFUN (no_ipv6_prefix_list_description_comment, "Prefix-list specific description\n" "Up to 80 characters describing this prefix-list\n") { - /* CHECK ME argc referenced below */ return no_ipv6_prefix_list_description_comment (self, vty, argc, argv); } diff --git a/lib/routemap.c b/lib/routemap.c index b3d349d2f..2e8637bcb 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -1606,7 +1606,6 @@ DEFUN (rmap_continue, "Continue on a different entry within the route-map\n" "Route-map entry sequence number\n") { - /* CHECK ME argc referenced below */ return rmap_onmatch_goto (self, vty, argc, argv); } @@ -1618,7 +1617,6 @@ DEFUN (no_rmap_continue, "Continue on a different entry within the route-map\n" "Route-map entry sequence number\n") { - /* CHECK ME argc referenced below */ return no_rmap_onmatch_goto (self, vty, argc, argv); } @@ -1693,7 +1691,7 @@ DEFUN (rmap_description, "Route-map comment\n" "Comment describing this route-map rule\n") { - /* CHECK ME argc referenced below */ + int idx_line = 1; struct route_map_index *index; index = vty->index; @@ -1701,7 +1699,7 @@ DEFUN (rmap_description, { if (index->description) XFREE (MTYPE_TMP, index->description); - index->description = argv_concat (argv, argc, 1); + index->description = argv_concat (argv, argc, idx_line); } return CMD_SUCCESS; } diff --git a/lib/vty.c b/lib/vty.c index 301af667e..5a4f0fcbe 100644 --- a/lib/vty.c +++ b/lib/vty.c @@ -2948,7 +2948,6 @@ DEFUN (no_terminal_monitor, "Set terminal line parameters\n" "Copy debug output to the current terminal line\n") { - /* CHECK ME argc referenced below */ return terminal_no_monitor (self, vty, argc, argv); } diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c index c55ce1de8..08afb75d2 100644 --- a/ospfd/ospf_dump.c +++ b/ospfd/ospf_dump.c @@ -772,7 +772,6 @@ DEFUN (debug_ospf_packet, "Detail Information\n" "Detail Information\n") { - /* CHECK ME argc referenced below */ int inst = (argv[2]->type == RANGE_TKN) ? 1 : 0; int detail = strmatch (argv[argc - 1]->text, "detail"); int send = strmatch (argv[argc - (1+detail)]->text, "send"); @@ -850,7 +849,6 @@ DEFUN (no_debug_ospf_packet, "Detail Information\n" "Detail Information\n") { - /* CHECK ME argc referenced below */ int inst = (argv[3]->type == RANGE_TKN) ? 1 : 0; int detail = strmatch (argv[argc - 1]->text, "detail"); int send = strmatch (argv[argc - (1+detail)]->text, "send"); @@ -926,7 +924,6 @@ DEFUN (debug_ospf_ism, "ISM Event Information\n" "ISM TImer Information\n") { - /* CHECK ME argc referenced below */ int inst = (argv[2]->type == RANGE_TKN); char *dbgparam = (argc == 4 + inst) ? argv[argc - 1]->text : NULL; @@ -980,7 +977,6 @@ DEFUN (no_debug_ospf_ism, "ISM Event Information\n" "ISM TImer Information\n") { - /* CHECK ME argc referenced below */ int inst = (argv[3]->type == RANGE_TKN); char *dbgparam = (argc == 5 + inst) ? argv[argc - 1]->text : NULL; diff --git a/ospfd/ospf_ri.c b/ospfd/ospf_ri.c index 463671f7d..bcb1cd8e2 100644 --- a/ospfd/ospf_ri.c +++ b/ospfd/ospf_ri.c @@ -1182,7 +1182,6 @@ DEFUN (router_info, "Enable the Router Information functionality with Area flooding scope\n" "OSPF area ID in IP format") { - /* CHECK ME argc referenced below */ int idx_ipv4 = 2; char *area = (argc == 3) ? argv[idx_ipv4]->arg : NULL; diff --git a/ospfd/ospf_routemap.c b/ospfd/ospf_routemap.c index 1cb29f3ef..33ddc67fc 100644 --- a/ospfd/ospf_routemap.c +++ b/ospfd/ospf_routemap.c @@ -715,7 +715,6 @@ DEFUN (no_match_ip_nexthop, "IP access-list number (expanded range)\n" "IP access-list name\n") { - /* CHECK ME argc referenced below */ char *al = (argc == 5) ? argv[4]->arg : NULL; return ospf_route_match_delete (vty, vty->index, "ip next-hop", al); } @@ -745,7 +744,6 @@ DEFUN (no_match_ip_next_hop_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { - /* CHECK ME argc referenced below */ char *pl = (argc == 6) ? argv[5]->arg : NULL; return ospf_route_match_delete (vty, vty->index, "ip next-hop prefix-list", pl); } @@ -776,7 +774,6 @@ DEFUN (no_match_ip_address, "IP access-list number (expanded range)\n" "IP access-list name\n") { - /* CHECK ME argc referenced below */ char *al = (argc == 5) ? argv[4]->arg : NULL; return ospf_route_match_delete (vty, vty->index, "ip address", al); } @@ -805,7 +802,6 @@ DEFUN (no_match_ip_address_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { - /* CHECK ME argc referenced below */ char *pl = (argc == 6) ? argv[5]->arg : NULL; return ospf_route_match_delete (vty, vty->index, "ip address prefix-list", pl); } @@ -829,7 +825,6 @@ DEFUN (no_match_interface, "Match first hop interface of route\n" "Interface name\n") { - /* CHECK ME argc referenced below */ char *iface = (argc == 4) ? argv[3]->arg : NULL; return ospf_route_match_delete (vty, vty->index, "interface", iface); } @@ -853,7 +848,6 @@ DEFUN (no_match_tag, "Match tag of route\n" "Tag value\n") { - /* CHECK ME argc referenced below */ char *tag = (argc == 4) ? argv[3]->arg : NULL; return ospf_route_match_delete (vty, vty->index, "tag", tag); } @@ -877,7 +871,6 @@ DEFUN (no_set_metric, "Metric value for destination routing protocol\n" "Metric value\n") { - /* CHECK ME argc referenced below */ char *mval = (argc == 4) ? argv[3]->arg : NULL; return ospf_route_set_delete (vty, vty->index, "metric", mval); } @@ -903,7 +896,6 @@ DEFUN (no_set_metric_type, "OSPF[6] external type 1 metric\n" "OSPF[6] external type 2 metric\n") { - /* CHECK ME argc referenced below */ char *ext = (argc == 4) ? argv[3]->text : NULL; return ospf_route_set_delete (vty, vty->index, "metric-type", ext); } @@ -927,7 +919,6 @@ DEFUN (no_set_tag, "Tag value for routing protocol\n" "Tag value\n") { - /* CHECK ME argc referenced below */ char *tag = (argc == 4) ? argv[3]->arg : NULL; return ospf_route_set_delete (vty, vty->index, "tag", tag); } diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index 5f2dcefdc..8cc5cf95d 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -4052,10 +4052,10 @@ DEFUN (test_igmp_receive_report, "Record type\n" "Sources\n") { - /* CHECK ME argc referenced below */ int idx_number = 4; int idx_ipv4 = 5; int idx_number_2 = 6; + int idx_line = 7; char buf[1000]; char *igmp_msg; struct ip *ip_hdr; @@ -4121,7 +4121,7 @@ DEFUN (test_igmp_receive_report, /* Scan LINE sources */ sources = (struct in_addr *) (group_record + IGMP_V3_GROUP_RECORD_SOURCE_OFFSET); src_addr = sources; - for (argi = 3; argi < argc; ++argi,++src_addr) { + for (argi = idx_line; argi < argc; ++argi,++src_addr) { src_str = argv[argi]->arg; result = inet_pton(AF_INET, src_str, src_addr); if (result <= 0) { @@ -4168,9 +4168,9 @@ DEFUN (test_pim_receive_dump, "Neighbor address\n" "Packet dump\n") { - /* CHECK ME argc referenced below */ int idx_interface = 4; int idx_ipv4 = 5; + int idx_line = 6; uint8_t buf[1000]; uint8_t *pim_msg; struct ip *ip_hdr; @@ -4219,7 +4219,7 @@ DEFUN (test_pim_receive_dump, pim_msg_size = 0; /* Scan LINE dump into buffer */ - for (argi = 2; argi < argc; ++argi) { + for (argi = idx_line; argi < argc; ++argi) { const char *str = argv[argi]->arg; int str_len = strlen(str); int str_last = str_len - 1; @@ -4289,7 +4289,6 @@ DEFUN (test_pim_receive_hello, "Neighbor LAN prune delay T-bit\n" "Neighbor secondary addresses\n") { - /* CHECK ME argc referenced below */ int idx_interface = 4; int idx_ipv4 = 5; int idx_number = 6; @@ -4298,6 +4297,7 @@ DEFUN (test_pim_receive_hello, int idx_number_4 = 9; int idx_number_5 = 10; int idx_number_6 = 11; + int idx_line = 12; uint8_t buf[1000]; uint8_t *pim_msg; struct ip *ip_hdr; @@ -4359,7 +4359,7 @@ DEFUN (test_pim_receive_hello, pim_msg = buf + ip_hlen; /* Scan LINE addresses */ - for (argi = 8; argi < argc; ++argi) { + for (argi = idx_line; argi < argc; ++argi) { const char *sec_str = argv[argi]->arg; struct in_addr sec_addr; result = inet_pton(AF_INET, sec_str, &sec_addr); diff --git a/zebra/rtadv.c b/zebra/rtadv.c index 277cf4f06..7edba5595 100644 --- a/zebra/rtadv.c +++ b/zebra/rtadv.c @@ -1342,7 +1342,6 @@ DEFUN (ipv6_nd_prefix, "Do not use prefix for autoconfiguration\n" "Do not use prefix for onlink determination\n") { - /* CHECK ME argc referenced below */ /* prelude */ char *prefix = argv[3]->arg; int lifetimes = (argc > 4) && (argv[4]->type == RANGE_TKN || strmatch (argv[4]->text, "infinite")); diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 02b68201e..e6e7f5d2e 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -1235,7 +1235,6 @@ DEFUN (show_ip_route_vrf, VRF_CMD_HELP_STR) { int idx_vrf = 4; - int idx_json = 5; u_char uj = use_json(argc, argv); return do_show_ip_route (vty, argv[idx_vrf]->arg, SAFI_UNICAST, uj); @@ -2753,7 +2752,6 @@ DEFUN (show_ipv6_route, VRF_CMD_HELP_STR "Output JSON\n") { - /* CHECK ME argc referenced below */ struct route_table *table; struct route_node *rn; struct rib *rib; @@ -2954,7 +2952,6 @@ DEFUN (show_ipv6_route_protocol, VRF_CMD_HELP_STR QUAGGA_IP6_REDIST_HELP_STR_ZEBRA) { - /* CHECK ME argc referenced below */ int type; struct route_table *table; struct route_node *rn; @@ -3699,7 +3696,6 @@ DEFUN (ip_zebra_import_table_distance, "route-map for filtering\n" "route-map name\n") { - /* CHECK ME argc referenced below */ u_int32_t table_id = 0; VTY_GET_INTEGER("table", table_id, argv[2]->arg); -- cgit v1.2.3 From 6de69f83055163cfc4015d609de3750af8fbff52 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Fri, 30 Sep 2016 15:31:48 +0000 Subject: all: added some missing <>s within []s Signed-off-by: Daniel Walton --- bgpd/bgp_route.c | 4 ++-- bgpd/bgp_routemap.c | 4 ++-- isisd/isis_redist.c | 2 +- lib/command.c | 14 +++++++------- ospf6d/ospf6_area.c | 2 +- ospf6d/ospf6_lsa.c | 4 ++-- ospf6d/ospf6_neighbor.c | 6 +++--- ospf6d/ospf6_top.c | 2 +- ospf6d/ospf6d.c | 2 +- ospfd/ospf_dump.c | 26 +++++++++++++------------- ripd/rip_interface.c | 4 ++-- tools/argv_translator.py | 23 ++++++++++++++++++++--- zebra/debug.c | 4 ++-- zebra/zebra_vty.c | 33 +++++++++++++++++++++------------ 14 files changed, 78 insertions(+), 52 deletions(-) (limited to 'zebra') diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index eca6a4a7b..bb1849e4b 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -7732,7 +7732,7 @@ bgp_show_route (struct vty *vty, const char *view_name, const char *ip_str, /* BGP route print out function. */ DEFUN (show_ip_bgp_ipv4, show_ip_bgp_ipv4_cmd, - "show [ip] bgp [ WORD] [< [unicast]|ipv4 multicast>] [cidr-only|community|<[dampening] >|regexp .LINE|route-map WORD|prefix-list WORD|filter-list WORD|community [exact-match]|community-list <(1-500)|WORD> [exact-match]| longer-prefixes] [json]", + "show [ip] bgp [ WORD] [< [unicast]|ipv4 multicast>] [|regexp .LINE|route-map WORD|prefix-list WORD|filter-list WORD|community [exact-match]|community-list <(1-500)|WORD> [exact-match]|A.B.C.D/M longer-prefixes|X:X::X:X/M longer-prefixes>] [json]", SHOW_STR IP_STR BGP_STR @@ -7857,7 +7857,7 @@ DEFUN (show_ip_bgp_ipv4, DEFUN (show_ip_bgp_route, show_ip_bgp_route_cmd, - "show [ip] bgp [ WORD] [< [unicast]|ipv4 multicast|vpnv4 unicast [rd ASN:nn_or_IP-address:nn]>] [bestpath|multipath] [json]", + "show [ip] bgp [ WORD] [< [unicast]|ipv4 multicast|vpnv4 unicast [rd ASN:nn_or_IP-address:nn]>] [] [json]", SHOW_STR IP_STR BGP_STR diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index e08b43bc1..d823b962b 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -3091,7 +3091,7 @@ DEFUN (match_ip_next_hop, DEFUN (no_match_ip_next_hop, no_match_ip_next_hop_cmd, - "no match ip next-hop [<(1-199)|(1300-2699)|WORD]", + "no match ip next-hop [<(1-199)|(1300-2699)|WORD>]", NO_STR MATCH_STR IP_STR @@ -3158,7 +3158,7 @@ DEFUN (match_ip_route_source, DEFUN (no_match_ip_route_source, no_match_ip_route_source_cmd, - "no match ip route-source [(1-199)|(1300-2699)|WORD]", + "no match ip route-source [<(1-199)|(1300-2699)|WORD>]", NO_STR MATCH_STR IP_STR diff --git a/isisd/isis_redist.c b/isisd/isis_redist.c index e330a1017..384eb3572 100644 --- a/isisd/isis_redist.c +++ b/isisd/isis_redist.c @@ -539,7 +539,7 @@ isis_redist_area_finish(struct isis_area *area) DEFUN (isis_redistribute, isis_redistribute_cmd, - "redistribute [metric (0-16777215)|route-map WORD]", + "redistribute []", REDIST_STR "Redistribute IPv4 routes\n" "Redistribute IPv6 routes\n" diff --git a/lib/command.c b/lib/command.c index 95d69cdbf..c98e2562d 100644 --- a/lib/command.c +++ b/lib/command.c @@ -1696,7 +1696,7 @@ DEFUN (show_logging, DEFUN (config_log_stdout, config_log_stdout_cmd, - "log stdout [emergencies|alerts|critical|errors|warnings|notifications|informational|debugging]", + "log stdout []", "Logging control\n" "Set stdout logging level\n" LOG_LEVEL_DESC) @@ -1718,7 +1718,7 @@ DEFUN (config_log_stdout, DEFUN (no_config_log_stdout, no_config_log_stdout_cmd, - "no log stdout [emergencies|alerts|critical|errors|warnings|notifications|informational|debugging]", + "no log stdout []", NO_STR "Logging control\n" "Cancel logging to stdout\n" @@ -1730,7 +1730,7 @@ DEFUN (no_config_log_stdout, DEFUN (config_log_monitor, config_log_monitor_cmd, - "log monitor [emergencies|alerts|critical|errors|warnings|notifications|informational|debugging]", + "log monitor []", "Logging control\n" "Set terminal line (monitor) logging level\n" LOG_LEVEL_DESC) @@ -1752,7 +1752,7 @@ DEFUN (config_log_monitor, DEFUN (no_config_log_monitor, no_config_log_monitor_cmd, - "no log monitor [emergencies|alerts|critical|errors|warnings|notifications|informational|debugging]", + "no log monitor []", NO_STR "Logging control\n" "Disable terminal line (monitor) logging\n" @@ -1818,7 +1818,7 @@ set_log_file(struct vty *vty, const char *fname, int loglevel) DEFUN (config_log_file, config_log_file_cmd, - "log file FILENAME [emergencies|alerts|critical|errors|warnings|notifications|informational|debugging]", + "log file FILENAME []", "Logging control\n" "Logging to file\n" "Logging filename\n" @@ -1859,7 +1859,7 @@ DEFUN (no_config_log_file, DEFUN (config_log_syslog, config_log_syslog_cmd, - "log syslog [emergencies|alerts|critical|errors|warnings|notifications|informational|debugging]", + "log syslog []", "Logging control\n" "Set syslog logging level\n" LOG_LEVEL_DESC) @@ -1897,7 +1897,7 @@ DEFUN_DEPRECATED (config_log_syslog_facility, DEFUN (no_config_log_syslog, no_config_log_syslog_cmd, - "no log syslog [] [emergencies|alerts|critical|errors|warnings|notifications|informational|debugging]", + "no log syslog [] []", NO_STR "Logging control\n" "Cancel logging to syslog\n" diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c index 766562a82..45e7f720f 100644 --- a/ospf6d/ospf6_area.c +++ b/ospf6d/ospf6_area.c @@ -435,7 +435,7 @@ ospf6_area_show (struct vty *vty, struct ospf6_area *oa) DEFUN (area_range, area_range_cmd, - "area ]", + "area range X:X::X:X/M []", "OSPF area parameters\n" OSPF6_AREA_ID_STR "Configured address range\n" diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index c65cae392..87e50bcf8 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -818,7 +818,7 @@ ospf6_lsa_handler_name (struct ospf6_lsa_handler *h) DEFUN (debug_ospf6_lsa_type, debug_ospf6_lsa_hex_cmd, - "debug ospf6 lsa [originate|examine|flooding]", + "debug ospf6 lsa []", DEBUG_STR OSPF6_STR "Debug Link State Advertisements (LSAs)\n" @@ -861,7 +861,7 @@ DEFUN (debug_ospf6_lsa_type, DEFUN (no_debug_ospf6_lsa_type, no_debug_ospf6_lsa_hex_cmd, - "no debug ospf6 lsa [originate|examine|flooding]", + "no debug ospf6 lsa []", NO_STR DEBUG_STR OSPF6_STR diff --git a/ospf6d/ospf6_neighbor.c b/ospf6d/ospf6_neighbor.c index 1c55175d2..91c7f7c62 100644 --- a/ospf6d/ospf6_neighbor.c +++ b/ospf6d/ospf6_neighbor.c @@ -829,7 +829,7 @@ ospf6_neighbor_show_detail (struct vty *vty, struct ospf6_neighbor *on) DEFUN (show_ipv6_ospf6_neighbor, show_ipv6_ospf6_neighbor_cmd, - "show ipv6 ospf6 neighbor [detail|drchoice]", + "show ipv6 ospf6 neighbor []", SHOW_STR IP6_STR OSPF6_STR @@ -918,7 +918,7 @@ ospf6_neighbor_init (void) DEFUN (debug_ospf6_neighbor, debug_ospf6_neighbor_cmd, - "debug ospf6 neighbor [state|event]", + "debug ospf6 neighbor []", DEBUG_STR OSPF6_STR "Debug OSPFv3 Neighbor\n" @@ -945,7 +945,7 @@ DEFUN (debug_ospf6_neighbor, DEFUN (no_debug_ospf6_neighbor, no_debug_ospf6_neighbor_cmd, - "no debug ospf6 neighbor [state|event]", + "no debug ospf6 neighbor []", NO_STR DEBUG_STR OSPF6_STR diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index 58301b1c0..ccffa131a 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -768,7 +768,7 @@ DEFUN (show_ipv6_ospf6, DEFUN (show_ipv6_ospf6_route, show_ipv6_ospf6_route_cmd, - "show ipv6 ospf6 route [intra-area|inter-area|external-1|external-2|X:X::X:X|X:X::X:X/M|detail|summary]", + "show ipv6 ospf6 route []", SHOW_STR IP6_STR OSPF6_STR diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c index 785c9361c..3e2db84a6 100644 --- a/ospf6d/ospf6d.c +++ b/ospf6d/ospf6d.c @@ -171,7 +171,7 @@ parse_type_spec (int idx_lsa, int argc, struct cmd_token **argv) DEFUN (show_ipv6_ospf6_database, show_ipv6_ospf6_database_cmd, - "show ipv6 ospf6 database [detail|dump|internal]", + "show ipv6 ospf6 database []", SHOW_STR IPV6_STR OSPF6_STR diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c index de5c91828..91fde066f 100644 --- a/ospfd/ospf_dump.c +++ b/ospfd/ospf_dump.c @@ -982,7 +982,7 @@ DEFUN (no_debug_ospf_ism, if (inst) // user passed instance ID { - if (!ospf_lookup_instance (strtoul (argv[2]->arg, NULL, 10))) + if (!ospf_lookup_instance (strtoul (inst, NULL, 10))) return CMD_SUCCESS; } @@ -1057,7 +1057,7 @@ debug_ospf_nsm_common (struct vty *vty, int arg_base, int argc, struct cmd_token DEFUN (debug_ospf_nsm, debug_ospf_nsm_cmd, - "debug ospf nsm [status|events|timers]", + "debug ospf nsm []", DEBUG_STR OSPF_STR "OSPF Neighbor State Machine\n" @@ -1070,7 +1070,7 @@ DEFUN (debug_ospf_nsm, DEFUN (debug_ospf_instance_nsm, debug_ospf_instance_nsm_cmd, - "debug ospf (1-65535) nsm [status|events|timers]", + "debug ospf (1-65535) nsm []", DEBUG_STR OSPF_STR "Instance ID\n" @@ -1128,7 +1128,7 @@ no_debug_ospf_nsm_common (struct vty *vty, int arg_base, int argc, struct cmd_to DEFUN (no_debug_ospf_nsm, no_debug_ospf_nsm_cmd, - "no debug ospf nsm [status|events|timers]", + "no debug ospf nsm []", NO_STR DEBUG_STR OSPF_STR @@ -1143,7 +1143,7 @@ DEFUN (no_debug_ospf_nsm, DEFUN (no_debug_ospf_instance_nsm, no_debug_ospf_instance_nsm_cmd, - "no debug ospf (1-65535) nsm [status|events|timers]", + "no debug ospf (1-65535) nsm []", NO_STR DEBUG_STR OSPF_STR @@ -1206,7 +1206,7 @@ debug_ospf_lsa_common (struct vty *vty, int arg_base, int argc, struct cmd_token DEFUN (debug_ospf_lsa, debug_ospf_lsa_cmd, - "debug ospf lsa [generate|flooding|install|refresh]", + "debug ospf lsa []", DEBUG_STR OSPF_STR "OSPF Link State Advertisement\n" @@ -1220,7 +1220,7 @@ DEFUN (debug_ospf_lsa, DEFUN (debug_ospf_instance_lsa, debug_ospf_instance_lsa_cmd, - "debug ospf (1-65535) lsa [generate|flooding|install|refresh]", + "debug ospf (1-65535) lsa []", DEBUG_STR OSPF_STR "Instance ID\n" @@ -1283,7 +1283,7 @@ no_debug_ospf_lsa_common (struct vty *vty, int arg_base, int argc, struct cmd_to DEFUN (no_debug_ospf_lsa, no_debug_ospf_lsa_cmd, - "no debug ospf lsa [generate|flooding|install|refresh]", + "no debug ospf lsa []", NO_STR DEBUG_STR OSPF_STR @@ -1298,7 +1298,7 @@ DEFUN (no_debug_ospf_lsa, DEFUN (no_debug_ospf_instance_lsa, no_debug_ospf_instance_lsa_cmd, - "no debug ospf (1-65535) lsa [generate|flooding|install|refresh]", + "no debug ospf (1-65535) lsa []", NO_STR DEBUG_STR OSPF_STR @@ -1354,7 +1354,7 @@ debug_ospf_zebra_common (struct vty *vty, int arg_base, int argc, struct cmd_tok DEFUN (debug_ospf_zebra, debug_ospf_zebra_cmd, - "debug ospf zebra [interface|redistribute]", + "debug ospf zebra []", DEBUG_STR OSPF_STR "OSPF Zebra information\n" @@ -1366,7 +1366,7 @@ DEFUN (debug_ospf_zebra, DEFUN (debug_ospf_instance_zebra, debug_ospf_instance_zebra_cmd, - "debug ospf (1-65535) zebra [interface|redistribute]", + "debug ospf (1-65535) zebra []", DEBUG_STR OSPF_STR "Instance ID\n" @@ -1420,7 +1420,7 @@ no_debug_ospf_zebra_common(struct vty *vty, int arg_base, int argc, DEFUN (no_debug_ospf_zebra, no_debug_ospf_zebra_cmd, - "no debug ospf zebra [interface|redistribute]", + "no debug ospf zebra []", NO_STR DEBUG_STR OSPF_STR @@ -1433,7 +1433,7 @@ DEFUN (no_debug_ospf_zebra, DEFUN (no_debug_ospf_instance_zebra, no_debug_ospf_instance_zebra_cmd, - "no debug ospf (1-65535) zebra [interface|redistribute]", + "no debug ospf (1-65535) zebra []", NO_STR DEBUG_STR OSPF_STR diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c index d6686399c..95fadde95 100644 --- a/ripd/rip_interface.c +++ b/ripd/rip_interface.c @@ -1400,7 +1400,7 @@ DEFUN (ip_rip_receive_version_2, DEFUN (no_ip_rip_receive_version, no_ip_rip_receive_version_cmd, - "no ip rip receive version [(1-1)|(2-2)]", + "no ip rip receive version [<1|2>]", NO_STR IP_STR "Routing Information Protocol\n" @@ -1495,7 +1495,7 @@ DEFUN (ip_rip_send_version_2, DEFUN (no_ip_rip_send_version, no_ip_rip_send_version_cmd, - "no ip rip send version [(1-1)|(2-2)]", + "no ip rip send version [<1|2>]", NO_STR IP_STR "Routing Information Protocol\n" diff --git a/tools/argv_translator.py b/tools/argv_translator.py index 02e7bac68..af88475d2 100755 --- a/tools/argv_translator.py +++ b/tools/argv_translator.py @@ -684,9 +684,26 @@ DEFUN (no_bgp_maxmed_onstartup, if not line.endswith('\n'): line += '\n' + if '|<' in line: + print "%d: ERROR |< is illegal in '%s'" % (self.line_number, line) + + if '|[' in line: + print "%d: ERROR |[ is illegal in '%s'" % (self.line_number, line) + # compress duplicate whitespaces re_space = re.search('^(\s*).*(\s*)$', line) line = re_space.group(1) + ' '.join(line.split()) + re_space.group(2) + + for token in line_to_tokens(self.line_number, line): + token = token.strip() + + if token.endswith('",'): + token = token[0:-2] + + if token.startswith('[') and '|' in token: + if not token.startswith('[<') or not token.endswith('>]'): + print "%s: suspend token '%s'" % (self.line_number, token) + return line def get_used_idx_variables(self, idx_table): @@ -743,8 +760,9 @@ DEFUN (no_bgp_maxmed_onstartup, return False def dump(self): - new_command_string = self.get_new_command_string() - new_command_string_expanded = expand_command_string(new_command_string) + # new_command_string = self.get_new_command_string() + # new_command_string_expanded = expand_command_string(new_command_string) + new_command_string_expanded = self.get_new_command_string() lines = [] lines.append("DEFUN (%s,\n" % self.name) @@ -898,7 +916,6 @@ def update_argvs(filename): state = None fh.write(line) elif line.strip().startswith('* ') and not line.strip().startswith('* '): - # dwalton new_line = expand_command_string(line[3:]) # chop the leading " * " fh.write(" * %s" % new_line) else: diff --git a/zebra/debug.c b/zebra/debug.c index 3714ffe3f..6acf32b43 100644 --- a/zebra/debug.c +++ b/zebra/debug.c @@ -174,7 +174,7 @@ DEFUN (debug_zebra_kernel, DEFUN (debug_zebra_kernel_msgdump, debug_zebra_kernel_msgdump_cmd, - "debug zebra kernel msgdump [recv|send]", + "debug zebra kernel msgdump []", DEBUG_STR "Zebra configuration\n" "Debug option set for zebra between kernel interface\n" @@ -292,7 +292,7 @@ DEFUN (no_debug_zebra_kernel, DEFUN (no_debug_zebra_kernel_msgdump, no_debug_zebra_kernel_msgdump_cmd, - "no debug zebra kernel msgdump [recv|send]", + "no debug zebra kernel msgdump []", DEBUG_STR "Zebra configuration\n" "Debug option set for zebra between kernel interface\n" diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index e6e7f5d2e..7f1a042f5 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -208,9 +208,9 @@ DEFUN (no_ip_mroute_dist, "Nexthop interface name\n" "Distance\n") { - char *destprefix = argv[2]->arg; - char *nexthop = argv[3]->arg; - char *distance = (argc == 5) ? argv[4]->arg : NULL; + char *destprefix = argv[3]->arg; + char *nexthop = argv[4]->arg; + char *distance = (argc == 6) ? argv[5]->arg : NULL; return zebra_static_ipv4 (vty, SAFI_MULTICAST, 0, destprefix, NULL, nexthop, NULL, NULL, distance, NULL); } @@ -1392,6 +1392,9 @@ DEFUN (show_ip_route_tag, "Show only routes with tag\n" "Tag value\n") { + int idx_vrf = 3; + int idx_name = 4; + int idx_tag = 6; struct route_table *table; struct route_node *rn; struct rib *rib; @@ -1399,14 +1402,15 @@ DEFUN (show_ip_route_tag, u_short tag = 0; vrf_id_t vrf_id = VRF_DEFAULT; - if (strmatch(argv[3]->text, "vrf")) + if (strmatch(argv[idx_vrf]->text, "vrf")) { - VRF_GET_ID (vrf_id, argv[4]->arg); - tag = atoi(argv[6]->arg); + VRF_GET_ID (vrf_id, argv[idx_name]->arg); + tag = atoi(argv[idx_tag]->arg); } else { - tag = atoi(argv[4]->arg); + idx_tag -= 2; + tag = atoi(argv[idx_tag]->arg); } table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id); @@ -2852,6 +2856,9 @@ DEFUN (show_ipv6_route_tag, "Show only routes with tag\n" "Tag value\n") { + int idx_vrf = 3; + int idx_name = 4; + int idx_tag = 6; struct route_table *table; struct route_node *rn; struct rib *rib; @@ -2859,14 +2866,15 @@ DEFUN (show_ipv6_route_tag, u_short tag = 0; vrf_id_t vrf_id = VRF_DEFAULT; - if (strmatch(argv[3]->text, "vrf")) + if (strmatch(argv[idx_vrf]->text, "vrf")) { - VRF_GET_ID (vrf_id, argv[4]->arg); - tag = atoi(argv[6]->arg); + VRF_GET_ID (vrf_id, argv[idx_name]->arg); + tag = atoi(argv[idx_tag]->arg); } else { - tag = atoi(argv[4]->arg); + idx_tag -= 2; + tag = atoi(argv[idx_tag]->arg); } table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id); @@ -3352,6 +3360,7 @@ DEFUN (show_ipv6_route_vrf_all_protocol, VRF_ALL_CMD_HELP_STR QUAGGA_IP6_REDIST_HELP_STR_ZEBRA) { + int idx_protocol = 5; int type; struct route_table *table; struct route_node *rn; @@ -3361,7 +3370,7 @@ DEFUN (show_ipv6_route_vrf_all_protocol, int first = 1; int vrf_header = 1; - type = proto_redistnum (AFI_IP6, argv[4]->arg); + type = proto_redistnum (AFI_IP6, argv[idx_protocol]->arg); if (type < 0) { vty_out (vty, "Unknown route type%s", VTY_NEWLINE); -- cgit v1.2.3 From 12dcf78e0befd448804566438a754261ffbbd2e5 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Tue, 4 Oct 2016 19:21:45 +0000 Subject: all: Fix various syntax errors Signed-off-by: Quentin Young --- bgpd/bgp_routemap.c | 24 +++++++++++++++++------- bgpd/bgp_vty.c | 2 +- isisd/isis_vty.c | 14 +++++++++++++- ospfd/ospf_vty.c | 2 +- ripd/rip_interface.c | 2 +- zebra/zebra_vty.c | 2 +- 6 files changed, 34 insertions(+), 12 deletions(-) (limited to 'zebra') diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index d823b962b..730dfbda7 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -3698,15 +3698,13 @@ DEFUN (no_set_weight, } -DEFUN (set_aspath_prepend, - set_aspath_prepend_cmd, - "set as-path prepend <(1-4294967295)...|last-as (1-10)>", +DEFUN (set_aspath_prepend_asn, + set_aspath_prepend_asn_cmd, + "set as-path prepend (1-4294967295)...", SET_STR "Transform BGP AS_PATH attribute\n" "Prepend to the as-path\n" - "AS number\n" - "Use the peer's AS-number\n" - "Number of times to insert") + "AS number\n") { int idx_asn = 3; int ret; @@ -3719,6 +3717,17 @@ DEFUN (set_aspath_prepend, return ret; } +DEFUN (set_aspath_prepend_lastas, + set_aspath_prepend_lastas_cmd, + "set as-path prepend last-as (1-10)", + SET_STR + "Transform BGP AS_PATH attribute\n" + "Prepend to the as-path\n" + "Use the peer's AS-number\n" + "Number of times to insert") +{ + return set_aspath_prepend_asn (self, vty, argc, argv); +} DEFUN (no_set_aspath_prepend, no_set_aspath_prepend_cmd, @@ -4516,7 +4525,8 @@ bgp_route_map_init (void) install_element (RMAP_NODE, &no_set_weight_cmd); install_element (RMAP_NODE, &set_metric_cmd); install_element (RMAP_NODE, &no_set_metric_cmd); - install_element (RMAP_NODE, &set_aspath_prepend_cmd); + install_element (RMAP_NODE, &set_aspath_prepend_asn_cmd); + install_element (RMAP_NODE, &set_aspath_prepend_lastas_cmd); install_element (RMAP_NODE, &set_aspath_exclude_cmd); install_element (RMAP_NODE, &no_set_aspath_prepend_cmd); install_element (RMAP_NODE, &no_set_aspath_exclude_cmd); diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 7dc877483..b5e2d9e36 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -943,7 +943,7 @@ DEFUN (no_bgp_confederation_identifier, DEFUN (bgp_confederation_peers, bgp_confederation_peers_cmd, - "bgp confederation peers . (1-4294967295)", + "bgp confederation peers (1-4294967295)...", "BGP specific commands\n" "AS confederation parameters\n" "Peer ASs in BGP confederation\n" diff --git a/isisd/isis_vty.c b/isisd/isis_vty.c index 93c547260..7fe65e6ca 100644 --- a/isisd/isis_vty.c +++ b/isisd/isis_vty.c @@ -55,7 +55,7 @@ isis_circuit_lookup (struct vty *vty) DEFUN (ip_router_isis, ip_router_isis_cmd, - " router isis WORD", + "ip router isis WORD", "Interface Internet Protocol config commands\n" "IP router interface commands\n" "IS-IS Routing for IP\n" @@ -108,6 +108,17 @@ DEFUN (ip_router_isis, return CMD_SUCCESS; } +DEFUN (ip6_router_isis, + ip6_router_isis_cmd, + "ipv6 router isis WORD", + "Interface Internet Protocol config commands\n" + "IP router interface commands\n" + "IS-IS Routing for IP\n" + "Routing process tag\n") +{ + return ip_router_isis (self, vty, argc, argv); +} + DEFUN (no_ip_router_isis, no_ip_router_isis_cmd, "no router isis WORD", @@ -2163,6 +2174,7 @@ void isis_vty_init (void) { install_element (INTERFACE_NODE, &ip_router_isis_cmd); + install_element (INTERFACE_NODE, &ip6_router_isis_cmd); install_element (INTERFACE_NODE, &no_ip_router_isis_cmd); install_element (INTERFACE_NODE, &isis_passive_cmd); diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index 19c1c6674..359189b34 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -8372,7 +8372,7 @@ DEFUN (ospf_default_information_originate, DEFUN (no_ospf_default_information_originate, no_ospf_default_information_originate_cmd, - "no default-information originate [|route-map WORD>]", + "no default-information originate []", NO_STR "Control distribution of default information\n" "Distribute a default route\n" diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c index 5ee2c0f31..6df219628 100644 --- a/ripd/rip_interface.c +++ b/ripd/rip_interface.c @@ -1358,7 +1358,7 @@ DEFUN (ip_rip_receive_version, DEFUN (ip_rip_receive_version_1, ip_rip_receive_version_1_cmd, - "ip rip receive version 1 2", + "ip rip receive version (1-1) (2-2)", IP_STR "Routing Information Protocol\n" "Advertisement reception\n" diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 7f1a042f5..d75556275 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -3696,7 +3696,7 @@ zebra_ip_config (struct vty *vty) DEFUN (ip_zebra_import_table_distance, ip_zebra_import_table_distance_cmd, - "ip import-table (1-252) [distance (1-255)] [route-map WORD>]", + "ip import-table (1-252) [distance (1-255)] [route-map WORD]", IP_STR "import routes from non-main kernel table\n" "kernel routing table id\n" -- cgit v1.2.3 From 49d73233c3d789e2176187d57b26ba9439dfce11 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Wed, 5 Oct 2016 23:02:57 +0000 Subject: zebra: Fix typo in zebra command desc Signed-off-by: Quentin Young --- zebra/zserv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'zebra') diff --git a/zebra/zserv.c b/zebra/zserv.c index 5c4957a68..98908fb67 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -2326,7 +2326,7 @@ DEFUN (show_zebra_client, show_zebra_client_cmd, "show zebra client", SHOW_STR - "Zebra information" + "Zebra information\n" "Client information") { struct listnode *node; -- cgit v1.2.3 From 3c2caef9fd680437c9b85b91928b7fe6ef2a0905 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Thu, 6 Oct 2016 04:08:34 +0000 Subject: zebra: Fix static route helper function Signed-off-by: Quentin Young --- zebra/zebra_vty.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'zebra') diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index d75556275..b3164839f 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -312,25 +312,25 @@ zebra_vty_ip_route_tdv_helper (int argc, struct cmd_token *argv[], int idx_curr, char **tag, char **distance, char **vrf) { - if (argc > idx_curr) - { - if (strmatch (argv[idx_curr]->text, "tag")) - { - *tag = argv[idx_curr]->arg; - idx_curr++; - } - - if (strmatch (argv[idx_curr]->text, "vrf")) - { - *distance = NULL; - *vrf = argv[idx_curr]->arg; - } - else - { - *distance = argv[idx_curr]->arg; - *vrf = argv[++idx_curr]->arg; - } - } + *distance = NULL; + while (idx_curr < argc) + { + if (strmatch (argv[idx_curr]->text, "tag")) + { + *tag = argv[idx_curr+1]->arg; + idx_curr += 2; + } + else if (strmatch (argv[idx_curr]->text, "vrf")) + { + *vrf = argv[idx_curr+1]->arg; + idx_curr += 2; + } + else + { + *distance = argv[idx_curr]->arg; + idx_curr++; + } + } return; } -- cgit v1.2.3 From 82f97584fbc708f4089b1b4f7e6fdc7e07b2db4e Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Thu, 6 Oct 2016 19:56:13 +0000 Subject: all: removed all DEFUN command stomps Signed-off-by: Daniel Walton Reviewed-by: Donald Sharp --- bgpd/bgp_route.c | 4 +- bgpd/bgp_routemap.c | 631 ++++--------------------- isisd/isis_routemap.c | 280 +---------- lib/routemap.c | 1138 ++++++++++++++++++++++++++++++++++++++++++++- lib/routemap.h | 165 +++++++ ospf6d/ospf6_asbr.c | 43 +- ospf6d/ospf6_zebra.c | 27 -- ospf6d/ospf6d.c | 1 - ospfd/ospf_routemap.c | 268 +---------- ospfd/ospf_zebra.h | 2 - pimd/pim_routemap.c | 1 + ripd/rip_routemap.c | 433 ++--------------- ripd/rip_zebra.c | 42 -- ripd/ripd.h | 1 - ripngd/ripng_routemap.c | 289 +----------- ripngd/ripng_zebra.c | 26 -- ripngd/ripngd.h | 1 - vtysh/extract.pl.in | 12 +- zebra/connected.c | 1 + zebra/kernel_null.c | 1 + zebra/redistribute_null.c | 1 + zebra/zebra_fpm_netlink.c | 1 + zebra/zebra_rnh_null.c | 1 + zebra/zebra_routemap.c | 256 +--------- zebra/zebra_static.c | 1 + zebra/zebra_vrf.c | 1 + zebra/zserv.h | 2 +- zebra/zserv_null.c | 1 + 28 files changed, 1514 insertions(+), 2116 deletions(-) (limited to 'zebra') diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 832a43779..9f3c9baae 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -7732,7 +7732,7 @@ bgp_show_route (struct vty *vty, const char *view_name, const char *ip_str, /* BGP route print out function. */ DEFUN (show_ip_bgp_ipv4, show_ip_bgp_ipv4_cmd, - "show [ip] bgp [ WORD] [] [|regexp .LINE|route-map WORD|prefix-list WORD|filter-list WORD|community [exact-match]|community-list <(1-500)|WORD> [exact-match]|A.B.C.D/M longer-prefixes|X:X::X:X/M longer-prefixes>] [json]", + "show [ip] bgp [ WORD] [] [|route-map WORD|prefix-list WORD|filter-list WORD|community [exact-match]|community-list <(1-500)|WORD> [exact-match]|A.B.C.D/M longer-prefixes|X:X::X:X/M longer-prefixes>] [json]", SHOW_STR IP_STR BGP_STR @@ -7752,8 +7752,6 @@ DEFUN (show_ip_bgp_ipv4, "Display detailed information about dampening\n" "Display flap statistics of routes\n" "Display paths suppressed due to dampening\n" - "Display routes matching the AS path regular expression\n" - "A regular-expression to match the BGP AS paths\n" "Display routes matching the route-map\n" "A route-map to match on\n" "Display routes conforming to the prefix-list\n" diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index 730dfbda7..33a29e8f4 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -22,6 +22,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "prefix.h" #include "filter.h" +#include "vty.h" #include "routemap.h" #include "command.h" #include "linklist.h" @@ -2614,52 +2615,6 @@ bgp_route_match_delete (struct vty *vty, struct route_map_index *index, return CMD_SUCCESS; } -/* Add bgp route map rule. */ -static int -bgp_route_set_add (struct vty *vty, struct route_map_index *index, - const char *command, const char *arg) -{ - int ret; - - ret = route_map_add_set (index, command, arg); - if (ret) - { - switch (ret) - { - case RMAP_RULE_MISSING: - vty_out (vty, "%% BGP Can't find rule.%s", VTY_NEWLINE); - return CMD_WARNING; - case RMAP_COMPILE_ERROR: - vty_out (vty, "%% BGP Argument is malformed.%s", VTY_NEWLINE); - return CMD_WARNING; - } - } - return CMD_SUCCESS; -} - -/* Delete bgp route map rule. */ -static int -bgp_route_set_delete (struct vty *vty, struct route_map_index *index, - const char *command, const char *arg) -{ - int ret; - - ret = route_map_delete_set (index, command, arg); - if (ret) - { - switch (ret) - { - case RMAP_RULE_MISSING: - vty_out (vty, "%% BGP Can't find rule.%s", VTY_NEWLINE); - return CMD_WARNING; - case RMAP_COMPILE_ERROR: - vty_out (vty, "%% BGP Argument is malformed.%s", VTY_NEWLINE); - return CMD_WARNING; - } - } - return CMD_SUCCESS; -} - /* * This is the workhorse routine for processing in/out routemap * modifications. @@ -3036,79 +2991,6 @@ DEFUN (no_match_peer, } - -DEFUN (match_ip_address, - match_ip_address_cmd, - "match ip address <(1-199)|(1300-2699)|WORD>", - MATCH_STR - IP_STR - "Match address of route\n" - "IP access-list number\n" - "IP access-list number (expanded range)\n" - "IP Access-list name\n") -{ - int idx_acl = 3; - return bgp_route_match_add (vty, vty->index, "ip address", argv[idx_acl]->arg, - RMAP_EVENT_FILTER_ADDED); -} - - -DEFUN (no_match_ip_address, - no_match_ip_address_cmd, - "no match ip address [<(1-199)|(1300-2699)|WORD>]", - NO_STR - MATCH_STR - IP_STR - "Match address of route\n" - "IP access-list number\n" - "IP access-list number (expanded range)\n" - "IP Access-list name\n") -{ - int idx_word = 4; - if (argc <= idx_word) - return bgp_route_match_delete (vty, vty->index, "ip address", NULL, - RMAP_EVENT_FILTER_DELETED); - return bgp_route_match_delete (vty, vty->index, "ip address", argv[idx_word]->arg, - RMAP_EVENT_FILTER_DELETED); -} - - -DEFUN (match_ip_next_hop, - match_ip_next_hop_cmd, - "match ip next-hop <(1-199)|(1300-2699)|WORD>", - MATCH_STR - IP_STR - "Match next-hop address of route\n" - "IP access-list number\n" - "IP access-list number (expanded range)\n" - "IP Access-list name\n") -{ - int idx_acl = 3; - return bgp_route_match_add (vty, vty->index, "ip next-hop", argv[idx_acl]->arg, - RMAP_EVENT_FILTER_ADDED); -} - - -DEFUN (no_match_ip_next_hop, - no_match_ip_next_hop_cmd, - "no match ip next-hop [<(1-199)|(1300-2699)|WORD>]", - NO_STR - MATCH_STR - IP_STR - "Match next-hop address of route\n" - "IP access-list number\n" - "IP access-list number (expanded range)\n" - "IP Access-list name\n") -{ - int idx_word = 4; - if (argc <= idx_word) - return bgp_route_match_delete (vty, vty->index, "ip next-hop", NULL, - RMAP_EVENT_FILTER_DELETED); - return bgp_route_match_delete (vty, vty->index, "ip next-hop", argv[idx_word]->arg, - RMAP_EVENT_FILTER_DELETED); -} - - /* match probability */ DEFUN (match_probability, match_probability_cmd, @@ -3176,73 +3058,6 @@ DEFUN (no_match_ip_route_source, } -DEFUN (match_ip_address_prefix_list, - match_ip_address_prefix_list_cmd, - "match ip address prefix-list WORD", - MATCH_STR - IP_STR - "Match address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") -{ - int idx_word = 4; - return bgp_route_match_add (vty, vty->index, "ip address prefix-list", - argv[idx_word]->arg, RMAP_EVENT_PLIST_ADDED); -} - - -DEFUN (no_match_ip_address_prefix_list, - no_match_ip_address_prefix_list_cmd, - "no match ip address prefix-list [WORD]", - NO_STR - MATCH_STR - IP_STR - "Match address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") -{ - int idx_word = 5; - if (argc <= idx_word) - return bgp_route_match_delete (vty, vty->index, "ip address prefix-list", - NULL, RMAP_EVENT_PLIST_DELETED); - return bgp_route_match_delete (vty, vty->index, "ip address prefix-list", - argv[idx_word]->arg, RMAP_EVENT_PLIST_DELETED); -} - - -DEFUN (match_ip_next_hop_prefix_list, - match_ip_next_hop_prefix_list_cmd, - "match ip next-hop prefix-list WORD", - MATCH_STR - IP_STR - "Match next-hop address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") -{ - int idx_word = 4; - return bgp_route_match_add (vty, vty->index, "ip next-hop prefix-list", - argv[idx_word]->arg, RMAP_EVENT_PLIST_ADDED); -} - -DEFUN (no_match_ip_next_hop_prefix_list, - no_match_ip_next_hop_prefix_list_cmd, - "no match ip next-hop prefix-list [WORD]", - NO_STR - MATCH_STR - IP_STR - "Match next-hop address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") -{ - int idx_word = 5; - if (argc <= idx_word) - return bgp_route_match_delete (vty, vty->index, "ip next-hop prefix-list", - NULL, RMAP_EVENT_PLIST_DELETED); - return bgp_route_match_delete (vty, vty->index, "ip next-hop prefix-list", - argv[idx_word]->arg, RMAP_EVENT_PLIST_DELETED); -} - - DEFUN (match_ip_route_source_prefix_list, match_ip_route_source_prefix_list_cmd, "match ip route-source prefix-list WORD", @@ -3277,37 +3092,6 @@ DEFUN (no_match_ip_route_source_prefix_list, } -DEFUN (match_metric, - match_metric_cmd, - "match metric (0-4294967295)", - MATCH_STR - "Match metric of route\n" - "Metric value\n") -{ - int idx_number = 2; - return bgp_route_match_add (vty, vty->index, "metric", argv[idx_number]->arg, - RMAP_EVENT_MATCH_ADDED); -} - - -DEFUN (no_match_metric, - no_match_metric_cmd, - "no match metric [(0-4294967295)]", - NO_STR - MATCH_STR - "Match metric of route\n" - "Metric value\n") -{ - int idx_number = 3; - if (argc <= idx_number) - return bgp_route_match_delete (vty, vty->index, "metric", - NULL, RMAP_EVENT_MATCH_DELETED); - return bgp_route_match_delete (vty, vty->index, "metric", - argv[idx_number]->arg, - RMAP_EVENT_MATCH_DELETED); -} - - DEFUN (match_local_pref, match_local_pref_cmd, "match local-preference (0-4294967295)", @@ -3491,88 +3275,6 @@ DEFUN (no_match_origin, RMAP_EVENT_MATCH_DELETED); } - -DEFUN (match_interface, - match_interface_cmd, - "match interface WORD", - MATCH_STR - "Match first hop interface of route\n" - "Interface name\n") -{ - int idx_word = 2; - return bgp_route_match_add (vty, vty->index, "interface", argv[idx_word]->arg, - RMAP_EVENT_MATCH_ADDED); -} - - -DEFUN (no_match_interface, - no_match_interface_cmd, - "no match interface [WORD]", - NO_STR - MATCH_STR - "Match first hop interface of route\n" - "Interface name\n") -{ - return bgp_route_match_delete (vty, vty->index, "interface", argv[3]->arg, - RMAP_EVENT_MATCH_DELETED); -} - - -DEFUN (match_tag, - match_tag_cmd, - "match tag (1-65535)", - MATCH_STR - "Match tag of route\n" - "Tag value\n") -{ - int idx_number = 2; - return bgp_route_match_add (vty, vty->index, "tag", argv[idx_number]->arg, - RMAP_EVENT_MATCH_ADDED); -} - - -DEFUN (no_match_tag, - no_match_tag_cmd, - "no match tag [(1-65535)]", - NO_STR - MATCH_STR - "Match tag of route\n" - "Tag value\n") -{ - return bgp_route_match_delete (vty, vty->index, "tag", argv[3]->arg, - RMAP_EVENT_MATCH_DELETED); -} - - -DEFUN (set_ip_nexthop, - set_ip_nexthop_cmd, - "set ip next-hop A.B.C.D", - SET_STR - IP_STR - "Next hop address\n" - "IP address of next hop\n") -{ - int idx_ipv4 = 3; - union sockunion su; - int ret; - - ret = str2sockunion (argv[idx_ipv4]->arg, &su); - if (ret < 0) - { - vty_out (vty, "%% Malformed nexthop address%s", VTY_NEWLINE); - return CMD_WARNING; - } - if (su.sin.sin_addr.s_addr == 0 || - IPV4_CLASS_DE(su.sin.sin_addr.s_addr)) - { - vty_out (vty, "%% nexthop address cannot be 0.0.0.0, multicast " - "or reserved%s", VTY_NEWLINE); - return CMD_WARNING; - } - - return bgp_route_set_add (vty, vty->index, "ip next-hop", argv[idx_ipv4]->arg); -} - DEFUN (set_ip_nexthop_peer, set_ip_nexthop_peer_cmd, "set ip next-hop peer-address", @@ -3581,7 +3283,7 @@ DEFUN (set_ip_nexthop_peer, "Next hop address\n" "Use peer address (for BGP only)\n") { - return bgp_route_set_add (vty, vty->index, "ip next-hop", "peer-address"); + return generic_set_add (vty, vty->index, "ip next-hop", "peer-address"); } DEFUN (set_ip_nexthop_unchanged, @@ -3592,55 +3294,7 @@ DEFUN (set_ip_nexthop_unchanged, "Next hop address\n" "Don't modify existing Next hop address\n") { - return bgp_route_set_add (vty, vty->index, "ip next-hop", "unchanged"); -} - - -DEFUN (no_set_ip_nexthop, - no_set_ip_nexthop_cmd, - "no set ip next-hop []", - NO_STR - SET_STR - "Next hop address\n" - "Use peer address (for BGP only)\n" - "IP address of next hop\n") -{ - int idx_peer = 4; - if (argc <= idx_peer) - return bgp_route_set_delete (vty, vty->index, "ip next-hop", NULL); - return bgp_route_set_delete (vty, vty->index, "ip next-hop", argv[idx_peer]->arg); -} - - -DEFUN (set_metric, - set_metric_cmd, - "set metric <(0-4294967295)|rtt|+rtt|-rtt|+metric|-metric>", - SET_STR - "Metric value for destination routing protocol\n" - "Metric value\n" - "Assign round trip time\n" - "Add round trip time\n" - "Subtract round trip time\n" - "Add metric\n" - "Subtract metric\n") -{ - int idx_number = 2; - return bgp_route_set_add (vty, vty->index, "metric", argv[idx_number]->arg); -} - - -DEFUN (no_set_metric, - no_set_metric_cmd, - "no set metric [(0-4294967295)]", - NO_STR - SET_STR - "Metric value for destination routing protocol\n" - "Metric value\n") -{ - int idx_number = 3; - if (argc <= idx_number) - return bgp_route_set_delete (vty, vty->index, "metric", NULL); - return bgp_route_set_delete (vty, vty->index, "metric", argv[idx_number]->arg); + return generic_set_add (vty, vty->index, "ip next-hop", "unchanged"); } @@ -3652,7 +3306,7 @@ DEFUN (set_local_pref, "Preference value\n") { int idx_number = 2; - return bgp_route_set_add (vty, vty->index, "local-preference", argv[idx_number]->arg); + return generic_set_add (vty, vty->index, "local-preference", argv[idx_number]->arg); } @@ -3666,8 +3320,8 @@ DEFUN (no_set_local_pref, { int idx_localpref = 3; if (argc <= idx_localpref) - return bgp_route_set_delete (vty, vty->index, "local-preference", NULL); - return bgp_route_set_delete (vty, vty->index, "local-preference", argv[idx_localpref]->arg); + return generic_set_delete (vty, vty->index, "local-preference", NULL); + return generic_set_delete (vty, vty->index, "local-preference", argv[idx_localpref]->arg); } @@ -3679,7 +3333,7 @@ DEFUN (set_weight, "Weight value\n") { int idx_number = 2; - return bgp_route_set_add (vty, vty->index, "weight", argv[idx_number]->arg); + return generic_set_add (vty, vty->index, "weight", argv[idx_number]->arg); } @@ -3693,8 +3347,8 @@ DEFUN (no_set_weight, { int idx_weight = 3; if (argc <= idx_weight) - return bgp_route_set_delete (vty, vty->index, "weight", NULL); - return bgp_route_set_delete (vty, vty->index, "weight", argv[idx_weight]->arg); + return generic_set_delete (vty, vty->index, "weight", NULL); + return generic_set_delete (vty, vty->index, "weight", argv[idx_weight]->arg); } @@ -3711,7 +3365,7 @@ DEFUN (set_aspath_prepend_asn, char *str; str = argv_concat (argv, argc, idx_asn); - ret = bgp_route_set_add (vty, vty->index, "as-path prepend", str); + ret = generic_set_add (vty, vty->index, "as-path prepend", str); XFREE (MTYPE_TMP, str); return ret; @@ -3743,7 +3397,7 @@ DEFUN (no_set_aspath_prepend, char *str; str = argv_concat (argv, argc, idx_asn); - ret = bgp_route_set_delete (vty, vty->index, "as-path prepend", str); + ret = generic_set_delete (vty, vty->index, "as-path prepend", str); XFREE (MTYPE_TMP, str); return ret; } @@ -3762,7 +3416,7 @@ DEFUN (set_aspath_exclude, char *str; str = argv_concat (argv, argc, idx_asn); - ret = bgp_route_set_add (vty, vty->index, "as-path exclude", str); + ret = generic_set_add (vty, vty->index, "as-path exclude", str); XFREE (MTYPE_TMP, str); return ret; } @@ -3781,7 +3435,7 @@ DEFUN (no_set_aspath_exclude, char *str; str = argv_concat (argv, argc, idx_asn); - ret = bgp_route_set_delete (vty, vty->index, "as-path exclude", str); + ret = generic_set_delete (vty, vty->index, "as-path exclude", str); XFREE (MTYPE_TMP, str); return ret; } @@ -3870,11 +3524,11 @@ DEFUN (set_community, argstr = XCALLOC (MTYPE_TMP, strlen (str) + strlen (" additive") + 1); strcpy (argstr, str); strcpy (argstr + strlen (str), " additive"); - ret = bgp_route_set_add (vty, vty->index, "community", argstr); + ret = generic_set_add (vty, vty->index, "community", argstr); XFREE (MTYPE_TMP, argstr); } else - ret = bgp_route_set_add (vty, vty->index, "community", str); + ret = generic_set_add (vty, vty->index, "community", str); community_free (com); @@ -3888,7 +3542,7 @@ DEFUN (set_community_none, "BGP community attribute\n" "No community attribute\n") { - return bgp_route_set_add (vty, vty->index, "community", "none"); + return generic_set_add (vty, vty->index, "community", "none"); } DEFUN (no_set_community, @@ -3898,7 +3552,7 @@ DEFUN (no_set_community, SET_STR "BGP community attribute\n") { - return bgp_route_set_delete (vty, vty->index, "community", NULL); + return generic_set_delete (vty, vty->index, "community", NULL); } @@ -3920,7 +3574,7 @@ DEFUN (set_community_delete, strcpy (str, argv[idx_comm_list]->arg); strcpy (str + strlen (argv[idx_comm_list]->arg), " delete"); - bgp_route_set_add (vty, vty->index, "comm-list", str); + generic_set_add (vty, vty->index, "comm-list", str); XFREE (MTYPE_TMP, str); return CMD_SUCCESS; @@ -3933,7 +3587,7 @@ DEFUN (no_set_community_delete, SET_STR "set BGP community list (for deletion)\n") { - return bgp_route_set_delete (vty, vty->index, "comm-list", NULL); + return generic_set_delete (vty, vty->index, "comm-list", NULL); } @@ -3950,7 +3604,7 @@ DEFUN (set_ecommunity_rt, char *str; str = argv_concat (argv, argc, idx_asn_nn); - ret = bgp_route_set_add (vty, vty->index, "extcommunity rt", str); + ret = generic_set_add (vty, vty->index, "extcommunity rt", str); XFREE (MTYPE_TMP, str); return ret; @@ -3964,7 +3618,7 @@ DEFUN (no_set_ecommunity_rt, "BGP extended community attribute\n" "Route Target extended community\n") { - return bgp_route_set_delete (vty, vty->index, "extcommunity rt", NULL); + return generic_set_delete (vty, vty->index, "extcommunity rt", NULL); } @@ -3981,7 +3635,7 @@ DEFUN (set_ecommunity_soo, char *str; str = argv_concat (argv, argc, idx_asn_nn); - ret = bgp_route_set_add (vty, vty->index, "extcommunity soo", str); + ret = generic_set_add (vty, vty->index, "extcommunity soo", str); XFREE (MTYPE_TMP, str); return ret; } @@ -3995,7 +3649,7 @@ DEFUN (no_set_ecommunity_soo, "BGP extended community attribute\n" "Site-of-Origin extended community\n") { - return bgp_route_set_delete (vty, vty->index, "extcommunity soo", NULL); + return generic_set_delete (vty, vty->index, "extcommunity soo", NULL); } @@ -4010,11 +3664,11 @@ DEFUN (set_origin, { int idx_origin = 2; if (strncmp (argv[idx_origin]->arg, "igp", 2) == 0) - return bgp_route_set_add (vty, vty->index, "origin", "igp"); + return generic_set_add (vty, vty->index, "origin", "igp"); if (strncmp (argv[idx_origin]->arg, "egp", 1) == 0) - return bgp_route_set_add (vty, vty->index, "origin", "egp"); + return generic_set_add (vty, vty->index, "origin", "egp"); if (strncmp (argv[idx_origin]->arg, "incomplete", 2) == 0) - return bgp_route_set_add (vty, vty->index, "origin", "incomplete"); + return generic_set_add (vty, vty->index, "origin", "incomplete"); return CMD_WARNING; } @@ -4027,7 +3681,7 @@ DEFUN (no_set_origin, SET_STR "BGP origin code\n") { - return bgp_route_set_delete (vty, vty->index, "origin", NULL); + return generic_set_delete (vty, vty->index, "origin", NULL); } @@ -4037,7 +3691,7 @@ DEFUN (set_atomic_aggregate, SET_STR "BGP atomic aggregate attribute\n" ) { - return bgp_route_set_add (vty, vty->index, "atomic-aggregate", NULL); + return generic_set_add (vty, vty->index, "atomic-aggregate", NULL); } DEFUN (no_set_atomic_aggregate, @@ -4047,7 +3701,7 @@ DEFUN (no_set_atomic_aggregate, SET_STR "BGP atomic aggregate attribute\n" ) { - return bgp_route_set_delete (vty, vty->index, "atomic-aggregate", NULL); + return generic_set_delete (vty, vty->index, "atomic-aggregate", NULL); } DEFUN (set_aggregator_as, @@ -4077,7 +3731,7 @@ DEFUN (set_aggregator_as, sprintf (argstr, "%s %s", argv[idx_number]->arg, argv[idx_ipv4]->arg); - ret = bgp_route_set_add (vty, vty->index, "aggregator as", argstr); + ret = generic_set_add (vty, vty->index, "aggregator as", argstr); XFREE (MTYPE_ROUTE_MAP_COMPILED, argstr); @@ -4102,7 +3756,7 @@ DEFUN (no_set_aggregator_as, char *argstr; if (argc <= idx_asn) - return bgp_route_set_delete (vty, vty->index, "aggregator as", NULL); + return generic_set_delete (vty, vty->index, "aggregator as", NULL); ret = inet_aton (argv[idx_ip]->arg, &address); if (ret == 0) @@ -4116,7 +3770,7 @@ DEFUN (no_set_aggregator_as, sprintf (argstr, "%s %s", argv[idx_asn]->arg, argv[idx_ip]->arg); - ret = bgp_route_set_delete (vty, vty->index, "aggregator as", argstr); + ret = generic_set_delete (vty, vty->index, "aggregator as", argstr); XFREE (MTYPE_ROUTE_MAP_COMPILED, argstr); @@ -4124,62 +3778,7 @@ DEFUN (no_set_aggregator_as, } -DEFUN (set_tag, - set_tag_cmd, - "set tag (1-65535)", - SET_STR - "Tag value for routing protocol\n" - "Tag value\n") -{ - int idx_number = 2; - return bgp_route_set_add (vty, vty->index, "tag", argv[idx_number]->arg); -} - - -DEFUN (no_set_tag, - no_set_tag_cmd, - "no set tag [(1-65535)]", - NO_STR - SET_STR - "Tag value for routing protocol\n" - "Tag value\n") -{ - int idx_number = 3; - if (argc <= idx_number) - return bgp_route_set_delete (vty, vty->index, "tag", NULL); - return bgp_route_set_delete (vty, vty->index, "tag", argv[idx_number]->arg); -} - - - #ifdef HAVE_IPV6 -DEFUN (match_ipv6_address, - match_ipv6_address_cmd, - "match ipv6 address WORD", - MATCH_STR - IPV6_STR - "Match IPv6 address of route\n" - "IPv6 access-list name\n") -{ - int idx_word = 3; - return bgp_route_match_add (vty, vty->index, "ipv6 address", argv[idx_word]->arg, - RMAP_EVENT_FILTER_ADDED); -} - -DEFUN (no_match_ipv6_address, - no_match_ipv6_address_cmd, - "no match ipv6 address WORD", - NO_STR - MATCH_STR - IPV6_STR - "Match IPv6 address of route\n" - "IPv6 access-list name\n") -{ - int idx_word = 4; - return bgp_route_match_delete (vty, vty->index, "ipv6 address", argv[idx_word]->arg, - RMAP_EVENT_FILTER_DELETED); -} - DEFUN (match_ipv6_next_hop, match_ipv6_next_hop_cmd, "match ipv6 next-hop X:X::X:X", @@ -4207,34 +3806,6 @@ DEFUN (no_match_ipv6_next_hop, RMAP_EVENT_MATCH_DELETED); } -DEFUN (match_ipv6_address_prefix_list, - match_ipv6_address_prefix_list_cmd, - "match ipv6 address prefix-list WORD", - MATCH_STR - IPV6_STR - "Match address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") -{ - int idx_word = 4; - return bgp_route_match_add (vty, vty->index, "ipv6 address prefix-list", - argv[idx_word]->arg, RMAP_EVENT_PLIST_ADDED); -} - -DEFUN (no_match_ipv6_address_prefix_list, - no_match_ipv6_address_prefix_list_cmd, - "no match ipv6 address prefix-list WORD", - NO_STR - MATCH_STR - IPV6_STR - "Match address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") -{ - int idx_word = 5; - return bgp_route_match_delete (vty, vty->index, "ipv6 address prefix-list", - argv[idx_word]->arg, RMAP_EVENT_PLIST_DELETED); -} DEFUN (set_ipv6_nexthop_peer, set_ipv6_nexthop_peer_cmd, @@ -4244,7 +3815,7 @@ DEFUN (set_ipv6_nexthop_peer, "Next hop address\n" "Use peer address (for BGP only)\n") { - return bgp_route_set_add (vty, vty->index, "ipv6 next-hop peer-address", NULL); + return generic_set_add (vty, vty->index, "ipv6 next-hop peer-address", NULL); } DEFUN (no_set_ipv6_nexthop_peer, @@ -4256,7 +3827,7 @@ DEFUN (no_set_ipv6_nexthop_peer, "IPv6 next-hop address\n" "Use peer address (for BGP only)\n") { - return bgp_route_set_delete (vty, vty->index, "ipv6 next-hop peer-address", NULL); + return generic_set_delete (vty, vty->index, "ipv6 next-hop peer-address", NULL); } DEFUN (set_ipv6_nexthop_prefer_global, @@ -4267,7 +3838,7 @@ DEFUN (set_ipv6_nexthop_prefer_global, "IPv6 next-hop address\n" "Prefer global over link-local if both exist\n") { - return bgp_route_set_add (vty, vty->index, "ipv6 next-hop prefer-global", NULL);; + return generic_set_add (vty, vty->index, "ipv6 next-hop prefer-global", NULL);; } DEFUN (no_set_ipv6_nexthop_prefer_global, @@ -4279,7 +3850,7 @@ DEFUN (no_set_ipv6_nexthop_prefer_global, "IPv6 next-hop address\n" "Prefer global over link-local if both exist\n") { - return bgp_route_set_delete (vty, vty->index, "ipv6 next-hop prefer-global", NULL); + return generic_set_delete (vty, vty->index, "ipv6 next-hop prefer-global", NULL); } DEFUN (set_ipv6_nexthop_global, @@ -4310,7 +3881,7 @@ DEFUN (set_ipv6_nexthop_global, return CMD_WARNING; } - return bgp_route_set_add (vty, vty->index, "ipv6 next-hop global", argv[idx_ipv6]->arg); + return generic_set_add (vty, vty->index, "ipv6 next-hop global", argv[idx_ipv6]->arg); } @@ -4326,56 +3897,9 @@ DEFUN (no_set_ipv6_nexthop_global, { int idx_ipv6 = 5; if (argc <= idx_ipv6) - return bgp_route_set_delete (vty, vty->index, "ipv6 next-hop global", NULL); - return bgp_route_set_delete (vty, vty->index, "ipv6 next-hop global", argv[idx_ipv6]->arg); -} - - -DEFUN (set_ipv6_nexthop_local, - set_ipv6_nexthop_local_cmd, - "set ipv6 next-hop local X:X::X:X", - SET_STR - IPV6_STR - "IPv6 next-hop address\n" - "IPv6 local address\n" - "IPv6 address of next hop\n") -{ - int idx_ipv6 = 4; - struct in6_addr addr; - int ret; - - ret = inet_pton (AF_INET6, argv[idx_ipv6]->arg, &addr); - if (!ret) - { - vty_out (vty, "%% Malformed nexthop address%s", VTY_NEWLINE); - return CMD_WARNING; - } - if (!IN6_IS_ADDR_LINKLOCAL(&addr)) - { - vty_out (vty, "%% Invalid link-local nexthop address%s", VTY_NEWLINE); - return CMD_WARNING; - } - - return bgp_route_set_add (vty, vty->index, "ipv6 next-hop local", argv[idx_ipv6]->arg); -} - - -DEFUN (no_set_ipv6_nexthop_local, - no_set_ipv6_nexthop_local_cmd, - "no set ipv6 next-hop local [X:X::X:X]", - NO_STR - SET_STR - IPV6_STR - "IPv6 next-hop address\n" - "IPv6 local address\n" - "IPv6 address of next hop\n") -{ - int idx_ipv6 = 5; - if (argc <= idx_ipv6) - return bgp_route_set_delete (vty, vty->index, "ipv6 next-hop local", NULL); - return bgp_route_set_delete (vty, vty->index, "ipv6 next-hop local", argv[5]->arg); + return generic_set_delete (vty, vty->index, "ipv6 next-hop global", NULL); + return generic_set_delete (vty, vty->index, "ipv6 next-hop global", argv[idx_ipv6]->arg); } - #endif /* HAVE_IPV6 */ DEFUN (set_vpnv4_nexthop, @@ -4387,7 +3911,7 @@ DEFUN (set_vpnv4_nexthop, "IP address of next hop\n") { int idx_ipv4 = 3; - return bgp_route_set_add (vty, vty->index, "vpnv4 next-hop", argv[idx_ipv4]->arg); + return generic_set_add (vty, vty->index, "vpnv4 next-hop", argv[idx_ipv4]->arg); } @@ -4402,8 +3926,8 @@ DEFUN (no_set_vpnv4_nexthop, { int idx_ipv4 = 4; if (argc <= idx_ipv4) - return bgp_route_set_delete (vty, vty->index, "vpnv4 next-hop", NULL); - return bgp_route_set_delete (vty, vty->index, "vpnv4 next-hop", argv[idx_ipv4]->arg); + return generic_set_delete (vty, vty->index, "vpnv4 next-hop", NULL); + return generic_set_delete (vty, vty->index, "vpnv4 next-hop", argv[idx_ipv4]->arg); } @@ -4415,7 +3939,7 @@ DEFUN (set_originator_id, "IP address of originator\n") { int idx_ipv4 = 2; - return bgp_route_set_add (vty, vty->index, "originator-id", argv[idx_ipv4]->arg); + return generic_set_add (vty, vty->index, "originator-id", argv[idx_ipv4]->arg); } @@ -4429,8 +3953,8 @@ DEFUN (no_set_originator_id, { int idx_id = 3; if (argc < idx_id) - return bgp_route_set_delete (vty, vty->index, "originator-id", NULL); - return bgp_route_set_delete (vty, vty->index, "originator-id", argv[idx_id]->arg); + return generic_set_delete (vty, vty->index, "originator-id", NULL); + return generic_set_delete (vty, vty->index, "originator-id", argv[idx_id]->arg); } @@ -4444,6 +3968,45 @@ bgp_route_map_init (void) route_map_delete_hook (bgp_route_map_delete); route_map_event_hook (bgp_route_map_event); + route_map_match_interface_hook (generic_match_add); + route_map_no_match_interface_hook (generic_match_delete); + + route_map_match_ip_address_hook (generic_match_add); + route_map_no_match_ip_address_hook (generic_match_delete); + + route_map_match_ip_address_prefix_list_hook (generic_match_add); + route_map_no_match_ip_address_prefix_list_hook (generic_match_delete); + + route_map_match_ip_next_hop_hook (generic_match_add); + route_map_no_match_ip_next_hop_hook (generic_match_delete); + + route_map_match_ip_next_hop_prefix_list_hook (generic_match_add); + route_map_no_match_ip_next_hop_prefix_list_hook (generic_match_delete); + + route_map_match_ipv6_address_hook (generic_match_add); + route_map_no_match_ipv6_address_hook (generic_match_delete); + + route_map_match_ipv6_address_prefix_list_hook (generic_match_add); + route_map_no_match_ipv6_address_prefix_list_hook (generic_match_delete); + + route_map_match_metric_hook (generic_match_add); + route_map_no_match_metric_hook (generic_match_delete); + + route_map_match_tag_hook (generic_match_add); + route_map_no_match_tag_hook (generic_match_delete); + + route_map_set_ip_nexthop_hook (generic_set_add); + route_map_no_set_ip_nexthop_hook (generic_set_delete); + + route_map_set_ipv6_nexthop_local_hook (generic_set_add); + route_map_no_set_ipv6_nexthop_local_hook (generic_set_delete); + + route_map_set_metric_hook (generic_set_add); + route_map_no_set_metric_hook (generic_set_delete); + + route_map_set_tag_hook (generic_set_add); + route_map_no_set_tag_hook (generic_set_delete); + route_map_install_match (&route_match_peer_cmd); route_map_install_match (&route_match_local_pref_cmd); route_map_install_match (&route_match_ip_address_cmd); @@ -4482,23 +4045,13 @@ bgp_route_map_init (void) install_element (RMAP_NODE, &match_peer_cmd); install_element (RMAP_NODE, &match_peer_local_cmd); install_element (RMAP_NODE, &no_match_peer_cmd); - install_element (RMAP_NODE, &match_ip_address_cmd); - install_element (RMAP_NODE, &no_match_ip_address_cmd); - install_element (RMAP_NODE, &match_ip_next_hop_cmd); - install_element (RMAP_NODE, &no_match_ip_next_hop_cmd); install_element (RMAP_NODE, &match_ip_route_source_cmd); install_element (RMAP_NODE, &no_match_ip_route_source_cmd); - install_element (RMAP_NODE, &match_ip_address_prefix_list_cmd); - install_element (RMAP_NODE, &no_match_ip_address_prefix_list_cmd); - install_element (RMAP_NODE, &match_ip_next_hop_prefix_list_cmd); - install_element (RMAP_NODE, &no_match_ip_next_hop_prefix_list_cmd); install_element (RMAP_NODE, &match_ip_route_source_prefix_list_cmd); install_element (RMAP_NODE, &no_match_ip_route_source_prefix_list_cmd); install_element (RMAP_NODE, &match_aspath_cmd); install_element (RMAP_NODE, &no_match_aspath_cmd); - install_element (RMAP_NODE, &match_metric_cmd); - install_element (RMAP_NODE, &no_match_metric_cmd); install_element (RMAP_NODE, &match_local_pref_cmd); install_element (RMAP_NODE, &no_match_local_pref_cmd); install_element (RMAP_NODE, &match_community_cmd); @@ -4510,21 +4063,13 @@ bgp_route_map_init (void) install_element (RMAP_NODE, &no_match_origin_cmd); install_element (RMAP_NODE, &match_probability_cmd); install_element (RMAP_NODE, &no_match_probability_cmd); - install_element (RMAP_NODE, &match_interface_cmd); - install_element (RMAP_NODE, &no_match_interface_cmd); - install_element (RMAP_NODE, &match_tag_cmd); - install_element (RMAP_NODE, &no_match_tag_cmd); - install_element (RMAP_NODE, &set_ip_nexthop_cmd); install_element (RMAP_NODE, &set_ip_nexthop_peer_cmd); install_element (RMAP_NODE, &set_ip_nexthop_unchanged_cmd); - install_element (RMAP_NODE, &no_set_ip_nexthop_cmd); install_element (RMAP_NODE, &set_local_pref_cmd); install_element (RMAP_NODE, &no_set_local_pref_cmd); install_element (RMAP_NODE, &set_weight_cmd); install_element (RMAP_NODE, &no_set_weight_cmd); - install_element (RMAP_NODE, &set_metric_cmd); - install_element (RMAP_NODE, &no_set_metric_cmd); install_element (RMAP_NODE, &set_aspath_prepend_asn_cmd); install_element (RMAP_NODE, &set_aspath_prepend_lastas_cmd); install_element (RMAP_NODE, &set_aspath_exclude_cmd); @@ -4549,8 +4094,6 @@ bgp_route_map_init (void) install_element (RMAP_NODE, &no_set_vpnv4_nexthop_cmd); install_element (RMAP_NODE, &set_originator_id_cmd); install_element (RMAP_NODE, &no_set_originator_id_cmd); - install_element (RMAP_NODE, &set_tag_cmd); - install_element (RMAP_NODE, &no_set_tag_cmd); #ifdef HAVE_IPV6 route_map_install_match (&route_match_ipv6_address_cmd); @@ -4561,18 +4104,12 @@ bgp_route_map_init (void) route_map_install_set (&route_set_ipv6_nexthop_local_cmd); route_map_install_set (&route_set_ipv6_nexthop_peer_cmd); - install_element (RMAP_NODE, &match_ipv6_address_cmd); - install_element (RMAP_NODE, &no_match_ipv6_address_cmd); install_element (RMAP_NODE, &match_ipv6_next_hop_cmd); install_element (RMAP_NODE, &no_match_ipv6_next_hop_cmd); - install_element (RMAP_NODE, &match_ipv6_address_prefix_list_cmd); - install_element (RMAP_NODE, &no_match_ipv6_address_prefix_list_cmd); install_element (RMAP_NODE, &set_ipv6_nexthop_global_cmd); install_element (RMAP_NODE, &no_set_ipv6_nexthop_global_cmd); install_element (RMAP_NODE, &set_ipv6_nexthop_prefer_global_cmd); install_element (RMAP_NODE, &no_set_ipv6_nexthop_prefer_global_cmd); - install_element (RMAP_NODE, &set_ipv6_nexthop_local_cmd); - install_element (RMAP_NODE, &no_set_ipv6_nexthop_local_cmd); install_element (RMAP_NODE, &set_ipv6_nexthop_peer_cmd); install_element (RMAP_NODE, &no_set_ipv6_nexthop_peer_cmd); #endif /* HAVE_IPV6 */ diff --git a/isisd/isis_routemap.c b/isisd/isis_routemap.c index 72caa5a09..93267afe9 100644 --- a/isisd/isis_routemap.c +++ b/isisd/isis_routemap.c @@ -250,282 +250,30 @@ static struct route_map_rule_cmd route_set_metric_cmd = route_set_metric_free }; -/* ------------------------------------------------------------*/ - -static int -isis_route_match_add(struct vty *vty, struct route_map_index *index, - const char *command, const char *arg) -{ - int ret; - - ret = route_map_add_match (index, command, arg); - if (ret) - { - switch (ret) - { - case RMAP_RULE_MISSING: - vty_out (vty, "%% Can't find rule.%s", VTY_NEWLINE); - return CMD_WARNING; - case RMAP_COMPILE_ERROR: - vty_out (vty, "%% Argument is malformed.%s", VTY_NEWLINE); - return CMD_WARNING; - } - } - return CMD_SUCCESS; -} - -static int -isis_route_match_delete(struct vty *vty, struct route_map_index *index, - const char *command, const char *arg) -{ - int ret; - - ret = route_map_delete_match (index, command, arg); - if (ret) - { - switch (ret) - { - case RMAP_RULE_MISSING: - vty_out (vty, "%% Can't find rule.%s", VTY_NEWLINE); - return CMD_WARNING; - case RMAP_COMPILE_ERROR: - vty_out (vty, "%% Argument is malformed.%s", VTY_NEWLINE); - return CMD_WARNING; - } - } - return CMD_SUCCESS; -} - -static int -isis_route_set_add(struct vty *vty, struct route_map_index *index, - const char *command, const char *arg) -{ - int ret; - - ret = route_map_add_set(index, command, arg); - if (ret) - { - switch (ret) - { - case RMAP_RULE_MISSING: - vty_out (vty, "%% Can't find rule.%s", VTY_NEWLINE); - return CMD_WARNING; - case RMAP_COMPILE_ERROR: - vty_out (vty, "%% Argument is malformed.%s", VTY_NEWLINE); - return CMD_WARNING; - } - } - - return CMD_SUCCESS; -} - -static int -isis_route_set_delete (struct vty *vty, struct route_map_index *index, - const char *command, const char *arg) -{ - int ret; - - ret = route_map_delete_set (index, command, arg); - if (ret) - { - switch (ret) - { - case RMAP_RULE_MISSING: - vty_out (vty, "%% Can't find rule.%s", VTY_NEWLINE); - return CMD_WARNING; - case RMAP_COMPILE_ERROR: - vty_out (vty, "%% Argument is malformed.%s", VTY_NEWLINE); - return CMD_WARNING; - } - } - - return CMD_SUCCESS; -} - -/* ------------------------------------------------------------*/ - -DEFUN (match_ip_address, - match_ip_address_cmd, - "match ip address <(1-199)|(1300-2699)|WORD>", - MATCH_STR - IP_STR - "Match address of route\n" - "IP access-list number\n" - "IP access-list number (expanded range)\n" - "IP Access-list name\n") -{ - int idx_acl = 3; - return isis_route_match_add(vty, vty->index, "ip address", argv[idx_acl]->arg); -} - - -DEFUN (no_match_ip_address, - no_match_ip_address_val_cmd, - "no match ip address [<(1-199)|(1300-2699)|WORD>]", - NO_STR - MATCH_STR - IP_STR - "Match address of route\n" - "IP access-list number\n" - "IP access-list number (expanded range)\n" - "IP Access-list name\n") -{ - int idx_acl = 4; - if (argc == 4) - return isis_route_match_delete(vty, vty->index, "ip address", NULL); - return isis_route_match_delete(vty, vty->index, "ip address", argv[idx_acl]->arg); -} - - -/* ------------------------------------------------------------*/ - -DEFUN (match_ip_address_prefix_list, - match_ip_address_prefix_list_cmd, - "match ip address prefix-list WORD", - MATCH_STR - IP_STR - "Match address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") -{ - int idx_word = 4; - return isis_route_match_add(vty, vty->index, "ip address prefix-list", argv[idx_word]->arg); -} - - -DEFUN (no_match_ip_address_prefix_list, - no_match_ip_address_prefix_list_cmd, - "no match ip address prefix-list [WORD]", - NO_STR - MATCH_STR - IP_STR - "Match address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") -{ - int idx_word = 5; - if (argc == 5) - return isis_route_match_delete (vty, vty->index, "ip address prefix-list", NULL); - return isis_route_match_delete (vty, vty->index, "ip address prefix-list", argv[idx_word]->arg); -} - - -/* ------------------------------------------------------------*/ - -DEFUN (match_ipv6_address, - match_ipv6_address_cmd, - "match ipv6 address WORD", - MATCH_STR - IPV6_STR - "Match IPv6 address of route\n" - "IPv6 access-list name\n") -{ - int idx_word = 3; - return isis_route_match_add(vty, vty->index, "ipv6 address", argv[idx_word]->arg); -} - - -DEFUN (no_match_ipv6_address, - no_match_ipv6_address_val_cmd, - "no match ipv6 address [WORD]", - NO_STR - MATCH_STR - IPV6_STR - "Match IPv6 address of route\n" - "IPv6 access-list name\n") -{ - int idx_word = 4; - if (argc == 4) - return isis_route_match_delete(vty, vty->index, "ipv6 address", NULL); - return isis_route_match_delete(vty, vty->index, "ipv6 address", argv[idx_word]->arg); -} - - -/* ------------------------------------------------------------*/ - -DEFUN (match_ipv6_address_prefix_list, - match_ipv6_address_prefix_list_cmd, - "match ipv6 address prefix-list WORD", - MATCH_STR - IPV6_STR - "Match address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") -{ - int idx_word = 4; - return isis_route_match_add(vty, vty->index, "ipv6 address prefix-list", argv[idx_word]->arg); -} - -DEFUN (no_match_ipv6_address_prefix_list, - no_match_ipv6_address_prefix_list_cmd, - "no match ipv6 address prefix-list [WORD]", - NO_STR - MATCH_STR - IPV6_STR - "Match address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") +void +isis_route_map_init(void) { - int idx_word = 5; - if (argc == 5) - return isis_route_match_delete (vty, vty->index, "ipv6 address prefix-list", NULL); - return isis_route_match_delete (vty, vty->index, "ipv6 address prefix-list", argv[idx_word]->arg); -} + route_map_init(); + route_map_init_vty(); + route_map_match_ip_address_hook (generic_match_add); + route_map_no_match_ip_address_hook (generic_match_delete); -/* ------------------------------------------------------------*/ + route_map_match_ip_address_prefix_list_hook (generic_match_add); + route_map_no_match_ip_address_prefix_list_hook (generic_match_delete); -/* set metric already exists e.g. in the ospf routemap. vtysh doesn't cope well with different - * commands at the same node, therefore add set metric with the same 32-bit range as ospf and - * verify that the input is a valid isis metric */ -DEFUN (set_metric, - set_metric_cmd, - "set metric (0-4294967295)", - SET_STR - "Metric vale for destination routing protocol\n" - "Metric value\n") -{ - int idx_number = 2; - return isis_route_set_add(vty, vty->index, "metric", argv[idx_number]->arg); -} + route_map_match_ipv6_address_hook (generic_match_add); + route_map_no_match_ipv6_address_hook (generic_match_delete); -DEFUN (no_set_metric, - no_set_metric_val_cmd, - "no set metric [(0-4294967295)]", - NO_STR - SET_STR - "Metric value for destination routing protocol\n" - "Metric value\n") -{ - int idx_number = 3; - if (argc == 3) - return isis_route_set_delete(vty, vty->index, "metric", NULL); - return isis_route_set_delete(vty, vty->index, "metric", argv[idx_number]->arg); -} + route_map_match_ipv6_address_prefix_list_hook (generic_match_add); + route_map_no_match_ipv6_address_prefix_list_hook (generic_match_delete); -void -isis_route_map_init(void) -{ - route_map_init(); - route_map_init_vty(); + route_map_set_metric_hook (generic_set_add); + route_map_no_set_metric_hook (generic_set_delete); route_map_install_match(&route_match_ip_address_cmd); - install_element(RMAP_NODE, &match_ip_address_cmd); - install_element(RMAP_NODE, &no_match_ip_address_val_cmd); - route_map_install_match(&route_match_ip_address_prefix_list_cmd); - install_element(RMAP_NODE, &match_ip_address_prefix_list_cmd); - install_element(RMAP_NODE, &no_match_ip_address_prefix_list_cmd); - route_map_install_match(&route_match_ipv6_address_cmd); - install_element(RMAP_NODE, &match_ipv6_address_cmd); - install_element(RMAP_NODE, &no_match_ipv6_address_val_cmd); - route_map_install_match(&route_match_ipv6_address_prefix_list_cmd); - install_element(RMAP_NODE, &match_ipv6_address_prefix_list_cmd); - install_element(RMAP_NODE, &no_match_ipv6_address_prefix_list_cmd); - route_map_install_set(&route_set_metric_cmd); - install_element(RMAP_NODE, &set_metric_cmd); - install_element(RMAP_NODE, &no_set_metric_val_cmd); } diff --git a/lib/routemap.c b/lib/routemap.c index 2e8637bcb..a68b6210b 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -24,9 +24,9 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "memory.h" #include "vector.h" #include "prefix.h" +#include "vty.h" #include "routemap.h" #include "command.h" -#include "vty.h" #include "log.h" #include "hash.h" @@ -44,6 +44,594 @@ static vector route_match_vec; /* Vector for route set rules. */ static vector route_set_vec; +struct route_map_match_set_hooks +{ + /* match interface */ + int (*match_interface) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type); + + /* no match interface */ + int (*no_match_interface) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type); + + /* match ip address */ + int (*match_ip_address) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type); + + /* no match ip address */ + int (*no_match_ip_address) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type); + + /* match ip address prefix list */ + int (*match_ip_address_prefix_list) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type); + + /* no match ip address prefix list */ + int (*no_match_ip_address_prefix_list) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type); + + /* match ip next hop */ + int (*match_ip_next_hop) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type); + + /* no match ip next hop */ + int (*no_match_ip_next_hop) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type); + + /* match ip next hop prefix list */ + int (*match_ip_next_hop_prefix_list) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type); + + /* no match ip next hop prefix list */ + int (*no_match_ip_next_hop_prefix_list) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type); + + /* match ipv6 address */ + int (*match_ipv6_address) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type); + + /* no match ipv6 address */ + int (*no_match_ipv6_address) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type); + + + /* match ipv6 address prefix list */ + int (*match_ipv6_address_prefix_list) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type); + + /* no match ipv6 address prefix list */ + int (*no_match_ipv6_address_prefix_list) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type); + + /* match metric */ + int (*match_metric) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type); + + /* no match metric */ + int (*no_match_metric) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type); + + /* match tag */ + int (*match_tag) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type); + + /* no match tag */ + int (*no_match_tag) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type); + + /* set ip nexthop */ + int (*set_ip_nexthop) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg); + + /* no set ip nexthop */ + int (*no_set_ip_nexthop) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg); + + /* set ipv6 nexthop local */ + int (*set_ipv6_nexthop_local) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg); + + /* no set ipv6 nexthop local */ + int (*no_set_ipv6_nexthop_local) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg); + + /* set metric */ + int (*set_metric) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg); + + /* no set metric */ + int (*no_set_metric) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg); + + /* set tag */ + int (*set_tag) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg); + + /* no set tag */ + int (*no_set_tag) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg); + +}; + +struct route_map_match_set_hooks rmap_match_set_hook; + +/* match interface */ +void +route_map_match_interface_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)) +{ + rmap_match_set_hook.match_interface = func; +} + +/* no match interface */ +void +route_map_no_match_interface_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)) +{ + rmap_match_set_hook.no_match_interface = func; +} + +/* match ip address */ +void +route_map_match_ip_address_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)) +{ + rmap_match_set_hook.match_ip_address = func; +} + +/* no match ip address */ +void +route_map_no_match_ip_address_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)) +{ + rmap_match_set_hook.no_match_ip_address = func; +} + +/* match ip address prefix list */ +void +route_map_match_ip_address_prefix_list_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)) +{ + rmap_match_set_hook.match_ip_address_prefix_list = func; +} + +/* no match ip address prefix list */ +void +route_map_no_match_ip_address_prefix_list_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)) +{ + rmap_match_set_hook.no_match_ip_address_prefix_list = func; +} + +/* match ip next hop */ +void +route_map_match_ip_next_hop_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)) +{ + rmap_match_set_hook.match_ip_next_hop = func; +} + +/* no match ip next hop */ +void +route_map_no_match_ip_next_hop_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)) +{ + rmap_match_set_hook.no_match_ip_next_hop = func; +} + +/* match ip next hop prefix list */ +void +route_map_match_ip_next_hop_prefix_list_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)) +{ + rmap_match_set_hook.match_ip_next_hop_prefix_list = func; +} + +/* no match ip next hop prefix list */ +void +route_map_no_match_ip_next_hop_prefix_list_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)) +{ + rmap_match_set_hook.no_match_ip_next_hop_prefix_list = func; +} + +/* match ipv6 address */ +void +route_map_match_ipv6_address_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)) +{ + rmap_match_set_hook.match_ipv6_address = func; +} + +/* no match ipv6 address */ +void +route_map_no_match_ipv6_address_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)) +{ + rmap_match_set_hook.no_match_ipv6_address = func; +} + + +/* match ipv6 address prefix list */ +void +route_map_match_ipv6_address_prefix_list_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)) +{ + rmap_match_set_hook.match_ipv6_address_prefix_list = func; +} + +/* no match ipv6 address prefix list */ +void +route_map_no_match_ipv6_address_prefix_list_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)) +{ + rmap_match_set_hook.no_match_ipv6_address_prefix_list = func; +} + +/* match metric */ +void +route_map_match_metric_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)) +{ + rmap_match_set_hook.match_metric = func; +} + +/* no match metric */ +void +route_map_no_match_metric_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)) +{ + rmap_match_set_hook.no_match_metric = func; +} + +/* match tag */ +void +route_map_match_tag_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)) +{ + rmap_match_set_hook.match_tag = func; +} + +/* no match tag */ +void +route_map_no_match_tag_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)) +{ + rmap_match_set_hook.no_match_tag = func; +} + +/* set ip nexthop */ +void +route_map_set_ip_nexthop_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg)) +{ + rmap_match_set_hook.set_ip_nexthop = func; +} + +/* no set ip nexthop */ +void +route_map_no_set_ip_nexthop_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg)) +{ + rmap_match_set_hook.no_set_ip_nexthop = func; +} + +/* set ipv6 nexthop local */ +void +route_map_set_ipv6_nexthop_local_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg)) +{ + rmap_match_set_hook.set_ipv6_nexthop_local = func; +} + +/* no set ipv6 nexthop local */ +void +route_map_no_set_ipv6_nexthop_local_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg)) +{ + rmap_match_set_hook.no_set_ipv6_nexthop_local = func; +} + +/* set metric */ +void +route_map_set_metric_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg)) +{ + rmap_match_set_hook.set_metric = func; +} + +/* no set metric */ +void +route_map_no_set_metric_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg)) +{ + rmap_match_set_hook.no_set_metric = func; +} + +/* set tag */ +void +route_map_set_tag_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg)) +{ + rmap_match_set_hook.set_tag = func; +} + +/* no set tag */ +void +route_map_no_set_tag_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg)) +{ + rmap_match_set_hook.no_set_tag = func; +} + +int +generic_match_add (struct vty *vty, struct route_map_index *index, + const char *command, const char *arg, + route_map_event_t type) +{ + int ret; + + ret = route_map_add_match (index, command, arg); + if (ret) + { + switch (ret) + { + case RMAP_RULE_MISSING: + vty_out (vty, "%% Can't find rule.%s", VTY_NEWLINE); + return CMD_WARNING; + case RMAP_COMPILE_ERROR: + vty_out (vty, "%% Argument is malformed.%s", VTY_NEWLINE); + return CMD_WARNING; + } + } + + if (type != RMAP_EVENT_MATCH_ADDED) + { + route_map_upd8_dependency (type, arg, index->map->name); + } + return CMD_SUCCESS; +} + +int +generic_match_delete (struct vty *vty, struct route_map_index *index, + const char *command, const char *arg, + route_map_event_t type) +{ + int ret; + char *dep_name = NULL; + const char *tmpstr; + char *rmap_name = NULL; + + if (type != RMAP_EVENT_MATCH_DELETED) + { + /* ignore the mundane, the types without any dependency */ + if (arg == NULL) + { + if ((tmpstr = route_map_get_match_arg(index, command)) != NULL) + dep_name = XSTRDUP(MTYPE_ROUTE_MAP_RULE, tmpstr); + } + else + { + dep_name = XSTRDUP(MTYPE_ROUTE_MAP_RULE, arg); + } + rmap_name = XSTRDUP(MTYPE_ROUTE_MAP_NAME, index->map->name); + } + + ret = route_map_delete_match (index, command, dep_name); + if (ret) + { + switch (ret) + { + case RMAP_RULE_MISSING: + vty_out (vty, "%% BGP Can't find rule.%s", VTY_NEWLINE); + break; + case RMAP_COMPILE_ERROR: + vty_out (vty, "%% BGP Argument is malformed.%s", VTY_NEWLINE); + break; + } + if (dep_name) + XFREE(MTYPE_ROUTE_MAP_RULE, dep_name); + if (rmap_name) + XFREE(MTYPE_ROUTE_MAP_NAME, rmap_name); + return CMD_WARNING; + } + + if (type != RMAP_EVENT_MATCH_DELETED && dep_name) + route_map_upd8_dependency(type, dep_name, rmap_name); + + if (dep_name) + XFREE(MTYPE_ROUTE_MAP_RULE, dep_name); + if (rmap_name) + XFREE(MTYPE_ROUTE_MAP_NAME, rmap_name); + + return CMD_SUCCESS; +} + +int +generic_set_add (struct vty *vty, struct route_map_index *index, + const char *command, const char *arg) +{ + int ret; + + ret = route_map_add_set (index, command, arg); + if (ret) + { + switch (ret) + { + case RMAP_RULE_MISSING: + vty_out (vty, "%% Can't find rule.%s", VTY_NEWLINE); + return CMD_WARNING; + case RMAP_COMPILE_ERROR: + vty_out (vty, "%% Argument is malformed.%s", VTY_NEWLINE); + return CMD_WARNING; + } + } + return CMD_SUCCESS; +} + +int +generic_set_delete (struct vty *vty, struct route_map_index *index, + const char *command, const char *arg) +{ + int ret; + + ret = route_map_delete_set (index, command, arg); + if (ret) + { + switch (ret) + { + case RMAP_RULE_MISSING: + vty_out (vty, "%% Can't find rule.%s", VTY_NEWLINE); + return CMD_WARNING; + case RMAP_COMPILE_ERROR: + vty_out (vty, "%% Argument is malformed.%s", VTY_NEWLINE); + return CMD_WARNING; + } + } + return CMD_SUCCESS; +} + + /* Route map rule. This rule has both `match' rule and `set' rule. */ struct route_map_rule { @@ -1396,7 +1984,515 @@ route_map_notify_dependencies (const char *affected_name, route_map_event_t even XFREE (MTYPE_ROUTE_MAP_NAME, name); } + /* VTY related functions. */ +DEFUN (match_interface, + match_interface_cmd, + "match interface WORD", + MATCH_STR + "match first hop interface of route\n" + "Interface name\n") +{ + int idx_word = 2; + + if (rmap_match_set_hook.match_interface) + return rmap_match_set_hook.match_interface (vty, vty->index, "interface", argv[idx_word]->arg, RMAP_EVENT_MATCH_ADDED); + return CMD_SUCCESS; +} + +DEFUN (no_match_interface, + no_match_interface_cmd, + "no match interface [INTERFACE]", + NO_STR + MATCH_STR + "Match first hop interface of route\n" + "Interface name\n") +{ + char *iface = (argc == 4) ? argv[3]->arg : NULL; + + if (rmap_match_set_hook.no_match_interface) + return rmap_match_set_hook.no_match_interface (vty, vty->index, "interface", iface, RMAP_EVENT_MATCH_DELETED); + return CMD_SUCCESS; +} + + +DEFUN (match_ip_address, + match_ip_address_cmd, + "match ip address <(1-199)|(1300-2699)|WORD>", + MATCH_STR + IP_STR + "Match address of route\n" + "IP access-list number\n" + "IP access-list number (expanded range)\n" + "IP Access-list name\n") +{ + int idx_acl = 3; + + if (rmap_match_set_hook.match_ip_address) + return rmap_match_set_hook.match_ip_address (vty, vty->index, "ip address", argv[idx_acl]->arg, + RMAP_EVENT_FILTER_ADDED); + return CMD_SUCCESS; +} + + +DEFUN (no_match_ip_address, + no_match_ip_address_cmd, + "no match ip address [<(1-199)|(1300-2699)|WORD>]", + NO_STR + MATCH_STR + IP_STR + "Match address of route\n" + "IP access-list number\n" + "IP access-list number (expanded range)\n" + "IP Access-list name\n") +{ + int idx_word = 4; + + if (rmap_match_set_hook.no_match_ip_address) + { + if (argc <= idx_word) + return rmap_match_set_hook.no_match_ip_address (vty, vty->index, "ip address", NULL, + RMAP_EVENT_FILTER_DELETED); + return rmap_match_set_hook.no_match_ip_address (vty, vty->index, "ip address", argv[idx_word]->arg, + RMAP_EVENT_FILTER_DELETED); + } + return CMD_SUCCESS; +} + + +DEFUN (match_ip_address_prefix_list, + match_ip_address_prefix_list_cmd, + "match ip address prefix-list WORD", + MATCH_STR + IP_STR + "Match address of route\n" + "Match entries of prefix-lists\n" + "IP prefix-list name\n") +{ + int idx_word = 4; + if (rmap_match_set_hook.match_ip_address_prefix_list) + return rmap_match_set_hook.match_ip_address_prefix_list (vty, vty->index, "ip address prefix-list", + argv[idx_word]->arg, RMAP_EVENT_PLIST_ADDED); + return CMD_SUCCESS; +} + + +DEFUN (no_match_ip_address_prefix_list, + no_match_ip_address_prefix_list_cmd, + "no match ip address prefix-list [WORD]", + NO_STR + MATCH_STR + IP_STR + "Match address of route\n" + "Match entries of prefix-lists\n" + "IP prefix-list name\n") +{ + int idx_word = 5; + + if (rmap_match_set_hook.no_match_ip_address_prefix_list) + { + if (argc <= idx_word) + return rmap_match_set_hook.no_match_ip_address_prefix_list (vty, vty->index, "ip address prefix-list", + NULL, RMAP_EVENT_PLIST_DELETED); + return rmap_match_set_hook.no_match_ip_address_prefix_list(vty, vty->index, "ip address prefix-list", + argv[idx_word]->arg, RMAP_EVENT_PLIST_DELETED); + } + return CMD_SUCCESS; +} + + +DEFUN (match_ip_next_hop, + match_ip_next_hop_cmd, + "match ip next-hop <(1-199)|(1300-2699)|WORD>", + MATCH_STR + IP_STR + "Match next-hop address of route\n" + "IP access-list number\n" + "IP access-list number (expanded range)\n" + "IP Access-list name\n") +{ + int idx_acl = 3; + if (rmap_match_set_hook.match_ip_next_hop) + return rmap_match_set_hook.match_ip_next_hop (vty, vty->index, "ip next-hop", argv[idx_acl]->arg, + RMAP_EVENT_FILTER_ADDED); + return CMD_SUCCESS; +} + + +DEFUN (no_match_ip_next_hop, + no_match_ip_next_hop_cmd, + "no match ip next-hop [<(1-199)|(1300-2699)|WORD>]", + NO_STR + MATCH_STR + IP_STR + "Match next-hop address of route\n" + "IP access-list number\n" + "IP access-list number (expanded range)\n" + "IP Access-list name\n") +{ + int idx_word = 4; + + if (rmap_match_set_hook.no_match_ip_next_hop) + { + if (argc <= idx_word) + return rmap_match_set_hook.no_match_ip_next_hop (vty, vty->index, "ip next-hop", NULL, + RMAP_EVENT_FILTER_DELETED); + return rmap_match_set_hook.no_match_ip_next_hop (vty, vty->index, "ip next-hop", argv[idx_word]->arg, + RMAP_EVENT_FILTER_DELETED); + } + return CMD_SUCCESS; +} + + +DEFUN (match_ip_next_hop_prefix_list, + match_ip_next_hop_prefix_list_cmd, + "match ip next-hop prefix-list WORD", + MATCH_STR + IP_STR + "Match next-hop address of route\n" + "Match entries of prefix-lists\n" + "IP prefix-list name\n") +{ + int idx_word = 4; + if (rmap_match_set_hook.match_ip_next_hop_prefix_list) + return rmap_match_set_hook.match_ip_next_hop_prefix_list (vty, vty->index, "ip next-hop prefix-list", + argv[idx_word]->arg, RMAP_EVENT_PLIST_ADDED); + return CMD_SUCCESS; +} + +DEFUN (no_match_ip_next_hop_prefix_list, + no_match_ip_next_hop_prefix_list_cmd, + "no match ip next-hop prefix-list [WORD]", + NO_STR + MATCH_STR + IP_STR + "Match next-hop address of route\n" + "Match entries of prefix-lists\n" + "IP prefix-list name\n") +{ + int idx_word = 5; + + if (rmap_match_set_hook.no_match_ip_next_hop) + { + if (argc <= idx_word) + return rmap_match_set_hook.no_match_ip_next_hop (vty, vty->index, "ip next-hop prefix-list", + NULL, RMAP_EVENT_PLIST_DELETED); + return rmap_match_set_hook.no_match_ip_next_hop (vty, vty->index, "ip next-hop prefix-list", + argv[idx_word]->arg, RMAP_EVENT_PLIST_DELETED); + } + return CMD_SUCCESS; +} + + +DEFUN (match_ipv6_address, + match_ipv6_address_cmd, + "match ipv6 address WORD", + MATCH_STR + IPV6_STR + "Match IPv6 address of route\n" + "IPv6 access-list name\n") +{ + int idx_word = 3; + if (rmap_match_set_hook.match_ipv6_address) + return rmap_match_set_hook.match_ipv6_address (vty, vty->index, "ipv6 address", argv[idx_word]->arg, + RMAP_EVENT_FILTER_ADDED); + return CMD_SUCCESS; +} + +DEFUN (no_match_ipv6_address, + no_match_ipv6_address_cmd, + "no match ipv6 address WORD", + NO_STR + MATCH_STR + IPV6_STR + "Match IPv6 address of route\n" + "IPv6 access-list name\n") +{ + int idx_word = 4; + if (rmap_match_set_hook.no_match_ipv6_address) + return rmap_match_set_hook.no_match_ipv6_address (vty, vty->index, "ipv6 address", argv[idx_word]->arg, + RMAP_EVENT_FILTER_DELETED); + return CMD_SUCCESS; +} + + +DEFUN (match_ipv6_address_prefix_list, + match_ipv6_address_prefix_list_cmd, + "match ipv6 address prefix-list WORD", + MATCH_STR + IPV6_STR + "Match address of route\n" + "Match entries of prefix-lists\n" + "IP prefix-list name\n") +{ + int idx_word = 4; + if (rmap_match_set_hook.match_ipv6_address_prefix_list) + return rmap_match_set_hook.match_ipv6_address_prefix_list (vty, vty->index, "ipv6 address prefix-list", + argv[idx_word]->arg, RMAP_EVENT_PLIST_ADDED); + return CMD_SUCCESS; +} + +DEFUN (no_match_ipv6_address_prefix_list, + no_match_ipv6_address_prefix_list_cmd, + "no match ipv6 address prefix-list WORD", + NO_STR + MATCH_STR + IPV6_STR + "Match address of route\n" + "Match entries of prefix-lists\n" + "IP prefix-list name\n") +{ + int idx_word = 5; + if (rmap_match_set_hook.no_match_ipv6_address_prefix_list) + return rmap_match_set_hook.no_match_ipv6_address_prefix_list(vty, vty->index, "ipv6 address prefix-list", + argv[idx_word]->arg, RMAP_EVENT_PLIST_DELETED); + return CMD_SUCCESS; +} + + +DEFUN (match_metric, + match_metric_cmd, + "match metric (0-4294967295)", + MATCH_STR + "Match metric of route\n" + "Metric value\n") +{ + int idx_number = 2; + if (rmap_match_set_hook.match_metric) + return rmap_match_set_hook.match_metric(vty, vty->index, "metric", argv[idx_number]->arg, + RMAP_EVENT_MATCH_ADDED); + return CMD_SUCCESS; +} + + +DEFUN (no_match_metric, + no_match_metric_cmd, + "no match metric [(0-4294967295)]", + NO_STR + MATCH_STR + "Match metric of route\n" + "Metric value\n") +{ + int idx_number = 3; + if (rmap_match_set_hook.no_match_metric) + { + if (argc <= idx_number) + return rmap_match_set_hook.no_match_metric (vty, vty->index, "metric", + NULL, RMAP_EVENT_MATCH_DELETED); + return rmap_match_set_hook.no_match_metric(vty, vty->index, "metric", + argv[idx_number]->arg, + RMAP_EVENT_MATCH_DELETED); + } + return CMD_SUCCESS; +} + + +DEFUN (match_tag, + match_tag_cmd, + "match tag (1-65535)", + MATCH_STR + "Match tag of route\n" + "Tag value\n") +{ + int idx_number = 2; + if (rmap_match_set_hook.match_tag) + return rmap_match_set_hook.match_tag(vty, vty->index, "tag", argv[idx_number]->arg, + RMAP_EVENT_MATCH_ADDED); + return CMD_SUCCESS; +} + + +DEFUN (no_match_tag, + no_match_tag_cmd, + "no match tag [(1-65535)]", + NO_STR + MATCH_STR + "Match tag of route\n" + "Tag value\n") +{ + if (rmap_match_set_hook.no_match_tag) + return rmap_match_set_hook.no_match_tag (vty, vty->index, "tag", argv[3]->arg, + RMAP_EVENT_MATCH_DELETED); + return CMD_SUCCESS; +} + + +DEFUN (set_ip_nexthop, + set_ip_nexthop_cmd, + "set ip next-hop A.B.C.D", + SET_STR + IP_STR + "Next hop address\n" + "IP address of next hop\n") +{ + int idx_ipv4 = 3; + union sockunion su; + int ret; + + ret = str2sockunion (argv[idx_ipv4]->arg, &su); + if (ret < 0) + { + vty_out (vty, "%% Malformed nexthop address%s", VTY_NEWLINE); + return CMD_WARNING; + } + if (su.sin.sin_addr.s_addr == 0 || + IPV4_CLASS_DE(su.sin.sin_addr.s_addr)) + { + vty_out (vty, "%% nexthop address cannot be 0.0.0.0, multicast " + "or reserved%s", VTY_NEWLINE); + return CMD_WARNING; + } + + if (rmap_match_set_hook.set_ip_nexthop) + return rmap_match_set_hook.set_ip_nexthop(vty, vty->index, "ip next-hop", argv[idx_ipv4]->arg); + return CMD_SUCCESS; +} + + +DEFUN (no_set_ip_nexthop, + no_set_ip_nexthop_cmd, + "no set ip next-hop []", + NO_STR + SET_STR + "Next hop address\n" + "Use peer address (for BGP only)\n" + "IP address of next hop\n") +{ + int idx_peer = 4; + + if (rmap_match_set_hook.no_set_ip_nexthop) + { + if (argc <= idx_peer) + return rmap_match_set_hook.no_set_ip_nexthop (vty, vty->index, "ip next-hop", NULL); + return rmap_match_set_hook.no_set_ip_nexthop (vty, vty->index, "ip next-hop", argv[idx_peer]->arg); + } + return CMD_SUCCESS; +} + + +DEFUN (set_ipv6_nexthop_local, + set_ipv6_nexthop_local_cmd, + "set ipv6 next-hop local X:X::X:X", + SET_STR + IPV6_STR + "IPv6 next-hop address\n" + "IPv6 local address\n" + "IPv6 address of next hop\n") +{ + int idx_ipv6 = 4; + struct in6_addr addr; + int ret; + + ret = inet_pton (AF_INET6, argv[idx_ipv6]->arg, &addr); + if (!ret) + { + vty_out (vty, "%% Malformed nexthop address%s", VTY_NEWLINE); + return CMD_WARNING; + } + if (!IN6_IS_ADDR_LINKLOCAL(&addr)) + { + vty_out (vty, "%% Invalid link-local nexthop address%s", VTY_NEWLINE); + return CMD_WARNING; + } + + if (rmap_match_set_hook.set_ipv6_nexthop_local) + return rmap_match_set_hook.set_ipv6_nexthop_local (vty, vty->index, "ipv6 next-hop local", argv[idx_ipv6]->arg); + return CMD_SUCCESS; +} + + +DEFUN (no_set_ipv6_nexthop_local, + no_set_ipv6_nexthop_local_cmd, + "no set ipv6 next-hop local [X:X::X:X]", + NO_STR + SET_STR + IPV6_STR + "IPv6 next-hop address\n" + "IPv6 local address\n" + "IPv6 address of next hop\n") +{ + int idx_ipv6 = 5; + if (rmap_match_set_hook.no_set_ipv6_nexthop_local) + { + if (argc <= idx_ipv6) + return rmap_match_set_hook.no_set_ipv6_nexthop_local (vty, vty->index, "ipv6 next-hop local", NULL); + return rmap_match_set_hook.no_set_ipv6_nexthop_local (vty, vty->index, "ipv6 next-hop local", argv[5]->arg); + } + return CMD_SUCCESS; +} + +DEFUN (set_metric, + set_metric_cmd, + "set metric <(0-4294967295)|rtt|+rtt|-rtt|+metric|-metric>", + SET_STR + "Metric value for destination routing protocol\n" + "Metric value\n" + "Assign round trip time\n" + "Add round trip time\n" + "Subtract round trip time\n" + "Add metric\n" + "Subtract metric\n") +{ + int idx_number = 2; + if (rmap_match_set_hook.set_metric) + return rmap_match_set_hook.set_metric (vty, vty->index, "metric", argv[idx_number]->arg); + return CMD_SUCCESS; +} + + +DEFUN (no_set_metric, + no_set_metric_cmd, + "no set metric [(0-4294967295)]", + NO_STR + SET_STR + "Metric value for destination routing protocol\n" + "Metric value\n") +{ + int idx_number = 3; + if (rmap_match_set_hook.no_set_metric) + { + if (argc <= idx_number) + return rmap_match_set_hook.no_set_metric (vty, vty->index, "metric", NULL); + return rmap_match_set_hook.no_set_metric (vty, vty->index, "metric", argv[idx_number]->arg); + } + return CMD_SUCCESS; +} + + +DEFUN (set_tag, + set_tag_cmd, + "set tag (1-65535)", + SET_STR + "Tag value for routing protocol\n" + "Tag value\n") +{ + int idx_number = 2; + if (rmap_match_set_hook.set_tag) + return rmap_match_set_hook.set_tag (vty, vty->index, "tag", argv[idx_number]->arg); + return CMD_SUCCESS; +} + + +DEFUN (no_set_tag, + no_set_tag_cmd, + "no set tag [(1-65535)]", + NO_STR + SET_STR + "Tag value for routing protocol\n" + "Tag value\n") +{ + int idx_number = 3; + if (rmap_match_set_hook.no_set_tag) + { + if (argc <= idx_number) + return rmap_match_set_hook.no_set_tag (vty, vty->index, "tag", NULL); + return rmap_match_set_hook.no_set_tag (vty, vty->index, "tag", argv[idx_number]->arg); + } + return CMD_SUCCESS; +} + + + DEFUN (route_map, route_map_cmd, "route-map WORD (1-65535)", @@ -1823,4 +2919,44 @@ route_map_init_vty (void) /* Install show command */ install_element (ENABLE_NODE, &rmap_show_name_cmd); + + install_element (RMAP_NODE, &match_interface_cmd); + install_element (RMAP_NODE, &no_match_interface_cmd); + + install_element (RMAP_NODE, &match_ip_address_cmd); + install_element (RMAP_NODE, &no_match_ip_address_cmd); + + install_element (RMAP_NODE, &match_ip_address_prefix_list_cmd); + install_element (RMAP_NODE, &no_match_ip_address_prefix_list_cmd); + + install_element (RMAP_NODE, &match_ip_next_hop_cmd); + install_element (RMAP_NODE, &no_match_ip_next_hop_cmd); + + install_element (RMAP_NODE, &match_ip_next_hop_prefix_list_cmd); + install_element (RMAP_NODE, &no_match_ip_next_hop_prefix_list_cmd); + + install_element (RMAP_NODE, &match_ipv6_address_cmd); + install_element (RMAP_NODE, &no_match_ipv6_address_cmd); + + install_element (RMAP_NODE, &match_ipv6_address_prefix_list_cmd); + install_element (RMAP_NODE, &no_match_ipv6_address_prefix_list_cmd); + + install_element (RMAP_NODE, &match_metric_cmd); + install_element (RMAP_NODE, &no_match_metric_cmd); + + install_element (RMAP_NODE, &match_tag_cmd); + install_element (RMAP_NODE, &no_match_tag_cmd); + + install_element (RMAP_NODE, &set_ip_nexthop_cmd); + install_element (RMAP_NODE, &no_set_ip_nexthop_cmd); + + install_element (RMAP_NODE, &set_ipv6_nexthop_local_cmd); + install_element (RMAP_NODE, &no_set_ipv6_nexthop_local_cmd); + + install_element (RMAP_NODE, &set_metric_cmd); + install_element (RMAP_NODE, &no_set_metric_cmd); + + install_element (RMAP_NODE, &set_tag_cmd); + install_element (RMAP_NODE, &no_set_tag_cmd); + } diff --git a/lib/routemap.h b/lib/routemap.h index 7006e43f6..a6d312333 100644 --- a/lib/routemap.h +++ b/lib/routemap.h @@ -228,4 +228,169 @@ extern void route_map_upd8_dependency (route_map_event_t type, const char *arg, extern void route_map_notify_dependencies (const char *affected_name, route_map_event_t event); +extern int generic_match_add (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type); + +extern int generic_match_delete (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type); +extern int generic_set_add (struct vty *vty, struct route_map_index *index, + const char *command, const char *arg); +extern int generic_set_delete (struct vty *vty, struct route_map_index *index, + const char *command, const char *arg); + + +/* match interface */ +extern void route_map_match_interface_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)); +/* no match interface */ +extern void route_map_no_match_interface_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)); +/* match ip address */ +extern void route_map_match_ip_address_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)); +/* no match ip address */ +extern void route_map_no_match_ip_address_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)); +/* match ip address prefix list */ +extern void route_map_match_ip_address_prefix_list_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)); +/* no match ip address prefix list */ +extern void route_map_no_match_ip_address_prefix_list_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)); +/* match ip next hop */ +extern void route_map_match_ip_next_hop_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)); +/* no match ip next hop */ +extern void route_map_no_match_ip_next_hop_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)); +/* match ip next hop prefix list */ +extern void route_map_match_ip_next_hop_prefix_list_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)); +/* no match ip next hop prefix list */ +extern void route_map_no_match_ip_next_hop_prefix_list_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)); +/* match ipv6 address */ +extern void route_map_match_ipv6_address_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)); +/* no match ipv6 address */ +extern void route_map_no_match_ipv6_address_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)); +/* match ipv6 address prefix list */ +extern void route_map_match_ipv6_address_prefix_list_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)); +/* no match ipv6 address prefix list */ +extern void route_map_no_match_ipv6_address_prefix_list_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)); +/* match metric */ +extern void route_map_match_metric_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)); +/* no match metric */ +extern void route_map_no_match_metric_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)); +/* match tag */ +extern void route_map_match_tag_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)); +/* no match tag */ +extern void route_map_no_match_tag_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg, + route_map_event_t type)); +/* set ip nexthop */ +extern void route_map_set_ip_nexthop_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg)); +/* no set ip nexthop */ +extern void route_map_no_set_ip_nexthop_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg)); +/* set ipv6 nexthop local */ +extern void route_map_set_ipv6_nexthop_local_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg)); +/* no set ipv6 nexthop local */ +extern void route_map_no_set_ipv6_nexthop_local_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg)); +/* set metric */ +extern void route_map_set_metric_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg)); +/* no set metric */ +extern void route_map_no_set_metric_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg)); +/* set tag */ +extern void route_map_set_tag_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg)); +/* no set tag */ +extern void route_map_no_set_tag_hook (int (*func) (struct vty *vty, + struct route_map_index *index, + const char *command, + const char *arg)); #endif /* _ZEBRA_ROUTEMAP_H */ diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index 8489d3366..07ddb9cc8 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -1070,7 +1070,6 @@ DEFUN (ospf6_routemap_no_match_interface, return route_map_command_status (vty, ret); } - /* add "set metric-type" */ DEFUN (ospf6_routemap_set_metric_type, ospf6_routemap_set_metric_type_cmd, @@ -1102,41 +1101,6 @@ DEFUN (ospf6_routemap_no_set_metric_type, return route_map_command_status (vty, ret); } -/* add "set metric" */ -DEFUN (set_metric, - set_metric_cmd, - "set metric (0-4294967295)", - "Set value\n" - "Metric value\n" - "Metric value\n") -{ - int idx_number = 2; - int ret = route_map_add_set ((struct route_map_index *) vty->index, - "metric", argv[idx_number]->arg); - return route_map_command_status (vty, ret); -} - -/* delete "set metric" */ -DEFUN (no_set_metric, - no_set_metric_cmd, - "no set metric [(0-4294967295)]", - NO_STR - SET_STR - "Metric value for destination routing protocol\n") -{ - int idx_number = 3; - int ret = 0; - - if (argc == 3) - ret = route_map_delete_set ((struct route_map_index *) vty->index, - "metric", NULL); - else - ret = route_map_delete_set ((struct route_map_index *) vty->index, - "metric", argv[idx_number]->arg); - return route_map_command_status (vty, ret); -} - - /* add "set forwarding-address" */ DEFUN (ospf6_routemap_set_forwarding, ospf6_routemap_set_forwarding_cmd, @@ -1174,6 +1138,9 @@ ospf6_routemap_init (void) route_map_add_hook (ospf6_asbr_routemap_update); route_map_delete_hook (ospf6_asbr_routemap_update); + route_map_set_metric_hook (generic_set_add); + route_map_no_set_metric_hook (generic_set_delete); + route_map_install_match (&ospf6_routemap_rule_match_address_prefixlist_cmd); route_map_install_match (&ospf6_routemap_rule_match_interface_cmd); @@ -1193,10 +1160,6 @@ ospf6_routemap_init (void) install_element (RMAP_NODE, &ospf6_routemap_set_metric_type_cmd); install_element (RMAP_NODE, &ospf6_routemap_no_set_metric_type_cmd); - /* ASE Metric */ - install_element (RMAP_NODE, &set_metric_cmd); - install_element (RMAP_NODE, &no_set_metric_cmd); - /* ASE Metric */ install_element (RMAP_NODE, &ospf6_routemap_set_forwarding_cmd); install_element (RMAP_NODE, &ospf6_routemap_no_set_forwarding_cmd); diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c index ded8041cb..fd87c5a56 100644 --- a/ospf6d/ospf6_zebra.c +++ b/ospf6d/ospf6_zebra.c @@ -318,30 +318,6 @@ DEFUN (show_zebra, return CMD_SUCCESS; } -DEFUN (router_zebra, - router_zebra_cmd, - "router zebra", - "Enable a routing process\n" - "Make connection to zebra daemon\n") -{ - vty->node = ZEBRA_NODE; - zclient->enable = 1; - zclient_start (zclient); - return CMD_SUCCESS; -} - -DEFUN (no_router_zebra, - no_router_zebra_cmd, - "no router zebra", - NO_STR - "Configure routing process\n" - "Disable connection to zebra daemon\n") -{ - zclient->enable = 0; - zclient_stop (zclient); - return CMD_SUCCESS; -} - /* Zebra configuration write function. */ static int config_write_ospf6_zebra (struct vty *vty) @@ -695,9 +671,6 @@ ospf6_zebra_init (struct thread_master *master) /* Install command element for zebra node. */ install_element (VIEW_NODE, &show_zebra_cmd); install_element (ENABLE_NODE, &show_zebra_cmd); - install_element (CONFIG_NODE, &router_zebra_cmd); - install_element (CONFIG_NODE, &no_router_zebra_cmd); - install_default (ZEBRA_NODE); install_element (ZEBRA_NODE, &redistribute_ospf6_cmd); install_element (ZEBRA_NODE, &no_redistribute_ospf6_cmd); diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c index 3e2db84a6..8042c7322 100644 --- a/ospf6d/ospf6d.c +++ b/ospf6d/ospf6d.c @@ -686,7 +686,6 @@ DEFUN (show_ipv6_ospf6_database_type_id_router, u_int32_t id = 0; u_int32_t adv_router = 0; - // dwalton is this needed? OSPF6_CMD_CHECK_RUNNING (); type = parse_type_spec (idx_lsa, argc, argv); diff --git a/ospfd/ospf_routemap.c b/ospfd/ospf_routemap.c index 33ddc67fc..ebe426cee 100644 --- a/ospfd/ospf_routemap.c +++ b/ospfd/ospf_routemap.c @@ -27,6 +27,7 @@ #include "memory.h" #include "prefix.h" #include "table.h" +#include "vty.h" #include "routemap.h" #include "command.h" #include "log.h" @@ -163,53 +164,6 @@ ospf_route_match_add (struct vty *vty, struct route_map_index *index, return CMD_SUCCESS; } -static int -ospf_route_set_add (struct vty *vty, struct route_map_index *index, - const char *command, const char *arg) -{ - int ret; - - ret = route_map_add_set (index, command, arg); - if (ret) - { - switch (ret) - { - case RMAP_RULE_MISSING: - vty_out (vty, "%% OSPF Can't find rule.%s", VTY_NEWLINE); - return CMD_WARNING; - case RMAP_COMPILE_ERROR: - vty_out (vty, "%% OSPF Argument is malformed.%s", VTY_NEWLINE); - return CMD_WARNING; - } - } - - return CMD_SUCCESS; -} - -/* Delete rip route map rule. */ -static int -ospf_route_set_delete (struct vty *vty, struct route_map_index *index, - const char *command, const char *arg) -{ - int ret; - - ret = route_map_delete_set (index, command, arg); - if (ret) - { - switch (ret) - { - case RMAP_RULE_MISSING: - vty_out (vty, "%% OSPF Can't find rule.%s", VTY_NEWLINE); - return CMD_WARNING; - case RMAP_COMPILE_ERROR: - vty_out (vty, "%% OSPF Argument is malformed.%s", VTY_NEWLINE); - return CMD_WARNING; - } - } - - return CMD_SUCCESS; -} - /* `match ip netxthop ' */ /* Match function return 1 if match is success else return zero. */ static route_map_result_t @@ -720,161 +674,6 @@ DEFUN (no_match_ip_nexthop, } -DEFUN (match_ip_next_hop_prefix_list, - match_ip_next_hop_prefix_list_cmd, - "match ip next-hop prefix-list WORD", - MATCH_STR - IP_STR - "Match next-hop address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") -{ - int idx_word = 4; - return ospf_route_match_add (vty, vty->index, "ip next-hop prefix-list", - argv[idx_word]->arg); -} - -DEFUN (no_match_ip_next_hop_prefix_list, - no_match_ip_next_hop_prefix_list_cmd, - "no match ip next-hop prefix-list [WORD]", - NO_STR - MATCH_STR - IP_STR - "Match next-hop address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") -{ - char *pl = (argc == 6) ? argv[5]->arg : NULL; - return ospf_route_match_delete (vty, vty->index, "ip next-hop prefix-list", pl); -} - - -DEFUN (match_ip_address, - match_ip_address_cmd, - "match ip address <(1-199)|(1300-2699)|WORD>", - MATCH_STR - IP_STR - "Match address of route\n" - "IP access-list number\n" - "IP access-list number (expanded range)\n" - "IP access-list name\n") -{ - int idx_acl = 3; - return ospf_route_match_add (vty, vty->index, "ip address", argv[idx_acl]->arg); -} - -DEFUN (no_match_ip_address, - no_match_ip_address_cmd, - "no match ip address [<(1-199)|(1300-2699)|WORD>]", - NO_STR - MATCH_STR - IP_STR - "Match address of route\n" - "IP access-list number\n" - "IP access-list number (expanded range)\n" - "IP access-list name\n") -{ - char *al = (argc == 5) ? argv[4]->arg : NULL; - return ospf_route_match_delete (vty, vty->index, "ip address", al); -} - -DEFUN (match_ip_address_prefix_list, - match_ip_address_prefix_list_cmd, - "match ip address prefix-list WORD", - MATCH_STR - IP_STR - "Match address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") -{ - int idx_word = 4; - return ospf_route_match_add (vty, vty->index, "ip address prefix-list", - argv[idx_word]->arg); -} - -DEFUN (no_match_ip_address_prefix_list, - no_match_ip_address_prefix_list_cmd, - "no match ip address prefix-list [WORD]", - NO_STR - MATCH_STR - IP_STR - "Match address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") -{ - char *pl = (argc == 6) ? argv[5]->arg : NULL; - return ospf_route_match_delete (vty, vty->index, "ip address prefix-list", pl); -} - -DEFUN (match_interface, - match_interface_cmd, - "match interface WORD", - MATCH_STR - "Match first hop interface of route\n" - "Interface name\n") -{ - int idx_word = 2; - return ospf_route_match_add (vty, vty->index, "interface", argv[idx_word]->arg); -} - -DEFUN (no_match_interface, - no_match_interface_cmd, - "no match interface [INTERFACE]", - NO_STR - MATCH_STR - "Match first hop interface of route\n" - "Interface name\n") -{ - char *iface = (argc == 4) ? argv[3]->arg : NULL; - return ospf_route_match_delete (vty, vty->index, "interface", iface); -} - -DEFUN (match_tag, - match_tag_cmd, - "match tag (1-65535)", - MATCH_STR - "Match tag of route\n" - "Tag value\n") -{ - int idx_number = 2; - return ospf_route_match_add (vty, vty->index, "tag", argv[idx_number]->arg); -} - -DEFUN (no_match_tag, - no_match_tag_cmd, - "no match tag [(1-65535)]", - NO_STR - MATCH_STR - "Match tag of route\n" - "Tag value\n") -{ - char *tag = (argc == 4) ? argv[3]->arg : NULL; - return ospf_route_match_delete (vty, vty->index, "tag", tag); -} - -DEFUN (set_metric, - set_metric_cmd, - "set metric (0-4294967295)", - SET_STR - "Metric value for destination routing protocol\n" - "Metric value\n") -{ - int idx_number = 2; - return ospf_route_set_add (vty, vty->index, "metric", argv[idx_number]->arg); -} - -DEFUN (no_set_metric, - no_set_metric_cmd, - "no set metric [(0-4294967295)]", - NO_STR - SET_STR - "Metric value for destination routing protocol\n" - "Metric value\n") -{ - char *mval = (argc == 4) ? argv[3]->arg : NULL; - return ospf_route_set_delete (vty, vty->index, "metric", mval); -} - DEFUN (set_metric_type, set_metric_type_cmd, "set metric-type ", @@ -884,7 +683,7 @@ DEFUN (set_metric_type, "OSPF[6] external type 2 metric\n") { char *ext = argv[2]->text; - return ospf_route_set_add (vty, vty->index, "metric-type", ext); + return generic_set_add (vty, vty->index, "metric-type", ext); } DEFUN (no_set_metric_type, @@ -897,33 +696,9 @@ DEFUN (no_set_metric_type, "OSPF[6] external type 2 metric\n") { char *ext = (argc == 4) ? argv[3]->text : NULL; - return ospf_route_set_delete (vty, vty->index, "metric-type", ext); -} - -DEFUN (set_tag, - set_tag_cmd, - "set tag (1-65535)", - SET_STR - "Tag value for routing protocol\n" - "Tag value\n") -{ - int idx_number = 2; - return ospf_route_set_add (vty, vty->index, "tag", argv[idx_number]->arg); -} - -DEFUN (no_set_tag, - no_set_tag_cmd, - "no set tag [(1-65535)]", - NO_STR - SET_STR - "Tag value for routing protocol\n" - "Tag value\n") -{ - char *tag = (argc == 4) ? argv[3]->arg : NULL; - return ospf_route_set_delete (vty, vty->index, "tag", tag); + return generic_set_delete (vty, vty->index, "metric-type", ext); } - /* Route-map init */ void ospf_route_map_init (void) @@ -934,6 +709,27 @@ ospf_route_map_init (void) route_map_add_hook (ospf_route_map_update); route_map_delete_hook (ospf_route_map_update); route_map_event_hook (ospf_route_map_event); + + route_map_match_interface_hook (generic_match_add); + route_map_no_match_interface_hook (generic_match_delete); + + route_map_match_ip_address_hook (generic_match_add); + route_map_no_match_ip_address_hook (generic_match_delete); + + route_map_match_ip_address_prefix_list_hook (generic_match_add); + route_map_no_match_ip_address_prefix_list_hook (generic_match_delete); + + route_map_match_ip_next_hop_prefix_list_hook (generic_match_add); + route_map_no_match_ip_next_hop_prefix_list_hook (generic_match_delete); + + route_map_match_tag_hook (generic_match_add); + route_map_no_match_tag_hook (generic_match_delete); + + route_map_set_metric_hook (generic_set_add); + route_map_no_set_metric_hook (generic_set_delete); + + route_map_set_tag_hook (generic_set_add); + route_map_no_set_tag_hook (generic_set_delete); route_map_install_match (&route_match_ip_nexthop_cmd); route_map_install_match (&route_match_ip_next_hop_prefix_list_cmd); @@ -948,21 +744,7 @@ ospf_route_map_init (void) install_element (RMAP_NODE, &match_ip_nexthop_cmd); install_element (RMAP_NODE, &no_match_ip_nexthop_cmd); - install_element (RMAP_NODE, &match_ip_next_hop_prefix_list_cmd); - install_element (RMAP_NODE, &no_match_ip_next_hop_prefix_list_cmd); - install_element (RMAP_NODE, &match_ip_address_cmd); - install_element (RMAP_NODE, &no_match_ip_address_cmd); - install_element (RMAP_NODE, &match_ip_address_prefix_list_cmd); - install_element (RMAP_NODE, &no_match_ip_address_prefix_list_cmd); - install_element (RMAP_NODE, &match_interface_cmd); - install_element (RMAP_NODE, &no_match_interface_cmd); - install_element (RMAP_NODE, &match_tag_cmd); - install_element (RMAP_NODE, &no_match_tag_cmd); - - install_element (RMAP_NODE, &set_metric_cmd); - install_element (RMAP_NODE, &no_set_metric_cmd); + install_element (RMAP_NODE, &set_metric_type_cmd); install_element (RMAP_NODE, &no_set_metric_type_cmd); - install_element (RMAP_NODE, &set_tag_cmd); - install_element (RMAP_NODE, &no_set_tag_cmd); } diff --git a/ospfd/ospf_zebra.h b/ospfd/ospf_zebra.h index 7cfae417e..8e93ed269 100644 --- a/ospfd/ospf_zebra.h +++ b/ospfd/ospf_zebra.h @@ -42,8 +42,6 @@ struct ospf_distance }; /* Prototypes */ -extern void ospf_zclient_start (void); - extern void ospf_zebra_add (struct prefix_ipv4 *, struct ospf_route *); extern void ospf_zebra_delete (struct prefix_ipv4 *, struct ospf_route *); diff --git a/pimd/pim_routemap.c b/pimd/pim_routemap.c index adfd4fd2c..3689d23a8 100644 --- a/pimd/pim_routemap.c +++ b/pimd/pim_routemap.c @@ -22,6 +22,7 @@ #include #include "if.h" +#include "vty.h" #include "routemap.h" #include "pimd.h" diff --git a/ripd/rip_routemap.c b/ripd/rip_routemap.c index e1017cfb2..3cdfd8adf 100644 --- a/ripd/rip_routemap.c +++ b/ripd/rip_routemap.c @@ -24,6 +24,7 @@ #include "memory.h" #include "prefix.h" +#include "vty.h" #include "routemap.h" #include "command.h" #include "filter.h" @@ -45,104 +46,6 @@ struct rip_metric_modifier u_char metric; }; -/* Add rip route map rule. */ -static int -rip_route_match_add (struct vty *vty, struct route_map_index *index, - const char *command, const char *arg) -{ - int ret; - - ret = route_map_add_match (index, command, arg); - if (ret) - { - switch (ret) - { - case RMAP_RULE_MISSING: - vty_out (vty, "%% RIP Can't find rule.%s", VTY_NEWLINE); - return CMD_WARNING; - case RMAP_COMPILE_ERROR: - vty_out (vty, "%% RIP Argument is malformed.%s", VTY_NEWLINE); - return CMD_WARNING; - } - } - return CMD_SUCCESS; -} - -/* Delete rip route map rule. */ -static int -rip_route_match_delete (struct vty *vty, struct route_map_index *index, - const char *command, const char *arg) -{ - int ret; - - ret = route_map_delete_match (index, command, arg); - if (ret) - { - switch (ret) - { - case RMAP_RULE_MISSING: - vty_out (vty, "%% RIP Can't find rule.%s", VTY_NEWLINE); - return CMD_WARNING; - case RMAP_COMPILE_ERROR: - vty_out (vty, "%% RIP Argument is malformed.%s", VTY_NEWLINE); - return CMD_WARNING; - } - } - return CMD_SUCCESS; -} - -/* Add rip route map rule. */ -static int -rip_route_set_add (struct vty *vty, struct route_map_index *index, - const char *command, const char *arg) -{ - int ret; - - ret = route_map_add_set (index, command, arg); - if (ret) - { - switch (ret) - { - case RMAP_RULE_MISSING: - vty_out (vty, "%% RIP Can't find rule.%s", VTY_NEWLINE); - return CMD_WARNING; - case RMAP_COMPILE_ERROR: - /* rip, ripng and other protocols share the set metric command - but only values from 0 to 16 are valid for rip and ripng - if metric is out of range for rip and ripng, it is not for - other protocols. Do not return an error */ - if (strcmp(command, "metric")) { - vty_out (vty, "%% RIP Argument is malformed.%s", VTY_NEWLINE); - return CMD_WARNING; - } - } - } - return CMD_SUCCESS; -} - -/* Delete rip route map rule. */ -static int -rip_route_set_delete (struct vty *vty, struct route_map_index *index, - const char *command, const char *arg) -{ - int ret; - - ret = route_map_delete_set (index, command, arg); - if (ret) - { - switch (ret) - { - case RMAP_RULE_MISSING: - vty_out (vty, "%% RIP Can't find rule.%s", VTY_NEWLINE); - return CMD_WARNING; - case RMAP_COMPILE_ERROR: - vty_out (vty, "%% RIP Argument is malformed.%s", VTY_NEWLINE); - return CMD_WARNING; - } - } - return CMD_SUCCESS; -} - /* Hook function for updating route_map assignment. */ /* ARGSUSED */ static void @@ -735,288 +638,6 @@ static struct route_map_rule_cmd route_set_tag_cmd = #define MATCH_STR "Match values from routing table\n" #define SET_STR "Set values in destination routing protocol\n" -DEFUN (match_metric, - match_metric_cmd, - "match metric (0-4294967295)", - MATCH_STR - "Match metric of route\n" - "Metric value\n") -{ - int idx_number = 2; - return rip_route_match_add (vty, vty->index, "metric", argv[idx_number]->arg); -} - -DEFUN (no_match_metric, - no_match_metric_cmd, - "no match metric [(0-4294967295)]", - NO_STR - MATCH_STR - "Match metric of route\n" - "Metric value\n") -{ - char *mval = (argc == 4) ? argv[3]->arg : NULL; - return rip_route_match_delete (vty, vty->index, "metric", mval); -} - - -DEFUN (match_interface, - match_interface_cmd, - "match interface WORD", - MATCH_STR - "Match first hop interface of route\n" - "Interface name\n") -{ - int idx_word = 2; - return rip_route_match_add (vty, vty->index, "interface", argv[idx_word]->arg); -} - -DEFUN (no_match_interface, - no_match_interface_cmd, - "no match interface [INTERFACE]", - NO_STR - MATCH_STR - "Match first hop interface of route\n" - "Interface name\n") -{ - char *iface = (argc == 4) ? argv[3]->arg : NULL; - return rip_route_match_delete (vty, vty->index, "interface", iface); -} - -DEFUN (match_ip_next_hop, - match_ip_next_hop_cmd, - "match ip next-hop <(1-199)|(1300-2699)|WORD>", - MATCH_STR - IP_STR - "Match next-hop address of route\n" - "IP access-list number\n" - "IP access-list number (expanded range)\n" - "IP Access-list name\n") -{ - int idx_acl = 3; - return rip_route_match_add (vty, vty->index, "ip next-hop", argv[idx_acl]->arg); -} - -DEFUN (no_match_ip_next_hop, - no_match_ip_next_hop_cmd, - "no match ip next-hop [<(1-199)|(1300-2699)|WORD>]", - NO_STR - MATCH_STR - IP_STR - "Match next-hop address of route\n" - "IP access-list number\n" - "IP access-list number (expanded range)\n" - "IP Access-list name\n") -{ - char *al = (argc == 5) ? argv[4]->arg : NULL; - return rip_route_match_delete (vty, vty->index, "ip next-hop", al); -} - -DEFUN (match_ip_next_hop_prefix_list, - match_ip_next_hop_prefix_list_cmd, - "match ip next-hop prefix-list WORD", - MATCH_STR - IP_STR - "Match next-hop address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") -{ - int idx_word = 4; - return rip_route_match_add (vty, vty->index, "ip next-hop prefix-list", argv[idx_word]->arg); -} - -DEFUN (no_match_ip_next_hop_prefix_list, - no_match_ip_next_hop_prefix_list_cmd, - "no match ip next-hop prefix-list [WORD]", - NO_STR - MATCH_STR - IP_STR - "Match next-hop address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") -{ - char *plist = (argc == 6) ? argv[5]->arg : NULL; - return rip_route_match_delete (vty, vty->index, "ip next-hop prefix-list", plist); -} - - -DEFUN (match_ip_address, - match_ip_address_cmd, - "match ip address <(1-199)|(1300-2699)|WORD>", - MATCH_STR - IP_STR - "Match address of route\n" - "IP access-list number\n" - "IP access-list number (expanded range)\n" - "IP Access-list name\n") - -{ - int idx_acl = 3; - return rip_route_match_add (vty, vty->index, "ip address", argv[idx_acl]->arg); -} - -DEFUN (no_match_ip_address, - no_match_ip_address_cmd, - "no match ip address [<(1-199)|(1300-2699)|WORD>]", - NO_STR - MATCH_STR - IP_STR - "Match address of route\n" - "IP access-list number\n" - "IP access-list number (expanded range)\n" - "IP Access-list name\n") -{ - char *al = (argc == 5) ? argv[4]->arg : NULL; - return rip_route_match_delete (vty, vty->index, "ip address", al); -} - - -DEFUN (match_ip_address_prefix_list, - match_ip_address_prefix_list_cmd, - "match ip address prefix-list WORD", - MATCH_STR - IP_STR - "Match address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") -{ - int idx_word = 4; - return rip_route_match_add (vty, vty->index, "ip address prefix-list", argv[idx_word]->arg); -} - -DEFUN (no_match_ip_address_prefix_list, - no_match_ip_address_prefix_list_cmd, - "no match ip address prefix-list [WORD]", - NO_STR - MATCH_STR - IP_STR - "Match address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") -{ - char *plist = (argc == 6) ? argv[5]->arg : NULL; - return rip_route_match_delete (vty, vty->index, "ip address prefix-list", plist); -} - - -DEFUN (match_tag, - match_tag_cmd, - "match tag (1-65535)", - MATCH_STR - "Match tag of route\n" - "Metric value\n") -{ - int idx_number = 2; - return rip_route_match_add (vty, vty->index, "tag", argv[idx_number]->arg); -} - -DEFUN (no_match_tag, - no_match_tag_cmd, - "no match tag [(1-65535)]", - NO_STR - MATCH_STR - "Match tag of route\n" - "Metric value\n") -{ - char *mval = (argc == 4) ? argv[3]->arg : NULL; - return rip_route_match_delete (vty, vty->index, "tag", mval); -} - - -/* set functions */ - -DEFUN (set_metric, - set_metric_cmd, - "set metric <(0-4294967295)|+metric|-metric>", - SET_STR - "Metric value for destination routing protocol\n" - "Metric value\n" - "Add metric\n" - "Subtract metric\n") -{ - char *metric = argv[2]->type == WORD_TKN ? argv[2]->text : argv[2]->arg; - return rip_route_set_add (vty, vty->index, "metric", metric); -} - -DEFUN (no_set_metric, - no_set_metric_cmd, - "no set metric <(0-4294967295)|+metric|-metric>", - NO_STR - SET_STR - "Metric value for destination routing protocol\n" - "Metric value\n" - "Add metric\n" - "Subtract metric\n") -{ - char *metric = argv[3]->type == WORD_TKN ? argv[3]->text : argv[3]->arg; - return rip_route_set_delete (vty, vty->index, "metric", metric); -} - -DEFUN (set_ip_nexthop, - set_ip_nexthop_cmd, - "set ip next-hop A.B.C.D", - SET_STR - IP_STR - "Next hop address\n" - "IP address of next hop\n") -{ - int idx_ipv4 = 3; - union sockunion su; - int ret; - - ret = str2sockunion (argv[idx_ipv4]->arg, &su); - if (ret < 0) - { - vty_out (vty, "%% Malformed next-hop address%s", VTY_NEWLINE); - return CMD_WARNING; - } - if (su.sin.sin_addr.s_addr == 0 || - IPV4_CLASS_DE(su.sin.sin_addr.s_addr)) - { - vty_out (vty, "%% nexthop address cannot be 0.0.0.0, multicast " - "or reserved%s", VTY_NEWLINE); - return CMD_WARNING; - } - - return rip_route_set_add (vty, vty->index, "ip next-hop", argv[idx_ipv4]->arg); -} - -DEFUN (no_set_ip_nexthop, - no_set_ip_nexthop_cmd, - "no set ip next-hop [A.B.C.D]", - NO_STR - SET_STR - IP_STR - "Next hop address\n" - "IP address of next hop\n") -{ - char *addr = (argc == 5) ? argv[4]->arg : NULL; - return rip_route_set_delete (vty, vty->index, "ip next-hop", addr); -} - - -DEFUN (set_tag, - set_tag_cmd, - "set tag (1-65535)", - SET_STR - "Tag value for routing protocol\n" - "Tag value\n") -{ - int idx_number = 2; - return rip_route_set_add (vty, vty->index, "tag", argv[idx_number]->arg); -} - -DEFUN (no_set_tag, - no_set_tag_cmd, - "no set tag [(1-65535)]", - NO_STR - SET_STR - "Tag value for routing protocol\n" - "Tag value\n") -{ - char *tag = (argc == 4) ? argv[3]->arg : NULL; - return rip_route_set_delete (vty, vty->index, "tag", tag); -} - void rip_route_map_reset () { @@ -1032,6 +653,36 @@ rip_route_map_init () route_map_add_hook (rip_route_map_update); route_map_delete_hook (rip_route_map_update); + route_map_match_interface_hook (generic_match_add); + route_map_no_match_interface_hook (generic_match_delete); + + route_map_match_ip_address_hook (generic_match_add); + route_map_no_match_ip_address_hook (generic_match_delete); + + route_map_match_ip_address_prefix_list_hook (generic_match_add); + route_map_no_match_ip_address_prefix_list_hook (generic_match_delete); + + route_map_match_ip_next_hop_hook (generic_match_add); + route_map_no_match_ip_next_hop_hook (generic_match_delete); + + route_map_match_ip_next_hop_prefix_list_hook (generic_match_add); + route_map_no_match_ip_next_hop_prefix_list_hook (generic_match_delete); + + route_map_match_metric_hook (generic_match_add); + route_map_no_match_metric_hook (generic_match_delete); + + route_map_match_tag_hook (generic_match_add); + route_map_no_match_tag_hook (generic_match_delete); + + route_map_set_ip_nexthop_hook (generic_set_add); + route_map_no_set_ip_nexthop_hook (generic_set_delete); + + route_map_set_metric_hook (generic_set_add); + route_map_no_set_metric_hook (generic_set_delete); + + route_map_set_tag_hook (generic_set_add); + route_map_no_set_tag_hook (generic_set_delete); + route_map_install_match (&route_match_metric_cmd); route_map_install_match (&route_match_interface_cmd); route_map_install_match (&route_match_ip_next_hop_cmd); @@ -1043,26 +694,4 @@ rip_route_map_init () route_map_install_set (&route_set_metric_cmd); route_map_install_set (&route_set_ip_nexthop_cmd); route_map_install_set (&route_set_tag_cmd); - - install_element (RMAP_NODE, &match_metric_cmd); - install_element (RMAP_NODE, &no_match_metric_cmd); - install_element (RMAP_NODE, &match_interface_cmd); - install_element (RMAP_NODE, &no_match_interface_cmd); - install_element (RMAP_NODE, &match_ip_next_hop_cmd); - install_element (RMAP_NODE, &no_match_ip_next_hop_cmd); - install_element (RMAP_NODE, &match_ip_next_hop_prefix_list_cmd); - install_element (RMAP_NODE, &no_match_ip_next_hop_prefix_list_cmd); - install_element (RMAP_NODE, &match_ip_address_cmd); - install_element (RMAP_NODE, &no_match_ip_address_cmd); - install_element (RMAP_NODE, &match_ip_address_prefix_list_cmd); - install_element (RMAP_NODE, &no_match_ip_address_prefix_list_cmd); - install_element (RMAP_NODE, &match_tag_cmd); - install_element (RMAP_NODE, &no_match_tag_cmd); - - install_element (RMAP_NODE, &set_metric_cmd); - install_element (RMAP_NODE, &no_set_metric_cmd); - install_element (RMAP_NODE, &set_ip_nexthop_cmd); - install_element (RMAP_NODE, &no_set_ip_nexthop_cmd); - install_element (RMAP_NODE, &set_tag_cmd); - install_element (RMAP_NODE, &no_set_tag_cmd); } diff --git a/ripd/rip_zebra.c b/ripd/rip_zebra.c index f4cca7e8a..756a77cff 100644 --- a/ripd/rip_zebra.c +++ b/ripd/rip_zebra.c @@ -251,46 +251,6 @@ static struct { {0, 0, NULL} }; -DEFUN (router_zebra, - router_zebra_cmd, - "router zebra", - "Enable a routing process\n" - "Make connection to zebra daemon\n") -{ - vty->node = ZEBRA_NODE; - zclient->enable = 1; - zclient_start (zclient); - return CMD_SUCCESS; -} - -DEFUN (no_router_zebra, - no_router_zebra_cmd, - "no router zebra", - NO_STR - "Enable a routing process\n" - "Make connection to zebra daemon\n") -{ - zclient->enable = 0; - zclient_stop (zclient); - return CMD_SUCCESS; -} - -#if 0 -static int -rip_redistribute_set (int type) -{ - if (vrf_bitmap_check (zclient->redist[AFI_IP][type], VRF_DEFAULT)) - return CMD_SUCCESS; - - vrf_bitmap_set (zclient->redist[AFI_IP][type], VRF_DEFAULT); - - if (zclient->sock > 0) - zebra_redistribute_send (ZEBRA_REDISTRIBUTE_ADD, zclient, API_IP, type); - - return CMD_SUCCESS; -} -#endif - static int rip_redistribute_unset (int type) { @@ -747,8 +707,6 @@ rip_zclient_init (struct thread_master *master) install_node (&zebra_node, config_write_zebra); /* Install command elements to zebra node. */ - install_element (CONFIG_NODE, &router_zebra_cmd); - install_element (CONFIG_NODE, &no_router_zebra_cmd); install_default (ZEBRA_NODE); install_element (ZEBRA_NODE, &rip_redistribute_rip_cmd); install_element (ZEBRA_NODE, &no_rip_redistribute_rip_cmd); diff --git a/ripd/ripd.h b/ripd/ripd.h index 7c77b26d4..e6b18e3f0 100644 --- a/ripd/ripd.h +++ b/ripd/ripd.h @@ -392,7 +392,6 @@ extern void rip_route_map_init (void); extern void rip_route_map_reset (void); extern void rip_snmp_init (void); extern void rip_zclient_init(struct thread_master *); -extern void rip_zclient_start (void); extern void rip_zclient_reset (void); extern void rip_offset_init (void); extern int if_check_address (struct in_addr addr); diff --git a/ripngd/ripng_routemap.c b/ripngd/ripng_routemap.c index 6ecf08466..9e032e97f 100644 --- a/ripngd/ripng_routemap.c +++ b/ripngd/ripng_routemap.c @@ -24,6 +24,7 @@ #include "if.h" #include "memory.h" #include "prefix.h" +#include "vty.h" #include "routemap.h" #include "command.h" #include "sockunion.h" @@ -42,95 +43,6 @@ struct rip_metric_modifier u_char metric; }; - -static int -ripng_route_match_add (struct vty *vty, struct route_map_index *index, - const char *command, const char *arg) -{ - int ret; - - ret = route_map_add_match (index, command, arg); - if (ret) - { - switch (ret) - { - case RMAP_RULE_MISSING: - vty_out (vty, "RIPng Can't find rule.%s", VTY_NEWLINE); - return CMD_WARNING; - case RMAP_COMPILE_ERROR: - vty_out (vty, "RIPng Argument is malformed.%s", VTY_NEWLINE); - return CMD_WARNING; - } - } - return CMD_SUCCESS; -} - -static int -ripng_route_match_delete (struct vty *vty, struct route_map_index *index, - const char *command, const char *arg) -{ - int ret; - - ret = route_map_delete_match (index, command, arg); - if (ret) - { - switch (ret) - { - case RMAP_RULE_MISSING: - vty_out (vty, "RIPng Can't find rule.%s", VTY_NEWLINE); - return CMD_WARNING; - case RMAP_COMPILE_ERROR: - vty_out (vty, "RIPng Argument is malformed.%s", VTY_NEWLINE); - return CMD_WARNING; - } - } - return CMD_SUCCESS; -} - -static int -ripng_route_set_add (struct vty *vty, struct route_map_index *index, - const char *command, const char *arg) -{ - int ret; - - ret = route_map_add_set (index, command, arg); - if (ret) - { - switch (ret) - { - case RMAP_RULE_MISSING: - vty_out (vty, "RIPng Can't find rule.%s", VTY_NEWLINE); - return CMD_WARNING; - case RMAP_COMPILE_ERROR: - vty_out (vty, "RIPng Argument is malformed.%s", VTY_NEWLINE); - return CMD_WARNING; - } - } - return CMD_SUCCESS; -} - -static int -ripng_route_set_delete (struct vty *vty, struct route_map_index *index, - const char *command, const char *arg) -{ - int ret; - - ret = route_map_delete_set (index, command, arg); - if (ret) - { - switch (ret) - { - case RMAP_RULE_MISSING: - vty_out (vty, "RIPng Can't find rule.%s", VTY_NEWLINE); - return CMD_WARNING; - case RMAP_COMPILE_ERROR: - vty_out (vty, "RIPng Argument is malformed.%s", VTY_NEWLINE); - return CMD_WARNING; - } - } - return CMD_SUCCESS; -} - /* `match metric METRIC' */ /* Match function return 1 if match is success else return zero. */ static route_map_result_t @@ -500,172 +412,6 @@ static struct route_map_rule_cmd route_set_tag_cmd = #define MATCH_STR "Match values from routing table\n" #define SET_STR "Set values in destination routing protocol\n" -DEFUN (match_metric, - match_metric_cmd, - "match metric (0-4294967295)", - MATCH_STR - "Match metric of route\n" - "Metric value\n") -{ - int idx_number = 2; - return ripng_route_match_add (vty, vty->index, "metric", argv[idx_number]->arg); -} - -DEFUN (no_match_metric, - no_match_metric_cmd, - "no match metric [(0-4294967295)]", - NO_STR - MATCH_STR - "Match metric of route\n" - "Metric value\n") -{ - char *mval = (argc == 4) ? argv[3]->arg : NULL; - return ripng_route_match_delete (vty, vty->index, "metric", mval); -} - - -DEFUN (match_interface, - match_interface_cmd, - "match interface WORD", - MATCH_STR - "Match first hop interface of route\n" - "Interface name\n") -{ - int idx_word = 2; - return ripng_route_match_add (vty, vty->index, "interface", argv[idx_word]->arg); -} - -DEFUN (no_match_interface, - no_match_interface_cmd, - "no match interface [INTERFACE]", - NO_STR - MATCH_STR - "Match first hop interface of route\n" - "Interface name\n") -{ - char *iface = (argc == 4) ? argv[3]->arg : NULL; - return ripng_route_match_delete (vty, vty->index, "interface", iface); -} - - -DEFUN (match_tag, - match_tag_cmd, - "match tag (1-65535)", - MATCH_STR - "Match tag of route\n" - "Metric value\n") -{ - int idx_number = 2; - return ripng_route_match_add (vty, vty->index, "tag", argv[idx_number]->arg); -} - -DEFUN (no_match_tag, - no_match_tag_cmd, - "no match tag [(1-65535)]", - NO_STR - MATCH_STR - "Match tag of route\n" - "Metric value\n") -{ - char *mval = (argc == 4) ? argv[3]->arg : NULL; - return ripng_route_match_delete (vty, vty->index, "tag", mval); -} - - -/* set functions */ - -DEFUN (set_metric, - set_metric_cmd, - "set metric (0-4294967295)", - "Set value\n" - "Metric value for destination routing protocol\n" - "Metric value\n") -{ - int idx_number = 2; - return ripng_route_set_add (vty, vty->index, "metric", argv[idx_number]->arg); -} - -DEFUN (no_set_metric, - no_set_metric_cmd, - "no set metric [(0-4294967295)]", - NO_STR - SET_STR - "Metric value for destination routing protocol\n" - "Metric value\n") -{ - char *mval = (argc == 4) ? argv[3]->arg : NULL; - return ripng_route_set_delete (vty, vty->index, "metric", mval); -} - - -DEFUN (set_ipv6_nexthop_local, - set_ipv6_nexthop_local_cmd, - "set ipv6 next-hop local X:X::X:X", - SET_STR - IPV6_STR - "IPv6 next-hop address\n" - "IPv6 local address\n" - "IPv6 address of next hop\n") -{ - int idx_ipv6 = 4; - union sockunion su; - int ret; - - ret = str2sockunion (argv[idx_ipv6]->arg, &su); - if (ret < 0) - { - vty_out (vty, "%% Malformed next-hop local address%s", VTY_NEWLINE); - return CMD_WARNING; - } - - if (!IN6_IS_ADDR_LINKLOCAL(&su.sin6.sin6_addr)) - { - vty_out (vty, "%% Invalid link-local nexthop address%s", VTY_NEWLINE); - return CMD_WARNING; - } - - return ripng_route_set_add (vty, vty->index, "ipv6 next-hop local", argv[idx_ipv6]->arg); -} - -DEFUN (no_set_ipv6_nexthop_local, - no_set_ipv6_nexthop_local_cmd, - "no set ipv6 next-hop local [X:X::X:X]", - NO_STR - SET_STR - IPV6_STR - "IPv6 next-hop address\n" - "IPv6 local address\n" - "IPv6 address of next hop\n") -{ - char *addr = (argc == 6) ? argv[5]->arg : NULL; - return ripng_route_set_delete (vty, vty->index, "ipv6 next-hop local", addr); -} - - -DEFUN (set_tag, - set_tag_cmd, - "set tag (1-65535)", - SET_STR - "Tag value for routing protocol\n" - "Tag value\n") -{ - int idx_number = 2; - return ripng_route_set_add (vty, vty->index, "tag", argv[idx_number]->arg); -} - -DEFUN (no_set_tag, - no_set_tag_cmd, - "no set tag [(1-65535)]", - NO_STR - SET_STR - "Tag value for routing protocol\n" - "Tag value\n") -{ - char *tag = (argc == 4) ? argv[3]->arg : NULL; - return ripng_route_set_delete (vty, vty->index, "tag", tag); -} - - void ripng_route_map_reset () { @@ -679,25 +425,28 @@ ripng_route_map_init () route_map_init (); route_map_init_vty (); + route_map_match_interface_hook (generic_match_add); + route_map_no_match_interface_hook (generic_match_delete); + + route_map_match_metric_hook (generic_match_add); + route_map_no_match_metric_hook (generic_match_delete); + + route_map_match_tag_hook (generic_match_add); + route_map_no_match_tag_hook (generic_match_delete); + + route_map_set_ipv6_nexthop_local_hook (generic_set_add); + route_map_no_set_ipv6_nexthop_local_hook (generic_set_delete); + + route_map_set_metric_hook (generic_set_add); + route_map_no_set_metric_hook (generic_set_delete); + + route_map_set_tag_hook (generic_set_add); + route_map_no_set_tag_hook (generic_set_delete); + route_map_install_match (&route_match_metric_cmd); route_map_install_match (&route_match_interface_cmd); route_map_install_match (&route_match_tag_cmd); - route_map_install_set (&route_set_metric_cmd); route_map_install_set (&route_set_ipv6_nexthop_local_cmd); route_map_install_set (&route_set_tag_cmd); - - install_element (RMAP_NODE, &match_metric_cmd); - install_element (RMAP_NODE, &no_match_metric_cmd); - install_element (RMAP_NODE, &match_interface_cmd); - install_element (RMAP_NODE, &no_match_interface_cmd); - install_element (RMAP_NODE, &match_tag_cmd); - install_element (RMAP_NODE, &no_match_tag_cmd); - - install_element (RMAP_NODE, &set_metric_cmd); - install_element (RMAP_NODE, &no_set_metric_cmd); - install_element (RMAP_NODE, &set_ipv6_nexthop_local_cmd); - install_element (RMAP_NODE, &no_set_ipv6_nexthop_local_cmd); - install_element (RMAP_NODE, &set_tag_cmd); - install_element (RMAP_NODE, &no_set_tag_cmd); } diff --git a/ripngd/ripng_zebra.c b/ripngd/ripng_zebra.c index c8527539f..1190b1873 100644 --- a/ripngd/ripng_zebra.c +++ b/ripngd/ripng_zebra.c @@ -280,30 +280,6 @@ ripng_redistribute_clean () } } -DEFUN (router_zebra, - router_zebra_cmd, - "router zebra", - "Enable a routing process\n" - "Make connection to zebra daemon\n") -{ - vty->node = ZEBRA_NODE; - zclient->enable = 1; - zclient_start (zclient); - return CMD_SUCCESS; -} - -DEFUN (no_router_zebra, - no_router_zebra_cmd, - "no router zebra", - NO_STR - "Disable a routing process\n" - "Stop connection to zebra daemon\n") -{ - zclient->enable = 0; - zclient_stop (zclient); - return CMD_SUCCESS; -} - DEFUN (ripng_redistribute_ripng, ripng_redistribute_ripng_cmd, "redistribute ripng", @@ -556,8 +532,6 @@ zebra_init (struct thread_master *master) install_node (&zebra_node, zebra_config_write); /* Install command element for zebra node. */ - install_element (CONFIG_NODE, &router_zebra_cmd); - install_element (CONFIG_NODE, &no_router_zebra_cmd); install_default (ZEBRA_NODE); install_element (ZEBRA_NODE, &ripng_redistribute_ripng_cmd); install_element (ZEBRA_NODE, &no_ripng_redistribute_ripng_cmd); diff --git a/ripngd/ripngd.h b/ripngd/ripngd.h index 5337eb88f..031ca963d 100644 --- a/ripngd/ripngd.h +++ b/ripngd/ripngd.h @@ -358,7 +358,6 @@ extern void ripng_route_map_reset (void); extern void ripng_terminate (void); /* zclient_init() is done by ripng_zebra.c:zebra_init() */ extern void zebra_init(struct thread_master *); -extern void ripng_zclient_start (void); extern void ripng_zclient_reset (void); extern void ripng_offset_init (void); diff --git a/vtysh/extract.pl.in b/vtysh/extract.pl.in index 5c8e6a4d2..bcebe2cc4 100755 --- a/vtysh/extract.pl.in +++ b/vtysh/extract.pl.in @@ -212,11 +212,6 @@ foreach (@ARGV) { } } -my $bad_cli_stomps = 71; -# Currently we have $bad_cli_stomps. This was determined by -# running this script and counting up the collisions from what -# was returned. -# # When we have cli commands that map to the same function name, we # can introduce subtle bugs due to code not being called when # we think it is. @@ -224,12 +219,9 @@ my $bad_cli_stomps = 71; # If extract.pl fails with a error message and you've been # modifying the cli, then go back and fix your code to # not have cli command function collisions. -# -# If you've removed a cli overwrite, you can safely subtract -# one from $bad_cli_stomps. If you've added to the problem # please fix your code before submittal -if ($cli_stomp != $bad_cli_stomps) { - warn "Expected $bad_cli_stomps command line stomps, but got $cli_stomp instead\n"; +if ($cli_stomp) { + warn "There are $cli_stomp command line stomps\n"; exit $cli_stomp; } diff --git a/zebra/connected.c b/zebra/connected.c index 290973a5c..97eb79d57 100644 --- a/zebra/connected.c +++ b/zebra/connected.c @@ -32,6 +32,7 @@ #include "memory.h" #include "zebra_memory.h" +#include "vty.h" #include "zebra/debug.h" #include "zebra/zserv.h" #include "zebra/redistribute.h" diff --git a/zebra/kernel_null.c b/zebra/kernel_null.c index 17b3c7bc8..0770ab0bb 100644 --- a/zebra/kernel_null.c +++ b/zebra/kernel_null.c @@ -24,6 +24,7 @@ #include #include +#include "vty.h" #include "zebra/zserv.h" #include "zebra/rt.h" #include "zebra/redistribute.h" diff --git a/zebra/redistribute_null.c b/zebra/redistribute_null.c index 85d3bd2f1..4446627dd 100644 --- a/zebra/redistribute_null.c +++ b/zebra/redistribute_null.c @@ -20,6 +20,7 @@ */ #include +#include "vty.h" #include "zebra/rib.h" #include "zebra/zserv.h" diff --git a/zebra/zebra_fpm_netlink.c b/zebra/zebra_fpm_netlink.c index f7d013628..c5a6a4969 100644 --- a/zebra/zebra_fpm_netlink.c +++ b/zebra/zebra_fpm_netlink.c @@ -27,6 +27,7 @@ #include "log.h" #include "rib.h" +#include "vty.h" #include "zserv.h" #include "zebra_ns.h" diff --git a/zebra/zebra_rnh_null.c b/zebra/zebra_rnh_null.c index 3ec8be027..b7809d314 100644 --- a/zebra/zebra_rnh_null.c +++ b/zebra/zebra_rnh_null.c @@ -1,4 +1,5 @@ #include +#include "vty.h" #include "zebra/rib.h" #include "zebra/zserv.h" #include "zebra/zebra_rnh.h" diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c index 6b861d780..fddc4fd7b 100644 --- a/zebra/zebra_routemap.c +++ b/zebra/zebra_routemap.c @@ -25,6 +25,7 @@ #include "zebra_memory.h" #include "prefix.h" #include "rib.h" +#include "vty.h" #include "routemap.h" #include "command.h" #include "filter.h" @@ -56,6 +57,8 @@ struct nh_rmap_obj static void zebra_route_map_set_delay_timer(u_int32_t value); + + /* Add zebra route map rule */ static int zebra_route_match_add(struct vty *vty, struct route_map_index *index, @@ -136,52 +139,6 @@ zebra_route_match_delete (struct vty *vty, struct route_map_index *index, return CMD_SUCCESS; } -/* Add zebra route map rule. */ -static int -zebra_route_set_add (struct vty *vty, struct route_map_index *index, - const char *command, const char *arg) -{ - int ret; - - ret = route_map_add_set (index, command, arg); - if (ret) - { - switch (ret) - { - case RMAP_RULE_MISSING: - vty_out (vty, "%% Zebra Can't find rule.%s", VTY_NEWLINE); - return CMD_WARNING; - case RMAP_COMPILE_ERROR: - vty_out (vty, "%% Zebra Argument is malformed.%s", VTY_NEWLINE); - return CMD_WARNING; - } - } - return CMD_SUCCESS; -} - -/* Delete zebra route map rule. */ -static int -zebra_route_set_delete (struct vty *vty, struct route_map_index *index, - const char *command, const char *arg) -{ - int ret; - - ret = route_map_delete_set (index, command, arg); - if (ret) - { - switch (ret) - { - case RMAP_RULE_MISSING: - vty_out (vty, "%% Zebra Can't find rule.%s", VTY_NEWLINE); - return CMD_WARNING; - case RMAP_COMPILE_ERROR: - vty_out (vty, "%% Zebra Argument is malformed.%s", VTY_NEWLINE); - return CMD_WARNING; - } - } - return CMD_SUCCESS; -} - /* 'match tag TAG' * Match function return 1 if match is success else return 0 */ @@ -294,179 +251,6 @@ struct route_map_rule_cmd route_match_interface_cmd = route_match_interface_free }; -DEFUN (match_interface, - match_interface_cmd, - "match interface WORD", - MATCH_STR - "match first hop interface of route\n" - "Interface name\n") -{ - int idx_word = 2; - return zebra_route_match_add (vty, vty->index, "interface", argv[idx_word]->arg, - RMAP_EVENT_MATCH_ADDED); -} - -DEFUN (no_match_interface, - no_match_interface_cmd, - "no match interface [WORD]", - NO_STR - MATCH_STR - "Match first hop interface of route\n" - "Interface name\n") -{ - char *iface = (argc == 4) ? argv[3]->arg : NULL; - return zebra_route_match_delete (vty, vty->index, "interface", iface, RMAP_EVENT_MATCH_DELETED); -} - - -DEFUN (match_tag, - match_tag_cmd, - "match tag (1-65535)", - MATCH_STR - "Match tag of route\n" - "Tag value\n") -{ - int idx_number = 2; - return zebra_route_match_add (vty, vty->index, "tag", argv[idx_number]->arg, - RMAP_EVENT_MATCH_ADDED); -} - -DEFUN (no_match_tag, - no_match_tag_cmd, - "no match tag [(1-65535)]", - NO_STR - MATCH_STR - "Match tag of route\n") -{ - char *tag = (argc == 4) ? argv[3]->arg : NULL; - return zebra_route_match_delete (vty, vty->index, "tag", tag, RMAP_EVENT_MATCH_DELETED); -} - - -DEFUN (match_ip_next_hop, - match_ip_next_hop_cmd, - "match ip next-hop <(1-199)|(1300-2699)|WORD>", - MATCH_STR - IP_STR - "Match next-hop address of route\n" - "IP access-list number\n" - "IP access-list number (expanded range)\n" - "IP Access-list name\n") -{ - int idx_acl = 3; - return zebra_route_match_add (vty, vty->index, "ip next-hop", argv[idx_acl]->arg, RMAP_EVENT_FILTER_ADDED); -} - -DEFUN (no_match_ip_next_hop, - no_match_ip_next_hop_cmd, - "no match ip next-hop [<(1-199)|(1300-2699)|WORD>]", - NO_STR - MATCH_STR - IP_STR - "Match next-hop address of route\n" - "IP access-list number\n" - "IP access-list number (expanded range)\n" - "IP Access-list name\n") -{ - char *al = (argc == 5) ? argv[4]->arg : NULL; - return zebra_route_match_delete (vty, vty->index, "ip next-hop", al, RMAP_EVENT_FILTER_DELETED); -} - - -DEFUN (match_ip_next_hop_prefix_list, - match_ip_next_hop_prefix_list_cmd, - "match ip next-hop prefix-list WORD", - MATCH_STR - IP_STR - "Match next-hop address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") -{ - int idx_word = 4; - return zebra_route_match_add (vty, vty->index, "ip next-hop prefix-list", - argv[idx_word]->arg, RMAP_EVENT_PLIST_ADDED); -} - -DEFUN (no_match_ip_next_hop_prefix_list, - no_match_ip_next_hop_prefix_list_cmd, - "no match ip next-hop prefix-list [WORD]", - NO_STR - MATCH_STR - IP_STR - "Match next-hop address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") -{ - char *plist = (argc == 6) ? argv[5]->arg : NULL; - return zebra_route_match_delete (vty, vty->index, - "ip next-hop prefix-list", plist, - RMAP_EVENT_PLIST_DELETED); -} - - -DEFUN (match_ip_address, - match_ip_address_cmd, - "match ip address <(1-199)|(1300-2699)|WORD>", - MATCH_STR - IP_STR - "Match address of route\n" - "IP access-list number\n" - "IP access-list number (expanded range)\n" - "IP Access-list name\n") - -{ - int idx_acl = 3; - return zebra_route_match_add (vty, vty->index, "ip address", argv[idx_acl]->arg, - RMAP_EVENT_FILTER_ADDED); -} - -DEFUN (no_match_ip_address, - no_match_ip_address_cmd, - "no match ip address [<(1-199)|(1300-2699)|WORD>]", - NO_STR - MATCH_STR - IP_STR - "Match address of route\n" - "IP access-list number\n" - "IP access-list number (expanded range)\n" - "IP Access-list name\n") -{ - char *al = (argc == 5) ? argv[4]->arg : NULL; - return zebra_route_match_delete (vty, vty->index, "ip address", al, RMAP_EVENT_FILTER_DELETED); -} - - -DEFUN (match_ip_address_prefix_list, - match_ip_address_prefix_list_cmd, - "match ip address prefix-list WORD", - MATCH_STR - IP_STR - "Match address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") -{ - int idx_word = 4; - return zebra_route_match_add (vty, vty->index, "ip address prefix-list", - argv[idx_word]->arg, RMAP_EVENT_PLIST_ADDED); -} - -DEFUN (no_match_ip_address_prefix_list, - no_match_ip_address_prefix_list_cmd, - "no match ip address prefix-list [WORD]", - NO_STR - MATCH_STR - IP_STR - "Match address of route\n" - "Match entries of prefix-lists\n" - "IP prefix-list name\n") -{ - char *plist = (argc == 6) ? argv[5]->arg : NULL; - return zebra_route_match_delete (vty, vty->index, - "ip address prefix-list", plist, - RMAP_EVENT_PLIST_DELETED); -} - - DEFUN (match_ip_address_prefix_len, match_ip_address_prefix_len_cmd, "match ip address prefix-len (0-32)", @@ -615,7 +399,7 @@ DEFUN (set_src, vty_out (vty, "%% not a local address%s", VTY_NEWLINE); return CMD_WARNING; } - return zebra_route_set_add (vty, vty->index, "src", argv[idx_ip]->arg); + return generic_set_add (vty, vty->index, "src", argv[idx_ip]->arg); } DEFUN (no_set_src, @@ -626,7 +410,7 @@ DEFUN (no_set_src, "Source address for route\n") { char *ip = (argc == 4) ? argv[3]->arg : NULL; - return zebra_route_set_delete (vty, vty->index, "src", ip); + return generic_set_delete (vty, vty->index, "src", ip); } DEFUN (zebra_route_map_timer, @@ -1729,6 +1513,24 @@ zebra_route_map_init () route_map_delete_hook (zebra_route_map_delete); route_map_event_hook (zebra_route_map_event); + route_map_match_interface_hook (generic_match_add); + route_map_no_match_interface_hook (generic_match_delete); + + route_map_match_ip_address_hook (generic_match_add); + route_map_no_match_ip_address_hook (generic_match_delete); + + route_map_match_ip_address_prefix_list_hook (generic_match_add); + route_map_no_match_ip_address_prefix_list_hook (generic_match_delete); + + route_map_match_ip_next_hop_hook (generic_match_add); + route_map_no_match_ip_next_hop_hook (generic_match_delete); + + route_map_match_ip_next_hop_prefix_list_hook (generic_match_add); + route_map_no_match_ip_next_hop_prefix_list_hook (generic_match_delete); + + route_map_match_tag_hook (generic_match_add); + route_map_no_match_tag_hook (generic_match_delete); + route_map_install_match (&route_match_tag_cmd); route_map_install_match (&route_match_interface_cmd); route_map_install_match (&route_match_ip_next_hop_cmd); @@ -1741,18 +1543,6 @@ zebra_route_map_init () /* */ route_map_install_set (&route_set_src_cmd); /* */ - install_element (RMAP_NODE, &match_tag_cmd); - install_element (RMAP_NODE, &no_match_tag_cmd); - install_element (RMAP_NODE, &match_interface_cmd); - install_element (RMAP_NODE, &no_match_interface_cmd); - install_element (RMAP_NODE, &match_ip_next_hop_cmd); - install_element (RMAP_NODE, &no_match_ip_next_hop_cmd); - install_element (RMAP_NODE, &match_ip_next_hop_prefix_list_cmd); - install_element (RMAP_NODE, &no_match_ip_next_hop_prefix_list_cmd); - install_element (RMAP_NODE, &match_ip_address_cmd); - install_element (RMAP_NODE, &no_match_ip_address_cmd); - install_element (RMAP_NODE, &match_ip_address_prefix_list_cmd); - install_element (RMAP_NODE, &no_match_ip_address_prefix_list_cmd); install_element (RMAP_NODE, &match_ip_nexthop_prefix_len_cmd); install_element (RMAP_NODE, &no_match_ip_nexthop_prefix_len_cmd); install_element (RMAP_NODE, &match_ip_address_prefix_len_cmd); diff --git a/zebra/zebra_static.c b/zebra/zebra_static.c index 18efe26d9..d05b6e13a 100644 --- a/zebra/zebra_static.c +++ b/zebra/zebra_static.c @@ -25,6 +25,7 @@ #include #include +#include "vty.h" #include "zebra/debug.h" #include "zebra/rib.h" #include "zebra/zserv.h" diff --git a/zebra/zebra_vrf.c b/zebra/zebra_vrf.c index 890d749ca..7625b9676 100644 --- a/zebra/zebra_vrf.c +++ b/zebra/zebra_vrf.c @@ -25,6 +25,7 @@ #include "linklist.h" #include "memory.h" +#include "vty.h" #include "zebra/debug.h" #include "zebra/zserv.h" #include "zebra/rib.h" diff --git a/zebra/zserv.h b/zebra/zserv.h index 3667f5b2b..4487957a0 100644 --- a/zebra/zserv.h +++ b/zebra/zserv.h @@ -25,10 +25,10 @@ #include "rib.h" #include "if.h" #include "workqueue.h" +#include "vrf.h" #include "routemap.h" #include "vty.h" #include "zclient.h" -#include "vrf.h" #include "zebra/zebra_ns.h" /* Default port information. */ diff --git a/zebra/zserv_null.c b/zebra/zserv_null.c index acab22d96..4b52abb22 100644 --- a/zebra/zserv_null.c +++ b/zebra/zserv_null.c @@ -23,6 +23,7 @@ #include #include +#include #include #include -- cgit v1.2.3 From 5e6a74d811ec68b9424a0341716593e37a342ca5 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Thu, 6 Oct 2016 20:23:13 +0000 Subject: all: removed all DEFUN command stomps (fix build errors) Signed-off-by: Daniel Walton --- zebra/if_netlink.c | 1 + zebra/ioctl.c | 1 + zebra/rt_netlink.c | 1 + zebra/rtread_netlink.c | 1 + 4 files changed, 4 insertions(+) (limited to 'zebra') diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c index dffa6568e..09268d351 100644 --- a/zebra/if_netlink.c +++ b/zebra/if_netlink.c @@ -22,6 +22,7 @@ #include +#include "vty.h" #include "zebra/zserv.h" #include "zebra/rt_netlink.h" diff --git a/zebra/ioctl.c b/zebra/ioctl.c index f91ee2438..1835fb310 100644 --- a/zebra/ioctl.c +++ b/zebra/ioctl.c @@ -29,6 +29,7 @@ #include "log.h" #include "privs.h" +#include "vty.h" #include "zebra/rib.h" #include "zebra/rt.h" #include "zebra/interface.h" diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index a6984f7f2..a5f62dfa0 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -40,6 +40,7 @@ #include "privs.h" #include "nexthop.h" #include "vrf.h" +#include "vty.h" #include "zebra/zserv.h" #include "zebra/zebra_ns.h" diff --git a/zebra/rtread_netlink.c b/zebra/rtread_netlink.c index c27e6e97f..1d41861bb 100644 --- a/zebra/rtread_netlink.c +++ b/zebra/rtread_netlink.c @@ -22,6 +22,7 @@ #include +#include "vty.h" #include "zebra/zserv.h" #include "zebra/rt_netlink.h" -- cgit v1.2.3 From 16cedbb01f6d59b28c704278efc72afbfb5abfd2 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Fri, 4 Nov 2016 23:03:03 +0000 Subject: all: Fix underfull doc strings, part 1 Add missing docstrings and separating \n. Also eat some low-hanging refactoring fruit. Signed-off-by: Quentin Young --- bgpd/bgp_route.c | 9 ++- bgpd/bgp_vty.c | 38 +++++++----- isisd/isis_vty.c | 155 +++++++++++++++---------------------------------- isisd/isisd.c | 14 +++++ lib/command.h | 8 --- ospf6d/ospf6_lsa.c | 11 +++- ospf6d/ospf6_route.c | 4 +- ospf6d/ospf6_top.c | 11 +--- ospf6d/ospf6d.c | 4 +- ospfd/ospf_dump.c | 6 +- ospfd/ospf_vty.c | 3 +- vtysh/vtysh.c | 4 +- zebra/debug.c | 81 +++++++------------------- zebra/zebra_routemap.c | 35 +++++++++-- 14 files changed, 168 insertions(+), 215 deletions(-) (limited to 'zebra') diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 351c6ca55..6c71fd525 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -5502,7 +5502,8 @@ DEFUN (no_ipv6_aggregate_address, "no aggregate-address X:X::X:X/M [summary-only]", NO_STR "Configure BGP aggregate entries\n" - "Aggregate prefix\n") + "Aggregate prefix\n" + "Filter more specific routes from updates\n") { int idx = 0; argv_find (argv, argc, "X:X::X:X/M", &idx); @@ -10112,7 +10113,11 @@ DEFUN (bgp_damp_unset, "no bgp dampening [(1-45) [(1-20000) (1-20000) (1-255)]]", NO_STR "BGP Specific commands\n" - "Enable route-flap dampening\n") + "Enable route-flap dampening\n" + "Half-life time for the penalty\n" + "Value to start reusing a route\n" + "Value to start suppressing a route\n" + "Maximum duration to suppress a stable route\n") { struct bgp *bgp; diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index e738d1ec6..715c84aa0 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -2387,7 +2387,9 @@ DEFUN (bgp_listen_range, "BGP specific commands\n" "Configure BGP Dynamic Neighbors\n" "add a listening range for Dynamic Neighbors\n" - LISTEN_RANGE_ADDR_STR) + NEIGHBOR_ADDR_STR + "Member of the peer-group\n" + "Peer-group name\n") { int idx_ipv4_ipv6_prefixlen = 3; int idx_word = 5; @@ -2762,7 +2764,7 @@ DEFUN (neighbor_interface_config, "Interface name or neighbor tag\n" "Enable BGP on interface\n" "Member of the peer-group\n" - "peer-group name\n") + "Peer-group name\n") { int idx_word = 1; int idx_peer_group_word = 4; @@ -2783,7 +2785,7 @@ DEFUN (neighbor_interface_config_v6only, "Enable BGP on interface\n" "Enable BGP with v6 link-local only\n" "Member of the peer-group\n" - "peer-group name\n") + "Peer-group name\n") { int idx_word = 1; int idx_peer_group_word = 5; @@ -2920,7 +2922,8 @@ DEFUN (no_neighbor_interface_config, "Configure BGP on interface\n" "Enable BGP with v6 link-local only\n" "Member of the peer-group\n" - "peer-group name\n" + "Peer-group name\n" + "Specify remote AS\n" AS_STR) { int idx_word = 2; @@ -3155,7 +3158,8 @@ DEFUN (no_neighbor_password, NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 - "Set a password\n") + "Set a password\n" + "The password\n") { int idx_peer = 2; struct peer *peer; @@ -3222,7 +3226,7 @@ DEFUN (neighbor_set_peer_group, NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Member of the peer-group\n" - "peer-group name\n") + "Peer-group name\n") { int idx_peer = 1; int idx_word = 3; @@ -3290,7 +3294,7 @@ DEFUN (no_neighbor_set_peer_group, NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Member of the peer-group\n" - "peer-group name\n") + "Peer-group name\n") { int idx_peer = 2; int idx_word = 4; @@ -3708,7 +3712,7 @@ DEFUN (neighbor_remove_private_as_all_replace_as, NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Remove private ASNs in outbound updates\n" - "Apply to all AS numbers" + "Apply to all AS numbers\n" "Replace private ASNs with our ASN in outbound updates\n") { int idx_peer = 1; @@ -3738,7 +3742,7 @@ DEFUN (no_neighbor_remove_private_as_all, NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Remove private ASNs in outbound updates\n" - "Apply to all AS numbers") + "Apply to all AS numbers\n") { int idx_peer = 2; return peer_af_flag_unset_vty (vty, argv[idx_peer]->arg, bgp_node_afi (vty), @@ -3768,7 +3772,7 @@ DEFUN (no_neighbor_remove_private_as_all_replace_as, NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Remove private ASNs in outbound updates\n" - "Apply to all AS numbers" + "Apply to all AS numbers\n" "Replace private ASNs with our ASN in outbound updates\n") { int idx_peer = 2; @@ -4771,7 +4775,7 @@ DEFUN (no_neighbor_interface, "no neighbor interface WORD", NO_STR NEIGHBOR_STR - NEIGHBOR_ADDR_STR + NEIGHBOR_ADDR_STR2 "Interface\n" "Interface name\n") { @@ -5311,11 +5315,11 @@ DEFUN (neighbor_maximum_prefix_threshold_restart, "neighbor maximum-prefix (1-4294967295) (1-100) restart (1-65535)", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 - "Maximum number of prefix accept from this peer\n" + "Maximum number of prefixes to accept from this peer\n" "maximum no. of prefix limit\n" "Threshold value (%) at which to generate a warning msg\n" "Restart bgp connection after limit is exceeded\n" - "Restart interval in minutes") + "Restart interval in minutes\n") { int idx_peer = 1; int idx_number = 3; @@ -5331,11 +5335,11 @@ DEFUN (no_neighbor_maximum_prefix, NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 - "Maximum number of prefix accept from this peer\n" + "Maximum number of prefixes to accept from this peer\n" "maximum no. of prefix limit\n" "Threshold value (%) at which to generate a warning msg\n" "Restart bgp connection after limit is exceeded\n" - "Restart interval in minutes" + "Restart interval in minutes\n" "Only give warning message when limit is exceeded\n") { int idx_peer = 2; @@ -5409,6 +5413,7 @@ DEFUN (neighbor_ttl_security, "neighbor ttl-security hops (1-254)", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "BGP ttl-security parameters\n" "Specify the maximum number of hops to the BGP peer\n") { int idx_peer = 1; @@ -5441,6 +5446,7 @@ DEFUN (no_neighbor_ttl_security, NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "BGP ttl-security parameters\n" "Specify the maximum number of hops to the BGP peer\n") { int idx_peer = 2; @@ -5885,6 +5891,7 @@ DEFUN (clear_bgp_ipv6_safi_prefix, BGP_STR "Address Family\n" "Address Family Modifier\n" + "Address Family Modifier\n" "Clear bestpath and re-advertise\n" "IPv6 prefix\n") { @@ -5904,6 +5911,7 @@ DEFUN (clear_bgp_instance_ipv6_safi_prefix, BGP_INSTANCE_HELP_STR "Address Family\n" "Address Family Modifier\n" + "Address Family Modifier\n" "Clear bestpath and re-advertise\n" "IPv6 prefix\n") { diff --git a/isisd/isis_vty.c b/isisd/isis_vty.c index 492572bdd..df13696b2 100644 --- a/isisd/isis_vty.c +++ b/isisd/isis_vty.c @@ -1394,6 +1394,7 @@ DEFUN (set_attached_bit, DEFUN (no_set_attached_bit, no_set_attached_bit_cmd, "no set-attached-bit", + NO_STR "Reset attached bit\n") { VTY_DECLVAR_CONTEXT (isis_area, area); @@ -1807,69 +1808,45 @@ area_max_lsp_lifetime_set(struct vty *vty, int level, DEFUN (max_lsp_lifetime, max_lsp_lifetime_cmd, - "max-lsp-lifetime (350-65535)", - "Maximum LSP lifetime\n" + "max-lsp-lifetime [] (350-65535)", + "Maximum LSP lifetime for Level 1 only\n" + "Maximum LSP lifetime for Level 2 only\n" "LSP lifetime in seconds\n") { - int idx_number = 1; - return area_max_lsp_lifetime_set(vty, IS_LEVEL_1_AND_2, atoi(argv[idx_number]->arg)); -} + int idx = 0; + unsigned int level = IS_LEVEL_1_AND_2; + if (argv_find (argv, argc, "level-1", &idx)) + level = IS_LEVEL_1; + else if (argv_find (argv, argc, "level-2", &idx)) + level = IS_LEVEL_2; -DEFUN (no_max_lsp_lifetime, - no_max_lsp_lifetime_cmd, - "no max-lsp-lifetime [(350-65535)]", - NO_STR - "Maximum LSP lifetime\n" - "LSP lifetime in seconds\n") -{ - return area_max_lsp_lifetime_set(vty, IS_LEVEL_1_AND_2, - DEFAULT_LSP_LIFETIME); -} - + argv_find (argv, argc, "(350-65535)", &idx); + int lifetime = atoi(argv[idx]->arg); -DEFUN (max_lsp_lifetime_l1, - max_lsp_lifetime_l1_cmd, - "max-lsp-lifetime level-1 (350-65535)", - "Maximum LSP lifetime for Level 1 only\n" - "LSP lifetime for Level 1 only in seconds\n") -{ - int idx_number = 2; - return area_max_lsp_lifetime_set(vty, IS_LEVEL_1, atoi(argv[idx_number]->arg)); + return area_max_lsp_lifetime_set(vty, level, lifetime); } -DEFUN (no_max_lsp_lifetime_l1, - no_max_lsp_lifetime_l1_cmd, - "no max-lsp-lifetime level-1 [(350-65535)]", +DEFUN (no_max_lsp_lifetime, + no_max_lsp_lifetime_cmd, + "no max-lsp-lifetime [] [(350-65535)]", NO_STR - "LSP lifetime for Level 1 only in seconds\n") -{ - return area_max_lsp_lifetime_set(vty, IS_LEVEL_1, DEFAULT_LSP_LIFETIME); -} - - -DEFUN (max_lsp_lifetime_l2, - max_lsp_lifetime_l2_cmd, - "max-lsp-lifetime level-2 (350-65535)", + "Maximum LSP lifetime for Level 1 only\n" "Maximum LSP lifetime for Level 2 only\n" - "LSP lifetime for Level 2 only in seconds\n") + "LSP lifetime in seconds\n") { - int idx_number = 2; - return area_max_lsp_lifetime_set(vty, IS_LEVEL_2, atoi(argv[idx_number]->arg)); -} + int idx = 0; + unsigned int level = IS_LEVEL_1_AND_2; + if (argv_find (argv, argc, "level-1", &idx)) + level = IS_LEVEL_1; + else if (argv_find (argv, argc, "level-2", &idx)) + level = IS_LEVEL_2; -DEFUN (no_max_lsp_lifetime_l2, - no_max_lsp_lifetime_l2_cmd, - "no max-lsp-lifetime level-2 [(350-65535)]", - NO_STR - "LSP lifetime for Level 2 only in seconds\n") -{ - return area_max_lsp_lifetime_set(vty, IS_LEVEL_2, DEFAULT_LSP_LIFETIME); + return area_max_lsp_lifetime_set(vty, level, DEFAULT_LSP_LIFETIME); } - static int area_lsp_refresh_interval_set(struct vty *vty, int level, uint16_t interval) { @@ -1910,73 +1887,45 @@ area_lsp_refresh_interval_set(struct vty *vty, int level, uint16_t interval) DEFUN (lsp_refresh_interval, lsp_refresh_interval_cmd, - "lsp-refresh-interval (1-65235)", + "lsp-refresh-interval [] (1-65235)", "LSP refresh interval\n" + "LSP refresh interval for Level 1 only\n" + "LSP refresh interval for Level 2 only\n" "LSP refresh interval in seconds\n") { - int idx_number = 1; - return area_lsp_refresh_interval_set(vty, IS_LEVEL_1_AND_2, atoi(argv[idx_number]->arg)); -} + int idx = 0; + unsigned int level = IS_LEVEL_1_AND_2; + unsigned int interval = 0; + if (argv_find (argv, argc, "level-1", &idx)) + level = IS_LEVEL_1; + else if (argv_find (argv, argc, "level-2", &idx)) + level = IS_LEVEL_2; + + interval = atoi(argv[argc-1]->arg); + return area_lsp_refresh_interval_set(vty, level, interval); +} DEFUN (no_lsp_refresh_interval, no_lsp_refresh_interval_cmd, - "no lsp-refresh-interval [(1-65235)]", + "no lsp-refresh-interval [] [(1-65235)]", NO_STR "LSP refresh interval\n" - "LSP refresh interval in seconds\n") -{ - return area_lsp_refresh_interval_set(vty, IS_LEVEL_1_AND_2, - DEFAULT_MAX_LSP_GEN_INTERVAL); -} - - -DEFUN (lsp_refresh_interval_l1, - lsp_refresh_interval_l1_cmd, - "lsp-refresh-interval level-1 (1-65235)", - "LSP refresh interval for Level 1 only\n" - "LSP refresh interval for Level 1 only in seconds\n") -{ - int idx_number = 2; - return area_lsp_refresh_interval_set(vty, IS_LEVEL_1, atoi(argv[idx_number]->arg)); -} - - -DEFUN (no_lsp_refresh_interval_l1, - no_lsp_refresh_interval_l1_cmd, - "no lsp-refresh-interval level-1 [(1-65235)]", - NO_STR "LSP refresh interval for Level 1 only\n" - "LSP refresh interval for Level 1 only in seconds\n") -{ - return area_lsp_refresh_interval_set(vty, IS_LEVEL_1, - DEFAULT_MAX_LSP_GEN_INTERVAL); -} - - -DEFUN (lsp_refresh_interval_l2, - lsp_refresh_interval_l2_cmd, - "lsp-refresh-interval level-2 (1-65235)", "LSP refresh interval for Level 2 only\n" - "LSP refresh interval for Level 2 only in seconds\n") + "LSP refresh interval in seconds\n") { - int idx_number = 2; - return area_lsp_refresh_interval_set(vty, IS_LEVEL_2, atoi(argv[idx_number]->arg)); -} + int idx = 0; + unsigned int level = IS_LEVEL_1_AND_2; + if (argv_find (argv, argc, "level-1", &idx)) + level = IS_LEVEL_1; + else if (argv_find (argv, argc, "level-2", &idx)) + level = IS_LEVEL_2; -DEFUN (no_lsp_refresh_interval_l2, - no_lsp_refresh_interval_l2_cmd, - "no lsp-refresh-interval level-2 [(1-65235)]", - NO_STR - "LSP refresh interval for Level 2 only\n" - "LSP refresh interval for Level 2 only in seconds\n") -{ - return area_lsp_refresh_interval_set(vty, IS_LEVEL_2, - DEFAULT_MAX_LSP_GEN_INTERVAL); + return area_lsp_refresh_interval_set(vty, level, DEFAULT_MAX_LSP_GEN_INTERVAL); } - static int area_passwd_set(struct vty *vty, int level, int (*type_set)(struct isis_area *area, int level, @@ -2192,17 +2141,9 @@ isis_vty_init (void) install_element (ISIS_NODE, &max_lsp_lifetime_cmd); install_element (ISIS_NODE, &no_max_lsp_lifetime_cmd); - install_element (ISIS_NODE, &max_lsp_lifetime_l1_cmd); - install_element (ISIS_NODE, &no_max_lsp_lifetime_l1_cmd); - install_element (ISIS_NODE, &max_lsp_lifetime_l2_cmd); - install_element (ISIS_NODE, &no_max_lsp_lifetime_l2_cmd); install_element (ISIS_NODE, &lsp_refresh_interval_cmd); install_element (ISIS_NODE, &no_lsp_refresh_interval_cmd); - install_element (ISIS_NODE, &lsp_refresh_interval_l1_cmd); - install_element (ISIS_NODE, &no_lsp_refresh_interval_l1_cmd); - install_element (ISIS_NODE, &lsp_refresh_interval_l2_cmd); - install_element (ISIS_NODE, &no_lsp_refresh_interval_l2_cmd); install_element (ISIS_NODE, &area_passwd_md5_cmd); install_element (ISIS_NODE, &area_passwd_clear_cmd); diff --git a/isisd/isisd.c b/isisd/isisd.c index 143e38001..ff3d9c791 100644 --- a/isisd/isisd.c +++ b/isisd/isisd.c @@ -907,6 +907,7 @@ DEFUN (debug_isis_adj, DEFUN (no_debug_isis_adj, no_debug_isis_adj_cmd, "no debug isis adj-packets", + NO_STR UNDEBUG_STR "IS-IS information\n" "IS-IS Adjacency related packets\n") @@ -933,6 +934,7 @@ DEFUN (debug_isis_csum, DEFUN (no_debug_isis_csum, no_debug_isis_csum_cmd, "no debug isis checksum-errors", + NO_STR UNDEBUG_STR "IS-IS information\n" "IS-IS LSP checksum errors\n") @@ -959,6 +961,7 @@ DEFUN (debug_isis_lupd, DEFUN (no_debug_isis_lupd, no_debug_isis_lupd_cmd, "no debug isis local-updates", + NO_STR UNDEBUG_STR "IS-IS information\n" "IS-IS local update packets\n") @@ -985,6 +988,7 @@ DEFUN (debug_isis_err, DEFUN (no_debug_isis_err, no_debug_isis_err_cmd, "no debug isis protocol-errors", + NO_STR UNDEBUG_STR "IS-IS information\n" "IS-IS LSP protocol errors\n") @@ -1011,6 +1015,7 @@ DEFUN (debug_isis_snp, DEFUN (no_debug_isis_snp, no_debug_isis_snp_cmd, "no debug isis snp-packets", + NO_STR UNDEBUG_STR "IS-IS information\n" "IS-IS CSNP/PSNP packets\n") @@ -1037,6 +1042,7 @@ DEFUN (debug_isis_upd, DEFUN (no_debug_isis_upd, no_debug_isis_upd_cmd, "no debug isis update-packets", + NO_STR UNDEBUG_STR "IS-IS information\n" "IS-IS Update related packets\n") @@ -1063,6 +1069,7 @@ DEFUN (debug_isis_spfevents, DEFUN (no_debug_isis_spfevents, no_debug_isis_spfevents_cmd, "no debug isis spf-events", + NO_STR UNDEBUG_STR "IS-IS information\n" "IS-IS Shortest Path First Events\n") @@ -1089,6 +1096,7 @@ DEFUN (debug_isis_spfstats, DEFUN (no_debug_isis_spfstats, no_debug_isis_spfstats_cmd, "no debug isis spf-statistics", + NO_STR UNDEBUG_STR "IS-IS information\n" "IS-IS SPF Timing and Statistic Data\n") @@ -1115,6 +1123,7 @@ DEFUN (debug_isis_spftrigg, DEFUN (no_debug_isis_spftrigg, no_debug_isis_spftrigg_cmd, "no debug isis spf-triggers", + NO_STR UNDEBUG_STR "IS-IS information\n" "IS-IS SPF triggering events\n") @@ -1141,6 +1150,7 @@ DEFUN (debug_isis_rtevents, DEFUN (no_debug_isis_rtevents, no_debug_isis_rtevents_cmd, "no debug isis route-events", + NO_STR UNDEBUG_STR "IS-IS information\n" "IS-IS Route related events\n") @@ -1167,6 +1177,7 @@ DEFUN (debug_isis_events, DEFUN (no_debug_isis_events, no_debug_isis_events_cmd, "no debug isis events", + NO_STR UNDEBUG_STR "IS-IS information\n" "IS-IS Events\n") @@ -1193,6 +1204,7 @@ DEFUN (debug_isis_packet_dump, DEFUN (no_debug_isis_packet_dump, no_debug_isis_packet_dump_cmd, "no debug isis packet-dump", + NO_STR UNDEBUG_STR "IS-IS information\n" "IS-IS packet dump\n") @@ -1219,6 +1231,7 @@ DEFUN (debug_isis_lsp_gen, DEFUN (no_debug_isis_lsp_gen, no_debug_isis_lsp_gen_cmd, "no debug isis lsp-gen", + NO_STR UNDEBUG_STR "IS-IS information\n" "IS-IS generation of own LSPs\n") @@ -1245,6 +1258,7 @@ DEFUN (debug_isis_lsp_sched, DEFUN (no_debug_isis_lsp_sched, no_debug_isis_lsp_sched_cmd, "no debug isis lsp-sched", + NO_STR UNDEBUG_STR "IS-IS information\n" "IS-IS scheduling of LSP generation\n") diff --git a/lib/command.h b/lib/command.h index bdf30b6f3..7b1f7d9fb 100644 --- a/lib/command.h +++ b/lib/command.h @@ -363,7 +363,6 @@ struct cmd_element #define IFNAME_STR "Interface name(e.g. ep0)\n" #define IP6_STR "IPv6 Information\n" #define OSPF6_STR "Open Shortest Path First (OSPF) for IPv6\n" -#define OSPF6_ROUTER_STR "Enable a routing process\n" #define OSPF6_INSTANCE_STR "(1-65535) Instance ID\n" #define SECONDS_STR "(1-65535) Seconds\n" #define ROUTE_STR "Routing Table\n" @@ -393,13 +392,6 @@ struct cmd_element #define NEIGHBOR_ADDR_STR2 "Neighbor address\nNeighbor tag\n" #endif /* HAVE_IPV6 */ -/* Dynamic neighbor (listen range) configuration */ -#ifdef HAVE_IPV6 -#define LISTEN_RANGE_ADDR_STR "Neighbor address\nNeighbor IPv6 address\n" -#else -#define LISTEN_RANGE_ADDR_STR "Neighbor address\n" -#endif /* HAVE_IPV6 */ - /* Prototypes. */ extern void install_node (struct cmd_node *, int (*) (struct vty *)); extern void install_default (enum node_type); diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index 87e50bcf8..ef56028a3 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -866,8 +866,15 @@ DEFUN (no_debug_ospf6_lsa_type, DEBUG_STR OSPF6_STR "Debug Link State Advertisements (LSAs)\n" - "Specify LS type as Hexadecimal\n" - ) + "Display Router LSAs\n" + "Display Network LSAs\n" + "Display Inter-Area-Prefix LSAs\n" + "Display As-External LSAs\n" + "Display Link LSAs\n" + "Display Intra-Area-Prefix LSAs\n" + "Display details of LSAs\n" + "Dump LSAs\n" + "Display LSA's internal information\n") { int idx_lsa = 4; int idx_type = 5; diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c index 3263f4a06..2f416e268 100644 --- a/ospf6d/ospf6_route.c +++ b/ospf6d/ospf6_route.c @@ -1567,8 +1567,8 @@ DEFUN (debug_ospf6_route, "debug ospf6 route ", DEBUG_STR OSPF6_STR + "Debug routes\n" "Debug route table calculation\n" - "Debug detail\n" "Debug intra-area route calculation\n" "Debug inter-area route calculation\n" "Debug route memory use\n" @@ -1595,8 +1595,10 @@ DEFUN (no_debug_ospf6_route, NO_STR DEBUG_STR OSPF6_STR + "Debug routes\n" "Debug route table calculation\n" "Debug intra-area route calculation\n" + "Debug inter-area route calculation\n" "Debug route memory use\n") { int idx_type = 4; diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index 5471e5862..32ec2731d 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -305,16 +305,9 @@ DEFUN (no_router_ospf6, no_router_ospf6_cmd, "no router ospf6", NO_STR - OSPF6_ROUTER_STR) + ROUTER_STR + OSPF6_STR) { - if (ospf6 == NULL) - vty_out (vty, "OSPFv3 is not configured%s", VNL); - else - { - ospf6_delete (ospf6); - ospf6 = NULL; - } - /* return to config node . */ vty->node = CONFIG_NODE; vty->index = NULL; diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c index 349dae5c7..c3b4005d1 100644 --- a/ospf6d/ospf6d.c +++ b/ospf6d/ospf6d.c @@ -815,6 +815,7 @@ DEFUN (show_ipv6_ospf6_database_self_originated, SHOW_STR IPV6_STR OSPF6_STR + "Display Link state database\n" "Display Self-originated LSAs\n" "Display details of LSAs\n" "Dump LSAs\n" @@ -1092,7 +1093,8 @@ DEFUN (show_ipv6_ospf6_border_routers, IP6_STR OSPF6_STR "Display routing table for ABR and ASBR\n" - ) + "Router ID\n" + "Show detailed output\n") { int idx_ipv4 = 4; u_int32_t adv_router; diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c index 0b3267a23..93baac598 100644 --- a/ospfd/ospf_dump.c +++ b/ospfd/ospf_dump.c @@ -969,6 +969,7 @@ DEFUN (debug_ospf_ism, DEFUN (no_debug_ospf_ism, no_debug_ospf_ism_cmd, "no debug ospf [(1-65535)] ism []", + NO_STR DEBUG_STR OSPF_STR "Instance ID\n" @@ -1093,6 +1094,7 @@ DEFUN (debug_ospf_instance_nsm, static int no_debug_ospf_nsm_common (struct vty *vty, int arg_base, int argc, struct cmd_token **argv) { + /* XXX qlyoung */ if (vty->node == CONFIG_NODE) { if (argc == arg_base + 0) @@ -1132,7 +1134,7 @@ DEFUN (no_debug_ospf_nsm, NO_STR DEBUG_STR OSPF_STR - "OSPF Neighbor State Machine" + "OSPF Neighbor State Machine\n" "NSM Status Information\n" "NSM Event Information\n" "NSM Timer Information\n") @@ -1148,7 +1150,7 @@ DEFUN (no_debug_ospf_instance_nsm, DEBUG_STR OSPF_STR "Instance ID\n" - "OSPF Neighbor State Machine" + "OSPF Neighbor State Machine\n" "NSM Status Information\n" "NSM Event Information\n" "NSM Timer Information\n") diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index f5f07944c..a92073066 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -5799,7 +5799,8 @@ DEFUN (show_ip_ospf_database_type_adv_router, "Database summary\n" OSPF_LSA_TYPES_DESC "Advertising Router link states\n" - "Advertising Router (as an IP address)\n") + "Advertising Router (as an IP address)\n" + "Self-originated link states\n") { struct ospf *ospf; diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 708eb85b1..e4c3ce76f 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -1294,7 +1294,7 @@ DEFUNSH (VTYSH_OSPF6D, router_ospf6, router_ospf6_cmd, "router ospf6", - OSPF6_ROUTER_STR + ROUTER_STR OSPF6_STR) { vty->node = OSPF6_NODE; @@ -2304,7 +2304,7 @@ DEFUN (vtysh_write_terminal, "For the ripng daemon\n" "For the ospf daemon\n" "For the ospfv6 daemon\n" - "For the ldpd daemon" + "For the ldpd daemon\n" "For the bgp daemon\n" "For the isis daemon\n" "For the pim daemon\n") diff --git a/zebra/debug.c b/zebra/debug.c index 65ae3fd17..2e9fef292 100644 --- a/zebra/debug.c +++ b/zebra/debug.c @@ -124,54 +124,31 @@ DEFUN (debug_zebra_mpls, DEFUN (debug_zebra_packet, debug_zebra_packet_cmd, - "debug zebra packet", - DEBUG_STR - "Zebra configuration\n" - "Debug option set for zebra packet\n") -{ - zebra_debug_packet = ZEBRA_DEBUG_PACKET; - SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND); - SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV); - return CMD_SUCCESS; -} - -DEFUN (debug_zebra_packet_direct, - debug_zebra_packet_direct_cmd, - "debug zebra packet ", + "debug zebra packet [] [detail]", DEBUG_STR "Zebra configuration\n" "Debug option set for zebra packet\n" "Debug option set for receive packet\n" - "Debug option set for send packet\n") + "Debug option set for send packet\n" + "Debug option set for detailed info\n") { - int idx_recv_send = 3; + int idx = 0; zebra_debug_packet = ZEBRA_DEBUG_PACKET; - if (strncmp ("send", argv[idx_recv_send]->arg, strlen (argv[idx_recv_send]->arg)) == 0) + + if (argv_find (argv, argc, "send", &idx)) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND); - if (strncmp ("recv", argv[idx_recv_send]->arg, strlen (argv[idx_recv_send]->arg)) == 0) + idx = 0; + if (argv_find (argv, argc, "recv", &idx)) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV); - if (strncmp ("detail", argv[idx_recv_send]->arg, strlen (argv[idx_recv_send]->arg)) == 0) + idx = 0; + if (argv_find (argv, argc, "detail", &idx)) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_DETAIL); - return CMD_SUCCESS; -} -DEFUN (debug_zebra_packet_detail, - debug_zebra_packet_detail_cmd, - "debug zebra packet detail", - DEBUG_STR - "Zebra configuration\n" - "Debug option set for zebra packet\n" - "Debug option set for receive packet\n" - "Debug option set for send packet\n" - "Debug option set detailed information\n") -{ - int idx_recv_send = 3; - zebra_debug_packet = ZEBRA_DEBUG_PACKET; - if (strncmp ("send", argv[idx_recv_send]->arg, strlen (argv[idx_recv_send]->arg)) == 0) + if (!(zebra_debug_packet & ZEBRA_DEBUG_SEND & ZEBRA_DEBUG_RECV)) + { SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND); - if (strncmp ("recv", argv[idx_recv_send]->arg, strlen (argv[idx_recv_send]->arg)) == 0) SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV); - SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_DETAIL); + } return CMD_SUCCESS; } @@ -276,19 +253,7 @@ DEFUN (no_debug_zebra_mpls, DEFUN (no_debug_zebra_packet, no_debug_zebra_packet_cmd, - "no debug zebra packet", - NO_STR - DEBUG_STR - "Zebra configuration\n" - "Debug option set for zebra packet\n") -{ - zebra_debug_packet = 0; - return CMD_SUCCESS; -} - -DEFUN (no_debug_zebra_packet_direct, - no_debug_zebra_packet_direct_cmd, - "no debug zebra packet ", + "no debug zebra packet []", NO_STR DEBUG_STR "Zebra configuration\n" @@ -296,10 +261,10 @@ DEFUN (no_debug_zebra_packet_direct, "Debug option set for receive packet\n" "Debug option set for send packet\n") { - int idx_recv_send = 4; - if (strncmp ("send", argv[idx_recv_send]->arg, strlen (argv[idx_recv_send]->arg)) == 0) + int idx = 0; + if (argc == 4 || argv_find (argv, argc, "send", &idx)) UNSET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND); - if (strncmp ("recv", argv[idx_recv_send]->arg, strlen (argv[idx_recv_send]->arg)) == 0) + if (argc == 4 || argv_find (argv, argc, "recv", &idx)) UNSET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV); return CMD_SUCCESS; } @@ -319,6 +284,7 @@ DEFUN (no_debug_zebra_kernel, DEFUN (no_debug_zebra_kernel_msgdump, no_debug_zebra_kernel_msgdump_cmd, "no debug zebra kernel msgdump []", + NO_STR DEBUG_STR "Zebra configuration\n" "Debug option set for zebra between kernel interface\n" @@ -326,11 +292,12 @@ DEFUN (no_debug_zebra_kernel_msgdump, "Dump raw netlink messages received\n" "Dump raw netlink messages sent\n") { - int idx_recv_send = 5; - if (!argv[1] || (argv[idx_recv_send]->arg && strncmp(argv[idx_recv_send]->arg, "recv", strlen(argv[idx_recv_send]->arg)) == 0)) + int idx = 0; + if (argc == 5 || argv_find (argv, argc, "recv", &idx)) UNSET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV); - if (!argv[idx_recv_send]->arg || (argv[idx_recv_send]->arg && strncmp(argv[idx_recv_send]->arg, "send", strlen(argv[idx_recv_send]->arg)) == 0)) + if (argc == 5 || argv_find (argv, argc, "send", &idx)) UNSET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND); + return CMD_SUCCESS; } @@ -458,8 +425,6 @@ zebra_debug_init (void) install_element (ENABLE_NODE, &debug_zebra_nht_cmd); install_element (ENABLE_NODE, &debug_zebra_mpls_cmd); install_element (ENABLE_NODE, &debug_zebra_packet_cmd); - install_element (ENABLE_NODE, &debug_zebra_packet_direct_cmd); - install_element (ENABLE_NODE, &debug_zebra_packet_detail_cmd); install_element (ENABLE_NODE, &debug_zebra_kernel_cmd); install_element (ENABLE_NODE, &debug_zebra_kernel_msgdump_cmd); install_element (ENABLE_NODE, &debug_zebra_rib_cmd); @@ -479,8 +444,6 @@ zebra_debug_init (void) install_element (CONFIG_NODE, &debug_zebra_nht_cmd); install_element (CONFIG_NODE, &debug_zebra_mpls_cmd); install_element (CONFIG_NODE, &debug_zebra_packet_cmd); - install_element (CONFIG_NODE, &debug_zebra_packet_direct_cmd); - install_element (CONFIG_NODE, &debug_zebra_packet_detail_cmd); install_element (CONFIG_NODE, &debug_zebra_kernel_cmd); install_element (CONFIG_NODE, &debug_zebra_kernel_msgdump_cmd); install_element (CONFIG_NODE, &debug_zebra_rib_cmd); diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c index 59725561f..af69a9d0e 100644 --- a/zebra/zebra_routemap.c +++ b/zebra/zebra_routemap.c @@ -240,7 +240,8 @@ DEFUN (no_match_ip_address_prefix_len, NO_STR MATCH_STR IP_STR - "Match prefixlen of ip address of route\n" + "Match prefix length of ip address\n" + "Match prefix length of ip address\n" "Prefix length\n") { char *plen = (argc == 6) ? argv[5]->arg : NULL; @@ -284,7 +285,17 @@ DEFUN (match_source_protocol, match_source_protocol_cmd, "match source-protocol ", MATCH_STR - "Match protocol via which the route was learnt\n") + "Match protocol via which the route was learnt\n" + "BGP protocol\n" + "OSPF protocol\n" + "RIP protocol\n" + "RIPNG protocol\n" + "ISIS protocol\n" + "OSPF6 protocol\n" + "Routes from directly connected peer\n" + "Routes from system configuration\n" + "Routes from kernel\n" + "Statically configured routes\n") { char *proto = argv[2]->text; int i; @@ -304,7 +315,16 @@ DEFUN (no_match_source_protocol, NO_STR MATCH_STR "No match protocol via which the route was learnt\n" - ) + "BGP protocol\n" + "OSPF protocol\n" + "RIP protocol\n" + "RIPNG protocol\n" + "ISIS protocol\n" + "OSPF6 protocol\n" + "Routes from directly connected peer\n" + "Routes from system configuration\n" + "Routes from kernel\n" + "Statically configured routes\n") { char *proto = (argc == 4) ? argv[3]->text : NULL; return zebra_route_match_delete (vty, "source-protocol", proto, RMAP_EVENT_MATCH_DELETED); @@ -317,7 +337,8 @@ DEFUN (set_src, "set src ", SET_STR "src address for route\n" - "src address\n") + "IPv4 src address\n" + "IPv6 src address\n") { int idx_ip = 2; union g_addr src; @@ -389,6 +410,8 @@ DEFUN (no_set_src, DEFUN (zebra_route_map_timer, zebra_route_map_timer_cmd, "zebra route-map delay-timer (0-600)", + "Zebra information\n" + "Set route-map parameters\n" "Time to wait before route-map updates are processed\n" "0 means event-driven updates are disabled\n") { @@ -405,10 +428,10 @@ DEFUN (no_zebra_route_map_timer, no_zebra_route_map_timer_cmd, "no zebra route-map delay-timer [(0-600)]", NO_STR - "Time to wait before route-map updates are processed\n" + "Zebra information\n" + "Set route-map parameters\n" "Reset delay-timer to default value, 30 secs\n" "0 means event-driven updates are disabled\n") - { zebra_route_map_set_delay_timer(ZEBRA_RMAP_DEFAULT_UPDATE_TIMER); -- cgit v1.2.3 From d7fa34c1bc00b5704fefd0dc1cafc1bd314a3ea9 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Tue, 8 Nov 2016 01:46:04 +0000 Subject: all: Fix underfull doc strings, part 2 Add missing docstrings and separating \n. Also eat some low-hanging refactoring fruit. Signed-off-by: Quentin Young --- bgpd/bgp_bfd.c | 3 ++- bgpd/bgp_routemap.c | 14 ++++++++--- bgpd/bgp_vty.c | 66 ++++++++++++++++++++++++++++++-------------------- isisd/isisd.c | 1 + ospf6d/ospf6_area.c | 6 +++-- pimd/pim_cmd.c | 1 + zebra/irdp_interface.c | 2 ++ zebra/zebra_vty.c | 7 ++++-- 8 files changed, 66 insertions(+), 34 deletions(-) (limited to 'zebra') diff --git a/bgpd/bgp_bfd.c b/bgpd/bgp_bfd.c index 684694d0b..670d959fe 100644 --- a/bgpd/bgp_bfd.c +++ b/bgpd/bgp_bfd.c @@ -619,7 +619,8 @@ DEFUN_HIDDEN (neighbor_bfd_type, NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Enables BFD support\n" - "Session type\n") + "Multihop session\n" + "Single hop session\n") { int idx_peer = 1; int idx_hop = 3; diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index 1ddae3cd8..070141514 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -3490,7 +3490,8 @@ DEFUN (no_set_community, "no set community AA:NN...", NO_STR SET_STR - "BGP community attribute\n") + "BGP community attribute\n" + COMMUNITY_VAL_STR) { return generic_set_delete (vty, vty->index, "community", NULL); } @@ -3525,7 +3526,11 @@ DEFUN (no_set_community_delete, "no set comm-list [<(1-99)|(100-500)|WORD> delete]", NO_STR SET_STR - "set BGP community list (for deletion)\n") + "set BGP community list (for deletion)\n" + "Community-list number (standard)\n" + "Community-list number (expanded)\n" + "Community-list name\n" + "Delete matching communities\n") { return generic_set_delete (vty, vty->index, "comm-list", NULL); } @@ -3619,7 +3624,10 @@ DEFUN (no_set_origin, "no set origin []", NO_STR SET_STR - "BGP origin code\n") + "BGP origin code\n" + "remote EGP\n" + "local IGP\n" + "unknown heritage\n") { return generic_set_delete (vty, vty->index, "origin", NULL); } diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index f22216195..f9d845dcd 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -1307,6 +1307,7 @@ DEFUN (bgp_wpkt_quanta, DEFUN (no_bgp_wpkt_quanta, no_bgp_wpkt_quanta_cmd, "no write-quanta (1-10000)", + NO_STR "How many packets to write to peer socket per run\n" "Number of packets\n") { @@ -2380,26 +2381,29 @@ DEFUN (bgp_listen_range, bgp_listen_range_cmd, "bgp listen range peer-group WORD", "BGP specific commands\n" - "Configure BGP Dynamic Neighbors\n" - "add a listening range for Dynamic Neighbors\n" + "Configure BGP dynamic neighbors listen range\n" + "Configure BGP dynamic neighbors listen range\n" NEIGHBOR_ADDR_STR "Member of the peer-group\n" "Peer-group name\n") { - int idx_ipv4_ipv6_prefixlen = 3; - int idx_word = 5; struct bgp *bgp; struct prefix range; struct peer_group *group, *existing_group; afi_t afi; int ret; + int idx = 0; - bgp = vty->index; + argv_find (argv, argc, "A.B.C.D/M", &idx); + argv_find (argv, argc, "X:X::X:X/M", &idx); + char *prefix = argv[idx]->arg; + argv_find (argv, argc, "WORD", &idx); + char *peergroup = argv[idx]->arg; - //VTY_GET_IPV4_PREFIX ("listen range", range, argv[idx_ipv4_ipv6_prefixlen]->arg); + bgp = vty->index; /* Convert IP prefix string to struct prefix. */ - ret = str2prefix (argv[idx_ipv4_ipv6_prefixlen]->arg, &range); + ret = str2prefix (prefix, &range); if (! ret) { vty_out (vty, "%% Malformed listen range%s", VTY_NEWLINE); @@ -2408,14 +2412,12 @@ DEFUN (bgp_listen_range, afi = family2afi(range.family); -#ifdef HAVE_IPV6 if (afi == AFI_IP6 && IN6_IS_ADDR_LINKLOCAL (&range.u.prefix6)) { vty_out (vty, "%% Malformed listen range (link-local address)%s", VTY_NEWLINE); return CMD_WARNING; } -#endif /* HAVE_IPV6 */ apply_mask (&range); @@ -2423,7 +2425,7 @@ DEFUN (bgp_listen_range, existing_group = listen_range_exists (bgp, &range, 1); if (existing_group) { - if (strcmp (existing_group->name, argv[idx_word]->arg) == 0) + if (strcmp (existing_group->name, peergroup) == 0) return CMD_SUCCESS; else { @@ -2441,7 +2443,7 @@ DEFUN (bgp_listen_range, return CMD_WARNING; } - group = peer_group_lookup (bgp, argv[idx_word]->arg); + group = peer_group_lookup (bgp, peergroup); if (! group) { vty_out (vty, "%% Configure the peer-group first%s", VTY_NEWLINE); @@ -2454,26 +2456,34 @@ DEFUN (bgp_listen_range, DEFUN (no_bgp_listen_range, no_bgp_listen_range_cmd, - "no bgp listen range A.B.C.D/M peer-group WORD", + "no bgp listen range peer-group WORD", + NO_STR "BGP specific commands\n" - "Configure BGP defaults\n" - "delete a listening range for Dynamic Neighbors\n" - "Remove Dynamic Neighbors listening range\n") + "Unconfigure BGP dynamic neighbors listen range\n" + "Unconfigure BGP dynamic neighbors listen range\n" + NEIGHBOR_ADDR_STR + "Member of the peer-group\n" + "Peer-group name\n") { - int idx_ipv4_prefixlen = 4; - int idx_word = 6; struct bgp *bgp; struct prefix range; struct peer_group *group; afi_t afi; int ret; + int idx = 0; + + argv_find (argv, argc, "A.B.C.D/M", &idx); + argv_find (argv, argc, "X:X::X:X/M", &idx); + char *prefix = argv[idx]->arg; + argv_find (argv, argc, "WORD", &idx); + char *peergroup = argv[idx]->arg; bgp = vty->index; // VTY_GET_IPV4_PREFIX ("listen range", range, argv[idx_ipv4_prefixlen]->arg); /* Convert IP prefix string to struct prefix. */ - ret = str2prefix (argv[idx_ipv4_prefixlen]->arg, &range); + ret = str2prefix (prefix, &range); if (! ret) { vty_out (vty, "%% Malformed listen range%s", VTY_NEWLINE); @@ -2482,19 +2492,16 @@ DEFUN (no_bgp_listen_range, afi = family2afi(range.family); -#ifdef HAVE_IPV6 if (afi == AFI_IP6 && IN6_IS_ADDR_LINKLOCAL (&range.u.prefix6)) { vty_out (vty, "%% Malformed listen range (link-local address)%s", VTY_NEWLINE); return CMD_WARNING; } -#endif /* HAVE_IPV6 */ apply_mask (&range); - - group = peer_group_lookup (bgp, argv[idx_word]->arg); + group = peer_group_lookup (bgp, peergroup); if (! group) { vty_out (vty, "%% Peer-group does not exist%s", VTY_NEWLINE); @@ -2643,7 +2650,9 @@ DEFUN (neighbor_remote_as, NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Specify a BGP neighbor\n" - AS_STR) + AS_STR + "External BGP peer\n" + "Internal BGP peer\n") { int idx_peer = 1; int idx_remote_as = 3; @@ -2800,7 +2809,9 @@ DEFUN (neighbor_interface_config_remote_as, NEIGHBOR_STR "Interface name or neighbor tag\n" "Enable BGP on interface\n" - AS_STR) + AS_STR + "External BGP peer\n" + "Internal BGP peer\n") { int idx_word = 1; int idx_remote_as = 4; @@ -2814,7 +2825,9 @@ DEFUN (neighbor_interface_v6only_config_remote_as, NEIGHBOR_STR "Interface name or neighbor tag\n" "Enable BGP on interface\n" - AS_STR) + AS_STR + "External BGP peer\n" + "Internal BGP peer\n") { int idx_word = 1; int idx_remote_as = 5; @@ -5409,7 +5422,8 @@ DEFUN (neighbor_ttl_security, NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "BGP ttl-security parameters\n" - "Specify the maximum number of hops to the BGP peer\n") + "Specify the maximum number of hops to the BGP peer\n" + "Number of hops to BGP peer\n") { int idx_peer = 1; int idx_number = 4; diff --git a/isisd/isisd.c b/isisd/isisd.c index ff3d9c791..c3bc33eb2 100644 --- a/isisd/isisd.c +++ b/isisd/isisd.c @@ -1906,6 +1906,7 @@ DEFUN (log_adj_changes, DEFUN (no_log_adj_changes, no_log_adj_changes_cmd, "no log-adjacency-changes", + NO_STR "Stop logging changes in adjacency state\n") { VTY_DECLVAR_CONTEXT (isis_area, area); diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c index de395e8b5..9ba728765 100644 --- a/ospf6d/ospf6_area.c +++ b/ospf6d/ospf6_area.c @@ -898,9 +898,11 @@ DEFUN (show_ipv6_ospf6_simulate_spf_tree_root, SHOW_STR IP6_STR OSPF6_STR - "Shortest Path First caculation\n" + "Shortest Path First calculation\n" "Show SPF tree\n" - "Specify root's router-id to calculate another router's SPF tree\n") + "Specify root's router-id to calculate another router's SPF tree\n" + "OSPF6 area parameters\n" + OSPF6_AREA_ID_STR) { int idx_ipv4 = 5; int idx_ipv4_2 = 7; diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index 318bd1ba1..afc42a956 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -3189,6 +3189,7 @@ DEFUN (interface_ip_pim_drprio, DEFUN (interface_no_ip_pim_drprio, interface_no_ip_pim_drprio_cmd, "no ip pim drpriority [(1-4294967295)]", + NO_STR IP_STR PIM_STR "Revert the Designated Router Priority to default\n" diff --git a/zebra/irdp_interface.c b/zebra/irdp_interface.c index 3e244f5af..fde759df9 100644 --- a/zebra/irdp_interface.c +++ b/zebra/irdp_interface.c @@ -415,6 +415,7 @@ DEFUN (ip_irdp_shutdown, ip_irdp_shutdown_cmd, "ip irdp shutdown", IP_STR + "ICMP Router discovery on this interface\n" "ICMP Router discovery shutdown on this interface\n") { VTY_DECLVAR_CONTEXT (interface, ifp); @@ -428,6 +429,7 @@ DEFUN (no_ip_irdp_shutdown, "no ip irdp shutdown", NO_STR IP_STR + "ICMP Router discovery on this interface\n" "ICMP Router discovery no shutdown on this interface\n") { VTY_DECLVAR_CONTEXT (interface, ifp); diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 667dfd031..05356b3d0 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -230,6 +230,7 @@ DEFUN (ip_mroute_dist, DEFUN (no_ip_mroute_dist, no_ip_mroute_dist_cmd, "no ip mroute A.B.C.D/M [(1-255)]", + NO_STR IP_STR "Configure static unicast route into MRIB for multicast RPF lookup\n" "IP destination prefix (e.g. 10.0.0.0/8)\n" @@ -1195,7 +1196,8 @@ DEFUN (show_ip_route, "show ip route [json]", SHOW_STR IP_STR - "IP routing table\n") + "IP routing table\n" + "JavaScript Object Notation\n") { return do_show_ip_route (vty, VRF_DEFAULT_NAME, SAFI_UNICAST, use_json(argc, argv)); } @@ -1290,7 +1292,8 @@ DEFUN (show_ip_route_vrf, SHOW_STR IP_STR "IP routing table\n" - VRF_CMD_HELP_STR) + VRF_CMD_HELP_STR + "JavaScript Object Notation\n") { int idx_vrf = 4; u_char uj = use_json(argc, argv); -- cgit v1.2.3 From 55cb674303c57f4652a4883284bdc4fe4ae11256 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Thu, 17 Nov 2016 21:54:36 +0000 Subject: zebra: Fix `no ip nht ...` commands Signed-off-by: Quentin Young --- zebra/zebra_routemap.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'zebra') diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c index af69a9d0e..28f09fea0 100644 --- a/zebra/zebra_routemap.c +++ b/zebra/zebra_routemap.c @@ -704,23 +704,22 @@ DEFUN (no_ip_protocol_nht_rmap, "Specify route map\n" "Route map name\n") { + int idx = 0; char *proto = argv[3]->text; - char *rmap = (argc == 6) ? argv[5]->arg : NULL; - int i; + char *rmap = argv_find (argv, argc, "ROUTE-MAP", &idx) ? argv[idx]->arg : NULL; + + int i = strmatch(proto, "any") ? ZEBRA_ROUTE_MAX : proto_name2num(proto); - if (strcasecmp(proto, "any") == 0) - i = ZEBRA_ROUTE_MAX; - else - i = proto_name2num(proto); if (i < 0) { vty_out (vty, "invalid protocol name \"%s\"%s", proto, VTY_NEWLINE); return CMD_WARNING; } + if (!nht_rm[AFI_IP][i]) return CMD_SUCCESS; - if (!rmap && strcmp(rmap, nht_rm[AFI_IP][i]) == 0) + if (!rmap || strcmp(rmap, nht_rm[AFI_IP][i]) == 0) { XFREE (MTYPE_ROUTE_MAP_NAME, nht_rm[AFI_IP][i]); nht_rm[AFI_IP][i] = NULL; -- cgit v1.2.3