Commit Graph

992 Commits

Author SHA1 Message Date
Tambet Ingo
24adbe3fa4 2007-10-09 Tambet Ingo <tambet@gmail.com>
* src/NetworkManagerUtils.c
        (nm_utils_is_empty_ssid):
        (nm_utils_escape_ssid):
        (nm_utils_same_ssid): Remove. These functions are copied and
pasted in a 
        lot of places, so they belong to libnm-utils instead.

        Now with 100% less compiler warnings:

        * libnm-util/nm-utils.c (nm_dbus_escape_object_path): Remove,
        * unused.
        (nm_dbus_unescape_object_path): Ditto.
        (nm_utils_ssid_to_utf8): Ditto.
        (nm_utils_is_empty_ssid): Move here from
src/NetworkManagerUtils.c
        (nm_utils_escape_ssid): Ditto.
        (nm_utils_same_ssid): Ditto.

        * src/nm-manager.c: Include 'netinet/ether.h' for ether_aton_r.
        (add_one_connection_element): Remove an unused variable.
        (impl_manager_get_active_connections): Ditto.

        * src/NetworkManagerPolicy.c (get_device_connection): Remove an
        * unused
        variable.

        * src/nm-dbus-manager.c (nm_dbus_manager_start_service): Remove
        * a leftover
        from the previous commit.

        * src/nm-device-802-11-wireless.c (set_current_ap): Remove
        * unused variable.
        (real_act_stage1_prepare): Ditto.
        (activation_success_handler): Ditto.
        (get_property): Ditto.

        * src/nm-device-802-3-ethernet.c (real_get_best_connection):
        * Remove unused
        variable.

        * src/ppp-manager/nm-pppd-plugin.c (nm_ip_up): Remove the check
        * for 'ifname',
        it's always set.

        * src/supplicant-manager/nm-supplicant-config.c 
        (nm_supplicant_config_add_setting_wireless): Cast the
GByteArray's 'guint8 *'
        to expected "char *".
        (nm_supplicant_config_add_setting_wireless): Ditto.
        (nm_supplicant_config_remove_option): Remove, not used.

        * libnm-glib/libnm-glib-test.c (dump_access_point): Frequency is
        * a guint32,
        not double.
        (test_wireless_enabled): Ifdef out unused function.
        (device_deactivate): Ditto.
        (device_state_changed): Ditto.
        (nm_utils_is_empty_ssid): Remove, it's now in libnm-utils.
        (nm_utils_escape_ssid): Ditto.

        * test/nm-tool.c (nm_utils_escape_ssid): Remove, it's now in
        * libnm-utils.
        (nm_utils_is_empty_ssid): Ditto.

        * libnm-glib/nm-client.c
        * (nm_client_free_active_connection_element): Remove
        unused variable.

        * libnm-util/nm-setting.c (setting_wireless_destroy): Remove
        * unused variable.
        (setting_vpn_properties_update_secrets): Ditto.
        (int_to_gvalue): Ifdef out for now, not used.
        (byte_to_gvalue): Ditto.

        * libnm-util/dbus-dict-helpers.c
        * (_nmu_dbus_add_dict_entry_string_array): 
        Unused, remove.




