Commit Graph

4279 Commits

Author SHA1 Message Date
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
Dan Williams
b36e976315 2004-11-15 Dan Williams <dcbw@redhat.com>
Patch from Tom Parker <palfrey@tevp.net>:

        * src/NetworkManagerDevice.c
                - Less output to console when no access
                        points are found during a scan


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@313 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-11-15 14:54:33 +00:00
Dan Williams
e7f323cddb 2004-11-15 Dan Williams <dcbw@redhat.com>
Patch from Tom Parker <palfrey@tevp.net>:

	* src/backends/interface_parser.c
		- Use g_strdup ()
		- Check for inp == NULL
		- use syslog ()


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@312 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-11-15 14:51:45 +00:00
Colin Walters
616961f45c 2004-11-13 Colin Walters <walters@redhat.com>
Patch from Tom Parker <palfrey@tevp.net>:

	* src/Makefile.am (CPPFLAGS): Switch to AM_CPPFLAGS.

	* src/backends/NetworkManagerRedHat.c: Switch to
	including shvar.h instead of shvar.c.

	* src/backends/NetworkManagerDebian.c: Don't include
	interface_parser.c in source file.

	(libnmbackend_la_SOURCES): Don't include shvar.[ch]
	and interface_parser.[ch].
	* src/Makefile.am (libnmbackend_la_SOURCES) <TARGET_REDHAT>:
	Include shvar.c and shvar.h here.
	(libnmbackend_la_SOURCES) <TARGET_DEBIAN>: Include
	interface_parser.c and interface_parser.h here.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@310 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-11-13 18:34:02 +00:00
Colin Walters
e889e9d3f5 2004-11-12 Colin Walters <walters@redhat.com>
* configure.in: Strip out TARGET_DISTRO and
	SYSTEM_BACKEND_FILE variables.  Switch to Automake
	conditionals.

	* src/Makefile.am (noinst_LTLIBRARIES): Add libnmbackend.la.
	(libnmbackend_la_SOURCES): Use Automake conditionals
	to add distro-specific files.

	* initscript/Makefile.am (SUBDIRS): Update to
	use conditionals.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@309 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-11-12 18:49:33 +00:00
Colin Walters
6bd1813692 Remove -1.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@308 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-11-12 18:21:17 +00:00
Colin Walters
f3f21c487e 2004-11-12 Colin Walters <walters@redhat.com>
Patches from j bootlab org

	* src/Makefile.am (EXTRA_NetworkManager_SOURCES):
	Add interface_parser.[ch].

	* src/backends/NetworkManagerDebian.c (nm_system_device_run_dhcp): Invoke
	dhclient with "-lf /var/lib/dhcp/dhclient-%s.leases".


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@307 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-11-12 18:20:56 +00:00
Colin Walters
1d421e5227 2004-11-11 Colin Walters <walters@verbum.org>
* src/NetworkManager.c (main): Use daemon(3).

	* info-daemon/NetworkManagerInfo.c (main): Ditto.

	* dispatcher-daemon/NetworkManagerDispatcher.c (main): Ditto.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@304 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-11-12 01:46:16 +00:00
