device: renew dhcp leases on awake for software devices
[NetworkManager.git] / libnm-core / nm-dbus-interface.h
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /*
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2 of the License, or
6  * (at your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License along
14  * with this program; if not, write to the Free Software Foundation, Inc.,
15  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16  *
17  * Copyright 2004 - 2014 Red Hat, Inc.
18  */
19
20 /* Definitions related to NetworkManager's D-Bus interfaces.
21  *
22  * Note that although this header is installed as part of libnm, it is also
23  * used by some external code that does not link to libnm.
24  */
25
26 #ifndef __NM_DBUS_INTERFACE_H__
27 #define __NM_DBUS_INTERFACE_H__
28
29 /* This header must not include glib or libnm. */
30
31 #ifndef NM_VERSION_H
32 #define NM_AVAILABLE_IN_1_2
33 #endif
34
35 /*
36  * dbus services details
37  */
38 #define NM_DBUS_SERVICE                     "org.freedesktop.NetworkManager"
39
40 #define NM_DBUS_PATH                        "/org/freedesktop/NetworkManager"
41 #define NM_DBUS_INTERFACE                   "org.freedesktop.NetworkManager"
42 #define NM_DBUS_INTERFACE_DEVICE            NM_DBUS_INTERFACE ".Device"
43 #define NM_DBUS_INTERFACE_DEVICE_WIRED      NM_DBUS_INTERFACE_DEVICE ".Wired"
44 #define NM_DBUS_INTERFACE_DEVICE_ADSL       NM_DBUS_INTERFACE_DEVICE ".Adsl"
45 #define NM_DBUS_INTERFACE_DEVICE_WIRELESS   NM_DBUS_INTERFACE_DEVICE ".Wireless"
46 #define NM_DBUS_INTERFACE_DEVICE_BLUETOOTH  NM_DBUS_INTERFACE_DEVICE ".Bluetooth"
47 #define NM_DBUS_INTERFACE_DEVICE_OLPC_MESH  NM_DBUS_INTERFACE_DEVICE ".OlpcMesh"
48 #define NM_DBUS_PATH_ACCESS_POINT           NM_DBUS_PATH "/AccessPoint"
49 #define NM_DBUS_INTERFACE_ACCESS_POINT      NM_DBUS_INTERFACE ".AccessPoint"
50 #define NM_DBUS_INTERFACE_DEVICE_MODEM      NM_DBUS_INTERFACE_DEVICE ".Modem"
51 #define NM_DBUS_INTERFACE_DEVICE_WIMAX      NM_DBUS_INTERFACE_DEVICE ".WiMax"
52 #define NM_DBUS_INTERFACE_WIMAX_NSP         NM_DBUS_INTERFACE ".WiMax.Nsp"
53 #define NM_DBUS_PATH_WIMAX_NSP              NM_DBUS_PATH "/Nsp"
54 #define NM_DBUS_INTERFACE_ACTIVE_CONNECTION NM_DBUS_INTERFACE ".Connection.Active"
55 #define NM_DBUS_INTERFACE_IP4_CONFIG        NM_DBUS_INTERFACE ".IP4Config"
56 #define NM_DBUS_INTERFACE_DHCP4_CONFIG      NM_DBUS_INTERFACE ".DHCP4Config"
57 #define NM_DBUS_INTERFACE_IP6_CONFIG        NM_DBUS_INTERFACE ".IP6Config"
58 #define NM_DBUS_INTERFACE_DHCP6_CONFIG      NM_DBUS_INTERFACE ".DHCP6Config"
59 #define NM_DBUS_INTERFACE_DEVICE_INFINIBAND NM_DBUS_INTERFACE_DEVICE ".Infiniband"
60 #define NM_DBUS_INTERFACE_DEVICE_BOND       NM_DBUS_INTERFACE_DEVICE ".Bond"
61 #define NM_DBUS_INTERFACE_DEVICE_TEAM       NM_DBUS_INTERFACE_DEVICE ".Team"
62 #define NM_DBUS_INTERFACE_DEVICE_VLAN       NM_DBUS_INTERFACE_DEVICE ".Vlan"
63 #define NM_DBUS_INTERFACE_DEVICE_BRIDGE     NM_DBUS_INTERFACE_DEVICE ".Bridge"
64 #define NM_DBUS_INTERFACE_DEVICE_GENERIC    NM_DBUS_INTERFACE_DEVICE ".Generic"
65 #define NM_DBUS_INTERFACE_DEVICE_VETH       NM_DBUS_INTERFACE_DEVICE ".Veth"
66 #define NM_DBUS_INTERFACE_DEVICE_TUN        NM_DBUS_INTERFACE_DEVICE ".Tun"
67 #define NM_DBUS_INTERFACE_DEVICE_MACVLAN    NM_DBUS_INTERFACE_DEVICE ".Macvlan"
68 #define NM_DBUS_INTERFACE_DEVICE_VXLAN      NM_DBUS_INTERFACE_DEVICE ".Vxlan"
69 #define NM_DBUS_INTERFACE_DEVICE_GRE        NM_DBUS_INTERFACE_DEVICE ".Gre"
70 #define NM_DBUS_INTERFACE_DEVICE_IP_TUNNEL  NM_DBUS_INTERFACE_DEVICE ".IPTunnel"
71
72 #define NM_DBUS_INTERFACE_SETTINGS        "org.freedesktop.NetworkManager.Settings"
73 #define NM_DBUS_PATH_SETTINGS             "/org/freedesktop/NetworkManager/Settings"
74
75 #define NM_DBUS_INTERFACE_SETTINGS_CONNECTION "org.freedesktop.NetworkManager.Settings.Connection"
76 #define NM_DBUS_PATH_SETTINGS_CONNECTION  "/org/freedesktop/NetworkManager/Settings/Connection"
77 #define NM_DBUS_INTERFACE_SETTINGS_CONNECTION_SECRETS "org.freedesktop.NetworkManager.Settings.Connection.Secrets"
78
79 #define NM_DBUS_INTERFACE_AGENT_MANAGER   NM_DBUS_INTERFACE ".AgentManager"
80 #define NM_DBUS_PATH_AGENT_MANAGER        "/org/freedesktop/NetworkManager/AgentManager"
81
82 #define NM_DBUS_INTERFACE_SECRET_AGENT    NM_DBUS_INTERFACE ".SecretAgent"
83 #define NM_DBUS_PATH_SECRET_AGENT         "/org/freedesktop/NetworkManager/SecretAgent"
84
85 /**
86  * NMState:
87  * @NM_STATE_UNKNOWN: networking state is unknown
88  * @NM_STATE_ASLEEP: networking is not enabled
89  * @NM_STATE_DISCONNECTED: there is no active network connection
90  * @NM_STATE_DISCONNECTING: network connections are being cleaned up
91  * @NM_STATE_CONNECTING: a network connection is being started
92  * @NM_STATE_CONNECTED_LOCAL: there is only local IPv4 and/or IPv6 connectivity
93  * @NM_STATE_CONNECTED_SITE: there is only site-wide IPv4 and/or IPv6 connectivity
94  * @NM_STATE_CONNECTED_GLOBAL: there is global IPv4 and/or IPv6 Internet connectivity
95  *
96  * #NMState values indicate the current overall networking state.
97  *
98  * (Corresponds to the NM_STATE type in nm-manager.xml.)
99  **/
100 typedef enum {
101         NM_STATE_UNKNOWN          = 0,
102         NM_STATE_ASLEEP           = 10,
103         NM_STATE_DISCONNECTED     = 20,
104         NM_STATE_DISCONNECTING    = 30,
105         NM_STATE_CONNECTING       = 40,
106         NM_STATE_CONNECTED_LOCAL  = 50,
107         NM_STATE_CONNECTED_SITE   = 60,
108         NM_STATE_CONNECTED_GLOBAL = 70
109 } NMState;
110
111 /**
112  * NMConnectivityState:
113  * @NM_CONNECTIVITY_UNKNOWN: Network connectivity is unknown.
114  * @NM_CONNECTIVITY_NONE: The host is not connected to any network.
115  * @NM_CONNECTIVITY_PORTAL: The host is behind a captive portal and
116  *   cannot reach the full Internet.
117  * @NM_CONNECTIVITY_LIMITED: The host is connected to a network, but
118  *   does not appear to be able to reach the full Internet.
119  * @NM_CONNECTIVITY_FULL: The host is connected to a network, and
120  *   appears to be able to reach the full Internet.
121  *
122  * (Corresponds to the NM_CONNECTIVITY type in nm-manager.xml.)
123  */
124 typedef enum {
125         NM_CONNECTIVITY_UNKNOWN,
126         NM_CONNECTIVITY_NONE,
127         NM_CONNECTIVITY_PORTAL,
128         NM_CONNECTIVITY_LIMITED,
129         NM_CONNECTIVITY_FULL
130 } NMConnectivityState;
131
132 /**
133  * NMDeviceType:
134  * @NM_DEVICE_TYPE_UNKNOWN: unknown device
135  * @NM_DEVICE_TYPE_GENERIC: generic support for unrecognized device types
136  * @NM_DEVICE_TYPE_ETHERNET: a wired ethernet device
137  * @NM_DEVICE_TYPE_WIFI: an 802.11 WiFi device
138  * @NM_DEVICE_TYPE_UNUSED1: not used
139  * @NM_DEVICE_TYPE_UNUSED2: not used
140  * @NM_DEVICE_TYPE_BT: a Bluetooth device supporting PAN or DUN access protocols
141  * @NM_DEVICE_TYPE_OLPC_MESH: an OLPC XO mesh networking device
142  * @NM_DEVICE_TYPE_WIMAX: an 802.16e Mobile WiMAX broadband device
143  * @NM_DEVICE_TYPE_MODEM: a modem supporting analog telephone, CDMA/EVDO,
144  * GSM/UMTS, or LTE network access protocols
145  * @NM_DEVICE_TYPE_INFINIBAND: an IP-over-InfiniBand device
146  * @NM_DEVICE_TYPE_BOND: a bond master interface
147  * @NM_DEVICE_TYPE_VLAN: an 802.1Q VLAN interface
148  * @NM_DEVICE_TYPE_ADSL: ADSL modem
149  * @NM_DEVICE_TYPE_BRIDGE: a bridge master interface
150  * @NM_DEVICE_TYPE_TEAM: a team master interface
151  * @NM_DEVICE_TYPE_TUN: a TUN or TAP interface
152  * @NM_DEVICE_TYPE_IP_TUNNEL: a IP tunnel interface
153  * @NM_DEVICE_TYPE_MACVLAN: a MACVLAN interface
154  * @NM_DEVICE_TYPE_VXLAN: a VXLAN interface
155  * @NM_DEVICE_TYPE_VETH: a VETH interface
156  *
157  * #NMDeviceType values indicate the type of hardware represented by
158  * an #NMDevice.
159  *
160  * (Corresponds to the NM_DEVICE_TYPE type in nm-device.xml.)
161  **/
162 typedef enum {
163         NM_DEVICE_TYPE_UNKNOWN    = 0,
164         NM_DEVICE_TYPE_ETHERNET   = 1,
165         NM_DEVICE_TYPE_WIFI       = 2,
166         NM_DEVICE_TYPE_UNUSED1    = 3,
167         NM_DEVICE_TYPE_UNUSED2    = 4,
168         NM_DEVICE_TYPE_BT         = 5,  /* Bluetooth */
169         NM_DEVICE_TYPE_OLPC_MESH  = 6,
170         NM_DEVICE_TYPE_WIMAX      = 7,
171         NM_DEVICE_TYPE_MODEM      = 8,
172         NM_DEVICE_TYPE_INFINIBAND = 9,
173         NM_DEVICE_TYPE_BOND       = 10,
174         NM_DEVICE_TYPE_VLAN       = 11,
175         NM_DEVICE_TYPE_ADSL       = 12,
176         NM_DEVICE_TYPE_BRIDGE     = 13,
177         NM_DEVICE_TYPE_GENERIC    = 14,
178         NM_DEVICE_TYPE_TEAM       = 15,
179         NM_DEVICE_TYPE_TUN        = 16,
180         NM_DEVICE_TYPE_IP_TUNNEL  = 17,
181         NM_DEVICE_TYPE_MACVLAN    = 18,
182         NM_DEVICE_TYPE_VXLAN      = 19,
183         NM_DEVICE_TYPE_VETH       = 20,
184 } NMDeviceType;
185
186 /**
187  * NMDeviceCapabilities:
188  * @NM_DEVICE_CAP_NONE: device has no special capabilities
189  * @NM_DEVICE_CAP_NM_SUPPORTED: NetworkManager supports this device
190  * @NM_DEVICE_CAP_CARRIER_DETECT: this device can indicate carrier status
191  * @NM_DEVICE_CAP_IS_SOFTWARE: this device is a software device
192  *
193  * General device capability flags.
194  *
195  * (Corresponds to the NM_DEVICE_CAP type in nm-device-wifi.xml.)
196  **/
197 typedef enum { /*< flags >*/
198         NM_DEVICE_CAP_NONE           = 0x00000000,
199         NM_DEVICE_CAP_NM_SUPPORTED   = 0x00000001,
200         NM_DEVICE_CAP_CARRIER_DETECT = 0x00000002,
201         NM_DEVICE_CAP_IS_SOFTWARE    = 0x00000004,
202 } NMDeviceCapabilities;
203
204
205 /**
206  * NMDeviceWifiCapabilities:
207  * @NM_WIFI_DEVICE_CAP_NONE: device has no encryption/authentication capabilities
208  * @NM_WIFI_DEVICE_CAP_CIPHER_WEP40: device supports 40/64-bit WEP encryption
209  * @NM_WIFI_DEVICE_CAP_CIPHER_WEP104: device supports 104/128-bit WEP encryption
210  * @NM_WIFI_DEVICE_CAP_CIPHER_TKIP: device supports TKIP encryption
211  * @NM_WIFI_DEVICE_CAP_CIPHER_CCMP: device supports AES/CCMP encryption
212  * @NM_WIFI_DEVICE_CAP_WPA: device supports WPA1 authentication
213  * @NM_WIFI_DEVICE_CAP_RSN: device supports WPA2/RSN authentication
214  * @NM_WIFI_DEVICE_CAP_AP: device supports Access Point mode
215  * @NM_WIFI_DEVICE_CAP_ADHOC: device supports Ad-Hoc mode
216  * @NM_WIFI_DEVICE_CAP_FREQ_VALID: device reports frequency capabilities
217  * @NM_WIFI_DEVICE_CAP_FREQ_2GHZ: device supports 2.4GHz frequencies
218  * @NM_WIFI_DEVICE_CAP_FREQ_5GHZ: device supports 5GHz frequencies
219  *
220  * 802.11 specific device encryption and authentication capabilities.
221  *
222  * (Corresponds to the NM_802_11_DEVICE_CAP type in nm-device-wifi.xml.)
223  **/
224 typedef enum { /*< flags >*/
225         NM_WIFI_DEVICE_CAP_NONE          = 0x00000000,
226         NM_WIFI_DEVICE_CAP_CIPHER_WEP40  = 0x00000001,
227         NM_WIFI_DEVICE_CAP_CIPHER_WEP104 = 0x00000002,
228         NM_WIFI_DEVICE_CAP_CIPHER_TKIP   = 0x00000004,
229         NM_WIFI_DEVICE_CAP_CIPHER_CCMP   = 0x00000008,
230         NM_WIFI_DEVICE_CAP_WPA           = 0x00000010,
231         NM_WIFI_DEVICE_CAP_RSN           = 0x00000020,
232         NM_WIFI_DEVICE_CAP_AP            = 0x00000040,
233         NM_WIFI_DEVICE_CAP_ADHOC         = 0x00000080,
234         NM_WIFI_DEVICE_CAP_FREQ_VALID    = 0x00000100,
235         NM_WIFI_DEVICE_CAP_FREQ_2GHZ     = 0x00000200,
236         NM_WIFI_DEVICE_CAP_FREQ_5GHZ     = 0x00000400,
237 } NMDeviceWifiCapabilities;
238
239
240 /**
241  * NM80211ApFlags:
242  * @NM_802_11_AP_FLAGS_NONE: access point has no special capabilities
243  * @NM_802_11_AP_FLAGS_PRIVACY: access point requires authentication and
244  * encryption (usually means WEP)
245  *
246  * 802.11 access point flags.
247  *
248  * (Corresponds to the NM_802_11_AP_FLAGS type in nm-access-point.xml.)
249  **/
250 typedef enum { /*< underscore_name=nm_802_11_ap_flags, flags >*/
251         NM_802_11_AP_FLAGS_NONE    = 0x00000000,
252         NM_802_11_AP_FLAGS_PRIVACY = 0x00000001
253 } NM80211ApFlags;
254
255 /**
256  * NM80211ApSecurityFlags:
257  * @NM_802_11_AP_SEC_NONE: the access point has no special security requirements
258  * @NM_802_11_AP_SEC_PAIR_WEP40: 40/64-bit WEP is supported for
259  * pairwise/unicast encryption
260  * @NM_802_11_AP_SEC_PAIR_WEP104: 104/128-bit WEP is supported for
261  * pairwise/unicast encryption
262  * @NM_802_11_AP_SEC_PAIR_TKIP: TKIP is supported for pairwise/unicast encryption
263  * @NM_802_11_AP_SEC_PAIR_CCMP: AES/CCMP is supported for pairwise/unicast encryption
264  * @NM_802_11_AP_SEC_GROUP_WEP40: 40/64-bit WEP is supported for group/broadcast
265  * encryption
266  * @NM_802_11_AP_SEC_GROUP_WEP104: 104/128-bit WEP is supported for
267  * group/broadcast encryption
268  * @NM_802_11_AP_SEC_GROUP_TKIP: TKIP is supported for group/broadcast encryption
269  * @NM_802_11_AP_SEC_GROUP_CCMP: AES/CCMP is supported for group/broadcast
270  * encryption
271  * @NM_802_11_AP_SEC_KEY_MGMT_PSK: WPA/RSN Pre-Shared Key encryption is
272  * supported
273  * @NM_802_11_AP_SEC_KEY_MGMT_802_1X: 802.1x authentication and key management
274  * is supported
275  *
276  * 802.11 access point security and authentication flags.  These flags describe
277  * the current security requirements of an access point as determined from the
278  * access point's beacon.
279  *
280  * (Corresponds to the NM_802_11_AP_SEC type in nm-access-point.xml.)
281  **/
282 typedef enum { /*< underscore_name=nm_802_11_ap_security_flags, flags >*/
283         NM_802_11_AP_SEC_NONE            = 0x00000000,
284         NM_802_11_AP_SEC_PAIR_WEP40      = 0x00000001,
285         NM_802_11_AP_SEC_PAIR_WEP104     = 0x00000002,
286         NM_802_11_AP_SEC_PAIR_TKIP       = 0x00000004,
287         NM_802_11_AP_SEC_PAIR_CCMP       = 0x00000008,
288         NM_802_11_AP_SEC_GROUP_WEP40     = 0x00000010,
289         NM_802_11_AP_SEC_GROUP_WEP104    = 0x00000020,
290         NM_802_11_AP_SEC_GROUP_TKIP      = 0x00000040,
291         NM_802_11_AP_SEC_GROUP_CCMP      = 0x00000080,
292         NM_802_11_AP_SEC_KEY_MGMT_PSK    = 0x00000100,
293         NM_802_11_AP_SEC_KEY_MGMT_802_1X = 0x00000200
294 } NM80211ApSecurityFlags;
295
296 /**
297  * NM80211Mode:
298  * @NM_802_11_MODE_UNKNOWN: the device or access point mode is unknown
299  * @NM_802_11_MODE_ADHOC: for both devices and access point objects, indicates
300  *   the object is part of an Ad-Hoc 802.11 network without a central
301  *   coordinating access point.
302  * @NM_802_11_MODE_INFRA: the device or access point is in infrastructure mode.
303  *   For devices, this indicates the device is an 802.11 client/station.  For
304  *   access point objects, this indicates the object is an access point that
305  *   provides connectivity to clients.
306  * @NM_802_11_MODE_AP: the device is an access point/hotspot.  Not valid for
307  *   access point objects; used only for hotspot mode on the local machine.
308  *
309  * Indicates the 802.11 mode an access point or device is currently in.
310  *
311  * (Corresponds to the NM_802_11_MODE type in generic-types.xml.)
312  **/
313 typedef enum { /*< underscore_name=nm_802_11_mode >*/
314         NM_802_11_MODE_UNKNOWN = 0,
315         NM_802_11_MODE_ADHOC,
316         NM_802_11_MODE_INFRA,
317         NM_802_11_MODE_AP
318 } NM80211Mode;
319
320 /**
321  * NMBluetoothCapabilities:
322  * @NM_BT_CAPABILITY_NONE: device has no usable capabilities
323  * @NM_BT_CAPABILITY_DUN: device provides Dial-Up Networking capability
324  * @NM_BT_CAPABILITY_NAP: device provides Network Access Point capability
325  *
326  * #NMBluetoothCapabilities values indicate the usable capabilities of a
327  * Bluetooth device.
328  *
329  * (Corresponds to the NM_BT_CAPABILITY type in nm-device-bt.xml.)
330  **/
331 typedef enum { /*< flags >*/
332         NM_BT_CAPABILITY_NONE = 0x00000000,
333         NM_BT_CAPABILITY_DUN  = 0x00000001,
334         NM_BT_CAPABILITY_NAP  = 0x00000002,
335 } NMBluetoothCapabilities;
336
337 /**
338  * NMDeviceModemCapabilities:
339  * @NM_DEVICE_MODEM_CAPABILITY_NONE: modem has no usable capabilities
340  * @NM_DEVICE_MODEM_CAPABILITY_POTS: modem uses the analog wired telephone
341  * network and is not a wireless/cellular device
342  * @NM_DEVICE_MODEM_CAPABILITY_CDMA_EVDO: modem supports at least one of CDMA
343  * 1xRTT, EVDO revision 0, EVDO revision A, or EVDO revision B
344  * @NM_DEVICE_MODEM_CAPABILITY_GSM_UMTS: modem supports at least one of GSM,
345  * GPRS, EDGE, UMTS, HSDPA, HSUPA, or HSPA+ packet switched data capability
346  * @NM_DEVICE_MODEM_CAPABILITY_LTE: modem has LTE data capability
347  *
348  * #NMDeviceModemCapabilities values indicate the generic radio access
349  * technology families a modem device supports.  For more information on the
350  * specific access technologies the device supports use the ModemManager D-Bus
351  * API.
352  *
353  * (Corresponds to the NM_DEVICE_MODEM_CAPABILITY type in nm-device-modem.xml.)
354  **/
355 typedef enum { /*< flags >*/
356         NM_DEVICE_MODEM_CAPABILITY_NONE      = 0x00000000,
357         NM_DEVICE_MODEM_CAPABILITY_POTS      = 0x00000001,
358         NM_DEVICE_MODEM_CAPABILITY_CDMA_EVDO = 0x00000002,
359         NM_DEVICE_MODEM_CAPABILITY_GSM_UMTS  = 0x00000004,
360         NM_DEVICE_MODEM_CAPABILITY_LTE       = 0x00000008,
361 } NMDeviceModemCapabilities;
362
363
364 /**
365  * NMDeviceState:
366  * @NM_DEVICE_STATE_UNKNOWN: the device's state is unknown
367  * @NM_DEVICE_STATE_UNMANAGED: the device is recognized, but not managed by
368  *   NetworkManager
369  * @NM_DEVICE_STATE_UNAVAILABLE: the device is managed by NetworkManager, but
370  *   is not available for use.  Reasons may include the wireless switched off,
371  *   missing firmware, no ethernet carrier, missing supplicant or modem manager,
372  *   etc.
373  * @NM_DEVICE_STATE_DISCONNECTED: the device can be activated, but is currently
374  *   idle and not connected to a network.
375  * @NM_DEVICE_STATE_PREPARE: the device is preparing the connection to the
376  *   network.  This may include operations like changing the MAC address,
377  *   setting physical link properties, and anything else required to connect
378  *   to the requested network.
379  * @NM_DEVICE_STATE_CONFIG: the device is connecting to the requested network.
380  *   This may include operations like associating with the WiFi AP, dialing
381  *   the modem, connecting to the remote Bluetooth device, etc.
382  * @NM_DEVICE_STATE_NEED_AUTH: the device requires more information to continue
383  *   connecting to the requested network.  This includes secrets like WiFi
384  *   passphrases, login passwords, PIN codes, etc.
385  * @NM_DEVICE_STATE_IP_CONFIG: the device is requesting IPv4 and/or IPv6
386  *   addresses and routing information from the network.
387  * @NM_DEVICE_STATE_IP_CHECK: the device is checking whether further action is
388  *   required for the requested network connection.  This may include checking
389  *   whether only local network access is available, whether a captive portal
390  *   is blocking access to the Internet, etc.
391  * @NM_DEVICE_STATE_SECONDARIES: the device is waiting for a secondary
392  *   connection (like a VPN) which must activated before the device can be
393  *   activated
394  * @NM_DEVICE_STATE_ACTIVATED: the device has a network connection, either local
395  *   or global.
396  * @NM_DEVICE_STATE_DEACTIVATING: a disconnection from the current network
397  *   connection was requested, and the device is cleaning up resources used for
398  *   that connection.  The network connection may still be valid.
399  * @NM_DEVICE_STATE_FAILED: the device failed to connect to the requested
400  *   network and is cleaning up the connection request
401  *
402  * (Corresponds to the NM_DEVICE_STATE type in nm-device.xml.)
403  **/
404 typedef enum {
405         NM_DEVICE_STATE_UNKNOWN      = 0,
406         NM_DEVICE_STATE_UNMANAGED    = 10,
407         NM_DEVICE_STATE_UNAVAILABLE  = 20,
408         NM_DEVICE_STATE_DISCONNECTED = 30,
409         NM_DEVICE_STATE_PREPARE      = 40,
410         NM_DEVICE_STATE_CONFIG       = 50,
411         NM_DEVICE_STATE_NEED_AUTH    = 60,
412         NM_DEVICE_STATE_IP_CONFIG    = 70,
413         NM_DEVICE_STATE_IP_CHECK     = 80,
414         NM_DEVICE_STATE_SECONDARIES  = 90,
415         NM_DEVICE_STATE_ACTIVATED    = 100,
416         NM_DEVICE_STATE_DEACTIVATING = 110,
417         NM_DEVICE_STATE_FAILED       = 120
418 } NMDeviceState;
419
420 /**
421  * NMDeviceStateReason:
422  * @NM_DEVICE_STATE_REASON_NONE: No reason given
423  * @NM_DEVICE_STATE_REASON_UNKNOWN: Unknown error
424  * @NM_DEVICE_STATE_REASON_NOW_MANAGED: Device is now managed
425  * @NM_DEVICE_STATE_REASON_NOW_UNMANAGED: Device is now unmanaged
426  * @NM_DEVICE_STATE_REASON_CONFIG_FAILED: The device could not be readied for configuration
427  * @NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE: IP configuration could not be reserved (no available address, timeout, etc)
428  * @NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED: The IP config is no longer valid
429  * @NM_DEVICE_STATE_REASON_NO_SECRETS: Secrets were required, but not provided
430  * @NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT: 802.1x supplicant disconnected
431  * @NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED: 802.1x supplicant configuration failed
432  * @NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED: 802.1x supplicant failed
433  * @NM_DEVICE_STATE_REASON_SUPPLICANT_TIMEOUT: 802.1x supplicant took too long to authenticate
434  * @NM_DEVICE_STATE_REASON_PPP_START_FAILED: PPP service failed to start
435  * @NM_DEVICE_STATE_REASON_PPP_DISCONNECT: PPP service disconnected
436  * @NM_DEVICE_STATE_REASON_PPP_FAILED: PPP failed
437  * @NM_DEVICE_STATE_REASON_DHCP_START_FAILED: DHCP client failed to start
438  * @NM_DEVICE_STATE_REASON_DHCP_ERROR: DHCP client error
439  * @NM_DEVICE_STATE_REASON_DHCP_FAILED: DHCP client failed
440  * @NM_DEVICE_STATE_REASON_SHARED_START_FAILED: Shared connection service failed to start
441  * @NM_DEVICE_STATE_REASON_SHARED_FAILED: Shared connection service failed
442  * @NM_DEVICE_STATE_REASON_AUTOIP_START_FAILED: AutoIP service failed to start
443  * @NM_DEVICE_STATE_REASON_AUTOIP_ERROR: AutoIP service error
444  * @NM_DEVICE_STATE_REASON_AUTOIP_FAILED: AutoIP service failed
445  * @NM_DEVICE_STATE_REASON_MODEM_BUSY: The line is busy
446  * @NM_DEVICE_STATE_REASON_MODEM_NO_DIAL_TONE: No dial tone
447  * @NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER: No carrier could be established
448  * @NM_DEVICE_STATE_REASON_MODEM_DIAL_TIMEOUT: The dialing request timed out
449  * @NM_DEVICE_STATE_REASON_MODEM_DIAL_FAILED: The dialing attempt failed
450  * @NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED: Modem initialization failed
451  * @NM_DEVICE_STATE_REASON_GSM_APN_FAILED: Failed to select the specified APN
452  * @NM_DEVICE_STATE_REASON_GSM_REGISTRATION_NOT_SEARCHING: Not searching for networks
453  * @NM_DEVICE_STATE_REASON_GSM_REGISTRATION_DENIED: Network registration denied
454  * @NM_DEVICE_STATE_REASON_GSM_REGISTRATION_TIMEOUT: Network registration timed out
455  * @NM_DEVICE_STATE_REASON_GSM_REGISTRATION_FAILED: Failed to register with the requested network
456  * @NM_DEVICE_STATE_REASON_GSM_PIN_CHECK_FAILED: PIN check failed
457  * @NM_DEVICE_STATE_REASON_FIRMWARE_MISSING: Necessary firmware for the device may be missing
458  * @NM_DEVICE_STATE_REASON_REMOVED: The device was removed
459  * @NM_DEVICE_STATE_REASON_SLEEPING: NetworkManager went to sleep
460  * @NM_DEVICE_STATE_REASON_CONNECTION_REMOVED: The device's active connection disappeared
461  * @NM_DEVICE_STATE_REASON_USER_REQUESTED: Device disconnected by user or client
462  * @NM_DEVICE_STATE_REASON_CARRIER: Carrier/link changed
463  * @NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED: The device's existing connection was assumed
464  * @NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE: The supplicant is now available
465  * @NM_DEVICE_STATE_REASON_MODEM_NOT_FOUND: The modem could not be found
466  * @NM_DEVICE_STATE_REASON_BT_FAILED: The Bluetooth connection failed or timed out
467  * @NM_DEVICE_STATE_REASON_GSM_SIM_NOT_INSERTED: GSM Modem's SIM Card not inserted
468  * @NM_DEVICE_STATE_REASON_GSM_SIM_PIN_REQUIRED: GSM Modem's SIM Pin required
469  * @NM_DEVICE_STATE_REASON_GSM_SIM_PUK_REQUIRED: GSM Modem's SIM Puk required
470  * @NM_DEVICE_STATE_REASON_GSM_SIM_WRONG: GSM Modem's SIM wrong
471  * @NM_DEVICE_STATE_REASON_INFINIBAND_MODE: InfiniBand device does not support connected mode
472  * @NM_DEVICE_STATE_REASON_DEPENDENCY_FAILED: A dependency of the connection failed
473  * @NM_DEVICE_STATE_REASON_BR2684_FAILED: Problem with the RFC 2684 Ethernet over ADSL bridge
474  * @NM_DEVICE_STATE_REASON_MODEM_MANAGER_UNAVAILABLE: ModemManager not running
475  * @NM_DEVICE_STATE_REASON_SSID_NOT_FOUND: The WiFi network could not be found
476  * @NM_DEVICE_STATE_REASON_SECONDARY_CONNECTION_FAILED: A secondary connection of the base connection failed
477  * @NM_DEVICE_STATE_REASON_DCB_FCOE_FAILED: DCB or FCoE setup failed
478  * @NM_DEVICE_STATE_REASON_TEAMD_CONTROL_FAILED: teamd control failed
479  * @NM_DEVICE_STATE_REASON_MODEM_FAILED: Modem failed or no longer available
480  * @NM_DEVICE_STATE_REASON_MODEM_AVAILABLE: Modem now ready and available
481  * @NM_DEVICE_STATE_REASON_SIM_PIN_INCORRECT: SIM PIN was incorrect
482  * @NM_DEVICE_STATE_REASON_NEW_ACTIVATION: New connection activation was enqueued
483  * @NM_DEVICE_STATE_REASON_PARENT_CHANGED: the device's parent changed
484  * @NM_DEVICE_STATE_REASON_PARENT_MANAGED_CHANGED: the device parent's management changed
485  *
486  * Device state change reason codes
487  *
488  * (Corresponds to the NM_DEVICE_STATE_REASON type in nm-device.xml.)
489  */
490 typedef enum {
491         NM_DEVICE_STATE_REASON_NONE = 0,
492         NM_DEVICE_STATE_REASON_UNKNOWN = 1,
493         NM_DEVICE_STATE_REASON_NOW_MANAGED = 2,
494         NM_DEVICE_STATE_REASON_NOW_UNMANAGED = 3,
495         NM_DEVICE_STATE_REASON_CONFIG_FAILED = 4,
496         NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE = 5,
497         NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED = 6,
498         NM_DEVICE_STATE_REASON_NO_SECRETS = 7,
499         NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT = 8,
500         NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED = 9,
501         NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED = 10,
502         NM_DEVICE_STATE_REASON_SUPPLICANT_TIMEOUT = 11,
503         NM_DEVICE_STATE_REASON_PPP_START_FAILED = 12,
504         NM_DEVICE_STATE_REASON_PPP_DISCONNECT = 13,
505         NM_DEVICE_STATE_REASON_PPP_FAILED = 14,
506         NM_DEVICE_STATE_REASON_DHCP_START_FAILED = 15,
507         NM_DEVICE_STATE_REASON_DHCP_ERROR = 16,
508         NM_DEVICE_STATE_REASON_DHCP_FAILED = 17,
509         NM_DEVICE_STATE_REASON_SHARED_START_FAILED = 18,
510         NM_DEVICE_STATE_REASON_SHARED_FAILED = 19,
511         NM_DEVICE_STATE_REASON_AUTOIP_START_FAILED = 20,
512         NM_DEVICE_STATE_REASON_AUTOIP_ERROR = 21,
513         NM_DEVICE_STATE_REASON_AUTOIP_FAILED = 22,
514         NM_DEVICE_STATE_REASON_MODEM_BUSY = 23,
515         NM_DEVICE_STATE_REASON_MODEM_NO_DIAL_TONE = 24,
516         NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER = 25,
517         NM_DEVICE_STATE_REASON_MODEM_DIAL_TIMEOUT = 26,
518         NM_DEVICE_STATE_REASON_MODEM_DIAL_FAILED = 27,
519         NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED = 28,
520         NM_DEVICE_STATE_REASON_GSM_APN_FAILED = 29,
521         NM_DEVICE_STATE_REASON_GSM_REGISTRATION_NOT_SEARCHING = 30,
522         NM_DEVICE_STATE_REASON_GSM_REGISTRATION_DENIED = 31,
523         NM_DEVICE_STATE_REASON_GSM_REGISTRATION_TIMEOUT = 32,
524         NM_DEVICE_STATE_REASON_GSM_REGISTRATION_FAILED = 33,
525         NM_DEVICE_STATE_REASON_GSM_PIN_CHECK_FAILED = 34,
526         NM_DEVICE_STATE_REASON_FIRMWARE_MISSING = 35,
527         NM_DEVICE_STATE_REASON_REMOVED = 36,
528         NM_DEVICE_STATE_REASON_SLEEPING = 37,
529         NM_DEVICE_STATE_REASON_CONNECTION_REMOVED = 38,
530         NM_DEVICE_STATE_REASON_USER_REQUESTED = 39,
531         NM_DEVICE_STATE_REASON_CARRIER = 40,
532         NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED = 41,
533         NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE = 42,
534         NM_DEVICE_STATE_REASON_MODEM_NOT_FOUND = 43,
535         NM_DEVICE_STATE_REASON_BT_FAILED = 44,
536         NM_DEVICE_STATE_REASON_GSM_SIM_NOT_INSERTED = 45,
537         NM_DEVICE_STATE_REASON_GSM_SIM_PIN_REQUIRED = 46,
538         NM_DEVICE_STATE_REASON_GSM_SIM_PUK_REQUIRED = 47,
539         NM_DEVICE_STATE_REASON_GSM_SIM_WRONG = 48,
540         NM_DEVICE_STATE_REASON_INFINIBAND_MODE = 49,
541         NM_DEVICE_STATE_REASON_DEPENDENCY_FAILED = 50,
542         NM_DEVICE_STATE_REASON_BR2684_FAILED = 51,
543         NM_DEVICE_STATE_REASON_MODEM_MANAGER_UNAVAILABLE = 52,
544         NM_DEVICE_STATE_REASON_SSID_NOT_FOUND = 53,
545         NM_DEVICE_STATE_REASON_SECONDARY_CONNECTION_FAILED = 54,
546         NM_DEVICE_STATE_REASON_DCB_FCOE_FAILED = 55,
547         NM_DEVICE_STATE_REASON_TEAMD_CONTROL_FAILED = 56,
548         NM_DEVICE_STATE_REASON_MODEM_FAILED = 57,
549         NM_DEVICE_STATE_REASON_MODEM_AVAILABLE = 58,
550         NM_DEVICE_STATE_REASON_SIM_PIN_INCORRECT = 59,
551         NM_DEVICE_STATE_REASON_NEW_ACTIVATION = 60,
552         NM_DEVICE_STATE_REASON_PARENT_CHANGED = 61,
553         NM_DEVICE_STATE_REASON_PARENT_MANAGED_CHANGED = 62,
554 } NMDeviceStateReason;
555
556 /**
557  * NMMetered:
558  * @NM_METERED_UNKNOWN:     The metered status is unknown
559  * @NM_METERED_YES:         Metered, the value was statically set
560  * @NM_METERED_NO:          Not metered, the value was statically set
561  * @NM_METERED_GUESS_YES:   Metered, the value was guessed
562  * @NM_METERED_GUESS_NO:    Not metered, the value was guessed
563  *
564  * (Corresponds to the NM_METERED type in nm-device.xml.)
565  *
566  * Since: 1.2
567  **/
568 NM_AVAILABLE_IN_1_2
569 typedef enum {
570         NM_METERED_UNKNOWN    = 0,
571         NM_METERED_YES        = 1,
572         NM_METERED_NO         = 2,
573         NM_METERED_GUESS_YES  = 3,
574         NM_METERED_GUESS_NO   = 4,
575 } NMMetered;
576
577 /**
578  * NMActiveConnectionState:
579  * @NM_ACTIVE_CONNECTION_STATE_UNKNOWN: the state of the connection is unknown
580  * @NM_ACTIVE_CONNECTION_STATE_ACTIVATING: a network connection is being prepared
581  * @NM_ACTIVE_CONNECTION_STATE_ACTIVATED: there is a connection to the network
582  * @NM_ACTIVE_CONNECTION_STATE_DEACTIVATING: the network connection is being
583  *   torn down and cleaned up
584  * @NM_ACTIVE_CONNECTION_STATE_DEACTIVATED: the network connection is disconnected
585  *   and will be removed
586  *
587  * #NMActiveConnectionState values indicate the state of a connection to a
588  * specific network while it is starting, connected, or disconnecting from that
589  * network.
590  *
591  * (Corresponds to the NM_ACTIVE_CONNECTION_STATE type in nm-active-connection.xml.)
592  **/
593 typedef enum {
594         NM_ACTIVE_CONNECTION_STATE_UNKNOWN = 0,
595         NM_ACTIVE_CONNECTION_STATE_ACTIVATING,
596         NM_ACTIVE_CONNECTION_STATE_ACTIVATED,
597         NM_ACTIVE_CONNECTION_STATE_DEACTIVATING,
598         NM_ACTIVE_CONNECTION_STATE_DEACTIVATED
599 } NMActiveConnectionState;
600
601 /**
602  * NMSecretAgentGetSecretsFlags:
603  * @NM_SECRET_AGENT_GET_SECRETS_FLAG_NONE: no special behavior; by default no
604  *   user interaction is allowed and requests for secrets are fulfilled from
605  *   persistent storage, or if no secrets are available an error is returned.
606  * @NM_SECRET_AGENT_GET_SECRETS_FLAG_ALLOW_INTERACTION: allows the request to
607  *   interact with the user, possibly prompting via UI for secrets if any are
608  *   required, or if none are found in persistent storage.
609  * @NM_SECRET_AGENT_GET_SECRETS_FLAG_REQUEST_NEW: explicitly prompt for new
610  *   secrets from the user.  This flag signals that NetworkManager thinks any
611  *   existing secrets are invalid or wrong.  This flag implies that interaction
612  *   is allowed.
613  * @NM_SECRET_AGENT_GET_SECRETS_FLAG_USER_REQUESTED: set if the request was
614  *   initiated by user-requested action via the D-Bus interface, as opposed to
615  *   automatically initiated by NetworkManager in response to (for example) scan
616  *   results or carrier changes.
617  * @NM_SECRET_AGENT_GET_SECRETS_FLAG_ONLY_SYSTEM: Internal flag, not part of
618  *   the D-Bus API.
619  * @NM_SECRET_AGENT_GET_SECRETS_FLAG_NO_ERRORS: Internal flag, not part of
620  *   the D-Bus API.
621  *
622  * #NMSecretAgentGetSecretsFlags values modify the behavior of a GetSecrets request.
623  *
624  * (Corresponds to the NM_SECRET_AGENT_GET_SECRETS_FLAGS type in nm-secret-agent.xml.)
625  */
626 typedef enum { /*< flags >*/
627         NM_SECRET_AGENT_GET_SECRETS_FLAG_NONE = 0x0,
628         NM_SECRET_AGENT_GET_SECRETS_FLAG_ALLOW_INTERACTION = 0x1,
629         NM_SECRET_AGENT_GET_SECRETS_FLAG_REQUEST_NEW = 0x2,
630         NM_SECRET_AGENT_GET_SECRETS_FLAG_USER_REQUESTED = 0x4,
631
632         /* Internal to NM; not part of the D-Bus API */
633         NM_SECRET_AGENT_GET_SECRETS_FLAG_ONLY_SYSTEM = 0x80000000,
634         NM_SECRET_AGENT_GET_SECRETS_FLAG_NO_ERRORS = 0x40000000,
635 } NMSecretAgentGetSecretsFlags;
636
637 /**
638  * NMSecretAgentCapabilities:
639  * @NM_SECRET_AGENT_CAPABILITY_NONE: the agent supports no special capabilities
640  * @NM_SECRET_AGENT_CAPABILITY_VPN_HINTS: the agent supports passing hints to
641  * VPN plugin authentication dialogs.
642  * @NM_SECRET_AGENT_CAPABILITY_LAST: bounds checking value; should not be used.
643  *
644  * #NMSecretAgentCapabilities indicate various capabilities of the agent.
645  *
646  * (Corresponds to the NM_SECRET_AGENT_CAPABILITIES type in nm-secret-agent.xml.)
647  */
648 typedef enum /*< flags >*/ {
649         NM_SECRET_AGENT_CAPABILITY_NONE = 0x0,
650         NM_SECRET_AGENT_CAPABILITY_VPN_HINTS = 0x1,
651
652         /* boundary value */
653         NM_SECRET_AGENT_CAPABILITY_LAST = NM_SECRET_AGENT_CAPABILITY_VPN_HINTS
654 } NMSecretAgentCapabilities;
655
656 #ifndef NM_VERSION_H
657 #undef NM_AVAILABLE_IN_1_2
658 #endif
659
660 #define NM_LLDP_ATTR_DESTINATION "destination"
661 #define NM_LLDP_ATTR_CHASSIS_ID_TYPE "chassis-id-type"
662 #define NM_LLDP_ATTR_CHASSIS_ID "chassis-id"
663 #define NM_LLDP_ATTR_PORT_ID_TYPE "port-id-type"
664 #define NM_LLDP_ATTR_PORT_ID "port-id"
665 #define NM_LLDP_ATTR_PORT_DESCRIPTION "port-description"
666 #define NM_LLDP_ATTR_SYSTEM_NAME "system-name"
667 #define NM_LLDP_ATTR_SYSTEM_DESCRIPTION "system-description"
668 #define NM_LLDP_ATTR_SYSTEM_CAPABILITIES "system-capabilities"
669 #define NM_LLDP_ATTR_IEEE_802_1_PVID "ieee-802-1-pvid"
670 #define NM_LLDP_ATTR_IEEE_802_1_PPVID "ieee-802-1-ppvid"
671 #define NM_LLDP_ATTR_IEEE_802_1_PPVID_FLAGS "ieee-802-1-ppvid-flags"
672 #define NM_LLDP_ATTR_IEEE_802_1_VID "ieee-802-1-vid"
673 #define NM_LLDP_ATTR_IEEE_802_1_VLAN_NAME "ieee-802-1-vlan-name"
674
675 #define NM_LLDP_DEST_NEAREST_BRIDGE "nearest-bridge"
676 #define NM_LLDP_DEST_NEAREST_NON_TPMR_BRIDGE "nearest-non-tpmr-bridge"
677 #define NM_LLDP_DEST_NEAREST_CUSTOMER_BRIDGE "nearest-customer-bridge"
678
679 /**
680  * NMIPTunnelMode:
681  * @NM_IP_TUNNEL_MODE_UNKNOWN: Unknown/unset tunnel mode
682  * @NM_IP_TUNNEL_MODE_IPIP:    IP in IP tunnel
683  * @NM_IP_TUNNEL_MODE_GRE:     GRE tunnel
684  * @NM_IP_TUNNEL_MODE_SIT:     SIT tunnel
685  * @NM_IP_TUNNEL_MODE_ISATAP:  ISATAP tunnel
686  * @NM_IP_TUNNEL_MODE_VTI:     VTI tunnel
687  * @NM_IP_TUNNEL_MODE_IP6IP6:  IPv6 in IPv6 tunnel
688  * @NM_IP_TUNNEL_MODE_IPIP6:   IPv4 in IPv6 tunnel
689  * @NM_IP_TUNNEL_MODE_IP6GRE:  IPv6 GRE tunnel
690  * @NM_IP_TUNNEL_MODE_VTI6:    IPv6 VTI tunnel
691  *
692  * The tunneling mode.
693  *
694  * Since: 1.2
695  */
696 typedef enum {
697         NM_IP_TUNNEL_MODE_UNKNOWN     = 0,
698         NM_IP_TUNNEL_MODE_IPIP        = 1,
699         NM_IP_TUNNEL_MODE_GRE         = 2,
700         NM_IP_TUNNEL_MODE_SIT         = 3,
701         NM_IP_TUNNEL_MODE_ISATAP      = 4,
702         NM_IP_TUNNEL_MODE_VTI         = 5,
703         NM_IP_TUNNEL_MODE_IP6IP6      = 6,
704         NM_IP_TUNNEL_MODE_IPIP6       = 7,
705         NM_IP_TUNNEL_MODE_IP6GRE      = 8,
706         NM_IP_TUNNEL_MODE_VTI6        = 9,
707 } NMIPTunnelMode;
708
709 #endif /* __NM_DBUS_INTERFACE_H__ */