]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: Setup prefix.h to allow it to store (s,g)
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 22 Jul 2016 09:58:08 +0000 (05:58 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 17 Jan 2017 23:26:43 +0000 (18:26 -0500)
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 <sharpd@cumulusnetworks.com>
lib/prefix.h

index 5e4b1f9c83f9480f72728c2c3be6219f94015e8d..a2cdfe96fb1afce038c8480900bf0ddb7967cddb 100644 (file)
@@ -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