summaryrefslogtreecommitdiff
path: root/lib/zebra.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/zebra.h')
-rw-r--r--lib/zebra.h47
1 files changed, 7 insertions, 40 deletions
diff --git a/lib/zebra.h b/lib/zebra.h
index b96fb5a206..3e1eefdb2e 100644
--- a/lib/zebra.h
+++ b/lib/zebra.h
@@ -335,45 +335,6 @@ struct in_pktinfo {
#endif /* ndef BYTE_ORDER */
-/* MAX / MIN are not commonly defined, but useful */
-/* note: glibc sys/param.h has #define MIN(a,b) (((a)<(b))?(a):(b)) */
-#ifdef MAX
-#undef MAX
-#endif
-#define MAX(a, b) \
- ({ \
- typeof(a) _max_a = (a); \
- typeof(b) _max_b = (b); \
- _max_a > _max_b ? _max_a : _max_b; \
- })
-#ifdef MIN
-#undef MIN
-#endif
-#define MIN(a, b) \
- ({ \
- typeof(a) _min_a = (a); \
- typeof(b) _min_b = (b); \
- _min_a < _min_b ? _min_a : _min_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. */
#ifndef IN6_ARE_ADDR_EQUAL
#define IN6_ARE_ADDR_EQUAL IN6_IS_ADDR_EQUAL
@@ -461,7 +422,13 @@ extern const char *zserv_command_string(unsigned int command);
#endif
/* Address family numbers from RFC1700. */
-typedef enum { AFI_IP = 1, AFI_IP6 = 2, AFI_L2VPN = 3, AFI_MAX = 4 } afi_t;
+typedef enum {
+ AFI_UNSPEC = 0,
+ AFI_IP = 1,
+ AFI_IP6 = 2,
+ AFI_L2VPN = 3,
+ AFI_MAX = 4
+} afi_t;
/* Subsequent Address Family Identifier. */
typedef enum {