Publishers (EVPN protos) can send requests for VLANs, subscribers
(Bridge protos) will process them.
list iface_list;
+ps_queue vlan_requests;
+
static void if_recalc_preferred(struct iface *i);
/**
if_pool = rp_new(&root_pool, "Interfaces");
init_list(&iface_list);
neigh_init(if_pool);
+
+ ps_init_queue(&vlan_requests, &root_pool, "VLAN bus");
}
/*
#define _BIRD_IFACE_H_
#include "lib/lists.h"
+#include "lib/pubsub.h"
#include "lib/ip.h"
extern list iface_list;
u32 if_choose_router_id(struct iface_patt *mask, u32 old_id);
+
+/*
+ * VLAN request queue
+ */
+
+struct vlan_req_data {
+ u32 vid;
+ u32 vni;
+};
+
+struct vlan_request {
+ struct iface *bridge; /* Bridge device, name -> topic */
+ struct iface *iface; /* Interface to add/remove VLANs */
+ uintptr_t owner; /* Owner of the VLAN, proto ptr */
+ bool update; /* Update / withdraw */
+ int vlan_count; /* Number of VLANs */
+ struct vlan_req_data vlans[];
+};
+
+#define VLAN_REQUEST_LENGTH(n) (sizeof(struct vlan_request) + (n) * sizeof(struct vlan_req_data))
+
+extern ps_queue vlan_requests;
+
#endif