]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Convert bpacket_attr_vec_type to enum
authorDonatas Abraitis <donatas@opensourcerouting.org>
Tue, 12 Apr 2022 08:42:27 +0000 (11:42 +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.h
bgpd/bgp_updgrp_packet.c

index d269f18b6d9261f1456907cdc456e687639deafc..a1560b093b2c89e0fff62f89135e851af0325da3 100644 (file)
         | PEER_CAP_ADDPATH_AF_TX_ADV | PEER_CAP_ADDPATH_AF_RX_RCV             \
         | PEER_CAP_ENHE_AF_NEGO)
 
-typedef enum { BGP_ATTR_VEC_NH = 0, BGP_ATTR_VEC_MAX } bpacket_attr_vec_type;
+enum bpacket_attr_vec_type {
+       BGP_ATTR_VEC_NH = 0,
+       BGP_ATTR_VEC_MAX
+};
 
 typedef struct {
        uint32_t flags;
@@ -410,7 +413,7 @@ extern struct stream *bpacket_reformat_for_peer(struct bpacket *pkt,
                                                struct peer_af *paf);
 extern void bpacket_attr_vec_arr_reset(struct bpacket_attr_vec_arr *vecarr);
 extern void bpacket_attr_vec_arr_set_vec(struct bpacket_attr_vec_arr *vecarr,
-                                        bpacket_attr_vec_type type,
+                                        enum bpacket_attr_vec_type type,
                                         struct stream *s, struct attr *attr);
 extern void subgroup_default_update_packet(struct update_subgroup *subgrp,
                                           struct attr *attr,
index cf24e1d6898137bb144c9462cfc7ac024656cace..c4a3ca75003d1a0ffc68ee7cf37be75aee227e80 100644 (file)
@@ -1240,7 +1240,7 @@ void subgroup_default_withdraw_packet(struct update_subgroup *subgrp)
 
 static void
 bpacket_vec_arr_inherit_attr_flags(struct bpacket_attr_vec_arr *vecarr,
-                                  bpacket_attr_vec_type type,
+                                  enum bpacket_attr_vec_type type,
                                   struct attr *attr)
 {
        if (CHECK_FLAG(attr->rmap_change_flags,
@@ -1291,8 +1291,8 @@ void bpacket_attr_vec_arr_reset(struct bpacket_attr_vec_arr *vecarr)
 
 /* Setup a particular node entry in the vecarr */
 void bpacket_attr_vec_arr_set_vec(struct bpacket_attr_vec_arr *vecarr,
-                                 bpacket_attr_vec_type type, struct stream *s,
-                                 struct attr *attr)
+                                 enum bpacket_attr_vec_type type,
+                                 struct stream *s, struct attr *attr)
 {
        if (!vecarr)
                return;