]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: define mpls label helpstr 647/head
authorQuentin Young <qlyoung@cumulusnetworks.com>
Wed, 31 May 2017 21:50:20 +0000 (21:50 +0000)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Wed, 31 May 2017 21:50:20 +0000 (21:50 +0000)
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
zebra/zebra_mpls.h
zebra/zebra_mpls_vty.c
zebra/zebra_vty.c

index 1f17de67a33b23b8ca769b59a346ea77d99fd5ac..319091520d5189c4bf64262f9bc449062b5755e3 100644 (file)
@@ -43,6 +43,8 @@
   (((nhlfe)->nexthop->type == NEXTHOP_TYPE_IPV6 || \
     (nhlfe)->nexthop->type == NEXTHOP_TYPE_IPV6_IFINDEX) ? AF_INET6 : AF_INET)
 
+#define MPLS_LABEL_HELPSTR "Specify label(s) for this route\nOne or more " \
+                           "labels in the range (16-1048575) separated by '/'\n"
 
 /* Typedefs */
 
index 3010a3bd8a73c38ce6e291c45b12a4f2edca036f..56f3e5196e6dfdea4663ff43fd8736e8859c8b8f 100644 (file)
@@ -321,8 +321,7 @@ DEFUN (ip_route_label,
        "IP gateway address\n"
        "IP gateway interface name\n"
        "Null interface\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL,
                             NULL, NULL, argv[5]->arg);
@@ -339,8 +338,7 @@ DEFUN (ip_route_tag_label,
        "Null interface\n"
        "Set tag for this route\n"
        "Tag value\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[5]->arg,
                             NULL, NULL, argv[7]->arg);
@@ -357,8 +355,7 @@ DEFUN (ip_route_mask_label,
        "IP gateway address\n"
        "IP gateway interface name\n"
        "Null interface\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL,
                             NULL, NULL, argv[6]->arg);
