From bcbd8cc3be670a96e1405b896cff4be0912ba379 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Tue, 2 Mar 1999 17:28:06 +0000 Subject: Interface logic changes: o Introduced IF_LINK_UP flag corresponding to real link state. o Allowed addressless interfaces. o IF_UP is now automatically calculated and set iff the interface is administratively up, has link up and has an IP address assigned. It may be IF_IGNORED, though (as in case of the loopback). o Any changes which include up/down transition are considered small enough to not provoke artificial upping and downing of the interface. o When an interface disappears (i.e., it wasn't seen in the last scan), we announce this change only once. o IF_LOOPBACK implies IF_IGNORE. --- nest/iface.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'nest/iface.h') diff --git a/nest/iface.h b/nest/iface.h index 378cf3d..fcad718 100644 --- a/nest/iface.h +++ b/nest/iface.h @@ -21,7 +21,7 @@ struct iface { unsigned flags; unsigned mtu; unsigned index; /* OS-dependent interface index */ - ip_addr ip; /* IP address of this host */ + ip_addr ip; /* IP address of this host (0=unset) */ ip_addr prefix; /* Network prefix */ unsigned pxlen; /* Prefix length */ ip_addr brd; /* Broadcast address */ @@ -29,7 +29,7 @@ struct iface { struct neighbor *neigh; /* List of neighbors on this interface */ }; -#define IF_UP 1 +#define IF_UP 1 /* IF_LINK_UP, not IF_IGNORE and IP address known */ #define IF_MULTIACCESS 2 #define IF_UNNUMBERED 4 #define IF_BROADCAST 8 @@ -38,7 +38,8 @@ struct iface { #define IF_ADMIN_DOWN 64 #define IF_LOOPBACK 128 #define IF_IGNORE 256 -#define IF_UPDATED 0x1000 /* Touched in last scan */ +#define IF_LINK_UP 512 +#define IF_UPDATED 0x40000000 /* Touched in last scan */ /* Interface change events */ -- cgit v1.2.3