git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2960 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-09 08:57:35 +00:00
Dan Williams
fb5f27bcdd 2007-10-06 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-connection.c
		- (gvalue_to_string): handle UINT64



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2946 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-06 13:23:44 +00:00
Dan Williams
a0e84d2f5a 2007-10-06 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-connection.c
	  libnm-util/nm-connection.h
		- (nm_connection_replace_settings): new function



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2940 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-06 04:25:48 +00:00
Dan Williams
80817ec8c4 2007-10-05 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.c
		- (setting_wireless_verify, setting_wireless_destroy): add seen_bssids
			to the NMSettingWireless table; it's now a string array not an array
			of byte arrays



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2938 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-06 02:33:17 +00:00
Dan Williams
bad019a1b5 2007-10-04 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-connection.c
	  libnm-util/nm-connection.h
		- (nm_connection_verify): new function



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2933 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-04 14:11:33 +00:00
Dan Williams
6829447903 2007-10-04 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.c
		- (nm_settings_verify): use #defines when possible rather than strings
		- (setting_connection_verify): ensure that 'name' and 'type' are valid
		- (setting_vpn_verify): tighter validity check on 'service_type'



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2932 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-04 14:09:59 +00:00
Dan Williams
b7e5539b8c 2007-10-01 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.h
		- Add a 'timestamp' option to NMSettingConnection
		- Add a UINT64 type

	* libnm-util/nm-setting.c
		- (uint64_to_gvalue): new function
		- (nm_setting_populate_from_hash, nm_setting_hash,
		   default_setting_clear_secrets): handle UINT64 type
		- con_table: add 'timestamp' member



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2923 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-02 01:50:59 +00:00
Dan Williams
50f2ce4fc8 2007-09-26 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.c
		- (setting_vpn_properties_update_secrets): implement so VPN secrets
			actually get updated when the user enters them



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2897 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-27 03:04:22 +00:00
Dan Williams
008bab498f 2007-09-25 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-connection.c
	  libnm-util/nm-connection.h
		- (nm_connection_clear_secrets): new function; clear secrets out of
			each NMSetting in an NMConnection

	* libnm-util/nm-setting.h
	  libnm-util/nm-setting.c
		- (nm_setting_clear_secrets, default_setting_clear_secrets): clear 
			secrets out of an NMSetting
		- (nm_setting_connection_new, nm_setting_ip4_config_new, 
		   nm_setting_wired_new, nm_setting_wireless_new,
		   nm_setting_wireless_security_new, nm_setting_ppp_new,
		   nm_setting_vpn_new, nm_setting_vpn_properties_new): set clear_secrets
			to default handler default_setting_clear_secrets()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2871 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-25 06:11:44 +00:00
Dan Williams
192e129734 2007-09-24 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.c
		- (verify_wep_key): 40-bit WEP keys are 10 bytes long, not 13



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2868 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-25 04:03:16 +00:00
Dan Williams
336def9492 2007-09-24 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-utils.h
	  libnm-util/nm-utils.c
		- (nm_dbus_send_with_callback_replied, nm_dbus_send_with_callback):
			remove, unused



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2862 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-24 14:46:05 +00:00
Dan Williams
d9b8a5e30b 2007-09-23 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.c
		- Correctly dispose of settings objects if creating them from a hash
			table fails



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2860 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-24 04:02:52 +00:00
Dan Williams
4a7fb5f0b3 2007-09-23 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.c
		- (property_value_destroy, nm_setting_vpn_properties_new): initialize
			the hash table in a standard manner.  Clients of libnm-util should
			only call g_hash_table_remove_all(), never destroy the hash table
			and recreate it.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2859 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-24 04:01:24 +00:00
Dan Williams
93b6fcea47 Fix build warnings
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2851 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-22 03:23:28 +00:00
Dan Williams
300b9e48eb 2007-09-20 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.c
		- (convert_strv_to_slist): dupe the values in the list because since
			the list is a boxed value, it'll get destroyed when it's container
			(like a hash table or whatever) gets destroyed



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2835 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-21 01:25:11 +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
Tambet Ingo
3f19c07885 2007-09-20 Tambet Ingo <tambet@gmail.com>
* libnm-util/nm-setting.h: Change the type of
        * NMSettingVPN->routes to
        GSList.

        * libnm-util/nm-setting.c (setting_vpn_destroy): Free routes
        * too.

        * src/nm-manager.c (connection_get_settings_cb): No need to use
        * weakref,
        just use (g_object_set_data_full).

        * src/vpn-manager/nm-vpn-connection.c
        * (nm_vpn_connection_get_routes): Now
        that NMSettingVPN->routes is a GSList, convert it to char **.
        (nm_vpn_connection_ip4_config_get): Free routes when done.
        (nm_vpn_connection_activate): Ditto.

        * src/nm-device-802-11-wireless.c
        * (real_connection_secrets_updated)
        (real_act_stage2_config): Use defined setting names.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2832 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-20 11:52:51 +00:00
