Commit graph

1921 commits

Author SHA1 Message Date
Saleem Abdulrasool 6dc89ddc9d fix starting of the daemon
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3602 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-27 00:24:58 +00:00
Dan Williams d42eed2b81 2008-04-25 Dan Williams <dcbw@redhat.com>
Patch from Benoit Boissinot <bboissin+networkmanager@gmail.com>

	* src/NetworkManagerSystem.c
		- (nm_system_device_set_ip4_route): reimplement using libnl, not ioctls



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3598 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-25 19:35:27 +00:00
Dan Williams ad96e82e8b 2008-04-25 Dan Williams <dcbw@redhat.com>
Patch from Benoit Boissinot <bboissin+networkmanager@gmail.com>

	* src/NetworkManagerSystem.c
		- (nm_system_device_replace_default_ip4_route): new function; a libnl
			implementation of nm_system_device_replace_default_route()

	* src/NetworkManagerPolicy.c
		- (update_default_route): use nm_system_device_replace_default_ip4_route()

	* src/backends/NetworkManagerArch.c
	  src/backends/NetworkManagerDebian.c
	  src/backends/NetworkManagerFrugalware.c
	  src/backends/NetworkManagerGeneric.c
	  src/backends/NetworkManagerGeneric.h
	  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_replace_default_route): remove



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3597 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-25 19:30:05 +00:00
Dan Williams 00461c208b 2008-04-25 Dan Williams <dcbw@redhat.com>
Patch from Benoit Boissinot <bboissin+networkmanager@gmail.com>

	* src/NetworkManagerSystem.c
		- (validate_ip4_route): remove; use nl_addr_parse() instead
		- (nm_system_device_add_ip4_route_via_device_with_iface): new function,
			replace nm_system_device_add_route_via_device_with_iface() in the
			backends

	* src/backends/NetworkManagerArch.c
	  src/backends/NetworkManagerDebian.c
	  src/backends/NetworkManagerFrugalware.c
	  src/backends/NetworkManagerGeneric.c
	  src/backends/NetworkManagerGeneric.h
	  src/backends/NetworkManagerGentoo.c
	  src/backends/NetworkManagerMandriva.c
	  src/backends/NetworkManagerPaldo.c
	  src/backends/NetworkManagerRedHat.c
	  src/backends/NetworkManagerSlackware.c
	  src/backends/NetworkManagerSuSE.c
		- Remove nm_system_device_add_route_via_device_with_iface()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3596 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-25 19:22:32 +00:00
Dan Williams 2a5f40f955 2008-04-25 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/ifcfg-fedora/parser.c
		- (GET_ONE_DNS): fix parsing of DNS2 & DNS3



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3595 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-25 16:07:08 +00:00
Dan Williams f774d202a8 2008-04-24 Dan Williams <dcbw@redhat.com>
* dispatcher-daemon/NetworkManagerDispatcher.c
		- (nmd_execute_scripts): execute scripts in order as sorted by strcmp()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3593 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-24 19:33:36 +00:00
Dan Williams 805187cb87 2008-04-22 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c
		- (update_routing_and_dns): when checking for a gateway, look at the
			composite IP4 config, not the connection's ip4-config setting, which
			doesn't include DHCP-returned information



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3589 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-23 01:46:36 +00:00
Tambet Ingo e6a5d0be51 2008-04-22 Tambet Ingo <tambet@gmail.com>
Implement GKeyFile system settings plugin.
	Implement writing system settings (currently supported only by GKeyFile plugin).

	* system-settings/src/main.c:
	* system-settings/src/dbus-settings.c: Move the communication with plugins
	from main.c to dbus-settings.c. Makes it possible to talk to all registered
	plugins for adding/updating/removing connections.

	* system-settings/src/nm-system-config-interface.c
	(nm_system_config_interface_add_connection): Implement
	(nm_system_config_interface_update_connection): Implement.
	(nm_system_config_interface_remove_connection): Implement.

	* system-settings/plugins/keyfile/Makefile.am:
	* system-settings/plugins/keyfile/plugin.[ch]:
	* system-settings/plugins/keyfile/writer.[ch]:
	* system-settings/plugins/keyfile/reader.[ch]: Implement.

	* system-settings/plugins/Makefile.am: Add GKeyFile plugin.

	* configure.in: Generate GKeyFile Makefile.

	* libnm-glib/nm-settings.c (impl_exported_connection_get_id): Fix a memory
	corruption, need to duplicate the returned string.
	(impl_exported_connection_update): Implement.
	(impl_exported_connection_delete): Implement.

	* introspection/nm-settings-system.xml: Add "AddConnection" method.

	* introspection/nm-exported-connection.xml: Add "Update" and "Delete" methods.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3587 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-22 14:48:02 +00:00
Dan Williams bfa6b28b59 2008-04-22 Dan Williams <dcbw@redhat.com>
Patch from Charles R. Anderson (cra@wpi.edu)

	* src/NetworkManagerPolicy.c
		- (update_routing_and_dns): don't select devices without a gateway
			as having the default route (rh #437338)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3586 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-22 14:28:52 +00:00
Dan Williams 095da180c8 2008-04-21 Dan Williams <dcbw@redhat.com>
* src/nm-activation-request.c
	  src/nm-activation-request.h
		- (dispose): ensure to disconnect from the device's state-changed signal
			when appropriate so the signal doesn't get handled by an already
			disposed NMActRequest
		- (device_state_changed): update is_default here too just to make sure
			default is only True when the child device is activated
		- (nm_act_request_set_default): new function

	* src/NetworkManagerPolicy.c
		- (update_routing_and_dns): set 'default' on the active connection which
			has the default route and DNS



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3584 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-22 02:40:47 +00:00
Dan Williams d74967e1b6 2008-04-21 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c
		- (device_state_changed): update routing and DNS when a device goes
			into unmanaged or unavailable states too (like rfkill or carrier loss)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3583 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-22 02:38:05 +00:00
Dan Williams 675d12263a 2008-04-21 Dan Williams <dcbw@redhat.com>
* include/NetworkManager.h
		- Add NMActiveConnectionState enum

	* introspection/nm-active-connection.xml
	  introspection/nm-vpn-connection.xml
		- Add 'State' property for overall active connection state
		- Add 'Default' property, when True means this active connection
			has the default route
		- Add PropertyChanged signals so changes actually go out over the bus

	* src/nm-active-connection.h
		- Add defines for State & Default properties

	* src/nm-activation-request.c
		- Add 'state' and 'default' properties, hook up to device 'state-changed'
			signal to determine active connection state

	* src/vpn-manager/nm-vpn-connection.c
	  src/vpn-manager/nm-vpn-connection.h
	  src/vpn-manager/nm-vpn-manager.c
	  src/vpn-manager/nm-vpn-service.c
		- Rename old 'state' to 'vpn-state'
		- Rename nm_vpn_connection_get_state() -> nm_vpn_connection_get_vpn_state()
		- Add 'state' and 'default' properties, hook up to the vpn connection's
			'vpn-state-changed' signal

	* libnm-glib/nm-active-connection.c
	  libnm-glib/nm-active-connection.h
		- Add new 'state' and 'default' properties and accessors

	* libnm-glib/nm-vpn-connection.c
	  libnm-glib/nm-vpn-connection.h
		- Rename old 'state' property to 'vpn-state'
		- Add new 'state' and 'default' properties and accessors



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3582 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-22 00:28:02 +00:00
Dan Williams c961481677 2008-04-21 Dan Williams <dcbw@redhat.com>
* src/nm-ip4-config.c
		- (nm_ip4_config_to_rtnl_addr): fill in the broadcast address if it's
			not specified (rh #443474)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3581 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-21 20:31:23 +00:00
Dan Williams 78e86f91fe 2008-04-20 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerUtils.c
	  src/NetworkManagerUtils.h
		- (nm_utils_merge_ip4_config): new function; merge settings from an
			NMSettingIP4Config to an NMIP4Config object

	* src/nm-device.c
		- (merge_ip4_config): move to NetworkManagerUtils.c

	* src/vpn-manager/nm-vpn-connection.c
		- (nm_vpn_connection_ip4_config_get): merge in user-specified settings
			too



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3580 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-21 03:02:32 +00:00
Dan Williams bab390a897 2008-04-18 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-ppp.c
	  libnm-util/nm-setting-ppp.h
		- Add 'no-vj-comp' option for TCP header compression
		- baud, mru, mtu, lcp_echo_failure, and lcp_echo_interval are really
			uint32



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3578 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-19 01:25:44 +00:00
Dan Williams a99508edb1 2008-04-18 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-ppp.c
	  libnm-util/nm-setting-ppp.h
	  src/ppp-manager/nm-ppp-manager.c
		- Add 'refuse-pap' and 'refuse-mschapv2' options



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3577 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-18 17:55:38 +00:00
Dan Williams 5e3121cee8 2008-04-18 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-ppp.c
	  libnm-util/nm-setting-ppp.h
	  src/ppp-manager/nm-ppp-manager.c
		- Remove the 'usepeerdns' option and always request DNS servers from
			the PPP server; the connection chooses to use/override/ignore the
			DNS servers returned from the PPP server



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3576 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-18 16:48:56 +00:00
Dan Williams a8f9a8d38e 2008-04-18 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-ppp.c
	  libnm-util/nm-setting-ppp.h
	  src/ppp-manager/nm-ppp-manager.c
		- Remove the 'require-mppc' option, because pppd doesn't support it and
			it seems to have been an erroneous addition to the PPTP plugin in
			the first place (from which the ppp-manager is derived)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3575 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-18 16:37:35 +00:00
Dan Williams d37629c6ca 2008-04-17 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-pppoe.c
		- (verify): require a PPP setting too

	* src/ppp-manager/nm-ppp-manager.c
		- (nm_ppp_manager_start): fail if no PPP setting is present instead of
			segfaulting



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3574 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-17 23:21:27 +00:00
Dan Williams 208864fcf5 2008-04-17 Dan Williams <dcbw@redhat.com>
* src/nm-device.c
		- (nm_device_state_changed): do deactivation and and promotion to
			unavailable here, so that the device gets cleaned up before the
			manager runs and starts emitting signals; do the
			FAILED->DISCONNECTED transition from an idle handler rather than
			immediately to guard against recursion
		- (nm_device_deactivate_quickly, nm_device_dispose): stop the
			FAILED->DISCONNECTED handler if it's scheduled



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3573 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-17 23:04:34 +00:00
Dan Williams e2e9680e7d 2008-04-17 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (state_changed_cb): clear AP list when device transitions to
			unavailable or unmanaged
		- (nm_device_802_11_wireless_dispose): remove redundant set_current_ap()
			since this is already done in device_cleanup()
		- (supplicant_iface_scanned_ap_cb): don't leak new APs when the device
			isn't available or managed
		- (device_cleanup): use remove_all_aps()
		- (remove_all_aps): consolidate code removing all APs



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3572 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-17 17:09:59 +00:00
Dan Williams bcbf96cf7f 2008-04-17 Dan Williams <dcbw@redhat.com>
* src/nm-serial-device.c
	  src/nm-serial-device.h
		- (wait_for_reply_got_data): break input into lines, and search each
			line for responses _and_ terminator strings; also make sure that
			the read loop doesn't continue after the timeout is supposed to fire
		- (nm_serial_device_wait_for_reply): take an array of terminators too

	* src/nm-gsm-device.c
	  src/nm-cdma-device.c
		- Send terminators to nm_serial_device_wait_for_reply()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3570 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-17 11:08:52 +00:00
Dan Williams 48971a4e85 2008-04-16 Dan Williams <dcbw@redhat.com>
Patch from 陈鑫 <znscnchen@gmail.com>

	* src/ppp-manager/nm-pppd-plugin.c
		- (get_credentials): return correct value for success; handle case where
			pppd just does some checking but doesn't want a password
		- (plugin_init): make CHAP work too



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3569 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-16 20:05:09 +00:00
Dan Williams d095a32ee2 2008-04-16 Dan Williams <dcbw@redhat.com>
Patch from 陈鑫 <znscnchen@gmail.com>

	* src/ppp-manager/nm-ppp-manager.c
		- (create_pppd_cmd_line): fix argument generation when spawning pppd



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3568 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-16 19:48:15 +00:00
Dan Williams 217cccd22a 2008-04-16 Dan Williams <dcbw@redhat.com>
Patch from 陈鑫 <znscnchen@gmail.com>

	* src/nm-device-802-3-ethernet.c
		- (real_deactivate_quickly): clear the IP interface name on
			deactivation, otherwise the wrong interface might get used later
			for routing and IP management



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3567 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-16 19:47:24 +00:00
Dan Williams 702ad9c9a8 2008-04-15 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device.c
		- (get_product_and_vendor): handle serial devices correctly
		- (nm_device_update_description): pass device to get_product_and_vendor()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3565 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-16 13:41:56 +00:00
Dan Williams a993d446d5 2008-04-15 Dan Williams <dcbw@redhat.com>
Patch from Benoit Boissinot <bboissin+networkmanager@gmail.com>

	* src/NetworkManagerSystem.h
	  src/backends/NetworkManagerArch.c
	  src/backends/NetworkManagerDebian.c
	  src/backends/NetworkManagerFrugalware.c
	  src/backends/NetworkManagerGeneric.c
	  src/backends/NetworkManagerGeneric.h
	  src/backends/NetworkManagerGentoo.c
	  src/backends/NetworkManagerMandriva.c
	  src/backends/NetworkManagerPaldo.c
	  src/backends/NetworkManagerRedHat.c
	  src/backends/NetworkManagerSlackware.c
	  src/backends/NetworkManagerSuSE.c
	  src/nm-device.c
		- (nm_generic_device_add_ip6_link_address,
		   nm_system_device_add_ip6_link_address): remove



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3564 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-15 21:01:47 +00:00
Dan Williams 1c885c6aa1 2008-04-15 Dan Williams <dcbw@redhat.com>
Patch from Benoit Boissinot <bboissin+networkmanager@gmail.com>

	* src/backends/NetworkManagerArch.c
	  src/backends/NetworkManagerDebian.c
	  src/backends/NetworkManagerFrugalware.c
	  src/backends/NetworkManagerGeneric.c
	  src/backends/NetworkManagerGeneric.h
	  src/backends/NetworkManagerGentoo.c
	  src/backends/NetworkManagerMandriva.c
	  src/backends/NetworkManagerPaldo.c
	  src/backends/NetworkManagerRedHat.c
	  src/backends/NetworkManagerSlackware.c
	  src/backends/NetworkManagerSuSE.c
	  src/NetworkManagerSystem.h
		- flush_routes -> flush_ip4_routes
		- flush_addresses -> flush_ip4_addresses

	* src/NetworkManagerSystem.c
	  src/nm-device.c
	  src/vpn-manager/nm-vpn-connection.c
		- flush only IPv4 addresses; don't touch IPv6 routes and addresses



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3563 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-15 20:59:37 +00:00
Dan Williams 1e1c99afba 2008-04-15 Dan Williams <dcbw@redhat.com>
Remove exposure of wireless-tools mode types in the API.

	* include/NetworkManager.h
		- Define NM80211Mode enum

	* introspection/generic-types.xml
		- Describe NM_802_11_MODE enum
		- Remove IW_MODE_* enum

	* introspection/nm-access-point.xml
	  libnm-glib/nm-access-point.c
	  libnm-glib/nm-access-point.h
		- 'mode' is now of type NM80211Mode, a DBUS_TYPE_UINT

	* introspection/nm-device-802-11-wireless.xml
	  libnm-glib/nm-device-802-11-wireless.c
	  libnm-glib/nm-device-802-11-wireless.h
		- 'mode' is now of type NM80211Mode, a DBUS_TYPE_UINT

	* libnm-util/nm-setting-wireless.c
	  src/NetworkManagerAP.c
	  src/NetworkManagerAP.h
	  src/nm-device-802-11-wireless.c
	  src/nm-device-802-11-wireless.h
	  test/nm-tool.c
		- Use NM80211Mode not IW_MODE_*



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3562 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-15 20:39:34 +00:00
Dan Williams 95c44ecc1f 2008-04-15 Dan Williams <dcbw@redhat.com>
Enhance nm-online based on a patch from Bill Nottingham.

	* test/nm-online.c
		- Add a '-q' option
		- Add help messages and option summary
		- Add long-format options
		- Add a '-x' option to exit if NM isn't running or isn't connecting



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3561 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-15 19:47:23 +00:00
Tambet Ingo 0d91f460d6 2008-04-15 Tambet Ingo <tambet@gmail.com>
* libnm-util/nm-setting.c (nm_setting_duplicate): Implement.

	* libnm-util/nm-connection.c (nm_connection_remove_setting): Implement.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3560 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-15 16:03:26 +00:00
Dan Williams 84011a9a5c 2008-04-15 Dan Williams <dcbw@redhat.com>
* nm-setting-ip4-config.c
		- (ip4_addresses_from_gvalue): handle NULL address array

	* nm-setting-8021x.c
		- (verify_tls, verify_ttls): warn on failed verification



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3559 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-15 14:09:56 +00:00
Dan Williams 01abb70354 2008-04-10 Dan Williams <dcbw@redhat.com>
* src/nm-gsm-device.c
		- (automatic_registration): accept "+CREG: 0,0"
		- (automatic_registration_response): fail on "+CREG: 0,0"



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3556 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-10 18:37:14 +00:00
Tambet Ingo 252ab39a71 2008-04-10 Tambet Ingo <tambet@gmail.com>
* libnm-util/nm-setting-wired.c (get_property): Fix a typo.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3552 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-10 14:56:12 +00:00
Tambet Ingo 3923ddc618 2008-04-10 Tambet Ingo <tambet@gmail.com>
* system-settings/plugins/ifcfg-suse/parser.c (make_wireless_security_setting):
	Make it compile again by commenting out broken code that at first didn't work and
	now didn't compile either.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3550 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-10 07:57:43 +00:00
Dan Williams 9a49506152 2008-04-08 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-object-cache.c
	  libnm-glib/nm-settings.c
	  src/dhcp-manager/nm-dhcp-manager.c
	  system-settings/plugins/ifcfg-fedora/plugin.c
	  system-settings/plugins/ifcfg-suse/plugin.c
	  system-settings/src/nm-system-config-hal-manager.c
	  libnm-util/nm-utils.c
		- Remove usage of GStaticMutex since gcc-4.3 hates it and because we're
			not threadsafe anyway



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3548 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-08 21:15:45 +00:00
Dan Williams c066672f6a 2008-04-08 Dan Williams <dcbw@redhat.com>
* system-settings/src/main.c
		- (load_stuff, device_added_cb, device_removed_cb): device added/removed
			callbacks take a device type too



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3546 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-08 17:55:52 +00:00
Dan Williams 0825542f26 2008-04-08 Dan Williams <dcbw@redhat.com>
The system settings service will now create a new default DHCP connection
	for wired devices that have no existing applicable connection.

	* system-settings/src/nm-system-config-hal-manager.c
	  system-settings/src/nm-system-config-hal-manager.h
		- (nm_system_config_hal_manager_get_type_for_udi): new function

	* system-settings/src/dbus-settings.c
	  system-settings/src/dbus-settings.h
		- (nm_sysconfig_settings_get_connections): new function
		- (nm_sysconfig_settings_is_device_managed): new function

	* system-settings/src/main.c
		- (load_stuff): check for wired devices that need a default connection
		- (get_details_for_udi): get interface and MAC address from HAL
		- (add_default_dhcp_connection): add a default connection for a wired
			device if needed
		- (device_added_cb, device_removed_cb): do the right thing with
			wired devices and their default connections on HAL device events



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3544 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-08 14:57:17 +00:00
Dan Williams c53aa093e1 2008-04-07 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device.c
	  libnm-glib/nm-device.h
		- Proxy the 'managed' property



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3543 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-08 03:58:43 +00:00
Dan Williams ff2b85dc3f 2008-04-07 Dan Williams <dcbw@redhat.com>
* src/nm-gsm-device.c
	  src/nm-cdma-device.c
		- (state_changed_cb): when entering UNAVAILABLE state, schedule an idle
			handler to transition to DISCONNECTED



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3542 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-08 03:58:17 +00:00
Dan Williams 34d5841b76 2008-04-07 Dan Williams <dcbw@redhat.com>
Patch from Bill Nottingham

	* dispatcher-daemon/NetworkManagerDispatcher.c
		- ignore backup/packaging crufy (rh #440143)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3541 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-08 03:49:40 +00:00
Dan Williams 54aac18883 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
Dan Williams d773c8986a 2008-04-07 Dan Williams <dcbw@redhat.com>
* marshallers/nm-marshal.list
		- Add VOID:STRING,UINT marshaller for system settings HAL manager



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3539 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-08 01:43:17 +00:00
Dan Williams 5ba11eecab 2008-04-07 Dan Williams <dcbw@redhat.com>
* system-settings/src/main.c
		- (unmanaged_devices_changed_cb, register_plugin): proxy changes from
			plugins to the dbus settings object
		- (load_stuff): start the dbus service after grabbing unmanaged devices
		- (dbus_reconnect, dbus_cleanup): make HAL manager aware of dbus events
		- (log_handler, logging_setup, logging_shutdown): log output to syslog
		- (main): switch default logging to syslog with a 'debug' option to
			output to console; start up the HAL manager



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3538 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-08 01:41:49 +00:00
Dan Williams 67149b36f4 2008-04-07 Dan Williams <dcbw@redhat.com>
* introspection/nm-settings-system.xml
	  introspection/Makefile.am
		- Define the unmanaged devices interface for the system settings service

	* system-settings/src/nm-system-config-hal-manager.c
	  system-settings/src/nm-system-config-hal-manager.h
	  system-settings/src/nm-system-config-hal-manager-private.h
	  system-settings/src/Makefile.am
		- Add a lightweight HAL manager object for tracking network devices for
			the purpose of determining unmanaged devices and which devices need
			the default DHCP connections

	* system-settings/src/nm-system-config-interface.c
	  system-settings/src/nm-system-config-interface.h
		- (nm_system_config_interface_init): add the HAL manager as an argument
		- (nm_system_config_interface_get_unmanaged_devices): implement
		- Define 'unmanaged-devices-changed' signal

	* system-settings/src/dbus-settings.c
	  system-settings/src/dbus-settings.h
		- Implement the unmanaged devices interface; some cleanups

	* system-settings/plugins/ifcfg-suse/plugin.c
		- Fixup for plugin interface changes

	* system-settings/plugins/ifcfg-fedora/plugin.c
		- (get_ether_device_udi): new function; find the device that has
			a specified MAC address and return its UDI
		- (get_udi_for_connection): new function; try to find the specific
			device a connection is locked to, if any
		- (device_added_cb, device_removed_cb): update unmanaged device list in
			response to HAL events
		- (get_unmanaged_devices): new function; return unmanaged device list
		- (build_one_connection): set the connection's locked device, if any
		- (write_auto_wired_connection): remove
		- (kill_old_auto_wired_file): remove the ifcfg-Auto Wired file if found
		- (handle_connection_changed): alert listeners that the unmanaged device
			list has changed
		- (init): fixup for plugin interface changes, implement unmanaged devices

	* system-settings/plugins/ifcfg-fedora/parser.c
	  system-settings/plugins/ifcfg-fedora/parser.h
		- (connection_data_free): clean up connection UDI



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3537 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-08 01:36:39 +00:00
Dan Williams dcbfae2c1e 2008-04-07 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/ifcfg-fedora/parser.c
		- (make_ip4_setting): fix parsing of DNS servers



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3536 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-07 22:57:29 +00:00
Dan Williams 0422784433 2008-04-05 Dan Williams <dcbw@redhat.com>
* Makefile.am
	  configure.in
	  marshallers/Makefile.am
	  marshallers/nm-marshal-main.c
	  marshallers/nm-marshal.list
		- Consolidate marshallers

	* libnm-glib/nm-marshal-main.c
	  libnm-glib/nm-marshal.list
	  src/marshallers/Makefile.am
	  src/marshallers/nm-marshal-main.c
	  src/marshallers/nm-marshal.list
		- Remove

	* libnm-glib/Makefile.am
	  src/Makefile.am
	  src/dhcp-manager/Makefile.am
	  src/ppp-manager/Makefile.am
	  src/supplicant-manager/Makefile.am
	  src/vpn-manager/Makefile.am
		- Use consolidated marshallers



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3533 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-05 16:28:24 +00:00
Dan Williams d60d61c9d1 2008-04-04 Dan Williams <dcbw@redhat.com>
* src/nm-hal-manager.c
	  src/nm-hal-manager.h
		- (hal_init): don't look for hardware here
		- (nm_hal_manager_start): new function; look for hardware here instead,
			which can be done at a later time than hal_init()

	* src/NetworkManager.c
		- (main): start HAL manager after entering the main loop



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3530 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-04 14:59:30 +00:00
Dan Williams f934f0b1f7 2008-04-03 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-settings.c
	  libnm-glib/nm-settings.h
	    - (nm_exported_connection_get_id): new function
		- (impl_exported_connection_get_id): use nm_exported_connection_get_id()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3528 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-03 18:19:19 +00:00
Dan Williams 85eb6bd5c3 2008-04-02 Dan Williams <dcbw@redhat.com>
* src/nm-device-interface.c
	  src/nm-device-interface.h
	  src/nm-device.c
	  src/nm-device.h
		- Rename check_connection_conflicts() to check_connection_compatible()

	* src/nm-device-802-11-wireless.c
		- (real_check_connection_conflicts): remove
		- (real_check_connection_compatible): implement; match MAC address

	* src/nm-device-802-3-ethernet.c
		- (real_check_connection_conflicts): remove
		- (real_check_connection_compatible): implement; match MAC address
		- (real_get_best_auto_connection): correctly handle PPPoE cases

	* src/nm-manager.c
		- (check_connection_allowed): remove; unused until PolicyKit integration
		- (internal_activate_device): check whether the connection is compatible
			with the device before trying to activate it



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3527 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-02 17:44:52 +00:00
Dan Williams ebccea23f9 2008-04-02 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/ifcfg-fedora/parser.c
		- (read_mac_address): new function; read in MAC address and stuff it
			into the connection
		- (add_one_wep_key): remove debug spew
		- (make_wireless_security_setting): validate the default TX key; don't
			add the wireless-security setting if the connection doesn't need
			security; don't leak the keys shvarFile on error cases
		- (make_wireless_setting, make_wired_setting): populate device's MAC
			address



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3526 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-02 17:39:35 +00:00
Dan Williams 63ac0d725e 2008-04-02 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-connection.c
	  libnm-util/nm-setting-connection.h
		- (set_property, get_property, nm_setting_connection_class_init): remove
			the 'lockdown' property; it's functionality will be replaced by
			PolicyKit instead



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3525 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-02 17:36:07 +00:00
Dan Williams e9e6f3124c 2008-04-01 Dan Williams <dcbw@redhat.com>
Patch from Per Øyvind Karlsen <peroyvind@mandriva.org>

	* configure.in
	  initscript/Makefile.am
	  initscript/Mandriva/Makefile.am
	  initscript/Mandriva/networkmanager.in
	  initscript/Mandriva/networkmanagerdispatcher.in
	  src/backends/Makefile.am
	  src/backends/NetworkManagerMandriva.c
	  system-settings/plugins/Makefile.am
		- Add Mandriva support



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3523 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-01 21:26:09 +00:00
Dan Williams 7ab262c972 2008-03-31 Dan Williams <dcbw@redhat.com>
* src/vpn-manager/nm-vpn-service.c
		- (nm_vpn_service_daemon_exec): add an error argument so that spawn
			errors can be passed back to the caller; also no longer scheduled
			as an idle handler, but called directly; and bump up VPN service
			spawn timeout, 2s is really short
		- (nm_vpn_service_activate): don't schedule the VPN service activation,
			but call it directly so that errors are reported on return from
			ActivateConnection() and don't get lost.  If scheduled as an idle
			handler, clients don't have the time to query NM for the new VPN
			connection's properties before the VPN connection is torn down again
			if the service couldn't be launched, and therefore launch errors
			get lost.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3521 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-31 14:53:27 +00:00
Dan Williams db81b8a279 2008-03-31 Dan Williams <dcbw@redhat.com>
* src/vpn-manager/nm-vpn-connection.c
		- (device_state_changed): send correct state on device failure too
		- (plugin_state_changed): failed state means unexpected disconnection,
			thus if the service goes away while the VPN connection is activated
			that's a failure too



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3520 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-31 14:50:18 +00:00
Dan Williams bbc3153e8f 2008-03-31 Dan Williams <dcbw@redhat.com>
* src/vpn-manager/nm-vpn-manager.c
	  src/vpn-manager/nm-vpn-manager.h
		- Make VPNManager errors more available; add a service-start-failed error



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3519 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-31 14:48:39 +00:00
Dan Williams 59731b9cbd 2008-03-31 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-client.c
	  libnm-glib/nm-client.h
		- (activate_cb): pass the new active connection to callback; fix
			message when no callback is specified



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3518 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-31 14:47:19 +00:00
Dan Williams 62cebd438f 2008-03-30 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-wireless-security.c
		- (need_secrets): only require key0 if the transmit key index is also
			0
		- (verify): reject non-NULL but zero-length WEP keys; these are invalid



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3515 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-30 14:25:54 +00:00
Dan Williams 6fc5e8143f 2008-03-29 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-8021x.c
	  libnm-util/nm-setting-ip4-config.c
	  libnm-util/nm-setting-vpn-properties.c
	  libnm-util/nm-setting-vpn.c
	  libnm-util/nm-setting-wireless-security.c
	  libnm-util/nm-setting-wireless.c
	  libnm-util/nm-utils.c
	  src/dhcp-manager/nm-dhcp-manager.c
	  src/nm-activation-request.c
	  src/nm-ip4-config.c
	  src/nm-manager.c
	  src/nm-properties-changed-signal.c
	  src/ppp-manager/nm-pppd-plugin.c
	  src/supplicant-manager/nm-supplicant-interface.c
	  src/vpn-manager/nm-vpn-connection.c
		- consistently use nm-dbus-glib-types.h



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3514 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-29 21:35:41 +00:00
Dan Williams 0f4c0fca53 2008-03-29 Dan Williams <dcbw@redhat.com>
* src/vpn-manager/nm-vpn-connection.c
		- (nm_vpn_connection_class_init): PROP_SPECIFIC_OBJECT should be boxed,
			not string

	* src/nm-activation-request.c
		- (nm_act_request_class_init): PROP_SPECIFIC_OBJECT should be boxed,
			not string



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3513 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-29 20:53:03 +00:00
Dan Williams 961e3e7bf7 2008-03-29 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device-802-11-wireless.c
		- (access_point_added_proxy): create new APs if not found



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3512 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-29 20:07:30 +00:00
Dan Williams 512350a5cd 2008-03-29 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-client.c
		- (proxy_name_owner_changed): tell wireless devices about rfkill state
			before freeing them



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3511 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-29 20:03:07 +00:00
Dan Williams d98c159e6b 2008-03-29 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/ifcfg-fedora/parser.c
		- Fix parsing of WEP keys; ifcfg files use indexes [1...4] rather than
			[0...3]; also handle KEY correctly in combination with DEFAULTKEY



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3509 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-29 12:57:44 +00:00
Dan Williams c1aaea48ff 2008-03-29 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/ifcfg-fedora/parser.c
		- (get_one_wep_key, make_wireless_security_setting): handle "KEY" too



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3508 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-29 12:01:25 +00:00
Dan Williams c01b4c9e2e 2008-03-27 Dan Williams <dcbw@redhat.com>
* nm-object.c
		- (nm_object_queue_notify): don't notify multiple times for the same
			property

	* nm-object-private.h
		- (handle_ptr_array_return): return NULL if the given array is NULL or
			if it has zero elements

	* nm-ip4-config.c
		- (finalize): use g_ptr_array_foreach() when freeing domains
		- (nm_ip4_config_get_domains): use handle_ptr_array_return()

	* nm-active-connection.c
		- (nm_active_connection_get_devices): use handle_ptr_array_return()

	* nm-device-802-11-wireless.c
	  nm-device-802-11-wireless.h
		- (nm_device_802_11_wireless_get_access_points): return const; use
			handle_ptr_array_return()

	* nm-types.c
		- (nm_object_array_demarshal): always create an array, even of length
			zero, to distinguish between "NM returned no items" and "haven't
			asked NM yet"

	* nm-client.c
		- (dispose): free active connections too
		- (proxy_name_owner_changed): free active connections too when NM goes
			away
		- (nm_client_get_devices): return const; use handle_ptr_array_return()
		- (nm_client_get_active_connections): use handle_ptr_array_return()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3506 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-27 14:10:43 +00:00
Dan Williams ec89663e7d 2008-03-26 Dan Williams <dcbw@redhat.com>
Rework VPN connection handling for a more consistent D-Bus API.  The
	VPNManager object has been removed, and active VPN connections are now the
	same as any other active connection.  The Manager object's ActivateConnection
	and DeactivateConnection methods are used to start and stop a VPN connection,
	and the VPNConnection objects are subclasses of the ActiveConnection objects.
	When activating a VPN connection, pass the path of the active connection
	to which the VPN connection is tied in the 'specific_object' argument.

	Consequently, the libnm-glib API has been reworked to match this arrangement,
	with the VPNManager object removed, and the NMVPNConnection objects now
	being subclasses of NMActiveConnection.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3504 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-26 13:43:01 +00:00
Dan Williams 7d694073be 2008-03-25 Dan Williams <dcbw@redhat.com>
Patch from Björn Martensen <bjoern.martensen@gmail.com>

	* initscript/Arch/networkmanager.in
	  initscript/Arch/networkmanager-dispatcher.in
		- Updates for Arch Linux



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3503 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-25 13:21:08 +00:00
Dan Williams 56010ad03a 2008-03-25 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-ip4-config.c
	  libnm-glib/nm-active-connection.c
	  libnm-glib/nm-access-point.c
		- Use nm_object_queue_notify() instead of g_object_notify()

	* libnm-glib/nm-device.c
		- (demarshal_ip4_config): distinguish between successful but missing
			ip4-config request, and unsuccessful and missing ip4-config request
		- (nm_device_get_ip4_config): don't try to demarshal a NULL ip4-config
			path
		- Use nm_object_queue_notify() instead of g_object_notify()

	* libnm-glib/nm-device-802-11-wireless.c
		- (demarshal_active_ap): distinguish between successfull but missing
			active-ap request, and unsuccessful and missing active-ap request
		- (dispose, clean_up_aps): consolidate AP list and active AP clearing
			code
		- (nm_device_802_11_wireless_set_wireless_enabled): add a private hook
			for the NMClient to notify the device that wireless is disabled,
			and therefore to clear the AP list and active AP
		- Use nm_object_queue_notify() instead of g_object_notify()

	* libnm-glib/nm-client.c
		- (poke_wireless_devices_with_rf_status): new function
		- (update_wireless_status): notify wireless devices of the rfkill status
			so they can clean up if needed
		- Use nm_object_queue_notify() instead of g_object_notify()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3502 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-25 12:41:17 +00:00
Dan Williams 9a163be59a 2008-03-25 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-object.c
	  libnm-glib/nm-object-private.h
		- (nm_object_queue_notify): add helper to batch & postpone GObject notify
			signals to an idle handler
		- (nm_object_get_property): add a timeout to the D-Bus method call



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3501 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-25 11:34:33 +00:00
Dan Williams c5a9312e24 2008-03-24 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-client.c
		- (client_device_added_proxy): add new devices to the internal device
			list so they appear to clients



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3496 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-24 19:30:11 +00:00
Dan Williams 007351657f 2008-03-24 Dan Williams <dcbw@redhat.com>
Massive fixup of libnm-glib to:
	a) have all objects (with the exception of VPN) cache their properties and
		update them asynchronously on PropertiesChanged signals from NM
	b) return internal const data for most attributes/properties instead of
		allocated values that the caller must free
	c) cache wrapped objects such that a given D-Bus path will always map to the
		same GObject returned by libnm-glib
	d) remove a few signals and move them to GObject property notifications
	e) match recent NM D-Bus API changes for activation/deactivation
	f) remove some private functions from libnm-glib headers



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3491 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-24 15:17:30 +00:00
Dan Williams 25527878c7 2008-03-20 Dan Williams <dcbw@redhat.com>
* src/nm-manager.c
		- (nm_manager_update_state, manager_device_state_changed,
		   nm_manager_activate_device, connection_added_default_handler,
		   impl_manager_activate_connection, impl_manager_deactivate_connection):
			queue PropertyChanged singals when the active connections change



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3486 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-20 21:20:32 +00:00
Dan Williams 393685203f 2008-03-20 Dan Williams <dcbw@redhat.com>
* introspection/nm-manager.xml
	  introspection/nm-manager-client.xml
		- (ActivateConnection): return the object path of the active connection
			on success
		- (GetActiveConnections): remove
		- (DeactivateConnection): new function; deactivate a currently active
			connection
		- Add an ActiveConnections property which returns an array of
			active connection object paths

	* introspection/nm-device.xml
		- (Deactivate): remove

	* introspection/all.xml
		- Add ActiveConnection introspection

	* introspection/nm-active-connection.xml
		- Add the ActiveConnection object

	* include/NetworkManager.h
		- Add the Connection.Active D-Bus interface

	* src/nm-device-interface.c
		- (impl_device_deactivate): remove

	* src/nm-activation-request.c
	  src/nm-activation-request.c
	  src/Makefile.am
		- Implement the Connection.Active D-Bus interface

	* src/nm-manager.c
		- (get_property, nm_manager_class_init): add ACTIVE_CONNECTIONS property
		- (nm_manager_activate_device): return the active connection path
		- (connection_added_default_handler, impl_manager_activate_connection):
			return the active connection to the caller
		- (add_one_connection_element, impl_manager_get_active_connections):
			remove
		- (impl_manager_deactivate_connection): new function; deactivate an
			active connection

	* libnm-glib/nm-device.c
	  libnm-glib/nm-device.h
		- Remove Deactivate() function



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3484 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-20 19:56:12 +00:00
Dan Williams fbb5062271 2008-03-19 Dan Williams <dcbw@redhat.com>
* introspection/nm-manager.xml
	  introspection/nm-manager-client.xml
		- Rename the ActivateDevice method to ActivateConnection to better
			reflect it's usage; it's arguments get reordered a bit too
		- Convert GetActiveConnections method return from a struct to a dict

	* include/NetworkManager.h
		- Define the dict keys for return value of GetActiveConnections

	* src/nm-manager.c
		- impl_manager_activate_device -> impl_manager_activate_connection
		- (add_one_connection_element): return a populated hash table, not
			a structure

	* libnm-glib/nm-client.c
	  libnm-glib/nm-client.h
		- nm_client_activate_device -> nm_client_activate_connection
		- nm_client_free_active_connection_element -> nm_client_free_active_connections_element
		- (nm_client_get_active_connections): return a GSList of GHashTables,
			instead of the custom structures.  Each element of the returned list
			must be freed with nm_client_free_active_connections_element()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3482 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-19 20:58:21 +00:00
Tambet Ingo 731cacc944 Author: Tambet Ingo <tambet@gmail.com>
Date:   Tue Mar 18 21:46:10 2008 -0600

    2008-03-18  Tambet Ingo  <tambet@gmail.com>

    	* src/ppp-manager/nm-ppp-manager.c (nm_ppp_manager_update_secrets): Don't
    	print out username and password, it's supposed to be a secret.

    	* src/nm-device-802-3-ethernet.c (ppp_state_changed): Handle authentication
    	request and set the device state accordingly.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3481 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-19 15:27:59 +00:00
Dan Williams 37c767224a 2008-03-18 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/ifcfg-fedora/parser.c
	  system-settings/plugins/ifcfg-fedora/parser.h
	  system-settings/plugins/ifcfg-fedora/plugin.c
		- Read settings from /etc/sysconfig/network-scripts/ instead of using
			profiles.  DNS servers and searches must now be stored in the ifcfg
			files themselves



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3475 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-19 03:08:32 +00:00
Tambet Ingo 5ec18a31df 2008-03-18 Tambet Ingo <tambet@gmail.com>
* src/nm-device-802-3-ethernet.c: Implement wired 802.1x authentication.

	* libnm-util/nm-setting-wireless-security.h: Fix a typo.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3474 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-18 22:19:09 +00:00
Dan Williams 79491652e7 2008-03-18 Dan Williams <dcbw@redhat.com>
* src/vpn-manager/nm-vpn-connection.c
		- (get_secrets_cb): handle new GetSecrets return format



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3473 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-18 17:35:51 +00:00
Dan Williams e117bad293 2008-03-18 Dan Williams <dcbw@redhat.com>
Adapt system settings service for split 802.1x.

	* system-settings/src/nm-system-config-interface.h
		- clarify return value of get_secrets()

	* system-settings/src/dbus-settings.c
		- (string_to_gvalue, destroy_gvalue, add_one_secret_to_hash): remove
		- (check_for_secrets): check if there actually secrets returned by a
			plugin
		- (exported_connection_get_secrets): just return the plugin-returned
			hash of settings' secrets if it looks valid

	* system-settings/plugins/ifcfg-fedora/plugin.c
		- (get_secrets): add split secrets with correct format to reply hash

	* system-settings/plugins/ifcfg-fedora/parser.c
	  system-settings/plugins/ifcfg-fedora/parser.h
		- (copy_one_cdata_secret, connection_data_copy_secrets,
		   connection_data_free, connection_data_add): keep secrets for
			different settings in different hashes



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3472 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-18 15:30:50 +00:00
Tambet Ingo 76f418666b Author: Tambet Ingo <tambet@gmail.com>
Date:   Mon Mar 17 12:27:01 2008 -0600

    2008-03-17  Tambet Ingo  <tambet@gmail.com>

    	Clean up activating device deactivation.

    	* src/nm-device.c (real_activation_cancel_handler): Remove. The same thing
    	should be done whether the device activation gets cancelled or the device
    	is just getting deactivated.
    	(nm_device_activation_cancel): Remove.
    	(nm_device_deactivate_quickly): Handle the case where device is activating.

    	* src/nm-device-802-11-wireless.c (real_activation_cancel_handler): Remove.
    	It does the exact same thing as real_deactivate_quickly().


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3471 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-17 20:59:54 +00:00
Dan Williams 70e79d60dd 2008-03-17 Dan Williams <dcbw@redhat.com>
Split the 802.1x bits out of the wireless-security setting so they are
	generalized enough for wired 802.1x to use too.

	* introspection/nm-exported-connection.xml
		- GetSecrets now returns 'a{sa{sv}}' (a hash of settings hashes) instead
			of just a hash of the secrets for one setting

	* libnm-util/nm-setting-wireless-security.c
	  libnm-util/nm-setting-wireless-security.h
		- Remove 802.1x-specific stuff
		- Added leap-username and leap-password properties for old-school LEAP

	* src/nm-device.c
	  src/nm-device.h
		- (connection_secrets_updated_cb): take a list of updated settings names,
			not just one

	* src/supplicant-manager/nm-supplicant-config.c
	  src/supplicant-manager/nm-supplicant-config.h
		- (nm_supplicant_config_add_setting_wireless_security): remove 802.1x
			specific stuff; fix for updated LEAP bits; punt 802.1x stuff
			to nm_supplicant_config_add_setting_8021x()
		- (nm_supplicant_config_add_setting_8021x): add an 802-1x setting to
			the supplicant config

	* src/nm-device-802-11-wireless.c
		- (build_supplicant_config): pass in the 802.1x setting too, if any
		- (real_connection_secrets_updated): take a list of updated settings
			names, not just one

	* src/nm-device-802-3-ethernet.c
	  src/nm-cdma-device.c
	  src/nm-gsm-device.c
		- (real_connection_secrets_updated_cb): take a list of updated settings
			names, not just one

	* src/nm-activation-request.c
	  src/nm-activation-request.h
		- (nm_act_request_class_init): the 'connection-secrets-updated' signal
			now passes a list of updated settings names, not just one
		- (update_one_setting): new function; handle one updated setting
		- (get_secrets_cb): handle multiple settings returned from the
			settings service; have to be careful of ordering here as there are
			some dependencies between settings (ex. wireless-security and 802.1x
			in some cases)

	* src/marshallers/nm-marshal.list
		- new marshaller for connection-secrets-updated signal

	* libnm-util/nm-setting-8021x.c
		- Add back the 'pin' and 'psk' settings, for EAP-SIM and EAP-PSK auth
			methods
		- (verify): a valid 'eap' property is now required

	* libnm-util/nm-connection.c
		- (register_default_settings): add priorities to settings; there are
			some dependencies between settings, and during the need_secrets
			calls this priority needs to be respected.  For example, only the
			wireless-security setting knows whether or not the connection is
			going to use 802.1x or now, so it must be asked for secrets before
			any existing 802.1x setting is
		- (nm_connection_lookup_setting_type): expose

	* libnm-util/nm-setting-wireless.c
		- (verify): should verify even if all_settings is NULL; otherwise won't
			catch the case where there is missing security

	* libnm-util/nm-setting-wireless-security.c
		- Remove everything to do with 802.1x
		- Add old-school LEAP specific properties for username and password
		- (need_secrets): rework LEAP secrets checking
		- (verify): rework for LEAP and 802.1x verification



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3470 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-17 19:37:23 +00:00
Dan Williams 50fb976d6a 2008-03-17 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c
		- (auto_activate_device): always remove the current activation check
			from the pending activation list, otherwise when the policy gets
			destroyed on NM exit it will attempt to free the already freed
			activation check



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3469 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-17 13:28:36 +00:00
Tambet Ingo 040759fdbd Squashed commit of the following:
commit 5979484d01a27a37d2b221cf357e5c77dce4ff3d
Author: Tambet Ingo <tambet@gmail.com>
Date:   Fri Mar 14 16:53:43 2008 -0600

    2008-03-14  Tambet Ingo  <tambet@gmail.com>

    	* src/backends/NetworkManagerSlackware.c
    	(nm_system_device_setup_static_ip4_config): Remove, it's unused.

    	* src/backends/NetworkManagerSuSE.c: Add missing includes.

commit de4e1e57541f62e610d5b622f2d38f5c84848daa
Author: Tambet Ingo <tambet@gmail.com>
Date:   Fri Mar 14 16:38:48 2008 -0600

    2008-03-14  Tambet Ingo  <tambet@gmail.com>

    	* libnm-util/Makefile.am: Add new files to build.

    	* libnm-util/nm-connection.c: Register NMSetting8021x.

    	* libnm-util/nm-setting-8021x.c
    	* libnm-util/nm-setting-8021x.h: Implement.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3467 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-14 22:54:15 +00:00
Tambet Ingo 13e40f51ac commit de4e1e57541f62e610d5b622f2d38f5c84848daa
Author: Tambet Ingo <tambet@gmail.com>
Date:   Fri Mar 14 16:38:48 2008 -0600

    2008-03-14  Tambet Ingo  <tambet@gmail.com>

    	* libnm-util/Makefile.am: Add new files to build.

    	* libnm-util/nm-connection.c: Register NMSetting8021x.

    	* libnm-util/nm-setting-8021x.c
    	* libnm-util/nm-setting-8021x.h: Implement.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3466 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-14 22:40:35 +00:00
Dan Williams 59025105f8 it was actually me
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3465 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-14 22:05:44 +00:00
Tambet Ingo 4c9845b646 2008-03-14 Tambet Ingo <tambet@gmail.com>
* src/nm-manager.c
		- (nm_device_interface_get_iface): g_object_get() will return an
			allocated value, so this function must not return const
		- (nm_device_interface_activate): free returned iface



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3464 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-14 22:05:17 +00:00
Tambet Ingo d26d505f81 2008-03-14 Tambet Ingo <tambet@gmail.com>
* src/NetworkManagerPolicy.c (auto_activate_device): Don't leak device and
	data.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3463 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-14 21:42:03 +00:00
Dan Williams a90c522da9 2008-03-14 Dan Williams <dcbw@redhat.com>
* include/wireless-helper.h
	  include/Makefile.am
		- One place for all the junk needed for #including wireless.h

	* test/nm-tool.c
	  src/NetworkManagerAP.c
	  src/wpa.c
	  src/Makefile.am
	  libnm-util/nm-utils.c
	  libnm-util/nm-setting-wireless.c
	  libnm-glib/nm-device-802-11-wireless.c
	  libnm-glib/nm-access-point.c
	  libnm-glib/libnm-glib-test.c
		- include wireless-helper.h, not iwlib.h

	* configure.in
		- Don't need libiw really, just need to check for wireless.h

	* src/kernel-types.h
		- Remove; used types moved into wpa.c

	* src/nm-device-802-11-wireless.c
		- (nm_device_802_11_wireless_update_signal_strength,
		   real_get_generic_capabilities, nm_device_802_11_wireless_get_mode,
		   nm_device_802_11_wireless_set_mode,
		   nm_device_802_11_wireless_get_frequency,
		   nm_device_802_11_wireless_get_ssid,
		   nm_device_802_11_wireless_set_ssid,
		   nm_device_802_11_wireless_get_bitrate,
		   nm_device_802_11_wireless_get_bssid,
		   nm_device_802_11_wireless_disable_encryption): use ioctl() directly
			instead of iwlib functions




git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3462 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-14 21:12:03 +00:00
Dan Williams 013251281f 2008-03-14 Dan Williams <dcbw@redhat.com>
* src/ppp-manager/nm-ppp-manager.c
		- (impl_ppp_manager_need_secrets): since it's asynchronous now, it
			should only take the DBusGMethodInvocation argument, not user/pass
			too.  With dbus-glib, async functions only take 2 C arguments since
			the real dbus method arguments get passed back with
			dbus_g_method_return()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3455 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-14 18:49:34 +00:00
Tambet Ingo 24adb16ef6 2008-03-13 Tambet Ingo <tambet@gmail.com>
* system-settings/plugins/ifcfg-suse/plugin.c (update_default_routes):
	Adapt the changes of NMSettingIP4Config.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3453 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-13 22:07:51 +00:00
Dan Williams fab1135d97 2008-03-13 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerUtils.c
	  src/NetworkManagerUtils.h
		- (nm_ether_ntop): replacement for iw_ether_ntop()

	* src/NetworkManagerAP.c
	  src/nm-device-802-11-wireless.c
	  src/nm-device-802-3-ethernet.c
		- s/iw_ether_ntop/nm_ether_ntop/g



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3451 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-13 20:52:23 +00:00
Dan Williams 5fa56a8ba4 2008-03-13 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c
		- (update_routing_and_dns): never set the default route through an
			IPv4LL addressed device



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3449 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-13 20:25:06 +00:00
Dan Williams 6cfaab9c0c 2008-03-13 Dan Williams <dcbw@redhat.com>
* NetworkManagerUtils.c
	  NetworkManagerUtils.h
		- Remove NMSock stuff
		- Remove the completion stuff

	* nm-device.c
	  nm-device.h
	  NetworkManager.c
	  NetworkManagerSystem.c
	  autoip.c
	  nm-device-802-11-wireless.c
	  nm-device-802-3-ethernet.c
		- Remove NMSock and completion stuff
		- Remove nm_ioctl_info()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3448 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-13 19:31:08 +00:00
Dan Williams 3ba6495785 2008-03-12 Dan Williams <dcbw@redhat.com>
* src/nm-device.c
		- (merge_ip4_config): avoid duplicates



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3444 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-13 03:52:50 +00:00
Dan Williams 1cfb4db69f 2008-03-12 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-ip4-config.c
	  libnm-util/nm-setting-ip4-config.h
		- Remove 'manual' and 'autoip' properties
		- Add 'method' property
		- (verify): fix verification with 'method'
		- (finalize): free 'method'
		- (set_property, get_property, nm_setting_ip4_config_class_init): fix
			up for 'method'

	* src/nm-device.c
		- (real_act_stage3_ip_config_start): check IP4Config method
		- (nm_device_new_ip4_autoip_config): add a note about not sucking in
			the future
		- (merge_ip4_config): IP settings are valid with DHCP too
		- (real_act_stage4_get_ip4_config): handle all IP4Config methods
		- (real_act_stage4_ip_config_timeout): don't do autoip on DHCP timeout

	* src/nm-device-802-11-wireless.c
		- (real_act_stage3_ip_config_start): remove; autoip only on demand
		- (real_act_stage4_get_ip4_config): just chain up to parent; autoip
			only on demand

	* system-settings/plugins/ifcfg-fedora/parser.c
	  system-settings/plugins/ifcfg-suse/parser.c
		- (make_ip4_setting): fix up for 'method'



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3443 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-13 03:11:02 +00:00
Dan Williams d5efb7be6d 2008-03-12 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/ifcfg-fedora/parser.c
	  system-settings/plugins/ifcfg-fedora/parser.h
		- (get_ifcfg_name): ignore more file suffixes
		- (is_wireless_device): fix check for ifcfgs that have no TYPE



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3442 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-12 22:40:25 +00:00
Dan Williams 6f84428f56 2008-03-12 Dan Williams <dcbw@redhat.com>
* configure.in
		- Bring in the bits of gnome-common we actually use (all 15 lines)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3440 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-12 19:45:05 +00:00
Dan Williams e5e813b63c 2008-03-12 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/ifcfg-fedora/plugin.c
		- (write_auto_wired_connection): new function; write out an auto
			wired connection file since the applet isn't doing it any more
		- (reload_all_connections): write out the auto wired connection file
			if there aren't any wired connections already
		- (init): don't leak a GError



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3435 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-12 18:32:46 +00:00
Dan Williams c9315b44e9 2008-03-12 Dan Williams <dcbw@redhat.com>
* src/nm-device-interface.c
		- (nm_device_interface_activate): print the ID of the connection
			that's about to be activated



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3434 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-12 18:31:00 +00:00
Dan Williams ea7fd7fffd 2008-03-12 Dan Williams <dcbw@redhat.com>
Harmonize the 802.11 bitrate API

	* introspection/nm-access-point.xml
		- 'Rate' -> 'MaxBitrate'; clarify units

	* introspection/nm-device-802-11-wireless.xml
		- Clarify units of 'Bitrate'

	* src/NetworkManagerAP.c
	  src/NetworkManagerAP.h
		- (set_property, get_property, nm_ap_class_init): rename 'rate'
			property to 'max-bitrate'
		- (foreach_property_cb): convert rate to Kb/s

	* src/nm-device-802-11-wireless.c
		- (nm_device_802_11_wireless_get_bitrate): return rate in Kb/s

	* libnm-glib/nm-access-point.c
	  libnm-glib/nm-access-point.h
		- 'rate' -> 'max-bitrate'

	* test/nm-tool.c
	  libnm-glib/libnm-glib-test.c
		- Fix up for these changes



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3432 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-12 17:44:39 +00:00
Dan Williams 7896d4552d 2008-03-12 Dan Williams <dcbw@redhat.com>
* src/nm-device.c
		- (nm_device_set_ip4_config): don't send property notifications when
			the ip4 config is set to NULL; it causes a PropertyChanged signal
			which dbus-glib can't parse because the value is NULL, which isn't
			a legal object path.  Setting the IP4 config to NULL is only
			valid when deactivating a device anyway, so the device state change
			will alert listeners that the ip4 config is invalid.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3431 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-12 17:08:59 +00:00
