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

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