Tambet Ingo
6746319495 2007-09-20 Tambet Ingo <tambet@gmail.com>
* libnm-util/nm-connection.c (register_default_creators): Use
        * defined
        setting names. Register NMSettingVPN and NMSettingVPNProperties.

        * libnm-util/nm-setting.c: Define property name strings, use
        * them.
        Implement NMSettingVPN and NMSettingVPNProperties settings.
        Implement NM_S_TYPE_GVALUE_HASH.
        (nm_setting_populate_from_hash): Handle NM_S_TYPE_GVALUE_HASH.
        (setting_connection_verify): Rename 'devtype' property to
'type'.

        * introspection/nm-vpn-manager.xml: Use NMConnection for VPN
        * service
        properties.

        * src/vpn-manager/nm-vpn-service.c: Ditto.

        * src/vpn-manager/nm-vpn-connection.c: Ditto.

        * src/vpn-manager/nm-vpn-manager.c (nm_vpn_manager_connect):
        * Ditto.
        (nm_vpn_manager_new): Remove NMManager argument, it's easy
enough to get.

        * src/nm-device-802-11-wireless.c (find_best_connection): Use
        * defined setting
        names. NMSettingConnection->devtype got renamed to 'type'.

        * src/nm-device-802-3-ethernet.c (find_best_connection):
        (real_get_best_connection): Ditto.

        * src/NetworkManager.c (main): Update the vpn manager creation
        * arguments.

        * libnm-glib/nm-vpn-manager.[ch]: Update.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2826 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-20 06:47:15 +00:00
Dan Williams
7535733df5 2007-09-16 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-connection.c
	  libnm-util/nm-connection.h
		- (nm_connection_for_each_setting_value): new function; iterate over
			each setting's value and call a user-provided function with details
			about that value

	* libnm-util/nm-setting.c
	  libnm-util/nm-setting.h
		- (nm_setting_enumerate_values): new function; enumerate the values
			of a specific NMSetting subclass for a user-provided function with
			details about that value
		- Change wep_tx_keyidx to a uint32
		- Create settings value tables for each setting defining their type,
			key name, offset into the NMSetting subclass' structure, and whether
			they are required and/or a secret
		- (nm_setting_populate_from_hash): generic function to populate an
			NMSetting from a GHash table, make all settings use it
		- (nm_setting_hash): generic function to derive a GHashTable from
			an NMSetting object, make all settings use it



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2823 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-16 12:47:14 +00:00
Dan Williams
b1336865b2 Remove debug stuff
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2817 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-15 01:35:38 +00:00
Dan Williams
40dcb05871 2007-09-14 Dan Williams <dcbw@redhat.com>
Remove unused stuff in libnm-util

	* configure.in
	  libnm-util/Makefile.am
	  libnm-util/cipher-private.h
	  libnm-util/cipher-wep-ascii.c
	  libnm-util/cipher-wep-ascii.h
	  libnm-util/cipher-wep-hex.c
	  libnm-util/cipher-wep-hex.h
	  libnm-util/cipher-wep-passphrase.c
	  libnm-util/cipher-wep-passphrase.h
	  libnm-util/cipher-wpa-psk-hex.c
	  libnm-util/cipher-wpa-psk-hex.h
	  libnm-util/cipher-wpa-psk-passphrase.c
	  libnm-util/cipher-wpa-psk-passphrase.h
	  libnm-util/cipher.c
	  libnm-util/cipher.h
	  libnm-util/dbus-helpers.c
	  libnm-util/dbus-helpers.h
	  libnm-util/gnome-keyring-md5.c
	  libnm-util/gnome-keyring-md5.h
	  libnm-util/sha1.c
	  libnm-util/sha1.h
	  src/nm-device-802-11-wireless.c
	  test/libnm-util/Makefile.am
	  test/libnm-util/test-ciphers.c
	  test/libnm-util/test-dbus-helpers.c
	  test/libnm-util/test-inputs.h
		- Removed



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2816 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-15 00:38:42 +00:00
Dan Williams
35433534be Remove dbus-method-dispatcher from makefile
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2815 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-15 00:25:47 +00:00
Dan Williams
d9b4ce4d2a 2007-09-14 Dan Williams <dcbw@redhat.com>
* libnm-util/dbus-method-dispatcher.c
	  libnm-util/dbus-method-dispatcher.h
		- Remove, unused



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2814 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-15 00:24:45 +00:00
Dan Williams
a0f0344809 Quiet warning; minimal checking in add_one_setting_to_hash()
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2809 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-14 19:32:59 +00:00
Dan Williams
f361475095 2007-09-13 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.c
		- (nm_setting_wired_new): set autonegotiate to TRUE by default



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2800 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-13 11:48:56 +00:00
Tambet Ingo
326d1e8679 2007-09-12 Tambet Ingo <tambet@gmail.com>
* src/vpn-manager/nm-vpn-connection.[ch]: 
        * src/vpn-manager/nm-vpn-manager.[ch]:
        * src/vpn-manager/nm-vpn-service.[ch]: Rewrite the vpn handling
        * code. Using 
        dbus-glib, GObjects, signals etc.

        * libnm-glib/nm-vpn-manager.[ch]: 
        * libnm-glib/nm-vpn-connection.[ch]: Now that the NM
        * implementation changed
        so much, rewrite these too.

        * libnm-glib/Makefile.am: Add new files to build, build new
        * binding files for
        the new introspection files.

        * libnm-glib/nm-client.[ch]: Remove all VPN related stuff from
        * here.

        * libnm-glib/nm-dbus-utils.[ch]: Renamed from nm-utils.[ch] that
        * was shadowing
        the header with the same name from libnm-utils.

        * libnm-glib/nm-vpn-plugin.[ch]: Implement.

        * libnm-util/Makefile.am: Add nm-utils.[ch] to build.

        * introspection/nm-vpn-plugin.xml: Implement.

        * introspection/nm-vpn-connection.xml: Implement.

        * introspection/nm-vpn-manager.xml: Implement.

        * src/NetworkManagerSystem.c
        * (nm_system_vpn_device_set_from_ip4_config): Remove
        the named manager argument, it can just as easily get it as the
