svn commit: r334993 - head/sys/compat/linuxkpi/common/include/net
Hans Petter Selasky
hselasky at FreeBSD.org
Tue Jun 12 08:43:50 UTC 2018
Author: hselasky
Date: Tue Jun 12 08:43:49 2018
New Revision: 334993
URL: https://svnweb.freebsd.org/changeset/base/334993
Log:
Implement the ip_eth_mc_map() function in the LinuxKPI.
MFC after: 1 week
Sponsored by: Mellanox Technologies
Modified:
head/sys/compat/linuxkpi/common/include/net/ip.h
Modified: head/sys/compat/linuxkpi/common/include/net/ip.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/net/ip.h Tue Jun 12 08:18:56 2018 (r334992)
+++ head/sys/compat/linuxkpi/common/include/net/ip.h Tue Jun 12 08:43:49 2018 (r334993)
@@ -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;
More information about the svn-src-head
mailing list