Commit Graph

7207 Commits

Author SHA1 Message Date
Dan Williams
85aa633ec8 Remove duped code, done below somewhere
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@555 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-04-04 18:56:26 +00:00
Dan Williams
1e22dba1ca 2005-04-04 Dan Williams <dcbw@redhat.com>
Patch from Tom Parker: include "nm-utils.h" for backend files that need it


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@553 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-04-04 16:24:36 +00:00
Dan Williams
737dce1fd7 2005-04-01 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.c:
		- (nm_completion_scan_has_results): restore pre-completion-patch behavior
			of only erroring after the second consecutive scan times out.  Also
			don't exit when the card requires more time than we can give it, just
			log the event and continue.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@552 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-04-04 16:22:03 +00:00
Dan Williams
aba1b105ba Add missing signal.h
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@549 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-04-03 02:10:27 +00:00
Dan Williams
04eadd092c 2005-04-01 Dan Williams <dcbw@redhat.com>
Perform scans during device activation, if needed.  Both activation
	and scans run in the same GMainContext.  Therefore, if an access point
	is not found by the time the device starts activation, it will not
	be available until after activation.  We now try to scan during
	activation (in nm_wa_test) every 15s so that all available access
	points are more likely to be found and available for the activation
	procedure.

	Also change nm_wireless_link_state_handle() to only update the "best"
	AP if we are not forcing a device and if we are not about to change
	state.  This attempts to work around a race when forcing a device,
	where the forced AP would get cleared out too soon by the link state
	checking timeout in the main thread, and the activation attempt with
	that AP would fail.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@545 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-04-01 21:30:12 +00:00
Dan Williams
5ea536fa14 Fix debug code in nm_wireless_qual_to_percent() to actually compile
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@535 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-03-31 21:42:04 +00:00
Dan Williams
c1979229b6 2005-03-31 Dan Williams <dcbw@redhat.com>
Tighten up handling of wireless devices that don't support wireless
	scanning (ie, Orinoco).  Due to restructuring of code, these devices
	hadn't been doing pseudo-scanning for a while either and would just
	spin waiting for an access point.  They are now manual devices where
	the user must choose the access point from the menu every time.  All
	"allowed" access points are listed in the applet's menu regardless
	of whether or not they can be seen by the card, since it can't scan
	anyway.

	* src/NetworkManager.c
		- (nm_wireless_link_state_handle): new function, but only update
			the "best" ap for non-scanning devices when its not activating,
			and when no device is being forced on the card
		- (nm_link_state_monitor): split wireless link state handling out
			into separate function

	* src/NetworkManagerDevice.c
		- (nm_device_copy_allowed_to_dev_list): new function
		- (nm_device_new): populate non-scanning cards' AP lists with
			access points from the "allowed" list
		- (nm_device_new): don't start a scanning timeout for devices that
			can't scan
		- (nm_device_activation_schedule_finish): new parameter, should be
			the AP that failed to be connected to, pass it on to the
			activation finish function in NetworkManagerPolicy.c
		- (nm_device_activate_wireless): don't ever try to get a new AP
			for non-scanning devices, just fail.  The user must choose
			a new access point manually.
		- (nm_device_activate): grab the AP that failed connection and
			pass it on
		- (nm_device_update_best_ap): Clear the best AP if we don't have
			a link to it, user must manually choose a new one
		- (nm_device_do_pseudo_scan): remove function
		- (nm_device_wireless_process_scan_results): remove bits for non-
			scanning cards since they never get here
		- (nm_device_wireless_scan): remove bits for non-scanning devices,
			and fake the scan list for test devices a bit earlier

	* src/NetworkManagerPolicy.c
		- (nm_policy_activation_finish): use the failed_ap that we get
			passed rather than getting the best_ap from the card, which
			may have changed since we were scheduled
		- (nm_policy_allowed_ap_list_update): for non-scanning devices,
			update their scan list directly from the allowed list when
			we get updates to the allowed list from NetworkManagerInfo

	* src/NetworkManagerPolicy.h
		- New member for failed access point in NMActivationResult

  -------------------------------------

	Driver Notification patch: notifies the user when their driver
		sucks.  Gives them the option to ignore further insertions
		of the card that has the sucky driver.

	* NetworkManager.h
		- Remove the SEMI_SUPPORTED member from the NMDriverSupportLevel
			enum and replace it with NO_CARRIER_DETECT and
			NO_WIRELESS_SCAN

	* panel-applet/NMWirelessApplet.[ch]
		- Merge essid.glade -> wireless-applet.glade
		- Implement the "Your driver sucks" notification dialog

	* panel-applet/NMWirelessAppletDbus.c
		- Change stuff from getSupportsCarrierDetect->getDriverSupportLevel
		- Grab hardware address for each device from NM too
		- Check whether the driver for each device sucks or not whenever
			a new device is noticed

	* panel-applet/NMWirelessAppletOtherNetworkDialog.c
		- Deal with stuff being in wireless-applet.glade now rather than essid.glade

	* src/NetworkManager.c
		- Fix a double-unref on device removal

	* src/NetworkManagerUtils.c
		- Set appropriate driver support level on a device that doesn't
			support scanning or carrier detection

	* src/nm-dbus-device.c
		- New "getHWAddress" dbus method on devices
		- getSupportsCarrierDetect -> getDriverSupportLevel


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@534 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-03-31 21:02:21 +00:00
Dan Williams
4c4be4c15e 2005-03-31 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.c
		- (nm_device_wireless_scan): Fix leak of scan results in some
			instances


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@532 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-03-31 16:13:06 +00:00
Dan Williams
66039f43b3 2005-03-29 Dan Williams <dcbw@redhat.com>
* src/NetworkManager.c
		- (nm_poll_and_update_wireless_link_state): make code less indented

	Patch from Bill Moss:
	* src/NetworkManager.c
		- (nm_device_update_link_state): Update signal strength on wireless
			devices every time we update link state too.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@531 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-03-30 04:39:35 +00:00
