Commit Graph

7207 Commits

Author SHA1 Message Date
Dan Williams
d00e99815f 2005-02-10 Dan Williams <dcbw@redhat.com>
* src/NetworkManager.c
		- (nm_create_device_and_add_to_list): change the add message slightly

	* src/NetworkManagerUtils.c
		- (nm_get_wireless_driver_support_level, nm_get_wired_driver_support_level):
			Return driver name to calling function
		- (nm_get_driver_support_level): print out the driver a device is using
			during the support check

	Patch from Dave Woodhouse:
	* dhcpcd/udpipgen.c
		- (in_cksum): copy last byte of odd-sized packets into a
			'u_short' rather than a 'u_char', should fix wrong checksums
			on big-endian platforms


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@427 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-10 15:07:35 +00:00
Dan Williams
2fa2299b32 Remove another unneeded syslog()
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@426 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-10 05:29:03 +00:00
Dan Williams
91ae7543e6 Remove unecessary debug syslog
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@424 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-10 05:14:09 +00:00
Dan Williams
a88c6427ef 2005-02-09 Dan Williams <dcbw@redhat.com>
* Clean up usage of GSList objects and looping through their members
	* Clean up DHCP rebind/renew timeouts, hopefully they will work correctly
		now.
	* Fix problem where even if scanning was turned off, card would still
		cycle through frequencies.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@423 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-10 04:39:40 +00:00