caller.
        (nm_system_vpn_device_unset_from_ip4_config): Ditto.

        * src/vpn-manager/nm-dbus-vpn.[ch]: Remove.

        * src/nm-dbus-manager.h: Fix up the name_owner signal signature.

        * src/dhcp-manager/nm-dhcp-manager.c (garray_to_string): Remove,
        * use one from
        libnm-utils.

        * libnm-util/nm-connection.c: Ditto.

        * src/NetworkManagerMain.h: Remove, it's finally empty.

        * configure.in: Remove utils/ from build.

        * include/NetworkManagerVPN.h: Add some more defines to reduce
        * the amount
        of hard-coded strings.

        * utils/: Move it over to libnm-util.

        * test/Makefile.am: Link against libnm-util now that util/ is
        * gone.

        * dispatcher-daemon/Makefile.am: Ditto.

        * src/Makefile.am: Ditto.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2798 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-12 16:23:53 +00:00
Dan Williams
e705a7082e 2007-09-11 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-connection.c
		- (nm_connection_update_secrets, need_secrets_check): move
			802-11-wireless-security need_secrets checks to the setting object
			itself, where it belongs

	* libnm-util/nm-setting.c
	  libnm-util/nm-setting.h
		- (nm_setting_need_secrets): new function
		- (setting_wireless_security_verify,
		   nm_setting_wireless_security_new_from_hash): make 'key-mgmt' required
		- (setting_wireless_security_need_secrets): mostly copy code over
			from nm-connection.c



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2784 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-11 18:28:36 +00:00
Dan Williams
937d1add73 2007-09-11 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.c
	  libnm-util/nm-setting.h
		- (nm_setting_update_secrets): new function; add a virtual function that
			subclasses can implement to update their secrets
		- (setting_wireless_security_update_secrets): implement that function
			for the 802-11-wireless-security subclass

	* libnm-util/nm-connection.c
	  libnm-util/nm-connection.h
		- (nm_connection_update_secrets): update secrets for a Setting and
			emit a signal on success

	* src/nm-manager.c
	  src/nm-manager.h
	  src/nm-marshal.list
		- (connection_get_settings_cb): enable system settings bits
		- (nm_manager_get_connection_secrets, get_secrets_cb): add function
			to request secrets from the settings dbus service and to
			push those secrets to the NMConnection itself

	* src/nm-activation-request.c
	  src/nm-activation-request.h
		- Attach to the 'secrets-updated' signal of the NMConnection that's
			currently being activated, and proxy that signal to other listeners.
			Goes through the activation request because the activation request
			is the thing that manages the lifetime of the NMConnection that's
			being activated.

	* src/nm-device-802-11-wireless.c
		- (real_connection_secrets_updated): implement the connection secrets
			updated notification and restart activation when secrets are
			received
		- (real_act_stage2_config): request secrets from the settings dbus
			service if secrets are needed

	* src/nm-device.c
	  src/nm-device.h
		- (clear_act_request, nm_device_activation_cancel,
		   nm_device_deactivate_quickly, nm_device_dispose): consolidate places
			where the activation request is cleared
		- (nm_device_activate, connection_secrets_updated_cb): attach to the
			updated secrets signal of activation request and add a function
			that subclasses can override to handle it easily



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2782 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-11 18:02:27 +00:00
Dan Williams
4c028c7cef 2007-09-10 Dan Williams <dcbw@redhat.com>
* 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
2007-09-10 19:11:40 +00:00
Dan Williams
d1ac371963 2007-09-02 Dan Williams <dcbw@redhat.com>
* include/NetworkManager.h
	  libnm-glib/nm-settings.c
		- defines for the user settings daemon D-Bus bits

	* src/NetworkManager.c
		- Remove stuff that referred to the old NetworkManagerInfo service

	* src/vpn-manager/nm-dbus-vpn.h
		- Move old NMI defines to the only place they are used still

	* libnm-util/nm-connection.c
	  libnm-util/nm-connection.h
	  src/nm-activation-request.c
		- Make NMConnection a GObject subclass so we can do spiffy stuff with it

	* src/nm-manager.c
	  src/nm-manager.h
		- Get connections and their settings from the user settings daemon
			at the appropriate times



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2763 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-03 01:12:23 +00:00
Dan Williams
074dfc3f56 2007-09-02 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.c
		- (nm_settings_verify): correct setting name is 'connection', not 'info'
		- (setting_wireless_hash): set the right value on the item



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2762 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-03 01:08:34 +00:00
Dan Williams
6cc9c20a9f Compile libnm-util with PIC
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2761 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-03 01:07:10 +00:00
Dan Williams
05add38724 2007-08-30 Dan Williams <dcbw@redhat.com>
* libnm-util/sha1.c
		- Include config.h to get defines for endiannes (gnome.org #420216)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2753 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-30 14:07:22 +00:00
Dan Williams
d596c6113b SSID is a required setting
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2750 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-30 03:34:12 +00:00
Dan Williams
5106f2451c Don't segfault on NULL settings values
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2749 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-30 03:15:52 +00:00
Dan Williams
fdbfbc1d6e connection setting must have at least name and type
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2748 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-30 03:15:32 +00:00
Dan Williams
9aab44b772 2007-08-29 Dan Williams <dcbw@redhat.com>
* 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
2007-08-29 21:27:52 +00:00
Dan Williams
7a8f33aa3d 2007-08-28 Dan Williams <dcbw@redhat.com>
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
2007-08-28 14:47:31 +00:00
Tambet Ingo
b1e15de652 2007-08-15 Tambet Ingo <tambet@gmail.com>
* src/ppp-manager: Implement ppp-manager. It's sort of dead code
        * for now since
        nothing is using it at the moment, but it'll be all useful and
stuff later on.

        * libnm-util/nm-setting.h: Define NMSettingPPP.

        * libnm-util/nm-setting.c: Implement NMSettingPPP.

        * libnm-util/nm-connection.c (register_default_creators):
        * Register ppp setting.

        * src/Makefile.am: Add ppp-manager to SUBDIRS.

        * configure.in: Require ppp headers. Build Makefile for
        * ppp-manager.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2695 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-15 14:30:06 +00:00
Tambet Ingo
6a68d79c08 2007-08-09 Tambet Ingo <tambet@gmail.com>
[Based on patch by Helmut Schaa <hschaa@suse.de>]

        * libnm-glib/nm-client.h:
        * libnm-glib/nm-object.h:
        * libnm-glib/nm-vpn-connection.h:
        * libnm-glib/nm-settings.h:
        * libnm-glib/nm-device.h:
        * libnm-glib/nm-ip4-config.h:
        * libnm-glib/nm-access-point.h:
        * libnm-glib/nm-device-802-3-ethernet.h:
        * libnm-util/nm-setting.h: 
        * libnm-util/nm-connection.h: Add G_BEGIN_DECLS / G_END_DECLS to
        * support C++.

        * libnm-glib/nm-object.c (nm_object_get_byte_property):
        * Implement.

        * libnm-glib/nm-access-point.c: Strength has type char.

        * gnome/vpn-properties/Makefile.am: Remove
        * GNOME_DISABLE_DEPRECTATED for now
        to fix build. GnomeDruid is deprecated in recent libgnomeui.

        * introspection/nm-access-point.xml: Strength property is char,
        * not int.

        * src/NetworkManagerAP.c (set_property): Set strength from char.
        (get_property): Handle hidden APs (with empty SSID).
        Get strength value from char.
        (nm_ap_class_init): Strength property has char type.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2659 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-09 09:19:57 +00:00
Tambet Ingo
636b1140c5 2007-06-21 Tambet Ingo <tambet@ximian.com>
* libnm-glib/Makefile.am: Add NMObject to build, remove nm-utils.[ch].

	* nm-utils.[ch]: Remove.

	* libnm-glib/nm-object.c: Implement a base class for all libnm-glib dbus-aware
	objects for easy property access and dbus connection handling.

	* libnm-glib/nm-client.c: Derive from NMObject.

	* libnm-glib/nm-device.c: Ditto.

	* libnm-glib/nm-device-802-3-ethernet.c: Changes for being based on NMObject.

	* libnm-glib/nm-device-802-11-wireless.c: Ditto.

	* libnm-glib/nm-ip4-config.c: Ditto.

	* libnm-glib/nm-access-point.c: Ditto.

	* libnm-util/nm-connection.c (nm_connection_compare): Add a stub for connection
	comparision. Currently used by the device activation code to determine if the new
	activation is the same as the old one.

	* src/nm-dbus-nmi.c (nm_dbus_get_user_key_for_network): Don't use the obsolete and
	wrong way of getting the dbus path for AP. Fixes the issue where the applet isn't
	able to ask password for the AP.

	* src/nm-device.c (nm_device_activate): Change the logic here - instead of giving
	up if the device is already connected, tear down it's connection (if it isn't the
	same as new one) and start the activation.

	* src/nm-manager.c: Add the beginnings of NMConnection storage and signals.

	* src/NetworkManagerAP.c (nm_ap_init): Set the default values to AP memebers, fixes
	the issue where all APs are always listed as encrypted.

	* src/NetworkManagerDbus.c (nm_dbus_get_object_path_for_network): Remove. APs have
	their own registered paths.

	* test/nm-tool.c (detail_device): Don't try to get active network from wireless
	device if it's not connected - dbus-glib will happily crash trying to marshal NULL.




