Commit Graph

91 Commits

Author SHA1 Message Date
Dan Williams
9340a4122f 2008-11-07 Dan Williams <dcbw@redhat.com>
* src/nm-ip4-config.c
	  src/nm-ip4-config.h
		- (nm_ip4_config_diff): new function; return the difference between two
			IP4 configs
		- (nm_ip4_config_compare): change into nm_ip4_config_diff



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4275 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-11-07 13:43:15 +00:00
Dan Williams
3c8494753d 2008-11-05 Dan Williams <dcbw@redhat.com>
* nm-ip4-config.c
	  nm-ip4-config.h
		- (nm_ip4_config_compare): compare two IP4 configs



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4271 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-11-06 04:04:51 +00:00
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
bfb7243663 2008-10-29 Dan Williams <dcbw@redhat.com>
* libnm-util/libnm-util.ver
	  libnm-util/nm-setting-ip4-config.c
	  libnm-util/nm-setting-ip4-config.h
		- Make properties private and add accessor functions

	* callouts/nm-dispatcher-action.c
	  libnm-glib/libnm-glib-test.c
	  libnm-util/nm-utils.c
	  src/NetworkManagerPolicy.c
	  src/NetworkManagerSystem.c
	  src/NetworkManagerUtils.c
	  src/dhcp-manager/nm-dhcp-dhclient.c
	  src/dhcp-manager/nm-dhcp-manager.c
	  src/dnsmasq-manager/nm-dnsmasq-manager.c
	  src/nm-device-wifi.c
	  src/nm-device.c
	  src/nm-hso-gsm-device.c
	  src/nm-ip4-config.c
	  src/nm-ip4-config.h
	  src/ppp-manager/nm-ppp-manager.c
	  src/vpn-manager/nm-vpn-connection.c
	  system-settings/plugins/ifcfg-fedora/reader.c
	  system-settings/plugins/ifcfg-suse/parser.c
	  system-settings/plugins/ifcfg-suse/plugin.c
	  system-settings/plugins/ifupdown/parser.c
	  test/nm-tool.c
	  vpn-daemons/vpnc/properties/nm-vpnc.c
		- Use IP4 accessor functions



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4233 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-10-29 14:35:25 +00:00
Dan Williams
c468809b57 2008-10-06 Dan Williams <dcbw@redhat.com>
* src/nm-ip4-config.c
	  src/nm-ip4-config.h
		- nm_ip4_config_is_exported -> nm_ip4_config_get_dbus_path

	* src/nm-device-interface.c
		- (nm_device_interface_init): make 'ip4-config' a boxed property of type
			DBUS_TYPE_G_OBJECT_PATH so that we can make it NULL when we need to
			by using '/' for the object path

	* src/nm-device.c
		- (src/nm-device.c): marshal missing/unexported ip4-config through
			dbus as '/' since dbus-glib can't handle NULL objects nor can
			dbus handle NULL object paths



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4152 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-10-06 19:30:59 +00:00
Dan Williams
9d5a2291f7 2008-09-18 Dan Williams <dcbw@redhat.com>
Implement support for honoring configured and automatic hostnames, and for
	setting the configured hostname.

	* introspection/nm-ip4-config.xml
	  src/nm-ip4-config.c
	  src/nm-ip4-config.h
	  src/dhcp-manager/nm-dhcp-manager.c
		- Remove useless hostname property; it's not really part of the IPv4
			config

	* introspection/nm-settings-system.xml
	  libnm-glib/nm-dbus-settings-system.c
	  libnm-glib/nm-dbus-settings-system.h
		- Add SetHostname() call to system settings D-Bus interface
		- Add Hostname property to system settings D-Bus interface
		- (nm_dbus_settings_system_save_hostname,
		   nm_dbus_settings_system_get_hostname): implement

	* src/nm-device.c
	  src/nm-device.h
		- (nm_device_get_dhcp4_config): implement

	* src/nm-manager.c
	  src/nm-manager.h
		- Fetch and track system settings service hostname changes, and proxy
			the changes via a GObject property of the manager

	* system-settings/src/nm-system-config-interface.c
	  system-settings/src/nm-system-config-interface.h
		- Replace nm_system_config_interface_supports_add() with a capabilities
			bitfield

	* system-settings/src/nm-system-config-error.c
	  system-settings/src/nm-system-config-error.h
		- Add additional errors

	* system-settings/src/dbus-settings.c
	  system-settings/src/dbus-settings.h
		- (get_property, nm_sysconfig_settings_class_init): add hostname
			property; first plugin returning a hostname wins
		- (impl_settings_add_connection): use plugin capabilities instead of
			nm_system_config_interface_supports_add()
		- (impl_settings_save_hostname): implement hostname saving

	* src/NetworkManagerPolicy.c
		- (lookup_thread_run_cb, lookup_thread_worker, lookup_thread_new,
		   lookup_thread_die): implement an asynchronous hostname lookup thread
			which given an IPv4 address tries to look up the hostname for that
			address with reverse DNS
		- (get_best_device): split out best device code from
			update_routing_and_dns()
		- (update_etc_hosts): update /etc/hosts with the machine's new hostname
			to preserve the 127.0.0.1 reverse mapping that so many things require
		- (set_system_hostname): set a given hostname
		- (update_system_hostname): implement hostname policy; a configured
			hostname (from the system settings service) is used if available,
			otherwise an automatically determined hostname from DHCP, VPN, etc.
			If there was no automatically determined hostname, reverse DNS of
			the best device's IP address will be used, and as a last resort the
			hostname 'localhost.localdomain' is set.
		- (update_routing_and_dns): use get_best_device(); update the system
			hostname when the network config changes
		- (hostname_changed): update system hostname if the system settings
			service signals a hostname change
		- (nm_policy_new): list for system settings service hostname changes
		- (nm_policy_destroy): ensure that an in-progress hostname lookup thread
			gets told to die

	* system-settings/plugins/keyfile/plugin.c
	  system-settings/plugins/ifcfg-suse/plugin.c
		- (get_property, sc_plugin_ifcfg_class_init): implement hostname and
			capabilities properties

	* system-settings/plugins/ifcfg-fedora/shvar.c
		- (svOpenFile): re-enable R/W access of ifcfg files since the plugin
			writes out /etc/sysconfig/network now

	* system-settings/plugins/ifcfg-fedora/plugin.c
		- (plugin_get_hostname): get hostname from /etc/sysconfig/network
		- (plugin_set_hostname): save hostname to /etc/sysconfig/network
		- (sc_network_changed_cb): handle changes to /etc/sysconfig/network
		- (sc_plugin_ifcfg_init): monitor /etc/sysconfig/network for changes
		- (get_property, set_property, sc_plugin_ifcfg_class_init): implement
			hostname get/set and capabilities get



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4077 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-09-18 15:16:44 +00:00
Dan Williams
178148a2c5 2008-09-04 Dan Williams <dcbw@redhat.com>
* src/nm-ip4-config.c
	  src/nm-ip4-config.h
		- (nm_ip4_config_new): don't export over D-Bus here
		- (nm_ip4_config_export): new function; export the config over D-Bus
		- (nm_ip4_config_is_exported): new function

	* src/nm-device.c
		- (nm_device_activate_stage5_ip_config_commit): fix leak of IP4Config
			objects by balancing the IP4Config constructor; the device holds
			a reference to the IP4Config already
		- (nm_device_set_ip4_config): export the IP4Config when needed



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4037 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-09-05 02:55:40 +00:00
Dan Williams
0758aa478e 2008-08-10 Dan Williams <dcbw@redhat.com>
* src/nm-ip4-config.c
		- (get_property): use common ip4 address/route conversion functions
		- (nm_ip4_config_replace_address, nm_ip4_config_replace_route): should
			copy the new route here, not take ownership



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3919 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-10 22:37:21 +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
2c31b5499b 2008-08-06 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-ip4-config.c
	  libnm-glib/nm-ip4-config.h
		- Add 'routes' property

	* libnm-util/nm-setting-vpn.c
	  libnm-util/nm-setting-vpn.h
		- Remove 'routes' property

	* libnm-util/nm-setting-ip4-config.c
	  libnm-util/nm-setting-ip4-config.h
		- 'ignore-dhcp-dns' renamed to 'ignore-auto-dns'
		- Add 'ignore-auto-routes' property
		- 'routes' exposed over D-Bus is now an array of array of uint (4) to 
			accomodate route metrics
		- 'routes' exposed in C is now a list of NMSettingIP4Route structures

	* libnm-util/nm-utils.c
	  libnm-util/nm-utils.h
		- Add helpers for marshalling IP4 routes

	* src/NetworkManagerUtils.c
		- (nm_utils_merge_ip4_config): handle property renames and new route
			structure

	* src/NetworkManagerSystem.c
		- (nm_system_device_set_ip4_route, nm_system_device_set_from_ip4_config,
		   nm_system_vpn_device_set_from_ip4_config): respect route metrics

	* src/dhcp-manager/nm-dhcp-manager.c
		- (nm_dhcp_manager_get_ip4_config): handle new route structure

	* system-settings/plugins/ifcfg-fedora/reader.c
	  system-settings/plugins/ifcfg-fedora/writer.c
		- Handle routes separately from addresses now that routes have a different
			format

	* introspection/nm-ip4-config.xml
	  src/nm-ip4-config.c
	  src/nm-ip4-config.h
		- Rename internal routing functions
		- 'static-routes' renamed to 'routes'



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3898 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-06 22:23:48 +00:00
Dan Williams
e1e4100f76 2008-07-07 Dan Williams <dcbw@redhat.com>
Convert to using IPv4 prefixes instead of netmasks.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3812 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-07-07 18:57:37 +00:00
Dan Williams
b6bc5ac3c8 Quiet warning
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3795 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-07-01 21:03:15 +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
Tambet Ingo
4874f758d8 2008-06-02 Tambet Ingo <tambet@gmail.com>
* libnm-util/nm-setting-ip4-config.[ch]: Add static routes property.

	* src/nm-ip4-config.[ch]: Store the static routes as a list of
	NMIP4Address, update the getters and setters.

	* src/dhcp-manager/nm-dhcp-manager.c (nm_dhcp_manager_get_ip4_config):
	Use the updated NMIP4Config routes api.

	* src/NetworkManagerUtils.c (nm_utils_merge_ip4_config): Merge
	static routes as well.

	* src/NetworkManagerSystem.c (netmask_to_prefix): Implement.
	(nm_system_device_set_from_ip4_config): Use the updated NMIP4Config
	routes api.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3715 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-06-02 08:44:48 +00:00