Dan Williams
a1457c2538 Don't spew debug info for every method call
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@417 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-07 23:06:00 +00:00
Dan Williams
901e3d01d8 2005-02-07 Dan Williams <dcbw@redhat.com>
* panel-applet/NMWirelessApplet.[ch]
		- Add a context menu that contains:
			Pause/Resume Wireless Scanning
			Stop/Start All Wireless Devices
			About...
		- Grab active device strength off active device,
			not its network

	* panel-applet/NMWirelessAppletDbus.[ch]
		- Add DBUS accessors for "getSupportsCarrierDetect", "setScanningEnabled",
			"getScanningEnabled", "setWirelessEnabled", and "getWirelessEnabled"
		- Update active device strength every 2 seconds, not every 1 second

	* panel-applet/menu-info.c
		- Only disable wired devices in the menu when they support carrier detection,
			and don't currently have a link.  Non-carrier-detect devices will always
			remain choosable

	* src/Makefile.am
	  src/NetworkManagerDbusUtils.[ch]
		- Add new new dbus utils sources

	* src/NetworkManager.c
		- Fixes for new link detection, we no longer need to call nm_device_update_link_active()
			with the boolean parameter
		- Set scanning_enabled & wireless_enabled to TRUE

	* src/NetworkManagerDbus.c
		- Use new dbus util method dispatcher functions for org.freedesktop.NetworkManager methods
		- Implement scanning & wireless enable/disable calls
		- Remove the dbus vtable unregister handlers, weren't doing anything with them anyway

	* src/NetworkManagerDevice.c
		- New link detection stuff again...
			o  Create device's mainloop earlier (but don't run it earlier)
			o  Hook up new carrier-detect support stuff
			o  Add in the ethtool & mii support detection code
		- Don't scan if scanning is disabled

	* src/NetworkManagerPolicy.c
		- Never automatically choose a device that doesn't support carrier detection
		- Don't automatically choose a wireless device if wireless is disabled


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@416 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-07 23:04:05 +00:00
Dan Williams
ed56f4af19 Don't complain on unref of NULL list
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@415 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-07 22:35:07 +00:00
Dan Williams
1fd38eed9d 2005-02-07 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerWireless.c
		- (nm_wireless_qual_to_percent): Fix up wireless quality calculations
			to be in line with the WEXT quality specification


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@413 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-07 22:31:22 +00:00
Dan Williams
9a46c8dbed 2005-02-02 Dan Williams <dcbw@redhat.com>
* Clean up unused variables and the like


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@408 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-02 21:57:29 +00:00
Dan Williams
a03d8042c3 2005-02-02 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerAPList.c
		- (nm_ap_list_merge_scanned_ap): merge strength too

	* src/NetworkManagerUtils.c
		- (nm_lock_mutex, nm_register_mutex_desc): new calls to facilitate debugging
			of locking issues by printing out prettier information than g_mutex_lock
		- Print out names of mutexes registered with nm_register_mutex_desc()
		- (nm_try_lock_mutex): don't do the waiting thing when trying to lock, causes
			us to seemingly block here for too long

	* src/NetworkManager.c
	  src/NetworkManagerAPList.c
	  src/NetworkManagerDevice.c
		- Convert to using nm_lock_mutex/nm_unlock_mutex rather than the glib variants
			so we get better debug information printed

	* src/NetworkManagerDbus.c
		- (nm_dbus_devices_handle_request): reduce usage of nm_device_need_ap_switch()
			since it sometimes has locking side effects
		- (nm_device_get_association_pause_value): Reduce 802.11a card pause value to 8s
			from 10s
		- (nm_device_need_ap_switch): If we can't acquire the scan lock, return saying
			we don't need a switch.  This gets called often enough that we can't block
			until the scan mutex is acquired, because we'll block on device activation
			and a few other things, which hangs main thread for too long.

	* src/NetworkManagerPolicy.c
		- (nm_policy_auto_get_best_device): reduce the possiblity that
			nm_device_need_ap_switch() will be called


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@407 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-02 21:49:14 +00:00
Dan Williams
c1dea88b98 2005-02-02 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDHCP.c
		- Hopefully fix double-default-route problem by cleaning up the default
			route added by DHCP code right before the DHCP transaction begins


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@405 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-02 19:30:10 +00:00
Dan Williams
4f28a1ce27 2005-01-31 Dan Williams <dcbw@redhat.com>
* info-daemon/NetworkManagerInfoDbus.c
		- (nmi_dbus_nmi_message_handler): make sure 'dialog' exists before using it

	* src/NetworkManagerDevice.c
		- (nm_device_new): Don't store the entire range struct, use only what we need
			(which is currently avg_quality, max_quality, and frequencies).  Also
			zero device structure when we've free'd it to maybe expose errors down
			the line.
		- (nm_device_update_signal_strength): grab the scan mutex before getting
			quality data from the card since quality will be useless during a scan.
			Call updated wireless qual-to-percent function with values stored in
			nm_device_new() earlier.
		- Remove some unused functions (nm_device_get_max_quality(), nm_device_get_noise(),
			nm_device_get_bad_crypt_packets())
		- (nm_device_activate_wireless_adhoc): use new frequency values we go in
			nm_device_new()
		- (get_initial_auth_method): always use the Auth method that's in the allowed
			list if available.  Problem was this: when the WEP key is wrong, NM will
			try OS then SK modes, and then get stuck in SK mode after that.  This
			should reset it.
		- (nm_device_wireless_process_scan_results): work with new qual-to-percent
			function

	* src/NetworkManagerWireless.c
		- (nm_wireless_qual_to_percent): try to make this function actually work and
			mimic iwlib behavior.  Use card's idea of quality divided by max_qual
			if that's all present, otherwise fall back to signal-to-noise ratios.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@402 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-01-31 19:53:38 +00:00
Dan Williams
2827e5129c 2005-01-29 Dan Williams <dcbw@redhat.com>
* initscript/RedHat/NetworkManager
		- Don't spit out sysctl stuff to console

	* libnm_glib/libnm_glib.c
		- (libnm_glib_init): call dbus_g_thread_init()

	* panel-applet/NMWirelessAppletDbus.c
		- (nmwa_dbus_worker): call dbus_g_thread_init()

	* src/NetworkManager.c
		- (main): call dbus_g_thread_init()

	* src/NetworkManagerAPList.c
		- (nm_ap_list_print_members): use LOG_ERR instead of LOG_DEBUG
			so we can actually see what's there in a normal syslog

	* src/NetworkManagerDevice.c
		- (nm_device_activate_wireless): print out the "waiting for access point"
			message only once, then say what access point we actually got after
			the wait.
		- (nm_device_need_ap_switch): If a scan is in progress when we're in this
			function, wait until the scan is done.  Scans may change the ESSID of
			the card, making this function think we need to switch access points
		- (nm_device_wireless_process_scan_results): for artificial access points
			don't check against the card's ESSID, but the best_ap's ESSID.  This
			prevents collisions with the scanning code, which may change the card's
			ESSID and cause the access point to get dropped from the device's AP
			list.  Also increase the keep-around time to 2m from 60s since the max
			scan interval could be 60s in some cases.

	* src/NetworkManagerPolicy.c
		- (nm_policy_activation_finish): Don't add invalid MAC addresses to GConf
		- (nm_policy_allowed_ap_list_update): When we update, make sure we copy over
			the new properties and ESSIDs to the device's AP list.  Fixes some races
			between NM and NMI.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@401 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-01-29 23:34:31 +00:00
