diff options
author | Hans Petter Selasky <hselasky@FreeBSD.org> | 2017-03-22 15:44:00 +0000 |
---|---|---|
committer | Hans Petter Selasky <hselasky@FreeBSD.org> | 2017-03-22 15:44:00 +0000 |
commit | 303bd80ad54d615a95001f55843776b421e6972e (patch) | |
tree | 222fd49e123b951ad33eae58264d7d09d4285f62 /sys/compat/linuxkpi/common/include | |
parent | e336138c40bed49a58b77b6dc0cacf606e1583e2 (diff) | |
download | src-303bd80ad54d615a95001f55843776b421e6972e.tar.gz src-303bd80ad54d615a95001f55843776b421e6972e.zip |
Add support for more IPv4 and IPv6 related macros in the LinuxKPI.
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes
Notes:
svn path=/head/; revision=315713
Diffstat (limited to 'sys/compat/linuxkpi/common/include')
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/in.h | 2 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/net/ipv6.h | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/in.h b/sys/compat/linuxkpi/common/include/linux/in.h index f390c1d6b375..96d66fbae2f0 100644 --- a/sys/compat/linuxkpi/common/include/linux/in.h +++ b/sys/compat/linuxkpi/common/include/linux/in.h @@ -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_ */ diff --git a/sys/compat/linuxkpi/common/include/net/ipv6.h b/sys/compat/linuxkpi/common/include/net/ipv6.h index 7e078f378cdb..4e48da42c440 100644 --- a/sys/compat/linuxkpi/common/include/net/ipv6.h +++ b/sys/compat/linuxkpi/common/include/net/ipv6.h @@ -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 |