summaryrefslogtreecommitdiffstats
path: root/include/list.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2020-12-16 16:39:09 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2020-12-18 12:33:22 +0100
commite6d1d0d6119585a5cd63fcc02c0eb98e30b095cb (patch)
tree3b8c7c29b6b80a54dbfd4d485b73ce00d0f417f5 /include/list.h
parent242965f452e64fef9faff6689df4b2c205823209 (diff)
src: add set element multi-statement support
Extend the set element infrastructure to support for several statements. This patch places the statements right after the key when printing it. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/list.h')
-rw-r--r--include/list.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/list.h b/include/list.h
index 9c4da817..857921e3 100644
--- a/include/list.h
+++ b/include/list.h
@@ -348,6 +348,13 @@ static inline void list_splice_tail_init(struct list_head *list,
#define list_first_entry(ptr, type, member) \
list_entry((ptr)->next, type, member)
+/**
+ * list_next_entry - get the next element in list
+ * @pos: the type * to cursor
+ * @member: the name of the list_head within the struct.
+ */
+#define list_next_entry(pos, member) \
+ list_entry((pos)->member.next, typeof(*(pos)), member)
/**
* list_for_each_entry - iterate over list of given type