Commit Graph

46 Commits

Author SHA1 Message Date
Dan Williams
157e9f791d core: log netlink link messages 2010-04-08 10:44:42 -07:00
Dan Williams
1f1a28ae20 core: update logging in misc files 2010-04-07 12:28:57 -07:00
Dan Williams
9e627d1bce trivial: rename some CamelCase source files to not-camel-case 2010-03-02 15:06:14 -08:00
Dan Williams
d41c35fbf8 netlink: work around kernel cache refill problems
Sometimes cause the cache not to refill with all interfaces,
meaning NM sometimes got the wrong carrier state from the
kernel which prevented NM from taking over existing connections.
2010-01-14 14:15:18 -08:00
Dan Williams
ddce707d67 netlink: add blocking function to get carrier state 2009-09-28 10:50:22 -07:00
Dan Winship
7344cc186d Add NMIP6Manager to handle IPv6 addrconf
Automatic IPv6 configuration is handled by the kernel, but to
integrate it properly with NetworkManager, we need to watch what the
kernel does to see whether or not it was successful (so that we can
let the user know if there is no IPv6 router present, for example).
NMIP6Manager takes care of this.
2009-08-26 14:37:45 -04:00
Dan Williams
302c9fcbcc netlink: fix race that caused stale carrier state signals
Found by Ricardo Salveti de Araujo <ricardo.salveti@openbossa.org>

