summaryrefslogtreecommitdiff
path: root/nest/iface.h
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-01-24 15:48:18 +0100
committerMaria Matejka <mq@ucw.cz>2022-02-03 10:30:33 +0100
commitd37513a372b0d5b133f59293af185ec831e2456f (patch)
treeef710a0adcc81bbf725b4a39e0fd3ae50df3117e /nest/iface.h
parentc651cef737c7c7578c26bd787c0abd3c364bf4b8 (diff)
Neighbors: Locking and asynchronous notifications
Diffstat (limited to 'nest/iface.h')
-rw-r--r--nest/iface.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/nest/iface.h b/nest/iface.h
index b3dcc408..5deb5432 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"
+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;
@@ -131,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 */