Patch from Dan Reed: DHCP options D-BUS API
Exposes the DHCP options that a device receives to clients over D-BUS.
* configure.in
- A few cleanups
* dhcpcd/client.h
- Correct names, option length, and types for DHCP options
* dhcpcd/dhcpcd.[ch]
- Clarify function names that access DHCP options & data
* src/NetworkManagerDHCP.c
- Use new DHCP data access functions
* src/NetworkManagerDbus.c
- Message handler for DHCP functions
* src/nm-dbus-dhcp.[ch] (new)
- DHCP dbus methods
* test/nm-dhcp-opt-test.c
- Test DHCP D-BUS API and return all present DHCP options
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@444 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* dhcpcd/client.c
- (dhcp_init): only print out client ID and class ID if they are specified
* src/NetworkManagerDbus.[ch]
src/nm-dbus-nm.[ch]
src/nm-dbus-device.[ch]
src/nm-dbus-net.[ch]
- Move NM, Device, and Net functions to separate files and use the
dbus method list stuff in NetworkManagerDbusUtils.c to do
method dispatching
* src/NetworkManagerDbusUtils.c
- Add new validate_method called before each dispatch (if present)
that can validate the method call
* src/NetworkManagerWireless.c
- (nm_wireless_qual_to_percent): Fix misplaced "!" that caused signal
levels never to be evaluated
Patch from j@bootlab.org
* src/NetworkManagerDevice.c
- Add typedef for "u64"
* src/backends/NetworkManagerDebian.c
- Copy in Dave Woodhouse's fixes for IPv6
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@438 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Patch from Dave Woodhouse for IPv6:
* src/NetworkManagerUtils.c
- (nm_ethernet_address_is_valid): Check for prism54 dummy MAC address
and multicast addresses
* src/NetworkManagerDevice.c
- (nm_device_set_up_down): make sure our cached MAC address is up-to-date
after bringing up a card.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@435 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Patch from Dave Woodhouse:
* src/NetworkManagerSystem.h
src/backends/NetworkManagerDebian.c
src/backends/NetworkManagerGentoo.c
src/backends/NetworkManagerSlackware.c
- New nm_system_device_add_ip6_link_address() function to add link-local
address on an interface. Stubbed in Debian, Gentoo, and Slackware.
* src/backends/NetworkManagerRedHat.c
- (nm_system_device_add_ip6_link_address): implement
- (nm_system_device_flush_addresses): revert to previous behavior of
flushing all addresses
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@432 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Patch from Tom Parker:
* src/NetworkManagerDevice.c
- Remove the "#include <pci/types.h>" since both the ethtool.h and
mii.h headers are broken, and instead use our own typedefs
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@430 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* dhcpcd/buildmsg.c
- (fill_host_and_class_id): only fill in client and class IDs if
they are set by callers.
* dhcpcd/client.c
- (class_id_setup): don't autogenerate a class ID, only use one
we're given, if any.
- (client_id_setup): don't autogenerate a client ID, only use one
we're given, if any.
* dhcpcd/dhcpcd.c
- (dhcp_interface_init): ensure that client options are correctly
NULL terminated
* src/NetworkManagerDHCP.c
- (nm_device_dhcp_request): pass hostname to dhcp library
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@429 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* dhcpcd/client.c
- #rh147661# Don't send kernel version in DHCP requests
* src/NetworkManagerSystem.h
src/backends/NetworkManagerDebian.c
src/backends/NetworkManagerGentoo.c
src/backends/NetworkManagerRedHat.c
src/backends/NetworkManagerSlackware.c
- Remove the nm_system_device_run_dhcp() and nm_system_device_stop_dhcp()
functions, they are no longer used anyway
* src/backends/NetworkManagerRedHat.c
- (nm_system_device_flush_addresses): only flush "scope global" and "scope site"
addresses in an attempt to keep IPv6 local-scope addresses around
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@428 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* 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
* 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
* 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
* 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
Patch from Nathan Fredrickson <nathan@silverorange.com>
* Fix up compile for deprecation of libgnomeui
- Switch to <glib/gi18n.h> from <libintl.h>
- Remove <libgnomeui/libgnomeui.h> includes
- Use gtk_window_set_default_icon_from_file() rather than
gnome_window_set_default_icon_from_file()
* named/nm-named-manager.c
- (generate_named_conf): Fix return-nothing in non-void
function
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@409 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* 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
* panel-applet/NMWirelessApplet.c
- Display name of wireless network we are connecting to or connected to
in the tooltip of the applet
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@406 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* 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
* 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
* 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
* 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
* panel-applet/NMWirelessAppletDbus.c
- (nmwa_dbus_filter): Fix dbus 0.23 ServiceOwnerChanged checks
so we check for NM_DBUS_SERVICE rather than not for it
* libnm_glib/libnm_glib.c
- (libnm_glib_dbus_filter): Fix for dbus 0.23, trapping
ServiceOwnerChanged signal
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@399 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* 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
* panel-applet/gtkcellview.[ch]
panel-applet/menu-info.c
- Fix GTK version checks to be <= rather than <
* test/Makefile.am
- Include the libtool archive of libnm_glib rather than
trying to pull in the .so
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@397 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* 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