summaryrefslogtreecommitdiffstats
path: root/lib/if.c
diff options
context:
space:
mode:
authorpaul <paul>2004-12-21 23:34:58 +0100
committerpaul <paul>2004-12-21 23:34:58 +0100
commit4ba9b9247222a6031a8060ddd39bfb19d90624e8 (patch)
tree4a738bb9239bd171135e61e81d17df833c07fd66 /lib/if.c
parentFix "show ipv6 route <proto>" command. (diff)
downloadfrr-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.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/if.c b/lib/if.c
index 5519b2ae4..c7ced18ef 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -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);