Commit graph

789 commits

Author SHA1 Message Date
Dan Williams
c708b1082f 2007-08-26 Dan Williams <dcbw@redhat.com>
* src/nm-netlink-monitor.c
		- (nm_netlink_monitor_class_init, nm_netlink_monitor_event_handler):
			don't need the 'wireless-event' signal anymore since that's all
			handled by wpa_supplicant



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2727 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-26 15:10:12 +00:00
Dan Williams
386998c983 2007-08-25 Dan Williams <dcbw@redhat.com>
It's 2007. Remove support for drivers that don't support wireless scanning.

	* test/nm-tool.c
	  include/NetworkManager.h
	  src/NetworkManagerUtils.c
	  src/NetworkManagerPolicy.c
	  src/nm-device-802-11-wireless.c
		- Remove special handling for non-scanning devices and mark them
			as unsupported/unhandled



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2726 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-25 15:07:23 +00:00
Dan Williams
d711aed2ef 2007-08-20 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
	  src/nm-device-802-3-ethernet.c
		- (real_is_up): move device-specific tests before generic IFF_UP test,
			because when the card is pulled or the module removed, the device
			is already !IFF_UP and then device-specific cleanup (removing
			the supplicant interface, periodic checks, etc) never gets done



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2721 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-21 02:01:52 +00:00
Dan Williams
e5177b35cd 2007-08-20 Dan Williams <dcbw@redhat.com>
* src/nm-manager.c
		- (nm_manager_remove_device): bring device down before disconnecting
			signal handlers, so that the 'state' signal will get broadcast when
			the device enters the DOWN state
		- (manager_device_state_changed): add NM_DEVICE_STATE_DOWN to the list
			of states that cause the NMManager to recheck its state



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2720 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-21 01:54:30 +00:00
Dan Williams
f7ca6ded56 2007-08-20 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-interface.c
		- (interface_disconnect_done): don't try to dispose of the net proxy
			when it may already have been disposed of



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2719 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-21 01:52:19 +00:00
Dan Williams
281d2f71fd 2007-08-20 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (nm_device_802_11_wireless_get_ssid): don't traceback and die when
			the SSID isn't available; this can happen when the card is pulled
			or the module unloaded, during the post-removal deactivation
			paths, when the ioctl returns ENODEV



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2718 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-21 01:50:29 +00:00
Dan Williams
7442a81b7c Formatting fix
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2717 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-21 01:47:57 +00:00
Dan Williams
2b1e8226f1 2007-08-20 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (merge_scanned_ap): only merge the AP with another if the SSID, BSSID,
			frequency, and mode match.  Applets are now responsible for grouping
			access points



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2716 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-21 01:42:58 +00:00
Dan Williams
3c14aa3926 2007-08-20 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerAP.c
	* src/NetworkManagerAP.h
		- (nm_ap_print_self): new function

	* src/NetworkManagerAPList.c
		- (nm_ap_list_print_members): call nm_ap_print_self() rather than trying
			to do it all here



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2715 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-21 01:41:04 +00:00
Dan Williams
d6ce97e677 2007-08-17 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-3-ethernet.c
		- (real_bring_down): don't try to dispose of stuff that might not
			exist



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2712 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-17 21:31:59 +00:00
Dan Williams
4f402876fe 2007-08-17 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerAP.c
		- (nm_ap_set_user_addresses): uppercase any BSSID passed in from the
			applet.  This ensures that the case between the seen-bssids and
			the bssids reported by the driver match.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2711 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-17 21:31:22 +00:00
Dan Williams
71a7f5bdb1 2007-08-17 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (device_cleanup): disconnect the interface in wpa_supplicant before
			we dispose of the interface proxy in NM



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2710 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-17 21:30:14 +00:00
Tambet Ingo
1214ece853 2007-08-16 Tambet Ingo <tambet@gmail.com>
* src/ppp-manager/nm-ppp-manager.c (pppd_child_setup):
        * Implement.
        (nm_ppp_manager_start): Use g_spawn_async() since we're not
doing anything
        with the file descriptors. Send a child setup function to change
the pppd
        progress group.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2700 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-16 07:16:32 +00:00
