]> git.puffer.fish Git - matthieu/frr.git/commitdiff
all: Fix underfull doc strings, part 2
authorQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 8 Nov 2016 01:46:04 +0000 (01:46 +0000)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 8 Nov 2016 01:46:04 +0000 (01:46 +0000)
Add missing docstrings and separating \n.
Also eat some low-hanging refactoring fruit.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
bgpd/bgp_bfd.c
bgpd/bgp_routemap.c
bgpd/bgp_vty.c
isisd/isisd.c
ospf6d/ospf6_area.c
pimd/pim_cmd.c
zebra/irdp_interface.c
zebra/zebra_vty.c

index 684694d0bc40db99b1aa2ccd53db471d4d11e07a..670d959fe5f4828ac767a87bf8aadcdb55363949 100644 (file)
@@ -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;
index 1ddae3cd883d0971feb0c61883b009eee8ba82e6..0701415146f6341580ca9a5ba645ad4b98d4678f 100644 (file)
@@ -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 [<egp|igp|incomplete>]",
        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);
 }
index f22216195245e6b36b709abd6927b09f224bb1a4..f9d845dcd1534678916dcb09ffaea6fef819e31c 100644 (file)
@@ -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 <A.B.C.D/M|X:X::X:X/M> 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 <A.B.C.D/M|X:X::X:X/M> 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;
index ff3d9c791b1d528fad3e6ca660bff768c6b2a2da..c3bc33eb226345d315be6bedab965d45b4e16207 100644 (file)
@@ -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);
index de395e8b57a9f8381bf979353f41d43273c6c47d..9ba72876568eeac96c4758e0452b5dd1251ed1ef 100644 (file)
@@ -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;
index 318bd1ba1ce0ebe25c877e3bafd40a7915b3a7f6..afc42a95618fbfd82101d7b4711be6f22c9e3da1 100644 (file)
@@ -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"
index 3e244f5af30f991bc02b51e7b5614dbed558a17a..fde759df984f85c93956e5532d0dafee27ab7742 100644 (file)
@@ -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);
index 667dfd031aeca8c0b1c5358bb6367d1135d80864..05356b3d0a67a4f1517748e524de8caeb0601137 100644 (file)
@@ -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 <A.B.C.D|INTERFACE> [(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);