hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/include/linux/in.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * INET An implementation of the TCP/IP protocol suite for the LINUX
34 * operating system. INET is implemented using the BSD Socket
....@@ -9,11 +10,6 @@
910 *
1011 * Authors: Original taken from the GNU Project <netinet/in.h> file.
1112 * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
12
- *
13
- * This program is free software; you can redistribute it and/or
14
- * modify it under the terms of the GNU General Public License
15
- * as published by the Free Software Foundation; either version
16
- * 2 of the License, or (at your option) any later version.
1713 */
1814 #ifndef _LINUX_IN_H
1915 #define _LINUX_IN_H
....@@ -60,9 +56,14 @@
6056 return addr == htonl(INADDR_BROADCAST);
6157 }
6258
59
+static inline bool ipv4_is_all_snoopers(__be32 addr)
60
+{
61
+ return addr == htonl(INADDR_ALLSNOOPERS_GROUP);
62
+}
63
+
6364 static inline bool ipv4_is_zeronet(__be32 addr)
6465 {
65
- return (addr & htonl(0xff000000)) == htonl(0x00000000);
66
+ return (addr == 0);
6667 }
6768
6869 /* Special-Use IPv4 Addresses (RFC3330) */