Dan Williams
f5ff2b6ca3 2007-08-15 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-interface.c
		- (try_remove_iface): new function, ask wpa_supplicant to remove
			an interface
		- (nm_supplicant_interface_dispose): call try_remove_iface() when
			disposing of the NMSupplicantInterface.  Otherwise weird stuff
			happens on hotplug if wpa_supplicant doesn't tear down and readd
			the interface internally



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2699 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-15 19:55:04 +00:00
Dan Williams
6f57387033 2007-08-15 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (real_bring_down): move most of this function into device_cleanup()
			so that it can be called from elsewhere
		- (nm_device_802_11_wireless_dispose): clean up device periodic timers
			and stuff on dispose.  These would normally get cleaned up when
			the device is marked down and deactivated, but when the device is
			hot-unplugged, it's already down and real_down() never gets run



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2698 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-15 18:52:23 +00:00
Dan Williams
cf24e61f74 2007-08-15 Dan Williams <dcbw@redhat.com>
* src/nm-dbus-nmi.c
		- (nm_dbus_get_user_key_for_network_cb): fix incorrect refcounting that
			caused a reference leak on device for which NM requested a key



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2697 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-15 18:49:52 +00:00
Tambet Ingo
b1e15de652 2007-08-15 Tambet Ingo <tambet@gmail.com>
* src/ppp-manager: Implement ppp-manager. It's sort of dead code
        * for now since
        nothing is using it at the moment, but it'll be all useful and
stuff later on.

        * libnm-util/nm-setting.h: Define NMSettingPPP.

        * libnm-util/nm-setting.c: Implement NMSettingPPP.

        * libnm-util/nm-connection.c (register_default_creators):
        * Register ppp setting.

        * src/Makefile.am: Add ppp-manager to SUBDIRS.

        * configure.in: Require ppp headers. Build Makefile for
        * ppp-manager.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2695 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-15 14:30:06 +00:00
Tambet Ingo
8bed6ff2de 2007-08-14 Tambet Ingo <tambet@gmail.com>
* libnm-glib/Makefile.am: Use nm-manager-client.xml to produce
        * nm-client-bindings.

        * introspection/nm-manager-client.xml: Add a horrible horrbile
        * hack to work around
        an issue with dbus-glib bindings generator. The issue is, the
generated C caller
        functions for dbus methods "Sleep(bool)" and "sleep()" both have
the same function
        name and different arguments and it won't compile anymore. To
fix this, we now have
        two copies of nm-manager.xml file. nm-manager.xml contains the
actual interface,
        that is new API + compatibility API and used by the daemon. The
other, 
        nm-manager-client.xml is only the new API without compatibility
bits and is used
        by libnm-glib to make it compile.

        * introspection/nm-manager.xml: Define compatibility methods
        * (sleep, wake, state).

        * src/nm-manager.c (impl_manager_legacy_sleep)
        (impl_manager_legacy_wake, impl_manager_legacy_state): Implement
the compatibility
        interface functions for 0.6 branch.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2688 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-15 07:52:25 +00:00
Dan Williams
30a4e7e602 2007-08-14 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerAP.c
		- (nm_ap_new_from_properties): fix mistaken check of return value
			from memcmp (should expect 0)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2687 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-15 02:54:15 +00:00
Dan Williams
0b9df92472 2007-08-14 Dan Williams <dcbw@redhat.com>
(force-commit to fix wrong comment and partial commit of r2685; this
	 commit actually applies to r2685)

	* src/NetworkManagerUtils.c
		- (nm_utils_same_ssid): add "ignore_trailing_null" parameter which
			ignores trailing nulls in the SSID to work around mismatches in
			expectations between WEXT and what the info-daemon passes back.  The
			info-daemon would pass back the correct length, but due to the
			ESSID length issues with WEXT 22 and greater and wpa_supplicant,
			the device would always have an SSID + 1 depending on what versions
			of wpa_supplicant, the kernel, and NM you have.  This was most often
			visible by just quitting the applet and relaunching, which caused
			NM to reassociated to the same network over again when reloading
			the save networks.

	* src/NetworkManagerPolicy.c
	  src/NetworkManagerUtils.h
	  src/nm-device-802-11-wireless.c
		- Update for new parameter to nm_utils_same_ssid()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2686 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-15 01:59:19 +00:00
Dan Williams
ccb13f0bdd 2007-08-14 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerUtils.c
		- (nm_utils_escape_ssid): add "ignore_trailing_null" parameter which
			ignores trailing nulls in the SSID to work around mismatches in
			expectations between WEXT and what the info-daemon passes back.  The
			info-daemon would pass back the correct length, but due to the
			ESSID length issues with WEXT 22 and greater and wpa_supplicant,
			the device would always have an SSID + 1 depending on what versions
			of wpa_supplicant, the kernel, and NM you have.  This was most often
			visible by just quitting the applet and relaunching, which caused
			NM to reassociated to the same network over again when reloading
			the save networks.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2685 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-15 01:56:02 +00:00
