.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
---|
1 | 2 | /* |
---|
2 | 3 | * INET An implementation of the TCP/IP protocol suite for the LINUX |
---|
3 | 4 | * operating system. INET is implemented using the BSD Socket |
---|
.. | .. |
---|
9 | 10 | * |
---|
10 | 11 | * Authors: Original taken from the GNU Project <netinet/in.h> file. |
---|
11 | 12 | * 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. |
---|
17 | 13 | */ |
---|
18 | 14 | #ifndef _LINUX_IN_H |
---|
19 | 15 | #define _LINUX_IN_H |
---|
.. | .. |
---|
60 | 56 | return addr == htonl(INADDR_BROADCAST); |
---|
61 | 57 | } |
---|
62 | 58 | |
---|
| 59 | +static inline bool ipv4_is_all_snoopers(__be32 addr) |
---|
| 60 | +{ |
---|
| 61 | + return addr == htonl(INADDR_ALLSNOOPERS_GROUP); |
---|
| 62 | +} |
---|
| 63 | + |
---|
63 | 64 | static inline bool ipv4_is_zeronet(__be32 addr) |
---|
64 | 65 | { |
---|
65 | | - return (addr & htonl(0xff000000)) == htonl(0x00000000); |
---|
| 66 | + return (addr == 0); |
---|
66 | 67 | } |
---|
67 | 68 | |
---|
68 | 69 | /* Special-Use IPv4 Addresses (RFC3330) */ |
---|