Commit Graph

21 Commits

Author SHA1 Message Date
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