diff options
author | Neale Ranns <neale@graphiant.com> | 2022-08-05 03:40:43 +0000 |
---|---|---|
committer | Neale Ranns <neale@graphiant.com> | 2022-08-10 00:16:35 +0000 |
commit | 0c50dbb7679039b02d4057fc6c45c87d96f8e7aa (patch) | |
tree | 994e4ca5b547612036e7fbad1ef05bc010dd1de6 /src/vnet/bfd/bfd_main.h | |
parent | fee9853a4f5d9a180ef6309cc37bd4060d27a51e (diff) |
bfd: More descriptive error codes during packet receive handling
Type: improvement
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I8907fecde6d48f5362f0f91372d5a9a1bba6f931
Diffstat (limited to 'src/vnet/bfd/bfd_main.h')
-rw-r--r-- | src/vnet/bfd/bfd_main.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/vnet/bfd/bfd_main.h b/src/vnet/bfd/bfd_main.h index 2d91e68c557..4fc4ef81260 100644 --- a/src/vnet/bfd/bfd_main.h +++ b/src/vnet/bfd/bfd_main.h @@ -332,10 +332,17 @@ typedef struct extern bfd_main_t bfd_main; /** Packet counters */ -#define foreach_bfd_error(F) \ - F (NONE, "good bfd packets (processed)") \ - F (BAD, "invalid bfd packets") \ - F (DISABLED, "bfd packets received on disabled interfaces") +#define foreach_bfd_error(F) \ + F (NONE, "good bfd packets (processed)") \ + F (BAD, "invalid bfd packets") \ + F (DISABLED, "bfd packets received on disabled interfaces") \ + F (VERSION, "version") \ + F (LENGTH, "length") \ + F (DETECT_MULTI, "detect-multi") \ + F (MULTI_POINT, "multi-point") \ + F (MY_DISC, "my-disc") \ + F (YOUR_DISC, "your-disc") \ + F (ADMIN_DOWN, "session admin-down") typedef enum { @@ -418,11 +425,11 @@ bfd_session_t *bfd_find_session_by_idx (bfd_main_t * bm, uword bs_idx); bfd_session_t *bfd_find_session_by_disc (bfd_main_t * bm, u32 disc); void bfd_session_start (bfd_main_t * bm, bfd_session_t * bs); void bfd_session_stop (bfd_main_t *bm, bfd_session_t *bs); -void bfd_consume_pkt (vlib_main_t * vm, bfd_main_t * bm, - const bfd_pkt_t * bfd, u32 bs_idx); +bfd_error_t bfd_consume_pkt (vlib_main_t *vm, bfd_main_t *bm, + const bfd_pkt_t *bfd, u32 bs_idx); bfd_session_t *bfd_consume_echo_pkt (vlib_main_t *vm, bfd_main_t *bm, vlib_buffer_t *b); -int bfd_verify_pkt_common (const bfd_pkt_t * pkt); +bfd_error_t bfd_verify_pkt_common (const bfd_pkt_t *pkt); int bfd_verify_pkt_auth (vlib_main_t * vm, const bfd_pkt_t * pkt, u16 pkt_size, bfd_session_t * bs); void bfd_event (bfd_main_t * bm, bfd_session_t * bs); |