]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_vty.c
*: conform with COMMUNITY.md formatting rules, via 'make indent'
[mirror_frr.git] / bgpd / bgp_vty.c
index 8fa5dc9c6f64e198ac736be06ee1df4fc2706445..3bdd09c3c168399abfc8f942e8d4f2308758ce24 100644 (file)
@@ -832,8 +832,7 @@ DEFUN_NOSH (router_bgp,
                }
 
                if (listcount(bm->bgp) > 1) {
-                       vty_out(vty,
-                               "%% Please specify ASN and VRF\n");
+                       vty_out(vty, "%% Please specify ASN and VRF\n");
                        return CMD_WARNING_CONFIG_FAILED;
                }
        }
@@ -908,8 +907,7 @@ DEFUN (no_router_bgp,
                }
 
                if (listcount(bm->bgp) > 1) {
-                       vty_out(vty,
-                               "%% Please specify ASN and VRF\n");
+                       vty_out(vty, "%% Please specify ASN and VRF\n");
                        return CMD_WARNING_CONFIG_FAILED;
                }
 
@@ -1540,8 +1538,7 @@ DEFUN (no_bgp_maxpaths,
 }
 
 ALIAS_HIDDEN(no_bgp_maxpaths, no_bgp_maxpaths_hidden_cmd,
-            "no maximum-paths [" CMD_RANGE_STR(1, MULTIPATH_NUM) "]",
-            NO_STR
+            "no maximum-paths [" CMD_RANGE_STR(1, MULTIPATH_NUM) "]", NO_STR
             "Forward packets over multiple paths\n"
             "Number of paths\n")
 
@@ -6571,9 +6568,8 @@ DEFUN (show_bgp_vrfs,
 
                json_object_int_add(json, "totalVrfs", count);
 
-               vty_out(vty, "%s\n",
-                       json_object_to_json_string_ext(
-                               json, JSON_C_TO_STRING_PRETTY));
+               vty_out(vty, "%s\n", json_object_to_json_string_ext(
+                                            json, JSON_C_TO_STRING_PRETTY));
                json_object_free(json);
        } else {
                if (count)
@@ -6722,20 +6718,17 @@ DEFUN (show_bgp_memory,
        /* Other attributes */
        if ((count = community_count()))
                vty_out(vty, "%ld BGP community entries, using %s of memory\n",
-                       count,
-                       mtype_memstr(memstrbuf, sizeof(memstrbuf),
-                                    count * sizeof(struct community)));
+                       count, mtype_memstr(memstrbuf, sizeof(memstrbuf),
+                                           count * sizeof(struct community)));
        if ((count = mtype_stats_alloc(MTYPE_ECOMMUNITY)))
                vty_out(vty, "%ld BGP community entries, using %s of memory\n",
-                       count,
-                       mtype_memstr(memstrbuf, sizeof(memstrbuf),
-                                    count * sizeof(struct ecommunity)));
+                       count, mtype_memstr(memstrbuf, sizeof(memstrbuf),
+                                           count * sizeof(struct ecommunity)));
        if ((count = mtype_stats_alloc(MTYPE_LCOMMUNITY)))
                vty_out(vty,
                        "%ld BGP large-community entries, using %s of memory\n",
-                       count,
-                       mtype_memstr(memstrbuf, sizeof(memstrbuf),
-                                    count * sizeof(struct lcommunity)));
+                       count, mtype_memstr(memstrbuf, sizeof(memstrbuf),
+                                           count * sizeof(struct lcommunity)));
 
        if ((count = mtype_stats_alloc(MTYPE_CLUSTER)))
                vty_out(vty, "%ld Cluster lists, using %s of memory\n", count,
@@ -6764,9 +6757,8 @@ DEFUN (show_bgp_memory,
                                     count * sizeof(struct hash_backet)));
        if ((count = mtype_stats_alloc(MTYPE_BGP_REGEXP)))
                vty_out(vty, "%ld compiled regexes, using %s of memory\n",
-                       count,
-                       mtype_memstr(memstrbuf, sizeof(memstrbuf),
-                                    count * sizeof(regex_t)));
+                       count, mtype_memstr(memstrbuf, sizeof(memstrbuf),
+                                           count * sizeof(regex_t)));
        return CMD_SUCCESS;
 }
 
