]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: move bgp_show_type enumerate to bgp_route.h
authorPhilippe Guibert <philippe.guibert@6wind.com>
Fri, 20 Jan 2017 10:44:18 +0000 (11:44 +0100)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 24 Jan 2017 15:18:55 +0000 (16:18 +0100)
This bgp_show_type enumerate was duplicated and modified in several
places. The commit takes the enumerate with the biggest enumerate, so
that it can be used by all the functions using this enumerate.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
bgpd/bgp_encap.c
bgpd/bgp_main.c
bgpd/bgp_mplsvpn.c
bgpd/bgp_route.c
bgpd/bgp_route.h
bgpd/rfapi/rfapi_vty.c
bgpd/rfapi/vnc_import_bgp.c

index fe08dbf9910641dc88a15ac04db7da33898a1f1d..201f7bde0610414d8d7db4a9f40b89c49a95bee8 100644 (file)
@@ -332,22 +332,6 @@ show_adj_route_encap (struct vty *vty, struct peer *peer, struct prefix_rd *prd)
   return CMD_SUCCESS;
 }
 
-enum bgp_show_type
-{
-  bgp_show_type_normal,
-  bgp_show_type_regexp,
-  bgp_show_type_prefix_list,
-  bgp_show_type_filter_list,
-  bgp_show_type_neighbor,
-  bgp_show_type_cidr_only,
-  bgp_show_type_prefix_longer,
-  bgp_show_type_community_all,
-  bgp_show_type_community,
-  bgp_show_type_community_exact,
-  bgp_show_type_community_list,
-  bgp_show_type_community_list_exact
-};
-
 int
 bgp_show_encap (
     struct vty *vty,
index 33191f0a982bbcde6c66e92df28c782189ca1f89..23514dece4facd11f57cd6680d5484b9e566f5c5 100644 (file)
@@ -43,6 +43,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
 #include "bgpd/bgpd.h"
 #include "bgpd/bgp_attr.h"
+#include "bgpd/bgp_route.h"
 #include "bgpd/bgp_mplsvpn.h"
 #include "bgpd/bgp_aspath.h"
 #include "bgpd/bgp_dump.h"
index 51f2984a4ec4050fe2f68b1a937333d2560679fb..7a2717acc085320086bd3d6884d69c02bed007da 100644 (file)
@@ -733,22 +733,6 @@ show_adj_route_vpn (struct vty *vty, struct peer *peer, struct prefix_rd *prd, u
   return CMD_SUCCESS;
 }
 
-enum bgp_show_type
-{
-  bgp_show_type_normal,
-  bgp_show_type_regexp,
-  bgp_show_type_prefix_list,
-  bgp_show_type_filter_list,
-  bgp_show_type_neighbor,
-  bgp_show_type_cidr_only,
-  bgp_show_type_prefix_longer,
-  bgp_show_type_community_all,
-  bgp_show_type_community,
-  bgp_show_type_community_exact,
-  bgp_show_type_community_list,
-  bgp_show_type_community_list_exact
-};
-
 int
 bgp_show_mpls_vpn (struct vty *vty, afi_t afi, struct prefix_rd *prd,
                   enum bgp_show_type type, void *output_arg, int tags, u_char use_json)
index c462d1ee162cbb44504923148a3d390be01648e9..f9cdc1a0dbfa5540e11e7f7e878dda2fbb1f386d 100644 (file)
@@ -7214,27 +7214,6 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p,
 #define BGP_SHOW_DAMP_HEADER "   Network          From             Reuse    Path%s"
 #define BGP_SHOW_FLAP_HEADER "   Network          From            Flaps Duration Reuse    Path%s"
 
-enum bgp_show_type
-{
-  bgp_show_type_normal,
-  bgp_show_type_regexp,
-  bgp_show_type_prefix_list,
-  bgp_show_type_filter_list,
-  bgp_show_type_route_map,
-  bgp_show_type_neighbor,
-  bgp_show_type_cidr_only,
-  bgp_show_type_prefix_longer,
-  bgp_show_type_community_all,
-  bgp_show_type_community,
-  bgp_show_type_community_exact,
-  bgp_show_type_community_list,
-  bgp_show_type_community_list_exact,
-  bgp_show_type_flap_statistics,
-  bgp_show_type_flap_neighbor,
-  bgp_show_type_dampend_paths,
-  bgp_show_type_damp_neighbor
-};
-
 static int
 bgp_show_prefix_list (struct vty *vty, const char *name,
                       const char *prefix_list_str, afi_t afi,
index 3c7aa83a0e4da84276c201ad8c79a54c796cec24..f2e6273b84f73fd622804604666291940bde720f 100644 (file)
@@ -26,6 +26,28 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
 struct bgp_nexthop_cache;
 
+enum bgp_show_type
+{
+  bgp_show_type_normal,
+  bgp_show_type_regexp,
+  bgp_show_type_prefix_list,
+  bgp_show_type_filter_list,
+  bgp_show_type_route_map,
+  bgp_show_type_neighbor,
+  bgp_show_type_cidr_only,
+  bgp_show_type_prefix_longer,
+  bgp_show_type_community_all,
+  bgp_show_type_community,
+  bgp_show_type_community_exact,
+  bgp_show_type_community_list,
+  bgp_show_type_community_list_exact,
+  bgp_show_type_flap_statistics,
+  bgp_show_type_flap_neighbor,
+  bgp_show_type_dampend_paths,
+  bgp_show_type_damp_neighbor
+};
+
+
 #define BGP_SHOW_SCODE_HEADER "Status codes: s suppressed, d damped, "\
                               "h history, * valid, > best, = multipath,%s"\
                 "              i internal, r RIB-failure, S Stale, R Removed%s"
index 3e179b7f7283241e2f625212144c4dd7f6e5123c..1e7941a41db644b3558a6678675f02fb2b3bbfc7 100644 (file)
@@ -35,6 +35,7 @@
 #include "bgpd/bgpd.h"
 #include "bgpd/bgp_ecommunity.h"
 #include "bgpd/bgp_attr.h"
+#include "bgpd/bgp_route.h"
 #include "bgpd/bgp_mplsvpn.h"
 
 #include "bgpd/rfapi/bgp_rfapi_cfg.h"
index 4801e2906accd4a9fa0a88b84f53e3f156b9602d..62c31a662ad0418f43d13a0231fb198d6e734bd0 100644 (file)
@@ -37,6 +37,7 @@
 #include "bgpd/bgpd.h"
 #include "bgpd/bgp_ecommunity.h"
 #include "bgpd/bgp_attr.h"
+#include "bgpd/bgp_route.h"
 #include "bgpd/bgp_mplsvpn.h"        /* for RD_TYPE_IP */
 
 #include "bgpd/rfapi/vnc_export_bgp.h"