]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/libsystemd-network/icmp6-util.h
libsystemd-network: make constant addresses type-safe
[thirdparty/systemd.git] / src / libsystemd-network / icmp6-util.h
index 49cdcba3ff711f89d80f8eff57f58af98fc02e47..74acd4124c01f44368b41787a74b9951b55a544a 100644 (file)
 
 #include "time-util.h"
 
-#define IN6ADDR_ALL_ROUTERS_MULTICAST_INIT \
-        { { { 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
-              0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02 } } }
+#define IN6_ADDR_ALL_ROUTERS_MULTICAST                                  \
+        ((const struct in6_addr) { { {                                  \
+                0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,         \
+                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,         \
+         } } } )
 
-#define IN6ADDR_ALL_NODES_MULTICAST_INIT \
-        { { { 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
-              0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 } } }
+#define IN6_ADDR_ALL_NODES_MULTICAST                                    \
+        ((const struct in6_addr) { { {                                  \
+                0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,         \
+                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,         \
+         } } } )
 
 int icmp6_bind(int ifindex, bool is_router);
 int icmp6_send(int fd, const struct sockaddr_in6 *dst, const struct iovec *iov, size_t n_iov);