1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Filter: Recursive filter iteration code

Add macros for recursive filter iteration that allows to examine
all instructions reachable from a filter.
This commit is contained in:
Ondrej Zajicek (work)
2021-02-07 19:21:42 +01:00
parent 5d414309ec
commit d06a875b04
7 changed files with 109 additions and 0 deletions

View File

@@ -50,6 +50,8 @@
#define BUFFER_FLUSH(v) ({ (v).used = 0; })
#define BUFFER_EMPTY(v) ({ (v).used == 0; })
#define BUFFER_WALK(v,n) \
for (BUFFER_TYPE(v) *_n = (v).data, n; _n < ((v).data + (v).used) && (n = *_n, 1); _n++)