The link cache was updated immediately, but the carrier state signals
were emitted a lot later, when the cache data was already stale.  So
just update the cache at the same time we emit the signals.  The
carrier-state-request stuff wasn't originally converted to deferred
for any netlink-specific reason, just to smooth the initial device
creation process in NM.
2009-07-13 19:40:39 -04:00
Dan Williams
25c030ef2e core: use IFF_LOWER_UP instead of IFF_RUNNING for carrier (lp #332064)
We really have wanted to use IFF_LOWER_UP since 2.6.17 for carrier
status, since that's tied to netif_carrier_ok()/netif_carrier_on() in
the kernel.  See kernel commit b00055aacdb172c05067612278ba27265fcd05ce
for the introduction of IFF_LOWER_UP.
2009-02-20 09:43:27 -05:00
Dan Williams
82d598cdee Fix literal error message
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/branches/NETWORKMANAGER_0_7@4361 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-12-03 23:14:59 +00:00
Dan Williams
9e6d9e298b 2008-11-25 Dan Williams <dcbw@redhat.com>
Patch from Tambet Ingo <tambet@gmail.com>

	Fix mishandling of netlink error floods (rh #459205, novell #443429, lp #284507)

	* src/nm-netlink-monitor.c
		- Remove bits for using a non-default GMainContext, which weren't used
		- (nm_netlink_monitor_error_handler): don't leak the GError, and report
			the actual error code

	* src/NetworkManager.c
		- (nm_error_monitoring_device_link_state): disconnect error handler when
			an error flood occurs to avoid pegging the CPU



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4334 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-11-25 18:30:44 +00:00
Dan Williams
24e50f7f6f 2008-11-02 Dan Williams <dcbw@redhat.com>
* Add license headers to everything in src/



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4247 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-11-03 04:13:42 +00:00
Michael Biebl
d7940bcb9b Rename private nm_* functions to _nm_*
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4012 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-26 09:34:31 +00:00
Dan Williams
cb79727fa2 2008-08-14 Dan Williams <dcbw@redhat.com>
* src/nm-netlink-monitor.c
	  src/nm-netlink-monitor.h
	  src/nm-device-ethernet.c
		- (nm_netlink_monitor_request_status): return an error on failure
		- (constructor): don't segfault on missing error



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3958 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-14 15:47:26 +00:00
Dan Williams
307c33c308 Fix check on error
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3928 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-11 17:49:35 +00:00
Dan Williams
b0cf66eda8 2008-06-26 Dan Williams <dcbw@redhat.com>
* Update FSF address in license headers (Michael Biebl <biebl@debian.org>)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3775 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-06-26 18:31:52 +00:00
Dan Williams
9d2475da06 2008-05-14 Dan Williams <dcbw@redhat.com>
Fix Linus' bug in rh #134886

	* src/nm-device-802-3-ethernet.c
		- (constructor): request initial carrier state

	* src/nm-netlink-monitor.c
		- (nm_netlink_monitor_request_status): schedule emission of carrier
			signals after refilling the link cache.  Because the refill is a 
			synchronous operation, the normal message hander won't get called
			since libnl has already consumed the messages.
		- (deferred_emit_carrier_state): emit carrier states from an idle handler



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3669 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-14 14:01:59 +00:00
Dan Williams
14e671bdea 2007-12-18 Dan Williams <dcbw@redhat.com>
Base the NMNetlinkMonitor class on libnl instead of hand-rolled netlink.

	* src/nm-netlink-monitor.c
	  src/nm-netlink-monitor.h
		- Remove handrolled netlink, use libnl instead

	* src/nm-device-802-3-ethernet.c
		- (constructor, nm_device_802_3_ethernet_carrier_off,
		   nm_device_802_3_ethernet_carrier_on): use new names



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3181 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-18 17:12:21 +00:00
Dan Williams
d24485c553 Warning fixes
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2833 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-20 12:03:30 +00:00
Dan Williams
4c06f348af 2007-08-26 Dan Williams <dcbw@redhat.com>
* src/nm-netlink-monitor.c
		- (nm_netlink_monitor_class_init): fix marshalling types for
			interface-connected/interface-disconnected
		- (nm_netlink_monitor_event_handler): clean up carrier on/off
			check



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2732 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-26 18:48:41 +00:00
Dan Williams
cd00315325 2007-08-26 Dan Williams <dcbw@redhat.com>
Convert to using interface indexes as the primary method of identifying
	devices inside NetworkManager.  Indexes are (?) stable, but devices can
	be renamed at any time.  Device object paths now refer to the device
	index rather than the name, and you can map those two manually if you like
	by looking in the /sys/class/net/<name>/ifindex file.  Also moves most
	netlink-related code to nm-netlink.c, and cleans up nm-netlink-monitor.c
	to use interface indexes rather than names.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2731 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-26 15:55:27 +00:00
Dan Williams
c708b1082f 2007-08-26 Dan Williams <dcbw@redhat.com>
* src/nm-netlink-monitor.c
		- (nm_netlink_monitor_class_init, nm_netlink_monitor_event_handler):
			don't need the 'wireless-event' signal anymore since that's all
			handled by wpa_supplicant



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2727 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-26 15:10:12 +00:00
Tambet Ingo
3dcd9d2d17 2007-02-19 Tambet Ingo <tambet@ximian.com>
* src/vpn-manager/nm-vpn-manager.c: Handle the DBUS state changes itself.
	Handle device state changes and disconnect VPN if it's device deactivates.

	* src/nm-dbus-nm.c: 
	* src/nm-dbus-nm.h: 
	* src/nm-dbus-device.c: 
	* src/nm-dbus-device.c: 
	* src/nm-dbus-net.c: 
	* src/nm-dbus-net.h: Remove. All of it is implemented byt the new dbus API.

	* src/NetworkManagerMain.h: Get rid of all but 3 properties of NMData.

	* src/nm-device.c (nm_device_get_by_udi):
	(nm_device_get_by_iface): Remove. This doesn't belong here and is already
	implemented in the correct location (NMManager).
	Rip out all the test_device stuff.

	* src/NetworkManagerPolicy.c: Remove the leftover activation success and
	failure handlers, it's all done by NMDevice already.

	* src/NetworkManager.c: Move the signal handling here from nm-logging.c
	Remove the iochannel hack to route the unix signals to the main thread since
	we're not threaded anymore.

	* src/NetworkManagerAP.c: Implement HWAddress property.

	* src/NetworkManagerDbus.c: Remove the dbus signal sending code, it happens
	automatically with dbus-glib.

	* src/nm-netlink-monitor.c: 
	* src/nm-netlink-monitor.h:
		- Move it low in the class hierarchy, don't reference any NM types.
		- Remove private data from the header.
		- Use type safe checks in public API methods.
		- Make it a singleton so we don't have to pass the single reference around.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2339 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-02-19 13:09:32 +00:00
Dan Williams
0df1e42c39 2007-01-04 Dan Williams <dcbw@redhat.com>
Threading removal related cleanups:

	- Use the glib default main context.  Remove the device main context
		member from NMDevice, and the main_context member from NMData.  Change
		all the idle and timeout scheduler functions to use plain
		g_idle_add() and g_timeout_add().

	- As a side-effect of the first change, nm_dbus_manager_get() no longer
		takes an argument; fix that up too.

	- Remove all locking, which is useless since we no longer use threads.  For
		example, nm_get_device_by_iface_locked() has been removed.  The global
		device list lock, the AP List lock, and all static locks in
		NetworkManagerPolicy.c have been removed.  The locking utility functions
		in NetworkManagerUtils.c have also been removed.

	- Other cleanups in spacing and code style



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2205 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-01-04 12:06:26 +00:00
Dan Williams
4af9c4d9a1 Do GET_PRIVATE like most other GObjects
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2059 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-10-13 19:27:56 +00:00
Robert Love
dd31354acd 2006-03-27 Robert Love <rml@novell.com>
Patch by Jürg Billeter <j@bitron.ch>:
	* src/nm-logging.c: Add printf modifier to fix warning on 64-bit
	  systems.
	* src/nm-netlink-monitor.c: Include <net/if.h> instead of <linux/if.h>
	  as we prefer glibc over kernel headers, if possible.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1641 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-03-27 15:20:28 +00:00
Dan Williams
a5919b696c 2006-03-05 Dan Williams <dcbw@redhat.com>
Process netlink messages in device subclasses rather than in
	NetworkManager.c.  Also add support for recognizing Wireless Events.

	* configure.in
		- Find GLIB_GENMARSHAL

	* src/Makefile.am
		- Since we're marshalling custom types for wireless event signals,
			we get to create our own marshallers using GLIB_GENMARSHAL

	* src/NetworkManager.c
		- (nm_monitor_wired_link_state): renamed to nm_monitor_setup
		- (nm_monitor_setup): renamed from nm_monitor_wired_link_state, and
			cut down somewhat.  We no longer process signals here.
		- (nm_data_new): create the netlink monitor here, and remove a
			useless call to nm_policy_schedule_device_change_check()
		- (nm_data_free): get rid of the netlink monitor here
		- (nm_device_link_activated, nm_device_link_deactivated): removed
		- (main): don't create the netlink monitor here, let nm_data_new
			do that.  Call nm_policy_schedule_device_change_check() right
			before we jump to the mainloop to figure out which device
			to use first

	* src/NetworkManagerSystem.[ch]
		- (nm_system_get_rtnl_index_from_iface, nm_system_get_iface_from_rtnl_index):
			convert back and forth from interface names to interface
			indexes

	* src/nm-device-802-11-wireless.c
		- (real_init): connect to wireless-event signals from the netlink
			monitor object
		- (nm_device_802_11_wireless_event): new function, schedule handler
			for wireless event signals from the netlink monitor object.  We
			want the handler to run in the device's context
		- (wireless_event_helper): handle wireless-event signals from netlink
		- (nm_device_802_11_wireless_dispose): disconnect wireless-event
			signal handler

	* src/nm-device-802-11-wireless.h
		- remove unused prototype for nm_device_802_11_wireless_new

	* src/nm-device-802-3-ethernet.c
		- (real_init): new function; set up signal handlers for link events
		- (nm_device_802_3_ethernet_link_activated): new function, schedule
			handler for netlink link activated events on device's main loop
		- (link_activated_helper): when we get a link activated event, set
			the device's link to be active
		- (nm_device_802_3_ethernet_link_deactivated): new function; schedule
			handler for netlink link deactivated events on device's main loop
		- (link_deactivated_helper): when we get a link deactivated event, set
			the device's link to be inactive
		- (nm_device_802_3_ethernet_dispose): disconnect signal handler on
			dispose

	* src/nm-device-802-3-ethernet.h
		- remove unused prototype for nm_device_802_3_ethernet_new

	* src/nm-device.[ch]
		- (nm_get_device_by_iface_locked): variant of nm_get_device_by_iface
			but locks the device list
		- (nm_device_set_active_link): a little bit of cleanup and de-indenting

	* src/nm-netlink-monitor.[ch]
		- (nm_netlink_monitor_class_install_signals): New signal
			"wireless-event"
		- (nm_netlink_monitor_new): keep reference to NMData so we can get
			at the device list
		- (nm_netlink_monitor_event_handler): expand for wireless events too

	* src/nm-marshal-main.c
		- Include generated nm-marshal.c and nm-marshal.h

	* src/nm-marshal.list
		- List of custom marshal functions


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1555 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-03-06 01:10:58 +00:00
Robert Love
8eb99d62fc 2006-01-16 Robert Love <rml@novell.com>
* gnome/applet/eggtrayicon.c, src/nm-device.c, src/nm-ap-security.c,
	  gnome/applet/nm-gconf-wso-wep.c, gnome/applet/nm-gconf-wso-wpa-psk.c,
	  gnome/applet/nm-gconf-wso.c, src/nm-device-802-3-ethernet.c,
	  gnome/vpn-properties/nm-vpn-properties.c, src/nm-ap-security-wep.c,
	  src/nm-ap-security-wpa-psk.c, src/nm-device-802-11-wireless.c,
	  src/nm-netlink-monitor.c: Don't miss any initializers on structure
	  declarations, ever.
	* gnome/applet/applet.c: Remove useless check (NMState is unsigned and
	  NM_STATE_DISCONNECTED is zero).


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1351 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-01-17 18:22:56 +00:00
Robert Love
d8e4dcb4a5 revert bogus commits
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1275 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-01-06 16:24:25 +00:00
Robert Love
9837697e06 2006-01-06 Robert Love <rml@novell.com>
Patch by Timo Hoenig <thoenig@suse.de>:
	* src/NetworkManagerSystem.h, src/nm-dbus-nm.c: Add interfaces to
	  hangup specific dialup devices.
	* src/backends/NetworkManagerDebian.c,
	  src/backends/NetworkManagerGentoo.c,
	  src/backends/NetworkManagerRedHat.c,
	  src/backends/NetworkManagerSlackware.c: Add stub backend.
	* src/backends/NetworkManagerRedHat.c,
	  src/backends/NetworkManagerSuSE.c: Add specific backend interface to
	  hangup specific dialup devices.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1272 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-01-06 15:39:55 +00:00
Robert Love
f30fb3f7db 2005-08-12 Robert Love <rml@novell.com>
* src/nm-netlink.monitor.c: don't translate "%s" (fix b.g.o #172391)


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@839 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-08-12 19:06:09 +00:00
Dan Williams
ca7c51f6c4 2005-08-10 Dan Williams <dcbw@redhat.com>
Patch from Bill Moss <bmoss@clemson.edu>
	* Consolidate writes of access point information updates to the info daemon
		so that we only do it when the connection to the access point was
		successful.  Also consolidates updates to GConf in the Gnome applet.

	* src/nm-netlink-monitor.c
		- Silence compile warning when calling g_object_new()


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@830 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-08-10 14:30:41 +00:00
Ray Strode
78546efeef 2005-07-24 Ray Strode <rstrode@redhat.com>
* src/nm-netlink-monitor.c (nm_netlink_monitor_new):
	remove unneeded NULL arg from g_object_new().  Any
	warnings caused by not having the extra NULL are just a
	result of a bug in glib 2.7.0 - 2.7.2.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@809 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-07-25 03:36:55 +00:00
Robert Love
76cb509080 2005-07-22 Robert Love <rml@novell.com>
* src/nm-netlink-monitor.c: g_object_new() needs at least three
          parameters (gcc 4.0.2 warning fix).


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@805 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-07-22 16:57:36 +00:00
Adam Weinberger
496465997c 2005-06-23 Adam Weinberger <adamw@gnome.org>
* src/nm-netlink-monitor.c: correct spelling error.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@747 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-06-23 23:07:24 +00:00
Robert Love
e7705a520c src/nm-netlink-monitor.c: whoops, added half of Ray's suggestion but not
the other half.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@731 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-06-21 15:13:23 +00:00
Robert Love
28d334748b 2005-06-21 Robert Love <rml@novell.com>
* applet/applet-dbus-devices.c: mark non-static functions static.
	* applet/applet-dbus-vpn.c: (ditto)
	* applet/applet.c: (ditto)
	* applet/nm-device.h: (ditto)
	* applet/other-network-dialog.c: (ditto)
	* applet/passphrase-dialog.c: (ditto)
	* NetworkManager.c: (ditto)
	* NetworkManagerDbus.c: (ditto)
	* NetworkManagerDevice.c: (ditto)
	* NetworkManagerPolicy.c: (ditto)
	* NetworkManagerUtils.c: (ditto)
	* NetworkManagerWireless.c: (ditto)
	* NetworkManagerWireless.h: (ditto)
	* nm-netlink-monitor.c: (ditto)
	* applet/applet-dbus-info.c: (ditto), add FIXME's.
	* vpn-manager/nm-dbus-vpn.c: (ditto), remove shadowed variable.
	* autoip.c: include autoip.h.
	* autoip.h: new file.  define get_autoip().
	* nm-netlink-monitor.h: define nm_netlink_close_connection().
	* NetworkManagerDbus.h: remove duplicate definitions.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@728 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-06-21 15:07:01 +00:00
Ray Strode
984d79a076 2005-06-18 Ray Strode <rstrode@redhat.com>
* src/nm-netlink-monitor.c
	(nm_netlink_monitor_event_handler): check for the presence
	of either error condition not both.

	(nm_netlink_monitor_error_handler): emit error signal if
	error occurs.

	(nm_netlink_monitor_event_handler),
	(nm_netlink_monitor_error_handler),
	(nm_netlink_monitor_disconnect_handler): if an
	assertion fails disconnect the event handler to prevent
	infinite loops.

	* src/nm-netlink-monitor.h: add new error condition
	NM_NETLINK_MONITOR_ERROR_WAITING_FOR_SOCKET_DATA


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@719 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-06-19 04:09:20 +00:00
Ray Strode
292c381113 2005-06-18 Ray Strode <rstrode@redhat.com>
* src/nm-netlink-monitor.c
	(nm_netlink_monitor_event_handler): remove bogus < 0
	check on unsigned value and return early if the kernel
	didn't send any bytes.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@718 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-06-19 03:34:21 +00:00
Dan Williams
ecec2ec062 2005-06-15 Dan Williams <dcbw@redhat.com>
Patches from Robert Love:
	* gnome/applet/wireless-applet.glade
		- Tighten up wording

	* src/NetworkManagerDevice.c
		- Remove misplaced ';'

	* configure.in
	  initscript/Makefile.am
	  initscript/SUSE/Makefile.am
	  initscript/SUSE/networkmanager
		- Add SUSE initscript


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@669 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-06-15 11:59:43 +00:00
Ray Strode
8b6b5aea0f 2005-05-05 Ray Strode <rstrode@redhat.com>
* src/nm-netlink-monitor.c:
		- Use clear_event_source instead of g_nullify_pointer() again.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@610 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-05-05 23:30:59 +00:00
Dan Williams
567b5e3d31 2005-05-03 Dan Williams <dcbw@redhat.com>
* Kill dhcpcd.  We now use "dhcdbd", a dbus daemon that controls dhclient.
	  This means that NetworkManager shouldn't have DHCP issues anymore.  It also
	  means you need dhcdbd, which you can get here (get the latest one):

		http://people.redhat.com/jvdias/dhcdbd/

	  Technically NetworkManager can use any DHCP daemon that uses the same DBUS
	  interface as dhcdbd.

	* Rewrite device activation to facilitate the new DHCP infrastructure and
	  future improvements.  Its now "activation request" based, ie there is a single
	  activation request composed of the device, access point, and other info which
	  follows the entire activation process.  There are 5 stages of the activation
	  process which correspond to:

		1) Device preparation
		2) Device configuration (bring it up, set ESSID/Key/etc)
		3) IP Config Start (fire off DHCP if we're using it)
		4) IP Config Get (grab config from DHCP or static config files)
		5) IP Config Commit (set device's IP address, DNS, etc)

	  Note that there is no longer a "scanning" step, since the access point must
	  be known _before_ activation starts.  If the access point drops out or does
	  not exist for some reason, the entire activation process fails and must be
	  restarted for a different access point or device.

	Patch from Bill Moss:
	* gnome/applet/applet.c
		- Fix type of vpn_failure dialog -> vpn_banner dialog


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@597 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-05-03 20:41:36 +00:00
Dan Williams
7337e8132a 2005-04-15 Dan Williams <dcbw@redhat.com>
Patches from Tom Parker:
	- Fix memleaks
	- Join with worker thread rather than polling for its exit

	Patch from Bill Moss:
	- Cull duplicate ESSIDs from the scan list, taking highest strength AP


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