diff options
| author | Michael Biebl <biebl@debian.org> | 2015-01-22 00:29:39 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2015-01-22 00:29:39 +0100 |
| commit | 2c032d8f1c6292c1338a615e6ec40252889ba85c (patch) | |
| tree | 1f77182220b2b0264288ba4a476ab47e5bc48716 /src/nm-ip4-config.h | |
| parent | 33491bc4279481db8ae47213e34a6d695a0e8830 (diff) | |
Imported Upstream version 1.0.0 upstream/1.0.0
Diffstat (limited to 'src/nm-ip4-config.h')
| -rw-r--r-- | src/nm-ip4-config.h | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/src/nm-ip4-config.h b/src/nm-ip4-config.h index c9096bb3..5ac455d8 100644 --- a/src/nm-ip4-config.h +++ b/src/nm-ip4-config.h @@ -18,12 +18,12 @@ * Copyright (C) 2008–2013 Red Hat, Inc. */ -#ifndef NM_IP4_CONFIG_H -#define NM_IP4_CONFIG_H +#ifndef __NETWORKMANAGER_IP4_CONFIG_H__ +#define __NETWORKMANAGER_IP4_CONFIG_H__ #include <glib-object.h> -#include "nm-platform.h" +#include "nm-types.h" #include "nm-setting-ip4-config.h" #define NM_TYPE_IP4_CONFIG (nm_ip4_config_get_type ()) @@ -33,22 +33,26 @@ #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)) -typedef struct { +struct _NMIP4Config { GObject parent; -} NMIP4Config; +}; typedef struct { GObjectClass parent; } NMIP4ConfigClass; +#define NM_IP4_CONFIG_ADDRESS_DATA "address-data" +#define NM_IP4_CONFIG_ROUTE_DATA "route-data" #define NM_IP4_CONFIG_GATEWAY "gateway" -#define NM_IP4_CONFIG_ADDRESSES "addresses" -#define NM_IP4_CONFIG_ROUTES "routes" #define NM_IP4_CONFIG_NAMESERVERS "nameservers" #define NM_IP4_CONFIG_DOMAINS "domains" #define NM_IP4_CONFIG_SEARCHES "searches" #define NM_IP4_CONFIG_WINS_SERVERS "wins-servers" +/* deprecated */ +#define NM_IP4_CONFIG_ADDRESSES "addresses" +#define NM_IP4_CONFIG_ROUTES "routes" + GType nm_ip4_config_get_type (void); @@ -60,8 +64,8 @@ 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 capture_resolv_conf); -gboolean nm_ip4_config_commit (const NMIP4Config *config, int ifindex); -void nm_ip4_config_merge_setting (NMIP4Config *config, NMSettingIP4Config *setting, int default_route_metric); +gboolean nm_ip4_config_commit (const NMIP4Config *config, int ifindex, guint32 default_route_metric); +void nm_ip4_config_merge_setting (NMIP4Config *config, NMSettingIPConfig *setting, guint32 default_route_metric); NMSetting *nm_ip4_config_create_setting (const NMIP4Config *config); /* Utility functions */ @@ -92,6 +96,9 @@ void nm_ip4_config_del_route (NMIP4Config *config, guint i); guint32 nm_ip4_config_get_num_routes (const NMIP4Config *config); const NMPlatformIP4Route *nm_ip4_config_get_route (const NMIP4Config *config, guint32 i); +const NMPlatformIP4Route *nm_ip4_config_get_direct_route_for_host (const NMIP4Config *config, guint32 host); +const NMPlatformIP4Address *nm_ip4_config_get_subnet_for_host (const NMIP4Config *config, guint32 host); + /* Nameservers */ void nm_ip4_config_reset_nameservers (NMIP4Config *config); void nm_ip4_config_add_nameserver (NMIP4Config *config, guint32 nameserver); @@ -134,8 +141,9 @@ 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); +void nm_ip4_config_set_mtu (NMIP4Config *config, guint32 mtu, NMIPConfigSource source); guint32 nm_ip4_config_get_mtu (const NMIP4Config *config); +NMIPConfigSource nm_ip4_config_get_mtu_source (const NMIP4Config *config); void nm_ip4_config_hash (const NMIP4Config *config, GChecksum *sum, gboolean dns_only); gboolean nm_ip4_config_equal (const NMIP4Config *a, const NMIP4Config *b); @@ -146,4 +154,4 @@ gboolean nm_ip4_config_equal (const NMIP4Config *a, const NMIP4Config *b); gboolean nm_ip4_config_capture_resolv_conf (GArray *nameservers, const char *rc_contents); -#endif /* NM_IP4_CONFIG_H */ +#endif /* __NETWORKMANAGER_IP4_CONFIG_H__ */ |