aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2018-06-12 08:43:49 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2018-06-12 08:43:49 +0000
commit986e3bed8b155a66832d8e2920fd23af2a9298c8 (patch)
tree0bb908ab05e9acdf5bab98fecbb8b741b9f9735e /sys
parent1833cea27ec05efda273614a46e23f0a4d729742 (diff)
downloadsrc-986e3bed8b155a66832d8e2920fd23af2a9298c8.tar.gz
src-986e3bed8b155a66832d8e2920fd23af2a9298c8.zip
Implement the ip_eth_mc_map() function in the LinuxKPI.
MFC after: 1 week Sponsored by: Mellanox Technologies
Notes
Notes: svn path=/head/; revision=334993
Diffstat (limited to 'sys')
-rw-r--r--sys/compat/linuxkpi/common/include/net/ip.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/net/ip.h b/sys/compat/linuxkpi/common/include/net/ip.h
index 1c278734b2a6..1cfc568db323 100644
--- a/sys/compat/linuxkpi/common/include/net/ip.h
+++ b/sys/compat/linuxkpi/common/include/net/ip.h
@@ -58,6 +58,20 @@ inet_get_local_port_range(struct vnet *vnet, int *low, int *high)
}
static inline void
+ip_eth_mc_map(uint32_t addr, char *buf)
+{
+
+ addr = ntohl(addr);
+
+ buf[0] = 0x01;
+ buf[1] = 0x00;
+ buf[2] = 0x5e;
+ buf[3] = (addr >> 16) & 0x7f;
+ buf[4] = (addr >> 8) & 0xff;
+ buf[5] = (addr & 0xff);
+}
+
+static inline void
ip_ib_mc_map(uint32_t addr, const unsigned char *bcast, char *buf)
{
unsigned char scope;