Tambet Ingo
0ada5a4263 2008-05-23 Tambet Ingo <tambet@gmail.com>
Add a flag to NMSettingIP4Config to make it possible to ignore the DNS
	information received from DHCP.

	* libnm-util/nm-setting-ip4-config.c: Add a new membet "ignore_dhcp_dns"
	to make it possible to ignore the DNS information (both servers and
	searches) returned by DHCP server.

	* src/NetworkManagerUtils.c (nm_utils_merge_ip4_config): Reset the
	name servers and searches if "ignore_dhcp_dns" is set.

	* src/nm-ip4-config.c (nm_ip4_config_reset_nameservers)
	(nm_ip4_config_reset_searches): Implement.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3685 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-23 07:35:43 +00:00
Dan Williams
51503b2d5f 2008-05-06 Dan Williams <dcbw@redhat.com>
* src/dhcp-manager/nm-dhcp-manager.c
		- (nm_dhcp_manager_get_ip4_config): clean up; update for changes to
			NMIP4Config to support multiple IP addresses

	* src/NetworkManagerUtils.c
		- (nm_utils_merge_ip4_config): update for multiple IP addresses

	* src/nm-ip4-config.c
	  src/nm-ip4-config.h
		- Store a list of IPv4 address/netmask/gateway tuples
		- (nm_ip4_config_get_gateway, nm_ip4_config_set_gateway,
		   nm_ip4_config_get_netmask, nm_ip4_config_set_netmask,
		   nm_ip4_config_get_broadcast, nm_ip4_config_set_broadcast,
		   nm_ip4_config_set_address): remove
		- (nm_ip4_config_take_address, nm_ip4_config_add_address,
		   nm_ip4_config_replace_address, nm_ip4_config_get_num_addresses):
			new functions; handle multiple IPv4 addresses

	* src/nm-device.c
	  src/ppp-manager/nm-ppp-manager.c
	  src/vpn-manager/nm-vpn-connection.c
	  src/NetworkManagerPolicy.c
	  test/nm-tool.c
	  libnm-glib/libnm-glib-test.c
		- update for changes to NMIP4Config for multiple IPv4 addresses

	* src/NetworkManagerSystem.c
		- (nm_system_device_set_ip4_route): don't add the route if any address
			is on the same subnet as the destination
		- (check_one_address): ignore the exact match, just match family and
			interface index
		- (add_ip4_addresses): add all IPv4 addresses in an NMIP4Config to
			an interface
		- (nm_system_device_set_from_ip4_config): use add_ip4_addresses()
		- (nm_system_vpn_device_set_from_ip4_config): use add_ip4_addresses()

	* introspection/nm-ip4-config.xml
		- Remove 'address', 'gateway', 'netmask', and 'broadcast' properties
		- Add 'addresses' property which is an array of (uuu) tuples of
			address/netmask/gateway

	* libnm-util/nm-setting-ip4-config.c
		- (set_property): use ip-address <-> GValue converters from nm-utils.c

	* libnm-glib/nm-ip4-config.c
	  libnm-glib/nm-ip4-config.h
		- Handle D-Bus interface changes to support multiple IP addresses



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3637 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-06 21:53:22 +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
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
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
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
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
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
Tambet Ingo
c40051389c 2007-02-16 Tambet Ingo <tambet@ximian.com>
* introspection/nm-ip4-config.xml: Implement.

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

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

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

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

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

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

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