git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2615 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-06-22 15:09:02 +00:00
Tambet Ingo
d6cf3940cd 2007-06-08 Tambet Ingo <tambet@ximian.com>
* libnm-util/nm-setting.c: Implement NMSettingWirelessSecurity.

	* libnm-util/nm-connection.c (register_default_creators): Register wireless security
	setting.
	(gvalue_to_string): Recognize G_TYPE_UCHAR and GSList.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2581 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-06-08 05:47:12 +00:00
Tambet Ingo
5623bf965b 2007-06-06 Tambet Ingo <tambet@ximian.com>
* libnm-util/nm-setting.c: Get rid of dump virtual functions, that can happen
	automagically.
	Implement NMSettingIP4Config.
	Finish NMSettingWired by adding all known members.
	(setting_wired_verify): Implement.
	Finish NMSettingWireless by adding all known members.
	(setting_wireless_verify): Implement.

	* libnm-util/nm-connection.c: Register "ipv4" setting.
	(nm_connection_dump): Implement. Instead of requiring every NMSetting to implement
	dump function, we can introspect the GHashTable which is used for sending connections
	over dbus.

	* src/nm-device-802-11-wireless.c (nm_device_802_11_wireless_set_activation_ap):
	Take GByteArray for essid, it's really not a string.

	* src/nm-device.c (real_act_stage3_ip_config_start): Get information from NMSettings.
	Start DHCP request if setting is not passed or if it states that DHCP should be used.
	(real_act_stage4_get_ip4_config): If settings are provided, use them, even if it
	means overriding the values we got from DHCP.
	(real_activation_cancel_handler): Cancel DHCP transaction only if it has started, doh.
	(nm_device_deactivate_quickly): Ditto.

	* src/nm-device-interface.c (impl_device_activate): Dump the connection structure
	for debugging.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2577 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-06-06 13:33:51 +00:00
