summaryrefslogtreecommitdiffstats
path: root/lib/prefix.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/prefix.h')
-rw-r--r--lib/prefix.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/prefix.h b/lib/prefix.h
index 9ef70ff5..45889e08 100644
--- a/lib/prefix.h
+++ b/lib/prefix.h
@@ -52,6 +52,7 @@ struct prefix
struct in_addr adv_router;
} lp;
u_char val[8];
+ uintptr_t ptr;
} u __attribute__ ((aligned (8)));
};
@@ -89,6 +90,14 @@ struct prefix_rd
u_char val[8] __attribute__ ((aligned (8)));
};
+/* Prefix for a generic pointer */
+struct prefix_ptr
+{
+ u_char family;
+ u_char prefixlen;
+ uintptr_t prefix __attribute__ ((aligned (8)));
+};
+
/* 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