* src/NetworkManagerPolicy.c
- (connection_updated): clear invalid tag when connection gets updated
to allow that connection to be tried again
- (nm_policy_new): save signal ids so they can be disconnected when
the policy is destroyed
- (nm_policy_destroy): stop any in-progress state change idle handler,
and disconnect all signals from the manager object so that none
of the policy functions gets called after the policy is destroyed
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3295 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerPolicy.c
- (device_state_changed): schedule a change check when a device gets
deactivated so something happens if you disconnect GSM/CDMA
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3284 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerPolicy.c
- (nm_policy_device_change_check): system connections override user
connections; don't activate a user connection if there's a currently
active system connection, and new, better system connections always
interrupt user connections
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3258 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device-interface.c
src/nm-device-interface.h
- (nm_device_interface_error_quark, nm_device_interface_error_get_type):
normalize and expand errors
- (nm_device_interface_init): register errors so they can be marshalled
through dbus-glib
- (nm_device_interface_activate): ensure that failure of activation
returns an error
* src/nm-device.c
src/nm-device.h
- (device_activation_precheck): implementations of check_connection()
now take a GError and must fill it in if the check fails. Return
more descriptive error if the requested connection is already
activating
- (nm_device_activate): actually try to return descriptive errors on
failures
* src/nm-device-802-11-wireless.c
src/nm-device-802-3-ethernet.c
src/nm-serial-device.c
src/nm-gsm-device.c
- (real_check_connection): return more descriptive errors on failure
* src/NetworkManagerPolicy.c
- (nm_policy_device_change_check): print activation errors in the logs
* src/nm-manager.c
- (nm_manager_error_quark, nm_manager_error_get_type,
nm_manager_class_init): new errors
- (nm_manager_activate_device): handle errors
- (nm_manager_error_new): removed
- (wait_for_connection_expired, connection_added_default_handler,
impl_manager_activate_device): better error handling
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3197 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerSystem.c
* (nm_system_device_set_from_ip4_config): Change the
arguments: This whole file shouldn't really know anything about
NMDevices, it
should deal only with device interfaces. Devices might have
different ifaces for
different stuff and this place shouldn't know anything about it.
* src/NetworkManagerPolicy.c: Get rid of leftover global
* variable global_policy.
(global_state_changed): Implement. In the current NM it's not
really important,
but will be required in the case of multiple active devices. (Or
even better,
if stuff like that gets moved out from NM).
* src/vpn-manager/nm-vpn-connection.c
* (connection_state_changed): Don't call
nm_system_device_set_from_ip4_config() directly, use
nm_device_set_ip4_config()
instead.
* src/nm-device.c: Add a ip_face protected member. It's used for
* 'multi-interface'
devices like serial devices (ttyS0 and ppp0 for example).
(nm_device_get_ip_iface): Implement. Default to the device iface
if ip_iface is not
set.
(nm_device_set_ip_iface): Implement.
(nm_device_activate_stage5_ip_config_commit): Move all the extra
actions that happen
after setting ip4_config from here ...
(nm_device_set_ip4_config): ... to here. The reason behind it is
that no other code
than this function should call
nm_system_device_set_from_ip4_config() because no
other code has enough information on which arguments to use. So
instead, other code
could just set the new ip4 config using this function and
everyone is happy.
* src/nm-umts-device.c: Store the pending ids so that we can
* remove pending actions
if we happen to get deactivated while something is pending.
(automatic_registration): Handle the response that indicates
pending network
registration and wait until the pending registration is done.
(real_deactivate_quickly): If there's a pending operation,
cancel it.
* src/nm-serial-device.c (ppp_ip4_config): Set the ip_iface when
* the iface is up ...
(real_deactivate_quickly): ... and remove it when it's down.
(nm_serial_device_get_reply): Return the timeout id so that the
callers can remove
it if needed.
(nm_serial_device_wait_for_reply): Ditto.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3141 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-umts-device.c (dial_done): Fix the typoes in warnings.
(get_network_done): Remove newline, nm_info() does it already.
(real_act_stage1_prepare): Turn the modem echo off.
* src/NetworkManagerSystem.c
* (nm_system_device_set_from_ip4_config): In case of serial
device, set the route to the device interface. This is a hack.
* src/nm-serial-device.c (nm_serial_device_send_command_string):
* Only append carriage
return, no need for a new-line.
(ppp_ip4_config): Store the ip4 config to be set in the next
stage.
Change the device iface here (ugh).
(real_act_stage4_get_ip4_config): Implement.
(real_deactivate_quickly): Free the pending ip4 config if it's
still pending.
Restore the device iface.
* src/NetworkManagerPolicy.c (nm_policy_device_change_check): Do
* nothing if the active
device is not wired or wireless (eg, automatically upped)
device.
* src/ppp-manager/nm-ppp-manager.c (ip4_config_get): Don't make
* the config secondary,
it isn't.
(nm_ppp_manager_start): Don't let pppd to set the default route,
we want to do it.
* src/nm-hal-manager.c (get_creator): Make sure the device has
* required capability
before calling it's is_device_fn().
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3137 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-util/nm-setting-connection.h
libnm-util/nm-setting-connection.c
- Rename the 'name' property to 'id', because it conflicted with the
NMSetting superclass' 'name' property.
* libnm-util/nm-setting.c
- (nm_setting_to_hash): serialize the 'name' property
- (one_property_cb): ignore 'name' on deserialization of a connection
* src/nm-device-802-11-wireless.c
src/vpn-manager/nm-vpn-connection.c
src/NetworkManagerPolicy.c
- Fix up for NMSettingConnection 'name'->'id' changes
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3084 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Rework NMSetting structures: Move each setting to it's own file.
Convert to GObject. Remove home grown setting types and use
GTypes.
Use GObject property introspection for hash conversion,
enumerating
properties, etc.
* libnm-util/nm-setting-connection.[ch]
* libnm-util/nm-setting-ip4-config.[ch]
* libnm-util/nm-setting-ppp.[ch]
* libnm-util/nm-setting-vpn.[ch]
* libnm-util/nm-setting-vpn-properties.[ch]
* libnm-util/nm-setting-wired.[ch]
* libnm-util/nm-setting-wireless.[ch]
* libnm-util/nm-setting-wireless-security.[ch]
New files, each containing a setting.
* libnm-util/nm-setting-template.[ch]: A template for creating
* new
settings. To use it, just replace 'template' with the new
setting
name, and you're half-way done.
* libnm-util/nm-setting.c: Convert to GObject and use GObject
introspection instead of internal types and tables.
* libnm-util/nm-connection.c: Adapt the new NMSetting work.
* libnm-util/nm-param-spec-specialized.[ch]: Implement. Handles
GValue types defined by dbus-glib for composed types like
collections,
structures and maps.
* src/*: The API of NMSetting and NMConnection changed a bit:
* Getting
a setting from connection takes the setting type now. Also,
since
the settings are in multiple files, include relevant settings.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3068 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerPolicy.c (nm_policy_new): Initialize the
device_state_changed_idle_id variable or it would contain some
random value and the
schedule_change_check calls would not do anything.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2964 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Reimplement the invalid connection list. Don't try to re-activate a
connection that just failed or was canceled.
* src/nm-device.c
- (connection_secrets_failed_cb): fail device activation, don't just
deactivate the device. Listeners have to know about the failure.
* src/NetworkManagerPolicy.c
- (nm_policy_auto_get_best_device): exclude invalid connections from
the connection list given to a device's get_best_connection()
method
- (device_state_changed): tag failed connections as invalid; clear the
tag from successful connections
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2957 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Fix problems with interrupted activation. Previously, choosing an AP
from the menu, then choosing another one before the first connection was
successful wouldn't deactivate the device before starting the new connection
on that same device.
* src/NetworkManagerPolicy.c
- (deactivate_old_device, device_state_changed, state_changed,
nm_policy_new): wrong place to deactivate old devices
* src/nm-manager.c
- (pending_connection_info_destroy, finalize,
wait_for_connection_expired): decouple destruction of the pending
connection info from the manager device
- (connection_added_default_handler): deactivate any active or
activating device before starting a new activation
- (impl_manager_activate_device): deactivate any active or activating
device before starting a new activation; be sure not to leak
pending connection info if a new activation request arrives but
there's already a pending one in-process
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2956 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-manager.c
src/nm-manager.h
- Add a 'connections-added' signal to batch together updates of large
numbers of connections, like when reading from a settings service
the first time. Otherwise, the policy would just activate the first
suitable connection it saw rather than waiting for the full list
to arrive.
- (nm_manager_class_init): register new signal
- (get_type_for_proxy, connection_get_settings_cb,
get_connection_for_proxy): centralize places where a proxy's setting
service is determined
- (free_get_settings_info): if the call being freed is the last call
in a pending call group, fire off the connections-added signal
- (internal_new_connection_cb): add call to a pending call group if
requested
- (list_connections_cb): always create a call group here, because this
call results in a batch of new connections
- (initial_get_connections): start getting system connections first
- (nm_manager_connections_destroy, emit_removed): actually emit the
removed signal when destroying connections
* src/NetworkManagerPolicy.c
- (nm_policy_new, connections_added): handle connections-added signal
from the manager
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2951 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerPolicy.c
- (nm_policy_auto_get_best_device): fix connection list reffing. Each
connection in the list returned by nm_manager_get_connections() is
reffed, but they weren't getting unreffed before returning
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2949 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-manager.c:
* src/nm-manager.h:
Implement device activation through NMManager.
Implement "pending device activation" here - If the connection
isn't found,
we try to wait for up to 5 seconds for the connection to be
provided.
Add NMConnectionType argument to "connection-added" and
"connection-removed"
signals.
(nm_manager_get): Remove. Finally.
* src/nm-activation-request.c:
* src/nm-activation-request.h:
Remove all the deferred activation code.
* src/nm-device.c: Remove all the deferred activation code. Once
* the device
activation is started, it's started. Update the activation
virtual function
signature.
* src/nm-device-interface.c:
* src/nm-device-interface.h:
Device activation now takes only NMActRequest argument.
Don't expose device activation directly on dbus, it's supposed
to go through
NMManager now.
* src/NetworkManagerPolicy.c (nm_policy_device_change_check):
* Make the code
a bit more compact.
Use the new device activation methods through NMManager.
* introspection/nm-manager-client.xml:
* introspection/nm-manager.xml:
* libnm-glib/nm-client.c:
* libnm-glib/nm-client.h:
Add device activation method.
* libnm-glib/nm-device.c:
* libnm-glib/nm-device.h:
* introspection/nm-device.xml:
Remove device activation method. It's done through NMManager
now.
* src/vpn-manager/nm-vpn-manager.c (impl_vpn_manager_connect):
* Use the shiny
new (nm_manager_get_device_by_path) function, get rid of our own
)find_device).
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2915 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-manager.c (manager_device_state_changed): Listen to
* device' NEED_AUTH
state and try to get the secrets.
* src/NetworkManagerPolicy.c (nm_policy_auto_get_best_device):
* Get the list of
connections from NMManager and let the device to choose the best
from the list.
Since the connection list is sorted by system ones first and
user ones later,
the devices still prefer system connections like they did
before.
(deactivate_old_device): Implement. When a device starts
activation, we have a
policy (for now at least) to deactivate any other device that
might be either
active or still activating.
* src/vpn-manager/nm-vpn-manager.c: Add NMManager back to the
* private structure.
It's set on construction, there will be no other way to access
it.
* src/nm-device-802-11-wireless.c: Don't touch NMManager,
* NMManager can listen to
device events and drive the device, not the other way around.
* src/nm-device-802-3-ethernet.c: Ditto.
* src/nm-device.c (nm_device_get_best_connection): The
* connections list is now
sent along, pass it on to virtual functions.
* src/nm-device-interface.c (nm_device_interface_get_iface):
* Implement. It's static
for now, but should really be public instead of
nm_device_get_iface() since iface
is a property of the DeviceInterface, not Device.
(impl_device_activate): Don't touch NMManager!
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2889 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerPolicy.c
- (nm_policy_device_change_check): handle devices that have a
deferred activation. These devices are not really active _yet_,
but need to be treated as such here. Don't interrupt them
automatically.
* src/nm-device-interface.c
- (impl_device_activate): handle devices that have a deferred activation
like activating or active devices. When multiple active devices
get committed, the device shouldn't be deactivated until the
connection details are available to avoid DoS and such. Currently,
any active, activating, or deferred activation device is deactivated
here before starting the new activation request.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2873 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerPolicy.c
- (nm_policy_auto_get_best_device): don't interrupt activation of a
device by deactivating it because it doesn't have a "best connection".
Since autoconnect=False connections aren't automatically chosen,
NM would interrupt activation of such a connection because it
would never be "best" due to autoconnect=False.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2867 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerPolicy.c
- (nm_policy_device_change_check): re-enable the wireless device change
checking code; insted of checking for SSIDs, check for the same
connection instead
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2839 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Implement deferred activation support in the device class.
* src/nm-device-interface.c
src/nm-device-interface.h
- (nm_device_interface_activate): take more arguments to support
deferred activation; callers must pass one of (connection) OR
(service_name, connection_path)
- (impl_device_activate): connection validation is punted to the device
to be able to handle deferred activation. Yes, this means errors
don't get returned from the Activate() dbus call, and yes, that
should be fixed somehow later.
* src/nm-device.c
src/nm-device.h
- (clear_act_request): clear additional deferred activation stuff too
- (deferred_activation_timeout_cb): new function; clean up when
deferred activation times out.
- (deferred_activation_start_cb): new function; when the connection
finally becomes available, start device activation
- (nm_device_activate): attach to the right signals of the activation
request if we need to defer activation until the connection is valid
* src/NetworkManagerPolicy.c
- (nm_policy_device_change_check): update for additional arguments
required for nm_device_interface_activate(). Pass NULL for these
though because this function already knows exactly which
NMConnection to use
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2812 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* include/NetworkManager.h
- Kill NMNetworkType; AP types don't matter any more
* src/NetworkManagerAPList.c
src/NetworkManagerAPList.h
src/Makefile.am
- Kill; NMAccessPointList has outlived it's usefulness
* src/NetworkManagerAP.c
src/NetworkManagerAP.h
- (match_cipher, security_compatible, nm_ap_check_compatible): new
functions; check if an NMConnection object is compatible with the
settings of this AP
- (freq_to_channel, channel_to_freq): utility functions for
channel <-> frequency conversion
* src/nm-device.c
src/nm-device.h
- (nm_device_get_best_connection): pass the specific object around
(which might be the object path of a specific AP to connect to).
The get_best_connection() call should populate this on return
if needed (wireless does).
* src/nm-device-802-3-ethernet.c
- (real_get_best_connection): handle specific_object argument
* src/NetworkManager.c
src/NetworkManagerMain.h
- Remove unused includes
* src/nm-device-802-11-wireless.c
src/nm-device-802-11-wireless.h
- Convert the ap_list into a GSList from an NMAccessPointList
- No need for caching the 'activation_ap' since this is now determined
from the specific_object of the activation request, which is
populated from the get_best_connection() call or from a user request
- (nm_device_802_11_wireless_update_bssid): fix warning
- (get_wireless_capabilities): fix error message format arguments
- (nm_device_802_11_wireless_copy_allowed_to_dev_list): remove, unused
- (find_best_connection, real_get_best_connection): implement
- (ap_list_get_ap_by_ssid, nm_device_802_11_wireless_ap_list_print):
move here from NetworkManagerAPList
- (ap_need_secrets): remove; moved to nm-connection.c where it belongs
- (real_act_stage1_prepare): just ensure an AP exists, connection is
already verified earlier
- (real_act_stage2_config): use nm_connection_need_secrets()
* src/NetworkManagerPolicy.c
- (nm_policy_auto_get_best_device): handle specific objects
- (create_connection): remove; automatic connection creation functionality
is handled by the Connection objects
- (nm_policy_device_change_check): handle specific_object
* libnm-util/nm-connection.c
- (wireless_sec_need_secrets, nm_connection_need_secrets): implement
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2778 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* introspection/nm-device.xml
- The 'Activate' method now takes 3 arguments, a service name for the
settings service (user or system), the object path of the connection
to activate, and the specific object to activate, if any
* src/nm-device-interface.c
- (nm_device_interface_error_quark, nm_device_interface_error_get_type):
Add error bits
- (impl_device_activate): adapt to new Activate arguments; validate
the service name and get the Connection object from the NMManager
before starting to activate the device with the specified connection
* src/nm-device-802-3-ethernet.c
- (real_get_best_connection): find the best connection, or create a
default one if no existing connections can be used
* src/NetworkManagerPolicy.c
- (nm_policy_auto_get_best_device): Get the device's best connection
and only pick the device if it has one
- (nm_policy_device_change_check): disable wireless bits for now until
wireless get_best_connection() can be implemented (replacing "best_ap");
don't create a default connection here as the device subclass will do
that if needed
* src/nm-manager.h
src/nm-manager.c
- (nm_manager_get): make NMManager a singleton and expose the getter
internally
- Rework internal NMManager connection handling to use the same
routines for both the system and user settings services. Most calls
take a new NMConnectionType argument specifying either system or user
connections
- (nm_manager_get_connection_by_object_path): new function; get a
connection keyed on its object path
* src/NetworkManager.c
- (main): use nm_manager_get()
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2776 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/Makefile.am
src/NetworkManagerDbus.c
src/NetworkManagerDbus.h
src/vpn-manager/nm-dbus-vpn.c
- Remove, no longer necessary. Move last bits to the only place its
used, in nm-dbus-vpn.c
* src/NetworkManagerAPList.c
src/nm-device.c
src/NetworkManager.c
src/nm-device-802-11-wireless.c
src/vpn-manager/nm-vpn-manager.c
src/vpn-manager/nm-vpn-service.c
src/NetworkManagerPolicy.c
src/nm-manager.c
- Remove usage of NetworkManagerDbus.h, and kill the obfuscation
that was message_is_error()
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2757 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-util/nm-setting.h
libnm-util/nm-setting.c
libnm-util/nm-connection.c
src/NetworkManagerPolicy.c
- 'info' settings object should be 'connection' says the spec
at NetworkManagerConfigurationSpecification
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2746 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerAP.c
src/NetworkManagerAP.h
- Remove 'fallback' tag, to be replaced by NMConnection/NMSettings
'autoconnect' property instead
* src/NetworkManager.c
src/NetworkManagerMain.h
src/NetworkManagerPolicy.c
src/NetworkManagerPolicy.h
- Remove the 'allowed_ap_list', which should be replaced by
NMConnection/NMSettings instead, since _those_ are the allowed
things that NM can connect to
* src/nm-device-802-11-wireless.c
- Remove both allowed_ap_list usage and 'fallback' checking
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2740 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Remove NMAPSecurity objects, they are replaced with flags on the APs for
each AP's capabilities, and by NMConnection/NMSettings objects for user
defined connections.
* include/NetworkManager.h
- Redefine 802.11 security properties. There are now device capabilities
and AP flags and AP security flags. It was way to unclear before.
* src/Makefile.am
src/nm-ap-security-leap.h
src/nm-ap-security-leap.c
src/nm-ap-security-wpa-eap.c
src/nm-ap-security-wpa-eap.h
src/nm-ap-security-private.h
src/nm-ap-security-wpa-psk.c
src/nm-ap-security-wpa-psk.h
src/nm-ap-security-wep.c
src/nm-ap-security-wep.h
src/nm-ap-security.c
src/nm-ap-security.h
- Removed, to be replaced with NMConnection/NMSettings objects
* src/nm-dbus-nmi.c
src/nm-dbus-nmi.h
- Removed, to be replaced by code that talks to the new info daemon
interface and gets NMConnection/NMSettings objects
* src/backends/NetworkManagerSuSE.c
- Remove usage of NMAPSecurity; should be replaced by a system-level
info-daemon that does the same thing but talks the new info-daemon
D-Bus interface
* src/NetworkManagerAP.h
src/NetworkManagerAP.c
src/NetworkManagerAPList.c
libnm-glib/libnm-glib-test.c
- Remove usage of NMAPSecurity objects and adjust to new flags for
WPA/RSN
* libnm-glib/nm-access-point.c
libnm-glib/nm-access-point.h
introspection/nm-access-point.xml
test/nm-tool.c
- Adjust to new flags for AP security
* utils/nm-utils.c
utils/nm-utils.h
src/vpn-manager/nm-dbus-vpn.c
- Remove D-Bus pending call stuff from nm-utils and put it in the VPN
stuff which is the only place it's used
* src/nm-device-interface.c
src/nm-device-interface.h
introspection/nm-device.xml
src/nm-activation-request.c
src/nm-activation-request.h
src/nm-device.c
- Add a new 'specific_object' argument that hints to NM what actual
AP or other device-specific thing the connection should apply to.
NMConnection objects can apply to more than one actual device/AP.
* libnm-util/nm-connection.c
* libnm-util/nm-connection.h
- Add 'have_secrets" call stubs
* libnm-util/cipher.h
- Move NM_AUTH_TYPE_* defines here for now
* src/nm-device-802-11-wireless.c
- Remove usage of NMAPSecurity, to be replaced with NMConnection/
NMSettings objects
* src/NetworkManagerDbus.c
* src/NetworkManagerPolicy.c
- Remove usage of update_allowed_networks, should be pushing data in
a different manner
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2738 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
It's 2007. Remove support for drivers that don't support wireless scanning.
* test/nm-tool.c
include/NetworkManager.h
src/NetworkManagerUtils.c
src/NetworkManagerPolicy.c
src/nm-device-802-11-wireless.c
- Remove special handling for non-scanning devices and mark them
as unsupported/unhandled
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2726 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
(force-commit to fix wrong comment and partial commit of r2685; this
commit actually applies to r2685)
* src/NetworkManagerUtils.c
- (nm_utils_same_ssid): add "ignore_trailing_null" parameter which
ignores trailing nulls in the SSID to work around mismatches in
expectations between WEXT and what the info-daemon passes back. The
info-daemon would pass back the correct length, but due to the
ESSID length issues with WEXT 22 and greater and wpa_supplicant,
the device would always have an SSID + 1 depending on what versions
of wpa_supplicant, the kernel, and NM you have. This was most often
visible by just quitting the applet and relaunching, which caused
NM to reassociated to the same network over again when reloading
the save networks.
* src/NetworkManagerPolicy.c
src/NetworkManagerUtils.h
src/nm-device-802-11-wireless.c
- Update for new parameter to nm_utils_same_ssid()
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2686 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerUtils.c
- (nm_utils_escape_ssid): add "ignore_trailing_null" parameter which
ignores trailing nulls in the SSID to work around mismatches in
expectations between WEXT and what the info-daemon passes back. The
info-daemon would pass back the correct length, but due to the
ESSID length issues with WEXT 22 and greater and wpa_supplicant,
the device would always have an SSID + 1 depending on what versions
of wpa_supplicant, the kernel, and NM you have. This was most often
visible by just quitting the applet and relaunching, which caused
NM to reassociated to the same network over again when reloading
the save networks.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2685 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerPolicy.c
- (nm_policy_device_change_check): fix policy to deactivate old device
before activating new one, at least until the multiple active
device support lands
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2668 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device.c (nm_device_state_changed): Emit the signal before handling it
because the handling code will cause the next state change and signal listeners
get the signals in wrong order.
* src/NetworkManagerPolicy.c (nm_policy_device_change_check): Get the "old_dev"
correctly in case of pending activation.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2593 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device-802-11-wireless.c (nm_device_802_11_wireless_set_activation_ap):
Convert the essid byte array to string correctly, including the terminating NULL.
* src/NetworkManagerPolicy.c (create_connection): Create wireless ssid and
mode with correct types.
* src/nm-dbus-nmi.c (nm_dbus_get_user_key_for_network): Fix a typo, pass the
constructed info to dbus call instead of the activation request.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2592 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-glib/Makefile.am: Link with libnm-util to gain access to
NMConnection.
* libnm-glib/nm-device-802-11-wireless.c:
(nm_device_802_3_ethernet_activate): Remove.
* libnm-glib/nm-device-802-3-ethernet.c
(nm_device_802_3_ethernet_activate): Remove.
* libnm-glib/nm-device.c (nm_device_activate): Implement.
* src/nm-device-802-3-ethernet.c: Implement the new activation using
NMConnection.
* src/nm-device-802-11-wireless.c: Store an activation AP once the
activation has started.
Implement the new activation using NMConnection.
* src/nm-activation-request.c: Store a generic connection object instead
of a wireless-specific AP.
* src/NetworkManagerPolicy.c (create_connection): Implement. Depending
on device type, create a device specific connection object suitable for
device activation.
* src/nm-device.c (nm_device_activate): Re-implement. Call the device
specific check to validate the connection and on success start the
activation.
* src/nm-device-interface.h: Add a activate virtual function to the
interface definition.
* src/nm-device-interface.c (nm_device_interface_activate): Implement.
(impl_device_activate): Implement.
* introspection/nm-device.xml: Add a generic device activation interface
that accepts an abstract NMConnection structure that has device-specific
information in it.
* introspection/nm-device-802-3-ethernet.xml: Remove the wired-specific
activation interface.
* introspection/nm-device-802-11-wireless.xml: Remove the wireless-specific
activation interface.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2569 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-glib/nm-device-802-11-wireless.c
(nm_device_802_11_wireless_get_capabilities): Implement.
* libnm-glib/nm-device.c (nm_device_get_capabilities): Implement.
* src/nm-device-802-11-wireless.c: Add "WirelessCapabilities" property.
* src/named-manager/nm-named-manager.c (remove_one_zone_from_named): Unref the
reply only if it's not NULL. Not sure why this started happening right now.
* src/nm-manager.c (device_stop_and_free): Remove. No need to have different
code paths for when devices get removed on shutdown or when a device is just
removed.
(finalize): Don't use a g_slist_foreach() when removing devices, the list data
gets freed so any signal from a device (disconnected for instance) would invoke
NMState update which would crash.
(nm_manager_remove_device): Bring the device down when it gets removed.
* src/NetworkManagerPolicy.c (nm_policy_auto_get_best_device): Remove
the unused dev_type.
* src/nm-hal-manager.c (create_device_and_add_to_list): Don't keep the
reference to the added device, NMManager will own it (if it wants).
* test/nm-tool.c: Rewrite using libnm-glib.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2417 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-glib/nm-device-802-11-wireless.c: Cache networks (bssids) list.
We get signalled when it changes.
* libnm-glib/nm-client.c: Cache NMState and device list, we get signalled
when it changes.
* libnm-glib/nm-device.c: Cache the device state property.
* libnm-glib/nm-access-point.c: Cache the strength property.
* src/nm-device-802-11-wireless.c: Fix wireless device scanning scheduler.
The new algorithm is to start from SCAN_INTERVAL_MIN (currently defined as 0)
and add a SCAN_INTERVAL_STEP (currently 20 seconds) with each successful scan
until SCAN_INTERVAL_MAX (currently 120 seconds) is reached. Do not scan while
the device is down, activating, or activated (in case of A/B/G cards).
Remove some old dead ifdef'ed out code that used to configure wireless devices,
it's all done through supplicant now.
* src/supplicant-manager/nm-supplicant-interface.c: Fix the reference
counting issues with pending calls which caused leaks and crashes when
interface was removed (now that the interface actually gets removed).
* src/nm-call-store.c: Make a copy of data before running a foreach
with user callback on it - The most common usage pattern is to cancel
(and thus remove) all pending calls with foreach which would modify
the hash table we're iterating over.
* src/nm-manager.c: When a device is added, make sure it is "up". When
it's removed or disabled due to disabling wireless or networking, bring
it down.
* include/NetworkManager.h: Add new device state NM_DEVICE_STATE_DOWN.
* src/nm-device-802-11-wireless.c:
* src/nm-device-802-3-ethernet.c:
* src/nm-device.c:
- Remove "init" virtual function, all gobjects have a place for that
already (constructor).
- Replace "start" virtual function with "bring_up", devices can be
brought up and down more than just on startup now.
- Add "is_up" virtual function.
- Implement one way to bring a device down instead of previous 4 different
ways, each of witch did something different.
* src/NetworkManagerUtils.c (nm_dev_sock_open): This doesn't need an NMDevice,
all it needs is the device interface.
Get rid of NMData.dev_list (3 members to go).
Get rif of NMData in a lot of places.
* gnome/libnm_glib/libnm_glib.c: Make it compile again.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2395 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-glib/nm-device-802-11-wireless.c: Add "network-added" and
"network-removed" signals.
* libnm-glib/libnm-glib.pc.in: Require NetworkManager >= 0.7.0.
* libnm-glib/nm-access-point.c: Add "strength-changed" signal, emit it
when receiving the signal from dbus.
* src/nm-device-802-11-wireless.c (get_property): Fix PROP_ACTIVE_NETWORK
property.
* src/NetworkManagerPolicy.c (state_changed): Fix a typo to make the
deactivation of the previously activated device working again.
* src/nm-activation-request.c: Remove NMActStage property and it's getter
and setter.
* src/nm-device.c (nm_device_is_activated): Remove.
state == NM_DEVICE_STATE_ACTIVATED is just as easy to use.
* include/NetworkManager.h: Remove NM_DBUS_NO_DEVICES_ERROR,
NM_DBUS_NO_DIALUP_ERROR, NM_DBUS_NO_NETWORKS_ERROR,
NM_DBUS_NO_ACTIVE_DEVICE_ERROR, NM_DBUS_NO_ACTIVE_NET_ERROR errors and
NM_DBUS_SIGNAL_STATE_CHANGE signal.
Remove NMNetworkStatus and NMActStage enums.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2345 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* 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
* introspection/nm-ip4-config.xml: Implement.
* libnm-glib/libnm-glib-test.c: Use new DBUS API in tests.
* libnm-glib/nm-ip4-config.c:
* libnm-glib/nm-ip4-config.c: Implement.
* src/nm-ap-security[-*]: Remove circular dependencies between APs and AP
securities. APs reference security.
* src/nm-device-802-11-wireless.c: Implement missing properties that need to
be exported over DBUS.
* src/nm-device-802-3-ethernet.c: Ditto.
* src/NetworkManagerAP.c:
* src/NetworkManagerAP.h:
- Convert to GObject, export over DBUS.
* src/nm-ip4-config.h:
* src/nm-ip4-config.h:
- Convert to GObject, export over DBUS.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2322 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device-802-11-wireless.c:
- Add "network-added" and "network-removed" signals.
- Use gobject boilerplate macros to define the GObject.
- Implement wireless device activation.
- Remove activation_failure_handler and activation_success_handler
and instead listen on state-changed signals and run the same code
from there.
* src/nm-device.c:
- Implment NMDeviceInterface::deactivate.
- Remove activation_failure_handler and activation_success_handler
virtual methods. Each device which is interested in these events
can just listen on it's state changed signals.
* src/NetworkManagerPolicy.c:
- Move a bit more NMData usage to NMManager.
- Remove activation scheduling bits.
- Add listeners for wireless device's "network-added" and
"network-removed" signals.
- Listen device changed signals and deactivate currently activated
device when another device start activating (for now).
- Remove (nm_policy_schedule_device_change_check): There's never a need
for calling this, the policy code knows exactly when this should happen,
by listening on events from NMManager and NMDevices.
* src/nm-device-802-3-ethernet.c (nm_device_802_3_ethernet_activate):
Implement.
* src/nm-dbus-nm.c (nm_dbus_nm_set_active_device): Call the activation
method on the specific device instead of going to through policy code
and determining the device type by passed in AP's existance.
* src/nm-device-interface.c (nm_device_interface_deactivate): Implement the
abstract NMDevice deactivation.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2298 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManager.c:
- Set up all the shiny new managers.
* src/NetworkManagerPolicy.c:
- Add the beginnings of new NMPolicy code. Instead of requireing all
classes to call into policy code, make the policy code kind of like
a supervisor that monitors what's going on and drives the whole NM.
* src/nm-hal-manager.c:
* src/nm-hal-manager.h:
- Collect all libhal code scattered around NM to this one class.
- Listen libhal and NMManager events and add/remove devices to
NMManager.
* src/nm-manager.c:
* src/nm-manager.h:
- Implment a replacement for NMData. NMData is now officially
deprecated.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2291 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Make NMDevice abstract class, remove almost all references to it's
subclasses (the last place gets removed with new policy manager). Add
NMDeviceInterface (which NMDevice implements) so that when we have
NMDevice exported over DBUS, there's a common NMDevice interface which
all instances have, plus there's a device specific interface for each
specific type.
Remove functions (nm_device_is_802_3_ethernet) and
(nm_device_is_802_11_wireless). There are already standard GObject macros
for type safe checks.
Use the updated supplican manager API.
* src/nm-device-interface.h:
* src/nm-device-interface.c:
* src/nm-call-store.h:
* src/nm-call-store.c: Implement.
* src/supplicant-manager/nm-supplicant-interface.c:
* src/supplicant-manager/nm-supplicant-interface.h:
* src/supplicant-manager/nm-supplicant-manager.c:
* src/supplicant-manager/nm-supplicant-manager.h:
- Remove all private data type references from public header files.
- Remove all references to other NM classes, this class is just a
proxy between wpa_supplicant and NM so it doesn't have to know
any internals.
- Convert to dbus-glib bindings.
- Type safe checks for public methods' arguments.
- Store pending DBUS call ids to NMCallStore.
* src/supplicant-manager/nm-supplicant-config.c:
- Store config values in a GHashTable instead of GSList.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2285 4912f4e0-d625-0410-9fb7-b9a5a253dbdc