From 7ccb36d3308ef57d340e663f0cabd24663f4f62a Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Wed, 2 Oct 2013 14:57:29 +0200 Subject: Implements C.len operator for clist and eclist types. Thanks to Sergey Popovich for the original patch. --- doc/bird.sgml | 2 ++ filter/filter.c | 4 +++- filter/test.conf | 5 +++-- nest/attrs.h | 3 +++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/doc/bird.sgml b/doc/bird.sgml index f43eb4bf..050acf33 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -1077,6 +1077,8 @@ incompatible with each other (that is to prevent you from shooting in the foot). no literals of this type. There are three special operators on clists: + returns the length of clist add( adds pair (or quad) length / 4; } +static inline int ec_set_get_size(struct adata *list) +{ return list->length / 8; } + static inline u32 *int_set_get_data(struct adata *list) { return (u32 *) list->data; } -- cgit v1.2.3