git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2322 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-02-16 11:23:49 +00:00
Dan Williams
a94e716ecb Don't add an IP4 nameserver with an address of 0.0.0.0
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1942 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-08-07 18:09:16 +00:00
Robert Love
e1620a9946 2006-08-04 Robert Love <rml@novell.com>
Glib Memory Slices!
	* configure.in: Require glib 2.10 or later.
	* src/NetworkManager.c, src/NetworkManagerAP.c, src/nm-ip4-config.c,
	  src/NetworkManagerAPList.c, src/NetworkManagerDbus.c,
	  src/NetworkManagerDbusUtils.c, src/nm-dbus-nmi.c, src/wpa.c,
	  src/nm-device-802-11-wireless.c: Convert applicable g_malloc and
	  g_new calls to g_slice_new.  Likewise for g_free to g_slice_free.
	  Memory Slices are the greatest thing since bread slices.
	* src/NetworkManagerAP.c: Also, fix memory leak.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1923 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-08-04 15:46:06 +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
46fc50fc72 seriously, where did that come from?
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1617 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-03-17 18:40:00 +00:00
Robert Love
1a1cda1129 2006-03-17 Robert Love <rml@novell.com>
* src/backends/NetworkManagerSuSE.c: Do "rcypbind reload" to send the
	  signal SIGHUP to ypbind, not "rcypbind restart" to physically restart
	  it, in case it is not running in the first place.  We just want its
	  configuration reloaded.  Also, do not "rcypbind stop" on device down.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1615 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-03-17 18:37:46 +00:00
