NetworkManager/libnm-util/nm-utils.h

185 lines
5.3 KiB
C
Raw Normal View History

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
/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
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
/* NetworkManager -- Network link manager
*
* Ray Strode <rstrode@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* (C) Copyright 2005 Red Hat, Inc.
*/
#ifndef NM_UTILS_H
#define NM_UTILS_H
#include <glib.h>
#include <execinfo.h>
#include <dbus/dbus.h>
#include "nm-connection.h"
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
#define nm_print_backtrace() \
G_STMT_START \
{ \
void *_call_stack[512]; \
int _call_stack_size; \
char **_symbols; \
_call_stack_size = backtrace (_call_stack, \
G_N_ELEMENTS (_call_stack)); \
_symbols = backtrace_symbols (_call_stack, _call_stack_size); \
if (_symbols != NULL) \
{ \
int _i; \
_i = 0; \
g_critical ("traceback:\n"); \
while (_i < _call_stack_size) \
{ \
g_critical ("\t%s\n", _symbols[_i]); \
_i++; \
} \
free (_symbols); \
} \
} \
G_STMT_END
#define nm_get_timestamp(timestamp) \
G_STMT_START \
{ \
GTimeVal _tv; \
g_get_current_time (&_tv); \
*timestamp = (_tv.tv_sec * (1.0 * G_USEC_PER_SEC) + \
_tv.tv_usec) / G_USEC_PER_SEC; \
} \
G_STMT_END
#define nm_info(fmt, args...) \
G_STMT_START \
{ \
g_message ("<info> " fmt "\n", ##args); \
} G_STMT_END
#define nm_info_str(fmt_str, args...) \
G_STMT_START \
{ \
g_message ("<info> %s\n", fmt_str, ##args); \
} G_STMT_END
#define nm_debug(fmt, args...) \
G_STMT_START \
{ \
gdouble _timestamp; \
nm_get_timestamp (&_timestamp); \
g_debug ("<debug> [%f] %s(): " fmt "\n", _timestamp, \
G_STRFUNC, ##args); \
} G_STMT_END
#define nm_debug_str(fmt_str, args...) \
G_STMT_START \
{ \
gdouble _timestamp; \
nm_get_timestamp (&_timestamp); \
g_debug ("<debug> [%f] %s(): %s\n", _timestamp, \
G_STRFUNC, fmt_str, ##args); \
} G_STMT_END
#define nm_warning(fmt, args...) \
G_STMT_START \
{ \
g_warning ("<WARN> %s(): " fmt "\n", \
G_STRFUNC, ##args); \
} G_STMT_END
#define nm_warning_str(fmt_str, args...) \
G_STMT_START \
{ \
g_warning ("<WARN> %s(): %s\n", \
G_STRFUNC, fmt_str, ##args); \
} G_STMT_END
#define nm_error(fmt, args...) \
G_STMT_START \
{ \
gdouble _timestamp; \
nm_get_timestamp (&_timestamp); \
g_critical ("<ERROR>\t[%f] %s (): " fmt "\n", _timestamp, \
G_STRFUNC, ##args); \
nm_print_backtrace (); \
G_BREAKPOINT (); \
} G_STMT_END
#define nm_error_str(fmt_str, args...) \
G_STMT_START \
{ \
gdouble _timestamp; \
nm_get_timestamp (&_timestamp); \
g_critical ("<ERROR>\t[%f] %s (): %s\n", _timestamp, \
G_STRFUNC, fmt_str, ##args); \
nm_print_backtrace (); \
G_BREAKPOINT (); \
} G_STMT_END
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
/* SSID helpers */
gboolean nm_utils_is_empty_ssid (const guint8 * ssid, int len);
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
const char *nm_utils_escape_ssid (const guint8 *ssid, guint32 len);
gboolean nm_utils_same_ssid (const GByteArray * ssid1,
const GByteArray * ssid2,
gboolean ignore_trailing_null);
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
char *nm_utils_ssid_to_utf8 (const char *ssid, guint32 len);
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
GHashTable *nm_utils_gvalue_hash_dup (GHashTable *hash);
char *nm_utils_garray_to_string (GArray *array);
void nm_utils_slist_free (GSList *list,
GDestroyNotify elem_destroy_fn);
gboolean nm_utils_string_in_list (const char *str,
const char **valid_strings);
gboolean nm_utils_string_list_contains (GSList *list,
const char *string);
gboolean nm_utils_string_slist_validate (GSList *list,
const char **valid_values);
void nm_utils_register_value_transformations (void);
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
typedef enum {
NMU_SEC_INVALID = 0,
NMU_SEC_NONE,
NMU_SEC_STATIC_WEP,
NMU_SEC_LEAP,
NMU_SEC_DYNAMIC_WEP,
NMU_SEC_WPA_PSK,
NMU_SEC_WPA_ENTERPRISE,
NMU_SEC_WPA2_PSK,
NMU_SEC_WPA2_ENTERPRISE,
} NMUtilsSecurityType;
gboolean nm_utils_security_valid (NMUtilsSecurityType type,
guint32 dev_caps,
gboolean have_ap,
gboolean adhoc,
guint32 ap_flags,
guint32 ap_wpa,
guint32 ap_rsn);
gboolean nm_utils_ap_security_compatible (NMConnection *connection,
guint32 ap_flags,
guint32 ap_wpa,
guint32 ap_rsn,
guint32 ap_mode);
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
#endif /* NM_UTILS_H */