summaryrefslogtreecommitdiff
path: root/lib/lists.c
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 /lib/lists.c
parent5df4073c81942ea119de90a81431bae71c87157b (diff)
BGP redesign
Integrated and extensible BGP with generalized AFI handling, support for IPv4+IPv6 AFI and unicast+multicast SAFI.
Diffstat (limited to 'lib/lists.c')
-rw-r--r--lib/lists.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/lists.c b/lib/lists.c
index 12ef3cc6..4a48d3b7 100644
--- a/lib/lists.c
+++ b/lib/lists.c
@@ -158,3 +158,15 @@ add_tail_list(list *to, list *l)
q->next = &to->tail_node;
to->tail = q;
}
+
+LIST_INLINE uint
+list_length(list *l)
+{
+ uint len = 0;
+ node *n;
+
+ WALK_LIST(n, *l)
+ len++;
+
+ return len;
+}