diff options
| author | Daniel Walton <dwalton@cumulusnetworks.com> | 2017-06-30 17:52:56 +0000 |
|---|---|---|
| committer | Daniel Walton <dwalton@cumulusnetworks.com> | 2017-06-30 17:52:56 +0000 |
| commit | 1161690b93b48fbd07f4ee25c1261574db8d71c5 (patch) | |
| tree | 7ffbe5c3b333b1fe0b8a3f042d8b1af602d48019 /ospfd/ospf_interface.h | |
| parent | ab782c96f881b1fdd59f52ba972cd82b5eeadc66 (diff) | |
| parent | 5fca4e3635c2778e8349bce0eaf944c26913d321 (diff) | |
Merge branch 'master' of https://github.com/dwalton76/frr into bgpd-ipv4-plus-label-misc3
Conflicts:
bgpd/bgp_route.c
Diffstat (limited to 'ospfd/ospf_interface.h')
| -rw-r--r-- | ospfd/ospf_interface.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ospfd/ospf_interface.h b/ospfd/ospf_interface.h index 8455d217e0..afb2820109 100644 --- a/ospfd/ospf_interface.h +++ b/ospfd/ospf_interface.h @@ -31,8 +31,17 @@ #define IF_DEF_PARAMS(I) (IF_OSPF_IF_INFO (I)->def_params) #define IF_OIFS(I) (IF_OSPF_IF_INFO (I)->oifs) #define IF_OIFS_PARAMS(I) (IF_OSPF_IF_INFO (I)->params) - + +/* Despite the name, this macro probably is for specialist use only */ #define OSPF_IF_PARAM_CONFIGURED(S, P) ((S) && (S)->P##__config) + +/* Test whether an OSPF interface parameter is set, generally, given some + * existing ospf interface + */ +#define OSPF_IF_PARAM_IS_SET(O,P) \ + (OSPF_IF_PARAM_CONFIGURED ((O)->params, P) || \ + OSPF_IF_PARAM_CONFIGURED(IF_DEF_PARAMS((O)->ifp)->P)) + #define OSPF_IF_PARAM(O, P) \ (OSPF_IF_PARAM_CONFIGURED ((O)->params, P)?\ (O)->params->P:IF_DEF_PARAMS((O)->ifp)->P) |
