summaryrefslogtreecommitdiff
path: root/nest/route.h
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2016-12-07 14:11:28 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2016-12-07 14:20:52 +0100
commitd15b0b0a1b494c14b139d2d28706d82cd6e2f139 (patch)
treef704869689e1acab9a4f3417849ac5853188310d /nest/route.h
parent5df4073c81942ea119de90a81431bae71c87157b (diff)
BGP redesign
Integrated and extensible BGP with generalized AFI handling, support for IPv4+IPv6 AFI and unicast+multicast SAFI.
Diffstat (limited to 'nest/route.h')
-rw-r--r--nest/route.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/nest/route.h b/nest/route.h
index 5104d8f1..8a238860 100644
--- a/nest/route.h
+++ b/nest/route.h
@@ -457,13 +457,22 @@ typedef struct eattr {
#define EAF_TYPE_UNDEF 0x1f /* `force undefined' entry */
#define EAF_EMBEDDED 0x01 /* Data stored in eattr.u.data (part of type spec) */
#define EAF_VAR_LENGTH 0x02 /* Attribute length is variable (part of type spec) */
-#define EAF_ORIGINATED 0x40 /* The attribute has originated locally */
+#define EAF_ORIGINATED 0x20 /* The attribute has originated locally */
+#define EAF_FRESH 0x40 /* An uncached attribute (e.g. modified in export filter) */
#define EAF_TEMP 0x80 /* A temporary attribute (the one stored in the tmp attr list) */
-struct adata {
+typedef struct adata {
uint length; /* Length of data */
byte data[0];
-};
+} adata;
+
+static inline struct adata *
+lp_alloc_adata(struct linpool *pool, uint len)
+{
+ struct adata *ad = lp_alloc(pool, sizeof(struct adata) + len);
+ ad->length = len;
+ return ad;
+}
static inline int adata_same(struct adata *a, struct adata *b)
{ return (a->length == b->length && !memcmp(a->data, b->data, a->length)); }
@@ -523,7 +532,7 @@ static inline rta * rta_cow(rta *r, linpool *lp) { return rta_is_cached(r) ? rta
void rta_dump(rta *);
void rta_dump_all(void);
void rta_show(struct cli *, rta *, ea_list *);
-void rta_set_recursive_next_hop(rtable *dep, rta *a, rtable *tab, ip_addr *gw, ip_addr *ll);
+void rta_set_recursive_next_hop(rtable *dep, rta *a, rtable *tab, ip_addr gw, ip_addr ll);
/*
* rta_set_recursive_next_hop() acquires hostentry from hostcache and fills