* libnm-util/Makefile.am
* libnm-util/dbus-dict-helpers.[ch]
- Add some helpers to take the pain out of using dict types in
dbus.
* test/libnm-util/Makefile.am
* test/libnm-util/test-dbus-dict-helpers.c
- Test cases for the dict helper functions
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1834 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Add 'fallback' support. NetworkManager will attempt to brute-force
connect to networks marked as fallback if there are no better wireless
connections available. This is useful as a method of last resort, to
work around driver problems, and for use with hidden networks.
* gnome/applet/applet-dbus-devices.c,
gnome/applet/applet-dbus-devices.h: Add fallback parameter.
* gnome/applet/applet-dbus-info.c: Retrieve fallback bit from Gconf and
pass it on via DBUS.
* gnome/applet/applet.c: No fallback by default.
* gnome/applet/applet.glade, gnome/applet/other-network-dialog.c:
Update other-network-dialog to add UI checkbox toggling fallback.
* src/NetworkManagerAP.c, src/NetworkManagerAP.h: Remove "trusted"
propery from AP object. Add "fallback" property to AP object.
* src/nm-dbus-nm.c: Grab the fallback parameter via DBUS.
* src/nm-dbus-nmi.c: Grab the fallback parameter via DBUS.
* src/nm-device-802-11-wireless.c: Break out blacklist logic into
separate function. Add get_best_fallback_ap() for returning an AP
on which to attempt fallback.
* src/backends/NetworkManagerSuSE.c: Set stored network as fallback.
* test/nm-set-fallback: New file. Sets a given network as fallback.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1814 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Patch by Timo Hoenig;
* tests/nm-online.c: Print pretty status indicator as timeout winds
down. Also fix possible race between DBUS startup and failure
return.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1714 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* tests/nm-online.c: New file. Simple utility that returns exit status
noting whether the connection is offline or online. If offline on
start, it waits 60 seconds (or a command-line given value) for an
online signal. If it times out, it again returns offline. This is
useful for scripts that want to wait for network connections.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1706 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Add support for retrieving both the per-device speed and the
per-network maximum supported rate. Then change the getProperties
DBUS API for both networks and devices to report this informaiton.
Finally, display the information via both nm-applet and nm-tool:
* gnome/applet/applet-dbus-devices.c: Grab the speed from getProperties
and set it.
* gnome/applet/applet.c: Display the device's speed in the 'Connection
Information' dialog.
* gnome/applet/applet.glade: Update the UI to show per-device speed.
* gnome/applet/nm-device.c, gnome/applet/nm-device.h: Add interfaces
network_device_get_speed() and network_device_set_speed() for
retrieving and setting, respectively, a network device's current
speed.
* src/nm-dbus-device.c: Send the device's speed on getProperties.
* src/nm-device-802-11-wireless.c: Return the rate in Mb/s, not Kb/s,
in the function nm_device_802_11_wireless_get_bitrate() -- it does
not matter (yet) what the units are, because we only feed it its own
output. Implement SIOCGIRATE and set the per-network maximum
supported rate during scanning.
* src/nm-device-802-11-wireless.h: Export the function
nm_device_802_11_wireless_get_bitrate().
* src/nm-device-802-3-ethernet.c, src/nm-device-802-3-ethernet.h: Add
function nm_device_802_3_ethernet_get_speed() for returning an
802.3's current speed, in Mb/s.
* test/nm-tool.c: Display the per-device current speed, if available,
and the per-network maximum rate.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1540 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerAP.c: Add 'broadcast' property to the NMAccessPoint
structure, which denotes whether or not the AP is hidden. This is a
superset of 'artificial' -- we need 'broadcast' because a hidden AP
can show up in the scan list. Add nm_ap_get_broadcast() and
nm_ap_set_broadcast() accessor interfaces.
* src/NetworkManagerAP.h: Add prototypes for nm_ap_get_broadcast() and
nm_ap_set_broadcast().
* src/nm-dbus-net.c: Add new argument, boolean broadcast, to the
"getProperties" method, which denotes whether or not the given
network is hidden.
* src/nm-device-802-11-wireless.c: Set broadcast to FALSE when creating
an artificial network. Set broadcast to TRUE when scanning returns
an ESSID and FALSE when not.
* gnome/applet/applet-dbus-devices.c: Retrieve 'broadcast' argument
from "getProperties" method on a network. Possible TODO is to
somehow display this.
* test/nm-tool.c: Display "Hidden" if the AP does not broadcast.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1429 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* gnome/applet/applet-dbus-devices.c
- (nmwa_dbus_device_get_driver_cb, nmwa_dbus_device_get_driver): new
functions, grab device driver name from NetworkManager
- (nmwa_dbus_device_properties_cb): call functions to get driver
* gnome/applet/applet.c
- (nmwa_update_info): show driver name in Connection Information
dialog
* gnome/applet/nm-device.[ch]
- (network_device_get_driver, network_device_set_driver): add
accessors for driver name
* gnome/applet/wireless-applet.glade
- Add line for driver name to Connection Information dialog
* src/nm-dbus-device.c
- (nm_dbus_device_get_driver): new function to return driver name
- (nm_dbus_device_methods): hook up driver name function to dbus
* test/nm-tool.c
- (get_driver_name): new function
- (detail_device): grab and show driver name
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1406 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/Makefile.am: Don't install NMLoadModules
* src/NMLoadModules, test/NMLoadModules: Move the NMLoadModules script
from src/ to test/ as no one uses it anymore. Note that I would be
fine with removing it altogether.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1353 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device-802-3-ethernet.c: Use the if_mii() inline function that
is defined in <linux/mii.h> to return the mii_ioctl_data structure
from the ifreq structure in lieu of an open coded solution. Removes
a life-threatening type-punning.
* configure.in: Remove '-Wno-strict-aliasing' as we no longer pun any
types, ever, whatsoever, baby.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1316 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* test/test-common.c
test/test-common.h
test/Makefile.am
- Move to a test-common subdirectory
* test/libnm-util/test-ciphers.c
- Move test data to test-inputs.h
- Test WPA ciphers too
* test/libnm-util/test-dbus-helpers.c
- Test serialization/deserialization of ciphers
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1240 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* gnome/applet/applet-compat.c
- Fix bugs in GConf entry conversion
* gnome/applet/applet-dbus-info.c
- (nmi_dbus_get_network_properties): handle case of the BSSID
list being zero-length
* libnm-util/cipher-*
libnm-util/dbus-helpers.c
- All ciphers must now return hashed keys as UTF-8 valid
hexadecimal strings, ie "8f3dae4023". They are pushed
through dbus as strings too.
- Consolidate various functions that do bin->hex and hex->bin
conversion into cipher.c
* src/nm-ap-security-wep.c
src/nm-ap-security-wpa-psk.c
- Handle NULL keys since we may not know keys right away
* src/nm-dbus-nmi.c
- (nm_dbus_get_network_data_cb): actually advance to the start
of the wireless security info before we try to deserialize it
* libnm-util/test-ciphers.c
- Update cipher tests for the change to UTF-8 hexadecimal strings
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1230 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* Convert NETWORK_MODE_* constants to IW_MODE_*
* Make all the get_mode/set_mode functions take and return 'int'
* Convert D-BUS calls that pass mode to DBUS_TYPE_INT32 rather than UINT32
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1142 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* Move NetworkManager.h -> include/NetworkManager.h
* Split out VPN stuff to include/NetworkManagerVPN.h
* Fix up makefiles to include new location
* Fix up sources to include NetworkManagerVPN.h
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1130 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* test/nmtest.c
- Removed
* test/nm-tool.c
test/Makefile.am
- Added new "nm-tool" tool that gives quite a bit more
information
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1006 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* Remove NM_STATE_SCANNING from NetworkManager.h and applet code
* Fix some holes in device activation and retaining the currently connected
access point
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@602 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* 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
* Merge the applet and the info-daemon, and move the converged
applet under gnome/applet
* Move libnm_glib to gnome/libnm_glib
* Convert most dbus calls between the applet, info-daemon, and NM
into async calls
* Fix a few things valgrind noticed
* Make NM broadcast state more reliably
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@586 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* dhcpcd/dhcpcd.[ch]
src/NetworkManagerDHCP.c
- Switch names from "*_record_*" -> "*_element_*" to clarify things a bit
(ie, dhcp_option_record_len -> dhcp_option_element_len)
* src/NetworkManagerDbus.c
- spacing cleanups
* src/nm-dbus-dhcp.c
- Make the API suck less. There is now only 1 type of each function,
ie only "getInteger" and no longer also "getIntegerv". All types
are returned encapsulated in a DBUS_TYPE_ARRAY, even for options
that will never have more than 1 element. This should simplify
things greatly.
* test/nm-dhcp-opt-test.c
- Make the tool not segfault
- adapt to new DHCP Options API
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@506 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
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
* libnm_glib/libnm_glib.[ch]
test/libnm_glib_test.c
- Clean up libnm_glib API a bit, callback is now passed a libnm_glib_ctx
and its data, and doesn't have to free the callback data anymore
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@461 4912f4e0-d625-0410-9fb7-b9a5a253dbdc