mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 00:10:07 +01:00
core: move nm_utils_ip4_address_is_link_local() to header file
It's so simple, let's move it so it can be inlined.
This commit is contained in:
parent
b2df6fde30
commit
b15c85cf8b
2 changed files with 12 additions and 12 deletions
|
|
@ -3829,17 +3829,6 @@ nm_utils_ifname_cpy (char *dst, const char *name)
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define IPV4LL_NETWORK (htonl (0xA9FE0000L))
|
||||
#define IPV4LL_NETMASK (htonl (0xFFFF0000L))
|
||||
|
||||
gboolean
|
||||
nm_utils_ip4_address_is_link_local (in_addr_t addr)
|
||||
{
|
||||
return (addr & IPV4LL_NETMASK) == IPV4LL_NETWORK;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/**
|
||||
* Takes a pair @timestamp and @duration, and returns the remaining duration based
|
||||
* on the new timestamp @now.
|
||||
|
|
|
|||
|
|
@ -446,7 +446,18 @@ guint32 nm_utils_lifetime_get (guint32 timestamp,
|
|||
gint32 now,
|
||||
guint32 *out_preferred);
|
||||
|
||||
gboolean nm_utils_ip4_address_is_link_local (in_addr_t addr);
|
||||
/*****************************************************************************/
|
||||
|
||||
#define NM_IPV4LL_NETWORK ((in_addr_t) (htonl (0xA9FE0000lu)))
|
||||
#define NM_IPV4LL_NETMASK ((in_addr_t) (htonl (0xFFFF0000lu)))
|
||||
|
||||
static inline gboolean
|
||||
nm_utils_ip4_address_is_link_local (in_addr_t addr)
|
||||
{
|
||||
return (addr & NM_IPV4LL_NETMASK) == NM_IPV4LL_NETWORK;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
const char *nm_utils_dnsmasq_status_to_string (int status, char *dest, gsize size);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue