2008-11-14 17:41:16 +00:00
|
|
|
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
|
|
/*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301 USA.
|
|
|
|
*
|
2014-07-04 17:33:18 +00:00
|
|
|
* Copyright 2007 - 2008 Novell, Inc.
|
|
|
|
* Copyright 2008 Red Hat, Inc.
|
2008-11-14 17:41:16 +00:00
|
|
|
*/
|
|
|
|
|
2007-02-16 11:23:49 +00:00
|
|
|
#ifndef NM_IP4_CONFIG_H
|
|
|
|
#define NM_IP4_CONFIG_H
|
|
|
|
|
2009-01-19 05:16:40 +00:00
|
|
|
#include <glib.h>
|
2007-02-16 11:23:49 +00:00
|
|
|
#include <glib-object.h>
|
|
|
|
#include <dbus/dbus-glib.h>
|
2007-06-22 15:09:02 +00:00
|
|
|
#include "nm-object.h"
|
2007-02-16 11:23:49 +00:00
|
|
|
|
2007-08-09 09:19:57 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2007-02-16 11:23:49 +00:00
|
|
|
#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))
|
2012-07-27 11:15:54 +00:00
|
|
|
#define NM_IS_IP4_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_IP4_CONFIG))
|
2007-02-16 11:23:49 +00:00
|
|
|
#define NM_IP4_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_IP4_CONFIG, NMIP4ConfigClass))
|
|
|
|
|
|
|
|
typedef struct {
|
2007-06-22 15:09:02 +00:00
|
|
|
NMObject parent;
|
2007-02-16 11:23:49 +00:00
|
|
|
} NMIP4Config;
|
|
|
|
|
|
|
|
typedef struct {
|
2007-06-22 15:09:02 +00:00
|
|
|
NMObjectClass parent;
|
2009-09-30 16:20:44 +00:00
|
|
|
|
|
|
|
/* Padding for future expansion */
|
|
|
|
void (*_reserved1) (void);
|
|
|
|
void (*_reserved2) (void);
|
|
|
|
void (*_reserved3) (void);
|
|
|
|
void (*_reserved4) (void);
|
|
|
|
void (*_reserved5) (void);
|
|
|
|
void (*_reserved6) (void);
|
2007-02-16 11:23:49 +00:00
|
|
|
} NMIP4ConfigClass;
|
|
|
|
|
2013-09-06 09:56:41 +00:00
|
|
|
#define NM_IP4_CONFIG_GATEWAY "gateway"
|
2008-05-06 Dan Williams <dcbw@redhat.com>
* src/dhcp-manager/nm-dhcp-manager.c
- (nm_dhcp_manager_get_ip4_config): clean up; update for changes to
NMIP4Config to support multiple IP addresses
* src/NetworkManagerUtils.c
- (nm_utils_merge_ip4_config): update for multiple IP addresses
* src/nm-ip4-config.c
src/nm-ip4-config.h
- Store a list of IPv4 address/netmask/gateway tuples
- (nm_ip4_config_get_gateway, nm_ip4_config_set_gateway,
nm_ip4_config_get_netmask, nm_ip4_config_set_netmask,
nm_ip4_config_get_broadcast, nm_ip4_config_set_broadcast,
nm_ip4_config_set_address): remove
- (nm_ip4_config_take_address, nm_ip4_config_add_address,
nm_ip4_config_replace_address, nm_ip4_config_get_num_addresses):
new functions; handle multiple IPv4 addresses
* src/nm-device.c
src/ppp-manager/nm-ppp-manager.c
src/vpn-manager/nm-vpn-connection.c
src/NetworkManagerPolicy.c
test/nm-tool.c
libnm-glib/libnm-glib-test.c
- update for changes to NMIP4Config for multiple IPv4 addresses
* src/NetworkManagerSystem.c
- (nm_system_device_set_ip4_route): don't add the route if any address
is on the same subnet as the destination
- (check_one_address): ignore the exact match, just match family and
interface index
- (add_ip4_addresses): add all IPv4 addresses in an NMIP4Config to
an interface
- (nm_system_device_set_from_ip4_config): use add_ip4_addresses()
- (nm_system_vpn_device_set_from_ip4_config): use add_ip4_addresses()
* introspection/nm-ip4-config.xml
- Remove 'address', 'gateway', 'netmask', and 'broadcast' properties
- Add 'addresses' property which is an array of (uuu) tuples of
address/netmask/gateway
* libnm-util/nm-setting-ip4-config.c
- (set_property): use ip-address <-> GValue converters from nm-utils.c
* libnm-glib/nm-ip4-config.c
libnm-glib/nm-ip4-config.h
- Handle D-Bus interface changes to support multiple IP addresses
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3637 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-06 21:53:22 +00:00
|
|
|
#define NM_IP4_CONFIG_ADDRESSES "addresses"
|
2013-09-06 09:56:41 +00:00
|
|
|
#define NM_IP4_CONFIG_ROUTES "routes"
|
2008-03-24 15:17:30 +00:00
|
|
|
#define NM_IP4_CONFIG_NAMESERVERS "nameservers"
|
|
|
|
#define NM_IP4_CONFIG_DOMAINS "domains"
|
2013-09-06 09:56:41 +00:00
|
|
|
#define NM_IP4_CONFIG_SEARCHES "searches"
|
2008-12-19 22:01:06 +00:00
|
|
|
#define NM_IP4_CONFIG_WINS_SERVERS "wins-servers"
|
2008-03-24 15:17:30 +00:00
|
|
|
|
2007-02-16 11:23:49 +00:00
|
|
|
GType nm_ip4_config_get_type (void);
|
|
|
|
|
2008-03-24 15:17:30 +00:00
|
|
|
GObject *nm_ip4_config_new (DBusGConnection *connection, const char *object_path);
|
|
|
|
|
2014-02-12 17:28:52 +00:00
|
|
|
NM_AVAILABLE_IN_0_9_10
|
2013-09-06 09:56:41 +00:00
|
|
|
const char * nm_ip4_config_get_gateway (NMIP4Config *config);
|
2008-12-19 22:01:06 +00:00
|
|
|
const GSList * nm_ip4_config_get_addresses (NMIP4Config *config);
|
2013-09-06 09:56:41 +00:00
|
|
|
const GSList * nm_ip4_config_get_routes (NMIP4Config *config);
|
2008-12-19 22:01:06 +00:00
|
|
|
const GArray * nm_ip4_config_get_nameservers (NMIP4Config *config);
|
|
|
|
const GPtrArray *nm_ip4_config_get_domains (NMIP4Config *config);
|
2014-02-12 17:28:52 +00:00
|
|
|
NM_AVAILABLE_IN_0_9_10
|
2013-09-06 09:56:41 +00:00
|
|
|
const GPtrArray *nm_ip4_config_get_searches (NMIP4Config *config);
|
2008-12-19 22:01:06 +00:00
|
|
|
const GArray * nm_ip4_config_get_wins_servers (NMIP4Config *config);
|
2007-02-16 11:23:49 +00:00
|
|
|
|
2007-08-09 09:19:57 +00:00
|
|
|
G_END_DECLS
|
2007-02-16 11:23:49 +00:00
|
|
|
|
|
|
|
#endif /* NM_IP4_CONFIG_H */
|