Dan Williams
66c11dd988 2007-08-14 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerAP.c
		- (nm_ap_new_from_properties): ignore BSSs with invalid BSSIDs.  Today
			I encountered a BSS that wasn't just hiding it's ESSID, it was
			setting the BSSID to all 0s.  That confused the heck out of NM,
			plus it's useless and probably out-of-spec.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2684 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-15 01:31:53 +00:00
Dan Williams
2413ebf771 Debug supplicant state
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2683 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-15 01:30:00 +00:00
Dan Williams
93f08e2f11 2007-08-14 Dan Williams <dcbw@redhat.com>
* callouts/Makefile.am
	  src/dhcp-manager/nm-dhcp-manager.c
	  src/dhcp-manager/nm-dhcp-manager.h
	  src/dhcp-manager/Makefile.am
		- Change install location of nm-dhcp-client.action to ${prefix}/libexec



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2682 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-14 18:35:38 +00:00
Dan Williams
9bcbbb1cca 2007-08-14 Dan Williams <dcbw@redhat.com>
* src/dhcp-manager/nm-dhcp-manager.c
		- (dhclient_run): don't pass -x to dhclient until we figure out if
			it's really needed, get rid of unused xtra_args parameter



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2681 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-14 18:23:40 +00:00
Dan Williams
e3d15a5f73 2007-08-14 Dan Williams <dcbw@redhat.com>
* include/NetworkManagerVPN.h
	  src/vpn-manager/nm-dbus-vpn.c
	  src/vpn-manager/nm-dbus-vpn.h
	  src/vpn-manager/nm-vpn-act-request.c
	  src/vpn-manager/nm-vpn-act-request.h
	  src/vpn-manager/nm-vpn-service.c
	  src/vpn-manager/nm-vpn-service.h
	  libnm-glib/nm-vpn-connection.c
	  libnm-glib/nm-vpn-connection.h
	  libnm-glib/nm-client.h
		- Rename NM_VPN_STATE_* -> NM_VPN_SERVICE_STATE_* and NMVPNState -> 
			NMVPNServiceState to clarify what they apply to
		- Rename NM_VPN_ACT_STAGE_* -> NM_VPN_CONNECTION_STATE_* and
			NMVPNActStage -> NMVPNConnectionState for the same reason

	* libnm-glib/nm-client.c
		- Constant + type renames from above
		- Properly handle NameOwnerChanged/manager_running signals
			for NM service; only emit when state really changes
		- Use hash tables correctly so that the key (which was previously owned
			by the D-Bus message) now has the same lifetime as the value, since
			the key is now taken from the the NMVPNConnection itself.  This
			really fixes the double-VPN names in the applet



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2677 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-14 14:09:57 +00:00
Dan Williams
07db7f145d 2007-08-13 Dan Williams <dcbw@redhat.com>
* src/dhcp-manager/nm-dhcp-manager.c
		- Stop any dhclient instance that might be already running for a
			particular interface before starting an NM spawned dhclient.  Fixes
			dhclient processes left over if NM crashes, stuff like that.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2674 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-13 20:38:47 +00:00
Dan Williams
146a4374b0 2007-08-13 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerAP.c
		- (finalize): don't try to g_array_free (NULL, ...), which happened
			when the AP wasn't broadcasting it's SSID



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2673 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-13 20:36:30 +00:00
Tambet Ingo
fbe9becbd4 2007-08-13 Tambet Ingo <tambet@gmail.com>
* libnm-glib/libnm-glib.pc.in: Rename to libnm_glib.pc.in.

        * libnm-glib/Makefile.am: Add legacy libnm_glib.[ch] to the
        * build.
        Rename the library from libnm-glib to libnm_glib to maintain the
library API
        compatibility with 0.6 branch.

        * Makefile.am: Remove gnome/ SUBDIR.

        * gnome/libnm_glib/libnm_glib.[ch]: Move to libnm-glib/.

        * src/Makefile.am: Remove the WPA_SUPPLICANT_BIN define.

        * dispatcher-daemon/Makefile.am: Link the binary with
        * libnm_glib.

        * configure.in: Remove GNOME checks, NetworkManager does not
        * need any of these
        anymore.
        Remove checks for wpa_supplicant binary, it's used over dbus.
        Remove gnome/ directory files form AC_OUTPUT, that directory is
