From 3a2d747c2e229f47f5dc32c774ba4e2a07275022 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Tue, 29 Nov 2016 23:07:11 +0000 Subject: [PATCH] all: Fix all underfull doc strings Additionally: * Add [ip] to a couple bgp show commands * Quick refactor of a couple ISIS commands * Quick refactor of a couple OSPF6 commands Signed-off-by: Quentin Young --- bgpd/bgp_bfd.c | 3 +- bgpd/bgp_dump.c | 4 +- bgpd/bgp_mplsvpn.c | 16 ++++--- bgpd/bgp_nexthop.c | 3 +- bgpd/bgp_route.c | 4 +- bgpd/bgp_routemap.c | 6 ++- bgpd/bgp_vty.c | 66 ++++++++++++++++++--------- isisd/isis_vty.c | 100 ++++++++++------------------------------- isisd/isisd.c | 59 +++--------------------- lib/routemap.c | 1 + ospf6d/ospf6_area.c | 11 +++-- ospf6d/ospf6_lsa.c | 14 +++++- ospf6d/ospf6_top.c | 3 +- ospf6d/ospf6d.c | 8 ++-- ospfd/ospf_te.c | 3 +- ospfd/ospf_vty.c | 72 ++++++++++++++--------------- ripngd/ripngd.c | 1 + zebra/irdp_interface.c | 32 ++++++++----- zebra/rtadv.c | 1 + zebra/zebra_routemap.c | 16 ++++--- zebra/zebra_vty.c | 6 ++- 21 files changed, 202 insertions(+), 227 deletions(-) diff --git a/bgpd/bgp_bfd.c b/bgpd/bgp_bfd.c index 670d959fe5..f2393dedd9 100644 --- a/bgpd/bgp_bfd.c +++ b/bgpd/bgp_bfd.c @@ -680,7 +680,8 @@ DEFUN_HIDDEN (no_neighbor_bfd_type, NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Disables BFD support\n" - "Session type\n") + "Multihop session\n" + "Singlehop session\n") { int idx_peer = 2; struct peer *peer; diff --git a/bgpd/bgp_dump.c b/bgpd/bgp_dump.c index 511eb34028..add653193c 100644 --- a/bgpd/bgp_dump.c +++ b/bgpd/bgp_dump.c @@ -792,7 +792,9 @@ DEFUN (no_dump_bgp_all, "Stop dump process all-et\n" "Stop dump process updates\n" "Stop dump process updates-et\n" - "Stop dump process route-mrt\n") + "Stop dump process route-mrt\n" + "Output filename\n" + "Interval of output\n") { int idx_dump_routes = 3; int bgp_dump_type = 0; diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c index 312a9f3727..f3a4eebfd3 100644 --- a/bgpd/bgp_mplsvpn.c +++ b/bgpd/bgp_mplsvpn.c @@ -901,7 +901,8 @@ DEFUN (show_bgp_ivp4_vpn, SHOW_STR BGP_STR "Address Family\n" - "Display VPN NLRI specific information\n") + "Display VPN NLRI specific information\n" + JSON_STR) { return bgp_show_mpls_vpn (vty, AFI_IP, NULL, bgp_show_type_normal, NULL, 0, use_json (argc, argv)); } @@ -912,7 +913,8 @@ DEFUN (show_bgp_ipv6_vpn, SHOW_STR BGP_STR "Address Family\n" - "Display VPN NLRI specific information\n") + "Display VPN NLRI specific information\n" + JSON_STR) { return bgp_show_mpls_vpn (vty, AFI_IP6, NULL, bgp_show_type_normal, NULL, 0, use_json (argc, argv)); } @@ -968,7 +970,7 @@ DEFUN (show_bgp_ipv6_vpn_rd, DEFUN (show_ip_bgp_vpnv4_all, show_ip_bgp_vpnv4_all_cmd, - "show ip bgp vpnv4 all", + "show [ip] bgp vpnv4 all", SHOW_STR IP_STR BGP_STR @@ -980,7 +982,7 @@ DEFUN (show_ip_bgp_vpnv4_all, DEFUN (show_ip_bgp_vpnv4_rd, show_ip_bgp_vpnv4_rd_cmd, - "show ip bgp vpnv4 rd ASN:nn_or_IP-address:nn", + "show [ip] bgp vpnv4 rd ASN:nn_or_IP-address:nn", SHOW_STR IP_STR BGP_STR @@ -1003,7 +1005,7 @@ DEFUN (show_ip_bgp_vpnv4_rd, DEFUN (show_ip_bgp_vpnv4_all_tags, show_ip_bgp_vpnv4_all_tags_cmd, - "show ip bgp vpnv4 all tags", + "show [ip] bgp vpnv4 all tags", SHOW_STR IP_STR BGP_STR @@ -1040,7 +1042,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 @@ -1167,7 +1169,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 diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c index 493655d7fa..57168a460b 100644 --- a/bgpd/bgp_nexthop.c +++ b/bgpd/bgp_nexthop.c @@ -499,7 +499,8 @@ DEFUN (show_ip_bgp_nexthop, IP_STR BGP_STR BGP_INSTANCE_HELP_STR - "BGP nexthop table\n") + "BGP nexthop table\n" + "Show detailed information\n") { int idx = 0; char *vrf = argv_find (argv, argc, "VRFNAME", &idx) ? argv[idx]->arg : NULL; diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index f03b5a54bb..821111ade3 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -4489,6 +4489,7 @@ DEFUN (bgp_table_map, DEFUN (no_bgp_table_map, no_bgp_table_map_cmd, "no table-map WORD", + NO_STR "BGP table to RIB route download filter\n" "Name of the route map\n") { @@ -9180,7 +9181,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 prefix-counts [json]", + "show [ip] bgp vpnv4 all neighbors prefix-counts [json]", SHOW_STR IP_STR BGP_STR @@ -9213,6 +9214,7 @@ DEFUN (show_ip_bgp_vpnv4_all_route_prefix, "Address Family\n" "Display information about all VPNv4 NLRIs\n" "Network in the BGP routing table to display\n" + "Network in the BGP routing table to display\n" "JavaScript Object Notation\n") { int idx = 0; diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index 0701415146..41c9155e4c 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -3561,7 +3561,8 @@ DEFUN (no_set_ecommunity_rt, NO_STR SET_STR "BGP extended community attribute\n" - "Route Target extended community\n") + "Route Target extended community\n" + "VPN extended community\n") { return generic_set_delete (vty, vty->index, "extcommunity rt", NULL); } @@ -3592,7 +3593,8 @@ DEFUN (no_set_ecommunity_soo, NO_STR SET_STR "BGP extended community attribute\n" - "Site-of-Origin extended community\n") + "Site-of-Origin extended community\n" + "VPN extended community\n") { return generic_set_delete (vty, vty->index, "extcommunity soo", NULL); } diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 39eb6171c2..7a72ab0908 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -931,7 +931,8 @@ DEFUN (no_bgp_confederation_identifier, NO_STR "BGP specific commands\n" "AS confederation parameters\n" - "AS number\n") + "AS number\n" + "Set routing domain confederation AS\n") { struct bgp *bgp; @@ -1358,6 +1359,7 @@ DEFUN (bgp_coalesce_time, DEFUN (no_bgp_coalesce_time, no_bgp_coalesce_time_cmd, "no coalesce-time (0-4294967295)", + NO_STR "Subgroup coalesce timer\n" "Subgroup coalesce timer value (in ms)\n") { @@ -2020,7 +2022,9 @@ DEFUN (no_bgp_bestpath_med, "Change the default bestpath selection\n" "MED attribute\n" "Compare MED among confederation paths\n" - "Treat missing MED as the least preferred one\n") + "Treat missing MED as the least preferred one\n" + "Treat missing MED as the least preferred one\n" + "Compare MED among confederation paths\n") { struct bgp *bgp = vty->index; @@ -2607,13 +2611,13 @@ peer_remote_as_vty (struct vty *vty, const char *peer_str, DEFUN (neighbor_remote_as, neighbor_remote_as_cmd, - "neighbor remote-as <(1-4294967295)|external|internal>", + "neighbor remote-as <(1-4294967295)|internal|external>", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Specify a BGP neighbor\n" AS_STR - "External BGP peer\n" - "Internal BGP peer\n") + "Internal BGP peer\n" + "External BGP peer\n") { int idx_peer = 1; int idx_remote_as = 3; @@ -2766,13 +2770,14 @@ DEFUN (neighbor_interface_config_v6only, DEFUN (neighbor_interface_config_remote_as, neighbor_interface_config_remote_as_cmd, - "neighbor WORD interface remote-as <(1-4294967295)|external|internal>", + "neighbor WORD interface remote-as <(1-4294967295)|internal|external>", NEIGHBOR_STR "Interface name or neighbor tag\n" "Enable BGP on interface\n" + "Specify a BGP neighbor\n" AS_STR - "External BGP peer\n" - "Internal BGP peer\n") + "Internal BGP peer\n" + "External BGP peer\n") { int idx_word = 1; int idx_remote_as = 4; @@ -2782,13 +2787,15 @@ 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 <(1-4294967295)|external|internal>", + "neighbor WORD interface v6only remote-as <(1-4294967295)|internal|external>", NEIGHBOR_STR "Interface name or neighbor tag\n" + "Enable BGP with v6 link-local only\n" "Enable BGP on interface\n" + "Specify a BGP neighbor\n" AS_STR - "External BGP peer\n" - "Internal BGP peer\n") + "Internal BGP peer\n" + "External BGP peer\n") { int idx_word = 1; int idx_remote_as = 5; @@ -2828,7 +2835,11 @@ DEFUN (no_neighbor, "no neighbor [remote-as <(1-4294967295)|internal|external>]", NO_STR NEIGHBOR_STR - NEIGHBOR_ADDR_STR2) + NEIGHBOR_ADDR_STR2 + "Specify a BGP neighbor\n" + AS_STR + "Internal BGP peer\n" + "External BGP peer\n") { int idx_peer = 2; int ret; @@ -2892,8 +2903,10 @@ DEFUN (no_neighbor_interface_config, "Enable BGP with v6 link-local only\n" "Member of the peer-group\n" "Peer-group name\n" - "Specify remote AS\n" - AS_STR) + "Specify a BGP neighbor\n" + AS_STR + "Internal BGP peer\n" + "External BGP peer\n") { int idx_word = 2; struct peer *peer; @@ -2944,7 +2957,9 @@ DEFUN (no_neighbor_interface_peer_group_remote_as, NEIGHBOR_STR "Interface name or neighbor tag\n" "Specify a BGP neighbor\n" - AS_STR) + AS_STR + "Internal BGP peer\n" + "External BGP peer\n") { int idx_word = 2; struct peer_group *group; @@ -4720,6 +4735,7 @@ DEFUN (no_bgp_set_route_map_delay_timer, no_bgp_set_route_map_delay_timer_cmd, "no bgp route-map delay-timer [(0-600)]", NO_STR + BGP_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") @@ -5440,7 +5456,8 @@ DEFUN (no_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 = 2; struct peer *peer; @@ -5579,7 +5596,7 @@ DEFUN (address_family_vpnv4, "address-family vpnv4 [unicast]", "Enter Address Family command mode\n" "Address Family\n" - "Address Family Modifier\n") + "Address Family modifier\n") { vty->node = BGP_VPNV4_NODE; return CMD_SUCCESS; @@ -5590,7 +5607,7 @@ DEFUN (address_family_vpnv6, "address-family vpnv6 [unicast]", "Enter Address Family command mode\n" "Address Family\n" - "Address Family Modifier\n") + "Address Family modifier\n") { vty->node = BGP_VPNV6_NODE; return CMD_SUCCESS; @@ -5881,10 +5898,11 @@ DEFUN (clear_bgp_ipv6_safi_prefix, clear_bgp_ipv6_safi_prefix_cmd, "clear [ip] bgp ipv6 prefix X:X::X:X/M", CLEAR_STR + IP_STR BGP_STR "Address Family\n" - "Address Family Modifier\n" - "Address Family Modifier\n" + "Address Family modifier\n" + "Address Family modifier\n" "Clear bestpath and re-advertise\n" "IPv6 prefix\n") { @@ -5900,11 +5918,12 @@ DEFUN (clear_bgp_instance_ipv6_safi_prefix, clear_bgp_instance_ipv6_safi_prefix_cmd, "clear [ip] bgp WORD ipv6 prefix X:X::X:X/M", CLEAR_STR + IP_STR BGP_STR BGP_INSTANCE_HELP_STR "Address Family\n" - "Address Family Modifier\n" - "Address Family Modifier\n" + "Address Family modifier\n" + "Address Family modifier\n" "Clear bestpath and re-advertise\n" "IPv6 prefix\n") { @@ -6062,6 +6081,7 @@ DEFUN (show_bgp_memory, show_bgp_memory_cmd, "show [ip] bgp memory", SHOW_STR + IP_STR BGP_STR "Global BGP memory statistics\n") { @@ -8573,6 +8593,8 @@ DEFUN (show_ip_bgp_paths, SHOW_STR IP_STR BGP_STR + "Address Family modifier\n" + "Address Family modifier\n" "Path information\n") { vty_out (vty, "Address Refcnt Path%s", VTY_NEWLINE); diff --git a/isisd/isis_vty.c b/isisd/isis_vty.c index df13696b20..848c56a6ac 100644 --- a/isisd/isis_vty.c +++ b/isisd/isis_vty.c @@ -121,6 +121,7 @@ DEFUN (no_ip_router_isis, NO_STR "Interface Internet Protocol config commands\n" "IP router interface commands\n" + "IP router interface commands\n" "IS-IS Routing for IP\n" "Routing process tag\n") { @@ -1560,106 +1561,53 @@ 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" + "Set interval for level 1 only\n" + "Set interval for level 2 only\n" "Minimum interval in seconds\n") { - int idx_number = 1; + int idx = 0; VTY_DECLVAR_CONTEXT (isis_area, area); uint16_t interval; int level; - interval = atoi (argv[idx_number]->arg); - level = IS_LEVEL_1 | IS_LEVEL_2; + level = 0; + level |= argv_find (argv, argc, "level-1", &idx) ? IS_LEVEL_1 : 0; + level |= argv_find (argv, argc, "level-2", &idx) ? IS_LEVEL_2 : 0; + if (!level) + level = IS_LEVEL_1 | IS_LEVEL_2; + + argv_find (argv, argc, "(1-120)", &idx); + + interval = atoi (argv[idx]->arg); return set_lsp_gen_interval (vty, area, interval, level); } DEFUN (no_lsp_gen_interval, no_lsp_gen_interval_cmd, - "no lsp-gen-interval [(1-120)]", + "no lsp-gen-interval [] [(1-120)]", NO_STR "Minimum interval between regenerating same LSP\n" - "Minimum interval in seconds\n") -{ - VTY_DECLVAR_CONTEXT (isis_area, area); - uint16_t interval; - int level; - - interval = DEFAULT_MIN_LSP_GEN_INTERVAL; - level = IS_LEVEL_1 | IS_LEVEL_2; - return set_lsp_gen_interval (vty, area, interval, level); -} - - -DEFUN (lsp_gen_interval_l1, - lsp_gen_interval_l1_cmd, - "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") -{ - int idx_number = 2; - VTY_DECLVAR_CONTEXT (isis_area, area); - uint16_t interval; - int level; - - interval = atoi (argv[idx_number]->arg); - level = IS_LEVEL_1; - return set_lsp_gen_interval (vty, area, interval, level); -} - -DEFUN (no_lsp_gen_interval_l1, - no_lsp_gen_interval_l1_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") -{ - VTY_DECLVAR_CONTEXT (isis_area, area); - uint16_t interval; - int level; - - interval = DEFAULT_MIN_LSP_GEN_INTERVAL; - level = IS_LEVEL_1; - return set_lsp_gen_interval (vty, area, interval, level); -} - - -DEFUN (lsp_gen_interval_l2, - lsp_gen_interval_l2_cmd, - "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") { + int idx = 0; VTY_DECLVAR_CONTEXT (isis_area, area); - int idx_number = 2; uint16_t interval; int level; - interval = atoi (argv[idx_number]->arg); - level = IS_LEVEL_2; - return set_lsp_gen_interval (vty, area, interval, level); -} - -DEFUN (no_lsp_gen_interval_l2, - no_lsp_gen_interval_l2_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") -{ - VTY_DECLVAR_CONTEXT (isis_area, area); - uint16_t interval; - int level; + level = 0; + level |= argv_find (argv, argc, "level-1", &idx) ? IS_LEVEL_1 : 0; + level |= argv_find (argv, argc, "level-2", &idx) ? IS_LEVEL_2 : 0; + if (!level) + level = IS_LEVEL_1 | IS_LEVEL_2; interval = DEFAULT_MIN_LSP_GEN_INTERVAL; - level = IS_LEVEL_2; return set_lsp_gen_interval (vty, area, interval, level); } - DEFUN (spf_interval, spf_interval_cmd, "spf-interval (1-120)", @@ -1809,6 +1757,7 @@ 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" "Maximum LSP lifetime for Level 1 only\n" "Maximum LSP lifetime for Level 2 only\n" "LSP lifetime in seconds\n") @@ -1832,6 +1781,7 @@ DEFUN (no_max_lsp_lifetime, no_max_lsp_lifetime_cmd, "no max-lsp-lifetime [] [(350-65535)]", NO_STR + "Maximum LSP lifetime\n" "Maximum LSP lifetime for Level 1 only\n" "Maximum LSP lifetime for Level 2 only\n" "LSP lifetime in seconds\n") @@ -2127,10 +2077,6 @@ isis_vty_init (void) install_element (ISIS_NODE, &lsp_gen_interval_cmd); install_element (ISIS_NODE, &no_lsp_gen_interval_cmd); - install_element (ISIS_NODE, &lsp_gen_interval_l1_cmd); - install_element (ISIS_NODE, &no_lsp_gen_interval_l1_cmd); - install_element (ISIS_NODE, &lsp_gen_interval_l2_cmd); - install_element (ISIS_NODE, &no_lsp_gen_interval_l2_cmd); install_element (ISIS_NODE, &spf_interval_cmd); install_element (ISIS_NODE, &no_spf_interval_cmd); diff --git a/isisd/isisd.c b/isisd/isisd.c index c3bc33eb22..f23e45c8a3 100644 --- a/isisd/isisd.c +++ b/isisd/isisd.c @@ -1534,62 +1534,19 @@ show_isis_database (struct vty *vty, const char *argv, int ui_level) return CMD_SUCCESS; } -DEFUN (show_database_brief, +DEFUN (show_database, show_database_cmd, - "show isis database", - SHOW_STR - "IS-IS information\n" - "IS-IS link state database\n") -{ - return show_isis_database (vty, NULL, ISIS_UI_LEVEL_BRIEF); -} - -DEFUN (show_database_lsp_brief, - show_database_arg_cmd, - "show isis database WORD", - SHOW_STR - "IS-IS information\n" - "IS-IS link state database\n" - "LSP ID\n") -{ - int idx_word = 3; - return show_isis_database (vty, argv[idx_word]->arg, ISIS_UI_LEVEL_BRIEF); -} - -DEFUN (show_database_lsp_detail, - show_database_arg_detail_cmd, - "show isis database WORD detail", - SHOW_STR - "IS-IS information\n" - "IS-IS link state database\n" - "LSP ID\n" - "Detailed information\n") -{ - int idx_word = 3; - return show_isis_database (vty, argv[idx_word]->arg, ISIS_UI_LEVEL_DETAIL); -} - -DEFUN (show_database_detail, - show_database_detail_cmd, - "show isis database detail", - SHOW_STR - "IS-IS information\n" - "IS-IS link state database\n") -{ - return show_isis_database (vty, NULL, ISIS_UI_LEVEL_DETAIL); -} - -DEFUN (show_database_detail_lsp, - show_database_detail_arg_cmd, - "show isis database detail WORD", + "show isis database [detail] [WORD]", SHOW_STR "IS-IS information\n" "IS-IS link state database\n" "Detailed information\n" "LSP ID\n") { - int idx_word = 4; - return show_isis_database (vty, argv[idx_word]->arg, ISIS_UI_LEVEL_DETAIL); + int idx = 0; + int uilevel = argv_find (argv, argc, "detail", &idx) ? ISIS_UI_LEVEL_DETAIL : ISIS_UI_LEVEL_BRIEF; + char *id = argv_find (argv, argc, "WORD", &idx) ? argv[idx]->arg : NULL; + return show_isis_database (vty, id, uilevel); } /* @@ -2325,10 +2282,6 @@ isis_init () install_element (VIEW_NODE, &show_hostname_cmd); install_element (VIEW_NODE, &show_database_cmd); - install_element (VIEW_NODE, &show_database_arg_cmd); - install_element (VIEW_NODE, &show_database_arg_detail_cmd); - install_element (VIEW_NODE, &show_database_detail_cmd); - install_element (VIEW_NODE, &show_database_detail_arg_cmd); install_element (ENABLE_NODE, &show_debugging_isis_cmd); diff --git a/lib/routemap.c b/lib/routemap.c index dc89390a96..d6a5b713c5 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -2374,6 +2374,7 @@ DEFUN (no_set_ip_nexthop, "no set ip next-hop []", NO_STR SET_STR + IP_STR "Next hop address\n" "Use peer address (for BGP only)\n" "IP address of next hop\n") diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c index 9ba7287656..06ff40a983 100644 --- a/ospf6d/ospf6_area.c +++ b/ospf6d/ospf6_area.c @@ -512,12 +512,17 @@ DEFUN (area_range, DEFUN (no_area_range, no_area_range_cmd, - "no area A.B.C.D range X:X::X:X/M [] [cost (0-16777215)]", + "no area range X:X::X:X/M []", NO_STR "OSPF6 area parameters\n" - OSPF6_AREA_ID_STR + "OSPF6 area ID in IP address format\n" + "OSPF6 area ID as a decimal value\n" "Configured address range\n" - "Specify IPv6 prefix\n") + "Specify IPv6 prefix\n" + "Advertise\n" + "Do not advertise\n" + "User specified metric for this range\n" + "Advertised metric for this range\n") { int idx_ipv4 = 2; int ret; diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index ef56028a3b..06962ec069 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -822,7 +822,17 @@ DEFUN (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 Inter-Router LSAs\n" + "Display As-External LSAs\n" + "Display Link LSAs\n" + "Display Intra-Area-Prefix LSAs\n" + "Display LSAs of unknown origin\n" + "Display details of LSAs\n" + "Dump LSAs\n" + "Display LSA's internal information\n") { int idx_lsa = 3; int idx_type = 4; @@ -869,9 +879,11 @@ DEFUN (no_debug_ospf6_lsa_type, "Display Router LSAs\n" "Display Network LSAs\n" "Display Inter-Area-Prefix LSAs\n" + "Display Inter-Router LSAs\n" "Display As-External LSAs\n" "Display Link LSAs\n" "Display Intra-Area-Prefix LSAs\n" + "Display LSAs of unknown origin\n" "Display details of LSAs\n" "Dump LSAs\n" "Display LSA's internal information\n") diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index 32ec2731d6..b83433dfc3 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -422,7 +422,8 @@ DEFUN (no_ospf6_timers_lsa, NO_STR "Adjust routing timers\n" "OSPF6 LSA timers\n" - "Minimum delay in receiving new version of a LSA\n") + "Minimum delay in receiving new version of a LSA\n" + "Delay in milliseconds\n") { int idx_number = 4; unsigned int minarrival; diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c index c3b4005d1d..88d4461728 100644 --- a/ospf6d/ospf6d.c +++ b/ospf6d/ospf6d.c @@ -84,7 +84,8 @@ DEFUN (show_version_ospf6, show_version_ospf6_cmd, "show version ospf6", SHOW_STR - "Displays ospf6d version\n" + "Display version\n" + "Display ospf6d version\n" ) { vty_out (vty, "Zebra OSPF6d Version: %s%s", @@ -1151,8 +1152,7 @@ DEFUN (show_ipv6_ospf6_linkstate, "Specify Router ID as IPv4 address notation\n" "Display Network Entry\n" "Specify Router ID as IPv4 address notation\n" - "Specify Link state ID as IPv4 address notation\n" - ) + "Specify Link state ID as IPv4 address notation\n") { int idx_ipv4 = 4; struct listnode *node; @@ -1180,7 +1180,7 @@ DEFUN (show_ipv6_ospf6_linkstate_detail, IP6_STR OSPF6_STR "Display linkstate routing table\n" - ) + "Display detailed information\n") { int idx_detail = 4; struct listnode *node; diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c index 80156e81f6..321c035d3a 100644 --- a/ospfd/ospf_te.c +++ b/ospfd/ospf_te.c @@ -2299,8 +2299,9 @@ DEFUN (ospf_mpls_te_on, DEFUN (no_ospf_mpls_te, no_ospf_mpls_te_cmd, - "no mpls-tei [on]", + "no mpls-te [on]", NO_STR + MPLS_TE_STR "Disable the MPLS-TE functionality\n") { struct listnode *node, *nnode; diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index 4f5204be77..ad94710341 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -380,6 +380,7 @@ DEFUN (ospf_passive_interface, "passive-interface ", "Suppress routing updates on an interface\n" "Interface's name\n" + "IPv4 address\n" "Suppress routing updates on interfaces by default\n") { int idx_ipv4 = 2; @@ -452,6 +453,7 @@ DEFUN (no_ospf_passive_interface, NO_STR "Allow routing updates on an interface\n" "Interface's name\n" + "IPv4 address\n" "Allow routing updates on interfaces by default\n") { int idx_ipv4 = 3; @@ -703,14 +705,18 @@ DEFUN (ospf_area_range_not_advertise, DEFUN (no_ospf_area_range, no_ospf_area_range_cmd, - "no area 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" "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" "Advertise this range (default)\n" + "User specified metric for this range\n" + "Advertised metric for this range\n" "DoNotAdvertise this range\n") { int idx_ipv4_number = 2; @@ -1333,6 +1339,7 @@ DEFUN (no_ospf_area_vlink_intervals, "[ (1-65535)" "[ (1-65535)" "]]]", + NO_STR VLINK_HELPSTR_IPADDR VLINK_HELPSTR_TIME_PARAM VLINK_HELPSTR_TIME_PARAM @@ -2155,7 +2162,8 @@ DEFUN (no_ospf_abr_type, "Set OSPF ABR type\n" "Alternative ABR, cisco implementation\n" "Alternative ABR, IBM implementation\n" - "Shortcut ABR\n") + "Shortcut ABR\n" + "Standard ABR\n") { int idx_vendor = 3; struct ospf *ospf = vty->index; @@ -2667,6 +2675,7 @@ DEFUN (ospf_refresh_timer, DEFUN (no_ospf_refresh_timer, no_ospf_refresh_timer_val_cmd, "no refresh timer [(10-1800)]", + NO_STR "Adjust refresh parameters\n" "Unset refresh timer\n" "Timer value in seconds\n") @@ -5569,27 +5578,6 @@ show_ip_ospf_database_common (struct vty *vty, struct ospf *ospf, return CMD_SUCCESS; } -DEFUN (show_ip_ospf_database, - show_ip_ospf_database_cmd, - "show ip ospf database [ [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" - "Self-originated link states\n" - "Advertising Router link states\n" - "Advertising Router (as an IP address)\n") -{ - struct ospf *ospf; - - if ((ospf = ospf_lookup()) == NULL || !ospf->oi_running) - return CMD_SUCCESS; - - return (show_ip_ospf_database_common(vty, ospf, 0, argc, argv)); -} - DEFUN (show_ip_ospf_database_max, show_ip_ospf_database_max_cmd, "show ip ospf database ", @@ -5610,7 +5598,7 @@ DEFUN (show_ip_ospf_database_max, DEFUN (show_ip_ospf_instance_database, show_ip_ospf_instance_database_cmd, - "show ip ospf (1-65535) database [ [A.B.C.D []]]", + "show ip ospf [(1-65535)] database [ [A.B.C.D []]]", SHOW_STR IP_STR "OSPF information\n" @@ -5622,16 +5610,23 @@ DEFUN (show_ip_ospf_instance_database, "Advertising Router link states\n" "Advertising Router (as an IP address)\n") { - int idx_number = 3; struct ospf *ospf; u_short instance = 0; - VTY_GET_INTEGER ("Instance", instance, argv[idx_number]->arg); + int idx = 0; + if (argv_find (argv, argc, "(1-65535)", &idx)) + { + VTY_GET_INTEGER ("Instance", instance, argv[idx]->arg); + ospf = ospf_lookup_instance (instance); + } + else { + ospf = ospf_lookup(); + } - if ((ospf = ospf_lookup_instance (instance)) == NULL || !ospf->oi_running) + if (!ospf || !ospf->oi_running) return CMD_SUCCESS; - return (show_ip_ospf_database_common(vty, ospf, 1, argc, argv)); + return (show_ip_ospf_database_common(vty, ospf, idx ? 1 : 0, argc, argv)); } DEFUN (show_ip_ospf_instance_database_max, @@ -5743,7 +5738,8 @@ DEFUN (show_ip_ospf_instance_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") { int idx_number = 3; struct ospf *ospf; @@ -6891,7 +6887,8 @@ DEFUN_HIDDEN (ospf_priority, "ospf priority (0-255) [A.B.C.D]", "OSPF interface commands\n" "Router priority\n" - "Priority\n") + "Priority\n" + "Address of interface") { return ip_ospf_priority (self, vty, argc, argv); } @@ -7010,7 +7007,8 @@ DEFUN_HIDDEN (ospf_retransmit_interval, "ospf retransmit-interval (3-65535) [A.B.C.D]", "OSPF interface commands\n" "Time between retransmitting lost link state advertisements\n" - "Seconds\n") + "Seconds\n" + "Address of interface") { return ip_ospf_retransmit_interval (self, vty, argc, argv); } @@ -7021,7 +7019,8 @@ DEFUN (no_ip_ospf_retransmit_interval, NO_STR "IP Information\n" "OSPF interface commands\n" - "Time between retransmitting lost link state advertisements\n" //ignored + "Time between retransmitting lost link state advertisements\n" + "Seconds\n" "Address of interface\n") { int idx = 0; @@ -7063,7 +7062,9 @@ DEFUN_HIDDEN (no_ospf_retransmit_interval, "no ospf retransmit-interval [(3-65535)] [A.B.C.D]", NO_STR "OSPF interface commands\n" - "Time between retransmitting lost link state advertisements\n") + "Time between retransmitting lost link state advertisements\n" + "Seconds\n" + "Address of interface\n") { return no_ip_ospf_retransmit_interval (self, vty, argc, argv); } @@ -7111,7 +7112,8 @@ DEFUN_HIDDEN (ospf_transmit_delay, "ospf transmit-delay (1-65535) [A.B.C.D]", "OSPF interface commands\n" "Link state transmit delay\n" - "Seconds\n") + "Seconds\n" + "Address of interface") { return ip_ospf_transmit_delay (self, vty, argc, argv); } @@ -7250,6 +7252,7 @@ DEFUN (no_ip_ospf_area, 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") @@ -9196,7 +9199,6 @@ ospf_vty_show_init (void) /* "show ip ospf database" commands. */ install_element (VIEW_NODE, &show_ip_ospf_database_type_adv_router_cmd); - install_element (VIEW_NODE, &show_ip_ospf_database_cmd); install_element (VIEW_NODE, &show_ip_ospf_database_max_cmd); install_element (VIEW_NODE, &show_ip_ospf_instance_database_type_adv_router_cmd); diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c index e7db971208..70e6a29cfa 100644 --- a/ripngd/ripngd.c +++ b/ripngd/ripngd.c @@ -3027,6 +3027,7 @@ ripng_init () /* Install ripng commands. */ install_element (VIEW_NODE, &show_ipv6_ripng_cmd); install_element (VIEW_NODE, &show_ipv6_ripng_status_cmd); + install_element (VIEW_NODE, &show_ipv6_protocols_cmd); install_element (CONFIG_NODE, &router_ripng_cmd); install_element (CONFIG_NODE, &no_router_ripng_cmd); diff --git a/zebra/irdp_interface.c b/zebra/irdp_interface.c index fde759df98..5cabe7e62f 100644 --- a/zebra/irdp_interface.c +++ b/zebra/irdp_interface.c @@ -378,7 +378,8 @@ DEFUN (ip_irdp_multicast, ip_irdp_multicast_cmd, "ip irdp multicast", IP_STR - "ICMP Router discovery on this interface using multicast\n") + "ICMP Router discovery on this interface\n" + "Use multicast mode\n") { VTY_DECLVAR_CONTEXT (interface, ifp); @@ -390,7 +391,8 @@ DEFUN (ip_irdp_broadcast, ip_irdp_broadcast_cmd, "ip irdp broadcast", IP_STR - "ICMP Router discovery on this interface using broadcast\n") + "ICMP Router discovery on this interface\n" + "Use broadcast mode\n") { VTY_DECLVAR_CONTEXT (interface, ifp); @@ -548,9 +550,10 @@ DEFUN (ip_irdp_address_preference, ip_irdp_address_preference_cmd, "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" + "Alter ICMP Router discovery preference on this interface\n" "Set IRDP address for advertise\n" + "IPv4 address\n" + "Specify IRDP non-default preference to advertise\n" "Preference level\n") { int idx_ipv4 = 3; @@ -590,9 +593,10 @@ DEFUN (no_ip_irdp_address_preference, "no ip irdp address A.B.C.D preference (0-2147483647)", NO_STR IP_STR - "Alter ICMP Router discovery preference this interface\n" - "Removes IRDP non-default preference\n" + "Alter ICMP Router discovery preference on this interface\n" "Select IRDP address\n" + "IPv4 address\n" + "Reset ICMP Router discovery preference on this interface\n" "Old preference level\n") { int idx_ipv4 = 4; @@ -627,7 +631,9 @@ DEFUN (ip_irdp_debug_messages, ip_irdp_debug_messages_cmd, "ip irdp debug messages", IP_STR - "ICMP Router discovery debug Averts. and Solicits (short)\n") + "ICMP Router discovery debug Averts. and Solicits (short)\n" + "IRDP debugging options\n" + "Enable debugging for IRDP messages\n") { VTY_DECLVAR_CONTEXT (interface, ifp); struct zebra_if *zi; @@ -645,7 +651,9 @@ DEFUN (ip_irdp_debug_misc, ip_irdp_debug_misc_cmd, "ip irdp debug misc", IP_STR - "ICMP Router discovery debug Averts. and Solicits (short)\n") + "ICMP Router discovery debug Averts. and Solicits (short)\n" + "IRDP debugging options\n" + "Enable debugging for miscellaneous IRDP events\n") { VTY_DECLVAR_CONTEXT (interface, ifp); struct zebra_if *zi; @@ -663,7 +671,9 @@ DEFUN (ip_irdp_debug_packet, ip_irdp_debug_packet_cmd, "ip irdp debug packet", IP_STR - "ICMP Router discovery debug Averts. and Solicits (short)\n") + "ICMP Router discovery debug Averts. and Solicits (short)\n" + "IRDP debugging options\n" + "Enable debugging for IRDP packets\n") { VTY_DECLVAR_CONTEXT (interface, ifp); struct zebra_if *zi; @@ -682,7 +692,9 @@ DEFUN (ip_irdp_debug_disable, ip_irdp_debug_disable_cmd, "ip irdp debug disable", IP_STR - "ICMP Router discovery debug Averts. and Solicits (short)\n") + "ICMP Router discovery debug Averts. and Solicits (short)\n" + "IRDP debugging options\n" + "Disable debugging for all IRDP events\n") { VTY_DECLVAR_CONTEXT (interface, ifp); struct zebra_if *zi; diff --git a/zebra/rtadv.c b/zebra/rtadv.c index dcf31ff450..eb21e6e688 100644 --- a/zebra/rtadv.c +++ b/zebra/rtadv.c @@ -916,6 +916,7 @@ DEFUN (ipv6_nd_ra_interval_msec, "Interface IPv6 config commands\n" "Neighbor discovery\n" "Router Advertisement interval\n" + "Router Advertisement interval in milliseconds\n" "Router Advertisement interval in milliseconds\n") { int idx_number = 4; diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c index 28f09fea01..4c320b2e77 100644 --- a/zebra/zebra_routemap.c +++ b/zebra/zebra_routemap.c @@ -400,7 +400,9 @@ DEFUN (no_set_src, "no set src []", NO_STR SET_STR - "Source address for route\n") + "Source address for route\n" + "IPv4 address\n" + "IPv6 address\n") { char *ip = (argc == 4) ? argv[3]->arg : NULL; VTY_DECLVAR_CONTEXT (route_map_index, index); @@ -732,8 +734,9 @@ DEFUN (no_ip_protocol_nht_rmap, DEFUN (show_ip_protocol_nht, show_ip_protocol_nht_cmd, "show ip nht route-map", - SHOW_STR - IP_STR + SHOW_STR + IP_STR + "IP nexthop tracking table\n" "IP Next Hop tracking filtering status\n") { int i; @@ -833,9 +836,10 @@ DEFUN (no_ipv6_protocol_nht_rmap, DEFUN (show_ipv6_protocol_nht, show_ipv6_protocol_nht_cmd, "show ipv6 nht route-map", - SHOW_STR - IP6_STR - "IPv6 protocol Next Hop filtering status\n") + SHOW_STR + IP6_STR + "Next Hop filtering status\n" + "Route-map\n") { int i; diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 05356b3d0a..755abd6e34 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -3871,7 +3871,11 @@ DEFUN (no_ip_zebra_import_table, NO_STR IP_STR "import routes from non-main kernel table\n" - "kernel routing table id\n") + "kernel routing table id\n" + "Distance for imported routes\n" + "Default distance value\n" + "route-map for filtering\n" + "route-map name\n") { u_int32_t table_id = 0; VTY_GET_INTEGER("table", table_id, argv[3]->arg); -- 2.39.5