Robert Love
133134e225 2006-02-03 Robert Love <rml@novell.com>
* src/nm-device-802-11-wireless.c, src/nm-device-802-11-wireless.h:
	  Make nm_device_802_11_wireless_get_essid() return 'const char *' not
	  'char *'.
	* src/nm-ip4-config.c, src/nm-ip4-config.h: Make the functions
	  nm_ip4_config_get_hostname() and
	  nm_ip4_config_get_nis_domain() return 'const char *' not 'char *'.
	* src/backends/NetworkManagerSuSE.c: Fix up for above.  Also, do not
	  leak g_strdup() result.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1437 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-02-03 17:40:44 +00:00
Robert Love
b60c770dab 2006-01-26 Robert Love <rml@novell.com>
* configure.in: Change '-Wno-unused' to '-Wno-unused-parameter'
	* gnome/applet/applet-compat.c, gnome/applet/applet-dbus-devices.c,
	  gnome/applet/applet-dbus-info.c, gnome/applet/applet-dbus.c,
	  gnome/applet/applet.c, gnome/applet/applet.h, src/nm-dbus-device.c,
	  gnome/applet/nm-gconf-wso-wep.c, gnome/applet/nm-gconf-wso-wpa-psk.c,
	  gnome/applet/nm-gconf-wso.c, gnome/applet/nm-gconf-wso.h,
	  gnome/applet/other-network-dialog.c, src/nm-device.c, test/nm-tool.c,
	  gnome/applet/passphrase-dialog.c, src/nm-device-802-11-wireless.c,
	  gnome/applet/wireless-security-manager.c, src/nm-ip4-config.c,
	  gnome/applet/wireless-security-option.c, src/nm-ap-security.c,
	  gnome/applet/wso-wep-ascii.c, gnome/applet/wso-wep-hex.c,
	  gnome/applet/wso-wep-passphrase.c, gnome/applet/wso-wpa-psk.c,
	  libnm-util/dbus-helpers.c, src/NetworkManagerAP.c, src/nm-dbus-nmi.c,
	  src/NetworkManagerSystem.c, src/nm-ap-security-wep.c,
	  src/nm-device-802-11-wireless.h, test/libnm-util/test-ciphers.c,
	  src/named-manager/nm-named-manager.c, test/test-common/test-common.c:
	  Kill unused variables, labels, and static functions.  Don't pass
	  string literals as the format string for printf-like functions.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1391 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-01-26 21:08:44 +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