@@ -7018,9 +7010,8 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi,
                                                json, "peerGroupCount", ents);
                                        json_object_int_add(
                                                json, "peerGroupMemory",
-                                               ents
-                                                       * sizeof(struct
-                                                                peer_group));
+                                               ents * sizeof(struct
+                                                             peer_group));
                                }
 
                                if (CHECK_FLAG(bgp->af_flags[afi][safi],
@@ -7043,11 +7034,10 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi,
                                vty_out(vty,
                                        "RIB entries %ld, using %s of memory\n",
                                        ents,
-                                       mtype_memstr(
-                                               memstrbuf, sizeof(memstrbuf),
-                                               ents
-                                                       * sizeof(struct
-                                                                bgp_node)));
+                                       mtype_memstr(memstrbuf,
+                                                    sizeof(memstrbuf),
+                                                    ents * sizeof(struct
+                                                                  bgp_node)));
 
                                /* Peer related usage */
                                ents = listcount(bgp->peer);
@@ -7064,9 +7054,8 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi,
                                                mtype_memstr(
                                                        memstrbuf,
                                                        sizeof(memstrbuf),
-                                                       ents
-                                                               * sizeof(struct
-                                                                        peer_group)));
+                                                       ents * sizeof(struct
+                                                                     peer_group)));
 
                                if (CHECK_FLAG(bgp->af_flags[afi][safi],
                                               BGP_CONFIG_DAMPENING))
@@ -7199,9 +7188,8 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi,
 
                bgp_show_bestpath_json(bgp, json);
 
-               vty_out(vty, "%s\n",
-                       json_object_to_json_string_ext(
-                               json, JSON_C_TO_STRING_PRETTY));
+               vty_out(vty, "%s\n", json_object_to_json_string_ext(
+                                            json, JSON_C_TO_STRING_PRETTY));
                json_object_free(json);
        } else {
                if (count)
@@ -7836,9 +7824,8 @@ static void bgp_show_peer_afi(struct vty *vty, struct peer *p, afi_t afi,
 
                paf = peer_af_find(p, afi, safi);
                if (paf && PAF_SUBGRP(paf)) {
-                       vty_out(vty,
-                               "  Update group %" PRIu64 ", subgroup %" PRIu64
-                               "\n",
+                       vty_out(vty, "  Update group %" PRIu64
+                                    ", subgroup %" PRIu64 "\n",
                                PAF_UPDGRP(paf)->id, PAF_SUBGRP(paf)->id);
                        vty_out(vty, "  Packet Queue length %d\n",
                                bpacket_queue_virtual_length(paf));
@@ -9638,9 +9625,8 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, u_char use_json,
                        } else
                                vty_out(vty,
                                        "  Reduce the no. of prefix from %s, will restart in %ld seconds\n",
-                                       p->host,
-                                       thread_timer_remain_second(
-                                               p->t_pmax_restart));
+                                       p->host, thread_timer_remain_second(
+                                                        p->t_pmax_restart));
                } else {
                        if (use_json)
                                json_object_boolean_true_add(
@@ -9884,9 +9870,8 @@ static int bgp_show_neighbor(struct vty *vty, struct bgp *bgp,
        }
 
        if (use_json) {
-               vty_out(vty, "%s\n",
-                       json_object_to_json_string_ext(
-                               json, JSON_C_TO_STRING_PRETTY));
+               vty_out(vty, "%s\n", json_object_to_json_string_ext(
+                                            json, JSON_C_TO_STRING_PRETTY));
                json_object_free(json);
        } else {
                vty_out(vty, "\n");