summaryrefslogtreecommitdiff
path: root/lib/attrs.h
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-05-05 18:08:37 +0200
committerMaria Matejka <mq@ucw.cz>2022-05-26 12:34:26 +0200
commitf15f2fcee7eeb5a100bd204a0e67018e25953420 (patch)
tree12a99cfb8b6ee5aba555af282b356fb712457b18 /lib/attrs.h
parentf2e725a76882ba6b75c3ce4fb3c760bd83462410 (diff)
Moved nexthop from struct rta to extended attribute.
This doesn't do anything more than to put the whole structure inside adata. The overall performance is certainly going downhill; we'll optimize this later. Anyway, this is one of the latest items inside rta and in several commits we may drop rta completely and move to eattrs-only routes.
Diffstat (limited to 'lib/attrs.h')
-rw-r--r--lib/attrs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/attrs.h b/lib/attrs.h
index d2638f3f..79b7b14a 100644
--- a/lib/attrs.h
+++ b/lib/attrs.h
@@ -37,7 +37,9 @@ lp_store_adata(struct linpool *pool, const void *buf, uint len)
return ad;
}
+#define tmp_alloc_adata(len) lp_alloc_adata(tmp_linpool, len)
#define tmp_store_adata(buf, len) lp_store_adata(tmp_linpool, buf, len)
+#define tmp_copy_adata(ad) tmp_store_adata((ad)->data, (ad)->length)
static inline int adata_same(const struct adata *a, const struct adata *b)
{ return (a->length == b->length && !memcmp(a->data, b->data, a->length)); }