diff options
Diffstat (limited to 'nest/route.h')
-rw-r--r-- | nest/route.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nest/route.h b/nest/route.h index 74446f48..c7ed80ff 100644 --- a/nest/route.h +++ b/nest/route.h @@ -473,7 +473,7 @@ typedef struct eattr { byte type; /* Attribute type and several flags (EAF_...) */ union { u32 data; - struct adata *ptr; /* Attribute data elsewhere */ + const struct adata *ptr; /* Attribute data elsewhere */ } u; } eattr; @@ -517,6 +517,8 @@ typedef struct adata { byte data[0]; } adata; +extern const adata null_adata; /* adata of length 0 */ + static inline struct adata * lp_alloc_adata(struct linpool *pool, uint len) { @@ -525,7 +527,7 @@ lp_alloc_adata(struct linpool *pool, uint len) return ad; } -static inline int adata_same(struct adata *a, struct adata *b) +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)); } |