1/* SPDX-License-Identifier: LGPL-2.1-or-later */
2/*
3 * Copyright (C) 2004 - 2018 Red Hat, Inc.
4 */
5
6/* Definitions related to NetworkManager's D-Bus interfaces.
7 *
8 * Note that although this header is installed as part of libnm, it is also
9 * used by some external code that does not link to libnm.
10 */
11
12#ifndef __NM_DBUS_INTERFACE_H__
13#define __NM_DBUS_INTERFACE_H__
14
15/* This header must not include glib or libnm. */
16
17#ifndef NM_VERSION_H
18#define NM_AVAILABLE_IN_1_2
19#define NM_AVAILABLE_IN_1_8
20#endif
21
22/*
23 * dbus services details
24 */
25#define NM_DBUS_SERVICE "org.freedesktop.NetworkManager"
26
27#define NM_DBUS_INTERFACE "org.freedesktop.NetworkManager"
28#define NM_DBUS_INTERFACE_ACCESS_POINT NM_DBUS_INTERFACE ".AccessPoint"
29#define NM_DBUS_INTERFACE_ACTIVE_CONNECTION NM_DBUS_INTERFACE ".Connection.Active"
30#define NM_DBUS_INTERFACE_CHECKPOINT NM_DBUS_INTERFACE ".Checkpoint"
31#define NM_DBUS_INTERFACE_DEVICE NM_DBUS_INTERFACE ".Device"
32#define NM_DBUS_INTERFACE_DEVICE_6LOWPAN NM_DBUS_INTERFACE_DEVICE ".Lowpan"
33#define NM_DBUS_INTERFACE_DEVICE_ADSL NM_DBUS_INTERFACE_DEVICE ".Adsl"
34#define NM_DBUS_INTERFACE_DEVICE_BLUETOOTH NM_DBUS_INTERFACE_DEVICE ".Bluetooth"
35#define NM_DBUS_INTERFACE_DEVICE_BOND NM_DBUS_INTERFACE_DEVICE ".Bond"
36#define NM_DBUS_INTERFACE_DEVICE_BRIDGE NM_DBUS_INTERFACE_DEVICE ".Bridge"
37#define NM_DBUS_INTERFACE_DEVICE_DUMMY NM_DBUS_INTERFACE_DEVICE ".Dummy"
38#define NM_DBUS_INTERFACE_DEVICE_GENERIC NM_DBUS_INTERFACE_DEVICE ".Generic"
39#define NM_DBUS_INTERFACE_DEVICE_GRE NM_DBUS_INTERFACE_DEVICE ".Gre"
40#define NM_DBUS_INTERFACE_DEVICE_INFINIBAND NM_DBUS_INTERFACE_DEVICE ".Infiniband"
41#define NM_DBUS_INTERFACE_DEVICE_IP_TUNNEL NM_DBUS_INTERFACE_DEVICE ".IPTunnel"
42#define NM_DBUS_INTERFACE_DEVICE_MACSEC NM_DBUS_INTERFACE_DEVICE ".Macsec"
43#define NM_DBUS_INTERFACE_DEVICE_MACVLAN NM_DBUS_INTERFACE_DEVICE ".Macvlan"
44#define NM_DBUS_INTERFACE_DEVICE_MODEM NM_DBUS_INTERFACE_DEVICE ".Modem"
45#define NM_DBUS_INTERFACE_DEVICE_OLPC_MESH NM_DBUS_INTERFACE_DEVICE ".OlpcMesh"
46#define NM_DBUS_INTERFACE_DEVICE_OVS_BRIDGE NM_DBUS_INTERFACE_DEVICE ".OvsBridge"
47#define NM_DBUS_INTERFACE_DEVICE_OVS_INTERFACE NM_DBUS_INTERFACE_DEVICE ".OvsInterface"
48#define NM_DBUS_INTERFACE_DEVICE_OVS_PORT NM_DBUS_INTERFACE_DEVICE ".OvsPort"
49#define NM_DBUS_INTERFACE_DEVICE_PPP NM_DBUS_INTERFACE_DEVICE ".Ppp"
50#define NM_DBUS_INTERFACE_DEVICE_STATISTICS NM_DBUS_INTERFACE_DEVICE ".Statistics"
51#define NM_DBUS_INTERFACE_DEVICE_TEAM NM_DBUS_INTERFACE_DEVICE ".Team"
52#define NM_DBUS_INTERFACE_DEVICE_TUN NM_DBUS_INTERFACE_DEVICE ".Tun"
53#define NM_DBUS_INTERFACE_DEVICE_VETH NM_DBUS_INTERFACE_DEVICE ".Veth"
54#define NM_DBUS_INTERFACE_DEVICE_VLAN NM_DBUS_INTERFACE_DEVICE ".Vlan"
55#define NM_DBUS_INTERFACE_DEVICE_VRF NM_DBUS_INTERFACE_DEVICE ".Vrf"
56#define NM_DBUS_INTERFACE_DEVICE_VXLAN NM_DBUS_INTERFACE_DEVICE ".Vxlan"
57#define NM_DBUS_INTERFACE_DEVICE_WIFI_P2P NM_DBUS_INTERFACE_DEVICE ".WifiP2P"
58#define NM_DBUS_INTERFACE_DEVICE_WIMAX NM_DBUS_INTERFACE_DEVICE ".WiMax"
59#define NM_DBUS_INTERFACE_DEVICE_WIRED NM_DBUS_INTERFACE_DEVICE ".Wired"
60#define NM_DBUS_INTERFACE_DEVICE_WIREGUARD NM_DBUS_INTERFACE_DEVICE ".WireGuard"
61#define NM_DBUS_INTERFACE_DEVICE_WIRELESS NM_DBUS_INTERFACE_DEVICE ".Wireless"
62#define NM_DBUS_INTERFACE_DEVICE_WPAN NM_DBUS_INTERFACE_DEVICE ".Wpan"
63#define NM_DBUS_INTERFACE_DHCP4_CONFIG NM_DBUS_INTERFACE ".DHCP4Config"
64#define NM_DBUS_INTERFACE_DHCP6_CONFIG NM_DBUS_INTERFACE ".DHCP6Config"
65#define NM_DBUS_INTERFACE_IP4_CONFIG NM_DBUS_INTERFACE ".IP4Config"
66#define NM_DBUS_INTERFACE_IP6_CONFIG NM_DBUS_INTERFACE ".IP6Config"
67#define NM_DBUS_INTERFACE_WIFI_P2P_PEER NM_DBUS_INTERFACE ".WifiP2PPeer"
68#define NM_DBUS_INTERFACE_WIMAX_NSP NM_DBUS_INTERFACE ".WiMax.Nsp"
69
70#define NM_DBUS_PATH "/org/freedesktop/NetworkManager"
71#define NM_DBUS_PATH_ACCESS_POINT NM_DBUS_PATH "/AccessPoint"
72#define NM_DBUS_PATH_WIFI_P2P_PEER NM_DBUS_PATH "/WifiP2PPeer"
73#define NM_DBUS_PATH_WIMAX_NSP NM_DBUS_PATH "/Nsp"
74
75#define NM_DBUS_INTERFACE_SETTINGS "org.freedesktop.NetworkManager.Settings"
76#define NM_DBUS_PATH_SETTINGS "/org/freedesktop/NetworkManager/Settings"
77
78#define NM_DBUS_INTERFACE_SETTINGS_CONNECTION "org.freedesktop.NetworkManager.Settings.Connection"
79#define NM_DBUS_PATH_SETTINGS_CONNECTION "/org/freedesktop/NetworkManager/Settings/Connection"
80#define NM_DBUS_INTERFACE_SETTINGS_CONNECTION_SECRETS \
81 "org.freedesktop.NetworkManager.Settings.Connection.Secrets"
82
83#define NM_DBUS_INTERFACE_AGENT_MANAGER NM_DBUS_INTERFACE ".AgentManager"
84#define NM_DBUS_PATH_AGENT_MANAGER "/org/freedesktop/NetworkManager/AgentManager"
85
86#define NM_DBUS_INTERFACE_SECRET_AGENT NM_DBUS_INTERFACE ".SecretAgent"
87#define NM_DBUS_PATH_SECRET_AGENT "/org/freedesktop/NetworkManager/SecretAgent"
88
89#define NM_DBUS_INTERFACE_DNS_MANAGER "org.freedesktop.NetworkManager.DnsManager"
90#define NM_DBUS_PATH_DNS_MANAGER "/org/freedesktop/NetworkManager/DnsManager"
91
92/**
93 * NMCapability:
94 * @NM_CAPABILITY_TEAM: Teams can be managed. This means the team device plugin
95 * is loaded.
96 * @NM_CAPABILITY_OVS: OpenVSwitch can be managed. This means the OVS device plugin
97 * is loaded. Since: 1.24.
98 *
99 * #NMCapability names the numbers in the Capabilities property.
100 * Capabilities are positive numbers. They are part of stable API
101 * and a certain capability number is guaranteed not to change.
102 *
103 * The range 0x7000 - 0x7FFF of capabilities is guaranteed not to be
104 * used by upstream NetworkManager. It could thus be used for downstream
105 * extensions.
106 */
107typedef enum {
108 NM_CAPABILITY_TEAM = 1,
109 NM_CAPABILITY_OVS = 2,
110} NMCapability;
111
112/**
113 * NMState:
114 * @NM_STATE_UNKNOWN: Networking state is unknown. This indicates a daemon error
115 * that makes it unable to reasonably assess the state. In such event the
116 * applications are expected to assume Internet connectivity might be present
117 * and not disable controls that require network access.
118 * The graphical shells may hide the network accessibility indicator altogether
119 * since no meaningful status indication can be provided.
120 * @NM_STATE_ASLEEP: Networking is not enabled, the system is being suspended or
121 * resumed from suspend.
122 * @NM_STATE_DISCONNECTED: There is no active network connection.
123 * The graphical shell should indicate no network connectivity and the
124 * applications should not attempt to access the network.
125 * @NM_STATE_DISCONNECTING: Network connections are being cleaned up.
126 * The applications should tear down their network sessions.
127 * @NM_STATE_CONNECTING: A network connection is being started
128 * The graphical shell should indicate the network is being connected while
129 * the applications should still make no attempts to connect the network.
130 * @NM_STATE_CONNECTED_LOCAL: There is only local IPv4 and/or IPv6 connectivity,
131 * but no default route to access the Internet. The graphical shell should
132 * indicate no network connectivity.
133 * @NM_STATE_CONNECTED_SITE: There is only site-wide IPv4 and/or IPv6 connectivity.
134 * This means a default route is available, but the Internet connectivity check
135 * (see "Connectivity" property) did not succeed. The graphical shell should
136 * indicate limited network connectivity.
137 * @NM_STATE_CONNECTED_GLOBAL: There is global IPv4 and/or IPv6 Internet connectivity
138 * This means the Internet connectivity check succeeded, the graphical shell should
139 * indicate full network connectivity.
140 *
141 * #NMState values indicate the current overall networking state.
142 **/
143typedef enum {
144 NM_STATE_UNKNOWN = 0,
145 NM_STATE_ASLEEP = 10,
146 NM_STATE_DISCONNECTED = 20,
147 NM_STATE_DISCONNECTING = 30,
148 NM_STATE_CONNECTING = 40,
149 NM_STATE_CONNECTED_LOCAL = 50,
150 NM_STATE_CONNECTED_SITE = 60,
151 NM_STATE_CONNECTED_GLOBAL = 70,
152} NMState;
153
154/**
155 * NMConnectivityState:
156 * @NM_CONNECTIVITY_UNKNOWN: Network connectivity is unknown. This means the
157 * connectivity checks are disabled (e.g. on server installations) or has
158 * not run yet. The graphical shell should assume the Internet connection
159 * might be available and not present a captive portal window.
160 * @NM_CONNECTIVITY_NONE: The host is not connected to any network. There's
161 * no active connection that contains a default route to the internet and
162 * thus it makes no sense to even attempt a connectivity check. The graphical
163 * shell should use this state to indicate the network connection is unavailable.
164 * @NM_CONNECTIVITY_PORTAL: The Internet connection is hijacked by a captive
165 * portal gateway. The graphical shell may open a sandboxed web browser window
166 * (because the captive portals typically attempt a man-in-the-middle attacks
167 * against the https connections) for the purpose of authenticating to a gateway
168 * and retrigger the connectivity check with CheckConnectivity() when the
169 * browser window is dismissed.
170 * @NM_CONNECTIVITY_LIMITED: The host is connected to a network, does not appear
171 * to be able to reach the full Internet, but a captive portal has not been
172 * detected.
173 * @NM_CONNECTIVITY_FULL: The host is connected to a network, and
174 * appears to be able to reach the full Internet.
175 */
176typedef enum {
177 NM_CONNECTIVITY_UNKNOWN = 0,
178 NM_CONNECTIVITY_NONE = 1,
179 NM_CONNECTIVITY_PORTAL = 2,
180 NM_CONNECTIVITY_LIMITED = 3,
181 NM_CONNECTIVITY_FULL = 4,
182} NMConnectivityState;
183
184/**
185 * NMDeviceType:
186 * @NM_DEVICE_TYPE_UNKNOWN: unknown device
187 * @NM_DEVICE_TYPE_GENERIC: generic support for unrecognized device types
188 * @NM_DEVICE_TYPE_ETHERNET: a wired ethernet device
189 * @NM_DEVICE_TYPE_WIFI: an 802.11 Wi-Fi device
190 * @NM_DEVICE_TYPE_UNUSED1: not used
191 * @NM_DEVICE_TYPE_UNUSED2: not used
192 * @NM_DEVICE_TYPE_BT: a Bluetooth device supporting PAN or DUN access protocols
193 * @NM_DEVICE_TYPE_OLPC_MESH: an OLPC XO mesh networking device
194 * @NM_DEVICE_TYPE_WIMAX: an 802.16e Mobile WiMAX broadband device
195 * @NM_DEVICE_TYPE_MODEM: a modem supporting analog telephone, CDMA/EVDO,
196 * GSM/UMTS, or LTE network access protocols
197 * @NM_DEVICE_TYPE_INFINIBAND: an IP-over-InfiniBand device
198 * @NM_DEVICE_TYPE_BOND: a bond master interface
199 * @NM_DEVICE_TYPE_VLAN: an 802.1Q VLAN interface
200 * @NM_DEVICE_TYPE_ADSL: ADSL modem
201 * @NM_DEVICE_TYPE_BRIDGE: a bridge master interface
202 * @NM_DEVICE_TYPE_TEAM: a team master interface
203 * @NM_DEVICE_TYPE_TUN: a TUN or TAP interface
204 * @NM_DEVICE_TYPE_IP_TUNNEL: a IP tunnel interface
205 * @NM_DEVICE_TYPE_MACVLAN: a MACVLAN interface
206 * @NM_DEVICE_TYPE_VXLAN: a VXLAN interface
207 * @NM_DEVICE_TYPE_VETH: a VETH interface
208 * @NM_DEVICE_TYPE_MACSEC: a MACsec interface
209 * @NM_DEVICE_TYPE_DUMMY: a dummy interface
210 * @NM_DEVICE_TYPE_PPP: a PPP interface
211 * @NM_DEVICE_TYPE_OVS_INTERFACE: a Open vSwitch interface
212 * @NM_DEVICE_TYPE_OVS_PORT: a Open vSwitch port
213 * @NM_DEVICE_TYPE_OVS_BRIDGE: a Open vSwitch bridge
214 * @NM_DEVICE_TYPE_WPAN: a IEEE 802.15.4 (WPAN) MAC Layer Device
215 * @NM_DEVICE_TYPE_6LOWPAN: 6LoWPAN interface
216 * @NM_DEVICE_TYPE_WIREGUARD: a WireGuard interface
217 * @NM_DEVICE_TYPE_WIFI_P2P: an 802.11 Wi-Fi P2P device. Since: 1.16.
218 * @NM_DEVICE_TYPE_VRF: A VRF (Virtual Routing and Forwarding) interface. Since: 1.24.
219 *
220 * #NMDeviceType values indicate the type of hardware represented by a
221 * device object.
222 **/
223typedef enum {
224 NM_DEVICE_TYPE_UNKNOWN = 0,
225 NM_DEVICE_TYPE_ETHERNET = 1,
226 NM_DEVICE_TYPE_WIFI = 2,
227 NM_DEVICE_TYPE_UNUSED1 = 3,
228 NM_DEVICE_TYPE_UNUSED2 = 4,
229 NM_DEVICE_TYPE_BT = 5, /* Bluetooth */
230 NM_DEVICE_TYPE_OLPC_MESH = 6,
231 NM_DEVICE_TYPE_WIMAX = 7,
232 NM_DEVICE_TYPE_MODEM = 8,
233 NM_DEVICE_TYPE_INFINIBAND = 9,
234 NM_DEVICE_TYPE_BOND = 10,
235 NM_DEVICE_TYPE_VLAN = 11,
236 NM_DEVICE_TYPE_ADSL = 12,
237 NM_DEVICE_TYPE_BRIDGE = 13,
238 NM_DEVICE_TYPE_GENERIC = 14,
239 NM_DEVICE_TYPE_TEAM = 15,
240 NM_DEVICE_TYPE_TUN = 16,
241 NM_DEVICE_TYPE_IP_TUNNEL = 17,
242 NM_DEVICE_TYPE_MACVLAN = 18,
243 NM_DEVICE_TYPE_VXLAN = 19,
244 NM_DEVICE_TYPE_VETH = 20,
245 NM_DEVICE_TYPE_MACSEC = 21,
246 NM_DEVICE_TYPE_DUMMY = 22,
247 NM_DEVICE_TYPE_PPP = 23,
248 NM_DEVICE_TYPE_OVS_INTERFACE = 24,
249 NM_DEVICE_TYPE_OVS_PORT = 25,
250 NM_DEVICE_TYPE_OVS_BRIDGE = 26,
251 NM_DEVICE_TYPE_WPAN = 27,
252 NM_DEVICE_TYPE_6LOWPAN = 28,
253 NM_DEVICE_TYPE_WIREGUARD = 29,
254 NM_DEVICE_TYPE_WIFI_P2P = 30,
255 NM_DEVICE_TYPE_VRF = 31,
256} NMDeviceType;
257
258/**
259 * NMDeviceCapabilities:
260 * @NM_DEVICE_CAP_NONE: device has no special capabilities
261 * @NM_DEVICE_CAP_NM_SUPPORTED: NetworkManager supports this device
262 * @NM_DEVICE_CAP_CARRIER_DETECT: this device can indicate carrier status
263 * @NM_DEVICE_CAP_IS_SOFTWARE: this device is a software device
264 * @NM_DEVICE_CAP_SRIOV: this device supports single-root I/O virtualization
265 *
266 * General device capability flags.
267 **/
268typedef enum { /*< flags >*/
269 NM_DEVICE_CAP_NONE = 0x00000000,
270 NM_DEVICE_CAP_NM_SUPPORTED = 0x00000001,
271 NM_DEVICE_CAP_CARRIER_DETECT = 0x00000002,
272 NM_DEVICE_CAP_IS_SOFTWARE = 0x00000004,
273 NM_DEVICE_CAP_SRIOV = 0x00000008,
274} NMDeviceCapabilities;
275
276/**
277 * NMDeviceWifiCapabilities:
278 * @NM_WIFI_DEVICE_CAP_NONE: device has no encryption/authentication capabilities
279 * @NM_WIFI_DEVICE_CAP_CIPHER_WEP40: device supports 40/64-bit WEP encryption
280 * @NM_WIFI_DEVICE_CAP_CIPHER_WEP104: device supports 104/128-bit WEP encryption
281 * @NM_WIFI_DEVICE_CAP_CIPHER_TKIP: device supports TKIP encryption
282 * @NM_WIFI_DEVICE_CAP_CIPHER_CCMP: device supports AES/CCMP encryption
283 * @NM_WIFI_DEVICE_CAP_WPA: device supports WPA1 authentication
284 * @NM_WIFI_DEVICE_CAP_RSN: device supports WPA2/RSN authentication
285 * @NM_WIFI_DEVICE_CAP_AP: device supports Access Point mode
286 * @NM_WIFI_DEVICE_CAP_ADHOC: device supports Ad-Hoc mode
287 * @NM_WIFI_DEVICE_CAP_FREQ_VALID: device reports frequency capabilities
288 * @NM_WIFI_DEVICE_CAP_FREQ_2GHZ: device supports 2.4GHz frequencies
289 * @NM_WIFI_DEVICE_CAP_FREQ_5GHZ: device supports 5GHz frequencies
290 * @NM_WIFI_DEVICE_CAP_MESH: device supports acting as a mesh point. Since: 1.20.
291 * @NM_WIFI_DEVICE_CAP_IBSS_RSN: device supports WPA2/RSN in an IBSS network. Since: 1.22.
292 *
293 * 802.11 specific device encryption and authentication capabilities.
294 **/
295typedef enum { /*< flags >*/
296 NM_WIFI_DEVICE_CAP_NONE = 0x00000000,
297 NM_WIFI_DEVICE_CAP_CIPHER_WEP40 = 0x00000001,
298 NM_WIFI_DEVICE_CAP_CIPHER_WEP104 = 0x00000002,
299 NM_WIFI_DEVICE_CAP_CIPHER_TKIP = 0x00000004,
300 NM_WIFI_DEVICE_CAP_CIPHER_CCMP = 0x00000008,
301 NM_WIFI_DEVICE_CAP_WPA = 0x00000010,
302 NM_WIFI_DEVICE_CAP_RSN = 0x00000020,
303 NM_WIFI_DEVICE_CAP_AP = 0x00000040,
304 NM_WIFI_DEVICE_CAP_ADHOC = 0x00000080,
305 NM_WIFI_DEVICE_CAP_FREQ_VALID = 0x00000100,
306 NM_WIFI_DEVICE_CAP_FREQ_2GHZ = 0x00000200,
307 NM_WIFI_DEVICE_CAP_FREQ_5GHZ = 0x00000400,
308 NM_WIFI_DEVICE_CAP_MESH = 0x00001000,
309 NM_WIFI_DEVICE_CAP_IBSS_RSN = 0x00002000,
310} NMDeviceWifiCapabilities;
311
312/**
313 * NM80211ApFlags:
314 * @NM_802_11_AP_FLAGS_NONE: access point has no special capabilities
315 * @NM_802_11_AP_FLAGS_PRIVACY: access point requires authentication and
316 * encryption (usually means WEP)
317 * @NM_802_11_AP_FLAGS_WPS: access point supports some WPS method
318 * @NM_802_11_AP_FLAGS_WPS_PBC: access point supports push-button WPS
319 * @NM_802_11_AP_FLAGS_WPS_PIN: access point supports PIN-based WPS
320 *
321 * 802.11 access point flags.
322 **/
323typedef enum { /*< underscore_name=nm_802_11_ap_flags, flags >*/
324 NM_802_11_AP_FLAGS_NONE = 0x00000000,
325 NM_802_11_AP_FLAGS_PRIVACY = 0x00000001,
326 NM_802_11_AP_FLAGS_WPS = 0x00000002,
327 NM_802_11_AP_FLAGS_WPS_PBC = 0x00000004,
328 NM_802_11_AP_FLAGS_WPS_PIN = 0x00000008,
329} NM80211ApFlags;
330
331/**
332 * NM80211ApSecurityFlags:
333 * @NM_802_11_AP_SEC_NONE: the access point has no special security requirements
334 * @NM_802_11_AP_SEC_PAIR_WEP40: 40/64-bit WEP is supported for
335 * pairwise/unicast encryption
336 * @NM_802_11_AP_SEC_PAIR_WEP104: 104/128-bit WEP is supported for
337 * pairwise/unicast encryption
338 * @NM_802_11_AP_SEC_PAIR_TKIP: TKIP is supported for pairwise/unicast encryption
339 * @NM_802_11_AP_SEC_PAIR_CCMP: AES/CCMP is supported for pairwise/unicast encryption
340 * @NM_802_11_AP_SEC_GROUP_WEP40: 40/64-bit WEP is supported for group/broadcast
341 * encryption
342 * @NM_802_11_AP_SEC_GROUP_WEP104: 104/128-bit WEP is supported for
343 * group/broadcast encryption
344 * @NM_802_11_AP_SEC_GROUP_TKIP: TKIP is supported for group/broadcast encryption
345 * @NM_802_11_AP_SEC_GROUP_CCMP: AES/CCMP is supported for group/broadcast
346 * encryption
347 * @NM_802_11_AP_SEC_KEY_MGMT_PSK: WPA/RSN Pre-Shared Key encryption is
348 * supported
349 * @NM_802_11_AP_SEC_KEY_MGMT_802_1X: 802.1x authentication and key management
350 * is supported
351 * @NM_802_11_AP_SEC_KEY_MGMT_SAE: WPA/RSN Simultaneous Authentication of Equals is
352 * supported
353 * @NM_802_11_AP_SEC_KEY_MGMT_OWE: WPA/RSN Opportunistic Wireless Encryption is
354 * supported
355 * @NM_802_11_AP_SEC_KEY_MGMT_OWE_TM: WPA/RSN Opportunistic Wireless Encryption
356 * transition mode is supported. Since: 1.26.
357 * @NM_802_11_AP_SEC_KEY_MGMT_EAP_SUITE_B_192: WPA3 Enterprise Suite-B 192 bit mode
358 * is supported. Since: 1.30.
359 *
360 * 802.11 access point security and authentication flags. These flags describe
361 * the current security requirements of an access point as determined from the
362 * access point's beacon.
363 **/
364typedef enum { /*< underscore_name=nm_802_11_ap_security_flags, flags >*/
365 NM_802_11_AP_SEC_NONE = 0x00000000,
366 NM_802_11_AP_SEC_PAIR_WEP40 = 0x00000001,
367 NM_802_11_AP_SEC_PAIR_WEP104 = 0x00000002,
368 NM_802_11_AP_SEC_PAIR_TKIP = 0x00000004,
369 NM_802_11_AP_SEC_PAIR_CCMP = 0x00000008,
370 NM_802_11_AP_SEC_GROUP_WEP40 = 0x00000010,
371 NM_802_11_AP_SEC_GROUP_WEP104 = 0x00000020,
372 NM_802_11_AP_SEC_GROUP_TKIP = 0x00000040,
373 NM_802_11_AP_SEC_GROUP_CCMP = 0x00000080,
374 NM_802_11_AP_SEC_KEY_MGMT_PSK = 0x00000100,
375 NM_802_11_AP_SEC_KEY_MGMT_802_1X = 0x00000200,
376 NM_802_11_AP_SEC_KEY_MGMT_SAE = 0x00000400,
377 NM_802_11_AP_SEC_KEY_MGMT_OWE = 0x00000800,
378 NM_802_11_AP_SEC_KEY_MGMT_OWE_TM = 0x00001000,
379 NM_802_11_AP_SEC_KEY_MGMT_EAP_SUITE_B_192 = 0x00002000,
380} NM80211ApSecurityFlags;
381
382/**
383 * NM80211Mode:
384 * @NM_802_11_MODE_UNKNOWN: the device or access point mode is unknown
385 * @NM_802_11_MODE_ADHOC: for both devices and access point objects, indicates
386 * the object is part of an Ad-Hoc 802.11 network without a central
387 * coordinating access point.
388 * @NM_802_11_MODE_INFRA: the device or access point is in infrastructure mode.
389 * For devices, this indicates the device is an 802.11 client/station. For
390 * access point objects, this indicates the object is an access point that
391 * provides connectivity to clients.
392 * @NM_802_11_MODE_AP: the device is an access point/hotspot. Not valid for
393 * access point objects; used only for hotspot mode on the local machine.
394 * @NM_802_11_MODE_MESH: the device is a 802.11s mesh point. Since: 1.20.
395 *
396 * Indicates the 802.11 mode an access point or device is currently in.
397 **/
398typedef enum { /*< underscore_name=nm_802_11_mode >*/
399 NM_802_11_MODE_UNKNOWN = 0,
400 NM_802_11_MODE_ADHOC = 1,
401 NM_802_11_MODE_INFRA = 2,
402 NM_802_11_MODE_AP = 3,
403 NM_802_11_MODE_MESH = 4,
404} NM80211Mode;
405
406/**
407 * NMBluetoothCapabilities:
408 * @NM_BT_CAPABILITY_NONE: device has no usable capabilities
409 * @NM_BT_CAPABILITY_DUN: device provides Dial-Up Networking capability
410 * @NM_BT_CAPABILITY_NAP: device provides Network Access Point capability
411 *
412 * #NMBluetoothCapabilities values indicate the usable capabilities of a
413 * Bluetooth device.
414 **/
415typedef enum { /*< flags >*/
416 NM_BT_CAPABILITY_NONE = 0x00000000,
417 NM_BT_CAPABILITY_DUN = 0x00000001,
418 NM_BT_CAPABILITY_NAP = 0x00000002,
419} NMBluetoothCapabilities;
420
421/**
422 * NMDeviceModemCapabilities:
423 * @NM_DEVICE_MODEM_CAPABILITY_NONE: modem has no usable capabilities
424 * @NM_DEVICE_MODEM_CAPABILITY_POTS: modem uses the analog wired telephone
425 * network and is not a wireless/cellular device
426 * @NM_DEVICE_MODEM_CAPABILITY_CDMA_EVDO: modem supports at least one of CDMA
427 * 1xRTT, EVDO revision 0, EVDO revision A, or EVDO revision B
428 * @NM_DEVICE_MODEM_CAPABILITY_GSM_UMTS: modem supports at least one of GSM,
429 * GPRS, EDGE, UMTS, HSDPA, HSUPA, or HSPA+ packet switched data capability
430 * @NM_DEVICE_MODEM_CAPABILITY_LTE: modem has LTE data capability
431 * @NM_DEVICE_MODEM_CAPABILITY_5GNR: modem has 5GNR data capability (Since: 1.36)
432 *
433 * #NMDeviceModemCapabilities values indicate the generic radio access
434 * technology families a modem device supports. For more information on the
435 * specific access technologies the device supports use the ModemManager D-Bus
436 * API.
437 **/
438typedef enum { /*< flags >*/
439 NM_DEVICE_MODEM_CAPABILITY_NONE = 0x00000000,
440 NM_DEVICE_MODEM_CAPABILITY_POTS = 0x00000001,
441 NM_DEVICE_MODEM_CAPABILITY_CDMA_EVDO = 0x00000002,
442 NM_DEVICE_MODEM_CAPABILITY_GSM_UMTS = 0x00000004,
443 NM_DEVICE_MODEM_CAPABILITY_LTE = 0x00000008,
444 NM_DEVICE_MODEM_CAPABILITY_5GNR = 0x00000040,
445} NMDeviceModemCapabilities;
446/* Note: the numeric values of NMDeviceModemCapabilities must be identical to the values
447 * in MMModemCapability. See the G_STATIC_ASSERT() in nm-modem-broadband.c's get_capabilities(). */
448
449/**
450 * NMWimaxNspNetworkType:
451 * @NM_WIMAX_NSP_NETWORK_TYPE_UNKNOWN: unknown network type
452 * @NM_WIMAX_NSP_NETWORK_TYPE_HOME: home network
453 * @NM_WIMAX_NSP_NETWORK_TYPE_PARTNER: partner network
454 * @NM_WIMAX_NSP_NETWORK_TYPE_ROAMING_PARTNER: roaming partner network
455 *
456 * WiMAX network type.
457 */
458typedef enum {
459 NM_WIMAX_NSP_NETWORK_TYPE_UNKNOWN = 0,
460 NM_WIMAX_NSP_NETWORK_TYPE_HOME = 1,
461 NM_WIMAX_NSP_NETWORK_TYPE_PARTNER = 2,
462 NM_WIMAX_NSP_NETWORK_TYPE_ROAMING_PARTNER = 3,
463} NMWimaxNspNetworkType;
464
465/**
466 * NMDeviceState:
467 * @NM_DEVICE_STATE_UNKNOWN: the device's state is unknown
468 * @NM_DEVICE_STATE_UNMANAGED: the device is recognized, but not managed by
469 * NetworkManager
470 * @NM_DEVICE_STATE_UNAVAILABLE: the device is managed by NetworkManager, but
471 * is not available for use. Reasons may include the wireless switched off,
472 * missing firmware, no ethernet carrier, missing supplicant or modem manager,
473 * etc.
474 * @NM_DEVICE_STATE_DISCONNECTED: the device can be activated, but is currently
475 * idle and not connected to a network.
476 * @NM_DEVICE_STATE_PREPARE: the device is preparing the connection to the
477 * network. This may include operations like changing the MAC address,
478 * setting physical link properties, and anything else required to connect
479 * to the requested network.
480 * @NM_DEVICE_STATE_CONFIG: the device is connecting to the requested network.
481 * This may include operations like associating with the Wi-Fi AP, dialing
482 * the modem, connecting to the remote Bluetooth device, etc.
483 * @NM_DEVICE_STATE_NEED_AUTH: the device requires more information to continue
484 * connecting to the requested network. This includes secrets like WiFi
485 * passphrases, login passwords, PIN codes, etc.
486 * @NM_DEVICE_STATE_IP_CONFIG: the device is requesting IPv4 and/or IPv6
487 * addresses and routing information from the network.
488 * @NM_DEVICE_STATE_IP_CHECK: the device is checking whether further action is
489 * required for the requested network connection. This may include checking
490 * whether only local network access is available, whether a captive portal
491 * is blocking access to the Internet, etc.
492 * @NM_DEVICE_STATE_SECONDARIES: the device is waiting for a secondary
493 * connection (like a VPN) which must activated before the device can be
494 * activated
495 * @NM_DEVICE_STATE_ACTIVATED: the device has a network connection, either local
496 * or global.
497 * @NM_DEVICE_STATE_DEACTIVATING: a disconnection from the current network
498 * connection was requested, and the device is cleaning up resources used for
499 * that connection. The network connection may still be valid.
500 * @NM_DEVICE_STATE_FAILED: the device failed to connect to the requested
501 * network and is cleaning up the connection request
502 **/
503typedef enum {
504 NM_DEVICE_STATE_UNKNOWN = 0,
505 NM_DEVICE_STATE_UNMANAGED = 10,
506 NM_DEVICE_STATE_UNAVAILABLE = 20,
507 NM_DEVICE_STATE_DISCONNECTED = 30,
508 NM_DEVICE_STATE_PREPARE = 40,
509 NM_DEVICE_STATE_CONFIG = 50,
510 NM_DEVICE_STATE_NEED_AUTH = 60,
511 NM_DEVICE_STATE_IP_CONFIG = 70,
512 NM_DEVICE_STATE_IP_CHECK = 80,
513 NM_DEVICE_STATE_SECONDARIES = 90,
514 NM_DEVICE_STATE_ACTIVATED = 100,
515 NM_DEVICE_STATE_DEACTIVATING = 110,
516 NM_DEVICE_STATE_FAILED = 120,
517} NMDeviceState;
518
519/**
520 * NMDeviceStateReason:
521 * @NM_DEVICE_STATE_REASON_NONE: No reason given
522 * @NM_DEVICE_STATE_REASON_UNKNOWN: Unknown error
523 * @NM_DEVICE_STATE_REASON_NOW_MANAGED: Device is now managed
524 * @NM_DEVICE_STATE_REASON_NOW_UNMANAGED: Device is now unmanaged
525 * @NM_DEVICE_STATE_REASON_CONFIG_FAILED: The device could not be readied for configuration
526 * @NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE: IP configuration could not be reserved (no available address, timeout, etc)
527 * @NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED: The IP config is no longer valid
528 * @NM_DEVICE_STATE_REASON_NO_SECRETS: Secrets were required, but not provided
529 * @NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT: 802.1x supplicant disconnected
530 * @NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED: 802.1x supplicant configuration failed
531 * @NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED: 802.1x supplicant failed
532 * @NM_DEVICE_STATE_REASON_SUPPLICANT_TIMEOUT: 802.1x supplicant took too long to authenticate
533 * @NM_DEVICE_STATE_REASON_PPP_START_FAILED: PPP service failed to start
534 * @NM_DEVICE_STATE_REASON_PPP_DISCONNECT: PPP service disconnected
535 * @NM_DEVICE_STATE_REASON_PPP_FAILED: PPP failed
536 * @NM_DEVICE_STATE_REASON_DHCP_START_FAILED: DHCP client failed to start
537 * @NM_DEVICE_STATE_REASON_DHCP_ERROR: DHCP client error
538 * @NM_DEVICE_STATE_REASON_DHCP_FAILED: DHCP client failed
539 * @NM_DEVICE_STATE_REASON_SHARED_START_FAILED: Shared connection service failed to start
540 * @NM_DEVICE_STATE_REASON_SHARED_FAILED: Shared connection service failed
541 * @NM_DEVICE_STATE_REASON_AUTOIP_START_FAILED: AutoIP service failed to start
542 * @NM_DEVICE_STATE_REASON_AUTOIP_ERROR: AutoIP service error
543 * @NM_DEVICE_STATE_REASON_AUTOIP_FAILED: AutoIP service failed
544 * @NM_DEVICE_STATE_REASON_MODEM_BUSY: The line is busy
545 * @NM_DEVICE_STATE_REASON_MODEM_NO_DIAL_TONE: No dial tone
546 * @NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER: No carrier could be established
547 * @NM_DEVICE_STATE_REASON_MODEM_DIAL_TIMEOUT: The dialing request timed out
548 * @NM_DEVICE_STATE_REASON_MODEM_DIAL_FAILED: The dialing attempt failed
549 * @NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED: Modem initialization failed
550 * @NM_DEVICE_STATE_REASON_GSM_APN_FAILED: Failed to select the specified APN
551 * @NM_DEVICE_STATE_REASON_GSM_REGISTRATION_NOT_SEARCHING: Not searching for networks
552 * @NM_DEVICE_STATE_REASON_GSM_REGISTRATION_DENIED: Network registration denied
553 * @NM_DEVICE_STATE_REASON_GSM_REGISTRATION_TIMEOUT: Network registration timed out
554 * @NM_DEVICE_STATE_REASON_GSM_REGISTRATION_FAILED: Failed to register with the requested network
555 * @NM_DEVICE_STATE_REASON_GSM_PIN_CHECK_FAILED: PIN check failed
556 * @NM_DEVICE_STATE_REASON_FIRMWARE_MISSING: Necessary firmware for the device may be missing
557 * @NM_DEVICE_STATE_REASON_REMOVED: The device was removed
558 * @NM_DEVICE_STATE_REASON_SLEEPING: NetworkManager went to sleep
559 * @NM_DEVICE_STATE_REASON_CONNECTION_REMOVED: The device's active connection disappeared
560 * @NM_DEVICE_STATE_REASON_USER_REQUESTED: Device disconnected by user or client
561 * @NM_DEVICE_STATE_REASON_CARRIER: Carrier/link changed
562 * @NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED: The device's existing connection was assumed
563 * @NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE: The supplicant is now available
564 * @NM_DEVICE_STATE_REASON_MODEM_NOT_FOUND: The modem could not be found
565 * @NM_DEVICE_STATE_REASON_BT_FAILED: The Bluetooth connection failed or timed out
566 * @NM_DEVICE_STATE_REASON_GSM_SIM_NOT_INSERTED: GSM Modem's SIM Card not inserted
567 * @NM_DEVICE_STATE_REASON_GSM_SIM_PIN_REQUIRED: GSM Modem's SIM Pin required
568 * @NM_DEVICE_STATE_REASON_GSM_SIM_PUK_REQUIRED: GSM Modem's SIM Puk required
569 * @NM_DEVICE_STATE_REASON_GSM_SIM_WRONG: GSM Modem's SIM wrong
570 * @NM_DEVICE_STATE_REASON_INFINIBAND_MODE: InfiniBand device does not support connected mode
571 * @NM_DEVICE_STATE_REASON_DEPENDENCY_FAILED: A dependency of the connection failed
572 * @NM_DEVICE_STATE_REASON_BR2684_FAILED: Problem with the RFC 2684 Ethernet over ADSL bridge
573 * @NM_DEVICE_STATE_REASON_MODEM_MANAGER_UNAVAILABLE: ModemManager not running
574 * @NM_DEVICE_STATE_REASON_SSID_NOT_FOUND: The Wi-Fi network could not be found
575 * @NM_DEVICE_STATE_REASON_SECONDARY_CONNECTION_FAILED: A secondary connection of the base connection failed
576 * @NM_DEVICE_STATE_REASON_DCB_FCOE_FAILED: DCB or FCoE setup failed
577 * @NM_DEVICE_STATE_REASON_TEAMD_CONTROL_FAILED: teamd control failed
578 * @NM_DEVICE_STATE_REASON_MODEM_FAILED: Modem failed or no longer available
579 * @NM_DEVICE_STATE_REASON_MODEM_AVAILABLE: Modem now ready and available
580 * @NM_DEVICE_STATE_REASON_SIM_PIN_INCORRECT: SIM PIN was incorrect
581 * @NM_DEVICE_STATE_REASON_NEW_ACTIVATION: New connection activation was enqueued
582 * @NM_DEVICE_STATE_REASON_PARENT_CHANGED: the device's parent changed
583 * @NM_DEVICE_STATE_REASON_PARENT_MANAGED_CHANGED: the device parent's management changed
584 * @NM_DEVICE_STATE_REASON_OVSDB_FAILED: problem communicating with Open vSwitch database
585 * @NM_DEVICE_STATE_REASON_IP_ADDRESS_DUPLICATE: a duplicate IP address was detected
586 * @NM_DEVICE_STATE_REASON_IP_METHOD_UNSUPPORTED: The selected IP method is not supported
587 * @NM_DEVICE_STATE_REASON_SRIOV_CONFIGURATION_FAILED: configuration of SR-IOV parameters failed
588 * @NM_DEVICE_STATE_REASON_PEER_NOT_FOUND: The Wi-Fi P2P peer could not be found
589 *
590 * Device state change reason codes
591 */
592typedef enum {
593 NM_DEVICE_STATE_REASON_NONE = 0,
594 NM_DEVICE_STATE_REASON_UNKNOWN = 1,
595 NM_DEVICE_STATE_REASON_NOW_MANAGED = 2,
596 NM_DEVICE_STATE_REASON_NOW_UNMANAGED = 3,
597 NM_DEVICE_STATE_REASON_CONFIG_FAILED = 4,
598 NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE = 5,
599 NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED = 6,
600 NM_DEVICE_STATE_REASON_NO_SECRETS = 7,
601 NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT = 8,
602 NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED = 9,
603 NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED = 10,
604 NM_DEVICE_STATE_REASON_SUPPLICANT_TIMEOUT = 11,
605 NM_DEVICE_STATE_REASON_PPP_START_FAILED = 12,
606 NM_DEVICE_STATE_REASON_PPP_DISCONNECT = 13,
607 NM_DEVICE_STATE_REASON_PPP_FAILED = 14,
608 NM_DEVICE_STATE_REASON_DHCP_START_FAILED = 15,
609 NM_DEVICE_STATE_REASON_DHCP_ERROR = 16,
610 NM_DEVICE_STATE_REASON_DHCP_FAILED = 17,
611 NM_DEVICE_STATE_REASON_SHARED_START_FAILED = 18,
612 NM_DEVICE_STATE_REASON_SHARED_FAILED = 19,
613 NM_DEVICE_STATE_REASON_AUTOIP_START_FAILED = 20,
614 NM_DEVICE_STATE_REASON_AUTOIP_ERROR = 21,
615 NM_DEVICE_STATE_REASON_AUTOIP_FAILED = 22,
616 NM_DEVICE_STATE_REASON_MODEM_BUSY = 23,
617 NM_DEVICE_STATE_REASON_MODEM_NO_DIAL_TONE = 24,
618 NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER = 25,
619 NM_DEVICE_STATE_REASON_MODEM_DIAL_TIMEOUT = 26,
620 NM_DEVICE_STATE_REASON_MODEM_DIAL_FAILED = 27,
621 NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED = 28,
622 NM_DEVICE_STATE_REASON_GSM_APN_FAILED = 29,
623 NM_DEVICE_STATE_REASON_GSM_REGISTRATION_NOT_SEARCHING = 30,
624 NM_DEVICE_STATE_REASON_GSM_REGISTRATION_DENIED = 31,
625 NM_DEVICE_STATE_REASON_GSM_REGISTRATION_TIMEOUT = 32,
626 NM_DEVICE_STATE_REASON_GSM_REGISTRATION_FAILED = 33,
627 NM_DEVICE_STATE_REASON_GSM_PIN_CHECK_FAILED = 34,
628 NM_DEVICE_STATE_REASON_FIRMWARE_MISSING = 35,
629 NM_DEVICE_STATE_REASON_REMOVED = 36,
630 NM_DEVICE_STATE_REASON_SLEEPING = 37,
631 NM_DEVICE_STATE_REASON_CONNECTION_REMOVED = 38,
632 NM_DEVICE_STATE_REASON_USER_REQUESTED = 39,
633 NM_DEVICE_STATE_REASON_CARRIER = 40,
634 NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED = 41,
635 NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE = 42,
636 NM_DEVICE_STATE_REASON_MODEM_NOT_FOUND = 43,
637 NM_DEVICE_STATE_REASON_BT_FAILED = 44,
638 NM_DEVICE_STATE_REASON_GSM_SIM_NOT_INSERTED = 45,
639 NM_DEVICE_STATE_REASON_GSM_SIM_PIN_REQUIRED = 46,
640 NM_DEVICE_STATE_REASON_GSM_SIM_PUK_REQUIRED = 47,
641 NM_DEVICE_STATE_REASON_GSM_SIM_WRONG = 48,
642 NM_DEVICE_STATE_REASON_INFINIBAND_MODE = 49,
643 NM_DEVICE_STATE_REASON_DEPENDENCY_FAILED = 50,
644 NM_DEVICE_STATE_REASON_BR2684_FAILED = 51,
645 NM_DEVICE_STATE_REASON_MODEM_MANAGER_UNAVAILABLE = 52,
646 NM_DEVICE_STATE_REASON_SSID_NOT_FOUND = 53,
647 NM_DEVICE_STATE_REASON_SECONDARY_CONNECTION_FAILED = 54,
648 NM_DEVICE_STATE_REASON_DCB_FCOE_FAILED = 55,
649 NM_DEVICE_STATE_REASON_TEAMD_CONTROL_FAILED = 56,
650 NM_DEVICE_STATE_REASON_MODEM_FAILED = 57,
651 NM_DEVICE_STATE_REASON_MODEM_AVAILABLE = 58,
652 NM_DEVICE_STATE_REASON_SIM_PIN_INCORRECT = 59,
653 NM_DEVICE_STATE_REASON_NEW_ACTIVATION = 60,
654 NM_DEVICE_STATE_REASON_PARENT_CHANGED = 61,
655 NM_DEVICE_STATE_REASON_PARENT_MANAGED_CHANGED = 62,
656 NM_DEVICE_STATE_REASON_OVSDB_FAILED = 63,
657 NM_DEVICE_STATE_REASON_IP_ADDRESS_DUPLICATE = 64,
658 NM_DEVICE_STATE_REASON_IP_METHOD_UNSUPPORTED = 65,
659 NM_DEVICE_STATE_REASON_SRIOV_CONFIGURATION_FAILED = 66,
660 NM_DEVICE_STATE_REASON_PEER_NOT_FOUND = 67,
661} NMDeviceStateReason;
662
663/**
664 * NMMetered:
665 * @NM_METERED_UNKNOWN: The metered status is unknown
666 * @NM_METERED_YES: Metered, the value was explicitly configured
667 * @NM_METERED_NO: Not metered, the value was explicitly configured
668 * @NM_METERED_GUESS_YES: Metered, the value was guessed
669 * @NM_METERED_GUESS_NO: Not metered, the value was guessed
670 *
671 * The NMMetered enum has two different purposes: one is to configure
672 * "connection.metered" setting of a connection profile in #NMSettingConnection, and
673 * the other is to express the actual metered state of the #NMDevice at a given moment.
674 *
675 * For the connection profile only #NM_METERED_UNKNOWN, #NM_METERED_NO
676 * and #NM_METERED_YES are allowed.
677 *
678 * The device's metered state at runtime is determined by the profile
679 * which is currently active. If the profile explicitly specifies #NM_METERED_NO
680 * or #NM_METERED_YES, then the device's metered state is as such.
681 * If the connection profile leaves it undecided at #NM_METERED_UNKNOWN (the default),
682 * then NetworkManager tries to guess the metered state, for example based on the
683 * device type or on DHCP options (like Android devices exposing a "ANDROID_METERED"
684 * DHCP vendor option). This then leads to either #NM_METERED_GUESS_NO or #NM_METERED_GUESS_YES.
685 *
686 * Most applications probably should treat the runtime state #NM_METERED_GUESS_YES
687 * like #NM_METERED_YES, and all other states as not metered.
688 *
689 * Note that the per-device metered states are then combined to a global metered
690 * state. This is basically the metered state of the device with the best default
691 * route. However, that generalization of a global metered state may not be correct
692 * if the default routes for IPv4 and IPv6 are on different devices, or if policy
693 * routing is configured. In general, the global metered state tries to express whether
694 * the traffic is likely metered, but since that depends on the traffic itself,
695 * there is not one answer in all cases. Hence, an application may want to consider
696 * the per-device's metered states.
697 *
698 * Since: 1.2
699 **/
700NM_AVAILABLE_IN_1_2
701typedef enum {
702 NM_METERED_UNKNOWN = 0,
703 NM_METERED_YES = 1,
704 NM_METERED_NO = 2,
705 NM_METERED_GUESS_YES = 3,
706 NM_METERED_GUESS_NO = 4,
707} NMMetered;
708
709/**
710 * NMConnectionMultiConnect:
711 * @NM_CONNECTION_MULTI_CONNECT_DEFAULT: indicates that the per-connection
712 * setting is unspecified. In this case, it will fallback to the default
713 * value, which is %NM_CONNECTION_MULTI_CONNECT_SINGLE.
714 * @NM_CONNECTION_MULTI_CONNECT_SINGLE: the connection profile can only
715 * be active once at each moment. Activating a profile that is already active,
716 * will first deactivate it.
717 * @NM_CONNECTION_MULTI_CONNECT_MANUAL_MULTIPLE: the profile can
718 * be manually activated multiple times on different devices. However,
719 * regarding autoconnect, the profile will autoconnect only if it is
720 * currently not connected otherwise.
721 * @NM_CONNECTION_MULTI_CONNECT_MULTIPLE: the profile can autoactivate
722 * and be manually activated multiple times together.
723 *
724 * Since: 1.14
725 */
726typedef enum {
727 NM_CONNECTION_MULTI_CONNECT_DEFAULT = 0,
728 NM_CONNECTION_MULTI_CONNECT_SINGLE = 1,
729 NM_CONNECTION_MULTI_CONNECT_MANUAL_MULTIPLE = 2,
730 NM_CONNECTION_MULTI_CONNECT_MULTIPLE = 3,
731} NMConnectionMultiConnect;
732
733/**
734 * NMActiveConnectionState:
735 * @NM_ACTIVE_CONNECTION_STATE_UNKNOWN: the state of the connection is unknown
736 * @NM_ACTIVE_CONNECTION_STATE_ACTIVATING: a network connection is being prepared
737 * @NM_ACTIVE_CONNECTION_STATE_ACTIVATED: there is a connection to the network
738 * @NM_ACTIVE_CONNECTION_STATE_DEACTIVATING: the network connection is being
739 * torn down and cleaned up
740 * @NM_ACTIVE_CONNECTION_STATE_DEACTIVATED: the network connection is disconnected
741 * and will be removed
742 *
743 * #NMActiveConnectionState values indicate the state of a connection to a
744 * specific network while it is starting, connected, or disconnecting from that
745 * network.
746 **/
747typedef enum {
748 NM_ACTIVE_CONNECTION_STATE_UNKNOWN = 0,
749 NM_ACTIVE_CONNECTION_STATE_ACTIVATING = 1,
750 NM_ACTIVE_CONNECTION_STATE_ACTIVATED = 2,
751 NM_ACTIVE_CONNECTION_STATE_DEACTIVATING = 3,
752 NM_ACTIVE_CONNECTION_STATE_DEACTIVATED = 4,
753} NMActiveConnectionState;
754
755/**
756 * NMActiveConnectionStateReason:
757 * @NM_ACTIVE_CONNECTION_STATE_REASON_UNKNOWN: The reason for the active connection
758 * state change is unknown.
759 * @NM_ACTIVE_CONNECTION_STATE_REASON_NONE: No reason was given for the active
760 * connection state change.
761 * @NM_ACTIVE_CONNECTION_STATE_REASON_USER_DISCONNECTED: The active connection changed
762 * state because the user disconnected it.
763 * @NM_ACTIVE_CONNECTION_STATE_REASON_DEVICE_DISCONNECTED: The active connection
764 * changed state because the device it was using was disconnected.
765 * @NM_ACTIVE_CONNECTION_STATE_REASON_SERVICE_STOPPED: The service providing the
766 * VPN connection was stopped.
767 * @NM_ACTIVE_CONNECTION_STATE_REASON_IP_CONFIG_INVALID: The IP config of the active
768 * connection was invalid.
769 * @NM_ACTIVE_CONNECTION_STATE_REASON_CONNECT_TIMEOUT: The connection attempt to
770 * the VPN service timed out.
771 * @NM_ACTIVE_CONNECTION_STATE_REASON_SERVICE_START_TIMEOUT: A timeout occurred
772 * while starting the service providing the VPN connection.
773 * @NM_ACTIVE_CONNECTION_STATE_REASON_SERVICE_START_FAILED: Starting the service
774 * providing the VPN connection failed.
775 * @NM_ACTIVE_CONNECTION_STATE_REASON_NO_SECRETS: Necessary secrets for the
776 * connection were not provided.
777 * @NM_ACTIVE_CONNECTION_STATE_REASON_LOGIN_FAILED: Authentication to the
778 * server failed.
779 * @NM_ACTIVE_CONNECTION_STATE_REASON_CONNECTION_REMOVED: The connection was
780 * deleted from settings.
781 * @NM_ACTIVE_CONNECTION_STATE_REASON_DEPENDENCY_FAILED: Master connection of this
782 * connection failed to activate.
783 * @NM_ACTIVE_CONNECTION_STATE_REASON_DEVICE_REALIZE_FAILED: Could not create the
784 * software device link.
785 * @NM_ACTIVE_CONNECTION_STATE_REASON_DEVICE_REMOVED: The device this connection
786 * depended on disappeared.
787 *
788 * Active connection state reasons.
789 *
790 * Since: 1.8
791 */
792NM_AVAILABLE_IN_1_8
793typedef enum {
794 NM_ACTIVE_CONNECTION_STATE_REASON_UNKNOWN = 0,
795 NM_ACTIVE_CONNECTION_STATE_REASON_NONE = 1,
796 NM_ACTIVE_CONNECTION_STATE_REASON_USER_DISCONNECTED = 2,
797 NM_ACTIVE_CONNECTION_STATE_REASON_DEVICE_DISCONNECTED = 3,
798 NM_ACTIVE_CONNECTION_STATE_REASON_SERVICE_STOPPED = 4,
799 NM_ACTIVE_CONNECTION_STATE_REASON_IP_CONFIG_INVALID = 5,
800 NM_ACTIVE_CONNECTION_STATE_REASON_CONNECT_TIMEOUT = 6,
801 NM_ACTIVE_CONNECTION_STATE_REASON_SERVICE_START_TIMEOUT = 7,
802 NM_ACTIVE_CONNECTION_STATE_REASON_SERVICE_START_FAILED = 8,
803 NM_ACTIVE_CONNECTION_STATE_REASON_NO_SECRETS = 9,
804 NM_ACTIVE_CONNECTION_STATE_REASON_LOGIN_FAILED = 10,
805 NM_ACTIVE_CONNECTION_STATE_REASON_CONNECTION_REMOVED = 11,
806 NM_ACTIVE_CONNECTION_STATE_REASON_DEPENDENCY_FAILED = 12,
807 NM_ACTIVE_CONNECTION_STATE_REASON_DEVICE_REALIZE_FAILED = 13,
808 NM_ACTIVE_CONNECTION_STATE_REASON_DEVICE_REMOVED = 14,
809} NMActiveConnectionStateReason;
810
811/**
812 * NMSecretAgentGetSecretsFlags:
813 * @NM_SECRET_AGENT_GET_SECRETS_FLAG_NONE: no special behavior; by default no
814 * user interaction is allowed and requests for secrets are fulfilled from
815 * persistent storage, or if no secrets are available an error is returned.
816 * @NM_SECRET_AGENT_GET_SECRETS_FLAG_ALLOW_INTERACTION: allows the request to
817 * interact with the user, possibly prompting via UI for secrets if any are
818 * required, or if none are found in persistent storage.
819 * @NM_SECRET_AGENT_GET_SECRETS_FLAG_REQUEST_NEW: explicitly prompt for new
820 * secrets from the user. This flag signals that NetworkManager thinks any
821 * existing secrets are invalid or wrong. This flag implies that interaction
822 * is allowed.
823 * @NM_SECRET_AGENT_GET_SECRETS_FLAG_USER_REQUESTED: set if the request was
824 * initiated by user-requested action via the D-Bus interface, as opposed to
825 * automatically initiated by NetworkManager in response to (for example) scan
826 * results or carrier changes.
827 * @NM_SECRET_AGENT_GET_SECRETS_FLAG_WPS_PBC_ACTIVE: indicates that WPS enrollment
828 * is active with PBC method. The agent may suggest that the user pushes a button
829 * on the router instead of supplying a PSK.
830 * @NM_SECRET_AGENT_GET_SECRETS_FLAG_ONLY_SYSTEM: Internal flag, not part of
831 * the D-Bus API.
832 * @NM_SECRET_AGENT_GET_SECRETS_FLAG_NO_ERRORS: Internal flag, not part of
833 * the D-Bus API.
834 *
835 * #NMSecretAgentGetSecretsFlags values modify the behavior of a GetSecrets request.
836 */
837typedef enum { /*< flags >*/
838 NM_SECRET_AGENT_GET_SECRETS_FLAG_NONE = 0x0,
839 NM_SECRET_AGENT_GET_SECRETS_FLAG_ALLOW_INTERACTION = 0x1,
840 NM_SECRET_AGENT_GET_SECRETS_FLAG_REQUEST_NEW = 0x2,
841 NM_SECRET_AGENT_GET_SECRETS_FLAG_USER_REQUESTED = 0x4,
842 NM_SECRET_AGENT_GET_SECRETS_FLAG_WPS_PBC_ACTIVE = 0x8,
843
844 /* Internal to NM; not part of the D-Bus API */
845 NM_SECRET_AGENT_GET_SECRETS_FLAG_ONLY_SYSTEM = 0x80000000,
846 NM_SECRET_AGENT_GET_SECRETS_FLAG_NO_ERRORS = 0x40000000,
847} NMSecretAgentGetSecretsFlags;
848
849/**
850 * NMSecretAgentCapabilities:
851 * @NM_SECRET_AGENT_CAPABILITY_NONE: the agent supports no special capabilities
852 * @NM_SECRET_AGENT_CAPABILITY_VPN_HINTS: the agent supports passing hints to
853 * VPN plugin authentication dialogs.
854 * @NM_SECRET_AGENT_CAPABILITY_LAST: bounds checking value; should not be used.
855 *
856 * #NMSecretAgentCapabilities indicate various capabilities of the agent.
857 */
858typedef enum /*< flags >*/ {
859 NM_SECRET_AGENT_CAPABILITY_NONE = 0x0,
860 NM_SECRET_AGENT_CAPABILITY_VPN_HINTS = 0x1,
861
862 /* boundary value */
863 NM_SECRET_AGENT_CAPABILITY_LAST = NM_SECRET_AGENT_CAPABILITY_VPN_HINTS,
864} NMSecretAgentCapabilities;
865
866#ifndef NM_VERSION_H
867#undef NM_AVAILABLE_IN_1_2
868#undef NM_AVAILABLE_IN_1_8
869#endif
870
871#define NM_LLDP_ATTR_RAW "raw"
872#define NM_LLDP_ATTR_DESTINATION "destination"
873#define NM_LLDP_ATTR_CHASSIS_ID_TYPE "chassis-id-type"
874#define NM_LLDP_ATTR_CHASSIS_ID "chassis-id"
875#define NM_LLDP_ATTR_PORT_ID_TYPE "port-id-type"
876#define NM_LLDP_ATTR_PORT_ID "port-id"
877#define NM_LLDP_ATTR_PORT_DESCRIPTION "port-description"
878#define NM_LLDP_ATTR_SYSTEM_NAME "system-name"
879#define NM_LLDP_ATTR_SYSTEM_DESCRIPTION "system-description"
880#define NM_LLDP_ATTR_SYSTEM_CAPABILITIES "system-capabilities"
881#define NM_LLDP_ATTR_MANAGEMENT_ADDRESSES "management-addresses"
882
883#define NM_LLDP_ATTR_IEEE_802_1_PVID "ieee-802-1-pvid"
884#define NM_LLDP_ATTR_IEEE_802_1_VLANS "ieee-802-1-vlans"
885#define NM_LLDP_ATTR_IEEE_802_1_PPVIDS "ieee-802-1-ppvids"
886
887#define NM_LLDP_ATTR_IEEE_802_3_MAC_PHY_CONF "ieee-802-3-mac-phy-conf"
888#define NM_LLDP_ATTR_IEEE_802_3_POWER_VIA_MDI "ieee-802-3-power-via-mdi"
889#define NM_LLDP_ATTR_IEEE_802_3_MAX_FRAME_SIZE "ieee-802-3-max-frame-size"
890
891#define NM_LLDP_ATTR_MUD_URL "mud-url"
892
893/* These are deprecated in favor of NM_LLDP_ATTR_IEEE_802_1_VLANS,
894 * which can report multiple VLANs */
895#define NM_LLDP_ATTR_IEEE_802_1_VID "ieee-802-1-vid"
896#define NM_LLDP_ATTR_IEEE_802_1_VLAN_NAME "ieee-802-1-vlan-name"
897
898/* These are deprecated in favor of NM_LLDP_ATTR_IEEE_802_1_PPVIDS,
899 * which can report multiple PPVIDs */
900#define NM_LLDP_ATTR_IEEE_802_1_PPVID "ieee-802-1-ppvid"
901#define NM_LLDP_ATTR_IEEE_802_1_PPVID_FLAGS "ieee-802-1-ppvid-flags"
902
903#define NM_LLDP_DEST_NEAREST_BRIDGE "nearest-bridge"
904#define NM_LLDP_DEST_NEAREST_NON_TPMR_BRIDGE "nearest-non-tpmr-bridge"
905#define NM_LLDP_DEST_NEAREST_CUSTOMER_BRIDGE "nearest-customer-bridge"
906
907/**
908 * NMIPTunnelMode:
909 * @NM_IP_TUNNEL_MODE_UNKNOWN: Unknown/unset tunnel mode
910 * @NM_IP_TUNNEL_MODE_IPIP: IP in IP tunnel
911 * @NM_IP_TUNNEL_MODE_GRE: GRE tunnel
912 * @NM_IP_TUNNEL_MODE_SIT: SIT tunnel
913 * @NM_IP_TUNNEL_MODE_ISATAP: ISATAP tunnel
914 * @NM_IP_TUNNEL_MODE_VTI: VTI tunnel
915 * @NM_IP_TUNNEL_MODE_IP6IP6: IPv6 in IPv6 tunnel
916 * @NM_IP_TUNNEL_MODE_IPIP6: IPv4 in IPv6 tunnel
917 * @NM_IP_TUNNEL_MODE_IP6GRE: IPv6 GRE tunnel
918 * @NM_IP_TUNNEL_MODE_VTI6: IPv6 VTI tunnel
919 * @NM_IP_TUNNEL_MODE_GRETAP: GRETAP tunnel
920 * @NM_IP_TUNNEL_MODE_IP6GRETAP: IPv6 GRETAP tunnel
921 *
922 * The tunneling mode.
923 *
924 * Since: 1.2
925 */
926typedef enum {
927 NM_IP_TUNNEL_MODE_UNKNOWN = 0,
928 NM_IP_TUNNEL_MODE_IPIP = 1,
929 NM_IP_TUNNEL_MODE_GRE = 2,
930 NM_IP_TUNNEL_MODE_SIT = 3,
931 NM_IP_TUNNEL_MODE_ISATAP = 4,
932 NM_IP_TUNNEL_MODE_VTI = 5,
933 NM_IP_TUNNEL_MODE_IP6IP6 = 6,
934 NM_IP_TUNNEL_MODE_IPIP6 = 7,
935 NM_IP_TUNNEL_MODE_IP6GRE = 8,
936 NM_IP_TUNNEL_MODE_VTI6 = 9,
937 NM_IP_TUNNEL_MODE_GRETAP = 10,
938 NM_IP_TUNNEL_MODE_IP6GRETAP = 11,
939} NMIPTunnelMode;
940
941/**
942 * NMCheckpointCreateFlags:
943 * @NM_CHECKPOINT_CREATE_FLAG_NONE: no flags
944 * @NM_CHECKPOINT_CREATE_FLAG_DESTROY_ALL: when creating
945 * a new checkpoint, destroy all existing ones.
946 * @NM_CHECKPOINT_CREATE_FLAG_DELETE_NEW_CONNECTIONS: upon rollback,
947 * delete any new connection added after the checkpoint. Since: 1.6.
948 * @NM_CHECKPOINT_CREATE_FLAG_DISCONNECT_NEW_DEVICES: upon rollback,
949 * disconnect any new device appeared after the checkpoint. Since: 1.6.
950 * @NM_CHECKPOINT_CREATE_FLAG_ALLOW_OVERLAPPING: by default, creating
951 * a checkpoint fails if there are already existing checkoints that
952 * reference the same devices. With this flag, creation of such
953 * checkpoints is allowed, however, if an older checkpoint
954 * that references overlapping devices gets rolled back, it will
955 * automatically destroy this checkpoint during rollback. This
956 * allows to create several overlapping checkpoints in parallel,
957 * and rollback to them at will. With the special case that
958 * rolling back to an older checkpoint will invalidate all
959 * overlapping younger checkpoints. This opts-in that the
960 * checkpoint can be automatically destroyed by the rollback
961 * of an older checkpoint. Since: 1.12.
962 * @NM_CHECKPOINT_CREATE_FLAG_NO_PRESERVE_EXTERNAL_PORTS: during rollback,
963 * by default externally added ports attached to bridge devices are preserved.
964 * With this flag, the rollback detaches all external ports.
965 * This only has an effect for bridge ports. Before 1.38, 1.36.2, this was the default
966 * behavior. Since: 1.38, 1.36.2.
967 *
968 * The flags for CheckpointCreate call
969 *
970 * Since: 1.4 (gi flags generated since 1.12)
971 */
972typedef enum { /*< flags >*/
973 NM_CHECKPOINT_CREATE_FLAG_NONE = 0,
974 NM_CHECKPOINT_CREATE_FLAG_DESTROY_ALL = 0x01,
975 NM_CHECKPOINT_CREATE_FLAG_DELETE_NEW_CONNECTIONS = 0x02,
976 NM_CHECKPOINT_CREATE_FLAG_DISCONNECT_NEW_DEVICES = 0x04,
977 NM_CHECKPOINT_CREATE_FLAG_ALLOW_OVERLAPPING = 0x08,
978 NM_CHECKPOINT_CREATE_FLAG_NO_PRESERVE_EXTERNAL_PORTS = 0x10,
979} NMCheckpointCreateFlags;
980
981/**
982 * NMRollbackResult:
983 * @NM_ROLLBACK_RESULT_OK: the rollback succeeded.
984 * @NM_ROLLBACK_RESULT_ERR_NO_DEVICE: the device no longer exists.
985 * @NM_ROLLBACK_RESULT_ERR_DEVICE_UNMANAGED: the device is now unmanaged.
986 * @NM_ROLLBACK_RESULT_ERR_FAILED: other errors during rollback.
987 *
988 * The result of a checkpoint Rollback() operation for a specific device.
989 *
990 * Since: 1.4
991 **/
992typedef enum { /*< skip >*/
993 NM_ROLLBACK_RESULT_OK = 0,
994 NM_ROLLBACK_RESULT_ERR_NO_DEVICE = 1,
995 NM_ROLLBACK_RESULT_ERR_DEVICE_UNMANAGED = 2,
996 NM_ROLLBACK_RESULT_ERR_FAILED = 3,
997} NMRollbackResult;
998
999/**
1000 * NMSettingsConnectionFlags:
1001 * @NM_SETTINGS_CONNECTION_FLAG_NONE: an alias for numeric zero, no flags set.
1002 * @NM_SETTINGS_CONNECTION_FLAG_UNSAVED: the connection is not saved to disk.
1003 * That either means, that the connection is in-memory only and currently
1004 * is not backed by a file. Or, that the connection is backed by a file,
1005 * but has modifications in-memory that were not persisted to disk.
1006 * @NM_SETTINGS_CONNECTION_FLAG_NM_GENERATED: A connection is "nm-generated" if
1007 * it was generated by NetworkManger. If the connection gets modified or saved
1008 * by the user, the flag gets cleared. A nm-generated is also unsaved
1009 * and has no backing file as it is in-memory only.
1010 * @NM_SETTINGS_CONNECTION_FLAG_VOLATILE: The connection will be deleted
1011 * when it disconnects. That is for in-memory connections (unsaved), which are
1012 * currently active but deleted on disconnect. Volatile connections are
1013 * always unsaved, but they are also no backing file on disk and are entirely
1014 * in-memory only.
1015 * @NM_SETTINGS_CONNECTION_FLAG_EXTERNAL: the profile was generated to represent
1016 * an external configuration of a networking device. Since: 1.26.
1017 *
1018 * Flags describing the current activation state.
1019 *
1020 * Since: 1.12
1021 **/
1022typedef enum { /*< flags >*/
1023 NM_SETTINGS_CONNECTION_FLAG_NONE = 0,
1024 NM_SETTINGS_CONNECTION_FLAG_UNSAVED = 0x01,
1025 NM_SETTINGS_CONNECTION_FLAG_NM_GENERATED = 0x02,
1026 NM_SETTINGS_CONNECTION_FLAG_VOLATILE = 0x04,
1027 NM_SETTINGS_CONNECTION_FLAG_EXTERNAL = 0x08,
1028} NMSettingsConnectionFlags;
1029
1030/**
1031 * NMActivationStateFlags:
1032 * @NM_ACTIVATION_STATE_FLAG_NONE: an alias for numeric zero, no flags set.
1033 * @NM_ACTIVATION_STATE_FLAG_IS_MASTER: the device is a master.
1034 * @NM_ACTIVATION_STATE_FLAG_IS_SLAVE: the device is a slave.
1035 * @NM_ACTIVATION_STATE_FLAG_LAYER2_READY: layer2 is activated and ready.
1036 * @NM_ACTIVATION_STATE_FLAG_IP4_READY: IPv4 setting is completed.
1037 * @NM_ACTIVATION_STATE_FLAG_IP6_READY: IPv6 setting is completed.
1038 * @NM_ACTIVATION_STATE_FLAG_MASTER_HAS_SLAVES: The master has any slave devices attached.
1039 * This only makes sense if the device is a master.
1040 * @NM_ACTIVATION_STATE_FLAG_LIFETIME_BOUND_TO_PROFILE_VISIBILITY: the lifetime
1041 * of the activation is bound to the visibility of the connection profile,
1042 * which in turn depends on "connection.permissions" and whether a session
1043 * for the user exists. Since: 1.16.
1044 * @NM_ACTIVATION_STATE_FLAG_EXTERNAL: the active connection was generated to
1045 * represent an external configuration of a networking device. Since: 1.26.
1046 *
1047 * Flags describing the current activation state.
1048 *
1049 * Since: 1.10
1050 **/
1051typedef enum { /*< flags >*/
1052 NM_ACTIVATION_STATE_FLAG_NONE = 0,
1053
1054 NM_ACTIVATION_STATE_FLAG_IS_MASTER = 0x1,
1055 NM_ACTIVATION_STATE_FLAG_IS_SLAVE = 0x2,
1056 NM_ACTIVATION_STATE_FLAG_LAYER2_READY = 0x4,
1057 NM_ACTIVATION_STATE_FLAG_IP4_READY = 0x8,
1058 NM_ACTIVATION_STATE_FLAG_IP6_READY = 0x10,
1059 NM_ACTIVATION_STATE_FLAG_MASTER_HAS_SLAVES = 0x20,
1060 NM_ACTIVATION_STATE_FLAG_LIFETIME_BOUND_TO_PROFILE_VISIBILITY = 0x40,
1061 NM_ACTIVATION_STATE_FLAG_EXTERNAL = 0x80,
1062} NMActivationStateFlags;
1063
1064/**
1065 * NMSettingsAddConnection2Flags:
1066 * @NM_SETTINGS_ADD_CONNECTION2_FLAG_NONE: an alias for numeric zero, no flags set.
1067 * @NM_SETTINGS_ADD_CONNECTION2_FLAG_TO_DISK: to persist the connection to disk.
1068 * @NM_SETTINGS_ADD_CONNECTION2_FLAG_IN_MEMORY: to make the connection in-memory only.
1069 * @NM_SETTINGS_ADD_CONNECTION2_FLAG_BLOCK_AUTOCONNECT: usually, when the connection
1070 * has autoconnect enabled and gets added, it becomes eligible to autoconnect
1071 * right away. Setting this flag, disables autoconnect until the connection
1072 * is manually activated.
1073 *
1074 * Numeric flags for the "flags" argument of AddConnection2() D-Bus API.
1075 *
1076 * Since: 1.20
1077 */
1078typedef enum { /*< flags >*/
1079 NM_SETTINGS_ADD_CONNECTION2_FLAG_NONE = 0,
1080 NM_SETTINGS_ADD_CONNECTION2_FLAG_TO_DISK = 0x1,
1081 NM_SETTINGS_ADD_CONNECTION2_FLAG_IN_MEMORY = 0x2,
1082 NM_SETTINGS_ADD_CONNECTION2_FLAG_BLOCK_AUTOCONNECT = 0x20,
1083} NMSettingsAddConnection2Flags;
1084
1085/**
1086 * NMSettingsUpdate2Flags:
1087 * @NM_SETTINGS_UPDATE2_FLAG_NONE: an alias for numeric zero, no flags set.
1088 * @NM_SETTINGS_UPDATE2_FLAG_TO_DISK: to persist the connection to disk.
1089 * @NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY: makes the profile in-memory.
1090 * Note that such profiles are stored in keyfile format under /run.
1091 * If the file is already in-memory, the file in /run is updated in-place.
1092 * Otherwise, the previous storage for the profile is left unchanged
1093 * on disk, and the in-memory copy shadows it.
1094 * Note that the original filename of the previous persistent storage (if any)
1095 * is remembered. That means, when later persisting the profile again to disk,
1096 * the file on disk will be overwritten again.
1097 * Likewise, when finally deleting the profile, both the storage from /run
1098 * and persistent storage are deleted (or if the persistent storage does not
1099 * allow deletion, and nmmeta file is written to mark the UUID as deleted).
1100 * @NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY_DETACHED: this is almost the same
1101 * as %NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY, with one difference: when later deleting
1102 * the profile, the original profile will not be deleted. Instead a nmmeta
1103 * file is written to /run to indicate that the profile is gone.
1104 * Note that if such a nmmeta tombstone file exists and hides a file in persistent
1105 * storage, then when re-adding the profile with the same UUID, then the original
1106 * storage is taken over again.
1107 * @NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY_ONLY: this is like %NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY,
1108 * but if the connection has a corresponding file on persistent storage, the file
1109 * will be deleted right away. If the profile is later again persisted to disk,
1110 * a new, unused filename will be chosen.
1111 * @NM_SETTINGS_UPDATE2_FLAG_VOLATILE: This can be specified with either
1112 * %NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY, %NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY_DETACHED
1113 * or %NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY_ONLY.
1114 * After making the connection in-memory only, the connection is marked
1115 * as volatile. That means, if the connection is currently not active
1116 * it will be deleted right away. Otherwise, it is marked to for deletion
1117 * once the connection deactivates. A volatile connection cannot autoactivate
1118 * again (because it's about to be deleted), but a manual activation will
1119 * clear the volatile flag.
1120 * @NM_SETTINGS_UPDATE2_FLAG_BLOCK_AUTOCONNECT: usually, when the connection
1121 * has autoconnect enabled and is modified, it becomes eligible to autoconnect
1122 * right away. Setting this flag, disables autoconnect until the connection
1123 * is manually activated.
1124 * @NM_SETTINGS_UPDATE2_FLAG_NO_REAPPLY: when a profile gets modified that is
1125 * currently active, then these changes don't take effect for the active
1126 * device unless the profile gets reactivated or the configuration reapplied.
1127 * There are two exceptions: by default "connection.zone" and "connection.metered"
1128 * properties take effect immediately. Specify this flag to prevent these
1129 * properties to take effect, so that the change is restricted to modify
1130 * the profile. Since: 1.20.
1131 *
1132 * Since: 1.12
1133 */
1134typedef enum { /*< flags >*/
1135 NM_SETTINGS_UPDATE2_FLAG_NONE = 0,
1136 NM_SETTINGS_UPDATE2_FLAG_TO_DISK = 0x1,
1137 NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY = 0x2,
1138 NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY_DETACHED = 0x4,
1139 NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY_ONLY = 0x8,
1140 NM_SETTINGS_UPDATE2_FLAG_VOLATILE = 0x10,
1141 NM_SETTINGS_UPDATE2_FLAG_BLOCK_AUTOCONNECT = 0x20,
1142 NM_SETTINGS_UPDATE2_FLAG_NO_REAPPLY = 0x40,
1143} NMSettingsUpdate2Flags;
1144
1145/**
1146 * NMTernary:
1147 * @NM_TERNARY_DEFAULT: use the globally-configured default value.
1148 * @NM_TERNARY_FALSE: the option is disabled.
1149 * @NM_TERNARY_TRUE: the option is enabled.
1150 *
1151 * An boolean value that can be overridden by a default.
1152 *
1153 * Since: 1.14
1154 **/
1155typedef enum {
1156 NM_TERNARY_DEFAULT = -1,
1157 NM_TERNARY_FALSE = 0,
1158 NM_TERNARY_TRUE = 1,
1159} NMTernary;
1160
1161/**
1162 * NMManagerReloadFlags:
1163 * @NM_MANAGER_RELOAD_FLAG_NONE: an alias for numeric zero, no flags set. This
1164 * reloads everything that is supported and is identical to a SIGHUP.
1165 * @NM_MANAGER_RELOAD_FLAG_CONF: reload the NetworkManager.conf configuration
1166 * from disk. Note that this does not include connections, which can be
1167 * reloaded via Setting's ReloadConnections().
1168 * @NM_MANAGER_RELOAD_FLAG_DNS_RC: update DNS configuration, which usually
1169 * involves writing /etc/resolv.conf anew.
1170 * @NM_MANAGER_RELOAD_FLAG_DNS_FULL: means to restart the DNS plugin. This
1171 * is for example useful when using dnsmasq plugin, which uses additional
1172 * configuration in /etc/NetworkManager/dnsmasq.d. If you edit those files,
1173 * you can restart the DNS plugin. This action shortly interrupts name
1174 * resolution.
1175 * @NM_MANAGER_RELOAD_FLAG_ALL: all flags.
1176 *
1177 * Flags for the manager Reload() call.
1178 *
1179 * Since: 1.22
1180 */
1181typedef enum { /*< flags >*/
1182 NM_MANAGER_RELOAD_FLAG_NONE = 0, /*< skip >*/
1183 NM_MANAGER_RELOAD_FLAG_CONF = 0x1,
1184 NM_MANAGER_RELOAD_FLAG_DNS_RC = 0x2,
1185 NM_MANAGER_RELOAD_FLAG_DNS_FULL = 0x4,
1186 NM_MANAGER_RELOAD_FLAG_ALL = 0x7, /*< skip >*/
1187} NMManagerReloadFlags;
1188
1189/**
1190 * NMDeviceInterfaceFlags:
1191 * @NM_DEVICE_INTERFACE_FLAG_NONE: an alias for numeric zero, no flags set.
1192 * @NM_DEVICE_INTERFACE_FLAG_UP: the interface is enabled from the
1193 * administrative point of view. Corresponds to kernel IFF_UP.
1194 * @NM_DEVICE_INTERFACE_FLAG_LOWER_UP: the physical link is up. Corresponds
1195 * to kernel IFF_LOWER_UP.
1196 * @NM_DEVICE_INTERFACE_FLAG_PROMISC: receive all packets. Corresponds to
1197 * kernel IFF_PROMISC. Since: 1.32.
1198 * @NM_DEVICE_INTERFACE_FLAG_CARRIER: the interface has carrier. In most
1199 * cases this is equal to the value of @NM_DEVICE_INTERFACE_FLAG_LOWER_UP.
1200 * However some devices have a non-standard carrier detection mechanism.
1201 * @NM_DEVICE_INTERFACE_FLAG_LLDP_CLIENT_ENABLED: the flag to indicate device
1202 * LLDP status. Since: 1.32.
1203 *
1204 * Flags for a network interface.
1205 *
1206 * Since: 1.22
1207 */
1208typedef enum { /*< flags >*/
1209 /* kernel flags */
1210 NM_DEVICE_INTERFACE_FLAG_NONE = 0, /*< skip >*/
1211 NM_DEVICE_INTERFACE_FLAG_UP = 0x1,
1212 NM_DEVICE_INTERFACE_FLAG_LOWER_UP = 0x2,
1213 NM_DEVICE_INTERFACE_FLAG_PROMISC = 0x4,
1214 /* NM-specific flags */
1215 NM_DEVICE_INTERFACE_FLAG_CARRIER = 0x10000,
1216 NM_DEVICE_INTERFACE_FLAG_LLDP_CLIENT_ENABLED = 0x20000,
1217} NMDeviceInterfaceFlags;
1218
1219/**
1220 * NMClientPermission:
1221 * @NM_CLIENT_PERMISSION_NONE: unknown or no permission
1222 * @NM_CLIENT_PERMISSION_ENABLE_DISABLE_NETWORK: controls whether networking
1223 * can be globally enabled or disabled
1224 * @NM_CLIENT_PERMISSION_ENABLE_DISABLE_WIFI: controls whether Wi-Fi can be
1225 * globally enabled or disabled
1226 * @NM_CLIENT_PERMISSION_ENABLE_DISABLE_WWAN: controls whether WWAN (3G) can be
1227 * globally enabled or disabled
1228 * @NM_CLIENT_PERMISSION_ENABLE_DISABLE_WIMAX: controls whether WiMAX can be
1229 * globally enabled or disabled
1230 * @NM_CLIENT_PERMISSION_SLEEP_WAKE: controls whether the client can ask
1231 * NetworkManager to sleep and wake
1232 * @NM_CLIENT_PERMISSION_NETWORK_CONTROL: controls whether networking connections
1233 * can be started, stopped, and changed
1234 * @NM_CLIENT_PERMISSION_WIFI_SHARE_PROTECTED: controls whether a password
1235 * protected Wi-Fi hotspot can be created
1236 * @NM_CLIENT_PERMISSION_WIFI_SHARE_OPEN: controls whether an open Wi-Fi hotspot
1237 * can be created
1238 * @NM_CLIENT_PERMISSION_SETTINGS_MODIFY_SYSTEM: controls whether connections
1239 * that are available to all users can be modified
1240 * @NM_CLIENT_PERMISSION_SETTINGS_MODIFY_OWN: controls whether connections
1241 * owned by the current user can be modified
1242 * @NM_CLIENT_PERMISSION_SETTINGS_MODIFY_HOSTNAME: controls whether the
1243 * persistent hostname can be changed
1244 * @NM_CLIENT_PERMISSION_SETTINGS_MODIFY_GLOBAL_DNS: modify persistent global
1245 * DNS configuration
1246 * @NM_CLIENT_PERMISSION_RELOAD: controls access to Reload.
1247 * @NM_CLIENT_PERMISSION_CHECKPOINT_ROLLBACK: permission to create checkpoints.
1248 * @NM_CLIENT_PERMISSION_ENABLE_DISABLE_STATISTICS: controls whether device
1249 * statistics can be globally enabled or disabled
1250 * @NM_CLIENT_PERMISSION_ENABLE_DISABLE_CONNECTIVITY_CHECK: controls whether
1251 * connectivity check can be enabled or disabled
1252 * @NM_CLIENT_PERMISSION_WIFI_SCAN: controls whether wifi scans can be performed
1253 * @NM_CLIENT_PERMISSION_LAST: a reserved boundary value
1254 *
1255 * #NMClientPermission values indicate various permissions that NetworkManager
1256 * clients can obtain to perform certain tasks on behalf of the current user.
1257 **/
1258typedef enum {
1259 NM_CLIENT_PERMISSION_NONE = 0,
1260 NM_CLIENT_PERMISSION_ENABLE_DISABLE_NETWORK = 1,
1261 NM_CLIENT_PERMISSION_ENABLE_DISABLE_WIFI = 2,
1262 NM_CLIENT_PERMISSION_ENABLE_DISABLE_WWAN = 3,
1263 NM_CLIENT_PERMISSION_ENABLE_DISABLE_WIMAX = 4,
1264 NM_CLIENT_PERMISSION_SLEEP_WAKE = 5,
1265 NM_CLIENT_PERMISSION_NETWORK_CONTROL = 6,
1266 NM_CLIENT_PERMISSION_WIFI_SHARE_PROTECTED = 7,
1267 NM_CLIENT_PERMISSION_WIFI_SHARE_OPEN = 8,
1268 NM_CLIENT_PERMISSION_SETTINGS_MODIFY_SYSTEM = 9,
1269 NM_CLIENT_PERMISSION_SETTINGS_MODIFY_OWN = 10,
1270 NM_CLIENT_PERMISSION_SETTINGS_MODIFY_HOSTNAME = 11,
1271 NM_CLIENT_PERMISSION_SETTINGS_MODIFY_GLOBAL_DNS = 12,
1272 NM_CLIENT_PERMISSION_RELOAD = 13,
1273 NM_CLIENT_PERMISSION_CHECKPOINT_ROLLBACK = 14,
1274 NM_CLIENT_PERMISSION_ENABLE_DISABLE_STATISTICS = 15,
1275 NM_CLIENT_PERMISSION_ENABLE_DISABLE_CONNECTIVITY_CHECK = 16,
1276 NM_CLIENT_PERMISSION_WIFI_SCAN = 17,
1277
1278 NM_CLIENT_PERMISSION_LAST = 17,
1279} NMClientPermission;
1280
1281/**
1282 * NMClientPermissionResult:
1283 * @NM_CLIENT_PERMISSION_RESULT_UNKNOWN: unknown or no authorization
1284 * @NM_CLIENT_PERMISSION_RESULT_YES: the permission is available
1285 * @NM_CLIENT_PERMISSION_RESULT_AUTH: authorization is necessary before the
1286 * permission is available
1287 * @NM_CLIENT_PERMISSION_RESULT_NO: permission to perform the operation is
1288 * denied by system policy
1289 *
1290 * #NMClientPermissionResult values indicate what authorizations and permissions
1291 * the user requires to obtain a given #NMClientPermission
1292 **/
1293typedef enum {
1294 NM_CLIENT_PERMISSION_RESULT_UNKNOWN = 0,
1295 NM_CLIENT_PERMISSION_RESULT_YES,
1296 NM_CLIENT_PERMISSION_RESULT_AUTH,
1297 NM_CLIENT_PERMISSION_RESULT_NO
1298} NMClientPermissionResult;
1299
1300#endif /* __NM_DBUS_INTERFACE_H__ */
1301

source code of include/libnm/nm-dbus-interface.h