Dan Williams
17fd25ccf2 2005-03-29 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.c
		- (nm_device_set_essid): Work around Orinoco cards which need
			extra time after setting the ESSID


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@530 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-03-29 22:15:28 +00:00
Dan Williams
7142df50e0 2005-03-29 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.c
		- Merge one more bit of Peter Jones' completion patch


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@529 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-03-29 22:10:21 +00:00
Dan Williams
578f8d89f6 2005-03-29 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.c
		- (nm_device_force_use): Fix possible segfault


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@526 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-03-29 21:55:03 +00:00
Dan Williams
4c462f46de 2005-03-29 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.c
		- Use iw_get_ext() where we should rather than iw_set_ext()


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@524 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-03-29 21:44:38 +00:00
Dan Williams
767f1ea24f 2005-03-29 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.c
		- (nm_device_set_up_down): remove check for unsupported devices
			that caused NM to not bring devices up when they were
			added to the device list.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@523 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-03-29 16:47:21 +00:00
Dan Williams
b09c5c6d27 2005-03-28 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.c
		- (mdio_read): Fix two bugs that caused all devices to fail
			the MII carrier detection support checks


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@514 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-03-28 15:29:46 +00:00
Dan Williams
2c976390c5 2005-03-26 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.c
		- (nm_device_wireless_scan): Remove duplicated scanning code


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@513 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-03-27 01:04:48 +00:00
Dan Williams
4acd2f31dc 2005-03-25 Dan Williams <dcbw@redhat.com>
* panel-applet/NMWirelessApplet.c
		- (nmwa_about_cb): Add some more contributors
		- (nmwa_update_state): show the applet when there's no connection
		- Enable the "Stop/Resume all wireless devices" option in the
			context menu
		- New "no connection" icon

	* src/NetworkManager.c
		- (nm_poll_and_update_wireless_link_state): don't do anything if
			wireless is disabled or we're asleep

	* src/NetworkManagerDHCP.c
		- Remove trailing "\n" on debug messages

	* src/NetworkManagerDbus.c
		- (nm_dbus_network_status_from_data): new state "asleep"

	* src/NetworkManagerDevice.c
		- Merge most of Peter Jones' "completion" patch that greatly reduces
			latency and wait times for most operations
		- (nm_device_wireless_scan): Don't scan when asleep

	* src/NetworkManagerPolicy.c
		- (nm_policy_get_best_device): return no device when asleep
		- (nm_policy_allowed_ap_list_update): From Bill Moss: merge properties
			for all wireless devices on update, not just active device

	* src/NetworkManagerUtils.c
		- Merge Peter Jones' "completion" patch

	* src/nm-dbus-nm.c
		- (nm_dbus_nm_set_wireless_enabled): bring down wireless devices when
			we're told to disable them
		- (nm_dbus_nm_sleep, nm_dbus_nm_wake): new functions for sleep/wake

	* utils/nm-utils.h
		- New variants of the warn/info/error/debug print functions that can take
			variables rather than static strings


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@510 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-03-26 03:42:05 +00:00
Dan Williams
8284a62c39 2005-03-24 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerUtils.c
		- (nm_get_device_driver_name): driver names are now on the parents of
			"Network Interface" objects, so look for them there


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@509 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-03-24 18:56:23 +00:00
Dan Williams
ce7587a331 2005-03-24 Dan Williams <dcbw@redhat.com>
* dhcpcd/dhcpcd.[ch]
	  src/NetworkManagerDHCP.c
		- Switch names from "*_record_*" -> "*_element_*" to clarify things a bit
			(ie, dhcp_option_record_len -> dhcp_option_element_len)

	* src/NetworkManagerDbus.c
		- spacing cleanups

	* src/nm-dbus-dhcp.c
		- Make the API suck less.  There is now only 1 type of each function,
			ie only "getInteger" and no longer also "getIntegerv".  All types
			are returned encapsulated in a DBUS_TYPE_ARRAY, even for options
			that will never have more than 1 element.  This should simplify
			things greatly.

	* test/nm-dhcp-opt-test.c
		- Make the tool not segfault
		- adapt to new DHCP Options API


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@506 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-03-24 18:25:36 +00:00
Dan Williams
b90aa8077a 2005-03-22 Dan Williams <dcbw@redhat.com>
* src/NetworkManager.c
		- (nm_wired_link_deactivated): actually ignore netlink events from
			wireless devices.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@504 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-03-22 21:27:51 +00:00