Dan Williams
37fa2d08a4 2005-01-27 Dan Williams <dcbw@redhat.com>
* info-daemon/NetworkManagerInfoDbus.c
		- (nmi_dbus_add_network_address): if the network doesn't yet exist in
			GConf, make a minimal entry for it (essid & timestamp)

	* src/NetworkManagerAPList.c
		- (nm_ap_list_populate_from_nmi): Don't try to grab network data if
			NetworkManagerInfo isn't running

	* src/NetworkManagerDbus.[ch]
		- (nm_dbus_nmi_is_running): new function

	* src/NetworkManagerDevice.c
		- (nm_device_wireless_force_use): Don't set the created AP's MAC
			address to garbage.

	* src/NetworkManagerPolicy.c
		- (nm_policy_activation_finish): On successful activation, make sure
			the "best" AP has a MAC address, and don't tell NMI to add the
			current AP's MAC address to GConf if the AP is an Ad-hoc AP.
		- (nm_policy_allowed_ap_list_update): Update a wireless card's "best"
			access point after refreshing our allowed list if it doesn't already
			have a "best" access point.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@400 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-01-27 20:14:12 +00:00
Dan Williams
13325a091e 2005-01-25 Dan Williams <dcbw@redhat.com>
* configure.in
		- Check DBUS version in configure, and set the C macros
			DBUS_VERSION_[MAJOR,MINOR,MICRO]

	* info-daemon/NetworkManagerInfoDbus.c
		- Remove #if 0-d section of code that quit NMI if NM went away.

	* panel-applet/NMWirelessAppletDbus.c
		- Trap the "ServiceOwnerChanged" signal that's new in dbus-0.23

	* src/NetworkManager.c
	  src/NetworkManagerMain.h
	  src/NetworkManagerDbus.c
		- Trap the "ServiceOwnerChanged" signal that's new in dbus-0.23
		- Make updating of our Allowed Wireless Network lists from NMI
			an idle function in the main thread now, with a high priority.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@398 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-01-25 18:21:38 +00:00
Dan Williams
2ba55c0e32 2005-01-24 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.c
	  src/NetworkManagerDevicePrivate.h
		- Block nm_device_new() until our device's worker thread has had a
			chance to start up.  Fixes a race between main thread and worker
			thread starting that caused activation requests to get lost.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@396 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-01-24 21:53:39 +00:00
Dan Williams
3b658a579f 2005-01-21 Dan Williams <dcbw@redhat.com>
* src/NetworkManager.c
		- Daemonize earlier so that glib doesn't get confused (?)


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@390 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-01-22 04:26:48 +00:00
Dan Williams
594dbaecbf 2005-01-21 Dan Williams <dcbw@redhat.com>
* panel-applet/NMWirelessApplet.[ch]
	  panel-applet/NMWirelessAppletDbus.c
	  panel-applet/menu-info.c
	  src/NetworkManagerDevice.c
		- Disable wired devices in the menu when they have no link.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@389 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-01-21 19:54:18 +00:00
Dan Williams
9e154261fb 2005-01-21 Dan Williams <dcbw@redhat.com>
* Cache last-known-good wireless authentication method in
		NetworkManagerInfo, and use that method first during
		wireless device activation.  Should speed up devices that
		need Shared Key authentication method since Open System is
		now the default.

	* Remove the hack to not do full activation on wired connections
		that are active when we launch, it causes too many problems
		with name resolution and was a hack in the first place.

	* Re-work wireless device activation again somewhat to have a
		clearer chain of events and to use last-known-good
		authentication method of the access point.  Also provide
		better status throughout activation to ensure the applet
		can tell the user exactly what's going on.

	* Remove the "find wireless network" code and now simply attempt
		to activate with that access point.  This reduces the delay
		between selecting "Other wireless Network" and actually
		connecting to that network.

	* Correctly stop the device's worker thread when its removed.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@388 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-01-21 19:32:08 +00:00