Dan Williams
237172d077 2004-11-10 Dan Williams <dcbw@redhat.com>
Patches from j bootlab org
	* src/NetworkManagerDevice.c
		- (nm_device_activate_wireless): wait 5 seconds before attempting to detect
			whether the card has a link or not, some cards are slow
		- (nm_device_activation_configure_ip): make ipv6 work a bit better

	* info-daemon/NetworkManagerInfoPassphraseDialog.c
		- Disable the "Login" button on the passphrase dialog until the user
			enters a valid passphrase or key

	Patches from Tom Parker <palfrey tevp net>
	* src/backends/NetworkManagerDebian.c
		- Add static IP support to the debian backend

	* src/backends/interface_parser.[ch]
		- Parse debian interface config files


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@303 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-11-11 02:24:04 +00:00
Dan Williams
a2ad36b9ad 2004-11-08 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.c
		- Some random fprintf->syslog conversions
		- (nm_device_wireless_network_exists): double-check for network
		- (nm_device_find_and_use_essid): Copy over encryption key no matter what

	* src/NetworkManagerWireless.[ch]
		- (nm_wireless_[128|64]bit_ascii_to_hex): make "ascii" argument unsigned again
			so that the binary->ascii conversion works (if unsigned, the bitshift
			will fill with zeros, which is what's required).  Also mask bitshift
			result with 0xF for futher assurance.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@300 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-11-08 19:00:04 +00:00
Dan Williams
e8c1f34697 2004-11-06 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerUtils.c
		- (nm_get_wireless_driver_support_level): default to
			FULLY_SUPPORTED rather than UNSUPPORTED, forgot to
			flip this when changing from whitelist->blacklist of
			wireless drivers


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@299 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-11-07 14:48:07 +00:00
Dan Williams
301e338f2c 2004-11-05 Dan Williams <dcbw@redhat.com>
Patch from Robert Paskowitz:
	* src/backends/NetworkManagerGentoo.c
		- Update static IP config code


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@298 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-11-06 03:40:17 +00:00
Dan Williams
8089b48442 2004-11-05 Dan Williams <dcbw@redhat.com>
* info-daemon/NetworkManagerInfoDbus.c
	  src/NetworkManagerDbus.[ch]
	  src/NetworkManagerDevice.c
		- Keep track of the # of attempts to get the WEP key
			from the user and pass that along to the info daemon


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@297 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-11-06 03:23:36 +00:00
Dan Williams
ae64d4de72 2004-11-05 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerUtils.c
		- Blacklist wireless cards rather than whitelisting them.
		- Grab driver name from HAL rather than trying to find it
			ourselves.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@296 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-11-06 02:44:17 +00:00
Dan Williams
7c24f2af19 2004-11-03 Dan Williams <dcbw@redhat.com>
* panel-applet/NMWirelessAppletOtherNetworkDialog.c,
		- Disable OK button until valid data is entered
			for encryption stuff too

	* panel-applet/NMWirelessApplet.c
		- Report card strength for current AP if the card
			doesn't report strength data for scanned access
			points

	* src/NetworkManagerDevice.c
		- Smooth out cards reported quality, Atmel card was
			intermittently reporting no quality data but soon
			recovers

	* src/NetworkManagerWireless.c
		- Better quality data percentage calculation.  Atmel
			cards (mine at least) seem to report the quality
			in percentage format already, so honor that

	Patch from <j@bootlab.org>
	* NetworkManager.h
	  info-daemon/NetworkManagerInfoPassphraseDialog.c
	  info-daemon/passphrase.glade
	  panel-applet/NMWirelessAppletOtherNetworkDialog.c
	  panel-applet/essid.glade
	  src/NetworkManagerAP.c
	  src/NetworkManagerDevice.c
	  src/NetworkManagerWireless.[ch]
		- Support ASCII WEP keys, in both 40/64 bit and 104/128 bit


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@291 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-11-03 17:05:16 +00:00
Dan Williams
8cba7c5827 2004-11-03 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.[ch]
		- (nm_device_set_enc_key): Add parameter to set Authentication
			Mode (Open System, Shared Key, or None).  We're still using
			Shared Key for now though.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@289 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-11-03 07:47:32 +00:00
Colin Walters
3c23d9c628 2004-11-01 Colin Walters <walters@verbum.org>
* src/NetworkManagerWireless.h, src/NetworkManagerWireless.c
	(nm_wireless_128bit_key_from_passphrase): Add const.

	* src/NetworkManagerAP.h, src/NetworkManagerAP.c
	(nm_ap_set_enc_key_source): Add const.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@287 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-11-02 04:54:39 +00:00
Dan Williams
f34c49eded Fix up includes for distcheck
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@281 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-10-29 20:24:34 +00:00
Dan Williams
689e1ca0a6 Allow distcheck to succeed
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@280 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-10-29 20:06:18 +00:00
Dan Williams
e2ab9f50e2 2004-10-29 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.c
		- (nm_device_wireless_network_exists): Actually use the encryption
			key we got from the applet when attempting to find a wireless network
		- Don't bring devices down so much since on some cards it triggers
			firmware hotplugs each time

	* src/NetworkManagerDbus.c
		- (nm_dbus_nm_set_active_device): free the passphrase we may have gotten
			from the caller


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@279 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-10-29 19:52:35 +00:00
Dan Williams
fd3cd7d1ea 2004-10-29 Dan Williams <dcbw@redhat.com>
* src/NetworkManager.c
		- (nm_hal_device_property_modified): unlock a locked active
			wireless device when a wired connection gets a link.
			(Means you'll switch to wired whenever you plug in no
			matter what).


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@278 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-10-29 17:59:39 +00:00
Dan Williams
d41af0af37 2004-10-29 Dan Williams <dcbw@redhat.com>
* panel-applet/NMWirelessAppletOtherNetworksDialog.[ch]
		- New files, implement the "Other wireless network" dialog

	* panel-applet/NMWirelessApplet.c
		- Move "other wireless network" dialog to separate file

	* panel-applet/NMWirelessAppletDbus.[ch]
		- Take key and key_type paramaters for the set_device function

	* panel-applet/essid.glade
		- Add UI bits for encryption settings

	* src/NetworkManagerDbus.c
		- Retrieve key and key_type params for "setActiveDevice" method call
			and pass them on
		- unref AP returned from nm_device_get_best_ap() when needed

	* src/NetworkManagerDevice.c
		- (nm_device_get_best_ap): ref the ap before returning it
		- unref AP returned from nm_device_get_best_ap() when needed
		- (nm_device_activate_wireless): add "ap" parameter so we don't
			need to call nm_device_get_best_ap() here, it was pretty much
			redundant anyway
		- (AP_NEED_KEY): break second link check condition out into separate
			function, and fix segfault when ap->enc_key_source was NULL
		- (nm_device_find_and_use_essid): take key and key_type parameters and
			pass them along to nm_device_wireless_network_exists().  If the
			network does exist, set the passed-in key+key_type on the AP

	* src/NetworkManagerPolicy.c
		- unref AP returned from nm_device_get_best_ap() when needed


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@277 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-10-29 16:37:43 +00:00
Dan Williams
8200b37f36 2004-10-28 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerUtils.c
		- (nm_spawn_process): Fix a potential dereference of NULL

	Patches from Peter Jones:

	* src/NetworkManagerDevice.c
		- (nm_device_test_wireless_extensions): Better check for
			wireless devices

	* src/NetworkManagerUtils.c
		- (nm_spawn_process): Pass in valid stdout and stderr so
			executed programs don't randomly SIGPIPE and fail
		- (nm_get_wired_driver_support_level): quash hal warning
			when checking for USB ethernet device


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@276 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-10-28 19:49:55 +00:00
Dan Williams
6000e6f062 2004-10-27 Dan Williams <dcbw@redhat.com>
* info-daemon/NetworkManagerInfo.c
	  info-daemon/NetworkManagerInfoDbus.c
	  info-daemon/NetworkManagerInfoPassphraseDialog.c
	  panel-applet/NMWirelessApplet.c
		- Properly escape gconf keys

	* src/NetworkManager.c
		- remove unused variables

	* src/NetworkManagerAP.c
		- (nm_ap_new_from_ap): Don't redundantly set new APs
			refcount since it got set in nm_ap_new()

	* src/NetworkManagerAPList.c
		- (nm_ap_list_combine): Give up ownership of newly created
			access points to the ap list, fixes memleak

	* src/NetworkManagerDevice.c
		- Remove cached_ap_list4 member since its not really needed
		- (nm_device_wireless_network_exists): Try to get correct
			encryption status of a found AP if its already in our
			device list
		- (nm_device_do_normal_scan): Clean up scanning a bit, make
			memory allocs/deallocs a bit clearer and shorter-lived


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@275 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-10-27 19:02:07 +00:00
Dan Williams
2bfd017330 2004-10-23 Dan Williams <dcbw@redhat.com>
* info-daemon/NetworkManagerInfoDbus.c
		- Trap the "DeviceActivationFailed" signal

	* docs/NetworkManager DBUS API.txt
		- Add "DeviceActivationFailed" signal

	* panel-applet/NMWirelessAppletDbus.c
		- Quash the "NetworkManager service not available" message

	* src/NetworkManagerDbus.[ch]
		- Add the "DeviceActivationFailed" signal

	* src/NetworkManagerDevice.c
		- Add support for activation_failed flag
		- Fix deadlock where activation thread didn't clean itself up, making
			main thread still believe it was alive forever (didn't reset activation
			flags like activating, just_activated, etc when IP configuration
			failed)

	* src/NetworkManagerPolicy.c
		- Implement logic for DeviceActivationFailed signal, and when activation fails
			for wireless networks, try to fall back to some other access point


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@268 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-10-23 06:43:01 +00:00
Dan Williams
92202c6bca 2004-10-23 Dan Williams <dcbw@redhat.com>
* panel-applet/NMWirelessApplet.[ch]
		- Place the GtkMenuBar inside a GtkEventBox, and add the Event Box
			to the applet object, so we can get tooltips
		- Add tooltips (RH #136866)

	* src/NetworkManagerDevice.c
		- When trying to find a wireless network, try to connect with encryption
			turned on first, so that we can more accurately detect whether or not
			we need to use encryption for the actual association later on


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@267 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-10-23 05:19:28 +00:00
Dan Williams
3fbfa66df2 2004-10-21 Dan Williams <dcbw@redhat.com>
* Add some support for telling NetworkManagerInfo to tell the user
		that they are using a device that's not fully supported

	* Fix some assertions in debug messages due to null access point args


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@264 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-10-21 19:33:41 +00:00
Dan Williams
f145f77bf9 2004-10-21 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.c
                - Don't try to activate/bring up/down unsupported
                        devices

        * src/NetworkManagerUtils.c
                - Fix case of PCI ID checks for driver support levels


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@263 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-10-21 19:00:13 +00:00
Dan Williams
faae8945db 2004-10-21 Dan Williams <dcbw@redhat.com>
* NetworkManager.h
		- New file, now contains commonly used structures and bits
			for the dbus API of NetworkManager

	* Makefile.am
		- Deliver NetworkManager.h to ${includedir}/NetworkManager

	* src/NetworkManager.h
		- Rename -> src/NetworkManagerMain.c

	* Various fixups all around to use NetworkManager.h and new
		src/NetworkManagerMain.h, remove redundant bits that got
		moved into NetworkManager.h

	* src/NetworkManagerDevice.[ch]
	  src/NetworkManagerUtils.[ch]
	  src/NetworkManagerPolicy.c
	  src/NetworkManagerDbus.c
		- Whitelist wireless drivers, and blacklist some wired
			drivers.  Also blacklist cipsec and ethernet-over-usb
			devices at this time (RH #135722, RH #135648)
		- Don't leak unsupported devices out over dbus, or allow
			them to be set as the active device.  Skip over them
			during automatic device picking

	* test/nmclienttest.c
		- Clean up the dbus code a lot


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@261 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-10-21 17:42:14 +00:00