Commit graph

1076 commits

Author SHA1 Message Date
Dan Williams
c190818f37 2007-03-07 Dan Williams <dcbw@redhat.com>
Patch from Simon Geard <delgarde@ihug.co.nz>  (Gnome.org #394956)
	* src/nm-ap-security-wpa-psk.c
		- (real_write_supplicant_config): work with PSKs that may contain
			zeros in the binary format rather than treating it as a string



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2445 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-03-07 20:40:21 +00:00
Tambet Ingo
96c246cfc4 2007-03-02 Tambet Ingo <tambet@ximian.com>
* libnm-glib/nm-device-802-11-wireless.c
	(nm_device_802_11_wireless_get_capabilities): Implement.

	* libnm-glib/nm-device.c (nm_device_get_capabilities): Implement.

	* src/nm-device-802-11-wireless.c: Add "WirelessCapabilities" property.

	* src/named-manager/nm-named-manager.c (remove_one_zone_from_named): Unref the
	reply only if it's not NULL. Not sure why this started happening right now.

	* src/nm-manager.c (device_stop_and_free): Remove. No need to have different
	code paths for when devices get removed on shutdown or when a device is just
	removed.
	(finalize): Don't use a g_slist_foreach() when removing devices, the list data
	gets freed so any signal from a device (disconnected for instance) would invoke
	NMState update which would crash.
	(nm_manager_remove_device): Bring the device down when it gets removed.

	* src/NetworkManagerPolicy.c (nm_policy_auto_get_best_device): Remove
	the unused dev_type.

	* src/nm-hal-manager.c (create_device_and_add_to_list): Don't keep the
	reference to the added device, NMManager will own it (if it wants).

	* test/nm-tool.c: Rewrite using libnm-glib.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2417 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-03-05 08:49:30 +00:00
Tambet Ingo
352caa34c6 2007-03-02 Tambet Ingo <tambet@ximian.com>
* libnm-glib/nm-device-802-11-wireless.c: Cache networks (bssids) list.
	We get signalled when it changes.

	* libnm-glib/nm-client.c: Cache NMState and device list, we get signalled
	when it changes.

	* libnm-glib/nm-device.c: Cache the device state property.

	* libnm-glib/nm-access-point.c: Cache the strength property.

	* src/nm-device-802-11-wireless.c: Fix wireless device scanning scheduler.
	The new algorithm is to start from SCAN_INTERVAL_MIN (currently defined as 0)
	and add a SCAN_INTERVAL_STEP (currently 20 seconds) with each successful scan
	until SCAN_INTERVAL_MAX (currently 120 seconds) is reached. Do not scan while
	the device is down, activating, or activated (in case of A/B/G cards).
	Remove some old dead ifdef'ed out code that used to configure wireless devices,
	it's all done through supplicant now.

	* src/supplicant-manager/nm-supplicant-interface.c: Fix the reference
	counting issues with pending calls which caused leaks and crashes when
	interface was removed (now that the interface actually gets removed).

	* src/nm-call-store.c: Make a copy of data before running a foreach
	with user callback on it - The most common usage pattern is to cancel
	(and thus remove) all pending calls with foreach which would modify
	the hash table we're iterating over.

	* src/nm-manager.c: When a device is added, make sure it is "up". When
	it's removed or disabled due to disabling wireless or networking, bring
	it down.

	* include/NetworkManager.h: Add new device state NM_DEVICE_STATE_DOWN.

	* src/nm-device-802-11-wireless.c: 
	* src/nm-device-802-3-ethernet.c: 
	* src/nm-device.c:
		- Remove "init" virtual function, all gobjects have a place for that
		  already (constructor).
		- Replace "start" virtual function with "bring_up", devices can be
		  brought up and down more than just on startup now.
		- Add "is_up" virtual function.
		- Implement one way to bring a device down instead of previous 4 different
		  ways, each of witch did something different.

	* src/NetworkManagerUtils.c (nm_dev_sock_open): This doesn't need an NMDevice,
	all it needs is the device interface.

	Get rid of NMData.dev_list (3 members to go).
	Get rif of NMData in a lot of places.

	* gnome/libnm_glib/libnm_glib.c: Make it compile again.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2395 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-03-02 09:30:48 +00:00
Dan Williams
a2ff5bd22b 2007-02-23 Dan Williams <dcbw@redhat.com>
Patch from Andy Whitcroft <apw@shadowen.org> (Gnome.org #410426)

	* src/NetworkManagerAP.c
		- (add_capabilities_from_cipher): fix addition of WEP capabilities by
			OR-ing rather than AND-ing



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2358 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-02-23 15:46:12 +00:00
Tambet Ingo
537b30f99e 2007-02-20 Tambet Ingo <tambet@ximian.com>
* libnm-glib/nm-device-802-11-wireless.c: Add "network-added" and
	"network-removed" signals.

	* libnm-glib/libnm-glib.pc.in: Require NetworkManager >= 0.7.0.

	* libnm-glib/nm-access-point.c: Add "strength-changed" signal, emit it
	when receiving the signal from dbus.

	* src/nm-device-802-11-wireless.c (get_property): Fix PROP_ACTIVE_NETWORK
	property.

	* src/NetworkManagerPolicy.c (state_changed): Fix a typo to make the
	deactivation of the previously activated device working again.

	* src/nm-activation-request.c: Remove NMActStage property and it's getter
	and setter.

	* src/nm-device.c (nm_device_is_activated): Remove.
	state == NM_DEVICE_STATE_ACTIVATED is just as easy to use.

	* include/NetworkManager.h: Remove NM_DBUS_NO_DEVICES_ERROR,
	NM_DBUS_NO_DIALUP_ERROR, NM_DBUS_NO_NETWORKS_ERROR,
	NM_DBUS_NO_ACTIVE_DEVICE_ERROR, NM_DBUS_NO_ACTIVE_NET_ERROR errors and
	NM_DBUS_SIGNAL_STATE_CHANGE signal.
	Remove NMNetworkStatus and NMActStage enums.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2345 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-02-20 15:24:42 +00:00
Tambet Ingo
3dcd9d2d17 2007-02-19 Tambet Ingo <tambet@ximian.com>
* src/vpn-manager/nm-vpn-manager.c: Handle the DBUS state changes itself.
	Handle device state changes and disconnect VPN if it's device deactivates.

	* src/nm-dbus-nm.c: 
	* src/nm-dbus-nm.h: 
	* src/nm-dbus-device.c: 
	* src/nm-dbus-device.c: 
	* src/nm-dbus-net.c: 
	* src/nm-dbus-net.h: Remove. All of it is implemented byt the new dbus API.

	* src/NetworkManagerMain.h: Get rid of all but 3 properties of NMData.

	* src/nm-device.c (nm_device_get_by_udi):
	(nm_device_get_by_iface): Remove. This doesn't belong here and is already
	implemented in the correct location (NMManager).
	Rip out all the test_device stuff.

	* src/NetworkManagerPolicy.c: Remove the leftover activation success and
	failure handlers, it's all done by NMDevice already.

	* src/NetworkManager.c: Move the signal handling here from nm-logging.c
	Remove the iochannel hack to route the unix signals to the main thread since
	we're not threaded anymore.

	* src/NetworkManagerAP.c: Implement HWAddress property.

	* src/NetworkManagerDbus.c: Remove the dbus signal sending code, it happens
	automatically with dbus-glib.

	* src/nm-netlink-monitor.c: 
	* src/nm-netlink-monitor.h:
		- Move it low in the class hierarchy, don't reference any NM types.
		- Remove private data from the header.
		- Use type safe checks in public API methods.
		- Make it a singleton so we don't have to pass the single reference around.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2339 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-02-19 13:09:32 +00:00
Tambet Ingo
c40051389c 2007-02-16 Tambet Ingo <tambet@ximian.com>
* introspection/nm-ip4-config.xml: Implement.

	* libnm-glib/libnm-glib-test.c: Use new DBUS API in tests.

	* libnm-glib/nm-ip4-config.c:
	* libnm-glib/nm-ip4-config.c: Implement.

	* src/nm-ap-security[-*]: Remove circular dependencies between APs and AP
	securities. APs reference security.

	* src/nm-device-802-11-wireless.c: Implement missing properties that need to
	be exported over DBUS.

	* src/nm-device-802-3-ethernet.c: Ditto.

	* src/NetworkManagerAP.c:
	* src/NetworkManagerAP.h:
		- Convert to GObject, export over DBUS.

	* src/nm-ip4-config.h:
	* src/nm-ip4-config.h:
		- Convert to GObject, export over DBUS.




git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2322 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-02-16 11:23:49 +00:00
Dan Williams
9a2e7384dd 2007-02-12 Dan Williams <dcbw@redhat.com>
Patch from Helmut Schaa <hschaa@suse.de>

	* vpn-daemons/pptp/configure.in
	  vpn-daemons/pptp/Makefile.am
	  vpn-daemons/openvpn/configure.in
	  vpn-daemons/openvpn/Makefile.am
	  vpn-daemons/vpnc/configure.in
	  vpn-daemons/vpnc/Makefile.am
		- Add --without-gnome switch which disables building gnome bits




git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2316 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-02-13 02:50:10 +00:00
Tambet Ingo
7eeefaea40 2007-02-12 Tambet Ingo <tambet@ximian.com>
* libnm-glib/nm-device.c (nm_device_get_use_dhcp): Remove.

	* libnm-glib/nm-access-point.c (nm_access_point_is_broadcast): Remove.

	* introspection/nm-device-802-3-ethernet.xml: Rename 'Address' property to
	'HwAddress'.

	* introspection/nm-device.xml: Remove 'UseDhcp' property.

	* introspection/nm-access-point.xml: Remove 'Broadcast' property.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2310 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-02-12 14:46:49 +00:00
Tambet Ingo
8a4c57f631 2007-02-12 Tambet Ingo <tambet@ximian.com>
Totally break NetworkManager. Please use 0.6 branch until futher notice.

	* src/:
		- Remove old low-level dbus interface implementations and replace them
		  with dbus-glib one.

	* configure.in:
		- Require dbus-glib >= 0.72.
		- Plug in new sources to build.

	* libnm-glib/:
		- Implement GObject wrappers on top of DBUS glib auto-generated bindings
		  to make it more convenient to use from GObject based programs.

	* introspection/:
		- Implement DBUS XML introspection files, used by both NM and libnm-glib.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2309 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-02-12 09:23:43 +00:00
Tambet Ingo
9937078feb 2007-02-09 Tambet Ingo <tambet@ximian.com>
Oops, forgot to commit the changelog.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2299 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-02-09 11:14:01 +00:00
Tambet Ingo
b6680375d1 2007-02-05 Tambet Ingo <tambet@ximian.com>
* src/nm-device-802-11-wireless.c (supplicant_iface_scan_result_cb): 
	* src/supplicant-manager/nm-supplicant-interface.h
	* src/supplicant-manager/nm-supplicant-interface.c
	(nm_supplicant_interface_class_init): Change the "scan-result" signal's
	argument to boolean from enum.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2287 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-02-05 16:21:25 +00:00
Tambet Ingo
a88e1dd3a2 2007-02-05 Tambet Ingo <tambet@ximian.com>
Make NMDevice abstract class, remove almost all references to it's
	subclasses (the last place gets removed with new policy manager). Add
	NMDeviceInterface (which NMDevice implements) so that when we have
	NMDevice exported over DBUS, there's a common NMDevice interface which
	all instances have, plus there's a device specific interface for each
	specific type.
	Remove functions (nm_device_is_802_3_ethernet) and
	(nm_device_is_802_11_wireless). There are already standard GObject macros
	for type safe checks.
	Use the updated supplican manager API.

	* src/nm-device-interface.h: 
	* src/nm-device-interface.c: 
	* src/nm-call-store.h: 
	* src/nm-call-store.c: Implement.

	* src/supplicant-manager/nm-supplicant-interface.c:
	* src/supplicant-manager/nm-supplicant-interface.h:
	* src/supplicant-manager/nm-supplicant-manager.c:
	* src/supplicant-manager/nm-supplicant-manager.h:
		- Remove all private data type references from public header files.
		- Remove all references to other NM classes, this class is just a
		  proxy between wpa_supplicant and NM so it doesn't have to know
		  any internals.
		- Convert to dbus-glib bindings.
		- Type safe checks for public methods' arguments.
		- Store pending DBUS call ids to NMCallStore.

	* src/supplicant-manager/nm-supplicant-config.c:
		- Store config values in a GHashTable instead of GSList.




git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2285 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-02-05 12:14:09 +00:00
Tambet Ingo
58b53400a5 2007-02-05 Tambet Ingo <tambet@ximian.com>
* src/NetworkManagerMain.h: Remove all references to DHCP manager.

	* src/NetworkManager.c: Don't initialize the DHCP manager, it's a
	singleton now.

	* src/nm-device.c: Use the new DHCP manager API.

	* src/nm-activation-request.c:
	* src/nm-activation-request.h:
		- Remove all dhcp related properties and methods.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2284 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-02-05 09:50:11 +00:00
Dan Williams
c5e472d42f 2007-02-02 Dan Williams <dcbw@redhat.com>
* configure.in
	  gnome/Makefile.am
	  nm-applet.desktop
	  Makefile.am
		- Remove last bits referencing gnome applet



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2268 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-02-02 21:28:03 +00:00
Dan Williams
06fe3cfed9 2007-02-02 Dan Williams <dcbw@redhat.com>
* src/vpn-manager/nm-vpn-service.c
		- (nm_vpn_service_stage4_ip4_config_get): use uint32 arrays for DNS
			and NBNS server addresses



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2265 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-02-02 21:14:56 +00:00
Tambet Ingo
b8e56f0ba6 2007-02-02 Tambet Ingo <tambet@ximian.com>
* src/nm-dbus-manager.c:
	* src/nm-dbus-manager.h:
		- Convert all internal DBUS code to use dbus-glib bindings.
		- Remove GObject properties, we don't need them here.
		- Don't explicitly set things to NULL after freeing, glib is
		  happy to do it if asked nicely (G_DEBUG=gc-friendly).
		- Make public API argument checks type safe.
		- Remove unnecessary (and wrong) cast to GObject for the first
		  argument to g_signal_* calls - The first argument is a gpointer.
		- Export DBusGConnection to other cool classes that (are going to)
		  use dbus-glib.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2260 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-02-02 08:50:56 +00:00
Dan Williams
ca666cc549 2007-01-26 Dan Williams <dcbw@redhat.com>
* libnm-util/dbus-dict-helpers.c
	  libnm-util/dbus-dict-helpers.h
		- Coordinate style with wpa_supplicant version to minimize diff
		- Add uint32 array support
		- (nmu_dbus_dict_append_uint32_array): new function
		- (nmu_dbus_dict_begin_string_array, nmu_dbus_dict_string_array_add_element,
		   nmu_dbus_dict_end_string_array): bring over from wpa_supplicant
			version; allow adding string array elements individually

	* test/libnm-util/test-dbus-dict-helpers.c
		- Test uint32 arrays



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2249 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-01-27 01:19:08 +00:00
Jürg Billeter
7798f8b2e6 2007-01-27 Jürg Billeter <j@bitron.ch>
* src/backends/NetworkManagerPaldo.c
		- (nm_system_update_dns): clear nscd hosts cache


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2248 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-01-26 23:05:51 +00:00
Dan Williams
0df1e42c39 2007-01-04 Dan Williams <dcbw@redhat.com>
Threading removal related cleanups:

	- Use the glib default main context.  Remove the device main context
		member from NMDevice, and the main_context member from NMData.  Change
		all the idle and timeout scheduler functions to use plain
		g_idle_add() and g_timeout_add().

	- As a side-effect of the first change, nm_dbus_manager_get() no longer
		takes an argument; fix that up too.

	- Remove all locking, which is useless since we no longer use threads.  For
		example, nm_get_device_by_iface_locked() has been removed.  The global
		device list lock, the AP List lock, and all static locks in
		NetworkManagerPolicy.c have been removed.  The locking utility functions
		in NetworkManagerUtils.c have also been removed.

	- Other cleanups in spacing and code style



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2205 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-01-04 12:06:26 +00:00
Dan Williams
c430ba3336 2007-01-01 Dan Williams <dcbw@redhat.com>
Found by Bill Moss:

	* src/supplicant-manager/nm-supplicant-interface.c
		- (nm_supplicant_interface_disconnect): fix cleanup logic when
			the supplicant interface wasn't already disconnected.  Always
			call removeNetwork and disconnect unless the supplicant interface
			is in the DISCONNECTED or INACTIVE state.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2202 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-01-02 05:01:07 +00:00
Dan Williams
a423162b36 2006-12-28 Dan Williams <dcbw@redhat.com>
Use a single thread for everything.  With the move to wpa_supplicant
	and communication over D-Bus, there's no reason for multiple threads.
	Almost all of the blocking code has been removed, with one exception in
	the DHCP manager and a few in the VPN manager.  This commit removes the
	per-device worker thread and fixes activation cancellation in the absence
	of threads.  Further removal of thread-related code would be removing
	any locking code (like the device list lock) and simplification of logic
	around areas of code or data structures that are currently locked.

	* autoip.c
	  dhcp-manager/nm-dhcp-manager.c
	  nm-device-802-11-wireless.c
	  nm-device-802-3-ethernet.c
	  nm-device.c
	  nm-device.h
		- Remove usage of multiple threads


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2197 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-12-28 22:13:59 +00:00
Dan Williams
a6f5833cb3 2006-12-19 Dan Williams <dcbw@redhat.com>
Big wpa_supplicant + dbus update; need latest wpa_supplicant from CVS
	plus a few other patches from wpa_supplicant bugzilla.

	* src/Makefile.am
	  src/NetworkManagerPolicy.c
	  src/NetworkManagerUtils.c
	  src/NetworkManagerUtils.h
	  src/nm-ap-security-leap.c
	  src/nm-ap-security-wep.c
	  src/nm-ap-security-wpa-eap.c
	  src/nm-ap-security-wpa-psk.c
	  src/nm-ap-security.c
	  src/nm-ap-security.h
	  src/nm-device-802-11-wireless.c
	  src/nm-device-802-11-wireless.h
	  src/supplicant-manager/nm-supplicant-config.c
	  src/supplicant-manager/nm-supplicant-config.h
	  src/supplicant-manager/nm-supplicant-interface.c
	  src/supplicant-manager/nm-supplicant-interface.h
	  src/supplicant-manager/nm-supplicant-marshal.list
	  src/supplicant-manager/nm-supplicant-settings-verify.c
	  src/supplicant-manager/nm-supplicant-settings-verify.h
		- Move all connection management and association handling to
			wpa_supplicant over dbus, rather than spawning a private copy


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2192 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-12-19 19:15:31 +00:00
Dan Williams
3834255f8c 2006-12-19 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c
		- (nm_policy_device_change_check, nm_policy_schedule_device_change_check):
			better locking of the device change check handler ID.  Incorrect
			locking was causing lost device change requests


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2191 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-12-19 19:04:04 +00:00
Dan Williams
664b97dbf3 2006-12-18 Dan Williams <dcbw@redhat.com>
* libnm-util/dbus-dict-helpers.c
		- (_nmu_dbus_dict_entry_get_array, _nmu_dbus_dict_entry_get_string_array,
		   _nmu_dbus_dict_entry_get_byte_array): replace usage of
		   dbus_message_iter_get_array_len()  (Gnome.org #382898)


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2189 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-12-18 17:26:34 +00:00
Dan Williams
ff1145b930 2006-12-18 Dan Williams <dcbw@redhat.com>
* gnome/libnm_glib/libnm_glib.c
		- Change dbus_connection_close() -> dbus_connection_unref()


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2186 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-12-18 17:04:57 +00:00
Dan Williams
bcd251672e 2006-12-11 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-interface.c
		- (iface_state_cb, wpas_iface_get_state): new functions; query initial
			wpa_supplicant interface state
		- (nm_supplicant_interface_add_cb): query initial wpa_supplicant interface
			state before transitioning to READY state


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2181 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-12-12 03:27:35 +00:00
Dan Williams
8eb78d652d 2006-12-04 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (supplicant_iface_scanned_ap_cb): fix parsing of hidden APs due to
			odd length of ESSID returned from ieee80211 stack-based drivers


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2165 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-12-04 20:44:30 +00:00
Dan Williams
a4ea27d2ca 2006-12-04 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (supplicant_iface_scanned_ap_cb): remove erroneous & from WPA & RSN
			IE handling blocks that cause mis-parsing of the IE


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2164 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-12-04 20:42:02 +00:00
Dan Williams
9fa82209e7 2006-12-04 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (init_supplicant_interface): new function; pull supplicant interface
			setup code out into standalone function since it must be called from
			two different places
		- (real_init): sup_mgr is now in private object data; get and track
			the supplicant manager object over the NMDevice subclass' lifetime
			and register a signal handler for its state signals; only try to
			initialize the supplicant interface if the supplicant manager is in
			the IDLE state (and therefore is ready for requests)
		- (request_wireless_scan): reschedule the scan request if (a) there is
			no supplicant interface yet (meaning wpa_supplicant isn't running
			or isn't ready yet), or (b) if the supplicant interface isn't ready
			for requests yet
		- (supplicant_iface_connection_state_cb): new function; stub for
			handling supplicant interface connection state signals
		- (supplicant_mgr_state_cb): do the right thing when wpa_supplicant
			comes and goes
		- (nm_device_802_11_wireless_dispose): clean up spacing; release the
			supplicant manager object that's being tracked starting with this
			commit


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2163 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-12-04 20:40:35 +00:00
Dan Williams
4b647c97a8 2006-12-04 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-interface.c
		- (nm_supplicant_interface_set_property): track signal handler ID
		- (nm_supplicant_interface_dispose): remove signal handler on dispose


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2162 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-12-04 20:33:06 +00:00
Dan Williams
bcf29cf7a5 2006-12-04 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-interface.[ch]
		- (nm_supplicant_interface_get_state): new function


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2160 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-12-04 19:09:44 +00:00
Dan Williams
d9e7b0082a 2006-12-04 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-interface.c
		- (bssid_properties_cb): don't treat DBus errors as valid
			scanned AP messages


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2159 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-12-04 19:07:22 +00:00
Dan Williams
ad9c4eb950 2006-12-04 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-interface.[ch]
		- (nm_supplicant_interface_get_connection_state): new function
		- define new supplicant connection states
		- send a signal when the supplicant connection state changes


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2157 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-12-04 05:45:05 +00:00
Dan Williams
141af10189 2006-12-03 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/Makefile.am
	  src/supplicant-manager/nm-supplicant-connection.h
	  src/supplicant-manager/nm-supplicant-connection.c
	  src/supplicant-manager/nm-supplicant-config.h
	  src/supplicant-manager/nm-supplicant-config.c
	  src/supplicant-manager/nm-supplicant-types.h
	  src/supplicant-manager/nm-supplicant-interface.h
	  src/supplicant-manager/nm-supplicant-interface.c
		- Rename NMSupplicantConnection -> NMSupplicantConfig


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2154 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-12-03 20:04:11 +00:00
Dan Williams
23527a52f7 2006-12-03 Dan Williams <dcbw@redhat.com>
Patch from Gabor Kelemen <kelemeng@gnome.hu>  (Gnome.org #381890)

	* po/POTFILES.in
	  po/POTFILES.skip
		- Move VPN-related translatables to .skip

	* vpn-daemons/pptp/po/POTFILES.in
		- Update with new translatables


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2153 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-12-03 19:13:45 +00:00
Dan Williams
c07d22efee 2006-12-02 Dan Williams <dcbw@redhat.com>
Patch from Christian Persch <chpe@gnome.org>

	* gnome/applet/Makefile.am
	  gnome/applet/applet-dbus-devices.c
	  gnome/applet/applet-notifications.c
	  gnome/applet/applet.c
	  gnome/applet/applet.h
	  gnome/applet/main.c
		- Be a GtkStatusIcon on GTK+ >= 2.10


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2147 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-12-03 04:22:43 +00:00
Dan Williams
ba204142fb 2006-12-02 Dan Williams <dcbw@redhat.com>
* gnome/applet/applet.c
		- (nma_update_info): fix two unecessary allocations


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2144 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-12-03 04:02:53 +00:00
Dan Williams
3a576089ec 2006-12-02 Dan Williams <dcbw@redhat.com>
Patch from Michael Biebl <biebl@teco.edu>
	* configure.in
	  man/NetworkManager.1.in
	  man/NetworkManagerDispatcher.1.in
	  man/NetworkManager.8.in
	  man/NetworkManagerDispatcher.8.in
		- Add .SH NAME stanzas
		- Move NM & NM Dispatcher manpages to section 8 (admin)


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2140 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-12-03 03:39:39 +00:00
Dan Williams
60c85e9373 2006-12-02 Dan Williams <dcbw@redhat.com>
Patch from Christian Persch <chpe@gnome.org>

	* configure.in
		- Check for GTK+ 2.10 in preparation for GtkStatusIcon patch


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2139 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-12-03 03:33:09 +00:00
Tambet Ingo
6edc3f81c8 2006-11-29 Tambet Ingo <tambet@ximian.com>
Patch by Timo Hoenig <thoenig@suse.de>:
	* src/nm-dbus-manager.c (nm_dbus_manager_start_service): Make it work with
	DBUS-1.0.

	* src/supplicant-manager/Makefile.am: Add nm-supplicant-marshal here, since
	we can't use the one from the main source directory.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2133 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-11-29 11:00:22 +00:00
Dan Williams
13ee37f480 2006-11-27 Dan Williams <dcbw@redhat.com>
Patch from Christian Persch <chpe@gnome.org>

	* gnome/applet/applet-dbus-devices.c
		- (hal_info_product_cb): fix memleak; free duped string.
			Gnome.org #379908


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2131 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-11-27 21:48:33 +00:00
Dan Williams
17b61aa02f 2006-11-27 Dan Williams <dcbw@redhat.com>
Patch from Christian Persch <chpe@gnome.org>

	* gnome/applet/menu-items.c
		- (network_menu_item_update): use gtk_progress_bar_set_fraction()
			as gtk_progress_set_percentage is deprecated.  Should
			work as far back as GTK+ 2.4.  Gnome.org #379780


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2130 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-11-27 21:38:14 +00:00
Dan Williams
56621e5f66 2006-11-26 Dan Williams <dcbw@redhat.com>
Scan using wpa_supplicant over DBus.

	* src/nm-device-802-11-wireless.c
		- remove wireless extensions netlink event handler bits
			(wireless_event_helper, nm_device_802_11_wireless_event)
		- remove wireless extensions scan event handler bits
			(process_scan_results, add_new_ap_to_device_list, hexstr2bin,
			hex2byte, hex2num, request_and_convert_scan_results,
			free_process_scan_cb_data, scan_results_timeout,
			schedule_scan_results_timeout, cancel_scan_results_timeout)
		- Rename nm_device_802_11_wireless_scan() -> request_wireless_scan()
			and request scans from the supplicant interface rather than directly
		- Move functionality of convert_scan_results() to cull_scan_list() and
			supplicant_iface_scanned_ap_cb()
		- (supplicant_iface_scan_result_cb): new function; schedule a new scan
			at the scan interval when the current scan has finished
		- (supplicant_iface_state_cb): start scanning when the supplicant
			interface enters the READY state, and stop scanning when it
			enters the DOWN state
		- (cull_scan_list): weed out old access points from the scan list
		- (supplicant_iface_scanned_ap_cb): convert a supplicant scanned access
			point into an NMAccessPoint and merge it into the device's scan list

	* src/supplicant-manager/nm-supplicant-interface.c
	  src/supplicant-manager/nm-supplicant-interface.h
		- Add a new signal "scan-result" which is issued when the supplicant
			notifies NM that a scan has completed
		- Add a new signal "scanned-ap" that notifies listeners of a new access
			point found in the scan.  Called once for each access point that
			the supplicant interface object receives from the supplicant as a
			result of the "scanResults" method call
		- (wpas_iface_query_scan_results): don't wait 4s before querying
			for the initial scan results
		- (scan_request_cb): new function; send listeners the result
			(success, error) of a wireless scan request
		- (nm_supplicant_interface_request_scan): new function; ask the
			supplicant to perform an immediate wireless scan


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2128 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-11-26 20:49:48 +00:00
Dan Williams
8fd7082b66 2006-11-25 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/Makefile.am
		- Since we're including NetworkManagerMain.h in nm-supplicant-interface.c,
			add HAL cflags/includes and named-manager includes directory

	* src/supplicant-manager/nm-supplicant-interface.h
		- New state STARTING to handle transition from INIT to READY where
			the addInterface pending call is still outstanding

	* src/supplicant-manager/nm-supplicant-interface.c
		- track pending calls differently since we may have more than one
			going on at any given time
		- request scan results from wpa_supplicant; but don't do it more often
			than every 4 seconds.  Drivers that do background scanning
			(like the 'ipw' drivers) send a continuous stream of scan completion
			notifications, so we don't want to hammer the supplicant or dbus
			with requests for all scan results every time we get a completion
			notification.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2126 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-11-25 18:23:06 +00:00
Dan Williams
4bc25ba3bf 2006-11-25 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-types.h
		- new file; move all supplicant manager object typedefs here for
			#include sanity

	* src/supplicant-manager/nm-supplicant-interface.c
	  src/supplicant-manager/nm-supplicant-interface.h
		- new file; an object that interfaces an NMDevice object to the
			supplicant and handles signals from the supplicant.  This object
			does all necessary DBus communication with wpa_supplicant.

	* src/supplicant-manager/nm-supplicant-manager.c
	  src/supplicant-manager/nm-supplicant-manager.h
		- Actually do something.  Track the state of the wpa_supplicant service
			and deal with its comings & goings.  Handle life events of
			supplicant interfaces too.
		- Move NMSupplicantManager typedef to nm-supplicant-types.h

	* src/supplicant-manager/nm-supplicant-connection.h
		- Move NMSupplicantConnection typedef to nm-supplicant-types.h

	* src/supplicant-manager/Makefile.am
		- Add new files to build, and add libnm-util to includes

	* src/nm-marshal.list
		- New marshaler type: VOID:UINT,UINT

	* src/nm-device-802-3-ethernet.c
		- (real_init): grab a supplicant interface
		- (nm_device_802_3_ethernet_dispose): release the supplicant interface
		- (supplicant_iface_state_cb): new function, stub for handling
			supplicant interface state changes

	* src/nm-device-802-11-wireless.c
		- (real_init): grab a supplicant interface
		- (nm_device_802_11_wireless_dispose): release the supplicant interface
		- (supplicant_iface_state_cb): new function, stub for handling
			supplicant interface state changes

	* src/NetworkManager.c
		- (main): create and keep the supplicant manager around for the lifetime
			of NetworkManager

	* src/Makefile.am
		- Link to the supplicant manager sub-library and use the supplicant
			manager includes


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2125 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-11-25 15:41:04 +00:00
Dan Williams
81c31e820a 2006-11-25 Dan Williams <dcbw@redhat.com>
Rework DBus manager signal handling to be more flexible.  Previously,
	only one signal handler could be registered for a particular interface.
	The DBus manager now reference counts DBus bus matches and allows multiple
	clients to register signal handlers for the same interface and sender.

	* src/NetworkManager.c
		- (main): track NMI signal handler ID and remove it when we quit

	* src/NetworkManagerMain.h
		- Keep track of NMI signal handler ID

	* src/nm-dbus-manager.c
	  src/nm-dbus-manager.h
		- rework signal handling; each signal handler references one signal
			match, but a signal match may be referenced by one or more
			signal handlers.  Matches are refcounted and are destroyed when the
			last signal handler that references the match is removed.  This is
			necessary because two signal handlers may end up requiring the same
			dbus bus match, so the match must live until the last signal handler
			is destroyed (for example, with the wpa_supplicant network interface
			dbus interface).

	* src/dhcp-manager/nm-dhcp-manager.c
		- (nm_dhcp_manager_new): track DHCP signal handler id
		- (nm_dhcp_manager_dispose): remove DHCP signal handler

	* src/vpn-manager/nm-vpn-service.c
		- (nm_vpn_service_add_watch): track VPN service signal handler id
		- (nm_vpn_service_remove_watch): remove VPN service signal handler


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2124 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-11-25 07:09:11 +00:00
Dan Williams
2c8b331607 Credit Helmut for patch suggestion
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2122 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-11-25 06:07:46 +00:00
Dan Williams
8b1045257a 2006-11-25 Dan Williams <dcbw@redhat.com>
* src/vpn-daemons/nm-vpn-service.c
		- (supplicant_child_setup): new function
		- (supplicant_exec): make child process use a new process group id

	* src/nm-device-802-11-wireless.c
		- (nm_vpn_service_child_setup): new function
		- (nm_vpn_service_stage1_daemon_exec): make child process use a new
			process group id


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2121 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-11-25 05:54:42 +00:00
Dan Williams
1f69789fcd 2006-11-19 Dan Williams <dcbw@redhat.com>
Patch from Dan Berrange <dan@berrange.com>  Gnome.org #377262
	* gnome/vpn-properties/nm-vpn-properties.c
		- clean up after renamed VPN connection


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2114 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-11-20 04:03:46 +00:00