
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
135 lines
3.6 KiB
C
135 lines
3.6 KiB
C
/* 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>
|
|
|
|
#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
|
|
|
|
gchar *nm_dbus_escape_object_path (const gchar *utf8_string);
|
|
gchar *nm_dbus_unescape_object_path (const gchar *object_path);
|
|
|
|
char *nm_utils_ssid_to_utf8 (const char *ssid, guint32 len);
|
|
|
|
#endif /* NM_UTILS_H */
|