Dan Williams
db7403d3f4 2006-01-16 Dan Williams <dcbw@redhat.com>
Apply the PtP Address bits of a patch from Tim Niemueller

	* src/nm-ip4-config.[ch]
		- Add ip4_ptp_address member to object
		- (nm_ip4_config_copy): copy ptp address too
		- (nm_ip4_config_get_ptp_address, nm_ip4_config_set_ptp_address):
			new functions
		- (nm_ip4_config_to_rtnl_addr): use ptp address when asked to,
			rather than local tunnel ip address

	* src/vpn-manager/nm-vpn-service.c
		- (print_vpn_config): update for PtP address
		- (nm_vpn_service_stage4_ip_config_get): switch parsing to
			DBusMessageIters in preparation for getting routes from the VPN
			service daemons too

	* vpn-daemons/openvpn/src/nm-openvpn-service-openvpn-helper.c
		- (send_config_info): update for PtP address, clean up code
		- (main): update for PtP address, clean up code, fix typo

	* vpn-daemons/openvpn/src/nm-openvpn-service.c
		- (nm_openvpn_dbus_process_helper_ip4_config): update for PtP address

	* vpn-daemons/pptp/src/nm-pptp-service-pppd-plugin.c
		- (pptp_ip_up): update for PtP address

	* vpn-daemons/pptp/src/nm-pptp-service.c
		- (nm_pptp_dbus_process_helper_ip4_config): update for PtP address

	* vpn-daemons/vpnc/src/nm-vpnc-service.c
		- (print_vpn_config): update for PtP address
		- (nm_vpnc_dbus_process_helper_ip4_config): update for PtP address


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1346 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-01-16 22:58:13 +00:00
Robert Love
46efeb868a 2006-01-11 Robert Love <rml@novell.com>
* configure.in: Add the gcc flags '-Wshadow' and '-Wfloat-equal'.
	* gnome/applet/applet.c, gnome/vpn-properties/nm-vpn-properties.c,
	  src/NetworkManagerAPList.c, src/NetworkManagerDbus.c,
	  src/NetworkManagerPolicy.c, src/NetworkManagerSystem.c,
	  src/nm-dbus-device.c, src/nm-device-802-3-ethernet.c,
	  src/nm-ip4-config.c, src/vpn-manager/nm-vpn-manager.c,
	  test/nmtestdevices.c: Fix shadowed variable usage as appropriate.
	* src/nm-device-802-11-wireless.c: Fix floating point comparison by
	  comparing values within DBL_EPSILON.  Also fix shadowed variable
	  usage.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1318 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-01-11 21:07:29 +00:00
