]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Convert bgp_policy_type_e to enum
authorDonatas Abraitis <donatas@opensourcerouting.org>
Tue, 12 Apr 2022 08:32:23 +0000 (11:32 +0300)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Tue, 12 Apr 2022 19:13:55 +0000 (22:13 +0300)
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
bgpd/bgp_updgrp.c
bgpd/bgp_updgrp.h
bgpd/bgpd.h

index aa3e44318a21edfd80a9df91ee3dad1a197e5495..e85118e58832290358a649bfa408a1a1fcd827d5 100644 (file)
@@ -1463,7 +1463,7 @@ static int update_group_periodic_merge_walkcb(struct update_group *updgrp,
  *             over multiple statements. Useful to set dirty flag on
  *             update groups.
  */
-void update_group_policy_update(struct bgp *bgp, bgp_policy_type_e ptype,
+void update_group_policy_update(struct bgp *bgp, enum bgp_policy_type ptype,
                                const char *pname, int route_update,
                                int start_event)
 {
index 0e10341bc433777fb418d70a55d0cec7b28ae98d..d269f18b6d9261f1456907cdc456e687639deafc 100644 (file)
@@ -288,7 +288,7 @@ struct updwalk_context {
        struct bgp_path_info *pi;
        uint64_t updgrp_id;
        uint64_t subgrp_id;
-       bgp_policy_type_e policy_type;
+       enum bgp_policy_type policy_type;
        const char *policy_name;
        int policy_event_start_flag;
        int policy_route_update;
@@ -368,7 +368,8 @@ extern void update_subgroup_split_peer(struct peer_af *, struct update_group *);
 extern bool update_subgroup_check_merge(struct update_subgroup *, const char *);
 extern bool update_subgroup_trigger_merge_check(struct update_subgroup *,
                                                int force);
-extern void update_group_policy_update(struct bgp *bgp, bgp_policy_type_e ptype,
+extern void update_group_policy_update(struct bgp *bgp,
+                                      enum bgp_policy_type ptype,
                                       const char *pname, int route_update,
                                       int start_event);
 extern void update_group_af_walk(struct bgp *bgp, afi_t afi, safi_t safi,
index 8e353c176fbfe6b2a7c97256ee2446dfd1f30c80..a98479bf533efda149796e264625e13e3ce568b4 100644 (file)
@@ -1968,12 +1968,12 @@ enum bgp_create_error_code {
 /*
  * Enumeration of different policy kinds a peer can be configured with.
  */
-typedef enum {
+enum bgp_policy_type {
        BGP_POLICY_ROUTE_MAP,
        BGP_POLICY_FILTER_LIST,
        BGP_POLICY_PREFIX_LIST,
        BGP_POLICY_DISTRIBUTE_LIST,
-} bgp_policy_type_e;
+};
 
 /* peer_flag_change_type. */
 enum peer_change_type {