summaryrefslogtreecommitdiff
path: root/nest/iface.h
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1998-05-26 21:42:05 +0000
committerMartin Mares <mj@ucw.cz>1998-05-26 21:42:05 +0000
commit8a48ecb8b15e827f779d4b9fb080dff280b99872 (patch)
tree539024c093f36859ca9c9fae37add38ac9731feb /nest/iface.h
parentb1487ee909ebd4cfc59f30d3678cb6667d4a72c8 (diff)
Implemented scanning of network interfaces. Mostly very ugly code due to
terrible kernel interface (SIOGIFCONF and friends).
Diffstat (limited to 'nest/iface.h')
-rw-r--r--nest/iface.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/nest/iface.h b/nest/iface.h
index 454c0501..4df98739 100644
--- a/nest/iface.h
+++ b/nest/iface.h
@@ -11,9 +11,11 @@
#include "lib/lists.h"
+extern list iface_list;
+
struct iface {
node n;
- char *name;
+ char name[16];
unsigned flags;
unsigned mtu;
struct ifa *ifa; /* First address is primary */
@@ -26,6 +28,10 @@ struct iface {
#define IF_BROADCAST 8
#define IF_MULTICAST 16
#define IF_TUNNEL 32
+#define IF_ADMIN_DOWN 64
+#define IF_LOOPBACK 128
+#define IF_IGNORE 256
+#define IF_UPDATED 0x1000 /* Touched in last scan */
/* Interface address */
@@ -39,4 +45,18 @@ struct ifa {
struct neighbor *neigh; /* List of neighbors on this interface */
};
+/* Interface change events */
+
+#define IF_CHANGE_UP 1
+#define IF_CHANGE_DOWN 2
+#define IF_CHANGE_FLAGS 4
+#define IF_CHANGE_MTU 8
+#define IF_CHANGE_ADDR 16
+
+void if_init(void);
+void if_dump(struct iface *);
+void if_dump_all(void);
+void if_update(struct iface *);
+void if_end_update(void);
+
#endif