1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301 USA.
19 * Copyright 2007 - 2014 Red Hat, Inc.
22 #ifndef __NM_SETTING_IP6_CONFIG_H__
23 #define __NM_SETTING_IP6_CONFIG_H__
25 #if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
26 #error "Only <NetworkManager.h> can be included directly."
29 #include "nm-setting-ip-config.h"
33 #define NM_TYPE_SETTING_IP6_CONFIG (nm_setting_ip6_config_get_type ())
34 #define NM_SETTING_IP6_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_SETTING_IP6_CONFIG, NMSettingIP6Config))
35 #define NM_SETTING_IP6_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_SETTING_IP6CONFIG, NMSettingIP6ConfigClass))
36 #define NM_IS_SETTING_IP6_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_SETTING_IP6_CONFIG))
37 #define NM_IS_SETTING_IP6_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_SETTING_IP6_CONFIG))
38 #define NM_SETTING_IP6_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_SETTING_IP6_CONFIG, NMSettingIP6ConfigClass))
40 #define NM_SETTING_IP6_CONFIG_SETTING_NAME "ipv6"
42 #define NM_SETTING_IP6_CONFIG_IP6_PRIVACY "ip6-privacy"
44 #define NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE "addr-gen-mode"
47 * NM_SETTING_IP6_CONFIG_METHOD_IGNORE:
49 * IPv6 is not required or is handled by some other mechanism, and NetworkManager
50 * should not configure IPv6 for this connection.
52 #define NM_SETTING_IP6_CONFIG_METHOD_IGNORE "ignore"
55 * NM_SETTING_IP6_CONFIG_METHOD_AUTO:
57 * IPv6 configuration should be automatically determined via a method appropriate
58 * for the hardware interface, ie router advertisements, DHCP, or PPP or some
59 * other device-specific manner.
61 #define NM_SETTING_IP6_CONFIG_METHOD_AUTO "auto"
64 * NM_SETTING_IP6_CONFIG_METHOD_DHCP:
66 * IPv6 configuration should be automatically determined via DHCPv6 only and
67 * router advertisements should be ignored.
69 #define NM_SETTING_IP6_CONFIG_METHOD_DHCP "dhcp"
72 * NM_SETTING_IP6_CONFIG_METHOD_LINK_LOCAL:
74 * IPv6 configuration should be automatically configured for link-local-only
77 #define NM_SETTING_IP6_CONFIG_METHOD_LINK_LOCAL "link-local"
80 * NM_SETTING_IP6_CONFIG_METHOD_MANUAL:
82 * All necessary IPv6 configuration (addresses, prefix, DNS, etc) is specified
83 * in the setting's properties.
85 #define NM_SETTING_IP6_CONFIG_METHOD_MANUAL "manual"
88 * NM_SETTING_IP6_CONFIG_METHOD_SHARED:
90 * This connection specifies configuration that allows other computers to
91 * connect through it to the default network (usually the Internet). The
92 * connection's interface will be assigned a private address, and router
93 * advertisements, a caching DNS server, and Network Address Translation (NAT)
94 * functionality will be started on this connection's interface to allow other
95 * devices to connect through that interface to the default network. (not yet
98 #define NM_SETTING_IP6_CONFIG_METHOD_SHARED "shared"
101 * NMSettingIP6ConfigPrivacy:
102 * @NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN: unknown or no value specified
103 * @NM_SETTING_IP6_CONFIG_PRIVACY_DISABLED: IPv6 Privacy Extensions are disabled
104 * @NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_PUBLIC_ADDR: IPv6 Privacy Extensions
105 * are enabled, but public addresses are preferred over temporary addresses
106 * @NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_TEMP_ADDR: IPv6 Privacy Extensions
107 * are enabled and temporary addresses are preferred over public addresses
109 * #NMSettingIP6ConfigPrivacy values indicate if and how IPv6 Privacy
110 * Extensions are used (RFC4941).
113 NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN = -1,
114 NM_SETTING_IP6_CONFIG_PRIVACY_DISABLED = 0,
115 NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_PUBLIC_ADDR = 1,
116 NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_TEMP_ADDR = 2
117 } NMSettingIP6ConfigPrivacy;
120 * NMSettingIP6ConfigAddrGenMode:
121 * @NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_EUI64: The Interface Identifier is derived
122 * from the interface hardware address.
123 * @NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_STABLE_PRIVACY: The Interface Identifier
124 * is created by using a cryptographically secure hash of a secret host-specific
125 * key along with the connection identification and the network address as
126 * specified by RFC7217.
128 * #NMSettingIP6ConfigAddrGenMode controls how the the Interface Identifier for
129 * RFC4862 Stateless Address Autoconfiguration is created.
134 NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_EUI64 = 0,
135 NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_STABLE_PRIVACY = 1,
136 } NMSettingIP6ConfigAddrGenMode;
138 struct _NMSettingIP6Config {
139 NMSettingIPConfig parent;
143 NMSettingIPConfigClass parent;
147 } NMSettingIP6ConfigClass;
149 GType nm_setting_ip6_config_get_type (void);
151 NMSetting *nm_setting_ip6_config_new (void);
153 NMSettingIP6ConfigPrivacy nm_setting_ip6_config_get_ip6_privacy (NMSettingIP6Config *setting);
155 NMSettingIP6ConfigAddrGenMode nm_setting_ip6_config_get_addr_gen_mode (NMSettingIP6Config *setting);
159 #endif /* __NM_SETTING_IP6_CONFIG_H__ */