@@ -376,8 +373,7 @@ DEFUN (ip_route_mask_tag_label,
        "Null interface\n"
        "Set tag for this route\n"
        "Tag value\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 
 {
   return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg,
@@ -395,8 +391,7 @@ DEFUN (ip_route_distance_label,
        "IP gateway interface name\n"
        "Null interface\n"
        "Distance value for this route\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL,
                             argv[4]->arg, NULL, argv[6]->arg);
@@ -414,8 +409,7 @@ DEFUN (ip_route_tag_distance_label,
        "Set tag for this route\n"
        "Tag value\n"
        "Distance value for this route\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 
 {
   return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, argv[5]->arg,
@@ -433,8 +427,7 @@ DEFUN (ip_route_mask_distance_label,
        "IP gateway interface name\n"
        "Null interface\n"
        "Distance value for this route\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   return zebra_static_ipv4 (vty, SAFI_UNICAST, 1, argv[2]->arg, argv[3]->arg, argv[4]->arg, NULL, NULL,
                             argv[5]->arg, NULL, argv[7]->arg);
@@ -453,8 +446,7 @@ DEFUN (ip_route_mask_tag_distance_label,
        "Set tag for this route\n"
        "Tag value\n"
        "Distance value for this route\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   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, argv[9]->arg);
@@ -470,8 +462,7 @@ DEFUN (no_ip_route_label,
        "IP gateway address\n"
        "IP gateway interface name\n"
        "Null interface\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL,
                             NULL, NULL, argv[6]->arg);
@@ -489,8 +480,7 @@ DEFUN (no_ip_route_tag_label,
        "Null interface\n"
        "Tag of this route\n"
        "Tag value\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[6]->arg,
                             NULL, NULL, argv[8]->arg);
@@ -507,8 +497,7 @@ DEFUN (no_ip_route_mask_label,
        "IP gateway address\n"
        "IP gateway interface name\n"
        "Null interface\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL,
                             NULL, NULL, argv[7]->arg);
@@ -527,8 +516,7 @@ DEFUN (no_ip_route_mask_tag_label,
        "Null interface\n"
        "Tag of this route\n"
        "Tag value\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg,
                             NULL, NULL, argv[9]->arg);
@@ -545,8 +533,7 @@ DEFUN (no_ip_route_distance_label,
        "IP gateway interface name\n"
        "Null interface\n"
        "Distance value for this route\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL,
                             argv[5]->arg, NULL, argv[7]->arg);
@@ -565,8 +552,7 @@ DEFUN (no_ip_route_tag_distance_label,
        "Tag of this route\n"
        "Tag value\n"
        "Distance value for this route\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, argv[6]->arg,
                             argv[7]->arg, NULL, argv[9]->arg);
@@ -584,8 +570,7 @@ DEFUN (no_ip_route_mask_distance_label,
        "IP gateway interface name\n"
        "Null interface\n"
        "Distance value for this route\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   return zebra_static_ipv4 (vty, SAFI_UNICAST, 0, argv[3]->arg, argv[4]->arg, argv[5]->arg, NULL, NULL,
                             argv[6]->arg, NULL, argv[8]->arg);
@@ -605,8 +590,7 @@ DEFUN (no_ip_route_mask_tag_distance_label,
        "Tag of this route\n"
        "Tag value\n"
        "Distance value for this route\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   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, argv[10]->arg);
@@ -620,8 +604,7 @@ DEFUN (ipv6_route_label,
        "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
        "IPv6 gateway address\n"
        "IPv6 gateway interface name\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   return static_ipv6_func (vty, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL, NULL, NULL, NULL, argv[5]->arg);
 }
@@ -636,8 +619,7 @@ DEFUN (ipv6_route_tag_label,
        "IPv6 gateway interface name\n"
        "Set tag for this route\n"
        "Tag value\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   return static_ipv6_func (vty, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL, argv[5]->arg, NULL, NULL, argv[7]->arg);
 }
@@ -650,8 +632,7 @@ DEFUN (ipv6_route_ifname_label,
        "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
        "IPv6 gateway address\n"
        "IPv6 gateway interface name\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   return static_ipv6_func (vty, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL, NULL, NULL, NULL, argv[6]->arg);
 }
@@ -665,8 +646,7 @@ DEFUN (ipv6_route_ifname_tag_label,
        "IPv6 gateway interface name\n"
        "Set tag for this route\n"
        "Tag value\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   return static_ipv6_func (vty, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, NULL, NULL, argv[8]->arg);
 }
@@ -680,8 +660,7 @@ DEFUN (ipv6_route_pref_label,
        "IPv6 gateway address\n"
        "IPv6 gateway interface name\n"
        "Distance value for this prefix\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   return static_ipv6_func (vty, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL, NULL, argv[4]->arg, NULL, argv[6]->arg);
 }
@@ -697,8 +676,7 @@ DEFUN (ipv6_route_pref_tag_label,
        "Set tag for this route\n"
        "Tag value\n"
        "Distance value for this prefix\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   return static_ipv6_func (vty, 1, argv[2]->arg, NULL, argv[3]->arg, NULL, NULL, argv[5]->arg, argv[6]->arg, NULL, argv[8]->arg);
 }
@@ -712,8 +690,7 @@ DEFUN (ipv6_route_ifname_pref_label,
        "IPv6 gateway address\n"
        "IPv6 gateway interface name\n"
        "Distance value for this prefix\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   return static_ipv6_func (vty, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL, NULL, argv[5]->arg, NULL, argv[7]->arg);
 }
@@ -729,8 +706,7 @@ DEFUN (ipv6_route_ifname_pref_tag_label,
        "Set tag for this route\n"
        "Tag value\n"
        "Distance value for this prefix\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   return static_ipv6_func (vty, 1, argv[2]->arg, NULL, argv[3]->arg, argv[4]->arg, NULL, argv[6]->arg, argv[7]->arg, NULL, argv[9]->arg);
 }
@@ -744,8 +720,7 @@ DEFUN (no_ipv6_route_label,
        "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
        "IPv6 gateway address\n"
        "IPv6 gateway interface name\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   return static_ipv6_func (vty, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, NULL, NULL, NULL, argv[6]->arg);
 }
@@ -761,8 +736,7 @@ DEFUN (no_ipv6_route_tag_label,
        "IPv6 gateway interface name\n"
        "Set tag for this route\n"
        "Tag value\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   return static_ipv6_func (vty, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, argv[6]->arg, NULL, NULL, argv[8]->arg);
 }
@@ -776,8 +750,7 @@ DEFUN (no_ipv6_route_ifname_label,
        "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
        "IPv6 gateway address\n"
        "IPv6 gateway interface name\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   return static_ipv6_func (vty, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, NULL, NULL, NULL, NULL, argv[7]->arg);
 }
@@ -793,8 +766,7 @@ DEFUN (no_ipv6_route_ifname_tag_label,
        "IPv6 gateway interface name\n"
        "Set tag for this route\n"
        "Tag value\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   return static_ipv6_func (vty, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, NULL, NULL, argv[9]->arg);
 }
@@ -809,8 +781,7 @@ DEFUN (no_ipv6_route_pref_label,
        "IPv6 gateway address\n"
        "IPv6 gateway interface name\n"
        "Distance value for this prefix\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   return static_ipv6_func (vty, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, NULL, argv[5]->arg, NULL, argv[7]->arg);
 }
@@ -827,8 +798,7 @@ DEFUN (no_ipv6_route_pref_tag_label,
        "Set tag for this route\n"
        "Tag value\n"
        "Distance value for this prefix\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   return static_ipv6_func (vty, 0, argv[3]->arg, NULL, argv[4]->arg, NULL, NULL, argv[6]->arg, argv[7]->arg, NULL, argv[9]->arg);
 }
@@ -843,8 +813,7 @@ DEFUN (no_ipv6_route_ifname_pref_label,
        "IPv6 gateway address\n"
        "IPv6 gateway interface name\n"
        "Distance value for this prefix\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   return static_ipv6_func (vty, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, NULL, NULL, argv[6]->arg, NULL, argv[8]->arg);
 }
@@ -861,8 +830,7 @@ DEFUN (no_ipv6_route_ifname_pref_tag_label,
        "Set tag for this route\n"
        "Tag value\n"
        "Distance value for this prefix\n"
-       "Specify label(s) for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   return static_ipv6_func (vty, 0, argv[3]->arg, NULL, argv[4]->arg, argv[5]->arg, NULL, argv[7]->arg, argv[8]->arg, NULL, argv[10]->arg);
 }
index 89707663892121e3d3de1762650fa96be0ba3353..d250942fa54d39dd918a82079ce907e42ec1a7a6 100644 (file)
@@ -435,8 +435,7 @@ DEFUN (ip_route_flags,
        "Tag value\n"
        "Distance value for this route\n"
        VRF_CMD_HELP_STR
-       "Specify labels for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   int idx_ipv4_prefixlen = 2;
   int idx_reject_blackhole = 3;
@@ -469,8 +468,7 @@ DEFUN (ip_route_mask,
        "Tag value\n"
        "Distance value for this route\n"
        VRF_CMD_HELP_STR
-       "Specify labels for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   int idx_ipv4 = 2;
   int idx_ipv4_2 = 3;
@@ -501,8 +499,7 @@ DEFUN (ip_route_mask_flags,
        "Tag value\n"
        "Distance value for this route\n"
        VRF_CMD_HELP_STR
-       "Specify labels for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   int idx_ipv4 = 2;
   int idx_ipv4_2 = 3;
@@ -535,8 +532,7 @@ DEFUN (no_ip_route,
        "Tag value\n"
        "Distance value for this route\n"
        VRF_CMD_HELP_STR
-       "Specify labels for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   int idx_ipv4_prefixlen = 3;
   int idx_ipv4_ifname_null = 4;
@@ -567,8 +563,7 @@ DEFUN (no_ip_route_flags,
        "Tag value\n"
        "Distance value for this route\n"
        VRF_CMD_HELP_STR
-       "Specify labels for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   int idx_ipv4_prefixlen = 3;
   int idx_curr = 5;
@@ -598,8 +593,7 @@ DEFUN (no_ip_route_mask,
        "Tag value\n"
        "Distance value for this route\n"
        VRF_CMD_HELP_STR
-       "Specify labels for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   int idx_ipv4 = 3;
   int idx_ipv4_2 = 4;
@@ -632,8 +626,7 @@ DEFUN (no_ip_route_mask_flags,
        "Tag value\n"
        "Distance value for this route\n"
        VRF_CMD_HELP_STR
-       "Specify labels for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   int idx_ipv4 = 3;
   int idx_ipv4_2 = 4;
@@ -2184,8 +2177,7 @@ DEFUN (ipv6_route,
        "Tag value\n"
        "Distance value for this prefix\n"
        VRF_CMD_HELP_STR
-       "Specify labels for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   int idx_ipv6_prefixlen = 2;
   int idx_ipv6_ifname;
@@ -2233,8 +2225,7 @@ DEFUN (ipv6_route_flags,
        "Tag value\n"
        "Distance value for this prefix\n"
        VRF_CMD_HELP_STR
-       "Specify labels for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   int idx_ipv6_prefixlen = 2;
   int idx_ipv6_ifname;
@@ -2283,8 +2274,7 @@ DEFUN (ipv6_route_ifname,
        "Tag value\n"
        "Distance value for this prefix\n"
        VRF_CMD_HELP_STR
-       "Specify labels for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   int idx_ipv6_prefixlen = 2;
   int idx_ipv6 = 3;
@@ -2335,8 +2325,7 @@ DEFUN (ipv6_route_ifname_flags,
        "Tag value\n"
        "Distance value for this prefix\n"
        VRF_CMD_HELP_STR
-       "Specify labels for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   int idx_ipv6_prefixlen = 2;
   int idx_ipv6;
@@ -2390,8 +2379,7 @@ DEFUN (no_ipv6_route,
        "Tag value\n"
        "Distance value for this prefix\n"
        VRF_CMD_HELP_STR
-       "Specify labels for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   int idx_ipv6_prefixlen = 3;
   int idx_ipv6_ifname;
@@ -2439,8 +2427,7 @@ DEFUN (no_ipv6_route_flags,
        "Tag value\n"
        "Distance value for this prefix\n"
        VRF_CMD_HELP_STR
-       "Specify labels for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   int idx_ipv6_prefixlen = 3;
   int idx_ipv6_ifname;
@@ -2490,8 +2477,7 @@ DEFUN (no_ipv6_route_ifname,
        "Tag value\n"
        "Distance value for this prefix\n"
        VRF_CMD_HELP_STR
-       "Specify labels for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   int idx_ipv6_prefixlen = 3;
   int idx_ipv6;
@@ -2543,8 +2529,7 @@ DEFUN (no_ipv6_route_ifname_flags,
        "Tag value\n"
        "Distance value for this prefix\n"
        VRF_CMD_HELP_STR
-       "Specify labels for this route\n"
-       "One or more labels separated by '/'\n")
+       MPLS_LABEL_HELPSTR)
 {
   int idx_ipv6_prefixlen = 3;
   int idx_ipv6;