2004-07-06 Dan Williams <dcbw@redhat.com>

* src/NetworkManager.c
		- Add IPv4 address update for active device during link state check
		- Don't allow wireless cards to be powered up when they are not the
			active device

	* src/NetworkManagerDbus.c
	  src/NetworkManagerDbus.h
		- Add DBUS IPv4 address change signal
		- Add DBUS IPv4 address get method for devices

	* src/NetworkManagerDevice.c
		- Make setting the WEP key actually work
		- Move IP address get/set/update stuff here, per-device
		- Power down/bring down wireless device when deactivated
		- For scanning wireless devices, if first scan returned ENODATA, try again

	* src/NetworkManagerPolicy.c
		- Only set the WEP key for an allowed access point if there is one.
			We were setting it to be blank if one wasn't specified.

	* src/NetworkManagerUtils.h
	  src/NetworkManagerUtils.c
		- Move the IP address stuff to NetworkManagerDevice.c

	* dispatcher-daemon/NetworkManagerDispatcher.c
		- Add device IPv4 address change notification stuff


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@13 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2004-07-06 04:45:00 +00:00
parent 019e2337bf
commit 0073d4dd55
9 changed files with 224 additions and 74 deletions

View File

@@ -171,42 +171,3 @@ void nm_dispose_scan_results (wireless_scan *result_list)
}
}
/*
* nm_get_ip4_address_for_device
*
* Get a device's IPv4 address
*
*/
guint32 nm_get_ip4_address_for_device(NMDevice *dev)
{
struct ifreq req;
int socket;
g_return_val_if_fail (dev != NULL, 0);
g_return_val_if_fail (nm_device_get_iface (dev) != NULL, 0);
socket = nm_get_network_control_socket ();
if (socket < 0)
return (0);
strncpy ((char *)(&req.ifr_name), nm_device_get_iface (dev), 16); // 16 == IF_NAMESIZE
if (ioctl (socket, SIOCGIFADDR, &req) != 0)
return (0);
return (((struct sockaddr_in *)(&req.ifr_addr))->sin_addr.s_addr);
}
/*
* nm_get_ip6_address_for_device
*
* Get a device's IPv6 address
*
*/
void nm_get_ip6_address_for_device(NMDevice *dev)
{
/* FIXME
* Implement
*/
}