getting moved.

        * test/Makefile.am: Remove define WPA_SUPPLICANT_BIN.
        Link the binaries with libnm_glib.la.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2669 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-13 07:54:28 +00:00
Dan Williams
931927a723 2007-08-12 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c
		- (nm_policy_device_change_check): fix policy to deactivate old device
			before activating new one, at least until the multiple active
			device support lands



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2668 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-13 01:57:15 +00:00
Dan Williams
b7df56d512 2007-08-12 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c
		- (nm_policy_new): hook up to connection-added / connection-removed
			signals instead of connections-changed



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2667 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-13 01:45:47 +00:00
Dan Williams
ab43fbb376 2007-08-12 Dan Williams <dcbw@redhat.com>
Kill dhcdbd until it's dead, dead, dead.  Based on a patch from
	Robert Frank <rfrank@redhat.com>

	* src/dhcp-manager/nm-dhcp-manager.c
	  src/dhcp-manager/nm-dhcp-manager.c
	  src/nm-device.c
		- Spawn and communicate with dhclient directly, through means of a
		custom dhclient callout script.  Process callout D-Bus signals
		with dbus-glib instead of hand-rolled dbus.  DHCP timeouts are now
		sent via gobject signals rather than being driven by the dhcp manager
		directly.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2666 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-12 22:41:16 +00:00
Tambet Ingo
6a68d79c08 2007-08-09 Tambet Ingo <tambet@gmail.com>
[Based on patch by Helmut Schaa <hschaa@suse.de>]

        * libnm-glib/nm-client.h:
        * libnm-glib/nm-object.h:
        * libnm-glib/nm-vpn-connection.h:
        * libnm-glib/nm-settings.h:
        * libnm-glib/nm-device.h:
        * libnm-glib/nm-ip4-config.h:
        * libnm-glib/nm-access-point.h:
        * libnm-glib/nm-device-802-3-ethernet.h:
        * libnm-util/nm-setting.h: 
        * libnm-util/nm-connection.h: Add G_BEGIN_DECLS / G_END_DECLS to
        * support C++.

        * libnm-glib/nm-object.c (nm_object_get_byte_property):
        * Implement.

        * libnm-glib/nm-access-point.c: Strength has type char.

        * gnome/vpn-properties/Makefile.am: Remove
        * GNOME_DISABLE_DEPRECTATED for now
        to fix build. GnomeDruid is deprecated in recent libgnomeui.

        * introspection/nm-access-point.xml: Strength property is char,
        * not int.

        * src/NetworkManagerAP.c (set_property): Set strength from char.
        (get_property): Handle hidden APs (with empty SSID).
        Get strength value from char.
        (nm_ap_class_init): Strength property has char type.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2659 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-09 09:19:57 +00:00
Dan Williams
59749f4c33 2007-07-26 Dan Williams <dcbw@redhat.com>
Patch from Bernhard Miklautz <bernhard.miklautz@shacknet.at>

	* src/NetworkManagerSystem.c
		- (nm_system_device_set_ip4_route): don't add the route if it's on the
			same subnet (#437396)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2651 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-07-26 15:07:36 +00:00
Dan Williams
040864f7cb Include NetworkManagerDbus.h to get def for nm_dbus_get_object_path_for_device()
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2645 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-07-26 14:42:13 +00:00
Dan Williams
f4540f0412 2007-06-27 Dan Williams <dcbw@redhat.com>
* Make SSIDs GByteArrays everywhere
	* Rename "essid" -> "ssid" everywhere that's appropriate
	* Refcount activation_ap member of the 802.11 wireless device class



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2620 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-06-27 16:18:52 +00:00
Tambet Ingo
a61f78493d 2007-06-22 Tambet Ingo <tambet@ximian.com>
* Oops, didn't mean to commit that debug spew, fixing.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2617 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-06-22 16:23:16 +00:00
Tambet Ingo
d701939287 2007-06-22 Tambet Ingo <tambet@ximian.com>
* src/nm-device-802-11-wireless.c (merge_scanned_ap): Don't advertise constantly
	that we got a new AP when we just update existing AP properties.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2616 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-06-22 16:21:48 +00:00
Tambet Ingo
636b1140c5 2007-06-21 Tambet Ingo <tambet@ximian.com>
* libnm-glib/Makefile.am: Add NMObject to build, remove nm-utils.[ch].

	* nm-utils.[ch]: Remove.

	* libnm-glib/nm-object.c: Implement a base class for all libnm-glib dbus-aware
	objects for easy property access and dbus connection handling.

	* libnm-glib/nm-client.c: Derive from NMObject.

	* libnm-glib/nm-device.c: Ditto.

	* libnm-glib/nm-device-802-3-ethernet.c: Changes for being based on NMObject.

	* libnm-glib/nm-device-802-11-wireless.c: Ditto.

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

	* libnm-glib/nm-access-point.c: Ditto.

	* libnm-util/nm-connection.c (nm_connection_compare): Add a stub for connection
	comparision. Currently used by the device activation code to determine if the new
	activation is the same as the old one.

	* src/nm-dbus-nmi.c (nm_dbus_get_user_key_for_network): Don't use the obsolete and
	wrong way of getting the dbus path for AP. Fixes the issue where the applet isn't
	able to ask password for the AP.

	* src/nm-device.c (nm_device_activate): Change the logic here - instead of giving
	up if the device is already connected, tear down it's connection (if it isn't the
	same as new one) and start the activation.

	* src/nm-manager.c: Add the beginnings of NMConnection storage and signals.

	* src/NetworkManagerAP.c (nm_ap_init): Set the default values to AP memebers, fixes
	the issue where all APs are always listed as encrypted.

	* src/NetworkManagerDbus.c (nm_dbus_get_object_path_for_network): Remove. APs have
	their own registered paths.

	* test/nm-tool.c (detail_device): Don't try to get active network from wireless
	device if it's not connected - dbus-glib will happily crash trying to marshal NULL.




