]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/zebra_mpls_vty.c
Merge pull request #5793 from ton31337/fix/formatting_show_bgp_summary_failed
[mirror_frr.git] / zebra / zebra_mpls_vty.c
index 9d100bb7d0b3a1f560925a5e7f6992c1b7d85129..796aa3f6661044de1f364883fe8386851a9057f3 100644 (file)
@@ -37,7 +37,6 @@
 #include "zebra/zebra_rnh.h"
 #include "zebra/redistribute.h"
 #include "zebra/zebra_routemap.h"
-#include "zebra/zebra_static.h"
 
 static int zebra_mpls_transit_lsp(struct vty *vty, int add_cmd,
                                  const char *inlabel_str, const char *gate_str,
@@ -68,7 +67,7 @@ static int zebra_mpls_transit_lsp(struct vty *vty, int add_cmd,
                return CMD_WARNING_CONFIG_FAILED;
        }
 
-       out_label = MPLS_IMP_NULL_LABEL; /* as initialization */
+       out_label = MPLS_LABEL_IMPLICIT_NULL; /* as initialization */
        label = atoi(inlabel_str);
        if (!IS_MPLS_UNRESERVED_LABEL(label)) {
                vty_out(vty, "%% Invalid label\n");
@@ -107,11 +106,11 @@ static int zebra_mpls_transit_lsp(struct vty *vty, int add_cmd,
 
        if (outlabel_str) {
                if (outlabel_str[0] == 'i')
-                       out_label = MPLS_IMP_NULL_LABEL;
+                       out_label = MPLS_LABEL_IMPLICIT_NULL;
                else if (outlabel_str[0] == 'e' && gtype == NEXTHOP_TYPE_IPV4)
-                       out_label = MPLS_V4_EXP_NULL_LABEL;
+                       out_label = MPLS_LABEL_IPV4_EXPLICIT_NULL;
                else if (outlabel_str[0] == 'e' && gtype == NEXTHOP_TYPE_IPV6)
-                       out_label = MPLS_V6_EXP_NULL_LABEL;
+                       out_label = MPLS_LABEL_IPV6_EXPLICIT_NULL;
                else
                        out_label = atoi(outlabel_str);
        }
@@ -198,7 +197,7 @@ static int zebra_mpls_bind(struct vty *vty, int add_cmd, const char *prefix,
 {
        struct zebra_vrf *zvrf;
        struct prefix p;
-       u_int32_t label;
+       uint32_t label;
        int ret;
 
        zvrf = vrf_info_lookup(VRF_DEFAULT);
@@ -221,12 +220,12 @@ static int zebra_mpls_bind(struct vty *vty, int add_cmd, const char *prefix,
                }
 
                if (!strcmp(label_str, "implicit-null"))
-                       label = MPLS_IMP_NULL_LABEL;
+                       label = MPLS_LABEL_IMPLICIT_NULL;
                else if (!strcmp(label_str, "explicit-null")) {
                        if (p.family == AF_INET)
-                               label = MPLS_V4_EXP_NULL_LABEL;
+                               label = MPLS_LABEL_IPV4_EXPLICIT_NULL;
                        else
-                               label = MPLS_V6_EXP_NULL_LABEL;
+                               label = MPLS_LABEL_IPV6_EXPLICIT_NULL;
                } else {
                        label = atoi(label_str);
                        if (!IS_MPLS_UNRESERVED_LABEL(label)) {
@@ -340,7 +339,7 @@ DEFUN (show_mpls_table,
        JSON_STR)
 {
        struct zebra_vrf *zvrf;
-       u_char uj = use_json(argc, argv);
+       bool uj = use_json(argc, argv);
 
        zvrf = vrf_info_lookup(VRF_DEFAULT);
        zebra_mpls_print_lsp_table(vty, zvrf, uj);
@@ -356,9 +355,9 @@ DEFUN (show_mpls_table_lsp,
        "LSP to display information about\n"
        JSON_STR)
 {
-       u_int32_t label;
+       uint32_t label;
        struct zebra_vrf *zvrf;
-       u_char uj = use_json(argc, argv);
+       bool uj = use_json(argc, argv);
 
        zvrf = vrf_info_lookup(VRF_DEFAULT);
        label = atoi(argv[3]->arg);
@@ -384,8 +383,8 @@ static int zebra_mpls_global_block(struct vty *vty, int add_cmd,
                                   const char *end_label_str)
 {
        int ret;
-       u_int32_t start_label;
-       u_int32_t end_label;
+       uint32_t start_label;
+       uint32_t end_label;
        struct zebra_vrf *zvrf;
 
        zvrf = zebra_vrf_lookup_by_id(VRF_DEFAULT);