core: add const qualifier to functions in nm-ip[46]-config
Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
@@ -93,7 +93,7 @@ nm_ip4_config_export (NMIP4Config *config)
|
||||
}
|
||||
|
||||
const char *
|
||||
nm_ip4_config_get_dbus_path (NMIP4Config *config)
|
||||
nm_ip4_config_get_dbus_path (const NMIP4Config *config)
|
||||
{
|
||||
NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -144,7 +144,7 @@ nm_ip4_config_capture (int ifindex)
|
||||
}
|
||||
|
||||
gboolean
|
||||
nm_ip4_config_commit (NMIP4Config *config, int ifindex, int priority)
|
||||
nm_ip4_config_commit (const NMIP4Config *config, int ifindex, int priority)
|
||||
{
|
||||
NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (config);
|
||||
int mtu = nm_ip4_config_get_mtu (config);
|
||||
@@ -270,7 +270,7 @@ nm_ip4_config_merge_setting (NMIP4Config *config, NMSettingIP4Config *setting)
|
||||
}
|
||||
|
||||
void
|
||||
nm_ip4_config_update_setting (NMIP4Config *config, NMSettingIP4Config *setting)
|
||||
nm_ip4_config_update_setting (const NMIP4Config *config, NMSettingIP4Config *setting)
|
||||
{
|
||||
guint32 gateway;
|
||||
guint naddresses, nroutes, nnameservers, nsearches;
|
||||
@@ -353,7 +353,7 @@ nm_ip4_config_update_setting (NMIP4Config *config, NMSettingIP4Config *setting)
|
||||
/******************************************************************/
|
||||
|
||||
void
|
||||
nm_ip4_config_merge (NMIP4Config *dst, NMIP4Config *src)
|
||||
nm_ip4_config_merge (NMIP4Config *dst, const NMIP4Config *src)
|
||||
{
|
||||
guint32 i;
|
||||
|
||||
@@ -415,7 +415,7 @@ nm_ip4_config_merge (NMIP4Config *dst, NMIP4Config *src)
|
||||
* Removes everything in @src from @dst.
|
||||
*/
|
||||
void
|
||||
nm_ip4_config_subtract (NMIP4Config *dst, NMIP4Config *src)
|
||||
nm_ip4_config_subtract (NMIP4Config *dst, const NMIP4Config *src)
|
||||
{
|
||||
guint32 i, j;
|
||||
|
||||
@@ -556,7 +556,7 @@ nm_ip4_config_subtract (NMIP4Config *dst, NMIP4Config *src)
|
||||
* that are not signaled by the output parameter @relevant_changes).
|
||||
*/
|
||||
gboolean
|
||||
nm_ip4_config_replace (NMIP4Config *dst, NMIP4Config *src, gboolean *relevant_changes)
|
||||
nm_ip4_config_replace (NMIP4Config *dst, const NMIP4Config *src, gboolean *relevant_changes)
|
||||
{
|
||||
#ifndef G_DISABLE_ASSERT
|
||||
gboolean config_equal;
|
||||
@@ -767,7 +767,7 @@ nm_ip4_config_replace (NMIP4Config *dst, NMIP4Config *src, gboolean *relevant_ch
|
||||
}
|
||||
|
||||
void
|
||||
nm_ip4_config_dump (NMIP4Config *config, const char *detail)
|
||||
nm_ip4_config_dump (const NMIP4Config *config, const char *detail)
|
||||
{
|
||||
guint32 i, tmp;
|
||||
char buf[INET_ADDRSTRLEN];
|
||||
@@ -845,7 +845,7 @@ nm_ip4_config_dump (NMIP4Config *config, const char *detail)
|
||||
}
|
||||
|
||||
gboolean
|
||||
nm_ip4_config_destination_is_direct (NMIP4Config *config, guint32 network, int plen)
|
||||
nm_ip4_config_destination_is_direct (const NMIP4Config *config, guint32 network, int plen)
|
||||
{
|
||||
guint naddresses = nm_ip4_config_get_num_addresses (config);
|
||||
int i;
|
||||
@@ -871,7 +871,7 @@ nm_ip4_config_set_never_default (NMIP4Config *config, gboolean never_default)
|
||||
}
|
||||
|
||||
gboolean
|
||||
nm_ip4_config_get_never_default (NMIP4Config *config)
|
||||
nm_ip4_config_get_never_default (const NMIP4Config *config)
|
||||
{
|
||||
NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -890,7 +890,7 @@ nm_ip4_config_set_gateway (NMIP4Config *config, guint32 gateway)
|
||||
}
|
||||
|
||||
guint32
|
||||
nm_ip4_config_get_gateway (NMIP4Config *config)
|
||||
nm_ip4_config_get_gateway (const NMIP4Config *config)
|
||||
{
|
||||
NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -946,7 +946,7 @@ nm_ip4_config_del_address (NMIP4Config *config, guint i)
|
||||
}
|
||||
|
||||
guint
|
||||
nm_ip4_config_get_num_addresses (NMIP4Config *config)
|
||||
nm_ip4_config_get_num_addresses (const NMIP4Config *config)
|
||||
{
|
||||
NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -954,7 +954,7 @@ nm_ip4_config_get_num_addresses (NMIP4Config *config)
|
||||
}
|
||||
|
||||
const NMPlatformIP4Address *
|
||||
nm_ip4_config_get_address (NMIP4Config *config, guint i)
|
||||
nm_ip4_config_get_address (const NMIP4Config *config, guint i)
|
||||
{
|
||||
NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -1010,7 +1010,7 @@ nm_ip4_config_del_route (NMIP4Config *config, guint i)
|
||||
}
|
||||
|
||||
guint
|
||||
nm_ip4_config_get_num_routes (NMIP4Config *config)
|
||||
nm_ip4_config_get_num_routes (const NMIP4Config *config)
|
||||
{
|
||||
NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -1018,7 +1018,7 @@ nm_ip4_config_get_num_routes (NMIP4Config *config)
|
||||
}
|
||||
|
||||
const NMPlatformIP4Route *
|
||||
nm_ip4_config_get_route (NMIP4Config *config, guint i)
|
||||
nm_ip4_config_get_route (const NMIP4Config *config, guint i)
|
||||
{
|
||||
NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -1066,7 +1066,7 @@ nm_ip4_config_del_nameserver (NMIP4Config *config, guint i)
|
||||
}
|
||||
|
||||
guint32
|
||||
nm_ip4_config_get_num_nameservers (NMIP4Config *config)
|
||||
nm_ip4_config_get_num_nameservers (const NMIP4Config *config)
|
||||
{
|
||||
NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -1074,7 +1074,7 @@ nm_ip4_config_get_num_nameservers (NMIP4Config *config)
|
||||
}
|
||||
|
||||
guint32
|
||||
nm_ip4_config_get_nameserver (NMIP4Config *config, guint i)
|
||||
nm_ip4_config_get_nameserver (const NMIP4Config *config, guint i)
|
||||
{
|
||||
NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -1123,7 +1123,7 @@ nm_ip4_config_del_domain (NMIP4Config *config, guint i)
|
||||
}
|
||||
|
||||
guint32
|
||||
nm_ip4_config_get_num_domains (NMIP4Config *config)
|
||||
nm_ip4_config_get_num_domains (const NMIP4Config *config)
|
||||
{
|
||||
NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -1131,7 +1131,7 @@ nm_ip4_config_get_num_domains (NMIP4Config *config)
|
||||
}
|
||||
|
||||
const char *
|
||||
nm_ip4_config_get_domain (NMIP4Config *config, guint i)
|
||||
nm_ip4_config_get_domain (const NMIP4Config *config, guint i)
|
||||
{
|
||||
NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -1180,7 +1180,7 @@ nm_ip4_config_del_search (NMIP4Config *config, guint i)
|
||||
}
|
||||
|
||||
guint32
|
||||
nm_ip4_config_get_num_searches (NMIP4Config *config)
|
||||
nm_ip4_config_get_num_searches (const NMIP4Config *config)
|
||||
{
|
||||
NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -1188,7 +1188,7 @@ nm_ip4_config_get_num_searches (NMIP4Config *config)
|
||||
}
|
||||
|
||||
const char *
|
||||
nm_ip4_config_get_search (NMIP4Config *config, guint i)
|
||||
nm_ip4_config_get_search (const NMIP4Config *config, guint i)
|
||||
{
|
||||
NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -1206,7 +1206,7 @@ nm_ip4_config_set_mss (NMIP4Config *config, guint32 mss)
|
||||
}
|
||||
|
||||
guint32
|
||||
nm_ip4_config_get_mss (NMIP4Config *config)
|
||||
nm_ip4_config_get_mss (const NMIP4Config *config)
|
||||
{
|
||||
NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -1224,7 +1224,7 @@ nm_ip4_config_set_ptp_address (NMIP4Config *config, guint32 ptp_addr)
|
||||
}
|
||||
|
||||
guint32
|
||||
nm_ip4_config_get_ptp_address (NMIP4Config *config)
|
||||
nm_ip4_config_get_ptp_address (const NMIP4Config *config)
|
||||
{
|
||||
NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -1265,7 +1265,7 @@ nm_ip4_config_del_nis_server (NMIP4Config *config, guint i)
|
||||
}
|
||||
|
||||
guint32
|
||||
nm_ip4_config_get_num_nis_servers (NMIP4Config *config)
|
||||
nm_ip4_config_get_num_nis_servers (const NMIP4Config *config)
|
||||
{
|
||||
NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -1273,7 +1273,7 @@ nm_ip4_config_get_num_nis_servers (NMIP4Config *config)
|
||||
}
|
||||
|
||||
guint32
|
||||
nm_ip4_config_get_nis_server (NMIP4Config *config, guint i)
|
||||
nm_ip4_config_get_nis_server (const NMIP4Config *config, guint i)
|
||||
{
|
||||
NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -1290,7 +1290,7 @@ nm_ip4_config_set_nis_domain (NMIP4Config *config, const char *domain)
|
||||
}
|
||||
|
||||
const char *
|
||||
nm_ip4_config_get_nis_domain (NMIP4Config *config)
|
||||
nm_ip4_config_get_nis_domain (const NMIP4Config *config)
|
||||
{
|
||||
NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -1338,7 +1338,7 @@ nm_ip4_config_del_wins (NMIP4Config *config, guint i)
|
||||
}
|
||||
|
||||
guint32
|
||||
nm_ip4_config_get_num_wins (NMIP4Config *config)
|
||||
nm_ip4_config_get_num_wins (const NMIP4Config *config)
|
||||
{
|
||||
NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -1346,7 +1346,7 @@ nm_ip4_config_get_num_wins (NMIP4Config *config)
|
||||
}
|
||||
|
||||
guint32
|
||||
nm_ip4_config_get_wins (NMIP4Config *config, guint i)
|
||||
nm_ip4_config_get_wins (const NMIP4Config *config, guint i)
|
||||
{
|
||||
NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -1364,7 +1364,7 @@ nm_ip4_config_set_mtu (NMIP4Config *config, guint32 mtu)
|
||||
}
|
||||
|
||||
guint32
|
||||
nm_ip4_config_get_mtu (NMIP4Config *config)
|
||||
nm_ip4_config_get_mtu (const NMIP4Config *config)
|
||||
{
|
||||
NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -1380,7 +1380,7 @@ hash_u32 (GChecksum *sum, guint32 n)
|
||||
}
|
||||
|
||||
void
|
||||
nm_ip4_config_hash (NMIP4Config *config, GChecksum *sum, gboolean dns_only)
|
||||
nm_ip4_config_hash (const NMIP4Config *config, GChecksum *sum, gboolean dns_only)
|
||||
{
|
||||
guint32 i, n;
|
||||
const char *s;
|
||||
@@ -1436,7 +1436,7 @@ nm_ip4_config_hash (NMIP4Config *config, GChecksum *sum, gboolean dns_only)
|
||||
}
|
||||
|
||||
gboolean
|
||||
nm_ip4_config_equal (NMIP4Config *a, NMIP4Config *b)
|
||||
nm_ip4_config_equal (const NMIP4Config *a, const NMIP4Config *b)
|
||||
{
|
||||
GChecksum *a_checksum = g_checksum_new (G_CHECKSUM_SHA1);
|
||||
GChecksum *b_checksum = g_checksum_new (G_CHECKSUM_SHA1);
|
||||
|
@@ -56,91 +56,91 @@ NMIP4Config * nm_ip4_config_new (void);
|
||||
|
||||
/* D-Bus integration */
|
||||
void nm_ip4_config_export (NMIP4Config *config);
|
||||
const char * nm_ip4_config_get_dbus_path (NMIP4Config *config);
|
||||
const char * nm_ip4_config_get_dbus_path (const NMIP4Config *config);
|
||||
|
||||
/* Integration with nm-platform and nm-setting */
|
||||
NMIP4Config *nm_ip4_config_capture (int ifindex);
|
||||
gboolean nm_ip4_config_commit (NMIP4Config *config, int ifindex, int priority);
|
||||
gboolean nm_ip4_config_commit (const NMIP4Config *config, int ifindex, int priority);
|
||||
void nm_ip4_config_merge_setting (NMIP4Config *config, NMSettingIP4Config *setting);
|
||||
void nm_ip4_config_update_setting (NMIP4Config *config, NMSettingIP4Config *setting);
|
||||
void nm_ip4_config_update_setting (const NMIP4Config *config, NMSettingIP4Config *setting);
|
||||
|
||||
/* Utility functions */
|
||||
void nm_ip4_config_merge (NMIP4Config *dst, NMIP4Config *src);
|
||||
void nm_ip4_config_subtract (NMIP4Config *dst, NMIP4Config *src);
|
||||
gboolean nm_ip4_config_replace (NMIP4Config *dst, NMIP4Config *src, gboolean *relevant_changes);
|
||||
gboolean nm_ip4_config_destination_is_direct (NMIP4Config *config, guint32 dest, int plen);
|
||||
void nm_ip4_config_dump (NMIP4Config *config, const char *detail);
|
||||
void nm_ip4_config_merge (NMIP4Config *dst, const NMIP4Config *src);
|
||||
void nm_ip4_config_subtract (NMIP4Config *dst, const NMIP4Config *src);
|
||||
gboolean nm_ip4_config_replace (NMIP4Config *dst, const NMIP4Config *src, gboolean *relevant_changes);
|
||||
gboolean nm_ip4_config_destination_is_direct (const NMIP4Config *config, guint32 dest, int plen);
|
||||
void nm_ip4_config_dump (const NMIP4Config *config, const char *detail);
|
||||
|
||||
/* Gateways */
|
||||
void nm_ip4_config_set_never_default (NMIP4Config *config, gboolean never_default);
|
||||
gboolean nm_ip4_config_get_never_default (NMIP4Config *config);
|
||||
gboolean nm_ip4_config_get_never_default (const NMIP4Config *config);
|
||||
void nm_ip4_config_set_gateway (NMIP4Config *config, guint32 gateway);
|
||||
guint32 nm_ip4_config_get_gateway (NMIP4Config *config);
|
||||
guint32 nm_ip4_config_get_gateway (const NMIP4Config *config);
|
||||
|
||||
/* Addresses */
|
||||
void nm_ip4_config_reset_addresses (NMIP4Config *config);
|
||||
void nm_ip4_config_add_address (NMIP4Config *config, const NMPlatformIP4Address *address);
|
||||
void nm_ip4_config_del_address (NMIP4Config *config, guint i);
|
||||
guint nm_ip4_config_get_num_addresses (NMIP4Config *config);
|
||||
const NMPlatformIP4Address *nm_ip4_config_get_address (NMIP4Config *config, guint i);
|
||||
guint nm_ip4_config_get_num_addresses (const NMIP4Config *config);
|
||||
const NMPlatformIP4Address *nm_ip4_config_get_address (const NMIP4Config *config, guint i);
|
||||
|
||||
/* Routes */
|
||||
void nm_ip4_config_reset_routes (NMIP4Config *config);
|
||||
void nm_ip4_config_add_route (NMIP4Config *config, const NMPlatformIP4Route *route);
|
||||
void nm_ip4_config_del_route (NMIP4Config *config, guint i);
|
||||
guint32 nm_ip4_config_get_num_routes (NMIP4Config *config);
|
||||
const NMPlatformIP4Route *nm_ip4_config_get_route (NMIP4Config *config, guint32 i);
|
||||
guint32 nm_ip4_config_get_num_routes (const NMIP4Config *config);
|
||||
const NMPlatformIP4Route *nm_ip4_config_get_route (const NMIP4Config *config, guint32 i);
|
||||
|
||||
/* Nameservers */
|
||||
void nm_ip4_config_reset_nameservers (NMIP4Config *config);
|
||||
void nm_ip4_config_add_nameserver (NMIP4Config *config, guint32 nameserver);
|
||||
void nm_ip4_config_del_nameserver (NMIP4Config *config, guint i);
|
||||
guint32 nm_ip4_config_get_num_nameservers (NMIP4Config *config);
|
||||
guint32 nm_ip4_config_get_nameserver (NMIP4Config *config, guint i);
|
||||
guint32 nm_ip4_config_get_num_nameservers (const NMIP4Config *config);
|
||||
guint32 nm_ip4_config_get_nameserver (const NMIP4Config *config, guint i);
|
||||
|
||||
/* Domains */
|
||||
void nm_ip4_config_reset_domains (NMIP4Config *config);
|
||||
void nm_ip4_config_add_domain (NMIP4Config *config, const char *domain);
|
||||
void nm_ip4_config_del_domain (NMIP4Config *config, guint i);
|
||||
guint32 nm_ip4_config_get_num_domains (NMIP4Config *config);
|
||||
const char * nm_ip4_config_get_domain (NMIP4Config *config, guint i);
|
||||
guint32 nm_ip4_config_get_num_domains (const NMIP4Config *config);
|
||||
const char * nm_ip4_config_get_domain (const NMIP4Config *config, guint i);
|
||||
|
||||
/* Search lists */
|
||||
void nm_ip4_config_reset_searches (NMIP4Config *config);
|
||||
void nm_ip4_config_add_search (NMIP4Config *config, const char *search);
|
||||
void nm_ip4_config_del_search (NMIP4Config *config, guint i);
|
||||
guint32 nm_ip4_config_get_num_searches (NMIP4Config *config);
|
||||
const char * nm_ip4_config_get_search (NMIP4Config *config, guint i);
|
||||
guint32 nm_ip4_config_get_num_searches (const NMIP4Config *config);
|
||||
const char * nm_ip4_config_get_search (const NMIP4Config *config, guint i);
|
||||
|
||||
/* MSS */
|
||||
void nm_ip4_config_set_mss (NMIP4Config *config, guint32 mss);
|
||||
guint32 nm_ip4_config_get_mss (NMIP4Config *config);
|
||||
guint32 nm_ip4_config_get_mss (const NMIP4Config *config);
|
||||
|
||||
/* PTP */
|
||||
void nm_ip4_config_set_ptp_address (NMIP4Config *config, guint32 ptp_addr);
|
||||
guint32 nm_ip4_config_get_ptp_address (NMIP4Config *config);
|
||||
guint32 nm_ip4_config_get_ptp_address (const NMIP4Config *config);
|
||||
|
||||
/* NIS */
|
||||
void nm_ip4_config_reset_nis_servers (NMIP4Config *config);
|
||||
void nm_ip4_config_add_nis_server (NMIP4Config *config, guint32 nis);
|
||||
void nm_ip4_config_del_nis_server (NMIP4Config *config, guint i);
|
||||
guint32 nm_ip4_config_get_num_nis_servers (NMIP4Config *config);
|
||||
guint32 nm_ip4_config_get_nis_server (NMIP4Config *config, guint i);
|
||||
guint32 nm_ip4_config_get_num_nis_servers (const NMIP4Config *config);
|
||||
guint32 nm_ip4_config_get_nis_server (const NMIP4Config *config, guint i);
|
||||
void nm_ip4_config_set_nis_domain (NMIP4Config *config, const char *domain);
|
||||
const char * nm_ip4_config_get_nis_domain (NMIP4Config *config);
|
||||
const char * nm_ip4_config_get_nis_domain (const NMIP4Config *config);
|
||||
|
||||
/* WINS */
|
||||
void nm_ip4_config_reset_wins (NMIP4Config *config);
|
||||
void nm_ip4_config_add_wins (NMIP4Config *config, guint32 wins);
|
||||
void nm_ip4_config_del_wins (NMIP4Config *config, guint i);
|
||||
guint32 nm_ip4_config_get_num_wins (NMIP4Config *config);
|
||||
guint32 nm_ip4_config_get_wins (NMIP4Config *config, guint i);
|
||||
guint32 nm_ip4_config_get_num_wins (const NMIP4Config *config);
|
||||
guint32 nm_ip4_config_get_wins (const NMIP4Config *config, guint i);
|
||||
|
||||
/* MTU */
|
||||
void nm_ip4_config_set_mtu (NMIP4Config *config, guint32 mtu);
|
||||
guint32 nm_ip4_config_get_mtu (NMIP4Config *config);
|
||||
guint32 nm_ip4_config_get_mtu (const NMIP4Config *config);
|
||||
|
||||
void nm_ip4_config_hash (NMIP4Config *config, GChecksum *sum, gboolean dns_only);
|
||||
gboolean nm_ip4_config_equal (NMIP4Config *a, NMIP4Config *b);
|
||||
void nm_ip4_config_hash (const NMIP4Config *config, GChecksum *sum, gboolean dns_only);
|
||||
gboolean nm_ip4_config_equal (const NMIP4Config *a, const NMIP4Config *b);
|
||||
|
||||
#endif /* NM_IP4_CONFIG_H */
|
||||
|
@@ -84,7 +84,7 @@ nm_ip6_config_export (NMIP6Config *config)
|
||||
}
|
||||
|
||||
const char *
|
||||
nm_ip6_config_get_dbus_path (NMIP6Config *config)
|
||||
nm_ip6_config_get_dbus_path (const NMIP6Config *config)
|
||||
{
|
||||
NMIP6ConfigPrivate *priv = NM_IP6_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -144,7 +144,7 @@ nm_ip6_config_capture (int ifindex)
|
||||
}
|
||||
|
||||
gboolean
|
||||
nm_ip6_config_commit (NMIP6Config *config, int ifindex, int priority)
|
||||
nm_ip6_config_commit (const NMIP6Config *config, int ifindex, int priority)
|
||||
{
|
||||
NMIP6ConfigPrivate *priv = NM_IP6_CONFIG_GET_PRIVATE (config);
|
||||
int i;
|
||||
@@ -263,7 +263,7 @@ nm_ip6_config_merge_setting (NMIP6Config *config, NMSettingIP6Config *setting)
|
||||
}
|
||||
|
||||
void
|
||||
nm_ip6_config_update_setting (NMIP6Config *config, NMSettingIP6Config *setting)
|
||||
nm_ip6_config_update_setting (const NMIP6Config *config, NMSettingIP6Config *setting)
|
||||
{
|
||||
const struct in6_addr *gateway;
|
||||
guint naddresses, nroutes, nnameservers, nsearches;
|
||||
@@ -350,7 +350,7 @@ nm_ip6_config_update_setting (NMIP6Config *config, NMSettingIP6Config *setting)
|
||||
/******************************************************************/
|
||||
|
||||
void
|
||||
nm_ip6_config_merge (NMIP6Config *dst, NMIP6Config *src)
|
||||
nm_ip6_config_merge (NMIP6Config *dst, const NMIP6Config *src)
|
||||
{
|
||||
guint32 i;
|
||||
|
||||
@@ -394,7 +394,7 @@ nm_ip6_config_merge (NMIP6Config *dst, NMIP6Config *src)
|
||||
}
|
||||
|
||||
gboolean
|
||||
nm_ip6_config_destination_is_direct (NMIP6Config *config, const struct in6_addr *network, int plen)
|
||||
nm_ip6_config_destination_is_direct (const NMIP6Config *config, const struct in6_addr *network, int plen)
|
||||
{
|
||||
int num = nm_ip6_config_get_num_addresses (config);
|
||||
int i;
|
||||
@@ -417,7 +417,7 @@ nm_ip6_config_destination_is_direct (NMIP6Config *config, const struct in6_addr
|
||||
* Removes everything in @src from @dst.
|
||||
*/
|
||||
void
|
||||
nm_ip6_config_subtract (NMIP6Config *dst, NMIP6Config *src)
|
||||
nm_ip6_config_subtract (NMIP6Config *dst, const NMIP6Config *src)
|
||||
{
|
||||
guint32 i, j;
|
||||
const struct in6_addr *dst_tmp, *src_tmp;
|
||||
@@ -530,7 +530,7 @@ nm_ip6_config_subtract (NMIP6Config *dst, NMIP6Config *src)
|
||||
* that are not signaled by the output parameter @relevant_changes).
|
||||
*/
|
||||
gboolean
|
||||
nm_ip6_config_replace (NMIP6Config *dst, NMIP6Config *src, gboolean *relevant_changes)
|
||||
nm_ip6_config_replace (NMIP6Config *dst, const NMIP6Config *src, gboolean *relevant_changes)
|
||||
{
|
||||
#ifndef G_DISABLE_ASSERT
|
||||
gboolean config_equal;
|
||||
@@ -704,7 +704,7 @@ nm_ip6_config_set_never_default (NMIP6Config *config, gboolean never_default)
|
||||
}
|
||||
|
||||
gboolean
|
||||
nm_ip6_config_get_never_default (NMIP6Config *config)
|
||||
nm_ip6_config_get_never_default (const NMIP6Config *config)
|
||||
{
|
||||
NMIP6ConfigPrivate *priv = NM_IP6_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -729,7 +729,7 @@ nm_ip6_config_set_gateway (NMIP6Config *config, const struct in6_addr *gateway)
|
||||
}
|
||||
|
||||
const struct in6_addr *
|
||||
nm_ip6_config_get_gateway (NMIP6Config *config)
|
||||
nm_ip6_config_get_gateway (const NMIP6Config *config)
|
||||
{
|
||||
NMIP6ConfigPrivate *priv = NM_IP6_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -786,7 +786,7 @@ nm_ip6_config_del_address (NMIP6Config *config, guint i)
|
||||
}
|
||||
|
||||
guint
|
||||
nm_ip6_config_get_num_addresses (NMIP6Config *config)
|
||||
nm_ip6_config_get_num_addresses (const NMIP6Config *config)
|
||||
{
|
||||
NMIP6ConfigPrivate *priv = NM_IP6_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -794,7 +794,7 @@ nm_ip6_config_get_num_addresses (NMIP6Config *config)
|
||||
}
|
||||
|
||||
const NMPlatformIP6Address *
|
||||
nm_ip6_config_get_address (NMIP6Config *config, guint i)
|
||||
nm_ip6_config_get_address (const NMIP6Config *config, guint i)
|
||||
{
|
||||
NMIP6ConfigPrivate *priv = NM_IP6_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -850,7 +850,7 @@ nm_ip6_config_del_route (NMIP6Config *config, guint i)
|
||||
}
|
||||
|
||||
guint
|
||||
nm_ip6_config_get_num_routes (NMIP6Config *config)
|
||||
nm_ip6_config_get_num_routes (const NMIP6Config *config)
|
||||
{
|
||||
NMIP6ConfigPrivate *priv = NM_IP6_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -858,7 +858,7 @@ nm_ip6_config_get_num_routes (NMIP6Config *config)
|
||||
}
|
||||
|
||||
const NMPlatformIP6Route *
|
||||
nm_ip6_config_get_route (NMIP6Config *config, guint i)
|
||||
nm_ip6_config_get_route (const NMIP6Config *config, guint i)
|
||||
{
|
||||
NMIP6ConfigPrivate *priv = NM_IP6_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -906,7 +906,7 @@ nm_ip6_config_del_nameserver (NMIP6Config *config, guint i)
|
||||
}
|
||||
|
||||
guint32
|
||||
nm_ip6_config_get_num_nameservers (NMIP6Config *config)
|
||||
nm_ip6_config_get_num_nameservers (const NMIP6Config *config)
|
||||
{
|
||||
NMIP6ConfigPrivate *priv = NM_IP6_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -914,7 +914,7 @@ nm_ip6_config_get_num_nameservers (NMIP6Config *config)
|
||||
}
|
||||
|
||||
const struct in6_addr *
|
||||
nm_ip6_config_get_nameserver (NMIP6Config *config, guint i)
|
||||
nm_ip6_config_get_nameserver (const NMIP6Config *config, guint i)
|
||||
{
|
||||
NMIP6ConfigPrivate *priv = NM_IP6_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -963,7 +963,7 @@ nm_ip6_config_del_domain (NMIP6Config *config, guint i)
|
||||
}
|
||||
|
||||
guint32
|
||||
nm_ip6_config_get_num_domains (NMIP6Config *config)
|
||||
nm_ip6_config_get_num_domains (const NMIP6Config *config)
|
||||
{
|
||||
NMIP6ConfigPrivate *priv = NM_IP6_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -971,7 +971,7 @@ nm_ip6_config_get_num_domains (NMIP6Config *config)
|
||||
}
|
||||
|
||||
const char *
|
||||
nm_ip6_config_get_domain (NMIP6Config *config, guint i)
|
||||
nm_ip6_config_get_domain (const NMIP6Config *config, guint i)
|
||||
{
|
||||
NMIP6ConfigPrivate *priv = NM_IP6_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -1020,7 +1020,7 @@ nm_ip6_config_del_search (NMIP6Config *config, guint i)
|
||||
}
|
||||
|
||||
guint32
|
||||
nm_ip6_config_get_num_searches (NMIP6Config *config)
|
||||
nm_ip6_config_get_num_searches (const NMIP6Config *config)
|
||||
{
|
||||
NMIP6ConfigPrivate *priv = NM_IP6_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -1028,7 +1028,7 @@ nm_ip6_config_get_num_searches (NMIP6Config *config)
|
||||
}
|
||||
|
||||
const char *
|
||||
nm_ip6_config_get_search (NMIP6Config *config, guint i)
|
||||
nm_ip6_config_get_search (const NMIP6Config *config, guint i)
|
||||
{
|
||||
NMIP6ConfigPrivate *priv = NM_IP6_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -1046,7 +1046,7 @@ nm_ip6_config_set_mss (NMIP6Config *config, guint32 mss)
|
||||
}
|
||||
|
||||
guint32
|
||||
nm_ip6_config_get_mss (NMIP6Config *config)
|
||||
nm_ip6_config_get_mss (const NMIP6Config *config)
|
||||
{
|
||||
NMIP6ConfigPrivate *priv = NM_IP6_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -1068,7 +1068,7 @@ nm_ip6_config_set_ptp_address (NMIP6Config *config, const struct in6_addr *ptp_a
|
||||
}
|
||||
|
||||
const struct in6_addr *
|
||||
nm_ip6_config_get_ptp_address (NMIP6Config *config)
|
||||
nm_ip6_config_get_ptp_address (const NMIP6Config *config)
|
||||
{
|
||||
NMIP6ConfigPrivate *priv = NM_IP6_CONFIG_GET_PRIVATE (config);
|
||||
|
||||
@@ -1093,7 +1093,7 @@ hash_in6addr (GChecksum *sum, const struct in6_addr *a)
|
||||
}
|
||||
|
||||
void
|
||||
nm_ip6_config_hash (NMIP6Config *config, GChecksum *sum, gboolean dns_only)
|
||||
nm_ip6_config_hash (const NMIP6Config *config, GChecksum *sum, gboolean dns_only)
|
||||
{
|
||||
guint32 i;
|
||||
const struct in6_addr *in6a;
|
||||
@@ -1141,7 +1141,7 @@ nm_ip6_config_hash (NMIP6Config *config, GChecksum *sum, gboolean dns_only)
|
||||
}
|
||||
|
||||
gboolean
|
||||
nm_ip6_config_equal (NMIP6Config *a, NMIP6Config *b)
|
||||
nm_ip6_config_equal (const NMIP6Config *a, const NMIP6Config *b)
|
||||
{
|
||||
GChecksum *a_checksum = g_checksum_new (G_CHECKSUM_SHA1);
|
||||
GChecksum *b_checksum = g_checksum_new (G_CHECKSUM_SHA1);
|
||||
|
@@ -55,70 +55,70 @@ NMIP6Config * nm_ip6_config_new (void);
|
||||
|
||||
/* D-Bus integration */
|
||||
void nm_ip6_config_export (NMIP6Config *config);
|
||||
const char * nm_ip6_config_get_dbus_path (NMIP6Config *config);
|
||||
const char * nm_ip6_config_get_dbus_path (const NMIP6Config *config);
|
||||
|
||||
/* Integration with nm-platform and nm-setting */
|
||||
NMIP6Config *nm_ip6_config_capture (int ifindex);
|
||||
gboolean nm_ip6_config_commit (NMIP6Config *config, int ifindex, int priority);
|
||||
gboolean nm_ip6_config_commit (const NMIP6Config *config, int ifindex, int priority);
|
||||
void nm_ip6_config_merge_setting (NMIP6Config *config, NMSettingIP6Config *setting);
|
||||
void nm_ip6_config_update_setting (NMIP6Config *config, NMSettingIP6Config *setting);
|
||||
void nm_ip6_config_update_setting (const NMIP6Config *config, NMSettingIP6Config *setting);
|
||||
|
||||
/* Utility functions */
|
||||
void nm_ip6_config_merge (NMIP6Config *dst, NMIP6Config *src);
|
||||
void nm_ip6_config_subtract (NMIP6Config *dst, NMIP6Config *src);
|
||||
gboolean nm_ip6_config_replace (NMIP6Config *dst, NMIP6Config *src, gboolean *relevant_changes);
|
||||
int nm_ip6_config_destination_is_direct (NMIP6Config *config, const struct in6_addr *dest, int plen);
|
||||
void nm_ip6_config_merge (NMIP6Config *dst, const NMIP6Config *src);
|
||||
void nm_ip6_config_subtract (NMIP6Config *dst, const NMIP6Config *src);
|
||||
gboolean nm_ip6_config_replace (NMIP6Config *dst, const NMIP6Config *src, gboolean *relevant_changes);
|
||||
int nm_ip6_config_destination_is_direct (const NMIP6Config *config, const struct in6_addr *dest, int plen);
|
||||
|
||||
/* Gateways */
|
||||
void nm_ip6_config_set_never_default (NMIP6Config *config, gboolean never_default);
|
||||
gboolean nm_ip6_config_get_never_default (NMIP6Config *config);
|
||||
gboolean nm_ip6_config_get_never_default (const NMIP6Config *config);
|
||||
void nm_ip6_config_set_gateway (NMIP6Config *config, const struct in6_addr *);
|
||||
const struct in6_addr *nm_ip6_config_get_gateway (NMIP6Config *config);
|
||||
const struct in6_addr *nm_ip6_config_get_gateway (const NMIP6Config *config);
|
||||
|
||||
/* Addresses */
|
||||
void nm_ip6_config_reset_addresses (NMIP6Config *config);
|
||||
void nm_ip6_config_add_address (NMIP6Config *config, const NMPlatformIP6Address *address);
|
||||
void nm_ip6_config_del_address (NMIP6Config *config, guint i);
|
||||
guint nm_ip6_config_get_num_addresses (NMIP6Config *config);
|
||||
const NMPlatformIP6Address *nm_ip6_config_get_address (NMIP6Config *config, guint i);
|
||||
guint nm_ip6_config_get_num_addresses (const NMIP6Config *config);
|
||||
const NMPlatformIP6Address *nm_ip6_config_get_address (const NMIP6Config *config, guint i);
|
||||
|
||||
/* Routes */
|
||||
void nm_ip6_config_reset_routes (NMIP6Config *config);
|
||||
void nm_ip6_config_add_route (NMIP6Config *config, const NMPlatformIP6Route *route);
|
||||
void nm_ip6_config_del_route (NMIP6Config *config, guint i);
|
||||
guint32 nm_ip6_config_get_num_routes (NMIP6Config *config);
|
||||
const NMPlatformIP6Route *nm_ip6_config_get_route (NMIP6Config *config, guint32 i);
|
||||
guint32 nm_ip6_config_get_num_routes (const NMIP6Config *config);
|
||||
const NMPlatformIP6Route *nm_ip6_config_get_route (const NMIP6Config *config, guint32 i);
|
||||
|
||||
/* Nameservers */
|
||||
void nm_ip6_config_reset_nameservers (NMIP6Config *config);
|
||||
void nm_ip6_config_add_nameserver (NMIP6Config *config, const struct in6_addr *nameserver);
|
||||
void nm_ip6_config_del_nameserver (NMIP6Config *config, guint i);
|
||||
guint32 nm_ip6_config_get_num_nameservers (NMIP6Config *config);
|
||||
const struct in6_addr *nm_ip6_config_get_nameserver (NMIP6Config *config, guint i);
|
||||
guint32 nm_ip6_config_get_num_nameservers (const NMIP6Config *config);
|
||||
const struct in6_addr *nm_ip6_config_get_nameserver (const NMIP6Config *config, guint i);
|
||||
|
||||
/* Domains */
|
||||
void nm_ip6_config_reset_domains (NMIP6Config *config);
|
||||
void nm_ip6_config_add_domain (NMIP6Config *config, const char *domain);
|
||||
void nm_ip6_config_del_domain (NMIP6Config *config, guint i);
|
||||
guint32 nm_ip6_config_get_num_domains (NMIP6Config *config);
|
||||
const char * nm_ip6_config_get_domain (NMIP6Config *config, guint i);
|
||||
guint32 nm_ip6_config_get_num_domains (const NMIP6Config *config);
|
||||
const char * nm_ip6_config_get_domain (const NMIP6Config *config, guint i);
|
||||
|
||||
/* Search lists */
|
||||
void nm_ip6_config_reset_searches (NMIP6Config *config);
|
||||
void nm_ip6_config_add_search (NMIP6Config *config, const char *search);
|
||||
void nm_ip6_config_del_search (NMIP6Config *config, guint i);
|
||||
guint32 nm_ip6_config_get_num_searches (NMIP6Config *config);
|
||||
const char * nm_ip6_config_get_search (NMIP6Config *config, guint i);
|
||||
guint32 nm_ip6_config_get_num_searches (const NMIP6Config *config);
|
||||
const char * nm_ip6_config_get_search (const NMIP6Config *config, guint i);
|
||||
|
||||
/* MSS */
|
||||
void nm_ip6_config_set_mss (NMIP6Config *config, guint32 mss);
|
||||
guint32 nm_ip6_config_get_mss (NMIP6Config *config);
|
||||
guint32 nm_ip6_config_get_mss (const NMIP6Config *config);
|
||||
|
||||
/* PTP */
|
||||
void nm_ip6_config_set_ptp_address (NMIP6Config *config, const struct in6_addr *ptp_addr);
|
||||
const struct in6_addr *nm_ip6_config_get_ptp_address (NMIP6Config *config);
|
||||
const struct in6_addr *nm_ip6_config_get_ptp_address (const NMIP6Config *config);
|
||||
|
||||
void nm_ip6_config_hash (NMIP6Config *config, GChecksum *sum, gboolean dns_only);
|
||||
gboolean nm_ip6_config_equal (NMIP6Config *a, NMIP6Config *b);
|
||||
void nm_ip6_config_hash (const NMIP6Config *config, GChecksum *sum, gboolean dns_only);
|
||||
gboolean nm_ip6_config_equal (const NMIP6Config *a, const NMIP6Config *b);
|
||||
|
||||
#endif /* NM_IP6_CONFIG_H */
|
||||
|
Reference in New Issue
Block a user