]> git.proxmox.com Git - mirror_frr.git/commitdiff
all: Fix underfull doc strings, part 1
authorQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 4 Nov 2016 23:03:03 +0000 (23:03 +0000)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 4 Nov 2016 23:03:03 +0000 (23:03 +0000)
Add missing docstrings and separating \n.
Also eat some low-hanging refactoring fruit.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
14 files changed:
bgpd/bgp_route.c
bgpd/bgp_vty.c
isisd/isis_vty.c
isisd/isisd.c
lib/command.h
ospf6d/ospf6_lsa.c
ospf6d/ospf6_route.c
ospf6d/ospf6_top.c
ospf6d/ospf6d.c
ospfd/ospf_dump.c
ospfd/ospf_vty.c
vtysh/vtysh.c
zebra/debug.c
zebra/zebra_routemap.c

index 351c6ca55befa6f4ab70c2c26ba7ee04151d804e..6c71fd525c6fb0d874fcb113881cfec07f0c455d 100644 (file)
@@ -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;
 
index e738d1ec6d777f0b4e6f655a56e57da95d5edb2b..715c84aa0387b9bc383cff95c19aa64c6ee5f48b 100644 (file)
@@ -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 <A.B.C.D|X:X::X:X|WORD> 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 <A.B.C.D|X:X::X:X|WORD> 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 <A.B.C.D|X:X::X:X|WORD> 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")
 {
index 492572bddf50dda26e82d275ad190345b0d5e0f1..df13696b20549b6ce51572cdac76fc52fc90d44a 100644 (file)
@@ -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 [<level-1|level-2>] (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 [<level-1|level-2>] [(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 [<level-1|level-2>] (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 [<level-1|level-2>] [(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);
index 143e380016bd073a22f5675f15f20bccc833f255..ff3d9c791b1d528fad3e6ca660bff768c6b2a2da 100644 (file)
@@ -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")
index bdf30b6f3c10b0b371a90eb7ceb943df725d59c2..7b1f7d9fb51e068657c1bae3aeb9114bd8a91511 100644 (file)
@@ -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);
index 87e50bcf865c066b52af8c69810b297bc436645e..ef56028a3b55a24f99d4f98214380c82de3a5947 100644 (file)
@@ -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;
index 3263f4a06c96cb78ddade3c2c975e7ff4f24aa38..2f416e2689ebe06b942c5434df8c9e4a9611a0fd 100644 (file)
@@ -1567,8 +1567,8 @@ DEFUN (debug_ospf6_route,
        "debug ospf6 route <table|intra-area|inter-area|memory>",
        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;
index 5471e58622d0a07bf02adab1ce9839cee8ee8fd4..32ec2731d6b91bf30a3c085ac1f91069109c1b05 100644 (file)
@@ -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;
index 349dae5c767d59e67a7f80d90395adb719ad1518..c3b4005d1d8aa25d04ade008b2dc1db1529b58bc 100644 (file)
@@ -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;
index 0b3267a23307b60b0e85d77dfb65efc927015b50..93baac598817e2614a631ae7b9621c94e429d575 100644 (file)
@@ -969,6 +969,7 @@ DEFUN (debug_ospf_ism,
 DEFUN (no_debug_ospf_ism,
        no_debug_ospf_ism_cmd,
        "no debug ospf [(1-65535)] ism [<status|events|timers>]",
+       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")
index f5f07944c5a72ce074baf719e934c6241a9cc230..a9207306695d91ded91ea2b9fac362227dbff884 100644 (file)
@@ -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;
 
index 708eb85b15deb1916ad27e4eb3fd8cc588546d59..e4c3ce76f7650a66efe3f5c1580136221d5acf17 100644 (file)
@@ -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")
index 65ae3fd1743bcf8cae03b6770ba96b0b92a95d96..2e9fef292ba7e91e45a090c5420915acfd9fd7ae 100644 (file)
@@ -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 <recv|send|detail>",
+       "debug zebra packet [<recv|send>] [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 <recv|send> 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 <recv|send>",
+       "no debug zebra packet [<recv|send>]",
        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 [<recv|send>]",
+       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);
index 59725561f5ce801597e7cf41681d842cd3741e24..af69a9d0e00d2b4491c0230c980522387a13f49a 100644 (file)
@@ -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 <bgp|ospf|rip|ripng|isis|ospf6|connected|system|kernel|static>",
        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 <A.B.C.D|X:X::X:X>",
        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);