move nm_utils_ip4_addr_to_nl_addr() to nm-ip4-config.c
Since that's the only place it's used.
This commit is contained in:
@@ -133,20 +133,6 @@ nm_print_device_capabilities (NMDevice *dev)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
struct nl_addr *
|
||||
nm_utils_ip4_addr_to_nl_addr (guint32 ip4_addr)
|
||||
{
|
||||
struct nl_addr * nla = NULL;
|
||||
|
||||
if (!(nla = nl_addr_alloc (sizeof (in_addr_t))))
|
||||
return NULL;
|
||||
nl_addr_set_family (nla, AF_INET);
|
||||
nl_addr_set_binary_addr (nla, &ip4_addr, sizeof (guint32));
|
||||
|
||||
return nla;
|
||||
}
|
||||
|
||||
/*
|
||||
* nm_utils_ip4_netmask_to_prefix
|
||||
*
|
||||
|
@@ -37,8 +37,6 @@ int nm_spawn_process (const char *args);
|
||||
|
||||
void nm_print_device_capabilities (NMDevice *dev);
|
||||
|
||||
struct nl_addr *nm_utils_ip4_addr_to_nl_addr (guint32 ip4_addr);
|
||||
|
||||
char *nm_utils_hexstr2bin (const char *hex, size_t len);
|
||||
|
||||
char *nm_ether_ntop (const struct ether_addr *mac);
|
||||
|
@@ -74,6 +74,20 @@ enum {
|
||||
};
|
||||
|
||||
|
||||
static struct nl_addr *
|
||||
nm_utils_ip4_addr_to_nl_addr (guint32 ip4_addr)
|
||||
{
|
||||
struct nl_addr * nla = NULL;
|
||||
|
||||
if (!(nla = nl_addr_alloc (sizeof (in_addr_t))))
|
||||
return NULL;
|
||||
nl_addr_set_family (nla, AF_INET);
|
||||
nl_addr_set_binary_addr (nla, &ip4_addr, sizeof (guint32));
|
||||
|
||||
return nla;
|
||||
}
|
||||
|
||||
|
||||
NMIP4Config *
|
||||
nm_ip4_config_new (void)
|
||||
{
|
||||
|
Reference in New Issue
Block a user