Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jun 2018 11:06:36 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r335363 - stable/11/sys/compat/linuxkpi/common/include/net
Message-ID:  <201806191106.w5JB6arZ013760@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Tue Jun 19 11:06:36 2018
New Revision: 335363
URL: https://svnweb.freebsd.org/changeset/base/335363

Log:
  MFC r334993:
  Implement the ip_eth_mc_map() function in the LinuxKPI.
  
  Sponsored by:	Mellanox Technologies

Modified:
  stable/11/sys/compat/linuxkpi/common/include/net/ip.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/compat/linuxkpi/common/include/net/ip.h
==============================================================================
--- stable/11/sys/compat/linuxkpi/common/include/net/ip.h	Tue Jun 19 10:34:45 2018	(r335362)
+++ stable/11/sys/compat/linuxkpi/common/include/net/ip.h	Tue Jun 19 11:06:36 2018	(r335363)
@@ -58,6 +58,20 @@ inet_get_local_port_range(struct vnet *vnet, int *low,
 }
 
 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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806191106.w5JB6arZ013760>