
Tighten up handling of wireless devices that don't support wireless scanning (ie, Orinoco). Due to restructuring of code, these devices hadn't been doing pseudo-scanning for a while either and would just spin waiting for an access point. They are now manual devices where the user must choose the access point from the menu every time. All "allowed" access points are listed in the applet's menu regardless of whether or not they can be seen by the card, since it can't scan anyway. * src/NetworkManager.c - (nm_wireless_link_state_handle): new function, but only update the "best" ap for non-scanning devices when its not activating, and when no device is being forced on the card - (nm_link_state_monitor): split wireless link state handling out into separate function * src/NetworkManagerDevice.c - (nm_device_copy_allowed_to_dev_list): new function - (nm_device_new): populate non-scanning cards' AP lists with access points from the "allowed" list - (nm_device_new): don't start a scanning timeout for devices that can't scan - (nm_device_activation_schedule_finish): new parameter, should be the AP that failed to be connected to, pass it on to the activation finish function in NetworkManagerPolicy.c - (nm_device_activate_wireless): don't ever try to get a new AP for non-scanning devices, just fail. The user must choose a new access point manually. - (nm_device_activate): grab the AP that failed connection and pass it on - (nm_device_update_best_ap): Clear the best AP if we don't have a link to it, user must manually choose a new one - (nm_device_do_pseudo_scan): remove function - (nm_device_wireless_process_scan_results): remove bits for non- scanning cards since they never get here - (nm_device_wireless_scan): remove bits for non-scanning devices, and fake the scan list for test devices a bit earlier * src/NetworkManagerPolicy.c - (nm_policy_activation_finish): use the failed_ap that we get passed rather than getting the best_ap from the card, which may have changed since we were scheduled - (nm_policy_allowed_ap_list_update): for non-scanning devices, update their scan list directly from the allowed list when we get updates to the allowed list from NetworkManagerInfo * src/NetworkManagerPolicy.h - New member for failed access point in NMActivationResult ------------------------------------- Driver Notification patch: notifies the user when their driver sucks. Gives them the option to ignore further insertions of the card that has the sucky driver. * NetworkManager.h - Remove the SEMI_SUPPORTED member from the NMDriverSupportLevel enum and replace it with NO_CARRIER_DETECT and NO_WIRELESS_SCAN * panel-applet/NMWirelessApplet.[ch] - Merge essid.glade -> wireless-applet.glade - Implement the "Your driver sucks" notification dialog * panel-applet/NMWirelessAppletDbus.c - Change stuff from getSupportsCarrierDetect->getDriverSupportLevel - Grab hardware address for each device from NM too - Check whether the driver for each device sucks or not whenever a new device is noticed * panel-applet/NMWirelessAppletOtherNetworkDialog.c - Deal with stuff being in wireless-applet.glade now rather than essid.glade * src/NetworkManager.c - Fix a double-unref on device removal * src/NetworkManagerUtils.c - Set appropriate driver support level on a device that doesn't support scanning or carrier detection * src/nm-dbus-device.c - New "getHWAddress" dbus method on devices - getSupportsCarrierDetect -> getDriverSupportLevel git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@534 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
139 lines
3.3 KiB
C
139 lines
3.3 KiB
C
/* 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.
|
|
*
|
|
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*
|
|
* (C) Copyright 2004 Red Hat, Inc.
|
|
*/
|
|
|
|
#ifndef NETWORK_MANAGER_H
|
|
#define NETWORK_MANAGER_H
|
|
|
|
/*
|
|
* dbus services details
|
|
*/
|
|
#define NM_DBUS_SERVICE "org.freedesktop.NetworkManager"
|
|
|
|
#define NM_DBUS_PATH "/org/freedesktop/NetworkManager"
|
|
#define NM_DBUS_INTERFACE "org.freedesktop.NetworkManager"
|
|
#define NM_DBUS_PATH_DEVICES "/org/freedesktop/NetworkManager/Devices"
|
|
#define NM_DBUS_INTERFACE_DEVICES "org.freedesktop.NetworkManager.Devices"
|
|
#define NM_DBUS_PATH_DHCP "/org/freedesktop/NetworkManager/DhcpOptions"
|
|
#define NM_DBUS_INTERFACE_DHCP "org.freedesktop.NetworkManager.DhcpOptions"
|
|
|
|
#define NMI_DBUS_SERVICE "org.freedesktop.NetworkManagerInfo"
|
|
#define NMI_DBUS_PATH "/org/freedesktop/NetworkManagerInfo"
|
|
#define NMI_DBUS_INTERFACE "org.freedesktop.NetworkManagerInfo"
|
|
|
|
|
|
/*
|
|
* Some common errors
|
|
*/
|
|
#define NM_DBUS_NO_ACTIVE_NET_ERROR "org.freedesktop.NetworkManager.NoActiveNetwork"
|
|
#define NM_DBUS_NO_ACTIVE_DEVICE_ERROR "org.freedesktop.NetworkManager.NoActiveDevice"
|
|
#define NM_DBUS_NO_NETWORKS_ERROR "org.freedesktop.NetworkManager.NoNetworks"
|
|
|
|
|
|
/*
|
|
* Types of NetworkManager devices
|
|
*/
|
|
typedef enum NMDeviceType
|
|
{
|
|
DEVICE_TYPE_DONT_KNOW = 0,
|
|
DEVICE_TYPE_WIRED_ETHERNET,
|
|
DEVICE_TYPE_WIRELESS_ETHERNET
|
|
} NMDeviceType;
|
|
|
|
|
|
/*
|
|
* Encryption key types
|
|
*/
|
|
typedef enum NMEncKeyType
|
|
{
|
|
NM_ENC_TYPE_UNKNOWN = 0,
|
|
NM_ENC_TYPE_NONE,
|
|
NM_ENC_TYPE_HEX_KEY,
|
|
NM_ENC_TYPE_ASCII_KEY,
|
|
NM_ENC_TYPE_128_BIT_PASSPHRASE
|
|
/* FIXME: WPA and 802.1x support */
|
|
} NMEncKeyType;
|
|
|
|
|
|
/*
|
|
* Driver support levels
|
|
*/
|
|
typedef enum NMDriverSupportLevel
|
|
{
|
|
NM_DRIVER_UNSUPPORTED = 0,
|
|
NM_DRIVER_NO_CARRIER_DETECT,
|
|
NM_DRIVER_NO_WIRELESS_SCAN,
|
|
NM_DRIVER_FULLY_SUPPORTED
|
|
} NMDriverSupportLevel;
|
|
|
|
|
|
/*
|
|
* Wireless network modes
|
|
*/
|
|
typedef enum NMNetworkMode
|
|
{
|
|
NETWORK_MODE_UNKNOWN = 0,
|
|
NETWORK_MODE_INFRA,
|
|
NETWORK_MODE_ADHOC
|
|
} NMNetworkMode;
|
|
|
|
|
|
/*
|
|
* Wireless network update types
|
|
*/
|
|
typedef enum
|
|
{
|
|
NETWORK_STATUS_DISAPPEARED = 0,
|
|
NETWORK_STATUS_APPEARED,
|
|
NETWORK_STATUS_STRENGTH_CHANGED
|
|
} NMNetworkStatus;
|
|
|
|
|
|
/*
|
|
* Wireless network types
|
|
*/
|
|
typedef enum NMNetworkType
|
|
{
|
|
NETWORK_TYPE_UNKNOWN = 0,
|
|
NETWORK_TYPE_ALLOWED,
|
|
NETWORK_TYPE_INVALID,
|
|
NETWORK_TYPE_DEVICE
|
|
} NMNetworkType;
|
|
|
|
|
|
/*
|
|
* Authentication modes
|
|
*/
|
|
typedef enum NMDeviceAuthMethod
|
|
{
|
|
NM_DEVICE_AUTH_METHOD_UNKNOWN = 0,
|
|
NM_DEVICE_AUTH_METHOD_NONE,
|
|
NM_DEVICE_AUTH_METHOD_OPEN_SYSTEM,
|
|
NM_DEVICE_AUTH_METHOD_SHARED_KEY
|
|
} NMDeviceAuthMethod;
|
|
|
|
|
|
/*
|
|
* Info-daemon specific preference locations
|
|
*/
|
|
#define NMI_GCONF_WIRELESS_NETWORKS_PATH "/system/networking/wireless/networks"
|
|
|
|
#endif
|