Dan Williams
a068f66a28 2005-03-22 Dan Williams <dcbw@redhat.com>
* src/NetworkManager.c
		- (nm_wired_link_activated): actually ignore netlink events from
			wireless devices.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@503 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-03-22 21:25:36 +00:00
Dan Williams
809915938f 2005-03-17 Dan Williams <dcbw@redhat.com>
Patch from Tom Parker:
	* src/nm-netlink-monitor.c
		- Include unistd.h
	* info-daemon/NetworkManagerInfoDbus.c
		- (nmi_dbus_update_network_auth_method): free GConf values

	Patch from Nathaniel McCallum <npmccallum@gentoo.org>:
	* src/NetworkManagerDevice.c
		- (nm_device_set_wireless_config): wait for successful
			association longer for some cards (Atheros a/b/g)


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@502 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-03-17 21:43:21 +00:00
Ray Strode
a750e3c2aa 2005-03-15 Ray Strode <rstrode@redhat.com>
* src/NetworkManager.c:
	(sigterm_pipe_handler):
	remove bogus FIXME


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@500 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-03-15 18:11:29 +00:00
Ray Strode
3e34da5beb 2005-03-15 Ray Strode <rstrode@redhat.com>
* src/NetworkManagerDbus.c:
	Fix some sign weirdness that gcc4 doesn't like,
	and add a header file so PPC can hopefully find
	SIGTRAP


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@499 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-03-15 15:32:50 +00:00
Ray Strode
dfcc12908b 2005-03-15 Ray Strode <rstrode@redhat.com>
Fix a few -Wall -Werror warnings

	* info-daemon/NetworkManagerInfo.c:
	(main): remove unused loop variable.

	* info-daemon/NetworkManagerInfoDbus.c:
	(nmi_dbus_nm_is_running): comment out
	unused static function

	* src/nm-netlink-monitor.c:
	(receive_pending_bytes):
	initialize output variables to NULL/0,
	on function failure (Problem pointed out
	by Bryan Clark).


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@498 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-03-15 15:08:38 +00:00
Ray Strode
278e500f99 2005-03-14 Ray Strode <rstrode@redhat.com>
Fourth (probably working) cut at porting to
	dbus 0.30 api and new hal. This cut adds
	some new logging macros to make debugging
	easier.

	* dispatcher-daemon/NetworkManagerDispatcher.c:
	* info-daemon/NetworkmanagerInfo.c:
	* info-daemon/NetworkManagerInfoPassphraseDialog.c:
	* info-daemon/NetworkManagerInfoVPN.c:
	* src/NetworkManager.c:
	* src/NetworkManagerAP.c:
	* src/NetworkManagerAPList.c:
	* src/NetworkManagerDHCP.c:
	* src/NetworkManagerDbus.c:
	* src/NetworkManagerDevice.c:
	* src/NetworkManagerPolicy.c:
	* src/NetworkManagerSystem.c:
	* src/NetworkManagerUtils.c:
	* src/NetworkManagerWireless.c:
	* src/autoip.c:
	* src/nm-dbus-nm.c:
	* src/backends/NetworkManagerDebian.c:
	* src/backends/NetworkManagerGentoo.c:
	* src/backends/NetworkManagerRedHat.c:
	* src/backends/NetworkManagerSlackware.c:
	use new logging macros.

	* dispatcher-daemon/NetworkManagerDispatcher.c:
	(nmd_dbus_filter): s/dbus_free/g_free/

	* info-daemon/Makefile.am: link in utils library.
	* info-daemon/NetworkmanagerInfo.c: use new logging
	macros.
	(nmi_dbus_get_network): don't assume enumerations
	are 32-bit.
	(nmi_dbus_nmi_message_handler): don't free what
	doesn't belong to us.

	* libnm_glib/libnm_glib.c:
	(libnm_glib_get_nm_status):
	(libnm_glib_init): don't free what doesn't
	belong to us.
	(libnm_glib_dbus): strdup result, so it doesn't get
	lost when message is unref'd.

	* panel-applet/NMWirelessAppletDbus.c:
	(nmwa_dbus_update_devices): s/dbus_free/g_free/

	* src/NetworkManager.c:
	(nm_monitor_wired_link_state): request initial status
	dump of all cards when we start up, instead of relying
	on /sys/.../carrier.
	(nm_info_handler), (nm_set_up_log_handlers):
	log handlers to specify what syslog priorites
	the logging macros default to.

	* src/NetworkManagerAPList.c:
	(nm_ap_list_populate_from_nmi):
	s/dbus_free_string_array/g_strfreev/

	* src/NetworkManagerDbus.c:
	(nm_dbus_get_network_object):
	validate d-bus message argument types.
	Advance message iterator after reading argument,
	prepend instead of append to GSList.

	* src/NetworkManagerDevice.c:
	(nm_device_probe_wired_link_status):
	remove redundant /sys in /sys path. remove wrong
	contents == NULL means has carrier assumption.

	* src/nm-netlink-monitor.c
	(nm_netlink_monitor_request_status): implement
	function to ask kernel to dump interface link
	status over netlink socket.

	* test/*.c: s/dbus_free/g_free/

	* utils/nm-utils.h:
	(nm_print_backtrace): new macro to print backtrace.
	(nm_get_timestamp): new macro to get sub-second precise
	unix timestamp.
	(nm_info), (nm_debug), (nm_warning), (nm_error):
	new logging functions. nm_info just prints,
	nm_debug includes timestamp and function,
	nm_warning includes function, nm_error includes
	backtrace and sigtrap.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@497 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-03-15 05:30:15 +00:00
Ray Strode
0790d2fc3e 2005-03-11 Ray Strode <rstrode@redhat.com>
Third (unfinished, partially working) cut at porting to
	dbus 0.30 api and new hal.

	* info-daemon/NetworkManagerInfoDbus.c:
		don't free null arrays.

	* panel-applet/NMWirelessAppletDbus.c:
	* src/nm-dbus-device.c:
	* src/nm-dbus-net.c:
	* src/NetworkManagerDbus.c: more
 	STRING -> OBJECT_PATH fun
	* src/NetworkManagerDevice.c:
	* src/NetworkManagerDevice.h:
	(rename nm_device_get_link_active): rename to
	nm_device_has_active_link
	(nm_device_wireless_link_active): rename to
	nm_device_probe_wireless_link_state
	(nm_device_wired_link_active): rename to
	nm_device_probe_wired_link_state.  Rewrite to
	use carrier file since hal doesn't maintain
	link state anymore.
	(nm_device_update_link_active): rename to
	nm_device_update_link_state
	* src/NetworkManagerPolicy.c
	  (nm_policy_activation_finish): check for NULL
	  MAC address.

	* src/Makefile.am:
	* src/NetworkManagerMain.h:
	* src/NetworkManager.c:
	* src/nm-netlink-monitor.c:
	* src/nm-netlink-monitor.h: New class to support
	monitoring wired ethernet link status, since HAL
	doesn't export that information anymore.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@495 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-03-11 20:12:57 +00:00
Ray Strode
587a50e6e8 2005-03-09 Ray Strode <rstrode@redhat.com>
Second (unfinished, unworking) cut at porting to
	dbus 0.30 api.

	* dispatcher-daemon/NetworkManagerDispatcher.c
	* info-daemon/NetworkManagerInfoDbus.c:
	* panel-applet/NMWirelessAppletDbus.c:
	* src/NetworkManagerDbusUtils.c:
	* src/NetworkManagerDbusUtils.h:
	* src/nm-dbus-device.c:
	* src/nm-dbus-nm.c:
	* test/nmtest.c: support dbus "object path" type

	* configure.in:
	* Makefile.am:
	* info-daemon/Makefile.am:
	* libnm_glib/Makefile.am:
	* panel-applet/Makefile.am:
	* dispatcher-daemon/Makefile.am
	* src/Makefile.am:
	* test/Makefile.am:
	* utils/Makefile.am:
	* utils/nm-utils.c:
	* utils/nm-utils.h: new utils static lib


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@494 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-03-09 16:39:15 +00:00
Ray Strode
a5d937a62e 2005-03-07 Ray Strode <rstrode@redhat.com>
* info-daemon/NetworkManagerInfoDbus.c:
	* libnm_glib/libnm_glib.c:
	* panel-applet/NMWirelessAppletDbus.c:
	* src/NetworkManager.c:
	* src/NetworkManagerDbus.c:
	* src/NetworkManagerDevice.c:
	* src/NetworkManagerUtils.c:
	* src/nm-dbus-device.c:
	* src/nm-dbus-dhcp.c:
	* src/nm-dbus-net.c:
	* src/nm-dbus-nm.c:
	* test/nminfotest.c:
	First (unfinished, unworking) cut at porting to dbus 0.30 api.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@493 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-03-08 03:44:27 +00:00
Dan Williams
a8dfb489fb 2005-03-04 Dan Williams <dcbw@redhat.com>
Patch from Peter Jones:
	- Make stuff work with gcc 4.0


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@490 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-03-04 21:25:45 +00:00
Dan Williams
eae50c786b 2005-02-27 Dan Williams <dcbw@redhat.com>
* src/backends/NetworkManagerRedHat.c
		- (nm_system_init): Kill any dhclient processes lying around as well
			as stopping 'nifd' if its already been started.  NetworkManager
			subsumes the functions of nifd (kicking mDNSResponder, autoip)


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@479 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-27 17:27:56 +00:00
Dan Williams
bbbd00d4c5 2005-02-27 Dan Williams <dcbw@redhat.com>
* panel-applet/NMWirelessApplet.[ch]
	  panel-applet/NMWirelessAppletDbus.[ch]
		- Move to incremental network updates.  Instead of blowing away our list
			of devices every time we get a signal from NetworkManager, we now
			incrementally add/remove networks when NetworkManager notifies us that
			a new network has appeared or disappered.  Strength updates now happen
			on-the-fly for each access point as well.  There are now two copies of
			data from NetworkManager: one for the dbus side, and one for the gui side.
			When the dbus side data is modified, it is copied over to the gui side
			so we don't have to hold the data_mutex for long periods of time (and
			therefore block animation of the applet's icon).
		- Clean up some memleaks too

	* panel-applet/NMWirelessAppletOtherNetworkDialog.c
		- Minor code beautification

	* src/NetworkManagerAPList.c
		- (nm_ap_list_merge_scanned_ap): return whether or not the access point is
			completely new and whether or not an existing one's strength was updated.
			Try to fix multiple access points and signal strength by using the highest
			signal strength in each scan for any given ESSID.

	* src/NetworkManagerDbus.[ch]
		- (nm_dbus_signal_wireless_network_change): consolidate signals that deal with
			wireless networks; now we have only WirelessNetworkUpdate which includes
			a UINT32 for Appeared, Disappeared, or StrengthChanged (see NetworkManager.h).
		- Kill usage of DbusMessageIter

	* src/NetworkManagerDevice.c
		- (nm_device_wireless_process_scan_results): Use the same timestamp for all APs
			in the same scan result list.  Copy ESSIDs-by-address earlier on, for each
			AP rather than all-at-once.  Also don't ever remove the AP a card is
			currently associated with from the network list.
		- Update for new signals during scan, send out Appeared, Disappeared, or
			StrengthChanged when necessary.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@477 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-27 06:11:16 +00:00
Dan Williams
2805305885 Fix function description
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@475 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-25 20:56:05 +00:00
Dan Williams
db7e270ca8 Clean up whitespace
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@473 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-25 20:52:00 +00:00
Dan Williams
a5e5771628 2005-02-25 Dan Williams <dcbw@redhat.com>
* src/backends/NetworkManagerRedHat.c
		- For non-caching-nameserver/non-named case, ensure that nscd is running
			and that we actually tell nscd to reload the hosts cache when it changes


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@472 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-25 20:51:34 +00:00
Dan Williams
5ffb71cab5 2005-02-22 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c
		- (nm_policy_activation_finish): Deactivate a device if its activation fails,
			and NULL out data->active_device so that we have to choose another one.
			This may make NetworkManager keep attempting to connect to a wired network
			if it fails, but if it keeps failing the wired network has more problems than
			just NetworkManager.

	* src/backends/NetworkManagerRedHat.c
		- (nm_system_update_dns): fix to actually run nscd -i hosts when nscd
			is already running

	* named/nm-named-manager.c
		- (rewrite_resolv_conf): Call nm_system_update_dns() when not using
			named so that the distro can flush whatever name service caching
			daemon it uses


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@468 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-22 21:46:32 +00:00
Dan Williams
d7bd32d03c 2005-02-21 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDHCP.[ch]
		- (nm_device_dhcp_remove_timeouts): new function

	* src/NetworkManagerDevice.c
		- Use nm_device_dhcp_remove_timeouts() everywhere that we need to
			remove the DHCP timeouts.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@466 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-22 00:30:46 +00:00
Dan Williams
5e893e0e1c Remove some unused variables
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@460 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-18 18:36:21 +00:00
Dan Williams
6411cc5ade 2005-02-18 Dan Williams <dcbw@redhat.com>
* panel-applet/essid.glade
	  panel-applet/NMWirelessAppletOtherNetworksDialog.c
		- Correct spelling of "adaptor"->"adapter"

2005-02-18  William Jon McCann  <mccann@jhu.edu>

	* panel-applet/NMWirelessApplet.c: Use GTK_CHECK_VERSION() macro.
	(nmwa_about_cb): Use standard copyright string.  Update comment
	text to reflect that it is a notification area applet.  Remove
	leading newline in authors list.
	(nmwa_menu_show_cb, nmwa_setup_widgets): Populate menu on show
	instead of on parent menu item activation.  Fixes #167550.

2005-02-18  William Jon McCann  <mccann@jhu.edu>

	* panel-applet/essid.glade: Capitalize items as per HIG.
	  Fixes #167632


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@458 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-18 18:15:54 +00:00
Dan Williams
80e4775f60 2005-02-14 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDHCP.c
		- (set_domain_searches): Fix free of invalid pointer


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@452 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-14 21:56:15 +00:00
Dan Williams
fc408b3998 2005-02-14 Dan Williams <dcbw@redhat.com>
Patch from Peter Jones:
	* dhcpcd/client.c
		- Ensure we return RET_DHCP_CEASED everywhere we should
	* dhcpcd/udpipgen.c
		- Use faster TOS for IP packets
		- Don't set ip_id since we're UDP

	Patch from Tomislav Vujec:
	* src/nm-dbus-dhcp.c
	  test/nm-dhcp-opt-test.c
		- Clean up warnings to enable cvs tree compilation.
	* configure.in
		- Set AM_MAINTAINER_MODE


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@451 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-14 17:47:59 +00:00
Colin Walters
bcf803c562 2005-02-14 Colin Walters <walters@verbum.org>
* src/NetworkManagerMain.h (NMData): Handle multiple domain searches.

	* src/NetworkManagerDHCP.c (set_domain_searches): Handle space-separated
	list of domains to search.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@449 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-14 14:05:46 +00:00
Colin Walters
b5e5fda57e 2005-02-14 Colin Walters <walters@verbum.org>
* src/NetworkManagerMain.h (NMData): Handle multiple domain searches.

	* src/NetworkManagerDHCP.c (set_domain_searches): Handle space-separated
	list of domains to search.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@448 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-14 14:00:15 +00:00
Dan Williams
df9976aef0 2005-02-13 Dan Williams <dcbw@redhat.com>
Patch from Dan Reed:  DHCP options D-BUS API
		Exposes the DHCP options that a device receives to clients over D-BUS.

	* configure.in
		- A few cleanups

	* dhcpcd/client.h
		- Correct names, option length, and types for DHCP options

	* dhcpcd/dhcpcd.[ch]
		- Clarify function names that access DHCP options & data

	* src/NetworkManagerDHCP.c
		- Use new DHCP data access functions

	* src/NetworkManagerDbus.c
		- Message handler for DHCP functions

	* src/nm-dbus-dhcp.[ch] (new)
		- DHCP dbus methods

	* test/nm-dhcp-opt-test.c
		- Test DHCP D-BUS API and return all present DHCP options


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@444 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-13 22:10:03 +00:00
Dan Williams
1cc2f8c3b5 2005-02-11 Dan Williams <dcbw@redhat.com>
* dhcpcd/client.c
		- (dhcp_init): only print out client ID and class ID if they are specified

	* src/NetworkManagerDbus.[ch]
	  src/nm-dbus-nm.[ch]
	  src/nm-dbus-device.[ch]
	  src/nm-dbus-net.[ch]
		- Move NM, Device, and Net functions to separate files and use the
			dbus method list stuff in NetworkManagerDbusUtils.c to do
			method dispatching

	* src/NetworkManagerDbusUtils.c
		- Add new validate_method called before each dispatch (if present)
			that can validate the method call

	* src/NetworkManagerWireless.c
		- (nm_wireless_qual_to_percent): Fix misplaced "!" that caused signal
			levels never to be evaluated

	Patch from j@bootlab.org
	* src/NetworkManagerDevice.c
		- Add typedef for "u64"

	* src/backends/NetworkManagerDebian.c
		- Copy in Dave Woodhouse's fixes for IPv6


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@438 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-11 21:44:35 +00:00
Dan Williams
5049b74cfa 2005-02-11 Dan Williams <dcbw@redhat.com>
Patch from Dave Woodhouse for IPv6:
	* src/NetworkManagerUtils.c
		- (nm_ethernet_address_is_valid): Check for prism54 dummy MAC address
			and multicast addresses

	* src/NetworkManagerDevice.c
		- (nm_device_set_up_down): make sure our cached MAC address is up-to-date
			after bringing up a card.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@435 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-11 14:54:40 +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
383f4aff56 2005-02-10 Dan Williams <dcbw@redhat.com>
Patch from Tom Parker:
	* src/NetworkManagerDevice.c
		- Remove the "#include <pci/types.h>" since both the ethtool.h and
			mii.h headers are broken, and instead use our own typedefs


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@430 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-10 20:59:10 +00:00
Dan Williams
633cd47285 2005-02-10 Dan Williams <dcbw@redhat.com>
* dhcpcd/buildmsg.c
		- (fill_host_and_class_id): only fill in client and class IDs if
			they are set by callers.

	* dhcpcd/client.c
		- (class_id_setup): don't autogenerate a class ID, only use one
			we're given, if any.
		- (client_id_setup): don't autogenerate a client ID, only use one
			we're given, if any.

	* dhcpcd/dhcpcd.c
		- (dhcp_interface_init): ensure that client options are correctly
			NULL terminated

	* src/NetworkManagerDHCP.c
		- (nm_device_dhcp_request): pass hostname to dhcp library


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