summaryrefslogtreecommitdiff
path: root/nest/iface.h
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1999-03-02 17:28:06 +0000
committerMartin Mares <mj@ucw.cz>1999-03-02 17:28:06 +0000
commitbcbd8cc3be670a96e1405b896cff4be0912ba379 (patch)
tree6cce0add45cddca117b0b34278f732482245e10d /nest/iface.h
parent25287d6f7e687c77704816e565529960c65e3250 (diff)
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.
Diffstat (limited to 'nest/iface.h')
-rw-r--r--nest/iface.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/nest/iface.h b/nest/iface.h
index 378cf3d1..fcad7187 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 */