summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-01-09 11:29:27 +0100
committerThomas Haller <thaller@redhat.com>2020-01-28 11:17:41 +0100
commitcd0863a339d87e2c0cda8e9b521cd0dec5e3e5a7 (patch)
tree963ccf42a0c8b25a85632d9d564bdfc5a4232c5b
parentc0bd6752b977603331e5f8ea056f0f15d436d622 (diff)
downloadNetworkManager-cd0863a339d87e2c0cda8e9b521cd0dec5e3e5a7.tar.gz
all: use _nm_utils_inet4_ntop() instead of nm_utils_inet4_ntop()
and _nm_utils_inet6_ntop() instead of nm_utils_inet6_ntop(). nm_utils_inet4_ntop()/nm_utils_inet6_ntop() are public API of libnm. For one, that means they are only available in code that links with libnm/libnm-core. But such basic helpers should be available everywhere. Also, they accept NULL as destination buffers. We keep that behavior for potential libnm users, but internally we never want to use the static buffers. This patch needs to take care that there are no callers of _nm_utils_inet[46]_ntop() that pass NULL buffers. Also, _nm_utils_inet[46]_ntop() are inline functions and the compiler can get rid of them. We should consistently use the same variant of the helper. The only downside is that the "good" name is already taken. The leading underscore is rather ugly and inconsistent. Also, with our internal variants we can use "static array indices in function parameter declarations" next. Thereby the compiler helps to ensure that the provided buffers are of the right size.
-rw-r--r--clients/cloud-setup/main.c2
-rw-r--r--libnm-core/nm-connection.c2
-rw-r--r--libnm-core/nm-setting-ip6-config.c2
-rw-r--r--libnm-core/tests/test-general.c4
-rw-r--r--src/devices/nm-acd-manager.c16
-rw-r--r--src/devices/nm-device-vxlan.c8
-rw-r--r--src/devices/nm-device.c14
-rw-r--r--src/devices/tests/test-acd.c2
-rw-r--r--src/dhcp/nm-dhcp-nettools.c22
-rw-r--r--src/dhcp/nm-dhcp-systemd.c24
-rw-r--r--src/dhcp/nm-dhcp-utils.c6
-rw-r--r--src/dns/nm-dns-dnsmasq.c4
-rw-r--r--src/dns/nm-dns-manager.c6
-rw-r--r--src/dnsmasq/nm-dnsmasq-manager.c4
-rw-r--r--src/dnsmasq/nm-dnsmasq-utils.c5
-rw-r--r--src/ndisc/nm-ndisc.c4
-rw-r--r--src/nm-core-utils.c3
-rw-r--r--src/nm-ip4-config.c22
-rw-r--r--src/nm-ip6-config.c14
-rw-r--r--src/nm-pacrunner-manager.c8
-rw-r--r--src/nm-policy.c8
-rw-r--r--src/platform/nm-fake-platform.c4
-rw-r--r--src/platform/nm-platform.c36
-rw-r--r--src/platform/nmp-object.c10
-rw-r--r--src/platform/tests/test-common.c48
-rw-r--r--src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c4
-rw-r--r--src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c4
-rw-r--r--src/vpn/nm-vpn-connection.c28
28 files changed, 157 insertions, 157 deletions
diff --git a/clients/cloud-setup/main.c b/clients/cloud-setup/main.c
index 743f931c0f..d46c88e424 100644
--- a/clients/cloud-setup/main.c
+++ b/clients/cloud-setup/main.c
@@ -335,7 +335,7 @@ _nmc_mangle_connection (NMDevice *device,
entry = nm_ip_routing_rule_new (AF_INET);
nm_ip_routing_rule_set_priority (entry, rt_table);
nm_ip_routing_rule_set_from (entry,
- nm_utils_inet4_ntop (config_data->ipv4s_arr[i], sbuf),
+ _nm_utils_inet4_ntop (config_data->ipv4s_arr[i], sbuf),
32);
nm_ip_routing_rule_set_table (entry, rt_table);
diff --git a/libnm-core/nm-connection.c b/libnm-core/nm-connection.c
index 7c62bea2f3..36d2cd6dfe 100644
--- a/libnm-core/nm-connection.c
+++ b/libnm-core/nm-connection.c
@@ -999,7 +999,7 @@ _normalize_ip_config (NMConnection *self, GHashTable *parameters)
if ( inet_pton (AF_INET6, token, &i6_token) == 1
&& _nm_utils_inet6_is_token (&i6_token)) {
- nm_utils_inet6_ntop (&i6_token, normalized);
+ _nm_utils_inet6_ntop (&i6_token, normalized);
if (g_strcmp0 (token, normalized)) {
g_object_set (s_ip6, NM_SETTING_IP6_CONFIG_TOKEN, normalized, NULL);
changed = TRUE;
diff --git a/libnm-core/nm-setting-ip6-config.c b/libnm-core/nm-setting-ip6-config.c
index bef4e061c9..eba7bc7f9d 100644
--- a/libnm-core/nm-setting-ip6-config.c
+++ b/libnm-core/nm-setting-ip6-config.c
@@ -235,7 +235,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error)
return FALSE;
}
- if (g_strcmp0 (priv->token, nm_utils_inet6_ntop (&i6_token, s_token)))
+ if (g_strcmp0 (priv->token, _nm_utils_inet6_ntop (&i6_token, s_token)))
token_needs_normalization = TRUE;
} else {
g_set_error_literal (error,
diff --git a/libnm-core/tests/test-general.c b/libnm-core/tests/test-general.c
index 96f4af7ae4..9968f3613f 100644
--- a/libnm-core/tests/test-general.c
+++ b/libnm-core/tests/test-general.c
@@ -8341,8 +8341,8 @@ test_nm_ip_addr_zero (void)
g_assert (memcmp (&nm_ip_addr_zero, &a4, sizeof (a4)) == 0);
g_assert (memcmp (&nm_ip_addr_zero, &a6, sizeof (a6)) == 0);
- g_assert_cmpstr (nm_utils_inet4_ntop (nm_ip_addr_zero.addr4, buf), ==, "0.0.0.0");
- g_assert_cmpstr (nm_utils_inet6_ntop (&nm_ip_addr_zero.addr6, buf), ==, "::");
+ g_assert_cmpstr (_nm_utils_inet4_ntop (nm_ip_addr_zero.addr4, buf), ==, "0.0.0.0");
+ g_assert_cmpstr (_nm_utils_inet6_ntop (&nm_ip_addr_zero.addr6, buf), ==, "::");
g_assert_cmpstr (nm_utils_inet_ntop (AF_INET, &nm_ip_addr_zero, buf), ==, "0.0.0.0");
g_assert_cmpstr (nm_utils_inet_ntop (AF_INET6, &nm_ip_addr_zero, buf), ==, "::");
diff --git a/src/devices/nm-acd-manager.c b/src/devices/nm-acd-manager.c
index c771147968..735dd25b09 100644
--- a/src/devices/nm-acd-manager.c
+++ b/src/devices/nm-acd-manager.c
@@ -184,12 +184,12 @@ acd_event (int fd,
r = n_acd_probe_announce (info->probe, N_ACD_DEFEND_ONCE);
if (r) {
_LOGW ("couldn't announce address %s on interface '%s': %s",
- nm_utils_inet4_ntop (info->address, address_str),
+ _nm_utils_inet4_ntop (info->address, address_str),
nm_platform_link_get_name (NM_PLATFORM_GET, self->ifindex),
acd_error_to_string (r));
} else {
_LOGD ("announcing address %s",
- nm_utils_inet4_ntop (info->address, address_str));
+ _nm_utils_inet4_ntop (info->address, address_str));
}
}
check_probing_done = TRUE;
@@ -202,14 +202,14 @@ acd_event (int fd,
case N_ACD_EVENT_DEFENDED:
n_acd_probe_get_userdata (event->defended.probe, (void **) &info);
_LOGD ("defended address %s from host %s",
- nm_utils_inet4_ntop (info->address, address_str),
+ _nm_utils_inet4_ntop (info->address, address_str),
(hwaddr_str = nm_utils_hwaddr_ntoa (event->defended.sender,
event->defended.n_sender)));
break;
case N_ACD_EVENT_CONFLICT:
n_acd_probe_get_userdata (event->conflict.probe, (void **) &info);
_LOGW ("conflict for address %s detected with host %s on interface '%s'",
- nm_utils_inet4_ntop (info->address, address_str),
+ _nm_utils_inet4_ntop (info->address, address_str),
(hwaddr_str = nm_utils_hwaddr_ntoa (event->defended.sender,
event->defended.n_sender)),
nm_platform_link_get_name (NM_PLATFORM_GET, self->ifindex));
@@ -249,7 +249,7 @@ acd_probe_add (NMAcdManager *self,
r = n_acd_probe_config_new (&probe_config);
if (r) {
_LOGW ("could not create probe config for %s on interface '%s': %s",
- nm_utils_inet4_ntop (info->address, sbuf),
+ _nm_utils_inet4_ntop (info->address, sbuf),
nm_platform_link_get_name (NM_PLATFORM_GET, self->ifindex),
acd_error_to_string (r));
return FALSE;
@@ -261,7 +261,7 @@ acd_probe_add (NMAcdManager *self,
r = n_acd_probe (self->acd, &info->probe, probe_config);
if (r) {
_LOGW ("could not start probe for %s on interface '%s': %s",
- nm_utils_inet4_ntop (info->address, sbuf),
+ _nm_utils_inet4_ntop (info->address, sbuf),
nm_platform_link_get_name (NM_PLATFORM_GET, self->ifindex),
acd_error_to_string (r));
n_acd_probe_config_free (probe_config);
@@ -417,12 +417,12 @@ nm_acd_manager_announce_addresses (NMAcdManager *self)
r = n_acd_probe_announce (info->probe, N_ACD_DEFEND_ONCE);
if (r) {
_LOGW ("couldn't announce address %s on interface '%s': %s",
- nm_utils_inet4_ntop (info->address, sbuf),
+ _nm_utils_inet4_ntop (info->address, sbuf),
nm_platform_link_get_name (NM_PLATFORM_GET, self->ifindex),
acd_error_to_string (r));
success = FALSE;
} else
- _LOGD ("announcing address %s", nm_utils_inet4_ntop (info->address, sbuf));
+ _LOGD ("announcing address %s", _nm_utils_inet4_ntop (info->address, sbuf));
}
}
diff --git a/src/devices/nm-device-vxlan.c b/src/devices/nm-device-vxlan.c
index 29be6854be..9be385bf93 100644
--- a/src/devices/nm-device-vxlan.c
+++ b/src/devices/nm-device-vxlan.c
@@ -390,11 +390,11 @@ update_connection (NMDevice *device, NMConnection *connection)
if (!address_matches (nm_setting_vxlan_get_remote (s_vxlan), priv->props.group, &priv->props.group6)) {
if (priv->props.group) {
g_object_set (s_vxlan, NM_SETTING_VXLAN_REMOTE,
- nm_utils_inet4_ntop (priv->props.group, sbuf),
+ _nm_utils_inet4_ntop (priv->props.group, sbuf),
NULL);
} else {
g_object_set (s_vxlan, NM_SETTING_VXLAN_REMOTE,
- nm_utils_inet6_ntop (&priv->props.group6, sbuf),
+ _nm_utils_inet6_ntop (&priv->props.group6, sbuf),
NULL);
}
}
@@ -402,11 +402,11 @@ update_connection (NMDevice *device, NMConnection *connection)
if (!address_matches (nm_setting_vxlan_get_local (s_vxlan), priv->props.local, &priv->props.local6)) {
if (priv->props.local) {
g_object_set (s_vxlan, NM_SETTING_VXLAN_LOCAL,
- nm_utils_inet4_ntop (priv->props.local, sbuf),
+ _nm_utils_inet4_ntop (priv->props.local, sbuf),
NULL);
} else if (memcmp (&priv->props.local6, &in6addr_any, sizeof (in6addr_any))) {
g_object_set (s_vxlan, NM_SETTING_VXLAN_LOCAL,
- nm_utils_inet6_ntop (&priv->props.local6, sbuf),
+ _nm_utils_inet6_ntop (&priv->props.local6, sbuf),
NULL);
}
}
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 9d70bb54f5..dc23b3b9aa 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -7172,7 +7172,7 @@ acd_manager_probe_terminated (NMAcdManager *acd_manager, gpointer user_data)
_NMLOG (result ? LOGL_DEBUG : LOGL_WARN,
LOGD_DEVICE,
"IPv4 DAD result: address %s is %s",
- nm_utils_inet4_ntop (address->address, sbuf),
+ _nm_utils_inet4_ntop (address->address, sbuf),
result ? "unique" : "duplicate");
}
}
@@ -9277,7 +9277,7 @@ nm_device_use_ip6_subnet (NMDevice *self, const NMPlatformIP6Address *subnet)
applied_config_add_address (&priv->ac_ip6_config, NM_PLATFORM_IP_ADDRESS_CAST (&address));
_LOGD (LOGD_IP6, "ipv6-pd: using %s address (preferred for %u seconds)",
- nm_utils_inet6_ntop (&address.address, sbuf),
+ _nm_utils_inet6_ntop (&address.address, sbuf),
subnet->preferred);
/* This also updates the ndisc if there are actual changes. */
@@ -9457,7 +9457,7 @@ check_and_add_ipv6ll_addr (NMDevice *self)
}
_LOGD (LOGD_IP6, "linklocal6: generated %s IPv6LL address %s",
- addr_type, nm_utils_inet6_ntop (&lladdr, sbuf));
+ addr_type, _nm_utils_inet6_ntop (&lladdr, sbuf));
priv->ipv6ll_has = TRUE;
priv->ipv6ll_addr = lladdr;
ip_config_merge_and_apply (self, AF_INET6, TRUE);
@@ -10920,10 +10920,10 @@ start_sharing (NMDevice *self, NMIP4Config *config, GError **error)
g_return_val_if_fail (req, FALSE);
netmask = _nm_utils_ip4_prefix_to_netmask (ip4_addr->plen);
- nm_utils_inet4_ntop (netmask, str_mask);
+ _nm_utils_inet4_ntop (netmask, str_mask);
network = ip4_addr->address & netmask;
- nm_utils_inet4_ntop (network, str_addr);
+ _nm_utils_inet4_ntop (network, str_addr);
add_share_rule (req, "nat", "POSTROUTING --source %s/%s ! --destination %s/%s --jump MASQUERADE", str_addr, str_mask, str_addr, str_mask);
add_share_rule (req, "filter", "FORWARD --destination %s/%s --out-interface %s --match state --state ESTABLISHED,RELATED --jump ACCEPT", str_addr, str_mask, ip_iface);
@@ -13204,14 +13204,14 @@ nm_device_start_ip_check (NMDevice *self)
if (priv->ip_config_4 && priv->ip_state_4 == NM_DEVICE_IP_STATE_DONE) {
gw = nm_ip4_config_best_default_route_get (priv->ip_config_4);
if (gw) {
- nm_utils_inet4_ntop (NMP_OBJECT_CAST_IP4_ROUTE (gw)->gateway, buf);
+ _nm_utils_inet4_ntop (NMP_OBJECT_CAST_IP4_ROUTE (gw)->gateway, buf);
ping_binary = nm_utils_find_helper ("ping", "/usr/bin/ping", NULL);
log_domain = LOGD_IP4;
}
} else if (priv->ip_config_6 && priv->ip_state_6 == NM_DEVICE_IP_STATE_DONE) {
gw = nm_ip6_config_best_default_route_get (priv->ip_config_6);
if (gw) {
- nm_utils_inet6_ntop (&NMP_OBJECT_CAST_IP6_ROUTE (gw)->gateway, buf);
+ _nm_utils_inet6_ntop (&NMP_OBJECT_CAST_IP6_ROUTE (gw)->gateway, buf);
ping_binary = nm_utils_find_helper ("ping6", "/usr/bin/ping6", NULL);
log_domain = LOGD_IP6;
}
diff --git a/src/devices/tests/test-acd.c b/src/devices/tests/test-acd.c
index da5e4f2d71..32d6f6695a 100644
--- a/src/devices/tests/test-acd.c
+++ b/src/devices/tests/test-acd.c
@@ -157,7 +157,7 @@ again:
}
g_error ("expected check for address #%d (%s) to %s, but it didn't",
- i, nm_utils_inet4_ntop (info->addresses[i], sbuf),
+ i, _nm_utils_inet4_ntop (info->addresses[i], sbuf),
info->expected_result[i] ? "detect no duplicated" : "detect a duplicate");
}
}
diff --git a/src/dhcp/nm-dhcp-nettools.c b/src/dhcp/nm-dhcp-nettools.c
index c4547f4114..1119b3bf89 100644
--- a/src/dhcp/nm-dhcp-nettools.c
+++ b/src/dhcp/nm-dhcp-nettools.c
@@ -406,7 +406,7 @@ lease_parse_address (NDhcp4ClientLease *lease,
return FALSE;
}
- nm_utils_inet4_ntop (a_address.s_addr, addr_str);
+ _nm_utils_inet4_ntop (a_address.s_addr, addr_str);
a_plen = nm_utils_ip4_netmask_to_prefix (a_netmask.s_addr);
nm_dhcp_option_add_option (options,
@@ -416,7 +416,7 @@ lease_parse_address (NDhcp4ClientLease *lease,
nm_dhcp_option_add_option (options,
_nm_dhcp_option_dhcp4_options,
NM_DHCP_OPTION_DHCP4_SUBNET_MASK,
- nm_utils_inet4_ntop (a_netmask.s_addr, addr_str));
+ _nm_utils_inet4_ntop (a_netmask.s_addr, addr_str));
nm_dhcp_option_add_option_u64 (options,
_nm_dhcp_option_dhcp4_options,
@@ -433,7 +433,7 @@ lease_parse_address (NDhcp4ClientLease *lease,
n_dhcp4_client_lease_get_siaddr (lease, &a_next_server);
if (a_next_server.s_addr != INADDR_ANY) {
- nm_utils_inet4_ntop (a_next_server.s_addr, addr_str);
+ _nm_utils_inet4_ntop (a_next_server.s_addr, addr_str);
nm_dhcp_option_add_option (options,
_nm_dhcp_option_dhcp4_options,
NM_DHCP_OPTION_DHCP4_NM_NEXT_SERVER,
@@ -474,7 +474,7 @@ lease_parse_domain_name_servers (NDhcp4ClientLease *lease,
while (lease_option_next_in_addr (&addr, &data, &n_data)) {
- nm_utils_inet4_ntop (addr.s_addr, addr_str);
+ _nm_utils_inet4_ntop (addr.s_addr, addr_str);
g_string_append (nm_gstring_add_space_delimiter (str), addr_str);
if ( addr.s_addr == 0
@@ -520,8 +520,8 @@ lease_parse_routes (NDhcp4ClientLease *lease,
while (lease_option_next_route (&dest, &plen, &gateway, TRUE, &data, &n_data)) {
- nm_utils_inet4_ntop (dest.s_addr, dest_str);
- nm_utils_inet4_ntop (gateway.s_addr, gateway_str);
+ _nm_utils_inet4_ntop (dest.s_addr, dest_str);
+ _nm_utils_inet4_ntop (gateway.s_addr, gateway_str);
g_string_append_printf (nm_gstring_add_space_delimiter (str),
"%s/%d %s",
@@ -564,8 +564,8 @@ lease_parse_routes (NDhcp4ClientLease *lease,
while (lease_option_next_route (&dest, &plen, &gateway, FALSE, &data, &n_data)) {
- nm_utils_inet4_ntop (dest.s_addr, dest_str);
- nm_utils_inet4_ntop (gateway.s_addr, gateway_str);
+ _nm_utils_inet4_ntop (dest.s_addr, dest_str);
+ _nm_utils_inet4_ntop (gateway.s_addr, gateway_str);
g_string_append_printf (nm_gstring_add_space_delimiter (str),
"%s/%d %s",
@@ -610,7 +610,7 @@ lease_parse_routes (NDhcp4ClientLease *lease,
nm_gstring_prepare (&str);
while (lease_option_next_in_addr (&gateway, &data, &n_data)) {
- s = nm_utils_inet4_ntop (gateway.s_addr, gateway_str);
+ s = _nm_utils_inet4_ntop (gateway.s_addr, gateway_str);
g_string_append (nm_gstring_add_space_delimiter (str), s);
if (gateway.s_addr == 0) {
@@ -709,7 +709,7 @@ lease_parse_ntps (NDhcp4ClientLease *lease,
nm_gstring_prepare (&str);
while (lease_option_next_in_addr (&addr, &data, &n_data)) {
- nm_utils_inet4_ntop (addr.s_addr, addr_str);
+ _nm_utils_inet4_ntop (addr.s_addr, addr_str);
g_string_append (nm_gstring_add_space_delimiter (str), addr_str);
}
@@ -966,7 +966,7 @@ lease_save (NMDhcpNettools *self, NDhcp4ClientLease *lease, const char *lease_fi
return;
g_string_append_printf (new_contents,
- "ADDRESS=%s\n", nm_utils_inet4_ntop (a_address.s_addr, sbuf));
+ "ADDRESS=%s\n", _nm_utils_inet4_ntop (a_address.s_addr, sbuf));
if (!g_file_set_contents (lease_file,
new_contents->str,
diff --git a/src/dhcp/nm-dhcp-systemd.c b/src/dhcp/nm-dhcp-systemd.c
index b5ebd1bc98..3447ebf684 100644
--- a/src/dhcp/nm-dhcp-systemd.c
+++ b/src/dhcp/nm-dhcp-systemd.c
@@ -128,7 +128,7 @@ lease_to_ip4_config (NMDedupMultiIndex *multi_idx,
options = out_options ? nm_dhcp_option_create_options_dict () : NULL;
- nm_utils_inet4_ntop (a_address.s_addr, addr_str);
+ _nm_utils_inet4_ntop (a_address.s_addr, addr_str);
nm_dhcp_option_add_option (options,
_nm_dhcp_option_dhcp4_options,
NM_DHCP_OPTION_DHCP4_NM_IP_ADDRESS,
@@ -138,7 +138,7 @@ lease_to_ip4_config (NMDedupMultiIndex *multi_idx,
nm_dhcp_option_add_option (options,
_nm_dhcp_option_dhcp4_options,
NM_DHCP_OPTION_DHCP4_SUBNET_MASK,
- nm_utils_inet4_ntop (a_netmask.s_addr, addr_str));
+ _nm_utils_inet4_ntop (a_netmask.s_addr, addr_str));
nm_dhcp_option_add_option_u64 (options,
_nm_dhcp_option_dhcp4_options,
@@ -150,7 +150,7 @@ lease_to_ip4_config (NMDedupMultiIndex *multi_idx,
(guint64) (ts_time + a_lifetime));
if (sd_dhcp_lease_get_next_server (lease, &a_next_server) == 0) {
- nm_utils_inet4_ntop (a_next_server.s_addr, addr_str);
+ _nm_utils_inet4_ntop (a_next_server.s_addr, addr_str);
nm_dhcp_option_add_option (options,
_nm_dhcp_option_dhcp4_options,
NM_DHCP_OPTION_DHCP4_NM_NEXT_SERVER,
@@ -169,7 +169,7 @@ lease_to_ip4_config (NMDedupMultiIndex *multi_idx,
}));
if (sd_dhcp_lease_get_server_identifier (lease, &server_id) >= 0) {
- nm_utils_inet4_ntop (server_id.s_addr, addr_str);
+ _nm_utils_inet4_ntop (server_id.s_addr, addr_str);
nm_dhcp_option_add_option (options,
_nm_dhcp_option_dhcp4_options,
NM_DHCP_OPTION_DHCP4_SERVER_ID,
@@ -177,7 +177,7 @@ lease_to_ip4_config (NMDedupMultiIndex *multi_idx,
}
if (sd_dhcp_lease_get_broadcast (lease, &broadcast) >= 0) {
- nm_utils_inet4_ntop (broadcast.s_addr, addr_str);
+ _nm_utils_inet4_ntop (broadcast.s_addr, addr_str);
nm_dhcp_option_add_option (options,
_nm_dhcp_option_dhcp4_options,
NM_DHCP_OPTION_DHCP4_BROADCAST,
@@ -188,7 +188,7 @@ lease_to_ip4_config (NMDedupMultiIndex *multi_idx,
if (num > 0) {
nm_gstring_prepare (&str);
for (i = 0; i < num; i++) {
- nm_utils_inet4_ntop (addr_list[i].s_addr, addr_str);
+ _nm_utils_inet4_ntop (addr_list[i].s_addr, addr_str);
g_string_append (nm_gstring_add_space_delimiter (str), addr_str);
if ( addr_list[i].s_addr == 0
@@ -288,8 +288,8 @@ lease_to_ip4_config (NMDedupMultiIndex *multi_idx,
network_net = nm_utils_ip4_address_clear_host_address (r_network.s_addr,
r_plen);
- nm_utils_inet4_ntop (network_net, network_net_str);
- nm_utils_inet4_ntop (r_gateway.s_addr, gateway_str);
+ _nm_utils_inet4_ntop (network_net, network_net_str);
+ _nm_utils_inet4_ntop (r_gateway.s_addr, gateway_str);
g_string_append_printf (nm_gstring_add_space_delimiter ( option == NM_DHCP_OPTION_DHCP4_CLASSLESS_STATIC_ROUTE
? str_classless
@@ -359,7 +359,7 @@ lease_to_ip4_config (NMDedupMultiIndex *multi_idx,
for (i = 0; i < num; i++) {
guint32 m;
- s = nm_utils_inet4_ntop (a_router[i].s_addr, addr_str);
+ s = _nm_utils_inet4_ntop (a_router[i].s_addr, addr_str);
g_string_append (nm_gstring_add_space_delimiter (str), s);
if (a_router[i].s_addr == 0) {
@@ -411,7 +411,7 @@ lease_to_ip4_config (NMDedupMultiIndex *multi_idx,
if (num > 0) {
nm_gstring_prepare (&str);
for (i = 0; i < num; i++) {
- nm_utils_inet4_ntop (addr_list[i].s_addr, addr_str);
+ _nm_utils_inet4_ntop (addr_list[i].s_addr, addr_str);
g_string_append (nm_gstring_add_space_delimiter (str), addr_str);
}
nm_dhcp_option_add_option (options,
@@ -750,7 +750,7 @@ lease_to_ip6_config (NMDedupMultiIndex *multi_idx,
nm_ip6_config_add_address (ip6_config, &address);
- nm_utils_inet6_ntop (&tmp_addr, addr_str);
+ _nm_utils_inet6_ntop (&tmp_addr, addr_str);
g_string_append (nm_gstring_add_space_delimiter (str), addr_str);
};
if (str->len)
@@ -772,7 +772,7 @@ lease_to_ip6_config (NMDedupMultiIndex *multi_idx,
if (num > 0) {
nm_gstring_prepare (&str);
for (i = 0; i < num; i++) {
- nm_utils_inet6_ntop (&dns[i], addr_str);
+ _nm_utils_inet6_ntop (&dns[i], addr_str);
g_string_append (nm_gstring_add_space_delimiter (str), addr_str);
nm_ip6_config_add_nameserver (ip6_config, &dns[i]);
}
diff --git a/src/dhcp/nm-dhcp-utils.c b/src/dhcp/nm-dhcp-utils.c
index e1c1fa1d85..d8e5a65328 100644
--- a/src/dhcp/nm-dhcp-utils.c
+++ b/src/dhcp/nm-dhcp-utils.c
@@ -181,9 +181,9 @@ ip4_process_dhclient_rfc3442_routes (const char *iface,
nm_ip4_config_add_route (ip4_config, &route, NULL);
_LOG2I (LOGD_DHCP4, iface, " classless static route %s/%d gw %s",
- nm_utils_inet4_ntop (route.network, b1),
+ _nm_utils_inet4_ntop (route.network, b1),
route.plen,
- nm_utils_inet4_ntop (route.gateway, b2));
+ _nm_utils_inet4_ntop (route.gateway, b2));
}
}
@@ -414,7 +414,7 @@ nm_dhcp_utils_ip4_config_from_options (NMDedupMultiIndex *multi_idx,
process_classful_routes (iface, options, route_table, route_metric, ip4_config);
if (gateway) {
- _LOG2I (LOGD_DHCP4, iface, " gateway %s", nm_utils_inet4_ntop (gateway, sbuf));
+ _LOG2I (LOGD_DHCP4, iface, " gateway %s", _nm_utils_inet4_ntop (gateway, sbuf));
gateway_has = TRUE;
} else {
/* If the gateway wasn't provided as a classless static route with a
diff --git a/src/dns/nm-dns-dnsmasq.c b/src/dns/nm-dns-dnsmasq.c
index e2bd0b790d..81a55834fd 100644
--- a/src/dns/nm-dns-dnsmasq.c
+++ b/src/dns/nm-dns-dnsmasq.c
@@ -726,9 +726,9 @@ ip_addr_to_string (int addr_family, gconstpointer addr, const char *iface, char
separator = "@";
} else {
if (IN6_IS_ADDR_V4MAPPED (addr))
- nm_utils_inet4_ntop (((const struct in6_addr *) addr)->s6_addr32[3], buf2);
+ _nm_utils_inet4_ntop (((const struct in6_addr *) addr)->s6_addr32[3], buf2);
else
- nm_utils_inet6_ntop (addr, buf2);
+ _nm_utils_inet6_ntop (addr, buf2);
/* Need to scope link-local addresses with %<zone-id>. Before dnsmasq 2.58,
* only '@' was supported as delimiter. Since 2.58, '@' and '%' are
* supported. Due to a bug, since 2.73 only '%' works properly as "server"
diff --git a/src/dns/nm-dns-manager.c b/src/dns/nm-dns-manager.c
index c7ca0b47f4..d4316c55fe 100644
--- a/src/dns/nm-dns-manager.c
+++ b/src/dns/nm-dns-manager.c
@@ -425,9 +425,9 @@ merge_one_ip_config (NMResolvConfData *rc,
if (addr_family == AF_INET)
nm_utils_inet_ntop (addr_family, addr, buf);
else if (IN6_IS_ADDR_V4MAPPED (addr))
- nm_utils_inet4_ntop (addr->addr6.s6_addr32[3], buf);
+ _nm_utils_inet4_ntop (addr->addr6.s6_addr32[3], buf);
else {
- nm_utils_inet6_ntop (&addr->addr6, buf);
+ _nm_utils_inet6_ntop (&addr->addr6, buf);
if (IN6_IS_ADDR_LINKLOCAL (addr)) {
const char *ifname;
@@ -457,7 +457,7 @@ merge_one_ip_config (NMResolvConfData *rc,
num = nm_ip4_config_get_num_nis_servers (ip4_config);
for (i = 0; i < num; i++) {
add_string_item (rc->nis_servers,
- nm_utils_inet4_ntop (nm_ip4_config_get_nis_server (ip4_config, i), buf),
+ _nm_utils_inet4_ntop (nm_ip4_config_get_nis_server (ip4_config, i), buf),
TRUE);
}
diff --git a/src/dnsmasq/nm-dnsmasq-manager.c b/src/dnsmasq/nm-dnsmasq-manager.c
index 735605eec0..983c525a00 100644
--- a/src/dnsmasq/nm-dnsmasq-manager.c
+++ b/src/dnsmasq/nm-dnsmasq-manager.c
@@ -140,7 +140,7 @@ create_dm_cmd_line (const char *iface,
*/
nm_strv_ptrarray_add_string_dup (cmd, "--strict-order");
- nm_utils_inet4_ntop (listen_address->address, listen_address_s);
+ _nm_utils_inet4_ntop (listen_address->address, listen_address_s);
nm_strv_ptrarray_add_string_concat (cmd, "--listen-address=", listen_address_s);
@@ -169,7 +169,7 @@ create_dm_cmd_line (const char *iface,
g_string_append (s, "--dhcp-option=option:dns-server");
for (i = 0; i < n; i++) {
g_string_append_c (s, ',');
- g_string_append (s, nm_utils_inet4_ntop (nm_ip4_config_get_nameserver (ip4_config, i), tmpaddr));
+ g_string_append (s, _nm_utils_inet4_ntop (nm_ip4_config_get_nameserver (ip4_config, i), tmpaddr));
}
nm_strv_ptrarray_take_gstring (cmd, &s);
}
diff --git a/src/dnsmasq/nm-dnsmasq-utils.c b/src/dnsmasq/nm-dnsmasq-utils.c
index 01d59eccc7..2373b4220b 100644
--- a/src/dnsmasq/nm-dnsmasq-utils.c
+++ b/src/dnsmasq/nm-dnsmasq-utils.c
@@ -95,9 +95,8 @@ nm_dnsmasq_utils_get_range (const NMPlatformIP4Address *addr,
first = htonl (first);
last = htonl (last);
- nm_utils_inet4_ntop (first, out_first);
- nm_utils_inet4_ntop (last, out_last);
+ _nm_utils_inet4_ntop (first, out_first);
+ _nm_utils_inet4_ntop (last, out_last);
return TRUE;
}
-
diff --git a/src/ndisc/nm-ndisc.c b/src/ndisc/nm-ndisc.c
index 7369bacddc..e6174a99b6 100644
--- a/src/ndisc/nm-ndisc.c
+++ b/src/ndisc/nm-ndisc.c
@@ -951,7 +951,7 @@ nm_ndisc_dad_failed (NMNDisc *ndisc, const struct in6_addr *address, gboolean em
if (IN6_ARE_ADDR_EQUAL (&item->address, address)) {
char sbuf[NM_UTILS_INET_ADDRSTRLEN];
- _LOGD ("DAD failed for discovered address %s", nm_utils_inet6_ntop (address, sbuf));
+ _LOGD ("DAD failed for discovered address %s", _nm_utils_inet6_ntop (address, sbuf));
changed = TRUE;
if (!complete_address (ndisc, item)) {
g_array_remove_index (rdata->addresses, i);
@@ -1054,7 +1054,7 @@ _config_changed_log (NMNDisc *ndisc, NMNDiscConfigMap changed)
inet_ntop (AF_INET6, &route->network, addrstr, sizeof (addrstr));
_LOGD (" route %s/%u via %s pref %s exp %s", addrstr, (guint) route->plen,
- nm_utils_inet6_ntop (&route->gateway, sbuf),
+ _nm_utils_inet6_ntop (&route->gateway, sbuf),
nm_icmpv6_router_pref_to_string (route->preference, str_pref, sizeof (str_pref)),
get_exp (str_exp, now_ns, route));
}
diff --git a/src/nm-core-utils.c b/src/nm-core-utils.c
index 1438a0bb5e..03dbbcf81f 100644
--- a/src/nm-core-utils.c
+++ b/src/nm-core-utils.c
@@ -3003,8 +3003,9 @@ nm_utils_inet6_interface_identifier_to_token (NMUtilsIPv6IfaceId iid, char *buf)
{
struct in6_addr i6_token = { .s6_addr = { 0, } };
+ nm_assert (buf);
nm_utils_ipv6_addr_set_interface_identifier (&i6_token, iid);
- return nm_utils_inet6_ntop (&i6_token, buf);
+ return _nm_utils_inet6_ntop (&i6_token, buf);
}
/*****************************************************************************/
diff --git a/src/nm-ip4-config.c b/src/nm-ip4-config.c
index cd14fb8f94..ae637aeedc 100644
--- a/src/nm-ip4-config.c
+++ b/src/nm-ip4-config.c
@@ -1097,8 +1097,8 @@ nm_ip4_config_create_setting (const NMIP4Config *self)
&& nm_setting_ip_config_get_num_addresses (s_ip4) > 0) {
g_object_set (s_ip4,
NM_SETTING_IP_CONFIG_GATEWAY,
- nm_utils_inet4_ntop (NMP_OBJECT_CAST_IP4_ROUTE (priv->best_default_route)->gateway,
- sbuf),
+ _nm_utils_inet4_ntop (NMP_OBJECT_CAST_IP4_ROUTE (priv->best_default_route)->gateway,
+ sbuf),
NULL);
}
@@ -1133,7 +1133,7 @@ nm_ip4_config_create_setting (const NMIP4Config *self)
for (i = 0; i < nnameservers; i++) {
guint32 nameserver = nm_ip4_config_get_nameserver (self, i);
- nm_setting_ip_config_add_dns (s_ip4, nm_utils_inet4_ntop (nameserver, sbuf));
+ nm_setting_ip_config_add_dns (s_ip4, _nm_utils_inet4_ntop (nameserver, sbuf));
}
for (i = 0; i < nsearches; i++) {
const char *search = nm_ip4_config_get_search (self, i);
@@ -3096,14 +3096,14 @@ get_property (GObject *object, guint prop_id,
g_variant_builder_init (&addr_builder, G_VARIANT_TYPE ("a{sv}"));
g_variant_builder_add (&addr_builder, "{sv}",
"address",
- g_variant_new_string (nm_utils_inet4_ntop (address->address, addr_str)));
+ g_variant_new_string (_nm_utils_inet4_ntop (address->address, addr_str)));
g_variant_builder_add (&addr_builder, "{sv}",
"prefix",
g_variant_new_uint32 (address->plen));
if (address->peer_address != address->address) {
g_variant_builder_add (&addr_builder, "{sv}",
"peer",
- g_variant_new_string (nm_utils_inet4_ntop (address->peer_address, addr_str)));
+ g_variant_new_string (_nm_utils_inet4_ntop (address->peer_address, addr_str)));
}
if (*address->label) {
@@ -3158,14 +3158,14 @@ out_addresses_cached:
g_variant_builder_init (&route_builder, G_VARIANT_TYPE ("a{sv}"));
g_variant_builder_add (&route_builder, "{sv}",
"dest",
- g_variant_new_string (nm_utils_inet4_ntop (route->network, addr_str)));
+ g_variant_new_string (_nm_utils_inet4_ntop (route->network, addr_str)));
g_variant_builder_add (&route_builder, "{sv}",
"prefix",
g_variant_new_uint32 (route->plen));
if (route->gateway) {
g_variant_builder_add (&route_builder, "{sv}",
"next-hop",
- g_variant_new_string (nm_utils_inet4_ntop (route->gateway, addr_str)));
+ g_variant_new_string (_nm_utils_inet4_ntop (route->gateway, addr_str)));
}
g_variant_builder_add (&route_builder, "{sv}",
"metric",
@@ -3218,8 +3218,8 @@ out_routes_cached:
for (i = 0; i < priv->nameservers->len; i++) {
GVariantBuilder nested_builder;
- nm_utils_inet4_ntop (g_array_index (priv->nameservers, in_addr_t, i),
- addr_str);
+ _nm_utils_inet4_ntop (g_array_index (priv->nameservers, in_addr_t, i),
+ addr_str);
g_variant_builder_init (&nested_builder, G_VARIANT_TYPE ("a{sv}"));
g_variant_builder_add (&nested_builder, "{sv}",
@@ -3255,8 +3255,8 @@ out_routes_cached:
for (i = 0; i < priv->wins->len; i++) {
g_variant_builder_add (&builder_data,
"s",
- nm_utils_inet4_ntop (g_array_index (priv->wins, in_addr_t, i),
- addr_str));
+ _nm_utils_inet4_ntop (g_array_index (priv->wins, in_addr_t, i),
+ addr_str));
}
g_value_take_variant (value,
g_variant_builder_end (&builder_data));
diff --git a/src/nm-ip6-config.c b/src/nm-ip6-config.c
index 1255365745..5acb3932d0 100644
--- a/src/nm-ip6-config.c
+++ b/src/nm-ip6-config.c
@@ -764,8 +764,8 @@ nm_ip6_config_create_setting (const NMIP6Config *self)
&& nm_setting_ip_config_get_num_addresses (s_ip6) > 0) {
g_object_set (s_ip6,
NM_SETTING_IP_CONFIG_GATEWAY,
- nm_utils_inet6_ntop (&NMP_OBJECT_CAST_IP6_ROUTE (priv->best_default_route)->gateway,
- sbuf),
+ _nm_utils_inet6_ntop (&NMP_OBJECT_CAST_IP6_ROUTE (priv->best_default_route)->gateway,
+ sbuf),
NULL);
}
@@ -807,7 +807,7 @@ nm_ip6_config_create_setting (const NMIP6Config *self)
for (i = 0; i < nnameservers; i++) {
const struct in6_addr *nameserver = nm_ip6_config_get_nameserver (self, i);
- nm_setting_ip_config_add_dns (s_ip6, nm_utils_inet6_ntop (nameserver, sbuf));
+ nm_setting_ip_config_add_dns (s_ip6, _nm_utils_inet6_ntop (nameserver, sbuf));
}
for (i = 0; i < nsearches; i++) {
const char *search = nm_ip6_config_get_search (self, i);
@@ -2556,7 +2556,7 @@ get_property (GObject *object, guint prop_id,
g_variant_builder_init (&addr_builder, G_VARIANT_TYPE ("a{sv}"));
g_variant_builder_add (&addr_builder, "{sv}",
"address",
- g_variant_new_string (nm_utils_inet6_ntop (&address->address, sbuf)));
+ g_variant_new_string (_nm_utils_inet6_ntop (&address->address, sbuf)));
g_variant_builder_add (&addr_builder, "{sv}",
"prefix",
g_variant_new_uint32 (address->plen));
@@ -2564,7 +2564,7 @@ get_property (GObject *object, guint prop_id,
&& !IN6_ARE_ADDR_EQUAL (&address->peer_address, &address->address)) {
g_variant_builder_add (&addr_builder, "{sv}",
"peer",
- g_variant_new_string (nm_utils_inet6_ntop (&address->peer_address, sbuf)));
+ g_variant_new_string (_nm_utils_inet6_ntop (&address->peer_address, sbuf)));
}
g_variant_builder_add (&builder_data, "a{sv}", &addr_builder);
@@ -2609,14 +2609,14 @@ out_addresses_cached:
g_variant_builder_init (&route_builder, G_VARIANT_TYPE ("a{sv}"));
g_variant_builder_add (&route_builder, "{sv}",
"dest",
- g_variant_new_string (nm_utils_inet6_ntop (&route->network, sbuf)));
+ g_variant_new_string (_nm_utils_inet6_ntop (&route->network, sbuf)));
g_variant_builder_add (&route_builder, "{sv}",
"prefix",
g_variant_new_uint32 (route->plen));
if (!IN6_IS_ADDR_UNSPECIFIED (&route->gateway)) {
g_variant_builder_add (&route_builder, "{sv}",
"next-hop",
- g_variant_new_string (nm_utils_inet6_ntop (&route->gateway, sbuf)));
+ g_variant_new_string (_nm_utils_inet6_ntop (&route->gateway, sbuf)));
}
g_variant_builder_add (&route_builder, "{sv}",
diff --git a/src/nm-pacrunner-manager.c b/src/nm-pacrunner-manager.c
index b5c7bc026a..091a630536 100644
--- a/src/nm-pacrunner-manager.c
+++ b/src/nm-pacrunner-manager.c
@@ -145,7 +145,7 @@ get_ip_domains (GPtrArray *domains, NMIPConfig *ip_config)
nm_ip_config_iter_ip4_address_for_each (&ipconf_iter, (NMIP4Config *) ip_config, &address) {
cidr = g_strdup_printf ("%s/%u",
- nm_utils_inet4_ntop (address->address, sbuf),
+ _nm_utils_inet4_ntop (address->address, sbuf),
address->plen);
g_ptr_array_add (domains, cidr);
}
@@ -154,7 +154,7 @@ get_ip_domains (GPtrArray *domains, NMIPConfig *ip_config)
nm_ip_config_iter_ip6_address_for_each (&ipconf_iter, (NMIP6Config *) ip_config, &address) {
cidr = g_strdup_printf ("%s/%u",
- nm_utils_inet6_ntop (&address->address, sbuf),
+ _nm_utils_inet6_ntop (&address->address, sbuf),
address->plen);
g_ptr_array_add (domains, cidr);
}
@@ -167,7 +167,7 @@ get_ip_domains (GPtrArray *domains, NMIPConfig *ip_config)
if (NM_PLATFORM_IP_ROUTE_IS_DEFAULT (routes))
continue;
cidr = g_strdup_printf ("%s/%u",
- nm_utils_inet4_ntop (routes->network, sbuf),
+ _nm_utils_inet4_ntop (routes->network, sbuf),
routes->plen);
g_ptr_array_add (domains, cidr);
}
@@ -178,7 +178,7 @@ get_ip_domains (GPtrArray *domains, NMIPConfig *ip_config)
if (NM_PLATFORM_IP_ROUTE_IS_DEFAULT (routes))
continue;
cidr = g_strdup_printf ("%s/%u",
- nm_utils_inet6_ntop (&routes->network, sbuf),
+ _nm_utils_inet6_ntop (&routes->network, sbuf),
routes->plen);
g_ptr_array_add (domains, cidr);
}
diff --git a/src/nm-policy.c b/src/nm-policy.c
index 56bec87b3d..b79ea8f0cf 100644
--- a/src/nm-policy.c
+++ b/src/nm-policy.c
@@ -184,7 +184,7 @@ clear_ip6_prefix_delegation (gpointer data)
char sbuf[NM_UTILS_INET_ADDRSTRLEN];
_LOGD (LOGD_IP6, "ipv6-pd: undelegating prefix %s/%d",
- nm_utils_inet6_ntop (&delegation->prefix.address, sbuf),
+ _nm_utils_inet6_ntop (&delegation->prefix.address, sbuf),
delegation->prefix.plen);
g_hash_table_foreach (delegation->subnets, _clear_ip6_subnet, NULL);
@@ -225,7 +225,7 @@ ip6_subnet_from_delegation (IP6PrefixDelegation *delegation, NMDevice *device)
/* Check for out-of-prefixes condition. */
if (delegation->next_subnet >= (1 << (64 - delegation->prefix.plen))) {
_LOGD (LOGD_IP6, "ipv6-pd: no more prefixes in %s/%d",
- nm_utils_inet6_ntop (&delegation->prefix.address, sbuf),
+ _nm_utils_inet6_ntop (&delegation->prefix.address, sbuf),
delegation->prefix.plen);
return FALSE;
}
@@ -253,7 +253,7 @@ ip6_subnet_from_delegation (IP6PrefixDelegation *delegation, NMDevice *device)
subnet->preferred = delegation->prefix.preferred;
_LOGD (LOGD_IP6, "ipv6-pd: %s allocated from a /%d prefix on %s",
- nm_utils_inet6_ntop (&subnet->address, sbuf),
+ _nm_utils_inet6_ntop (&subnet->address, sbuf),
delegation->prefix.plen,
nm_device_get_iface (device));
@@ -327,7 +327,7 @@ device_ip6_prefix_delegated (NMDevice *device,
char sbuf[NM_UTILS_INET_ADDRSTRLEN];
_LOGI (LOGD_IP6, "ipv6-pd: received a prefix %s/%d from %s",
- nm_utils_inet6_ntop (&prefix->address, sbuf),
+ _nm_utils_inet6_ntop (&prefix->address, sbuf),
prefix->plen,
nm_device_get_iface (device));
diff --git a/src/platform/nm-fake-platform.c b/src/platform/nm-fake-platform.c
index a3c12becdd..2d2524624d 100644
--- a/src/platform/nm-fake-platform.c
+++ b/src/platform/nm-fake-platform.c
@@ -1237,10 +1237,10 @@ ip_route_add (NMPlatform *platform,
if (addr_family == AF_INET) {
nm_log_warn (LOGD_PLATFORM, "Fake platform: failure adding ip4-route '%d: %s/%d %d': Network Unreachable",
- r->ifindex, nm_utils_inet4_ntop (r4->network, sbuf), r->plen, r->metric);
+ r->ifindex, _nm_utils_inet4_ntop (r4->network, sbuf), r->plen, r->metric);
} else {
nm_log_warn (LOGD_PLATFORM, "Fake platform: failure adding ip6-route '%d: %s/%d %d': Network Unreachable",
- r->ifindex, nm_utils_inet6_ntop (&r6->network, sbuf), r->plen, r->metric);
+ r->ifindex, _nm_utils_inet6_ntop (&r6->network, sbuf), r->plen, r->metric);
}
return -NME_UNSPEC;
}
diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c
index 82d79d7a44..2b554cb4b9 100644
--- a/src/platform/nm-platform.c
+++ b/src/platform/nm-platform.c
@@ -3399,12 +3399,12 @@ nm_platform_ip4_address_delete (NMPlatform *self, int ifindex, in_addr_t address
g_return_val_if_fail (plen <= 32, FALSE);
_LOG3D ("address: deleting IPv4 address %s/%d, %s%s",
- nm_utils_inet4_ntop (address, b1),
+ _nm_utils_inet4_ntop (address, b1),
plen,
peer_address != address
? nm_sprintf_buf (str_peer,
"peer %s, ",
- nm_utils_inet4_ntop (peer_address, b2))
+ _nm_utils_inet4_ntop (peer_address, b2))
: "",
_to_string_dev (self, ifindex, str_dev, sizeof (str_dev)));
return klass->ip4_address_delete (self, ifindex, address, plen, peer_address);
@@ -3422,7 +3422,7 @@ nm_platform_ip6_address_delete (NMPlatform *self, int ifindex, struct in6_addr a
g_return_val_if_fail (plen <= 128, FALSE);
_LOG3D ("address: deleting IPv6 address %s/%d, %s",
- nm_utils_inet6_ntop (&address, sbuf), plen,
+ _nm_utils_inet6_ntop (&address, sbuf), plen,
_to_string_dev (self, ifindex, str_dev, sizeof (str_dev)));
return klass->ip6_address_delete (self, ifindex, address, plen);
}
@@ -5255,16 +5255,16 @@ nm_platform_lnk_gre_to_string (const NMPlatformLnkGre *lnk, char *buf, gsize len
"%s" /* okey */
"",
lnk->is_tap ? "tap" : "",
- lnk->remote ? nm_sprintf_buf (str_remote, " remote %s", nm_utils_inet4_ntop (lnk->remote, str_remote1)) : "",
- lnk->local ? nm_sprintf_buf (str_local, " local %s", nm_utils_inet4_ntop (lnk->local, str_local1)) : "",
+ lnk->remote ? nm_sprintf_buf (str_remote, " remote %s", _nm_utils_inet4_ntop (lnk->remote, str_remote1)) : "",
+ lnk->local ? nm_sprintf_buf (str_local, " local %s", _nm_utils_inet4_ntop (lnk->local, str_local1)) : "",
lnk->parent_ifindex ? nm_sprintf_buf (str_parent_ifindex, " dev %d", lnk->parent_ifindex) : "",
lnk->ttl ? nm_sprintf_buf (str_ttl, " ttl %u", lnk->ttl) : " ttl inherit",
lnk->tos ? (lnk->tos == 1 ? " tos inherit" : nm_sprintf_buf (str_tos, " tos 0x%x", lnk->tos)) : "",
lnk->path_mtu_discovery ? "" : " nopmtudisc",
lnk->input_flags ? nm_sprintf_buf (str_input_flags, " iflags 0x%x", lnk->input_flags) : "",
lnk->output_flags ? nm_sprintf_buf (str_output_flags, " oflags 0x%x", lnk->output_flags) : "",
- NM_FLAGS_HAS (lnk->input_flags, GRE_KEY) || lnk->input_key ? nm_sprintf_buf (str_input_key, " ikey %s", nm_utils_inet4_ntop (lnk->input_key, str_input_key1)) : "",
- NM_FLAGS_HAS (lnk->output_flags, GRE_KEY) || lnk->output_key ? nm_sprintf_buf (str_output_key, " okey %s", nm_utils_inet4_ntop (lnk->output_key, str_output_key1)) : "");
+ NM_FLAGS_HAS (lnk->input_flags, GRE_KEY) || lnk->input_key ? nm_sprintf_buf (str_input_key, " ikey %s", _nm_utils_inet4_ntop (lnk->input_key, str_input_key1)) : "",
+ NM_FLAGS_HAS (lnk->output_flags, GRE_KEY) || lnk->output_key ? nm_sprintf_buf (str_output_key, " okey %s", _nm_utils_inet4_ntop (lnk->output_key, str_output_key1)) : "");
return buf;
}
@@ -5323,8 +5323,8 @@ nm_platform_lnk_ip6tnl_to_string (const NMPlatformLnkIp6Tnl *lnk, char *buf, gsi
" flags 0x%x"
"",
str_type,
- nm_sprintf_buf (str_remote, " remote %s", nm_utils_inet6_ntop (&lnk->remote, str_remote1)),
- nm_sprintf_buf (str_local, " local %s", nm_utils_inet6_ntop (&lnk->local, str_local1)),
+ nm_sprintf_buf (str_remote, " remote %s", _nm_utils_inet6_ntop (&lnk->remote, str_remote1)),
+ nm_sprintf_buf (str_local, " local %s", _nm_utils_inet6_ntop (&lnk->local, str_local1)),
lnk->parent_ifindex ? nm_sprintf_buf (str_parent_ifindex, " dev %d", lnk->parent_ifindex) : "",
lnk->ttl ? nm_sprintf_buf (str_ttl, " ttl %u", lnk->ttl) : " ttl inherit",
lnk->tclass == 1 ? " tclass inherit" : nm_sprintf_buf (str_tclass, " tclass 0x%x", lnk->tclass),
@@ -5358,8 +5358,8 @@ nm_platform_lnk_ipip_to_string (const NMPlatformLnkIpIp *lnk, char *buf, gsize l
"%s" /* tos */
"%s" /* path_mtu_discovery */
"",
- lnk->remote ? nm_sprintf_buf (str_remote, " remote %s", nm_utils_inet4_ntop (lnk->remote, str_remote1)) : "",
- lnk->local ? nm_sprintf_buf (str_local, " local %s", nm_utils_inet4_ntop (lnk->local, str_local1)) : "",
+ lnk->remote ? nm_sprintf_buf (str_remote, " remote %s", _nm_utils_inet4_ntop (lnk->remote, str_remote1)) : "",
+ lnk->local ? nm_sprintf_buf (str_local, " local %s", _nm_utils_inet4_ntop (lnk->local, str_local1)) : "",
lnk->parent_ifindex ? nm_sprintf_buf (str_parent_ifindex, " dev %d", lnk->parent_ifindex) : "",
lnk->ttl ? nm_sprintf_buf (str_ttl, " ttl %u", lnk->ttl) : " ttl inherit",
lnk->tos ? (lnk->tos == 1 ? " tos inherit" : nm_sprintf_buf (str_tos, " tos 0x%x", lnk->tos)) : "",
@@ -5441,8 +5441,8 @@ nm_platform_lnk_sit_to_string (const NMPlatformLnkSit *lnk, char *buf, gsize len
"%s" /* flags */
"%s" /* proto */
"",
- lnk->remote ? nm_sprintf_buf (str_remote, " remote %s", nm_utils_inet4_ntop (lnk->remote, str_remote1)) : "",
- lnk->local ? nm_sprintf_buf (str_local, " local %s", nm_utils_inet4_ntop (lnk->local, str_local1)) : "",
+ lnk->remote ? nm_sprintf_buf (str_remote, " remote %s", _nm_utils_inet4_ntop (lnk->remote, str_remote1)) : "",
+ lnk->local ? nm_sprintf_buf (str_local, " local %s", _nm_utils_inet4_ntop (lnk->local, str_local1)) : "",
lnk->parent_ifindex ? nm_sprintf_buf (str_parent_ifindex, " dev %d", lnk->parent_ifindex) : "",
lnk->ttl ? nm_sprintf_buf (str_ttl, " ttl %u", lnk->ttl) : " ttl inherit",
lnk->tos ? (lnk->tos == 1 ? " tos inherit" : nm_sprintf_buf (str_tos, " tos 0x%x", lnk->tos)) : "",
@@ -5543,7 +5543,7 @@ nm_platform_lnk_vxlan_to_string (const NMPlatformLnkVxlan *lnk, char *buf, gsize
g_snprintf (str_group, sizeof (str_group),
" %s %s",
IN_MULTICAST (ntohl (lnk->group)) ? "group" : "remote",
- nm_utils_inet4_ntop (lnk->group, sbuf));
+ _nm_utils_inet4_ntop (lnk->group, sbuf));
}
if (IN6_IS_ADDR_UNSPECIFIED (&lnk->group6))
str_group6[0] = '\0';
@@ -5552,7 +5552,7 @@ nm_platform_lnk_vxlan_to_string (const NMPlatformLnkVxlan *lnk, char *buf, gsize
" %s%s %s",
IN6_IS_ADDR_MULTICAST (&lnk->group6) ? "group" : "remote",
str_group[0] ? "6" : "", /* usually, a vxlan has either v4 or v6 only. */
- nm_utils_inet6_ntop (&lnk->group6, sbuf));
+ _nm_utils_inet6_ntop (&lnk->group6, sbuf));
}
if (lnk->local == 0)
@@ -5560,7 +5560,7 @@ nm_platform_lnk_vxlan_to_string (const NMPlatformLnkVxlan *lnk, char *buf, gsize
else {
g_snprintf (str_local, sizeof (str_local),
" local %s",
- nm_utils_inet4_ntop (lnk->local, sbuf));
+ _nm_utils_inet4_ntop (lnk->local, sbuf));
}
if (IN6_IS_ADDR_UNSPECIFIED (&lnk->local6))
str_local6[0] = '\0';
@@ -5568,7 +5568,7 @@ nm_platform_lnk_vxlan_to_string (const NMPlatformLnkVxlan *lnk, char *buf, gsize
g_snprintf (str_local6, sizeof (str_local6),
" local%s %s",
str_local[0] ? "6" : "", /* usually, a vxlan has either v4 or v6 only. */
- nm_utils_inet6_ntop (&lnk->local6, sbuf));
+ _nm_utils_inet6_ntop (&lnk->local6, sbuf));
}
g_snprintf (buf, len,
@@ -6064,7 +6064,7 @@ nm_platform_ip6_route_to_string (const NMPlatformIP6Route *route, char *buf, gsi
route->mss,
nmp_utils_ip_config_source_to_string (route->rt_source, s_source, sizeof (s_source)),
route->src_plen || !IN6_IS_ADDR_UNSPECIFIED (&route->src)
- ? nm_sprintf_buf (s_src_all, " src %s/%u", nm_utils_inet6_ntop (&route->src, s_src), (unsigned) route->src_plen)
+ ? nm_sprintf_buf (s_src_all, " src %s/%u", _nm_utils_inet6_ntop (&route->src, s_src), (unsigned) route->src_plen)
: "",
_rtm_flags_to_string_full (str_rtm_flags, sizeof (str_rtm_flags), route->r_rtm_flags),
s_pref_src[0] ? " pref-src " : "",
diff --git a/src/platform/nmp-object.c b/src/platform/nmp-object.c
index 12f90aee1c..309192c3a8 100644
--- a/src/platform/nmp-object.c
+++ b/src/platform/nmp-object.c
@@ -233,13 +233,13 @@ nm_sock_addr_union_to_string (const NMSockAddrUnion *sa,
case AF_INET:
g_snprintf (buf, len,
"%s:%u",
- nm_utils_inet4_ntop (sa->in.sin_addr.s_addr, s_addr),
+ _nm_utils_inet4_ntop (sa->in.sin_addr.s_addr, s_addr),
(guint) htons (sa->in.sin_port));
break;
case AF_INET6:
g_snprintf (buf, len,
"[%s%s]:%u",
- nm_utils_inet6_ntop (&sa->in6.sin6_addr, s_addr),
+ _nm_utils_inet6_ntop (&sa->in6.sin6_addr, s_addr),
( sa->in6.sin6_scope_id != 0
? nm_sprintf_buf (s_scope_id, "%u", sa->in6.sin6_scope_id)
: ""),
@@ -1082,10 +1082,10 @@ _vt_cmd_plobj_to_string_id_##type (const NMPlatformObject *_obj, char *buf, gsiz
return buf; \
}
_vt_cmd_plobj_to_string_id (link, NMPlatformLink, "%d", obj->ifindex);
-_vt_cmd_plobj_to_string_id (ip4_address, NMPlatformIP4Address, "%d: %s/%d%s%s", obj->ifindex, nm_utils_inet4_ntop ( obj->address, buf1), obj->plen,
+_vt_cmd_plobj_to_string_id (ip4_address, NMPlatformIP4Address, "%d: %s/%d%s%s", obj->ifindex, _nm_utils_inet4_ntop ( obj->address, buf1), obj->plen,
obj->peer_address != obj->address ? "," : "",
- obj->peer_address != obj->address ? nm_utils_inet4_ntop (nm_utils_ip4_address_clear_host_address (obj->peer_address, obj->plen), buf2) : "");
-_vt_cmd_plobj_to_string_id (ip6_address, NMPlatformIP6Address, "%d: %s", obj->ifindex, nm_utils_inet6_ntop (&obj->address, buf1));
+ obj->peer_address != obj->address ? _nm_utils_inet4_ntop (nm_utils_ip4_address_clear_host_address (obj->peer_address, obj->plen), buf2) : "");
+_vt_cmd_plobj_to_string_id (ip6_address, NMPlatformIP6Address, "%d: %s", obj->ifindex, _nm_utils_inet6_ntop (&obj->address, buf1));
_vt_cmd_plobj_to_string_id (qdisc, NMPlatformQdisc, "%d: %d", obj->ifindex, obj->parent);
_vt_cmd_plobj_to_string_id (tfilter, NMPlatformTfilter, "%d: %d", obj->ifindex, obj->parent);
diff --git a/src/platform/tests/test-common.c b/src/platform/tests/test-common.c
index f6a77daa08..2b27d15414 100644
--- a/src/platform/tests/test-common.c
+++ b/src/platform/tests/test-common.c
@@ -356,7 +356,7 @@ _nmtstp_assert_ip4_route_exists (const char *file,
g_error ("[%s:%u] %s(): The ip4 route %s/%d metric %u tos %u shall exist %u times, but platform has it %u times",
file, line, func,
- nm_utils_inet4_ntop (network, sbuf),
+ _nm_utils_inet4_ntop (network, sbuf),
plen,
metric,
tos,
@@ -467,10 +467,10 @@ _nmtstp_assert_ip6_route_exists (const char *file,
g_error ("[%s:%u] %s(): The ip6 route %s/%d metric %u src %s/%d shall exist %u times, but platform has it %u times",
file, line, func,
- nm_utils_inet6_ntop (network, s_network),
+ _nm_utils_inet6_ntop (network, s_network),
plen,
metric,
- nm_utils_inet6_ntop (src, s_src),
+ _nm_utils_inet6_ntop (src, s_src),
src_plen,
c_exists,
c);
@@ -831,12 +831,12 @@ _ip_address_add (NMPlatform *platform,
if ( peer_address->addr4 != address->addr4
|| nmtst_get_rand_uint32 () % 2) {
/* If the peer is the same as the local address, we can omit it. The result should be identical */
- nm_sprintf_buf (s_peer, " peer %s", nm_utils_inet4_ntop (peer_address->addr4, b2));
+ nm_sprintf_buf (s_peer, " peer %s", _nm_utils_inet4_ntop (peer_address->addr4, b2));
} else
s_peer[0] = '\0';
nmtstp_run_command_check ("ip address change %s%s/%d dev %s%s%s%s",
- nm_utils_inet4_ntop (address->addr4, b1),
+ _nm_utils_inet4_ntop (address->addr4, b1),
s_peer,
plen,
ifname,
@@ -849,9 +849,9 @@ _ip_address_add (NMPlatform *platform,
/* flags not implemented (yet) */
g_assert (flags == 0);
nmtstp_run_command_check ("ip address change %s%s%s/%d dev %s%s%s%s",
- nm_utils_inet6_ntop (&address->addr6, b1),
+ _nm_utils_inet6_ntop (&address->addr6, b1),
!IN6_IS_ADDR_UNSPECIFIED (&peer_address->addr6) ? " peer " : "",
- !IN6_IS_ADDR_UNSPECIFIED (&peer_address->addr6) ? nm_utils_inet6_ntop (&peer_address->addr6, b2) : "",
+ !IN6_IS_ADDR_UNSPECIFIED (&peer_address->addr6) ? _nm_utils_inet6_ntop (&peer_address->addr6, b2) : "",
plen,
ifname,
s_valid ?: "",
@@ -1059,15 +1059,15 @@ _ip_address_del (NMPlatform *platform,
if (is_v4) {
success = nmtstp_run_command ("ip address delete %s%s%s/%d dev %s",
- nm_utils_inet4_ntop (address->addr4, b1),
+ _nm_utils_inet4_ntop (address->addr4, b1),
peer_address->addr4 != address->addr4 ? " peer " : "",
- peer_address->addr4 != address->addr4 ? nm_utils_inet4_ntop (peer_address->addr4, b2) : "",
+ peer_address->addr4 != address->addr4 ? _nm_utils_inet4_ntop (peer_address->addr4, b2) : "",
plen,
ifname);
} else {
g_assert (!peer_address);
success = nmtstp_run_command ("ip address delete %s/%d dev %s",
- nm_utils_inet6_ntop (&address->addr6, b1),
+ _nm_utils_inet6_ntop (&address->addr6, b1),
plen,
ifname);
}
@@ -1258,8 +1258,8 @@ nmtstp_link_gre_add (NMPlatform *platform,
name,
type,
dev ?: "",
- nm_utils_inet4_ntop (lnk->local, b1),
- nm_utils_inet4_ntop (lnk->remote, b2),
+ _nm_utils_inet4_ntop (lnk->local, b1),
+ _nm_utils_inet4_ntop (lnk->remote, b2),
lnk->ttl,
lnk->tos,
lnk->path_mtu_discovery ? "pmtudisc" : "nopmtudisc");
@@ -1320,8 +1320,8 @@ nmtstp_link_ip6tnl_add (NMPlatform *platform,
name,
mode,
dev,
- nm_utils_inet6_ntop (&lnk->local, b1),
- nm_utils_inet6_ntop (&lnk->remote, b2),
+ _nm_utils_inet6_ntop (&lnk->local, b1),
+ _nm_utils_inet6_ntop (&lnk->remote, b2),
lnk->ttl,
tclass_inherit ? "inherit" : nm_sprintf_buf (tclass, "%02x", lnk->tclass),
encap_ignore ? "none" : nm_sprintf_buf (encap, "%u", lnk->encap_limit),
@@ -1368,8 +1368,8 @@ nmtstp_link_ip6gre_add (NMPlatform *platform,
name,
lnk->is_tap ? "ip6gretap" : "ip6gre",
dev,
- nm_utils_inet6_ntop (&lnk->local, b1),
- nm_utils_inet6_ntop (&lnk->remote, b2),
+ _nm_utils_inet6_ntop (&lnk->local, b1),
+ _nm_utils_inet6_ntop (&lnk->remote, b2),
lnk->ttl,
tclass_inherit ? "inherit" : nm_sprintf_buf (tclass, "%02x", lnk->tclass),
lnk->flow_label);
@@ -1413,8 +1413,8 @@ nmtstp_link_ipip_add (NMPlatform *platform,
success = !nmtstp_run_command ("ip tunnel add %s mode ipip %s local %s remote %s ttl %u tos %02x %s",
name,
dev,
- nm_utils_inet4_ntop (lnk->local, b1),
- nm_utils_inet4_ntop (lnk->remote, b2),
+ _nm_utils_inet4_ntop (lnk->local, b1),
+ _nm_utils_inet4_ntop (lnk->remote, b2),
lnk->ttl,
lnk->tos,
lnk->path_mtu_discovery ? "pmtudisc" : "nopmtudisc");
@@ -1507,8 +1507,8 @@ nmtstp_link_sit_add (NMPlatform *platform,
success = !nmtstp_run_command ("ip tunnel add %s mode sit%s local %s remote %s ttl %u tos %02x %s",
name,
dev,
- nm_utils_inet4_ntop (lnk->local, b1),
- nm_utils_inet4_ntop (lnk->remote, b2),
+ _nm_utils_inet4_ntop (lnk->local, b1),
+ _nm_utils_inet4_ntop (lnk->remote, b2),
lnk->ttl,
lnk->tos,
lnk->path_mtu_discovery ? "pmtudisc" : "nopmtudisc");
@@ -1644,16 +1644,16 @@ nmtstp_link_vxlan_add (NMPlatform *platform,
dev = g_strdup_printf ("dev %s", nm_platform_link_get_name (platform, lnk->parent_ifindex));
if (lnk->local)
- nm_utils_inet4_ntop (lnk->local, local);
+ _nm_utils_inet4_ntop (lnk->local, local);
else if (memcmp (&lnk->local6, &in6addr_any, sizeof (in6addr_any)))
- nm_utils_inet6_ntop (&lnk->local6, local);
+ _nm_utils_inet6_ntop (&lnk->local6, local);
else
local[0] = '\0';
if (lnk->group)
- nm_utils_inet4_ntop (lnk->group, group);
+ _nm_utils_inet4_ntop (lnk->group, group);
else if (memcmp (&lnk->group6, &in6addr_any, sizeof (in6addr_any)))
- nm_utils_inet6_ntop (&lnk->group6, group);
+ _nm_utils_inet6_ntop (&lnk->group6, group);
else
group[0] = '\0';
diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
index 9110d68d75..fb82b10cba 100644
--- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
+++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
@@ -727,7 +727,7 @@ read_full_ip4_address (shvarFile *ifcfg,
else {
/* Try to autodetermine the prefix for the address' class */
prefix = _nm_utils_ip4_get_default_prefix (ipaddr);
- PARSE_WARNING ("missing %s, assuming %s/%d", prefix_tag, nm_utils_inet4_ntop (ipaddr, inet_buf), prefix);
+ PARSE_WARNING ("missing %s, assuming %s/%d", prefix_tag, _nm_utils_inet4_ntop (ipaddr, inet_buf), prefix);
}
}
}
@@ -1305,7 +1305,7 @@ read_one_ip4_route (shvarFile *ifcfg,
prefix = nm_utils_ip4_netmask_to_prefix (netmask);
if (netmask != _nm_utils_ip4_prefix_to_netmask (prefix)) {
g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INVALID_CONNECTION,
- "Invalid IP4 netmask '%s' \"%s\"", netmask_tag, nm_utils_inet4_ntop (netmask, inet_buf));
+ "Invalid IP4 netmask '%s' \"%s\"", netmask_tag, _nm_utils_inet4_ntop (netmask, inet_buf));
return FALSE;
}
} else {
diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c
index 7f26c3edf1..371ffafd0e 100644
--- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c
+++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c
@@ -2036,7 +2036,7 @@ write_route_file_svformat (const char *filename, NMSettingIPConfig *s_ip4)
netmask = _nm_utils_ip4_prefix_to_netmask (nm_ip_route_get_prefix (route));
svSetValueStr (routefile, netmask_key,
- nm_utils_inet4_ntop (netmask, buf));
+ _nm_utils_inet4_ntop (netmask, buf));
svSetValueStr (routefile, gw_key, nm_ip_route_get_next_hop (route));
@@ -2430,7 +2430,7 @@ write_ip4_setting (NMConnection *connection,
char buf[INET_ADDRSTRLEN];
svSetValueStr (ifcfg, tag,
- nm_utils_inet4_ntop (_nm_utils_ip4_prefix_to_netmask (prefix), buf));
+ _nm_utils_inet4_ntop (_nm_utils_ip4_prefix_to_netmask (prefix), buf));
}
n++;
diff --git a/src/vpn/nm-vpn-connection.c b/src/vpn/nm-vpn-connection.c
index 6a25dddaf0..97ff5b84be 100644
--- a/src/vpn/nm-vpn-connection.c
+++ b/src/vpn/nm-vpn-connection.c
@@ -984,10 +984,10 @@ print_vpn_config (NMVpnConnection *self)
if (priv->ip4_external_gw) {
_LOGI ("Data: VPN Gateway: %s",
- nm_utils_inet4_ntop (priv->ip4_external_gw, b1));
+ _nm_utils_inet4_ntop (priv->ip4_external_gw, b1));
} else if (priv->ip6_external_gw) {
_LOGI ("Data: VPN Gateway: %s",
- nm_utils_inet6_ntop (priv->ip6_external_gw, b1));
+ _nm_utils_inet6_ntop (priv->ip6_external_gw, b1));
}
_LOGI ("Data: Tunnel Device: %s%s%s", NM_PRINT_FMT_QUOTE_STRING (priv->ip_iface));
@@ -1001,22 +1001,22 @@ print_vpn_config (NMVpnConnection *self)
nm_assert (address4);
if (priv->ip4_internal_gw)
- _LOGI ("Data: Internal Gateway: %s", nm_utils_inet4_ntop (priv->ip4_internal_gw, b1));
- _LOGI ("Data: Internal Address: %s", address4 ? nm_utils_inet4_ntop (address4->address, b1) : "??");
+ _LOGI ("Data: Internal Gateway: %s", _nm_utils_inet4_ntop (priv->ip4_internal_gw, b1));
+ _LOGI ("Data: Internal Address: %s", address4 ? _nm_utils_inet4_ntop (address4->address, b1) : "??");
_LOGI ("Data: Internal Prefix: %d", address4 ? (int) address4->plen : -1);
- _LOGI ("Data: Internal Point-to-Point Address: %s", nm_utils_inet4_ntop (address4->peer_address, b1));
+ _LOGI ("Data: Internal Point-to-Point Address: %s", _nm_utils_inet4_ntop (address4->peer_address, b1));
nm_ip_config_iter_ip4_route_for_each (&ipconf_iter, priv->ip4_config, &route) {
_LOGI ("Data: Static Route: %s/%d Next Hop: %s",
- nm_utils_inet4_ntop (route->network, b1),
+ _nm_utils_inet4_ntop (route->network, b1),
route->plen,
- nm_utils_inet4_ntop (route->gateway, b2));
+ _nm_utils_inet4_ntop (route->gateway, b2));
}
num = nm_ip4_config_get_num_nameservers (priv->ip4_config);
for (i = 0; i < num; i++) {
_LOGI ("Data: Internal DNS: %s",
- nm_utils_inet4_ntop (nm_ip4_config_get_nameserver (priv->ip4_config, i), b1));
+ _nm_utils_inet4_ntop (nm_ip4_config_get_nameserver (priv->ip4_config, i), b1));
}
if (nm_ip4_config_get_num_domains (priv->ip4_config) > 0)
@@ -1035,22 +1035,22 @@ print_vpn_config (NMVpnConnection *self)
nm_assert (address6);
if (priv->ip6_internal_gw)
- _LOGI ("Data: Internal Gateway: %s", nm_utils_inet6_ntop (priv->ip6_internal_gw, b1));
- _LOGI ("Data: Internal Address: %s", nm_utils_inet6_ntop (&address6->address, b1));
+ _LOGI ("Data: Internal Gateway: %s", _nm_utils_inet6_ntop (priv->ip6_internal_gw, b1));
+ _LOGI ("Data: Internal Address: %s", _nm_utils_inet6_ntop (&address6->address, b1));
_LOGI ("Data: Internal Prefix: %d", address6->plen);
- _LOGI ("Data: Internal Point-to-Point Address: %s", nm_utils_inet6_ntop (&address6->peer_address, b1));
+ _LOGI ("Data: Internal Point-to-Point Address: %s", _nm_utils_inet6_ntop (&address6->peer_address, b1));
nm_ip_config_iter_ip6_route_for_each (&ipconf_iter, priv->ip6_config, &route) {
_LOGI ("Data: Static Route: %s/%d Next Hop: %s",
- nm_utils_inet6_ntop (&route->network, b1),
+ _nm_utils_inet6_ntop (&route->network, b1),
route->plen,
- nm_utils_inet6_ntop (&route->gateway, b2));
+ _nm_utils_inet6_ntop (&route->gateway, b2));
}
num = nm_ip6_config_get_num_nameservers (priv->ip6_config);
for (i = 0; i < num; i++) {
_LOGI ("Data: Internal DNS: %s",
- nm_utils_inet6_ntop (nm_ip6_config_get_nameserver (priv->ip6_config, i), b1));
+ _nm_utils_inet6_ntop (nm_ip6_config_get_nameserver (priv->ip6_config, i), b1));
}
if (nm_ip6_config_get_num_domains (priv->ip6_config) > 0)