From e9219290693fac050e2afbbf8b261f14aac7aee5 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 22 Jul 2016 05:58:08 -0400 Subject: [PATCH] lib: Setup prefix.h to allow it to store (s,g) We need the ability to store the (s,g) in a struct prefix. This will allow us to consolidate some duplicated code in pimd as well as set us up to switch from a link list to a table to store (s,g) state. Signed-off-by: Donald Sharp --- lib/prefix.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/prefix.h b/lib/prefix.h index 5e4b1f9c83..a2cdfe96fb 100644 --- a/lib/prefix.h +++ b/lib/prefix.h @@ -134,6 +134,14 @@ struct prefix_ptr uintptr_t prefix __attribute__ ((aligned (8))); }; +struct prefix_sg +{ + u_char family; + u_char prefixlen; + struct in_addr src __attribute ((aligned (8))); + struct in_addr grp; +}; + /* helper to get type safety/avoid casts on calls * (w/o this, functions accepting all prefix types need casts on the caller * side, which strips type safety since the cast will accept any pointer -- 2.39.5