summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_route.h
diff options
context:
space:
mode:
authorChris Hall <GMCH@hestia.halldom.com>2010-04-16 14:29:17 +0100
committerChris Hall <GMCH@hestia.halldom.com>2010-04-16 14:29:17 +0100
commita20526cc30d68ca5c4c7951238faafa8969a31c1 (patch)
treec9a0d8ee5e16ee5f42704c9c9f3122f407f13122 /ospf6d/ospf6_route.h
parentd6f1bd7b60fc94488dc6a0493a6ec17346a03b2d (diff)
downloadquagga-a20526cc30d68ca5c4c7951238faafa8969a31c1.tar.bz2
quagga-a20526cc30d68ca5c4c7951238faafa8969a31c1.tar.xz
Removing compiler warnings.
Removed nearly 100 compiler warnings in the various routing daemons which now clean compile. Removed one warning in vty.c, which was obscured by the other warnings. SO... this commit corrects the previous one.
Diffstat (limited to 'ospf6d/ospf6_route.h')
-rw-r--r--ospf6d/ospf6_route.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/ospf6d/ospf6_route.h b/ospf6d/ospf6_route.h
index 8dcc877f..22ecd3ff 100644
--- a/ospf6d/ospf6_route.h
+++ b/ospf6d/ospf6_route.h
@@ -235,17 +235,21 @@ extern const char *ospf6_path_type_substr[OSPF6_PATH_TYPE_MAX];
sizeof (struct ospf6_nexthop) * OSPF6_MULTI_PATH_LIMIT) == 0)
#define ospf6_route_is_best(r) (CHECK_FLAG ((r)->flag, OSPF6_ROUTE_BEST))
-#define ospf6_linkstate_prefix_adv_router(x) \
- (*(u_int32_t *)(&(x)->u.prefix6.s6_addr[0]))
-#define ospf6_linkstate_prefix_id(x) \
- (*(u_int32_t *)(&(x)->u.prefix6.s6_addr[4]))
+#ifdef s6_addr32
+#define OSPF6_PREFIX_PART(x, n) ((x).u.prefix6.s6_addr32[n])
+#else
+#define OSPF6_PREFIX_PART(x, n) ( ( (uint32_t*)((x).u.prefix6.s6_addr) )[n] )
+#endif
-#define ADV_ROUTER_IN_PREFIX(x) \
- (*(u_int32_t *)(&(x)->u.prefix6.s6_addr[0]))
-#define ID_IN_PREFIX(x) \
- (*(u_int32_t *)(&(x)->u.prefix6.s6_addr[4]))
+#define ospf6_linkstate_prefix_adv_router(x) OSPF6_PREFIX_PART(x, 0)
+#define ospf6_linkstate_prefix_id(x) OSPF6_PREFIX_PART(x, 1)
+
+#define ADV_ROUTER_IN_PREFIX(x) OSPF6_PREFIX_PART(x, 0)
+#define ID_IN_PREFIX(x) OSPF6_PREFIX_PART(x, 1)
/* Function prototype */
+#include "command.h"
+
extern void ospf6_linkstate_prefix (u_int32_t adv_router, u_int32_t id,
struct prefix *prefix);
extern void ospf6_linkstate_prefix2str (struct prefix *prefix, char *buf,
@@ -288,10 +292,10 @@ extern void ospf6_route_dump (struct ospf6_route_table *table);
extern void ospf6_route_show (struct vty *vty, struct ospf6_route *route);
extern void ospf6_route_show_detail (struct vty *vty, struct ospf6_route *route);
-extern int ospf6_route_table_show (struct vty *, int, const char *[],
+extern int ospf6_route_table_show (struct vty *, int, argv_t,
struct ospf6_route_table *);
extern int ospf6_linkstate_table_show (struct vty *vty, int argc,
- const char *argv[],
+ argv_t argv,
struct ospf6_route_table *table);
extern void ospf6_brouter_show_header (struct vty *vty);