summaryrefslogtreecommitdiff
path: root/lib/zebra.h
diff options
context:
space:
mode:
authorChristian Franke <chris@opensourcerouting.org>2018-07-22 15:49:02 -0400
committerChristian Franke <chris@opensourcerouting.org>2018-08-03 13:25:39 +0200
commitd43d2df5f3b63a4d364bd1136a246dd74647913c (patch)
tree99a128870f0ccd0e65d6981430fc061a2da1fa57 /lib/zebra.h
parentc9b0e434bc640ca7fe3700d4c3e26d1a295a9546 (diff)
isisd: learn and advertise IPv6 dst-src routes
Receive IPv6 dst-src routes from zebra and advertise them in our LSPs if so configured. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Diffstat (limited to 'lib/zebra.h')
-rw-r--r--lib/zebra.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/zebra.h b/lib/zebra.h
index 98428eaab2..9ac96372ff 100644
--- a/lib/zebra.h
+++ b/lib/zebra.h
@@ -365,6 +365,22 @@ struct in_pktinfo {
_a < _b ? _a : _b; \
})
+#ifndef offsetof
+#ifdef __compiler_offsetof
+#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER)
+#else
+#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#endif
+#endif
+
+#ifndef container_of
+#define container_of(ptr, type, member) \
+ ({ \
+ const typeof(((type *)0)->member) *__mptr = (ptr); \
+ (type *)((char *)__mptr - offsetof(type, member)); \
+ })
+#endif
+
#define ZEBRA_NUM_OF(x) (sizeof (x) / sizeof (x[0]))
/* For old definition. */