mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 11:00:18 +01:00
core: add nm_utils_ip4_address_is_zeronet() helper
This commit is contained in:
parent
63b788dad2
commit
7670899d2c
1 changed files with 7 additions and 0 deletions
|
|
@ -479,6 +479,13 @@ nm_utils_ip4_address_is_link_local (in_addr_t addr)
|
|||
return (addr & NM_IPV4LL_NETMASK) == NM_IPV4LL_NETWORK;
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
nm_utils_ip4_address_is_zeronet (in_addr_t network)
|
||||
{
|
||||
/* Same as ipv4_is_zeronet() from kernel's include/linux/in.h. */
|
||||
return (network & htonl (0xFF000000u)) == htonl (0x00000000u);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
const char *nm_utils_dnsmasq_status_to_string (int status, char *dest, gsize size);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue