Commit Graph

49 Commits

Author SHA1 Message Date
Dan Williams
24e50f7f6f 2008-11-02 Dan Williams <dcbw@redhat.com>
* Add license headers to everything in src/



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4247 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-11-03 04:13:42 +00:00
Dan Williams
1c0a0ec4a8 2008-10-11 Dan Williams <dcbw@redhat.com>
Add support for VPN subnet gateways (bgo #549196)

	* include/NetworkManager.h
		- Add key for internal VPN subnet gateway

	* src/vpn-manager/nm-vpn-connection.c
		- (ip_address_to_string): return a const from a static buffer so we
			don't leak a lot of strings
		- (print_vpn_config): print internal VPN gateway as well
		- (nm_vpn_connection_ip4_config_get): grab internal VPN gateway from
			VPN service too
		- (nm_vpn_connection_get_ip4_internal_gateway): new function

	* src/NetworkManagerSystem.c
	  src/NetworkManagerSystem.h
		- (nm_system_device_replace_default_ip4_route): split into two, one for
			VPN connections and one for normal devices
		- (replace_default_ip4_route): break out route stuff into its own function
		- (nm_system_replace_default_ip4_route_vpn,
		   nm_system_replace_default_ip4_route): simplify by having two cases,
			one for VPNs and one for normal devices

	* src/NetworkManagerPolicy.c
		- (update_routing_and_dns): simplify, use split default route replacement
			functions



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4169 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-10-11 14:26:41 +00:00
Dan Williams
ad7a46d867 2008-10-10 Dan Williams <dcbw@redhat.com>
Rework default route handling to consolidate decisions in the policy,
	and to take active VPN connections into account when changing the default
	route (bgo #545912)

	* src/NetworkManager.c
		- (main): pass the vpn_manager to the policy so it knows about active
			VPN connections; clean up the named manager which wasn't done before

	* src/NetworkManagerPolicy.c
	  src/NetworkManagerPolicy.h
		- (nm_policy_new): get a clue about the vpn_manager
		- (update_default_route): remove, fold into update_routing_and_dns()
		- (update_routing_and_dns): handle active VPN connections too; an
			active VPN connection becomes the default route if it does not have
			server-specified or user-specified custom routes.  Otherwise, the
			best active device gets the default route
		- (vpn_connection_activated, vpn_connection_deactivated, nm_policy_new,
		   nm_policy_destroy): track VPN connection activation and deactivation
			and update the default route when appropriate

	* src/NetworkManagerSystem.c
	  src/NetworkManagerSystem.h
		- (nm_system_vpn_device_unset_from_ip4_config): remove, put functionality
			in the VPN connection itself
		- (nm_system_vpn_device_set_from_ip4_config,
		   nm_system_device_set_from_ip4_config): merge together to make
			nm_system_apply_ip4_config()
		- (add_vpn_gateway_route): add a route to the VPN's external gateway
			via the parent device
		- (nm_system_apply_ip4_config): simplify
		- (add_ip4_route_to_gateway): new function; add a direct route to the
			gateway if needed
		- (nm_system_device_replace_default_ip4_route): simplify, break gateway
			route stuff out into add_ip4_route_to_gateway() for clarity

	* src/nm-device.c
		- (nm_device_set_ip4_config): update for nm_system_apply_ip4_config()

	* src/vpn-manager/nm-vpn-connection.c
	  src/vpn-manager/nm-vpn-connection.h
		- (nm_vpn_connection_get_ip4_config, nm_vpn_connection_get_ip_iface,
		   nm_vpn_connection_get_parent_device): add
		- (nm_vpn_connection_ip4_config_get): make the requirement of a tunnel
			device explicit
		- (connection_state_changed): update the named manager now that
			nm_system_vpn_device_unset_from_ip4_config() is gone; do something
			useful on errors

	* src/vpn-manager/nm-vpn-manager.c
	  src/vpn-manager/nm-vpn-manager.h
		- Add a 'connection-activated' signal
		- (nm_vpn_manager_get_active_connections): new function; mainly for the
			policy to find out about active VPN connections



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4167 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-10-10 23:05:45 +00:00
Tambet Ingo
50f3ec27a2 2008-09-30 Tambet Ingo <tambet@gmail.com>
* src/nm-device.c (nm_device_get_priority): Implement.
	(nm_device_set_ip4_config): Send the device priority to system ip4
	config setter.

	* src/NetworkManagerSystem.c (nm_system_device_set_from_ip4_config):
	Add priority argument and if it's >= 0, set the priority of the network
	route added automatically by netlink (or kernel?).
	(nm_system_device_set_priority): Implement.

	* src/NetworkManagerPolicy.c (get_best_device): Use
	nm_device_get_priority() instead of home-grown version. Revert the
	meaning, best priority is the lowest one.

git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4125 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-09-30 15:04:10 +00:00
Dan Williams
728dccd92c 2008-08-18 Dan Williams <dcbw@redhat.com>
* include/NetworkManager.h
	  introspection/nm-device.xml
		- Add a "missing firmware" device state reason

	* src/NetworkManagerSystem.c
	  src/NetworkManagerSystem.h
		- (nm_system_device_set_up_down): add a no_firmware argument
		- (nm_system_device_set_up_down_with_iface): if the result of setting
			IFF_UP is ENOENT, that almost always means missing firmware

	* src/backends/NetworkManagerGeneric.c
	  src/nm-device-ethernet.c
	  src/nm-device-private.h
	  src/nm-device-wifi.c
	  src/nm-device.c
	  src/nm-device.h
	  src/nm-hso-gsm-device.c
	  src/vpn-manager/nm-vpn-connection.c
		- Pass no_firmware along; check it where appropriate



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3983 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-18 18:29:47 +00:00
Dan Williams
56053fb87d 2008-08-12 Dan Williams <dcbw@redhat.com>
* src/nm-device.c
		- (nm_device_set_ip4_config): don't touch hostnames here; distros
			that want to use DHCP hostnames should use dispatcher scripts
			for that

	* 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
		- Remove nm_system_set_hostname(), no longer used
	  
	* src/backends/Makefile.am
	  src/backends/shvar.c
	  src/backends/shvar.h
		- Remove shvar.*; no longer used



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3946 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-12 22:40:27 +00:00
Tambet Ingo
c29ae2d003 2008-08-12 Tambet Ingo <tambet@gmail.com>
* src/backends/*: Get rid of nm_system_should_modify_resolv_conf().

	* src/named-manager/nm-named-manager.c (rewrite_resolv_conf): Calculate
	the composite result of all the IP4 configurations and call a distro
	specific update_resolv_conf().
	(update_resolv_conf): Implement one for directly writing to
	/etc/resolv.conf and one for opensuse to call netconfig.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3931 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-12 08:05:16 +00:00
Dan Williams
bcae312905 2008-08-07 Dan Williams <dcbw@redhat.com>
* introspection/nm-ip4-config.xml
	  libnm-glib/libnm-glib-test.c
	  libnm-glib/nm-ip4-config.c
	  libnm-glib/nm-ip4-config.h
	  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/dhcp-manager/nm-dhcp-manager.c
	  src/nm-device.c
	  src/nm-ip4-config.c
	  src/nm-ip4-config.h
		- Remove NIS logic; should be done from dispatcher scripts instead



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3909 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-07 19:22:23 +00:00
Dan Williams
762d57fab1 2008-08-07 Dan Williams <dcbw@redhat.com>
* src/NetworkManager.c
	  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
		- (nm_system_init, nm_system_kill_all_dhcp_daemons): remove, unused



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3903 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-07 14:07:14 +00:00
Dan Williams
b0cf66eda8 2008-06-26 Dan Williams <dcbw@redhat.com>
* Update FSF address in license headers (Michael Biebl <biebl@debian.org>)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3775 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-06-26 18:31:52 +00:00
Dan Williams
7b1882b583 2008-06-06 Dan Williams <dcbw@redhat.com>
Patch from Tambet Ingo  <tambet@gmail.com>

	* src/NetworkManagerSystem.c
	  src/NetworkManagerSystem.h
		- (nm_system_device_add_ip4_route_via_device_with_iface): remove
		- (nm_system_device_set_from_ip4_config): remove unused route_to_iface
		- (nm_system_device_set_ip4_route): clean up
		- (nm_system_vpn_device_set_from_ip4_config): clean up, add VPN routes

	* src/nm-device.c
		- (nm_device_set_ip4_config): remove unused route_to_iface bits

	* src/vpn-manager/nm-vpn-connection.c
		- (ip_address_to_string): new function
		- (print_vpn_config): use ip_address_to_string
		- (merge_vpn_routes): add user-defined routes to the ip4 config
		- (nm_vpn_connection_ip4_config_get): add routes the VPN server sent

	* include/NetworkManagerVPN.h
		- Add 'routes' key



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3728 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-06-06 15:35:45 +00:00
Dan Williams
de61d58c96 2008-05-23 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/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_has_active_routes, nm_system_flush_loopback_routes,
		   nm_system_flush_arp_cache): remove, unused

	* src/backends/NetworkManagerGeneric.c
	  src/backends/NetworkManagerGeneric.h
		- (nm_generic_device_has_active_routes, nm_generic_flush_loopback_routes,
		   nm_generic_flush_arp_cache): remove, unused



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3689 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-23 10:48:47 +00:00
Dan Williams
6cc399d126 2008-05-22 Dan Williams <dcbw@redhat.com>
Remove anything mDNS related.  This is better done from a distro-specific
	dispatcher script.  Plus, any distro using avahi doesn't need to restart
	avahi, since avahi can handle interface changes just fine using netlink.

	* configure.in
		- Remove --with-mdns-provider

	* src/NetworkManagerPolicy.c
		- (global_state_changed): don't restart the mdns provider

	* 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_restart_mdns_responder): remove

	* src/backends/NetworkManagerGeneric.c
	  src/backends/NetworkManagerGeneric.h
		- (nm_generic_restart_mdns_responder): remove



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3684 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-22 17:22:53 +00:00
Dan Williams
a12c9d6667 2008-04-30 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerSystem.c
	  src/NetworkManagerSystem.h
		- (nm_system_device_is_up, nm_system_device_is_up_with_iface): new
			functions to check device flags for IFF_UP

	* src/nm-serial-device.c
		- (real_is_up): remove; NMDevice now returns TRUE if the subclass doesn't
			implement is_up

	* src/nm-device-802-3-ethernet.c
	  src/nm-device-802-11-wireless.c
		- (real_hw_is_up): call nm_system_device_is_up()

	* src/nm-device.c
		- (real_hw_is_up): move to nm_system_device_is_up_with_iface()
		- (real_is_up): remove; nm_device_is_up() returns TRUE if subclass
			does not implement



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3620 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-30 12:54:00 +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
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
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
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
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
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
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
571812b40c 2007-09-26 Tambet Ingo <tambet@gmail.com>
* libnm-glib/nm-vpn-plugin.c (nm_vpn_plugin_connect): Update the
        * plugin activation
        method.
        (impl_vpn_plugin_connect): Convert properties hash to
NMConnection, activate, and
        unreference the connection.

        * introspection/nm-vpn-plugin.xml: Modify the 'Connect' method
        * arguments: instead of
        passing properties hash and routes string list, pass
NMConnection (in hashed form).

        * src/vpn-manager/nm-vpn-connection.c
        * (nm_vpn_connection_get_routes): Return routes
        as GSList, no need to copy stuff around anymore.
        (nm_vpn_connection_activate): Update the plugin activation
method.

        * src/NetworkManagerSystem.c
        * (nm_system_vpn_device_set_from_ip4_config): Convert
        routes argument to GSList.

        * vpn-daemons/vpnc/src/nm-vpnc-service.c (real_connect):
        The arguments have changed, update.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2890 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-26 15:42:09 +00:00
Tambet Ingo
326d1e8679 2007-09-12 Tambet Ingo <tambet@gmail.com>
* src/vpn-manager/nm-vpn-connection.[ch]: 
        * src/vpn-manager/nm-vpn-manager.[ch]:
        * src/vpn-manager/nm-vpn-service.[ch]: Rewrite the vpn handling
        * code. Using 
        dbus-glib, GObjects, signals etc.

        * libnm-glib/nm-vpn-manager.[ch]: 
        * libnm-glib/nm-vpn-connection.[ch]: Now that the NM
        * implementation changed
        so much, rewrite these too.

        * libnm-glib/Makefile.am: Add new files to build, build new
        * binding files for
        the new introspection files.

        * libnm-glib/nm-client.[ch]: Remove all VPN related stuff from
        * here.

        * libnm-glib/nm-dbus-utils.[ch]: Renamed from nm-utils.[ch] that
        * was shadowing
        the header with the same name from libnm-utils.

        * libnm-glib/nm-vpn-plugin.[ch]: Implement.

        * libnm-util/Makefile.am: Add nm-utils.[ch] to build.

        * introspection/nm-vpn-plugin.xml: Implement.

        * introspection/nm-vpn-connection.xml: Implement.

        * introspection/nm-vpn-manager.xml: Implement.

        * src/NetworkManagerSystem.c
        * (nm_system_vpn_device_set_from_ip4_config): Remove
        the named manager argument, it can just as easily get it as the
caller.
        (nm_system_vpn_device_unset_from_ip4_config): Ditto.

        * src/vpn-manager/nm-dbus-vpn.[ch]: Remove.

        * src/nm-dbus-manager.h: Fix up the name_owner signal signature.

        * src/dhcp-manager/nm-dhcp-manager.c (garray_to_string): Remove,
        * use one from
        libnm-utils.

        * libnm-util/nm-connection.c: Ditto.

        * src/NetworkManagerMain.h: Remove, it's finally empty.

        * configure.in: Remove utils/ from build.

        * include/NetworkManagerVPN.h: Add some more defines to reduce
        * the amount
        of hard-coded strings.

        * utils/: Move it over to libnm-util.

        * test/Makefile.am: Link against libnm-util now that util/ is
        * gone.

        * dispatcher-daemon/Makefile.am: Ditto.

        * src/Makefile.am: Ditto.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2798 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-12 16:23:53 +00:00
Dan Williams
55c2fef46e 2007-08-28 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerSystem.h
	  src/nm-device.c
	  src/nm-device.h
	  src/nm-hal-manager.c
	  src/NetworkManager.c
	  src/nm-device-802-11-wireless.c
	  src/nm-hal-manager.h
	  src/nm-device-802-3-ethernet.c
	  src/vpn-manager/nm-vpn-service.h
	  src/vpn-manager/nm-vpn-manager.c
	  src/vpn-manager/nm-vpn-manager.h
	  src/vpn-manager/nm-vpn-service.c
	  src/nm-device-802-11-wireless.h
	  src/NetworkManagerMain.h
	  src/nm-device-802-3-ethernet.h
	  src/backends/NetworkManagerGentoo.c
	  src/backends/NetworkManagerPaldo.c
	  src/backends/NetworkManagerFrugalware.c
	  src/backends/NetworkManagerRedHat.c
	  src/backends/NetworkManagerSlackware.c
	  src/backends/NetworkManagerGeneric.c
	  src/backends/NetworkManagerArch.c
	  src/backends/NetworkManagerSuSE.c
	  src/backends/NetworkManagerGeneric.h
	  src/backends/NetworkManagerDebian.c
		- Kill NMData



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2742 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-28 15:54:55 +00:00
Dan Williams
cd00315325 2007-08-26 Dan Williams <dcbw@redhat.com>
Convert to using interface indexes as the primary method of identifying
	devices inside NetworkManager.  Indexes are (?) stable, but devices can
	be renamed at any time.  Device object paths now refer to the device
	index rather than the name, and you can map those two manually if you like
	by looking in the /sys/class/net/<name>/ifindex file.  Also moves most
	netlink-related code to nm-netlink.c, and cleans up nm-netlink-monitor.c
	to use interface indexes rather than names.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2731 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-26 15:55:27 +00:00
Dan Williams
768354a19c 2006-06-09 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerSystem.[ch]
		- (nm_system_device_set_up_down_with_iface): remove 'dev' argument,
			it was unused and pointless
		- (nm_system_vpn_device_set_from_iface, nm_system_device_set_up_down):
			fix for set_up_down_with_iface change

	* src/vpn-manager/nm-vpn-connection.c
		- (nm_vpn_connection_deactivate): fix for set_up_down_with_iface change

	* src/backends/NetworkManagerPaldo.c
	  src/backends/NetworkManagerRedHat.c
	  src/backends/NetworkManagerSuSE.c
	  src/backends/NetworkManagerArch.c
	  src/backends/NetworkManagerDebian.c
	  src/backends/NetworkManagerGentoo.c
		- (nm_system_enable_loopback): use set_up_down_with_iface where
			appropriate
		- (nm_system_flush_loopback_routes): use flush_routes_with_iface
			where appropriate


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1817 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-06-09 14:24:19 +00:00
Robert Love
e79ccc1a10 2006-03-29 Robert Love <rml@novell.com>
Patch by Vinay R <rvinay@novell.com> and Robert Love <rml@novell.com>,
	to add support for per-route MSS and improve support for per-interface
	MTU:
	* src/NetworkManagerSystem.c: Modify nm_system_device_set_ip4_route to
	  optionally take an MSS parameter and set it for the given route.
	  Remove nm_system_device_set_ip4_route_with_iface.  Pass in the
	  NMIP4Config's stored MSS, if any.
	* src/nm-ip4-config.c: Add 'mtu' and 'mss' to NMIP4Config, representing
	  the interface's MTU and the route's MSS, respectively.  Add functions
	  nm_ip4_config_get_mtu, nm_ip4_config_set_mtu, nm_ip4_config_get_mss,
	  and nm_ip4_config_set_mss for retrieving and setting the MTU and the
	  MSS.
	* src/nm-ip4-config.h: Add prototypes for nm_ip4_config_get_mtu,
	  nm_ip4_config_set_mtu, nm_ip4_config_get_mss, and
	  nm_ip4_config_set_mss.
	* src/vpn-manager/nm-vpn-service.c: Modify to receive the MSS from the
	  VPN daemon.
	* src/backends/NetworkManager{Arch,Debian,Gentoo,RedHat,Slackware,SUSE}.c:
	  Change the retval of nm_system_get_mtu to guint32.
	* src/dhcp-manager/nm-dhcp-manager.c: Set the MTU on the new DHCP-given
	  NMIP4Config to the MTU provided by the system, if any.  TODO: If DHCP
	  servers can specify MTU's, we should set it here if the MTU was not
	  provided.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1660 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-03-29 19:26:53 +00:00
Robert Love
2a63ff03ec 2006-03-21 Robert Love <rml@novell.com>
* src/NetworkManagerSystem.c, src/NetworkManagerSystem.h: Add
	  nm_system_get_mtu(), which returns a user-provided or system-mandated
	  MTU value for a given device, if any, or zero if no such value
	  exists.  Add nm_system_set_mtu() to set the MTU for a given device
	  if we have a provided value.
	* src/nm-device.c: Set the MTU of devices.
	* src/backends/NetworkManagerSuSE.c: Read MTU, if any, from sysconfig.
	* src/backends/NetworkManagerDebian.c,
	  src/backends/NetworkManagerGentoo.c,
	  src/backends/NetworkManagerRedHat.c,
	  src/backends/NetworkManagerSlackware.c: Implement stub functions.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1626 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-03-21 17:57:01 +00:00
Robert Love
32daa1d99a 2006-03-06 Robert Love <rml@novell.com>
* src/NetworkManagerSystem.h, src/nm-device.c, NetworkManagerDebian.c,
	  NetworkManagerRedHat.c, NetworkManagerGentoo.c,
	  NetworkManagerSlackware.c: Pass nm_system_device_get_system_config()
	  a second argument, NMData.
	* src/nm-ap-security.h, src/nm-ap-security.c: Export nm_ap_security_new.
	* src/backends/NetworkManagerSuSE.c: Add wireless networks from ifcfg-*
	  config files as trusted.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1564 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-03-08 18:33:44 +00:00
Dan Williams
a5919b696c 2006-03-05 Dan Williams <dcbw@redhat.com>
Process netlink messages in device subclasses rather than in
	NetworkManager.c.  Also add support for recognizing Wireless Events.

	* configure.in
		- Find GLIB_GENMARSHAL

	* src/Makefile.am
		- Since we're marshalling custom types for wireless event signals,
			we get to create our own marshallers using GLIB_GENMARSHAL

	* src/NetworkManager.c
		- (nm_monitor_wired_link_state): renamed to nm_monitor_setup
		- (nm_monitor_setup): renamed from nm_monitor_wired_link_state, and
			cut down somewhat.  We no longer process signals here.
		- (nm_data_new): create the netlink monitor here, and remove a
			useless call to nm_policy_schedule_device_change_check()
		- (nm_data_free): get rid of the netlink monitor here
		- (nm_device_link_activated, nm_device_link_deactivated): removed
		- (main): don't create the netlink monitor here, let nm_data_new
			do that.  Call nm_policy_schedule_device_change_check() right
			before we jump to the mainloop to figure out which device
			to use first

	* src/NetworkManagerSystem.[ch]
		- (nm_system_get_rtnl_index_from_iface, nm_system_get_iface_from_rtnl_index):
			convert back and forth from interface names to interface
			indexes

	* src/nm-device-802-11-wireless.c
		- (real_init): connect to wireless-event signals from the netlink
			monitor object
		- (nm_device_802_11_wireless_event): new function, schedule handler
			for wireless event signals from the netlink monitor object.  We
			want the handler to run in the device's context
		- (wireless_event_helper): handle wireless-event signals from netlink
		- (nm_device_802_11_wireless_dispose): disconnect wireless-event
			signal handler

	* src/nm-device-802-11-wireless.h
		- remove unused prototype for nm_device_802_11_wireless_new

	* src/nm-device-802-3-ethernet.c
		- (real_init): new function; set up signal handlers for link events
		- (nm_device_802_3_ethernet_link_activated): new function, schedule
			handler for netlink link activated events on device's main loop
		- (link_activated_helper): when we get a link activated event, set
			the device's link to be active
		- (nm_device_802_3_ethernet_link_deactivated): new function; schedule
			handler for netlink link deactivated events on device's main loop
		- (link_deactivated_helper): when we get a link deactivated event, set
			the device's link to be inactive
		- (nm_device_802_3_ethernet_dispose): disconnect signal handler on
			dispose

	* src/nm-device-802-3-ethernet.h
		- remove unused prototype for nm_device_802_3_ethernet_new

	* src/nm-device.[ch]
		- (nm_get_device_by_iface_locked): variant of nm_get_device_by_iface
			but locks the device list
		- (nm_device_set_active_link): a little bit of cleanup and de-indenting

	* src/nm-netlink-monitor.[ch]
		- (nm_netlink_monitor_class_install_signals): New signal
			"wireless-event"
		- (nm_netlink_monitor_new): keep reference to NMData so we can get
			at the device list
		- (nm_netlink_monitor_event_handler): expand for wireless events too

	* src/nm-marshal-main.c
		- Include generated nm-marshal.c and nm-marshal.h

	* src/nm-marshal.list
		- List of custom marshal functions


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1555 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-03-06 01:10:58 +00:00
Robert Love
97962aac1a 2006-02-28 Robert Love <rml@novell.com>
* src/NetworkManagerSystem.h: Add nm_system_should_modify_resolv_conf.
	* src/backends/NetworkManagerSuSE.c: Implement the interface
	  nm_system_should_modify_resolv_conf() for SUSE.
	* src/backends/NetworkManagerDebian.c,
	  src/backends/NetworkManagerGentoo.c,
	  src/backends/NetworkManagerRedHat.c,
	  src/backends/NetworkManagerSlackware.c: Add stub.
	* src/named-manager/Makefile.am: Grab includes from src.
	* src/named-manager/nm-named-manager.c: Allow backends to disable the
	  automatic updating of resolv.conf.  This is useful for testing,
	  broken static configurations, and administrator lock-down.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1524 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-02-28 21:41:16 +00:00
Dan Williams
d8dc2c07f9 2006-02-12 Dan Williams <dcbw@redhat.com>
Patch from Tom Parker <palfrey@tevp.net>
	* src/NetworkManagerSystem.h
		- Remove prototype for nm_system_device_setup_static_ip4_config(),
			no longer used

	* src/backends/NetworkManagerDebian.c
		- Remove some dead code (nm_system_device_setup_static_ip4_config) and
			unused variables


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1466 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-02-13 02:16:40 +00:00
Robert Love
d1f6f5dde4 2006-01-23 Robert Love <rml@novell.com>
* dhcp-manager/nm-dhcp-manager.c, nm-device.c, nm-ip4-config.c,
	  nm-ip4-config.h, NetworkManagerSystem.h: Save the hostname reported
	  by DHCP and pass it to the backends, allowing distribution-specific
	  behavior with respect to the DHCP-supplied hostname (if nothing else,
	  some distributions might not want to set the hostname).
	* backends/NetworkManagerSuSE.c: Set the hostname if the variable
	  DHCLIENT_SET_HOSTNAME is set to "yes" in /etc/sysconfig/network/dhcp.
	  Also update our NIS behavior.
	* backends/NetworkManagerDebian.c, backends/NetworkManagerGentoo.c,
	  backends/NetworkManagerRedHat.c, backends/NetworkManagerSlackware.c:
	  Add stub functions.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1382 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-01-23 21:02:39 +00:00
Robert Love
cbd27080ed 2006-01-18 Robert Love <rml@novell.com>
* src/NetworkManager.c, src/NetworkManagerSystem.h, src/nm-device.c:
	  Allow backends to flag a device (in whatever distro-dependent way
	  they so desire) as disabled.  NM will ignore any such device.
	* src/backends/NetworkManagerDebian.c,
	  src/backends/NetworkManagerRedHat.c,
	  src/backends/NetworkManagerSlackware.c: Add stub function
	  nm_system_device_get_disabled() that always returns FALSE (enabled).
	* src/backends/NetworkManagerSuSE.c: Add system_disabled field to the
	  SUSE-specific configuration structure.  Fill it in from the
	  NM_CONTROLLED variable in the system networking scripts.  If this var
	  exists and is "no", we ignore the device.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1361 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-01-19 18:00:48 +00:00
Robert Love
9837697e06 2006-01-06 Robert Love <rml@novell.com>
Patch by Timo Hoenig <thoenig@suse.de>:
	* src/NetworkManagerSystem.h, src/nm-dbus-nm.c: Add interfaces to
	  hangup specific dialup devices.
	* src/backends/NetworkManagerDebian.c,
	  src/backends/NetworkManagerGentoo.c,
	  src/backends/NetworkManagerRedHat.c,
	  src/backends/NetworkManagerSlackware.c: Add stub backend.
	* src/backends/NetworkManagerRedHat.c,
	  src/backends/NetworkManagerSuSE.c: Add specific backend interface to
	  hangup specific dialup devices.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1272 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-01-06 15:39:55 +00:00
Dan Williams
4ed4b491fa 2005-12-31 Dan Williams <dcbw@redhat.com>
* refactor NMDevice into a GObject-based framework with separate
		objects for wired and wireless.  The following files are no
		longer used but should stick around for a bit so we don't
		loose code through the cracks:
			NetworkManagerDevice.c
			NetworkManagerDevice.h
			NetworkManagerWireless.c
			NetworkManagerWireless.h

	The intent here is to allow each device type to manage its own
	connection & activation life-cycle, ie to allow wireless devices
	to interface with wpa_supplicant, etc.  There's a fair bit of
	encapsulation breakage right now that should gradually get pulled
	back into each device, along with things like periodic property
	updates and link probing.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1244 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-12-31 08:21:24 +00:00
Robert Love
08145bc78d 2005-12-14 Robert Love <rml@novell.com>
Patch from Stefan Scheler <sscheler@suse.de>:
	* src/NetworkManagerDevice.c: call backend code to activate and
	  deactivate NIS.
	* src/NetworkManagerSystem.h: add new NIS interfaces.
	* src/backends/NetworkManagerDebian.c,
	  src/backends/NetworkManagerGentoo.c,
	  src/backends/NetworkManagerRedHat.c,
	  src/backends/NetworkManagerSlackware.c: add stub functions for NIS
	  support.
	* src/backends/NetworkManagerSuSE.c: add NIS support, baby.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1186 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-12-14 16:00:17 +00:00
Dan Williams
115dc5264b 2005-10-10 Dan Williams <dcbw@redhat.com>
* Remove nm_system_load_device_modules() from backend files
		and from NetworkManager.c


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1014 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-10 18:00:59 +00:00
Dan Williams
0f90a04544 2005-09-28 Dan Williams <dcbw@redhat.com>
Support for named + DBus, using Red Hat DBus patches for named.  You
	can find those patches here, with "dbus" in the patch's filename:

		http://cvs.fedora.redhat.com/viewcvs/devel/bind/

	Don't forget the named dbus service file either.

	Instead of writing a config file and spawing a named process, NM will
	use an already-running dbus-enabled named if it finds one.  NM will
	update named's forwarder configuration on the fly using dbus.

	If there is no dbus-enabled named running, NM will automatically fall
	back to writing the most-recent DNS server information to /etc/resolv.conf
	and calling nm_system_update_dns() to kick the system's resolver.

	Accordingly, all named-related configure-time options have been removed.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@981 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-09-28 14:42:57 +00:00
Robert Love
600e027e5c 2005-08-05 Robert Love <rml@novell.com>
* NetworkManager.h,
          gnome/applet/applet-dbus-devices.c,
          gnome/applet/applet-dbus-devices.h,
          gnome/applet/applet-dbus.c,
          gnome/applet/applet.c,
          gnome/applet/applet.h,
          src/NetworkManager.c,
          src/NetworkManagerMain.h,
          src/NetworkManagerSystem.h,
          src/backends/NetworkManagerRedHat.c,
          src/backends/NetworkManagerSuSE.c,
          src/nm-dbus-nm.c: basic dialup support using distro infrastructure


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@821 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-08-05 18:58:17 +00:00
Dan Williams
bfd38e3af0 2005-05-16 Dan Williams <dcbw@redhat.com>
Patch from Tomislav Vujec <tvujec@redhat.com>
	* gnome/applet/applet-dbus-info.c
		- (nmi_dbus_get_vpn_connection_routes): new function, pull routes out of
			GConf and pass them to NetworkManager.  New key is 'routes' under
			the VPN connection, and should be a string list

	* src/NetworkManagerSystem.c
		- (nm_system_vpn_device_set_from_ip4_config): if user-defined routes exist,
			set them on the device when we set the rest of the VPN config.  Ensure
			they are in the correct format since they are passed directly to the
			command line.

	* src/backends/NetworkManagerRedHat.c
	  src/backends/NetworkManagerDebian.c
		- (nm_system_device_add_route_via_device_with_iface): new function

	* src/vpn-manager/nm-dbus-vpn.c
		- (nm_dbus_vpn_get_routes): grab VPN routes from NetworkManagerInfo

	* src/vpn-manager/nm-vpn-manager.c
		- (nm_vpn_manager_handle_ip4_config_signal): grab routes from NMI and pass
			them into the IP4 config functions


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@637 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-05-16 12:57:08 +00:00
Dan Williams
de1d417198 2005-04-15 Dan Williams <dcbw@redhat.com>
Initial VPN Support
		- supports 'vpnc'
		- reworks device IP configuration, backend files have changed and will need
			to be updated for all distributions.  I will try to do what I can for
			them, but I cannot test them.

	- Move named directory to src/named-manager
	- Make backends directory self-contained


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@571 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-04-15 15:43:42 +00:00
Dan Williams
a888de7ea1 2005-02-10 Dan Williams <dcbw@redhat.com>
Patch from Dave Woodhouse:
	* src/NetworkManagerSystem.h
	  src/backends/NetworkManagerDebian.c
	  src/backends/NetworkManagerGentoo.c
	  src/backends/NetworkManagerSlackware.c
		- New nm_system_device_add_ip6_link_address() function to add link-local
			address on an interface.  Stubbed in Debian, Gentoo, and Slackware.

	* src/backends/NetworkManagerRedHat.c
		- (nm_system_device_add_ip6_link_address): implement
		- (nm_system_device_flush_addresses): revert to previous behavior of
			flushing all addresses


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@432 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-10 21:16:03 +00:00
Dan Williams
02bcf5aa14 2005-02-10 Dan Williams <dcbw@redhat.com>
* dhcpcd/client.c
		- #rh147661# Don't send kernel version in DHCP requests

	* src/NetworkManagerSystem.h
	  src/backends/NetworkManagerDebian.c
	  src/backends/NetworkManagerGentoo.c
	  src/backends/NetworkManagerRedHat.c
	  src/backends/NetworkManagerSlackware.c
		- Remove the nm_system_device_run_dhcp() and nm_system_device_stop_dhcp()
			functions, they are no longer used anyway

	* src/backends/NetworkManagerRedHat.c
		- (nm_system_device_flush_addresses): only flush "scope global" and "scope site"
			addresses in an attempt to keep IPv6 local-scope addresses around


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@428 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-10 16:14:19 +00:00
Dan Williams
e96c5c2967 2004-12-17 Dan Williams <dcbw@redhat.com>
* Ad Ad-Hoc networking mode support.  In Ad-Hoc mode, we only try to get
		link-local addresses instead of doing DHCP.

	* In the panel applet, there's a new "Create new Wireless Network..." item

	* The panel applet also sticks around now even if NetworkManager dies, but
		it doesn't hide its icon when NM isn't around.  Not hiding the icon is
		a bug, I'll fix that later.

	* We also don't use 'nscd' anymore in the RH backend, it was impeding name
		lookups after a switch rather than actually doing them.

	* Clean up some of those warnings in nm_ap_list_* functions

	* Delay between scans changed to 15s instead of 10s


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@342 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-12-17 17:16:22 +00:00
Dan Williams
cd475e6d0c 2004-12-15 Dan Williams <dcbw@redhat.com>
Patch from Tom Parker
	* Add autoip/Link Local Addressing support when we fail to get a DHCP
		address

	* Longer pause after setting ESSID on cards that support a larger number
		of channels to give the card time to find the right channel

	* Add system hook to restart mDNSResponder (or whatever the local implementation
		of Multicast DNS is) when we activate interfaces


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@341 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-12-16 04:24:20 +00:00
Dan Williams
2ad25b238e 2004-11-15 Dan Williams <dcbw@redhat.com>
Major rework of link detection code.  We now use DHCP
	as part of the link detection which proves to be much more robust,
	and also supports Open System authentication for wireless networks.

	We no longer use external DHCP client programs.  Instead, we use
	our own DHCP client, based on substantially reworked bits of 'dhcpcd'
	which was written by:
		Yoichi Hariguchi <yoichi@fore.com>
		Sergei Viznyuk <sv@phystech.com>
		http://www.phystech.com/download/
	It resides in the "dhcpcd" directory and was refactored into a general
	purpose DHCP client library by me.

	Also misc fixes (CPPFLAGS->AM_CPPFLAGS, move some stuff around),
	move src/backends/NetworkManagerSystem.h -> src/NetworkManagerSystem.h


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@314 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-11-16 02:41:53 +00:00