Robert Love
9841fc9c45 coding style
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1187 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-12-14 16:23:15 +00:00
Robert Love
4be49b9902 2005-12-13 Robert Love <rml@novell.com>
Patch by Stefan Scheler <sscheler@suse.de>:
	*  src/nm-ip4-config.h, src/nm-ip4-config.c,
	   src/dhcp-manager/nm-dhcp-manager.c: Add support for setting up NIS
	   via DHCP.  Still need the backends to commit the NIS domain name and
	   and servers to yp.conf as needed.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1179 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-12-13 21:03:57 +00:00
Dan Williams
1d8201cb9e 2005-12-03 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerUtils.[ch]
	  src/nm-ip4-config.c
		- move ip4_netmask_to_prefix() to NetworkManagerUtils.c
		- consolidate code into nm_utils_ip4_addr_to_nl_addr()


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1116 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-12-04 02:23:29 +00:00
Dan Williams
044acdad23 2005-10-27 Dan Williams <dcbw@redhat.com>
Start using libnl.  You need 1.0-pre3 or higher.  Eventually
	we should replace most of the distro-specific backend code
	with libnl stuff.

	Get it here:  http://people.suug.ch/~tgr/libnl/

	* configure.in
	  src/Makefile.am
		- Add checks for libnl pkgconfig file
		- Use LIBNL_LIBS & LIBNL_CFLAGS

	* src/NetworkManagerSystem.c
	  src/nm-ip4-config.[ch]
		- Use libnl rather than ioctl() for most things
		- Remove unused functions


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1082 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-28 03:16:02 +00:00
Robert Love
3c1259fd9f 2005-10-17 Robert Love <rml@novell.com>
* src/nm-ip4-config.c: use GPOINTER_TO_UINT and not a straight cast
          in order to remain 64-bit clean.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1031 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-17 19:04:01 +00:00
Robert Love
fe043ba806 2005-10-04 Robert Love <rml@novell.com>
* gnome/applet/applet-dbus-devices.c, gnome/applet/applet.c,
          gnome/applet/nm-device.c, gnome/applet/nm-device.h,
          gnome/applet/wireless-applet.glade, src/nm-dbus-device.c: Display
          default route in the 'Connection Information' dialog, send primary
          and secondary name servers in in "getProperties" DBUS method, add
          network_device_{get,set}_{primary,secondary}_dns(),  The primary and
          secondary domain name servers are crucial pieces of information
          that a user might need in debugging a network problem.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@991 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-04 15:23:06 +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
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