Tambet Ingo
6c51badc69 2007-05-07 Tambet Ingo <tambet@ximian.com>
* libnm-util/nm-connection.c: 
	* libnm-util/nm-connection.h: 
	* libnm-util/nm-setting.c:
	* libnm-util/nm-setting.h: Add.

	* libnm-util/Makefile.am: Build the added files.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2568 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-05-07 14:39:20 +00:00
Dan Williams
ca666cc549 2007-01-26 Dan Williams <dcbw@redhat.com>
* libnm-util/dbus-dict-helpers.c
	  libnm-util/dbus-dict-helpers.h
		- Coordinate style with wpa_supplicant version to minimize diff
		- Add uint32 array support
		- (nmu_dbus_dict_append_uint32_array): new function
		- (nmu_dbus_dict_begin_string_array, nmu_dbus_dict_string_array_add_element,
		   nmu_dbus_dict_end_string_array): bring over from wpa_supplicant
			version; allow adding string array elements individually

	* test/libnm-util/test-dbus-dict-helpers.c
		- Test uint32 arrays



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2249 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-01-27 01:19:08 +00:00
Dan Williams
664b97dbf3 2006-12-18 Dan Williams <dcbw@redhat.com>
* libnm-util/dbus-dict-helpers.c
		- (_nmu_dbus_dict_entry_get_array, _nmu_dbus_dict_entry_get_string_array,
		   _nmu_dbus_dict_entry_get_byte_array): replace usage of
		   dbus_message_iter_get_array_len()  (Gnome.org #382898)


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2189 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-12-18 17:26:34 +00:00
Dan Williams
b41ab0a3c9 Check for failed allocation and return
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2183 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-12-13 17:54:31 +00:00
Dan Williams
54d307a268 Install dbus-dict-helpers.h as a public header for libnm-util
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2058 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-10-13 18:31:39 +00:00
Dan Williams
5ce596672e Need sys/types.h for size_t
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2021 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-09-07 15:45:25 +00:00
Dan Williams
3c10e4401f 2006-07-13 Dan Williams <dcbw@redhat.com>
Patch from Thiago Bauermann <thiago.bauermann@gmail.com>
	* gnome/applet/applet.glade
	  gnome/applet/Makefile.am
	  gnome/applet/nm-gconf-wso.c
	  gnome/applet/nm-gconf-wso-leap.c
	  gnome/applet/nm-gconf-wso-leap.h
	  gnome/applet/wireless-security-manager.c
	  gnome/applet/wso-leap.c
	  gnome/applet/wso-leap.h
	  include/NetworkManager.h
	  libnm-util/dbus-helpers.c
	  libnm-util/dbus-helpers.h
	  src/Makefile.am
	  src/NetworkManagerAP.c
	  src/nm-ap-security.c
	  src/nm-ap-security-leap.c
	  src/nm-ap-security-leap.h
		- Add LEAP authentication support


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1881 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-07-13 17:03:31 +00:00