Skip to content

Commit

Permalink
bgpd: moved bmp_state_str to bgp_bmp.c
Browse files Browse the repository at this point in the history
moved bmp_state_str to bgp_bmp.c to suppress build warnings

Signed-off-by: Maxence Younsi <[email protected]>
  • Loading branch information
mxyns committed Nov 16, 2023
1 parent 9dbf379 commit 5cb36cd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
21 changes: 18 additions & 3 deletions bgpd/bgp_bmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,21 @@ static uint32_t bmp_time_since_startup(struct timeval *delay)
return micros / 1000;
}

static const char *bmp_state_str(enum BMP_State state)
{
switch (state) {

case BMP_StartupIdle:
return "Startup-Wait";
case BMP_PeerUp:
return "Peer-Up";
case BMP_Run:
return "Running";
default:
return "Unknown";
}
}

static int bmp_bgp_cmp(const struct bmp_bgp *a, const struct bmp_bgp *b)
{
if (a->bgp < b->bgp)
Expand Down Expand Up @@ -1843,8 +1858,8 @@ static bool bmp_wrqueue_ribout(struct bmp *bmp, struct pullwr *pullwr)

struct prefix_rd *prd = is_vpn ? &bqe->rd : NULL;

bn = bgp_afi_node_lookup(bmp->targets->bgp->rib[afi][safi], afi, safi,
&bqe->p, prd);
bn = bgp_safi_node_lookup(bmp->targets->bgp->rib[afi][safi], safi,
&bqe->p, prd);

if (CHECK_FLAG(bmp->targets->afimon[afi][safi],
BMP_MON_OUT_PREPOLICY) &&
Expand Down Expand Up @@ -2102,7 +2117,7 @@ static void bmp_stats(struct event *thread)
struct timeval tv;
afi_t afi;
safi_t safi;
int afid;

uint64_t af_stat[AFI_MAX][SAFI_MAX];
struct update_subgroup *subgrp;

Expand Down
15 changes: 0 additions & 15 deletions bgpd/bgp_bmp.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,6 @@ enum BMP_State {
BMP_Run,
};

static const char *bmp_state_str(enum BMP_State state)
{
switch (state) {

case BMP_StartupIdle:
return "Startup-Wait";
case BMP_PeerUp:
return "Peer-Up";
case BMP_Run:
return "Running";
default:
return "Unknown";
}
}

/* This one is for BMP Route Monitoring messages, i.e. delivering updates
* in somewhat processed (as opposed to fully raw, see mirroring below) form.
* RFC explicitly says that we can skip old updates if we haven't sent them out
Expand Down

0 comments on commit 5cb36cd

Please sign in to comment.