Dan Williams
c9b41bb448 2005-01-18 Dan Williams <dcbw@redhat.com>
* dhcpcd/client.c
		- Remove some debug messages
		- Wrap others in #ifdef DEBUG/#endif

	* src/NetworkManager.c
		- Remove some debug messages
		- Clarify some debug messages
		- Remove code related to old single-thread wireless scanning

	* src/NetworkManagerAP.[ch]
		- New AP property "last_seen" to track how recently an AP was
			found in a scan
		- Start using 'const' more in function arguments

	* src/NetworkManagerAPList.[ch]
		- (nm_ap_list_merge_scanned_ap): new, selectively update attributes
			of an AP found in an AP list from a source AP, or if not found
			in the list add the source AP
		- (nm_ap_list_combine): remove, no longer needed

	* src/NetworkManagerDevice.c
		- Each device now has a "worker" thread from start to end of its life.
			Scanning for wireless devices now happens in that thread,
			not in a single "wireless scanning thread" for all devices as
			previously.  Activation consists of adding an idle handler to the
			thread's main loop/context, which gets run at the next available
			opportunity.
		- Wireless scanning is also simplified, there is now only one list of
			access points per wireless device, and APs older than 60s are
			removed from the list.  Previously, we kept results for the last
			3 scans and merged whole lists, which was complicated.
		- Cleaned up activation debug messages.
		- Wireless activation and access-point search routines now use Open System
			authentication before trying Shared Key.
		- Removed some code in nm_device_update_best_ap() that could cause cards
			to loose their link to the access point.
		- Scanning now uses a backoff algorithm, where the inverval becomes
			progressively longer between scans when the list of scanned access
			points doesn't change.  A change will revert to the shortest scan
			interval (20s).

	* src/NetworkManagerWireless.[ch]
		- Remove code related to old single-thread wireless scanning


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@382 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-01-18 22:08:22 +00:00
Colin Walters
39851ae123 2005-01-18 Colin Walters <walters@redhat.com>
* src/NetworkManagerDHCP.c (set_nameservers): Free and clear list
	of older nameservers.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@381 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-01-18 16:28:56 +00:00
Colin Walters
f9d46351f6 2005-01-14 Colin Walters <walters@redhat.com>
Patch from ed@catmur.co.uk (Ed Catmur)

	* named/nm-named-manager.c: Add "context" property.
	Use it to add child watch source in specific GMainContext.

	* src/NetworkManager.c (nm_data_new): Initialize
	named with correct main context.  Start named only
	after forking.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@377 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-01-15 03:21:00 +00:00
