Date: Wed, 22 Mar 2017 15:44:01 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315713 - in head/sys/compat/linuxkpi/common/include: linux net Message-ID: <201703221544.v2MFi18b079293@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Wed Mar 22 15:44:00 2017 New Revision: 315713 URL: https://svnweb.freebsd.org/changeset/base/315713 Log: Add support for more IPv4 and IPv6 related macros in the LinuxKPI. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/in.h head/sys/compat/linuxkpi/common/include/net/ipv6.h Modified: head/sys/compat/linuxkpi/common/include/linux/in.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/in.h Wed Mar 22 14:30:02 2017 (r315712) +++ head/sys/compat/linuxkpi/common/include/linux/in.h Wed Mar 22 15:44:00 2017 (r315713) @@ -41,5 +41,7 @@ #define ipv4_is_zeronet(be) IN_ZERONET(ntohl(be)) #define ipv4_is_loopback(be) IN_LOOPBACK(ntohl(be)) +#define ipv4_is_multicast(be) IN_MULTICAST(ntohl(be)) +#define ipv4_is_lbcast(be) ((be) == INADDR_BROADCAST) #endif /* _LINUX_IN_H_ */ Modified: head/sys/compat/linuxkpi/common/include/net/ipv6.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/net/ipv6.h Wed Mar 22 14:30:02 2017 (r315712) +++ head/sys/compat/linuxkpi/common/include/net/ipv6.h Wed Mar 22 15:44:00 2017 (r315713) @@ -35,8 +35,12 @@ #include <netinet/in.h> #include <linux/types.h> -#define ipv6_addr_loopback IN6_IS_ADDR_LOOPBACK -#define ipv6_addr_copy(dst, src) \ +#define IPV6_DEFAULT_HOPLIMIT 64 + +#define ipv6_addr_loopback(addr) IN6_IS_ADDR_LOOPBACK(addr) +#define ipv6_addr_any(addr) IN6_IS_ADDR_UNSPECIFIED(addr) + +#define ipv6_addr_copy(dst, src) \ memcpy((dst), (src), sizeof(struct in6_addr)) static inline void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703221544.v2MFi18b079293>