diff options
author | paul <paul> | 2002-12-13 21:03:13 +0000 |
---|---|---|
committer | paul <paul> | 2002-12-13 21:03:13 +0000 |
commit | 2e3b2e474ed5ba04744b167132a84f9954485af4 (patch) | |
tree | cc07fb34a1bf21ead5cc3ad69e4a9dfde2b43b0e /lib/if.c | |
parent | 7afa08da2d3690baee1739da400775f8543f5863 (diff) |
zebra link state detection support
Diffstat (limited to 'lib/if.c')
-rw-r--r-- | lib/if.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -270,6 +270,22 @@ if_is_up (struct interface *ifp) return ifp->flags & IFF_UP; } +/* Is interface running? */ +int +if_is_running (struct interface *ifp) +{ + return ifp->flags & IFF_RUNNING; +} + +/* Is the interface operative, eg. either UP & RUNNING + or UP & !ZEBRA_INTERFACE_LINK_DETECTION */ +int +if_is_operative (struct interface *ifp) +{ + return ((ifp->flags & IFF_UP) && + (ifp->flags & IFF_RUNNING || !CHECK_FLAG(ifp->status, ZEBRA_INTERFACE_LINKDETECTION))); +} + /* Is this loopback interface ? */ int if_is_loopback (struct interface *ifp) |