summaryrefslogtreecommitdiff
path: root/nest/iface.h
diff options
context:
space:
mode:
Diffstat (limited to 'nest/iface.h')
-rw-r--r--nest/iface.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/nest/iface.h b/nest/iface.h
index 1189cdd4..87ad86cf 100644
--- a/nest/iface.h
+++ b/nest/iface.h
@@ -9,10 +9,20 @@
#ifndef _BIRD_IFACE_H_
#define _BIRD_IFACE_H_
+#include "lib/event.h"
#include "lib/lists.h"
#include "lib/ip.h"
+#include "lib/locking.h"
-extern list iface_list;
+DEFINE_DOMAIN(attrs);
+extern list global_iface_list;
+extern DOMAIN(attrs) iface_domain;
+
+#define IFACE_LEGACY_ACCESS ASSERT_DIE(birdloop_inside(&main_birdloop))
+
+#define IFACE_LOCK LOCK_DOMAIN(attrs, iface_domain)
+#define IFACE_UNLOCK UNLOCK_DOMAIN(attrs, iface_domain)
+#define ASSERT_IFACE_LOCKED ASSERT_DIE(DOMAIN_IS_LOCKED(attrs, iface_domain))
struct proto;
struct pool;
@@ -28,6 +38,8 @@ struct ifa { /* Interface address */
unsigned flags; /* Analogous to iface->flags */
};
+extern struct iface default_vrf;
+
struct iface {
node n;
char name[16];
@@ -129,6 +141,7 @@ typedef struct neighbor {
struct ifa *ifa; /* Ifa on related iface */
struct iface *iface; /* Interface it's connected to */
struct iface *ifreq; /* Requested iface, NULL for any */
+ struct event event; /* Notification event */
struct proto *proto; /* Protocol this belongs to */
void *data; /* Protocol-specific data */
uint aux; /* Protocol-specific data */
@@ -140,13 +153,14 @@ typedef struct neighbor {
#define NEF_STICKY 1
#define NEF_ONLINK 2
#define NEF_IFACE 4 /* Entry for whole iface */
+#define NEF_NOTIFY_MAIN 0x100 /* Notify from main_birdloop context */
neighbor *neigh_find(struct proto *p, ip_addr a, struct iface *ifa, uint flags);
void neigh_dump(neighbor *);
void neigh_dump_all(void);
-void neigh_prune(void);
+void neigh_prune(struct proto *p);
void neigh_if_up(struct iface *);
void neigh_if_down(struct iface *);
void neigh_if_link(struct iface *);