summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRoland Dreier <roland@topspin.com>2004-12-27 06:19:47 -0800
committerDavid S. Miller <davem@nuts.davemloft.net>2004-12-27 06:19:47 -0800
commit3097829ccb904ab64e44a9cc0f4daa0c97fcd0fe (patch)
tree3c3b1e1f9715683975827c017d499e2c6abfb55b /include
parent93f178381849e4fc519d1d26b76d4483500ad369 (diff)
[INFINIBAND]: IPoIB IPv6 support
Add ipv6_ib_mc_map() to convert IPv6 multicast addresses to IPoIB hardware addresses, and add support for autoconfiguration for devices with type ARPHRD_INFINIBAND. The mapping for multicast addresses is described in http://www.ietf.org/internet-drafts/draft-ietf-ipoib-ip-over-infiniband-08.txt Signed-off-by: Nitin Hande <Nitin.Hande@Sun.Com> Signed-off-by: Roland Dreier <roland@topspin.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/if_inet6.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h
index 76ce5f8b6c1e..e97a9accb71d 100644
--- a/include/net/if_inet6.h
+++ b/include/net/if_inet6.h
@@ -266,5 +266,20 @@ static inline void ipv6_arcnet_mc_map(const struct in6_addr *addr, char *buf)
{
buf[0] = 0x00;
}
+
+static inline void ipv6_ib_mc_map(struct in6_addr *addr, char *buf)
+{
+ buf[0] = 0; /* Reserved */
+ buf[1] = 0xff; /* Multicast QPN */
+ buf[2] = 0xff;
+ buf[3] = 0xff;
+ buf[4] = 0xff;
+ buf[5] = 0x12; /* link local scope */
+ buf[6] = 0x60; /* IPv6 signature */
+ buf[7] = 0x1b;
+ buf[8] = 0; /* P_Key */
+ buf[9] = 0;
+ memcpy(buf + 10, addr->s6_addr + 6, 10);
+}
#endif
#endif