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:
Dan Williams
2009-01-18 20:04:14 -05:00
parent 59bc300cee
commit f06a136a99
3 changed files with 14 additions and 16 deletions

View File

@@ -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
*

View File

@@ -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);

View File

@@ -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)
{