mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-04 23:28:08 +02:00
core: cleanup nm-ip[46]-config
This commit is contained in:
parent
fc9f7e06b9
commit
7c0657a119
7 changed files with 1024 additions and 1189 deletions
|
|
@ -1177,7 +1177,7 @@ ip4_options_to_config (NMDHCPClient *self)
|
|||
|
||||
inet_ntop (AF_INET, &gwaddr, buf, sizeof (buf));
|
||||
nm_log_info (LOGD_DHCP4, " gateway %s", buf);
|
||||
nm_ip4_address_set_gateway (addr, gwaddr);
|
||||
nm_ip4_config_set_gateway (ip4_config, gwaddr);
|
||||
} else {
|
||||
/* If the gateway wasn't provided as a classless static route with a
|
||||
* subnet length of 0, try to find it using the old-style 'routers' option.
|
||||
|
|
@ -1190,7 +1190,7 @@ ip4_options_to_config (NMDHCPClient *self)
|
|||
for (s = routers; *s; s++) {
|
||||
/* FIXME: how to handle multiple routers? */
|
||||
if (inet_pton (AF_INET, *s, &tmp_addr) > 0) {
|
||||
nm_ip4_address_set_gateway (addr, tmp_addr.s_addr);
|
||||
nm_ip4_config_set_gateway (ip4_config, tmp_addr.s_addr);
|
||||
nm_log_info (LOGD_DHCP4, " gateway %s", *s);
|
||||
break;
|
||||
} else
|
||||
|
|
|
|||
|
|
@ -325,7 +325,7 @@ nm_dhcp_dhclient_get_lease_config (const char *iface, const char *uuid, gboolean
|
|||
nm_log_warn (LOGD_DHCP, "couldn't parse DHCP lease file IP4 gateway '%s'", data);
|
||||
goto error;
|
||||
}
|
||||
nm_ip4_address_set_gateway (addr, tmp.s_addr);
|
||||
nm_ip4_config_set_gateway (ip4, tmp.s_addr);
|
||||
}
|
||||
|
||||
nm_ip4_config_take_address (ip4, addr);
|
||||
|
|
|
|||
|
|
@ -1572,9 +1572,6 @@ nm_ip6_manager_get_ip6_config (NMIP6Manager *manager, int ifindex)
|
|||
nm_ip6_address_set_prefix (ip6addr, rtnl_addr_get_prefixlen (rtnladdr));
|
||||
nm_ip6_address_set_address (ip6addr, addr);
|
||||
nm_ip6_config_take_address (config, ip6addr);
|
||||
gateway = nm_ip6_config_get_gateway (config);
|
||||
if (gateway)
|
||||
nm_ip6_address_set_gateway (ip6addr, gateway);
|
||||
}
|
||||
|
||||
/* Add DNS servers */
|
||||
|
|
|
|||
1112
src/nm-ip4-config.c
1112
src/nm-ip4-config.c
File diff suppressed because it is too large
Load diff
|
|
@ -1,5 +1,5 @@
|
|||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
/* NetworkManager -- Network link manager
|
||||
/* NetworkManager
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -15,23 +15,23 @@
|
|||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright (C) 2008 Red Hat, Inc.
|
||||
* Copyright (C) 2008–2013 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#ifndef NM_IP4_CONFIG_H
|
||||
#define NM_IP4_CONFIG_H
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
|
||||
/* NMIP4Address and NMIP4Route types */
|
||||
#include "nm-setting-ip4-config.h"
|
||||
|
||||
#define NM_TYPE_IP4_CONFIG (nm_ip4_config_get_type ())
|
||||
#define NM_IP4_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_IP4_CONFIG, NMIP4Config))
|
||||
#define NM_IP4_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_IP4_CONFIG, NMIP4ConfigClass))
|
||||
#define NM_IS_IP4_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_IP4_CONFIG))
|
||||
#define NM_TYPE_IP4_CONFIG (nm_ip4_config_get_type ())
|
||||
#define NM_IP4_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_IP4_CONFIG, NMIP4Config))
|
||||
#define NM_IP4_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_IP4_CONFIG, NMIP4ConfigClass))
|
||||
#define NM_IS_IP4_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_IP4_CONFIG))
|
||||
#define NM_IS_IP4_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_IP4_CONFIG))
|
||||
#define NM_IP4_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_IP4_CONFIG, NMIP4ConfigClass))
|
||||
#define NM_IP4_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_IP4_CONFIG, NMIP4ConfigClass))
|
||||
|
||||
typedef struct {
|
||||
GObject parent;
|
||||
|
|
@ -50,10 +50,11 @@ typedef struct {
|
|||
GType nm_ip4_config_get_type (void);
|
||||
|
||||
|
||||
NMIP4Config * nm_ip4_config_new (void);
|
||||
NMIP4Config * nm_ip4_config_new (void);
|
||||
|
||||
void nm_ip4_config_export (NMIP4Config *config);
|
||||
const char * nm_ip4_config_get_dbus_path (NMIP4Config *config);
|
||||
/* D-Bus integration */
|
||||
void nm_ip4_config_export (NMIP4Config *config);
|
||||
const char * nm_ip4_config_get_dbus_path (NMIP4Config *config);
|
||||
|
||||
/* Integration with nm-platform and nm-setting */
|
||||
NMIP4Config *nm_ip4_config_capture (int ifindex);
|
||||
|
|
@ -61,63 +62,73 @@ gboolean nm_ip4_config_commit (NMIP4Config *config, int ifindex, int priority);
|
|||
void nm_ip4_config_merge_setting (NMIP4Config *config, NMSettingIP4Config *setting);
|
||||
|
||||
/* Utility functions */
|
||||
gboolean nm_ip4_config_destination_is_direct (NMIP4Config *config, guint32 dest, guint32 plen);
|
||||
gboolean nm_ip4_config_destination_is_direct (NMIP4Config *config, guint32 dest, int plen);
|
||||
|
||||
void nm_ip4_config_take_address (NMIP4Config *config, NMIP4Address *address);
|
||||
void nm_ip4_config_add_address (NMIP4Config *config, NMIP4Address *address);
|
||||
void nm_ip4_config_replace_address (NMIP4Config *config, guint32 i, NMIP4Address *new_address);
|
||||
NMIP4Address *nm_ip4_config_get_address (NMIP4Config *config, guint32 i);
|
||||
guint32 nm_ip4_config_get_num_addresses (NMIP4Config *config);
|
||||
/* Gateways */
|
||||
void nm_ip4_config_set_never_default (NMIP4Config *config, gboolean never_default);
|
||||
gboolean nm_ip4_config_get_never_default (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 (NMIP4Config *config);
|
||||
/* Addresses */
|
||||
void nm_ip4_config_reset_addresses (NMIP4Config *config);
|
||||
void nm_ip4_config_take_address (NMIP4Config *config, NMIP4Address *address);
|
||||
void nm_ip4_config_add_address (NMIP4Config *config, NMIP4Address *address);
|
||||
guint nm_ip4_config_get_num_addresses (NMIP4Config *config);
|
||||
NMIP4Address *nm_ip4_config_get_address (NMIP4Config *config, guint i);
|
||||
|
||||
guint32 nm_ip4_config_get_ptp_address (NMIP4Config *config);
|
||||
void nm_ip4_config_set_ptp_address (NMIP4Config *config, guint32 ptp_addr);
|
||||
/* Routes */
|
||||
void nm_ip4_config_reset_routes (NMIP4Config *config);
|
||||
void nm_ip4_config_add_route (NMIP4Config *config, NMIP4Route *route);
|
||||
void nm_ip4_config_take_route (NMIP4Config *config, NMIP4Route *route);
|
||||
guint32 nm_ip4_config_get_num_routes (NMIP4Config *config);
|
||||
NMIP4Route * nm_ip4_config_get_route (NMIP4Config *config, guint32 i);
|
||||
|
||||
void nm_ip4_config_add_nameserver (NMIP4Config *config, guint32 nameserver);
|
||||
guint32 nm_ip4_config_get_nameserver (NMIP4Config *config, guint i);
|
||||
guint32 nm_ip4_config_get_num_nameservers (NMIP4Config *config);
|
||||
void nm_ip4_config_reset_nameservers (NMIP4Config *config);
|
||||
/* Nameservers */
|
||||
void nm_ip4_config_reset_nameservers (NMIP4Config *config);
|
||||
void nm_ip4_config_add_nameserver (NMIP4Config *config, guint32 nameserver);
|
||||
guint32 nm_ip4_config_get_num_nameservers (NMIP4Config *config);
|
||||
guint32 nm_ip4_config_get_nameserver (NMIP4Config *config, guint i);
|
||||
|
||||
void nm_ip4_config_add_wins (NMIP4Config *config, guint32 wins);
|
||||
guint32 nm_ip4_config_get_wins (NMIP4Config *config, guint i);
|
||||
guint32 nm_ip4_config_get_num_wins (NMIP4Config *config);
|
||||
void nm_ip4_config_reset_wins (NMIP4Config *config);
|
||||
/* Domains */
|
||||
void nm_ip4_config_reset_domains (NMIP4Config *config);
|
||||
void nm_ip4_config_add_domain (NMIP4Config *config, const char *domain);
|
||||
guint32 nm_ip4_config_get_num_domains (NMIP4Config *config);
|
||||
const char * nm_ip4_config_get_domain (NMIP4Config *config, guint i);
|
||||
|
||||
void nm_ip4_config_take_route (NMIP4Config *config, NMIP4Route *route);
|
||||
void nm_ip4_config_add_route (NMIP4Config *config, NMIP4Route *route);
|
||||
void nm_ip4_config_replace_route (NMIP4Config *config, guint32 i, NMIP4Route *new_route);
|
||||
NMIP4Route * nm_ip4_config_get_route (NMIP4Config *config, guint32 i);
|
||||
guint32 nm_ip4_config_get_num_routes (NMIP4Config *config);
|
||||
void nm_ip4_config_reset_routes (NMIP4Config *config);
|
||||
/* Search lists */
|
||||
void nm_ip4_config_reset_searches (NMIP4Config *config);
|
||||
void nm_ip4_config_add_search (NMIP4Config *config, const char *search);
|
||||
guint32 nm_ip4_config_get_num_searches (NMIP4Config *config);
|
||||
const char * nm_ip4_config_get_search (NMIP4Config *config, guint i);
|
||||
|
||||
void nm_ip4_config_add_domain (NMIP4Config *config, const char *domain);
|
||||
const char * nm_ip4_config_get_domain (NMIP4Config *config, guint i);
|
||||
guint32 nm_ip4_config_get_num_domains (NMIP4Config *config);
|
||||
void nm_ip4_config_reset_domains (NMIP4Config *config);
|
||||
/* MSS */
|
||||
void nm_ip4_config_set_mss (NMIP4Config *config, guint32 mss);
|
||||
guint32 nm_ip4_config_get_mss (NMIP4Config *config);
|
||||
|
||||
void nm_ip4_config_add_search (NMIP4Config *config, const char *search);
|
||||
const char * nm_ip4_config_get_search (NMIP4Config *config, guint i);
|
||||
guint32 nm_ip4_config_get_num_searches (NMIP4Config *config);
|
||||
void nm_ip4_config_reset_searches (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_mtu (NMIP4Config *config);
|
||||
void nm_ip4_config_set_mtu (NMIP4Config *config, guint32 mtu);
|
||||
/* NIS */
|
||||
void nm_ip4_config_reset_nis_servers (NMIP4Config *config);
|
||||
void nm_ip4_config_add_nis_server (NMIP4Config *config, guint32 nis);
|
||||
guint32 nm_ip4_config_get_num_nis_servers (NMIP4Config *config);
|
||||
guint32 nm_ip4_config_get_nis_server (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);
|
||||
|
||||
guint32 nm_ip4_config_get_mss (NMIP4Config *config);
|
||||
void nm_ip4_config_set_mss (NMIP4Config *config, guint32 mss);
|
||||
/* WINS */
|
||||
void nm_ip4_config_reset_wins (NMIP4Config *config);
|
||||
void nm_ip4_config_add_wins (NMIP4Config *config, guint32 wins);
|
||||
guint32 nm_ip4_config_get_num_wins (NMIP4Config *config);
|
||||
guint32 nm_ip4_config_get_wins (NMIP4Config *config, guint i);
|
||||
|
||||
gboolean nm_ip4_config_get_never_default (NMIP4Config *config);
|
||||
void nm_ip4_config_set_never_default (NMIP4Config *config, gboolean never_default);
|
||||
|
||||
void nm_ip4_config_add_nis_server (NMIP4Config *config, guint32 nis);
|
||||
guint32 nm_ip4_config_get_nis_server (NMIP4Config *config, guint i);
|
||||
guint32 nm_ip4_config_get_num_nis_servers (NMIP4Config *config);
|
||||
void nm_ip4_config_reset_nis_servers (NMIP4Config *config);
|
||||
|
||||
void nm_ip4_config_set_nis_domain (NMIP4Config *config, const char *domain);
|
||||
const char * nm_ip4_config_get_nis_domain (NMIP4Config *config);
|
||||
/* MTU */
|
||||
void nm_ip4_config_set_mtu (NMIP4Config *config, guint32 mtu);
|
||||
guint32 nm_ip4_config_get_mtu (NMIP4Config *config);
|
||||
|
||||
/* Comparison and hashing */
|
||||
typedef enum {
|
||||
NM_IP4_COMPARE_FLAG_NONE = 0x00000000, /* match nothing, kinda pointless */
|
||||
NM_IP4_COMPARE_FLAG_ADDRESSES = 0x00000001,
|
||||
|
|
@ -134,9 +145,7 @@ typedef enum {
|
|||
NM_IP4_COMPARE_FLAG_ALL = 0xFFFFFFFF /* match everything */
|
||||
} NMIP4ConfigCompareFlags;
|
||||
|
||||
/* Returns a bitfield representing how the two IP4 configs differ */
|
||||
NMIP4ConfigCompareFlags nm_ip4_config_diff (NMIP4Config *a, NMIP4Config *b);
|
||||
|
||||
void nm_ip4_config_hash (NMIP4Config *config, GChecksum *sum, gboolean dns_only);
|
||||
|
||||
#endif /* NM_IP4_CONFIG_H */
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,5 +1,5 @@
|
|||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
/* NetworkManager -- Network link manager
|
||||
/* NetworkManager
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -15,23 +15,23 @@
|
|||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright (C) 2008 Red Hat, Inc.
|
||||
* Copyright (C) 2008–2013 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#ifndef NM_IP6_CONFIG_H
|
||||
#define NM_IP6_CONFIG_H
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
|
||||
/* NMIP6Address and NMIP6Route types */
|
||||
#include "nm-setting-ip6-config.h"
|
||||
|
||||
#define NM_TYPE_IP6_CONFIG (nm_ip6_config_get_type ())
|
||||
#define NM_IP6_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_IP6_CONFIG, NMIP6Config))
|
||||
#define NM_IP6_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_IP6_CONFIG, NMIP6ConfigClass))
|
||||
#define NM_IS_IP6_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_IP6_CONFIG))
|
||||
#define NM_TYPE_IP6_CONFIG (nm_ip6_config_get_type ())
|
||||
#define NM_IP6_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_IP6_CONFIG, NMIP6Config))
|
||||
#define NM_IP6_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_IP6_CONFIG, NMIP6ConfigClass))
|
||||
#define NM_IS_IP6_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_IP6_CONFIG))
|
||||
#define NM_IS_IP6_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_IP6_CONFIG))
|
||||
#define NM_IP6_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_IP6_CONFIG, NMIP6ConfigClass))
|
||||
#define NM_IP6_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_IP6_CONFIG, NMIP6ConfigClass))
|
||||
|
||||
typedef struct {
|
||||
GObject parent;
|
||||
|
|
@ -49,10 +49,11 @@ typedef struct {
|
|||
GType nm_ip6_config_get_type (void);
|
||||
|
||||
|
||||
NMIP6Config * nm_ip6_config_new (void);
|
||||
NMIP6Config * nm_ip6_config_new (void);
|
||||
|
||||
void nm_ip6_config_export (NMIP6Config *config);
|
||||
const char * nm_ip6_config_get_dbus_path (NMIP6Config *config);
|
||||
/* D-Bus integration */
|
||||
void nm_ip6_config_export (NMIP6Config *config);
|
||||
const char * nm_ip6_config_get_dbus_path (NMIP6Config *config);
|
||||
|
||||
/* Integration with nm-platform and nm-setting */
|
||||
NMIP6Config *nm_ip6_config_capture (int ifindex);
|
||||
|
|
@ -60,48 +61,54 @@ gboolean nm_ip6_config_commit (NMIP6Config *config, int ifindex, int priority);
|
|||
void nm_ip6_config_merge_setting (NMIP6Config *config, NMSettingIP6Config *setting);
|
||||
|
||||
/* Utility functions */
|
||||
void nm_ip6_config_merge (NMIP6Config *dst, NMIP6Config *src);
|
||||
gboolean nm_ip6_config_destination_is_direct (NMIP6Config *config, const struct in6_addr *dest, guint32 plen);
|
||||
void nm_ip6_config_merge (NMIP6Config *dst, NMIP6Config *src);
|
||||
int nm_ip6_config_destination_is_direct (NMIP6Config *config, const struct in6_addr *dest, int plen);
|
||||
|
||||
void nm_ip6_config_take_address (NMIP6Config *config, NMIP6Address *address);
|
||||
void nm_ip6_config_add_address (NMIP6Config *config, NMIP6Address *address);
|
||||
void nm_ip6_config_replace_address (NMIP6Config *config, guint32 i, NMIP6Address *new_address);
|
||||
NMIP6Address *nm_ip6_config_get_address (NMIP6Config *config, guint32 i);
|
||||
guint32 nm_ip6_config_get_num_addresses (NMIP6Config *config);
|
||||
|
||||
const struct in6_addr *nm_ip6_config_get_ptp_address (NMIP6Config *config);
|
||||
void nm_ip6_config_set_ptp_address (NMIP6Config *config, const struct in6_addr *ptp_addr);
|
||||
|
||||
void nm_ip6_config_add_nameserver (NMIP6Config *config, const struct in6_addr *nameserver);
|
||||
const struct in6_addr *nm_ip6_config_get_nameserver (NMIP6Config *config, guint i);
|
||||
guint32 nm_ip6_config_get_num_nameservers (NMIP6Config *config);
|
||||
void nm_ip6_config_reset_nameservers (NMIP6Config *config);
|
||||
|
||||
void nm_ip6_config_set_gateway (NMIP6Config *config, const struct in6_addr *gateway);
|
||||
/* Gateways */
|
||||
void nm_ip6_config_set_never_default (NMIP6Config *config, gboolean never_default);
|
||||
gboolean nm_ip6_config_get_never_default (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);
|
||||
|
||||
void nm_ip6_config_take_route (NMIP6Config *config, NMIP6Route *route);
|
||||
void nm_ip6_config_add_route (NMIP6Config *config, NMIP6Route *route);
|
||||
void nm_ip6_config_replace_route (NMIP6Config *config, guint32 i, NMIP6Route *new_route);
|
||||
NMIP6Route * nm_ip6_config_get_route (NMIP6Config *config, guint32 i);
|
||||
guint32 nm_ip6_config_get_num_routes (NMIP6Config *config);
|
||||
void nm_ip6_config_reset_routes (NMIP6Config *config);
|
||||
/* Addresses */
|
||||
void nm_ip6_config_reset_addresses (NMIP6Config *config);
|
||||
void nm_ip6_config_take_address (NMIP6Config *config, NMIP6Address *address);
|
||||
void nm_ip6_config_add_address (NMIP6Config *config, NMIP6Address *address);
|
||||
guint nm_ip6_config_get_num_addresses (NMIP6Config *config);
|
||||
NMIP6Address *nm_ip6_config_get_address (NMIP6Config *config, guint i);
|
||||
|
||||
void nm_ip6_config_add_domain (NMIP6Config *config, const char *domain);
|
||||
const char * nm_ip6_config_get_domain (NMIP6Config *config, guint i);
|
||||
guint32 nm_ip6_config_get_num_domains (NMIP6Config *config);
|
||||
void nm_ip6_config_reset_domains (NMIP6Config *config);
|
||||
/* Routes */
|
||||
void nm_ip6_config_reset_routes (NMIP6Config *config);
|
||||
void nm_ip6_config_add_route (NMIP6Config *config, NMIP6Route *route);
|
||||
void nm_ip6_config_take_route (NMIP6Config *config, NMIP6Route *route);
|
||||
guint32 nm_ip6_config_get_num_routes (NMIP6Config *config);
|
||||
NMIP6Route * nm_ip6_config_get_route (NMIP6Config *config, guint32 i);
|
||||
|
||||
void nm_ip6_config_add_search (NMIP6Config *config, const char *search);
|
||||
const char * nm_ip6_config_get_search (NMIP6Config *config, guint i);
|
||||
guint32 nm_ip6_config_get_num_searches (NMIP6Config *config);
|
||||
void nm_ip6_config_reset_searches (NMIP6Config *config);
|
||||
/* Nameservers */
|
||||
void nm_ip6_config_reset_nameservers (NMIP6Config *config);
|
||||
void nm_ip6_config_add_nameserver (NMIP6Config *config, const struct in6_addr *nameserver);
|
||||
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_mss (NMIP6Config *config);
|
||||
void nm_ip6_config_set_mss (NMIP6Config *config, guint32 mss);
|
||||
/* Domains */
|
||||
void nm_ip6_config_reset_domains (NMIP6Config *config);
|
||||
void nm_ip6_config_add_domain (NMIP6Config *config, const char *domain);
|
||||
guint32 nm_ip6_config_get_num_domains (NMIP6Config *config);
|
||||
const char * nm_ip6_config_get_domain (NMIP6Config *config, guint i);
|
||||
|
||||
gboolean nm_ip6_config_get_never_default (NMIP6Config *config);
|
||||
void nm_ip6_config_set_never_default (NMIP6Config *config, gboolean never_default);
|
||||
/* Search lists */
|
||||
void nm_ip6_config_reset_searches (NMIP6Config *config);
|
||||
void nm_ip6_config_add_search (NMIP6Config *config, const char *search);
|
||||
guint32 nm_ip6_config_get_num_searches (NMIP6Config *config);
|
||||
const char * nm_ip6_config_get_search (NMIP6Config *config, guint i);
|
||||
|
||||
/* MSS */
|
||||
void nm_ip6_config_set_mss (NMIP6Config *config, guint32 mss);
|
||||
guint32 nm_ip6_config_get_mss (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);
|
||||
|
||||
typedef enum {
|
||||
NM_IP6_COMPARE_FLAG_NONE = 0x00000000, /* match nothing, kinda pointless */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue