diff options
author | Christian Franke <chris@opensourcerouting.org> | 2018-09-20 15:09:43 +0200 |
---|---|---|
committer | Christian Franke <chris@opensourcerouting.org> | 2018-10-05 14:04:15 +0200 |
commit | 4943f243b5cec95fe39374ba2b07f7d6a628a94d (patch) | |
tree | 00c347307c22cfaae746db35bc002c20e60456cb /zebra/zebra_ptm.h | |
parent | Merge pull request #3098 from opensourcerouting/watchfrr-delay (diff) | |
download | frr-4943f243b5cec95fe39374ba2b07f7d6a628a94d.tar.xz frr-4943f243b5cec95fe39374ba2b07f7d6a628a94d.zip |
zebra_ptm: Introduce IS_BFD_ENABLED_PROTOCOL macro
Unify the check if a client supports BFD into one location.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Diffstat (limited to 'zebra/zebra_ptm.h')
-rw-r--r-- | zebra/zebra_ptm.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/zebra/zebra_ptm.h b/zebra/zebra_ptm.h index ada4f7b4f..c26d87534 100644 --- a/zebra/zebra_ptm.h +++ b/zebra/zebra_ptm.h @@ -59,6 +59,13 @@ struct zebra_ptm_cb { #define ZEBRA_IF_PTM_ENABLE_ON 1 #define ZEBRA_IF_PTM_ENABLE_UNSPEC 2 +#define IS_BFD_ENABLED_PROTOCOL(protocol) ( \ + (protocol) == ZEBRA_ROUTE_BGP || \ + (protocol) == ZEBRA_ROUTE_OSPF || \ + (protocol) == ZEBRA_ROUTE_OSPF6 || \ + (protocol) == ZEBRA_ROUTE_PIM \ +) + void zebra_ptm_init(void); void zebra_ptm_finish(void); int zebra_ptm_connect(struct thread *t); |