2004-10-21 17:42:14 +00:00
|
|
|
/* NetworkManager -- Network link manager
|
|
|
|
|
*
|
|
|
|
|
* Dan Williams <dcbw@redhat.com>
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
2008-06-26 18:31:52 +00:00
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2004-10-21 17:42:14 +00:00
|
|
|
*
|
2010-09-03 14:15:41 +02:00
|
|
|
* (C) Copyright 2004 - 2010 Red Hat, Inc.
|
2004-10-21 17:42:14 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef NETWORK_MANAGER_H
|
|
|
|
|
#define NETWORK_MANAGER_H
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* dbus services details
|
|
|
|
|
*/
|
2009-05-14 11:01:56 -04:00
|
|
|
#define NM_DBUS_SERVICE "org.freedesktop.NetworkManager"
|
2004-10-21 17:42:14 +00:00
|
|
|
|
2009-05-14 11:01:56 -04:00
|
|
|
#define NM_DBUS_PATH "/org/freedesktop/NetworkManager"
|
|
|
|
|
#define NM_DBUS_INTERFACE "org.freedesktop.NetworkManager"
|
|
|
|
|
#define NM_DBUS_INTERFACE_DEVICE NM_DBUS_INTERFACE ".Device"
|
2008-03-23 14:47:11 +00:00
|
|
|
#define NM_DBUS_INTERFACE_DEVICE_WIRED NM_DBUS_INTERFACE_DEVICE ".Wired"
|
|
|
|
|
#define NM_DBUS_INTERFACE_DEVICE_WIRELESS NM_DBUS_INTERFACE_DEVICE ".Wireless"
|
2009-07-10 10:45:24 -04:00
|
|
|
#define NM_DBUS_INTERFACE_DEVICE_BLUETOOTH NM_DBUS_INTERFACE_DEVICE ".Bluetooth"
|
2008-03-23 14:47:11 +00:00
|
|
|
#define NM_DBUS_PATH_ACCESS_POINT NM_DBUS_PATH "/AccessPoint"
|
|
|
|
|
#define NM_DBUS_INTERFACE_ACCESS_POINT NM_DBUS_INTERFACE ".AccessPoint"
|
2008-06-10 14:59:22 +00:00
|
|
|
#define NM_DBUS_INTERFACE_SERIAL_DEVICE NM_DBUS_INTERFACE_DEVICE ".Serial"
|
2008-03-23 14:47:11 +00:00
|
|
|
#define NM_DBUS_INTERFACE_GSM_DEVICE NM_DBUS_INTERFACE_DEVICE ".Gsm"
|
|
|
|
|
#define NM_DBUS_INTERFACE_CDMA_DEVICE NM_DBUS_INTERFACE_DEVICE ".Cdma"
|
2011-01-03 23:55:38 -06:00
|
|
|
#define NM_DBUS_INTERFACE_DEVICE_WIMAX NM_DBUS_INTERFACE_DEVICE ".WiMax"
|
2009-12-14 13:51:50 +02:00
|
|
|
#define NM_DBUS_INTERFACE_WIMAX_NSP NM_DBUS_INTERFACE ".WiMax.Nsp"
|
|
|
|
|
#define NM_DBUS_PATH_WIMAX_NSP NM_DBUS_PATH "/Nsp"
|
2008-03-23 14:47:11 +00:00
|
|
|
#define NM_DBUS_INTERFACE_ACTIVE_CONNECTION NM_DBUS_INTERFACE ".Connection.Active"
|
|
|
|
|
#define NM_DBUS_INTERFACE_IP4_CONFIG NM_DBUS_INTERFACE ".IP4Config"
|
2008-08-07 15:26:32 +00:00
|
|
|
#define NM_DBUS_INTERFACE_DHCP4_CONFIG NM_DBUS_INTERFACE ".DHCP4Config"
|
2009-08-20 11:30:52 -05:00
|
|
|
#define NM_DBUS_INTERFACE_IP6_CONFIG NM_DBUS_INTERFACE ".IP6Config"
|
2010-01-15 12:40:19 -08:00
|
|
|
#define NM_DBUS_INTERFACE_DHCP6_CONFIG NM_DBUS_INTERFACE ".DHCP6Config"
|
2008-03-23 14:47:11 +00:00
|
|
|
|
2004-10-21 17:42:14 +00:00
|
|
|
|
2010-08-07 01:07:44 -04:00
|
|
|
#define NM_DBUS_IFACE_SETTINGS "org.freedesktop.NetworkManager.Settings"
|
|
|
|
|
#define NM_DBUS_PATH_SETTINGS "/org/freedesktop/NetworkManager/Settings"
|
2004-10-21 17:42:14 +00:00
|
|
|
|
2010-08-07 01:07:44 -04:00
|
|
|
#define NM_DBUS_IFACE_SETTINGS_CONNECTION "org.freedesktop.NetworkManager.Settings.Connection"
|
|
|
|
|
#define NM_DBUS_PATH_SETTINGS_CONNECTION "/org/freedesktop/NetworkManager/Settings/Connection"
|
|
|
|
|
#define NM_DBUS_IFACE_SETTINGS_CONNECTION_SECRETS "org.freedesktop.NetworkManager.Settings.Connection.Secrets"
|
2004-10-21 17:42:14 +00:00
|
|
|
|
2010-12-10 12:38:19 -06:00
|
|
|
#define NM_DBUS_INTERFACE_AGENT_MANAGER NM_DBUS_INTERFACE ".AgentManager"
|
|
|
|
|
#define NM_DBUS_PATH_AGENT_MANAGER "/org/freedesktop/NetworkManager/AgentManager"
|
2004-10-21 17:42:14 +00:00
|
|
|
|
2010-12-14 00:03:22 -06:00
|
|
|
#define NM_DBUS_INTERFACE_SECRET_AGENT NM_DBUS_INTERFACE ".SecretAgent"
|
|
|
|
|
#define NM_DBUS_PATH_SECRET_AGENT "/org/freedesktop/NetworkManager/SecretAgent"
|
|
|
|
|
|
2005-04-27 18:05:16 +00:00
|
|
|
/*
|
2007-10-15 14:46:37 +00:00
|
|
|
* Types of NetworkManager states
|
2005-04-27 18:05:16 +00:00
|
|
|
*/
|
|
|
|
|
typedef enum NMState
|
|
|
|
|
{
|
|
|
|
|
NM_STATE_UNKNOWN = 0,
|
|
|
|
|
NM_STATE_ASLEEP,
|
|
|
|
|
NM_STATE_CONNECTING,
|
|
|
|
|
NM_STATE_CONNECTED,
|
|
|
|
|
NM_STATE_DISCONNECTED
|
|
|
|
|
} NMState;
|
|
|
|
|
|
|
|
|
|
|
2004-10-21 17:42:14 +00:00
|
|
|
/*
|
|
|
|
|
* Types of NetworkManager devices
|
|
|
|
|
*/
|
|
|
|
|
typedef enum NMDeviceType
|
|
|
|
|
{
|
2008-06-10 15:54:23 +00:00
|
|
|
NM_DEVICE_TYPE_UNKNOWN = 0,
|
|
|
|
|
NM_DEVICE_TYPE_ETHERNET,
|
|
|
|
|
NM_DEVICE_TYPE_WIFI,
|
|
|
|
|
NM_DEVICE_TYPE_GSM,
|
2009-05-14 11:01:56 -04:00
|
|
|
NM_DEVICE_TYPE_CDMA,
|
2009-08-05 16:34:02 -04:00
|
|
|
NM_DEVICE_TYPE_BT, /* Bluetooth */
|
2009-12-14 13:51:50 +02:00
|
|
|
NM_DEVICE_TYPE_WIMAX,
|
2009-08-05 16:34:02 -04:00
|
|
|
NM_DEVICE_TYPE_OLPC_MESH
|
2004-10-21 17:42:14 +00:00
|
|
|
} NMDeviceType;
|
|
|
|
|
|
2008-06-10 15:54:23 +00:00
|
|
|
/* DEPRECATED TYPE NAMES */
|
|
|
|
|
#define DEVICE_TYPE_UNKNOWN NM_DEVICE_TYPE_UNKNOWN
|
|
|
|
|
#define DEVICE_TYPE_802_3_ETHERNET NM_DEVICE_TYPE_ETHERNET
|
|
|
|
|
#define DEVICE_TYPE_802_11_WIRELESS NM_DEVICE_TYPE_WIFI
|
|
|
|
|
#define DEVICE_TYPE_GSM NM_DEVICE_TYPE_GSM
|
|
|
|
|
#define DEVICE_TYPE_CDMA NM_DEVICE_TYPE_CDMA
|
|
|
|
|
|
2004-10-21 17:42:14 +00:00
|
|
|
|
|
|
|
|
/*
|
2005-12-14 17:56:35 +00:00
|
|
|
* General device capability bits
|
2005-10-09 04:39:49 +00:00
|
|
|
*
|
2004-10-21 17:42:14 +00:00
|
|
|
*/
|
2009-05-14 11:01:56 -04:00
|
|
|
#define NM_DEVICE_CAP_NONE 0x00000000
|
|
|
|
|
#define NM_DEVICE_CAP_NM_SUPPORTED 0x00000001
|
|
|
|
|
#define NM_DEVICE_CAP_CARRIER_DETECT 0x00000002
|
2005-12-14 17:56:35 +00:00
|
|
|
|
|
|
|
|
|
2007-08-28 14:47:31 +00:00
|
|
|
/* 802.11 wireless device-specific capabilities */
|
2009-05-14 11:01:56 -04:00
|
|
|
#define NM_WIFI_DEVICE_CAP_NONE 0x00000000
|
|
|
|
|
#define NM_WIFI_DEVICE_CAP_CIPHER_WEP40 0x00000001
|
|
|
|
|
#define NM_WIFI_DEVICE_CAP_CIPHER_WEP104 0x00000002
|
|
|
|
|
#define NM_WIFI_DEVICE_CAP_CIPHER_TKIP 0x00000004
|
|
|
|
|
#define NM_WIFI_DEVICE_CAP_CIPHER_CCMP 0x00000008
|
|
|
|
|
#define NM_WIFI_DEVICE_CAP_WPA 0x00000010
|
|
|
|
|
#define NM_WIFI_DEVICE_CAP_RSN 0x00000020
|
2007-08-28 14:47:31 +00:00
|
|
|
|
2006-02-25 Robert Love <rml@novell.com>
Add WPA Enterprise support:
* gnome/applet/Makefile.am: Build the files nm-gconf-wso-wpa-eap.c and
nm-gconf-wso-wpa-eap.h.
* gnome/applet/nm-gconf-wso-wpa-eap.c,
gnome/applet/nm-gconf-wso-wpa-eap.h: Add WPA Enterprise Gconf
serialization and deserialization.
* gnome/applet/nm-gconf-wso-wpa-psk.c, gnome/applet/nm-gconf-wso.c,
gnome/applet/wireless-security-option.c, gnome/applet/wso-wpa-psk.c,
gnome/applet/wso-wpa-psk.h: Clean up, support new defines.
* gnome/applet/wireless-applet.glade: Add UI for configurating security
settings related to WPA Enterprise.
* gnome/applet/wireless-security-manager.c: Invoke wso_wpa_eap_new() to
instantiate WPA Enterprise wireless-security-option.
* gnome/applet/wso-wpa-eap.c, gnome/applet/wso-wpa-eap.h: New files.
Implement WPA Enterprise wireless-security-option object.
* include/NetworkManager.h: Add new NM_AUTH_TYPE_* and NM_EAP_METHOD_*
defines. Cleanup.
* libnm-util/cipher-wpa-psk-hex.c,
libnm-util/cipher-wpa-psk-passphrase.c: Cleanup.
* libnm-util/dbus-helpers.c, libnm-util/dbus-helpers.h: Add
nmu_security_serialize_wpa_eap() to serialize input to DBUS method,
nmu_security_serialize_wpa_eap_with_cipher() to serialize input
including the cipher to DBUS method, and
nmu_security_deserialize_wpa_eap() to deserialize from DBUS return
to output.
* src/Makefile.am: Build the files nm-ap-security-wpa-eap.c and
nm-ap-security-wpa-eap.h
* src/NetworkManagerAP.c: Add NM_AUTH_TYPE_WPA_EAP to
NM_802_11_CAP_KEY_MGMT_802_1X cipher to capability mapping.
* src/nm-ap-security-wpa-eap.c, src/nm-ap-security-wpa-eap.h: New
files. Implement NMAPSecurityWPA_EAP object.
* src/nm-ap-security-wpa-psk.c: Cleanup.
* src/nm-ap-security.c: Support NM_AUTH_TYPE_EAP cipher and instantiate
an NMAPSecurityWPA_EAP object via the method
nm_ap_security_wpa_eap_new_deserialize().
* src/nm-dbus-nm.c: Cleanup.
* test/nm-tool.c: Display "Enterprise" for wireless networks providing
WPA Enterprise support.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1493 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-02-26 02:16:53 +00:00
|
|
|
|
|
|
|
|
/*
|
2007-08-28 14:47:31 +00:00
|
|
|
* 802.11 Access Point flags
|
|
|
|
|
*
|
2006-02-25 Robert Love <rml@novell.com>
Add WPA Enterprise support:
* gnome/applet/Makefile.am: Build the files nm-gconf-wso-wpa-eap.c and
nm-gconf-wso-wpa-eap.h.
* gnome/applet/nm-gconf-wso-wpa-eap.c,
gnome/applet/nm-gconf-wso-wpa-eap.h: Add WPA Enterprise Gconf
serialization and deserialization.
* gnome/applet/nm-gconf-wso-wpa-psk.c, gnome/applet/nm-gconf-wso.c,
gnome/applet/wireless-security-option.c, gnome/applet/wso-wpa-psk.c,
gnome/applet/wso-wpa-psk.h: Clean up, support new defines.
* gnome/applet/wireless-applet.glade: Add UI for configurating security
settings related to WPA Enterprise.
* gnome/applet/wireless-security-manager.c: Invoke wso_wpa_eap_new() to
instantiate WPA Enterprise wireless-security-option.
* gnome/applet/wso-wpa-eap.c, gnome/applet/wso-wpa-eap.h: New files.
Implement WPA Enterprise wireless-security-option object.
* include/NetworkManager.h: Add new NM_AUTH_TYPE_* and NM_EAP_METHOD_*
defines. Cleanup.
* libnm-util/cipher-wpa-psk-hex.c,
libnm-util/cipher-wpa-psk-passphrase.c: Cleanup.
* libnm-util/dbus-helpers.c, libnm-util/dbus-helpers.h: Add
nmu_security_serialize_wpa_eap() to serialize input to DBUS method,
nmu_security_serialize_wpa_eap_with_cipher() to serialize input
including the cipher to DBUS method, and
nmu_security_deserialize_wpa_eap() to deserialize from DBUS return
to output.
* src/Makefile.am: Build the files nm-ap-security-wpa-eap.c and
nm-ap-security-wpa-eap.h
* src/NetworkManagerAP.c: Add NM_AUTH_TYPE_WPA_EAP to
NM_802_11_CAP_KEY_MGMT_802_1X cipher to capability mapping.
* src/nm-ap-security-wpa-eap.c, src/nm-ap-security-wpa-eap.h: New
files. Implement NMAPSecurityWPA_EAP object.
* src/nm-ap-security-wpa-psk.c: Cleanup.
* src/nm-ap-security.c: Support NM_AUTH_TYPE_EAP cipher and instantiate
an NMAPSecurityWPA_EAP object via the method
nm_ap_security_wpa_eap_new_deserialize().
* src/nm-dbus-nm.c: Cleanup.
* test/nm-tool.c: Display "Enterprise" for wireless networks providing
WPA Enterprise support.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1493 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-02-26 02:16:53 +00:00
|
|
|
*/
|
2009-05-14 11:01:56 -04:00
|
|
|
#define NM_802_11_AP_FLAGS_NONE 0x00000000
|
|
|
|
|
#define NM_802_11_AP_FLAGS_PRIVACY 0x00000001
|
2006-02-25 Robert Love <rml@novell.com>
Add WPA Enterprise support:
* gnome/applet/Makefile.am: Build the files nm-gconf-wso-wpa-eap.c and
nm-gconf-wso-wpa-eap.h.
* gnome/applet/nm-gconf-wso-wpa-eap.c,
gnome/applet/nm-gconf-wso-wpa-eap.h: Add WPA Enterprise Gconf
serialization and deserialization.
* gnome/applet/nm-gconf-wso-wpa-psk.c, gnome/applet/nm-gconf-wso.c,
gnome/applet/wireless-security-option.c, gnome/applet/wso-wpa-psk.c,
gnome/applet/wso-wpa-psk.h: Clean up, support new defines.
* gnome/applet/wireless-applet.glade: Add UI for configurating security
settings related to WPA Enterprise.
* gnome/applet/wireless-security-manager.c: Invoke wso_wpa_eap_new() to
instantiate WPA Enterprise wireless-security-option.
* gnome/applet/wso-wpa-eap.c, gnome/applet/wso-wpa-eap.h: New files.
Implement WPA Enterprise wireless-security-option object.
* include/NetworkManager.h: Add new NM_AUTH_TYPE_* and NM_EAP_METHOD_*
defines. Cleanup.
* libnm-util/cipher-wpa-psk-hex.c,
libnm-util/cipher-wpa-psk-passphrase.c: Cleanup.
* libnm-util/dbus-helpers.c, libnm-util/dbus-helpers.h: Add
nmu_security_serialize_wpa_eap() to serialize input to DBUS method,
nmu_security_serialize_wpa_eap_with_cipher() to serialize input
including the cipher to DBUS method, and
nmu_security_deserialize_wpa_eap() to deserialize from DBUS return
to output.
* src/Makefile.am: Build the files nm-ap-security-wpa-eap.c and
nm-ap-security-wpa-eap.h
* src/NetworkManagerAP.c: Add NM_AUTH_TYPE_WPA_EAP to
NM_802_11_CAP_KEY_MGMT_802_1X cipher to capability mapping.
* src/nm-ap-security-wpa-eap.c, src/nm-ap-security-wpa-eap.h: New
files. Implement NMAPSecurityWPA_EAP object.
* src/nm-ap-security-wpa-psk.c: Cleanup.
* src/nm-ap-security.c: Support NM_AUTH_TYPE_EAP cipher and instantiate
an NMAPSecurityWPA_EAP object via the method
nm_ap_security_wpa_eap_new_deserialize().
* src/nm-dbus-nm.c: Cleanup.
* test/nm-tool.c: Display "Enterprise" for wireless networks providing
WPA Enterprise support.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1493 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-02-26 02:16:53 +00:00
|
|
|
|
|
|
|
|
/*
|
2007-08-28 14:47:31 +00:00
|
|
|
* 802.11 Access Point security flags
|
|
|
|
|
*
|
|
|
|
|
* These describe the current security requirements of the BSSID as extracted
|
|
|
|
|
* from various pieces of beacon information, like beacon flags and various
|
|
|
|
|
* information elements.
|
2006-02-25 Robert Love <rml@novell.com>
Add WPA Enterprise support:
* gnome/applet/Makefile.am: Build the files nm-gconf-wso-wpa-eap.c and
nm-gconf-wso-wpa-eap.h.
* gnome/applet/nm-gconf-wso-wpa-eap.c,
gnome/applet/nm-gconf-wso-wpa-eap.h: Add WPA Enterprise Gconf
serialization and deserialization.
* gnome/applet/nm-gconf-wso-wpa-psk.c, gnome/applet/nm-gconf-wso.c,
gnome/applet/wireless-security-option.c, gnome/applet/wso-wpa-psk.c,
gnome/applet/wso-wpa-psk.h: Clean up, support new defines.
* gnome/applet/wireless-applet.glade: Add UI for configurating security
settings related to WPA Enterprise.
* gnome/applet/wireless-security-manager.c: Invoke wso_wpa_eap_new() to
instantiate WPA Enterprise wireless-security-option.
* gnome/applet/wso-wpa-eap.c, gnome/applet/wso-wpa-eap.h: New files.
Implement WPA Enterprise wireless-security-option object.
* include/NetworkManager.h: Add new NM_AUTH_TYPE_* and NM_EAP_METHOD_*
defines. Cleanup.
* libnm-util/cipher-wpa-psk-hex.c,
libnm-util/cipher-wpa-psk-passphrase.c: Cleanup.
* libnm-util/dbus-helpers.c, libnm-util/dbus-helpers.h: Add
nmu_security_serialize_wpa_eap() to serialize input to DBUS method,
nmu_security_serialize_wpa_eap_with_cipher() to serialize input
including the cipher to DBUS method, and
nmu_security_deserialize_wpa_eap() to deserialize from DBUS return
to output.
* src/Makefile.am: Build the files nm-ap-security-wpa-eap.c and
nm-ap-security-wpa-eap.h
* src/NetworkManagerAP.c: Add NM_AUTH_TYPE_WPA_EAP to
NM_802_11_CAP_KEY_MGMT_802_1X cipher to capability mapping.
* src/nm-ap-security-wpa-eap.c, src/nm-ap-security-wpa-eap.h: New
files. Implement NMAPSecurityWPA_EAP object.
* src/nm-ap-security-wpa-psk.c: Cleanup.
* src/nm-ap-security.c: Support NM_AUTH_TYPE_EAP cipher and instantiate
an NMAPSecurityWPA_EAP object via the method
nm_ap_security_wpa_eap_new_deserialize().
* src/nm-dbus-nm.c: Cleanup.
* test/nm-tool.c: Display "Enterprise" for wireless networks providing
WPA Enterprise support.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1493 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-02-26 02:16:53 +00:00
|
|
|
*/
|
2009-05-14 11:01:56 -04:00
|
|
|
#define NM_802_11_AP_SEC_NONE 0x00000000
|
|
|
|
|
#define NM_802_11_AP_SEC_PAIR_WEP40 0x00000001
|
|
|
|
|
#define NM_802_11_AP_SEC_PAIR_WEP104 0x00000002
|
|
|
|
|
#define NM_802_11_AP_SEC_PAIR_TKIP 0x00000004
|
|
|
|
|
#define NM_802_11_AP_SEC_PAIR_CCMP 0x00000008
|
|
|
|
|
#define NM_802_11_AP_SEC_GROUP_WEP40 0x00000010
|
|
|
|
|
#define NM_802_11_AP_SEC_GROUP_WEP104 0x00000020
|
|
|
|
|
#define NM_802_11_AP_SEC_GROUP_TKIP 0x00000040
|
|
|
|
|
#define NM_802_11_AP_SEC_GROUP_CCMP 0x00000080
|
|
|
|
|
#define NM_802_11_AP_SEC_KEY_MGMT_PSK 0x00000100
|
|
|
|
|
#define NM_802_11_AP_SEC_KEY_MGMT_802_1X 0x00000200
|
2007-08-28 14:47:31 +00:00
|
|
|
|
2008-04-15 20:39:34 +00:00
|
|
|
/*
|
|
|
|
|
* 802.11 AP and Station modes
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
typedef enum {
|
|
|
|
|
NM_802_11_MODE_UNKNOWN = 0,
|
|
|
|
|
NM_802_11_MODE_ADHOC,
|
2008-05-13 16:57:01 +00:00
|
|
|
NM_802_11_MODE_INFRA
|
2008-04-15 20:39:34 +00:00
|
|
|
} NM80211Mode;
|
|
|
|
|
|
2009-07-10 10:45:24 -04:00
|
|
|
/**
|
|
|
|
|
* NMBluetoothCapabilities:
|
|
|
|
|
* @NM_BT_CAPABILITY_NONE: device has no usable capabilities
|
|
|
|
|
* @NM_BT_CAPABILITY_DUN: device provides Dial-Up Networking capability
|
2011-01-09 02:00:51 -06:00
|
|
|
* @NM_BT_CAPABILITY_NAP: device provides Network Access Point capability
|
2009-05-14 11:01:56 -04:00
|
|
|
*
|
2009-07-10 10:45:24 -04:00
|
|
|
* #NMBluetoothCapabilities values indicate the usable capabilities of a
|
|
|
|
|
* Bluetooth device.
|
2009-05-14 11:01:56 -04:00
|
|
|
*/
|
2009-07-10 10:45:24 -04:00
|
|
|
typedef enum {
|
2009-05-14 11:01:56 -04:00
|
|
|
NM_BT_CAPABILITY_NONE = 0x00000000,
|
|
|
|
|
NM_BT_CAPABILITY_DUN = 0x00000001,
|
|
|
|
|
NM_BT_CAPABILITY_NAP = 0x00000002,
|
2009-07-10 10:45:24 -04:00
|
|
|
} NMBluetoothCapabilities;
|
2009-05-14 11:01:56 -04:00
|
|
|
|
2005-10-15 04:11:01 +00:00
|
|
|
|
2007-02-05 12:14:09 +00:00
|
|
|
/*
|
2008-02-01 20:38:46 +00:00
|
|
|
* Device states
|
2007-02-05 12:14:09 +00:00
|
|
|
*/
|
|
|
|
|
typedef enum
|
|
|
|
|
{
|
|
|
|
|
NM_DEVICE_STATE_UNKNOWN = 0,
|
2008-04-07 Dan Williams <dcbw@redhat.com>
* include/NetworkManager.h
- Remove the DOWN and CANCELLED device states
- Add UNMANAGED and UNAVAILABLE device states
- Document the device states
* introspection/nm-device.xml
src/nm-device-interface.c
src/nm-device-interface.h
- Add the 'managed' property
* test/nm-tool.c
- (detail_device): print out device state
* src/NetworkManagerSystem.h
src/backends/NetworkManagerArch.c
src/backends/NetworkManagerDebian.c
src/backends/NetworkManagerFrugalware.c
src/backends/NetworkManagerGentoo.c
src/backends/NetworkManagerMandriva.c
src/backends/NetworkManagerPaldo.c
src/backends/NetworkManagerRedHat.c
src/backends/NetworkManagerSlackware.c
src/backends/NetworkManagerSuSE.c
- (nm_system_device_get_system_config, nm_system_device_get_disabled
nm_system_device_free_system_config): remove; they were unused and
their functionality should be re-implemented in each distro's
system settings service plugin
* src/nm-gsm-device.c
src/nm-gsm-device.h
src/nm-cdma-device.c
src/nm-cdma-device.h
- (*_new): take the 'managed' argument
* src/nm-device.c
- (nm_device_set_address): remove, fold into nm_device_bring_up()
- (nm_device_init): start in unmanaged state, not disconnected
- (constructor): don't start device until the system settings service
has had a chance to figure out if the device is managed or not
- (nm_device_deactivate, nm_device_bring_up, nm_device_bring_down):
don't set device state here, let callers handle that as appropriate
- (nm_device_dispose): don't touch the device if it's not managed
- (set_property, get_property, nm_device_class_init): implement the
'managed' property
- (nm_device_state_changed): bring the device up if its now managed,
and deactivate it if it used to be active
- (nm_device_get_managed, nm_device_set_managed): do the right thing
with the managed state
* src/nm-hal-manager.c
- (wired_device_creator, wireless_device_creator, modem_device_creator):
take initial managed state and pass it along to device constructors
- (create_device_and_add_to_list): get managed state and pass to
type creators
* src/nm-device-802-11-wireless.c
- (real_can_activate): fold in most of
nm_device_802_11_wireless_can_activate()
- (can_scan): can't scan in UNAVAILABLE or UNMANAGED
- (link_timeout_cb): instead of deactivating, change device state and
let the device state handler to it
- (real_update_hw_address): clean up
- (state_changed_cb): when entering UNAVAILABLE state, schedule an idle
handler to transition to DISCONNECTED if the device isn't rfkilled
* src/nm-device-802-3-ethernet.c
- (set_carrier): move above callers and get rid of prototype
- (device_state_changed): when entering UNAVAILABLE state, schedule an
idle handler to transition to DISCONNECTED if the device has a
carrier
- (real_update_hw_address): clean up
- (link_timeout_cb, ppp_state_changed): change state instead of calling
deactivation directly as deactivation doesn't change state anymore
* src/NetworkManagerPolicy.c
- (schedule_activate_check): yay, remove wireless_enabled hack since
the NMManager and wireless devices work that out themselves now
- (device_state_changed): change to a switch and update for new device
states
- (device_carrier_changed): remove; device handles this now through
state changes
- (device_added): don't care about carrier any more; the initial
activation check will happen when the device transitions to
DISCONNECTED
* src/nm-manager.c
- (dispose): clear unmanaged devices
- (handle_unmanaged_devices): update unmanaged device list and toggle
the managed property on each device when needed
- (system_settings_properties_changed_cb): handle signals from the
system settings service
- (system_settings_get_unmanaged_devices_cb): handle callback from
getting the unmanaged device list method call
- (query_unmanaged_devices): ask the system settings service for its
list of unmanaged devices
- (nm_manager_name_owner_changed, initial_get_connections): get unmanaged
devices
- (manager_set_wireless_enabled): push rfkill state down to wireless
devices directly and let them handle the necessary state transitions
- (manager_device_state_changed): update for new device states
- (nm_manager_add_device): set initial rfkill state on wireless devices
- (nm_manager_remove_device): don't touch the device if it's unmanaged
- (nm_manager_activate_connection): return error if the device is
unmanaged
- (nm_manager_sleep): handle new device states correctly; don't change
the state of unavailable/unmanaged devices
* libnm-glib/nm-device-802-11-wireless.c
- (state_changed_cb): update for new device states
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3540 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-08 02:58:02 +00:00
|
|
|
|
|
|
|
|
/* Initial state of all devices and the only state for devices not
|
|
|
|
|
* managed by NetworkManager.
|
|
|
|
|
*
|
|
|
|
|
* Allowed next states:
|
|
|
|
|
* UNAVAILABLE: the device is now managed by NetworkManager
|
|
|
|
|
*/
|
2009-09-09 07:11:29 -07:00
|
|
|
NM_DEVICE_STATE_UNMANAGED = 1,
|
2008-04-07 Dan Williams <dcbw@redhat.com>
* include/NetworkManager.h
- Remove the DOWN and CANCELLED device states
- Add UNMANAGED and UNAVAILABLE device states
- Document the device states
* introspection/nm-device.xml
src/nm-device-interface.c
src/nm-device-interface.h
- Add the 'managed' property
* test/nm-tool.c
- (detail_device): print out device state
* src/NetworkManagerSystem.h
src/backends/NetworkManagerArch.c
src/backends/NetworkManagerDebian.c
src/backends/NetworkManagerFrugalware.c
src/backends/NetworkManagerGentoo.c
src/backends/NetworkManagerMandriva.c
src/backends/NetworkManagerPaldo.c
src/backends/NetworkManagerRedHat.c
src/backends/NetworkManagerSlackware.c
src/backends/NetworkManagerSuSE.c
- (nm_system_device_get_system_config, nm_system_device_get_disabled
nm_system_device_free_system_config): remove; they were unused and
their functionality should be re-implemented in each distro's
system settings service plugin
* src/nm-gsm-device.c
src/nm-gsm-device.h
src/nm-cdma-device.c
src/nm-cdma-device.h
- (*_new): take the 'managed' argument
* src/nm-device.c
- (nm_device_set_address): remove, fold into nm_device_bring_up()
- (nm_device_init): start in unmanaged state, not disconnected
- (constructor): don't start device until the system settings service
has had a chance to figure out if the device is managed or not
- (nm_device_deactivate, nm_device_bring_up, nm_device_bring_down):
don't set device state here, let callers handle that as appropriate
- (nm_device_dispose): don't touch the device if it's not managed
- (set_property, get_property, nm_device_class_init): implement the
'managed' property
- (nm_device_state_changed): bring the device up if its now managed,
and deactivate it if it used to be active
- (nm_device_get_managed, nm_device_set_managed): do the right thing
with the managed state
* src/nm-hal-manager.c
- (wired_device_creator, wireless_device_creator, modem_device_creator):
take initial managed state and pass it along to device constructors
- (create_device_and_add_to_list): get managed state and pass to
type creators
* src/nm-device-802-11-wireless.c
- (real_can_activate): fold in most of
nm_device_802_11_wireless_can_activate()
- (can_scan): can't scan in UNAVAILABLE or UNMANAGED
- (link_timeout_cb): instead of deactivating, change device state and
let the device state handler to it
- (real_update_hw_address): clean up
- (state_changed_cb): when entering UNAVAILABLE state, schedule an idle
handler to transition to DISCONNECTED if the device isn't rfkilled
* src/nm-device-802-3-ethernet.c
- (set_carrier): move above callers and get rid of prototype
- (device_state_changed): when entering UNAVAILABLE state, schedule an
idle handler to transition to DISCONNECTED if the device has a
carrier
- (real_update_hw_address): clean up
- (link_timeout_cb, ppp_state_changed): change state instead of calling
deactivation directly as deactivation doesn't change state anymore
* src/NetworkManagerPolicy.c
- (schedule_activate_check): yay, remove wireless_enabled hack since
the NMManager and wireless devices work that out themselves now
- (device_state_changed): change to a switch and update for new device
states
- (device_carrier_changed): remove; device handles this now through
state changes
- (device_added): don't care about carrier any more; the initial
activation check will happen when the device transitions to
DISCONNECTED
* src/nm-manager.c
- (dispose): clear unmanaged devices
- (handle_unmanaged_devices): update unmanaged device list and toggle
the managed property on each device when needed
- (system_settings_properties_changed_cb): handle signals from the
system settings service
- (system_settings_get_unmanaged_devices_cb): handle callback from
getting the unmanaged device list method call
- (query_unmanaged_devices): ask the system settings service for its
list of unmanaged devices
- (nm_manager_name_owner_changed, initial_get_connections): get unmanaged
devices
- (manager_set_wireless_enabled): push rfkill state down to wireless
devices directly and let them handle the necessary state transitions
- (manager_device_state_changed): update for new device states
- (nm_manager_add_device): set initial rfkill state on wireless devices
- (nm_manager_remove_device): don't touch the device if it's unmanaged
- (nm_manager_activate_connection): return error if the device is
unmanaged
- (nm_manager_sleep): handle new device states correctly; don't change
the state of unavailable/unmanaged devices
* libnm-glib/nm-device-802-11-wireless.c
- (state_changed_cb): update for new device states
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3540 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-08 02:58:02 +00:00
|
|
|
|
|
|
|
|
/* Indicates the device is not yet ready for use, but is managed by
|
|
|
|
|
* NetworkManager. For Ethernet devices, the device may not have an
|
|
|
|
|
* active carrier. For WiFi devices, the device may not have it's radio
|
|
|
|
|
* enabled.
|
|
|
|
|
*
|
|
|
|
|
* Allowed next states:
|
|
|
|
|
* UNMANAGED: the device is no longer managed by NetworkManager
|
|
|
|
|
* DISCONNECTED: the device is now ready for use
|
|
|
|
|
*/
|
2009-09-09 07:11:29 -07:00
|
|
|
NM_DEVICE_STATE_UNAVAILABLE = 2,
|
2008-04-07 Dan Williams <dcbw@redhat.com>
* include/NetworkManager.h
- Remove the DOWN and CANCELLED device states
- Add UNMANAGED and UNAVAILABLE device states
- Document the device states
* introspection/nm-device.xml
src/nm-device-interface.c
src/nm-device-interface.h
- Add the 'managed' property
* test/nm-tool.c
- (detail_device): print out device state
* src/NetworkManagerSystem.h
src/backends/NetworkManagerArch.c
src/backends/NetworkManagerDebian.c
src/backends/NetworkManagerFrugalware.c
src/backends/NetworkManagerGentoo.c
src/backends/NetworkManagerMandriva.c
src/backends/NetworkManagerPaldo.c
src/backends/NetworkManagerRedHat.c
src/backends/NetworkManagerSlackware.c
src/backends/NetworkManagerSuSE.c
- (nm_system_device_get_system_config, nm_system_device_get_disabled
nm_system_device_free_system_config): remove; they were unused and
their functionality should be re-implemented in each distro's
system settings service plugin
* src/nm-gsm-device.c
src/nm-gsm-device.h
src/nm-cdma-device.c
src/nm-cdma-device.h
- (*_new): take the 'managed' argument
* src/nm-device.c
- (nm_device_set_address): remove, fold into nm_device_bring_up()
- (nm_device_init): start in unmanaged state, not disconnected
- (constructor): don't start device until the system settings service
has had a chance to figure out if the device is managed or not
- (nm_device_deactivate, nm_device_bring_up, nm_device_bring_down):
don't set device state here, let callers handle that as appropriate
- (nm_device_dispose): don't touch the device if it's not managed
- (set_property, get_property, nm_device_class_init): implement the
'managed' property
- (nm_device_state_changed): bring the device up if its now managed,
and deactivate it if it used to be active
- (nm_device_get_managed, nm_device_set_managed): do the right thing
with the managed state
* src/nm-hal-manager.c
- (wired_device_creator, wireless_device_creator, modem_device_creator):
take initial managed state and pass it along to device constructors
- (create_device_and_add_to_list): get managed state and pass to
type creators
* src/nm-device-802-11-wireless.c
- (real_can_activate): fold in most of
nm_device_802_11_wireless_can_activate()
- (can_scan): can't scan in UNAVAILABLE or UNMANAGED
- (link_timeout_cb): instead of deactivating, change device state and
let the device state handler to it
- (real_update_hw_address): clean up
- (state_changed_cb): when entering UNAVAILABLE state, schedule an idle
handler to transition to DISCONNECTED if the device isn't rfkilled
* src/nm-device-802-3-ethernet.c
- (set_carrier): move above callers and get rid of prototype
- (device_state_changed): when entering UNAVAILABLE state, schedule an
idle handler to transition to DISCONNECTED if the device has a
carrier
- (real_update_hw_address): clean up
- (link_timeout_cb, ppp_state_changed): change state instead of calling
deactivation directly as deactivation doesn't change state anymore
* src/NetworkManagerPolicy.c
- (schedule_activate_check): yay, remove wireless_enabled hack since
the NMManager and wireless devices work that out themselves now
- (device_state_changed): change to a switch and update for new device
states
- (device_carrier_changed): remove; device handles this now through
state changes
- (device_added): don't care about carrier any more; the initial
activation check will happen when the device transitions to
DISCONNECTED
* src/nm-manager.c
- (dispose): clear unmanaged devices
- (handle_unmanaged_devices): update unmanaged device list and toggle
the managed property on each device when needed
- (system_settings_properties_changed_cb): handle signals from the
system settings service
- (system_settings_get_unmanaged_devices_cb): handle callback from
getting the unmanaged device list method call
- (query_unmanaged_devices): ask the system settings service for its
list of unmanaged devices
- (nm_manager_name_owner_changed, initial_get_connections): get unmanaged
devices
- (manager_set_wireless_enabled): push rfkill state down to wireless
devices directly and let them handle the necessary state transitions
- (manager_device_state_changed): update for new device states
- (nm_manager_add_device): set initial rfkill state on wireless devices
- (nm_manager_remove_device): don't touch the device if it's unmanaged
- (nm_manager_activate_connection): return error if the device is
unmanaged
- (nm_manager_sleep): handle new device states correctly; don't change
the state of unavailable/unmanaged devices
* libnm-glib/nm-device-802-11-wireless.c
- (state_changed_cb): update for new device states
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3540 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-08 02:58:02 +00:00
|
|
|
|
|
|
|
|
/* Indicates the device does not have an activate connection to anything.
|
|
|
|
|
*
|
|
|
|
|
* Allowed next states:
|
|
|
|
|
* UNMANAGED: the device is no longer managed by NetworkManager
|
|
|
|
|
* UNAVAILABLE: the device is no longer ready for use (rfkill, no carrier, etc)
|
|
|
|
|
* PREPARE: the device has started activation
|
|
|
|
|
*/
|
2009-09-09 07:11:29 -07:00
|
|
|
NM_DEVICE_STATE_DISCONNECTED = 3,
|
2008-04-07 Dan Williams <dcbw@redhat.com>
* include/NetworkManager.h
- Remove the DOWN and CANCELLED device states
- Add UNMANAGED and UNAVAILABLE device states
- Document the device states
* introspection/nm-device.xml
src/nm-device-interface.c
src/nm-device-interface.h
- Add the 'managed' property
* test/nm-tool.c
- (detail_device): print out device state
* src/NetworkManagerSystem.h
src/backends/NetworkManagerArch.c
src/backends/NetworkManagerDebian.c
src/backends/NetworkManagerFrugalware.c
src/backends/NetworkManagerGentoo.c
src/backends/NetworkManagerMandriva.c
src/backends/NetworkManagerPaldo.c
src/backends/NetworkManagerRedHat.c
src/backends/NetworkManagerSlackware.c
src/backends/NetworkManagerSuSE.c
- (nm_system_device_get_system_config, nm_system_device_get_disabled
nm_system_device_free_system_config): remove; they were unused and
their functionality should be re-implemented in each distro's
system settings service plugin
* src/nm-gsm-device.c
src/nm-gsm-device.h
src/nm-cdma-device.c
src/nm-cdma-device.h
- (*_new): take the 'managed' argument
* src/nm-device.c
- (nm_device_set_address): remove, fold into nm_device_bring_up()
- (nm_device_init): start in unmanaged state, not disconnected
- (constructor): don't start device until the system settings service
has had a chance to figure out if the device is managed or not
- (nm_device_deactivate, nm_device_bring_up, nm_device_bring_down):
don't set device state here, let callers handle that as appropriate
- (nm_device_dispose): don't touch the device if it's not managed
- (set_property, get_property, nm_device_class_init): implement the
'managed' property
- (nm_device_state_changed): bring the device up if its now managed,
and deactivate it if it used to be active
- (nm_device_get_managed, nm_device_set_managed): do the right thing
with the managed state
* src/nm-hal-manager.c
- (wired_device_creator, wireless_device_creator, modem_device_creator):
take initial managed state and pass it along to device constructors
- (create_device_and_add_to_list): get managed state and pass to
type creators
* src/nm-device-802-11-wireless.c
- (real_can_activate): fold in most of
nm_device_802_11_wireless_can_activate()
- (can_scan): can't scan in UNAVAILABLE or UNMANAGED
- (link_timeout_cb): instead of deactivating, change device state and
let the device state handler to it
- (real_update_hw_address): clean up
- (state_changed_cb): when entering UNAVAILABLE state, schedule an idle
handler to transition to DISCONNECTED if the device isn't rfkilled
* src/nm-device-802-3-ethernet.c
- (set_carrier): move above callers and get rid of prototype
- (device_state_changed): when entering UNAVAILABLE state, schedule an
idle handler to transition to DISCONNECTED if the device has a
carrier
- (real_update_hw_address): clean up
- (link_timeout_cb, ppp_state_changed): change state instead of calling
deactivation directly as deactivation doesn't change state anymore
* src/NetworkManagerPolicy.c
- (schedule_activate_check): yay, remove wireless_enabled hack since
the NMManager and wireless devices work that out themselves now
- (device_state_changed): change to a switch and update for new device
states
- (device_carrier_changed): remove; device handles this now through
state changes
- (device_added): don't care about carrier any more; the initial
activation check will happen when the device transitions to
DISCONNECTED
* src/nm-manager.c
- (dispose): clear unmanaged devices
- (handle_unmanaged_devices): update unmanaged device list and toggle
the managed property on each device when needed
- (system_settings_properties_changed_cb): handle signals from the
system settings service
- (system_settings_get_unmanaged_devices_cb): handle callback from
getting the unmanaged device list method call
- (query_unmanaged_devices): ask the system settings service for its
list of unmanaged devices
- (nm_manager_name_owner_changed, initial_get_connections): get unmanaged
devices
- (manager_set_wireless_enabled): push rfkill state down to wireless
devices directly and let them handle the necessary state transitions
- (manager_device_state_changed): update for new device states
- (nm_manager_add_device): set initial rfkill state on wireless devices
- (nm_manager_remove_device): don't touch the device if it's unmanaged
- (nm_manager_activate_connection): return error if the device is
unmanaged
- (nm_manager_sleep): handle new device states correctly; don't change
the state of unavailable/unmanaged devices
* libnm-glib/nm-device-802-11-wireless.c
- (state_changed_cb): update for new device states
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3540 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-08 02:58:02 +00:00
|
|
|
|
|
|
|
|
/* Indicate states in device activation.
|
|
|
|
|
*
|
|
|
|
|
* Allowed next states:
|
|
|
|
|
* UNMANAGED: the device is no longer managed by NetworkManager
|
|
|
|
|
* UNAVAILABLE: the device is no longer ready for use (rfkill, no carrier, etc)
|
|
|
|
|
* FAILED: an error ocurred during activation
|
|
|
|
|
* NEED_AUTH: authentication/secrets are needed
|
|
|
|
|
* ACTIVATED: (IP_CONFIG only) activation was successful
|
|
|
|
|
* DISCONNECTED: the device's connection is no longer valid, or NetworkManager went to sleep
|
|
|
|
|
*/
|
2009-09-09 07:11:29 -07:00
|
|
|
NM_DEVICE_STATE_PREPARE = 4,
|
|
|
|
|
NM_DEVICE_STATE_CONFIG = 5,
|
|
|
|
|
NM_DEVICE_STATE_NEED_AUTH = 6,
|
|
|
|
|
NM_DEVICE_STATE_IP_CONFIG = 7,
|
2008-04-07 Dan Williams <dcbw@redhat.com>
* include/NetworkManager.h
- Remove the DOWN and CANCELLED device states
- Add UNMANAGED and UNAVAILABLE device states
- Document the device states
* introspection/nm-device.xml
src/nm-device-interface.c
src/nm-device-interface.h
- Add the 'managed' property
* test/nm-tool.c
- (detail_device): print out device state
* src/NetworkManagerSystem.h
src/backends/NetworkManagerArch.c
src/backends/NetworkManagerDebian.c
src/backends/NetworkManagerFrugalware.c
src/backends/NetworkManagerGentoo.c
src/backends/NetworkManagerMandriva.c
src/backends/NetworkManagerPaldo.c
src/backends/NetworkManagerRedHat.c
src/backends/NetworkManagerSlackware.c
src/backends/NetworkManagerSuSE.c
- (nm_system_device_get_system_config, nm_system_device_get_disabled
nm_system_device_free_system_config): remove; they were unused and
their functionality should be re-implemented in each distro's
system settings service plugin
* src/nm-gsm-device.c
src/nm-gsm-device.h
src/nm-cdma-device.c
src/nm-cdma-device.h
- (*_new): take the 'managed' argument
* src/nm-device.c
- (nm_device_set_address): remove, fold into nm_device_bring_up()
- (nm_device_init): start in unmanaged state, not disconnected
- (constructor): don't start device until the system settings service
has had a chance to figure out if the device is managed or not
- (nm_device_deactivate, nm_device_bring_up, nm_device_bring_down):
don't set device state here, let callers handle that as appropriate
- (nm_device_dispose): don't touch the device if it's not managed
- (set_property, get_property, nm_device_class_init): implement the
'managed' property
- (nm_device_state_changed): bring the device up if its now managed,
and deactivate it if it used to be active
- (nm_device_get_managed, nm_device_set_managed): do the right thing
with the managed state
* src/nm-hal-manager.c
- (wired_device_creator, wireless_device_creator, modem_device_creator):
take initial managed state and pass it along to device constructors
- (create_device_and_add_to_list): get managed state and pass to
type creators
* src/nm-device-802-11-wireless.c
- (real_can_activate): fold in most of
nm_device_802_11_wireless_can_activate()
- (can_scan): can't scan in UNAVAILABLE or UNMANAGED
- (link_timeout_cb): instead of deactivating, change device state and
let the device state handler to it
- (real_update_hw_address): clean up
- (state_changed_cb): when entering UNAVAILABLE state, schedule an idle
handler to transition to DISCONNECTED if the device isn't rfkilled
* src/nm-device-802-3-ethernet.c
- (set_carrier): move above callers and get rid of prototype
- (device_state_changed): when entering UNAVAILABLE state, schedule an
idle handler to transition to DISCONNECTED if the device has a
carrier
- (real_update_hw_address): clean up
- (link_timeout_cb, ppp_state_changed): change state instead of calling
deactivation directly as deactivation doesn't change state anymore
* src/NetworkManagerPolicy.c
- (schedule_activate_check): yay, remove wireless_enabled hack since
the NMManager and wireless devices work that out themselves now
- (device_state_changed): change to a switch and update for new device
states
- (device_carrier_changed): remove; device handles this now through
state changes
- (device_added): don't care about carrier any more; the initial
activation check will happen when the device transitions to
DISCONNECTED
* src/nm-manager.c
- (dispose): clear unmanaged devices
- (handle_unmanaged_devices): update unmanaged device list and toggle
the managed property on each device when needed
- (system_settings_properties_changed_cb): handle signals from the
system settings service
- (system_settings_get_unmanaged_devices_cb): handle callback from
getting the unmanaged device list method call
- (query_unmanaged_devices): ask the system settings service for its
list of unmanaged devices
- (nm_manager_name_owner_changed, initial_get_connections): get unmanaged
devices
- (manager_set_wireless_enabled): push rfkill state down to wireless
devices directly and let them handle the necessary state transitions
- (manager_device_state_changed): update for new device states
- (nm_manager_add_device): set initial rfkill state on wireless devices
- (nm_manager_remove_device): don't touch the device if it's unmanaged
- (nm_manager_activate_connection): return error if the device is
unmanaged
- (nm_manager_sleep): handle new device states correctly; don't change
the state of unavailable/unmanaged devices
* libnm-glib/nm-device-802-11-wireless.c
- (state_changed_cb): update for new device states
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3540 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-08 02:58:02 +00:00
|
|
|
|
|
|
|
|
/* Indicates the device is part of an active network connection.
|
|
|
|
|
*
|
|
|
|
|
* Allowed next states:
|
|
|
|
|
* UNMANAGED: the device is no longer managed by NetworkManager
|
|
|
|
|
* UNAVAILABLE: the device is no longer ready for use (rfkill, no carrier, etc)
|
|
|
|
|
* FAILED: a DHCP lease was not renewed, or another error
|
|
|
|
|
* DISCONNECTED: the device's connection is no longer valid, or NetworkManager went to sleep
|
|
|
|
|
*/
|
2009-09-09 07:11:29 -07:00
|
|
|
NM_DEVICE_STATE_ACTIVATED = 8,
|
2008-04-07 Dan Williams <dcbw@redhat.com>
* include/NetworkManager.h
- Remove the DOWN and CANCELLED device states
- Add UNMANAGED and UNAVAILABLE device states
- Document the device states
* introspection/nm-device.xml
src/nm-device-interface.c
src/nm-device-interface.h
- Add the 'managed' property
* test/nm-tool.c
- (detail_device): print out device state
* src/NetworkManagerSystem.h
src/backends/NetworkManagerArch.c
src/backends/NetworkManagerDebian.c
src/backends/NetworkManagerFrugalware.c
src/backends/NetworkManagerGentoo.c
src/backends/NetworkManagerMandriva.c
src/backends/NetworkManagerPaldo.c
src/backends/NetworkManagerRedHat.c
src/backends/NetworkManagerSlackware.c
src/backends/NetworkManagerSuSE.c
- (nm_system_device_get_system_config, nm_system_device_get_disabled
nm_system_device_free_system_config): remove; they were unused and
their functionality should be re-implemented in each distro's
system settings service plugin
* src/nm-gsm-device.c
src/nm-gsm-device.h
src/nm-cdma-device.c
src/nm-cdma-device.h
- (*_new): take the 'managed' argument
* src/nm-device.c
- (nm_device_set_address): remove, fold into nm_device_bring_up()
- (nm_device_init): start in unmanaged state, not disconnected
- (constructor): don't start device until the system settings service
has had a chance to figure out if the device is managed or not
- (nm_device_deactivate, nm_device_bring_up, nm_device_bring_down):
don't set device state here, let callers handle that as appropriate
- (nm_device_dispose): don't touch the device if it's not managed
- (set_property, get_property, nm_device_class_init): implement the
'managed' property
- (nm_device_state_changed): bring the device up if its now managed,
and deactivate it if it used to be active
- (nm_device_get_managed, nm_device_set_managed): do the right thing
with the managed state
* src/nm-hal-manager.c
- (wired_device_creator, wireless_device_creator, modem_device_creator):
take initial managed state and pass it along to device constructors
- (create_device_and_add_to_list): get managed state and pass to
type creators
* src/nm-device-802-11-wireless.c
- (real_can_activate): fold in most of
nm_device_802_11_wireless_can_activate()
- (can_scan): can't scan in UNAVAILABLE or UNMANAGED
- (link_timeout_cb): instead of deactivating, change device state and
let the device state handler to it
- (real_update_hw_address): clean up
- (state_changed_cb): when entering UNAVAILABLE state, schedule an idle
handler to transition to DISCONNECTED if the device isn't rfkilled
* src/nm-device-802-3-ethernet.c
- (set_carrier): move above callers and get rid of prototype
- (device_state_changed): when entering UNAVAILABLE state, schedule an
idle handler to transition to DISCONNECTED if the device has a
carrier
- (real_update_hw_address): clean up
- (link_timeout_cb, ppp_state_changed): change state instead of calling
deactivation directly as deactivation doesn't change state anymore
* src/NetworkManagerPolicy.c
- (schedule_activate_check): yay, remove wireless_enabled hack since
the NMManager and wireless devices work that out themselves now
- (device_state_changed): change to a switch and update for new device
states
- (device_carrier_changed): remove; device handles this now through
state changes
- (device_added): don't care about carrier any more; the initial
activation check will happen when the device transitions to
DISCONNECTED
* src/nm-manager.c
- (dispose): clear unmanaged devices
- (handle_unmanaged_devices): update unmanaged device list and toggle
the managed property on each device when needed
- (system_settings_properties_changed_cb): handle signals from the
system settings service
- (system_settings_get_unmanaged_devices_cb): handle callback from
getting the unmanaged device list method call
- (query_unmanaged_devices): ask the system settings service for its
list of unmanaged devices
- (nm_manager_name_owner_changed, initial_get_connections): get unmanaged
devices
- (manager_set_wireless_enabled): push rfkill state down to wireless
devices directly and let them handle the necessary state transitions
- (manager_device_state_changed): update for new device states
- (nm_manager_add_device): set initial rfkill state on wireless devices
- (nm_manager_remove_device): don't touch the device if it's unmanaged
- (nm_manager_activate_connection): return error if the device is
unmanaged
- (nm_manager_sleep): handle new device states correctly; don't change
the state of unavailable/unmanaged devices
* libnm-glib/nm-device-802-11-wireless.c
- (state_changed_cb): update for new device states
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3540 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-08 02:58:02 +00:00
|
|
|
|
|
|
|
|
/* Indicates the device's activation failed.
|
|
|
|
|
*
|
|
|
|
|
* Allowed next states:
|
|
|
|
|
* UNMANAGED: the device is no longer managed by NetworkManager
|
|
|
|
|
* UNAVAILABLE: the device is no longer ready for use (rfkill, no carrier, etc)
|
|
|
|
|
* DISCONNECTED: the device's connection is ready for activation, or NetworkManager went to sleep
|
|
|
|
|
*/
|
2009-09-09 07:11:29 -07:00
|
|
|
NM_DEVICE_STATE_FAILED = 9
|
2007-02-05 12:14:09 +00:00
|
|
|
} NMDeviceState;
|
|
|
|
|
|
|
|
|
|
|
2008-07-11 10:28:53 +00:00
|
|
|
/*
|
|
|
|
|
* Device state change reason codes
|
|
|
|
|
*/
|
|
|
|
|
typedef enum {
|
|
|
|
|
/* No reason given */
|
|
|
|
|
NM_DEVICE_STATE_REASON_NONE = 0,
|
|
|
|
|
|
|
|
|
|
/* Unknown error */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_UNKNOWN = 1,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
|
|
|
|
/* Device is now managed */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_NOW_MANAGED = 2,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
2010-09-03 14:15:41 +02:00
|
|
|
/* Device is now unmanaged */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_NOW_UNMANAGED = 3,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
|
|
|
|
/* The device could not be readied for configuration */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_CONFIG_FAILED = 4,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
|
|
|
|
/* IP configuration could not be reserved (no available address, timeout, etc) */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE = 5,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
|
|
|
|
/* The IP config is no longer valid */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED = 6,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
|
|
|
|
/* Secrets were required, but not provided */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_NO_SECRETS = 7,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
|
|
|
|
/* 802.1x supplicant disconnected */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT = 8,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
|
|
|
|
/* 802.1x supplicant configuration failed */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED = 9,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
|
|
|
|
/* 802.1x supplicant failed */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED = 10,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
|
|
|
|
/* 802.1x supplicant took too long to authenticate */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_SUPPLICANT_TIMEOUT = 11,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
|
|
|
|
/* PPP service failed to start */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_PPP_START_FAILED = 12,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
|
|
|
|
/* PPP service disconnected */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_PPP_DISCONNECT = 13,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
|
|
|
|
/* PPP failed */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_PPP_FAILED = 14,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
|
|
|
|
/* DHCP client failed to start */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_DHCP_START_FAILED = 15,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
|
|
|
|
/* DHCP client error */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_DHCP_ERROR = 16,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
|
|
|
|
/* DHCP client failed */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_DHCP_FAILED = 17,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
|
|
|
|
/* Shared connection service failed to start */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_SHARED_START_FAILED = 18,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
2008-07-17 15:17:25 +00:00
|
|
|
/* Shared connection service failed */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_SHARED_FAILED = 19,
|
2008-07-17 15:17:25 +00:00
|
|
|
|
2008-07-11 10:28:53 +00:00
|
|
|
/* AutoIP service failed to start */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_AUTOIP_START_FAILED = 20,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
|
|
|
|
/* AutoIP service error */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_AUTOIP_ERROR = 21,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
|
|
|
|
/* AutoIP service failed */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_AUTOIP_FAILED = 22,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
|
|
|
|
/* The line is busy */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_MODEM_BUSY = 23,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
|
|
|
|
/* No dial tone */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_MODEM_NO_DIAL_TONE = 24,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
|
|
|
|
/* No carrier could be established */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER = 25,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
|
|
|
|
/* The dialing request timed out */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_MODEM_DIAL_TIMEOUT = 26,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
|
|
|
|
/* The dialing attempt failed */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_MODEM_DIAL_FAILED = 27,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
|
|
|
|
/* Modem initialization failed */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED = 28,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
|
|
|
|
/* Failed to select the specified APN */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_GSM_APN_FAILED = 29,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
2008-08-17 23:41:41 +00:00
|
|
|
/* Not searching for networks */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_GSM_REGISTRATION_NOT_SEARCHING = 30,
|
2008-08-17 23:41:41 +00:00
|
|
|
|
|
|
|
|
/* Network registration denied */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_GSM_REGISTRATION_DENIED = 31,
|
2008-08-17 23:41:41 +00:00
|
|
|
|
|
|
|
|
/* Network registration timed out */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_GSM_REGISTRATION_TIMEOUT = 32,
|
2008-08-17 23:41:41 +00:00
|
|
|
|
2008-07-11 10:28:53 +00:00
|
|
|
/* Failed to register with the requested network */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_GSM_REGISTRATION_FAILED = 33,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
|
|
|
|
/* PIN check failed */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_GSM_PIN_CHECK_FAILED = 34,
|
2008-07-11 10:28:53 +00:00
|
|
|
|
2008-08-18 18:29:47 +00:00
|
|
|
/* Necessary firmware for the device may be missing */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_FIRMWARE_MISSING = 35,
|
2008-08-18 18:29:47 +00:00
|
|
|
|
2008-10-11 19:57:45 +00:00
|
|
|
/* The device was removed */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_REMOVED = 36,
|
2008-10-11 19:57:45 +00:00
|
|
|
|
|
|
|
|
/* NetworkManager went to sleep */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_SLEEPING = 37,
|
2008-10-11 19:57:45 +00:00
|
|
|
|
|
|
|
|
/* The device's active connection disappeared */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_CONNECTION_REMOVED = 38,
|
2008-10-11 19:57:45 +00:00
|
|
|
|
|
|
|
|
/* Device disconnected by user or client */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_USER_REQUESTED = 39,
|
2008-10-11 19:57:45 +00:00
|
|
|
|
2008-10-22 13:35:07 +00:00
|
|
|
/* Carrier/link changed */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_CARRIER = 40,
|
2008-10-22 13:35:07 +00:00
|
|
|
|
2009-08-05 18:03:09 -04:00
|
|
|
/* The device's existing connection was assumed */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED = 41,
|
2009-08-05 18:03:09 -04:00
|
|
|
|
2009-09-14 13:24:29 -07:00
|
|
|
/* The supplicant is now available */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE = 42,
|
2009-09-14 13:24:29 -07:00
|
|
|
|
2010-01-28 11:21:53 -08:00
|
|
|
/* The modem could not be found */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_MODEM_NOT_FOUND = 43,
|
2010-01-28 11:21:53 -08:00
|
|
|
|
2010-03-23 23:07:17 -07:00
|
|
|
/* The Bluetooth connection failed or timed out */
|
2010-03-23 23:13:49 -07:00
|
|
|
NM_DEVICE_STATE_REASON_BT_FAILED = 44,
|
2010-03-23 23:07:17 -07:00
|
|
|
|
2008-07-11 10:28:53 +00:00
|
|
|
/* Unused */
|
|
|
|
|
NM_DEVICE_STATE_REASON_LAST = 0xFFFF
|
|
|
|
|
} NMDeviceStateReason;
|
|
|
|
|
|
|
|
|
|
|
2008-04-22 00:28:02 +00:00
|
|
|
typedef enum {
|
|
|
|
|
NM_ACTIVE_CONNECTION_STATE_UNKNOWN = 0,
|
|
|
|
|
|
|
|
|
|
/* Indicates the connection is activating */
|
|
|
|
|
NM_ACTIVE_CONNECTION_STATE_ACTIVATING,
|
|
|
|
|
|
|
|
|
|
/* Indicates the connection is currently active */
|
2008-05-13 16:57:01 +00:00
|
|
|
NM_ACTIVE_CONNECTION_STATE_ACTIVATED
|
2008-04-22 00:28:02 +00:00
|
|
|
} NMActiveConnectionState;
|
|
|
|
|
|
2007-02-05 12:14:09 +00:00
|
|
|
#endif /* NETWORK_MANAGER_H */
|
2008-03-19 20:58:21 +00:00
|
|
|
|