bgpd: Convert bpacket_attr_vec_type to enum

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
Donatas Abraitis 2022-04-12 11:42:27 +03:00
parent 79288e4c12
commit e8e36ff315
2 changed files with 8 additions and 5 deletions

View File

@ -74,7 +74,10 @@
| 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,

View 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;