summaryrefslogtreecommitdiff
path: root/nest
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2013-10-02 14:57:29 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2013-10-02 14:57:29 +0200
commit7ccb36d3308ef57d340e663f0cabd24663f4f62a (patch)
tree131c95083d7e0f713241121d9c4a6116f71dcf78 /nest
parent28a10f84cbc3635e59bff348cb1715859dfacade (diff)
Implements C.len operator for clist and eclist types.
Thanks to Sergey Popovich for the original patch.
Diffstat (limited to 'nest')
-rw-r--r--nest/attrs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/nest/attrs.h b/nest/attrs.h
index 44a23e18..a0dae221 100644
--- a/nest/attrs.h
+++ b/nest/attrs.h
@@ -69,6 +69,9 @@ int as_path_match(struct adata *path, struct f_path_mask *mask);
static inline int int_set_get_size(struct adata *list)
{ return list->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; }