git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2615 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-06-22 15:09:02 +00:00
Tambet Ingo
a04de676ca 2007-06-13 Tambet Ingo <tambet@ximian.com>
* src/NetworkManagerAP.c (foreach_property_cb): Set WEP capabilities too!
	(0 & 0 == 0, doh)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2594 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-06-13 14:21:54 +00:00
Tambet Ingo
be798e43ab 2007-06-13 Tambet Ingo <tambet@ximian.com>
* src/nm-device.c (nm_device_state_changed): Emit the signal before handling it
	because the handling code will cause the next state change and signal listeners
	get the signals in wrong order.

	* src/NetworkManagerPolicy.c (nm_policy_device_change_check): Get the "old_dev"
	correctly in case of pending activation.




git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2593 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-06-13 11:58:25 +00:00
Tambet Ingo
77cdb55279 2007-06-13 Tambet Ingo <tambet@ximian.com>
* src/nm-device-802-11-wireless.c (nm_device_802_11_wireless_set_activation_ap):
	Convert the essid byte array to string correctly, including the terminating NULL.

	* src/NetworkManagerPolicy.c (create_connection): Create wireless ssid and
	mode with correct types.

	* src/nm-dbus-nmi.c (nm_dbus_get_user_key_for_network): Fix a typo, pass the
	constructed info to dbus call instead of the activation request.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2592 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-06-13 09:30:44 +00:00
Tambet Ingo
9d1808c4e5 2007-06-11 Tambet Ingo <tambet@ximian.com>
* src/nm-device.c: Make the activation stage virtual functions take NMDevice
	argument. The activation request is easy to retrieve.

	* src/nm-activation-request.c: Convert to GObject. Do not include half of NM headers
	just to be a convenient location for devices to store random stuff.