Dan Williams
2b5062ba21 2005-01-13 Dan Williams <dcbw@redhat.com>
* named/nm-named-manager.c
		- Use syslog(LOG_WARNING) rather than g_warning() (gnome.org #163961)

	* src/NetworkManagerDevice.c
		- Rework wireless link detection code to be more reliable


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@374 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-01-13 19:04:26 +00:00
Dan Williams
99cfa54d0f 2005-01-12 Dan Williams <dcbw@redhat.com>
* libnm_glib/
		- Client library for applications using glib

	* configure.in
	  various Makefiles
		- Split NM_CFLAGS and NM_LIBS into separate variables
			like DBUS_*, HAL_* and GLIB_*

	* src/NetworkManager.c
	  src/NetworkManagerMain.h
		- (nm_schedule_status_signal_broadcast): at the earliest convenience,
			broadcast a status changed signal over DBUS from the main thread.
			Still unused anywhere for the moment.

	Patch from j@bootlab.org
	* panel_applet/NMWirelessAppletDbus.c
	  src/NetworkManagerDbus.c
		- Correct INT32->UINT32 mistmatch between NM and the panel applet
			for the "getMode" method call


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@368 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-01-12 18:40:04 +00:00
Dan Williams
e0a4c74fcc 2005-01-10 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.c
		- Minor fixups & corrections to "auto" frequency mode, make it
			less chatty with syslog


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@367 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-01-10 15:22:21 +00:00
Dan Williams
d2567b098e 2005-01-10 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.c
		- Implement "auto" frequency/channel support, since cards like Atheros
			can't use other frequencies at all when you've told it to use a
			specific one, even for scanning.
		- Grab the scan mutex around places where we can't tolerate wireless
			settings changing underneath us, like nm_device_wireless_network_exists()
			and nm_device_activate_wireless()

	* src/NetworkManagerWireless.c
		- Back scan interval off to 20s instead of 14s


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@366 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-01-10 06:41:02 +00:00
Dan Williams
62ca4dc643 2005-01-09 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.c
		- Don't set mode/freq/bitrate if that mode/freq/bitrate is
			already set.  Stops some drivers like Atmel from continually
			reloading the firmware, which they do upon every configuration
			change.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@365 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-01-10 02:14:04 +00:00
Dan Williams
9724e4eb3c 2005-01-09 Dan Williams <dcbw@redhat.com>
* dhcpcd/client.c
		- Use correct timeout value

	* info-daemon/NetworkManagerInfoDbus.c
	  src/NetworkManagerDbus.c
		- Consolidate communication between NM and NMI by doing only 1 dbus
			method call to get Wireless Network info from NMI instead of 6

	* src/NetworkManager.c
		- Make sure to cancel activation when we receive a SIGTERM, otherwise
			when we didn't have an AP to use, we'd wait for one forever without
			quitting

	* src/NetworkManagerDevice.c
		- nm_device_activation_cancel(): Fix a race between dhcp and quitting
			activation, dhcp might not have started yet but we don't quit activation
			before starting it, so the quit signal gets lost


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@363 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-01-09 23:15:36 +00:00
Dan Williams
fc7e9f5f85 Remove some debug fprintf()s
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@362 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-01-07 20:19:41 +00:00
Dan Williams
ff6dbffeb1 2005-01-07 Dan Williams <dcbw@redhat.com>
* dhcpcd/client.c
		- Rework the DHCP client code to be much less chatty when
			it receives non-DHCP UDP packets during the DHCP run
			(reported by and preliminary patches from Bill Moss)

	* Move wireless scanning to a separate thread.  This thread forwards the
		results to the main thread when done where they are integrated into
		the device's access point lists.  This keeps the main thread (which
		does all the DBUS communication) from being blocked for long periods
		of time by wireless scanning.

	* Make state modification an idle routine in the main loop, and trigger
		state changes rather than polling for them.

	* src/backends/NetworkManagerGentoo.c
		- Fix up invalid C90 code (reported by Christoph Ruessler)

	* src/NetworkManagerDevice.c
		- Revert IPv6 patch for wired devices from 2004-12-22 for
			router advertisements, causing problems and infinite loop
			during "best" device determination due to link going up/down
			(reported by Bill Moss)

	Apply patch from Peter Jones
	* src/NetworkManagerDevice.c
		- Shortcut for link-checking for ipw2x00 cards
		- Split out association check into separate routine


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@360 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-01-07 18:07:06 +00:00
Colin Walters
2014fed4e2 2004-01-05 Colin Walters <walters@redhat.com>
* named/named.conf: Add PID_FILE.

	* named/nm-named-manager.c: Always generate a pid
	file, since older BIND versions don't support
	"pid-file none".


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@359 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-01-05 20:40:38 +00:00
Dan Williams
3c6d1afa66 Patch from j@bootlab.org
* src/NetworkManagerDevice.c
                - Take down then bring up wired devices after connection so
                they send out ipv6 router advertisements


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@356 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-12-22 18:45:11 +00:00
Dan Williams
5367649e73 2004-12-22 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.c
                - Silently fail when setting bitrate doesn't work


        Patch from j@bootlab.org:
        * src/backends/NetworkManagerDebian
                - Update backend to match functionality in RedHat backend


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@355 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-12-22 18:42:37 +00:00
Colin Walters
33bd873ec4 2004-12-21 Colin Walters <walters@redhat.com>
* src/NetworkManager.c (nm_data_new): Initialize named.
	Also, set up a signal handler for SIGINT/SIGTERM, and exit
	the mainloop when these signals are received.
	(nm_data_free): Unref named.
	(sigterm_handler, sigterm_pipe_handler): New functions for
	exiting mainloop.

	* src/NetworkManagerMain.h (NMData): Add signal handling and
	nameserver bits.

	* src/NetworkManager.c (nm_device_unref): Quit device mainloop on
	unref.

	* src/NetworkManagerDHCP.c (set_nameservers): New function;
	set nameservers from DHCP response data.
	(set_domain_search): Set domain search from DHCP response.
	(nm_device_dhcp_configure): Invoke them.

	* src/NetworkManagerSystem.c
	(nm_system_device_update_resolv_conf): Delete.  Deleting
	code is totally sweet.

	* src/Makefile.am (NetworkManager_LDADD): Add libnamed.

	* named/nm-named-manager.h, named/nm-named-manager.c: New files;
	implements an object which controls a nameserver.  Currently
	uses bind 9.

	* configure.in: Check for named.

	* Makefile.am (SUBDIRS): Add named dir.

	* named/named.conf: New template config file.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@352 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-12-21 06:49:21 +00:00
