summaryrefslogtreecommitdiff
path: root/src/nm-ip4-config.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-11-08 18:12:36 +0100
committerThomas Haller <thaller@redhat.com>2017-11-09 09:28:49 +0100
commit9e25538ff57fa6aa46f542ace387d67eb3ca00a9 (patch)
treeb1f94e11fb14186a701ccf29545e5e7457a7099e /src/nm-ip4-config.c
parentffcab3f653fc89d609693577166d2511e39df434 (diff)
core: add NMIPConfig helpers
For now, hack some generic accessors to the NMIP4Config/NMIP6Config type. Eventually, NMIP4Config and NMIP6Config should get merged in one class.
Diffstat (limited to 'src/nm-ip4-config.c')
-rw-r--r--src/nm-ip4-config.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nm-ip4-config.c b/src/nm-ip4-config.c
index e2f99e24d0..06137764f5 100644
--- a/src/nm-ip4-config.c
+++ b/src/nm-ip4-config.c
@@ -2216,6 +2216,14 @@ nm_ip4_config_get_nameserver (const NMIP4Config *self, guint i)
return g_array_index (priv->nameservers, guint32, i);
}
+const in_addr_t *
+_nm_ip4_config_get_nameserver (const NMIP4Config *self, guint i)
+{
+ const NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (self);
+
+ return &g_array_index (priv->nameservers, guint32, i);
+}
+
/*****************************************************************************/
void