git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2587 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-06-11 13:36:34 +00:00
Christopher Aillon
c50942cf2f 2007-06-11 Christopher Aillon <caillon@redhat.com>
Patch from Alex Smith <alex@alex-smith.me.uk>

	* src/backends/NetworkManagerFrugalware.c:
	Update the FrugalWare backend to fix a few segfaults. (#392642)


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2585 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-06-11 05:47:19 +00:00
Tambet Ingo
5623bf965b 2007-06-06 Tambet Ingo <tambet@ximian.com>
* libnm-util/nm-setting.c: Get rid of dump virtual functions, that can happen
	automagically.
	Implement NMSettingIP4Config.
	Finish NMSettingWired by adding all known members.
	(setting_wired_verify): Implement.
	Finish NMSettingWireless by adding all known members.
	(setting_wireless_verify): Implement.

	* libnm-util/nm-connection.c: Register "ipv4" setting.
	(nm_connection_dump): Implement. Instead of requiring every NMSetting to implement
	dump function, we can introspect the GHashTable which is used for sending connections
	over dbus.

	* src/nm-device-802-11-wireless.c (nm_device_802_11_wireless_set_activation_ap):
	Take GByteArray for essid, it's really not a string.

	* src/nm-device.c (real_act_stage3_ip_config_start): Get information from NMSettings.
	Start DHCP request if setting is not passed or if it states that DHCP should be used.
	(real_act_stage4_get_ip4_config): If settings are provided, use them, even if it
	means overriding the values we got from DHCP.
	(real_activation_cancel_handler): Cancel DHCP transaction only if it has started, doh.
	(nm_device_deactivate_quickly): Ditto.

	* src/nm-device-interface.c (impl_device_activate): Dump the connection structure
	for debugging.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2577 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-06-06 13:33:51 +00:00
Tambet Ingo
ff0fd77b08 2007-05-07 Tambet Ingo <tambet@ximian.com>
* libnm-glib/Makefile.am: Link with libnm-util to gain access to
	NMConnection.

	* libnm-glib/nm-device-802-11-wireless.c:
	(nm_device_802_3_ethernet_activate): Remove.

	* libnm-glib/nm-device-802-3-ethernet.c
	(nm_device_802_3_ethernet_activate): Remove.

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

	* src/nm-device-802-3-ethernet.c: Implement the new activation using
	NMConnection.

	* src/nm-device-802-11-wireless.c: Store an activation AP once the
	activation has started.
	Implement the new activation using NMConnection.

	* src/nm-activation-request.c: Store a generic connection object instead
	of a wireless-specific AP.

	* src/NetworkManagerPolicy.c (create_connection): Implement. Depending
	on device type, create a device specific connection object suitable for
	device activation.

	* src/nm-device.c (nm_device_activate): Re-implement. Call the device
	specific check to validate the connection and on success start the
	activation.

	* src/nm-device-interface.h: Add a activate virtual function to the
	interface definition.

	* src/nm-device-interface.c (nm_device_interface_activate): Implement.
	(impl_device_activate): Implement.

	* introspection/nm-device.xml: Add a generic device activation interface
	that accepts an abstract NMConnection structure that has device-specific
	information in it.

	* introspection/nm-device-802-3-ethernet.xml: Remove the wired-specific
	activation interface.

	* introspection/nm-device-802-11-wireless.xml: Remove the wireless-specific
	activation interface.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2569 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-05-07 15:17:45 +00:00
Tambet Ingo
40db9193d3 2007-05-07 Tambet Ingo <tambet@ximian.com>
* src/nm-dbus-manager.c
	(proxy_name_owner_changed, nm_dbus_manager_class_init): Remove the
	DbusConnection argument from 'name-owner-changed' signal. The manager
	is already passed as a first argument to the signal and the connection
	is easy enough to get from it.

	* src/vpn-manager/nm-vpn-service.c (nm_vpn_service_name_owner_changed):
	Update the signature of the function.

	* src/vpn-manager/nm-vpn-manager.c (nm_name_owner_changed_handler):
	Ditto.

	* src/NetworkManager.c: Ditto.

	* src/named-manager/nm-named-manager.c
	(nm_named_manager_name_owner_changed): Ditto.

	* src/supplicant-manager/nm-supplicant-manager.c
	(nm_supplicant_manager_name_owner_changed): Ditto.

	* src/nm-hal-manager.c (name_owner_changed): Ditto.

	* src/dhcp-manager/nm-dhcp-manager.c
	(nm_dhcp_manager_name_owner_changed): Ditto.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2567 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-05-07 14:33:51 +00:00
Tambet Ingo
5dc9b90a83 2007-05-07 Tambet Ingo <tambet@ximian.com>
* src/nm-hal-manager.c: Add a list of device detectors and creators
	to make it easier to add new devices. Each device type has it's own
	entry in the table so adding new device types is only a matter of
	implementing a couple of functions, one for device detection and the
	other for device creation.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2566 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-05-07 14:27:50 +00:00
Dan Williams
65a7f23b9f 2007-03-30 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerSystem.c
		- (nm_system_device_set_ip4_route): clean up and fix argument
			to nm_dev_sock_open()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2509 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-03-31 01:21:06 +00:00
Tambet Ingo
59d7210d4b 2007-03-28 Tambet Ingo <tambet@ximian.com>
* src/supplicant-manager/nm-supplicant-config.c (get_hash_cb): Marshal the
	data to correct types instead of always using string.

	* src/NetworkManagerAP.c (get_property): AP is encrypted if capabilities does
	_not_ have NM_802_11_CAP_PROTO_NONE.
	(foreach_property_cb): Set AP capabilities if it's not set or if the protocol
	is not set.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2507 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-03-28 13:39:09 +00:00