* Remove 'debug' extern global from all files since we now
use syslog()
* src/NetworkManager.[ch]
- Break out routine that get the net.interface property from HAL,
removing that logic from nm_create_device_and_add_to_list()
- (nm_create_device_and_add_to_list): make this a bit more general so
it doesn't do the talking to HAL. Also add arguments to facilitate
the create of test devices.
- (nm_data_mark_state_changed): rename from nm_data_set_state_modified()
- (nm_data_new, main, nm_print_usage): add new argument "--enable-test-devices"
which makes NetworkManager listen for dbus commands to create test
devices, which have no backing hardware. Use when you're on a plane
for example, and/or forgot your wireless card at home. Test devices
_cannot_ be created unless NM is started with --enable-test-devices.
* src/NetworkManagerDbus.[ch]
- New "getLinkActive" method for devices
- New "setLinkActive" method for devices (only works on test devices)
- New "createTestDevice" method on NetworkManager object to create a test
device of a specified type (ie wired, wireless). UDI is created from
scratch, as is the interface name. Only works when NM is started with
--enable-test-devices switch.
- New "removeTestDevice" method on NetworkManager object which removes a
test device. Only works when NM is started with --enable-test-devices
* src/NetworkManagerDevice.[ch]
- Logic to facilitate test devices. Add variables to NMDevice struct to indicate
whether a device is a test device or not, and what its link status is.
- Deal with test devices in most functions. For those that work directly on hardware
special-case test devices.
- (nm_device_new): don't create a test device if test devices weren't enabled on the
command-line.
- (nm_device_update_link_active): split out logic for wired and wireless device link
checking to separate functions to facilitate test device link checking.
- (nm_device_set_enc_key): Since some drivers for wireless cards are daft and
don't make a distinction between System Authentication and Encryption
(namely Cisco aironet), we use Open System auth when setting a WEP key
on the card. We don't deal with Shared Key auth yet.
- (nm_device_activation_worker): split the activation cancel check logic out into
a separate routine nm_device_activation_cancel_if_needed()
- (nm_device_activation_signal_cancel): rename from nm_device_activation_cancel()
- (nm_device_fake_ap_list): Test wireless devices obviously cannot scan, so create
a list of fake access points that they can "see"
- (nm_device_is_test_device): return whether or not a device is a test device
* src/NetworkManagerPolicy.c
- (nm_policy_get_best_device): attempt to deal with wireless network selection,
previously if you "locked"/forced NM to use a wireless device but then
selected a wireless network for NM to use, it would switch to a wired device.
So, if the active device is wireless and it has a "forced" best AP, use it
if the "forced" best AP is still valid
- (nm_state_modification_monitor): deal with NULL best devices, for example
there were no usable network devices, or the last one was removed
* src/backends/NetworkManager*.c
- Deal with test devices, mostly just return success for operations like getting
a DHCP address
* test/nmtestdevices.c
- Test tool to create/remove/link-switch test devices
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@112 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* examples/python/NetworkManager.py:
added convience functions has_wired_device and has_wireless_device
* examples/python/systray/network_tray.py:
cleaned up a bunch of cruft, added support for listing wireless
networks just like the real applet. This is probably all I'm
going to work on this applet from now on.
TODO: add support for actually changing networks and devices
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@111 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* examples/python/NetworkManager.py (NetworkManager.get_device):
changed "nm.networks" into a dict from a list so I can store all
the cool information about networks in there
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@109 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* examples/python/NetworkManager.py:
Bug fixes to the code so we get all the device information
that we need in get_device()
* examples/python/NMTester.py:
Fixed _print_device_list to print_device_list
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@107 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerDbus.c (nm_dbus_get_network_timestamp): Return
a GTimeVal instead of time_t. This is easier to work with,
since time_t may be a long or double, we don't know.
* src/NetworkManagerDbus.h: Update prototype.
* src/NetworkManagerAP.c (struct NMAccessPoint): Store a GTimeVal
instead of time_t.
(nm_ap_get_timestamp): Update to return GTimeVal.
(nm_ap_set_timestamp): Update to take GTimeVal.
* src/NetworkManagerDevice.c (nm_device_update_best_ap): Update
to handle GTimeVal.
* src/NetworkManagerAPList.c (nm_ap_list_update_network): Handle
GTimeVal change.
(nm_ap_list_print_members): Fix warnings in printf format.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@104 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerDbus.c (nm_dbus_get_network_timestamp): Return
a GTimeVal instead of time_t. This is easier to work with,
since time_t may be a long or double, we don't know.
* src/NetworkManagerDbus.h: Update prototype.
* src/NetworkManagerAP.c (struct NMAccessPoint): Store a GTimeVal
instead of time_t.
(nm_ap_get_timestamp): Update to return GTimeVal.
(nm_ap_set_timestamp): Update to take GTimeVal.
* src/NetworkManagerAPList.c (nm_ap_list_update_network): Handle
GTimeVal change.
(nm_ap_list_print_members): Fix warnings in printf format.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@103 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* configure.in: Generate config.h.
* configure.in: Dump dependency on OpenSSL; we can't
use it since this package is GPL:
http://www.gnome.org/~markmc/openssl-and-the-gpl.html
Instead, check for libgcrypt, use it if available,
otherwise use included MD5 code.
* src/gnome-keyring-md5.h, src/gnome-keyring-md5.c:
Suck in from gnome-keyring, munge a bit.
* src/Makefile.am (NetworkManager_SOURCES) <!WITH_GCRYPT>: Include
gnome-keyring-md5.h gnome-keyring-md5.c.
(NetworkManager_LDADD) <WITH_GCRYPT>: Add dep on LIBGCRYPT_LIBS.
* src/NetworkManagerWireless.c (nm_md5): New function, uses
libgcrypt or included gnome-keyring md5 bits.
(nm_wireless_128bit_key_from_passphrase): Use nm_md5.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@101 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* panel-applet/NMWirelessApplet.c
- Make current device bold
- Show more user-friendly device name if we got one from hal
* panel-applet/NMWirelessAppletDbus.c
- Grab "info.product" key from hal for network devices
- Cache the current active device
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@92 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* panel-applet/NMWirelessApplet.c
- Remove debugging code
- Enable device switching from menus
* panel-applet/NMWirelessAppletDbus.[ch]
- Method for asking NM to switch devices
* src/NetworkManagerDevice.c
- Set dev->activating earlier, avoids race between
the dbus signal of "DeviceActivating" and setting
dev->activating (which is what NM's "status" method call
looks at)
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@83 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* panel-applet/NMWirelessApplet.[ch]
- Rework menu code to add devices to menu, and to show
signal strength for each access point. Code cleanups
too.
* panel-applet/NMWirelessAppletDbus.c
- Grab network devices from NetworkManager too
- Grab quality information from NM for wireless networks
* src/NetworkManagerDbus.[ch]
- Add dbus methods for getting the HAL UDI from a device and
for getting its base quality, if its wireless
- Consolidate some functions (wireless network notifications,
device notifications)
- Add method for requesting NM to use a particular device
* src/NetworkManager.c
- Change for function consolidations from NetworkManagerDbus.c
- Implement active device locking and user-requested devices
(ie, tell NM to use a particular device instead of the one
it autochose)
* src/NetworkManagerDevice.c
- Add method for getting the base quality of a device, if its
wireless
- Grab device base quailty info from iwlib during scans
* src/NetworkManagerPolicy.c
- Use a user-requested device rather than the auto-chosen device
if we are told to
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@81 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
(nmwa_menu_item_activate), (nmwa_toplevel_menu_activate),
(nmwa_add_menu_item), (nmwa_menu_item_data_free),
(nmwa_dispose_menu_items), (nmwa_populate_menu),
(nmwa_setup_widgets), (do_not_eat_button_press), (nmwa_new):
* panel-applet/NMWirelessApplet.h:
Use a menu bar instead of a button for the main clickable
thingy.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@79 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerDevice.c
- (nm_device_set_enc_key): always set device to "open" mode instead of
turning encryption off, because the Cisco driver doesn't associate
with WEP-enabled access points unless we are in "open"
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@78 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* panel-applet/NMWirelessApplet.c
- (nmwa_udpate_state): Set panel icon to "wired" (for lack of better ones)
when NM isn't around or when its not connected
* src/NetworkManagerDevice.c
- (nm_device_activation_worker): Make sure to reset dev->activating if we get
canceled.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@73 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* panel-applet/NMWirelessAppletDbus.c
- (nmwa_dbus_get_bool, nmwa_dbus_get_network_encrypted): correct method name
for getting encryption, and don't stop on "val" once we've gotten it
from NetworkManager. Short form: encryption should now show up.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@72 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* panel-applet/NMWirelessApplet.c
- Set ESSID on a gconf trusted network too when force-setting the wireless
network to associate with
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@71 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerAP.[ch]
- Add a "enc_method_good" member and accessors to an Access Point
to signal when we've found the correct encryption method
for an access point
- Add a "timestamp" member and accessors, remove "priority" member
and accessors (use timestamps instead)
- Rename "wep_key"->"enc_key"
- (nm_ap_get_enc_key_hashed): new, return the correct mangled key
for a specified encryption method using the access points
source encryption key/passphrase
* src/NetworkManagerAPList.c
- When updating a network with dbus, grab timestamp now instead of
priority
* src/NetworkManagerDBus.[ch]
- Add signal for "DeviceActivating"
- Switch priority->timestamp
* src/NetworkManagerDevice.c
- Change references of "wep_key" -> "enc_key" or "key"
- Signal DeviceActivating when starting activation
- When activating a wireless device, if the access point we are connecting
to is encrypted, and we have a source key, try to generate a mangled
key and use that (ie, generate real WEP key from a passphrase)
- Rework device activation to fallback to other encryption methods if
a previous one didn't work (ie, try mangling a key as a 104-bit passphrase
first, then if that doesn't work fall back to direct hex key).
- (nm_device_update_best_ap): fix a deadlock, and use timestamps instead of
priority. We now prefer the latest access point used, rather than using
a priority scheme
- (nm_device_do_normal_scan): make the encryption method "unknown" on access
points we've just discovered, and merge in correct info from the global
access point lists
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@68 4912f4e0-d625-0410-9fb7-b9a5a253dbdc