Colin Walters
53c27dec5f 2004-12-20 Colin Walters <walters@redhat.com>
* src/NetworkManagerPolicy.c (nm_policy_get_best_device): Fix usage of '=='
	instead of '='.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@351 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-12-20 21:53:52 +00:00
Dan Williams
7dd74c7c47 New Ad-Hoc icon for notification area icon when connected to Ad-Hoc networks
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@345 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-12-17 22:08:09 +00:00
Dan Williams
d12bd5843a Revert scanning interval back to 10s, blow away resolv.conf for ad-hoc networks
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@344 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-12-17 21:39:23 +00:00
Dan Williams
eb755d2d3a Fix mode setting for non-encrypted ad-hoc networks
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@343 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-12-17 17:37:12 +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
d0c93d3c69 2004-12-05 Dan Williams <dcbw@redhat.com>
* Major rework of the DHCP code, taking some cues from pump.  We don't
		write raw Ethernet packets anymore, which simplifies the code quite
		a bit.  The new code should be more robust, not hang in recvfrom()
		as much, and generally work better.  This also means that we need
		to force HAL/dbus to use a created GMainContext rather than the
		default context, since having the DHCP renew/rebind thread using
		its own GMainContext seemed to give dbus a fit.  There is also more
		debugging information printed from the DHCP loop to help with future
		problems.

	* Also, if the DHCP server doesn't give us the "routersOnSubnet" option,
		assume that the default gateway should be the DHCP server.

	Patch from Matthew Schick <matt oss-institute org>
	* src/backends/NetworkManagerGentoo.c
		- Fix compilation error due to missing "ip4_broadcast"


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@336 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-12-05 21:28:42 +00:00
Colin Walters
0402864d0a 2004-12-01 Colin Walters <walters@redhat.com>
* configure.in: Suck in gcc warnings code from Rhythmbox,
	but use fewer default flags, and in particular add -Wno-unused,
	since the codebase has a lot of unused variables.

	* test/nmtestdevices.c (create_device):
	* test/nminfotest.c (get_network_string_property)
	(get_networks_of_type):
	* test/nmclienttest.c (main):
	* src/NetworkManagerDbus.c (nm_dbus_create_error_message):
	* initscript/NMLaunchHelper.c (get_nm_status):
	* info-daemon/NetworkManagerInfoPassphraseDialog.c (update_button_cb):
	* info-daemon/NetworkManagerInfoDbus.c (nmi_dbus_create_error_message):
	Fix declarations after statements.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@331 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-12-01 22:45:10 +00:00
Colin Walters
bfc185c5f0 2004-12-01 Colin Walters <walters@redhat.com>
* src/NetworkManagerWireless.c (nm_wireless_qual_to_percent):
	Remove useless CLAMP (); the value is unsigned, and the case tests
	qual->qual < 100, so the value must always be between 0 and 100.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@325 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-12-01 20:40:35 +00:00
Colin Walters
f2fc771dd0 2004-11-22 Colin Walters <walters@verbum.org>
* src/backends/NetworkManagerRedHat.c (nm_system_update_dns): Run
	"nscd -i hosts" to invalidate the host cache instead of restarting nscd,
	which is essentially a noop since nscd caches hosts on disk too.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@322 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-11-23 04:50:12 +00:00