Dan Williams a5a8aa0801 2008-03-12 Dan Williams <dcbw@redhat.com>
* src/nm-properties-changed-signal.c
		- (add_to_string): better handling of NULL objects



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3430 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-12 17:01:24 +00:00
Dan Williams f30cf17bf7 2008-03-12 Dan Williams <dcbw@redhat.com>
Move the 'carrier' property from NMDevice to NMDevice8023Ethernet;
	convert the libnm-glib NMDevice8023Ethernet to cached properties

	* introspection/nm-device-802-3-ethernet.xml
		- New 'Carrier' property
		- New 'PropertiesChanged' signal

	* introspection/nm-device.xml
		- Remove 'Carrier' property
		- Remove 'CarrierChanged' signal

	* src/nm-device-interface.c
	  src/nm-device-interface.h
		- (nm_device_interface_init): remove 'carrier' property and
			'carrier-changed' signal

	* src/nm-device.c
	  src/nm-device.h
		- (nm_device_get_carrier, nm_device_set_carrier): remove
		- (nm_device_activate_stage5_ip_config_commit): don't bother updating
			the link here; wired device will handle that
		- (handle_dhcp_lease_change): don't bother updating link here
		- (get_property, nm_device_class_init): remove carrier property

	* src/nm-device-802-11-wireless.c
		- (real_update_link, nm_device_802_11_wireless_class_init): remove
			real_update_link(); wireless devices don't use carrier at all
		- (link_timeout_cb, supplicant_iface_state_cb_handler,
		   supplicant_iface_connection_state_cb_handler,
		   supplicant_mgr_state_cb_handler): remove anything to do with carrier

	* src/nm-device-802-3-ethernet.c
	  src/nm-device-802-3-ethernet.h
		- (nm_device_802_3_ethernet_carrier_on,
		   nm_device_802_3_ethernet_carrier_off, constructor): use set_carrier()
			instead of nm_device_set_carrier()
		- (device_state_changed): update link from sysfs on activation;
			replaces real_update_link()
		- (real_update_link): remove, replaced by device_state_changed()
		- (nm_device_802_3_ethernet_get_carrier, set_carrier): new functions
		- (nm_device_802_3_ethernet_get_speed): move up with other getters/setters
		- (real_get_generic_capabilities, real_can_interrupt_activation): use
			new get_carrier function
		- (get_property): add 'carrier' property
		- (nm_device_802_3_ethernet_class_init): add 'carrier' property and
			hook into property-changed signal helper

	* src/NetworkManagerPolicy.c
		- (device_carrier_changed): will only ever be called with a wired device
		- (device_added): only hook up to carrier-changed for wired devices

	* libnm-glib/nm-device.c
	  libnm-glib/nm-device.h
		- (constructor, nm_device_class_init): remove carrier-changed signal
		- (device_carrier_changed_proxy): remove; unused
		- (nm_device_get_carrier): remove; carrier a property of wired devices

	* libnm-glib/nm-device-802-3-ethernet.c
	  libnm-glib/nm-device-802-3-ethernet.h
		- Convert to cached properties like AP and Wireless objects
		- (nm_device_802_3_ethernet_get_hw_address): now returns a 'const char *'
			instead of a 'char *', return value should not be freed
		- (nm_device_802_3_ethernet_get_carrier): return current carrier status
		- (constructor): hook into properties-changed helper
		- (set_property, get_property): new functions
		- (nm_device_802_3_ethernet_class_init): export GObject properties

	* test/nm-tool.c
		- (detail_device): strdup the wired hardware address too since it's
			cached now

	* libnm-glib/libnm-glib-test.c
		- (dump_wired): strdup the wired hardware address too since it's
			cached now



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3428 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-12 16:12:39 +00:00
Dan Williams 763913b200 2008-03-12 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-ip4-config.c
	  libnm-util/nm-setting-ip4-config.h
		- (set_property, get_property, nm_setting_ip4_config_class_init): add
			the 'autoip' property from the spec



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3427 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-12 12:45:20 +00:00
Dan Williams 6103540d11 2008-03-11 Dan Williams <dcbw@redhat.com>
* src/backends/NetworkManagerGeneric.c
	  src/backends/NetworkManagerGeneric.h
		- (nm_generic_device_get_use_dhcp): remove



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3426 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-12 02:28:11 +00:00
Dan Williams 3c0df72352 2008-03-11 Dan Williams <dcbw@redhat.com>
* src/nm-device.c
		- (nm_device_deactivate): don't need to munge DNS here; that gets done
			already in nm_device_set_ip4_config()
		- (handle_dhcp_lease_change): fail the device if setting the IP4Config
			due to a DHCP rebind fails
		- (nm_device_set_ip4_config): send property notifications when the
			ip4 config changes
		- (get_property): only report IP4Config property during valid states

	* src/NetworkManagerPolicy.c
		- (update_routing_and_dns): ignore devices that don't have an ip4
			config; add parameter 'force_update' to allow callers to specify
			that changes should be made even if the default device doesn't change
		- (device_ip4_config_changed): update DNS and routing when the device's
			IP4Config changes, like for DHCP updates
		- (device_added): listen for ip4-config property changes



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3425 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-11 22:26:46 +00:00
Dan Williams 5663f3ba40 2008-03-11 Dan Williams <dcbw@redhat.com>
Fix address handling as a result of DHCP rebind/renew/reboot.

	* src/NetworkManagerSystem.c
		- (check_one_address): delete an address if it doesn't match a given
			one for the same interface
		- (nm_system_device_set_from_ip4_config): don't flush the default route,
			be smarter about flushing addresses (only flush ones that don't
			match the one we're about to apply)

	* src/backends/NetworkManagerDebian.c
	  src/backends/NetworkManagerSuSE.c
	  src/backends/NetworkManagerArch.c
	  src/backends/NetworkManagerSlackware.c
	  src/backends/NetworkManagerRedHat.c
	  src/backends/NetworkManagerPaldo.c
	  src/backends/NetworkManagerFrugalware.c
	  src/backends/NetworkManagerGentoo.c
		- (nm_system_delete_default_route): remove

	* src/backends/NetworkManagerGeneric.c
	  src/backends/NetworkManagerGeneric.h
		- (nm_generic_enable_loopback): fix the loopback device label
		- (nm_generic_delete_default_route): remove; no longer used



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3424 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-11 22:21:25 +00:00
Dan Williams 7009f91036 2008-03-11 Dan Williams <dcbw@redhat.com>
* src/nm-device-interface.h
		- Delimit property name words with '-', otherwise g_object_notify()
			doesn't work the way we expect



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3423 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-11 21:33:52 +00:00
Tambet Ingo 48f6638f3d 2008-03-11 Tambet Ingo <tambet@gmail.com>
* src/nm-hal-manager.c (create_device_and_add_to_list): Don't ignore USB devices.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3421 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-11 17:36:28 +00:00
Dan Williams c39a038acd fix mis-merge
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3420 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-11 16:42:17 +00:00
Dan Williams 60da632512 2008-03-11 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c
		- (update_routing_and_dns): don't change anything if the default device
			hasn't changed; print something out when switching the default route
			and DNS



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3419 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-11 16:42:00 +00:00
Tambet Ingo cc2675ebb1 Implement PPPoE.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3418 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-11 16:37:41 +00:00
Dan Williams d03bed314f 2008-03-10 Dan Williams <dcbw@redhat.com>
* src/nm-device.c
		- (handle_dhcp_lease_change): apply an IP4 config to a device in
			response to a DHCP lease change
		- (dhcp_state_changed): handle DHCP lease changes while activated
		- (nm_device_set_ip4_config): remove a previously set named config
			when setting an ip4 config



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3417 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-11 02:46:35 +00:00
Dan Williams bf104fbc78 2008-03-10 Dan Williams <dcbw@redhat.com>
* src/nm-serial-device.c
		- (nm_serial_device_send_command): report errno on error
		- (get_reply_got_data): limit the size of the overall buffer
		- (wait_for_reply_info_destroy): destroy result string
		- (wait_for_reply_got_data): append received data to an overall buffer
			until timeout, filled buffer, or error instead of keeping a per-call
			buffer.  Some devices send data slowly enough that this function
			gets called multiple times for the same command stream.
		- (nm_serial_device_wait_for_reply): initialize overall buffer for
			wait_for_reply_got_data() here



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3415 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-10 21:34:42 +00:00
Dan Williams e4bbf230d2 2008-03-10 Dan Williams <dcbw@redhat.com>
* src/nm-cdma-device.c
		- (do_dial, init_modem): handle errors from
			nm_serial_device_send_command_string()

	* src/nm-gsm-device.c
		- (do_dial, manual_registration, automatic_registration_get_network,
		   automatic_registration, enter_pin, check_pin, init_modem): handle
			errors from nm_serial_device_send_command_string()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3414 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-10 21:19:45 +00:00
Dan Williams 43fe2c90c4 2008-03-10 Dan Williams <dcbw@redhat.com>
Patch based on ideas suggested by Bas Zoetekouw <bas@debian.org>

	* src/named-manager/nm-named-manager.c
		- (compute_searches): prefer searches before domains
		- (compute_domain): new function
		- (rewrite_resolv_conf): write out the 'domain' and 'searches' options
		- (merge_one_ip4_config): if there are no searches in the source config,
			merge domains of the source config into the target config
		- (compute_nameservers): make formatting of resolv.conf a bit nicer



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3413 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-10 19:57:55 +00:00
Dan Williams 3f29628a42 2008-03-10 Dan Williams <dcbw@redhat.com>
* src/nm-serial-device.c
		- (get_reply_got_data): clean up indentation, shrink serial buffer
		- (wait_for_reply_got_data): try to handle slower serial devices where
			the reply is broken up into multiple reads by concatenating replies
			together until either an error is received or the search string is
			found



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3412 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-10 19:36:12 +00:00
Dan Williams 483b5f8ebd 2008-03-10 Dan Williams <dcbw@redhat.com>
* src/nm-device.c
		- (nm_device_bring_down): deactivate the device if it's activating too,
			not just if it's already activated.  This makes sure that everything
			from an association attempt is cleaned up (like DHCP for example)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3411 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-10 19:33:36 +00:00
Dan Williams be4addd6ae 2008-03-10 Dan Williams <dcbw@redhat.com>
* src/nm-serial-device.c
		- (config_fd): report error from TCSETA
		- (nm_serial_device_open): fail when config_fd() fails



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3410 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-10 13:10:17 +00:00
Dan Williams 6ed1b8454a 2008-03-10 Dan Williams <dcbw@redhat.com>
* src/nm-ip4-config.c
		- (nm_ip4_config_init): allocate searches list
		- (finalize): free searches list



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3409 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-10 13:08:37 +00:00
Dan Williams 9a09a4b4d0 2008-03-09 Dan Williams <dcbw@redhat.com>
Patch from Bas Zoetekouw <bas@debian.org>

	* src/dhcp-manager/nm-dhcp-manager.c
		- (nm_dhcp_manager_get_ip4_config): handle domain-search option too



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3403 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-09 05:15:12 +00:00
Dan Williams 95ef49b168 2008-03-09 Dan Williams <dcbw@redhat.com>
Patch from Bas Zoetekouw <bas@debian.org>

	* src/nm-ip4-config.c
	  src/nm-ip4-config.h
		- (nm_ip4_config_add_search, nm_ip4_config_get_search,
		   nm_ip4_config_get_num_searches): add 'searches' as distinct from
			domains.  'searches' is the correct way to store multiple search
			domains, whereas 'domains' is really just supposed to store one
			domain.  Some sites abuse the DHCP 'domain-name' option to push
			search domains to the client.
		- (nm_ip4_config_add_domain): group with related functions (my patch)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3402 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-09 05:11:22 +00:00
Dan Williams f6c98a9d80 2008-03-09 Dan Williams <dcbw@redhat.com>
* src/dhcp-manager/nm-dhcp-manager.c
		- (dhclient_run): send interface-specific config files to dhclient



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3401 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-09 05:10:22 +00:00
Dan Williams a53ac83502 2008-03-07 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/ifcfg-fedora/parser.c
		- (is_wireless_device): new function; test a device for wireless
			extensions
		- (parser_parse_file): if the ifcfg file doesn't have a TYPE tag,
			test the device for wireless extensions to determine the type



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3394 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-08 00:12:42 +00:00
Dan Williams bf974b6aa4 2008-03-07 Dan Williams <dcbw@redhat.com>
Change manager's StateChange signal to StateChanged for consistency.

	* introspection/nm-manager.xml
		- Add 'StateChanged' signal
		- Move 'StateChange' down to the deprecated section

	* src/nm-hal-manager.c
		- (nm_hal_manager_new): connect to 'state-changed' instead

	* src/NetworkManagerPolicy.c
		- (nm_policy_new): connect to 'state-changed' instead

	* src/nm-manager.c
	  src/nm-manager.h
		- (nm_manager_update_state): emit both 'state-changed' and 'state-change'
		- (nm_manager_class_init): add 'state-changed' and not the deprecation
			of 'state-change'

	* libnm-glib/nm-client.c
	  libnm-glib/nm-client.h
		- (constructor, nm_client_class_init, client_state_changed_proxy):
			track and proxy 'state-changed' instead of 'state-change'



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3393 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-07 23:17:48 +00:00
Dan Williams 3fec481414 2008-03-07 Dan Williams <dcbw@redhat.com>
First pass of multiple active device support.  Expect bugs.

	* src/nm-ip4-config.c
	  src/nm-ip4-config.h
		- (nm_ip4_config_get_secondary, nm_ip4_config_set_secondary): remove;
			there are better ways to do this in the named manager

	* src/nm-device.c
	  src/nm-device.h
		- (nm_device_can_activate): return whether the device can activate a
			connection right now; taking into account things like carrier state
			and rfkill state
		- (nm_device_get_best_auto_connection): renamed from
			nm_device_get_best_connection
		- (real_act_stage4_get_ip4_config): MTU stuff is now handled in the
			device subclasses themselves, so that each device can override the
			MTU from it's NMSetting subclass if needed
		- (nm_device_set_ip4_config): set MTU when setting up routes and stuff
			in NetworkManagerSystem.c, not here

	* src/named-manager/nm-named-manager.c
	  src/named-manager/nm-named-manager.h
		- (nm_named_manager_name_owner_changed,
		   nm_named_manager_dbus_connection_changed): fix for changes to
			rewrite_resolv_conf()
		- (compute_nameservers): don't need the NMNamedManager at all, remove
			from parameter list
		- (merge_one_ip4_config): new function; merge ip4 configs together
		- (rewrite_resolv_conf): write out resolv.conf from all the stored
			ip4 configs; the VPN config takes precedence, then the best
			device config, then the rest of the configs
		- (get_domain_for_config): take the NMNamedManager as an argument
			to check whether the config is the VPN config
		- (add_ip4_config_to_named): fixups for removal of the 'secondary'
			attribute from ip4 configs
		- (add_all_ip4_configs_to_named): add all the configs in priority order
		- (remove_ip4_config_from_named): fix for changes to
			get_domain_for_config()
		- (nm_named_manager_add_ip4_config): assign the config to the right slot
			based on its type; callers must pass in the type now
		- (get_last_default_domain): remove, unused
		- (nm_named_manager_remove_ip4_config): handle config slots correctly

	* src/nm-device-802-11-wireless.c
		- (real_can_activate): new function
		- (real_get_best_auto_connection): renamed from real_get_best_connection
		- (real_act_stage4_get_ip4_config): handle MTU override

	* src/nm-device-802-3-ethernet.c
		- (real_can_activate): new function
		- (real_get_best_auto_connection): renamed from real_get_best_connection
		- (real_act_stage4_get_ip4_config): new function; handle MTU override

	* src/vpn-manager/nm-vpn-connection.c
		- (nm_vpn_connection_ip4_config_get): don't need to set the 'secondary'
			attribute on the ip4 config

	* src/NetworkManagerPolicy.c
		- (nm_policy_auto_get_best_device): remove
		- (nm_policy_device_change_check): remove
		- (update_default_route): new function; set the default route via
			the specified device
		- (get_device_priority): new function; return the priority number of
			a device type WRT which one should have the default route.  Order is
			(highest to lowest)  wired, wireless, GSM, CDMA.
		- (update_routing_and_dns): new function; determine which device should
			have the default route, then update the routing table and DNS
		- (maybe_auto_activate_device): new function; if a device is now
			available for activation, find out what connection it would like to
			activate and do it
		- (schedule_activate_check): new function; if a device can be activated
			now, schedule the activation.  Each device may have only one
			pending activation at a given time.
		- (device_state_changed): if activation was canceled, try again,
			possibly with another connection; if the device was activated,
			update routing and DNS; if the device was deactivated, try again
			with another connection
		- (device_carrier_changed): if there is no carrier, deactivate the
			device; otherwise schedule an activation check for the device
		- (wireless_networks_changed): schedule an activation check for the
			device
		- (device_added): keep track of the signal handler IDs so they can
			be removed when the device goes away
		- (device_removed): remove any signal handlers that might be attached
			to the device; update routing and DNS
		- (schedule_activate_all): new function
		- (connections_added, connection_added, connection_updated): when
			connections change, schedule all devices for an activation check
		- (connection_removed): when a device is deactivated because its
			connection was removed, schedule another activation check for it
		- (nm_policy_destroy): destroy pending activations and disconnect
			all device signal handlers

	* src/nm-manager.c
		- (nm_manager_activate_device): if the device was already actived,
			deactivate it
		- (deactivate_old_device): remove
		- (connection_added_default_handler, impl_manager_activate_device):
			don't deactivate other devices when activating this one

	* src/backends/NetworkManagerGentoo.c
	  src/backends/NetworkManagerFrugalware.c
	  src/backends/NetworkManagerPaldo.c
	  src/backends/NetworkManagerRedHat.c
	  src/backends/NetworkManagerSlackware.c
	  src/backends/NetworkManagerArch.c
	  src/backends/NetworkManagerSuSE.c
	  src/backends/NetworkManagerDebian.c
		- (nm_system_get_mtu): remove; MTU should be provided through the
			distro's system settings service plugin instead
		- (nm_system_device_add_default_route_via_device): remove
		- (nm_system_device_add_default_route_via_device_with_iface): remove
		- (nm_system_device_replace_default_route): new function; call
			generic implementation

	* src/backends/NetworkManagerGeneric.c
	  src/backends/NetworkManagerGeneric.h
		- (nm_generic_device_add_default_route_via_device,
		   nm_generic_device_add_default_route_via_device_with_iface): remove
		- (nm_generic_device_replace_default_route): replace the default route
			with the given route via some gateway

	* src/NetworkManagerSystem.c
	  src/NetworkManagerSystem.h
		- (nm_system_device_set_from_ip4_config): let the policy handle updates
			to routing and DNS; but set the MTU here
		- (nm_system_vpn_device_set_from_ip4_config): set the route with the
			ip_iface of the active device; use the standard MTU setting function
		- (nm_system_set_mtu): remove
		- (nm_system_device_set_mtu): consolidate MTU setting code in one place



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3391 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-07 19:41:32 +00:00
Tambet Ingo 37deaebb19 Add ChangeLog entry as well.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3389 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-07 18:06:11 +00:00
Tambet Ingo 85e5092363 Handle ethernet drivers that try to indicate unknown with negative speed.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3387 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-07 17:40:31 +00:00
Dan Williams 593520f9a8 2008-03-07 Dan Williams <dcbw@redhat.com>
* src/nm-hal-manager.c
		- (nm_get_device_driver_name): use net.originating_device first, fall
			back to physical device.  HAL has deprecated physical_device.

	* libnm-glib/nm-device.c
		- (get_product_and_vendor): use net.originating_device first, fall
			back to physical device.  HAL has deprecated physical_device.
		- (nm_device_update_description): s/physical_device_udi/orig_dev_udi



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3386 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-07 17:13:38 +00:00
Dan Williams 07ec50353e 2008-03-07 Dan Williams <dcbw@redhat.com>
* src/nm-netlink.c
		- (nm_netlink_get_default_handle): mistakenly removed too much code in
			last commit; fix that
		- (get_link_cache): print error string



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3385 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-07 17:09:44 +00:00
Dan Williams 2b200ca1b3 2008-03-07 Dan Williams <dcbw@redhat.com>
* src/nm-netlink.c
		- (nm_netlink_get_default_handle): NMNetlinkMonitor now uses libnl,
			don't need this hack any more (Benoit Boissinot)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3384 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-07 12:26:55 +00:00
Dan Williams 31823c92b9 2008-03-06 Dan Williams <dcbw@redhat.com>
* autogen.sh
		- Die gnome-common, die



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3383 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-07 00:45:34 +00:00
Dan Williams 529a246913 2008-03-04 Dan Williams <dcbw@redhat.com>
Patch from Michael Biebl <biebl@debian.org>

	* NetworkManager.pc.in
		- doesn't actually depend on dbus-1

	* libnm-util/nm-utils.h
		- remove unused #include <dbus/dbus.h>

	* libnm-glib/libnm_glib.pc.in
		- depends on glib and dbus-glib



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3374 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-04 21:59:24 +00:00
Dan Williams 4c8da03410 2008-03-02 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c
		- s/device_state_changed_idle_id/update_state_id/



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3372 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-03 04:14:28 +00:00
Dan Williams ced88ef3cd 2008-03-02 Dan Williams <dcbw@redhat.com>
* src/nm-device.c
	  src/nm-device.h
	  src/nm-device-802-11-wireless.c
	  src/nm-device-802-3-ethernet.c
	  src/NetworkManagerPolicy.c
		- s/link_active/carrier
		- nm_device_set_active_link() -> nm_device_set_carrier()
		- nm_device_has_active_link() -> nm_device_get_carrier()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3371 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-03 04:09:58 +00:00
Dan Williams 827dcd3ed6 2008-03-02 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/ifcfg-fedora/parser.c
		- (make_wireless_setting): fail connection creation on missing SSID



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3370 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-03 01:02:42 +00:00
Dan Williams 2457519e90 2008-02-29 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c
		- (nm_policy_device_change_check): ensure that a previously active
			device with a system connection has a link before denying a switch
			to a user connection



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3369 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-29 19:13:08 +00:00
Dan Williams 7c1d11d12e 2008-02-29 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (link_timeout_cb): try again if scanning; deactivate the device when
			activated if the link dies
		- (supplicant_iface_connection_state_cb_handler): bump link timeout to
			15 seconds



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3367 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-29 16:58:55 +00:00
Dan Williams 0bd48088c8 2008-02-29 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
	  src/nm-device-802-11-wireless.h
		- (nm_device_802_11_wireless_reset_scan_interval): remove, unused
			elsewhere; fold into the sole user in nm-device-802-11-wireless.c
		- (device_cleanup): reset the scan interval lower when the device
			deactivates
		- (can_scan): base decision mostly off device state, not supplicant
			interface state since the supplicant interface state isn't a
			great indicator of whether the device is active or not
		- (request_wireless_scan): clean up; schedule the next scan here
		- (schedule_scan): only back the scan interval off if a new scan
			actually gets scheduled; and make scan intervals tighter when the
			device is disconnected
		- (supplicant_iface_state_cb_handler): fold in the bits of
			nm_device_802_11_wireless_reset_scan_interval() by resetting scan
			interval to minimum
		- (activation_success_handler): reset scan interval to something
			reasonable 



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3365 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-29 16:33:59 +00:00
Saleem Abdulrasool edcd32c443 howl is no longer a supported mDNS provider on Gentoo
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3361 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-29 04:21:00 +00:00
Tambet Ingo 42d71a5372 2008-02-28 Tambet Ingo <tambet@gmail.com>
Get rid of a bunch of unused distro specific functions.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3360 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-28 22:31:55 +00:00
Tambet Ingo fd6f0fa08f 2008-02-28 Tambet Ingo <tambet@gmail.com>
Implement suse plugin for system settings daemon.

	* system-settings/plugins/ifcfg-suse/*: Implement.

	* system-settings/plugins/Makefile.am: Add ifcfg-suse to subdirs when targeting
	suse.

	* configure.in: Check (without failing) for gio.
	Create ifcfg-suse plugin's Makefile.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3355 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-28 20:28:20 +00:00
Saleem Abdulrasool 616663c69d new initscripts for Gentoo
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3346 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-28 06:07:50 +00:00
Dan Williams 8ffe21b65f 2008-02-27 Dan Williams <dcbw@redhat.com>
Patch from Will Stephenson <wstephenson@kde.org>

	* Makefile.am
	  configure.in
		- Set up spec autogeneration infrastructure

	* docs/NetworkManager DBUS API.txt
		- Note how old this doc is and where to look for the canonical
			D-Bus specification

	* introspection/*
		- Add annotations and comments



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3345 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-28 02:07:21 +00:00
Dan Williams 036e09cb49 2008-02-27 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (device_cleanup): cleanup any association attempt that might be in
			progress
		- (nm_device_802_11_wireless_dispose): device_cleanup() already
			destroys the AP list



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3344 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-27 23:10:09 +00:00
Dan Williams d70072b20a 2008-02-25 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-settings.c
		- (set_property): use g_value_dup_object() to ref the object as was
			intended originally



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3343 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-25 22:08:45 +00:00
Dan Williams ca97fe6469 2008-02-25 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-utils.c
		- (nm_utils_ssid_to_utf8): use a dynamically allocated buffer



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3342 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-25 22:07:40 +00:00
Dan Williams ade314556c 2008-02-25 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.c
		- (nm_setting_compare): Fix C&P error from r3068 that caused settings
			comparisons to always succeed; clarify assignment of values to
			'different'



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3341 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-25 22:06:18 +00:00
Dan Williams 00a3dfbafa 2008-02-24 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.c
	  libnm-util/nm-setting.h
		- (nm_setting_compare): fix 'fuzzy' compare logic; add IGNORE_ID bits;
			fix return value to match nm_connection_compare() meaning



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3340 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-25 03:32:43 +00:00
Dan Williams 85437f110d 2008-02-24 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-wireless.c
		- (nm_setting_wireless_class_init): 'seen bssids' should be ignored for
			fuzzy matches



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3338 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-25 03:16:48 +00:00
Dan Williams 316abd62fd 2008-02-20 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-connection.c
	  libnm-util/nm-connection.h
		- (nm_connection_compare): accept compare flags and pass them to the
			setting compare function

	* libnm-util/nm-setting.c
	  libnm-util/nm-setting.h
		- (nm_setting_compare): accept compare flags; ignore properties that are
			marked fuzzy

	* libnm-util/nm-setting-connection.c
	  libnm-util/nm-setting-wireless.c
	  libnm-util/nm-setting-ppp.c
	  libnm-util/nm-setting-wired.c
		- Mark some setting properties as ignorable when doing a fuzzy compare

	* src/nm-device.c
		- (device_activation_precheck): use exact compare



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3336 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-21 04:34:34 +00:00
Dan Williams f53230715e 2008-02-20 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c
		- (nm_policy_device_change_check): get scope off the connection, not
			using the manager helper

	* src/nm-manager.c
	  src/nm-manager.h
		- (get_scope_for_proxy): rename from get_type_for_proxy()
		- (connection_get_settings_cb): set scope and path on connection, not
			using GObject data items
		- (get_connection_for_proxy): don't need to return path, since that
			can be gotten from the connection
		- (get_connection_for_proxy): get path off the connection, not from
			parameters
		- (connection_removed_cb, connection_updated_cb): don't need to get
			path from get_connection_for_proxy(); get scope off the connection
			instead of using GObject data items
		- (connection_added_default_handler, add_one_connection_element): use
			nm_connection_get_path() not nm_manager_get_connection_dbus_path()
		- (nm_manager_get_connection_dbus_path): remove
		- (nm_manager_get_connection_scope): remove



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3335 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-21 03:04:18 +00:00
Dan Williams fd0ab916c8 2008-02-20 Dan Williams <dcbw@redhat.com>
* Global rename of NMConnectionSettings -> NMExportedConnection to cut down
		on confusing names

	* Add 'path' and 'scope' properties to NMConnection since both NM and the
		applet were having to hack this in anyway.  Remove the 'path' stuff from
		NMExportedConnection

	* Internally rename NMConnectionType -> NMConnectionScope

	* Provide default implementations of the 'get_id' and 'get_settings' methods
		of NMExportedConnection



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3334 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-20 22:37:39 +00:00
Dan Williams df56b5485d 2008-02-15 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (device_cleanup): release the AP list here too so that the AP list
			doesn't survive across suspend/resume and up/down.  There is some
			room for optimization, for example blow the list away when the card
			brought back up, but only if the device has only been down for a
			minute or more.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3322 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-15 23:17:44 +00:00
Dan Williams 67763ef3cd 2008-02-15 Dan Williams <dcbw@redhat.com>
* src/nm-hal-manager.c
		- (modem_device_creator): recognize new HAL modem capabilities



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3321 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-15 23:12:56 +00:00
Dan Williams 70afa9214b 2008-02-12 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/ifcfg-fedora/plugin.c
		- (watch_path): handle IN_DELETE_SELF too
		- (handle_connection_changed): notify when removing a connection
		- (stuff_changed): don't warn on unknown inotify watches; handle the
			case of a file moving out of the profile directory



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3312 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-12 20:25:12 +00:00
Dan Williams 9f7149568e 2008-02-12 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/ifcfg-fedora/parser.c
		- (make_ip4_setting): bring IPv4 setting handling more up to spec



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3311 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-12 20:22:20 +00:00
Dan Williams 6130a4f6b8 2008-02-12 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-utils.c
		- (nm_utils_convert_uint_array_to_string): don't die on NULL array, it's
			just any empty array



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3310 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-12 20:21:36 +00:00
Dan Williams 5b87ceab92 2008-02-12 Dan Williams <dcbw@redhat.com>
* system-settings/src/nm-system-config-interface.c
	  system-settings/src/nm-system-config-interface.h
		- (load_connections): get_connections() should now return an allocated
			GSList that the system settings service will free

	* system-settings/plugins/ifcfg-fedora/plugin.c
	  system-settings/plugins/ifcfg-fedora/parser.h
	  system-settings/plugins/ifcfg-fedora/parser.c
		- Fix up inotify issues; handle keys-* files, handle new files appearing
			in the profile directory, handle resolv.conf file changes




git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3309 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-12 19:20:18 +00:00
Dan Williams e476f3a6e5 2008-02-10 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-3-ethernet.c
		- (real_bring_up): save the supplicant interface state signal id
		- (real_bring_down): disconnect from the supplicant interface state
			signal



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3304 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-10 17:23:23 +00:00
Dan Williams 9587569b5a 2008-02-07 Dan Williams <dcbw@redhat.com>
* initscript/RedHat/NetworkManager.in
	  initscript/RedHat/NetworkManagerDispatcher.in
		- Add new-style LSB init headers



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3302 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-07 21:37:43 +00:00
Dan Williams bee138144b 2008-02-07 Dan Williams <dcbw@redhat.com>
* system-settings/src/dbus-settings.c
	  system-settings/src/dbus-settings.h
		- (add_one_secret_to_hash): copy secrets out of the plugin-returned hash
			table of secrets
		- (connection_settings_get_secrets): consolidate error returns into
			one place; use the new get_secrets() plugin interface function to
			get secrets from the plugin itself rather than using GObject data
			magic

	* system-settings/src/main.c
		- (connection_added_cb, connection_removed_cb, free_plugin_connections,
		   load_connections): keep a private list of the plugin-returned
			connections, don't use the plugin's GSList

	* system-settings/plugins/ifcfg-fedora/plugin.c
		- (watch_path): watch the path, not the filename (duh)
		- (reload_all_connections): use the direct hash/equal functions; the
			ones for int aren't appropriate here
		- (get_secrets, system_config_interface_init): implement the
			get_secrets() function
		- (build_one_connection, find_connection_by_path): ifcfg file path is
			now in the connection's ConnectionData instead of being a GObject
			data property
		- (handle_profile_item_changed): ifcfg file path is now in the
			connection's ConnectionData instead of being a GObject data property;
			be sure to copy secrets over from the new connection to the existing
			connection when updating the connection's settings
		- (init): sc_plugin_inotify_init() returns success/fail, not the inotify
			file descriptor

	* system-settings/plugins/ifcfg-fedora/parser.c
	  system-settings/plugins/ifcfg-fedora/parser.h
		- (connection_data_get, copy_one_cdata_secret, clear_one_cdata_secret,
		   connection_data_copy_secrets, connection_data_free,
		   connection_data_add): new functions; connection data manipulation
		- (make_wireless_security_setting): stuff secrets into the
			connection data, not as GObject data items; make sure to close
			the keys ifcfg file
		- (wireless_connection_from_ifcfg, wired_connection_from_ifcfg): add
			connection data to the connection



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3299 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-07 20:11:31 +00:00
Dan Williams 4cdb4287ec Update changelog for last commit
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3298 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-07 18:48:16 +00:00
Dan Williams a14d0b6184 2008-02-07 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (handle_auth_or_fail): new function; consolidate device activation
			failure check after a certain number of failures getting secrets
		- (supplicant_connection_timeout_cb, real_act_stage2_config,
		   real_act_stage4_ip_config_timeout): use handle_auth_or_fail() to fail
			the connection if secrets were requested more than a few times
		- (real_act_stage3_ip_config_start): don't clear the wireless secrets
			tries here; otherwise they are cleared before the IP configure
			timeout, which happens with open system WEP when key is wrong
		- (activation_success_handler): clear wireless secrets tries here too



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3296 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-07 18:45:22 +00:00
Dan Williams 17a9938480 2008-02-07 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c
		- (connection_updated): clear invalid tag when connection gets updated
			to allow that connection to be tried again
		- (nm_policy_new): save signal ids so they can be disconnected when
			the policy is destroyed
		- (nm_policy_destroy): stop any in-progress state change idle handler,
			and disconnect all signals from the manager object so that none
			of the policy functions gets called after the policy is destroyed



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3295 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-07 18:41:42 +00:00
Dan Williams 44dab5321f 2008-02-06 Dan Williams <dcbw@redhat.com>
* src/nm-manager.c
		- (finalize): remove devices a bit earlier; clean up system settings
			poke
		- (nm_manager_name_owner_changed): clean up system settings poke when
			the service appears, and try to restart it if it fails
		- (poke_system_settings_daemon_cb): try to get the system settings
			service started through D-Bus service activation
		- (initial_get_connections): start the system settings daemon if it's
			not already running



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3293 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-06 16:50:43 +00:00
Dan Williams f20d9b2625 2008-02-05 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-config.c
		- (nm_supplicant_config_add_setting_wireless): send scan_ssid=1 for
			broadcast networks too



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3291 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-05 15:44:41 +00:00
Dan Williams 1065f22f02 2008-02-04 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/ifcfg-fedora/parser.c
		- (make_wireless_security_setting): fix spelling; unencrypted networks
			need key_mgmt set too
		- (parser_parse_file): validate ifcfg file name and don't try to parse
			.bak files; ensure that an error is set whenever NULL gets returned



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3290 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-04 23:18:16 +00:00
Dan Williams d4d882ae1c 2008-02-04 Dan Williams <dcbw@redhat.com>
* system-settings/src/Makefile.am
		- Install D-Bus service activation file for the system settings
			service

	* system-settings/src/org.freedesktop.NetworkManagerSystemSettings.service
		- D-Bus service activation file for system settings service



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3289 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-04 20:05:46 +00:00
Dan Williams 9a92be6c79 2008-02-04 Dan Williams <dcbw@redhat.com>
* system-settings/src/main.c
		- (parse_config_file): parse a config file
		- (main): accept --config option and read plugins from config file



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3288 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-04 20:03:28 +00:00
Dan Williams 58537afe7a 2008-02-04 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/ifcfg-fedora/plugin.c
		- Change reported name to 'ifcfg-fedora'
		- Use IFCFG_PLUGIN_NAME

	* system-settings/plugins/ifcfg-fedora/plugin.c
		- Remove PLUGIN_NAME, use IFCFG_PLUGIN_NAME instead



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3287 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-04 19:31:20 +00:00
Dan Williams 806f898895 2008-02-04 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/ifcfg-fedora/parser.c
		- (get_ifcfg_name): new function; factor out ifcfg name finding code
		- (make_connection_setting): use get_ifcfg_name()
		- (make_wireless_security_setting): handle shadow key files
		- (get_one_wep_key): treat empty string as NULL



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3286 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-04 18:59:13 +00:00
Dan Williams 06e44762a1 2008-02-04 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-manager.c
		- (poke_supplicant_cb): reschedule the poke as a timeout, don't let
			glib automatically reschedule
		- (nm_supplicant_manager_init): immediately try to start the supplicant
		- (nm_supplicant_manager_name_owner_changed): immediately try to restart
			the supplicant



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3285 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-04 15:24:18 +00:00
Dan Williams 595062c641 2008-02-01 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c
		- (device_state_changed): schedule a change check when a device gets
			deactivated so something happens if you disconnect GSM/CDMA



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3284 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-01 20:39:42 +00:00
Dan Williams 25a0d4d9d9 2008-01-31 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.h
	  src/nm-device-802-11-wireless.c
		- (ap_list_get_ap_by_ssid, is_associated,
		   nm_device_802_11_wireless_ap_list_get_ap_by_ssid,
		   nm_device_802_11_wireless_ap_list_get_ap_by_obj_path): remove
		- (nm_device_802_11_wireless_get_activation_ap): collapse
			nm_device_802_11_wireless_ap_list_get_ap_by_obj_path() into this
			function



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3282 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-31 23:46:12 +00:00
Dan Williams 182945eeab 2008-01-30 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/ifcfg
	* system-settings/plugins/ifcfg-fedora
		- Move the ifcfg plugin to ifcfg-fedora



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3278 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-30 21:28:26 +00:00
Dan Williams 4c2f6219a9 2008-01-24 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device-802-11-wireless.c
		- (get_access_point): move the "/" check here; check for invalid path
			too
		- (nm_device_802_11_wireless_set_active_ap): leave the "/" check up
			to get_access_point()
		- (access_point_added_proxy, access_point_removed_proxy): don't try
			to send signals for non-existent access points



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3269 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-24 19:07:14 +00:00
Dan Williams 6ef8fc433f 2008-01-24 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device-802-11-wireless.c
		- (nm_device_802_11_wireless_set_active_ap): path of "/" means no AP



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3268 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-24 18:59:50 +00:00
Dan Williams 3d81b8f156 2008-01-23 Dan Williams <dcbw@redhat.com>
* libnm-glib/libnm_glib.c
		- (libnm_glib_init): make thread joinable
		- (libnm_glib_ctx_free): join thread on exit to clean up memory



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3265 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-24 03:03:55 +00:00
Dan Williams fe7259194b 2008-01-23 Dan Williams <dcbw@redhat.com>
* test/libnm_glib_test.c
		- (signal_handler, setup_signals): trap SIGINT and SIGTERM
		- (main): set up signal handlers; call libnm_glib_shutdown



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3264 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-24 03:00:35 +00:00
Dan Williams 54b327f35a 2008-01-21 Dan Williams <dcbw@redhat.com>
* include/NetworkManager.h
		- Add CDMA mobile broadband card device type

	* src/nm-hal-manager.c
		- (modem_device_creator): handle both CDMA and GSM modems; the device
			must now be tagged with 'cdma' or 'gsm' capability

	* src/nm-cdma-device.c
	  src/nm-cdma-device.h
	  src/Makefile.am
		- Add the CDMA mobile broadband card device class

	* libnm-util/nm-connection.c
		- (register_default_settings): add NMSettingCdma

	* libnm-util/nm-setting-cdma.c
	  libnm-util/nm-setting-cdma.h
	  libnm-util/Makefile.am
		- Add the CDMA mobile broadband card setting class

	* libnm-glib/nm-cdma-device.c
	  libnm-glib/nm-cdma-device.h
	  libnm-glib/Makefile.am
		- Add the CDMA mobile broadband card GLib proxy class

	* libnm-glib/nm-client.c
		- (get_device): handle CDMA devices too



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3261 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-21 19:14:18 +00:00
Dan Williams d20a608e1f 2008-01-21 Dan Williams <dcbw@redhat.com>
* src/ppp-manager/nm-ppp-manager.c
		- (ip4_config_get): set peer address too

	* src/ppp-manager/nm-pppd-plugin.c
		- (nm_ip_up): try harder to get the peer's address

	* src/NetworkManagerSystem.c
		- (nm_system_device_set_from_ip4_config): if the IP4Config has a peer
			address, use that too.  Otherwise, some PPP connections won't work.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3260 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-21 15:30:39 +00:00
Dan Williams f8031244f1 2008-01-19 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c
		- (nm_policy_device_change_check): system connections override user
			connections; don't activate a user connection if there's a currently
			active system connection, and new, better system connections always
			interrupt user connections



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3258 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-19 16:15:38 +00:00
Dan Williams 781266b5a2 2008-01-19 Dan Williams <dcbw@redhat.com>
* src/nm-manager.h
		- (nm_manager_get_connection_type): new function



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3257 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-19 16:02:44 +00:00
Dan Williams 5bfebe6b2f 2008-01-19 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (real_get_best_connection): collapse find_best_connection() into this
			function



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3256 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-19 15:40:52 +00:00
Dan Williams c28a362daf 2008-01-19 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-3-ethernet.c
		- (real_get_best_connection): collapse find_best_connection() into this
			function



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3251 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-19 15:13:13 +00:00
Dan Williams 0f5c20f9d9 2008-01-18 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-3-ethernet.c
		- (find_best_connection): check MAC address too
		- (real_get_best_connection): let autoconnect=True connections activate
			for devices that don't have carrier detection

	* src/nm-device-802-11-wireless.c
		- (find_best_connection): check MAC address too



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3248 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-18 17:04:46 +00:00
Dan Williams 35d98b7326 2008-01-18 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/ifcfg/parser.c
		- (make_connection_setting): interpret ON_BOOT=y as 'autoconnect=True'



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3247 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-18 16:52:09 +00:00
Dan Williams 4fd5e838bd 2008-01-17 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-3-ethernet.c
		- (nm_device_802_3_ethernet_carrier_on,
		   nm_device_802_3_ethernet_carrier_off): ignore any spurious netlink
			carrier events that might come in for devices that don't support
			carrier detect



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3245 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-18 03:01:44 +00:00
Dan Williams efd3d2adca 2008-01-17 Dan Williams <dcbw@redhat.com>
* src/nm-device-interface.c
		- (nm_device_interface_check_connection_conflicts): need to actually
			get the interface, not cast to the object

	* src/nm-device.c
		- (nm_device_check_connection_conflicts): need to get the device class,
			not cast the device to the device class



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3244 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-18 03:00:12 +00:00
Dan Williams dc92660e6c 2008-01-17 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (real_check_connection_conflicts): ignore connections that aren't
			wireless connections



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3243 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-18 02:58:25 +00:00
Dan Williams 2013215c4c 2008-01-17 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c
		- (nm_policy_device_change_check): clear change check idle here
		- (device_change_check_done): remove
		- (schedule_change_check): simplify



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3242 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-18 02:56:20 +00:00
Dan Williams 5d1d4d185e 2008-01-17 Dan Williams <dcbw@redhat.com>
* src/nm-manager.c
		- (check_connection_allowed): take an NMDeviceInterface instead of
			an NMDevice object as an argument
		- (nm_manager_activate_device): pass an NMDeviceInterface to
			check_connection_allowed()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3241 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-18 02:54:55 +00:00
Dan Williams c203ada95a 2008-01-13 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device-802-11-wireless.c
		- (nm_device_802_11_wireless_get_access_points): fix memory leak



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3237 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-14 03:23:29 +00:00
Dan Williams a4c4817481 2008-01-12 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (activation_success_handler): if a match was found in the scan list
			and that match is a hidden AP, update that AP's SSID



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3236 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-11 22:09:21 +00:00
Dan Williams d4980ff5ec 2008-01-11 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerAP.c
		- (nm_ap_new_fake_from_connection): mark fake APs as fake

	* src/nm-device-802-11-wireless.c
		- (get_active_ap): do two passes over the scan list if the caller
			requests that hidden APs get matched too; during the second pass
			when matching hidden APs, ignore the SSID since hidden APs in the
			scan list don't have an SSID yet
		- (periodic_update): move some checks to
			nm_device_802_11_periodic_update() because not all callers need them
		- (nm_device_802_11_periodic_update): move some checks here from
			perodic_update()
		- (merge_scanned_ap): if the current AP is fake, then don't do strict
			matching on incoming scan results, because the fake AP's flags
			might be slightly different (yet still compatible) with the incoming
			scan result's flags and they might actually be the same AP; update
			the rate on merged APs too
		- (activation_success_handler): update the frequency of the fake AP
			on successful connection; match hidden APs too since if the
			current AP is fake, there might already be a scan result in the
			scan list for the desired AP, just without it's SSID filled in yet



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3235 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-11 05:33:11 +00:00
Dan Williams 417c9b7ea7 2008-01-10 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerAP.c
		- (foreach_property_cb): catch more hidden SSID formats



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3234 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-11 02:59:21 +00:00
Dan Williams f9d6d60e4c 2008-01-10 Dan Williams <dcbw@redhat.com>
Fix gnome.org #464215.  Requires the kernel patch titled
	"Introduce WEXT scan capabilities" but will handle the patch not being
	present, you'll just continue to have problems with hidden SSIDs when
	using mac80211-based drivers.

	* src/supplicant-manager/nm-supplicant-config.h
	  src/supplicant-manager/nm-supplicant-config.c
		- (nm_supplicant_config_add_setting_wireless): new parameter to indicate
			whether the driver supports SSID scans or not.  If it does, and if
			the AP is hidden, use ap_scan=1 instead of ap_scan=2

	* src/nm-device-802-11-wireless.c
		- (constructor): check whether or not the driver supports SSID scans
		- (build_supplicant_config): pass driver SSID scan capability when
			building the wireless bits of the supplicant config



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3230 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-10 23:15:46 +00:00
Dan Williams 2497bea1d2 2008-01-09 Dan Williams <dcbw@redhat.com>
* src/nm-device.c
	  src/nm-device.h
		- (device_activation_precheck, check_connection_complete): remove this
			virtual function; incomplete connections should be invalid by
			definition, complete-ness should be checked in the setting's
			verify function

	* src/nm-serial-device.c
	  src/nm-gsm-device.c
		- (real_check_connection_complete): remove

	* libnm-util/nm-setting-serial.c
		- (verify): new function; ensure there is a PPP setting too

	* libnm-util/nm-setting-gsm.c
		- (verify): ensure there is a serial setting too



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3225 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-09 18:27:23 +00:00
Dan Williams 925aa2ff3d Fix date
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3216 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-06 15:05:50 +00:00
Dan Williams fe531c1e1a 2008-01-04 Dan Williams <dcbw@redhat.com>
* src/dhcp-manager/nm-dhcp-manager.c
		- (nm_dhcp_manager_get_ip4_config): handle DHCP-provided MTU
			(gnome.org #332953)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3215 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-06 15:05:36 +00:00
Dan Williams 4acbd93189 Add bug # to entry
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3214 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-06 14:04:53 +00:00
Dan Williams 0455f96925 2008-01-04 Dan Williams <dcbw@redhat.com>
* src/named-manager/nm-named-manager.c
		- (rewrite_resolv_conf, add_ip4_config_to_named): use primary IP4Config's
			nameservers if the secondary config doesn't have any
			(gnome.org #346833)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3212 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-05 04:12:54 +00:00
Tambet Ingo 8774cc756a 2008-01-02 Tambet Ingo <tambet@gmail.com>
* libnm-util/nm-setting-serial.c (nm_setting_serial_class_init):
        * Mark the properties
        with G_PARAM_CONSTRUCT so that they get the default values.

        * src/nm-gsm-device.c: Add preliminary support for monitoring
        * device. It only monitors
        the monitoring device and prints out the output for now. Or more
precicely, doesn't
        do absolutely anything right now since the montoring device
argument is never set.

        * src/nm-serial-device.c (serial_debug): Implement. It's very
        * verbose and thus
        requires it's own knob to turn it on.
        (config_fd): Add NMSettingSerial to the arguments list.
        (nm_serial_device_open): Ditto.
        (get_reply_got_data): Ignore the terminators at the beginning of
the output.
        (nm_serial_device_get_io_channel): Implement.

        * src/nm-manager.c: Add NMDBusManager to the private data of the
        * NMManager. Asking
        a new reference every time (and forgetting to release it
sometimes) is a pain and
        it's not like NMManager could work without dbus.
        (nm_manager_add_device): Register the added device on dbus here.

        * src/nm-hal-manager.c (modem_device_creator): Pass NULL for now
        * for the monitoring
        device.

        * src/nm-device.c (constructor): Don't export the device here,
        * instead export
        it when it's added to the NMManager's device list.




git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3203 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-02 13:42:52 +00:00
Dan Williams ec22c11c4f 2007-12-31 Dan Williams <dcbw@redhat.com>
* src/nm-device-interface.c
	  src/nm-device-interface.h
		- (nm_device_interface_check_connection_conflicts): new function

	* src/nm-device.c
	  src/nm-device.h
		- (nm_device_check_connection_conflicts): new function
		- (device_activation_precheck): don't require subclasses to implement
			check_connection_complete()
		- check_connection() -> check_connection_complete()

	* src/nm-device-802-11-wireless.c
		- (real_check_connection): remove; unused
		- (real_check_connection_conflicts): implement, handle lockdown for
			system connections

	* src/nm-device-802-3-ethernet.c
		- (real_check_connection): remove; unused

	* src/nm-manager.c
		- (check_connection_allowed): new function
		- (nm_manager_activate_device): ensure the connection being requested
			is allowed to be activated

	* src/nm-serial-device.c
	  src/nm-gsm-device.c
		- real_check_connection() -> real_check_connection_complete()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3201 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-31 17:05:25 +00:00
Dan Williams 7f88f52573 2007-12-27 Dan Williams <dcbw@redhat.com>
* src/nm-device-interface.c
	  src/nm-device-interface.h
		- (nm_device_interface_error_quark, nm_device_interface_error_get_type):
			normalize and expand errors
		- (nm_device_interface_init): register errors so they can be marshalled
			through dbus-glib
		- (nm_device_interface_activate): ensure that failure of activation
			returns an error

	* src/nm-device.c
	  src/nm-device.h
		- (device_activation_precheck): implementations of check_connection()
			now take a GError and must fill it in if the check fails.  Return
			more descriptive error if the requested connection is already
			activating
		- (nm_device_activate): actually try to return descriptive errors on
			failures

	* src/nm-device-802-11-wireless.c
	  src/nm-device-802-3-ethernet.c
	  src/nm-serial-device.c
	  src/nm-gsm-device.c
		- (real_check_connection): return more descriptive errors on failure

	* src/NetworkManagerPolicy.c
		- (nm_policy_device_change_check): print activation errors in the logs

	* src/nm-manager.c
		- (nm_manager_error_quark, nm_manager_error_get_type,
		   nm_manager_class_init): new errors
		- (nm_manager_activate_device): handle errors
		- (nm_manager_error_new): removed
		- (wait_for_connection_expired, connection_added_default_handler,
		   impl_manager_activate_device): better error handling



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3197 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-27 08:06:27 +00:00
Dan Williams dd8c546ff0 2007-12-27 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-settings-verify.c
		- Allow 'frequency' network property

	* src/supplicant-manager/nm-supplicant-config.c
	  src/supplicant-manager/nm-supplicant-config.h
		- (nm_supplicant_config_add_setting_wireless): add 'adhoc_freq' argument
			for callers to specify the frequency an Ad-Hoc network should operate
			on.  Some drivers require this to successfully create an Ad-Hoc
			network.

	* src/nm-device-802-11-wireless.c
		- (iw_freq_to_uint32): new function; convert a struct iw_freq into a
			guint32 value in MHz
		- (constructor, nm_device_802_11_wireless_get_frequency): use
			iw_freq_to_uint32()
		- (find_supported_frequency): new function; find a free supported
			frequency for a user-created Ad-Hoc network
		- (build_supplicant_config): if no frequency was specified for a user-
			created Ad-Hoc network, find a free one to use
		- (real_act_stage1_prepare): mark Ad-Hoc connections that don't have
			a specific object as user-created



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3196 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-27 07:52:01 +00:00
Dan Williams 773c82f9d1 2007-12-27 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-utils.c
	  libnm-util/nm-utils.h
		- (nm_utils_security_valid): add 'adhoc' argument and handle security
			for adhoc networks



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3195 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-27 07:17:50 +00:00
Dan Williams 3a64ea2775 2007-12-24 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-wireless.c
		- (verify): add 802.11a channels 7, 8, 9, 11, 12, 16, 34, 165, 183, 184,
			185, 187, 188, 192, and 196



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3190 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-25 00:14:56 +00:00
Dan Williams da7b9ae009 2007-12-24 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (nm_device_802_11_wireless_get_frequency): handle drivers that return
			a channel # instead of a frequency



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3189 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-25 00:09:22 +00:00
Dan Williams 9d87ae887a 2007-12-24 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerAP.c
	  src/NetworkManagerAP.h
		- (nm_ap_new_fake_from_connection): pass band to channel_to_freq()
		- (freq_to_channel): handle split band tables
		- (channel_to_freq): handle split band tables, take a band argument



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3188 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-24 23:59:20 +00:00
Dan Williams 5b83f339fe 2007-12-24 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-connection.h
	  libnm-util/nm-setting-connection.c
		- Add 'lockdown' member



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3187 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-24 23:45:16 +00:00
Dan Williams 7be989b38e 2007-12-22 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-wireless.c
		- (nm_setting_wireless_class_init): add missing 'rate' property
			specification



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3184 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-22 16:38:31 +00:00
Dan Williams 14e671bdea 2007-12-18 Dan Williams <dcbw@redhat.com>
Base the NMNetlinkMonitor class on libnl instead of hand-rolled netlink.

	* src/nm-netlink-monitor.c
	  src/nm-netlink-monitor.h
		- Remove handrolled netlink, use libnl instead

	* src/nm-device-802-3-ethernet.c
		- (constructor, nm_device_802_3_ethernet_carrier_off,
		   nm_device_802_3_ethernet_carrier_on): use new names



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3181 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-18 17:12:21 +00:00
Dan Williams e53989c673 2007-12-17 Dan Williams <dcbw@redhat.com>
* configure.in
		- Bump requirement for libnl to 1.0-pre8 (which works with newer kernels
			and fixes memory leaks)

	* src/nm-netlink.c
		- (nm_netlink_get_default_handle): handle new versions of libnl that
			automatically handle the netlink PID



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3178 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-18 03:44:29 +00:00
Dan Williams c142dd6278 2007-12-17 Dan Williams <dcbw@redhat.com>
Patch from Michael Biebl <biebl@debian.org>

	* configure.in
	  src/ppp-manager/Makefile.am
		- fix up install dir of pppd plugin
		- clean up configure.in a bit



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3176 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-18 02:43:42 +00:00
Dan Williams 07a653b93c 2007-12-12 Dan Williams <dcbw@redhat.com>
* system-settings/src/nm-system-settings.conf
		- Allow non-root clients (like the applet) to read settings



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3167 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-12 22:41:43 +00:00
Tambet Ingo 0bd26c1abe 2007-12-10 Tambet Ingo <tambet@gmail.com>
* Replace all occurences of 'UMTS' with 'GSM'.




git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3161 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-10 09:17:40 +00:00
Dan Williams bc309840db 2007-12-07 Dan Williams <dcbw@redhat.com>
* src/nm-serial-device.c
		- (real_is_up): serial devices are always "up"



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3157 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-07 21:36:00 +00:00
Dan Williams 46c6e7c7c6 2007-12-07 Dan Williams <dcbw@redhat.com>
* src/nm-netlink.c
	  src/NetworkManagerSystem.c
		- (new_nl_handle): ensure that the same netlink pid is never chosen
			twice (gnome.org #491047)
		- Make more robust against allocation-related failures should they occur



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3156 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-07 17:35:24 +00:00
Dan Williams eda2d662cd 2007-12-07 Dan Williams <dcbw@redhat.com>
Noticed by Christian Persch <chpe@gnome.org>

	Always chain up to parent object in dispose and finalize handlers.
		(gnome.org #433112)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3154 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-07 15:32:45 +00:00
Dan Williams 98ee94a717 2007-12-07 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- Wrap #include of linux/mii.h to fix redefined structures due to
			incorrect kernel headers (gnome.org #350061)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3151 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-07 12:33:13 +00:00
Tambet Ingo f2f36ffa7b 2007-12-06 Tambet Ingo <tambet@gmail.com>
* src/nm-umts-device.c (real_act_stage1_prepare): Flash the
        * modem (drop DTR)
        before doing anything else.
        (init_modem): Move modem initialization here.

        * src/nm-serial-device.c (ppp_state_changed): React on pppd
        * state changes.
        (nm_serial_device_flash): Implement.

        * src/ppp-manager/nm-ppp-manager.c (name_owner_changed): Fix the
        * typoes: the state
        changes signal is "StateChanged" and not "Status".
        (ppp_exit_code, ppp_status_changed): Remove the debug output,
it's working fine now.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3146 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-06 15:55:52 +00:00
Dan Williams f286132230 2007-12-06 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-config.c
		- (nm_supplicant_config_add_setting_wireless_security): reorganize a bit
			to only send some options when they make sense; also send phase2
			option to the supplicant (possible fix for rh #399631)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3143 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-06 15:27:49 +00:00
Tambet Ingo 50e36ce698 2007-12-06 Tambet Ingo <tambet@gmail.com>
* src/NetworkManagerSystem.c
        * (nm_system_device_set_from_ip4_config): Change the
        arguments: This whole file shouldn't really know anything about
NMDevices, it
        should deal only with device interfaces. Devices might have
different ifaces for
        different stuff and this place shouldn't know anything about it.

        * src/NetworkManagerPolicy.c: Get rid of leftover global
        * variable global_policy.
        (global_state_changed): Implement. In the current NM it's not
really important,
        but will be required in the case of multiple active devices. (Or
even better,
        if stuff like that gets moved out from NM).

        * src/vpn-manager/nm-vpn-connection.c
        * (connection_state_changed): Don't call
        nm_system_device_set_from_ip4_config() directly, use
nm_device_set_ip4_config() 
        instead.

        * src/nm-device.c: Add a ip_face protected member. It's used for
        * 'multi-interface'
        devices like serial devices (ttyS0 and ppp0 for example).
        (nm_device_get_ip_iface): Implement. Default to the device iface
if ip_iface is not
        set.
        (nm_device_set_ip_iface): Implement.
        (nm_device_activate_stage5_ip_config_commit): Move all the extra
actions that happen
        after setting ip4_config from here ...
        (nm_device_set_ip4_config): ... to here. The reason behind it is
that no other code
        than this function should call
nm_system_device_set_from_ip4_config() because no
        other code has enough information on which arguments to use. So
instead, other code
        could just set the new ip4 config using this function and
everyone is happy.

        * src/nm-umts-device.c: Store the pending ids so that we can
        * remove pending actions
        if we happen to get deactivated while something is pending.
        (automatic_registration): Handle the response that indicates
pending network
        registration and wait until the pending registration is done.
        (real_deactivate_quickly): If there's a pending operation,
cancel it.

        * src/nm-serial-device.c (ppp_ip4_config): Set the ip_iface when
        * the iface is up ...
        (real_deactivate_quickly): ... and remove it when it's down.
        (nm_serial_device_get_reply): Return the timeout id so that the
callers can remove
        it if needed.
        (nm_serial_device_wait_for_reply): Ditto.




git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3141 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-06 14:51:43 +00:00
Tambet Ingo cb1277c955 2007-12-05 Tambet Ingo <tambet@gmail.com>
* src/nm-umts-device.c (dial_done): Fix the typoes in warnings.
        (get_network_done): Remove newline, nm_info() does it already.
        (real_act_stage1_prepare): Turn the modem echo off.

        * src/NetworkManagerSystem.c
        * (nm_system_device_set_from_ip4_config): In case of serial
        device, set the route to the device interface. This is a hack.

        * src/nm-serial-device.c (nm_serial_device_send_command_string):
        * Only append carriage 
        return, no need for a new-line.
        (ppp_ip4_config): Store the ip4 config to be set in the next
stage.
        Change the device iface here (ugh).
        (real_act_stage4_get_ip4_config): Implement.
        (real_deactivate_quickly): Free the pending ip4 config if it's
still pending.
        Restore the device iface.

        * src/NetworkManagerPolicy.c (nm_policy_device_change_check): Do
        * nothing if the active
        device is not wired or wireless (eg, automatically upped)
device.

        * src/ppp-manager/nm-ppp-manager.c (ip4_config_get): Don't make
        * the config secondary,
        it isn't.
        (nm_ppp_manager_start): Don't let pppd to set the default route,
we want to do it.

        * src/nm-hal-manager.c (get_creator): Make sure the device has
        * required capability
        before calling it's is_device_fn().



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3137 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-05 17:33:55 +00:00
Dan Williams 5ec181c20e 2007-12-05 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-utils.c
		- (nm_utils_register_value_transformations,
		   nm_utils_convert_gvalue_hash_to_string): better debug output of
			GHashTables of GValues too



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3136 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-05 16:41:09 +00:00
Dan Williams 91126e546c 2007-12-04 Dan Williams <dcbw@redhat.com>
* initscript/RedHat/NetworkManager.in
		- No longer start named; it's D-Bus interface is going away



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3133 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-04 19:36:34 +00:00
Dan Williams f56f5ef9f4 2007-12-04 Dan Williams <dcbw@redhat.com>
Patch from Michael Biebl <biebl@debian.org>

	* system-settings/plugins/ifcfg/Makefile.am
	  system-settings/src/main.c
	  system-settings/src/Makefile.am
		- Put system settings plugins in NM plugins dir

	* src/ppp-manager/Makefile.am
	  src/ppp-manager/nm-ppp-manager.c
		- Move pppd plugin to NM plugins dir



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3131 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-04 16:17:57 +00:00
Dan Williams 6fdff4f687 2007-12-04 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-vpn-properties.h
		- Clarify usage of the 'data' member of the setting

	* libnm-util/nm-setting-vpn-properties.c
		- (nm_setting_vpn_properties_init): initialize the 'data' hash table
		- (set_property): just remove all the settings; don't recreate the has
		- (update_one_secret): don't need to create the hash table here since
			it should always be present



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3129 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-04 16:09:05 +00:00
Tambet Ingo 185329bc1a 2007-12-03 Tambet Ingo <tambet@gmail.com>
Implement PIN and PUK requesting.

        * src/nm-umts-device.c (enter_pin_done): Request the secret
        * again if it failed.
        (enter_pin): Handle PIN and PUK requests.
        (real_act_stage1_prepare): Clear the secret type.
        (real_connection_secrets_updated): Implement this class method
to get
        notified when new secrets arrive.
        (nm_umts_device_class_init): Add private data back to the umts
device class
        to store the required secret type.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3128 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-03 14:17:02 +00:00
Dan Williams 8be9677211 2007-12-01 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/ifcfg/parser.c
		- (parser_parse_file): don't try to verify NULL connections



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3121 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-01 17:24:57 +00:00
Dan Williams bb8bde197e 2007-12-01 Dan Williams <dcbw@redhat.com>
* system-settings/src/main.c
		- (load_connections, add_connection_to_settings): actually export
			plugin-provided connections over D-Bus so NM can get them



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3120 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-01 17:24:13 +00:00
Dan Williams 98df3d3558 2007-12-01 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/ifcfg/parser.c
	  system-settings/plugins/ifcfg/parser.h
	  system-settings/plugins/ifcfg/plugin.c
		- Hook up more inotify bits (untested)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3119 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-01 16:00:17 +00:00
Dan Williams 89a39c7328 2007-11-29 Dan Williams <dcbw@redhat.com>
* system-settings/src/nm-system-config-interface.h
	  system-settings/src/nm-system-config-interface.c
		- (nm_system_config_interface_init,
		   nm_system_config_interface_get_connections): add

	* system-settings/src/main.c
		- (load_plugins, load_connections, main): use a GSList for plugins
			to ensure priority ordering

	* system-settings/plugins/ifcfg/parser.c
		- (ifcfg_error_quark): move to plugin.c, and rename

	* system-settings/plugins/ifcfg/plugin.h
	  system-settings/plugins/ifcfg/plugin.c
		- (ifcfg_plugin_error_quark): move here from parser.c
		- rework connection loading and initialization
		- Add preliminary inotify support for network profile config file



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3117 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-29 14:40:24 +00:00
Tambet Ingo db5a10dc4d 2007-11-28 Tambet Ingo <tambet@gmail.com>
Merge the beginnings of the new GSM card support.

        * src/ppp-manager/nm-ppp-manager.c (nm_ppp_manager_stop): Remove
        * the
        ppp watch source before killing pppd - If this happens from
g_object_unref()
        then the ppp manager is already destroyed by the time the watch
callback runs.

        * src/nm-hal-manager.c: Add a device_type_name string to the
        * device
        creators, so that we can print a nice human readable string when
a
        device is added.

        * src/nm-umts-device.c (automatic_registration_get_network):
        * Query
        for the activated network, not much is done with the result
thought.

        * src/nm-serial-device.c (nm_serial_device_get_reply):
        * Implement.
        (ppp_ip4_config): Change the device state to activated here for
now.
        (real_check_connection): Make sure the connection includes ppp
setting.

        * libnm-glib/nm-client.c (get_device): Handle umts devices.

        * libnm-glib/Makefile.am: Add the new files to build.

        * libnm-glib/nm-umts-device.c: 
        * libnm-glib/nm-umts-device.h: Implement.

2007-11-26  Tambet Ingo  <tambet@gmail.com>

        * src/nm-umts-device.c (automatic_registration_get_network): For
        * now, dial
        immediately, nm_serial_device_get_reply() isn't implemented
correctly yet.

        * src/nm-serial-device.c (wait_for_reply_info_destroy): Don't
        * try to remove
        the timeout source - this function is only called when the
timeout source has
        been removed.
        (nm_serial_device_wait_for_reply): Allocate the duplicate
responses array
        to be big enough to contain the terminating zero element as
well.
        The timeout argument is meant to be in seconds now.
        (real_deactivate_quickly): Implement.

        * src/NetworkManager.conf: Allow root to own 
        "org.freedesktop.NetworkManager.PPP", deny it for everybody
else.

        * libnm-util/nm-setting-umts.c: Network type and band properties
        * are ints,
        (not unsigned ints).

        * libnm-util/nm-setting-serial.c (nm_setting_serial_class_init):
        * Fix a 
        small issue with parity bounds - capital letters have lower
ascii codes
        than lower case letters.

        * libnm-util/nm-connection.c (register_default_settings):
        * Register serial
        and umts settings.

2007-11-22  Tambet Ingo  <tambet@gmail.com>

        Remove the "index" property from devices as not all device types
have this.

        * include/NetworkManager.h (NM_DBUS_PATH_DEVICE): Remove.

        * src/nm-hal-manager.c (nm_get_device_index_from_hal): Remove.
        (wired_device_creator): Get the device interface from hal to
create the device.
        (wireless_device_creator): Ditto.

        * src/nm-device.c (nm_device_init): Remove the index member.
        (constructor): Remove the checks for index property, make
interface property
        a require constructor property.
        Use the HAL udi for DBus path for devices.
        (nm_device_get_index): Remove.
        (set_property): Remove index handling.
        (get_property): Ditto.
        (nm_device_get_dbus_path): Remove.

        * src/nm-device-interface.c (nm_device_interface_init): Remove
        * the index
        property.

        * src/nm-device-802-3-ethernet.c
        * (nm_device_802_3_ethernet_link_activated):
        Access the device index through it's interface.
        (nm_device_802_3_ethernet_link_deactivated): Ditto.
        (nm_device_802_3_ethernet_new): Remove the useless argument
test_dev. Remove
        index argument. Add interface argument.

        * src/nm-device-802-11-wireless.c
        * (nm_device_802_11_wireless_new): Remove
        the useless test_dev argument. Remove index argument. Add
interface arugment.

        * src/NetworkManagerSystem.c
        * (nm_system_device_set_from_ip4_config): Get the
        device index through interface.
        (nm_system_set_mtu): Ditto.

        * introspection/nm-device.xml: Remove the "Index" property.

2007-11-21  Tambet Ingo  <tambet@gmail.com>

        * src/nm-serial-device.c: 
        * src/nm-serial-device.c: 
        * src/nm-umts-device.c:
        * src/nm-umts-device.h: Implement.

        * src/nm-hal-manager.c (nm_get_device_driver_name):
        * libhal_free_string the string 
        allocated by libhal.
        (modem_device_creator): Implement.
        (register_built_in_creators): Register the modem creator.

        * src/nm-device-802-11-wireless.c
        * (nm_device_802_11_wireless_new): 
        Remove the unused test_dev argument.

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

        * src/Makefile.am: Add new files to build.
        Link in ppp-manager.

        * libnm-util/nm-setting-umts.c: 
        * libnm-util/nm-setting-umts.h: 
        * libnm-util/nm-setting-serial.c: 
        * libnm-util/nm-setting-serial.h: Implement.

        * libnm-util/Makefile.am: Add new files to build.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3116 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-29 14:38:07 +00:00
Dan Williams f5fb016271 2007-11-28 Dan Williams <dcbw@redhat.com>
Patch from Zdeněk Jurka <zdenek.jurka@jware.cz>

	Support DHCP-provided static routes.

	* src/nm-ip4-config.h
	  src/nm-ip4-config.c
		- Add get/set functions for static routes

	* src/dhcp-manager/nm-dhcp-manager.c
		- (nm_dhcp_manager_get_ip4_config): extract static routes from the
			DHCP response

	* src/NetworkManagerSystem.c
		- (nm_system_device_set_from_ip4_config): set any static routes on the
			interface when applying the IP4Config



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3115 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-28 22:38:33 +00:00
Dan Williams 9695c380fd 2007-11-28 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (real_act_stage1_prepare): mark APs created for hidden networks
			as non-broadcasting



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3114 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-28 20:25:31 +00:00
Dan Williams f68d9309e2 2007-11-27 Dan Williams <dcbw@redhat.com>
* system-settings/src/nm-system-config-interface.h
		- Note how to store secrets on NMSetting objects

	* system-settings/src/dbus-settings.c
		- (connection_settings_get_secrets): implement



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3113 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-27 22:20:19 +00:00
Dan Williams 9e53dc83b0 2007-11-27 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/ifcfg/Makefile.am
	  system-settings/plugins/ifcfg/parser.c
	  system-settings/plugins/ifcfg/parser.h
	  system-settings/plugins/ifcfg/plugin.c
		- Parse wireless connections too

	* system-settings/src/dbus-settings.c
	  system-settings/src/dbus-settings.h
	  system-settings/src/main.c
		- Handle connection update/removal if the plugin supports it



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3112 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-27 19:25:46 +00:00
Dan Williams 7f21476233 2007-11-27 Dan Williams <dcbw@redhat.com>
* src/nm-dbus-manager.h
	  src/nm-hal-manager.c
		- Include the correct headers now that NetworkManagerDbusUtils.h doesn't
			do it for them

	* src/Makefile.am
	  src/NetworkManagerDbusUtils.c
	  src/NetworkManagerDbusUtils.h
		- Remove these two source files; they are unused



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3111 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-27 17:18:41 +00:00
Dan Williams bfb5fc0dc9 2007-11-27 Dan Williams <dcbw@redhat.com>
* src/vpn-manager/nm-vpn-manager.c
		- (impl_vpn_manager_connect): fix system settings check (found by
			James M. Leddy)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3110 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-27 16:27:20 +00:00
Dan Williams 6076621fd0 2007-11-26 Dan Williams <dcbw@redhat.com>
* Fix warnings so everything compiles with --enable-more-warnings



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3108 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-26 16:59:47 +00:00
Dan Williams e18d04cf0f 2007-11-25 Dan Williams <dcbw@redhat.com>
* system-settings/*
		- Rework structure and code to use GModule-loaded plugins and a plugin
			interface that plugins export to the system settings service



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3106 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-26 03:47:30 +00:00
Dan Williams ac5206aa9c 2007-11-21 Dan Williams <dcbw@redhat.com>
* system-settings/*
		- Add Soren's system settings service.  Needs work for distros other
			than Fedora; the backends from NM should mostly migrate to here
			and be converted to GObjects



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3104 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-21 06:24:15 +00:00
Dan Williams f2b002c3de 2007-11-21 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-vpn-properties.c
		- (set_property): must deep-copy the given settings hash, otherwise
			double-free errors occur when the setting is disposed of



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3102 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-21 05:46:50 +00:00
Dan Williams a2c202ed8d 2007-11-21 Dan Williams <dcbw@redhat.com>
* src/vpn-manager/nm-vpn-act-request.h
	  src/vpn-manager/nm-vpn-act-request.c
		- Remove; unused



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3101 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-21 05:23:44 +00:00
Dan Williams af4dd78d6a 2007-11-20 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-utils.c
		- (nm_utils_convert_strv_to_string, nm_utils_convert_uint_array_to_string,
		   nm_utils_convert_ip4_addr_struct_array_to_string,
		   nm_utils_register_value_transformations): print out the readable
			values of more types of properties of NMSettings subclasses



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3100 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-20 22:15:15 +00:00
Dan Williams cb2af424de 2007-11-20 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-ip4-config.c
		- (ip4_addresses_from_gvalue, ip4_addresses_to_gvalue,
		   nm_setting_ip4_config_class_init): apparently dbus-glib can't
			marshal GValueArrays inside collections, so switch to types that it
			can actually marshal/demarshal



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3098 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-20 20:48:18 +00:00
Dan Williams 954b5569a8 2007-11-16 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-wireless-security.c
		- (verify_tls, verify_ttls, verify_identity, verify_nai): do some
			minimal verification of EAP methods too
		- (verify): verify phase1 eap methods too



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3096 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-19 18:13:48 +00:00
Dan Williams 441a7ad8fc 2007-11-15 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device.h
	  libnm-glib/nm-device.c
		- (nm_device_get_product, nm_device_get_vendor): should be returning
			const char *



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3092 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-15 21:24:50 +00:00
Dan Williams da6ef40b95 2007-11-15 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device.c
		- (get_product_and_vendor): don't try to free things that should be
			freed



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3091 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-15 21:13:14 +00:00
Dan Williams 13e564174d 2007-11-15 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerUtils.c
		- (nm_ethernet_address_is_valid): unbreak previous fix



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3090 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-15 20:33:08 +00:00
Dan Williams fa68b119c0 2007-11-15 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-config.c
		- (nm_supplicant_config_add_setting_wireless_security): handle PEAP
			options



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3088 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-15 20:25:19 +00:00
Dan Williams da4f9c0df2 2007-11-15 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerUtils.c
		- (nm_ethernet_address_is_valid): fix style, clarify
		- (nm_ethernet_addresses_are_equal): don't try to memcmp NULLs

	* src/nm-device-802-11-wireless.c
		- (get_active_ap): handle failure from nm_device_802_11_wireless_get_bssid()
		- (nm_device_802_11_wireless_get_ssid,
		   nm_device_802_11_wireless_get_bssid,
		   nm_device_802_11_wireless_get_bitrate): zero the wreq structure
		   	before calling the ioctl; fixes valgrind-reported jump depends on
			uninitialized value errors



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3086 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-15 18:33:17 +00:00
Dan Williams 53f271805f 2007-11-15 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.c
		- (nm_setting_to_hash, one_property_cb): revert previous commit, it's
			unecessary to serialize 'name'

	* src/nm-activation-request.c
		- (get_secrets_cb): fix cases where a full NMSetting is returned from
			the GetSecrets call



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3085 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-15 16:57:33 +00:00
Dan Williams dcc6b2a9c0 2007-11-15 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-connection.h
	  libnm-util/nm-setting-connection.c
		- Rename the 'name' property to 'id', because it conflicted with the
			NMSetting superclass' 'name' property.

	* libnm-util/nm-setting.c
		- (nm_setting_to_hash): serialize the 'name' property
		- (one_property_cb): ignore 'name' on deserialization of a connection

	* src/nm-device-802-11-wireless.c
	  src/vpn-manager/nm-vpn-connection.c
	  src/NetworkManagerPolicy.c
		- Fix up for NMSettingConnection 'name'->'id' changes



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3084 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-15 15:52:42 +00:00
Dan Williams a2b0d04517 2007-11-13 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device-802-11-wireless.h
	  libnm-glib/nm-device-802-11-wireless.c
		- (nm_device_802_11_wireless_get_hw_address): return should be const

	* test/nm-tool.c
	  libnm-glib/libnm-glib-test.c
		- Fixes for above change



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3082 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-13 20:03:31 +00:00
Dan Williams bc17ea6d0a 2007-11-12 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-settings-verify.c
		- Allow fragment_size option

	* src/supplicant-manager/nm-supplicant-settings-verify.c
		- (nm_supplicant_config_add_setting_wireless_security): use a lower
			EAP fragment size than the default to help some TLS connections



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3081 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-13 04:04:47 +00:00
Dan Williams 40360167c6 2007-11-12 Dan Williams <dcbw@redhat.com>
Make certs actually work.  The private key is now a secret, and should be
	decrypted when requested by NM.  The private key and phase2 private key
	passwords are no longer interesting to NM because they should be used by
	the settings service to decrypt the private key itself before passing it
	to NM, and hence have been removed as fields.

	* libnm-util/nm-setting-wireless-security.h
	  libnm-util/nm-setting-wireless-security.c
		- Remove private-key-passwd and phase2-private-key-passwd from
			properties
		- (need_secrets_password, need_secrets_eappsk, need_secrets_sim,
		   need_secrets): use property #defines instead strings to keep things
			consistent
		- (need_secrets_tls): if a client certificate is present but no
			private key, request the private key
		- (set_property, get_property, nm_setting_wireless_security_class_init):
			remove private key password stuff, mark private keys as secret

	* src/supplicant-manager/nm-supplicant-settings-verify.c
		- Remove private_key_passwd and private_key2_passwd from opt_table



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3080 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-13 02:16:00 +00:00
Dan Williams 5523faaeb8 2007-11-09 Dan Williams <dcbw@redhat.com>
Fix vpn-properties setting update_secrets call for new NMSetting stuff.
	Since the vpn-properties are managed and known by the VPN daemons themselves,
	libnm-util doesn't know what's secret and what's in the setting's 'data'
	member.

	* libnm-util/nm-setting.h
	  libnm-util/nm-setting.c
		- Add the ability for subclasses to override update_one_secret

	* libnm-util/nm-setting-vpn-properties.c
		- Override update_one_secret and just copy the values into the
			internal table



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3078 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-09 19:41:20 +00:00
Dan Williams 65b9233068 2007-11-09 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-settings.h
	  libnm-glib/nm-settings.c
		- (nm_settings_new_error): remove
		- (nm_settings_error_quark): add; instead of nm_settings_new_error,
			clients should use g_set_error() with NM_SETTINGS_ERROR



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3077 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-09 16:24:39 +00:00
Dan Williams 0b21c3c8c2 2007-11-09 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-config.c
		- (nm_supplicant_config_add_setting_wireless_security): private key
			passwords are never sent to wpa_supplicant, because the supplicant
			should never be reading random files from the disk.  Clients like
			the applet are required to decrypt the private keys and send NM
			the decrypted blobs.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3076 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-09 16:23:39 +00:00
Dan Williams 46cac7cfaf 2007-11-08 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-wireless-security.h
	  libnm-util/nm-setting-wireless-security.c
		- Add 'private-key-decrypted' and 'phase2-private-key-decrypted'
			members to 802-11-wireless-security structure.  This should be used
			to indicate that the values in private-key and phase2-private-key
			are already decrypted by the user agent, and that no
			private-key-passwd or phase2-private-key-passwd should be expected.
			It is not meant to be a stored configuration value, but meant to
			be set when the conneciton is sent to NM over dbus.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3073 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-08 19:27:28 +00:00
Dan Williams a247281168 2007-11-08 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-connection.h
	  libnm-util/nm-connection.c
		- (nm_connection_need_secrets): add argument to return hints

	* src/nm-device-802-11-wireless.c
		- (link_timeout_cb, supplicant_connection_timeout_cb,
		   real_act_stage2_config, real_act_stage4_ip_config_timeout): handle
			nm_connection_need_secrets() change



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3072 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-08 19:25:00 +00:00
Tambet Ingo 6b79d40a76 2007-11-07 Tambet Ingo <tambet@gmail.com>
Rework NMSetting structures: Move each setting to it's own file.
        Convert to GObject. Remove home grown setting types and use
GTypes.
        Use GObject property introspection for hash conversion,
enumerating
        properties, etc.

        * libnm-util/nm-setting-connection.[ch]
        * libnm-util/nm-setting-ip4-config.[ch]
        * libnm-util/nm-setting-ppp.[ch]
        * libnm-util/nm-setting-vpn.[ch]
        * libnm-util/nm-setting-vpn-properties.[ch]
        * libnm-util/nm-setting-wired.[ch]
        * libnm-util/nm-setting-wireless.[ch]
        * libnm-util/nm-setting-wireless-security.[ch]

        New files, each containing a setting.

        * libnm-util/nm-setting-template.[ch]: A template for creating
        * new
        settings. To use it, just replace 'template' with the new
setting
        name, and you're half-way done.

        * libnm-util/nm-setting.c: Convert to GObject and use GObject
        introspection instead of internal types and tables.

        * libnm-util/nm-connection.c: Adapt the new NMSetting work.

        * libnm-util/nm-param-spec-specialized.[ch]: Implement. Handles
        GValue types defined by dbus-glib for composed types like
collections,
        structures and maps.

        * src/*: The API of NMSetting and NMConnection changed a bit:
        * Getting
        a setting from connection takes the setting type now. Also,
since
        the settings are in multiple files, include relevant settings.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3068 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-07 16:06:43 +00:00
Saleem Abdulrasool 143a118773 implement restarts for other mdns providers in Gentoo
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3060 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-01 02:15:16 +00:00
Dan Williams d04ec21681 2007-10-31 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-connection.c
		- (gvalue_to_string): handle UINT32 arrays



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3059 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-31 22:12:12 +00:00
Dan Williams b3c00a7be8 2007-10-31 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device.h
	  libnm-glib/nm-device.c
		- (nm_device_get_description): remove
		- (nm_device_get_product, nm_device_get_vendor): add
		- (nm_device_update_description): new function (private); walk HAL
			devices to get product and vendor IDs for a specific device



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3058 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-31 22:11:42 +00:00
Dan Williams 528858c039 2007-10-31 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (nm_device_802_11_wireless_get_mode): ignore ENODEV errors



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3057 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-31 22:09:34 +00:00
Dan Williams 45759d66fa 2007-10-29 Dan Williams <dcbw@redhat.com>
* src/nm-hal-manager.c
		- (device_added, device_new_capability): ignore device additions while
			asleep.  Fixes crash caused when NM goes to sleep, a network device
			kernel module is unloaded and reloaded and recognized by NM again.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3053 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-29 15:34:04 +00:00
Dan Williams 792b14dec4 2007-10-26 Dan Williams <dcbw@redhat.com>
Patch from Helmut Schaa <hschaa@suse.de> (and more bits from me)

	* src/NetworkManagerAP.c
	  src/NetworkManagerAP.h
	  libnm-glib/nm-access-point.c
	  libnm-glib/nm-access-point.h
		- Make 'rate' property a guint32 to better match with WEXT and
			wpa_supplicant and to allow representation of higher bitrates

	* src/nm-device-802-11-wireless.c
	  introspection/nm-device-802-11-wireless.xml
	  libnm-glib/nm-device-802-11-wireless.c
	  libnm-glib/nm-device-802-11-wireless.h
		- Make 'bitrate' property a guint32 to match AP 'rate' property type

	* src/nm-device-802-3-ethernet.c
	  src/nm-device-802-3-ethernet.h
	  introspection/nm-device-802-3-ethernet.xml
	  libnm-glib/nm-device-802-3-ethernet.c
	  libnm-glib/nm-device-802-3-ethernet.h
		- Make 'speed' property a guint32 to match other speed/rate types
		- Make nm_device_802_3_ethernet_get_speed() static

	* test/nm-tool.c
		- Update for the changes above



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3030 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-27 02:58:32 +00:00
Dan Williams fb7e6b461a 2007-10-26 Dan Williams <dcbw@redhat.com>
* src/named-manager/nm-named-manager.c
		- (rewrite_resolv_conf): clean up error handling to avoid double-free by
		    not calling fclose() twice on some error conditions



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3029 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-27 02:24:19 +00:00
Dan Williams a8decaa768 2007-10-26 Dan Williams <dcbw@redhat.com>
* src/nm-activation-request.c
		- (dispose): clean up indentation; get the right DBusGProxy object to
			cancel the GetSecrets pending call on.  Need to use the Secrets
			proxy, not the regular connection proxy.  Otherwise the GetSecrets
			pending call doesn't get canceled, and pressing Cancel in the
			applet's password dialog could cause get_secrets_cb() to be called
			after the activation request has already been destroyed



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3028 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-27 02:09:27 +00:00
Dan Williams 2eb8b115f3 2007-10-24 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-config.c
		- (nm_supplicant_config_add_blob): pass blob data and length for
			verification
		- (get_hash_cb): use GByteArrays rather than GArrays; easier to follow



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3020 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-24 19:27:48 +00:00
Dan Williams 9fec2307f0 2007-10-24 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-settings-verify.c
		- (opt_table): max length for certificates should be 65536



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3019 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-24 19:26:45 +00:00
Dan Williams 6a58b25532 2007-10-24 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-interface.c
		- (blob_free): correctly free blob data after use
		- (call_set_blobs): use the right D-Bus interfaace for setBlobs



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3018 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-24 19:25:55 +00:00
Dan Williams 97d77a648c 2007-10-24 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.c
		- (setting_wireless_security_need_secrets): Fix lookup table logic for
			EAP method need secrets



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3017 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-24 17:55:42 +00:00
Dan Williams 14f90ea3e1 2007-10-24 Dan Williams <dcbw@redhat.com>
* src/backends/NetworkManagerRedHat.c
		- (nm_system_update_dns): be a lot smarter about telling nscd to restart



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3016 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-24 05:00:17 +00:00
Dan Williams aedced3964 2007-10-23 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.c
	  libnm-util/nm-setting.c
		- (nm_setting_compare): implement
		- (default_setting_compare_fn, do_one_compare, compare_gvalue_hash,
		   compare_one_hash_gvalue): compare the contents of a setting

	* libnm-util/nm-connection.c
		- (nm_connection_compare): implement



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3013 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-23 20:41:10 +00:00
Dan Williams 5bd382de25 2007-10-23 Dan Williams <dcbw@redhat.com>
* src/nm-activation-request.c
		- (get_secrets_cb): handle getting a setting back that is more than
			just secrets (ie, user changed auth or EAP method or something)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3012 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-23 18:34:42 +00:00
Dan Williams fbd22c96bb 2007-10-23 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.c
	  libnm-util/nm-setting.h
		- (nm_setting_verify): new function; verify one setting
		- (nm_settings_verify_all): rename from nm_settings_verify()
		- (setting_connection_verify, setting_wireless_verify): allow NULL
			all_settings

	* libnm-util/nm-connection.c
		- (nm_connection_replace_settings, nm_connection_verify,
		   nm_connection_new_from_hash): handle nm_settings_verify() rename



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3011 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-23 18:33:49 +00:00
Dan Williams 3afa871af6 2007-10-23 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (real_act_stage2_config): use pre-increment on 'tries' to get the
			desired behavior



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3010 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-23 18:30:05 +00:00
Dan Williams 657121419e 2007-10-23 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-settings-verify.c
		- eap_allowed, phase2_allowed: harmonize with allowed values from
			nm-settings.c



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3009 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-23 18:28:41 +00:00
Dan Williams 2e00167855 2007-10-23 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (real_act_stage2_config): after the first association failure,
			if the connection still needs secrets ask the user for them
			explicitly.  After the fourth association failure due to bad
			secrets, fail the connection entirely.  Handles the GetSecrets
			loop that NM gets into when the provided secrets don't match up
			with the connection details.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3008 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-23 14:34:23 +00:00
Dan Williams f59dbe8833 2007-10-23 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-config.c
		- (nm_supplicant_config_add_setting_wireless_security): only add
			WPA-specific options when WPA is in use



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3007 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-23 14:31:14 +00:00
Dan Williams 235aeb7dc2 2007-10-23 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-config.c
		- (nm_supplicant_config_add_setting_wireless_security): 'password'
			secret doesn't need to be unhexified



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3006 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-23 14:24:04 +00:00
Dan Williams a83107ff1d 2007-10-23 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.c
		- (setting_wireless_security_need_secrets): ensure auth_alg is !NULL
			before trying to do something with it



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3005 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-23 13:27:26 +00:00
Dan Williams 9b1909189d 2007-10-23 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (merge_scanned_ap): handle NULL ssids returned from nm_ap_get_ssid()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3004 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-23 13:26:39 +00:00
Dan Williams 19be156d67 2007-10-23 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (merge_scanned_ap): use libnm-util empty SSID check to catch more
			non-SSID-broadcasting APs



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3003 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-23 10:58:35 +00:00
Dan Williams 28c26c26d2 2007-10-23 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerAP.c
		- (match_cipher, security_compatible): remove
		- (nm_ap_check_compatible): use nm_utils_ap_security_compatible() from
			libnm-util instead



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3002 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-23 10:55:54 +00:00
Dan Williams f1409ba595 2007-10-23 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-utils.c
	  libnm-util/nm-utils.h
		- (nm_utils_ap_security_compatible): common function for checking
			whether a specific AP is compatible with an NMConnection



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3001 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-23 10:54:37 +00:00
Dan Williams 4c4f59674a 2007-10-23 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.c
		- (setting_wireless_security_need_secrets, need_secrets_phase2,
		   need_secrets_tls, need_secrets_sim, need_secrets_eappsk,
		   need_secrets_password, setting_wireless_security_verify): fix
			need_secrets for IEEE 802.1x and WPA-EAP by implementing need
			secrets logic for each supported EAP method



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3000 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-23 10:53:13 +00:00
Dan Williams 07a4b508ce 2007-10-23 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-config.c
		- (nm_supplicant_config_add_setting_wireless_security): fix wpa_supplicant
			config option name, should be "private_key2_passwd"



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2999 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-23 10:50:01 +00:00
Tambet Ingo 7ba9c6e1c5 2007-10-22 Tambet Ingo <tambet@gmail.com>
Implement support for static IP addresses, additional/overridden
DNS and
        DNS domain search lists.

        * libnm-util/nm-setting.c (uint_array_to_gvalue): Implement.
        (ip4_addresses_to_gvalue): Implement.
        (convert_array_to_byte_array): Implement.
        (nm_setting_populate_from_hash_default): Handle
NM_S_TYPE_UINT_ARRAY and
        NM_S_TYPE_IP4_ADDRESSES.
        (nm_setting_hash): Ditto.
        (default_setting_clear_secrets): Add a default case for the
switch: IP address
        shouldn't be secret, ever.
        (setting_ip4_config_verify): Update, requires addresses in case
of manual
        configurations.
        (setting_ip4_config_destroy): Free stuff.

        * src/nm-device.c (merge_ip4_config): Implement.
        (real_act_stage4_get_ip4_config): Merge IP4 configuration from
NMConnection.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2996 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-22 15:45:39 +00:00
Dan Williams a7f3b960f4 2007-10-22 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.c
		- (setting_wireless_security_verify): allow WEP-40 and WEP-104 as
			pairwise cipher options for Dynamic WEP



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2995 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-22 13:58:04 +00:00
Dan Williams f0ecd6be34 2007-10-21 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerAP.c
	  src/NetworkManagerAP.h
		- Rename 'articifical' -> 'fake' since that's what they are until
			noticed in scans
		- (nm_ap_new_fake_from_connection): new function to create a 'fake' AP
			from the attributes in an NMConnection object
		- (security_compatible): better handle Dynamic WEP and LEAP; handle
			WPA Enterprise
		- (nm_ap_match_in_list): find a matching AP in a scan list

	* src/nm-device-802-11-wireless.c
		- (get_active_ap): add an 'ignore_ap' argument to ignore a specific
			AP when searching the scan list; match on frequency and mode too
		- (nm_device_802_11_wireless_get_frequency): implement
		- (merge_scanned_ap): replace duplicate matching logic with
			nm_ap_match_in_list()
		- (real_act_stage1_prepare): handle a NULL specific object; ie where
			the user is trying to connect to a hidden network that is not yet
			known from the scan list
		- (activation_success_handler): now that the card knows the AP's BSSID,
			there may already be a scanned AP in the scan list that is what
			we really wanted to connect to, but didn't know at the time.  Use
			that instead of the 'fake' AP created at activation start and get
			rid of the 'fake' AP 
		- (cull_scan_list): don't remove fake APs



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2993 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-22 03:15:05 +00:00
Dan Williams fb67dd539b 2007-10-21 Dan Williams <dcbw@redhat.com>
* src/nm-activation-request.h
	  src/nm-activation-request.c
		- (nm_act_request_set_specific_object): new function; allow setting the
			specific object if one isn't set yet



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2991 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-22 01:51:41 +00:00
Dan Williams 41cb03a3dd 2007-10-20 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-config.h
	  src/supplicant-manager/nm-supplicant-config.c
		- (nm_supplicant_config_init, nm_supplicant_config_finalize): add a hash
			table to store blobs
		- (nm_supplicant_config_add_blob): new function; add blob to internal
			blob hash table
		- (nm_supplicant_config_get_blobs): new function; get stored blobs
		- (nm_supplicant_config_add_setting_wireless_security): handle
			options that use certificates (ie, blobs)

	* src/nm-device-802-11-wireless.c
		- (build_supplicant_config): pass a UID (just use the connection path)
			to the supplicant config as now required

	* src/supplicant-manager/nm-supplicant-interface.c
		- (add_network_cb, call_set_blobs, set_blobs_cb, call_set_network): if
			there are any blobs to send to wpa_supplicant, send those first
			before sending the network configuration



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2990 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-20 20:31:29 +00:00
Dan Williams 42a732d9b9 2007-10-19 Dan Williams <dcbw@redhat.com>
Split the GetSecrets() call off to a separate D-Bus interface so that it
	can be more easily locked down with D-Bus policy.  Only 'root' (ie, NM)
	should be able to call GetSecrets().

	* include/NetworkManager.h
		- Define the connection secrets D-Bus interface

	* src/vpn-manager/nm-vpn-connection.c
		- (clear_need_auth): get the right proxy object for the connection
			secrets interface
		- (get_connection_secrets): use the connection secrets proxy; send
			empty hints in get secrets request

	* src/nm-activation-request.c
		- (nm_act_request_request_connection_secrets): use the connection
			secrets proxy; send empty hints in get secrets request

	* src/nm-manager.c
	  src/nm-manager.h
		- (connection_get_settings_cb): set the connection secrets proxy on
			the connection object too
		- (internal_new_connection_cb): create the connection secrets proxy

	* introspection/nm-settings-connection.xml
		- Define Connection.Secrets interface and move GetSecrets there
		- Add a 'hints' argument to GetSecrets

	* libnm-glib/nm-settings.c
	  libnm-glib/nm-settings.h
		- (impl_connection_settings_get_secrets): add 'hints' argument



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2989 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-19 04:55:05 +00:00
Dan Williams c2f361392f 2007-10-19 Dan Williams <dcbw@redhat.com>
* src/nm-device.c
		- (constructor): add message about what path a device is exported as
			to help in debugging rh #339011



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2988 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-19 04:43:02 +00:00
Dan Williams 2017cd5c2c 2007-10-17 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-utils.h
	  libnm-util/nm-utils.c
		- (nm_utils_security_valid): common function to help find the intersection
			of capabilities of devices and (optionally) access points



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2987 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-17 21:40:17 +00:00
Dan Williams 0ec52985d5 2007-10-17 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (get_wireless_capabilities): add missing braces so that WPA capabilities
			don't get erroneously cleared



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2986 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-17 21:29:41 +00:00
Dan Williams 7d424355e2 2007-10-17 Dan Williams <dcbw@redhat.com>
* src/nm-manager.h
	  src/nm-manager.c
	  src/nm-hal-manager.c
		- (device_removed, finalize, nm_manager_remove_device,
		   nm_manager_sleep): add a 'deactivate' argument to 
		   nm_manager_remove_device() to fully deactivate devices when necessary
		   (ie, always except when waking up)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2985 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-17 11:36:33 +00:00
Dan Williams 8ea008c55c 2007-10-16 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.c
		- (setting_wireless_security_verify): fix phase2_auth methods; 'sim'
			also isn't valid phase2 autheap method



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2984 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-17 02:22:35 +00:00
Dan Williams 8d260a57f1 2007-10-16 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-client.c
		- (update_wireless_status): consolidate updates of wireless status
		- (constructor): use update_wireless_status()
		- (manager_running): set wireless status off when NM goes away; requery
			the wireless status when NM comes back



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2983 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-16 20:20:17 +00:00
Dan Williams ef24e205b8 2007-10-16 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-client.c
		- (nm_client_activate_device): actually use the fixed-up specific
			object path



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2982 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-16 20:09:48 +00:00
Dan Williams 0c6c18a9b6 2007-10-16 Dan Williams <dcbw@redhat.com>
* src/nm-hal-manager.c
		- (killswitch_getpower_reply, nm_hal_manager_destroy): only print out
			killswitch error messages once



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2981 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-16 19:49:49 +00:00
Dan Williams 9f255cf493 2007-10-16 Dan Williams <dcbw@redhat.com>
* src/nm-manager.c
		- (manager_set_wireless_enabled): don't allow wireless to be enabled
			if it's disabled in hardware; don't touch network devices while
			NM is asleep



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2980 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-16 19:30:29 +00:00
Dan Williams bebd0e38b8 2007-10-16 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-client.c
		- (nm_client_activate_device): convert NULL specific_object to "/",
			which is used in place of NULL

	* src/nm-manager.c
		- (impl_manager_activate_device): convert "/" specific_object back into
			NULL



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2979 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-16 18:59:36 +00:00
Tambet Ingo 850f441ea5 2007-10-16 Tambet Ingo <tambet@gmail.com>
Implement a generic NMSetting creator from setting name.
        While at it, get rid of all nm_setting_foo_new_from_hash()
functions and
        add a virtual function 'populate_fn'.

        * libnm-util/nm-connection.c (nm_connection_create_setting):
        * Implement.
        (register_default_creators): Register setting creators instead
of functions
        that create and then populate.
        (parse_one_setting): Use the common setting creator and then
setting specific
        poplulation function.

        * libnm-util/nm-setting.c: Get rid of
        * nm_setting_foo_new_from_hash() functions,
        they all looked exactly the same.
        Add a 'populate_fn' virtual function to NMSetting.
        Use default virtual functions in case they are not overriden.
        (nm_setting_populate_from_hash): Implement.

        * src/nm-device.c (real_act_stage3_ip_config_start): Don't hard
        * code the setting
        name, use a defined string.
        (real_act_stage4_get_ip4_config): Ditto.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2978 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-16 15:18:01 +00:00
Tambet Ingo 65f0247cdc 2007-10-16 Tambet Ingo <tambet@gmail.com>
* src/nm-hal-manager.c (killswitch_getpower_reply): The type
        * returned from
        HAL is int, not uint.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2976 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-16 08:17:06 +00:00
Tambet Ingo 7e2a621f0a 2007-10-15 Tambet Ingo <tambet@gmail.com>
Implement killswitch polling through HAL.

        * src/nm-manager.c: Add wireless hardware status property. Add 
        'properties-changed' signal for changes in wireless and wireless
hardware
        state changes.

        * src/nm-hal-manager.c: Poll hal for killswitch statuses in
        * every 6 seconds
        and update NMManager's wireless hardware state when it has
changed.
        (nm_hal_manager_new): Don't try to add initial devices here -
(hal_init)
        already does that.

        * libnm-glib/nm-client.c: Add wireless hardware status property.
        * Cache the
        values of wireless state and wireless hardware state. Listen for
the
        'properties-changed' signals, update the cached values and emit
notify.

        * include/NetworkManager.h: Fix a typo in a comment.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2975 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-15 14:46:37 +00:00
Dan Williams 799c141b35 2007-10-14 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.c
		- (setting_wireless_security_need_secrets): handle LEAP secrets



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2974 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-14 12:16:30 +00:00
Dan Williams 52fd366c05 2007-10-13 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.h
	  libnm-util/nm-setting.c
	  src/supplicant-manager/nm-supplicant-config.c
		- Make the 'proto' field of the 802-11-wireless-security field a
			string list



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2973 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-14 02:28:28 +00:00
Tambet Ingo 86306041af 2007-10-12 Tambet Ingo <tambet@gmail.com>
Rework the "properties-changed" signal listening implementation.
        Add a generic implementation to NMObject class that listens for
        the signal and calls property setters of the target NMObject.

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

        * libnm-glib/nm-device-802-11-wireless.c: Move the GObject
        * consturction
        code to the end of file so that all the static functions are
available
        without extra declarations.
        Remove the "properties-changed" signal handling and use the
framework from
        NMObject.
        Implement property setters for properties that change with 
        "properties-changed" signal.

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



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2972 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-12 10:18:46 +00:00
Tambet Ingo 7ce5758207 2007-10-12 Tambet Ingo <tambet@gmail.com>
Rework the "properties-changed" signal implementation.
        In classes that need to use it, just emit "GObject::notify" and
the new
        framework takes care of the rest to make the signal available on
dbus.
        The framework queues the notifications and tries to send as many
together
        in one signal as possible.

        * src/nm-properties-changed-signal.c:
        * src/nm-properties-changed-signal.h: Implement.

        * src/Makefile.am: Add new files to build.

        * src/NetworkManagerAP.c: Use the general framework for
        * properties-changed
        signal.

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



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2971 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-12 10:11:15 +00:00
Dan Williams dc3d072b04 2007-10-10 Dan Williams <dcbw@redhat.com>
* src/nm-manager.c
		- (wait_for_connection_expired): ensure info is valid
		- (connection_added_default_handler): Should only remove pending
			connection info when the manager has the connection that it's
			waiting for.  Fixes segfault in wait_for_connection_info().  



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2969 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-10 20:45:15 +00:00
Dan Williams 2766bbe292 2007-10-10 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.c
	  libnm-util/nm-setting.h
		- Add a default 'user_name' field to the VPN setting, which VPN plugins
			can use if they choose.  Should be filled in by the settings service
			on-the-fly with the currently logged in user's username



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2967 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-10 20:24:34 +00:00
Dan Williams 9d045f2e0a 2007-10-10 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (merge_scanned_ap): make sure non-SSID-broadcasting APs are marked
			as such, because even if the manager fills in the SSID, NM still
			has to indicate to wpa_supplicant that the AP isn't broadcasting
			its SSID



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2966 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-10 15:12:06 +00:00
Tambet Ingo 18d372272c 2007-10-10 Tambet Ingo <tambet@gmail.com>
Move ppp-manager over to dbus-glib. The big deal is that it was
the last piece of
        code that used NM's own version of dbus signal handling and
custom dictionary
        marshalling/unmarshalling. With this change, all that obsolete
code can disappear
        and we get to maintain over 2000 lines less code.

        * libnm-util/dbus-dict-helpers.c:
        * libnm-util/dbus-dict-helpers.h: Remove.

        * src/ppp-manager/nm-pppd-plugin.c: Convert it to use dbus-glib.

        * src/ppp-manager/nm-pppd-plugin.xml: Implement.

        * src/ppp-manager/nm-ppp-manager.c: Use dbus-glib instead of
        * home-brewed dbus signal
        handlers.

        * src/nm-dbus-manager.c: Remove all the manual dbus signal
        * handling.

        * configure.in: Remove test/libnm-util/Makefile creation.

        * test/Makefile.am: Remove libnm-util from SUBDIRS.

        * test/libnm-util/: Remove the whole directory.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2965 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-10 14:36:31 +00:00
Tambet Ingo 8b85192207 2007-10-10 Tambet Ingo <tambet@gmail.com>
* src/NetworkManagerPolicy.c (nm_policy_new): Initialize the 
        device_state_changed_idle_id variable or it would contain some
random value and the
        schedule_change_check calls would not do anything.




git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2964 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-10 08:55:22 +00:00
Dan Williams a29316d81b 2007-10-09 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (supplicant_iface_scanned_ap_cb): set the non-broadcast flag elsewhere
		- (merge_scanned_ap): only have the manager fill the SSID if the AP
			isn't broadcasting its SSID; set the non-broadcast flag here; fix
			merging of non-SSID-broadcasting APs



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2962 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-09 20:28:16 +00:00
Tambet Ingo 83bd445e2e 2007-10-09 Tambet Ingo <tambet@gmail.com>
* libnm-util/nm-utils.c (nm_utils_is_empty_ssid): Convert the
        * ssid type to
        "guint8 *" since it's usually used with GByteArray->data.
        (nm_utils_ssid_to_utf8): Add it back, the applet needs it.




git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2961 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-09 10:04:07 +00:00
Tambet Ingo 24adbe3fa4 2007-10-09 Tambet Ingo <tambet@gmail.com>
* src/NetworkManagerUtils.c
        (nm_utils_is_empty_ssid):
        (nm_utils_escape_ssid):
        (nm_utils_same_ssid): Remove. These functions are copied and
pasted in a 
        lot of places, so they belong to libnm-utils instead.

        Now with 100% less compiler warnings:

        * libnm-util/nm-utils.c (nm_dbus_escape_object_path): Remove,
        * unused.
        (nm_dbus_unescape_object_path): Ditto.
        (nm_utils_ssid_to_utf8): Ditto.
        (nm_utils_is_empty_ssid): Move here from
src/NetworkManagerUtils.c
        (nm_utils_escape_ssid): Ditto.
        (nm_utils_same_ssid): Ditto.

        * src/nm-manager.c: Include 'netinet/ether.h' for ether_aton_r.
        (add_one_connection_element): Remove an unused variable.
        (impl_manager_get_active_connections): Ditto.

        * src/NetworkManagerPolicy.c (get_device_connection): Remove an
        * unused
        variable.

        * src/nm-dbus-manager.c (nm_dbus_manager_start_service): Remove
        * a leftover
        from the previous commit.

        * src/nm-device-802-11-wireless.c (set_current_ap): Remove
        * unused variable.
        (real_act_stage1_prepare): Ditto.
        (activation_success_handler): Ditto.
        (get_property): Ditto.

        * src/nm-device-802-3-ethernet.c (real_get_best_connection):
        * Remove unused
        variable.

        * src/ppp-manager/nm-pppd-plugin.c (nm_ip_up): Remove the check
        * for 'ifname',
        it's always set.

        * src/supplicant-manager/nm-supplicant-config.c 
        (nm_supplicant_config_add_setting_wireless): Cast the
GByteArray's 'guint8 *'
        to expected "char *".
        (nm_supplicant_config_add_setting_wireless): Ditto.
        (nm_supplicant_config_remove_option): Remove, not used.

        * libnm-glib/libnm-glib-test.c (dump_access_point): Frequency is
        * a guint32,
        not double.
        (test_wireless_enabled): Ifdef out unused function.
        (device_deactivate): Ditto.
        (device_state_changed): Ditto.
        (nm_utils_is_empty_ssid): Remove, it's now in libnm-utils.
        (nm_utils_escape_ssid): Ditto.

        * test/nm-tool.c (nm_utils_escape_ssid): Remove, it's now in
        * libnm-utils.
        (nm_utils_is_empty_ssid): Ditto.

        * libnm-glib/nm-client.c
        * (nm_client_free_active_connection_element): Remove
        unused variable.

        * libnm-util/nm-setting.c (setting_wireless_destroy): Remove
        * unused variable.
        (setting_vpn_properties_update_secrets): Ditto.
        (int_to_gvalue): Ifdef out for now, not used.
        (byte_to_gvalue): Ditto.

        * libnm-util/dbus-dict-helpers.c
        * (_nmu_dbus_add_dict_entry_string_array): 
        Unused, remove.




git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2960 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-09 08:57:35 +00:00
Tambet Ingo 591dc59e1f 2007-10-08 Tambet Ingo <tambet@gmail.com>
* src/NetworkManager.c (main): When dbus manager doesn't want to
        * start, complain
        about dbus manager, not named manager.
        Make sure hal_manager and dbus_mgr are created before trying to
unreference.

        * src/nm-dbus-manager.c: There was an issue with priv->proxy: We
        * have a signal
        handler for it's 'destroy' signal - we use it to catch
disconnects from dbus.
        However, the same signal is emitted when we destroy it and
there's 
        nm_dbus_manager_cleanup -> destroy_cb -> nm_dbus_manager_cleanup
cycle.

        (nm_dbus_manager_cleanup): Let go of the DBusGProxy before
        releasing the DBusGConnection, since proxy needs a conneciton.
        (destroy_cb): Set the private proxy to NULL before cleaning up
the manager.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2959 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-09 07:51:03 +00:00
Dan Williams 71589014c8 2007-10-08 Dan Williams <dcbw@redhat.com>
* src/NetworkManager.c
		- (main): error on unknown command-line options



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2958 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-08 18:38:34 +00:00
Dan Williams 592dc6f244 2007-10-08 Dan Williams <dcbw@redhat.com>
Reimplement the invalid connection list.  Don't try to re-activate a
	connection that just failed or was canceled.

	* src/nm-device.c
		- (connection_secrets_failed_cb): fail device activation, don't just
			deactivate the device.  Listeners have to know about the failure.

	* src/NetworkManagerPolicy.c
		- (nm_policy_auto_get_best_device): exclude invalid connections from
			the connection list given to a device's get_best_connection()
			method
		- (device_state_changed): tag failed connections as invalid; clear the
			tag from successful connections



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2957 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-08 18:07:36 +00:00
Dan Williams 8bb7cdee1a 2007-10-08 Dan Williams <dcbw@redhat.com>
Fix problems with interrupted activation.  Previously, choosing an AP
	from the menu, then choosing another one before the first connection was
	successful wouldn't deactivate the device before starting the new connection
	on that same device.

	* src/NetworkManagerPolicy.c
		- (deactivate_old_device, device_state_changed, state_changed,
		   nm_policy_new): wrong place to deactivate old devices

	* src/nm-manager.c
		- (pending_connection_info_destroy, finalize,
		   wait_for_connection_expired): decouple destruction of the pending
			connection info from the manager device
		- (connection_added_default_handler): deactivate any active or
			activating device before starting a new activation
		- (impl_manager_activate_device): deactivate any active or activating
			device before starting a new activation; be sure not to leak
			pending connection info if a new activation request arrives but
			there's already a pending one in-process



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2956 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-08 16:27:07 +00:00
Dan Williams 777d07673c 2007-10-08 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerAP.h
	  src/NetworkManagerAP.c
		- (nm_ap_has_manufacturer_default_ssid): remove, unused.  User clients
			should handle default SSIDs and whether or not to autoconnect
			to them



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2955 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-08 15:27:56 +00:00
Dan Williams 04f27601f8 2007-10-08 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c
		- (nm_policy_device_change_check): print out connection name where
			possible



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2954 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-08 15:09:50 +00:00
Dan Williams d66216620d 2007-10-08 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
	  src/nm-device-802-11-wireless.h
		- (nm_device_802_11_wireless_class_init, merge_scanned_ap): new
			'hidden-ap-found' signal (for internal use only) that allows the
			NMManager to fill in the AP's SSID if a connection has that AP's
			BSSID in its seen-bssids list

	* src/nm-manager.c
		- (manager_hidden_ap_found, nm_manager_add_device): attach to a
			wireless device's hidden-ap-found signal and fill in the APs SSID
			if possible



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2953 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-08 15:09:33 +00:00
Dan Williams 9d318e9fae 2007-10-07 Dan Williams <dcbw@redhat.com>
* src/nm-manager.c
	  src/nm-manager.h
		- Add a 'connections-added' signal to batch together updates of large
			numbers of connections, like when reading from a settings service
			the first time.  Otherwise, the policy would just activate the first
			suitable connection it saw rather than waiting for the full list
			to arrive.
		- (nm_manager_class_init): register new signal
		- (get_type_for_proxy, connection_get_settings_cb,
		   get_connection_for_proxy): centralize places where a proxy's setting
			service is determined
		- (free_get_settings_info): if the call being freed is the last call
			in a pending call group, fire off the connections-added signal
		- (internal_new_connection_cb): add call to a pending call group if
			requested
		- (list_connections_cb): always create a call group here, because this
			call results in a batch of new connections
		- (initial_get_connections): start getting system connections first
		- (nm_manager_connections_destroy, emit_removed): actually emit the
			removed signal when destroying connections

	* src/NetworkManagerPolicy.c
		- (nm_policy_new, connections_added): handle connections-added signal
			from the manager



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2951 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-07 23:33:28 +00:00
Dan Williams b6c662e442 2007-10-06 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (constructor): fix leaked socket



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2950 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-06 14:31:25 +00:00
Dan Williams 9e866f733f 2007-10-06 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c
		- (nm_policy_auto_get_best_device): fix connection list reffing.  Each
			connection in the list returned by nm_manager_get_connections() is
			reffed, but they weren't getting unreffed before returning



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2949 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-06 13:35:28 +00:00
Dan Williams a52ee53e2c 2007-10-06 Dan Williams <dcbw@redhat.com>
* src/nm-manager.c
		- (connections_to_slist): sort connections first on autoconnect, then
			on timestamp



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2947 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-06 13:27:51 +00:00
Dan Williams fb5f27bcdd 2007-10-06 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-connection.c
		- (gvalue_to_string): handle UINT64



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2946 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-06 13:23:44 +00:00
Dan Williams a7ce89b24d 2007-10-06 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c
		- (connection_updated, nm_policy_new): recheck state when a connection
			gets updated



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2943 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-06 04:31:13 +00:00
Dan Williams dff2886fb4 2007-10-06 Dan Williams <dcbw@redhat.com>
* src/nm-manager.c
	  src/nm-manager.h
		- (nm_manager_get_connection_dbus_path): make static
		- (nm_manager_update_connections): remove; unused
		- Add a connection-updated signal
		- (new_connection_cb, connection_updated_cb, nm_manager_class_init):
			handle connection object updates



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2942 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-06 04:28:46 +00:00
Dan Williams d8dd859092 2007-10-06 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c
		- (connection_removed): deactivate removed connections



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2941 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-06 04:26:33 +00:00
Dan Williams a0e84d2f5a 2007-10-06 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-connection.c
	  libnm-util/nm-connection.h
		- (nm_connection_replace_settings): new function



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2940 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-06 04:25:48 +00:00
Dan Williams d030019245 2007-10-06 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device-802-11-wireless.c
		- (nm_device_802_11_wireless_get_active_access_point): don't segfault
			on error when getting the active access point over D-Bus from NM



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2939 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-06 04:24:30 +00:00
Dan Williams 80817ec8c4 2007-10-05 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.c
		- (setting_wireless_verify, setting_wireless_destroy): add seen_bssids
			to the NMSettingWireless table; it's now a string array not an array
			of byte arrays



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2938 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-06 02:33:17 +00:00
Dan Williams 1f2cdcab4d 2007-10-05 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device-802-11-wireless.c
		- Cache properties and update cached properties on D-Bus signals from NM



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2937 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-05 20:54:13 +00:00
Dan Williams f60d0d930c 2007-10-05 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (set_current_ap): consolidate current_ap handling code into one place
			to ensure that PropertiesChanged signals are emitted in all cases
		- (periodic_update, real_deactivate_quickly, real_act_stage1_prepare,
		   nm_device_802_11_wireless_dispose): use set_current_ap()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2936 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-05 20:23:49 +00:00
Dan Williams 37f9149cb7 2007-10-05 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-access-point.c
	  libnm-glib/nm-access-point.h
		- (nm_access_point_get_hw_address): return 'const char *', not 'char *'
			because the value is cached internally now.  Callers should not
			free the internal value.
		- Make signal name defines private

	* test/nm-tool.c
	  libnm-glib/libnm-glib-test.c
		- Don't free value returned from nm_access_point_get_hw_address()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2935 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-05 16:00:06 +00:00
Dan Williams 7732fd87d6 2007-10-04 Dan Williams <dcbw@redhat.com>
* introspection/nm-device-802-11-wireless.xml
	  src/nm-device-802-11-wireless.h
	  src/nm-device-802-11-wireless.c
		- Add a PropertiesChanged signal for wireless device
		- Store currently associated access point
		- (periodic_update): generalize; update rate here too and emit the
			correct PropertiesChanged signal when stuff changes
		- (real_deactivate_quickly, nm_device_802_11_wireless_dispose,
		   real_activation_cancel_handler): clear current_ap when device is
			deactivated
		- (link_to_specific_ap, get_ap_blacklisted,
		   nm_device_802_11_wireless_get_best_ap): remove obsolete and unused
			code
		- (nm_device_802_11_wireless_get_bitrate): make static; unused anywhere
			outside this file
		- (real_set_hw_address): emit property changed signal if the card's
			MAC address changes
		- (real_act_stage1_prepare): set the initial current_ap to the AP
			the card is supposed to be connecting to
		- (activation_success_handler): send out property updates on successful
			activation
		- (get_property): pull bitrate from cached value; use OBJECT_PATH type
			for ACTIVE_ACCESS_POINT property because sometimes there won't be
			one and dbus-glib doesn't like marshalling NULL G_TYPE_OBJECTs
		- (nm_device_802_11_wireless_class_init): ACTIVE_ACCESS_POINT property
			is now boxed; add PropertiesChanged signal



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2934 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-04 20:26:31 +00:00
Dan Williams bad019a1b5 2007-10-04 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-connection.c
	  libnm-util/nm-connection.h
		- (nm_connection_verify): new function



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2933 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-04 14:11:33 +00:00
Dan Williams 6829447903 2007-10-04 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.c
		- (nm_settings_verify): use #defines when possible rather than strings
		- (setting_connection_verify): ensure that 'name' and 'type' are valid
		- (setting_vpn_verify): tighter validity check on 'service_type'



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2932 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-04 14:09:59 +00:00
Dan Williams 27a1a0e95a 2007-10-04 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-settings.c
		- (nm_connection_settings_class_init): provide correct type for argument
			to the Updated signal so that dbus-glib knows how to marshal it



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2931 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-04 14:08:08 +00:00