diff options
author | paul <paul> | 2004-12-21 23:34:58 +0100 |
---|---|---|
committer | paul <paul> | 2004-12-21 23:34:58 +0100 |
commit | 4ba9b9247222a6031a8060ddd39bfb19d90624e8 (patch) | |
tree | 4a738bb9239bd171135e61e81d17df833c07fd66 /lib/if.c | |
parent | Fix "show ipv6 route <proto>" command. (diff) | |
download | frr-4ba9b9247222a6031a8060ddd39bfb19d90624e8.tar.xz frr-4ba9b9247222a6031a8060ddd39bfb19d90624e8.zip |
2004-12-21 Paul Jakma <paul.jakma@sun.com>
* if.h: Add more 'non-generic' IFF_ flags.
* if.c: IFF_NOXMIT/IFF_VIRTUAL interfaces are 'loopback like'
Diffstat (limited to 'lib/if.c')
-rw-r--r-- | lib/if.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -344,7 +344,10 @@ if_is_operative (struct interface *ifp) int if_is_loopback (struct interface *ifp) { - return ifp->flags & IFF_LOOPBACK; + /* XXX: Do this better, eg what if IFF_WHATEVER means X on platform M + * but Y on platform N? + */ + return (ifp->flags & (IFF_LOOPBACK|IFF_NOXMIT|IFF_VIRTUAL)); } /* Does this interface support broadcast ? */ @@ -376,7 +379,7 @@ if_flag_dump (unsigned long flag) static char logbuf[BUFSIZ]; #define IFF_OUT_LOG(X,STR) \ - if ((X) && (flag & (X))) \ + if (flag & (X)) \ { \ if (separator) \ strlcat (logbuf, ",", BUFSIZ); \ @@ -402,10 +405,11 @@ if_flag_dump (unsigned long flag) IFF_OUT_LOG (IFF_LINK1, "LINK1"); IFF_OUT_LOG (IFF_LINK2, "LINK2"); IFF_OUT_LOG (IFF_MULTICAST, "MULTICAST"); -#ifdef SOLARIS_IPV6 - IFF_OUT_LOG (IFF_IPV4, "IFF_IPv4"); - IFF_OUT_LOG (IFF_IPV6, "IFF_IPv6"); -#endif /* SOLARIS_IPV6 */ + IFF_OUT_LOG (IFF_NOXMIT, "NOXMIT"); + IFF_OUT_LOG (IFF_NORTEXCH, "NORTEXCH"); + IFF_OUT_LOG (IFF_VIRTUAL, "VIRTUAL"); + IFF_OUT_LOG (IFF_IPV4, "IPv4"); + IFF_OUT_LOG (IFF_IPV6, "IPv6"); strlcat (logbuf, ">", BUFSIZ); |