Colin Walters
a6a303d9a4 2004-11-22 Colin Walters <walters@verbum.org>
* src/Makefile.am (NetworkManager_SOURCES): Add
	NetworkManagerDevicePrivate.h.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@321 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-11-22 19:28:16 +00:00
Dan Williams
86ac9e930d 2004-11-22 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevicePrivate.h
		- Split out the NMDevice struct to a different file so that stuff like
			NetworkManagerDHCP.c and NetworkManagerSystem.c can use it

	* dhcpcd/client.c
		- fprintf->syslog
		- (dhcpSendAndRecv): do non-blocking sends and receives, and check to see if we
			need to cancel the dhcp request during the send and recv

	* dhcpcd/client.h
		- Move the DHCP option enum to dhcpcd.h

	* src/NetworkManagerDHCP.c
		- Split out the actual IP/netmask/etc setting code
		- New Renew/Rebind functions
		- New timer setup function for renew/rebind operations

	* src/NetworkManagerDevice.c
		- For device activation, if we are using DHCP then keep the activation thread
			alive until device deactivation.  We need to renew/rebind the DHCP address
			after the T1 (renew) and T2 (rebind) times have expired.
		- Increase some timeouts after bringing wireless cards up/down


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@320 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-11-22 14:42:34 +00:00
Dan Williams
498d3f8773 2004-11-17 Dan Williams <dcbw@redhat.com>
* Cache access point MAC addresses in NetworkManagerInfo after you've explicitly
		connected to them.  Then, after a scan, match up non-ESSID-broadcasting access
		points with any cached MAC addresses from NetworkManagerInfo.  Allows us to
		show known access points that don't broadcast their ESSID in the menus without
		any user intervention whatsoever.

	* info-daemon/NetworkManagerInfoDbus.c
		- (nmi_dbus_get_network_addresses, nmi_dbus_add_network_address): new functions
			for dbus method calls "getNetworkAddresses" and "addNetworkAddress"

	* src/NetworkManagerAP.[ch]
		- Add a "user_addresses" data member to the NMAccessPoint structure
		- (nm_ap_get_user_addresses, nm_ap_set_user_addresses): new functions for accessing
			the user_addresses data member

	* src/NetworkManagerAPList.c
		- (nm_ap_list_get_ap_by_address): check user_addresses list too, instead of just
			the AP's reported address
		- (nm_ap_list_update_network): grab the user_addresses list from NetworkManagerInfo

	* src/NetworkManagerDHCP.c
		- Increase DHCP timeout from 25s -> 30s

	* src/NetworkManagerDbus.[ch]
		- (nm_dbus_get_network_addresses, nm_dbus_add_network_address): have NMI get/set
			user addresses

	* src/NetworkManagerDevice.c
		- (nm_device_set_wireless_config): bring down the interface, wait 4s, bring it up,
			wait 2s, then configure it.  Sometimes Prism54 cards will freeze up with
			"mgnt tx queue full", seemingly in response to NM controlling the card too much.
			So, we take the card down to clear it out.
		- (nm_device_do_normal_scan): Copy over AP ESSIDs from the allowed access point list
			too, since that's where the user_addresses are

	* src/NetworkManagerPolicy.c
		- (nm_state_modification_monitor): Tell NMI to add an AP's hardware address to
			that wireless networks' user_addresses list upon successful activation


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@319 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-11-17 17:51:36 +00:00
Dan Williams
956ad6fbb8 2004-11-16 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.[ch]
		- (nm_device_clear_activation_fail): new function

	* src/NetworkManagerPolicy.c
		- (nm_state_modification_monitor): clear the activation_failed flag on devices
			when we've dealt with the failure so the user doesn't get failure-dialog-spammed


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@317 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-11-16 16:34:14 +00:00
Dan Williams
687912bc96 2004-11-16 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.c
		- (nm_device_activate_wireless): Unref best_ap upon success so we don't
			leak the structure, better updating of now_scanning status
		- (nm_device_wireless_network_exists): Rewrite for better/faster checking


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@316 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-11-16 15:06:46 +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