diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-04-10 02:42:11 -0400 |
---|---|---|
committer | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-04-12 00:43:19 -0400 |
commit | f3ee4010e84452aa133e5163e6cfabc52b194e94 (patch) | |
tree | 09e24d1deee7545e72329a3fb6b4d8e228e8a21d /include | |
parent | 9acd9f3ae92d0dc0ca7504fb48c1040e8bbc39fe (diff) |
[IPV6]: Define constants for link-local multicast addresses.
- Define link-local all-node / all-router multicast addresses.
- Remove ipv6_addr_all_nodes() and ipv6_addr_all_routers().
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/in6.h | 8 | ||||
-rw-r--r-- | include/net/addrconf.h | 11 |
2 files changed, 8 insertions, 11 deletions
diff --git a/include/linux/in6.h b/include/linux/in6.h index e6aa8de2b939..bc492048c349 100644 --- a/include/linux/in6.h +++ b/include/linux/in6.h | |||
@@ -48,6 +48,14 @@ extern const struct in6_addr in6addr_any; | |||
48 | #define IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } } | 48 | #define IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } } |
49 | extern const struct in6_addr in6addr_loopback; | 49 | extern const struct in6_addr in6addr_loopback; |
50 | #define IN6ADDR_LOOPBACK_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } } | 50 | #define IN6ADDR_LOOPBACK_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } } |
51 | #ifdef __KERNEL__ | ||
52 | extern const struct in6_addr in6addr_linklocal_allnodes; | ||
53 | #define IN6ADDR_LINKLOCAL_ALLNODES_INIT \ | ||
54 | { { { 0xff,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } } | ||
55 | extern const struct in6_addr in6addr_linklocal_allrouters; | ||
56 | #define IN6ADDR_LINKLOCAL_ALLROUTERS_INIT \ | ||
57 | { { { 0xff,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2 } } } | ||
58 | #endif | ||
51 | 59 | ||
52 | struct sockaddr_in6 { | 60 | struct sockaddr_in6 { |
53 | unsigned short int sin6_family; /* AF_INET6 */ | 61 | unsigned short int sin6_family; /* AF_INET6 */ |
diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 92af23d66eb9..0a2f0372df31 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h | |||
@@ -205,17 +205,6 @@ static inline void addrconf_addr_solict_mult(const struct in6_addr *addr, | |||
205 | htonl(0xFF000000) | addr->s6_addr32[3]); | 205 | htonl(0xFF000000) | addr->s6_addr32[3]); |
206 | } | 206 | } |
207 | 207 | ||
208 | |||
209 | static inline void ipv6_addr_all_nodes(struct in6_addr *addr) | ||
210 | { | ||
211 | ipv6_addr_set(addr, htonl(0xFF020000), 0, 0, htonl(0x1)); | ||
212 | } | ||
213 | |||
214 | static inline void ipv6_addr_all_routers(struct in6_addr *addr) | ||
215 | { | ||
216 | ipv6_addr_set(addr, htonl(0xFF020000), 0, 0, htonl(0x2)); | ||
217 | } | ||
218 | |||
219 | static inline int ipv6_addr_is_multicast(const struct in6_addr *addr) | 208 | static inline int ipv6_addr_is_multicast(const struct in6_addr *addr) |
220 | { | 209 | { |
221 | return (addr->s6_addr32[0] & htonl(0xFF000000)) == htonl(0xFF000000); | 210 | return (addr->s6_addr32[0] & htonl(0xFF000000)) == htonl(0xFF000000); |