diff --git a/.gitignore b/.gitignore index 6a9d0a657f..2df9a0d4b0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.o *.lo *.la +*.bz2 Makefile Makefile.in* configure @@ -22,24 +23,47 @@ autom4te.cache intltool-* gtk-doc.make TAGS +COPYING +INSTALL +*.pc +man/*.[185] +po/*.gmo +po/.intltool-merge-cache + +docs/libnm-glib/*.stamp docs/libnm-glib/html/ docs/libnm-glib/tmpl/ docs/libnm-glib/xml/ docs/libnm-glib/libnm-glib-*.txt +docs/libnm-glib/libnm-glib.args +docs/libnm-glib/libnm-glib.hierarchy +docs/libnm-glib/libnm-glib.interfaces +docs/libnm-glib/libnm-glib.prerequisites +docs/libnm-glib/libnm-glib.signals + +docs/libnm-util/*.stamp docs/libnm-util/html/ docs/libnm-util/tmpl/ docs/libnm-util/xml/ docs/libnm-util/libnm-util-*.txt -COPYING -INSTALL -*.pc -man/*.[18] -po/*.gmo +docs/libnm-util/libnm-util-decl-list.txt.bak +docs/libnm-util/libnm-util-decl.txt.bak +docs/libnm-util/libnm-util.args +docs/libnm-util/libnm-util.hierarchy +docs/libnm-util/libnm-util.interfaces +docs/libnm-util/libnm-util.prerequisites +docs/libnm-util/libnm-util.signals +docs/libnm-util/libnm-util.types + +docs/generate-settings-spec +docs/settings-spec.html +docs/spec.html callouts/nm-dhcp-client.action callouts/nm-avahi-autoipd.action callouts/nm-dispatcher.action callouts/org.freedesktop.nm_dispatcher.service +callouts/nm-modem-probe dispatcher-daemon/NetworkManagerDispatcher initscript/*/NetworkManagerDispatcher initscript/*/networkmanager-dispatcher @@ -53,8 +77,10 @@ nm-marshal.[ch] libnm-glib/libnm-glib-test src/NetworkManager src/nm-crash-logger +src/supplicant-manager/tests/test-supplicant-config system-settings/src/nm-system-settings system-settings/src/org.freedesktop.NetworkManagerSystemSettings.service +test/libnm-glib-test test/libnm_glib_test test/nm-online test/nm-tool @@ -62,8 +88,17 @@ test/nmtestdevices libnm-util/test-crypto libnm-util/tests/test-crypto libnm-util/tests/test-settings-defaults +libnm-util/tests/test-general +libnm-util/tests/test-need-secrets +libnm-util/tests/test-setting-8021x src/tests/test-dhcp-options +src/tests/test-policy-hosts + system-settings/plugins/keyfile/tests/test-keyfile +system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh +system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh-utils +system-settings/plugins/ifcfg-rh/tests/network-scripts/Test_Write_* +system-settings/plugins/ifcfg-rh/tests/network-scripts/*-Test_Write_* m4/gtk-doc.m4 m4/intltool.m4 @@ -72,3 +107,4 @@ m4/lt*.m4 policy/org.freedesktop.network-manager-settings.system.policy +cli/src/nmcli diff --git a/Makefile.am b/Makefile.am index cda6437ccf..7e34571218 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,20 +1,21 @@ -SUBDIRS = marshallers - -SUBDIRS += \ - libnm-util \ - libnm-glib \ - src \ - include \ - introspection \ - callouts \ - system-settings \ - tools \ - policy \ - initscript \ - test \ - po \ - man \ - docs +SUBDIRS = \ + marshallers \ + libnm-util \ + libnm-glib \ + src \ + include \ + introspection \ + callouts \ + system-settings \ + cli \ + tools \ + policy \ + initscript \ + test \ + po \ + man \ + docs \ + examples EXTRA_DIST = \ CONTRIBUTING \ diff --git a/autogen.sh b/autogen.sh index 74543732da..213fb08329 100755 --- a/autogen.sh +++ b/autogen.sh @@ -7,7 +7,7 @@ REQUIRED_AUTOMAKE_VERSION=1.9 PKG_NAME=NetworkManager (test -f $srcdir/configure.ac \ - && test -f $srcdir/src/NetworkManager.c) || { + && test -f $srcdir/src/main.c) || { echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" echo " top-level $PKG_NAME directory" exit 1 diff --git a/cli/Makefile.am b/cli/Makefile.am new file mode 100644 index 0000000000..f268924437 --- /dev/null +++ b/cli/Makefile.am @@ -0,0 +1,2 @@ +SUBDIRS = src + diff --git a/cli/src/Makefile.am b/cli/src/Makefile.am new file mode 100644 index 0000000000..572e122fb6 --- /dev/null +++ b/cli/src/Makefile.am @@ -0,0 +1,38 @@ +bin_PROGRAMS = \ + nmcli + +INCLUDES = \ + -I${top_srcdir} \ + -I${top_srcdir}/include \ + -I${top_builddir}/marshallers \ + -I${top_srcdir}/libnm-util \ + -I${top_srcdir}/libnm-glib + +nmcli_SOURCES = \ + connections.c \ + connections.h \ + devices.c \ + devices.h \ + network-manager.c \ + network-manager.h \ + settings.c \ + settings.h \ + nmcli.c \ + nmcli.h \ + utils.c \ + utils.h + +nmcli_CPPFLAGS = \ + $(DBUS_CFLAGS) \ + $(GLIB_CFLAGS) \ + -DNMCLI_LOCALEDIR=\"$(datadir)/locale\" \ + -DG_DISABLE_DEPRECATED + +nmcli_LDADD = \ + $(DBUS_LIBS) \ + $(GLIB_LIBS) \ + $(top_builddir)/marshallers/libmarshallers.la \ + $(top_builddir)/libnm-util/libnm-util.la \ + $(top_builddir)/libnm-glib/libnm-glib.la + + diff --git a/cli/src/connections.c b/cli/src/connections.c new file mode 100644 index 0000000000..e9aa597d11 --- /dev/null +++ b/cli/src/connections.c @@ -0,0 +1,1642 @@ +/* nmcli - command-line tool to control NetworkManager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * (C) Copyright 2010 Red Hat, Inc. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//#include +#include +#include +#include +#include +#include + +#include "utils.h" +#include "settings.h" +#include "connections.h" + + +/* Available fields for 'con status' */ +static NmcOutputField nmc_fields_con_status[] = { + {"NAME", N_("NAME"), 25, NULL, 0}, /* 0 */ + {"UUID", N_("UUID"), 38, NULL, 0}, /* 1 */ + {"DEVICES", N_("DEVICES"), 10, NULL, 0}, /* 2 */ + {"SCOPE", N_("SCOPE"), 8, NULL, 0}, /* 3 */ + {"DEFAULT", N_("DEFAULT"), 8, NULL, 0}, /* 4 */ + {"DBUS-SERVICE", N_("DBUS-SERVICE"), 45, NULL, 0}, /* 5 */ + {"SPEC-OBJECT", N_("SPEC-OBJECT"), 10, NULL, 0}, /* 6 */ + {"VPN", N_("VPN"), 5, NULL, 0}, /* 7 */ + {NULL, NULL, 0, NULL, 0} +}; +#define NMC_FIELDS_CON_STATUS_ALL "NAME,UUID,DEVICES,SCOPE,DEFAULT,VPN,DBUS-SERVICE,SPEC-OBJECT" +#define NMC_FIELDS_CON_STATUS_COMMON "NAME,UUID,DEVICES,SCOPE,DEFAULT,VPN" + +/* Available fields for 'con list' */ +static NmcOutputField nmc_fields_con_list[] = { + {"NAME", N_("NAME"), 25, NULL, 0}, /* 0 */ + {"UUID", N_("UUID"), 38, NULL, 0}, /* 1 */ + {"TYPE", N_("TYPE"), 17, NULL, 0}, /* 2 */ + {"SCOPE", N_("SCOPE"), 8, NULL, 0}, /* 3 */ + {"TIMESTAMP", N_("TIMESTAMP"), 12, NULL, 0}, /* 4 */ + {"TIMESTAMP-REAL", N_("TIMESTAMP-REAL"), 34, NULL, 0}, /* 5 */ + {"AUTOCONNECT", N_("AUTOCONNECT"), 13, NULL, 0}, /* 6 */ + {"READONLY", N_("READONLY"), 10, NULL, 0}, /* 7 */ + {NULL, NULL, 0, NULL, 0} +}; +#define NMC_FIELDS_CON_LIST_ALL "NAME,UUID,TYPE,SCOPE,TIMESTAMP,TIMESTAMP-REAL,AUTOCONNECT,READONLY" +#define NMC_FIELDS_CON_LIST_COMMON "NAME,UUID,TYPE,SCOPE,TIMESTAMP-REAL" + + +/* Helper macro to define fields */ +#define SETTING_FIELD(setting, width) { setting, N_(setting), width, NULL, 0 } + +/* Available settings for 'con list id/uuid ' */ +static NmcOutputField nmc_fields_settings_names[] = { + SETTING_FIELD (NM_SETTING_CONNECTION_SETTING_NAME, 0), /* 0 */ + SETTING_FIELD (NM_SETTING_WIRED_SETTING_NAME, 0), /* 1 */ + SETTING_FIELD (NM_SETTING_802_1X_SETTING_NAME, 0), /* 2 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SETTING_NAME, 0), /* 3 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, 0), /* 4 */ + SETTING_FIELD (NM_SETTING_IP4_CONFIG_SETTING_NAME, 0), /* 5 */ + SETTING_FIELD (NM_SETTING_IP6_CONFIG_SETTING_NAME, 0), /* 6 */ + SETTING_FIELD (NM_SETTING_SERIAL_SETTING_NAME, 0), /* 7 */ + SETTING_FIELD (NM_SETTING_PPP_SETTING_NAME, 0), /* 8 */ + SETTING_FIELD (NM_SETTING_PPPOE_SETTING_NAME, 0), /* 9 */ + SETTING_FIELD (NM_SETTING_GSM_SETTING_NAME, 0), /* 10 */ + SETTING_FIELD (NM_SETTING_CDMA_SETTING_NAME, 0), /* 11 */ + SETTING_FIELD (NM_SETTING_BLUETOOTH_SETTING_NAME, 0), /* 12 */ + SETTING_FIELD (NM_SETTING_OLPC_MESH_SETTING_NAME, 0), /* 13 */ + SETTING_FIELD (NM_SETTING_VPN_SETTING_NAME, 0), /* 14 */ + {NULL, NULL, 0, NULL, 0} +}; +#define NMC_FIELDS_SETTINGS_NAMES_ALL NM_SETTING_CONNECTION_SETTING_NAME","\ + NM_SETTING_WIRED_SETTING_NAME","\ + NM_SETTING_802_1X_SETTING_NAME","\ + NM_SETTING_WIRELESS_SETTING_NAME","\ + NM_SETTING_WIRELESS_SECURITY_SETTING_NAME","\ + NM_SETTING_IP4_CONFIG_SETTING_NAME","\ + NM_SETTING_IP6_CONFIG_SETTING_NAME","\ + NM_SETTING_SERIAL_SETTING_NAME","\ + NM_SETTING_PPP_SETTING_NAME","\ + NM_SETTING_PPPOE_SETTING_NAME","\ + NM_SETTING_GSM_SETTING_NAME","\ + NM_SETTING_CDMA_SETTING_NAME","\ + NM_SETTING_BLUETOOTH_SETTING_NAME","\ + NM_SETTING_OLPC_MESH_SETTING_NAME","\ + NM_SETTING_VPN_SETTING_NAME + + +typedef struct { + NmCli *nmc; + int argc; + char **argv; +} ArgsInfo; + +extern GMainLoop *loop; /* glib main loop variable */ + +static ArgsInfo args_info; + +/* static function prototypes */ +static void usage (void); +static void quit (void); +static void show_connection (NMConnection *data, gpointer user_data); +static NMConnection *find_connection (GSList *list, const char *filter_type, const char *filter_val); +static gboolean find_device_for_connection (NmCli *nmc, NMConnection *connection, const char *iface, const char *ap, + NMDevice **device, const char **spec_object, GError **error); +static const char *active_connection_state_to_string (NMActiveConnectionState state); +static void active_connection_state_cb (NMActiveConnection *active, GParamSpec *pspec, gpointer user_data); +static void activate_connection_cb (gpointer user_data, const char *path, GError *error); +static void get_connections_cb (NMSettingsInterface *settings, gpointer user_data); +static NMCResultCode do_connections_list (NmCli *nmc, int argc, char **argv); +static NMCResultCode do_connections_status (NmCli *nmc, int argc, char **argv); +static NMCResultCode do_connection_up (NmCli *nmc, int argc, char **argv); +static NMCResultCode do_connection_down (NmCli *nmc, int argc, char **argv); + +static void +usage (void) +{ + fprintf (stderr, + _("Usage: nmcli con { COMMAND | help }\n" + " COMMAND := { list | status | up | down }\n\n" + " list [id | uuid | system | user]\n" + " status\n" + " up id | uuid [iface ] [ap ] [--nowait] [--timeout ]\n" + " down id | uuid \n")); +} + +/* quit main loop */ +static void +quit (void) +{ + g_main_loop_quit (loop); /* quit main loop */ +} + +static gboolean +nmc_connection_detail (NMConnection *connection, NmCli *nmc) +{ + NMSetting *setting; + GError *error = NULL; + GArray *print_settings_array; + int i; + char *fields_str; + char *fields_all = NMC_FIELDS_SETTINGS_NAMES_ALL; + char *fields_common = NMC_FIELDS_SETTINGS_NAMES_ALL; + guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; + guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; + guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; + gboolean was_output = FALSE; + + if (!nmc->required_fields || strcasecmp (nmc->required_fields, "common") == 0) + fields_str = fields_common; + else if (!nmc->required_fields || strcasecmp (nmc->required_fields, "all") == 0) + fields_str = fields_all; + else + fields_str = nmc->required_fields; + + print_settings_array = parse_output_fields (fields_str, nmc_fields_settings_names, &error); + if (error) { + if (error->code == 0) + g_string_printf (nmc->return_text, _("Error: 'con list': %s"), error->message); + else + g_string_printf (nmc->return_text, _("Error: 'con list': %s; allowed fields: %s"), error->message, NMC_FIELDS_SETTINGS_NAMES_ALL); + g_error_free (error); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + return FALSE; + } + + nmc->allowed_fields = nmc_fields_settings_names; + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_MAIN_HEADER_ONLY; + nmc->print_fields.header_name = _("Connection details"); + nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTINGS_NAMES_ALL, nmc->allowed_fields, NULL); + print_fields (nmc->print_fields, nmc->allowed_fields); + + /* Loop through the required settings and print them. */ + for (i = 0; i < print_settings_array->len; i++) { + int section_idx = g_array_index (print_settings_array, int, i); + + if (nmc->print_output != NMC_PRINT_TERSE && !nmc->multiline_output && was_output) + printf ("\n"); /* Empty line */ + + was_output = FALSE; + + if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[0].name)) { + setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION); + if (setting) { + setting_connection_details (setting, nmc); + was_output = TRUE; + continue; + } + } + + if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[1].name)) { + setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED); + if (setting) { + setting_wired_details (setting, nmc); + was_output = TRUE; + continue; + } + } + + if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[2].name)) { + setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X); + if (setting) { + setting_802_1X_details (setting, nmc); + was_output = TRUE; + continue; + } + } + + if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[3].name)) { + setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS); + if (setting) { + setting_wireless_details (setting, nmc); + was_output = TRUE; + continue; + } + } + + if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[4].name)) { + setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY); + if (setting) { + setting_wireless_security_details (setting, nmc); + was_output = TRUE; + continue; + } + } + + if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[5].name)) { + setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG); + if (setting) { + setting_ip4_config_details (setting, nmc); + was_output = TRUE; + continue; + } + } + + if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[6].name)) { + setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG); + if (setting) { + setting_ip6_config_details (setting, nmc); + was_output = TRUE; + continue; + } + } + + if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[7].name)) { + setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_SERIAL); + if (setting) { + setting_serial_details (setting, nmc); + was_output = TRUE; + continue; + } + } + + if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[8].name)) { + setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_PPP); + if (setting) { + setting_ppp_details (setting, nmc); + was_output = TRUE; + continue; + } + } + + if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[9].name)) { + setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_PPPOE); + if (setting) { + setting_pppoe_details (setting, nmc); + was_output = TRUE; + continue; + } + } + + if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[10].name)) { + setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_GSM); + if (setting) { + setting_gsm_details (setting, nmc); + was_output = TRUE; + continue; + } + } + + if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[11].name)) { + setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_CDMA); + if (setting) { + setting_cdma_details (setting, nmc); + was_output = TRUE; + continue; + } + } + + if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[12].name)) { + setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_BLUETOOTH); + if (setting) { + setting_bluetooth_details (setting, nmc); + was_output = TRUE; + continue; + } + } + + if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[13].name)) { + setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_OLPC_MESH); + if (setting) { + setting_olpc_mesh_details (setting, nmc); + was_output = TRUE; + continue; + } + } + + if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[14].name)) { + setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_VPN); + if (setting) { + setting_vpn_details (setting, nmc); + was_output = TRUE; + continue; + } + } + } + + if (print_settings_array) + g_array_free (print_settings_array, FALSE); + + return NMC_RESULT_SUCCESS; +} + +static void +show_connection (NMConnection *data, gpointer user_data) +{ + NMConnection *connection = (NMConnection *) data; + NmCli *nmc = (NmCli *) user_data; + NMSettingConnection *s_con; + guint64 timestamp; + char *timestamp_str; + char timestamp_real_str[64]; + + s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION); + if (s_con) { + /* Obtain field values */ + timestamp = nm_setting_connection_get_timestamp (s_con); + timestamp_str = g_strdup_printf ("%" G_GUINT64_FORMAT, timestamp); + strftime (timestamp_real_str, sizeof (timestamp_real_str), "%c", localtime ((time_t *) ×tamp)); + nmc->allowed_fields[0].value = nm_setting_connection_get_id (s_con); + nmc->allowed_fields[1].value = nm_setting_connection_get_uuid (s_con); + nmc->allowed_fields[2].value = nm_setting_connection_get_connection_type (s_con); + nmc->allowed_fields[3].value = nm_connection_get_scope (connection) == NM_CONNECTION_SCOPE_SYSTEM ? _("system") : _("user"); + nmc->allowed_fields[4].value = timestamp_str; + nmc->allowed_fields[5].value = timestamp ? timestamp_real_str : _("never"); + nmc->allowed_fields[6].value = nm_setting_connection_get_autoconnect (s_con) ? _("yes") : _("no"); + nmc->allowed_fields[7].value = nm_setting_connection_get_read_only (s_con) ? _("yes") : _("no"); + + nmc->print_fields.flags &= ~NMC_PF_FLAG_MAIN_HEADER_ADD & ~NMC_PF_FLAG_MAIN_HEADER_ONLY & ~NMC_PF_FLAG_FIELD_NAMES; /* Clear header flags */ + print_fields (nmc->print_fields, nmc->allowed_fields); + + g_free (timestamp_str); + } +} + +static NMConnection * +find_connection (GSList *list, const char *filter_type, const char *filter_val) +{ + NMSettingConnection *s_con; + NMConnection *connection; + GSList *iterator; + const char *id; + const char *uuid; + + iterator = list; + while (iterator) { + connection = NM_CONNECTION (iterator->data); + s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION); + if (s_con) { + id = nm_setting_connection_get_id (s_con); + uuid = nm_setting_connection_get_uuid (s_con); + if (filter_type) { + if ((strcmp (filter_type, "id") == 0 && strcmp (filter_val, id) == 0) || + (strcmp (filter_type, "uuid") == 0 && strcmp (filter_val, uuid) == 0)) { + return connection; + } + } + } + iterator = g_slist_next (iterator); + } + + return NULL; +} + +static NMCResultCode +do_connections_list (NmCli *nmc, int argc, char **argv) +{ + GError *error1 = NULL; + GError *error2 = NULL; + char *fields_str; + char *fields_all = NMC_FIELDS_CON_LIST_ALL; + char *fields_common = NMC_FIELDS_CON_LIST_COMMON; + guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; + guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; + guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; + gboolean valid_param_specified = FALSE; + + nmc->should_wait = FALSE; + + if (!nmc->required_fields || strcasecmp (nmc->required_fields, "common") == 0) + fields_str = fields_common; + else if (!nmc->required_fields || strcasecmp (nmc->required_fields, "all") == 0) + fields_str = fields_all; + else + fields_str = nmc->required_fields; + + nmc->allowed_fields = nmc_fields_con_list; + nmc->print_fields.indices = parse_output_fields (fields_str, nmc->allowed_fields, &error1); + /* error1 is checked later - it's not valid for connection details */ + + if (argc == 0) { + if (!nmc_terse_option_check (nmc->print_output, nmc->required_fields, &error2)) + goto error; + if (error1) + goto error; + valid_param_specified = TRUE; + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_MAIN_HEADER_ADD | NMC_PF_FLAG_FIELD_NAMES; + nmc->print_fields.header_name = _("System connections"); + print_fields (nmc->print_fields, nmc->allowed_fields); + g_slist_foreach (nmc->system_connections, (GFunc) show_connection, nmc); + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_MAIN_HEADER_ADD | NMC_PF_FLAG_FIELD_NAMES; + nmc->print_fields.header_name = _("User connections"); + print_fields (nmc->print_fields, nmc->allowed_fields); + g_slist_foreach (nmc->user_connections, (GFunc) show_connection, nmc); + } + else { + while (argc > 0) { + if (strcmp (*argv, "id") == 0 || strcmp (*argv, "uuid") == 0) { + const char *selector = *argv; + NMConnection *con1; + NMConnection *con2; + + if (next_arg (&argc, &argv) != 0) { + g_string_printf (nmc->return_text, _("Error: %s argument is missing."), *argv); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + return nmc->return_value; + } + valid_param_specified = TRUE; + if (!nmc->mode_specified) + nmc->multiline_output = TRUE; /* multiline mode is default for 'con list id|uuid' */ + + con1 = find_connection (nmc->system_connections, selector, *argv); + con2 = find_connection (nmc->user_connections, selector, *argv); + if (con1) nmc_connection_detail (con1, nmc); + if (con2) nmc_connection_detail (con2, nmc); + if (!con1 && !con2) { + g_string_printf (nmc->return_text, _("Error: %s - no such connection."), *argv); + nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; + } + break; + } + else if (strcmp (*argv, "system") == 0) { + if (!nmc_terse_option_check (nmc->print_output, nmc->required_fields, &error2)) + goto error; + if (error1) + goto error; + valid_param_specified = TRUE; + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_MAIN_HEADER_ADD | NMC_PF_FLAG_FIELD_NAMES; + nmc->print_fields.header_name = _("System connections"); + print_fields (nmc->print_fields, nmc->allowed_fields); + g_slist_foreach (nmc->system_connections, (GFunc) show_connection, nmc); + break; + } + else if (strcmp (*argv, "user") == 0) { + if (!nmc_terse_option_check (nmc->print_output, nmc->required_fields, &error2)) + goto error; + if (error1) + goto error; + valid_param_specified = TRUE; + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_MAIN_HEADER_ADD | NMC_PF_FLAG_FIELD_NAMES; + nmc->print_fields.header_name = _("User connections"); + print_fields (nmc->print_fields, nmc->allowed_fields); + g_slist_foreach (nmc->user_connections, (GFunc) show_connection, nmc); + break; + } + else { + fprintf (stderr, _("Unknown parameter: %s\n"), *argv); + } + + argc--; + argv++; + } + } + + if (!valid_param_specified) { + g_string_printf (nmc->return_text, _("Error: no valid parameter specified.")); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + } + return nmc->return_value; + +error: + if (error1) { + if (error1->code == 0) + g_string_printf (nmc->return_text, _("Error: 'con list': %s"), error1->message); + else + g_string_printf (nmc->return_text, _("Error: 'con list': %s; allowed fields: %s"), error1->message, NMC_FIELDS_CON_LIST_ALL); + g_error_free (error1); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + } + if (error2) { + g_string_printf (nmc->return_text, _("Error: %s."), error2->message); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + g_error_free (error2); + } + + return nmc->return_value; +} + +typedef struct { + NmCli *nmc; + NMConnectionScope scope; +} StatusInfo; + +static void +show_active_connection (gpointer data, gpointer user_data) +{ + NMActiveConnection *active = NM_ACTIVE_CONNECTION (data); + StatusInfo *info = (StatusInfo *) user_data; + GSList *con_list, *iter; + const char *active_path; + NMConnectionScope active_service_scope; + NMSettingConnection *s_con; + const GPtrArray *devices; + GString *dev_str; + int i; + + active_path = nm_active_connection_get_connection (active); + active_service_scope = nm_active_connection_get_scope (active); + + if (active_service_scope != info->scope) + return; + + /* Get devices of the active connection */ + dev_str = g_string_new (NULL); + devices = nm_active_connection_get_devices (active); + for (i = 0; devices && (i < devices->len); i++) { + NMDevice *device = g_ptr_array_index (devices, i); + + g_string_append (dev_str, nm_device_get_iface (device)); + g_string_append_c (dev_str, ','); + } + if (dev_str->len > 0) + g_string_truncate (dev_str, dev_str->len - 1); /* Cut off last ',' */ + + con_list = (info->scope == NM_CONNECTION_SCOPE_SYSTEM) ? info->nmc->system_connections : info->nmc->user_connections; + for (iter = con_list; iter; iter = g_slist_next (iter)) { + NMConnection *connection = (NMConnection *) iter->data; + const char *con_path = nm_connection_get_path (connection); + + if (!strcmp (active_path, con_path)) { + /* This connection is active */ + s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION); + g_assert (s_con != NULL); + + /* Obtain field values */ + info->nmc->allowed_fields[0].value = nm_setting_connection_get_id (s_con); + info->nmc->allowed_fields[1].value = nm_setting_connection_get_uuid (s_con); + info->nmc->allowed_fields[2].value = dev_str->str; + info->nmc->allowed_fields[3].value = active_service_scope == NM_CONNECTION_SCOPE_SYSTEM ? _("system") : _("user"); + info->nmc->allowed_fields[4].value = nm_active_connection_get_default (active) ? _("yes") : _("no"); + info->nmc->allowed_fields[5].value = nm_active_connection_get_service_name (active); + info->nmc->allowed_fields[6].value = nm_active_connection_get_specific_object (active); + info->nmc->allowed_fields[7].value = NM_IS_VPN_CONNECTION (active) ? _("yes") : _("no"); + + info->nmc->print_fields.flags &= ~NMC_PF_FLAG_MAIN_HEADER_ADD & ~NMC_PF_FLAG_MAIN_HEADER_ONLY & ~NMC_PF_FLAG_FIELD_NAMES; /* Clear header flags */ + print_fields (info->nmc->print_fields, info->nmc->allowed_fields); + break; + } + } + + g_string_free (dev_str, TRUE); +} + +static NMCResultCode +do_connections_status (NmCli *nmc, int argc, char **argv) +{ + const GPtrArray *active_cons; + GError *error = NULL; + StatusInfo *info; + char *fields_str; + char *fields_all = NMC_FIELDS_CON_STATUS_ALL; + char *fields_common = NMC_FIELDS_CON_STATUS_COMMON; + guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; + guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; + guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; + + nmc->should_wait = FALSE; + + /* create NMClient */ + if (!nmc->get_client (nmc)) + return nmc->return_value; + + active_cons = nm_client_get_active_connections (nmc->client); + + if (!nmc->required_fields || strcasecmp (nmc->required_fields, "common") == 0) + fields_str = fields_common; + else if (!nmc->required_fields || strcasecmp (nmc->required_fields, "all") == 0) + fields_str = fields_all; + else + fields_str = nmc->required_fields; + + nmc->allowed_fields = nmc_fields_con_status; + nmc->print_fields.indices = parse_output_fields (fields_str, nmc->allowed_fields, &error); + + if (error) { + if (error->code == 0) + g_string_printf (nmc->return_text, _("Error: 'con status': %s"), error->message); + else + g_string_printf (nmc->return_text, _("Error: 'con status': %s; allowed fields: %s"), error->message, NMC_FIELDS_CON_STATUS_ALL); + g_error_free (error); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + goto error; + } + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_MAIN_HEADER_ADD | NMC_PF_FLAG_FIELD_NAMES; + nmc->print_fields.header_name = _("Active connections"); + print_fields (nmc->print_fields, nmc->allowed_fields); + + if (active_cons && active_cons->len) { + info = g_malloc0 (sizeof (StatusInfo)); + info->nmc = nmc; + info->scope = NM_CONNECTION_SCOPE_SYSTEM; + g_ptr_array_foreach ((GPtrArray *) active_cons, show_active_connection, (gpointer) info); + info->scope = NM_CONNECTION_SCOPE_USER; + g_ptr_array_foreach ((GPtrArray *) active_cons, show_active_connection, (gpointer) info); + g_free (info); + } + +error: + + return nmc->return_value; +} + +/* -------------------- + * These function should be moved to libnm-glib in the end. + */ +static gboolean +check_ethernet_compatible (NMDeviceEthernet *device, NMConnection *connection, GError **error) +{ + NMSettingConnection *s_con; + NMSettingWired *s_wired; + const char *connection_type; + gboolean is_pppoe = FALSE; + + g_return_val_if_fail (error == NULL || *error == NULL, FALSE); + + s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION)); + g_assert (s_con); + + connection_type = nm_setting_connection_get_connection_type (s_con); + if ( strcmp (connection_type, NM_SETTING_WIRED_SETTING_NAME) + && strcmp (connection_type, NM_SETTING_PPPOE_SETTING_NAME)) { + g_set_error (error, 0, 0, + "The connection was not a wired or PPPoE connection."); + return FALSE; + } + + if (!strcmp (connection_type, NM_SETTING_PPPOE_SETTING_NAME)) + is_pppoe = TRUE; + + s_wired = (NMSettingWired *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED); + /* Wired setting is optional for PPPoE */ + if (!is_pppoe && !s_wired) { + g_set_error (error, 0, 0, + "The connection was not a valid wired connection."); + return FALSE; + } + + if (s_wired) { + const GByteArray *mac; + const char *device_mac_str; + struct ether_addr *device_mac; + + device_mac_str = nm_device_ethernet_get_hw_address (device); + device_mac = ether_aton (device_mac_str); + if (!device_mac) { + g_set_error (error, 0, 0, "Invalid device MAC address."); + return FALSE; + } + + mac = nm_setting_wired_get_mac_address (s_wired); + if (mac && memcmp (mac->data, device_mac->ether_addr_octet, ETH_ALEN)) { + g_set_error (error, 0, 0, + "The connection's MAC address did not match this device."); + return FALSE; + } + } + + // FIXME: check bitrate against device capabilities + + return TRUE; +} + +static gboolean +check_wifi_compatible (NMDeviceWifi *device, NMConnection *connection, GError **error) +{ + NMSettingConnection *s_con; + NMSettingWireless *s_wireless; + + g_return_val_if_fail (error == NULL || *error == NULL, FALSE); + + s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION)); + g_assert (s_con); + + if (strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_WIRELESS_SETTING_NAME)) { + g_set_error (error, 0, 0, + "The connection was not a WiFi connection."); + return FALSE; + } + + s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS)); + if (!s_wireless) { + g_set_error (error, 0, 0, + "The connection was not a valid WiFi connection."); + return FALSE; + } + + if (s_wireless) { + const GByteArray *mac; + const char *device_mac_str; + struct ether_addr *device_mac; + + device_mac_str = nm_device_wifi_get_hw_address (device); + device_mac = ether_aton (device_mac_str); + if (!device_mac) { + g_set_error (error, 0, 0, "Invalid device MAC address."); + return FALSE; + } + + mac = nm_setting_wireless_get_mac_address (s_wireless); + if (mac && memcmp (mac->data, device_mac->ether_addr_octet, ETH_ALEN)) { + g_set_error (error, 0, 0, + "The connection's MAC address did not match this device."); + return FALSE; + } + } + + // FIXME: check channel/freq/band against bands the hardware supports + // FIXME: check encryption against device capabilities + // FIXME: check bitrate against device capabilities + + return TRUE; +} + +static gboolean +check_bt_compatible (NMDeviceBt *device, NMConnection *connection, GError **error) +{ + NMSettingConnection *s_con; + NMSettingBluetooth *s_bt; + const GByteArray *array; + char *str; + const char *device_hw_str; + int addr_match = FALSE; + const char *bt_type_str; + guint32 bt_type, bt_capab; + + g_return_val_if_fail (error == NULL || *error == NULL, FALSE); + + s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION)); + g_assert (s_con); + + if (strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_BLUETOOTH_SETTING_NAME)) { + g_set_error (error, 0, 0, + "The connection was not a Bluetooth connection."); + return FALSE; + } + + s_bt = NM_SETTING_BLUETOOTH (nm_connection_get_setting (connection, NM_TYPE_SETTING_BLUETOOTH)); + if (!s_bt) { + g_set_error (error, 0, 0, + "The connection was not a valid Bluetooth connection."); + return FALSE; + } + + array = nm_setting_bluetooth_get_bdaddr (s_bt); + if (!array || (array->len != ETH_ALEN)) { + g_set_error (error, 0, 0, + "The connection did not contain a valid Bluetooth address."); + return FALSE; + } + + bt_type_str = nm_setting_bluetooth_get_connection_type (s_bt); + g_assert (bt_type_str); + + bt_type = NM_BT_CAPABILITY_NONE; + if (!strcmp (bt_type_str, NM_SETTING_BLUETOOTH_TYPE_DUN)) + bt_type = NM_BT_CAPABILITY_DUN; + else if (!strcmp (bt_type_str, NM_SETTING_BLUETOOTH_TYPE_PANU)) + bt_type = NM_BT_CAPABILITY_NAP; + + bt_capab = nm_device_bt_get_capabilities (device); + if (!(bt_type & bt_capab)) { + g_set_error (error, 0, 0, + "The connection was not compatible with the device's capabilities."); + return FALSE; + } + + device_hw_str = nm_device_bt_get_hw_address (device); + + str = g_strdup_printf ("%02X:%02X:%02X:%02X:%02X:%02X", + array->data[0], array->data[1], array->data[2], + array->data[3], array->data[4], array->data[5]); + addr_match = !strcmp (device_hw_str, str); + g_free (str); + + return addr_match; +} + +#if 0 +static gboolean +check_olpc_mesh_compatible (NMDeviceOlpcMesh *device, NMConnection *connection, GError **error) +{ + NMSettingConnection *s_con; + NMSettingOlpcMesh *s_mesh; + + g_return_val_if_fail (error == NULL || *error == NULL, FALSE); + + s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION)); + g_assert (s_con); + + if (strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_OLPC_MESH_SETTING_NAME)) { + g_set_error (error, 0, 0, + "The connection was not a Mesh connection."); + return FALSE; + } + + s_mesh = NM_SETTING_OLPC_MESH (nm_connection_get_setting (connection, NM_TYPE_SETTING_OLPC_MESH)); + if (!s_mesh) { + g_set_error (error, 0, 0, + "The connection was not a valid Mesh connection."); + return FALSE; + } + + return TRUE; +} +#endif + +static gboolean +nm_device_is_connection_compatible (NMDevice *device, NMConnection *connection, GError **error) +{ + g_return_val_if_fail (NM_IS_DEVICE (device), FALSE); + g_return_val_if_fail (NM_IS_CONNECTION (connection), FALSE); + + if (NM_IS_DEVICE_ETHERNET (device)) + return check_ethernet_compatible (NM_DEVICE_ETHERNET (device), connection, error); + else if (NM_IS_DEVICE_WIFI (device)) + return check_wifi_compatible (NM_DEVICE_WIFI (device), connection, error); + else if (NM_IS_DEVICE_BT (device)) + return check_bt_compatible (NM_DEVICE_BT (device), connection, error); +// else if (NM_IS_DEVICE_OLPC_MESH (device)) +// return check_olpc_mesh_compatible (NM_DEVICE_OLPC_MESH (device), connection, error); + + g_set_error (error, 0, 0, "unhandled device type '%s'", G_OBJECT_TYPE_NAME (device)); + return FALSE; +} + + +/** + * nm_client_get_active_connection_by_path: + * @client: a #NMClient + * @object_path: the object path to search for + * + * Gets a #NMActiveConnection from a #NMClient. + * + * Returns: the #NMActiveConnection for the given @object_path or %NULL if none is found. + **/ +static NMActiveConnection * +nm_client_get_active_connection_by_path (NMClient *client, const char *object_path) +{ + const GPtrArray *actives; + int i; + NMActiveConnection *active = NULL; + + g_return_val_if_fail (NM_IS_CLIENT (client), NULL); + g_return_val_if_fail (object_path, NULL); + + actives = nm_client_get_active_connections (client); + if (!actives) + return NULL; + + for (i = 0; i < actives->len; i++) { + NMActiveConnection *candidate = g_ptr_array_index (actives, i); + if (!strcmp (nm_object_get_path (NM_OBJECT (candidate)), object_path)) { + active = candidate; + break; + } + } + + return active; +} +/* -------------------- */ + +static NMActiveConnection * +get_default_active_connection (NmCli *nmc, NMDevice **device) +{ + NMActiveConnection *default_ac = NULL; + NMDevice *non_default_device = NULL; + NMActiveConnection *non_default_ac = NULL; + const GPtrArray *connections; + int i; + + g_return_val_if_fail (nmc != NULL, NULL); + g_return_val_if_fail (device != NULL, NULL); + g_return_val_if_fail (*device == NULL, NULL); + + connections = nm_client_get_active_connections (nmc->client); + for (i = 0; connections && (i < connections->len); i++) { + NMActiveConnection *candidate = g_ptr_array_index (connections, i); + const GPtrArray *devices; + + devices = nm_active_connection_get_devices (candidate); + if (!devices || !devices->len) + continue; + + if (nm_active_connection_get_default (candidate)) { + if (!default_ac) { + *device = g_ptr_array_index (devices, 0); + default_ac = candidate; + } + } else { + if (!non_default_ac) { + non_default_device = g_ptr_array_index (devices, 0); + non_default_ac = candidate; + } + } + } + + /* Prefer the default connection if one exists, otherwise return the first + * non-default connection. + */ + if (!default_ac && non_default_ac) { + default_ac = non_default_ac; + *device = non_default_device; + } + return default_ac; +} + +/* Find a device to activate the connection on. + * IN: connection: connection to activate + * iface: device interface name to use (optional) + * ap: access point to use (optional; valid just for 802-11-wireless) + * OUT: device: found device + * spec_object: specific_object path of NMAccessPoint + * RETURNS: TRUE when a device is found, FALSE otherwise. + */ +static gboolean +find_device_for_connection (NmCli *nmc, NMConnection *connection, const char *iface, const char *ap, + NMDevice **device, const char **spec_object, GError **error) +{ + NMSettingConnection *s_con; + const char *con_type; + int i, j; + + g_return_val_if_fail (nmc != NULL, FALSE); + g_return_val_if_fail (device != NULL && *device == NULL, FALSE); + g_return_val_if_fail (spec_object != NULL && *spec_object == NULL, FALSE); + g_return_val_if_fail (error == NULL || *error == NULL, FALSE); + + s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION); + g_assert (s_con); + con_type = nm_setting_connection_get_connection_type (s_con); + + if (strcmp (con_type, "vpn") == 0) { + /* VPN connections */ + NMActiveConnection *active = NULL; + if (iface) { + const GPtrArray *connections = nm_client_get_active_connections (nmc->client); + for (i = 0; connections && (i < connections->len) && !active; i++) { + NMActiveConnection *candidate = g_ptr_array_index (connections, i); + const GPtrArray *devices = nm_active_connection_get_devices (candidate); + if (!devices || !devices->len) + continue; + + for (j = 0; devices && (j < devices->len); j++) { + NMDevice *dev = g_ptr_array_index (devices, j); + if (!strcmp (iface, nm_device_get_iface (dev))) { + active = candidate; + *device = dev; + break; + } + } + } + if (!active) { + g_set_error (error, 0, 0, _("no active connection on device '%s'"), iface); + return FALSE; + } + *spec_object = nm_object_get_path (NM_OBJECT (active)); + return TRUE; + } else { + active = get_default_active_connection (nmc, device); + if (!active) { + g_set_error (error, 0, 0, _("no active connection or device")); + return FALSE; + } + *spec_object = nm_object_get_path (NM_OBJECT (active)); + return TRUE; + } + } else { + /* Other connections */ + NMDevice *found_device = NULL; + const GPtrArray *devices = nm_client_get_devices (nmc->client); + + for (i = 0; devices && (i < devices->len) && !found_device; i++) { + NMDevice *dev = g_ptr_array_index (devices, i); + + if (iface) { + const char *dev_iface = nm_device_get_iface (dev); + if ( !strcmp (dev_iface, iface) + && nm_device_is_connection_compatible (dev, connection, NULL)) { + found_device = dev; + } + } else { + if (nm_device_is_connection_compatible (dev, connection, NULL)) { + found_device = dev; + } + } + + if (found_device && ap && !strcmp (con_type, "802-11-wireless") && NM_IS_DEVICE_WIFI (dev)) { + char *hwaddr_up = g_ascii_strup (ap, -1); + const GPtrArray *aps = nm_device_wifi_get_access_points (NM_DEVICE_WIFI (dev)); + found_device = NULL; /* Mark as not found; set to the device again later, only if AP matches */ + + for (j = 0; aps && (j < aps->len); j++) { + NMAccessPoint *candidate_ap = g_ptr_array_index (aps, j); + const char *candidate_hwaddr = nm_access_point_get_hw_address (candidate_ap); + + if (!strcmp (hwaddr_up, candidate_hwaddr)) { + found_device = dev; + *spec_object = nm_object_get_path (NM_OBJECT (candidate_ap)); + break; + } + } + g_free (hwaddr_up); + } + } + + if (found_device) { + *device = found_device; + return TRUE; + } else { + if (iface) + g_set_error (error, 0, 0, _("device '%s' not compatible with connection '%s'"), iface, nm_setting_connection_get_id (s_con)); + else + g_set_error (error, 0, 0, _("no device found for connection '%s'"), nm_setting_connection_get_id (s_con)); + return FALSE; + } + } +} + +static const char * +active_connection_state_to_string (NMActiveConnectionState state) +{ + switch (state) { + case NM_ACTIVE_CONNECTION_STATE_ACTIVATING: + return _("activating"); + case NM_ACTIVE_CONNECTION_STATE_ACTIVATED: + return _("activated"); + case NM_ACTIVE_CONNECTION_STATE_UNKNOWN: + default: + return _("unknown"); + } +} + +static const char * +vpn_connection_state_to_string (NMVPNConnectionState state) +{ + switch (state) { + case NM_VPN_CONNECTION_STATE_PREPARE: + return _("VPN connecting (prepare)"); + case NM_VPN_CONNECTION_STATE_NEED_AUTH: + return _("VPN connecting (need authentication)"); + case NM_VPN_CONNECTION_STATE_CONNECT: + return _("VPN connecting"); + case NM_VPN_CONNECTION_STATE_IP_CONFIG_GET: + return _("VPN connecting (getting IP configuration)"); + case NM_VPN_CONNECTION_STATE_ACTIVATED: + return _("VPN connected"); + case NM_VPN_CONNECTION_STATE_FAILED: + return _("VPN connection failed"); + case NM_VPN_CONNECTION_STATE_DISCONNECTED: + return _("VPN disconnected"); + default: + return _("unknown"); + } +} + +static const char * +vpn_connection_state_reason_to_string (NMVPNConnectionStateReason reason) +{ + switch (reason) { + case NM_VPN_CONNECTION_STATE_REASON_UNKNOWN: + return _("unknown reason"); + case NM_VPN_CONNECTION_STATE_REASON_NONE: + return _("none"); + case NM_VPN_CONNECTION_STATE_REASON_USER_DISCONNECTED: + return _("the user was disconnected"); + case NM_VPN_CONNECTION_STATE_REASON_DEVICE_DISCONNECTED: + return _("the base network connection was interrupted"); + case NM_VPN_CONNECTION_STATE_REASON_SERVICE_STOPPED: + return _("the VPN service stopped unexpectedly"); + case NM_VPN_CONNECTION_STATE_REASON_IP_CONFIG_INVALID: + return _("the VPN service returned invalid configuration"); + case NM_VPN_CONNECTION_STATE_REASON_CONNECT_TIMEOUT: + return _("the connection attempt timed out"); + case NM_VPN_CONNECTION_STATE_REASON_SERVICE_START_TIMEOUT: + return _("the VPN service did not start in time"); + case NM_VPN_CONNECTION_STATE_REASON_SERVICE_START_FAILED: + return _("the VPN service failed to start"); + case NM_VPN_CONNECTION_STATE_REASON_NO_SECRETS: + return _("no valid VPN secrets"); + case NM_VPN_CONNECTION_STATE_REASON_LOGIN_FAILED: + return _("invalid VPN secrets"); + case NM_VPN_CONNECTION_STATE_REASON_CONNECTION_REMOVED: + return _("the connection was removed"); + default: + return _("unknown"); + } +} + +static void +active_connection_state_cb (NMActiveConnection *active, GParamSpec *pspec, gpointer user_data) +{ + NmCli *nmc = (NmCli *) user_data; + NMActiveConnectionState state; + + state = nm_active_connection_get_state (active); + + printf (_("state: %s\n"), active_connection_state_to_string (state)); + + if (state == NM_ACTIVE_CONNECTION_STATE_ACTIVATED) { + printf (_("Connection activated\n")); + quit (); + } else if (state == NM_ACTIVE_CONNECTION_STATE_UNKNOWN) { + g_string_printf (nmc->return_text, _("Error: Connection activation failed.")); + nmc->return_value = NMC_RESULT_ERROR_CON_ACTIVATION; + quit (); + } +} + +static void +vpn_connection_state_cb (NMVPNConnection *vpn, + NMVPNConnectionState state, + NMVPNConnectionStateReason reason, + gpointer user_data) +{ + NmCli *nmc = (NmCli *) user_data; + + switch (state) { + case NM_VPN_CONNECTION_STATE_PREPARE: + case NM_VPN_CONNECTION_STATE_NEED_AUTH: + case NM_VPN_CONNECTION_STATE_CONNECT: + case NM_VPN_CONNECTION_STATE_IP_CONFIG_GET: + printf (_("state: %s (%d)\n"), vpn_connection_state_to_string (state), state); + break; + + case NM_VPN_CONNECTION_STATE_ACTIVATED: + printf (_("Connection activated\n")); + quit (); + break; + + case NM_VPN_CONNECTION_STATE_FAILED: + case NM_VPN_CONNECTION_STATE_DISCONNECTED: + g_string_printf (nmc->return_text, _("Error: Connection activation failed: %s."), vpn_connection_state_reason_to_string (reason)); + nmc->return_value = NMC_RESULT_ERROR_CON_ACTIVATION; + quit (); + break; + + default: + break; + } +} + +static gboolean +timeout_cb (gpointer user_data) +{ + /* Time expired -> exit nmcli */ + + NmCli *nmc = (NmCli *) user_data; + + g_string_printf (nmc->return_text, _("Error: Timeout %d sec expired."), nmc->timeout); + nmc->return_value = NMC_RESULT_ERROR_TIMEOUT_EXPIRED; + quit (); + return FALSE; +} + +static void +foo_active_connections_changed_cb (NMClient *client, + GParamSpec *pspec, + gpointer user_data) +{ + /* Call again activate_connection_cb with dummy arguments; + * the correct ones are taken from its first call. + */ + activate_connection_cb (NULL, NULL, NULL); +} + +static void +activate_connection_cb (gpointer user_data, const char *path, GError *error) +{ + NmCli *nmc = (NmCli *) user_data; + NMActiveConnection *active; + NMActiveConnectionState state; + static gulong handler_id = 0; + static NmCli *orig_nmc; + static const char *orig_path; + static GError *orig_error; + + if (nmc) + { + /* Called first time; store actual arguments */ + orig_nmc = nmc; + orig_path = path; + orig_error = error; + } + + /* Disconnect the handler not to be run any more */ + if (handler_id != 0) { + g_signal_handler_disconnect (orig_nmc->client, handler_id); + handler_id = 0; + } + + if (orig_error) { + g_string_printf (orig_nmc->return_text, _("Error: Connection activation failed: %s"), orig_error->message); + orig_nmc->return_value = NMC_RESULT_ERROR_CON_ACTIVATION; + quit (); + } else { + active = nm_client_get_active_connection_by_path (orig_nmc->client, orig_path); + if (!active) { + /* The active connection path is not in active connections list yet; wait for active-connections signal. */ + /* This is basically the case for VPN connections. */ + if (nmc) { + /* Called first time, i.e. by nm_client_activate_connection() */ + handler_id = g_signal_connect (orig_nmc->client, "notify::active-connections", + G_CALLBACK (foo_active_connections_changed_cb), NULL); + return; + } else { + g_string_printf (orig_nmc->return_text, _("Error: Obtaining active connection for '%s' failed."), orig_path); + orig_nmc->return_value = NMC_RESULT_ERROR_CON_ACTIVATION; + quit (); + return; + } + } + + state = nm_active_connection_get_state (active); + + printf (_("Active connection state: %s\n"), active_connection_state_to_string (state)); + printf (_("Active connection path: %s\n"), orig_path); + + if (!orig_nmc->should_wait || state == NM_ACTIVE_CONNECTION_STATE_ACTIVATED) { + /* don't want to wait or already activated */ + quit (); + } else { + if (NM_IS_VPN_CONNECTION (active)) + g_signal_connect (NM_VPN_CONNECTION (active), "vpn-state-changed", G_CALLBACK (vpn_connection_state_cb), orig_nmc); + else + g_signal_connect (active, "notify::state", G_CALLBACK (active_connection_state_cb), orig_nmc); + + /* Start timer not to loop forever when signals are not emitted */ + g_timeout_add_seconds (orig_nmc->timeout, timeout_cb, orig_nmc); + } + } +} + +static NMCResultCode +do_connection_up (NmCli *nmc, int argc, char **argv) +{ + NMDevice *device = NULL; + const char *spec_object = NULL; + gboolean device_found; + NMConnection *connection = NULL; + NMSettingConnection *s_con; + gboolean is_system; + const char *con_path; + const char *con_type; + const char *iface = NULL; + const char *ap = NULL; + gboolean id_specified = FALSE; + gboolean wait = TRUE; + GError *error = NULL; + + /* Set default timeout for connection activation. It can take quite a long time. + * Using 90 seconds. + */ + nmc->timeout = 90; + + while (argc > 0) { + if (strcmp (*argv, "id") == 0 || strcmp (*argv, "uuid") == 0) { + const char *selector = *argv; + id_specified = TRUE; + + if (next_arg (&argc, &argv) != 0) { + g_string_printf (nmc->return_text, _("Error: %s argument is missing."), *argv); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + goto error; + } + + if ((connection = find_connection (nmc->system_connections, selector, *argv)) == NULL) + connection = find_connection (nmc->user_connections, selector, *argv); + + if (!connection) { + g_string_printf (nmc->return_text, _("Error: Unknown connection: %s."), *argv); + nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; + goto error; + } + } + else if (strcmp (*argv, "iface") == 0) { + if (next_arg (&argc, &argv) != 0) { + g_string_printf (nmc->return_text, _("Error: %s argument is missing."), *argv); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + goto error; + } + + iface = *argv; + } + else if (strcmp (*argv, "ap") == 0) { + if (next_arg (&argc, &argv) != 0) { + g_string_printf (nmc->return_text, _("Error: %s argument is missing."), *argv); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + goto error; + } + + ap = *argv; + } + else if (strcmp (*argv, "--nowait") == 0) { + wait = FALSE; + } else if (strcmp (*argv, "--timeout") == 0) { + if (next_arg (&argc, &argv) != 0) { + g_string_printf (nmc->return_text, _("Error: %s argument is missing."), *argv); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + goto error; + } + + errno = 0; + nmc->timeout = strtol (*argv, NULL, 10); + if (errno || nmc->timeout < 0) { + g_string_printf (nmc->return_text, _("Error: timeout value '%s' is not valid."), *argv); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + goto error; + } + } else { + fprintf (stderr, _("Unknown parameter: %s\n"), *argv); + } + + argc--; + argv++; + } + + if (!id_specified) { + g_string_printf (nmc->return_text, _("Error: id or uuid has to be specified.")); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + goto error; + } + + /* create NMClient */ + if (!nmc->get_client (nmc)) + goto error; + + is_system = (nm_connection_get_scope (connection) == NM_CONNECTION_SCOPE_SYSTEM) ? TRUE : FALSE; + con_path = nm_connection_get_path (connection); + + s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION); + g_assert (s_con); + con_type = nm_setting_connection_get_connection_type (s_con); + + device_found = find_device_for_connection (nmc, connection, iface, ap, &device, &spec_object, &error); + + if (!device_found) { + if (error) + g_string_printf (nmc->return_text, _("Error: No suitable device found: %s."), error->message); + else + g_string_printf (nmc->return_text, _("Error: No suitable device found.")); + nmc->return_value = NMC_RESULT_ERROR_CON_ACTIVATION; + goto error; + } + + nmc->should_wait = wait; + nm_client_activate_connection (nmc->client, + is_system ? NM_DBUS_SERVICE_SYSTEM_SETTINGS : NM_DBUS_SERVICE_USER_SETTINGS, + con_path, + device, + spec_object, + activate_connection_cb, + nmc); + + return nmc->return_value; +error: + nmc->should_wait = FALSE; + return nmc->return_value; +} + +static NMCResultCode +do_connection_down (NmCli *nmc, int argc, char **argv) +{ + NMConnection *connection = NULL; + NMActiveConnection *active = NULL; + const GPtrArray *active_cons; + const char *con_path; + const char *active_path; + NMConnectionScope active_service_scope, con_scope; + gboolean id_specified = FALSE; + gboolean wait = TRUE; + int i; + + while (argc > 0) { + if (strcmp (*argv, "id") == 0 || strcmp (*argv, "uuid") == 0) { + const char *selector = *argv; + id_specified = TRUE; + + if (next_arg (&argc, &argv) != 0) { + g_string_printf (nmc->return_text, _("Error: %s argument is missing."), *argv); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + goto error; + } + + if ((connection = find_connection (nmc->system_connections, selector, *argv)) == NULL) + connection = find_connection (nmc->user_connections, selector, *argv); + + if (!connection) { + g_string_printf (nmc->return_text, _("Error: Unknown connection: %s."), *argv); + nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; + goto error; + } + } + else if (strcmp (*argv, "--nowait") == 0) { + wait = FALSE; + } + else { + fprintf (stderr, _("Unknown parameter: %s\n"), *argv); + } + + argc--; + argv++; + } + + if (!id_specified) { + g_string_printf (nmc->return_text, _("Error: id or uuid has to be specified.")); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + goto error; + } + + /* create NMClient */ + if (!nmc->get_client (nmc)) + goto error; + + con_path = nm_connection_get_path (connection); + con_scope = nm_connection_get_scope (connection); + + active_cons = nm_client_get_active_connections (nmc->client); + for (i = 0; active_cons && (i < active_cons->len); i++) { + NMActiveConnection *candidate = g_ptr_array_index (active_cons, i); + + active_path = nm_active_connection_get_connection (candidate); + active_service_scope = nm_active_connection_get_scope (candidate); + if (!strcmp (active_path, con_path) && active_service_scope == con_scope) { + active = candidate; + break; + } + } + + if (active) + nm_client_deactivate_connection (nmc->client, active); + else { + fprintf (stderr, _("Warning: Connection not active\n")); + } + +error: + nmc->should_wait = FALSE; + return nmc->return_value; +} + +/* callback called when connections are obtained from the settings service */ +static void +get_connections_cb (NMSettingsInterface *settings, gpointer user_data) +{ + ArgsInfo *args = (ArgsInfo *) user_data; + static gboolean system_cb_called = FALSE; + static gboolean user_cb_called = FALSE; + GError *error = NULL; + + if (NM_IS_REMOTE_SETTINGS_SYSTEM (settings)) { + system_cb_called = TRUE; + args->nmc->system_connections = nm_settings_interface_list_connections (settings); + } + else { + user_cb_called = TRUE; + args->nmc->user_connections = nm_settings_interface_list_connections (settings); + } + + /* return and wait for the callback of the second settings is called */ + if ( (args->nmc->system_settings_running && !system_cb_called) + || (args->nmc->user_settings_running && !user_cb_called)) + return; + + if (args->argc == 0) { + if (!nmc_terse_option_check (args->nmc->print_output, args->nmc->required_fields, &error)) + goto opt_error; + args->nmc->return_value = do_connections_list (args->nmc, args->argc, args->argv); + } else { + + if (matches (*args->argv, "list") == 0) { + args->nmc->return_value = do_connections_list (args->nmc, args->argc-1, args->argv+1); + } + else if (matches(*args->argv, "status") == 0) { + if (!nmc_terse_option_check (args->nmc->print_output, args->nmc->required_fields, &error)) + goto opt_error; + args->nmc->return_value = do_connections_status (args->nmc, args->argc-1, args->argv+1); + } + else if (matches(*args->argv, "up") == 0) { + args->nmc->return_value = do_connection_up (args->nmc, args->argc-1, args->argv+1); + } + else if (matches(*args->argv, "down") == 0) { + args->nmc->return_value = do_connection_down (args->nmc, args->argc-1, args->argv+1); + } + else if (matches (*args->argv, "help") == 0) { + usage (); + args->nmc->should_wait = FALSE; + } else { + usage (); + g_string_printf (args->nmc->return_text, _("Error: 'con' command '%s' is not valid."), *args->argv); + args->nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + args->nmc->should_wait = FALSE; + } + } + + if (!args->nmc->should_wait) + quit (); + return; + +opt_error: + g_string_printf (args->nmc->return_text, _("Error: %s."), error->message); + args->nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + args->nmc->should_wait = FALSE; + g_error_free (error); + quit (); + return; +} + + +/* Entry point function for connections-related commands: 'nmcli con' */ +NMCResultCode +do_connections (NmCli *nmc, int argc, char **argv) +{ + DBusGConnection *bus; + GError *error = NULL; + + nmc->should_wait = TRUE; + + args_info.nmc = nmc; + args_info.argc = argc; + args_info.argv = argv; + + /* connect to DBus' system bus */ + bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error); + if (error || !bus) { + g_string_printf (nmc->return_text, _("Error: could not connect to D-Bus.")); + nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; + return nmc->return_value; + } + + /* get system settings */ + if (!(nmc->system_settings = nm_remote_settings_system_new (bus))) { + g_string_printf (nmc->return_text, _("Error: Could not get system settings.")); + nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; + return nmc->return_value; + + } + + /* get user settings */ + if (!(nmc->user_settings = nm_remote_settings_new (bus, NM_CONNECTION_SCOPE_USER))) { + g_string_printf (nmc->return_text, _("Error: Could not get user settings.")); + nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; + return nmc->return_value; + } + + /* find out whether setting services are running */ + g_object_get (nmc->system_settings, NM_REMOTE_SETTINGS_SERVICE_RUNNING, &nmc->system_settings_running, NULL); + g_object_get (nmc->user_settings, NM_REMOTE_SETTINGS_SERVICE_RUNNING, &nmc->user_settings_running, NULL); + + if (!nmc->system_settings_running && !nmc->user_settings_running) { + g_string_printf (nmc->return_text, _("Error: Can't obtain connections: settings services are not running.")); + nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; + return nmc->return_value; + } + + /* connect to signal "connections-read" - emitted when connections are fetched and ready */ + if (nmc->system_settings_running) + g_signal_connect (nmc->system_settings, NM_SETTINGS_INTERFACE_CONNECTIONS_READ, + G_CALLBACK (get_connections_cb), &args_info); + + if (nmc->user_settings_running) + g_signal_connect (nmc->user_settings, NM_SETTINGS_INTERFACE_CONNECTIONS_READ, + G_CALLBACK (get_connections_cb), &args_info); + + dbus_g_connection_unref (bus); + + /* The rest will be done in get_connection_cb() callback. + * We need to wait for signals that connections are read. + */ + return NMC_RESULT_SUCCESS; +} diff --git a/src/nm-logging.h b/cli/src/connections.h similarity index 64% rename from src/nm-logging.h rename to cli/src/connections.h index 70979fa3ab..a1ed1c1cf3 100644 --- a/src/nm-logging.h +++ b/cli/src/connections.h @@ -1,5 +1,4 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* NetworkManager -- Network link manager +/* nmcli - command-line tool to control NetworkManager * * 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 @@ -15,17 +14,14 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2006 - 2008 Red Hat, Inc. - * Copyright (C) 2006 - 2008 Novell, Inc. + * (C) Copyright 2010 Red Hat, Inc. */ -#ifndef NM_LOGGING_H -#define NM_LOGGING_H +#ifndef NMC_CONNECTIONS_H +#define NMC_CONNECTIONS_H -#include +#include "nmcli.h" -void nm_logging_setup (gboolean become_daemon); -void nm_logging_backtrace (void); -void nm_logging_shutdown (void); +NMCResultCode do_connections (NmCli *nmc, int argc, char **argv); -#endif /* NM_LOGGING_H */ +#endif /* NMC_CONNECTIONS_H */ diff --git a/cli/src/devices.c b/cli/src/devices.c new file mode 100644 index 0000000000..7811e2aeda --- /dev/null +++ b/cli/src/devices.c @@ -0,0 +1,1196 @@ +/* nmcli - command-line tool to control NetworkManager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * (C) Copyright 2010 Red Hat, Inc. + */ + +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +//#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "utils.h" +#include "devices.h" + + +/* Available fields for 'dev status' */ +static NmcOutputField nmc_fields_dev_status[] = { + {"DEVICE", N_("DEVICE"), 10, NULL, 0}, /* 0 */ + {"TYPE", N_("TYPE"), 17, NULL, 0}, /* 1 */ + {"STATE", N_("STATE"), 12, NULL, 0}, /* 2 */ + {NULL, NULL, 0, NULL, 0} +}; +#define NMC_FIELDS_DEV_STATUS_ALL "DEVICE,TYPE,STATE" +#define NMC_FIELDS_DEV_STATUS_COMMON "DEVICE,TYPE,STATE" + + +/* Available sections for 'dev list' */ +static NmcOutputField nmc_fields_dev_list_sections[] = { + {"GENERAL", N_("GENERAL"), 0, NULL, 0}, /* 0 */ + {"CAPABILITIES", N_("CAPABILITIES"), 0, NULL, 0}, /* 1 */ + {"WIFI-PROPERTIES", N_("WIFI-PROPERTIES"), 0, NULL, 0}, /* 2 */ + {"AP", N_("AP"), 0, NULL, 0}, /* 3 */ + {"WIRED-PROPERTIES", N_("WIRED-PROPERTIES"), 0, NULL, 0}, /* 4 */ + {"IP4-SETTINGS", N_("IP4-SETTINGS"), 0, NULL, 0}, /* 5 */ + {"IP4-DNS", N_("IP4-DNS"), 0, NULL, 0}, /* 6 */ + {NULL, NULL, 0, NULL, 0} +}; +#define NMC_FIELDS_DEV_LIST_SECTIONS_ALL "GENERAL,CAPABILITIES,WIFI-PROPERTIES,AP,WIRED-PROPERTIES,IP4-SETTINGS,IP4-DNS" +#define NMC_FIELDS_DEV_LIST_SECTIONS_COMMON "GENERAL,CAPABILITIES,WIFI-PROPERTIES,AP,WIRED-PROPERTIES,IP4-SETTINGS,IP4-DNS" + +/* Available fields for 'dev list' - GENERAL part */ +static NmcOutputField nmc_fields_dev_list_general[] = { + {"NAME", N_("NAME"), 10, NULL, 0}, /* 0 */ + {"DEVICE", N_("DEVICE"), 10, NULL, 0}, /* 1 */ + {"TYPE", N_("TYPE"), 17, NULL, 0}, /* 2 */ + {"DRIVER", N_("DRIVER"), 10, NULL, 0}, /* 3 */ + {"HWADDR", N_("HWADDR"), 19, NULL, 0}, /* 4 */ + {"STATE", N_("STATE"), 14, NULL, 0}, /* 5 */ + {NULL, NULL, 0, NULL, 0} +}; +#define NMC_FIELDS_DEV_LIST_GENERAL_ALL "NAME,DEVICE,TYPE,DRIVER,HWADDR,STATE" +#define NMC_FIELDS_DEV_LIST_GENERAL_COMMON "NAME,DEVICE,TYPE,DRIVER,HWADDR,STATE" + +/* Available fields for 'dev list' - CAPABILITIES part */ +static NmcOutputField nmc_fields_dev_list_cap[] = { + {"NAME", N_("NAME"), 13, NULL, 0}, /* 0 */ + {"CARRIER-DETECT", N_("CARRIER-DETECT"), 16, NULL, 0}, /* 1 */ + {"SPEED", N_("SPEED"), 10, NULL, 0}, /* 2 */ + {NULL, NULL, 0, NULL, 0} +}; +#define NMC_FIELDS_DEV_LIST_CAP_ALL "NAME,CARRIER-DETECT,SPEED" +#define NMC_FIELDS_DEV_LIST_CAP_COMMON "NAME,CARRIER-DETECT,SPEED" + +/* Available fields for 'dev list' - wired properties part */ +static NmcOutputField nmc_fields_dev_list_wired_prop[] = { + {"NAME", N_("NAME"), 18, NULL, 0}, /* 0 */ + {"CARRIER", N_("CARRIER"), 10, NULL, 0}, /* 1 */ + {NULL, NULL, 0, NULL, 0} +}; +#define NMC_FIELDS_DEV_LIST_WIRED_PROP_ALL "NAME,CARRIER" +#define NMC_FIELDS_DEV_LIST_WIRED_PROP_COMMON "NAME,CARRIER" + + +/* Available fields for 'dev list' - wireless properties part */ +static NmcOutputField nmc_fields_dev_list_wifi_prop[] = { + {"NAME", N_("NAME"), 18, NULL, 0}, /* 0 */ + {"WEP", N_("WEP"), 5, NULL, 0}, /* 1 */ + {"WPA", N_("WPA"), 5, NULL, 0}, /* 2 */ + {"WPA2", N_("WPA2"), 6, NULL, 0}, /* 3 */ + {"TKIP", N_("TKIP"), 6, NULL, 0}, /* 4 */ + {"CCMP", N_("CCMP"), 6, NULL, 0}, /* 5 */ + {NULL, NULL, 0, NULL, 0} +}; +#define NMC_FIELDS_DEV_LIST_WIFI_PROP_ALL "NAME,WEP,WPA,WPA2,TKIP,CCMP" +#define NMC_FIELDS_DEV_LIST_WIFI_PROP_COMMON "NAME,WEP,WPA,WPA2,TKIP,CCMP" + +/* Available fields for 'dev list' - IPv4 settings part */ +static NmcOutputField nmc_fields_dev_list_ip4_settings[] = { + {"NAME", N_("NAME"), 15, NULL, 0}, /* 0 */ + {"ADDRESS", N_("ADDRESS"), 15, NULL, 0}, /* 1 */ + {"PREFIX", N_("PREFIX"), 20, NULL, 0}, /* 2 */ + {"GATEWAY", N_("GATEWAY"), 20, NULL, 0}, /* 3 */ + {NULL, NULL, 0, NULL, 0} +}; +#define NMC_FIELDS_DEV_LIST_IP4_SETTINGS_ALL "NAME,ADDRESS,PREFIX,GATEWAY" +#define NMC_FIELDS_DEV_LIST_IP4_SETTINGS_COMMON "NAME,ADDRESS,PREFIX,GATEWAY" + +/* Available fields for 'dev list' - IPv4 settings DNS part */ +static NmcOutputField nmc_fields_dev_list_ip4_dns[] = { + {"NAME", N_("NAME"), 15, NULL, 0}, /* 0 */ + {"DNS", N_("DNS"), 17, NULL, 0}, /* 1 */ + {NULL, NULL, 0, NULL, 0} +}; +#define NMC_FIELDS_DEV_LIST_IP4_DNS_ALL "NAME,DNS" +#define NMC_FIELDS_DEV_LIST_IP4_DNS_COMMON "NAME,DNS" + + +/* Available fields for 'dev wifi list' */ +static NmcOutputField nmc_fields_dev_wifi_list[] = { + {"NAME", N_("NAME"), 15, NULL, 0}, /* 0 */ + {"SSID", N_("SSID"), 33, NULL, 0}, /* 1 */ + {"BSSID", N_("BSSID"), 19, NULL, 0}, /* 2 */ + {"MODE", N_("MODE"), 16, NULL, 0}, /* 3 */ + {"FREQ", N_("FREQ"), 10, NULL, 0}, /* 4 */ + {"RATE", N_("RATE"), 10, NULL, 0}, /* 5 */ + {"SIGNAL", N_("SIGNAL"), 8, NULL, 0}, /* 6 */ + {"SECURITY", N_("SECURITY"), 10, NULL, 0}, /* 7 */ + {"WPA-FLAGS", N_("WPA-FLAGS"), 25, NULL, 0}, /* 8 */ + {"RSN-FLAGS", N_("RSN-FLAGS"), 25, NULL, 0}, /* 9 */ + {"DEVICE", N_("DEVICE"), 10, NULL, 0}, /* 10 */ + {"ACTIVE", N_("ACTIVE"), 8, NULL, 0}, /* 11 */ + {NULL, NULL, 0, NULL, 0} +}; +#define NMC_FIELDS_DEV_WIFI_LIST_ALL "SSID,BSSID,MODE,FREQ,RATE,SIGNAL,SECURITY,WPA-FLAGS,RSN-FLAGS,DEVICE,ACTIVE" +#define NMC_FIELDS_DEV_WIFI_LIST_COMMON "SSID,BSSID,MODE,FREQ,RATE,SIGNAL,SECURITY,ACTIVE" +#define NMC_FIELDS_DEV_WIFI_LIST_FOR_DEV_LIST "NAME,"NMC_FIELDS_DEV_WIFI_LIST_COMMON + + +/* static function prototypes */ +static void usage (void); +static const char *device_state_to_string (NMDeviceState state); +static NMCResultCode do_devices_status (NmCli *nmc, int argc, char **argv); +static NMCResultCode do_devices_list (NmCli *nmc, int argc, char **argv); +static NMCResultCode do_device_disconnect (NmCli *nmc, int argc, char **argv); +static NMCResultCode do_device_wifi (NmCli *nmc, int argc, char **argv); + + +extern GMainLoop *loop; /* glib main loop variable */ + +static void +usage (void) +{ + fprintf (stderr, + _("Usage: nmcli dev { COMMAND | help }\n\n" + " COMMAND := { status | list | disconnect | wifi }\n\n" + " status\n" + " list [iface ]\n" + " disconnect iface [--nowait] [--timeout ]\n" + " wifi [list [iface ] [hwaddr ]]\n\n")); +} + +/* quit main loop */ +static void +quit (void) +{ + g_main_loop_quit (loop); /* quit main loop */ +} + +static const char * +device_state_to_string (NMDeviceState state) +{ + switch (state) { + case NM_DEVICE_STATE_UNMANAGED: + return _("unmanaged"); + case NM_DEVICE_STATE_UNAVAILABLE: + return _("unavailable"); + case NM_DEVICE_STATE_DISCONNECTED: + return _("disconnected"); + case NM_DEVICE_STATE_PREPARE: + return _("connecting (prepare)"); + case NM_DEVICE_STATE_CONFIG: + return _("connecting (configuring)"); + case NM_DEVICE_STATE_NEED_AUTH: + return _("connecting (need authentication)"); + case NM_DEVICE_STATE_IP_CONFIG: + return _("connecting (getting IP configuration)"); + case NM_DEVICE_STATE_ACTIVATED: + return _("connected"); + case NM_DEVICE_STATE_FAILED: + return _("connection failed"); + default: + return _("unknown"); + } +} + +/* Return device type - use setting names to match with connection types */ +static const char * +get_device_type (NMDevice * device) +{ + if (NM_IS_DEVICE_ETHERNET (device)) + return NM_SETTING_WIRED_SETTING_NAME; + else if (NM_IS_DEVICE_WIFI (device)) + return NM_SETTING_WIRELESS_SETTING_NAME; + else if (NM_IS_GSM_DEVICE (device)) + return NM_SETTING_GSM_SETTING_NAME; + else if (NM_IS_CDMA_DEVICE (device)) + return NM_SETTING_CDMA_SETTING_NAME; + else if (NM_IS_DEVICE_BT (device)) + return NM_SETTING_BLUETOOTH_SETTING_NAME; +// else if (NM_IS_DEVICE_OLPC_MESH (device)) +// return NM_SETTING_OLPC_MESH_SETTING_NAME; + else + return _("Unknown"); +} + +static char * +ap_wpa_rsn_flags_to_string (guint32 flags) +{ + char *flags_str[16]; /* Enough space for flags and terminating NULL */ + char *ret_str; + int i = 0; + + if (flags & NM_802_11_AP_SEC_PAIR_WEP40) + flags_str[i++] = g_strdup ("pair_wpe40"); + if (flags & NM_802_11_AP_SEC_PAIR_WEP104) + flags_str[i++] = g_strdup ("pair_wpe104"); + if (flags & NM_802_11_AP_SEC_PAIR_TKIP) + flags_str[i++] = g_strdup ("pair_tkip"); + if (flags & NM_802_11_AP_SEC_PAIR_CCMP) + flags_str[i++] = g_strdup ("pair_ccmp"); + if (flags & NM_802_11_AP_SEC_GROUP_WEP40) + flags_str[i++] = g_strdup ("group_wpe40"); + if (flags & NM_802_11_AP_SEC_GROUP_WEP104) + flags_str[i++] = g_strdup ("group_wpe104"); + if (flags & NM_802_11_AP_SEC_GROUP_TKIP) + flags_str[i++] = g_strdup ("group_tkip"); + if (flags & NM_802_11_AP_SEC_GROUP_CCMP) + flags_str[i++] = g_strdup ("group_ccmp"); + if (flags & NM_802_11_AP_SEC_KEY_MGMT_PSK) + flags_str[i++] = g_strdup ("psk"); + if (flags & NM_802_11_AP_SEC_KEY_MGMT_802_1X) + flags_str[i++] = g_strdup ("802.1X"); + + if (i == 0) + flags_str[i++] = g_strdup (_("(none)")); + + flags_str[i] = NULL; + + ret_str = g_strjoinv (" ", flags_str); + + i = 0; + while (flags_str[i]) + g_free (flags_str[i++]); + + return ret_str; +} + +static gchar * +ip4_address_as_string (guint32 ip) +{ + struct in_addr tmp_addr; + char buf[INET_ADDRSTRLEN+1]; + + memset (&buf, '\0', sizeof (buf)); + tmp_addr.s_addr = ip; + + if (inet_ntop (AF_INET, &tmp_addr, buf, INET_ADDRSTRLEN)) { + return g_strdup (buf); + } else { + g_warning (_("%s: error converting IP4 address 0x%X"), + __func__, ntohl (tmp_addr.s_addr)); + return NULL; + } +} + +typedef struct { + NmCli *nmc; + int index; + const char* active_bssid; + const char* device; +} APInfo; + +static void +detail_access_point (gpointer data, gpointer user_data) +{ + NMAccessPoint *ap = NM_ACCESS_POINT (data); + APInfo *info = (APInfo *) user_data; + gboolean active = FALSE; + guint32 flags, wpa_flags, rsn_flags, freq, bitrate; + guint8 strength; + const GByteArray *ssid; + const char *hwaddr; + NM80211Mode mode; + char *freq_str, *ssid_str, *bitrate_str, *strength_str, *wpa_flags_str, *rsn_flags_str; + GString *security_str; + char *ap_name; + + if (info->active_bssid) { + const char *current_bssid = nm_access_point_get_hw_address (ap); + if (current_bssid && !strcmp (current_bssid, info->active_bssid)) + active = TRUE; + } + + /* Get AP properties */ + flags = nm_access_point_get_flags (ap); + wpa_flags = nm_access_point_get_wpa_flags (ap); + rsn_flags = nm_access_point_get_rsn_flags (ap); + ssid = nm_access_point_get_ssid (ap); + hwaddr = nm_access_point_get_hw_address (ap); + freq = nm_access_point_get_frequency (ap); + mode = nm_access_point_get_mode (ap); + bitrate = nm_access_point_get_max_bitrate (ap); + strength = nm_access_point_get_strength (ap); + + /* Convert to strings */ + ssid_str = ssid_to_printable ((const char *) ssid->data, ssid->len); + freq_str = g_strdup_printf (_("%u MHz"), freq); + bitrate_str = g_strdup_printf (_("%u MB/s"), bitrate/1000); + strength_str = g_strdup_printf ("%u", strength); + wpa_flags_str = ap_wpa_rsn_flags_to_string (wpa_flags); + rsn_flags_str = ap_wpa_rsn_flags_to_string (rsn_flags); + + security_str = g_string_new (NULL); + if ( !(flags & NM_802_11_AP_FLAGS_PRIVACY) + && (wpa_flags != NM_802_11_AP_SEC_NONE) + && (rsn_flags != NM_802_11_AP_SEC_NONE)) + g_string_append (security_str, _("Encrypted: ")); + + if ( (flags & NM_802_11_AP_FLAGS_PRIVACY) + && (wpa_flags == NM_802_11_AP_SEC_NONE) + && (rsn_flags == NM_802_11_AP_SEC_NONE)) + g_string_append (security_str, _("WEP ")); + if (wpa_flags != NM_802_11_AP_SEC_NONE) + g_string_append (security_str, _("WPA ")); + if (rsn_flags != NM_802_11_AP_SEC_NONE) + g_string_append (security_str, _("WPA2 ")); + if ( (wpa_flags & NM_802_11_AP_SEC_KEY_MGMT_802_1X) + || (rsn_flags & NM_802_11_AP_SEC_KEY_MGMT_802_1X)) + g_string_append (security_str, _("Enterprise ")); + + if (security_str->len > 0) + g_string_truncate (security_str, security_str->len-1); /* Chop off last space */ + + ap_name = g_strdup_printf ("AP%d", info->index++); /* AP */ + info->nmc->allowed_fields[0].value = ap_name; + info->nmc->allowed_fields[1].value = ssid_str; + info->nmc->allowed_fields[2].value = hwaddr; + info->nmc->allowed_fields[3].value = mode == NM_802_11_MODE_ADHOC ? _("Ad-Hoc") : mode == NM_802_11_MODE_INFRA ? _("Infrastructure") : _("Unknown"); + info->nmc->allowed_fields[4].value = freq_str; + info->nmc->allowed_fields[5].value = bitrate_str; + info->nmc->allowed_fields[6].value = strength_str; + info->nmc->allowed_fields[7].value = security_str->str; + info->nmc->allowed_fields[8].value = wpa_flags_str; + info->nmc->allowed_fields[9].value = rsn_flags_str; + info->nmc->allowed_fields[10].value = info->device; + info->nmc->allowed_fields[11].value = active ? _("yes") : _("no"); + + info->nmc->print_fields.flags &= ~NMC_PF_FLAG_MAIN_HEADER_ADD & ~NMC_PF_FLAG_MAIN_HEADER_ONLY & ~NMC_PF_FLAG_FIELD_NAMES; /* Clear header flags */ + print_fields (info->nmc->print_fields, info->nmc->allowed_fields); + + g_free (ap_name); + g_free (ssid_str); + g_free (freq_str); + g_free (bitrate_str); + g_free (strength_str); + g_free (wpa_flags_str); + g_free (rsn_flags_str); + g_string_free (security_str, TRUE); +} + +struct cb_info { + NMClient *client; + const GPtrArray *active; +}; + +static void +show_device_info (gpointer data, gpointer user_data) +{ + NMDevice *device = NM_DEVICE (data); + NmCli *nmc = (NmCli *) user_data; + GError *error = NULL; + APInfo *info; + char *tmp; + const char *hwaddr = NULL; + NMDeviceState state = NM_DEVICE_STATE_UNKNOWN; + guint32 caps; + guint32 speed; + char *speed_str = NULL; + const GArray *array; + GArray *sections_array; + int k; + char *fields_str; + char *fields_all = NMC_FIELDS_DEV_LIST_SECTIONS_ALL; + char *fields_common = NMC_FIELDS_DEV_LIST_SECTIONS_COMMON; + guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; + guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; + guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; + gboolean was_output = FALSE; + + if (!nmc->required_fields || strcasecmp (nmc->required_fields, "common") == 0) + fields_str = fields_common; + else if (!nmc->required_fields || strcasecmp (nmc->required_fields, "all") == 0) + fields_str = fields_all; + else + fields_str = nmc->required_fields; + + sections_array = parse_output_fields (fields_str, nmc_fields_dev_list_sections, &error); + if (error) { + if (error->code == 0) + g_string_printf (nmc->return_text, _("Error: 'dev list': %s"), error->message); + else + g_string_printf (nmc->return_text, _("Error: 'dev list': %s; allowed fields: %s"), error->message, NMC_FIELDS_DEV_LIST_SECTIONS_ALL); + g_error_free (error); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + return; + } + + /* Main header */ + nmc->allowed_fields = nmc_fields_dev_list_general; + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_MAIN_HEADER_ONLY; + nmc->print_fields.header_name = _("Device details"); + nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_DEV_LIST_GENERAL_ALL, nmc->allowed_fields, NULL); + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */ + + /* Loop through the required sections and print them. */ + for (k = 0; k < sections_array->len; k++) { + int section_idx = g_array_index (sections_array, int, k); + + if (nmc->print_output != NMC_PRINT_TERSE && !nmc->multiline_output && was_output) + printf ("\n"); /* Empty line */ + + was_output = FALSE; + + state = nm_device_get_state (device); + + /* section GENERAL */ + if (!strcasecmp (nmc_fields_dev_list_sections[section_idx].name, nmc_fields_dev_list_sections[0].name)) { + nmc->allowed_fields = nmc_fields_dev_list_general; + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES; + nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_DEV_LIST_GENERAL_ALL, nmc->allowed_fields, NULL); + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */ + + if (NM_IS_DEVICE_ETHERNET (device)) + hwaddr = nm_device_ethernet_get_hw_address (NM_DEVICE_ETHERNET (device)); + else if (NM_IS_DEVICE_WIFI (device)) + hwaddr = nm_device_wifi_get_hw_address (NM_DEVICE_WIFI (device)); + + nmc->allowed_fields[0].value = nmc_fields_dev_list_sections[0].name; /* "GENERAL"*/ + nmc->allowed_fields[1].value = nm_device_get_iface (device); + nmc->allowed_fields[2].value = get_device_type (device); + nmc->allowed_fields[3].value = nm_device_get_driver (device) ? nm_device_get_driver (device) : _("(unknown)"); + nmc->allowed_fields[4].value = hwaddr ? hwaddr : _("unknown)"); + nmc->allowed_fields[5].value = device_state_to_string (state); + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ + was_output = TRUE; + } + + /* section CAPABILITIES */ + if (!strcasecmp (nmc_fields_dev_list_sections[section_idx].name, nmc_fields_dev_list_sections[1].name)) { + nmc->allowed_fields = nmc_fields_dev_list_cap; + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES; + nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_DEV_LIST_CAP_ALL, nmc->allowed_fields, NULL); + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */ + + caps = nm_device_get_capabilities (device); + speed = 0; + if (NM_IS_DEVICE_ETHERNET (device)) { + /* Speed in Mb/s */ + speed = nm_device_ethernet_get_speed (NM_DEVICE_ETHERNET (device)); + } else if (NM_IS_DEVICE_WIFI (device)) { + /* Speed in b/s */ + speed = nm_device_wifi_get_bitrate (NM_DEVICE_WIFI (device)); + speed /= 1000; + } + if (speed) + speed_str = g_strdup_printf (_("%u Mb/s"), speed); + + nmc->allowed_fields[0].value = nmc_fields_dev_list_sections[1].name; /* "CAPABILITIES" */ + nmc->allowed_fields[1].value = (caps & NM_DEVICE_CAP_CARRIER_DETECT) ? _("yes") : _("no"); + nmc->allowed_fields[2].value = speed_str ? speed_str : _("unknown"); + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ + g_free (speed_str); + was_output = TRUE; + } + + /* Wireless specific information */ + if ((NM_IS_DEVICE_WIFI (device))) { + guint32 wcaps; + NMAccessPoint *active_ap = NULL; + const char *active_bssid = NULL; + const GPtrArray *aps; + + /* section WIFI-PROPERTIES */ + if (!strcasecmp (nmc_fields_dev_list_sections[section_idx].name, nmc_fields_dev_list_sections[2].name)) { + wcaps = nm_device_wifi_get_capabilities (NM_DEVICE_WIFI (device)); + + nmc->allowed_fields = nmc_fields_dev_list_wifi_prop; + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES; + nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_DEV_LIST_WIFI_PROP_ALL, nmc->allowed_fields, NULL); + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */ + + nmc->allowed_fields[0].value = nmc_fields_dev_list_sections[2].name; /* "WIFI-PROPERTIES" */ + nmc->allowed_fields[1].value = (wcaps & (NM_WIFI_DEVICE_CAP_CIPHER_WEP40 | NM_WIFI_DEVICE_CAP_CIPHER_WEP104)) ? _("yes") : _("no"); + nmc->allowed_fields[2].value = (wcaps & NM_WIFI_DEVICE_CAP_WPA) ? _("yes") : _("no"); + nmc->allowed_fields[3].value = (wcaps & NM_WIFI_DEVICE_CAP_RSN) ? _("yes") : _("no"); + nmc->allowed_fields[4].value = (wcaps & NM_WIFI_DEVICE_CAP_CIPHER_TKIP) ? _("yes") : _("no"); + nmc->allowed_fields[5].value = (wcaps & NM_WIFI_DEVICE_CAP_CIPHER_CCMP) ? _("yes") : _("no"); + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ + was_output = TRUE; + } + + /* section AP */ + if (!strcasecmp (nmc_fields_dev_list_sections[section_idx].name, nmc_fields_dev_list_sections[3].name)) { + if (state == NM_DEVICE_STATE_ACTIVATED) { + active_ap = nm_device_wifi_get_active_access_point (NM_DEVICE_WIFI (device)); + active_bssid = active_ap ? nm_access_point_get_hw_address (active_ap) : NULL; + } + + nmc->allowed_fields = nmc_fields_dev_wifi_list; + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES; + nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_DEV_WIFI_LIST_FOR_DEV_LIST, nmc->allowed_fields, NULL); + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */ + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; + info = g_malloc0 (sizeof (APInfo)); + info->nmc = nmc; + info->index = 1; + info->active_bssid = active_bssid; + info->device = nm_device_get_iface (device); + aps = nm_device_wifi_get_access_points (NM_DEVICE_WIFI (device)); + if (aps && aps->len) + g_ptr_array_foreach ((GPtrArray *) aps, detail_access_point, (gpointer) info); + g_free (info); + was_output = TRUE; + } + } else if (NM_IS_DEVICE_ETHERNET (device)) { + /* WIRED-PROPERTIES */ + if (!strcasecmp (nmc_fields_dev_list_sections[section_idx].name, nmc_fields_dev_list_sections[4].name)) { + nmc->allowed_fields = nmc_fields_dev_list_wired_prop; + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES; + nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_DEV_LIST_WIRED_PROP_ALL, nmc->allowed_fields, NULL); + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */ + + nmc->allowed_fields[0].value = nmc_fields_dev_list_sections[4].name; /* "WIRED-PROPERTIES" */ + nmc->allowed_fields[1].value = (nm_device_ethernet_get_carrier (NM_DEVICE_ETHERNET (device))) ? _("on") : _("off"); + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ + was_output = TRUE; + } + } + + /* IP Setup info */ + if (state == NM_DEVICE_STATE_ACTIVATED) { + NMIP4Config *cfg = nm_device_get_ip4_config (device); + GSList *iter; + + /* IP4-SETTINGS */ + if (!strcasecmp (nmc_fields_dev_list_sections[section_idx].name, nmc_fields_dev_list_sections[5].name)) { + nmc->allowed_fields = nmc_fields_dev_list_ip4_settings; + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES; + nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_DEV_LIST_IP4_SETTINGS_ALL, nmc->allowed_fields, NULL); + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */ + + for (iter = (GSList *) nm_ip4_config_get_addresses (cfg); iter; iter = g_slist_next (iter)) { + NMIP4Address *addr = (NMIP4Address *) iter->data; + guint32 prefix = nm_ip4_address_get_prefix (addr); + char *tmp2; + char *addr_str, *prefix_str, *gateway_str; + + addr_str = ip4_address_as_string (nm_ip4_address_get_address (addr)); + + tmp2 = ip4_address_as_string (nm_utils_ip4_prefix_to_netmask (prefix)); + prefix_str = g_strdup_printf ("%d (%s)", prefix, tmp2); + g_free (tmp2); + + gateway_str = ip4_address_as_string (nm_ip4_address_get_gateway (addr)); + + nmc->allowed_fields[0].value = nmc_fields_dev_list_sections[5].name; /* "IP4-SETTINGS" */ + nmc->allowed_fields[1].value = addr_str; + nmc->allowed_fields[2].value = prefix_str; + nmc->allowed_fields[3].value = gateway_str; + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ + g_free (addr_str); + g_free (prefix_str); + g_free (gateway_str); + } + was_output = TRUE; + } + /* IP4-DNS */ + if (!strcasecmp (nmc_fields_dev_list_sections[section_idx].name, nmc_fields_dev_list_sections[6].name)) { + array = nm_ip4_config_get_nameservers (cfg); + if (array) { + int i; + + nmc->allowed_fields = nmc_fields_dev_list_ip4_dns; + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES; + nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_DEV_LIST_IP4_DNS_ALL, nmc->allowed_fields, NULL); + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */ + + for (i = 0; i < array->len; i++) { + char *dns_name = g_strdup_printf ("%s%d", nmc_fields_dev_list_sections[6].name, i+1); + tmp = ip4_address_as_string (g_array_index (array, guint32, i)); + nmc->allowed_fields[0].value = dns_name; /* "IP4-DNS" */ + nmc->allowed_fields[1].value = tmp; + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ + g_free (tmp); + g_free (dns_name); + } + } + was_output = TRUE; + } + } + } + + if (sections_array) + g_array_free (sections_array, TRUE); +} + +static void +show_device_status (NMDevice *device, NmCli *nmc) +{ + nmc->allowed_fields[0].value = nm_device_get_iface (device); + nmc->allowed_fields[1].value = get_device_type (device); + nmc->allowed_fields[2].value = device_state_to_string (nm_device_get_state (device)); + + nmc->print_fields.flags &= ~NMC_PF_FLAG_MAIN_HEADER_ADD & ~NMC_PF_FLAG_MAIN_HEADER_ONLY & ~NMC_PF_FLAG_FIELD_NAMES; /* Clear header flags */ + print_fields (nmc->print_fields, nmc->allowed_fields); +} + +static NMCResultCode +do_devices_status (NmCli *nmc, int argc, char **argv) +{ + GError *error = NULL; + const GPtrArray *devices; + int i; + char *fields_str; + char *fields_all = NMC_FIELDS_DEV_STATUS_ALL; + char *fields_common = NMC_FIELDS_DEV_STATUS_COMMON; + guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; + guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; + guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; + + while (argc > 0) { + fprintf (stderr, _("Unknown parameter: %s\n"), *argv); + argc--; + argv++; + } + + /* create NMClient */ + if (!nmc->get_client (nmc)) + goto error; + + devices = nm_client_get_devices (nmc->client); + + if (!nmc->required_fields || strcasecmp (nmc->required_fields, "common") == 0) + fields_str = fields_common; + else if (!nmc->required_fields || strcasecmp (nmc->required_fields, "all") == 0) + fields_str = fields_all; + else + fields_str = nmc->required_fields; + + nmc->allowed_fields = nmc_fields_dev_status; + nmc->print_fields.indices = parse_output_fields (fields_str, nmc->allowed_fields, &error); + + if (error) { + if (error->code == 0) + g_string_printf (nmc->return_text, _("Error: 'dev status': %s"), error->message); + else + g_string_printf (nmc->return_text, _("Error: 'dev status': %s; allowed fields: %s"), error->message, NMC_FIELDS_DEV_STATUS_ALL); + g_error_free (error); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + goto error; + } + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_MAIN_HEADER_ADD | NMC_PF_FLAG_FIELD_NAMES; + nmc->print_fields.header_name = _("Status of devices"); + print_fields (nmc->print_fields, nmc->allowed_fields); + + for (i = 0; devices && (i < devices->len); i++) { + NMDevice *device = g_ptr_array_index (devices, i); + show_device_status (device, nmc); + } + + return NMC_RESULT_SUCCESS; + +error: + return nmc->return_value; +} + +static NMCResultCode +do_devices_list (NmCli *nmc, int argc, char **argv) +{ + const GPtrArray *devices; + NMDevice *device = NULL; + const char *iface = NULL; + gboolean iface_specified = FALSE; + int i; + + while (argc > 0) { + if (strcmp (*argv, "iface") == 0) { + iface_specified = TRUE; + + if (next_arg (&argc, &argv) != 0) { + g_string_printf (nmc->return_text, _("Error: '%s' argument is missing."), *argv); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + goto error; + } + + iface = *argv; + } else { + fprintf (stderr, _("Unknown parameter: %s\n"), *argv); + } + + argc--; + argv++; + } + + /* create NMClient */ + if (!nmc->get_client (nmc)) + goto error; + + devices = nm_client_get_devices (nmc->client); + + if (iface_specified) { + for (i = 0; devices && (i < devices->len); i++) { + NMDevice *candidate = g_ptr_array_index (devices, i); + const char *dev_iface = nm_device_get_iface (candidate); + + if (!strcmp (dev_iface, iface)) + device = candidate; + } + if (!device) { + g_string_printf (nmc->return_text, _("Error: Device '%s' not found."), iface); + nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; + goto error; + } + show_device_info (device, nmc); + } else { + if (devices) + g_ptr_array_foreach ((GPtrArray *) devices, show_device_info, nmc); + } + +error: + return nmc->return_value; +} + +static void +device_state_cb (NMDevice *device, GParamSpec *pspec, gpointer user_data) +{ + NmCli *nmc = (NmCli *) user_data; + NMDeviceState state; + + state = nm_device_get_state (device); + + if (state == NM_DEVICE_STATE_DISCONNECTED) { + g_string_printf (nmc->return_text, _("Success: Device '%s' successfully disconnected."), nm_device_get_iface (device)); + quit (); + } +} + +static gboolean +timeout_cb (gpointer user_data) +{ + /* Time expired -> exit nmcli */ + + NmCli *nmc = (NmCli *) user_data; + + g_string_printf (nmc->return_text, _("Error: Timeout %d sec expired."), nmc->timeout); + nmc->return_value = NMC_RESULT_ERROR_TIMEOUT_EXPIRED; + quit (); + return FALSE; +} + +static void +disconnect_device_cb (NMDevice *device, GError *error, gpointer user_data) +{ + NmCli *nmc = (NmCli *) user_data; + NMDeviceState state; + + if (error) { + g_string_printf (nmc->return_text, _("Error: Device '%s' (%s) disconnecting failed: %s"), + nm_device_get_iface (device), + nm_object_get_path (NM_OBJECT (device)), + error->message ? error->message : _("(unknown)")); + nmc->return_value = NMC_RESULT_ERROR_DEV_DISCONNECT; + quit (); + } else { + state = nm_device_get_state (device); + printf (_("Device state: %d (%s)\n"), state, device_state_to_string (state)); + + if (!nmc->should_wait || state == NM_DEVICE_STATE_DISCONNECTED) { + /* Don't want to wait or device already disconnected */ + quit (); + } else { + g_signal_connect (device, "notify::state", G_CALLBACK (device_state_cb), nmc); + /* Start timer not to loop forever if "notify::state" signal is not issued */ + g_timeout_add_seconds (nmc->timeout, timeout_cb, nmc); + } + + } +} + +static NMCResultCode +do_device_disconnect (NmCli *nmc, int argc, char **argv) +{ + const GPtrArray *devices; + NMDevice *device = NULL; + const char *iface = NULL; + gboolean iface_specified = FALSE; + gboolean wait = TRUE; + int i; + + /* Set default timeout for disconnect operation */ + nmc->timeout = 10; + + while (argc > 0) { + if (strcmp (*argv, "iface") == 0) { + iface_specified = TRUE; + + if (next_arg (&argc, &argv) != 0) { + g_string_printf (nmc->return_text, _("Error: %s argument is missing."), *argv); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + goto error; + } + + iface = *argv; + } else if (strcmp (*argv, "--nowait") == 0) { + wait = FALSE; + } else if (strcmp (*argv, "--timeout") == 0) { + if (next_arg (&argc, &argv) != 0) { + g_string_printf (nmc->return_text, _("Error: %s argument is missing."), *argv); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + goto error; + } + + errno = 0; + nmc->timeout = strtol (*argv, NULL, 10); + if (errno || nmc->timeout < 0) { + g_string_printf (nmc->return_text, _("Error: timeout value '%s' is not valid."), *argv); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + goto error; + } + + } else { + fprintf (stderr, _("Unknown parameter: %s\n"), *argv); + } + + argc--; + argv++; + } + + if (!iface_specified) { + g_string_printf (nmc->return_text, _("Error: iface has to be specified.")); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + goto error; + } + + /* create NMClient */ + if (!nmc->get_client (nmc)) + goto error; + + devices = nm_client_get_devices (nmc->client); + for (i = 0; devices && (i < devices->len); i++) { + NMDevice *candidate = g_ptr_array_index (devices, i); + const char *dev_iface = nm_device_get_iface (candidate); + + if (!strcmp (dev_iface, iface)) + device = candidate; + } + + if (!device) { + g_string_printf (nmc->return_text, _("Error: Device '%s' not found."), iface); + nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; + goto error; + } + + nmc->should_wait = wait; + nm_device_disconnect (device, disconnect_device_cb, nmc); + +error: + return nmc->return_value; +} + +static void +show_acces_point_info (NMDevice *device, NmCli *nmc) +{ + NMAccessPoint *active_ap = NULL; + const char *active_bssid = NULL; + const GPtrArray *aps; + APInfo *info; + + if (nm_device_get_state (device) == NM_DEVICE_STATE_ACTIVATED) { + active_ap = nm_device_wifi_get_active_access_point (NM_DEVICE_WIFI (device)); + active_bssid = active_ap ? nm_access_point_get_hw_address (active_ap) : NULL; + } + + info = g_malloc0 (sizeof (APInfo)); + info->nmc = nmc; + info->index = 1; + info->active_bssid = active_bssid; + info->device = nm_device_get_iface (device); + aps = nm_device_wifi_get_access_points (NM_DEVICE_WIFI (device)); + if (aps && aps->len) + g_ptr_array_foreach ((GPtrArray *) aps, detail_access_point, (gpointer) info); + g_free (info); +} + +static NMCResultCode +do_device_wifi_list (NmCli *nmc, int argc, char **argv) +{ + GError *error = NULL; + NMDevice *device = NULL; + NMAccessPoint *ap = NULL; + const char *iface = NULL; + const char *hwaddr_user = NULL; + const GPtrArray *devices; + const GPtrArray *aps; + APInfo *info; + int i, j; + char *fields_str; + char *fields_all = NMC_FIELDS_DEV_WIFI_LIST_ALL; + char *fields_common = NMC_FIELDS_DEV_WIFI_LIST_COMMON; + guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; + guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; + guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; + + while (argc > 0) { + if (strcmp (*argv, "iface") == 0) { + if (next_arg (&argc, &argv) != 0) { + g_string_printf (nmc->return_text, _("Error: %s argument is missing."), *argv); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + goto error; + } + iface = *argv; + } else if (strcmp (*argv, "hwaddr") == 0) { + if (next_arg (&argc, &argv) != 0) { + g_string_printf (nmc->return_text, _("Error: %s argument is missing."), *argv); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + goto error; + } + hwaddr_user = *argv; + } else { + fprintf (stderr, _("Unknown parameter: %s\n"), *argv); + } + + argc--; + argv++; + } + + /* create NMClient */ + if (!nmc->get_client (nmc)) + goto error; + + devices = nm_client_get_devices (nmc->client); + + if (!nmc->required_fields || strcasecmp (nmc->required_fields, "common") == 0) + fields_str = fields_common; + else if (!nmc->required_fields || strcasecmp (nmc->required_fields, "all") == 0) + fields_str = fields_all; + else + fields_str = nmc->required_fields; + + nmc->allowed_fields = nmc_fields_dev_wifi_list; + nmc->print_fields.indices = parse_output_fields (fields_str, nmc->allowed_fields, &error); + + if (error) { + if (error->code == 0) + g_string_printf (nmc->return_text, _("Error: 'dev wifi': %s"), error->message); + else + g_string_printf (nmc->return_text, _("Error: 'dev wifi': %s; allowed fields: %s"), error->message, NMC_FIELDS_DEV_WIFI_LIST_ALL); + g_error_free (error); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + goto error; + } + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_MAIN_HEADER_ADD | NMC_PF_FLAG_FIELD_NAMES; + nmc->print_fields.header_name = _("WiFi scan list"); + + if (iface) { + /* Device specified - list only APs of this interface */ + for (i = 0; devices && (i < devices->len); i++) { + NMDevice *candidate = g_ptr_array_index (devices, i); + const char *dev_iface = nm_device_get_iface (candidate); + + if (!strcmp (dev_iface, iface)) { + device = candidate; + break; + } + } + + if (!device) { + g_string_printf (nmc->return_text, _("Error: Device '%s' not found."), iface); + nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; + goto error; + } + + if (NM_IS_DEVICE_WIFI (device)) { + if (hwaddr_user) { + /* Specific AP requested - list only that */ + aps = nm_device_wifi_get_access_points (NM_DEVICE_WIFI (device)); + for (j = 0; aps && (j < aps->len); j++) { + char *hwaddr_up; + NMAccessPoint *candidate_ap = g_ptr_array_index (aps, j); + const char *candidate_hwaddr = nm_access_point_get_hw_address (candidate_ap); + + hwaddr_up = g_ascii_strup (hwaddr_user, -1); + if (!strcmp (hwaddr_up, candidate_hwaddr)) + ap = candidate_ap; + g_free (hwaddr_up); + } + if (!ap) { + g_string_printf (nmc->return_text, _("Error: Access point with hwaddr '%s' not found."), hwaddr_user); + nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; + goto error; + } + info = g_malloc0 (sizeof (APInfo)); + info->nmc = nmc; + info->index = 1; + info->active_bssid = NULL; + info->device = nm_device_get_iface (device); + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */ + detail_access_point (ap, info); + g_free (info); + } else { + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */ + show_acces_point_info (device, nmc); + } + } else { + g_string_printf (nmc->return_text, _("Error: Device '%s' is not a WiFi device."), iface); + nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; + goto error; + } + } else { + /* List APs for all devices */ + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */ + if (hwaddr_user) { + /* Specific AP requested - list only that */ + for (i = 0; devices && (i < devices->len); i++) { + NMDevice *dev = g_ptr_array_index (devices, i); + + if (!NM_IS_DEVICE_WIFI (dev)) + continue; + + aps = nm_device_wifi_get_access_points (NM_DEVICE_WIFI (dev)); + for (j = 0; aps && (j < aps->len); j++) { + char *hwaddr_up; + NMAccessPoint *candidate_ap = g_ptr_array_index (aps, j); + const char *candidate_hwaddr = nm_access_point_get_hw_address (candidate_ap); + + hwaddr_up = g_ascii_strup (hwaddr_user, -1); + if (!strcmp (hwaddr_up, candidate_hwaddr)) { + ap = candidate_ap; + + info = g_malloc0 (sizeof (APInfo)); + info->nmc = nmc; + info->index = 1; + info->active_bssid = NULL; + info->device = nm_device_get_iface (dev); + detail_access_point (ap, info); + g_free (info); + } + g_free (hwaddr_up); + } + } + if (!ap) { + g_string_printf (nmc->return_text, _("Error: Access point with hwaddr '%s' not found."), hwaddr_user); + nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; + goto error; + } + } else { + for (i = 0; devices && (i < devices->len); i++) { + NMDevice *dev = g_ptr_array_index (devices, i); + if (NM_IS_DEVICE_WIFI (dev)) + show_acces_point_info (dev, nmc); + } + } + } + +error: + return nmc->return_value; +} + +static NMCResultCode +do_device_wifi (NmCli *nmc, int argc, char **argv) +{ + if (argc == 0) + nmc->return_value = do_device_wifi_list (nmc, argc-1, argv+1); + else if (argc > 0) { + if (matches (*argv, "list") == 0) { + nmc->return_value = do_device_wifi_list (nmc, argc-1, argv+1); + } + else { + g_string_printf (nmc->return_text, _("Error: 'dev wifi' command '%s' is not valid."), *argv); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + } + } + + return nmc->return_value; +} + + +NMCResultCode +do_devices (NmCli *nmc, int argc, char **argv) +{ + GError *error = NULL; + + /* create NMClient */ + if (!nmc->get_client (nmc)) + goto end; + + if (argc == 0) { + if (!nmc_terse_option_check (nmc->print_output, nmc->required_fields, &error)) + goto opt_error; + nmc->return_value = do_devices_status (nmc, 0, NULL); + } + + if (argc > 0) { + if (matches (*argv, "status") == 0) { + if (!nmc_terse_option_check (nmc->print_output, nmc->required_fields, &error)) + goto opt_error; + nmc->return_value = do_devices_status (nmc, argc-1, argv+1); + } + else if (matches (*argv, "list") == 0) { + if (!nmc->mode_specified) + nmc->multiline_output = TRUE; /* multiline mode is default for 'dev list' */ + nmc->return_value = do_devices_list (nmc, argc-1, argv+1); + } + else if (matches (*argv, "disconnect") == 0) { + nmc->return_value = do_device_disconnect (nmc, argc-1, argv+1); + } + else if (matches (*argv, "wifi") == 0) { + if (!nmc_terse_option_check (nmc->print_output, nmc->required_fields, &error)) + goto opt_error; + nmc->return_value = do_device_wifi (nmc, argc-1, argv+1); + } + else if (strcmp (*argv, "help") == 0) { + usage (); + } + else { + g_string_printf (nmc->return_text, _("Error: 'dev' command '%s' is not valid."), *argv); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + } + } + +end: + return nmc->return_value; + +opt_error: + g_string_printf (nmc->return_text, _("Error: %s."), error->message); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + g_error_free (error); + return nmc->return_value; +} diff --git a/cli/src/devices.h b/cli/src/devices.h new file mode 100644 index 0000000000..152dd20776 --- /dev/null +++ b/cli/src/devices.h @@ -0,0 +1,27 @@ +/* nmcli - command-line tool to control NetworkManager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * (C) Copyright 2010 Red Hat, Inc. + */ + +#ifndef NMC_DEVICES_H +#define NMC_DEVICES_H + +#include "nmcli.h" + +NMCResultCode do_devices (NmCli *nmc, int argc, char **argv); + +#endif /* NMC_DEVICES_H */ diff --git a/cli/src/network-manager.c b/cli/src/network-manager.c new file mode 100644 index 0000000000..b65dfcd7bd --- /dev/null +++ b/cli/src/network-manager.c @@ -0,0 +1,278 @@ +/* nmcli - command-line tool to control NetworkManager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * (C) Copyright 2010 Red Hat, Inc. + */ + +#include +#include +#include + +#include +#include +#include +#include + +#include "utils.h" +#include "network-manager.h" + + +/* Available fields for 'nm status' */ +static NmcOutputField nmc_fields_nm_status[] = { + {"RUNNING", N_("RUNNING"), 15, NULL, 0}, /* 0 */ + {"STATE", N_("STATE"), 15, NULL, 0}, /* 1 */ + {"WIFI-HARDWARE", N_("WIFI-HARDWARE"), 15, NULL, 0}, /* 2 */ + {"WIFI", N_("WIFI"), 10, NULL, 0}, /* 3 */ + {"WWAN-HARDWARE", N_("WWAN-HARDWARE"), 15, NULL, 0}, /* 4 */ + {"WWAN", N_("WWAN"), 10, NULL, 0}, /* 5 */ + {NULL, NULL, 0, NULL, 0} +}; +#define NMC_FIELDS_NM_STATUS_ALL "RUNNING,STATE,WIFI-HARDWARE,WIFI,WWAN-HARDWARE,WWAN" +#define NMC_FIELDS_NM_STATUS_COMMON "RUNNING,STATE,WIFI-HARDWARE,WIFI,WWAN-HARDWARE,WWAN" +#define NMC_FIELDS_NM_WIFI "WIFI" +#define NMC_FIELDS_NM_WWAN "WWAN" + + +extern GMainLoop *loop; + +/* static function prototypes */ +static void usage (void); +static void quit (void); +static const char *nm_state_to_string (NMState state); +static NMCResultCode show_nm_status (NmCli *nmc); + + +static void +usage (void) +{ + fprintf (stderr, + _("Usage: nmcli nm { COMMAND | help }\n\n" + " COMMAND := { status | sleep | wakeup | wifi | wwan }\n\n" + " status\n" + " sleep\n" + " wakeup\n" + " wifi [on|off]\n" + " wwan [on|off]\n\n")); +} + +/* quit main loop */ +static void +quit (void) +{ + g_main_loop_quit (loop); /* quit main loop */ +} + +static const char * +nm_state_to_string (NMState state) +{ + switch (state) { + case NM_STATE_ASLEEP: + return _("asleep"); + case NM_STATE_CONNECTING: + return _("connecting"); + case NM_STATE_CONNECTED: + return _("connected"); + case NM_STATE_DISCONNECTED: + return _("disconnected"); + case NM_STATE_UNKNOWN: + default: + return _("unknown"); + } +} + +static NMCResultCode +show_nm_status (NmCli *nmc) +{ + gboolean nm_running; + NMState state; + const char *wireless_hw_enabled_str, *wireless_enabled_str; + const char *wwan_hw_enabled_str, *wwan_enabled_str; + GError *error = NULL; + const char *fields_str; + const char *fields_all = NMC_FIELDS_NM_STATUS_ALL; + const char *fields_common = NMC_FIELDS_NM_STATUS_COMMON; + guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; + guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; + guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; + + g_return_val_if_fail (nmc->client != NULL, NMC_RESULT_ERROR_UNKNOWN); + + if (!nmc->required_fields || strcasecmp (nmc->required_fields, "common") == 0) + fields_str = fields_common; + else if (!nmc->required_fields || strcasecmp (nmc->required_fields, "all") == 0) + fields_str = fields_all; + else + fields_str = nmc->required_fields; + + nmc->allowed_fields = nmc_fields_nm_status; + nmc->print_fields.indices = parse_output_fields (fields_str, nmc->allowed_fields, &error); + + if (error) { + if (error->code == 0) + g_string_printf (nmc->return_text, _("Error: 'nm status': %s"), error->message); + else + g_string_printf (nmc->return_text, _("Error: 'nm status': %s; allowed fields: %s"), error->message, NMC_FIELDS_NM_STATUS_ALL); + g_error_free (error); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + return nmc->return_value; + } + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_MAIN_HEADER_ADD | NMC_PF_FLAG_FIELD_NAMES; + nmc->print_fields.header_name = _("NetworkManager status"); + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */ + + nm_running = nm_client_get_manager_running (nmc->client); + state = nm_client_get_state (nmc->client); + if (nm_running) { + wireless_hw_enabled_str = nm_client_wireless_hardware_get_enabled (nmc->client) ? _("enabled") : _("disabled"); + wireless_enabled_str = nm_client_wireless_get_enabled (nmc->client) ? _("enabled") : _("disabled"); + wwan_hw_enabled_str = nm_client_wwan_hardware_get_enabled (nmc->client) ? _("enabled") : _("disabled"); + wwan_enabled_str = nm_client_wwan_get_enabled (nmc->client) ? _("enabled") : _("disabled"); + } else { + wireless_hw_enabled_str = wireless_enabled_str = wwan_hw_enabled_str = wwan_enabled_str = _("unknown"); + } + + nmc->allowed_fields[0].value = nm_running ? _("running") : _("not running"); + nmc->allowed_fields[1].value = nm_state_to_string (state); + nmc->allowed_fields[2].value = wireless_hw_enabled_str; + nmc->allowed_fields[3].value = wireless_enabled_str; + nmc->allowed_fields[4].value = wwan_hw_enabled_str; + nmc->allowed_fields[5].value = wwan_enabled_str; + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ + + return NMC_RESULT_SUCCESS; +} + + +/* entry point function for global network manager related commands 'nmcli nm' */ +NMCResultCode +do_network_manager (NmCli *nmc, int argc, char **argv) +{ + GError *error = NULL; + gboolean enable_wifi; + gboolean enable_wwan; + guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; + guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; + guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; + + /* create NMClient */ + if (!nmc->get_client (nmc)) + goto end; + + if (argc == 0) { + if (!nmc_terse_option_check (nmc->print_output, nmc->required_fields, &error)) + goto opt_error; + nmc->return_value = show_nm_status (nmc); + } + + if (argc > 0) { + if (matches (*argv, "status") == 0) { + if (!nmc_terse_option_check (nmc->print_output, nmc->required_fields, &error)) + goto opt_error; + nmc->return_value = show_nm_status (nmc); + } + else if (matches (*argv, "sleep") == 0) { + nm_client_sleep (nmc->client, TRUE); + } + else if (matches (*argv, "wakeup") == 0) { + nm_client_sleep (nmc->client, FALSE); + } + else if (matches (*argv, "wifi") == 0) { + if (next_arg (&argc, &argv) != 0) { + /* no argument, show current WiFi state */ + if (!nmc_terse_option_check (nmc->print_output, nmc->required_fields, &error)) + goto opt_error; + if (nmc->required_fields && strcasecmp (nmc->required_fields, "WIFI")) { + g_string_printf (nmc->return_text, _("Error: '--fields' value '%s' is not valid here; allowed fields: %s"), + nmc->required_fields, NMC_FIELDS_NM_WIFI); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + goto end; + } + nmc->allowed_fields = nmc_fields_nm_status; + nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_NM_WIFI, nmc->allowed_fields, NULL); + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_MAIN_HEADER_ADD | NMC_PF_FLAG_FIELD_NAMES; + nmc->print_fields.header_name = _("WiFi enabled"); + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */ + nmc->allowed_fields[3].value = nm_client_wireless_get_enabled (nmc->client) ? _("enabled") : _("disabled"); + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */ + } else { + if (!strcmp (*argv, "on")) + enable_wifi = TRUE; + else if (!strcmp (*argv, "off")) + enable_wifi = FALSE; + else { + g_string_printf (nmc->return_text, _("Error: invalid 'wifi' parameter: '%s'."), *argv); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + goto end; + } + nm_client_wireless_set_enabled (nmc->client, enable_wifi); + } + } + else if (matches (*argv, "wwan") == 0) { + if (next_arg (&argc, &argv) != 0) { + if (!nmc_terse_option_check (nmc->print_output, nmc->required_fields, &error)) + goto opt_error; + /* no argument, show current WWAN state */ + if (nmc->required_fields && strcasecmp (nmc->required_fields, "WWAN")) { + g_string_printf (nmc->return_text, _("Error: '--fields' value '%s' is not valid here; allowed fields: %s"), + nmc->required_fields, NMC_FIELDS_NM_WWAN); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + goto end; + } + nmc->allowed_fields = nmc_fields_nm_status; + nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_NM_WWAN, nmc->allowed_fields, NULL); + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_MAIN_HEADER_ADD | NMC_PF_FLAG_FIELD_NAMES; + nmc->print_fields.header_name = _("WWAN enabled"); + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */ + nmc->allowed_fields[5].value = nm_client_wwan_get_enabled (nmc->client) ? _("enabled") : _("disabled"); + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print header */ + } else { + if (!strcmp (*argv, "on")) + enable_wwan = TRUE; + else if (!strcmp (*argv, "off")) + enable_wwan = FALSE; + else { + g_string_printf (nmc->return_text, _("Error: invalid 'wwan' parameter: '%s'."), *argv); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + goto end; + } + nm_client_wwan_set_enabled (nmc->client, enable_wwan); + } + } + else if (strcmp (*argv, "help") == 0) { + usage (); + } + else { + g_string_printf (nmc->return_text, _("Error: 'nm' command '%s' is not valid."), *argv); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + } + } + +end: + quit (); + return nmc->return_value; + +opt_error: + quit (); + g_string_printf (nmc->return_text, _("Error: %s."), error->message); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + g_error_free (error); + return nmc->return_value; +} diff --git a/cli/src/network-manager.h b/cli/src/network-manager.h new file mode 100644 index 0000000000..93cc1b077f --- /dev/null +++ b/cli/src/network-manager.h @@ -0,0 +1,27 @@ +/* nmcli - command-line tool to control NetworkManager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * (C) Copyright 2010 Red Hat, Inc. + */ + +#ifndef NMC_NETWORK_MANAGER_H +#define NMC_NETWORK_MANAGER_H + +#include "nmcli.h" + +NMCResultCode do_network_manager (NmCli *nmc, int argc, char **argv); + +#endif /* NMC_NETWORK_MANAGER_H */ diff --git a/cli/src/nmcli.c b/cli/src/nmcli.c new file mode 100644 index 0000000000..328a6d8ee5 --- /dev/null +++ b/cli/src/nmcli.c @@ -0,0 +1,363 @@ +/* nmcli - command-line tool to control NetworkManager + * + * Jiri Klimes + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * (C) Copyright 2010 Red Hat, Inc. + */ + +/* Generated configuration file */ +#include "config.h" + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "nmcli.h" +#include "utils.h" +#include "connections.h" +#include "devices.h" +#include "network-manager.h" + +#if defined(NM_DIST_VERSION) +# define NMCLI_VERSION NM_DIST_VERSION +#else +# define NMCLI_VERSION VERSION +#endif + + +typedef struct { + NmCli *nmc; + int argc; + char **argv; +} ArgsInfo; + +/* --- Global variables --- */ +GMainLoop *loop = NULL; + + +static void +usage (const char *prog_name) +{ + fprintf (stderr, + _("Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n\n" + "OPTIONS\n" + " -t[erse] terse output\n" + " -p[retty] pretty output\n" + " -m[ode] tabular|multiline output mode\n" + " -f[ields] |all|common specify fields to output\n" + " -e[scape] yes|no escape columns separators in values\n" + " -v[ersion] show program version\n" + " -h[elp] print this help\n\n" + "OBJECT\n" + " nm NetworkManager status\n" + " con NetworkManager connections\n" + " dev devices managed by NetworkManager\n\n"), + prog_name); +} + +static NMCResultCode +do_help (NmCli *nmc, int argc, char **argv) +{ + usage ("nmcli"); + return NMC_RESULT_SUCCESS; +} + +static const struct cmd { + const char *cmd; + NMCResultCode (*func) (NmCli *nmc, int argc, char **argv); +} nmcli_cmds[] = { + { "nm", do_network_manager }, + { "con", do_connections }, + { "dev", do_devices }, + { "help", do_help }, + { 0 } +}; + +static NMCResultCode +do_cmd (NmCli *nmc, const char *argv0, int argc, char **argv) +{ + const struct cmd *c; + + for (c = nmcli_cmds; c->cmd; ++c) { + if (matches (argv0, c->cmd) == 0) + return c->func (nmc, argc-1, argv+1); + } + + g_string_printf (nmc->return_text, _("Error: Object '%s' is unknown, try 'nmcli help'."), argv0); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + return nmc->return_value; +} + +static NMCResultCode +parse_command_line (NmCli *nmc, int argc, char **argv) +{ + char *base; + + base = strrchr (argv[0], '/'); + if (base == NULL) + base = argv[0]; + else + base++; + + /* parse options */ + while (argc > 1) { + char *opt = argv[1]; + /* '--' ends options */ + if (strcmp (opt, "--") == 0) { + argc--; argv++; + break; + } + if (opt[0] != '-') + break; + if (opt[1] == '-') + opt++; + if (matches (opt, "-terse") == 0) { + if (nmc->print_output == NMC_PRINT_TERSE) { + g_string_printf (nmc->return_text, _("Error: Option '--terse' is specified the second time.")); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + return nmc->return_value; + } + else if (nmc->print_output == NMC_PRINT_PRETTY) { + g_string_printf (nmc->return_text, _("Error: Option '--terse' is mutually exclusive with '--pretty'.")); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + return nmc->return_value; + } + else + nmc->print_output = NMC_PRINT_TERSE; + } else if (matches (opt, "-pretty") == 0) { + if (nmc->print_output == NMC_PRINT_PRETTY) { + g_string_printf (nmc->return_text, _("Error: Option '--pretty' is specified the second time.")); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + return nmc->return_value; + } + else if (nmc->print_output == NMC_PRINT_TERSE) { + g_string_printf (nmc->return_text, _("Error: Option '--pretty' is mutually exclusive with '--terse'.")); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + return nmc->return_value; + } + else + nmc->print_output = NMC_PRINT_PRETTY; + } else if (matches (opt, "-mode") == 0) { + nmc->mode_specified = TRUE; + next_arg (&argc, &argv); + if (argc <= 1) { + g_string_printf (nmc->return_text, _("Error: missing argument for '%s' option."), opt); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + return nmc->return_value; + } + if (!strcmp (argv[1], "tabular")) + nmc->multiline_output = FALSE; + else if (!strcmp (argv[1], "multiline")) + nmc->multiline_output = TRUE; + else { + g_string_printf (nmc->return_text, _("Error: '%s' is not valid argument for '%s' option."), argv[1], opt); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + return nmc->return_value; + } + } else if (matches (opt, "-escape") == 0) { + next_arg (&argc, &argv); + if (argc <= 1) { + g_string_printf (nmc->return_text, _("Error: missing argument for '%s' option."), opt); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + return nmc->return_value; + } + if (!strcmp (argv[1], "yes")) + nmc->escape_values = TRUE; + else if (!strcmp (argv[1], "no")) + nmc->escape_values = FALSE; + else { + g_string_printf (nmc->return_text, _("Error: '%s' is not valid argument for '%s' option."), argv[1], opt); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + return nmc->return_value; + } + } else if (matches (opt, "-fields") == 0) { + next_arg (&argc, &argv); + if (argc <= 1) { + g_string_printf (nmc->return_text, _("Error: fields for '%s' options are missing."), opt); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + return nmc->return_value; + } + nmc->required_fields = g_strdup (argv[1]); + } else if (matches (opt, "-version") == 0) { + printf (_("nmcli tool, version %s\n"), NMCLI_VERSION); + return NMC_RESULT_SUCCESS; + } else if (matches (opt, "-help") == 0) { + usage (base); + return NMC_RESULT_SUCCESS; + } else { + g_string_printf (nmc->return_text, _("Error: Option '%s' is unknown, try 'nmcli -help'."), opt); + nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; + return nmc->return_value; + } + argc--; + argv++; + } + + if (argc > 1) + return do_cmd (nmc, argv[1], argc-1, argv+1); + + usage (base); + return nmc->return_value; +} + +static void +signal_handler (int signo) +{ + if (signo == SIGINT || signo == SIGTERM) { + g_message (_("Caught signal %d, shutting down..."), signo); + g_main_loop_quit (loop); + } +} + +static void +setup_signals (void) +{ + struct sigaction action; + sigset_t mask; + + sigemptyset (&mask); + action.sa_handler = signal_handler; + action.sa_mask = mask; + action.sa_flags = 0; + sigaction (SIGTERM, &action, NULL); + sigaction (SIGINT, &action, NULL); +} + +static NMClient * +nmc_get_client (NmCli *nmc) +{ + if (!nmc->client) { + nmc->client = nm_client_new (); + if (!nmc->client) { + g_string_printf (nmc->return_text, _("Error: Could not connect to NetworkManager.")); + nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; + } + } + + return nmc->client; +} + +/* Initialize NmCli structure - set default values */ +static void +nmc_init (NmCli *nmc) +{ + nmc->client = NULL; + nmc->get_client = &nmc_get_client; + + nmc->return_value = NMC_RESULT_SUCCESS; + nmc->return_text = g_string_new (_("Success")); + + nmc->timeout = 10; + + nmc->system_settings = NULL; + nmc->user_settings = NULL; + + nmc->system_settings_running = FALSE; + nmc->user_settings_running = FALSE; + + nmc->system_connections = NULL; + nmc->user_connections = NULL; + + nmc->should_wait = FALSE; + nmc->print_output = NMC_PRINT_NORMAL; + nmc->multiline_output = FALSE; + nmc->mode_specified = FALSE; + nmc->escape_values = TRUE; + nmc->required_fields = NULL; + nmc->allowed_fields = NULL; + memset (&nmc->print_fields, '\0', sizeof (NmcPrintFields)); +} + +static void +nmc_cleanup (NmCli *nmc) +{ + if (nmc->client) g_object_unref (nmc->client); + + g_string_free (nmc->return_text, TRUE); + + if (nmc->system_settings) g_object_unref (nmc->system_settings); + if (nmc->user_settings) g_object_unref (nmc->user_settings); + + g_slist_free (nmc->system_connections); + g_slist_free (nmc->user_connections); + + g_free (nmc->required_fields); + if (nmc->print_fields.indices) + g_array_free (nmc->print_fields.indices, TRUE); +} + +static gboolean +start (gpointer data) +{ + ArgsInfo *info = (ArgsInfo *) data; + info->nmc->return_value = parse_command_line (info->nmc, info->argc, info->argv); + + if (!info->nmc->should_wait) + g_main_loop_quit (loop); + + return FALSE; +} + + +int +main (int argc, char *argv[]) +{ + NmCli nmc; + ArgsInfo args_info = { &nmc, argc, argv }; + + /* Set locale to use environment variables */ + setlocale (LC_ALL, ""); + +#ifdef GETTEXT_PACKAGE + /* Set i18n stuff */ + bindtextdomain (GETTEXT_PACKAGE, NMCLI_LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); +#endif + + g_type_init (); + + nmc_init (&nmc); + g_idle_add (start, &args_info); + + loop = g_main_loop_new (NULL, FALSE); /* create main loop */ + setup_signals (); /* setup UNIX signals */ + g_main_loop_run (loop); /* run main loop */ + + /* Print result descripting text */ + if (nmc.return_value != NMC_RESULT_SUCCESS) { + fprintf (stderr, "%s\n", nmc.return_text->str); + } + + g_main_loop_unref (loop); + nmc_cleanup (&nmc); + + return nmc.return_value; +} diff --git a/cli/src/nmcli.h b/cli/src/nmcli.h new file mode 100644 index 0000000000..b4e4562bfe --- /dev/null +++ b/cli/src/nmcli.h @@ -0,0 +1,114 @@ +/* nmcli - command-line tool to control NetworkManager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * (C) Copyright 2010 Red Hat, Inc. + */ + +#ifndef NMC_NMCLI_H +#define NMC_NMCLI_H + +#include + +#include +#include +#include + +/* nmcli exit codes */ +typedef enum { + /* Indicates successful execution */ + NMC_RESULT_SUCCESS = 0, + + /* Unknown / unspecified error */ + NMC_RESULT_ERROR_UNKNOWN = 1, + + /* Wrong invocation of nmcli */ + NMC_RESULT_ERROR_USER_INPUT = 2, + + /* A timeout expired */ + NMC_RESULT_ERROR_TIMEOUT_EXPIRED = 3, + + /* Error in connection activation */ + NMC_RESULT_ERROR_CON_ACTIVATION = 4, + + /* Error in connection deactivation */ + NMC_RESULT_ERROR_CON_DEACTIVATION = 5, + + /* Error in device disconnect */ + NMC_RESULT_ERROR_DEV_DISCONNECT = 6 +} NMCResultCode; + +typedef enum { + NMC_PRINT_TERSE = 0, + NMC_PRINT_NORMAL = 1, + NMC_PRINT_PRETTY = 2 +} NMCPrintOutput; + +/* === Output fields === */ +typedef struct { + const char *name; /* Field's name */ + const char *name_l10n; /* Field's name for translation */ + int width; /* Width in screen columns */ + const char *value; /* Value of current field */ + guint32 flags; /* Flags */ +} NmcOutputField; + +/* Flags for NmcPrintFields */ +#define NMC_PF_FLAG_MULTILINE 0x00000001 /* Multiline output instead of tabular */ +#define NMC_PF_FLAG_TERSE 0x00000002 /* Terse output mode */ +#define NMC_PF_FLAG_PRETTY 0x00000004 /* Pretty output mode */ +#define NMC_PF_FLAG_MAIN_HEADER_ADD 0x00000008 /* Print main header in addition to values/field names */ +#define NMC_PF_FLAG_MAIN_HEADER_ONLY 0x00000010 /* Print main header only */ +#define NMC_PF_FLAG_FIELD_NAMES 0x00000020 /* Print field names instead of values */ +#define NMC_PF_FLAG_ESCAPE 0x00000040 /* Escape column separator and '\' */ +#define NMC_PF_FLAG_SECTION_PREFIX 0x00000080 /* Use the first value as section prefix for the other field names - just in multiline */ + +typedef struct { + GArray *indices; /* Array of field indices to the array of allowed fields */ + char *header_name; /* Name of the output */ + int indent; /* Indent by this number of spaces */ + guint32 flags; /* Various flags for controlling output: see NMC_PF_FLAG_* values */ +} NmcPrintFields; + +/* NmCli - main structure */ +typedef struct _NmCli { + NMClient *client; /* Pointer to NMClient of libnm-glib */ + NMClient *(*get_client) (struct _NmCli *nmc); /* Pointer to function for creating NMClient */ + + NMCResultCode return_value; /* Return code of nmcli */ + GString *return_text; /* Reason text */ + + int timeout; /* Operation timeout */ + + NMRemoteSettingsSystem *system_settings; /* System settings */ + NMRemoteSettings *user_settings; /* User settings */ + + gboolean system_settings_running; /* Is system settings service running? */ + gboolean user_settings_running; /* Is user settings service running? */ + + GSList *system_connections; /* List of system connections */ + GSList *user_connections; /* List of user connections */ + + gboolean should_wait; /* Indication that nmcli should not end yet */ + NMCPrintOutput print_output; /* Output mode */ + gboolean multiline_output; /* Multiline output instead of default tabular */ + gboolean mode_specified; /* Whether tabular/multiline mode was specified via '--mode' option */ + gboolean escape_values; /* Whether to escape ':' and '\' in terse tabular mode */ + char *required_fields; /* Required fields in output: '--fields' option */ + NmcOutputField *allowed_fields; /* Array of allowed fields for particular commands */ + NmcPrintFields print_fields; /* Structure with field indices to print */ +} NmCli; + +#endif /* NMC_NMCLI_H */ diff --git a/cli/src/settings.c b/cli/src/settings.c new file mode 100644 index 0000000000..1371bfbef5 --- /dev/null +++ b/cli/src/settings.c @@ -0,0 +1,1369 @@ +/* nmcli - command-line tool to control NetworkManager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * (C) Copyright 2010 Red Hat, Inc. + */ + +#include +#include +#include + +#include "utils.h" +#include "settings.h" + + +/* Helper macro to define fields */ +#define SETTING_FIELD(setting, width) { setting, N_(setting), width, NULL, 0 } + +/* Available fields for NM_SETTING_CONNECTION_SETTING_NAME */ +static NmcOutputField nmc_fields_setting_connection[] = { + SETTING_FIELD ("name", 15), /* 0 */ + SETTING_FIELD (NM_SETTING_CONNECTION_ID, 25), /* 1 */ + SETTING_FIELD (NM_SETTING_CONNECTION_UUID, 38), /* 2 */ + SETTING_FIELD (NM_SETTING_CONNECTION_TYPE, 17), /* 3 */ + SETTING_FIELD (NM_SETTING_CONNECTION_AUTOCONNECT, 13), /* 4 */ + SETTING_FIELD (NM_SETTING_CONNECTION_TIMESTAMP, 10), /* 5 */ + SETTING_FIELD (NM_SETTING_CONNECTION_READ_ONLY, 10), /* 6 */ + {NULL, NULL, 0, NULL, 0} +}; +#define NMC_FIELDS_SETTING_CONNECTION_ALL "name"","\ + NM_SETTING_CONNECTION_ID","\ + NM_SETTING_CONNECTION_UUID","\ + NM_SETTING_CONNECTION_TYPE","\ + NM_SETTING_CONNECTION_AUTOCONNECT","\ + NM_SETTING_CONNECTION_TIMESTAMP","\ + NM_SETTING_CONNECTION_READ_ONLY +#define NMC_FIELDS_SETTING_CONNECTION_COMMON NMC_FIELDS_SETTING_CONNECTION_ALL + +/* Available fields for NM_SETTING_WIRED_SETTING_NAME */ +static NmcOutputField nmc_fields_setting_wired[] = { + SETTING_FIELD ("name", 17), /* 0 */ + SETTING_FIELD (NM_SETTING_WIRED_PORT, 8), /* 1 */ + SETTING_FIELD (NM_SETTING_WIRED_SPEED, 10), /* 2 */ + SETTING_FIELD (NM_SETTING_WIRED_DUPLEX, 10), /* 3 */ + SETTING_FIELD (NM_SETTING_WIRED_AUTO_NEGOTIATE, 15), /* 4 */ + SETTING_FIELD (NM_SETTING_WIRED_MAC_ADDRESS, 19), /* 5 */ + SETTING_FIELD (NM_SETTING_WIRED_MTU, 6), /* 6 */ + {NULL, NULL, 0, NULL, 0} +}; +#define NMC_FIELDS_SETTING_WIRED_ALL "name"","\ + NM_SETTING_WIRED_PORT","\ + NM_SETTING_WIRED_SPEED","\ + NM_SETTING_WIRED_DUPLEX","\ + NM_SETTING_WIRED_AUTO_NEGOTIATE","\ + NM_SETTING_WIRED_MAC_ADDRESS","\ + NM_SETTING_WIRED_MTU +#define NMC_FIELDS_SETTING_WIRED_COMMON NMC_FIELDS_SETTING_WIRED_ALL + +/* Available fields for NM_SETTING_802_1X_SETTING_NAME */ +static NmcOutputField nmc_fields_setting_8021X[] = { + SETTING_FIELD ("name", 10), /* 0 */ + SETTING_FIELD (NM_SETTING_802_1X_EAP, 10), /* 1 */ + SETTING_FIELD (NM_SETTING_802_1X_IDENTITY, 15), /* 2 */ + SETTING_FIELD (NM_SETTING_802_1X_ANONYMOUS_IDENTITY, 15), /* 3 */ + SETTING_FIELD (NM_SETTING_802_1X_CA_CERT, 10), /* 4 */ + SETTING_FIELD (NM_SETTING_802_1X_CA_PATH, 10), /* 5 */ + SETTING_FIELD (NM_SETTING_802_1X_CLIENT_CERT, 10), /* 6 */ + SETTING_FIELD (NM_SETTING_802_1X_PHASE1_PEAPVER, 10), /* 7 */ + SETTING_FIELD (NM_SETTING_802_1X_PHASE1_PEAPLABEL, 10), /* 8 */ + SETTING_FIELD (NM_SETTING_802_1X_PHASE1_FAST_PROVISIONING, 10), /* 9 */ + SETTING_FIELD (NM_SETTING_802_1X_PHASE2_AUTH, 10), /* 10 */ + SETTING_FIELD (NM_SETTING_802_1X_PHASE2_AUTHEAP, 10), /* 11 */ + SETTING_FIELD (NM_SETTING_802_1X_PHASE2_CA_CERT, 20), /* 12 */ + SETTING_FIELD (NM_SETTING_802_1X_PHASE2_CA_PATH, 20), /* 13 */ + SETTING_FIELD (NM_SETTING_802_1X_PHASE2_CLIENT_CERT, 20), /* 14 */ + SETTING_FIELD (NM_SETTING_802_1X_PASSWORD, 10), /* 15 */ + SETTING_FIELD (NM_SETTING_802_1X_PRIVATE_KEY, 15), /* 16 */ + SETTING_FIELD (NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD, 20), /* 17 */ + SETTING_FIELD (NM_SETTING_802_1X_PHASE2_PRIVATE_KEY, 20), /* 18 */ + SETTING_FIELD (NM_SETTING_802_1X_PHASE2_PRIVATE_KEY_PASSWORD, 20), /* 19 */ + SETTING_FIELD (NM_SETTING_802_1X_PIN, 8), /* 20 */ + SETTING_FIELD (NM_SETTING_802_1X_PSK, 8), /* 21 */ + SETTING_FIELD (NM_SETTING_802_1X_SYSTEM_CA_CERTS, 17), /* 22 */ + {NULL, NULL, 0, NULL, 0} +}; +#define NMC_FIELDS_SETTING_802_1X_ALL "name"","\ + NM_SETTING_802_1X_EAP","\ + NM_SETTING_802_1X_IDENTITY","\ + NM_SETTING_802_1X_ANONYMOUS_IDENTITY","\ + NM_SETTING_802_1X_CA_CERT","\ + NM_SETTING_802_1X_CA_PATH","\ + NM_SETTING_802_1X_CLIENT_CERT","\ + NM_SETTING_802_1X_PHASE1_PEAPVER","\ + NM_SETTING_802_1X_PHASE1_PEAPLABEL","\ + NM_SETTING_802_1X_PHASE1_FAST_PROVISIONING","\ + NM_SETTING_802_1X_PHASE2_AUTH","\ + NM_SETTING_802_1X_PHASE2_AUTHEAP","\ + NM_SETTING_802_1X_PHASE2_CA_CERT","\ + NM_SETTING_802_1X_PHASE2_CA_PATH","\ + NM_SETTING_802_1X_PHASE2_CLIENT_CERT","\ + NM_SETTING_802_1X_PASSWORD","\ + NM_SETTING_802_1X_PRIVATE_KEY","\ + NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD","\ + NM_SETTING_802_1X_PHASE2_PRIVATE_KEY","\ + NM_SETTING_802_1X_PHASE2_PRIVATE_KEY_PASSWORD","\ + NM_SETTING_802_1X_PIN","\ + NM_SETTING_802_1X_PSK","\ + NM_SETTING_802_1X_SYSTEM_CA_CERTS +#define NMC_FIELDS_SETTING_802_1X_COMMON NMC_FIELDS_SETTING_802_1X_ALL + +/* Available fields for NM_SETTING_WIRELESS_SETTING_NAME */ +static NmcOutputField nmc_fields_setting_wireless[] = { + SETTING_FIELD ("name", 17), /* 0 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SSID, 34), /* 1 */ + SETTING_FIELD (NM_SETTING_WIRELESS_MODE, 15), /* 2 */ + SETTING_FIELD (NM_SETTING_WIRELESS_BAND, 10), /* 3 */ + SETTING_FIELD (NM_SETTING_WIRELESS_CHANNEL, 10), /* 4 */ + SETTING_FIELD (NM_SETTING_WIRELESS_BSSID, 19), /* 5 */ + SETTING_FIELD (NM_SETTING_WIRELESS_RATE, 10), /* 6 */ + SETTING_FIELD (NM_SETTING_WIRELESS_TX_POWER, 10), /* 7 */ + SETTING_FIELD (NM_SETTING_WIRELESS_MAC_ADDRESS, 19), /* 8 */ + SETTING_FIELD (NM_SETTING_WIRELESS_MTU, 6), /* 9 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SEEN_BSSIDS, 35), /* 10 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SEC, 10), /* 11 */ + {NULL, NULL, 0, NULL, 0} +}; +#define NMC_FIELDS_SETTING_WIRELESS_ALL "name"","\ + NM_SETTING_WIRELESS_SSID","\ + NM_SETTING_WIRELESS_MODE","\ + NM_SETTING_WIRELESS_BAND","\ + NM_SETTING_WIRELESS_CHANNEL","\ + NM_SETTING_WIRELESS_BSSID","\ + NM_SETTING_WIRELESS_RATE","\ + NM_SETTING_WIRELESS_TX_POWER","\ + NM_SETTING_WIRELESS_MAC_ADDRESS","\ + NM_SETTING_WIRELESS_MTU","\ + NM_SETTING_WIRELESS_SEEN_BSSIDS","\ + NM_SETTING_WIRELESS_SEC +#define NMC_FIELDS_SETTING_WIRELESS_COMMON NMC_FIELDS_SETTING_WIRELESS_ALL + +/* Available fields for NM_SETTING_WIRELESS_SECURITY_SETTING_NAME */ +static NmcOutputField nmc_fields_setting_wireless_security[] = { + SETTING_FIELD ("name", 25), /* 0 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, 10), /* 1 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_WEP_TX_KEYIDX, 15), /* 2 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_AUTH_ALG, 10), /* 3 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_PROTO, 10), /* 4 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_PAIRWISE, 10), /* 5 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_GROUP, 10), /* 6 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_LEAP_USERNAME, 15), /* 7 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_WEP_KEY0, 10), /* 8 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_WEP_KEY1, 10), /* 9 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_WEP_KEY2, 10), /* 10 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_WEP_KEY3, 10), /* 11 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_PSK, 6), /* 12 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD, 15), /* 13 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_WEP_KEY_TYPE, 15), /* 14 */ + {NULL, NULL, 0, NULL, 0} +}; +#define NMC_FIELDS_SETTING_WIRELESS_SECURITY_ALL "name"","\ + NM_SETTING_WIRELESS_SECURITY_KEY_MGMT","\ + NM_SETTING_WIRELESS_SECURITY_WEP_TX_KEYIDX","\ + NM_SETTING_WIRELESS_SECURITY_AUTH_ALG","\ + NM_SETTING_WIRELESS_SECURITY_PROTO","\ + NM_SETTING_WIRELESS_SECURITY_PAIRWISE","\ + NM_SETTING_WIRELESS_SECURITY_GROUP","\ + NM_SETTING_WIRELESS_SECURITY_LEAP_USERNAME","\ + NM_SETTING_WIRELESS_SECURITY_WEP_KEY0","\ + NM_SETTING_WIRELESS_SECURITY_WEP_KEY1","\ + NM_SETTING_WIRELESS_SECURITY_WEP_KEY2","\ + NM_SETTING_WIRELESS_SECURITY_WEP_KEY3","\ + NM_SETTING_WIRELESS_SECURITY_PSK","\ + NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD","\ + NM_SETTING_WIRELESS_SECURITY_WEP_KEY_TYPE +#define NMC_FIELDS_SETTING_WIRELESS_SECURITY_COMMON NMC_FIELDS_SETTING_WIRELESS_SECURITY_ALL + +/* Available fields for NM_SETTING_IP4_CONFIG_SETTING_NAME */ +static NmcOutputField nmc_fields_setting_ip4_config[] = { + SETTING_FIELD ("name", 8), /* 0 */ + SETTING_FIELD (NM_SETTING_IP4_CONFIG_METHOD, 10), /* 1 */ + SETTING_FIELD (NM_SETTING_IP4_CONFIG_DNS, 20), /* 2 */ + SETTING_FIELD (NM_SETTING_IP4_CONFIG_DNS_SEARCH, 15), /* 3 */ + SETTING_FIELD (NM_SETTING_IP4_CONFIG_ADDRESSES, 20), /* 4 */ + SETTING_FIELD (NM_SETTING_IP4_CONFIG_ROUTES, 20), /* 5 */ + SETTING_FIELD (NM_SETTING_IP4_CONFIG_IGNORE_AUTO_ROUTES, 19), /* 6 */ + SETTING_FIELD (NM_SETTING_IP4_CONFIG_IGNORE_AUTO_DNS, 16), /* 7 */ + SETTING_FIELD (NM_SETTING_IP4_CONFIG_DHCP_CLIENT_ID, 15), /* 8 */ + SETTING_FIELD (NM_SETTING_IP4_CONFIG_DHCP_SEND_HOSTNAME, 19), /* 9 */ + SETTING_FIELD (NM_SETTING_IP4_CONFIG_DHCP_HOSTNAME, 14), /* 10 */ + SETTING_FIELD (NM_SETTING_IP4_CONFIG_NEVER_DEFAULT, 15), /* 11 */ + {NULL, NULL, 0, NULL, 0} +}; +#define NMC_FIELDS_SETTING_IP4_CONFIG_ALL "name"","\ + NM_SETTING_IP4_CONFIG_METHOD","\ + NM_SETTING_IP4_CONFIG_DNS","\ + NM_SETTING_IP4_CONFIG_DNS_SEARCH","\ + NM_SETTING_IP4_CONFIG_ADDRESSES","\ + NM_SETTING_IP4_CONFIG_ROUTES","\ + NM_SETTING_IP4_CONFIG_IGNORE_AUTO_ROUTES","\ + NM_SETTING_IP4_CONFIG_IGNORE_AUTO_DNS","\ + NM_SETTING_IP4_CONFIG_DHCP_CLIENT_ID","\ + NM_SETTING_IP4_CONFIG_DHCP_SEND_HOSTNAME","\ + NM_SETTING_IP4_CONFIG_DHCP_HOSTNAME","\ + NM_SETTING_IP4_CONFIG_NEVER_DEFAULT +#define NMC_FIELDS_SETTING_IP4_CONFIG_COMMON NMC_FIELDS_SETTING_IP4_CONFIG_ALL + +/* Available fields for NM_SETTING_IP6_CONFIG_SETTING_NAME */ +static NmcOutputField nmc_fields_setting_ip6_config[] = { + SETTING_FIELD ("name", 8), /* 0 */ + SETTING_FIELD (NM_SETTING_IP6_CONFIG_METHOD, 10), /* 1 */ + SETTING_FIELD (NM_SETTING_IP6_CONFIG_DNS, 20), /* 2 */ + SETTING_FIELD (NM_SETTING_IP6_CONFIG_DNS_SEARCH, 15), /* 3 */ + SETTING_FIELD (NM_SETTING_IP6_CONFIG_ADDRESSES, 20), /* 4 */ + SETTING_FIELD (NM_SETTING_IP6_CONFIG_ROUTES, 20), /* 5 */ + SETTING_FIELD (NM_SETTING_IP6_CONFIG_IGNORE_AUTO_ROUTES, 19), /* 6 */ + SETTING_FIELD (NM_SETTING_IP6_CONFIG_IGNORE_AUTO_DNS, 16), /* 7 */ + SETTING_FIELD (NM_SETTING_IP6_CONFIG_NEVER_DEFAULT, 15), /* 8 */ + {NULL, NULL, 0, NULL, 0} +}; +#define NMC_FIELDS_SETTING_IP6_CONFIG_ALL "name"","\ + NM_SETTING_IP6_CONFIG_METHOD","\ + NM_SETTING_IP6_CONFIG_DNS","\ + NM_SETTING_IP6_CONFIG_DNS_SEARCH","\ + NM_SETTING_IP6_CONFIG_ADDRESSES","\ + NM_SETTING_IP6_CONFIG_ROUTES","\ + NM_SETTING_IP6_CONFIG_IGNORE_AUTO_ROUTES","\ + NM_SETTING_IP6_CONFIG_IGNORE_AUTO_DNS","\ + NM_SETTING_IP6_CONFIG_NEVER_DEFAULT +#define NMC_FIELDS_SETTING_IP6_CONFIG_COMMON NMC_FIELDS_SETTING_IP4_CONFIG_ALL + +/* Available fields for NM_SETTING_SERIAL_SETTING_NAME */ +static NmcOutputField nmc_fields_setting_serial[] = { + SETTING_FIELD ("name", 10), /* 0 */ + SETTING_FIELD (NM_SETTING_SERIAL_BAUD, 10), /* 1 */ + SETTING_FIELD (NM_SETTING_SERIAL_BITS, 10), /* 2 */ + SETTING_FIELD (NM_SETTING_SERIAL_PARITY, 10), /* 3 */ + SETTING_FIELD (NM_SETTING_SERIAL_STOPBITS, 10), /* 4 */ + SETTING_FIELD (NM_SETTING_SERIAL_SEND_DELAY, 12), /* 5 */ + {NULL, NULL, 0, NULL, 0} +}; +#define NMC_FIELDS_SETTING_SERIAL_ALL "name"","\ + NM_SETTING_SERIAL_BAUD","\ + NM_SETTING_SERIAL_BITS","\ + NM_SETTING_SERIAL_PARITY","\ + NM_SETTING_SERIAL_STOPBITS","\ + NM_SETTING_SERIAL_SEND_DELAY +#define NMC_FIELDS_SETTING_SERIAL_COMMON NMC_FIELDS_SETTING_SERIAL_ALL + +/* Available fields for NM_SETTING_PPP_SETTING_NAME */ +static NmcOutputField nmc_fields_setting_ppp[] = { + SETTING_FIELD ("name", 10), /* 0 */ + SETTING_FIELD (NM_SETTING_PPP_NOAUTH, 10), /* 1 */ + SETTING_FIELD (NM_SETTING_PPP_REFUSE_EAP, 10), /* 2 */ + SETTING_FIELD (NM_SETTING_PPP_REFUSE_PAP, 10), /* 3 */ + SETTING_FIELD (NM_SETTING_PPP_REFUSE_CHAP, 10), /* 4 */ + SETTING_FIELD (NM_SETTING_PPP_REFUSE_MSCHAP, 10), /* 5 */ + SETTING_FIELD (NM_SETTING_PPP_REFUSE_MSCHAPV2, 10), /* 6 */ + SETTING_FIELD (NM_SETTING_PPP_NOBSDCOMP, 10), /* 7 */ + SETTING_FIELD (NM_SETTING_PPP_NODEFLATE, 10), /* 8 */ + SETTING_FIELD (NM_SETTING_PPP_NO_VJ_COMP, 10), /* 9 */ + SETTING_FIELD (NM_SETTING_PPP_REQUIRE_MPPE, 10), /* 10 */ + SETTING_FIELD (NM_SETTING_PPP_REQUIRE_MPPE_128, 10), /* 11 */ + SETTING_FIELD (NM_SETTING_PPP_MPPE_STATEFUL, 10), /* 12 */ + SETTING_FIELD (NM_SETTING_PPP_CRTSCTS, 10), /* 13 */ + SETTING_FIELD (NM_SETTING_PPP_BAUD, 10), /* 14 */ + SETTING_FIELD (NM_SETTING_PPP_MRU, 10), /* 15 */ + SETTING_FIELD (NM_SETTING_PPP_MTU, 10), /* 16 */ + SETTING_FIELD (NM_SETTING_PPP_LCP_ECHO_FAILURE, 17), /* 17 */ + SETTING_FIELD (NM_SETTING_PPP_LCP_ECHO_INTERVAL, 18), /* 18 */ + {NULL, NULL, 0, NULL, 0} +}; +#define NMC_FIELDS_SETTING_PPP_ALL "name"","\ + NM_SETTING_PPP_NOAUTH","\ + NM_SETTING_PPP_REFUSE_EAP","\ + NM_SETTING_PPP_REFUSE_PAP","\ + NM_SETTING_PPP_REFUSE_CHAP","\ + NM_SETTING_PPP_REFUSE_MSCHAP","\ + NM_SETTING_PPP_REFUSE_MSCHAPV2","\ + NM_SETTING_PPP_NOBSDCOMP","\ + NM_SETTING_PPP_NODEFLATE","\ + NM_SETTING_PPP_NO_VJ_COMP","\ + NM_SETTING_PPP_REQUIRE_MPPE","\ + NM_SETTING_PPP_REQUIRE_MPPE_128","\ + NM_SETTING_PPP_MPPE_STATEFUL","\ + NM_SETTING_PPP_CRTSCTS","\ + NM_SETTING_PPP_BAUD","\ + NM_SETTING_PPP_MRU","\ + NM_SETTING_PPP_MTU","\ + NM_SETTING_PPP_LCP_ECHO_FAILURE","\ + NM_SETTING_PPP_LCP_ECHO_INTERVAL +#define NMC_FIELDS_SETTING_PPP_COMMON NMC_FIELDS_SETTING_PPP_ALL + +/* Available fields for NM_SETTING_PPPOE_SETTING_NAME */ +static NmcOutputField nmc_fields_setting_pppoe[] = { + SETTING_FIELD ("name", 10), /* 0 */ + SETTING_FIELD (NM_SETTING_PPPOE_SERVICE, 12), /* 1 */ + SETTING_FIELD (NM_SETTING_PPPOE_USERNAME, 15), /* 2 */ + SETTING_FIELD (NM_SETTING_PPPOE_PASSWORD, 15), /* 3 */ + {NULL, NULL, 0, NULL, 0} +}; +#define NMC_FIELDS_SETTING_PPPOE_ALL "name"","\ + NM_SETTING_PPPOE_SERVICE","\ + NM_SETTING_PPPOE_USERNAME","\ + NM_SETTING_PPPOE_PASSWORD +#define NMC_FIELDS_SETTING_PPPOE_COMMON NMC_FIELDS_SETTING_PPP_ALL + +/* Available fields for NM_SETTING_GSM_SETTING_NAME */ +static NmcOutputField nmc_fields_setting_gsm[] = { + SETTING_FIELD ("name", 10), /* 0 */ + SETTING_FIELD (NM_SETTING_GSM_NUMBER, 10), /* 1 */ + SETTING_FIELD (NM_SETTING_GSM_USERNAME, 15), /* 2 */ + SETTING_FIELD (NM_SETTING_GSM_PASSWORD, 15), /* 3 */ + SETTING_FIELD (NM_SETTING_GSM_APN, 25), /* 4 */ + SETTING_FIELD (NM_SETTING_GSM_NETWORK_ID, 12), /* 5 */ + SETTING_FIELD (NM_SETTING_GSM_NETWORK_TYPE, 15), /* 6 */ + SETTING_FIELD (NM_SETTING_GSM_ALLOWED_BANDS, 15), /* 7 */ + SETTING_FIELD (NM_SETTING_GSM_PIN, 10), /* 8 */ + SETTING_FIELD (NM_SETTING_GSM_HOME_ONLY, 10), /* 9 */ + {NULL, NULL, 0, NULL, 0} +}; +#define NMC_FIELDS_SETTING_GSM_ALL "name"","\ + NM_SETTING_GSM_NUMBER","\ + NM_SETTING_GSM_USERNAME","\ + NM_SETTING_GSM_PASSWORD","\ + NM_SETTING_GSM_APN","\ + NM_SETTING_GSM_NETWORK_ID","\ + NM_SETTING_GSM_NETWORK_TYPE","\ + NM_SETTING_GSM_ALLOWED_BANDS","\ + NM_SETTING_GSM_PIN","\ + NM_SETTING_GSM_HOME_ONLY +#define NMC_FIELDS_SETTING_GSM_COMMON NMC_FIELDS_SETTING_GSM_ALL + +/* Available fields for NM_SETTING_CDMA_SETTING_NAME */ +static NmcOutputField nmc_fields_setting_cdma[] = { + SETTING_FIELD ("name", 10), /* 0 */ + SETTING_FIELD (NM_SETTING_CDMA_NUMBER, 15), /* 1 */ + SETTING_FIELD (NM_SETTING_CDMA_USERNAME, 15), /* 2 */ + SETTING_FIELD (NM_SETTING_CDMA_PASSWORD, 15), /* 3 */ + {NULL, NULL, 0, NULL, 0} +}; +#define NMC_FIELDS_SETTING_CDMA_ALL "name"","\ + NM_SETTING_CDMA_NUMBER","\ + NM_SETTING_CDMA_USERNAME","\ + NM_SETTING_CDMA_PASSWORD +#define NMC_FIELDS_SETTING_CDMA_COMMON NMC_FIELDS_SETTING_CDMA_ALL + +/* Available fields for NM_SETTING_BLUETOOTH_SETTING_NAME */ +static NmcOutputField nmc_fields_setting_bluetooth[] = { + SETTING_FIELD ("name", 11), /* 0 */ + SETTING_FIELD (NM_SETTING_BLUETOOTH_BDADDR, 19), /* 1 */ + SETTING_FIELD (NM_SETTING_BLUETOOTH_TYPE, 10), /* 2 */ + {NULL, NULL, 0, NULL, 0} +}; +#define NMC_FIELDS_SETTING_BLUETOOTH_ALL "name"","\ + NM_SETTING_BLUETOOTH_BDADDR","\ + NM_SETTING_BLUETOOTH_TYPE +#define NMC_FIELDS_SETTING_BLUETOOTH_COMMON NMC_FIELDS_SETTING_BLUETOOTH_ALL + +/* Available fields for NM_SETTING_OLPC_MESH_SETTING_NAME */ +static NmcOutputField nmc_fields_setting_olpc_mesh[] = { + SETTING_FIELD ("name", 18), /* 0 */ + SETTING_FIELD (NM_SETTING_OLPC_MESH_SSID, 34), /* 1 */ + SETTING_FIELD (NM_SETTING_OLPC_MESH_CHANNEL, 12), /* 2 */ + SETTING_FIELD (NM_SETTING_OLPC_MESH_DHCP_ANYCAST_ADDRESS, 17), /* 3 */ + {NULL, NULL, 0, NULL, 0} +}; +#define NMC_FIELDS_SETTING_OLPC_MESH_ALL "name"","\ + NM_SETTING_OLPC_MESH_SSID","\ + NM_SETTING_OLPC_MESH_CHANNEL","\ + NM_SETTING_OLPC_MESH_DHCP_ANYCAST_ADDRESS +#define NMC_FIELDS_SETTING_OLPC_MESH_COMMON NMC_FIELDS_SETTING_OLPC_MESH_ALL + +/* Available fields for NM_SETTING_VPN_SETTING_NAME */ +static NmcOutputField nmc_fields_setting_vpn[] = { + SETTING_FIELD ("name", 6), /* 0 */ + SETTING_FIELD (NM_SETTING_VPN_SERVICE_TYPE, 40), /* 1 */ + SETTING_FIELD (NM_SETTING_VPN_USER_NAME, 12), /* 2 */ + SETTING_FIELD (NM_SETTING_VPN_DATA, 30), /* 3 */ + SETTING_FIELD (NM_SETTING_VPN_SECRETS, 15), /* 4 */ + {NULL, NULL, 0, NULL, 0} +}; +#define NMC_FIELDS_SETTING_VPN_ALL "name"","\ + NM_SETTING_VPN_SERVICE_TYPE","\ + NM_SETTING_VPN_USER_NAME","\ + NM_SETTING_VPN_DATA","\ + NM_SETTING_VPN_SECRETS +#define NMC_FIELDS_SETTING_VPN_COMMON NMC_FIELDS_SETTING_VPN_ALL + + +static char * +wep_key_type_to_string (NMWepKeyType type) +{ + switch (type) { + case NM_WEP_KEY_TYPE_KEY: + return g_strdup_printf (_("%d (hex-ascii-key)"), type); + case NM_WEP_KEY_TYPE_PASSPHRASE: + return g_strdup_printf (_("%d (104/128-bit passphrase)"), type); + case NM_WEP_KEY_TYPE_UNKNOWN: + default: + return g_strdup_printf (_("%d (unknown)"), type); + } +} + +static char * +blob_cert_to_string (const GByteArray *array) +{ + GString *cert = NULL; + int i; + + if (array->len > 0) + cert = g_string_new (NULL); + + for (i = 0; i < array->len; i++) { + g_string_append_printf (cert, "%02X", array->data[i]); + } + + return cert ? g_string_free (cert, FALSE) : NULL; +} + +static char * +allowed_bands_to_string (guint32 bands) +{ + GString *band_str; + + if (bands == NM_SETTING_GSM_BAND_UNKNOWN) + return g_strdup (_("0 (unknown)")); + + band_str = g_string_new (NULL); + g_string_printf (band_str, "%d (", bands); + + if (bands & NM_SETTING_GSM_BAND_ANY) + g_string_append (band_str, _("any, ")); + if (bands & NM_SETTING_GSM_BAND_EGSM) + g_string_append (band_str, _("900 MHz, ")); + if (bands & NM_SETTING_GSM_BAND_DCS) + g_string_append (band_str, _("1800 MHz, ")); + if (bands & NM_SETTING_GSM_BAND_PCS) + g_string_append (band_str, _("1900 MHz, ")); + if (bands & NM_SETTING_GSM_BAND_G850) + g_string_append (band_str, _("850 MHz, ")); + if (bands & NM_SETTING_GSM_BAND_U2100) + g_string_append (band_str, _("WCDMA 3GPP UMTS 2100 MHz, ")); + if (bands & NM_SETTING_GSM_BAND_U1800) + g_string_append (band_str, _("WCDMA 3GPP UMTS 1800 MHz, ")); + if (bands & NM_SETTING_GSM_BAND_U17IV) + g_string_append (band_str, _("WCDMA 3GPP UMTS 1700/2100 MHz, ")); + if (bands & NM_SETTING_GSM_BAND_U800) + g_string_append (band_str, _("WCDMA 3GPP UMTS 800 MHz, ")); + if (bands & NM_SETTING_GSM_BAND_U850) + g_string_append (band_str, _("WCDMA 3GPP UMTS 850 MHz, ")); + if (bands & NM_SETTING_GSM_BAND_U900) + g_string_append (band_str, _("WCDMA 3GPP UMTS 900 MHz, ")); + if (bands & NM_SETTING_GSM_BAND_U17IX) + g_string_append (band_str, _("WCDMA 3GPP UMTS 1700 MHz, ")); + + if (band_str->str[band_str->len-1] == '(') + g_string_assign (band_str, _("unknown")); + else + g_string_truncate (band_str, band_str->len-2); /* chop off trailing ', ' */ + + g_string_append_c (band_str, ')'); + + return g_string_free (band_str, FALSE); +} + + +gboolean +setting_connection_details (NMSetting *setting, NmCli *nmc) +{ + NMSettingConnection *s_con; + guint64 timestamp; + char *timestamp_str; + guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; + guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; + guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; + + g_return_val_if_fail (NM_IS_SETTING_CONNECTION (setting), FALSE); + s_con = (NMSettingConnection *) setting; + + nmc->allowed_fields = nmc_fields_setting_connection; + nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_CONNECTION_ALL, nmc->allowed_fields, NULL); + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print field names */ + + timestamp = nm_setting_connection_get_timestamp (s_con); + timestamp_str = g_strdup_printf ("%" G_GUINT64_FORMAT, timestamp); + + nmc->allowed_fields[0].value = NM_SETTING_CONNECTION_SETTING_NAME; + nmc->allowed_fields[1].value = nm_setting_connection_get_id (s_con); + nmc->allowed_fields[2].value = nm_setting_connection_get_uuid (s_con); + nmc->allowed_fields[3].value = nm_setting_connection_get_connection_type (s_con); + nmc->allowed_fields[4].value = nm_setting_connection_get_autoconnect (s_con) ? _("yes") : _("no"); + nmc->allowed_fields[5].value = timestamp_str; + nmc->allowed_fields[6].value = nm_setting_connection_get_read_only (s_con) ? ("yes") : _("no"); + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ + + g_free (timestamp_str); + + return TRUE; +} + +gboolean +setting_wired_details (NMSetting *setting, NmCli *nmc) +{ + NMSettingWired *s_wired; + const GByteArray *mac; + char *speed_str, *mtu_str, *mac_str = NULL; + guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; + guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; + guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; + + g_return_val_if_fail (NM_IS_SETTING_WIRED (setting), FALSE); + s_wired = (NMSettingWired *) setting; + + nmc->allowed_fields = nmc_fields_setting_wired; + nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_WIRED_ALL, nmc->allowed_fields, NULL); + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print field names */ + + speed_str = g_strdup_printf ("%d", nm_setting_wired_get_speed (s_wired)); + mtu_str = g_strdup_printf ("%d", nm_setting_wired_get_mtu (s_wired)); + mac = nm_setting_wired_get_mac_address (s_wired); + if (mac) + mac_str = g_strdup_printf ("%02X:%02X:%02X:%02X:%02X:%02X", mac->data[0], mac->data[1], mac->data[2], mac->data[3], mac->data[4], mac->data[5]); + + nmc->allowed_fields[0].value = NM_SETTING_WIRED_SETTING_NAME; + nmc->allowed_fields[1].value = nm_setting_wired_get_port (s_wired); + nmc->allowed_fields[2].value = speed_str; + nmc->allowed_fields[3].value = nm_setting_wired_get_duplex (s_wired); + nmc->allowed_fields[4].value = nm_setting_wired_get_auto_negotiate (s_wired) ? _("yes") : _("no"); + nmc->allowed_fields[5].value = mac_str; + nmc->allowed_fields[6].value = strcmp (mtu_str, "0") ? mtu_str : _("auto"); + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ + + g_free (speed_str); + g_free (mac_str); + g_free (mtu_str); + + return TRUE; +} + +gboolean +setting_802_1X_details (NMSetting *setting, NmCli *nmc) +{ + NMSetting8021x *s_8021X; + NMSetting8021xCKScheme scheme; + GString *eap_str; + char *ca_cert_str = NULL, *client_cert_str = NULL, *phase2_ca_cert_str = NULL; + char *phase2_client_cert_str = NULL, *private_key_str = NULL, *phase2_private_key_str = NULL; + int i; + guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; + guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; + guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; + + g_return_val_if_fail (NM_IS_SETTING_802_1X (setting), FALSE); + s_8021X = (NMSetting8021x *) setting; + + nmc->allowed_fields = nmc_fields_setting_8021X; + nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_802_1X_ALL, nmc->allowed_fields, NULL); + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print field names */ + + eap_str = g_string_new (NULL); + for (i = 0; i < nm_setting_802_1x_get_num_eap_methods (s_8021X); i++) { + if (i > 0) + g_string_append_c (eap_str, ','); + g_string_append (eap_str, nm_setting_802_1x_get_eap_method (s_8021X, i)); + } + scheme = nm_setting_802_1x_get_ca_cert_scheme (s_8021X); + if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB) + ca_cert_str = blob_cert_to_string (nm_setting_802_1x_get_ca_cert_blob (s_8021X)); + if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH) + ca_cert_str = g_strdup (nm_setting_802_1x_get_ca_cert_path (s_8021X)); + + scheme = nm_setting_802_1x_get_client_cert_scheme (s_8021X); + if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB) + client_cert_str = blob_cert_to_string (nm_setting_802_1x_get_client_cert_blob (s_8021X)); + if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH) + client_cert_str = g_strdup (nm_setting_802_1x_get_client_cert_path (s_8021X)); + + scheme = nm_setting_802_1x_get_phase2_ca_cert_scheme (s_8021X); + if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB) + phase2_ca_cert_str = blob_cert_to_string (nm_setting_802_1x_get_phase2_ca_cert_blob (s_8021X)); + if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH) + phase2_ca_cert_str = g_strdup (nm_setting_802_1x_get_phase2_ca_cert_path (s_8021X)); + + scheme = nm_setting_802_1x_get_phase2_client_cert_scheme (s_8021X); + if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB) + phase2_client_cert_str = blob_cert_to_string (nm_setting_802_1x_get_phase2_client_cert_blob (s_8021X)); + if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH) + phase2_client_cert_str = g_strdup (nm_setting_802_1x_get_phase2_client_cert_path (s_8021X)); + + scheme = nm_setting_802_1x_get_private_key_scheme (s_8021X); + if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB) + private_key_str = blob_cert_to_string (nm_setting_802_1x_get_private_key_blob (s_8021X)); + if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH) + private_key_str = g_strdup (nm_setting_802_1x_get_private_key_path (s_8021X)); + + scheme = nm_setting_802_1x_get_phase2_private_key_scheme (s_8021X); + if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB) + phase2_private_key_str = blob_cert_to_string (nm_setting_802_1x_get_phase2_private_key_blob (s_8021X)); + if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH) + phase2_private_key_str = g_strdup (nm_setting_802_1x_get_phase2_private_key_path (s_8021X)); + + nmc->allowed_fields[0].value = NM_SETTING_802_1X_SETTING_NAME; + nmc->allowed_fields[1].value = eap_str->str; + nmc->allowed_fields[2].value = nm_setting_802_1x_get_identity (s_8021X); + nmc->allowed_fields[3].value = nm_setting_802_1x_get_anonymous_identity (s_8021X); + nmc->allowed_fields[4].value = ca_cert_str; + nmc->allowed_fields[5].value = nm_setting_802_1x_get_ca_path (s_8021X); + nmc->allowed_fields[6].value = client_cert_str; + nmc->allowed_fields[7].value = nm_setting_802_1x_get_phase1_peapver (s_8021X); + nmc->allowed_fields[8].value = nm_setting_802_1x_get_phase1_peaplabel (s_8021X); + nmc->allowed_fields[9].value = nm_setting_802_1x_get_phase1_fast_provisioning (s_8021X); + nmc->allowed_fields[10].value = nm_setting_802_1x_get_phase2_auth (s_8021X); + nmc->allowed_fields[11].value = nm_setting_802_1x_get_phase2_autheap (s_8021X); + nmc->allowed_fields[12].value = phase2_ca_cert_str; + nmc->allowed_fields[13].value = nm_setting_802_1x_get_phase2_ca_path (s_8021X); + nmc->allowed_fields[14].value = phase2_client_cert_str; + nmc->allowed_fields[15].value = nm_setting_802_1x_get_password (s_8021X); + nmc->allowed_fields[16].value = private_key_str; + nmc->allowed_fields[17].value = nm_setting_802_1x_get_private_key_password (s_8021X); + nmc->allowed_fields[18].value = phase2_private_key_str; + nmc->allowed_fields[19].value = nm_setting_802_1x_get_phase2_private_key_password (s_8021X); + nmc->allowed_fields[20].value = nm_setting_802_1x_get_pin (s_8021X); + nmc->allowed_fields[21].value = nm_setting_802_1x_get_psk (s_8021X); + nmc->allowed_fields[22].value = nm_setting_802_1x_get_system_ca_certs (s_8021X) ? _("yes") : _("no"); + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ + + g_free (ca_cert_str); + g_free (client_cert_str); + g_free (phase2_ca_cert_str); + g_free (phase2_client_cert_str); + g_free (private_key_str); + g_free (phase2_private_key_str); + g_string_free (eap_str, TRUE); + + return TRUE; +} + +gboolean +setting_wireless_details (NMSetting *setting, NmCli *nmc) +{ + NMSettingWireless *s_wireless; + int i; + const GByteArray *ssid, *bssid, *mac; + char *ssid_str, *channel_str, *rate_str, *tx_power_str, *mtu_str; + char *mac_str = NULL, *bssid_str = NULL; + GString *seen_bssids; + guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; + guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; + guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; + + g_return_val_if_fail (NM_IS_SETTING_WIRELESS (setting), FALSE); + s_wireless = (NMSettingWireless *) setting; + + nmc->allowed_fields = nmc_fields_setting_wireless; + nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_WIRELESS_ALL, nmc->allowed_fields, NULL); + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print field names */ + + ssid = nm_setting_wireless_get_ssid (s_wireless); + ssid_str = ssid_to_printable ((const char *) ssid->data, ssid->len); + channel_str = g_strdup_printf ("%d", nm_setting_wireless_get_channel (s_wireless)); + rate_str = g_strdup_printf ("%d", nm_setting_wireless_get_rate (s_wireless)); + bssid = nm_setting_wireless_get_bssid (s_wireless); + if (bssid) + bssid_str = g_strdup_printf ("%02X:%02X:%02X:%02X:%02X:%02X", bssid->data[0], bssid->data[1], bssid->data[2], bssid->data[3], bssid->data[4], bssid->data[5]); + tx_power_str = g_strdup_printf ("%d", nm_setting_wireless_get_tx_power (s_wireless)); + mtu_str = g_strdup_printf ("%d", nm_setting_wireless_get_mtu (s_wireless)); + mac = nm_setting_wireless_get_mac_address (s_wireless); + if (mac) + mac_str = g_strdup_printf ("%02X:%02X:%02X:%02X:%02X:%02X", mac->data[0], mac->data[1], mac->data[2], mac->data[3], mac->data[4], mac->data[5]); + seen_bssids = g_string_new (NULL); + for (i = 0; i < nm_setting_wireless_get_num_seen_bssids (s_wireless); i++) { + if (i > 0) + g_string_append_c (seen_bssids, ','); + g_string_append (seen_bssids, nm_setting_wireless_get_seen_bssid (s_wireless, i)); + } + + nmc->allowed_fields[0].value = NM_SETTING_WIRELESS_SETTING_NAME; + nmc->allowed_fields[1].value = ssid_str; + nmc->allowed_fields[2].value = nm_setting_wireless_get_mode (s_wireless); + nmc->allowed_fields[3].value = nm_setting_wireless_get_band (s_wireless); + nmc->allowed_fields[4].value = channel_str; + nmc->allowed_fields[5].value = bssid_str ? bssid_str : _("not set"); + nmc->allowed_fields[6].value = rate_str; + nmc->allowed_fields[7].value = tx_power_str; + nmc->allowed_fields[8].value = mac_str ? mac_str : _("not set"); + nmc->allowed_fields[9].value = strcmp (mtu_str, "0") ? mtu_str : _("auto"); + nmc->allowed_fields[10].value = seen_bssids->str; + nmc->allowed_fields[11].value = nm_setting_wireless_get_security (s_wireless); + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ + + g_free (ssid_str); + g_free (channel_str); + g_free (bssid_str); + g_free (rate_str); + g_free (tx_power_str); + g_free (mac_str); + g_free (mtu_str); + g_string_free (seen_bssids, TRUE); + + return TRUE; +} + +gboolean +setting_wireless_security_details (NMSetting *setting, NmCli *nmc) +{ + NMSettingWirelessSecurity *s_wireless_sec; + int i; + char *wep_tx_keyidx_str, *wep_key_type_str; + GString *protos, *pairwises, *groups; + guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; + guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; + guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; + + g_return_val_if_fail (NM_IS_SETTING_WIRELESS_SECURITY (setting), FALSE); + s_wireless_sec = (NMSettingWirelessSecurity *) setting; + + nmc->allowed_fields = nmc_fields_setting_wireless_security; + nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_WIRELESS_SECURITY_ALL, nmc->allowed_fields, NULL); + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print field names */ + + wep_tx_keyidx_str = g_strdup_printf ("%d", nm_setting_wireless_security_get_wep_tx_keyidx (s_wireless_sec)); + protos = g_string_new (NULL); + for (i = 0; i < nm_setting_wireless_security_get_num_protos (s_wireless_sec); i++) { + if (i > 0) + g_string_append_c (protos, ','); + g_string_append (protos, nm_setting_wireless_security_get_proto (s_wireless_sec, i)); + } + pairwises = g_string_new (NULL); + for (i = 0; i < nm_setting_wireless_security_get_num_pairwise (s_wireless_sec); i++) { + if (i > 0) + g_string_append_c (pairwises, ','); + g_string_append (pairwises, nm_setting_wireless_security_get_pairwise (s_wireless_sec, i)); + } + groups = g_string_new (NULL); + for (i = 0; i < nm_setting_wireless_security_get_num_groups (s_wireless_sec); i++) { + if (i > 0) + g_string_append_c (groups, ','); + g_string_append (groups, nm_setting_wireless_security_get_group (s_wireless_sec, i)); + } + wep_key_type_str = wep_key_type_to_string (nm_setting_wireless_security_get_wep_key_type (s_wireless_sec)); + + nmc->allowed_fields[0].value = NM_SETTING_WIRELESS_SECURITY_SETTING_NAME; + nmc->allowed_fields[1].value = nm_setting_wireless_security_get_key_mgmt (s_wireless_sec); + nmc->allowed_fields[2].value = wep_tx_keyidx_str; + nmc->allowed_fields[3].value = nm_setting_wireless_security_get_auth_alg (s_wireless_sec); + nmc->allowed_fields[4].value = protos->str; + nmc->allowed_fields[5].value = pairwises->str; + nmc->allowed_fields[6].value = groups->str; + nmc->allowed_fields[7].value = nm_setting_wireless_security_get_leap_username (s_wireless_sec); + nmc->allowed_fields[8].value = nm_setting_wireless_security_get_wep_key (s_wireless_sec, 0); + nmc->allowed_fields[9].value = nm_setting_wireless_security_get_wep_key (s_wireless_sec, 1); + nmc->allowed_fields[10].value = nm_setting_wireless_security_get_wep_key (s_wireless_sec, 2); + nmc->allowed_fields[11].value = nm_setting_wireless_security_get_wep_key (s_wireless_sec, 3); + nmc->allowed_fields[12].value = nm_setting_wireless_security_get_psk (s_wireless_sec); + nmc->allowed_fields[13].value = nm_setting_wireless_security_get_leap_password (s_wireless_sec); + nmc->allowed_fields[14].value = wep_key_type_str; + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ + + g_free (wep_tx_keyidx_str); + g_free (wep_key_type_str); + g_string_free (protos, TRUE); + g_string_free (pairwises, TRUE); + g_string_free (groups, TRUE); + + return TRUE; +} + +gboolean +setting_ip4_config_details (NMSetting *setting, NmCli *nmc) +{ + NMSettingIP4Config *s_ip4; + GString *dns_str, *dns_search_str, *addr_str, *route_str; + int i, num; + guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; + guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; + guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; + + g_return_val_if_fail (NM_IS_SETTING_IP4_CONFIG (setting), FALSE); + s_ip4 = (NMSettingIP4Config *) setting; + + nmc->allowed_fields = nmc_fields_setting_ip4_config; + nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_IP4_CONFIG_ALL, nmc->allowed_fields, NULL); + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print field names */ + + dns_str = g_string_new (NULL); + num = nm_setting_ip4_config_get_num_dns (s_ip4); + for (i = 0; i < num; i++) { + char buf[INET_ADDRSTRLEN]; + guint32 ip; + + ip = nm_setting_ip4_config_get_dns (s_ip4, i); + memset (buf, 0, sizeof (buf)); + inet_ntop (AF_INET, (const void *) &ip, buf, sizeof (buf)); + if (i > 0) + g_string_append (dns_str, ", "); + g_string_append (dns_str, buf); + } + + dns_search_str = g_string_new (NULL); + num = nm_setting_ip4_config_get_num_dns_searches (s_ip4); + for (i = 0; i < num; i++) { + const char *domain; + + domain = nm_setting_ip4_config_get_dns_search (s_ip4, i); + if (i > 0) + g_string_append (dns_search_str, ", "); + g_string_append (dns_search_str, domain); + } + + addr_str = g_string_new (NULL); + num = nm_setting_ip4_config_get_num_addresses (s_ip4); + for (i = 0; i < num; i++) { + char buf[INET_ADDRSTRLEN]; + char *tmp; + NMIP4Address *addr; + guint32 ip; + + if (i > 0) + g_string_append (addr_str, "; "); + + g_string_append (addr_str, "{ "); + + addr = nm_setting_ip4_config_get_address (s_ip4, i); + + memset (buf, 0, sizeof (buf)); + ip = nm_ip4_address_get_address (addr); + inet_ntop (AF_INET, (const void *) &ip, buf, sizeof (buf)); + g_string_append_printf (addr_str, "ip = %s", buf); + + tmp = g_strdup_printf ("/%u", nm_ip4_address_get_prefix (addr)); + g_string_append (addr_str, tmp); + g_free (tmp); + + memset (buf, 0, sizeof (buf)); + ip = nm_ip4_address_get_gateway (addr); + inet_ntop (AF_INET, (const void *) &ip, buf, sizeof (buf)); + g_string_append_printf (addr_str, ", gw = %s", buf); + + g_string_append (addr_str, " }"); + } + + route_str = g_string_new (NULL); + num = nm_setting_ip4_config_get_num_routes (s_ip4); + for (i = 0; i < num; i++) { + char buf[INET_ADDRSTRLEN]; + char *tmp; + NMIP4Route *route; + guint32 ip; + + if (i > 0) + g_string_append (route_str, "; "); + + g_string_append (route_str, "{ "); + + route = nm_setting_ip4_config_get_route (s_ip4, i); + + memset (buf, 0, sizeof (buf)); + ip = nm_ip4_route_get_dest (route); + inet_ntop (AF_INET, (const void *) &ip, buf, sizeof (buf)); + g_string_append_printf (route_str, "dst = %s", buf); + + tmp = g_strdup_printf ("/%u", nm_ip4_route_get_prefix (route)); + g_string_append (route_str, tmp); + g_free (tmp); + + memset (buf, 0, sizeof (buf)); + ip = nm_ip4_route_get_next_hop (route); + inet_ntop (AF_INET, (const void *) &ip, buf, sizeof (buf)); + g_string_append_printf (route_str, ", nh = %s", buf); + + tmp = g_strdup_printf (", mt = %u", nm_ip4_route_get_metric (route)); + g_string_append (route_str, tmp); + g_free (tmp); + + g_string_append (route_str, " }"); + } + + nmc->allowed_fields[0].value = NM_SETTING_IP4_CONFIG_SETTING_NAME; + nmc->allowed_fields[1].value = nm_setting_ip4_config_get_method (s_ip4); + nmc->allowed_fields[2].value = dns_str->str; + nmc->allowed_fields[3].value = dns_search_str->str; + nmc->allowed_fields[4].value = addr_str->str; + nmc->allowed_fields[5].value = route_str->str; + nmc->allowed_fields[6].value = nm_setting_ip4_config_get_ignore_auto_routes (s_ip4) ? _("yes") : _("no"); + nmc->allowed_fields[7].value = nm_setting_ip4_config_get_ignore_auto_dns (s_ip4) ? _("yes") : _("no"); + nmc->allowed_fields[8].value = nm_setting_ip4_config_get_dhcp_client_id (s_ip4); + nmc->allowed_fields[9].value = nm_setting_ip4_config_get_dhcp_send_hostname (s_ip4) ? _("yes") : _("no"); + nmc->allowed_fields[10].value = nm_setting_ip4_config_get_dhcp_hostname (s_ip4); + nmc->allowed_fields[11].value = nm_setting_ip4_config_get_never_default (s_ip4) ? _("yes") : _("no"); + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ + + g_string_free (dns_str, TRUE); + g_string_free (dns_search_str, TRUE); + g_string_free (addr_str, TRUE); + g_string_free (route_str, TRUE); + + return TRUE; +} + +gboolean +setting_ip6_config_details (NMSetting *setting, NmCli *nmc) +{ + NMSettingIP6Config *s_ip6; + GString *dns_str, *dns_search_str, *addr_str, *route_str; + int i, num; + guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; + guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; + guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; + + g_return_val_if_fail (NM_IS_SETTING_IP6_CONFIG (setting), FALSE); + s_ip6 = (NMSettingIP6Config *) setting; + + nmc->allowed_fields = nmc_fields_setting_ip6_config; + nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_IP6_CONFIG_ALL, nmc->allowed_fields, NULL); + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print field names */ + + dns_str = g_string_new (NULL); + num = nm_setting_ip6_config_get_num_dns (s_ip6); + for (i = 0; i < num; i++) { + char buf[INET6_ADDRSTRLEN]; + const struct in6_addr *ip; + + ip = nm_setting_ip6_config_get_dns (s_ip6, i); + memset (buf, 0, sizeof (buf)); + inet_ntop (AF_INET6, (const void *) ip, buf, sizeof (buf)); + if (i > 0) + g_string_append (dns_str, ", "); + g_string_append (dns_str, buf); + } + + dns_search_str = g_string_new (NULL); + num = nm_setting_ip6_config_get_num_dns_searches (s_ip6); + for (i = 0; i < num; i++) { + const char *domain; + + domain = nm_setting_ip6_config_get_dns_search (s_ip6, i); + if (i > 0) + g_string_append (dns_search_str, ", "); + g_string_append (dns_search_str, domain); + } + + addr_str = g_string_new (NULL); + num = nm_setting_ip6_config_get_num_addresses (s_ip6); + for (i = 0; i < num; i++) { + char buf[INET6_ADDRSTRLEN]; + char *tmp; + NMIP6Address *addr; + const struct in6_addr *ip; + + if (i > 0) + g_string_append (addr_str, "; "); + + g_string_append (addr_str, "{ "); + + addr = nm_setting_ip6_config_get_address (s_ip6, i); + + memset (buf, 0, sizeof (buf)); + ip = nm_ip6_address_get_address (addr); + inet_ntop (AF_INET6, (const void *) ip, buf, sizeof (buf)); + g_string_append_printf (addr_str, "ip = %s", buf); + + tmp = g_strdup_printf ("/%u", nm_ip6_address_get_prefix (addr)); + g_string_append (addr_str, tmp); + g_free (tmp); + + g_string_append (addr_str, " }"); + } + + route_str = g_string_new (NULL); + num = nm_setting_ip6_config_get_num_routes (s_ip6); + for (i = 0; i < num; i++) { + char buf[INET6_ADDRSTRLEN]; + char *tmp; + NMIP6Route *route; + const struct in6_addr *ip; + + if (i > 0) + g_string_append (route_str, "; "); + + g_string_append (route_str, "{ "); + + route = nm_setting_ip6_config_get_route (s_ip6, i); + + memset (buf, 0, sizeof (buf)); + ip = nm_ip6_route_get_dest (route); + inet_ntop (AF_INET6, (const void *) ip, buf, sizeof (buf)); + g_string_append_printf (route_str, "dst = %s", buf); + + tmp = g_strdup_printf ("/%u", nm_ip6_route_get_prefix (route)); + g_string_append (route_str, tmp); + g_free (tmp); + + memset (buf, 0, sizeof (buf)); + ip = nm_ip6_route_get_next_hop (route); + inet_ntop (AF_INET6, (const void *) ip, buf, sizeof (buf)); + g_string_append_printf (route_str, ", nh = %s", buf); + + tmp = g_strdup_printf (", mt = %u", nm_ip6_route_get_metric (route)); + g_string_append (route_str, tmp); + g_free (tmp); + + g_string_append (route_str, " }"); + } + + nmc->allowed_fields[0].value = NM_SETTING_IP6_CONFIG_SETTING_NAME; + nmc->allowed_fields[1].value = nm_setting_ip6_config_get_method (s_ip6); + nmc->allowed_fields[2].value = dns_str->str; + nmc->allowed_fields[3].value = dns_search_str->str; + nmc->allowed_fields[4].value = addr_str->str; + nmc->allowed_fields[5].value = route_str->str; + nmc->allowed_fields[6].value = nm_setting_ip6_config_get_ignore_auto_routes (s_ip6) ? _("yes") : _("no"); + nmc->allowed_fields[7].value = nm_setting_ip6_config_get_ignore_auto_dns (s_ip6) ? _("yes") : _("no"); + nmc->allowed_fields[8].value = nm_setting_ip6_config_get_never_default (s_ip6) ? _("yes") : _("no"); + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ + + g_string_free (dns_str, TRUE); + g_string_free (dns_search_str, TRUE); + g_string_free (addr_str, TRUE); + g_string_free (route_str, TRUE); + + return TRUE; +} + +gboolean +setting_serial_details (NMSetting *setting, NmCli *nmc) +{ + NMSettingSerial *s_serial; + char *baud_str, *bits_str, *parity_str, *stopbits_str, *send_delay_str; + guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; + guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; + guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; + + g_return_val_if_fail (NM_IS_SETTING_SERIAL (setting), FALSE); + s_serial = (NMSettingSerial *) setting; + + nmc->allowed_fields = nmc_fields_setting_serial; + nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_SERIAL_ALL, nmc->allowed_fields, NULL); + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print field names */ + + baud_str = g_strdup_printf ("%d", nm_setting_serial_get_baud (s_serial)); + bits_str = g_strdup_printf ("%d", nm_setting_serial_get_bits (s_serial)); + parity_str = g_strdup_printf ("%c", nm_setting_serial_get_parity (s_serial)); + stopbits_str = g_strdup_printf ("%d", nm_setting_serial_get_stopbits (s_serial)); + send_delay_str = g_strdup_printf ("%" G_GUINT64_FORMAT, nm_setting_serial_get_send_delay (s_serial)); + + nmc->allowed_fields[0].value = NM_SETTING_SERIAL_SETTING_NAME; + nmc->allowed_fields[1].value = baud_str; + nmc->allowed_fields[2].value = bits_str; + nmc->allowed_fields[3].value = parity_str; + nmc->allowed_fields[4].value = stopbits_str; + nmc->allowed_fields[5].value = send_delay_str; + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ + + g_free (baud_str); + g_free (bits_str); + g_free (parity_str); + g_free (stopbits_str); + g_free (send_delay_str); + + return TRUE; +} + +gboolean +setting_ppp_details (NMSetting *setting, NmCli *nmc) +{ + NMSettingPPP *s_ppp; + char *baud_str, *mru_str, *mtu_str, *lcp_echo_failure_str, *lcp_echo_interval_str; + guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; + guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; + guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; + + g_return_val_if_fail (NM_IS_SETTING_PPP (setting), FALSE); + s_ppp = (NMSettingPPP *) setting; + + nmc->allowed_fields = nmc_fields_setting_ppp; + nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_PPP_ALL, nmc->allowed_fields, NULL); + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print field names */ + + baud_str = g_strdup_printf ("%d", nm_setting_ppp_get_baud (s_ppp)); + mru_str = g_strdup_printf ("%d", nm_setting_ppp_get_mru (s_ppp)); + mtu_str = g_strdup_printf ("%d", nm_setting_ppp_get_mtu (s_ppp)); + lcp_echo_failure_str = g_strdup_printf ("%d", nm_setting_ppp_get_lcp_echo_failure (s_ppp)); + lcp_echo_interval_str = g_strdup_printf ("%d", nm_setting_ppp_get_lcp_echo_interval (s_ppp)); + + nmc->allowed_fields[0].value = NM_SETTING_PPP_SETTING_NAME; + nmc->allowed_fields[1].value = nm_setting_ppp_get_noauth (s_ppp) ? _("yes") : _("no"); + nmc->allowed_fields[2].value = nm_setting_ppp_get_refuse_eap (s_ppp) ? _("yes") : _("no"); + nmc->allowed_fields[3].value = nm_setting_ppp_get_refuse_pap (s_ppp) ? _("yes") : _("no"); + nmc->allowed_fields[4].value = nm_setting_ppp_get_refuse_chap (s_ppp) ? _("yes") : _("no"); + nmc->allowed_fields[5].value = nm_setting_ppp_get_refuse_mschap (s_ppp) ? _("yes") : _("no"); + nmc->allowed_fields[6].value = nm_setting_ppp_get_refuse_mschapv2 (s_ppp) ? _("yes") : _("no"); + nmc->allowed_fields[7].value = nm_setting_ppp_get_nobsdcomp (s_ppp) ? _("yes") : _("no"); + nmc->allowed_fields[8].value = nm_setting_ppp_get_nodeflate (s_ppp) ? _("yes") : _("no"); + nmc->allowed_fields[9].value = nm_setting_ppp_get_no_vj_comp (s_ppp) ? _("yes") : _("no"); + nmc->allowed_fields[10].value = nm_setting_ppp_get_require_mppe (s_ppp) ? _("yes") : _("no"); + nmc->allowed_fields[11].value = nm_setting_ppp_get_require_mppe_128 (s_ppp) ? _("yes") : _("no"); + nmc->allowed_fields[12].value = nm_setting_ppp_get_mppe_stateful (s_ppp) ? _("yes") : _("no"); + nmc->allowed_fields[13].value = nm_setting_ppp_get_crtscts (s_ppp) ? _("yes") : _("no"); + nmc->allowed_fields[14].value = baud_str; + nmc->allowed_fields[15].value = mru_str; + nmc->allowed_fields[16].value = mtu_str; + nmc->allowed_fields[17].value = lcp_echo_failure_str; + nmc->allowed_fields[18].value = lcp_echo_interval_str; + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ + + g_free (baud_str); + g_free (mru_str); + g_free (mtu_str); + g_free (lcp_echo_failure_str); + g_free (lcp_echo_interval_str); + + return TRUE; +} + +gboolean +setting_pppoe_details (NMSetting *setting, NmCli *nmc) +{ + NMSettingPPPOE *s_pppoe; + guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; + guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; + guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; + + g_return_val_if_fail (NM_IS_SETTING_PPPOE (setting), FALSE); + s_pppoe = (NMSettingPPPOE *) setting; + + nmc->allowed_fields = nmc_fields_setting_pppoe; + nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_PPPOE_ALL, nmc->allowed_fields, NULL); + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print field names */ + + nmc->allowed_fields[0].value = NM_SETTING_PPPOE_SETTING_NAME; + nmc->allowed_fields[1].value = nm_setting_pppoe_get_service (s_pppoe); + nmc->allowed_fields[2].value = nm_setting_pppoe_get_username (s_pppoe); + nmc->allowed_fields[3].value = nm_setting_pppoe_get_password (s_pppoe); + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ + + return TRUE; +} + +gboolean +setting_gsm_details (NMSetting *setting, NmCli *nmc) +{ + NMSettingGsm *s_gsm; + char *network_type_str, *allowed_bands_str; + guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; + guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; + guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; + + g_return_val_if_fail (NM_IS_SETTING_GSM (setting), FALSE); + s_gsm = (NMSettingGsm *) setting; + + nmc->allowed_fields = nmc_fields_setting_gsm; + nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_GSM_ALL, nmc->allowed_fields, NULL); + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print field names */ + + network_type_str = g_strdup_printf ("%d", nm_setting_gsm_get_network_type (s_gsm)); + allowed_bands_str = allowed_bands_to_string (nm_setting_gsm_get_allowed_bands (s_gsm)); + + nmc->allowed_fields[0].value = NM_SETTING_GSM_SETTING_NAME; + nmc->allowed_fields[1].value = nm_setting_gsm_get_number (s_gsm); + nmc->allowed_fields[2].value = nm_setting_gsm_get_username (s_gsm); + nmc->allowed_fields[3].value = nm_setting_gsm_get_password (s_gsm); + nmc->allowed_fields[4].value = nm_setting_gsm_get_apn (s_gsm); + nmc->allowed_fields[5].value = nm_setting_gsm_get_network_id (s_gsm); + nmc->allowed_fields[6].value = network_type_str; + nmc->allowed_fields[7].value = allowed_bands_str; + nmc->allowed_fields[8].value = nm_setting_gsm_get_pin (s_gsm); + nmc->allowed_fields[9].value = nm_setting_gsm_get_home_only (s_gsm) ? _("yes") : _("no"); + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ + + g_free (network_type_str); + g_free (allowed_bands_str); + + return TRUE; +} + +gboolean +setting_cdma_details (NMSetting *setting, NmCli *nmc) +{ + NMSettingCdma *s_cdma; + guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; + guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; + guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; + + g_return_val_if_fail (NM_IS_SETTING_CDMA (setting), FALSE); + s_cdma = (NMSettingCdma *) setting; + + nmc->allowed_fields = nmc_fields_setting_cdma; + nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_CDMA_ALL, nmc->allowed_fields, NULL); + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print field names */ + + nmc->allowed_fields[0].value = NM_SETTING_CDMA_SETTING_NAME; + nmc->allowed_fields[1].value = nm_setting_cdma_get_number (s_cdma); + nmc->allowed_fields[2].value = nm_setting_cdma_get_username (s_cdma); + nmc->allowed_fields[3].value = nm_setting_cdma_get_password (s_cdma); + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ + + return TRUE; +} + +gboolean +setting_bluetooth_details (NMSetting *setting, NmCli *nmc) +{ + NMSettingBluetooth *s_bluetooth; + const GByteArray *bdaddr; + char *bdaddr_str = NULL; + guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; + guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; + guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; + + g_return_val_if_fail (NM_IS_SETTING_BLUETOOTH (setting), FALSE); + s_bluetooth = (NMSettingBluetooth *) setting; + + nmc->allowed_fields = nmc_fields_setting_bluetooth; + nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_BLUETOOTH_ALL, nmc->allowed_fields, NULL); + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print field names */ + + bdaddr = nm_setting_bluetooth_get_bdaddr (s_bluetooth); + if (bdaddr) + bdaddr_str = g_strdup_printf ("%02X:%02X:%02X:%02X:%02X:%02X", bdaddr->data[0], bdaddr->data[1], bdaddr->data[2], + bdaddr->data[3], bdaddr->data[4], bdaddr->data[5]); + nmc->allowed_fields[0].value = NM_SETTING_BLUETOOTH_SETTING_NAME; + nmc->allowed_fields[1].value = bdaddr_str; + nmc->allowed_fields[2].value = nm_setting_bluetooth_get_connection_type (s_bluetooth); + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ + + g_free (bdaddr_str); + + return TRUE; +} + +gboolean +setting_olpc_mesh_details (NMSetting *setting, NmCli *nmc) +{ + NMSettingOlpcMesh *s_olpc_mesh; + const GByteArray *ssid, *dhcp_anycast; + char *ssid_str, *channel_str, *dhcp_anycast_str = NULL; + guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; + guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; + guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; + + g_return_val_if_fail (NM_IS_SETTING_OLPC_MESH (setting), FALSE); + s_olpc_mesh = (NMSettingOlpcMesh *) setting; + + nmc->allowed_fields = nmc_fields_setting_olpc_mesh; + nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_OLPC_MESH_ALL, nmc->allowed_fields, NULL); + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print field names */ + + ssid = nm_setting_olpc_mesh_get_ssid (s_olpc_mesh); + ssid_str = ssid_to_printable ((const char *) ssid->data, ssid->len); + channel_str = g_strdup_printf ("%d", nm_setting_olpc_mesh_get_channel (s_olpc_mesh)); + dhcp_anycast = nm_setting_olpc_mesh_get_dhcp_anycast_address (s_olpc_mesh); + if (dhcp_anycast) + dhcp_anycast_str = g_strdup_printf ("%02X:%02X:%02X:%02X:%02X:%02X", dhcp_anycast->data[0], dhcp_anycast->data[1], dhcp_anycast->data[2], + dhcp_anycast->data[3], dhcp_anycast->data[4], dhcp_anycast->data[5]); + nmc->allowed_fields[0].value = NM_SETTING_OLPC_MESH_SETTING_NAME; + nmc->allowed_fields[1].value = ssid_str; + nmc->allowed_fields[2].value = channel_str; + nmc->allowed_fields[3].value = dhcp_anycast_str; + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ + + g_free (ssid_str); + g_free (channel_str); + g_free (dhcp_anycast_str); + + return TRUE; +} + +static void +vpn_data_item (const char *key, const char *value, gpointer user_data) +{ + GString *ret_str = (GString *) user_data; + + if (ret_str->len != 0) + g_string_append (ret_str, ", "); + + g_string_append_printf (ret_str, "%s = %s", key, value); +} + +gboolean +setting_vpn_details (NMSetting *setting, NmCli *nmc) +{ + NMSettingVPN *s_vpn; + GString *data_item_str, *secret_str; + guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; + guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; + guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; + + g_return_val_if_fail (NM_IS_SETTING_VPN (setting), FALSE); + s_vpn = (NMSettingVPN *) setting; + + nmc->allowed_fields = nmc_fields_setting_vpn; + nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_VPN_ALL, nmc->allowed_fields, NULL); + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print field names */ + + data_item_str = g_string_new (NULL); + secret_str = g_string_new (NULL); + nm_setting_vpn_foreach_data_item (s_vpn, &vpn_data_item, data_item_str); + nm_setting_vpn_foreach_secret (s_vpn, &vpn_data_item, secret_str); + + nmc->allowed_fields[0].value = NM_SETTING_VPN_SETTING_NAME; + nmc->allowed_fields[1].value = nm_setting_vpn_get_service_type (s_vpn); + nmc->allowed_fields[2].value = nm_setting_vpn_get_user_name (s_vpn); + nmc->allowed_fields[3].value = data_item_str->str; + nmc->allowed_fields[4].value = secret_str->str; + + nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; + print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ + + g_string_free (data_item_str, TRUE); + g_string_free (secret_str, TRUE); + + return TRUE; +} + diff --git a/cli/src/settings.h b/cli/src/settings.h new file mode 100644 index 0000000000..aec71551da --- /dev/null +++ b/cli/src/settings.h @@ -0,0 +1,59 @@ +/* nmcli - command-line tool to control NetworkManager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * (C) Copyright 2010 Red Hat, Inc. + */ + +#ifndef NMC_SETTINGS_H +#define NMC_SETTINGS_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "nmcli.h" +#include "utils.h" + + +gboolean setting_connection_details (NMSetting *setting, NmCli *nmc); +gboolean setting_wired_details (NMSetting *setting, NmCli *nmc); +gboolean setting_802_1X_details (NMSetting *setting, NmCli *nmc); +gboolean setting_wireless_details (NMSetting *setting, NmCli *nmc); +gboolean setting_wireless_security_details (NMSetting *setting, NmCli *nmc); +gboolean setting_ip4_config_details (NMSetting *setting, NmCli *nmc); +gboolean setting_ip6_config_details (NMSetting *setting, NmCli *nmc); +gboolean setting_serial_details (NMSetting *setting, NmCli *nmc); +gboolean setting_ppp_details (NMSetting *setting, NmCli *nmc); +gboolean setting_pppoe_details (NMSetting *setting, NmCli *nmc); +gboolean setting_gsm_details (NMSetting *setting, NmCli *nmc); +gboolean setting_cdma_details (NMSetting *setting, NmCli *nmc); +gboolean setting_bluetooth_details (NMSetting *setting, NmCli *nmc); +gboolean setting_olpc_mesh_details (NMSetting *setting, NmCli *nmc); +gboolean setting_vpn_details (NMSetting *setting, NmCli *nmc); + +#endif /* NMC_SETTINGS_H */ diff --git a/cli/src/utils.c b/cli/src/utils.c new file mode 100644 index 0000000000..0096a0aed2 --- /dev/null +++ b/cli/src/utils.c @@ -0,0 +1,298 @@ +/* nmcli - command-line tool to control NetworkManager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * (C) Copyright 2010 Red Hat, Inc. + */ + +#include +#include + +#include +#include + +#include "utils.h" + +int +matches (const char *cmd, const char *pattern) +{ + int len = strlen (cmd); + if (len > strlen (pattern)) + return -1; + return memcmp (pattern, cmd, len); +} + +int +next_arg (int *argc, char ***argv) +{ + if (*argc <= 1) { + return -1; + } + else { + (*argc)--; + (*argv)++; + } + return 0; +} + +/* + * Convert SSID to a printable form. + * If it is an UTF-8 string, enclose it in quotes and return it. + * Otherwise convert it to a hex string representation. + * Caller has to free the returned string using g_free() + */ +char * +ssid_to_printable (const char *str, gsize len) +{ + GString *printable; + char *printable_str; + int i; + + if (str == NULL || len == 0) + return NULL; + + if (g_utf8_validate (str, len, NULL)) + return g_strdup_printf ("'%.*s'", (int) len, str); + + printable = g_string_new (NULL); + for (i = 0; i < len; i++) { + g_string_append_printf (printable, "%02X", (unsigned char) str[i]); + } + printable_str = g_string_free (printable, FALSE); + return printable_str; +} + +/* + * Find out how many columns an UTF-8 string occupies on the screen + */ +int +nmc_string_screen_width (const char *start, const char *end) +{ + int width = 0; + + if (end == NULL) + end = start + strlen (start); + + while (start < end) { + width += g_unichar_iswide (g_utf8_get_char (start)) ? 2 : g_unichar_iszerowidth (g_utf8_get_char (start)) ? 0 : 1; + start = g_utf8_next_char (start); + } + return width; +} + +/* + * Parse comma separated fields in 'fields_str' according to 'fields_array'. + * IN: 'field_str': comma-separated fields names + * 'fields_array': array of allowed fields + * RETURN: GArray with indices representing fields in 'fields_array'. + * Caller is responsible to free it. + */ +GArray * +parse_output_fields (const char *fields_str, const NmcOutputField fields_array[], GError **error) +{ + char **fields, **iter; + GArray *array; + int i; + + g_return_val_if_fail (error == NULL || *error == NULL, NULL); + + array = g_array_new (FALSE, FALSE, sizeof (int)); + + /* Split supplied fields string */ + fields = g_strsplit_set (fields_str, ",", -1); + for (iter = fields; iter && *iter; iter++) { + for (i = 0; fields_array[i].name; i++) { + if (strcasecmp (*iter, fields_array[i].name) == 0) { + g_array_append_val (array, i); + break; + } + } + if (fields_array[i].name == NULL) { + if (!strcasecmp (*iter, "all") || !strcasecmp (*iter, "common")) + g_set_error (error, 0, 0, _("field '%s' has to be alone"), *iter); + + else + g_set_error (error, 0, 1, _("invalid field '%s'"), *iter); + g_array_free (array, TRUE); + array = NULL; + goto done; + } + } +done: + if (fields) + g_strfreev (fields); + return array; +} + +gboolean +nmc_terse_option_check (NMCPrintOutput print_output, const char *fields, GError **error) +{ + g_return_val_if_fail (error == NULL || *error == NULL, FALSE); + + if (print_output == NMC_PRINT_TERSE) { + if (!fields) { + g_set_error (error, 0, 0, _("Option '--terse' requires specifying '--fields'")); + return FALSE; + } else if ( !strcasecmp (fields, "all") + || !strcasecmp (fields, "common")) { + g_set_error (error, 0, 0, _("Option '--terse' requires specific '--fields' option values , not '%s'"), fields); + return FALSE; + } + } + return TRUE; +} + +/* + * Print both headers or values of 'field_values' array. + * Entries to print and their order are specified via indices + * in 'fields.indices' array. + * 'fields.flags' specify various aspects influencing the output. + */ +void +print_fields (const NmcPrintFields fields, const NmcOutputField field_values[]) +{ + GString *str; + int width1, width2; + int table_width = 0; + char *line = NULL; + char *indent_str; + const char *value; + const char *not_set_str = _("not set"); + int i, idx; + gboolean multiline = fields.flags & NMC_PF_FLAG_MULTILINE; + gboolean terse = fields.flags & NMC_PF_FLAG_TERSE; + gboolean pretty = fields.flags & NMC_PF_FLAG_PRETTY; + gboolean main_header_add = fields.flags & NMC_PF_FLAG_MAIN_HEADER_ADD; + gboolean main_header_only = fields.flags & NMC_PF_FLAG_MAIN_HEADER_ONLY; + gboolean field_names = fields.flags & NMC_PF_FLAG_FIELD_NAMES; + gboolean escape = fields.flags & NMC_PF_FLAG_ESCAPE; + gboolean section_prefix = fields.flags & NMC_PF_FLAG_SECTION_PREFIX; + gboolean main_header = main_header_add || main_header_only; + + /* No headers are printed in terse mode: + * - neither main header nor field (column) names + */ + if ((main_header_only || field_names) && terse) + return; + + if (multiline) { + /* --- Multiline mode --- */ + enum { ML_HEADER_WIDTH = 79 }; + if (main_header && pretty) { + /* Print the main header */ + int header_width = nmc_string_screen_width (fields.header_name, NULL) + 4; + table_width = header_width < ML_HEADER_WIDTH ? ML_HEADER_WIDTH : header_width; + + line = g_strnfill (ML_HEADER_WIDTH, '='); + width1 = strlen (fields.header_name); + width2 = nmc_string_screen_width (fields.header_name, NULL); + printf ("%s\n", line); + printf ("%*s\n", (table_width + width2)/2 + width1 - width2, fields.header_name); + printf ("%s\n", line); + g_free (line); + } + + /* Print values */ + if (!main_header_only && !field_names) { + for (i = 0; i < fields.indices->len; i++) { + char *tmp; + idx = g_array_index (fields.indices, int, i); + if (section_prefix && idx == 0) /* The first field is section prefix */ + continue; + tmp = g_strdup_printf ("%s%s%s:", section_prefix ? field_values[0].value : "", + section_prefix ? "." : "", + _(field_values[idx].name_l10n)); + printf ("%-*s%s\n", terse ? 0 : 32, tmp, field_values[idx].value ? field_values[idx].value : not_set_str); + g_free (tmp); + } + if (pretty) { + line = g_strnfill (ML_HEADER_WIDTH, '-'); + printf ("%s\n", line); + g_free (line); + } + } + return; + } + + /* --- Tabular mode: each line = one object --- */ + str = g_string_new (NULL); + + for (i = 0; i < fields.indices->len; i++) { + idx = g_array_index (fields.indices, int, i); + if (field_names) + value = _(field_values[idx].name_l10n); + else + value = field_values[idx].value ? field_values[idx].value : not_set_str; + if (terse) { + if (escape) { + const char *p = value; + while (*p) { + if (*p == ':' || *p == '\\') + g_string_append_c (str, '\\'); /* Escaping by '\' */ + g_string_append_c (str, *p); + p++; + } + } + else + g_string_append_printf (str, "%s", value); + g_string_append_c (str, ':'); /* Column separator */ + } else { + width1 = strlen (value); + width2 = nmc_string_screen_width (value, NULL); /* Width of the string (in screen colums) */ + if (strlen (value) == 0) + value = "--"; + g_string_append_printf (str, "%-*s", field_values[idx].width + width1 - width2, value); + g_string_append_c (str, ' '); /* Column separator */ + table_width += field_values[idx].width + width1 - width2 + 1; + } + } + + /* Print the main table header */ + if (main_header && pretty) { + int header_width = nmc_string_screen_width (fields.header_name, NULL) + 4; + table_width = table_width < header_width ? header_width : table_width; + + line = g_strnfill (table_width, '='); + width1 = strlen (fields.header_name); + width2 = nmc_string_screen_width (fields.header_name, NULL); + printf ("%s\n", line); + printf ("%*s\n", (table_width + width2)/2 + width1 - width2, fields.header_name); + printf ("%s\n", line); + g_free (line); + } + + /* Print actual values */ + if (!main_header_only && str->len > 0) { + g_string_truncate (str, str->len-1); /* Chop off last column separator */ + if (fields.indent > 0) { + indent_str = g_strnfill (fields.indent, ' '); + g_string_prepend (str, indent_str); + g_free (indent_str); + } + printf ("%s\n", str->str); + } + + /* Print horizontal separator */ + if (!main_header_only && field_names && pretty) { + if (str->len > 0) { + line = g_strnfill (table_width, '-'); + printf ("%s\n", line); + g_free (line); + } + } + + g_string_free (str, TRUE); +} + diff --git a/cli/src/utils.h b/cli/src/utils.h new file mode 100644 index 0000000000..308f6401b5 --- /dev/null +++ b/cli/src/utils.h @@ -0,0 +1,36 @@ +/* nmcli - command-line tool to control NetworkManager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * (C) Copyright 2010 Red Hat, Inc. + */ + +#ifndef NMC_UTILS_H +#define NMC_UTILS_H + +#include + +#include "nmcli.h" + +/* === Functions === */ +int matches (const char *cmd, const char *pattern); +int next_arg (int *argc, char ***argv); +char *ssid_to_printable (const char *str, gsize len); +int nmc_string_screen_width (const char *start, const char *end); +GArray *parse_output_fields (const char *fields_str, const NmcOutputField fields_array[], GError **error); +gboolean nmc_terse_option_check (NMCPrintOutput print_output, const char *fields, GError **error); +void print_fields (const NmcPrintFields fields, const NmcOutputField field_values[]); + +#endif /* NMC_UTILS_H */ diff --git a/configure.ac b/configure.ac index cc79b67c5a..fc331d459e 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ AC_PREREQ(2.52) -AC_INIT(NetworkManager, 0.7.997, dcbw@redhat.com, NetworkManager) +AC_INIT(NetworkManager, 0.8.0.997, dcbw@redhat.com, NetworkManager) AM_INIT_AUTOMAKE([1.9 subdir-objects tar-ustar no-dist-gzip dist-bzip2]) AM_MAINTAINER_MODE @@ -83,7 +83,7 @@ dnl Make sha1.c happy on big endian systems dnl AC_C_BIGENDIAN -AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat, suse, gentoo, debian, arch, slackware, paldo or mandriva])) +AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat, suse, gentoo, debian, arch, slackware, paldo, mandriva or pardus])) if test "z$with_distro" = "z"; then AC_CHECK_FILE(/etc/redhat-release,with_distro="redhat") AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse") @@ -94,6 +94,7 @@ if test "z$with_distro" = "z"; then AC_CHECK_FILE(/etc/slackware-version,with_distro="slackware") AC_CHECK_FILE(/etc/frugalware-release,with_distro="frugalware") AC_CHECK_FILE(/etc/mandriva-release,with_distro="mandriva") + AC_CHECK_FILE(/etc/pardus-release,with_distro="pardus") if test "z$with_distro" = "z"; then with_distro=`lsb_release -is` fi @@ -105,7 +106,7 @@ if test "z$with_distro" = "z"; then exit 1 else case $with_distro in - redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva) ;; + redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus) ;; *) echo "Your distribution (${with_distro}) is not yet supported! (patches welcome)" exit 1 @@ -158,6 +159,19 @@ if test x"$with_distro" = xmandriva; then AC_DEFINE(TARGET_MANDRIVA, 1, [Define if you have Mandriva]) fi +AM_CONDITIONAL(TARGET_PARDUS, test x"$with_distro" = xpardus) +if test x"$with_distro" = xpardus; then + AC_DEFINE(TARGET_PARDUS, 1, [Define if you have Pardus]) +fi + +dnl +dnl Distribution version string +dnl +AC_ARG_WITH(dist-version, AS_HELP_STRING([--with-dist-version=], [Define the NM's distribution version string]), ac_distver=$withval, ac_distver="") +if ! test x"$ac_distver" = x""; then + AC_DEFINE_UNQUOTED(NM_DIST_VERSION, "$ac_distver", [Define the distribution version string]) +fi + AC_MSG_CHECKING([Linux Wireless Extensions >= 18]) AC_TRY_COMPILE([#ifndef __user #define __user @@ -284,71 +298,77 @@ AC_ARG_WITH([pppd-plugin-dir], AS_HELP_STRING([--with-pppd-plugin-dir=DIR], [pat if test -n "$with_pppd_plugin_dir" ; then PPPD_PLUGIN_DIR="$with_pppd_plugin_dir" else - PPPD_PLUGIN_DIR="${libdir}/pppd/2.4.4" + PPPD_PLUGIN_DIR="${libdir}/pppd/2.4.5" fi AC_SUBST(PPPD_PLUGIN_DIR) -# DHCP client -AC_ARG_WITH([dhcp-client], AS_HELP_STRING([--with-dhcp-client=dhcpcd|dhclient], [path to the chosen dhcp client])) +# dhclient support +AC_ARG_WITH([dhclient], AS_HELP_STRING([--with-dhclient=yes|no|path], [Enable dhclient 4.x support])) # If a full path is given, use that and do not test if it works or not. -case "${with_dhcp_client}" in +case "${with_dhclient}" in /*) - DHCP_CLIENT_PATH="${with_dhcp_client}" - AC_MSG_NOTICE(using the DHCP client ${DHCP_CLIENT_PATH}) + DHCLIENT_PATH="${with_dhclient}" + AC_MSG_NOTICE(using dhclient at ${DHCLIENT_PATH}) + ;; + no) AC_MSG_NOTICE(dhclient support disabled) + ;; + *) + AC_MSG_CHECKING(for dhclient) + # NM only works with ISC dhclient - other derivatives don't have + # the same userland. NM also requires dhclient 4.x since older + # versions do not have IPv6 support. + for path in /sbin /usr/sbin /usr/pkg/sbin /usr/local/sbin; do + test -x "${path}/dhclient" || continue + case `"$path/dhclient" --version 2>&1` in + "isc-dhclient-4"*) DHCLIENT_PATH="$path/dhclient"; break;; + esac + done + if test -n "${DHCLIENT_PATH}"; then + AC_MSG_RESULT($DHCLIENT_PATH) + else + AC_MSG_RESULT(no) + fi ;; esac -if test -z "$DHCP_CLIENT_PATH" -a \( -z "$with_dhcp_client" -o x`basename "$with_dhcp_client"` = "xdhclient" \); then - # We only work with ISC dhclient - the FreeBSD and OpenBSD derivatives don't have the same userland. - AC_MSG_CHECKING(for dhclient) - for client in "$with_dhcp_client" /sbin/dhclient /usr/pkg/sbin/dhclient /usr/local/sbin/dhclient; do - test -x "$client" || continue - case `"$client" --version 2>&1` in - "isc-dhclient-"*) DHCP_CLIENT_PATH="$client"; break;; - esac - done - if test -z "$DHCP_CLIENT_PATH"; then - AC_MSG_RESULT(no) - if test -n "$with_dhcp_client"; then - AC_MSG_ERROR([Could not find ISC dhclient]) + +# dhcpcd support +AC_ARG_WITH([dhcpcd], AS_HELP_STRING([--with-dhcpcd=yes|no|path], [Enable dhcpcd 4.x support])) +# If a full path is given, use that and do not test if it works or not. +case "${with_dhcpcd}" in + /*) + DHCPCD_PATH="${with_dhcpcd}" + AC_MSG_NOTICE(using dhcpcd at ${DHCPCD_PATH}) + ;; + no) AC_MSG_NOTICE(dhcpcd support disabled) + ;; + *) + AC_MSG_CHECKING(for dhcpcd) + # We fully work with upstream dhcpcd-4 + for path in /sbin /usr/sbin /usr/pkg/sbin /usr/local/sbin; do + test -x "${path}/dhclient" || continue + case `"$path/dhcpcd" --version 2>/dev/null` in + "dhcpcd "[123]*);; + "dhcpcd "*) DHCP_CLIENT_PATH="$path/dhcpcd"; break;; + esac + done + if test -n "${DHCPCD_PATH}"; then + AC_MSG_RESULT($DHCPCD_PATH) + else + AC_MSG_RESULT(no) fi - else - AC_MSG_RESULT($DHCP_CLIENT_PATH) - fi -fi -if test -z "$DHCP_CLIENT_PATH" -a \( -z "$with_dhcp_client" -o x`basename "$with_dhcp_client"` = "xdhcpcd" \); then - test -n "$DHCP_CLIENT_PATH" && echo bar - # We fully work with upstream dhcpcd-4 - AC_MSG_CHECKING([for dhcpcd]) - for client in "$with_dhcp_client" /sbin/dhcpcd /usr/pkg/sbin/dhcpcd /usr/local/sbin/dhcpcd; do - test -x "$client" || continue - case `"$client" --version 2>/dev/null` in - "dhcpcd "[123]*);; - "dhcpcd "*) DHCP_CLIENT_PATH="$client"; break;; - esac - done - if test -z "$DHCP_CLIENT_PATH"; then - AC_MSG_RESULT(no) - if test -n "$with_dhcp_client"; then - AC_MSG_ERROR([Could not find dhcpcd-4 or newer]) - fi - else - AC_MSG_RESULT($DHCP_CLIENT_PATH) - fi -fi -if test -z "$DHCP_CLIENT_PATH"; then + ;; +esac + +if test -z "$DHCPCD_PATH" -a -z "$DHCLIENT_PATH"; then # DHCP clients are not a build time dependency, only runtime. # dhclient has been the longtime default for NM and it's in /sbin # in most distros, so use it. AC_MSG_WARN([Could not find a suitable DHCP client]) - DHCP_CLIENT_PATH=/sbin/dhclient + DHCLIENT_PATH=/sbin/dhclient AC_MSG_WARN([Falling back to ISC dhclient, ${DHCP_CLIENT_PATH}]) fi -AC_SUBST(DHCP_CLIENT_PATH) -DHCP_CLIENT=`basename "$DHCP_CLIENT_PATH"` -if test "$DHCP_CLIENT" != "dhclient" -a "$DHCP_CLIENT" != "dhcpcd"; then - AC_MSG_ERROR([No backend for the DHCP client ${DHCP_CLIENT}]) -fi -AC_SUBST(DHCP_CLIENT) +AC_SUBST(DHCLIENT_PATH) +AC_SUBST(DHCPCD_PATH) # resolvconf support AC_ARG_WITH([resolvconf], @@ -430,6 +450,7 @@ include/Makefile src/Makefile src/tests/Makefile marshallers/Makefile +src/logging/Makefile src/named-manager/Makefile src/vpn-manager/Makefile src/dhcp-manager/Makefile @@ -463,6 +484,8 @@ system-settings/plugins/keyfile/Makefile system-settings/plugins/keyfile/io/Makefile system-settings/plugins/keyfile/tests/Makefile system-settings/plugins/keyfile/tests/keyfiles/Makefile +cli/Makefile +cli/src/Makefile test/Makefile initscript/Makefile initscript/RedHat/Makefile @@ -484,23 +507,41 @@ initscript/Mandriva/networkmanager introspection/Makefile man/Makefile man/NetworkManager.8 +man/NetworkManager.conf.5 +man/nm-system-settings.conf.5 man/nm-tool.1 +man/nmcli.1 po/Makefile.in policy/Makefile docs/Makefile docs/libnm-glib/Makefile docs/libnm-util/Makefile NetworkManager.pc +examples/Makefile +examples/python/Makefile ]) AC_OUTPUT echo -echo Distribution targeting: ${with_distro} +echo Distribution target: ${with_distro} echo 'if this is not correct, please specifiy your distro with --with-distro=DISTRO' +echo + +if test -n "${DHCLIENT_PATH}"; then + echo ISC dhclient support: ${DHCLIENT_PATH} +else + echo ISC dhclient support: no +fi + +if test -n "${DHCPCD_PATH}"; then + echo dhcpcd support: ${DHCPCD_PATH} +else + echo dhcpcd support: no +fi + echo echo Building documentation: ${with_docs} -echo echo Building tests: ${with_tests} echo diff --git a/docs/generate-settings-spec.c b/docs/generate-settings-spec.c index dd78fc9211..6ec8f7c5e0 100644 --- a/docs/generate-settings-spec.c +++ b/docs/generate-settings-spec.c @@ -17,7 +17,7 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * - * (C) Copyright 2009 Red Hat, Inc. + * (C) Copyright 2009 - 2010 Red Hat, Inc. */ #include @@ -86,7 +86,7 @@ static TypeNameElement name_map[] = { { "GPtrArray_GArray_guint__", "array of array of uint32" }, { "GPtrArray_GArray_guchar__", "array of byte array" }, { "GHashTable_gchararray+gchararray_", "dict of (string::string)" }, - { "GPtrArray_GValueArray_GArray_guchar_+guint__", "array of (byte array, uint32)" }, + { "GPtrArray_GValueArray_GArray_guchar_+guint+GArray_guchar___", "array of (byte array, uint32, byte array)" }, { "GPtrArray_GValueArray_GArray_guchar_+guint+GArray_guchar_+guint__", "array of (byte array, uint32, byte array, uint32)" }, { NULL, NULL } }; @@ -128,6 +128,7 @@ write_one_setting (FILE *f, SettingNewFunc func) value_desc = g_param_spec_get_blurb (*iter); g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (*iter)); + g_param_value_set_default (*iter, &value); default_value = g_strdup_value_contents (&value); if (default_value && !strcmp (default_value, "NULL")) { g_free (default_value); diff --git a/docs/libnm-glib/Makefile.am b/docs/libnm-glib/Makefile.am index 297722a46e..96ff66eee3 100644 --- a/docs/libnm-glib/Makefile.am +++ b/docs/libnm-glib/Makefile.am @@ -34,23 +34,26 @@ IGNORE_HFILES= \ nm-device-private.h \ nm-object-cache.h \ nm-object-private.h \ + nm-remote-connection-private.h \ nm-types-private.h \ nm-access-point-bindings.h \ + nm-active-connection-bindings.h \ nm-client-bindings.h \ nm-device-bindings.h \ + nm-device-bt-bindings.h \ nm-device-ethernet-bindings.h \ nm-device-wifi-bindings.h \ - nm-exported-connection-glue.h \ + nm-dhcp4-config-bindings.h \ + nm-dhcp6-config-bindings.h \ nm-exported-connection-bindings.h \ - nm-settings-glue.h \ + nm-exported-connection-glue.h \ + nm-ip4-config-bindings.h \ + nm-ip6-config-bindings.h \ nm-settings-bindings.h \ + nm-settings-glue.h \ nm-settings-system-bindings.h \ nm-vpn-connection-bindings.h \ - nm-vpn-plugin-glue.h \ - nm-active-connection-bindings.h \ - nm-ip4-config-bindings.h \ - nm-dhcp4-config-bindings.h \ - nm-ip4-config-bindings.h + nm-vpn-plugin-glue.h # Images to copy into HTML directory. HTML_IMAGES = diff --git a/docs/libnm-glib/libnm-glib-docs.sgml b/docs/libnm-glib/libnm-glib-docs.sgml index 8fe5a1d43a..b4e5dac25a 100644 --- a/docs/libnm-glib/libnm-glib-docs.sgml +++ b/docs/libnm-glib/libnm-glib-docs.sgml @@ -5,35 +5,40 @@ libnm-glib Reference Manual - for libnm-glib [VERSION] + for libnm-glib 0.8 The latest version of this documentation can be found on-line at - http://[SERVER]/libnm-glib/. + http://projects.gnome.org/NetworkManager/developers/libnm-glib/08/. - [Insert title here] - - + libnm-glib Objects - - - - - - - - - + - - + + + + + + - - + + + + + + + + + + + + + diff --git a/docs/libnm-util/libnm-util-docs.sgml b/docs/libnm-util/libnm-util-docs.sgml index 3758b6eb59..78b931d8a2 100644 --- a/docs/libnm-util/libnm-util-docs.sgml +++ b/docs/libnm-util/libnm-util-docs.sgml @@ -8,9 +8,9 @@ libnm-util Reference Manual - for libnm-util [VERSION] + for libnm-util 0.8 The latest version of this documentation can be found on-line at - http://[SERVER]/libnm-util/. + http://projects.gnome.org/NetworkManager/developers/libnm-util/08/. diff --git a/examples/Makefile.am b/examples/Makefile.am new file mode 100644 index 0000000000..c2ddf781cc --- /dev/null +++ b/examples/Makefile.am @@ -0,0 +1 @@ +SUBDIRS=python diff --git a/examples/python/Makefile.am b/examples/python/Makefile.am new file mode 100644 index 0000000000..179e2f3c9a --- /dev/null +++ b/examples/python/Makefile.am @@ -0,0 +1,8 @@ +EXTRA_DIST = \ + nm-state.py \ + add-system-connection.py \ + vpn.py \ + list-connections.py \ + show-bssids.py + + diff --git a/examples/python/add-system-connection.py b/examples/python/add-system-connection.py new file mode 100755 index 0000000000..39eaabee0d --- /dev/null +++ b/examples/python/add-system-connection.py @@ -0,0 +1,48 @@ +#!/bin/env python +# +# 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., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Copyright (C) 2010 Red Hat, Inc. +# + +import dbus + +s_wired = dbus.Dictionary({'duplex': 'full'}) +s_con = dbus.Dictionary({ + 'type': '802-3-ethernet', + 'uuid': '7371bb78-c1f7-42a3-a9db-5b9566e8ca07', + 'id': 'MyConnection'}) + +addr1 = dbus.Array([dbus.UInt32(50462986L), dbus.UInt32(8L), dbus.UInt32(16908554L)], signature=dbus.Signature('u')) +s_ip4 = dbus.Dictionary({ + 'addresses': dbus.Array([addr1], signature=dbus.Signature('au')), + 'method': 'manual'}) + +s_ip6 = dbus.Dictionary({'method': 'ignore'}) + +con = dbus.Dictionary({ + '802-3-ethernet': s_wired, + 'connection': s_con, + 'ipv4': s_ip4, + 'ipv6': s_ip6}) + + +bus = dbus.SystemBus() + +proxy = bus.get_object("org.freedesktop.NetworkManagerSystemSettings", "/org/freedesktop/NetworkManagerSettings") +settings = dbus.Interface(proxy, "org.freedesktop.NetworkManagerSettings") + +settings.AddConnection(con) + diff --git a/examples/python/list-connections.py b/examples/python/list-connections.py new file mode 100644 index 0000000000..ad8d9047c4 --- /dev/null +++ b/examples/python/list-connections.py @@ -0,0 +1,112 @@ +#!/bin/env python +# +# 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., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Copyright (C) 2010 Red Hat, Inc. +# + +import dbus + +# This example asks both the system settings service and the user settings +# service for all configured connections. It also asks for secrets, demonstrating +# the mechanisms each settings service uses to prevent unauthorized access to +# a user's network passwords + +bus = dbus.SystemBus() + +def merge_secrets(proxy, config, setting_name): + try: + # returns a dict of dicts mapping name::setting, where setting is a dict + # mapping key::value. Each member of the 'setting' dict is a secret + secrets = proxy.GetSecrets(setting_name, [], False) + + # Copy the secrets into our connection config + for setting in secrets: + for key in secrets[setting]: + config[setting_name][key] = setting[key] + except Exception, e: + pass + +def dict_to_string(d, indent): + # Try to trivially translate a dictionary's elements into nice string + # formatting. + dstr = "" + for key in d: + val = d[key] + str_val = "" + add_string = True + if type(val) == type(dbus.Array([])): + for elt in val: + if type(elt) == type(dbus.Byte(1)): + str_val += "%s " % int(elt) + elif type(elt) == type(dbus.String("")): + str_val += "%s" % elt + elif type(val) == type(dbus.Dictionary({})): + dstr += dict_to_string(val, indent + " ") + add_string = False + else: + str_val = val + if add_string: + dstr += "%s%s: %s\n" % (indent, key, str_val) + return dstr + +def connection_to_string(config): + # dump a connection configuration to a the console + for setting_name in config: + print " Setting: %s" % setting_name + print dict_to_string(config[setting_name], " ") + print "" + + +def print_one_services_connections(service_name, desc): + # Ask the settings service for the list of connections it provides + proxy = bus.get_object(service_name, "/org/freedesktop/NetworkManagerSettings") + settings = dbus.Interface(proxy, "org.freedesktop.NetworkManagerSettings") + connection_paths = settings.ListConnections() + + print "%s connections --------------------------------------------\n" % desc + + # List each connection's name, UUID, and type + for path in connection_paths: + con_proxy = bus.get_object(service_name, path) + connection = dbus.Interface(con_proxy, "org.freedesktop.NetworkManagerSettings.Connection") + config = connection.GetSettings() + + # Now get secrets too; we grab the secrets for each type of connection + # (since there isn't a "get all secrets" call because most of the time + # you only need 'wifi' secrets or '802.1x' secrets, not everything) and + # merge that into the configuration data + connection_secrets = dbus.Interface(con_proxy, "org.freedesktop.NetworkManagerSettings.Connection.Secrets") + merge_secrets(connection_secrets, config, '802-11-wireless') + merge_secrets(connection_secrets, config, '802-11-wireless-security') + merge_secrets(connection_secrets, config, '802-1x') + merge_secrets(connection_secrets, config, 'gsm') + merge_secrets(connection_secrets, config, 'cdma') + merge_secrets(connection_secrets, config, 'ppp') + + # Get the details of the 'connection' setting + s_con = config['connection'] + print "name: %s" % s_con['id'] + print " uuid: %s" % s_con['uuid'] + print " type: %s" % s_con['type'] + print " ----------------------------" + connection_to_string(config) + + print "" + +# Print out connection information for all connections +print_one_services_connections("org.freedesktop.NetworkManagerSystemSettings", "System") +print_one_services_connections("org.freedesktop.NetworkManagerUserSettings", "User") + diff --git a/examples/python/nm-state.py b/examples/python/nm-state.py new file mode 100644 index 0000000000..fddd2da629 --- /dev/null +++ b/examples/python/nm-state.py @@ -0,0 +1,69 @@ +#!/bin/env python +# +# 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., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Copyright (C) 2010 Red Hat, Inc. +# + +import dbus + +bus = dbus.SystemBus() + +proxy = bus.get_object("org.freedesktop.NetworkManager", "/org/freedesktop/NetworkManager") +manager = dbus.Interface(proxy, "org.freedesktop.NetworkManager") + +# Get device-specific state +devices = manager.GetDevices() +for d in devices: + dev_proxy = bus.get_object("org.freedesktop.NetworkManager", d) + prop_iface = dbus.Interface(dev_proxy, "org.freedesktop.DBus.Properties") + + # Get the device's current state and interface name + state = prop_iface.Get("org.freedesktop.NetworkManager.Device", "State") + name = prop_iface.Get("org.freedesktop.NetworkManager.Device", "Interface") + + # and print them out + if state == 8: # activated + print "Device %s is activated" % name + else: + print "Device %s is not activated" % name + + +# Get active connection state +manager_prop_iface = dbus.Interface(proxy, "org.freedesktop.DBus.Properties") +active = manager_prop_iface.Get("org.freedesktop.NetworkManager", "ActiveConnections") +for a in active: + ac_proxy = bus.get_object("org.freedesktop.NetworkManager", a) + prop_iface = dbus.Interface(ac_proxy, "org.freedesktop.DBus.Properties") + state = prop_iface.Get("org.freedesktop.NetworkManager.ActiveConnection", "State") + + # Connections in NM are a collection of settings that describe everything + # needed to connect to a specific network. Lets get those details so we + # can find the user-readable name of the connection. + con_path = prop_iface.Get("org.freedesktop.NetworkManager.ActiveConnection", "Connection") + con_service = prop_iface.Get("org.freedesktop.NetworkManager.ActiveConnection", "ServiceName") + + # ask the provider of the connection for its details + service_proxy = bus.get_object(con_service, con_path) + con_iface = dbus.Interface(service_proxy, "org.freedesktop.NetworkManagerSettings.Connection") + con_details = con_iface.GetSettings() + con_name = con_details['connection']['id'] + + if state == 2: # activated + print "Connection '%s' is activated" % con_name + else: + print "Connection '%s' is activating" % con_name + + diff --git a/examples/python/show-bssids.py b/examples/python/show-bssids.py new file mode 100644 index 0000000000..5d8778c731 --- /dev/null +++ b/examples/python/show-bssids.py @@ -0,0 +1,78 @@ +#!/bin/env python +# +# 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., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Copyright (C) 2010 Red Hat, Inc. +# + + +# This example prints out all the AP BSSIDs that all WiFi devices on the +# machine can see. Useful for location-based services like Skyhook that +# can geolocate you based on the APs you can see. + +import dbus + +bus = dbus.SystemBus() + +# Get a proxy for the base NetworkManager object +proxy = bus.get_object("org.freedesktop.NetworkManager", "/org/freedesktop/NetworkManager") +manager = dbus.Interface(proxy, "org.freedesktop.NetworkManager") + +all_aps = [] + +print "Associated APs:" + +# Get all network devices +devices = manager.GetDevices() +for d in devices: + dev_proxy = bus.get_object("org.freedesktop.NetworkManager", d) + prop_iface = dbus.Interface(dev_proxy, "org.freedesktop.DBus.Properties") + + # Make sure the device is enabled before we try to use it + state = prop_iface.Get("org.freedesktop.NetworkManager.Device", "State") + if state <= 2: + continue + + # Get device's type; we only want wifi devices + iface = prop_iface.Get("org.freedesktop.NetworkManager.Device", "Interface") + dtype = prop_iface.Get("org.freedesktop.NetworkManager.Device", "DeviceType") + if dtype == 2: # WiFi + # Get a proxy for the wifi interface + wifi_iface = dbus.Interface(dev_proxy, "org.freedesktop.NetworkManager.Device.Wireless") + wifi_prop_iface = dbus.Interface(dev_proxy, "org.freedesktop.DBus.Properties") + + # Get the associated AP's object path + connected_path = wifi_prop_iface.Get("org.freedesktop.NetworkManager.Device.Wireless", "ActiveAccessPoint") + + # Get all APs the card can see + aps = wifi_iface.GetAccessPoints() + for path in aps: + ap_proxy = bus.get_object("org.freedesktop.NetworkManager", path) + ap_prop_iface = dbus.Interface(ap_proxy, "org.freedesktop.DBus.Properties") + bssid = ap_prop_iface.Get("org.freedesktop.NetworkManager.AccessPoint", "HwAddress") + + # Cache the BSSID + if not bssid in all_aps: + all_aps.append(bssid) + + # Print the current AP's BSSID + if path == connected_path: + print "%s (%s)" % (bssid, iface) + +# and print out all APs the wifi devices can see +print"\nFound APs:" +for bssid in all_aps: + print bssid + diff --git a/examples/python/vpn.py b/examples/python/vpn.py new file mode 100644 index 0000000000..4b4057fc2b --- /dev/null +++ b/examples/python/vpn.py @@ -0,0 +1,152 @@ +#!/usr/bin/python +# +# 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., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Copyright (C) 2009 Novell, Inc. +# Copyright (C) 2009 Red Hat, Inc. +# + +# Run this script without any arguments to list the available connection uuids. + +# The uuid of the connection to activate +CONNECTION_UUID="ac6dc9b2-85ef-4311-83d8-add5d7db3f59" + +# UID to use. Note that NM only allows the owner of the connection to activate it. +#UID=1000 +UID=0 + +import sys +import os +import dbus +from dbus.mainloop.glib import DBusGMainLoop +import gobject + +DBusGMainLoop(set_as_default=True) + +def get_connections(): + bus = dbus.SystemBus() + proxy = bus.get_object('org.freedesktop.NetworkManagerUserSettings', '/org/freedesktop/NetworkManagerSettings') + iface = dbus.Interface(proxy, dbus_interface='org.freedesktop.NetworkManagerSettings') + return iface.ListConnections() + + +def get_connection_by_uuid(uuid): + bus = dbus.SystemBus() + for c in get_connections(): + proxy = bus.get_object('org.freedesktop.NetworkManagerUserSettings', c) + iface = dbus.Interface(proxy, dbus_interface='org.freedesktop.NetworkManagerSettings.Connection') + settings = iface.GetSettings() + if settings['connection']['uuid'] == uuid: + return c + + return None + + +def list_uuids(): + bus = dbus.SystemBus() + for c in get_connections(): + proxy = bus.get_object('org.freedesktop.NetworkManagerUserSettings', c) + iface = dbus.Interface(proxy, dbus_interface='org.freedesktop.NetworkManagerSettings.Connection') + settings = iface.GetSettings() + conn = settings['connection'] + print "%s - %s (%s)" % (conn['uuid'], conn['id'], conn['type']) + + +def get_active_connection_path(uuid): + bus = dbus.SystemBus() + proxy = bus.get_object('org.freedesktop.NetworkManager', '/org/freedesktop/NetworkManager') + iface = dbus.Interface(proxy, dbus_interface='org.freedesktop.DBus.Properties') + active_connections = iface.Get('org.freedesktop.NetworkManager', 'ActiveConnections') + all_connections = get_connections() + + for a in active_connections: + proxy = bus.get_object('org.freedesktop.NetworkManager', a) + iface = dbus.Interface(proxy, dbus_interface='org.freedesktop.DBus.Properties') + path = iface.Get('org.freedesktop.NetworkManager.Connection.Active', 'Connection') + + proxy = bus.get_object('org.freedesktop.NetworkManagerUserSettings', path) + iface = dbus.Interface(proxy, dbus_interface='org.freedesktop.NetworkManagerSettings.Connection') + settings = iface.GetSettings() + + if settings['connection']['uuid'] == uuid: + return a + + return None + + +def get_wifi_device_path(): + bus = dbus.SystemBus() + proxy = bus.get_object('org.freedesktop.NetworkManager', '/org/freedesktop/NetworkManager') + iface = dbus.Interface(proxy, dbus_interface='org.freedesktop.NetworkManager') + devices = iface.GetDevices() + for d in devices: + proxy = bus.get_object('org.freedesktop.NetworkManager', d) + iface = dbus.Interface(proxy, dbus_interface='org.freedesktop.DBus.Properties') + devtype = iface.Get('org.freedesktop.NetworkManager.Device', 'DeviceType') + if devtype == 2: + return d + return None + +def activate_connection(connection_path, device_path): + + def reply_handler(opath): + print "Success: device activating" + sys.exit(0) + + def error_handler(*args): + print "Error activating device: %s" % args + sys.exit(1) + + bus = dbus.SystemBus() + proxy = bus.get_object('org.freedesktop.NetworkManager', '/org/freedesktop/NetworkManager') + iface = dbus.Interface(proxy, dbus_interface='org.freedesktop.NetworkManager') + iface.ActivateConnection('org.freedesktop.NetworkManagerUserSettings', + connection_path, + device_path, + "/", + reply_handler=reply_handler, + error_handler=error_handler) + + +# Change the UID first if required +if UID != 0: + os.setuid(UID) + +# Are we configured? +if not len(CONNECTION_UUID): + print "missing connection UUID" + sys.exit(0) + +connection_path = get_connection_by_uuid(CONNECTION_UUID) +if not connection_path: + # Configured VPN connection is not known to NM, check CONNECTION_UUID. + print "couldn't find the connection" + sys.exit(1) + +device_path = get_wifi_device_path() +if not device_path: + print "no wifi device found" + sys.exit(1) + +# Is it already activated? +if get_active_connection_path(CONNECTION_UUID): + print "already connected" + sys.exit(0) + +print "Activating connection..." +activate_connection(connection_path, device_path) +loop = gobject.MainLoop() +loop.run() + diff --git a/include/NetworkManager.h b/include/NetworkManager.h index f269971123..2a0c6969fa 100644 --- a/include/NetworkManager.h +++ b/include/NetworkManager.h @@ -45,6 +45,7 @@ #define NM_DBUS_INTERFACE_IP4_CONFIG NM_DBUS_INTERFACE ".IP4Config" #define NM_DBUS_INTERFACE_DHCP4_CONFIG NM_DBUS_INTERFACE ".DHCP4Config" #define NM_DBUS_INTERFACE_IP6_CONFIG NM_DBUS_INTERFACE ".IP6Config" +#define NM_DBUS_INTERFACE_DHCP6_CONFIG NM_DBUS_INTERFACE ".DHCP6Config" #define NM_DBUS_SERVICE_USER_SETTINGS "org.freedesktop.NetworkManagerUserSettings" @@ -244,130 +245,136 @@ typedef enum { NM_DEVICE_STATE_REASON_NONE = 0, /* Unknown error */ - NM_DEVICE_STATE_REASON_UNKNOWN, + NM_DEVICE_STATE_REASON_UNKNOWN = 1, /* Device is now managed */ - NM_DEVICE_STATE_REASON_NOW_MANAGED, + NM_DEVICE_STATE_REASON_NOW_MANAGED = 2, /* Device is now managed unmanaged */ - NM_DEVICE_STATE_REASON_NOW_UNMANAGED, + NM_DEVICE_STATE_REASON_NOW_UNMANAGED = 3, /* The device could not be readied for configuration */ - NM_DEVICE_STATE_REASON_CONFIG_FAILED, + NM_DEVICE_STATE_REASON_CONFIG_FAILED = 4, /* IP configuration could not be reserved (no available address, timeout, etc) */ - NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE, + NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE = 5, /* The IP config is no longer valid */ - NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED, + NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED = 6, /* Secrets were required, but not provided */ - NM_DEVICE_STATE_REASON_NO_SECRETS, + NM_DEVICE_STATE_REASON_NO_SECRETS = 7, /* 802.1x supplicant disconnected */ - NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT, + NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT = 8, /* 802.1x supplicant configuration failed */ - NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED, + NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED = 9, /* 802.1x supplicant failed */ - NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED, + NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED = 10, /* 802.1x supplicant took too long to authenticate */ - NM_DEVICE_STATE_REASON_SUPPLICANT_TIMEOUT, + NM_DEVICE_STATE_REASON_SUPPLICANT_TIMEOUT = 11, /* PPP service failed to start */ - NM_DEVICE_STATE_REASON_PPP_START_FAILED, + NM_DEVICE_STATE_REASON_PPP_START_FAILED = 12, /* PPP service disconnected */ - NM_DEVICE_STATE_REASON_PPP_DISCONNECT, + NM_DEVICE_STATE_REASON_PPP_DISCONNECT = 13, /* PPP failed */ - NM_DEVICE_STATE_REASON_PPP_FAILED, + NM_DEVICE_STATE_REASON_PPP_FAILED = 14, /* DHCP client failed to start */ - NM_DEVICE_STATE_REASON_DHCP_START_FAILED, + NM_DEVICE_STATE_REASON_DHCP_START_FAILED = 15, /* DHCP client error */ - NM_DEVICE_STATE_REASON_DHCP_ERROR, + NM_DEVICE_STATE_REASON_DHCP_ERROR = 16, /* DHCP client failed */ - NM_DEVICE_STATE_REASON_DHCP_FAILED, + NM_DEVICE_STATE_REASON_DHCP_FAILED = 17, /* Shared connection service failed to start */ - NM_DEVICE_STATE_REASON_SHARED_START_FAILED, + NM_DEVICE_STATE_REASON_SHARED_START_FAILED = 18, /* Shared connection service failed */ - NM_DEVICE_STATE_REASON_SHARED_FAILED, + NM_DEVICE_STATE_REASON_SHARED_FAILED = 19, /* AutoIP service failed to start */ - NM_DEVICE_STATE_REASON_AUTOIP_START_FAILED, + NM_DEVICE_STATE_REASON_AUTOIP_START_FAILED = 20, /* AutoIP service error */ - NM_DEVICE_STATE_REASON_AUTOIP_ERROR, + NM_DEVICE_STATE_REASON_AUTOIP_ERROR = 21, /* AutoIP service failed */ - NM_DEVICE_STATE_REASON_AUTOIP_FAILED, + NM_DEVICE_STATE_REASON_AUTOIP_FAILED = 22, /* The line is busy */ - NM_DEVICE_STATE_REASON_MODEM_BUSY, + NM_DEVICE_STATE_REASON_MODEM_BUSY = 23, /* No dial tone */ - NM_DEVICE_STATE_REASON_MODEM_NO_DIAL_TONE, + NM_DEVICE_STATE_REASON_MODEM_NO_DIAL_TONE = 24, /* No carrier could be established */ - NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER, + NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER = 25, /* The dialing request timed out */ - NM_DEVICE_STATE_REASON_MODEM_DIAL_TIMEOUT, + NM_DEVICE_STATE_REASON_MODEM_DIAL_TIMEOUT = 26, /* The dialing attempt failed */ - NM_DEVICE_STATE_REASON_MODEM_DIAL_FAILED, + NM_DEVICE_STATE_REASON_MODEM_DIAL_FAILED = 27, /* Modem initialization failed */ - NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED, + NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED = 28, /* Failed to select the specified APN */ - NM_DEVICE_STATE_REASON_GSM_APN_FAILED, + NM_DEVICE_STATE_REASON_GSM_APN_FAILED = 29, /* Not searching for networks */ - NM_DEVICE_STATE_REASON_GSM_REGISTRATION_NOT_SEARCHING, + NM_DEVICE_STATE_REASON_GSM_REGISTRATION_NOT_SEARCHING = 30, /* Network registration denied */ - NM_DEVICE_STATE_REASON_GSM_REGISTRATION_DENIED, + NM_DEVICE_STATE_REASON_GSM_REGISTRATION_DENIED = 31, /* Network registration timed out */ - NM_DEVICE_STATE_REASON_GSM_REGISTRATION_TIMEOUT, + NM_DEVICE_STATE_REASON_GSM_REGISTRATION_TIMEOUT = 32, /* Failed to register with the requested network */ - NM_DEVICE_STATE_REASON_GSM_REGISTRATION_FAILED, + NM_DEVICE_STATE_REASON_GSM_REGISTRATION_FAILED = 33, /* PIN check failed */ - NM_DEVICE_STATE_REASON_GSM_PIN_CHECK_FAILED, + NM_DEVICE_STATE_REASON_GSM_PIN_CHECK_FAILED = 34, /* Necessary firmware for the device may be missing */ - NM_DEVICE_STATE_REASON_FIRMWARE_MISSING, + NM_DEVICE_STATE_REASON_FIRMWARE_MISSING = 35, /* The device was removed */ - NM_DEVICE_STATE_REASON_REMOVED, + NM_DEVICE_STATE_REASON_REMOVED = 36, /* NetworkManager went to sleep */ - NM_DEVICE_STATE_REASON_SLEEPING, + NM_DEVICE_STATE_REASON_SLEEPING = 37, /* The device's active connection disappeared */ - NM_DEVICE_STATE_REASON_CONNECTION_REMOVED, + NM_DEVICE_STATE_REASON_CONNECTION_REMOVED = 38, /* Device disconnected by user or client */ - NM_DEVICE_STATE_REASON_USER_REQUESTED, + NM_DEVICE_STATE_REASON_USER_REQUESTED = 39, /* Carrier/link changed */ - NM_DEVICE_STATE_REASON_CARRIER, + NM_DEVICE_STATE_REASON_CARRIER = 40, /* The device's existing connection was assumed */ - NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED, + NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED = 41, /* The supplicant is now available */ - NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE, + NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE = 42, + + /* The modem could not be found */ + NM_DEVICE_STATE_REASON_MODEM_NOT_FOUND = 43, + + /* The Bluetooth connection failed or timed out */ + NM_DEVICE_STATE_REASON_BT_FAILED = 44, /* Unused */ NM_DEVICE_STATE_REASON_LAST = 0xFFFF diff --git a/include/nm-dbus-glib-types.h b/include/nm-dbus-glib-types.h index cfb08274c6..0f8c542e82 100644 --- a/include/nm-dbus-glib-types.h +++ b/include/nm-dbus-glib-types.h @@ -34,7 +34,7 @@ #define DBUS_TYPE_G_MAP_OF_STRING (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_STRING)) #define DBUS_TYPE_G_LIST_OF_STRING (dbus_g_type_get_collection ("GSList", G_TYPE_STRING)) -#define DBUS_TYPE_G_IP6_ADDRESS (dbus_g_type_get_struct ("GValueArray", DBUS_TYPE_G_UCHAR_ARRAY, G_TYPE_UINT, G_TYPE_INVALID)) +#define DBUS_TYPE_G_IP6_ADDRESS (dbus_g_type_get_struct ("GValueArray", DBUS_TYPE_G_UCHAR_ARRAY, G_TYPE_UINT, DBUS_TYPE_G_UCHAR_ARRAY, G_TYPE_INVALID)) #define DBUS_TYPE_G_ARRAY_OF_IP6_ADDRESS (dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_IP6_ADDRESS)) #define DBUS_TYPE_G_IP6_ROUTE (dbus_g_type_get_struct ("GValueArray", DBUS_TYPE_G_UCHAR_ARRAY, G_TYPE_UINT, DBUS_TYPE_G_UCHAR_ARRAY, G_TYPE_UINT, G_TYPE_INVALID)) #define DBUS_TYPE_G_ARRAY_OF_IP6_ROUTE (dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_IP6_ROUTE)) diff --git a/introspection/Makefile.am b/introspection/Makefile.am index 091384f22d..67abff899e 100644 --- a/introspection/Makefile.am +++ b/introspection/Makefile.am @@ -24,6 +24,7 @@ EXTRA_DIST = \ nm-ppp-manager.xml \ nm-active-connection.xml \ nm-dhcp4-config.xml \ + nm-dhcp6-config.xml \ nm-wimax-device.xml \ nm-wimax-nsp.xml diff --git a/introspection/all.xml b/introspection/all.xml index b84853c2c8..5e0abc4876 100644 --- a/introspection/all.xml +++ b/introspection/all.xml @@ -38,6 +38,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + diff --git a/introspection/nm-active-connection.xml b/introspection/nm-active-connection.xml index ff55f63885..765830a1dc 100644 --- a/introspection/nm-active-connection.xml +++ b/introspection/nm-active-connection.xml @@ -18,7 +18,10 @@ The state of this active connection. - Whether this active connection is the default connection, i.e. whether it currently owns the default route. + Whether this active connection is the default IPv4 connection, i.e. whether it currently owns the default IPv4 route. + + + Whether this active connection is the default IPv6 connection, i.e. whether it currently owns the default IPv6 route. Whether this active connection is also a VPN connection. diff --git a/introspection/nm-device-olpc-mesh.xml b/introspection/nm-device-olpc-mesh.xml index 7d326b6b95..c30ecfc602 100644 --- a/introspection/nm-device-olpc-mesh.xml +++ b/introspection/nm-device-olpc-mesh.xml @@ -7,12 +7,14 @@ The hardware address of the device. - + + The object path of the companion device. - + + The currently active channel. diff --git a/introspection/nm-device.xml b/introspection/nm-device.xml index c23b596c4b..0d0a9508ae 100644 --- a/introspection/nm-device.xml +++ b/introspection/nm-device.xml @@ -392,7 +392,17 @@ The 802.1x supplicant is now available. - + + + The modem could not be found. + + + + + The Bluetooth connection timed out or failed. + + + diff --git a/introspection/nm-dhcp6-config.xml b/introspection/nm-dhcp6-config.xml new file mode 100644 index 0000000000..93b0f1c8f0 --- /dev/null +++ b/introspection/nm-dhcp6-config.xml @@ -0,0 +1,20 @@ + + + + + + Options and configuration returned by the IPv6 DHCP server. + + + Configuration options returned by a DHCP server, if any. + + + + + + A dictionary mapping property names to variant boxed values + + + + + diff --git a/introspection/nm-exported-connection.xml b/introspection/nm-exported-connection.xml index 5cb157ebc6..46907c05e9 100644 --- a/introspection/nm-exported-connection.xml +++ b/introspection/nm-exported-connection.xml @@ -46,7 +46,7 @@ - Contains the changed settings. + Contains complete connection setting parameters, including changes. diff --git a/introspection/nm-ip6-config.xml b/introspection/nm-ip6-config.xml index d1349b0c21..604781857e 100644 --- a/introspection/nm-ip6-config.xml +++ b/introspection/nm-ip6-config.xml @@ -2,8 +2,8 @@ - - Tuples of IPv6 address/prefix. + + Tuples of IPv6 address/prefix/gateway. The nameservers in use. diff --git a/introspection/nm-manager.xml b/introspection/nm-manager.xml index 61d57e0717..9da51a24d9 100644 --- a/introspection/nm-manager.xml +++ b/introspection/nm-manager.xml @@ -96,6 +96,28 @@ + + + + Set logging verbosity and which operations are logged. + + + + One of [ERR, WARN, INFO, DEBUG]. + + + + + A combination of logging domains separated by commas (','), or "NONE" + to disable logging. Each domain enables logging for operations + related to that domain. Available domains are: [NONE, HW, RFKILL, + ETHER, WIFI, BT, MB, DHCP4, DHCP6, PPP, WIFI_SCAN, IP4, IP6, AUTOIP4, + DNS, VPN, SHARING, SUPPLICANT, USER_SET, SYS_SET, SUSPEND, CORE, + DEVICE, OLPC] + + + + Indicates if wireless is currently enabled or not. diff --git a/libnm-glib/Makefile.am b/libnm-glib/Makefile.am index d0d8f5c481..2506c8db7e 100644 --- a/libnm-glib/Makefile.am +++ b/libnm-glib/Makefile.am @@ -21,8 +21,33 @@ BUILT_SOURCES = \ nm-ip4-config-bindings.h \ nm-dhcp4-config-bindings.h \ nm-ip6-config-bindings.h \ + nm-dhcp6-config-bindings.h \ nm-wimax-device-bindings.h +##################################################### +# Deprecated original libnm_glib bits +##################################################### + +noinst_LTLIBRARIES = libdeprecated-nm-glib.la + +libdeprecated_nm_glib_la_SOURCES = \ + libnm_glib.h \ + libnm_glib.c + +libdeprecated_nm_glib_la_CPPFLAGS = \ + $(DBUS_CFLAGS) \ + $(GLIB_CFLAGS) \ + -Wno-deprecated-declarations \ + -Wno-deprecated + +libdeprecated_nm_glib_la_LIBADD = \ + $(DBUS_LIBS) \ + $(GLIB_LIBS) + +##################################################### +# Real libnm-glib stuff +##################################################### + lib_LTLIBRARIES = libnm-glib.la libnm-glib-vpn.la libnm_glib_la_CFLAGS = \ @@ -53,6 +78,7 @@ libnminclude_HEADERS = \ nm-active-connection.h \ nm-dhcp4-config.h \ nm-ip6-config.h \ + nm-dhcp6-config.h \ nm-remote-connection.h \ nm-settings-interface.h \ nm-settings-system-interface.h \ @@ -65,7 +91,6 @@ libnminclude_HEADERS = \ nm-wimax-nsp.h libnm_glib_la_SOURCES = \ - libnm_glib.c \ nm-object.c \ nm-object-private.h \ nm-client.c \ @@ -89,6 +114,7 @@ libnm_glib_la_SOURCES = \ nm-active-connection.c \ nm-dhcp4-config.c \ nm-ip6-config.c \ + nm-dhcp6-config.c \ nm-remote-connection.c \ nm-remote-connection-private.h \ nm-settings-interface.c \ @@ -104,13 +130,14 @@ libnm_glib_la_SOURCES = \ libnm_glib_la_LIBADD = \ $(top_builddir)/libnm-util/libnm-util.la \ $(top_builddir)/marshallers/libmarshallers.la \ + $(builddir)/libdeprecated-nm-glib.la \ $(GLIB_LIBS) \ $(DBUS_LIBS) \ $(GCONF_LIBS) \ $(GUDEV_LIBS) libnm_glib_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libnm-glib.ver \ - -version-info "4:0:2" + -version-info "4:2:2" noinst_PROGRAMS = libnm-glib-test @@ -177,6 +204,9 @@ nm-dhcp4-config-bindings.h: $(top_srcdir)/introspection/nm-dhcp4-config.xml nm-ip6-config-bindings.h: $(top_srcdir)/introspection/nm-ip6-config.xml dbus-binding-tool --prefix=nm_ip6_config --mode=glib-client --output=$@ $< +nm-dhcp6-config-bindings.h: $(top_srcdir)/introspection/nm-dhcp6-config.xml + dbus-binding-tool --prefix=nm_dhcp6_config --mode=glib-client --output=$@ $< + nm-wimax-device-bindings.h: $(top_srcdir)/introspection/nm-wimax-device.xml dbus-binding-tool --prefix=nm_wimax_device --mode=glib-client --output=$@ $< @@ -187,5 +217,4 @@ DISTCLEANFILES = libnm-glib.pc libnm-glib.pc EXTRA_DIST = libnm-glib.pc.in libnm-glib-vpn.pc.in libnm-glib.ver libnm-glib-vpn.ver -CLEANFILES = \ - $(BUILT_SOURCES) +CLEANFILES = $(BUILT_SOURCES) diff --git a/libnm-glib/libnm-glib-test.c b/libnm-glib/libnm-glib-test.c index ed296015cf..3ac0a24cd7 100644 --- a/libnm-glib/libnm-glib-test.c +++ b/libnm-glib/libnm-glib-test.c @@ -36,6 +36,7 @@ #include "nm-device-wifi.h" #include "nm-utils.h" #include "nm-active-connection.h" +#include "nm-vpn-connection.h" #include "nm-setting-ip4-config.h" static gboolean @@ -291,8 +292,10 @@ active_connections_changed (NMClient *client, GParamSpec *pspec, gpointer user_d connection = g_ptr_array_index (connections, i); g_print (" %s\n", nm_object_get_path (NM_OBJECT (connection))); devices = nm_active_connection_get_devices (connection); - for (j = 0; j < devices->len; j++) + for (j = 0; devices && j < devices->len; j++) g_print (" %s\n", nm_device_get_udi (g_ptr_array_index (devices, j))); + if (NM_IS_VPN_CONNECTION (connection)) + g_print (" VPN base connection: %s\n", nm_active_connection_get_specific_object (connection)); } } diff --git a/libnm-glib/libnm-glib-vpn.pc.in b/libnm-glib/libnm-glib-vpn.pc.in index 51aec6877a..73b7a9c71c 100644 --- a/libnm-glib/libnm-glib-vpn.pc.in +++ b/libnm-glib/libnm-glib-vpn.pc.in @@ -6,7 +6,7 @@ includedir=@includedir@ Name: libnm-glib-vpn Description: Convenience library for NetworkManager VPN plugins Version: @VERSION@ -Requires: NetworkManager >= 0.7.995 glib-2.0 dbus-glib-1 +Requires: NetworkManager >= 0.7.999 glib-2.0 dbus-glib-1 Cflags: -I${includedir}/libnm-glib Libs: -L${libdir} -lnm-glib-vpn diff --git a/libnm-glib/libnm-glib.pc.in b/libnm-glib/libnm-glib.pc.in index d1b85a5d1d..5c3471b16e 100644 --- a/libnm-glib/libnm-glib.pc.in +++ b/libnm-glib/libnm-glib.pc.in @@ -6,7 +6,7 @@ includedir=@includedir@ Name: libnm-glib Description: Convenience library for clients of NetworkManager Version: @VERSION@ -Requires: NetworkManager >= 0.7.995 glib-2.0 dbus-glib-1 +Requires: NetworkManager >= 0.7.999 glib-2.0 dbus-glib-1 Cflags: -I${includedir}/libnm-glib Libs: -L${libdir} -lnm-glib diff --git a/libnm-glib/libnm-glib.ver b/libnm-glib/libnm-glib.ver index f396e95dfa..3dbdde179d 100644 --- a/libnm-glib/libnm-glib.ver +++ b/libnm-glib/libnm-glib.ver @@ -18,6 +18,7 @@ global: nm_access_point_new; nm_active_connection_get_connection; nm_active_connection_get_default; + nm_active_connection_get_default6; nm_active_connection_get_devices; nm_active_connection_get_scope; nm_active_connection_get_service_name; @@ -132,6 +133,7 @@ global: nm_settings_connection_interface_get_type; nm_settings_connection_interface_update; nm_settings_interface_add_connection; + nm_settings_interface_error_get_type; nm_settings_interface_error_quark; nm_settings_interface_get_connection_by_path; nm_settings_interface_get_type; diff --git a/libnm-glib/libnm_glib.h b/libnm-glib/libnm_glib.h index fa3c812a57..01c055d01d 100644 --- a/libnm-glib/libnm_glib.h +++ b/libnm-glib/libnm_glib.h @@ -37,21 +37,21 @@ typedef enum libnm_glib_state LIBNM_NO_NETWORK_CONNECTION, LIBNM_ACTIVE_NETWORK_CONNECTION, LIBNM_INVALID_CONTEXT -} libnm_glib_state; +} libnm_glib_state G_GNUC_DEPRECATED; -typedef struct libnm_glib_ctx libnm_glib_ctx; +typedef struct libnm_glib_ctx libnm_glib_ctx G_GNUC_DEPRECATED; -typedef void (*libnm_glib_callback_func) (libnm_glib_ctx *libnm_ctx, gpointer user_data); +typedef void (*libnm_glib_callback_func) (libnm_glib_ctx *libnm_ctx, gpointer user_data) G_GNUC_DEPRECATED; -libnm_glib_ctx *libnm_glib_init (void); -void libnm_glib_shutdown (libnm_glib_ctx *ctx); +G_GNUC_DEPRECATED libnm_glib_ctx * libnm_glib_init (void); +G_GNUC_DEPRECATED void libnm_glib_shutdown (libnm_glib_ctx *ctx); -libnm_glib_state libnm_glib_get_network_state (const libnm_glib_ctx *ctx); +G_GNUC_DEPRECATED libnm_glib_state libnm_glib_get_network_state (const libnm_glib_ctx *ctx); -guint libnm_glib_register_callback (libnm_glib_ctx *ctx, libnm_glib_callback_func func, gpointer user_data, GMainContext *g_main_ctx); -void libnm_glib_unregister_callback (libnm_glib_ctx *ctx, guint id); +G_GNUC_DEPRECATED guint libnm_glib_register_callback (libnm_glib_ctx *ctx, libnm_glib_callback_func func, gpointer user_data, GMainContext *g_main_ctx); +G_GNUC_DEPRECATED void libnm_glib_unregister_callback (libnm_glib_ctx *ctx, guint id); G_END_DECLS diff --git a/libnm-glib/nm-active-connection.c b/libnm-glib/nm-active-connection.c index df8bb98271..2468da099f 100644 --- a/libnm-glib/nm-active-connection.c +++ b/libnm-glib/nm-active-connection.c @@ -17,7 +17,7 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * - * Copyright (C) 2007 - 2008 Red Hat, Inc. + * Copyright (C) 2007 - 2010 Red Hat, Inc. * Copyright (C) 2008 Novell, Inc. */ @@ -50,6 +50,7 @@ typedef struct { GPtrArray *devices; NMActiveConnectionState state; gboolean is_default; + gboolean is_default6; } NMActiveConnectionPrivate; enum { @@ -60,6 +61,7 @@ enum { PROP_DEVICES, PROP_STATE, PROP_DEFAULT, + PROP_DEFAULT6, LAST_PROP }; @@ -70,6 +72,7 @@ enum { #define DBUS_PROP_DEVICES "Devices" #define DBUS_PROP_STATE "State" #define DBUS_PROP_DEFAULT "Default" +#define DBUS_PROP_DEFAULT6 "Default6" /** * nm_active_connection_new: @@ -263,10 +266,10 @@ nm_active_connection_get_state (NMActiveConnection *connection) * nm_active_connection_get_default: * @connection: a #NMActiveConnection * - * Whether the active connection is the default one (that is, is used for the default route - * and DNS information). + * Whether the active connection is the default IPv4 one (that is, is used for + * the default IPv4 route and DNS information). * - * Returns: %TRUE if the active connection is the default one + * Returns: %TRUE if the active connection is the default IPv4 connection **/ gboolean nm_active_connection_get_default (NMActiveConnection *connection) @@ -278,13 +281,39 @@ nm_active_connection_get_default (NMActiveConnection *connection) priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (connection); if (!priv->is_default) { priv->is_default = _nm_object_get_boolean_property (NM_OBJECT (connection), - NM_DBUS_INTERFACE_ACTIVE_CONNECTION, - DBUS_PROP_DEFAULT); + NM_DBUS_INTERFACE_ACTIVE_CONNECTION, + DBUS_PROP_DEFAULT); } return priv->is_default; } +/** + * nm_active_connection_get_default6: + * @connection: a #NMActiveConnection + * + * Whether the active connection is the default IPv6 one (that is, is used for + * the default IPv6 route and DNS information). + * + * Returns: %TRUE if the active connection is the default IPv6 connection + **/ +gboolean +nm_active_connection_get_default6 (NMActiveConnection *connection) +{ + NMActiveConnectionPrivate *priv; + + g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), FALSE); + + priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (connection); + if (!priv->is_default6) { + priv->is_default6 = _nm_object_get_boolean_property (NM_OBJECT (connection), + NM_DBUS_INTERFACE_ACTIVE_CONNECTION, + DBUS_PROP_DEFAULT6); + } + + return priv->is_default6; +} + static void nm_active_connection_init (NMActiveConnection *ap) { @@ -350,6 +379,9 @@ get_property (GObject *object, case PROP_DEFAULT: g_value_set_boolean (value, nm_active_connection_get_default (self)); break; + case PROP_DEFAULT6: + g_value_set_boolean (value, nm_active_connection_get_default6 (self)); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -392,6 +424,7 @@ register_for_property_changed (NMActiveConnection *connection) { NM_ACTIVE_CONNECTION_DEVICES, demarshal_devices, &priv->devices }, { NM_ACTIVE_CONNECTION_STATE, _nm_object_demarshal_generic, &priv->state }, { NM_ACTIVE_CONNECTION_DEFAULT, _nm_object_demarshal_generic, &priv->is_default }, + { NM_ACTIVE_CONNECTION_DEFAULT6, _nm_object_demarshal_generic, &priv->is_default6 }, { NULL }, }; @@ -512,13 +545,26 @@ nm_active_connection_class_init (NMActiveConnectionClass *ap_class) /** * NMActiveConnection:default: * - * Whether the active connection is the default one. + * Whether the active connection is the default IPv4 one. **/ g_object_class_install_property (object_class, PROP_DEFAULT, g_param_spec_boolean (NM_ACTIVE_CONNECTION_DEFAULT, "Default", - "Is the default active connection", + "Is the default IPv4 active connection", + FALSE, + G_PARAM_READABLE)); + + /** + * NMActiveConnection:default6: + * + * Whether the active connection is the default IPv6 one. + **/ + g_object_class_install_property + (object_class, PROP_DEFAULT6, + g_param_spec_boolean (NM_ACTIVE_CONNECTION_DEFAULT6, + "Default6", + "Is the default IPv6 active connection", FALSE, G_PARAM_READABLE)); } diff --git a/libnm-glib/nm-active-connection.h b/libnm-glib/nm-active-connection.h index f717c055ef..30edf047a0 100644 --- a/libnm-glib/nm-active-connection.h +++ b/libnm-glib/nm-active-connection.h @@ -17,7 +17,7 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * - * Copyright (C) 2007 - 2008 Red Hat, Inc. + * Copyright (C) 2007 - 2010 Red Hat, Inc. * Copyright (C) 2008 Novell, Inc. */ @@ -45,6 +45,7 @@ G_BEGIN_DECLS #define NM_ACTIVE_CONNECTION_DEVICES "devices" #define NM_ACTIVE_CONNECTION_STATE "state" #define NM_ACTIVE_CONNECTION_DEFAULT "default" +#define NM_ACTIVE_CONNECTION_DEFAULT6 "default6" typedef struct { NMObject parent; @@ -73,6 +74,7 @@ const char * nm_active_connection_get_specific_object (NMActiveConnection *c const GPtrArray *nm_active_connection_get_devices (NMActiveConnection *connection); NMActiveConnectionState nm_active_connection_get_state (NMActiveConnection *connection); gboolean nm_active_connection_get_default (NMActiveConnection *connection); +gboolean nm_active_connection_get_default6 (NMActiveConnection *connection); G_END_DECLS diff --git a/libnm-glib/nm-device-bt.c b/libnm-glib/nm-device-bt.c index 5792add501..0451f2b0f6 100644 --- a/libnm-glib/nm-device-bt.c +++ b/libnm-glib/nm-device-bt.c @@ -95,8 +95,8 @@ nm_device_bt_get_hw_address (NMDeviceBt *device) priv = NM_DEVICE_BT_GET_PRIVATE (device); if (!priv->hw_address) { priv->hw_address = _nm_object_get_string_property (NM_OBJECT (device), - NM_DBUS_INTERFACE_DEVICE_WIRED, - DBUS_PROP_HW_ADDRESS); + NM_DBUS_INTERFACE_DEVICE_BLUETOOTH, + DBUS_PROP_HW_ADDRESS); } return priv->hw_address; diff --git a/libnm-glib/nm-device.c b/libnm-glib/nm-device.c index aa6afeb0f6..f8185fbed2 100644 --- a/libnm-glib/nm-device.c +++ b/libnm-glib/nm-device.c @@ -60,6 +60,8 @@ typedef struct { gboolean null_dhcp4_config; NMIP6Config *ip6_config; gboolean null_ip6_config; + NMDHCP6Config *dhcp6_config; + gboolean null_dhcp6_config; NMDeviceState state; GUdevClient *client; @@ -80,6 +82,7 @@ enum { PROP_STATE, PROP_PRODUCT, PROP_VENDOR, + PROP_DHCP6_CONFIG, LAST_PROP }; @@ -221,6 +224,46 @@ demarshal_ip6_config (NMObject *object, GParamSpec *pspec, GValue *value, gpoint return TRUE; } +static gboolean +demarshal_dhcp6_config (NMObject *object, GParamSpec *pspec, GValue *value, gpointer field) +{ + NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (object); + const char *path; + NMDHCP6Config *config = NULL; + DBusGConnection *connection; + + if (!G_VALUE_HOLDS (value, DBUS_TYPE_G_OBJECT_PATH)) + return FALSE; + + priv->null_dhcp6_config = FALSE; + + path = g_value_get_boxed (value); + if (path) { + if (!strcmp (path, "/")) + priv->null_dhcp6_config = TRUE; + else { + config = NM_DHCP6_CONFIG (_nm_object_cache_get (path)); + if (config) + config = g_object_ref (config); + else { + connection = nm_object_get_connection (object); + config = NM_DHCP6_CONFIG (nm_dhcp6_config_new (connection, path)); + } + } + } + + if (priv->dhcp6_config) { + g_object_unref (priv->dhcp6_config); + priv->dhcp6_config = NULL; + } + + if (config) + priv->dhcp6_config = config; + + _nm_object_queue_notify (object, NM_DEVICE_DHCP6_CONFIG); + return TRUE; +} + static void register_for_property_changed (NMDevice *device) { @@ -231,9 +274,10 @@ register_for_property_changed (NMDevice *device) { NM_DEVICE_DRIVER, _nm_object_demarshal_generic, &priv->driver }, { NM_DEVICE_CAPABILITIES, _nm_object_demarshal_generic, &priv->capabilities }, { NM_DEVICE_MANAGED, _nm_object_demarshal_generic, &priv->managed }, - { NM_DEVICE_IP4_CONFIG, demarshal_ip4_config, &priv->ip4_config }, - { NM_DEVICE_DHCP4_CONFIG, demarshal_dhcp4_config, &priv->dhcp4_config }, - { NM_DEVICE_IP6_CONFIG, demarshal_ip6_config, &priv->ip6_config }, + { NM_DEVICE_IP4_CONFIG, demarshal_ip4_config, &priv->ip4_config }, + { NM_DEVICE_DHCP4_CONFIG, demarshal_dhcp4_config, &priv->dhcp4_config }, + { NM_DEVICE_IP6_CONFIG, demarshal_ip6_config, &priv->ip6_config }, + { NM_DEVICE_DHCP6_CONFIG, demarshal_dhcp6_config, &priv->dhcp6_config }, { NULL }, }; @@ -319,6 +363,8 @@ dispose (GObject *object) g_object_unref (priv->dhcp4_config); if (priv->ip6_config) g_object_unref (priv->ip6_config); + if (priv->dhcp6_config) + g_object_unref (priv->dhcp6_config); if (priv->client) g_object_unref (priv->client); @@ -372,6 +418,9 @@ get_property (GObject *object, case PROP_IP6_CONFIG: g_value_set_object (value, nm_device_get_ip6_config (device)); break; + case PROP_DHCP6_CONFIG: + g_value_set_object (value, nm_device_get_dhcp6_config (device)); + break; case PROP_STATE: g_value_set_uint (value, nm_device_get_state (device)); break; @@ -506,6 +555,19 @@ nm_device_class_init (NMDeviceClass *device_class) NM_TYPE_IP6_CONFIG, G_PARAM_READABLE)); + /** + * NMDevice:dhcp6-config: + * + * The #NMDHCP6Config of the device. + **/ + g_object_class_install_property + (object_class, PROP_DHCP6_CONFIG, + g_param_spec_object (NM_DEVICE_DHCP6_CONFIG, + "DHCP6 Config", + "DHCP6 Config", + NM_TYPE_DHCP6_CONFIG, + G_PARAM_READABLE)); + /** * NMDevice:state: * @@ -874,6 +936,41 @@ nm_device_get_ip6_config (NMDevice *device) return priv->ip6_config; } +/** + * nm_device_get_dhcp6_config: + * @device: a #NMDevice + * + * Gets the current #NMDHCP6Config associated with the #NMDevice. + * + * Returns: the #NMDHCPConfig or %NULL if the device is not activated or not + * using DHCP. + **/ +NMDHCP6Config * +nm_device_get_dhcp6_config (NMDevice *device) +{ + NMDevicePrivate *priv; + char *path; + GValue value = { 0, }; + + g_return_val_if_fail (NM_IS_DEVICE (device), NULL); + + priv = NM_DEVICE_GET_PRIVATE (device); + if (priv->dhcp6_config) + return priv->dhcp6_config; + if (priv->null_dhcp6_config) + return NULL; + + path = _nm_object_get_object_path_property (NM_OBJECT (device), NM_DBUS_INTERFACE_DEVICE, "Dhcp6Config"); + if (path) { + g_value_init (&value, DBUS_TYPE_G_OBJECT_PATH); + g_value_take_boxed (&value, path); + demarshal_dhcp6_config (NM_OBJECT (device), NULL, &value, &priv->dhcp6_config); + g_value_unset (&value); + } + + return priv->dhcp6_config; +} + /** * nm_device_get_state: * @device: a #NMDevice diff --git a/libnm-glib/nm-device.h b/libnm-glib/nm-device.h index da015d6c46..64694ec833 100644 --- a/libnm-glib/nm-device.h +++ b/libnm-glib/nm-device.h @@ -32,6 +32,7 @@ #include "nm-ip4-config.h" #include "nm-dhcp4-config.h" #include "nm-ip6-config.h" +#include "nm-dhcp6-config.h" #include "nm-connection.h" G_BEGIN_DECLS @@ -51,6 +52,7 @@ G_BEGIN_DECLS #define NM_DEVICE_IP4_CONFIG "ip4-config" #define NM_DEVICE_DHCP4_CONFIG "dhcp4-config" #define NM_DEVICE_IP6_CONFIG "ip6-config" +#define NM_DEVICE_DHCP6_CONFIG "dhcp6-config" #define NM_DEVICE_STATE "state" #define NM_DEVICE_VENDOR "vendor" #define NM_DEVICE_PRODUCT "product" @@ -89,6 +91,7 @@ gboolean nm_device_get_managed (NMDevice *device); NMIP4Config * nm_device_get_ip4_config (NMDevice *device); NMDHCP4Config * nm_device_get_dhcp4_config (NMDevice *device); NMIP6Config * nm_device_get_ip6_config (NMDevice *device); +NMDHCP6Config * nm_device_get_dhcp6_config (NMDevice *device); NMDeviceState nm_device_get_state (NMDevice *device); const char * nm_device_get_product (NMDevice *device); const char * nm_device_get_vendor (NMDevice *device); diff --git a/libnm-glib/nm-dhcp6-config.c b/libnm-glib/nm-dhcp6-config.c new file mode 100644 index 0000000000..49eeda39ec --- /dev/null +++ b/libnm-glib/nm-dhcp6-config.c @@ -0,0 +1,248 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + * libnm_glib -- Access network status & information from glib applications + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + * Copyright (C) 2008 - 2010 Red Hat, Inc. + * Copyright (C) 2008 Novell, Inc. + */ + +#include + +#include "nm-dhcp6-config.h" +#include "NetworkManager.h" +#include "nm-types-private.h" +#include "nm-object-private.h" +#include "nm-utils.h" + +G_DEFINE_TYPE (NMDHCP6Config, nm_dhcp6_config, NM_TYPE_OBJECT) + +#define NM_DHCP6_CONFIG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DHCP6_CONFIG, NMDHCP6ConfigPrivate)) + +typedef struct { + DBusGProxy *proxy; + + GHashTable *options; +} NMDHCP6ConfigPrivate; + +enum { + PROP_0, + PROP_OPTIONS, + + LAST_PROP +}; + +static void +nm_dhcp6_config_init (NMDHCP6Config *config) +{ +} + +static void +copy_options (gpointer key, gpointer data, gpointer user_data) +{ + GHashTable *options = (GHashTable *) user_data; + GValue *value = (GValue *) data; + + g_hash_table_insert (options, g_strdup (key), g_value_dup_string (value)); +} + +static gboolean +demarshal_dhcp6_options (NMObject *object, GParamSpec *pspec, GValue *value, gpointer field) +{ + NMDHCP6ConfigPrivate *priv = NM_DHCP6_CONFIG_GET_PRIVATE (object); + GHashTable *new_options; + + g_hash_table_remove_all (priv->options); + + new_options = g_value_get_boxed (value); + if (new_options) + g_hash_table_foreach (new_options, copy_options, priv->options); + + _nm_object_queue_notify (object, NM_DHCP6_CONFIG_OPTIONS); + return TRUE; +} + +static void +register_for_property_changed (NMDHCP6Config *config) +{ + NMDHCP6ConfigPrivate *priv = NM_DHCP6_CONFIG_GET_PRIVATE (config); + const NMPropertiesChangedInfo property_changed_info[] = { + { NM_DHCP6_CONFIG_OPTIONS, demarshal_dhcp6_options, &priv->options }, + { NULL }, + }; + + _nm_object_handle_properties_changed (NM_OBJECT (config), + priv->proxy, + property_changed_info); +} + +static GObject* +constructor (GType type, + guint n_construct_params, + GObjectConstructParam *construct_params) +{ + NMObject *object; + DBusGConnection *connection; + NMDHCP6ConfigPrivate *priv; + + object = (NMObject *) G_OBJECT_CLASS (nm_dhcp6_config_parent_class)->constructor (type, + n_construct_params, + construct_params); + if (!object) + return NULL; + + priv = NM_DHCP6_CONFIG_GET_PRIVATE (object); + priv->options = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); + + connection = nm_object_get_connection (object); + + priv->proxy = dbus_g_proxy_new_for_name (connection, + NM_DBUS_SERVICE, + nm_object_get_path (object), + NM_DBUS_INTERFACE_DHCP6_CONFIG); + + register_for_property_changed (NM_DHCP6_CONFIG (object)); + + return G_OBJECT (object); +} + +static void +finalize (GObject *object) +{ + NMDHCP6ConfigPrivate *priv = NM_DHCP6_CONFIG_GET_PRIVATE (object); + + if (priv->options) + g_hash_table_destroy (priv->options); + + g_object_unref (priv->proxy); + + G_OBJECT_CLASS (nm_dhcp6_config_parent_class)->finalize (object); +} + +static void +get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + NMDHCP6Config *self = NM_DHCP6_CONFIG (object); + + switch (prop_id) { + case PROP_OPTIONS: + g_value_set_boxed (value, nm_dhcp6_config_get_options (self)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +nm_dhcp6_config_class_init (NMDHCP6ConfigClass *config_class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (config_class); + + g_type_class_add_private (config_class, sizeof (NMDHCP6ConfigPrivate)); + + /* virtual methods */ + object_class->constructor = constructor; + object_class->get_property = get_property; + object_class->finalize = finalize; + + /* properties */ + + /** + * NMDHCP6Config:options: + * + * The #GHashTable containing options of the configuration. + **/ + g_object_class_install_property + (object_class, PROP_OPTIONS, + g_param_spec_boxed (NM_DHCP6_CONFIG_OPTIONS, + "Options", + "Options", + G_TYPE_HASH_TABLE, + G_PARAM_READABLE)); +} + +/** + * nm_dhcp6_config_new: + * @connection: the #DBusGConnection + * @object_path: the DBus object path of the device + * + * Creates a new #NMDHCP6Config. + * + * Returns: a new configuration + **/ +GObject * +nm_dhcp6_config_new (DBusGConnection *connection, const char *object_path) +{ + return (GObject *) g_object_new (NM_TYPE_DHCP6_CONFIG, + NM_OBJECT_DBUS_CONNECTION, connection, + NM_OBJECT_DBUS_PATH, object_path, + NULL); +} + +/** + * nm_dhcp6_config_get_options: + * @config: a #NMDHCP6Config + * + * Gets all the options contained in the configuration. + * + * Returns: the #GHashTable containing strings for keys and values. + * This is the internal copy used by the configuration, and must not be modified. + **/ +GHashTable * +nm_dhcp6_config_get_options (NMDHCP6Config *config) +{ + NMDHCP6ConfigPrivate *priv = NM_DHCP6_CONFIG_GET_PRIVATE (config); + GValue value = { 0, }; + + if (g_hash_table_size (priv->options)) + return priv->options; + + if (!_nm_object_get_property (NM_OBJECT (config), + "org.freedesktop.DBus.Properties", + "Options", + &value)) + goto out; + + demarshal_dhcp6_options (NM_OBJECT (config), NULL, &value, &priv->options); + g_value_unset (&value); + +out: + return priv->options; +} + +/** + * nm_dhcp6_config_get_one_option: + * @config: a #NMDHCP6Config + * @option: the option to retrieve + * + * Gets one option by option name. + * + * Returns: the configuration option's value. This is the internal string used by the + * configuration, and must not be modified. + **/ +const char * +nm_dhcp6_config_get_one_option (NMDHCP6Config *config, const char *option) +{ + g_return_val_if_fail (NM_IS_DHCP6_CONFIG (config), NULL); + + return g_hash_table_lookup (nm_dhcp6_config_get_options (config), option); +} + diff --git a/libnm-glib/nm-dhcp6-config.h b/libnm-glib/nm-dhcp6-config.h new file mode 100644 index 0000000000..91f32fa036 --- /dev/null +++ b/libnm-glib/nm-dhcp6-config.h @@ -0,0 +1,68 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + * libnm_glib -- Access network status & information from glib applications + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + * Copyright (C) 2008 - 2010 Red Hat, Inc. + * Copyright (C) 2008 Novell, Inc. + */ + +#ifndef NM_DHCP6_CONFIG_H +#define NM_DHCP6_CONFIG_H + +#include +#include +#include +#include "nm-object.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DHCP6_CONFIG (nm_dhcp6_config_get_type ()) +#define NM_DHCP6_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DHCP6_CONFIG, NMDHCP6Config)) +#define NM_DHCP6_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DHCP6_CONFIG, NMDHCP6ConfigClass)) +#define NM_IS_DHCP6_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DHCP6_CONFIG)) +#define NM_IS_DHCP6_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_DHCP6_CONFIG)) + +typedef struct { + NMObject parent; +} NMDHCP6Config; + +typedef struct { + NMObjectClass parent; + + /* Padding for future expansion */ + void (*_reserved1) (void); + void (*_reserved2) (void); + void (*_reserved3) (void); + void (*_reserved4) (void); + void (*_reserved5) (void); + void (*_reserved6) (void); +} NMDHCP6ConfigClass; + +#define NM_DHCP6_CONFIG_OPTIONS "options" + +GType nm_dhcp6_config_get_type (void); + +GObject *nm_dhcp6_config_new (DBusGConnection *connection, const char *object_path); + +GHashTable * nm_dhcp6_config_get_options (NMDHCP6Config *config); + +const char * nm_dhcp6_config_get_one_option (NMDHCP6Config *config, const char *option); + +G_END_DECLS + +#endif /* NM_DHCP6_CONFIG_H */ diff --git a/libnm-glib/nm-exported-connection.c b/libnm-glib/nm-exported-connection.c index 47fd8644d8..3a8e51ce79 100644 --- a/libnm-glib/nm-exported-connection.c +++ b/libnm-glib/nm-exported-connection.c @@ -1,19 +1,20 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* NetworkManager system settings service * - * 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 library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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, + * This library 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. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. * * (C) Copyright 2008 Novell, Inc. * (C) Copyright 2008 - 2009 Red Hat, Inc. @@ -227,7 +228,9 @@ impl_exported_connection_get_secrets (NMExportedConnection *self, if (NM_EXPORTED_CONNECTION_GET_CLASS (self)->get_secrets) NM_EXPORTED_CONNECTION_GET_CLASS (self)->get_secrets (self, setting_name, hints, request_new, context); else { - error = g_error_new (0, 0, "%s: %s:%d get_secrets() unimplemented", __func__, __FILE__, __LINE__); + error = g_error_new (NM_SETTINGS_INTERFACE_ERROR, + NM_SETTINGS_INTERFACE_ERROR_INTERNAL_ERROR, + "%s: %s:%d get_secrets() unimplemented", __func__, __FILE__, __LINE__); dbus_g_method_return_error (context, error); g_error_free (error); } diff --git a/libnm-glib/nm-exported-connection.h b/libnm-glib/nm-exported-connection.h index dfca0d529d..53dc3b024e 100644 --- a/libnm-glib/nm-exported-connection.h +++ b/libnm-glib/nm-exported-connection.h @@ -1,19 +1,20 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* NetworkManager system settings service * - * 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 library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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, + * This library 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. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. * * (C) Copyright 2009 Red Hat, Inc. */ diff --git a/libnm-glib/nm-remote-connection.c b/libnm-glib/nm-remote-connection.c index 64956471be..5d104d0680 100644 --- a/libnm-glib/nm-remote-connection.c +++ b/libnm-glib/nm-remote-connection.c @@ -18,7 +18,7 @@ * Boston, MA 02110-1301 USA. * * Copyright (C) 2007 - 2008 Novell, Inc. - * Copyright (C) 2007 - 2009 Red Hat, Inc. + * Copyright (C) 2007 - 2010 Red Hat, Inc. */ #include @@ -324,12 +324,14 @@ constructor (GType type, nm_connection_get_path (NM_CONNECTION (object)), NM_DBUS_IFACE_SETTINGS_CONNECTION); g_assert (priv->proxy); + dbus_g_proxy_set_default_timeout (priv->proxy, G_MAXINT); priv->secrets_proxy = dbus_g_proxy_new_for_name (priv->bus, service, nm_connection_get_path (NM_CONNECTION (object)), NM_DBUS_IFACE_SETTINGS_CONNECTION_SECRETS); g_assert (priv->secrets_proxy); + dbus_g_proxy_set_default_timeout (priv->secrets_proxy, G_MAXINT); dbus_g_proxy_add_signal (priv->proxy, "Updated", DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT, G_TYPE_INVALID); dbus_g_proxy_connect_signal (priv->proxy, "Updated", G_CALLBACK (updated_cb), object, NULL); diff --git a/libnm-glib/nm-remote-settings-system.c b/libnm-glib/nm-remote-settings-system.c index 4e30fda800..95098c7e60 100644 --- a/libnm-glib/nm-remote-settings-system.c +++ b/libnm-glib/nm-remote-settings-system.c @@ -18,7 +18,7 @@ * Boston, MA 02110-1301 USA. * * Copyright (C) 2008 Novell, Inc. - * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009 - 2010 Red Hat, Inc. */ #include @@ -280,6 +280,7 @@ constructor (GType type, NM_DBUS_PATH_SETTINGS, NM_DBUS_IFACE_SETTINGS_SYSTEM); g_assert (priv->proxy); + dbus_g_proxy_set_default_timeout (priv->proxy, G_MAXINT); dbus_g_object_register_marshaller (g_cclosure_marshal_VOID__BOXED, G_TYPE_NONE, diff --git a/libnm-glib/nm-remote-settings.c b/libnm-glib/nm-remote-settings.c index 55ae0f3a14..92814a15ce 100644 --- a/libnm-glib/nm-remote-settings.c +++ b/libnm-glib/nm-remote-settings.c @@ -18,7 +18,7 @@ * Boston, MA 02110-1301 USA. * * Copyright (C) 2008 Novell, Inc. - * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009 - 2010 Red Hat, Inc. */ #include @@ -414,6 +414,7 @@ constructor (GType type, NM_DBUS_PATH_SETTINGS, NM_DBUS_IFACE_SETTINGS); g_assert (priv->proxy); + dbus_g_proxy_set_default_timeout (priv->proxy, G_MAXINT); dbus_g_proxy_add_signal (priv->proxy, "NewConnection", DBUS_TYPE_G_OBJECT_PATH, diff --git a/libnm-glib/nm-settings-connection-interface.c b/libnm-glib/nm-settings-connection-interface.c index 5dcd4494b4..868ad047a7 100644 --- a/libnm-glib/nm-settings-connection-interface.c +++ b/libnm-glib/nm-settings-connection-interface.c @@ -1,19 +1,20 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* NetworkManager -- Network link manager * - * 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 library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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, + * This library 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. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. * * Copyright (C) 2007 - 2008 Novell, Inc. * Copyright (C) 2007 - 2009 Red Hat, Inc. diff --git a/libnm-glib/nm-settings-interface.c b/libnm-glib/nm-settings-interface.c index f320953058..a1d548ed15 100644 --- a/libnm-glib/nm-settings-interface.c +++ b/libnm-glib/nm-settings-interface.c @@ -1,19 +1,20 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* NetworkManager -- Network link manager * - * 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 library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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, + * This library 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. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. * * Copyright (C) 2007 - 2008 Novell, Inc. * Copyright (C) 2007 - 2008 Red Hat, Inc. diff --git a/libnm-glib/nm-settings-interface.h b/libnm-glib/nm-settings-interface.h index 3a1768904c..dc7bd0eb82 100644 --- a/libnm-glib/nm-settings-interface.h +++ b/libnm-glib/nm-settings-interface.h @@ -1,19 +1,20 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* NetworkManager -- Network link manager * - * 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 library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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, + * This library 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. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. * * Copyright (C) 2007 - 2008 Novell, Inc. * Copyright (C) 2007 - 2009 Red Hat, Inc. @@ -27,6 +28,8 @@ #include "NetworkManager.h" #include "nm-settings-connection-interface.h" +G_BEGIN_DECLS + typedef enum { NM_SETTINGS_INTERFACE_ERROR_INVALID_CONNECTION = 0, NM_SETTINGS_INTERFACE_ERROR_READ_ONLY_CONNECTION, @@ -100,5 +103,6 @@ gboolean nm_settings_interface_add_connection (NMSettingsInterface *settings, NMSettingsAddConnectionFunc callback, gpointer user_data); +G_END_DECLS #endif /* NM_SETTINGS_INTERFACE_H */ diff --git a/libnm-glib/nm-settings-service.c b/libnm-glib/nm-settings-service.c index de93d9932f..6266d10dac 100644 --- a/libnm-glib/nm-settings-service.c +++ b/libnm-glib/nm-settings-service.c @@ -1,19 +1,20 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* NetworkManager system settings service * - * 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 library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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, + * This library 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. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. * * (C) Copyright 2008 Novell, Inc. * (C) Copyright 2008 - 2009 Red Hat, Inc. diff --git a/libnm-glib/nm-settings-service.h b/libnm-glib/nm-settings-service.h index 7a06edcf29..9f4b95fcc5 100644 --- a/libnm-glib/nm-settings-service.h +++ b/libnm-glib/nm-settings-service.h @@ -1,19 +1,20 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* NetworkManager system settings service * - * 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 library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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, + * This library 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. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. * * (C) Copyright 2009 Red Hat, Inc. */ diff --git a/libnm-glib/nm-settings-system-interface.c b/libnm-glib/nm-settings-system-interface.c index a2fcbf6a24..0f59377a53 100644 --- a/libnm-glib/nm-settings-system-interface.c +++ b/libnm-glib/nm-settings-system-interface.c @@ -1,19 +1,20 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* NetworkManager -- Network link manager * - * 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 library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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, + * This library 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. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. * * Copyright (C) 2007 - 2008 Novell, Inc. * Copyright (C) 2007 - 2008 Red Hat, Inc. diff --git a/libnm-glib/nm-settings-system-interface.h b/libnm-glib/nm-settings-system-interface.h index 64bf91bb9e..d016556123 100644 --- a/libnm-glib/nm-settings-system-interface.h +++ b/libnm-glib/nm-settings-system-interface.h @@ -1,19 +1,20 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* NetworkManager -- Network link manager * - * 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 library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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, + * This library 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. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. * * Copyright (C) 2007 - 2008 Novell, Inc. * Copyright (C) 2007 - 2009 Red Hat, Inc. @@ -26,6 +27,8 @@ #include "NetworkManager.h" +G_BEGIN_DECLS + typedef enum { NM_SETTINGS_SYSTEM_PERMISSION_NONE = 0x0, NM_SETTINGS_SYSTEM_PERMISSION_CONNECTION_MODIFY = 0x1, @@ -100,4 +103,6 @@ gboolean nm_settings_system_interface_get_permissions (NMSettingsSystemInterface NMSettingsSystemGetPermissionsFunc callback, gpointer user_data); +G_END_DECLS + #endif /* NM_SETTINGS_SYSTEM_INTERFACE_H */ diff --git a/libnm-glib/nm-types.h b/libnm-glib/nm-types.h index eb3461f7d7..cb1bf872ea 100644 --- a/libnm-glib/nm-types.h +++ b/libnm-glib/nm-types.h @@ -26,6 +26,8 @@ #include #include +G_BEGIN_DECLS + #define NM_TYPE_SSID (nm_ssid_get_type ()) GType nm_ssid_get_type (void) G_GNUC_CONST; @@ -47,4 +49,6 @@ GType nm_ip6_address_array_get_type (void) G_GNUC_CONST; #define NM_TYPE_IP6_ROUTE_OBJECT_ARRAY (nm_ip6_route_object_array_get_type ()) GType nm_ip6_route_object_array_get_type (void) G_GNUC_CONST; +G_END_DECLS + #endif /* NM_TYPES_H */ diff --git a/libnm-glib/nm-vpn-connection.c b/libnm-glib/nm-vpn-connection.c index f66ed1960a..6910b6f63c 100644 --- a/libnm-glib/nm-vpn-connection.c +++ b/libnm-glib/nm-vpn-connection.c @@ -18,7 +18,7 @@ * Boston, MA 02110-1301 USA. * * Copyright (C) 2007 - 2008 Novell, Inc. - * Copyright (C) 2007 - 2008 Red Hat, Inc. + * Copyright (C) 2007 - 2010 Red Hat, Inc. */ #include @@ -40,6 +40,17 @@ typedef struct { NMVPNConnectionState vpn_state; } NMVPNConnectionPrivate; +enum { + PROP_0, + PROP_VPN_STATE, + PROP_BANNER, + + LAST_PROP +}; + +#define DBUS_PROP_VPN_STATE "VpnState" +#define DBUS_PROP_BANNER "Banner" + enum { VPN_STATE_CHANGED, @@ -74,8 +85,8 @@ nm_vpn_connection_get_banner (NMVPNConnection *vpn) if (!priv->banner) { priv->banner = _nm_object_get_string_property (NM_OBJECT (vpn), - NM_DBUS_INTERFACE_VPN_CONNECTION, - "Banner"); + NM_DBUS_INTERFACE_VPN_CONNECTION, + DBUS_PROP_BANNER); if (priv->banner && !strlen (priv->banner)) { g_free (priv->banner); priv->banner = NULL; @@ -94,8 +105,8 @@ nm_vpn_connection_get_vpn_state (NMVPNConnection *vpn) priv = NM_VPN_CONNECTION_GET_PRIVATE (vpn); if (priv->vpn_state == NM_VPN_CONNECTION_STATE_UNKNOWN) { priv->vpn_state = _nm_object_get_uint_property (NM_OBJECT (vpn), - NM_DBUS_INTERFACE_VPN_CONNECTION, - "VpnState"); + NM_DBUS_INTERFACE_VPN_CONNECTION, + DBUS_PROP_VPN_STATE); } return priv->vpn_state; } @@ -172,6 +183,27 @@ finalize (GObject *object) G_OBJECT_CLASS (nm_vpn_connection_parent_class)->finalize (object); } +static void +get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + NMVPNConnection *self = NM_VPN_CONNECTION (object); + + switch (prop_id) { + case PROP_VPN_STATE: + g_value_set_uint (value, nm_vpn_connection_get_vpn_state (self)); + break; + case PROP_BANNER: + g_value_set_string (value, nm_vpn_connection_get_banner (self)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + static void nm_vpn_connection_class_init (NMVPNConnectionClass *connection_class) { @@ -181,8 +213,37 @@ nm_vpn_connection_class_init (NMVPNConnectionClass *connection_class) /* virtual methods */ object_class->constructor = constructor; + object_class->get_property = get_property; object_class->finalize = finalize; + /* properties */ + + /** + * NMVPNConnection:vpn-state: + * + * The VPN state of the active VPN connection. + **/ + g_object_class_install_property (object_class, PROP_VPN_STATE, + g_param_spec_uint (NM_VPN_CONNECTION_VPN_STATE, + "VpnState", + "Current VPN state", + NM_VPN_CONNECTION_STATE_UNKNOWN, + NM_VPN_CONNECTION_STATE_DISCONNECTED, + NM_VPN_CONNECTION_STATE_UNKNOWN, + G_PARAM_READABLE)); + + /** + * NMVPNConnection:banner: + * + * The VPN login banner of the active VPN connection. + **/ + g_object_class_install_property (object_class, PROP_BANNER, + g_param_spec_string (NM_VPN_CONNECTION_BANNER, + "Banner", + "Login Banner", + NULL, + G_PARAM_READABLE)); + /* signals */ signals[VPN_STATE_CHANGED] = g_signal_new ("vpn-state-changed", diff --git a/libnm-glib/nm-vpn-connection.h b/libnm-glib/nm-vpn-connection.h index 122a85b5cc..e03a80c77a 100644 --- a/libnm-glib/nm-vpn-connection.h +++ b/libnm-glib/nm-vpn-connection.h @@ -18,7 +18,7 @@ * Boston, MA 02110-1301 USA. * * Copyright (C) 2007 - 2008 Novell, Inc. - * Copyright (C) 2007 - 2008 Red Hat, Inc. + * Copyright (C) 2007 - 2010 Red Hat, Inc. */ #ifndef NM_VPN_CONNECTION_H @@ -39,6 +39,9 @@ G_BEGIN_DECLS #define NM_IS_VPN_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_VPN_CONNECTION)) #define NM_VPN_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_VPN_CONNECTION, NMVPNConnectionClass)) +#define NM_VPN_CONNECTION_VPN_STATE "vpn-state" +#define NM_VPN_CONNECTION_BANNER "banner" + typedef struct { NMActiveConnection parent; } NMVPNConnection; diff --git a/libnm-glib/nm-vpn-plugin-ui-interface.c b/libnm-glib/nm-vpn-plugin-ui-interface.c index ca3b738a9b..f4b844c8d9 100644 --- a/libnm-glib/nm-vpn-plugin-ui-interface.c +++ b/libnm-glib/nm-vpn-plugin-ui-interface.c @@ -17,7 +17,7 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * - * Copyright (C) 2008 Red Hat, Inc. + * Copyright (C) 2008 - 2010 Red Hat, Inc. * Copyright (C) 2008 Novell, Inc. */ @@ -113,8 +113,8 @@ nm_vpn_plugin_ui_interface_import (NMVpnPluginUiInterface *iface, g_return_val_if_fail (NM_IS_VPN_PLUGIN_UI_INTERFACE (iface), NULL); if (nm_vpn_plugin_ui_interface_get_capabilities (iface) & NM_VPN_PLUGIN_UI_CAPABILITY_IMPORT) { - g_return_val_if_fail (NM_VPN_PLUGIN_UI_INTERFACE_GET_INTERFACE (iface)->import != NULL, NULL); - return NM_VPN_PLUGIN_UI_INTERFACE_GET_INTERFACE (iface)->import (iface, path, error); + g_return_val_if_fail (NM_VPN_PLUGIN_UI_INTERFACE_GET_INTERFACE (iface)->import_from_file != NULL, NULL); + return NM_VPN_PLUGIN_UI_INTERFACE_GET_INTERFACE (iface)->import_from_file (iface, path, error); } return NULL; } @@ -128,8 +128,8 @@ nm_vpn_plugin_ui_interface_export (NMVpnPluginUiInterface *iface, g_return_val_if_fail (NM_IS_VPN_PLUGIN_UI_INTERFACE (iface), FALSE); if (nm_vpn_plugin_ui_interface_get_capabilities (iface) & NM_VPN_PLUGIN_UI_CAPABILITY_EXPORT) { - g_return_val_if_fail (NM_VPN_PLUGIN_UI_INTERFACE_GET_INTERFACE (iface)->export != NULL, FALSE); - return NM_VPN_PLUGIN_UI_INTERFACE_GET_INTERFACE (iface)->export (iface, path, connection, error); + g_return_val_if_fail (NM_VPN_PLUGIN_UI_INTERFACE_GET_INTERFACE (iface)->export_to_file != NULL, FALSE); + return NM_VPN_PLUGIN_UI_INTERFACE_GET_INTERFACE (iface)->export_to_file (iface, path, connection, error); } return FALSE; } diff --git a/libnm-glib/nm-vpn-plugin-ui-interface.h b/libnm-glib/nm-vpn-plugin-ui-interface.h index 44348c12ef..2ab13f0017 100644 --- a/libnm-glib/nm-vpn-plugin-ui-interface.h +++ b/libnm-glib/nm-vpn-plugin-ui-interface.h @@ -17,7 +17,7 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * - * Copyright (C) 2008 Red Hat, Inc. + * Copyright (C) 2008 - 2010 Red Hat, Inc. * Copyright (C) 2008 Novell, Inc. */ @@ -91,14 +91,19 @@ struct _NMVpnPluginUiInterface { * additional information. Note that 'error' can be NULL, in which case no * additional error information should be provided. */ - NMConnection * (*import) (NMVpnPluginUiInterface *iface, const char *path, GError **error); + NMConnection * (*import_from_file) (NMVpnPluginUiInterface *iface, + const char *path, + GError **error); /* Export the given connection to the specified path. Return TRUE on success. * On error, return FALSE and set 'error' with additional error information. * Note that 'error' can be NULL, in which case no additional error information * should be provided. */ - gboolean (*export) (NMVpnPluginUiInterface *iface, const char *path, NMConnection *connection, GError **error); + gboolean (*export_to_file) (NMVpnPluginUiInterface *iface, + const char *path, + NMConnection *connection, + GError **error); /* For a given connection, return a suggested file name. Returned value should * be NULL or a suggested file name allocated via g_malloc/g_new/etc to be freed diff --git a/libnm-util/Makefile.am b/libnm-util/Makefile.am index 70c09402a0..97f68e6b7d 100644 --- a/libnm-util/Makefile.am +++ b/libnm-util/Makefile.am @@ -61,7 +61,7 @@ libnm_util_la_SOURCES= \ libnm_util_la_LIBADD = $(GLIB_LIBS) $(DBUS_LIBS) $(UUID_LIBS) libnm_util_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libnm-util.ver \ - -version-info "2:0:1" + -version-info "4:4:3" if WITH_GNUTLS libnm_util_la_SOURCES += crypto_gnutls.c diff --git a/libnm-util/crypto_nss.c b/libnm-util/crypto_nss.c index 97dba1ffc2..490d5fe909 100644 --- a/libnm-util/crypto_nss.c +++ b/libnm-util/crypto_nss.c @@ -51,11 +51,11 @@ crypto_init (GError **error) PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 1); ret = NSS_NoDB_Init (NULL); if (ret != SECSuccess) { - PR_Cleanup (); g_set_error (error, NM_CRYPTO_ERROR, NM_CRYPTO_ERR_INIT_FAILED, _("Failed to initialize the crypto engine: %d."), PR_GetError ()); + PR_Cleanup (); return FALSE; } diff --git a/libnm-util/libnm-util.pc.in b/libnm-util/libnm-util.pc.in index 7a915ed01c..a6e8ee5959 100644 --- a/libnm-util/libnm-util.pc.in +++ b/libnm-util/libnm-util.pc.in @@ -3,10 +3,10 @@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ -Name: libnm_util +Name: libnm-util Description: Convenience library for clients of NetworkManager Version: @VERSION@ -Requires: glib-2.0 +Requires: glib-2.0 dbus-glib-1 Cflags: -I${includedir}/NetworkManager Libs: -L${libdir} -lnm-util diff --git a/libnm-util/libnm-util.ver b/libnm-util/libnm-util.ver index ba0086264f..8f846a9fcc 100644 --- a/libnm-util/libnm-util.ver +++ b/libnm-util/libnm-util.ver @@ -132,9 +132,11 @@ global: nm_setting_gsm_get_apn; nm_setting_gsm_get_network_id; nm_setting_gsm_get_network_type; + nm_setting_gsm_get_allowed_bands; nm_setting_gsm_get_band; nm_setting_gsm_get_pin; nm_setting_gsm_get_puk; + nm_setting_gsm_get_home_only; nm_setting_ip4_config_error_get_type; nm_setting_ip4_config_error_quark; nm_setting_ip4_config_get_type; @@ -166,8 +168,7 @@ global: nm_setting_ip4_config_get_dhcp_hostname; nm_setting_ip4_config_get_dhcp_send_hostname; nm_setting_ip4_config_get_never_default; - nm_setting_ip6_config_error_get_type; - nm_setting_ip6_config_error_quark; + nm_setting_ip4_config_get_may_fail; nm_ip6_address_new; nm_ip6_address_dup; nm_ip6_address_ref; @@ -175,6 +176,8 @@ global: nm_ip6_address_compare; nm_ip6_address_get_address; nm_ip6_address_set_address; + nm_ip6_address_get_gateway; + nm_ip6_address_set_gateway; nm_ip6_address_get_prefix; nm_ip6_address_set_prefix; nm_ip6_route_new; @@ -190,6 +193,8 @@ global: nm_ip6_route_set_next_hop; nm_ip6_route_get_metric; nm_ip6_route_set_metric; + nm_setting_ip6_config_error_get_type; + nm_setting_ip6_config_error_quark; nm_setting_ip6_config_get_type; nm_setting_ip6_config_new; nm_setting_ip6_config_get_method; @@ -216,6 +221,7 @@ global: nm_setting_ip6_config_get_ignore_auto_routes; nm_setting_ip6_config_get_ignore_auto_dns; nm_setting_ip6_config_get_never_default; + nm_setting_ip6_config_get_may_fail; nm_setting_need_secrets; nm_setting_ppp_error_get_type; nm_setting_ppp_error_quark; @@ -351,6 +357,7 @@ global: nm_utils_ip4_addresses_to_gvalue; nm_utils_ip4_netmask_to_prefix; nm_utils_ip4_prefix_to_netmask; + nm_utils_ip4_get_default_prefix; nm_utils_ip4_routes_from_gvalue; nm_utils_ip4_routes_to_gvalue; nm_utils_ip6_addresses_from_gvalue; diff --git a/libnm-util/nm-param-spec-specialized.c b/libnm-util/nm-param-spec-specialized.c index 10621fac47..f5a362ce41 100644 --- a/libnm-util/nm-param-spec-specialized.c +++ b/libnm-util/nm-param-spec-specialized.c @@ -19,7 +19,7 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * - * (C) Copyright 2007 - 2008 Red Hat, Inc. + * (C) Copyright 2007 - 2010 Red Hat, Inc. * (C) Copyright 2007 - 2008 Novell, Inc. */ @@ -31,8 +31,11 @@ struct _NMParamSpecSpecialized { #include #include +#include #include +#include "nm-dbus-glib-types.h" + /***********************************************************/ /* nm_gvalues_compare */ @@ -367,11 +370,141 @@ nm_gvalues_compare_map (const GValue *value1, const GValue *value2) return ret; } +static gint +nm_gvalue_ip6_address_compare (const GValue *value1, const GValue *value2) +{ + GValueArray *values1, *values2; + GValue *tmp_val; + GByteArray *addr1, *addr2; + guint32 prefix1, prefix2; + GByteArray *gw1, *gw2; + gint ret = 0; + int i; + + /* IP6 addresses are GValueArrays (see nm-dbus-glib-types.h) */ + values1 = g_value_get_boxed (value1); + values2 = g_value_get_boxed (value2); + + /* Since they are NM IPv6 address structures, we expect both + * to contain two elements as specified in nm-dbus-glib-types.h. + */ + g_return_val_if_fail (values1->n_values == 3, 0); + g_return_val_if_fail (values2->n_values == 3, 0); + + /* First struct IPv6 address */ + tmp_val = g_value_array_get_nth (values1, 0); + addr1 = g_value_get_boxed (tmp_val); + /* First struct IPv6 prefix */ + tmp_val = g_value_array_get_nth (values1, 1); + prefix1 = g_value_get_uint (tmp_val); + /* First struct IPv6 gateway */ + tmp_val = g_value_array_get_nth (values1, 2); + gw1 = g_value_get_boxed (tmp_val); + + /* Second struct IPv6 address */ + tmp_val = g_value_array_get_nth (values2, 0); + addr2 = g_value_get_boxed (tmp_val); + /* Second struct IPv6 prefix */ + tmp_val = g_value_array_get_nth (values2, 1); + prefix2 = g_value_get_uint (tmp_val); + /* Second struct IPv6 gateway */ + tmp_val = g_value_array_get_nth (values2, 2); + gw2 = g_value_get_boxed (tmp_val); + + /* Compare IPv6 addresses */ + if (prefix1 != prefix2) + return prefix1 < prefix2 ? -1 : prefix1 > prefix2; + + if (!IN6_ARE_ADDR_EQUAL ((struct in6_addr *)addr1->data, (struct in6_addr *)addr2->data)) { + for (i = 0; ret == 0 && i < addr1->len; i++) + ret = addr1->data[i] < addr2->data[i] ? -1 : addr1->data[i] > addr2->data[i]; + } + + if (!IN6_ARE_ADDR_EQUAL ((struct in6_addr *) gw1->data, (struct in6_addr *) gw2->data)) { + for (i = 0; ret == 0 && i < gw1->len; i++) + ret = gw1->data[i] < gw2->data[i] ? -1 : gw1->data[i] > gw2->data[i]; + } + + return ret; +} + +static gint +nm_gvalue_ip6_route_compare (const GValue *value1, const GValue *value2) +{ + GValueArray *values1, *values2; + GValue *tmp_val; + GByteArray *dest1, *dest2; + GByteArray *next_hop1, *next_hop2; + guint32 prefix1, prefix2; + guint32 metric1, metric2; + gint ret = 0; + int i; + + /* IP6 routes are GValueArrays (see nm-dbus-glib-types.h) */ + values1 = g_value_get_boxed (value1); + values2 = g_value_get_boxed (value2); + + /* Since they are NM IPv6 route structures, we expect both + * to contain 4 elements as specified in nm-dbus-glib-types.h. + */ + g_return_val_if_fail (values1->n_values == 4, 0); + g_return_val_if_fail (values2->n_values == 4, 0); + + /* First struct IPv6 route */ + tmp_val = g_value_array_get_nth (values1, 0); + dest1 = g_value_get_boxed (tmp_val); + tmp_val = g_value_array_get_nth (values1, 1); + prefix1 = g_value_get_uint (tmp_val); + tmp_val = g_value_array_get_nth (values1, 2); + next_hop1 = g_value_get_boxed (tmp_val); + tmp_val = g_value_array_get_nth (values1, 3); + metric1 = g_value_get_uint (tmp_val); + + /* Second struct IPv6 route */ + tmp_val = g_value_array_get_nth (values2, 0); + dest2 = g_value_get_boxed (tmp_val); + tmp_val = g_value_array_get_nth (values2, 1); + prefix2 = g_value_get_uint (tmp_val); + tmp_val = g_value_array_get_nth (values2, 2); + next_hop2 = g_value_get_boxed (tmp_val); + tmp_val = g_value_array_get_nth (values2, 3); + metric2 = g_value_get_uint (tmp_val); + + /* Compare the routes */ + if (prefix1 != prefix2) + return prefix1 < prefix2 ? -1 : prefix1 > prefix2; + + if (!IN6_ARE_ADDR_EQUAL ((struct in6_addr *)dest1->data, (struct in6_addr *)dest2->data)) { + for (i = 0; ret == 0 && i < dest1->len; i++) + ret = dest1->data[i] < dest2->data[i] ? -1 : dest1->data[i] > dest2->data[i]; + } + + if (!IN6_ARE_ADDR_EQUAL ((struct in6_addr *)next_hop1->data, (struct in6_addr *)next_hop2->data)) { + for (i = 0; ret == 0 && i < next_hop1->len; i++) + ret = next_hop1->data[i] < next_hop2->data[i] ? -1 : next_hop1->data[i] > next_hop2->data[i]; + } + + if (metric1 != metric2) + ret = metric1 < metric2 ? -1 : metric1 > metric2; + + return ret; +} + static gint nm_gvalues_compare_struct (const GValue *value1, const GValue *value2) { - g_warning ("Not implemented"); - return 0; + /* value1 and value2 must contain the same type since + * nm_gvalues_compare() enforced that already. + */ + + if (G_VALUE_HOLDS (value1, DBUS_TYPE_G_IP6_ADDRESS)) { + return nm_gvalue_ip6_address_compare (value1, value2); + } else if (G_VALUE_HOLDS (value1, DBUS_TYPE_G_IP6_ROUTE)) { + return nm_gvalue_ip6_route_compare (value1, value2); + } else { + g_warning ("Don't know how to compare structures"); + return (value1 == value2); + } } gint @@ -736,6 +869,87 @@ compare_gvalue_hash (void) g_print ("Comparing different str hashes: %d\n", nm_gvalues_compare (&value1, &value2)); } +static void +compare_ip6_addresses (void) +{ + GValueArray *array1; + GValueArray *array2; + GValueArray *array3; + GByteArray *ba1; + GByteArray *ba2; + GByteArray *ba3; + GValue element = { 0 }; + GValue value1 = { 0 }; + GValue value2 = { 0 }; + struct in6_addr addr1; + struct in6_addr addr2; + struct in6_addr addr3; + guint32 prefix1 = 64; + guint32 prefix2 = 64; + guint32 prefix3 = 0; + + inet_pton (AF_INET6, "1:2:3:4:5:6:7:8", &addr1, sizeof (struct in6_addr)); + inet_pton (AF_INET6, "ffff:2:3:4:5:6:7:8", &addr2, sizeof (struct in6_addr)); + inet_pton (AF_INET6, "::", &addr3, sizeof (struct in6_addr)); + + /* address 1 */ + ba1 = g_byte_array_new (); + array1 = g_value_array_new (2); + g_value_init (&element, DBUS_TYPE_G_UCHAR_ARRAY); + g_byte_array_append (ba1, (guint8 *) addr1.s6_addr, 16); + g_value_take_boxed (&element, ba1); + g_value_array_append (array1, &element); + g_value_unset (&element); + + g_value_init (&element, G_TYPE_UINT); + g_value_set_uint (&element, prefix1); + g_value_array_append (array1, &element); + g_value_unset (&element); + + /* address 2 */ + ba2 = g_byte_array_new (); + array2 = g_value_array_new (2); + g_value_init (&element, DBUS_TYPE_G_UCHAR_ARRAY); + g_byte_array_append (ba2, (guint8 *) addr2.s6_addr, 16); + g_value_take_boxed (&element, ba2); + g_value_array_append (array2, &element); + g_value_unset (&element); + + g_value_init (&element, G_TYPE_UINT); + g_value_set_uint (&element, prefix2); + g_value_array_append (array2, &element); + g_value_unset (&element); + + /* address 3 */ + ba3 = g_byte_array_new (); + array3 = g_value_array_new (2); + g_value_init (&element, DBUS_TYPE_G_UCHAR_ARRAY); + g_byte_array_append (ba3, (guint8 *) addr3.s6_addr, 16); + g_value_take_boxed (&element, ba3); + g_value_array_append (array3, &element); + g_value_unset (&element); + + g_value_init (&element, G_TYPE_UINT); + g_value_set_uint (&element, prefix3); + g_value_array_append (array3, &element); + g_value_unset (&element); + + g_value_init (&value1, DBUS_TYPE_G_IP6_ADDRESS); + g_value_init (&value2, DBUS_TYPE_G_IP6_ADDRESS); + + g_value_set_boxed (&value1, array1); + g_value_set_boxed (&value2, array1); + g_print ("Comparing identical IPv6 address structures: %d\n", nm_gvalues_compare (&value1, &value2)); + + g_value_set_boxed (&value1, array1); + g_value_set_boxed (&value2, array2); + g_print ("Comparing different IPv6 address structures: %d\n", nm_gvalues_compare (&value1, &value2)); + + g_value_set_boxed (&value1, array1); + g_value_set_boxed (&value2, array3); + g_print ("Comparing different IPv6 address structures: %d\n", nm_gvalues_compare (&value1, &value2)); +} + int main (int argc, char *argv[]) { @@ -751,6 +965,7 @@ main (int argc, char *argv[]) compare_ptrarrays (); compare_str_hash (); compare_gvalue_hash (); + compare_ip6_addresses (); return 0; } diff --git a/libnm-util/nm-setting-connection.c b/libnm-util/nm-setting-connection.c index 1dedad3b72..65f613eba9 100644 --- a/libnm-util/nm-setting-connection.c +++ b/libnm-util/nm-setting-connection.c @@ -434,7 +434,7 @@ nm_setting_connection_class_init (NMSettingConnectionClass *setting_class) "(ie, contains only hexadecimal characters and '-'). " "The UUID should be assigned when the connection is " "created and never changed as long as the connection " - "stilla pplies to the same network. For example, " + "still applies to the same network. For example, " "it should not be changed when the user changes the " "connection's 'id', but should be recreated when the " "WiFi SSID, mobile broadband network provider, or the " diff --git a/libnm-util/nm-setting-gsm.c b/libnm-util/nm-setting-gsm.c index 626d2196cf..4b4560cd6d 100644 --- a/libnm-util/nm-setting-gsm.c +++ b/libnm-util/nm-setting-gsm.c @@ -19,7 +19,7 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * - * (C) Copyright 2007 - 2008 Red Hat, Inc. + * (C) Copyright 2007 - 2010 Red Hat, Inc. * (C) Copyright 2007 - 2008 Novell, Inc. */ @@ -80,6 +80,8 @@ typedef struct { guint32 allowed_bands; /* A bitfield of NM_SETTING_GSM_BAND_* */ char *pin; + + gboolean home_only; } NMSettingGsmPrivate; enum { @@ -94,6 +96,7 @@ enum { PROP_PIN, PROP_PUK, PROP_ALLOWED_BANDS, + PROP_HOME_ONLY, LAST_PROP }; @@ -191,6 +194,14 @@ nm_setting_gsm_get_puk (NMSettingGsm *setting) return NULL; } +gboolean +nm_setting_gsm_get_home_only (NMSettingGsm *setting) +{ + g_return_val_if_fail (NM_IS_SETTING_GSM (setting), FALSE); + + return NM_SETTING_GSM_GET_PRIVATE (setting)->home_only; +} + static gboolean verify (NMSetting *setting, GSList *all_settings, GError **error) { @@ -356,6 +367,9 @@ set_property (GObject *object, guint prop_id, if (str && strlen (str)) g_warning ("Tried to set deprecated property " NM_SETTING_GSM_SETTING_NAME "/" NM_SETTING_GSM_PUK); break; + case PROP_HOME_ONLY: + priv->home_only = g_value_get_boolean (value); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -401,6 +415,9 @@ get_property (GObject *object, guint prop_id, /* deprecated */ g_value_set_int (value, -1); break; + case PROP_HOME_ONLY: + g_value_set_boolean (value, nm_setting_gsm_get_home_only (setting)); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -572,7 +589,8 @@ nm_setting_gsm_class_init (NMSettingGsmClass *setting_class) || NM_SETTING_GSM_BAND_U800 || NM_SETTING_GSM_BAND_U850 || NM_SETTING_GSM_BAND_U900 - || NM_SETTING_GSM_BAND_U17IX, + || NM_SETTING_GSM_BAND_U17IX + || NM_SETTING_GSM_BAND_U1900, NM_SETTING_GSM_BAND_ANY, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_SERIALIZE)); @@ -593,6 +611,22 @@ nm_setting_gsm_class_init (NMSettingGsmClass *setting_class) NULL, G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE | NM_SETTING_PARAM_SECRET)); + /** + * NMSettingGsm:home-only: + * + * When TRUE, only connections to the home network will be allowed. + * Connections to roaming networks will not be made. + **/ + g_object_class_install_property + (object_class, PROP_HOME_ONLY, + g_param_spec_boolean (NM_SETTING_GSM_HOME_ONLY, + "PIN", + "When TRUE, only connections to the home network will " + "be allowed. Connections to roaming networks will " + "not be made.", + FALSE, + G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE)); + /* Deprecated properties */ /** * NMSettingGsm:puk: diff --git a/libnm-util/nm-setting-gsm.h b/libnm-util/nm-setting-gsm.h index 5b6a056455..0ac7122462 100644 --- a/libnm-util/nm-setting-gsm.h +++ b/libnm-util/nm-setting-gsm.h @@ -19,7 +19,7 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * - * (C) Copyright 2007 - 2008 Red Hat, Inc. + * (C) Copyright 2007 - 2010 Red Hat, Inc. * (C) Copyright 2007 - 2008 Novell, Inc. */ @@ -61,6 +61,7 @@ GQuark nm_setting_gsm_error_quark (void); #define NM_SETTING_GSM_NETWORK_TYPE "network-type" #define NM_SETTING_GSM_ALLOWED_BANDS "allowed-bands" #define NM_SETTING_GSM_PIN "pin" +#define NM_SETTING_GSM_HOME_ONLY "home-only" /* DEPRECATED & UNUSED */ #define NM_SETTING_GSM_PUK "puk" @@ -95,6 +96,7 @@ typedef enum { NM_SETTING_GSM_BAND_U850 = 0x00000200, /* WCDMA 3GPP UMTS 850 MHz (Class V) */ NM_SETTING_GSM_BAND_U900 = 0x00000400, /* WCDMA 3GPP UMTS 900 MHz (Class VIII) */ NM_SETTING_GSM_BAND_U17IX = 0x00000800, /* WCDMA 3GPP UMTS 1700 MHz (Class IX) */ + NM_SETTING_GSM_BAND_U1900 = 0x00001000, /* WCDMA 3GPP UMTS 1900 MHz (Class II) */ } NMSettingGsmNetworkBand; typedef struct { @@ -122,6 +124,7 @@ const char *nm_setting_gsm_get_network_id (NMSettingGsm *setting); int nm_setting_gsm_get_network_type (NMSettingGsm *setting); guint32 nm_setting_gsm_get_allowed_bands (NMSettingGsm *setting); const char *nm_setting_gsm_get_pin (NMSettingGsm *setting); +gboolean nm_setting_gsm_get_home_only (NMSettingGsm *setting); /* DEPRECATED & UNUSED */ const char *nm_setting_gsm_get_puk (NMSettingGsm *setting); diff --git a/libnm-util/nm-setting-ip4-config.c b/libnm-util/nm-setting-ip4-config.c index 580369fd13..186e41e243 100644 --- a/libnm-util/nm-setting-ip4-config.c +++ b/libnm-util/nm-setting-ip4-config.c @@ -19,7 +19,7 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * - * (C) Copyright 2007 - 2008 Red Hat, Inc. + * (C) Copyright 2007 - 2010 Red Hat, Inc. * (C) Copyright 2007 - 2008 Novell, Inc. */ @@ -83,6 +83,7 @@ typedef struct { gboolean dhcp_send_hostname; char *dhcp_hostname; gboolean never_default; + gboolean may_fail; } NMSettingIP4ConfigPrivate; enum { @@ -98,6 +99,7 @@ enum { PROP_DHCP_SEND_HOSTNAME, PROP_DHCP_HOSTNAME, PROP_NEVER_DEFAULT, + PROP_MAY_FAIL, LAST_PROP }; @@ -438,6 +440,14 @@ nm_setting_ip4_config_get_never_default (NMSettingIP4Config *setting) return NM_SETTING_IP4_CONFIG_GET_PRIVATE (setting)->never_default; } +gboolean +nm_setting_ip4_config_get_may_fail (NMSettingIP4Config *setting) +{ + g_return_val_if_fail (NM_IS_SETTING_IP4_CONFIG (setting), FALSE); + + return NM_SETTING_IP4_CONFIG_GET_PRIVATE (setting)->may_fail; +} + static gboolean verify (NMSetting *setting, GSList *all_settings, GError **error) { @@ -462,7 +472,8 @@ verify (NMSetting *setting, GSList *all_settings, GError **error) return FALSE; } } else if ( !strcmp (priv->method, NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL) - || !strcmp (priv->method, NM_SETTING_IP4_CONFIG_METHOD_SHARED)) { + || !strcmp (priv->method, NM_SETTING_IP4_CONFIG_METHOD_SHARED) + || !strcmp (priv->method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED)) { if (priv->dns && priv->dns->len) { g_set_error (error, NM_SETTING_IP4_CONFIG_ERROR, @@ -640,6 +651,9 @@ set_property (GObject *object, guint prop_id, case PROP_NEVER_DEFAULT: priv->never_default = g_value_get_boolean (value); break; + case PROP_MAY_FAIL: + priv->may_fail = g_value_get_boolean (value); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -687,6 +701,9 @@ get_property (GObject *object, guint prop_id, case PROP_NEVER_DEFAULT: g_value_set_boolean (value, priv->never_default); break; + case PROP_MAY_FAIL: + g_value_set_boolean (value, priv->may_fail); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -721,7 +738,8 @@ nm_setting_ip4_config_class_init (NMSettingIP4ConfigClass *setting_class) * network access to other computers) then the interface is assigned an * address in the 10.42.x.1/24 range and a DHCP and forwarding DNS server * are started, and the interface is NAT-ed to the current default network - * connection. This property must be set. + * connection. 'disabled' means IPv4 will not be used on this connection. + * This property must be set. **/ g_object_class_install_property (object_class, PROP_METHOD, @@ -742,7 +760,8 @@ nm_setting_ip4_config_class_init (NMSettingIP4ConfigClass *setting_class) "address in the 10.42.x.1/24 range and a DHCP and " "forwarding DNS server are started, and the " "interface is NAT-ed to the current default network " - "connection. This property must be set.", + "connection. 'disabled' means IPv4 will not be " + "used on this connection. This property must be set.", NULL, G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE)); @@ -751,8 +770,8 @@ nm_setting_ip4_config_class_init (NMSettingIP4ConfigClass *setting_class) * * List of DNS servers (network byte order). For the 'auto' method, these * DNS servers are appended to those (if any) returned by automatic - * configuration. DNS servers cannot be used with the 'shared' or - * 'link-local' methods as there is no usptream network. In all other + * configuration. DNS servers cannot be used with the 'shared', 'link-local', + * or 'disabled' methods as there is no usptream network. In all other * methods, these DNS servers are used as the only DNS servers for this * connection. **/ @@ -764,10 +783,10 @@ nm_setting_ip4_config_class_init (NMSettingIP4ConfigClass *setting_class) "the 'auto' method, these DNS servers are " "appended to those (if any) returned by automatic " "configuration. DNS servers cannot be used with " - "the 'shared' or 'link-local' methods as there is " - "no usptream network. In all other methods, " - "these DNS servers are used as the only DNS " - "servers for this connection.", + "the 'shared', 'link-local', or 'disabled' " + "methods as there is no usptream network. In all " + "other methods, these DNS servers are used as the " + "only DNS servers for this connection.", DBUS_TYPE_G_UINT_ARRAY, G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE)); @@ -776,9 +795,9 @@ nm_setting_ip4_config_class_init (NMSettingIP4ConfigClass *setting_class) * * List of DNS search domains. For the 'auto' method, these search domains * are appended to those returned by automatic configuration. Search domains - * cannot be used with the 'shared' or 'link-local' methods as there is no - * upstream network. In all other methods, these search domains are used - * as the only search domains for this connection. + * cannot be used with the 'shared', 'link-local', or 'disabled' methods as + * there is no upstream network. In all other methods, these search domains + * are used as the only search domains for this connection. **/ g_object_class_install_property (object_class, PROP_DNS_SEARCH, @@ -787,11 +806,11 @@ nm_setting_ip4_config_class_init (NMSettingIP4ConfigClass *setting_class) "List of DNS search domains. For the 'auto' " "method, these search domains are appended to " "those returned by automatic configuration. " - "Search domains cannot be used with the 'shared' " - "or 'link-local' methods as there is no upstream " - "network. In all other methods, these search " - "domains are used as the only search domains for " - "this connection.", + "Search domains cannot be used with the 'shared', " + "'link-local', or 'disabled' methods as there is " + "no upstream network. In all other methods, these " + "search domains are used as the only search domains " + "for this connection.", DBUS_TYPE_G_LIST_OF_STRING, G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE)); @@ -804,8 +823,8 @@ nm_setting_ip4_config_class_init (NMSettingIP4ConfigClass *setting_class) * (network byte order). The gateway may be left as 0 if no gateway exists * for that subnet. For the 'auto' method, given IP addresses are appended * to those returned by automatic configuration. Addresses cannot be used - * with the 'shared' or 'link-local' methods as the interface is - * automatically assigned an address with these methods. + * with the 'shared', 'link-local', or 'disabled' methods as addressing is + * either automatic or disabled with these methods. **/ g_object_class_install_property (object_class, PROP_ADDRESSES, @@ -820,9 +839,9 @@ nm_setting_ip4_config_class_init (NMSettingIP4ConfigClass *setting_class) "for that subnet. For the 'auto' method, given " "IP addresses are appended to those returned by " "automatic configuration. Addresses cannot be " - "used with the 'shared' or 'link-local' methods " - "as the interface is automatically assigned an " - "address with these methods.", + "used with the 'shared', 'link-local', or " + "'disabled' methods as addressing is either " + "automatic or disabled with these methods.", DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UINT, G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE)); @@ -835,8 +854,8 @@ nm_setting_ip4_config_class_init (NMSettingIP4ConfigClass *setting_class) * address prefix (1 - 32), the third being the next-hop (network byte * order) if any, and the fourth being the route metric. For the 'auto' * method, given IP routes are appended to those returned by automatic - * configuration. Routes cannot be used with the 'shared' or 'link-local' - * methods because there is no upstream network. + * configuration. Routes cannot be used with the 'shared', 'link-local', + * or 'disabled' methods because there is no upstream network. **/ g_object_class_install_property (object_class, PROP_ROUTES, @@ -852,8 +871,8 @@ nm_setting_ip4_config_class_init (NMSettingIP4ConfigClass *setting_class) "For the 'auto' method, given IP routes are " "appended to those returned by automatic " "configuration. Routes cannot be used with the " - "'shared' or 'link-local' methods as there is no " - "upstream network.", + "'shared', 'link-local', or 'disabled', methods " + "as there is no upstream network.", DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UINT, G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE)); @@ -879,7 +898,7 @@ nm_setting_ip4_config_class_init (NMSettingIP4ConfigClass *setting_class) * NMSettingIP4Config:ignore-auto-dns: * * When the method is set to 'auto' and this property to TRUE, automatically - * configured nameservers and search domains are ignored and only namservers + * configured nameservers and search domains are ignored and only nameservers * and search domains specified in #NMSettingIP4Config:dns and * #NMSettingIP4Config:dns-search, if any, are used. **/ @@ -889,7 +908,7 @@ nm_setting_ip4_config_class_init (NMSettingIP4ConfigClass *setting_class) "Ignore automatic DNS", "When the method is set to 'auto' and this property " "to TRUE, automatically configured nameservers and " - "search domains are ignored and only namservers and " + "search domains are ignored and only nameservers and " "search domains specified in the 'dns' and 'dns-search' " "properties, if any, are used.", FALSE, @@ -965,6 +984,31 @@ nm_setting_ip4_config_class_init (NMSettingIP4ConfigClass *setting_class) "the default route by NetworkManager.", FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_SERIALIZE)); + + /** + * NMSettingIP4Config:may-fail: + * + * If TRUE, allow overall network configuration to proceed even if IPv4 + * configuration times out. Note that at least one IP configuration + * must succeed or overall network configuration will still fail. For + * example, in IPv6-only networks, setting this property to TRUE allows + * the overall network configuration to succeed if IPv4 configuration fails + * but IPv6 configuration completes successfully. + **/ + g_object_class_install_property + (object_class, PROP_MAY_FAIL, + g_param_spec_boolean (NM_SETTING_IP4_CONFIG_MAY_FAIL, + "May Fail", + "If TRUE, allow overall network configuration to " + "proceed even if IPv4 configuration times out. " + "Note that at least one IP configuration must " + "succeed or overall network configuration will still " + "fail. For example, in IPv6-only networks, setting " + "this property to TRUE allows the overall network " + "configuration to succeed if IPv4 configuration " + "fails but IPv6 configuration completes successfully.", + FALSE, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_SERIALIZE)); } diff --git a/libnm-util/nm-setting-ip4-config.h b/libnm-util/nm-setting-ip4-config.h index 2362982f51..80ddd4758e 100644 --- a/libnm-util/nm-setting-ip4-config.h +++ b/libnm-util/nm-setting-ip4-config.h @@ -19,7 +19,7 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * - * (C) Copyright 2007 - 2008 Red Hat, Inc. + * (C) Copyright 2007 - 2010 Red Hat, Inc. * (C) Copyright 2007 - 2008 Novell, Inc. */ @@ -64,11 +64,13 @@ GQuark nm_setting_ip4_config_error_quark (void); #define NM_SETTING_IP4_CONFIG_DHCP_SEND_HOSTNAME "dhcp-send-hostname" #define NM_SETTING_IP4_CONFIG_DHCP_HOSTNAME "dhcp-hostname" #define NM_SETTING_IP4_CONFIG_NEVER_DEFAULT "never-default" +#define NM_SETTING_IP4_CONFIG_MAY_FAIL "may-fail" #define NM_SETTING_IP4_CONFIG_METHOD_AUTO "auto" #define NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL "link-local" #define NM_SETTING_IP4_CONFIG_METHOD_MANUAL "manual" #define NM_SETTING_IP4_CONFIG_METHOD_SHARED "shared" +#define NM_SETTING_IP4_CONFIG_METHOD_DISABLED "disabled" typedef struct NMIP4Address NMIP4Address; @@ -168,6 +170,8 @@ const char * nm_setting_ip4_config_get_dhcp_hostname (NMSettingIP4Config * gboolean nm_setting_ip4_config_get_never_default (NMSettingIP4Config *setting); +gboolean nm_setting_ip4_config_get_may_fail (NMSettingIP4Config *setting); + G_END_DECLS #endif /* NM_SETTING_IP4_CONFIG_H */ diff --git a/libnm-util/nm-setting-ip6-config.c b/libnm-util/nm-setting-ip6-config.c index b1577f06f4..e8af058041 100644 --- a/libnm-util/nm-setting-ip6-config.c +++ b/libnm-util/nm-setting-ip6-config.c @@ -19,7 +19,7 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * - * (C) Copyright 2007 - 2008 Red Hat, Inc. + * (C) Copyright 2007 - 2010 Red Hat, Inc. */ #include @@ -79,6 +79,7 @@ typedef struct { gboolean ignore_auto_routes; gboolean ignore_auto_dns; gboolean never_default; + gboolean may_fail; } NMSettingIP6ConfigPrivate; @@ -92,6 +93,7 @@ enum { PROP_IGNORE_AUTO_ROUTES, PROP_IGNORE_AUTO_DNS, PROP_NEVER_DEFAULT, + PROP_MAY_FAIL, LAST_PROP }; @@ -414,6 +416,14 @@ nm_setting_ip6_config_get_never_default (NMSettingIP6Config *setting) return NM_SETTING_IP6_CONFIG_GET_PRIVATE (setting)->never_default; } +gboolean +nm_setting_ip6_config_get_may_fail (NMSettingIP6Config *setting) +{ + g_return_val_if_fail (NM_IS_SETTING_IP6_CONFIG (setting), FALSE); + + return NM_SETTING_IP6_CONFIG_GET_PRIVATE (setting)->may_fail; +} + static gboolean verify (NMSetting *setting, GSList *all_settings, GError **error) { @@ -435,26 +445,23 @@ verify (NMSetting *setting, GSList *all_settings, GError **error) NM_SETTING_IP6_CONFIG_ADDRESSES); return FALSE; } - } else if ( !strcmp (priv->method, NM_SETTING_IP6_CONFIG_METHOD_AUTO) - || !strcmp (priv->method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE) + } else if ( !strcmp (priv->method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE) || !strcmp (priv->method, NM_SETTING_IP6_CONFIG_METHOD_LINK_LOCAL) || !strcmp (priv->method, NM_SETTING_IP6_CONFIG_METHOD_SHARED)) { - if (!priv->ignore_auto_dns) { - if (priv->dns && g_slist_length (priv->dns)) { - g_set_error (error, - NM_SETTING_IP6_CONFIG_ERROR, - NM_SETTING_IP6_CONFIG_ERROR_NOT_ALLOWED_FOR_METHOD, - NM_SETTING_IP6_CONFIG_DNS); - return FALSE; - } + if (g_slist_length (priv->dns)) { + g_set_error (error, + NM_SETTING_IP6_CONFIG_ERROR, + NM_SETTING_IP6_CONFIG_ERROR_NOT_ALLOWED_FOR_METHOD, + NM_SETTING_IP6_CONFIG_DNS); + return FALSE; + } - if (g_slist_length (priv->dns_search)) { - g_set_error (error, - NM_SETTING_IP6_CONFIG_ERROR, - NM_SETTING_IP6_CONFIG_ERROR_NOT_ALLOWED_FOR_METHOD, - NM_SETTING_IP6_CONFIG_DNS_SEARCH); - return FALSE; - } + if (g_slist_length (priv->dns_search)) { + g_set_error (error, + NM_SETTING_IP6_CONFIG_ERROR, + NM_SETTING_IP6_CONFIG_ERROR_NOT_ALLOWED_FOR_METHOD, + NM_SETTING_IP6_CONFIG_DNS_SEARCH); + return FALSE; } if (g_slist_length (priv->addresses)) { @@ -464,6 +471,9 @@ verify (NMSetting *setting, GSList *all_settings, GError **error) NM_SETTING_IP6_CONFIG_ADDRESSES); return FALSE; } + } else if ( !strcmp (priv->method, NM_SETTING_IP6_CONFIG_METHOD_AUTO) + || !strcmp (priv->method, NM_SETTING_IP6_CONFIG_METHOD_DHCP)) { + /* nothing to do */ } else { g_set_error (error, NM_SETTING_IP6_CONFIG_ERROR, @@ -535,6 +545,9 @@ set_property (GObject *object, guint prop_id, case PROP_NEVER_DEFAULT: priv->never_default = g_value_get_boolean (value); break; + case PROP_MAY_FAIL: + priv->may_fail = g_value_get_boolean (value); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -572,6 +585,9 @@ get_property (GObject *object, guint prop_id, case PROP_NEVER_DEFAULT: g_value_set_boolean (value, priv->never_default); break; + case PROP_MAY_FAIL: + g_value_set_boolean (value, priv->may_fail); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -598,30 +614,33 @@ nm_setting_ip6_config_class_init (NMSettingIP6ConfigClass *setting_class) * * IPv6 configuration method. If 'auto' is specified then the appropriate * automatic method (DHCP, PPP, advertisement, etc) is used for the - * interface and most other properties can be left unset. If 'link-local' - * is specified, then an IPv6 link-local address will be assigned to the - * interface. If 'manual' is specified, static IP addressing is used and - * at least one IP address must be given in the 'addresses' property. If - * 'ignored' is specified, IPv6 configuration is not done. This property - * must be set. NOTE: DHCP configuration and the 'shared' method are not - * yet supported. + * interface and most other properties can be left unset. To force the use + * of DHCP only, specify 'dhcp'; this method is only valid for ethernet- + * based hardware. If 'link-local' is specified, then an IPv6 link-local + * address will be assigned to the interface. If 'manual' is specified, + * static IP addressing is used and at least one IP address must be given + * in the 'addresses' property. If 'ignored' is specified, IPv6 + * configuration is not done. This property must be set. NOTE: the 'shared' + * method are not yet supported. **/ g_object_class_install_property (object_class, PROP_METHOD, g_param_spec_string (NM_SETTING_IP6_CONFIG_METHOD, "Method", "IPv6 configuration method. If 'auto' is specified " - "then the appropriate automatic method (DHCP, PPP, " + "then the appropriate automatic method (PPP, router " "advertisement, etc) is used for the device and " - "most other properties can be left unset. If " + "most other properties can be left unset. To force " + "the use of DHCP only, specify 'dhcp'; this method " + "is only valid for ethernet-based hardware. If " "'link-local' is specified, then an IPv6 link-local " "address will be assigned to the interface. If " "'manual' is specified, static IP addressing is " "used and at least one IP address must be given in " " the 'addresses' property. If 'ignored' is " "specified, IPv6 configuration is not done. This " - "property must be set. NOTE: DHCP configuration " - "and the 'shared' method are not yet supported.", + "property must be set. NOTE: the 'shared' method" + "is not yet supported.", NULL, G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE)); @@ -681,25 +700,32 @@ nm_setting_ip6_config_class_init (NMSettingIP6ConfigClass *setting_class) * NMSettingIP6Config:addresses: * * Array of IPv6 address structures. Each IPv6 address structure is - * composed of 2 members, the first being a byte array containing the IPv6 - * address (network byte order) and the second a 32-bit integer containing - * the IPv6 address prefix. For the 'auto' method, given IP addresses are - * appended to those returned by automatic configuration. Addresses cannot - * be used with the 'shared' or 'link-local' methods as the interface is - * automatically assigned an address with these methods. + * composed of 3 members, the first being a byte array containing the IPv6 + * address (network byte order), the second a 32-bit integer containing the + * IPv6 address prefix, and the third a byte array containing the IPv6 + * address (network byte order) of the gateway associated with this address, + * if any. If no gateway is given, the third element should be given as + * all zeros. For the 'auto' method, given IP addresses are appended to + * those returned by automatic configuration. Addresses cannot be used with + * the 'shared' or 'link-local' methods as the interface is automatically + * assigned an address with these methods. **/ g_object_class_install_property (object_class, PROP_ADDRESSES, _nm_param_spec_specialized (NM_SETTING_IP6_CONFIG_ADDRESSES, "Addresses", "Array of IPv6 address structures. Each IPv6 " - "address structure is composed of 2 members, the " + "address structure is composed of 3 members, the " "first being a byte array containing the IPv6 " - "address (network byte order) and the second a " + "address (network byte order), the second a " "32-bit integer containing the IPv6 address " - "prefix. For the 'auto' method, given IP " - "addresses are appended to those returned by " - "automatic configuration. Addresses cannot be " + "prefix, and the third a byte array containing " + "the IPv6 address (network byte order) of the " + "gateway associated with this address, if any. " + "If no gateway is given, the third element should " + "be given as all zeros. For the 'auto' method, " + "given IP addresses are appended to those returned " + "by automatic configuration. Addresses cannot be " "used with the 'shared' or 'link-local' methods " "as the interface is automatically assigned an " "address with these methods.", @@ -740,38 +766,39 @@ nm_setting_ip6_config_class_init (NMSettingIP6ConfigClass *setting_class) /** * NMSettingIP6Config:ignore-auto-routes: * - * When the method is set to 'auto' and this property to TRUE, automatically - * configured routes are ignored and only routes specified in - * #NMSettingIP6Config:routes, if any, are used. + * When the method is set to 'auto' or 'dhcp' and this property is set to + * TRUE, automatically configured routes are ignored and only routes + * specified in #NMSettingIP6Config:routes, if any, are used. **/ g_object_class_install_property (object_class, PROP_IGNORE_AUTO_ROUTES, g_param_spec_boolean (NM_SETTING_IP6_CONFIG_IGNORE_AUTO_ROUTES, "Ignore automatic routes", - "When the method is set to 'auto' and this property " - "to TRUE, automatically configured routes are " - "ignored and only routes specified in the 'routes' " - "property, if any, are used.", + "When the method is set to 'auto' or 'dhcp' and this " + "property is set to TRUE, automatically configured " + "routes are ignored and only routes specified in the " + "'routes' property, if any, are used.", FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_SERIALIZE)); /** * NMSettingIP6Config:ignore-auto-dns: * - * When the method is set to 'auto' and this property to TRUE, automatically - * configured nameservers and search domains are ignored and only namservers - * and search domains specified in #NMSettingIP6Config:dns and - * #NMSettingIP6Config:dns-search, if any, are used. + * When the method is set to 'auto' or 'dhcp' and this property is set to + * TRUE, automatically configured nameservers and search domains are ignored + * and only nameservers and search domains specified in + * #NMSettingIP6Config:dns and #NMSettingIP6Config:dns-search, if any, are + * used. **/ g_object_class_install_property (object_class, PROP_IGNORE_AUTO_DNS, g_param_spec_boolean (NM_SETTING_IP6_CONFIG_IGNORE_AUTO_DNS, "Ignore DHCPv6/RDNSS DNS", - "When the method is set to 'auto' and this property " - "to TRUE, automatically configured nameservers and " - "search domains are ignored and only namservers and " - "search domains specified in the 'dns' and 'dns-search' " - "properties, if any, are used.", + "When the method is set to 'auto' or 'dhcp' and this " + "property is set to TRUE, automatically configured " + "nameservers and search domains are ignored and only " + "nameservers and search domains specified in the 'dns' " + "and 'dns-search' properties, if any, are used.", FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_SERIALIZE)); @@ -791,12 +818,39 @@ nm_setting_ip6_config_class_init (NMSettingIP6ConfigClass *setting_class) FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_SERIALIZE)); + /** + * NMSettingIP6Config:may-fail: + * + * If TRUE, allow overall network configuration to proceed even if IPv6 + * configuration times out. Note that at least one IP configuration + * must succeed or overall network configuration will still fail. For + * example, in IPv4-only networks, setting this property to TRUE allows + * the overall network configuration to succeed if IPv6 configuration fails + * but IPv4 configuration completes successfully. + **/ + g_object_class_install_property + (object_class, PROP_MAY_FAIL, + g_param_spec_boolean (NM_SETTING_IP6_CONFIG_MAY_FAIL, + "May Fail", + "If TRUE, allow overall network configuration to " + "proceed even if IPv6 configuration times out. " + "Note that at least one IP configuration must " + "succeed or overall network configuration will still " + "fail. For example, in IPv4-only networks, setting " + "this property to TRUE allows the overall network " + "configuration to succeed if IPv6 configuration " + "fails but IPv4 configuration completes successfully.", + FALSE, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_SERIALIZE)); } +/********************************************************************/ + struct NMIP6Address { guint32 refcount; struct in6_addr address; guint32 prefix; + struct in6_addr gateway; }; NMIP6Address * @@ -820,6 +874,7 @@ nm_ip6_address_dup (NMIP6Address *source) address = nm_ip6_address_new (); address->prefix = source->prefix; memcpy (&address->address, &source->address, sizeof (struct in6_addr)); + memcpy (&address->gateway, &source->gateway, sizeof (struct in6_addr)); return address; } @@ -856,7 +911,8 @@ nm_ip6_address_compare (NMIP6Address *address, NMIP6Address *other) g_return_val_if_fail (other->refcount > 0, FALSE); if ( memcmp (&address->address, &other->address, sizeof (struct in6_addr)) - || address->prefix != other->prefix) + || address->prefix != other->prefix + || memcmp (&address->gateway, &other->gateway, sizeof (struct in6_addr))) return FALSE; return TRUE; } @@ -898,6 +954,27 @@ nm_ip6_address_set_prefix (NMIP6Address *address, guint32 prefix) address->prefix = prefix; } +const struct in6_addr * +nm_ip6_address_get_gateway (NMIP6Address *address) +{ + g_return_val_if_fail (address != NULL, 0); + g_return_val_if_fail (address->refcount > 0, 0); + + return &address->gateway; +} + +void +nm_ip6_address_set_gateway (NMIP6Address *address, const struct in6_addr *gw) +{ + g_return_if_fail (address != NULL); + g_return_if_fail (address->refcount > 0); + g_return_if_fail (gw != NULL); + + memcpy (&address->gateway, gw, sizeof (struct in6_addr)); +} + +/********************************************************************/ + struct NMIP6Route { guint32 refcount; diff --git a/libnm-util/nm-setting-ip6-config.h b/libnm-util/nm-setting-ip6-config.h index 18082e4eaa..e3e286e684 100644 --- a/libnm-util/nm-setting-ip6-config.h +++ b/libnm-util/nm-setting-ip6-config.h @@ -19,7 +19,7 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * - * (C) Copyright 2007 - 2008 Red Hat, Inc. + * (C) Copyright 2007 - 2010 Red Hat, Inc. */ #ifndef NM_SETTING_IP6_CONFIG_H @@ -62,9 +62,11 @@ GQuark nm_setting_ip6_config_error_quark (void); #define NM_SETTING_IP6_CONFIG_IGNORE_AUTO_ROUTES "ignore-auto-routes" #define NM_SETTING_IP6_CONFIG_IGNORE_AUTO_DNS "ignore-auto-dns" #define NM_SETTING_IP6_CONFIG_NEVER_DEFAULT "never-default" +#define NM_SETTING_IP6_CONFIG_MAY_FAIL "may-fail" #define NM_SETTING_IP6_CONFIG_METHOD_IGNORE "ignore" #define NM_SETTING_IP6_CONFIG_METHOD_AUTO "auto" +#define NM_SETTING_IP6_CONFIG_METHOD_DHCP "dhcp" #define NM_SETTING_IP6_CONFIG_METHOD_LINK_LOCAL "link-local" #define NM_SETTING_IP6_CONFIG_METHOD_MANUAL "manual" #define NM_SETTING_IP6_CONFIG_METHOD_SHARED "shared" @@ -87,6 +89,10 @@ guint32 nm_ip6_address_get_prefix (NMIP6Address *address); void nm_ip6_address_set_prefix (NMIP6Address *address, guint32 prefix); +const struct in6_addr *nm_ip6_address_get_gateway (NMIP6Address *address); +void nm_ip6_address_set_gateway (NMIP6Address *address, + const struct in6_addr *gw); + typedef struct NMIP6Route NMIP6Route; NMIP6Route * nm_ip6_route_new (void); @@ -158,6 +164,7 @@ gboolean nm_setting_ip6_config_get_ignore_auto_routes (NMSettingIP gboolean nm_setting_ip6_config_get_ignore_auto_dns (NMSettingIP6Config *setting); gboolean nm_setting_ip6_config_get_never_default (NMSettingIP6Config *setting); +gboolean nm_setting_ip6_config_get_may_fail (NMSettingIP6Config *setting); G_END_DECLS diff --git a/libnm-util/nm-setting-olpc-mesh.c b/libnm-util/nm-setting-olpc-mesh.c index 325e043f76..1653bb0768 100644 --- a/libnm-util/nm-setting-olpc-mesh.c +++ b/libnm-util/nm-setting-olpc-mesh.c @@ -1,5 +1,4 @@ -/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ - +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* * Dan Williams * Tambet Ingo diff --git a/libnm-util/nm-setting-olpc-mesh.h b/libnm-util/nm-setting-olpc-mesh.h index 9477dd91db..84abd1264a 100644 --- a/libnm-util/nm-setting-olpc-mesh.h +++ b/libnm-util/nm-setting-olpc-mesh.h @@ -1,4 +1,29 @@ -/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + * Dan Williams + * Tambet Ingo + * Sjoerd Simons + * Daniel Drake + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + * (C) Copyright 2007 - 2008 Red Hat, Inc. + * (C) Copyright 2007 - 2008 Novell, Inc. + * (C) Copyright 2009 One Laptop per Child + */ #ifndef NM_SETTING_OLPC_MESH_H #define NM_SETTING_OLPC_MESH_H diff --git a/libnm-util/nm-utils.c b/libnm-util/nm-utils.c index 8ec872d807..5a8a8800db 100644 --- a/libnm-util/nm-utils.c +++ b/libnm-util/nm-utils.c @@ -21,7 +21,7 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * - * (C) Copyright 2005 - 2009 Red Hat, Inc. + * (C) Copyright 2005 - 2010 Red Hat, Inc. */ #include @@ -275,6 +275,8 @@ nm_utils_init (GError **error) if (!crypto_init (error)) return FALSE; + _nm_utils_register_value_transformations (); + atexit (nm_utils_deinit); initialized = TRUE; } @@ -624,7 +626,7 @@ nm_utils_convert_uint_array_to_string (const GValue *src_value, GValue *dest_val } static void -nm_utils_convert_ip4_addr_struct_array_to_string (const GValue *src_value, GValue *dest_value) +nm_utils_convert_ip4_addr_route_struct_array_to_string (const GValue *src_value, GValue *dest_value) { GPtrArray *ptr_array; GString *printable; @@ -639,6 +641,7 @@ nm_utils_convert_ip4_addr_struct_array_to_string (const GValue *src_value, GValu GArray *array; char buf[INET_ADDRSTRLEN + 1]; struct in_addr addr; + gboolean is_addr; /* array contains address x route */ if (i > 0) g_string_append (printable, ", "); @@ -649,13 +652,17 @@ nm_utils_convert_ip4_addr_struct_array_to_string (const GValue *src_value, GValu g_string_append (printable, "invalid"); continue; } + is_addr = (array->len < 4); memset (buf, 0, sizeof (buf)); addr.s_addr = g_array_index (array, guint32, 0); if (!inet_ntop (AF_INET, &addr, buf, INET_ADDRSTRLEN)) nm_warning ("%s: error converting IP4 address 0x%X", __func__, ntohl (addr.s_addr)); - g_string_append_printf (printable, "ip = %s", buf); + if (is_addr) + g_string_append_printf (printable, "ip = %s", buf); + else + g_string_append_printf (printable, "dst = %s", buf); g_string_append (printable, ", "); memset (buf, 0, sizeof (buf)); @@ -670,7 +677,18 @@ nm_utils_convert_ip4_addr_struct_array_to_string (const GValue *src_value, GValu if (!inet_ntop (AF_INET, &addr, buf, INET_ADDRSTRLEN)) nm_warning ("%s: error converting IP4 address 0x%X", __func__, ntohl (addr.s_addr)); - g_string_append_printf (printable, "gw = %s", buf); + if (is_addr) + g_string_append_printf (printable, "gw = %s", buf); + else + g_string_append_printf (printable, "nh = %s", buf); + } + + if (array->len > 3) { + g_string_append (printable, ", "); + + memset (buf, 0, sizeof (buf)); + g_string_append_printf (printable, "mt = %u", + g_array_index (array, guint32, 3)); } g_string_append (printable, " }"); @@ -729,7 +747,8 @@ nm_utils_convert_string_hash_to_string (const GValue *src_value, GValue *dest_va hash = (GHashTable *) g_value_get_boxed (src_value); printable = g_string_new ("["); - g_hash_table_foreach (hash, convert_one_string_hash_entry, printable); + if (hash) + g_hash_table_foreach (hash, convert_one_string_hash_entry, printable); g_string_append (printable, " ]"); g_value_take_string (dest_value, printable->str); @@ -764,6 +783,269 @@ nm_utils_convert_byte_array_to_string (const GValue *src_value, GValue *dest_val g_string_free (printable, FALSE); } +static gboolean +nm_utils_inet6_ntop (struct in6_addr *addr, char *buf) +{ + if (!inet_ntop (AF_INET6, addr, buf, INET6_ADDRSTRLEN)) { + int i; + GString *ip6_str = g_string_new (NULL); + g_string_append_printf (ip6_str, "%02X", addr->s6_addr[0]); + for (i = 1; i < 16; i++) + g_string_append_printf (ip6_str, " %02X", addr->s6_addr[i]); + nm_warning ("%s: error converting IP6 address %s", + __func__, ip6_str->str); + g_string_free (ip6_str, TRUE); + return FALSE; + } + return TRUE; +} + +static void +nm_utils_convert_ip6_dns_array_to_string (const GValue *src_value, GValue *dest_value) +{ + GPtrArray *ptr_array; + GString *printable; + guint i = 0; + + g_return_if_fail (g_type_is_a (G_VALUE_TYPE (src_value), DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UCHAR)); + + ptr_array = (GPtrArray *) g_value_get_boxed (src_value); + + printable = g_string_new ("["); + while (ptr_array && (i < ptr_array->len)) { + GByteArray *bytearray; + char buf[INET6_ADDRSTRLEN]; + struct in6_addr *addr; + + if (i > 0) + g_string_append (printable, ", "); + + bytearray = (GByteArray *) g_ptr_array_index (ptr_array, i++); + if (bytearray->len != 16) { + g_string_append (printable, "invalid"); + continue; + } + addr = (struct in6_addr *) bytearray->data; + memset (buf, 0, sizeof (buf)); + nm_utils_inet6_ntop (addr, buf); + g_string_append_printf (printable, "%s", buf); + } + g_string_append_c (printable, ']'); + + g_value_take_string (dest_value, printable->str); + g_string_free (printable, FALSE); +} + +static void +nm_utils_convert_ip6_addr_struct_array_to_string (const GValue *src_value, GValue *dest_value) +{ + GPtrArray *ptr_array; + GString *printable; + guint i = 0; + + g_return_if_fail (g_type_is_a (G_VALUE_TYPE (src_value), DBUS_TYPE_G_ARRAY_OF_IP6_ADDRESS)); + + ptr_array = (GPtrArray *) g_value_get_boxed (src_value); + + printable = g_string_new ("["); + while (ptr_array && (i < ptr_array->len)) { + GValueArray *elements; + GValue *tmp; + GByteArray *ba_addr; + char buf[INET6_ADDRSTRLEN]; + struct in6_addr *addr; + guint32 prefix; + + if (i > 0) + g_string_append (printable, ", "); + + g_string_append (printable, "{ "); + elements = (GValueArray *) g_ptr_array_index (ptr_array, i++); + if ( (elements->n_values != 3) + || (G_VALUE_TYPE (g_value_array_get_nth (elements, 0)) != DBUS_TYPE_G_UCHAR_ARRAY) + || (G_VALUE_TYPE (g_value_array_get_nth (elements, 1)) != G_TYPE_UINT) + || (G_VALUE_TYPE (g_value_array_get_nth (elements, 2)) != DBUS_TYPE_G_UCHAR_ARRAY)) { + g_string_append (printable, "invalid }"); + continue; + } + + /* IPv6 address */ + tmp = g_value_array_get_nth (elements, 0); + ba_addr = g_value_get_boxed (tmp); + if (ba_addr->len != 16) { + g_string_append (printable, "invalid }"); + continue; + } + addr = (struct in6_addr *) ba_addr->data; + memset (buf, 0, sizeof (buf)); + nm_utils_inet6_ntop (addr, buf); + g_string_append_printf (printable, "ip = %s", buf); + g_string_append (printable, ", "); + + /* Prefix */ + tmp = g_value_array_get_nth (elements, 1); + prefix = g_value_get_uint (tmp); + if (prefix > 128) { + g_string_append (printable, "invalid }"); + continue; + } + g_string_append_printf (printable, "px = %u", prefix); + g_string_append (printable, ", "); + + /* IPv6 Gateway */ + tmp = g_value_array_get_nth (elements, 2); + ba_addr = g_value_get_boxed (tmp); + if (ba_addr->len != 16) { + g_string_append (printable, "invalid }"); + continue; + } + addr = (struct in6_addr *) ba_addr->data; + memset (buf, 0, sizeof (buf)); + nm_utils_inet6_ntop (addr, buf); + g_string_append_printf (printable, "gw = %s", buf); + g_string_append (printable, " }"); + } + g_string_append_c (printable, ']'); + + g_value_take_string (dest_value, printable->str); + g_string_free (printable, FALSE); +} + +static void +nm_utils_convert_ip6_route_struct_array_to_string (const GValue *src_value, GValue *dest_value) +{ + GPtrArray *ptr_array; + GString *printable; + guint i = 0; + + g_return_if_fail (g_type_is_a (G_VALUE_TYPE (src_value), DBUS_TYPE_G_ARRAY_OF_IP6_ROUTE)); + + ptr_array = (GPtrArray *) g_value_get_boxed (src_value); + + printable = g_string_new ("["); + while (ptr_array && (i < ptr_array->len)) { + GValueArray *elements; + GValue *tmp; + GByteArray *ba_addr; + char buf[INET6_ADDRSTRLEN]; + struct in6_addr *addr; + guint32 prefix, metric; + + if (i > 0) + g_string_append (printable, ", "); + + g_string_append (printable, "{ "); + elements = (GValueArray *) g_ptr_array_index (ptr_array, i++); + if ( (elements->n_values != 4) + || (G_VALUE_TYPE (g_value_array_get_nth (elements, 0)) != DBUS_TYPE_G_UCHAR_ARRAY) + || (G_VALUE_TYPE (g_value_array_get_nth (elements, 1)) != G_TYPE_UINT) + || (G_VALUE_TYPE (g_value_array_get_nth (elements, 2)) != DBUS_TYPE_G_UCHAR_ARRAY) + || (G_VALUE_TYPE (g_value_array_get_nth (elements, 3)) != G_TYPE_UINT)) { + g_string_append (printable, "invalid"); + continue; + } + + /* Destination address */ + tmp = g_value_array_get_nth (elements, 0); + ba_addr = g_value_get_boxed (tmp); + if (ba_addr->len != 16) { + g_string_append (printable, "invalid"); + continue; + } + addr = (struct in6_addr *) ba_addr->data; + memset (buf, 0, sizeof (buf)); + nm_utils_inet6_ntop (addr, buf); + g_string_append_printf (printable, "dst = %s", buf); + g_string_append (printable, ", "); + + /* Prefix */ + tmp = g_value_array_get_nth (elements, 1); + prefix = g_value_get_uint (tmp); + if (prefix > 128) { + g_string_append (printable, "invalid"); + continue; + } + g_string_append_printf (printable, "px = %u", prefix); + g_string_append (printable, ", "); + + /* Next hop addresses */ + tmp = g_value_array_get_nth (elements, 2); + ba_addr = g_value_get_boxed (tmp); + if (ba_addr->len != 16) { + g_string_append (printable, "invalid"); + continue; + } + addr = (struct in6_addr *) ba_addr->data; + memset (buf, 0, sizeof (buf)); + nm_utils_inet6_ntop (addr, buf); + g_string_append_printf (printable, "nh = %s", buf); + g_string_append (printable, ", "); + + /* Metric */ + tmp = g_value_array_get_nth (elements, 3); + metric = g_value_get_uint (tmp); + g_string_append_printf (printable, "mt = %u", metric); + + g_string_append (printable, " }"); + } + g_string_append_c (printable, ']'); + + g_value_take_string (dest_value, printable->str); + g_string_free (printable, FALSE); +} + +#define OLD_DBUS_TYPE_G_IP6_ADDRESS (dbus_g_type_get_struct ("GValueArray", DBUS_TYPE_G_UCHAR_ARRAY, G_TYPE_UINT, G_TYPE_INVALID)) +#define OLD_DBUS_TYPE_G_ARRAY_OF_IP6_ADDRESS (dbus_g_type_get_collection ("GPtrArray", OLD_DBUS_TYPE_G_IP6_ADDRESS)) + +static void +nm_utils_convert_old_ip6_addr_array (const GValue *src_value, GValue *dst_value) +{ + GPtrArray *src_outer_array; + GPtrArray *dst_outer_array; + guint i; + + g_return_if_fail (g_type_is_a (G_VALUE_TYPE (src_value), OLD_DBUS_TYPE_G_ARRAY_OF_IP6_ADDRESS)); + + src_outer_array = (GPtrArray *) g_value_get_boxed (src_value); + dst_outer_array = g_ptr_array_new (); + + for (i = 0; src_outer_array && (i < src_outer_array->len); i++) { + GValueArray *src_addr_array; + GValueArray *dst_addr_array; + GValue element = {0, }; + GValue *src_addr, *src_prefix; + GByteArray *ba; + + src_addr_array = (GValueArray *) g_ptr_array_index (src_outer_array, i); + + if ( (src_addr_array->n_values != 2) + || (G_VALUE_TYPE (g_value_array_get_nth (src_addr_array, 0)) != DBUS_TYPE_G_UCHAR_ARRAY) + || (G_VALUE_TYPE (g_value_array_get_nth (src_addr_array, 1)) != G_TYPE_UINT)) { + g_warning ("%s: invalid old IPv6 address type", __func__); + return; + } + + dst_addr_array = g_value_array_new (3); + + src_addr = g_value_array_get_nth (src_addr_array, 0); + g_value_array_append (dst_addr_array, src_addr); + src_prefix = g_value_array_get_nth (src_addr_array, 1); + g_value_array_append (dst_addr_array, src_prefix); + + /* Blank Gateway */ + g_value_init (&element, DBUS_TYPE_G_UCHAR_ARRAY); + ba = g_byte_array_new (); + g_byte_array_append (ba, (guint8 *) "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16); + g_value_take_boxed (&element, ba); + g_value_array_append (dst_addr_array, &element); + g_value_unset (&element); + + g_ptr_array_add (dst_outer_array, dst_addr_array); + } + + g_value_take_boxed (dst_value, dst_outer_array); +} + void _nm_utils_register_value_transformations (void) { @@ -781,7 +1063,7 @@ _nm_utils_register_value_transformations (void) nm_utils_convert_uint_array_to_string); g_value_register_transform_func (DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UINT, G_TYPE_STRING, - nm_utils_convert_ip4_addr_struct_array_to_string); + nm_utils_convert_ip4_addr_route_struct_array_to_string); g_value_register_transform_func (DBUS_TYPE_G_MAP_OF_VARIANT, G_TYPE_STRING, nm_utils_convert_gvalue_hash_to_string); @@ -791,6 +1073,18 @@ _nm_utils_register_value_transformations (void) g_value_register_transform_func (DBUS_TYPE_G_UCHAR_ARRAY, G_TYPE_STRING, nm_utils_convert_byte_array_to_string); + g_value_register_transform_func (DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UCHAR, + G_TYPE_STRING, + nm_utils_convert_ip6_dns_array_to_string); + g_value_register_transform_func (DBUS_TYPE_G_ARRAY_OF_IP6_ADDRESS, + G_TYPE_STRING, + nm_utils_convert_ip6_addr_struct_array_to_string); + g_value_register_transform_func (DBUS_TYPE_G_ARRAY_OF_IP6_ROUTE, + G_TYPE_STRING, + nm_utils_convert_ip6_route_struct_array_to_string); + g_value_register_transform_func (OLD_DBUS_TYPE_G_ARRAY_OF_IP6_ADDRESS, + DBUS_TYPE_G_ARRAY_OF_IP6_ADDRESS, + nm_utils_convert_old_ip6_addr_array); registered = TRUE; } } @@ -1209,6 +1503,41 @@ nm_utils_ip4_prefix_to_netmask (guint32 prefix) } +/** + * nm_utils_ip4_get_default_prefix: + * @ip: an IPv4 address (in network byte order) + * + * When the Internet was originally set up, various ranges of IP addresses were + * segmented into three network classes: A, B, and C. This function will return + * a prefix that is associated with the IP address specified defining where it + * falls in the predefined classes. + * + * Returns: the default class prefix for the given IP + **/ +/* The function is originally from ipcalc.c of Red Hat's initscripts. */ +guint32 +nm_utils_ip4_get_default_prefix (guint32 ip) +{ + if (((ntohl (ip) & 0xFF000000) >> 24) <= 127) + return 8; /* Class A - 255.0.0.0 */ + else if (((ntohl (ip) & 0xFF000000) >> 24) <= 191) + return 16; /* Class B - 255.255.0.0 */ + + return 24; /* Class C - 255.255.255.0 */ +} + +/** + * nm_utils_ip6_addresses_from_gvalue: + * @value: gvalue containing a GPtrArray of GValueArrays of (GArray of guchars) and guint32 + * + * Utility function to convert a #GPtrArray of #GValueArrays of (#GArray of guchars) and guint32 + * representing a list of NetworkManager IPv6 addresses (which is a tuple of address, + * prefix, and gateway), into a GSList of #NMIP6Address objects. The specific format of + * this serialization is not guaranteed to be stable and the #GValueArray may be + * extended in the future. + * + * Returns: a newly allocated #GSList of #NMIP6Address objects + **/ GSList * nm_utils_ip6_addresses_from_gvalue (const GValue *value) { @@ -1222,16 +1551,28 @@ nm_utils_ip6_addresses_from_gvalue (const GValue *value) GValueArray *elements = (GValueArray *) g_ptr_array_index (addresses, i); GValue *tmp; GByteArray *ba_addr; + GByteArray *ba_gw = NULL; NMIP6Address *addr; guint32 prefix; - if ( (elements->n_values != 2) - || (G_VALUE_TYPE (g_value_array_get_nth (elements, 0)) != DBUS_TYPE_G_UCHAR_ARRAY) + if (elements->n_values < 2 || elements->n_values > 3) { + nm_warning ("%s: ignoring invalid IP6 address structure", __func__); + continue; + } + + if ( (G_VALUE_TYPE (g_value_array_get_nth (elements, 0)) != DBUS_TYPE_G_UCHAR_ARRAY) || (G_VALUE_TYPE (g_value_array_get_nth (elements, 1)) != G_TYPE_UINT)) { nm_warning ("%s: ignoring invalid IP6 address structure", __func__); continue; } + /* Check optional 3rd element (gateway) */ + if ( elements->n_values == 3 + && (G_VALUE_TYPE (g_value_array_get_nth (elements, 2)) != DBUS_TYPE_G_UCHAR_ARRAY)) { + nm_warning ("%s: ignoring invalid IP6 address structure", __func__); + continue; + } + tmp = g_value_array_get_nth (elements, 0); ba_addr = g_value_get_boxed (tmp); if (ba_addr->len != 16) { @@ -1248,15 +1589,41 @@ nm_utils_ip6_addresses_from_gvalue (const GValue *value) continue; } + if (elements->n_values == 3) { + tmp = g_value_array_get_nth (elements, 2); + ba_gw = g_value_get_boxed (tmp); + if (ba_gw->len != 16) { + nm_warning ("%s: ignoring invalid IP6 gateway address of length %d", + __func__, ba_gw->len); + continue; + } + } + addr = nm_ip6_address_new (); nm_ip6_address_set_prefix (addr, prefix); nm_ip6_address_set_address (addr, (const struct in6_addr *) ba_addr->data); + if (ba_gw) + nm_ip6_address_set_gateway (addr, (const struct in6_addr *) ba_gw->data); + list = g_slist_prepend (list, addr); } return g_slist_reverse (list); } +/** + * nm_utils_ip6_addresses_to_gvalue: + * @list: a list of #NMIP6Address objects + * @value: a pointer to a #GValue into which to place the converted addresses, + * which should be unset by the caller (when no longer needed) with + * g_value_unset(). + * + * Utility function to convert a #GSList of #NMIP6Address objects into a + * GPtrArray of GValueArrays representing a list of NetworkManager IPv6 addresses + * (which is a tuple of address, prefix, and gateway). The specific format of + * this serialization is not guaranteed to be stable and may be extended in the + * future. + **/ void nm_utils_ip6_addresses_to_gvalue (GSList *list, GValue *value) { @@ -1271,8 +1638,9 @@ nm_utils_ip6_addresses_to_gvalue (GSList *list, GValue *value) GValue element = {0, }; GByteArray *ba; - array = g_value_array_new (2); + array = g_value_array_new (3); + /* IP address */ g_value_init (&element, DBUS_TYPE_G_UCHAR_ARRAY); ba = g_byte_array_new (); g_byte_array_append (ba, (guint8 *) nm_ip6_address_get_address (addr), 16); @@ -1280,17 +1648,39 @@ nm_utils_ip6_addresses_to_gvalue (GSList *list, GValue *value) g_value_array_append (array, &element); g_value_unset (&element); + /* Prefix */ g_value_init (&element, G_TYPE_UINT); g_value_set_uint (&element, nm_ip6_address_get_prefix (addr)); g_value_array_append (array, &element); g_value_unset (&element); + /* Gateway */ + g_value_init (&element, DBUS_TYPE_G_UCHAR_ARRAY); + ba = g_byte_array_new (); + g_byte_array_append (ba, (guint8 *) nm_ip6_address_get_gateway (addr), 16); + g_value_take_boxed (&element, ba); + g_value_array_append (array, &element); + g_value_unset (&element); + g_ptr_array_add (addresses, array); } g_value_take_boxed (value, addresses); } +/** + * nm_utils_ip6_routes_from_gvalue: + * @value: gvalue containing a GPtrArray of GValueArrays of (GArray or guchars), guint32, + * (GArray of guchars), and guint32 + * + * Utility function GPtrArray of GValueArrays of (GArray or guchars), guint32, + * (GArray of guchars), and guint32 representing a list of NetworkManager IPv6 + * routes (which is a tuple of destination, prefix, next hop, and metric) + * into a GSList of #NMIP6Route objects. The specific format of this serialization + * is not guaranteed to be stable and may be extended in the future. + * + * Returns: a newly allocated #GSList of #NMIP6Route objects + **/ GSList * nm_utils_ip6_routes_from_gvalue (const GValue *value) { @@ -1343,6 +1733,19 @@ nm_utils_ip6_routes_from_gvalue (const GValue *value) return g_slist_reverse (list); } +/** + * nm_utils_ip6_routes_to_gvalue: + * @list: a list of #NMIP6Route objects + * @value: a pointer to a #GValue into which to place the converted routes, + * which should be unset by the caller (when no longer needed) with + * g_value_unset(). + * + * Utility function to convert a #GSList of #NMIP6Route objects into a GPtrArray of + * GValueArrays of (GArray or guchars), guint32, (GArray of guchars), and guint32 + * representing a list of NetworkManager IPv6 routes (which is a tuple of destination, + * prefix, next hop, and metric). The specific format of this serialization is not + * guaranteed to be stable and may be extended in the future. + **/ void nm_utils_ip6_routes_to_gvalue (GSList *list, GValue *value) { diff --git a/libnm-util/nm-utils.h b/libnm-util/nm-utils.h index bbb304f4db..68501d53fb 100644 --- a/libnm-util/nm-utils.h +++ b/libnm-util/nm-utils.h @@ -20,7 +20,7 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * - * (C) Copyright 2005 - 2008 Red Hat, Inc. + * (C) Copyright 2005 - 2010 Red Hat, Inc. */ #ifndef NM_UTILS_H @@ -31,6 +31,8 @@ #include "nm-connection.h" +G_BEGIN_DECLS + /*********************************************************/ /* The API defined here is _NOT_ guaranteed in any way!! */ /*********************************************************/ @@ -192,6 +194,7 @@ void nm_utils_ip4_routes_to_gvalue (GSList *list, GValue *value); guint32 nm_utils_ip4_netmask_to_prefix (guint32 netmask); guint32 nm_utils_ip4_prefix_to_netmask (guint32 prefix); +guint32 nm_utils_ip4_get_default_prefix (guint32 ip); GSList *nm_utils_ip6_addresses_from_gvalue (const GValue *value); void nm_utils_ip6_addresses_to_gvalue (GSList *list, GValue *value); @@ -210,4 +213,6 @@ GByteArray *nm_utils_rsa_key_encrypt (const GByteArray *data, char **out_password, GError **error); +G_END_DECLS + #endif /* NM_UTILS_H */ diff --git a/libnm-util/tests/test-general.c b/libnm-util/tests/test-general.c index d00ec994e1..9530445959 100644 --- a/libnm-util/tests/test-general.c +++ b/libnm-util/tests/test-general.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2008 - 2009 Red Hat, Inc. + * Copyright (C) 2008 - 2010 Red Hat, Inc. * */ @@ -28,7 +28,8 @@ #include "nm-setting-connection.h" #include "nm-setting-vpn.h" - +#include "nm-setting-ip6-config.h" +#include "nm-dbus-glib-types.h" static void vpn_check_func (const char *key, const char *value, gpointer user_data) @@ -128,6 +129,99 @@ test_setting_vpn_items (void) g_object_unref (s_vpn); } +#define OLD_DBUS_TYPE_G_IP6_ADDRESS (dbus_g_type_get_struct ("GValueArray", DBUS_TYPE_G_UCHAR_ARRAY, G_TYPE_UINT, G_TYPE_INVALID)) +#define OLD_DBUS_TYPE_G_ARRAY_OF_IP6_ADDRESS (dbus_g_type_get_collection ("GPtrArray", OLD_DBUS_TYPE_G_IP6_ADDRESS)) + +/* Test that setting the IPv6 setting's 'addresses' property using the old + * IPv6 address format still works, i.e. that the GValue transformation function + * from old->new is working correctly. + */ +static void +test_setting_ip6_config_old_address_array (void) +{ + NMSettingIP6Config *s_ip6; + GPtrArray *addresses, *read_addresses; + GValueArray *array, *read_array; + GValue element = {0, }, written_value = {0, }, read_value = {0, }; + GByteArray *ba; + const guint8 addr[16] = { 0x88, 0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11, + 0x11, 0x22, 0x33, 0x44, 0x66, 0x77, 0x88, 0x99 }; + const guint8 gw[16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + guint32 prefix = 56; + GValue *read_addr, *read_prefix, *read_gw; + + s_ip6 = (NMSettingIP6Config *) nm_setting_ip6_config_new (); + ASSERT (s_ip6 != NULL, + "ip6-old-addr", "error creating IP6 setting"); + + g_value_init (&written_value, OLD_DBUS_TYPE_G_ARRAY_OF_IP6_ADDRESS); + + addresses = g_ptr_array_new (); + array = g_value_array_new (3); + + /* IP address */ + g_value_init (&element, DBUS_TYPE_G_UCHAR_ARRAY); + ba = g_byte_array_new (); + g_byte_array_append (ba, &addr[0], sizeof (addr)); + g_value_take_boxed (&element, ba); + g_value_array_append (array, &element); + g_value_unset (&element); + + /* Prefix */ + g_value_init (&element, G_TYPE_UINT); + g_value_set_uint (&element, prefix); + g_value_array_append (array, &element); + g_value_unset (&element); + + g_ptr_array_add (addresses, array); + g_value_set_boxed (&written_value, addresses); + + /* Set the address array on the object */ + g_object_set_property (G_OBJECT (s_ip6), NM_SETTING_IP6_CONFIG_ADDRESSES, &written_value); + + /* Get it back so we can compare it */ + g_value_init (&read_value, DBUS_TYPE_G_ARRAY_OF_IP6_ADDRESS); + g_object_get_property (G_OBJECT (s_ip6), NM_SETTING_IP6_CONFIG_ADDRESSES, &read_value); + + ASSERT (G_VALUE_HOLDS (&read_value, DBUS_TYPE_G_ARRAY_OF_IP6_ADDRESS), + "ip6-old-addr", "wrong addresses property value type '%s'", + G_VALUE_TYPE_NAME (&read_value)); + + read_addresses = (GPtrArray *) g_value_get_boxed (&read_value); + ASSERT (read_addresses != NULL, + "ip6-old-addr", "missing addresses on readback"); + ASSERT (read_addresses->len == 1, + "ip6-old-addr", "expected one address on readback"); + + read_array = (GValueArray *) g_ptr_array_index (read_addresses, 0); + + read_addr = g_value_array_get_nth (read_array, 0); + ba = g_value_get_boxed (read_addr); + ASSERT (ba->len == sizeof (addr), + "ip6-old-addr", "unexpected address item length %d", ba->len); + ASSERT (memcmp (ba->data, &addr[0], sizeof (addr)) == 0, + "ip6-old-addr", "unexpected failure comparing addresses"); + + read_prefix = g_value_array_get_nth (read_array, 1); + ASSERT (g_value_get_uint (read_prefix) == prefix, + "ip6-old-addr", "unexpected failure comparing prefix"); + + /* Ensure the gateway is all zeros, which is how the 2-item to 3-item + * conversion happens. + */ + read_gw = g_value_array_get_nth (read_array, 2); + ba = g_value_get_boxed (read_gw); + ASSERT (ba->len == sizeof (gw), + "ip6-old-addr", "unexpected gateway item length %d", ba->len); + ASSERT (memcmp (ba->data, &gw[0], sizeof (gw)) == 0, + "ip6-old-addr", "unexpected failure comparing gateways"); + + g_value_unset (&written_value); + g_value_unset (&read_value); + g_object_unref (s_ip6); +} + int main (int argc, char **argv) { GError *error = NULL; @@ -142,6 +236,7 @@ int main (int argc, char **argv) /* The tests */ test_setting_vpn_items (); + test_setting_ip6_config_old_address_array (); base = g_path_get_basename (argv[0]); fprintf (stdout, "%s: SUCCESS\n", base); diff --git a/libnm-util/tests/test-settings-defaults.c b/libnm-util/tests/test-settings-defaults.c index 7f0adc561f..9f38a14555 100644 --- a/libnm-util/tests/test-settings-defaults.c +++ b/libnm-util/tests/test-settings-defaults.c @@ -118,7 +118,7 @@ int main (int argc, char **argv) test_defaults (NM_TYPE_SETTING_CDMA, NM_SETTING_CDMA_SETTING_NAME); test_defaults (NM_TYPE_SETTING_GSM, NM_SETTING_GSM_SETTING_NAME); test_defaults (NM_TYPE_SETTING_IP4_CONFIG, NM_SETTING_IP4_CONFIG_SETTING_NAME); -// test_defaults (NM_TYPE_SETTING_IP6_CONFIG, NM_SETTING_IP6_CONFIG_SETTING_NAME); + test_defaults (NM_TYPE_SETTING_IP6_CONFIG, NM_SETTING_IP6_CONFIG_SETTING_NAME); test_defaults (NM_TYPE_SETTING_PPP, NM_SETTING_PPP_SETTING_NAME); test_defaults (NM_TYPE_SETTING_PPPOE, NM_SETTING_PPPOE_SETTING_NAME); test_defaults (NM_TYPE_SETTING_SERIAL, NM_SETTING_SERIAL_SETTING_NAME); diff --git a/man/Makefile.am b/man/Makefile.am index c3000d78aa..097fdc6bea 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -1,8 +1,17 @@ man_MANS = \ NetworkManager.8 \ - nm-tool.1 + NetworkManager.conf.5 \ + nm-system-settings.conf.5 \ + nm-tool.1 \ + nmcli.1 EXTRA_DIST = \ $(man_MANS) \ NetworkManager.8.in \ - nm-tool.1.in + NetworkManager.conf.5.in \ + nm-system-settings.conf.5.in \ + nm-tool.1.in \ + nmcli.1.in + +CLEANFILES = $(man_MANS) + diff --git a/man/NetworkManager.8.in b/man/NetworkManager.8.in index 426cc7ba92..a6be073170 100644 --- a/man/NetworkManager.8.in +++ b/man/NetworkManager.8.in @@ -1,14 +1,14 @@ .\" NetworkManager(8) manual page .\" -.\" Copyright (C) 2005 - 2009 Red Hat, Inc. +.\" Copyright (C) 2005 - 2010 Red Hat, Inc. .\" Copyright (C) 2005 - 2009 Novell, Inc. .\" Copyright (C) 2005 Robert Love .\" -.TH NETWORKMANAGER "8" +.TH NETWORKMANAGER "8" "January 29, 2010" .SH NAME NetworkManager \- network management daemon .SH SYNOPSIS -.B NetworkManager [\-\-no-daemon] +.B NetworkManager [\-\-no\-daemon] [\-\-pid\-file=] [\-\-state\-file=] [\-\-config=] [\-\-plugins=,plugin2>,...] [\-\-log\-level=] [\-\-log\-domains=,,...] .SH DESCRIPTION The \fINetworkManager\fP daemon attempts to make networking configuration and operation as painless and automatic as possible by managing the primary network @@ -18,7 +18,7 @@ connection for that device becomes available, unless that behavior is disabled. Information about networking is exported via a D-Bus interface to any interested application, providing a rich API with which to inspect and control network settings and operation. -.TP +.P NetworkManager will execute scripts in the /etc/NetworkManager/dispatcher.d directory in alphabetical order in response to network events. Each script should be (a) a regular file, (b) owned by root, (c) not writable by group or @@ -29,12 +29,12 @@ and second an action. .I "up" The interface has been activated. The environment contains more information about the interface; CONNECTION_UUID contains the UUID of the connection. Other -variables are IP4_ADDRESS_N where N is a number from 0 to (# IPv4 addresses - 1), +variables are IP4_ADDRESS_N where N is a number from 0 to (# IPv4 addresses \- 1), in the format "address/prefix gateway". IP4_NUM_ADDRESSES contains the number addresses the script may expect. IP4_NAMESERVERS contains a space-separated list of the DNS servers, and IP4_DOMAINS contains a space-separated list of the search domains. Routes use the format IP4_ROUTE_N where N is a number from 0 -to (# IPv4 routes - 1), in the format "address/prefix next-hop metric", and +to (# IPv4 routes \- 1), in the format "address/prefix next-hop metric", and IP4_NUM_ROUTES contains the number of routes to expect. If the connection used DHCP for address configuration, the received DHCP configuration is passed in the environment using standard DHCP option names, prefixed with "DHCP4_", like @@ -43,11 +43,11 @@ environment using standard DHCP option names, prefixed with "DHCP4_", like .I "down" The interface has been deactivated. .TP -.I "vpn-up" +.I "vpn\-up" A VPN connection has been activated. The environment contains the connection UUID in the variable CONNECTION_UUID. .TP -.I "vpn-down" +.I "vpn\-down" A VPN connection has been deactivated. .TP .I "hostname" @@ -55,21 +55,54 @@ The system hostname has been updated. Use gethostname(2) to retrieve it. .SH OPTIONS The following options are supported: .TP -.I "--no-daemon" +.I "\-\-no\-daemon" Do not daemonize. This is useful for debugging, and directs log output to the controlling terminal in addition to syslog. +.TP +.I "\-\-pid\-file=" +Specify location of a PID file. The PID file is used for storing PID of the +running proccess and prevents running multiple instances. +.TP +.I "\-\-state\-file=" +Specify file for storing state of the NetworkManager persistently. If not specified, +the default value of '/lib/NetworkManager/NetworkManager.state' is +used; where is dependent on your distribution (usually it's /var). +.TP +.I "\-\-config=" +Specify configuration file to set up various settings for NetworkManager. If not +specified, the default value of '/NetworkManager/NetworkManager.conf' +is used with a fallback to the older 'nm\-system\-settings.conf' if located in +the same directory; where is dependent on your distribution (usually +it's /etc). See \fBNetworkManager.conf\fP(5) for more information on configuration +file. +.TP +.I "\-\-plugins=,, ... +List plugins used to manage system-wide connection settings. This list has +preference over plugins specified in the configuration file. Currently supported +plugins are: keyfile, ifcfg\-rh, ifcfg\-suse, ifupdown. +See \fBNetworkManager.conf\fP(5) for more information on the plugins. +.TP +.I "\-\-log\-level= +Sets how much information NetworkManager sends to the log destination (usually +syslog's "daemon" facility). By default, only informational, warning, and error +messages are logged. See \fBNetworkManager.conf\fP(5) for more information on +log levels and domains. +.TP +.I "\-\-log\-domains=,, ... +Sets which operations are logged to the log destination (usually syslog). By +default, most domains are logging-enabled. See \fBNetworkManager.conf\fP(5) for +more information on log levels and domains. .SH DEBUGGING The following environment variables are supported to help debugging. When used -in conjunction with the "--no-daemon" option (thus echoing PPP and DHCP helper +in conjunction with the "\-\-no\-daemon" option (thus echoing PPP and DHCP helper output to stdout) these can quickly help pinpoint the source of connection -issues. -.TP -.I "NM_SERIAL_DEBUG" -When set to anything, causes NetworkManager to log all serial communication to -and from serial devices like mobile broadband 3G modems. +issues. Also see the \-\-log\-level and \-\-log\-domains to enable debug logging inside +NetworkManager itself. .TP .I "NM_PPP_DEBUG" When set to anything, causes NetworkManager to turn on PPP debugging in pppd, which logs all PPP and PPTP frames and client/server exchanges. .SH SEE ALSO -.BR nm-tool (1) +.BR nm\-tool (1), +.BR NetworkManager.conf (5). + diff --git a/man/NetworkManager.conf.5.in b/man/NetworkManager.conf.5.in new file mode 100644 index 0000000000..c3af611675 --- /dev/null +++ b/man/NetworkManager.conf.5.in @@ -0,0 +1,139 @@ +.\" NetworkManager.conf(5) manual page +.\" +.\" Copyright (C) 2010 Red Hat, Inc. +.\" +.TH "NetworkManager.conf" "5" "1 February 2010" "" +.SH NAME +NetworkManager.conf \- NetworkManager configuration file +.SH SYNOPSIS +/etc/NetworkManager/NetworkManager.conf +.br +or +.br +\fI\fP/NetworkManager/NetworkManager.conf +.br +where depends on your distribution or build. +.SH DESCRIPTION +.P +.I NetworkManager.conf +is a configuration file for NetworkManager. It is used to set up various +aspects of NetworkManager's behavior. The location of +the file may be changed through use of the "\-\-config=" argument for +\fBNetworkManager\fP (8). + +It is not necessary to restart NetworkManager when making changes, as the +configuration file is watched for changes and reloaded automatically when necessary. +.SH "FILE FORMAT" +.P +The configuration file format is so-called key file (sort of ini-style format). +It consists of sections (groups) of key-value pairs. Lines beginning with a '#' and blank +lines are considered comments. Sections are started by a header line containing +the section enclosed in '[' and ']', and ended implicitly by the start of +the next section or the end of the file. Each key-value pair must be contained +in a section. +.br +Minimal system settings configuration file looks like this: +.P +.nf +[main] +plugins=keyfile +.fi +.P +Description of sections and available keys follows: +.SS [main] +This section is the only mandatory section of the configuration file. +.TP +.B plugins=\fIplugin1\fP,\fIplugin2\fP, ... +List plugin names separated by ','. Plugins are used to read/write system-wide +connection. When more plugins are specified, the connections are read from all +listed plugins. When writing connections, the plugins will be asked to save the +connection in the order listed here. If the first plugin cannot write out that +connection type, or can't write out any connections, the next plugin is tried. +If none of the plugins can save the connection, the error is returned to the user. +.P +.RS +.B "Available plugins:" +.br +.TP +.I keyfile +plugin is the generic plugin that supports all the connection types and +capabilities that NetworkManager has. It writes files out in a .ini-style format in +/etc/NetworkManager/system-connections. For security, it will ignore files +that are readable or writeable by any user or group other than +.I root +since private keys and passphrases may be stored in plaintext inside the file. +.TP +.I ifcfg\-rh +plugin is used on the Fedora and Red Hat Enterprise Linux distributions +to read and write configuration from the standard /etc/sysconfig/network-scripts/ifcfg-* files. +It currently supports reading wired, WiFi, and 802.1x connections, but does not yet support reading +or writing mobile broadband, PPPoE, or VPN connections. To allow reading and writing of these +add \fIkeyfile\fP plugin to your configuration as well. +.TP +.I ifupdown +plugin is used on the Debian and Ubuntu distributions, and reads connections from +/etc/network/interfaces. Since it cannot write connections out (that support isn't planned), +it is usually paired with the \fIkeyfile\fP plugin to enable saving and editing of new connections. +The \fIifupdown\fP plugin supports basic wired and WiFi connections, including WPA-PSK. +.TP +.I ifcfg\-suse +plugin is only provided for simple backward compatibility with SUSE and OpenSUSE configuration. +Most setups should be using the \fIkeyfile\fP plugin instead. The \fIifcfg\-suse\fP plugin supports +reading wired and WiFi connections, but does not support saving any connection types. +.RE +.TP +.B dhcp=\fIdhclient\fP | \fIdhcpcd\fP +This key sets up what DHCP client NetworkManager will use. Presently +\fIdhclient\fP and \fIdhcpcd\fP are supported. The client configured here should +be available on your system too. If this key is missing, available DHCP clients +are looked for in this order: dhclient, dhcpcd. +.SS [keyfile] +This section contains keyfile-specific options and thus only has effect when using \fIkeyfile\fP plugin. +.TP +.B hostname=\fI\fP +Set a persistent hostname when using the \fIkeyfile\fP plugin. +.TP +.B unmanaged-devices=\fImac:\fP;\fImac:\fP;... +Set devices that should be ignored by NetworkManager when using the \fIkeyfile\fP +plugin. Devices are specified in the following format: "mac:", where + is MAC address of the device to be ignored, in lowercase. Multiple +entries are separated by a semicolon. Example: +.nf +unmanaged-devices=mac:00:22:68:1c:59:b1;mac:00:1e:65:30:d1:c4 +.fi +.SS [ifupdown] +This section contains ifupdown-specific options and thus only has effect when using \fIifupdown\fP plugin. +.TP +.B managed=\fIfalse\fP | \fItrue\fP +Controls whether interfaces listed in the 'interfaces' file are managed by NetworkManager. +If set to \fItrue\fP, then interfaces listed in /etc/network/interfaces are managed by NetworkManager. +If set to \fIfalse\fP, then any interface listed in /etc/network/interfaces will be +ignored by NetworkManager. Remember that NetworkManager controls the default route, +so because the interface is ignored, NetworkManager may assign the default route to +some other interface. +When the option is missing, \fIfalse\fP value is taken as default. +.SS [logging] +This section controls NetworkManager's logging. Any settings here are +overridden by the \-\-log\-level and \-\-log\-domains command-line options. +.TP +.B level=\fI\fP +One of [ERR, WARN, INFO, DEBUG]. The ERR level logs only critical errors. WARN +logs warnings that may reflect operation. INFO logs various informational +messages that are useful for tracking state and operations. DEBUG enables +verbose logging for debugging purposes. Subsequent levels also log all messages +from earlier levels; thus setting the log level to INFO also logs error and +warning messages. +.TP +.B domains=\fI,, ...\fP +The following log domains are available: [NONE, HW, RKILL, ETHER, WIFI, BT, MB, +DHCP4, DHCP6, PPP, WIFI_SCAN, IP4, IP6, AUTOIP4, DNS, VPN, SHARING, SUPPLICANT, +USER_SET, SYS_SET, SUSPEND, CORE, DEVICE, OLPC]. When "NONE" is given by itself, +logging is disabled. MB = Mobile Broadband, USER_SET = user settings operations +and communication, SYS_SET = system settings service operations, OLPC = OLPC +Mesh device operations, CORE = core daemon operations, DEVICE = activation and +general interface operations. +.SH "SEE ALSO" +.BR http://live.gnome.org/NetworkManager/SystemSettings +.sp +.BR NetworkManager (8), +.BR nm\-tool (1). diff --git a/man/nm-system-settings.conf.5.in b/man/nm-system-settings.conf.5.in new file mode 100644 index 0000000000..e48d0c8e65 --- /dev/null +++ b/man/nm-system-settings.conf.5.in @@ -0,0 +1,26 @@ +.\" nm-system-settings.conf(5) manual page +.\" +.\" Copyright (C) 2010 Red Hat, Inc. +.\" +.TH "nm-system-settings.conf" "5" "1 February 2010" "" +.SH NAME +nm\-system\-settings.conf \- Deprecated NetworkManager configuration file +.SH SYNOPSIS +/etc/NetworkManager/nm\-system\-settings.conf +.br +or +.br +\fI\fP/NetworkManager/nm\-system\-settings.conf +.br +where depends on your distribution or build. +.SH DESCRIPTION +.P +.I nm\-system\-settings.conf +is a deprecated configuration file for \fBNetworkManager\fP (5). While this +file can still be used, NetworkManager now defaults to reading the config +file \fP/NetworkManager/NetworkManager.conf\fP instead, falling back +to nm\-system\-settings.conf if NetworkManager.conf does not exist. +.SH "SEE ALSO" +.BR NetworkManager (8), +.BR NetworkManager.conf (5), +.BR nm\-tool (1). diff --git a/man/nmcli.1.in b/man/nmcli.1.in new file mode 100644 index 0000000000..056b5bdd40 --- /dev/null +++ b/man/nmcli.1.in @@ -0,0 +1,321 @@ +.\" nmcli (1) manual page +.\" +.\" This is free documentation; 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. +.\" +.\" The GNU General Public License's references to "object code" +.\" and "executables" are to be interpreted as the output of any +.\" document formatting or typesetting system, including +.\" intermediate and printed output. +.\" +.\" This manual 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 manual; if not, write to the Free +.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, +.\" USA. +.\" +.\" Copyright (C) 2010 Red Hat, Inc. +.\" +.TH NMCLI "1" "14 April 2010" + +.SH NAME +nmcli \- command-line tool for controlling NetworkManager +.SH SYNOPSIS +.ad l +.B nmcli +.RI " [ " OPTIONS " ] " OBJECT " { " COMMAND " | " +.BR help " } " +.sp + +.IR OBJECT " := { " +.BR nm " | " con " | " dev " } " +.sp + +.IR OPTIONS " := { " +.br +\fB\-t\fR[\fIerse\fR] +.br +\fB\-p\fR[\fIretty\fR] +.br +\fB\-m\fR[\fImode\fR] tabular | multiline +.br +\fB\-f\fR[\fIields\fR] | all | common +.br +\fB\-e\fR[\fIscape\fR] yes | no +.br +\fB\-v\fR[\fIersion\fR] +.br +\fB\-h\fR[\fIelp\fR] +.br +.RI "}" + +.SH DESCRIPTION +.B nmcli +is a command-line tool for controlling NetworkManager and getting its status. +It is not meant as a replacement of \fInm-applet\fP or other similar clients. +Rather it's a complementary utility to these programs. +The main \fInmcli\fP's usage is on servers, headless machines or just for +power users who prefer the command line. +.P +The use cases comprise: +.IP \(em 4 +Initscripts: ifup/ifdown can utilize NetworkManager via \fInmcli\fP instead of +having to manage connections itself and possible interfere with NetworkManager. +.IP \(em 4 +Servers, headless machines: No GUI is available; then \fInmcli\fP is used to +talk directly to NetworkManager and control only system-wide connections. +.IP \(em 4 +User sessions: For this case, \fInmcli\fP can talk to \fInm-applet\fP to find +user connections. It can still talk directly to NetworkManager for manipulating +these connections. As \fInmcli\fP doesn't have direct access to user +configuration data in GConf, \fInm-applet\fP handles that itself. That may, +for example, cause the applet to pop up keyring dialogs when secrets are needed. +.SS \fIOPTIONS\fP +.TP +.B \-t, \-\-terse +Output is terse. This mode is designed and suitable for computer (script) +processing. +.TP +.B \-p, \-\-pretty +Output is pretty. This causes \fInmcli\fP to produce easy readable outputs +for humans, i.e. values are aligned, headers are printed, etc. +.TP +.B \-m, \-\-mode tabular | multiline +Switch between \fItabular\fP and \fImultiline\fP output. +If omitted, default is \fItabular\fP for most commands. For the commands +producing more structured information, that cannot be displayed on a single +line, default is \fImultiline\fP. Currenly, they are: +.br +.nf + 'nmcli con list id|uuid ' + 'nmcli dev list' +.fi +\fItabular\fP - Output is a table where each line describes a single entry. +Columns define particular properties of the entry. +.br +\fImultiline\fP - Each entry comprises more lines, each property on its own line. +The values are prefixed with the property name. +.TP +.B \-f, \-\-fields | all | common +This option is used to specify what fields (column names) should be printed. +Valid field names differ for specific commands. List available fields by +providing an invalid value to the \fI--fields\fP option. +.br +\fIall\fP is used to print all valid field values of the command. +\fIcommon\fP is used to print common field values of the command. +If omitted, default is \fIcommon\fP. +The option is mandatory when \fI--terse\fP is used. In this case, generic +values \fIall\fP and \fIcommon\fP cannot be used. (This is to maintain +compatibility when new fields are added in the future). +.TP +.B \-e, \-\-escape yes | no +Whether to escape ':' and '\\' characters in terse tabular mode. The escape +character is '\\'. +If omitted, default is \fIyes\fP. +.TP +.B \-v, \-\-version +Show \fInmcli\fP version. +.TP +.B \-h, \-\-help +Print help information. +.SS \fIOBJECT\fP +.TP +.B nm +NetworkManager +.br +Use this object to inquire and change state of NetworkManager. +.TP +.SS \fICOMMAND\fP := { status | sleep | wakeup | wifi | wwan } +.sp +.RS +.TP +.B status +.br +Show overall status of NetworkManager. This is the default action, when no +command is provided to \fInm\fP object. +.br +.nf +\fBReference to D-Bus:\fP +No simple reference. +.fi +.TP +.B sleep +.br +Put NetworkManager to sleeping mode. Thus all interfaces that NetworkManager +manages are deactivated. +.br +.nf +\fBReference to D-Bus:\fP +interface: org.freedesktop.NetworkManager +method: Sleep +arguments: TRUE +.fi +.TP +.B wakeup +.br +Awake NetworkManager from sleep. When NetworkManager is awaken, devices are +available to be activated. +.br +.nf +\fBReference to D-Bus:\fP +interface: org.freedesktop.NetworkManager +method: Sleep +arguments: FALSE +.fi +.TP +.B wifi [on|off] +.br +Inquire or set status of WiFi in NetworkManager. Without any further argument, +WiFi status is printed; \fIon\fP enables WiFi; \fIoff\fP disables WiFi. +.br +.nf +\fBReference to D-Bus:\fP +No simple reference. +.fi +.TP +.B wwan [on|off] +.br +Inquire or set status of WWAN in NetworkManager. Without any further argument, +WWAN status is printed; \fIon\fP enables WWAN; \fIoff\fP disables WWAN. +.br +.nf +\fBReference to D-Bus:\fP +No simple reference. +.fi +.RE + +.TP +.B con +Connections +.br +Get information about NetworkManager's connections. +.TP +.SS \fICOMMAND\fP := { list | status | up | down } +.sp +.RS +.TP +.B list [id | uuid | system | user] +.br +List configured connections. Without a parameter, configured connection from +both system and user settings services are listed. \fIsystem\fP argument filters +only system-wide connections, \fIuser\fP prints user connections only. +In order to get connection details, \fIid\fP with connection's name or \fIuuid\fP +with connection's UUID shall be specified. +When no command is given to \fIcon\fP object, the default action is 'nmcli con list'. +.br +.nf +\fBReference to D-Bus:\fP +No simple reference. +.fi +.TP +.B status +.br +Print status of active connections. +.br +.nf +\fBReference to D-Bus:\fP +No simple reference. +.fi +.TP +.B up id | uuid [iface ] [ap ] [\-\-nowait] [\-\-timeout ] +.br +Activate a connection. The connection is identified by its name using \fIid\fP +or UUID using \fIuuid\fP. For requiring particular device to activate +the connection on, \fIiface\fP option with interface name should be given. +\fIap\fP option can further concretize what AP should be used in case of WiFi +connection. \fI\-\-nowait\fP option causes \fInmcli\fP to exit immediately and +not to wait for command completion. \fI\-\-timeout\fP option provides a means +to specify how long to wait for operation completion. +.br +.nf +\fBReference to D-Bus:\fP +interface: org.freedesktop.NetworkManager +method: ActivateConnection +arguments: according to arguments +.fi +.TP +.B down id | uuid +.br +Deactivate a connection. +The connection is identified by its name using \fIid\fP +or UUID using \fIuuid\fP. +.br +.nf +\fBReference to D-Bus:\fP +interface: org.freedesktop.NetworkManager +method: DeactivateConnection +arguments: according to arguments +.fi +.RE + +.TP +.B dev +Devices +.br +Get information about devices. +.TP +.SS \fICOMMAND\fP := { status | list | disconnect | wifi } +.sp +.RS +.TP +.B status +.br +Print status of devices. This is the default action, when no command +is specified to \fIdev\fP object. +.br +.nf +\fBReference to D-Bus:\fP +No simple reference. +.fi +.TP +.B list [iface ] +.br +Get detailed information about devices. Without an argument, all devices are +examined. To get information for a specific device, \fIiface\fP argument +with the interface name should be provided. +.br +.nf +\fBReference to D-Bus:\fP +No simple reference. +.fi +.TP +.B disconnect iface [\-\-nowait] [\-\-timeout ] +.br +Disconnect a device and prevent the device from automatically activating further +connections without user/manual intervention. \fI\-\-nowait\fP option causes +\fInmcli\fP to exit immediately and not to wait for command completion. +\fI\-\-timeout\fP option provides a means to specify how long to wait for +operation completion. +.br +.nf +\fBReference to D-Bus:\fP +interface: org.freedesktop.NetworkManager.Device +method: Disconnect +arguments: none +.fi +.TP +.B wifi [list [iface ] [hwaddr ]] +.br +List available WiFi access points. \fIiface\fP and \fIhwaddr\fP options +can be used to get just APs for particular interface or specific AP, +respectively. +.br +.nf +\fBReference to D-Bus:\fP +No simple reference. +.fi +.RE + +.SH BUGS +There are probably some. If you find a bug, please report to +https://bugzilla.gnome.org/ \- product \fINetworkManager\fP. + +.SH SEE ALSO +.BR nm\-tool (1), +.BR NetworkManager(8). diff --git a/marshallers/nm-marshal.list b/marshallers/nm-marshal.list index 38669dd32b..359fbed2d5 100644 --- a/marshallers/nm-marshal.list +++ b/marshallers/nm-marshal.list @@ -15,11 +15,15 @@ VOID:POINTER,POINTER VOID:STRING,STRING,STRING,UINT VOID:OBJECT,UINT,UINT VOID:STRING,INT -VOID:STRING,UINT +VOID:INT,UINT +VOID:INT,UINT,BOOLEAN VOID:OBJECT,OBJECT,ENUM VOID:POINTER,STRING VOID:STRING,BOXED BOOLEAN:POINTER,STRING,BOOLEAN,UINT,STRING,STRING +VOID:STRING,BOOLEAN,UINT,STRING,STRING BOOLEAN:VOID VOID:STRING,BOOLEAN +VOID:STRING,OBJECT,POINTER +VOID:BOOLEAN,UINT diff --git a/po/LINGUAS b/po/LINGUAS index 4ab6fac7b4..9494643213 100644 --- a/po/LINGUAS +++ b/po/LINGUAS @@ -22,6 +22,7 @@ fr gl gu he +hi hr hu id @@ -34,6 +35,7 @@ ku lt lv mk +ml mr nb ne diff --git a/po/POTFILES.in b/po/POTFILES.in index 44235ea8ab..4d7faa5873 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,14 +1,21 @@ [encoding: UTF-8] # List of source files containing translatable strings. # Please keep this file sorted alphabetically. +cli/src/connections.c +cli/src/devices.c +cli/src/network-manager.c +cli/src/nmcli.c +cli/src/settings.c +cli/src/utils.c libnm-util/crypto.c libnm-util/crypto_gnutls.c libnm-util/crypto_nss.c libnm-util/nm-utils.c src/nm-netlink-monitor.c -src/NetworkManager.c +src/main.c src/dhcp-manager/nm-dhcp-dhclient.c -src/ip6-manager/nm-netlink-listener.c +src/dhcp-manager/nm-dhcp-manager.c +src/logging/nm-logging.c src/named-manager/nm-named-manager.c src/system-settings/nm-default-wired-connection.c system-settings/plugins/ifcfg-rh/reader.c diff --git a/po/as.po b/po/as.po index 55a17a7cbe..2f79166f07 100644 --- a/po/as.po +++ b/po/as.po @@ -3,301 +3,1558 @@ # Copyright (C) 2009 NetworkManager's COPYRIGHT HOLDER # This file is distributed under the same license as the NetworkManager package. # -# Amitakhya Phukan , 2009. +# Amitakhya Phukan , 2009, 2010. +# Amitakhya Phukan , 2010. msgid "" msgstr "" "Project-Id-Version: NetworkManager.po.master.as\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager&component=general\n" -"POT-Creation-Date: 2009-06-09 03:24+0000\n" -"PO-Revision-Date: 2009-06-10 17:20+0530\n" -"Last-Translator: Amitakhya Phukan \n" -"Language-Team: Assamese \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-05-06 14:31+0530\n" +"PO-Revision-Date: 2010-05-07 16:47+0530\n" +"Last-Translator: Amitakhya Phukan \n" +"Language-Team: American English \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 1.11.4\n" +"X-Generator: Lokalize 1.0\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" +#: ../cli/src/connections.c:59 ../cli/src/connections.c:74 +#: ../cli/src/devices.c:85 ../cli/src/devices.c:98 ../cli/src/devices.c:108 +#: ../cli/src/devices.c:118 ../cli/src/devices.c:131 ../cli/src/devices.c:142 +#: ../cli/src/devices.c:152 +msgid "NAME" +msgstr "নাম" + +#. 0 +#: ../cli/src/connections.c:60 ../cli/src/connections.c:75 +msgid "UUID" +msgstr "UUID" + +#. 1 +#: ../cli/src/connections.c:61 +msgid "DEVICES" +msgstr "যন্ত্ৰ" + +#. 2 +#: ../cli/src/connections.c:62 ../cli/src/connections.c:77 +msgid "SCOPE" +msgstr "স্ক'প" + +#. 3 +#: ../cli/src/connections.c:63 +msgid "DEFAULT" +msgstr "অবিকল্পিত" + +#. 4 +#: ../cli/src/connections.c:64 +msgid "DBUS-SERVICE" +msgstr "DBUS সেৱা" + +#. 5 +#: ../cli/src/connections.c:65 +msgid "SPEC-OBJECT" +msgstr "SPEC-OBJECT" + +#. 6 +#: ../cli/src/connections.c:66 +msgid "VPN" +msgstr "VPN" + +#. 1 +#. 0 +#. 1 +#: ../cli/src/connections.c:76 ../cli/src/devices.c:61 ../cli/src/devices.c:87 +msgid "TYPE" +msgstr "ধৰণ" + +#. 3 +#: ../cli/src/connections.c:78 +msgid "TIMESTAMP" +msgstr "সময়ৰ চাপ" + +#. 4 +#: ../cli/src/connections.c:79 +msgid "TIMESTAMP-REAL" +msgstr "সময়ৰ চাপ - ৰিয়েল" + +#. 5 +#: ../cli/src/connections.c:80 +msgid "AUTOCONNECT" +msgstr "স্বয়ংক্ৰিয় সংযোগ" + +#. 6 +#: ../cli/src/connections.c:81 +msgid "READONLY" +msgstr "অকল পঢ়িব পৰা" + +#: ../cli/src/connections.c:157 +#, c-format +msgid "" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" +msgstr "" +"ব্যৱহাৰপ্ৰণালী: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" + +#: ../cli/src/connections.c:197 ../cli/src/connections.c:536 +#, c-format +msgid "Error: 'con list': %s" +msgstr "ভুল: 'con list': %s" + +#: ../cli/src/connections.c:199 ../cli/src/connections.c:538 +#, c-format +msgid "Error: 'con list': %s; allowed fields: %s" +msgstr "ভুল: 'con list': %s; অনুমতি থকা ক্ষেত্ৰ: %s" + +#: ../cli/src/connections.c:207 +msgid "Connection details" +msgstr "সংযোগৰ বিৱণ" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "system" +msgstr "প্ৰণালী" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "user" +msgstr "ব্যৱহাৰকৰ্তা" + +#: ../cli/src/connections.c:383 +msgid "never" +msgstr "কেতিয়াও নহয়" + +#. "CAPABILITIES" +#. Print header +#. "WIFI-PROPERTIES" +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:544 ../cli/src/settings.c:643 +#: ../cli/src/settings.c:912 ../cli/src/settings.c:913 +#: ../cli/src/settings.c:915 ../cli/src/settings.c:917 +#: ../cli/src/settings.c:1042 ../cli/src/settings.c:1043 +#: ../cli/src/settings.c:1044 ../cli/src/settings.c:1123 +#: ../cli/src/settings.c:1124 ../cli/src/settings.c:1125 +#: ../cli/src/settings.c:1126 ../cli/src/settings.c:1127 +#: ../cli/src/settings.c:1128 ../cli/src/settings.c:1129 +#: ../cli/src/settings.c:1130 ../cli/src/settings.c:1131 +#: ../cli/src/settings.c:1132 ../cli/src/settings.c:1133 +#: ../cli/src/settings.c:1134 ../cli/src/settings.c:1135 +#: ../cli/src/settings.c:1210 +msgid "yes" +msgstr "হয়" + +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:506 ../cli/src/settings.c:544 +#: ../cli/src/settings.c:643 ../cli/src/settings.c:912 +#: ../cli/src/settings.c:913 ../cli/src/settings.c:915 +#: ../cli/src/settings.c:917 ../cli/src/settings.c:1042 +#: ../cli/src/settings.c:1043 ../cli/src/settings.c:1044 +#: ../cli/src/settings.c:1123 ../cli/src/settings.c:1124 +#: ../cli/src/settings.c:1125 ../cli/src/settings.c:1126 +#: ../cli/src/settings.c:1127 ../cli/src/settings.c:1128 +#: ../cli/src/settings.c:1129 ../cli/src/settings.c:1130 +#: ../cli/src/settings.c:1131 ../cli/src/settings.c:1132 +#: ../cli/src/settings.c:1133 ../cli/src/settings.c:1134 +#: ../cli/src/settings.c:1135 ../cli/src/settings.c:1210 +msgid "no" +msgstr "নহয়" + +#: ../cli/src/connections.c:457 ../cli/src/connections.c:500 +msgid "System connections" +msgstr "প্ৰণালীৰ সংযোগ" + +#: ../cli/src/connections.c:462 ../cli/src/connections.c:513 +msgid "User connections" +msgstr "ব্যৱহাৰকৰ্তাৰ সংযোগ" + +#: ../cli/src/connections.c:474 ../cli/src/connections.c:1334 +#: ../cli/src/connections.c:1350 ../cli/src/connections.c:1359 +#: ../cli/src/connections.c:1370 ../cli/src/connections.c:1452 +#: ../cli/src/devices.c:864 ../cli/src/devices.c:874 ../cli/src/devices.c:973 +#: ../cli/src/devices.c:980 +#, c-format +msgid "Error: %s argument is missing." +msgstr "ত্ৰুটি: %s তৰ্ক অনুপস্থিত ।" + +#: ../cli/src/connections.c:487 +#, c-format +msgid "Error: %s - no such connection." +msgstr "ত্ৰুটি: %s - এই ধৰণৰ কোনো সংযোগ নাই ।" + +#: ../cli/src/connections.c:519 ../cli/src/connections.c:1383 +#: ../cli/src/connections.c:1470 ../cli/src/devices.c:687 +#: ../cli/src/devices.c:754 ../cli/src/devices.c:888 ../cli/src/devices.c:986 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "অজ্ঞাত স্থিতিমাপ: %s\n" + +#: ../cli/src/connections.c:528 +#, c-format +msgid "Error: no valid parameter specified." +msgstr "ত্ৰুটি: বৈধ স্থিতিমাপ উল্লেখ কৰা নাযায় ।" + +#: ../cli/src/connections.c:543 ../cli/src/connections.c:1572 +#: ../cli/src/devices.c:1192 ../cli/src/network-manager.c:274 +#, c-format +msgid "Error: %s." +msgstr "ভুল: %s ।" + +#: ../cli/src/connections.c:649 +#, c-format +msgid "Error: 'con status': %s" +msgstr "ভুল: 'con status': %s" + +#: ../cli/src/connections.c:651 +#, c-format +msgid "Error: 'con status': %s; allowed fields: %s" +msgstr "ভুল: 'con status': %s; অনুমতি থকা ক্ষেত্ৰ: %s" + +#: ../cli/src/connections.c:658 +msgid "Active connections" +msgstr "সক্ৰিয় সংযোগ" + +#: ../cli/src/connections.c:1026 +#, c-format +msgid "no active connection on device '%s'" +msgstr "'%s' যন্ত্ৰত কোনো সক্ৰিয় সংযোগ নাই" + +#: ../cli/src/connections.c:1034 +#, c-format +msgid "no active connection or device" +msgstr "কোনো সক্ৰিয় সংযোগ বা যন্ত্ৰ নাই" + +#: ../cli/src/connections.c:1084 +#, c-format +msgid "device '%s' not compatible with connection '%s'" +msgstr "যন্ত্ৰ '%s' সংযোগ '%s' ৰ সৈতে সুসঙ্গত নহয়" + +#: ../cli/src/connections.c:1086 +#, c-format +msgid "no device found for connection '%s'" +msgstr "'%s' সংযোগৰ কাৰণে কোনো যন্ত্ৰ নাই" + +#: ../cli/src/connections.c:1097 +msgid "activating" +msgstr "সক্ৰিয় কৰা হৈছে" + +#: ../cli/src/connections.c:1099 +msgid "activated" +msgstr "সক্ৰিয় কৰা হৈছে" + +#: ../cli/src/connections.c:1102 ../cli/src/connections.c:1125 +#: ../cli/src/connections.c:1158 ../cli/src/devices.c:224 +#: ../cli/src/devices.c:514 ../cli/src/network-manager.c:92 +#: ../cli/src/network-manager.c:145 ../cli/src/settings.c:469 +msgid "unknown" +msgstr "অজ্ঞাত" + +#: ../cli/src/connections.c:1111 +msgid "VPN connecting (prepare)" +msgstr "VPN সংযোগ স্থাপন কৰা হৈছে (প্ৰস্তুতি)" + +#: ../cli/src/connections.c:1113 +msgid "VPN connecting (need authentication)" +msgstr "VPN সংযোগ স্থাপন কৰা হৈছে (অনুমোদন প্ৰয়োজন)" + +#: ../cli/src/connections.c:1115 +msgid "VPN connecting" +msgstr "VPN সংযোগ স্থাপন কৰা হৈছে" + +#: ../cli/src/connections.c:1117 +msgid "VPN connecting (getting IP configuration)" +msgstr "VPN সংযোগ স্থাপন কৰা হৈছে (IP বিন্যাস প্ৰাপ্ত কৰা হৈছে)" + +#: ../cli/src/connections.c:1119 +msgid "VPN connected" +msgstr "VPN সংযোগ স্থাপন কৰা হৈছে" + +#: ../cli/src/connections.c:1121 +msgid "VPN connection failed" +msgstr "VPN সংযোগ বিফল হৈছে" + +#: ../cli/src/connections.c:1123 +msgid "VPN disconnected" +msgstr "VPN সংযোগ বিচ্ছিন্ন কৰা হৈছে" + +#: ../cli/src/connections.c:1134 +msgid "unknown reason" +msgstr "অজ্ঞাত কাৰণ" + +#: ../cli/src/connections.c:1136 +msgid "none" +msgstr "শূণ্য" + +#: ../cli/src/connections.c:1138 +msgid "the user was disconnected" +msgstr "ব্যৱহাৰকৰ্তাৰ সৈতে সংযোগ বিচ্ছিন্ন কৰা হৈছে" + +#: ../cli/src/connections.c:1140 +msgid "the base network connection was interrupted" +msgstr "মূল নে'টৱৰ্ক সংযোগ বিঘ্নিত হৈছে" + +#: ../cli/src/connections.c:1142 +msgid "the VPN service stopped unexpectedly" +msgstr "অপ্ৰত্যাশিতভাবে VPN সেৱা বন্ধ কৰা হৈছে" + +#: ../cli/src/connections.c:1144 +msgid "the VPN service returned invalid configuration" +msgstr "VPN সেৱাৰ পৰা অবৈধ বিন্যাস পোৱা গৈছে" + +#: ../cli/src/connections.c:1146 +msgid "the connection attempt timed out" +msgstr "সংযোগৰ প্ৰয়াসত সময়সীমা উত্তীৰ্ণ হৈছে" + +#: ../cli/src/connections.c:1148 +msgid "the VPN service did not start in time" +msgstr "যথাযত সময়ত VPN সেৱা আৰম্ভ কৰা নহয়" + +#: ../cli/src/connections.c:1150 +msgid "the VPN service failed to start" +msgstr "VPN সেৱা আৰম্ভ কৰা নাযায়" + +#: ../cli/src/connections.c:1152 +msgid "no valid VPN secrets" +msgstr "VPN ৰ বৈধ গোপন তথ্য নাই" + +#: ../cli/src/connections.c:1154 +msgid "invalid VPN secrets" +msgstr "VPN ৰ অবৈধ গোপন তথ্য" + +#: ../cli/src/connections.c:1156 +msgid "the connection was removed" +msgstr "সংযোগ আঁতৰুৱা হৈছে" + +#: ../cli/src/connections.c:1170 +#, c-format +msgid "state: %s\n" +msgstr "অৱস্থা: %s\n" + +#: ../cli/src/connections.c:1173 ../cli/src/connections.c:1199 +#, c-format +msgid "Connection activated\n" +msgstr "সংযোগ সক্ৰিয় কৰা হৈছে\n" + +#: ../cli/src/connections.c:1176 +#, c-format +msgid "Error: Connection activation failed." +msgstr "ত্ৰুটি: সংযোগ সক্ৰিয় কৰিবলৈ ব্যৰ্থ ।" + +#: ../cli/src/connections.c:1195 +#, c-format +msgid "state: %s (%d)\n" +msgstr "অৱস্থা: %s (%d)\n" + +#: ../cli/src/connections.c:1205 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "ত্ৰুটি: সংযোগ সক্ৰিয় কৰিবলৈ ব্যৰ্থ: %s ।" + +#: ../cli/src/connections.c:1222 ../cli/src/devices.c:811 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "ত্ৰুটি: %d চেকেন্ডৰ সময়সীমা উত্তীৰ্ণ হৈছে ।" + +#: ../cli/src/connections.c:1265 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "ত্ৰুটি: সংযোগ সক্ৰিয় কৰিবলৈ ব্যৰ্থ: %s" + +#: ../cli/src/connections.c:1279 +#, c-format +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "ত্ৰুটি: '%s' ৰ বাবে সক্ৰিয় সংযোগ প্ৰাপ্ত কৰিবলৈ ব্যৰ্থ ।" + +#: ../cli/src/connections.c:1288 +#, c-format +msgid "Active connection state: %s\n" +msgstr "সক্ৰিয় সংযোগৰ অৱস্থা: %s\n" + +#: ../cli/src/connections.c:1289 +#, c-format +msgid "Active connection path: %s\n" +msgstr "সক্ৰিয় সংযোগৰ পথ: %s\n" + +#: ../cli/src/connections.c:1343 ../cli/src/connections.c:1461 +#, c-format +msgid "Error: Unknown connection: %s." +msgstr "ত্ৰুটি: অজ্ঞাত সংযোগ: %s." + +#: ../cli/src/connections.c:1378 ../cli/src/devices.c:882 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "ত্ৰুটি: '%s' সময়সীমাৰ মান বৈধ নহয় ।" + +#: ../cli/src/connections.c:1391 ../cli/src/connections.c:1478 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "ত্ৰুটি: id বা uuid নিৰ্ধাৰণ কৰা আৱশ্যক ।" + +#: ../cli/src/connections.c:1411 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "ত্ৰুটি: প্ৰযোজ্য কোনো যন্ত্ৰ পোৱা নাযায়: %s." + +#: ../cli/src/connections.c:1413 +#, c-format +msgid "Error: No suitable device found." +msgstr "ত্ৰুটি: কোনো প্ৰযোজ্য যন্ত্ৰ পোৱা নাযায় ।" + +#: ../cli/src/connections.c:1505 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "সতৰ্কবাৰ্তা: সংযোগ সক্ৰিয় নহয়\n" + +#: ../cli/src/connections.c:1561 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "ত্ৰুটি: 'con' আদেশ '%s', বৈধ নহয় ।" + +#: ../cli/src/connections.c:1597 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "ত্ৰুটি: D-Bus ৰ সৈতে সংযোগ কৰিবলৈ ব্যৰ্থ ।" + +#: ../cli/src/connections.c:1604 +#, c-format +msgid "Error: Could not get system settings." +msgstr "ত্ৰুটি: প্ৰণালীৰ বৈশিষ্ট্য প্ৰাপ্ত কৰিবলৈ ব্যৰ্থ ।" + +#: ../cli/src/connections.c:1612 +#, c-format +msgid "Error: Could not get user settings." +msgstr "ত্ৰুটি: ব্যৱহাৰকৰ্তাৰ বৈশিষ্ট্য প্ৰাপ্ত কৰিবলৈ ব্যৰ্থ" + +#: ../cli/src/connections.c:1622 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "ত্ৰুটি: সংযোগ প্ৰাপ্ত কৰিবলৈ ব্যৰ্থ: বৈশিষ্ট্যৰ সেৱা বৰ্তমানে নাই চলা ।" + +#. 0 +#. 9 +#: ../cli/src/devices.c:60 ../cli/src/devices.c:86 ../cli/src/devices.c:162 +msgid "DEVICE" +msgstr "যন্ত্ৰ" + +#. 1 +#. 4 +#. 0 +#: ../cli/src/devices.c:62 ../cli/src/devices.c:90 +#: ../cli/src/network-manager.c:36 +msgid "STATE" +msgstr "অৱস্থা" + +#: ../cli/src/devices.c:71 +msgid "GENERAL" +msgstr "সাধাৰণ" + +#. 0 +#: ../cli/src/devices.c:72 +msgid "CAPABILITIES" +msgstr "কৰ্মক্ষমতা" + +#. 1 +#: ../cli/src/devices.c:73 +msgid "WIFI-PROPERTIES" +msgstr "ৱাইফাই গুণ" + +#. 2 +#: ../cli/src/devices.c:74 +msgid "AP" +msgstr "AP" + +#. 3 +#: ../cli/src/devices.c:75 +msgid "WIRED-PROPERTIES" +msgstr "তাঁৰযুক্ত সংযোগৰ বৈশিষ্ট্য" + +#. 4 +#: ../cli/src/devices.c:76 +msgid "IP4-SETTINGS" +msgstr "IP4 পছন্দসমূহ" + +#. 5 +#: ../cli/src/devices.c:77 +msgid "IP4-DNS" +msgstr "IP4-DNS" + +#. 2 +#: ../cli/src/devices.c:88 +msgid "DRIVER" +msgstr "চালক" + +#. 3 +#: ../cli/src/devices.c:89 +msgid "HWADDR" +msgstr "HWADDR" + +#. 0 +#: ../cli/src/devices.c:99 +msgid "CARRIER-DETECT" +msgstr "পৰিবহণকৰ্তা চিনাক্তকৰণ" + +#. 1 +#: ../cli/src/devices.c:100 +msgid "SPEED" +msgstr "গতি" + +#. 0 +#: ../cli/src/devices.c:109 +msgid "CARRIER" +msgstr "পৰিবহণকৰ্তা" + +#. 0 +#: ../cli/src/devices.c:119 +msgid "WEP" +msgstr "WEP" + +#. 1 +#: ../cli/src/devices.c:120 +msgid "WPA" +msgstr "WPA" + +#. 2 +#: ../cli/src/devices.c:121 +msgid "WPA2" +msgstr "WPA2" + +#. 3 +#: ../cli/src/devices.c:122 +msgid "TKIP" +msgstr "TKIP" + +#. 4 +#: ../cli/src/devices.c:123 +msgid "CCMP" +msgstr "CCMP" + +#. 0 +#: ../cli/src/devices.c:132 +msgid "ADDRESS" +msgstr "ঠিকনা" + +#. 1 +#: ../cli/src/devices.c:133 +msgid "PREFIX" +msgstr "উপসৰ্গ" + +#. 2 +#: ../cli/src/devices.c:134 +msgid "GATEWAY" +msgstr "গে'টৱে" + +#. 0 +#: ../cli/src/devices.c:143 +msgid "DNS" +msgstr "DNS" + +#. 0 +#: ../cli/src/devices.c:153 +msgid "SSID" +msgstr "SSID" + +#. 1 +#: ../cli/src/devices.c:154 +msgid "BSSID" +msgstr "BSSID" + +#. 2 +#: ../cli/src/devices.c:155 +msgid "MODE" +msgstr "মোড" + +#. 3 +#: ../cli/src/devices.c:156 +msgid "FREQ" +msgstr "FREQ" + +#. 4 +#: ../cli/src/devices.c:157 +msgid "RATE" +msgstr "হাৰ" + +#. 5 +#: ../cli/src/devices.c:158 +msgid "SIGNAL" +msgstr "চিগ্নেল" + +#. 6 +#: ../cli/src/devices.c:159 +msgid "SECURITY" +msgstr "সুৰক্ষা" + +#. 7 +#: ../cli/src/devices.c:160 +msgid "WPA-FLAGS" +msgstr "WPA-FLAGS" + +#. 8 +#: ../cli/src/devices.c:161 +msgid "RSN-FLAGS" +msgstr "RSN-FLAGS" + +#. 10 +#: ../cli/src/devices.c:163 +msgid "ACTIVE" +msgstr "সক্ৰিয়" + +#: ../cli/src/devices.c:186 +#, c-format +msgid "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +"\n" +msgstr "" +"ব্যৱহাৰপ্ৰণালী: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +"\n" + +#: ../cli/src/devices.c:206 +msgid "unmanaged" +msgstr "পৰিচালিত নহয়" + +#: ../cli/src/devices.c:208 +msgid "unavailable" +msgstr "উপলব্ধ নহয়" + +#: ../cli/src/devices.c:210 ../cli/src/network-manager.c:89 +msgid "disconnected" +msgstr "বিচ্ছিন্ন" + +#: ../cli/src/devices.c:212 +msgid "connecting (prepare)" +msgstr "সংযোগ কৰা হৈছে (প্ৰস্তুতি)" + +#: ../cli/src/devices.c:214 +msgid "connecting (configuring)" +msgstr "সংযোগ কৰা হৈছে (বিন্যাস কৰা হৈছে)" + +#: ../cli/src/devices.c:216 +msgid "connecting (need authentication)" +msgstr "সংযোগ কৰা হৈছে (অনুমোদন প্ৰয়োজন)" + +#: ../cli/src/devices.c:218 +msgid "connecting (getting IP configuration)" +msgstr "সংযোগ কৰা হৈছে (IP বিন্যাস প্ৰাপ্ত কৰা হৈছে)" + +#: ../cli/src/devices.c:220 ../cli/src/network-manager.c:87 +msgid "connected" +msgstr "সংযোগ স্থাপিত" + +#: ../cli/src/devices.c:222 +msgid "connection failed" +msgstr "সংযোগ বিফল" + +#: ../cli/src/devices.c:245 ../cli/src/devices.c:380 +msgid "Unknown" +msgstr "অজ্ঞাত" + +#: ../cli/src/devices.c:277 +msgid "(none)" +msgstr "(শূণ্য)" + +#: ../cli/src/devices.c:302 +#, c-format +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s: IP4 ঠিকনা 0x%X ৰূপান্তৰ কৰিবলৈ ত্ৰুটি" + +#: ../cli/src/devices.c:349 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" + +#: ../cli/src/devices.c:350 +#, c-format +msgid "%u MB/s" +msgstr "%u MB/s" + +#: ../cli/src/devices.c:359 +msgid "Encrypted: " +msgstr "এনক্ৰিপ্ট কৰা:" + +#: ../cli/src/devices.c:364 +msgid "WEP " +msgstr "WEP " + +#: ../cli/src/devices.c:366 +msgid "WPA " +msgstr "WPA " + +#: ../cli/src/devices.c:368 +msgid "WPA2 " +msgstr "WPA2 " + +#: ../cli/src/devices.c:371 +msgid "Enterprise " +msgstr "এন্টাৰপ্ৰাইজ" + +#: ../cli/src/devices.c:380 +msgid "Ad-Hoc" +msgstr "এড-হক" + +#: ../cli/src/devices.c:380 +msgid "Infrastructure" +msgstr "অৱগাঁথনি" + +#: ../cli/src/devices.c:442 +#, c-format +msgid "Error: 'dev list': %s" +msgstr "ভুল: 'dev list': %s" + +#: ../cli/src/devices.c:444 +#, c-format +msgid "Error: 'dev list': %s; allowed fields: %s" +msgstr "ভুল: 'dev list': %s; অনুমতি থকা ক্ষেত্ৰ: %s" + +#: ../cli/src/devices.c:453 +msgid "Device details" +msgstr "যন্ত্ৰৰ বিৱৰণ" + +#: ../cli/src/devices.c:483 ../cli/src/devices.c:827 +msgid "(unknown)" +msgstr "(অজ্ঞাত)" + +#: ../cli/src/devices.c:484 +msgid "unknown)" +msgstr "অজ্ঞাত)" + +#: ../cli/src/devices.c:510 +#, c-format +msgid "%u Mb/s" +msgstr "%u Mb/s" + +#. Print header +#. "WIRED-PROPERTIES" +#: ../cli/src/devices.c:583 +msgid "on" +msgstr "চলি আছে" + +#: ../cli/src/devices.c:583 +msgid "off" +msgstr "বন্ধ" + +#: ../cli/src/devices.c:710 +#, c-format +msgid "Error: 'dev status': %s" +msgstr "ভুল: 'dev status': %s" + +#: ../cli/src/devices.c:712 +#, c-format +msgid "Error: 'dev status': %s; allowed fields: %s" +msgstr "ভুল: 'dev status': %s; অনুমতি থকা ক্ষেত্ৰ: %s" + +#: ../cli/src/devices.c:719 +msgid "Status of devices" +msgstr "যন্ত্ৰৰ অৱস্থা" + +#: ../cli/src/devices.c:747 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "ত্ৰুটি: '%s' তৰ্ক অনুপস্থিত ।" + +#: ../cli/src/devices.c:776 ../cli/src/devices.c:915 ../cli/src/devices.c:1035 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "ত্ৰুটি: '%s' যন্ত্ৰ পোৱা নাযায় ।" + +#: ../cli/src/devices.c:799 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "সফলতা: '%s' যন্ত্ৰ সফলতাৰে সংযোগ বিচ্ছিন্ন কৰা হৈছে ।" + +#: ../cli/src/devices.c:824 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "ত্ৰুটি: '%s' (%s) যন্ত্ৰৰ সৈতে সংযোগ বিচ্ছিন্ন কৰিবলৈ ব্যৰ্থ: %s" + +#: ../cli/src/devices.c:832 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "যন্ত্ৰৰ অৱস্থা: %d (%s)\n" + +#: ../cli/src/devices.c:896 +#, c-format +msgid "Error: iface has to be specified." +msgstr "ত্ৰুটি: iface নিৰ্ধাৰণ কৰা আৱশ্যক ।" + +#: ../cli/src/devices.c:1011 +#, c-format +msgid "Error: 'dev wifi': %s" +msgstr "ভুল: 'dev wifi': %s" + +#: ../cli/src/devices.c:1013 +#, c-format +msgid "Error: 'dev wifi': %s; allowed fields: %s" +msgstr "ভুল: 'dev wifi': %s; অনুমতি থকা ক্ষেত্ৰ: %s" + +#: ../cli/src/devices.c:1020 +msgid "WiFi scan list" +msgstr "ৱাই-ফাই স্কেনৰ তালিকা" + +#: ../cli/src/devices.c:1055 ../cli/src/devices.c:1109 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "ত্ৰুটি: hwaddr '%s' সহ এক্সেচ পইন্ট পোৱা নাযায় ।" + +#: ../cli/src/devices.c:1072 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "ত্ৰুটি: '%s' যন্ত্ৰ ৱাই-ফাই যন্ত্ৰ নহয় ।" + +#: ../cli/src/devices.c:1136 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "ত্ৰুটি: 'dev wifi' আদেশ '%s' বৈধ নহয় ।" + +#: ../cli/src/devices.c:1183 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "ত্ৰুটি: 'dev' আদেশ '%s' বৈধ নহয় ।" + +#: ../cli/src/network-manager.c:35 +msgid "RUNNING" +msgstr "চলমান" + +#. 1 +#: ../cli/src/network-manager.c:37 +msgid "WIFI-HARDWARE" +msgstr "ৱাইফাই যান্ত্ৰিক সামগ্ৰী" + +#. 2 +#: ../cli/src/network-manager.c:38 +msgid "WIFI" +msgstr "ৱাইফাই" + +#. 3 +#: ../cli/src/network-manager.c:39 +msgid "WWAN-HARDWARE" +msgstr "WWAN যান্ত্ৰিক সামগ্ৰী" + +#. 4 +#: ../cli/src/network-manager.c:40 +msgid "WWAN" +msgstr "WWAN" + +#: ../cli/src/network-manager.c:62 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" +msgstr "" +"ব্যৱহাৰপ্ৰণালী: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + +#: ../cli/src/network-manager.c:83 +msgid "asleep" +msgstr "নিদ্ৰিত" + +#: ../cli/src/network-manager.c:85 +msgid "connecting" +msgstr "সংযোগ কৰা হৈছে" + +#: ../cli/src/network-manager.c:125 +#, c-format +msgid "Error: 'nm status': %s" +msgstr "ভুল: 'nm status': %s" + +#: ../cli/src/network-manager.c:127 +#, c-format +msgid "Error: 'nm status': %s; allowed fields: %s" +msgstr "ভুল: 'nm status': %s; অনুমতি থকা ক্ষেত্ৰ: %s" + +#: ../cli/src/network-manager.c:134 +msgid "NetworkManager status" +msgstr "NetworkManager ৰ অৱস্থা" + +#. Print header +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "enabled" +msgstr "সক্ৰিয়" + +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "disabled" +msgstr "নিষ্ক্ৰিয়" + +#: ../cli/src/network-manager.c:148 +msgid "running" +msgstr "চলি আছে" + +#: ../cli/src/network-manager.c:148 +msgid "not running" +msgstr "চলা নাই" + +#: ../cli/src/network-manager.c:201 ../cli/src/network-manager.c:233 +#, c-format +msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s" +msgstr "ভুল : '--fields' ৰ মান '%s' ইয়াত বৈধ নহয়; অনুমতি থকা ক্ষেত্ৰ: %s" + +#: ../cli/src/network-manager.c:209 +msgid "WiFi enabled" +msgstr "ৱাইফাই সক্ৰিয়" + +#: ../cli/src/network-manager.c:220 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "ত্ৰুটিৰ: অবৈধ 'wifi' স্থিতিমাপ: '%s' ।" + +#: ../cli/src/network-manager.c:241 +msgid "WWAN enabled" +msgstr "WWAN সক্ৰিয়" + +#: ../cli/src/network-manager.c:252 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "ত্ৰুটি: অবৈধ 'wwan' স্থিতিমাপ: '%s' ।" + +#: ../cli/src/network-manager.c:263 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "ত্ৰুটি: 'nm' আদেশ '%s' বৈধ নহয় ।" + +#: ../cli/src/nmcli.c:69 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -m[ode] tabular|multiline output mode\n" +" -f[ields] |all|common specify fields to output\n" +" -e[scape] yes|no escape columns separators in " +"values\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"ব্যৱহাৰপদ্ধতি: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -m[ode] tabular|multiline output mode\n" +" -f[ields] |all|common specify fields to output\n" +" -e[scape] yes|no escape columns separators in " +"values\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" + +#: ../cli/src/nmcli.c:113 +#, c-format +msgid "Error: Object '%s' is unknown, try 'nmcli help'." +msgstr "ভুল: '%s' অব্জেক্ট অজ্ঞাত, 'nmcli help' ব্যৱহাৰৰ প্ৰচেষ্টা কৰক ।" + +#: ../cli/src/nmcli.c:143 +#, c-format +msgid "Error: Option '--terse' is specified the second time." +msgstr "ভুল: '--terse' বিকল্পক দ্বিতীয় বাৰৰ বাবে নিৰ্ধাৰিত কৰা হৈছে ।" + +#: ../cli/src/nmcli.c:148 +#, c-format +msgid "Error: Option '--terse' is mutually exclusive with '--pretty'." +msgstr "ভুল: '--terse' বিকল্প '--pretty' ৰ সৈতে আছুতীয়া ।" + +#: ../cli/src/nmcli.c:156 +#, c-format +msgid "Error: Option '--pretty' is specified the second time." +msgstr "ভুল: '--pretty' বিকল্পক দ্বিতীয় বাৰৰ বাবে নিৰ্ধাৰিত কৰা হৈছে ।" + +#: ../cli/src/nmcli.c:161 +#, c-format +msgid "Error: Option '--pretty' is mutually exclusive with '--terse'." +msgstr "ভুল: '--pretty' বিকল্প '--terse' ৰ সৈতে আছুতীয়া ।" + +#: ../cli/src/nmcli.c:171 ../cli/src/nmcli.c:187 +#, c-format +msgid "Error: missing argument for '%s' option." +msgstr "ত্ৰুটি: '%s' বিকল্পৰ বাবে তৰ্ক নাই ।" + +#: ../cli/src/nmcli.c:180 ../cli/src/nmcli.c:196 +#, c-format +msgid "Error: '%s' is not valid argument for '%s' option." +msgstr "ত্ৰুটি: '%s' বিকল্প '%s' ৰ কাৰণে বৈধ তৰ্ক নহয় ।" + +#: ../cli/src/nmcli.c:203 +#, c-format +msgid "Error: fields for '%s' options are missing." +msgstr "ত্ৰুটি: '%s' বিকল্পমূহৰ কাৰণে ক্ষেত্ৰ নাই ।" + +#: ../cli/src/nmcli.c:209 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "nmcli সৰঞ্জাম, সংস্কৰণ %s\n" + +#: ../cli/src/nmcli.c:215 +#, c-format +msgid "Error: Option '%s' is unknown, try 'nmcli -help'." +msgstr "ভুল: '%s' বিকল্প অজ্ঞাত, 'nmcli -help' ব্যৱহাৰৰ প্ৰয়োগ কৰক ।" + +#: ../cli/src/nmcli.c:234 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "%d সংকেত প্ৰাপ্ত হৈছে, বন্ধ কৰা হৈছে..." + +#: ../cli/src/nmcli.c:259 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "ত্ৰুটি: NetworkManager ৰ সৈতে সংযোগ স্থাপন কৰিবলৈ ব্যৰ্থ ।" + +#: ../cli/src/nmcli.c:275 +msgid "Success" +msgstr "সফল" + +#: ../cli/src/settings.c:407 +#, c-format +msgid "%d (hex-ascii-key)" +msgstr "%d (hex-ascii-key)" + +#: ../cli/src/settings.c:409 +#, c-format +msgid "%d (104/128-bit passphrase)" +msgstr "%d (১০৪/১২৮-বিট গুপ্তশব্দ)" + +#: ../cli/src/settings.c:412 +#, c-format +msgid "%d (unknown)" +msgstr "%d (অজ্ঞাত)" + +#: ../cli/src/settings.c:438 +msgid "0 (unknown)" +msgstr "0 (অজ্ঞাত)" + +#: ../cli/src/settings.c:444 +msgid "any, " +msgstr "যি কোনো, " + +#: ../cli/src/settings.c:446 +msgid "900 MHz, " +msgstr "900 MHz, " + +#: ../cli/src/settings.c:448 +msgid "1800 MHz, " +msgstr "1800 MHz, " + +#: ../cli/src/settings.c:450 +msgid "1900 MHz, " +msgstr "1900 MHz, " + +#: ../cli/src/settings.c:452 +msgid "850 MHz, " +msgstr "850 MHz, " + +#: ../cli/src/settings.c:454 +msgid "WCDMA 3GPP UMTS 2100 MHz, " +msgstr "WCDMA 3GPP UMTS 2100 MHz, " + +#: ../cli/src/settings.c:456 +msgid "WCDMA 3GPP UMTS 1800 MHz, " +msgstr "WCDMA 3GPP UMTS 1800 MHz, " + +#: ../cli/src/settings.c:458 +msgid "WCDMA 3GPP UMTS 1700/2100 MHz, " +msgstr "WCDMA 3GPP UMTS 1700/2100 MHz, " + +#: ../cli/src/settings.c:460 +msgid "WCDMA 3GPP UMTS 800 MHz, " +msgstr "WCDMA 3GPP UMTS 800 MHz, " + +#: ../cli/src/settings.c:462 +msgid "WCDMA 3GPP UMTS 850 MHz, " +msgstr "WCDMA 3GPP UMTS 850 MHz, " + +#: ../cli/src/settings.c:464 +msgid "WCDMA 3GPP UMTS 900 MHz, " +msgstr "WCDMA 3GPP UMTS 900 MHz, " + +#: ../cli/src/settings.c:466 +msgid "WCDMA 3GPP UMTS 1700 MHz, " +msgstr "WCDMA 3GPP UMTS 1700 MHz, " + +#: ../cli/src/settings.c:546 ../cli/src/settings.c:708 +msgid "auto" +msgstr "স্বয়ংক্ৰিয়" + +#: ../cli/src/settings.c:704 ../cli/src/settings.c:707 ../cli/src/utils.c:172 +msgid "not set" +msgstr "নিৰ্ধাৰত কৰা হোৱা নাই" + +#: ../cli/src/utils.c:124 +#, c-format +msgid "field '%s' has to be alone" +msgstr "'%s' ক্ষেত্ৰ অকলে থাকিব লাগিব" + +#: ../cli/src/utils.c:127 +#, c-format +msgid "invalid field '%s'" +msgstr "অবৈধ ক্ষেত্ৰ '%s'" + +#: ../cli/src/utils.c:146 +#, c-format +msgid "Option '--terse' requires specifying '--fields'" +msgstr "'--terse' বিকল্পক '--fields' নিৰ্ধাৰণ কৰাৰ প্ৰয়োজন" + +#: ../cli/src/utils.c:150 +#, c-format +msgid "Option '--terse' requires specific '--fields' option values , not '%s'" +msgstr "'--terse' বিকল্পক নিৰ্দিষ্ট '--fields' বিকল্পৰ মানৰ প্ৰয়োজন, '%s' নহয়" + #: ../libnm-util/crypto.c:120 #, c-format msgid "PEM key file had no end tag '%s'." -msgstr "PEM চাবি নথিপত্ৰৰ কোনো সমাপ্তিৰ টেগ উপস্থিত নাই '%s' ।" +msgstr "PEM চাবি নথিপত্ৰৰ কোনো সমাপ্তিৰ টেগ নাই '%s' ।" #: ../libnm-util/crypto.c:130 #, c-format msgid "Doesn't look like a PEM private key file." -msgstr "এটা PEM গোপনীয় চাবি নথিপত্ৰ নহয় ।" +msgstr "এটা PEM গোপনীয় চাবি নথিপত্ৰ নহয় ।" #: ../libnm-util/crypto.c:138 #, c-format msgid "Not enough memory to store PEM file data." -msgstr "PEM নথিপত্ৰৰ তথ্যে সংৰক্ষণৰ বাবে পৰ্যাপ্ত স্মৃতিশক্তি অনুপস্থিত ।" +msgstr "PEM নথিপত্ৰৰ তথ্যে সংৰক্ষণৰ বাবে পৰ্যাপ্ত স্মৃতিশক্তি অনুপস্থিত ।" #: ../libnm-util/crypto.c:154 #, c-format msgid "Malformed PEM file: Proc-Type was not first tag." -msgstr "ভুল PEM নথিপত্ৰ: প্ৰথম টেগ ৰূপে Proc-Type ব্যৱহাৰ কৰা নহয় ।" +msgstr "ভুল PEM নথিপত্ৰ: প্ৰথম টেগ ৰূপে Proc-Type ব্যৱহাৰ কৰা নহয় ।" #: ../libnm-util/crypto.c:162 #, c-format msgid "Malformed PEM file: unknown Proc-Type tag '%s'." -msgstr "ভুল PEM নথিপত্ৰ: অজ্ঞাত Proc-Type টেগ '%s' ।" +msgstr "ভুল PEM নথিপত্ৰ: অজ্ঞাত Proc-Type টেগ '%s' ।" #: ../libnm-util/crypto.c:172 #, c-format msgid "Malformed PEM file: DEK-Info was not the second tag." -msgstr "ভুল PEM নথিপত্ৰ: দ্বিতীয় টেগ ৰূপে DEK-Info ধাৰ্য কৰা নহয় ।" +msgstr "ভুল PEM নথিপত্ৰ: দ্বিতীয় টেগ ৰূপে DEK-Info ধাৰ্য কৰা নহয় ।" #: ../libnm-util/crypto.c:183 #, c-format msgid "Malformed PEM file: no IV found in DEK-Info tag." -msgstr "ভুল PEM নথিপত্ৰ: DEK-Info টেগত কোনো IV পোৱা নাযায় ।" +msgstr "ভুল PEM নথিপত্ৰ: DEK-Info টেগত কোনো IV পোৱা নাযায় ।" #: ../libnm-util/crypto.c:190 #, c-format msgid "Malformed PEM file: invalid format of IV in DEK-Info tag." -msgstr "ভুল PEM নথিপত্ৰ: DEK-Info টেগত IV-ৰ বিন্যাস বৈধ নহয় ।" +msgstr "ভুল PEM নথিপত্ৰ: DEK-Info টেগত IV ৰ বিন্যাস বৈধ নহয় ।" #: ../libnm-util/crypto.c:203 #, c-format msgid "Malformed PEM file: unknown private key cipher '%s'." -msgstr "ভুল PEM নথিপত্ৰ: ব্যক্তিগত-চাবিৰ অজ্ঞাত ছাইফাৰ '%s' ।" +msgstr "ভুল PEM নথিপত্ৰ: ব্যক্তিগত-চাবিৰ অজ্ঞাত ছাইফাৰ '%s' ।" #: ../libnm-util/crypto.c:222 #, c-format msgid "Could not decode private key." -msgstr "ব্যক্তিগত চাবি ডিকোড কৰিবলৈ ব্যৰ্থ ।" +msgstr "ব্যক্তিগত চাবি ডিকোড কৰিবলৈ ব্যৰ্থ ।" #: ../libnm-util/crypto.c:267 #, c-format msgid "PEM certificate '%s' had no end tag '%s'." -msgstr "'%s' PEM প্ৰমাণপত্ৰত সমাপ্তিৰ টেগ '%s' উপস্থিত নাই ।" +msgstr "'%s' PEM প্ৰমাণপত্ৰত সমাপ্তিৰ টেগ '%s' নাই ।" #: ../libnm-util/crypto.c:277 #, c-format msgid "Failed to decode certificate." -msgstr "প্ৰমাণপত্ৰ ডিকোড কৰিবলৈ ব্যৰ্থ ।" +msgstr "প্ৰমাণপত্ৰ ডিকোড কৰিবলৈ ব্যৰ্থ ।" #: ../libnm-util/crypto.c:286 #, c-format msgid "Not enough memory to store certificate data." -msgstr "প্ৰমাণপত্ৰৰ তথ্য সংৰক্ষণৰ উদ্দেশ্যে পৰ্যাপ্ত স্মৃতিশক্তি অনুপস্থিত ।" +msgstr "প্ৰমাণপত্ৰৰ তথ্য সংৰক্ষণৰ উদ্দেশ্যে পৰ্যাপ্ত স্মৃতিশক্তি অনুপস্থিত ।" #: ../libnm-util/crypto.c:294 #, c-format msgid "Not enough memory to store file data." -msgstr "নথিপত্ৰৰ তথ্য সংৰক্ষণৰ উদ্দেশ্যে পৰ্যাপ্ত স্মৃতিশক্তি অনুপস্থিত ।" +msgstr "নথিপত্ৰৰ তথ্য সংৰক্ষণৰ উদ্দেশ্যে পৰ্যাপ্ত স্মৃতিশক্তি অনুপস্থিত ।" #: ../libnm-util/crypto.c:324 #, c-format msgid "IV must be an even number of bytes in length." -msgstr "IV-ৰ দৈৰ্ঘ্যৰ পৰিমাণ যুগ্ম সংখ্যক বাইটৰ হোৱা আৱশ্যক ।" +msgstr "IV ৰ দৈৰ্ঘ্যৰ পৰিমাণ যুগ্ম সংখ্যক বাইটৰ হোৱা আৱশ্যক ।" #: ../libnm-util/crypto.c:333 #, c-format msgid "Not enough memory to store the IV." -msgstr "IV সংৰক্ষণৰ বাবে পৰ্যাপ্ত স্মৃতিশক্তি অনুপস্থিত ।" +msgstr "IV সংৰক্ষণৰ বাবে পৰ্যাপ্ত স্মৃতিশক্তি অনুপস্থিত ।" #: ../libnm-util/crypto.c:344 #, c-format msgid "IV contains non-hexadecimal digits." -msgstr "IV-ত hexadecimal-নোহোৱা অন্য সংখ্যা উপস্থিত ।" +msgstr "IV-ত hexadecimal-নোহোৱা অন্য সংখ্যা উপস্থিত ।" -#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:143 -#: ../libnm-util/crypto_nss.c:169 +#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:336 #, c-format msgid "Private key cipher '%s' was unknown." -msgstr "ব্যক্তিগত চাবিৰ ছাইফাৰ '%s' অজ্ঞাত ।" +msgstr "ব্যক্তিগত চাবিৰ ছাইফাৰ '%s' অজ্ঞাত ।" #: ../libnm-util/crypto.c:391 #, c-format msgid "Not enough memory to decrypt private key." -msgstr "ব্যক্তিগত চাবি ডিক্ৰিপ্ট কৰাৰ বাবে পৰ্যাপ্ত স্মৃতিশক্তি অনুপস্থিত ।" +msgstr "ব্যক্তিগত চাবি ডিক্ৰিপ্ট কৰাৰ বাবে পৰ্যাপ্ত স্মৃতিশক্তি অনুপস্থিত ।" #: ../libnm-util/crypto.c:511 #, c-format msgid "Unable to determine private key type." -msgstr "ব্যক্তিগত চাবিৰ ধৰন নিৰ্ধাৰণ কৰিবলৈ ব্যৰ্থ ।" +msgstr "ব্যক্তিগত চাবিৰ ধৰণ নিৰ্ধাৰণ কৰিবলৈ ব্যৰ্থ ।" #: ../libnm-util/crypto.c:530 #, c-format msgid "Not enough memory to store decrypted private key." -msgstr "ডিক্ৰিপ্ট কৰা ব্যক্তিগত চাবি সংৰক্ষণৰ বাবে পৰ্যাপ্ত স্মৃতিশক্তি অনুপস্থিত ।" +msgstr "ডিক্ৰিপ্ট কৰা ব্যক্তিগত চাবি সংৰক্ষণৰ বাবে পৰ্যাপ্ত স্মৃতিশক্তি অনুপস্থিত ।" -#: ../libnm-util/crypto_gnutls.c:46 +#: ../libnm-util/crypto_gnutls.c:49 msgid "Failed to initialize the crypto engine." -msgstr "ক্ৰিপ্টো কলঘৰ আৰম্ভ কৰিবলৈ ব্যৰ্থ ।" +msgstr "ক্ৰিপ্টো কলঘৰ আৰম্ভ কৰিবলৈ ব্যৰ্থ ।" -#: ../libnm-util/crypto_gnutls.c:90 +#: ../libnm-util/crypto_gnutls.c:93 #, c-format msgid "Failed to initialize the MD5 engine: %s / %s." -msgstr "MD5 কলঘৰ আৰম্ভ কৰিবলৈ ব্যৰ্থ: %s / %s ।" +msgstr "MD5 কলঘৰ আৰম্ভ কৰিবলৈ ব্যৰ্থ: %s / %s ।" -#: ../libnm-util/crypto_gnutls.c:152 ../libnm-util/crypto_nss.c:178 +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "IV ৰ অবৈধ দৈৰ্ঘ্য (অন্তত %zd হোৱা আৱশ্যক) ।" + +#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188 #, c-format msgid "Not enough memory for decrypted key buffer." -msgstr "ডিক্ৰিপ্ট কৰা কি-বাফাৰৰ বাবে পৰ্যাপ্ত স্মৃতিশক্তি অনুপস্থিত ।" +msgstr "ডিক্ৰিপ্ট কৰা চাবিৰ বাফাৰ বাবে পৰ্যাপ্ত স্মৃতিশক্তি অনুপস্থিত ।" -#: ../libnm-util/crypto_gnutls.c:160 +#: ../libnm-util/crypto_gnutls.c:173 #, c-format msgid "Failed to initialize the decryption cipher context: %s / %s." -msgstr "ডিক্ৰিপছন ছাইফাৰৰ সন্দৰ্ভ আৰম্ভ কৰিবলৈ ব্যৰ্থ: %s / %s ।" +msgstr "ডিক্ৰিপছন ছাইফাৰৰ সন্দৰ্ভ আৰম্ভ কৰিবলৈ ব্যৰ্থ: %s / %s ।" -#: ../libnm-util/crypto_gnutls.c:169 +#: ../libnm-util/crypto_gnutls.c:182 #, c-format msgid "Failed to set symmetric key for decryption: %s / %s." -msgstr "ডিক্ৰিপছনৰ বাবে চিমেট্ৰিক চাবি নিৰ্ধাৰণ কৰিবলৈ ব্যৰ্থ: %s / %s ।" +msgstr "ডিক্ৰিপছনৰ বাবে চিমেট্ৰিক চাবি নিৰ্ধাৰণ কৰিবলৈ ব্যৰ্থ: %s / %s ।" -#: ../libnm-util/crypto_gnutls.c:178 +#: ../libnm-util/crypto_gnutls.c:191 #, c-format msgid "Failed to set IV for decryption: %s / %s." -msgstr "ডিক্ৰিপছনৰ উদ্দেশ্যে IV নিৰ্ধাৰণ কৰিবলৈ ব্যৰ্থ: %s / %s ।" - -#: ../libnm-util/crypto_gnutls.c:187 -#, c-format -msgid "Failed to decrypt the private key: %s / %s." -msgstr "ব্যক্তিগত চাবি ডিক্ৰিপ্ট কৰিবলৈ ব্যৰ্থ: %s / %s ।" +msgstr "ডিক্ৰিপছনৰ উদ্দেশ্যে IV নিৰ্ধাৰণ কৰিবলৈ ব্যৰ্থ: %s / %s ।" #: ../libnm-util/crypto_gnutls.c:200 #, c-format -msgid "Failed to decrypt the private key." -msgstr "ব্যক্তিগত চাবি ডিক্ৰিপ্ট কৰিবলৈ ব্যৰ্থ ।" +msgid "Failed to decrypt the private key: %s / %s." +msgstr "ব্যক্তিগত চাবি ডিক্ৰিপ্ট কৰিবলৈ ব্যৰ্থ: %s / %s ।" -#: ../libnm-util/crypto_gnutls.c:235 +#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 +#, c-format +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "ব্যক্তিগত চাবি ডিক্ৰিপ্ট কৰিবলৈ ব্যৰ্থ: পেডিংৰ দৈৰ্ঘ্য বৈধ নহয় ।" + +#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 +#, c-format +msgid "Failed to decrypt the private key." +msgstr "ব্যক্তিগত চাবি ডিক্ৰিপ্ট কৰিবলৈ ব্যৰ্থ ।" + +#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "এনক্ৰিপ্ট কৰাৰ বাবে স্মৃতিশক্তি বিতৰণ কৰিবলৈ ব্যৰ্থ ।" + +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "এনক্ৰিপশন চাইফাৰৰ সন্দৰ্ভ আৰম্ভ কৰিবলৈ ব্যৰ্থ: %s / %s ।" + +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "এনক্ৰিপশনৰ বাবে চিমেট্ৰিক-কি নিৰ্ধাৰণ কৰিবলৈ ব্যৰ্থ: %s / %s ।" + +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +msgid "Failed to set IV for encryption: %s / %s." +msgstr "এনক্ৰিপশনৰ উদ্দেশ্যে IV নিৰ্ধাৰণ কৰিবলৈ ব্যৰ্থ: %s / %s ।" + +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +msgid "Failed to encrypt the data: %s / %s." +msgstr "তথ্য এনক্ৰিপ্ট কৰিবলৈ ব্যৰ্থ: %s / %s ।" + +#: ../libnm-util/crypto_gnutls.c:362 #, c-format msgid "Error initializing certificate data: %s" msgstr "প্ৰমাণপত্ৰৰ তথ্য আৰম্ভ কৰিবলৈ সমস্যা: %s" -#: ../libnm-util/crypto_gnutls.c:257 +#: ../libnm-util/crypto_gnutls.c:384 #, c-format msgid "Couldn't decode certificate: %s" msgstr "প্ৰমাণপত্ৰ ডি-কোড কৰিবলৈ ব্যৰ্থ: %s" -#: ../libnm-util/crypto_gnutls.c:281 +#: ../libnm-util/crypto_gnutls.c:408 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %s" msgstr "PKCS#12 ডিকোডাৰ আৰম্ভ কৰিবলৈ ব্যৰ্থ: %s" -#: ../libnm-util/crypto_gnutls.c:294 +#: ../libnm-util/crypto_gnutls.c:421 #, c-format msgid "Couldn't decode PKCS#12 file: %s" msgstr "PKCS#12 নথিপত্ৰ ডিকোড কৰিবলৈ ব্যৰ্থ: %s" -#: ../libnm-util/crypto_gnutls.c:306 +#: ../libnm-util/crypto_gnutls.c:433 #, c-format msgid "Couldn't verify PKCS#12 file: %s" msgstr "PKCS#12 নথিপত্ৰ প্ৰমাণিত কৰিবলৈ ব্যৰ্থ: %s" -#: ../libnm-util/crypto_nss.c:57 -#: ../system-settings/plugins/ifcfg-rh/crypto.c:52 +#: ../libnm-util/crypto_nss.c:56 #, c-format msgid "Failed to initialize the crypto engine: %d." -msgstr "ক্ৰিপ্টো কলঘৰ আৰম্ভ কৰিবলৈ ব্যৰ্থ: %d ।" +msgstr "ক্ৰিপ্টো কলঘৰ আৰম্ভ কৰিবলৈ ব্যৰ্থ: %d ।" #: ../libnm-util/crypto_nss.c:111 #, c-format msgid "Failed to initialize the MD5 context: %d." -msgstr "MD5 সন্দৰ্ভ আৰম্ভ কৰিবলৈ ব্যৰ্থ: %d ।" +msgstr "MD5 সন্দৰ্ভ আৰম্ভ কৰিবলৈ ব্যৰ্থ: %d ।" -#: ../libnm-util/crypto_nss.c:186 +#: ../libnm-util/crypto_nss.c:179 #, c-format -msgid "Failed to initialize the decryption cipher slot." -msgstr "ডিক্ৰিপছন ছাইফাৰ স্লট আৰম্ভ কৰিবলৈ ব্যৰ্থ ।" +msgid "Invalid IV length (must be at least %d)." +msgstr "IV ৰ অবৈধ দৈৰ্ঘ্য (অন্তত %d হোৱা আৱশ্যক) ।" #: ../libnm-util/crypto_nss.c:196 #, c-format -msgid "Failed to set symmetric key for decryption." -msgstr "ডিক্ৰিপছনৰ উদ্দেশ্যে চিমেট্ৰিক চাবি নিৰ্ধাৰণ কৰিবলৈ ব্যৰ্থ ।" +msgid "Failed to initialize the decryption cipher slot." +msgstr "ডিক্ৰিপছন ছাইফাৰ স্লট আৰম্ভ কৰিবলৈ ব্যৰ্থ ।" #: ../libnm-util/crypto_nss.c:206 #, c-format -msgid "Failed to set IV for decryption." -msgstr "ডিক্ৰিপছনৰ উদ্দেশ্যে IV নিৰ্ধাৰণ কৰিবলৈ ব্যৰ্থ ।" +msgid "Failed to set symmetric key for decryption." +msgstr "ডিক্ৰিপছনৰ উদ্দেশ্যে চিমেট্ৰিক চাবি নিৰ্ধাৰণ কৰিবলৈ ব্যৰ্থ ।" -#: ../libnm-util/crypto_nss.c:214 +#: ../libnm-util/crypto_nss.c:216 +#, c-format +msgid "Failed to set IV for decryption." +msgstr "ডিক্ৰিপছনৰ উদ্দেশ্যে IV নিৰ্ধাৰণ কৰিবলৈ ব্যৰ্থ ।" + +#: ../libnm-util/crypto_nss.c:224 #, c-format msgid "Failed to initialize the decryption context." -msgstr "ডিক্ৰিপছন সন্দৰ্ভ আৰম্ভ কৰিবলৈ ব্যৰ্থ ।" +msgstr "ডিক্ৰিপছন সন্দৰ্ভ আৰম্ভ কৰিবলৈ ব্যৰ্থ ।" -#: ../libnm-util/crypto_nss.c:227 +#: ../libnm-util/crypto_nss.c:237 #, c-format msgid "Failed to decrypt the private key: %d." -msgstr "ব্যক্তিগত চাবি ডিক্ৰিপ্ট কৰিবলৈ ব্যৰ্থ: %d ।" +msgstr "ব্যক্তিগত চাবি ডিক্ৰিপ্ট কৰিবলৈ ব্যৰ্থ: %d ।" -#: ../libnm-util/crypto_nss.c:239 +#: ../libnm-util/crypto_nss.c:245 +#, c-format +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "ব্যক্তিগত চাবি ডিক্ৰিপ্ট কৰিবলৈ ব্যৰ্থ: ডিক্ৰিপ্ট কৰা তথ্য অত্যাধিক ডাঙৰ ।" + +#: ../libnm-util/crypto_nss.c:256 #, c-format msgid "Failed to finalize decryption of the private key: %d." -msgstr "ব্যক্তিগত চাবিৰ ডিক্ৰিপছন সমাপ্ত কৰিবলৈ ব্যৰ্থ: %d ।" +msgstr "ব্যক্তিগত চাবিৰ ডিক্ৰিপছন সমাপ্ত কৰিবলৈ ব্যৰ্থ: %d ।" -#: ../libnm-util/crypto_nss.c:284 +#: ../libnm-util/crypto_nss.c:364 +#, c-format +msgid "Failed to initialize the encryption cipher slot." +msgstr "এনক্ৰিপশন চাইফাৰ স্লট আৰম্ভ কৰিবলৈ ব্যৰ্থ ।" + +#: ../libnm-util/crypto_nss.c:372 +#, c-format +msgid "Failed to set symmetric key for encryption." +msgstr "এনক্ৰিপশনৰ উদ্দেশ্যে চিমেট্ৰিক-কি নিৰ্ধাৰণ কৰিবলৈ ব্যৰ্থ ।" + +#: ../libnm-util/crypto_nss.c:380 +#, c-format +msgid "Failed to set IV for encryption." +msgstr "এনক্ৰিপশনৰ উদ্দেশ্যে IV নিৰ্ধাৰণ কৰিবলৈ ব্যৰ্থ ।" + +#: ../libnm-util/crypto_nss.c:388 +#, c-format +msgid "Failed to initialize the encryption context." +msgstr "এনক্ৰিপশন সন্দৰ্ভ আৰম্ভ কৰিবলৈ ব্যৰ্থ ।" + +#: ../libnm-util/crypto_nss.c:396 +#, c-format +msgid "Failed to encrypt: %d." +msgstr "এনক্ৰিপ্ট কৰিবলৈ ব্যৰ্থ: %d ।" + +#: ../libnm-util/crypto_nss.c:404 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "এনক্ৰিপ্ট কৰাৰ পিছত অপ্ৰত্যাশিত পৰিমাণ তথ্য উপলব্ধ হৈছে ।" + +#: ../libnm-util/crypto_nss.c:447 #, c-format msgid "Couldn't decode certificate: %d" msgstr "প্ৰমাণপত্ৰ ডিকোড কৰিবলৈ ব্যৰ্থ: %d" -#: ../libnm-util/crypto_nss.c:319 +#: ../libnm-util/crypto_nss.c:482 #, c-format msgid "Couldn't convert password to UCS2: %d" msgstr "গুপ্তশব্দক UCS2 লৈ ৰূপান্তৰ কৰিবলৈ ব্যৰ্থ: %d" -#: ../libnm-util/crypto_nss.c:347 +#: ../libnm-util/crypto_nss.c:510 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %d" msgstr "PKCS#12 ডিকোডাৰ আৰম্ভ কৰিবলৈ ব্যৰ্থ: %d" -#: ../libnm-util/crypto_nss.c:356 +#: ../libnm-util/crypto_nss.c:519 #, c-format msgid "Couldn't decode PKCS#12 file: %d" msgstr "PKCS#12 নথিপত্ৰ ডিকোড কৰিবলৈ ব্যৰ্থ: %d" -#: ../libnm-util/crypto_nss.c:365 +#: ../libnm-util/crypto_nss.c:528 #, c-format msgid "Couldn't verify PKCS#12 file: %d" msgstr "PKCS#12 নথিপত্ৰ প্ৰমাণিত কৰিবলৈ ব্যৰ্থ: %d" -#: ../src/nm-netlink-monitor.c:194 ../src/nm-netlink-monitor.c:458 +#: ../libnm-util/crypto_nss.c:557 +msgid "Could not generate random data." +msgstr "বিশৃঙ্খল তথ্য নিৰ্মাণ কৰিবলৈ ব্যৰ্থ ।" + +#: ../libnm-util/nm-utils.c:1925 +#, c-format +msgid "Not enough memory to make encryption key." +msgstr "এনক্ৰিপশন-কি নিৰ্মাণৰ বাবে পৰ্যাপ্ত স্মৃতিশক্তি অনুপস্থিত ।" + +#: ../libnm-util/nm-utils.c:2035 +msgid "Could not allocate memory for PEM file creation." +msgstr "PEM নথিপত্ৰ নিৰ্মাণৰ বাবে স্মৃতিশক্তি বিতৰণ কৰিবলৈ ব্যৰ্থ ।" + +#: ../libnm-util/nm-utils.c:2047 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "PEM নথিপত্ৰত IV লিখাৰ বাবে স্মৃতিশক্তি বিতৰণ কৰিবলৈ ব্যৰ্থ ।" + +#: ../libnm-util/nm-utils.c:2059 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "PEM নথিপত্ৰত এনক্ৰিপ্ট কৰা চাবি লিখাৰ বাবে স্মৃতিশক্তি বিতৰণ কৰা নাযায় ।" + +#: ../libnm-util/nm-utils.c:2078 +#, c-format +msgid "Could not allocate memory for PEM file data." +msgstr "PEM নথিপত্ৰৰ তথ্যে সংৰক্ষণৰ বাবে স্মৃতিশক্তি বিতৰণ কৰিবলৈ ব্যৰ্থ ।" + +#: ../src/nm-netlink-monitor.c:100 ../src/nm-netlink-monitor.c:231 +#: ../src/nm-netlink-monitor.c:653 #, c-format msgid "error processing netlink message: %s" msgstr "netlink বাৰ্তা প্ৰক্ৰিয়াকৰণত ভুল: %s" -#: ../src/nm-netlink-monitor.c:255 +#: ../src/nm-netlink-monitor.c:214 +msgid "error occurred while waiting for data on socket" +msgstr "তথ্যৰ বাবে ছকেটত অপেক্ষা কৰোঁতে সমস্যা" + +#: ../src/nm-netlink-monitor.c:254 +#, c-format +msgid "unable to connect to netlink for monitoring link status: %s" +msgstr "লিংকৰ অৱস্থা নিৰীক্ষণৰ উদ্দেশ্যে netlink ৰ সৈতে সংযোগ কৰিবলৈ ব্যৰ্থ: %s" + +#: ../src/nm-netlink-monitor.c:265 +#, c-format +msgid "unable to enable netlink handle credential passing: %s" +msgstr "netlink handle credential passing সক্ৰিয় কৰিবলৈ ব্যৰ্থ: %s" + +#: ../src/nm-netlink-monitor.c:291 ../src/nm-netlink-monitor.c:353 #, c-format msgid "unable to allocate netlink handle for monitoring link status: %s" msgstr "লিংকৰ অৱস্থা নিৰীক্ষণৰ উদ্দেশ্যে netlink হেন্ডেল বিতৰণ কৰিবলৈ ব্যৰ্থ: %s" -#: ../src/nm-netlink-monitor.c:265 -#, c-format -msgid "unable to connect to netlink for monitoring link status: %s" -msgstr "লিংকৰ অৱস্থা নিৰীক্ষণৰ উদ্দেশ্যে netlink-ৰ সৈতে সংযোগ কৰিবলৈ ব্যৰ্থ: %s" - -#: ../src/nm-netlink-monitor.c:273 -#, c-format -msgid "unable to join netlink group for monitoring link status: %s" -msgstr "লিংকৰ অৱস্থা নিৰীক্ষণৰ উদ্দেশ্যে netlink দলত যোগ কৰিবলৈ ব্যৰ্থ: %s" - -#: ../src/nm-netlink-monitor.c:281 +#: ../src/nm-netlink-monitor.c:376 #, c-format msgid "unable to allocate netlink link cache for monitoring link status: %s" msgstr "লিংকৰ অৱস্থা নিৰীক্ষণৰ উদ্দেশ্যে netlink লিংক কেশ্বে বিতৰণ কৰিবলৈ ব্যৰ্থ: %s" -#: ../src/nm-netlink-monitor.c:422 +#: ../src/nm-netlink-monitor.c:502 +#, c-format +msgid "unable to join netlink group: %s" +msgstr "netlink দলে যোগ কৰিবলৈ ব্যৰ্থ: %s" + +#: ../src/nm-netlink-monitor.c:629 ../src/nm-netlink-monitor.c:642 #, c-format msgid "error updating link cache: %s" msgstr "লিংক কোশ্বে উন্নত কৰিবলৈ সমস্যা: %s" -#: ../src/nm-netlink-monitor.c:488 -msgid "error occurred while waiting for data on socket" -msgstr "তথ্যৰ বাবে ছকেটত অপেক্ষা কৰোঁতে সমস্যা" - -#: ../src/NetworkManager.c:296 +#: ../src/main.c:502 #, c-format msgid "Invalid option. Please use --help to see a list of valid options.\n" -msgstr "অবৈধ বিকল্প । বৈধ বিকল্পসমূহৰ তালিকা চোৱাৰ বাবে অনুগ্ৰহ কৰি --help প্ৰয়োগ কৰক ।\n" +msgstr "" +"অবৈধ বিকল্প । বৈধ বিকল্পসমূহৰ তালিকা চোৱাৰ বাবে অনুগ্ৰহ কৰি --help প্ৰয়োগ কৰক " +"।\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:97 +#: ../src/main.c:562 +#, c-format +msgid "%s. Please use --help to see a list of valid options.\n" +msgstr "%s । বৈধ বিকল্পসমূহৰ তালিকা চোৱাৰ বাবে অনুগ্ৰহ কৰি --help প্ৰয়োগ কৰক ।\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:325 msgid "# Created by NetworkManager\n" msgstr "# NetworkManager দ্বাৰা নিৰ্মিত\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:103 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:341 #, c-format msgid "" "# Merged from %s\n" @@ -306,28 +1563,247 @@ msgstr "" "# %s ৰ পৰা একত্ৰিত কৰা হৈছে\n" "\n" -#: ../src/named-manager/nm-named-manager.c:255 +#: ../src/dhcp-manager/nm-dhcp-manager.c:279 +msgid "no usable DHCP client could be found." +msgstr "ব্যৱহাৰযোগ্য DHCP ক্লায়েন্ট পোৱা নাযায় ।" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:288 +msgid "'dhclient' could be found." +msgstr "'dhclient' পোৱা নাযায় ।" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:298 +msgid "'dhcpcd' could be found." +msgstr "'dhcpcd' পোৱা নাযায় ।" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:306 +#, c-format +msgid "unsupported DHCP client '%s'" +msgstr "অসমৰ্থিত DHCP ক্লায়েন্ট '%s'" + +#: ../src/logging/nm-logging.c:146 +#, c-format +msgid "Unknown log level '%s'" +msgstr "অজ্ঞাত লগ স্তৰ '%s'" + +#: ../src/logging/nm-logging.c:171 +#, c-format +msgid "Unknown log domain '%s'" +msgstr "অজ্ঞাত লগ ডোমেইন '%s'" + +#: ../src/named-manager/nm-named-manager.c:343 msgid "NOTE: the libc resolver may not support more than 3 nameservers." -msgstr "মন কৰিব: libc resolver ৰ দ্বাৰা ৩ তকৈ অধিক নামৰ সেৱক সমৰ্থিত ন'হ'বও পাৰে ।" +msgstr "মন কৰিব: libc resolver ৰ দ্বাৰা ৩ তকৈ অধিক নামৰ সেৱক সমৰ্থিত ন'হ'বও পাৰে ।" -#: ../src/named-manager/nm-named-manager.c:257 +#: ../src/named-manager/nm-named-manager.c:345 msgid "The nameservers listed below may not be recognized." -msgstr "নিম্নলিখিত নাম-সেৱকসমূহ চিনাক্ত ন'হ'বও পাৰে ।" +msgstr "নিম্নলিখিত নাম-সেৱকসমূহ চিনাক্ত ন'হ'বও পাৰে ।" -#: ../system-settings/plugins/ifcfg-rh/reader.c:2142 -msgid "System" -msgstr "প্ৰণালী" - -#: ../system-settings/src/nm-default-wired-connection.c:182 +#: ../src/system-settings/nm-default-wired-connection.c:157 #, c-format msgid "Auto %s" msgstr "স্বয়ংক্ৰিয় %s" +#: ../system-settings/plugins/ifcfg-rh/reader.c:3256 +msgid "System" +msgstr "প্ৰণালী" + #: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "নিৰাপদ ৱাই-ফাইলৈ নে'টৱৰ্কৰ মাধ্যমে সংযোগৰ যৌথ ব্যৱহাৰ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "উন্মুক্ত ৱাই-ফাই নে'টৱৰ্কৰ মাধ্যমে সংযোগৰ যৌথ ব্যৱহাৰ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "প্ৰণালীৰ স্থায়ী গৃহস্থৰ নাম পৰিবৰ্তন কৰক" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 msgid "Modify system connections" msgstr "প্ৰণালীৰ সংযোগ পৰিবৰ্তন কৰক" -#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 msgid "System policy prevents modification of system settings" -msgstr "প্ৰণালীত ব্যৱহৃত নিয়ম-নীতিৰ বিধিনিষেধৰ কাৰণে প্ৰণালীৰ বৈশিষ্ট্য পৰিবৰ্তন কৰা সম্ভৱ নহয়" +msgstr "" +"প্ৰণালীত ব্যৱহৃত নিয়ম-নীতিৰ বিধিনিষেধৰ কাৰণে প্ৰণালীৰ বৈশিষ্ট্য পৰিবৰ্তন কৰা সম্ভৱ " +"নহয়" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +msgid "System policy prevents modification of the persistent system hostname" +msgstr "" +"প্ৰণালীত ব্যৱহৃত নিয়ম-নীতিৰ বিধি নিষেধৰ কাৰণে প্ৰণালীৰ স্থায়ী গৃহস্থৰ নাম পৰিবৰ্তন " +"কৰা সম্ভৱ নহয়" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "" +"প্ৰণালীৰ নিয়মনীতিয়ে নিৰাপদ ৱাই-ফাই নে'টৱৰ্কৰ মাধ্যমে সংযোগৰ যৌথ ব্যৱহাৰ প্ৰতিৰোধ " +"কৰিছে" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "" +"প্ৰণালীৰ নিয়মনীতিয়ে উন্মুক্ত ৱাই-ফাই নে'টৱৰ্কৰ মাধ্যমে সংযোগৰ যৌথ ব্যৱহাৰ প্ৰতিৰোধ " +"কৰিছে" + +#~ msgid "Type" +#~ msgstr "ধৰণ" + +#~ msgid "Name" +#~ msgstr "নাম" + +#~ msgid "User connections:\n" +#~ msgstr "ব্যৱহাৰকৰ্তাৰ সংযোগ:\n" + +#~ msgid "System-wide connections" +#~ msgstr "প্ৰণালী ব্যাপী সংযোগ" + +#~ msgid "Default" +#~ msgstr "অবিকল্পিত" + +#~ msgid "Service" +#~ msgstr "সেৱা" + +#~ msgid "%s, %s, Freq %d MHz, Rate %d Mb/s, Strength %d" +#~ msgstr "%s, %s, ফ্ৰিকোৱেন্সি %d MHz, হাৰ %d Mb/s, ক্ষমতা %d" + +#~ msgid "Device" +#~ msgstr "যন্ত্ৰ" + +#~ msgid "Driver" +#~ msgstr "চালক" + +#~ msgid "State" +#~ msgstr "অৱস্থা" + +#~ msgid "HW Address" +#~ msgstr "HW ঠিকনা" + +#~ msgid "" +#~ "\n" +#~ " Capabilities:\n" +#~ msgstr "" +#~ "\n" +#~ " কৰ্মক্ষমতা:\n" + +#~ msgid "Carrier Detect" +#~ msgstr "পৰিবহণকৰ্তা চিনাক্তকৰণ" + +#~ msgid "Speed" +#~ msgstr "গতি" + +#~ msgid "" +#~ "\n" +#~ " Wireless Properties\n" +#~ msgstr "" +#~ "\n" +#~ " বেতাঁৰ সংযোগৰ বৈশিষ্ট্য\n" + +#~ msgid "WEP Encryption" +#~ msgstr "WEP এনক্ৰিপশন" + +#~ msgid "WPA Encryption" +#~ msgstr "WPA এনক্ৰিপশন" + +#~ msgid "WPA2 Encryption" +#~ msgstr "WPA2 এনক্ৰিপশন" + +#~ msgid "TKIP cipher" +#~ msgstr "TKIP চাইফাৰ" + +#~ msgid "CCMP cipher" +#~ msgstr "CCMP চাইফাৰ" + +#~ msgid "" +#~ "\n" +#~ " Wireless Access Points %s\n" +#~ msgstr "" +#~ "\n" +#~ " বেতাঁৰ এক্সেচ পইন্ট %s\n" + +#~ msgid "(* = current AP)" +#~ msgstr "(* = বৰ্তমান AP)" + +#~ msgid "" +#~ "\n" +#~ " Wired Properties\n" +#~ msgstr "" +#~ "\n" +#~ " তাঁৰযুক্ত সংযোগৰ বৈশিষ্ট্য\n" + +#~ msgid "Carrier" +#~ msgstr "পৰিবহণকৰ্তা" + +#~ msgid "" +#~ "\n" +#~ " IPv4 Settings:\n" +#~ msgstr "" +#~ "\n" +#~ " IPv4 ৰ বৈশিষ্ট্য:\n" + +#~ msgid "Address" +#~ msgstr "ঠিকনা" + +#~ msgid "Prefix" +#~ msgstr "উপসৰ্গ" + +#~ msgid "Gateway" +#~ msgstr "গে'টৱে" + +#~ msgid "Device:" +#~ msgstr "যন্ত্ৰ:" + +#~ msgid "Error: hwaddr has to be specified." +#~ msgstr "ত্ৰুটি: hwaddr উল্লেখ কৰা আৱশ্যক ।" + +#~ msgid "AP parameters" +#~ msgstr "AP ৰ স্থিতিমাপ" + +#~ msgid "Frequency:" +#~ msgstr "ফ্ৰিকোৱেন্সি:" + +#~ msgid "Mode:" +#~ msgstr "মোড:" + +#~ msgid "Ad-hoc" +#~ msgstr "এড-হক" + +#~ msgid "Maximal bitrate:" +#~ msgstr "সৰ্বাধিক বিট ৰেট:" + +#~ msgid "Strength:" +#~ msgstr "ক্ষমতা:" + +#~ msgid "Flags:" +#~ msgstr "ফ্লেগ:" + +#~ msgid "privacy" +#~ msgstr "গোপনীয়" + +#~ msgid "WPA flags:" +#~ msgstr "WPA ফ্লেগ:" + +#~ msgid "RSN flags:" +#~ msgstr "RSN ফ্লেগ:" + +#~ msgid "NM running:" +#~ msgstr "NM চলি আছে:" + +#~ msgid "NM state:" +#~ msgstr "NM ৰ অৱস্থা:" + +#~ msgid "NM wireless hardware:" +#~ msgstr "NM বেতাঁৰ যান্ত্ৰিক সামগ্ৰী:" + +#~ msgid "NM wireless:" +#~ msgstr "NM বেতাঁৰ:" + +#~ msgid "NM WWAN hardware:" +#~ msgstr "NM WWAN যান্ত্ৰিক সামগ্ৰী:" + +#~ msgid "unable to join netlink group for monitoring link status: %s" +#~ msgstr "লিংকৰ অৱস্থা নিৰীক্ষণৰ উদ্দেশ্যে netlink দলত যোগ কৰিবলৈ ব্যৰ্থ: %s" + +#~ msgid "unable to connect to netlink: %s" +#~ msgstr "netlink ৰ সৈতে সংযোগ কৰিবলৈ ব্যৰ্থ: %s" diff --git a/po/bn_IN.po b/po/bn_IN.po index 9a71891b95..602ba3fa0c 100644 --- a/po/bn_IN.po +++ b/po/bn_IN.po @@ -1,23 +1,867 @@ -# translation of NetworkManager.po.master.po to Bengali INDIA +# translation of NetworkManager.master.po to Bengali INDIA # Bengali (India) translation of NetworkManager. # Copyright (C) 2009 NetworkManager's COPYRIGHT HOLDER # This file is distributed under the same license as the NetworkManager package. # -# Runa Bhattacharjee , 2009. +# Runa Bhattacharjee , 2009, 2010. msgid "" msgstr "" -"Project-Id-Version: NetworkManager.po.master\n" +"Project-Id-Version: NetworkManager.master\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager&component=general\n" -"POT-Creation-Date: 2009-06-04 03:24+0000\n" -"PO-Revision-Date: 2009-06-05 18:45+0530\n" +"POT-Creation-Date: 2010-04-30 03:24+0000\n" +"PO-Revision-Date: 2010-05-07 11:04+0530\n" "Last-Translator: Runa Bhattacharjee \n" -"Language-Team: Bengali INDIA \n" +"Language-Team: Bengali INDIA \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../cli/src/connections.c:86 +#, c-format +msgid "" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" +msgstr "" +"ব্যবহারপ্রণালী: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" + +#: ../cli/src/connections.c:158 +msgid "Connections" +msgstr "সংযোগ" + +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/devices.c:298 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "Type" +msgstr "ধরন" + +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "UUID" +msgstr "UUID" + +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Name" +msgstr "নাম" + +#: ../cli/src/connections.c:163 +#, c-format +msgid "System connections:\n" +msgstr "সিস্টেমের সংযোগ:\n" + +#: ../cli/src/connections.c:167 +#, c-format +msgid "User connections:\n" +msgstr "ব্যবহারকারীর সংযোগ:\n" + +#: ../cli/src/connections.c:178 ../cli/src/connections.c:967 +#: ../cli/src/connections.c:983 ../cli/src/connections.c:992 +#: ../cli/src/connections.c:1003 ../cli/src/connections.c:1085 +#: ../cli/src/devices.c:604 ../cli/src/devices.c:614 ../cli/src/devices.c:699 +#: ../cli/src/devices.c:785 ../cli/src/devices.c:792 +#, c-format +msgid "Error: %s argument is missing." +msgstr "ত্রুটি: %s আর্গুমেন্ট অনুপস্থিত।" + +#: ../cli/src/connections.c:189 +#, c-format +msgid "Error: %s - no such connection." +msgstr "ত্রুটি: %s - এই ধরনের কোনো সংযোগ উপস্থিত নেই।" + +#: ../cli/src/connections.c:196 +msgid "System-wide connections" +msgstr "সিস্টেম ব্যাপী সংযোগ" + +#: ../cli/src/connections.c:205 +msgid "User connections" +msgstr "ব্যবহারকারীর সংযোগ" + +#: ../cli/src/connections.c:212 ../cli/src/connections.c:1016 +#: ../cli/src/connections.c:1103 ../cli/src/devices.c:446 +#: ../cli/src/devices.c:494 ../cli/src/devices.c:628 ../cli/src/devices.c:706 +#: ../cli/src/devices.c:798 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "অজানা পরামিতি: %s\n" + +#: ../cli/src/connections.c:221 +#, c-format +msgid "Error: no valid parameter specified." +msgstr "ত্রুটি: বৈধ পরামিতি উল্লেখ করা যায়নি।" + +#. FIXME: Fix the output +#: ../cli/src/connections.c:268 ../cli/src/devices.c:302 +#: ../cli/src/devices.c:321 ../cli/src/devices.c:353 ../cli/src/devices.c:355 +#: ../cli/src/devices.c:357 ../cli/src/devices.c:359 ../cli/src/devices.c:361 +msgid "yes" +msgstr "হ্যাঁ" + +#: ../cli/src/connections.c:268 ../cli/src/devices.c:304 +msgid "no" +msgstr "না" + +#: ../cli/src/connections.c:297 +msgid "Active connections" +msgstr "সক্রিয় সংযোগ" + +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +#: ../cli/src/devices.c:302 ../cli/src/devices.c:304 +msgid "Default" +msgstr "ডিফল্ট" + +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Service" +msgstr "পরিসেবা" + +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Devices" +msgstr "ডিভাইস" + +#: ../cli/src/connections.c:659 +#, c-format +msgid "no active connection on device '%s'" +msgstr "'%s' ডিভাইসের মধ্যে কোনো সক্রিয় সংযোগ উপস্থিত নেই" + +#: ../cli/src/connections.c:667 +#, c-format +msgid "no active connection or device" +msgstr "কোনো সক্রিয় সংযোগ অথবা ডিভাইস উপস্থিত নেই" + +#: ../cli/src/connections.c:730 +msgid "activating" +msgstr "সক্রিয় করা হচ্ছে" + +#: ../cli/src/connections.c:732 +msgid "activated" +msgstr "সক্রিয় করা হয়েছে" + +#: ../cli/src/connections.c:735 ../cli/src/connections.c:758 +#: ../cli/src/connections.c:791 ../cli/src/devices.c:111 +#: ../cli/src/network-manager.c:76 ../cli/src/network-manager.c:98 +msgid "unknown" +msgstr "অজানা" + +#: ../cli/src/connections.c:744 +msgid "VPN connecting (prepare)" +msgstr "VPN সংযোগ স্থাপন করা হচ্ছে (প্রস্তুতি)" + +#: ../cli/src/connections.c:746 +msgid "VPN connecting (need authentication)" +msgstr "VPN সংযোগ স্থাপন করা হচ্ছে (অনুমোদন প্রয়োজন)" + +#: ../cli/src/connections.c:748 +msgid "VPN connecting" +msgstr "VPN সংযোগ স্থাপন করা হচ্ছে" + +#: ../cli/src/connections.c:750 +msgid "VPN connecting (getting IP configuration)" +msgstr "VPN সংযোগ স্থাপন করা হচ্ছে (IP কনফিগারেশন প্রাপ্ত করা হচ্ছে)" + +#: ../cli/src/connections.c:752 +msgid "VPN connected" +msgstr "VPN সংযোগ স্থাপন করা হয়েছে" + +#: ../cli/src/connections.c:754 +msgid "VPN connection failed" +msgstr "VPN সংযোগ বিফল হয়েছে" + +#: ../cli/src/connections.c:756 +msgid "VPN disconnected" +msgstr "VPN সংযোগ বিচ্ছিন্ন করা হয়েছে" + +#: ../cli/src/connections.c:767 +msgid "unknown reason" +msgstr "অজানা কারণ" + +#: ../cli/src/connections.c:769 +msgid "none" +msgstr "শূণ্য" + +#: ../cli/src/connections.c:771 +msgid "the user was disconnected" +msgstr "ব্যবহারকারীর সাথে সংযোগ বিচ্ছিন্ন করা হয়েছে" + +#: ../cli/src/connections.c:773 +msgid "the base network connection was interrupted" +msgstr "মূল নেটওয়ার্ক সংযোগ বিঘ্নিত হয়েছে" + +#: ../cli/src/connections.c:775 +msgid "the VPN service stopped unexpectedly" +msgstr "অপ্রত্যাশিতভাবে VPN পরিসেবা বন্ধ করা হয়েছে" + +#: ../cli/src/connections.c:777 +msgid "the VPN service returned invalid configuration" +msgstr "VPN পরিসেবা থেকে অবৈধ কনফিগারেশন পাওয়া গিয়েছে" + +#: ../cli/src/connections.c:779 +msgid "the connection attempt timed out" +msgstr "সংযোগের প্রয়াসকালে সময়সীমা উত্তীর্ণ হয়েছে" + +#: ../cli/src/connections.c:781 +msgid "the VPN service did not start in time" +msgstr "যথাযত সময়ে VPN পরিসেবা আরম্ভ করা হয়নি" + +#: ../cli/src/connections.c:783 +msgid "the VPN service failed to start" +msgstr "VPN পরিসেবা আরম্ভ করা যায়নি" + +#: ../cli/src/connections.c:785 +msgid "no valid VPN secrets" +msgstr "VPN-র বৈধ গোপন তথ্য উপস্থিত নেই" + +#: ../cli/src/connections.c:787 +msgid "invalid VPN secrets" +msgstr "VPN-র অবৈধ গোপন তথ্য" + +#: ../cli/src/connections.c:789 +msgid "the connection was removed" +msgstr "সংযোগ মুছে ফেলা হয়েছে" + +#: ../cli/src/connections.c:803 +#, c-format +msgid "state: %s\n" +msgstr "অবস্থা: %s\n" + +#: ../cli/src/connections.c:806 ../cli/src/connections.c:832 +#, c-format +msgid "Connection activated\n" +msgstr "সংযোগ সক্রিয় করা হয়েছে\n" + +#: ../cli/src/connections.c:809 +#, c-format +msgid "Error: Connection activation failed." +msgstr "ত্রুটি: সংযোগ সক্রিয় করতে ব্যর্থ।" + +#: ../cli/src/connections.c:828 +#, c-format +msgid "state: %s (%d)\n" +msgstr "অবস্থা: %s (%d)\n" + +#: ../cli/src/connections.c:838 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "ত্রুটি: সংযোগ সক্রিয় করতে ব্যর্থ: %s।" + +#: ../cli/src/connections.c:855 ../cli/src/devices.c:551 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "ত্রুটি: %d সেকেন্ডের সময়সীমা উত্তীর্ণ হয়েছে।" + +#: ../cli/src/connections.c:898 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "ত্রুটি: সংযোগ সক্রিয় করতে ব্যর্থ: %s" + +#: ../cli/src/connections.c:912 +#, c-format +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "ত্রুটি: '%s'-র জন্য সক্রিয় সংযোগ প্রাপ্ত করতে ব্যর্থ।" + +#: ../cli/src/connections.c:921 +#, c-format +msgid "Active connection state: %s\n" +msgstr "সক্রিয় সংযোগের অবস্থা: %s\n" + +#: ../cli/src/connections.c:922 +#, c-format +msgid "Active connection path: %s\n" +msgstr "সক্রিয় সংযোগের পাথ: %s\n" + +#: ../cli/src/connections.c:976 ../cli/src/connections.c:1094 +#, c-format +msgid "Error: Unknown connection: %s." +msgstr "ত্রুটি: অজানা সংযোগ: %s." + +#: ../cli/src/connections.c:1011 ../cli/src/devices.c:622 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "ত্রুটি: '%s' সময়সীমার মান বৈধ নয়।" + +#: ../cli/src/connections.c:1024 ../cli/src/connections.c:1111 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "ত্রুটি: id অথবা uuid নির্ধারণ করা আবশ্যক।" + +#: ../cli/src/connections.c:1044 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "ত্রুটি: প্রযোজ্য কোনো ডিভাইস পাওয়া যায়নি: %s." + +#: ../cli/src/connections.c:1046 +#, c-format +msgid "Error: No suitable device found." +msgstr "ত্রুটি: কোনো প্রযোজ্য ডিভাইস পাওয়া যায়নি।" + +#: ../cli/src/connections.c:1138 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "সতর্কবার্তা: সংযোগ সক্রিয় নয়\n" + +#: ../cli/src/connections.c:1189 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "ত্রুটি: 'con' কমান্ড '%s', বৈধ নয়।" + +#: ../cli/src/connections.c:1216 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "ত্রুটি: D-Bus-র সাথে সংযোগ করতে ব্যর্থ।" + +#: ../cli/src/connections.c:1223 +#, c-format +msgid "Error: Could not get system settings." +msgstr "ত্রুটি: সিস্টেমের বৈশিষ্ট্য প্রাপ্ত করতে ব্যর্থ।" + +#: ../cli/src/connections.c:1231 +#, c-format +msgid "Error: Could not get user settings." +msgstr "ত্রুটি: ব্যবহারকারীর বৈশিষ্ট্য প্রাপ্ত করতে ব্যর্থ" + +#: ../cli/src/connections.c:1241 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "ত্রুটি: সংযোগ প্রাপ্ত করতে ব্যর্থ: বৈশিষ্ট্যের পরিসেবা বর্তমানে চলছে না।" + +#: ../cli/src/devices.c:73 +#, c-format +msgid "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] | apinfo iface hwaddr ]\n" +"\n" +msgstr "" +"ব্যবহারপ্রণালী: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] | apinfo iface hwaddr ]\n" +"\n" + +#: ../cli/src/devices.c:93 +msgid "unmanaged" +msgstr "পরিচালিত নয়" + +#: ../cli/src/devices.c:95 +msgid "unavailable" +msgstr "উপলব্ধ নয়" + +#: ../cli/src/devices.c:97 ../cli/src/network-manager.c:73 +msgid "disconnected" +msgstr "বিচ্ছিন্ন" + +#: ../cli/src/devices.c:99 +msgid "connecting (prepare)" +msgstr "সংযোগ করা হচ্ছে (প্রস্তুতি)" + +#: ../cli/src/devices.c:101 +msgid "connecting (configuring)" +msgstr "সংযোগ করা হচ্ছে (কনফিগার করা হচ্ছে)" + +#: ../cli/src/devices.c:103 +msgid "connecting (need authentication)" +msgstr "সংযোগ করা হচ্ছে (অনুমোদন প্রয়োজন)" + +#: ../cli/src/devices.c:105 +msgid "connecting (getting IP configuration)" +msgstr "সংযোগ করা হচ্ছে (IP কনফিগারেশন প্রাপ্ত করা হচ্ছে)" + +#: ../cli/src/devices.c:107 ../cli/src/network-manager.c:71 +msgid "connected" +msgstr "সংযোগ স্থাপিত" + +#: ../cli/src/devices.c:109 +msgid "connection failed" +msgstr "সংযোগ বিফল" + +#: ../cli/src/devices.c:132 ../cli/src/devices.c:876 +msgid "Unknown" +msgstr "অজানা" + +#. print them +#: ../cli/src/devices.c:164 ../cli/src/devices.c:266 ../cli/src/devices.c:861 +#: ../cli/src/devices.c:879 +msgid "(none)" +msgstr "(শূণ্য)" + +#: ../cli/src/devices.c:209 +#, c-format +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s: IP4 ঠিকানা 0x%X রূপান্তর করতে ত্রুটি" + +#: ../cli/src/devices.c:238 +#, c-format +msgid "%s, %s, Freq %d MHz, Rate %d Mb/s, Strength %d" +msgstr "%s, %s, ফ্রিকোয়েন্সি %d MHz, হার %d Mb/s, ক্ষমতা %d" + +#: ../cli/src/devices.c:239 +msgid "Ad-Hoc" +msgstr "অ্যাড-হক" + +#: ../cli/src/devices.c:248 +msgid ", Encrypted: " +msgstr ", এনক্রিপশন সহ: " + +#: ../cli/src/devices.c:253 +msgid " WEP" +msgstr " WEP" + +#: ../cli/src/devices.c:255 +msgid " WPA" +msgstr " WPA" + +#: ../cli/src/devices.c:257 +msgid " WPA2" +msgstr " WPA2" + +#: ../cli/src/devices.c:260 +msgid " Enterprise" +msgstr " এন্টারপ্রাইজ" + +#: ../cli/src/devices.c:294 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "Device" +msgstr "ডিভাইস" + +#: ../cli/src/devices.c:299 +msgid "Driver" +msgstr "ড্রাইভার" + +#: ../cli/src/devices.c:299 ../cli/src/devices.c:567 +msgid "(unknown)" +msgstr "(অজানা)" + +#: ../cli/src/devices.c:300 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "State" +msgstr "অবস্থা" + +#: ../cli/src/devices.c:313 +msgid "HW Address" +msgstr "হার্ডওয়্যারের ঠিকানা" + +#: ../cli/src/devices.c:319 +#, c-format +msgid "" +"\n" +" Capabilities:\n" +msgstr "" +"\n" +" কর্মক্ষমতা:\n" + +#: ../cli/src/devices.c:321 +msgid "Carrier Detect" +msgstr "পরিবহণকারী সনাক্তকরণ" + +#: ../cli/src/devices.c:336 +#, c-format +msgid "%u Mb/s" +msgstr "%u মেগাবাইট/সেকেন্ড" + +#: ../cli/src/devices.c:337 +msgid "Speed" +msgstr "গতি" + +#: ../cli/src/devices.c:348 +#, c-format +msgid "" +"\n" +" Wireless Properties\n" +msgstr "" +"\n" +" বেতারের বৈশিষ্ট্য\n" + +#: ../cli/src/devices.c:353 +msgid "WEP Encryption" +msgstr "WEP এনক্রিপশন" + +#: ../cli/src/devices.c:355 +msgid "WPA Encryption" +msgstr "WPA এনক্রিপশন" + +#: ../cli/src/devices.c:357 +msgid "WPA2 Encryption" +msgstr "WPA2 এনক্রিপশন" + +#: ../cli/src/devices.c:359 +msgid "TKIP cipher" +msgstr "TKIP সাইফার" + +#: ../cli/src/devices.c:361 +msgid "CCMP cipher" +msgstr "CCMP সাইফার" + +#: ../cli/src/devices.c:368 +#, c-format +msgid "" +"\n" +" Wireless Access Points %s\n" +msgstr "" +"\n" +" বেতার অ্যাকসেস পয়েন্ট %s\n" + +#: ../cli/src/devices.c:368 +msgid "(* = current AP)" +msgstr "(* = বর্তমান অ্যাকসেস পয়েন্ট)" + +#: ../cli/src/devices.c:374 +#, c-format +msgid "" +"\n" +" Wired Properties\n" +msgstr "" +"\n" +" তারযুক্ত সংযোগের বৈশিষ্ট্য\n" + +#: ../cli/src/devices.c:377 ../cli/src/devices.c:379 +msgid "Carrier" +msgstr "পরিবহণকারী" + +#: ../cli/src/devices.c:377 +msgid "on" +msgstr "চালু" + +#: ../cli/src/devices.c:379 +msgid "off" +msgstr "বন্ধ" + +#: ../cli/src/devices.c:387 +#, c-format +msgid "" +"\n" +" IPv4 Settings:\n" +msgstr "" +"\n" +" IPv4 সংক্রান্ত বৈশিষ্ট্য:\n" + +#: ../cli/src/devices.c:395 +msgid "Address" +msgstr "ঠিকানা" + +#: ../cli/src/devices.c:401 +msgid "Prefix" +msgstr "প্রি-ফিক্স" + +#: ../cli/src/devices.c:405 +msgid "Gateway" +msgstr "গেটওয়ে" + +#: ../cli/src/devices.c:416 +msgid "DNS" +msgstr "DNS" + +#: ../cli/src/devices.c:458 +msgid "Status of devices" +msgstr "ডিভাইসের অবস্থা" + +#: ../cli/src/devices.c:487 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "ত্রুটি: '%s' আর্গুমেন্ট অনুপস্থিত।" + +#: ../cli/src/devices.c:516 ../cli/src/devices.c:655 ../cli/src/devices.c:729 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "ত্রুটি: '%s' ডিভাইস পাওয়া যায়নি।" + +#: ../cli/src/devices.c:539 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "সাফল্য: '%s' ডিভাইস সাফল্যের সাথে সংযোগ বিচ্ছিন্ন করা হয়েছে।" + +#: ../cli/src/devices.c:564 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "ত্রুটি: '%s' (%s) ডিভাইসের সাথে সংযোগ বিচ্ছিন্ন করতে ব্যর্থ: %s" + +#: ../cli/src/devices.c:572 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "ডিভাইসের অবস্থা: %d (%s)\n" + +#: ../cli/src/devices.c:636 +#, c-format +msgid "Error: iface has to be specified." +msgstr "ত্রুটি: iface নির্ধারণ করা আবশ্যক।" + +#: ../cli/src/devices.c:736 ../cli/src/devices.c:746 +msgid "WiFi scan list" +msgstr "ওয়াই-ফাই স্ক্যানের তালিকা" + +#: ../cli/src/devices.c:740 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "ত্রুটি: '%s' ডিভাইসটি ওয়াই-ফাই ডিভাইস নয়।" + +#: ../cli/src/devices.c:754 +msgid "Device:" +msgstr "ডিভাইস:" + +#: ../cli/src/devices.c:806 +#, c-format +msgid "Error: hwaddr has to be specified." +msgstr "ত্রুটি: hwaddr নির্ধারণ করা আবশ্যক।" + +#: ../cli/src/devices.c:844 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "ত্রুটি: hwaddr '%s' সহ অ্যাকসেস পয়েন্ট পাওয়া যায়নি।" + +#: ../cli/src/devices.c:862 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" + +#: ../cli/src/devices.c:863 +#, c-format +msgid "%u MB/s" +msgstr "%u মেগাবাইট/সেকেন্ড" + +#: ../cli/src/devices.c:869 ../cli/src/devices.c:871 +msgid "AP parameters" +msgstr "অ্যাকসেস পয়েন্ট সংক্রান্ত পরামিতি" + +#: ../cli/src/devices.c:873 +msgid "SSID:" +msgstr "SSID:" + +#: ../cli/src/devices.c:874 +msgid "BSSID:" +msgstr "BSSID:" + +#: ../cli/src/devices.c:875 +msgid "Frequency:" +msgstr "ফ্রিকোয়েন্সি:" + +#: ../cli/src/devices.c:876 +msgid "Mode:" +msgstr "মোড:" + +#: ../cli/src/devices.c:876 +msgid "Ad-hoc" +msgstr "অ্যাড-হক" + +#: ../cli/src/devices.c:876 +msgid "Infrastructure" +msgstr "পরিকাঠামো" + +#: ../cli/src/devices.c:877 +msgid "Maximal bitrate:" +msgstr "সর্বাধিক বিট-রেট:" + +#: ../cli/src/devices.c:878 +msgid "Strength:" +msgstr "ক্ষমতা:" + +#: ../cli/src/devices.c:879 +msgid "Flags:" +msgstr "ফ্ল্যাগ:" + +#: ../cli/src/devices.c:879 +msgid "privacy" +msgstr "গোপনীয়তা" + +#: ../cli/src/devices.c:880 +msgid "WPA flags:" +msgstr "WPA ফ্ল্যাগ:" + +#: ../cli/src/devices.c:881 +msgid "RSN flags:" +msgstr "RSN ফ্ল্যাগ:" + +#: ../cli/src/devices.c:907 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "ত্রুটি: 'dev wifi' কমান্ড '%s' বৈধ নয়।" + +#: ../cli/src/devices.c:943 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "ত্রুটি: 'dev' কমান্ড '%s' বৈধ নয়।" + +#: ../cli/src/network-manager.c:46 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" +msgstr "" +"ব্যবহারপ্রণালী: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + +#: ../cli/src/network-manager.c:67 +msgid "asleep" +msgstr "নিদ্রিত" + +#: ../cli/src/network-manager.c:69 +msgid "connecting" +msgstr "সংযোগ করা হচ্ছে" + +#: ../cli/src/network-manager.c:93 ../cli/src/network-manager.c:94 +#: ../cli/src/network-manager.c:95 ../cli/src/network-manager.c:96 +#: ../cli/src/network-manager.c:143 ../cli/src/network-manager.c:160 +msgid "enabled" +msgstr "সক্রিয়" + +#: ../cli/src/network-manager.c:93 ../cli/src/network-manager.c:94 +#: ../cli/src/network-manager.c:95 ../cli/src/network-manager.c:96 +#: ../cli/src/network-manager.c:143 ../cli/src/network-manager.c:160 +msgid "disabled" +msgstr "নিষ্ক্রিয়" + +#: ../cli/src/network-manager.c:102 +msgid "NetworkManager status" +msgstr "NetworkManager-র অবস্থা" + +#: ../cli/src/network-manager.c:104 +msgid "NM running:" +msgstr "NM চলমান:" + +#: ../cli/src/network-manager.c:104 +msgid "running" +msgstr "চলমান" + +#: ../cli/src/network-manager.c:104 +msgid "not running" +msgstr "চলমান নয়" + +#: ../cli/src/network-manager.c:105 +msgid "NM state:" +msgstr "NM-র অবস্থা:" + +#: ../cli/src/network-manager.c:106 +msgid "NM wireless hardware:" +msgstr "NM-র বেতার সংক্রান্ত হার্ডওয়্যার:" + +#. no argument, show current state +#: ../cli/src/network-manager.c:107 ../cli/src/network-manager.c:143 +msgid "NM wireless:" +msgstr "NM-র বেতার:" + +#: ../cli/src/network-manager.c:108 +msgid "NM WWAN hardware:" +msgstr "NM WWAN হার্ডওয়্যার:" + +#. no argument, show current state +#: ../cli/src/network-manager.c:109 ../cli/src/network-manager.c:160 +msgid "NM WWAN:" +msgstr "NM WWAN:" + +#: ../cli/src/network-manager.c:150 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "ত্রুটর: অবৈধ 'wifi' পরামিতি: '%s'।" + +#: ../cli/src/network-manager.c:167 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "ত্রুটি: অবৈধ 'wwan' পরামিতি: '%s'।" + +#: ../cli/src/network-manager.c:178 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "ত্রুটি: 'nm' কমান্ড '%s' বৈধ নয়।" + +#: ../cli/src/nmcli.c:65 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"ব্যবহারপ্রণালী: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" + +#: ../cli/src/nmcli.c:106 +#, c-format +msgid "Object '%s' is unknown, try 'nmcli help'." +msgstr "'%s' অবজেক্ট অজানা, 'nmcli help' ব্যবহারের প্রচেষ্টা করুন।" + +#: ../cli/src/nmcli.c:139 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "nmcli সরঞ্জাম, সংস্করণ %s\n" + +#: ../cli/src/nmcli.c:145 +#, c-format +msgid "Option '%s' is unknown, try 'nmcli -help'." +msgstr "'%s' বিকল্পটি অজানা, 'nmcli -help' ব্যবহারের প্রয়োগ করুন।" + +#: ../cli/src/nmcli.c:164 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "%d সংকেত প্রাপ্ত হয়েছে, বন্ধ করা হচ্ছে..." + +#: ../cli/src/nmcli.c:189 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "ত্রুটি: NetworkManager-র সাথে সংযোগ স্থাপন করতে ব্যর্থ।" + +#: ../cli/src/nmcli.c:205 +msgid "Success" +msgstr "সফল" + #: ../libnm-util/crypto.c:120 #, c-format msgid "PEM key file had no end tag '%s'." @@ -103,8 +947,9 @@ msgstr "IV সংরক্ষণের জন্য পর্যাপ্ত ম msgid "IV contains non-hexadecimal digits." msgstr "IV-র মধ্যে হেক্সাডেসিম্যাল-ভিন্ন অন্যান্য সংখ্যা উপস্থিত রয়েছে।" -#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:143 -#: ../libnm-util/crypto_nss.c:169 +#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:336 #, c-format msgid "Private key cipher '%s' was unknown." msgstr "ব্যক্তিগত-কি'র সাইফার '%s' অজানা।" @@ -124,72 +969,106 @@ msgstr "ব্যক্তিগত-কি'র ধরন নির্ধার msgid "Not enough memory to store decrypted private key." msgstr "ডিক্রিপ্ট করা ব্যক্তিগত-কি সংরক্ষণের জন্য পর্যাপ্ত মেমরি অনুপস্থিত।" -#: ../libnm-util/crypto_gnutls.c:46 +#: ../libnm-util/crypto_gnutls.c:49 msgid "Failed to initialize the crypto engine." msgstr "ক্রিপ্টো ইঞ্জিন আরম্ভ করতে ব্যর্থ।" -#: ../libnm-util/crypto_gnutls.c:90 +#: ../libnm-util/crypto_gnutls.c:93 #, c-format msgid "Failed to initialize the MD5 engine: %s / %s." msgstr "MD5 ইঞ্জিন আরম্ভ করতে ব্যর্থ: %s / %s।" -#: ../libnm-util/crypto_gnutls.c:152 ../libnm-util/crypto_nss.c:178 +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "IV-র অবৈধ দৈর্ঘ্য (অন্তত %zd হওয়া আবশ্যক)।" + +#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188 #, c-format msgid "Not enough memory for decrypted key buffer." msgstr "ডিক্রিপ্ট করা কি-বাফারের জন্য পর্যাপ্ত মেমরি অনুপস্থিত।" -#: ../libnm-util/crypto_gnutls.c:160 +#: ../libnm-util/crypto_gnutls.c:173 #, c-format msgid "Failed to initialize the decryption cipher context: %s / %s." msgstr "ডিক্রিপশন সাইফারের কনটেক্সট আরম্ভ করতে ব্যর্থ: %s / %s।" -#: ../libnm-util/crypto_gnutls.c:169 +#: ../libnm-util/crypto_gnutls.c:182 #, c-format msgid "Failed to set symmetric key for decryption: %s / %s." msgstr "ডিক্রিপশনের জন্য সিমেট্রিক-কি নির্ধারণ করতে ব্যর্থ: %s / %s।" -#: ../libnm-util/crypto_gnutls.c:178 +#: ../libnm-util/crypto_gnutls.c:191 #, c-format msgid "Failed to set IV for decryption: %s / %s." msgstr "ডিক্রিপশনের উদ্দেশ্যে IV নির্ধারণ করতে ব্যর্থ: %s / %s।" -#: ../libnm-util/crypto_gnutls.c:187 +#: ../libnm-util/crypto_gnutls.c:200 #, c-format msgid "Failed to decrypt the private key: %s / %s." msgstr "ব্যক্তিগত-কি ডিক্রিপ্ট করতে ব্যর্থ: %s / %s।" -#: ../libnm-util/crypto_gnutls.c:200 +#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 +#, c-format +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "ব্যক্তিগত-কি ডিক্রিপ্ট করতে ব্যর্থ: প্যাডিংয়ের দৈর্ঘ্য বৈধ নয়।" + +#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 #, c-format msgid "Failed to decrypt the private key." msgstr "ব্যক্তিগত-কি ডিক্রিপ্ট করতে ব্যর্থ।" -#: ../libnm-util/crypto_gnutls.c:235 +#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "এনক্রিপ্ট করার জন্য মেমরি বরাদ্দ করতে ব্যর্থ।" + +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "এনক্রিপশন সাইফারের কনটেক্সট আরম্ভ করতে ব্যর্থ: %s / %s।" + +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "এনক্রিপশনের জন্য সিমেট্রিক-কি নির্ধারণ করতে ব্যর্থ: %s / %s।" + +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +msgid "Failed to set IV for encryption: %s / %s." +msgstr "এনক্রিপশনের উদ্দেশ্যে IV নির্ধারণ করতে ব্যর্থ: %s / %s।" + +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +msgid "Failed to encrypt the data: %s / %s." +msgstr "তথ্য এনক্রিপ্ট করতে ব্যর্থ: %s / %s।" + +#: ../libnm-util/crypto_gnutls.c:362 #, c-format msgid "Error initializing certificate data: %s" msgstr "সার্টিফিকেটের তথ্য আরম্ভ করতে সমস্যা: %s" -#: ../libnm-util/crypto_gnutls.c:257 +#: ../libnm-util/crypto_gnutls.c:384 #, c-format msgid "Couldn't decode certificate: %s" msgstr "সার্টিফিকেট ডি-কোড করতে ব্যর্থ: %s" -#: ../libnm-util/crypto_gnutls.c:281 +#: ../libnm-util/crypto_gnutls.c:408 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %s" msgstr "PKCS#12 ডিকোডার আরম্ভ করতে ব্যর্থ: %s" -#: ../libnm-util/crypto_gnutls.c:294 +#: ../libnm-util/crypto_gnutls.c:421 #, c-format msgid "Couldn't decode PKCS#12 file: %s" msgstr "PKCS#12 ফাইল ডিকোড করতে ব্যর্থ: %s" -#: ../libnm-util/crypto_gnutls.c:306 +#: ../libnm-util/crypto_gnutls.c:433 #, c-format msgid "Couldn't verify PKCS#12 file: %s" msgstr "PKCS#12 ফাইল যাচাই করতে ব্যর্থ: %s" -#: ../libnm-util/crypto_nss.c:57 -#: ../system-settings/plugins/ifcfg-rh/crypto.c:52 +#: ../libnm-util/crypto_nss.c:56 #, c-format msgid "Failed to initialize the crypto engine: %d." msgstr "ক্রিপ্টো ইঞ্জিন আরম্ভ করতে ব্যর্থ: %d।" @@ -199,105 +1078,184 @@ msgstr "ক্রিপ্টো ইঞ্জিন আরম্ভ করতে msgid "Failed to initialize the MD5 context: %d." msgstr "MD5 কনটেক্সট আরম্ভ করতে ব্যর্থ: %d।" -#: ../libnm-util/crypto_nss.c:186 +#: ../libnm-util/crypto_nss.c:179 +#, c-format +msgid "Invalid IV length (must be at least %d)." +msgstr "IV-র অবৈধ দৈর্ঘ্য (অন্তত %d হওয়া আবশ্যক)।" + +#: ../libnm-util/crypto_nss.c:196 #, c-format msgid "Failed to initialize the decryption cipher slot." msgstr "ডিক্রিপশন সাইফার স্লট আরম্ভ করতে ব্যর্থ।" -#: ../libnm-util/crypto_nss.c:196 +#: ../libnm-util/crypto_nss.c:206 #, c-format msgid "Failed to set symmetric key for decryption." msgstr "ডিক্রিপশনের উদ্দেশ্যে সিমেট্রিক-কি নির্ধারণ করতে ব্যর্থ।" -#: ../libnm-util/crypto_nss.c:206 +#: ../libnm-util/crypto_nss.c:216 #, c-format msgid "Failed to set IV for decryption." msgstr "ডিক্রিপশনের উদ্দেশ্যে IV নির্ধারণ করতে ব্যর্থ।" -#: ../libnm-util/crypto_nss.c:214 +#: ../libnm-util/crypto_nss.c:224 #, c-format msgid "Failed to initialize the decryption context." msgstr "ডিক্রিপশন কনটেক্সট আরম্ভ করতে ব্যর্থ।" -#: ../libnm-util/crypto_nss.c:227 +#: ../libnm-util/crypto_nss.c:237 #, c-format msgid "Failed to decrypt the private key: %d." msgstr "ব্যক্তিগত-কি ডিক্রিপ্ট করতে ব্যর্থ: %d।" -#: ../libnm-util/crypto_nss.c:239 +#: ../libnm-util/crypto_nss.c:245 +#, c-format +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "ব্যক্তিগত-কি ডিক্রিপ্ট করতে ব্যর্থ: ডিক্রিপ্ট করা তথ্য অত্যাধিক বড়।" + +#: ../libnm-util/crypto_nss.c:256 #, c-format msgid "Failed to finalize decryption of the private key: %d." msgstr "ব্যক্তিগত-কি'র ডিক্রিপশন সমাপ্ত করতে ব্যর্থ: %d।" -#: ../libnm-util/crypto_nss.c:284 +#: ../libnm-util/crypto_nss.c:364 +#, c-format +msgid "Failed to initialize the encryption cipher slot." +msgstr "এনক্রিপশন সাইফার স্লট আরম্ভ করতে ব্যর্থ।" + +#: ../libnm-util/crypto_nss.c:372 +#, c-format +msgid "Failed to set symmetric key for encryption." +msgstr "এনক্রিপশনের উদ্দেশ্যে সিমেট্রিক-কি নির্ধারণ করতে ব্যর্থ।" + +#: ../libnm-util/crypto_nss.c:380 +#, c-format +msgid "Failed to set IV for encryption." +msgstr "এনক্রিপশনের উদ্দেশ্যে IV নির্ধারণ করতে ব্যর্থ।" + +#: ../libnm-util/crypto_nss.c:388 +#, c-format +msgid "Failed to initialize the encryption context." +msgstr "এনক্রিপশন কনটেক্সট আরম্ভ করতে ব্যর্থ।" + +#: ../libnm-util/crypto_nss.c:396 +#, c-format +msgid "Failed to encrypt: %d." +msgstr "এনক্রিপ্ট করতে ব্যর্থ: %d।" + +#: ../libnm-util/crypto_nss.c:404 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "এনক্রিপ্ট করার পরে অপ্রত্যাশিত পরিমাণ তথ্য উপলব্ধ হয়েছে।" + +#: ../libnm-util/crypto_nss.c:447 #, c-format msgid "Couldn't decode certificate: %d" msgstr "সার্টিফিকেট ডিকোড করতে ব্যর্থ: %d" -#: ../libnm-util/crypto_nss.c:319 +#: ../libnm-util/crypto_nss.c:482 #, c-format msgid "Couldn't convert password to UCS2: %d" msgstr "পাসওয়ার্ডকে UCS2-তে রূপান্তর করতে ব্যর্থ: %d" -#: ../libnm-util/crypto_nss.c:347 +#: ../libnm-util/crypto_nss.c:510 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %d" msgstr "PKCS#12 ডিকোডার আরম্ভ করতে ব্যর্থ: %d" -#: ../libnm-util/crypto_nss.c:356 +#: ../libnm-util/crypto_nss.c:519 #, c-format msgid "Couldn't decode PKCS#12 file: %d" msgstr "PKCS#12 ফাইল ডিকোড করতে ব্যর্থ: %d" -#: ../libnm-util/crypto_nss.c:365 +#: ../libnm-util/crypto_nss.c:528 #, c-format msgid "Couldn't verify PKCS#12 file: %d" msgstr "PKCS#12 ফাইল যাচাই করতে ব্যর্থ: %d" -#: ../src/nm-netlink-monitor.c:194 ../src/nm-netlink-monitor.c:458 +#: ../libnm-util/crypto_nss.c:557 +msgid "Could not generate random data." +msgstr "র‍্যান্ড তথ্য নির্মাণ করতে ব্যর্থ।" + +#: ../libnm-util/nm-utils.c:1924 +#, c-format +msgid "Not enough memory to make encryption key." +msgstr "এনক্রিপশন-কি নির্মাণের জন্য পর্যাপ্ত মেমরি অনুপস্থিত।" + +#: ../libnm-util/nm-utils.c:2034 +msgid "Could not allocate memory for PEM file creation." +msgstr "PEM ফাইল নির্মাণের জন্য মেমরি বরাদ্দ করতে ব্যর্থ।" + +#: ../libnm-util/nm-utils.c:2046 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "PEM ফাইলের মধ্যে IV লেখার জন্য মেমরি বরাদ্দ করতে ব্যর্থ।" + +#: ../libnm-util/nm-utils.c:2058 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "PEM ফাইলের মধ্যে এনক্রিপ্ট করা কি লেখার জন্য মেমরি বরাদ্দ করা যায়নি।" + +#: ../libnm-util/nm-utils.c:2077 +#, c-format +msgid "Could not allocate memory for PEM file data." +msgstr "PEM ফাইলের তথ্যে সংরক্ষণের জন্য মেমরি বরাদ্দ করতে ব্যর্থ।" + +#: ../src/nm-netlink-monitor.c:100 ../src/nm-netlink-monitor.c:231 +#: ../src/nm-netlink-monitor.c:653 #, c-format msgid "error processing netlink message: %s" msgstr "netlink বার্তা প্রক্রিয়াকরণে ত্রুটি: %s" -#: ../src/nm-netlink-monitor.c:255 -#, c-format -msgid "unable to allocate netlink handle for monitoring link status: %s" -msgstr "লিংকের অবস্থা নিরীক্ষণের উদ্দেশ্যে netlink হ্যান্ডেল বরাদ্দ করতে ব্যর্থ: %s" +#: ../src/nm-netlink-monitor.c:214 +msgid "error occurred while waiting for data on socket" +msgstr "তথ্যের জন্য সকেটে অপেক্ষাকালে সমস্যা" -#: ../src/nm-netlink-monitor.c:265 +#: ../src/nm-netlink-monitor.c:254 #, c-format msgid "unable to connect to netlink for monitoring link status: %s" msgstr "লিংকের অবস্থা নিরীক্ষণের উদ্দেশ্যে netlink-র সাথে সংযোগ করতে ব্যর্থ: %s" -#: ../src/nm-netlink-monitor.c:273 +#: ../src/nm-netlink-monitor.c:265 #, c-format -msgid "unable to join netlink group for monitoring link status: %s" -msgstr "লিংকের অবস্থা নিরীক্ষণের উদ্দেশ্যে netlink দলে যোগ করতে ব্যর্থ: %s" +msgid "unable to enable netlink handle credential passing: %s" +msgstr "netlink হ্যান্ডেলের পরিচয়ের তথ্য পরিবহণের ব্যবস্থা সক্রিয় করতে ব্যর্থ: %s" -#: ../src/nm-netlink-monitor.c:281 +#: ../src/nm-netlink-monitor.c:291 ../src/nm-netlink-monitor.c:353 +#, c-format +msgid "unable to allocate netlink handle for monitoring link status: %s" +msgstr "লিংকের অবস্থা নিরীক্ষণের উদ্দেশ্যে netlink হ্যান্ডেল বরাদ্দ করতে ব্যর্থ: %s" + +#: ../src/nm-netlink-monitor.c:376 #, c-format msgid "unable to allocate netlink link cache for monitoring link status: %s" msgstr "লিংকের অবস্থা নিরীক্ষণের উদ্দেশ্যে netlink লিংক ক্যাশে বরাদ্দ করতে ব্যর্থ: %s" -#: ../src/nm-netlink-monitor.c:422 +#: ../src/nm-netlink-monitor.c:502 +#, c-format +msgid "unable to join netlink group: %s" +msgstr "netlink দলে যোগ করতে ব্যর্থ: %s" + +#: ../src/nm-netlink-monitor.c:629 ../src/nm-netlink-monitor.c:642 #, c-format msgid "error updating link cache: %s" msgstr "লিংক ক্যাশে আপডেট করতে সমস্যা: %s" -#: ../src/nm-netlink-monitor.c:488 -msgid "error occurred while waiting for data on socket" -msgstr "তথ্যের জন্য সকেটে অপেক্ষাকালে সমস্যা" - -#: ../src/NetworkManager.c:296 +#: ../src/main.c:502 #, c-format msgid "Invalid option. Please use --help to see a list of valid options.\n" msgstr "অবৈধ বিকল্প। বৈধ বিকল্পগুলির তালিকা দেখার জন্য অনুগ্রহ করে --help প্রয়োগ করুন।\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:97 +#: ../src/main.c:562 +#, c-format +msgid "%s. Please use --help to see a list of valid options.\n" +msgstr "%s। বৈধ বিকল্পগুলির তালিকা দেখার জন্য অনুগ্রহ করে --help প্রয়োগ করুন।\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:325 msgid "# Created by NetworkManager\n" msgstr "# NetworkManager দ্বারা নির্মিত\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:103 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:341 #, c-format msgid "" "# Merged from %s\n" @@ -306,28 +1264,89 @@ msgstr "" "# %s থেকে মার্জ করা হয়েছে\n" "\n" -#: ../src/named-manager/nm-named-manager.c:255 -msgid "NOTE: the libc resolver may not support more than 3 nameservers." -msgstr "উল্লেখ্য: libc resolver দ্বারা ৩-টির বেশি নেম-সার্ভার সমর্থিত না হওয়ার সম্ভাবনা রয়েছে।" +#: ../src/dhcp-manager/nm-dhcp-manager.c:279 +msgid "no usable DHCP client could be found." +msgstr "ব্যবহারযোগ্য DHCP ক্লায়েন্ট পাওয়া যায়নি।" -#: ../src/named-manager/nm-named-manager.c:257 +#: ../src/dhcp-manager/nm-dhcp-manager.c:288 +msgid "'dhclient' could be found." +msgstr "'dhclient' পাওয়া যায়নি।" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:298 +msgid "'dhcpcd' could be found." +msgstr "'dhcpcd' পাওয়া যায়নি।" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:306 +#, c-format +msgid "unsupported DHCP client '%s'" +msgstr "অসমর্থিত DHCP ক্লায়েন্ট '%s'" + +#: ../src/logging/nm-logging.c:146 +#, c-format +msgid "Unknown log level '%s'" +msgstr "লগের অজানা স্তর '%s'" + +#: ../src/logging/nm-logging.c:171 +#, c-format +msgid "Unknown log domain '%s'" +msgstr "অজানা লগ ডোমেইন '%s'" + +#: ../src/named-manager/nm-named-manager.c:343 +msgid "NOTE: the libc resolver may not support more than 3 nameservers." +msgstr "" +"উল্লেখ্য: libc resolver দ্বারা ৩-টির বেশি নেম-সার্ভার সমর্থিত না হওয়ার সম্ভাবনা " +"রয়েছে।" + +#: ../src/named-manager/nm-named-manager.c:345 msgid "The nameservers listed below may not be recognized." msgstr "নিম্নলিখিত নেম-সার্ভারগুলি সনাক্ত না হওয়ার সম্ভাবনা রয়েছে।" -#: ../system-settings/plugins/ifcfg-rh/reader.c:2149 -msgid "System" -msgstr "সিস্টেম" - -#: ../system-settings/src/nm-default-wired-connection.c:182 +#: ../src/system-settings/nm-default-wired-connection.c:157 #, c-format msgid "Auto %s" msgstr "স্বয়ংক্রিয় %s" +#: ../system-settings/plugins/ifcfg-rh/reader.c:3254 +msgid "System" +msgstr "সিস্টেম" + #: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "নিরাপদ ওয়াই-ফাইল নেটওয়ার্কের মাধ্যমে সংযোগের যৌথ ব্যবহার" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "উন্মুক্ত ওয়াই-ফাইল নেটওয়ার্কের মাধ্যমে সংযোগের যৌথ ব্যবহার" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "সিস্টেমের স্থায়ী হোস্ট-নেম পরিবর্তন করুন" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 msgid "Modify system connections" msgstr "সিস্টেমের সংযোগ পরিবর্তন করুন" -#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 msgid "System policy prevents modification of system settings" -msgstr "সিস্টেমে ব্যবহৃত নিয়ম-নীতির বিধিনিষেধের কারণে সিস্টেমের বৈশিষ্ট্য পরিবর্তন করা সম্ভব নয়" +msgstr "" +"সিস্টেমে ব্যবহৃত নিয়ম-নীতির বিধিনিষেধের কারণে সিস্টেমের বৈশিষ্ট্য পরিবর্তন করা সম্ভব " +"নয়" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +msgid "System policy prevents modification of the persistent system hostname" +msgstr "" +"সিস্টেমে ব্যবহৃত নিয়ম-নীতির বিধিনিষেধের কারণে সিস্টেমের স্থায়ী হোস্ট-নেম পরিবর্তন " +"করা সম্ভব নয়" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "" +"সিস্টেমের নিয়মনীতির কারণে, নিরাপদ ওয়াই-ফাই নেটওয়ার্কের মাধ্যমে সংযোগের যৌথ " +"ব্যবহার প্রতিরোধ করা হয়েছে" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "" +"সিস্টেমের নিয়মনীতির কারণে, উন্মুক্ত ওয়াই-ফাই নেটওয়ার্কের মাধ্যমে সংযোগের যৌথ " +"ব্যবহার প্রতিরোধ করা হয়েছে" diff --git a/po/cs.po b/po/cs.po index ed0ac8c904..1be6b82e1a 100644 --- a/po/cs.po +++ b/po/cs.po @@ -5,66 +5,1283 @@ # Miloslav Trmac , 2004 - 2006. # Jakub Friedl , 2006. # Jiří Eischmann , 2008. -# +# Marek Černocký , 2010. msgid "" msgstr "" "Project-Id-Version: NetworkManager\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-09-17 22:27+0200\n" -"PO-Revision-Date: 2008-09-17 22:08+0200\n" -"Last-Translator: Petr Kovar \n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" +"product=NetworkManager&component=general\n" +"POT-Creation-Date: 2010-04-09 03:24+0000\n" +"PO-Revision-Date: 2010-04-23 13:02+0200\n" +"Last-Translator: Marek Černocký \n" "Language-Team: Czech \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -#: ../src/nm-netlink-monitor.c:193 ../src/nm-netlink-monitor.c:474 +#: ../cli/src/connections.c:86 +#, c-format +msgid "" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" +msgstr "" +"Použití: nmcli con {PŘÍKAZ | help}\n" +" PŘÍKAZ := {list | status | up | down}\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--" +"timeout <časový_limit>]\n" +" down id | uuid \n" + +#: ../cli/src/connections.c:158 +msgid "Connections" +msgstr "Připojení" + +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/devices.c:298 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "Type" +msgstr "Typ" + +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "UUID" +msgstr "UUID" + +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Name" +msgstr "Název" + +#: ../cli/src/connections.c:163 +#, c-format +msgid "System connections:\n" +msgstr "Systémová připojení:\n" + +#: ../cli/src/connections.c:167 +#, c-format +msgid "User connections:\n" +msgstr "Uživatelská připojení:\n" + +#: ../cli/src/connections.c:178 ../cli/src/connections.c:967 +#: ../cli/src/connections.c:983 ../cli/src/connections.c:992 +#: ../cli/src/connections.c:1003 ../cli/src/connections.c:1085 +#: ../cli/src/devices.c:604 ../cli/src/devices.c:614 ../cli/src/devices.c:699 +#: ../cli/src/devices.c:785 ../cli/src/devices.c:792 +#, c-format +msgid "Error: %s argument is missing." +msgstr "Chyba: schází argument %s." + +#: ../cli/src/connections.c:189 +#, c-format +msgid "Error: %s - no such connection." +msgstr "Chyba: %s - takové připojení neexistuje." + +#: ../cli/src/connections.c:196 +msgid "System-wide connections" +msgstr "Připojení v rámci systému" + +#: ../cli/src/connections.c:205 +msgid "User connections" +msgstr "Uživatelská připojení" + +#: ../cli/src/connections.c:212 ../cli/src/connections.c:1016 +#: ../cli/src/connections.c:1103 ../cli/src/devices.c:446 +#: ../cli/src/devices.c:494 ../cli/src/devices.c:628 ../cli/src/devices.c:706 +#: ../cli/src/devices.c:798 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "Neznámý parametr: %s\n" + +#: ../cli/src/connections.c:221 +#, c-format +msgid "Error: no valid parameter specified." +msgstr "Chyba: nezadán žádný platný parametr." + +#. FIXME: Fix the output +#: ../cli/src/connections.c:268 ../cli/src/devices.c:302 +#: ../cli/src/devices.c:321 ../cli/src/devices.c:353 ../cli/src/devices.c:355 +#: ../cli/src/devices.c:357 ../cli/src/devices.c:359 ../cli/src/devices.c:361 +msgid "yes" +msgstr "ano" + +#: ../cli/src/connections.c:268 ../cli/src/devices.c:304 +msgid "no" +msgstr "ne" + +#: ../cli/src/connections.c:297 +msgid "Active connections" +msgstr "Aktivní připojení" + +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +#: ../cli/src/devices.c:302 ../cli/src/devices.c:304 +msgid "Default" +msgstr "Výchozí" + +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Service" +msgstr "Služba" + +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Devices" +msgstr "Zařízení" + +#: ../cli/src/connections.c:659 +#, c-format +msgid "no active connection on device '%s'" +msgstr "žádné aktivní připojení nebo zařízení „%s“" + +#: ../cli/src/connections.c:667 +#, c-format +msgid "no active connection or device" +msgstr "žádné aktivní připojení nebo zařízení" + +#: ../cli/src/connections.c:730 +msgid "activating" +msgstr "aktivuje se" + +#: ../cli/src/connections.c:732 +msgid "activated" +msgstr "aktivováno" + +#: ../cli/src/connections.c:735 ../cli/src/connections.c:758 +#: ../cli/src/connections.c:791 ../cli/src/devices.c:111 +#: ../cli/src/network-manager.c:76 ../cli/src/network-manager.c:98 +msgid "unknown" +msgstr "neznámo" + +#: ../cli/src/connections.c:744 +msgid "VPN connecting (prepare)" +msgstr "VPN se připojuje (příprava)" + +#: ../cli/src/connections.c:746 +msgid "VPN connecting (need authentication)" +msgstr "VPN se připojuje (požaduje ověření)" + +#: ../cli/src/connections.c:748 +msgid "VPN connecting" +msgstr "VPN se připojuje" + +#: ../cli/src/connections.c:750 +msgid "VPN connecting (getting IP configuration)" +msgstr "VPN se připojuje (získává se nastavení IP)" + +#: ../cli/src/connections.c:752 +msgid "VPN connected" +msgstr "VPN připojena" + +#: ../cli/src/connections.c:754 +msgid "VPN connection failed" +msgstr "VPN se nezdařilo připojit" + +#: ../cli/src/connections.c:756 +msgid "VPN disconnected" +msgstr "VPN odpojena" + +#: ../cli/src/connections.c:767 +msgid "unknown reason" +msgstr "neznámý důvod" + +#: ../cli/src/connections.c:769 +msgid "none" +msgstr "žádný" + +#: ../cli/src/connections.c:771 +msgid "the user was disconnected" +msgstr "uživatel byl odpojen" + +#: ../cli/src/connections.c:773 +msgid "the base network connection was interrupted" +msgstr "základní síťové připojení bylo přerušeno" + +#: ../cli/src/connections.c:775 +msgid "the VPN service stopped unexpectedly" +msgstr "služba VPN neočekávaně zastavena" + +#: ../cli/src/connections.c:777 +msgid "the VPN service returned invalid configuration" +msgstr "služba VPN vrátila neplatné nastavení" + +#: ../cli/src/connections.c:779 +msgid "the connection attempt timed out" +msgstr "pokusu o připojení vypršel časový limit" + +#: ../cli/src/connections.c:781 +msgid "the VPN service did not start in time" +msgstr "služba VPN se nespustila v časovém limitu" + +#: ../cli/src/connections.c:783 +msgid "the VPN service failed to start" +msgstr "službu VPN se nezdařilo spustit" + +#: ../cli/src/connections.c:785 +msgid "no valid VPN secrets" +msgstr "žádná platná utajení VPN" + +#: ../cli/src/connections.c:787 +msgid "invalid VPN secrets" +msgstr "neplatná utajení VPN" + +#: ../cli/src/connections.c:789 +msgid "the connection was removed" +msgstr "připojení odstraněno" + +#: ../cli/src/connections.c:803 +#, c-format +msgid "state: %s\n" +msgstr "stav: %s\n" + +#: ../cli/src/connections.c:806 ../cli/src/connections.c:832 +#, c-format +msgid "Connection activated\n" +msgstr "Připojení aktivováno\n" + +#: ../cli/src/connections.c:809 +#, c-format +msgid "Error: Connection activation failed." +msgstr "Chyba: Selhala aktivace připojení." + +#: ../cli/src/connections.c:828 +#, c-format +msgid "state: %s (%d)\n" +msgstr "stav: %s (%d)\n" + +#: ../cli/src/connections.c:838 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "Chyba: Selhala aktivace připojení: %s" + +#: ../cli/src/connections.c:855 ../cli/src/devices.c:551 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "Chyba: Časový limit %d sekund vypršel." + +#: ../cli/src/connections.c:898 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "Chyba: Selhala aktivace připojení: %s" + +#: ../cli/src/connections.c:912 +#, c-format +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "Chyba: Získání aktivního připojení pro „%s“ selhalo." + +#: ../cli/src/connections.c:921 +#, c-format +msgid "Active connection state: %s\n" +msgstr "Stav aktivního připojení: %s\n" + +#: ../cli/src/connections.c:922 +#, c-format +msgid "Active connection path: %s\n" +msgstr "Cesta aktivního připojení: %s\n" + +#: ../cli/src/connections.c:976 ../cli/src/connections.c:1094 +#, c-format +msgid "Error: Unknown connection: %s." +msgstr "Chyba: Neznámé připojení: %s." + +#: ../cli/src/connections.c:1011 ../cli/src/devices.c:622 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "Chyba: hodnota časového limitu „%s“ není platná." + +#: ../cli/src/connections.c:1024 ../cli/src/connections.c:1111 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "Chyba: nebylo určeno id nebo uuid." + +#: ../cli/src/connections.c:1044 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "Chyba: Nenalezeno vhodné zařízení: %s." + +#: ../cli/src/connections.c:1046 +#, c-format +msgid "Error: No suitable device found." +msgstr "Chyba: Nenalezeno vhodné zařízení." + +#: ../cli/src/connections.c:1138 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "Varování: Připojení není aktivní\n" + +#: ../cli/src/connections.c:1189 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "Chyba: příkaz „%s“ není pro „con“ platný." + +#: ../cli/src/connections.c:1216 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "Chyba: nelze se připojit ke sběrnici D-Bus." + +#: ../cli/src/connections.c:1223 +#, c-format +msgid "Error: Could not get system settings." +msgstr "Chyba: Nelze získat systémová nastavení." + +#: ../cli/src/connections.c:1231 +#, c-format +msgid "Error: Could not get user settings." +msgstr "Chyba: Nelze získat uživatelská nastavení." + +#: ../cli/src/connections.c:1241 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "Chyba: Nelze získat připojení: služba správy nastavení neběží." + +#: ../cli/src/devices.c:73 +#, c-format +msgid "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] | apinfo iface hwaddr ]\n" +"\n" +msgstr "" +"Použití: nmcli dev {PŘÍKAZ | help}\n" +"\n" +" PŘÍKAZ := {status | list | disconnect | wifi}\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout <časový_limit>]\n" +" wifi [list [iface ] | apinfo iface hwaddr " +"]\n" +"\n" + +#: ../cli/src/devices.c:93 +msgid "unmanaged" +msgstr "není pod správou" + +#: ../cli/src/devices.c:95 +msgid "unavailable" +msgstr "nedostupné" + +#: ../cli/src/devices.c:97 ../cli/src/network-manager.c:73 +msgid "disconnected" +msgstr "odpojeno" + +#: ../cli/src/devices.c:99 +msgid "connecting (prepare)" +msgstr "připojuje se (příprava)" + +#: ../cli/src/devices.c:101 +msgid "connecting (configuring)" +msgstr "připojuje se (nastavování)" + +#: ../cli/src/devices.c:103 +msgid "connecting (need authentication)" +msgstr "připojuje se (požadováno ověření)" + +#: ../cli/src/devices.c:105 +msgid "connecting (getting IP configuration)" +msgstr "připojuje se (získává se nastavení IP)" + +#: ../cli/src/devices.c:107 ../cli/src/network-manager.c:71 +msgid "connected" +msgstr "připojeno" + +#: ../cli/src/devices.c:109 +msgid "connection failed" +msgstr "připojení se nezdařilo" + +#: ../cli/src/devices.c:132 ../cli/src/devices.c:876 +msgid "Unknown" +msgstr "Neznámý" + +#. print them +#: ../cli/src/devices.c:164 ../cli/src/devices.c:266 ../cli/src/devices.c:861 +#: ../cli/src/devices.c:879 +msgid "(none)" +msgstr "(nic)" + +#: ../cli/src/devices.c:209 +#, c-format +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s: chyba převodu adresy IP4 0x%X" + +#: ../cli/src/devices.c:238 +#, c-format +msgid "%s, %s, Freq %d MHz, Rate %d Mb/s, Strength %d" +msgstr "%s, %s, Frekv %d MHz, Rychlost %d Mb/s, Síla sig %d" + +#: ../cli/src/devices.c:239 +msgid "Ad-Hoc" +msgstr "Ad-Hoc" + +#: ../cli/src/devices.c:248 +msgid ", Encrypted: " +msgstr ", Šifrováno: " + +#: ../cli/src/devices.c:253 +msgid " WEP" +msgstr " WEP" + +#: ../cli/src/devices.c:255 +msgid " WPA" +msgstr " WPA" + +#: ../cli/src/devices.c:257 +msgid " WPA2" +msgstr " WPA2" + +#: ../cli/src/devices.c:260 +msgid " Enterprise" +msgstr " Podnikové" + +#: ../cli/src/devices.c:294 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "Device" +msgstr "Zařízení" + +#: ../cli/src/devices.c:299 +msgid "Driver" +msgstr "Ovladač" + +#: ../cli/src/devices.c:299 ../cli/src/devices.c:567 +msgid "(unknown)" +msgstr "(neznámo)" + +#: ../cli/src/devices.c:300 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "State" +msgstr "Stav" + +#: ../cli/src/devices.c:313 +msgid "HW Address" +msgstr "HW adresa" + +#: ../cli/src/devices.c:319 +#, c-format +msgid "" +"\n" +" Capabilities:\n" +msgstr "" +"\n" +" Schopnosti:\n" + +#: ../cli/src/devices.c:321 +msgid "Carrier Detect" +msgstr "Detekce nosného signálu" + +#: ../cli/src/devices.c:336 +#, c-format +msgid "%u Mb/s" +msgstr "%u Mb/s" + +#: ../cli/src/devices.c:337 +msgid "Speed" +msgstr "Rychlost" + +#: ../cli/src/devices.c:348 +#, c-format +msgid "" +"\n" +" Wireless Properties\n" +msgstr "" +"\n" +" Vlastnosti bezdrátové části\n" + +#: ../cli/src/devices.c:353 +msgid "WEP Encryption" +msgstr "Šifrování WEP" + +#: ../cli/src/devices.c:355 +msgid "WPA Encryption" +msgstr "Šifrování WPA" + +#: ../cli/src/devices.c:357 +msgid "WPA2 Encryption" +msgstr "Šifrování WPA2" + +#: ../cli/src/devices.c:359 +msgid "TKIP cipher" +msgstr "Šifra TKIP" + +#: ../cli/src/devices.c:361 +msgid "CCMP cipher" +msgstr "Šifra CCMP" + +#: ../cli/src/devices.c:368 +#, c-format +msgid "" +"\n" +" Wireless Access Points %s\n" +msgstr "" +"\n" +" Bezdrátový přístupový bod %s\n" + +#: ../cli/src/devices.c:368 +msgid "(* = current AP)" +msgstr "(* = aktuální přístupový bod)" + +#: ../cli/src/devices.c:374 +#, c-format +msgid "" +"\n" +" Wired Properties\n" +msgstr "" +"\n" +" Vlastnosti drátové části\n" + +#: ../cli/src/devices.c:377 ../cli/src/devices.c:379 +msgid "Carrier" +msgstr "Nosný signál" + +#: ../cli/src/devices.c:377 +msgid "on" +msgstr "zapnut" + +#: ../cli/src/devices.c:379 +msgid "off" +msgstr "vypnut" + +#: ../cli/src/devices.c:387 +#, c-format +msgid "" +"\n" +" IPv4 Settings:\n" +msgstr "" +"\n" +" Nastavení IPv4:\n" + +#: ../cli/src/devices.c:395 +msgid "Address" +msgstr "Adresa" + +#: ../cli/src/devices.c:401 +msgid "Prefix" +msgstr "Předčíslí" + +#: ../cli/src/devices.c:405 +msgid "Gateway" +msgstr "Brána" + +#: ../cli/src/devices.c:416 +msgid "DNS" +msgstr "DNS" + +#: ../cli/src/devices.c:458 +msgid "Status of devices" +msgstr "Stav zařízení" + +#: ../cli/src/devices.c:487 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "Chyba: schází argument „%s“." + +#: ../cli/src/devices.c:516 ../cli/src/devices.c:655 ../cli/src/devices.c:729 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "Chyba: Zařízení „%s“ nenalezeno." + +#: ../cli/src/devices.c:539 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "Úspěch: Zařízení „%s“ úspěšně odpojeno." + +#: ../cli/src/devices.c:564 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "Chyba: Odpojení zařízení „%s“ (%s) selhalo: %s" + +#: ../cli/src/devices.c:572 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "Stav zařízení: %d (%s)\n" + +#: ../cli/src/devices.c:636 +#, c-format +msgid "Error: iface has to be specified." +msgstr "Chyba: nebylo určeno rozhraní." + +#: ../cli/src/devices.c:736 ../cli/src/devices.c:746 +msgid "WiFi scan list" +msgstr "Seznam prohledání WiFi" + +#: ../cli/src/devices.c:740 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "Chyba: Zařízení „%s“ není zařízení WiFi." + +#: ../cli/src/devices.c:754 +msgid "Device:" +msgstr "Zařízení:" + +#: ../cli/src/devices.c:806 +#, c-format +msgid "Error: hwaddr has to be specified." +msgstr "Chyba: musí být určena hardwarová adresa." + +#: ../cli/src/devices.c:844 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "Chyba: Přístupový bod s hardwarovou adresou „%s“ nenalezen." + +#: ../cli/src/devices.c:862 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" + +#: ../cli/src/devices.c:863 +#, c-format +msgid "%u MB/s" +msgstr "%u MB/s" + +#: ../cli/src/devices.c:869 ../cli/src/devices.c:871 +msgid "AP parameters" +msgstr "Parametry přístupového bodu" + +#: ../cli/src/devices.c:873 +msgid "SSID:" +msgstr "SSID:" + +#: ../cli/src/devices.c:874 +msgid "BSSID:" +msgstr "BSSID:" + +#: ../cli/src/devices.c:875 +msgid "Frequency:" +msgstr "Kmitočet:" + +#: ../cli/src/devices.c:876 +msgid "Mode:" +msgstr "Režim:" + +#: ../cli/src/devices.c:876 +msgid "Ad-hoc" +msgstr "Ad-hoc" + +#: ../cli/src/devices.c:876 +msgid "Infrastructure" +msgstr "Infrastruktura" + +#: ../cli/src/devices.c:877 +msgid "Maximal bitrate:" +msgstr "Max. přenosová rychlost:" + +#: ../cli/src/devices.c:878 +msgid "Strength:" +msgstr "Síla signálu:" + +#: ../cli/src/devices.c:879 +msgid "Flags:" +msgstr "Příznaky:" + +#: ../cli/src/devices.c:879 +msgid "privacy" +msgstr "soukromé" + +#: ../cli/src/devices.c:880 +msgid "WPA flags:" +msgstr "Příznaky WPA:" + +#: ../cli/src/devices.c:881 +msgid "RSN flags:" +msgstr "Příznaky RSN:" + +#: ../cli/src/devices.c:907 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "Chyba: příkaz „%s“ není pro „dev wifi“ platný." + +#: ../cli/src/devices.c:943 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "Chyba: příkaz „%s“ není pro „dev“ platný." + +#: ../cli/src/network-manager.c:46 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" +msgstr "" +"Použití: nmcli nm {PŘÍKAZ | help}\n" +"\n" +" PŘÍKAZ := {status | sleep | wakeup | wifi | wwan}\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + +#: ../cli/src/network-manager.c:67 +msgid "asleep" +msgstr "uspán" + +#: ../cli/src/network-manager.c:69 +msgid "connecting" +msgstr "připojuje se" + +#: ../cli/src/network-manager.c:93 ../cli/src/network-manager.c:94 +#: ../cli/src/network-manager.c:95 ../cli/src/network-manager.c:96 +#: ../cli/src/network-manager.c:143 ../cli/src/network-manager.c:160 +msgid "enabled" +msgstr "povoleno" + +#: ../cli/src/network-manager.c:93 ../cli/src/network-manager.c:94 +#: ../cli/src/network-manager.c:95 ../cli/src/network-manager.c:96 +#: ../cli/src/network-manager.c:143 ../cli/src/network-manager.c:160 +msgid "disabled" +msgstr "zakázáno" + +#: ../cli/src/network-manager.c:102 +msgid "NetworkManager status" +msgstr "Stav správce sítě NetworkManager" + +#: ../cli/src/network-manager.c:104 +msgid "NM running:" +msgstr "Běh NM:" + +#: ../cli/src/network-manager.c:104 +msgid "running" +msgstr "běží" + +#: ../cli/src/network-manager.c:104 +msgid "not running" +msgstr "neběží" + +#: ../cli/src/network-manager.c:105 +msgid "NM state:" +msgstr "Stav NM:" + +#: ../cli/src/network-manager.c:106 +msgid "NM wireless hardware:" +msgstr "Bezdrátový hardware NM:" + +#. no argument, show current state +#: ../cli/src/network-manager.c:107 ../cli/src/network-manager.c:143 +msgid "NM wireless:" +msgstr "Bezdrátové sítě NM:" + +#: ../cli/src/network-manager.c:108 +msgid "NM WWAN hardware:" +msgstr "Hardware WWAN NM" + +#. no argument, show current state +#: ../cli/src/network-manager.c:109 ../cli/src/network-manager.c:160 +msgid "NM WWAN:" +msgstr "Sítě WWAN NM:" + +#: ../cli/src/network-manager.c:150 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "Chyba: neplatný parametr pro „wifi“: „%s“" + +#: ../cli/src/network-manager.c:167 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "Chyba: neplatný parametr pro „wwan“: „%s“" + +#: ../cli/src/network-manager.c:178 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "Chyba: příkaz „%s“ není pro „nm“ platný." + +#: ../cli/src/nmcli.c:65 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"Použití: %s [PŘEPÍNAČE] OBJEKT {PŘÍKAZ | help}\n" +"\n" +"PŘEPÍNAČE\n" +" -t[erse] stručný výpis\n" +" -p[retty] hezký výpis\n" +" -v[ersion] zobrazit verzi programu\n" +" -h[elp] zobrazit tuto nápovědu\n" +"\n" +"OBJEKT\n" +" nm stav NetworkManageru\n" +" con připojení v NetworkManageru\n" +" dev zařízení spravovaná NetworkManagerem\n" +"\n" + +#: ../cli/src/nmcli.c:106 +#, c-format +msgid "Object '%s' is unknown, try 'nmcli help'." +msgstr "Objekt „%s“ je neznámý, zkuste „nmcli help“." + +#: ../cli/src/nmcli.c:139 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "nástroj nmcli, verze %s\n" + +#: ../cli/src/nmcli.c:145 +#, c-format +msgid "Option '%s' is unknown, try 'nmcli -help'." +msgstr "Přepínač „%s“ je neznámý, zkuste „nmcli -help“." + +#: ../cli/src/nmcli.c:164 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "Zachycen signál %d, vypíná se…" + +#: ../cli/src/nmcli.c:189 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "Chyba: Nelze se připojit ke správci sítě NetworkManager." + +#: ../cli/src/nmcli.c:205 +msgid "Success" +msgstr "Úspěch" + +#: ../libnm-util/crypto.c:120 +#, c-format +msgid "PEM key file had no end tag '%s'." +msgstr "Soubor klíče PEM neměl koncovou značku „%s“." + +#: ../libnm-util/crypto.c:130 +#, c-format +msgid "Doesn't look like a PEM private key file." +msgstr "Nevypadá jako soubor soukromého klíče PEM." + +#: ../libnm-util/crypto.c:138 +#, c-format +msgid "Not enough memory to store PEM file data." +msgstr "Není dostatek paměti pro uložení dat souboru PEM." + +#: ../libnm-util/crypto.c:154 +#, c-format +msgid "Malformed PEM file: Proc-Type was not first tag." +msgstr "Vadný soubor PEM: značka Proc-Type nebyla první značkou." + +#: ../libnm-util/crypto.c:162 +#, c-format +msgid "Malformed PEM file: unknown Proc-Type tag '%s'." +msgstr "Vadný soubor PEM: neznámá značka Proc-Type „%s“." + +#: ../libnm-util/crypto.c:172 +#, c-format +msgid "Malformed PEM file: DEK-Info was not the second tag." +msgstr "Vadný soubor PEM: značka DEK-Info nebyla druhou značkou." + +#: ../libnm-util/crypto.c:183 +#, c-format +msgid "Malformed PEM file: no IV found in DEK-Info tag." +msgstr "Vadný soubor PEM: nebyl nalezen IV ve značce DEK-Info." + +#: ../libnm-util/crypto.c:190 +#, c-format +msgid "Malformed PEM file: invalid format of IV in DEK-Info tag." +msgstr "Vadný soubor PEM: neplatný formát IV ve značce DEK-Info." + +#: ../libnm-util/crypto.c:203 +#, c-format +msgid "Malformed PEM file: unknown private key cipher '%s'." +msgstr "Vadný soubor PEM: neznámá šifra soukromého klíče „%s“." + +#: ../libnm-util/crypto.c:222 +#, c-format +msgid "Could not decode private key." +msgstr "Nelze dekódovat soukromý klíč." + +#: ../libnm-util/crypto.c:267 +#, c-format +msgid "PEM certificate '%s' had no end tag '%s'." +msgstr "Certifikát PEM „%s“ nemá koncovou značku „%s“." + +#: ../libnm-util/crypto.c:277 +#, c-format +msgid "Failed to decode certificate." +msgstr "Selhalo dekódování certifikátu." + +#: ../libnm-util/crypto.c:286 +#, c-format +msgid "Not enough memory to store certificate data." +msgstr "Nedostatek paměti pro uložení dat certifikátu." + +#: ../libnm-util/crypto.c:294 +#, c-format +#| msgid "Not enough memory to store PEM file data." +msgid "Not enough memory to store file data." +msgstr "Nedostatek paměti na uložení dat souboru." + +#: ../libnm-util/crypto.c:324 +#, c-format +msgid "IV must be an even number of bytes in length." +msgstr "IV musí mít na délku sudý počet bajtů." + +#: ../libnm-util/crypto.c:333 +#, c-format +msgid "Not enough memory to store the IV." +msgstr "Nedostatek paměti pro uložení IV." + +#: ../libnm-util/crypto.c:344 +#, c-format +msgid "IV contains non-hexadecimal digits." +msgstr "IV obsahuje jiné než šestnáctkové číslice." + +#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:336 +#, c-format +msgid "Private key cipher '%s' was unknown." +msgstr "Šifra soukromého klíče „%s“ je neznámá." + +#: ../libnm-util/crypto.c:391 +#, c-format +#| msgid "Not enough memory to store decrypted private key." +msgid "Not enough memory to decrypt private key." +msgstr "Nedostatek paměti pro dešifrování soukromého klíče." + +#: ../libnm-util/crypto.c:511 +#, c-format +#| msgid "Failed to decrypt the private key: %d." +msgid "Unable to determine private key type." +msgstr "Nelze určit typ soukromého klíče." + +#: ../libnm-util/crypto.c:530 +#, c-format +msgid "Not enough memory to store decrypted private key." +msgstr "Nedostatek paměti pro uložení dešifrovaného soukromého klíče." + +#: ../libnm-util/crypto_gnutls.c:49 +msgid "Failed to initialize the crypto engine." +msgstr "Selhala inicializace šifrovacího programu." + +#: ../libnm-util/crypto_gnutls.c:93 +#, c-format +msgid "Failed to initialize the MD5 engine: %s / %s." +msgstr "Selhala inicializace programu pro MD5: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "Neplatná délka IV (musí být nejméně %zd)." + +#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188 +#, c-format +msgid "Not enough memory for decrypted key buffer." +msgstr "Nedostatek paměti pro vyrovnávací paměť dešifrovaného klíče." + +#: ../libnm-util/crypto_gnutls.c:173 +#, c-format +msgid "Failed to initialize the decryption cipher context: %s / %s." +msgstr "Selhala inicializace kontextu dešifrovací šifry: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:182 +#, c-format +msgid "Failed to set symmetric key for decryption: %s / %s." +msgstr "Selhalo nastavení symetrického klíče pro dešifrování: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:191 +#, c-format +msgid "Failed to set IV for decryption: %s / %s." +msgstr "Selhalo nastavení IV pro dekódování: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:200 +#, c-format +msgid "Failed to decrypt the private key: %s / %s." +msgstr "Selhalo dekódování soukromého klíče: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 +#, c-format +#| msgid "Failed to decrypt the private key: %d." +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "Selhalo dešifrování soukromého klíče: neočekávané zarovnání délky." + +#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 +#, c-format +#| msgid "Failed to decrypt the private key: %d." +msgid "Failed to decrypt the private key." +msgstr "Selhalo dešifrování soukromého klíče." + +#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "Nelze alokovat paměť pro šifrování." + +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +#| msgid "Failed to initialize the decryption cipher context: %s / %s." +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "Selhala inicializace kontextu šifrovací šifry: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +#| msgid "Failed to set symmetric key for decryption: %s / %s." +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "Selhalo nastavení symetrického klíče pro šifrování: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +#| msgid "Failed to set IV for decryption: %s / %s." +msgid "Failed to set IV for encryption: %s / %s." +msgstr "Selhalo nastavení IV pro šifrování: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +#| msgid "Failed to decrypt the private key: %s / %s." +msgid "Failed to encrypt the data: %s / %s." +msgstr "Selhalo šifrování dat: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:362 +#, c-format +msgid "Error initializing certificate data: %s" +msgstr "Chyba při inicializaci dat certifikátu: %s" + +#: ../libnm-util/crypto_gnutls.c:384 +#, c-format +msgid "Couldn't decode certificate: %s" +msgstr "Nelze dekódovat certifikát: %s" + +#: ../libnm-util/crypto_gnutls.c:408 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %s" +msgstr "Nelze inicializovat dekodér PKCS#12: %s" + +#: ../libnm-util/crypto_gnutls.c:421 +#, c-format +#| msgid "Couldn't decode certificate: %s" +msgid "Couldn't decode PKCS#12 file: %s" +msgstr "Nelze dekódovat soubor PKCS#12: %s" + +#: ../libnm-util/crypto_gnutls.c:433 +#, c-format +#| msgid "Couldn't decode certificate: %s" +msgid "Couldn't verify PKCS#12 file: %s" +msgstr "Nelze ověřit soubor PKCS#12: %s" + +#: ../libnm-util/crypto_nss.c:56 +#, c-format +msgid "Failed to initialize the crypto engine: %d." +msgstr "Selhala inicializace šifrovacího programu: %d." + +#: ../libnm-util/crypto_nss.c:111 +#, c-format +msgid "Failed to initialize the MD5 context: %d." +msgstr "Selhala inicializace kontextu MD5: %d." + +#: ../libnm-util/crypto_nss.c:179 +#, c-format +msgid "Invalid IV length (must be at least %d)." +msgstr "Neplatná délka IV (musí být nejméně %d)." + +#: ../libnm-util/crypto_nss.c:196 +#, c-format +msgid "Failed to initialize the decryption cipher slot." +msgstr "Selhala inicializace slotu dešifrovací šifry." + +#: ../libnm-util/crypto_nss.c:206 +#, c-format +msgid "Failed to set symmetric key for decryption." +msgstr "Selhalo nastavení symetrického klíče pro dešifrování." + +#: ../libnm-util/crypto_nss.c:216 +#, c-format +msgid "Failed to set IV for decryption." +msgstr "Selhalo nastavení IV pro dešifrování." + +#: ../libnm-util/crypto_nss.c:224 +#, c-format +msgid "Failed to initialize the decryption context." +msgstr "Selhala inicializace dešifrovacího kontextu." + +#: ../libnm-util/crypto_nss.c:237 +#, c-format +msgid "Failed to decrypt the private key: %d." +msgstr "Selhalo dešifrování soukromého klíče: %d." + +#: ../libnm-util/crypto_nss.c:245 +#, c-format +#| msgid "Failed to decrypt the private key: %d." +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "" +"Selhalo dešifrování soukromého klíče: dešifrovaná data jsou příliš velká." + +#: ../libnm-util/crypto_nss.c:256 +#, c-format +msgid "Failed to finalize decryption of the private key: %d." +msgstr "Selhalo dokončení dešifrování soukromého klíče: %d." + +#: ../libnm-util/crypto_nss.c:364 +#, c-format +#| msgid "Failed to initialize the decryption cipher slot." +msgid "Failed to initialize the encryption cipher slot." +msgstr "Selhala inicializace slotu šifrovací šifry." + +#: ../libnm-util/crypto_nss.c:372 +#, c-format +#| msgid "Failed to set symmetric key for decryption." +msgid "Failed to set symmetric key for encryption." +msgstr "Selhalo nastavení symetrického klíče pro šifrování." + +#: ../libnm-util/crypto_nss.c:380 +#, c-format +#| msgid "Failed to set IV for decryption." +msgid "Failed to set IV for encryption." +msgstr "Selhalo nastavení IV pro šifrování." + +#: ../libnm-util/crypto_nss.c:388 +#, c-format +#| msgid "Failed to initialize the decryption context." +msgid "Failed to initialize the encryption context." +msgstr "Selhala inicializace kontextu šifrování." + +#: ../libnm-util/crypto_nss.c:396 +#, c-format +#| msgid "Failed to decrypt the private key: %d." +msgid "Failed to encrypt: %d." +msgstr "Selhalo šifrování: %d" + +#: ../libnm-util/crypto_nss.c:404 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "Neočekávané množství dat po zašifrování." + +#: ../libnm-util/crypto_nss.c:447 +#, c-format +msgid "Couldn't decode certificate: %d" +msgstr "Nelze dekódovat certifikát: %d" + +#: ../libnm-util/crypto_nss.c:482 +#, c-format +msgid "Couldn't convert password to UCS2: %d" +msgstr "Nelze převést heslo na UCS2: %d" + +#: ../libnm-util/crypto_nss.c:510 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %d" +msgstr "Nelze inicializovat dekodér PKCS#12: %d" + +#: ../libnm-util/crypto_nss.c:519 +#, c-format +#| msgid "Couldn't decode certificate: %d" +msgid "Couldn't decode PKCS#12 file: %d" +msgstr "Nelze dekódovat soubor PKCS#12: %d" + +#: ../libnm-util/crypto_nss.c:528 +#, c-format +#| msgid "Couldn't decode certificate: %d" +msgid "Couldn't verify PKCS#12 file: %d" +msgstr "Nelze ověřit soubor PKCS#12: %d" + +#: ../libnm-util/crypto_nss.c:557 +#| msgid "Could not decode private key." +msgid "Could not generate random data." +msgstr "Nelze vygenerovat náhodná data." + +#: ../libnm-util/nm-utils.c:1818 +#, c-format +#| msgid "Not enough memory to create private key decryption key." +msgid "Not enough memory to make encryption key." +msgstr "Nedostatek paměti pro vytvoření šifrovacího klíče." + +#: ../libnm-util/nm-utils.c:1928 +#| msgid "Not enough memory to store PEM file data." +msgid "Could not allocate memory for PEM file creation." +msgstr "Nelze alokovat paměť pro vytvoření souboru PEM." + +#: ../libnm-util/nm-utils.c:1940 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "Nelze alokovat paměť pro zápis IV do souboru PEM." + +#: ../libnm-util/nm-utils.c:1952 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "Nelze alokovat paměť pro zápis šifrovaného klíče do souboru PEM." + +#: ../libnm-util/nm-utils.c:1971 +#, c-format +#| msgid "Not enough memory to store PEM file data." +msgid "Could not allocate memory for PEM file data." +msgstr "Nelze alokovat paměť pro data souboru PEM." + +#: ../src/nm-netlink-monitor.c:195 ../src/nm-netlink-monitor.c:463 +#: ../src/nm-netlink-monitor.c:581 +#: ../src/ip6-manager/nm-netlink-listener.c:351 #, c-format msgid "error processing netlink message: %s" msgstr "chyba při zpracování zprávy netlink: %s" -#: ../src/nm-netlink-monitor.c:250 +#: ../src/nm-netlink-monitor.c:259 #, c-format msgid "unable to allocate netlink handle for monitoring link status: %s" msgstr "nelze alokovat ovládání netlinku pro sledování stavu spojení: %s" -#: ../src/nm-netlink-monitor.c:260 +#: ../src/nm-netlink-monitor.c:269 #, c-format msgid "unable to connect to netlink for monitoring link status: %s" msgstr "nelze se připojit k netlinku pro sledování stavu spojení: %s" -#: ../src/nm-netlink-monitor.c:268 +#: ../src/nm-netlink-monitor.c:277 #, c-format msgid "unable to join netlink group for monitoring link status: %s" msgstr "nelze se připojit ke skupině netlink pro sledování stavu spojení: %s" -#: ../src/nm-netlink-monitor.c:276 +#: ../src/nm-netlink-monitor.c:285 #, c-format msgid "unable to allocate netlink link cache for monitoring link status: %s" -msgstr "" -"nelze alokovat vyrovnávací paměť netlinku pro sledování stavu spojení: %s" +msgstr "nelze alokovat mezipaměť netlinku pro sledování stavu spojení: %s" -#: ../src/nm-netlink-monitor.c:439 +#: ../src/nm-netlink-monitor.c:493 +#: ../src/ip6-manager/nm-netlink-listener.c:381 +msgid "error occurred while waiting for data on socket" +msgstr "vyskytla se chyba při čekání na data ze soketu" + +#: ../src/nm-netlink-monitor.c:557 ../src/nm-netlink-monitor.c:570 #, c-format msgid "error updating link cache: %s" -msgstr "chyba při aktualizaci link cache: %s" +msgstr "chyba při aktualizaci mezipaměti spojení: %s" -#: ../src/nm-netlink-monitor.c:497 -#, c-format -msgid "error occurred while waiting for data on socket" -msgstr "při čekání na data ze socketu došlo k chybě" - -#: ../src/NetworkManager.c:250 +#: ../src/main.c:498 #, c-format msgid "Invalid option. Please use --help to see a list of valid options.\n" -msgstr "Neplatná volba. Platné volby uvidíte při použití --help.\n" +msgstr "" +"Neplatný přepínač. Platné přepínače si můžete zobrazit pomocí --help.\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:89 +#: ../src/main.c:558 +#, c-format +#| msgid "Invalid option. Please use --help to see a list of valid options.\n" +msgid "%s. Please use --help to see a list of valid options.\n" +msgstr "%s. Pomocí --help si prosím zobrazte seznam platných přepínačů.\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:325 msgid "# Created by NetworkManager\n" msgstr "# Vytvořeno NetworkManagerem\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:95 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:341 #, c-format msgid "" "# Merged from %s\n" @@ -73,201 +1290,97 @@ msgstr "" "# Sloučeno z %s\n" "\n" -#: ../src/named-manager/nm-named-manager.c:256 +#: ../src/dhcp-manager/nm-dhcp-manager.c:279 +msgid "no usable DHCP client could be found." +msgstr "nebyl nalezen žádný použitelný klient DHCP." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:288 +msgid "'dhclient' could be found." +msgstr "„dhclient“ byl nalezen." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:298 +msgid "'dhcpcd' could be found." +msgstr "„dhcpcd“ byl nalezen." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:306 +#, c-format +msgid "unsupported DHCP client '%s'" +msgstr "nepodporovaný klient DHCP „%s“" + +#: ../src/ip6-manager/nm-netlink-listener.c:199 +#, c-format +#| msgid "unable to allocate netlink handle for monitoring link status: %s" +msgid "unable to allocate netlink handle: %s" +msgstr "nelze alokovat ovládání netlinku: %s" + +#: ../src/ip6-manager/nm-netlink-listener.c:209 +#, c-format +#| msgid "unable to connect to netlink for monitoring link status: %s" +msgid "unable to connect to netlink: %s" +msgstr "nelze se připojit k netlinku: %s" + +#: ../src/ip6-manager/nm-netlink-listener.c:306 +#, c-format +#| msgid "unable to join netlink group for monitoring link status: %s" +msgid "unable to join netlink group: %s" +msgstr "nelze se připojit ke skupině netlink: %s" + +#: ../src/logging/nm-logging.c:146 +#, c-format +msgid "Unknown log level '%s'" +msgstr "Neznámá úroveň evidence „%s“" + +#: ../src/logging/nm-logging.c:171 +#, c-format +msgid "Unknown log domain '%s'" +msgstr "Neznámá doména evidence „%s“" + +#: ../src/named-manager/nm-named-manager.c:314 msgid "NOTE: the libc resolver may not support more than 3 nameservers." -msgstr "Poznámka: libc resolver nemůže podporovat více než 3 nameservery." +msgstr "" +"Poznámka: překladač adres z libc nemůže podporovat více než 3 jmenné servery." -#: ../src/named-manager/nm-named-manager.c:258 +#: ../src/named-manager/nm-named-manager.c:316 msgid "The nameservers listed below may not be recognized." -msgstr "Nameservery uvedené v seznamu dole nelze rozpoznat." +msgstr "Jmenné servery uvedené v následujícím seznamu nelze rozpoznat." -#: ../system-settings/src/main.c:366 +#: ../src/system-settings/nm-default-wired-connection.c:157 #, c-format msgid "Auto %s" -msgstr "Auto %s" +msgstr "%s (automaticky)" -#: ../libnm-util/crypto.c:125 -#, c-format -msgid "PEM key file had no end tag '%s'." -msgstr "Soubor klíče PEM neměl koncovou značku '%s'." +#: ../system-settings/plugins/ifcfg-rh/reader.c:3213 +msgid "System" +msgstr "Systém" -#: ../libnm-util/crypto.c:135 -#, c-format -msgid "Doesn't look like a PEM private key file." -msgstr "Nevypadá jako soubor soukromého klíče PEM." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "Sdílení připojení přes chráněnou síť WiFi" -#: ../libnm-util/crypto.c:143 -#, c-format -msgid "Not enough memory to store PEM file data." -msgstr "Není dostatek paměti na uložení dat PEM souboru." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "Sdílení připojení přes otevřenou síť WiFi" -#: ../libnm-util/crypto.c:159 -#, c-format -msgid "Malformed PEM file: Proc-Type was not first tag." -msgstr "Nesprávný PEM soubor: Proc-Type nebylo první značkou." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "Měnit trvalý systémový název počítače" -#: ../libnm-util/crypto.c:167 -#, c-format -msgid "Malformed PEM file: unknown Proc-Type tag '%s'." -msgstr "Nesprávný PEM soubor: neznámá značka Proc-Type '%s'." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 +msgid "Modify system connections" +msgstr "Měnit systémová připojení" -#: ../libnm-util/crypto.c:177 -#, c-format -msgid "Malformed PEM file: DEK-Info was not the second tag." -msgstr "Nesprávný PEM soubor: DEK-Info nebylo druhou značkou." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 +msgid "System policy prevents modification of system settings" +msgstr "Systémová politika zabránila změně systémového nastavení." -#: ../libnm-util/crypto.c:188 -#, c-format -msgid "Malformed PEM file: no IV found in DEK-Info tag." -msgstr "Nesprávný PEM soubor: nebylo nalezeno IV ve značce DEK-Info." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +msgid "System policy prevents modification of the persistent system hostname" +msgstr "Systémová politika zabránila změně trvalého systémového názvu počítače" -#: ../libnm-util/crypto.c:195 -#, c-format -msgid "Malformed PEM file: invalid format of IV in DEK-Info tag." -msgstr "Nesprávný PEM soubor: neplatný formát IV ve značce DEK-Info." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "Systémová politika zabránila sdílení připojení přes chráněnou síť WiFi" -#: ../libnm-util/crypto.c:208 -#, c-format -msgid "Malformed PEM file: unknown private key cipher '%s'." -msgstr "Nesprávný PEM soubor: neznámá šifra soukromého klíče '%s'." - -#: ../libnm-util/crypto.c:227 -#, c-format -msgid "Could not decode private key." -msgstr "Nelze dekódovat soukromý klíč." - -#: ../libnm-util/crypto.c:271 -#, c-format -msgid "PEM certificate '%s' had no end tag '%s'." -msgstr "PEM certifikát '%s' nemá koncovou značku '%s'." - -#: ../libnm-util/crypto.c:281 -#, c-format -msgid "Failed to decode certificate." -msgstr "Selhalo dekódování certifikátu." - -#: ../libnm-util/crypto.c:290 ../libnm-util/crypto.c:298 -#, c-format -msgid "Not enough memory to store certificate data." -msgstr "Není dostatek paměti na uložení dat certifikátu." - -#: ../libnm-util/crypto.c:328 -#, c-format -msgid "IV must be an even number of bytes in length." -msgstr "IV musí být sudé číslo bajtů na délku." - -#: ../libnm-util/crypto.c:337 -#, c-format -msgid "Not enough memory to store the IV." -msgstr "Není dostatek paměti pro uložení IV." - -#: ../libnm-util/crypto.c:348 -#, c-format -msgid "IV contains non-hexadecimal digits." -msgstr "IV obsahuje nešestnáctkové číslice." - -#: ../libnm-util/crypto.c:386 ../libnm-util/crypto_gnutls.c:143 -#: ../libnm-util/crypto_nss.c:157 -#, c-format -msgid "Private key cipher '%s' was unknown." -msgstr "Šifra soukromého klíče '%s' je neznámá." - -#: ../libnm-util/crypto.c:395 -#, c-format -msgid "Not enough memory to create private key decryption key." -msgstr "" -"Není dostatek paměti pro vytvoření dešifrovacího klíče k soukromému klíči." - -#: ../libnm-util/crypto.c:513 -#, c-format -msgid "Not enough memory to store decrypted private key." -msgstr "Není dostatek paměti pro uložení dešifrovaného soukromého klíče." - -#: ../libnm-util/crypto_gnutls.c:45 -msgid "Failed to initialize the crypto engine." -msgstr "Nelze inicializovat šifrovací engine." - -#: ../libnm-util/crypto_gnutls.c:89 -#, c-format -msgid "Failed to initialize the MD5 engine: %s / %s." -msgstr "Nelze inicializovat MD5 engine: %s / %s." - -#: ../libnm-util/crypto_gnutls.c:152 ../libnm-util/crypto_nss.c:166 -#, c-format -msgid "Not enough memory for decrypted key buffer." -msgstr "Není dostatek paměti pro vyrovnávací paměť dešifrovaného klíče." - -#: ../libnm-util/crypto_gnutls.c:160 -#, c-format -msgid "Failed to initialize the decryption cipher context: %s / %s." -msgstr "Nelze inicializovat kontext dekódovací šifry: %s / %s." - -#: ../libnm-util/crypto_gnutls.c:169 -#, c-format -msgid "Failed to set symmetric key for decryption: %s / %s." -msgstr "Nelze nastavit symetrický klíč pro dekódování: %s / %s." - -#: ../libnm-util/crypto_gnutls.c:178 -#, c-format -msgid "Failed to set IV for decryption: %s / %s." -msgstr "Nelze nastavit IV pro dekódování: %s / %s." - -#: ../libnm-util/crypto_gnutls.c:187 -#, c-format -msgid "Failed to decrypt the private key: %s / %s." -msgstr "Nelze dekódovat soukromý klíč: %s / %s." - -#: ../libnm-util/crypto_gnutls.c:225 -#, c-format -msgid "Error initializing certificate data: %s" -msgstr "Chyba při inicializaci dat certifikátu: %s" - -#: ../libnm-util/crypto_gnutls.c:237 -#, c-format -msgid "Couldn't decode certificate: %s" -msgstr "Nelze dekódovat certifikát: %s" - -#: ../libnm-util/crypto_nss.c:52 -#, c-format -msgid "Failed to initialize the crypto engine: %d." -msgstr "Nelze inicializovat šifrovací engine: %d." - -#: ../libnm-util/crypto_nss.c:98 -#, c-format -msgid "Failed to initialize the MD5 context: %d." -msgstr "Nelze inicializovat MD5 kontext: %d." - -#: ../libnm-util/crypto_nss.c:174 -#, c-format -msgid "Failed to initialize the decryption cipher slot." -msgstr "Nelze inicializovat slot dekódovací šifry." - -#: ../libnm-util/crypto_nss.c:184 -#, c-format -msgid "Failed to set symmetric key for decryption." -msgstr "Nelze nastavit symetrický klíč pro dekódování." - -#: ../libnm-util/crypto_nss.c:194 -#, c-format -msgid "Failed to set IV for decryption." -msgstr "Nelze nastavit IV pro dekódování." - -#: ../libnm-util/crypto_nss.c:202 -#, c-format -msgid "Failed to initialize the decryption context." -msgstr "Nelze inicializovat kontext dekódování." - -#: ../libnm-util/crypto_nss.c:215 -#, c-format -msgid "Failed to decrypt the private key: %d." -msgstr "Nelze dekódovat soukromý klíč: %d." - -#: ../libnm-util/crypto_nss.c:227 -#, c-format -msgid "Failed to finalize decryption of the private key: %d." -msgstr "Nelze dokončit dekódování soukromého klíče: %d." - -#: ../libnm-util/crypto_nss.c:271 -#, c-format -msgid "Couldn't decode certificate: %d" -msgstr "Nelze dekódovat certifikát: %d" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "Systémová politika zabránila sdílení připojení přes otevřenou síť WiFi" diff --git a/po/de.po b/po/de.po index 3a6c861980..ad8f810f56 100644 --- a/po/de.po +++ b/po/de.po @@ -1,162 +1,1232 @@ -# German translation of NetworkManager. -# Copyright (C) 2005 Dan Williams -# This file is distributed under the same license as the NetworkManager package. +# translation of de.po to # Hendrik Brandt , 2004, 2005. # Frank Arnold , 2005. # Hendrik Richter , 2006. # Thomas Gier , 2007. # Andre Klapper , 2007. # Hauke Mehrtens , 2008. -# +# Christian Kirbach , 2009, 2010. +# Timo Trinks , 2010. +# German translation of NetworkManager. +# Copyright (C) 2005 Dan Williams +# This file is distributed under the same license as the NetworkManager package. msgid "" msgstr "" -"Project-Id-Version: NetworkManager HEAD\n" +"Project-Id-Version: de\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-11-25 21:44+0100\n" -"PO-Revision-Date: 2008-11-22 00:08+0100\n" -"Last-Translator: Hauke Mehrtens \n" -"Language-Team: German \n" +"POT-Creation-Date: 2010-05-06 14:31+0530\n" +"PO-Revision-Date: 2010-05-07 10:49+1000\n" +"Last-Translator: Timo Trinks \n" +"Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" +"X-Generator: KBabel 1.11.4\n" -#: ../src/nm-netlink-monitor.c:194 ../src/nm-netlink-monitor.c:454 -#, c-format -msgid "error processing netlink message: %s" -msgstr "Fehler beim Verarbeiten der netlink Nachricht: %s" +#: ../cli/src/connections.c:59 ../cli/src/connections.c:74 +#: ../cli/src/devices.c:85 ../cli/src/devices.c:98 ../cli/src/devices.c:108 +#: ../cli/src/devices.c:118 ../cli/src/devices.c:131 ../cli/src/devices.c:142 +#: ../cli/src/devices.c:152 +msgid "NAME" +msgstr "NAME" -#: ../src/nm-netlink-monitor.c:251 -#, c-format -msgid "unable to allocate netlink handle for monitoring link status: %s" -msgstr "" -"Kann netlink handle zur Überwachung von Netzwerkverbindung nicht belegen: %s" +#. 0 +#: ../cli/src/connections.c:60 ../cli/src/connections.c:75 +msgid "UUID" +msgstr "UUID" -#: ../src/nm-netlink-monitor.c:261 -#, c-format -msgid "unable to connect to netlink for monitoring link status: %s" -msgstr "" -"Kann nicht mit netlink zur Überwachung von Netzwerkverbindung verbinden: %s" +#. 1 +#: ../cli/src/connections.c:61 +msgid "DEVICES" +msgstr "GERÄTE" -#: ../src/nm-netlink-monitor.c:269 -#, c-format -msgid "unable to join netlink group for monitoring link status: %s" -msgstr "" -"Kann nicht mit netlink Gruppe zur Überwachung der Netzwerkverbindung " -"verbinden: %s" +#. 2 +#: ../cli/src/connections.c:62 ../cli/src/connections.c:77 +msgid "SCOPE" +msgstr "BANDBREITE" -#: ../src/nm-netlink-monitor.c:277 -#, c-format -msgid "unable to allocate netlink link cache for monitoring link status: %s" -msgstr "" -"Kann netlink Cache zur Überwachung der Netzwerkverbindung nicht belegen: %s" +#. 3 +#: ../cli/src/connections.c:63 +msgid "DEFAULT" +msgstr "VORGABE" -#: ../src/nm-netlink-monitor.c:418 -#, c-format -msgid "error updating link cache: %s" -msgstr "Fehler beim aktualisieren des Verbindungscaches: %s" +#. 4 +#: ../cli/src/connections.c:64 +msgid "DBUS-SERVICE" +msgstr "DBUS-DIENST" -#: ../src/nm-netlink-monitor.c:484 -msgid "error occurred while waiting for data on socket" -msgstr "Während des Wartens auf Daten am Socket ist ein Fehler aufgetreten" +#. 5 +#: ../cli/src/connections.c:65 +msgid "SPEC-OBJECT" +msgstr "SPEC-OBJEKT" -#: ../src/NetworkManager.c:293 -#, c-format -msgid "Invalid option. Please use --help to see a list of valid options.\n" -msgstr "" -"Ungültige Option. Benutzen Sie Bitte --help um eine Liste der gültigen " -"Optionen zu erhalten.\n" +#. 6 +#: ../cli/src/connections.c:66 +msgid "VPN" +msgstr "VPN" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:88 -msgid "# Created by NetworkManager\n" -msgstr "# Erzeugt vom NetzwerkManager\n" +#. 1 +#. 0 +#. 1 +#: ../cli/src/connections.c:76 ../cli/src/devices.c:61 ../cli/src/devices.c:87 +msgid "TYPE" +msgstr "TYP" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:94 +#. 3 +#: ../cli/src/connections.c:78 +msgid "TIMESTAMP" +msgstr "ZEITSTEMPEL" + +#. 4 +#: ../cli/src/connections.c:79 +msgid "TIMESTAMP-REAL" +msgstr "ZEITSTEMPEL-REAL" + +#. 5 +#: ../cli/src/connections.c:80 +msgid "AUTOCONNECT" +msgstr "AUTOCONNECT" + +#. 6 +#: ../cli/src/connections.c:81 +msgid "READONLY" +msgstr "NURLESEN" + +#: ../cli/src/connections.c:157 #, c-format msgid "" -"# Merged from %s\n" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" "\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" msgstr "" -"# Zusammengefügt aus %s\n" +"Aufruf: nmcli con { BEFEHL | help }\n" +" BEFEHL := { list | status | up | down }\n" "\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" -#: ../src/named-manager/nm-named-manager.c:256 -msgid "NOTE: the libc resolver may not support more than 3 nameservers." -msgstr "" -"Achtung: der libc resolver unterstützt wahrscheinlich nicht mehr als 3 " -"Nameserver." - -#: ../src/named-manager/nm-named-manager.c:258 -msgid "The nameservers listed below may not be recognized." -msgstr "Die Nameserver unter diesem werden wahrscheinlich nicht benutzt." - -#: ../system-settings/src/main.c:376 +#: ../cli/src/connections.c:197 ../cli/src/connections.c:536 #, c-format -msgid "Auto %s" -msgstr "Auto %s" +msgid "Error: 'con list': %s" +msgstr "Fehler: 'con list': %s" + +#: ../cli/src/connections.c:199 ../cli/src/connections.c:538 +#, c-format +msgid "Error: 'con list': %s; allowed fields: %s" +msgstr "Fehler: 'con list': %s; erlaubte Felder: %s" + +#: ../cli/src/connections.c:207 +msgid "Connection details" +msgstr "Verbindungsdetails" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "system" +msgstr "System" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "user" +msgstr "Benutzer" + +#: ../cli/src/connections.c:383 +msgid "never" +msgstr "nie" + +#. "CAPABILITIES" +#. Print header +#. "WIFI-PROPERTIES" +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:544 ../cli/src/settings.c:643 +#: ../cli/src/settings.c:912 ../cli/src/settings.c:913 +#: ../cli/src/settings.c:915 ../cli/src/settings.c:917 +#: ../cli/src/settings.c:1042 ../cli/src/settings.c:1043 +#: ../cli/src/settings.c:1044 ../cli/src/settings.c:1123 +#: ../cli/src/settings.c:1124 ../cli/src/settings.c:1125 +#: ../cli/src/settings.c:1126 ../cli/src/settings.c:1127 +#: ../cli/src/settings.c:1128 ../cli/src/settings.c:1129 +#: ../cli/src/settings.c:1130 ../cli/src/settings.c:1131 +#: ../cli/src/settings.c:1132 ../cli/src/settings.c:1133 +#: ../cli/src/settings.c:1134 ../cli/src/settings.c:1135 +#: ../cli/src/settings.c:1210 +msgid "yes" +msgstr "ja" + +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:506 ../cli/src/settings.c:544 +#: ../cli/src/settings.c:643 ../cli/src/settings.c:912 +#: ../cli/src/settings.c:913 ../cli/src/settings.c:915 +#: ../cli/src/settings.c:917 ../cli/src/settings.c:1042 +#: ../cli/src/settings.c:1043 ../cli/src/settings.c:1044 +#: ../cli/src/settings.c:1123 ../cli/src/settings.c:1124 +#: ../cli/src/settings.c:1125 ../cli/src/settings.c:1126 +#: ../cli/src/settings.c:1127 ../cli/src/settings.c:1128 +#: ../cli/src/settings.c:1129 ../cli/src/settings.c:1130 +#: ../cli/src/settings.c:1131 ../cli/src/settings.c:1132 +#: ../cli/src/settings.c:1133 ../cli/src/settings.c:1134 +#: ../cli/src/settings.c:1135 ../cli/src/settings.c:1210 +msgid "no" +msgstr "nein" + +#: ../cli/src/connections.c:457 ../cli/src/connections.c:500 +msgid "System connections" +msgstr "System-Verbindungen" + +#: ../cli/src/connections.c:462 ../cli/src/connections.c:513 +msgid "User connections" +msgstr "Benutzer-Verbindungen" + +#: ../cli/src/connections.c:474 ../cli/src/connections.c:1334 +#: ../cli/src/connections.c:1350 ../cli/src/connections.c:1359 +#: ../cli/src/connections.c:1370 ../cli/src/connections.c:1452 +#: ../cli/src/devices.c:864 ../cli/src/devices.c:874 ../cli/src/devices.c:973 +#: ../cli/src/devices.c:980 +#, c-format +msgid "Error: %s argument is missing." +msgstr "Fehler: %s Argument fehlt." + +#: ../cli/src/connections.c:487 +#, c-format +msgid "Error: %s - no such connection." +msgstr "Fehler: %s - keine solche Verbindung." + +#: ../cli/src/connections.c:519 ../cli/src/connections.c:1383 +#: ../cli/src/connections.c:1470 ../cli/src/devices.c:687 +#: ../cli/src/devices.c:754 ../cli/src/devices.c:888 ../cli/src/devices.c:986 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "Unbekannter Parameter: %s\n" + +#: ../cli/src/connections.c:528 +#, c-format +msgid "Error: no valid parameter specified." +msgstr "Fehler: Kein gültiger Parameter angegeben." + +#: ../cli/src/connections.c:543 ../cli/src/connections.c:1572 +#: ../cli/src/devices.c:1192 ../cli/src/network-manager.c:274 +#, c-format +msgid "Error: %s." +msgstr "Fehler: %s." + +#: ../cli/src/connections.c:649 +#, c-format +msgid "Error: 'con status': %s" +msgstr "Fehler: 'con status': %s" + +#: ../cli/src/connections.c:651 +#, c-format +msgid "Error: 'con status': %s; allowed fields: %s" +msgstr "Fehler: 'con status': %s; erlaubte Felder: %s" + +#: ../cli/src/connections.c:658 +msgid "Active connections" +msgstr "Aktive Verbindungen" + +#: ../cli/src/connections.c:1026 +#, c-format +msgid "no active connection on device '%s'" +msgstr "keine aktive Verbindung auf Gerät '%s'" + +#: ../cli/src/connections.c:1034 +#, c-format +msgid "no active connection or device" +msgstr "keine aktive Verbindung auf Gerät" + +#: ../cli/src/connections.c:1084 +#, c-format +msgid "device '%s' not compatible with connection '%s'" +msgstr "Gerät '%s' nicht mit Verbindung '%s' kompatibel" + +#: ../cli/src/connections.c:1086 +#, c-format +msgid "no device found for connection '%s'" +msgstr "kein Gerät für Verbindung '%s' gefunden" + +#: ../cli/src/connections.c:1097 +msgid "activating" +msgstr "wird aktiviert" + +#: ../cli/src/connections.c:1099 +msgid "activated" +msgstr "aktiviert" + +#: ../cli/src/connections.c:1102 ../cli/src/connections.c:1125 +#: ../cli/src/connections.c:1158 ../cli/src/devices.c:224 +#: ../cli/src/devices.c:514 ../cli/src/network-manager.c:92 +#: ../cli/src/network-manager.c:145 ../cli/src/settings.c:469 +msgid "unknown" +msgstr "unbekannt" + +#: ../cli/src/connections.c:1111 +msgid "VPN connecting (prepare)" +msgstr "VPN wird verbunden (vorbereiten)" + +#: ../cli/src/connections.c:1113 +msgid "VPN connecting (need authentication)" +msgstr "VPN wird verbunden (Authentifizierung erforderlich)" + +#: ../cli/src/connections.c:1115 +msgid "VPN connecting" +msgstr "VPN wird verbunden" + +#: ../cli/src/connections.c:1117 +msgid "VPN connecting (getting IP configuration)" +msgstr "VPN wird verbunden (IP-Konfiguration wird ermittelt)" + +#: ../cli/src/connections.c:1119 +msgid "VPN connected" +msgstr "VPN verbunden" + +#: ../cli/src/connections.c:1121 +msgid "VPN connection failed" +msgstr "VPN-Verbindung fehlgeschlagen" + +#: ../cli/src/connections.c:1123 +msgid "VPN disconnected" +msgstr "VPN getrennt" + +#: ../cli/src/connections.c:1134 +msgid "unknown reason" +msgstr "unbekannter Grund" + +#: ../cli/src/connections.c:1136 +msgid "none" +msgstr "kein" + +#: ../cli/src/connections.c:1138 +msgid "the user was disconnected" +msgstr "der Benutzer wurde getrennt" + +#: ../cli/src/connections.c:1140 +msgid "the base network connection was interrupted" +msgstr "die Basisverbindung wurde unterbrochen" + +#: ../cli/src/connections.c:1142 +msgid "the VPN service stopped unexpectedly" +msgstr "der VPN-Dienst brach unerwartet ab" + +#: ../cli/src/connections.c:1144 +msgid "the VPN service returned invalid configuration" +msgstr "der VPN-Dienst gab eine ungültige Konfiguration zurück" + +#: ../cli/src/connections.c:1146 +msgid "the connection attempt timed out" +msgstr "Der Verbindungsversuch ist zeitlich abgelaufen" + +#: ../cli/src/connections.c:1148 +msgid "the VPN service did not start in time" +msgstr "der VPN-Dienst ist nicht rechtzeitig gestartet" + +#: ../cli/src/connections.c:1150 +msgid "the VPN service failed to start" +msgstr "der VPN-Dienst konnte nicht starten" + +#: ../cli/src/connections.c:1152 +msgid "no valid VPN secrets" +msgstr "keine gültigen VPN-Geheimnisse" + +#: ../cli/src/connections.c:1154 +msgid "invalid VPN secrets" +msgstr "ungültige VPN-Geheimnisse" + +#: ../cli/src/connections.c:1156 +msgid "the connection was removed" +msgstr "Die Verbindung wurde entfernt" + +#: ../cli/src/connections.c:1170 +#, c-format +msgid "state: %s\n" +msgstr "Status: %s\n" + +#: ../cli/src/connections.c:1173 ../cli/src/connections.c:1199 +#, c-format +msgid "Connection activated\n" +msgstr "Verbindung aktiviert\n" + +#: ../cli/src/connections.c:1176 +#, c-format +msgid "Error: Connection activation failed." +msgstr "Fehler: Aktivierung der Verbindung fehlgeschlagen." + +#: ../cli/src/connections.c:1195 +#, c-format +msgid "state: %s (%d)\n" +msgstr "Status: %s (%d)\n" + +#: ../cli/src/connections.c:1205 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "Fehler: Aktivierung der Verbindung fehlgeschlagen: %s." + +#: ../cli/src/connections.c:1222 ../cli/src/devices.c:811 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "Fehler: Zeitbeschränkung von %d Sekunden abgelaufen." + +#: ../cli/src/connections.c:1265 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "Fehler: Aktivierung der Verbindung fehlgeschlagen: %s" + +#: ../cli/src/connections.c:1279 +#, c-format +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "Fehler: Erlangen der Verbindung für '%s' ist fehlgeschlagen." + +#: ../cli/src/connections.c:1288 +#, c-format +msgid "Active connection state: %s\n" +msgstr "Status der aktiven Verbindung: %s\n" + +#: ../cli/src/connections.c:1289 +#, c-format +msgid "Active connection path: %s\n" +msgstr "Pfad der aktiven Verbindung: %s\n" + +#: ../cli/src/connections.c:1343 ../cli/src/connections.c:1461 +#, c-format +msgid "Error: Unknown connection: %s." +msgstr "Fehler: Unbekannte Verbindung: %s." + +#: ../cli/src/connections.c:1378 ../cli/src/devices.c:882 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "Fehler: Der Wert '%s' für den Zeitablauf ist nicht gültig." + +#: ../cli/src/connections.c:1391 ../cli/src/connections.c:1478 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "Fehler: id oder uuid muss angegeben werden." + +#: ../cli/src/connections.c:1411 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "Fehler: Kein passendes Gerät gefunden: %s." + +#: ../cli/src/connections.c:1413 +#, c-format +msgid "Error: No suitable device found." +msgstr "Fehler: Kein passendes Gerät gefunden." + +#: ../cli/src/connections.c:1505 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "Warnung: Verbindung ist derzeit nicht aktiv\n" + +#: ../cli/src/connections.c:1561 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "Fehler: Der Befehl '%s' für 'con' ist nicht gültig." + +#: ../cli/src/connections.c:1597 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "Fehler: Es konnte nicht mit D-Bus verbunden werden." + +#: ../cli/src/connections.c:1604 +#, c-format +msgid "Error: Could not get system settings." +msgstr "Fehler: Systemeinstellungen konnten nicht ermittelt werden" + +#: ../cli/src/connections.c:1612 +#, c-format +msgid "Error: Could not get user settings." +msgstr "Fehler: Benutzereinstellungen konnten nicht ermittelt werden." + +#: ../cli/src/connections.c:1622 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "" +"Fehler: Verbindungen können nicht erlangt werden: Die Einstellungsdienste " +"werden nicht ausgeführt." + +#. 0 +#. 9 +#: ../cli/src/devices.c:60 ../cli/src/devices.c:86 ../cli/src/devices.c:162 +msgid "DEVICE" +msgstr "GERÄT" + +#. 1 +#. 4 +#. 0 +#: ../cli/src/devices.c:62 ../cli/src/devices.c:90 +#: ../cli/src/network-manager.c:36 +msgid "STATE" +msgstr "STATUS" + +#: ../cli/src/devices.c:71 +msgid "GENERAL" +msgstr "ALLGEMEIN" + +#. 0 +#: ../cli/src/devices.c:72 +msgid "CAPABILITIES" +msgstr "FÄHIGKEITEN" + +#. 1 +#: ../cli/src/devices.c:73 +msgid "WIFI-PROPERTIES" +msgstr "WIFI-EIGENSCHAFTEN" + +#. 2 +#: ../cli/src/devices.c:74 +msgid "AP" +msgstr "AP" + +#. 3 +#: ../cli/src/devices.c:75 +msgid "WIRED-PROPERTIES" +msgstr "KABEL-EIGENSCHAFTEN" + +#. 4 +#: ../cli/src/devices.c:76 +msgid "IP4-SETTINGS" +msgstr "IP4-EINSTELLUNGEN" + +#. 5 +#: ../cli/src/devices.c:77 +msgid "IP4-DNS" +msgstr "IP4-DNS" + +#. 2 +#: ../cli/src/devices.c:88 +msgid "DRIVER" +msgstr "TREIBER" + +#. 3 +#: ../cli/src/devices.c:89 +msgid "HWADDR" +msgstr "HWADDR" + +#. 0 +#: ../cli/src/devices.c:99 +msgid "CARRIER-DETECT" +msgstr "ANBIETER-SUCHE" + +#. 1 +#: ../cli/src/devices.c:100 +msgid "SPEED" +msgstr "GESCHWINDIGKEIT" + +#. 0 +#: ../cli/src/devices.c:109 +msgid "CARRIER" +msgstr "ANBIETER" + +#. 0 +#: ../cli/src/devices.c:119 +msgid "WEP" +msgstr "WEP" + +#. 1 +#: ../cli/src/devices.c:120 +msgid "WPA" +msgstr "WPA" + +#. 2 +#: ../cli/src/devices.c:121 +msgid "WPA2" +msgstr "WPA2" + +#. 3 +#: ../cli/src/devices.c:122 +msgid "TKIP" +msgstr "TKIP" + +#. 4 +#: ../cli/src/devices.c:123 +msgid "CCMP" +msgstr "CCMP" + +#. 0 +#: ../cli/src/devices.c:132 +msgid "ADDRESS" +msgstr "ADRESSE" + +#. 1 +#: ../cli/src/devices.c:133 +msgid "PREFIX" +msgstr "PRÄFIX" + +#. 2 +#: ../cli/src/devices.c:134 +msgid "GATEWAY" +msgstr "GATEWAY" + +#. 0 +#: ../cli/src/devices.c:143 +msgid "DNS" +msgstr "DNS" + +#. 0 +#: ../cli/src/devices.c:153 +msgid "SSID" +msgstr "SSID" + +#. 1 +#: ../cli/src/devices.c:154 +msgid "BSSID" +msgstr "BSSID" + +#. 2 +#: ../cli/src/devices.c:155 +msgid "MODE" +msgstr "MODUS" + +#. 3 +#: ../cli/src/devices.c:156 +msgid "FREQ" +msgstr "FREQ" + +#. 4 +#: ../cli/src/devices.c:157 +msgid "RATE" +msgstr "RATE" + +#. 5 +#: ../cli/src/devices.c:158 +msgid "SIGNAL" +msgstr "SIGNAL" + +#. 6 +#: ../cli/src/devices.c:159 +msgid "SECURITY" +msgstr "SICHERHEIT" + +#. 7 +#: ../cli/src/devices.c:160 +msgid "WPA-FLAGS" +msgstr "WPA-FLAGS" + +#. 8 +#: ../cli/src/devices.c:161 +msgid "RSN-FLAGS" +msgstr "RSN-FLAGS" + +#. 10 +#: ../cli/src/devices.c:163 +msgid "ACTIVE" +msgstr "AKTIV" + +#: ../cli/src/devices.c:186 +#, c-format +msgid "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +"\n" +msgstr "" +"Aufruf: nmcli dev { BEFEHL | help }\n" +"\n" +" BEFEHL := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +"\n" + +#: ../cli/src/devices.c:206 +msgid "unmanaged" +msgstr "nicht verwaltet" + +#: ../cli/src/devices.c:208 +msgid "unavailable" +msgstr "nicht verfügbar" + +#: ../cli/src/devices.c:210 ../cli/src/network-manager.c:89 +msgid "disconnected" +msgstr "getrennt" + +#: ../cli/src/devices.c:212 +msgid "connecting (prepare)" +msgstr "wird verbunden (vorbereiten)" + +#: ../cli/src/devices.c:214 +msgid "connecting (configuring)" +msgstr "wird verbunden (konfigurieren)" + +#: ../cli/src/devices.c:216 +msgid "connecting (need authentication)" +msgstr "wird verbunden (Authentifizierung erforderlich)" + +#: ../cli/src/devices.c:218 +msgid "connecting (getting IP configuration)" +msgstr "wird verbunden (IP-Konfiguration wird ermittelt)" + +#: ../cli/src/devices.c:220 ../cli/src/network-manager.c:87 +msgid "connected" +msgstr "verbunden" + +#: ../cli/src/devices.c:222 +msgid "connection failed" +msgstr "Verbindung fehlgeschlagen" + +#: ../cli/src/devices.c:245 ../cli/src/devices.c:380 +msgid "Unknown" +msgstr "Unbekannt" + +#: ../cli/src/devices.c:277 +msgid "(none)" +msgstr "(keine)" + +#: ../cli/src/devices.c:302 +#, c-format +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s: Fehler bei Umwandlung der IPv4-Addresse 0x%X" + +#: ../cli/src/devices.c:349 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" + +#: ../cli/src/devices.c:350 +#, c-format +msgid "%u MB/s" +msgstr "%u MB/s" + +#: ../cli/src/devices.c:359 +msgid "Encrypted: " +msgstr "Verschlüsselt: " + +#: ../cli/src/devices.c:364 +msgid "WEP " +msgstr "WEP " + +#: ../cli/src/devices.c:366 +msgid "WPA " +msgstr "WPA " + +#: ../cli/src/devices.c:368 +msgid "WPA2 " +msgstr "WPA2 " + +# Das ergibt z.B. WPA-Enterprise, klingt komisch mit »Unternehmen« +#: ../cli/src/devices.c:371 +msgid "Enterprise " +msgstr "Enterprise " + +#: ../cli/src/devices.c:380 +msgid "Ad-Hoc" +msgstr "Ad-Hoc" + +#: ../cli/src/devices.c:380 +msgid "Infrastructure" +msgstr "Infrastuktur" + +#: ../cli/src/devices.c:442 +#, c-format +msgid "Error: 'dev list': %s" +msgstr "Fehler: 'dev list': %s" + +#: ../cli/src/devices.c:444 +#, c-format +msgid "Error: 'dev list': %s; allowed fields: %s" +msgstr "Fehler: 'dev list': %s; erlaubte Felder: %s" + +#: ../cli/src/devices.c:453 +msgid "Device details" +msgstr "Gerätedetails" + +#: ../cli/src/devices.c:483 ../cli/src/devices.c:827 +msgid "(unknown)" +msgstr "(unbekannt)" + +#: ../cli/src/devices.c:484 +msgid "unknown)" +msgstr "unbekannt)" + +#: ../cli/src/devices.c:510 +#, c-format +msgid "%u Mb/s" +msgstr "%u Mb/s" + +#. Print header +#. "WIRED-PROPERTIES" +#: ../cli/src/devices.c:583 +msgid "on" +msgstr "an" + +#: ../cli/src/devices.c:583 +msgid "off" +msgstr "aus" + +#: ../cli/src/devices.c:710 +#, c-format +msgid "Error: 'dev status': %s" +msgstr "Fehler: 'dev status': %s" + +#: ../cli/src/devices.c:712 +#, c-format +msgid "Error: 'dev status': %s; allowed fields: %s" +msgstr "Fehler: 'dev status': %s; erlaubte Felder: %s" + +#: ../cli/src/devices.c:719 +msgid "Status of devices" +msgstr "Status von Geräten" + +#: ../cli/src/devices.c:747 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "Fehler: Argument '%s' fehlt." + +#: ../cli/src/devices.c:776 ../cli/src/devices.c:915 ../cli/src/devices.c:1035 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "Fehler: Gerät '%s' wurde nicht gefunden" + +#: ../cli/src/devices.c:799 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "Erfolg: Gerät '%s' wurde erfolgreich getrennt." + +#: ../cli/src/devices.c:824 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "Fehler: Trennung des Gerätes '%s' (%s) ist fehlgeschlagen: %s" + +#: ../cli/src/devices.c:832 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "Gerätezustand: %d (%s)\n" + +#: ../cli/src/devices.c:896 +#, c-format +msgid "Error: iface has to be specified." +msgstr "Fehler: Schnittstelle muss angegeben werden." + +#: ../cli/src/devices.c:1011 +#, c-format +msgid "Error: 'dev wifi': %s" +msgstr "Fehler: 'dev wifi': %s" + +#: ../cli/src/devices.c:1013 +#, c-format +msgid "Error: 'dev wifi': %s; allowed fields: %s" +msgstr "Fehler: 'dev wifi': %s; erlaubte Felder: %s" + +#: ../cli/src/devices.c:1020 +msgid "WiFi scan list" +msgstr "Suchliste für WiFi" + +#: ../cli/src/devices.c:1055 ../cli/src/devices.c:1109 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "Fehler: Der Zugangspunkt mit Hardware-Adresse '%s' wurde nicht gefunden." + +#: ../cli/src/devices.c:1072 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "Fehler: Gerät '%s' ist kein WiFi-Gerät." + +#: ../cli/src/devices.c:1136 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "Fehler: Der Befehl '%s' für 'dev wifi' ist nicht gültig." + +#: ../cli/src/devices.c:1183 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "Fehler: Der Befehl '%s' für 'dev' ist nicht gültig." + +#: ../cli/src/network-manager.c:35 +msgid "RUNNING" +msgstr "WIRD AUSGEFÜHRT" + +#. 1 +#: ../cli/src/network-manager.c:37 +msgid "WIFI-HARDWARE" +msgstr "WIFI-HARDWARE" + +#. 2 +#: ../cli/src/network-manager.c:38 +msgid "WIFI" +msgstr "WIFI" + +#. 3 +#: ../cli/src/network-manager.c:39 +msgid "WWAN-HARDWARE" +msgstr "WWAN-HARDWARE" + +#. 4 +#: ../cli/src/network-manager.c:40 +msgid "WWAN" +msgstr "WWAN" + +#: ../cli/src/network-manager.c:62 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" +msgstr "" +"Aufruf: nmcli nm { BEFEHL | help }\n" +"\n" +" BEFEHL := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + +#: ../cli/src/network-manager.c:83 +msgid "asleep" +msgstr "schlafend" + +#: ../cli/src/network-manager.c:85 +msgid "connecting" +msgstr "wird verbunden" + +#: ../cli/src/network-manager.c:125 +#, c-format +msgid "Error: 'nm status': %s" +msgstr "Fehler: 'nm status': %s" + +#: ../cli/src/network-manager.c:127 +#, c-format +msgid "Error: 'nm status': %s; allowed fields: %s" +msgstr "Fehler: 'nm status': %s; erlaubte Felder: %s" + +#: ../cli/src/network-manager.c:134 +msgid "NetworkManager status" +msgstr "Status von NetworkManager" + +#. Print header +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "enabled" +msgstr "aktiviert" + +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "disabled" +msgstr "deaktiviert" + +#: ../cli/src/network-manager.c:148 +msgid "running" +msgstr "wird ausgeführt" + +#: ../cli/src/network-manager.c:148 +msgid "not running" +msgstr "wird nicht ausgeführt" + +#: ../cli/src/network-manager.c:201 ../cli/src/network-manager.c:233 +#, c-format +msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s" +msgstr "Fehler: '--fields' Wert '%s' hier nicht gültig; erlaubte Felder: %s" + +#: ../cli/src/network-manager.c:209 +msgid "WiFi enabled" +msgstr "WiFi aktiviert" + +#: ../cli/src/network-manager.c:220 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "Fehler: Ungültiger 'wifi'-Parameter: '%s'." + +#: ../cli/src/network-manager.c:241 +msgid "WWAN enabled" +msgstr "WWAN aktiviert" + +#: ../cli/src/network-manager.c:252 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "Fehler: Ungültiger 'wwan'-Parameter: '%s'." + +#: ../cli/src/network-manager.c:263 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "Fehler: Der Befehl '%s' für 'nm' ist nicht gültig." + +#: ../cli/src/nmcli.c:69 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -m[ode] tabular|multiline output mode\n" +" -f[ields] |all|common specify fields to output\n" +" -e[scape] yes|no escape columns separators in " +"values\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"Aufruf: %s [OPTIONEN] OBJEKT { BEFEHL | help }\n" +"\n" +"OPTIONEN\n" +" -t[erse] knappe Ausgabe\n" +" -p[retty] hübsche Ausgabe\n" +" -m[ode] tabular|multiline Ausgabemodus\n" +" -f[ields] |all|common Ausgabefelder angeben\n" +" -e[scape] yes|no Spaltentrenner in den Werten mit Maskierungszeichen versehen\n" +" -v[ersion] Programm-Version anzeigen\n" +" -h[elp] dies Hilfe ausgeben\n" +"\n" +"OBJEKT\n" +" nm Status von NetworkManager\n" +" con Verbindungen von NetworkManager\n" +" dev von NetworkManager verwaltete Verbindungen\n" +"\n" + +#: ../cli/src/nmcli.c:113 +#, c-format +msgid "Error: Object '%s' is unknown, try 'nmcli help'." +msgstr "Fehler: Objekt '%s' ist unbekannt, versuchen Sie 'nmcli help'." + +#: ../cli/src/nmcli.c:143 +#, c-format +msgid "Error: Option '--terse' is specified the second time." +msgstr "Fehler: Option '--terse' wird als zweite Option angegeben." + +#: ../cli/src/nmcli.c:148 +#, c-format +msgid "Error: Option '--terse' is mutually exclusive with '--pretty'." +msgstr "Fehler: Option '--terse' und '--pretty' schließen sich gegenseitig aus." + +#: ../cli/src/nmcli.c:156 +#, c-format +msgid "Error: Option '--pretty' is specified the second time." +msgstr "Fehler: Option '--pretty' wird als zweite Option angegeben." + +#: ../cli/src/nmcli.c:161 +#, c-format +msgid "Error: Option '--pretty' is mutually exclusive with '--terse'." +msgstr "Fehler: Option '--pretty' und '--terse' schließen sich gegenseitig aus." + +#: ../cli/src/nmcli.c:171 ../cli/src/nmcli.c:187 +#, c-format +msgid "Error: missing argument for '%s' option." +msgstr "Fehler: Fehlendes Argument für die Option '%s'." + +#: ../cli/src/nmcli.c:180 ../cli/src/nmcli.c:196 +#, c-format +msgid "Error: '%s' is not valid argument for '%s' option." +msgstr "Fehler: '%s' kein gültiges Argument für die Option '%s'." + +#: ../cli/src/nmcli.c:203 +#, c-format +msgid "Error: fields for '%s' options are missing." +msgstr "Fehler: Felder für die Optionen '%s' fehlen." + +#: ../cli/src/nmcli.c:209 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "nmcli, Version %s\n" + +#: ../cli/src/nmcli.c:215 +#, c-format +msgid "Error: Option '%s' is unknown, try 'nmcli -help'." +msgstr "Fehler: Option '%s' ist unbekannt, versuchen Sie 'nmcli -help'." + +#: ../cli/src/nmcli.c:234 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "Signal %d wurde empfangen, wird beendet …" + +#: ../cli/src/nmcli.c:259 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "Fehler: Verbindung mit NetworkManager konnte nicht hergestellt werden." + +#: ../cli/src/nmcli.c:275 +msgid "Success" +msgstr "Erfolg" + +#: ../cli/src/settings.c:407 +#, c-format +msgid "%d (hex-ascii-key)" +msgstr "%d (hex-ascii-key)" + +#: ../cli/src/settings.c:409 +#, c-format +msgid "%d (104/128-bit passphrase)" +msgstr "%d (104/128-Bit Passphrase)" + +#: ../cli/src/settings.c:412 +#, c-format +msgid "%d (unknown)" +msgstr "%d (unbekannt)" + +#: ../cli/src/settings.c:438 +msgid "0 (unknown)" +msgstr "0 (unbekannt)" + +#: ../cli/src/settings.c:444 +msgid "any, " +msgstr "beliebig, " + +#: ../cli/src/settings.c:446 +msgid "900 MHz, " +msgstr "900 MHz, " + +#: ../cli/src/settings.c:448 +msgid "1800 MHz, " +msgstr "1800 MHz, " + +#: ../cli/src/settings.c:450 +msgid "1900 MHz, " +msgstr "1900 MHz, " + +#: ../cli/src/settings.c:452 +msgid "850 MHz, " +msgstr "850 MHz, " + +#: ../cli/src/settings.c:454 +msgid "WCDMA 3GPP UMTS 2100 MHz, " +msgstr "WCDMA 3GPP UMTS 2100 MHz, " + +#: ../cli/src/settings.c:456 +msgid "WCDMA 3GPP UMTS 1800 MHz, " +msgstr "WCDMA 3GPP UMTS 1800 MHz, " + +#: ../cli/src/settings.c:458 +msgid "WCDMA 3GPP UMTS 1700/2100 MHz, " +msgstr "WCDMA 3GPP UMTS 1700/2100 MHz, " + +#: ../cli/src/settings.c:460 +msgid "WCDMA 3GPP UMTS 800 MHz, " +msgstr "WCDMA 3GPP UMTS 800 MHz, " + +#: ../cli/src/settings.c:462 +msgid "WCDMA 3GPP UMTS 850 MHz, " +msgstr "WCDMA 3GPP UMTS 850 MHz, " + +#: ../cli/src/settings.c:464 +msgid "WCDMA 3GPP UMTS 900 MHz, " +msgstr "WCDMA 3GPP UMTS 900 MHz, " + +#: ../cli/src/settings.c:466 +msgid "WCDMA 3GPP UMTS 1700 MHz, " +msgstr "WCDMA 3GPP UMTS 1700 MHz, " + +#: ../cli/src/settings.c:546 ../cli/src/settings.c:708 +msgid "auto" +msgstr "auto" + +#: ../cli/src/settings.c:704 ../cli/src/settings.c:707 ../cli/src/utils.c:172 +msgid "not set" +msgstr "nicht gesetzt" + +#: ../cli/src/utils.c:124 +#, c-format +msgid "field '%s' has to be alone" +msgstr "Feld '%s' muss isoliert sein" + +#: ../cli/src/utils.c:127 +#, c-format +msgid "invalid field '%s'" +msgstr "ungültiges Feld '%s'" + +#: ../cli/src/utils.c:146 +#, c-format +msgid "Option '--terse' requires specifying '--fields'" +msgstr "Option '--terse' erfordert die Angabe von '--fields'" + +#: ../cli/src/utils.c:150 +#, c-format +msgid "Option '--terse' requires specific '--fields' option values , not '%s'" +msgstr "Option '--terse' erfordert spezielle '--fields' Optionswerte , nicht '%s'" #: ../libnm-util/crypto.c:120 #, c-format msgid "PEM key file had no end tag '%s'." -msgstr "PEM Schlüssel Datei hat keine abschließendes Tag '%s'." +msgstr "PEM-Schlüssel Datei hat kein abschließendes Tag '%s'." #: ../libnm-util/crypto.c:130 #, c-format msgid "Doesn't look like a PEM private key file." -msgstr "Das sieht nicht nach einem privatem PEM Schlüssel aus." +msgstr "Dies scheint kein privater PEM-Schlüssel zu sein." #: ../libnm-util/crypto.c:138 #, c-format msgid "Not enough memory to store PEM file data." -msgstr "" -"Es steht nicht genug Speicher zum Speichern der PEM Datei zur Verfügung." +msgstr "Es steht nicht genug Speicher zum Speichern der PEM-Datei zur Verfügung." #: ../libnm-util/crypto.c:154 #, c-format msgid "Malformed PEM file: Proc-Type was not first tag." -msgstr "Fehlerhafte PEM Datei: Proc-Type ist nicht der erste Tag." +msgstr "Fehlerhafte PEM-Datei: Proc-Type ist nicht der erste Tag." #: ../libnm-util/crypto.c:162 #, c-format msgid "Malformed PEM file: unknown Proc-Type tag '%s'." -msgstr "Fehlerhafte PEM Datei: unbekannter Proc-Type Tag '%s'." +msgstr "Fehlerhafte PEM-Datei: unbekannter Proc-Type Tag '%s'." #: ../libnm-util/crypto.c:172 #, c-format msgid "Malformed PEM file: DEK-Info was not the second tag." -msgstr "Fehlerhafte PEM Datei: DEK-Info ist nicht der zweite Tag." +msgstr "Fehlerhafte PEM-Datei: DEK-Info ist nicht der zweite Tag." #: ../libnm-util/crypto.c:183 #, c-format msgid "Malformed PEM file: no IV found in DEK-Info tag." -msgstr "Fehlerhafte PEM Datei: kein IV im DEK-Info Tag gefunden." +msgstr "Fehlerhafte PEM-Datei: kein IV im DEK-Info Tag gefunden." #: ../libnm-util/crypto.c:190 #, c-format msgid "Malformed PEM file: invalid format of IV in DEK-Info tag." -msgstr "Fehlerhafte PEM Datei: falsches Format des IV in DEK-Info Tag." +msgstr "Fehlerhafte PEM-Datei: falsches Format des IV in DEK-Info Tag." #: ../libnm-util/crypto.c:203 #, c-format msgid "Malformed PEM file: unknown private key cipher '%s'." msgstr "" -"Fehlerhafte PEM Datei: unbekannte Verschlüsselung '%s' des privaten " +"Fehlerhafte PEM-Datei: Unbekannte Verschlüsselung '%s' des privaten " "Schlüssels." #: ../libnm-util/crypto.c:222 #, c-format msgid "Could not decode private key." -msgstr "Konnte privaten Schlüssel nicht dekodieren." +msgstr "Der private Schlüssel konnte nicht dekodiert werden." #: ../libnm-util/crypto.c:267 #, c-format msgid "PEM certificate '%s' had no end tag '%s'." -msgstr "PEM Zertifikat '%s' hat keine abschließendes Tag '%s'." +msgstr "PEM-Zertifikat '%s' hat kein abschließendes Tag '%s'." #: ../libnm-util/crypto.c:277 #, c-format msgid "Failed to decode certificate." -msgstr "Fehler beim dekodieren des Zertifikats." +msgstr "Das Dekodieren des Zertifikats ist fehlgeschlagen." #: ../libnm-util/crypto.c:286 #, c-format @@ -183,8 +1253,9 @@ msgstr "Nicht genug Speicher zum Sichern des IV." msgid "IV contains non-hexadecimal digits." msgstr "IV enthält nicht hexadezimale Zeichen." -#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:143 -#: ../libnm-util/crypto_nss.c:169 +#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:336 #, c-format msgid "Private key cipher '%s' was unknown." msgstr "Unbekannte Verschlüsselung '%s' des privaten Schlüssels." @@ -192,162 +1263,416 @@ msgstr "Unbekannte Verschlüsselung '%s' des privaten Schlüssels." #: ../libnm-util/crypto.c:391 #, c-format msgid "Not enough memory to decrypt private key." -msgstr "Nicht genug Speicher zum entschlüsseln des privaten Schlüssels." +msgstr "Nicht genug Speicher zum Entschlüsseln des privaten Schlüssels." #: ../libnm-util/crypto.c:511 #, c-format msgid "Unable to determine private key type." -msgstr "Kann die Art des privaten Schlüssels nicht bestimmen." +msgstr "Die Art des privaten Schlüssels kann nicht bestimmt werden." #: ../libnm-util/crypto.c:530 #, c-format msgid "Not enough memory to store decrypted private key." -msgstr "" -"Nicht genug Speicher zum Speichern des entschlüsselten privaten Schlüssels." +msgstr "Nicht genug Speicher zum Speichern des entschlüsselten privaten Schlüssels." -#: ../libnm-util/crypto_gnutls.c:46 +#: ../libnm-util/crypto_gnutls.c:49 msgid "Failed to initialize the crypto engine." msgstr "Fehler beim Initialisieren der Verschlüsselung." -#: ../libnm-util/crypto_gnutls.c:90 +#: ../libnm-util/crypto_gnutls.c:93 #, c-format msgid "Failed to initialize the MD5 engine: %s / %s." msgstr "Fehler beim Initialisieren von MD5: %s / %s." -#: ../libnm-util/crypto_gnutls.c:152 ../libnm-util/crypto_nss.c:178 +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "Ungültige Länge des IV (muss zumindest %zd sein)." + +#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188 #, c-format msgid "Not enough memory for decrypted key buffer." -msgstr "Nicht genug Speicher für den Entschlüsselungs-Puffer." +msgstr "Nicht genug Speicher für den Puffer zur Entschlüsselung." -#: ../libnm-util/crypto_gnutls.c:160 +#: ../libnm-util/crypto_gnutls.c:173 #, c-format msgid "Failed to initialize the decryption cipher context: %s / %s." msgstr "Fehler beim Initialisieren des Entschlüsselungs-Kontextes: %s / %s." -#: ../libnm-util/crypto_gnutls.c:169 +#: ../libnm-util/crypto_gnutls.c:182 #, c-format msgid "Failed to set symmetric key for decryption: %s / %s." msgstr "" -"Fehler beim setzen des symmetrischen Schlüssels für die Entschlüsselung: %" +"Fehler beim Festlegen des symmetrischen Schlüssels für die Entschlüsselung: %" "s / %s." -#: ../libnm-util/crypto_gnutls.c:178 +#: ../libnm-util/crypto_gnutls.c:191 #, c-format msgid "Failed to set IV for decryption: %s / %s." -msgstr "Fehler beim setzen des IV für die Verschlüsselung: %s / %s." +msgstr "Fehler beim Festlegen des IV für die Verschlüsselung: %s / %s." -#: ../libnm-util/crypto_gnutls.c:187 +#: ../libnm-util/crypto_gnutls.c:200 #, c-format msgid "Failed to decrypt the private key: %s / %s." msgstr "Fehler beim Entschlüsseln des privaten Schlüssels: %s / %s." -#: ../libnm-util/crypto_gnutls.c:200 +#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 +#, c-format +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "Fehler beim Entschlüsseln des privaten Schlüssels: Unerwartete Fülllänge." + +#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 #, c-format msgid "Failed to decrypt the private key." msgstr "Fehler beim Entschlüsseln des privaten Schlüssels." -#: ../libnm-util/crypto_gnutls.c:235 +#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356 #, c-format -msgid "Error initializing certificate data: %s" -msgstr "Fehler beim Initialisieren des Zertifikates: %s" - -#: ../libnm-util/crypto_gnutls.c:257 -#, c-format -msgid "Couldn't decode certificate: %s" -msgstr "Konnte Zertifikat nicht dekodieren: %s" - -#: ../libnm-util/crypto_gnutls.c:281 -#, c-format -msgid "Couldn't initialize PKCS#12 decoder: %s" -msgstr "Konnte PKCS#12 Decoder nicht initialisieren: %s" +msgid "Could not allocate memory for encrypting." +msgstr "Es konnte kein Arbeitsspeicher zur Verschlüsselung angefordert werden." #: ../libnm-util/crypto_gnutls.c:294 #, c-format -msgid "Couldn't decode PKCS#12 file: %s" -msgstr "Konnte PKCS#12 nicht decodieren: %s" +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "Fehler beim Initialisieren des Verschlüsselungs-Kontextes: %s / %s." -#: ../libnm-util/crypto_gnutls.c:306 +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "" +"Fehler beim Festlegen des symmetrischen Schlüssels für die Verschlüsselung: %" +"s / %s." + +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +msgid "Failed to set IV for encryption: %s / %s." +msgstr "Fehler beim Festlegen des IV für die Verschlüsselung: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +msgid "Failed to encrypt the data: %s / %s." +msgstr "Fehler beim Verschlüsseln der Daten: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:362 +#, c-format +msgid "Error initializing certificate data: %s" +msgstr "Fehler beim Initialisieren des Zertifikats: %s" + +#: ../libnm-util/crypto_gnutls.c:384 +#, c-format +msgid "Couldn't decode certificate: %s" +msgstr "Zertifikat konnte nicht dekodiert werden: %s" + +#: ../libnm-util/crypto_gnutls.c:408 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %s" +msgstr "PKCS#12-Decoder konnte nicht initialisiert werden: %s" + +#: ../libnm-util/crypto_gnutls.c:421 +#, c-format +msgid "Couldn't decode PKCS#12 file: %s" +msgstr "PKCS#12 konnte nicht decodiert werden: %s" + +#: ../libnm-util/crypto_gnutls.c:433 #, c-format msgid "Couldn't verify PKCS#12 file: %s" -msgstr "Konnte PKCS#12 Datei nicht überprüfen: %s" +msgstr "PKCS#12-Datei konnte nicht überprüft werden: %s" -#: ../libnm-util/crypto_nss.c:57 +#: ../libnm-util/crypto_nss.c:56 #, c-format msgid "Failed to initialize the crypto engine: %d." -msgstr "Fehler beim Erstellen der Verschlüsselung: %d." +msgstr "Fehler beim Initialisieren der Verschlüsselung: %d." #: ../libnm-util/crypto_nss.c:111 #, c-format msgid "Failed to initialize the MD5 context: %d." -msgstr "Fehler beim Erstellen des MD5-Kontextes: %d." +msgstr "Fehler beim Initialisieren des MD5-Kontextes: %d." -#: ../libnm-util/crypto_nss.c:186 +#: ../libnm-util/crypto_nss.c:179 #, c-format -msgid "Failed to initialize the decryption cipher slot." -msgstr "Fehler beim Erstellen des Verschlüsselungs-Slots." +msgid "Invalid IV length (must be at least %d)." +msgstr "Ungültige Länge des IV (muss zumindest %d sein)." #: ../libnm-util/crypto_nss.c:196 #, c-format -msgid "Failed to set symmetric key for decryption." -msgstr "" -"Fehler beim Setzen des symmetrischen Schlüssels für die Entschlüsselung." +msgid "Failed to initialize the decryption cipher slot." +msgstr "Fehler beim Einrichten des Verschlüsselungs-Slots." #: ../libnm-util/crypto_nss.c:206 #, c-format -msgid "Failed to set IV for decryption." -msgstr "Fehler beim Setzten des IV für die Entschlüsselung." +msgid "Failed to set symmetric key for decryption." +msgstr "Fehler beim Festlegen des symmetrischen Schlüssels für die Entschlüsselung." -#: ../libnm-util/crypto_nss.c:214 +#: ../libnm-util/crypto_nss.c:216 +#, c-format +msgid "Failed to set IV for decryption." +msgstr "Fehler beim Festlegen des IV für die Entschlüsselung." + +#: ../libnm-util/crypto_nss.c:224 #, c-format msgid "Failed to initialize the decryption context." -msgstr "Fehler beim Erstellen des Entschlüsselungs-Kontextes." +msgstr "Fehler beim Einrichten des Entschlüsselungs-Kontextes." -#: ../libnm-util/crypto_nss.c:227 +#: ../libnm-util/crypto_nss.c:237 #, c-format msgid "Failed to decrypt the private key: %d." msgstr "Fehler beim Entschlüsseln des privaten Schlüssels: %d." -#: ../libnm-util/crypto_nss.c:239 +#: ../libnm-util/crypto_nss.c:245 +#, c-format +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "" +"Fehler beim Entschlüsseln des privaten Schlüssels: Die entschlüsselten Daten " +"sind zu groß." + +#: ../libnm-util/crypto_nss.c:256 #, c-format msgid "Failed to finalize decryption of the private key: %d." -msgstr "" -"Fehler beim Abschließen der Entschlüsselung des privaten Schlüssels: %d." +msgstr "Fehler beim Abschließen der Entschlüsselung des privaten Schlüssels: %d." -#: ../libnm-util/crypto_nss.c:284 +#: ../libnm-util/crypto_nss.c:364 +#, c-format +msgid "Failed to initialize the encryption cipher slot." +msgstr "Fehler beim Einrichten des Verschlüsselungs-Slots." + +#: ../libnm-util/crypto_nss.c:372 +#, c-format +msgid "Failed to set symmetric key for encryption." +msgstr "Fehler beim Festlegen des symmetrischen Schlüssels für die Verschlüsselung." + +#: ../libnm-util/crypto_nss.c:380 +#, c-format +msgid "Failed to set IV for encryption." +msgstr "Fehler beim Festlegen des IV für die Verschlüsselung." + +#: ../libnm-util/crypto_nss.c:388 +#, c-format +msgid "Failed to initialize the encryption context." +msgstr "Fehler beim Initialisieren des Verschlüsselungs-Kontextes." + +#: ../libnm-util/crypto_nss.c:396 +#, c-format +msgid "Failed to encrypt: %d." +msgstr "Fehler beim Verschlüsseln: %d." + +#: ../libnm-util/crypto_nss.c:404 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "Unerwartete Datenmenge nach der Verschlüsselung." + +#: ../libnm-util/crypto_nss.c:447 #, c-format msgid "Couldn't decode certificate: %d" -msgstr "Konnte Zertifikate nicht dekodieren: %d" +msgstr "Zertifikat konnte nicht dekodiert werden: %d" -#: ../libnm-util/crypto_nss.c:319 +#: ../libnm-util/crypto_nss.c:482 #, c-format msgid "Couldn't convert password to UCS2: %d" -msgstr "Konnte Passwort nicht zu UCS2 konvertieren: %d" +msgstr "Passwort konnte nicht zu UCS2 konvertiert werden: %d" -#: ../libnm-util/crypto_nss.c:347 +#: ../libnm-util/crypto_nss.c:510 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %d" -msgstr "Konnte PKCS#12 Decoder nicht initialisieren: %d" +msgstr "PKCS#12-Decoder konnte nicht initialisiert werden: %d" -#: ../libnm-util/crypto_nss.c:356 +#: ../libnm-util/crypto_nss.c:519 #, c-format msgid "Couldn't decode PKCS#12 file: %d" -msgstr "Konnte PKCS#12 Datei nicht decodieren: %d" +msgstr "PKCS#12-Datei konnte nicht decodiert werden: %d" -#: ../libnm-util/crypto_nss.c:365 +#: ../libnm-util/crypto_nss.c:528 #, c-format msgid "Couldn't verify PKCS#12 file: %d" -msgstr "Konnte PKCS#12 Datei nicht überprüfen: %d" +msgstr "PKCS#12-Datei konnte nicht überprüft werden: %d" -#~ msgid "operation took too long" -#~ msgstr "Vorgang dauerte zu lange" +#: ../libnm-util/crypto_nss.c:557 +msgid "Could not generate random data." +msgstr "Zufällige Daten konnten nicht erstellt werden." -#~ msgid "received data from wrong type of sender" -#~ msgstr "Daten von einem falschen Absendertyp erhalten" +#: ../libnm-util/nm-utils.c:1925 +#, c-format +msgid "Not enough memory to make encryption key." +msgstr "Nicht genug Speicher zum Erstellen eines Schlüssels." -#~ msgid "received data from unexpected sender" -#~ msgstr "Daten von einem unerwarteten Absender erhalten" +#: ../libnm-util/nm-utils.c:2035 +msgid "Could not allocate memory for PEM file creation." +msgstr "Es konnte kein Speicher zum Erstellen der PEM-Datei angefordert werden." + +#: ../libnm-util/nm-utils.c:2047 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "" +"Es konnte kein Speicher zum Schreiben des IV in die PEM-Datei angefordert " +"werden." + +#: ../libnm-util/nm-utils.c:2059 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "" +"Es konnte kein Speicher zum Schreiben des IV in die PEM-Datei angefordert " +"werden." + +#: ../libnm-util/nm-utils.c:2078 +#, c-format +msgid "Could not allocate memory for PEM file data." +msgstr "Es konnte kein Speicher für die Daten der PEM-Datei angefordert werden." + +#: ../src/nm-netlink-monitor.c:100 ../src/nm-netlink-monitor.c:231 +#: ../src/nm-netlink-monitor.c:653 +#, c-format +msgid "error processing netlink message: %s" +msgstr "Fehler beim Verarbeiten der netlink-Nachricht: %s" + +#: ../src/nm-netlink-monitor.c:214 +msgid "error occurred while waiting for data on socket" +msgstr "Während des Wartens auf Daten am Socket ist ein Fehler aufgetreten" + +#: ../src/nm-netlink-monitor.c:254 +#, c-format +msgid "unable to connect to netlink for monitoring link status: %s" +msgstr "" +"Es kann nicht mit netlink zur Überwachung der Netzwerkverbindung verbunden " +"werden: %s" + +#: ../src/nm-netlink-monitor.c:265 +#, c-format +msgid "unable to enable netlink handle credential passing: %s" +msgstr "Kann Weitergabe von Berechtigungen des netlink-Handle nicht aktivieren: %s" + +#: ../src/nm-netlink-monitor.c:291 ../src/nm-netlink-monitor.c:353 +#, c-format +msgid "unable to allocate netlink handle for monitoring link status: %s" +msgstr "" +"Es kann kein netlink-Handle zur Überwachung der Netzwerkverbindung " +"angefordert werden: %s" + +#: ../src/nm-netlink-monitor.c:376 +#, c-format +msgid "unable to allocate netlink link cache for monitoring link status: %s" +msgstr "" +"Es kann kein netlink-Cache zur Überwachung der Netzwerkverbindung belegt " +"werden: %s" + +#: ../src/nm-netlink-monitor.c:502 +#, c-format +msgid "unable to join netlink group: %s" +msgstr "Der netlink-Gruppe kann nicht beigetreten werden: %s" + +#: ../src/nm-netlink-monitor.c:629 ../src/nm-netlink-monitor.c:642 +#, c-format +msgid "error updating link cache: %s" +msgstr "Fehler beim Aktualisieren des Verbindungs-Cache: %s" + +#: ../src/main.c:502 +#, c-format +msgid "Invalid option. Please use --help to see a list of valid options.\n" +msgstr "" +"Ungültige Option. Verwenden Sie bitte '--help', um eine Liste der gültigen " +"Optionen zu erhalten.\n" + +#: ../src/main.c:562 +#, c-format +msgid "%s. Please use --help to see a list of valid options.\n" +msgstr "" +"%s Verwenden Sie bitte '--help', um eine Liste der gültigen Optionen zu " +"erhalten.\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:325 +msgid "# Created by NetworkManager\n" +msgstr "# Erstellt von NetworkManager\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:341 +#, c-format +msgid "" +"# Merged from %s\n" +"\n" +msgstr "" +"# Zusammengefügt aus %s\n" +"\n" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:279 +msgid "no usable DHCP client could be found." +msgstr "Kein brauchbarer DHCP-Client gefunden." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:288 +msgid "'dhclient' could be found." +msgstr "'dhclient' wurde gefunden." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:298 +msgid "'dhcpcd' could be found." +msgstr "'dhcpcd' wurde gefunden." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:306 +#, c-format +msgid "unsupported DHCP client '%s'" +msgstr "Nicht unterstützter DHCP-Client '%s'" + +#: ../src/logging/nm-logging.c:146 +#, c-format +msgid "Unknown log level '%s'" +msgstr "Unbekanntes Log-Level '%s'" + +#: ../src/logging/nm-logging.c:171 +#, c-format +msgid "Unknown log domain '%s'" +msgstr "Unbekannte Log-Domain '%s'" + +#: ../src/named-manager/nm-named-manager.c:343 +msgid "NOTE: the libc resolver may not support more than 3 nameservers." +msgstr "" +"HINWEIS: Der libc-Auflöser unterstützt eventuell nicht mehr als 3 Server zur " +"Namensauflösung." + +#: ../src/named-manager/nm-named-manager.c:345 +msgid "The nameservers listed below may not be recognized." +msgstr "" +"Die nachfolgend aufgelisteten Server zur Namensauflösung werden eventuell " +"nicht erkannt." + +#: ../src/system-settings/nm-default-wired-connection.c:157 +#, c-format +msgid "Auto %s" +msgstr "Auto %s" + +#: ../system-settings/plugins/ifcfg-rh/reader.c:3256 +msgid "System" +msgstr "System" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "Verbindungsfreigabe über ein geschütztes WiFi-Netzwerk" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "Verbindungsfreigabe über ein offenes WiFi-Netzwerk" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "Den ständigen Rechnernamen des Systems bearbeiten" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 +msgid "Modify system connections" +msgstr "System-Verbindungen bearbeiten" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 +msgid "System policy prevents modification of system settings" +msgstr "Die Systemrichtlinien verhindern das Bearbeiten von Systemeinstellungen" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +msgid "System policy prevents modification of the persistent system hostname" +msgstr "" +"Die Systemrichtlinien verhindern das Bearbeiten des ständigen Rechnernamens " +"des Systems" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "" +"Die Systemrichtlinien verhindern Verbindungsfreigaben über ein geschütztes " +"WiFi-Netzwerk" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "" +"Die Systemrichtlinien verhindern Verbindungsfreigaben über ein offenes WiFi-" +"Netzwerk" -#~ msgid "too much data was sent over socket and some of it was lost" -#~ msgstr "" -#~ "Es wurden zu viele Daten über den Socket gesendet und einige davon sind " -#~ "verloren gegangen" diff --git a/po/el.po b/po/el.po index 8a36618ff1..7890d9b9ce 100644 --- a/po/el.po +++ b/po/el.po @@ -4,21 +4,22 @@ # Nikos Charonitakis , 2005. # Kostas Papadimas , 2005-2007. # Dimitris Glezos , 2006. -# Jennie Petoumenou , 2008. +# Jennie Petoumenou , 2008, 2009. +# Tournaris Pavlos , 2009. msgid "" msgstr "" "Project-Id-Version: NetworkManager.HEAD\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug." -"cgi?product=NetworkManager&component=general\n" -"POT-Creation-Date: 2008-12-07 22:31+0000\n" -"PO-Revision-Date: 2008-12-18 16:53+0100\n" -"Last-Translator: Jennie Petoumenou \n" -"Language-Team: Greek \n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" +"product=NetworkManager&component=general\n" +"POT-Creation-Date: 2009-08-27 03:24+0000\n" +"PO-Revision-Date: 2009-09-10 11:08+0200\n" +"Last-Translator: Tournaris Pavlos \n" +"Language-Team: Greek \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Lokalize 0.2\n" +"X-Generator: Lokalize 0.3\n" #: ../libnm-util/crypto.c:120 #, c-format @@ -28,7 +29,7 @@ msgstr "Το αρχείο κλειδιού PEM δεν είχε ετικέτα τ #: ../libnm-util/crypto.c:130 #, c-format msgid "Doesn't look like a PEM private key file." -msgstr "Δεν μοιάζει με αρχείο ιδιωτικού κλειδιού PEM." +msgstr "Δε μοιάζει με αρχείο ιδιωτικού κλειδιού PEM." #: ../libnm-util/crypto.c:138 #, c-format @@ -75,7 +76,7 @@ msgstr "Αδύνατη η αποκωδικοποίηση του ιδιωτικο #: ../libnm-util/crypto.c:267 #, c-format msgid "PEM certificate '%s' had no end tag '%s'." -msgstr "Το πιστοποιητικό PEM '%s' δεν διέθετε ετικέτα τέλους '%s'." +msgstr "Το πιστοποιητικό PEM '%s' δε διέθετε ετικέτα τέλους '%s'." #: ../libnm-util/crypto.c:277 #, c-format @@ -96,7 +97,7 @@ msgstr "Δεν επαρκεί η μνήμη για την αποθήκευση #: ../libnm-util/crypto.c:324 #, c-format msgid "IV must be an even number of bytes in length." -msgstr "Το μήκος του IV πρέπει να αντιστοιχεί σε άρτιο αριθμό bytes." +msgstr "Το μήκος του IV πρέπει να αντιστοιχεί σε άρτιο αριθμό byte." #: ../libnm-util/crypto.c:333 #, c-format @@ -199,9 +200,10 @@ msgid "Couldn't verify PKCS#12 file: %s" msgstr "Αδύνατη η διαπίστωση του αρχείου PKCS#12: %s" #: ../libnm-util/crypto_nss.c:57 +#: ../system-settings/plugins/ifcfg-rh/crypto.c:52 #, c-format msgid "Failed to initialize the crypto engine: %d." -msgstr "Απέτυχε η αρχικοποίηση της μηχανής crypto: %d." +msgstr "Απέτυχε η αρχικοποίηση της μηχανής κρυπτογραφίας: %d." #: ../libnm-util/crypto_nss.c:111 #, c-format @@ -256,67 +258,62 @@ msgstr "Αδύνατη η αρχικοποίηση του αποκωδικοπο #: ../libnm-util/crypto_nss.c:356 #, c-format msgid "Couldn't decode PKCS#12 file: %d" -msgstr "Αδύνατη η αρχικοποίηση του αρχείου PKCS#12: %d" +msgstr "Αδύνατη η αποκωδικοποίηση του αρχείου PKCS#12: %d" #: ../libnm-util/crypto_nss.c:365 #, c-format msgid "Couldn't verify PKCS#12 file: %d" msgstr "Αδύνατη η διαπίστωση του αρχείου PKCS#12: %d" -#: ../src/nm-netlink-monitor.c:194 ../src/nm-netlink-monitor.c:454 +#: ../src/nm-netlink-monitor.c:194 ../src/nm-netlink-monitor.c:464 #, c-format msgid "error processing netlink message: %s" msgstr "σφάλμα κατά την επεξεργασία μηνύματος netlink: %s" -#: ../src/nm-netlink-monitor.c:251 +#: ../src/nm-netlink-monitor.c:260 #, c-format msgid "unable to allocate netlink handle for monitoring link status: %s" msgstr "" "αδύνατη η δέσμευση χειριστή netlink για την παρακολούθηση της κατάστασης της " "σύνδεσης: %s" -#: ../src/nm-netlink-monitor.c:261 +#: ../src/nm-netlink-monitor.c:270 #, c-format msgid "unable to connect to netlink for monitoring link status: %s" msgstr "" "αδύνατη η σύνδεση με το netlink για την παρακολούθηση της κατάστασης της " "σύνδεσης: %s" -#: ../src/nm-netlink-monitor.c:269 +#: ../src/nm-netlink-monitor.c:278 #, c-format msgid "unable to join netlink group for monitoring link status: %s" msgstr "" "αδύνατη η ένταξη στην ομάδα του netlink για την παρακολούθηση της κατάστασης " "της σύνδεσης: %s" -#: ../src/nm-netlink-monitor.c:277 +#: ../src/nm-netlink-monitor.c:286 #, c-format msgid "unable to allocate netlink link cache for monitoring link status: %s" msgstr "" "αδύνατη η εκχώρηση λανθάνουσας μνήμης στη σύνδεση netlink για την " "παρακολούθηση της κατάστασης της σύνδεσης δικτύου: %s" -#: ../src/nm-netlink-monitor.c:418 -#, c-format -msgid "error updating link cache: %s" -msgstr "σφάλμα κατά την ενημέρωση της λανθάνουσας μνήμης της σύνδεσης: %s" - -#: ../src/nm-netlink-monitor.c:484 +#: ../src/nm-netlink-monitor.c:494 msgid "error occurred while waiting for data on socket" msgstr "σφάλμα κατά την αναμονή για δεδομένα στην υποδοχή" -#: ../src/NetworkManager.c:293 +#: ../src/NetworkManager.c:330 #, c-format msgid "Invalid option. Please use --help to see a list of valid options.\n" msgstr "" "Άκυρη επιλογή. Παρακαλώ χρησιμοποιήστε --help για να δείτε τη λίστα των " "έγκυρων επιλογών.\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:88 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:304 msgid "# Created by NetworkManager\n" msgstr "# Δημιουργήθηκε από το NetworkManager\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:94 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:310 #, c-format msgid "" "# Merged from %s\n" @@ -325,18 +322,64 @@ msgstr "" "# Συγχωνεύθηκαν από το %s\n" "\n" -#: ../src/named-manager/nm-named-manager.c:256 +#: ../src/named-manager/nm-named-manager.c:315 msgid "NOTE: the libc resolver may not support more than 3 nameservers." msgstr "" "ΣΗΜΕΙΩΣΗ: Ο libc resolver μπορεί να μην υποστηρίζει περισσότερους από 3 " "εξυπηρετητές ονομάτων." -#: ../src/named-manager/nm-named-manager.c:258 +#: ../src/named-manager/nm-named-manager.c:317 msgid "The nameservers listed below may not be recognized." msgstr "Οι κάτωθι εξυπηρετητές ονομάτων ίσως να μην αναγνωρίζονται." -#: ../system-settings/src/main.c:380 +#: ../src/system-settings/nm-default-wired-connection.c:194 #, c-format msgid "Auto %s" msgstr "Αυτόματο %s" +#: ../system-settings/plugins/ifcfg-rh/reader.c:2446 +msgid "System" +msgstr "Σύστημα" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "Κοινή χρήση σύνδεσης μέσω προστατευμένου ασύρματου δικτύου" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "Κοινή χρήση σύνδεσης μέσω ανοιχτού ασύρματου δικτύου" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "Αλλαγή πάγιου ονόματος συστήματος" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 +msgid "Modify system connections" +msgstr "Τροποποίηση συνδέσεων συστήματος" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 +msgid "System policy prevents modification of system settings" +msgstr "" +"Η πολιτική συστήματος δεν επιτρέπει τροποποίηση των ρυθμίσεων συστήματος" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +#| msgid "System policy prevents modification of system settings" +msgid "System policy prevents modification of the persistent system hostname" +msgstr "" +"Η πολιτική συστήματος δεν επιτρέπει τροποποίηση του πάγιου ονόματος " +"συστήματος" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "" +"Η πολιτική συστήματος δεν επιτρέπει κοινή χρήση συνδέσεων μέσω " +"προστατευμένου ασύρματου δικτύου" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "" +"Η πολιτική συστήματος δεν επιτρέπει κοινή χρήση συνδέσεων μέσω ανοιχτού " +"ασύρματου δικτύου" + +#~ msgid "error updating link cache: %s" +#~ msgstr "σφάλμα κατά την ενημέρωση της λανθάνουσας μνήμης της σύνδεσης: %s" diff --git a/po/es.po b/po/es.po index 6120118b8a..1390671209 100644 --- a/po/es.po +++ b/po/es.po @@ -1,102 +1,873 @@ -# translation of NetworkManager.HEAD.po to Español -# translation of NetworkManager.HEAD.po to -# Traducción de NetworkManager al español. +# translation of NetworkManager.HEAD.po to Spanish # Copyright (C) Spanish translation for NetworkManager # This file is distributed under the same license as the NetworkManager package. # # Antonio Ognio , 2004. -# Francisco Javier F. Serrador , 2004, 2005, 2006. +# Francisco Javier F. Serrador , 2004, 2005, 2006, 2010. # Lucas Vieites Fariña , 2005, 2006. -# Jorge González , 2007, 2008. +# Jorge González , 2007, 2008, 2010. +# msgid "" msgstr "" "Project-Id-Version: NetworkManager.HEAD\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" -"product=NetworkManager&component=general\n" -"POT-Creation-Date: 2008-11-13 21:19+0000\n" -"PO-Revision-Date: 2008-11-14 20:28+0100\n" +"product=NetworkManager&component=general\n" +"POT-Creation-Date: 2010-04-27 15:25+0000\n" +"PO-Revision-Date: 2010-05-01 10:55+0200\n" "Last-Translator: Jorge González \n" "Language-Team: Español \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: ../src/nm-netlink-monitor.c:195 ../src/nm-netlink-monitor.c:476 -#, c-format -msgid "error processing netlink message: %s" -msgstr "error al procesar el mensaje de netlink: %s" - -#: ../src/nm-netlink-monitor.c:252 -#, c-format -msgid "unable to allocate netlink handle for monitoring link status: %s" -msgstr "" -"no se puede asignar el manejador netlink para monitorizar el estado del " -"enlace: %s" - -#: ../src/nm-netlink-monitor.c:262 -#, c-format -msgid "unable to connect to netlink for monitoring link status: %s" -msgstr "" -"no se puede conectar con netlink para monitorizar el estado del enlace: %s" - -#: ../src/nm-netlink-monitor.c:270 -#, c-format -msgid "unable to join netlink group for monitoring link status: %s" -msgstr "" -"no pudo unirse al grupo netlink para monitorizar el estado del enlace: %s" - -#: ../src/nm-netlink-monitor.c:278 -#, c-format -msgid "unable to allocate netlink link cache for monitoring link status: %s" -msgstr "" -"no se puede asignar el enlace a la caché de netlink para monitorizar el " -"estado del enlace: %s" - -#: ../src/nm-netlink-monitor.c:441 -#, c-format -msgid "error updating link cache: %s" -msgstr "error al actualizar el enlace caché: %s" - -#: ../src/nm-netlink-monitor.c:499 -#, c-format -msgid "error occurred while waiting for data on socket" -msgstr "ha ocurrido un error mientras esperaban datos en un socket" - -#: ../src/NetworkManager.c:252 -#, c-format -msgid "Invalid option. Please use --help to see a list of valid options.\n" -msgstr "" -"Opción no válida. Use --help para ver una lista de las opciones válidas.\n" - -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:88 -msgid "# Created by NetworkManager\n" -msgstr "# Creado por NetworkManager\n" - -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:94 +#: ../cli/src/connections.c:86 #, c-format msgid "" -"# Merged from %s\n" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" "\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" msgstr "" -"# Mezclado de %s\n" +"Uso: nmcli con { COMANDO | help }\n" +" COMANDO := { list | status | up | down }\n" "\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--" +"nowait] [--timeout ]\n" +" down id | uuid \n" -#: ../src/named-manager/nm-named-manager.c:256 -msgid "NOTE: the libc resolver may not support more than 3 nameservers." -msgstr "" -"NOTA: el resolutor de nombres de libc puede que no soporte más de 3 " -"servidores de nombres." +#: ../cli/src/connections.c:158 +msgid "Connections" +msgstr "Conexiones" -#: ../src/named-manager/nm-named-manager.c:258 -msgid "The nameservers listed below may not be recognized." -msgstr "Puede que los servidores de nombres listados abajo no se reconozcan." +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/devices.c:298 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "Type" +msgstr "Tipo" -#: ../system-settings/src/main.c:376 +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "UUID" +msgstr "UUID" + +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Name" +msgstr "Nombre" + +#: ../cli/src/connections.c:163 #, c-format -msgid "Auto %s" -msgstr "Auto %ss" +msgid "System connections:\n" +msgstr "Conexiones del sistema:\n" + +#: ../cli/src/connections.c:167 +#, c-format +msgid "User connections:\n" +msgstr "Conexiones del usuario:\n" + +#: ../cli/src/connections.c:178 ../cli/src/connections.c:967 +#: ../cli/src/connections.c:983 ../cli/src/connections.c:992 +#: ../cli/src/connections.c:1003 ../cli/src/connections.c:1085 +#: ../cli/src/devices.c:604 ../cli/src/devices.c:614 ../cli/src/devices.c:699 +#: ../cli/src/devices.c:785 ../cli/src/devices.c:792 +#, c-format +msgid "Error: %s argument is missing." +msgstr "Error: falta el argumento %s." + +#: ../cli/src/connections.c:189 +#, c-format +msgid "Error: %s - no such connection." +msgstr "Error: %s; no existe tal conexión." + +#: ../cli/src/connections.c:196 +msgid "System-wide connections" +msgstr "Conexiones amplias del sistema" + +#: ../cli/src/connections.c:205 +msgid "User connections" +msgstr "Conexiones del usuario" + +#: ../cli/src/connections.c:212 ../cli/src/connections.c:1016 +#: ../cli/src/connections.c:1103 ../cli/src/devices.c:446 +#: ../cli/src/devices.c:494 ../cli/src/devices.c:628 ../cli/src/devices.c:706 +#: ../cli/src/devices.c:798 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "Parámetro desconocido: %s\n" + +#: ../cli/src/connections.c:221 +#, c-format +msgid "Error: no valid parameter specified." +msgstr "Error: no se especificó un parámetro válido." + +#. FIXME: Fix the output +#: ../cli/src/connections.c:268 ../cli/src/devices.c:302 +#: ../cli/src/devices.c:321 ../cli/src/devices.c:353 ../cli/src/devices.c:355 +#: ../cli/src/devices.c:357 ../cli/src/devices.c:359 ../cli/src/devices.c:361 +msgid "yes" +msgstr "sí" + +#: ../cli/src/connections.c:268 ../cli/src/devices.c:304 +msgid "no" +msgstr "no" + +#: ../cli/src/connections.c:297 +msgid "Active connections" +msgstr "Activar conexiones" + +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +#: ../cli/src/devices.c:302 ../cli/src/devices.c:304 +msgid "Default" +msgstr "Predeterminada" + +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Service" +msgstr "Servicio" + +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Devices" +msgstr "Dispositivos" + +#: ../cli/src/connections.c:659 +#, c-format +msgid "no active connection on device '%s'" +msgstr "no existe una conexión activa en el dispositivo «%s»" + +#: ../cli/src/connections.c:667 +#, c-format +msgid "no active connection or device" +msgstr "no existe una conexión o dispositivo activo" + +#: ../cli/src/connections.c:730 +msgid "activating" +msgstr "activando" + +#: ../cli/src/connections.c:732 +msgid "activated" +msgstr "activada" + +#: ../cli/src/connections.c:735 ../cli/src/connections.c:758 +#: ../cli/src/connections.c:791 ../cli/src/devices.c:111 +#: ../cli/src/network-manager.c:76 ../cli/src/network-manager.c:98 +msgid "unknown" +msgstr "desconocido" + +#: ../cli/src/connections.c:744 +msgid "VPN connecting (prepare)" +msgstr "Conectando con la VPN (preparación)" + +#: ../cli/src/connections.c:746 +msgid "VPN connecting (need authentication)" +msgstr "Conectando con la VPN (necesita autorización)" + +#: ../cli/src/connections.c:748 +msgid "VPN connecting" +msgstr "Conectando con la VPN" + +#: ../cli/src/connections.c:750 +msgid "VPN connecting (getting IP configuration)" +msgstr "Conectando con la VPN (obteniendo configuración IP)" + +#: ../cli/src/connections.c:752 +msgid "VPN connected" +msgstr "VPN conectada" + +#: ../cli/src/connections.c:754 +msgid "VPN connection failed" +msgstr "Falló la conexión VPN" + +#: ../cli/src/connections.c:756 +msgid "VPN disconnected" +msgstr "VPN desconectada" + +#: ../cli/src/connections.c:767 +msgid "unknown reason" +msgstr "razón desconocida" + +#: ../cli/src/connections.c:769 +msgid "none" +msgstr "ninguna" + +#: ../cli/src/connections.c:771 +msgid "the user was disconnected" +msgstr "se desconectó al usuario" + +#: ../cli/src/connections.c:773 +msgid "the base network connection was interrupted" +msgstr "se interrumpió la conexión base de red" + +#: ../cli/src/connections.c:775 +msgid "the VPN service stopped unexpectedly" +msgstr "el servicio VPN finalizó inesperadamente" + +#: ../cli/src/connections.c:777 +msgid "the VPN service returned invalid configuration" +msgstr "el servicio VPN devolvió una configuración no válida" + +#: ../cli/src/connections.c:779 +msgid "the connection attempt timed out" +msgstr "expiró el intento de conexión" + +#: ../cli/src/connections.c:781 +msgid "the VPN service did not start in time" +msgstr "el servicio VPN no se inició a tiempo" + +#: ../cli/src/connections.c:783 +msgid "the VPN service failed to start" +msgstr "el servicio VPN falló al iniciar" + +#: ../cli/src/connections.c:785 +msgid "no valid VPN secrets" +msgstr "secretos VPN no válidos" + +#: ../cli/src/connections.c:787 +msgid "invalid VPN secrets" +msgstr "secretos VPN inválidos" + +#: ../cli/src/connections.c:789 +msgid "the connection was removed" +msgstr "se rechazó la conexión" + +#: ../cli/src/connections.c:803 +#, c-format +msgid "state: %s\n" +msgstr "estado: %s\n" + +#: ../cli/src/connections.c:806 ../cli/src/connections.c:832 +#, c-format +msgid "Connection activated\n" +msgstr "Conexión activada\n" + +#: ../cli/src/connections.c:809 +#, c-format +msgid "Error: Connection activation failed." +msgstr "Error: falló la activación de la conexión." + +#: ../cli/src/connections.c:828 +#, c-format +msgid "state: %s (%d)\n" +msgstr "estado: %s (%d)\n" + +#: ../cli/src/connections.c:838 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "Error: falló la activación de la conexión: %s." + +#: ../cli/src/connections.c:855 ../cli/src/devices.c:551 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "Error: Expiró el tiempo de conexión de %d segs." + +#: ../cli/src/connections.c:898 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "Error: falló la activación de la conexión: %s" + +#: ../cli/src/connections.c:912 +#, c-format +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "Error: falló la obtención de una conexión activa para «%s»." + +#: ../cli/src/connections.c:921 +#, c-format +msgid "Active connection state: %s\n" +msgstr "Estado de la conexión activa: %s\n" + +#: ../cli/src/connections.c:922 +#, c-format +msgid "Active connection path: %s\n" +msgstr "Ruta de la conexión activa: %s\n" + +#: ../cli/src/connections.c:976 ../cli/src/connections.c:1094 +#, c-format +msgid "Error: Unknown connection: %s." +msgstr "Error: conexión desconocida: %s." + +#: ../cli/src/connections.c:1011 ../cli/src/devices.c:622 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "Error: el valor «%s» no es válido para el tiempo de expiración." + +#: ../cli/src/connections.c:1024 ../cli/src/connections.c:1111 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "Error: se debe especificar el «id» o «uuid»." + +#: ../cli/src/connections.c:1044 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "Error: no se encontró un dispositivo apropiado: %s." + +#: ../cli/src/connections.c:1046 +#, c-format +msgid "Error: No suitable device found." +msgstr "Error: no se encontró un dispositivo apropiado." + +#: ../cli/src/connections.c:1138 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "Aviso: la conexión no está activa\n" + +#: ../cli/src/connections.c:1189 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "Error: el comando «con» «%s» no es válido." + +#: ../cli/src/connections.c:1216 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "Error: no se pudo conectar con D-Bus." + +#: ../cli/src/connections.c:1223 +#, c-format +msgid "Error: Could not get system settings." +msgstr "Error: no se pudo obtener la configuración del sistema." + +#: ../cli/src/connections.c:1231 +#, c-format +msgid "Error: Could not get user settings." +msgstr "Error: no se pudo obtener la configuración del usuario." + +#: ../cli/src/connections.c:1241 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "" +"Error: no se pueden obtener las conexiones: los servicios de configuración " +"no se están ejecutando." + +#: ../cli/src/devices.c:73 +#, c-format +msgid "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] | apinfo iface hwaddr ]\n" +"\n" +msgstr "" +"Uso: nmcli dev { COMANDO | help }\n" +"\n" +" COMANDO := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] | apinfo iface hwaddr ]\n" +"\n" + +#: ../cli/src/devices.c:93 +msgid "unmanaged" +msgstr "sin gestionar" + +#: ../cli/src/devices.c:95 +msgid "unavailable" +msgstr "no disponible" + +#: ../cli/src/devices.c:97 ../cli/src/network-manager.c:73 +msgid "disconnected" +msgstr "desconectado" + +#: ../cli/src/devices.c:99 +msgid "connecting (prepare)" +msgstr "conectando (preparación)" + +#: ../cli/src/devices.c:101 +msgid "connecting (configuring)" +msgstr "conectando (configuración)" + +#: ../cli/src/devices.c:103 +msgid "connecting (need authentication)" +msgstr "conectando (necesita autorización)" + +#: ../cli/src/devices.c:105 +msgid "connecting (getting IP configuration)" +msgstr "conectando (obteniendo configuración IP)" + +#: ../cli/src/devices.c:107 ../cli/src/network-manager.c:71 +msgid "connected" +msgstr "conectado" + +#: ../cli/src/devices.c:109 +msgid "connection failed" +msgstr "falló la conexión" + +#: ../cli/src/devices.c:132 ../cli/src/devices.c:876 +msgid "Unknown" +msgstr "Desconocido" + +#. print them +#: ../cli/src/devices.c:164 ../cli/src/devices.c:266 ../cli/src/devices.c:861 +#: ../cli/src/devices.c:879 +msgid "(none)" +msgstr "(nada)" + +#: ../cli/src/devices.c:209 +#, c-format +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s: error al convertir la dirección IP4 en 0x%X" + +#: ../cli/src/devices.c:238 +#, c-format +msgid "%s, %s, Freq %d MHz, Rate %d Mb/s, Strength %d" +msgstr "%s, %s, frecuencia %d MHz, tasa %d Mb/s, intensidad %d" + +#: ../cli/src/devices.c:239 +msgid "Ad-Hoc" +msgstr "Ad-Hoc" + +#: ../cli/src/devices.c:248 +msgid ", Encrypted: " +msgstr ", cifrado: " + +#: ../cli/src/devices.c:253 +msgid " WEP" +msgstr " WEP" + +#: ../cli/src/devices.c:255 +msgid " WPA" +msgstr " WPA" + +#: ../cli/src/devices.c:257 +msgid " WPA2" +msgstr " WPA2" + +#: ../cli/src/devices.c:260 +msgid " Enterprise" +msgstr " Enterprise" + +#: ../cli/src/devices.c:294 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "Device" +msgstr "Dispositivo" + +#: ../cli/src/devices.c:299 +msgid "Driver" +msgstr "Controlador" + +#: ../cli/src/devices.c:299 ../cli/src/devices.c:567 +msgid "(unknown)" +msgstr "(desconocido)" + +#: ../cli/src/devices.c:300 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "State" +msgstr "Estado" + +#: ../cli/src/devices.c:313 +msgid "HW Address" +msgstr "Dirección hardware" + +#: ../cli/src/devices.c:319 +#, c-format +msgid "" +"\n" +" Capabilities:\n" +msgstr "" +"\n" +" Capacidades:\n" + +#: ../cli/src/devices.c:321 +msgid "Carrier Detect" +msgstr "Detector de portadora" + +#: ../cli/src/devices.c:336 +#, c-format +msgid "%u Mb/s" +msgstr "%u Mb/s" + +#: ../cli/src/devices.c:337 +msgid "Speed" +msgstr "Velocidad" + +#: ../cli/src/devices.c:348 +#, c-format +msgid "" +"\n" +" Wireless Properties\n" +msgstr "" +"\n" +" Propiedades de la conexión inalámbrica\n" + +#: ../cli/src/devices.c:353 +msgid "WEP Encryption" +msgstr "Cifrado WEP" + +#: ../cli/src/devices.c:355 +msgid "WPA Encryption" +msgstr "Cifrado WPA" + +#: ../cli/src/devices.c:357 +msgid "WPA2 Encryption" +msgstr "Cifrado WPA2" + +#: ../cli/src/devices.c:359 +msgid "TKIP cipher" +msgstr "Cifrado TKIP" + +#: ../cli/src/devices.c:361 +msgid "CCMP cipher" +msgstr "Cifrado CCMP" + +#: ../cli/src/devices.c:368 +#, c-format +msgid "" +"\n" +" Wireless Access Points %s\n" +msgstr "" +"\n" +" Puntos de acceso inalámbricos %s\n" + +#: ../cli/src/devices.c:368 +msgid "(* = current AP)" +msgstr "(* = PA actual)" + +#: ../cli/src/devices.c:374 +#, c-format +msgid "" +"\n" +" Wired Properties\n" +msgstr "" +"\n" +" Propiedades de la conexión cableada\n" + +#: ../cli/src/devices.c:377 ../cli/src/devices.c:379 +msgid "Carrier" +msgstr "Portadora" + +#: ../cli/src/devices.c:377 +msgid "on" +msgstr "encendido" + +#: ../cli/src/devices.c:379 +msgid "off" +msgstr "apagado" + +#: ../cli/src/devices.c:387 +#, c-format +msgid "" +"\n" +" IPv4 Settings:\n" +msgstr "" +"\n" +" Ajustes de IPv4:\n" + +#: ../cli/src/devices.c:395 +msgid "Address" +msgstr "Dirección" + +#: ../cli/src/devices.c:401 +msgid "Prefix" +msgstr "Prefijo" + +#: ../cli/src/devices.c:405 +msgid "Gateway" +msgstr "Pasarela" + +#: ../cli/src/devices.c:416 +msgid "DNS" +msgstr "DNS" + +#: ../cli/src/devices.c:458 +msgid "Status of devices" +msgstr "Estado de los dispositivos" + +#: ../cli/src/devices.c:487 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "Error: falta el argumento «%s»." + +#: ../cli/src/devices.c:516 ../cli/src/devices.c:655 ../cli/src/devices.c:729 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "Error: no se encontró el dispositivo «%s»" + +#: ../cli/src/devices.c:539 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "Éxito: se desconectó correctamente el dispositivo «%s»." + +#: ../cli/src/devices.c:564 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "Error: falló la desconexión del dispositivo «%s» (%s): %s" + +#: ../cli/src/devices.c:572 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "Estado del dispositivo: %d (%s)\n" + +#: ../cli/src/devices.c:636 +#, c-format +msgid "Error: iface has to be specified." +msgstr "Error: se debe especificar la interfaz." + +#: ../cli/src/devices.c:736 ../cli/src/devices.c:746 +msgid "WiFi scan list" +msgstr "Lista de la inspección inalámbrica" + +#: ../cli/src/devices.c:740 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "Error: el dispositivo «%s» no es un dispositivo inalámbrico." + +#: ../cli/src/devices.c:754 +msgid "Device:" +msgstr "Dispositivo:" + +#: ../cli/src/devices.c:806 +#, c-format +msgid "Error: hwaddr has to be specified." +msgstr "Error: se debe especificar la dirección hardware." + +#: ../cli/src/devices.c:844 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "Error: no se encontró el punto de acceso con dirección hardware «%s»." + +#: ../cli/src/devices.c:862 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" + +#: ../cli/src/devices.c:863 +#, c-format +msgid "%u MB/s" +msgstr "%u MB/s" + +#: ../cli/src/devices.c:869 ../cli/src/devices.c:871 +msgid "AP parameters" +msgstr "Parámetros del PA" + +#: ../cli/src/devices.c:873 +msgid "SSID:" +msgstr "SSID:" + +#: ../cli/src/devices.c:874 +msgid "BSSID:" +msgstr "BSSID:" + +#: ../cli/src/devices.c:875 +msgid "Frequency:" +msgstr "Frecuencia:" + +#: ../cli/src/devices.c:876 +msgid "Mode:" +msgstr "Modo:" + +#: ../cli/src/devices.c:876 +msgid "Ad-hoc" +msgstr "Ad-hoc" + +#: ../cli/src/devices.c:876 +msgid "Infrastructure" +msgstr "Infraestructura" + +#: ../cli/src/devices.c:877 +msgid "Maximal bitrate:" +msgstr "Tasa de bits máxima:" + +#: ../cli/src/devices.c:878 +msgid "Strength:" +msgstr "Intensidad:" + +#: ../cli/src/devices.c:879 +msgid "Flags:" +msgstr "Opciones:" + +#: ../cli/src/devices.c:879 +msgid "privacy" +msgstr "privacidad" + +#: ../cli/src/devices.c:880 +msgid "WPA flags:" +msgstr "Opciones WPA:" + +#: ../cli/src/devices.c:881 +msgid "RSN flags:" +msgstr "Opciones RSN:" + +#: ../cli/src/devices.c:907 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "Error: el comando «dev wifi» «%s» no es válido." + +#: ../cli/src/devices.c:943 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "Error: el comando «dev» «%s» no es válido." + +#: ../cli/src/network-manager.c:46 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" +msgstr "" +"Uso: nmcli nm {COMANDO | help }\n" +"\n" +" COMANDO := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + +#: ../cli/src/network-manager.c:67 +msgid "asleep" +msgstr "dormida" + +#: ../cli/src/network-manager.c:69 +msgid "connecting" +msgstr "conectando" + +#: ../cli/src/network-manager.c:93 ../cli/src/network-manager.c:94 +#: ../cli/src/network-manager.c:95 ../cli/src/network-manager.c:96 +#: ../cli/src/network-manager.c:143 ../cli/src/network-manager.c:160 +msgid "enabled" +msgstr "activado" + +#: ../cli/src/network-manager.c:93 ../cli/src/network-manager.c:94 +#: ../cli/src/network-manager.c:95 ../cli/src/network-manager.c:96 +#: ../cli/src/network-manager.c:143 ../cli/src/network-manager.c:160 +msgid "disabled" +msgstr "desactivado" + +#: ../cli/src/network-manager.c:102 +msgid "NetworkManager status" +msgstr "Estado de NetworkManager" + +#: ../cli/src/network-manager.c:104 +msgid "NM running:" +msgstr "NM en ejecución:" + +#: ../cli/src/network-manager.c:104 +msgid "running" +msgstr "en ejecución" + +#: ../cli/src/network-manager.c:104 +msgid "not running" +msgstr "no está en ejecución" + +#: ../cli/src/network-manager.c:105 +msgid "NM state:" +msgstr "Estado de NM:" + +#: ../cli/src/network-manager.c:106 +msgid "NM wireless hardware:" +msgstr "Hardware inalámbrico de NM:" + +#. no argument, show current state +#: ../cli/src/network-manager.c:107 ../cli/src/network-manager.c:143 +msgid "NM wireless:" +msgstr "Inalámbrico de NM:" + +#: ../cli/src/network-manager.c:108 +msgid "NM WWAN hardware:" +msgstr "Hardware WWAN de NM:" + +#. no argument, show current state +#: ../cli/src/network-manager.c:109 ../cli/src/network-manager.c:160 +msgid "NM WWAN:" +msgstr "WWAN de NM:" + +#: ../cli/src/network-manager.c:150 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "Error: parámetro «wifi» no válido: «%s»." + +#: ../cli/src/network-manager.c:167 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "Error: parámetro «wwan» no válido: «%s»." + +#: ../cli/src/network-manager.c:178 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "Error: el comando «nm» «%s» no es válido." + +#: ../cli/src/nmcli.c:65 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"Uso: %s [OPCIONES] OBJETO { COMANDO | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] salida breve\n" +" -p[retty] salida bonita\n" +" -v[ersion] mostrar la versión del programa\n" +" -h[elp] mostrar esta ayuda\n" +"\n" +"OBJECT\n" +" nm estado de NetworkManager\n" +" con conexiones de NetworkManager\n" +" dev dispositivos gestionados por NetworkManager\n" +"\n" + +#: ../cli/src/nmcli.c:106 +#, c-format +msgid "Object '%s' is unknown, try 'nmcli help'." +msgstr "Se desconoce el objeto «%s», intente «nmcli help»." + +#: ../cli/src/nmcli.c:139 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "herramienta nmcli, versión %s\n" + +#: ../cli/src/nmcli.c:145 +#, c-format +msgid "Option '%s' is unknown, try 'nmcli -help'." +msgstr "Se desconoce la opción «%s», intente «nmcli -help»." + +#: ../cli/src/nmcli.c:164 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "Se capturó la señal %d, apagando..." + +#: ../cli/src/nmcli.c:189 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "Error: no se pudo conectar con NetworkManager." + +#: ../cli/src/nmcli.c:205 +msgid "Success" +msgstr "Éxito" #: ../libnm-util/crypto.c:120 #, c-format @@ -184,8 +955,9 @@ msgstr "No hay memoria suficiente para almacenar la IV." msgid "IV contains non-hexadecimal digits." msgstr "IV contiene dígitos no hexadecimales." -#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:143 -#: ../libnm-util/crypto_nss.c:169 +#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:336 #, c-format msgid "Private key cipher '%s' was unknown." msgstr "Se desconocía el cifrador de clave privada «%s»." @@ -205,71 +977,106 @@ msgstr "No se pudo determinar el tipo de clave privada." msgid "Not enough memory to store decrypted private key." msgstr "No hay memoria suficiente para almacenar la clave privada descifrada." -#: ../libnm-util/crypto_gnutls.c:46 +#: ../libnm-util/crypto_gnutls.c:49 msgid "Failed to initialize the crypto engine." msgstr "Falló al inicializar el motor de descifrado." -#: ../libnm-util/crypto_gnutls.c:90 +#: ../libnm-util/crypto_gnutls.c:93 #, c-format msgid "Failed to initialize the MD5 engine: %s / %s." msgstr "Falló al inicializar el motor MD5: %s / %s." -#: ../libnm-util/crypto_gnutls.c:152 ../libnm-util/crypto_nss.c:178 +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "Longitud IV no válida (debe ser al menos %zd)." + +#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188 #, c-format msgid "Not enough memory for decrypted key buffer." msgstr "No hay memoria suficiente para el búfer de la clave descifrada." -#: ../libnm-util/crypto_gnutls.c:160 +#: ../libnm-util/crypto_gnutls.c:173 #, c-format msgid "Failed to initialize the decryption cipher context: %s / %s." msgstr "Falló al inicializar el contexto de descifrado: %s / %s." -#: ../libnm-util/crypto_gnutls.c:169 +#: ../libnm-util/crypto_gnutls.c:182 #, c-format msgid "Failed to set symmetric key for decryption: %s / %s." msgstr "Falló al establecer la clave simétrica para el descifrado: %s / %s." -#: ../libnm-util/crypto_gnutls.c:178 +#: ../libnm-util/crypto_gnutls.c:191 #, c-format msgid "Failed to set IV for decryption: %s / %s." msgstr "Falló al establecer IV para el descifrado: %s / %s." -#: ../libnm-util/crypto_gnutls.c:187 +#: ../libnm-util/crypto_gnutls.c:200 #, c-format msgid "Failed to decrypt the private key: %s / %s." msgstr "Falló al descifrar la clave privada: %s / %s." -#: ../libnm-util/crypto_gnutls.c:200 +#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 +#, c-format +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "Falló al descifrar la clave privada: longitud inesperada del relleno." + +#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 #, c-format msgid "Failed to decrypt the private key." msgstr "Falló al descifrar la clave privada." -#: ../libnm-util/crypto_gnutls.c:235 +#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "No se pudo reservar memoria para el cifrado." + +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "Falló al inicializar el contexto de cifrado: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "Falló al establecer la clave simétrica para el cifrado: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +msgid "Failed to set IV for encryption: %s / %s." +msgstr "Falló al establecer IV para el cifrado: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +msgid "Failed to encrypt the data: %s / %s." +msgstr "Falló al cifrar los datos: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:362 #, c-format msgid "Error initializing certificate data: %s" msgstr "Error al inicializar los datos del certificado: %s" -#: ../libnm-util/crypto_gnutls.c:257 +#: ../libnm-util/crypto_gnutls.c:384 #, c-format msgid "Couldn't decode certificate: %s" msgstr "No se pudo decodificar el certificado: %s" -#: ../libnm-util/crypto_gnutls.c:281 +#: ../libnm-util/crypto_gnutls.c:408 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %s" msgstr "No se pudo inicializar el decodificador PKCS#12: %s" -#: ../libnm-util/crypto_gnutls.c:294 +#: ../libnm-util/crypto_gnutls.c:421 #, c-format msgid "Couldn't decode PKCS#12 file: %s" msgstr "No se pudo decodificar el archivo PKCS#12: %s" -#: ../libnm-util/crypto_gnutls.c:306 +#: ../libnm-util/crypto_gnutls.c:433 #, c-format msgid "Couldn't verify PKCS#12 file: %s" msgstr "No se pudo verificar el archivo PKCS#12: %s" -#: ../libnm-util/crypto_nss.c:57 +#: ../libnm-util/crypto_nss.c:56 #, c-format msgid "Failed to initialize the crypto engine: %d." msgstr "Falló al inicializar el motor de cifrado: %d." @@ -279,62 +1086,290 @@ msgstr "Falló al inicializar el motor de cifrado: %d." msgid "Failed to initialize the MD5 context: %d." msgstr "Falló al inicializar el contexto MD5: %d" -#: ../libnm-util/crypto_nss.c:186 +#: ../libnm-util/crypto_nss.c:179 +#, c-format +msgid "Invalid IV length (must be at least %d)." +msgstr "Longitud de IV no válida (debe ser al menos %d)." + +#: ../libnm-util/crypto_nss.c:196 #, c-format msgid "Failed to initialize the decryption cipher slot." msgstr "Falló al inicializar la ranura de descifrado." -#: ../libnm-util/crypto_nss.c:196 +#: ../libnm-util/crypto_nss.c:206 #, c-format msgid "Failed to set symmetric key for decryption." msgstr "Falló al establecer la clave simétrica para el descifrado." -#: ../libnm-util/crypto_nss.c:206 +#: ../libnm-util/crypto_nss.c:216 #, c-format msgid "Failed to set IV for decryption." msgstr "Falló al establecer IV para el descifrado." -#: ../libnm-util/crypto_nss.c:214 +#: ../libnm-util/crypto_nss.c:224 #, c-format msgid "Failed to initialize the decryption context." msgstr "Falló al inicializar el contexto de descifrado." -#: ../libnm-util/crypto_nss.c:227 +#: ../libnm-util/crypto_nss.c:237 #, c-format msgid "Failed to decrypt the private key: %d." msgstr "Falló al descifrar la clave privada: %d." -#: ../libnm-util/crypto_nss.c:239 +#: ../libnm-util/crypto_nss.c:245 +#, c-format +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "" +"Falló al descifrar la clave privada: los datos descifrados son demasiado " +"grandes." + +#: ../libnm-util/crypto_nss.c:256 #, c-format msgid "Failed to finalize decryption of the private key: %d." msgstr "Falló la finalización del descifrado de la clave privada: %d." -#: ../libnm-util/crypto_nss.c:284 +#: ../libnm-util/crypto_nss.c:364 +#, c-format +msgid "Failed to initialize the encryption cipher slot." +msgstr "Falló al inicializar la ranura de cifrado." + +#: ../libnm-util/crypto_nss.c:372 +#, c-format +msgid "Failed to set symmetric key for encryption." +msgstr "Falló al establecer la clave simétrica para el cifrado." + +#: ../libnm-util/crypto_nss.c:380 +#, c-format +msgid "Failed to set IV for encryption." +msgstr "Falló al establecer IV para el cifrado." + +#: ../libnm-util/crypto_nss.c:388 +#, c-format +msgid "Failed to initialize the encryption context." +msgstr "Falló al inicializar el contexto de cifrado." + +#: ../libnm-util/crypto_nss.c:396 +#, c-format +msgid "Failed to encrypt: %d." +msgstr "Falló al cifrar: %d." + +#: ../libnm-util/crypto_nss.c:404 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "Cantidad de datos inesperada después de cifrar." + +#: ../libnm-util/crypto_nss.c:447 #, c-format msgid "Couldn't decode certificate: %d" msgstr "No se pudo decodificar el certificado: %d" -#: ../libnm-util/crypto_nss.c:317 +#: ../libnm-util/crypto_nss.c:482 #, c-format msgid "Couldn't convert password to UCS2: %d" msgstr "No se pudo convertir la contraseña a UCS2: %d" -#: ../libnm-util/crypto_nss.c:345 +#: ../libnm-util/crypto_nss.c:510 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %d" msgstr "No se pudo inicializar el decodificador PKCS#12: %d" -#: ../libnm-util/crypto_nss.c:354 +#: ../libnm-util/crypto_nss.c:519 #, c-format msgid "Couldn't decode PKCS#12 file: %d" msgstr "No se pudo decodificar el archivo PKCS#12: %d" -#: ../libnm-util/crypto_nss.c:363 +#: ../libnm-util/crypto_nss.c:528 #, c-format msgid "Couldn't verify PKCS#12 file: %d" msgstr "No se pudo verificar el archivo PKCS#12: %d" -#~ msgid "Not enough memory to create private key decryption key." +#: ../libnm-util/crypto_nss.c:557 +msgid "Could not generate random data." +msgstr "No se pudo generar datos aleatorios." + +#: ../libnm-util/nm-utils.c:1924 +#, c-format +msgid "Not enough memory to make encryption key." +msgstr "No hay memoria suficiente para crear la clave privada de cifrado." + +#: ../libnm-util/nm-utils.c:2034 +msgid "Could not allocate memory for PEM file creation." +msgstr "No se pudo reservar memoria para crear el archivo PEM." + +#: ../libnm-util/nm-utils.c:2046 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "No se pudo asignar memoria para escribir IV en el archivo PEM." + +#: ../libnm-util/nm-utils.c:2058 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "" +"No se pudo asignar memoria para escribir la clave cifrada en el archivo PEM." + +#: ../libnm-util/nm-utils.c:2077 +#, c-format +msgid "Could not allocate memory for PEM file data." +msgstr "No se pudo reservar memoria para el archivo de datos PEM." + +#: ../src/nm-netlink-monitor.c:100 ../src/nm-netlink-monitor.c:231 +#: ../src/nm-netlink-monitor.c:653 +#, c-format +msgid "error processing netlink message: %s" +msgstr "error al procesar el mensaje de netlink: %s" + +#: ../src/nm-netlink-monitor.c:214 +msgid "error occurred while waiting for data on socket" +msgstr "ha ocurrido un error mientras esperaban datos en un socket" + +#: ../src/nm-netlink-monitor.c:254 +#, c-format +msgid "unable to connect to netlink for monitoring link status: %s" +msgstr "" +"no se puede conectar con netlink para monitorizar el estado del enlace: %s" + +#: ../src/nm-netlink-monitor.c:265 +#, c-format +#| msgid "unable to allocate netlink handle: %s" +msgid "unable to enable netlink handle credential passing: %s" +msgstr "no se pudo activar el manejador de paso de credenciales de netlink: %s" + +#: ../src/nm-netlink-monitor.c:291 ../src/nm-netlink-monitor.c:353 +#, c-format +msgid "unable to allocate netlink handle for monitoring link status: %s" +msgstr "" +"no se puede asignar el manejador netlink para monitorizar el estado del " +"enlace: %s" + +#: ../src/nm-netlink-monitor.c:376 +#, c-format +msgid "unable to allocate netlink link cache for monitoring link status: %s" +msgstr "" +"no se puede asignar el enlace a la caché de netlink para monitorizar el " +"estado del enlace: %s" + +#: ../src/nm-netlink-monitor.c:502 +#, c-format +msgid "unable to join netlink group: %s" +msgstr "no pudo unirse al grupo netlink: %s" + +#: ../src/nm-netlink-monitor.c:629 ../src/nm-netlink-monitor.c:642 +#, c-format +msgid "error updating link cache: %s" +msgstr "error al actualizar el enlace caché: %s" + +#: ../src/main.c:502 +#, c-format +msgid "Invalid option. Please use --help to see a list of valid options.\n" +msgstr "" +"Opción no válida. Use --help para ver una lista de las opciones válidas.\n" + +#: ../src/main.c:562 +#, c-format +msgid "%s. Please use --help to see a list of valid options.\n" +msgstr "%s. Use --help para ver una lista de las opciones válidas.\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:325 +msgid "# Created by NetworkManager\n" +msgstr "# Creado por NetworkManager\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:341 +#, c-format +msgid "" +"# Merged from %s\n" +"\n" +msgstr "" +"# Mezclado de %s\n" +"\n" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:279 +msgid "no usable DHCP client could be found." +msgstr "no se encontró ningún cliente de DHCP usable." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:288 +msgid "'dhclient' could be found." +msgstr "no se pudo encontrar «dhclient»." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:298 +msgid "'dhcpcd' could be found." +msgstr "no se pudo encontrar «dhcpd»." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:306 +#, c-format +msgid "unsupported DHCP client '%s'" +msgstr "no se soporta el cliente de DHCP «%s»" + +#: ../src/logging/nm-logging.c:146 +#, c-format +msgid "Unknown log level '%s'" +msgstr "Nivel de registro «%s» desconocido" + +#: ../src/logging/nm-logging.c:171 +#, c-format +msgid "Unknown log domain '%s'" +msgstr "Dominio de registro «%s» desconocido" + +#: ../src/named-manager/nm-named-manager.c:343 +msgid "NOTE: the libc resolver may not support more than 3 nameservers." +msgstr "" +"NOTA: el resolutor de nombres de libc puede que no soporte más de 3 " +"servidores de nombres." + +#: ../src/named-manager/nm-named-manager.c:345 +msgid "The nameservers listed below may not be recognized." +msgstr "Puede que los servidores de nombres listados abajo no se reconozcan." + +#: ../src/system-settings/nm-default-wired-connection.c:157 +#, c-format +msgid "Auto %s" +msgstr "Auto %ss" + +#: ../system-settings/plugins/ifcfg-rh/reader.c:3254 +msgid "System" +msgstr "Sistema" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "Compartir la conexión a través de una red inalámbrica protegida" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "Compartir la conexión a través de una red inalámbrica abierta" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "Modificar el nombre de equipo persistente del sistema" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 +msgid "Modify system connections" +msgstr "Modificar las conexiones del sistema" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 +msgid "System policy prevents modification of system settings" +msgstr "" +"La política del sistema impide modificaciones de los ajustes del sistema" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +msgid "System policy prevents modification of the persistent system hostname" +msgstr "" +"La política del sistema impide la modificaciones del nombre de equipo " +"persistente del sistema" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "" +"La política del sistema impide compartir conexiones a través de una red " +"inalámbrica protegida" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "" +"La política del sistema impide compartir conexiones a través de una red " +"inalámbrica abierta" + +#~ msgid "unable to join netlink group for monitoring link status: %s" #~ msgstr "" -#~ "No hay memoria suficiente para crear la clave privada de la clave de " -#~ "descifrado." +#~ "no pudo unirse al grupo netlink para monitorizar el estado del enlace: %s" + +#~ msgid "unable to connect to netlink: %s" +#~ msgstr "no se puede conectar con netlink: %s" diff --git a/po/eu.po b/po/eu.po index 58353d1b00..f2e96a504a 100644 --- a/po/eu.po +++ b/po/eu.po @@ -1,69 +1,1279 @@ -# translation of eu.po to Basque +# translation of NetworkManager.master.po to Basque # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # -# Iñaki Larrañaga Murgoitio , 2008. +# Iñaki Larrañaga Murgoitio , 2008, 2010. msgid "" msgstr "" -"Project-Id-Version: eu\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-09-09 16:04+0200\n" -"PO-Revision-Date: 2008-09-09 16:25+0200\n" +"Project-Id-Version: NetworkManager.master\n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager&component=general\n" +"POT-Creation-Date: 2010-02-26 03:24+0000\n" +"PO-Revision-Date: 2010-03-16 17:05+0100\n" "Last-Translator: Iñaki Larrañaga Murgoitio \n" "Language-Team: Basque \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: KBabel 1.11.4\n" -#: ../src/nm-netlink-monitor.c:193 ../src/nm-netlink-monitor.c:474 +#: ../cli/src/connections.c:86 +#, c-format +msgid "" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" +msgstr "" +"Erabilera: nmcli con { KOMANDOA| help }\n" +" KOMANDOA := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" + +#: ../cli/src/connections.c:158 +msgid "Connections" +msgstr "Konexioak" + +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/devices.c:298 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "Type" +msgstr "Mota" + +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "UUID" +msgstr "UUIDa" + +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Name" +msgstr "Izena" + +#: ../cli/src/connections.c:163 +#, c-format +msgid "System connections:\n" +msgstr "Sistemako konexioak:\n" + +#: ../cli/src/connections.c:167 +#, c-format +msgid "User connections:\n" +msgstr "Erabiltzailearen konexioak:\n" + +#: ../cli/src/connections.c:178 ../cli/src/connections.c:967 +#: ../cli/src/connections.c:983 ../cli/src/connections.c:992 +#: ../cli/src/connections.c:1003 ../cli/src/connections.c:1085 +#: ../cli/src/devices.c:604 ../cli/src/devices.c:614 ../cli/src/devices.c:699 +#: ../cli/src/devices.c:785 ../cli/src/devices.c:792 +#, c-format +msgid "Error: %s argument is missing." +msgstr "Errorea: %s argumentua falta da." + +#: ../cli/src/connections.c:189 +#, c-format +msgid "Error: %s - no such connection." +msgstr "Errorea: %s - ez dago halako konexiorik" + +#: ../cli/src/connections.c:196 +msgid "System-wide connections" +msgstr "Sistema osoko konexioak" + +#: ../cli/src/connections.c:205 +msgid "User connections" +msgstr "Erabiltzailearen konexioak" + +#: ../cli/src/connections.c:212 ../cli/src/connections.c:1016 +#: ../cli/src/connections.c:1103 ../cli/src/devices.c:446 +#: ../cli/src/devices.c:494 ../cli/src/devices.c:628 ../cli/src/devices.c:706 +#: ../cli/src/devices.c:798 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "Parametro ezezagunak: %s\n" + +#: ../cli/src/connections.c:221 +#, c-format +msgid "Error: no valid parameter specified." +msgstr "Errorea: ez da baliozko parametrorik zehaztu." + +#. FIXME: Fix the output +#: ../cli/src/connections.c:268 ../cli/src/devices.c:302 +#: ../cli/src/devices.c:321 ../cli/src/devices.c:353 ../cli/src/devices.c:355 +#: ../cli/src/devices.c:357 ../cli/src/devices.c:359 ../cli/src/devices.c:361 +msgid "yes" +msgstr "bai" + +#: ../cli/src/connections.c:268 ../cli/src/devices.c:304 +msgid "no" +msgstr "ez" + +#: ../cli/src/connections.c:297 +msgid "Active connections" +msgstr "Konexio aktiboak" + +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +#: ../cli/src/devices.c:302 ../cli/src/devices.c:304 +msgid "Default" +msgstr "Lehenetsia" + +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Service" +msgstr "Zerbitzua" + +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Devices" +msgstr "Gailuak" + +#: ../cli/src/connections.c:659 +#, c-format +msgid "no active connection on device '%s'" +msgstr "ez dago konexio aktiborik '%s' gailuan" + +#: ../cli/src/connections.c:667 +#, c-format +msgid "no active connection or device" +msgstr "ez dago konexio edo gailu aktiborik" + +#: ../cli/src/connections.c:730 +msgid "activating" +msgstr "aktibatzen" + +#: ../cli/src/connections.c:732 +msgid "activated" +msgstr "aktibatuta" + +#: ../cli/src/connections.c:735 ../cli/src/connections.c:758 +#: ../cli/src/connections.c:791 ../cli/src/devices.c:111 +#: ../cli/src/network-manager.c:76 ../cli/src/network-manager.c:98 +msgid "unknown" +msgstr "ezezaguna" + +#: ../cli/src/connections.c:744 +msgid "VPN connecting (prepare)" +msgstr "VPN konektatzen (prestatzen)" + +#: ../cli/src/connections.c:746 +msgid "VPN connecting (need authentication)" +msgstr "VPN konektatzen (autentifikazioa behar da)" + +#: ../cli/src/connections.c:748 +msgid "VPN connecting" +msgstr "VPN konektatzen" + +#: ../cli/src/connections.c:750 +msgid "VPN connecting (getting IP configuration)" +msgstr "VPN konektatzen (IP konfigurazioa lortzen)" + +#: ../cli/src/connections.c:752 +msgid "VPN connected" +msgstr "VPN konektatuta" + +#: ../cli/src/connections.c:754 +msgid "VPN connection failed" +msgstr "VPN konexioak huts egin du" + +#: ../cli/src/connections.c:756 +msgid "VPN disconnected" +msgstr "VPN deskonektatuta" + +#: ../cli/src/connections.c:767 +msgid "unknown reason" +msgstr "arrazoi ezezaguna" + +#: ../cli/src/connections.c:769 +msgid "none" +msgstr "bat ere ez" + +#: ../cli/src/connections.c:771 +msgid "the user was disconnected" +msgstr "erabiltzailea deskonektatu egin da" + +#: ../cli/src/connections.c:773 +msgid "the base network connection was interrupted" +msgstr "oinarriko sarearen konexioa eten egin da" + +#: ../cli/src/connections.c:775 +msgid "the VPN service stopped unexpectedly" +msgstr "VPN zerbitzua ustekabean gelditu da" + +#: ../cli/src/connections.c:777 +msgid "the VPN service returned invalid configuration" +msgstr "VPN zerbitzuak konfigurazio baliogabea itzuli du" + +#: ../cli/src/connections.c:779 +msgid "the connection attempt timed out" +msgstr "konexioaren saiakeraren denbora-muga" + +#: ../cli/src/connections.c:781 +msgid "the VPN service did not start in time" +msgstr "VPN zerbitzua ez da orduan abiatu" + +#: ../cli/src/connections.c:783 +msgid "the VPN service failed to start" +msgstr "huts egin du VPN zerbitzuak abiaraztean" + +#: ../cli/src/connections.c:785 +msgid "no valid VPN secrets" +msgstr "VPNren ezkutukoak ez dira baliozkoak" + +#: ../cli/src/connections.c:787 +msgid "invalid VPN secrets" +msgstr "VPNren ezkutukoak baliogabeak" + +#: ../cli/src/connections.c:789 +msgid "the connection was removed" +msgstr "konexioa kendu egin da" + +#: ../cli/src/connections.c:803 +#, c-format +msgid "state: %s\n" +msgstr "egoera: %s\n" + +#: ../cli/src/connections.c:806 ../cli/src/connections.c:832 +#, c-format +msgid "Connection activated\n" +msgstr "Konexioa aktibatuta\n" + +#: ../cli/src/connections.c:809 +#, c-format +msgid "Error: Connection activation failed." +msgstr "Errorea: konexioaren aktibazioak huts egin du" + +#: ../cli/src/connections.c:828 +#, c-format +msgid "state: %s (%d)\n" +msgstr "egoera: %s (%d)\n" + +#: ../cli/src/connections.c:838 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "Errorea: konexioaren aktibazioak huts egin du: %s." + +#: ../cli/src/connections.c:855 ../cli/src/devices.c:551 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "Errorea: denbora-muga %d segundotan iraungituta." + +#: ../cli/src/connections.c:898 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "Errorea: konexioaren aktibazioak huts egin du: %s" + +#: ../cli/src/connections.c:912 +#, c-format +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "Errorea: hust egin du '%s'(r)en konexio aktiboa lortzean." + +#: ../cli/src/connections.c:921 +#, c-format +msgid "Active connection state: %s\n" +msgstr "Konexio aktiboaren egoera: %s\n" + +#: ../cli/src/connections.c:922 +#, c-format +msgid "Active connection path: %s\n" +msgstr "Konexio aktiboaren bide-izena: %s\n" + +#: ../cli/src/connections.c:976 ../cli/src/connections.c:1094 +#, c-format +msgid "Error: Unknown connection: %s." +msgstr "Errorea: konexio ezezaguna: %s." + +#: ../cli/src/connections.c:1011 ../cli/src/devices.c:622 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "Errorea: denbora-mugaren '%s' balioa ez da baliozkoa." + +#: ../cli/src/connections.c:1024 ../cli/src/connections.c:1111 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "Errorea: IDa edo UUIDa zehaztu behar da." + +#: ../cli/src/connections.c:1044 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "Errorea: ez da gailu egokirik aurkitu: %s." + +#: ../cli/src/connections.c:1046 +#, c-format +msgid "Error: No suitable device found." +msgstr "Errorea: ez da gailu egokirik aurkitu." + +#: ../cli/src/connections.c:1138 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "Abisua: konexioa ez dago aktibo\n" + +#: ../cli/src/connections.c:1189 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "Errorea: 'con' komandoko '%s' ez da baliozkoa." + +#: ../cli/src/connections.c:1216 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "Errorea: ezin izan da 'D-Bus'-arekin konektatu." + +#: ../cli/src/connections.c:1223 +#, c-format +msgid "Error: Could not get system settings." +msgstr "Errorea: ezin izan da sistemako ezarpenik lortu." + +#: ../cli/src/connections.c:1231 +#, c-format +msgid "Error: Could not get user settings." +msgstr "Errorea: ezin izan da erabiltzailearen ezarpenik lortu." + +#: ../cli/src/connections.c:1241 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "Errorea: ezin da konexiorik lortu. Ezarpenen zerbitzuak ez dira exekutatzen ari." + +#: ../cli/src/devices.c:73 +#, c-format +msgid "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] | apinfo iface hwaddr ]\n" +"\n" +msgstr "" +"Erabilera: nmcli dev { KOMANDOA | help }\n" +"\n" +" KOMANDOA := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] | apinfo iface hwaddr ]\n" +"\n" + +#: ../cli/src/devices.c:93 +msgid "unmanaged" +msgstr "kudeatu gabea" + +#: ../cli/src/devices.c:95 +msgid "unavailable" +msgstr "ez dago erabilgarri" + +#: ../cli/src/devices.c:97 ../cli/src/network-manager.c:73 +msgid "disconnected" +msgstr "deskonektatuta" + +#: ../cli/src/devices.c:99 +msgid "connecting (prepare)" +msgstr "konektatzen (prestatzen)" + +#: ../cli/src/devices.c:101 +msgid "connecting (configuring)" +msgstr "konektatzen (konfiguratzen)" + +#: ../cli/src/devices.c:103 +msgid "connecting (need authentication)" +msgstr "konektatzen (autentifikazioa behar da)" + +#: ../cli/src/devices.c:105 +msgid "connecting (getting IP configuration)" +msgstr "konektatzen (IParen konfigurazioa lortzen)" + +#: ../cli/src/devices.c:107 ../cli/src/network-manager.c:71 +msgid "connected" +msgstr "konektatuta" + +#: ../cli/src/devices.c:109 +msgid "connection failed" +msgstr "konexioak huts egin du" + +#: ../cli/src/devices.c:132 ../cli/src/devices.c:876 +msgid "Unknown" +msgstr "Ezezaguna" + +#. print them +#: ../cli/src/devices.c:164 ../cli/src/devices.c:266 ../cli/src/devices.c:861 +#: ../cli/src/devices.c:879 +msgid "(none)" +msgstr "(bat ere ez)" + +#: ../cli/src/devices.c:209 +#, c-format +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s: errorea 0x%X IP4 helbidea bihurtzean" + +#: ../cli/src/devices.c:238 +#, c-format +msgid "%s, %s, Freq %d MHz, Rate %d Mb/s, Strength %d" +msgstr "%s, %s, Maizt. %d MHz, Emaria: %d Mb/s, Indarra %d" + +#: ../cli/src/devices.c:239 +msgid "Ad-Hoc" +msgstr "Ad-Hoc" + +#: ../cli/src/devices.c:248 +msgid ", Encrypted: " +msgstr ", enkriptatuta: " + +#: ../cli/src/devices.c:253 +msgid " WEP" +msgstr " WEP" + +#: ../cli/src/devices.c:255 +msgid " WPA" +msgstr " WPA" + +#: ../cli/src/devices.c:257 +msgid " WPA2" +msgstr " WPA2" + +#: ../cli/src/devices.c:260 +msgid " Enterprise" +msgstr " enpresa" + +#: ../cli/src/devices.c:294 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "Device" +msgstr "Gailua" + +#: ../cli/src/devices.c:299 +msgid "Driver" +msgstr "Kontrolatzailea" + +#: ../cli/src/devices.c:299 ../cli/src/devices.c:567 +msgid "(unknown)" +msgstr "(ezezaguna)" + +#: ../cli/src/devices.c:300 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "State" +msgstr "Egoera" + +#: ../cli/src/devices.c:313 +msgid "HW Address" +msgstr "HW helbidea" + +#: ../cli/src/devices.c:319 +#, c-format +msgid "" +"\n" +" Capabilities:\n" +msgstr "" +"\n" +" Ahalmenak:\n" + +#: ../cli/src/devices.c:321 +msgid "Carrier Detect" +msgstr "Garraiolaria detektatuta" + +#: ../cli/src/devices.c:336 +#, c-format +msgid "%u Mb/s" +msgstr "%u Mb/s" + +#: ../cli/src/devices.c:337 +msgid "Speed" +msgstr "Abiadura" + +#: ../cli/src/devices.c:348 +#, c-format +msgid "" +"\n" +" Wireless Properties\n" +msgstr "" +"\n" +" Haririk gabekoaren propietateak\n" + +#: ../cli/src/devices.c:353 +msgid "WEP Encryption" +msgstr "WEP enkriptatzea" + +#: ../cli/src/devices.c:355 +msgid "WPA Encryption" +msgstr "WPA enkriptatzea" + +#: ../cli/src/devices.c:357 +msgid "WPA2 Encryption" +msgstr "WPA2 enkriptatzea" + +#: ../cli/src/devices.c:359 +msgid "TKIP cipher" +msgstr "TKIP zifratua" + +#: ../cli/src/devices.c:361 +msgid "CCMP cipher" +msgstr "CCMP zifratua" + +#: ../cli/src/devices.c:368 +#, c-format +msgid "" +"\n" +" Wireless Access Points %s\n" +msgstr "" +"\n" +" %s haririk gabeko sarbide-puntua\n" + +#: ../cli/src/devices.c:368 +msgid "(* = current AP)" +msgstr "(* = uneko SarPunt)" + +#: ../cli/src/devices.c:374 +#, c-format +msgid "" +"\n" +" Wired Properties\n" +msgstr "" +"\n" +" Haridunaren propietateak\n" + +#: ../cli/src/devices.c:377 ../cli/src/devices.c:379 +msgid "Carrier" +msgstr "Garraiolaria" + +#: ../cli/src/devices.c:377 +msgid "on" +msgstr "piztu" + +#: ../cli/src/devices.c:379 +msgid "off" +msgstr "itzali" + +#: ../cli/src/devices.c:387 +#, c-format +msgid "" +"\n" +" IPv4 Settings:\n" +msgstr "" +"\n" +" IPv4 ezarpenak:\n" + +#: ../cli/src/devices.c:395 +msgid "Address" +msgstr "Helbidea" + +#: ../cli/src/devices.c:401 +msgid "Prefix" +msgstr "Aurrizkia" + +#: ../cli/src/devices.c:405 +msgid "Gateway" +msgstr "Atebidea" + +#: ../cli/src/devices.c:416 +msgid "DNS" +msgstr "DNS" + +#: ../cli/src/devices.c:458 +msgid "Status of devices" +msgstr "Gailuen egoera" + +#: ../cli/src/devices.c:487 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "Errorea: '%s' argumentua falta da." + +#: ../cli/src/devices.c:516 ../cli/src/devices.c:655 ../cli/src/devices.c:729 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "Errorea: '%s' gailua ez da aurkitu." + +#: ../cli/src/devices.c:539 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "Ongi burututa: '%s' gailua ongi deskonektatu da." + +#: ../cli/src/devices.c:564 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "Errorea: huts egin du '%s' (%s) gailua deskonektatzean: %s" + +#: ../cli/src/devices.c:572 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "Gailuaren egoera: %d (%s)\n" + +#: ../cli/src/devices.c:636 +#, c-format +msgid "Error: iface has to be specified." +msgstr "Errorea: interfazea zehaztu behar da." + +#: ../cli/src/devices.c:736 ../cli/src/devices.c:746 +msgid "WiFi scan list" +msgstr "Wifi-en eskaneatze-zerrenda" + +#: ../cli/src/devices.c:740 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "Errorea: '%s' gailua ez da haririk gabeko gailu bat." + +#: ../cli/src/devices.c:754 +msgid "Device:" +msgstr "Gailua:" + +#: ../cli/src/devices.c:806 +#, c-format +msgid "Error: hwaddr has to be specified." +msgstr "Errorea: hardwarearen helbidea zehaztu behar da." + +#: ../cli/src/devices.c:844 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "Errorea: ez da '%s' hw helbideko sarbide-punturik aurkitu." + +#: ../cli/src/devices.c:862 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" + +#: ../cli/src/devices.c:863 +#, c-format +msgid "%u MB/s" +msgstr "%u MB/s" + +#: ../cli/src/devices.c:869 ../cli/src/devices.c:871 +msgid "AP parameters" +msgstr "SPuntuaren parametroak" + +#: ../cli/src/devices.c:873 +msgid "SSID:" +msgstr "SSIDa:" + +#: ../cli/src/devices.c:874 +msgid "BSSID:" +msgstr "BSSIDa:" + +#: ../cli/src/devices.c:875 +msgid "Frequency:" +msgstr "Maiztasuna:" + +#: ../cli/src/devices.c:876 +msgid "Mode:" +msgstr "Modua:" + +#: ../cli/src/devices.c:876 +msgid "Ad-hoc" +msgstr "Ad-hoc" + +#: ../cli/src/devices.c:876 +msgid "Infrastructure" +msgstr "Azpiegitura" + +#: ../cli/src/devices.c:877 +msgid "Maximal bitrate:" +msgstr "Gehienezko bit-emaria:" + +#: ../cli/src/devices.c:878 +msgid "Strength:" +msgstr "Indarra:" + +#: ../cli/src/devices.c:879 +msgid "Flags:" +msgstr "Banderak:" + +#: ../cli/src/devices.c:879 +msgid "privacy" +msgstr "pribatutasuna" + +#: ../cli/src/devices.c:880 +msgid "WPA flags:" +msgstr "WPA banderak:" + +#: ../cli/src/devices.c:881 +msgid "RSN flags:" +msgstr "RSN banderak:" + +#: ../cli/src/devices.c:907 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "Errorea: 'dev wifi' komandoko '%s' ez da baliozkoa." + +#: ../cli/src/devices.c:943 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "Errorea: 'dev' komandoko '%s' ez da baliozkoa." + +#: ../cli/src/network-manager.c:46 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" +msgstr "" +"Erabilera: nmcli nm { KOMANDOA | help }\n" +"\n" +" KOMANDOA := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + +#: ../cli/src/network-manager.c:67 +msgid "asleep" +msgstr "lotan" + +#: ../cli/src/network-manager.c:69 +msgid "connecting" +msgstr "konektatzen" + +#: ../cli/src/network-manager.c:93 ../cli/src/network-manager.c:94 +#: ../cli/src/network-manager.c:95 ../cli/src/network-manager.c:96 +#: ../cli/src/network-manager.c:143 ../cli/src/network-manager.c:160 +msgid "enabled" +msgstr "gaituta" + +#: ../cli/src/network-manager.c:93 ../cli/src/network-manager.c:94 +#: ../cli/src/network-manager.c:95 ../cli/src/network-manager.c:96 +#: ../cli/src/network-manager.c:143 ../cli/src/network-manager.c:160 +msgid "disabled" +msgstr "desgaituta" + +#: ../cli/src/network-manager.c:102 +msgid "NetworkManager status" +msgstr "NetworkManager-en egoera" + +#: ../cli/src/network-manager.c:104 +msgid "NM running:" +msgstr "NM-ren exekuzioa:" + +#: ../cli/src/network-manager.c:104 +msgid "running" +msgstr "exekutatzen" + +#: ../cli/src/network-manager.c:104 +msgid "not running" +msgstr "ez da exekutatzen ari" + +#: ../cli/src/network-manager.c:105 +msgid "NM state:" +msgstr "NM-ren egoera:" + +#: ../cli/src/network-manager.c:106 +msgid "NM wireless hardware:" +msgstr "NM haririk gabeko hardwarea:" + +#. no argument, show current state +#: ../cli/src/network-manager.c:107 ../cli/src/network-manager.c:143 +msgid "NM wireless:" +msgstr "NM haririk gabekoa:" + +#: ../cli/src/network-manager.c:108 +msgid "NM WWAN hardware:" +msgstr "NM WWAN hardwarea:" + +#. no argument, show current state +#: ../cli/src/network-manager.c:109 ../cli/src/network-manager.c:160 +msgid "NM WWAN:" +msgstr "NM WWAN:" + +#: ../cli/src/network-manager.c:150 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "Errorea: baliogabeko 'wifi' parametroa: '%s'." + +#: ../cli/src/network-manager.c:167 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "Errorea: baliogabeko 'wwan' parametroa: '%s'." + +#: ../cli/src/network-manager.c:178 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "Errorea: 'nm' komandoko '%s' ez da baliozkoa." + +#: ../cli/src/nmcli.c:65 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"Erabilera: %s [AUKERAK] OBJEKTUA { KOMANDOA | help }\n" +"\n" +"AUKERAK\n" +" -t[erse] xehetasunezko irteera\n" +" -p[retty] irteera politta\n" +" -v[ersion] erakutsi programaren bertsioa\n" +" -h[elp] erakutsi laguntza hau\n" +"\n" +"OBJEKTUA\n" +" nm NetworkManager-en egoera\n" +" con NetworkManager-en konexioak\n" +" dev NetworkManager-ek kudeatutako gailuak\n" +"\n" + +#: ../cli/src/nmcli.c:106 +#, c-format +msgid "Object '%s' is unknown, try 'nmcli help'." +msgstr "'%s' objektua ezezaguna da. Saiatu honako komandoarekin: nmcli help" + +#: ../cli/src/nmcli.c:139 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "nmcli tresna, %s bertsioa\n" + +#: ../cli/src/nmcli.c:145 +#, c-format +msgid "Option '%s' is unknown, try 'nmcli -help'." +msgstr "'%s' aukera ezezaguna da. Saiatu honako komandoarekin: nmcli -help" + +#: ../cli/src/nmcli.c:164 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "%d seinalea jaso da, itzaltzen..." + +#: ../cli/src/nmcli.c:189 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "Errorea: ezin izan da NetworkManager-ekin konektatu." + +#: ../cli/src/nmcli.c:205 +msgid "Success" +msgstr "Behar bezala egin da" + +#: ../libnm-util/crypto.c:120 +#, c-format +msgid "PEM key file had no end tag '%s'." +msgstr "PEM gako-fitxategiak ez du amaierako '%s' etiketa." + +#: ../libnm-util/crypto.c:130 +#, c-format +msgid "Doesn't look like a PEM private key file." +msgstr "Ez dirudi PEM gako pribatuaren fitxategia denik." + +#: ../libnm-util/crypto.c:138 +#, c-format +msgid "Not enough memory to store PEM file data." +msgstr "Ez dago nahikoa memoria PEM fitxategiko datuak gordetzeko." + +#: ../libnm-util/crypto.c:154 +#, c-format +msgid "Malformed PEM file: Proc-Type was not first tag." +msgstr "Gaizki osatutako PEM fitxategia: Proc-Type ez da aurreneko etiketa." + +#: ../libnm-util/crypto.c:162 +#, c-format +msgid "Malformed PEM file: unknown Proc-Type tag '%s'." +msgstr "Gaizki osatutako PEM fitxategia: Proc-Type '%s' etiketa ezezaguna." + +#: ../libnm-util/crypto.c:172 +#, c-format +msgid "Malformed PEM file: DEK-Info was not the second tag." +msgstr "Gaizki osatutako PEM fitxategia: DEK-Info ez da bigarren etiketa." + +#: ../libnm-util/crypto.c:183 +#, c-format +msgid "Malformed PEM file: no IV found in DEK-Info tag." +msgstr "Gaizki osatutako PEM fitxategia: ez da IV aurkitu DEK-Info etiketan." + +#: ../libnm-util/crypto.c:190 +#, c-format +msgid "Malformed PEM file: invalid format of IV in DEK-Info tag." +msgstr "" +"Gaizki osatutako PEM fitxategia: IV-ek okerreko formatua du DEK-Info " +"etiketan." + +#: ../libnm-util/crypto.c:203 +#, c-format +msgid "Malformed PEM file: unknown private key cipher '%s'." +msgstr "Gaizki osatutako PEM fitxategia: gako pribatuaren '%s' zifratua ezezaguna." + +#: ../libnm-util/crypto.c:222 +#, c-format +msgid "Could not decode private key." +msgstr "Ezin izan da gako pribatua deskodetu." + +#: ../libnm-util/crypto.c:267 +#, c-format +msgid "PEM certificate '%s' had no end tag '%s'." +msgstr "'%s' PEM ziurtagiriak ez du amaierako '%s' etiketa." + +#: ../libnm-util/crypto.c:277 +#, c-format +msgid "Failed to decode certificate." +msgstr "Huts egin du ziurtagiria deskodetzean." + +#: ../libnm-util/crypto.c:286 +#, c-format +msgid "Not enough memory to store certificate data." +msgstr "Ez dago nahikoa memoria ziurtagiriaren datuak gordetzeko." + +#: ../libnm-util/crypto.c:294 +#, c-format +#| msgid "Not enough memory to store PEM file data." +msgid "Not enough memory to store file data." +msgstr "Ez dago nahikoa memoria fitxategiko datuak gordetzeko." + +#: ../libnm-util/crypto.c:324 +#, c-format +msgid "IV must be an even number of bytes in length." +msgstr "IV-ek byte-kopuru bikoitia izan behar du luzeran." + +#: ../libnm-util/crypto.c:333 +#, c-format +msgid "Not enough memory to store the IV." +msgstr "Ez dago nahikoa memoria IV gordetzeko." + +#: ../libnm-util/crypto.c:344 +#, c-format +msgid "IV contains non-hexadecimal digits." +msgstr "IV-ek hamaseitarrak ez diren digituak ditu." + +#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:336 +#, c-format +msgid "Private key cipher '%s' was unknown." +msgstr "Gako pribatuaren '%s' zifratua ezezaguna da." + +#: ../libnm-util/crypto.c:391 +#, c-format +#| msgid "Not enough memory to store decrypted private key." +msgid "Not enough memory to decrypt private key." +msgstr "Ez dago nahikoa memoria gako pribatua deszifratzeko." + +#: ../libnm-util/crypto.c:511 +#, c-format +#| msgid "Failed to decrypt the private key: %d." +msgid "Unable to determine private key type." +msgstr "Huts egin du gako pribatuaren mota zehaztean." + +#: ../libnm-util/crypto.c:530 +#, c-format +msgid "Not enough memory to store decrypted private key." +msgstr "Ez dago nahikoa memoria deszifratutako gako pribatua gordetzeko." + +#: ../libnm-util/crypto_gnutls.c:49 +msgid "Failed to initialize the crypto engine." +msgstr "Huts egin du zifratzearen motorra hasieratzean." + +#: ../libnm-util/crypto_gnutls.c:93 +#, c-format +msgid "Failed to initialize the MD5 engine: %s / %s." +msgstr "Huts egin du MD5 motorra hasieratzean: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "Baliogabeko IV luzera (gutxienez %zd izan behar du)." + +#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188 +#, c-format +msgid "Not enough memory for decrypted key buffer." +msgstr "Ez dago nahikoa memoria deszifratutako gako buferrarentzako." + +#: ../libnm-util/crypto_gnutls.c:173 +#, c-format +msgid "Failed to initialize the decryption cipher context: %s / %s." +msgstr "Huts egin du zifratze-testuingurua hasieratzean deszifratzeko: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:182 +#, c-format +msgid "Failed to set symmetric key for decryption: %s / %s." +msgstr "Huts egin du gako simetrikoa ezartzean deszifratzeko: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:191 +#, c-format +msgid "Failed to set IV for decryption: %s / %s." +msgstr "Huts egin du IV ezartzean deszifratzeko: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:200 +#, c-format +msgid "Failed to decrypt the private key: %s / %s." +msgstr "Huts egin du gako pribatua deszifratzean: %s /%s." + +#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 +#, c-format +#| msgid "Failed to decrypt the private key: %d." +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "Huts egin du gako pribatua deszifratzean: ustekabeko betegarriaren luzera." + +#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 +#, c-format +#| msgid "Failed to decrypt the private key: %d." +msgid "Failed to decrypt the private key." +msgstr "Huts egin du gako pribatua deszifratzean." + +#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "Ezin izan da memoria esleitu enkriptatzeko." + +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +#| msgid "Failed to initialize the decryption cipher context: %s / %s." +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "Huts egin du zifratze-testuingurua enkriptazioa hasieratzean: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +#| msgid "Failed to set symmetric key for decryption: %s / %s." +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "Huts egin du gako simetrikoa ezartzean enkriptatzeko: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +#| msgid "Failed to set IV for decryption: %s / %s." +msgid "Failed to set IV for encryption: %s / %s." +msgstr "Huts egin du IV ezartzean enkriptatzeko: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +#| msgid "Failed to decrypt the private key: %s / %s." +msgid "Failed to encrypt the data: %s / %s." +msgstr "Huts egin du datuak enkriptatzean: %s /%s." + +#: ../libnm-util/crypto_gnutls.c:362 +#, c-format +msgid "Error initializing certificate data: %s" +msgstr "Errorea ziurtagiriaren datuak hasieratzean: %s" + +#: ../libnm-util/crypto_gnutls.c:384 +#, c-format +msgid "Couldn't decode certificate: %s" +msgstr "Ezin izan da ziurtagiria deskodetu: %s." + +#: ../libnm-util/crypto_gnutls.c:408 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %s" +msgstr "Ezin izan da PKCS#12 deskodetzailea hasieratu: %s" + +#: ../libnm-util/crypto_gnutls.c:421 +#, c-format +#| msgid "Couldn't decode certificate: %s" +msgid "Couldn't decode PKCS#12 file: %s" +msgstr "Ezin izan da PKCS#12 fitxategia deskodetu: %s" + +#: ../libnm-util/crypto_gnutls.c:433 +#, c-format +#| msgid "Couldn't decode certificate: %s" +msgid "Couldn't verify PKCS#12 file: %s" +msgstr "Ezin izan da PKCS#12 fitxategia egiaztatu: %s" + +#: ../libnm-util/crypto_nss.c:56 +#, c-format +msgid "Failed to initialize the crypto engine: %d." +msgstr "Huts egin du zifratzearen motorra hasieratzean: %d." + +#: ../libnm-util/crypto_nss.c:111 +#, c-format +msgid "Failed to initialize the MD5 context: %d." +msgstr "Huts egin du MD5-en testuingurua hasieratzean: %d." + +#: ../libnm-util/crypto_nss.c:179 +#, c-format +msgid "Invalid IV length (must be at least %d)." +msgstr "Baliogabeko IV luzera (gutxienez %d izan behar du)" + +#: ../libnm-util/crypto_nss.c:196 +#, c-format +msgid "Failed to initialize the decryption cipher slot." +msgstr "Huts egin du zifratuaren erretena hasieratzean deszifratzeko." + +#: ../libnm-util/crypto_nss.c:206 +#, c-format +msgid "Failed to set symmetric key for decryption." +msgstr "Huts egin du gako simetrikoa ezartzean deszifratzeko." + +#: ../libnm-util/crypto_nss.c:216 +#, c-format +msgid "Failed to set IV for decryption." +msgstr "Huts egin du IV ezartzean deszifratzeko." + +#: ../libnm-util/crypto_nss.c:224 +#, c-format +msgid "Failed to initialize the decryption context." +msgstr "Huts egin du deszifratzearen testuingurua hasieratzean." + +#: ../libnm-util/crypto_nss.c:237 +#, c-format +msgid "Failed to decrypt the private key: %d." +msgstr "Huts egin du gako pribatua deszifratzean: %d." + +#: ../libnm-util/crypto_nss.c:245 +#, c-format +#| msgid "Failed to decrypt the private key: %d." +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "Huts egin du gako pribatua deszifratzean: deszifratutako datuak luzeegiak dira." + +#: ../libnm-util/crypto_nss.c:256 +#, c-format +msgid "Failed to finalize decryption of the private key: %d." +msgstr "Huts egin du gako pribatuaren deszifratzea amaitzean: %d." + +#: ../libnm-util/crypto_nss.c:364 +#, c-format +#| msgid "Failed to initialize the decryption cipher slot." +msgid "Failed to initialize the encryption cipher slot." +msgstr "Huts egin du zifratuaren erretenaren enkriptazioa hasieratzean." + +#: ../libnm-util/crypto_nss.c:372 +#, c-format +#| msgid "Failed to set symmetric key for decryption." +msgid "Failed to set symmetric key for encryption." +msgstr "Huts egin du gako simetrikoa ezartzean enkriptatzeko." + +#: ../libnm-util/crypto_nss.c:380 +#, c-format +#| msgid "Failed to set IV for decryption." +msgid "Failed to set IV for encryption." +msgstr "Huts egin du IV ezartzean enkriptatzeko." + +#: ../libnm-util/crypto_nss.c:388 +#, c-format +#| msgid "Failed to initialize the decryption context." +msgid "Failed to initialize the encryption context." +msgstr "Huts egin du enkriptazioaren testuingurua hasieratzean." + +#: ../libnm-util/crypto_nss.c:396 +#, c-format +#| msgid "Failed to decrypt the private key: %d." +msgid "Failed to encrypt: %d." +msgstr "Huts egin du enkriptatzean: %d." + +#: ../libnm-util/crypto_nss.c:404 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "Ustekabeko datu kopurua enkriptatu ostean." + +#: ../libnm-util/crypto_nss.c:447 +#, c-format +msgid "Couldn't decode certificate: %d" +msgstr "Ezin izan da ziurtagiria dekodetu: %d" + +#: ../libnm-util/crypto_nss.c:482 +#, c-format +msgid "Couldn't convert password to UCS2: %d" +msgstr "Ezin izan da pasahitza UCS2-ra bihurtu: %d" + +#: ../libnm-util/crypto_nss.c:510 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %d" +msgstr "Ezin izan da PKCS#12 deskodetzailea hasieratu: %d" + +#: ../libnm-util/crypto_nss.c:519 +#, c-format +#| msgid "Couldn't decode certificate: %d" +msgid "Couldn't decode PKCS#12 file: %d" +msgstr "Ezin izan da PKCS#12 fitxategia deskodetu: %d" + +#: ../libnm-util/crypto_nss.c:528 +#, c-format +#| msgid "Couldn't decode certificate: %d" +msgid "Couldn't verify PKCS#12 file: %d" +msgstr "Ezin izan da PKCS#12 fitxategia egiaztatu: %d" + +#: ../libnm-util/crypto_nss.c:557 +#| msgid "Could not decode private key." +msgid "Could not generate random data." +msgstr "Ezin izan da ausazko daturik sortu." + +#: ../libnm-util/nm-utils.c:1545 +#, c-format +#| msgid "Not enough memory to create private key decryption key." +msgid "Not enough memory to make encryption key." +msgstr "Ez dago nahikoa memoria gakoa enkriptatzeko." + +#: ../libnm-util/nm-utils.c:1655 +#| msgid "Not enough memory to store PEM file data." +msgid "Could not allocate memory for PEM file creation." +msgstr "Ezin izan da memoria esleitu PEM fitxategia sortzeko." + +#: ../libnm-util/nm-utils.c:1667 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "Ezin izan da memoria esleitu IV idazteko PEM fitxategian." + +#: ../libnm-util/nm-utils.c:1679 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "Ezin izan da memoria esleitu enkriptatutako gakoa idazteko PEM fitxategian." + +#: ../libnm-util/nm-utils.c:1698 +#, c-format +#| msgid "Not enough memory to store PEM file data." +msgid "Could not allocate memory for PEM file data." +msgstr "Ezin izan da memoria esleitu PEM fitxategiko datuentzako." + +#: ../src/nm-netlink-monitor.c:194 ../src/nm-netlink-monitor.c:464 +#: ../src/nm-netlink-monitor.c:582 +#: ../src/ip6-manager/nm-netlink-listener.c:352 #, c-format msgid "error processing netlink message: %s" msgstr "errorea netlink-en mezua prozesatzean: %s" -#: ../src/nm-netlink-monitor.c:250 +#: ../src/nm-netlink-monitor.c:260 #, c-format msgid "unable to allocate netlink handle for monitoring link status: %s" msgstr "ezin da netlink-ekin konektatu konexioaren egoera monitorizatzeko: %s" -#: ../src/nm-netlink-monitor.c:260 +#: ../src/nm-netlink-monitor.c:270 #, c-format msgid "unable to connect to netlink for monitoring link status: %s" msgstr "ezin da netlink-ekin konektatu konexioaren egoera monitorizatzeko: %s" -#: ../src/nm-netlink-monitor.c:268 +#: ../src/nm-netlink-monitor.c:278 #, c-format msgid "unable to join netlink group for monitoring link status: %s" msgstr "ezin da netlink taldearekin elkartu konexioaren egoera monitorizatzeko: %s" -#: ../src/nm-netlink-monitor.c:276 +#: ../src/nm-netlink-monitor.c:286 #, c-format msgid "unable to allocate netlink link cache for monitoring link status: %s" msgstr "" "ezin da netlink-en konexio-cachea esleitu konexioaren egoera " "monitorizatzeko: %s" -#: ../src/nm-netlink-monitor.c:439 +#: ../src/nm-netlink-monitor.c:494 +#: ../src/ip6-manager/nm-netlink-listener.c:382 +msgid "error occurred while waiting for data on socket" +msgstr "errorea gertatu da socket-eko datuen zai egotean" + +#: ../src/nm-netlink-monitor.c:558 ../src/nm-netlink-monitor.c:571 #, c-format msgid "error updating link cache: %s" msgstr "errorea netlink-en konexio-cachea eguneratzean: %s" -#: ../src/nm-netlink-monitor.c:497 -#, c-format -msgid "error occurred while waiting for data on socket" -msgstr "errorea gertatu da socket-eko datuen zai egotean" - -#: ../src/NetworkManager.c:250 +#: ../src/NetworkManager.c:494 #, c-format msgid "Invalid option. Please use --help to see a list of valid options.\n" msgstr "Aukera baliogabea. Erabili '--help' baliozko aukeren zerrenda ikusteko.\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:89 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:300 msgid "# Created by NetworkManager\n" msgstr "# NetworkManager-ek sortuta\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:95 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:316 #, c-format msgid "" "# Merged from %s\n" @@ -72,205 +1282,70 @@ msgstr "" "# %s(e)ndik batuta\n" "\n" -#: ../src/named-manager/nm-named-manager.c:240 -msgid "NOTE: the libc resolver may not support more than 3 nameservers." -msgstr "" -"OHARRA: libc-en ebaztaileak ez du 3 izen-zerbitzari baino gehiago " -"onartzen." +#: ../src/ip6-manager/nm-netlink-listener.c:200 +#, c-format +#| msgid "unable to allocate netlink handle for monitoring link status: %s" +msgid "unable to allocate netlink handle: %s" +msgstr "ezin da netlink-en kudeaketa esleitu: %s" -#: ../src/named-manager/nm-named-manager.c:242 +#: ../src/ip6-manager/nm-netlink-listener.c:210 +#, c-format +#| msgid "unable to connect to netlink for monitoring link status: %s" +msgid "unable to connect to netlink: %s" +msgstr "ezin da netlink-ekin konektatu: %s" + +#: ../src/ip6-manager/nm-netlink-listener.c:307 +#, c-format +#| msgid "unable to join netlink group for monitoring link status: %s" +msgid "unable to join netlink group: %s" +msgstr "ezin da netlink taldearekin elkartu: %s" + +#: ../src/named-manager/nm-named-manager.c:315 +msgid "NOTE: the libc resolver may not support more than 3 nameservers." +msgstr "OHARRA: libc-en ebaztaileak ez du 3 izen-zerbitzari baino gehiago onartzen." + +#: ../src/named-manager/nm-named-manager.c:317 msgid "The nameservers listed below may not be recognized." msgstr "Azpian zerrendatutako izen-zenbitzariak ez dira ezagutuko." -#: ../system-settings/src/main.c:366 +#: ../src/system-settings/nm-default-wired-connection.c:157 #, c-format msgid "Auto %s" msgstr "Auto %s" -#: ../libnm-util/crypto.c:125 -#, c-format -msgid "PEM key file had no end tag '%s'." -msgstr "PEM gako-fitxategiak ez du amaierako '%s' etiketa." +#: ../system-settings/plugins/ifcfg-rh/reader.c:3213 +msgid "System" +msgstr "Sistema" -#: ../libnm-util/crypto.c:135 -#, c-format -msgid "Doesn't look like a PEM private key file." -msgstr "Ez dirudi PEM gako pribatuaren fitxategia denik." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "Konexio partekatua babestutako haririk gabeko sarearen bidez" -#: ../libnm-util/crypto.c:143 -#, c-format -msgid "Not enough memory to store PEM file data." -msgstr "Ez dago nahikoa memoria PEM fitxategiko datuak gordetzeko." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "Konexio partekatua irekitako haririk gabeko sarearen bidez" -#: ../libnm-util/crypto.c:159 -#, c-format -msgid "Malformed PEM file: Proc-Type was not first tag." -msgstr "Gaizki osatutako PEM fitxategia: Proc-Type ez da aurreneko etiketa." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "Aldatu sistemako ostalari-izen iraunkorra" -#: ../libnm-util/crypto.c:167 -#, c-format -msgid "Malformed PEM file: unknown Proc-Type tag '%s'." -msgstr "Gaizki osatutako PEM fitxategia: Proc-Type '%s' etiketa ezezaguna." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 +msgid "Modify system connections" +msgstr "Aldatu sistemako konexioak" -#: ../libnm-util/crypto.c:177 -#, c-format -msgid "Malformed PEM file: DEK-Info was not the second tag." -msgstr "Gaizki osatutako PEM fitxategia: DEK-Info ez da bigarren etiketa." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 +msgid "System policy prevents modification of system settings" +msgstr "Sistemako arauek sistemako ezarpenak aldatzea saihesten dute" -#: ../libnm-util/crypto.c:188 -#, c-format -msgid "Malformed PEM file: no IV found in DEK-Info tag." -msgstr "Gaizki osatutako PEM fitxategia: ez da IV aurkitu DEK-Info etiketan." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +msgid "System policy prevents modification of the persistent system hostname" +msgstr "Sistemako arauek sistemako ostalari-izen iraunkorra aldatzea saihesten dute" -#: ../libnm-util/crypto.c:195 -#, c-format -msgid "Malformed PEM file: invalid format of IV in DEK-Info tag." -msgstr "" -"Gaizki osatutako PEM fitxategia: IV-ek okerreko formatua du DEK-Info " -"etiketan." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "Sistemako arauek babestutako haririk gabeko sareen bidez konexioak partekatzea saihesten dute" -#: ../libnm-util/crypto.c:208 -#, c-format -msgid "Malformed PEM file: unknown private key cipher '%s'." -msgstr "Gaizki osatutako PEM fitxategia: gako pribatuaren '%s' zifratua ezezaguna." - -#: ../libnm-util/crypto.c:227 -#, c-format -msgid "Could not decode private key." -msgstr "Ezin izan da gako pribatua deskodetu." - -#: ../libnm-util/crypto.c:271 -#, c-format -msgid "PEM certificate '%s' had no end tag '%s'." -msgstr "'%s' PEM ziurtagiriak ez du amaierako '%s' etiketa." - -#: ../libnm-util/crypto.c:281 -#, c-format -msgid "Failed to decode certificate." -msgstr "Huts egin du ziurtagiria deskodetzean." - -#: ../libnm-util/crypto.c:290 ../libnm-util/crypto.c:298 -#, c-format -msgid "Not enough memory to store certificate data." -msgstr "Ez dago nahikoa memoria ziurtagiriaren datuak gordetzeko." - -#: ../libnm-util/crypto.c:328 -#, c-format -msgid "IV must be an even number of bytes in length." -msgstr "IV-ek byte-kopuru bikoitia izan behar du luzeran." - -#: ../libnm-util/crypto.c:337 -#, c-format -msgid "Not enough memory to store the IV." -msgstr "Ez dago nahikoa memoria IV gordetzeko." - -#: ../libnm-util/crypto.c:348 -#, c-format -msgid "IV contains non-hexadecimal digits." -msgstr "IV-ek hamaseitarrak ez diren digituak ditu." - -#: ../libnm-util/crypto.c:386 ../libnm-util/crypto_gnutls.c:143 -#: ../libnm-util/crypto_nss.c:157 -#, c-format -msgid "Private key cipher '%s' was unknown." -msgstr "Gako pribatuaren '%s' zifratua ezezaguna da." - -#: ../libnm-util/crypto.c:395 -#, c-format -msgid "Not enough memory to create private key decryption key." -msgstr "Ez dago nahikoa memoria gako pribatuaren gako deszifratua sortzeko." - -#: ../libnm-util/crypto.c:513 -#, c-format -msgid "Not enough memory to store decrypted private key." -msgstr "Ez dago nahikoa memoria deszifratutako gako pribatua gordetzeko." - -#: ../libnm-util/crypto_gnutls.c:45 -msgid "Failed to initialize the crypto engine." -msgstr "Huts egin du zifratzearen motorra hasieratzean." - -#: ../libnm-util/crypto_gnutls.c:89 -#, c-format -msgid "Failed to initialize the MD5 engine: %s / %s." -msgstr "Huts egin du MD5 motorra hasieratzean: %s / %s." - -#: ../libnm-util/crypto_gnutls.c:152 ../libnm-util/crypto_nss.c:166 -#, c-format -msgid "Not enough memory for decrypted key buffer." -msgstr "Ez dago nahikoa memoria deszifratutako gako buferrarentzako." - -#: ../libnm-util/crypto_gnutls.c:160 -#, c-format -msgid "Failed to initialize the decryption cipher context: %s / %s." -msgstr "Huts egin du zifratze-testuingurua hasieratzean deszifratzeko: %s / %s." - -#: ../libnm-util/crypto_gnutls.c:169 -#, c-format -msgid "Failed to set symmetric key for decryption: %s / %s." -msgstr "Huts egin du gako simetrikoa ezartzean deszifratzeko: %s / %s." - -#: ../libnm-util/crypto_gnutls.c:178 -#, c-format -msgid "Failed to set IV for decryption: %s / %s." -msgstr "Huts egin du IV ezartzean deszifratzeko: %s / %s." - -#: ../libnm-util/crypto_gnutls.c:187 -#, c-format -msgid "Failed to decrypt the private key: %s / %s." -msgstr "Huts egin du gako pribatua deszifratzean: %s /%s." - -#: ../libnm-util/crypto_gnutls.c:225 -#, c-format -msgid "Error initializing certificate data: %s" -msgstr "Errorea ziurtagiriaren datuak hasieratzean: %s" - -#: ../libnm-util/crypto_gnutls.c:237 -#, c-format -msgid "Couldn't decode certificate: %s" -msgstr "Ezin izan da ziurtagiria deskodetu: %s." - -#: ../libnm-util/crypto_nss.c:52 -#, c-format -msgid "Failed to initialize the crypto engine: %d." -msgstr "Huts egin du zifratzearen motorra hasieratzean: %d." - -#: ../libnm-util/crypto_nss.c:98 -#, c-format -msgid "Failed to initialize the MD5 context: %d." -msgstr "Huts egin du MD5-en testuingurua hasieratzean: %d." - -#: ../libnm-util/crypto_nss.c:174 -#, c-format -msgid "Failed to initialize the decryption cipher slot." -msgstr "Huts egin du zifratuaren erretena hasieratzean deszifratzeko." - -#: ../libnm-util/crypto_nss.c:184 -#, c-format -msgid "Failed to set symmetric key for decryption." -msgstr "Huts egin du gako simetrikoa ezartzean deszifratzeko." - -#: ../libnm-util/crypto_nss.c:194 -#, c-format -msgid "Failed to set IV for decryption." -msgstr "Huts egin du IV ezartzean deszifratzeko." - -#: ../libnm-util/crypto_nss.c:202 -#, c-format -msgid "Failed to initialize the decryption context." -msgstr "Huts egin du deszifratzearen testuingurua hasieratzean." - -#: ../libnm-util/crypto_nss.c:215 -#, c-format -msgid "Failed to decrypt the private key: %d." -msgstr "Huts egin du gako pribatua deszifratzean: %d." - -#: ../libnm-util/crypto_nss.c:227 -#, c-format -msgid "Failed to finalize decryption of the private key: %d." -msgstr "Huts egin du gako pribatuaren deszifratzea amaitzean: %d." - -#: ../libnm-util/crypto_nss.c:271 -#, c-format -msgid "Couldn't decode certificate: %d" -msgstr "Ezin izan da ziurtagiria dekodetu: %d" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "Sistemako arauek irakitako haririk gabeko sareen bidez konexioak partekatzea saihesten dute" diff --git a/po/gl.po b/po/gl.po index 5193a4b118..ca5d3d53cd 100644 --- a/po/gl.po +++ b/po/gl.po @@ -2,53 +2,487 @@ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # -# Ignacio Casal Quinteiro , 2007. -# Ignacio Casal Quinteiro , 2008. +# Ignacio Casal Quinteiro , 2007, 2008. +# Miguel Anxo Bouzada , 2010. msgid "" msgstr "" "Project-Id-Version: gl\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-02-13 16:21+0100\n" -"PO-Revision-Date: 2008-02-13 16:23+0100\n" -"Last-Translator: Ignacio Casal Quinteiro \n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager&component=general\n" +"POT-Creation-Date: 2009-09-29 03:25+0000\n" +"PO-Revision-Date: 2010-02-25 11:06+0100\n" +"Last-Translator: Miguel Anxo Bouzada \n" "Language-Team: Galego \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" -#: ../src/nm-netlink-monitor.c:188 ../src/nm-netlink-monitor.c:448 +#: ../libnm-util/crypto.c:120 +#, c-format +msgid "PEM key file had no end tag '%s'." +msgstr "O ficheiro de chave PEM non ten a etiqueta de final «%s»." + +#: ../libnm-util/crypto.c:130 +#, c-format +msgid "Doesn't look like a PEM private key file." +msgstr "Non parece un ficheiro de chave privada PEM." + +#: ../libnm-util/crypto.c:138 +#, c-format +msgid "Not enough memory to store PEM file data." +msgstr "Non hai memoria abondo para almacenar o ficheiro PEM." + +#: ../libnm-util/crypto.c:154 +#, c-format +msgid "Malformed PEM file: Proc-Type was not first tag." +msgstr "Ficheiro PEM malformado: Proc-Type non é a primeira etiqueta." + +#: ../libnm-util/crypto.c:162 +#, c-format +msgid "Malformed PEM file: unknown Proc-Type tag '%s'." +msgstr "Ficheiro PEM malformado: a etiqueta Proc-Type «%s »é descoñecida." + +#: ../libnm-util/crypto.c:172 +#, c-format +msgid "Malformed PEM file: DEK-Info was not the second tag." +msgstr "Ficheiro PEM malformado: Proc-Type non é a segunda etiqueta." + +#: ../libnm-util/crypto.c:183 +#, c-format +msgid "Malformed PEM file: no IV found in DEK-Info tag." +msgstr "Ficheiro PEM malformado: non se atopou ningún IV na etiqueta DEK-Info" + +#: ../libnm-util/crypto.c:190 +#, c-format +msgid "Malformed PEM file: invalid format of IV in DEK-Info tag." +msgstr "Ficheiro PEM malformado: formato de IV incorrecto na etiqueta DEK-Info" + +#: ../libnm-util/crypto.c:203 +#, c-format +msgid "Malformed PEM file: unknown private key cipher '%s'." +msgstr "Ficheiro PEM malformado: o cifrado da chave privada «%s» é descoñecido" + +#: ../libnm-util/crypto.c:222 +#, c-format +msgid "Could not decode private key." +msgstr "Non puido ser decodificada a chave privada." + +#: ../libnm-util/crypto.c:267 +#, c-format +msgid "PEM certificate '%s' had no end tag '%s'." +msgstr "O certificado PEM «%s» non ten unha etiqueta de final «%s»." + +#: ../libnm-util/crypto.c:277 +#, c-format +msgid "Failed to decode certificate." +msgstr "Fallou ao decodificar o certificado" + +#: ../libnm-util/crypto.c:286 +#, c-format +msgid "Not enough memory to store certificate data." +msgstr "Non hai memoria abondo para almacenar os datos do certificado" + +#: ../libnm-util/crypto.c:294 +#, c-format +msgid "Not enough memory to store file data." +msgstr "Non hai memoriaabondo para almacenar os datos do ficheiro" + +#: ../libnm-util/crypto.c:324 +#, c-format +msgid "IV must be an even number of bytes in length." +msgstr "IV debe ter un número par de bytes en lonxitude." + +#: ../libnm-util/crypto.c:333 +#, c-format +msgid "Not enough memory to store the IV." +msgstr "Non hai memoria abondo para almacenar o IV." + +#: ../libnm-util/crypto.c:344 +#, c-format +msgid "IV contains non-hexadecimal digits." +msgstr "IV contén díxitos non hexadecimais." + +#: ../libnm-util/crypto.c:382 +#: ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 +#: ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:335 +#, c-format +msgid "Private key cipher '%s' was unknown." +msgstr "O cifrado «%s» da chave privada é descoñecido." + +#: ../libnm-util/crypto.c:391 +#, c-format +msgid "Not enough memory to decrypt private key." +msgstr "Non hai memoria abondo para descifrar esta chave privada." + +#: ../libnm-util/crypto.c:511 +#, c-format +msgid "Unable to determine private key type." +msgstr "Non foi posíbel determinar o tipo de chave privada" + +#: ../libnm-util/crypto.c:530 +#, c-format +msgid "Not enough memory to store decrypted private key." +msgstr "Non hai memoria abondo para almacenar a chave privada descifrada." + +#: ../libnm-util/crypto_gnutls.c:49 +msgid "Failed to initialize the crypto engine." +msgstr "Produciuse un erro ao iniciar o motor de cifrado" + +#: ../libnm-util/crypto_gnutls.c:93 +#, c-format +msgid "Failed to initialize the MD5 engine: %s / %s." +msgstr "Produciuse un erro ao iniciar a arquitectura MD5: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "Lonxitude de IV incorrecta (debe ser polo menos %zd)." + +#: ../libnm-util/crypto_gnutls.c:165 +#: ../libnm-util/crypto_nss.c:188 +#, c-format +msgid "Not enough memory for decrypted key buffer." +msgstr "Non hai memoria abondo para o búfer da chave descifrada." + +#: ../libnm-util/crypto_gnutls.c:173 +#, c-format +msgid "Failed to initialize the decryption cipher context: %s / %s." +msgstr "Produciuse un erro ao inicializar o contexto de cifrado para o descifrado: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:182 +#, c-format +msgid "Failed to set symmetric key for decryption: %s / %s." +msgstr "Produciuse un erro ao establecer a chave simétrica para o descifrado: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:191 +#, c-format +msgid "Failed to set IV for decryption: %s / %s." +msgstr "Produciuse un erro ao establecer IV para o descifrado: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:200 +#, c-format +msgid "Failed to decrypt the private key: %s / %s." +msgstr "Produciuse un erro ao descifrar a chave privada: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:210 +#: ../libnm-util/crypto_nss.c:266 +#, c-format +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "Produciuse un fallo ao descifrar a chave privada: lonxitude de desprazamento non esperada." + +#: ../libnm-util/crypto_gnutls.c:221 +#: ../libnm-util/crypto_nss.c:277 +#, c-format +msgid "Failed to decrypt the private key." +msgstr "Produciuse un erro ao descifrar a chave privada" + +#: ../libnm-util/crypto_gnutls.c:286 +#: ../libnm-util/crypto_nss.c:355 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "Non foi posíbel asignar a memoria para cifrar." + +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "Produciuse un erro ao inicializar o contexto da chave de cifrado: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "Produciuse un erro ao establecer a chave simétrica para o cifrado: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +msgid "Failed to set IV for encryption: %s / %s." +msgstr "Produciuse un erro ao establecer IV para o cifrado: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +msgid "Failed to encrypt the data: %s / %s." +msgstr "Produciuse un erro ao cifrar os datos: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:362 +#, c-format +msgid "Error initializing certificate data: %s" +msgstr "Produciuse un erro ao iniciar a certificación dos datos: %s" + +#: ../libnm-util/crypto_gnutls.c:384 +#, c-format +msgid "Couldn't decode certificate: %s" +msgstr "Non se puido decodificar o certificado: %s" + +#: ../libnm-util/crypto_gnutls.c:408 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %s" +msgstr "Non foi posíbel iniciar o decodificador PKCS#12: %s" + +#: ../libnm-util/crypto_gnutls.c:421 +#, c-format +msgid "Couldn't decode PKCS#12 file: %s" +msgstr "Non foi posíbel decodificar o ficheiro PKCS#12: %s" + +#: ../libnm-util/crypto_gnutls.c:433 +#, c-format +msgid "Couldn't verify PKCS#12 file: %s" +msgstr "Non foi posíbel verificar o ficheiro PKCS#12: %s" + +#: ../libnm-util/crypto_nss.c:57 +#, c-format +msgid "Failed to initialize the crypto engine: %d." +msgstr "Produciuse un erro ao iniciar o motor de cifrado:%d." + +#: ../libnm-util/crypto_nss.c:111 +#, c-format +msgid "Failed to initialize the MD5 context: %d." +msgstr "Produciuse un erro ao iniciar o contexto MD5: %d." + +#: ../libnm-util/crypto_nss.c:179 +#, c-format +msgid "Invalid IV length (must be at least %d)." +msgstr "Lonxitude de IV incorrecta (debe ser polo menos %d)." + +#: ../libnm-util/crypto_nss.c:196 +#, c-format +msgid "Failed to initialize the decryption cipher slot." +msgstr "Produciuse un erro ao iniciar a rañura de cifrado para o descifrado" + +#: ../libnm-util/crypto_nss.c:206 +#, c-format +msgid "Failed to set symmetric key for decryption." +msgstr "Produciuse un erro ao establecer a chave simétrica para o descifrado." + +#: ../libnm-util/crypto_nss.c:216 +#, c-format +msgid "Failed to set IV for decryption." +msgstr "Produciuse un erro ao establecer IV para o descifrado." + +#: ../libnm-util/crypto_nss.c:224 +#, c-format +msgid "Failed to initialize the decryption context." +msgstr "Produciuse un erro ao iniciar o contexto de descifrado." + +#: ../libnm-util/crypto_nss.c:237 +#, c-format +msgid "Failed to decrypt the private key: %d." +msgstr "Produciuse un erro ao descifrar a chave privada: %d." + +#: ../libnm-util/crypto_nss.c:245 +#, c-format +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "Produciuse un erro ao descifrar a chave privada: os datos descifrados son moi grandes." + +#: ../libnm-util/crypto_nss.c:256 +#, c-format +msgid "Failed to finalize decryption of the private key: %d." +msgstr "Produciuse un erro ao finalizar o descifrado da chave privada: %d." + +#: ../libnm-util/crypto_nss.c:363 +#, c-format +msgid "Failed to initialize the encryption cipher slot." +msgstr "Produciuse un erro ao inicializar a rañura da cifra de cifrado." + +#: ../libnm-util/crypto_nss.c:371 +#, c-format +msgid "Failed to set symmetric key for encryption." +msgstr "Produciuse un erro ao establecer a chave simétrica para o cifrado." + +#: ../libnm-util/crypto_nss.c:379 +#, c-format +msgid "Failed to set IV for encryption." +msgstr "Produciuse un erro ao establecer IV para o cifrado." + +#: ../libnm-util/crypto_nss.c:387 +#, c-format +msgid "Failed to initialize the encryption context." +msgstr "Produciuse un erro ao inicializar o contexto de cifrado." + +#: ../libnm-util/crypto_nss.c:395 +#, c-format +msgid "Failed to encrypt: %d." +msgstr "Produciuse un erro ao cifrar: %d." + +#: ../libnm-util/crypto_nss.c:403 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "Tamaño non agardado de datos despois de cifrar." + +#: ../libnm-util/crypto_nss.c:446 +#, c-format +msgid "Couldn't decode certificate: %d" +msgstr "Non foi posíbel decodificar o certificado: %d" + +#: ../libnm-util/crypto_nss.c:481 +#, c-format +msgid "Couldn't convert password to UCS2: %d" +msgstr "Non foi posíbel converter a chave a UCS2: %d" + +#: ../libnm-util/crypto_nss.c:509 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %d" +msgstr "Non foi posíbel iniciar o decodificador PKCS#12: %d" + +#: ../libnm-util/crypto_nss.c:518 +#, c-format +msgid "Couldn't decode PKCS#12 file: %d" +msgstr "Non fo posíbel decodificar o ficheiro PKCS#12: %d" + +#: ../libnm-util/crypto_nss.c:527 +#, c-format +msgid "Couldn't verify PKCS#12 file: %d" +msgstr "Non foi posíbel verficar o ficheiro PKCS#12: %d" + +#: ../libnm-util/crypto_nss.c:556 +msgid "Could not generate random data." +msgstr "Non foi posíbel xerar datos aleatorios." + +#: ../libnm-util/nm-utils.c:1522 +#, c-format +msgid "Not enough memory to make encryption key." +msgstr "Sen memoria abondo para crear a chave de cifrado." + +#: ../libnm-util/nm-utils.c:1633 +msgid "Could not allocate memory for PEM file creation." +msgstr "Non foi posíbel asignar memoria para a creación do ficheiro PEM," + +#: ../libnm-util/nm-utils.c:1645 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "Non foi posíbel asignar memoria para escribir IV no ficheiro PEM." + +#: ../libnm-util/nm-utils.c:1657 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "Non foi posíbel asignar memoria para escribir a chave cifrada no ficheiro PEM." + +#: ../libnm-util/nm-utils.c:1676 +#, c-format +msgid "Could not allocate memory for PEM file data." +msgstr "Non foi posíbel asignar memoria para os datos do ficheiro PEM." + +#: ../src/nm-netlink-monitor.c:194 +#: ../src/nm-netlink-monitor.c:464 +#: ../src/nm-netlink-monitor.c:569 +#: ../src/ip6-manager/nm-netlink-listener.c:352 #, c-format msgid "error processing netlink message: %s" -msgstr "erro procesando a mensaxe netlink: %s" +msgstr "produciuse un erro procesando a mensaxe netlink: %s" -#: ../src/nm-netlink-monitor.c:245 +#: ../src/nm-netlink-monitor.c:260 #, c-format msgid "unable to allocate netlink handle for monitoring link status: %s" -msgstr "non se pode crear o manexador netlink para monitorizar o estado da ligazón: %s" +msgstr "non é posíbel crear o manexador netlink para monitorizar o estado da ligazón: %s" -#: ../src/nm-netlink-monitor.c:255 +#: ../src/nm-netlink-monitor.c:270 #, c-format msgid "unable to connect to netlink for monitoring link status: %s" -msgstr "non se pode conectar ao netlink para monitorizar o estado da lingazón: %s" +msgstr "non é posíbel conectar ao netlink para monitorizar o estado da lingazón: %s" -#: ../src/nm-netlink-monitor.c:263 +#: ../src/nm-netlink-monitor.c:278 #, c-format msgid "unable to join netlink group for monitoring link status: %s" -msgstr "non se pode unir ao grupo netlink para monitorizar o estado da ligazón: %s" +msgstr "non é posíbel unir ao grupo netlink para monitorizar o estado da ligazón: %s" -#: ../src/nm-netlink-monitor.c:271 +#: ../src/nm-netlink-monitor.c:286 #, c-format msgid "unable to allocate netlink link cache for monitoring link status: %s" -msgstr "non se pode asignar a ligazón á caché netlink para monitorizar o estado da ligazón: %s" +msgstr "non é posíbel asignar a ligazón á caché netlink para monitorizar o estado da ligazón: %s" -#: ../src/nm-netlink-monitor.c:471 -#, c-format +#: ../src/nm-netlink-monitor.c:494 +#: ../src/ip6-manager/nm-netlink-listener.c:382 msgid "error occurred while waiting for data on socket" -msgstr "ocorreu un erro agardando por datos nun socket" +msgstr "producouse un erro agardando por datos nun socket" -#: ../src/NetworkManager.c:255 +#: ../src/nm-netlink-monitor.c:558 +#, c-format +#| msgid "error processing netlink message: %s" +msgid "error updating link cache: %s" +msgstr "produciuse un erro ao actualizar a caché de ligazóns: %s" + +#: ../src/NetworkManager.c:330 #, c-format msgid "Invalid option. Please use --help to see a list of valid options.\n" -msgstr "Opción inválida. Use --help para ver a lista de opcións válidas.\n" +msgstr "Opción incorrecta. Use --help para ver a lista de opcións válidas.\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:304 +msgid "# Created by NetworkManager\n" +msgstr "# Creado por NetworkManager\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:310 +#, c-format +msgid "" +"# Merged from %s\n" +"\n" +msgstr "" +"# Fusionado desde %s\n" +"\n" + +#: ../src/ip6-manager/nm-netlink-listener.c:200 +#, c-format +#| msgid "unable to allocate netlink handle for monitoring link status: %s" +msgid "unable to allocate netlink handle: %s" +msgstr "non é posíbel asignar un manexador para a ligazon de rede: %s" + +#: ../src/ip6-manager/nm-netlink-listener.c:210 +#, c-format +#| msgid "unable to connect to netlink for monitoring link status: %s" +msgid "unable to connect to netlink: %s" +msgstr "non é posíbel conectar coa ligazón de rede: %s" + +#: ../src/ip6-manager/nm-netlink-listener.c:307 +#, c-format +#| msgid "unable to join netlink group for monitoring link status: %s" +msgid "unable to join netlink group: %s" +msgstr "non é posíbel unir ao grupo da ligazón de rede: %s" + +#: ../src/named-manager/nm-named-manager.c:315 +msgid "NOTE: the libc resolver may not support more than 3 nameservers." +msgstr "NOTE: o importador libc non permite máis de 3 nomes de servidores." + +#: ../src/named-manager/nm-named-manager.c:317 +msgid "The nameservers listed below may not be recognized." +msgstr "Os nomes de servidores listados a seguir poden non ser recoñecidos" + +#: ../src/system-settings/nm-default-wired-connection.c:194 +#, c-format +msgid "Auto %s" +msgstr "Auto %s" + +#: ../system-settings/plugins/ifcfg-rh/reader.c:2406 +msgid "System" +msgstr "Sistema" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "Conexión compartida a través dunha rede WiFi protexida" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "Conexión compartida a través dunha rede WiFi aberta" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "Modificar o nome persistente do anfitrión do sistema" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 +msgid "Modify system connections" +msgstr "Modificar as conexións do sistema" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 +msgid "System policy prevents modification of system settings" +msgstr "A política do sistema impide a modificación da configuración do sistema" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +msgid "System policy prevents modification of the persistent system hostname" +msgstr "A política do sistema impide a modificación do nome do anfitrión do sistema" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "A política do sistema impide compartir conexións a través dunha rede WiFi protexida" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "A política do sistema impide compartir conexións a través dunha rede WiFi aberta" diff --git a/po/gu.po b/po/gu.po index bc2cd27dc3..83fba507ed 100644 --- a/po/gu.po +++ b/po/gu.po @@ -1,15 +1,15 @@ -# translation of NetworkManager.master.gu.po to Gujarati +# translation of gu.po to Gujarati # This file is distributed under the same license as the PACKAGE package. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER. # # Ankit Patel , 2004. -# Sweta Kothari , 2009. +# Sweta Kothari , 2009, 2010. msgid "" msgstr "" -"Project-Id-Version: NetworkManager.master.gu\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager&component=general\n" -"POT-Creation-Date: 2009-05-19 03:24+0000\n" -"PO-Revision-Date: 2009-06-08 11:07+0530\n" +"Project-Id-Version: gu\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-05-06 14:31+0530\n" +"PO-Revision-Date: 2010-05-10 14:38+0530\n" "Last-Translator: Sweta Kothari \n" "Language-Team: Gujarati\n" "MIME-Version: 1.0\n" @@ -19,6 +19,1146 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n!=1);\n" "\n" +#: ../cli/src/connections.c:59 ../cli/src/connections.c:74 +#: ../cli/src/devices.c:85 ../cli/src/devices.c:98 ../cli/src/devices.c:108 +#: ../cli/src/devices.c:118 ../cli/src/devices.c:131 ../cli/src/devices.c:142 +#: ../cli/src/devices.c:152 +msgid "NAME" +msgstr "NAME" + +#. 0 +#: ../cli/src/connections.c:60 ../cli/src/connections.c:75 +msgid "UUID" +msgstr "UUID" + +#. 1 +#: ../cli/src/connections.c:61 +msgid "DEVICES" +msgstr "DEVICES" + +#. 2 +#: ../cli/src/connections.c:62 ../cli/src/connections.c:77 +msgid "SCOPE" +msgstr "SCOPE" + +#. 3 +#: ../cli/src/connections.c:63 +msgid "DEFAULT" +msgstr "DEFAULT" + +#. 4 +#: ../cli/src/connections.c:64 +msgid "DBUS-SERVICE" +msgstr "DBUS-SERVICE" + +#. 5 +#: ../cli/src/connections.c:65 +msgid "SPEC-OBJECT" +msgstr "SPEC-OBJECT" + +#. 6 +#: ../cli/src/connections.c:66 +msgid "VPN" +msgstr "VPN" + +#. 1 +#. 0 +#. 1 +#: ../cli/src/connections.c:76 ../cli/src/devices.c:61 ../cli/src/devices.c:87 +msgid "TYPE" +msgstr "TYPE" + +#. 3 +#: ../cli/src/connections.c:78 +msgid "TIMESTAMP" +msgstr "TIMESTAMP" + +#. 4 +#: ../cli/src/connections.c:79 +msgid "TIMESTAMP-REAL" +msgstr "TIMESTAMP-REAL" + +#. 5 +#: ../cli/src/connections.c:80 +msgid "AUTOCONNECT" +msgstr "AUTOCONNECT" + +#. 6 +#: ../cli/src/connections.c:81 +msgid "READONLY" +msgstr "READONLY" + +#: ../cli/src/connections.c:157 +#, c-format +msgid "" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" +msgstr "" +"વપરાશ: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" + +#: ../cli/src/connections.c:197 ../cli/src/connections.c:536 +#, c-format +msgid "Error: 'con list': %s" +msgstr "ભૂલ: 'con list': %s" + +#: ../cli/src/connections.c:199 ../cli/src/connections.c:538 +#, c-format +msgid "Error: 'con list': %s; allowed fields: %s" +msgstr "ભૂલ: 'con list': %s; માન્ય થયેલ ક્ષેત્રો: %s" + +#: ../cli/src/connections.c:207 +msgid "Connection details" +msgstr "જોડાણો વિગતો" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "system" +msgstr "સિસ્ટમ" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "user" +msgstr "વપરાશકર્તા" + +#: ../cli/src/connections.c:383 +msgid "never" +msgstr "કદી નહિં" + +#. "CAPABILITIES" +#. Print header +#. "WIFI-PROPERTIES" +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:544 ../cli/src/settings.c:643 +#: ../cli/src/settings.c:912 ../cli/src/settings.c:913 +#: ../cli/src/settings.c:915 ../cli/src/settings.c:917 +#: ../cli/src/settings.c:1042 ../cli/src/settings.c:1043 +#: ../cli/src/settings.c:1044 ../cli/src/settings.c:1123 +#: ../cli/src/settings.c:1124 ../cli/src/settings.c:1125 +#: ../cli/src/settings.c:1126 ../cli/src/settings.c:1127 +#: ../cli/src/settings.c:1128 ../cli/src/settings.c:1129 +#: ../cli/src/settings.c:1130 ../cli/src/settings.c:1131 +#: ../cli/src/settings.c:1132 ../cli/src/settings.c:1133 +#: ../cli/src/settings.c:1134 ../cli/src/settings.c:1135 +#: ../cli/src/settings.c:1210 +msgid "yes" +msgstr "હાં" + +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:506 ../cli/src/settings.c:544 +#: ../cli/src/settings.c:643 ../cli/src/settings.c:912 +#: ../cli/src/settings.c:913 ../cli/src/settings.c:915 +#: ../cli/src/settings.c:917 ../cli/src/settings.c:1042 +#: ../cli/src/settings.c:1043 ../cli/src/settings.c:1044 +#: ../cli/src/settings.c:1123 ../cli/src/settings.c:1124 +#: ../cli/src/settings.c:1125 ../cli/src/settings.c:1126 +#: ../cli/src/settings.c:1127 ../cli/src/settings.c:1128 +#: ../cli/src/settings.c:1129 ../cli/src/settings.c:1130 +#: ../cli/src/settings.c:1131 ../cli/src/settings.c:1132 +#: ../cli/src/settings.c:1133 ../cli/src/settings.c:1134 +#: ../cli/src/settings.c:1135 ../cli/src/settings.c:1210 +msgid "no" +msgstr "ના" + +#: ../cli/src/connections.c:457 ../cli/src/connections.c:500 +msgid "System connections" +msgstr "સિસ્ટમ જોડાણો" + +#: ../cli/src/connections.c:462 ../cli/src/connections.c:513 +msgid "User connections" +msgstr "વપરાશકર્તા જોડાણો" + +#: ../cli/src/connections.c:474 ../cli/src/connections.c:1334 +#: ../cli/src/connections.c:1350 ../cli/src/connections.c:1359 +#: ../cli/src/connections.c:1370 ../cli/src/connections.c:1452 +#: ../cli/src/devices.c:864 ../cli/src/devices.c:874 ../cli/src/devices.c:973 +#: ../cli/src/devices.c:980 +#, c-format +msgid "Error: %s argument is missing." +msgstr "ભૂલ: %s દલીલ ગેરહાજર છે." + +#: ../cli/src/connections.c:487 +#, c-format +msgid "Error: %s - no such connection." +msgstr "Error: %s - આવા જોડાણ નથી." + +#: ../cli/src/connections.c:519 ../cli/src/connections.c:1383 +#: ../cli/src/connections.c:1470 ../cli/src/devices.c:687 +#: ../cli/src/devices.c:754 ../cli/src/devices.c:888 ../cli/src/devices.c:986 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "અજ્ઞાત પરિમાણ: %s\n" + +#: ../cli/src/connections.c:528 +#, c-format +msgid "Error: no valid parameter specified." +msgstr "ભૂલ: યોગ્ય પરિમાણ સ્પષ્ટ થયેલ નથી." + +#: ../cli/src/connections.c:543 ../cli/src/connections.c:1572 +#: ../cli/src/devices.c:1192 ../cli/src/network-manager.c:274 +#, c-format +msgid "Error: %s." +msgstr "ભૂલ: %s." + +#: ../cli/src/connections.c:649 +#, c-format +msgid "Error: 'con status': %s" +msgstr "ભૂલ: 'con status': %s" + +#: ../cli/src/connections.c:651 +#, c-format +msgid "Error: 'con status': %s; allowed fields: %s" +msgstr "ભૂલ: 'con status': %s; માન્ય થયેલ ક્ષેત્રો: %s" + +#: ../cli/src/connections.c:658 +msgid "Active connections" +msgstr "સક્રિય જોડાણો" + +#: ../cli/src/connections.c:1026 +#, c-format +msgid "no active connection on device '%s'" +msgstr "ઉપકરણ '%s' પર સક્રિય જોડાણ નથી" + +#: ../cli/src/connections.c:1034 +#, c-format +msgid "no active connection or device" +msgstr "સક્રિય જોડાણ અથવા ઉપકરણ નથી" + +#: ../cli/src/connections.c:1084 +#, c-format +msgid "device '%s' not compatible with connection '%s'" +msgstr "ઉપકરણ '%s' એ જોડાણ '%s' સાથે સુસંગત નથી" + +#: ../cli/src/connections.c:1086 +#, c-format +msgid "no device found for connection '%s'" +msgstr "જોડાણ '%s' માટે ઉપકરણ મળ્યુ નથી" + +#: ../cli/src/connections.c:1097 +msgid "activating" +msgstr "સક્રિય કરી રહ્યા છે" + +#: ../cli/src/connections.c:1099 +msgid "activated" +msgstr "સક્રિય થયેલ છે" + +#: ../cli/src/connections.c:1102 ../cli/src/connections.c:1125 +#: ../cli/src/connections.c:1158 ../cli/src/devices.c:224 +#: ../cli/src/devices.c:514 ../cli/src/network-manager.c:92 +#: ../cli/src/network-manager.c:145 ../cli/src/settings.c:469 +msgid "unknown" +msgstr "અજ્ઞાત" + +#: ../cli/src/connections.c:1111 +msgid "VPN connecting (prepare)" +msgstr "VPN જોડાઇ રહ્યુ છે (તૈયાર કરો)" + +#: ../cli/src/connections.c:1113 +msgid "VPN connecting (need authentication)" +msgstr "VPN જોડાઇ રહ્યુ છે (સત્તાધિકરણની જરૂર છે)" + +#: ../cli/src/connections.c:1115 +msgid "VPN connecting" +msgstr "VPN જોડાઇ રહ્યુ છે" + +#: ../cli/src/connections.c:1117 +msgid "VPN connecting (getting IP configuration)" +msgstr "VPN જોડાઇ રહ્યુ છે (IP રૂપરેખાંકનને મેળવી રહ્યા છે)" + +#: ../cli/src/connections.c:1119 +msgid "VPN connected" +msgstr "VPN જોડાયેલ છે" + +#: ../cli/src/connections.c:1121 +msgid "VPN connection failed" +msgstr "VPN જોડાણ નિષ્ફળ" + +#: ../cli/src/connections.c:1123 +msgid "VPN disconnected" +msgstr "VPN જોડાણ તૂટી ગયુ" + +#: ../cli/src/connections.c:1134 +msgid "unknown reason" +msgstr "અજ્ઞાત કારણ" + +#: ../cli/src/connections.c:1136 +msgid "none" +msgstr "કંઇ નહિં" + +#: ../cli/src/connections.c:1138 +msgid "the user was disconnected" +msgstr "વપરાશકર્તાનું જોડાણ તૂટી ગયુ હતુ" + +#: ../cli/src/connections.c:1140 +msgid "the base network connection was interrupted" +msgstr "આધાર નેટવર્ક જોડાણ અવરોધેલ હતુ" + +#: ../cli/src/connections.c:1142 +msgid "the VPN service stopped unexpectedly" +msgstr "VPN સેવા અનિચ્છનિય રીતે બંધ થયેલ છે" + +#: ../cli/src/connections.c:1144 +msgid "the VPN service returned invalid configuration" +msgstr "VPN સેવા એ અયોગ્ય રૂપરેખાંકનને પાછુ મેળવેલ છે" + +#: ../cli/src/connections.c:1146 +msgid "the connection attempt timed out" +msgstr "જોડાણનો પ્રયત્ન કરવાનો સમય સમાપ્ત થઇ ગયો" + +#: ../cli/src/connections.c:1148 +msgid "the VPN service did not start in time" +msgstr "VPN સેવા એ સમય પર શરૂ થઇ ન હતી" + +#: ../cli/src/connections.c:1150 +msgid "the VPN service failed to start" +msgstr "શરૂ કરતી વખતે VPN સેવા નિષ્ફળ" + +#: ../cli/src/connections.c:1152 +msgid "no valid VPN secrets" +msgstr "યોગ્ય VPN ખાનગીઓ નથી" + +#: ../cli/src/connections.c:1154 +msgid "invalid VPN secrets" +msgstr "અયોગ્ય VPN ખાનગીપણા" + +#: ../cli/src/connections.c:1156 +msgid "the connection was removed" +msgstr "જોડાણને દૂર કરાયેલ હતુ" + +#: ../cli/src/connections.c:1170 +#, c-format +msgid "state: %s\n" +msgstr "પરિસ્થિતિ: %s\n" + +#: ../cli/src/connections.c:1173 ../cli/src/connections.c:1199 +#, c-format +msgid "Connection activated\n" +msgstr "સક્રિય થયેલ જોડાણ\n" + +#: ../cli/src/connections.c:1176 +#, c-format +msgid "Error: Connection activation failed." +msgstr "ભૂલ: જોડાણ સક્રિય કરવાનું નિષ્ફળ." + +#: ../cli/src/connections.c:1195 +#, c-format +msgid "state: %s (%d)\n" +msgstr "પરિસ્થિતિ: %s (%d)\n" + +#: ../cli/src/connections.c:1205 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "ભૂલ: જોડાણ સક્રિય કરવાનું નિષ્ફળ: %s." + +#: ../cli/src/connections.c:1222 ../cli/src/devices.c:811 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "ભૂલ: સમયસમાપ્તિ %d સેકંડ નો સમય સમાપ્ત થઇ ગયો." + +#: ../cli/src/connections.c:1265 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "ભૂલ: જોડાણ સક્રિય કરવાનું નિષ્ફળ: %s" + +#: ../cli/src/connections.c:1279 +#, c-format +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "ભૂલ: '%s' માટે સક્રિય જોડાણ પ્રાપ્ત કરવામાં નિષ્ફળતા." + +#: ../cli/src/connections.c:1288 +#, c-format +msgid "Active connection state: %s\n" +msgstr "સક્રિય જોડાણ પરિસ્થિતિ: %s\n" + +#: ../cli/src/connections.c:1289 +#, c-format +msgid "Active connection path: %s\n" +msgstr "સક્રિય જોડાણ પાથ: %s\n" + +#: ../cli/src/connections.c:1343 ../cli/src/connections.c:1461 +#, c-format +msgid "Error: Unknown connection: %s." +msgstr "ભૂલ: અજ્ઞાત જોડાણ: %s." + +#: ../cli/src/connections.c:1378 ../cli/src/devices.c:882 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "ભૂલ: સમયસમાપ્તિ કિંમત '%s' યોગ્ય નથી." + +#: ../cli/src/connections.c:1391 ../cli/src/connections.c:1478 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "ભૂલ: id અથવા uuid ને સ્પષ્ટ કરવુ જ પડશે." + +#: ../cli/src/connections.c:1411 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "ભૂલ: સુસંગત ઉપકરણ મળ્યુ નથી: %s." + +#: ../cli/src/connections.c:1413 +#, c-format +msgid "Error: No suitable device found." +msgstr "ભૂલ: સુસંગત ઉપકરણ મળ્યુ નથી." + +#: ../cli/src/connections.c:1505 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "ચેતવણી: જોડાણ સક્રિય થયેલ નથી\n" + +#: ../cli/src/connections.c:1561 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "ભૂલ: 'con' આદેશ '%s' યોગ્ય નથી." + +#: ../cli/src/connections.c:1597 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "ભૂલ: D-Bus નું જોડાણ કરી શક્યા નહિં." + +#: ../cli/src/connections.c:1604 +#, c-format +msgid "Error: Could not get system settings." +msgstr "ભૂલ: સિસ્ટમ સુયોજનોને મેળવી શક્યા નથી." + +#: ../cli/src/connections.c:1612 +#, c-format +msgid "Error: Could not get user settings." +msgstr "ભૂલ: વપરાશકર્તા સુયોજનોને મેળવી શક્યા નથી." + +#: ../cli/src/connections.c:1622 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "ભૂલ: જોડાણોને પ્રાપ્ત કરી શકાતા નથી: સુયોજનો સેવાઓ ચાલી રહી નથી." + +#. 0 +#. 9 +#: ../cli/src/devices.c:60 ../cli/src/devices.c:86 ../cli/src/devices.c:162 +msgid "DEVICE" +msgstr "DEVICE" + +#. 1 +#. 4 +#. 0 +#: ../cli/src/devices.c:62 ../cli/src/devices.c:90 +#: ../cli/src/network-manager.c:36 +msgid "STATE" +msgstr "STATE" + +#: ../cli/src/devices.c:71 +msgid "GENERAL" +msgstr "GENERAL" + +#. 0 +#: ../cli/src/devices.c:72 +msgid "CAPABILITIES" +msgstr "CAPABILITIES" + +#. 1 +#: ../cli/src/devices.c:73 +msgid "WIFI-PROPERTIES" +msgstr "WIFI-PROPERTIES" + +#. 2 +#: ../cli/src/devices.c:74 +msgid "AP" +msgstr "AP" + +#. 3 +#: ../cli/src/devices.c:75 +msgid "WIRED-PROPERTIES" +msgstr "WIRED-PROPERTIES" + +#. 4 +#: ../cli/src/devices.c:76 +msgid "IP4-SETTINGS" +msgstr "IP4-SETTINGS" + +#. 5 +#: ../cli/src/devices.c:77 +msgid "IP4-DNS" +msgstr "IP4-DNS" + +#. 2 +#: ../cli/src/devices.c:88 +msgid "DRIVER" +msgstr "DRIVER" + +#. 3 +#: ../cli/src/devices.c:89 +msgid "HWADDR" +msgstr "HWADDR" + +#. 0 +#: ../cli/src/devices.c:99 +msgid "CARRIER-DETECT" +msgstr "CARRIER-DETECT" + +#. 1 +#: ../cli/src/devices.c:100 +msgid "SPEED" +msgstr "SPEED" + +#. 0 +#: ../cli/src/devices.c:109 +msgid "CARRIER" +msgstr "CARRIER" + +#. 0 +#: ../cli/src/devices.c:119 +msgid "WEP" +msgstr "WEP" + +#. 1 +#: ../cli/src/devices.c:120 +msgid "WPA" +msgstr "WPA" + +#. 2 +#: ../cli/src/devices.c:121 +msgid "WPA2" +msgstr "WPA2" + +#. 3 +#: ../cli/src/devices.c:122 +msgid "TKIP" +msgstr "TKIP" + +#. 4 +#: ../cli/src/devices.c:123 +msgid "CCMP" +msgstr "CCMP" + +#. 0 +#: ../cli/src/devices.c:132 +msgid "ADDRESS" +msgstr "ADDRESS" + +#. 1 +#: ../cli/src/devices.c:133 +msgid "PREFIX" +msgstr "PREFIX" + +#. 2 +#: ../cli/src/devices.c:134 +msgid "GATEWAY" +msgstr "GATEWAY" + +#. 0 +#: ../cli/src/devices.c:143 +msgid "DNS" +msgstr "DNS" + +#. 0 +#: ../cli/src/devices.c:153 +msgid "SSID" +msgstr "SSID" + +#. 1 +#: ../cli/src/devices.c:154 +msgid "BSSID" +msgstr "BSSID" + +#. 2 +#: ../cli/src/devices.c:155 +msgid "MODE" +msgstr "MODE" + +#. 3 +#: ../cli/src/devices.c:156 +msgid "FREQ" +msgstr "FREQ" + +#. 4 +#: ../cli/src/devices.c:157 +msgid "RATE" +msgstr "RATE" + +#. 5 +#: ../cli/src/devices.c:158 +msgid "SIGNAL" +msgstr "SIGNAL" + +#. 6 +#: ../cli/src/devices.c:159 +msgid "SECURITY" +msgstr "SECURITY" + +#. 7 +#: ../cli/src/devices.c:160 +msgid "WPA-FLAGS" +msgstr "WPA-FLAGS" + +#. 8 +#: ../cli/src/devices.c:161 +msgid "RSN-FLAGS" +msgstr "RSN-FLAGS" + +#. 10 +#: ../cli/src/devices.c:163 +msgid "ACTIVE" +msgstr "ACTIVE" + +#: ../cli/src/devices.c:186 +#, c-format +msgid "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +"\n" +msgstr "" +"વપરાશ: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +"\n" + +#: ../cli/src/devices.c:206 +msgid "unmanaged" +msgstr "અસંચાલિત થયેલ" + +#: ../cli/src/devices.c:208 +msgid "unavailable" +msgstr "ઉપલબ્ધ નથી" + +#: ../cli/src/devices.c:210 ../cli/src/network-manager.c:89 +msgid "disconnected" +msgstr "તૂટેલ જોડાણ" + +#: ../cli/src/devices.c:212 +msgid "connecting (prepare)" +msgstr "જોડાઇ રહ્યા છે (તૈયાર કરો)" + +#: ../cli/src/devices.c:214 +msgid "connecting (configuring)" +msgstr "જોડાઇ રહ્યા છે (રૂપરેખાંકિત કરી રહ્યા છે)" + +#: ../cli/src/devices.c:216 +msgid "connecting (need authentication)" +msgstr "જોડાઇ રહ્યા છે (સત્તાધિકરણની જરૂર છે)" + +#: ../cli/src/devices.c:218 +msgid "connecting (getting IP configuration)" +msgstr "જોડાઇ રહ્યા છે (IP રૂપરેખાંકનને મેળવી રહ્યા છે)" + +#: ../cli/src/devices.c:220 ../cli/src/network-manager.c:87 +msgid "connected" +msgstr "જોડાયેલ" + +#: ../cli/src/devices.c:222 +msgid "connection failed" +msgstr "જોડાણ નિષ્ફળ" + +#: ../cli/src/devices.c:245 ../cli/src/devices.c:380 +msgid "Unknown" +msgstr "અજ્ઞાત" + +#: ../cli/src/devices.c:277 +msgid "(none)" +msgstr "(કંઇ નહિં)" + +#: ../cli/src/devices.c:302 +#, c-format +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s: ભૂલ એ IP4 સરનામા 0x%X માં રૂપાંતર થઇ રહી છે" + +#: ../cli/src/devices.c:349 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" + +#: ../cli/src/devices.c:350 +#, c-format +msgid "%u MB/s" +msgstr "%u MB/s" + +#: ../cli/src/devices.c:359 +msgid "Encrypted: " +msgstr "એનક્રિપ્ટ થયેલ: " + +#: ../cli/src/devices.c:364 +msgid "WEP " +msgstr "WEP " + +#: ../cli/src/devices.c:366 +msgid "WPA " +msgstr "WPA " + +#: ../cli/src/devices.c:368 +msgid "WPA2 " +msgstr "WPA2 " + +#: ../cli/src/devices.c:371 +msgid "Enterprise " +msgstr "Enterprise " + +#: ../cli/src/devices.c:380 +msgid "Ad-Hoc" +msgstr "Ad-Hoc" + +#: ../cli/src/devices.c:380 +msgid "Infrastructure" +msgstr "ઇન્ફ્રાસ્ટ્રક્ચર" + +#: ../cli/src/devices.c:442 +#, c-format +msgid "Error: 'dev list': %s" +msgstr "ભૂલ: 'dev list': %s" + +#: ../cli/src/devices.c:444 +#, c-format +msgid "Error: 'dev list': %s; allowed fields: %s" +msgstr "ભૂલ: 'dev list': %s; માન્ય થયેલ ક્ષેત્રો: %s" + +#: ../cli/src/devices.c:453 +msgid "Device details" +msgstr "ઉપકરણ વિગતો" + +#: ../cli/src/devices.c:483 ../cli/src/devices.c:827 +msgid "(unknown)" +msgstr "(અજ્ઞાત)" + +#: ../cli/src/devices.c:484 +msgid "unknown)" +msgstr "અજ્ઞાત)" + +#: ../cli/src/devices.c:510 +#, c-format +msgid "%u Mb/s" +msgstr "%u Mb/s" + +#. Print header +#. "WIRED-PROPERTIES" +#: ../cli/src/devices.c:583 +msgid "on" +msgstr "ચાલુ" + +#: ../cli/src/devices.c:583 +msgid "off" +msgstr "બંધ" + +#: ../cli/src/devices.c:710 +#, c-format +msgid "Error: 'dev status': %s" +msgstr "ભૂલ: 'dev status': %s" + +#: ../cli/src/devices.c:712 +#, c-format +msgid "Error: 'dev status': %s; allowed fields: %s" +msgstr "ભૂલ: 'dev status': %s; માન્ય થયેલ ક્ષેત્રો: %s" + +#: ../cli/src/devices.c:719 +msgid "Status of devices" +msgstr "ઉપકરણોની પરિસ્થિતિ" + +#: ../cli/src/devices.c:747 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "ભૂલ: '%s' દલીલ ગેરહાજર છે." + +#: ../cli/src/devices.c:776 ../cli/src/devices.c:915 ../cli/src/devices.c:1035 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "ભૂલ: ઉપકરણ '%s' મળ્યુ નથી." + +#: ../cli/src/devices.c:799 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "સફળ: ઉપકરણ '%s' નું સફળતાપૂર્વક જોડાણ તૂટી ગયુ." + +#: ../cli/src/devices.c:824 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "ભૂલ: ઉપકરણ '%s' (%s) નું જોડાણ તૂટવામાં નિષ્ફળતા: %s" + +#: ../cli/src/devices.c:832 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "ઉપકરણ પરિસ્થિતિ: %d (%s)\n" + +#: ../cli/src/devices.c:896 +#, c-format +msgid "Error: iface has to be specified." +msgstr "ભૂલ: iface ને સ્પષ્ટ કરવુ જ પડશે." + +#: ../cli/src/devices.c:1011 +#, c-format +msgid "Error: 'dev wifi': %s" +msgstr "ભૂલ: 'dev wifi': %s" + +#: ../cli/src/devices.c:1013 +#, c-format +msgid "Error: 'dev wifi': %s; allowed fields: %s" +msgstr "ભૂલ: 'dev wifi': %s; માન્ય થયેલ ક્ષેત્રો: %s" + +#: ../cli/src/devices.c:1020 +msgid "WiFi scan list" +msgstr "WiFi સ્કેન યાદી" + +#: ../cli/src/devices.c:1055 ../cli/src/devices.c:1109 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "ભૂલ: hwaddr '%s' સાથે પ્રવેશ બિંદુ મળ્યુ નથી." + +#: ../cli/src/devices.c:1072 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "ભૂલ: ઉપકરણ '%s' એ WiFi ઉપકરણ નથી." + +#: ../cli/src/devices.c:1136 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "ભૂલ: 'dev wifi' આદેશ '%s' યોગ્ય નથી." + +#: ../cli/src/devices.c:1183 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "ભૂલ: 'dev' આદેશ '%s' યોગ્ય નથી." + +#: ../cli/src/network-manager.c:35 +msgid "RUNNING" +msgstr "RUNNING" + +#. 1 +#: ../cli/src/network-manager.c:37 +msgid "WIFI-HARDWARE" +msgstr "WIFI-HARDWARE" + +#. 2 +#: ../cli/src/network-manager.c:38 +msgid "WIFI" +msgstr "WIFI" + +#. 3 +#: ../cli/src/network-manager.c:39 +msgid "WWAN-HARDWARE" +msgstr "WWAN-HARDWARE" + +#. 4 +#: ../cli/src/network-manager.c:40 +msgid "WWAN" +msgstr "WWAN" + +#: ../cli/src/network-manager.c:62 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" +msgstr "" +"વપરાશ: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + +#: ../cli/src/network-manager.c:83 +msgid "asleep" +msgstr "સૂતેલું" + +#: ../cli/src/network-manager.c:85 +msgid "connecting" +msgstr "જોડાઇ રહ્યા છે" + +#: ../cli/src/network-manager.c:125 +#, c-format +msgid "Error: 'nm status': %s" +msgstr "ભૂલ: 'nm status': %s" + +#: ../cli/src/network-manager.c:127 +#, c-format +msgid "Error: 'nm status': %s; allowed fields: %s" +msgstr "ભૂલ: 'nm status': %s; માન્ય થયેલ ક્ષેત્રો: %s" + +#: ../cli/src/network-manager.c:134 +msgid "NetworkManager status" +msgstr "NetworkManager પરિસ્થિતિ" + +#. Print header +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "enabled" +msgstr "સક્રિય થયેલ" + +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "disabled" +msgstr "નિષ્ક્રિય થયેલ" + +#: ../cli/src/network-manager.c:148 +msgid "running" +msgstr "ચાલી રહ્યુ છે" + +#: ../cli/src/network-manager.c:148 +msgid "not running" +msgstr "ચાલી રહ્યુ નથી" + +#: ../cli/src/network-manager.c:201 ../cli/src/network-manager.c:233 +#, c-format +msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s" +msgstr "ભૂલ: '--fields' કિંમત '%s' એ અહિંયા યોગ્ય નથી; માન્ય થયેલ ક્ષેત્રો: %s" + +#: ../cli/src/network-manager.c:209 +msgid "WiFi enabled" +msgstr "WiFi સક્રિય થયેલ" + +#: ../cli/src/network-manager.c:220 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "ભૂલ: અયોગ્ય 'wifi' પરિમાણ: '%s'." + +#: ../cli/src/network-manager.c:241 +msgid "WWAN enabled" +msgstr "WWAN સક્રિય થયેલ" + +#: ../cli/src/network-manager.c:252 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "ભૂલ: અયોગ્ય 'wwan' પરિમાણ: '%s'." + +#: ../cli/src/network-manager.c:263 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "ભૂલ: 'nm' આદેશ '%s' યોગ્ય નથી." + +#: ../cli/src/nmcli.c:69 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -m[ode] tabular|multiline output mode\n" +" -f[ields] |all|common specify fields to output\n" +" -e[scape] yes|no escape columns separators in " +"values\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"વપરાશ: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -m[ode] tabular|multiline output mode\n" +" -f[ields] |all|common specify fields to output\n" +" -e[scape] yes|no escape columns separators in " +"values\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" + +#: ../cli/src/nmcli.c:113 +#, c-format +msgid "Error: Object '%s' is unknown, try 'nmcli help'." +msgstr "ભૂલ: ઑબ્જેક્ટ '%s' અજ્ઞાત છે, 'nmcli help' નો પ્રયત્ન કરો." + +#: ../cli/src/nmcli.c:143 +#, c-format +msgid "Error: Option '--terse' is specified the second time." +msgstr "ભૂલ: વિકલ્પ '--terse' એ બીજી વખત સ્પષ્ટ થયેલ છે." + +#: ../cli/src/nmcli.c:148 +#, c-format +msgid "Error: Option '--terse' is mutually exclusive with '--pretty'." +msgstr "ભૂલ: વિકલ્પ '--terse' એ '--pretty' સાથે પરસ્પર અનોખું છે." + +#: ../cli/src/nmcli.c:156 +#, c-format +msgid "Error: Option '--pretty' is specified the second time." +msgstr "ભૂલ: વિકલ્પ '--pretty' એ બીજી વખત સ્પષ્ટ થયેલ છે." + +#: ../cli/src/nmcli.c:161 +#, c-format +msgid "Error: Option '--pretty' is mutually exclusive with '--terse'." +msgstr "ભૂલ: વિકલ્પ '--pretty' એ '--terse' સાથે પરસ્પર અનોખું છે." + +#: ../cli/src/nmcli.c:171 ../cli/src/nmcli.c:187 +#, c-format +msgid "Error: missing argument for '%s' option." +msgstr "ભૂલ: '%s' વિકલ્પ માટે ગેરહાજર દલીલ." + +#: ../cli/src/nmcli.c:180 ../cli/src/nmcli.c:196 +#, c-format +msgid "Error: '%s' is not valid argument for '%s' option." +msgstr "ભૂલ: '%s' એ '%s' વિકલ્પ માટે યોગ્ય દલીલ નથી." + +#: ../cli/src/nmcli.c:203 +#, c-format +msgid "Error: fields for '%s' options are missing." +msgstr "ભૂલ: '%s' વિકલ્પો માટે ક્ષેત્રો ગેરહાજર છે." + +#: ../cli/src/nmcli.c:209 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "nmcli સાધન, આવૃત્તિ %s\n" + +#: ../cli/src/nmcli.c:215 +#, c-format +msgid "Error: Option '%s' is unknown, try 'nmcli -help'." +msgstr "ભૂલ: વિકલ્પ '%s' એ અજ્ઞાત છે, 'nmcli -help' નો પ્રયત્ન કરો." + +#: ../cli/src/nmcli.c:234 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "સંકેત %d પકડ્યુ, બંધ કરી રહ્યા છે..." + +#: ../cli/src/nmcli.c:259 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "ભૂલ: NetworkManager નું જોડાણ કરી શક્યા નહિં." + +#: ../cli/src/nmcli.c:275 +msgid "Success" +msgstr "સફળ" + +#: ../cli/src/settings.c:407 +#, c-format +msgid "%d (hex-ascii-key)" +msgstr "%d (hex-ascii-key)" + +#: ../cli/src/settings.c:409 +#, c-format +msgid "%d (104/128-bit passphrase)" +msgstr "%d (104/128-bit પાસફ્રેઝ)" + +#: ../cli/src/settings.c:412 +#, c-format +msgid "%d (unknown)" +msgstr "%d (અજ્ઞાત)" + +#: ../cli/src/settings.c:438 +msgid "0 (unknown)" +msgstr "0 (અજ્ઞાત)" + +#: ../cli/src/settings.c:444 +msgid "any, " +msgstr "કોઇપણ, " + +#: ../cli/src/settings.c:446 +msgid "900 MHz, " +msgstr "900 MHz, " + +#: ../cli/src/settings.c:448 +msgid "1800 MHz, " +msgstr "1800 MHz, " + +#: ../cli/src/settings.c:450 +msgid "1900 MHz, " +msgstr "1900 MHz, " + +#: ../cli/src/settings.c:452 +msgid "850 MHz, " +msgstr "850 MHz, " + +#: ../cli/src/settings.c:454 +msgid "WCDMA 3GPP UMTS 2100 MHz, " +msgstr "WCDMA 3GPP UMTS 2100 MHz, " + +#: ../cli/src/settings.c:456 +msgid "WCDMA 3GPP UMTS 1800 MHz, " +msgstr "WCDMA 3GPP UMTS 1800 MHz, " + +#: ../cli/src/settings.c:458 +msgid "WCDMA 3GPP UMTS 1700/2100 MHz, " +msgstr "WCDMA 3GPP UMTS 1700/2100 MHz, " + +#: ../cli/src/settings.c:460 +msgid "WCDMA 3GPP UMTS 800 MHz, " +msgstr "WCDMA 3GPP UMTS 800 MHz, " + +#: ../cli/src/settings.c:462 +msgid "WCDMA 3GPP UMTS 850 MHz, " +msgstr "WCDMA 3GPP UMTS 850 MHz, " + +#: ../cli/src/settings.c:464 +msgid "WCDMA 3GPP UMTS 900 MHz, " +msgstr "WCDMA 3GPP UMTS 900 MHz, " + +#: ../cli/src/settings.c:466 +msgid "WCDMA 3GPP UMTS 1700 MHz, " +msgstr "WCDMA 3GPP UMTS 1700 MHz, " + +#: ../cli/src/settings.c:546 ../cli/src/settings.c:708 +msgid "auto" +msgstr "સ્વયં" + +#: ../cli/src/settings.c:704 ../cli/src/settings.c:707 ../cli/src/utils.c:172 +msgid "not set" +msgstr "સુયોજિત નથી" + +#: ../cli/src/utils.c:124 +#, c-format +msgid "field '%s' has to be alone" +msgstr "ક્ષેત્ર '%s' એ એકલુ હોવુ જ જોઇએ" + +#: ../cli/src/utils.c:127 +#, c-format +msgid "invalid field '%s'" +msgstr "અયોગ્ય ક્ષેત્ર '%s'" + +#: ../cli/src/utils.c:146 +#, c-format +msgid "Option '--terse' requires specifying '--fields'" +msgstr "વિકલ્પ '--terse' ને '--fields' ની જરૂર છે" + +#: ../cli/src/utils.c:150 +#, c-format +msgid "Option '--terse' requires specific '--fields' option values , not '%s'" +msgstr "વિકલ્પ '--terse' ને ચોક્કસ '--fields' વિકલ્પ કિંમતોની જરૂર છે, '%s' ની નહિં" + #: ../libnm-util/crypto.c:120 #, c-format msgid "PEM key file had no end tag '%s'." @@ -104,8 +1244,9 @@ msgstr "IV ને સંગ્રહ કરવા માટે પૂરતી msgid "IV contains non-hexadecimal digits." msgstr "IV એ બિન-હેક્ઝાડેસિમલ આંકડાઓને સમાવે છે." -#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:143 -#: ../libnm-util/crypto_nss.c:169 +#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:336 #, c-format msgid "Private key cipher '%s' was unknown." msgstr "ખાનગી કી સાઇફર '%s' એ અજ્ઞાત હતુ." @@ -125,72 +1266,106 @@ msgstr "ખાનગી કી પ્રકાર ને નક્કી કર msgid "Not enough memory to store decrypted private key." msgstr "ડિક્રિપ્ટ થયેલ ખાનગી કીને સંગ્રહ કરવા માટે મેમરી પૂરતી નથી." -#: ../libnm-util/crypto_gnutls.c:46 +#: ../libnm-util/crypto_gnutls.c:49 msgid "Failed to initialize the crypto engine." msgstr "ક્રિપ્ટો એંજિન ને પ્રારંભ કરવાનું નિષ્ફળ." -#: ../libnm-util/crypto_gnutls.c:90 +#: ../libnm-util/crypto_gnutls.c:93 #, c-format msgid "Failed to initialize the MD5 engine: %s / %s." msgstr "MD5 એંજિનને પ્રારંભ કરવાનું નિષ્ફળ: %s / %s." -#: ../libnm-util/crypto_gnutls.c:152 ../libnm-util/crypto_nss.c:178 +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "અયોગ્ય IV લંબાઇ (ઓછામાં ઓછી %zd હોવી જ જોઇએ)." + +#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188 #, c-format msgid "Not enough memory for decrypted key buffer." msgstr "ડિક્રિપ્ટ થયેલ કી બફર માટે પૂરતી મેમરી નથી." -#: ../libnm-util/crypto_gnutls.c:160 +#: ../libnm-util/crypto_gnutls.c:173 #, c-format msgid "Failed to initialize the decryption cipher context: %s / %s." msgstr "ડિક્રિપ્શન સાઇફર સંદર્ભને પ્રારંભ કરવાનું નિષ્ફળ: %s / %s." -#: ../libnm-util/crypto_gnutls.c:169 +#: ../libnm-util/crypto_gnutls.c:182 #, c-format msgid "Failed to set symmetric key for decryption: %s / %s." msgstr "ડિક્રિપ્શન માટે સમપ્રમાણ કીને સુયોજિત કરવામાં નિષ્ફળ: %s / %s." -#: ../libnm-util/crypto_gnutls.c:178 +#: ../libnm-util/crypto_gnutls.c:191 #, c-format msgid "Failed to set IV for decryption: %s / %s." msgstr "ડિક્રિપ્શન માટે IV ને સુયોજિત કરવાનું નિષ્ફળ: %s / %s." -#: ../libnm-util/crypto_gnutls.c:187 +#: ../libnm-util/crypto_gnutls.c:200 #, c-format msgid "Failed to decrypt the private key: %s / %s." msgstr "ખાનગી કીને ડિક્રિપ્ટ કરવાનું નિષ્ફળ: %s / %s." -#: ../libnm-util/crypto_gnutls.c:200 +#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 +#, c-format +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "ખાનગી કી ને ડિક્રિપ્ટ કરવાનું નિષ્ફળ: અનિચ્છનિય પેડિંગ લંબાઇ." + +#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 #, c-format msgid "Failed to decrypt the private key." msgstr "ખાનગી કીને ડિક્રિપ્ટ કરવાનું નિષ્ફળ." -#: ../libnm-util/crypto_gnutls.c:235 +#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "એનક્રિપ્ટ કર્યા પછી મેમરીને ફાળવી શક્યા નહિં." + +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "એનક્રિપ્શન સાઇફર સંદર્ભને પ્રારંભ કરવાનું નિષ્ફળ: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "એનક્રિપ્શન માટે સમપ્રમાણ કીને સુયોજિત કરવામાં નિષ્ફળ: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +msgid "Failed to set IV for encryption: %s / %s." +msgstr "એનક્રિપ્શન માટે IV ને સુયોજિત કરવાનું નિષ્ફળ: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +msgid "Failed to encrypt the data: %s / %s." +msgstr "માહિતીને એનક્રિપ્ટ કરવાનું નિષ્ફળ: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:362 #, c-format msgid "Error initializing certificate data: %s" msgstr "પ્રમાણપત્ર માહિતીને પ્રારંભ કરતી વખતે ભૂલ: %s" -#: ../libnm-util/crypto_gnutls.c:257 +#: ../libnm-util/crypto_gnutls.c:384 #, c-format msgid "Couldn't decode certificate: %s" msgstr "પ્રમાણપત્રને ડિકોડ કરી શકાયુ નહિં: %s" -#: ../libnm-util/crypto_gnutls.c:281 +#: ../libnm-util/crypto_gnutls.c:408 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %s" msgstr "PKCS#12 ડિકોડરને પ્રારંભ કરી શકાયુ નહિં: %s " -#: ../libnm-util/crypto_gnutls.c:294 +#: ../libnm-util/crypto_gnutls.c:421 #, c-format msgid "Couldn't decode PKCS#12 file: %s" msgstr "PKCS#12 ફાઇલને ડિકોડ કરી શકાયુ નહિં: %s" -#: ../libnm-util/crypto_gnutls.c:306 +#: ../libnm-util/crypto_gnutls.c:433 #, c-format msgid "Couldn't verify PKCS#12 file: %s" msgstr "PKCS#12 ફાઇલને ચકાસી શકાયુ નહિં: %s" -#: ../libnm-util/crypto_nss.c:57 -#: ../system-settings/plugins/ifcfg-rh/crypto.c:52 +#: ../libnm-util/crypto_nss.c:56 #, c-format msgid "Failed to initialize the crypto engine: %d." msgstr "ક્રિપ્ટો એંજિનને પ્રારંભ કરવાનું નિષ્ફળ: %d." @@ -200,105 +1375,184 @@ msgstr "ક્રિપ્ટો એંજિનને પ્રારંભ ક msgid "Failed to initialize the MD5 context: %d." msgstr "MD5 સંદર્ભને પ્રારંભ કરવાનું નિષ્ફળ: %d." -#: ../libnm-util/crypto_nss.c:186 +#: ../libnm-util/crypto_nss.c:179 +#, c-format +msgid "Invalid IV length (must be at least %d)." +msgstr "અયોગ્ય IV લંબાઇ (ઓછામાં ઓછી %d હોવી જ જોઇએ)." + +#: ../libnm-util/crypto_nss.c:196 #, c-format msgid "Failed to initialize the decryption cipher slot." msgstr "ડિક્રિપ્શન સાઇફર સ્લોટને પ્રારંભ કરવાનું નિષ્ફળ." -#: ../libnm-util/crypto_nss.c:196 +#: ../libnm-util/crypto_nss.c:206 #, c-format msgid "Failed to set symmetric key for decryption." msgstr "ડિક્રિપ્શન માટે સમપ્રમાણ કીને સુયોજિત કરવામાં નિષ્ફળ." -#: ../libnm-util/crypto_nss.c:206 +#: ../libnm-util/crypto_nss.c:216 #, c-format msgid "Failed to set IV for decryption." msgstr "ડિક્રિપ્શન માટે IV ને સુયોજિત કરવામાં નિષ્ફળ." -#: ../libnm-util/crypto_nss.c:214 +#: ../libnm-util/crypto_nss.c:224 #, c-format msgid "Failed to initialize the decryption context." msgstr "ડિક્રિપ્શન સંદર્ભને આખરી રૂપ આપવામાં નિષ્ફળ." -#: ../libnm-util/crypto_nss.c:227 +#: ../libnm-util/crypto_nss.c:237 #, c-format msgid "Failed to decrypt the private key: %d." msgstr "ખાનગી કી ને ડિક્રિપ્ટ કરવાનું નિષ્ફળ: %d." -#: ../libnm-util/crypto_nss.c:239 +#: ../libnm-util/crypto_nss.c:245 +#, c-format +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "ખાનગી કીને ડિક્રિપ્ટ કરવાનું નિષ્ફળ: ડિક્રિપ્ટ થયેલ માહિતી ઘણી લાંબી છે." + +#: ../libnm-util/crypto_nss.c:256 #, c-format msgid "Failed to finalize decryption of the private key: %d." msgstr "ખાનગી કીનાં ડિક્રિપ્શનનને આખરી રૂપ આપવાનું નિષ્ફળ: %d." -#: ../libnm-util/crypto_nss.c:284 +#: ../libnm-util/crypto_nss.c:364 +#, c-format +msgid "Failed to initialize the encryption cipher slot." +msgstr "એનક્રિપ્શન સાઇફર સ્લોટને પ્રારંભ કરવાનું નિષ્ફળ." + +#: ../libnm-util/crypto_nss.c:372 +#, c-format +msgid "Failed to set symmetric key for encryption." +msgstr "એનક્રિપ્શન માટે સમપ્રમાણ કીને સુયોજિત કરવામાં નિષ્ફળ." + +#: ../libnm-util/crypto_nss.c:380 +#, c-format +msgid "Failed to set IV for encryption." +msgstr "એનક્રિપ્શન માટે IV ને સુયોજિત કરવામાં નિષ્ફળ." + +#: ../libnm-util/crypto_nss.c:388 +#, c-format +msgid "Failed to initialize the encryption context." +msgstr "એનક્રિપ્શન સંદર્ભને પ્રારંભ કરવામાં નિષ્ફળ." + +#: ../libnm-util/crypto_nss.c:396 +#, c-format +msgid "Failed to encrypt: %d." +msgstr "એનક્રિપ્ટ કરવાનું નિષ્ફળ: %d." + +#: ../libnm-util/crypto_nss.c:404 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "એનક્રિપ્ટ કર્યા પછી માહિતીની અનિચ્છનિય સંખ્યા." + +#: ../libnm-util/crypto_nss.c:447 #, c-format msgid "Couldn't decode certificate: %d" msgstr "પ્રમાણપત્રને ડિકોડ કરી શકાયુ નહિં: %d" -#: ../libnm-util/crypto_nss.c:319 +#: ../libnm-util/crypto_nss.c:482 #, c-format msgid "Couldn't convert password to UCS2: %d" msgstr "UCS2 માં પાસવર્ડને રૂપાંતરિત કરી શકાયુ નહિં: %d" -#: ../libnm-util/crypto_nss.c:347 +#: ../libnm-util/crypto_nss.c:510 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %d" msgstr "PKCS#12 ડિકોડરને પ્રારંભ કરી શકાયુ નહિં: %d" -#: ../libnm-util/crypto_nss.c:356 +#: ../libnm-util/crypto_nss.c:519 #, c-format msgid "Couldn't decode PKCS#12 file: %d" msgstr "PKCS#12 ફાઇલને ડિકોડ કરી શકાયુ નહિં: %d" -#: ../libnm-util/crypto_nss.c:365 +#: ../libnm-util/crypto_nss.c:528 #, c-format msgid "Couldn't verify PKCS#12 file: %d" msgstr "PKCS#12 ફાઇલને ચકાસી શકાયુ નહિં: %d" -#: ../src/nm-netlink-monitor.c:194 ../src/nm-netlink-monitor.c:458 +#: ../libnm-util/crypto_nss.c:557 +msgid "Could not generate random data." +msgstr "રેન્ડમ માહિતી ને ઉત્પન્ન કરી શક્યા નહિં." + +#: ../libnm-util/nm-utils.c:1925 +#, c-format +msgid "Not enough memory to make encryption key." +msgstr "એનક્રિપ્શન કીને બનાવવા માટે મેમરી પૂરતી નથી." + +#: ../libnm-util/nm-utils.c:2035 +msgid "Could not allocate memory for PEM file creation." +msgstr "PEM ફાઇલ બનાવવા માટે મેમરી ફાળવી શક્યા નહિંી પૂરતી નથી." + +#: ../libnm-util/nm-utils.c:2047 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "PEM ફાઇલમાં IV ને લખવા માટે મેમરીને ફાળવી શક્યા નહિં." + +#: ../libnm-util/nm-utils.c:2059 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "PEM ફાઇલમાં અનક્રિપ્ટ થયેલ કી ને લખવા માટે મેમરીને ફાળવી શક્યા નહિં." + +#: ../libnm-util/nm-utils.c:2078 +#, c-format +msgid "Could not allocate memory for PEM file data." +msgstr "PEM ફાઇલ માહિતી માટે મેમરી ફાળવી શક્યા નહિં." + +#: ../src/nm-netlink-monitor.c:100 ../src/nm-netlink-monitor.c:231 +#: ../src/nm-netlink-monitor.c:653 #, c-format msgid "error processing netlink message: %s" msgstr "નેટલિંક સંદેશ ને પ્રક્રિયા કરવામાં ભૂલ: %s" -#: ../src/nm-netlink-monitor.c:255 -#, c-format -msgid "unable to allocate netlink handle for monitoring link status: %s" -msgstr "કડી સ્થિતિને મોનિટર કરવા માટે નેટલિંકને સંભાળવાનું ફાળવવામાં અસમર્થ: %s" +#: ../src/nm-netlink-monitor.c:214 +msgid "error occurred while waiting for data on socket" +msgstr "ભૂલ ઉદ્ભવી જ્યારે સોકેટ પર માહિતી માટે રાહ જોઇ રહ્યા હોય" -#: ../src/nm-netlink-monitor.c:265 +#: ../src/nm-netlink-monitor.c:254 #, c-format msgid "unable to connect to netlink for monitoring link status: %s" msgstr "કડી સ્થિતિને મોનિટર કરવા માટે નેટલિંકને જોડવામાં અસમર્થ: %s" -#: ../src/nm-netlink-monitor.c:273 +#: ../src/nm-netlink-monitor.c:265 #, c-format -msgid "unable to join netlink group for monitoring link status: %s" -msgstr "કડી પરિસ્થિતિને મોનિટર કરવા માટે નેટલીંક જૂથ ને જોડાવવાનું અસમર્થ: %s" +msgid "unable to enable netlink handle credential passing: %s" +msgstr "નેટલિંકને સંભાળવાનો શ્રેયને જવાનું સક્રિય કરવા માટે અસમર્થ: %s" -#: ../src/nm-netlink-monitor.c:281 +#: ../src/nm-netlink-monitor.c:291 ../src/nm-netlink-monitor.c:353 +#, c-format +msgid "unable to allocate netlink handle for monitoring link status: %s" +msgstr "કડી સ્થિતિને મોનિટર કરવા માટે નેટલિંકને સંભાળવાનું ફાળવવામાં અસમર્થ: %s" + +#: ../src/nm-netlink-monitor.c:376 #, c-format msgid "unable to allocate netlink link cache for monitoring link status: %s" msgstr "કડી સ્થિતિને મોનિટર કરવા માટે નેટલિંક કડી કેશને ફાળવવામાં અસમર્થ: %s" -#: ../src/nm-netlink-monitor.c:422 +#: ../src/nm-netlink-monitor.c:502 +#, c-format +msgid "unable to join netlink group: %s" +msgstr "નેટલીંક જૂથ ને જોડાવવાનું અસમર્થ: %s" + +#: ../src/nm-netlink-monitor.c:629 ../src/nm-netlink-monitor.c:642 #, c-format msgid "error updating link cache: %s" msgstr "કડી કેશને સુધારો કરતી વખતે ભૂલ: %s" -#: ../src/nm-netlink-monitor.c:488 -msgid "error occurred while waiting for data on socket" -msgstr "ભૂલ ઉદ્ભવી જ્યારે સોકેટ પર માહિતી માટે રાહ જોઇ રહ્યા હોય" - -#: ../src/NetworkManager.c:294 +#: ../src/main.c:502 #, c-format msgid "Invalid option. Please use --help to see a list of valid options.\n" msgstr "અયોગ્ય વિકલ્પ. મહેરબાની કરીને યોગ્ય વિકલ્પોની યાદી ને જોવા માટે --help ને વાપરો.\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:97 +#: ../src/main.c:562 +#, c-format +msgid "%s. Please use --help to see a list of valid options.\n" +msgstr "%s. મહેરબાની કરીને યોગ્ય વિકલ્પોની યાદીને જોવા માટે --help ને વાપરો.\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:325 msgid "# Created by NetworkManager\n" msgstr "# ને NetworkManager દ્દારા બનાવેલ છે\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:103 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:341 #, c-format msgid "" "# Merged from %s\n" @@ -307,28 +1561,79 @@ msgstr "" "# ને %s માંથી ભેગુ કરેલ છે\n" "\n" -#: ../src/named-manager/nm-named-manager.c:255 +#: ../src/dhcp-manager/nm-dhcp-manager.c:279 +msgid "no usable DHCP client could be found." +msgstr "ન વાપરી શકાય તેવુ DHCP ક્લાઇન્ટ મળી શકે છે." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:288 +msgid "'dhclient' could be found." +msgstr "'dhclient' મળી શકે છે." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:298 +msgid "'dhcpcd' could be found." +msgstr "'dhcpcd' મળી શકે છે." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:306 +#, c-format +msgid "unsupported DHCP client '%s'" +msgstr "બિનઆધારભૂત DHCP ક્લાઇન્ટ '%s'" + +#: ../src/logging/nm-logging.c:146 +#, c-format +msgid "Unknown log level '%s'" +msgstr "અજ્ઞાત લોગ સ્તર '%s'" + +#: ../src/logging/nm-logging.c:171 +#, c-format +msgid "Unknown log domain '%s'" +msgstr "અજ્ઞાત લોગ ડોમેઇન '%s'" + +#: ../src/named-manager/nm-named-manager.c:343 msgid "NOTE: the libc resolver may not support more than 3 nameservers." msgstr "નોંધ: libc સુધારનાર એ ૩ નામ સર્વરો કરતા વધારે આધારને સમાવી શકતુ નથી." -#: ../src/named-manager/nm-named-manager.c:257 +#: ../src/named-manager/nm-named-manager.c:345 msgid "The nameservers listed below may not be recognized." msgstr "નીચે યાદી થયેલ નામસર્વરો એ ઓળખી શકાતા નથી." -#: ../system-settings/plugins/ifcfg-rh/reader.c:2149 -msgid "System" -msgstr "સિસ્ટમ" - -#: ../system-settings/src/nm-default-wired-connection.c:182 +#: ../src/system-settings/nm-default-wired-connection.c:157 #, c-format msgid "Auto %s" msgstr "%s સ્વયં કરો" +#: ../system-settings/plugins/ifcfg-rh/reader.c:3256 +msgid "System" +msgstr "સિસ્ટમ" + #: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "સુરક્ષિત થયેલ WiFi નેટવર્ક મારફતે જોડાણ વહેંચણી" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "ખુલ્લા WiFi નેટવર્ક મારફતે જોડાણ વહેંચણી" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "નિરંતર સિસ્ટમ યજમાનનામને બદલો" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 msgid "Modify system connections" msgstr "સિસ્ટમ જોડાણોને બદલો" -#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 msgid "System policy prevents modification of system settings" msgstr "સિસ્ટમ પોલિસી એ સિસ્ટમ સુયોજનોનાં બદલાવને અટકાવે છે" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +msgid "System policy prevents modification of the persistent system hostname" +msgstr "સિસ્ટમ પોલિસી એ નિરંતર સિસ્ટમ યજમાનનામનાં બદલાવને અટકાવે છે" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "સિસ્ટમ પોલિસી એ સુરક્ષિત થયેલ WiFi નેટવર્ક મારફતે વહેંચણી જોડાણોને રોકી રહ્યા છે" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "સિસ્ટમ પોલિસી એ ખુલ્લા WiFi નેટવર્ક મારફતે વહેંચણી જોડાણોને રોકી રહ્યા છે" + diff --git a/po/hi.po b/po/hi.po new file mode 100644 index 0000000000..9b6c3f1707 --- /dev/null +++ b/po/hi.po @@ -0,0 +1,1642 @@ +# translation of hi.po to Hindi +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Rajesh Ranjan , 2010. +msgid "" +msgstr "" +"Project-Id-Version: NetworkManager.master\n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager&component=general\n" +"POT-Creation-Date: 2010-05-06 14:31+0530\n" +"PO-Revision-Date: 2010-05-07 15:23+0530\n" +"Last-Translator: Rajesh Ranjan \n" +"Language-Team: Hindi \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=2; plural=(n!=1);\n\n" +"\n" +"\n" +"\n" +"\n" +"\n" + +#: ../cli/src/connections.c:59 ../cli/src/connections.c:74 +#: ../cli/src/devices.c:85 ../cli/src/devices.c:98 ../cli/src/devices.c:108 +#: ../cli/src/devices.c:118 ../cli/src/devices.c:131 ../cli/src/devices.c:142 +#: ../cli/src/devices.c:152 +msgid "NAME" +msgstr "NAME" + +#. 0 +#: ../cli/src/connections.c:60 ../cli/src/connections.c:75 +msgid "UUID" +msgstr "UUID" + +#. 1 +#: ../cli/src/connections.c:61 +msgid "DEVICES" +msgstr "DEVICES" + +#. 2 +#: ../cli/src/connections.c:62 ../cli/src/connections.c:77 +msgid "SCOPE" +msgstr "SCOPE" + +#. 3 +#: ../cli/src/connections.c:63 +msgid "DEFAULT" +msgstr "DEFAULT" + +#. 4 +#: ../cli/src/connections.c:64 +msgid "DBUS-SERVICE" +msgstr "DBUS-SERVICE" + +#. 5 +#: ../cli/src/connections.c:65 +msgid "SPEC-OBJECT" +msgstr "SPEC-OBJECT" + +#. 6 +#: ../cli/src/connections.c:66 +msgid "VPN" +msgstr "VPN" + +#. 1 +#. 0 +#. 1 +#: ../cli/src/connections.c:76 ../cli/src/devices.c:61 ../cli/src/devices.c:87 +msgid "TYPE" +msgstr "TYPE" + +#. 3 +#: ../cli/src/connections.c:78 +msgid "TIMESTAMP" +msgstr "TIMESTAMP" + +#. 4 +#: ../cli/src/connections.c:79 +msgid "TIMESTAMP-REAL" +msgstr "TIMESTAMP-REAL" + +#. 5 +#: ../cli/src/connections.c:80 +msgid "AUTOCONNECT" +msgstr "AUTOCONNECT" + +#. 6 +#: ../cli/src/connections.c:81 +msgid "READONLY" +msgstr "READONLY" + +#: ../cli/src/connections.c:157 +#, c-format +msgid "" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" +msgstr "" +"प्रयोग: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" + +#: ../cli/src/connections.c:197 ../cli/src/connections.c:536 +#, c-format +msgid "Error: 'con list': %s" +msgstr "त्रुटि: 'con list': %s" + +#: ../cli/src/connections.c:199 ../cli/src/connections.c:538 +#, c-format +msgid "Error: 'con list': %s; allowed fields: %s" +msgstr "त्रुटि: 'con list': %s; अनुमतिप्राप्त क्षेत्र: %s" + +#: ../cli/src/connections.c:207 +msgid "Connection details" +msgstr "कनेक्शन्स विवरण" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "system" +msgstr "तंत्र" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "user" +msgstr "उपयोक्ता" + +#: ../cli/src/connections.c:383 +msgid "never" +msgstr "कभी नहीं" + +#. "CAPABILITIES" +#. Print header +#. "WIFI-PROPERTIES" +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:544 ../cli/src/settings.c:643 +#: ../cli/src/settings.c:912 ../cli/src/settings.c:913 +#: ../cli/src/settings.c:915 ../cli/src/settings.c:917 +#: ../cli/src/settings.c:1042 ../cli/src/settings.c:1043 +#: ../cli/src/settings.c:1044 ../cli/src/settings.c:1123 +#: ../cli/src/settings.c:1124 ../cli/src/settings.c:1125 +#: ../cli/src/settings.c:1126 ../cli/src/settings.c:1127 +#: ../cli/src/settings.c:1128 ../cli/src/settings.c:1129 +#: ../cli/src/settings.c:1130 ../cli/src/settings.c:1131 +#: ../cli/src/settings.c:1132 ../cli/src/settings.c:1133 +#: ../cli/src/settings.c:1134 ../cli/src/settings.c:1135 +#: ../cli/src/settings.c:1210 +msgid "yes" +msgstr "हाँ" + +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:506 ../cli/src/settings.c:544 +#: ../cli/src/settings.c:643 ../cli/src/settings.c:912 +#: ../cli/src/settings.c:913 ../cli/src/settings.c:915 +#: ../cli/src/settings.c:917 ../cli/src/settings.c:1042 +#: ../cli/src/settings.c:1043 ../cli/src/settings.c:1044 +#: ../cli/src/settings.c:1123 ../cli/src/settings.c:1124 +#: ../cli/src/settings.c:1125 ../cli/src/settings.c:1126 +#: ../cli/src/settings.c:1127 ../cli/src/settings.c:1128 +#: ../cli/src/settings.c:1129 ../cli/src/settings.c:1130 +#: ../cli/src/settings.c:1131 ../cli/src/settings.c:1132 +#: ../cli/src/settings.c:1133 ../cli/src/settings.c:1134 +#: ../cli/src/settings.c:1135 ../cli/src/settings.c:1210 +msgid "no" +msgstr "नहीं" + +#: ../cli/src/connections.c:457 ../cli/src/connections.c:500 +msgid "System connections" +msgstr "सिस्टम कनेक्शन" + +#: ../cli/src/connections.c:462 ../cli/src/connections.c:513 +msgid "User connections" +msgstr "उपयोक्ता कनेक्शन" + +#: ../cli/src/connections.c:474 ../cli/src/connections.c:1334 +#: ../cli/src/connections.c:1350 ../cli/src/connections.c:1359 +#: ../cli/src/connections.c:1370 ../cli/src/connections.c:1452 +#: ../cli/src/devices.c:864 ../cli/src/devices.c:874 ../cli/src/devices.c:973 +#: ../cli/src/devices.c:980 +#, c-format +msgid "Error: %s argument is missing." +msgstr "त्रुटि: %s तर्क अनुपस्थित है." + +#: ../cli/src/connections.c:487 +#, c-format +msgid "Error: %s - no such connection." +msgstr "त्रुटि: %s - कोई ऐसा कनेक्शन नहीं." + +#: ../cli/src/connections.c:519 ../cli/src/connections.c:1383 +#: ../cli/src/connections.c:1470 ../cli/src/devices.c:687 +#: ../cli/src/devices.c:754 ../cli/src/devices.c:888 ../cli/src/devices.c:986 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "अज्ञात पैरामीटर: %s\n" + +#: ../cli/src/connections.c:528 +#, c-format +msgid "Error: no valid parameter specified." +msgstr "त्रुटि: कोई वैध पैरामीटर निर्दिष्ट नहीं." + +#: ../cli/src/connections.c:543 ../cli/src/connections.c:1572 +#: ../cli/src/devices.c:1192 ../cli/src/network-manager.c:274 +#, c-format +msgid "Error: %s." +msgstr "त्रुटि: %s." + +#: ../cli/src/connections.c:649 +#, c-format +msgid "Error: 'con status': %s" +msgstr "त्रुटि: 'con status': %s" + +#: ../cli/src/connections.c:651 +#, c-format +msgid "Error: 'con status': %s; allowed fields: %s" +msgstr "त्रुटि: 'con status': %s; अनुमतिप्राप्त क्षेत्र: %s" + +#: ../cli/src/connections.c:658 +msgid "Active connections" +msgstr "सक्रिय कनेक्शन" + +#: ../cli/src/connections.c:1026 +#, c-format +msgid "no active connection on device '%s'" +msgstr "युक्ति '%s' पर कोई सक्रिय कनेक्शन नहीं" + +#: ../cli/src/connections.c:1034 +#, c-format +msgid "no active connection or device" +msgstr "कोई सक्रिय कनेक्शन या युक्ति नहीं" + +#: ../cli/src/connections.c:1084 +#, c-format +msgid "device '%s' not compatible with connection '%s'" +msgstr "युक्ति '%s' '%s' के साथ संगत नहीं है" + +#: ../cli/src/connections.c:1086 +#, c-format +msgid "no device found for connection '%s'" +msgstr "'%s' कनेक्शन के लिए कोई युक्ति नहीं मिला" + +#: ../cli/src/connections.c:1097 +msgid "activating" +msgstr "सक्रिय कर रहा है" + +#: ../cli/src/connections.c:1099 +msgid "activated" +msgstr "सक्रिय किया हुआ" + +#: ../cli/src/connections.c:1102 ../cli/src/connections.c:1125 +#: ../cli/src/connections.c:1158 ../cli/src/devices.c:224 +#: ../cli/src/devices.c:514 ../cli/src/network-manager.c:92 +#: ../cli/src/network-manager.c:145 ../cli/src/settings.c:469 +msgid "unknown" +msgstr "अज्ञात" + +#: ../cli/src/connections.c:1111 +msgid "VPN connecting (prepare)" +msgstr "VPN कनेक्टिंग (तैयार)" + +#: ../cli/src/connections.c:1113 +msgid "VPN connecting (need authentication)" +msgstr "VPN कनेक्टिंग (सत्यापन जरूरी)" + +#: ../cli/src/connections.c:1115 +msgid "VPN connecting" +msgstr "VPN कनेक्टिंग" + +#: ../cli/src/connections.c:1117 +msgid "VPN connecting (getting IP configuration)" +msgstr "VPN कनेक्टिंग (IP विन्यास पा रहा है)" + +#: ../cli/src/connections.c:1119 +msgid "VPN connected" +msgstr "VPN कनेक्टेड" + +#: ../cli/src/connections.c:1121 +msgid "VPN connection failed" +msgstr "VPN कनेक्शन विफल" + +#: ../cli/src/connections.c:1123 +msgid "VPN disconnected" +msgstr "VPN डिसकनेक्टेंड" + +#: ../cli/src/connections.c:1134 +msgid "unknown reason" +msgstr "अज्ञात कारण" + +#: ../cli/src/connections.c:1136 +msgid "none" +msgstr "कुछ नहीं" + +#: ../cli/src/connections.c:1138 +msgid "the user was disconnected" +msgstr "उपयोक्ता डिसकनेक्ट किया गया था" + +#: ../cli/src/connections.c:1140 +msgid "the base network connection was interrupted" +msgstr "मौलिक संजाल कनेक्शन में बाधा आई थी" + +#: ../cli/src/connections.c:1142 +msgid "the VPN service stopped unexpectedly" +msgstr "VPN सेवा अचानक रुक गई" + +#: ../cli/src/connections.c:1144 +msgid "the VPN service returned invalid configuration" +msgstr "VPN सेवा ने अवैध विन्यास वापस किया" + +#: ../cli/src/connections.c:1146 +msgid "the connection attempt timed out" +msgstr "कनेक्शन प्रयास का समय समाप्त" + +#: ../cli/src/connections.c:1148 +msgid "the VPN service did not start in time" +msgstr "VPN सेवा समय पर आरंभ नहीं हुआ" + +#: ../cli/src/connections.c:1150 +msgid "the VPN service failed to start" +msgstr "VPN सेवा आरंभ होने में विफल रहा" + +#: ../cli/src/connections.c:1152 +msgid "no valid VPN secrets" +msgstr "कोई वैध VPN गुप्त नहीं" + +#: ../cli/src/connections.c:1154 +msgid "invalid VPN secrets" +msgstr "अवैध VPN गुप्त" + +#: ../cli/src/connections.c:1156 +msgid "the connection was removed" +msgstr "कनेक्शन हटाया गया था" + +#: ../cli/src/connections.c:1170 +#, c-format +msgid "state: %s\n" +msgstr "स्थिति: %s\n" + +#: ../cli/src/connections.c:1173 ../cli/src/connections.c:1199 +#, c-format +msgid "Connection activated\n" +msgstr "कनेक्शन सक्रिय किया गया\n" + +#: ../cli/src/connections.c:1176 +#, c-format +msgid "Error: Connection activation failed." +msgstr "त्रुटि: कनेक्शन सक्रिय किया जाना विफल." + +#: ../cli/src/connections.c:1195 +#, c-format +msgid "state: %s (%d)\n" +msgstr "स्थिति: %s (%d)\n" + +#: ../cli/src/connections.c:1205 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "त्रुटि: कनेक्शन सक्रियकरण विफल: %s." + +#: ../cli/src/connections.c:1222 ../cli/src/devices.c:811 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "त्रुटि: समय समाप्ति %d सेकेंड में समाप्त." + +#: ../cli/src/connections.c:1265 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "त्रुटि: कनेक्शन सक्रियकरण विफल: %s" + +#: ../cli/src/connections.c:1279 +#, c-format +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "त्रुटि: '%s' के लिए सक्रिय कनेक्शन पा रहा है." + +#: ../cli/src/connections.c:1288 +#, c-format +msgid "Active connection state: %s\n" +msgstr "सक्रिय कनेक्शन स्थिति: %s\n" + +#: ../cli/src/connections.c:1289 +#, c-format +msgid "Active connection path: %s\n" +msgstr "सक्रिय कनेक्शन पथ: %s\n" + +#: ../cli/src/connections.c:1343 ../cli/src/connections.c:1461 +#, c-format +msgid "Error: Unknown connection: %s." +msgstr "त्रुटि: अज्ञात कनेक्शन: %s." + +#: ../cli/src/connections.c:1378 ../cli/src/devices.c:882 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "त्रुटि: समय समाप्ति मान '%s' वैध नहीं है." + +#: ../cli/src/connections.c:1391 ../cli/src/connections.c:1478 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "त्रुटि: id या uuid को निर्दिष्ट किया जाना है." + +#: ../cli/src/connections.c:1411 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "त्रुटि: कोई उपयुक्त युक्ति नहीं मिला: %s." + +#: ../cli/src/connections.c:1413 +#, c-format +msgid "Error: No suitable device found." +msgstr "त्रुटि: कोई उपयुक्त युक्ति नहीं मिला." + +#: ../cli/src/connections.c:1505 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "चेतावनी: कनेक्शन सक्रिय नहीं\n" + +#: ../cli/src/connections.c:1561 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "त्रुटि: 'con' कमांड '%s' वैध नहीं है." + +#: ../cli/src/connections.c:1597 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "त्रुटि: D-Bus से कनेक्ट नहीं कर पाया." + +#: ../cli/src/connections.c:1604 +#, c-format +msgid "Error: Could not get system settings." +msgstr "त्रुटि: सिस्टम सेटिंग नहीं पा सका." + +#: ../cli/src/connections.c:1612 +#, c-format +msgid "Error: Could not get user settings." +msgstr "त्रुटि: उपयोक्ता सेटिंग नहीं पा सका." + +#: ../cli/src/connections.c:1622 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "त्रुटि: कनेक्शन नहीं पा सकता है: सेटिंग सेवा चल नहीं रही है." + +#. 0 +#. 9 +#: ../cli/src/devices.c:60 ../cli/src/devices.c:86 ../cli/src/devices.c:162 +msgid "DEVICE" +msgstr "DEVICE" + +#. 1 +#. 4 +#. 0 +#: ../cli/src/devices.c:62 ../cli/src/devices.c:90 +#: ../cli/src/network-manager.c:36 +msgid "STATE" +msgstr "STATE" + +#: ../cli/src/devices.c:71 +msgid "GENERAL" +msgstr "GENERAL" + +#. 0 +#: ../cli/src/devices.c:72 +msgid "CAPABILITIES" +msgstr "CAPABILITIES" + +#. 1 +#: ../cli/src/devices.c:73 +msgid "WIFI-PROPERTIES" +msgstr "WIFI-PROPERTIES" + +#. 2 +#: ../cli/src/devices.c:74 +msgid "AP" +msgstr "AP" + +#. 3 +#: ../cli/src/devices.c:75 +msgid "WIRED-PROPERTIES" +msgstr "WIRED-PROPERTIES" + +#. 4 +#: ../cli/src/devices.c:76 +msgid "IP4-SETTINGS" +msgstr "IP4-SETTINGS" + +#. 5 +#: ../cli/src/devices.c:77 +msgid "IP4-DNS" +msgstr "IP4-DNS" + +#. 2 +#: ../cli/src/devices.c:88 +msgid "DRIVER" +msgstr "DRIVER" + +#. 3 +#: ../cli/src/devices.c:89 +msgid "HWADDR" +msgstr "HWADDR" + +#. 0 +#: ../cli/src/devices.c:99 +msgid "CARRIER-DETECT" +msgstr "CARRIER-DETECT" + +#. 1 +#: ../cli/src/devices.c:100 +msgid "SPEED" +msgstr "SPEED" + +#. 0 +#: ../cli/src/devices.c:109 +msgid "CARRIER" +msgstr "CARRIER" + +#. 0 +#: ../cli/src/devices.c:119 +msgid "WEP" +msgstr "WEP" + +#. 1 +#: ../cli/src/devices.c:120 +msgid "WPA" +msgstr "WPA" + +#. 2 +#: ../cli/src/devices.c:121 +msgid "WPA2" +msgstr "WPA2" + +#. 3 +#: ../cli/src/devices.c:122 +msgid "TKIP" +msgstr "TKIP" + +#. 4 +#: ../cli/src/devices.c:123 +msgid "CCMP" +msgstr "CCMP" + +#. 0 +#: ../cli/src/devices.c:132 +msgid "ADDRESS" +msgstr "ADDRESS" + +#. 1 +#: ../cli/src/devices.c:133 +msgid "PREFIX" +msgstr "PREFIX" + +#. 2 +#: ../cli/src/devices.c:134 +msgid "GATEWAY" +msgstr "GATEWAY" + +#. 0 +#: ../cli/src/devices.c:143 +msgid "DNS" +msgstr "DNS" + +#. 0 +#: ../cli/src/devices.c:153 +msgid "SSID" +msgstr "SSID" + +#. 1 +#: ../cli/src/devices.c:154 +msgid "BSSID" +msgstr "BSSID" + +#. 2 +#: ../cli/src/devices.c:155 +msgid "MODE" +msgstr "MODE" + +#. 3 +#: ../cli/src/devices.c:156 +msgid "FREQ" +msgstr "FREQ" + +#. 4 +#: ../cli/src/devices.c:157 +msgid "RATE" +msgstr "RATE" + +#. 5 +#: ../cli/src/devices.c:158 +msgid "SIGNAL" +msgstr "SIGNAL" + +#. 6 +#: ../cli/src/devices.c:159 +msgid "SECURITY" +msgstr "SECURITY" + +#. 7 +#: ../cli/src/devices.c:160 +msgid "WPA-FLAGS" +msgstr "WPA-FLAGS" + +#. 8 +#: ../cli/src/devices.c:161 +msgid "RSN-FLAGS" +msgstr "RSN-FLAGS" + +#. 10 +#: ../cli/src/devices.c:163 +msgid "ACTIVE" +msgstr "ACTIVE" + +#: ../cli/src/devices.c:186 +#, c-format +msgid "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +"\n" +msgstr "" +"प्रयोग: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +"\n" + +#: ../cli/src/devices.c:206 +msgid "unmanaged" +msgstr "अप्रबंधित" + +#: ../cli/src/devices.c:208 +msgid "unavailable" +msgstr "अनुपलब्ध" + +#: ../cli/src/devices.c:210 ../cli/src/network-manager.c:89 +msgid "disconnected" +msgstr "डिसकनेक्टेड" + +#: ../cli/src/devices.c:212 +msgid "connecting (prepare)" +msgstr "कनेक्टिंग (तैयार)" + +#: ../cli/src/devices.c:214 +msgid "connecting (configuring)" +msgstr "कनेक्टिंग (विन्यस्त कर रहा है)" + +#: ../cli/src/devices.c:216 +msgid "connecting (need authentication)" +msgstr "कनेक्टिंग (सत्यापन जरूरी)" + +#: ../cli/src/devices.c:218 +msgid "connecting (getting IP configuration)" +msgstr "कनेक्टिंग (IP विन्यास पा रहा है)" + +#: ../cli/src/devices.c:220 ../cli/src/network-manager.c:87 +msgid "connected" +msgstr "कनेक्टेड" + +#: ../cli/src/devices.c:222 +msgid "connection failed" +msgstr "कनेक्शन विफल" + +#: ../cli/src/devices.c:245 ../cli/src/devices.c:380 +msgid "Unknown" +msgstr "अज्ञात" + +#: ../cli/src/devices.c:277 +msgid "(none)" +msgstr "(कोई नहीं)" + +#: ../cli/src/devices.c:302 +#, c-format +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s: IP4 पता 0x%X को बदलने में त्रुटि" + +#: ../cli/src/devices.c:349 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" + +#: ../cli/src/devices.c:350 +#, c-format +msgid "%u MB/s" +msgstr "%u MB/s" + +#: ../cli/src/devices.c:359 +msgid "Encrypted: " +msgstr "गोपित: " + +#: ../cli/src/devices.c:364 +msgid "WEP " +msgstr "WEP " + +#: ../cli/src/devices.c:366 +msgid "WPA " +msgstr "WPA " + +#: ../cli/src/devices.c:368 +msgid "WPA2 " +msgstr "WPA2 " + +#: ../cli/src/devices.c:371 +msgid "Enterprise " +msgstr "एंटरप्राइज " + +#: ../cli/src/devices.c:380 +msgid "Ad-Hoc" +msgstr "तदर्थ" + +#: ../cli/src/devices.c:380 +msgid "Infrastructure" +msgstr "आधारभूत ढाँचा" + +#: ../cli/src/devices.c:442 +#, c-format +msgid "Error: 'dev list': %s" +msgstr "त्रुटि: 'dev list': %s" + +#: ../cli/src/devices.c:444 +#, c-format +msgid "Error: 'dev list': %s; allowed fields: %s" +msgstr "त्रुटि: 'dev list': %s; अनुमति प्राप्त क्षेत्र: %s" + +#: ../cli/src/devices.c:453 +msgid "Device details" +msgstr "युक्ति विवरण" + +#: ../cli/src/devices.c:483 ../cli/src/devices.c:827 +msgid "(unknown)" +msgstr "(अज्ञात)" + +#: ../cli/src/devices.c:484 +msgid "unknown)" +msgstr "अज्ञात)" + +#: ../cli/src/devices.c:510 +#, c-format +msgid "%u Mb/s" +msgstr "%u Mb/s" + +#. Print header +#. "WIRED-PROPERTIES" +#: ../cli/src/devices.c:583 +msgid "on" +msgstr "चालू" + +#: ../cli/src/devices.c:583 +msgid "off" +msgstr "बंद" + +#: ../cli/src/devices.c:710 +#, c-format +msgid "Error: 'dev status': %s" +msgstr "त्रुटि: 'dev status': %s" + +#: ../cli/src/devices.c:712 +#, c-format +msgid "Error: 'dev status': %s; allowed fields: %s" +msgstr "त्रुटि: 'dev status': %s; अनुमति प्राप्त क्षेत्र: %s" + +#: ../cli/src/devices.c:719 +msgid "Status of devices" +msgstr "युक्ति की स्थिति" + +#: ../cli/src/devices.c:747 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "त्रुटि: '%s' तर्क अनुपस्थित है." + +#: ../cli/src/devices.c:776 ../cli/src/devices.c:915 ../cli/src/devices.c:1035 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "त्रुटि: युक्ति '%s' नहीं मिला." + +#: ../cli/src/devices.c:799 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "सफल: युक्ति '%s' सफलतापूर्वक डिसकनेक्डेड." + +#: ../cli/src/devices.c:824 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "त्रुटि: युक्ति '%s' (%s) डिसकनेक्टिंग विफल: %s" + +#: ../cli/src/devices.c:832 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "युक्ति स्थिति: %d (%s)\n" + +#: ../cli/src/devices.c:896 +#, c-format +msgid "Error: iface has to be specified." +msgstr "त्रुटि: iface को निर्दिष्टि करना है." + +#: ../cli/src/devices.c:1011 +#, c-format +msgid "Error: 'dev wifi': %s" +msgstr "त्रुटि: 'dev wifi': %s" + +#: ../cli/src/devices.c:1013 +#, c-format +msgid "Error: 'dev wifi': %s; allowed fields: %s" +msgstr "त्रुटि: 'dev wifi': %s; अनुमति प्राप्त क्षेत्र: %s" + +#: ../cli/src/devices.c:1020 +msgid "WiFi scan list" +msgstr "WiFi स्कैन सूची" + +#: ../cli/src/devices.c:1055 ../cli/src/devices.c:1109 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "Error: hwaddr '%s' के साथ पहुँच नहीं मिला." + +#: ../cli/src/devices.c:1072 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "त्रुटि: युक्ति '%s' एक WiFi युक्ति नहीं है." + +#: ../cli/src/devices.c:1136 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "त्रुटि: 'dev wifi' कमांड '%s' वैध नहीं है." + +#: ../cli/src/devices.c:1183 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "त्रुटि: 'dev' कमांड '%s' वैध नहीं है." + +#: ../cli/src/network-manager.c:35 +msgid "RUNNING" +msgstr "RUNNING" + +#. 1 +#: ../cli/src/network-manager.c:37 +msgid "WIFI-HARDWARE" +msgstr "WIFI-HARDWARE" + +#. 2 +#: ../cli/src/network-manager.c:38 +msgid "WIFI" +msgstr "WIFI" + +#. 3 +#: ../cli/src/network-manager.c:39 +msgid "WWAN-HARDWARE" +msgstr "WWAN-HARDWARE" + +#. 4 +#: ../cli/src/network-manager.c:40 +msgid "WWAN" +msgstr "WWAN" + +#: ../cli/src/network-manager.c:62 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" +msgstr "" +"प्रयोग: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + +#: ../cli/src/network-manager.c:83 +msgid "asleep" +msgstr "asleep" + +#: ../cli/src/network-manager.c:85 +msgid "connecting" +msgstr "जुड़ रहा है" + +#: ../cli/src/network-manager.c:125 +#, c-format +msgid "Error: 'nm status': %s" +msgstr "त्रुटि: 'nm status': %s" + +#: ../cli/src/network-manager.c:127 +#, c-format +msgid "Error: 'nm status': %s; allowed fields: %s" +msgstr "त्रुटि: 'nm status': %s; अनुमति प्राप्त क्षेत्र: %s" + +#: ../cli/src/network-manager.c:134 +msgid "NetworkManager status" +msgstr "NetworkManager स्थिति" + +#. Print header +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "enabled" +msgstr "सक्षम" + +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "disabled" +msgstr "अक्षम" + +#: ../cli/src/network-manager.c:148 +msgid "running" +msgstr "कार्यशील" + +#: ../cli/src/network-manager.c:148 +msgid "not running" +msgstr "नहीं चल रहा है" + +#: ../cli/src/network-manager.c:201 ../cli/src/network-manager.c:233 +#, c-format +msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s" +msgstr "त्रुटि: '--fields' मान '%s' यहाँ वैध नहीं है; अनुमति प्राप्त क्षेत्र हैं: %s" + +#: ../cli/src/network-manager.c:209 +msgid "WiFi enabled" +msgstr "WiFi सक्षम" + +#: ../cli/src/network-manager.c:220 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "त्रुटि: अवैध 'wifi' पैरामीटर: '%s'." + +#: ../cli/src/network-manager.c:241 +msgid "WWAN enabled" +msgstr "WWAN सक्रिय" + +#: ../cli/src/network-manager.c:252 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "त्रुटि: अवैध 'wwan' पैरामीटर: '%s'." + +#: ../cli/src/network-manager.c:263 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "त्रुटि: 'nm' कमांड '%s' वैध नहीं है." + +#: ../cli/src/nmcli.c:69 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -m[ode] tabular|multiline output mode\n" +" -f[ields] |all|common specify fields to output\n" +" -e[scape] yes|no escape columns separators in " +"values\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"प्रयोग: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -m[ode] tabular|multiline output mode\n" +" -f[ields] |all|common specify fields to output\n" +" -e[scape] yes|no escape columns separators in " +"values\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" + +#: ../cli/src/nmcli.c:113 +#, c-format +msgid "Error: Object '%s' is unknown, try 'nmcli help'." +msgstr "त्रुटि: वस्तु '%s' अज्ञात है, 'nmcli help' आजमाएँ." + +#: ../cli/src/nmcli.c:143 +#, c-format +msgid "Error: Option '--terse' is specified the second time." +msgstr "त्रुटि: विकल्प '--terse' ने दूसरी बार निर्दिष्ट किया है." + +#: ../cli/src/nmcli.c:148 +#, c-format +msgid "Error: Option '--terse' is mutually exclusive with '--pretty'." +msgstr "त्रुटि: विकल्प '--terse' '--pretty' के साथ परस्पर वहिर्वेषी है." + +#: ../cli/src/nmcli.c:156 +#, c-format +msgid "Error: Option '--pretty' is specified the second time." +msgstr "त्रुटि: विकल्प '--pretty' दूसरी बार निर्दिष्ट किया है." + +#: ../cli/src/nmcli.c:161 +#, c-format +msgid "Error: Option '--pretty' is mutually exclusive with '--terse'." +msgstr "त्रुटि: विकल्प '--pretty' परस्पर वहिर्वेशी है '--terse' के साथ." + +#: ../cli/src/nmcli.c:171 ../cli/src/nmcli.c:187 +#, c-format +msgid "Error: missing argument for '%s' option." +msgstr "त्रुटि: '%s' विकल्प के लिए अनुपस्थित तर्क." + +#: ../cli/src/nmcli.c:180 ../cli/src/nmcli.c:196 +#, c-format +msgid "Error: '%s' is not valid argument for '%s' option." +msgstr "त्रुटि: '%s' '%s' विकल्प के लिए वैध तर्क नहीं है." + +#: ../cli/src/nmcli.c:203 +#, c-format +msgid "Error: fields for '%s' options are missing." +msgstr "त्रुटि: '%s' विकल्प के लिए क्षेत्र अनुपस्थित है." + +#: ../cli/src/nmcli.c:209 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "nmcli टूल, संस्करण %s\n" + +#: ../cli/src/nmcli.c:215 +#, c-format +msgid "Error: Option '%s' is unknown, try 'nmcli -help'." +msgstr "त्रुटि: विकल्प '%s' अज्ञात है, 'nmcli -help' आजमाएँ." + +#: ../cli/src/nmcli.c:234 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "संकेत %d पकड़ा, बंद कर रहा है..." + +#: ../cli/src/nmcli.c:259 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "त्रुटि: NetworkManager से कनेक्ट नहीं कर सका." + +#: ../cli/src/nmcli.c:275 +msgid "Success" +msgstr "सफल" + +#: ../cli/src/settings.c:407 +#, c-format +msgid "%d (hex-ascii-key)" +msgstr "%d (hex-ascii-key)" + +#: ../cli/src/settings.c:409 +#, c-format +msgid "%d (104/128-bit passphrase)" +msgstr "%d (104/128-बिट पासफ्रेज)" + +#: ../cli/src/settings.c:412 +#, c-format +msgid "%d (unknown)" +msgstr "%d (अज्ञात)" + +#: ../cli/src/settings.c:438 +msgid "0 (unknown)" +msgstr "0 (अज्ञात)" + +#: ../cli/src/settings.c:444 +msgid "any, " +msgstr "कोई, " + +#: ../cli/src/settings.c:446 +msgid "900 MHz, " +msgstr "900 MHz, " + +#: ../cli/src/settings.c:448 +msgid "1800 MHz, " +msgstr "1800 MHz, " + +#: ../cli/src/settings.c:450 +msgid "1900 MHz, " +msgstr "1900 MHz, " + +#: ../cli/src/settings.c:452 +msgid "850 MHz, " +msgstr "850 MHz, " + +#: ../cli/src/settings.c:454 +msgid "WCDMA 3GPP UMTS 2100 MHz, " +msgstr "WCDMA 3GPP UMTS 2100 MHz, " + +#: ../cli/src/settings.c:456 +msgid "WCDMA 3GPP UMTS 1800 MHz, " +msgstr "WCDMA 3GPP UMTS 1800 MHz, " + +#: ../cli/src/settings.c:458 +msgid "WCDMA 3GPP UMTS 1700/2100 MHz, " +msgstr "WCDMA 3GPP UMTS 1700/2100 MHz, " + +#: ../cli/src/settings.c:460 +msgid "WCDMA 3GPP UMTS 800 MHz, " +msgstr "WCDMA 3GPP UMTS 800 MHz, " + +#: ../cli/src/settings.c:462 +msgid "WCDMA 3GPP UMTS 850 MHz, " +msgstr "WCDMA 3GPP UMTS 850 MHz, " + +#: ../cli/src/settings.c:464 +msgid "WCDMA 3GPP UMTS 900 MHz, " +msgstr "WCDMA 3GPP UMTS 900 MHz, " + +#: ../cli/src/settings.c:466 +msgid "WCDMA 3GPP UMTS 1700 MHz, " +msgstr "WCDMA 3GPP UMTS 1700 MHz, " + +#: ../cli/src/settings.c:546 ../cli/src/settings.c:708 +msgid "auto" +msgstr "auto" + +#: ../cli/src/settings.c:704 ../cli/src/settings.c:707 ../cli/src/utils.c:172 +msgid "not set" +msgstr "सेट नहीं" + +#: ../cli/src/utils.c:124 +#, c-format +msgid "field '%s' has to be alone" +msgstr "क्षेत्र '%s' को अलग रहना है" + +#: ../cli/src/utils.c:127 +#, c-format +msgid "invalid field '%s'" +msgstr "अवैध क्षेत्र '%s'" + +#: ../cli/src/utils.c:146 +#, c-format +msgid "Option '--terse' requires specifying '--fields'" +msgstr "विकल्प '--terse' के लिए '--fields' निर्दिष्ट करना है" + +#: ../cli/src/utils.c:150 +#, c-format +msgid "Option '--terse' requires specific '--fields' option values , not '%s'" +msgstr "विकल्प '--terse' के लिए '--fields' विकल्प मान की जरूरत है, न कि '%s'" + +#: ../libnm-util/crypto.c:120 +#, c-format +msgid "PEM key file had no end tag '%s'." +msgstr "PEM कुंजी फाइल के पास कोई अंत टैग '%s' नहीं है." + +#: ../libnm-util/crypto.c:130 +#, c-format +msgid "Doesn't look like a PEM private key file." +msgstr "एक PEM निजी कुंजी फाइल की तरह का नहीं दिखता है." + +#: ../libnm-util/crypto.c:138 +#, c-format +msgid "Not enough memory to store PEM file data." +msgstr "PEM फाइल डेटा जमा करने के लिए पर्याप्त स्मृति नहीं." + +#: ../libnm-util/crypto.c:154 +#, c-format +msgid "Malformed PEM file: Proc-Type was not first tag." +msgstr "विरूपित PEM फाइल: Proc-Type पहला टैग नहीं था." + +#: ../libnm-util/crypto.c:162 +#, c-format +msgid "Malformed PEM file: unknown Proc-Type tag '%s'." +msgstr "विरूपित PEM फाइल: अज्ञात Proc-Type टैग '%s'." + +#: ../libnm-util/crypto.c:172 +#, c-format +msgid "Malformed PEM file: DEK-Info was not the second tag." +msgstr "विरूपित PEM फाइल: DEK-Info दूसरा टैग नहीं था." + +#: ../libnm-util/crypto.c:183 +#, c-format +msgid "Malformed PEM file: no IV found in DEK-Info tag." +msgstr "विरूपित PEM फाइल: कोई IV DEK-Info टैग में नहीं मिला." + +#: ../libnm-util/crypto.c:190 +#, c-format +msgid "Malformed PEM file: invalid format of IV in DEK-Info tag." +msgstr "विरूपित PEM फाइल: IV का अवैध प्रारूप DEK-Info टैग में." + +#: ../libnm-util/crypto.c:203 +#, c-format +msgid "Malformed PEM file: unknown private key cipher '%s'." +msgstr "विरूपित PEM फाइल: अज्ञात निजी कुंजी साइफर '%s'." + +#: ../libnm-util/crypto.c:222 +#, c-format +msgid "Could not decode private key." +msgstr "निजी कुंजी को विगोपित नहीं कर सका." + +#: ../libnm-util/crypto.c:267 +#, c-format +msgid "PEM certificate '%s' had no end tag '%s'." +msgstr "PEM प्रमाणपत्र '%s' के पास कोई अंत टैग '%s' नहीं है." + +#: ../libnm-util/crypto.c:277 +#, c-format +msgid "Failed to decode certificate." +msgstr "प्रमाणपत्र विगोपित करने में विफल." + +#: ../libnm-util/crypto.c:286 +#, c-format +msgid "Not enough memory to store certificate data." +msgstr "प्रमाणपत्र आँकड़ा जमा करने के लिए पर्याप्त स्मृति नहीं." + +#: ../libnm-util/crypto.c:294 +#, c-format +msgid "Not enough memory to store file data." +msgstr "फाइल आँकड़ा जमा करने के लिए पर्याप्त स्मृति नहीं." + +#: ../libnm-util/crypto.c:324 +#, c-format +msgid "IV must be an even number of bytes in length." +msgstr "IV की लंबाई में बाइट संख्या सम संख्या होनी चाहिए." + +#: ../libnm-util/crypto.c:333 +#, c-format +msgid "Not enough memory to store the IV." +msgstr "IV जमा करने के लिए पर्याप्त स्मृति नहीं." + +#: ../libnm-util/crypto.c:344 +#, c-format +msgid "IV contains non-hexadecimal digits." +msgstr "IV गैर हेक्साडेसीमेल अंक समाहित करता है." + +#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:336 +#, c-format +msgid "Private key cipher '%s' was unknown." +msgstr "निजी कुंजी साइफर '%s' अज्ञात था." + +#: ../libnm-util/crypto.c:391 +#, c-format +msgid "Not enough memory to decrypt private key." +msgstr "निजी कुंजी गोपित करने के लिए पर्याप्त स्मृति नहीं." + +#: ../libnm-util/crypto.c:511 +#, c-format +msgid "Unable to determine private key type." +msgstr "निजी कुंजी प्रकार निर्धारित करने में असमर्थ." + +#: ../libnm-util/crypto.c:530 +#, c-format +msgid "Not enough memory to store decrypted private key." +msgstr "विगोपित निजी कुंजी जमा करने के लिए पर्याप्त स्मृति नहीं." + +#: ../libnm-util/crypto_gnutls.c:49 +msgid "Failed to initialize the crypto engine." +msgstr "क्रिप्टो ईंजन आरंभीकृत करने में विफल." + +#: ../libnm-util/crypto_gnutls.c:93 +#, c-format +msgid "Failed to initialize the MD5 engine: %s / %s." +msgstr "MD5 ईंजन आरंभीकृत करने में विफल: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "अवैध IV लंबाई (कम से कम %zd होना चाहिए)." + +#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188 +#, c-format +msgid "Not enough memory for decrypted key buffer." +msgstr "विगोपित कुंजी बफर के लिए पर्याप्त स्मृति नहीं." + +#: ../libnm-util/crypto_gnutls.c:173 +#, c-format +msgid "Failed to initialize the decryption cipher context: %s / %s." +msgstr "विगोपन साइफर संदर्भ को आरंभीकृत करने में विफल: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:182 +#, c-format +msgid "Failed to set symmetric key for decryption: %s / %s." +msgstr "गोपन के लिए सममितीय कुंजी सेट करने में विफल: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:191 +#, c-format +msgid "Failed to set IV for decryption: %s / %s." +msgstr "IV को गोपन के लिए सेट करने में विफल: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:200 +#, c-format +msgid "Failed to decrypt the private key: %s / %s." +msgstr "निजी कुंजी गोपित करने में विफल: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 +#, c-format +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "निजी कुंजी गोपित करने में विफल: अप्रत्याशित पैडिंग लंबाई." + +#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 +#, c-format +msgid "Failed to decrypt the private key." +msgstr "निजी कुंजी गोपित करने में विफल." + +#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "गोपन के लिए स्मृति आबंटित नहीं कर सका." + +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "गोपन साइफर संदर्भ को आरंभीकृत करने में विफल: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "गोपन के लिए सममितीय कुंजी सेट करने में विफल: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +msgid "Failed to set IV for encryption: %s / %s." +msgstr "IV को गोपन के लिए सेट करने में विफल: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +msgid "Failed to encrypt the data: %s / %s." +msgstr "आँकड़ा गोपित करने में विफल: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:362 +#, c-format +msgid "Error initializing certificate data: %s" +msgstr "प्रमाणपत्र आँकड़ा आरंभीकृत करने में विफल: %s" + +#: ../libnm-util/crypto_gnutls.c:384 +#, c-format +msgid "Couldn't decode certificate: %s" +msgstr "प्रमाणपत्र विगोपित नहीं कर सका: %s" + +#: ../libnm-util/crypto_gnutls.c:408 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %s" +msgstr "PKCS#12 विगोपक आरंभीकृत नहीं कर सका: %s" + +#: ../libnm-util/crypto_gnutls.c:421 +#, c-format +msgid "Couldn't decode PKCS#12 file: %s" +msgstr "PKCS#12 फाइल विगोपित नहीं कर सका: %s" + +#: ../libnm-util/crypto_gnutls.c:433 +#, c-format +msgid "Couldn't verify PKCS#12 file: %s" +msgstr "PKCS#12 फाइल जाँच नहीं सका: %s" + +#: ../libnm-util/crypto_nss.c:56 +#, c-format +msgid "Failed to initialize the crypto engine: %d." +msgstr "क्रिप्टो ईंजन आरंभीकृत करने में विफल: %d." + +#: ../libnm-util/crypto_nss.c:111 +#, c-format +msgid "Failed to initialize the MD5 context: %d." +msgstr "MD5 संदर्भ आरंभीकृत करने में विफल: %d." + +#: ../libnm-util/crypto_nss.c:179 +#, c-format +msgid "Invalid IV length (must be at least %d)." +msgstr "अवैध IV लंबाई (जरूर कम से कम %d होना चाहिए)." + +#: ../libnm-util/crypto_nss.c:196 +#, c-format +msgid "Failed to initialize the decryption cipher slot." +msgstr "विगोपन साइफर स्लॉट को आरंभीकृत करने में विफल." + +#: ../libnm-util/crypto_nss.c:206 +#, c-format +msgid "Failed to set symmetric key for decryption." +msgstr "गोपन के लिए सममितीय कुंजी सेट करने में विफल." + +#: ../libnm-util/crypto_nss.c:216 +#, c-format +msgid "Failed to set IV for decryption." +msgstr "IV को गोपन के लिए सेट करने में विफल." + +#: ../libnm-util/crypto_nss.c:224 +#, c-format +msgid "Failed to initialize the decryption context." +msgstr "गोपन संदर्भ आरंभीकृत करने में विफल." + +#: ../libnm-util/crypto_nss.c:237 +#, c-format +msgid "Failed to decrypt the private key: %d." +msgstr "निजी कुंजी गोपित करने में विफल: %d." + +#: ../libnm-util/crypto_nss.c:245 +#, c-format +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "निजी कुंजी गोपित करने में विफल: विगोपित आँकड़ा काफी बड़ा है." + +#: ../libnm-util/crypto_nss.c:256 +#, c-format +msgid "Failed to finalize decryption of the private key: %d." +msgstr "निजी कुंजी के विगोपन को अंतिम रूप देने में विफल: %d." + +#: ../libnm-util/crypto_nss.c:364 +#, c-format +msgid "Failed to initialize the encryption cipher slot." +msgstr "गोपन साइफर स्लाट आरंभीकृत करने में विफल." + +#: ../libnm-util/crypto_nss.c:372 +#, c-format +msgid "Failed to set symmetric key for encryption." +msgstr "गोपन के लिए सममितीय कुंजी सेट करने में विफल." + +#: ../libnm-util/crypto_nss.c:380 +#, c-format +msgid "Failed to set IV for encryption." +msgstr "IV को गोपन के लिए सेट करने में विफल." + +#: ../libnm-util/crypto_nss.c:388 +#, c-format +msgid "Failed to initialize the encryption context." +msgstr "गोपन संदर्भ आरंभीकृत करने में विफल." + +#: ../libnm-util/crypto_nss.c:396 +#, c-format +msgid "Failed to encrypt: %d." +msgstr "गोपित करने में विफल: %d." + +#: ../libnm-util/crypto_nss.c:404 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "गोपन के बाद आँकड़ा की अप्रत्याशित मात्रा." + +#: ../libnm-util/crypto_nss.c:447 +#, c-format +msgid "Couldn't decode certificate: %d" +msgstr "प्रमाणपत्र डिकोड नहीं कर सका: %d" + +#: ../libnm-util/crypto_nss.c:482 +#, c-format +msgid "Couldn't convert password to UCS2: %d" +msgstr "कूटशब्द को UCS2 में बदल नहीं सका: %d" + +#: ../libnm-util/crypto_nss.c:510 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %d" +msgstr "PKCS#12 डिकोडर को आरंभीकृत नहीं कर सका: %d" + +#: ../libnm-util/crypto_nss.c:519 +#, c-format +msgid "Couldn't decode PKCS#12 file: %d" +msgstr "PKCS#12 फाइल विगोपित नहीं कर सका: %d" + +#: ../libnm-util/crypto_nss.c:528 +#, c-format +msgid "Couldn't verify PKCS#12 file: %d" +msgstr "PKCS#12 फाइल जाँच नहीं सका: %d" + +#: ../libnm-util/crypto_nss.c:557 +msgid "Could not generate random data." +msgstr "क्रमहीन आँकड़ा बना नहीं सका." + +#: ../libnm-util/nm-utils.c:1925 +#, c-format +msgid "Not enough memory to make encryption key." +msgstr "गोपन कुंजी बनाने के लिए पर्याप्त मात्रा में स्मृति नहीं." + +#: ../libnm-util/nm-utils.c:2035 +msgid "Could not allocate memory for PEM file creation." +msgstr "PEM फाइल निर्माण के लिए स्मृति नहीं आबंटित कर सका." + +#: ../libnm-util/nm-utils.c:2047 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "IV से PEM फाइल में लिखने के लिए स्मृति नहीं आबंटित कर सका." + +#: ../libnm-util/nm-utils.c:2059 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "गोपित कुंजी को PEM फाइल में लिखने के लिए स्मृति नहीं आबंटित कर सका." + +#: ../libnm-util/nm-utils.c:2078 +#, c-format +msgid "Could not allocate memory for PEM file data." +msgstr "PEM फाइल आँकड़ा के लिए स्मृति नहीं आबंटित कर सका." + +#: ../src/nm-netlink-monitor.c:100 ../src/nm-netlink-monitor.c:231 +#: ../src/nm-netlink-monitor.c:653 +#, c-format +msgid "error processing netlink message: %s" +msgstr "netlink संदेश की प्रक्रिया में त्रुटि: %s" + +#: ../src/nm-netlink-monitor.c:214 +msgid "error occurred while waiting for data on socket" +msgstr "सॉकेट पर आँकड़ा के लिए प्रतीक्षा करने के दौरान त्रुटि" + +#: ../src/nm-netlink-monitor.c:254 +#, c-format +msgid "unable to connect to netlink for monitoring link status: %s" +msgstr "नेटलिंक को मॉनिटरिंग लिंक स्थिति के लिए कनेक्ट करने में असमर्थ: %s" + +#: ../src/nm-netlink-monitor.c:265 +#, c-format +msgid "unable to enable netlink handle credential passing: %s" +msgstr "नेटलिंक नियंत्रण श्रेय पासिंग सक्रिय करने में असमर्थ: %s" + +#: ../src/nm-netlink-monitor.c:291 ../src/nm-netlink-monitor.c:353 +#, c-format +msgid "unable to allocate netlink handle for monitoring link status: %s" +msgstr "लिंक स्थिति मॉनिटर करने के लिए नेटलिंक नियंत्रण का आबंटित नहीं कर सका: %s" + +#: ../src/nm-netlink-monitor.c:376 +#, c-format +msgid "unable to allocate netlink link cache for monitoring link status: %s" +msgstr "नेटलिंक कैश को मॉनिटरिंग लिंक स्थिति के लिए आबंटित करने में असमर्थ: %s" + +#: ../src/nm-netlink-monitor.c:502 +#, c-format +msgid "unable to join netlink group: %s" +msgstr "नेटलिंक समूह में शामिल होने में असमर्थ: %s" + +#: ../src/nm-netlink-monitor.c:629 ../src/nm-netlink-monitor.c:642 +#, c-format +msgid "error updating link cache: %s" +msgstr "लिंक कैश अद्यतन करने में त्रुटि: %s" + +#: ../src/main.c:502 +#, c-format +msgid "Invalid option. Please use --help to see a list of valid options.\n" +msgstr "अवैध विकल्प. कृपया --help का उपयोग वैध विकल्प देने के लिए करें.\n" + +#: ../src/main.c:562 +#, c-format +msgid "%s. Please use --help to see a list of valid options.\n" +msgstr "%s. कृपया --help का उपयोग वैध विकल्प देने के लिए करें.\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:325 +msgid "# Created by NetworkManager\n" +msgstr "# संजाल प्रबंधक द्वारा निर्मित\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:341 +#, c-format +msgid "" +"# Merged from %s\n" +"\n" +msgstr "" +"#%s से मिलाया गया\n" +"\n" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:279 +msgid "no usable DHCP client could be found." +msgstr "कोई प्रयोज्य DHCP क्लाइंट नहीं मिला." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:288 +msgid "'dhclient' could be found." +msgstr "'dhclient' नहीं मिल सका." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:298 +msgid "'dhcpcd' could be found." +msgstr "'dhcpcd' नहीं मिल सका." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:306 +#, c-format +msgid "unsupported DHCP client '%s'" +msgstr "असमर्थित DHCP क्लाइंट '%s'" + +#: ../src/logging/nm-logging.c:146 +#, c-format +msgid "Unknown log level '%s'" +msgstr "अज्ञात लॉग स्तर '%s'" + +#: ../src/logging/nm-logging.c:171 +#, c-format +msgid "Unknown log domain '%s'" +msgstr "अज्ञात लॉग डोमेन '%s'" + +#: ../src/named-manager/nm-named-manager.c:343 +msgid "NOTE: the libc resolver may not support more than 3 nameservers." +msgstr "नोट: libc समाधानकर्ता 3 नेमसर्वर से अधिक का समर्थन नहीं कर सकता है." + +#: ../src/named-manager/nm-named-manager.c:345 +msgid "The nameservers listed below may not be recognized." +msgstr "नीचे सूची में दिया गया नेमसर्वर पहचाना नहीं जा सकता है." + +#: ../src/system-settings/nm-default-wired-connection.c:157 +#, c-format +msgid "Auto %s" +msgstr "स्वतः %s" + +#: ../system-settings/plugins/ifcfg-rh/reader.c:3256 +msgid "System" +msgstr "तंत्र" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "किसी संरक्षित WiFi संजाल के द्वारा कनेक्शन साझा" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "किसी खुले WiFi संजाल के द्वारा कनेक्शन साझा" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "स्थिर सिस्टम होस्टनेम को सुधारें" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 +msgid "Modify system connections" +msgstr "सिस्टम कनेक्शन सुधारें" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 +msgid "System policy prevents modification of system settings" +msgstr "सिस्टम नीति सिस्टम सेटिंग के रूपांतरण को रोकता है." + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +msgid "System policy prevents modification of the persistent system hostname" +msgstr "सिस्टम नीति स्थिर सिस्टम होस्टनेम के रूपांतरण को रोकता है." + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "किसी संरक्षित WiFi संजाल के द्वारा साझा कनेक्शन को सिस्टम नीति रोकता है" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "किसी खुले WiFi संजाल के द्वारा साझा कनेक्शन को सिस्टम नीति रोकता है" + diff --git a/po/hu.po b/po/hu.po index 7bb2ed0240..742cdb15b3 100644 --- a/po/hu.po +++ b/po/hu.po @@ -1,76 +1,418 @@ # Hungarian translation of NetworkManager -# Gabor Kelemen , 2005, 2006, 2007, 2008. # This file is distributed under the same license as the NetworkManager package. # Copyright (C) 2005, Free Software Foundation. Inc. +# +# Gabor Kelemen , 2005, 2006, 2007, 2008, 2009, 2010. msgid "" msgstr "" -"Project-Id-Version: NetworkManager.HEAD.hu\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-09-05 18:57+0000\n" -"PO-Revision-Date: 2008-09-25 21:33+0200\n" -"Last-Translator: Gabor Kelemen \n" -"Language-Team: Hungarian \n" +"Project-Id-Version: NetworkManager master\n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager&component=general\n" +"POT-Creation-Date: 2009-09-29 03:25+0000\n" +"PO-Revision-Date: 2010-01-03 14:57+0100\n" +"Last-Translator: Gabor Kelemen \n" +"Language-Team: Hungarian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: KBabel 1.11.4\n" -#: ../src/nm-netlink-monitor.c:193 ../src/nm-netlink-monitor.c:474 +#: ../libnm-util/crypto.c:120 +#, c-format +msgid "PEM key file had no end tag '%s'." +msgstr "A PEM kulcsfájl nem rendelkezik „%s” zárócímkével." + +#: ../libnm-util/crypto.c:130 +#, c-format +msgid "Doesn't look like a PEM private key file." +msgstr "Nem tűnik PEM személyes kulcs fájlnak." + +#: ../libnm-util/crypto.c:138 +#, c-format +msgid "Not enough memory to store PEM file data." +msgstr "Nincs elég memória a PEM fájl adatainak tárolásához." + +#: ../libnm-util/crypto.c:154 +#, c-format +msgid "Malformed PEM file: Proc-Type was not first tag." +msgstr "Rosszul formázott PEM fájl: a Proc-Type nem az első címke." + +#: ../libnm-util/crypto.c:162 +#, c-format +msgid "Malformed PEM file: unknown Proc-Type tag '%s'." +msgstr "Rosszul formázott PEM fájl: ismeretlen Proc-Type címke („%s”)." + +#: ../libnm-util/crypto.c:172 +#, c-format +msgid "Malformed PEM file: DEK-Info was not the second tag." +msgstr "Rosszul formázott PEM fájl: A DEK-Info nem a második címke." + +#: ../libnm-util/crypto.c:183 +#, c-format +msgid "Malformed PEM file: no IV found in DEK-Info tag." +msgstr "Rosszul formázott PEM fájl: nem található IV a DEK-Info címkében." + +#: ../libnm-util/crypto.c:190 +#, c-format +msgid "Malformed PEM file: invalid format of IV in DEK-Info tag." +msgstr "Rosszul formázott PEM fájl: az IV formátuma érvénytelen a DEK-Info címkében." + +#: ../libnm-util/crypto.c:203 +#, c-format +msgid "Malformed PEM file: unknown private key cipher '%s'." +msgstr "Rosszul formázott PEM fájl: ismeretlen személyes kulcs titkosító: „%s”." + +#: ../libnm-util/crypto.c:222 +#, c-format +msgid "Could not decode private key." +msgstr "A személyes kulcs nem fejthető vissza." + +#: ../libnm-util/crypto.c:267 +#, c-format +msgid "PEM certificate '%s' had no end tag '%s'." +msgstr "A(z) „%s” PEM tanúsítvány nem tartalmaz záró „%s” címkét." + +#: ../libnm-util/crypto.c:277 +#, c-format +msgid "Failed to decode certificate." +msgstr "A tanúsítvány visszafejtése meghiúsult." + +#: ../libnm-util/crypto.c:286 +#, c-format +msgid "Not enough memory to store certificate data." +msgstr "Nincs elég memória a tanúsítvány adatainak tárolásához." + +#: ../libnm-util/crypto.c:294 +#, c-format +msgid "Not enough memory to store file data." +msgstr "Nincs elég memória a fájl adatainak tárolásához." + +#: ../libnm-util/crypto.c:324 +#, c-format +msgid "IV must be an even number of bytes in length." +msgstr "Az IV hosszának páros számú bájtnak kell lennie." + +#: ../libnm-util/crypto.c:333 +#, c-format +msgid "Not enough memory to store the IV." +msgstr "Nincs elég memória az IV tárolásához." + +#: ../libnm-util/crypto.c:344 +#, c-format +msgid "IV contains non-hexadecimal digits." +msgstr "Az IV nem hexadecimális számjegyeket tartalmaz." + +#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:335 +#, c-format +msgid "Private key cipher '%s' was unknown." +msgstr "A(z) „%s” személyeskulcs-titkosító ismeretlen." + +#: ../libnm-util/crypto.c:391 +#, c-format +msgid "Not enough memory to decrypt private key." +msgstr "Nincs elég memória a személyes kulcs visszafejtéséhez." + +#: ../libnm-util/crypto.c:511 +#, c-format +msgid "Unable to determine private key type." +msgstr "A személyes kulcs típusa nem határozható meg." + +#: ../libnm-util/crypto.c:530 +#, c-format +msgid "Not enough memory to store decrypted private key." +msgstr "Nincs elég memória a visszafejtett személyes kulcs tárolásához." + +#: ../libnm-util/crypto_gnutls.c:49 +msgid "Failed to initialize the crypto engine." +msgstr "A titkosító alrendszer előkészítése meghiúsult." + +#: ../libnm-util/crypto_gnutls.c:93 +#, c-format +msgid "Failed to initialize the MD5 engine: %s / %s." +msgstr "Az MD5 alrendszer előkészítése meghiúsult: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "Érvénytelen IV hossz (legalább %zd hosszúnak kell lennie)." + +#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188 +#, c-format +msgid "Not enough memory for decrypted key buffer." +msgstr "Nincs elég memória a visszafejtett kulcspufferhez." + +#: ../libnm-util/crypto_gnutls.c:173 +#, c-format +msgid "Failed to initialize the decryption cipher context: %s / %s." +msgstr "A visszafejtési titkosító kontextusának előkészítése meghiúsult: %s /%s." + +#: ../libnm-util/crypto_gnutls.c:182 +#, c-format +msgid "Failed to set symmetric key for decryption: %s / %s." +msgstr "A szimmetrikus kulcs beállítása meghiúsult a visszafejtéshez: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:191 +#, c-format +msgid "Failed to set IV for decryption: %s / %s." +msgstr "Az IV beállítása meghiúsult a visszafejtéshez: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:200 +#, c-format +msgid "Failed to decrypt the private key: %s / %s." +msgstr "A személyes kulcs visszafejtése meghiúsult: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:266 +#, c-format +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "A személyes kulcs visszafejtése meghiúsult: váratlan kitöltéshossz." + +#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:277 +#, c-format +msgid "Failed to decrypt the private key." +msgstr "A személyes kulcs visszafejtése meghiúsult." + +#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:355 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "Nem sikerült memóriát foglalni a titkosításhoz." + +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "A titkosító kontextusának előkészítése meghiúsult: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "A szimmetrikus kulcs beállítása meghiúsult a titkosításhoz: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +msgid "Failed to set IV for encryption: %s / %s." +msgstr "Az IV beállítása meghiúsult a titkosításhoz: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +msgid "Failed to encrypt the data: %s / %s." +msgstr "Az adatot nem sikerült titkosítani: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:362 +#, c-format +msgid "Error initializing certificate data: %s" +msgstr "Hiba a tanúsítvány adatainak előkészítésekor: %s" + +#: ../libnm-util/crypto_gnutls.c:384 +#, c-format +msgid "Couldn't decode certificate: %s" +msgstr "A tanúsítvány nem fejthető vissza: %s" + +#: ../libnm-util/crypto_gnutls.c:408 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %s" +msgstr "A PKCS#12 dekódoló nem készíthető elő: %s" + +#: ../libnm-util/crypto_gnutls.c:421 +#, c-format +msgid "Couldn't decode PKCS#12 file: %s" +msgstr "A PKCS#12 fájl nem fejthető vissza: %s" + +#: ../libnm-util/crypto_gnutls.c:433 +#, c-format +msgid "Couldn't verify PKCS#12 file: %s" +msgstr "A PKCS#12 fájl nem ellenőrizhető: %s" + +#: ../libnm-util/crypto_nss.c:57 +#, c-format +msgid "Failed to initialize the crypto engine: %d." +msgstr "A titkosító alrendszer előkészítése meghiúsult: %d." + +#: ../libnm-util/crypto_nss.c:111 +#, c-format +msgid "Failed to initialize the MD5 context: %d." +msgstr "Az MD5 kontextus előkészítése meghiúsult: %d." + +#: ../libnm-util/crypto_nss.c:179 +#, c-format +msgid "Invalid IV length (must be at least %d)." +msgstr "Érvénytelen IV hossz (legalább %d hosszúnak kell lennie)." + +#: ../libnm-util/crypto_nss.c:196 +#, c-format +msgid "Failed to initialize the decryption cipher slot." +msgstr "A visszafejtési titkosítóhely előkészítése meghiúsult." + +#: ../libnm-util/crypto_nss.c:206 +#, c-format +msgid "Failed to set symmetric key for decryption." +msgstr "A szimmetrikus kulcs nem állítható be a visszafejtéshez." + +#: ../libnm-util/crypto_nss.c:216 +#, c-format +msgid "Failed to set IV for decryption." +msgstr "Az IV nem állítható be a visszafejtéshez." + +#: ../libnm-util/crypto_nss.c:224 +#, c-format +msgid "Failed to initialize the decryption context." +msgstr "A visszafejtési kontextus előkészítése meghiúsult." + +#: ../libnm-util/crypto_nss.c:237 +#, c-format +msgid "Failed to decrypt the private key: %d." +msgstr "A személyes kulcs visszafejtése meghiúsult: %d." + +#: ../libnm-util/crypto_nss.c:245 +#, c-format +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "A személyes kulcs visszafejtése meghiúsult: a visszafejtett adatok túl nagyok." + +#: ../libnm-util/crypto_nss.c:256 +#, c-format +msgid "Failed to finalize decryption of the private key: %d." +msgstr "A személyes kulcs visszafejtésének befejezése meghiúsult: %d." + +#: ../libnm-util/crypto_nss.c:363 +#, c-format +msgid "Failed to initialize the encryption cipher slot." +msgstr "A titkosítóhely előkészítése meghiúsult." + +#: ../libnm-util/crypto_nss.c:371 +#, c-format +msgid "Failed to set symmetric key for encryption." +msgstr "A szimmetrikus kulcs nem állítható be a titkosításhoz." + +#: ../libnm-util/crypto_nss.c:379 +#, c-format +msgid "Failed to set IV for encryption." +msgstr "Az IV nem állítható be a titkosításhoz." + +#: ../libnm-util/crypto_nss.c:387 +#, c-format +msgid "Failed to initialize the encryption context." +msgstr "A titkosítási kontextus előkészítése meghiúsult." + +#: ../libnm-util/crypto_nss.c:395 +#, c-format +msgid "Failed to encrypt: %d." +msgstr "A titkosítás meghiúsult: %d." + +#: ../libnm-util/crypto_nss.c:403 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "Váratlan mennyiségű adat a titkosítás után." + +#: ../libnm-util/crypto_nss.c:446 +#, c-format +msgid "Couldn't decode certificate: %d" +msgstr "A tanúsítvány nem fejthető vissza: %d" + +#: ../libnm-util/crypto_nss.c:481 +#, c-format +msgid "Couldn't convert password to UCS2: %d" +msgstr "A jelszó nem alakítható UCS2 formátumra: %d" + +#: ../libnm-util/crypto_nss.c:509 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %d" +msgstr "A PKCS#12 dekódoló nem készíthető elő: %d" + +#: ../libnm-util/crypto_nss.c:518 +#, c-format +msgid "Couldn't decode PKCS#12 file: %d" +msgstr "A PKCS#12 fájl nem fejthető vissza: %d" + +#: ../libnm-util/crypto_nss.c:527 +#, c-format +msgid "Couldn't verify PKCS#12 file: %d" +msgstr "A PKCS#12 fájl nem ellenőrizhető: %d" + +#: ../libnm-util/crypto_nss.c:556 +msgid "Could not generate random data." +msgstr "Nem sikerült a véletlen adatok előállítása." + +#: ../libnm-util/nm-utils.c:1522 +#, c-format +msgid "Not enough memory to make encryption key." +msgstr "Nincs elég memória titkosítási kulcs készítéséhez." + +#: ../libnm-util/nm-utils.c:1633 +msgid "Could not allocate memory for PEM file creation." +msgstr "Nem sikerült memóriát foglalni PEM fájl készítéséhez." + +#: ../libnm-util/nm-utils.c:1645 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "Nem sikerült memóriát foglalni az IV írásához PEM fájlba." + +#: ../libnm-util/nm-utils.c:1657 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "Nem sikerült memóriát foglalni a titkosított kulcs PEM fájlba írásához." + +#: ../libnm-util/nm-utils.c:1676 +#, c-format +msgid "Could not allocate memory for PEM file data." +msgstr "Nem sikerült memóriát foglalni a PEM fájl adatainak." + +#: ../src/nm-netlink-monitor.c:194 ../src/nm-netlink-monitor.c:464 +#: ../src/nm-netlink-monitor.c:569 +#: ../src/ip6-manager/nm-netlink-listener.c:352 #, c-format msgid "error processing netlink message: %s" msgstr "hiba a netlink üzenet feldolgozásakor: %s" -#: ../src/nm-netlink-monitor.c:250 +#: ../src/nm-netlink-monitor.c:260 #, c-format msgid "unable to allocate netlink handle for monitoring link status: %s" msgstr "" "nem lehet netlink kezelőt lefoglalni a kapcsolat állapotának megfigyelése " "érdekében: %s" -#: ../src/nm-netlink-monitor.c:260 +#: ../src/nm-netlink-monitor.c:270 #, c-format msgid "unable to connect to netlink for monitoring link status: %s" msgstr "" "nem lehet kapcsolódni a netlinkhez a kapcsolat állapotának megfigyelése " "érdekében: %s" -#: ../src/nm-netlink-monitor.c:268 +#: ../src/nm-netlink-monitor.c:278 #, c-format msgid "unable to join netlink group for monitoring link status: %s" msgstr "" "nem lehet csatlakozni a netlink csoporthoz a kapcsolat állapotának " "megfigyelése érdekében: %s" -#: ../src/nm-netlink-monitor.c:276 +#: ../src/nm-netlink-monitor.c:286 #, c-format msgid "unable to allocate netlink link cache for monitoring link status: %s" msgstr "" "nem lehet netlink kapcsolat-gyorsítótárat lefoglalni a kapcsolat állapotának " "megfigyelése érdekében: %s" -#: ../src/nm-netlink-monitor.c:439 +#: ../src/nm-netlink-monitor.c:494 +#: ../src/ip6-manager/nm-netlink-listener.c:382 +msgid "error occurred while waiting for data on socket" +msgstr "hiba lépett fel adatokra várakozás közben a foglalaton" + +#: ../src/nm-netlink-monitor.c:558 #, c-format msgid "error updating link cache: %s" msgstr "hiba a kapcsolat gyorsítótárának frissítésekor: %s" -#: ../src/nm-netlink-monitor.c:497 -#, c-format -msgid "error occurred while waiting for data on socket" -msgstr "hiba lépett fel adatokra várakozás közben a foglalaton" - -#: ../src/NetworkManager.c:250 +#: ../src/NetworkManager.c:330 #, c-format msgid "Invalid option. Please use --help to see a list of valid options.\n" msgstr "" "Érvénytelen kapcsoló. Az érvényes kapcsolók listájáért használja a --help " "kapcsolót.\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:87 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:304 msgid "# Created by NetworkManager\n" msgstr "# Készítette a NetworkManager\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:93 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:310 #, c-format msgid "" "# Merged from %s\n" @@ -79,201 +421,73 @@ msgstr "" "# Összefésülve ebből: %s\n" "\n" -#: ../src/named-manager/nm-named-manager.c:240 +#: ../src/ip6-manager/nm-netlink-listener.c:200 +#, c-format +msgid "unable to allocate netlink handle: %s" +msgstr "nem lehet netlink kezelőt lefoglalni: %s" + +#: ../src/ip6-manager/nm-netlink-listener.c:210 +#, c-format +msgid "unable to connect to netlink: %s" +msgstr "nem lehet kapcsolódni a netlinkhez: %s" + +#: ../src/ip6-manager/nm-netlink-listener.c:307 +#, c-format +msgid "unable to join netlink group: %s" +msgstr "nem lehet csatlakozni a netlink csoporthoz: %s" + +#: ../src/named-manager/nm-named-manager.c:315 msgid "NOTE: the libc resolver may not support more than 3 nameservers." msgstr "MEGJEGYZÉS: a libc feloldó nem támogat háromnál több névkiszolgálót." -#: ../src/named-manager/nm-named-manager.c:242 +#: ../src/named-manager/nm-named-manager.c:317 msgid "The nameservers listed below may not be recognized." msgstr "Az alább felsorolt névkiszolgálók lehet, hogy nem kerülnek felismerésre." -#: ../system-settings/src/main.c:366 +#: ../src/system-settings/nm-default-wired-connection.c:194 #, c-format msgid "Auto %s" msgstr "Automatikus %s" -#: ../libnm-util/crypto.c:125 -#, c-format -msgid "PEM key file had no end tag '%s'." -msgstr "A PEM kulcsfájl nem rendelkezik „%s” zárócímkével." +#: ../system-settings/plugins/ifcfg-rh/reader.c:2406 +msgid "System" +msgstr "Rendszer" -#: ../libnm-util/crypto.c:135 -#, c-format -msgid "Doesn't look like a PEM private key file." -msgstr "Nem tűnik PEM személyes kulcs fájlnak." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "Kapcsolatmegosztás védett WiFi hálózaton" -#: ../libnm-util/crypto.c:143 -#, c-format -msgid "Not enough memory to store PEM file data." -msgstr "Nincs elég memória a PEM fájl adatainak tárolásához." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "Kapcsolatmegosztás nyílt WiFi hálózaton" -#: ../libnm-util/crypto.c:159 -#, c-format -msgid "Malformed PEM file: Proc-Type was not first tag." -msgstr "Rosszul formázott PEM fájl: a Proc-Type nem az első címke." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "Állandó rendszergépnév módosítása" -#: ../libnm-util/crypto.c:167 -#, c-format -msgid "Malformed PEM file: unknown Proc-Type tag '%s'." -msgstr "Rosszul formázott PEM fájl: ismeretlen Proc-Type címke („%s”)." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 +msgid "Modify system connections" +msgstr "Rendszerkapcsolatok módosítása" -#: ../libnm-util/crypto.c:177 -#, c-format -msgid "Malformed PEM file: DEK-Info was not the second tag." -msgstr "Rosszul formázott PEM fájl: A DEK-Info nem a második címke." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 +msgid "System policy prevents modification of system settings" +msgstr "A rendszer házirendje megakadályozza a rendszerbeállítások módosítását" -#: ../libnm-util/crypto.c:188 -#, c-format -msgid "Malformed PEM file: no IV found in DEK-Info tag." -msgstr "Rosszul formázott PEM fájl: nem található IV a DEK-Info címkében." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +msgid "System policy prevents modification of the persistent system hostname" +msgstr "" +"A rendszer házirendje megakadályozza a rendszer állandó gépnevének " +"módosítását" -#: ../libnm-util/crypto.c:195 -#, c-format -msgid "Malformed PEM file: invalid format of IV in DEK-Info tag." -msgstr "Rosszul formázott PEM fájl: az IV formátuma érvénytelen a DEK-Info címkében." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "" +"A rendszer házirendje megakadályozza a kapcsolatok megosztását védett WiFi " +"hálózaton" -#: ../libnm-util/crypto.c:208 -#, c-format -msgid "Malformed PEM file: unknown private key cipher '%s'." -msgstr "Rosszul formázott PEM fájl: ismeretlen személyes kulcs titkosító: „%s”." - -#: ../libnm-util/crypto.c:227 -#, c-format -msgid "Could not decode private key." -msgstr "A személyes kulcs nem fejthető vissza." - -#: ../libnm-util/crypto.c:271 -#, c-format -msgid "PEM certificate '%s' had no end tag '%s'." -msgstr "A(z) „%s” PEM tanúsítvány nem tartalmaz záró „%s” címkét." - -#: ../libnm-util/crypto.c:281 -#, c-format -msgid "Failed to decode certificate." -msgstr "A tanúsítvány visszafejtése meghiúsult." - -#: ../libnm-util/crypto.c:290 ../libnm-util/crypto.c:298 -#, c-format -msgid "Not enough memory to store certificate data." -msgstr "Nincs elég memória a tanúsítvány adatainak tárolásához." - -#: ../libnm-util/crypto.c:328 -#, c-format -msgid "IV must be an even number of bytes in length." -msgstr "Az IV hosszának páros számú bájtnak kell lennie." - -#: ../libnm-util/crypto.c:337 -#, c-format -msgid "Not enough memory to store the IV." -msgstr "Nincs elég memória az IV tárolásához." - -#: ../libnm-util/crypto.c:348 -#, c-format -msgid "IV contains non-hexadecimal digits." -msgstr "Az IV nem hexadecimális számjegyeket tartalmaz." - -#: ../libnm-util/crypto.c:386 ../libnm-util/crypto_gnutls.c:142 -#: ../libnm-util/crypto_nss.c:155 -#, c-format -msgid "Private key cipher '%s' was unknown." -msgstr "A(z) „%s” személyeskulcs-titkosító ismeretlen." - -#: ../libnm-util/crypto.c:395 -#, c-format -msgid "Not enough memory to create private key decryption key." -msgstr "Nincs elég memória a személyes kulcs visszafejtési kulcsának létrehozásához." - -#: ../libnm-util/crypto.c:513 -#, c-format -msgid "Not enough memory to store decrypted private key." -msgstr "Nincs elég memória a visszafejtett személyes kulcs tárolásához." - -#: ../libnm-util/crypto_gnutls.c:43 -msgid "Failed to initialize the crypto engine." -msgstr "A titkosító alrendszer előkészítése meghiúsult." - -#: ../libnm-util/crypto_gnutls.c:88 -#, c-format -msgid "Failed to initialize the MD5 engine: %s / %s." -msgstr "Az MD5 alrendszer előkészítése meghiúsult: %s / %s." - -#: ../libnm-util/crypto_gnutls.c:151 ../libnm-util/crypto_nss.c:164 -#, c-format -msgid "Not enough memory for decrypted key buffer." -msgstr "Nincs elég memória a visszafejtett kulcspufferhez." - -#: ../libnm-util/crypto_gnutls.c:159 -#, c-format -msgid "Failed to initialize the decryption cipher context: %s / %s." -msgstr "A visszafejtési titkosító kontextusának előkészítése meghiúsult: %s /%s." - -#: ../libnm-util/crypto_gnutls.c:168 -#, c-format -msgid "Failed to set symmetric key for decryption: %s / %s." -msgstr "A szimmetrikus kulcs beállítása meghiúsult a visszafejtéshez: %s / %s." - -#: ../libnm-util/crypto_gnutls.c:177 -#, c-format -msgid "Failed to set IV for decryption: %s / %s." -msgstr "Az IV beállítása meghiúsult a visszafejtéshez: %s / %s." - -#: ../libnm-util/crypto_gnutls.c:186 -#, c-format -msgid "Failed to decrypt the private key: %s / %s." -msgstr "A személyes kulcs visszafejtése meghiúsult: %s / %s." - -#: ../libnm-util/crypto_gnutls.c:224 -#, c-format -msgid "Error initializing certificate data: %s" -msgstr "Hiba a tanúsítvány adatainak előkészítésekor: %s" - -#: ../libnm-util/crypto_gnutls.c:236 -#, c-format -msgid "Couldn't decode certificate: %s" -msgstr "A tanúsítvány nem fejthető vissza: %s" - -#: ../libnm-util/crypto_nss.c:49 -#, c-format -msgid "Failed to initialize the crypto engine: %d." -msgstr "A titkosító alrendszer előkészítése meghiúsult: %d." - -#: ../libnm-util/crypto_nss.c:96 -#, c-format -msgid "Failed to initialize the MD5 context: %d." -msgstr "Az MD5 kontextus előkészítése meghiúsult: %d." - -#: ../libnm-util/crypto_nss.c:172 -#, c-format -msgid "Failed to initialize the decryption cipher slot." -msgstr "A visszafejtési titkosítóhely előkészítése meghiúsult." - -#: ../libnm-util/crypto_nss.c:182 -#, c-format -msgid "Failed to set symmetric key for decryption." -msgstr "A szimmetrikus kulcs nem állítható be a visszafejtéshez." - -#: ../libnm-util/crypto_nss.c:192 -#, c-format -msgid "Failed to set IV for decryption." -msgstr "Az IV nem állítható be a visszafejtéshez." - -#: ../libnm-util/crypto_nss.c:200 -#, c-format -msgid "Failed to initialize the decryption context." -msgstr "A visszafejtési kontextus előkészítése meghiúsult." - -#: ../libnm-util/crypto_nss.c:213 -#, c-format -msgid "Failed to decrypt the private key: %d." -msgstr "A személyes kulcs visszafejtése meghiúsult: %d." - -#: ../libnm-util/crypto_nss.c:225 -#, c-format -msgid "Failed to finalize decryption of the private key: %d." -msgstr "A személyes kulcs visszafejtésének befejezése meghiúsult: %d." - -#: ../libnm-util/crypto_nss.c:269 -#, c-format -msgid "Couldn't decode certificate: %d" -msgstr "A tanúsítvány nem fejthető vissza: %d" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "" +"A rendszer házirendje megakadályozza a kapcsolatok megosztását nyílt WiFi " +"hálózaton" diff --git a/po/it.po b/po/it.po index 75fec3465e..5c61af0ac5 100644 --- a/po/it.po +++ b/po/it.po @@ -1,21 +1,1167 @@ +# translation of it.po to # Italian translation for NetworkManager -# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 the NetworkManager CopyRight Holder +# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 THE NetworkManager CopyRight Holder # This file is distributed under the same license as the NetworkManager package. # Francesco Marletta , 2004, 2005, 2006, 2007, 2008, 2009. # msgid "" msgstr "" -"Project-Id-Version: NetworkManager 0.7.1\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" -"product=NetworkManager&component=general\n" -"POT-Creation-Date: 2009-04-18 15:24+0000\n" -"PO-Revision-Date: 2009-04-18 18:09+0200\n" -"Last-Translator: Francesco Marletta \n" -"Language-Team: Italian \n" +"Project-Id-Version: it\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-05-06 14:31+0530\n" +"PO-Revision-Date: 2010-05-07 10:47+1000\n" +"Last-Translator: \n" +"Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: KBabel 1.11.4\n" + +#: ../cli/src/connections.c:59 ../cli/src/connections.c:74 +#: ../cli/src/devices.c:85 ../cli/src/devices.c:98 ../cli/src/devices.c:108 +#: ../cli/src/devices.c:118 ../cli/src/devices.c:131 ../cli/src/devices.c:142 +#: ../cli/src/devices.c:152 +msgid "NAME" +msgstr "NOME" + +#. 0 +#: ../cli/src/connections.c:60 ../cli/src/connections.c:75 +msgid "UUID" +msgstr "UUID" + +#. 1 +#: ../cli/src/connections.c:61 +msgid "DEVICES" +msgstr "DISPOSITIVI" + +#. 2 +#: ../cli/src/connections.c:62 ../cli/src/connections.c:77 +msgid "SCOPE" +msgstr "SCOPO" + +#. 3 +#: ../cli/src/connections.c:63 +msgid "DEFAULT" +msgstr "PREDEFINITO" + +#. 4 +#: ../cli/src/connections.c:64 +msgid "DBUS-SERVICE" +msgstr "SERVIZIO-DBUS" + +#. 5 +#: ../cli/src/connections.c:65 +msgid "SPEC-OBJECT" +msgstr "SPEC-OGGETTO" + +#. 6 +#: ../cli/src/connections.c:66 +msgid "VPN" +msgstr "VPN" + +#. 1 +#. 0 +#. 1 +#: ../cli/src/connections.c:76 ../cli/src/devices.c:61 ../cli/src/devices.c:87 +msgid "TYPE" +msgstr "TIPO" + +#. 3 +#: ../cli/src/connections.c:78 +msgid "TIMESTAMP" +msgstr "TIMESTAMP" + +#. 4 +#: ../cli/src/connections.c:79 +msgid "TIMESTAMP-REAL" +msgstr "TIMESTAMP-REALE" + +#. 5 +#: ../cli/src/connections.c:80 +msgid "AUTOCONNECT" +msgstr "AUTOCONNESSIONE" + +#. 6 +#: ../cli/src/connections.c:81 +msgid "READONLY" +msgstr "SOLO LETTURA" + +#: ../cli/src/connections.c:157 +#, c-format +msgid "" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" +msgstr "" +"Utilizzo: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" + +#: ../cli/src/connections.c:197 ../cli/src/connections.c:536 +#, c-format +msgid "Error: 'con list': %s" +msgstr "Errore: 'con list': %s" + +#: ../cli/src/connections.c:199 ../cli/src/connections.c:538 +#, c-format +msgid "Error: 'con list': %s; allowed fields: %s" +msgstr "Errore: 'con list': %s; campi permessi: %s" + +#: ../cli/src/connections.c:207 +msgid "Connection details" +msgstr "Informazioni sulla connessione" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "system" +msgstr "sistema" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "user" +msgstr "utente" + +#: ../cli/src/connections.c:383 +msgid "never" +msgstr "mai" + +#. "CAPABILITIES" +#. Print header +#. "WIFI-PROPERTIES" +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:544 ../cli/src/settings.c:643 +#: ../cli/src/settings.c:912 ../cli/src/settings.c:913 +#: ../cli/src/settings.c:915 ../cli/src/settings.c:917 +#: ../cli/src/settings.c:1042 ../cli/src/settings.c:1043 +#: ../cli/src/settings.c:1044 ../cli/src/settings.c:1123 +#: ../cli/src/settings.c:1124 ../cli/src/settings.c:1125 +#: ../cli/src/settings.c:1126 ../cli/src/settings.c:1127 +#: ../cli/src/settings.c:1128 ../cli/src/settings.c:1129 +#: ../cli/src/settings.c:1130 ../cli/src/settings.c:1131 +#: ../cli/src/settings.c:1132 ../cli/src/settings.c:1133 +#: ../cli/src/settings.c:1134 ../cli/src/settings.c:1135 +#: ../cli/src/settings.c:1210 +msgid "yes" +msgstr "si" + +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:506 ../cli/src/settings.c:544 +#: ../cli/src/settings.c:643 ../cli/src/settings.c:912 +#: ../cli/src/settings.c:913 ../cli/src/settings.c:915 +#: ../cli/src/settings.c:917 ../cli/src/settings.c:1042 +#: ../cli/src/settings.c:1043 ../cli/src/settings.c:1044 +#: ../cli/src/settings.c:1123 ../cli/src/settings.c:1124 +#: ../cli/src/settings.c:1125 ../cli/src/settings.c:1126 +#: ../cli/src/settings.c:1127 ../cli/src/settings.c:1128 +#: ../cli/src/settings.c:1129 ../cli/src/settings.c:1130 +#: ../cli/src/settings.c:1131 ../cli/src/settings.c:1132 +#: ../cli/src/settings.c:1133 ../cli/src/settings.c:1134 +#: ../cli/src/settings.c:1135 ../cli/src/settings.c:1210 +msgid "no" +msgstr "no" + +# [NdT] si tratta di un messaggio che descrive un'azione +#: ../cli/src/connections.c:457 ../cli/src/connections.c:500 +msgid "System connections" +msgstr "Connessioni di sistema" + +# [NdT] si tratta di un messaggio che descrive un'azione +#: ../cli/src/connections.c:462 ../cli/src/connections.c:513 +msgid "User connections" +msgstr "Connessioni utente" + +#: ../cli/src/connections.c:474 ../cli/src/connections.c:1334 +#: ../cli/src/connections.c:1350 ../cli/src/connections.c:1359 +#: ../cli/src/connections.c:1370 ../cli/src/connections.c:1452 +#: ../cli/src/devices.c:864 ../cli/src/devices.c:874 ../cli/src/devices.c:973 +#: ../cli/src/devices.c:980 +#, c-format +msgid "Error: %s argument is missing." +msgstr "Errore: l'argomento %s è mancante." + +#: ../cli/src/connections.c:487 +#, c-format +msgid "Error: %s - no such connection." +msgstr "Errore: %s - la connessione non esiste." + +#: ../cli/src/connections.c:519 ../cli/src/connections.c:1383 +#: ../cli/src/connections.c:1470 ../cli/src/devices.c:687 +#: ../cli/src/devices.c:754 ../cli/src/devices.c:888 ../cli/src/devices.c:986 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "Parametro sconosciuto: %s\n" + +#: ../cli/src/connections.c:528 +#, c-format +msgid "Error: no valid parameter specified." +msgstr "Errore: Non è stato specificato alcun parametro valido." + +#: ../cli/src/connections.c:543 ../cli/src/connections.c:1572 +#: ../cli/src/devices.c:1192 ../cli/src/network-manager.c:274 +#, c-format +msgid "Error: %s." +msgstr "Errore: %s." + +#: ../cli/src/connections.c:649 +#, c-format +msgid "Error: 'con status': %s" +msgstr "Errore: 'con status': %s" + +#: ../cli/src/connections.c:651 +#, c-format +msgid "Error: 'con status': %s; allowed fields: %s" +msgstr "Errore: 'con status': %s; campi permessi: %s" + +# [NdT] si tratta di un messaggio che descrive un'azione +#: ../cli/src/connections.c:658 +msgid "Active connections" +msgstr "Connessioni attive" + +#: ../cli/src/connections.c:1026 +#, c-format +msgid "no active connection on device '%s'" +msgstr "nessuna connessione attiva sul dispositivo '%s'" + +#: ../cli/src/connections.c:1034 +#, c-format +msgid "no active connection or device" +msgstr "nessuna connessione attiva o dispositivo" + +#: ../cli/src/connections.c:1084 +#, c-format +msgid "device '%s' not compatible with connection '%s'" +msgstr "dispositivo '%s' non compatibile con la connessione '%s'" + +#: ../cli/src/connections.c:1086 +#, c-format +msgid "no device found for connection '%s'" +msgstr "nessun dispositivo trovato per la connessione '%s'" + +#: ../cli/src/connections.c:1097 +msgid "activating" +msgstr "attivazione in corso" + +#: ../cli/src/connections.c:1099 +msgid "activated" +msgstr "attivato" + +#: ../cli/src/connections.c:1102 ../cli/src/connections.c:1125 +#: ../cli/src/connections.c:1158 ../cli/src/devices.c:224 +#: ../cli/src/devices.c:514 ../cli/src/network-manager.c:92 +#: ../cli/src/network-manager.c:145 ../cli/src/settings.c:469 +msgid "unknown" +msgstr "sconosciuto" + +#: ../cli/src/connections.c:1111 +msgid "VPN connecting (prepare)" +msgstr "Connessione VPN (preparazione)" + +#: ../cli/src/connections.c:1113 +msgid "VPN connecting (need authentication)" +msgstr "Connessione VPN (autenticazione necessaria)" + +#: ../cli/src/connections.c:1115 +msgid "VPN connecting" +msgstr "connessione VPN" + +#: ../cli/src/connections.c:1117 +msgid "VPN connecting (getting IP configuration)" +msgstr "Connessione VPN (acquisizione configurazione IP)" + +#: ../cli/src/connections.c:1119 +msgid "VPN connected" +msgstr "Connesso al VPN" + +#: ../cli/src/connections.c:1121 +msgid "VPN connection failed" +msgstr "Connessione VPN fallita" + +#: ../cli/src/connections.c:1123 +msgid "VPN disconnected" +msgstr "VPN scollegato" + +#: ../cli/src/connections.c:1134 +msgid "unknown reason" +msgstr "motivo sconosciuto" + +#: ../cli/src/connections.c:1136 +msgid "none" +msgstr "nessuno" + +#: ../cli/src/connections.c:1138 +msgid "the user was disconnected" +msgstr "l'utente è stato scollegato" + +#: ../cli/src/connections.c:1140 +msgid "the base network connection was interrupted" +msgstr "la connessione di rete di base è stata interrotta" + +#: ../cli/src/connections.c:1142 +msgid "the VPN service stopped unexpectedly" +msgstr "il servizio VPN si è arrestato inaspettatamente" + +#: ../cli/src/connections.c:1144 +msgid "the VPN service returned invalid configuration" +msgstr "il servizio VPN ha ritornato una configurazione non valida" + +#: ../cli/src/connections.c:1146 +msgid "the connection attempt timed out" +msgstr "il tentativo di connessione è scaduto" + +#: ../cli/src/connections.c:1148 +msgid "the VPN service did not start in time" +msgstr "il servizio VPN non si è stato avviato in tempo" + +#: ../cli/src/connections.c:1150 +msgid "the VPN service failed to start" +msgstr "l'avvio del servizio VPN è fallito" + +#: ../cli/src/connections.c:1152 +msgid "no valid VPN secrets" +msgstr "nessun segreto VPN valido" + +#: ../cli/src/connections.c:1154 +msgid "invalid VPN secrets" +msgstr "segreti VPN non validi" + +#: ../cli/src/connections.c:1156 +msgid "the connection was removed" +msgstr "la connessione è stata rimossa" + +#: ../cli/src/connections.c:1170 +#, c-format +msgid "state: %s\n" +msgstr "stato: %s\n" + +#: ../cli/src/connections.c:1173 ../cli/src/connections.c:1199 +#, c-format +msgid "Connection activated\n" +msgstr "Connessione attivata\n" + +#: ../cli/src/connections.c:1176 +#, c-format +msgid "Error: Connection activation failed." +msgstr "Errore: Attivazione connessione fallita." + +#: ../cli/src/connections.c:1195 +#, c-format +msgid "state: %s (%d)\n" +msgstr "stato: %s (%d)\n" + +#: ../cli/src/connections.c:1205 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "Errore: Attivazione connessione fallita: %s." + +#: ../cli/src/connections.c:1222 ../cli/src/devices.c:811 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "Errore: Timeout, %d sec scaduti." + +#: ../cli/src/connections.c:1265 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "Errore: Attivazione connessione fallita: %s" + +#: ../cli/src/connections.c:1279 +#, c-format +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "Errore: Ottenimento connessione attiva per '%s' fallita." + +#: ../cli/src/connections.c:1288 +#, c-format +msgid "Active connection state: %s\n" +msgstr "Stato connessione attiva: %s\n" + +#: ../cli/src/connections.c:1289 +#, c-format +msgid "Active connection path: %s\n" +msgstr "Percorso connessione attiva: %s\n" + +#: ../cli/src/connections.c:1343 ../cli/src/connections.c:1461 +#, c-format +msgid "Error: Unknown connection: %s." +msgstr "Errore: Connessione sconosciuta: %s." + +#: ../cli/src/connections.c:1378 ../cli/src/devices.c:882 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "Errore: il valore di timeout '%s' non è valido." + +#: ../cli/src/connections.c:1391 ../cli/src/connections.c:1478 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "Errore: specificare id o uuid." + +#: ../cli/src/connections.c:1411 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "Errore: Nessun dispositivo idoneo trovato: %s." + +#: ../cli/src/connections.c:1413 +#, c-format +msgid "Error: No suitable device found." +msgstr "Errore: Nessun dispositivo idoneo trovato." + +#: ../cli/src/connections.c:1505 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "Attenzione: Connessione non attiva\n" + +#: ../cli/src/connections.c:1561 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "Errore: il comando 'con' '%s' non è valido." + +#: ../cli/src/connections.c:1597 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "Errore: impossibile collegarsi a D-Bus." + +#: ../cli/src/connections.c:1604 +#, c-format +msgid "Error: Could not get system settings." +msgstr "Errore: Impossibile ottenere le impostazioni del sistema." + +#: ../cli/src/connections.c:1612 +#, c-format +msgid "Error: Could not get user settings." +msgstr "Errore: Impossibile ottenere le impostazioni dell'utente." + +#: ../cli/src/connections.c:1622 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "" +"Errore: Impossibile ottenere le connessioni: i servizi per le impostazioni " +"non sono in esecuzione." + +#. 0 +#. 9 +#: ../cli/src/devices.c:60 ../cli/src/devices.c:86 ../cli/src/devices.c:162 +msgid "DEVICE" +msgstr "DISPOSITIVO" + +#. 1 +#. 4 +#. 0 +#: ../cli/src/devices.c:62 ../cli/src/devices.c:90 +#: ../cli/src/network-manager.c:36 +msgid "STATE" +msgstr "STATO" + +#: ../cli/src/devices.c:71 +msgid "GENERAL" +msgstr "GENERALE" + +#. 0 +#: ../cli/src/devices.c:72 +msgid "CAPABILITIES" +msgstr "CAPACITÀ" + +#. 1 +#: ../cli/src/devices.c:73 +msgid "WIFI-PROPERTIES" +msgstr "PROPRIETÀ-WIFI" + +#. 2 +#: ../cli/src/devices.c:74 +msgid "AP" +msgstr "AP" + +#. 3 +#: ../cli/src/devices.c:75 +msgid "WIRED-PROPERTIES" +msgstr "PROPRIETÀ-CABLATO" + +#. 4 +#: ../cli/src/devices.c:76 +msgid "IP4-SETTINGS" +msgstr "IMPOSTAZIONI-IP4" + +#. 5 +#: ../cli/src/devices.c:77 +msgid "IP4-DNS" +msgstr "IP4-DNS" + +#. 2 +#: ../cli/src/devices.c:88 +msgid "DRIVER" +msgstr "DRIVER" + +#. 3 +#: ../cli/src/devices.c:89 +msgid "HWADDR" +msgstr "HWADDR" + +#. 0 +#: ../cli/src/devices.c:99 +msgid "CARRIER-DETECT" +msgstr "RILEVAMENTO-CARRIER" + +#. 1 +#: ../cli/src/devices.c:100 +msgid "SPEED" +msgstr "VELOCITÀ" + +#. 0 +#: ../cli/src/devices.c:109 +msgid "CARRIER" +msgstr "CARRIER" + +#. 0 +#: ../cli/src/devices.c:119 +msgid "WEP" +msgstr "WEP" + +#. 1 +#: ../cli/src/devices.c:120 +msgid "WPA" +msgstr "WPA" + +#. 2 +#: ../cli/src/devices.c:121 +msgid "WPA2" +msgstr "WPA2" + +#. 3 +#: ../cli/src/devices.c:122 +msgid "TKIP" +msgstr "TKIP" + +#. 4 +#: ../cli/src/devices.c:123 +msgid "CCMP" +msgstr "CCMP" + +#. 0 +#: ../cli/src/devices.c:132 +msgid "ADDRESS" +msgstr "INDIRIZZO" + +#. 1 +#: ../cli/src/devices.c:133 +msgid "PREFIX" +msgstr "PREFISSO" + +#. 2 +#: ../cli/src/devices.c:134 +msgid "GATEWAY" +msgstr "GATEWAY" + +#. 0 +#: ../cli/src/devices.c:143 +msgid "DNS" +msgstr "DNS" + +#. 0 +#: ../cli/src/devices.c:153 +msgid "SSID" +msgstr "SSID" + +#. 1 +#: ../cli/src/devices.c:154 +msgid "BSSID" +msgstr "BSSID" + +#. 2 +#: ../cli/src/devices.c:155 +msgid "MODE" +msgstr "MODALITÀ" + +#. 3 +#: ../cli/src/devices.c:156 +msgid "FREQ" +msgstr "FREQ" + +#. 4 +#: ../cli/src/devices.c:157 +msgid "RATE" +msgstr "TASSO DI TRASFERIMENTO" + +#. 5 +#: ../cli/src/devices.c:158 +msgid "SIGNAL" +msgstr "SEGNALE" + +#. 6 +#: ../cli/src/devices.c:159 +msgid "SECURITY" +msgstr "SICUREZZA" + +#. 7 +#: ../cli/src/devices.c:160 +msgid "WPA-FLAGS" +msgstr "WPA-FLAGS" + +#. 8 +#: ../cli/src/devices.c:161 +msgid "RSN-FLAGS" +msgstr "RSN-FLAGS" + +#. 10 +#: ../cli/src/devices.c:163 +msgid "ACTIVE" +msgstr "ATTIVO" + +#: ../cli/src/devices.c:186 +#, c-format +msgid "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +"\n" +msgstr "" +"Utilizzo: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +"\n" + +#: ../cli/src/devices.c:206 +msgid "unmanaged" +msgstr "non gestito" + +#: ../cli/src/devices.c:208 +msgid "unavailable" +msgstr "non disponibile" + +#: ../cli/src/devices.c:210 ../cli/src/network-manager.c:89 +msgid "disconnected" +msgstr "scollegato" + +#: ../cli/src/devices.c:212 +msgid "connecting (prepare)" +msgstr "connessione in corso (preparazione)" + +#: ../cli/src/devices.c:214 +msgid "connecting (configuring)" +msgstr "connessione in corso (configurazione)" + +#: ../cli/src/devices.c:216 +msgid "connecting (need authentication)" +msgstr "connessione in corso (autenticazione necessaria)" + +#: ../cli/src/devices.c:218 +msgid "connecting (getting IP configuration)" +msgstr "connessione in corso (acquisizione configurazione IP)" + +#: ../cli/src/devices.c:220 ../cli/src/network-manager.c:87 +msgid "connected" +msgstr "collegato" + +#: ../cli/src/devices.c:222 +msgid "connection failed" +msgstr "connessione fallita" + +#: ../cli/src/devices.c:245 ../cli/src/devices.c:380 +msgid "Unknown" +msgstr "Sconosciuto" + +#: ../cli/src/devices.c:277 +msgid "(none)" +msgstr "(nessuno)" + +#: ../cli/src/devices.c:302 +#, c-format +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s: errore nella conversione dell'indirizzo IP4 0x%X" + +#: ../cli/src/devices.c:349 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" + +#: ../cli/src/devices.c:350 +#, c-format +msgid "%u MB/s" +msgstr "%u MB/s" + +#: ../cli/src/devices.c:359 +msgid "Encrypted: " +msgstr "Cifrato: " + +#: ../cli/src/devices.c:364 +msgid "WEP " +msgstr "WEP " + +#: ../cli/src/devices.c:366 +msgid "WPA " +msgstr "WPA " + +#: ../cli/src/devices.c:368 +msgid "WPA2 " +msgstr "WPA2 " + +#: ../cli/src/devices.c:371 +msgid "Enterprise " +msgstr "Enterprise " + +#: ../cli/src/devices.c:380 +msgid "Ad-Hoc" +msgstr "Ad-Hoc" + +#: ../cli/src/devices.c:380 +msgid "Infrastructure" +msgstr "Infrastruttura" + +#: ../cli/src/devices.c:442 +#, c-format +msgid "Error: 'dev list': %s" +msgstr "Errore: 'dev list': %s" + +#: ../cli/src/devices.c:444 +#, c-format +msgid "Error: 'dev list': %s; allowed fields: %s" +msgstr "Errore: 'dev list': %s; campi permessi: %s" + +#: ../cli/src/devices.c:453 +msgid "Device details" +msgstr "Informazioni del dispositivo" + +#: ../cli/src/devices.c:483 ../cli/src/devices.c:827 +msgid "(unknown)" +msgstr "(sconosciuto)" + +#: ../cli/src/devices.c:484 +msgid "unknown)" +msgstr "sconosciuto)" + +#: ../cli/src/devices.c:510 +#, c-format +msgid "%u Mb/s" +msgstr "%u Mb/s" + +#. Print header +#. "WIRED-PROPERTIES" +#: ../cli/src/devices.c:583 +msgid "on" +msgstr "on" + +#: ../cli/src/devices.c:583 +msgid "off" +msgstr "off" + +#: ../cli/src/devices.c:710 +#, c-format +msgid "Error: 'dev status': %s" +msgstr "Errore: 'dev status': %s" + +#: ../cli/src/devices.c:712 +#, c-format +msgid "Error: 'dev status': %s; allowed fields: %s" +msgstr "Errore: 'dev status': %s; campi permessi: %s" + +#: ../cli/src/devices.c:719 +msgid "Status of devices" +msgstr "Stato dispositivo" + +#: ../cli/src/devices.c:747 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "Errore: L'argomento '%s' è mancante." + +#: ../cli/src/devices.c:776 ../cli/src/devices.c:915 ../cli/src/devices.c:1035 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "Errore: Dispositivo '%s' non trovato." + +#: ../cli/src/devices.c:799 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "Successo: Dispositivo '%s' scollegato con successo." + +#: ../cli/src/devices.c:824 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "Errore: Scollegamento dispositivo '%s' (%s) fallito: %s" + +#: ../cli/src/devices.c:832 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "Stato dispositivo: %d (%s)\n" + +#: ../cli/src/devices.c:896 +#, c-format +msgid "Error: iface has to be specified." +msgstr "Errore: specificare iface." + +#: ../cli/src/devices.c:1011 +#, c-format +msgid "Error: 'dev wifi': %s" +msgstr "Errore: 'dev wifi': %s" + +#: ../cli/src/devices.c:1013 +#, c-format +msgid "Error: 'dev wifi': %s; allowed fields: %s" +msgstr "Error: 'dev wifi': %s; campi permessi: %s" + +#: ../cli/src/devices.c:1020 +msgid "WiFi scan list" +msgstr "Elenco scansione WiFi" + +#: ../cli/src/devices.c:1055 ../cli/src/devices.c:1109 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "Errore: Punto di accesso con hwaddr '%s' non trovato." + +#: ../cli/src/devices.c:1072 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "Errore: Il dispositivo '%s' non è un dispositivo WiFi." + +#: ../cli/src/devices.c:1136 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "Errore: il comando 'dev wifi' '%s' non è valido." + +#: ../cli/src/devices.c:1183 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "Errore: il comando 'dev' '%s' non è valido." + +#: ../cli/src/network-manager.c:35 +msgid "RUNNING" +msgstr "IN ESECUZIONE" + +#. 1 +#: ../cli/src/network-manager.c:37 +msgid "WIFI-HARDWARE" +msgstr "WIFI-HARDWARE" + +#. 2 +#: ../cli/src/network-manager.c:38 +msgid "WIFI" +msgstr "WIFI" + +#. 3 +#: ../cli/src/network-manager.c:39 +msgid "WWAN-HARDWARE" +msgstr "WWAN-HARDWARE" + +#. 4 +#: ../cli/src/network-manager.c:40 +msgid "WWAN" +msgstr "WWAN" + +#: ../cli/src/network-manager.c:62 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" +msgstr "" +"Utilizzo: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + +#: ../cli/src/network-manager.c:83 +msgid "asleep" +msgstr "dormiente" + +#: ../cli/src/network-manager.c:85 +msgid "connecting" +msgstr "connessione" + +#: ../cli/src/network-manager.c:125 +#, c-format +msgid "Error: 'nm status': %s" +msgstr "Errore: 'nm status': %s" + +#: ../cli/src/network-manager.c:127 +#, c-format +msgid "Error: 'nm status': %s; allowed fields: %s" +msgstr "Errore: 'nm status': %s; campi permessi: %s" + +#: ../cli/src/network-manager.c:134 +msgid "NetworkManager status" +msgstr "Stato NetworkManager" + +#. Print header +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "enabled" +msgstr "abilitato" + +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "disabled" +msgstr "disabilitato" + +#: ../cli/src/network-manager.c:148 +msgid "running" +msgstr "in esecuzione" + +#: ../cli/src/network-manager.c:148 +msgid "not running" +msgstr "non in esecuzione" + +#: ../cli/src/network-manager.c:201 ../cli/src/network-manager.c:233 +#, c-format +msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s" +msgstr "Errore: qui il valore '--fields' '%s' non è valido; campi permessi: %s" + +#: ../cli/src/network-manager.c:209 +msgid "WiFi enabled" +msgstr "WiFi abilitato" + +#: ../cli/src/network-manager.c:220 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "Errore: parametro 'wifi' non valido: '%s'." + +#: ../cli/src/network-manager.c:241 +msgid "WWAN enabled" +msgstr "WWAN abilitato" + +#: ../cli/src/network-manager.c:252 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "Errore: parametro 'wwan' non valido: '%s'." + +#: ../cli/src/network-manager.c:263 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "Errore: comando 'nm' '%s' non valido." + +#: ../cli/src/nmcli.c:69 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -m[ode] tabular|multiline output mode\n" +" -f[ields] |all|common specify fields to output\n" +" -e[scape] yes|no escape columns separators in " +"values\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"Utilizzo: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] output dettagliato\n" +" -p[retty] output formattato\n" +" -m[ode] tabular|multiline modalità output\n" +" -f[ields] |all|common specifica campi sull'output\n" +" -e[scape] yes|no esegue l'escape dei separatori delle colonne " +"nei valori\n" +" -v[ersion] mostra la versione del programma\n" +" -h[elp] stampa questo aiuto\n" +"\n" +"OBJECT\n" +" nm stato NetworkManager\n" +" con connessioni NetworkManager\n" +" dev dispositivi gestiti da NetworkManager\n" +"\n" + +#: ../cli/src/nmcli.c:113 +#, c-format +msgid "Error: Object '%s' is unknown, try 'nmcli help'." +msgstr "Errore: L'oggetto '%s' è sconosciuto, prova 'nmcli help'." + +#: ../cli/src/nmcli.c:143 +#, c-format +msgid "Error: Option '--terse' is specified the second time." +msgstr "Errore: L'opzione '--terse' è stata specificata una seconda volta." + +#: ../cli/src/nmcli.c:148 +#, c-format +msgid "Error: Option '--terse' is mutually exclusive with '--pretty'." +msgstr "Errore: L'opzione '--terse' si esclude con '--pretty'." + +#: ../cli/src/nmcli.c:156 +#, c-format +msgid "Error: Option '--pretty' is specified the second time." +msgstr "Errore: L'opzione '--pretty' è stata specificata una seconda volta." + +#: ../cli/src/nmcli.c:161 +#, c-format +msgid "Error: Option '--pretty' is mutually exclusive with '--terse'." +msgstr "Errore: L'opzione '--pretty' si esclude con '--terse'." + +#: ../cli/src/nmcli.c:171 ../cli/src/nmcli.c:187 +#, c-format +msgid "Error: missing argument for '%s' option." +msgstr "Errore: argomento mancante per l'opzione '%s'." + +#: ../cli/src/nmcli.c:180 ../cli/src/nmcli.c:196 +#, c-format +msgid "Error: '%s' is not valid argument for '%s' option." +msgstr "Errore: '%s' non è un argomento valido per l'opzione '%s'." + +#: ../cli/src/nmcli.c:203 +#, c-format +msgid "Error: fields for '%s' options are missing." +msgstr "Errore: i campi per le opzioni '%s' sono mancanti." + +#: ../cli/src/nmcli.c:209 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "tool nmcli, versione %s\n" + +#: ../cli/src/nmcli.c:215 +#, c-format +msgid "Error: Option '%s' is unknown, try 'nmcli -help'." +msgstr "Errore: L'opzione '%s' è sconosciuta, prova 'nmcli -help'." + +#: ../cli/src/nmcli.c:234 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "Catturato segnale %d, arresto in corso..." + +#: ../cli/src/nmcli.c:259 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "Errore: Impossibile collegarsi al NetworkManager." + +#: ../cli/src/nmcli.c:275 +msgid "Success" +msgstr "Successo" + +#: ../cli/src/settings.c:407 +#, c-format +msgid "%d (hex-ascii-key)" +msgstr "%d (hex-ascii-key)" + +#: ../cli/src/settings.c:409 +#, c-format +msgid "%d (104/128-bit passphrase)" +msgstr "%d (frase di accesso a 104/128-bit)" + +#: ../cli/src/settings.c:412 +#, c-format +msgid "%d (unknown)" +msgstr "%d (sconosciuto)" + +#: ../cli/src/settings.c:438 +msgid "0 (unknown)" +msgstr "0 (sconosciuto)" + +#: ../cli/src/settings.c:444 +msgid "any, " +msgstr "qualsiasi, " + +#: ../cli/src/settings.c:446 +msgid "900 MHz, " +msgstr "900 MHz, " + +#: ../cli/src/settings.c:448 +msgid "1800 MHz, " +msgstr "1800 MHz, " + +#: ../cli/src/settings.c:450 +msgid "1900 MHz, " +msgstr "1900 MHz, " + +#: ../cli/src/settings.c:452 +msgid "850 MHz, " +msgstr "850 MHz, " + +#: ../cli/src/settings.c:454 +msgid "WCDMA 3GPP UMTS 2100 MHz, " +msgstr "WCDMA 3GPP UMTS 2100 MHz, " + +#: ../cli/src/settings.c:456 +msgid "WCDMA 3GPP UMTS 1800 MHz, " +msgstr "WCDMA 3GPP UMTS 1800 MHz, " + +#: ../cli/src/settings.c:458 +msgid "WCDMA 3GPP UMTS 1700/2100 MHz, " +msgstr "WCDMA 3GPP UMTS 1700/2100 MHz, " + +#: ../cli/src/settings.c:460 +msgid "WCDMA 3GPP UMTS 800 MHz, " +msgstr "WCDMA 3GPP UMTS 800 MHz, " + +#: ../cli/src/settings.c:462 +msgid "WCDMA 3GPP UMTS 850 MHz, " +msgstr "WCDMA 3GPP UMTS 850 MHz, " + +#: ../cli/src/settings.c:464 +msgid "WCDMA 3GPP UMTS 900 MHz, " +msgstr "WCDMA 3GPP UMTS 900 MHz, " + +#: ../cli/src/settings.c:466 +msgid "WCDMA 3GPP UMTS 1700 MHz, " +msgstr "WCDMA 3GPP UMTS 1700 MHz, " + +#: ../cli/src/settings.c:546 ../cli/src/settings.c:708 +msgid "auto" +msgstr "auto" + +#: ../cli/src/settings.c:704 ../cli/src/settings.c:707 ../cli/src/utils.c:172 +msgid "not set" +msgstr "non impostato" + +#: ../cli/src/utils.c:124 +#, c-format +msgid "field '%s' has to be alone" +msgstr "il campo '%s' deve essere isolato" + +#: ../cli/src/utils.c:127 +#, c-format +msgid "invalid field '%s'" +msgstr "campo '%s' invalido" + +#: ../cli/src/utils.c:146 +#, c-format +msgid "Option '--terse' requires specifying '--fields'" +msgstr "Con l'opzione '--terse' è necessario specificare '--fields'" + +#: ../cli/src/utils.c:150 +#, c-format +msgid "Option '--terse' requires specific '--fields' option values , not '%s'" +msgstr "L'opzione '--terse' necessita valori dell'opzione '--fields' specifici, non '%s'" #: ../libnm-util/crypto.c:120 #, c-format @@ -30,7 +1176,7 @@ msgstr "Non sembra un file di chiave privata PEM." #: ../libnm-util/crypto.c:138 #, c-format msgid "Not enough memory to store PEM file data." -msgstr "Memoria non sufficiente per archiviare i dati del file PEM." +msgstr "Memoria non sufficiente per memorizzare i dati del file PEM." #: ../libnm-util/crypto.c:154 #, c-format @@ -60,7 +1206,7 @@ msgstr "File PEM malformato: formato di IV nel tag DEK-Info non valido." #: ../libnm-util/crypto.c:203 #, c-format msgid "Malformed PEM file: unknown private key cipher '%s'." -msgstr "File PEM malformato: cifrario a chiave privata \"%s\" sconosciuto." +msgstr "File PEM malformato: cifrario chiave privata \"%s\" sconosciuto." #: ../libnm-util/crypto.c:222 #, c-format @@ -90,7 +1236,7 @@ msgstr "Memoria non sufficiente per archiviare i dati del file." #: ../libnm-util/crypto.c:324 #, c-format msgid "IV must be an even number of bytes in length." -msgstr "IV deve essere lungo un numero pari di byte" +msgstr "IV deve essere lungo un numero pari di byte." #: ../libnm-util/crypto.c:333 #, c-format @@ -102,11 +1248,12 @@ msgstr "Memoria non sufficiente per archiviare l'IV." msgid "IV contains non-hexadecimal digits." msgstr "IV contiene cifre non esadecimali." -#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:143 -#: ../libnm-util/crypto_nss.c:169 +#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:336 #, c-format msgid "Private key cipher '%s' was unknown." -msgstr "Il cifrario a chiave privata \"%s\" è sconosciuto." +msgstr "Il cifrario di chiave privata \"%s\" è sconosciuto." #: ../libnm-util/crypto.c:391 #, c-format @@ -116,82 +1263,115 @@ msgstr "Memoria non sufficiente per decifrare la chiave privata." #: ../libnm-util/crypto.c:511 #, c-format msgid "Unable to determine private key type." -msgstr "Impossibile determinare il tipo di chiave privata." +msgstr "Impossibile stabilire il tipo di chiave privata." #: ../libnm-util/crypto.c:530 #, c-format msgid "Not enough memory to store decrypted private key." msgstr "Memoria non sufficiente per archiviare la chiave privata decifrata." -#: ../libnm-util/crypto_gnutls.c:46 +#: ../libnm-util/crypto_gnutls.c:49 msgid "Failed to initialize the crypto engine." msgstr "Inizializzazione del motore di cifratura fallita." -#: ../libnm-util/crypto_gnutls.c:90 +#: ../libnm-util/crypto_gnutls.c:93 #, c-format msgid "Failed to initialize the MD5 engine: %s / %s." msgstr "Inizializzazione del motore MD5 fallita: %s / %s" -#: ../libnm-util/crypto_gnutls.c:152 ../libnm-util/crypto_nss.c:178 +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "Lunghezza IV non valida (deve avere almento %zd)." + +#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188 #, c-format msgid "Not enough memory for decrypted key buffer." msgstr "Memoria non sufficiente per il buffer della chiave decifrata." -# NdT: ho tradotto "decryption cipher" con decifratore in -# quanto ha più senso che dire "cifrario di decifrazione" -#: ../libnm-util/crypto_gnutls.c:160 +#: ../libnm-util/crypto_gnutls.c:173 #, c-format msgid "Failed to initialize the decryption cipher context: %s / %s." msgstr "Inizializzazione del contesto di decifrazione fallita: %s / %s." -#: ../libnm-util/crypto_gnutls.c:169 +#: ../libnm-util/crypto_gnutls.c:182 #, c-format msgid "Failed to set symmetric key for decryption: %s / %s." -msgstr "" -"Impostazione della chiave simmetrica per la decifrazione fallita: %s / %s." +msgstr "Impostazione della chiave simmetrica per la decifrazione fallita: %s / %s." -#: ../libnm-util/crypto_gnutls.c:178 +#: ../libnm-util/crypto_gnutls.c:191 #, c-format msgid "Failed to set IV for decryption: %s / %s." msgstr "Impostazione di IV per la decifrazione fallita: %s / %s." -#: ../libnm-util/crypto_gnutls.c:187 +#: ../libnm-util/crypto_gnutls.c:200 #, c-format msgid "Failed to decrypt the private key: %s / %s." msgstr "Decifrazione della chiave privata fallita: %s / %s." -#: ../libnm-util/crypto_gnutls.c:200 +#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 +#, c-format +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "" +"Impossibile decifrare la chiave privata: lunghezza spazio di riempimento non " +"previsto." + +#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 #, c-format msgid "Failed to decrypt the private key." msgstr "Decifrazione della chiave privata fallita." -#: ../libnm-util/crypto_gnutls.c:235 +#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "Impossibile assegnare memoria per la cifratura." + +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "Inizializzazione contesto del cifratore fallita: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "Impostazione della chiave simmetrica per la codifica fallita: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +msgid "Failed to set IV for encryption: %s / %s." +msgstr "Impostazione di IV per la cifratura fallita: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +msgid "Failed to encrypt the data: %s / %s." +msgstr "Cifratura dati fallita: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:362 #, c-format msgid "Error initializing certificate data: %s" msgstr "Errore nell'inizializzare i dati dei certificati: %s" -#: ../libnm-util/crypto_gnutls.c:257 +#: ../libnm-util/crypto_gnutls.c:384 #, c-format msgid "Couldn't decode certificate: %s" -msgstr "Impossibile decifrare il certificato: %s" +msgstr "Impossibile decodificare il certificato: %s" -#: ../libnm-util/crypto_gnutls.c:281 +#: ../libnm-util/crypto_gnutls.c:408 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %s" -msgstr "Impossibile inizializzare il decifratore PKCS#12: %s" +msgstr "Impossibile inizializzare il decodificatore PKCS#12: %s" -#: ../libnm-util/crypto_gnutls.c:294 +#: ../libnm-util/crypto_gnutls.c:421 #, c-format msgid "Couldn't decode PKCS#12 file: %s" -msgstr "Impossibile decifrare il file PKCS#12: %s" +msgstr "Impossibile decodificare il file PKCS#12: %s" -#: ../libnm-util/crypto_gnutls.c:306 +#: ../libnm-util/crypto_gnutls.c:433 #, c-format msgid "Couldn't verify PKCS#12 file: %s" msgstr "Impossibile verificare il file PKCS#12: %s" -#: ../libnm-util/crypto_nss.c:57 -#: ../system-settings/plugins/ifcfg-rh/crypto.c:52 +#: ../libnm-util/crypto_nss.c:56 #, c-format msgid "Failed to initialize the crypto engine: %d." msgstr "Inizializzazione del motore di cifratura fallita: %d." @@ -201,114 +1381,192 @@ msgstr "Inizializzazione del motore di cifratura fallita: %d." msgid "Failed to initialize the MD5 context: %d." msgstr "Inizializzazione del contesto MD5 fallita: %d." -#: ../libnm-util/crypto_nss.c:186 +#: ../libnm-util/crypto_nss.c:179 +#, c-format +msgid "Invalid IV length (must be at least %d)." +msgstr "Lunghezza di IV non valida (deve avere almeno %d)." + +#: ../libnm-util/crypto_nss.c:196 #, c-format msgid "Failed to initialize the decryption cipher slot." msgstr "Inizializzazione dello slot del decifratore fallita." -#: ../libnm-util/crypto_nss.c:196 +#: ../libnm-util/crypto_nss.c:206 #, c-format msgid "Failed to set symmetric key for decryption." msgstr "Impostazione della chiave simmetrica di decifrazione fallita." -#: ../libnm-util/crypto_nss.c:206 +#: ../libnm-util/crypto_nss.c:216 #, c-format msgid "Failed to set IV for decryption." msgstr "Impostazione di IV per la decifrazione fallita." -#: ../libnm-util/crypto_nss.c:214 +#: ../libnm-util/crypto_nss.c:224 #, c-format msgid "Failed to initialize the decryption context." msgstr "Inizializzazione del contesto di decifrazione fallita." -#: ../libnm-util/crypto_nss.c:227 +#: ../libnm-util/crypto_nss.c:237 #, c-format msgid "Failed to decrypt the private key: %d." msgstr "Decifrazione della chiave privata fallita: %d." -#: ../libnm-util/crypto_nss.c:239 +#: ../libnm-util/crypto_nss.c:245 +#, c-format +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "Decodifica della chiave privata fallita: i dati decifrati sono troppo lunghi." + +#: ../libnm-util/crypto_nss.c:256 #, c-format msgid "Failed to finalize decryption of the private key: %d." msgstr "Finalizzazione della decifrazione della chiave privata fallita: %d." -#: ../libnm-util/crypto_nss.c:284 +#: ../libnm-util/crypto_nss.c:364 +#, c-format +msgid "Failed to initialize the encryption cipher slot." +msgstr "Inizializzazione dello slot del cifratore fallita." + +#: ../libnm-util/crypto_nss.c:372 +#, c-format +msgid "Failed to set symmetric key for encryption." +msgstr "Impostazione della chiave simmetrica di cifratura fallita." + +#: ../libnm-util/crypto_nss.c:380 +#, c-format +msgid "Failed to set IV for encryption." +msgstr "Impostazione di IV per la cifratura fallita." + +#: ../libnm-util/crypto_nss.c:388 +#, c-format +msgid "Failed to initialize the encryption context." +msgstr "Inizializzazione del contesto di cifratura fallita." + +#: ../libnm-util/crypto_nss.c:396 +#, c-format +msgid "Failed to encrypt: %d." +msgstr "Cifratura fallita: %d." + +#: ../libnm-util/crypto_nss.c:404 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "Quantità di dati non prevista dopo la cifratura." + +#: ../libnm-util/crypto_nss.c:447 #, c-format msgid "Couldn't decode certificate: %d" -msgstr "Impossibile decifrare il certificato: %d" +msgstr "Impossibile decodificare il certificato: %d" -#: ../libnm-util/crypto_nss.c:319 +#: ../libnm-util/crypto_nss.c:482 #, c-format msgid "Couldn't convert password to UCS2: %d" msgstr "Impossibile convertire la password in UCS2: %d" -#: ../libnm-util/crypto_nss.c:347 +#: ../libnm-util/crypto_nss.c:510 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %d" -msgstr "Impossibile inizializzare il decifratore PKCS#12: %d" +msgstr "Impossibile inizializzare il decodificatore PKCS#12: %d" -#: ../libnm-util/crypto_nss.c:356 +#: ../libnm-util/crypto_nss.c:519 #, c-format msgid "Couldn't decode PKCS#12 file: %d" -msgstr "Impossibile decifrare il file PKCS#12: %d" +msgstr "Impossibile decodificare il file PKCS#12: %d" -#: ../libnm-util/crypto_nss.c:365 +#: ../libnm-util/crypto_nss.c:528 #, c-format msgid "Couldn't verify PKCS#12 file: %d" msgstr "Impossibile verificare il file PKCS#12: %d" -#: ../src/nm-netlink-monitor.c:194 ../src/nm-netlink-monitor.c:458 +#: ../libnm-util/crypto_nss.c:557 +msgid "Could not generate random data." +msgstr "Impossibile generare dati randomici." + +#: ../libnm-util/nm-utils.c:1925 +#, c-format +msgid "Not enough memory to make encryption key." +msgstr "Memoria non sufficiente per creare la chiave di cifratura." + +#: ../libnm-util/nm-utils.c:2035 +msgid "Could not allocate memory for PEM file creation." +msgstr "Impossibile assegnare memoria per la creazione del file PEM." + +#: ../libnm-util/nm-utils.c:2047 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "Impossibile assegnare memoria per la scrittura di IV sul file PEM." + +#: ../libnm-util/nm-utils.c:2059 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "" +"Impossibile assegnare memoria per la scrittura della chiave cifrata sul file " +"PEM." + +#: ../libnm-util/nm-utils.c:2078 +#, c-format +msgid "Could not allocate memory for PEM file data." +msgstr "Impossibile assegnare memoria per i dati del file PEM." + +#: ../src/nm-netlink-monitor.c:100 ../src/nm-netlink-monitor.c:231 +#: ../src/nm-netlink-monitor.c:653 #, c-format msgid "error processing netlink message: %s" -msgstr "errore nell'elaborazione del messaggio netlink: %s" +msgstr "errore nell'elaborare il messaggio netlink: %s" -#: ../src/nm-netlink-monitor.c:255 +#: ../src/nm-netlink-monitor.c:214 +msgid "error occurred while waiting for data on socket" +msgstr "si è verificato un errore durante l'attesa dei dati sul socket" + +#: ../src/nm-netlink-monitor.c:254 +#, c-format +msgid "unable to connect to netlink for monitoring link status: %s" +msgstr "impossibile collegarsi a netlink per monitorare lo stato del collegamento: %s" + +#: ../src/nm-netlink-monitor.c:265 +#, c-format +msgid "unable to enable netlink handle credential passing: %s" +msgstr "impossibile abilitare il passaggio delle credenziali handle netlink: %s" + +#: ../src/nm-netlink-monitor.c:291 ../src/nm-netlink-monitor.c:353 #, c-format msgid "unable to allocate netlink handle for monitoring link status: %s" msgstr "" "impossibile allocare un handle netlink per monitorare lo stato del " "collegamento: %s" -#: ../src/nm-netlink-monitor.c:265 -#, c-format -msgid "unable to connect to netlink for monitoring link status: %s" -msgstr "" -"impossibile collegarsi a netlink per monitorare lo stato del collegamento: %s" - -#: ../src/nm-netlink-monitor.c:273 -#, c-format -msgid "unable to join netlink group for monitoring link status: %s" -msgstr "" -"impossibile unirsi a un gruppo netlink per monitorare lo stato del " -"collegamento: %s" - -#: ../src/nm-netlink-monitor.c:281 +#: ../src/nm-netlink-monitor.c:376 #, c-format msgid "unable to allocate netlink link cache for monitoring link status: %s" msgstr "" "impossibile allocare la cache dei collegamenti netlink per monitorare lo " "stato del collegamento: %s" -#: ../src/nm-netlink-monitor.c:422 +#: ../src/nm-netlink-monitor.c:502 +#, c-format +msgid "unable to join netlink group: %s" +msgstr "impossibile unirsi a un gruppo netlink: %s" + +#: ../src/nm-netlink-monitor.c:629 ../src/nm-netlink-monitor.c:642 #, c-format msgid "error updating link cache: %s" -msgstr "errore nell'aggiornamento della cache del collegamento: %s" +msgstr "errore nell'aggiornare la cache dei link: %s" -#: ../src/nm-netlink-monitor.c:488 -msgid "error occurred while waiting for data on socket" -msgstr "si è verificato un errore durante l'attesa dei dati sul socket" - -#: ../src/NetworkManager.c:294 +#: ../src/main.c:502 #, c-format msgid "Invalid option. Please use --help to see a list of valid options.\n" msgstr "" "Opzione non valida. Usare --help per ottenere un elenco delle opzioni " "valide.\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:96 +#: ../src/main.c:562 +#, c-format +msgid "%s. Please use --help to see a list of valid options.\n" +msgstr "%s. Usare --help per ottenere un elenco di opzioni valide.\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:325 msgid "# Created by NetworkManager\n" msgstr "# Creato da NetworkManager\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:102 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:341 #, c-format msgid "" "# Merged from %s\n" @@ -317,20 +1575,93 @@ msgstr "" "# Unito da %s\n" "\n" -#: ../src/named-manager/nm-named-manager.c:256 +#: ../src/dhcp-manager/nm-dhcp-manager.c:279 +msgid "no usable DHCP client could be found." +msgstr "non è stato trovato alcun client DHCP utilizzabile." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:288 +msgid "'dhclient' could be found." +msgstr "è stato trovato 'dhclient'" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:298 +msgid "'dhcpcd' could be found." +msgstr "è stato trovato 'dhcpcd'" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:306 +#, c-format +msgid "unsupported DHCP client '%s'" +msgstr "client DHCP '%s' non supportato" + +#: ../src/logging/nm-logging.c:146 +#, c-format +msgid "Unknown log level '%s'" +msgstr "Livello log '%s' sconosciuto" + +#: ../src/logging/nm-logging.c:171 +#, c-format +msgid "Unknown log domain '%s'" +msgstr "Dominio log '%s' sconosciuto" + +#: ../src/named-manager/nm-named-manager.c:343 msgid "NOTE: the libc resolver may not support more than 3 nameservers." -msgstr "" -"NOTA: il risolutore glibc potrebbe non supportare più di 3 server di nomi." +msgstr "NOTA: il risolutore libc non supporta più di 3 server di nomi." -#: ../src/named-manager/nm-named-manager.c:258 +#: ../src/named-manager/nm-named-manager.c:345 msgid "The nameservers listed below may not be recognized." -msgstr "I server di nomi elencati sotto potrebbero non essere riconosciuti." +msgstr "I server di nomi elencati sotto non possono essere riconosciuti." -#: ../system-settings/plugins/ifcfg-rh/reader.c:2149 +#: ../src/system-settings/nm-default-wired-connection.c:157 +#, c-format +msgid "Auto %s" +msgstr "%s (automatica)" + +#: ../system-settings/plugins/ifcfg-rh/reader.c:3256 msgid "System" msgstr "Sistema" -#: ../system-settings/src/nm-default-wired-connection.c:182 -#, c-format -msgid "Auto %s" -msgstr "Auto %s" +# [NdT] si tratta di un messaggio che descrive un'azione +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "Condivide connessione attraverso una rete WiFi protetta" + +# [NdT] si tratta di un messaggio che descrive un'azione +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "Condivide connessione attraverso una rete WiFi aperta" + +# [NdT] si tratta di un messaggio che descrive un'azione +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "Modifica il nome host persistente del sistema" + +# [NdT] si tratta di un messaggio che descrive un'azione +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 +msgid "Modify system connections" +msgstr "Modifica le connessioni di sistema" + +# [NdT] si tratta di un messaggio che descrive un'azione +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 +msgid "System policy prevents modification of system settings" +msgstr "La politica di sistema impedisce di modificare le impostazioni di sistema" + +# [NdT] si tratta di un messaggio che descrive un'azione +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +msgid "System policy prevents modification of the persistent system hostname" +msgstr "" +"La politica di sistema impedisce di modificare il nome host persistente del " +"sistema" + +# [NdT] si tratta di un messaggio che descrive un'azione +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "" +"La politica di sistema impedisce di condividere connessioni attraverso una " +"rete WiFi protetta" + +# [NdT] si tratta di un messaggio che descrive un'azione +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "" +"La politica di sistema impedisce di condividere connessioni attraverso una " +"rete WiFi aperta" + diff --git a/po/ja.po b/po/ja.po index 55eed6cd5e..7dc8ba50fc 100644 --- a/po/ja.po +++ b/po/ja.po @@ -1,819 +1,1346 @@ +# translation of ja.po to Japanese # Japanese translation for NetworkManager # Copyright (C) 2005 Dan Williams # This file is distributed under the same license as the NetworkManager package. -# Satoru SATOH , 2005-2007. # +# Satoru SATOH , 2005-2007. +# Kiyoto Hashida , 2010. msgid "" msgstr "" -"Project-Id-Version: NetworkManager trunk\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-07-23 00:33+0900\n" -"PO-Revision-Date: 2007-07-23 01:47+0900\n" -"Last-Translator: Satoru SATOH \n" -"Language-Team: Japanese \n" +"Project-Id-Version: ja\n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager&component=general\n" +"POT-Creation-Date: 2010-04-30 03:24+0000\n" +"PO-Revision-Date: 2010-05-07 18:50+0900\n" +"Last-Translator: Kiyoto Hashida \n" +"Language-Team: Japanese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" +"Plural-Forms: Plural-Forms: nplurals=1; plural=0;\n\n" +"\n" +"\n" +"\n" +"X-Generator: KBabel 1.11.4\n" -#: ../gnome/vpn-properties/nm-vpn-properties.c:417 -msgid "Cannot add VPN connection" -msgstr "VPN 接続を追加できません" - -#: ../gnome/vpn-properties/nm-vpn-properties.c:419 -msgid "" -"No suitable VPN software was found on your system. Contact your system " -"administrator." -msgstr "" -"適切な VPN ソフトウェアがシステム上にみつかりませんでした。システム管理者に連" -"絡してください。" - -#: ../gnome/vpn-properties/nm-vpn-properties.c:461 -msgid "Cannot import VPN connection" -msgstr "VPN 接続をインポートできません" - -#: ../gnome/vpn-properties/nm-vpn-properties.c:463 +#: ../cli/src/connections.c:86 #, c-format msgid "" -"Cannot find suitable software for VPN connection type '%s' to import the " -"file '%s'. Contact your system administrator." +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" msgstr "" -"ファイル '%s' をインポートするための VPN 接続タイプ '%s' 用の適切なソフトウェ" -"アがシステム上にみつかりませんでした。システム管理者に連絡してください。" +"使用法: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" -#: ../gnome/vpn-properties/nm-vpn-properties.c:580 +#: ../cli/src/connections.c:158 +msgid "Connections" +msgstr "接続" + +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/devices.c:298 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "Type" +msgstr "タイプ" + +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "UUID" +msgstr "UUID" + +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Name" +msgstr "名前" + +#: ../cli/src/connections.c:163 #, c-format -msgid "Error retrieving VPN connection '%s'" -msgstr "VPN 接続 '%s' 読み出し中にエラー" +msgid "System connections:\n" +msgstr "システム接続:\n" -#: ../gnome/vpn-properties/nm-vpn-properties.c:583 +#: ../cli/src/connections.c:167 #, c-format -msgid "" -"Could not find the UI files for VPN connection type '%s'. Contact your " -"system administrator." -msgstr "" -"VPN 接続タイプ '%s' の UI ファイルをみつけられませんでした。システム管理者に" -"連絡してください。" +msgid "User connections:\n" +msgstr "ユーザー接続:\n" -#: ../gnome/vpn-properties/nm-vpn-properties.c:727 +#: ../cli/src/connections.c:178 ../cli/src/connections.c:967 +#: ../cli/src/connections.c:983 ../cli/src/connections.c:992 +#: ../cli/src/connections.c:1003 ../cli/src/connections.c:1085 +#: ../cli/src/devices.c:604 ../cli/src/devices.c:614 ../cli/src/devices.c:699 +#: ../cli/src/devices.c:785 ../cli/src/devices.c:792 #, c-format -msgid "Delete VPN connection \"%s\"?" -msgstr "VPN 接続 \"%s\" を削除しますか?" +msgid "Error: %s argument is missing." +msgstr "エラー: %s 引数がありません。" -#: ../gnome/vpn-properties/nm-vpn-properties.c:730 +#: ../cli/src/connections.c:189 #, c-format -msgid "" -"All information about the VPN connection \"%s\" will be lost and you may " -"need your system administrator to provide information to create a new " -"connection." -msgstr "" -"VPN 接続 \"%s\" についてすべての情報が失われ、新しい接続を作成するにはシステ" -"ム管理者に情報を提供してもらう必要があります。" +msgid "Error: %s - no such connection." +msgstr "エラー: %s - そのような接続はありません。" -#: ../gnome/vpn-properties/nm-vpn-properties.c:924 -msgid "Unable to load" -msgstr "読み込めません" +#: ../cli/src/connections.c:196 +msgid "System-wide connections" +msgstr "システム全域接続" -#: ../gnome/vpn-properties/nm-vpn-properties.c:926 -msgid "Cannot find some needed resources (the glade file)!" -msgstr "必要ないくつかのリソース (glade ファイル) をみつけられません!" +#: ../cli/src/connections.c:205 +msgid "User connections" +msgstr "ユーザー接続" -#. druid_window = GTK_DIALOG (gtk_dialog_new_with_buttons (_("Create VPN Connection"), -#. NULL, -#. GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, -#. GTK_STOCK_CANCEL, -#. GTK_RESPONSE_REJECT, -#. GTK_STOCK_APPLY, -#. GTK_RESPONSE_ACCEPT, -#. NULL)); -#: ../gnome/vpn-properties/nm-vpn-properties.c:1081 -msgid "Create VPN Connection" -msgstr "VPN 接続を作成" +#: ../cli/src/connections.c:212 ../cli/src/connections.c:1016 +#: ../cli/src/connections.c:1103 ../cli/src/devices.c:446 +#: ../cli/src/devices.c:494 ../cli/src/devices.c:628 ../cli/src/devices.c:706 +#: ../cli/src/devices.c:798 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "不明なパラメータ: %s\n" -#. gtk_container_add (GTK_CONTAINER (druid_window->vbox), GTK_WIDGET(gtk_label_new("Some label"))); -#. gtk_box_pack_start (GTK_BOX (druid_window->vbox), GTK_WIDGET(druid), TRUE,TRUE,0); -#. gtk_box_pack_start (GTK_BOX (druid_window->vbox), GTK_WIDGET(gtk_label_new("Some label")), TRUE,TRUE,0); -#. toplevel = gtk_widget_get_toplevel (GTK_WIDGET (druid)); -#. gtk_signal_connect (GTK_OBJECT (toplevel), "delete_event", GTK_SIGNAL_FUNC (vpn_window_close), NULL); -#. make the druid window modal wrt. our main window -#. gtk_window_set_modal (druid_window, TRUE); -#. gtk_window_set_transient_for (GTK_WINDOW(druid_window), GTK_WINDOW (dialog)); -#. Edit dialog -#: ../gnome/vpn-properties/nm-vpn-properties.c:1099 -msgid "Edit VPN Connection" -msgstr "VPN 接続を編集" +#: ../cli/src/connections.c:221 +#, c-format +msgid "Error: no valid parameter specified." +msgstr "エラー: 有効なパラメータが指定されていません。" -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:1 -msgid "Add a new VPN connection" -msgstr "新しい VPN 接続を追加" +#. FIXME: Fix the output +#: ../cli/src/connections.c:268 ../cli/src/devices.c:302 +#: ../cli/src/devices.c:321 ../cli/src/devices.c:353 ../cli/src/devices.c:355 +#: ../cli/src/devices.c:357 ../cli/src/devices.c:359 ../cli/src/devices.c:361 +msgid "yes" +msgstr "はい" -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:2 -msgid "Delete the selected VPN connection" -msgstr "選択した VPN 接続を削除" +#: ../cli/src/connections.c:268 ../cli/src/devices.c:304 +msgid "no" +msgstr "いいえ" -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:3 -msgid "E_xport" -msgstr "エクスポート(_X)" +#: ../cli/src/connections.c:297 +msgid "Active connections" +msgstr "アクティブな接続" -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:4 -msgid "Edit the selected VPN connection" -msgstr "選択した VPN 接続を編集" +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +#: ../cli/src/devices.c:302 ../cli/src/devices.c:304 +msgid "Default" +msgstr "デフォルト" -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:5 -msgid "Export the VPN settings to a file" -msgstr "VPN 設定をファイルにエクスポート" +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Service" +msgstr "サービス" -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:6 -msgid "Export the selected VPN connection to a file" -msgstr "選択した VPN 接続をファイルにエクスポート" +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Devices" +msgstr "デバイス" -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:7 -msgid "Manage Virtual Private Network Connections" -msgstr "仮想プライベートネットワーク (VPN) 接続を管理" +#: ../cli/src/connections.c:659 +#, c-format +msgid "no active connection on device '%s'" +msgstr "デバイス '%s'上にアクティブな接続がありません" -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:8 -msgid "VPN Connections" +#: ../cli/src/connections.c:667 +#, c-format +msgid "no active connection or device" +msgstr "アクティブな接続、又はデバイスがありません" + +#: ../cli/src/connections.c:730 +msgid "activating" +msgstr "アクティベート中" + +#: ../cli/src/connections.c:732 +msgid "activated" +msgstr "アクティベート済み" + +#: ../cli/src/connections.c:735 ../cli/src/connections.c:758 +#: ../cli/src/connections.c:791 ../cli/src/devices.c:111 +#: ../cli/src/network-manager.c:76 ../cli/src/network-manager.c:98 +msgid "unknown" +msgstr "不明" + +#: ../cli/src/connections.c:744 +msgid "VPN connecting (prepare)" +msgstr "VPN 接続(準備)" + +#: ../cli/src/connections.c:746 +msgid "VPN connecting (need authentication)" +msgstr "VPN 接続(認証が必要)" + +#: ../cli/src/connections.c:748 +msgid "VPN connecting" msgstr "VPN 接続" -#: ../src/nm-ap-security-wep.c:52 -msgid "40-bit WEP" -msgstr "40-bit WEP" +#: ../cli/src/connections.c:750 +msgid "VPN connecting (getting IP configuration)" +msgstr "VPN 接続(IP 設定を取得)" -#: ../src/nm-ap-security-wep.c:54 -msgid "104-bit WEP" -msgstr "104-bit WEP" +#: ../cli/src/connections.c:752 +msgid "VPN connected" +msgstr "VPN 接続済み" -#: ../src/nm-ap-security-wpa-psk.c:51 -msgid "WPA TKIP" -msgstr "WPA TKIP" +#: ../cli/src/connections.c:754 +msgid "VPN connection failed" +msgstr "VPN 接続失敗" -#: ../src/nm-ap-security-wpa-psk.c:53 -msgid "WPA CCMP" -msgstr "WPA CCMP" +#: ../cli/src/connections.c:756 +msgid "VPN disconnected" +msgstr "VPN 切断済み" -#: ../src/nm-ap-security-wpa-psk.c:55 -msgid "WPA Automatic" -msgstr "WPA 自動" +#: ../cli/src/connections.c:767 +msgid "unknown reason" +msgstr "不明な理由" -#: ../src/nm-ap-security-wpa-psk.c:60 -msgid "WPA2 TKIP" -msgstr "WPA2 TKIP" - -#: ../src/nm-ap-security-wpa-psk.c:62 -msgid "WPA2 CCMP" -msgstr "WPA2 CCMP" - -#: ../src/nm-ap-security-wpa-psk.c:64 -msgid "WPA2 Automatic" -msgstr "WPA2 自動" - -#: ../src/nm-ap-security.c:326 +#: ../cli/src/connections.c:769 msgid "none" msgstr "なし" -#: ../src/nm-netlink-monitor.c:174 +#: ../cli/src/connections.c:771 +msgid "the user was disconnected" +msgstr "ユーザーの接続が切断されました。" + +#: ../cli/src/connections.c:773 +msgid "the base network connection was interrupted" +msgstr "基本ネットワーク接続が妨害されました。" + +#: ../cli/src/connections.c:775 +msgid "the VPN service stopped unexpectedly" +msgstr "VPN サービスが予期しない停止をしました" + +#: ../cli/src/connections.c:777 +msgid "the VPN service returned invalid configuration" +msgstr "VPN サービスは無効な設定を返しました" + +#: ../cli/src/connections.c:779 +msgid "the connection attempt timed out" +msgstr "接続試行は時間切れです" + +#: ../cli/src/connections.c:781 +msgid "the VPN service did not start in time" +msgstr "VPN サービスは時間内に開始していません" + +#: ../cli/src/connections.c:783 +msgid "the VPN service failed to start" +msgstr "VPN サービスの開始は失敗しました" + +#: ../cli/src/connections.c:785 +msgid "no valid VPN secrets" +msgstr "有効な VPN シークレットはありません" + +#: ../cli/src/connections.c:787 +msgid "invalid VPN secrets" +msgstr "無効な VPN シークレット" + +#: ../cli/src/connections.c:789 +msgid "the connection was removed" +msgstr "接続は削除されました" + +#: ../cli/src/connections.c:803 +#, c-format +msgid "state: %s\n" +msgstr "状態: %s\n" + +#: ../cli/src/connections.c:806 ../cli/src/connections.c:832 +#, c-format +msgid "Connection activated\n" +msgstr "接続はアクティベート済み\n" + +#: ../cli/src/connections.c:809 +#, c-format +msgid "Error: Connection activation failed." +msgstr "エラー: 接続のアクティベーションに失敗" + +#: ../cli/src/connections.c:828 +#, c-format +msgid "state: %s (%d)\n" +msgstr "状態: %s (%d)\n" + +#: ../cli/src/connections.c:838 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "エラー: 接続のアクティベーションに失敗: %s." + +#: ../cli/src/connections.c:855 ../cli/src/devices.c:551 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "エラー: 制限時間の %d 秒が経過" + +#: ../cli/src/connections.c:898 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "エラー: 接続のアクティベーションに失敗: %s" + +#: ../cli/src/connections.c:912 +#, c-format +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "エラー: '%s'用のアクティブ接続の取得に失敗" + +#: ../cli/src/connections.c:921 +#, c-format +msgid "Active connection state: %s\n" +msgstr "アクティブ接続の状態: %s\n" + +#: ../cli/src/connections.c:922 +#, c-format +msgid "Active connection path: %s\n" +msgstr "アクティブ接続のパス: %s\n" + +#: ../cli/src/connections.c:976 ../cli/src/connections.c:1094 +#, c-format +msgid "Error: Unknown connection: %s." +msgstr "エラー: 不明な接続: %s" + +#: ../cli/src/connections.c:1011 ../cli/src/devices.c:622 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "エラー: 制限時間値の '%s' は有効でありません" + +#: ../cli/src/connections.c:1024 ../cli/src/connections.c:1111 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "エラー: id か又は uuid の指定が必要です" + +#: ../cli/src/connections.c:1044 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "エラー: 適切なデバイスが見付かりません: %s" + +#: ../cli/src/connections.c:1046 +#, c-format +msgid "Error: No suitable device found." +msgstr "エラー: 適切なデバイスが見付かりません" + +#: ../cli/src/connections.c:1138 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "警告: 接続はアクティブでありません\n" + +#: ../cli/src/connections.c:1189 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "エラー: 'con' コマンド '%s' は有効ではありません" + +#: ../cli/src/connections.c:1216 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "エラー: D-Bus に接続できませんでした" + +#: ../cli/src/connections.c:1223 +#, c-format +msgid "Error: Could not get system settings." +msgstr "エラー: システム設定を取得できませんでした" + +#: ../cli/src/connections.c:1231 +#, c-format +msgid "Error: Could not get user settings." +msgstr "エラー: ユーザー設定を取得できませんでした" + +#: ../cli/src/connections.c:1241 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "エラー: 接続を取得できません: 設定サービスが稼働していません" + +#: ../cli/src/devices.c:73 #, c-format msgid "" -"unable to create netlink socket for monitoring wired ethernet devices - %s" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] | apinfo iface hwaddr ]\n" +"\n" msgstr "" -"有線 Ethernet デバイスを監視するためのネットリンクソケットを作成できません - " -"%s" +"使用法: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] | apinfo iface hwaddr ]\n" +"\n" -#: ../src/nm-netlink-monitor.c:192 +#: ../cli/src/devices.c:93 +msgid "unmanaged" +msgstr "管理無し" + +#: ../cli/src/devices.c:95 +msgid "unavailable" +msgstr "利用不可" + +#: ../cli/src/devices.c:97 ../cli/src/network-manager.c:73 +msgid "disconnected" +msgstr "切断済み" + +#: ../cli/src/devices.c:99 +msgid "connecting (prepare)" +msgstr "接続中(準備)" + +#: ../cli/src/devices.c:101 +msgid "connecting (configuring)" +msgstr "接続中(設定中)" + +#: ../cli/src/devices.c:103 +msgid "connecting (need authentication)" +msgstr "接続中(認証が必要)" + +#: ../cli/src/devices.c:105 +msgid "connecting (getting IP configuration)" +msgstr "接続中(IP 設定を取得中)" + +#: ../cli/src/devices.c:107 ../cli/src/network-manager.c:71 +msgid "connected" +msgstr "接続済み" + +#: ../cli/src/devices.c:109 +msgid "connection failed" +msgstr "接続に失敗" + +#: ../cli/src/devices.c:132 ../cli/src/devices.c:876 +msgid "Unknown" +msgstr "不明" + +#. print them +#: ../cli/src/devices.c:164 ../cli/src/devices.c:266 ../cli/src/devices.c:861 +#: ../cli/src/devices.c:879 +msgid "(none)" +msgstr "(なし)" + +#: ../cli/src/devices.c:209 +#, c-format +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s: IP4 アドレス 0x%X を変換中にエラー発生" + +#: ../cli/src/devices.c:238 +#, c-format +msgid "%s, %s, Freq %d MHz, Rate %d Mb/s, Strength %d" +msgstr "%s, %s, 周波数 %d MHz, レート %d Mb/s, 強さ %d" + +#: ../cli/src/devices.c:239 +msgid "Ad-Hoc" +msgstr "アドホック" + +#: ../cli/src/devices.c:248 +msgid ", Encrypted: " +msgstr ", 暗号化:" + +#: ../cli/src/devices.c:253 +msgid " WEP" +msgstr " WEP" + +#: ../cli/src/devices.c:255 +msgid " WPA" +msgstr " WPA" + +#: ../cli/src/devices.c:257 +msgid " WPA2" +msgstr " WPA2" + +#: ../cli/src/devices.c:260 +msgid " Enterprise" +msgstr " Enterprise" + +#: ../cli/src/devices.c:294 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "Device" +msgstr "デバイス" + +#: ../cli/src/devices.c:299 +msgid "Driver" +msgstr "ドライバー" + +#: ../cli/src/devices.c:299 ../cli/src/devices.c:567 +msgid "(unknown)" +msgstr "(不明)" + +#: ../cli/src/devices.c:300 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "State" +msgstr "状態" + +#: ../cli/src/devices.c:313 +msgid "HW Address" +msgstr "HW アドレス" + +#: ../cli/src/devices.c:319 #, c-format msgid "" -"unable to bind to netlink socket for monitoring wired ethernet devices - %s" +"\n" +" Capabilities:\n" msgstr "" -"有線 Ethernet デバイスを監視するためのネットリンクソケットをバインドできませ" -"ん - %s" +"\n" +" 能力:\n" -#: ../src/nm-netlink-monitor.c:416 -msgid "operation took too long" -msgstr "処理に時間がかかりすぎています" +#: ../cli/src/devices.c:321 +msgid "Carrier Detect" +msgstr "キャリア検出" -#: ../src/nm-netlink-monitor.c:513 -msgid "received data from wrong type of sender" -msgstr "間違ったタイプの送り先からデータを受信しました" +#: ../cli/src/devices.c:336 +#, c-format +msgid "%u Mb/s" +msgstr "%u Mb/s" -#: ../src/nm-netlink-monitor.c:526 -msgid "received data from unexpected sender" -msgstr "予期しない送り先からデータを受信しました" +#: ../cli/src/devices.c:337 +msgid "Speed" +msgstr "速度" -#: ../src/nm-netlink-monitor.c:655 -msgid "too much data was sent over socket and some of it was lost" -msgstr "ソケットを介して送信されたデータが多すぎたためいくらか失われました" +#: ../cli/src/devices.c:348 +#, c-format +msgid "" +"\n" +" Wireless Properties\n" +msgstr "" +"\n" +" 無線接続のプロパティ\n" -#: ../src/nm-netlink-monitor.c:755 +#: ../cli/src/devices.c:353 +msgid "WEP Encryption" +msgstr "WEP 暗号化" + +#: ../cli/src/devices.c:355 +msgid "WPA Encryption" +msgstr "WPA 暗号化" + +#: ../cli/src/devices.c:357 +msgid "WPA2 Encryption" +msgstr "WPA2 暗号化" + +#: ../cli/src/devices.c:359 +msgid "TKIP cipher" +msgstr "TKIP 暗号" + +#: ../cli/src/devices.c:361 +msgid "CCMP cipher" +msgstr "CCMP 暗号" + +#: ../cli/src/devices.c:368 +#, c-format +msgid "" +"\n" +" Wireless Access Points %s\n" +msgstr "" +"\n" +" 無線アクセスポイント %s\n" + +#: ../cli/src/devices.c:368 +msgid "(* = current AP)" +msgstr "(* = 現在の AP)" + +#: ../cli/src/devices.c:374 +#, c-format +msgid "" +"\n" +" Wired Properties\n" +msgstr "" +"\n" +" 有線接続のプロパティ\n" + +#: ../cli/src/devices.c:377 ../cli/src/devices.c:379 +msgid "Carrier" +msgstr "キャリア" + +#: ../cli/src/devices.c:377 +msgid "on" +msgstr "オン" + +#: ../cli/src/devices.c:379 +msgid "off" +msgstr "オフ" + +#: ../cli/src/devices.c:387 +#, c-format +msgid "" +"\n" +" IPv4 Settings:\n" +msgstr "" +"\n" +" IPv4 セッティング:\n" + +#: ../cli/src/devices.c:395 +msgid "Address" +msgstr "アドレス" + +#: ../cli/src/devices.c:401 +msgid "Prefix" +msgstr "接頭辞" + +#: ../cli/src/devices.c:405 +msgid "Gateway" +msgstr "ゲートウェイ" + +#: ../cli/src/devices.c:416 +msgid "DNS" +msgstr "DNS" + +#: ../cli/src/devices.c:458 +msgid "Status of devices" +msgstr "デバイスのステータス" + +#: ../cli/src/devices.c:487 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "エラー: '%s' 引数がありません。" + +#: ../cli/src/devices.c:516 ../cli/src/devices.c:655 ../cli/src/devices.c:729 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "エラー: デバイス'%s' が見付かりません" + +#: ../cli/src/devices.c:539 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "成功: デバイス '%s' は正常に切断されました。" + +#: ../cli/src/devices.c:564 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "エラー: デバイス '%s' (%s) の切断に失敗しました: %s" + +#: ../cli/src/devices.c:572 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "デバイスの状態: %d (%s)\n" + +#: ../cli/src/devices.c:636 +#, c-format +msgid "Error: iface has to be specified." +msgstr "エラー: iface を指定する必要があります。" + +#: ../cli/src/devices.c:736 ../cli/src/devices.c:746 +msgid "WiFi scan list" +msgstr "WiFi スキャン一覧" + +#: ../cli/src/devices.c:740 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "エラー: デバイス '%s' は WiFi デバイスではありません。" + +#: ../cli/src/devices.c:754 +msgid "Device:" +msgstr "デバイス:" + +#: ../cli/src/devices.c:806 +#, c-format +msgid "Error: hwaddr has to be specified." +msgstr "エラー: hwaddr を指定する必要があります。" + +#: ../cli/src/devices.c:844 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "エラー: hwaddr '%s' のアクセスポイントが見付かりません" + +#: ../cli/src/devices.c:862 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" + +#: ../cli/src/devices.c:863 +#, c-format +msgid "%u MB/s" +msgstr "%u MB/s" + +#: ../cli/src/devices.c:869 ../cli/src/devices.c:871 +msgid "AP parameters" +msgstr "AP パラメータ" + +#: ../cli/src/devices.c:873 +msgid "SSID:" +msgstr "SSID:" + +#: ../cli/src/devices.c:874 +msgid "BSSID:" +msgstr "BSSID:" + +#: ../cli/src/devices.c:875 +msgid "Frequency:" +msgstr "周波数:" + +#: ../cli/src/devices.c:876 +msgid "Mode:" +msgstr "モード:" + +#: ../cli/src/devices.c:876 +msgid "Ad-hoc" +msgstr "アドホック" + +#: ../cli/src/devices.c:876 +msgid "Infrastructure" +msgstr "インフラストラクチャ" + +#: ../cli/src/devices.c:877 +msgid "Maximal bitrate:" +msgstr "最大ビットレート:" + +#: ../cli/src/devices.c:878 +msgid "Strength:" +msgstr "強さ:" + +#: ../cli/src/devices.c:879 +msgid "Flags:" +msgstr "フラグ:" + +#: ../cli/src/devices.c:879 +msgid "privacy" +msgstr "プライバシー" + +#: ../cli/src/devices.c:880 +msgid "WPA flags:" +msgstr "WPA フラグ:" + +#: ../cli/src/devices.c:881 +msgid "RSN flags:" +msgstr "RSN フラグ:" + +#: ../cli/src/devices.c:907 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "エラー: 'dev wifi' コマンド '%s' は無効です。" + +#: ../cli/src/devices.c:943 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "エラー: 'dev' コマンド '%s' は無効です。" + +#: ../cli/src/network-manager.c:46 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" +msgstr "" +"使用法: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + +#: ../cli/src/network-manager.c:67 +msgid "asleep" +msgstr "休止中" + +#: ../cli/src/network-manager.c:69 +msgid "connecting" +msgstr "接続中" + +#: ../cli/src/network-manager.c:93 ../cli/src/network-manager.c:94 +#: ../cli/src/network-manager.c:95 ../cli/src/network-manager.c:96 +#: ../cli/src/network-manager.c:143 ../cli/src/network-manager.c:160 +msgid "enabled" +msgstr "有効" + +#: ../cli/src/network-manager.c:93 ../cli/src/network-manager.c:94 +#: ../cli/src/network-manager.c:95 ../cli/src/network-manager.c:96 +#: ../cli/src/network-manager.c:143 ../cli/src/network-manager.c:160 +msgid "disabled" +msgstr "無効" + +#: ../cli/src/network-manager.c:102 +msgid "NetworkManager status" +msgstr "NetworkManager のステータス" + +#: ../cli/src/network-manager.c:104 +msgid "NM running:" +msgstr "NM が実行中:" + +#: ../cli/src/network-manager.c:104 +msgid "running" +msgstr "実行中" + +#: ../cli/src/network-manager.c:104 +msgid "not running" +msgstr "実行していません" + +#: ../cli/src/network-manager.c:105 +msgid "NM state:" +msgstr "NM の状態: " + +#: ../cli/src/network-manager.c:106 +msgid "NM wireless hardware:" +msgstr "NM ワイヤレスハードウェア:" + +#. no argument, show current state +#: ../cli/src/network-manager.c:107 ../cli/src/network-manager.c:143 +msgid "NM wireless:" +msgstr "NM ワイヤレス:" + +#: ../cli/src/network-manager.c:108 +msgid "NM WWAN hardware:" +msgstr "NM WWAN ハードウェア:" + +#. no argument, show current state +#: ../cli/src/network-manager.c:109 ../cli/src/network-manager.c:160 +msgid "NM WWAN:" +msgstr "NM WWAN:" + +#: ../cli/src/network-manager.c:150 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "エラー: 無効な'wifi' パラメータ: '%s'" + +#: ../cli/src/network-manager.c:167 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "エラー: 無効な'wwan' パラメータ: '%s'" + +#: ../cli/src/network-manager.c:178 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "エラー: 'nm' コマンド '%s' は無効です。" + +#: ../cli/src/nmcli.c:65 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"使用法: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" + +#: ../cli/src/nmcli.c:106 +#, c-format +msgid "Object '%s' is unknown, try 'nmcli help'." +msgstr "オブジェクト'%s' は不明です。'nmcli help' を試して下さい。" + +#: ../cli/src/nmcli.c:139 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "nmcli ツール、バージョン %s\n" + +#: ../cli/src/nmcli.c:145 +#, c-format +msgid "Option '%s' is unknown, try 'nmcli -help'." +msgstr "オプション '%s' は不明です、'nmcli -help' を試して下さい。" + +#: ../cli/src/nmcli.c:164 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "シグナル %d が出ました、シャットダウンします..." + +#: ../cli/src/nmcli.c:189 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "エラー: NetworkManager へ接続出来ませんでした。" + +#: ../cli/src/nmcli.c:205 +msgid "Success" +msgstr "成功" + +#: ../libnm-util/crypto.c:120 +#, c-format +msgid "PEM key file had no end tag '%s'." +msgstr "PEM キーファイルは終了タグ '%s' を持ちません。" + +#: ../libnm-util/crypto.c:130 +#, c-format +msgid "Doesn't look like a PEM private key file." +msgstr "PEM プライベートキーファイルではないようです。" + +#: ../libnm-util/crypto.c:138 +#, c-format +msgid "Not enough memory to store PEM file data." +msgstr "PEM ファイルデータの保存に十分なメモリーがありません。" + +#: ../libnm-util/crypto.c:154 +#, c-format +msgid "Malformed PEM file: Proc-Type was not first tag." +msgstr "不正形式の PEM ファイル: Proc-Type は最初のタグではありません。" + +#: ../libnm-util/crypto.c:162 +#, c-format +msgid "Malformed PEM file: unknown Proc-Type tag '%s'." +msgstr "不正形式の PEM ファイル: 不明な Proc-Type タグ '%s' です。" + +#: ../libnm-util/crypto.c:172 +#, c-format +msgid "Malformed PEM file: DEK-Info was not the second tag." +msgstr "不正形式の PEM ファイル: DEK-Info は2つ目のタグではありません。" + +#: ../libnm-util/crypto.c:183 +#, c-format +msgid "Malformed PEM file: no IV found in DEK-Info tag." +msgstr "不正形式の PEM ファイル: DEK-Info タグ内に IV が見付かりません。" + +#: ../libnm-util/crypto.c:190 +#, c-format +msgid "Malformed PEM file: invalid format of IV in DEK-Info tag." +msgstr "不正形式の PEM ファイル: DEK-Info タグ内に無効な形式の IV" + +#: ../libnm-util/crypto.c:203 +#, c-format +msgid "Malformed PEM file: unknown private key cipher '%s'." +msgstr "不正形式の PEM ファイル: 不明なプライベートキー暗号文 '%s'。" + +#: ../libnm-util/crypto.c:222 +#, c-format +msgid "Could not decode private key." +msgstr "プライベートキーを復号できませんでした。" + +#: ../libnm-util/crypto.c:267 +#, c-format +msgid "PEM certificate '%s' had no end tag '%s'." +msgstr "PEM 証明書 '%s' は終了タグ '%s'持ちません。" + +#: ../libnm-util/crypto.c:277 +#, c-format +msgid "Failed to decode certificate." +msgstr "証明書の復号に失敗しました。" + +#: ../libnm-util/crypto.c:286 +#, c-format +msgid "Not enough memory to store certificate data." +msgstr "証明書データの保存に十分なメモリーがありません。" + +#: ../libnm-util/crypto.c:294 +#, c-format +msgid "Not enough memory to store file data." +msgstr "ファイルデータの保存に十分なメモリーがありません。" + +#: ../libnm-util/crypto.c:324 +#, c-format +msgid "IV must be an even number of bytes in length." +msgstr "IV はその長さで偶数のバイト数でなければなりません。" + +#: ../libnm-util/crypto.c:333 +#, c-format +msgid "Not enough memory to store the IV." +msgstr "IV の保存に十分なメモリーがありません。" + +#: ../libnm-util/crypto.c:344 +#, c-format +msgid "IV contains non-hexadecimal digits." +msgstr "IV は 16進法でない数字を含んでいます。" + +#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:336 +#, c-format +msgid "Private key cipher '%s' was unknown." +msgstr "プライベートキー暗号文 '%s' は不明です。" + +#: ../libnm-util/crypto.c:391 +#, c-format +msgid "Not enough memory to decrypt private key." +msgstr "プライベートキーの解読に十分なメモリーがありません。" + +#: ../libnm-util/crypto.c:511 +#, c-format +msgid "Unable to determine private key type." +msgstr "プライベートキーのタイプを判定できません。" + +#: ../libnm-util/crypto.c:530 +#, c-format +msgid "Not enough memory to store decrypted private key." +msgstr "復号したプライベートキーの保存に十分なメモリーがありません。" + +#: ../libnm-util/crypto_gnutls.c:49 +msgid "Failed to initialize the crypto engine." +msgstr "暗号化エンジンの初期化に失敗しました。" + +#: ../libnm-util/crypto_gnutls.c:93 +#, c-format +msgid "Failed to initialize the MD5 engine: %s / %s." +msgstr "MD5 エンジンの初期化に失敗しました: %s / %s" + +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "IV の長さが無効です (最低 %zd の長さが必要)。" + +#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188 +#, c-format +msgid "Not enough memory for decrypted key buffer." +msgstr "復号したキーバッファ用に十分なメモリーがありません。" + +#: ../libnm-util/crypto_gnutls.c:173 +#, c-format +msgid "Failed to initialize the decryption cipher context: %s / %s." +msgstr "復号化暗号文コンテキストの初期化に失敗しました: %s / %s。" + +#: ../libnm-util/crypto_gnutls.c:182 +#, c-format +msgid "Failed to set symmetric key for decryption: %s / %s." +msgstr "復号用のシンメトリックキーの設定に失敗しました: %s / %s。" + +#: ../libnm-util/crypto_gnutls.c:191 +#, c-format +msgid "Failed to set IV for decryption: %s / %s." +msgstr "復号用の IV の設定に失敗しました: %s / %s。" + +#: ../libnm-util/crypto_gnutls.c:200 +#, c-format +msgid "Failed to decrypt the private key: %s / %s." +msgstr "プライベートキーの復号に失敗しました: %s / %s。" + +#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 +#, c-format +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "プライベートキーの復号に失敗しました: 予想外の不要語句の長さです。" + +#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 +#, c-format +msgid "Failed to decrypt the private key." +msgstr "プライベートキーの復号に失敗しました。" + +#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "暗号化用のメモリー割り当てが出来ませんでした。" + +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "暗号化暗号文コンテキストの初期化に失敗しました: %s / %s。" + +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "暗号化用のシンメトリックキーの設定に失敗しました: %s / %s。" + +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +msgid "Failed to set IV for encryption: %s / %s." +msgstr "暗号化用の IV の設定に失敗しました: %s / %s。" + +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +msgid "Failed to encrypt the data: %s / %s." +msgstr "データの暗号化に失敗しました: %s / %s。" + +#: ../libnm-util/crypto_gnutls.c:362 +#, c-format +msgid "Error initializing certificate data: %s" +msgstr "証明書データの初期化にエラー発生: %s" + +#: ../libnm-util/crypto_gnutls.c:384 +#, c-format +msgid "Couldn't decode certificate: %s" +msgstr "証明書をデコードできませんでした: %s" + +#: ../libnm-util/crypto_gnutls.c:408 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %s" +msgstr "PKCS#12 デコーダを初期化できません: %s" + +#: ../libnm-util/crypto_gnutls.c:421 +#, c-format +msgid "Couldn't decode PKCS#12 file: %s" +msgstr "PKCS#12 ファイルをデコードできません: %s" + +#: ../libnm-util/crypto_gnutls.c:433 +#, c-format +msgid "Couldn't verify PKCS#12 file: %s" +msgstr "PKCS#12 ファイルを確証できません: %s" + +#: ../libnm-util/crypto_nss.c:56 +#, c-format +msgid "Failed to initialize the crypto engine: %d." +msgstr "暗号化エンジンの初期化に失敗しました: %d。" + +#: ../libnm-util/crypto_nss.c:111 +#, c-format +msgid "Failed to initialize the MD5 context: %d." +msgstr "MD5 コンテキストの初期化に失敗しました: %d。" + +#: ../libnm-util/crypto_nss.c:179 +#, c-format +msgid "Invalid IV length (must be at least %d)." +msgstr "IV の長さが無効です (最低でも %d は必要)。" + +#: ../libnm-util/crypto_nss.c:196 +#, c-format +msgid "Failed to initialize the decryption cipher slot." +msgstr "復号化暗号文スロットの初期化に失敗しました。" + +#: ../libnm-util/crypto_nss.c:206 +#, c-format +msgid "Failed to set symmetric key for decryption." +msgstr "復号化用シンメトリックキーの設定に失敗しました。" + +#: ../libnm-util/crypto_nss.c:216 +#, c-format +msgid "Failed to set IV for decryption." +msgstr "復号化用 IV の設定に失敗しました。" + +#: ../libnm-util/crypto_nss.c:224 +#, c-format +msgid "Failed to initialize the decryption context." +msgstr "復号化コンテキストの初期化に失敗しました。" + +#: ../libnm-util/crypto_nss.c:237 +#, c-format +msgid "Failed to decrypt the private key: %d." +msgstr "プライベートキーの復号に失敗しました: %d" + +#: ../libnm-util/crypto_nss.c:245 +#, c-format +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "プライベートキーの復号に失敗しました: 復号したデータが大きすぎます。" + +#: ../libnm-util/crypto_nss.c:256 +#, c-format +msgid "Failed to finalize decryption of the private key: %d." +msgstr "プライベートキー復号化の完了に失敗しました: %d" + +#: ../libnm-util/crypto_nss.c:364 +#, c-format +msgid "Failed to initialize the encryption cipher slot." +msgstr "暗号化暗号文スロットの初期化に失敗しました。" + +#: ../libnm-util/crypto_nss.c:372 +#, c-format +msgid "Failed to set symmetric key for encryption." +msgstr "暗号化用のシンメトリックキーの設定に失敗しました。" + +#: ../libnm-util/crypto_nss.c:380 +#, c-format +msgid "Failed to set IV for encryption." +msgstr "暗号化用の IV の設定に失敗しました。" + +#: ../libnm-util/crypto_nss.c:388 +#, c-format +msgid "Failed to initialize the encryption context." +msgstr "暗号化コンテキストの初期化に失敗しました。" + +#: ../libnm-util/crypto_nss.c:396 +#, c-format +msgid "Failed to encrypt: %d." +msgstr "暗号化に失敗しました: %d" + +#: ../libnm-util/crypto_nss.c:404 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "暗号化の後に予期しないデータの量があります。" + +#: ../libnm-util/crypto_nss.c:447 +#, c-format +msgid "Couldn't decode certificate: %d" +msgstr "証明書のデコードが出来ません: %d" + +#: ../libnm-util/crypto_nss.c:482 +#, c-format +msgid "Couldn't convert password to UCS2: %d" +msgstr "パスワードを UCS2 に変換できません: %d" + +#: ../libnm-util/crypto_nss.c:510 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %d" +msgstr "PKCS#12 デコーダを初期化出来ません: %d" + +#: ../libnm-util/crypto_nss.c:519 +#, c-format +msgid "Couldn't decode PKCS#12 file: %d" +msgstr "PKCS#12 ファイルをデコード出来ません: %d" + +#: ../libnm-util/crypto_nss.c:528 +#, c-format +msgid "Couldn't verify PKCS#12 file: %d" +msgstr "PKCS#12 ファイルを確証出来ません: %d" + +#: ../libnm-util/crypto_nss.c:557 +msgid "Could not generate random data." +msgstr "ランダムデータを生成できません。" + +#: ../libnm-util/nm-utils.c:1924 +#, c-format +msgid "Not enough memory to make encryption key." +msgstr "暗号化キーを作成するのに十分なメモリーがありません。" + +#: ../libnm-util/nm-utils.c:2034 +msgid "Could not allocate memory for PEM file creation." +msgstr "PEM ファイル作成用にメモリーを割り当て出来ません。" + +#: ../libnm-util/nm-utils.c:2046 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "PEM ファイルへの IV の書き込み用にメモリーを割り当て出来ません。" + +#: ../libnm-util/nm-utils.c:2058 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "PEM ファイルへの暗号化キーの書き込み用にメモリーを割り当て出来ません。" + +#: ../libnm-util/nm-utils.c:2077 +#, c-format +msgid "Could not allocate memory for PEM file data." +msgstr "PEM ファイルデータ用にメモリーを割り当て出来ません。" + +#: ../src/nm-netlink-monitor.c:100 ../src/nm-netlink-monitor.c:231 +#: ../src/nm-netlink-monitor.c:653 +#, c-format +msgid "error processing netlink message: %s" +msgstr "netlink メッセージのプロセス中にエラー発生: %s" + +#: ../src/nm-netlink-monitor.c:214 msgid "error occurred while waiting for data on socket" msgstr "ソケット上でデータを待っている際にエラーが発生しました" -# そういう仕様の名前なので訳すべきでない。 -#: ../src/nm-ap-security-wpa-eap.c:93 ../src/nm-ap-security-wpa-eap.c:112 -msgid "WPA2 Enterprise" -msgstr "WPA2-Enterprise" +#: ../src/nm-netlink-monitor.c:254 +#, c-format +msgid "unable to connect to netlink for monitoring link status: %s" +msgstr "リンク状況監視用のネットリンクに接続できません: %s" + +#: ../src/nm-netlink-monitor.c:265 +#, c-format +msgid "unable to enable netlink handle credential passing: %s" +msgstr "netlink ハンドル信任情報の伝達を有効にできません: %s" + +#: ../src/nm-netlink-monitor.c:291 ../src/nm-netlink-monitor.c:353 +#, c-format +msgid "unable to allocate netlink handle for monitoring link status: %s" +msgstr "リンクステータス監視用のネットリンクハンドルを割り当て出来ません: %s" + +#: ../src/nm-netlink-monitor.c:376 +#, c-format +msgid "unable to allocate netlink link cache for monitoring link status: %s" +msgstr "リンク状況監視用のネットリンクのリンクキャッシュを割り当てできません: %s" + +#: ../src/nm-netlink-monitor.c:502 +#, c-format +msgid "unable to join netlink group: %s" +msgstr "netlink グループへ参加できません: %s" + +#: ../src/nm-netlink-monitor.c:629 ../src/nm-netlink-monitor.c:642 +#, c-format +msgid "error updating link cache: %s" +msgstr "リンクキャッシュの更新中にエラー: %s" + +#: ../src/main.c:502 +#, c-format +msgid "Invalid option. Please use --help to see a list of valid options.\n" +msgstr "無効なオプション。--help を使用して有効なオプションの一覧をご覧下さい。\n" + +#: ../src/main.c:562 +#, c-format +msgid "%s. Please use --help to see a list of valid options.\n" +msgstr "%s --help を使用して有効なオプションの一覧をご覧下さい。\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:325 +msgid "# Created by NetworkManager\n" +msgstr "# NetworkManager で作成されています\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:341 +#, c-format +msgid "" +"# Merged from %s\n" +"\n" +msgstr "" +"# %s からマージされています\n" +"\n" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:279 +msgid "no usable DHCP client could be found." +msgstr "使用できる DHCP クライアントが見付かりませんでした。" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:288 +msgid "'dhclient' could be found." +msgstr "'dhclient' が見付かりました" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:298 +msgid "'dhcpcd' could be found." +msgstr "'dhcpcd' は見付かりません。" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:306 +#, c-format +msgid "unsupported DHCP client '%s'" +msgstr "サポートの無い DHCP クライアント '%s'" + +#: ../src/logging/nm-logging.c:146 +#, c-format +msgid "Unknown log level '%s'" +msgstr "不明なログインレベル '%s'" + +#: ../src/logging/nm-logging.c:171 +#, c-format +msgid "Unknown log domain '%s'" +msgstr "不明なログドメイン '%s'" + +#: ../src/named-manager/nm-named-manager.c:343 +msgid "NOTE: the libc resolver may not support more than 3 nameservers." +msgstr "注記: libc リゾルバは 3つ以上のネームサーバーをサポートできません。" + +#: ../src/named-manager/nm-named-manager.c:345 +msgid "The nameservers listed below may not be recognized." +msgstr "以下の一覧にあるネームサーバーは認識されないかも知れません。" + +#: ../src/system-settings/nm-default-wired-connection.c:157 +#, c-format +msgid "Auto %s" +msgstr "自動 %s" + +#: ../system-settings/plugins/ifcfg-rh/reader.c:3254 +msgid "System" +msgstr "システム" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "保護された WiFi ネットワーク経由で接続共有" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "開放した WiFi ネットワーク経由で接続共有" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "永続化システムのホスト名を修正" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 +msgid "Modify system connections" +msgstr "システム接続を修正" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 +msgid "System policy prevents modification of system settings" +msgstr "システムポリシーがシステム設定の修正を阻止します。" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +msgid "System policy prevents modification of the persistent system hostname" +msgstr "システムポリシーが永続化システムのホスト名修正を阻止します。" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "システムポリシーが保護された WiFi ネットワーク経由の接続共有を阻止します。" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "システムポリシーが開放した WiFi ネットワーク経由の接続共有を阻止します。" -#: ../src/nm-ap-security-wpa-eap.c:95 ../src/nm-ap-security-wpa-eap.c:115 -msgid "WPA Enterprise" -msgstr "WPA-Enterprise" - -#: ../src/nm-ap-security-leap.c:66 ../src/nm-ap-security-leap.c:80 -msgid "LEAP" -msgstr "LEAP" - -#~ msgid "Passphrase for wireless network %s" -#~ msgstr "無線ネットワーク %s のパスフレーズ" - -#~ msgid "Connection to the wireless network '%s' failed." -#~ msgstr "無線ネットワーク '%s' への接続に失敗" - -#~ msgid "Connection to the wired network failed." -#~ msgstr "有線ネットワークへの接続に失敗" - -#~ msgid "Error displaying connection information:" -#~ msgstr "接続情報を表示中にエラー:" - -#~ msgid "Could not find some required resources (the glade file)!" -#~ msgstr "いくつか必要なリソース(glade ファイル) をみつけられませんでした!" - -#~ msgid "No active connections!" -#~ msgstr "アクティブな接続がありません!" - -#~ msgid "%d Mb/s" -#~ msgstr "%d Mb/s" - -#~ msgid "Wired Ethernet (%s)" -#~ msgstr "有線 Ethernet (%s)" - -#~ msgid "Wireless Ethernet (%s)" -#~ msgstr "無線 Ethernet (%s)" - -#~ msgid "Unknown" -#~ msgstr "不明" - -#~ msgid "NetworkManager Applet" -#~ msgstr "NetworkManager アプレット" - -#~ msgid "" -#~ "Copyright © 2004-2006 Red Hat, Inc.\n" -#~ "Copyright © 2005-2006 Novell, Inc." -#~ msgstr "" -#~ "Copyright © 2004-2006 Red Hat, Inc.\n" -#~ "Copyright © 2005-2006 Novell, Inc." - -#~ msgid "" -#~ "Notification area applet for managing your network devices and " -#~ "connections." -#~ msgstr "ネットワークデバイスと接続を管理するための通知エリアアプレット" - -#~ msgid "translator-credits" -#~ msgstr "Satoru SATOH " - -#~ msgid "" -#~ "Copyright © 2004-2005 Red Hat, Inc.\n" -#~ "Copyright © 2005-2006 Novell, Inc." -#~ msgstr "" -#~ "Copyright © 2004-2005 Red Hat, Inc.\n" -#~ "Copyright © 2005-2006 Novell, Inc." - -#~ msgid "VPN Login Failure" -#~ msgstr "VPN ログイン失敗" - -#~ msgid "Could not start the VPN connection '%s' due to a login failure." -#~ msgstr "ログインに失敗したため VPN 接続 '%s' を開始できませんでした" - -#~ msgid "VPN Start Failure" -#~ msgstr "VPN 開始に失敗" - -#~ msgid "" -#~ "Could not start the VPN connection '%s' due to a failure launching the " -#~ "VPN program." -#~ msgstr "" -#~ "VPN プログラムを起動できなかったため VPN 接続 '%s' を開始できませんでした" - -#~ msgid "VPN Connect Failure" -#~ msgstr "VPN 接続に失敗" - -#~ msgid "Could not start the VPN connection '%s' due to a connection error." -#~ msgstr "接続エラーのため VPN 接続 '%s' を開始できませんでした" - -#~ msgid "VPN Configuration Error" -#~ msgstr "VPN 接続エラー" - -#~ msgid "The VPN connection '%s' was not correctly configured." -#~ msgstr "VPN 接続 '%s' は適切に設定されました。" - -#~ msgid "" -#~ "Could not start the VPN connection '%s' because the VPN server did not " -#~ "return an adequate network configuration." -#~ msgstr "" -#~ "VPN サーバが返事を返さず、適切なネットワーク設定がなされないため VPN 接続 " -#~ "'%s' を開始できませんでした。" - -#~ msgid "VPN Login Message" -#~ msgstr "VPN ログインメッセージ" - -#~ msgid "" -#~ "The NetworkManager Applet could not find some required resources (the " -#~ "glade file was not found)." -#~ msgstr "" -#~ "NetworkManager アプレットに必要ないくつかのリソース (glade ファイル) をみ" -#~ "つけられませんでした。" - -#~ msgid "The network device \"%s (%s)\" does not support wireless scanning." -#~ msgstr "" -#~ "ネットワークデバイス \"%s (%s)\" は無線スキャンをサポートしていません。" - -#~ msgid "The network device \"%s (%s)\" does not support link detection." -#~ msgstr "" -#~ "ネットワークデバイス \"%s (%s)\" はリンク検出をサポートしていません。" - -#~ msgid "(unknown)" -#~ msgstr "(不明)" - -#~ msgid "Preparing device %s for the wired network..." -#~ msgstr "有線ネットワーク用のデバイス %s を準備しています..." - -#~ msgid "Preparing device %s for the wireless network '%s'..." -#~ msgstr "無線ネットワーク '%s' 用のデバイス %s を準備しています..." - -#~ msgid "Configuring device %s for the wired network..." -#~ msgstr "有線ネットワーク用のデバイス %s を設定しています..." - -#~ msgid "Attempting to join the wireless network '%s'..." -#~ msgstr "無線ネットワーク '%s' に参加しようとしています..." - -#~ msgid "Waiting for Network Key for the wireless network '%s'..." -#~ msgstr "無線ネットワーク '%s' のネットワーク鍵を待っています..." - -#~ msgid "Requesting a network address from the wired network..." -#~ msgstr "有線ネットワークのネットワークアドレスを要求しています..." - -#~ msgid "Requesting a network address from the wireless network '%s'..." -#~ msgstr "無線ネットワーク '%s' のネットワークアドレスを要求しています..." - -#~ msgid "Finishing connection to the wired network..." -#~ msgstr "有線ネットワークへの接続処理を終了しています..." - -#~ msgid "Finishing connection to the wireless network '%s'..." -#~ msgstr "無線ネットワーク '%s' への接続処理を終了しています..." - -#~ msgid "NetworkManager is not running" -#~ msgstr "NetworkManager は実行されていません" - -#~ msgid "Networking disabled" -#~ msgstr "ネットワークは有効にされていません" - -#~ msgid "No network connection" -#~ msgstr "ネットワーク接続がありません" - -#~ msgid "Wired network connection" -#~ msgstr "有線ネットワーク接続" - -#~ msgid "Connected to an Ad-Hoc wireless network" -#~ msgstr "Ad-Hoc 無線ネットワークに接続しました" - -#~ msgid "Wireless network connection to '%s' (%d%%)" -#~ msgstr "'%s' (%d%%) に無線ネットワーク接続" - -#~ msgid "VPN connection to '%s'" -#~ msgstr "'%s' への VPN 接続" - -#~ msgid "VPN connecting to '%s'" -#~ msgstr "'%s' に VPN 接続しています" - -#~ msgid "_Connect to Other Wireless Network..." -#~ msgstr "他の無線ネットワークに接続(_C)..." - -#~ msgid "Create _New Wireless Network..." -#~ msgstr "新しい無線ネットワークを作成(_N)..." - -#~ msgid "_VPN Connections" -#~ msgstr "VPN 接続(_V)" - -#~ msgid "_Configure VPN..." -#~ msgstr "VPN を設定(_C)..." - -#~ msgid "_Disconnect VPN..." -#~ msgstr "VPN を切断(_D)..." - -#~ msgid "_Dial Up Connections" -#~ msgstr "ダイアルアップ接続(_D)" - -#~ msgid "Connect to %s..." -#~ msgstr "%s に接続..." - -#~ msgid "Disconnect from %s..." -#~ msgstr "%s への接続を切断..." - -#~ msgid "No network devices have been found" -#~ msgstr "ネットワークデバイスがみつかりませんでした" - -#~ msgid "NetworkManager is not running..." -#~ msgstr "NetworkManager は実行されていません..." - -#~ msgid "Enable _Networking" -#~ msgstr "ネットワークを有効にする(_N)" - -#~ msgid "Enable _Wireless" -#~ msgstr "無線を有効にする(_W)" - -#~ msgid "Connection _Information" -#~ msgstr "接続情報(_I)" - -#~ msgid "_Help" -#~ msgstr "ヘルプ(_H)" - -#~ msgid "_About" -#~ msgstr "情報(_A)" - -#~ msgid "" -#~ "The NetworkManager applet could not find some required resources. It " -#~ "cannot continue.\n" -#~ msgstr "" -#~ "NetworkManager アプレットに必要ないくつかのリソースをみつけることができま" -#~ "せんでした。続行できません。\n" - -#~ msgid "Open System" -#~ msgstr "システムを開く" - -#~ msgid "Shared Key" -#~ msgstr "共有鍵" - -#~ msgid "Automatic (Default)" -#~ msgstr "自動(デフォルト)" - -#~ msgid "AES-CCMP" -#~ msgstr "AES-CCMP" - -#~ msgid "TKIP" -#~ msgstr "TKIP" - -#~ msgid "Dynamic WEP" -#~ msgstr "動的 WEP" - -#~ msgid "None" -#~ msgstr "なし" - -#~ msgid "WEP 64/128-bit ASCII" -#~ msgstr "WEP 64/128-bit ASCII" - -#~ msgid "WEP 64/128-bit Hex" -#~ msgstr "WEP 64/128-bit 十六進数" - -#~ msgid "WEP 128-bit Passphrase" -#~ msgstr "WEP 128-bit パスフレーズ" - -#~ msgid "TLS" -#~ msgstr "TLS" - -#~ msgid "TTLS" -#~ msgstr "TTLS" - -#~ msgid "WPA2 Personal" -#~ msgstr "WPA2-Personal" - -#~ msgid "WPA Personal" -#~ msgstr "WPA-Personal" - -#~ msgid "Orientation" -#~ msgstr "向き" - -#~ msgid "The orientation of the tray." -#~ msgstr "トレイの向き" - -#~ msgid "Wired Network (%s)" -#~ msgstr "有線ネットワーク (%s)" - -#~ msgid "_Wired Network" -#~ msgstr "有線ネットワーク(_W)" - -#~ msgid "Wireless Network (%s)" -#~ msgid_plural "Wireless Networks (%s)" -#~ msgstr[0] "無線ネットワーク (%s)" - -#~ msgid "Wireless Network" -#~ msgid_plural "Wireless Networks" -#~ msgstr[0] "無線ネットワーク" - -#~ msgid " (invalid Unicode)" -#~ msgstr " (不正な Unicode)" - -#~ msgid "" -#~ "By default, the wireless network's name is set to your computer's name, %" -#~ "s, with no encryption enabled" -#~ msgstr "" -#~ "デフォルトでは無線ネットワークの名前はあなたのコンピュータ名 (%s) に設定さ" -#~ "れ、暗号がないものとされます。" - -#~ msgid "Create new wireless network" -#~ msgstr "新しい無線ネットワークを作成" - -#~ msgid "" -#~ "Enter the name and security settings of the wireless network you wish to " -#~ "create." -#~ msgstr "" -#~ "作成したい無線ネットワークの名前とセキュリティ設定を入力して下さい。" - -#~ msgid "Create New Wireless Network" -#~ msgstr "新しい無線ネットワークを作成" - -#~ msgid "Existing wireless network" -#~ msgstr "既存の無線ネットワーク" - -#~ msgid "Enter the name of the wireless network to which you wish to connect." -#~ msgstr "接続したい無線ネットワークの名前を入力して下さい。" - -#~ msgid "Connect to Other Wireless Network" -#~ msgstr "他の無線ネットワークに接続" - -#~ msgid "Error connecting to wireless network" -#~ msgstr "無線ネットワークに接続中にエラー" - -#~ msgid "" -#~ "The requested wireless network requires security capabilities unsupported " -#~ "by your hardware." -#~ msgstr "" -#~ "要求された無線ネットワークにはあなたのハードウェアがサポートしていないセ" -#~ "キュリティ機能が必要です。" - -#~ msgid "Cannot start VPN connection '%s'" -#~ msgstr "VPN 接続 '%s' を開始できません" - -#~ msgid "" -#~ "Could not find the authentication dialog for VPN connection type '%s'. " -#~ "Contact your system administrator." -#~ msgstr "" -#~ "VPN 接続タイプ '%s' の認証ダイアログをみつけられませんでした。システム管理" -#~ "者に連絡して下さい。" - -#~ msgid "" -#~ "There was a problem launching the authentication dialog for VPN " -#~ "connection type '%s'. Contact your system administrator." -#~ msgstr "" -#~ "VPN 接続タイプ '%s' の認証ダイアログを起動中に問題が生じました。システム管" -#~ "理者に連絡して下さい。" - -#~ msgid " " -#~ msgstr " " - -#~ msgid "" -#~ "Active Connection Information" -#~ msgstr "アクティブな接続の情報" - -#~ msgid "" -#~ "Passphrase Required by Wireless " -#~ "Network\n" -#~ "\n" -#~ "A passphrase or encryption key is required to access the wireless network " -#~ "'%s'." -#~ msgstr "" -#~ "無線ネットワークにはパスフレーズが必" -#~ "要です\n" -#~ "\n" -#~ "無線ネットワーク '%s' にアクセスするにはパスフレーズか暗号化鍵が必要です。" - -#~ msgid "" -#~ "Reduced Network Functionality\n" -#~ "\n" -#~ "%s It will not be completely functional." -#~ msgstr "" -#~ "限定されたネットワーク機能\n" -#~ "\n" -#~ "%s 完全には機能しません。" - -#~ msgid "" -#~ "Wireless Network Login " -#~ "Confirmation\n" -#~ "\n" -#~ "You have chosen to log in to the wireless network '%s'. If you are sure " -#~ "that this wireless network is secure, click the checkbox below and " -#~ "NetworkManager will not require confirmation on subsequent log ins." -#~ msgstr "" -#~ "無線ネットワークログイン確認\n" -#~ "\n" -#~ "無線ネットワーク '%s' にログインするように選択しました。もしこの無線ネット" -#~ "ワークがセキュアであることを確信できるのであれば下のチェックボタンをクリッ" -#~ "クして NetworkManager がログインの後で確認を必要としないようにすることがで" -#~ "きます。" - -#~ msgid "Anonymous Identity:" -#~ msgstr "匿名:" - -#~ msgid "Authentication:" -#~ msgstr "認証:" - -#~ msgid "Broadcast Address:" -#~ msgstr "ブロードキャストアドレス:" - -#~ msgid "CA Certificate File:" -#~ msgstr "CA 証明ファイル:" - -#~ msgid "C_onnect" -#~ msgstr "接続(_O)" - -#~ msgid "Client Certificate File:" -#~ msgstr "クライアント証明ファイル:" - -#~ msgid "Connection Information" -#~ msgstr "接続情報" - -#~ msgid "Default Route:" -#~ msgstr "デフォルトルート:" - -#~ msgid "Destination Address:" -#~ msgstr "宛先アドレス:" - -#~ msgid "Driver:" -#~ msgstr "ドライバ:" - -#~ msgid "EAP Method:" -#~ msgstr "EAP 方式:" - -#~ msgid "Hardware Address:" -#~ msgstr "ハードウェアアドレス:" - -#~ msgid "IP Address:" -#~ msgstr "IP アドレス:" - -# とりあえずこのように訳しておくが "Identity" のままの方が適切かもしれない。 -# (WPA-EAP Identity 認証方式: ユーザ ID とパスワードの組で認証) -#~ msgid "Identity:" -#~ msgstr "ユーザ ID:" - -#~ msgid "Interface:" -#~ msgstr "インターフェース:" - -#~ msgid "Key Type:" -#~ msgstr "鍵タイプ:" - -#~ msgid "Key management:" -#~ msgstr "鍵管理:" - -#~ msgid "Key:" -#~ msgstr "鍵:" - -#~ msgid "" -#~ "None\n" -#~ "WEP 128-bit Passphrase\n" -#~ "WEP 64/128-bit Hex\n" -#~ "WEP 64/128-bit ASCII\n" -#~ msgstr "" -#~ "なし\n" -#~ "WEP 128-bit パスフレーズ\n" -#~ "WEP 64/128-bit 十六進数\n" -#~ "WEP 64/128-bit ASCII\n" - -#~ msgid "" -#~ "Open System\n" -#~ "Shared Key" -#~ msgstr "" -#~ "オープンシステム\n" -#~ "共有鍵" - -#~ msgid "Other Wireless Network..." -#~ msgstr "他の無線ネットワーク..." - -#~ msgid "Passphrase:" -#~ msgstr "パスフレーズ:" - -#~ msgid "Password:" -#~ msgstr "パスワード:" - -#~ msgid "Primary DNS:" -#~ msgstr "第一 DNS:" - -#~ msgid "Private Key File:" -#~ msgstr "秘密鍵ファイル:" - -#~ msgid "Private Key Password:" -#~ msgstr "秘密鍵パスワード:" - -#~ msgid "Secondary DNS:" -#~ msgstr "第二 DNS:" - -#~ msgid "Select the CA Certificate File" -#~ msgstr "CA 証明ファイルを選択" - -#~ msgid "Select the Client Certificate File" -#~ msgstr "クライアント証明ファイルを選択" - -#~ msgid "Select the Private Key File" -#~ msgstr "秘密鍵ファイルを選択" - -#~ msgid "Show key" -#~ msgstr "鍵を表示" - -#~ msgid "Show passphrase" -#~ msgstr "パスフレーズを表示" - -#~ msgid "Show password" -#~ msgstr "パスワードを表示" - -#~ msgid "Show passwords" -#~ msgstr "パスワードを表示" - -#~ msgid "Speed:" -#~ msgstr "速度:" - -#~ msgid "Subnet Mask:" -#~ msgstr "サブネットマスク:" - -#~ msgid "Type:" -#~ msgstr "タイプ:" - -#~ msgid "User Name:" -#~ msgstr "ユーザ名:" - -#~ msgid "Wireless Network Key Required" -#~ msgstr "無線ネットワーク鍵が必要です" - -#~ msgid "Wireless _adapter:" -#~ msgstr "無線アダプタ(_A):" - -#~ msgid "_Always Trust this Wireless Network" -#~ msgstr "この無線ネットワークを常に信頼する(_A)" - -#~ msgid "_Don't remind me again" -#~ msgstr "二度と催促しない(_D)" - -#~ msgid "_Fallback on this Network" -#~ msgstr "このネットワークにフォールバック(_F)" - -#~ msgid "_Login to Network" -#~ msgstr "ネットワークにログイン(_L)" - -#~ msgid "_Network Name:" -#~ msgstr "ネットワーク名(_N):" - -#~ msgid "_Wireless Security:" -#~ msgstr "無線セキュリティ(_W):" - -#~ msgid "You are now connected to the Ad-Hoc wireless network '%s'." -#~ msgstr "Ad-Hoc 無線ネットワーク '%s' に接続しました。" - -#~ msgid "You are now connected to the wireless network '%s'." -#~ msgstr "無線ネットワーク '%s' に接続しました。" - -#~ msgid "You are now connected to the wired network." -#~ msgstr "有線ネットワークに接続しました。" - -#~ msgid "Connection Established" -#~ msgstr "接続を確立" - -#~ msgid "Disconnected" -#~ msgstr "接続を切断" - -#~ msgid "The network connection has been disconnected." -#~ msgstr "ネットワーク接続が切断されました。" - -#~ msgid "Choose which type of VPN connection you wish to create." -#~ msgstr "作成したい VPN 接続のタイプを選択してください" - -#~ msgid "Connect to:" -#~ msgstr "接続先:" - -#~ msgid "Create VPN Connection - 1 of 2" -#~ msgstr "VPN 接続を作成 - 1 of 2" - -#~ msgid "Create VPN Connection - 2 of 2" -#~ msgstr "VPN 接続を作成 - 2 of 2" - -#~ msgid "Finish Creating VPN Connection" -#~ msgstr "VPN 接続の作成を終了" - -#~ msgid "" -#~ "This assistant will guide you through the creation of a connection to a " -#~ "Virtual Private Network (VPN).\n" -#~ "\n" -#~ "It will require some information, such as IP addresses and secrets. " -#~ "Please see your system administrator to obtain this information." -#~ msgstr "" -#~ "このアシスタントは仮想プライベートネットワーク (VPN) の接続の作成を手助け" -#~ "します。\n" -#~ "\n" -#~ "作成時には IP アドレスといったような情報が必要となります。システム管理者に" -#~ "確認してこれらの情報を得ておいてください。" - -#~ msgid "Modify Wireless Networks" -#~ msgstr "無線ネットワークを変更" - -#~ msgid "*" -#~ msgstr "*" - -#~ msgid "" -#~ "128-bit Passphrase (WEP)\n" -#~ "Ascii Key (WEP)\n" -#~ "Hex Key (WEP)" -#~ msgstr "" -#~ "128-bit パスフレーズ (WEP)\n" -#~ "ASCII 鍵 (WEP)\n" -#~ "16 進鍵 (WEP)" - -#~ msgid "Ascii Key:" -#~ msgstr "ASCII 鍵:" - -#~ msgid "You must log in to access the private network %s" -#~ msgstr "" -#~ "プライベートネットワーク %s にアクセスするにはログインしなければいけません" diff --git a/po/kn.po b/po/kn.po index 999ee84b06..be51ba0dec 100644 --- a/po/kn.po +++ b/po/kn.po @@ -3,21 +3,1163 @@ # Copyright (C) 2009 NetworkManager's COPYRIGHT HOLDER # This file is distributed under the same license as the NetworkManager package. # -# Shankar Prasad , 2009. +# Shankar Prasad , 2009, 2010. msgid "" msgstr "" "Project-Id-Version: NetworkManager.po.master.kn\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager&component=general\n" -"POT-Creation-Date: 2009-06-15 03:24+0000\n" -"PO-Revision-Date: 2009-06-15 14:24+0530\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-05-06 14:31+0530\n" +"PO-Revision-Date: 2010-05-07 10:54+0530\n" "Last-Translator: Shankar Prasad \n" -"Language-Team: Kannada \n" +"Language-Team: kn-IN <>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 1.11.4\n" +"X-Generator: Lokalize 1.0\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../cli/src/connections.c:59 ../cli/src/connections.c:74 +#: ../cli/src/devices.c:85 ../cli/src/devices.c:98 ../cli/src/devices.c:108 +#: ../cli/src/devices.c:118 ../cli/src/devices.c:131 ../cli/src/devices.c:142 +#: ../cli/src/devices.c:152 +msgid "NAME" +msgstr "NAME" + +#. 0 +#: ../cli/src/connections.c:60 ../cli/src/connections.c:75 +msgid "UUID" +msgstr "UUID" + +#. 1 +#: ../cli/src/connections.c:61 +msgid "DEVICES" +msgstr "DEVICES" + +#. 2 +#: ../cli/src/connections.c:62 ../cli/src/connections.c:77 +msgid "SCOPE" +msgstr "SCOPE" + +#. 3 +#: ../cli/src/connections.c:63 +msgid "DEFAULT" +msgstr "DEFAULT" + +#. 4 +#: ../cli/src/connections.c:64 +msgid "DBUS-SERVICE" +msgstr "DBUS-SERVICE" + +#. 5 +#: ../cli/src/connections.c:65 +msgid "SPEC-OBJECT" +msgstr "SPEC-OBJECT" + +#. 6 +#: ../cli/src/connections.c:66 +msgid "VPN" +msgstr "VPN" + +#. 1 +#. 0 +#. 1 +#: ../cli/src/connections.c:76 ../cli/src/devices.c:61 ../cli/src/devices.c:87 +msgid "TYPE" +msgstr "TYPE" + +#. 3 +#: ../cli/src/connections.c:78 +msgid "TIMESTAMP" +msgstr "TIMESTAMP" + +#. 4 +#: ../cli/src/connections.c:79 +msgid "TIMESTAMP-REAL" +msgstr "TIMESTAMP-REAL" + +#. 5 +#: ../cli/src/connections.c:80 +msgid "AUTOCONNECT" +msgstr "AUTOCONNECT" + +#. 6 +#: ../cli/src/connections.c:81 +msgid "READONLY" +msgstr "READONLY" + +#: ../cli/src/connections.c:157 +#, c-format +msgid "" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" +msgstr "" +"ಬಳಕೆ: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" + +#: ../cli/src/connections.c:197 ../cli/src/connections.c:536 +#, c-format +msgid "Error: 'con list': %s" +msgstr "ದೋಷ: 'con list': %s" + +#: ../cli/src/connections.c:199 ../cli/src/connections.c:538 +#, c-format +msgid "Error: 'con list': %s; allowed fields: %s" +msgstr "ದೋಷ: 'con list': %s; ಅನುಮತಿಸಲಾದ ಕ್ಷೇತ್ರಗಳು: %s" + +#: ../cli/src/connections.c:207 +msgid "Connection details" +msgstr "ಸಂಪರ್ಕದ ವಿವರಗಳು" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "system" +msgstr "ವ್ಯವಸ್ಥೆ" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "user" +msgstr "ಬಳಕೆದಾರ" + +#: ../cli/src/connections.c:383 +msgid "never" +msgstr "ಎಂದಿಗೂ ಬೇಡ" + +#. "CAPABILITIES" +#. Print header +#. "WIFI-PROPERTIES" +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:544 ../cli/src/settings.c:643 +#: ../cli/src/settings.c:912 ../cli/src/settings.c:913 +#: ../cli/src/settings.c:915 ../cli/src/settings.c:917 +#: ../cli/src/settings.c:1042 ../cli/src/settings.c:1043 +#: ../cli/src/settings.c:1044 ../cli/src/settings.c:1123 +#: ../cli/src/settings.c:1124 ../cli/src/settings.c:1125 +#: ../cli/src/settings.c:1126 ../cli/src/settings.c:1127 +#: ../cli/src/settings.c:1128 ../cli/src/settings.c:1129 +#: ../cli/src/settings.c:1130 ../cli/src/settings.c:1131 +#: ../cli/src/settings.c:1132 ../cli/src/settings.c:1133 +#: ../cli/src/settings.c:1134 ../cli/src/settings.c:1135 +#: ../cli/src/settings.c:1210 +msgid "yes" +msgstr "ಹೌದು" + +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:506 ../cli/src/settings.c:544 +#: ../cli/src/settings.c:643 ../cli/src/settings.c:912 +#: ../cli/src/settings.c:913 ../cli/src/settings.c:915 +#: ../cli/src/settings.c:917 ../cli/src/settings.c:1042 +#: ../cli/src/settings.c:1043 ../cli/src/settings.c:1044 +#: ../cli/src/settings.c:1123 ../cli/src/settings.c:1124 +#: ../cli/src/settings.c:1125 ../cli/src/settings.c:1126 +#: ../cli/src/settings.c:1127 ../cli/src/settings.c:1128 +#: ../cli/src/settings.c:1129 ../cli/src/settings.c:1130 +#: ../cli/src/settings.c:1131 ../cli/src/settings.c:1132 +#: ../cli/src/settings.c:1133 ../cli/src/settings.c:1134 +#: ../cli/src/settings.c:1135 ../cli/src/settings.c:1210 +msgid "no" +msgstr "ಇಲ್ಲ" + +#: ../cli/src/connections.c:457 ../cli/src/connections.c:500 +msgid "System connections" +msgstr "ವ್ಯವಸ್ಥೆಯ ಸಂಪರ್ಕಗಳು" + +#: ../cli/src/connections.c:462 ../cli/src/connections.c:513 +msgid "User connections" +msgstr "ಬಳಕೆದಾರ ಸಂಪರ್ಕಗಳು" + +#: ../cli/src/connections.c:474 ../cli/src/connections.c:1334 +#: ../cli/src/connections.c:1350 ../cli/src/connections.c:1359 +#: ../cli/src/connections.c:1370 ../cli/src/connections.c:1452 +#: ../cli/src/devices.c:864 ../cli/src/devices.c:874 ../cli/src/devices.c:973 +#: ../cli/src/devices.c:980 +#, c-format +msgid "Error: %s argument is missing." +msgstr "ದೋಷ: %s ಆರ್ಗ್ಯುಮೆಂಟ್ ಕಾಣಿಸುತ್ತಿಲ್ಲ" + +#: ../cli/src/connections.c:487 +#, c-format +msgid "Error: %s - no such connection." +msgstr "ದೋಷ: %s - ಅಂತಹ ಯಾವುದೆ ಸಂಪರ್ಕಗಳಿಲ್ಲ." + +#: ../cli/src/connections.c:519 ../cli/src/connections.c:1383 +#: ../cli/src/connections.c:1470 ../cli/src/devices.c:687 +#: ../cli/src/devices.c:754 ../cli/src/devices.c:888 ../cli/src/devices.c:986 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "ಗೊತ್ತಿರದ ನಿಯತಾಂಕಗಳು: %s\n" + +#: ../cli/src/connections.c:528 +#, c-format +msgid "Error: no valid parameter specified." +msgstr "ದೋಷ: ಮಾನ್ಯವಾದ ಯಾವುದೆ ನಿಯತಾಂಖವನ್ನು ಸೂಚಿಸಲಾಗಿಲ್ಲ." + +#: ../cli/src/connections.c:543 ../cli/src/connections.c:1572 +#: ../cli/src/devices.c:1192 ../cli/src/network-manager.c:274 +#, c-format +msgid "Error: %s." +msgstr "ದೋಷ: %s." + +#: ../cli/src/connections.c:649 +#, c-format +msgid "Error: 'con status': %s" +msgstr "ದೋಷ: 'con status': %s" + +#: ../cli/src/connections.c:651 +#, c-format +msgid "Error: 'con status': %s; allowed fields: %s" +msgstr "ದೋಷ: 'con status': %s; ಅನುಮತಿಸಲಾದ ಕ್ಷೇತ್ರಗಳು: %s" + +#: ../cli/src/connections.c:658 +msgid "Active connections" +msgstr "ಸಕ್ರಿಯ ಸಂಪರ್ಕಗಳು" + +#: ../cli/src/connections.c:1026 +#, c-format +msgid "no active connection on device '%s'" +msgstr "'%s' ಎಂಬ ಸಾಧನದಲ್ಲಿ ಯಾವುದೆ ಸಕ್ರಿಯ ಸಂಪರ್ಕವು ಕಂಡುಬಂದಿಲ್ಲ" + +#: ../cli/src/connections.c:1034 +#, c-format +msgid "no active connection or device" +msgstr "ಯಾವುದೆ ಸಕ್ರಿಯ ಸಂಪರ್ಕ ಅಥವ ಸಾಧನವು ಕಂಡುಬಂದಿಲ್ಲ" + +#: ../cli/src/connections.c:1084 +#, c-format +msgid "device '%s' not compatible with connection '%s'" +msgstr "'%s' ಎಂಬ ಸಾಧನವು '%s' ಸಂಪರ್ಕದೊಂದಿಗೆ ಹೊಂದಿಕೊಳ್ಳುತ್ತಿಲ್ಲ" + +#: ../cli/src/connections.c:1086 +#, c-format +msgid "no device found for connection '%s'" +msgstr "'%s' ಸಂಪರ್ಕಕ್ಕಾಗಿ ಯಾವುದೆ ಸಾಧನವು ಕಂಡು ಬಂದಿಲ್ಲ" + +#: ../cli/src/connections.c:1097 +msgid "activating" +msgstr "ಸಕ್ರಿಯಗೊಳ್ಳುತ್ತಿದೆ" + +#: ../cli/src/connections.c:1099 +msgid "activated" +msgstr "ಸಕ್ರಿಯಗೊಂಡಿದೆ" + +#: ../cli/src/connections.c:1102 ../cli/src/connections.c:1125 +#: ../cli/src/connections.c:1158 ../cli/src/devices.c:224 +#: ../cli/src/devices.c:514 ../cli/src/network-manager.c:92 +#: ../cli/src/network-manager.c:145 ../cli/src/settings.c:469 +msgid "unknown" +msgstr "ಗೊತ್ತಿಲ್ಲದ" + +#: ../cli/src/connections.c:1111 +msgid "VPN connecting (prepare)" +msgstr "VPN ಸಂಪರ್ಕ ಕಲ್ಪಿಸಲಾಗುತ್ತಿದೆ (ಸಿದ್ಧಗೊಳಿಕೆ)" + +#: ../cli/src/connections.c:1113 +msgid "VPN connecting (need authentication)" +msgstr "VPN ಸಂಪರ್ಕ ಕಲ್ಪಿಸಲಾಗುತ್ತಿದೆ (ದೃಢೀಕರಣದ ಅಗತ್ಯವಿದೆ)" + +#: ../cli/src/connections.c:1115 +msgid "VPN connecting" +msgstr "VPN ಸಂಪರ್ಕಿತಗೊಳ್ಳುತ್ತಿದೆ" + +#: ../cli/src/connections.c:1117 +msgid "VPN connecting (getting IP configuration)" +msgstr "VPN ಸಂಪರ್ಕಗೊಂಡಿದೆ (IP ಸಂರಚನೆಯನ್ನು ಪಡೆಯಲಾಗುತ್ತಿದೆ)" + +#: ../cli/src/connections.c:1119 +msgid "VPN connected" +msgstr "VPN ಸಂಪರ್ಕಗೊಂಡಿದೆ" + +#: ../cli/src/connections.c:1121 +msgid "VPN connection failed" +msgstr "VPN ಸಂಪರ್ಕವು ವಿಫಲಗೊಂಡಿದೆ" + +#: ../cli/src/connections.c:1123 +msgid "VPN disconnected" +msgstr "VPN ಸಂಪರ್ಕ ಕಡಿದಿದೆ" + +#: ../cli/src/connections.c:1134 +msgid "unknown reason" +msgstr "ಗೊತ್ತಿರದ ಕಾರಣ" + +#: ../cli/src/connections.c:1136 +msgid "none" +msgstr "ಯಾವುದೂ ಇಲ್ಲ" + +#: ../cli/src/connections.c:1138 +msgid "the user was disconnected" +msgstr "ಬಳಕೆದಾರರೊಂದಿಗೆ ಸಂಪರ್ಕ ಕಡಿದುಹೋಗಿದೆ" + +#: ../cli/src/connections.c:1140 +msgid "the base network connection was interrupted" +msgstr "ಮೂಲ ಜಾಲಬಂಧ ಸಂಪರ್ಕಕ್ಕೆ ತಡೆಯುಂಟಾಗಿದೆ" + +#: ../cli/src/connections.c:1142 +msgid "the VPN service stopped unexpectedly" +msgstr "VPN ಸೇವೆಯನ್ನು ಅನಿರೀಕ್ಷಿತವಾಗಿ ನಿಲ್ಲಿಸಲಾಗಿದೆ" + +#: ../cli/src/connections.c:1144 +msgid "the VPN service returned invalid configuration" +msgstr "VPN ಸೇವೆಯು ಅಮಾನ್ಯವಾದ ಸಂರಚನೆಯನ್ನು ಮರಳಿಸಿದೆ" + +#: ../cli/src/connections.c:1146 +msgid "the connection attempt timed out" +msgstr "ಸಂಪರ್ಕದ ಪ್ರಯತ್ನದ ಕಾಲಾವಧಿ ಮೀರಿದೆ" + +#: ../cli/src/connections.c:1148 +msgid "the VPN service did not start in time" +msgstr "VPN ಸೇವೆಯು ಸರಿಯಾದ ಸಮಯದಲ್ಲಿ ಆರಂಭಗೊಳ್ಳಲಿಲ್ಲ" + +#: ../cli/src/connections.c:1150 +msgid "the VPN service failed to start" +msgstr "VPN ಸೇವೆಯು ಆರಂಭಗೊಳ್ಳಲು ವಿಫಲಗೊಂಡಿದೆ" + +#: ../cli/src/connections.c:1152 +msgid "no valid VPN secrets" +msgstr "ಯಾವುದೆ ಮಾನ್ಯವಾದ VPN ರಹಸ್ಯಗಳಿಲ್ಲ (ಸೀಕ್ರೇಟ್‌ಗಳಿಲ್ಲ)" + +#: ../cli/src/connections.c:1154 +msgid "invalid VPN secrets" +msgstr "ಅಮಾನ್ಯವಾದ VPN ರಹಸ್ಯಗಳು" + +#: ../cli/src/connections.c:1156 +msgid "the connection was removed" +msgstr "ಸಂಪರ್ಕವನ್ನು ತೆಗೆದು ಹಾಕಲಾಗಿದೆ" + +#: ../cli/src/connections.c:1170 +#, c-format +msgid "state: %s\n" +msgstr "ಸ್ಥಿತಿ: %s\n" + +#: ../cli/src/connections.c:1173 ../cli/src/connections.c:1199 +#, c-format +msgid "Connection activated\n" +msgstr "ಸಂಪರ್ಕವನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ\n" + +#: ../cli/src/connections.c:1176 +#, c-format +msgid "Error: Connection activation failed." +msgstr "ದೋಷ: ಸಂಪರ್ಕವನ್ನು ಸಕ್ರಿಯಗೊಳಿಕೆಯು ವಿಫಲಗೊಂಡಿದೆ." + +#: ../cli/src/connections.c:1195 +#, c-format +msgid "state: %s (%d)\n" +msgstr "ಸ್ಥಿತಿ: %s (%d)\n" + +#: ../cli/src/connections.c:1205 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "ದೋಷ: ಸಂಪರ್ಕ ಸಕ್ರಿಯಗೊಳಿಕೆಯು ವಿಫಲಗೊಂಡಿದೆ: %s." + +#: ../cli/src/connections.c:1222 ../cli/src/devices.c:811 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "ದೋಷ: ಕಾಲಾವಧಿ %d sec ತೀರಿದೆ." + +#: ../cli/src/connections.c:1265 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "ದೋಷ: ಸಂಪರ್ಕ ಸಕ್ರಿಯಗೊಳಿಕೆಯು ವಿಫಲಗೊಂಡಿದೆ: %s" + +#: ../cli/src/connections.c:1279 +#, c-format +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "ದೋಷ: '%s' ಗಾಗಿ ಸಕ್ರಿಯ ಸಂಪರ್ಕವನ್ನು ಪಡೆಯುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ." + +#: ../cli/src/connections.c:1288 +#, c-format +msgid "Active connection state: %s\n" +msgstr "ಸಕ್ರಿಯ ಸಂಪರ್ಕದ ಸ್ಥಿತಿ: %s\n" + +#: ../cli/src/connections.c:1289 +#, c-format +msgid "Active connection path: %s\n" +msgstr "ಸಕ್ರಿಯ ಸಂಪರ್ಕ ಮಾರ್ಗ: %s\n" + +#: ../cli/src/connections.c:1343 ../cli/src/connections.c:1461 +#, c-format +msgid "Error: Unknown connection: %s." +msgstr "ದೋಷ: ಗೊತ್ತಿರದ ಸಂಪರ್ಕ: %s." + +#: ../cli/src/connections.c:1378 ../cli/src/devices.c:882 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "ದೋಷ: '%s' ಎಂಬ ಕಾಲಾವಧಿ ತೀರಿಕೆ ಮೌಲ್ಯವು ಅಮಾನ್ಯವಾಗಿದೆ." + +#: ../cli/src/connections.c:1391 ../cli/src/connections.c:1478 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "ದೋಷ: id ಅಥವ uuid ಅನ್ನು ಸೂಚಿಸಬೇಕು." + +#: ../cli/src/connections.c:1411 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "ದೋಷ: ಯಾವುದೆ ಸೂಕ್ತವಾದ ಸಾಧನವು ಕಂಡು ಬಂದಿಲ್ಲ: %s." + +#: ../cli/src/connections.c:1413 +#, c-format +msgid "Error: No suitable device found." +msgstr "ದೋಷ: ಯಾವುದೆ ಸೂಕ್ತವಾದ ಸಾಧನವು ಕಂಡು ಬಂದಿಲ್ಲ." + +#: ../cli/src/connections.c:1505 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "ಎಚ್ಚರಿಕೆ: ಸಂಪರ್ಕವು ಸಕ್ರಿಯವಾಗಿಲ್ಲ\n" + +#: ../cli/src/connections.c:1561 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "ದೋಷ: 'con' ಆಜ್ಷೆ '%s' ಎಂಬುದು ಮಾನ್ಯವಾದುದಲ್ಲ." + +#: ../cli/src/connections.c:1597 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "ದೋಷ: D-Bus ನೊಂದಿಗೆ ಸಂಪರ್ಕಸಾಧಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ." + +#: ../cli/src/connections.c:1604 +#, c-format +msgid "Error: Could not get system settings." +msgstr "ದೋಷ: ವ್ಯವಸ್ಥೆಯ ಸಿದ್ಧತೆಗಳು ಕಂಡುಬಂದಿಲ್ಲ." + +#: ../cli/src/connections.c:1612 +#, c-format +msgid "Error: Could not get user settings." +msgstr "ದೋಷ: ಬಳಕೆದಾರ ಸಿದ್ಧತೆಗಳು ಕಂಡುಬಂದಿಲ್ಲ." + +#: ../cli/src/connections.c:1622 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "ದೋಷ: ಸಂಪರ್ಕಗಳನ್ನು ಪಡೆಯಲಾಗಿಲ್ಲ: ಸಿದ್ಧತೆಗಳು ಚಾಲನೆಯಲ್ಲಿಲ್ಲ." + +#. 0 +#. 9 +#: ../cli/src/devices.c:60 ../cli/src/devices.c:86 ../cli/src/devices.c:162 +msgid "DEVICE" +msgstr "DEVICE" + +#. 1 +#. 4 +#. 0 +#: ../cli/src/devices.c:62 ../cli/src/devices.c:90 +#: ../cli/src/network-manager.c:36 +msgid "STATE" +msgstr "STATE" + +#: ../cli/src/devices.c:71 +msgid "GENERAL" +msgstr "GENERAL" + +#. 0 +#: ../cli/src/devices.c:72 +msgid "CAPABILITIES" +msgstr "CAPABILITIES" + +#. 1 +#: ../cli/src/devices.c:73 +msgid "WIFI-PROPERTIES" +msgstr "WIFI-PROPERTIES" + +#. 2 +#: ../cli/src/devices.c:74 +msgid "AP" +msgstr "AP" + +#. 3 +#: ../cli/src/devices.c:75 +msgid "WIRED-PROPERTIES" +msgstr "WIRED-PROPERTIES" + +#. 4 +#: ../cli/src/devices.c:76 +msgid "IP4-SETTINGS" +msgstr "IP4-SETTINGS" + +#. 5 +#: ../cli/src/devices.c:77 +msgid "IP4-DNS" +msgstr "IP4-DNS" + +#. 2 +#: ../cli/src/devices.c:88 +msgid "DRIVER" +msgstr "DRIVER" + +#. 3 +#: ../cli/src/devices.c:89 +msgid "HWADDR" +msgstr "HWADDR" + +#. 0 +#: ../cli/src/devices.c:99 +msgid "CARRIER-DETECT" +msgstr "CARRIER-DETECT" + +#. 1 +#: ../cli/src/devices.c:100 +msgid "SPEED" +msgstr "SPEED" + +#. 0 +#: ../cli/src/devices.c:109 +msgid "CARRIER" +msgstr "CARRIER" + +#. 0 +#: ../cli/src/devices.c:119 +msgid "WEP" +msgstr "WEP" + +#. 1 +#: ../cli/src/devices.c:120 +msgid "WPA" +msgstr "WPA" + +#. 2 +#: ../cli/src/devices.c:121 +msgid "WPA2" +msgstr "WPA2" + +#. 3 +#: ../cli/src/devices.c:122 +msgid "TKIP" +msgstr "TKIP" + +#. 4 +#: ../cli/src/devices.c:123 +msgid "CCMP" +msgstr "CCMP" + +#. 0 +#: ../cli/src/devices.c:132 +msgid "ADDRESS" +msgstr "ADDRESS" + +#. 1 +#: ../cli/src/devices.c:133 +msgid "PREFIX" +msgstr "PREFIX" + +#. 2 +#: ../cli/src/devices.c:134 +msgid "GATEWAY" +msgstr "GATEWAY" + +#. 0 +#: ../cli/src/devices.c:143 +msgid "DNS" +msgstr "DNS" + +#. 0 +#: ../cli/src/devices.c:153 +msgid "SSID" +msgstr "SSID" + +#. 1 +#: ../cli/src/devices.c:154 +msgid "BSSID" +msgstr "BSSID" + +#. 2 +#: ../cli/src/devices.c:155 +msgid "MODE" +msgstr "MODE" + +#. 3 +#: ../cli/src/devices.c:156 +msgid "FREQ" +msgstr "FREQ" + +#. 4 +#: ../cli/src/devices.c:157 +msgid "RATE" +msgstr "RATE" + +#. 5 +#: ../cli/src/devices.c:158 +msgid "SIGNAL" +msgstr "SIGNAL" + +#. 6 +#: ../cli/src/devices.c:159 +msgid "SECURITY" +msgstr "SECURITY" + +#. 7 +#: ../cli/src/devices.c:160 +msgid "WPA-FLAGS" +msgstr "WPA-FLAGS" + +#. 8 +#: ../cli/src/devices.c:161 +msgid "RSN-FLAGS" +msgstr "RSN-FLAGS" + +#. 10 +#: ../cli/src/devices.c:163 +msgid "ACTIVE" +msgstr "ACTIVE" + +#: ../cli/src/devices.c:186 +#, c-format +msgid "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +"\n" +msgstr "" +"ಬಳಕೆ:: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +"\n" + +#: ../cli/src/devices.c:206 +msgid "unmanaged" +msgstr "ನಿರ್ವಹಿಸದೆ ಇರುವ" + +#: ../cli/src/devices.c:208 +msgid "unavailable" +msgstr "ಲಭ್ಯವಿಲ್ಲ" + +#: ../cli/src/devices.c:210 ../cli/src/network-manager.c:89 +msgid "disconnected" +msgstr "ಸಂಪರ್ಕಕಡಿದು ಹೋಗಿದೆ" + +#: ../cli/src/devices.c:212 +msgid "connecting (prepare)" +msgstr "ಸಂಪರ್ಕ ಕಲ್ಪಿಸಲಾಗುತ್ತಿದೆ (ಸಿದ್ಧಗೊಳಿಕೆ)" + +#: ../cli/src/devices.c:214 +msgid "connecting (configuring)" +msgstr "ಸಂಪರ್ಕ ಕಲ್ಪಿಸಲಾಗುತ್ತಿದೆ (ಸಂರಚಿಸುವಿಕೆ)" + +#: ../cli/src/devices.c:216 +msgid "connecting (need authentication)" +msgstr "ಸಂಪರ್ಕ ಕಲ್ಪಿಸಲಾಗುತ್ತಿದೆ (ದೃಢೀಕರಣದ ಅಗತ್ಯವಿದೆ)" + +#: ../cli/src/devices.c:218 +msgid "connecting (getting IP configuration)" +msgstr "ಸಂಪರ್ಕ ಕಲ್ಪಿಸಲಾಗುತ್ತಿದೆ (IP ಸಂರಚನೆಯನ್ನು ಪಡೆಯಲಾಗುತ್ತಿದೆ)" + +#: ../cli/src/devices.c:220 ../cli/src/network-manager.c:87 +msgid "connected" +msgstr "ಸಂಪರ್ಕಗೊಂಡಿದೆ" + +#: ../cli/src/devices.c:222 +msgid "connection failed" +msgstr "ಸಂಪರ್ಕ ವಿಫಲಗೊಂಡಿದೆ" + +#: ../cli/src/devices.c:245 ../cli/src/devices.c:380 +msgid "Unknown" +msgstr "ಗೊತ್ತಿರದ" + +#: ../cli/src/devices.c:277 +msgid "(none)" +msgstr "(ಯಾವುದೂ ಇಲ್ಲ)" + +#: ../cli/src/devices.c:302 +#, c-format +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s: IP4 ವಿಳಾಸ 0x%X ಅನ್ನು ಪರಿವರ್ತಿಸುವಲ್ಲಿ ದೋಷ" + +#: ../cli/src/devices.c:349 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" + +#: ../cli/src/devices.c:350 +#, c-format +msgid "%u MB/s" +msgstr "%u MB/s" + +#: ../cli/src/devices.c:359 +msgid "Encrypted: " +msgstr "ಗೂಢಲಿಪೀಕರಣಗೊಂಡ: " + +#: ../cli/src/devices.c:364 +msgid "WEP " +msgstr "WEP " + +#: ../cli/src/devices.c:366 +msgid "WPA " +msgstr "WPA " + +#: ../cli/src/devices.c:368 +msgid "WPA2 " +msgstr "WPA2 " + +#: ../cli/src/devices.c:371 +msgid "Enterprise " +msgstr "ಎಂಟರ್ಪ್ರೈಸ್ " + +#: ../cli/src/devices.c:380 +msgid "Ad-Hoc" +msgstr "ತಾತ್ಕಾಲಿಕ" + +#: ../cli/src/devices.c:380 +msgid "Infrastructure" +msgstr "ಮೂಲಭೂತ ವ್ಯವಸ್ಥೆ" + +#: ../cli/src/devices.c:442 +#, c-format +msgid "Error: 'dev list': %s" +msgstr "ದೋಷ: 'dev list': %s" + +#: ../cli/src/devices.c:444 +#, c-format +msgid "Error: 'dev list': %s; allowed fields: %s" +msgstr "ದೋಷ: 'dev list'; %s; ಅನುಮತಿಸಲಾದ ಕ್ಷೇತ್ರಗಳು: %s" + +#: ../cli/src/devices.c:453 +msgid "Device details" +msgstr "ಸಾಧನದ ವಿವರಗಳು" + +#: ../cli/src/devices.c:483 ../cli/src/devices.c:827 +msgid "(unknown)" +msgstr "(ಗೊತ್ತಿರದ)" + +#: ../cli/src/devices.c:484 +msgid "unknown)" +msgstr "ಗೊತ್ತಿರದ)" + +#: ../cli/src/devices.c:510 +#, c-format +msgid "%u Mb/s" +msgstr "%u Mb/s" + +#. Print header +#. "WIRED-PROPERTIES" +#: ../cli/src/devices.c:583 +msgid "on" +msgstr "ಆನ್‌" + +#: ../cli/src/devices.c:583 +msgid "off" +msgstr "ಆಫ್" + +#: ../cli/src/devices.c:710 +#, c-format +msgid "Error: 'dev status': %s" +msgstr "ದೋಷ: 'dev status': %s" + +#: ../cli/src/devices.c:712 +#, c-format +msgid "Error: 'dev status': %s; allowed fields: %s" +msgstr "ದೋಷ: 'dev status': %s; ಅನುಮತಿಸಲಾದ ಕ್ಷೇತ್ರಗಳು: %s" + +#: ../cli/src/devices.c:719 +msgid "Status of devices" +msgstr "ಸಾಧನಗಳ ಸ್ಥಿತಿ" + +#: ../cli/src/devices.c:747 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "ದೋಷ: '%s' ಆರ್ಗ್ಯುಮೆಂಟ್ ಕಾಣಿಸುತ್ತಿಲ್ಲ." + +#: ../cli/src/devices.c:776 ../cli/src/devices.c:915 ../cli/src/devices.c:1035 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "ದೋಷ: '%s' ಎಂಬ ಸಾಧನವು ಕಂಡು ಬಂದಿಲ್ಲ." + +#: ../cli/src/devices.c:799 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "ಯಶಸ್ಸು: '%s' ಎಂಬ ಸಾಧನದಿಂದ ಯಶಸ್ವಿಯಾಗಿ ಸಂಪರ್ಕವನ್ನು ಕಡಿದುಹಾಕಲಾಗಿದೆ." + +#: ../cli/src/devices.c:824 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "ದೋಷ: '%s' (%s) ಎಂಬ ಸಾಧನದ ಸಂಪರ್ಕವನ್ನು ಕಡಿದು ಹಾಕುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ: %s" + +#: ../cli/src/devices.c:832 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "ಸಾಧನದ ಸ್ಥಿತಿ: %d (%s)\n" + +#: ../cli/src/devices.c:896 +#, c-format +msgid "Error: iface has to be specified." +msgstr "ದೋಷ: iface ಅನ್ನು ಸೂಚಿಸಬೇಕು." + +#: ../cli/src/devices.c:1011 +#, c-format +msgid "Error: 'dev wifi': %s" +msgstr "ದೋಷ: 'dev wifi': %s" + +#: ../cli/src/devices.c:1013 +#, c-format +msgid "Error: 'dev wifi': %s; allowed fields: %s" +msgstr "ದೋಷ: 'dev wifi': %s; ಅನುಮತಿಸಲಾದ ಕ್ಷೇತ್ರಗಳು: %s" + +#: ../cli/src/devices.c:1020 +msgid "WiFi scan list" +msgstr "WiFi ಸ್ಕ್ಯಾನ್ ಪಟ್ಟಿ" + +#: ../cli/src/devices.c:1055 ../cli/src/devices.c:1109 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "ದೋಷ: '%s' ಎಂಬ hwaddr ನ ನಿಲುಕಣಾ ಬಿಂದುವು ಕಾಣಿಸುತ್ತಿಲ್ಲ." + +#: ../cli/src/devices.c:1072 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "ದೋಷ: '%s' ಎಂಬುದು ಒಂದು WiFi ಸಾಧನವಾಗಿಲ್ಲ." + +#: ../cli/src/devices.c:1136 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "ದೋಷ: '%s' ಎಂಬ 'dev wifi' ಆಜ್ಞೆಯು ಮಾನ್ಯವಾದುದಲ್ಲ." + +#: ../cli/src/devices.c:1183 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "ದೋಷ: '%s' ಎಂಬ 'dev' ಆಜ್ಞೆಯು ಮಾನ್ಯವಾದುದಲ್ಲ." + +#: ../cli/src/network-manager.c:35 +msgid "RUNNING" +msgstr "RUNNING" + +#. 1 +#: ../cli/src/network-manager.c:37 +msgid "WIFI-HARDWARE" +msgstr "WIFI-HARDWARE" + +#. 2 +#: ../cli/src/network-manager.c:38 +msgid "WIFI" +msgstr "WIFI" + +#. 3 +#: ../cli/src/network-manager.c:39 +msgid "WWAN-HARDWARE" +msgstr "WWAN-HARDWARE" + +#. 4 +#: ../cli/src/network-manager.c:40 +msgid "WWAN" +msgstr "WWAN" + +#: ../cli/src/network-manager.c:62 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" +msgstr "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + +#: ../cli/src/network-manager.c:83 +msgid "asleep" +msgstr "ನಿದ್ರಿಸುವ" + +#: ../cli/src/network-manager.c:85 +msgid "connecting" +msgstr "ಸಂಪರ್ಕ ಕಲ್ಪಿಸಲಾಗುತ್ತಿದೆ" + +#: ../cli/src/network-manager.c:125 +#, c-format +msgid "Error: 'nm status': %s" +msgstr "ದೋಷ: 'nm status': %s" + +#: ../cli/src/network-manager.c:127 +#, c-format +msgid "Error: 'nm status': %s; allowed fields: %s" +msgstr "ದೋಷ: 'nm status': %s; ಅನುಮತಿಸಲಾದ ಕ್ಷೇತ್ರಗಳು: %s" + +#: ../cli/src/network-manager.c:134 +msgid "NetworkManager status" +msgstr "NetworkManager ಸ್ಥಿತಿ" + +#. Print header +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "enabled" +msgstr "ಸಕ್ರಿಯಗೊಂಡ" + +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "disabled" +msgstr "ಅಶಕ್ತಗೊಂಡ" + +#: ../cli/src/network-manager.c:148 +msgid "running" +msgstr "ಚಾಲನೆಯಲ್ಲಿದೆ" + +#: ../cli/src/network-manager.c:148 +msgid "not running" +msgstr "ಚಾಲನೆಯಲ್ಲಿಲ್ಲ" + +#: ../cli/src/network-manager.c:201 ../cli/src/network-manager.c:233 +#, c-format +msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s" +msgstr "ದೋಷ: '--fields' '%s' ಎಂಬ ಮೌಲ್ಯವು ಇಲ್ಲಿ ಸರಿಯಾದುದಲ್ಲ.; ಅನುಮತಿ ಇರುವ ಕ್ಷೇತ್ರಗಳು: %s" + +#: ../cli/src/network-manager.c:209 +msgid "WiFi enabled" +msgstr "WiFi ಸಕ್ರಿಯಗೊಂಡಿದೆ" + +#: ../cli/src/network-manager.c:220 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "ದೋಷ: ಅಮಾನ್ಯವಾದ 'wifi' ನಿಯತಾಂಕ: '%s'." + +#: ../cli/src/network-manager.c:241 +msgid "WWAN enabled" +msgstr "WWAN ಸಕ್ರಿಯಗೊಂಡಿದೆ" + +#: ../cli/src/network-manager.c:252 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "ದೋಷ: ಅಮಾನ್ಯವಾದ 'wwan' ರ ನಿಯತಾಂಕ: '%s'." + +#: ../cli/src/network-manager.c:263 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "ದೋಷ: '%s' ಎಂಬ 'nm' ಆಜ್ಞೆಯು ಮಾನ್ಯವಾದುದಲ್ಲ." + +#: ../cli/src/nmcli.c:69 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -m[ode] tabular|multiline output mode\n" +" -f[ields] |all|common specify fields to output\n" +" -e[scape] yes|no escape columns separators in " +"values\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -m[ode] tabular|multiline output mode\n" +" -f[ields] |all|common specify fields to output\n" +" -e[scape] yes|no escape columns separators in " +"values\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" + +#: ../cli/src/nmcli.c:113 +#, c-format +msgid "Error: Object '%s' is unknown, try 'nmcli help'." +msgstr "ದೋಷ: '%s' ಎಂಬ ವಸ್ತುವಿನ ಬಗೆಗೆ ತಿಳಿದಿಲ್ಲ, 'nmcli help' ಅನ್ನು ಪ್ರಯತ್ನಿಸಿ." + +#: ../cli/src/nmcli.c:143 +#, c-format +msgid "Error: Option '--terse' is specified the second time." +msgstr "ದೋಷ: '--terse' ಎಂಬ ಆಯ್ಕೆಯನ್ನು ಎರಡನೆ ಬಾರಿಗೆ ಸೂಚಿಸಲಾಗಿದೆ." + +#: ../cli/src/nmcli.c:148 +#, c-format +msgid "Error: Option '--terse' is mutually exclusive with '--pretty'." +msgstr "ದೋಷ: '--terse' ಎಂಬುದು '--pretty' ಯೊಂದಿಗೆ ಪರಸ್ಪರ ಮೀಸಲಾಗಿದೆ." + +#: ../cli/src/nmcli.c:156 +#, c-format +msgid "Error: Option '--pretty' is specified the second time." +msgstr "ದೋಷ: '--pretty' ಎಂಬ ಆಯ್ಕೆಯನ್ನು ಎರಡನೆ ಬಾರಿಗೆ ಸೂಚಿಸಲಾಗಿದೆ." + +#: ../cli/src/nmcli.c:161 +#, c-format +msgid "Error: Option '--pretty' is mutually exclusive with '--terse'." +msgstr "ದೋಷ: '--pretty' ಎಂಬುದು '--terse' ಯೊಂದಿಗೆ ಪರಸ್ಪರ ಮೀಸಲಾಗಿದೆ." + +#: ../cli/src/nmcli.c:171 ../cli/src/nmcli.c:187 +#, c-format +msgid "Error: missing argument for '%s' option." +msgstr "ದೋಷ: '%s' ಆರ್ಗ್ಯುಮೆಂಟ್ ಕಾಣಿಸುತ್ತಿಲ್ಲ" + +#: ../cli/src/nmcli.c:180 ../cli/src/nmcli.c:196 +#, c-format +msgid "Error: '%s' is not valid argument for '%s' option." +msgstr "ದೋಷ: '%s' ಎನ್ನುವುದು '%s' ಎಂಬ ಆಯ್ಕೆಗೆ ಸರಿಯಾದ ಆರ್ಗ್ಯುಮೆಂಟ್ ಆಗಿಲ್ಲ." + +#: ../cli/src/nmcli.c:203 +#, c-format +msgid "Error: fields for '%s' options are missing." +msgstr "ದೋಷ: '%s' ಎಂಬ ಆಯ್ಕೆಯ ಕ್ಷೇತ್ರಗಳು ಕಾಣಿಸುತ್ತಿಲ್ಲ." + +#: ../cli/src/nmcli.c:209 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "nmcli ಉಪಕರಣ, ಆವೃತ್ತಿ %s\n" + +#: ../cli/src/nmcli.c:215 +#, c-format +msgid "Error: Option '%s' is unknown, try 'nmcli -help'." +msgstr "ದೋಷ: '%s' ಎಂಬ ಆಯ್ಕೆಯ ಬಗೆಗೆ ತಿಳಿದಿಲ್ಲ, 'nmcli -help' ಅನ್ನು ಪ್ರಯತ್ನಿಸಿ." + +#: ../cli/src/nmcli.c:234 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "%d ಎಂಬ ಸಂಕೇತವು ಕಂಡುಬಂದಿದೆ, ಮುಚ್ಚಲಾಗುತ್ತಿದೆ......" + +#: ../cli/src/nmcli.c:259 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "ದೋಷ: NetworkManager ನೊಂದಿಗೆ ಸಂಪರ್ಕಸಾಧಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ." + +#: ../cli/src/nmcli.c:275 +msgid "Success" +msgstr "ಯಶಸ್ವಿಯಾಗಿದೆ" + +#: ../cli/src/settings.c:407 +#, c-format +msgid "%d (hex-ascii-key)" +msgstr "%d (hex-ascii-key)" + +#: ../cli/src/settings.c:409 +#, c-format +msgid "%d (104/128-bit passphrase)" +msgstr "%d (104/128-ಬಿಟ್‌ ಗುಪ್ತವಾಕ್ಯಾಂಶ)" + +#: ../cli/src/settings.c:412 +#, c-format +msgid "%d (unknown)" +msgstr "%d (ಅಜ್ಞಾತ)" + +#: ../cli/src/settings.c:438 +msgid "0 (unknown)" +msgstr "0 (ಗೊತ್ತಿರದ)" + +#: ../cli/src/settings.c:444 +msgid "any, " +msgstr "ಯಾವುದಾದರೂ, " + +#: ../cli/src/settings.c:446 +msgid "900 MHz, " +msgstr "900 MHz, " + +#: ../cli/src/settings.c:448 +msgid "1800 MHz, " +msgstr "1800 MHz, " + +#: ../cli/src/settings.c:450 +msgid "1900 MHz, " +msgstr "1900 MHz, " + +#: ../cli/src/settings.c:452 +msgid "850 MHz, " +msgstr "850 MHz, " + +#: ../cli/src/settings.c:454 +msgid "WCDMA 3GPP UMTS 2100 MHz, " +msgstr "WCDMA 3GPP UMTS 2100 MHz, " + +#: ../cli/src/settings.c:456 +msgid "WCDMA 3GPP UMTS 1800 MHz, " +msgstr "WCDMA 3GPP UMTS 1800 MHz, " + +#: ../cli/src/settings.c:458 +msgid "WCDMA 3GPP UMTS 1700/2100 MHz, " +msgstr "WCDMA 3GPP UMTS 1700/2100 MHz, " + +#: ../cli/src/settings.c:460 +msgid "WCDMA 3GPP UMTS 800 MHz, " +msgstr "WCDMA 3GPP UMTS 800 MHz, " + +#: ../cli/src/settings.c:462 +msgid "WCDMA 3GPP UMTS 850 MHz, " +msgstr "WCDMA 3GPP UMTS 850 MHz, " + +#: ../cli/src/settings.c:464 +msgid "WCDMA 3GPP UMTS 900 MHz, " +msgstr "WCDMA 3GPP UMTS 900 MHz, " + +#: ../cli/src/settings.c:466 +msgid "WCDMA 3GPP UMTS 1700 MHz, " +msgstr "WCDMA 3GPP UMTS 1700 MHz, " + +#: ../cli/src/settings.c:546 ../cli/src/settings.c:708 +msgid "auto" +msgstr "ಸ್ವಯಂಚಾಲಿತ" + +#: ../cli/src/settings.c:704 ../cli/src/settings.c:707 ../cli/src/utils.c:172 +msgid "not set" +msgstr "ಹೊಂದಿಸಲಾಗಿಲ್ಲ" + +#: ../cli/src/utils.c:124 +#, c-format +msgid "field '%s' has to be alone" +msgstr "'%s' ಎಂಬ ಕ್ಷೇತ್ರವು ಒಂಟಿಯಾಗಿಯೆ ಇರಬೇಕು" + +#: ../cli/src/utils.c:127 +#, c-format +msgid "invalid field '%s'" +msgstr "ಅಮಾನ್ಯವಾದ ಕ್ಷೇತ್ರ '%s'" + +#: ../cli/src/utils.c:146 +#, c-format +msgid "Option '--terse' requires specifying '--fields'" +msgstr "'--terse' ಎಂಬ ಆಯ್ಕೆಗೆ '--fields' ಅನ್ನು ಸೂಚಿಸಬೇಕಾಗುತ್ತದೆ" + +#: ../cli/src/utils.c:150 +#, c-format +msgid "Option '--terse' requires specific '--fields' option values , not '%s'" +msgstr "" +"'--terse' ಎಂಬ ಆಯ್ಕೆಗೆ ನಿಶ್ಚಿತವಾದ '--fields' ಆಯ್ಕೆಯ ಮೌಲ್ಯದ ಅಗತ್ಯವಿರುತ್ತದೆಯೆ ಹೊರತು, '%s' " +"ಎಂಬುದಲ್ಲ" + #: ../libnm-util/crypto.c:120 #, c-format msgid "PEM key file had no end tag '%s'." @@ -103,8 +1245,9 @@ msgstr "IV ಅನ್ನು ಶೇಖರಿಸಿಡಲು ಸಾಕಷ್ಟು msgid "IV contains non-hexadecimal digits." msgstr "IV ಯು ಹೆಕ್ಸಾ-ದಶಮಾಂಶ ಅಲ್ಲದ ಅಂಕೆಗಳನ್ನು ಹೊಂದಿದೆ." -#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:143 -#: ../libnm-util/crypto_nss.c:169 +#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:336 #, c-format msgid "Private key cipher '%s' was unknown." msgstr "ಖಾಸಗಿ ಕೀಲಿ ಸಿಫರ್ '%s' ತಿಳಿದಿಲ್ಲ." @@ -124,72 +1267,106 @@ msgstr "ಖಾಸಗಿ ಕೀಲಿಯ ಬಗೆಯನ್ನು ನಿರ್ಧ msgid "Not enough memory to store decrypted private key." msgstr "ಡೀಕ್ರಿಪ್ಟ್ ಮಾಡಲಾದ ಖಾಸಗಿ ಕೀಲಿಯನ್ನು ಶೇಖರಿಸಿಡಲು ಸಾಕಷ್ಟು ಮೆಮೊರಿ ಇಲ್ಲ." -#: ../libnm-util/crypto_gnutls.c:46 +#: ../libnm-util/crypto_gnutls.c:49 msgid "Failed to initialize the crypto engine." msgstr "ಕ್ರಿಪ್ಟೋ ಎಂಜಿನ್ ಅನ್ನು ಆರಂಭಿಸುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ." -#: ../libnm-util/crypto_gnutls.c:90 +#: ../libnm-util/crypto_gnutls.c:93 #, c-format msgid "Failed to initialize the MD5 engine: %s / %s." msgstr "MD5 ಎಂಜಿನ್ ಅನ್ನು ಆರಂಭಿಸುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ: %s / %s." -#: ../libnm-util/crypto_gnutls.c:152 ../libnm-util/crypto_nss.c:178 +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "ಅಮಾನ್ಯವಾದ IV ಗಾತ್ರ (ಕನಿಷ್ಟ %zd ಇರಬೇಕು)." + +#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188 #, c-format msgid "Not enough memory for decrypted key buffer." msgstr "ಡೀಕ್ರಿಪ್ಟ್ ಮಾಡಲಾದ ಬಫರಿಗಾಗಿ ಸಾಕಷ್ಟು ಮೆಮೊರಿ ಇಲ್ಲ." -#: ../libnm-util/crypto_gnutls.c:160 +#: ../libnm-util/crypto_gnutls.c:173 #, c-format msgid "Failed to initialize the decryption cipher context: %s / %s." msgstr "ಡೀಕ್ರಿಪ್ಸ್ ಮಾಡುವ ಸಿಫರ್ ಸಂದರ್ಭವನ್ನು ಆರಂಭಗೊಳಿಸುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ: %s / %s." -#: ../libnm-util/crypto_gnutls.c:169 +#: ../libnm-util/crypto_gnutls.c:182 #, c-format msgid "Failed to set symmetric key for decryption: %s / %s." msgstr "ಡೀಕ್ರಿಪ್ಟ್ ಮಾಡಲು ಸಿಮಿಟ್ರಿಕ್ ಕೀಲಿಯನ್ನು ಹೊಂದಿಸಲು ವಿಫಲಗೊಂಡಿದೆ: %s / %s." -#: ../libnm-util/crypto_gnutls.c:178 +#: ../libnm-util/crypto_gnutls.c:191 #, c-format msgid "Failed to set IV for decryption: %s / %s." msgstr "ಡೀಕ್ರಿಪ್ಟ್ ಮಾಡಲು IV ಅನ್ನು ಹೊಂದಿಸಲು ವಿಫಲಗೊಂಡಿದೆ: %s / %s." -#: ../libnm-util/crypto_gnutls.c:187 +#: ../libnm-util/crypto_gnutls.c:200 #, c-format msgid "Failed to decrypt the private key: %s / %s." msgstr "ಖಾಸಗಿ ಕೀಲಿಯನ್ನು ಡೀಕ್ರಿಪ್ಟ್ ಮಾಡುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ: %s / %s." -#: ../libnm-util/crypto_gnutls.c:200 +#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 +#, c-format +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "ಖಾಸಗಿ ಕೀಲಿಯನ್ನು ಡೀಕ್ರಿಪ್ಟ್ ಮಾಡುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ: ಅನಿರೀಕ್ಷಿತವಾದ ಪ್ಯಾಡಿಂಗ್ ಗಾತ್ರ" + +#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 #, c-format msgid "Failed to decrypt the private key." msgstr "ಖಾಸಗಿ ಕೀಲಿಯನ್ನು ಡೀಕ್ರಿಪ್ಟ್ ಮಾಡುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ." -#: ../libnm-util/crypto_gnutls.c:235 +#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "ಗೂಢಲಿಪೀಕರಿಸಲು ಮೆಮೊರಿಯನ್ನು ನಿಯೋಜಸಿಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ." + +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "ಗೂಢಲಿಪೀಕರಣ ಸಿಫರ್ ಸಂದರ್ಭವನ್ನು ಆರಂಭಗೊಳಿಸುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "ಗೂಢಲಿಪೀಕರಿಸಲು ಸಿಮಿಟ್ರಿಕ್ ಕೀಲಿಯನ್ನು ಹೊಂದಿಸಲು ವಿಫಲಗೊಂಡಿದೆ: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +msgid "Failed to set IV for encryption: %s / %s." +msgstr "ಗೂಢಲಿಪೀಕರಿಸಲು IV ಅನ್ನು ಹೊಂದಿಸಲು ವಿಫಲಗೊಂಡಿದೆ: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +msgid "Failed to encrypt the data: %s / %s." +msgstr "ಖಾಸಗಿ ಕೀಲಿಯನ್ನು ಗೂಢಲಿಪೀಕರಿಸುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:362 #, c-format msgid "Error initializing certificate data: %s" msgstr "ಪ್ರಮಾಣಪತ್ರ ದತ್ತಾಂಶವನ್ನು ಆರಂಭಿಸುವಲ್ಲಿ ದೋಷ ಉಂಟಾಗಿದೆ: %s" -#: ../libnm-util/crypto_gnutls.c:257 +#: ../libnm-util/crypto_gnutls.c:384 #, c-format msgid "Couldn't decode certificate: %s" msgstr "ಪ್ರಮಾಣಪತ್ರವನ್ನು ಡೀಕೋಡ್ ಮಾಡಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ: %s" -#: ../libnm-util/crypto_gnutls.c:281 +#: ../libnm-util/crypto_gnutls.c:408 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %s" msgstr "PKCS#12 ಡೀಕೋಡರ್ ಅನ್ನು ಆರಂಭಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ: %s" -#: ../libnm-util/crypto_gnutls.c:294 +#: ../libnm-util/crypto_gnutls.c:421 #, c-format msgid "Couldn't decode PKCS#12 file: %s" msgstr "PKCS#12 ಕಡತವನ್ನು ಡೀಕೋಡ್ ಮಾಡಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ: %s" -#: ../libnm-util/crypto_gnutls.c:306 +#: ../libnm-util/crypto_gnutls.c:433 #, c-format msgid "Couldn't verify PKCS#12 file: %s" msgstr "PKCS#12 ಕಡತವನ್ನು ಪರಿಶೀಲಿಸಲಾಗಿಲ್ಲ: %s" -#: ../libnm-util/crypto_nss.c:57 -#: ../system-settings/plugins/ifcfg-rh/crypto.c:52 +#: ../libnm-util/crypto_nss.c:56 #, c-format msgid "Failed to initialize the crypto engine: %d." msgstr "ಕ್ರಿಪ್ಟೊ ಎಂಜಿನ್ ಅನ್ನು ಆರಂಭಿಸುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ: %d." @@ -199,105 +1376,192 @@ msgstr "ಕ್ರಿಪ್ಟೊ ಎಂಜಿನ್ ಅನ್ನು ಆರಂಭ msgid "Failed to initialize the MD5 context: %d." msgstr "MD5 ಸಂದರ್ಭವನ್ನು ಆರಂಭಿಸುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ: %d." -#: ../libnm-util/crypto_nss.c:186 +#: ../libnm-util/crypto_nss.c:179 +#, c-format +msgid "Invalid IV length (must be at least %d)." +msgstr "ಅಮಾನ್ಯವಾದ IV ಗಾತ್ರ (ಕನಿಷ್ಟ %d ಇರಬೇಕು)." + +#: ../libnm-util/crypto_nss.c:196 #, c-format msgid "Failed to initialize the decryption cipher slot." msgstr "ಡೀಕ್ರಪ್ಟ್ ಮಾಡಲಾಗುವ ಸಿಫರ್ ಜಾಗವನ್ನು ಆರಂಭಿಸಲು ವಿಫಲಗೊಂಡಿದೆ." -#: ../libnm-util/crypto_nss.c:196 +#: ../libnm-util/crypto_nss.c:206 #, c-format msgid "Failed to set symmetric key for decryption." msgstr "ಡೀಕ್ರಿಪ್ಟ್ ಮಾಡಲು ಸಿಮಿಟ್ರಿಕ್ ಕೀಲಿಯನ್ನು ಹೊಂದಿಸುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ." -#: ../libnm-util/crypto_nss.c:206 +#: ../libnm-util/crypto_nss.c:216 #, c-format msgid "Failed to set IV for decryption." msgstr "ಡೀಕ್ರಿಪ್ಟ್ ಮಾಡಲು IV ಅನ್ನು ಹೊಂದಿಸುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ." -#: ../libnm-util/crypto_nss.c:214 +#: ../libnm-util/crypto_nss.c:224 #, c-format msgid "Failed to initialize the decryption context." msgstr "ಡೀಕ್ರಿಪ್ಟ್ ಮಾಡುವ ಸನ್ನಿವೇಶವನ್ನು ಆರಂಭಿಸುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ." -#: ../libnm-util/crypto_nss.c:227 +#: ../libnm-util/crypto_nss.c:237 #, c-format msgid "Failed to decrypt the private key: %d." msgstr "ಖಾಸಗಿ ಕೀಲಿಯನ್ನು ಡೀಕ್ರಿಪ್ಟ್ ಮಾಡುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ: %d." -#: ../libnm-util/crypto_nss.c:239 +#: ../libnm-util/crypto_nss.c:245 +#, c-format +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "" +"ಖಾಸಗಿ ಕೀಲಿಯನ್ನು ಡೀಕ್ರಿಪ್ಟ್ ಮಾಡುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ: ಡೀಕ್ರಿಪ್ಟ್ ಮಾಡಲಾದ ದತ್ತಾಂಶದ ಗಾತ್ರವು " +"ಬಹಳ ದೊಡ್ಡದಾಗಿದೆ." + +#: ../libnm-util/crypto_nss.c:256 #, c-format msgid "Failed to finalize decryption of the private key: %d." msgstr "ಖಾಸಗಿ ಕೀಲಿಯನ್ನು ಡೀಕ್ರಿಪ್ಟ್ ಮಾಡುವಿಕೆಯನ್ನು ಪೂರ್ಣಗೊಳಿಸುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ: %d." -#: ../libnm-util/crypto_nss.c:284 +#: ../libnm-util/crypto_nss.c:364 +#, c-format +msgid "Failed to initialize the encryption cipher slot." +msgstr "ಗೂಢಲಿಪೀಕರಿಸಲಾಗುವ ಸಿಫರ್ ಜಾಗವನ್ನು ಆರಂಭಿಸಲು ವಿಫಲಗೊಂಡಿದೆ." + +#: ../libnm-util/crypto_nss.c:372 +#, c-format +msgid "Failed to set symmetric key for encryption." +msgstr "ಗೂಢಲಿಪೀಕರಿಸಲು ಸಿಮಿಟ್ರಿಕ್ ಕೀಲಿಯನ್ನು ಹೊಂದಿಸುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ." + +#: ../libnm-util/crypto_nss.c:380 +#, c-format +msgid "Failed to set IV for encryption." +msgstr "ಗೂಢಲಿಪೀಕರಿಸಲು IV ಅನ್ನು ಹೊಂದಿಸುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ." + +#: ../libnm-util/crypto_nss.c:388 +#, c-format +msgid "Failed to initialize the encryption context." +msgstr "ಗೂಢಲಿಪೀಕರಿಸುವ ಸನ್ನಿವೇಶವನ್ನು ಆರಂಭಿಸುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ." + +#: ../libnm-util/crypto_nss.c:396 +#, c-format +msgid "Failed to encrypt: %d." +msgstr "ಗೂಢಲಿಪೀಕರಿಸುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ: %d." + +#: ../libnm-util/crypto_nss.c:404 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "ಗೂಢಲಿಪೀಕರಿಸಲು ಅನಿರೀಕ್ಷಿತವಾದ ದತ್ತಾಂಶದ ಮೊತ್ತ." + +#: ../libnm-util/crypto_nss.c:447 #, c-format msgid "Couldn't decode certificate: %d" msgstr "ಪ್ರಮಾಣಪತ್ರವನ್ನು ಡೀಕೋಡ್ ಮಾಡಲು ಸಾಧ್ಯವಾಗಲಿಲ್ಲ: %d" -#: ../libnm-util/crypto_nss.c:319 +#: ../libnm-util/crypto_nss.c:482 #, c-format msgid "Couldn't convert password to UCS2: %d" msgstr "ಗುಪ್ತಪದವನ್ನು UCS2 ಗೆ ಬದಲಾಯಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ: %d" -#: ../libnm-util/crypto_nss.c:347 +#: ../libnm-util/crypto_nss.c:510 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %d" msgstr "PKCS#12 ಡೀಕೋಡರ್ ಅನ್ನು ಆರಂಭಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ: %d" -#: ../libnm-util/crypto_nss.c:356 +#: ../libnm-util/crypto_nss.c:519 #, c-format msgid "Couldn't decode PKCS#12 file: %d" msgstr "PKCS#12 ಕಡತವನ್ನು ಡೀಕೋಡ್ ಮಾಡಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ: %d" -#: ../libnm-util/crypto_nss.c:365 +#: ../libnm-util/crypto_nss.c:528 #, c-format msgid "Couldn't verify PKCS#12 file: %d" msgstr "PKCS#12 ಕಡತವನ್ನು ಖಚಿತಪಡಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ: %d" -#: ../src/nm-netlink-monitor.c:194 ../src/nm-netlink-monitor.c:458 +#: ../libnm-util/crypto_nss.c:557 +msgid "Could not generate random data." +msgstr "ಮನಸ್ಸಿಗೆ ಬಂದ ದತ್ತಾಂಶವನ್ನು ಉತ್ಪಾದಿಸಲಾಗಲಿಲ್ಲ." + +#: ../libnm-util/nm-utils.c:1925 +#, c-format +msgid "Not enough memory to make encryption key." +msgstr "ಖಾಸಗಿ ಕೀಲಿಯನ್ನು ಗೂಢಲಿಪೀಕರಿಸಲು ಸಾಕಷ್ಟು ಮೆಮೊರಿ ಇಲ್ಲ." + +#: ../libnm-util/nm-utils.c:2035 +msgid "Could not allocate memory for PEM file creation." +msgstr "PEM ಕಡತ ರಚನೆಗೆ ಮೆಮೊರಿಯನ್ನು ನಿಯೋಜಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ." + +#: ../libnm-util/nm-utils.c:2047 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "IV ಅನ್ನು PEM ಕಡತಕ್ಕೆ ಬರೆಯಲು ಮೆಮೊರಿಯನ್ನು ನಿಯೋಜಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ." + +#: ../libnm-util/nm-utils.c:2059 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "ಗೂಢಲಿಪೀಕರಿಸಲಾದ ಕೀಲಿಯನ್ನು PEM ಕಡತಕ್ಕೆ ಬರೆಯಲು ಮೆಮೊರಿಯನ್ನು ನಿಯೋಜಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ." + +#: ../libnm-util/nm-utils.c:2078 +#, c-format +msgid "Could not allocate memory for PEM file data." +msgstr "PEM ಕಡತ ದತ್ತಾಂಶಕ್ಕಾಗಿ ಮೆಮೊರಿಯನ್ನು ನಿಯೋಜಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ." + +#: ../src/nm-netlink-monitor.c:100 ../src/nm-netlink-monitor.c:231 +#: ../src/nm-netlink-monitor.c:653 #, c-format msgid "error processing netlink message: %s" msgstr "ನೆಟ್‌ಲಿಂಕ್ ಸಂದೇಶವನ್ನು ಸಂಸ್ಕರಿಸುವಲ್ಲಿ ದೋಷ ಉಂಟಾಗಿದೆ: %s" -#: ../src/nm-netlink-monitor.c:255 +#: ../src/nm-netlink-monitor.c:214 +msgid "error occurred while waiting for data on socket" +msgstr "ಸಾಕೆಟ್‌ನಲ್ಲಿ ದತ್ತಾಂಶಕ್ಕಾಗಿ ಕಾಯುವಾಗ ದೋಷವು ಎದುರಾಗಿದೆ" + +#: ../src/nm-netlink-monitor.c:254 #, c-format -msgid "unable to allocate netlink handle for monitoring link status: %s" -msgstr "ಕೊಂಡಿಯ ಸ್ಥಿತಿಯನ್ನು ಮೇಲ್ವಿಚಾರಣೆ ನಡೆಸಲು ನೆಟ್‌ಲಿಂಕ್ ಹ್ಯಾಂಡಲ್ ಅನ್ನು ನಿಯೋಜಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ: %s" +msgid "unable to connect to netlink for monitoring link status: %s" +msgstr "" +"ಕೊಂಡಿಯ ಸ್ಥಿತಿಯನ್ನು ಮೇಲ್ವಿಚಾರಣೆ ನಡೆಸಲು ನೆಟ್‌ಲಿಂಕ್‌ನೊಂದಿಗೆ ಸಂಪರ್ಕ ಜೋಡಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ: %" +"s" #: ../src/nm-netlink-monitor.c:265 #, c-format -msgid "unable to connect to netlink for monitoring link status: %s" -msgstr "ಕೊಂಡಿಯ ಸ್ಥಿತಿಯನ್ನು ಮೇಲ್ವಿಚಾರಣೆ ನಡೆಸಲು ನೆಟ್‌ಲಿಂಕ್‌ನೊಂದಿಗೆ ಸಂಪರ್ಕ ಜೋಡಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ: %s" +msgid "unable to enable netlink handle credential passing: %s" +msgstr "ನೆಟ್‌ಲಿಂಕ್ ಹ್ಯಾಂಡಲ್ ಕ್ರೆಡೆನ್ಶಿಯಲ್ ಪಾಸಿಂಗ್ ಅನ್ನು ಶಕ್ತಗೊಳಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ: %s" -#: ../src/nm-netlink-monitor.c:273 +#: ../src/nm-netlink-monitor.c:291 ../src/nm-netlink-monitor.c:353 #, c-format -msgid "unable to join netlink group for monitoring link status: %s" -msgstr "ಕೊಂಡಿಯ ಸ್ಥಿತಿಯನ್ನು ಮೇಲ್ವಿಚಾರಣೆ ನಡೆಸಲು ನೆಟ್‌ಲಿಂಕ್ ಗುಂಪನ್ನು ಸೇರಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ: %s" +msgid "unable to allocate netlink handle for monitoring link status: %s" +msgstr "" +"ಕೊಂಡಿಯ ಸ್ಥಿತಿಯನ್ನು ಮೇಲ್ವಿಚಾರಣೆ ನಡೆಸಲು ನೆಟ್‌ಲಿಂಕ್ ಹ್ಯಾಂಡಲ್ ಅನ್ನು ನಿಯೋಜಿಸಲು " +"ಸಾಧ್ಯವಾಗಿಲ್ಲ: %s" -#: ../src/nm-netlink-monitor.c:281 +#: ../src/nm-netlink-monitor.c:376 #, c-format msgid "unable to allocate netlink link cache for monitoring link status: %s" -msgstr "ಕೊಂಡಿಯ ಸ್ಥಿತಿಯನ್ನು ಮೇಲ್ವಿಚಾರಣೆ ನಡೆಸಲು ನೆಟ್‌ಲಿಂಕ್ ಕೊಂಡಿ ಕ್ಯಾಶೆಯನ್ನು ನಿಯೋಜಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ: %s" +msgstr "" +"ಕೊಂಡಿಯ ಸ್ಥಿತಿಯನ್ನು ಮೇಲ್ವಿಚಾರಣೆ ನಡೆಸಲು ನೆಟ್‌ಲಿಂಕ್ ಕೊಂಡಿ ಕ್ಯಾಶೆಯನ್ನು ನಿಯೋಜಿಸಲು " +"ಸಾಧ್ಯವಾಗಿಲ್ಲ: %s" -#: ../src/nm-netlink-monitor.c:422 +#: ../src/nm-netlink-monitor.c:502 +#, c-format +msgid "unable to join netlink group: %s" +msgstr "ನೆಟ್‌ಲಿಂಕ್ ಗುಂಪನ್ನು ಸೇರಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ: %s" + +#: ../src/nm-netlink-monitor.c:629 ../src/nm-netlink-monitor.c:642 #, c-format msgid "error updating link cache: %s" msgstr "ಕೊಂಡಿ ಕ್ಯಾಶೆಯನ್ನು ಅಪ್‌ಡೇಟ್ ಮಾಡುವಾಗ ದೋಷ ಉಂಟಾಗಿದೆ: %s" -#: ../src/nm-netlink-monitor.c:488 -msgid "error occurred while waiting for data on socket" -msgstr "ಸಾಕೆಟ್‌ನಲ್ಲಿ ದತ್ತಾಂಶಕ್ಕಾಗಿ ಕಾಯುವಾಗ ದೋಷವು ಎದುರಾಗಿದೆ" - -#: ../src/NetworkManager.c:329 +#: ../src/main.c:502 #, c-format msgid "Invalid option. Please use --help to see a list of valid options.\n" msgstr "ಅಮಾನ್ಯವಾದ ಆಯ್ಕೆ. ಮಾನ್ಯವಾದ ಆಯ್ಕೆಗಳಿಗಾಗಿ ದಯವಿಟ್ಟು --help ಅನ್ನು ನೋಡಿ.\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:97 +#: ../src/main.c:562 +#, c-format +msgid "%s. Please use --help to see a list of valid options.\n" +msgstr "%s. ಮಾನ್ಯವಾದ ಆಯ್ಕೆಗಳಿಗಾಗಿ ದಯವಿಟ್ಟು --help ಅನ್ನು ನೋಡಿ.\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:325 msgid "# Created by NetworkManager\n" msgstr "# NetworkManager ನಿಂದ ನಿರ್ಮಿಸಲಾಗಿದೆ\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:103 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:341 #, c-format msgid "" "# Merged from %s\n" @@ -306,28 +1570,242 @@ msgstr "" "# %s ಇಂದ ಒಗ್ಗೂಡಿಸಲಾಗಿದೆ\n" "\n" -#: ../src/named-manager/nm-named-manager.c:255 -msgid "NOTE: the libc resolver may not support more than 3 nameservers." -msgstr "ಸೂಚನೆ: libc ಪರಿಹಾರಕವು(ರಿಸಾಲ್ವರ್) ೩ ನಾಮಪರಿಚಾರಕಗಳಿಗಿಂತ ಹೆಚ್ಚಿನವುಗಳನ್ನು ಬೆಂಬಲಿಸುವುದಿಲ್ಲ." +#: ../src/dhcp-manager/nm-dhcp-manager.c:279 +msgid "no usable DHCP client could be found." +msgstr "ಬಳಸಬಹುದಾದ ಯಾವುದೆ DHCP ಕ್ಲೈಂಟ್ ಕಂಡುಬಂದಿಲ್ಲ." -#: ../src/named-manager/nm-named-manager.c:257 +#: ../src/dhcp-manager/nm-dhcp-manager.c:288 +msgid "'dhclient' could be found." +msgstr "'dhclient' ಕಂಡು ಬಂದಿದೆ." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:298 +msgid "'dhcpcd' could be found." +msgstr "'dhcpcd' ಕಂಡು ಬಂದಿದೆ." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:306 +#, c-format +msgid "unsupported DHCP client '%s'" +msgstr "ಬೆಂಬಲವಿರದ DHCP ಕ್ಲೈಂಟ್ '%s'" + +#: ../src/logging/nm-logging.c:146 +#, c-format +msgid "Unknown log level '%s'" +msgstr "ಗೊತ್ತಿರದ ದಾಖಲೆ ಮಟ್ಟ '%s'" + +#: ../src/logging/nm-logging.c:171 +#, c-format +msgid "Unknown log domain '%s'" +msgstr "ಗೊತ್ತಿರದ ದಾಖಲೆ ಡೊಮೈನ್ '%s'" + +#: ../src/named-manager/nm-named-manager.c:343 +msgid "NOTE: the libc resolver may not support more than 3 nameservers." +msgstr "" +"ಸೂಚನೆ: libc ಪರಿಹಾರಕವು(ರಿಸಾಲ್ವರ್) ೩ ನಾಮಪರಿಚಾರಕಗಳಿಗಿಂತ ಹೆಚ್ಚಿನವುಗಳನ್ನು " +"ಬೆಂಬಲಿಸುವುದಿಲ್ಲ." + +#: ../src/named-manager/nm-named-manager.c:345 msgid "The nameservers listed below may not be recognized." msgstr "ಈ ಕೆಳಗೆ ಸೂಚಿಸಲಾದ ನಾಮಪರಿಚಾರಕಗಳನ್ನು ಗುರುತಿಸಲಾಗಿಲ್ಲ." -#: ../src/system-settings/nm-default-wired-connection.c:182 +#: ../src/system-settings/nm-default-wired-connection.c:157 #, c-format msgid "Auto %s" msgstr "ಸ್ವಯಂ %s" -#: ../system-settings/plugins/ifcfg-rh/reader.c:2168 +#: ../system-settings/plugins/ifcfg-rh/reader.c:3256 msgid "System" -msgstr "ಗಣಕ" +msgstr "ವ್ಯವಸ್ಥೆ" #: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "ಒಂದು ಸಂರಕ್ಷಿತವಾದ WiFi ಜಾಲಬಂಧದ ಮೂಲಕ ಸಂಪರ್ಕ ಸಾಧಿಸುವಿಕೆ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "ಒಂದು ಮುಕ್ತವಾದ WiFi ಜಾಲಬಂಧದ ಮೂಲಕ ಸಂಪರ್ಕ ಸಾಧಿಸುವಿಕೆ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "ಸ್ಥಿರ ವ್ಯವಸ್ಥೆಯ ಆತಿಥೇಯ ಹೆಸರನ್ನು ಮಾರ್ಪಡಿಸಿ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 msgid "Modify system connections" msgstr "ವ್ಯವಸ್ಥೆಯ ಸಂಪರ್ಕಗಳನ್ನು ಮಾರ್ಪಡಿಸು" -#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 msgid "System policy prevents modification of system settings" msgstr "ವ್ಯವಸ್ಥೆಯ ಸಂಪರ್ಕಗಳನ್ನು ಮಾರ್ಪಡಿಸದಂತೆ ವ್ಯವಸ್ಥೆಯ ನಿಯಮಗಳು ತಡೆಯುತ್ತಿವೆ" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +msgid "System policy prevents modification of the persistent system hostname" +msgstr "ಸ್ಥಿರ ವ್ಯವಸ್ಥೆಯ ಆತಿಥೇಯ ಹೆಸರನ್ನು ಮಾರ್ಪಡಿಸದಂತೆ ವ್ಯವಸ್ಥೆಯ ನಿಯಮಗಳು ತಡೆಯುತ್ತವೆ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "ಒಂದು ಸಂರಕ್ಷಿತವಾದ WiFi ಜಾಲಬಂಧದ ಮೂಲಕ ಸಂಪರ್ಕ ಸಾಧಿಸದಂತೆ ವ್ಯವಸ್ಥೆಯ ನಿಯಮಗಳು ತಡೆಯುತ್ತವೆ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "ಒಂದು ಮುಕ್ತವಾದ WiFi ಜಾಲಬಂಧದ ಮೂಲಕ ಸಂಪರ್ಕ ಸಾಧಿಸದಂತೆ ವ್ಯವಸ್ಥೆಯ ನಿಯಮಗಳು ತಡೆಯುತ್ತವೆ" + +#~ msgid "Type" +#~ msgstr "ಬಗೆ" + +#~ msgid "Name" +#~ msgstr "ಹೆಸರು" + +#~ msgid "User connections:\n" +#~ msgstr "ಬಳಕೆದಾರ ಸಂಪರ್ಕಗಳು:\n" + +#~ msgid "System-wide connections" +#~ msgstr "ವ್ಯವಸ್ಥೆಯಾದ್ಯಂತದ ಸಂಪರ್ಕಗಳು" + +#~ msgid "Default" +#~ msgstr "ಪೂರ್ವನಿಯೋಜಿತ" + +#~ msgid "Service" +#~ msgstr "ಸೇವೆ" + +#~ msgid "%s, %s, Freq %d MHz, Rate %d Mb/s, Strength %d" +#~ msgstr "%s, %s, ಫ್ರೀಕ್ವೆ %d MHz, ದರ %d Mb/s, ದೃಢತೆ %d" + +#~ msgid "Device" +#~ msgstr "ಸಾಧನ" + +#~ msgid "Driver" +#~ msgstr "ಚಾಲಕ" + +#~ msgid "State" +#~ msgstr "ಸ್ಥಿತಿ" + +#~ msgid "HW Address" +#~ msgstr "HW ವಿಳಾಸ" + +#~ msgid "" +#~ "\n" +#~ " Capabilities:\n" +#~ msgstr "" +#~ "\n" +#~ " ಸಾಮಾರ್ಥ್ಯಗಳು:\n" + +#~ msgid "Carrier Detect" +#~ msgstr "ಕ್ಯಾರಿಯರ್ ಪತ್ತೆ" + +#~ msgid "Speed" +#~ msgstr "ವೇಗ" + +#~ msgid "" +#~ "\n" +#~ " Wireless Properties\n" +#~ msgstr "" +#~ "\n" +#~ " ವೈರ್ಲೆಸ್‌ ಗುಣಧರ್ಮಗಳು\n" + +#~ msgid "WEP Encryption" +#~ msgstr "WEP ಗೂಢಲಿಪೀಕರಣ" + +#~ msgid "WPA Encryption" +#~ msgstr "WPA ಗೂಢಲಿಪೀಕರಣ" + +#~ msgid "WPA2 Encryption" +#~ msgstr "WPA2 ಗೂಢಲಿಪೀಕರಣ" + +#~ msgid "TKIP cipher" +#~ msgstr "TKIP ಸಿಫರ್" + +#~ msgid "CCMP cipher" +#~ msgstr "CCMP ಸಿಫರ್" + +#~ msgid "" +#~ "\n" +#~ " Wireless Access Points %s\n" +#~ msgstr "" +#~ "\n" +#~ " ವೈರ್ಲೆಸ್ ನಿಲುಕಣಾ ಬಿಂದುಗಳು %s\n" + +#~ msgid "(* = current AP)" +#~ msgstr "(* = ಪ್ರಸಕ್ತ AP)" + +#~ msgid "" +#~ "\n" +#~ " Wired Properties\n" +#~ msgstr "" +#~ "\n" +#~ " ವೈರ್ಡ್ ಗುಣಧರ್ಮಗಳು\n" + +#~ msgid "Carrier" +#~ msgstr "ವಾಹಕ(ಕ್ಯಾರಿಯರ್)" + +#~ msgid "" +#~ "\n" +#~ " IPv4 Settings:\n" +#~ msgstr "" +#~ "\n" +#~ " IPV4 ಸಿದ್ಧತೆಗಳು:\n" + +#~ msgid "Address" +#~ msgstr "ವಿಳಾಸ" + +#~ msgid "Prefix" +#~ msgstr "ಪ್ರಿಫಿಕ್ಸ್" + +#~ msgid "Gateway" +#~ msgstr "ಗೇಟ್‌ವೇ" + +#~ msgid "Device:" +#~ msgstr "ಸಾಧನ:" + +#~ msgid "Error: hwaddr has to be specified." +#~ msgstr "ದೋಷ: hwaddr ಅನ್ನು ಸೂಚಿಸಬೇಕು." + +#~ msgid "AP parameters" +#~ msgstr "AP ನಿಯತಾಂಕಗಳು" + +#~ msgid "Frequency:" +#~ msgstr "ಫ್ರೀಕ್ವೆನ್ಸಿ:" + +#~ msgid "Mode:" +#~ msgstr "ಕ್ರಮ:" + +#~ msgid "Ad-hoc" +#~ msgstr "ತಾತ್ಕಾಲಿಕ" + +#~ msgid "Maximal bitrate:" +#~ msgstr "ಗರಿಷ್ಟ ಬಿಟ್ ದರ:" + +#~ msgid "Strength:" +#~ msgstr "ದೃಢತೆ:" + +#~ msgid "Flags:" +#~ msgstr "ಫ್ಲಾಗ್‌ಗಳು:" + +#~ msgid "privacy" +#~ msgstr "ಗೌಪ್ಯತೆ" + +#~ msgid "WPA flags:" +#~ msgstr "WPA ಫ್ಲಾಗ್‌ಗಳು:" + +#~ msgid "RSN flags:" +#~ msgstr "RSN ಫ್ಲಾಗ್‌ಗಳು:" + +#~ msgid "NM running:" +#~ msgstr "NM ಚಾಲನೆಯಲ್ಲಿದೆ:" + +#~ msgid "NM state:" +#~ msgstr "NM ಸ್ಥಿತಿ:" + +#~ msgid "NM wireless hardware:" +#~ msgstr "NM ವೈರ್ಲೆಸ್‌ ಯಂತ್ರಾಂಶ:" + +#~ msgid "NM wireless:" +#~ msgstr "NM ಯಂತ್ರಾಂಶ:" + +#~ msgid "NM WWAN hardware:" +#~ msgstr "NM WWAN ಯಂತ್ರಾಂಶ:" + +#~ msgid "unable to join netlink group for monitoring link status: %s" +#~ msgstr "" +#~ "ಕೊಂಡಿಯ ಸ್ಥಿತಿಯನ್ನು ಮೇಲ್ವಿಚಾರಣೆ ನಡೆಸಲು ನೆಟ್‌ಲಿಂಕ್ ಗುಂಪನ್ನು ಸೇರಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ: %s" + +#~ msgid "unable to connect to netlink: %s" +#~ msgstr "ನೆಟ್‌ಲಿಂಕ್‌ನೊಂದಿಗೆ ಸಂಪರ್ಕ ಜೋಡಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ: %s" diff --git a/po/ko.po b/po/ko.po index 6592c6ac5e..ad463ab1d2 100644 --- a/po/ko.po +++ b/po/ko.po @@ -1,714 +1,1641 @@ +# translation of ko.po to Korean # networkmanager korean translation. # Copyright (C) 2007 THE NetworkManager'S COPYRIGHT HOLDER # This file is distributed under the same license as the NetworkManager package. +# +# # Young-Ho Cha , 2006-2007. # Namhyung Kim , 2007. -# -# +# Hyunsok Oh , 2010. +# Hyunsok Oh , 2010. msgid "" msgstr "" -"Project-Id-Version: NetworkManager\n" +"Project-Id-Version: ko\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-12-18 17:15+0000\n" -"PO-Revision-Date: 2007-12-24 18:29+0900\n" -"Last-Translator: Namhyung \n" -"Language-Team: GNOME Korea \n" +"POT-Creation-Date: 2010-05-06 14:31+0530\n" +"PO-Revision-Date: 2010-05-10 13:48+1000\n" +"Last-Translator: Hyunsok Oh \n" +"Language-Team: Korean \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: KBabel 1.11.4\n" -#: ../src/nm-netlink-monitor.c:188 ../src/nm-netlink-monitor.c:448 +#: ../cli/src/connections.c:59 ../cli/src/connections.c:74 +#: ../cli/src/devices.c:85 ../cli/src/devices.c:98 ../cli/src/devices.c:108 +#: ../cli/src/devices.c:118 ../cli/src/devices.c:131 ../cli/src/devices.c:142 +#: ../cli/src/devices.c:152 +msgid "NAME" +msgstr "이름" + +#. 0 +#: ../cli/src/connections.c:60 ../cli/src/connections.c:75 +msgid "UUID" +msgstr "UUID" + +#. 1 +#: ../cli/src/connections.c:61 +msgid "DEVICES" +msgstr "장치" + +#. 2 +#: ../cli/src/connections.c:62 ../cli/src/connections.c:77 +msgid "SCOPE" +msgstr "범위" + +#. 3 +#: ../cli/src/connections.c:63 +msgid "DEFAULT" +msgstr "디폴트" + +#. 4 +#: ../cli/src/connections.c:64 +msgid "DBUS-SERVICE" +msgstr "DBUS-서비스" + +#. 5 +#: ../cli/src/connections.c:65 +msgid "SPEC-OBJECT" +msgstr "스펙-객체" + +#. 6 +#: ../cli/src/connections.c:66 +msgid "VPN" +msgstr "VPN" + +#. 1 +#. 0 +#. 1 +#: ../cli/src/connections.c:76 ../cli/src/devices.c:61 ../cli/src/devices.c:87 +msgid "TYPE" +msgstr "유형" + +#. 3 +#: ../cli/src/connections.c:78 +msgid "TIMESTAMP" +msgstr "타임스탬프" + +#. 4 +#: ../cli/src/connections.c:79 +msgid "TIMESTAMP-REAL" +msgstr "실제 타임스탬프" + +#. 5 +#: ../cli/src/connections.c:80 +msgid "AUTOCONNECT" +msgstr "자동연결" + +#. 6 +#: ../cli/src/connections.c:81 +msgid "READONLY" +msgstr "읽기전용" + +#: ../cli/src/connections.c:157 +#, c-format +msgid "" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" +msgstr "" +"사용법: nmcli con { 명령어 | help }\n" +" 명령어 := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface <인터페이스>] [ap <하드웨어주소>] [--nowait] " +"[--timeout <타임아웃시간>]\n" +" down id | uuid \n" + +#: ../cli/src/connections.c:197 ../cli/src/connections.c:536 +#, c-format +msgid "Error: 'con list': %s" +msgstr "오류: 'con list': %s" + +#: ../cli/src/connections.c:199 ../cli/src/connections.c:538 +#, c-format +msgid "Error: 'con list': %s; allowed fields: %s" +msgstr "오류: 'con list': %s; 허용된 필드: %s" + +#: ../cli/src/connections.c:207 +msgid "Connection details" +msgstr "연결 상세 정보" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "system" +msgstr "시스템" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "user" +msgstr "사용자" + +#: ../cli/src/connections.c:383 +msgid "never" +msgstr "하지않음" + +#. "CAPABILITIES" +#. Print header +#. "WIFI-PROPERTIES" +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:544 ../cli/src/settings.c:643 +#: ../cli/src/settings.c:912 ../cli/src/settings.c:913 +#: ../cli/src/settings.c:915 ../cli/src/settings.c:917 +#: ../cli/src/settings.c:1042 ../cli/src/settings.c:1043 +#: ../cli/src/settings.c:1044 ../cli/src/settings.c:1123 +#: ../cli/src/settings.c:1124 ../cli/src/settings.c:1125 +#: ../cli/src/settings.c:1126 ../cli/src/settings.c:1127 +#: ../cli/src/settings.c:1128 ../cli/src/settings.c:1129 +#: ../cli/src/settings.c:1130 ../cli/src/settings.c:1131 +#: ../cli/src/settings.c:1132 ../cli/src/settings.c:1133 +#: ../cli/src/settings.c:1134 ../cli/src/settings.c:1135 +#: ../cli/src/settings.c:1210 +msgid "yes" +msgstr "예" + +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:506 ../cli/src/settings.c:544 +#: ../cli/src/settings.c:643 ../cli/src/settings.c:912 +#: ../cli/src/settings.c:913 ../cli/src/settings.c:915 +#: ../cli/src/settings.c:917 ../cli/src/settings.c:1042 +#: ../cli/src/settings.c:1043 ../cli/src/settings.c:1044 +#: ../cli/src/settings.c:1123 ../cli/src/settings.c:1124 +#: ../cli/src/settings.c:1125 ../cli/src/settings.c:1126 +#: ../cli/src/settings.c:1127 ../cli/src/settings.c:1128 +#: ../cli/src/settings.c:1129 ../cli/src/settings.c:1130 +#: ../cli/src/settings.c:1131 ../cli/src/settings.c:1132 +#: ../cli/src/settings.c:1133 ../cli/src/settings.c:1134 +#: ../cli/src/settings.c:1135 ../cli/src/settings.c:1210 +msgid "no" +msgstr "아니오" + +#: ../cli/src/connections.c:457 ../cli/src/connections.c:500 +msgid "System connections" +msgstr "시스템 연결" + +#: ../cli/src/connections.c:462 ../cli/src/connections.c:513 +msgid "User connections" +msgstr "사용자의 연결" + +#: ../cli/src/connections.c:474 ../cli/src/connections.c:1334 +#: ../cli/src/connections.c:1350 ../cli/src/connections.c:1359 +#: ../cli/src/connections.c:1370 ../cli/src/connections.c:1452 +#: ../cli/src/devices.c:864 ../cli/src/devices.c:874 ../cli/src/devices.c:973 +#: ../cli/src/devices.c:980 +#, c-format +msgid "Error: %s argument is missing." +msgstr "오류: %s 인자가 없습니다." + +#: ../cli/src/connections.c:487 +#, c-format +msgid "Error: %s - no such connection." +msgstr "오류: %s - 그런 연결이 없습니다." + +#: ../cli/src/connections.c:519 ../cli/src/connections.c:1383 +#: ../cli/src/connections.c:1470 ../cli/src/devices.c:687 +#: ../cli/src/devices.c:754 ../cli/src/devices.c:888 ../cli/src/devices.c:986 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "알려져있지 않은 매개변수입니다: %s\n" + +#: ../cli/src/connections.c:528 +#, c-format +msgid "Error: no valid parameter specified." +msgstr "오류: 옳바른 매개변수가 지정되지 않았습니다." + +#: ../cli/src/connections.c:543 ../cli/src/connections.c:1572 +#: ../cli/src/devices.c:1192 ../cli/src/network-manager.c:274 +#, c-format +msgid "Error: %s." +msgstr "오류: %s." + +#: ../cli/src/connections.c:649 +#, c-format +msgid "Error: 'con status': %s" +msgstr "오류: 'con status': %s" + +#: ../cli/src/connections.c:651 +#, c-format +msgid "Error: 'con status': %s; allowed fields: %s" +msgstr "오류: 'con status': %s; 허용된 필드: %s" + +#: ../cli/src/connections.c:658 +msgid "Active connections" +msgstr "활성화된 연결" + +#: ../cli/src/connections.c:1026 +#, c-format +msgid "no active connection on device '%s'" +msgstr "장치 '%s'에 활성화된 연결이 없습니다" + +#: ../cli/src/connections.c:1034 +#, c-format +msgid "no active connection or device" +msgstr "활성화된 연결이나 장치가 없습니다" + +#: ../cli/src/connections.c:1084 +#, c-format +msgid "device '%s' not compatible with connection '%s'" +msgstr "장치 '%s'는 연걸 '%s'와 호환되지 않습니다" + +#: ../cli/src/connections.c:1086 +#, c-format +msgid "no device found for connection '%s'" +msgstr "연결 '%s'에 대한 장치를 찾을 수 없습니다" + +#: ../cli/src/connections.c:1097 +msgid "activating" +msgstr "활성화중" + +#: ../cli/src/connections.c:1099 +msgid "activated" +msgstr "활성화됨" + +#: ../cli/src/connections.c:1102 ../cli/src/connections.c:1125 +#: ../cli/src/connections.c:1158 ../cli/src/devices.c:224 +#: ../cli/src/devices.c:514 ../cli/src/network-manager.c:92 +#: ../cli/src/network-manager.c:145 ../cli/src/settings.c:469 +msgid "unknown" +msgstr "알 수 없음" + +#: ../cli/src/connections.c:1111 +msgid "VPN connecting (prepare)" +msgstr "VPN 연결 중 (준비)" + +#: ../cli/src/connections.c:1113 +msgid "VPN connecting (need authentication)" +msgstr "VPN 연결 중 (인증 필요)" + +#: ../cli/src/connections.c:1115 +msgid "VPN connecting" +msgstr "VPN 연결 중" + +#: ../cli/src/connections.c:1117 +msgid "VPN connecting (getting IP configuration)" +msgstr "VPN 연결 중 (IP 설정 얻는 중)" + +#: ../cli/src/connections.c:1119 +msgid "VPN connected" +msgstr "VPN 연결 됨" + +#: ../cli/src/connections.c:1121 +msgid "VPN connection failed" +msgstr "VPN 연결 실패" + +#: ../cli/src/connections.c:1123 +msgid "VPN disconnected" +msgstr "VPN 연결 끊겼음" + +#: ../cli/src/connections.c:1134 +msgid "unknown reason" +msgstr "알 수 없는 이유" + +#: ../cli/src/connections.c:1136 +msgid "none" +msgstr "없음" + +#: ../cli/src/connections.c:1138 +msgid "the user was disconnected" +msgstr "사용자 연결이 끊어졌습니다" + +#: ../cli/src/connections.c:1140 +msgid "the base network connection was interrupted" +msgstr "기반 네트워크 연결이 중지되었습니다" + +#: ../cli/src/connections.c:1142 +msgid "the VPN service stopped unexpectedly" +msgstr "VPN 서비스가 예기치 못하게 중단되었습니다" + +#: ../cli/src/connections.c:1144 +msgid "the VPN service returned invalid configuration" +msgstr "VPN 서비스가 잘못된 설정을 반환했습니다" + +#: ../cli/src/connections.c:1146 +msgid "the connection attempt timed out" +msgstr "연결 시도가 시간을 초과했습니다" + +#: ../cli/src/connections.c:1148 +msgid "the VPN service did not start in time" +msgstr "VPN 서비스가 제 시간에 시작되지 않았습니다" + +#: ../cli/src/connections.c:1150 +msgid "the VPN service failed to start" +msgstr "VPN 서비스를 시작하는 데 실패했습니다" + +#: ../cli/src/connections.c:1152 +msgid "no valid VPN secrets" +msgstr "옳바른 VPN 비밀 정보가 없습니다" + +#: ../cli/src/connections.c:1154 +msgid "invalid VPN secrets" +msgstr "잘못된 VPN 비밀정보" + +#: ../cli/src/connections.c:1156 +msgid "the connection was removed" +msgstr "연결이 제거되었습니다" + +#: ../cli/src/connections.c:1170 +#, c-format +msgid "state: %s\n" +msgstr "상태: %s\n" + +#: ../cli/src/connections.c:1173 ../cli/src/connections.c:1199 +#, c-format +msgid "Connection activated\n" +msgstr "연결이 활성화되었습니다\n" + +#: ../cli/src/connections.c:1176 +#, c-format +msgid "Error: Connection activation failed." +msgstr "오류: 연결 활성화가 실패했습니다." + +#: ../cli/src/connections.c:1195 +#, c-format +msgid "state: %s (%d)\n" +msgstr "상태: %s (%d)\n" + +#: ../cli/src/connections.c:1205 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "오류: 연결 활성화가 실패했습니다: %s." + +#: ../cli/src/connections.c:1222 ../cli/src/devices.c:811 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "오류: 제한시간 %d초를 초과했습니다." + +#: ../cli/src/connections.c:1265 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "오류: 연결 활성화가 실패했습니다: %s" + +#: ../cli/src/connections.c:1279 +#, c-format +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "오류: '%s'에 대한 활성화된 연결을 얻는 데 실패했습니다." + +#: ../cli/src/connections.c:1288 +#, c-format +msgid "Active connection state: %s\n" +msgstr "활성화된 연결 상태: %s\n" + +#: ../cli/src/connections.c:1289 +#, c-format +msgid "Active connection path: %s\n" +msgstr "활성화된 연결 경로: %s\n" + +#: ../cli/src/connections.c:1343 ../cli/src/connections.c:1461 +#, c-format +msgid "Error: Unknown connection: %s." +msgstr "오류: 알려지지 않은 연결: %s." + +#: ../cli/src/connections.c:1378 ../cli/src/devices.c:882 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "오류: 시간 제한 값 '%s'가 올바르지 않습니다." + +#: ../cli/src/connections.c:1391 ../cli/src/connections.c:1478 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "오류: id나 uuid를 지정해야만 합니다." + +#: ../cli/src/connections.c:1411 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "오류: 적절한 장치를 찾을 수 없습니다: %s." + +#: ../cli/src/connections.c:1413 +#, c-format +msgid "Error: No suitable device found." +msgstr "오류: 적절한 장치를 찾을 수 없습니다." + +#: ../cli/src/connections.c:1505 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "경고: 연결이 활성화되어 있지 않습니다\n" + +#: ../cli/src/connections.c:1561 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "오류: 'con' 명령 '%s'는 바른 명령이 아닙니다." + +#: ../cli/src/connections.c:1597 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "오류: D-버스에 연결할 수 없습니다." + +#: ../cli/src/connections.c:1604 +#, c-format +msgid "Error: Could not get system settings." +msgstr "오류: 시스템 설정을 얻을 수 없습니다." + +#: ../cli/src/connections.c:1612 +#, c-format +msgid "Error: Could not get user settings." +msgstr "오류: 사용자 설정을 얻을 수 없습니다." + +#: ../cli/src/connections.c:1622 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "오류: 연결을 얻을 수 없습니다: 설정 서비스가 실행중이지 않습니다." + +#. 0 +#. 9 +#: ../cli/src/devices.c:60 ../cli/src/devices.c:86 ../cli/src/devices.c:162 +msgid "DEVICE" +msgstr "장치" + +#. 1 +#. 4 +#. 0 +#: ../cli/src/devices.c:62 ../cli/src/devices.c:90 +#: ../cli/src/network-manager.c:36 +msgid "STATE" +msgstr "상태" + +#: ../cli/src/devices.c:71 +msgid "GENERAL" +msgstr "일반" + +#. 0 +#: ../cli/src/devices.c:72 +msgid "CAPABILITIES" +msgstr "기능" + +#. 1 +#: ../cli/src/devices.c:73 +msgid "WIFI-PROPERTIES" +msgstr "WIFI-특성" + +#. 2 +#: ../cli/src/devices.c:74 +msgid "AP" +msgstr "AP" + +#. 3 +#: ../cli/src/devices.c:75 +msgid "WIRED-PROPERTIES" +msgstr "유선 상태" + +#. 4 +#: ../cli/src/devices.c:76 +msgid "IP4-SETTINGS" +msgstr "IP4 설정" + +#. 5 +#: ../cli/src/devices.c:77 +msgid "IP4-DNS" +msgstr "IP4 DNS" + +#. 2 +#: ../cli/src/devices.c:88 +msgid "DRIVER" +msgstr "드라이버" + +#. 3 +#: ../cli/src/devices.c:89 +msgid "HWADDR" +msgstr "하드웨어주소" + +#. 0 +#: ../cli/src/devices.c:99 +msgid "CARRIER-DETECT" +msgstr "캐리어 감지" + +#. 1 +#: ../cli/src/devices.c:100 +msgid "SPEED" +msgstr "속도" + +#. 0 +#: ../cli/src/devices.c:109 +msgid "CARRIER" +msgstr "캐리어" + +#. 0 +#: ../cli/src/devices.c:119 +msgid "WEP" +msgstr "WEP" + +#. 1 +#: ../cli/src/devices.c:120 +msgid "WPA" +msgstr "WPA" + +#. 2 +#: ../cli/src/devices.c:121 +msgid "WPA2" +msgstr "WPA2" + +#. 3 +#: ../cli/src/devices.c:122 +msgid "TKIP" +msgstr "TKIP" + +#. 4 +#: ../cli/src/devices.c:123 +msgid "CCMP" +msgstr "CCMP" + +#. 0 +#: ../cli/src/devices.c:132 +msgid "ADDRESS" +msgstr "주소" + +#. 1 +#: ../cli/src/devices.c:133 +msgid "PREFIX" +msgstr "접두사" + +#. 2 +#: ../cli/src/devices.c:134 +msgid "GATEWAY" +msgstr "게이트웨이" + +#. 0 +#: ../cli/src/devices.c:143 +msgid "DNS" +msgstr "DNS" + +#. 0 +#: ../cli/src/devices.c:153 +msgid "SSID" +msgstr "SSID" + +#. 1 +#: ../cli/src/devices.c:154 +msgid "BSSID" +msgstr "BSSID" + +#. 2 +#: ../cli/src/devices.c:155 +msgid "MODE" +msgstr "모드" + +#. 3 +#: ../cli/src/devices.c:156 +msgid "FREQ" +msgstr "주파수" + +#. 4 +#: ../cli/src/devices.c:157 +msgid "RATE" +msgstr "전송률" + +#. 5 +#: ../cli/src/devices.c:158 +msgid "SIGNAL" +msgstr "신호" + +#. 6 +#: ../cli/src/devices.c:159 +msgid "SECURITY" +msgstr "보안" + +#. 7 +#: ../cli/src/devices.c:160 +msgid "WPA-FLAGS" +msgstr "WPA 플래그" + +#. 8 +#: ../cli/src/devices.c:161 +msgid "RSN-FLAGS" +msgstr "RSN 플래그" + +#. 10 +#: ../cli/src/devices.c:163 +msgid "ACTIVE" +msgstr "활성" + +#: ../cli/src/devices.c:186 +#, c-format +msgid "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +"\n" +msgstr "" +"사용법: nmcli dev { 명령어 | help }\n" +"\n" +" 명령어 := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface <인터페이스>]\n" +" disconnect iface <인터페이스> [--nowait] [--timeout <타임아웃시간>]\n" +" wifi [list [iface <인터페이스>] | hwaddr <하드웨어주소>]\n" +"\n" + +#: ../cli/src/devices.c:206 +msgid "unmanaged" +msgstr "관리되지 않음" + +#: ../cli/src/devices.c:208 +msgid "unavailable" +msgstr "사용할 수 없음" + +#: ../cli/src/devices.c:210 ../cli/src/network-manager.c:89 +msgid "disconnected" +msgstr "연결 끊겼음" + +#: ../cli/src/devices.c:212 +msgid "connecting (prepare)" +msgstr "연결 중 (준비)" + +#: ../cli/src/devices.c:214 +msgid "connecting (configuring)" +msgstr "연결 중 (설정중)" + +#: ../cli/src/devices.c:216 +msgid "connecting (need authentication)" +msgstr "연결 중 (인증 필요)" + +#: ../cli/src/devices.c:218 +msgid "connecting (getting IP configuration)" +msgstr "연결 중 (IP 설정 가져오는 중)" + +#: ../cli/src/devices.c:220 ../cli/src/network-manager.c:87 +msgid "connected" +msgstr "연결됨" + +#: ../cli/src/devices.c:222 +msgid "connection failed" +msgstr "연결 실패함" + +#: ../cli/src/devices.c:245 ../cli/src/devices.c:380 +msgid "Unknown" +msgstr "알 수 없음" + +#: ../cli/src/devices.c:277 +msgid "(none)" +msgstr "(없음)" + +#: ../cli/src/devices.c:302 +#, c-format +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s: IP4 주소 0x%X를 변환하는 중 오류가 있습니다" + +#: ../cli/src/devices.c:349 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" + +#: ../cli/src/devices.c:350 +#, c-format +msgid "%u MB/s" +msgstr "%u MB/s" + +#: ../cli/src/devices.c:359 +msgid "Encrypted: " +msgstr "암호화됨: " + +#: ../cli/src/devices.c:364 +msgid "WEP " +msgstr "WEP " + +#: ../cli/src/devices.c:366 +msgid "WPA " +msgstr "WPA " + +#: ../cli/src/devices.c:368 +msgid "WPA2 " +msgstr "WPA2 " + +#: ../cli/src/devices.c:371 +msgid "Enterprise " +msgstr "기업용 WPA " + +#: ../cli/src/devices.c:380 +msgid "Ad-Hoc" +msgstr "애드혹" + +#: ../cli/src/devices.c:380 +msgid "Infrastructure" +msgstr "인프라스트럭쳐" + +#: ../cli/src/devices.c:442 +#, c-format +msgid "Error: 'dev list': %s" +msgstr "오류: 'dev list': %s" + +#: ../cli/src/devices.c:444 +#, c-format +msgid "Error: 'dev list': %s; allowed fields: %s" +msgstr "오류: 'dev list': %s; 허용된 필드: %s" + +#: ../cli/src/devices.c:453 +msgid "Device details" +msgstr "장치 상세정보" + +#: ../cli/src/devices.c:483 ../cli/src/devices.c:827 +msgid "(unknown)" +msgstr "(알 수 없음)" + +#: ../cli/src/devices.c:484 +msgid "unknown)" +msgstr "알 수 없음)" + +#: ../cli/src/devices.c:510 +#, c-format +msgid "%u Mb/s" +msgstr "%u Mb/s" + +#. Print header +#. "WIRED-PROPERTIES" +#: ../cli/src/devices.c:583 +msgid "on" +msgstr "켜짐" + +#: ../cli/src/devices.c:583 +msgid "off" +msgstr "꺼짐" + +#: ../cli/src/devices.c:710 +#, c-format +msgid "Error: 'dev status': %s" +msgstr "오류: 'dev status': %s" + +#: ../cli/src/devices.c:712 +#, c-format +msgid "Error: 'dev status': %s; allowed fields: %s" +msgstr "오류: 'dev status': %s; 허용되는 필드: %s" + +#: ../cli/src/devices.c:719 +msgid "Status of devices" +msgstr "장치 상태" + +#: ../cli/src/devices.c:747 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "오류: '%s' 인자가 없습니다." + +#: ../cli/src/devices.c:776 ../cli/src/devices.c:915 ../cli/src/devices.c:1035 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "오류: 장치 '%s'를 찾을 수 없습니다." + +#: ../cli/src/devices.c:799 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "성공: 장치 '%s'가 성공적으로 연결 해제되었습니다." + +#: ../cli/src/devices.c:824 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "오류: 장치 '%s' (%s)의 연결 해제가 실패했습니다: %s" + +#: ../cli/src/devices.c:832 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "장치 상태: %d (%s)\n" + +#: ../cli/src/devices.c:896 +#, c-format +msgid "Error: iface has to be specified." +msgstr "오류: iface를 지정해야만 합니다." + +#: ../cli/src/devices.c:1011 +#, c-format +msgid "Error: 'dev wifi': %s" +msgstr "오류 'dev wifi': '%s'" + +#: ../cli/src/devices.c:1013 +#, c-format +msgid "Error: 'dev wifi': %s; allowed fields: %s" +msgstr "오류: 'dev wifi': %s; 허용되는 필드: %s" + +#: ../cli/src/devices.c:1020 +msgid "WiFi scan list" +msgstr "검색된 WiFi 목록" + +#: ../cli/src/devices.c:1055 ../cli/src/devices.c:1109 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "오류: 하드웨어주소가 '%s'인 억세스 포인트를 찾을 수 없습니다." + +#: ../cli/src/devices.c:1072 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "오류: 장치 '%s'는 WiFi 장치가 아닙니다." + +#: ../cli/src/devices.c:1136 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "오류 'dev wifi' 명령어 '%s'가 바르지 않습니다." + +#: ../cli/src/devices.c:1183 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "오류: 'dev' 명령어 '%s'가 바르지 않습니다." + +#: ../cli/src/network-manager.c:35 +msgid "RUNNING" +msgstr "실행중" + +#. 1 +#: ../cli/src/network-manager.c:37 +msgid "WIFI-HARDWARE" +msgstr "WIFI 하드웨어" + +#. 2 +#: ../cli/src/network-manager.c:38 +msgid "WIFI" +msgstr "WIFI" + +#. 3 +#: ../cli/src/network-manager.c:39 +msgid "WWAN-HARDWARE" +msgstr "WWAN 하드웨어" + +#. 4 +#: ../cli/src/network-manager.c:40 +msgid "WWAN" +msgstr "WWAN" + +#: ../cli/src/network-manager.c:62 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" +msgstr "" +"사용법: nmcli nm { 명령어 | help }\n" +"\n" +" 명령어 := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + +#: ../cli/src/network-manager.c:83 +msgid "asleep" +msgstr "잠듦" + +#: ../cli/src/network-manager.c:85 +msgid "connecting" +msgstr "연결" + +#: ../cli/src/network-manager.c:125 +#, c-format +msgid "Error: 'nm status': %s" +msgstr "오류: 'nm status': %s" + +#: ../cli/src/network-manager.c:127 +#, c-format +msgid "Error: 'nm status': %s; allowed fields: %s" +msgstr "오류: 'nm status': %s; 허용되는 필드: %s" + +#: ../cli/src/network-manager.c:134 +msgid "NetworkManager status" +msgstr "네트워크 관리자 상태" + +#. Print header +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "enabled" +msgstr "사용" + +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "disabled" +msgstr "미사용" + +#: ../cli/src/network-manager.c:148 +msgid "running" +msgstr "실행 중" + +#: ../cli/src/network-manager.c:148 +msgid "not running" +msgstr "실행 중이 아님" + +#: ../cli/src/network-manager.c:201 ../cli/src/network-manager.c:233 +#, c-format +msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s" +msgstr "오류: '--fields' 값 '%s'은 올바르지 않습니다; 허용되는 필드: %s" + +#: ../cli/src/network-manager.c:209 +msgid "WiFi enabled" +msgstr "WiFi 사용중" + +#: ../cli/src/network-manager.c:220 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "오류: 잘못된 'wifi' 매개변수: '%s'." + +#: ../cli/src/network-manager.c:241 +msgid "WWAN enabled" +msgstr "WWAN 사용중" + +#: ../cli/src/network-manager.c:252 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "오류: 잘못된 'wwan' 매개변수: '%s'." + +#: ../cli/src/network-manager.c:263 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "오류: 'mn' 명령어 '%s'가 바르지 않습니다." + +#: ../cli/src/nmcli.c:69 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -m[ode] tabular|multiline output mode\n" +" -f[ields] |all|common specify fields to output\n" +" -e[scape] yes|no escape columns separators in " +"values\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"사용법: %s [옵션] 대상 { 명령어 | help }\n" +"\n" +"옵션\n" +" -t[erse] 간략한 출력\n" +" -p[retty] 보기좋은 출력\n" +" -m[ode] tabular|multiline 출력 모드 " +" -f[ields] <필드1,필드2,...>|all|common 출력 필드 지정\n" +" -e[scape] yes|no 값에서 컬럼 구분자를 이스케이프\n" +" -v[ersion] 프로그램 버전 정보 보여주기\n" +" -h[elp] 이 도움말 보여주기\n" +"\n" +"대상\n" +" nm 네트워크 관리자 상태\n" +" con 네트워크 관리자 연결\n" +" dev 네트워크 관리자가 관리하는 장치\n" +"\n" + +#: ../cli/src/nmcli.c:113 +#, c-format +msgid "Error: Object '%s' is unknown, try 'nmcli help'." +msgstr "대상 '%s'가 알려져 있지 않습니다. 'nmcli help'를 해 보십시오." + +#: ../cli/src/nmcli.c:143 +#, c-format +msgid "Error: Option '--terse' is specified the second time." +msgstr "오류: 옵션 '--terse'가 두번째로 설정되었습니다." + +#: ../cli/src/nmcli.c:148 +#, c-format +msgid "Error: Option '--terse' is mutually exclusive with '--pretty'." +msgstr "오류: 옵션 '--terse'를 '--pretty'와 함께 사용할 수 없습니다." + +#: ../cli/src/nmcli.c:156 +#, c-format +msgid "Error: Option '--pretty' is specified the second time." +msgstr "오류: 옵션 '--pretty'가 두번째로 설정되었습니다." + +#: ../cli/src/nmcli.c:161 +#, c-format +msgid "Error: Option '--pretty' is mutually exclusive with '--terse'." +msgstr "오류: 옵션 '--pretty'를 '--terse'와 함께 사용할 수 없습니다." + +#: ../cli/src/nmcli.c:171 ../cli/src/nmcli.c:187 +#, c-format +msgid "Error: missing argument for '%s' option." +msgstr "오류: '%s' 옵션에 인자가 없습니다." + +#: ../cli/src/nmcli.c:180 ../cli/src/nmcli.c:196 +#, c-format +msgid "Error: '%s' is not valid argument for '%s' option." +msgstr "오류: '%s'는 올바른 인자가 아닙니다('%s' 옵션에 사용됨)." + +#: ../cli/src/nmcli.c:203 +#, c-format +msgid "Error: fields for '%s' options are missing." +msgstr "오류: '%s'옵션에 대해 필드가 없습니다." + +#: ../cli/src/nmcli.c:209 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "nmcli 도구, 버전 %s\n" + +#: ../cli/src/nmcli.c:215 +#, c-format +msgid "Error: Option '%s' is unknown, try 'nmcli -help'." +msgstr "오류: 옵션 '%s'는 알려져 있지 않습니다. 'nmcli -help'를 해 보십시오." + +#: ../cli/src/nmcli.c:234 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "시그널 %d를 받았습니다. 종료합니다..." + +#: ../cli/src/nmcli.c:259 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "오류: NetworkManager에 연결할 수 없습니다." + +#: ../cli/src/nmcli.c:275 +msgid "Success" +msgstr "성공" + +#: ../cli/src/settings.c:407 +#, c-format +msgid "%d (hex-ascii-key)" +msgstr "%d (16진 아시키 열쇠글)" + +#: ../cli/src/settings.c:409 +#, c-format +msgid "%d (104/128-bit passphrase)" +msgstr "%d (104/128-비트 열쇠글)" + +#: ../cli/src/settings.c:412 +#, c-format +msgid "%d (unknown)" +msgstr "%d (알 수 없음)" + +#: ../cli/src/settings.c:438 +msgid "0 (unknown)" +msgstr "0 (알 수 없음)" + +#: ../cli/src/settings.c:444 +msgid "any, " +msgstr "아무, " + +#: ../cli/src/settings.c:446 +msgid "900 MHz, " +msgstr "900 MHz, " + +#: ../cli/src/settings.c:448 +msgid "1800 MHz, " +msgstr "1800 MHz, " + +#: ../cli/src/settings.c:450 +msgid "1900 MHz, " +msgstr "1900 MHz, " + +#: ../cli/src/settings.c:452 +msgid "850 MHz, " +msgstr "850 MHz, " + +#: ../cli/src/settings.c:454 +msgid "WCDMA 3GPP UMTS 2100 MHz, " +msgstr "WCDMA 3GPP UMTS 2100 MHz, " + +#: ../cli/src/settings.c:456 +msgid "WCDMA 3GPP UMTS 1800 MHz, " +msgstr "WCDMA 3GPP UMTS 1800 MHz, " + +#: ../cli/src/settings.c:458 +msgid "WCDMA 3GPP UMTS 1700/2100 MHz, " +msgstr "WCDMA 3GPP UMTS 1700/2100 MHz, " + +#: ../cli/src/settings.c:460 +msgid "WCDMA 3GPP UMTS 800 MHz, " +msgstr "WCDMA 3GPP UMTS 800 MHz, " + +#: ../cli/src/settings.c:462 +msgid "WCDMA 3GPP UMTS 850 MHz, " +msgstr "WCDMA 3GPP UMTS 850 MHz, " + +#: ../cli/src/settings.c:464 +msgid "WCDMA 3GPP UMTS 900 MHz, " +msgstr "WCDMA 3GPP UMTS 900 MHz, " + +#: ../cli/src/settings.c:466 +msgid "WCDMA 3GPP UMTS 1700 MHz, " +msgstr "WCDMA 3GPP UMTS 1700 MHz, " + +#: ../cli/src/settings.c:546 ../cli/src/settings.c:708 +msgid "auto" +msgstr "자동" + +#: ../cli/src/settings.c:704 ../cli/src/settings.c:707 ../cli/src/utils.c:172 +msgid "not set" +msgstr "설정 안됨" + +#: ../cli/src/utils.c:124 +#, c-format +msgid "field '%s' has to be alone" +msgstr "필드 '%s'는 혼자만 있어야만 합니다" + +#: ../cli/src/utils.c:127 +#, c-format +msgid "invalid field '%s'" +msgstr "잘못된 필드 '%s'" + +#: ../cli/src/utils.c:146 +#, c-format +msgid "Option '--terse' requires specifying '--fields'" +msgstr "옵션 '--terse'는 '--fields' 설정을 요구합니다" + +#: ../cli/src/utils.c:150 +#, c-format +msgid "Option '--terse' requires specific '--fields' option values , not '%s'" +msgstr "옵션 '--terse'는 '%s'가 아닌 구체적인 '--fields' 값을 요구합니다" + +#: ../libnm-util/crypto.c:120 +#, c-format +msgid "PEM key file had no end tag '%s'." +msgstr "PEM 키 파일에 끝 태그 '%s'가 없습니다." + +#: ../libnm-util/crypto.c:130 +#, c-format +msgid "Doesn't look like a PEM private key file." +msgstr "PEM 비밀 키 파일처럼 보이지 않습니다." + +#: ../libnm-util/crypto.c:138 +#, c-format +msgid "Not enough memory to store PEM file data." +msgstr "PEM 파일 정보를 저장할 메모리가 부족합니다." + +#: ../libnm-util/crypto.c:154 +#, c-format +msgid "Malformed PEM file: Proc-Type was not first tag." +msgstr "잘못된 형태의 PEM 파일: Proc-Type이 첫번째 태그가 아닙니다." + +#: ../libnm-util/crypto.c:162 +#, c-format +msgid "Malformed PEM file: unknown Proc-Type tag '%s'." +msgstr "잘못된 형태의 PEM 파일: 알려져 있지 않은 Proc-Type 태그 '%s'." + +#: ../libnm-util/crypto.c:172 +#, c-format +msgid "Malformed PEM file: DEK-Info was not the second tag." +msgstr "잘못된 형태의 PEM 파일: DEK-Info가 두번째 태그가 아님." + +#: ../libnm-util/crypto.c:183 +#, c-format +msgid "Malformed PEM file: no IV found in DEK-Info tag." +msgstr "잘못된 형태의 PEM 파일: IV를 DEK-Info 태그에서 찾을 수 없음." + +#: ../libnm-util/crypto.c:190 +#, c-format +msgid "Malformed PEM file: invalid format of IV in DEK-Info tag." +msgstr "잘못된 형태의 PEM 파일: DEK-Info 태그안에 잘못된 형태의 IV가 있음." + +#: ../libnm-util/crypto.c:203 +#, c-format +msgid "Malformed PEM file: unknown private key cipher '%s'." +msgstr "잘못된 형태의 PEM 파일: 알려져 있지 않은 비밀 키 암호화 방법 '%s'." + +#: ../libnm-util/crypto.c:222 +#, c-format +msgid "Could not decode private key." +msgstr "비밀 키를 해독할 수 없습니다." + +#: ../libnm-util/crypto.c:267 +#, c-format +msgid "PEM certificate '%s' had no end tag '%s'." +msgstr "PEM 인증서 '%s'에 끝 태그 '%s'가 없습니다." + +#: ../libnm-util/crypto.c:277 +#, c-format +msgid "Failed to decode certificate." +msgstr "인증서 해독에 실패했습니다." + +#: ../libnm-util/crypto.c:286 +#, c-format +msgid "Not enough memory to store certificate data." +msgstr "인증서 정보를 저장할 메모리가 부족합니다." + +#: ../libnm-util/crypto.c:294 +#, c-format +msgid "Not enough memory to store file data." +msgstr "파일 정보를 저장할 메모리가 부족합니다." + +#: ../libnm-util/crypto.c:324 +#, c-format +msgid "IV must be an even number of bytes in length." +msgstr "IV의 길이는 짝수여야만 합니다." + +#: ../libnm-util/crypto.c:333 +#, c-format +msgid "Not enough memory to store the IV." +msgstr "IV를 저장할 메모리가 부족합니다." + +#: ../libnm-util/crypto.c:344 +#, c-format +msgid "IV contains non-hexadecimal digits." +msgstr "IV에 16진수 숫자가 아닌 문자가 있습니다." + +#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:336 +#, c-format +msgid "Private key cipher '%s' was unknown." +msgstr "비밀 키 암호화 방식 '%s'가 알려져 있지 않습니다." + +#: ../libnm-util/crypto.c:391 +#, c-format +msgid "Not enough memory to decrypt private key." +msgstr "비밀 키를 해독할 메모리가 부족합니다." + +#: ../libnm-util/crypto.c:511 +#, c-format +msgid "Unable to determine private key type." +msgstr "비밀 키 유형을 결정할 수 없습니다." + +#: ../libnm-util/crypto.c:530 +#, c-format +msgid "Not enough memory to store decrypted private key." +msgstr "해독된 비밀 키를 저장할 메모리가 부족합니다." + +#: ../libnm-util/crypto_gnutls.c:49 +msgid "Failed to initialize the crypto engine." +msgstr "암호화 엔진을 초기화하는 데 실패했습니다." + +#: ../libnm-util/crypto_gnutls.c:93 +#, c-format +msgid "Failed to initialize the MD5 engine: %s / %s." +msgstr "MD5 엔진을 초기화하는 데 실패했습니다: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "잘못된 IV 길이 (최소한 %zd바이트 이상이어야 함)." + +#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188 +#, c-format +msgid "Not enough memory for decrypted key buffer." +msgstr "해독된 키 버퍼를 저장할 메모리가 부족합니다." + +#: ../libnm-util/crypto_gnutls.c:173 +#, c-format +msgid "Failed to initialize the decryption cipher context: %s / %s." +msgstr "암호 해독 문맥을 초기화하는 데 실패했습니다: %s / %s" + +#: ../libnm-util/crypto_gnutls.c:182 +#, c-format +msgid "Failed to set symmetric key for decryption: %s / %s." +msgstr "해독을 위한 대칭 키를 설정하는 데 실패했습니다: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:191 +#, c-format +msgid "Failed to set IV for decryption: %s / %s." +msgstr "해독을 위해 IV를 설정하는 데 실패했습니다: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:200 +#, c-format +msgid "Failed to decrypt the private key: %s / %s." +msgstr "비밀 키를 해독하는 데 실패했습니다: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 +#, c-format +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "비밀 키를 해독하는 데 실패했습니다: 예기치 못한 패딩 길이." + +#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 +#, c-format +msgid "Failed to decrypt the private key." +msgstr "비밀 키를 해독하는 데 실패했습니다." + +#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "암호화를 위한 메모리를 할당할 수 없습니다." + +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "암호화 문맥을 초기화하는 데 실패했습니다: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "암호화를 위한 대칭키를 설정하는 데 실패했습니다: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +msgid "Failed to set IV for encryption: %s / %s." +msgstr "암호화를 위한 IV를 설정하는 데 실패했습니다: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +msgid "Failed to encrypt the data: %s / %s." +msgstr "데이터를 암호화하는 데 실패했습니다: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:362 +#, c-format +msgid "Error initializing certificate data: %s" +msgstr "인증서 정보를 초기화하는 중 오류가 발생했습니다: %s" + +#: ../libnm-util/crypto_gnutls.c:384 +#, c-format +msgid "Couldn't decode certificate: %s" +msgstr "인증서를 해독할 수 없습니다: %s" + +#: ../libnm-util/crypto_gnutls.c:408 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %s" +msgstr "PKCS#12 복호기를 초기화할 수 없습니다: %s" + +#: ../libnm-util/crypto_gnutls.c:421 +#, c-format +msgid "Couldn't decode PKCS#12 file: %s" +msgstr "PKCS#12 파일을 해독할 수 없습니다: %s" + +#: ../libnm-util/crypto_gnutls.c:433 +#, c-format +msgid "Couldn't verify PKCS#12 file: %s" +msgstr "PKCS#12 파일을 검증할 수 없습니다: %s" + +#: ../libnm-util/crypto_nss.c:56 +#, c-format +msgid "Failed to initialize the crypto engine: %d." +msgstr "암호화 엔진을 초기화하는 데 실패했습니다: %d." + +#: ../libnm-util/crypto_nss.c:111 +#, c-format +msgid "Failed to initialize the MD5 context: %d." +msgstr "MD5 문맥을 초기화하는 데 실패했습니다: %d." + +#: ../libnm-util/crypto_nss.c:179 +#, c-format +msgid "Invalid IV length (must be at least %d)." +msgstr "잘못된 IV 길이입니다(최소한 %d 이상이어야 함)." + +#: ../libnm-util/crypto_nss.c:196 +#, c-format +msgid "Failed to initialize the decryption cipher slot." +msgstr "해독용 암호 슬롯을 할당하는 데 실패했습니다." + +#: ../libnm-util/crypto_nss.c:206 +#, c-format +msgid "Failed to set symmetric key for decryption." +msgstr "해독을 위한 대칭키를 설정하는 데 실패했습니다." + +#: ../libnm-util/crypto_nss.c:216 +#, c-format +msgid "Failed to set IV for decryption." +msgstr "해독을 위한 IV를 설정하는 데 실패했습니다." + +#: ../libnm-util/crypto_nss.c:224 +#, c-format +msgid "Failed to initialize the decryption context." +msgstr "해독 문맥을 초기화하는 데 실패했습니다." + +#: ../libnm-util/crypto_nss.c:237 +#, c-format +msgid "Failed to decrypt the private key: %d." +msgstr "비밀 키를 해독하는 데 실패했습니다: %d." + +#: ../libnm-util/crypto_nss.c:245 +#, c-format +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "비밀 키를 해독하는 데 실패했습니다: 해독 데이터가 너무 큽니다." + +#: ../libnm-util/crypto_nss.c:256 +#, c-format +msgid "Failed to finalize decryption of the private key: %d." +msgstr "비밀 키의 해독을 마무리하는 데 실패했습니다: %d." + +#: ../libnm-util/crypto_nss.c:364 +#, c-format +msgid "Failed to initialize the encryption cipher slot." +msgstr "암호화 암호 슬롯을 초기화하는 데 실패했습니다." + +#: ../libnm-util/crypto_nss.c:372 +#, c-format +msgid "Failed to set symmetric key for encryption." +msgstr "암호화를 위한 대칭키를 설정하는 데 실패했습니다." + +#: ../libnm-util/crypto_nss.c:380 +#, c-format +msgid "Failed to set IV for encryption." +msgstr "암호화를 위한 IV를 설정하는 데 실패했습니다." + +#: ../libnm-util/crypto_nss.c:388 +#, c-format +msgid "Failed to initialize the encryption context." +msgstr "암호화 문맥을 초기화하는 데 실패했습니다." + +#: ../libnm-util/crypto_nss.c:396 +#, c-format +msgid "Failed to encrypt: %d." +msgstr "암호화에 실패했습니다: %d." + +#: ../libnm-util/crypto_nss.c:404 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "암호화 후 데이터 크기가 예상과 다릅니다." + +#: ../libnm-util/crypto_nss.c:447 +#, c-format +msgid "Couldn't decode certificate: %d" +msgstr "인증서를 복호화할 수 없습니다: %d." + +#: ../libnm-util/crypto_nss.c:482 +#, c-format +msgid "Couldn't convert password to UCS2: %d" +msgstr "암호를 UCS2로 변환할 수 없습니다: %d" + +#: ../libnm-util/crypto_nss.c:510 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %d" +msgstr "PKCS#12 복호기를 초기화할 수 없습니다: %d" + +#: ../libnm-util/crypto_nss.c:519 +#, c-format +msgid "Couldn't decode PKCS#12 file: %d" +msgstr "PKCS#12 파일을 복호화할 수 없습니다: %d" + +#: ../libnm-util/crypto_nss.c:528 +#, c-format +msgid "Couldn't verify PKCS#12 file: %d" +msgstr "PKCS#12 파일을 검증할 수 없습니다: %d" + +#: ../libnm-util/crypto_nss.c:557 +msgid "Could not generate random data." +msgstr "랜덤 데이터를 생성할 수 없습니다." + +#: ../libnm-util/nm-utils.c:1925 +#, c-format +msgid "Not enough memory to make encryption key." +msgstr "암호화 키를 생성할 메모리가 부족합니다." + +#: ../libnm-util/nm-utils.c:2035 +msgid "Could not allocate memory for PEM file creation." +msgstr "PEM 파일 생성을 위한 메모리를 할당할 수 없습니다." + +#: ../libnm-util/nm-utils.c:2047 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "IV를 PEM 파일에 쓰기 위한 메모리를 할당할 수 없습니다." + +#: ../libnm-util/nm-utils.c:2059 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "암호화된 키를 PEM 파일에 기록하기 위한 메모리를 할당할 수 없습니다." + +#: ../libnm-util/nm-utils.c:2078 +#, c-format +msgid "Could not allocate memory for PEM file data." +msgstr "PEM 파일 데이터를 위한 메모리를 할당할 수 없습니다." + +#: ../src/nm-netlink-monitor.c:100 ../src/nm-netlink-monitor.c:231 +#: ../src/nm-netlink-monitor.c:653 #, c-format msgid "error processing netlink message: %s" msgstr "넷링크 메시지를 처리하는 중 오류: %s" -#: ../src/nm-netlink-monitor.c:245 -#, c-format -msgid "unable to allocate netlink handle for monitoring link status: %s" -msgstr "유선 이더넷 장치를 감시하는 넷링크 소켓을 만들 수 없습니다: %s" - -#: ../src/nm-netlink-monitor.c:255 -#, c-format -msgid "unable to connect to netlink for monitoring link status: %s" -msgstr "유선 이더넷 장치를 감시하는 넷링크 소켓에 연결할 수 없습니다: %s" - -#: ../src/nm-netlink-monitor.c:263 -#, c-format -msgid "unable to join netlink group for monitoring link status: %s" -msgstr "유선 이더넷 장치를 감시하는 넷링크 그룹에 조인할 수 없습니다: %s" - -#: ../src/nm-netlink-monitor.c:271 -#, c-format -msgid "unable to allocate netlink link cache for monitoring link status: %s" -msgstr "유선 이더넷 장치를 감시하는 넷링크 링크 캐시를 만들 수 없습니다: %s" - -#: ../src/nm-netlink-monitor.c:471 +#: ../src/nm-netlink-monitor.c:214 msgid "error occurred while waiting for data on socket" msgstr "소켓에서 데이터를 기다리는 동안 오류가 발생했습니다" -#: ../src/NetworkManager.c:255 +#: ../src/nm-netlink-monitor.c:254 +#, c-format +msgid "unable to connect to netlink for monitoring link status: %s" +msgstr "회선 상태를 감시하는 넷링크에 연결할 수 없습니다: %s" + +#: ../src/nm-netlink-monitor.c:265 +#, c-format +msgid "unable to enable netlink handle credential passing: %s" +msgstr "넷링크 핸들을 통한 암호정보 전달을 사용 할 수 없습니다: %s" + +#: ../src/nm-netlink-monitor.c:291 ../src/nm-netlink-monitor.c:353 +#, c-format +msgid "unable to allocate netlink handle for monitoring link status: %s" +msgstr "회선 상태를 감시하는 넷링크 핸들을 할당 할 수 없습니다: %s" + +#: ../src/nm-netlink-monitor.c:376 +#, c-format +msgid "unable to allocate netlink link cache for monitoring link status: %s" +msgstr "회선 상태를 감시하는 넷링크 링크 캐시를 만들 수 없습니다: %s" + +#: ../src/nm-netlink-monitor.c:502 +#, c-format +msgid "unable to join netlink group: %s" +msgstr "넷링크 그룹에 합류할 수 없습니다: %s" + +#: ../src/nm-netlink-monitor.c:629 ../src/nm-netlink-monitor.c:642 +#, c-format +msgid "error updating link cache: %s" +msgstr "넷링크 캐시를 갱신하는 중 오류가 발생했습니다: %s" + +#: ../src/main.c:502 #, c-format msgid "Invalid option. Please use --help to see a list of valid options.\n" msgstr "잘못된 옵션. 올바른 옵션의 목록을 보려면 --help 옵션을 이용하십시오.\n" -msgid "Passphrase for wireless network %s" -msgstr "무선 네트워크 %s의 열쇠글" +#: ../src/main.c:562 +#, c-format +msgid "%s. Please use --help to see a list of valid options.\n" +msgstr "%s. 올바른 옵션의 목록을 보려면 --help 옵션을 이용하십시오.\n" -msgid "Connection to the wireless network '%s' failed." -msgstr "무선 네트워크 '%s'(으)로 연결 실패." - -msgid "Connection to the wired network failed." -msgstr "유선 네트워크 연결 실패." - -msgid "Error displaying connection information:" -msgstr "연결 정보 보이기 오류:" - -msgid "Could not find some required resources (the glade file)!" -msgstr "필요한 몇몇 파일(glade 파일)을 찾을 수 없습니다!" - -msgid "No active connections!" -msgstr "활성된 연결 없음!" - -msgid "%d Mb/s" -msgstr "%d Mb/s" - -msgid "Wired Ethernet (%s)" -msgstr "유선 이더넷 (%s)" - -msgid "Wireless Ethernet (%s)" -msgstr "무선 이더넷 (%s)" - -msgid "Unknown" -msgstr "알 수 없음" - -msgid "NetworkManager Applet" -msgstr "네트워크 관리자 애플릿" +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:325 +msgid "# Created by NetworkManager\n" +msgstr "# NetworkManager가 생성함\n" +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:341 +#, c-format msgid "" -"Copyright © 2004-2006 Red Hat, Inc.\n" -"Copyright © 2005-2006 Novell, Inc." -msgstr "" -"Copyright © 2004-2006 Red Hat, Inc.\n" -"Copyright © 2005-2006 Novell, Inc." - -msgid "" -"Notification area applet for managing your network devices and connections." -msgstr "네트워크 장치와 연결을 관리하는 애플릿." - -msgid "translator-credits" -msgstr "차영호 , 2006" - -msgid "" -"Copyright © 2004-2005 Red Hat, Inc.\n" -"Copyright © 2005-2006 Novell, Inc." -msgstr "" -"Copyright © 2004-2005 Red Hat, Inc.\n" -"Copyright © 2005-2006 Novell, Inc." - -msgid "VPN Login Failure" -msgstr "VPN 로그인 실패" - -msgid "Could not start the VPN connection '%s' due to a login failure." -msgstr "로그인을 실패해서 VPN 연결 '%s'(을)를 시작할 수 없습니다." - -msgid "VPN Start Failure" -msgstr "VPN 시작 실패" - -msgid "" -"Could not start the VPN connection '%s' due to a failure launching the VPN " -"program." -msgstr "VPN프로그램 실행을 실패해서 VPN 연결 '%s'(을)를 시작할 수 없습니다." - -msgid "VPN Connect Failure" -msgstr "VPN 연결 실패" - -msgid "Could not start the VPN connection '%s' due to a connection error." -msgstr "연결에 오류가 있어서 VPN 연결 '%s'(을)를 시작할 수 없습니다." - -msgid "VPN Configuration Error" -msgstr "VPN 설정 오류" - -msgid "The VPN connection '%s' was not correctly configured." -msgstr "VPN 연결 '%s'의 설정이 올바르지 않습니다." - -msgid "" -"Could not start the VPN connection '%s' because the VPN server did not " -"return an adequate network configuration." -msgstr "" -"VPN서버가 알맞는 네트워크 설정을 돌려주지 않아서 VPN 연결 '%s'(을)를 시작할 " -"수 없습니다." - -msgid "VPN Login Message" -msgstr "VPN 로그인 메세지" - -msgid "" -"The NetworkManager Applet could not find some required resources (the glade " -"file was not found)." -msgstr "" -"네트워크 관리자 애플릿이 필요한 몇몇 파일을 찾을 수 없습니다. (glade 파일을 " -"찾을 수 없습니다)." - -msgid "The network device \"%s (%s)\" does not support wireless scanning." -msgstr "네트워크 장치 \"%s (%s)\"(이)가 무선랜 검색을 지원하지 않습니다." - -msgid "The network device \"%s (%s)\" does not support link detection." -msgstr "네트워크 장치 \"%s (%s)\"(이)가 연결 감지를 지원하지 않습니다." - -msgid "(unknown)" -msgstr "(알 수 없음)" - -msgid "Preparing device %s for the wired network..." -msgstr "유선 네트워크의 장치 %s 준비중..." - -msgid "Preparing device %s for the wireless network '%s'..." -msgstr "무선 네트워크 '%2$s'의 장치 %1$s 준비중..." - -msgid "Configuring device %s for the wired network..." -msgstr "유선 네트워크의 장치 %s 설정중..." - -msgid "Attempting to join the wireless network '%s'..." -msgstr "무선 네트워크 '%s'에 참여 준비중..." - -msgid "Waiting for Network Key for the wireless network '%s'..." -msgstr "무선 네트워크 '%s'의 네트워크 키 기다리는 중..." - -msgid "Requesting a network address from the wired network..." -msgstr "유선 네트워크에서 네트워크 주소 요청중..." - -msgid "Requesting a network address from the wireless network '%s'..." -msgstr "무선 네트워크 '%s'에서 네트워크 주소 요청중..." - -msgid "Finishing connection to the wired network..." -msgstr "유선 네트워크 연결 끝내는 중..." - -msgid "Finishing connection to the wireless network '%s'..." -msgstr "무선 네트워크 '%s' 연결 끝내는 중..." - -msgid "NetworkManager is not running" -msgstr "네트워크 관리자가 실행 중이지 않습니다" - -msgid "Networking disabled" -msgstr "네트워크를 사용할 수 없습니다" - -msgid "No network connection" -msgstr "네트워크 연결 없음" - -msgid "Wired network connection" -msgstr "유선 네트워크 연결" - -msgid "Connected to an Ad-Hoc wireless network" -msgstr "Ad-Hoc 무선 네트워크 연결됨" - -msgid "Wireless network connection to '%s' (%d%%)" -msgstr "'%s'(으)로 무선 네트워크 연결 (%d%%)" - -msgid "VPN connection to '%s'" -msgstr "'%s'(으)로 VPN 연결" - -msgid "VPN connecting to '%s'" -msgstr "'%s'(으)로 VPN 연결중" - -msgid "_Connect to Other Wireless Network..." -msgstr "다른 무선 네트워크에 연결(_C)..." - -msgid "Create _New Wireless Network..." -msgstr "새 무선 네트워크 만들기(_N)..." - -msgid "_VPN Connections" -msgstr "VPN 연결(_V)" - -msgid "_Configure VPN..." -msgstr "VPN 설정하기(_C)..." - -msgid "_Disconnect VPN..." -msgstr "VPN 연결 끊기(_D)..." - -msgid "_Dial Up Connections" -msgstr "전화 연결(_D)" - -msgid "Connect to %s..." -msgstr "%s(으)로 연결..." - -msgid "Disconnect from %s..." -msgstr "%s에서 연결 끊기..." - -msgid "No network devices have been found" -msgstr "네트워크 장치를 찾을 수 없습니다" - -msgid "NetworkManager is not running..." -msgstr "네트워크 관리자가 실행중이지 않습니다..." - -msgid "Enable _Networking" -msgstr "네트워크 사용(_N)" - -msgid "Enable _Wireless" -msgstr "무선 네트워크 사용(_W)" - -msgid "Connection _Information" -msgstr "연결 정보(_I)" - -msgid "_Help" -msgstr "도움말(_H)" - -msgid "_About" -msgstr "정보(_A)" - -msgid "" -"The NetworkManager applet could not find some required resources. It cannot " -"continue.\n" -msgstr "" -"네트워크 관리자 애플릿이 필요한 몇몇 파일을 찾을 수 없습니다. 계속할 수 없습" -"니다.\n" - -msgid "Open System" -msgstr "열린 시스템" - -msgid "Shared Key" -msgstr "공유 키" - -msgid "Automatic (Default)" -msgstr "자동 (기본값)" - -msgid "AES-CCMP" -msgstr "AES-CCMP" - -msgid "TKIP" -msgstr "TKIP" - -msgid "Dynamic WEP" -msgstr "동적 WEP" - -msgid "None" -msgstr "없음" - -msgid "WEP 64/128-bit ASCII" -msgstr "WEP 40/128비트 ASCII" - -msgid "WEP 64/128-bit Hex" -msgstr "WEP 40/128비트 16진수" - -msgid "WEP 128-bit Passphrase" -msgstr "WEP 128비트 열쇠글" - -msgid "PEAP" -msgstr "PEAP" - -msgid "TLS" -msgstr "TLS" - -msgid "TTLS" -msgstr "TTLS" - -msgid "WPA2 Enterprise" -msgstr "기업용 WPA2" - -msgid "WPA Enterprise" -msgstr "기업용 WPA" - -msgid "WPA2 Personal" -msgstr "개인용 WPA2" - -msgid "WPA Personal" -msgstr "개인용 WPA" - -msgid "Orientation" -msgstr "방향" - -msgid "The orientation of the tray." -msgstr "트레이의 방향." - -msgid "Wired Network (%s)" -msgstr "유선 네트워크 (%s)" - -msgid "_Wired Network" -msgstr "유선 네트워크(_W)" - -msgid "Wireless Network (%s)" -msgid_plural "Wireless Networks (%s)" -msgstr[0] "무선 네트워크 (%s)" - -msgid "Wireless Network" -msgid_plural "Wireless Networks" -msgstr[0] "무선 네트워크" - -msgid " (invalid Unicode)" -msgstr " (잘못된 유니코드)" - -msgid "" -"By default, the wireless network's name is set to your computer's name, %s, " -"with no encryption enabled" -msgstr "" -"기본값으로 무선 네트워크의 이름은 컴퓨터의 이름 %s(으)로 설정되고 암호화가 설" -"정되지 않습니다" - -msgid "Create new wireless network" -msgstr "새 무선 네트워크 만들기" - -msgid "" -"Enter the name and security settings of the wireless network you wish to " -"create." -msgstr "만드려는 무선 네트워크의 이름과 보안 설정을 입력하십시오." - -msgid "Create New Wireless Network" -msgstr "새 무선 네트워크 만들기" - -msgid "Existing wireless network" -msgstr "있는 무선 네트워크" - -msgid "Enter the name of the wireless network to which you wish to connect." -msgstr "연결하려는 무선 네트워크의 이름을 입력하십시오." - -msgid "Connect to Other Wireless Network" -msgstr "다른 무선 네트워크에 연결" - -msgid "Error connecting to wireless network" -msgstr "무선 네트워크 연결 오류" - -msgid "" -"The requested wireless network requires security capabilities unsupported by " -"your hardware." -msgstr "무선 네트워크에서 하드웨어가 지원하지 않는 보안 기능을 필요로 합니다." - -msgid "Cannot start VPN connection '%s'" -msgstr "VPN 연결 '%s'(을)를 시작할 수 없습니다" - -msgid "" -"Could not find the authentication dialog for VPN connection type '%s'. " -"Contact your system administrator." -msgstr "" -"VPN 연결 형식 '%s'의 인증 대화상자를 찾을 수 없습니다.시스템 관리자에게 알려" -"주십시오." - -msgid "" -"There was a problem launching the authentication dialog for VPN connection " -"type '%s'. Contact your system administrator." -msgstr "" -"VPN 연결 형식 '%s'의 인증 대화상자를 시작하는데 문제가 생겼습니다.시스템 관리" -"자에게 알려주십시오." - -msgid " " -msgstr " " - -msgid "" -"Active Connection Information" -msgstr "활성화 된 연결 정보" - -msgid "" -"Passphrase Required by Wireless " -"Network\n" +"# Merged from %s\n" "\n" -"A passphrase or encryption key is required to access the wireless network '%" -"s'." msgstr "" -"열쇠글을 필요로 하는 무선 네트워크\n" +"# %s에서 병합됨\n" "\n" -"무선 네트워크 '%s'에 연결하려면 열쇠글이나 암호키가 있어야 합니다." -msgid "" -"Reduced Network Functionality\n" -"\n" -"%s It will not be completely functional." -msgstr "" -" 줄어든 네트워크 기능\n" -"\n" -"%s 모든 기능을 쓸 수 없습니다." - -msgid "" -"Wireless Network Login Confirmation\n" -"\n" -"You have chosen to log in to the wireless network '%s'. If you are sure " -"that this wireless network is secure, click the checkbox below and " -"NetworkManager will not require confirmation on subsequent log ins." -msgstr "" -"무선 네트워크 로그인 확인\n" -"\n" -"무선 네트워크 '%s'에 로그인을 선택했습니다. 무선 네트워크가 안전하다고생각되" -"면, 아래의 확인 상자를 눌러서 네트워크 매니져가 로그인 이후에확인을 하지 않도" -"록 하십시오." - -msgid "Anonymous Identity:" -msgstr "아무개 ID:" - -msgid "Authentication:" -msgstr "인증:" - -msgid "Broadcast Address:" -msgstr "Broadcast 주소:" - -msgid "CA Certificate File:" -msgstr "CA 인증서 파일:" - -msgid "C_onnect" -msgstr "연결(_O)" - -msgid "Client Certificate File:" -msgstr "클라이언트 인증서 파일:" - -msgid "Connection Information" -msgstr "연결 정보" - -msgid "Default Route:" -msgstr "기본 Route:" - -msgid "Destination Address:" -msgstr "목표 주소:" - -msgid "Driver:" -msgstr "드라이버:" - -msgid "EAP Method:" -msgstr "EAP 방식:" - -msgid "Hardware Address:" -msgstr "하드웨어 주소:" - -msgid "IP Address:" -msgstr "IP 주소:" - -msgid "Identity:" -msgstr "ID:" - -msgid "Interface:" -msgstr "인터페이스:" - -msgid "Key Type:" -msgstr "키 형식:" - -msgid "Key management:" -msgstr "키 관리:" - -msgid "Key:" -msgstr "키:" - -msgid "" -"None\n" -"WEP 128-bit Passphrase\n" -"WEP 64/128-bit Hex\n" -"WEP 64/128-bit ASCII\n" -msgstr "" -"없음\n" -"WEP 128비트 열쇠글\n" -"WEP 64/128비트 16진수\n" -"WEP 64/128비트 ASCII\n" - -msgid "" -"Open System\n" -"Shared Key" -msgstr "" -"열린 시스템\n" -"공유 키" - -msgid "Other Wireless Network..." -msgstr "다른 무선 네트워크..." - -msgid "Passphrase:" -msgstr "열쇠글:" - -msgid "Password:" -msgstr "열쇠글:" - -msgid "Primary DNS:" -msgstr "기본 DNS:" - -msgid "Private Key File:" -msgstr "개인키 파일:" - -msgid "Private Key Password:" -msgstr "개인키 열쇠글:" - -msgid "Secondary DNS:" -msgstr "보조 DNS:" - -msgid "Select the CA Certificate File" -msgstr "CA 인증서 파일을 선택하십시오" - -msgid "Select the Client Certificate File" -msgstr "클라이언트 인증서 파일을 선택하십시오" - -msgid "Select the Private Key File" -msgstr "개인키 파일을 선택하십시오" - -msgid "Show key" -msgstr "키 보이기" - -msgid "Show passphrase" -msgstr "열쇠글 보이기" - -msgid "Show password" -msgstr "열쇠글 보이기" - -msgid "Show passwords" -msgstr "열쇠글 보이기" - -msgid "Speed:" -msgstr "속도:" - -msgid "Subnet Mask:" -msgstr "서브넷 마스크:" - -msgid "Type:" -msgstr "형식:" - -msgid "User Name:" -msgstr "사용자 이름:" - -msgid "Wireless Network Key Required" -msgstr "무선 네트워크 키가 필요합니다" - -msgid "Wireless _adapter:" -msgstr "무선 아답터(_A):" - -msgid "_Always Trust this Wireless Network" -msgstr "이 무선 네트워크 항상 신뢰(_A)" - -msgid "_Don't remind me again" -msgstr "다시 묻지 않음(_D)" - -msgid "_Login to Network" -msgstr "네트워크에 로그인(_L)" - -msgid "_Network Name:" -msgstr "네트워크 이름(_N):" - -msgid "_Wireless Security:" -msgstr "무선 보안(_W):" - -msgid "Cannot add VPN connection" -msgstr "VPN 연결에 더할 수 없음" - -msgid "" -"No suitable VPN software was found on your system. Contact your system " -"administrator." -msgstr "" -"시스템에 알맞는 VPN 소프트웨어가 없습니다. 시스템 관리자에게 알리기 바립니다." - -msgid "Cannot import VPN connection" -msgstr "VPN 연결 가져올 수 없음" - -msgid "" -"Cannot find suitable software for VPN connection type '%s' to import the " -"file '%s'. Contact your system administrator." -msgstr "" -"파일 '%2$s'에서 VPN 연결 형식 '%1$s'(을)를 가져올 수 있는 적당한 소프트웨어" -"가 없습니다. 시스템 관리자에게 알리기 바랍니다." - -msgid "Error retrieving VPN connection '%s'" -msgstr "VPN 연결 '%s' 얻는데 오류" - -msgid "" -"Could not find the UI files for VPN connection type '%s'. Contact your " -"system administrator." -msgstr "" -"VPN 연결 형식 '%s'에 대한 UI 파일을 찾을 수 없습니다. 시스템 관리자에게 알리" -"기 바랍니다." - -msgid "Delete VPN connection \"%s\"?" -msgstr "VPN 연결 \"%s\"(을)를 지우겠습니까?" - -msgid "" -"All information about the VPN connection \"%s\" will be lost and you may " -"need your system administrator to provide information to create a new " -"connection." -msgstr "" -"VPN 연결 \"%s\"에 대한 모든 정보를 버립니다. 그리고 시스템 관리자에게 새 연결" -"에 대한 정보를 다시 얻어야 합니다." - -msgid "Unable to load" -msgstr "읽을 수 없음" - -msgid "Cannot find some needed resources (the glade file)!" -msgstr "필요한 몇몇 파일(glade 파일)을 찾을 수 없습니다!" - -msgid "Create VPN Connection" -msgstr "VPN 연결 만들기" - -msgid "Edit VPN Connection" -msgstr "VPN 연결 편집" - -msgid "Add a new VPN connection" -msgstr "VPN 연결 더하기" - -msgid "Delete the selected VPN connection" -msgstr "선택한 VPN 연결 지우기" - -msgid "E_xport" -msgstr "내보내기(_X)" - -msgid "Edit the selected VPN connection" -msgstr "선택한 VPN 연결을 고칩니다" - -msgid "Export the VPN settings to a file" -msgstr "VPN 설정을 파일로 저장합니다" - -msgid "Export the selected VPN connection to a file" -msgstr "선택한 VPN 연경을 파일로 저장합니다" - -msgid "Manage Virtual Private Network Connections" -msgstr "가상 사설 네트워크 연결 관리" - -msgid "VPN Connections" -msgstr "VPN 연결" - -msgid "40-bit WEP" -msgstr "40비트 WEP" - -msgid "104-bit WEP" -msgstr "104비트 WEP" - -msgid "WPA TKIP" -msgstr "WPA TKIP" - -msgid "WPA CCMP" -msgstr "WAP CCMP" - -msgid "WPA Automatic" -msgstr "WPA 자동" - -msgid "WPA2 TKIP" -msgstr "WPA2 TKIP" - -msgid "WPA2 CCMP" -msgstr "WAP2 CCMP" - -msgid "WPA2 Automatic" -msgstr "WPA2 자동" - -msgid "none" -msgstr "없음" - -msgid "operation took too long" -msgstr "동작이 너무 오래 걸립니다" - -msgid "received data from wrong type of sender" -msgstr "잘못된 형식의 전송자에게 받은 데이터" - -msgid "received data from unexpected sender" -msgstr "예상하지 않은 전송자에게 받은 데이터" - -msgid "too much data was sent over socket and some of it was lost" -msgstr "너무 많은 데이터가 보내졌고 일부는 잃어버렸습니다" - -msgid "You are now connected to the Ad-Hoc wireless network '%s'." -msgstr "Ad-Hoc 무선 네트워크 '%s'에 연결되었습니다." - -msgid "You are now connected to the wireless network '%s'." -msgstr "무선 네트워크 '%s'에 연결되었습니다." - -msgid "You are now connected to the wired network." -msgstr "유선 네트워크에 연결되었습니다." - -msgid "Connection Established" -msgstr "연결됨" - -msgid "Disconnected" -msgstr "연결 끊겼음" - -msgid "The network connection has been disconnected." -msgstr "네트워크 연결이 끊겼습니다." - -msgid "LEAP" -msgstr "LEAP" +#: ../src/dhcp-manager/nm-dhcp-manager.c:279 +msgid "no usable DHCP client could be found." +msgstr "사용 가능한 DHCP 클라이언트를 찾을 수 없습니다." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:288 +msgid "'dhclient' could be found." +msgstr "'dhclient'를 찾을 수 없습니다." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:298 +msgid "'dhcpcd' could be found." +msgstr "'dhcpcd'를 찾을 수 있습니다." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:306 +#, c-format +msgid "unsupported DHCP client '%s'" +msgstr "지원하지 않는 DHCP 클라이언트 '%s'" + +#: ../src/logging/nm-logging.c:146 +#, c-format +msgid "Unknown log level '%s'" +msgstr "알려지지 않은 로그 수준 '%s'" + +#: ../src/logging/nm-logging.c:171 +#, c-format +msgid "Unknown log domain '%s'" +msgstr "알려지지 않은 로그 영역 '%s'" + +#: ../src/named-manager/nm-named-manager.c:343 +msgid "NOTE: the libc resolver may not support more than 3 nameservers." +msgstr "주의: libc 주소 검색은 3개를 초과하는 네임서버를 지원하지 않을 수 있습니다." + +#: ../src/named-manager/nm-named-manager.c:345 +msgid "The nameservers listed below may not be recognized." +msgstr "아래 열거된 네임서버를 인식하지 못할 수 있습니다." + +#: ../src/system-settings/nm-default-wired-connection.c:157 +#, c-format +msgid "Auto %s" +msgstr "자동 %s" + +#: ../system-settings/plugins/ifcfg-rh/reader.c:3256 +msgid "System" +msgstr "시스템" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "보호된 WiFi 네트워크를 통한 연결 공유" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "열린 WiFi 네트워크를 통한 연결 공유" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "영구적인 시스템 호스트명을 변경합니다" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 +msgid "Modify system connections" +msgstr "시스템 연결을 변경합니다" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 +msgid "System policy prevents modification of system settings" +msgstr "시스템 정책이 시스템 설정을 변경하는 것을 금지합니다" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +msgid "System policy prevents modification of the persistent system hostname" +msgstr "시스템 정책이 호스트 이름을 영구히 변경하는 것을 금지합니다" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "시스템 정책이 보호된 WiFi 네트워크를 통한 연결 공유를 금지합니다" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "시스템 정책이 열린 WiFi 네트워크를 통한 연결 공유를 금지합니다" diff --git a/po/ml.po b/po/ml.po new file mode 100644 index 0000000000..6c1e92f7ce --- /dev/null +++ b/po/ml.po @@ -0,0 +1,1637 @@ +# translation of ml.po to +# translation of NetworkManager.master_upstream.ml.po to +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Ani Peter , 2010 +# +msgid "" +msgstr "" +"Project-Id-Version: ml\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-05-06 14:31+0530\n" +"PO-Revision-Date: 2010-05-10 15:31+0530\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#: ../cli/src/connections.c:59 ../cli/src/connections.c:74 +#: ../cli/src/devices.c:85 ../cli/src/devices.c:98 ../cli/src/devices.c:108 +#: ../cli/src/devices.c:118 ../cli/src/devices.c:131 ../cli/src/devices.c:142 +#: ../cli/src/devices.c:152 +msgid "NAME" +msgstr "NAME" + +#. 0 +#: ../cli/src/connections.c:60 ../cli/src/connections.c:75 +msgid "UUID" +msgstr "UUID" + +#. 1 +#: ../cli/src/connections.c:61 +msgid "DEVICES" +msgstr "DEVICES" + +#. 2 +#: ../cli/src/connections.c:62 ../cli/src/connections.c:77 +msgid "SCOPE" +msgstr "SCOPE" + +#. 3 +#: ../cli/src/connections.c:63 +msgid "DEFAULT" +msgstr "DEFAULT" + +#. 4 +#: ../cli/src/connections.c:64 +msgid "DBUS-SERVICE" +msgstr "DBUS-SERVICE" + +#. 5 +#: ../cli/src/connections.c:65 +msgid "SPEC-OBJECT" +msgstr "SPEC-OBJECT" + +#. 6 +#: ../cli/src/connections.c:66 +msgid "VPN" +msgstr "VPN" + +#. 1 +#. 0 +#. 1 +#: ../cli/src/connections.c:76 ../cli/src/devices.c:61 ../cli/src/devices.c:87 +msgid "TYPE" +msgstr "TYPE" + +#. 3 +#: ../cli/src/connections.c:78 +msgid "TIMESTAMP" +msgstr "TIMESTAMP" + +#. 4 +#: ../cli/src/connections.c:79 +msgid "TIMESTAMP-REAL" +msgstr "TIMESTAMP-REAL" + +#. 5 +#: ../cli/src/connections.c:80 +msgid "AUTOCONNECT" +msgstr "AUTOCONNECT" + +#. 6 +#: ../cli/src/connections.c:81 +msgid "READONLY" +msgstr "READONLY" + +#: ../cli/src/connections.c:157 +#, c-format +msgid "" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" +msgstr "" +"ഉപയോഗിക്കേണ്ട വിധം: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" + +#: ../cli/src/connections.c:197 ../cli/src/connections.c:536 +#, c-format +msgid "Error: 'con list': %s" +msgstr "പിശക്: 'con list': %s" + +#: ../cli/src/connections.c:199 ../cli/src/connections.c:538 +#, c-format +msgid "Error: 'con list': %s; allowed fields: %s" +msgstr "പിശക്: 'con list': %s; അനുവദിക്കുന്ന ഫീള്‍ഡുകള്‍: %s" + +#: ../cli/src/connections.c:207 +msgid "Connection details" +msgstr "കണക്ഷന്‍ വിശദാംശങ്ങള്‍" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "system" +msgstr "സിസ്റ്റം" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "user" +msgstr "ഉപയോക്താവു്" + +#: ../cli/src/connections.c:383 +msgid "never" +msgstr "ഒരിക്കലുമില്ല" + +#. "CAPABILITIES" +#. Print header +#. "WIFI-PROPERTIES" +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:544 ../cli/src/settings.c:643 +#: ../cli/src/settings.c:912 ../cli/src/settings.c:913 +#: ../cli/src/settings.c:915 ../cli/src/settings.c:917 +#: ../cli/src/settings.c:1042 ../cli/src/settings.c:1043 +#: ../cli/src/settings.c:1044 ../cli/src/settings.c:1123 +#: ../cli/src/settings.c:1124 ../cli/src/settings.c:1125 +#: ../cli/src/settings.c:1126 ../cli/src/settings.c:1127 +#: ../cli/src/settings.c:1128 ../cli/src/settings.c:1129 +#: ../cli/src/settings.c:1130 ../cli/src/settings.c:1131 +#: ../cli/src/settings.c:1132 ../cli/src/settings.c:1133 +#: ../cli/src/settings.c:1134 ../cli/src/settings.c:1135 +#: ../cli/src/settings.c:1210 +msgid "yes" +msgstr "ഉവ്വു്" + +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:506 ../cli/src/settings.c:544 +#: ../cli/src/settings.c:643 ../cli/src/settings.c:912 +#: ../cli/src/settings.c:913 ../cli/src/settings.c:915 +#: ../cli/src/settings.c:917 ../cli/src/settings.c:1042 +#: ../cli/src/settings.c:1043 ../cli/src/settings.c:1044 +#: ../cli/src/settings.c:1123 ../cli/src/settings.c:1124 +#: ../cli/src/settings.c:1125 ../cli/src/settings.c:1126 +#: ../cli/src/settings.c:1127 ../cli/src/settings.c:1128 +#: ../cli/src/settings.c:1129 ../cli/src/settings.c:1130 +#: ../cli/src/settings.c:1131 ../cli/src/settings.c:1132 +#: ../cli/src/settings.c:1133 ../cli/src/settings.c:1134 +#: ../cli/src/settings.c:1135 ../cli/src/settings.c:1210 +msgid "no" +msgstr "ഇല്ല" + +#: ../cli/src/connections.c:457 ../cli/src/connections.c:500 +msgid "System connections" +msgstr "സിസ്റ്റം കണക്ഷനുകള്‍" + +#: ../cli/src/connections.c:462 ../cli/src/connections.c:513 +msgid "User connections" +msgstr "ഉപയോക്താവിനുള്ള കണക്ഷനുകള്‍" + +#: ../cli/src/connections.c:474 ../cli/src/connections.c:1334 +#: ../cli/src/connections.c:1350 ../cli/src/connections.c:1359 +#: ../cli/src/connections.c:1370 ../cli/src/connections.c:1452 +#: ../cli/src/devices.c:864 ../cli/src/devices.c:874 ../cli/src/devices.c:973 +#: ../cli/src/devices.c:980 +#, c-format +msgid "Error: %s argument is missing." +msgstr "പിശക്: %s ആര്‍ഗ്യുമെന്റ് ലഭ്യമല്ല." + +#: ../cli/src/connections.c:487 +#, c-format +msgid "Error: %s - no such connection." +msgstr "പിശക്: %s - ഇത്തരം കണക്ഷന്‍ ലഭ്യമല്ല." + +#: ../cli/src/connections.c:519 ../cli/src/connections.c:1383 +#: ../cli/src/connections.c:1470 ../cli/src/devices.c:687 +#: ../cli/src/devices.c:754 ../cli/src/devices.c:888 ../cli/src/devices.c:986 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "അപരിചിതമായ പരാമീറ്റര്‍: %s\n" + +#: ../cli/src/connections.c:528 +#, c-format +msgid "Error: no valid parameter specified." +msgstr "പിശക്: ശരിയായ പരാമീറ്റര്‍ നല്‍കിയിട്ടില്ല." + +#: ../cli/src/connections.c:543 ../cli/src/connections.c:1572 +#: ../cli/src/devices.c:1192 ../cli/src/network-manager.c:274 +#, c-format +msgid "Error: %s." +msgstr "പിശക്: %s." + +#: ../cli/src/connections.c:649 +#, c-format +msgid "Error: 'con status': %s" +msgstr "പിശക്: 'con status': %s" + +#: ../cli/src/connections.c:651 +#, c-format +msgid "Error: 'con status': %s; allowed fields: %s" +msgstr "പിശക്: 'con status': %s; അനുവദിക്കുന്ന ഫീള്‍ഡുകള്‍: %s" + +#: ../cli/src/connections.c:658 +msgid "Active connections" +msgstr "സജീവമായ കണക്ഷനുകള്‍" + +#: ../cli/src/connections.c:1026 +#, c-format +msgid "no active connection on device '%s'" +msgstr "ഡിവൈസ് '%s'-ല്‍ സജീവമായ കണക്ഷന്‍ ലഭ്യമല്ല" + +#: ../cli/src/connections.c:1034 +#, c-format +msgid "no active connection or device" +msgstr "സജീവമായ കണക്ഷന്‍ അല്ലെങ്കില്‍ ഡിവൈസ് ലഭ്യമല്ല" + +#: ../cli/src/connections.c:1084 +#, c-format +msgid "device '%s' not compatible with connection '%s'" +msgstr "'%s' ഡിവൈസ് '%s' കണക്ഷനുമായി പൊരുത്തപ്പെടുന്നില്ല" + +#: ../cli/src/connections.c:1086 +#, c-format +msgid "no device found for connection '%s'" +msgstr "ഡിവൈസ് '%s'-ല്‍ സജീവമായ കണക്ഷന്‍ ലഭ്യമല്ല" + +#: ../cli/src/connections.c:1097 +msgid "activating" +msgstr "സജീവമാക്കുന്നു" + +#: ../cli/src/connections.c:1099 +msgid "activated" +msgstr "സജീവമാക്കിയിരിക്കുന്നു" + +#: ../cli/src/connections.c:1102 ../cli/src/connections.c:1125 +#: ../cli/src/connections.c:1158 ../cli/src/devices.c:224 +#: ../cli/src/devices.c:514 ../cli/src/network-manager.c:92 +#: ../cli/src/network-manager.c:145 ../cli/src/settings.c:469 +msgid "unknown" +msgstr "അപരിചിതം" + +#: ../cli/src/connections.c:1111 +msgid "VPN connecting (prepare)" +msgstr "വിപിഎന്‍ കണക്ട് ചെയ്യുന്നു (തയ്യാറാകുക)" + +#: ../cli/src/connections.c:1113 +msgid "VPN connecting (need authentication)" +msgstr "വിപിഎന്‍ കണക്ട് ചെയ്യുന്നു (ആധികാരികത ഉറപ്പാക്കേണ്ടതുണ്ടു്)" + +#: ../cli/src/connections.c:1115 +msgid "VPN connecting" +msgstr "വിപിഎന്‍ കണക്ട് ചെയ്യുന്നു" + +#: ../cli/src/connections.c:1117 +msgid "VPN connecting (getting IP configuration)" +msgstr "വിപിഎന്‍ കണക്ട് ചെയ്യുന്നു (ഐപി ക്രമീകരണം ലഭ്യമാക്കുന്നു)" + +#: ../cli/src/connections.c:1119 +msgid "VPN connected" +msgstr "വിപിഎന്‍ കണക്ട് ചെയ്തിരിക്കുന്നു" + +#: ../cli/src/connections.c:1121 +msgid "VPN connection failed" +msgstr "വിപിഎന്‍ കണക്ഷന്‍ പരാജയപ്പെട്ടു" + +#: ../cli/src/connections.c:1123 +msgid "VPN disconnected" +msgstr "വിപിഎന്‍ വിഛേദിച്ചിരിക്കുന്നു" + +#: ../cli/src/connections.c:1134 +msgid "unknown reason" +msgstr "അപരിചിതമായ കാരണം" + +#: ../cli/src/connections.c:1136 +msgid "none" +msgstr "ഒന്നുമില്ല" + +#: ../cli/src/connections.c:1138 +msgid "the user was disconnected" +msgstr "ഉപയോക്താവു് വിഛേദിച്ചിരിക്കുന്നു" + +#: ../cli/src/connections.c:1140 +msgid "the base network connection was interrupted" +msgstr "അടിസ്ഥാന നെറ്റ്‌വര്‍ക്ക് കണക്ഷന്‍ തടസ്സപ്പെടുത്തിയിരിക്കുന്നു" + +#: ../cli/src/connections.c:1142 +msgid "the VPN service stopped unexpectedly" +msgstr "വിപിഎന്‍ സര്‍വീസ് അപ്രതീക്ഷിതമായി നിര്‍ത്തിയിരിക്കുന്നു" + +#: ../cli/src/connections.c:1144 +msgid "the VPN service returned invalid configuration" +msgstr "വിപിഎന്‍ സര്‍വീസ് തെറ്റായ ക്രമീകരണം തിരികെ നല്‍കിയിരിക്കുന്നു" + +#: ../cli/src/connections.c:1146 +msgid "the connection attempt timed out" +msgstr "കണക്ഷനുള്ള ശ്രമം കഴിഞ്ഞിരിക്കുന്നു" + +#: ../cli/src/connections.c:1148 +msgid "the VPN service did not start in time" +msgstr "വിപിഎന്‍ സര്‍വീസ് സമയത്തിനു് ആരംഭിച്ചില്ല" + +#: ../cli/src/connections.c:1150 +msgid "the VPN service failed to start" +msgstr "വിപിഎന്‍ സര്‍വീസ് ആരംഭിക്കുന്നതില്‍ പരാജയപ്പെട്ടു" + +#: ../cli/src/connections.c:1152 +msgid "no valid VPN secrets" +msgstr "ശരിയായ വിപിഎന്‍ രഹസ്യങ്ങള്‍ ലഭ്യമല്ല" + +#: ../cli/src/connections.c:1154 +msgid "invalid VPN secrets" +msgstr "തെറ്റായ വിപിഎന്‍ രഹസ്യങ്ങള്‍" + +#: ../cli/src/connections.c:1156 +msgid "the connection was removed" +msgstr "കണക്ഷന്‍ നീക്കം ചെയ്തിരിക്കുന്നു" + +#: ../cli/src/connections.c:1170 +#, c-format +msgid "state: %s\n" +msgstr "അവസ്ഥ: %s\n" + +#: ../cli/src/connections.c:1173 ../cli/src/connections.c:1199 +#, c-format +msgid "Connection activated\n" +msgstr "കണക്ഷന്‍ സജീവമാക്കിയിരിക്കുന്നു\n" + +#: ../cli/src/connections.c:1176 +#, c-format +msgid "Error: Connection activation failed." +msgstr "പിശക്: കണക്ഷന്‍ സജീവമാക്കല്‍ പരാജയപ്പെട്ടു." + +#: ../cli/src/connections.c:1195 +#, c-format +msgid "state: %s (%d)\n" +msgstr "അവസ്ഥ: %s (%d)\n" + +#: ../cli/src/connections.c:1205 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "പിശക്: കണക്ഷന്‍ സജീവമാക്കല്‍ പരാജയപ്പെട്ടു: %s." + +#: ../cli/src/connections.c:1222 ../cli/src/devices.c:811 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "പിശക്: സമയപരിധി %d നിമിഷത്തിന്റെ കാലാവധി കഴിഞ്ഞിരിക്കുന്നു." + +#: ../cli/src/connections.c:1265 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "പിശക്: കണക്ഷന്‍ സജീവമാക്കല്‍ പരാജയപ്പെട്ടു: %s" + +#: ../cli/src/connections.c:1279 +#, c-format +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "പിശക്: '%s'-നുള്ള സജീവമായ കണക്ഷന്‍ ലഭ്യമാക്കുന്നതില്‍ പരാജയപ്പെട്ടു." + +#: ../cli/src/connections.c:1288 +#, c-format +msgid "Active connection state: %s\n" +msgstr "സജീവമായ കണക്ഷന്റെ അവസ്ഥ: %s\n" + +#: ../cli/src/connections.c:1289 +#, c-format +msgid "Active connection path: %s\n" +msgstr "സജീവമായ കണക്ഷന്‍ പാഥ്: %s\n" + +#: ../cli/src/connections.c:1343 ../cli/src/connections.c:1461 +#, c-format +msgid "Error: Unknown connection: %s." +msgstr "പിശക്: അപരിചിതമായ കണക്ഷന്‍: %s." + +#: ../cli/src/connections.c:1378 ../cli/src/devices.c:882 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "പിശഖ്: സമയപരിധിയുടെ മൂല്ല്യം '%s' തെറ്റാണു്." + +#: ../cli/src/connections.c:1391 ../cli/src/connections.c:1478 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "പിശക്: id അല്ലെങ്കില്‍ uuid വ്യക്തമാക്കേണ്ടതുണ്ടു്." + +#: ../cli/src/connections.c:1411 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "പിശക്: ഉചിതമായ ഡിവൈസ് ലഭ്യമായില്ല: %s." + +#: ../cli/src/connections.c:1413 +#, c-format +msgid "Error: No suitable device found." +msgstr "പിശക്: ഉചിതമായ ഡിവൈസ് ലഭ്യമായില്ല." + +#: ../cli/src/connections.c:1505 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "മുന്നറിയിപ്പു്: കണക്ഷന്‍ സജീവമല്ല\n" + +#: ../cli/src/connections.c:1561 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "പിശക്: 'con' കമാന്‍ഡ് '%s' ശരിയല്ല." + +#: ../cli/src/connections.c:1597 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "പിശക്: D-Bus-ലേക്കു് കണക്ട് ചെയ്യുവാന്‍ സാധ്യമായില്ല." + +#: ../cli/src/connections.c:1604 +#, c-format +msgid "Error: Could not get system settings." +msgstr "പിശക്: സിസ്റ്റം സജ്ജീകരണങ്ങള്‍ ലഭ്യമാക്കവാന്‍ സാധ്യമായില്ല." + +#: ../cli/src/connections.c:1612 +#, c-format +msgid "Error: Could not get user settings." +msgstr "പിശക്: ഉപയോക്താവിനുള്ള സജ്ജീകരണങ്ങള്‍ ലഭ്യമാക്കുവാന്‍ സാധ്യമായില്ല." + +#: ../cli/src/connections.c:1622 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "പിശക്: കണക്ഷനുകള്‍ ലഭ്യമാക്കുവാന്‍ സാധ്യമല്ല: സജ്ജീകരണങ്ങള്‍ക്കുള്ള സര്‍വീസുകള്‍ പ്രവര്‍ത്തിക്കുന്നില്ല." + +#. 0 +#. 9 +#: ../cli/src/devices.c:60 ../cli/src/devices.c:86 ../cli/src/devices.c:162 +msgid "DEVICE" +msgstr "DEVICE" + +#. 1 +#. 4 +#. 0 +#: ../cli/src/devices.c:62 ../cli/src/devices.c:90 +#: ../cli/src/network-manager.c:36 +msgid "STATE" +msgstr "STATE" + +#: ../cli/src/devices.c:71 +msgid "GENERAL" +msgstr "GENERAL" + +#. 0 +#: ../cli/src/devices.c:72 +msgid "CAPABILITIES" +msgstr "CAPABILITIES" + +#. 1 +#: ../cli/src/devices.c:73 +msgid "WIFI-PROPERTIES" +msgstr "WIFI-PROPERTIES" + +#. 2 +#: ../cli/src/devices.c:74 +msgid "AP" +msgstr "AP" + +#. 3 +#: ../cli/src/devices.c:75 +msgid "WIRED-PROPERTIES" +msgstr "WIRED-PROPERTIES" + +#. 4 +#: ../cli/src/devices.c:76 +msgid "IP4-SETTINGS" +msgstr "IP4-SETTINGS" + +#. 5 +#: ../cli/src/devices.c:77 +msgid "IP4-DNS" +msgstr "IP4-DNS" + +#. 2 +#: ../cli/src/devices.c:88 +msgid "DRIVER" +msgstr "DRIVER" + +#. 3 +#: ../cli/src/devices.c:89 +msgid "HWADDR" +msgstr "HWADDR" + +#. 0 +#: ../cli/src/devices.c:99 +msgid "CARRIER-DETECT" +msgstr "CARRIER-DETECT" + +#. 1 +#: ../cli/src/devices.c:100 +msgid "SPEED" +msgstr "SPEED" + +#. 0 +#: ../cli/src/devices.c:109 +msgid "CARRIER" +msgstr "CARRIER" + +#. 0 +#: ../cli/src/devices.c:119 +msgid "WEP" +msgstr "WEP" + +#. 1 +#: ../cli/src/devices.c:120 +msgid "WPA" +msgstr "WPA" + +#. 2 +#: ../cli/src/devices.c:121 +msgid "WPA2" +msgstr "WPA2" + +#. 3 +#: ../cli/src/devices.c:122 +msgid "TKIP" +msgstr "TKIP" + +#. 4 +#: ../cli/src/devices.c:123 +msgid "CCMP" +msgstr "CCMP" + +#. 0 +#: ../cli/src/devices.c:132 +msgid "ADDRESS" +msgstr "ADDRESS" + +#. 1 +#: ../cli/src/devices.c:133 +msgid "PREFIX" +msgstr "PREFIX" + +#. 2 +#: ../cli/src/devices.c:134 +msgid "GATEWAY" +msgstr "GATEWAY" + +#. 0 +#: ../cli/src/devices.c:143 +msgid "DNS" +msgstr "DNS" + +#. 0 +#: ../cli/src/devices.c:153 +msgid "SSID" +msgstr "SSID" + +#. 1 +#: ../cli/src/devices.c:154 +msgid "BSSID" +msgstr "BSSID" + +#. 2 +#: ../cli/src/devices.c:155 +msgid "MODE" +msgstr "MODE" + +#. 3 +#: ../cli/src/devices.c:156 +msgid "FREQ" +msgstr "FREQ" + +#. 4 +#: ../cli/src/devices.c:157 +msgid "RATE" +msgstr "RATE" + +#. 5 +#: ../cli/src/devices.c:158 +msgid "SIGNAL" +msgstr "SIGNAL" + +#. 6 +#: ../cli/src/devices.c:159 +msgid "SECURITY" +msgstr "SECURITY" + +#. 7 +#: ../cli/src/devices.c:160 +msgid "WPA-FLAGS" +msgstr "WPA-FLAGS" + +#. 8 +#: ../cli/src/devices.c:161 +msgid "RSN-FLAGS" +msgstr "RSN-FLAGS" + +#. 10 +#: ../cli/src/devices.c:163 +msgid "ACTIVE" +msgstr "ACTIVE" + +#: ../cli/src/devices.c:186 +#, c-format +msgid "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +"\n" +msgstr "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +"\n" + +#: ../cli/src/devices.c:206 +msgid "unmanaged" +msgstr "കൈകാര്യം ചെയ്തിട്ടില്ലാത്തതു്" + +#: ../cli/src/devices.c:208 +msgid "unavailable" +msgstr "ലഭ്യമല്ലാത്തതു്" + +#: ../cli/src/devices.c:210 ../cli/src/network-manager.c:89 +msgid "disconnected" +msgstr "വിഛേദിച്ചിരിക്കുന്നു" + +#: ../cli/src/devices.c:212 +msgid "connecting (prepare)" +msgstr "കണക്ട് ചെയ്യുന്നു (തയ്യാറാക്കുക)" + +#: ../cli/src/devices.c:214 +msgid "connecting (configuring)" +msgstr "കണക്ട് ചെയ്യുന്നു (ക്രമീകരിക്കുന്നു)" + +#: ../cli/src/devices.c:216 +msgid "connecting (need authentication)" +msgstr "കണക്ട് ചെയ്യുന്നു (ആധികാരികത ഉറപ്പാക്കേണ്ടതുണ്ടു്)" + +#: ../cli/src/devices.c:218 +msgid "connecting (getting IP configuration)" +msgstr "കണക്ട് ചെയ്യുന്നു (ഐപി ക്രമീകരണം ലഭ്യമാക്കുന്നു)" + +#: ../cli/src/devices.c:220 ../cli/src/network-manager.c:87 +msgid "connected" +msgstr "കണക്ട് ചെയ്തിരിക്കുന്നു" + +#: ../cli/src/devices.c:222 +msgid "connection failed" +msgstr "കണക്ഷന്‍ പരാജയപ്പെട്ടു" + +#: ../cli/src/devices.c:245 ../cli/src/devices.c:380 +msgid "Unknown" +msgstr "അപരിചിതം" + +#: ../cli/src/devices.c:277 +msgid "(none)" +msgstr "(ഒന്നുമില്ല)" + +#: ../cli/src/devices.c:302 +#, c-format +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s:IP4 വിലാസം 0x%X വേര്‍തിരിക്കുന്നതില്‍ പിശക്" + +#: ../cli/src/devices.c:349 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" + +#: ../cli/src/devices.c:350 +#, c-format +msgid "%u MB/s" +msgstr "%u MB/s" + +#: ../cli/src/devices.c:359 +msgid "Encrypted: " +msgstr "എന്‍ക്രിപ്റ്റ് ചെയ്തിരിക്കുന്നു: " + +#: ../cli/src/devices.c:364 +msgid "WEP " +msgstr "WEP " + +#: ../cli/src/devices.c:366 +msgid "WPA " +msgstr "WPA " + +#: ../cli/src/devices.c:368 +msgid "WPA2 " +msgstr "WPA2 " + +#: ../cli/src/devices.c:371 +msgid "Enterprise " +msgstr "എന്റര്‍പ്രൈസ്" + +#: ../cli/src/devices.c:380 +msgid "Ad-Hoc" +msgstr "അഡ്-ഹോക്" + +#: ../cli/src/devices.c:380 +msgid "Infrastructure" +msgstr "ഇന്‍ഫ്രാസ്ട്രക്ചര്‍" + +#: ../cli/src/devices.c:442 +#, c-format +msgid "Error: 'dev list': %s" +msgstr "പിശക്: 'dev list': %s" + +#: ../cli/src/devices.c:444 +#, c-format +msgid "Error: 'dev list': %s; allowed fields: %s" +msgstr "പിശക്: 'dev list': %s, അനുവദിക്കുന്ന ഫീള്‍ഡുകള്‍: %s" + +#: ../cli/src/devices.c:453 +msgid "Device details" +msgstr "ഡിവൈസിന്റെ വിശദാംശങ്ങള്‍" + +#: ../cli/src/devices.c:483 ../cli/src/devices.c:827 +msgid "(unknown)" +msgstr "(അപരിചിതം)" + +#: ../cli/src/devices.c:484 +msgid "unknown)" +msgstr "(അപരിചിതം)" + +#: ../cli/src/devices.c:510 +#, c-format +msgid "%u Mb/s" +msgstr "%u Mb/s" + +#. Print header +#. "WIRED-PROPERTIES" +#: ../cli/src/devices.c:583 +msgid "on" +msgstr "ഓണ്‍" + +#: ../cli/src/devices.c:583 +msgid "off" +msgstr "ഓഫ്" + +#: ../cli/src/devices.c:710 +#, c-format +msgid "Error: 'dev status': %s" +msgstr "പിശക്: 'dev status': %s" + +#: ../cli/src/devices.c:712 +#, c-format +msgid "Error: 'dev status': %s; allowed fields: %s" +msgstr "പിശക്: 'dev status': %s; അനുവദിക്കുന്ന ഫീള്‍ഡുകള്‍: %s" + +#: ../cli/src/devices.c:719 +msgid "Status of devices" +msgstr "ഡിവൈസുകളുടെ അവസ്ഥ" + +#: ../cli/src/devices.c:747 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "പിശക്: '%s' ആര്‍ഗ്യുമെന്റ് ലഭ്യമല്ല." + +#: ../cli/src/devices.c:776 ../cli/src/devices.c:915 ../cli/src/devices.c:1035 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "പിശക്: ഡിവൈസ് '%s' ലഭ്യമായില്ല." + +#: ../cli/src/devices.c:799 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "വിജയിച്ചു: ഡിവൈസ് '%s' വിജയകരമായി വിഛേദിച്ചിരിക്കുന്നു." + +#: ../cli/src/devices.c:824 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "പിശക്: ഡിവൈസ് '%s' (%s) വിഛേദിക്കുന്നതില്‍ പരാജയപ്പെട്ടു: %s" + +#: ../cli/src/devices.c:832 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "ഡിവൈസിന്റെ അവസ്ഥ: %d (%s)\n" + +#: ../cli/src/devices.c:896 +#, c-format +msgid "Error: iface has to be specified." +msgstr "പിശക്: iface നല്‍കേണ്ടതുണ്ടു്." + +#: ../cli/src/devices.c:1011 +#, c-format +msgid "Error: 'dev wifi': %s" +msgstr "പിശക്: 'dev wifi': %s" + +#: ../cli/src/devices.c:1013 +#, c-format +msgid "Error: 'dev wifi': %s; allowed fields: %s" +msgstr "പിശക്: 'dev wifi': %s; അനുവദിക്കുന്ന ഫീള്‍ഡുകള്‍: %s" + +#: ../cli/src/devices.c:1020 +msgid "WiFi scan list" +msgstr "WiFi പരിശോധന പട്ടിക" + +#: ../cli/src/devices.c:1055 ../cli/src/devices.c:1109 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "പിശക്: hwaddr '%s'-നുള്ള ആക്സെസ്സ് പോയിന്റ് ലഭ്യമല്ല." + +#: ../cli/src/devices.c:1072 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "പിശക്: '%s' ഡിവൈസ് ഒരു വൈഫൈ ഡിവൈസല്ല." + +#: ../cli/src/devices.c:1136 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "പിശക്: 'dev wifi' കമാന്‍ഡ് '%s' ശരിയല്ല." + +#: ../cli/src/devices.c:1183 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "പിശക്: 'dev' കമാന്‍ഡ് '%s' ശരിയല്ല." + +#: ../cli/src/network-manager.c:35 +msgid "RUNNING" +msgstr "RUNNING" + +#. 1 +#: ../cli/src/network-manager.c:37 +msgid "WIFI-HARDWARE" +msgstr "WIFI-HARDWARE" + +#. 2 +#: ../cli/src/network-manager.c:38 +msgid "WIFI" +msgstr "WIFI" + +#. 3 +#: ../cli/src/network-manager.c:39 +msgid "WWAN-HARDWARE" +msgstr "WWAN-HARDWARE" + +#. 4 +#: ../cli/src/network-manager.c:40 +msgid "WWAN" +msgstr "WWAN" + +#: ../cli/src/network-manager.c:62 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" +msgstr "" +"ഉപയോഗിക്കേണ്ട വിധം: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + +#: ../cli/src/network-manager.c:83 +msgid "asleep" +msgstr "asleep" + +#: ../cli/src/network-manager.c:85 +msgid "connecting" +msgstr "കണക്ട് ചെയ്യുന്നു" + +#: ../cli/src/network-manager.c:125 +#, c-format +msgid "Error: 'nm status': %s" +msgstr "പിശക്: 'nm status': %s" + +#: ../cli/src/network-manager.c:127 +#, c-format +msgid "Error: 'nm status': %s; allowed fields: %s" +msgstr "പിശക്: 'nm status': %s; അനുവദിക്കുന്ന ഫീള്‍ഡുകള്‍: %s" + +#: ../cli/src/network-manager.c:134 +msgid "NetworkManager status" +msgstr "നെറ്റ്‌വര്‍ക്ക്മാനേജറിന്റെ അവസ്ഥ" + +#. Print header +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "enabled" +msgstr "enabled" + +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "disabled" +msgstr "disabled" + +#: ../cli/src/network-manager.c:148 +msgid "running" +msgstr "പ്രവര്‍ത്തനത്തില്‍" + +#: ../cli/src/network-manager.c:148 +msgid "not running" +msgstr "പ്രവര്‍ത്തനത്തിലില്ല" + +#: ../cli/src/network-manager.c:201 ../cli/src/network-manager.c:233 +#, c-format +msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s" +msgstr "പിശക്: '%s' എന്നു് '--fields'-നുള്ള മൂല്ല്യം അസാധുവാണു്; അനുവദിക്കുന്ന ഫീള്‍ഡുകള്‍: %s" + +#: ../cli/src/network-manager.c:209 +msgid "WiFi enabled" +msgstr "WiFi സജ്ജം" + +#: ../cli/src/network-manager.c:220 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "പിശക്: തെറ്റായ 'wifi' പരാമീറ്റര്‍: '%s'." + +#: ../cli/src/network-manager.c:241 +msgid "WWAN enabled" +msgstr "WWAN സജ്ജം" + +#: ../cli/src/network-manager.c:252 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "പിശക്: തെറ്റായ 'wwan' പരാമീറ്റര്‍: '%s'." + +#: ../cli/src/network-manager.c:263 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "പിശക്: 'nm' കമാന്‍ഡ് '%s' ശരിയല്ല." + +#: ../cli/src/nmcli.c:69 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -m[ode] tabular|multiline output mode\n" +" -f[ields] |all|common specify fields to output\n" +" -e[scape] yes|no escape columns separators in " +"values\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -m[ode] tabular|multiline output mode\n" +" -f[ields] |all|common specify fields to output\n" +" -e[scape] yes|no escape columns separators in " +"values\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" + +#: ../cli/src/nmcli.c:113 +#, c-format +msgid "Error: Object '%s' is unknown, try 'nmcli help'." +msgstr "പിശക്: '%s'വസ്തു അപരിചിതം, 'nmcli help' ശ്രമിക്കുക." + +#: ../cli/src/nmcli.c:143 +#, c-format +msgid "Error: Option '--terse' is specified the second time." +msgstr "പിശക്: '--terse' രണ്ടാമതും നല്‍കിയിരിക്കുന്നു." + +#: ../cli/src/nmcli.c:148 +#, c-format +msgid "Error: Option '--terse' is mutually exclusive with '--pretty'." +msgstr "Error: Option '--terse' is mutually exclusive with '--pretty'." + +#: ../cli/src/nmcli.c:156 +#, c-format +msgid "Error: Option '--pretty' is specified the second time." +msgstr "പിശക്: '--pretty' രണ്ടാമതും നല്‍കിയിരിക്കുന്നു." + +#: ../cli/src/nmcli.c:161 +#, c-format +msgid "Error: Option '--pretty' is mutually exclusive with '--terse'." +msgstr "Error: Option '--pretty' is mutually exclusive with '--terse'." + +#: ../cli/src/nmcli.c:171 ../cli/src/nmcli.c:187 +#, c-format +msgid "Error: missing argument for '%s' option." +msgstr "പിശക്: '%s' ഐച്ഛികത്തിനുള്ള ആര്‍ഗ്യുമെന്റ് ലഭ്യമല്ല." + +#: ../cli/src/nmcli.c:180 ../cli/src/nmcli.c:196 +#, c-format +msgid "Error: '%s' is not valid argument for '%s' option." +msgstr "പിശക്: '%s' ഐച്ഛികത്തിനുള്ള '%s' ശരിയായ ആര്‍ഗ്യുമെന്റല്ല." + +#: ../cli/src/nmcli.c:203 +#, c-format +msgid "Error: fields for '%s' options are missing." +msgstr "പിശക്: '%s' ഐച്ഛികങ്ങള്‍ക്കുള്ള ഫീള്‍ഡുകള്‍ ലഭ്യമല്ല." + +#: ../cli/src/nmcli.c:209 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "nmcli പ്രയോഗം, പതിപ്പു് %s\n" + +#: ../cli/src/nmcli.c:215 +#, c-format +msgid "Error: Option '%s' is unknown, try 'nmcli -help'." +msgstr "പിശക്: '%s' ഐഛികം അപരിചിതം, 'nmcli -help' ശ്രമിക്കുക." + +#: ../cli/src/nmcli.c:234 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "%d സിഗ്നല്‍ ലഭ്യമായി, അടച്ചു പൂട്ടുന്നു..." + +#: ../cli/src/nmcli.c:259 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "പിശക്: നെറ്റ്‌വര്‍ക്ക്മാനേജറിലേക്കു് കണക്ട് ചെയ്യുവാന്‍ സാധ്യമായില്ല." + +#: ../cli/src/nmcli.c:275 +msgid "Success" +msgstr "വിജയിച്ചു" + +#: ../cli/src/settings.c:407 +#, c-format +msgid "%d (hex-ascii-key)" +msgstr "%d (hex-ascii-key)" + +#: ../cli/src/settings.c:409 +#, c-format +msgid "%d (104/128-bit passphrase)" +msgstr "%d (104/128-ബിറ്റ് പാസ്ഫ്രെയിസ്)" + +#: ../cli/src/settings.c:412 +#, c-format +msgid "%d (unknown)" +msgstr "%d (അപരിചിതം)" + +#: ../cli/src/settings.c:438 +msgid "0 (unknown)" +msgstr "0 (അപരിചിതം)" + +#: ../cli/src/settings.c:444 +msgid "any, " +msgstr "ഏതെങ്കിലും," + +#: ../cli/src/settings.c:446 +msgid "900 MHz, " +msgstr "900 MHz, " + +#: ../cli/src/settings.c:448 +msgid "1800 MHz, " +msgstr "1800 MHz, " + +#: ../cli/src/settings.c:450 +msgid "1900 MHz, " +msgstr "1900 MHz, " + +#: ../cli/src/settings.c:452 +msgid "850 MHz, " +msgstr "850 MHz, " + +#: ../cli/src/settings.c:454 +msgid "WCDMA 3GPP UMTS 2100 MHz, " +msgstr "WCDMA 3GPP UMTS 2100 MHz, " + +#: ../cli/src/settings.c:456 +msgid "WCDMA 3GPP UMTS 1800 MHz, " +msgstr "WCDMA 3GPP UMTS 1800 MHz, " + +#: ../cli/src/settings.c:458 +msgid "WCDMA 3GPP UMTS 1700/2100 MHz, " +msgstr "WCDMA 3GPP UMTS 1700/2100 MHz, " + +#: ../cli/src/settings.c:460 +msgid "WCDMA 3GPP UMTS 800 MHz, " +msgstr "WCDMA 3GPP UMTS 800 MHz, " + +#: ../cli/src/settings.c:462 +msgid "WCDMA 3GPP UMTS 850 MHz, " +msgstr "WCDMA 3GPP UMTS 850 MHz, " + +#: ../cli/src/settings.c:464 +msgid "WCDMA 3GPP UMTS 900 MHz, " +msgstr "WCDMA 3GPP UMTS 900 MHz, " + +#: ../cli/src/settings.c:466 +msgid "WCDMA 3GPP UMTS 1700 MHz, " +msgstr "WCDMA 3GPP UMTS 1700 MHz, " + +#: ../cli/src/settings.c:546 ../cli/src/settings.c:708 +msgid "auto" +msgstr "ഓട്ടോ" + +#: ../cli/src/settings.c:704 ../cli/src/settings.c:707 ../cli/src/utils.c:172 +msgid "not set" +msgstr "സജ്ജമല്ല" + +#: ../cli/src/utils.c:124 +#, c-format +msgid "field '%s' has to be alone" +msgstr "ഫീള്‍ഡ് '%s' മാത്രമായിരിക്കണം" + +#: ../cli/src/utils.c:127 +#, c-format +msgid "invalid field '%s'" +msgstr "തെറ്റായ ഫീള്‍ഡ് '%s'" + +#: ../cli/src/utils.c:146 +#, c-format +msgid "Option '--terse' requires specifying '--fields'" +msgstr "'--terse' ഐച്ഛികത്തിനു് '--fields' നല്‍കേണ്ടതുണ്ടു്" + +#: ../cli/src/utils.c:150 +#, c-format +msgid "Option '--terse' requires specific '--fields' option values , not '%s'" +msgstr "'--terse' എന്ന ഐച്ഛികത്തിനു് പ്രത്യേക '--fields' ഐച്ഛികം ആവശ്യമുണ്ടു്, '%s' അല്ല" + +#: ../libnm-util/crypto.c:120 +#, c-format +msgid "PEM key file had no end tag '%s'." +msgstr "PEM കീ ഫയലിനു് അവസാനമുള്ള റ്റാഗ് '%s' ലഭ്യമല്ല." + +#: ../libnm-util/crypto.c:130 +#, c-format +msgid "Doesn't look like a PEM private key file." +msgstr "ഒരു PEM സ്വകാര്യ കീ ഫയല്‍ പോലെയല്ലിതു്." + +#: ../libnm-util/crypto.c:138 +#, c-format +msgid "Not enough memory to store PEM file data." +msgstr " ‌PEM ഫയല്‍ ഡേറ്റാ സൂക്ഷിക്കുന്നതിനാവശ്യമായ മെമ്മറി ലഭ്യമല്ല." + +#: ../libnm-util/crypto.c:154 +#, c-format +msgid "Malformed PEM file: Proc-Type was not first tag." +msgstr "തെറ്റായ PEM ഫയല്‍: Proc-രീതിയിലുള്ളതു് ആദ്യത്തെ റ്റാഗ് അല്ല." + +#: ../libnm-util/crypto.c:162 +#, c-format +msgid "Malformed PEM file: unknown Proc-Type tag '%s'." +msgstr "തെറ്റായ PEM ഫയല്‍: അപരിചിതമായ Proc-രീതിയിലുള്ള റ്റാഗ് '%s'." + +#: ../libnm-util/crypto.c:172 +#, c-format +msgid "Malformed PEM file: DEK-Info was not the second tag." +msgstr "തെറ്റായ PEM ഫയല്‍: DEK-Info രണ്ടാത്തെ റ്റാഗ് അല്ല." + +#: ../libnm-util/crypto.c:183 +#, c-format +msgid "Malformed PEM file: no IV found in DEK-Info tag." +msgstr "തെറ്റായ PEM ഫയല്‍: DEK-Info റ്റാഗില്‍ IV ലഭ്യമായില്ല." + +#: ../libnm-util/crypto.c:190 +#, c-format +msgid "Malformed PEM file: invalid format of IV in DEK-Info tag." +msgstr "തെറ്റായ PEM ഫയല്‍: DEK-Info റ്റാഗില്‍ IV-ന്റെ ശൈലി തെറ്റാണു്." + +#: ../libnm-util/crypto.c:203 +#, c-format +msgid "Malformed PEM file: unknown private key cipher '%s'." +msgstr "തെറ്റായ PEM ഫയല്‍: അപരിചിതമായ സ്വകാര്യ കീ സിഫര്‍ '%s'." + +#: ../libnm-util/crypto.c:222 +#, c-format +msgid "Could not decode private key." +msgstr "സ്വകാര്യ കീ ഡീകോഡ് ചെയ്യുവാന്‍ സാധ്യമല്ല." + +#: ../libnm-util/crypto.c:267 +#, c-format +msgid "PEM certificate '%s' had no end tag '%s'." +msgstr "PEM സര്‍ട്ടിഫിക്കേറ്റ് '%s'-നു് ഒടുവിലുള്ള റ്റാഗ് '%s' ലഭ്യമല്ല." + +#: ../libnm-util/crypto.c:277 +#, c-format +msgid "Failed to decode certificate." +msgstr "സര്‍ട്ടിഫിക്കേറ്റ് ഡീകോഡ് ചെയ്യുന്നതില്‍ പരാജയപ്പെട്ടു." + +#: ../libnm-util/crypto.c:286 +#, c-format +msgid "Not enough memory to store certificate data." +msgstr "‌സര്‍ട്ടിഫിക്കേറ്റ് ഡേറ്റാ സൂക്ഷിക്കുന്നതിനാവശ്യമായ മെമ്മറി ലഭ്യമല്ല." + +#: ../libnm-util/crypto.c:294 +#, c-format +msgid "Not enough memory to store file data." +msgstr "ഫയല്‍ ഡേറ്റാ സൂക്ഷിക്കുന്നതിനാവശ്യമായ മെമ്മറി ലഭ്യമല്ല." + +#: ../libnm-util/crypto.c:324 +#, c-format +msgid "IV must be an even number of bytes in length." +msgstr "IV-ന്റെ വ്യാപ്തി ഈവന്‍ അക്കത്തിലുള്ള ബൈറ്റുകളായിരിക്കണം." + +#: ../libnm-util/crypto.c:333 +#, c-format +msgid "Not enough memory to store the IV." +msgstr "IV സൂക്ഷിക്കുന്നതിനാവശ്യമായ മെമ്മറി ലഭ്യമല്ല." + +#: ../libnm-util/crypto.c:344 +#, c-format +msgid "IV contains non-hexadecimal digits." +msgstr "IV-ല്‍ നോണ്‍-ഹെക്സാഡെസിമല്‍ അക്കങ്ങളുണ്ടു്." + +#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:336 +#, c-format +msgid "Private key cipher '%s' was unknown." +msgstr "സ്വകാര്യ കീ സിഫര്‍ '%s' അപരിചിതം." + +#: ../libnm-util/crypto.c:391 +#, c-format +msgid "Not enough memory to decrypt private key." +msgstr "സ്വകാര്യ കീ ഡീക്രിപ്റ്റ് ചെയ്യന്നതിനാവശ്യമായ മെമ്മറി ലഭ്യമല്ല." + +#: ../libnm-util/crypto.c:511 +#, c-format +msgid "Unable to determine private key type." +msgstr "സ്വകാര്യ കീ രീതി കണ്ടുപിടിക്കുവാന്‍ സാധ്യമല്ല." + +#: ../libnm-util/crypto.c:530 +#, c-format +msgid "Not enough memory to store decrypted private key." +msgstr "ഡീക്രിപ്റ്റ് ചെയ്ത സ്വകാര്യ കീ സൂക്ഷിക്കുന്നതിനാവശ്യമായ മെമ്മറി ലഭ്യമല്ല." + +#: ../libnm-util/crypto_gnutls.c:49 +msgid "Failed to initialize the crypto engine." +msgstr "ക്രിപ്റ്റോ എഞ്ചില്‍ ആരംഭിക്കുന്നതില്‍ പരാജയം." + +#: ../libnm-util/crypto_gnutls.c:93 +#, c-format +msgid "Failed to initialize the MD5 engine: %s / %s." +msgstr "MD5 എഞ്ചില്‍ ആരംഭിക്കുവാന്‍ പരാജയപ്പെട്ടു: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "തെറ്റായ IV വ്യാപ്തി (കുറഞ്ഞതു് %zd ആയിരിക്കണം)" + +#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188 +#, c-format +msgid "Not enough memory for decrypted key buffer." +msgstr "ഡീക്രിപ്റ്റ് ചെയ്ത കീ ബഫറിനാവശ്യമായ മെമ്മറി ലഭ്യമല്ല." + +#: ../libnm-util/crypto_gnutls.c:173 +#, c-format +msgid "Failed to initialize the decryption cipher context: %s / %s." +msgstr "ഡീക്രിപ്ഷന്‍ സിഫര്‍ കോണ്‍ടെക്സ്റ്റ് ആരംഭിക്കുന്നതില്‍ പരാജയം: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:182 +#, c-format +msgid "Failed to set symmetric key for decryption: %s / %s." +msgstr "ഡീക്രിപ്ഷനുള്ള സിമ്മെട്രിക് കീ സജ്ജമാക്കുന്നതില്‍ പരാജയപ്പെട്ടു: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:191 +#, c-format +msgid "Failed to set IV for decryption: %s / %s." +msgstr "ഡീക്രിപ്ഷനുള്ള IV സജ്ജമാക്കുന്നതില്‍ പരാജയപ്പെട്ടു: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:200 +#, c-format +msgid "Failed to decrypt the private key: %s / %s." +msgstr "സ്വകാര്യ കീ ഡീക്രിപ്റ്റ് ചെയ്യുന്നതില്‍ പരാജയപ്പെട്ടു: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 +#, c-format +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "സ്വകാര്യ കീ ഡീക്രിപ്റ്റ് ചെയ്യുന്നതില്‍ പരാജയപ്പെട്ടു: അപ്രതീക്ഷിതമായ പാഢിങ് നീളം." + +#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 +#, c-format +msgid "Failed to decrypt the private key." +msgstr "സ്വകാര്യ കീ ഡീക്രിപ്റ്റ് ചെയ്യുന്നതില്‍ പരാജയപ്പെട്ടു." + +#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "എന്‍ക്രിപ്റ്റിങിനുള്ള മെമ്മറി അനുവദിക്കുന്നതില്‍ പരാജയപ്പെട്ടു," + +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "എന്‍ക്രിപ്ഷന്‍ സിഫര്‍ കോണ്‍ടെക്സ്റ്റ് ആരംഭിക്കുന്നതില്‍ പരാജയപ്പെട്ടു: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "എന്‍ക്രിപ്ഷനുള്ള സിമ്മെട്രിക് കീ സജ്ജമാക്കുന്നതില്‍ പരാജയപ്പെട്ടു: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +msgid "Failed to set IV for encryption: %s / %s." +msgstr "എന്‍ക്രിപ്ഷനുള്ള IV സജ്ജമാക്കുന്നതില്‍ പരാജയപ്പെട്ടു: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +msgid "Failed to encrypt the data: %s / %s." +msgstr "ഡേറ്റാ എന്‍ക്രിപ്റ്റ് ചെയ്യുന്നതില്‍ പരാജയപ്പെട്ടു: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:362 +#, c-format +msgid "Error initializing certificate data: %s" +msgstr "സര്‍ട്ടിഫിക്കേറ്റ് ഡേറ്റാ ആരംഭിക്കുന്നതില്‍ പിശക്: %s" + +#: ../libnm-util/crypto_gnutls.c:384 +#, c-format +msgid "Couldn't decode certificate: %s" +msgstr "സര്‍ട്ടിഫിക്കേറ്റ് ഡീകോഡ് ചെയ്യുവാന്‍ സാധ്യമല്ല: %s" + +#: ../libnm-util/crypto_gnutls.c:408 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %s" +msgstr "PKCS#12 ഡീകോഡര്‍ ആരംഭിക്കുവാന്‍ സാധ്യമായില്ല: %s" + +#: ../libnm-util/crypto_gnutls.c:421 +#, c-format +msgid "Couldn't decode PKCS#12 file: %s" +msgstr "PKCS#12 ഫയല്‍ ഡീകോഡ് ചെയ്യുവാന്‍ സാധ്യമായില്ല: %s" + +#: ../libnm-util/crypto_gnutls.c:433 +#, c-format +msgid "Couldn't verify PKCS#12 file: %s" +msgstr "PKCS#12 ഫയല്‍ ഉറപ്പാക്കുവാന്‍ സാധ്യമായില്ല: %s" + +#: ../libnm-util/crypto_nss.c:56 +#, c-format +msgid "Failed to initialize the crypto engine: %d." +msgstr "ക്രിപ്റ്റോ എഞ്ചിന്‍ ആരംഭിക്കുന്നതില്‍ പരാജയപ്പെട്ടു: %d." + +#: ../libnm-util/crypto_nss.c:111 +#, c-format +msgid "Failed to initialize the MD5 context: %d." +msgstr "MD5 കോണ്‍ടെക്സ്റ്റ് ആരംഭിക്കുന്നതില്‍ പരാജയപ്പെട്ടു: %d." + +#: ../libnm-util/crypto_nss.c:179 +#, c-format +msgid "Invalid IV length (must be at least %d)." +msgstr "തെറ്റായ IV നീളം (കുറഞ്ഞതു് %d ആയിരിക്കണം)." + +#: ../libnm-util/crypto_nss.c:196 +#, c-format +msgid "Failed to initialize the decryption cipher slot." +msgstr "ഡീക്രിപ്ഷന്‍ സിഫര്‍ സ്ലോട്ട് ആരംഭിക്കുന്നതില്‍ പരാജയപ്പെട്ടു." + +#: ../libnm-util/crypto_nss.c:206 +#, c-format +msgid "Failed to set symmetric key for decryption." +msgstr "ഡീക്രിപ്ഷനുള്ള സിമ്മെട്രിക് കീ സജ്ജമാക്കുന്നതില്‍ പരാജയപ്പെട്ടു." + +#: ../libnm-util/crypto_nss.c:216 +#, c-format +msgid "Failed to set IV for decryption." +msgstr "ഡീക്രിപ്ഷനായി IV സജ്ജമാക്കുന്നതില്‍ പരാജയപ്പെട്ടു." + +#: ../libnm-util/crypto_nss.c:224 +#, c-format +msgid "Failed to initialize the decryption context." +msgstr "ഡീക്രിപ്ഷന്‍ കോണ്‍ടെക്സ്റ്റ് ആരംഭിക്കുന്നതില്‍ പരാജയപ്പെട്ടു." + +#: ../libnm-util/crypto_nss.c:237 +#, c-format +msgid "Failed to decrypt the private key: %d." +msgstr "സ്വകാര്യ കീ ഡീക്രിപ്റ്റ് ചെയ്യുന്നതില്‍ പരാജയപ്പെട്ടു: %d." + +#: ../libnm-util/crypto_nss.c:245 +#, c-format +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "സ്വകാര്യ കീ ഡീക്രിപ്റ്റ് ചെയ്യുന്നതില്‍ പരാജയപ്പെട്ടു: ഡീക്രിപ്റ്റ് ചെയ്ത ഡേറ്റ വളരെ വലുതാണു്." + +#: ../libnm-util/crypto_nss.c:256 +#, c-format +msgid "Failed to finalize decryption of the private key: %d." +msgstr "സ്വകാര്യ കീയുടെ ‍ഡീക്രിപ്ഷന്‍ ഉറപ്പാക്കുന്നതില്‍ പരാജയപ്പെട്ടു: %d." + +#: ../libnm-util/crypto_nss.c:364 +#, c-format +msgid "Failed to initialize the encryption cipher slot." +msgstr "എന്‍ക്രിപ്ഷന്‍ സിഫര്‍ സ്ലോട്ട് ആരംഭിക്കുന്നതില്‍ പരാജയപ്പെട്ടു." + +#: ../libnm-util/crypto_nss.c:372 +#, c-format +msgid "Failed to set symmetric key for encryption." +msgstr "എന്‍ക്രിപ്ഷനുള്ള സിമ്മെട്രിക് കീ സജ്ജമാക്കുന്നതില്‍ പരാജയപ്പെട്ടു." + +#: ../libnm-util/crypto_nss.c:380 +#, c-format +msgid "Failed to set IV for encryption." +msgstr "എന്‍ക്രിപ്ഷനുള്ള IV കീ സജ്ജമാക്കുന്നതില്‍ പരാജയപ്പെട്ടു." + +#: ../libnm-util/crypto_nss.c:388 +#, c-format +msgid "Failed to initialize the encryption context." +msgstr "എന്‍ക്രിപ്ഷന്‍ കോണ്‍ടെക്സ്റ്റ് ആരംഭിക്കുന്നതില്‍ പരാജയപ്പെട്ടു." + +#: ../libnm-util/crypto_nss.c:396 +#, c-format +msgid "Failed to encrypt: %d." +msgstr "എന്‍ക്രിപ്റ്റ് ചെയ്യുന്നതില്‍ പരാജയപ്പെട്ടു: %d." + +#: ../libnm-util/crypto_nss.c:404 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "എന്‍ക്രിപ്റ്റ് ചെയ്തതിനു് ശേഷം അപ്രതീക്ഷിതമായ ഡേറ്റാ" + +#: ../libnm-util/crypto_nss.c:447 +#, c-format +msgid "Couldn't decode certificate: %d" +msgstr "സര്‍ട്ടിഫിക്കേറ്റ് ഡീകോഡ് ചെയ്യുവാന്‍ സാധ്യമായില്ല: %d" + +#: ../libnm-util/crypto_nss.c:482 +#, c-format +msgid "Couldn't convert password to UCS2: %d" +msgstr "രഹസ്യവാക്ക് UCS2-ലേക്ക് വേര്‍തിരിക്കുവാന്‍ സാധ്യമായില്ല: %d" + +#: ../libnm-util/crypto_nss.c:510 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %d" +msgstr "PKCS#12 ഡീകോഡര്‍ ആരംഭിക്കുവാന്‍ സാധ്യമായില്ല: %d" + +#: ../libnm-util/crypto_nss.c:519 +#, c-format +msgid "Couldn't decode PKCS#12 file: %d" +msgstr "PKCS#12 ഫയല്‍ ഡീകോഡ് ചെയ്യുവാന്‍ സാധ്യമായില്ല: %d" + +#: ../libnm-util/crypto_nss.c:528 +#, c-format +msgid "Couldn't verify PKCS#12 file: %d" +msgstr "PKCS#12 ഫയല്‍ ഉറപ്പാക്കുവാന്‍ സാധ്യമായില്ല: %d" + +#: ../libnm-util/crypto_nss.c:557 +msgid "Could not generate random data." +msgstr "വേഗത്തില്‍ ഡേറ്റാ തയ്യാറാക്കുവാന്‍ സാധ്യമായില്ല." + +#: ../libnm-util/nm-utils.c:1925 +#, c-format +msgid "Not enough memory to make encryption key." +msgstr "എന്‍ക്രിപ്ഷന്‍ കീ തയ്യാറാക്കുന്നതിനാവശ്യമായ മെമ്മറി ലഭ്യമല്ല." + +#: ../libnm-util/nm-utils.c:2035 +msgid "Could not allocate memory for PEM file creation." +msgstr "PEM ഫയല്‍ ഉണ്ടാക്കുന്നതിനുള്ള മെമ്മറി അനുവദിക്കുവാന്‍ സാധ്യമായില്ല." + +#: ../libnm-util/nm-utils.c:2047 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "PEM ഫയലിലേക്ക് IV സൂക്ഷിക്കുന്നതിനാവശ്യമുള്ള മെമ്മറി അനുവദിക്കുവാന്‍ സാധ്യമായില്ല." + +#: ../libnm-util/nm-utils.c:2059 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "PEM ഫയലിലേക്ക് എന്‍ക്രിപ്റ്റ് ചെയ്ത കീ സൂക്ഷിക്കുന്നതിനുള്ള മെമ്മറി അനുവദിക്കുവാന്‍ സാധ്യമായില്ല." + +#: ../libnm-util/nm-utils.c:2078 +#, c-format +msgid "Could not allocate memory for PEM file data." +msgstr "PEM ഫയല്‍ ഡേറ്റായ്ക്കുള്ള മെമ്മറി അനുവദിക്കുവാന്‍ സാധ്യമായില്ല." + +#: ../src/nm-netlink-monitor.c:100 ../src/nm-netlink-monitor.c:231 +#: ../src/nm-netlink-monitor.c:653 +#, c-format +msgid "error processing netlink message: %s" +msgstr "നെറ്റ്ലിങ്ക് സന്ദേശം പ്രവര്‍ത്തിപ്പിക്കുമ്പോള്‍ പിശക്: %s" + +#: ../src/nm-netlink-monitor.c:214 +msgid "error occurred while waiting for data on socket" +msgstr "സോക്കറ്റില്‍ ഡേറ്റായ്ക്കായി കാത്തിരിക്കുമ്പോള്‍ പിശകുണ്ടായിരിക്കുന്നു" + +#: ../src/nm-netlink-monitor.c:254 +#, c-format +msgid "unable to connect to netlink for monitoring link status: %s" +msgstr "ലിങ്കിന്റെ അവസ്ഥ നിരീക്ഷിക്കുന്നതിനുള്ള നെറ്റ്ലിങ്കുമായി കണക്ട് ചെയ്യുവാന്‍ സാധ്യമല്ല: %s" + +#: ../src/nm-netlink-monitor.c:265 +#, c-format +msgid "unable to enable netlink handle credential passing: %s" +msgstr "നെറ്റ്ലിങ്ക് ഹാന്‍ഡില്‍ അനുവദിക്കുവാന്‍ സാധ്യമല്ല: %s" + +#: ../src/nm-netlink-monitor.c:291 ../src/nm-netlink-monitor.c:353 +#, c-format +msgid "unable to allocate netlink handle for monitoring link status: %s" +msgstr "ലിിങ്കിന്റെ അവസ്ഥ നിരീക്ഷിക്കുന്നതിനുള്ള നെറ്റ്ലിങ്ക് ഹാന്‍ഡില്‍ അനുവദിക്കുവാന്‍ സാധ്യമല്ല: %s" + +#: ../src/nm-netlink-monitor.c:376 +#, c-format +msgid "unable to allocate netlink link cache for monitoring link status: %s" +msgstr "ലിങ്കിന്റെ അവസ്ഥ നിരീക്ഷിക്കുന്നതിനുള്ള നെറ്റ്ലിങ്ക് ലിങ്ക് കാഷേ അനുവദിക്കുവാന്‍ സാധ്യമല്ല: %s " + +#: ../src/nm-netlink-monitor.c:502 +#, c-format +msgid "unable to join netlink group: %s" +msgstr "നെറ്റ്ലിങ്ക് ഗ്രൂപ്പില്‍ ചേരുവാന്‍ സാധ്യമല്ല: %s" + +#: ../src/nm-netlink-monitor.c:629 ../src/nm-netlink-monitor.c:642 +#, c-format +msgid "error updating link cache: %s" +msgstr "ലിങ്ക് കാഷേ പരിഷ്കരിക്കുന്നതില്‍ പിശക്: %s" + +#: ../src/main.c:502 +#, c-format +msgid "Invalid option. Please use --help to see a list of valid options.\n" +msgstr "തെറ്റായ ഉപാധി. ശരിയായ കൂടുതല്‍ ഉപാധികള്‍ക്കായി ദയവായി --help ഉപയോഗിക്കുക.\n" + +#: ../src/main.c:562 +#, c-format +msgid "%s. Please use --help to see a list of valid options.\n" +msgstr "%s. ശരിയായ കൂടുതല്‍ ഉപാധികള്‍ക്കായി ദയവായി --help ഉപയോഗിക്കുക.\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:325 +msgid "# Created by NetworkManager\n" +msgstr "# തയ്യാറാക്കിയതു് NetworkManager\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:341 +#, c-format +msgid "" +"# Merged from %s\n" +"\n" +msgstr "" +"# %s-ല്‍ നിന്നും കൂട്ടിചേര്‍ത്തിരിക്കുന്നു\n" +"\n" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:279 +msgid "no usable DHCP client could be found." +msgstr "ഉപയോഗിക്കുവാന്‍ സാധിക്കുന്ന DHCP ക്ലയന്റ് ലഭ്യമായില്ല." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:288 +msgid "'dhclient' could be found." +msgstr "'dhclient' ലഭ്യമായില്ല." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:298 +msgid "'dhcpcd' could be found." +msgstr "'dhcpcd' ലഭ്യമായില്ല." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:306 +#, c-format +msgid "unsupported DHCP client '%s'" +msgstr "പിന്തണലഭ്യമല്ലാത്ത DHCP ക്ലയന്റ് '%s'" + +#: ../src/logging/nm-logging.c:146 +#, c-format +msgid "Unknown log level '%s'" +msgstr "അപരിചതമായ ലോഗ് ലവല്‍ '%s'" + +#: ../src/logging/nm-logging.c:171 +#, c-format +msgid "Unknown log domain '%s'" +msgstr "അപരിചിതമായ ലോഗ് ഡൊമെയിന്‍ '%s'" + +#: ../src/named-manager/nm-named-manager.c:343 +msgid "NOTE: the libc resolver may not support more than 3 nameservers." +msgstr "കുറിപ്പു്: libc റിസോള്‍വര്‍ 3 നെയിംസര്‍വറുകളില്‍ കൂടതല്‍ പിന്തുണയ്ക്കുന്നതല്ല." + +#: ../src/named-manager/nm-named-manager.c:345 +msgid "The nameservers listed below may not be recognized." +msgstr "താഴെ പറഞ്ഞിരിക്കുന്ന നെയിംസര്‍വറുകള്‍ തിരിച്ചറിയപ്പെടുന്നവയല്ല." + +#: ../src/system-settings/nm-default-wired-connection.c:157 +#, c-format +msgid "Auto %s" +msgstr "ഓട്ടോ %s" + +#: ../system-settings/plugins/ifcfg-rh/reader.c:3256 +msgid "System" +msgstr "സിസ്റ്റം" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "സുരക്ഷിതമായ ഒരു വൈഫൈ നെറ്റ്‌വര്‍ക്ക് വഴി കണക്ഷന്‍ പങ്കിടുക" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "ഒരു തുറന്ന വൈഫൈ നെറ്റ്‌വര്‍ക്ക് വഴി കണക്ഷന്‍ പങ്കിടുക" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "സിസ്റ്റത്തിന്റെ ഹോസ്റ്റ്നാമത്തില്‍ മാറ്റം വരുത്തുക" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 +msgid "Modify system connections" +msgstr "സിസ്റ്റം കണക്ഷനുകളില്‍ മാറ്റം വരുത്തുക" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 +msgid "System policy prevents modification of system settings" +msgstr " സിസ്റ്റത്തിന്റെ സജ്ജീകരണങ്ങളില്‍ മാറ്റം വരുത്തുന്നതു് സിസ്റ്റം പോളിസി തടയുന്നു" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +msgid "System policy prevents modification of the persistent system hostname" +msgstr "സിസ്റ്റത്തിന്റെ ഹോസ്റ്റ്നാമത്തില്‍ മാറ്റം വരുത്തുന്നതു് സിസ്റ്റം പോളിസി തടയുന്നു" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "സുരക്ഷിതമായ ഒരു വൈഫൈ നെറ്റ്‌വര്‍ക്ക് വഴി കണക്ഷനുകള്‍ പങ്കിടുന്നതു് സിസ്റ്റം പോളിസി തടയുന്നു" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "ഒരു തുറന്ന വൈഫൈ നെറ്റ്‌വര്‍ക്ക് വഴി കണക്ഷനുകള്‍ പങ്കിടുന്നതു് സിസ്റ്റം പോളിസി തടയുന്നു" + diff --git a/po/mr.po b/po/mr.po index 97988390dc..33cb1976e8 100644 --- a/po/mr.po +++ b/po/mr.po @@ -1,22 +1,867 @@ -# translation of NetworkManager.master.po to marathi +# translation of mr.po to Marathi # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Sandeep Shedmake , 2009. +# Sandeep Shedmake , 2010. msgid "" msgstr "" -"Project-Id-Version: NetworkManager.master\n" +"Project-Id-Version: mr\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager&component=general\n" -"POT-Creation-Date: 2009-06-08 03:24+0000\n" -"PO-Revision-Date: 2009-06-08 13:08+0530\n" -"Last-Translator: Sandeep Shedmake \n" -"Language-Team: marathi\n" +"POT-Creation-Date: 2010-04-30 03:24+0000\n" +"PO-Revision-Date: 2010-05-10 13:46+0530\n" +"Last-Translator: Sandeep Shedmake \n" +"Language-Team: Marathi \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" "Plural-Forms: nplurals=2; plural=(n!=1);\n" +#: ../cli/src/connections.c:86 +#, c-format +msgid "" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" +msgstr "" +"वापर: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" + +#: ../cli/src/connections.c:158 +msgid "Connections" +msgstr "जोडण्या" + +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/devices.c:298 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "Type" +msgstr "प्रकार" + +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "UUID" +msgstr "UUID" + +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Name" +msgstr "नाव" + +#: ../cli/src/connections.c:163 +#, c-format +msgid "System connections:\n" +msgstr "प्रणाली जोडण्या:\n" + +#: ../cli/src/connections.c:167 +#, c-format +msgid "User connections:\n" +msgstr "वापरकर्ताच्या जोडण्या:\n" + +#: ../cli/src/connections.c:178 ../cli/src/connections.c:967 +#: ../cli/src/connections.c:983 ../cli/src/connections.c:992 +#: ../cli/src/connections.c:1003 ../cli/src/connections.c:1085 +#: ../cli/src/devices.c:604 ../cli/src/devices.c:614 ../cli/src/devices.c:699 +#: ../cli/src/devices.c:785 ../cli/src/devices.c:792 +#, c-format +msgid "Error: %s argument is missing." +msgstr "त्रुटी: %s घटक आढळले नाही." + +#: ../cli/src/connections.c:189 +#, c-format +msgid "Error: %s - no such connection." +msgstr "त्रुटी: %s - याप्रकारची जोडणी आढळली नाही." + +#: ../cli/src/connections.c:196 +msgid "System-wide connections" +msgstr "प्रणाली-भर जोडण्या" + +#: ../cli/src/connections.c:205 +msgid "User connections" +msgstr "वापरकर्त्याची जोडणी" + +#: ../cli/src/connections.c:212 ../cli/src/connections.c:1016 +#: ../cli/src/connections.c:1103 ../cli/src/devices.c:446 +#: ../cli/src/devices.c:494 ../cli/src/devices.c:628 ../cli/src/devices.c:706 +#: ../cli/src/devices.c:798 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "अपरिचीत घटक: %s\n" + +#: ../cli/src/connections.c:221 +#, c-format +msgid "Error: no valid parameter specified." +msgstr "त्रुटी: वैध घटक निर्देशीत नाही." + +#. FIXME: Fix the output +#: ../cli/src/connections.c:268 ../cli/src/devices.c:302 +#: ../cli/src/devices.c:321 ../cli/src/devices.c:353 ../cli/src/devices.c:355 +#: ../cli/src/devices.c:357 ../cli/src/devices.c:359 ../cli/src/devices.c:361 +msgid "yes" +msgstr "होय" + +#: ../cli/src/connections.c:268 ../cli/src/devices.c:304 +msgid "no" +msgstr "नाही" + +#: ../cli/src/connections.c:297 +msgid "Active connections" +msgstr "सक्रिय जोडणी" + +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +#: ../cli/src/devices.c:302 ../cli/src/devices.c:304 +msgid "Default" +msgstr "पूर्वनिर्धारीत" + +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Service" +msgstr "सर्व्हिस्" + +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Devices" +msgstr "साधणे" + +#: ../cli/src/connections.c:659 +#, c-format +msgid "no active connection on device '%s'" +msgstr "साधण '%s' वरील सक्रिय जोडणी आढळली नाही" + +#: ../cli/src/connections.c:667 +#, c-format +msgid "no active connection or device" +msgstr "सक्रिय जोडणी किंवा साधण आढळले नाही" + +#: ../cli/src/connections.c:730 +msgid "activating" +msgstr "सक्रिय करत आहे" + +#: ../cli/src/connections.c:732 +msgid "activated" +msgstr "सक्रिय केले" + +#: ../cli/src/connections.c:735 ../cli/src/connections.c:758 +#: ../cli/src/connections.c:791 ../cli/src/devices.c:111 +#: ../cli/src/network-manager.c:76 ../cli/src/network-manager.c:98 +msgid "unknown" +msgstr "अपरिचीत" + +#: ../cli/src/connections.c:744 +msgid "VPN connecting (prepare)" +msgstr "VPN जोडणी (तयार करा)" + +#: ../cli/src/connections.c:746 +msgid "VPN connecting (need authentication)" +msgstr "VPN जोडणी (ओळख पटवणे आवश्यक आहे)" + +#: ../cli/src/connections.c:748 +msgid "VPN connecting" +msgstr "VPN जोडणी" + +#: ../cli/src/connections.c:750 +msgid "VPN connecting (getting IP configuration)" +msgstr "VPN जोडणी (IP संरचना प्राप्त करत आहे)" + +#: ../cli/src/connections.c:752 +msgid "VPN connected" +msgstr "VPN जोडणी यशस्वी" + +#: ../cli/src/connections.c:754 +msgid "VPN connection failed" +msgstr "VPN जोडणी अपयशी" + +#: ../cli/src/connections.c:756 +msgid "VPN disconnected" +msgstr "VPN जोडणी खंडीत झाली" + +#: ../cli/src/connections.c:767 +msgid "unknown reason" +msgstr "अपरिचीत कारण" + +#: ../cli/src/connections.c:769 +msgid "none" +msgstr "काहिच नाही" + +#: ../cli/src/connections.c:771 +msgid "the user was disconnected" +msgstr "वापरकर्ता खंडीत झाले" + +#: ../cli/src/connections.c:773 +msgid "the base network connection was interrupted" +msgstr "बेस नेटवर्क जोडणी खंडीत झाले" + +#: ../cli/src/connections.c:775 +msgid "the VPN service stopped unexpectedly" +msgstr "VPN सेवा अनपेक्षीतरित्या थांबली" + +#: ../cli/src/connections.c:777 +msgid "the VPN service returned invalid configuration" +msgstr "VPN सेवाने अवैध संरचना रिटर्न केली" + +#: ../cli/src/connections.c:779 +msgid "the connection attempt timed out" +msgstr "जोडणी प्रयत्नाची वेळ समाप्ती आढळली" + +#: ../cli/src/connections.c:781 +msgid "the VPN service did not start in time" +msgstr "VPN सेवा वेळेवर सुरू झाली नाही" + +#: ../cli/src/connections.c:783 +msgid "the VPN service failed to start" +msgstr "VPN सेवा सुरू होण्यास अपयशी" + +#: ../cli/src/connections.c:785 +msgid "no valid VPN secrets" +msgstr "वैध VPN गोपणीयता आढळले नाही" + +#: ../cli/src/connections.c:787 +msgid "invalid VPN secrets" +msgstr "अवैध VPN गोपणीयता" + +#: ../cli/src/connections.c:789 +msgid "the connection was removed" +msgstr "जोडणी काढून टाकली" + +#: ../cli/src/connections.c:803 +#, c-format +msgid "state: %s\n" +msgstr "स्तर: %s\n" + +#: ../cli/src/connections.c:806 ../cli/src/connections.c:832 +#, c-format +msgid "Connection activated\n" +msgstr "जोडणी सक्रिय केली\n" + +#: ../cli/src/connections.c:809 +#, c-format +msgid "Error: Connection activation failed." +msgstr "त्रुटी: जोडणी सक्रिय करण्यास अपयशी." + +#: ../cli/src/connections.c:828 +#, c-format +msgid "state: %s (%d)\n" +msgstr "स्तर: %s (%d)\n" + +#: ../cli/src/connections.c:838 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "त्रुटी: जोडणी सक्रिय करण्यास अपयशी: %s." + +#: ../cli/src/connections.c:855 ../cli/src/devices.c:551 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "त्रुटी: वेळसमाप्ती %d सेकंद समाप्त." + +#: ../cli/src/connections.c:898 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "त्रुटी: जोडणी सक्रिय करण्यास अपयशी: %s" + +#: ../cli/src/connections.c:912 +#, c-format +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "त्रुटी: '%s' करीता सक्रिय जोडणी प्राप्त करण्यास अपयशी." + +#: ../cli/src/connections.c:921 +#, c-format +msgid "Active connection state: %s\n" +msgstr "सक्रिय जोडणीचे स्तर: %s\n" + +#: ../cli/src/connections.c:922 +#, c-format +msgid "Active connection path: %s\n" +msgstr "सक्रिय जोडणीचे मार्ग: %s\n" + +#: ../cli/src/connections.c:976 ../cli/src/connections.c:1094 +#, c-format +msgid "Error: Unknown connection: %s." +msgstr "त्रुटी: अपरिचीत जोडणी: %s." + +#: ../cli/src/connections.c:1011 ../cli/src/devices.c:622 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "त्रुटी: वेळसमाप्तीचे मुल्य '%s' वैध नाही." + +#: ../cli/src/connections.c:1024 ../cli/src/connections.c:1111 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "त्रुटी: id किंवा uuid निर्देशीत करणे आवश्यक आहे." + +#: ../cli/src/connections.c:1044 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "त्रुटी: योग्य साधण आढळले नाही: %s." + +#: ../cli/src/connections.c:1046 +#, c-format +msgid "Error: No suitable device found." +msgstr "त्रुटी: योग्य साधण आढळले नाही." + +#: ../cli/src/connections.c:1138 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "सावधान: जोडणी सक्रिय नाही\n" + +#: ../cli/src/connections.c:1189 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "त्रुटी: 'con' आदेश '%s' वैध नाही." + +#: ../cli/src/connections.c:1216 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "त्रुटी: D-Bus सह जोडणी करणे अशक्य." + +#: ../cli/src/connections.c:1223 +#, c-format +msgid "Error: Could not get system settings." +msgstr "त्रुटी: प्रणालीची संयोजना प्राप्त करणे अशक्य." + +#: ../cli/src/connections.c:1231 +#, c-format +msgid "Error: Could not get user settings." +msgstr "त्रुटी: वापरकर्ताची संयोजना प्राप्त करणे अशक्य." + +#: ../cli/src/connections.c:1241 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "त्रुटी: जोडणी प्राप्त करण्यास अशक्य: सेटिंग्स् सेवा कार्यरत नाही." + +#: ../cli/src/devices.c:73 +#, c-format +msgid "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] | apinfo iface hwaddr ]\n" +"\n" +msgstr "" +"वापर: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] | apinfo iface hwaddr ]\n" +"\n" + +#: ../cli/src/devices.c:93 +msgid "unmanaged" +msgstr "अव्यवस्थापीत" + +#: ../cli/src/devices.c:95 +msgid "unavailable" +msgstr "अनुपल्बध" + +#: ../cli/src/devices.c:97 ../cli/src/network-manager.c:73 +msgid "disconnected" +msgstr "खंडीत" + +#: ../cli/src/devices.c:99 +msgid "connecting (prepare)" +msgstr "जोडणी (तयार करत आहे)" + +#: ../cli/src/devices.c:101 +msgid "connecting (configuring)" +msgstr "जोडणी (संरचीत करत आहे)" + +#: ../cli/src/devices.c:103 +msgid "connecting (need authentication)" +msgstr "जोडणी (ओळख पटवणे आवश्यक आहे)" + +#: ../cli/src/devices.c:105 +msgid "connecting (getting IP configuration)" +msgstr "जोडणी (IP संरचना प्राप्त करत आहे)" + +#: ../cli/src/devices.c:107 ../cli/src/network-manager.c:71 +msgid "connected" +msgstr "जोडणी यशस्वी" + +#: ../cli/src/devices.c:109 +msgid "connection failed" +msgstr "जोडणी अपयशी" + +#: ../cli/src/devices.c:132 ../cli/src/devices.c:876 +msgid "Unknown" +msgstr "अपरिचीत" + +#. print them +#: ../cli/src/devices.c:164 ../cli/src/devices.c:266 ../cli/src/devices.c:861 +#: ../cli/src/devices.c:879 +msgid "(none)" +msgstr "(काहिच नाही)" + +#: ../cli/src/devices.c:209 +#, c-format +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s: IP4 पत्ता 0x%X यांस रूपांतरीत करतेवेळी त्रुटी" + +#: ../cli/src/devices.c:238 +#, c-format +msgid "%s, %s, Freq %d MHz, Rate %d Mb/s, Strength %d" +msgstr "%s, %s, क्रिक %d MHz, रेट %d Mb/s, स्ट्रेंग्थ् %d" + +#: ../cli/src/devices.c:239 +msgid "Ad-Hoc" +msgstr "ऍड-हॉक" + +#: ../cli/src/devices.c:248 +msgid ", Encrypted: " +msgstr ", एनक्रिप्टेड: " + +#: ../cli/src/devices.c:253 +msgid " WEP" +msgstr " WEP" + +#: ../cli/src/devices.c:255 +msgid " WPA" +msgstr " WPA" + +#: ../cli/src/devices.c:257 +msgid " WPA2" +msgstr " WPA2" + +#: ../cli/src/devices.c:260 +msgid " Enterprise" +msgstr " एंटरप्राइज" + +#: ../cli/src/devices.c:294 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "Device" +msgstr "साधण" + +#: ../cli/src/devices.c:299 +msgid "Driver" +msgstr "ड्राइव्हर" + +#: ../cli/src/devices.c:299 ../cli/src/devices.c:567 +msgid "(unknown)" +msgstr "(अपरिचीत)" + +#: ../cli/src/devices.c:300 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "State" +msgstr "स्तर" + +#: ../cli/src/devices.c:313 +msgid "HW Address" +msgstr "HW पत्ता" + +#: ../cli/src/devices.c:319 +#, c-format +msgid "" +"\n" +" Capabilities:\n" +msgstr "" +"\n" +" क्षमता:\n" + +#: ../cli/src/devices.c:321 +msgid "Carrier Detect" +msgstr "कॅरिअर आढळले" + +#: ../cli/src/devices.c:336 +#, c-format +msgid "%u Mb/s" +msgstr "%u Mb/s" + +#: ../cli/src/devices.c:337 +msgid "Speed" +msgstr "गती" + +#: ../cli/src/devices.c:348 +#, c-format +msgid "" +"\n" +" Wireless Properties\n" +msgstr "" +"\n" +" वायरलेस् गुणधर्म\n" + +#: ../cli/src/devices.c:353 +msgid "WEP Encryption" +msgstr "WEP एनक्रिप्शन" + +#: ../cli/src/devices.c:355 +msgid "WPA Encryption" +msgstr "WPA एनक्रिप्शन" + +#: ../cli/src/devices.c:357 +msgid "WPA2 Encryption" +msgstr "WPA2 एनक्रिप्शन" + +#: ../cli/src/devices.c:359 +msgid "TKIP cipher" +msgstr "TKIP सिफर" + +#: ../cli/src/devices.c:361 +msgid "CCMP cipher" +msgstr "CCMP सिफर" + +#: ../cli/src/devices.c:368 +#, c-format +msgid "" +"\n" +" Wireless Access Points %s\n" +msgstr "" +"\n" +" वायरलेस् ऍक्सेस् पॉईंटस् %s\n" + +#: ../cli/src/devices.c:368 +msgid "(* = current AP)" +msgstr "(* = सध्याचे AP)" + +#: ../cli/src/devices.c:374 +#, c-format +msgid "" +"\n" +" Wired Properties\n" +msgstr "" +"\n" +" वायर्ड् गुणधर्म\n" + +#: ../cli/src/devices.c:377 ../cli/src/devices.c:379 +msgid "Carrier" +msgstr "कॅरिअर" + +#: ../cli/src/devices.c:377 +msgid "on" +msgstr "सुरू करा" + +#: ../cli/src/devices.c:379 +msgid "off" +msgstr "बंद करा" + +#: ../cli/src/devices.c:387 +#, c-format +msgid "" +"\n" +" IPv4 Settings:\n" +msgstr "" +"\n" +" IPv4 संरचना:\n" + +#: ../cli/src/devices.c:395 +msgid "Address" +msgstr "पत्ता" + +#: ../cli/src/devices.c:401 +msgid "Prefix" +msgstr "प्रिफिक्स्" + +#: ../cli/src/devices.c:405 +msgid "Gateway" +msgstr "गेटवे" + +#: ../cli/src/devices.c:416 +msgid "DNS" +msgstr "DNS" + +#: ../cli/src/devices.c:458 +msgid "Status of devices" +msgstr "साधणांची स्थिती" + +#: ../cli/src/devices.c:487 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "त्रुटी: '%s' घटक आढळले नाही." + +#: ../cli/src/devices.c:516 ../cli/src/devices.c:655 ../cli/src/devices.c:729 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "त्रुटी: साधण '%s' आढळले नाही." + +#: ../cli/src/devices.c:539 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "यशस्वी: साधण '%s' यशस्वीरित्या खंडीत झाले." + +#: ../cli/src/devices.c:564 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "त्रुटी: साधण '%s' (%s) खंडीत होणे अपयशी झाले: %s" + +#: ../cli/src/devices.c:572 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "साधणाचे स्तर: %d (%s)\n" + +#: ../cli/src/devices.c:636 +#, c-format +msgid "Error: iface has to be specified." +msgstr "त्रुटी: iface निर्देशीत करणे आवश्यक आहे." + +#: ../cli/src/devices.c:736 ../cli/src/devices.c:746 +msgid "WiFi scan list" +msgstr "WiFi स्कॅन सूची" + +#: ../cli/src/devices.c:740 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "त्रुटी: साधण '%s' WiFi साधण नाही." + +#: ../cli/src/devices.c:754 +msgid "Device:" +msgstr "साधण:" + +#: ../cli/src/devices.c:806 +#, c-format +msgid "Error: hwaddr has to be specified." +msgstr "त्रुटी: hwaddr निर्देशीत करणे आवश्यक आहे." + +#: ../cli/src/devices.c:844 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "त्रुटी: ऍक्सेस पॉईंट hwaddr '%s' सह आढळले नाही." + +#: ../cli/src/devices.c:862 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" + +#: ../cli/src/devices.c:863 +#, c-format +msgid "%u MB/s" +msgstr "%u MB/s" + +#: ../cli/src/devices.c:869 ../cli/src/devices.c:871 +msgid "AP parameters" +msgstr "AP घटके" + +#: ../cli/src/devices.c:873 +msgid "SSID:" +msgstr "SSID:" + +#: ../cli/src/devices.c:874 +msgid "BSSID:" +msgstr "BSSID:" + +#: ../cli/src/devices.c:875 +msgid "Frequency:" +msgstr "क्रिक्वेंसी:" + +#: ../cli/src/devices.c:876 +msgid "Mode:" +msgstr "मोड:" + +#: ../cli/src/devices.c:876 +msgid "Ad-hoc" +msgstr "ऍड-हॉक" + +#: ../cli/src/devices.c:876 +msgid "Infrastructure" +msgstr "इंफ्रास्ट्रक्चर" + +#: ../cli/src/devices.c:877 +msgid "Maximal bitrate:" +msgstr "कमाल बिटरेट:" + +#: ../cli/src/devices.c:878 +msgid "Strength:" +msgstr "स्ट्रेंग्थ्:" + +#: ../cli/src/devices.c:879 +msgid "Flags:" +msgstr "फ्लॅग्स्:" + +#: ../cli/src/devices.c:879 +msgid "privacy" +msgstr "गोपणीयता" + +#: ../cli/src/devices.c:880 +msgid "WPA flags:" +msgstr "WPA फ्लॅग्स्:" + +#: ../cli/src/devices.c:881 +msgid "RSN flags:" +msgstr "RSN फ्लॅग्स्:" + +#: ../cli/src/devices.c:907 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "त्रुटी: 'dev wifi' आदेश '%s' वैध नाही." + +#: ../cli/src/devices.c:943 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "त्रुटी: 'dev' आदेश '%s' वैध नाही." + +#: ../cli/src/network-manager.c:46 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" +msgstr "" +"वापर: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + +#: ../cli/src/network-manager.c:67 +msgid "asleep" +msgstr "अस्लीप्" + +#: ../cli/src/network-manager.c:69 +msgid "connecting" +msgstr "जोडणी करत आहे" + +#: ../cli/src/network-manager.c:93 ../cli/src/network-manager.c:94 +#: ../cli/src/network-manager.c:95 ../cli/src/network-manager.c:96 +#: ../cli/src/network-manager.c:143 ../cli/src/network-manager.c:160 +msgid "enabled" +msgstr "सुरू केले" + +#: ../cli/src/network-manager.c:93 ../cli/src/network-manager.c:94 +#: ../cli/src/network-manager.c:95 ../cli/src/network-manager.c:96 +#: ../cli/src/network-manager.c:143 ../cli/src/network-manager.c:160 +msgid "disabled" +msgstr "बंद केले" + +#: ../cli/src/network-manager.c:102 +msgid "NetworkManager status" +msgstr "NetworkManager स्थिती" + +#: ../cli/src/network-manager.c:104 +msgid "NM running:" +msgstr "NM सुरू आहे:" + +#: ../cli/src/network-manager.c:104 +msgid "running" +msgstr "कार्यरत आहे" + +#: ../cli/src/network-manager.c:104 +msgid "not running" +msgstr "कार्यरत नाही" + +#: ../cli/src/network-manager.c:105 +msgid "NM state:" +msgstr "NM स्तर:" + +#: ../cli/src/network-manager.c:106 +msgid "NM wireless hardware:" +msgstr "NM वायरलेस् हार्डवेअर:" + +#. no argument, show current state +#: ../cli/src/network-manager.c:107 ../cli/src/network-manager.c:143 +msgid "NM wireless:" +msgstr "NM वायरलेस्:" + +#: ../cli/src/network-manager.c:108 +msgid "NM WWAN hardware:" +msgstr "NM WWAN हार्डवेअर:" + +#. no argument, show current state +#: ../cli/src/network-manager.c:109 ../cli/src/network-manager.c:160 +msgid "NM WWAN:" +msgstr "NM WWAN:" + +#: ../cli/src/network-manager.c:150 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "त्रुटी: अवैध 'wifi' घटक: '%s'." + +#: ../cli/src/network-manager.c:167 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "त्रुटी: अवैध 'wwan' घटक: '%s'." + +#: ../cli/src/network-manager.c:178 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "त्रुटी: 'nm' आदेश '%s' वैध नाही." + +#: ../cli/src/nmcli.c:65 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"वापर: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" + +#: ../cli/src/nmcli.c:106 +#, c-format +msgid "Object '%s' is unknown, try 'nmcli help'." +msgstr "घटक '%s' अपरिचीत आहे, 'nmcli help' वापरून पहा." + +#: ../cli/src/nmcli.c:139 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "nmcli साधण, आवृत्ती %s\n" + +#: ../cli/src/nmcli.c:145 +#, c-format +msgid "Option '%s' is unknown, try 'nmcli -help'." +msgstr "पर्याय '%s' अपरिचीत आहे, 'nmcli -help' वापरून पहा." + +#: ../cli/src/nmcli.c:164 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "संकेत %d प्राप्त झाले, बंद करत आहे..." + +#: ../cli/src/nmcli.c:189 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "त्रुटी: NetworkManager सह जोडणी करण्यास अशक्य." + +#: ../cli/src/nmcli.c:205 +msgid "Success" +msgstr "यश" + #: ../libnm-util/crypto.c:120 #, c-format msgid "PEM key file had no end tag '%s'." @@ -102,8 +947,9 @@ msgstr "IV साठवण्याकरीता स्मृती शिल msgid "IV contains non-hexadecimal digits." msgstr "IV अंतर्गत non-hexadecimal अंक." -#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:143 -#: ../libnm-util/crypto_nss.c:169 +#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:336 #, c-format msgid "Private key cipher '%s' was unknown." msgstr "वैयक्तिक कि सिफर '%s' अपरिचीत नुरूप आढळले." @@ -123,72 +969,106 @@ msgstr "वैयक्तिक कि प्रकार ओळखणे अ msgid "Not enough memory to store decrypted private key." msgstr "जुणी वैयक्तिक कि साठवण्याकरीता स्मृती शिल्ल्क नाही." -#: ../libnm-util/crypto_gnutls.c:46 +#: ../libnm-util/crypto_gnutls.c:49 msgid "Failed to initialize the crypto engine." msgstr "क्रिप्टो इंजीन प्रारंभ करण्यास अपयशी." -#: ../libnm-util/crypto_gnutls.c:90 +#: ../libnm-util/crypto_gnutls.c:93 #, c-format msgid "Failed to initialize the MD5 engine: %s / %s." msgstr "MD5 इंजीन प्रारंभ करण्यास अपयशी: %s / %s." -#: ../libnm-util/crypto_gnutls.c:152 ../libnm-util/crypto_nss.c:178 +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "अवैध IV लांबी (किमान %zd असायला हवे)." + +#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188 #, c-format msgid "Not enough memory for decrypted key buffer." msgstr "जुणे कि बफर करीता स्मृती शिल्लक नाही." -#: ../libnm-util/crypto_gnutls.c:160 +#: ../libnm-util/crypto_gnutls.c:173 #, c-format msgid "Failed to initialize the decryption cipher context: %s / %s." msgstr "डिक्रीपशन सिफर संदर्भ प्रारंभ करण्यास अपयशी: %s / %s." -#: ../libnm-util/crypto_gnutls.c:169 +#: ../libnm-util/crypto_gnutls.c:182 #, c-format msgid "Failed to set symmetric key for decryption: %s / %s." msgstr "डिक्रीपशन करीता सम कि निश्चित करण्यास अपयशी: %s / %s." -#: ../libnm-util/crypto_gnutls.c:178 +#: ../libnm-util/crypto_gnutls.c:191 #, c-format msgid "Failed to set IV for decryption: %s / %s." msgstr "डिक्रीपशन करीता IV निश्चित करण्यास अपयशी: %s / %s." -#: ../libnm-util/crypto_gnutls.c:187 +#: ../libnm-util/crypto_gnutls.c:200 #, c-format msgid "Failed to decrypt the private key: %s / %s." msgstr "वैयक्तिक कि डिक्रीप्ट करण्यास अपयशी: %s / %s." -#: ../libnm-util/crypto_gnutls.c:200 +#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 +#, c-format +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "प्राइव्हेट कि डिक्रीप्ट करणे अशक्य: अनपेक्षीत पॅडींग लांबी." + +#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 #, c-format msgid "Failed to decrypt the private key." msgstr "वैयक्तिक कि डिक्रीप्ट करण्यास अपयशी." -#: ../libnm-util/crypto_gnutls.c:235 +#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "एनक्रिप्टींग करीता मेमरीचे वाटप करणे अशक्य." + +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "एनक्रिप्शन सीफर संदर्भ सुरू करण्यास अपयशी: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "एनक्रिप्शनकरीता सम कि सेट करण्यास अपयशी: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +msgid "Failed to set IV for encryption: %s / %s." +msgstr "एनक्रिप्शन करीता IV सेट करण्यास अपयशी: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +msgid "Failed to encrypt the data: %s / %s." +msgstr "डिक्रीप्ट करण्यास अपयशी: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:362 #, c-format msgid "Error initializing certificate data: %s" msgstr "प्रमाण माहिती प्रारंभ करण्यास त्रुटी: %s" -#: ../libnm-util/crypto_gnutls.c:257 +#: ../libnm-util/crypto_gnutls.c:384 #, c-format msgid "Couldn't decode certificate: %s" msgstr "प्रमाणपत्र डिकोड करण्यास अशक्य: %s" -#: ../libnm-util/crypto_gnutls.c:281 +#: ../libnm-util/crypto_gnutls.c:408 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %s" msgstr "PKCS#12 डिकोडर प्रारंभ करण्यास अशक्य: %s" -#: ../libnm-util/crypto_gnutls.c:294 +#: ../libnm-util/crypto_gnutls.c:421 #, c-format msgid "Couldn't decode PKCS#12 file: %s" msgstr "PKCS#12 फाइल डिकोड करण्यास अपयशी: %s" -#: ../libnm-util/crypto_gnutls.c:306 +#: ../libnm-util/crypto_gnutls.c:433 #, c-format msgid "Couldn't verify PKCS#12 file: %s" msgstr "PKCS#12 फाइल तपासण्यास अशक्य: %s" -#: ../libnm-util/crypto_nss.c:57 -#: ../system-settings/plugins/ifcfg-rh/crypto.c:52 +#: ../libnm-util/crypto_nss.c:56 #, c-format msgid "Failed to initialize the crypto engine: %d." msgstr "क्रिप्टो इंजीन प्रारंभ करण्यास अपयशी: %d." @@ -198,105 +1078,184 @@ msgstr "क्रिप्टो इंजीन प्रारंभ करण msgid "Failed to initialize the MD5 context: %d." msgstr "MD5 संदर्भ प्रारंभ करण्यास अपयशी: %d." -#: ../libnm-util/crypto_nss.c:186 +#: ../libnm-util/crypto_nss.c:179 +#, c-format +msgid "Invalid IV length (must be at least %d)." +msgstr "अवैध IV लांबी (किमान %d असायला हवे)." + +#: ../libnm-util/crypto_nss.c:196 #, c-format msgid "Failed to initialize the decryption cipher slot." msgstr "डिक्रीपशन सिफर क्षेत्र प्रारंभ करण्यास अपयशी." -#: ../libnm-util/crypto_nss.c:196 +#: ../libnm-util/crypto_nss.c:206 #, c-format msgid "Failed to set symmetric key for decryption." msgstr "डिक्रीपशन करीता सम कि निश्चित करण्यास अपयशी." -#: ../libnm-util/crypto_nss.c:206 +#: ../libnm-util/crypto_nss.c:216 #, c-format msgid "Failed to set IV for decryption." msgstr "डिक्रीपशन करीता IV निश्चित करण्यास अपयशी." -#: ../libnm-util/crypto_nss.c:214 +#: ../libnm-util/crypto_nss.c:224 #, c-format msgid "Failed to initialize the decryption context." msgstr "डिक्रीपशन संदर्भ प्रारंभ करण्यास अपयशी." -#: ../libnm-util/crypto_nss.c:227 +#: ../libnm-util/crypto_nss.c:237 #, c-format msgid "Failed to decrypt the private key: %d." msgstr "वैयक्तिक कि डिक्रीप्ट करण्यास अपयशी: %d." -#: ../libnm-util/crypto_nss.c:239 +#: ../libnm-util/crypto_nss.c:245 +#, c-format +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "प्राइव्हेट कि डिक्रीप्ट करणे अशक्य: डिक्रीप्ट केलेला डाटा खूप मोठा आहे." + +#: ../libnm-util/crypto_nss.c:256 #, c-format msgid "Failed to finalize decryption of the private key: %d." msgstr "वैयक्तिक किचे डिक्रीपशन ठरविण्यास अपयशी: %d." -#: ../libnm-util/crypto_nss.c:284 +#: ../libnm-util/crypto_nss.c:364 +#, c-format +msgid "Failed to initialize the encryption cipher slot." +msgstr "एनक्रिप्शन सीफर स्लॉट सुरू करणे अशक्य." + +#: ../libnm-util/crypto_nss.c:372 +#, c-format +msgid "Failed to set symmetric key for encryption." +msgstr "एनक्रिप्शन करीता सिमेट्रीक कि सेट करण्यास अपयशी." + +#: ../libnm-util/crypto_nss.c:380 +#, c-format +msgid "Failed to set IV for encryption." +msgstr "एनक्रिप्शनसाठी IV सेट करण्यास अपयशी." + +#: ../libnm-util/crypto_nss.c:388 +#, c-format +msgid "Failed to initialize the encryption context." +msgstr "एनक्रिप्शन संदर्भ प्रारंभ करण्यास अपयशी." + +#: ../libnm-util/crypto_nss.c:396 +#, c-format +msgid "Failed to encrypt: %d." +msgstr "एनक्रिप्ट करण्यास अपयशी: %d." + +#: ../libnm-util/crypto_nss.c:404 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "एनक्रिप्टींग नंतर अनपेक्षीत डाटाचे प्रमाण." + +#: ../libnm-util/crypto_nss.c:447 #, c-format msgid "Couldn't decode certificate: %d" msgstr "प्रमाणपत्र डिकोड करणे अशक्य: %d" -#: ../libnm-util/crypto_nss.c:319 +#: ../libnm-util/crypto_nss.c:482 #, c-format msgid "Couldn't convert password to UCS2: %d" msgstr "परवलीचा शब्द UCS2 नुरूप रूपांतरन अशक्य: %d" -#: ../libnm-util/crypto_nss.c:347 +#: ../libnm-util/crypto_nss.c:510 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %d" msgstr "PKCS#12 डिकोडर प्रारंभ करण्यास अशक्य: %d" -#: ../libnm-util/crypto_nss.c:356 +#: ../libnm-util/crypto_nss.c:519 #, c-format msgid "Couldn't decode PKCS#12 file: %d" msgstr "PKCS#12 फाइल डिकोड करण्यास अशक्य: %d" -#: ../libnm-util/crypto_nss.c:365 +#: ../libnm-util/crypto_nss.c:528 #, c-format msgid "Couldn't verify PKCS#12 file: %d" msgstr "PKCS#12 फाइल तपास करण्यास अशक्य: %d" -#: ../src/nm-netlink-monitor.c:194 ../src/nm-netlink-monitor.c:458 +#: ../libnm-util/crypto_nss.c:557 +msgid "Could not generate random data." +msgstr "विनाक्रम डाटा निर्माण करणे अशक्य." + +#: ../libnm-util/nm-utils.c:1924 +#, c-format +msgid "Not enough memory to make encryption key." +msgstr "एनक्रिप्शन कि निर्माण करण्यास अतिरीक्त मेमरी आढळली नाही." + +#: ../libnm-util/nm-utils.c:2034 +msgid "Could not allocate memory for PEM file creation." +msgstr "PEM फाइल निर्माणकरीता मेमरीचे वाटप करणे अशक्य." + +#: ../libnm-util/nm-utils.c:2046 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "IV ला PEM फाइलवर लिहण्यासाठी मेमरीचे वाटप करणे अशक्य." + +#: ../libnm-util/nm-utils.c:2058 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "एनक्रिप्टेड किला PEM फाइलवर लिहण्यासाठी मेमरीचे वाटप करणे अशक्य." + +#: ../libnm-util/nm-utils.c:2077 +#, c-format +msgid "Could not allocate memory for PEM file data." +msgstr "PEM फाइल डाटाकरीता मेमरीचे वाटप करणे अशक्य." + +#: ../src/nm-netlink-monitor.c:100 ../src/nm-netlink-monitor.c:231 +#: ../src/nm-netlink-monitor.c:653 #, c-format msgid "error processing netlink message: %s" msgstr "netlink संदेश विश्लेषीत करतेवेळी त्रुटी: %s" -#: ../src/nm-netlink-monitor.c:255 -#, c-format -msgid "unable to allocate netlink handle for monitoring link status: %s" -msgstr "दुवा स्थिती नियंत्रीत करण्याकरीता netlink handle चे वाटप अशक्य: %s" +#: ../src/nm-netlink-monitor.c:214 +msgid "error occurred while waiting for data on socket" +msgstr "सॉकेट वरील माहिती करीता प्रतिक्षा करतेवेळी त्रुटी आढळली" -#: ../src/nm-netlink-monitor.c:265 +#: ../src/nm-netlink-monitor.c:254 #, c-format msgid "unable to connect to netlink for monitoring link status: %s" msgstr "दुवा स्थिती नियंत्रीत करण्याकरीता netlink शी जुळवणी स्थापीत करणे अशक्य: %s" -#: ../src/nm-netlink-monitor.c:273 +#: ../src/nm-netlink-monitor.c:265 #, c-format -msgid "unable to join netlink group for monitoring link status: %s" -msgstr "दुवा स्थिती नियंत्रीत करण्याकरीता netlink गट शी जुळवणी स्थापीत करणे अशक्य: %s" +msgid "unable to enable netlink handle credential passing: %s" +msgstr "netlink द्वारे परवानगी स्वीकारणे समर्थीत करण्यास अशक्य: %s" -#: ../src/nm-netlink-monitor.c:281 +#: ../src/nm-netlink-monitor.c:291 ../src/nm-netlink-monitor.c:353 +#, c-format +msgid "unable to allocate netlink handle for monitoring link status: %s" +msgstr "दुवा स्थिती नियंत्रीत करण्याकरीता netlink handle चे वाटप अशक्य: %s" + +#: ../src/nm-netlink-monitor.c:376 #, c-format msgid "unable to allocate netlink link cache for monitoring link status: %s" msgstr "दुवा स्थिती नियंत्रीत करण्याकरीता netlink दुवा कॅशे वाटप करणे अशक्य: %s" -#: ../src/nm-netlink-monitor.c:422 +#: ../src/nm-netlink-monitor.c:502 +#, c-format +msgid "unable to join netlink group: %s" +msgstr "netlink गटसह जोडणी करणे अशक्य: %s" + +#: ../src/nm-netlink-monitor.c:629 ../src/nm-netlink-monitor.c:642 #, c-format msgid "error updating link cache: %s" msgstr "दुवा कॅशे अद्ययावत करतेवेळी त्रुटी: %s" -#: ../src/nm-netlink-monitor.c:488 -msgid "error occurred while waiting for data on socket" -msgstr "सॉकेट वरील माहिती करीता प्रतिक्षा करतेवेळी त्रुटी आढळली" - -#: ../src/NetworkManager.c:296 +#: ../src/main.c:502 #, c-format msgid "Invalid option. Please use --help to see a list of valid options.\n" msgstr "अवैध पर्याय. वैध पर्यायची यादी पहाण्याकरीता कृपया --help वापरा.\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:97 +#: ../src/main.c:562 +#, c-format +msgid "%s. Please use --help to see a list of valid options.\n" +msgstr "%s. वैध पर्यायची सूची पहाण्याकरीता कृपया --help वापरा.\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:325 msgid "# Created by NetworkManager\n" msgstr "# NetworkManager द्वारे निर्मीत\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:103 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:341 #, c-format msgid "" "# Merged from %s\n" @@ -305,28 +1264,79 @@ msgstr "" "# %s पासून एकत्रीत केले\n" "\n" -#: ../src/named-manager/nm-named-manager.c:255 +#: ../src/dhcp-manager/nm-dhcp-manager.c:279 +msgid "no usable DHCP client could be found." +msgstr "वापरण्याजोगी DHCP क्लाएंट आढळले नाही." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:288 +msgid "'dhclient' could be found." +msgstr "'dhclient' आढळले नाही." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:298 +msgid "'dhcpcd' could be found." +msgstr "'dhcpcd' आढळले नाही." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:306 +#, c-format +msgid "unsupported DHCP client '%s'" +msgstr "असमर्थीत DHCP क्लाएंट '%s'" + +#: ../src/logging/nm-logging.c:146 +#, c-format +msgid "Unknown log level '%s'" +msgstr "अपरिचीत लॉग स्तर '%s'" + +#: ../src/logging/nm-logging.c:171 +#, c-format +msgid "Unknown log domain '%s'" +msgstr "अपरिचीत लॉग डोमेन '%s'" + +#: ../src/named-manager/nm-named-manager.c:343 msgid "NOTE: the libc resolver may not support more than 3 nameservers." -msgstr "NOTE: libc resolver 3 पेक्षा जास्त nameservers करीता समर्थन पुरवू शकणार नाही." +msgstr "NOTE: libc रिजॉलव्हर 3 पेक्षा जास्त नेमसर्व्हर्स् करीता समर्थन पुरवू शकणार नाही." -#: ../src/named-manager/nm-named-manager.c:257 +#: ../src/named-manager/nm-named-manager.c:345 msgid "The nameservers listed below may not be recognized." -msgstr "खालिल यादीतील nameservers अनोळखी राहतील." +msgstr "खालिल यादीतील नेमसर्व्हर्स् अनोळखी राहतील." -#: ../system-settings/plugins/ifcfg-rh/reader.c:2142 -msgid "System" -msgstr "प्रणाली" - -#: ../system-settings/src/nm-default-wired-connection.c:182 +#: ../src/system-settings/nm-default-wired-connection.c:157 #, c-format msgid "Auto %s" msgstr "स्वयं %s" +#: ../system-settings/plugins/ifcfg-rh/reader.c:3254 +msgid "System" +msgstr "प्रणाली" + #: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "सुरक्षीत WiFi नेटवर्क द्वारे जोडणीचे शेअरींग करा" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "ओपन WiFi नेटवर्क द्वारे कनेक्शन शेअरींग करा" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "पर्सिस्टंट प्रणाली यजमाननाव संपादीत करा" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 msgid "Modify system connections" msgstr "प्रणाली जुळवणी संपादीत करा" -#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 msgid "System policy prevents modification of system settings" msgstr "प्रणाली करार, प्रणाली संयोजना संपादीत करण्यापासून रोखतो" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +msgid "System policy prevents modification of the persistent system hostname" +msgstr "प्रणाली करार पर्सिस्टंट प्रणाली यजमाननावाचे संपादन रोखत आहे" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "प्रणाली करार सुरक्षीत WiFi नेटवर्क द्वारे जोडणीचे शेअरींग रोखत आहे" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "प्रणाली करार ओपन WiFi नेटवर्क द्वारे जोडणीचे शेअरींग रोखत आहे" + diff --git a/po/or.po b/po/or.po index dc124759ad..d9fa2b7198 100644 --- a/po/or.po +++ b/po/or.po @@ -2,85 +2,1164 @@ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # -# Manoj Kumar Giri , 2008. +# Manoj Kumar Giri , 2008, 2010. msgid "" msgstr "" "Project-Id-Version: or\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager&component=general\n" -"POT-Creation-Date: 2008-11-25 21:02+0000\n" -"PO-Revision-Date: 2008-11-26 19:09+0530\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-05-06 14:31+0530\n" +"PO-Revision-Date: 2010-05-07 12:43+0530\n" "Last-Translator: Manoj Kumar Giri \n" -"Language-Team: Oriya\n" +"Language-Team: Oriya \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" -"Plural-Forms: nplurals=2;plural=(n!=1)\n" +"Plural-Forms: nplurals=2; plural=(n!=1);\n" +"\n" +"\n" +"\n" +"\n" -#: ../src/nm-netlink-monitor.c:194 ../src/nm-netlink-monitor.c:454 -#, c-format -msgid "error processing netlink message: %s" -msgstr "netlink ସନ୍ଦେଶ ପଠାଇବାରେ ତ୍ରୁଟି: %s" +#: ../cli/src/connections.c:59 ../cli/src/connections.c:74 +#: ../cli/src/devices.c:85 ../cli/src/devices.c:98 ../cli/src/devices.c:108 +#: ../cli/src/devices.c:118 ../cli/src/devices.c:131 ../cli/src/devices.c:142 +#: ../cli/src/devices.c:152 +msgid "NAME" +msgstr "NAME" -#: ../src/nm-netlink-monitor.c:251 -#, c-format -msgid "unable to allocate netlink handle for monitoring link status: %s" -msgstr "ସଂଯୋଗ ସ୍ଥିତି ଅନ୍ୱେଷଣ କରିବା ପାଇଁ netlink ନିୟନ୍ତ୍ରଣ ଦର୍ଶାଇବାରେ ଅସମର୍ଥ: %s" +#. 0 +#: ../cli/src/connections.c:60 ../cli/src/connections.c:75 +msgid "UUID" +msgstr "UUID" -#: ../src/nm-netlink-monitor.c:261 -#, c-format -msgid "unable to connect to netlink for monitoring link status: %s" -msgstr "ସଂଯୋଗ ସ୍ଥିତି ଅନ୍ୱେଷଣ କରିବା ପାଇଁ netlink ସହିତ ସଂଯୋଗ ହେବାରେ ଅସମର୍ଥ: %s" +#. 1 +#: ../cli/src/connections.c:61 +msgid "DEVICES" +msgstr "DEVICES" -#: ../src/nm-netlink-monitor.c:269 -#, c-format -msgid "unable to join netlink group for monitoring link status: %s" -msgstr "ସଂଯୋଗ ସ୍ଥିତି ଅନ୍ୱେଷଣ କରିବା ପାଇଁ netlink ଶ୍ରେଣୀରେ ମିଶିବାରେ ଅସମର୍ଥ: %s" +#. 2 +#: ../cli/src/connections.c:62 ../cli/src/connections.c:77 +msgid "SCOPE" +msgstr "SCOPE" -#: ../src/nm-netlink-monitor.c:277 -#, c-format -msgid "unable to allocate netlink link cache for monitoring link status: %s" -msgstr "ସଂଯୋଗ ସ୍ଥିତି ଅନ୍ୱେଷଣ କରିବା ପାଇଁ netlink କ୍ୟାଶେ ଦର୍ଶାଇବାରେ ଅସମର୍ଥ: %s" +#. 3 +#: ../cli/src/connections.c:63 +msgid "DEFAULT" +msgstr "DEFAULT" -#: ../src/nm-netlink-monitor.c:418 -#, c-format -msgid "error updating link cache: %s" -msgstr "ସଂଯୋଗ କ୍ୟାଶେ ଅଦ୍ୟତନ କରିବାରେ ତ୍ରୁଟି: %s" +#. 4 +#: ../cli/src/connections.c:64 +msgid "DBUS-SERVICE" +msgstr "DBUS-SERVICE" -#: ../src/nm-netlink-monitor.c:484 -msgid "error occurred while waiting for data on socket" -msgstr "ସକେଟରେ ତଥ୍ୟ ପାଇଁ ଅପେକ୍ଷା କରିବା ସମୟରେ ତ୍ରୁଟି" +#. 5 +#: ../cli/src/connections.c:65 +msgid "SPEC-OBJECT" +msgstr "SPEC-OBJECT" -#: ../src/NetworkManager.c:293 -#, c-format -msgid "Invalid option. Please use --help to see a list of valid options.\n" -msgstr "ଅବୈଧ ବିକଳ୍ପ. ବୈଧ ବିକଳ୍ପର ତାଲିକା ଦେଖିବା ପାଇଁ ଦୟାକରି --ସହାୟତା ବ୍ୟବହାର କରନ୍ତୁ.\n" +#. 6 +#: ../cli/src/connections.c:66 +msgid "VPN" +msgstr "VPN" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:88 -msgid "# Created by NetworkManager\n" -msgstr "# NetworkManager ଦ୍ୱାରା ନିର୍ମିତ\n" +#. 1 +#. 0 +#. 1 +#: ../cli/src/connections.c:76 ../cli/src/devices.c:61 ../cli/src/devices.c:87 +msgid "TYPE" +msgstr "TYPE" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:94 +#. 3 +#: ../cli/src/connections.c:78 +msgid "TIMESTAMP" +msgstr "TIMESTAMP" + +#. 4 +#: ../cli/src/connections.c:79 +msgid "TIMESTAMP-REAL" +msgstr "TIMESTAMP-REAL" + +#. 5 +#: ../cli/src/connections.c:80 +msgid "AUTOCONNECT" +msgstr "AUTOCONNECT" + +#. 6 +#: ../cli/src/connections.c:81 +msgid "READONLY" +msgstr "READONLY" + +#: ../cli/src/connections.c:157 #, c-format msgid "" -"# Merged from %s\n" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" +msgstr "" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" + +#: ../cli/src/connections.c:197 ../cli/src/connections.c:536 +#, c-format +msgid "Error: 'con list': %s" +msgstr "ତ୍ରୁଟି: 'con list': %s" + +#: ../cli/src/connections.c:199 ../cli/src/connections.c:538 +#, c-format +msgid "Error: 'con list': %s; allowed fields: %s" +msgstr "ତ୍ରୁଟି: 'con list': %s; ଅନୁମତିପ୍ରାପ୍ତ କ୍ଷେତ୍ର: %s" + +#: ../cli/src/connections.c:207 +msgid "Connection details" +msgstr "ସଂଯୋଗ ବିବରଣୀ" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "system" +msgstr "ତନ୍ତ୍ର" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "user" +msgstr "ଚାଳକ" + +#: ../cli/src/connections.c:383 +msgid "never" +msgstr "କଦାପି ନୁହଁ" + +#. "CAPABILITIES" +#. Print header +#. "WIFI-PROPERTIES" +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:544 ../cli/src/settings.c:643 +#: ../cli/src/settings.c:912 ../cli/src/settings.c:913 +#: ../cli/src/settings.c:915 ../cli/src/settings.c:917 +#: ../cli/src/settings.c:1042 ../cli/src/settings.c:1043 +#: ../cli/src/settings.c:1044 ../cli/src/settings.c:1123 +#: ../cli/src/settings.c:1124 ../cli/src/settings.c:1125 +#: ../cli/src/settings.c:1126 ../cli/src/settings.c:1127 +#: ../cli/src/settings.c:1128 ../cli/src/settings.c:1129 +#: ../cli/src/settings.c:1130 ../cli/src/settings.c:1131 +#: ../cli/src/settings.c:1132 ../cli/src/settings.c:1133 +#: ../cli/src/settings.c:1134 ../cli/src/settings.c:1135 +#: ../cli/src/settings.c:1210 +msgid "yes" +msgstr "ହଁ" + +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:506 ../cli/src/settings.c:544 +#: ../cli/src/settings.c:643 ../cli/src/settings.c:912 +#: ../cli/src/settings.c:913 ../cli/src/settings.c:915 +#: ../cli/src/settings.c:917 ../cli/src/settings.c:1042 +#: ../cli/src/settings.c:1043 ../cli/src/settings.c:1044 +#: ../cli/src/settings.c:1123 ../cli/src/settings.c:1124 +#: ../cli/src/settings.c:1125 ../cli/src/settings.c:1126 +#: ../cli/src/settings.c:1127 ../cli/src/settings.c:1128 +#: ../cli/src/settings.c:1129 ../cli/src/settings.c:1130 +#: ../cli/src/settings.c:1131 ../cli/src/settings.c:1132 +#: ../cli/src/settings.c:1133 ../cli/src/settings.c:1134 +#: ../cli/src/settings.c:1135 ../cli/src/settings.c:1210 +msgid "no" +msgstr "ନାଁ" + +#: ../cli/src/connections.c:457 ../cli/src/connections.c:500 +msgid "System connections" +msgstr "ତନ୍ତ୍ର ସଂଯୋଗଗୁଡ଼ିକ" + +#: ../cli/src/connections.c:462 ../cli/src/connections.c:513 +msgid "User connections" +msgstr "ଚାଳକ ସଂଯୋଗଗୁଡ଼ିକ" + +#: ../cli/src/connections.c:474 ../cli/src/connections.c:1334 +#: ../cli/src/connections.c:1350 ../cli/src/connections.c:1359 +#: ../cli/src/connections.c:1370 ../cli/src/connections.c:1452 +#: ../cli/src/devices.c:864 ../cli/src/devices.c:874 ../cli/src/devices.c:973 +#: ../cli/src/devices.c:980 +#, c-format +msgid "Error: %s argument is missing." +msgstr "ତ୍ରୁଟି: %s ସ୍ୱତନ୍ତ୍ରଚର ଅନୁପସ୍ଥିତ ଅଛି।" + +#: ../cli/src/connections.c:487 +#, c-format +msgid "Error: %s - no such connection." +msgstr "ତ୍ରୁଟି: %s - ଏପରି କୌଣସି ସଂଯୋଗ ନାହିଁ।" + +#: ../cli/src/connections.c:519 ../cli/src/connections.c:1383 +#: ../cli/src/connections.c:1470 ../cli/src/devices.c:687 +#: ../cli/src/devices.c:754 ../cli/src/devices.c:888 ../cli/src/devices.c:986 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "ଅଜଣା ପ୍ରାଚଳ: %s\n" + +#: ../cli/src/connections.c:528 +#, c-format +msgid "Error: no valid parameter specified." +msgstr "ତ୍ରୁଟି: କୌଣସି ବୈଧ ପ୍ରାଚଳ ଉଲ୍ଲେଖ ହୋଇନାହିଁ।" + +#: ../cli/src/connections.c:543 ../cli/src/connections.c:1572 +#: ../cli/src/devices.c:1192 ../cli/src/network-manager.c:274 +#, c-format +msgid "Error: %s." +msgstr "ତ୍ରୁଟି: %s." + +#: ../cli/src/connections.c:649 +#, c-format +msgid "Error: 'con status': %s" +msgstr "ତ୍ରୁଟି: 'con status': %s" + +#: ../cli/src/connections.c:651 +#, c-format +msgid "Error: 'con status': %s; allowed fields: %s" +msgstr "ତ୍ରୁଟି: 'con status': %s; ଅନୁମତିପ୍ରାପ୍ତ କ୍ଷେତ୍ର: %s" + +#: ../cli/src/connections.c:658 +msgid "Active connections" +msgstr "ସକ୍ରିୟ ସଂଯୋଗଗୁଡ଼ିକ" + +#: ../cli/src/connections.c:1026 +#, c-format +msgid "no active connection on device '%s'" +msgstr "ଉପକରଣ '%s' ରେ କୌଣସି ସକ୍ରିୟ ସଂଯୋଗ ନାହିଁ" + +#: ../cli/src/connections.c:1034 +#, c-format +msgid "no active connection or device" +msgstr "କୌଣସି ସକ୍ରିୟ ସଂଯୋଗ କିମ୍ବା ଉପକରଣ ନାହିଁ" + +#: ../cli/src/connections.c:1084 +#, c-format +msgid "device '%s' not compatible with connection '%s'" +msgstr "ଉପକରଣ '%s' ସଂଯୋଗ '%s' ସହିତ ସୁସଙ୍ଗତ ନୁହଁ" + +#: ../cli/src/connections.c:1086 +#, c-format +msgid "no device found for connection '%s'" +msgstr "ସଂଯୋଗ '%s' ପାଇଁ କୌଣସି ଉପକରଣ ମିଳିଲା ନାହିଁ" + +#: ../cli/src/connections.c:1097 +msgid "activating" +msgstr "ସକ୍ରିୟ କରୁଅଛି" + +#: ../cli/src/connections.c:1099 +msgid "activated" +msgstr "ସକ୍ରିୟ ହୋଇସାରିଛି" + +#: ../cli/src/connections.c:1102 ../cli/src/connections.c:1125 +#: ../cli/src/connections.c:1158 ../cli/src/devices.c:224 +#: ../cli/src/devices.c:514 ../cli/src/network-manager.c:92 +#: ../cli/src/network-manager.c:145 ../cli/src/settings.c:469 +msgid "unknown" +msgstr "ଅଜଣା" + +#: ../cli/src/connections.c:1111 +msgid "VPN connecting (prepare)" +msgstr "VPN ସଂଯୋଗ କରୁଅଛି (ପ୍ରସ୍ତୁତ)" + +#: ../cli/src/connections.c:1113 +msgid "VPN connecting (need authentication)" +msgstr "VPN ସଂଯୋଗ କରୁଅଛି (ବୈଧିକରଣ ଆବଶ୍ୟକ)" + +#: ../cli/src/connections.c:1115 +msgid "VPN connecting" +msgstr "VPN ସଂଯୋଗ କରୁଅଛି" + +#: ../cli/src/connections.c:1117 +msgid "VPN connecting (getting IP configuration)" +msgstr "VPN ସଂଯୋଗ କରୁଅଛି (IP ସଂରଚନା ଗ୍ରହଣ କରୁଅଛି)" + +#: ../cli/src/connections.c:1119 +msgid "VPN connected" +msgstr "VPN ସଂଯୁକ୍ତ ହୋଇଛି" + +#: ../cli/src/connections.c:1121 +msgid "VPN connection failed" +msgstr "VPN ସଂଯୋଗ ବିଫଳ ହୋଇଛି" + +#: ../cli/src/connections.c:1123 +msgid "VPN disconnected" +msgstr "VPN ସଂଯୋଗ ବିଚ୍ଛିନ୍ନ ହୋଇଛି" + +#: ../cli/src/connections.c:1134 +msgid "unknown reason" +msgstr "ଅଜଣା କାରଣ" + +#: ../cli/src/connections.c:1136 +msgid "none" +msgstr "କିଛି ନୁହେଁ" + +#: ../cli/src/connections.c:1138 +msgid "the user was disconnected" +msgstr "ଚାଳକଟି ସଂଯୋଗ ବିଚ୍ଛିନ୍ନ ହୋଇଥିଲା" + +#: ../cli/src/connections.c:1140 +msgid "the base network connection was interrupted" +msgstr "ମୂଳ ନେଟୱର୍କ ସଂଯୋଗଟି ବାଧାପ୍ରାପ୍ତ ହୋଇଥିଲା" + +#: ../cli/src/connections.c:1142 +msgid "the VPN service stopped unexpectedly" +msgstr "VPN ସର୍ଭିସ ଅପ୍ରତ୍ୟାଶିତ ଭାବରେ ବନ୍ଦ ହୋଇଯାଇଛି" + +#: ../cli/src/connections.c:1144 +msgid "the VPN service returned invalid configuration" +msgstr "VPN ସର୍ଭିସ ଅବୈଧ ସଂରଚନା ଫେରାଇଛି" + +#: ../cli/src/connections.c:1146 +msgid "the connection attempt timed out" +msgstr "ସଂଯୋଗ ସମୟ ସମାପ୍ତ ପାଇଁ ଚେଷ୍ଟାକରିଛି" + +#: ../cli/src/connections.c:1148 +msgid "the VPN service did not start in time" +msgstr "VPN ସର୍ଭିସ ଠିକ ସମୟରେ ଆରମ୍ଭ ହୋଇନଥିଲା" + +#: ../cli/src/connections.c:1150 +msgid "the VPN service failed to start" +msgstr "VPN ସର୍ଭିସ ଆରମ୍ଭ ହେବାରେ ବିଫଳ ହୋଇଛି" + +#: ../cli/src/connections.c:1152 +msgid "no valid VPN secrets" +msgstr "କୌଣସି ବୈଧ VPN ଗୁପ୍ତ ତଥ୍ୟ ନାହିଁ" + +#: ../cli/src/connections.c:1154 +msgid "invalid VPN secrets" +msgstr "ଅବୈଧ VPN ଗୁପ୍ତ ତଥ୍ୟଗୁଡ଼ିକ" + +#: ../cli/src/connections.c:1156 +msgid "the connection was removed" +msgstr "ସଂଯୋଗକୁ କଢ଼ାଯାଇଛି" + +#: ../cli/src/connections.c:1170 +#, c-format +msgid "state: %s\n" +msgstr "ଅବସ୍ଥା: %s\n" + +#: ../cli/src/connections.c:1173 ../cli/src/connections.c:1199 +#, c-format +msgid "Connection activated\n" +msgstr "ସଂଯୋଗ ସକ୍ରିୟ ହୋଇଛି\n" + +#: ../cli/src/connections.c:1176 +#, c-format +msgid "Error: Connection activation failed." +msgstr "ତ୍ରୁଟି: ସଂଯୋଗ ସକ୍ରିୟଣ ବିଫଳ ହୋଇଛି।" + +#: ../cli/src/connections.c:1195 +#, c-format +msgid "state: %s (%d)\n" +msgstr "ଅବସ୍ଥା: %s (%d)\n" + +#: ../cli/src/connections.c:1205 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "ତ୍ରୁଟି: ସଂଯୋଗ ସକ୍ରିୟଣ ବିଫଳ ହୋଇଛି: %s." + +#: ../cli/src/connections.c:1222 ../cli/src/devices.c:811 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "ତ୍ରୁଟି: ସମୟ ସମାପ୍ତ %d ସେକଣ୍ଡ ବିତିଯାଇଛି।" + +#: ../cli/src/connections.c:1265 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "ତ୍ରୁଟି: ସଂଯୋଗ ସକ୍ରିୟଣ ବିଫଳ ହୋଇଛି: %s" + +#: ../cli/src/connections.c:1279 +#, c-format +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "ତ୍ରୁଟି: '%s' ପାଇଁ ସକ୍ରିୟ ସଂଯୋଗ ଧାରଣ କରିବାରେ ବିଫଳ ହୋଇଛି।" + +#: ../cli/src/connections.c:1288 +#, c-format +msgid "Active connection state: %s\n" +msgstr "ସକ୍ରିୟ ସଂଯୋଗ ଅବସ୍ଥା: %s\n" + +#: ../cli/src/connections.c:1289 +#, c-format +msgid "Active connection path: %s\n" +msgstr "ସକ୍ରିୟ ସଂଯୋଗ ପଥ: %s\n" + +#: ../cli/src/connections.c:1343 ../cli/src/connections.c:1461 +#, c-format +msgid "Error: Unknown connection: %s." +msgstr "ତ୍ରୁଟି: ଅଜଣା ସଂଯୋଗ: %s." + +#: ../cli/src/connections.c:1378 ../cli/src/devices.c:882 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "ତ୍ରୁଟି: ସମୟ ସମାପ୍ତ ମୂଲ୍ୟ '%s' ଟି ବୈଧ ନୁହଁ।" + +#: ../cli/src/connections.c:1391 ../cli/src/connections.c:1478 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "ତ୍ରୁଟି: id କିମ୍ବା uuid କୁ ଉଲ୍ଲେଖ କରିବା ଉଚିତ।" + +#: ../cli/src/connections.c:1411 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "ତ୍ରୁଟି: କୌଣସି ଉପଯୁକ୍ତ ଉପକରଣ ମିଳିଲାନାହିଁ: %s." + +#: ../cli/src/connections.c:1413 +#, c-format +msgid "Error: No suitable device found." +msgstr "ତ୍ରୁଟି: କୌଣସି ଉପଯୁକ୍ତ ଉପକରଣ ମିଳିଲାନାହିଁ।" + +#: ../cli/src/connections.c:1505 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "ଚେତାବନୀ: ସଂଯୋଗ ସକ୍ରିୟ ନୁହଁ\n" + +#: ../cli/src/connections.c:1561 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "ତ୍ରୁଟି: 'con' ନିର୍ଦ୍ଦେଶ '%s' ଟି ବୈଧ ନୁହଁ।" + +#: ../cli/src/connections.c:1597 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "ତ୍ରୁଟି: D-Bus ସହିତ ସଂଯୁକ୍ତ ହୋଇପାରିଲା ନାହିଁ।" + +#: ../cli/src/connections.c:1604 +#, c-format +msgid "Error: Could not get system settings." +msgstr "ତ୍ରୁଟି: ତନ୍ତ୍ର ସଂରଚନା ପାଇଲା ନାହିଁ।" + +#: ../cli/src/connections.c:1612 +#, c-format +msgid "Error: Could not get user settings." +msgstr "ତ୍ରୁଟି: ଚାଳକ ସଂରଚନା ପାଇଲା ନାହିଁ।" + +#: ../cli/src/connections.c:1622 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "ତ୍ରୁଟି: ସଂଯୋଗ ଧାରଣ କରିପାରିବେ ନାହିଁ: ବିନ୍ୟାସ ସର୍ଭିସଗୁଡ଼ିକ ଚାଲୁନାହିଁ।" + +#. 0 +#. 9 +#: ../cli/src/devices.c:60 ../cli/src/devices.c:86 ../cli/src/devices.c:162 +msgid "DEVICE" +msgstr "DEVICE" + +#. 1 +#. 4 +#. 0 +#: ../cli/src/devices.c:62 ../cli/src/devices.c:90 +#: ../cli/src/network-manager.c:36 +msgid "STATE" +msgstr "STATE" + +#: ../cli/src/devices.c:71 +msgid "GENERAL" +msgstr "GENERAL" + +#. 0 +#: ../cli/src/devices.c:72 +msgid "CAPABILITIES" +msgstr "CAPABILITIES" + +#. 1 +#: ../cli/src/devices.c:73 +msgid "WIFI-PROPERTIES" +msgstr "WIFI-PROPERTIES" + +#. 2 +#: ../cli/src/devices.c:74 +msgid "AP" +msgstr "AP" + +#. 3 +#: ../cli/src/devices.c:75 +msgid "WIRED-PROPERTIES" +msgstr "WIRED-PROPERTIES" + +#. 4 +#: ../cli/src/devices.c:76 +msgid "IP4-SETTINGS" +msgstr "IP4-SETTINGS" + +#. 5 +#: ../cli/src/devices.c:77 +msgid "IP4-DNS" +msgstr "IP4-DNS" + +#. 2 +#: ../cli/src/devices.c:88 +msgid "DRIVER" +msgstr "DRIVER" + +#. 3 +#: ../cli/src/devices.c:89 +msgid "HWADDR" +msgstr "HWADDR" + +#. 0 +#: ../cli/src/devices.c:99 +msgid "CARRIER-DETECT" +msgstr "CARRIER-DETECT" + +#. 1 +#: ../cli/src/devices.c:100 +msgid "SPEED" +msgstr "SPEED" + +#. 0 +#: ../cli/src/devices.c:109 +msgid "CARRIER" +msgstr "CARRIER" + +#. 0 +#: ../cli/src/devices.c:119 +msgid "WEP" +msgstr "WEP" + +#. 1 +#: ../cli/src/devices.c:120 +msgid "WPA" +msgstr "WPA" + +#. 2 +#: ../cli/src/devices.c:121 +msgid "WPA2" +msgstr "WPA2" + +#. 3 +#: ../cli/src/devices.c:122 +msgid "TKIP" +msgstr "TKIP" + +#. 4 +#: ../cli/src/devices.c:123 +msgid "CCMP" +msgstr "CCMP" + +#. 0 +#: ../cli/src/devices.c:132 +msgid "ADDRESS" +msgstr "ADDRESS" + +#. 1 +#: ../cli/src/devices.c:133 +msgid "PREFIX" +msgstr "PREFIX" + +#. 2 +#: ../cli/src/devices.c:134 +msgid "GATEWAY" +msgstr "GATEWAY" + +#. 0 +#: ../cli/src/devices.c:143 +msgid "DNS" +msgstr "DNS" + +#. 0 +#: ../cli/src/devices.c:153 +msgid "SSID" +msgstr "SSID" + +#. 1 +#: ../cli/src/devices.c:154 +msgid "BSSID" +msgstr "BSSID" + +#. 2 +#: ../cli/src/devices.c:155 +msgid "MODE" +msgstr "MODE" + +#. 3 +#: ../cli/src/devices.c:156 +msgid "FREQ" +msgstr "FREQ" + +#. 4 +#: ../cli/src/devices.c:157 +msgid "RATE" +msgstr "RATE" + +#. 5 +#: ../cli/src/devices.c:158 +msgid "SIGNAL" +msgstr "SIGNAL" + +#. 6 +#: ../cli/src/devices.c:159 +msgid "SECURITY" +msgstr "SECURITY" + +#. 7 +#: ../cli/src/devices.c:160 +msgid "WPA-FLAGS" +msgstr "WPA-FLAGS" + +#. 8 +#: ../cli/src/devices.c:161 +msgid "RSN-FLAGS" +msgstr "RSN-FLAGS" + +#. 10 +#: ../cli/src/devices.c:163 +msgid "ACTIVE" +msgstr "ACTIVE" + +#: ../cli/src/devices.c:186 +#, c-format +msgid "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" "\n" msgstr "" -"# %s ରୁ ମିଶ୍ରିତ\n" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" "\n" -#: ../src/named-manager/nm-named-manager.c:256 -msgid "NOTE: the libc resolver may not support more than 3 nameservers." -msgstr "ଟିପ୍ପଣୀ: libc resolver 3 ରୁ ଅଧିକ nameserverଗୁଡ଼ିକୁ ସମର୍ଥନ କରିନପାରେ." +#: ../cli/src/devices.c:206 +msgid "unmanaged" +msgstr "ଅପରିଚାଳିତ" -#: ../src/named-manager/nm-named-manager.c:258 -msgid "The nameservers listed below may not be recognized." -msgstr "ନିମ୍ନରେ ତାଲିକାଭୁକ୍ତ nameserverଗୁଡ଼ିକୁ ଚିହ୍ନି ହୋଇନପାରେ." +#: ../cli/src/devices.c:208 +msgid "unavailable" +msgstr "ଅନୁପଲବ୍ଧ" -#: ../system-settings/src/main.c:376 +#: ../cli/src/devices.c:210 ../cli/src/network-manager.c:89 +msgid "disconnected" +msgstr "ସଂଯୋଗ ବିଚ୍ଛିନ୍ନ ହୋଇଛି" + +#: ../cli/src/devices.c:212 +msgid "connecting (prepare)" +msgstr "ସଂଯୋଗ କରୁଅଛି (ପ୍ରସ୍ତୁତ)" + +#: ../cli/src/devices.c:214 +msgid "connecting (configuring)" +msgstr "ସଂଯୋଗ କରୁଅଛି (ବିନ୍ୟାସ କରୁଅଛି)" + +#: ../cli/src/devices.c:216 +msgid "connecting (need authentication)" +msgstr "ସଂଯୋଗ କରୁଅଛି (ବୈଧିକରଣ ଆବଶ୍ୟକ)" + +#: ../cli/src/devices.c:218 +msgid "connecting (getting IP configuration)" +msgstr "ସଂଯୋଗ କରୁଅଛି (IP ସଂରଚନା ଗ୍ରହଣ କରୁଅଛି)" + +#: ../cli/src/devices.c:220 ../cli/src/network-manager.c:87 +msgid "connected" +msgstr "ସଂଯୋଗ ସ୍ଥାପିତ ହେଲା" + +#: ../cli/src/devices.c:222 +msgid "connection failed" +msgstr "ସଂଯୋଗ ବିଫଳ ହୋଇଛି" + +#: ../cli/src/devices.c:245 ../cli/src/devices.c:380 +msgid "Unknown" +msgstr "ଅଜଣା" + +#: ../cli/src/devices.c:277 +msgid "(none)" +msgstr "(କିଛି ନାହିଁ)" + +#: ../cli/src/devices.c:302 #, c-format -msgid "Auto %s" -msgstr "ସ୍ୱୟଂ %s" +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s: IP4 ଠିକଣା 0x%X କୁ ପରିବର୍ତ୍ତନ କରିବାରେ ତ୍ରୁଟି" + +#: ../cli/src/devices.c:349 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" + +#: ../cli/src/devices.c:350 +#, c-format +msgid "%u MB/s" +msgstr "%u MB/s" + +#: ../cli/src/devices.c:359 +msgid "Encrypted: " +msgstr "ସଂଗୁପ୍ତ: " + +#: ../cli/src/devices.c:364 +msgid "WEP " +msgstr "WEP " + +#: ../cli/src/devices.c:366 +msgid "WPA " +msgstr "WPA " + +#: ../cli/src/devices.c:368 +msgid "WPA2 " +msgstr "WPA2 " + +#: ../cli/src/devices.c:371 +msgid "Enterprise " +msgstr "ବାଣିଜ୍ୟିକ" + +#: ../cli/src/devices.c:380 +msgid "Ad-Hoc" +msgstr "ଏଡ-ହୋକ" + +#: ../cli/src/devices.c:380 +msgid "Infrastructure" +msgstr "ଅବସଂରଚନା" + +#: ../cli/src/devices.c:442 +#, c-format +msgid "Error: 'dev list': %s" +msgstr "ତ୍ରୁଟି: 'dev list': %s" + +#: ../cli/src/devices.c:444 +#, c-format +msgid "Error: 'dev list': %s; allowed fields: %s" +msgstr "ତ୍ରୁଟି: 'dev list': %s; ଅନୁମତିପ୍ରାପ୍ତ କ୍ଷେତ୍ରଗୁଡ଼ିକ: %s" + +#: ../cli/src/devices.c:453 +msgid "Device details" +msgstr "ଉପକରଣ ବିବରଣୀ" + +#: ../cli/src/devices.c:483 ../cli/src/devices.c:827 +msgid "(unknown)" +msgstr "(ଅଜଣା)" + +#: ../cli/src/devices.c:484 +msgid "unknown)" +msgstr "ଅଜଣା)" + +#: ../cli/src/devices.c:510 +#, c-format +msgid "%u Mb/s" +msgstr "%u Mb/s" + +#. Print header +#. "WIRED-PROPERTIES" +#: ../cli/src/devices.c:583 +msgid "on" +msgstr "ଚାଲୁ" + +#: ../cli/src/devices.c:583 +msgid "off" +msgstr "ବନ୍ଦ" + +#: ../cli/src/devices.c:710 +#, c-format +msgid "Error: 'dev status': %s" +msgstr "ତ୍ରୁଟି: 'dev status': %s" + +#: ../cli/src/devices.c:712 +#, c-format +msgid "Error: 'dev status': %s; allowed fields: %s" +msgstr "ତ୍ରୁଟି: 'dev status': %s; ଅନୁମତିପ୍ରାପ୍ତ କ୍ଷେତ୍ରଗୁଡ଼ିକ: %s" + +#: ../cli/src/devices.c:719 +msgid "Status of devices" +msgstr "ଉପକରଣର ସ୍ଥିତି" + +#: ../cli/src/devices.c:747 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "ତ୍ରୁଟି: '%s' ସ୍ୱତନ୍ତ୍ରଚର ଅନୁପସ୍ଥିତ।" + +#: ../cli/src/devices.c:776 ../cli/src/devices.c:915 ../cli/src/devices.c:1035 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "ତ୍ରୁଟି: ଉପକରଣ '%s' ମିଳିଲା ନାହିଁ।" + +#: ../cli/src/devices.c:799 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "ସଫଳ: ଉପକରଣ '%s' ସଫଳତାର ସହିତ ସଂଯୋଗ ବିଚ୍ଛିନ୍ନ ହୋଇଛି।" + +#: ../cli/src/devices.c:824 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "ତ୍ରୁଟି: ଉପକରଣ '%s' (%s) ସଂଯୋଗ ବିଚ୍ଛିନ୍ନ ବିଫଳ ହୋଇଛି: %s" + +#: ../cli/src/devices.c:832 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "ଉପକରଣ ସ୍ଥିତି: %d (%s)\n" + +#: ../cli/src/devices.c:896 +#, c-format +msgid "Error: iface has to be specified." +msgstr "ତ୍ରୁଟି: iface କୁ ଉଲ୍ଲେଖ କରାଯିବା ଉଚିତ।" + +#: ../cli/src/devices.c:1011 +#, c-format +msgid "Error: 'dev wifi': %s" +msgstr "ତ୍ରୁଟି: 'dev wifi': %s" + +#: ../cli/src/devices.c:1013 +#, c-format +msgid "Error: 'dev wifi': %s; allowed fields: %s" +msgstr "ତ୍ରୁଟି: 'dev wifi': %s; ଅନୁମତିପ୍ରାପ୍ତ କ୍ଷେତ୍ରଗୁଡ଼ିକ: %s" + +#: ../cli/src/devices.c:1020 +msgid "WiFi scan list" +msgstr "WiFi କ୍ରମବୀକ୍ଷଣ ତାଲିକା" + +#: ../cli/src/devices.c:1055 ../cli/src/devices.c:1109 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "ତ୍ରୁଟି: hwaddr '%s' ସହିତ ଅଭିଗମ୍ୟତା ବିନ୍ଦୁ ମିଳିଲା ନାହିଁ।" + +#: ../cli/src/devices.c:1072 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "ତ୍ରୁଟି: ଉପକରଣ '%s' ଟି ଗୋଟିଏ WiFi ଉପକରଣ ନୁହଁ।" + +#: ../cli/src/devices.c:1136 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "ତ୍ରୁଟି: 'dev wifi' ନିର୍ଦ୍ଦେଶ '%s' ଟି ବୈଧ ନୁହଁ।" + +#: ../cli/src/devices.c:1183 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "ତ୍ରୁଟି: 'dev' ନିର୍ଦ୍ଦେଶ '%s' ଟି ବୈଧ ନୁହଁ।" + +#: ../cli/src/network-manager.c:35 +msgid "RUNNING" +msgstr "RUNNING" + +#. 1 +#: ../cli/src/network-manager.c:37 +msgid "WIFI-HARDWARE" +msgstr "WIFI-HARDWARE" + +#. 2 +#: ../cli/src/network-manager.c:38 +msgid "WIFI" +msgstr "WIFI" + +#. 3 +#: ../cli/src/network-manager.c:39 +msgid "WWAN-HARDWARE" +msgstr "WWAN-HARDWARE" + +#. 4 +#: ../cli/src/network-manager.c:40 +msgid "WWAN" +msgstr "WWAN" + +#: ../cli/src/network-manager.c:62 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" +msgstr "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + +#: ../cli/src/network-manager.c:83 +msgid "asleep" +msgstr "ଶୁପ୍ତ" + +#: ../cli/src/network-manager.c:85 +msgid "connecting" +msgstr "ସଂଯୋଗ କରୁଅଛି" + +#: ../cli/src/network-manager.c:125 +#, c-format +msgid "Error: 'nm status': %s" +msgstr "ତ୍ରୁଟି: 'nm status': %s" + +#: ../cli/src/network-manager.c:127 +#, c-format +msgid "Error: 'nm status': %s; allowed fields: %s" +msgstr "ତ୍ରୁଟି: 'nm status': %s; ଅନୁମତିପ୍ରାପ୍ତ କ୍ଷେତ୍ରଗୁଡ଼ିକ: %s" + +#: ../cli/src/network-manager.c:134 +msgid "NetworkManager status" +msgstr "NetworkManager ସ୍ଥିତି" + +#. Print header +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "enabled" +msgstr "ସକ୍ରିୟ" + +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "disabled" +msgstr "ନିଷ୍କ୍ରିୟ" + +#: ../cli/src/network-manager.c:148 +msgid "running" +msgstr "ଚାଲୁଅଛି" + +#: ../cli/src/network-manager.c:148 +msgid "not running" +msgstr "ଚାଲୁନାହିଁ" + +#: ../cli/src/network-manager.c:201 ../cli/src/network-manager.c:233 +#, c-format +msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s" +msgstr "ତ୍ରୁଟି: '--fields' ମୂଲ୍ୟ '%s' ଏଠାରେ ବୈଧ ନୁହଁ; ଅନୁମତିପ୍ରାପ୍ତ କ୍ଷେତ୍ରଗୁଡ଼ିକ: %s" + +#: ../cli/src/network-manager.c:209 +msgid "WiFi enabled" +msgstr "WiFi ସକ୍ରିୟ ଅଛି" + +#: ../cli/src/network-manager.c:220 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "ତ୍ରୁଟି: ଅବୈଧ 'wifi' ପ୍ରାଚଳ: '%s'." + +#: ../cli/src/network-manager.c:241 +msgid "WWAN enabled" +msgstr "WWAN ସକ୍ରିୟ ଅଛି" + +#: ../cli/src/network-manager.c:252 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "ତ୍ରୁଟି: ଅବୈଧ 'wwan' ପ୍ରାଚଳ: '%s'." + +#: ../cli/src/network-manager.c:263 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "ତ୍ରୁଟି: 'nm' ନିର୍ଦ୍ଦେଶ '%s' ଟି ବୈଧ ନୁହଁ।" + +#: ../cli/src/nmcli.c:69 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -m[ode] tabular|multiline output mode\n" +" -f[ields] |all|common specify fields to output\n" +" -e[scape] yes|no escape columns separators in " +"values\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -m[ode] tabular|multiline output mode\n" +" -f[ields] |all|common specify fields to output\n" +" -e[scape] yes|no escape columns separators in " +"values\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" + +#: ../cli/src/nmcli.c:113 +#, c-format +msgid "Error: Object '%s' is unknown, try 'nmcli help'." +msgstr "ତ୍ରୁଟି: ବସ୍ତୁ '%s' ଟି ଅଜଣା ଅଟେ, 'nmcli help' କୁ ଚେଷ୍ଟା କରନ୍ତୁ।" + +#: ../cli/src/nmcli.c:143 +#, c-format +msgid "Error: Option '--terse' is specified the second time." +msgstr "ତ୍ରୁଟି: ବିକଳ୍ପ '--terse' କୁ ଦ୍ୱିତୀୟ ଥର ପାଇଁ ଉଲ୍ଲେଖ କରାଯାଇଛି।" + +#: ../cli/src/nmcli.c:148 +#, c-format +msgid "Error: Option '--terse' is mutually exclusive with '--pretty'." +msgstr "ତ୍ରୁଟି: ବିକଳ୍ପ '--terse' ଏବଂ '--pretty' ପରସ୍ପର ଠାରୁ ପୃଥକ।" + +#: ../cli/src/nmcli.c:156 +#, c-format +msgid "Error: Option '--pretty' is specified the second time." +msgstr "ତ୍ରୁଟି: ବିକଳ୍ପ '--pretty' କୁ ଦ୍ୱିତୀୟ ଥର ପାଇଁ ଉଲ୍ଲେଖ କରାଯାଇଛି।" + +#: ../cli/src/nmcli.c:161 +#, c-format +msgid "Error: Option '--pretty' is mutually exclusive with '--terse'." +msgstr "ତ୍ରୁଟି: ବିକଳ୍ପ '--pretty' ଏବଂ '--terse' ପରସ୍ପର ଠାରୁ ପୃଥକ।" + +#: ../cli/src/nmcli.c:171 ../cli/src/nmcli.c:187 +#, c-format +msgid "Error: missing argument for '%s' option." +msgstr "ତ୍ରୁଟି: '%s' ବିକଳ୍ପ ପାଇଁ ସ୍ୱତନ୍ତ୍ରଚର ଅନୁପସ୍ଥିତ ଅଛି।" + +#: ../cli/src/nmcli.c:180 ../cli/src/nmcli.c:196 +#, c-format +msgid "Error: '%s' is not valid argument for '%s' option." +msgstr "ତ୍ରୁଟି: '%s' ଟି '%s' ପାଇଁ ଗୋଟିଏ ବୈଧ ସ୍ୱତନ୍ତ୍ରଚର ନୁହଁ।" + +#: ../cli/src/nmcli.c:203 +#, c-format +msgid "Error: fields for '%s' options are missing." +msgstr "ତ୍ରୁଟି: '%s' ବିକଳ୍ପ ପାଇଁ ସ୍ଥାନ ଅନୁପସ୍ଥିତ।" + +#: ../cli/src/nmcli.c:209 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "nmcli ସାଧନ, ସଂସ୍କରଣ %s\n" + +#: ../cli/src/nmcli.c:215 +#, c-format +msgid "Error: Option '%s' is unknown, try 'nmcli -help'." +msgstr "ତ୍ରୁଟି: ବିକଳ୍ପ '%s' ଟି ଅଜଣା, 'nmcli -help' କୁ ଚେଷ୍ଟାକରନ୍ତୁ।" + +#: ../cli/src/nmcli.c:234 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "ସଂକେତ %d କୁ ଧରିଅଛି, ବନ୍ଦ କରୁଅଛି..." + +#: ../cli/src/nmcli.c:259 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "ତ୍ରୁଟି: NetworkManager ସହିତ ସଂଯୋଗ ସ୍ଥାପନ କରିପାରିଲା ନାହିଁ।" + +#: ../cli/src/nmcli.c:275 +msgid "Success" +msgstr "ସଫଳତା" + +#: ../cli/src/settings.c:407 +#, c-format +msgid "%d (hex-ascii-key)" +msgstr "%d (hex-ascii-key)" + +#: ../cli/src/settings.c:409 +#, c-format +msgid "%d (104/128-bit passphrase)" +msgstr "%d (104/128-ବିଟ ପ୍ରବେଶ ସଂକେତ ବାକ୍ୟାଂଶ)" + +#: ../cli/src/settings.c:412 +#, c-format +msgid "%d (unknown)" +msgstr "%d (ଅଜଣା)" + +#: ../cli/src/settings.c:438 +msgid "0 (unknown)" +msgstr "0 (ଅଜଣା)" + +#: ../cli/src/settings.c:444 +msgid "any, " +msgstr "ଯେକୌଣସି, " + +#: ../cli/src/settings.c:446 +msgid "900 MHz, " +msgstr "900 MHz, " + +#: ../cli/src/settings.c:448 +msgid "1800 MHz, " +msgstr "1800 MHz, " + +#: ../cli/src/settings.c:450 +msgid "1900 MHz, " +msgstr "1900 MHz, " + +#: ../cli/src/settings.c:452 +msgid "850 MHz, " +msgstr "850 MHz, " + +#: ../cli/src/settings.c:454 +msgid "WCDMA 3GPP UMTS 2100 MHz, " +msgstr "WCDMA 3GPP UMTS 2100 MHz, " + +#: ../cli/src/settings.c:456 +msgid "WCDMA 3GPP UMTS 1800 MHz, " +msgstr "WCDMA 3GPP UMTS 1800 MHz, " + +#: ../cli/src/settings.c:458 +msgid "WCDMA 3GPP UMTS 1700/2100 MHz, " +msgstr "WCDMA 3GPP UMTS 1700/2100 MHz, " + +#: ../cli/src/settings.c:460 +msgid "WCDMA 3GPP UMTS 800 MHz, " +msgstr "WCDMA 3GPP UMTS 800 MHz, " + +#: ../cli/src/settings.c:462 +msgid "WCDMA 3GPP UMTS 850 MHz, " +msgstr "WCDMA 3GPP UMTS 850 MHz, " + +#: ../cli/src/settings.c:464 +msgid "WCDMA 3GPP UMTS 900 MHz, " +msgstr "WCDMA 3GPP UMTS 900 MHz, " + +#: ../cli/src/settings.c:466 +msgid "WCDMA 3GPP UMTS 1700 MHz, " +msgstr "WCDMA 3GPP UMTS 1700 MHz, " + +#: ../cli/src/settings.c:546 ../cli/src/settings.c:708 +msgid "auto" +msgstr "ସ୍ୱୟଂଚାଳିତ" + +#: ../cli/src/settings.c:704 ../cli/src/settings.c:707 ../cli/src/utils.c:172 +msgid "not set" +msgstr "ସେଟ ହୋଇନାହିଁ" + +#: ../cli/src/utils.c:124 +#, c-format +msgid "field '%s' has to be alone" +msgstr "କ୍ଷେତ୍ର '%s' ଏକୁଟିଆ ଥିବା ଉଚିତ" + +#: ../cli/src/utils.c:127 +#, c-format +msgid "invalid field '%s'" +msgstr "ଅବୈଧ କ୍ଷେତ୍ର '%s'" + +#: ../cli/src/utils.c:146 +#, c-format +msgid "Option '--terse' requires specifying '--fields'" +msgstr "ବିକଳ୍ପ '--terse' '--fields' କୁ ଉଲ୍ଲେଖ କରିବା ଆବଶ୍ୟକ କରିଥାଏ" + +#: ../cli/src/utils.c:150 +#, c-format +msgid "Option '--terse' requires specific '--fields' option values , not '%s'" +msgstr "ବିକଳ୍ପ '--terse' ନିର୍ଦ୍ଦିଷ୍ଟ '--fields' ବିକଳ୍ପ ମୂଲ୍ୟଗୁଡ଼ିକୁ ଆବଶ୍ୟକ କରିଥାଏ , '%s' କୁ ନୁହଁ" #: ../libnm-util/crypto.c:120 #, c-format @@ -167,8 +1246,9 @@ msgstr "IV କୁ ସଂରକ୍ଷଣ କରିବା ପାଇଁ ଯଥେ msgid "IV contains non-hexadecimal digits." msgstr "IV ଷୋହଳମିକ ସଂଖ୍ୟା ଧାରଣ କରିନଥାଏ." -#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:143 -#: ../libnm-util/crypto_nss.c:169 +#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:336 #, c-format msgid "Private key cipher '%s' was unknown." msgstr "ବ୍ୟକ୍ତିଗତ କି କୁଞ୍ଜି '%s' ଅଜଣା ଥିଲା." @@ -188,71 +1268,106 @@ msgstr "ବ୍ୟକ୍ତିଗତ କି ପ୍ରକାର ନିର୍ଧା msgid "Not enough memory to store decrypted private key." msgstr "ବିକୋଡ଼ନ ବ୍ୟକ୍ତିଗତ ତଥ୍ୟ ସଂରକ୍ଷଣ କରିବା ପାଇଁ ଯଥେଷ୍ଟ ସ୍ଥାନ ନାହିଁ." -#: ../libnm-util/crypto_gnutls.c:46 +#: ../libnm-util/crypto_gnutls.c:49 msgid "Failed to initialize the crypto engine." msgstr "କ୍ରିପ୍ଟ ଯନ୍ତ୍ରକୁ ଆରମ୍ଭ କରିବାରେ ବିଫଳ." -#: ../libnm-util/crypto_gnutls.c:90 +#: ../libnm-util/crypto_gnutls.c:93 #, c-format msgid "Failed to initialize the MD5 engine: %s / %s." msgstr "MD5 ଯନ୍ତ୍ରକୁ ଆରମ୍ଭ କରିବାରେ ବିଫଳ: %s / %s." -#: ../libnm-util/crypto_gnutls.c:152 ../libnm-util/crypto_nss.c:178 +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "ଅବୈଧ IV ଲମ୍ବ (ଅତିକମରେ %zd ହେବା ଉଚିତ)।" + +#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188 #, c-format msgid "Not enough memory for decrypted key buffer." msgstr "କି ବଫରକୁ ବିକୋଡ଼ନ କରିବା ପାଇଁ ଯଥେଷ୍ଟ ସ୍ଥାନ ନାହିଁ." -#: ../libnm-util/crypto_gnutls.c:160 +#: ../libnm-util/crypto_gnutls.c:173 #, c-format msgid "Failed to initialize the decryption cipher context: %s / %s." msgstr "ବିକୋଡ଼ନ କୁଞ୍ଜି ପ୍ରସଙ୍ଗକୁ ଆରମ୍ଭ କରିବାରେ ବିଫଳ: %s / %s." -#: ../libnm-util/crypto_gnutls.c:169 +#: ../libnm-util/crypto_gnutls.c:182 #, c-format msgid "Failed to set symmetric key for decryption: %s / %s." msgstr "ବିକୋଡ଼ନ ପାଇଁ ସମମିତ କି ବିନ୍ୟାସ କରିବାରେ ବିଫଳ: %s / %s." -#: ../libnm-util/crypto_gnutls.c:178 +#: ../libnm-util/crypto_gnutls.c:191 #, c-format msgid "Failed to set IV for decryption: %s / %s." msgstr "ବିକୋଡ଼ନ ପାଇଁ IV ବିନ୍ୟାସ କରିବାରେ ବିଫଳ: %s / %s." -#: ../libnm-util/crypto_gnutls.c:187 +#: ../libnm-util/crypto_gnutls.c:200 #, c-format msgid "Failed to decrypt the private key: %s / %s." msgstr "ବ୍ୟକ୍ତିଗତ କି କୁ ବିକୋଡ଼ନ କରିବାରେ ବିଫଳ: %s / %s." -#: ../libnm-util/crypto_gnutls.c:200 +#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 +#, c-format +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "ବ୍ୟକ୍ତିଗତ କିକୁ ଅବସଂକେତ କରିବାରେ ବିଫଳ: ଅପ୍ରତ୍ୟାଶିତ ପ୍ୟାଡିଙ୍ଗ ଲମ୍ବ।" + +#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 #, c-format msgid "Failed to decrypt the private key." msgstr "ବ୍ୟକ୍ତିଗତ କି କୁ ବିକୋଡ଼ନ କରିବାରେ ବିଫଳ." -#: ../libnm-util/crypto_gnutls.c:235 +#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "ସଂଗୁପ୍ତ କରିବା ପାଇଁ ସ୍ମୃତି ସ୍ଥାନକୁ ବଣ୍ଟନ କରିପାରିଲା ନାହିଁ।" + +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "ବିକୋଡ଼ନ କୁଞ୍ଜି ପ୍ରସଙ୍ଗକୁ ଆରମ୍ଭ କରିବାରେ ବିଫଳ: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "ବିକୋଡ଼ନ ପାଇଁ ସମମିତ କି ବିନ୍ୟାସ କରିବାରେ ବିଫଳ: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +msgid "Failed to set IV for encryption: %s / %s." +msgstr "ବିକୋଡ଼ନ ପାଇଁ IV ବିନ୍ୟାସ କରିବାରେ ବିଫଳ: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +msgid "Failed to encrypt the data: %s / %s." +msgstr "ତଥ୍ୟକୁ ବିକୋଡ଼ନ କରିବାରେ ବିଫଳ: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:362 #, c-format msgid "Error initializing certificate data: %s" msgstr "ପ୍ରମାଣପତ୍ର ତଥ୍ୟକୁ ଆରମ୍ଭ କରିବାରେ ତ୍ରୁଟି: %s" -#: ../libnm-util/crypto_gnutls.c:257 +#: ../libnm-util/crypto_gnutls.c:384 #, c-format msgid "Couldn't decode certificate: %s" msgstr "ପ୍ରମାଣପତ୍ରକୁ ଅବସଂକେତ କରିପାରିଲେ ନାହିଁ: %s" -#: ../libnm-util/crypto_gnutls.c:281 +#: ../libnm-util/crypto_gnutls.c:408 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %s" msgstr "PKCS#12 ଅବସଂକେତକକୁ ଆରମ୍ଭ କରିପାରିଲେ ନାହିଁ: %s" -#: ../libnm-util/crypto_gnutls.c:294 +#: ../libnm-util/crypto_gnutls.c:421 #, c-format msgid "Couldn't decode PKCS#12 file: %s" msgstr "PKCS#12 ଫାଇଲକୁ ଅବସଂକେତ କରିହେବ ନାହିଁ: %s" -#: ../libnm-util/crypto_gnutls.c:306 +#: ../libnm-util/crypto_gnutls.c:433 #, c-format msgid "Couldn't verify PKCS#12 file: %s" msgstr "PKCS#12 ଫାଇଲକୁ ଯାଞ୍ଚ କରିହେଲା ନାହିଁ: %s" -#: ../libnm-util/crypto_nss.c:57 +#: ../libnm-util/crypto_nss.c:56 #, c-format msgid "Failed to initialize the crypto engine: %d." msgstr "କ୍ରିପ୍ଟ ଯନ୍ତ୍ରକୁ ଆରମ୍ଭ କରିବାରେ ବିଫଳ: %d." @@ -262,58 +1377,265 @@ msgstr "କ୍ରିପ୍ଟ ଯନ୍ତ୍ରକୁ ଆରମ୍ଭ କରି msgid "Failed to initialize the MD5 context: %d." msgstr "MD5 ପ୍ରସଙ୍ଗକୁ ଆରମ୍ଭ କରିବାରେ ବିଫଳ: %d." -#: ../libnm-util/crypto_nss.c:186 +#: ../libnm-util/crypto_nss.c:179 +#, c-format +msgid "Invalid IV length (must be at least %d)." +msgstr "ଅବୈଧ IV ଲମ୍ବ (ନିଶ୍ଚିତ ଭାବରେ ଅତିକମରେ %d ହେବା ଉଚିତ)।" + +#: ../libnm-util/crypto_nss.c:196 #, c-format msgid "Failed to initialize the decryption cipher slot." msgstr "ଅବସଂକେତନ କୁଞ୍ଜି ସ୍ଥାନକୁ ଆରମ୍ଭ କରିବାରେ ବିଫଳ." -#: ../libnm-util/crypto_nss.c:196 +#: ../libnm-util/crypto_nss.c:206 #, c-format msgid "Failed to set symmetric key for decryption." msgstr "ଅବସଂକେତନ ପାଇଁ ସମମିତ କିକୁ ବିନ୍ୟାସ କରିବାରେ ବିଫଳ." -#: ../libnm-util/crypto_nss.c:206 +#: ../libnm-util/crypto_nss.c:216 #, c-format msgid "Failed to set IV for decryption." msgstr "ଅବସଂକେତନ ପାଇଁ IV ବିନ୍ୟାସ କରିବାରେ ବିଫଳ." -#: ../libnm-util/crypto_nss.c:214 +#: ../libnm-util/crypto_nss.c:224 #, c-format msgid "Failed to initialize the decryption context." msgstr "ଅବସଂକେତନ ପ୍ରସଙ୍ଗକୁ ଆରମ୍ଭ କରିବାରେ ବିଫଳ." -#: ../libnm-util/crypto_nss.c:227 +#: ../libnm-util/crypto_nss.c:237 #, c-format msgid "Failed to decrypt the private key: %d." msgstr "ବ୍ୟକ୍ତିଗତ କିକୁ ଅବସଂକେତ କରିବାରେ ବିଫଳ: %d." -#: ../libnm-util/crypto_nss.c:239 +#: ../libnm-util/crypto_nss.c:245 +#, c-format +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "ବ୍ୟକ୍ତିଗତ କିକୁ ଅବସଂକେତ କରିବାରେ ବିଫଳ: ଅବସଂକେତ ତଥ୍ୟଟି ଅତ୍ୟଧିକ ବଡ଼।" + +#: ../libnm-util/crypto_nss.c:256 #, c-format msgid "Failed to finalize decryption of the private key: %d." msgstr "ବ୍ୟକ୍ତିଗତ କିର ଅବସଂକେତନକୁ ନିଶ୍ଚୟ କରିବାରେ ବିଫଳ: %d." -#: ../libnm-util/crypto_nss.c:284 +#: ../libnm-util/crypto_nss.c:364 +#, c-format +msgid "Failed to initialize the encryption cipher slot." +msgstr "ଅବସଂକେତନ କୁଞ୍ଜି ସ୍ଥାନକୁ ଆରମ୍ଭ କରିବାରେ ବିଫଳ।" + +#: ../libnm-util/crypto_nss.c:372 +#, c-format +msgid "Failed to set symmetric key for encryption." +msgstr "ଅବସଂକେତନ ପାଇଁ ସମମିତ କିକୁ ବିନ୍ୟାସ କରିବାରେ ବିଫଳ।" + +#: ../libnm-util/crypto_nss.c:380 +#, c-format +msgid "Failed to set IV for encryption." +msgstr "ଅବସଂକେତନ ପାଇଁ IV ବିନ୍ୟାସ କରିବାରେ ବିଫଳ।" + +#: ../libnm-util/crypto_nss.c:388 +#, c-format +msgid "Failed to initialize the encryption context." +msgstr "ଅବସଂକେତନ ପ୍ରସଙ୍ଗକୁ ଆରମ୍ଭ କରିବାରେ ବିଫଳ।" + +#: ../libnm-util/crypto_nss.c:396 +#, c-format +msgid "Failed to encrypt: %d." +msgstr "ଅବସଂକେତ କରିବାରେ ବିଫଳ: %d." + +#: ../libnm-util/crypto_nss.c:404 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "ସଂଗୁପ୍ତ କରିବା ପରେ ଅପ୍ରତ୍ୟଶିତ ପରିମାଣର ତଥ୍ୟ।" + +#: ../libnm-util/crypto_nss.c:447 #, c-format msgid "Couldn't decode certificate: %d" msgstr "ପ୍ରମାଣପତ୍ରକୁ ଅବସଂକେତନ କରିହେଲା ନାହିଁ: %d" -#: ../libnm-util/crypto_nss.c:319 +#: ../libnm-util/crypto_nss.c:482 #, c-format msgid "Couldn't convert password to UCS2: %d" msgstr "ପ୍ରବେଶସଙ୍କେତକୁ UCS2ରେ ପରିବର୍ତ୍ତନ କରିହେଲା ନାହିଁ: %d" -#: ../libnm-util/crypto_nss.c:347 +#: ../libnm-util/crypto_nss.c:510 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %d" msgstr "PKCS#12 ଅବସଂକେତକକୁ ଆରମ୍ଭ କରିହେଲା ନାହିଁ: %d" -#: ../libnm-util/crypto_nss.c:356 +#: ../libnm-util/crypto_nss.c:519 #, c-format msgid "Couldn't decode PKCS#12 file: %d" msgstr "PKCS#12 ଫାଇଲକୁ ଅବସଂକେତନ କରିହେଲା ନାହିଁ: %d" -#: ../libnm-util/crypto_nss.c:365 +#: ../libnm-util/crypto_nss.c:528 #, c-format msgid "Couldn't verify PKCS#12 file: %d" msgstr "PKCS#12 ଫାଇଲକୁ ଯାଞ୍ଚ କରିହେଲାନାହିଁ: %d" +#: ../libnm-util/crypto_nss.c:557 +msgid "Could not generate random data." +msgstr "ମନଇଚ୍ଛା ତଥ୍ୟକୁ ଅବସଂକେତ କରିହେଲା ନାହିଁ।" + +#: ../libnm-util/nm-utils.c:1925 +#, c-format +msgid "Not enough memory to make encryption key." +msgstr "ବିକୋଡ଼ନ କି କୁ ନିର୍ମାଣ କରିବା ପାଇଁ ଯଥେଷ୍ଟ ସ୍ମୃତି ସ୍ଥାନ ନାହିଁ।" + +#: ../libnm-util/nm-utils.c:2035 +msgid "Could not allocate memory for PEM file creation." +msgstr "PEM ଫାଇଲ ନିର୍ମାଣ ପାଇଁ ସ୍ମୃତି ସ୍ଥାନ ବଣ୍ଟନ କରିପାରିଲା ନାହିଁ।" + +#: ../libnm-util/nm-utils.c:2047 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "PEM ଫାଇଲରେ IV ଲେଖିବା ପାଇଁ ସ୍ମୃତି ସ୍ଥାନ ବଣ୍ଟନ କରିପାରିଲା ନାହିଁ।" + +#: ../libnm-util/nm-utils.c:2059 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "PEM ଫାଇଲରେ ସଂଗୁପ୍ତ କି ଲେଖିବା ପାଇଁ ସ୍ମୃତି ସ୍ଥାନ ବଣ୍ଟନ କରିପାରିଲା ନାହିଁ।" + +#: ../libnm-util/nm-utils.c:2078 +#, c-format +msgid "Could not allocate memory for PEM file data." +msgstr "PEM ଫାଇଲ ତଥ୍ୟକୁ ବଣ୍ଟନ କରିପାରିଲା ନାହିଁ।" + +#: ../src/nm-netlink-monitor.c:100 ../src/nm-netlink-monitor.c:231 +#: ../src/nm-netlink-monitor.c:653 +#, c-format +msgid "error processing netlink message: %s" +msgstr "netlink ସନ୍ଦେଶ ପଠାଇବାରେ ତ୍ରୁଟି: %s" + +#: ../src/nm-netlink-monitor.c:214 +msgid "error occurred while waiting for data on socket" +msgstr "ସକେଟରେ ତଥ୍ୟ ପାଇଁ ଅପେକ୍ଷା କରିବା ସମୟରେ ତ୍ରୁଟି" + +#: ../src/nm-netlink-monitor.c:254 +#, c-format +msgid "unable to connect to netlink for monitoring link status: %s" +msgstr "ସଂଯୋଗ ସ୍ଥିତି ଅନ୍ୱେଷଣ କରିବା ପାଇଁ netlink ସହିତ ସଂଯୋଗ ହେବାରେ ଅସମର୍ଥ: %s" + +#: ../src/nm-netlink-monitor.c:265 +#, c-format +msgid "unable to enable netlink handle credential passing: %s" +msgstr "netlink ନିୟନ୍ତ୍ରଣ ଅଧିକାର ପଠାଇବାକୁ ସକ୍ରିୟ କରିବାରେ ଅସମର୍ଥ: %s" + +#: ../src/nm-netlink-monitor.c:291 ../src/nm-netlink-monitor.c:353 +#, c-format +msgid "unable to allocate netlink handle for monitoring link status: %s" +msgstr "ସଂଯୋଗ ସ୍ଥିତି ଅନ୍ୱେଷଣ କରିବା ପାଇଁ netlink ନିୟନ୍ତ୍ରଣ ଦର୍ଶାଇବାରେ ଅସମର୍ଥ: %s" + +#: ../src/nm-netlink-monitor.c:376 +#, c-format +msgid "unable to allocate netlink link cache for monitoring link status: %s" +msgstr "ସଂଯୋଗ ସ୍ଥିତି ଅନ୍ୱେଷଣ କରିବା ପାଇଁ netlink କ୍ୟାଶେ ଦର୍ଶାଇବାରେ ଅସମର୍ଥ: %s" + +#: ../src/nm-netlink-monitor.c:502 +#, c-format +msgid "unable to join netlink group: %s" +msgstr "netlink ଶ୍ରେଣୀରେ ମିଶିବାରେ ଅସମର୍ଥ: %s" + +#: ../src/nm-netlink-monitor.c:629 ../src/nm-netlink-monitor.c:642 +#, c-format +msgid "error updating link cache: %s" +msgstr "ସଂଯୋଗ କ୍ୟାଶେ ଅଦ୍ୟତନ କରିବାରେ ତ୍ରୁଟି: %s" + +#: ../src/main.c:502 +#, c-format +msgid "Invalid option. Please use --help to see a list of valid options.\n" +msgstr "ଅବୈଧ ବିକଳ୍ପ. ବୈଧ ବିକଳ୍ପର ତାଲିକା ଦେଖିବା ପାଇଁ ଦୟାକରି --ସହାୟତା ବ୍ୟବହାର କରନ୍ତୁ.\n" + +#: ../src/main.c:562 +#, c-format +msgid "%s. Please use --help to see a list of valid options.\n" +msgstr "%s. ବୈଧ ବିକଳ୍ପର ତାଲିକା ଦେଖିବା ପାଇଁ ଦୟାକରି --help ବ୍ୟବହାର କରନ୍ତୁ।\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:325 +msgid "# Created by NetworkManager\n" +msgstr "# NetworkManager ଦ୍ୱାରା ନିର୍ମିତ\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:341 +#, c-format +msgid "" +"# Merged from %s\n" +"\n" +msgstr "" +"# %s ରୁ ମିଶ୍ରିତ\n" +"\n" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:279 +msgid "no usable DHCP client could be found." +msgstr "କୌଣସି ଉପଯୋଗୀ DHCP କ୍ଲାଏଣ୍ଟ ମିଳିଲା ନାହିଁ।" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:288 +msgid "'dhclient' could be found." +msgstr "'dhclient' ମିଳି ପାରିଲା।" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:298 +msgid "'dhcpcd' could be found." +msgstr "'dhcpcd' ମିଳିପାରିଲା।" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:306 +#, c-format +msgid "unsupported DHCP client '%s'" +msgstr "ଅସମର୍ଥିତ DHCP କ୍ଲାଏଣ୍ଟ '%s'" + +#: ../src/logging/nm-logging.c:146 +#, c-format +msgid "Unknown log level '%s'" +msgstr "ଅଜ୍ଞାତ ଲଗ ସ୍ତର '%s'" + +#: ../src/logging/nm-logging.c:171 +#, c-format +msgid "Unknown log domain '%s'" +msgstr "ଅଜ୍ଞାତ ଲଗ ଡମେନ '%s'" + +#: ../src/named-manager/nm-named-manager.c:343 +msgid "NOTE: the libc resolver may not support more than 3 nameservers." +msgstr "ଟିପ୍ପଣୀ: libc resolver 3 ରୁ ଅଧିକ nameserverଗୁଡ଼ିକୁ ସମର୍ଥନ କରିନପାରେ." + +#: ../src/named-manager/nm-named-manager.c:345 +msgid "The nameservers listed below may not be recognized." +msgstr "ନିମ୍ନରେ ତାଲିକାଭୁକ୍ତ nameserverଗୁଡ଼ିକୁ ଚିହ୍ନି ହୋଇନପାରେ." + +#: ../src/system-settings/nm-default-wired-connection.c:157 +#, c-format +msgid "Auto %s" +msgstr "ସ୍ୱୟଂ %s" + +#: ../system-settings/plugins/ifcfg-rh/reader.c:3256 +msgid "System" +msgstr "ତନ୍ତ୍ର" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "ଗୋଟିଏ ସୁରକ୍ଷିତ WiFi ନେଟୱର୍କରେ ସଂଯୋଗ ସହଭାଗ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "ଗୋଟିଏ ଖୋଲା WiFi ନେଟୱର୍କରେ ସଂଯୋଗ ସହଭାଗ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "ସ୍ଥାୟୀ ତନ୍ତ୍ର ହୋଷ୍ଟନାମକୁ ପରିବର୍ତ୍ତନ କରନ୍ତୁ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 +msgid "Modify system connections" +msgstr "ତନ୍ତ୍ର ସଂଯୋଗଗୁଡ଼ିକୁ ପରିବର୍ତ୍ତନ କରନ୍ତୁ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 +msgid "System policy prevents modification of system settings" +msgstr "ତନ୍ତ୍ର ନିତୀ ତନ୍ତ୍ର ବିନ୍ୟାସ ପରିବର୍ତ୍ତନକୁ ବାରଣ କରିଥାଏ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +msgid "System policy prevents modification of the persistent system hostname" +msgstr "ତନ୍ତ୍ର ନିତୀ ସ୍ଥାୟୀ ତନ୍ତ୍ର ହୋଷ୍ଟନାମର ପରିବର୍ତ୍ତନକୁ ବାରଣ କରିଥାଏ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "ତନ୍ତ୍ର ନିତୀ ଗୋଟିଏ ସୁରକ୍ଷିତ WiFi ନେଟୱର୍କରେ ସଂଯୋଗ ସହଭାଗ କରିବାରେ ବାରଣ କରିଥାଏ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "ତନ୍ତ୍ର ନିତୀ ଗୋଟିଏ ଖୋଲା WiFi ନେଟୱର୍କରେ ସଂଯୋଗ ସହଭାଗ କରିବାରେ ବାରଣ କରିଥାଏ" + diff --git a/po/pa.po b/po/pa.po index 859ec9f758..90b36c5aee 100644 --- a/po/pa.po +++ b/po/pa.po @@ -5,220 +5,1896 @@ # Amanpreet Singh Alam , 2004. # Amanpreet Singh Alam , 2005. # A S Alam , 2007. +# Jaswinder Singh , 2010. msgid "" msgstr "" "Project-Id-Version: NetworkManager.HEAD\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-02-03 18:35+0000\n" -"PO-Revision-Date: 2007-02-04 08:37+0530\n" -"Last-Translator: A S Alam \n" -"Language-Team: Punjabi \n" +"POT-Creation-Date: 2010-05-06 14:31+0530\n" +"PO-Revision-Date: 2010-05-07 10:40+0530\n" +"Last-Translator: Jaswinder Singh \n" +"Language-Team: Punjabi/Panjabi \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 1.11.4\n" +"X-Generator: Lokalize 1.0\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "\n" -#: ../gnome/vpn-properties/nm-vpn-properties.c:417 -msgid "Cannot add VPN connection" -msgstr "VPN ਕੁਨੈਕਸ਼ਨ ਜੋੜਿਆ ਨਹੀਂ ਜਾ ਸਕਦਾ ਹੈ" +#: ../cli/src/connections.c:59 ../cli/src/connections.c:74 +#: ../cli/src/devices.c:85 ../cli/src/devices.c:98 ../cli/src/devices.c:108 +#: ../cli/src/devices.c:118 ../cli/src/devices.c:131 ../cli/src/devices.c:142 +#: ../cli/src/devices.c:152 +msgid "NAME" +msgstr "NAME" -#: ../gnome/vpn-properties/nm-vpn-properties.c:419 -msgid "" -"No suitable VPN software was found on your system. Contact your system " -"administrator." -msgstr "" -"ਤੁਹਾਡੇ ਸਿਸਟਮ ਉੱਤੇ ਕੋਈ ਠੀਕ VPN ਸਾਫਟਵੇਅਰ ਨਹੀਂ ਲੱਭਾ ਹੈ। ਆਪਣੇ ਸਿਸਟਮ " -"ਪਰਸ਼ਾਸ਼ਕ ਨਾਲ ਸੰਪਰਕ ਕਰੋ।" +#. 0 +#: ../cli/src/connections.c:60 ../cli/src/connections.c:75 +msgid "UUID" +msgstr "UUID" -#: ../gnome/vpn-properties/nm-vpn-properties.c:461 -msgid "Cannot import VPN connection" -msgstr "VPN ਕੁਨੈਕਸ਼ਨ ਆਯਾਤ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਦਾ" +#. 1 +#: ../cli/src/connections.c:61 +msgid "DEVICES" +msgstr "DEVICES" -#: ../gnome/vpn-properties/nm-vpn-properties.c:463 +#. 2 +#: ../cli/src/connections.c:62 ../cli/src/connections.c:77 +msgid "SCOPE" +msgstr "SCOPE" + +#. 3 +#: ../cli/src/connections.c:63 +msgid "DEFAULT" +msgstr "DEFAULT" + +#. 4 +#: ../cli/src/connections.c:64 +msgid "DBUS-SERVICE" +msgstr "DBUS-SERVICE" + +#. 5 +#: ../cli/src/connections.c:65 +msgid "SPEC-OBJECT" +msgstr "SPEC-OBJECT" + +#. 6 +#: ../cli/src/connections.c:66 +msgid "VPN" +msgstr "VPN" + +#. 1 +#. 0 +#. 1 +#: ../cli/src/connections.c:76 ../cli/src/devices.c:61 ../cli/src/devices.c:87 +msgid "TYPE" +msgstr "TYPE" + +#. 3 +#: ../cli/src/connections.c:78 +msgid "TIMESTAMP" +msgstr "TIMESTAMP" + +#. 4 +#: ../cli/src/connections.c:79 +msgid "TIMESTAMP-REAL" +msgstr "TIMESTAMP-REAL" + +#. 5 +#: ../cli/src/connections.c:80 +msgid "AUTOCONNECT" +msgstr "AUTOCONNECT" + +#. 6 +#: ../cli/src/connections.c:81 +msgid "READONLY" +msgstr "READONLY" + +#: ../cli/src/connections.c:157 #, c-format msgid "" -"Cannot find suitable software for VPN connection type '%s' to import the " -"file '%s'. Contact your system administrator." +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" msgstr "" -"VPN ਕੁਨੈਕਸ਼ਨ ਕਿਸਮ '%s' ਲਈ ਫਾਇਲ '%s' ਆਯਾਤ ਕਰਨ ਲਈ ਕੋਈ ਢੁੱਕਵਾਂ " -"ਸਾਫਟਵੇਅਰ ਨਹੀਂ ਲੱਭਿਆ ਹੈ। ਆਪਣੇ ਸਿਸਟਮ ਪਰਸ਼ਾਸ਼ਕ ਨਾਲ ਸੰਪਰਕ ਕਰੋ।" +"ਵਰਤੋਂ: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" -#: ../gnome/vpn-properties/nm-vpn-properties.c:580 +#: ../cli/src/connections.c:197 ../cli/src/connections.c:536 #, c-format -msgid "Error retrieving VPN connection '%s'" -msgstr "VPN ਕੁਨੈਕਸ਼ਨ '%s' ਲੈਣ ਦੌਰਾਨ ਗਲਤੀ" +msgid "Error: 'con list': %s" +msgstr "Error: 'con list': %s" -#: ../gnome/vpn-properties/nm-vpn-properties.c:583 +#: ../cli/src/connections.c:199 ../cli/src/connections.c:538 #, c-format -msgid "" -"Could not find the UI files for VPN connection type '%s'. Contact your " -"system administrator." -msgstr "" -"VPN ਕੁਨੈਕਸ਼ਨ ਕਿਸਮ '%s' ਲਈ UI ਫਾਇਲਾਂ ਨਹੀਂ ਲੱਭੀਆਂ ਹਨ। ਆਪਣੇ ਸਿਸਟਮ " -"ਪਰਸ਼ਾਸ਼ਕ ਨਾਲ ਸੰਪਰਕ ਕਰੋ।" +msgid "Error: 'con list': %s; allowed fields: %s" +msgstr "Error: 'con list': %s; allowed fields: %s" -#: ../gnome/vpn-properties/nm-vpn-properties.c:727 +#: ../cli/src/connections.c:207 +msgid "Connection details" +msgstr "ਕੁਨੈਕਸ਼ਨ ਵੇਰਵਾ" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "system" +msgstr "ਸਿਸਟਮ" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "user" +msgstr "ਯੂਜ਼ਰ" + +#: ../cli/src/connections.c:383 +msgid "never" +msgstr "ਕਦੇ ਨਹੀਂ" + +#. "CAPABILITIES" +#. Print header +#. "WIFI-PROPERTIES" +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:544 ../cli/src/settings.c:643 +#: ../cli/src/settings.c:912 ../cli/src/settings.c:913 +#: ../cli/src/settings.c:915 ../cli/src/settings.c:917 +#: ../cli/src/settings.c:1042 ../cli/src/settings.c:1043 +#: ../cli/src/settings.c:1044 ../cli/src/settings.c:1123 +#: ../cli/src/settings.c:1124 ../cli/src/settings.c:1125 +#: ../cli/src/settings.c:1126 ../cli/src/settings.c:1127 +#: ../cli/src/settings.c:1128 ../cli/src/settings.c:1129 +#: ../cli/src/settings.c:1130 ../cli/src/settings.c:1131 +#: ../cli/src/settings.c:1132 ../cli/src/settings.c:1133 +#: ../cli/src/settings.c:1134 ../cli/src/settings.c:1135 +#: ../cli/src/settings.c:1210 +msgid "yes" +msgstr "ਹਾਂ" + +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:506 ../cli/src/settings.c:544 +#: ../cli/src/settings.c:643 ../cli/src/settings.c:912 +#: ../cli/src/settings.c:913 ../cli/src/settings.c:915 +#: ../cli/src/settings.c:917 ../cli/src/settings.c:1042 +#: ../cli/src/settings.c:1043 ../cli/src/settings.c:1044 +#: ../cli/src/settings.c:1123 ../cli/src/settings.c:1124 +#: ../cli/src/settings.c:1125 ../cli/src/settings.c:1126 +#: ../cli/src/settings.c:1127 ../cli/src/settings.c:1128 +#: ../cli/src/settings.c:1129 ../cli/src/settings.c:1130 +#: ../cli/src/settings.c:1131 ../cli/src/settings.c:1132 +#: ../cli/src/settings.c:1133 ../cli/src/settings.c:1134 +#: ../cli/src/settings.c:1135 ../cli/src/settings.c:1210 +msgid "no" +msgstr "ਨਹੀਂ" + +#: ../cli/src/connections.c:457 ../cli/src/connections.c:500 +msgid "System connections" +msgstr "ਸਿਸਟਮ ਕੁਨੈਕਸ਼ਨ" + +#: ../cli/src/connections.c:462 ../cli/src/connections.c:513 +msgid "User connections" +msgstr "ਯੂਜ਼ਰ ਕੁਨੈਕਸ਼ਨ" + +#: ../cli/src/connections.c:474 ../cli/src/connections.c:1334 +#: ../cli/src/connections.c:1350 ../cli/src/connections.c:1359 +#: ../cli/src/connections.c:1370 ../cli/src/connections.c:1452 +#: ../cli/src/devices.c:864 ../cli/src/devices.c:874 ../cli/src/devices.c:973 +#: ../cli/src/devices.c:980 #, c-format -msgid "Delete VPN connection \"%s\"?" -msgstr "ਕੀ VPN \"%s\" ਕੁਨੈਕਸ਼ਨ ਹਟਾਉਣਾ ਹੈ?" +msgid "Error: %s argument is missing." +msgstr "ਗਲਤੀ: %s ਆਰਗੂਮੈਂਟ ਮੌਜੂਦ ਨਹੀਂ ਹੈ।" -#: ../gnome/vpn-properties/nm-vpn-properties.c:730 +#: ../cli/src/connections.c:487 #, c-format -msgid "" -"All information about the VPN connection \"%s\" will be lost and you may " -"need your system administrator to provide information to create a new " -"connection." -msgstr "" -"VPN ਕੁਨੈਕਸ਼ਨ \"%s\" ਬਾਰੇ ਸਭ ਜਾਣਕਾਰੀ ਖਤਮ ਹੋ ਗਈ ਹੈ ਅਤੇ ਤੁਹਾਨੂੰ " -"ਨਵੇਂ ਕੁਨੈਕਸ਼ਨ ਬਣਾਉਣ ਲਈ ਜਾਣਕਾਰੀ ਵਾਸਤੇ ਆਪਣੇ ਸਿਸਟਮ ਪਰਸ਼ਾਸ਼ਕ " -"ਨਾਲ ਸੰਪਰਕ ਕਰਨਾ ਪਵੇਗਾ।" +msgid "Error: %s - no such connection." +msgstr "ਗਲਤੀ: %s - ਇੰਝ ਦਾ ਕੋਈ ਕੁਨੈਕਸ਼ਨ ਨਹੀਂ ਹੈ" -#: ../gnome/vpn-properties/nm-vpn-properties.c:924 -msgid "Unable to load" -msgstr "ਲੋਡ ਕਰਨ ਲਈ ਫੇਲ੍ਹ" +#: ../cli/src/connections.c:519 ../cli/src/connections.c:1383 +#: ../cli/src/connections.c:1470 ../cli/src/devices.c:687 +#: ../cli/src/devices.c:754 ../cli/src/devices.c:888 ../cli/src/devices.c:986 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "ਅਣਜਾਣ ਪੈਰਾਮੀਟਰ: %s\n" -#: ../gnome/vpn-properties/nm-vpn-properties.c:926 -msgid "Cannot find some needed resources (the glade file)!" -msgstr "ਕੁਝ ਲੋੜੀਦੇ ਸਰੋਤ ਨਹੀਂ ਮਿਲੇ (ਗਲੇਡ ਫਾਇਲ)!" +#: ../cli/src/connections.c:528 +#, c-format +msgid "Error: no valid parameter specified." +msgstr "ਗਲਤੀ: ਕੋਈ ਢੁੱਕਵਾਂ ਪੈਰਾਮੀਟਰ ਨਹੀਂ ਦਿੱਤਾ।" -#. druid_window = GTK_DIALOG (gtk_dialog_new_with_buttons (_("Create VPN Connection"), -#. NULL, -#. GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, -#. GTK_STOCK_CANCEL, -#. GTK_RESPONSE_REJECT, -#. GTK_STOCK_APPLY, -#. GTK_RESPONSE_ACCEPT, -#. NULL)); -#: ../gnome/vpn-properties/nm-vpn-properties.c:1081 -msgid "Create VPN Connection" -msgstr "VPN ਕੁਨੈਕਸ਼ਨ ਬਣਾਓ" +#: ../cli/src/connections.c:543 ../cli/src/connections.c:1572 +#: ../cli/src/devices.c:1192 ../cli/src/network-manager.c:274 +#, c-format +msgid "Error: %s." +msgstr "ਗਲਤੀ: %s." -#. gtk_container_add (GTK_CONTAINER (druid_window->vbox), GTK_WIDGET(gtk_label_new("Some label"))); -#. gtk_box_pack_start (GTK_BOX (druid_window->vbox), GTK_WIDGET(druid), TRUE,TRUE,0); -#. gtk_box_pack_start (GTK_BOX (druid_window->vbox), GTK_WIDGET(gtk_label_new("Some label")), TRUE,TRUE,0); -#. toplevel = gtk_widget_get_toplevel (GTK_WIDGET (druid)); -#. gtk_signal_connect (GTK_OBJECT (toplevel), "delete_event", GTK_SIGNAL_FUNC (vpn_window_close), NULL); -#. make the druid window modal wrt. our main window -#. gtk_window_set_modal (druid_window, TRUE); -#. gtk_window_set_transient_for (GTK_WINDOW(druid_window), GTK_WINDOW (dialog)); -#. Edit dialog -#: ../gnome/vpn-properties/nm-vpn-properties.c:1099 -msgid "Edit VPN Connection" -msgstr "VPN ਕੁਨੈਕਸ਼ਨ ਸੋਧ" +#: ../cli/src/connections.c:649 +#, c-format +msgid "Error: 'con status': %s" +msgstr "Error: 'con status': %s" -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:1 -msgid "Add a new VPN connection" -msgstr "ਇੱਕ ਨਵਾਂ VPN ਕੁਨੈਕਸ਼ਨ ਸ਼ਾਮਿਲ" +#: ../cli/src/connections.c:651 +#, c-format +msgid "Error: 'con status': %s; allowed fields: %s" +msgstr "Error: 'con status': %s; allowed fields: %s" -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:2 -msgid "Delete the selected VPN connection" -msgstr "ਚੁਣਿਆ VPN ਕੁਨੈਕਸ਼ਨ ਹਟਾਓ" +#: ../cli/src/connections.c:658 +msgid "Active connections" +msgstr "ਚਾਲੂ ਕੁਨੈਕਸ਼ਨ" -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:3 -msgid "E_xport" -msgstr "ਨਿਰਯਾਤ(_x)" +#: ../cli/src/connections.c:1026 +#, c-format +msgid "no active connection on device '%s'" +msgstr "ਜੰਤਰ '%s' ਉੱਤੇ ਕੋਈ ਚਾਲੂ ਕੁਨੈਕਸ਼ਨ ਨਹੀਂ ਹੈ" -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:4 -msgid "Edit the selected VPN connection" -msgstr "ਚੁਣੇ VPN ਕੁਨੈਕਸ਼ਨ 'ਚ ਸੋਧ" +#: ../cli/src/connections.c:1034 +#, c-format +msgid "no active connection or device" +msgstr "ਕੋਈ ਚਾਲੂ ਕੁਨੈਕਸ਼ਨ ਜਾਂ ਜੰਤਰ ਨਹੀਂ ਹੈ" -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:5 -msgid "Export the VPN settings to a file" -msgstr "VPN ਸੈਟਿੰਗ ਨੂੰ ਫਾਇਲ 'ਚ ਭੇਜੋ" +#: ../cli/src/connections.c:1084 +#, c-format +msgid "device '%s' not compatible with connection '%s'" +msgstr "device '%s' not compatible with connection '%s'" -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:6 -msgid "Export the selected VPN connection to a file" -msgstr "ਚੁਣੇ VPN ਕੁਨੈਕਸ਼ਨ ਫਾਇਲ 'ਚ ਭੇਜੋ" +#: ../cli/src/connections.c:1086 +#, c-format +msgid "no device found for connection '%s'" +msgstr "ਕੁਨੈਕਸ਼ਨ '%s' ਲਈ ਕੋਈ ਜੰਤਰ ਨਹੀਂ ਲੱਭਿਆ" -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:7 -msgid "Manage Virtual Private Network Connections" -msgstr "ਵੁਰਚੁਅਲ ਪ੍ਰਾਈਵੇਟ ਨੈੱਟਵਰਕ ਕੁਨੈਕਸ਼ਨ ਪਰਬੰਧ" +#: ../cli/src/connections.c:1097 +msgid "activating" +msgstr "ਚਾਲੂ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ" -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:8 -msgid "VPN Connections" -msgstr "VPN ਕੁਨੈਕਸ਼ਨ" +#: ../cli/src/connections.c:1099 +msgid "activated" +msgstr "ਚਾਲੂ ਕੀਤਾ" -#: ../src/nm-ap-security-wep.c:52 -msgid "40-bit WEP" -msgstr "40-ਬਿੱਟ WEP" +#: ../cli/src/connections.c:1102 ../cli/src/connections.c:1125 +#: ../cli/src/connections.c:1158 ../cli/src/devices.c:224 +#: ../cli/src/devices.c:514 ../cli/src/network-manager.c:92 +#: ../cli/src/network-manager.c:145 ../cli/src/settings.c:469 +msgid "unknown" +msgstr "ਅਣਜਾਣ" -#: ../src/nm-ap-security-wep.c:54 -msgid "104-bit WEP" -msgstr "104-ਬਿੱਟ WEP" +#: ../cli/src/connections.c:1111 +msgid "VPN connecting (prepare)" +msgstr "VPN ਕੁਨੈਕਸ਼ਨ (ਤਿਆਰੀ)" -#: ../src/nm-ap-security-wpa-psk.c:51 -msgid "WPA TKIP" -msgstr "WPA TKIP" +#: ../cli/src/connections.c:1113 +msgid "VPN connecting (need authentication)" +msgstr "VPN ਕੁਨੈਕਟ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ (ਪਰਮਾਣਕਿਤਾ ਦੀ ਲੋੜ ਹੈ)" -#: ../src/nm-ap-security-wpa-psk.c:53 -msgid "WPA CCMP" -msgstr "WPA CCMP" +#: ../cli/src/connections.c:1115 +msgid "VPN connecting" +msgstr "VPN ਕੁਨੈਕਟ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ" -#: ../src/nm-ap-security-wpa-psk.c:55 -msgid "WPA Automatic" -msgstr "WPA ਆਟੋਮੈਟਿਕ" +#: ../cli/src/connections.c:1117 +msgid "VPN connecting (getting IP configuration)" +msgstr "VPN ਕੁਨੈਕਟ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ (IP ਸੰਰਚਨਾ ਲਈ ਜਾ ਰਹੀ ਹੈ)" -#: ../src/nm-ap-security-wpa-psk.c:60 -msgid "WPA2 TKIP" -msgstr "WPA2 TKIP" +#: ../cli/src/connections.c:1119 +msgid "VPN connected" +msgstr "VPN ਕੁਨੈਕਟ ਹੈ" -#: ../src/nm-ap-security-wpa-psk.c:62 -msgid "WPA2 CCMP" -msgstr "WPA2 CCMP" +#: ../cli/src/connections.c:1121 +msgid "VPN connection failed" +msgstr "VPN ਕੁਨੈਕਸ਼ਨ ਫੇਲ੍ਹ ਹੋਇਆ" -#: ../src/nm-ap-security-wpa-psk.c:64 -msgid "WPA2 Automatic" -msgstr "WPA2 ਆਟੋਮੈਟਿਕ" +#: ../cli/src/connections.c:1123 +msgid "VPN disconnected" +msgstr "VPN ਡਿਸ-ਕੁਨੈਕਟ" -#: ../src/nm-ap-security.c:334 +#: ../cli/src/connections.c:1134 +msgid "unknown reason" +msgstr "ਅਣਜਾਣ ਕਾਰਨ" + +#: ../cli/src/connections.c:1136 msgid "none" msgstr "ਕੋਈ ਨਹੀਂ" -#: ../src/nm-netlink-monitor.c:174 +#: ../cli/src/connections.c:1138 +msgid "the user was disconnected" +msgstr "ਯੂਜ਼ਰ ਡਿਸ-ਕੁਨੈਕਟ ਹੋ ਗਿਆ" + +#: ../cli/src/connections.c:1140 +msgid "the base network connection was interrupted" +msgstr "ਬੇਸ ਨੈੱਟਵਰਕ ਕੁਨੈਕਸ਼ਨ 'ਚ ਰੁਕਾਵਟ" + +#: ../cli/src/connections.c:1142 +msgid "the VPN service stopped unexpectedly" +msgstr "VPN ਸਰਵਿਸ ਅਚਾਨਕ ਰੁਕ ਗਈ" + +#: ../cli/src/connections.c:1144 +msgid "the VPN service returned invalid configuration" +msgstr "VPN ਸਰਵਿਸ ਨੇ ਅਢੁੱਕਵੀਂ ਸੰਰਚਨਾ ਵਾਪਸ ਕੀਤੀ" + +#: ../cli/src/connections.c:1146 +msgid "the connection attempt timed out" +msgstr "ਕੁਨੈਕਸ਼ਨ ਕੋਸ਼ਿਸ਼ ਦੌਰਾਨ ਸਮਾਂ ਸਮਾਪਤ ਹੋ ਗਿਆ" + +#: ../cli/src/connections.c:1148 +msgid "the VPN service did not start in time" +msgstr "VPN ਸਰਵਿਸ ਸਮੇਂ 'ਚ ਸ਼ੁਰੂ ਨਹੀਂ ਹੋਈ" + +#: ../cli/src/connections.c:1150 +msgid "the VPN service failed to start" +msgstr "VPN ਸਰਵਿਸ ਸ਼ੁਰੂ ਹੋਣ ਲਈ ਫੇਲ੍ਹ ਹੋਈ" + +#: ../cli/src/connections.c:1152 +msgid "no valid VPN secrets" +msgstr "ਕੋਈ ਢੁੱਕਵਾਂ VPN ਭੇਦ ਨਹੀਂ" + +#: ../cli/src/connections.c:1154 +msgid "invalid VPN secrets" +msgstr "ਅਢੁੱਕਵਾਂ VPN ਭੇਦ" + +#: ../cli/src/connections.c:1156 +msgid "the connection was removed" +msgstr "ਕੁਨੈਕਸ਼ਨ ਹਟਾਇਆ ਗਿਆ" + +#: ../cli/src/connections.c:1170 #, c-format -msgid "unable to create netlink socket for monitoring wired ethernet devices - %s" -msgstr "" -"ਤਾਰ ਵਾਲੇ ਇਥਰਨੈੱਟ ਜੰਤਰ - %s ਦੀ ਨਿਗਰਾਨੀ ਲਈ netlink ਸਾਕਟ ਬਣਾਉਣ " -"ਲਈ ਅਸਫ਼ਲ" +msgid "state: %s\n" +msgstr "ਹਾਲਤ: %s\n" -#: ../src/nm-netlink-monitor.c:192 +#: ../cli/src/connections.c:1173 ../cli/src/connections.c:1199 #, c-format -msgid "unable to bind to netlink socket for monitoring wired ethernet devices - %s" +msgid "Connection activated\n" +msgstr "ਕੁਨੈਕਸ਼ਨ ਚਾਲੂ ਕੀਤਾ\n" + +#: ../cli/src/connections.c:1176 +#, c-format +msgid "Error: Connection activation failed." +msgstr "ਗਲਤ: ਕੁਨੈਕਸ਼ਨ ਚਾਲੂ ਕਰਨ ਲਈ ਫੇਲ੍ਹ ਹੈ।" + +#: ../cli/src/connections.c:1195 +#, c-format +msgid "state: %s (%d)\n" +msgstr "ਹਾਲਤ: %s (%d)\n" + +#: ../cli/src/connections.c:1205 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "ਗਲਤੀ: ਕੁਨੈਕਸ਼ਨ ਚਾਲੂ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: %s।" + +#: ../cli/src/connections.c:1222 ../cli/src/devices.c:811 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "ਗਲਤੀ: ਸਮਾਂ-ਸਮਾਪਤੀ %d ਸਕਿੰਟ ਖਤਮ ਹੋਏ।" + +#: ../cli/src/connections.c:1265 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "ਗਲਤੀ: ਕੁਨੈਕਸ਼ਨ ਚਾਲੂ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: %s" + +#: ../cli/src/connections.c:1279 +#, c-format +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "ਗਲਤੀ: '%s' ਲਈ ਚਾਲੂ ਕੁਨੈਕਸ਼ਨ ਲੈਣ ਲਈ ਫੇਲ੍ਹ ਹੈ।" + +#: ../cli/src/connections.c:1288 +#, c-format +msgid "Active connection state: %s\n" +msgstr "ਚਾਲੂ ਕੁਨੈਕਸ਼ਨ ਹਾਲਤ: %s\n" + +#: ../cli/src/connections.c:1289 +#, c-format +msgid "Active connection path: %s\n" +msgstr "ਚਾਲੂ ਕੁਨੈਕਸ਼ਨ ਪਾਥ: %s\n" + +#: ../cli/src/connections.c:1343 ../cli/src/connections.c:1461 +#, c-format +msgid "Error: Unknown connection: %s." +msgstr "ਗਲਤੀ: ਅਣਜਾਣ ਕੁਨੈਕਸ਼ਨ: %s।" + +#: ../cli/src/connections.c:1378 ../cli/src/devices.c:882 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "ਗਲਤੀ: ਸਮਾਂ-ਸਮਾਪਤੀ ਮੁੱਲ '%s' ਢੁੱਕਵਾਂ ਨਹੀਂ ਹੈ।" + +#: ../cli/src/connections.c:1391 ../cli/src/connections.c:1478 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "ਗਲਤੀ: id ਜਾਂ uuid ਨਹੀਂ ਦਿੱਤਾ।" + +#: ../cli/src/connections.c:1411 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "ਗਲਤੀ: ਕੋਈ ਢੁੱਕਵਾਂ ਜੰਤਰ ਨਹੀਂ ਲੱਭਿਆ: %s।" + +#: ../cli/src/connections.c:1413 +#, c-format +msgid "Error: No suitable device found." +msgstr "ਗਲਤੀ: ਕੋਈ ਢੁੱਕਵਾਂ ਜੰਤਰ ਨਹੀਂ ਮਿਲਿਆ।" + +#: ../cli/src/connections.c:1505 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "ਚੇਤਾਵਨੀ: ਕੁਨੈਕਸ਼ਨ ਚਾਲੂ ਨਹੀਂ ਹੈ\n" + +#: ../cli/src/connections.c:1561 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "ਗਲਤੀ: 'con' ਕਮਾਂਡ '%s' ਢੁੱਕਵਾਂ ਨਹੀਂ।" + +#: ../cli/src/connections.c:1597 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "ਗਲਤੀ: ਡੀ-ਬੱਸ ਨਾਲ ਕੁਨੈਕਟ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਿਆ।" + +#: ../cli/src/connections.c:1604 +#, c-format +msgid "Error: Could not get system settings." +msgstr "ਗਲਤੀ: ਸਿਸਟਮ ਸੈਟਿੰਗ ਨਹੀਂ ਲਈ ਜਾ ਸਕੀ।" + +#: ../cli/src/connections.c:1612 +#, c-format +msgid "Error: Could not get user settings." +msgstr "ਗਲਤੀ: ਯੂਜ਼ਰ ਸੈਟਿੰਗ ਨਹੀਂ ਲਈ ਜਾ ਸਕੀ।" + +#: ../cli/src/connections.c:1622 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "ਗਲਤੀ: ਕੁਨੈਕਸ਼ਨ ਨਹੀਂ ਲਿਆ ਜਾ ਸਕਦਾ: ਸਿਸਟਮ ਸਰਵਿਸ ਨਹੀਂ ਚੱਲ ਰਹੀ ਹੈ।" + +#. 0 +#. 9 +#: ../cli/src/devices.c:60 ../cli/src/devices.c:86 ../cli/src/devices.c:162 +msgid "DEVICE" +msgstr "DEVICE" + +#. 1 +#. 4 +#. 0 +#: ../cli/src/devices.c:62 ../cli/src/devices.c:90 +#: ../cli/src/network-manager.c:36 +msgid "STATE" +msgstr "STATE" + +#: ../cli/src/devices.c:71 +msgid "GENERAL" +msgstr "GENERAL" + +#. 0 +#: ../cli/src/devices.c:72 +msgid "CAPABILITIES" +msgstr "CAPABILITIES" + +#. 1 +#: ../cli/src/devices.c:73 +msgid "WIFI-PROPERTIES" +msgstr "WIFI-PROPERTIES" + +#. 2 +#: ../cli/src/devices.c:74 +msgid "AP" +msgstr "AP" + +#. 3 +#: ../cli/src/devices.c:75 +msgid "WIRED-PROPERTIES" +msgstr "WIRED-PROPERTIES" + +#. 4 +#: ../cli/src/devices.c:76 +msgid "IP4-SETTINGS" +msgstr "IP4-SETTINGS" + +#. 5 +#: ../cli/src/devices.c:77 +msgid "IP4-DNS" +msgstr "IP4-DNS" + +#. 2 +#: ../cli/src/devices.c:88 +msgid "DRIVER" +msgstr "DRIVER" + +#. 3 +#: ../cli/src/devices.c:89 +msgid "HWADDR" +msgstr "HWADDR" + +#. 0 +#: ../cli/src/devices.c:99 +msgid "CARRIER-DETECT" +msgstr "CARRIER-DETECT" + +#. 1 +#: ../cli/src/devices.c:100 +msgid "SPEED" +msgstr "SPEED" + +#. 0 +#: ../cli/src/devices.c:109 +msgid "CARRIER" +msgstr "CARRIER" + +#. 0 +#: ../cli/src/devices.c:119 +msgid "WEP" +msgstr "WEP" + +#. 1 +#: ../cli/src/devices.c:120 +msgid "WPA" +msgstr "WPA" + +#. 2 +#: ../cli/src/devices.c:121 +msgid "WPA2" +msgstr "WPA2" + +#. 3 +#: ../cli/src/devices.c:122 +msgid "TKIP" +msgstr "TKIP" + +#. 4 +#: ../cli/src/devices.c:123 +msgid "CCMP" +msgstr "CCMP" + +#. 0 +#: ../cli/src/devices.c:132 +msgid "ADDRESS" +msgstr "ADDRESS" + +#. 1 +#: ../cli/src/devices.c:133 +msgid "PREFIX" +msgstr "PREFIX" + +#. 2 +#: ../cli/src/devices.c:134 +msgid "GATEWAY" +msgstr "GATEWAY" + +#. 0 +#: ../cli/src/devices.c:143 +msgid "DNS" +msgstr "DNS" + +#. 0 +#: ../cli/src/devices.c:153 +msgid "SSID" +msgstr "SSID" + +#. 1 +#: ../cli/src/devices.c:154 +msgid "BSSID" +msgstr "BSSID" + +#. 2 +#: ../cli/src/devices.c:155 +msgid "MODE" +msgstr "MODE" + +#. 3 +#: ../cli/src/devices.c:156 +msgid "FREQ" +msgstr "FREQ" + +#. 4 +#: ../cli/src/devices.c:157 +msgid "RATE" +msgstr "RATE" + +#. 5 +#: ../cli/src/devices.c:158 +msgid "SIGNAL" +msgstr "SIGNAL" + +#. 6 +#: ../cli/src/devices.c:159 +msgid "SECURITY" +msgstr "SECURITY" + +#. 7 +#: ../cli/src/devices.c:160 +msgid "WPA-FLAGS" +msgstr "WPA-FLAGS" + +#. 8 +#: ../cli/src/devices.c:161 +msgid "RSN-FLAGS" +msgstr "RSN-FLAGS" + +#. 10 +#: ../cli/src/devices.c:163 +msgid "ACTIVE" +msgstr "ACTIVE" + +#: ../cli/src/devices.c:186 +#, c-format +msgid "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +"\n" msgstr "" -"ਤਾਰ ਵਾਲੇ ਇਥਰਨੈੱਟ ਜੰਤਰ - %s ਦੀ ਨਿਗਰਾਨੀ ਲਈ netlink ਸਾਕਟ ਜੋੜਨ " -"ਲਈ ਅਸਫ਼ਲ" +"ਵਰਤੋਂ: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +"\n" -#: ../src/nm-netlink-monitor.c:427 -msgid "operation took too long" -msgstr "ਓਪਰੇਸ਼ਨ ਨੂੰ ਬਹੁਤ ਸਮਾਂ ਲੱਗ ਗਿਆ" +#: ../cli/src/devices.c:206 +msgid "unmanaged" +msgstr "ਬਿਨ-ਪਰਬੰਧ" -#: ../src/nm-netlink-monitor.c:524 -msgid "received data from wrong type of sender" -msgstr "ਭੇਜਣ ਵਾਲੇ ਦੀ ਗਲਤ ਕਿਸਮ ਤੋਂ ਡਾਟਾ ਮਿਲਿਆ" +#: ../cli/src/devices.c:208 +msgid "unavailable" +msgstr "ਅਣ-ਉਪਲੱਬਧ" -#: ../src/nm-netlink-monitor.c:537 -msgid "received data from unexpected sender" -msgstr "ਅਣਜਾਣ ਭੇਜਣ ਵਾਲੇ ਵਲੋਂ ਡਾਟਾ ਮਿਲਿਆ" +#: ../cli/src/devices.c:210 ../cli/src/network-manager.c:89 +msgid "disconnected" +msgstr "ਡਿਸ-ਕੁਨੈਕਟ ਕੀਤਾ" -#: ../src/nm-netlink-monitor.c:666 -msgid "too much data was sent over socket and some of it was lost" -msgstr "ਸਾਕਟ ਉੱਤੇ ਬਹੁਤ ਵੱਧ ਡਾਟਾ ਭੇਜਿਆ ਗਿਆ ਅਤੇ ਇਸ 'ਚੋਂ ਕੁਝ ਗੁੰਮ ਹੋ ਗਿਆ" +#: ../cli/src/devices.c:212 +msgid "connecting (prepare)" +msgstr "ਕੁਨੈਕਟ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ (ਤਿਆਰੀ)" -#: ../src/nm-netlink-monitor.c:774 +#: ../cli/src/devices.c:214 +msgid "connecting (configuring)" +msgstr "ਕੁਨੈਕਟ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ (ਸੰਰਚਨਾ ਜਾਰੀ)" + +#: ../cli/src/devices.c:216 +msgid "connecting (need authentication)" +msgstr "ਕੁਨੈਕਟ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ (ਪਰਮਾਣਕਿਤਾ ਦੀ ਲੋੜ)" + +#: ../cli/src/devices.c:218 +msgid "connecting (getting IP configuration)" +msgstr "ਕੁਨੈਕਟ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ (IP ਸੰਰਚਨਾ ਲਈ ਜਾ ਰਹੀ ਹੈ)" + +#: ../cli/src/devices.c:220 ../cli/src/network-manager.c:87 +msgid "connected" +msgstr "ਕੁਨੈਕਟ ਹੋਇਆ" + +#: ../cli/src/devices.c:222 +msgid "connection failed" +msgstr "ਕੁਨੈਕਸ਼ਨ ਫੇਲ੍ਹ ਹੈ" + +#: ../cli/src/devices.c:245 ../cli/src/devices.c:380 +msgid "Unknown" +msgstr "ਅਣਜਾਣ" + +#: ../cli/src/devices.c:277 +msgid "(none)" +msgstr "(ਕੋਈ ਨਹੀਂ)" + +#: ../cli/src/devices.c:302 +#, c-format +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s: IP4 ਐਡਰੈੱਸ 0x%X ਬਦਲਣ ਦੌਰਾਨ ਗਲਤੀ" + +#: ../cli/src/devices.c:349 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" + +#: ../cli/src/devices.c:350 +#, c-format +msgid "%u MB/s" +msgstr "%u MB/s" + +#: ../cli/src/devices.c:359 +msgid "Encrypted: " +msgstr "ਇੰਕ੍ਰਿਪਟ ਕੀਤਾ: " + +#: ../cli/src/devices.c:364 +msgid "WEP " +msgstr "WEP " + +#: ../cli/src/devices.c:366 +msgid "WPA " +msgstr "WPA " + +#: ../cli/src/devices.c:368 +msgid "WPA2 " +msgstr "WPA2 " + +#: ../cli/src/devices.c:371 +msgid "Enterprise " +msgstr "Enterprise " + +#: ../cli/src/devices.c:380 +msgid "Ad-Hoc" +msgstr "Ad-Hoc" + +#: ../cli/src/devices.c:380 +msgid "Infrastructure" +msgstr "ਇੰਫਰਾਸਟੱਕਚਰ" + +#: ../cli/src/devices.c:442 +#, c-format +msgid "Error: 'dev list': %s" +msgstr "Error: 'dev list': %s" + +#: ../cli/src/devices.c:444 +#, c-format +msgid "Error: 'dev list': %s; allowed fields: %s" +msgstr "Error: 'dev list': %s; allowed fields: %s" + +#: ../cli/src/devices.c:453 +msgid "Device details" +msgstr "ਜੰਤਰ ਵੇਰਵਾ" + +#: ../cli/src/devices.c:483 ../cli/src/devices.c:827 +msgid "(unknown)" +msgstr "(ਅਣਜਾਣ)" + +#: ../cli/src/devices.c:484 +msgid "unknown)" +msgstr "ਅਣਜਾਣ)" + +#: ../cli/src/devices.c:510 +#, c-format +msgid "%u Mb/s" +msgstr "%u Mb/s" + +#. Print header +#. "WIRED-PROPERTIES" +#: ../cli/src/devices.c:583 +msgid "on" +msgstr "ਚਾਲੂ" + +#: ../cli/src/devices.c:583 +msgid "off" +msgstr "ਬੰਦ" + +#: ../cli/src/devices.c:710 +#, c-format +msgid "Error: 'dev status': %s" +msgstr "Error: 'dev status': %s" + +#: ../cli/src/devices.c:712 +#, c-format +msgid "Error: 'dev status': %s; allowed fields: %s" +msgstr "Error: 'dev status': %s; allowed fields: %s" + +#: ../cli/src/devices.c:719 +msgid "Status of devices" +msgstr "ਜੰਤਰਾਂ ਦੀ ਹਾਲਤ" + +#: ../cli/src/devices.c:747 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "ਗਲਤੀ: '%s' ਆਰਗੂਮੈਂਟ ਗੁੰਮ ਹੈ।" + +#: ../cli/src/devices.c:776 ../cli/src/devices.c:915 ../cli/src/devices.c:1035 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "ਗਲਤੀ: ਜੰਤਰ '%s' ਨਹੀਂ ਲੱਭਿਆ।" + +#: ../cli/src/devices.c:799 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "ਸਫ਼ਲ: ਜੰਤਰ '%s' ਠੀਕ ਤਰ੍ਹਾਂ ਡਿਸ-ਕੁਨੈਕਟ ਹੋ ਗਿਆ।" + +#: ../cli/src/devices.c:824 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "ਗਲਤੀ: ਜੰਤਰ '%s' (%s) ਡਿਸ-ਕੁਨੈਕਸ਼ਨ ਫੇਲ੍ਹ: %s" + +#: ../cli/src/devices.c:832 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "ਜੰਤਰ ਹਾਲਤ: %d (%s)\n" + +#: ../cli/src/devices.c:896 +#, c-format +msgid "Error: iface has to be specified." +msgstr "ਗਲਤੀ: iface ਦੇਣ ਲਈ ਫੇਲ੍ਹ ਹੈ।" + +#: ../cli/src/devices.c:1011 +#, c-format +msgid "Error: 'dev wifi': %s" +msgstr "Error: 'dev wifi': %s" + +#: ../cli/src/devices.c:1013 +#, c-format +msgid "Error: 'dev wifi': %s; allowed fields: %s" +msgstr "Error: 'dev wifi': %s; allowed fields: %s" + +#: ../cli/src/devices.c:1020 +msgid "WiFi scan list" +msgstr "ਵਾਈਫਾਈ ਸਕੈਨ ਲਿਸਟ" + +#: ../cli/src/devices.c:1055 ../cli/src/devices.c:1109 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "ਗਲਤੀ: hwaddr '%s' ਵਾਲਾ ਅਸੈੱਸ ਪੁਆਇੰਟ ਨਹੀਂ ਲੱਭਿਆ।" + +#: ../cli/src/devices.c:1072 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "ਗਲਤੀ: ਜੰਤਰ '%s' ਵਾਈ-ਫਾਈ ਜੰਤਰ ਨਹੀਂ ਹੈ।" + +#: ../cli/src/devices.c:1136 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "ਗਲਤੀ: 'dev wifi' ਕਮਾਂਡ '%s' ਢੁੱਕਵੀਂ ਨਹੀਂ ਹੈ।" + +#: ../cli/src/devices.c:1183 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "ਗਲਤੀ: 'dev' ਕਮਾਂਡ '%s' ਢੁੱਕਵੀਂ ਨਹੀਂ ਹੈ।" + +#: ../cli/src/network-manager.c:35 +msgid "RUNNING" +msgstr "RUNNING" + +#. 1 +#: ../cli/src/network-manager.c:37 +msgid "WIFI-HARDWARE" +msgstr "WIFI-HARDWARE" + +#. 2 +#: ../cli/src/network-manager.c:38 +msgid "WIFI" +msgstr "WIFI" + +#. 3 +#: ../cli/src/network-manager.c:39 +msgid "WWAN-HARDWARE" +msgstr "WWAN-HARDWARE" + +#. 4 +#: ../cli/src/network-manager.c:40 +msgid "WWAN" +msgstr "WWAN" + +#: ../cli/src/network-manager.c:62 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" +msgstr "" +"ਵਰਤੋਂ: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + +#: ../cli/src/network-manager.c:83 +msgid "asleep" +msgstr "asleep" + +#: ../cli/src/network-manager.c:85 +msgid "connecting" +msgstr "ਕੁਨੈਕਟ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ" + +#: ../cli/src/network-manager.c:125 +#, c-format +msgid "Error: 'nm status': %s" +msgstr "Error: 'nm status': %s" + +#: ../cli/src/network-manager.c:127 +#, c-format +msgid "Error: 'nm status': %s; allowed fields: %s" +msgstr "Error: 'nm status': %s; allowed fields: %s" + +#: ../cli/src/network-manager.c:134 +msgid "NetworkManager status" +msgstr "ਨੈੱਟਵਰਕਮੈਨੇਜਰ ਹਾਲਤ" + +#. Print header +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "enabled" +msgstr "ਚਾਲੂ ਹੈ" + +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "disabled" +msgstr "ਬੰਦ ਹੈ" + +#: ../cli/src/network-manager.c:148 +msgid "running" +msgstr "ਚੱਲ ਰਿਹਾ ਹੈ" + +#: ../cli/src/network-manager.c:148 +msgid "not running" +msgstr "ਨਹੀਂ ਚੱਲ ਰਿਹਾ ਹੈ" + +#: ../cli/src/network-manager.c:201 ../cli/src/network-manager.c:233 +#, c-format +msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s" +msgstr "Error: '--fields' value '%s' is not valid here; allowed fields: %s" + +#: ../cli/src/network-manager.c:209 +msgid "WiFi enabled" +msgstr "WiFi enabled" + +#: ../cli/src/network-manager.c:220 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "ਗਲਤੀ: ਅਢੁੱਕਵਾਂ 'wifi' ਪੈਰਾਮੀਟਰ: '%s'." + +#: ../cli/src/network-manager.c:241 +msgid "WWAN enabled" +msgstr "WWAN enabled" + +#: ../cli/src/network-manager.c:252 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "ਗਲਤੀ: ਅਢੁੱਕਵਾਂ 'wwan' ਪੈਰਾਮੀਟਰ: '%s'." + +#: ../cli/src/network-manager.c:263 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "ਗਲਤੀ: 'nm' ਕਮਾਂਡ '%s' ਢੁੱਕਵੀਂ ਨਹੀਂ ਹੈ।" + +#: ../cli/src/nmcli.c:69 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -m[ode] tabular|multiline output mode\n" +" -f[ields] |all|common specify fields to output\n" +" -e[scape] yes|no escape columns separators in " +"values\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"ਵਰਤੋਂ: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -m[ode] tabular|multiline output mode\n" +" -f[ields] |all|common specify fields to output\n" +" -e[scape] yes|no escape columns separators in " +"values\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" + +#: ../cli/src/nmcli.c:113 +#, c-format +msgid "Error: Object '%s' is unknown, try 'nmcli help'." +msgstr "Error: Object '%s' is unknown, try 'nmcli help'." + +#: ../cli/src/nmcli.c:143 +#, c-format +msgid "Error: Option '--terse' is specified the second time." +msgstr "Error: Option '--terse' is specified the second time." + +#: ../cli/src/nmcli.c:148 +#, c-format +msgid "Error: Option '--terse' is mutually exclusive with '--pretty'." +msgstr "Error: Option '--terse' is mutually exclusive with '--pretty'." + +#: ../cli/src/nmcli.c:156 +#, c-format +msgid "Error: Option '--pretty' is specified the second time." +msgstr "Error: Option '--pretty' is specified the second time." + +#: ../cli/src/nmcli.c:161 +#, c-format +msgid "Error: Option '--pretty' is mutually exclusive with '--terse'." +msgstr "Error: Option '--pretty' is mutually exclusive with '--terse'." + +#: ../cli/src/nmcli.c:171 ../cli/src/nmcli.c:187 +#, c-format +msgid "Error: missing argument for '%s' option." +msgstr "ਗਲਤੀ: '%s' ਚੋਣ ਲਈ ਆਰਗੂਮੈਂਟ ਮੌਜੂਦ ਨਹੀਂ ਹੈ।" + +#: ../cli/src/nmcli.c:180 ../cli/src/nmcli.c:196 +#, c-format +msgid "Error: '%s' is not valid argument for '%s' option." +msgstr "Error: '%s' is not valid argument for '%s' option." + +#: ../cli/src/nmcli.c:203 +#, c-format +msgid "Error: fields for '%s' options are missing." +msgstr "Error: fields for '%s' options are missing." + +#: ../cli/src/nmcli.c:209 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "nmcli ਟੂਲ, ਵਰਜਨ %s\n" + +#: ../cli/src/nmcli.c:215 +#, c-format +msgid "Error: Option '%s' is unknown, try 'nmcli -help'." +msgstr "ਗਲਤੀ: ਚੋਣ '%s' ਅਣਜਾਣੀ ਹੈ 'nmcli -help' ਵਰਤ ਕੇ ਵੇਖੋ।" + +#: ../cli/src/nmcli.c:234 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "%d ਸਿਗਨਲ ਮਿਲਿਆ, ਬੰਦ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ..." + +#: ../cli/src/nmcli.c:259 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "ਗਲਤੀ: ਨੈੱਟਵਰਕਮੈਨੇਜਰ ਨਾਲ ਕੁਨੈਕਟ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਿਆ।" + +#: ../cli/src/nmcli.c:275 +msgid "Success" +msgstr "ਸਫ਼ਲ" + +#: ../cli/src/settings.c:407 +#, c-format +msgid "%d (hex-ascii-key)" +msgstr "%d (hex-ascii-key)" + +#: ../cli/src/settings.c:409 +#, c-format +msgid "%d (104/128-bit passphrase)" +msgstr "%d (104/128-bit ਗੁਪਤਕੋਡ)" + +#: ../cli/src/settings.c:412 +#, c-format +msgid "%d (unknown)" +msgstr "%d (ਅਣਜਾਣ)" + +#: ../cli/src/settings.c:438 +msgid "0 (unknown)" +msgstr "0 (ਅਣਜਾਣ)" + +#: ../cli/src/settings.c:444 +msgid "any, " +msgstr "ਕੋਈ ਵੀ, " + +#: ../cli/src/settings.c:446 +msgid "900 MHz, " +msgstr "900 MHz, " + +#: ../cli/src/settings.c:448 +msgid "1800 MHz, " +msgstr "1800 MHz, " + +#: ../cli/src/settings.c:450 +msgid "1900 MHz, " +msgstr "1900 MHz, " + +#: ../cli/src/settings.c:452 +msgid "850 MHz, " +msgstr "850 MHz, " + +#: ../cli/src/settings.c:454 +msgid "WCDMA 3GPP UMTS 2100 MHz, " +msgstr "WCDMA 3GPP UMTS 2100 MHz, " + +#: ../cli/src/settings.c:456 +msgid "WCDMA 3GPP UMTS 1800 MHz, " +msgstr "WCDMA 3GPP UMTS 1800 MHz, " + +#: ../cli/src/settings.c:458 +msgid "WCDMA 3GPP UMTS 1700/2100 MHz, " +msgstr "WCDMA 3GPP UMTS 1700/2100 MHz, " + +#: ../cli/src/settings.c:460 +msgid "WCDMA 3GPP UMTS 800 MHz, " +msgstr "WCDMA 3GPP UMTS 800 MHz, " + +#: ../cli/src/settings.c:462 +msgid "WCDMA 3GPP UMTS 850 MHz, " +msgstr "WCDMA 3GPP UMTS 850 MHz, " + +#: ../cli/src/settings.c:464 +msgid "WCDMA 3GPP UMTS 900 MHz, " +msgstr "WCDMA 3GPP UMTS 900 MHz, " + +#: ../cli/src/settings.c:466 +msgid "WCDMA 3GPP UMTS 1700 MHz, " +msgstr "WCDMA 3GPP UMTS 1700 MHz, " + +#: ../cli/src/settings.c:546 ../cli/src/settings.c:708 +msgid "auto" +msgstr "ਆਟੋ" + +#: ../cli/src/settings.c:704 ../cli/src/settings.c:707 ../cli/src/utils.c:172 +msgid "not set" +msgstr "ਸੈੱਟ ਨਹੀਂ ਹੈ" + +#: ../cli/src/utils.c:124 +#, c-format +msgid "field '%s' has to be alone" +msgstr "ਖੇਤਰ '%s' ਇਕੱਲਾ ਹੋਵੇਗਾ" + +#: ../cli/src/utils.c:127 +#, c-format +msgid "invalid field '%s'" +msgstr "ਗਲਤ ਖੇਤਰ '%s'" + +#: ../cli/src/utils.c:146 +#, c-format +msgid "Option '--terse' requires specifying '--fields'" +msgstr "Option '--terse' requires specifying '--fields'" + +#: ../cli/src/utils.c:150 +#, c-format +msgid "Option '--terse' requires specific '--fields' option values , not '%s'" +msgstr "Option '--terse' requires specific '--fields' option values , not '%s'" + +#: ../libnm-util/crypto.c:120 +#, c-format +msgid "PEM key file had no end tag '%s'." +msgstr "PEM ਕੁੰਜੀ ਫਾਇਲ ਦਾ ਕੋਈ ਅੰਤ ਟੈਗ '%s' ਨਹੀਂ ਹੈ।" + +#: ../libnm-util/crypto.c:130 +#, c-format +msgid "Doesn't look like a PEM private key file." +msgstr "PEM ਪ੍ਰਾਈਵੇਟ ਕੁੰਜੀ ਫਾਇਲ ਵਾਂਗ ਨਹੀਂ ਜਾਪਦੀ।" + +#: ../libnm-util/crypto.c:138 +#, c-format +msgid "Not enough memory to store PEM file data." +msgstr "PEM ਫਾਇਲ ਡਾਟਾ ਸਟੋਰ ਕਰਨ ਲਈ ਲੋੜੀਦੀ ਮੈਮੋਰੀ ਨਹੀਂ ਹੈ।" + +#: ../libnm-util/crypto.c:154 +#, c-format +msgid "Malformed PEM file: Proc-Type was not first tag." +msgstr "ਨਿਕਾਰਾ PEM ਫਾਇਲ: Proc-Type ਪਹਿਲਾਂ ਟੈਗ ਨਹੀਂ ਹੈ।" + +#: ../libnm-util/crypto.c:162 +#, c-format +msgid "Malformed PEM file: unknown Proc-Type tag '%s'." +msgstr "ਨਿਕਾਰਾ PEM ਫਾਇਲ: ਅਣਜਾਣ Proc-Type ਟੈਗ '%s' ਹੈ।" + +#: ../libnm-util/crypto.c:172 +#, c-format +msgid "Malformed PEM file: DEK-Info was not the second tag." +msgstr "ਨਿਕਾਰਾ PEM ਫਾਇਲ: DEK-Info ਦੂਜਾ ਟੈਗ ਨਹੀਂ ਹੈ।" + +#: ../libnm-util/crypto.c:183 +#, c-format +msgid "Malformed PEM file: no IV found in DEK-Info tag." +msgstr "ਨਿਕਾਰਾ PEM ਫਾਇਲ: DEK-Info ਟੈਗ ਵਿੱਚ ਕੋਈ IV ਨਹੀਂ ਲੱਭਿਆ।" + +#: ../libnm-util/crypto.c:190 +#, c-format +msgid "Malformed PEM file: invalid format of IV in DEK-Info tag." +msgstr " ਨਿਕਾਰਾ PEM ਫਾਇਲ: DEK-Info ਟੈਗ ਵਿੱਚ ਗਲਤ ਫਾਰਮੈਟ IV" + +#: ../libnm-util/crypto.c:203 +#, c-format +msgid "Malformed PEM file: unknown private key cipher '%s'." +msgstr "ਨਿਕਾਰਾ PEM ਫਾਇਲ: ਅਣਜਾਣ ਪ੍ਰਾਈਵੇਟ ਕੁੰਜੀ ਸੀਫਰ '%s'।" + +#: ../libnm-util/crypto.c:222 +#, c-format +msgid "Could not decode private key." +msgstr "ਪ੍ਰਾਈਵੇਟ ਕੁੰਜੀ ਡੀਕੋਡ ਨਹੀਂ ਕੀਤੀ ਜਾ ਸਕੀ।" + +#: ../libnm-util/crypto.c:267 +#, c-format +msgid "PEM certificate '%s' had no end tag '%s'." +msgstr "PEM ਸਰਟੀਫਿਕੇਟ '%s' ਵਿੱਚ ਕੋਈ ਅੰਤ ਟੈਗ '%s' ਨਹੀਂ ਹੈ।" + +#: ../libnm-util/crypto.c:277 +#, c-format +msgid "Failed to decode certificate." +msgstr "ਸਰਟੀਫਿਕੇਟ ਡੀਕੋਡ ਕਰਨ ਲਈ ਫੇਲ੍ਹ ਹੈ।" + +#: ../libnm-util/crypto.c:286 +#, c-format +msgid "Not enough memory to store certificate data." +msgstr "ਸਰਟੀਫਿਕੇਟ ਡਾਟਾ ਸਟੋਰ ਕਰਨ ਲਈ ਲੋੜੀਦੀ ਮੈਮੋਰੀ ਨਹੀਂ ਹੈ।" + +#: ../libnm-util/crypto.c:294 +#, c-format +msgid "Not enough memory to store file data." +msgstr "ਫਾਇਲ ਡਾਟਾ ਸਟੋਰ ਕਰਨ ਲਈ ਲੋੜੀਦੀ ਮੈਮੋਰੀ ਨਹੀਂ ਹੈ।" + +#: ../libnm-util/crypto.c:324 +#, c-format +msgid "IV must be an even number of bytes in length." +msgstr "IV ਲਈ ਲੰਬਾਈ ਜਿਸਤ ਅੰਕ ਹੋਣੀ ਲਾਜ਼ਮੀ ਹੈ।" + +#: ../libnm-util/crypto.c:333 +#, c-format +msgid "Not enough memory to store the IV." +msgstr "IV ਸਟੋਰ ਕਰਨ ਲਈ ਲੋੜੀਦੀ ਮੈਮੋਰੀ ਨਹੀਂ ਹੈ।" + +#: ../libnm-util/crypto.c:344 +#, c-format +msgid "IV contains non-hexadecimal digits." +msgstr "IV ਵਿੱਚ ਗ਼ੈਰ-ਹੈਕਸਾਡੈਸੀਮਲ ਅੰਕ ਹਨ।" + +#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:336 +#, c-format +msgid "Private key cipher '%s' was unknown." +msgstr "ਪ੍ਰਾਈਵੇਟ ਕੁੰਜੀ ਸੀਫ਼ਰ '%s' ਅਣਜਾਣ ਹੈ।" + +#: ../libnm-util/crypto.c:391 +#, c-format +msgid "Not enough memory to decrypt private key." +msgstr "ਪ੍ਰਾਈਵੇਟ ਕੁੰਜੀ ਡੀਕੋਡ ਕਰਨ ਲਈ ਲੋੜੀਦੀ ਮੈਮੋਰੀ ਨਹੀਂ ਹੈ।" + +#: ../libnm-util/crypto.c:511 +#, c-format +msgid "Unable to determine private key type." +msgstr "ਪ੍ਰਾਈਵੇਟ ਕੁੰਜੀ ਕਿਸਮ ਜਾਣਨ ਲਈ ਅਸਮਰੱਥ ਹੈ।" + +#: ../libnm-util/crypto.c:530 +#, c-format +msgid "Not enough memory to store decrypted private key." +msgstr "ਡਿਕ੍ਰਿਪਟ ਕੀਤੀ ਪ੍ਰਾਈਵੇਟ ਕੁੰਜੀ ਸਟੋਰ ਕਰਨ ਲਈ ਲੋੜੀਦੀ ਮੈਮੋਰੀ ਨਹੀਂ ਹੈ।" + +#: ../libnm-util/crypto_gnutls.c:49 +msgid "Failed to initialize the crypto engine." +msgstr "ਕ੍ਰਿਪਟੂ ਇੰਜਣ ਸ਼ੁਰੂ ਕਰਨ ਲਈ ਫੇਲ੍ਹ ਹੈ।" + +#: ../libnm-util/crypto_gnutls.c:93 +#, c-format +msgid "Failed to initialize the MD5 engine: %s / %s." +msgstr "MD5 ਇੰਜਣ ਸ਼ੁਰੂ ਕਰਨ ਲਈ ਫੇਲ੍ਹ ਹੈ: %s / %s" + +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "ਅਢੁੱਕਵੀਂ IV ਲੰਬਾਈ (ਘੱਟੋ-ਘੱਟ %zd ਹੋਣੀ ਲਾਜ਼ਮੀ ਹੈ)।" + +#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188 +#, c-format +msgid "Not enough memory for decrypted key buffer." +msgstr "ਡੀਕ੍ਰਿਪਟ ਕੀਤੇ ਕੁੰਜੀ ਬਫ਼ਰ ਲਈ ਲੋੜੀਦੀ ਮੈਮੋਰੀ ਨਹੀਂ ਹੈ।" + +#: ../libnm-util/crypto_gnutls.c:173 +#, c-format +msgid "Failed to initialize the decryption cipher context: %s / %s." +msgstr "ਡਿਕ੍ਰਿਪਸ਼ਨ ਸੀਫਰ ਪਰਸੰਗ ਸ਼ੁਰੂ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: %s / %s" + +#: ../libnm-util/crypto_gnutls.c:182 +#, c-format +msgid "Failed to set symmetric key for decryption: %s / %s." +msgstr "ਡਿਕ੍ਰਿਪਸ਼ਨ ਲਈ ਸਮਮਿਤੀ ਕੁੰਜੀ ਸੈੱਟ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: %s / %s" + +#: ../libnm-util/crypto_gnutls.c:191 +#, c-format +msgid "Failed to set IV for decryption: %s / %s." +msgstr "%s / %s : ਡਿਕ੍ਰਿਪਟ ਲਈ IV ਸੈੱਟ ਕਰਨ ਲਈ ਫੇਲ੍ਹ ਹੈ।" + +#: ../libnm-util/crypto_gnutls.c:200 +#, c-format +msgid "Failed to decrypt the private key: %s / %s." +msgstr "ਪ੍ਰਾਈਵੇਟ ਕੁੰਜੀ ਡਿਕ੍ਰਿਪਟ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: %s / %s" + +#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 +#, c-format +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "ਪ੍ਰਾਈਵੇਟ ਕੁੰਜੀ ਡਿਕ੍ਰਿਪਟ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: ਅਣਜਾਣ ਪੈਡਿੰਗ ਲੰਬਾਈ।" + +#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 +#, c-format +msgid "Failed to decrypt the private key." +msgstr "ਪ੍ਰਾਈਵੇਟ ਕੁੰਜੀ ਡਿਕ੍ਰਿਪਟ ਕਰਨ ਲਈ ਫੇਲ੍ਹ" + +#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "ਇੰਕ੍ਰਿਪਸ਼ਨ ਲਈ ਮੈਮੋਰੀ ਜਾਰੀ ਨਹੀਂ ਕੀਤੀ ਜਾ ਸਕੀ।" + +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "ਇੰਕ੍ਰਿਪਸ਼ਨ ਸੀਫ਼ਰ ਪਰਸੰਗ ਸ਼ੁਰੂ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: %s / %s" + +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "ਇੰਕ੍ਰਿਪਸ਼ਨ ਲਈ ਸਮਮਿਤੀ ਕੁੰਜੀ ਸੈੱਟ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: %s / %s" + +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +msgid "Failed to set IV for encryption: %s / %s." +msgstr "ਇੰਕ੍ਰਿਪਸ਼ਨ ਲਈ IV ਸੈੱਟ ਕਰਨ ਵਾਸਤੇ ਫੇਲ੍ਹ: %s / %s" + +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +msgid "Failed to encrypt the data: %s / %s." +msgstr "ਡਾਟਾ ਡਿਕ੍ਰਿਪਟ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: %s / %s" + +#: ../libnm-util/crypto_gnutls.c:362 +#, c-format +msgid "Error initializing certificate data: %s" +msgstr "ਸਰਟੀਫਿਕੇਟ ਡਾਟਾ ਸ਼ੁਰੂ 'ਚ ਗਲਤੀ: %s" + +#: ../libnm-util/crypto_gnutls.c:384 +#, c-format +msgid "Couldn't decode certificate: %s" +msgstr "ਸਰਟੀਫਿਕੇਟ ਡੀਕੋਡ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਿਆ: %s" + +#: ../libnm-util/crypto_gnutls.c:408 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %s" +msgstr "PKCS#12 ਡੀਕੋਡਰ ਸ਼ੁਰੂ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਿਆ: %s" + +#: ../libnm-util/crypto_gnutls.c:421 +#, c-format +msgid "Couldn't decode PKCS#12 file: %s" +msgstr "PKCS#12 ਫਾਇਲ ਡੀਕੋਡ ਨਹੀਂ ਜਾ ਸਕੀ: %s" + +#: ../libnm-util/crypto_gnutls.c:433 +#, c-format +msgid "Couldn't verify PKCS#12 file: %s" +msgstr "PKCS#12 ਫਾਇਲ ਜਾਂਚੀ ਨਹੀਂ ਜਾ ਸਕੀ: %s" + +#: ../libnm-util/crypto_nss.c:56 +#, c-format +msgid "Failed to initialize the crypto engine: %d." +msgstr "ਕ੍ਰਿਪਟੂ ਇੰਜਣ ਸ਼ੁਰੂ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: %d" + +#: ../libnm-util/crypto_nss.c:111 +#, c-format +msgid "Failed to initialize the MD5 context: %d." +msgstr "MD5 ਪਰਸੰਗ ਸ਼ੁਰੂ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: %d" + +#: ../libnm-util/crypto_nss.c:179 +#, c-format +msgid "Invalid IV length (must be at least %d)." +msgstr "ਅਢੁੱਕਵੀਂ IV ਲੰਬਾਈ (ਘੱਟੋ-ਘੱਟ %d ਹੋਣੀ ਲਾਜ਼ਮੀ ਹੈ)।" + +#: ../libnm-util/crypto_nss.c:196 +#, c-format +msgid "Failed to initialize the decryption cipher slot." +msgstr "ਡਿਕ੍ਰਿਪਸ਼ਨ ਸੀਫਰ ਸਲਾਟ ਸ਼ੁਰੂ ਕਰਨ ਲਈ ਫੇਲ੍ਹ ਹੈ।" + +#: ../libnm-util/crypto_nss.c:206 +#, c-format +msgid "Failed to set symmetric key for decryption." +msgstr "ਡਿਕ੍ਰਿਪਸ਼ਨ ਲਈ ਸਮਮਿਤੀ ਕੁੰਜੀ ਸੈੱਟ ਕਰਨ ਲਈ ਫੇਲ੍ਹ ਹੈ।" + +#: ../libnm-util/crypto_nss.c:216 +#, c-format +msgid "Failed to set IV for decryption." +msgstr "ਡਿਕ੍ਰਿਪਟ ਲਈ IV ਸੈੱਟ ਕਰਨ ਲਈ ਫੇਲ੍ਹ ਹੈ।" + +#: ../libnm-util/crypto_nss.c:224 +#, c-format +msgid "Failed to initialize the decryption context." +msgstr "ਡਿਕ੍ਰਿਪਸ਼ਨ ਪਰਸੰਗ ਸ਼ੁਰੂ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: " + +#: ../libnm-util/crypto_nss.c:237 +#, c-format +msgid "Failed to decrypt the private key: %d." +msgstr "ਪ੍ਰਾਈਵੇਟ ਕੁੰਜੀ ਡਿਕ੍ਰਿਪਟ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: %d" + +#: ../libnm-util/crypto_nss.c:245 +#, c-format +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "ਪ੍ਰਾਈਵੇਟ ਕੁੰਜੀ ਡਿਕ੍ਰਿਪਟ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: ਡਿਕ੍ਰਿਪਟ ਡਾਟਾ ਬਹੁਤ ਵੱਡਾ ਹੈ।" + +#: ../libnm-util/crypto_nss.c:256 +#, c-format +msgid "Failed to finalize decryption of the private key: %d." +msgstr "ਪ੍ਰਾਈਵੇਟ ਕੁੰਜ ਲਈ ਡੀਕ੍ਰਿਪਸ਼ਨ ਮੁਕੰਮਲ ਕਰਨ ਲਈ ਫੇਲ੍ਹ ਹੈ: %d।" + +#: ../libnm-util/crypto_nss.c:364 +#, c-format +msgid "Failed to initialize the encryption cipher slot." +msgstr "ਕ੍ਰਿਪਸ਼ਨ ਸੀਫ਼ਰ ਸਲਾਟ ਸ਼ੁਰੂ ਕਰਨ ਲਈ ਫੇਲ੍ਹ ਹੈ।" + +#: ../libnm-util/crypto_nss.c:372 +#, c-format +msgid "Failed to set symmetric key for encryption." +msgstr "ਇੰਕ੍ਰਿਪਸ਼ਨ ਲਈ ਸਮਮਿਤੀ ਕੁੰਜੀ ਸੈੱਟ ਕਰਨ ਲਈ ਫੇਲ੍ਹ।" + +#: ../libnm-util/crypto_nss.c:380 +#, c-format +msgid "Failed to set IV for encryption." +msgstr "ਇੰਕ੍ਰਿਪਸ਼ਨ ਲਈ IV ਸੈੱਟ ਕਰਨ ਵਾਸਤੇ ਫੇਲ੍ਹ।" + +#: ../libnm-util/crypto_nss.c:388 +#, c-format +msgid "Failed to initialize the encryption context." +msgstr "ਇੰਕ੍ਰਿਪਸ਼ਨ ਪਰਸੰਗ ਸ਼ੁਰੂ ਕਰਨ ਲਈ ਫੇਲ੍ਹ ਹੈ।" + +#: ../libnm-util/crypto_nss.c:396 +#, c-format +msgid "Failed to encrypt: %d." +msgstr "ਇੰਕ੍ਰਿਪਟ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: %d." + +#: ../libnm-util/crypto_nss.c:404 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "ਇੰਕ੍ਰਿਪਟ ਕਰਨ ਦੇ ਬਾਅਦ ਅਚਾਨਕ ਅਣਜਾਣ ਮਾਤਰਾ 'ਚ ਡਾਟਾ।" + +#: ../libnm-util/crypto_nss.c:447 +#, c-format +msgid "Couldn't decode certificate: %d" +msgstr "ਸਰਟੀਫਿਕੇਟ ਡੀਕੋਡ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਿਆ: %d" + +#: ../libnm-util/crypto_nss.c:482 +#, c-format +msgid "Couldn't convert password to UCS2: %d" +msgstr "ਪਾਸਵਰਡ ਨੂੰ UCS2 'ਚ ਬਦਲਿਆ ਨਹੀਂ ਜਾ ਸਕਿਆ: %d" + +#: ../libnm-util/crypto_nss.c:510 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %d" +msgstr "PKCS#12 ਡੀਕੋਡਰ ਸ਼ੁਰੂ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਿਆ: %d" + +#: ../libnm-util/crypto_nss.c:519 +#, c-format +msgid "Couldn't decode PKCS#12 file: %d" +msgstr "PKCS#12 ਫਾਇਲ ਜਾਂਚੀ ਨਹੀਂ ਜਾ ਸਕੀ: %d" + +#: ../libnm-util/crypto_nss.c:528 +#, c-format +msgid "Couldn't verify PKCS#12 file: %d" +msgstr "PKCS#12 ਫਾਇਲ ਜਾਂਚੀ ਨਹੀਂ ਜਾ ਸਕੀ: %d" + +#: ../libnm-util/crypto_nss.c:557 +msgid "Could not generate random data." +msgstr "ਰਲਵਾਂ ਡਾਟਾ ਤਿਆਰ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਿਆ।" + +#: ../libnm-util/nm-utils.c:1925 +#, c-format +msgid "Not enough memory to make encryption key." +msgstr "ਇੰਕ੍ਰਿਪਸ਼ਨ ਕੁੰਜੀ ਬਣਾਉਣ ਲਈ ਲੋੜੀਦੀ ਮੈਮੋਰੀ ਨਹੀਂ ਹੈ।" + +#: ../libnm-util/nm-utils.c:2035 +msgid "Could not allocate memory for PEM file creation." +msgstr "PEM ਫਾਇਲ ਬਣਾਉਣ ਲਈ ਮੈਮੋਰੀ ਜਾਰੀ ਨਹੀਂ ਕੀਤੀ ਜਾ ਸਕੀ।" + +#: ../libnm-util/nm-utils.c:2047 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "PEM ਫਾਇਲ ਵਾਸਤੇ IV ਲਿਖਣ ਲਈ ਮੈਮੋਰੀ ਦਿੱਤੀ ਨਹੀਂ ਜਾ ਸਕੀ।" + +#: ../libnm-util/nm-utils.c:2059 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "PEM ਫਾਇਲ ਵਾਸਤੇ ਇੰਕ੍ਰਿਪਟ ਕੀਤੀ ਕੁੰਜੀ ਲਿਖਣ ਲਈ ਮੈਮੋਰੀ ਦਿੱਤੀ ਨਹੀਂ ਜਾ ਸਕੀ।" + +#: ../libnm-util/nm-utils.c:2078 +#, c-format +msgid "Could not allocate memory for PEM file data." +msgstr "PEM ਫਾਇਲ ਡਾਟੇ ਲਈ ਮੈਮੋਰੀ ਜਾਰੀ ਨਹੀਂ ਕੀਤੀ ਜਾ ਸਕੀ" + +#: ../src/nm-netlink-monitor.c:100 ../src/nm-netlink-monitor.c:231 +#: ../src/nm-netlink-monitor.c:653 +#, c-format +msgid "error processing netlink message: %s" +msgstr "ਨੈੱਟਲਿੰਕ ਸੁਨੇਹੇ ਉੱਤੇ ਕਾਰਵਾਈ ਕਰਨ ਦੌਰਾਨ ਗਲਤੀ: %s" + +#: ../src/nm-netlink-monitor.c:214 msgid "error occurred while waiting for data on socket" msgstr "ਸਾਕਟ ਉੱਤੇ ਡਾਟੇ ਦੀ ਉਡੀਕ ਕਰਨ ਦੌਰਾਨ ਗਲਤੀ" -#: ../src/nm-ap-security-wpa-eap.c:93 ../src/nm-ap-security-wpa-eap.c:117 -msgid "WPA2 Enterprise" -msgstr "WPA2 ਇੰਟਰਪਰਾਈਸ" +#: ../src/nm-netlink-monitor.c:254 +#, c-format +msgid "unable to connect to netlink for monitoring link status: %s" +msgstr "ਲਿੰਕ ਹਾਲਤ ਦੀ ਨਿਗਰਾਨੀ ਲਈ ਨੈੱਟਲਿੰਕ ਨਾਲ ਕੁਨੈਕਟ ਕਰਨ ਲਈ ਅਸਮਰੱਥ: %s" -#: ../src/nm-ap-security-wpa-eap.c:95 ../src/nm-ap-security-wpa-eap.c:122 -msgid "WPA Enterprise" -msgstr "WPA ਇੰਟਰਪਰਾਈਸ" +#: ../src/nm-netlink-monitor.c:265 +#, c-format +msgid "unable to enable netlink handle credential passing: %s" +msgstr "netlink ਹੈੱਡਲ ਕਰੀਡੈਂਸ਼ਲ ਪਾਸਿੰਗ ਯੋਯਗ ਕਰਨ ਲਈ ਅਸਮਰੱਥ: %s" -#: ../src/nm-ap-security-leap.c:66 ../src/nm-ap-security-leap.c:82 -msgid "LEAP" -msgstr "LEAP" +#: ../src/nm-netlink-monitor.c:291 ../src/nm-netlink-monitor.c:353 +#, c-format +msgid "unable to allocate netlink handle for monitoring link status: %s" +msgstr "ਲਿੰਕ ਹਾਲਤ ਦੀ ਨਿਗਰਾਨੀ ਲਈ ਨੈੱਟਲਿੰਕ ਜਾਰੀ ਕਰਨ ਲਈ ਅਸਮਰੱਥ: %s" +#: ../src/nm-netlink-monitor.c:376 +#, c-format +msgid "unable to allocate netlink link cache for monitoring link status: %s" +msgstr "ਲਿੰਕ ਹਾਲਤ ਦੀ ਨਿਗਰਾਨੀ ਲਈ ਨੈੱਟਲਿੰਕ ਲਿੰਕ ਕੈਸ਼ ਜਾਰੀ ਕਰਨ ਲਈ ਅਸਮਰੱਥ: %s" + +#: ../src/nm-netlink-monitor.c:502 +#, c-format +msgid "unable to join netlink group: %s" +msgstr "netlink ਗਰੁੱਪ ਜੁਆਇੰਨ ਕਰਨ ਲਈ ਅਣਸਮਰੱਥ:: %s" + +#: ../src/nm-netlink-monitor.c:629 ../src/nm-netlink-monitor.c:642 +#, c-format +msgid "error updating link cache: %s" +msgstr "ਲਿੰਕ ਕੈਸ਼ ਅੱਪਡੇਟ ਕਰਨ ਦੌਰਾਨ ਗਲਤੀ: %s" + +#: ../src/main.c:502 +#, c-format +msgid "Invalid option. Please use --help to see a list of valid options.\n" +msgstr "ਗਲਤ ਚੋਣ। ਢੁੱਕਵੀਆਂ ਚੋਣਾਂ ਵੇਖਣ ਲਈ --help ਵਰਤੋਂ ਜੀ।\n" + +#: ../src/main.c:562 +#, c-format +msgid "%s. Please use --help to see a list of valid options.\n" +msgstr "%s। ਢੁੱਕਵੀਆਂ ਚੋਣਾਂ ਦੀ ਲਿਸਟ ਵੇਖਣ ਲਈ --help ਵਰਤੋਂ ਜੀ।\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:325 +msgid "# Created by NetworkManager\n" +msgstr "#ਨੈੱਟਵਰਕ ਮੈਨੇਜਰ ਵਲੋਂ ਬਣਾਈ\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:341 +#, c-format +msgid "" +"# Merged from %s\n" +"\n" +msgstr "" +"#%s ਤੋਂ ਮਿਲਾਇਆ\n" +"\n" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:279 +msgid "no usable DHCP client could be found." +msgstr "ਕੋਈ ਵਰਤੋਂਯੋਗ DHCP ਕਲਾਇਟ ਨਹੀਂ ਲੱਭਿਆ ਜਾ ਸਕਿਆ।" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:288 +msgid "'dhclient' could be found." +msgstr "'dhclient' ਲੱਭਿਆ ਜਾ ਸਕਿਆ।" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:298 +msgid "'dhcpcd' could be found." +msgstr "'dhcpcd' ਲੱਭਿਆ ਜਾ ਸਕਿਆ।" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:306 +#, c-format +msgid "unsupported DHCP client '%s'" +msgstr "ਗੈਰਸਹਾਇਕ DHCP ਕਲਾਇਟ '%s'" + +#: ../src/logging/nm-logging.c:146 +#, c-format +msgid "Unknown log level '%s'" +msgstr "ਅਣਜਾਣ ਲਾਗ ਲੈਵਲ '%s'" + +#: ../src/logging/nm-logging.c:171 +#, c-format +msgid "Unknown log domain '%s'" +msgstr "ਅਣਜਾਣ ਲਾਗ ਡੋਮੇਨ '%s'" + +#: ../src/named-manager/nm-named-manager.c:343 +msgid "NOTE: the libc resolver may not support more than 3 nameservers." +msgstr "ਨੋਟ: libc ਰਿਜ਼ੋਲਵਰ ੩ ਤੋਂ ਵੱਧ ਨੇਮ-ਸਰਵਰ ਲਈ ਸਹਾਇਕ ਨਹੀਂ ਹੋ ਸਕਦਾ ਹੈ।" + +#: ../src/named-manager/nm-named-manager.c:345 +msgid "The nameservers listed below may not be recognized." +msgstr "ਹੇਠਾਂ ਦਿੱਤੇ ਨੇਮ-ਸਰਵਰ ਪਛਾਣੇ ਨਹੀਂ ਜਾ ਸਕਦੇ।" + +#: ../src/system-settings/nm-default-wired-connection.c:157 +#, c-format +msgid "Auto %s" +msgstr "ਆਟੋ %s" + +#: ../system-settings/plugins/ifcfg-rh/reader.c:3256 +msgid "System" +msgstr "IPL ਲੀਨਕਸ (Linux) ਸਿਸਟਮ।" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "ਸੁਰੱਖਿਅਤ ਵਾਈ-ਫਾਈ ਨੈੱਟਵਰਕ ਰਾਹੀਂ ਕੁਨੈਕਸ਼ਨ ਸਾਂਝਾ ਕਰੋ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "ਓਪਨ ਵਾਈ-ਫਾਈ ਨੈੱਟਵਰਕ ਰਾਹੀਂ ਕੁਨੈਕਸ਼ਨ ਸਾਂਝਾ ਕਰੋ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "ਸਥਿਰ ਸਿਸਟਮ ਹੋਸਟ-ਨਾਂ ਸੋਧ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 +msgid "Modify system connections" +msgstr "ਸਿਸਟਮ ਕੁਨੈਸ਼ਨ ਸੋਧ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 +msgid "System policy prevents modification of system settings" +msgstr "ਸਿਸਟਮ ਪਾਲਸੀ ਸਿਸਟਮ ਸੈਟਿੰਗ ਲਈ ਸੋਧ ਤੋਂ ਰੋਕਦੀ ਹੈ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +msgid "System policy prevents modification of the persistent system hostname" +msgstr "ਸਿਸਟਮ ਪਾਲਸੀ ਸਥਿਰ ਸਿਸਟਮ ਹੋਸਟ-ਨਾਂ ਲਈ ਸੋਧਾਂ ਤੋਂ ਰੋਕਦੀ ਹੈ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "ਸਿਸਟਮ ਪਾਲਸੀ ਕੁਨੈਕਸ਼ਨ ਨੂੰ ਸੁਰੱਖਿਅਤ ਵਾਈ-ਫਾਈ ਨੈੱਟਵਰਕ ਰਾਹੀਂ ਸਾਂਝਾ ਕਰਨ ਤੋਂ ਰੋਕਦੀ ਹੈ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "ਸਿਸਟਮ ਪਾਲਸੀ ਕੁਨੈਕਸ਼ਨ ਨੂੰ ਓਪਨ ਵਾਈ-ਫਾਈ ਨੈੱਟਵਰਕ ਰਾਹੀਂ ਸਾਂਝਾ ਕਰਨ ਤੋਂ ਰੋਕਦੀ ਹੈ" + +#~ msgid "Type" +#~ msgstr "ਕਿਸਮ" + +#~ msgid "Name" +#~ msgstr "ਨਾਂ" + +#~ msgid "User connections:\n" +#~ msgstr "ਯੂਜ਼ਰ ਕੁਨੈਕਸ਼ਨ:\n" + +#~ msgid "System-wide connections" +#~ msgstr "ਸਿਸਟਮ-ਲਈ ਕੁਨੈਕਸ਼ਨ" + +#~ msgid "Default" +#~ msgstr "ਡਿਫਾਲਟ" + +#~ msgid "Service" +#~ msgstr "ਸਰਵਿਸ" + +#~ msgid "%s, %s, Freq %d MHz, Rate %d Mb/s, Strength %d" +#~ msgstr "%s, %s, ਫਰੀਕਿਊਂਸੀ %d MHz, ਦਰ %d Mb/s, ਤਾਕਤ %d" + +#~ msgid "Device" +#~ msgstr "ਜੰਤਰ" + +#~ msgid "Driver" +#~ msgstr "ਡਰਾਇਵਰ" + +#~ msgid "State" +#~ msgstr "ਹਾਲਤ" + +#~ msgid "HW Address" +#~ msgstr "HW ਐਡਰੈੱਸ" + +#~ msgid "" +#~ "\n" +#~ " Capabilities:\n" +#~ msgstr "" +#~ "\n" +#~ " ਸਮਰੱਥਾ:\n" + +#~ msgid "Carrier Detect" +#~ msgstr "ਕੈਰੀਅਰ ਖੋਜ" + +#~ msgid "Speed" +#~ msgstr "ਸਪੀਡ" + +#~ msgid "" +#~ "\n" +#~ " Wireless Properties\n" +#~ msgstr "" +#~ "\n" +#~ " ਬੇਤਾਰ ਵਿਸ਼ੇਸ਼ਤਾ\n" + +#~ msgid "WEP Encryption" +#~ msgstr "WEP ਇੰਕ੍ਰਿਪਸ਼ਨ" + +#~ msgid "WPA Encryption" +#~ msgstr "WPA ਇੰਕ੍ਰਿਪਸ਼ਨ" + +#~ msgid "WPA2 Encryption" +#~ msgstr "WPA2 ਇੰਕ੍ਰਿਪਸ਼ਨ" + +#~ msgid "TKIP cipher" +#~ msgstr "TKIP ਸਿਫਰ" + +#~ msgid "CCMP cipher" +#~ msgstr "CCMP ਸੀਫਰ" + +#~ msgid "" +#~ "\n" +#~ " Wireless Access Points %s\n" +#~ msgstr "" +#~ "\n" +#~ " ਬੇਤਾਰ ਅਸੈੱਸ ਪੁਆਇੰਟ %s\n" + +#~ msgid "(* = current AP)" +#~ msgstr "(* = current AP)" + +#~ msgid "" +#~ "\n" +#~ " Wired Properties\n" +#~ msgstr "" +#~ "\n" +#~ " ਤਾਰ ਨਾਲ ਵਿਸ਼ੇਸ਼ਤਾ\n" + +#~ msgid "Carrier" +#~ msgstr "ਕੈਰੀਅਰ" + +#~ msgid "" +#~ "\n" +#~ " IPv4 Settings:\n" +#~ msgstr "" +#~ "\n" +#~ " IPv4 ਵਿਸ਼ੇਸ਼ਤਾ:\n" + +#~ msgid "Address" +#~ msgstr "ਐਡਰੈੱਸ" + +#~ msgid "Prefix" +#~ msgstr "ਪ੍ਰੀ-ਫਿਕਸ" + +#~ msgid "Gateway" +#~ msgstr "ਗੇਟਵੇ" + +#~ msgid "Device:" +#~ msgstr "ਜੰਤਰ:" + +#~ msgid "Error: hwaddr has to be specified." +#~ msgstr "ਗਲਤੀ: hwaddr ਦੇਣ ਦੀ ਲੋੜ ਹੈ।" + +#~ msgid "AP parameters" +#~ msgstr "AP ਪੈਰਾਮੀਟਰ" + +#~ msgid "Frequency:" +#~ msgstr "ਫਰੀਕਿਊਨਸੀ:" + +#~ msgid "Mode:" +#~ msgstr "ਮੋਡ:" + +#~ msgid "Ad-hoc" +#~ msgstr "Ad-hoc" + +#~ msgid "Maximal bitrate:" +#~ msgstr "ਵੱਧੋ-ਵੱਧ ਬਿੱਟਰੇਟ:" + +#~ msgid "Strength:" +#~ msgstr "ਤਾਕਤ:" + +#~ msgid "Flags:" +#~ msgstr "ਫਲੈਗ:" + +#~ msgid "privacy" +#~ msgstr "ਪਰਾਈਵੇਸੀ" + +#~ msgid "WPA flags:" +#~ msgstr "WPA ਫਲੈਗ:" + +#~ msgid "RSN flags:" +#~ msgstr "RSN ਫਲੈਗ:" + +#~ msgid "NM running:" +#~ msgstr "NM ਚੱਲ ਰਿਹਾ ਹੈ:" + +#~ msgid "NM state:" +#~ msgstr "NM ਹਾਲਤ:" + +#~ msgid "NM wireless hardware:" +#~ msgstr "NM ਬੇਤਾਰ ਹਾਰਡਵੇਅਰ:" + +#~ msgid "NM wireless:" +#~ msgstr "NM ਬੇਤਾਰ:" + +#~ msgid "NM WWAN hardware:" +#~ msgstr "NM WWAN ਹਾਰਡਵੇਅਰ:" + +#~ msgid "unable to join netlink group for monitoring link status: %s" +#~ msgstr "ਲਿੰਕ ਹਾਲਤ ਦੀ ਨਿਗਰਾਨੀ ਲਈ ਨੈੱਟਲਿੰਕ ਗਰੁੱਪ ਜੁਆਇੰਨ ਕਰਨ ਲਈ ਅਸਮਰੱਥ: %s" + +#~ msgid "unable to connect to netlink: %s" +#~ msgstr "netlink ਨਾਲ ਕੁਨੈਕਟ ਹੋਣ ਲਈ ਅਸਮਰੱਥ: %s" + +#~ msgid "Cannot add VPN connection" +#~ msgstr "VPN ਕੁਨੈਕਸ਼ਨ ਜੋੜਿਆ ਨਹੀਂ ਜਾ ਸਕਦਾ ਹੈ" + +#~ msgid "" +#~ "No suitable VPN software was found on your system. Contact your system " +#~ "administrator." +#~ msgstr "" +#~ "ਤੁਹਾਡੇ ਸਿਸਟਮ ਉੱਤੇ ਕੋਈ ਠੀਕ VPN ਸਾਫਟਵੇਅਰ ਨਹੀਂ ਲੱਭਾ ਹੈ। ਆਪਣੇ ਸਿਸਟਮ ਪਰਸ਼ਾਸ਼ਕ ਨਾਲ ਸੰਪਰਕ ਕਰੋ।" + +#~ msgid "Cannot import VPN connection" +#~ msgstr "VPN ਕੁਨੈਕਸ਼ਨ ਆਯਾਤ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਦਾ" + +#~ msgid "" +#~ "Cannot find suitable software for VPN connection type '%s' to import the " +#~ "file '%s'. Contact your system administrator." +#~ msgstr "" +#~ "VPN ਕੁਨੈਕਸ਼ਨ ਕਿਸਮ '%s' ਲਈ ਫਾਇਲ '%s' ਆਯਾਤ ਕਰਨ ਲਈ ਕੋਈ ਢੁੱਕਵਾਂ ਸਾਫਟਵੇਅਰ ਨਹੀਂ ਲੱਭਿਆ ਹੈ। " +#~ "ਆਪਣੇ ਸਿਸਟਮ ਪਰਸ਼ਾਸ਼ਕ ਨਾਲ ਸੰਪਰਕ ਕਰੋ।" + +#~ msgid "" +#~ "Could not find the UI files for VPN connection type '%s'. Contact your " +#~ "system administrator." +#~ msgstr "" +#~ "VPN ਕੁਨੈਕਸ਼ਨ ਕਿਸਮ '%s' ਲਈ UI ਫਾਇਲਾਂ ਨਹੀਂ ਲੱਭੀਆਂ ਹਨ। ਆਪਣੇ ਸਿਸਟਮ ਪਰਸ਼ਾਸ਼ਕ ਨਾਲ ਸੰਪਰਕ ਕਰੋ।" + +#~ msgid "Delete VPN connection \"%s\"?" +#~ msgstr "ਕੀ VPN \"%s\" ਕੁਨੈਕਸ਼ਨ ਹਟਾਉਣਾ ਹੈ?" + +#~ msgid "" +#~ "All information about the VPN connection \"%s\" will be lost and you may " +#~ "need your system administrator to provide information to create a new " +#~ "connection." +#~ msgstr "" +#~ "VPN ਕੁਨੈਕਸ਼ਨ \"%s\" ਬਾਰੇ ਸਭ ਜਾਣਕਾਰੀ ਖਤਮ ਹੋ ਗਈ ਹੈ ਅਤੇ ਤੁਹਾਨੂੰ ਨਵੇਂ ਕੁਨੈਕਸ਼ਨ ਬਣਾਉਣ ਲਈ " +#~ "ਜਾਣਕਾਰੀ ਵਾਸਤੇ ਆਪਣੇ ਸਿਸਟਮ ਪਰਸ਼ਾਸ਼ਕ ਨਾਲ ਸੰਪਰਕ ਕਰਨਾ ਪਵੇਗਾ।" + +#~ msgid "Unable to load" +#~ msgstr "ਲੋਡ ਕਰਨ ਲਈ ਫੇਲ੍ਹ" + +#~ msgid "Cannot find some needed resources (the glade file)!" +#~ msgstr "ਕੁਝ ਲੋੜੀਦੇ ਸਰੋਤ ਨਹੀਂ ਮਿਲੇ (ਗਲੇਡ ਫਾਇਲ)!" + +#~ msgid "Create VPN Connection" +#~ msgstr "VPN ਕੁਨੈਕਸ਼ਨ ਬਣਾਓ" + +#~ msgid "Edit VPN Connection" +#~ msgstr "VPN ਕੁਨੈਕਸ਼ਨ ਸੋਧ" + +#~ msgid "Add a new VPN connection" +#~ msgstr "ਇੱਕ ਨਵਾਂ VPN ਕੁਨੈਕਸ਼ਨ ਸ਼ਾਮਿਲ" + +#~ msgid "Delete the selected VPN connection" +#~ msgstr "ਚੁਣਿਆ VPN ਕੁਨੈਕਸ਼ਨ ਹਟਾਓ" + +#~ msgid "E_xport" +#~ msgstr "ਨਿਰਯਾਤ(_x)" + +#~ msgid "Edit the selected VPN connection" +#~ msgstr "ਚੁਣੇ VPN ਕੁਨੈਕਸ਼ਨ 'ਚ ਸੋਧ" + +#~ msgid "Export the VPN settings to a file" +#~ msgstr "VPN ਸੈਟਿੰਗ ਨੂੰ ਫਾਇਲ 'ਚ ਭੇਜੋ" + +#~ msgid "Export the selected VPN connection to a file" +#~ msgstr "ਚੁਣੇ VPN ਕੁਨੈਕਸ਼ਨ ਫਾਇਲ 'ਚ ਭੇਜੋ" + +#~ msgid "Manage Virtual Private Network Connections" +#~ msgstr "ਵੁਰਚੁਅਲ ਪ੍ਰਾਈਵੇਟ ਨੈੱਟਵਰਕ ਕੁਨੈਕਸ਼ਨ ਪਰਬੰਧ" + +#~ msgid "40-bit WEP" +#~ msgstr "40-ਬਿੱਟ WEP" + +#~ msgid "104-bit WEP" +#~ msgstr "104-ਬਿੱਟ WEP" + +#~ msgid "WPA Automatic" +#~ msgstr "WPA ਆਟੋਮੈਟਿਕ" + +#~ msgid "WPA2 TKIP" +#~ msgstr "WPA2 TKIP" + +#~ msgid "WPA2 CCMP" +#~ msgstr "WPA2 CCMP" + +#~ msgid "WPA2 Automatic" +#~ msgstr "WPA2 ਆਟੋਮੈਟਿਕ" + +#~ msgid "operation took too long" +#~ msgstr "ਓਪਰੇਸ਼ਨ ਨੂੰ ਬਹੁਤ ਸਮਾਂ ਲੱਗ ਗਿਆ" + +#~ msgid "received data from wrong type of sender" +#~ msgstr "ਭੇਜਣ ਵਾਲੇ ਦੀ ਗਲਤ ਕਿਸਮ ਤੋਂ ਡਾਟਾ ਮਿਲਿਆ" + +#~ msgid "received data from unexpected sender" +#~ msgstr "ਅਣਜਾਣ ਭੇਜਣ ਵਾਲੇ ਵਲੋਂ ਡਾਟਾ ਮਿਲਿਆ" + +#~ msgid "too much data was sent over socket and some of it was lost" +#~ msgstr "ਸਾਕਟ ਉੱਤੇ ਬਹੁਤ ਵੱਧ ਡਾਟਾ ਭੇਜਿਆ ਗਿਆ ਅਤੇ ਇਸ 'ਚੋਂ ਕੁਝ ਗੁੰਮ ਹੋ ਗਿਆ" diff --git a/po/pl.po b/po/pl.po index bcee37a9b5..7ffa179913 100644 --- a/po/pl.po +++ b/po/pl.po @@ -8,9 +8,9 @@ msgid "" msgstr "" "Project-Id-Version: NetworkManager\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager&component=general\n" -"POT-Creation-Date: 2009-08-27 03:24+0000\n" -"PO-Revision-Date: 2009-09-09 01:47+0200\n" -"Last-Translator: Piotr Drąg \n" +"POT-Creation-Date: 2010-02-26 03:24+0000\n" +"PO-Revision-Date: 2010-03-08 11:52+0100\n" +"Last-Translator: Tomasz Dominikowski \n" "Language-Team: Polish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -19,6 +19,1076 @@ msgstr "" "X-Poedit-Language: Polish\n" "X-Poedit-Country: Poland\n" + +#: ../cli/src/connections.c:86 +#, c-format +msgid "" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout ]\n" +" down id | uuid \n" +msgstr "" +"Użycie: nmcli con { POLECENIE | help }\n" +" POLECENIE := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout ]\n" +" down id | uuid \n" + + +#: ../cli/src/connections.c:158 +msgid "Connections" +msgstr "Połączenia" + + +#: ../cli/src/connections.c:158 +#: ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 +#: ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 +#: ../cli/src/connections.c:207 +#: ../cli/src/devices.c:298 +#: ../cli/src/devices.c:458 +#: ../cli/src/devices.c:460 +msgid "Type" +msgstr "Typ" + + +#: ../cli/src/connections.c:158 +#: ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 +#: ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 +#: ../cli/src/connections.c:207 +#: ../cli/src/connections.c:297 +#: ../cli/src/connections.c:299 +msgid "UUID" +msgstr "UUID" + + +#: ../cli/src/connections.c:158 +#: ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 +#: ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 +#: ../cli/src/connections.c:207 +#: ../cli/src/connections.c:297 +#: ../cli/src/connections.c:299 +msgid "Name" +msgstr "Nazwa" + + +#: ../cli/src/connections.c:163 +#, c-format +msgid "System connections:\n" +msgstr "Połączenia systemowe:\n" + + +#: ../cli/src/connections.c:167 +#, c-format +msgid "User connections:\n" +msgstr "Połączenia użytkownika:\n" + + +#: ../cli/src/connections.c:178 +#: ../cli/src/connections.c:967 +#: ../cli/src/connections.c:983 +#: ../cli/src/connections.c:992 +#: ../cli/src/connections.c:1003 +#: ../cli/src/connections.c:1085 +#: ../cli/src/devices.c:604 +#: ../cli/src/devices.c:614 +#: ../cli/src/devices.c:699 +#: ../cli/src/devices.c:785 +#: ../cli/src/devices.c:792 +#, c-format +msgid "Error: %s argument is missing." +msgstr "Błąd: brak parametru %s." + + +#: ../cli/src/connections.c:189 +#, c-format +msgid "Error: %s - no such connection." +msgstr "Błąd: %s - nie ma takiego połączenia." + + +#: ../cli/src/connections.c:196 +msgid "System-wide connections" +msgstr "Połączenia systemowe" + + +#: ../cli/src/connections.c:205 +msgid "User connections" +msgstr "Połączenia użytkownika" + + +#: ../cli/src/connections.c:212 +#: ../cli/src/connections.c:1016 +#: ../cli/src/connections.c:1103 +#: ../cli/src/devices.c:446 +#: ../cli/src/devices.c:494 +#: ../cli/src/devices.c:628 +#: ../cli/src/devices.c:706 +#: ../cli/src/devices.c:798 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "Nieznany parametr: %s\n" + + +#: ../cli/src/connections.c:221 +#, c-format +msgid "Error: no valid parameter specified." +msgstr "Błąd: nie podano prawidłowego parametru." + + +#. FIXME: Fix the output +#: ../cli/src/connections.c:268 +#: ../cli/src/devices.c:302 +#: ../cli/src/devices.c:321 +#: ../cli/src/devices.c:353 +#: ../cli/src/devices.c:355 +#: ../cli/src/devices.c:357 +#: ../cli/src/devices.c:359 +#: ../cli/src/devices.c:361 +msgid "yes" +msgstr "tak" + + +#: ../cli/src/connections.c:268 +#: ../cli/src/devices.c:304 +msgid "no" +msgstr "nie" + + +#: ../cli/src/connections.c:297 +msgid "Active connections" +msgstr "Aktywne połączenia" + + +#: ../cli/src/connections.c:297 +#: ../cli/src/connections.c:299 +#: ../cli/src/devices.c:302 +#: ../cli/src/devices.c:304 +msgid "Default" +msgstr "Domyślne" + + +#: ../cli/src/connections.c:297 +#: ../cli/src/connections.c:299 +msgid "Service" +msgstr "Usługa" + + +#: ../cli/src/connections.c:297 +#: ../cli/src/connections.c:299 +msgid "Devices" +msgstr "Urządzenia" + + +#: ../cli/src/connections.c:659 +#, c-format +msgid "no active connection on device '%s'" +msgstr "brak aktywnych połączeń na urządzeniu \"%s\"" + + +#: ../cli/src/connections.c:667 +#, c-format +msgid "no active connection or device" +msgstr "brak aktywnych połączeń na urządzeń" + + +#: ../cli/src/connections.c:730 +msgid "activating" +msgstr "aktywowanie" + + +#: ../cli/src/connections.c:732 +msgid "activated" +msgstr "aktywowano" + + +#: ../cli/src/connections.c:735 +#: ../cli/src/connections.c:758 +#: ../cli/src/connections.c:791 +#: ../cli/src/devices.c:111 +#: ../cli/src/network-manager.c:76 +#: ../cli/src/network-manager.c:98 +msgid "unknown" +msgstr "nieznane" + + +#: ../cli/src/connections.c:744 +msgid "VPN connecting (prepare)" +msgstr "Łączenie z VPN (przygotowanie)" + + +#: ../cli/src/connections.c:746 +msgid "VPN connecting (need authentication)" +msgstr "Łączenie z VPN (wymaga uwierzytelnienia)" + + +#: ../cli/src/connections.c:748 +msgid "VPN connecting" +msgstr "Łączenie z VPN" + + +#: ../cli/src/connections.c:750 +msgid "VPN connecting (getting IP configuration)" +msgstr "Łączenie z VPN (pobieranie konfiguracji adresu IP)" + + +#: ../cli/src/connections.c:752 +msgid "VPN connected" +msgstr "Połączono z VPN" + + +#: ../cli/src/connections.c:754 +msgid "VPN connection failed" +msgstr "Połączenie z VPN się nie powiodło" + + +#: ../cli/src/connections.c:756 +msgid "VPN disconnected" +msgstr "Rozłączono z VPN" + + +#: ../cli/src/connections.c:767 +msgid "unknown reason" +msgstr "nieznany powód" + + +#: ../cli/src/connections.c:769 +msgid "none" +msgstr "brak" + + +#: ../cli/src/connections.c:771 +msgid "the user was disconnected" +msgstr "użytkownik został rozłączony" + + +#: ../cli/src/connections.c:773 +msgid "the base network connection was interrupted" +msgstr "podstawowe połączenie sieciowe zostało przerwane" + + +#: ../cli/src/connections.c:775 +msgid "the VPN service stopped unexpectedly" +msgstr "usługa VPN została nieoczekiwanie zatrzymana" + + +#: ../cli/src/connections.c:777 +msgid "the VPN service returned invalid configuration" +msgstr "usługa VPN zwróciła nieprawidłową konfigurację" + + +#: ../cli/src/connections.c:779 +msgid "the connection attempt timed out" +msgstr "próba połączenia przekroczyła czas oczekiwania" + + +#: ../cli/src/connections.c:781 +msgid "the VPN service did not start in time" +msgstr "usługa VPN nie została uruchomiona w czasie" + + +#: ../cli/src/connections.c:783 +msgid "the VPN service failed to start" +msgstr "uruchomienie usługi VPN się nie powiodło" + + +#: ../cli/src/connections.c:785 +msgid "no valid VPN secrets" +msgstr "brak prawidłowych haseł VPN" + + +#: ../cli/src/connections.c:787 +msgid "invalid VPN secrets" +msgstr "nieprawidłowe hasła VPN" + + +#: ../cli/src/connections.c:789 +msgid "the connection was removed" +msgstr "połączenie zostało usunięte" + + +#: ../cli/src/connections.c:803 +#, c-format +msgid "state: %s\n" +msgstr "stan: %s\n" + + +#: ../cli/src/connections.c:806 +#: ../cli/src/connections.c:832 +#, c-format +msgid "Connection activated\n" +msgstr "Aktywowano połączenie\n" + + +#: ../cli/src/connections.c:809 +#, c-format +msgid "Error: Connection activation failed." +msgstr "Błąd: aktywacja połączenia się nie powiodła." + + +#: ../cli/src/connections.c:828 +#, c-format +msgid "state: %s (%d)\n" +msgstr "stan: %s (%d)\n" + + +#: ../cli/src/connections.c:838 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "Błąd: aktywacja połączenia się nie powiodła: %s." + + +#: ../cli/src/connections.c:855 +#: ../cli/src/devices.c:551 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "Błąd: przekroczono czas oczekiwania o %d sekund." + + +#: ../cli/src/connections.c:898 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "Błąd: aktywacja połączenia się nie powiodła: %s" + + +#: ../cli/src/connections.c:912 +#, c-format +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "Błąd: uzyskanie aktywnego połączenia dla \"%s\" się nie powiodło." + + +#: ../cli/src/connections.c:921 +#, c-format +msgid "Active connection state: %s\n" +msgstr "Stan aktywnego połączenia: %s\n" + + +#: ../cli/src/connections.c:922 +#, c-format +msgid "Active connection path: %s\n" +msgstr "Ścieżka aktywnego połączenia: %s\n" + + +#: ../cli/src/connections.c:976 +#: ../cli/src/connections.c:1094 +#, c-format +msgid "Error: Unknown connection: %s." +msgstr "Błąd: nieznane połączenie: %s." + + +#: ../cli/src/connections.c:1011 +#: ../cli/src/devices.c:622 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "Błąd: wartość czasu oczekiwania \"%s\" jest nieprawidłowa." + + +#: ../cli/src/connections.c:1024 +#: ../cli/src/connections.c:1111 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "Błąd: należy podać identyfikator lub UUID." + + +#: ../cli/src/connections.c:1044 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "Błąd: nie odnaleziono odpowiedniego urządzenia: %s" + + +#: ../cli/src/connections.c:1046 +#, c-format +msgid "Error: No suitable device found." +msgstr "Błąd: nie odnaleziono odpowiedniego urządzenia." + + +#: ../cli/src/connections.c:1138 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "Ostrzeżenie: połączenie nie jest aktywne\n" + + +#: ../cli/src/connections.c:1189 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "Błąd: polecenie \"con\" \"%s\" jest nieprawidłowe." + + +#: ../cli/src/connections.c:1216 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "Błąd: nie można połączyć się z D-Bus." + + +#: ../cli/src/connections.c:1223 +#, c-format +msgid "Error: Could not get system settings." +msgstr "Błąd: nie można uzyskać ustawień systemu." + + +#: ../cli/src/connections.c:1231 +#, c-format +msgid "Error: Could not get user settings." +msgstr "Błąd: nie można uzyskać ustawień użytkownika." + + +#: ../cli/src/connections.c:1241 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "Błąd: nie można uzyskać połączeń: usługi ustawień nie są uruchomione." + + +#: ../cli/src/devices.c:73 +#, c-format +msgid "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] | apinfo iface hwaddr ]\n" +"\n" +msgstr "" +"Użycie: nmcli dev { POLECENIE | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] | apinfo iface hwaddr ]\n" +"\n" + + +#: ../cli/src/devices.c:93 +msgid "unmanaged" +msgstr "niezarządzane" + + +#: ../cli/src/devices.c:95 +msgid "unavailable" +msgstr "niedostępne" + + +#: ../cli/src/devices.c:97 +#: ../cli/src/network-manager.c:73 +msgid "disconnected" +msgstr "rozłączono" + + +#: ../cli/src/devices.c:99 +msgid "connecting (prepare)" +msgstr "łączenie (przygotowanie)" + + +#: ../cli/src/devices.c:101 +msgid "connecting (configuring)" +msgstr "łączenie (konfigurowanie)" + + +#: ../cli/src/devices.c:103 +msgid "connecting (need authentication)" +msgstr "łączenie (wymaga uwierzytelnienia)" + + +#: ../cli/src/devices.c:105 +msgid "connecting (getting IP configuration)" +msgstr "łączenie (pobieranie konfiguracji adresu IP)" + + +#: ../cli/src/devices.c:107 +#: ../cli/src/network-manager.c:71 +msgid "connected" +msgstr "połączono" + + +#: ../cli/src/devices.c:109 +msgid "connection failed" +msgstr "połączenie się nie powiodło" + + +#: ../cli/src/devices.c:132 +#: ../cli/src/devices.c:876 +msgid "Unknown" +msgstr "Nieznane" + + +#. print them +#: ../cli/src/devices.c:164 +#: ../cli/src/devices.c:266 +#: ../cli/src/devices.c:861 +#: ../cli/src/devices.c:879 +msgid "(none)" +msgstr "(brak)" + + +#: ../cli/src/devices.c:209 +#, c-format +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s: błąd podczas konwertowania adresu IPv4 0x%X" + + +#: ../cli/src/devices.c:238 +#, c-format +msgid "%s, %s, Freq %d MHz, Rate %d Mb/s, Strength %d" +msgstr "%s, %s, częstotliwość %d MHz, prędkość %d Mb/s, siła sygnału %d" + + +#: ../cli/src/devices.c:239 +msgid "Ad-Hoc" +msgstr "Ad-hoc" + + +#: ../cli/src/devices.c:248 +msgid ", Encrypted: " +msgstr ", zaszyfrowane: " + + +#: ../cli/src/devices.c:253 +msgid " WEP" +msgstr " WEP" + + +#: ../cli/src/devices.c:255 +msgid " WPA" +msgstr " WPA" + + +#: ../cli/src/devices.c:257 +msgid " WPA2" +msgstr " WPA2" + + +#: ../cli/src/devices.c:260 +msgid " Enterprise" +msgstr " Enterprise" + + +#: ../cli/src/devices.c:294 +#: ../cli/src/devices.c:458 +#: ../cli/src/devices.c:460 +msgid "Device" +msgstr "Urządzenie" + + +#: ../cli/src/devices.c:299 +msgid "Driver" +msgstr "Sterownik" + + +#: ../cli/src/devices.c:299 +#: ../cli/src/devices.c:567 +msgid "(unknown)" +msgstr "(nieznane)" + + +#: ../cli/src/devices.c:300 +#: ../cli/src/devices.c:458 +#: ../cli/src/devices.c:460 +msgid "State" +msgstr "Stan" + + +#: ../cli/src/devices.c:313 +msgid "HW Address" +msgstr "Adres sprzętowy" + + +#: ../cli/src/devices.c:319 +#, c-format +msgid "" +"\n" +" Capabilities:\n" +msgstr "" +"\n" +" Możliwości:\n" + + +#: ../cli/src/devices.c:321 +msgid "Carrier Detect" +msgstr "Wykrywanie operatora" + + +#: ../cli/src/devices.c:336 +#, c-format +msgid "%u Mb/s" +msgstr "%u Mb/s" + + +#: ../cli/src/devices.c:337 +msgid "Speed" +msgstr "Prędkość" + + +#: ../cli/src/devices.c:348 +#, c-format +msgid "" +"\n" +" Wireless Properties\n" +msgstr "" +"\n" +" Właściwości sieci bezprzewodowej\n" + + +#: ../cli/src/devices.c:353 +msgid "WEP Encryption" +msgstr "Szyfrowanie WEP" + + +#: ../cli/src/devices.c:355 +msgid "WPA Encryption" +msgstr "Szyfrowanie WPA" + + +#: ../cli/src/devices.c:357 +msgid "WPA2 Encryption" +msgstr "Szyfrowanie WPA2" + + +#: ../cli/src/devices.c:359 +msgid "TKIP cipher" +msgstr "Szyfr TKIP" + + +#: ../cli/src/devices.c:361 +msgid "CCMP cipher" +msgstr "Szyfr CCMP" + + +#: ../cli/src/devices.c:368 +#, c-format +msgid "" +"\n" +" Wireless Access Points %s\n" +msgstr "" +"\n" +" Bezprzewodowe punkty dostępowe %s\n" + + +#: ../cli/src/devices.c:368 +msgid "(* = current AP)" +msgstr "(* = bieżący punkt dostępowy)" + + +#: ../cli/src/devices.c:374 +#, c-format +msgid "" +"\n" +" Wired Properties\n" +msgstr "" +"\n" +" Właściwości sieci przewodowej\n" + + +#: ../cli/src/devices.c:377 +#: ../cli/src/devices.c:379 +msgid "Carrier" +msgstr "Operator" + + +#: ../cli/src/devices.c:377 +msgid "on" +msgstr "włączone" + + +#: ../cli/src/devices.c:379 +msgid "off" +msgstr "wyłączone" + + +#: ../cli/src/devices.c:387 +#, c-format +msgid "" +"\n" +" IPv4 Settings:\n" +msgstr "" +"\n" +" Ustawienia IPv4:\n" + + +#: ../cli/src/devices.c:395 +msgid "Address" +msgstr "Adres" + + +#: ../cli/src/devices.c:401 +msgid "Prefix" +msgstr "Przedrostek" + + +#: ../cli/src/devices.c:405 +msgid "Gateway" +msgstr "Brama" + + +#: ../cli/src/devices.c:416 +msgid "DNS" +msgstr "DNS" + + +#: ../cli/src/devices.c:458 +msgid "Status of devices" +msgstr "Stan urządzenia" + + +#: ../cli/src/devices.c:487 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "Błąd: brak parametru \"%s\"." + + +#: ../cli/src/devices.c:516 +#: ../cli/src/devices.c:655 +#: ../cli/src/devices.c:729 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "Błąd: nie odnaleziono urządzenia \"%s\"." + + +#: ../cli/src/devices.c:539 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "Powodzenie: urządzenie \"%s\" zostało rozłączone." + + +#: ../cli/src/devices.c:564 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "Błąd: rozłączenie urządzenia \"%s\" (%s) się nie powiodło: %s" + + +#: ../cli/src/devices.c:572 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "Stan urządzenia: %d (%s)\n" + + +#: ../cli/src/devices.c:636 +#, c-format +msgid "Error: iface has to be specified." +msgstr "Błąd: należy podać interfejs." + + +#: ../cli/src/devices.c:736 +#: ../cli/src/devices.c:746 +msgid "WiFi scan list" +msgstr "Lista skanowania sieci WiFi" + + +#: ../cli/src/devices.c:740 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "Błąd: urządzenie \"%s\" nie jest urządzeniem WiFi." + + +#: ../cli/src/devices.c:754 +msgid "Device:" +msgstr "Urządzenie:" + + +#: ../cli/src/devices.c:806 +#, c-format +msgid "Error: hwaddr has to be specified." +msgstr "Błąd: należy podać adres sprzętowy." + + +#: ../cli/src/devices.c:844 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "Błąd: nie odnaleziono punktu dostępowego z adresem sprzętowym \"%s\"." + + +#: ../cli/src/devices.c:862 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" + + +#: ../cli/src/devices.c:863 +#, c-format +msgid "%u MB/s" +msgstr "%u MB/s" + + +#: ../cli/src/devices.c:869 +#: ../cli/src/devices.c:871 +msgid "AP parameters" +msgstr "Parametry punkty dostępowego" + + +#: ../cli/src/devices.c:873 +msgid "SSID:" +msgstr "SSID:" + + +#: ../cli/src/devices.c:874 +msgid "BSSID:" +msgstr "BSSID:" + + +#: ../cli/src/devices.c:875 +msgid "Frequency:" +msgstr "Częstotliwość:" + + +#: ../cli/src/devices.c:876 +msgid "Mode:" +msgstr "Tryb:" + + +#: ../cli/src/devices.c:876 +msgid "Ad-hoc" +msgstr "Ad-hoc" + + +#: ../cli/src/devices.c:876 +msgid "Infrastructure" +msgstr "Infrastruktura" + + +#: ../cli/src/devices.c:877 +msgid "Maximal bitrate:" +msgstr "Maksymalna prędkość:" + + +#: ../cli/src/devices.c:878 +msgid "Strength:" +msgstr "Siła sygnału:" + + +#: ../cli/src/devices.c:879 +msgid "Flags:" +msgstr "Flagi:" + + +#: ../cli/src/devices.c:879 +msgid "privacy" +msgstr "prywatne" + + +#: ../cli/src/devices.c:880 +msgid "WPA flags:" +msgstr "Flagi WPA:" + + +#: ../cli/src/devices.c:881 +msgid "RSN flags:" +msgstr "Flagi RSN:" + + +#: ../cli/src/devices.c:907 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "Błąd: polecenie \"dev wifi\" \"%s\" jest nieprawidłowe." + + +#: ../cli/src/devices.c:943 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "Błąd: polecenie \"dev\" \"%s\" jest nieprawidłowe." + + +#: ../cli/src/network-manager.c:46 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" +msgstr "" +"Użycie: nmcli nm { POLECENIE | help }\n" +"\n" +" POLECENIE := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + + +#: ../cli/src/network-manager.c:67 +msgid "asleep" +msgstr "wstrzymane" + + +#: ../cli/src/network-manager.c:69 +msgid "connecting" +msgstr "łączenie" + + +#: ../cli/src/network-manager.c:93 +#: ../cli/src/network-manager.c:94 +#: ../cli/src/network-manager.c:95 +#: ../cli/src/network-manager.c:96 +#: ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:160 +msgid "enabled" +msgstr "włączone" + + +#: ../cli/src/network-manager.c:93 +#: ../cli/src/network-manager.c:94 +#: ../cli/src/network-manager.c:95 +#: ../cli/src/network-manager.c:96 +#: ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:160 +msgid "disabled" +msgstr "wyłączone" + + +#: ../cli/src/network-manager.c:102 +msgid "NetworkManager status" +msgstr "Stan programu NetworkManager" + + +#: ../cli/src/network-manager.c:104 +msgid "NM running:" +msgstr "Program NetworkManager jest uruchomiony:" + + +#: ../cli/src/network-manager.c:104 +msgid "running" +msgstr "uruchamiany" + + +#: ../cli/src/network-manager.c:104 +msgid "not running" +msgstr "nieuruchomiony" + + +#: ../cli/src/network-manager.c:105 +msgid "NM state:" +msgstr "Stan programu NetworkManager:" + + +#: ../cli/src/network-manager.c:106 +msgid "NM wireless hardware:" +msgstr "Adres sprzętowy programu NetworkManager:" + + +#. no argument, show current state +#: ../cli/src/network-manager.c:107 +#: ../cli/src/network-manager.c:143 +msgid "NM wireless:" +msgstr "Sieć bezprzewodowa programu NetworkManager:" + + +#: ../cli/src/network-manager.c:108 +msgid "NM WWAN hardware:" +msgstr "WWAM sprzętu programu NetworkManager:" + + +#. no argument, show current state +#: ../cli/src/network-manager.c:109 +#: ../cli/src/network-manager.c:160 +msgid "NM WWAN:" +msgstr "WWAN programu NetworkManager:" + + +#: ../cli/src/network-manager.c:150 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "Błąd: nieprawidłowy parametr \"wifi\": \"%s\"." + + +#: ../cli/src/network-manager.c:167 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "Błąd: nieprawidłowy parametr \"wwan\": \"%s\"." + + +#: ../cli/src/network-manager.c:178 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "Błąd: parametr \"nm\" \"%s\" jest nieprawidłowy." + + +#: ../cli/src/nmcli.c:65 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"Użycie: %s [OPCJE] OBIEKT { POLECENIE | help }\n" +"\n" +"OPCJE\n" +" -t[erse] zwięzłe wyjście\n" +" -p[retty] sformatowane wyjście\n" +" -v[ersion] wyświetla wersję programu\n" +" -h[elp] wyświetla tę opcję\n" +"\n" +"OBIEKT\n" +" nm stan programu NetworkManager\n" +" con połączenia programu NetworkManager\n" +" dev urządzenia zarządzane przez program NetworkManager\n" +"\n" + + +#: ../cli/src/nmcli.c:106 +#, c-format +msgid "Object '%s' is unknown, try 'nmcli help'." +msgstr "Obiekt \"%s\" jest nieznany. Można spróbować polecenie \"nmcli help\"." + + +#: ../cli/src/nmcli.c:139 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "narzędzie nmcli, wersja %s\n" + + +#: ../cli/src/nmcli.c:145 +#, c-format +msgid "Option '%s' is unknown, try 'nmcli -help'." +msgstr "Opcja \"%s\" jest nieznana. Można spróbować polecenie \"nmcli help\"." + + +#: ../cli/src/nmcli.c:164 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "Przechwycono sygnał %d, wyłączanie..." + + +#: ../cli/src/nmcli.c:189 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "Błąd: nie można połączyć się z programem NetworkManager." + + +#: ../cli/src/nmcli.c:205 +msgid "Success" +msgstr "Powodzenie" + + #: ../libnm-util/crypto.c:120 #, c-format msgid "PEM key file had no end tag '%s'." @@ -29,10 +1099,11 @@ msgstr "Plik klucza PEM nie zawiera znacznika końcowego \"%s\"." msgid "Doesn't look like a PEM private key file." msgstr "Nie wygląda na plik klucza prywatnego PEM." + #: ../libnm-util/crypto.c:138 #, c-format msgid "Not enough memory to store PEM file data." -msgstr "Brak wystarczającej ilości pamięci do przechowania danych PEM." +msgstr "Brak wystarczającej ilości pamięci do przechowania danych pliku PEM." #: ../libnm-util/crypto.c:154 #, c-format @@ -57,7 +1128,7 @@ msgstr "Uszkodzony plik PEM: brak IV w znaczniku DEK-Info." #: ../libnm-util/crypto.c:190 #, c-format msgid "Malformed PEM file: invalid format of IV in DEK-Info tag." -msgstr "Uszkodzony plik PEM: niepoprawny format IV w znaczniku DEK-Info." +msgstr "Uszkodzony plik PEM: nieprawidłowy format IV w znaczniku DEK-Info." #: ../libnm-util/crypto.c:203 #, c-format @@ -67,17 +1138,18 @@ msgstr "Uszkodzony plik PEM: nieznany szyfr klucza prywatnego: \"%s\"." #: ../libnm-util/crypto.c:222 #, c-format msgid "Could not decode private key." -msgstr "Nie można było zdekodować klucza prywatnego." +msgstr "Nie można zdekodować klucza prywatnego." #: ../libnm-util/crypto.c:267 #, c-format msgid "PEM certificate '%s' had no end tag '%s'." msgstr "Certyfikat PEM \"%s\" nie zawiera kończącego znacznika \"%s\"." + #: ../libnm-util/crypto.c:277 #, c-format msgid "Failed to decode certificate." -msgstr "Nieudane zdekodowanie certyfikatu." +msgstr "Zdekodowanie certyfikatu się nie powiodło." #: ../libnm-util/crypto.c:286 #, c-format @@ -89,24 +1161,28 @@ msgstr "Brak wystarczającej ilości pamięci do przechowania danych certyfikatu msgid "Not enough memory to store file data." msgstr "Brak wystarczającej ilości pamięci do przechowania danych pliku." + #: ../libnm-util/crypto.c:324 #, c-format msgid "IV must be an even number of bytes in length." -msgstr "Ilość bajtów w IV musi być parzystą liczbą." +msgstr "Liczba bajtów w IV musi być liczbą parzystą." #: ../libnm-util/crypto.c:333 #, c-format msgid "Not enough memory to store the IV." msgstr "Brak wystarczającej ilości pamięci do przechowania IV." + #: ../libnm-util/crypto.c:344 #, c-format msgid "IV contains non-hexadecimal digits." -msgstr "IV zawiera nie-szesnastkowe cyfry." +msgstr "IV zawiera nieszesnastkowe cyfry." #: ../libnm-util/crypto.c:382 -#: ../libnm-util/crypto_gnutls.c:143 -#: ../libnm-util/crypto_nss.c:169 +#: ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 +#: ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:336 #, c-format msgid "Private key cipher '%s' was unknown." msgstr "Nieznany szyfr klucza prywatnego \"%s\"." @@ -116,187 +1192,353 @@ msgstr "Nieznany szyfr klucza prywatnego \"%s\"." msgid "Not enough memory to decrypt private key." msgstr "Brak wystarczającej ilości pamięci do odszyfrowania klucza prywatnego." + #: ../libnm-util/crypto.c:511 #, c-format msgid "Unable to determine private key type." -msgstr "Nieudane określenie typu klucza prywatnego." +msgstr "Nie można określić typu klucza prywatnego." #: ../libnm-util/crypto.c:530 #, c-format msgid "Not enough memory to store decrypted private key." msgstr "Brak wystarczającej ilości pamięci do przechowania odszyfrowanego klucza prywatnego." -#: ../libnm-util/crypto_gnutls.c:46 -msgid "Failed to initialize the crypto engine." -msgstr "Nieudana inicjacja modułu szyfrowania." -#: ../libnm-util/crypto_gnutls.c:90 +#: ../libnm-util/crypto_gnutls.c:49 +msgid "Failed to initialize the crypto engine." +msgstr "Zainicjowanie modułu szyfrowania się nie powiodło." + + +#: ../libnm-util/crypto_gnutls.c:93 #, c-format msgid "Failed to initialize the MD5 engine: %s / %s." -msgstr "Nieudana inicjacja modułu MD5: %s / %s." +msgstr "Zainicjowanie modułu MD5 się nie powiodło: %s / %s." -#: ../libnm-util/crypto_gnutls.c:152 -#: ../libnm-util/crypto_nss.c:178 + +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "Nieprawidłowa długość IV (musi wynosić co najmniej %zd)." + +#: ../libnm-util/crypto_gnutls.c:165 +#: ../libnm-util/crypto_nss.c:188 #, c-format msgid "Not enough memory for decrypted key buffer." msgstr "Brak wystarczającej ilości pamięci dla bufora odszyfrowanego klucza." -#: ../libnm-util/crypto_gnutls.c:160 + +#: ../libnm-util/crypto_gnutls.c:173 #, c-format msgid "Failed to initialize the decryption cipher context: %s / %s." -msgstr "Nieudana inicjacja kontekstu szyfru do odszyfrowania: %s / %s." +msgstr "Zainicjowanie kontekstu szyfru do odszyfrowania się nie powiodło: %s / %s." -#: ../libnm-util/crypto_gnutls.c:169 + +#: ../libnm-util/crypto_gnutls.c:182 #, c-format msgid "Failed to set symmetric key for decryption: %s / %s." -msgstr "Nieudane ustawienie klucza symetrycznego do odszyfrowania: %s / %s." +msgstr "Ustawienie klucza symetrycznego do odszyfrowania się nie powiodło: %s / %s." -#: ../libnm-util/crypto_gnutls.c:178 + +#: ../libnm-util/crypto_gnutls.c:191 #, c-format msgid "Failed to set IV for decryption: %s / %s." -msgstr "Nieudane ustawienie IV do odszyfrowania: %s / %s." +msgstr "Ustawienie IV do odszyfrowania się nie powiodło: %s / %s." -#: ../libnm-util/crypto_gnutls.c:187 -#, c-format -msgid "Failed to decrypt the private key: %s / %s." -msgstr "Nieudane odszyfrowanie klucza prywatnego: %s / %s." #: ../libnm-util/crypto_gnutls.c:200 #, c-format -msgid "Failed to decrypt the private key." -msgstr "Nieudane odszyfrowanie klucza prywatnego." +msgid "Failed to decrypt the private key: %s / %s." +msgstr "Odszyfrowanie klucza prywatnego się nie powiodło: %s / %s." -#: ../libnm-util/crypto_gnutls.c:235 + +#: ../libnm-util/crypto_gnutls.c:210 +#: ../libnm-util/crypto_nss.c:267 +#, c-format +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "Odszyfrowanie klucza prywatnego się nie powiodło: nieoczekiwana długość wypełnienia." + + +#: ../libnm-util/crypto_gnutls.c:221 +#: ../libnm-util/crypto_nss.c:278 +#, c-format +msgid "Failed to decrypt the private key." +msgstr "Odszyfrowanie klucza prywatnego się nie powiodło." + + +#: ../libnm-util/crypto_gnutls.c:286 +#: ../libnm-util/crypto_nss.c:356 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "Nie można przydzielić pamięci do szyfrowania." + + +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "Zainicjowanie kontekstu szyfru do szyfrowania się nie powiodło: %s / %s." + + +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "Ustawienie klucza symetrycznego do szyfrowania się nie powiodło: %s / %s." + + +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +msgid "Failed to set IV for encryption: %s / %s." +msgstr "Ustawienie IV do szyfrowania się nie powiodło: %s / %s." + + +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +msgid "Failed to encrypt the data: %s / %s." +msgstr "Zaszyfrowanie danych się nie powiodło: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:362 #, c-format msgid "Error initializing certificate data: %s" msgstr "Błąd podczas inicjowania danych certyfikatu: %s" -#: ../libnm-util/crypto_gnutls.c:257 + +#: ../libnm-util/crypto_gnutls.c:384 #, c-format msgid "Couldn't decode certificate: %s" -msgstr "Nie można było zdekodować certyfikatu: %s" +msgstr "Nie można zdekodować certyfikatu: %s" -#: ../libnm-util/crypto_gnutls.c:281 +#: ../libnm-util/crypto_gnutls.c:408 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %s" msgstr "Nie można zainicjować dekodera PKCS#12: %s" -#: ../libnm-util/crypto_gnutls.c:294 + +#: ../libnm-util/crypto_gnutls.c:421 #, c-format msgid "Couldn't decode PKCS#12 file: %s" -msgstr "Nie można było odszyfrować pliku PKCS#12: %s" +msgstr "Nie można odszyfrować pliku PKCS#12: %s" -#: ../libnm-util/crypto_gnutls.c:306 + +#: ../libnm-util/crypto_gnutls.c:433 #, c-format msgid "Couldn't verify PKCS#12 file: %s" -msgstr "Nie można było zweryfikować pliku PKCS#12: %s" +msgstr "Nie można zweryfikować pliku PKCS#12: %s" -#: ../libnm-util/crypto_nss.c:57 -#: ../system-settings/plugins/ifcfg-rh/crypto.c:52 + +#: ../libnm-util/crypto_nss.c:56 #, c-format msgid "Failed to initialize the crypto engine: %d." -msgstr "Nieudana inicjacja modułu szyfrowania: %d." +msgstr "Zainicjowanie modułu szyfrowania się nie powiodło: %d." + #: ../libnm-util/crypto_nss.c:111 #, c-format msgid "Failed to initialize the MD5 context: %d." -msgstr "Nieudana inicjacja kontekstu MD5: %d." +msgstr "Zainicjowanie kontekstu MD5 się nie powiodło: %d." -#: ../libnm-util/crypto_nss.c:186 + +#: ../libnm-util/crypto_nss.c:179 #, c-format -msgid "Failed to initialize the decryption cipher slot." -msgstr "Nieudana inicjacja slotu szyfru do odszyfrowania." +msgid "Invalid IV length (must be at least %d)." +msgstr "Nieprawidłowa długość IV (musi wynosić co najmniej %d)." + #: ../libnm-util/crypto_nss.c:196 #, c-format -msgid "Failed to set symmetric key for decryption." -msgstr "Nieudane ustawienie klucza symetrycznego do odszyfrowania." +msgid "Failed to initialize the decryption cipher slot." +msgstr "Zainicjowanie gniazda szyfru do odszyfrowania się nie powiodło." + #: ../libnm-util/crypto_nss.c:206 #, c-format -msgid "Failed to set IV for decryption." -msgstr "Nieudane ustawienie IV do odszyfrowania." +msgid "Failed to set symmetric key for decryption." +msgstr "Ustawienie klucza symetrycznego do odszyfrowania się nie powiodło." -#: ../libnm-util/crypto_nss.c:214 + +#: ../libnm-util/crypto_nss.c:216 +#, c-format +msgid "Failed to set IV for decryption." +msgstr "Ustawienie IV do odszyfrowania się nie powiodło." + + +#: ../libnm-util/crypto_nss.c:224 #, c-format msgid "Failed to initialize the decryption context." -msgstr "Nieudana inicjacja kontekstu odszyfrowania." +msgstr "Zainicjowanie kontekstu odszyfrowania się nie powiodło." -#: ../libnm-util/crypto_nss.c:227 + +#: ../libnm-util/crypto_nss.c:237 #, c-format msgid "Failed to decrypt the private key: %d." -msgstr "Nieudane odszyfrowanie klucza prywatnego: %d." +msgstr "Odszyfrowanie klucza prywatnego się nie powiodło: %d." -#: ../libnm-util/crypto_nss.c:239 + +#: ../libnm-util/crypto_nss.c:245 +#, c-format +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "Odszyfrowanie klucza prywatnego się nie powiodło: odszyfrowane dane są za duże." + + +#: ../libnm-util/crypto_nss.c:256 #, c-format msgid "Failed to finalize decryption of the private key: %d." -msgstr "Nieudane ukończenie odszyfrowania klucza prywatnego: %d." +msgstr "Zakończenie odszyfrowania klucza prywatnego się nie powiodło: %d." -#: ../libnm-util/crypto_nss.c:284 + +#: ../libnm-util/crypto_nss.c:364 +#, c-format +msgid "Failed to initialize the encryption cipher slot." +msgstr "Zainicjowanie gniazda szyfru do szyfrowania się nie powiodło." + + +#: ../libnm-util/crypto_nss.c:372 +#, c-format +msgid "Failed to set symmetric key for encryption." +msgstr "Ustawienie klucza symetrycznego do szyfrowania się nie powiodło." + + +#: ../libnm-util/crypto_nss.c:380 +#, c-format +msgid "Failed to set IV for encryption." +msgstr "Ustawienie IV do szyfrowania się nie powiodło." + + +#: ../libnm-util/crypto_nss.c:388 +#, c-format +msgid "Failed to initialize the encryption context." +msgstr "Zainicjowanie kontekstu szyfrowania się nie powiodło." + + +#: ../libnm-util/crypto_nss.c:396 +#, c-format +msgid "Failed to encrypt: %d." +msgstr "Zaszyfrowanie się nie powiodło: %d." + + +#: ../libnm-util/crypto_nss.c:404 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "Nieoczekiwana ilość danych po zaszyfrowaniu." + + +#: ../libnm-util/crypto_nss.c:447 #, c-format msgid "Couldn't decode certificate: %d" -msgstr "Nie można było zdekodować certyfikatu: %d" +msgstr "Nie można zdekodować certyfikatu: %d" -#: ../libnm-util/crypto_nss.c:319 + +#: ../libnm-util/crypto_nss.c:482 #, c-format msgid "Couldn't convert password to UCS2: %d" -msgstr "Nie można skonwertować hasła do UCS2: %d" +msgstr "Nie można przekonwertować hasła do UCS2: %d" -#: ../libnm-util/crypto_nss.c:347 +#: ../libnm-util/crypto_nss.c:510 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %d" msgstr "Nie można zainicjować dekodera PKCS#12: %d" -#: ../libnm-util/crypto_nss.c:356 + +#: ../libnm-util/crypto_nss.c:519 #, c-format msgid "Couldn't decode PKCS#12 file: %d" -msgstr "Nie można było odszyfrować pliku PKCS#12: %d" +msgstr "Nie można odszyfrować pliku PKCS#12: %d" -#: ../libnm-util/crypto_nss.c:365 + +#: ../libnm-util/crypto_nss.c:528 #, c-format msgid "Couldn't verify PKCS#12 file: %d" -msgstr "Nie można było zweryfikować pliku PKCS#12: %d" +msgstr "Nie można zweryfikować pliku PKCS#12: %d" + + +#: ../libnm-util/crypto_nss.c:557 +msgid "Could not generate random data." +msgstr "Nie można utworzyć losowych danych." + + +#: ../libnm-util/nm-utils.c:1545 +#, c-format +msgid "Not enough memory to make encryption key." +msgstr "Brak wystarczającej ilości pamięci, aby utworzyć klucz szyfrowania." + + +#: ../libnm-util/nm-utils.c:1655 +msgid "Could not allocate memory for PEM file creation." +msgstr "Nie można przydzielić pamięci do utworzenia pliku PEM." + + +#: ../libnm-util/nm-utils.c:1667 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "Nie można przydzielić pamięci do zapisywania IV do pliku PEM." + + +#: ../libnm-util/nm-utils.c:1679 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "Nie można przydzielić pamięci do zapisywania zaszyfrowanego klucza do pliku PEM." + + +#: ../libnm-util/nm-utils.c:1698 +#, c-format +msgid "Could not allocate memory for PEM file data." +msgstr "Nie można przydzielić pamięci dla danych pliku PEM." #: ../src/nm-netlink-monitor.c:194 #: ../src/nm-netlink-monitor.c:464 +#: ../src/nm-netlink-monitor.c:582 +#: ../src/ip6-manager/nm-netlink-listener.c:352 #, c-format msgid "error processing netlink message: %s" msgstr "błąd podczas przetwarzania komunikatu netlink: %s" + #: ../src/nm-netlink-monitor.c:260 #, c-format msgid "unable to allocate netlink handle for monitoring link status: %s" -msgstr "nie można utworzyć uchwytu netlink dla monitorowania statusu połączenia: %s" +msgstr "nie można przydzielić uchwytu netlink dla monitorowania stanu połączenia: %s" + #: ../src/nm-netlink-monitor.c:270 #, c-format msgid "unable to connect to netlink for monitoring link status: %s" -msgstr "nie można połączyć się z netlink dla monitorowania statusu połączenia: %s" +msgstr "nie można połączyć się z netlink dla monitorowania stanu połączenia: %s" + #: ../src/nm-netlink-monitor.c:278 #, c-format msgid "unable to join netlink group for monitoring link status: %s" -msgstr "nie można dołączyć do grupy netlink dla monitorowania statusu połączenia: %s" +msgstr "nie można dołączyć do grupy netlink dla monitorowania stanu połączenia: %s" + #: ../src/nm-netlink-monitor.c:286 #, c-format msgid "unable to allocate netlink link cache for monitoring link status: %s" -msgstr "nie można utworzyć buforów połączenia netlink dla monitorowania statusu połączenia: %s" +msgstr "nie można przydzielić pamięci podręcznej połączenia netlink dla monitorowania stanu połączenia: %s" + #: ../src/nm-netlink-monitor.c:494 +#: ../src/ip6-manager/nm-netlink-listener.c:382 msgid "error occurred while waiting for data on socket" -msgstr "napotkano błąd podczas oczekiwania na dane" +msgstr "wystąpił błąd podczas oczekiwania na dane na gnieździe" -#: ../src/NetworkManager.c:330 + +#: ../src/nm-netlink-monitor.c:558 +#: ../src/nm-netlink-monitor.c:571 +#, c-format +msgid "error updating link cache: %s" +msgstr "błąd podczas aktualizowania pamięci podręcznej połączenia: %s" + + +#: ../src/NetworkManager.c:494 #, c-format msgid "Invalid option. Please use --help to see a list of valid options.\n" -msgstr "Błędna opcja. Parametr --help wyświetla listę poprawnych opcji.\n" +msgstr "Nieprawidłowa opcja. Parametr --help wyświetli listę prawidłowych opcji.\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:304 + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:300 msgid "# Created by NetworkManager\n" -msgstr "# Utworzony przez NetworkManager\n" +msgstr "# Utworzony przez program NetworkManager\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:310 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:316 #, c-format msgid "" "# Merged from %s\n" @@ -305,6 +1547,22 @@ msgstr "" "# Scalony od %s\n" "\n" + +#: ../src/ip6-manager/nm-netlink-listener.c:200 +#, c-format +msgid "unable to allocate netlink handle: %s" +msgstr "nie można przydzielić uchwytu netlink: %s" + +#: ../src/ip6-manager/nm-netlink-listener.c:210 +#, c-format +msgid "unable to connect to netlink: %s" +msgstr "nie można połączyć się z netlink: %s" + +#: ../src/ip6-manager/nm-netlink-listener.c:307 +#, c-format +msgid "unable to join netlink group: %s" +msgstr "nie można dołączyć do grupy netlink: %s" + #: ../src/named-manager/nm-named-manager.c:315 msgid "NOTE: the libc resolver may not support more than 3 nameservers." msgstr "UWAGA: obsługa nazw libc nie obsługuje więcej niż 3 serwery nazw." @@ -313,14 +1571,16 @@ msgstr "UWAGA: obsługa nazw libc nie obsługuje więcej niż 3 serwery nazw." msgid "The nameservers listed below may not be recognized." msgstr "Poniższe serwery nazw nie mogą nie zostać rozpoznane." -#: ../src/system-settings/nm-default-wired-connection.c:194 + +#: ../src/system-settings/nm-default-wired-connection.c:157 #, c-format msgid "Auto %s" -msgstr "Auto %s" +msgstr "Automatyczne %s" -#: ../system-settings/plugins/ifcfg-rh/reader.c:2446 + +#: ../system-settings/plugins/ifcfg-rh/reader.c:3213 msgid "System" -msgstr "System" +msgstr "Systemowe" #: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 msgid "Connection sharing via a protected WiFi network" @@ -353,3 +1613,4 @@ msgstr "Polityka systemu powstrzymuje współdzielenie połączeń przez chronio #: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 msgid "System policy prevents sharing connections via an open WiFi network" msgstr "Polityka systemu powstrzymuje współdzielenie połączeń przez otwartą sieć WiFi" + diff --git a/po/pt_BR.po b/po/pt_BR.po index 33e0a1eea3..a347564bec 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -1,96 +1,1174 @@ +# translation of pt_BR.po to Portuguese # Brazilian Portuguese translation of NetworkManager. -# Copyright (C) 2004-2008 Free Software Foundation, Inc. +# Copyright (C) 2004-2008, 2010 Free Software Foundation, Inc. # This file is distributed under the same license as the NetworkManager package. -# Raphael Higino , 2004-2007 +# +# Raphael Higino , 2004-2007. # Luiz Armesto , 2007. # Henrique P. Machado , 2008. # Og Maciel , 2008. # Fabrício Godoy , 2008. -# +# Glaucia Cintra , 2010. msgid "" msgstr "" -"Project-Id-Version: NetworkManager\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager&component=general\n" -"POT-Creation-Date: 2008-11-13 21:19+0000\n" -"PO-Revision-Date: 2008-12-04 17:34-0300\n" -"Last-Translator: Henrique P Machado \n" -"Language-Team: Brazilian Portuguese \n" +"Project-Id-Version: pt_BR\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-05-06 14:31+0530\n" +"PO-Revision-Date: 2010-05-07 14:38+1000\n" +"Last-Translator: Glaucia Cintra \n" +"Language-Team: Portuguese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: KBabel 1.11.4\n" -#: ../src/nm-netlink-monitor.c:195 -#: ../src/nm-netlink-monitor.c:476 -#, c-format -msgid "error processing netlink message: %s" -msgstr "erro ao processar mensagem do netlink: %s" +#: ../cli/src/connections.c:59 ../cli/src/connections.c:74 +#: ../cli/src/devices.c:85 ../cli/src/devices.c:98 ../cli/src/devices.c:108 +#: ../cli/src/devices.c:118 ../cli/src/devices.c:131 ../cli/src/devices.c:142 +#: ../cli/src/devices.c:152 +msgid "NAME" +msgstr "NOME" -#: ../src/nm-netlink-monitor.c:252 -#, c-format -msgid "unable to allocate netlink handle for monitoring link status: %s" -msgstr "não foi possível alocar o manipulador do netlink para monitoração de status do link: %s" +#. 0 +#: ../cli/src/connections.c:60 ../cli/src/connections.c:75 +msgid "UUID" +msgstr "UUID" -#: ../src/nm-netlink-monitor.c:262 -#, c-format -msgid "unable to connect to netlink for monitoring link status: %s" -msgstr "não foi possível conectar ao netlink para monitoração de status do link: %s" +#. 1 +#: ../cli/src/connections.c:61 +msgid "DEVICES" +msgstr "DISPOSITIVOS" -#: ../src/nm-netlink-monitor.c:270 -#, c-format -msgid "unable to join netlink group for monitoring link status: %s" -msgstr "não foi possível associar-se ao grupo do netlink para monitoração de status do link: %s" +#. 2 +#: ../cli/src/connections.c:62 ../cli/src/connections.c:77 +msgid "SCOPE" +msgstr "ESCOPO" -#: ../src/nm-netlink-monitor.c:278 -#, c-format -msgid "unable to allocate netlink link cache for monitoring link status: %s" -msgstr "não foi possível alocar o cache de link do netlink para monitoração de status do link: %s" +#. 3 +#: ../cli/src/connections.c:63 +msgid "DEFAULT" +msgstr "PADRÃO" -#: ../src/nm-netlink-monitor.c:441 -#, c-format -msgid "error updating link cache: %s" -msgstr "erro ao atualizar o cache de link: %s" +#. 4 +#: ../cli/src/connections.c:64 +msgid "DBUS-SERVICE" +msgstr "SERVIÇO-DBUS" -#: ../src/nm-netlink-monitor.c:499 -#, c-format -msgid "error occurred while waiting for data on socket" -msgstr "ocorreu um erro ao esperar pelos dados da conexão" +#. 5 +#: ../cli/src/connections.c:65 +msgid "SPEC-OBJECT" +msgstr "ESPECIFICAÇÕES DO OBJETO" -#: ../src/NetworkManager.c:252 -#, c-format -msgid "Invalid option. Please use --help to see a list of valid options.\n" -msgstr "Opção inválida. Por favor, use --help para ver uma lista de opções válidas.\n" +#. 6 +#: ../cli/src/connections.c:66 +msgid "VPN" +msgstr "VPN" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:88 -msgid "# Created by NetworkManager\n" -msgstr "# Criado pelo NetworkManager\n" +#. 1 +#. 0 +#. 1 +#: ../cli/src/connections.c:76 ../cli/src/devices.c:61 ../cli/src/devices.c:87 +msgid "TYPE" +msgstr "TIPO" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:94 +#. 3 +#: ../cli/src/connections.c:78 +msgid "TIMESTAMP" +msgstr "CARIMBO DE DATA E HORA" + +#. 4 +#: ../cli/src/connections.c:79 +msgid "TIMESTAMP-REAL" +msgstr "CARIMBO DE DATA E HORA REAL" + +#. 5 +#: ../cli/src/connections.c:80 +msgid "AUTOCONNECT" +msgstr "CONEXÃO AUTOMÁTICA" + +#. 6 +#: ../cli/src/connections.c:81 +msgid "READONLY" +msgstr "SOMENTE LEITURA" + +#: ../cli/src/connections.c:157 #, c-format msgid "" -"# Merged from %s\n" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" +msgstr "" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" + +#: ../cli/src/connections.c:197 ../cli/src/connections.c:536 +#, c-format +msgid "Error: 'con list': %s" +msgstr "Erro: lista 'con': %s" + +#: ../cli/src/connections.c:199 ../cli/src/connections.c:538 +#, c-format +msgid "Error: 'con list': %s; allowed fields: %s" +msgstr "Erro: 'con list': %s; campos permitidos: %s" + +#: ../cli/src/connections.c:207 +msgid "Connection details" +msgstr "Detalhes de Conexões" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "system" +msgstr "sistema" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "user" +msgstr "usuário" + +#: ../cli/src/connections.c:383 +msgid "never" +msgstr "nunca" + +#. "CAPABILITIES" +#. Print header +#. "WIFI-PROPERTIES" +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:544 ../cli/src/settings.c:643 +#: ../cli/src/settings.c:912 ../cli/src/settings.c:913 +#: ../cli/src/settings.c:915 ../cli/src/settings.c:917 +#: ../cli/src/settings.c:1042 ../cli/src/settings.c:1043 +#: ../cli/src/settings.c:1044 ../cli/src/settings.c:1123 +#: ../cli/src/settings.c:1124 ../cli/src/settings.c:1125 +#: ../cli/src/settings.c:1126 ../cli/src/settings.c:1127 +#: ../cli/src/settings.c:1128 ../cli/src/settings.c:1129 +#: ../cli/src/settings.c:1130 ../cli/src/settings.c:1131 +#: ../cli/src/settings.c:1132 ../cli/src/settings.c:1133 +#: ../cli/src/settings.c:1134 ../cli/src/settings.c:1135 +#: ../cli/src/settings.c:1210 +msgid "yes" +msgstr "sim" + +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:506 ../cli/src/settings.c:544 +#: ../cli/src/settings.c:643 ../cli/src/settings.c:912 +#: ../cli/src/settings.c:913 ../cli/src/settings.c:915 +#: ../cli/src/settings.c:917 ../cli/src/settings.c:1042 +#: ../cli/src/settings.c:1043 ../cli/src/settings.c:1044 +#: ../cli/src/settings.c:1123 ../cli/src/settings.c:1124 +#: ../cli/src/settings.c:1125 ../cli/src/settings.c:1126 +#: ../cli/src/settings.c:1127 ../cli/src/settings.c:1128 +#: ../cli/src/settings.c:1129 ../cli/src/settings.c:1130 +#: ../cli/src/settings.c:1131 ../cli/src/settings.c:1132 +#: ../cli/src/settings.c:1133 ../cli/src/settings.c:1134 +#: ../cli/src/settings.c:1135 ../cli/src/settings.c:1210 +msgid "no" +msgstr "não" + +#: ../cli/src/connections.c:457 ../cli/src/connections.c:500 +msgid "System connections" +msgstr "Conexões de sistema" + +#: ../cli/src/connections.c:462 ../cli/src/connections.c:513 +msgid "User connections" +msgstr "Conexões de usuário" + +#: ../cli/src/connections.c:474 ../cli/src/connections.c:1334 +#: ../cli/src/connections.c:1350 ../cli/src/connections.c:1359 +#: ../cli/src/connections.c:1370 ../cli/src/connections.c:1452 +#: ../cli/src/devices.c:864 ../cli/src/devices.c:874 ../cli/src/devices.c:973 +#: ../cli/src/devices.c:980 +#, c-format +msgid "Error: %s argument is missing." +msgstr "Erro: argumento %s está faltando" + +#: ../cli/src/connections.c:487 +#, c-format +msgid "Error: %s - no such connection." +msgstr "Erro: %s - não existe tal conexão" + +#: ../cli/src/connections.c:519 ../cli/src/connections.c:1383 +#: ../cli/src/connections.c:1470 ../cli/src/devices.c:687 +#: ../cli/src/devices.c:754 ../cli/src/devices.c:888 ../cli/src/devices.c:986 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "Parâmetro desconhecido: %s\n" + +#: ../cli/src/connections.c:528 +#, c-format +msgid "Error: no valid parameter specified." +msgstr "Erro: não existe um parâmetro válido especificado" + +#: ../cli/src/connections.c:543 ../cli/src/connections.c:1572 +#: ../cli/src/devices.c:1192 ../cli/src/network-manager.c:274 +#, c-format +msgid "Error: %s." +msgstr "Erro: %s" + +#: ../cli/src/connections.c:649 +#, c-format +msgid "Error: 'con status': %s" +msgstr "Erro: status 'con':%s" + +#: ../cli/src/connections.c:651 +#, c-format +msgid "Error: 'con status': %s; allowed fields: %s" +msgstr "Erro: status 'con':%s, campos permitidos: %s" + +#: ../cli/src/connections.c:658 +msgid "Active connections" +msgstr "Conexões ativas" + +#: ../cli/src/connections.c:1026 +#, c-format +msgid "no active connection on device '%s'" +msgstr "nenhuma conexão ativa no dispositivo '%s'" + +#: ../cli/src/connections.c:1034 +#, c-format +msgid "no active connection or device" +msgstr "nenhuma conexão ativa ou dispositivo" + +#: ../cli/src/connections.c:1084 +#, c-format +msgid "device '%s' not compatible with connection '%s'" +msgstr "dispositivo '%s' não compatível com a conexão '%s'" + +#: ../cli/src/connections.c:1086 +#, c-format +msgid "no device found for connection '%s'" +msgstr "nenhum dispositivo encontrado para a conexão '%s'" + +#: ../cli/src/connections.c:1097 +msgid "activating" +msgstr "ativando" + +#: ../cli/src/connections.c:1099 +msgid "activated" +msgstr "ativado" + +#: ../cli/src/connections.c:1102 ../cli/src/connections.c:1125 +#: ../cli/src/connections.c:1158 ../cli/src/devices.c:224 +#: ../cli/src/devices.c:514 ../cli/src/network-manager.c:92 +#: ../cli/src/network-manager.c:145 ../cli/src/settings.c:469 +msgid "unknown" +msgstr "desconhecido" + +#: ../cli/src/connections.c:1111 +msgid "VPN connecting (prepare)" +msgstr "Conectando com o VPN (preparar)" + +#: ../cli/src/connections.c:1113 +msgid "VPN connecting (need authentication)" +msgstr "Conectando ao VPN (autenticação necessária)" + +#: ../cli/src/connections.c:1115 +msgid "VPN connecting" +msgstr "Conectando ao VPN" + +#: ../cli/src/connections.c:1117 +msgid "VPN connecting (getting IP configuration)" +msgstr "Conectando ao VPN (obtendo configuração do IP)" + +#: ../cli/src/connections.c:1119 +msgid "VPN connected" +msgstr "VPN conectado" + +#: ../cli/src/connections.c:1121 +msgid "VPN connection failed" +msgstr "Falha da conexão ao VPN" + +#: ../cli/src/connections.c:1123 +msgid "VPN disconnected" +msgstr "VPN desconectado" + +#: ../cli/src/connections.c:1134 +msgid "unknown reason" +msgstr "razão desconhecida" + +#: ../cli/src/connections.c:1136 +msgid "none" +msgstr "nenhuma" + +#: ../cli/src/connections.c:1138 +msgid "the user was disconnected" +msgstr "o usuário foi desconectado" + +#: ../cli/src/connections.c:1140 +msgid "the base network connection was interrupted" +msgstr "a conexão de rede base foi interrompida" + +#: ../cli/src/connections.c:1142 +msgid "the VPN service stopped unexpectedly" +msgstr "o serviço VPN parou inesperadamente" + +#: ../cli/src/connections.c:1144 +msgid "the VPN service returned invalid configuration" +msgstr "O serviço VPN retornou configurações inválidas" + +#: ../cli/src/connections.c:1146 +msgid "the connection attempt timed out" +msgstr "a tentativa de conexão expirou o tempo limite" + +#: ../cli/src/connections.c:1148 +msgid "the VPN service did not start in time" +msgstr "o serviço VPN não iniciou em tempo" + +#: ../cli/src/connections.c:1150 +msgid "the VPN service failed to start" +msgstr "o serviço VPN falhou ao iniciar" + +#: ../cli/src/connections.c:1152 +msgid "no valid VPN secrets" +msgstr "Segredos do VPN não válidos" + +#: ../cli/src/connections.c:1154 +msgid "invalid VPN secrets" +msgstr "Segredos do VPN inválidos" + +#: ../cli/src/connections.c:1156 +msgid "the connection was removed" +msgstr "a conexão foi removida" + +#: ../cli/src/connections.c:1170 +#, c-format +msgid "state: %s\n" +msgstr "stado: %s\n" + +#: ../cli/src/connections.c:1173 ../cli/src/connections.c:1199 +#, c-format +msgid "Connection activated\n" +msgstr "Conexão ativada\n" + +#: ../cli/src/connections.c:1176 +#, c-format +msgid "Error: Connection activation failed." +msgstr "Erro: Ativação da conexão falhou." + +#: ../cli/src/connections.c:1195 +#, c-format +msgid "state: %s (%d)\n" +msgstr "estado: %s (%d)\n" + +#: ../cli/src/connections.c:1205 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "Erro: Ativação de conexão falhou: %s" + +#: ../cli/src/connections.c:1222 ../cli/src/devices.c:811 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "Erro: o Timeout%d de segundos expirou" + +#: ../cli/src/connections.c:1265 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "Erro: Ativação de conexão falhou: %s" + +#: ../cli/src/connections.c:1279 +#, c-format +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "Erro: Obtenção de conexão ativa para '%s' falhou." + +#: ../cli/src/connections.c:1288 +#, c-format +msgid "Active connection state: %s\n" +msgstr "Estado de conexão ativa: %s\n" + +#: ../cli/src/connections.c:1289 +#, c-format +msgid "Active connection path: %s\n" +msgstr "Caminho de conexão ativa: %s\n" + +#: ../cli/src/connections.c:1343 ../cli/src/connections.c:1461 +#, c-format +msgid "Error: Unknown connection: %s." +msgstr "Erro: Conexão desconhecida: %s" + +#: ../cli/src/connections.c:1378 ../cli/src/devices.c:882 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "Erro: valor timeout '%s' não é válido." + +#: ../cli/src/connections.c:1391 ../cli/src/connections.c:1478 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "Erro: id ou uuid deve ser especificada." + +#: ../cli/src/connections.c:1411 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "Erro: Não foi encontrado nenhum dispositivo adequado: %s." + +#: ../cli/src/connections.c:1413 +#, c-format +msgid "Error: No suitable device found." +msgstr "Erro: Não foi encontrado nenhum dispositivo adequado." + +#: ../cli/src/connections.c:1505 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "Aviso: Conexão não ativa\n" + +#: ../cli/src/connections.c:1561 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "Erro: 'con' comando '%s' não é válido." + +#: ../cli/src/connections.c:1597 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "Erro: Nâo foi possível conectar ao D-Bus." + +#: ../cli/src/connections.c:1604 +#, c-format +msgid "Error: Could not get system settings." +msgstr "Erro: Não foi possível obter configurações de sistema" + +#: ../cli/src/connections.c:1612 +#, c-format +msgid "Error: Could not get user settings." +msgstr "Erro: Não foi possível obter configurações de usuário." + +#: ../cli/src/connections.c:1622 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "" +"Erro: Não foi possível obter conexões: serviços de configuração não estão " +"funcionando." + +#. 0 +#. 9 +#: ../cli/src/devices.c:60 ../cli/src/devices.c:86 ../cli/src/devices.c:162 +msgid "DEVICE" +msgstr "DISPOSITIVO" + +#. 1 +#. 4 +#. 0 +#: ../cli/src/devices.c:62 ../cli/src/devices.c:90 +#: ../cli/src/network-manager.c:36 +msgid "STATE" +msgstr "ESTADO" + +#: ../cli/src/devices.c:71 +msgid "GENERAL" +msgstr "GERAL" + +#. 0 +#: ../cli/src/devices.c:72 +msgid "CAPABILITIES" +msgstr "CAPACIDADES" + +#. 1 +#: ../cli/src/devices.c:73 +msgid "WIFI-PROPERTIES" +msgstr "PROPRIEDADES DO WIFI" + +#. 2 +#: ../cli/src/devices.c:74 +msgid "AP" +msgstr "AP" + +#. 3 +#: ../cli/src/devices.c:75 +msgid "WIRED-PROPERTIES" +msgstr "PROPRIEDADES CABEADAS" + +#. 4 +#: ../cli/src/devices.c:76 +msgid "IP4-SETTINGS" +msgstr "CONFIGURAÇÕES DO IP4" + +#. 5 +#: ../cli/src/devices.c:77 +msgid "IP4-DNS" +msgstr "DNS DO IP4" + +#. 2 +#: ../cli/src/devices.c:88 +msgid "DRIVER" +msgstr "DRIVER" + +#. 3 +#: ../cli/src/devices.c:89 +msgid "HWADDR" +msgstr "HWADDR" + +#. 0 +#: ../cli/src/devices.c:99 +msgid "CARRIER-DETECT" +msgstr "DETECTOR DE CARREGADOR" + +#. 1 +#: ../cli/src/devices.c:100 +msgid "SPEED" +msgstr "VELOCIDADE" + +#. 0 +#: ../cli/src/devices.c:109 +msgid "CARRIER" +msgstr "CARREGADOR" + +#. 0 +#: ../cli/src/devices.c:119 +msgid "WEP" +msgstr "WEP" + +#. 1 +#: ../cli/src/devices.c:120 +msgid "WPA" +msgstr "WPA" + +#. 2 +#: ../cli/src/devices.c:121 +msgid "WPA2" +msgstr "WPA2" + +#. 3 +#: ../cli/src/devices.c:122 +msgid "TKIP" +msgstr "TKIP" + +#. 4 +#: ../cli/src/devices.c:123 +msgid "CCMP" +msgstr "CCMP" + +#. 0 +#: ../cli/src/devices.c:132 +msgid "ADDRESS" +msgstr "ENDEREÇO" + +#. 1 +#: ../cli/src/devices.c:133 +msgid "PREFIX" +msgstr "PREFIXO" + +#. 2 +#: ../cli/src/devices.c:134 +msgid "GATEWAY" +msgstr "GATEWAY" + +#. 0 +#: ../cli/src/devices.c:143 +msgid "DNS" +msgstr "DNS" + +#. 0 +#: ../cli/src/devices.c:153 +msgid "SSID" +msgstr "SSID" + +#. 1 +#: ../cli/src/devices.c:154 +msgid "BSSID" +msgstr "BSSID" + +#. 2 +#: ../cli/src/devices.c:155 +msgid "MODE" +msgstr "MODO" + +#. 3 +#: ../cli/src/devices.c:156 +msgid "FREQ" +msgstr "FREQ" + +#. 4 +#: ../cli/src/devices.c:157 +msgid "RATE" +msgstr "TAXA" + +#. 5 +#: ../cli/src/devices.c:158 +msgid "SIGNAL" +msgstr "SINAL" + +#. 6 +#: ../cli/src/devices.c:159 +msgid "SECURITY" +msgstr "SEGURANÇA" + +#. 7 +#: ../cli/src/devices.c:160 +msgid "WPA-FLAGS" +msgstr "SINALIZADOR DO WPA" + +#. 8 +#: ../cli/src/devices.c:161 +msgid "RSN-FLAGS" +msgstr "SINALIZADOR DO RSN" + +#. 10 +#: ../cli/src/devices.c:163 +msgid "ACTIVE" +msgstr "ATIVO" + +#: ../cli/src/devices.c:186 +#, c-format +msgid "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" "\n" msgstr "" -"# Mesclado de %s\n" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" "\n" -#: ../src/named-manager/nm-named-manager.c:256 -msgid "NOTE: the libc resolver may not support more than 3 nameservers." -msgstr "NOTA: o resolvedor da libc não tem suporte a mais do que 3 servidores de nomes." +#: ../cli/src/devices.c:206 +msgid "unmanaged" +msgstr "Não gerenciado" -#: ../src/named-manager/nm-named-manager.c:258 -msgid "The nameservers listed below may not be recognized." -msgstr "Os servidores de nomes listados abaixo podem não ser reconhecidos." +#: ../cli/src/devices.c:208 +msgid "unavailable" +msgstr "indisponível" -#: ../system-settings/src/main.c:376 +#: ../cli/src/devices.c:210 ../cli/src/network-manager.c:89 +msgid "disconnected" +msgstr "disconectado" + +#: ../cli/src/devices.c:212 +msgid "connecting (prepare)" +msgstr "conectando (preparar)" + +#: ../cli/src/devices.c:214 +msgid "connecting (configuring)" +msgstr "conectando (configurando)" + +#: ../cli/src/devices.c:216 +msgid "connecting (need authentication)" +msgstr "conectando (é necessário uma autenticação)" + +#: ../cli/src/devices.c:218 +msgid "connecting (getting IP configuration)" +msgstr "conectando (obtendo configuração do IP)" + +#: ../cli/src/devices.c:220 ../cli/src/network-manager.c:87 +msgid "connected" +msgstr "conectado" + +#: ../cli/src/devices.c:222 +msgid "connection failed" +msgstr "conexão falhou" + +#: ../cli/src/devices.c:245 ../cli/src/devices.c:380 +msgid "Unknown" +msgstr "desconhecido" + +#: ../cli/src/devices.c:277 +msgid "(none)" +msgstr "(nenhum)" + +#: ../cli/src/devices.c:302 #, c-format -msgid "Auto %s" -msgstr "Auto %s" +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s: erro ao converter endereço IP4 0x%X" + +#: ../cli/src/devices.c:349 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" + +#: ../cli/src/devices.c:350 +#, c-format +msgid "%u MB/s" +msgstr "%u MB/s" + +#: ../cli/src/devices.c:359 +msgid "Encrypted: " +msgstr "Criptografado:" + +#: ../cli/src/devices.c:364 +msgid "WEP " +msgstr "WEP" + +#: ../cli/src/devices.c:366 +msgid "WPA " +msgstr "WPA" + +#: ../cli/src/devices.c:368 +msgid "WPA2 " +msgstr "WPA2" + +#: ../cli/src/devices.c:371 +msgid "Enterprise " +msgstr "Enterprise" + +#: ../cli/src/devices.c:380 +msgid "Ad-Hoc" +msgstr "Ad-Hoc" + +#: ../cli/src/devices.c:380 +msgid "Infrastructure" +msgstr "Infraestrutura" + +#: ../cli/src/devices.c:442 +#, c-format +msgid "Error: 'dev list': %s" +msgstr "Erro: 'dev list': %s" + +#: ../cli/src/devices.c:444 +#, c-format +msgid "Error: 'dev list': %s; allowed fields: %s" +msgstr "Erro: 'dev list': %s, campos permitidos '%s'" + +#: ../cli/src/devices.c:453 +msgid "Device details" +msgstr "Detalhes do Dispositivos" + +#: ../cli/src/devices.c:483 ../cli/src/devices.c:827 +msgid "(unknown)" +msgstr "(desconhecido)" + +#: ../cli/src/devices.c:484 +msgid "unknown)" +msgstr "desconhecido)" + +#: ../cli/src/devices.c:510 +#, c-format +msgid "%u Mb/s" +msgstr "%u Mb/s" + +#. Print header +#. "WIRED-PROPERTIES" +#: ../cli/src/devices.c:583 +msgid "on" +msgstr "ligado" + +#: ../cli/src/devices.c:583 +msgid "off" +msgstr "desligado" + +#: ../cli/src/devices.c:710 +#, c-format +msgid "Error: 'dev status': %s" +msgstr "Erro: 'dev status': %s" + +#: ../cli/src/devices.c:712 +#, c-format +msgid "Error: 'dev status': %s; allowed fields: %s" +msgstr "Erro: 'dev status': %s; campos permitidos: %s" + +#: ../cli/src/devices.c:719 +msgid "Status of devices" +msgstr "Estado dos dispositivos" + +#: ../cli/src/devices.c:747 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "Erro: argumento '%s' está faltando" + +#: ../cli/src/devices.c:776 ../cli/src/devices.c:915 ../cli/src/devices.c:1035 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "Erro: Dispositivo '%s' não foi encontrado." + +#: ../cli/src/devices.c:799 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "Sucesso: Dispositivo '%s' foi desconectado com sucesso." + +#: ../cli/src/devices.c:824 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "Erro: Desconexão do Dispositivo '%s' (%s) falhou: %s" + +#: ../cli/src/devices.c:832 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "Estado do Dispositivo: %d (%s)\n" + +#: ../cli/src/devices.c:896 +#, c-format +msgid "Error: iface has to be specified." +msgstr "Erro: iface precisa ser especificado." + +#: ../cli/src/devices.c:1011 +#, c-format +msgid "Error: 'dev wifi': %s" +msgstr "Erro: dev wifi '%s' " + +#: ../cli/src/devices.c:1013 +#, c-format +msgid "Error: 'dev wifi': %s; allowed fields: %s" +msgstr "Erro: 'dev wifi': %s;campos permitidos: %s" + +#: ../cli/src/devices.c:1020 +msgid "WiFi scan list" +msgstr "Lista de scan do WiFi " + +#: ../cli/src/devices.c:1055 ../cli/src/devices.c:1109 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "Erro: Ponto de aceso com o hwaddr '%s' não foi encontrado." + +#: ../cli/src/devices.c:1072 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "Erro: Dispositivo '%s' não é um dispositivo WiFi." + +#: ../cli/src/devices.c:1136 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "Erro: comando dev wifi '%s' não é válido" + +#: ../cli/src/devices.c:1183 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "Erro: comando 'dev' '%s' não é válido" + +#: ../cli/src/network-manager.c:35 +msgid "RUNNING" +msgstr "EXECUTANDO" + +#. 1 +#: ../cli/src/network-manager.c:37 +msgid "WIFI-HARDWARE" +msgstr "HARDWARE DO WIFI" + +#. 2 +#: ../cli/src/network-manager.c:38 +msgid "WIFI" +msgstr "WIFI" + +#. 3 +#: ../cli/src/network-manager.c:39 +msgid "WWAN-HARDWARE" +msgstr "HARDWARE DO WWAN" + +#. 4 +#: ../cli/src/network-manager.c:40 +msgid "WWAN" +msgstr "WWAN" + +#: ../cli/src/network-manager.c:62 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" +msgstr "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + +#: ../cli/src/network-manager.c:83 +msgid "asleep" +msgstr "modo de espera" + +#: ../cli/src/network-manager.c:85 +msgid "connecting" +msgstr "conectando" + +#: ../cli/src/network-manager.c:125 +#, c-format +msgid "Error: 'nm status': %s" +msgstr "Erro: 'nm status': %s" + +#: ../cli/src/network-manager.c:127 +#, c-format +msgid "Error: 'nm status': %s; allowed fields: %s" +msgstr "Erro: 'nm status': %s; campos permitidos: %s" + +#: ../cli/src/network-manager.c:134 +msgid "NetworkManager status" +msgstr "status do NetworkManager " + +#. Print header +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "enabled" +msgstr "ativado" + +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "disabled" +msgstr "desativado" + +#: ../cli/src/network-manager.c:148 +msgid "running" +msgstr "executando:" + +#: ../cli/src/network-manager.c:148 +msgid "not running" +msgstr "não está executando:" + +#: ../cli/src/network-manager.c:201 ../cli/src/network-manager.c:233 +#, c-format +msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s" +msgstr "Erro: valor do '--fields' '%s' não é válido aqui; campos permitidos: %s" + +#: ../cli/src/network-manager.c:209 +msgid "WiFi enabled" +msgstr "WiFi ativado" + +#: ../cli/src/network-manager.c:220 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "Erro: parâmetro do 'wifi' inválido: '%s'" + +#: ../cli/src/network-manager.c:241 +msgid "WWAN enabled" +msgstr "WWAN ativado" + +#: ../cli/src/network-manager.c:252 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "Erro: parâmetro 'wwan' inválido: '%s'." + +#: ../cli/src/network-manager.c:263 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "Erro: comando 'nm' '%s' não é válido." + +#: ../cli/src/nmcli.c:69 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -m[ode] tabular|multiline output mode\n" +" -f[ields] |all|common specify fields to output\n" +" -e[scape] yes|no escape columns separators in " +"values\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -m[ode] tabular|multiline output mode\n" +" -f[ields] |all|common specify fields to output\n" +" -e[scape] yes|no escape columns separators in " +"values\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" + +#: ../cli/src/nmcli.c:113 +#, c-format +msgid "Error: Object '%s' is unknown, try 'nmcli help'." +msgstr "Erro: Objeto '%s' é desconhecido, tente o 'nmcli help'." + +#: ../cli/src/nmcli.c:143 +#, c-format +msgid "Error: Option '--terse' is specified the second time." +msgstr "Erro: Opção '--terse' está especificada uma segunda vez" + +#: ../cli/src/nmcli.c:148 +#, c-format +msgid "Error: Option '--terse' is mutually exclusive with '--pretty'." +msgstr "Erro: Opção '--terse'é mutualmente exclusivo com o '--pretty'" + +#: ../cli/src/nmcli.c:156 +#, c-format +msgid "Error: Option '--pretty' is specified the second time." +msgstr "Erro: Opção '--pretty' está especificado uma segunda vez" + +#: ../cli/src/nmcli.c:161 +#, c-format +msgid "Error: Option '--pretty' is mutually exclusive with '--terse'." +msgstr "Erro: Opção '--pretty'é mutualmente exclusivo com o '--terse'" + +#: ../cli/src/nmcli.c:171 ../cli/src/nmcli.c:187 +#, c-format +msgid "Error: missing argument for '%s' option." +msgstr "Erro: argumento está faltando para a opção %s." + +#: ../cli/src/nmcli.c:180 ../cli/src/nmcli.c:196 +#, c-format +msgid "Error: '%s' is not valid argument for '%s' option." +msgstr "Erro: '%s' não é um argumento válido para a opção '%s'" + +#: ../cli/src/nmcli.c:203 +#, c-format +msgid "Error: fields for '%s' options are missing." +msgstr "Erro: campos para as opções '%s' estão faltando" + +#: ../cli/src/nmcli.c:209 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "ferramenta nmcli, versão %s\n" + +#: ../cli/src/nmcli.c:215 +#, c-format +msgid "Error: Option '%s' is unknown, try 'nmcli -help'." +msgstr "Erro: Opção '%s' é desconhecida, tente 'nmcli help'." + +#: ../cli/src/nmcli.c:234 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "Obtenção de sinal %d, fechando..." + +#: ../cli/src/nmcli.c:259 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "Erro: Não foi possível conectar ao NetworkManager." + +#: ../cli/src/nmcli.c:275 +msgid "Success" +msgstr "Sucesso" + +#: ../cli/src/settings.c:407 +#, c-format +msgid "%d (hex-ascii-key)" +msgstr "%d (hex-ascii-key)" + +#: ../cli/src/settings.c:409 +#, c-format +msgid "%d (104/128-bit passphrase)" +msgstr "%d (104/128-bit passphrase)" + +#: ../cli/src/settings.c:412 +#, c-format +msgid "%d (unknown)" +msgstr "%d (desconhecido)" + +#: ../cli/src/settings.c:438 +msgid "0 (unknown)" +msgstr "0 (desconhecido)" + +#: ../cli/src/settings.c:444 +msgid "any, " +msgstr "qualquer um" + +#: ../cli/src/settings.c:446 +msgid "900 MHz, " +msgstr "900 MHz, " + +#: ../cli/src/settings.c:448 +msgid "1800 MHz, " +msgstr "1800 MHz, " + +#: ../cli/src/settings.c:450 +msgid "1900 MHz, " +msgstr "1900 MHz, " + +#: ../cli/src/settings.c:452 +msgid "850 MHz, " +msgstr "850 MHz, " + +#: ../cli/src/settings.c:454 +msgid "WCDMA 3GPP UMTS 2100 MHz, " +msgstr "WCDMA 3GPP UMTS 2100 MHz, " + +#: ../cli/src/settings.c:456 +msgid "WCDMA 3GPP UMTS 1800 MHz, " +msgstr "WCDMA 3GPP UMTS 1800 MHz, " + +#: ../cli/src/settings.c:458 +msgid "WCDMA 3GPP UMTS 1700/2100 MHz, " +msgstr "WCDMA 3GPP UMTS 1700/2100 MHz, " + +#: ../cli/src/settings.c:460 +msgid "WCDMA 3GPP UMTS 800 MHz, " +msgstr "WCDMA 3GPP UMTS 800 MHz, " + +#: ../cli/src/settings.c:462 +msgid "WCDMA 3GPP UMTS 850 MHz, " +msgstr "WCDMA 3GPP UMTS 850 MHz, " + +#: ../cli/src/settings.c:464 +msgid "WCDMA 3GPP UMTS 900 MHz, " +msgstr "WCDMA 3GPP UMTS 900 MHz, " + +#: ../cli/src/settings.c:466 +msgid "WCDMA 3GPP UMTS 1700 MHz, " +msgstr "WCDMA 3GPP UMTS 1700 MHz, " + +#: ../cli/src/settings.c:546 ../cli/src/settings.c:708 +msgid "auto" +msgstr "auto" + +#: ../cli/src/settings.c:704 ../cli/src/settings.c:707 ../cli/src/utils.c:172 +msgid "not set" +msgstr "não definido" + +#: ../cli/src/utils.c:124 +#, c-format +msgid "field '%s' has to be alone" +msgstr "campo '%s' precisa estar sozinho" + +#: ../cli/src/utils.c:127 +#, c-format +msgid "invalid field '%s'" +msgstr "campo inválido '%s'" + +#: ../cli/src/utils.c:146 +#, c-format +msgid "Option '--terse' requires specifying '--fields'" +msgstr "Opção '--terse' requer a especificação de '..fields' " + +#: ../cli/src/utils.c:150 +#, c-format +msgid "Option '--terse' requires specific '--fields' option values , not '%s'" +msgstr "Opção '--terse' requer que especifique os valores da opção '--fields', e não '%s'" #: ../libnm-util/crypto.c:120 #, c-format msgid "PEM key file had no end tag '%s'." -msgstr "A chave do arquivo PEM não tinha a marca de finalização \"%s\"." +msgstr "A chave do arquivo PEM não tinha a marca de finalização '%s'." #: ../libnm-util/crypto.c:130 #, c-format @@ -172,9 +1250,9 @@ msgstr "Memória insuficiente para armazenar o IV." msgid "IV contains non-hexadecimal digits." msgstr "IV contém dígitos não-hexadecimais." -#: ../libnm-util/crypto.c:382 -#: ../libnm-util/crypto_gnutls.c:143 -#: ../libnm-util/crypto_nss.c:169 +#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:336 #, c-format msgid "Private key cipher '%s' was unknown." msgstr "A cifra da chave privada \"%s\" era desconhecida." @@ -194,72 +1272,106 @@ msgstr "Não foi possível determinar o tipo da chave privada." msgid "Not enough memory to store decrypted private key." msgstr "Memória insuficiente para armazenar a chave privada de descriptografia." -#: ../libnm-util/crypto_gnutls.c:46 +#: ../libnm-util/crypto_gnutls.c:49 msgid "Failed to initialize the crypto engine." msgstr "Falha ao inicializar o motor de criptografia." -#: ../libnm-util/crypto_gnutls.c:90 +#: ../libnm-util/crypto_gnutls.c:93 #, c-format msgid "Failed to initialize the MD5 engine: %s / %s." msgstr "Falha ao inicializar o motor MD5: %s / %s." -#: ../libnm-util/crypto_gnutls.c:152 -#: ../libnm-util/crypto_nss.c:178 +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "Comprimento IV inválido (deve ter ao menos %zd)." + +#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188 #, c-format msgid "Not enough memory for decrypted key buffer." msgstr "Memória insuficiente para o buffer da chave descriptografada." -#: ../libnm-util/crypto_gnutls.c:160 +#: ../libnm-util/crypto_gnutls.c:173 #, c-format msgid "Failed to initialize the decryption cipher context: %s / %s." msgstr "Falha ao inicializar o contexto da cifra de descriptografia: %s / %s." -#: ../libnm-util/crypto_gnutls.c:169 +#: ../libnm-util/crypto_gnutls.c:182 #, c-format msgid "Failed to set symmetric key for decryption: %s / %s." msgstr "Falha ao definir chave simétrica para descriptografia: %s / %s." -#: ../libnm-util/crypto_gnutls.c:178 +#: ../libnm-util/crypto_gnutls.c:191 #, c-format msgid "Failed to set IV for decryption: %s / %s." msgstr "Falha ao definir IV para descriptografia: %s / %s." -#: ../libnm-util/crypto_gnutls.c:187 +#: ../libnm-util/crypto_gnutls.c:200 #, c-format msgid "Failed to decrypt the private key: %s / %s." msgstr "Falha ao descriptografar a chave privada: %s / %s." -#: ../libnm-util/crypto_gnutls.c:200 +#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 +#, c-format +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "Falha ao descriptografar a chave privada: comprimento da proteção inesperado." + +#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 #, c-format msgid "Failed to decrypt the private key." msgstr "Falha ao descriptografar a chave privada." -#: ../libnm-util/crypto_gnutls.c:235 +#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "Não foi possível alocar memória para criptografia." + +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "Falha ao inicializar o contexto da cifra de descriptografia: %s / %s. " + +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "Falha ao definir chave simétrica para descriptografia: %s / %s. " + +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +msgid "Failed to set IV for encryption: %s / %s." +msgstr "Falha ao definir IV para descriptografia: %s / %s. " + +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +msgid "Failed to encrypt the data: %s / %s." +msgstr "Falha ao descriptografar a chave privada: %s / %s. " + +#: ../libnm-util/crypto_gnutls.c:362 #, c-format msgid "Error initializing certificate data: %s" msgstr "Erro ao inicializar os dados do certificado: %s" -#: ../libnm-util/crypto_gnutls.c:257 +#: ../libnm-util/crypto_gnutls.c:384 #, c-format msgid "Couldn't decode certificate: %s" msgstr "Não foi possível decodificar o certificado: %s" -#: ../libnm-util/crypto_gnutls.c:281 +#: ../libnm-util/crypto_gnutls.c:408 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %s" msgstr "Não foi possível inicializar o decodificador PKCS#12: %s" -#: ../libnm-util/crypto_gnutls.c:294 +#: ../libnm-util/crypto_gnutls.c:421 #, c-format msgid "Couldn't decode PKCS#12 file: %s" msgstr "Não foi possível decodificar o arquivo PKCS#12: %s" -#: ../libnm-util/crypto_gnutls.c:306 +#: ../libnm-util/crypto_gnutls.c:433 #, c-format msgid "Couldn't verify PKCS#12 file: %s" msgstr "Não foi possível verificar o arquivo PKCS#12: %s" -#: ../libnm-util/crypto_nss.c:57 +#: ../libnm-util/crypto_nss.c:56 #, c-format msgid "Failed to initialize the crypto engine: %d." msgstr "Falha ao inicializar o motor de criptografia: %d." @@ -269,61 +1381,279 @@ msgstr "Falha ao inicializar o motor de criptografia: %d." msgid "Failed to initialize the MD5 context: %d." msgstr "Falha ao inicializar o contexto MD5: %d." -#: ../libnm-util/crypto_nss.c:186 +#: ../libnm-util/crypto_nss.c:179 +#, c-format +msgid "Invalid IV length (must be at least %d)." +msgstr "Comprimento IV inválido (deve ter ao menos %d)." + +#: ../libnm-util/crypto_nss.c:196 #, c-format msgid "Failed to initialize the decryption cipher slot." msgstr "Falha ao inicializar o espaço de cifra de descriptografia." -#: ../libnm-util/crypto_nss.c:196 +#: ../libnm-util/crypto_nss.c:206 #, c-format msgid "Failed to set symmetric key for decryption." msgstr "Falha ao definir chave simétrica para descriptografia." -#: ../libnm-util/crypto_nss.c:206 +#: ../libnm-util/crypto_nss.c:216 #, c-format msgid "Failed to set IV for decryption." msgstr "Falha ao definir IV para descriptografia." -#: ../libnm-util/crypto_nss.c:214 +#: ../libnm-util/crypto_nss.c:224 #, c-format msgid "Failed to initialize the decryption context." msgstr "Falha ao inicializar o contexto de descriptografia." -#: ../libnm-util/crypto_nss.c:227 +#: ../libnm-util/crypto_nss.c:237 #, c-format msgid "Failed to decrypt the private key: %d." msgstr "Falha ao descriptografar a chave privada: %d." -#: ../libnm-util/crypto_nss.c:239 +#: ../libnm-util/crypto_nss.c:245 +#, c-format +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "" +"Falha ao descriptografar a chave privada: dados descriptografados muito " +"grandes." + +#: ../libnm-util/crypto_nss.c:256 #, c-format msgid "Failed to finalize decryption of the private key: %d." msgstr "Falha ao finalizar a descriptografia da chave privada: %d." -#: ../libnm-util/crypto_nss.c:284 +#: ../libnm-util/crypto_nss.c:364 +#, c-format +msgid "Failed to initialize the encryption cipher slot." +msgstr "Falha ao inicializar o espaço de cifra de criptografia. " + +#: ../libnm-util/crypto_nss.c:372 +#, c-format +msgid "Failed to set symmetric key for encryption." +msgstr "Falha ao definir chave simétrica para criptografia." + +#: ../libnm-util/crypto_nss.c:380 +#, c-format +msgid "Failed to set IV for encryption." +msgstr "Falha ao definir IV para criptografia." + +#: ../libnm-util/crypto_nss.c:388 +#, c-format +msgid "Failed to initialize the encryption context." +msgstr "Falha ao inicializar o contexto de criptografia." + +#: ../libnm-util/crypto_nss.c:396 +#, c-format +msgid "Failed to encrypt: %d." +msgstr "Falha ao criptografar: %d." + +#: ../libnm-util/crypto_nss.c:404 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "Quantia inesperada de dados após criptografia." + +#: ../libnm-util/crypto_nss.c:447 #, c-format msgid "Couldn't decode certificate: %d" msgstr "Não foi possível decodificar o certificado: %d" -#: ../libnm-util/crypto_nss.c:317 +#: ../libnm-util/crypto_nss.c:482 #, c-format msgid "Couldn't convert password to UCS2: %d" msgstr "Não foi possível converter senha para o formato UCS2: %d" -#: ../libnm-util/crypto_nss.c:345 +#: ../libnm-util/crypto_nss.c:510 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %d" msgstr "Não foi possível inicializar o decodificador PKCS#12: %d" -#: ../libnm-util/crypto_nss.c:354 +#: ../libnm-util/crypto_nss.c:519 #, c-format msgid "Couldn't decode PKCS#12 file: %d" msgstr "Não foi possível decodificar o arquivo PKCS#12: %d" -#: ../libnm-util/crypto_nss.c:363 +#: ../libnm-util/crypto_nss.c:528 #, c-format msgid "Couldn't verify PKCS#12 file: %d" msgstr "Não foi possível verificar o arquivo PKCS#12: %d" -#~ msgid "Not enough memory to create private key decryption key." -#~ msgstr "Memória insuficiente para descriptografar a chave privada." +#: ../libnm-util/crypto_nss.c:557 +msgid "Could not generate random data." +msgstr "Não foi possível gerar dados aleatórios." + +#: ../libnm-util/nm-utils.c:1925 +#, c-format +msgid "Not enough memory to make encryption key." +msgstr "Memória insuficiente para criptografar a chave." + +#: ../libnm-util/nm-utils.c:2035 +msgid "Could not allocate memory for PEM file creation." +msgstr "Não foi possível alocar memória criar arquivo PEM." + +#: ../libnm-util/nm-utils.c:2047 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "Não foi possível alocar memória para gravar IV no arquivo PEM." + +#: ../libnm-util/nm-utils.c:2059 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "" +"Não foi possível alocar memória para gravar chave criptografada no arquivo " +"PEM." + +#: ../libnm-util/nm-utils.c:2078 +#, c-format +msgid "Could not allocate memory for PEM file data." +msgstr "Nâo foi possível alocar memória para daods de arquivo PEM." + +#: ../src/nm-netlink-monitor.c:100 ../src/nm-netlink-monitor.c:231 +#: ../src/nm-netlink-monitor.c:653 +#, c-format +msgid "error processing netlink message: %s" +msgstr "erro ao processar mensagem do netlink: %s" + +#: ../src/nm-netlink-monitor.c:214 +msgid "error occurred while waiting for data on socket" +msgstr "ocorreu um erro ao esperar pelos dados da conexão" + +#: ../src/nm-netlink-monitor.c:254 +#, c-format +msgid "unable to connect to netlink for monitoring link status: %s" +msgstr "não foi possível conectar ao netlink para monitoração de status do link: %s" + +#: ../src/nm-netlink-monitor.c:265 +#, c-format +msgid "unable to enable netlink handle credential passing: %s" +msgstr "não foi possível ativar o netlink para manipular a passagem da credencial: %s" + +#: ../src/nm-netlink-monitor.c:291 ../src/nm-netlink-monitor.c:353 +#, c-format +msgid "unable to allocate netlink handle for monitoring link status: %s" +msgstr "" +"não foi possível alocar o manipulador do netlink para monitoração de status " +"do link: %s" + +#: ../src/nm-netlink-monitor.c:376 +#, c-format +msgid "unable to allocate netlink link cache for monitoring link status: %s" +msgstr "" +"não foi possível alocar o cache de link do netlink para monitoração de " +"status do link: %s" + +#: ../src/nm-netlink-monitor.c:502 +#, c-format +msgid "unable to join netlink group: %s" +msgstr "não foi possível associar-se ao grupo do netlink : %s" + +#: ../src/nm-netlink-monitor.c:629 ../src/nm-netlink-monitor.c:642 +#, c-format +msgid "error updating link cache: %s" +msgstr "erro ao atualizar o cache de link: %s" + +#: ../src/main.c:502 +#, c-format +msgid "Invalid option. Please use --help to see a list of valid options.\n" +msgstr "Opção inválida. Por favor, use --help para ver uma lista de opções válidas.\n" + +#: ../src/main.c:562 +#, c-format +msgid "%s. Please use --help to see a list of valid options.\n" +msgstr "%s. Por favor, use --help para ver uma lista de opções válidas.\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:325 +msgid "# Created by NetworkManager\n" +msgstr "# Criado pelo NetworkManager\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:341 +#, c-format +msgid "" +"# Merged from %s\n" +"\n" +msgstr "" +"# Mesclado de %s\n" +"\n" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:279 +msgid "no usable DHCP client could be found." +msgstr "Não foi encontrado nenhum cliente DHCP usável." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:288 +msgid "'dhclient' could be found." +msgstr "'dhclient' não pôde ser encontrado." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:298 +msgid "'dhcpcd' could be found." +msgstr "Não foi possível encontrar 'dhcpcd'" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:306 +#, c-format +msgid "unsupported DHCP client '%s'" +msgstr "Cliente DHCP sem suporte '%s'" + +#: ../src/logging/nm-logging.c:146 +#, c-format +msgid "Unknown log level '%s'" +msgstr "Nível de log desconhecido '%s'" + +#: ../src/logging/nm-logging.c:171 +#, c-format +msgid "Unknown log domain '%s'" +msgstr "Domínio de log desconhecido '%s'" + +#: ../src/named-manager/nm-named-manager.c:343 +msgid "NOTE: the libc resolver may not support more than 3 nameservers." +msgstr "" +"NOTA: o resolvedor da libc não tem suporte a mais do que 3 servidores de " +"nomes." + +#: ../src/named-manager/nm-named-manager.c:345 +msgid "The nameservers listed below may not be recognized." +msgstr "Os servidores de nomes listados abaixo podem não ser reconhecidos." + +#: ../src/system-settings/nm-default-wired-connection.c:157 +#, c-format +msgid "Auto %s" +msgstr "Auto %s" + +#: ../system-settings/plugins/ifcfg-rh/reader.c:3256 +msgid "System" +msgstr "Sistema" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "Compartilhamento de conexão via rede WiFi protegida" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "Compartilhamento de conexão via rede de WiFi aberta" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "Modificar hostname do sistema persistente" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 +msgid "Modify system connections" +msgstr "Modificar conexões de sistema" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 +msgid "System policy prevents modification of system settings" +msgstr "Política de sistema evita modificação de configuração de sistema" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +msgid "System policy prevents modification of the persistent system hostname" +msgstr "Política de sistema evita modificação de hostname de sistema persistente" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "" +"Política de Sistema evita compartilhamento de conexões via rede de WiFi " +"protegida." + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "" +"Política de Sistema evita compartilhamento de conexões via rede de WiFi " +"aberta" diff --git a/po/ru.po b/po/ru.po index 60e3e9e2ac..d9df5d3f03 100644 --- a/po/ru.po +++ b/po/ru.po @@ -4,31 +4,1170 @@ # # Leonid Kanter , 2006, 2007. # Артём Попов , 2009. +# Yulia , 2010. msgid "" msgstr "" "Project-Id-Version: ru\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-02-12 16:33+0600\n" -"PO-Revision-Date: 2009-02-12 16:33+0600\n" -"Last-Translator: Артём Попов \n" -"Language-Team: \n" +"POT-Creation-Date: 2010-05-06 14:31+0530\n" +"PO-Revision-Date: 2010-05-07 14:56+1000\n" +"Last-Translator: Yulia \n" +"Language-Team: Russian\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" -"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "X-Launchpad-Export-Date: 2009-02-12 11:00+0000\n" -"X-Generator: Launchpad (build Unknown)\n" +"X-Generator: KBabel 1.11.4\n" + +#: ../cli/src/connections.c:59 ../cli/src/connections.c:74 +#: ../cli/src/devices.c:85 ../cli/src/devices.c:98 ../cli/src/devices.c:108 +#: ../cli/src/devices.c:118 ../cli/src/devices.c:131 ../cli/src/devices.c:142 +#: ../cli/src/devices.c:152 +msgid "NAME" +msgstr "ИМЯ" + +#. 0 +#: ../cli/src/connections.c:60 ../cli/src/connections.c:75 +msgid "UUID" +msgstr "UUID" + +#. 1 +#: ../cli/src/connections.c:61 +msgid "DEVICES" +msgstr "УСТРОЙСТВА" + +#. 2 +#: ../cli/src/connections.c:62 ../cli/src/connections.c:77 +msgid "SCOPE" +msgstr "ОБЛАСТЬ" + +#. 3 +#: ../cli/src/connections.c:63 +msgid "DEFAULT" +msgstr "ПО УМОЛЧАНИЮ" + +#. 4 +#: ../cli/src/connections.c:64 +msgid "DBUS-SERVICE" +msgstr "СЛУЖБА DBUS" + +#. 5 +#: ../cli/src/connections.c:65 +msgid "SPEC-OBJECT" +msgstr "SPEC-OBJECT" + +#. 6 +#: ../cli/src/connections.c:66 +msgid "VPN" +msgstr "VPN" + +#. 1 +#. 0 +#. 1 +#: ../cli/src/connections.c:76 ../cli/src/devices.c:61 ../cli/src/devices.c:87 +msgid "TYPE" +msgstr "ТИП" + +#. 3 +#: ../cli/src/connections.c:78 +msgid "TIMESTAMP" +msgstr "ВРЕМЕННАЯ МЕТКА" + +#. 4 +#: ../cli/src/connections.c:79 +msgid "TIMESTAMP-REAL" +msgstr "ДЕЙСТВ. ВРЕМЕННАЯ МЕТКА" + +#. 5 +#: ../cli/src/connections.c:80 +msgid "AUTOCONNECT" +msgstr "АВТОПОДКЛЮЧЕНИЕ" + +#. 6 +#: ../cli/src/connections.c:81 +msgid "READONLY" +msgstr "ТОЛЬКО ДЛЯ ЧТЕНИЯ" + +#: ../cli/src/connections.c:157 +#, c-format +msgid "" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" +msgstr "" +"Применение: nmcli con { КОМАНДА | help }\n" +" КОМАНДА := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" + +#: ../cli/src/connections.c:197 ../cli/src/connections.c:536 +#, c-format +msgid "Error: 'con list': %s" +msgstr "Ошибка: 'con list': %s" + +#: ../cli/src/connections.c:199 ../cli/src/connections.c:538 +#, c-format +msgid "Error: 'con list': %s; allowed fields: %s" +msgstr "Ошибка: 'con list': %s; разрешённые поля: %s" + +#: ../cli/src/connections.c:207 +msgid "Connection details" +msgstr "Сведения о соединении" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "system" +msgstr "система" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "user" +msgstr "пользователь" + +#: ../cli/src/connections.c:383 +msgid "never" +msgstr "никогда" + +#. "CAPABILITIES" +#. Print header +#. "WIFI-PROPERTIES" +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:544 ../cli/src/settings.c:643 +#: ../cli/src/settings.c:912 ../cli/src/settings.c:913 +#: ../cli/src/settings.c:915 ../cli/src/settings.c:917 +#: ../cli/src/settings.c:1042 ../cli/src/settings.c:1043 +#: ../cli/src/settings.c:1044 ../cli/src/settings.c:1123 +#: ../cli/src/settings.c:1124 ../cli/src/settings.c:1125 +#: ../cli/src/settings.c:1126 ../cli/src/settings.c:1127 +#: ../cli/src/settings.c:1128 ../cli/src/settings.c:1129 +#: ../cli/src/settings.c:1130 ../cli/src/settings.c:1131 +#: ../cli/src/settings.c:1132 ../cli/src/settings.c:1133 +#: ../cli/src/settings.c:1134 ../cli/src/settings.c:1135 +#: ../cli/src/settings.c:1210 +msgid "yes" +msgstr "да" + +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:506 ../cli/src/settings.c:544 +#: ../cli/src/settings.c:643 ../cli/src/settings.c:912 +#: ../cli/src/settings.c:913 ../cli/src/settings.c:915 +#: ../cli/src/settings.c:917 ../cli/src/settings.c:1042 +#: ../cli/src/settings.c:1043 ../cli/src/settings.c:1044 +#: ../cli/src/settings.c:1123 ../cli/src/settings.c:1124 +#: ../cli/src/settings.c:1125 ../cli/src/settings.c:1126 +#: ../cli/src/settings.c:1127 ../cli/src/settings.c:1128 +#: ../cli/src/settings.c:1129 ../cli/src/settings.c:1130 +#: ../cli/src/settings.c:1131 ../cli/src/settings.c:1132 +#: ../cli/src/settings.c:1133 ../cli/src/settings.c:1134 +#: ../cli/src/settings.c:1135 ../cli/src/settings.c:1210 +msgid "no" +msgstr "нет" + +#: ../cli/src/connections.c:457 ../cli/src/connections.c:500 +msgid "System connections" +msgstr "Соединения систем" + +#: ../cli/src/connections.c:462 ../cli/src/connections.c:513 +msgid "User connections" +msgstr "Соединения пользователя" + +#: ../cli/src/connections.c:474 ../cli/src/connections.c:1334 +#: ../cli/src/connections.c:1350 ../cli/src/connections.c:1359 +#: ../cli/src/connections.c:1370 ../cli/src/connections.c:1452 +#: ../cli/src/devices.c:864 ../cli/src/devices.c:874 ../cli/src/devices.c:973 +#: ../cli/src/devices.c:980 +#, c-format +msgid "Error: %s argument is missing." +msgstr "Ошибка: отсутствует аргумент %s" + +#: ../cli/src/connections.c:487 +#, c-format +msgid "Error: %s - no such connection." +msgstr "Ошибка: нет подключения %s" + +#: ../cli/src/connections.c:519 ../cli/src/connections.c:1383 +#: ../cli/src/connections.c:1470 ../cli/src/devices.c:687 +#: ../cli/src/devices.c:754 ../cli/src/devices.c:888 ../cli/src/devices.c:986 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "Неизвестный параметр: %s\n" + +#: ../cli/src/connections.c:528 +#, c-format +msgid "Error: no valid parameter specified." +msgstr "Ошибка: не указан допустимый параметр." + +#: ../cli/src/connections.c:543 ../cli/src/connections.c:1572 +#: ../cli/src/devices.c:1192 ../cli/src/network-manager.c:274 +#, c-format +msgid "Error: %s." +msgstr "Ошибка: %s." + +#: ../cli/src/connections.c:649 +#, c-format +msgid "Error: 'con status': %s" +msgstr "Ошибка: 'con status': %s" + +#: ../cli/src/connections.c:651 +#, c-format +msgid "Error: 'con status': %s; allowed fields: %s" +msgstr "Ошибка: 'con status': %s; разрешённые поля: %s" + +#: ../cli/src/connections.c:658 +msgid "Active connections" +msgstr "Активные соединения" + +#: ../cli/src/connections.c:1026 +#, c-format +msgid "no active connection on device '%s'" +msgstr "нет активных соединений на устройстве «%s»" + +#: ../cli/src/connections.c:1034 +#, c-format +msgid "no active connection or device" +msgstr "нет активного соединения или устройства" + +#: ../cli/src/connections.c:1084 +#, c-format +msgid "device '%s' not compatible with connection '%s'" +msgstr "устройство «%s» несовместимо с соединением «%s»" + +#: ../cli/src/connections.c:1086 +#, c-format +msgid "no device found for connection '%s'" +msgstr "не найдено устройство для соединения «%s»" + +#: ../cli/src/connections.c:1097 +msgid "activating" +msgstr "активация" + +#: ../cli/src/connections.c:1099 +msgid "activated" +msgstr "активно" + +#: ../cli/src/connections.c:1102 ../cli/src/connections.c:1125 +#: ../cli/src/connections.c:1158 ../cli/src/devices.c:224 +#: ../cli/src/devices.c:514 ../cli/src/network-manager.c:92 +#: ../cli/src/network-manager.c:145 ../cli/src/settings.c:469 +msgid "unknown" +msgstr "неизвестно" + +#: ../cli/src/connections.c:1111 +msgid "VPN connecting (prepare)" +msgstr "Подключение VPN (подготовка)" + +#: ../cli/src/connections.c:1113 +msgid "VPN connecting (need authentication)" +msgstr "Подключение VPN (требуется аутентификация)" + +#: ../cli/src/connections.c:1115 +msgid "VPN connecting" +msgstr "Подключение VPN" + +#: ../cli/src/connections.c:1117 +msgid "VPN connecting (getting IP configuration)" +msgstr "Подключение VPN (получение конфигурации IP)" + +#: ../cli/src/connections.c:1119 +msgid "VPN connected" +msgstr "VPN подключен" + +#: ../cli/src/connections.c:1121 +msgid "VPN connection failed" +msgstr "Сбой подключения VPN" + +#: ../cli/src/connections.c:1123 +msgid "VPN disconnected" +msgstr "VPN отключен" + +#: ../cli/src/connections.c:1134 +msgid "unknown reason" +msgstr "неизвестная причина" + +#: ../cli/src/connections.c:1136 +msgid "none" +msgstr "нет" + +#: ../cli/src/connections.c:1138 +msgid "the user was disconnected" +msgstr "пользователь был отключен" + +#: ../cli/src/connections.c:1140 +msgid "the base network connection was interrupted" +msgstr "основное соединение с сетью было разорвано" + +#: ../cli/src/connections.c:1142 +msgid "the VPN service stopped unexpectedly" +msgstr "служба VPN внезапно прекратила работу" + +#: ../cli/src/connections.c:1144 +msgid "the VPN service returned invalid configuration" +msgstr "служба VPN вернула недопустимую конфигурацию" + +#: ../cli/src/connections.c:1146 +msgid "the connection attempt timed out" +msgstr "время ожидания соединения истекло" + +#: ../cli/src/connections.c:1148 +msgid "the VPN service did not start in time" +msgstr "служба VPN не была запущена вовремя" + +#: ../cli/src/connections.c:1150 +msgid "the VPN service failed to start" +msgstr "не удалось запустить службу VPN" + +#: ../cli/src/connections.c:1152 +msgid "no valid VPN secrets" +msgstr "нет верных секретов VPN" + +#: ../cli/src/connections.c:1154 +msgid "invalid VPN secrets" +msgstr "неверные секреты VPN" + +#: ../cli/src/connections.c:1156 +msgid "the connection was removed" +msgstr "соединение удалено" + +#: ../cli/src/connections.c:1170 +#, c-format +msgid "state: %s\n" +msgstr "статус: %s\n" + +#: ../cli/src/connections.c:1173 ../cli/src/connections.c:1199 +#, c-format +msgid "Connection activated\n" +msgstr "Соединение активно\n" + +#: ../cli/src/connections.c:1176 +#, c-format +msgid "Error: Connection activation failed." +msgstr "Ошибка: сбой активации соединения." + +#: ../cli/src/connections.c:1195 +#, c-format +msgid "state: %s (%d)\n" +msgstr "статус: %s (%d)\n" + +#: ../cli/src/connections.c:1205 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "Ошибка: сбой активации соединения: %s." + +#: ../cli/src/connections.c:1222 ../cli/src/devices.c:811 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "Ошибка: превышено время ожидания: %d сек." + +#: ../cli/src/connections.c:1265 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "Ошибка: сбой активации соединения: %s" + +#: ../cli/src/connections.c:1279 +#, c-format +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "Ошибка: не удалось установить активное соединение для «%s»" + +#: ../cli/src/connections.c:1288 +#, c-format +msgid "Active connection state: %s\n" +msgstr "Статус активного соединения: %s\n" + +#: ../cli/src/connections.c:1289 +#, c-format +msgid "Active connection path: %s\n" +msgstr "Путь активного соединения: %s\n" + +#: ../cli/src/connections.c:1343 ../cli/src/connections.c:1461 +#, c-format +msgid "Error: Unknown connection: %s." +msgstr "Ошибка: неизвестное соединение: %s." + +#: ../cli/src/connections.c:1378 ../cli/src/devices.c:882 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "Ошибка: недопустимое значение таймаута: «%s»" + +#: ../cli/src/connections.c:1391 ../cli/src/connections.c:1478 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "Ошибка: необходимо указать ID или UUID." + +#: ../cli/src/connections.c:1411 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "Ошибка: подходящее устройство не найдено: %s." + +#: ../cli/src/connections.c:1413 +#, c-format +msgid "Error: No suitable device found." +msgstr "Ошибка: подходящее устройство не найдено." + +#: ../cli/src/connections.c:1505 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "Предупреждение: соединение не активно\n" + +#: ../cli/src/connections.c:1561 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "Ошибка: недопустимая команда «con»: «%s»" + +#: ../cli/src/connections.c:1597 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "Ошибка: не удалось подключиться к D-Bus." + +#: ../cli/src/connections.c:1604 +#, c-format +msgid "Error: Could not get system settings." +msgstr "Ошибка: не удалось получить системные настройки." + +#: ../cli/src/connections.c:1612 +#, c-format +msgid "Error: Could not get user settings." +msgstr "Ошибка: не удалось получить настройки пользователя." + +#: ../cli/src/connections.c:1622 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "Ошибка: не удалось получить соединения, не выполняются службы настройки." + +#. 0 +#. 9 +#: ../cli/src/devices.c:60 ../cli/src/devices.c:86 ../cli/src/devices.c:162 +msgid "DEVICE" +msgstr "УСТРОЙСТВО" + +#. 1 +#. 4 +#. 0 +#: ../cli/src/devices.c:62 ../cli/src/devices.c:90 +#: ../cli/src/network-manager.c:36 +msgid "STATE" +msgstr "СТАТУС" + +#: ../cli/src/devices.c:71 +msgid "GENERAL" +msgstr "ОБЩИЕ" + +#. 0 +#: ../cli/src/devices.c:72 +msgid "CAPABILITIES" +msgstr "ВОЗМОЖНОСТИ" + +#. 1 +#: ../cli/src/devices.c:73 +msgid "WIFI-PROPERTIES" +msgstr "СВОЙСТВА WIFI" + +#. 2 +#: ../cli/src/devices.c:74 +msgid "AP" +msgstr "ТОЧКА" + +#. 3 +#: ../cli/src/devices.c:75 +msgid "WIRED-PROPERTIES" +msgstr "СВОЙСТВА ПРОВОДНОГО СОЕДИНЕНИЯ" + +#. 4 +#: ../cli/src/devices.c:76 +msgid "IP4-SETTINGS" +msgstr "НАСТРОЙКИ IP4" + +#. 5 +#: ../cli/src/devices.c:77 +msgid "IP4-DNS" +msgstr "IP4-DNS" + +#. 2 +#: ../cli/src/devices.c:88 +msgid "DRIVER" +msgstr "ДРАЙВЕР" + +#. 3 +#: ../cli/src/devices.c:89 +msgid "HWADDR" +msgstr "HWADDR" + +#. 0 +#: ../cli/src/devices.c:99 +msgid "CARRIER-DETECT" +msgstr "ОПРЕД.НЕСУЩУЮ" + +#. 1 +#: ../cli/src/devices.c:100 +msgid "SPEED" +msgstr "СКОРОСТЬ" + +#. 0 +#: ../cli/src/devices.c:109 +msgid "CARRIER" +msgstr "НЕСУЩАЯ" + +#. 0 +#: ../cli/src/devices.c:119 +msgid "WEP" +msgstr "WEP" + +#. 1 +#: ../cli/src/devices.c:120 +msgid "WPA" +msgstr "WPA" + +#. 2 +#: ../cli/src/devices.c:121 +msgid "WPA2" +msgstr "WPA2" + +#. 3 +#: ../cli/src/devices.c:122 +msgid "TKIP" +msgstr "TKIP" + +#. 4 +#: ../cli/src/devices.c:123 +msgid "CCMP" +msgstr "CCMP" + +#. 0 +#: ../cli/src/devices.c:132 +msgid "ADDRESS" +msgstr "АДРЕС" + +#. 1 +#: ../cli/src/devices.c:133 +msgid "PREFIX" +msgstr "ПРЕФИКС" + +#. 2 +#: ../cli/src/devices.c:134 +msgid "GATEWAY" +msgstr "ШЛЮЗ" + +#. 0 +#: ../cli/src/devices.c:143 +msgid "DNS" +msgstr "DNS" + +#. 0 +#: ../cli/src/devices.c:153 +msgid "SSID" +msgstr "SSID" + +#. 1 +#: ../cli/src/devices.c:154 +msgid "BSSID" +msgstr "BSSID" + +#. 2 +#: ../cli/src/devices.c:155 +msgid "MODE" +msgstr "РЕЖИМ" + +#. 3 +#: ../cli/src/devices.c:156 +msgid "FREQ" +msgstr "ЧАСТОТА" + +#. 4 +#: ../cli/src/devices.c:157 +msgid "RATE" +msgstr "СКОРОСТЬ" + +#. 5 +#: ../cli/src/devices.c:158 +msgid "SIGNAL" +msgstr "СИГНАЛ" + +#. 6 +#: ../cli/src/devices.c:159 +msgid "SECURITY" +msgstr "ЗАЩИТА" + +#. 7 +#: ../cli/src/devices.c:160 +msgid "WPA-FLAGS" +msgstr "ФЛАГИ WPA" + +#. 8 +#: ../cli/src/devices.c:161 +msgid "RSN-FLAGS" +msgstr "ФЛАГИ RSN" + +#. 10 +#: ../cli/src/devices.c:163 +msgid "ACTIVE" +msgstr "АКТИВЕН" + +#: ../cli/src/devices.c:186 +#, c-format +msgid "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +"\n" +msgstr "" +"Применение: nmcli dev { КОМАНДА | help }\n" +"\n" +" КОМАНДА := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [ waddr ]]\n" +"\n" + +#: ../cli/src/devices.c:206 +msgid "unmanaged" +msgstr "без управления" + +#: ../cli/src/devices.c:208 +msgid "unavailable" +msgstr "недоступен" + +#: ../cli/src/devices.c:210 ../cli/src/network-manager.c:89 +msgid "disconnected" +msgstr "отключен" + +#: ../cli/src/devices.c:212 +msgid "connecting (prepare)" +msgstr "подключается (подготовка)" + +#: ../cli/src/devices.c:214 +msgid "connecting (configuring)" +msgstr "подключается (конфигурация)" + +#: ../cli/src/devices.c:216 +msgid "connecting (need authentication)" +msgstr "подключается (требуется аутентификация)" + +#: ../cli/src/devices.c:218 +msgid "connecting (getting IP configuration)" +msgstr "подключается (получение настроек IP)" + +#: ../cli/src/devices.c:220 ../cli/src/network-manager.c:87 +msgid "connected" +msgstr "подключен" + +#: ../cli/src/devices.c:222 +msgid "connection failed" +msgstr "сбой соединения" + +#: ../cli/src/devices.c:245 ../cli/src/devices.c:380 +msgid "Unknown" +msgstr "Неизвестно" + +#: ../cli/src/devices.c:277 +msgid "(none)" +msgstr "(нет)" + +#: ../cli/src/devices.c:302 +#, c-format +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s: ошибка преобразования адреса IP4 0x%X" + +#: ../cli/src/devices.c:349 +#, c-format +msgid "%u MHz" +msgstr "%u МГц" + +#: ../cli/src/devices.c:350 +#, c-format +msgid "%u MB/s" +msgstr "%u МБ/с" + +#: ../cli/src/devices.c:359 +msgid "Encrypted: " +msgstr "Зашифровано: " + +#: ../cli/src/devices.c:364 +msgid "WEP " +msgstr "WEP " + +#: ../cli/src/devices.c:366 +msgid "WPA " +msgstr "WPA " + +#: ../cli/src/devices.c:368 +msgid "WPA2 " +msgstr "WPA2 " + +#: ../cli/src/devices.c:371 +msgid "Enterprise " +msgstr "Enterprise " + +#: ../cli/src/devices.c:380 +msgid "Ad-Hoc" +msgstr "Ad-Hoc" + +#: ../cli/src/devices.c:380 +msgid "Infrastructure" +msgstr "Инфраструктура" + +#: ../cli/src/devices.c:442 +#, c-format +msgid "Error: 'dev list': %s" +msgstr "Ошибка: «dev list»: %s" + +#: ../cli/src/devices.c:444 +#, c-format +msgid "Error: 'dev list': %s; allowed fields: %s" +msgstr "Ошибка: «dev list»: %s; разрешённые поля: %s" + +#: ../cli/src/devices.c:453 +msgid "Device details" +msgstr "Сведения об устройстве" + +#: ../cli/src/devices.c:483 ../cli/src/devices.c:827 +msgid "(unknown)" +msgstr "(неизвестно)" + +#: ../cli/src/devices.c:484 +msgid "unknown)" +msgstr "неизвестно)" + +#: ../cli/src/devices.c:510 +#, c-format +msgid "%u Mb/s" +msgstr "%u Мб/c" + +#. Print header +#. "WIRED-PROPERTIES" +#: ../cli/src/devices.c:583 +msgid "on" +msgstr "вкл" + +#: ../cli/src/devices.c:583 +msgid "off" +msgstr "выкл" + +#: ../cli/src/devices.c:710 +#, c-format +msgid "Error: 'dev status': %s" +msgstr "Ошибка: «dev status»: %s" + +#: ../cli/src/devices.c:712 +#, c-format +msgid "Error: 'dev status': %s; allowed fields: %s" +msgstr "Ошибка: «dev status»: %s; разрешённые поля: %s" + +#: ../cli/src/devices.c:719 +msgid "Status of devices" +msgstr "Статус устройств" + +#: ../cli/src/devices.c:747 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "Ошибка: отсутствует аргумент «%s»" + +#: ../cli/src/devices.c:776 ../cli/src/devices.c:915 ../cli/src/devices.c:1035 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "Ошибка: не найдено устройство «%s»." + +#: ../cli/src/devices.c:799 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "Выполнено: устройство «%s» подключено." + +#: ../cli/src/devices.c:824 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "Ошибка: не удалось отключить устройство «%s» (%s): %s" + +#: ../cli/src/devices.c:832 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "Статус устройства: %d (%s)\n" + +#: ../cli/src/devices.c:896 +#, c-format +msgid "Error: iface has to be specified." +msgstr "Ошибка: необходимо указать интерфейс." + +#: ../cli/src/devices.c:1011 +#, c-format +msgid "Error: 'dev wifi': %s" +msgstr "Ошибка: «dev wifi»: «%s»" + +#: ../cli/src/devices.c:1013 +#, c-format +msgid "Error: 'dev wifi': %s; allowed fields: %s" +msgstr "Ошибка: «dev wifi»: %s; разрешённые поля: %s" + +#: ../cli/src/devices.c:1020 +msgid "WiFi scan list" +msgstr "Список проверки WiFi" + +#: ../cli/src/devices.c:1055 ../cli/src/devices.c:1109 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "Ошибка: точка доступа с адресом «%s» не найдена." + +#: ../cli/src/devices.c:1072 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "Ошибка: «%s» не является устройством WiFi." + +#: ../cli/src/devices.c:1136 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "Ошибка: неверная команда «dev wifi»: «%s»" + +#: ../cli/src/devices.c:1183 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "Ошибка: неверная команда «dev»: «%s»" + +#: ../cli/src/network-manager.c:35 +msgid "RUNNING" +msgstr "ВЫПОЛНЯЕТСЯ" + +#. 1 +#: ../cli/src/network-manager.c:37 +msgid "WIFI-HARDWARE" +msgstr "ОБОРУДОВАНИЕ WIFI" + +#. 2 +#: ../cli/src/network-manager.c:38 +msgid "WIFI" +msgstr "WIFI" + +#. 3 +#: ../cli/src/network-manager.c:39 +msgid "WWAN-HARDWARE" +msgstr "ОБОРУДОВАНИЕ WWAN" + +#. 4 +#: ../cli/src/network-manager.c:40 +msgid "WWAN" +msgstr "WWAN" + +#: ../cli/src/network-manager.c:62 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" +msgstr "" +"Применение: nmcli nm { КОМАНДА | help }\n" +"\n" +" КОМАНДА := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + +#: ../cli/src/network-manager.c:83 +msgid "asleep" +msgstr "спящий" + +#: ../cli/src/network-manager.c:85 +msgid "connecting" +msgstr "подключается" + +#: ../cli/src/network-manager.c:125 +#, c-format +msgid "Error: 'nm status': %s" +msgstr "Ошибка: «nm status»: %s" + +#: ../cli/src/network-manager.c:127 +#, c-format +msgid "Error: 'nm status': %s; allowed fields: %s" +msgstr "Ошибка: «nm status»: %s; разрешённые поля: %s" + +#: ../cli/src/network-manager.c:134 +msgid "NetworkManager status" +msgstr "Статус NetworkManager" + +#. Print header +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "enabled" +msgstr "включен" + +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "disabled" +msgstr "отключен" + +#: ../cli/src/network-manager.c:148 +msgid "running" +msgstr "выполняется" + +#: ../cli/src/network-manager.c:148 +msgid "not running" +msgstr "не выполняется" + +#: ../cli/src/network-manager.c:201 ../cli/src/network-manager.c:233 +#, c-format +msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s" +msgstr "Ошибка: недопустимое значение «--fields»: «%s»; разрешённые поля: %s" + +#: ../cli/src/network-manager.c:209 +msgid "WiFi enabled" +msgstr "WiFi включен" + +#: ../cli/src/network-manager.c:220 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "Ошибка: недопустимый параметр «wifi»: «%s»" + +#: ../cli/src/network-manager.c:241 +msgid "WWAN enabled" +msgstr "WWAN включен" + +#: ../cli/src/network-manager.c:252 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "Ошибка: недопустимый параметр «wwan»: «%s»" + +#: ../cli/src/network-manager.c:263 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "Ошибка: недопустимая команда «nm»: «%s»." + +#: ../cli/src/nmcli.c:69 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -m[ode] tabular|multiline output mode\n" +" -f[ields] |all|common specify fields to output\n" +" -e[scape] yes|no escape columns separators in " +"values\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"Применение: %s [ПАРАМЕТРЫ] ОБЪЕКТ { КОМАНДА | help }\n" +"\n" +"ПАРАМЕТРЫ\n" +" -t[erse] сжатый вывод\n" +" -p[retty] отформатированный вывод\n" +" -m[ode] tabular|multiline режим вывода\n" +" -f[ields] <поле1,поле2,...>|all|common вывод выбранных полей\n" +" -e[scape] yes|no отделять разделитель столбцов в значениях специальными символами\n" +" -v[ersion] показать версию программы\n" +" -h[elp] показать эту справку\n" +"\n" +"ОБЪЕКТ\n" +" nm статус NetworkManager\n" +" con соединения NetworkManager\n" +" dev устройства под управлением NetworkManager\n" +"\n" + +#: ../cli/src/nmcli.c:113 +#, c-format +msgid "Error: Object '%s' is unknown, try 'nmcli help'." +msgstr "Ошибка: неизвестный объект «%s». Попробуйте выполнить «nmcli help»." + +#: ../cli/src/nmcli.c:143 +#, c-format +msgid "Error: Option '--terse' is specified the second time." +msgstr "Ошибка: параметр «--terse» указан дважды." + +#: ../cli/src/nmcli.c:148 +#, c-format +msgid "Error: Option '--terse' is mutually exclusive with '--pretty'." +msgstr "Ошибка: параметры «--terse» и «--pretty» взаимоисключаемы." + +#: ../cli/src/nmcli.c:156 +#, c-format +msgid "Error: Option '--pretty' is specified the second time." +msgstr "Ошибка: параметр «--pretty» указан дважды." + +#: ../cli/src/nmcli.c:161 +#, c-format +msgid "Error: Option '--pretty' is mutually exclusive with '--terse'." +msgstr "Ошибка: параметры «--pretty» и «--terse» взаимоисключаемы." + +#: ../cli/src/nmcli.c:171 ../cli/src/nmcli.c:187 +#, c-format +msgid "Error: missing argument for '%s' option." +msgstr "Ошибка: отсутствует аргумент параметра «%s»." + +#: ../cli/src/nmcli.c:180 ../cli/src/nmcli.c:196 +#, c-format +msgid "Error: '%s' is not valid argument for '%s' option." +msgstr "Ошибка: недопустимый аргумент «%s» для параметра «%s»." + +#: ../cli/src/nmcli.c:203 +#, c-format +msgid "Error: fields for '%s' options are missing." +msgstr "Ошибка: отсутствуют поля для параметров «%s»." + +#: ../cli/src/nmcli.c:209 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "утилита nmcli, версия %s\n" + +#: ../cli/src/nmcli.c:215 +#, c-format +msgid "Error: Option '%s' is unknown, try 'nmcli -help'." +msgstr "Ошибка: неизвестный параметр «%s». Попробуйте выполнить «nmcli -help»." + +#: ../cli/src/nmcli.c:234 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "Получен сигнал %d. Завершение работы..." + +#: ../cli/src/nmcli.c:259 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "Ошибка: не удалось подключиться к NetworkManager." + +#: ../cli/src/nmcli.c:275 +msgid "Success" +msgstr "Успешно" + +#: ../cli/src/settings.c:407 +#, c-format +msgid "%d (hex-ascii-key)" +msgstr "%d (16-теричный ASCII-ключ)" + +#: ../cli/src/settings.c:409 +#, c-format +msgid "%d (104/128-bit passphrase)" +msgstr "%d (104/128-битная парольная фраза)" + +#: ../cli/src/settings.c:412 +#, c-format +msgid "%d (unknown)" +msgstr "%d (неизвестно)" + +#: ../cli/src/settings.c:438 +msgid "0 (unknown)" +msgstr "0 (неизвестно)" + +#: ../cli/src/settings.c:444 +msgid "any, " +msgstr "любой, " + +#: ../cli/src/settings.c:446 +msgid "900 MHz, " +msgstr "900 МГц, " + +#: ../cli/src/settings.c:448 +msgid "1800 MHz, " +msgstr "1800 МГц, " + +#: ../cli/src/settings.c:450 +msgid "1900 MHz, " +msgstr "1900 МГц, " + +#: ../cli/src/settings.c:452 +msgid "850 MHz, " +msgstr "850 МГц, " + +#: ../cli/src/settings.c:454 +msgid "WCDMA 3GPP UMTS 2100 MHz, " +msgstr "WCDMA 3GPP UMTS 2100 МГц, " + +#: ../cli/src/settings.c:456 +msgid "WCDMA 3GPP UMTS 1800 MHz, " +msgstr "WCDMA 3GPP UMTS 1800 МГц, " + +#: ../cli/src/settings.c:458 +msgid "WCDMA 3GPP UMTS 1700/2100 MHz, " +msgstr "WCDMA 3GPP UMTS 1700/2100 МГц, " + +#: ../cli/src/settings.c:460 +msgid "WCDMA 3GPP UMTS 800 MHz, " +msgstr "WCDMA 3GPP UMTS 800 МГц, " + +#: ../cli/src/settings.c:462 +msgid "WCDMA 3GPP UMTS 850 MHz, " +msgstr "WCDMA 3GPP UMTS 850 МГц, " + +#: ../cli/src/settings.c:464 +msgid "WCDMA 3GPP UMTS 900 MHz, " +msgstr "WCDMA 3GPP UMTS 900 МГц, " + +#: ../cli/src/settings.c:466 +msgid "WCDMA 3GPP UMTS 1700 MHz, " +msgstr "WCDMA 3GPP UMTS 1700 МГц, " + +#: ../cli/src/settings.c:546 ../cli/src/settings.c:708 +msgid "auto" +msgstr "авто" + +#: ../cli/src/settings.c:704 ../cli/src/settings.c:707 ../cli/src/utils.c:172 +msgid "not set" +msgstr "не задано" + +#: ../cli/src/utils.c:124 +#, c-format +msgid "field '%s' has to be alone" +msgstr "поле «%s» должно быть единственным" + +#: ../cli/src/utils.c:127 +#, c-format +msgid "invalid field '%s'" +msgstr "недопустимое поле «%s»" + +#: ../cli/src/utils.c:146 +#, c-format +msgid "Option '--terse' requires specifying '--fields'" +msgstr "Параметр «--terse» требует указания «--fields»" + +#: ../cli/src/utils.c:150 +#, c-format +msgid "Option '--terse' requires specific '--fields' option values , not '%s'" +msgstr "Параметр «--terse» требует определённых значений «--fields», но не «%s»" #: ../libnm-util/crypto.c:120 #, c-format msgid "PEM key file had no end tag '%s'." -msgstr "Файл ключа PEM не имеет тега окончания «%s»." +msgstr "Файл ключа PEM не содержит завершающий тег «%s»." #: ../libnm-util/crypto.c:130 #, c-format msgid "Doesn't look like a PEM private key file." -msgstr "Файл не определяется как файл личного ключа PEM." +msgstr "Возможно, это не файл личного ключа PEM." #: ../libnm-util/crypto.c:138 #, c-format @@ -105,8 +1244,9 @@ msgstr "Недостаточно памяти для загрузки ВИ." msgid "IV contains non-hexadecimal digits." msgstr "ВИ включает нешестнадцатеричные цифры." -#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:143 -#: ../libnm-util/crypto_nss.c:169 +#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:336 #, c-format msgid "Private key cipher '%s' was unknown." msgstr "Неизвестный шифр личного ключа «%s»." @@ -126,71 +1266,106 @@ msgstr "Не удаётся определить тип личного ключ msgid "Not enough memory to store decrypted private key." msgstr "Недостаточно памяти для загрузки расшифрованного личного ключа." -#: ../libnm-util/crypto_gnutls.c:46 +#: ../libnm-util/crypto_gnutls.c:49 msgid "Failed to initialize the crypto engine." msgstr "Не удалось инициализировать криптографический модуль." -#: ../libnm-util/crypto_gnutls.c:90 +#: ../libnm-util/crypto_gnutls.c:93 #, c-format msgid "Failed to initialize the MD5 engine: %s / %s." msgstr "Не удалось инициализировать модуль MD5: %s / %s." -#: ../libnm-util/crypto_gnutls.c:152 ../libnm-util/crypto_nss.c:178 +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "Недопустимая длина ВИ (минимально %zd)." + +#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188 #, c-format msgid "Not enough memory for decrypted key buffer." msgstr "Недостаточно памяти для буфера расшифрованного ключа." -#: ../libnm-util/crypto_gnutls.c:160 +#: ../libnm-util/crypto_gnutls.c:173 #, c-format msgid "Failed to initialize the decryption cipher context: %s / %s." msgstr "Не удалось инициализировать контекст шифра декодирования: %s / %s." -#: ../libnm-util/crypto_gnutls.c:169 +#: ../libnm-util/crypto_gnutls.c:182 #, c-format msgid "Failed to set symmetric key for decryption: %s / %s." msgstr "Не удалось создать симметричный ключ для расшифровки: %s / %s." -#: ../libnm-util/crypto_gnutls.c:178 +#: ../libnm-util/crypto_gnutls.c:191 #, c-format msgid "Failed to set IV for decryption: %s / %s." msgstr "Не удалось создать ВИ для расшифровки: %s / %s." -#: ../libnm-util/crypto_gnutls.c:187 +#: ../libnm-util/crypto_gnutls.c:200 #, c-format msgid "Failed to decrypt the private key: %s / %s." msgstr "Не удалось создать ВИ для расшифровки: %s / %s." -#: ../libnm-util/crypto_gnutls.c:200 +#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 +#, c-format +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "Не удалось расшифровать личный ключ: непредвиденная длина заполнения." + +#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 #, c-format msgid "Failed to decrypt the private key." msgstr "Не удалось расшифровать личный ключ." -#: ../libnm-util/crypto_gnutls.c:235 +#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "Не удалось выделить память для шифрования" + +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "Не удалось инициализировать контекст кода шифрования: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "Не удалось создать симметричный ключ для шифрования: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +msgid "Failed to set IV for encryption: %s / %s." +msgstr "Не удалось создать ВИ для шифрования: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +msgid "Failed to encrypt the data: %s / %s." +msgstr "Не удалось зашифровать данные: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:362 #, c-format msgid "Error initializing certificate data: %s" msgstr "Ошибка инициализации данных сертификата: %s" -#: ../libnm-util/crypto_gnutls.c:257 +#: ../libnm-util/crypto_gnutls.c:384 #, c-format msgid "Couldn't decode certificate: %s" msgstr "Не удалось расшифровать сертификат: %s" -#: ../libnm-util/crypto_gnutls.c:281 +#: ../libnm-util/crypto_gnutls.c:408 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %s" msgstr "Не удалось инициализировать декодер PKCS#12: %s" -#: ../libnm-util/crypto_gnutls.c:294 +#: ../libnm-util/crypto_gnutls.c:421 #, c-format msgid "Couldn't decode PKCS#12 file: %s" msgstr "Не удалось расшифровать файл PKCS#12: %s" -#: ../libnm-util/crypto_gnutls.c:306 +#: ../libnm-util/crypto_gnutls.c:433 #, c-format msgid "Couldn't verify PKCS#12 file: %s" msgstr "Не удалось проверить файл PKCS#12: %s" -#: ../libnm-util/crypto_nss.c:57 +#: ../libnm-util/crypto_nss.c:56 #, c-format msgid "Failed to initialize the crypto engine: %d." msgstr "Не удалось инициализировать криптографический модуль: %d." @@ -200,112 +1375,190 @@ msgstr "Не удалось инициализировать криптогра msgid "Failed to initialize the MD5 context: %d." msgstr "Не удалось инициализировать контекст MD5: %d." -#: ../libnm-util/crypto_nss.c:186 +#: ../libnm-util/crypto_nss.c:179 +#, c-format +msgid "Invalid IV length (must be at least %d)." +msgstr "Недопустимая длина ВИ (минимально %d)." + +#: ../libnm-util/crypto_nss.c:196 #, c-format msgid "Failed to initialize the decryption cipher slot." msgstr "Не удалось инициализировать слот шифра декодирования." -#: ../libnm-util/crypto_nss.c:196 +#: ../libnm-util/crypto_nss.c:206 #, c-format msgid "Failed to set symmetric key for decryption." msgstr "Не удалось задать симметричный ключ расшифровки." -#: ../libnm-util/crypto_nss.c:206 +#: ../libnm-util/crypto_nss.c:216 #, c-format msgid "Failed to set IV for decryption." msgstr "Не удалось задать ВИ расшифровки." -#: ../libnm-util/crypto_nss.c:214 +#: ../libnm-util/crypto_nss.c:224 #, c-format msgid "Failed to initialize the decryption context." msgstr "Не удалось инициализировать контекст расшифровки." -#: ../libnm-util/crypto_nss.c:227 +#: ../libnm-util/crypto_nss.c:237 #, c-format msgid "Failed to decrypt the private key: %d." msgstr "Не удалось расшифровать личный ключ: %d." -#: ../libnm-util/crypto_nss.c:239 +#: ../libnm-util/crypto_nss.c:245 +#, c-format +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "" +"Не удалось расшифровать личный ключ: слишком большой объем расшифрованных " +"данных." + +#: ../libnm-util/crypto_nss.c:256 #, c-format msgid "Failed to finalize decryption of the private key: %d." msgstr "Не удалось завершить расшифровку личного ключа: %d." -#: ../libnm-util/crypto_nss.c:284 +#: ../libnm-util/crypto_nss.c:364 +#, c-format +msgid "Failed to initialize the encryption cipher slot." +msgstr "Не удалось инициализировать слот шифра декодирования." + +#: ../libnm-util/crypto_nss.c:372 +#, c-format +msgid "Failed to set symmetric key for encryption." +msgstr "Не удалось задать симметричный ключ для шифрования." + +#: ../libnm-util/crypto_nss.c:380 +#, c-format +msgid "Failed to set IV for encryption." +msgstr "Не удалось задать ВИ расшифровки." + +#: ../libnm-util/crypto_nss.c:388 +#, c-format +msgid "Failed to initialize the encryption context." +msgstr "Не удалось инициализировать контекст шифрования." + +#: ../libnm-util/crypto_nss.c:396 +#, c-format +msgid "Failed to encrypt: %d." +msgstr "Не удалось зашифровать: %d." + +#: ../libnm-util/crypto_nss.c:404 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "Непредвиденный объём данных после шифрования." + +#: ../libnm-util/crypto_nss.c:447 #, c-format msgid "Couldn't decode certificate: %d" msgstr "Не удалось расшифровать сертификат: %d" -#: ../libnm-util/crypto_nss.c:319 +#: ../libnm-util/crypto_nss.c:482 #, c-format msgid "Couldn't convert password to UCS2: %d" msgstr "Не удалось преобразовать пароль в UCS2: %d" -#: ../libnm-util/crypto_nss.c:347 +#: ../libnm-util/crypto_nss.c:510 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %d" msgstr "Не удалось инициализировать декодер PKCS#12: %d" -#: ../libnm-util/crypto_nss.c:356 +#: ../libnm-util/crypto_nss.c:519 #, c-format msgid "Couldn't decode PKCS#12 file: %d" msgstr "Не удалось расшифровать файл PKCS#12: %d" -#: ../libnm-util/crypto_nss.c:365 +#: ../libnm-util/crypto_nss.c:528 #, c-format msgid "Couldn't verify PKCS#12 file: %d" msgstr "Не удалось проверить файл PKCS#12: %d" -#: ../src/nm-netlink-monitor.c:194 ../src/nm-netlink-monitor.c:454 +#: ../libnm-util/crypto_nss.c:557 +msgid "Could not generate random data." +msgstr "Ошибка при генерации случайных данных." + +#: ../libnm-util/nm-utils.c:1925 +#, c-format +msgid "Not enough memory to make encryption key." +msgstr "Недостаточно памяти для создания ключа шифрования." + +#: ../libnm-util/nm-utils.c:2035 +msgid "Could not allocate memory for PEM file creation." +msgstr "Не удалось выделить память для создания файла PEM." + +#: ../libnm-util/nm-utils.c:2047 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "Не удалось выделить память для записи ВИ в файл PEM." + +#: ../libnm-util/nm-utils.c:2059 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "Не удалось выделить память для записи зашифрованного ключа в файл PEM." + +#: ../libnm-util/nm-utils.c:2078 +#, c-format +msgid "Could not allocate memory for PEM file data." +msgstr "Не удалось выделить память для данных файла PEM." + +#: ../src/nm-netlink-monitor.c:100 ../src/nm-netlink-monitor.c:231 +#: ../src/nm-netlink-monitor.c:653 #, c-format msgid "error processing netlink message: %s" msgstr "ошибка обработки сообщения netlink: %s" -#: ../src/nm-netlink-monitor.c:251 +#: ../src/nm-netlink-monitor.c:214 +msgid "error occurred while waiting for data on socket" +msgstr "произошла ошибка при ожидании данных из сокета" + +#: ../src/nm-netlink-monitor.c:254 +#, c-format +msgid "unable to connect to netlink for monitoring link status: %s" +msgstr "не удаётся подключиться к netlink для отслеживания статуса соединения: %s" + +#: ../src/nm-netlink-monitor.c:265 +#, c-format +msgid "unable to enable netlink handle credential passing: %s" +msgstr "не удаётся включить проверку данных авторизации netlink: %s" + +#: ../src/nm-netlink-monitor.c:291 ../src/nm-netlink-monitor.c:353 #, c-format msgid "unable to allocate netlink handle for monitoring link status: %s" msgstr "" "не удаётся создать идентификатор netlink для отслеживания статуса " "соединения: %s" -#: ../src/nm-netlink-monitor.c:261 -#, c-format -msgid "unable to connect to netlink for monitoring link status: %s" -msgstr "" -"не удаётся подключиться к netlink для отслеживания статуса соединения: %s" - -#: ../src/nm-netlink-monitor.c:269 -#, c-format -msgid "unable to join netlink group for monitoring link status: %s" -msgstr "" -"не удаётся войти в группу netlink для отслеживания статуса соединения: %s" - -#: ../src/nm-netlink-monitor.c:277 +#: ../src/nm-netlink-monitor.c:376 #, c-format msgid "unable to allocate netlink link cache for monitoring link status: %s" -msgstr "" -"не удаётся выделить кэш netlink для отслеживания статуса соединения: %s" +msgstr "не удаётся выделить кэш netlink для отслеживания статуса соединения: %s" -#: ../src/nm-netlink-monitor.c:418 +#: ../src/nm-netlink-monitor.c:502 +#, c-format +msgid "unable to join netlink group: %s" +msgstr "не удалось войти в группу netlink: %s" + +#: ../src/nm-netlink-monitor.c:629 ../src/nm-netlink-monitor.c:642 #, c-format msgid "error updating link cache: %s" msgstr "ошибка обновления кэша соединения: %s" -#: ../src/nm-netlink-monitor.c:484 -msgid "error occurred while waiting for data on socket" -msgstr "произошла ошибка при ожидании данных из сокета" - -#: ../src/NetworkManager.c:293 +#: ../src/main.c:502 #, c-format msgid "Invalid option. Please use --help to see a list of valid options.\n" msgstr "" "Неверный параметр. Используйте --help для вывода списка возможных " "параметров.\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:94 +#: ../src/main.c:562 +#, c-format +msgid "%s. Please use --help to see a list of valid options.\n" +msgstr "%s. Используйте --help для вывода списка допустимых параметров.\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:325 msgid "# Created by NetworkManager\n" msgstr "# Создано NetworkManager\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:100 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:341 #, c-format msgid "" "# Merged from %s\n" @@ -314,18 +1567,85 @@ msgstr "" "# Совмещено с %s\n" "\n" -#: ../src/named-manager/nm-named-manager.c:256 +#: ../src/dhcp-manager/nm-dhcp-manager.c:279 +msgid "no usable DHCP client could be found." +msgstr "не найден клиент DHCP." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:288 +msgid "'dhclient' could be found." +msgstr "'dhclient' не найден." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:298 +msgid "'dhcpcd' could be found." +msgstr "'dhcpcd' не найден." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:306 +#, c-format +msgid "unsupported DHCP client '%s'" +msgstr "клиент DHCP '%s' не поддерживается" + +#: ../src/logging/nm-logging.c:146 +#, c-format +msgid "Unknown log level '%s'" +msgstr "Неизвестный уровень журналирования «%s»" + +#: ../src/logging/nm-logging.c:171 +#, c-format +msgid "Unknown log domain '%s'" +msgstr "Неизвестный домен журналирования «%s»" + +#: ../src/named-manager/nm-named-manager.c:343 msgid "NOTE: the libc resolver may not support more than 3 nameservers." msgstr "" "ВНИМАНИЕ: преобразователь имён glibc не поддерживает более трёх серверов " "имён." -#: ../src/named-manager/nm-named-manager.c:258 +#: ../src/named-manager/nm-named-manager.c:345 msgid "The nameservers listed below may not be recognized." msgstr "Нижеперечисленные сервера могут быть пропущены." -#: ../system-settings/src/main.c:381 +#: ../src/system-settings/nm-default-wired-connection.c:157 #, c-format msgid "Auto %s" msgstr "Авто %s" +#: ../system-settings/plugins/ifcfg-rh/reader.c:3256 +msgid "System" +msgstr "Система" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "Совместное использование соединений в закрытой сети WiFi" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "Совместное использование соединений в открытой сети WiFi" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "Изменить постоянное имя узла компьютера" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 +msgid "Modify system connections" +msgstr "Изменить соединения системы" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 +msgid "System policy prevents modification of system settings" +msgstr "Системная политика запрещает изменение системных настроек" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +msgid "System policy prevents modification of the persistent system hostname" +msgstr "Системная политика запрещает изменение постоянного имени узла компьютера" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "" +"Системная политика запрещает совместное использование соединений в закрытой " +"сети WiFi" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "" +"Системная политика запрещает совместное использование соединений в закрытой " +"сети WiFi" + diff --git a/po/sl.po b/po/sl.po index d42310fb1d..425fd752e2 100644 --- a/po/sl.po +++ b/po/sl.po @@ -1,918 +1,992 @@ # Slovenian translation of NetworkManager. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the NetworkManager package. -# # Matic Žgur , 2007. +# Andrej Žnidaršič , 2009. # msgid "" msgstr "" "Project-Id-Version: NetworkManager\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2006-11-17 05:31+0100\n" -"PO-Revision-Date: 2007-01-09 16:11+0100\n" -"Last-Translator: Matic Žgur \n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager&component=general\n" +"POT-Creation-Date: 2009-09-29 03:25+0000\n" +"PO-Revision-Date: 2009-12-17 07:10+0100\n" +"Last-Translator: Andrej Žnidaršič \n" "Language-Team: Slovenian GNOME Translation Team \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n%100==4 ? 3 : 0);\n" +"X-Poedit-Country: SLOVENIA\n" "X-Poedit-Language: Slovenian\n" +"X-Poedit-SourceCharset: utf-8\n" -#: ../gnome/applet/applet-compat.c:171 -#: ../gnome/applet/applet-dbus-info.c:926 +#: ../libnm-util/crypto.c:120 #, c-format -msgid "Passphrase for wireless network %s" -msgstr "Šifrirna fraza za brezžično omrežje %s" +msgid "PEM key file had no end tag '%s'." +msgstr "Ključna datoteka PEM nima končne oznake '%s'." -#: ../gnome/applet/applet-dbus.c:274 +#: ../libnm-util/crypto.c:130 #, c-format -msgid "Connection to the wireless network '%s' failed." -msgstr "Povezava z brezžičnim omrežjem %s ni uspela" +msgid "Doesn't look like a PEM private key file." +msgstr "Ni videti kot PEM zasebna ključna datoteka." -#: ../gnome/applet/applet-dbus.c:279 -msgid "Connection to the wired network failed." -msgstr "Povezava z žičnim omrežjem ni uspela." - -#: ../gnome/applet/applet.c:182 -msgid "Error displaying connection information:" -msgstr "Napaka pri prikazovanju informacij o povezavi:" - -#: ../gnome/applet/applet.c:200 -msgid "Could not find some required resources (the glade file)!" -msgstr "Ni mogoče najti nekaterih zahtevanih virov (datoteke glade)!" - -#: ../gnome/applet/applet.c:210 -msgid "No active connections!" -msgstr "Ni aktivnih povezav!" - -#: ../gnome/applet/applet.c:227 +#: ../libnm-util/crypto.c:138 #, c-format -msgid "%d Mb/s" -msgstr "%d Mb/s" +msgid "Not enough memory to store PEM file data." +msgstr "Ni dovolj pomnilnika za shranjevanje podatkov datoteke PEM." -#: ../gnome/applet/applet.c:230 +#: ../libnm-util/crypto.c:154 #, c-format -msgid "Wired Ethernet (%s)" -msgstr "Žični eternet (%s)" +msgid "Malformed PEM file: Proc-Type was not first tag." +msgstr "Slabo oblikovana datoteka PEM: Proc-Type ni prva oznaka." -#: ../gnome/applet/applet.c:232 +#: ../libnm-util/crypto.c:162 #, c-format -msgid "Wireless Ethernet (%s)" -msgstr "Brezžični eternet (%s)" +msgid "Malformed PEM file: unknown Proc-Type tag '%s'." +msgstr "Slabo oblikovana datoteka PEM: neznana oznaka Proc-Type '%s'" -#: ../gnome/applet/applet.c:238 -msgid "Unknown" -msgstr "Neznano" - -#: ../gnome/applet/applet.c:330 -#: ../gnome/applet/applet.c:357 -msgid "NetworkManager Applet" -msgstr "Programček NetworkManager" - -#: ../gnome/applet/applet.c:332 -msgid "" -"Copyright © 2004-2006 Red Hat, Inc.\n" -"Copyright © 2005-2006 Novell, Inc." -msgstr "" -"Copyright © 2004-2006 Red Hat, Inc.\n" -"Copyright © 2005-2006 Novell, Inc." - -#: ../gnome/applet/applet.c:334 -#: ../gnome/applet/applet.c:361 -msgid "Notification area applet for managing your network devices and connections." -msgstr "Programček za območje obvestil za upravljanje vaših mrežnih naprav in povezav." - -#: ../gnome/applet/applet.c:337 -#: ../gnome/applet/applet.c:365 -msgid "translator-credits" -msgstr "Matic Žgur " - -#: ../gnome/applet/applet.c:359 -msgid "" -"Copyright © 2004-2005 Red Hat, Inc.\n" -"Copyright © 2005-2006 Novell, Inc." -msgstr "" -"Copyright © 2004-2005 Red Hat, Inc.\n" -"Copyright © 2005-2006 Novell, Inc." - -#: ../gnome/applet/applet.c:421 -msgid "VPN Login Failure" -msgstr "Neuspela prijava VPN" - -#: ../gnome/applet/applet.c:422 +#: ../libnm-util/crypto.c:172 #, c-format -msgid "Could not start the VPN connection '%s' due to a login failure." -msgstr "Ni mogoče začeti povezave VPN '%s' zaradi neuspele prijave." +msgid "Malformed PEM file: DEK-Info was not the second tag." +msgstr "Slabo oblikovana datoteka PEM: DEK-Info ni druga oznaka." -#: ../gnome/applet/applet.c:426 -msgid "VPN Start Failure" -msgstr "Neuspel zagon VPN" - -#: ../gnome/applet/applet.c:427 +#: ../libnm-util/crypto.c:183 #, c-format -msgid "Could not start the VPN connection '%s' due to a failure launching the VPN program." -msgstr "Ni mogoče začeti povezave VPN '%s' zaradi neuspelega zagona programa VPN." +msgid "Malformed PEM file: no IV found in DEK-Info tag." +msgstr "Slabo oblikovana datoteka PEM: IV ni mogoče najti v DEK-Info oznaki." -#: ../gnome/applet/applet.c:431 -#: ../gnome/applet/applet.c:441 -msgid "VPN Connect Failure" -msgstr "Neuspela povezava VPN" - -#: ../gnome/applet/applet.c:432 +#: ../libnm-util/crypto.c:190 #, c-format -msgid "Could not start the VPN connection '%s' due to a connection error." -msgstr "Ni mogoče začeti povezave VPN '%s' zaradi napake pri povezavi." +msgid "Malformed PEM file: invalid format of IV in DEK-Info tag." +msgstr "Slabo oblikovana datoteka PEM: neveljavna oblika IV v DEK-Info oznaki." -#: ../gnome/applet/applet.c:436 -msgid "VPN Configuration Error" -msgstr "Napaka nastavitev VPN" - -#: ../gnome/applet/applet.c:437 +#: ../libnm-util/crypto.c:203 #, c-format -msgid "The VPN connection '%s' was not correctly configured." -msgstr "Povezava VPN '%s' ni pravilno nastavljena." +msgid "Malformed PEM file: unknown private key cipher '%s'." +msgstr "Slabo oblikovana datoteka PEM: neznana cifra zasebnega ključa '%s'." -#: ../gnome/applet/applet.c:442 +#: ../libnm-util/crypto.c:222 #, c-format -msgid "Could not start the VPN connection '%s' because the VPN server did not return an adequate network configuration." -msgstr "Ni mogoče začeti povezave VPN '%s', ker strežnik VPN ni vrnil ustreznih nastavitev." +msgid "Could not decode private key." +msgstr "Zasebnega ključa ni mogoče dekodirati." -#: ../gnome/applet/applet.c:512 -msgid "VPN Login Message" -msgstr "Prijavno sporočilo VPN" - -#: ../gnome/applet/applet.c:737 -#: ../gnome/applet/applet.c:2635 -#: ../gnome/applet/other-network-dialog.c:458 -#: ../gnome/applet/passphrase-dialog.c:228 -msgid "The NetworkManager Applet could not find some required resources (the glade file was not found)." -msgstr "Programček NetworkManager ne more najti nekaterih zahtevanih virov (datoteka glade ni bila najdena)." - -#: ../gnome/applet/applet.c:749 +#: ../libnm-util/crypto.c:267 #, c-format -msgid "The network device \"%s (%s)\" does not support wireless scanning." -msgstr "Omrežna naprava \"%s (%s)\" ne podpira skeniranja brezžičnih omrežij." +msgid "PEM certificate '%s' had no end tag '%s'." +msgstr "PEM potrdilo '%s' nima končne oznake '%s'." -#: ../gnome/applet/applet.c:757 +#: ../libnm-util/crypto.c:277 #, c-format -msgid "The network device \"%s (%s)\" does not support link detection." -msgstr "Omrežna naprava \"%s (%s)\" ne podpira odkrivanja povezav." +msgid "Failed to decode certificate." +msgstr "Dekodiranje potrdila je spodletelo." -#. Note to translators: this is used if no essid is known -#: ../gnome/applet/applet.c:905 -#: ../gnome/applet/applet.c:1103 -msgid "(unknown)" -msgstr "(neznano)" - -#: ../gnome/applet/applet.c:911 +#: ../libnm-util/crypto.c:286 #, c-format -msgid "Preparing device %s for the wired network..." -msgstr "Pripravljanje naprave %s na žično omrežje ..." +msgid "Not enough memory to store certificate data." +msgstr "Ni dovolj pomnilnika za shranjevanje podatkov potrdila." -#: ../gnome/applet/applet.c:913 +#: ../libnm-util/crypto.c:294 #, c-format -msgid "Preparing device %s for the wireless network '%s'..." -msgstr "Pripravljanje naprave %s na rezžično omrežje '%s' ..." +msgid "Not enough memory to store file data." +msgstr "Ni dovolj pomnilnika za shranjevanje podatkov datoteke." -#: ../gnome/applet/applet.c:921 +#: ../libnm-util/crypto.c:324 #, c-format -msgid "Configuring device %s for the wired network..." -msgstr "Nastavljanje naprave %s za žično omrežje ..." +msgid "IV must be an even number of bytes in length." +msgstr "IV mora biti dolg sodo število bajtov." -#: ../gnome/applet/applet.c:923 +#: ../libnm-util/crypto.c:333 #, c-format -msgid "Attempting to join the wireless network '%s'..." -msgstr "Poskus pridruževanja brezžičnemu omrežju '%s' ..." +msgid "Not enough memory to store the IV." +msgstr "Za shranjevanje IV ni dovolj pomnilnika." -#: ../gnome/applet/applet.c:931 +#: ../libnm-util/crypto.c:344 #, c-format -msgid "Waiting for Network Key for the wireless network '%s'..." -msgstr "Čakanje na omrežni ključ za brezžično omrežje '%s' ..." +msgid "IV contains non-hexadecimal digits." +msgstr "IV vsebuje ne-šestnajstiške številke." -#: ../gnome/applet/applet.c:939 -#: ../gnome/applet/applet.c:949 -msgid "Requesting a network address from the wired network..." -msgstr "Zahtevanje omrežnega naslova iz žičnega omrežja ..." - -#: ../gnome/applet/applet.c:941 -#: ../gnome/applet/applet.c:951 +#: ../libnm-util/crypto.c:382 +#: ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 +#: ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:335 #, c-format -msgid "Requesting a network address from the wireless network '%s'..." -msgstr "Zahtevanje omrežnega naslova iz brezžičnega omrežja '%s' ..." +msgid "Private key cipher '%s' was unknown." +msgstr "Cifra zasebnega ključa '%s' je neznana." -#: ../gnome/applet/applet.c:959 -msgid "Finishing connection to the wired network..." -msgstr "Zaključevanje povezave v žično omrežje ..." - -#: ../gnome/applet/applet.c:961 +#: ../libnm-util/crypto.c:391 #, c-format -msgid "Finishing connection to the wireless network '%s'..." -msgstr "Zaključevanje povezave v brezžično omrežje '%s' ..." +msgid "Not enough memory to decrypt private key." +msgstr "Ni dovolj pomnilnika za dešifriranje zasebnega ključa." -#: ../gnome/applet/applet.c:1078 -msgid "NetworkManager is not running" -msgstr "NetworkManager ni zagnan" - -#: ../gnome/applet/applet.c:1086 -#: ../gnome/applet/applet.c:1843 -msgid "Networking disabled" -msgstr "Omrežje onemogočeno" - -#: ../gnome/applet/applet.c:1091 -msgid "No network connection" -msgstr "Nobene omrežne povezave" - -#: ../gnome/applet/applet.c:1096 -msgid "Wired network connection" -msgstr "Žična omrežna povezava" - -#: ../gnome/applet/applet.c:1100 -msgid "Connected to an Ad-Hoc wireless network" -msgstr "Povezan v ad-hoc brezžično omrežje" - -#: ../gnome/applet/applet.c:1102 +#: ../libnm-util/crypto.c:511 #, c-format -msgid "Wireless network connection to '%s' (%d%%)" -msgstr "Brezžična omrežna povezava z '%s' (%d%%)" +msgid "Unable to determine private key type." +msgstr "Ni mogoče določiti vrste zasebnega ključa." -#: ../gnome/applet/applet.c:1123 +#: ../libnm-util/crypto.c:530 #, c-format -msgid "VPN connection to '%s'" -msgstr "Povezave VPN z '%s'" +msgid "Not enough memory to store decrypted private key." +msgstr "Ni dovolj pomnilnika za shranjevanje dešifriranega zasebnega ključa." -#: ../gnome/applet/applet.c:1131 +#: ../libnm-util/crypto_gnutls.c:49 +msgid "Failed to initialize the crypto engine." +msgstr "Zagon motorja šifriranja je spodletel." + +#: ../libnm-util/crypto_gnutls.c:93 #, c-format -msgid "VPN connecting to '%s'" -msgstr "Povezovanje VPN z '%s'" +msgid "Failed to initialize the MD5 engine: %s / %s." +msgstr "Zagon motorja MD5 je spodletel: %s / %s." -#: ../gnome/applet/applet.c:1556 -msgid "_Connect to Other Wireless Network..." -msgstr "Po_veži se v drugo brezžično omrežje ..." - -#: ../gnome/applet/applet.c:1577 -msgid "Create _New Wireless Network..." -msgstr "_Ustvari novo brezžično omrežje ..." - -#: ../gnome/applet/applet.c:1700 -msgid "_VPN Connections" -msgstr "_Povezave VPN" - -#: ../gnome/applet/applet.c:1745 -msgid "_Configure VPN..." -msgstr "_Nastavi VPN ..." - -#: ../gnome/applet/applet.c:1749 -msgid "_Disconnect VPN..." -msgstr "_Prekini povezavo z VPN ..." - -#: ../gnome/applet/applet.c:1771 -msgid "_Dial Up Connections" -msgstr "_Klicna povezava" - -#. FIXME: We should save and then check the state of the devices and show Connect _or_ Disconnect for each item -#: ../gnome/applet/applet.c:1782 +#: ../libnm-util/crypto_gnutls.c:156 #, c-format -msgid "Connect to %s..." -msgstr "Poveži se v %s ..." +msgid "Invalid IV length (must be at least %zd)." +msgstr "Neveljavna dolžina IV (mora biti vsaj %zd)" -#: ../gnome/applet/applet.c:1788 +#: ../libnm-util/crypto_gnutls.c:165 +#: ../libnm-util/crypto_nss.c:188 #, c-format -msgid "Disconnect from %s..." -msgstr "Prekini povezavo z %s ..." +msgid "Not enough memory for decrypted key buffer." +msgstr "Ni dovolj pomnilnika za medpomnilnik ključa dešifriranja." -#: ../gnome/applet/applet.c:1837 -msgid "No network devices have been found" -msgstr "Najdena ni bila nobena omrežna naprava" - -#: ../gnome/applet/applet.c:2029 -msgid "NetworkManager is not running..." -msgstr "NetworkManager ni zagnan ..." - -#. 'Enable Networking' item -#: ../gnome/applet/applet.c:2210 -msgid "Enable _Networking" -msgstr "Omogoči _omrežje" - -#. 'Enable Wireless' item -#: ../gnome/applet/applet.c:2216 -msgid "Enable _Wireless" -msgstr "Omogoči _brezžično omrežje" - -#. 'Connection Information' item -#: ../gnome/applet/applet.c:2222 -msgid "Connection _Information" -msgstr "_Informacije o povezavi" - -#. Help item -#: ../gnome/applet/applet.c:2233 -msgid "_Help" -msgstr "_Pomoč" - -#. About item -#: ../gnome/applet/applet.c:2242 -msgid "_About" -msgstr "_O Programu" - -#: ../gnome/applet/applet.c:2824 -msgid "The NetworkManager applet could not find some required resources. It cannot continue.\n" -msgstr "Programček NetworkManager ne more najti nekaterih zahtevanih virov. Ni mogoče nadaljevati.\n" - -#: ../gnome/applet/wireless-security-option.c:157 -msgid "Open System" -msgstr "Odprti sistem" - -#: ../gnome/applet/wireless-security-option.c:160 -msgid "Shared Key" -msgstr "Deljeni ključ" - -#: ../gnome/applet/wireless-security-option.c:208 -msgid "Automatic (Default)" -msgstr "Samodejno (privzeto)" - -#: ../gnome/applet/wireless-security-option.c:215 -msgid "AES-CCMP" -msgstr "AES-CCMP" - -#: ../gnome/applet/wireless-security-option.c:223 -msgid "TKIP" -msgstr "TKIP" - -#: ../gnome/applet/wireless-security-option.c:231 -msgid "Dynamic WEP" -msgstr "Dinamični WEP" - -#: ../gnome/applet/wso-none.c:53 -msgid "None" -msgstr "Brez" - -#: ../gnome/applet/wso-wep-ascii.c:138 -msgid "WEP 64/128-bit ASCII" -msgstr "WEP 64/128-bit ASCII" - -#: ../gnome/applet/wso-wep-hex.c:135 -msgid "WEP 64/128-bit Hex" -msgstr "WEP 64/128-bit Hex" - -#: ../gnome/applet/wso-wep-passphrase.c:135 -msgid "WEP 128-bit Passphrase" -msgstr "WEP 128-bit šifrirna fraza" - -#: ../gnome/applet/wso-wpa-eap.c:237 -msgid "PEAP" -msgstr "PEAP" - -#: ../gnome/applet/wso-wpa-eap.c:238 -msgid "TLS" -msgstr "TLS" - -#: ../gnome/applet/wso-wpa-eap.c:239 -msgid "TTLS" -msgstr "TTLS" - -#: ../gnome/applet/wso-wpa-eap.c:247 -#: ../src/nm-ap-security-wpa-eap.c:93 -#: ../src/nm-ap-security-wpa-eap.c:117 -msgid "WPA2 Enterprise" -msgstr "Podjetniški WPA2" - -#: ../gnome/applet/wso-wpa-eap.c:249 -#: ../src/nm-ap-security-wpa-eap.c:95 -#: ../src/nm-ap-security-wpa-eap.c:122 -msgid "WPA Enterprise" -msgstr "Podjetniški WPA" - -#: ../gnome/applet/wso-wpa-psk.c:178 -msgid "WPA2 Personal" -msgstr "Osebni WPA2" - -#: ../gnome/applet/wso-wpa-psk.c:180 -msgid "WPA Personal" -msgstr "Osebni WPA" - -#: ../gnome/applet/eggtrayicon.c:134 -msgid "Orientation" -msgstr "Usmerjenost" - -#: ../gnome/applet/eggtrayicon.c:135 -msgid "The orientation of the tray." -msgstr "Usmeritev pladnja." - -#: ../gnome/applet/menu-items.c:88 +#: ../libnm-util/crypto_gnutls.c:173 #, c-format -msgid "Wired Network (%s)" -msgstr "Žično omrežje (%s)" +msgid "Failed to initialize the decryption cipher context: %s / %s." +msgstr "Zagon vsebine cifre dešifriranje je spodletel: %s / %s." -#: ../gnome/applet/menu-items.c:91 -msgid "_Wired Network" -msgstr "Ž_ično omrežje" - -#: ../gnome/applet/menu-items.c:162 +#: ../libnm-util/crypto_gnutls.c:182 #, c-format -msgid "Wireless Network (%s)" -msgid_plural "Wireless Networks (%s)" -msgstr[0] "Brezžično omrežje (%s)" -msgstr[1] "Brezžični omrežji (%s)" -msgstr[2] "Brezžična omrežja (%s)" -msgstr[3] "Brezžična omrežja (%s)" +msgid "Failed to set symmetric key for decryption: %s / %s." +msgstr "Nastavljanje simetričnega ključa za dešifriranje je spodletelo: %s / %s. " -#: ../gnome/applet/menu-items.c:164 -msgid "Wireless Network" -msgid_plural "Wireless Networks" -msgstr[0] "Brezžično omrežje" -msgstr[1] "Brezžični omrežji" -msgstr[2] "Brezžična omrežja" -msgstr[3] "Brezžična omrežja" - -#: ../gnome/applet/menu-items.c:343 -msgid " (invalid Unicode)" -msgstr " (neveljaven Unicode)" - -#: ../gnome/applet/other-network-dialog.c:352 +#: ../libnm-util/crypto_gnutls.c:191 #, c-format -msgid "By default, the wireless network's name is set to your computer's name, %s, with no encryption enabled" -msgstr "Privzeto je ime brezžičnega omrežja nastavljeno na ime vašega računalnika, %s, brez omogočenega šifriranja" +msgid "Failed to set IV for decryption: %s / %s." +msgstr "Nastavljanje IV za dešifriranje je spodletelo: %s / %s." -#: ../gnome/applet/other-network-dialog.c:358 -msgid "Create new wireless network" -msgstr "Ustvari novo brezžično omrežje" - -#: ../gnome/applet/other-network-dialog.c:359 -msgid "Enter the name and security settings of the wireless network you wish to create." -msgstr "Vnesite ime in varnostne nastavitve brezžičnega omrežja, ki ga želite ustvariti." - -#: ../gnome/applet/other-network-dialog.c:363 -msgid "Create New Wireless Network" -msgstr "Ustvari novo brezžično omrežje" - -#: ../gnome/applet/other-network-dialog.c:368 -msgid "Existing wireless network" -msgstr "Obstoječe brezžično omrežje" - -#: ../gnome/applet/other-network-dialog.c:369 -msgid "Enter the name of the wireless network to which you wish to connect." -msgstr "Vnesite ime brezžičnega omrežja, v katerega se želite povezati." - -#: ../gnome/applet/other-network-dialog.c:371 -msgid "Connect to Other Wireless Network" -msgstr "Poveži se v drugo brezžično omrežje" - -#: ../gnome/applet/passphrase-dialog.c:215 -msgid "Error connecting to wireless network" -msgstr "Napaka pri povezovanju z brezžičnim omrežjem" - -#: ../gnome/applet/passphrase-dialog.c:216 -msgid "The requested wireless network requires security capabilities unsupported by your hardware." -msgstr "Zahtevano brezžično omrežje zahteva varnostne zmožnosti, ki so nepodprte z vašo strojno opremo." - -#: ../gnome/applet/vpn-password-dialog.c:151 -#: ../gnome/applet/vpn-password-dialog.c:188 +#: ../libnm-util/crypto_gnutls.c:200 #, c-format -msgid "Cannot start VPN connection '%s'" -msgstr "Ni mogoče začeti povezave VPN '%s'" +msgid "Failed to decrypt the private key: %s / %s." +msgstr "Dešifriranje zasebnega ključa je spodletelo: %s / %s." -#: ../gnome/applet/vpn-password-dialog.c:154 +#: ../libnm-util/crypto_gnutls.c:210 +#: ../libnm-util/crypto_nss.c:266 #, c-format -msgid "Could not find the authentication dialog for VPN connection type '%s'. Contact your system administrator." -msgstr "Ni mogoče najti pogovornega okna za overitev za povezavo VPN vrste '%s'. Kontaktirajte sistemskega administratorja." +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "Dešifriranje zasebnega ključa je spodletelo: nepričakovana dolžina blazinjenja." -#: ../gnome/applet/vpn-password-dialog.c:191 +#: ../libnm-util/crypto_gnutls.c:221 +#: ../libnm-util/crypto_nss.c:277 #, c-format -msgid "There was a problem launching the authentication dialog for VPN connection type '%s'. Contact your system administrator." -msgstr "Pri zagonu pogovornega okna za overovitev za povezavo VPN vrste '%s' je prišlo do problema. Kontaktirajte sistemskega administratorja." +msgid "Failed to decrypt the private key." +msgstr "Dešifriranje zasebnega ključa je spodletelo." -#: ../gnome/applet/applet.glade.h:1 -msgid " " -msgstr " " - -#: ../gnome/applet/applet.glade.h:2 -msgid "Active Connection Information" -msgstr "Informacije o aktivni povezavi" - -#: ../gnome/applet/applet.glade.h:4 -#, no-c-format -msgid "" -"Passphrase Required by Wireless Network\n" -"\n" -"A passphrase or encryption key is required to access the wireless network '%s'." -msgstr "" -"Šifrirna fraza, ki jo zahteva brezžično omrežje\n" -"\n" -"Za dostop do brezžičnega omrežja '%s' je zahtevana šifrirna fraza ali šifrirni ključ." - -#: ../gnome/applet/applet.glade.h:8 -#, no-c-format -msgid "" -"Reduced Network Functionality\n" -"\n" -"%s It will not be completely functional." -msgstr "" -"Zmanjšana uporabnost omrežja\n" -"\n" -"%s ne bo popolnoma uporaben." - -#: ../gnome/applet/applet.glade.h:12 -#, no-c-format -msgid "" -"Wireless Network Login Confirmation\n" -"\n" -"You have chosen to log in to the wireless network '%s'. If you are sure that this wireless network is secure, click the checkbox below and NetworkManager will not require confirmation on subsequent log ins." -msgstr "" -"Potrditev prijave v brezžično omrežje\n" -"\n" -"Izbrali ste prijavo v brezžično omrežje '%s'. Če ste prepričani, da je to brezžično omrežje varno, kliknite potrditveno polje spodaj in NetworkManager ne bo več zahteval potrditve za nadaljnje prijave." - -#: ../gnome/applet/applet.glade.h:15 -msgid "Anonymous Identity:" -msgstr "Anonimna identiteta:" - -#: ../gnome/applet/applet.glade.h:16 -msgid "Authentication:" -msgstr "Overovitev:" - -#: ../gnome/applet/applet.glade.h:17 -msgid "Broadcast Address:" -msgstr "Naslov za razpršeno oddajanje:" - -#: ../gnome/applet/applet.glade.h:18 -msgid "CA Certificate File:" -msgstr "Datoteka overiteljevega (CA) certifikata:" - -#: ../gnome/applet/applet.glade.h:19 -msgid "C_onnect" -msgstr "Po_veži se" - -#: ../gnome/applet/applet.glade.h:20 -msgid "Client Certificate File:" -msgstr "Datoteka odjemalčevega certifikata:" - -#: ../gnome/applet/applet.glade.h:21 -msgid "Connection Information" -msgstr "Informacije o povezavi" - -#: ../gnome/applet/applet.glade.h:22 -msgid "Default Route:" -msgstr "Privzeta smer:" - -#: ../gnome/applet/applet.glade.h:23 -msgid "Destination Address:" -msgstr "Ciljni naslov:" - -#: ../gnome/applet/applet.glade.h:24 -msgid "Driver:" -msgstr "Gonilnik:" - -#: ../gnome/applet/applet.glade.h:25 -msgid "EAP Method:" -msgstr "Metoda EAP:" - -#: ../gnome/applet/applet.glade.h:26 -msgid "Hardware Address:" -msgstr "Naslov strojne opreme:" - -#: ../gnome/applet/applet.glade.h:27 -msgid "IP Address:" -msgstr "IP naslov:" - -#: ../gnome/applet/applet.glade.h:28 -msgid "Identity:" -msgstr "Identiteta:" - -#: ../gnome/applet/applet.glade.h:29 -msgid "Interface:" -msgstr "Vmesnik:" - -#: ../gnome/applet/applet.glade.h:30 -msgid "Key Type:" -msgstr "Vrsta ključa:" - -#: ../gnome/applet/applet.glade.h:31 -msgid "Key management:" -msgstr "Upravljanje s ključi:" - -#: ../gnome/applet/applet.glade.h:32 -msgid "Key:" -msgstr "Ključ:" - -#: ../gnome/applet/applet.glade.h:33 -msgid "" -"None\n" -"WEP 128-bit Passphrase\n" -"WEP 64/128-bit Hex\n" -"WEP 64/128-bit ASCII\n" -msgstr "" -"Brez\n" -"WEP 128-bit šifrirna fraza\n" -"WEP 64/128-bit Hex\n" -"WEP 64/128-bit ASCII\n" - -#: ../gnome/applet/applet.glade.h:38 -msgid "" -"Open System\n" -"Shared Key" -msgstr "" -"Odprti sistem\n" -"Deljeni ključ" - -#: ../gnome/applet/applet.glade.h:40 -msgid "Other Wireless Network..." -msgstr "Drugo brezžično omrežje ..." - -#: ../gnome/applet/applet.glade.h:41 -msgid "Passphrase:" -msgstr "Šifrirna fraza:" - -#: ../gnome/applet/applet.glade.h:42 -msgid "Password:" -msgstr "Geslo:" - -#: ../gnome/applet/applet.glade.h:43 -msgid "Primary DNS:" -msgstr "Primarni DNS;" - -#: ../gnome/applet/applet.glade.h:44 -msgid "Private Key File:" -msgstr "Datoteka zasebnega ključa:" - -#: ../gnome/applet/applet.glade.h:45 -msgid "Private Key Password:" -msgstr "Geslo zasebnega ključa:" - -#: ../gnome/applet/applet.glade.h:46 -msgid "Secondary DNS:" -msgstr "Sekundarni DNS:" - -#: ../gnome/applet/applet.glade.h:47 -msgid "Select the CA Certificate File" -msgstr "Izberite datoteko overiteljevega (CA) certifikata" - -#: ../gnome/applet/applet.glade.h:48 -msgid "Select the Client Certificate File" -msgstr "Izberite datoteko odjemalčevega certifikata" - -#: ../gnome/applet/applet.glade.h:49 -msgid "Select the Private Key File" -msgstr "Izberite datoteko zasebnega ključa" - -#: ../gnome/applet/applet.glade.h:50 -msgid "Show key" -msgstr "Pokaži ključ" - -#: ../gnome/applet/applet.glade.h:51 -msgid "Show passphrase" -msgstr "Pokaži šifrirno frazo" - -#: ../gnome/applet/applet.glade.h:52 -msgid "Show password" -msgstr "Pokaži geslo" - -#: ../gnome/applet/applet.glade.h:53 -msgid "Show passwords" -msgstr "Pokaži gesla" - -#: ../gnome/applet/applet.glade.h:54 -msgid "Speed:" -msgstr "Hitrost:" - -#: ../gnome/applet/applet.glade.h:55 -msgid "Subnet Mask:" -msgstr "Maska podomrežja:" - -#: ../gnome/applet/applet.glade.h:56 -msgid "Type:" -msgstr "Vrsta:" - -#: ../gnome/applet/applet.glade.h:57 -msgid "User Name:" -msgstr "Uporabniško ime:" - -#: ../gnome/applet/applet.glade.h:58 -msgid "Wireless Network Key Required" -msgstr "Zahtevan ključ brezžičnega omrežja" - -#: ../gnome/applet/applet.glade.h:59 -msgid "Wireless _adapter:" -msgstr "Brezžični _vmesnik:" - -#: ../gnome/applet/applet.glade.h:60 -msgid "_Always Trust this Wireless Network" -msgstr "Vedno _zaupaj temu brezžičnemu omrežju" - -#: ../gnome/applet/applet.glade.h:61 -msgid "_Don't remind me again" -msgstr "_Ne spomni me več" - -#: ../gnome/applet/applet.glade.h:62 -msgid "_Fallback on this Network" -msgstr "" - -#: ../gnome/applet/applet.glade.h:63 -msgid "_Login to Network" -msgstr "_Prijava v omrežje" - -#: ../gnome/applet/applet.glade.h:64 -msgid "_Network Name:" -msgstr "_Ime omrežja:" - -#: ../gnome/applet/applet.glade.h:65 -msgid "_Wireless Security:" -msgstr "_Zaščita omrežja:" - -#: ../gnome/vpn-properties/nm-vpn-properties.c:417 -msgid "Cannot add VPN connection" -msgstr "Ni mogoče dodati povezave VPN" - -#: ../gnome/vpn-properties/nm-vpn-properties.c:419 -msgid "No suitable VPN software was found on your system. Contact your system administrator." -msgstr "Ustrezna programska oprema za VPN ni bila najdena na vašem sistemu. Kontaktirajte vašega sistemskega administratorja." - -#: ../gnome/vpn-properties/nm-vpn-properties.c:461 -msgid "Cannot import VPN connection" -msgstr "Ni mogoče uvoziti povezave VPN" - -#: ../gnome/vpn-properties/nm-vpn-properties.c:463 +#: ../libnm-util/crypto_gnutls.c:286 +#: ../libnm-util/crypto_nss.c:355 #, c-format -msgid "Cannot find suitable software for VPN connection type '%s' to import the file '%s'. Contact your system administrator." -msgstr "Ni mogoče najti ustrezne programske opreme za povezavo VPN vrste '%s' za uvoz datoteke '%s'. Kontaktirajte vašega sistemskega administratorja." +msgid "Could not allocate memory for encrypting." +msgstr "Pomnilnika za šifriranje ni mogoče dodeliti." -#: ../gnome/vpn-properties/nm-vpn-properties.c:580 +#: ../libnm-util/crypto_gnutls.c:294 #, c-format -msgid "Error retrieving VPN connection '%s'" -msgstr "Napaka pri pridobivanju povezave VPN '%s'" +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "Zagon vsebine šifrirne cifre je spodletel: %s / %s. " -#: ../gnome/vpn-properties/nm-vpn-properties.c:583 +#: ../libnm-util/crypto_gnutls.c:303 #, c-format -msgid "Could not find the UI files for VPN connection type '%s'. Contact your system administrator." -msgstr "Ni mogoče najti datotek uporabniškega vmesnika za povezavo VPN vrste \"%s\". Kontaktirajte vašega sistemskega administratorja." +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "Nastavitev simetričnega ključa za šifriranje je spodletela: %s / %s." -#: ../gnome/vpn-properties/nm-vpn-properties.c:727 +#: ../libnm-util/crypto_gnutls.c:313 #, c-format -msgid "Delete VPN connection \"%s\"?" -msgstr "Ali želite izbrisati povezavo VPN \"%s\"?" +msgid "Failed to set IV for encryption: %s / %s." +msgstr "Nastavitev IV za šifriranje je spodletela: %s / %s." -#: ../gnome/vpn-properties/nm-vpn-properties.c:730 +#: ../libnm-util/crypto_gnutls.c:322 #, c-format -msgid "All information about the VPN connection \"%s\" will be lost and you may need your system administrator to provide information to create a new connection." -msgstr "Vse informacije o povezavi VPN \"%s\" bodo izgubljene in mogoče boste potrebovali vašega sistemskega administratorja, da vam priskrbi informacije za ustvarjanje nove povezave." +msgid "Failed to encrypt the data: %s / %s." +msgstr "Šifriranje podatkov je spodletelo: %s / %s." -#: ../gnome/vpn-properties/nm-vpn-properties.c:924 -msgid "Unable to load" -msgstr "Ni mogoče naložiti" - -#: ../gnome/vpn-properties/nm-vpn-properties.c:926 -msgid "Cannot find some needed resources (the glade file)!" -msgstr "Ni mogoče najti nekaterih potrebnih virov (datoteke glade)!" - -#. druid_window = GTK_DIALOG (gtk_dialog_new_with_buttons (_("Create VPN Connection"), -#. NULL, -#. GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, -#. GTK_STOCK_CANCEL, -#. GTK_RESPONSE_REJECT, -#. GTK_STOCK_APPLY, -#. GTK_RESPONSE_ACCEPT, -#. NULL)); -#: ../gnome/vpn-properties/nm-vpn-properties.c:1081 -msgid "Create VPN Connection" -msgstr "Ustvari povezavo VPN" - -#. gtk_container_add (GTK_CONTAINER (druid_window->vbox), GTK_WIDGET(gtk_label_new("Some label"))); -#. gtk_box_pack_start (GTK_BOX (druid_window->vbox), GTK_WIDGET(druid), TRUE,TRUE,0); -#. gtk_box_pack_start (GTK_BOX (druid_window->vbox), GTK_WIDGET(gtk_label_new("Some label")), TRUE,TRUE,0); -#. toplevel = gtk_widget_get_toplevel (GTK_WIDGET (druid)); -#. gtk_signal_connect (GTK_OBJECT (toplevel), "delete_event", GTK_SIGNAL_FUNC (vpn_window_close), NULL); -#. make the druid window modal wrt. our main window -#. gtk_window_set_modal (druid_window, TRUE); -#. gtk_window_set_transient_for (GTK_WINDOW(druid_window), GTK_WINDOW (dialog)); -#. Edit dialog -#: ../gnome/vpn-properties/nm-vpn-properties.c:1099 -msgid "Edit VPN Connection" -msgstr "Uredi povezavo VPN" - -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:1 -msgid "Add a new VPN connection" -msgstr "Dodaj novo povezavo VPN" - -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:2 -msgid "Delete the selected VPN connection" -msgstr "Izbriši izbrano povezavo VPN" - -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:3 -msgid "E_xport" -msgstr "I_zvozi" - -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:4 -msgid "Edit the selected VPN connection" -msgstr "Uredi izbrano povezavo VPN" - -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:5 -msgid "Export the VPN settings to a file" -msgstr "Izvozi nastavitve VPN v datoteko" - -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:6 -msgid "Export the selected VPN connection to a file" -msgstr "Izvozi izbrano povezavo VPN v datoteko" - -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:7 -msgid "Manage Virtual Private Network Connections" -msgstr "Upravljanje povezav navideznega zasebnega omrežja (VPN)" - -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:8 -msgid "VPN Connections" -msgstr "Povezave VPN" - -#: ../src/nm-ap-security-wep.c:52 -msgid "40-bit WEP" -msgstr "40-bitni WEP" - -#: ../src/nm-ap-security-wep.c:54 -msgid "104-bit WEP" -msgstr "104-bitni WEP" - -#: ../src/nm-ap-security-wpa-psk.c:50 -msgid "WPA TKIP" -msgstr "WPA TKIP" - -#: ../src/nm-ap-security-wpa-psk.c:52 -msgid "WPA CCMP" -msgstr "WPA CCMP" - -#: ../src/nm-ap-security-wpa-psk.c:54 -msgid "WPA Automatic" -msgstr "Samodejni WPA" - -#: ../src/nm-ap-security-wpa-psk.c:59 -msgid "WPA2 TKIP" -msgstr "WPA2 TKIP" - -#: ../src/nm-ap-security-wpa-psk.c:61 -msgid "WPA2 CCMP" -msgstr "WPA2 CCMP" - -#: ../src/nm-ap-security-wpa-psk.c:63 -msgid "WPA2 Automatic" -msgstr "Samodejni WPA2" - -#: ../src/nm-ap-security.c:338 -msgid "none" -msgstr "brez" - -#: ../src/nm-netlink-monitor.c:174 +#: ../libnm-util/crypto_gnutls.c:362 #, c-format -msgid "unable to create netlink socket for monitoring wired ethernet devices - %s" -msgstr "ni mogoče ustvariti netlink vtiča (netlink socket) za nadzor žičnih eternet naprav - %s" +msgid "Error initializing certificate data: %s" +msgstr "Napaka med zaganjanjem podatkov potrdila: %s" -#: ../src/nm-netlink-monitor.c:192 +#: ../libnm-util/crypto_gnutls.c:384 #, c-format -msgid "unable to bind to netlink socket for monitoring wired ethernet devices - %s" -msgstr "ni mogoče vzpostaviti vezi z netlink vtičem (netlink socket) za nadzor žičnih eternet naprav - %s" +msgid "Couldn't decode certificate: %s" +msgstr "Potrdila ni mogoča dekodirati: %s" -#: ../src/nm-netlink-monitor.c:427 -msgid "operation took too long" -msgstr "operacija je trajala predolgo" +#: ../libnm-util/crypto_gnutls.c:408 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %s" +msgstr "Dekodirnika PKCS#12 ni mogoče zagnati: %s" -#: ../src/nm-netlink-monitor.c:524 -msgid "received data from wrong type of sender" -msgstr "prejeti podatki od pošiljatelja napačne vrste" +#: ../libnm-util/crypto_gnutls.c:421 +#, c-format +msgid "Couldn't decode PKCS#12 file: %s" +msgstr "Datoteke PKCS#12 ni mogoče dekodirati: %s" -#: ../src/nm-netlink-monitor.c:537 -msgid "received data from unexpected sender" -msgstr "prejeti podatki od nepričakovanega pošiljatelja" +#: ../libnm-util/crypto_gnutls.c:433 +#, c-format +msgid "Couldn't verify PKCS#12 file: %s" +msgstr "Datoteke PKCS#12 ni mogoče preveriti: %s" -#: ../src/nm-netlink-monitor.c:666 -msgid "too much data was sent over socket and some of it was lost" -msgstr "preveč podatkov je bilo poslano preko vtiča in nekaj se jih je izgubilo" +#: ../libnm-util/crypto_nss.c:57 +#, c-format +msgid "Failed to initialize the crypto engine: %d." +msgstr "Zagon motorja šifriranja je spodletel: %d." -#: ../src/nm-netlink-monitor.c:776 +#: ../libnm-util/crypto_nss.c:111 +#, c-format +msgid "Failed to initialize the MD5 context: %d." +msgstr "Zagon vsebine MD5 je spodletel: %d." + +#: ../libnm-util/crypto_nss.c:179 +#, c-format +msgid "Invalid IV length (must be at least %d)." +msgstr "Neveljavna dolžina IV (mora biti vsaj %d)." + +#: ../libnm-util/crypto_nss.c:196 +#, c-format +msgid "Failed to initialize the decryption cipher slot." +msgstr "Zagon polja cifre dešifriranja je spodletel." + +#: ../libnm-util/crypto_nss.c:206 +#, c-format +msgid "Failed to set symmetric key for decryption." +msgstr "Nastavljanje simetričnega ključa za opis je spodletelo." + +#: ../libnm-util/crypto_nss.c:216 +#, c-format +msgid "Failed to set IV for decryption." +msgstr "Nastavljanje IV za dešifriranje je spodletelo." + +#: ../libnm-util/crypto_nss.c:224 +#, c-format +msgid "Failed to initialize the decryption context." +msgstr "Zagon vsebine dešifriranja je spodletel." + +#: ../libnm-util/crypto_nss.c:237 +#, c-format +msgid "Failed to decrypt the private key: %d." +msgstr "Dešifriranje zasebnega ključa je spodletelo: %d." + +#: ../libnm-util/crypto_nss.c:245 +#, c-format +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "Dešifriranje zasebnega ključa je spodletelo: dešifrirani podatki so preveliki." + +#: ../libnm-util/crypto_nss.c:256 +#, c-format +msgid "Failed to finalize decryption of the private key: %d." +msgstr "Končanje dešifriranja zasebnega ključa je spodletelo: %d." + +#: ../libnm-util/crypto_nss.c:363 +#, c-format +msgid "Failed to initialize the encryption cipher slot." +msgstr "Zagon polja cifre šifriranja je spodletel." + +#: ../libnm-util/crypto_nss.c:371 +#, c-format +msgid "Failed to set symmetric key for encryption." +msgstr "Nastavljanje simetričnega ključa za šifriranje je spodletelo." + +#: ../libnm-util/crypto_nss.c:379 +#, c-format +msgid "Failed to set IV for encryption." +msgstr "Nastavljanje IV za šifriranje je spodletelo." + +#: ../libnm-util/crypto_nss.c:387 +#, c-format +msgid "Failed to initialize the encryption context." +msgstr "Zaganjanje vsebine šifriranja je spodletelo." + +#: ../libnm-util/crypto_nss.c:395 +#, c-format +msgid "Failed to encrypt: %d." +msgstr "Šifriranje je spodletelo: %d." + +#: ../libnm-util/crypto_nss.c:403 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "Nepričakovana količina podatkov po šifriranju." + +#: ../libnm-util/crypto_nss.c:446 +#, c-format +msgid "Couldn't decode certificate: %d" +msgstr "Potrdila ni mogoče dekodirati: %d" + +#: ../libnm-util/crypto_nss.c:481 +#, c-format +msgid "Couldn't convert password to UCS2: %d" +msgstr "Gesla ni mogoče pretvoriti v UCS2: %d" + +#: ../libnm-util/crypto_nss.c:509 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %d" +msgstr "Dekodirnika PKCS#12 ni mogoče zagnati: %d" + +#: ../libnm-util/crypto_nss.c:518 +#, c-format +msgid "Couldn't decode PKCS#12 file: %d" +msgstr "Datoteke PCKS#12 ni mogoče dekodirati: %d" + +#: ../libnm-util/crypto_nss.c:527 +#, c-format +msgid "Couldn't verify PKCS#12 file: %d" +msgstr "Datoteke PCKS#12 ni mogoče preveriti: %d" + +#: ../libnm-util/crypto_nss.c:556 +msgid "Could not generate random data." +msgstr "Naključnih podatkov ni mogoče ustvariti." + +#: ../libnm-util/nm-utils.c:1522 +#, c-format +msgid "Not enough memory to make encryption key." +msgstr "Ni dovolj pomnilnika za ustvarjanje šifrirnega ključa." + +#: ../libnm-util/nm-utils.c:1633 +msgid "Could not allocate memory for PEM file creation." +msgstr "Ni mogoče dodeliti pomnilnika za ustvarjanje datoteke PEM." + +#: ../libnm-util/nm-utils.c:1645 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "Ni mogoče dodeliti pomnilnika za zapis IV v datoteko PEM." + +#: ../libnm-util/nm-utils.c:1657 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "Ni mogoče dodeliti pomnilnika za zapis šifriranega ključa v datoteko PEM." + +#: ../libnm-util/nm-utils.c:1676 +#, c-format +msgid "Could not allocate memory for PEM file data." +msgstr "Ni mogoče dodeliti pomnilnika za podatke datoteke PEM." + +#: ../src/nm-netlink-monitor.c:194 +#: ../src/nm-netlink-monitor.c:464 +#: ../src/nm-netlink-monitor.c:569 +#: ../src/ip6-manager/nm-netlink-listener.c:352 +#, c-format +msgid "error processing netlink message: %s" +msgstr "napaka med obdelovanjem sporočila netlink: %s" + +#: ../src/nm-netlink-monitor.c:260 +#, c-format +#| msgid "" +#| "unable to create netlink socket for monitoring wired ethernet devices - %s" +msgid "unable to allocate netlink handle for monitoring link status: %s" +msgstr "ni mogoče dodeliti ročice netlink za nadziranje stanja povezave: %s" + +#: ../src/nm-netlink-monitor.c:270 +#, c-format +#| msgid "" +#| "unable to bind to netlink socket for monitoring wired ethernet devices - %" +#| "s" +msgid "unable to connect to netlink for monitoring link status: %s" +msgstr "ni se mogoče povezati z netlink za nadziranje stanja povezave: %s" + +#: ../src/nm-netlink-monitor.c:278 +#, c-format +#| msgid "" +#| "unable to bind to netlink socket for monitoring wired ethernet devices - %" +#| "s" +msgid "unable to join netlink group for monitoring link status: %s" +msgstr "ni se mogoče povezati s skupino netlink za nadziranje stanja povezave: %s" + +#: ../src/nm-netlink-monitor.c:286 +#, c-format +#| msgid "" +#| "unable to create netlink socket for monitoring wired ethernet devices - %s" +msgid "unable to allocate netlink link cache for monitoring link status: %s" +msgstr "ni mogoče dodeliti predpomnilnika netlink povezav za nadziranje stanja povezave: %s" + +#: ../src/nm-netlink-monitor.c:494 +#: ../src/ip6-manager/nm-netlink-listener.c:382 msgid "error occurred while waiting for data on socket" msgstr "med čakanjem na podatke na vtiču je prišlo do napake" -#: ../gnome/applet/applet-dbus-devices.c:930 +#: ../src/nm-netlink-monitor.c:558 #, c-format -msgid "You are now connected to the Ad-Hoc wireless network '%s'." -msgstr "Zdaj ste povezani v ad-hoc brezžično omrežje '%s'." +msgid "error updating link cache: %s" +msgstr "napaka med posodabljanjem predpomnilnika povezave: %s" -#: ../gnome/applet/applet-dbus-devices.c:935 +#: ../src/NetworkManager.c:330 #, c-format -msgid "You are now connected to the wireless network '%s'." -msgstr "Zdaj ste povezani z brezžičnim omrežjem '%s'." +msgid "Invalid option. Please use --help to see a list of valid options.\n" +msgstr "Neveljavna možnost. Uporabite --help za seznam veljavnih možnosti.\n" -#: ../gnome/applet/applet-dbus-devices.c:942 -msgid "You are now connected to the wired network." -msgstr "Zdaj ste povezani z žičnim omrežjem." +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:304 +msgid "# Created by NetworkManager\n" +msgstr "#Ustvaril upravljalnik omrežij\n" -#: ../gnome/applet/applet-dbus-devices.c:948 -msgid "Connection Established" -msgstr "Povezava vzpostavljena" +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:310 +#, c-format +msgid "" +"# Merged from %s\n" +"\n" +msgstr "" +"# Združeno iz %s\n" +"\n" -#: ../gnome/applet/applet-dbus-devices.c:997 -msgid "Disconnected" -msgstr "Prekinjena povezava" +#: ../src/ip6-manager/nm-netlink-listener.c:200 +#, c-format +msgid "unable to allocate netlink handle: %s" +msgstr "Ročnika netlink ni mogoče dodeliti: %s" -#: ../gnome/applet/applet-dbus-devices.c:998 -msgid "The network connection has been disconnected." -msgstr "Omrežna povezava je bila prekinjena." +#: ../src/ip6-manager/nm-netlink-listener.c:210 +#, c-format +msgid "unable to connect to netlink: %s" +msgstr "z netlink se ni mogoče povezati: %s" -#: ../src/nm-ap-security-leap.c:66 -#: ../src/nm-ap-security-leap.c:82 -msgid "LEAP" -msgstr "LEAP" +#: ../src/ip6-manager/nm-netlink-listener.c:307 +#, c-format +msgid "unable to join netlink group: %s" +msgstr "skupini netlink se ni mogoče pridružiti: %s" + +#: ../src/named-manager/nm-named-manager.c:315 +msgid "NOTE: the libc resolver may not support more than 3 nameservers." +msgstr "OPOMBA: libc razreševalnik morda ne podpira več kot 3 imenske strežnike." + +#: ../src/named-manager/nm-named-manager.c:317 +msgid "The nameservers listed below may not be recognized." +msgstr "Imenski strežniki našteti spodaj morda ne bodo prepoznani." + +#: ../src/system-settings/nm-default-wired-connection.c:194 +#, c-format +msgid "Auto %s" +msgstr "Samodejno %s" + +#: ../system-settings/plugins/ifcfg-rh/reader.c:2406 +#| msgid "Open System" +msgid "System" +msgstr "Sistem" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "Deljene povezave preko zaščitenega WiFi omrežja" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "Deljene povezave preko odprtega WiFi omrežja" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "Spremeni trajno sistemsko ime gostitelja" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 +#| msgid "No active connections!" +msgid "Modify system connections" +msgstr "Spremeni sistemske povezave" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 +msgid "System policy prevents modification of system settings" +msgstr "Sistemska določila onemogočajo spreminjanje sistemskih nastavitev" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +msgid "System policy prevents modification of the persistent system hostname" +msgstr "Sistemska pravila preprečujejo spremembo imena gostitelja trajnega sistema" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "Sistemska pravila preprečujejo deljenje povezav preko zaščitenega WiFi omrežja" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "Sistemska pravila preprečujejo deljenje povezav preko odprtega WiFi omrežja" + +#~ msgid "Passphrase for wireless network %s" +#~ msgstr "Šifrirna fraza za brezžično omrežje %s" +#~ msgid "Connection to the wireless network '%s' failed." +#~ msgstr "Povezava z brezžičnim omrežjem %s ni uspela" +#~ msgid "Connection to the wired network failed." +#~ msgstr "Povezava z žičnim omrežjem ni uspela." +#~ msgid "Error displaying connection information:" +#~ msgstr "Napaka pri prikazovanju informacij o povezavi:" +#~ msgid "Could not find some required resources (the glade file)!" +#~ msgstr "Ni mogoče najti nekaterih zahtevanih virov (datoteke glade)!" +#~ msgid "%d Mb/s" +#~ msgstr "%d Mb/s" +#~ msgid "Wired Ethernet (%s)" +#~ msgstr "Žični eternet (%s)" +#~ msgid "Wireless Ethernet (%s)" +#~ msgstr "Brezžični eternet (%s)" +#~ msgid "Unknown" +#~ msgstr "Neznano" +#~ msgid "NetworkManager Applet" +#~ msgstr "Programček NetworkManager" +#~ msgid "" +#~ "Copyright © 2004-2006 Red Hat, Inc.\n" +#~ "Copyright © 2005-2006 Novell, Inc." +#~ msgstr "" +#~ "Copyright © 2004-2006 Red Hat, Inc.\n" +#~ "Copyright © 2005-2006 Novell, Inc." +#~ msgid "" +#~ "Notification area applet for managing your network devices and " +#~ "connections." +#~ msgstr "" +#~ "Programček za območje obvestil za upravljanje vaših mrežnih naprav in " +#~ "povezav." +#~ msgid "translator-credits" +#~ msgstr "Matic Žgur " +#~ msgid "" +#~ "Copyright © 2004-2005 Red Hat, Inc.\n" +#~ "Copyright © 2005-2006 Novell, Inc." +#~ msgstr "" +#~ "Copyright © 2004-2005 Red Hat, Inc.\n" +#~ "Copyright © 2005-2006 Novell, Inc." +#~ msgid "VPN Login Failure" +#~ msgstr "Neuspela prijava VPN" +#~ msgid "Could not start the VPN connection '%s' due to a login failure." +#~ msgstr "Ni mogoče začeti povezave VPN '%s' zaradi neuspele prijave." +#~ msgid "VPN Start Failure" +#~ msgstr "Neuspel zagon VPN" +#~ msgid "" +#~ "Could not start the VPN connection '%s' due to a failure launching the " +#~ "VPN program." +#~ msgstr "" +#~ "Ni mogoče začeti povezave VPN '%s' zaradi neuspelega zagona programa VPN." +#~ msgid "VPN Connect Failure" +#~ msgstr "Neuspela povezava VPN" +#~ msgid "Could not start the VPN connection '%s' due to a connection error." +#~ msgstr "Ni mogoče začeti povezave VPN '%s' zaradi napake pri povezavi." +#~ msgid "VPN Configuration Error" +#~ msgstr "Napaka nastavitev VPN" +#~ msgid "The VPN connection '%s' was not correctly configured." +#~ msgstr "Povezava VPN '%s' ni pravilno nastavljena." +#~ msgid "" +#~ "Could not start the VPN connection '%s' because the VPN server did not " +#~ "return an adequate network configuration." +#~ msgstr "" +#~ "Ni mogoče začeti povezave VPN '%s', ker strežnik VPN ni vrnil ustreznih " +#~ "nastavitev." +#~ msgid "VPN Login Message" +#~ msgstr "Prijavno sporočilo VPN" +#~ msgid "" +#~ "The NetworkManager Applet could not find some required resources (the " +#~ "glade file was not found)." +#~ msgstr "" +#~ "Programček NetworkManager ne more najti nekaterih zahtevanih virov " +#~ "(datoteka glade ni bila najdena)." +#~ msgid "The network device \"%s (%s)\" does not support wireless scanning." +#~ msgstr "" +#~ "Omrežna naprava \"%s (%s)\" ne podpira skeniranja brezžičnih omrežij." +#~ msgid "The network device \"%s (%s)\" does not support link detection." +#~ msgstr "Omrežna naprava \"%s (%s)\" ne podpira odkrivanja povezav." +#~ msgid "(unknown)" +#~ msgstr "(neznano)" +#~ msgid "Preparing device %s for the wired network..." +#~ msgstr "Pripravljanje naprave %s na žično omrežje ..." +#~ msgid "Preparing device %s for the wireless network '%s'..." +#~ msgstr "Pripravljanje naprave %s na rezžično omrežje '%s' ..." +#~ msgid "Configuring device %s for the wired network..." +#~ msgstr "Nastavljanje naprave %s za žično omrežje ..." +#~ msgid "Attempting to join the wireless network '%s'..." +#~ msgstr "Poskus pridruževanja brezžičnemu omrežju '%s' ..." +#~ msgid "Waiting for Network Key for the wireless network '%s'..." +#~ msgstr "Čakanje na omrežni ključ za brezžično omrežje '%s' ..." +#~ msgid "Requesting a network address from the wired network..." +#~ msgstr "Zahtevanje omrežnega naslova iz žičnega omrežja ..." +#~ msgid "Requesting a network address from the wireless network '%s'..." +#~ msgstr "Zahtevanje omrežnega naslova iz brezžičnega omrežja '%s' ..." +#~ msgid "Finishing connection to the wired network..." +#~ msgstr "Zaključevanje povezave v žično omrežje ..." +#~ msgid "Finishing connection to the wireless network '%s'..." +#~ msgstr "Zaključevanje povezave v brezžično omrežje '%s' ..." +#~ msgid "NetworkManager is not running" +#~ msgstr "NetworkManager ni zagnan" +#~ msgid "Networking disabled" +#~ msgstr "Omrežje onemogočeno" +#~ msgid "No network connection" +#~ msgstr "Nobene omrežne povezave" +#~ msgid "Wired network connection" +#~ msgstr "Žična omrežna povezava" +#~ msgid "Connected to an Ad-Hoc wireless network" +#~ msgstr "Povezan v ad-hoc brezžično omrežje" +#~ msgid "Wireless network connection to '%s' (%d%%)" +#~ msgstr "Brezžična omrežna povezava z '%s' (%d%%)" +#~ msgid "VPN connection to '%s'" +#~ msgstr "Povezave VPN z '%s'" +#~ msgid "VPN connecting to '%s'" +#~ msgstr "Povezovanje VPN z '%s'" +#~ msgid "_Connect to Other Wireless Network..." +#~ msgstr "Po_veži se v drugo brezžično omrežje ..." +#~ msgid "Create _New Wireless Network..." +#~ msgstr "_Ustvari novo brezžično omrežje ..." +#~ msgid "_VPN Connections" +#~ msgstr "_Povezave VPN" +#~ msgid "_Configure VPN..." +#~ msgstr "_Nastavi VPN ..." +#~ msgid "_Disconnect VPN..." +#~ msgstr "_Prekini povezavo z VPN ..." +#~ msgid "_Dial Up Connections" +#~ msgstr "_Klicna povezava" +#~ msgid "Connect to %s..." +#~ msgstr "Poveži se v %s ..." +#~ msgid "Disconnect from %s..." +#~ msgstr "Prekini povezavo z %s ..." +#~ msgid "No network devices have been found" +#~ msgstr "Najdena ni bila nobena omrežna naprava" +#~ msgid "NetworkManager is not running..." +#~ msgstr "NetworkManager ni zagnan ..." +#~ msgid "Enable _Networking" +#~ msgstr "Omogoči _omrežje" +#~ msgid "Enable _Wireless" +#~ msgstr "Omogoči _brezžično omrežje" +#~ msgid "Connection _Information" +#~ msgstr "_Informacije o povezavi" +#~ msgid "_Help" +#~ msgstr "_Pomoč" +#~ msgid "_About" +#~ msgstr "_O Programu" +#~ msgid "" +#~ "The NetworkManager applet could not find some required resources. It " +#~ "cannot continue.\n" +#~ msgstr "" +#~ "Programček NetworkManager ne more najti nekaterih zahtevanih virov. Ni " +#~ "mogoče nadaljevati.\n" +#~ msgid "Shared Key" +#~ msgstr "Deljeni ključ" +#~ msgid "Automatic (Default)" +#~ msgstr "Samodejno (privzeto)" +#~ msgid "AES-CCMP" +#~ msgstr "AES-CCMP" +#~ msgid "TKIP" +#~ msgstr "TKIP" +#~ msgid "Dynamic WEP" +#~ msgstr "Dinamični WEP" +#~ msgid "None" +#~ msgstr "Brez" +#~ msgid "WEP 64/128-bit ASCII" +#~ msgstr "WEP 64/128-bit ASCII" +#~ msgid "WEP 64/128-bit Hex" +#~ msgstr "WEP 64/128-bit Hex" +#~ msgid "WEP 128-bit Passphrase" +#~ msgstr "WEP 128-bit šifrirna fraza" +#~ msgid "PEAP" +#~ msgstr "PEAP" +#~ msgid "TLS" +#~ msgstr "TLS" +#~ msgid "TTLS" +#~ msgstr "TTLS" +#~ msgid "WPA2 Enterprise" +#~ msgstr "Podjetniški WPA2" +#~ msgid "WPA Enterprise" +#~ msgstr "Podjetniški WPA" +#~ msgid "WPA2 Personal" +#~ msgstr "Osebni WPA2" +#~ msgid "WPA Personal" +#~ msgstr "Osebni WPA" +#~ msgid "Orientation" +#~ msgstr "Usmerjenost" +#~ msgid "The orientation of the tray." +#~ msgstr "Usmeritev pladnja." +#~ msgid "Wired Network (%s)" +#~ msgstr "Žično omrežje (%s)" +#~ msgid "_Wired Network" +#~ msgstr "Ž_ično omrežje" +#~ msgid "Wireless Network (%s)" +#~ msgid_plural "Wireless Networks (%s)" +#~ msgstr[0] "Brezžično omrežje (%s)" +#~ msgstr[1] "Brezžični omrežji (%s)" +#~ msgstr[2] "Brezžična omrežja (%s)" +#~ msgstr[3] "Brezžična omrežja (%s)" +#~ msgid "Wireless Network" +#~ msgid_plural "Wireless Networks" +#~ msgstr[0] "Brezžično omrežje" +#~ msgstr[1] "Brezžični omrežji" +#~ msgstr[2] "Brezžična omrežja" +#~ msgstr[3] "Brezžična omrežja" +#~ msgid " (invalid Unicode)" +#~ msgstr " (neveljaven Unicode)" +#~ msgid "" +#~ "By default, the wireless network's name is set to your computer's name, %" +#~ "s, with no encryption enabled" +#~ msgstr "" +#~ "Privzeto je ime brezžičnega omrežja nastavljeno na ime vašega " +#~ "računalnika, %s, brez omogočenega šifriranja" +#~ msgid "Create new wireless network" +#~ msgstr "Ustvari novo brezžično omrežje" +#~ msgid "" +#~ "Enter the name and security settings of the wireless network you wish to " +#~ "create." +#~ msgstr "" +#~ "Vnesite ime in varnostne nastavitve brezžičnega omrežja, ki ga želite " +#~ "ustvariti." +#~ msgid "Create New Wireless Network" +#~ msgstr "Ustvari novo brezžično omrežje" +#~ msgid "Existing wireless network" +#~ msgstr "Obstoječe brezžično omrežje" +#~ msgid "Enter the name of the wireless network to which you wish to connect." +#~ msgstr "Vnesite ime brezžičnega omrežja, v katerega se želite povezati." +#~ msgid "Connect to Other Wireless Network" +#~ msgstr "Poveži se v drugo brezžično omrežje" +#~ msgid "Error connecting to wireless network" +#~ msgstr "Napaka pri povezovanju z brezžičnim omrežjem" +#~ msgid "" +#~ "The requested wireless network requires security capabilities unsupported " +#~ "by your hardware." +#~ msgstr "" +#~ "Zahtevano brezžično omrežje zahteva varnostne zmožnosti, ki so nepodprte " +#~ "z vašo strojno opremo." +#~ msgid "Cannot start VPN connection '%s'" +#~ msgstr "Ni mogoče začeti povezave VPN '%s'" +#~ msgid "" +#~ "Could not find the authentication dialog for VPN connection type '%s'. " +#~ "Contact your system administrator." +#~ msgstr "" +#~ "Ni mogoče najti pogovornega okna za overitev za povezavo VPN vrste '%s'. " +#~ "Kontaktirajte sistemskega administratorja." +#~ msgid "" +#~ "There was a problem launching the authentication dialog for VPN " +#~ "connection type '%s'. Contact your system administrator." +#~ msgstr "" +#~ "Pri zagonu pogovornega okna za overovitev za povezavo VPN vrste '%s' je " +#~ "prišlo do problema. Kontaktirajte sistemskega administratorja." +#~ msgid " " +#~ msgstr " " +#~ msgid "" +#~ "Active Connection Information" +#~ msgstr "" +#~ "Informacije o aktivni povezavi" +#~ msgid "" +#~ "Passphrase Required by Wireless " +#~ "Network\n" +#~ "\n" +#~ "A passphrase or encryption key is required to access the wireless network " +#~ "'%s'." +#~ msgstr "" +#~ "Šifrirna fraza, ki jo zahteva " +#~ "brezžično omrežje\n" +#~ "\n" +#~ "Za dostop do brezžičnega omrežja '%s' je zahtevana šifrirna fraza ali " +#~ "šifrirni ključ." +#~ msgid "" +#~ "Reduced Network Functionality\n" +#~ "\n" +#~ "%s It will not be completely functional." +#~ msgstr "" +#~ "Zmanjšana uporabnost omrežja\n" +#~ "\n" +#~ "%s ne bo popolnoma uporaben." +#~ msgid "" +#~ "Wireless Network Login " +#~ "Confirmation\n" +#~ "\n" +#~ "You have chosen to log in to the wireless network '%s'. If you are sure " +#~ "that this wireless network is secure, click the checkbox below and " +#~ "NetworkManager will not require confirmation on subsequent log ins." +#~ msgstr "" +#~ "Potrditev prijave v brezžično " +#~ "omrežje\n" +#~ "\n" +#~ "Izbrali ste prijavo v brezžično omrežje '%s'. Če ste prepričani, da je to " +#~ "brezžično omrežje varno, kliknite potrditveno polje spodaj in " +#~ "NetworkManager ne bo več zahteval potrditve za nadaljnje prijave." +#~ msgid "Anonymous Identity:" +#~ msgstr "Anonimna identiteta:" +#~ msgid "Authentication:" +#~ msgstr "Overovitev:" +#~ msgid "Broadcast Address:" +#~ msgstr "Naslov za razpršeno oddajanje:" +#~ msgid "CA Certificate File:" +#~ msgstr "Datoteka overiteljevega (CA) certifikata:" +#~ msgid "C_onnect" +#~ msgstr "Po_veži se" +#~ msgid "Client Certificate File:" +#~ msgstr "Datoteka odjemalčevega certifikata:" +#~ msgid "Connection Information" +#~ msgstr "Informacije o povezavi" +#~ msgid "Default Route:" +#~ msgstr "Privzeta smer:" +#~ msgid "Destination Address:" +#~ msgstr "Ciljni naslov:" +#~ msgid "Driver:" +#~ msgstr "Gonilnik:" +#~ msgid "EAP Method:" +#~ msgstr "Metoda EAP:" +#~ msgid "Hardware Address:" +#~ msgstr "Naslov strojne opreme:" +#~ msgid "IP Address:" +#~ msgstr "IP naslov:" +#~ msgid "Identity:" +#~ msgstr "Identiteta:" +#~ msgid "Interface:" +#~ msgstr "Vmesnik:" +#~ msgid "Key Type:" +#~ msgstr "Vrsta ključa:" +#~ msgid "Key management:" +#~ msgstr "Upravljanje s ključi:" +#~ msgid "Key:" +#~ msgstr "Ključ:" +#~ msgid "" +#~ "None\n" +#~ "WEP 128-bit Passphrase\n" +#~ "WEP 64/128-bit Hex\n" +#~ "WEP 64/128-bit ASCII\n" +#~ msgstr "" +#~ "Brez\n" +#~ "WEP 128-bit šifrirna fraza\n" +#~ "WEP 64/128-bit Hex\n" +#~ "WEP 64/128-bit ASCII\n" +#~ msgid "" +#~ "Open System\n" +#~ "Shared Key" +#~ msgstr "" +#~ "Odprti sistem\n" +#~ "Deljeni ključ" +#~ msgid "Other Wireless Network..." +#~ msgstr "Drugo brezžično omrežje ..." +#~ msgid "Passphrase:" +#~ msgstr "Šifrirna fraza:" +#~ msgid "Password:" +#~ msgstr "Geslo:" +#~ msgid "Primary DNS:" +#~ msgstr "Primarni DNS;" +#~ msgid "Private Key File:" +#~ msgstr "Datoteka zasebnega ključa:" +#~ msgid "Private Key Password:" +#~ msgstr "Geslo zasebnega ključa:" +#~ msgid "Secondary DNS:" +#~ msgstr "Sekundarni DNS:" +#~ msgid "Select the CA Certificate File" +#~ msgstr "Izberite datoteko overiteljevega (CA) certifikata" +#~ msgid "Select the Client Certificate File" +#~ msgstr "Izberite datoteko odjemalčevega certifikata" +#~ msgid "Select the Private Key File" +#~ msgstr "Izberite datoteko zasebnega ključa" +#~ msgid "Show key" +#~ msgstr "Pokaži ključ" +#~ msgid "Show passphrase" +#~ msgstr "Pokaži šifrirno frazo" +#~ msgid "Show password" +#~ msgstr "Pokaži geslo" +#~ msgid "Show passwords" +#~ msgstr "Pokaži gesla" +#~ msgid "Speed:" +#~ msgstr "Hitrost:" +#~ msgid "Subnet Mask:" +#~ msgstr "Maska podomrežja:" +#~ msgid "Type:" +#~ msgstr "Vrsta:" +#~ msgid "User Name:" +#~ msgstr "Uporabniško ime:" +#~ msgid "Wireless Network Key Required" +#~ msgstr "Zahtevan ključ brezžičnega omrežja" +#~ msgid "Wireless _adapter:" +#~ msgstr "Brezžični _vmesnik:" +#~ msgid "_Always Trust this Wireless Network" +#~ msgstr "Vedno _zaupaj temu brezžičnemu omrežju" +#~ msgid "_Don't remind me again" +#~ msgstr "_Ne spomni me več" +#~ msgid "_Login to Network" +#~ msgstr "_Prijava v omrežje" +#~ msgid "_Network Name:" +#~ msgstr "_Ime omrežja:" +#~ msgid "_Wireless Security:" +#~ msgstr "_Zaščita omrežja:" +#~ msgid "Cannot add VPN connection" +#~ msgstr "Ni mogoče dodati povezave VPN" +#~ msgid "" +#~ "No suitable VPN software was found on your system. Contact your system " +#~ "administrator." +#~ msgstr "" +#~ "Ustrezna programska oprema za VPN ni bila najdena na vašem sistemu. " +#~ "Kontaktirajte vašega sistemskega administratorja." +#~ msgid "Cannot import VPN connection" +#~ msgstr "Ni mogoče uvoziti povezave VPN" +#~ msgid "" +#~ "Cannot find suitable software for VPN connection type '%s' to import the " +#~ "file '%s'. Contact your system administrator." +#~ msgstr "" +#~ "Ni mogoče najti ustrezne programske opreme za povezavo VPN vrste '%s' za " +#~ "uvoz datoteke '%s'. Kontaktirajte vašega sistemskega administratorja." +#~ msgid "Error retrieving VPN connection '%s'" +#~ msgstr "Napaka pri pridobivanju povezave VPN '%s'" +#~ msgid "" +#~ "Could not find the UI files for VPN connection type '%s'. Contact your " +#~ "system administrator." +#~ msgstr "" +#~ "Ni mogoče najti datotek uporabniškega vmesnika za povezavo VPN vrste \"%s" +#~ "\". Kontaktirajte vašega sistemskega administratorja." +#~ msgid "Delete VPN connection \"%s\"?" +#~ msgstr "Ali želite izbrisati povezavo VPN \"%s\"?" +#~ msgid "" +#~ "All information about the VPN connection \"%s\" will be lost and you may " +#~ "need your system administrator to provide information to create a new " +#~ "connection." +#~ msgstr "" +#~ "Vse informacije o povezavi VPN \"%s\" bodo izgubljene in mogoče boste " +#~ "potrebovali vašega sistemskega administratorja, da vam priskrbi " +#~ "informacije za ustvarjanje nove povezave." +#~ msgid "Unable to load" +#~ msgstr "Ni mogoče naložiti" +#~ msgid "Cannot find some needed resources (the glade file)!" +#~ msgstr "Ni mogoče najti nekaterih potrebnih virov (datoteke glade)!" +#~ msgid "Create VPN Connection" +#~ msgstr "Ustvari povezavo VPN" +#~ msgid "Edit VPN Connection" +#~ msgstr "Uredi povezavo VPN" +#~ msgid "Add a new VPN connection" +#~ msgstr "Dodaj novo povezavo VPN" +#~ msgid "Delete the selected VPN connection" +#~ msgstr "Izbriši izbrano povezavo VPN" +#~ msgid "E_xport" +#~ msgstr "I_zvozi" +#~ msgid "Edit the selected VPN connection" +#~ msgstr "Uredi izbrano povezavo VPN" +#~ msgid "Export the VPN settings to a file" +#~ msgstr "Izvozi nastavitve VPN v datoteko" +#~ msgid "Export the selected VPN connection to a file" +#~ msgstr "Izvozi izbrano povezavo VPN v datoteko" +#~ msgid "Manage Virtual Private Network Connections" +#~ msgstr "Upravljanje povezav navideznega zasebnega omrežja (VPN)" +#~ msgid "VPN Connections" +#~ msgstr "Povezave VPN" +#~ msgid "40-bit WEP" +#~ msgstr "40-bitni WEP" +#~ msgid "104-bit WEP" +#~ msgstr "104-bitni WEP" +#~ msgid "WPA TKIP" +#~ msgstr "WPA TKIP" +#~ msgid "WPA CCMP" +#~ msgstr "WPA CCMP" +#~ msgid "WPA Automatic" +#~ msgstr "Samodejni WPA" +#~ msgid "WPA2 TKIP" +#~ msgstr "WPA2 TKIP" +#~ msgid "WPA2 CCMP" +#~ msgstr "WPA2 CCMP" +#~ msgid "WPA2 Automatic" +#~ msgstr "Samodejni WPA2" +#~ msgid "none" +#~ msgstr "brez" +#~ msgid "operation took too long" +#~ msgstr "operacija je trajala predolgo" +#~ msgid "received data from wrong type of sender" +#~ msgstr "prejeti podatki od pošiljatelja napačne vrste" +#~ msgid "received data from unexpected sender" +#~ msgstr "prejeti podatki od nepričakovanega pošiljatelja" +#~ msgid "too much data was sent over socket and some of it was lost" +#~ msgstr "" +#~ "preveč podatkov je bilo poslano preko vtiča in nekaj se jih je izgubilo" +#~ msgid "You are now connected to the Ad-Hoc wireless network '%s'." +#~ msgstr "Zdaj ste povezani v ad-hoc brezžično omrežje '%s'." +#~ msgid "You are now connected to the wireless network '%s'." +#~ msgstr "Zdaj ste povezani z brezžičnim omrežjem '%s'." +#~ msgid "You are now connected to the wired network." +#~ msgstr "Zdaj ste povezani z žičnim omrežjem." +#~ msgid "Connection Established" +#~ msgstr "Povezava vzpostavljena" +#~ msgid "Disconnected" +#~ msgstr "Prekinjena povezava" +#~ msgid "The network connection has been disconnected." +#~ msgstr "Omrežna povezava je bila prekinjena." +#~ msgid "LEAP" +#~ msgstr "LEAP" diff --git a/po/sv.po b/po/sv.po index f8f2d2b6fa..d9d9147a5c 100644 --- a/po/sv.po +++ b/po/sv.po @@ -1,7 +1,7 @@ # Swedish messages for NetworkManager. -# Copyright (C) 2004, 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Free Software Foundation, Inc. # Christian Rose , 2004, 2005, 2006. -# Daniel Nylander , 2006, 2008, 2009. +# Daniel Nylander , 2006, 2008, 2009, 2010. # # $Id: sv.po,v 1.14 2006/12/10 18:34:55 dnylande Exp $ # @@ -9,8 +9,8 @@ msgid "" msgstr "" "Project-Id-Version: NetworkManager\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager&component=general\n" -"POT-Creation-Date: 2009-08-27 03:24+0000\n" -"PO-Revision-Date: 2009-09-05 09:45+0100\n" +"POT-Creation-Date: 2010-02-26 03:24+0000\n" +"PO-Revision-Date: 2010-03-02 22:05+0100\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" "MIME-Version: 1.0\n" @@ -18,6 +18,940 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../cli/src/connections.c:86 +#, c-format +msgid "" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout ]\n" +" down id | uuid \n" +msgstr "" +"Användning: nmcli con { KOMMANDO | help }\n" +" KOMMANDO := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | användare]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout ]\n" +" down id | uuid \n" + +#: ../cli/src/connections.c:158 +#| msgid "_VPN Connections" +msgid "Connections" +msgstr "Anslutningar" + +#: ../cli/src/connections.c:158 +#: ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 +#: ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 +#: ../cli/src/connections.c:207 +#: ../cli/src/devices.c:298 +#: ../cli/src/devices.c:458 +#: ../cli/src/devices.c:460 +msgid "Type" +msgstr "Typ" + +#: ../cli/src/connections.c:158 +#: ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 +#: ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 +#: ../cli/src/connections.c:207 +#: ../cli/src/connections.c:297 +#: ../cli/src/connections.c:299 +msgid "UUID" +msgstr "UUID" + +#: ../cli/src/connections.c:158 +#: ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 +#: ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 +#: ../cli/src/connections.c:207 +#: ../cli/src/connections.c:297 +#: ../cli/src/connections.c:299 +msgid "Name" +msgstr "Namn" + +#: ../cli/src/connections.c:163 +#, c-format +#| msgid "Modify system connections" +msgid "System connections:\n" +msgstr "Systemanslutningar:\n" + +#: ../cli/src/connections.c:167 +#, c-format +#| msgid "No network connection" +msgid "User connections:\n" +msgstr "Användaranslutningar:\n" + +#: ../cli/src/connections.c:178 +#: ../cli/src/connections.c:967 +#: ../cli/src/connections.c:983 +#: ../cli/src/connections.c:992 +#: ../cli/src/connections.c:1003 +#: ../cli/src/connections.c:1085 +#: ../cli/src/devices.c:604 +#: ../cli/src/devices.c:614 +#: ../cli/src/devices.c:699 +#: ../cli/src/devices.c:785 +#: ../cli/src/devices.c:792 +#, c-format +msgid "Error: %s argument is missing." +msgstr "Fel: %s-argument saknas." + +#: ../cli/src/connections.c:189 +#, c-format +msgid "Error: %s - no such connection." +msgstr "Fel: %s - ingen sådan anslutning." + +#: ../cli/src/connections.c:196 +#| msgid "Modify system connections" +msgid "System-wide connections" +msgstr "Systemanslutningar" + +#: ../cli/src/connections.c:205 +#| msgid "No network connection" +msgid "User connections" +msgstr "Användaranslutningar" + +#: ../cli/src/connections.c:212 +#: ../cli/src/connections.c:1016 +#: ../cli/src/connections.c:1103 +#: ../cli/src/devices.c:446 +#: ../cli/src/devices.c:494 +#: ../cli/src/devices.c:628 +#: ../cli/src/devices.c:706 +#: ../cli/src/devices.c:798 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "Okänd parameter: %s\n" + +#: ../cli/src/connections.c:221 +#, c-format +msgid "Error: no valid parameter specified." +msgstr "Fel: ingen giltig parameter angiven." + +#. FIXME: Fix the output +#: ../cli/src/connections.c:268 +#: ../cli/src/devices.c:302 +#: ../cli/src/devices.c:321 +#: ../cli/src/devices.c:353 +#: ../cli/src/devices.c:355 +#: ../cli/src/devices.c:357 +#: ../cli/src/devices.c:359 +#: ../cli/src/devices.c:361 +msgid "yes" +msgstr "ja" + +#: ../cli/src/connections.c:268 +#: ../cli/src/devices.c:304 +msgid "no" +msgstr "nej" + +#: ../cli/src/connections.c:297 +#| msgid "Modify system connections" +msgid "Active connections" +msgstr "Aktiva anslutningar" + +#: ../cli/src/connections.c:297 +#: ../cli/src/connections.c:299 +#: ../cli/src/devices.c:302 +#: ../cli/src/devices.c:304 +msgid "Default" +msgstr "Standard" + +#: ../cli/src/connections.c:297 +#: ../cli/src/connections.c:299 +msgid "Service" +msgstr "Tjänst" + +#: ../cli/src/connections.c:297 +#: ../cli/src/connections.c:299 +msgid "Devices" +msgstr "Enheter" + +#: ../cli/src/connections.c:659 +#, c-format +#| msgid "VPN connection to '%s'" +msgid "no active connection on device '%s'" +msgstr "ingen aktiv anslutning på enheten \"%s\"" + +#: ../cli/src/connections.c:667 +#, c-format +msgid "no active connection or device" +msgstr "ingen aktiv anslutning eller enhet" + +#: ../cli/src/connections.c:730 +msgid "activating" +msgstr "aktiverar" + +#: ../cli/src/connections.c:732 +msgid "activated" +msgstr "aktiverad" + +#: ../cli/src/connections.c:735 +#: ../cli/src/connections.c:758 +#: ../cli/src/connections.c:791 +#: ../cli/src/devices.c:111 +#: ../cli/src/network-manager.c:76 +#: ../cli/src/network-manager.c:98 +#| msgid "(unknown)" +msgid "unknown" +msgstr "okänt" + +#: ../cli/src/connections.c:744 +#| msgid "VPN connecting to '%s'" +msgid "VPN connecting (prepare)" +msgstr "VPN ansluter (förbereder)" + +#: ../cli/src/connections.c:746 +msgid "VPN connecting (need authentication)" +msgstr "VPN ansluter (behöver autentisering)" + +#: ../cli/src/connections.c:748 +#| msgid "_VPN Connections" +msgid "VPN connecting" +msgstr "VPN ansluter" + +#: ../cli/src/connections.c:750 +msgid "VPN connecting (getting IP configuration)" +msgstr "VPN ansluter (hämtar IP-konfiguration)" + +#: ../cli/src/connections.c:752 +#| msgid "_VPN Connections" +msgid "VPN connected" +msgstr "VPN ansluten" + +#: ../cli/src/connections.c:754 +#| msgid "VPN Connect Failure" +msgid "VPN connection failed" +msgstr "VPN-anslutning misslyckades" + +#: ../cli/src/connections.c:756 +#| msgid "VPN Connect Failure" +msgid "VPN disconnected" +msgstr "VPN frånkopplad" + +#: ../cli/src/connections.c:767 +#| msgid "(unknown)" +msgid "unknown reason" +msgstr "okänd anledning" + +#: ../cli/src/connections.c:769 +#| msgid "None" +msgid "none" +msgstr "ingen" + +#: ../cli/src/connections.c:771 +msgid "the user was disconnected" +msgstr "användaren kopplades från" + +#: ../cli/src/connections.c:773 +msgid "the base network connection was interrupted" +msgstr "basnätverksanslutningen avbröts" + +#: ../cli/src/connections.c:775 +msgid "the VPN service stopped unexpectedly" +msgstr "VPN-tjänsten stoppades oväntat" + +#: ../cli/src/connections.c:777 +msgid "the VPN service returned invalid configuration" +msgstr "VPN-tjänsten returnerade en ogiltig konfiguration" + +#: ../cli/src/connections.c:779 +msgid "the connection attempt timed out" +msgstr "anslutningsförsöket översteg tidsgränsen" + +#: ../cli/src/connections.c:781 +msgid "the VPN service did not start in time" +msgstr "VPN-tjänsten startade inte i tid" + +#: ../cli/src/connections.c:783 +msgid "the VPN service failed to start" +msgstr "VPN-tjänsten misslyckades med att starta" + +#: ../cli/src/connections.c:785 +msgid "no valid VPN secrets" +msgstr "inga giltiga VPN-hemligheter" + +#: ../cli/src/connections.c:787 +msgid "invalid VPN secrets" +msgstr "ogiltiga VPN-hemligheter" + +#: ../cli/src/connections.c:789 +msgid "the connection was removed" +msgstr "anslutningen togs bort" + +#: ../cli/src/connections.c:803 +#, c-format +msgid "state: %s\n" +msgstr "tillstånd: %s\n" + +#: ../cli/src/connections.c:806 +#: ../cli/src/connections.c:832 +#, c-format +#| msgid "Connection _Information" +msgid "Connection activated\n" +msgstr "Anslutning aktiverad\n" + +#: ../cli/src/connections.c:809 +#, c-format +#| msgid "Connection to the wired network failed." +msgid "Error: Connection activation failed." +msgstr "Fel: Aktivering av anslutning misslyckades." + +#: ../cli/src/connections.c:828 +#, c-format +msgid "state: %s (%d)\n" +msgstr "tillstånd: %s (%d)\n" + +#: ../cli/src/connections.c:838 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "Fel: Aktivering av anslutning misslyckades: %s." + +#: ../cli/src/connections.c:855 +#: ../cli/src/devices.c:551 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "Fel: Tidsgränsen %d sekunder gick ut." + +#: ../cli/src/connections.c:898 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "Fel: Aktivering av anslutning misslyckades: %s" + +#: ../cli/src/connections.c:912 +#, c-format +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "Fel: Hämtning av aktiv anslutning för \"%s\" misslyckades." + +#: ../cli/src/connections.c:921 +#, c-format +#| msgid "VPN connection to '%s'" +msgid "Active connection state: %s\n" +msgstr "Tillstånd för aktiv anslutning: %s\n" + +#: ../cli/src/connections.c:922 +#, c-format +#| msgid "VPN connection to '%s'" +msgid "Active connection path: %s\n" +msgstr "Sökväg för aktiv anslutning: %s\n" + +#: ../cli/src/connections.c:976 +#: ../cli/src/connections.c:1094 +#, c-format +msgid "Error: Unknown connection: %s." +msgstr "Fel: Okänd anslutning: %s." + +#: ../cli/src/connections.c:1011 +#: ../cli/src/devices.c:622 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "Fel: värdet \"%s\" för tidsgränsen är inte giltigt." + +#: ../cli/src/connections.c:1024 +#: ../cli/src/connections.c:1111 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "Fel: id eller uuid måste anges." + +#: ../cli/src/connections.c:1044 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "Fel: Ingen lämplig enhet hittades: %s." + +#: ../cli/src/connections.c:1046 +#, c-format +msgid "Error: No suitable device found." +msgstr "Fel: Ingen lämplig enhet hittades." + +#: ../cli/src/connections.c:1138 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "Varning: Anslutningen är inte aktiv\n" + +#: ../cli/src/connections.c:1189 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "Fel: \"con\"-kommandot \"%s\" är inte giltigt." + +#: ../cli/src/connections.c:1216 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "Fel: kunde inte ansluta till D-Bus." + +#: ../cli/src/connections.c:1223 +#, c-format +msgid "Error: Could not get system settings." +msgstr "Fel: Kunde inte få systeminställningar." + +#: ../cli/src/connections.c:1231 +#, c-format +msgid "Error: Could not get user settings." +msgstr "Fel: Kunde inte få användarinställningar." + +#: ../cli/src/connections.c:1241 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "Fel: Kan inte få anslutningar: inställningstjänster är inte igång." + +#: ../cli/src/devices.c:73 +#, c-format +msgid "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] | apinfo iface hwaddr ]\n" +"\n" +msgstr "" +"Användning: nmcli dev { KOMMANDO | help }\n" +"\n" +" KOMMANDO := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] | apinfo iface hwaddr ]\n" +"\n" + +#: ../cli/src/devices.c:93 +msgid "unmanaged" +msgstr "ohanterad" + +#: ../cli/src/devices.c:95 +msgid "unavailable" +msgstr "otillgänglig" + +#: ../cli/src/devices.c:97 +#: ../cli/src/network-manager.c:73 +#| msgid "_Disconnect VPN..." +msgid "disconnected" +msgstr "frånkopplad" + +#: ../cli/src/devices.c:99 +msgid "connecting (prepare)" +msgstr "ansluter (förbereder)" + +#: ../cli/src/devices.c:101 +msgid "connecting (configuring)" +msgstr "ansluter (konfigurerar)" + +#: ../cli/src/devices.c:103 +msgid "connecting (need authentication)" +msgstr "ansluter (behöver autentisering)" + +#: ../cli/src/devices.c:105 +#| msgid "Connection _Information" +msgid "connecting (getting IP configuration)" +msgstr "ansluter (hämtar IP-konfiguration)" + +#: ../cli/src/devices.c:107 +#: ../cli/src/network-manager.c:71 +msgid "connected" +msgstr "ansluten" + +#: ../cli/src/devices.c:109 +#| msgid "Connection _Information" +msgid "connection failed" +msgstr "anslutningen misslyckades" + +#: ../cli/src/devices.c:132 +#: ../cli/src/devices.c:876 +msgid "Unknown" +msgstr "Okänt" + +#. print them +#: ../cli/src/devices.c:164 +#: ../cli/src/devices.c:266 +#: ../cli/src/devices.c:861 +#: ../cli/src/devices.c:879 +#| msgid "(unknown)" +msgid "(none)" +msgstr "(ingen)" + +#: ../cli/src/devices.c:209 +#, c-format +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s: fel vid konvertering av IP4-adress 0x%X" + +#: ../cli/src/devices.c:238 +#, c-format +msgid "%s, %s, Freq %d MHz, Rate %d Mb/s, Strength %d" +msgstr "%s, %s, Frekv %d MHz, Hast %d Mb/s, Styrka %d" + +#: ../cli/src/devices.c:239 +msgid "Ad-Hoc" +msgstr "Ad-Hoc" + +#: ../cli/src/devices.c:248 +msgid ", Encrypted: " +msgstr ", Krypterad: " + +#: ../cli/src/devices.c:253 +msgid " WEP" +msgstr " WEP" + +#: ../cli/src/devices.c:255 +msgid " WPA" +msgstr " WPA" + +#: ../cli/src/devices.c:257 +msgid " WPA2" +msgstr " WPA2" + +#: ../cli/src/devices.c:260 +msgid " Enterprise" +msgstr " Enterprise" + +#: ../cli/src/devices.c:294 +#: ../cli/src/devices.c:458 +#: ../cli/src/devices.c:460 +msgid "Device" +msgstr "Enhet" + +#: ../cli/src/devices.c:299 +msgid "Driver" +msgstr "Drivrutin" + +#: ../cli/src/devices.c:299 +#: ../cli/src/devices.c:567 +msgid "(unknown)" +msgstr "(okänt)" + +#: ../cli/src/devices.c:300 +#: ../cli/src/devices.c:458 +#: ../cli/src/devices.c:460 +msgid "State" +msgstr "Tillstånd" + +#: ../cli/src/devices.c:313 +msgid "HW Address" +msgstr "Hårdvaruadress" + +#: ../cli/src/devices.c:319 +#, c-format +msgid "" +"\n" +" Capabilities:\n" +msgstr "" +"\n" +" Förmågor:\n" + +#: ../cli/src/devices.c:321 +msgid "Carrier Detect" +msgstr "Bärardetektering" + +#: ../cli/src/devices.c:336 +#, c-format +#| msgid "%d Mb/s" +msgid "%u Mb/s" +msgstr "%u Mb/s" + +#: ../cli/src/devices.c:337 +msgid "Speed" +msgstr "Hastighet" + +#: ../cli/src/devices.c:348 +#, c-format +msgid "" +"\n" +" Wireless Properties\n" +msgstr "" +"\n" +" Trådlösa egenskaper\n" + +#: ../cli/src/devices.c:353 +msgid "WEP Encryption" +msgstr "WEP-kryptering" + +#: ../cli/src/devices.c:355 +msgid "WPA Encryption" +msgstr "WPA-kryptering" + +#: ../cli/src/devices.c:357 +msgid "WPA2 Encryption" +msgstr "WPA2-kryptering" + +#: ../cli/src/devices.c:359 +msgid "TKIP cipher" +msgstr "TKIP-chiffer" + +#: ../cli/src/devices.c:361 +msgid "CCMP cipher" +msgstr "CCMP-chiffer" + +#: ../cli/src/devices.c:368 +#, c-format +msgid "" +"\n" +" Wireless Access Points %s\n" +msgstr "" +"\n" +" Trådlösa accesspunkter %s\n" + +#: ../cli/src/devices.c:368 +msgid "(* = current AP)" +msgstr "(* = aktuell AP)" + +#: ../cli/src/devices.c:374 +#, c-format +msgid "" +"\n" +" Wired Properties\n" +msgstr "" +"\n" +" Trådbundna egenskaper\n" + +#: ../cli/src/devices.c:377 +#: ../cli/src/devices.c:379 +msgid "Carrier" +msgstr "Bärare" + +#: ../cli/src/devices.c:377 +#| msgid "None" +msgid "on" +msgstr "på" + +#: ../cli/src/devices.c:379 +msgid "off" +msgstr "av" + +#: ../cli/src/devices.c:387 +#, c-format +msgid "" +"\n" +" IPv4 Settings:\n" +msgstr "" +"\n" +" IPv4-inställningar:\n" + +#: ../cli/src/devices.c:395 +msgid "Address" +msgstr "Adress" + +#: ../cli/src/devices.c:401 +msgid "Prefix" +msgstr "Prefix" + +#: ../cli/src/devices.c:405 +msgid "Gateway" +msgstr "Gateway" + +#: ../cli/src/devices.c:416 +msgid "DNS" +msgstr "DNS" + +#: ../cli/src/devices.c:458 +msgid "Status of devices" +msgstr "Status för enheter" + +#: ../cli/src/devices.c:487 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "Fel: \"%s\"-argument saknas." + +#: ../cli/src/devices.c:516 +#: ../cli/src/devices.c:655 +#: ../cli/src/devices.c:729 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "Fel: Enheten \"%s\" hittades inte." + +#: ../cli/src/devices.c:539 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "Lyckades: Enheten \"%s\" kopplades från." + +#: ../cli/src/devices.c:564 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "Fel: Frånkoppling av enheten \"%s\" (%s) misslyckades: %s" + +#: ../cli/src/devices.c:572 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "Enhetstillstånd: %d (%s)\n" + +#: ../cli/src/devices.c:636 +#, c-format +msgid "Error: iface has to be specified." +msgstr "Fel: gränssnitt (iface) måste anges." + +#: ../cli/src/devices.c:736 +#: ../cli/src/devices.c:746 +msgid "WiFi scan list" +msgstr "WiFi-avsökningslista" + +#: ../cli/src/devices.c:740 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "Fel: Enheten \"%s\" är inte en WiFi-enhet." + +#: ../cli/src/devices.c:754 +msgid "Device:" +msgstr "Enhet:" + +#: ../cli/src/devices.c:806 +#, c-format +msgid "Error: hwaddr has to be specified." +msgstr "Fel: hwaddr måste anges." + +#: ../cli/src/devices.c:844 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "Fel: Accesspunkt med hwaddr \"%s\" hittades inte." + +#: ../cli/src/devices.c:862 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" + +#: ../cli/src/devices.c:863 +#, c-format +#| msgid "%d Mb/s" +msgid "%u MB/s" +msgstr "%u MB/s" + +#: ../cli/src/devices.c:869 +#: ../cli/src/devices.c:871 +msgid "AP parameters" +msgstr "AP-parametrar" + +#: ../cli/src/devices.c:873 +msgid "SSID:" +msgstr "SSID:" + +#: ../cli/src/devices.c:874 +msgid "BSSID:" +msgstr "BSSID:" + +#: ../cli/src/devices.c:875 +msgid "Frequency:" +msgstr "Frekvens:" + +#: ../cli/src/devices.c:876 +msgid "Mode:" +msgstr "Läge:" + +#: ../cli/src/devices.c:876 +msgid "Ad-hoc" +msgstr "Ad-hoc" + +#: ../cli/src/devices.c:876 +msgid "Infrastructure" +msgstr "Infrastruktur" + +#: ../cli/src/devices.c:877 +msgid "Maximal bitrate:" +msgstr "Maximal bitfrekvens:" + +#: ../cli/src/devices.c:878 +msgid "Strength:" +msgstr "Styrka:" + +#: ../cli/src/devices.c:879 +msgid "Flags:" +msgstr "Flaggor:" + +#: ../cli/src/devices.c:879 +msgid "privacy" +msgstr "integritet" + +#: ../cli/src/devices.c:880 +msgid "WPA flags:" +msgstr "WPA-flaggor:" + +#: ../cli/src/devices.c:881 +msgid "RSN flags:" +msgstr "RSN-flaggor:" + +#: ../cli/src/devices.c:907 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "Fel: \"dev wifi\"-kommandot \"%s\" är inte giltigt." + +#: ../cli/src/devices.c:943 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "Fel: \"dev\"-kommandot \"%s\" är inte giltigt." + +#: ../cli/src/network-manager.c:46 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" +msgstr "" +"Användning: nmcli nm { KOMMANDO | help }\n" +"\n" +" KOMMANDO := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + +#: ../cli/src/network-manager.c:67 +msgid "asleep" +msgstr "sover" + +#: ../cli/src/network-manager.c:69 +#| msgid "VPN connecting to '%s'" +msgid "connecting" +msgstr "ansluter" + +#: ../cli/src/network-manager.c:93 +#: ../cli/src/network-manager.c:94 +#: ../cli/src/network-manager.c:95 +#: ../cli/src/network-manager.c:96 +#: ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:160 +msgid "enabled" +msgstr "aktiverad" + +#: ../cli/src/network-manager.c:93 +#: ../cli/src/network-manager.c:94 +#: ../cli/src/network-manager.c:95 +#: ../cli/src/network-manager.c:96 +#: ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:160 +msgid "disabled" +msgstr "inaktiverad" + +#: ../cli/src/network-manager.c:102 +#| msgid "NetworkManager Applet" +msgid "NetworkManager status" +msgstr "Status för Nätverkshanterare" + +#: ../cli/src/network-manager.c:104 +msgid "NM running:" +msgstr "NM kör:" + +#: ../cli/src/network-manager.c:104 +msgid "running" +msgstr "kör" + +#: ../cli/src/network-manager.c:104 +msgid "not running" +msgstr "kör inte" + +#: ../cli/src/network-manager.c:105 +msgid "NM state:" +msgstr "NM tillstånd:" + +#: ../cli/src/network-manager.c:106 +msgid "NM wireless hardware:" +msgstr "NM trådlös hårdvara:" + +#. no argument, show current state +#: ../cli/src/network-manager.c:107 +#: ../cli/src/network-manager.c:143 +msgid "NM wireless:" +msgstr "NM trådlös:" + +#: ../cli/src/network-manager.c:108 +msgid "NM WWAN hardware:" +msgstr "NM WWAN hårdvara:" + +#. no argument, show current state +#: ../cli/src/network-manager.c:109 +#: ../cli/src/network-manager.c:160 +msgid "NM WWAN:" +msgstr "NM WWAN:" + +#: ../cli/src/network-manager.c:150 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "Fel: ogiltig \"wifi\"-parameter: \"%s\"." + +#: ../cli/src/network-manager.c:167 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "Fel: ogiltig \"wwan\"-parameter: \"%s\"." + +#: ../cli/src/network-manager.c:178 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "Fel: \"nm\"-kommandot \"%s\" är inte giltigt." + +#: ../cli/src/nmcli.c:65 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"Användning: %s [FLAGGOR] OBJEKT { KOMMANDO | help }\n" +"\n" +"FLAGGOR\n" +" -t[erse] kort utdata\n" +" -p[retty] vackert utdata\n" +" -v[ersion] visa programversion\n" +" -h[elp] skriv ut denna hjälp\n" +"\n" +"OBJEKT\n" +" nm status för Nätverkshanterare\n" +" con anslutningar i Nätverkshanterare\n" +" dev enheter hanterade av Nätverkshanterare\n" +"\n" + +#: ../cli/src/nmcli.c:106 +#, c-format +msgid "Object '%s' is unknown, try 'nmcli help'." +msgstr "Objektet \"%s\" är okänt, prova \"nmcli help\"." + +#: ../cli/src/nmcli.c:139 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "nmcli-verktyg, version %s\n" + +#: ../cli/src/nmcli.c:145 +#, c-format +msgid "Option '%s' is unknown, try 'nmcli -help'." +msgstr "Flagan \"%s\" är okänd, prova \"nmcli -help\"." + +#: ../cli/src/nmcli.c:164 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "Fångade signal %d, stänger av..." + +#: ../cli/src/nmcli.c:189 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "Fel: Kunde inte ansluta till Nätverkshanterare." + +#: ../cli/src/nmcli.c:205 +msgid "Success" +msgstr "Lyckades" + #: ../libnm-util/crypto.c:120 #, c-format msgid "PEM key file had no end tag '%s'." @@ -104,8 +1038,10 @@ msgid "IV contains non-hexadecimal digits." msgstr "IV innehåller icke-hexadecimala siffror." #: ../libnm-util/crypto.c:382 -#: ../libnm-util/crypto_gnutls.c:143 -#: ../libnm-util/crypto_nss.c:169 +#: ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 +#: ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:336 #, c-format msgid "Private key cipher '%s' was unknown." msgstr "Privata nyckelchiffret \"%s\" var okänt." @@ -125,73 +1061,115 @@ msgstr "Kunde inte bestämma typ av privat nyckel." msgid "Not enough memory to store decrypted private key." msgstr "Inte tillräckligt mycket minne för att lagra dekrypterad privat nyckel." -#: ../libnm-util/crypto_gnutls.c:46 +#: ../libnm-util/crypto_gnutls.c:49 msgid "Failed to initialize the crypto engine." msgstr "Misslyckades med att initiera krypteringsmotorn." -#: ../libnm-util/crypto_gnutls.c:90 +#: ../libnm-util/crypto_gnutls.c:93 #, c-format msgid "Failed to initialize the MD5 engine: %s / %s." msgstr "Misslyckades med att initiera MD5-motorn: %s / %s." -#: ../libnm-util/crypto_gnutls.c:152 -#: ../libnm-util/crypto_nss.c:178 +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "Ogiltig IV-längd (måste vara minst %zd)." + +#: ../libnm-util/crypto_gnutls.c:165 +#: ../libnm-util/crypto_nss.c:188 #, c-format msgid "Not enough memory for decrypted key buffer." msgstr "Inte tillräckligt mycket minne för buffert för dekrypterade nycklar." -#: ../libnm-util/crypto_gnutls.c:160 +#: ../libnm-util/crypto_gnutls.c:173 #, c-format msgid "Failed to initialize the decryption cipher context: %s / %s." msgstr "Misslyckades med att initiera chifferkontexten för dekryptering: %s / %s." -#: ../libnm-util/crypto_gnutls.c:169 +#: ../libnm-util/crypto_gnutls.c:182 #, c-format msgid "Failed to set symmetric key for decryption: %s / %s." msgstr "Misslyckades med att ställa in symmetrisk nyckel för dekryptering: %s / %s." -#: ../libnm-util/crypto_gnutls.c:178 +#: ../libnm-util/crypto_gnutls.c:191 #, c-format msgid "Failed to set IV for decryption: %s / %s." msgstr "Misslyckades med att ställa in IV för dekryptering: %s / %s." -#: ../libnm-util/crypto_gnutls.c:187 +#: ../libnm-util/crypto_gnutls.c:200 #, c-format msgid "Failed to decrypt the private key: %s / %s." msgstr "Misslyckades med att dekryptera den privata nyckeln: %s / %s." -#: ../libnm-util/crypto_gnutls.c:200 +#: ../libnm-util/crypto_gnutls.c:210 +#: ../libnm-util/crypto_nss.c:267 +#, c-format +#| msgid "Failed to decrypt the private key: %d." +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "Misslyckades med att dekryptera privata nyckeln: oväntad utfyllningslängd." + +#: ../libnm-util/crypto_gnutls.c:221 +#: ../libnm-util/crypto_nss.c:278 #, c-format msgid "Failed to decrypt the private key." msgstr "Misslyckades med att dekryptera privata nyckeln." -#: ../libnm-util/crypto_gnutls.c:235 +#: ../libnm-util/crypto_gnutls.c:286 +#: ../libnm-util/crypto_nss.c:356 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "Kunde inte allokera minne för kryptering." + +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +#| msgid "Failed to initialize the decryption cipher context: %s / %s." +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "Misslyckades med att initiera chifferkontexten för kryptering: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +#| msgid "Failed to set symmetric key for decryption: %s / %s." +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "Misslyckades med att ställa in symmetrisk nyckel för kryptering: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +#| msgid "Failed to set IV for decryption: %s / %s." +msgid "Failed to set IV for encryption: %s / %s." +msgstr "Misslyckades med att ställa in IV för kryptering: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +#| msgid "Failed to decrypt the private key: %s / %s." +msgid "Failed to encrypt the data: %s / %s." +msgstr "Misslyckades med att kryptera datat: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:362 #, c-format msgid "Error initializing certificate data: %s" msgstr "Fel vid initiering av certifikatdata: %s" -#: ../libnm-util/crypto_gnutls.c:257 +#: ../libnm-util/crypto_gnutls.c:384 #, c-format msgid "Couldn't decode certificate: %s" msgstr "Kunde inte avkoda certifikat: %s" -#: ../libnm-util/crypto_gnutls.c:281 +#: ../libnm-util/crypto_gnutls.c:408 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %s" msgstr "Kunde inte initiera PKCS#12-avkodare: %s" -#: ../libnm-util/crypto_gnutls.c:294 +#: ../libnm-util/crypto_gnutls.c:421 #, c-format msgid "Couldn't decode PKCS#12 file: %s" msgstr "Kunde inte avkoda PKCS#12-fil: %s" -#: ../libnm-util/crypto_gnutls.c:306 +#: ../libnm-util/crypto_gnutls.c:433 #, c-format msgid "Couldn't verify PKCS#12 file: %s" msgstr "Kunde inte verifiera PKCS#12-fil: %s" -#: ../libnm-util/crypto_nss.c:57 -#: ../system-settings/plugins/ifcfg-rh/crypto.c:52 +#: ../libnm-util/crypto_nss.c:56 #, c-format msgid "Failed to initialize the crypto engine: %d." msgstr "Misslyckades med att initiera krypteringsmotorn: %d." @@ -201,63 +1179,143 @@ msgstr "Misslyckades med att initiera krypteringsmotorn: %d." msgid "Failed to initialize the MD5 context: %d." msgstr "Misslyckades med att initiera MD5-kontexten: %d." -#: ../libnm-util/crypto_nss.c:186 +#: ../libnm-util/crypto_nss.c:179 +#, c-format +msgid "Invalid IV length (must be at least %d)." +msgstr "Ogiltig IV-längd (måste vara minst %d)." + +#: ../libnm-util/crypto_nss.c:196 #, c-format msgid "Failed to initialize the decryption cipher slot." msgstr "Misslyckades med att initiera dekrypteringschifferplatsen." -#: ../libnm-util/crypto_nss.c:196 +#: ../libnm-util/crypto_nss.c:206 #, c-format msgid "Failed to set symmetric key for decryption." msgstr "Misslyckades med att ställa in symmetrisk nyckel för dekryptering." -#: ../libnm-util/crypto_nss.c:206 +#: ../libnm-util/crypto_nss.c:216 #, c-format msgid "Failed to set IV for decryption." msgstr "Misslyckades med att ställa in IV för dekryptering." -#: ../libnm-util/crypto_nss.c:214 +#: ../libnm-util/crypto_nss.c:224 #, c-format msgid "Failed to initialize the decryption context." msgstr "Misslyckades med att initiera dekrypteringskontexten." -#: ../libnm-util/crypto_nss.c:227 +#: ../libnm-util/crypto_nss.c:237 #, c-format msgid "Failed to decrypt the private key: %d." msgstr "Misslyckades med att dekryptera privata nyckeln: %d." -#: ../libnm-util/crypto_nss.c:239 +#: ../libnm-util/crypto_nss.c:245 +#, c-format +#| msgid "Failed to decrypt the private key: %d." +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "Misslyckades med att dekryptera privata nyckeln: dekrypterat data är för stort." + +#: ../libnm-util/crypto_nss.c:256 #, c-format msgid "Failed to finalize decryption of the private key: %d." msgstr "Misslyckades med att färdigställa dekryptering av den privata nyckeln: %d." -#: ../libnm-util/crypto_nss.c:284 +#: ../libnm-util/crypto_nss.c:364 +#, c-format +#| msgid "Failed to initialize the decryption cipher slot." +msgid "Failed to initialize the encryption cipher slot." +msgstr "Misslyckades med att initiera krypteringschifferplatsen." + +#: ../libnm-util/crypto_nss.c:372 +#, c-format +#| msgid "Failed to set symmetric key for decryption." +msgid "Failed to set symmetric key for encryption." +msgstr "Misslyckades med att ställa in symmetrisk nyckel för kryptering." + +#: ../libnm-util/crypto_nss.c:380 +#, c-format +#| msgid "Failed to set IV for decryption." +msgid "Failed to set IV for encryption." +msgstr "Misslyckades med att ställa in IV för kryptering." + +#: ../libnm-util/crypto_nss.c:388 +#, c-format +#| msgid "Failed to initialize the decryption context." +msgid "Failed to initialize the encryption context." +msgstr "Misslyckades med att initiera krypteringskontexten." + +#: ../libnm-util/crypto_nss.c:396 +#, c-format +#| msgid "Failed to decrypt the private key: %d." +msgid "Failed to encrypt: %d." +msgstr "Misslyckades med att kryptera: %d." + +#: ../libnm-util/crypto_nss.c:404 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "Oväntad mängd data efter kryptering." + +#: ../libnm-util/crypto_nss.c:447 #, c-format msgid "Couldn't decode certificate: %d" msgstr "Kunde inte avkoda certifikat: %d" -#: ../libnm-util/crypto_nss.c:319 +#: ../libnm-util/crypto_nss.c:482 #, c-format msgid "Couldn't convert password to UCS2: %d" msgstr "Kunde inte konvertera lösenord till UCS2: %d" -#: ../libnm-util/crypto_nss.c:347 +#: ../libnm-util/crypto_nss.c:510 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %d" msgstr "Kunde inte initiera PKCS#12-avkodare: %d" -#: ../libnm-util/crypto_nss.c:356 +#: ../libnm-util/crypto_nss.c:519 #, c-format msgid "Couldn't decode PKCS#12 file: %d" msgstr "Kunde inte avkoda PKCS#12-fil: %d" -#: ../libnm-util/crypto_nss.c:365 +#: ../libnm-util/crypto_nss.c:528 #, c-format msgid "Couldn't verify PKCS#12 file: %d" msgstr "Kunde inte verifiera PKCS#12-fil: %d" +#: ../libnm-util/crypto_nss.c:557 +#| msgid "Could not decode private key." +msgid "Could not generate random data." +msgstr "Kunde inte generera slumpmässigt data." + +#: ../libnm-util/nm-utils.c:1545 +#, c-format +#| msgid "Not enough memory to create private key decryption key." +msgid "Not enough memory to make encryption key." +msgstr "Inte tillräckligt mycket minne för att skapa krypteringsnyckel." + +#: ../libnm-util/nm-utils.c:1655 +#| msgid "Not enough memory to store PEM file data." +msgid "Could not allocate memory for PEM file creation." +msgstr "Kunde inte allokera minne för att skapa PEM-fil." + +#: ../libnm-util/nm-utils.c:1667 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "Kunde inte allokera minne för skrivning av IV till PEM-fil." + +#: ../libnm-util/nm-utils.c:1679 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "Kunde inte allokera minne för skrivning av krypterad nyckel till PEM-fil." + +#: ../libnm-util/nm-utils.c:1698 +#, c-format +#| msgid "Not enough memory to store PEM file data." +msgid "Could not allocate memory for PEM file data." +msgstr "Kunde inte allokera minne för PEM-fildata." + #: ../src/nm-netlink-monitor.c:194 #: ../src/nm-netlink-monitor.c:464 +#: ../src/nm-netlink-monitor.c:582 +#: ../src/ip6-manager/nm-netlink-listener.c:352 #, c-format msgid "error processing netlink message: %s" msgstr "fel vid behandling av netlink-meddelande: %s" @@ -283,19 +1341,26 @@ msgid "unable to allocate netlink link cache for monitoring link status: %s" msgstr "kan inte allokera netlink-länkcache för övervakning av länkstatus: %s" #: ../src/nm-netlink-monitor.c:494 +#: ../src/ip6-manager/nm-netlink-listener.c:382 msgid "error occurred while waiting for data on socket" msgstr "fel inträffade vid väntan på data i uttaget" -#: ../src/NetworkManager.c:330 +#: ../src/nm-netlink-monitor.c:558 +#: ../src/nm-netlink-monitor.c:571 +#, c-format +msgid "error updating link cache: %s" +msgstr "fel vid uppdatering av länkcache: %s" + +#: ../src/NetworkManager.c:494 #, c-format msgid "Invalid option. Please use --help to see a list of valid options.\n" msgstr "Ogiltig flagga. Använd --help för att se en lista över giltiga flaggor.\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:304 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:300 msgid "# Created by NetworkManager\n" msgstr "# Skapad av Nätverkshanterare\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:310 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:316 #, c-format msgid "" "# Merged from %s\n" @@ -304,6 +1369,24 @@ msgstr "" "# Sammanfogad från %s\n" "\n" +#: ../src/ip6-manager/nm-netlink-listener.c:200 +#, c-format +#| msgid "unable to allocate netlink handle for monitoring link status: %s" +msgid "unable to allocate netlink handle: %s" +msgstr "kan inte allokera netlink-handtag: %s" + +#: ../src/ip6-manager/nm-netlink-listener.c:210 +#, c-format +#| msgid "unable to connect to netlink for monitoring link status: %s" +msgid "unable to connect to netlink: %s" +msgstr "kan inte ansluta till netlink: %s" + +#: ../src/ip6-manager/nm-netlink-listener.c:307 +#, c-format +#| msgid "unable to join netlink group for monitoring link status: %s" +msgid "unable to join netlink group: %s" +msgstr "kan inte gå med i netlink-grupp: %s" + #: ../src/named-manager/nm-named-manager.c:315 msgid "NOTE: the libc resolver may not support more than 3 nameservers." msgstr "OBSERVERA: uppslag via glibc kanske inte har stöd för fler än 3 namnservrar." @@ -312,13 +1395,12 @@ msgstr "OBSERVERA: uppslag via glibc kanske inte har stöd för fler än 3 namns msgid "The nameservers listed below may not be recognized." msgstr "Namnservrarna listade nedan kanske inte kommer att kännas igen." -#: ../src/system-settings/nm-default-wired-connection.c:194 +#: ../src/system-settings/nm-default-wired-connection.c:157 #, c-format msgid "Auto %s" msgstr "Automatisk %s" -#: ../system-settings/plugins/ifcfg-rh/reader.c:2446 -#| msgid "Open System" +#: ../system-settings/plugins/ifcfg-rh/reader.c:3213 msgid "System" msgstr "System" @@ -335,7 +1417,6 @@ msgid "Modify persistent system hostname" msgstr "Ändra bestående värdnamn för systemet" #: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 -#| msgid "No active connections!" msgid "Modify system connections" msgstr "Ändra systemanslutningar" @@ -355,12 +1436,6 @@ msgstr "Systemets policy förhindrar delning av anslutningar via ett skyddat tr msgid "System policy prevents sharing connections via an open WiFi network" msgstr "Systemets policy förhindrar delning av anslutningar via ett öppet trådlöst nätverk" -#~ msgid "error updating link cache: %s" -#~ msgstr "fel vid uppdatering av länkcache: %s" -#~ msgid "Not enough memory to create private key decryption key." -#~ msgstr "" -#~ "Inte tillräckligt mycket minne för att skapa dekrypteringsnyckel för " -#~ "privat nyckel." #~ msgid "operation took too long" #~ msgstr "åtgärden tog för lång tid" #~ msgid "received data from wrong type of sender" @@ -373,22 +1448,14 @@ msgstr "Systemets policy förhindrar delning av anslutningar via ett öppet trå #~ msgstr "Lösenfras för det trådlösa nätverket %s" #~ msgid "Connection to the wireless network '%s' failed." #~ msgstr "Anslutning till det trådlösa nätverket \"%s\" misslyckades." -#~ msgid "Connection to the wired network failed." -#~ msgstr "Anslutning till det trådburna nätverket misslyckades." #~ msgid "Error displaying connection information:" #~ msgstr "Fel vid visning av anslutningsinformation:" #~ msgid "Could not find some required resources (the glade file)!" #~ msgstr "Kunde inte hitta en del nödvändiga resurser (glade-filen)!" -#~ msgid "%d Mb/s" -#~ msgstr "%d Mb/s" #~ msgid "Wired Ethernet (%s)" #~ msgstr "Trådbundet Ethernet (%s)" #~ msgid "Wireless Ethernet (%s)" #~ msgstr "Trådlöst Ethernet (%s)" -#~ msgid "Unknown" -#~ msgstr "Okänt" -#~ msgid "NetworkManager Applet" -#~ msgstr "Panelprogram för nätverkshantering" #~ msgid "" #~ "Copyright © 2004-2006 Red Hat, Inc.\n" #~ "Copyright © 2005-2006 Novell, Inc." @@ -427,8 +1494,6 @@ msgstr "Systemets policy förhindrar delning av anslutningar via ett öppet trå #~ msgstr "" #~ "Kunde inte starta VPN-anslutningen \"%s\" på grund av ett fel vid start " #~ "av VPN-programmet." -#~ msgid "VPN Connect Failure" -#~ msgstr "VPN-anslutningsfel" #~ msgid "Could not start the VPN connection '%s' due to a connection error." #~ msgstr "" #~ "Kunde inte starta VPN-anslutningen \"%s\" på grund av ett anslutningsfel." @@ -454,8 +1519,6 @@ msgstr "Systemets policy förhindrar delning av anslutningar via ett öppet trå #~ msgstr "Nätverksenheten \"%s (%s)\" stöder inte trådlös genomsökning." #~ msgid "The network device \"%s (%s)\" does not support link detection." #~ msgstr "Nätverksenheten \"%s (%s)\" stöder inte länkdetektering." -#~ msgid "(unknown)" -#~ msgstr "(okänt)" #~ msgid "Preparing device %s for the wired network..." #~ msgstr "Förbereder enheten %s för det trådbundna nätverket..." #~ msgid "Preparing device %s for the wireless network '%s'..." @@ -478,28 +1541,18 @@ msgstr "Systemets policy förhindrar delning av anslutningar via ett öppet trå #~ msgstr "Nätverkshanteraren är inte igång" #~ msgid "Networking disabled" #~ msgstr "Nätverk inaktiverat" -#~ msgid "No network connection" -#~ msgstr "Ingen nätverksanslutning" #~ msgid "Wired network connection" #~ msgstr "Trådbunden nätverksanslutning" #~ msgid "Connected to an Ad-Hoc wireless network" #~ msgstr "Ansluten till ett trådlöst ad hoc-nätverk" #~ msgid "Wireless network connection to '%s' (%d%%)" #~ msgstr "Trådlös nätverksanslutning till \"%s\" (%d%%)" -#~ msgid "VPN connection to '%s'" -#~ msgstr "VPN-anslutning till \"%s\"" -#~ msgid "VPN connecting to '%s'" -#~ msgstr "VPN-ansluter till \"%s\"" #~ msgid "_Connect to Other Wireless Network..." #~ msgstr "_Anslut till annat trådlöst nätverk..." #~ msgid "Create _New Wireless Network..." #~ msgstr "Skapa _nytt trådlöst nätverk..." -#~ msgid "_VPN Connections" -#~ msgstr "_VPN-anslutningar" #~ msgid "_Configure VPN..." #~ msgstr "_Konfigurera VPN..." -#~ msgid "_Disconnect VPN..." -#~ msgstr "Koppla _från VPN..." #~ msgid "_Dial Up Connections" #~ msgstr "_Uppringda anslutningar" #~ msgid "Connect to %s..." @@ -514,8 +1567,6 @@ msgstr "Systemets policy förhindrar delning av anslutningar via ett öppet trå #~ msgstr "Aktivera _nätverk" #~ msgid "Enable _Wireless" #~ msgstr "Aktivera _trådlöst" -#~ msgid "Connection _Information" -#~ msgstr "Anslutnings_information" #~ msgid "_Help" #~ msgstr "_Hjälp" #~ msgid "_About" @@ -536,8 +1587,6 @@ msgstr "Systemets policy förhindrar delning av anslutningar via ett öppet trå #~ msgstr "TKIP" #~ msgid "Dynamic WEP" #~ msgstr "Dynamisk WEP" -#~ msgid "None" -#~ msgstr "Ingen" #~ msgid "WEP 64/128-bit ASCII" #~ msgstr "WEP 64/128-bitars ASCII" #~ msgid "WEP 64/128-bit Hex" diff --git a/po/te.po b/po/te.po index 5dd39f9965..54c6fed65e 100644 --- a/po/te.po +++ b/po/te.po @@ -1,15 +1,15 @@ -# translation of NetworkManager.po.master.te.po to Telugu +# translation of te.po to Telugu # Telugu translation of NetworkManager. # Copyright (C) 2009 NetworkManager's COPYRIGHT HOLDER # This file is distributed under the same license as the NetworkManager package. # -# Krishna Babu K , 2009. +# Krishna Babu K , 2009, 2010. msgid "" msgstr "" -"Project-Id-Version: NetworkManager.po.master.te\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager&component=general\n" -"POT-Creation-Date: 2009-06-12 03:24+0000\n" -"PO-Revision-Date: 2009-06-12 17:50+0530\n" +"Project-Id-Version: te\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-05-06 14:31+0530\n" +"PO-Revision-Date: 2010-05-06 19:30+0530\n" "Last-Translator: Krishna Babu K \n" "Language-Team: Telugu \n" "MIME-Version: 1.0\n" @@ -17,6 +17,1150 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" "Plural-Forms: nplurals=2; plural=(n!=1);\n\n" +"\n" +"\n" +"\n" +"\n" + +#: ../cli/src/connections.c:59 ../cli/src/connections.c:74 +#: ../cli/src/devices.c:85 ../cli/src/devices.c:98 ../cli/src/devices.c:108 +#: ../cli/src/devices.c:118 ../cli/src/devices.c:131 ../cli/src/devices.c:142 +#: ../cli/src/devices.c:152 +msgid "NAME" +msgstr "NAME" + +#. 0 +#: ../cli/src/connections.c:60 ../cli/src/connections.c:75 +msgid "UUID" +msgstr "UUID" + +#. 1 +#: ../cli/src/connections.c:61 +msgid "DEVICES" +msgstr "DEVICES" + +#. 2 +#: ../cli/src/connections.c:62 ../cli/src/connections.c:77 +msgid "SCOPE" +msgstr "SCOPE" + +#. 3 +#: ../cli/src/connections.c:63 +msgid "DEFAULT" +msgstr "DEFAULT" + +#. 4 +#: ../cli/src/connections.c:64 +msgid "DBUS-SERVICE" +msgstr "DBUS-SERVICE" + +#. 5 +#: ../cli/src/connections.c:65 +msgid "SPEC-OBJECT" +msgstr "SPEC-OBJECT" + +#. 6 +#: ../cli/src/connections.c:66 +msgid "VPN" +msgstr "VPN" + +#. 1 +#. 0 +#. 1 +#: ../cli/src/connections.c:76 ../cli/src/devices.c:61 ../cli/src/devices.c:87 +msgid "TYPE" +msgstr "TYPE" + +#. 3 +#: ../cli/src/connections.c:78 +msgid "TIMESTAMP" +msgstr "TIMESTAMP" + +#. 4 +#: ../cli/src/connections.c:79 +msgid "TIMESTAMP-REAL" +msgstr "TIMESTAMP-REAL" + +#. 5 +#: ../cli/src/connections.c:80 +msgid "AUTOCONNECT" +msgstr "AUTOCONNECT" + +#. 6 +#: ../cli/src/connections.c:81 +msgid "READONLY" +msgstr "READONLY" + +#: ../cli/src/connections.c:157 +#, c-format +msgid "" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" +msgstr "" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" + +#: ../cli/src/connections.c:197 ../cli/src/connections.c:536 +#, c-format +msgid "Error: 'con list': %s" +msgstr "దోషము: 'con list': %s" + +#: ../cli/src/connections.c:199 ../cli/src/connections.c:538 +#, c-format +msgid "Error: 'con list': %s; allowed fields: %s" +msgstr "దోషము: 'con list': %s; అనుమతించబడు క్షేత్రములు: %s" + +#: ../cli/src/connections.c:207 +msgid "Connection details" +msgstr "అనుసంధానము వివరములు" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "system" +msgstr "సిస్టమ్" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "user" +msgstr "వినియోగదారి" + +#: ../cli/src/connections.c:383 +msgid "never" +msgstr "ఎప్పటికికాదు" + +#. "CAPABILITIES" +#. Print header +#. "WIFI-PROPERTIES" +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:544 ../cli/src/settings.c:643 +#: ../cli/src/settings.c:912 ../cli/src/settings.c:913 +#: ../cli/src/settings.c:915 ../cli/src/settings.c:917 +#: ../cli/src/settings.c:1042 ../cli/src/settings.c:1043 +#: ../cli/src/settings.c:1044 ../cli/src/settings.c:1123 +#: ../cli/src/settings.c:1124 ../cli/src/settings.c:1125 +#: ../cli/src/settings.c:1126 ../cli/src/settings.c:1127 +#: ../cli/src/settings.c:1128 ../cli/src/settings.c:1129 +#: ../cli/src/settings.c:1130 ../cli/src/settings.c:1131 +#: ../cli/src/settings.c:1132 ../cli/src/settings.c:1133 +#: ../cli/src/settings.c:1134 ../cli/src/settings.c:1135 +#: ../cli/src/settings.c:1210 +msgid "yes" +msgstr "అవును" + +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:506 ../cli/src/settings.c:544 +#: ../cli/src/settings.c:643 ../cli/src/settings.c:912 +#: ../cli/src/settings.c:913 ../cli/src/settings.c:915 +#: ../cli/src/settings.c:917 ../cli/src/settings.c:1042 +#: ../cli/src/settings.c:1043 ../cli/src/settings.c:1044 +#: ../cli/src/settings.c:1123 ../cli/src/settings.c:1124 +#: ../cli/src/settings.c:1125 ../cli/src/settings.c:1126 +#: ../cli/src/settings.c:1127 ../cli/src/settings.c:1128 +#: ../cli/src/settings.c:1129 ../cli/src/settings.c:1130 +#: ../cli/src/settings.c:1131 ../cli/src/settings.c:1132 +#: ../cli/src/settings.c:1133 ../cli/src/settings.c:1134 +#: ../cli/src/settings.c:1135 ../cli/src/settings.c:1210 +msgid "no" +msgstr "కాదు" + +#: ../cli/src/connections.c:457 ../cli/src/connections.c:500 +msgid "System connections" +msgstr "సిస్టమ్ అనుసంధానములు" + +#: ../cli/src/connections.c:462 ../cli/src/connections.c:513 +msgid "User connections" +msgstr "వినియోగదారి అనుసంధానములు" + +#: ../cli/src/connections.c:474 ../cli/src/connections.c:1334 +#: ../cli/src/connections.c:1350 ../cli/src/connections.c:1359 +#: ../cli/src/connections.c:1370 ../cli/src/connections.c:1452 +#: ../cli/src/devices.c:864 ../cli/src/devices.c:874 ../cli/src/devices.c:973 +#: ../cli/src/devices.c:980 +#, c-format +msgid "Error: %s argument is missing." +msgstr "దోషము: %s ఆర్గుమెంట్ తప్పిపోయినది." + +#: ../cli/src/connections.c:487 +#, c-format +msgid "Error: %s - no such connection." +msgstr "దోషము: %s - అటువంటి అనుసంధానము లేదు." + +#: ../cli/src/connections.c:519 ../cli/src/connections.c:1383 +#: ../cli/src/connections.c:1470 ../cli/src/devices.c:687 +#: ../cli/src/devices.c:754 ../cli/src/devices.c:888 ../cli/src/devices.c:986 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "తెలియని పారామితి: %s\n" + +#: ../cli/src/connections.c:528 +#, c-format +msgid "Error: no valid parameter specified." +msgstr "దోషము: ఏ చెల్లునటువంటి పారామితి తెలుపబడలేదు." + +#: ../cli/src/connections.c:543 ../cli/src/connections.c:1572 +#: ../cli/src/devices.c:1192 ../cli/src/network-manager.c:274 +#, c-format +msgid "Error: %s." +msgstr "దోషము: %s." + +#: ../cli/src/connections.c:649 +#, c-format +msgid "Error: 'con status': %s" +msgstr "దోషము: 'con status': %s" + +#: ../cli/src/connections.c:651 +#, c-format +msgid "Error: 'con status': %s; allowed fields: %s" +msgstr "దోషము: 'con status': %s; అనుమతించబడు క్షేత్రములు: %s" + +#: ../cli/src/connections.c:658 +msgid "Active connections" +msgstr "క్రియాశీల అనుసంధానములు" + +#: ../cli/src/connections.c:1026 +#, c-format +msgid "no active connection on device '%s'" +msgstr "పరికరము '%s' పైన యెటువంటి క్రియాశీల అనుసంధానము లేదు" + +#: ../cli/src/connections.c:1034 +#, c-format +msgid "no active connection or device" +msgstr "ఎటువంటి క్రియాశీల అనుసంధానము లేదా పరికరము లేదు" + +#: ../cli/src/connections.c:1084 +#, c-format +msgid "device '%s' not compatible with connection '%s'" +msgstr "పరికరము '%s' అనుసంధానము '%s'తో సారూప్యమైనది కాదు" + +#: ../cli/src/connections.c:1086 +#, c-format +msgid "no device found for connection '%s'" +msgstr "అనుసంధానము '%s' కొరకు యే పరికరము కనుగొనబడలేదు" + +#: ../cli/src/connections.c:1097 +msgid "activating" +msgstr "క్రియాశీలపరచుచున్నది" + +#: ../cli/src/connections.c:1099 +msgid "activated" +msgstr "క్రియాశీలపరచబడింది" + +#: ../cli/src/connections.c:1102 ../cli/src/connections.c:1125 +#: ../cli/src/connections.c:1158 ../cli/src/devices.c:224 +#: ../cli/src/devices.c:514 ../cli/src/network-manager.c:92 +#: ../cli/src/network-manager.c:145 ../cli/src/settings.c:469 +msgid "unknown" +msgstr "తెలియని" + +#: ../cli/src/connections.c:1111 +msgid "VPN connecting (prepare)" +msgstr "VPN అనుసంధానమౌచున్నది (సిద్దపరచు)" + +#: ../cli/src/connections.c:1113 +msgid "VPN connecting (need authentication)" +msgstr "VPN అనుసంధానమౌచున్నది (ధృవీకరణము అవసరము)" + +#: ../cli/src/connections.c:1115 +msgid "VPN connecting" +msgstr "VPN అనుసంధానమౌచున్నది" + +#: ../cli/src/connections.c:1117 +msgid "VPN connecting (getting IP configuration)" +msgstr "VPN అనుసంధానమౌచున్నది (IP ఆకృతీకరణను పొందుచున్నది)" + +#: ../cli/src/connections.c:1119 +msgid "VPN connected" +msgstr "VPN అనుసంధానమైంది" + +#: ../cli/src/connections.c:1121 +msgid "VPN connection failed" +msgstr "VPN అనుసంధానము విఫలమైంది" + +#: ../cli/src/connections.c:1123 +msgid "VPN disconnected" +msgstr "VPN అననుసంధానమైంది" + +#: ../cli/src/connections.c:1134 +msgid "unknown reason" +msgstr "తెలియని కారణము" + +#: ../cli/src/connections.c:1136 +msgid "none" +msgstr "ఏదీకాదు" + +#: ../cli/src/connections.c:1138 +msgid "the user was disconnected" +msgstr "వినియోగదారి అననుసంధానింప బడినారు" + +#: ../cli/src/connections.c:1140 +msgid "the base network connection was interrupted" +msgstr "ఆధార నెట్వర్కు అనుసంధానము ఆటంకపరచబడింది" + +#: ../cli/src/connections.c:1142 +msgid "the VPN service stopped unexpectedly" +msgstr "VPN సేవ అనుకోకుండా ఆపివేయబడింది" + +#: ../cli/src/connections.c:1144 +msgid "the VPN service returned invalid configuration" +msgstr "VPN సేవ చెల్లని ఆకృతీకరణను తిప్పియిచ్చినది" + +#: ../cli/src/connections.c:1146 +msgid "the connection attempt timed out" +msgstr "అనుసంధానపు ప్రయత్నం సమయం మించిపోయినది" + +#: ../cli/src/connections.c:1148 +msgid "the VPN service did not start in time" +msgstr "VPN సేవ సమయం లోపల ప్రారంభించబడలేదు" + +#: ../cli/src/connections.c:1150 +msgid "the VPN service failed to start" +msgstr "VPN సేవ ప్రారంభమగుటకు విఫలమైంది" + +#: ../cli/src/connections.c:1152 +msgid "no valid VPN secrets" +msgstr "ఏ విలువైన VPN రహస్యాలు లేవు" + +#: ../cli/src/connections.c:1154 +msgid "invalid VPN secrets" +msgstr "చెల్లని VPN రహస్యాలు" + +#: ../cli/src/connections.c:1156 +msgid "the connection was removed" +msgstr "అనుసంధానము తీసివేయబడింది" + +#: ../cli/src/connections.c:1170 +#, c-format +msgid "state: %s\n" +msgstr "స్థితి: %s\n" + +#: ../cli/src/connections.c:1173 ../cli/src/connections.c:1199 +#, c-format +msgid "Connection activated\n" +msgstr "అనుసంధానము క్రియాశీలపరచబడింది\n" + +#: ../cli/src/connections.c:1176 +#, c-format +msgid "Error: Connection activation failed." +msgstr "దోషము: అనుసంధానము క్రియాశీలపరచుట విఫలమైంది." + +#: ../cli/src/connections.c:1195 +#, c-format +msgid "state: %s (%d)\n" +msgstr "స్థితి: %s (%d)\n" + +#: ../cli/src/connections.c:1205 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "దోషము: అనుసంధానము క్రియాశీలపరచుట విఫలమైంది: %s." + +#: ../cli/src/connections.c:1222 ../cli/src/devices.c:811 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "దోషము: కాలపరిమితి %d సె మించినది." + +#: ../cli/src/connections.c:1265 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "దోషము: అనుసంధానము క్రియాశీలపరచుట విఫలమైంది: %s" + +#: ../cli/src/connections.c:1279 +#, c-format +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "దోషము: '%s' కొరకు క్రియాశీల అనుసంధానమును పొందుటలో విఫలమైంది." + +#: ../cli/src/connections.c:1288 +#, c-format +msgid "Active connection state: %s\n" +msgstr "క్రియాశీల అనుసంధానము స్థితి: %s\n" + +#: ../cli/src/connections.c:1289 +#, c-format +msgid "Active connection path: %s\n" +msgstr "క్రియాశీల అనుసంధానము పాత్: %s\n" + +#: ../cli/src/connections.c:1343 ../cli/src/connections.c:1461 +#, c-format +msgid "Error: Unknown connection: %s." +msgstr "దోషము: తెలియని దోషము: %s." + +#: ../cli/src/connections.c:1378 ../cli/src/devices.c:882 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "దోషము: కాలముగింపు విలువ '%s' చెల్లనిది." + +#: ../cli/src/connections.c:1391 ../cli/src/connections.c:1478 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "దోషము: id లేదా uuid తెలుపవలసి వుంది." + +#: ../cli/src/connections.c:1411 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "దోషము: ఎటువంటి సూటయ్యే పరికరము కనబడలేదు: %s." + +#: ../cli/src/connections.c:1413 +#, c-format +msgid "Error: No suitable device found." +msgstr "దోషము: ఏ సూటగు పరికరము కనబడలేదు." + +#: ../cli/src/connections.c:1505 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "దహెచ్చరిక: అనుసంధానము క్రియాశీలంగా లేదు\n" + +#: ../cli/src/connections.c:1561 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "దోషము: 'con' ఆదేశము '%s' చెల్లునది కాదు." + +#: ../cli/src/connections.c:1597 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "దోషము: D-Busకు అనుసంధానము కాలేకపోయినది." + +#: ../cli/src/connections.c:1604 +#, c-format +msgid "Error: Could not get system settings." +msgstr "దోషము: సిస్టమ్ అమరికలను పొందలేక పోయింది." + +#: ../cli/src/connections.c:1612 +#, c-format +msgid "Error: Could not get user settings." +msgstr "దోషము: వినియోగదారి అమరికలను పొందలేక పోయింది." + +#: ../cli/src/connections.c:1622 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "దోషము: అనుసంధానములను పొందలేదు: అమరికల సేవలు నడుచుటలేదు." + +#. 0 +#. 9 +#: ../cli/src/devices.c:60 ../cli/src/devices.c:86 ../cli/src/devices.c:162 +msgid "DEVICE" +msgstr "DEVICE" + +#. 1 +#. 4 +#. 0 +#: ../cli/src/devices.c:62 ../cli/src/devices.c:90 +#: ../cli/src/network-manager.c:36 +msgid "STATE" +msgstr "STATE" + +#: ../cli/src/devices.c:71 +msgid "GENERAL" +msgstr "GENERAL" + +#. 0 +#: ../cli/src/devices.c:72 +msgid "CAPABILITIES" +msgstr "CAPABILITIES" + +#. 1 +#: ../cli/src/devices.c:73 +msgid "WIFI-PROPERTIES" +msgstr "WIFI-PROPERTIES" + +#. 2 +#: ../cli/src/devices.c:74 +msgid "AP" +msgstr "AP" + +#. 3 +#: ../cli/src/devices.c:75 +msgid "WIRED-PROPERTIES" +msgstr "WIRED-PROPERTIES" + +#. 4 +#: ../cli/src/devices.c:76 +msgid "IP4-SETTINGS" +msgstr "IP4-SETTINGS" + +#. 5 +#: ../cli/src/devices.c:77 +msgid "IP4-DNS" +msgstr "IP4-DNS" + +#. 2 +#: ../cli/src/devices.c:88 +msgid "DRIVER" +msgstr "DRIVER" + +#. 3 +#: ../cli/src/devices.c:89 +msgid "HWADDR" +msgstr "HWADDR" + +#. 0 +#: ../cli/src/devices.c:99 +msgid "CARRIER-DETECT" +msgstr "CARRIER-DETECT" + +#. 1 +#: ../cli/src/devices.c:100 +msgid "SPEED" +msgstr "SPEED" + +#. 0 +#: ../cli/src/devices.c:109 +msgid "CARRIER" +msgstr "CARRIER" + +#. 0 +#: ../cli/src/devices.c:119 +msgid "WEP" +msgstr "WEP" + +#. 1 +#: ../cli/src/devices.c:120 +msgid "WPA" +msgstr "WPA" + +#. 2 +#: ../cli/src/devices.c:121 +msgid "WPA2" +msgstr "WPA2" + +#. 3 +#: ../cli/src/devices.c:122 +msgid "TKIP" +msgstr "TKIP" + +#. 4 +#: ../cli/src/devices.c:123 +msgid "CCMP" +msgstr "CCMP" + +#. 0 +#: ../cli/src/devices.c:132 +msgid "ADDRESS" +msgstr "ADDRESS" + +#. 1 +#: ../cli/src/devices.c:133 +msgid "PREFIX" +msgstr "PREFIX" + +#. 2 +#: ../cli/src/devices.c:134 +msgid "GATEWAY" +msgstr "GATEWAY" + +#. 0 +#: ../cli/src/devices.c:143 +msgid "DNS" +msgstr "DNS" + +#. 0 +#: ../cli/src/devices.c:153 +msgid "SSID" +msgstr "SSID" + +#. 1 +#: ../cli/src/devices.c:154 +msgid "BSSID" +msgstr "BSSID" + +#. 2 +#: ../cli/src/devices.c:155 +msgid "MODE" +msgstr "MODE" + +#. 3 +#: ../cli/src/devices.c:156 +msgid "FREQ" +msgstr "FREQ" + +#. 4 +#: ../cli/src/devices.c:157 +msgid "RATE" +msgstr "RATE" + +#. 5 +#: ../cli/src/devices.c:158 +msgid "SIGNAL" +msgstr "SIGNAL" + +#. 6 +#: ../cli/src/devices.c:159 +msgid "SECURITY" +msgstr "SECURITY" + +#. 7 +#: ../cli/src/devices.c:160 +msgid "WPA-FLAGS" +msgstr "WPA-FLAGS" + +#. 8 +#: ../cli/src/devices.c:161 +msgid "RSN-FLAGS" +msgstr "RSN-FLAGS" + +#. 10 +#: ../cli/src/devices.c:163 +msgid "ACTIVE" +msgstr "ACTIVE" + +#: ../cli/src/devices.c:186 +#, c-format +msgid "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +"\n" +msgstr "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +"\n" + +#: ../cli/src/devices.c:206 +msgid "unmanaged" +msgstr "నిర్వహించని" + +#: ../cli/src/devices.c:208 +msgid "unavailable" +msgstr "అందుబాటులోలేని" + +#: ../cli/src/devices.c:210 ../cli/src/network-manager.c:89 +msgid "disconnected" +msgstr "అననుసంధానమైన" + +#: ../cli/src/devices.c:212 +msgid "connecting (prepare)" +msgstr "అనుసంధానమౌచున్నది (సిద్దపడుతోంది)" + +#: ../cli/src/devices.c:214 +msgid "connecting (configuring)" +msgstr "అనుసంధానమౌచున్నది (ఆకృతీకరించబడుతోంది)" + +#: ../cli/src/devices.c:216 +msgid "connecting (need authentication)" +msgstr "అనుసంధానమౌచున్నది (ధృవీకరణము అవసరము)" + +#: ../cli/src/devices.c:218 +msgid "connecting (getting IP configuration)" +msgstr "అనుసంధానమౌచున్నది (IP ఆకృతీకరణను పొందుచున్నది)" + +#: ../cli/src/devices.c:220 ../cli/src/network-manager.c:87 +msgid "connected" +msgstr "అనుసంధానమైంది" + +#: ../cli/src/devices.c:222 +msgid "connection failed" +msgstr "అనుసంధానము విఫలమైంది" + +#: ../cli/src/devices.c:245 ../cli/src/devices.c:380 +msgid "Unknown" +msgstr "తెలియని" + +#: ../cli/src/devices.c:277 +msgid "(none)" +msgstr "(ఏదీకాదు)" + +#: ../cli/src/devices.c:302 +#, c-format +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s: IP4 చిరునామా 0x%X మార్చుటలో దోషము" + +#: ../cli/src/devices.c:349 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" + +#: ../cli/src/devices.c:350 +#, c-format +msgid "%u MB/s" +msgstr "%u MB/s" + +#: ../cli/src/devices.c:359 +msgid "Encrypted: " +msgstr "ఎన్క్రిప్టెడ్: " + +#: ../cli/src/devices.c:364 +msgid "WEP " +msgstr "WEP " + +#: ../cli/src/devices.c:366 +msgid "WPA " +msgstr "WPA " + +#: ../cli/src/devices.c:368 +msgid "WPA2 " +msgstr "WPA2 " + +#: ../cli/src/devices.c:371 +msgid "Enterprise " +msgstr "ఎంటర్‌ప్రైజ్ " + +#: ../cli/src/devices.c:380 +msgid "Ad-Hoc" +msgstr "Ad-Hoc" + +#: ../cli/src/devices.c:380 +msgid "Infrastructure" +msgstr "అవస్థాపన(ఇన్ఫ్రాస్ట్రక్చర్)" + +#: ../cli/src/devices.c:442 +#, c-format +msgid "Error: 'dev list': %s" +msgstr "దోషము: 'dev list': %s" + +#: ../cli/src/devices.c:444 +#, c-format +msgid "Error: 'dev list': %s; allowed fields: %s" +msgstr "దోషము: 'dev list': %s; అనుమతించబడు క్షేత్రములు: %s" + +#: ../cli/src/devices.c:453 +msgid "Device details" +msgstr "పరికరము వివరములు" + +#: ../cli/src/devices.c:483 ../cli/src/devices.c:827 +msgid "(unknown)" +msgstr "(తెలియని)" + +#: ../cli/src/devices.c:484 +msgid "unknown)" +msgstr "తెలియని)" + +#: ../cli/src/devices.c:510 +#, c-format +msgid "%u Mb/s" +msgstr "%u Mb/s" + +#. Print header +#. "WIRED-PROPERTIES" +#: ../cli/src/devices.c:583 +msgid "on" +msgstr "ఆన్" + +#: ../cli/src/devices.c:583 +msgid "off" +msgstr "ఆఫ్" + +#: ../cli/src/devices.c:710 +#, c-format +msgid "Error: 'dev status': %s" +msgstr "దోషము: 'dev status': %s" + +#: ../cli/src/devices.c:712 +#, c-format +msgid "Error: 'dev status': %s; allowed fields: %s" +msgstr "దోషము: 'dev status': %s; అనుమతించబడు క్షేత్రములు: %s" + +#: ../cli/src/devices.c:719 +msgid "Status of devices" +msgstr "పరికరముల యొక్క స్థితి" + +#: ../cli/src/devices.c:747 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "దోషము: '%s' ఆర్గుమెంట్ తప్పిపోయినది." + +#: ../cli/src/devices.c:776 ../cli/src/devices.c:915 ../cli/src/devices.c:1035 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "దోషము: పరికరము '%s' కనబడలేదు." + +#: ../cli/src/devices.c:799 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "సఫలమైంది: పరికరము '%s' సఫలవంతంగా అననుసంధానించబడింది." + +#: ../cli/src/devices.c:824 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "దోషము: పరికరము '%s' (%s) అననుసంధానము విఫలమైంది: %s" + +#: ../cli/src/devices.c:832 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "పరికరము స్థితి: %d (%s)\n" + +#: ../cli/src/devices.c:896 +#, c-format +msgid "Error: iface has to be specified." +msgstr "దోషము: iface తెలుపవలసి వుంది." + +#: ../cli/src/devices.c:1011 +#, c-format +msgid "Error: 'dev wifi': %s" +msgstr "దోషము: 'dev wifi': %s" + +#: ../cli/src/devices.c:1013 +#, c-format +msgid "Error: 'dev wifi': %s; allowed fields: %s" +msgstr "దోషము: 'dev wifi': %s; అనుమతించబడు క్షేత్రములు: %s" + +#: ../cli/src/devices.c:1020 +msgid "WiFi scan list" +msgstr "WiFi స్కాన్ జాబితా" + +#: ../cli/src/devices.c:1055 ../cli/src/devices.c:1109 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "దోషము: హార్డువేర్‌చిరునామా '%s'తో యాక్సెస్ పాయింట్ కనబడలేదు." + +#: ../cli/src/devices.c:1072 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "దోషము: పరికరము '%s' అనునది WiFi పరికరము కాదు." + +#: ../cli/src/devices.c:1136 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "దోషము: 'dev wifi' ఆదేశము '%s' చెల్లనిది." + +#: ../cli/src/devices.c:1183 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "దోషము: 'dev' ఆదేశము '%s' చెల్లనిది." + +#: ../cli/src/network-manager.c:35 +msgid "RUNNING" +msgstr "RUNNING" + +#. 1 +#: ../cli/src/network-manager.c:37 +msgid "WIFI-HARDWARE" +msgstr "WIFI-HARDWARE" + +#. 2 +#: ../cli/src/network-manager.c:38 +msgid "WIFI" +msgstr "WIFI" + +#. 3 +#: ../cli/src/network-manager.c:39 +msgid "WWAN-HARDWARE" +msgstr "WWAN-HARDWARE" + +#. 4 +#: ../cli/src/network-manager.c:40 +msgid "WWAN" +msgstr "WWAN" + +#: ../cli/src/network-manager.c:62 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" +msgstr "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + +#: ../cli/src/network-manager.c:83 +msgid "asleep" +msgstr "స్థబ్దుగా(asleep)" + +#: ../cli/src/network-manager.c:85 +msgid "connecting" +msgstr "అనుసంధానమౌచున్నది" + +#: ../cli/src/network-manager.c:125 +#, c-format +msgid "Error: 'nm status': %s" +msgstr "దోషము: 'nm status': %s" + +#: ../cli/src/network-manager.c:127 +#, c-format +msgid "Error: 'nm status': %s; allowed fields: %s" +msgstr "దోషము: 'nm status': %s; allowed fields: %s" + +#: ../cli/src/network-manager.c:134 +msgid "NetworkManager status" +msgstr "నెట్వర్కునిర్వాహిక స్థితి" + +#. Print header +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "enabled" +msgstr "చేతనమైంది" + +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "disabled" +msgstr "అచేతనమైంది" + +#: ../cli/src/network-manager.c:148 +msgid "running" +msgstr "నడుచుచున్నది" + +#: ../cli/src/network-manager.c:148 +msgid "not running" +msgstr "నడుచుటలేదు" + +#: ../cli/src/network-manager.c:201 ../cli/src/network-manager.c:233 +#, c-format +msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s" +msgstr "దోషము: '--fields' విలువ '%s' యిక్కడ చెల్లునది కాదు; అనుమతించబడు క్షేత్రములు: %s" + +#: ../cli/src/network-manager.c:209 +msgid "WiFi enabled" +msgstr "WiFi చేతనమైంది" + +#: ../cli/src/network-manager.c:220 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "దోషము: చెల్లని 'wifi' పారామితి: '%s'." + +#: ../cli/src/network-manager.c:241 +msgid "WWAN enabled" +msgstr "WWAN చేతనమైంది" + +#: ../cli/src/network-manager.c:252 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "దోషము: చెల్లని 'wwan' పారామితి: '%s'." + +#: ../cli/src/network-manager.c:263 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "దోషము: 'nm' ఆదేశము '%s' చెల్లనిది." + +#: ../cli/src/nmcli.c:69 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -m[ode] tabular|multiline output mode\n" +" -f[ields] |all|common specify fields to output\n" +" -e[scape] yes|no escape columns separators in " +"values\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -m[ode] tabular|multiline output mode\n" +" -f[ields] |all|common specify fields to output\n" +" -e[scape] yes|no escape columns separators in " +"values\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" + +#: ../cli/src/nmcli.c:113 +#, c-format +msgid "Error: Object '%s' is unknown, try 'nmcli help'." +msgstr "దోషము: ఆబ్జక్టు '%s' తెలియనిది, 'nmcli help' ప్రయత్నించు." + +#: ../cli/src/nmcli.c:143 +#, c-format +msgid "Error: Option '--terse' is specified the second time." +msgstr "దోషము: ఐచ్చికము '--terse' రెండవ సమయాన్ని తెలిపినది." + +#: ../cli/src/nmcli.c:148 +#, c-format +msgid "Error: Option '--terse' is mutually exclusive with '--pretty'." +msgstr "దోషము: ఐచ్చికము '--terse' అనునది '--pretty'తో పరస్పరం విభేదించుచున్నది." + +#: ../cli/src/nmcli.c:156 +#, c-format +msgid "Error: Option '--pretty' is specified the second time." +msgstr "దోషము: ఐచ్చికము '--pretty' రెండవసారి తెలుపబడింది." + +#: ../cli/src/nmcli.c:161 +#, c-format +msgid "Error: Option '--pretty' is mutually exclusive with '--terse'." +msgstr "దోషము: ఐచ్చికము '--pretty' అనునది '--terse'తో పరస్పరం విభేదించుచున్నది." + +#: ../cli/src/nmcli.c:171 ../cli/src/nmcli.c:187 +#, c-format +msgid "Error: missing argument for '%s' option." +msgstr "దోషము: '%s' ఐచ్చికము కొరకు తప్పిపోయిన ఆర్గుమెంట్." + +#: ../cli/src/nmcli.c:180 ../cli/src/nmcli.c:196 +#, c-format +msgid "Error: '%s' is not valid argument for '%s' option." +msgstr "దోషము: '%s' అనునది '%s' ఐచ్చికము కొరకు చెల్లునటువంటి ఆర్గుమెంట్ కాదు." + +#: ../cli/src/nmcli.c:203 +#, c-format +msgid "Error: fields for '%s' options are missing." +msgstr "దోషము: '%s' ఐచ్చికముల కొరకు క్షేత్రములు అనునవి తప్పిపోవుచున్నవి." + +#: ../cli/src/nmcli.c:209 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "nmcli సాధనము, వర్షన్ %s\n" + +#: ../cli/src/nmcli.c:215 +#, c-format +msgid "Error: Option '%s' is unknown, try 'nmcli -help'." +msgstr "దోషము: ఐచ్చికము '%s' తెలియనిది, 'nmcli -help' ప్రయత్నించుము." + +#: ../cli/src/nmcli.c:234 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "సిగ్నల్ %d వచ్చింది, మూసివేయుచున్నది..." + +#: ../cli/src/nmcli.c:259 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "దోషము: నెట్వర్కునిర్వాహికకు అనుసంధానము కాలేకపోయింది." + +#: ../cli/src/nmcli.c:275 +msgid "Success" +msgstr "సఫలంమైంది" + +#: ../cli/src/settings.c:407 +#, c-format +msgid "%d (hex-ascii-key)" +msgstr "%d (hex-ascii-key)" + +#: ../cli/src/settings.c:409 +#, c-format +msgid "%d (104/128-bit passphrase)" +msgstr "%d (104/128-bit passphrase)" + +#: ../cli/src/settings.c:412 +#, c-format +msgid "%d (unknown)" +msgstr "%d (తెలియని)" + +#: ../cli/src/settings.c:438 +msgid "0 (unknown)" +msgstr "0 (తెలియని)" + +#: ../cli/src/settings.c:444 +msgid "any, " +msgstr "ఏదైనా, " + +#: ../cli/src/settings.c:446 +msgid "900 MHz, " +msgstr "900 MHz, " + +#: ../cli/src/settings.c:448 +msgid "1800 MHz, " +msgstr "1800 MHz, " + +#: ../cli/src/settings.c:450 +msgid "1900 MHz, " +msgstr "1900 MHz, " + +#: ../cli/src/settings.c:452 +msgid "850 MHz, " +msgstr "850 MHz, " + +#: ../cli/src/settings.c:454 +msgid "WCDMA 3GPP UMTS 2100 MHz, " +msgstr "WCDMA 3GPP UMTS 2100 MHz, " + +#: ../cli/src/settings.c:456 +msgid "WCDMA 3GPP UMTS 1800 MHz, " +msgstr "WCDMA 3GPP UMTS 1800 MHz, " + +#: ../cli/src/settings.c:458 +msgid "WCDMA 3GPP UMTS 1700/2100 MHz, " +msgstr "WCDMA 3GPP UMTS 1700/2100 MHz, " + +#: ../cli/src/settings.c:460 +msgid "WCDMA 3GPP UMTS 800 MHz, " +msgstr "WCDMA 3GPP UMTS 800 MHz, " + +#: ../cli/src/settings.c:462 +msgid "WCDMA 3GPP UMTS 850 MHz, " +msgstr "WCDMA 3GPP UMTS 850 MHz, " + +#: ../cli/src/settings.c:464 +msgid "WCDMA 3GPP UMTS 900 MHz, " +msgstr "WCDMA 3GPP UMTS 900 MHz, " + +#: ../cli/src/settings.c:466 +msgid "WCDMA 3GPP UMTS 1700 MHz, " +msgstr "WCDMA 3GPP UMTS 1700 MHz, " + +#: ../cli/src/settings.c:546 ../cli/src/settings.c:708 +msgid "auto" +msgstr "స్వయంచాలక" + +#: ../cli/src/settings.c:704 ../cli/src/settings.c:707 ../cli/src/utils.c:172 +msgid "not set" +msgstr "అమర్చ లేదు" + +#: ../cli/src/utils.c:124 +#, c-format +msgid "field '%s' has to be alone" +msgstr "క్షేత్రము '%s' వొంటరిగా వుండాలి" + +#: ../cli/src/utils.c:127 +#, c-format +msgid "invalid field '%s'" +msgstr "క్షేత్రము '%s' చెల్లనిది" + +#: ../cli/src/utils.c:146 +#, c-format +msgid "Option '--terse' requires specifying '--fields'" +msgstr "ఐచ్చికము '--terse' కు '--fields' తెలుపుట అవసరము" + +#: ../cli/src/utils.c:150 +#, c-format +msgid "Option '--terse' requires specific '--fields' option values , not '%s'" +msgstr "ఐచ్చికము '--terse' కు ప్రత్యేకించి '--fields' ఐచ్చికము విలువలు అవసరము , '%s' కాదు" #: ../libnm-util/crypto.c:120 #, c-format @@ -103,8 +1247,9 @@ msgstr "IV నిల్వవుంచుటకు సరిపోవునం msgid "IV contains non-hexadecimal digits." msgstr "IV నాన్-హెక్సాడెసిమల్ సంఖ్యలను కలిగివుంది." -#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:143 -#: ../libnm-util/crypto_nss.c:169 +#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:336 #, c-format msgid "Private key cipher '%s' was unknown." msgstr "వ్యక్తిగత కీ సైఫర్ '%s' అనునది తెలియనిది." @@ -124,72 +1269,106 @@ msgstr "వ్యక్తిగత కీ రకమును నిర్ణయ msgid "Not enough memory to store decrypted private key." msgstr "డీక్రిప్టు చేసిన వ్యక్తిగత కీను నిల్వవుంచుటకు సరిపోవునంత మెమొరీలేదు." -#: ../libnm-util/crypto_gnutls.c:46 +#: ../libnm-util/crypto_gnutls.c:49 msgid "Failed to initialize the crypto engine." msgstr "క్రిప్టో యింజన్‌ను సిద్దముచేయుటలో విఫలమైంది." -#: ../libnm-util/crypto_gnutls.c:90 +#: ../libnm-util/crypto_gnutls.c:93 #, c-format msgid "Failed to initialize the MD5 engine: %s / %s." msgstr "MD5 యింజన్ సిద్దము చేయుటలో విఫలమైంది: %s / %s." -#: ../libnm-util/crypto_gnutls.c:152 ../libnm-util/crypto_nss.c:178 +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "చెల్లని IV పొడవు (తప్పక కనీసం %zd అయివుండాలి)." + +#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188 #, c-format msgid "Not enough memory for decrypted key buffer." msgstr "డిక్రిప్టెడ్ కీ బఫర్ కొరకు సరిపోవునంత మెమొరి లేదు." -#: ../libnm-util/crypto_gnutls.c:160 +#: ../libnm-util/crypto_gnutls.c:173 #, c-format msgid "Failed to initialize the decryption cipher context: %s / %s." msgstr "డిక్రిప్షన్ సైఫర్ కాంటెస్టును సిద్దము చేయుటలో విఫలమైంది: %s / %s." -#: ../libnm-util/crypto_gnutls.c:169 +#: ../libnm-util/crypto_gnutls.c:182 #, c-format msgid "Failed to set symmetric key for decryption: %s / %s." msgstr "వివరణ కొరకు సిమెట్రిక్ కీను అమర్చుటలో విఫలమైంది: %s / %s." -#: ../libnm-util/crypto_gnutls.c:178 +#: ../libnm-util/crypto_gnutls.c:191 #, c-format msgid "Failed to set IV for decryption: %s / %s." msgstr "వివరణ కొరకు IV అమర్చుటలో విఫలమైంది: %s / %s." -#: ../libnm-util/crypto_gnutls.c:187 +#: ../libnm-util/crypto_gnutls.c:200 #, c-format msgid "Failed to decrypt the private key: %s / %s." msgstr "వ్యక్తిగత కీను డిక్రిప్టు చేయుటలో విఫలమైంది: %s / %s." -#: ../libnm-util/crypto_gnutls.c:200 +#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 +#, c-format +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "వ్యక్తిగత కీను డిక్రిప్టు చేయుటలో విఫలమైంది: అనుకోని పాడింగ్ పొడవు." + +#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 #, c-format msgid "Failed to decrypt the private key." msgstr "వ్యక్తిగత కీను డిక్రిప్టు చేయుటలో విఫలమైంది." -#: ../libnm-util/crypto_gnutls.c:235 +#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "ఎన్క్రిప్టింగ్ కొరకు మెమొరీ కేటాయించలేక పోయింది." + +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "ఎన్క్రిప్షన్ సైఫర్ కాంటెస్టును సిద్దము చేయుటలో విఫలమైంది: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "ఎన్క్రిప్షన్ కొరకు సిమెట్రిక్ కీను అమర్చుటలో విఫలమైంది: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +msgid "Failed to set IV for encryption: %s / %s." +msgstr "ఎన్క్రిప్షన్ కొరకు IV అమర్చుటలో విఫలమైంది: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +msgid "Failed to encrypt the data: %s / %s." +msgstr "డాటాను ఎన్క్రిప్టు చేయుటలో విఫలమైంది: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:362 #, c-format msgid "Error initializing certificate data: %s" msgstr "దృవీకరణపత్రం డాటాను సిద్దపరచుటలో దోషము: %s" -#: ../libnm-util/crypto_gnutls.c:257 +#: ../libnm-util/crypto_gnutls.c:384 #, c-format msgid "Couldn't decode certificate: %s" msgstr "దృవీకరణపత్రమును డీకోడ్ చేయలేక పోయింది: %s" -#: ../libnm-util/crypto_gnutls.c:281 +#: ../libnm-util/crypto_gnutls.c:408 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %s" msgstr "PKCS#12 డీకోడర్‌ను సిద్దపరచలేక పోయింది: %s" -#: ../libnm-util/crypto_gnutls.c:294 +#: ../libnm-util/crypto_gnutls.c:421 #, c-format msgid "Couldn't decode PKCS#12 file: %s" msgstr "PKCS#12 ఫైలును డీకోడ్ పరచలేక పోయింది: %s" -#: ../libnm-util/crypto_gnutls.c:306 +#: ../libnm-util/crypto_gnutls.c:433 #, c-format msgid "Couldn't verify PKCS#12 file: %s" msgstr "PKCS#12 ఫైలును నిర్ధారించలేక పోయింది: %s" -#: ../libnm-util/crypto_nss.c:57 -#: ../system-settings/plugins/ifcfg-rh/crypto.c:52 +#: ../libnm-util/crypto_nss.c:56 #, c-format msgid "Failed to initialize the crypto engine: %d." msgstr "క్రిప్టో యింజన్ సిద్దము చేయుటలో విఫలమైంది: %d." @@ -199,105 +1378,184 @@ msgstr "క్రిప్టో యింజన్ సిద్దము చే msgid "Failed to initialize the MD5 context: %d." msgstr "MD5 కాంటెస్టును సిద్దము చేయుటలో విఫలమైంది: %d." -#: ../libnm-util/crypto_nss.c:186 +#: ../libnm-util/crypto_nss.c:179 +#, c-format +msgid "Invalid IV length (must be at least %d)." +msgstr "చెల్లని IV పొడవు (తప్పక కనీసం %d వుండాలి)." + +#: ../libnm-util/crypto_nss.c:196 #, c-format msgid "Failed to initialize the decryption cipher slot." msgstr "డిక్రిప్షన్ సైఫర్ స్లాట్‌ను సిద్దము చేయుటలో విఫలమైంది." -#: ../libnm-util/crypto_nss.c:196 +#: ../libnm-util/crypto_nss.c:206 #, c-format msgid "Failed to set symmetric key for decryption." msgstr "వివరణ కొరకు సిమెట్రిక్ కీ అమర్చుటలో విఫలమైంది." -#: ../libnm-util/crypto_nss.c:206 +#: ../libnm-util/crypto_nss.c:216 #, c-format msgid "Failed to set IV for decryption." msgstr "వివరణ కొరకు IV అమర్చుటలో విఫలమైంది." -#: ../libnm-util/crypto_nss.c:214 +#: ../libnm-util/crypto_nss.c:224 #, c-format msgid "Failed to initialize the decryption context." msgstr "వివరణ సందర్భమును సిద్దపరచుటలో విఫలమైంది." -#: ../libnm-util/crypto_nss.c:227 +#: ../libnm-util/crypto_nss.c:237 #, c-format msgid "Failed to decrypt the private key: %d." msgstr "వ్యక్తిగత కీను డిక్రిప్టు చేయుటలో విఫలమైంది: %d." -#: ../libnm-util/crypto_nss.c:239 +#: ../libnm-util/crypto_nss.c:245 +#, c-format +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "వ్యక్తిగత కీను డిక్రిప్టు చేయుటలో విఫలమైంది: డిక్రిప్టు చేసిన డాటా మరీ పెద్దది." + +#: ../libnm-util/crypto_nss.c:256 #, c-format msgid "Failed to finalize decryption of the private key: %d." msgstr "వ్యక్తిగత కీ యొక్క డిక్రిప్షన్ ఖరారు చేయుటలో విఫలమైంది: %d." -#: ../libnm-util/crypto_nss.c:284 +#: ../libnm-util/crypto_nss.c:364 +#, c-format +msgid "Failed to initialize the encryption cipher slot." +msgstr "ఎన్క్రిప్షన్ సైఫర్ స్లాట్‌ను సిద్దముచేయుటలో విఫలమైంది." + +#: ../libnm-util/crypto_nss.c:372 +#, c-format +msgid "Failed to set symmetric key for encryption." +msgstr "ఎన్క్రిప్షన్ కొరకు సిమ్మెట్రిక్ కీను అమర్చుటలో విఫలమైంది." + +#: ../libnm-util/crypto_nss.c:380 +#, c-format +msgid "Failed to set IV for encryption." +msgstr "ఎన్క్రిప్షన్ కొరకు IV అమర్చుటలో విఫలమైంది." + +#: ../libnm-util/crypto_nss.c:388 +#, c-format +msgid "Failed to initialize the encryption context." +msgstr "ఎన్క్రిప్షన్ సందర్భమును సిద్దముచేయుటలో విఫలమైంది." + +#: ../libnm-util/crypto_nss.c:396 +#, c-format +msgid "Failed to encrypt: %d." +msgstr "ఎన్క్రిప్టు చేయుటకు విఫలమైంది: %d." + +#: ../libnm-util/crypto_nss.c:404 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "ఎన్క్రిప్టు చేసిన తర్వాత అనుకోని డాటా మొత్తము." + +#: ../libnm-util/crypto_nss.c:447 #, c-format msgid "Couldn't decode certificate: %d" msgstr "దృవీకరణపత్రమును డీకోడ్ చేయలేక పోయింది: %d" -#: ../libnm-util/crypto_nss.c:319 +#: ../libnm-util/crypto_nss.c:482 #, c-format msgid "Couldn't convert password to UCS2: %d" msgstr "సంకేతపదమును UCS2కు మార్చలేక పోయింది: %d" -#: ../libnm-util/crypto_nss.c:347 +#: ../libnm-util/crypto_nss.c:510 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %d" msgstr "PKCS#12 డీకోడర్‌ను సిద్దము చేయలేక పోయింది: %d" -#: ../libnm-util/crypto_nss.c:356 +#: ../libnm-util/crypto_nss.c:519 #, c-format msgid "Couldn't decode PKCS#12 file: %d" msgstr "PKCS#12 ఫైలు డీకోడ్ చేయలేక పోయింది: %d" -#: ../libnm-util/crypto_nss.c:365 +#: ../libnm-util/crypto_nss.c:528 #, c-format msgid "Couldn't verify PKCS#12 file: %d" msgstr "PKCS#12 ఫైలు నిర్దారించలేక పోయింది: %d" -#: ../src/nm-netlink-monitor.c:194 ../src/nm-netlink-monitor.c:458 +#: ../libnm-util/crypto_nss.c:557 +msgid "Could not generate random data." +msgstr "యాదృశ్చిక డాటాను జనియింపచేయలేక పోయింది." + +#: ../libnm-util/nm-utils.c:1925 +#, c-format +msgid "Not enough memory to make encryption key." +msgstr "ఎన్క్రిప్షన్ కీను తయారుచేయుటకు సరిపోవు మెమొరీ లేదు." + +#: ../libnm-util/nm-utils.c:2035 +msgid "Could not allocate memory for PEM file creation." +msgstr "మెమొరీను PEM ఫైలు సృష్టీకరణ కొరకు కేటాయించలేక పోయింది." + +#: ../libnm-util/nm-utils.c:2047 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "IVను PEM ఫైలునకు వ్రాయుటకు మెమొరీను కేటాయించలేక పోయింది." + +#: ../libnm-util/nm-utils.c:2059 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "ఎన్క్రిప్టు చేసిన కీను PEM ఫైలునకు వ్రాయుటకు మెమొరీను కేటాయించలేక పోయింది." + +#: ../libnm-util/nm-utils.c:2078 +#, c-format +msgid "Could not allocate memory for PEM file data." +msgstr "PEM ఫైలు డాటా కొరకు మెమొరీను కేటాయించలేక పోయింది." + +#: ../src/nm-netlink-monitor.c:100 ../src/nm-netlink-monitor.c:231 +#: ../src/nm-netlink-monitor.c:653 #, c-format msgid "error processing netlink message: %s" msgstr "నెట్‌లింక్ సందేశమును ప్రోసెసింగ్ చేయుటలో దోషము: %s" -#: ../src/nm-netlink-monitor.c:255 -#, c-format -msgid "unable to allocate netlink handle for monitoring link status: %s" -msgstr "లింకు స్థితిని పర్యవేక్షించుటకు నెట్‌లింకు హాండిల్‌ను కేటాయించలేక పోయింది: %s" +#: ../src/nm-netlink-monitor.c:214 +msgid "error occurred while waiting for data on socket" +msgstr "సాకెట్ నందు డాటా కొరకు వేచివుండునప్పుడు దోషము సంభవించినది" -#: ../src/nm-netlink-monitor.c:265 +#: ../src/nm-netlink-monitor.c:254 #, c-format msgid "unable to connect to netlink for monitoring link status: %s" msgstr "లింకు స్థితిని పర్యవేక్షించుటకు నెట్‌లింకుకు అనుసంధానము కాలేకపోయింది: %s" -#: ../src/nm-netlink-monitor.c:273 +#: ../src/nm-netlink-monitor.c:265 #, c-format -msgid "unable to join netlink group for monitoring link status: %s" -msgstr "లింకు స్థితిని పర్యవేక్షించుటకు నెట్‌లింకు సమూహమును కలుపలేక పోయింది:%s" +msgid "unable to enable netlink handle credential passing: %s" +msgstr "నెట్‌లింక్ హాండిల్ క్రెడెన్షియల్ పాసింగ్ చేతము చేయలేదు: %s" -#: ../src/nm-netlink-monitor.c:281 +#: ../src/nm-netlink-monitor.c:291 ../src/nm-netlink-monitor.c:353 +#, c-format +msgid "unable to allocate netlink handle for monitoring link status: %s" +msgstr "లింకు స్థితిని పర్యవేక్షించుటకు నెట్‌లింకు హాండిల్‌ను కేటాయించలేక పోయింది: %s" + +#: ../src/nm-netlink-monitor.c:376 #, c-format msgid "unable to allocate netlink link cache for monitoring link status: %s" msgstr "లింకు స్థితిని పర్యవేక్షించుటకు నెట్‌లింకు క్యాచీని కేటాయించలేక పోయింది: %s" -#: ../src/nm-netlink-monitor.c:422 +#: ../src/nm-netlink-monitor.c:502 +#, c-format +msgid "unable to join netlink group: %s" +msgstr "నెట్‌లింకు సమూహాన్ని చేర్చుకొనలేక పోయింది: %s" + +#: ../src/nm-netlink-monitor.c:629 ../src/nm-netlink-monitor.c:642 #, c-format msgid "error updating link cache: %s" msgstr "లింకు క్యాచీని నవీకరించుటలో దోషము: %s" -#: ../src/nm-netlink-monitor.c:488 -msgid "error occurred while waiting for data on socket" -msgstr "సాకెట్ నందు డాటా కొరకు వేచివుండునప్పుడు దోషము సంభవించినది" - -#: ../src/NetworkManager.c:329 +#: ../src/main.c:502 #, c-format msgid "Invalid option. Please use --help to see a list of valid options.\n" msgstr "చెల్లని ఐచ్చికము. చెల్లునటువంటి ఐచ్చికముల జాబితా కొరకు --help వుపయోగించండి.\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:97 +#: ../src/main.c:562 +#, c-format +msgid "%s. Please use --help to see a list of valid options.\n" +msgstr "%s. చెల్లునటువంటి ఐచ్చికముల జాబితా చూచుటకు దయచేసి --help వుపయోగించుము.\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:325 msgid "# Created by NetworkManager\n" msgstr "# నెట్వర్కునిర్వాహిక ద్వారా సృష్టించబడింది\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:103 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:341 #, c-format msgid "" "# Merged from %s\n" @@ -306,28 +1564,79 @@ msgstr "" "# %sనుండి కలుపబడింది\n" "\n" -#: ../src/named-manager/nm-named-manager.c:255 +#: ../src/dhcp-manager/nm-dhcp-manager.c:279 +msgid "no usable DHCP client could be found." +msgstr "ఎటువంటి వుపయోగకర DHCP క్లైంట్ కనుగొనబడలేదు." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:288 +msgid "'dhclient' could be found." +msgstr "'dhclient' కనుగొనబడ గలదు." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:298 +msgid "'dhcpcd' could be found." +msgstr "'dhcpcd' కనుగొనబడ గలదు." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:306 +#, c-format +msgid "unsupported DHCP client '%s'" +msgstr "మద్దతీయని DHCP క్లైంట్ '%s'" + +#: ../src/logging/nm-logging.c:146 +#, c-format +msgid "Unknown log level '%s'" +msgstr "తెలియని లాగ్ స్థాయి '%s'" + +#: ../src/logging/nm-logging.c:171 +#, c-format +msgid "Unknown log domain '%s'" +msgstr "తెలియని లాగ్ డొమైన్ '%s'" + +#: ../src/named-manager/nm-named-manager.c:343 msgid "NOTE: the libc resolver may not support more than 3 nameservers." msgstr "గమనిక: libc రిజాల్వర్ 3 నామపు సేవికలకన్నా యెక్కువ వాటికి మద్దతివ్వలేదు." -#: ../src/named-manager/nm-named-manager.c:257 +#: ../src/named-manager/nm-named-manager.c:345 msgid "The nameservers listed below may not be recognized." msgstr "క్రిందన జాబితాచేసివున్న నామపుసేవికలు గుర్తించబడక పోవచ్చును." -#: ../src/system-settings/nm-default-wired-connection.c:182 +#: ../src/system-settings/nm-default-wired-connection.c:157 #, c-format msgid "Auto %s" msgstr "స్వయంచాలక %s" -#: ../system-settings/plugins/ifcfg-rh/reader.c:2168 +#: ../system-settings/plugins/ifcfg-rh/reader.c:3256 msgid "System" msgstr "సిస్టమ్" #: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "రక్షిత WiFi నెట్వర్కు ద్వారా అనుసంధానపు భాగస్వామ్యము." + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "ఓపెన్ WiFi నెట్వర్కు ద్వారా అనుసంధానపు భాగస్వామ్యము" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "నిరంతర సిస్టమ్ హోస్టునామము మార్చుము" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 msgid "Modify system connections" msgstr "సిస్టమ్ అనుసంధానములను సవరించుము" -#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 msgid "System policy prevents modification of system settings" msgstr "సిస్టమ్ అమరికలు సవరించుటకు సిస్టమ్ పాలసి నిరోధిస్తుంది" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +msgid "System policy prevents modification of the persistent system hostname" +msgstr "నిరంతర సిస్టమ్ హోస్టునామమును సవరించుటను సిస్టమ్ విధానము నిరోధించుచున్నది" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "రక్షిత WiFi నెట్వర్కు ద్వారా అనుసంధానములను భాగస్వామ్యపరచుట సిస్టమ్ విధానము నిరోధించుచున్నది" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "ఓపెన్ WiFi నెట్వర్కు ద్వారా అనుసంధానములను భాగస్వామ్యపరచుట సిస్టమ్ విధానము నిరోధించుచున్నది" + diff --git a/po/zh_CN.po b/po/zh_CN.po index cf10ebec79..d1e17ae850 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -1,21 +1,1160 @@ +# translation of zh_CN.po to Wei Liu # Simplified Chinese translation to NetworkManager -# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2009, 2010 Free Software Foundation, Inc. # This file is distributed under the same license as the NetworkManager package. +# # Funda Wang , 2004. # Aron Xu , 2009. -# +# Leah Liu , 2010. msgid "" msgstr "" -"Project-Id-Version: NetworkManager\n" +"Project-Id-Version: zh_CN\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-09-06 21:44+0800\n" -"PO-Revision-Date: 2009-09-06 22:25+0800\n" -"Last-Translator: Aron Xu \n" -"Language-Team: Simplified Chinese \n" +"POT-Creation-Date: 2010-05-06 14:31+0530\n" +"PO-Revision-Date: 2010-05-10 19:25+1000\n" +"Last-Translator: Leah Liu \n" +"Language-Team: Wei Liu\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: KBabel 1.11.4\n" + +#: ../cli/src/connections.c:59 ../cli/src/connections.c:74 +#: ../cli/src/devices.c:85 ../cli/src/devices.c:98 ../cli/src/devices.c:108 +#: ../cli/src/devices.c:118 ../cli/src/devices.c:131 ../cli/src/devices.c:142 +#: ../cli/src/devices.c:152 +msgid "NAME" +msgstr "名称" + +#. 0 +#: ../cli/src/connections.c:60 ../cli/src/connections.c:75 +msgid "UUID" +msgstr "UUID" + +#. 1 +#: ../cli/src/connections.c:61 +msgid "DEVICES" +msgstr "设备" + +#. 2 +#: ../cli/src/connections.c:62 ../cli/src/connections.c:77 +msgid "SCOPE" +msgstr "范围" + +#. 3 +#: ../cli/src/connections.c:63 +msgid "DEFAULT" +msgstr "默认" + +#. 4 +#: ../cli/src/connections.c:64 +msgid "DBUS-SERVICE" +msgstr "DBUS 服务" + +#. 5 +#: ../cli/src/connections.c:65 +msgid "SPEC-OBJECT" +msgstr "SPEC 对象" + +#. 6 +#: ../cli/src/connections.c:66 +msgid "VPN" +msgstr "VPN" + +#. 1 +#. 0 +#. 1 +#: ../cli/src/connections.c:76 ../cli/src/devices.c:61 ../cli/src/devices.c:87 +msgid "TYPE" +msgstr "类型" + +#. 3 +#: ../cli/src/connections.c:78 +msgid "TIMESTAMP" +msgstr "时间戳" + +#. 4 +#: ../cli/src/connections.c:79 +msgid "TIMESTAMP-REAL" +msgstr "真实时间戳" + +#. 5 +#: ../cli/src/connections.c:80 +msgid "AUTOCONNECT" +msgstr "自动连接" + +#. 6 +#: ../cli/src/connections.c:81 +msgid "READONLY" +msgstr "只读" + +#: ../cli/src/connections.c:157 +#, c-format +msgid "" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" +msgstr "" +"用法:nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" + +#: ../cli/src/connections.c:197 ../cli/src/connections.c:536 +#, c-format +msgid "Error: 'con list': %s" +msgstr "错误:'con list': %s" + +#: ../cli/src/connections.c:199 ../cli/src/connections.c:538 +#, c-format +msgid "Error: 'con list': %s; allowed fields: %s" +msgstr "错误:'con list': %s;允许的字段:%s" + +#: ../cli/src/connections.c:207 +msgid "Connection details" +msgstr "连接详情" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "system" +msgstr "系统" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "user" +msgstr "用户" + +#: ../cli/src/connections.c:383 +msgid "never" +msgstr "从不" + +#. "CAPABILITIES" +#. Print header +#. "WIFI-PROPERTIES" +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:544 ../cli/src/settings.c:643 +#: ../cli/src/settings.c:912 ../cli/src/settings.c:913 +#: ../cli/src/settings.c:915 ../cli/src/settings.c:917 +#: ../cli/src/settings.c:1042 ../cli/src/settings.c:1043 +#: ../cli/src/settings.c:1044 ../cli/src/settings.c:1123 +#: ../cli/src/settings.c:1124 ../cli/src/settings.c:1125 +#: ../cli/src/settings.c:1126 ../cli/src/settings.c:1127 +#: ../cli/src/settings.c:1128 ../cli/src/settings.c:1129 +#: ../cli/src/settings.c:1130 ../cli/src/settings.c:1131 +#: ../cli/src/settings.c:1132 ../cli/src/settings.c:1133 +#: ../cli/src/settings.c:1134 ../cli/src/settings.c:1135 +#: ../cli/src/settings.c:1210 +msgid "yes" +msgstr "是" + +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:506 ../cli/src/settings.c:544 +#: ../cli/src/settings.c:643 ../cli/src/settings.c:912 +#: ../cli/src/settings.c:913 ../cli/src/settings.c:915 +#: ../cli/src/settings.c:917 ../cli/src/settings.c:1042 +#: ../cli/src/settings.c:1043 ../cli/src/settings.c:1044 +#: ../cli/src/settings.c:1123 ../cli/src/settings.c:1124 +#: ../cli/src/settings.c:1125 ../cli/src/settings.c:1126 +#: ../cli/src/settings.c:1127 ../cli/src/settings.c:1128 +#: ../cli/src/settings.c:1129 ../cli/src/settings.c:1130 +#: ../cli/src/settings.c:1131 ../cli/src/settings.c:1132 +#: ../cli/src/settings.c:1133 ../cli/src/settings.c:1134 +#: ../cli/src/settings.c:1135 ../cli/src/settings.c:1210 +msgid "no" +msgstr "否" + +#: ../cli/src/connections.c:457 ../cli/src/connections.c:500 +msgid "System connections" +msgstr "系统连接" + +#: ../cli/src/connections.c:462 ../cli/src/connections.c:513 +msgid "User connections" +msgstr "用户连接" + +#: ../cli/src/connections.c:474 ../cli/src/connections.c:1334 +#: ../cli/src/connections.c:1350 ../cli/src/connections.c:1359 +#: ../cli/src/connections.c:1370 ../cli/src/connections.c:1452 +#: ../cli/src/devices.c:864 ../cli/src/devices.c:874 ../cli/src/devices.c:973 +#: ../cli/src/devices.c:980 +#, c-format +msgid "Error: %s argument is missing." +msgstr "错误:缺少 %s 参数。" + +#: ../cli/src/connections.c:487 +#, c-format +msgid "Error: %s - no such connection." +msgstr "错误:%s - 没有这个连接。" + +#: ../cli/src/connections.c:519 ../cli/src/connections.c:1383 +#: ../cli/src/connections.c:1470 ../cli/src/devices.c:687 +#: ../cli/src/devices.c:754 ../cli/src/devices.c:888 ../cli/src/devices.c:986 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "未知参数:%s\n" + +#: ../cli/src/connections.c:528 +#, c-format +msgid "Error: no valid parameter specified." +msgstr "错误:没有指定有效参数。" + +#: ../cli/src/connections.c:543 ../cli/src/connections.c:1572 +#: ../cli/src/devices.c:1192 ../cli/src/network-manager.c:274 +#, c-format +msgid "Error: %s." +msgstr "错误:%s。" + +#: ../cli/src/connections.c:649 +#, c-format +msgid "Error: 'con status': %s" +msgstr "错误:'con status': %s" + +#: ../cli/src/connections.c:651 +#, c-format +msgid "Error: 'con status': %s; allowed fields: %s" +msgstr "错误:'con status': %s;允许的字段:%s" + +#: ../cli/src/connections.c:658 +msgid "Active connections" +msgstr "活跃连接" + +#: ../cli/src/connections.c:1026 +#, c-format +msgid "no active connection on device '%s'" +msgstr "设备 '%s' 中没有活跃连接" + +#: ../cli/src/connections.c:1034 +#, c-format +msgid "no active connection or device" +msgstr "没有活跃连接或者设备" + +#: ../cli/src/connections.c:1084 +#, c-format +msgid "device '%s' not compatible with connection '%s'" +msgstr "设备 '%s' 不兼容连接 '%s'" + +#: ../cli/src/connections.c:1086 +#, c-format +msgid "no device found for connection '%s'" +msgstr "没有找到可用于连接 '%s' 的设备" + +#: ../cli/src/connections.c:1097 +msgid "activating" +msgstr "激活中" + +#: ../cli/src/connections.c:1099 +msgid "activated" +msgstr "激活的" + +#: ../cli/src/connections.c:1102 ../cli/src/connections.c:1125 +#: ../cli/src/connections.c:1158 ../cli/src/devices.c:224 +#: ../cli/src/devices.c:514 ../cli/src/network-manager.c:92 +#: ../cli/src/network-manager.c:145 ../cli/src/settings.c:469 +msgid "unknown" +msgstr "未知" + +#: ../cli/src/connections.c:1111 +msgid "VPN connecting (prepare)" +msgstr "VPN 连接(准备)" + +#: ../cli/src/connections.c:1113 +msgid "VPN connecting (need authentication)" +msgstr "VPN 连接中(需要验证)" + +#: ../cli/src/connections.c:1115 +msgid "VPN connecting" +msgstr "VPN 连接中" + +#: ../cli/src/connections.c:1117 +msgid "VPN connecting (getting IP configuration)" +msgstr "VPN 连接中(获取 IP 配置)" + +#: ../cli/src/connections.c:1119 +msgid "VPN connected" +msgstr "VNP 连接" + +#: ../cli/src/connections.c:1121 +msgid "VPN connection failed" +msgstr "VPN 连接失败" + +#: ../cli/src/connections.c:1123 +msgid "VPN disconnected" +msgstr "断开 VPN 连接" + +#: ../cli/src/connections.c:1134 +msgid "unknown reason" +msgstr "未知原因" + +#: ../cli/src/connections.c:1136 +msgid "none" +msgstr "无" + +#: ../cli/src/connections.c:1138 +msgid "the user was disconnected" +msgstr "断开连接的用户" + +#: ../cli/src/connections.c:1140 +msgid "the base network connection was interrupted" +msgstr "基点网络连接中断" + +#: ../cli/src/connections.c:1142 +msgid "the VPN service stopped unexpectedly" +msgstr "VPN 服务意外停止" + +#: ../cli/src/connections.c:1144 +msgid "the VPN service returned invalid configuration" +msgstr "VPN 服务返回无效配置" + +#: ../cli/src/connections.c:1146 +msgid "the connection attempt timed out" +msgstr "连接尝试超时" + +#: ../cli/src/connections.c:1148 +msgid "the VPN service did not start in time" +msgstr "VPN 连接没有按时启动" + +#: ../cli/src/connections.c:1150 +msgid "the VPN service failed to start" +msgstr "VPN 服务启动失败" + +#: ../cli/src/connections.c:1152 +msgid "no valid VPN secrets" +msgstr "没有有效 VPN secret" + +#: ../cli/src/connections.c:1154 +msgid "invalid VPN secrets" +msgstr "无效 VPN secret" + +#: ../cli/src/connections.c:1156 +msgid "the connection was removed" +msgstr "连接被删除" + +#: ../cli/src/connections.c:1170 +#, c-format +msgid "state: %s\n" +msgstr "状态:%s\n" + +#: ../cli/src/connections.c:1173 ../cli/src/connections.c:1199 +#, c-format +msgid "Connection activated\n" +msgstr "连接被激活\n" + +#: ../cli/src/connections.c:1176 +#, c-format +msgid "Error: Connection activation failed." +msgstr "错误:激活连接失败。" + +#: ../cli/src/connections.c:1195 +#, c-format +msgid "state: %s (%d)\n" +msgstr "状态:%s (%d)\n" + +#: ../cli/src/connections.c:1205 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "错误:激活连接失败:%s。" + +#: ../cli/src/connections.c:1222 ../cli/src/devices.c:811 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "错误:超时 %d 秒过期。" + +#: ../cli/src/connections.c:1265 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "错误:激活连接失败:%s" + +#: ../cli/src/connections.c:1279 +#, c-format +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "错误:获取 '%s' 的活跃连接失败。" + +#: ../cli/src/connections.c:1288 +#, c-format +msgid "Active connection state: %s\n" +msgstr "活跃连接状态:%s\n" + +#: ../cli/src/connections.c:1289 +#, c-format +msgid "Active connection path: %s\n" +msgstr "活跃连接路径:%s\n" + +#: ../cli/src/connections.c:1343 ../cli/src/connections.c:1461 +#, c-format +msgid "Error: Unknown connection: %s." +msgstr "错误:未知连接:%s" + +#: ../cli/src/connections.c:1378 ../cli/src/devices.c:882 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "错误:超时值 '%s' 无效。" + +#: ../cli/src/connections.c:1391 ../cli/src/connections.c:1478 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "错误:必须指定 id 或者 uuid。" + +#: ../cli/src/connections.c:1411 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "错误:没有找到合适的设备:%s。" + +#: ../cli/src/connections.c:1413 +#, c-format +msgid "Error: No suitable device found." +msgstr "错误:没有找到合适的设备。" + +#: ../cli/src/connections.c:1505 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "警告:连接没有激活\n" + +#: ../cli/src/connections.c:1561 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "错误:'con' 命令 '%s' 无效。" + +#: ../cli/src/connections.c:1597 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "错误:无法连接到 D-Bus。" + +#: ../cli/src/connections.c:1604 +#, c-format +msgid "Error: Could not get system settings." +msgstr "错误:无法获得系统设置。" + +#: ../cli/src/connections.c:1612 +#, c-format +msgid "Error: Could not get user settings." +msgstr "错误:无法获得用户设置。" + +#: ../cli/src/connections.c:1622 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "错误:无法获得连接:设定服务没有运行。" + +#. 0 +#. 9 +#: ../cli/src/devices.c:60 ../cli/src/devices.c:86 ../cli/src/devices.c:162 +msgid "DEVICE" +msgstr "设备" + +#. 1 +#. 4 +#. 0 +#: ../cli/src/devices.c:62 ../cli/src/devices.c:90 +#: ../cli/src/network-manager.c:36 +msgid "STATE" +msgstr "状态" + +#: ../cli/src/devices.c:71 +msgid "GENERAL" +msgstr "常规" + +#. 0 +#: ../cli/src/devices.c:72 +msgid "CAPABILITIES" +msgstr "功能" + +#. 1 +#: ../cli/src/devices.c:73 +msgid "WIFI-PROPERTIES" +msgstr "WIFI 属性" + +#. 2 +#: ../cli/src/devices.c:74 +msgid "AP" +msgstr "AP" + +#. 3 +#: ../cli/src/devices.c:75 +msgid "WIRED-PROPERTIES" +msgstr "有线连接属性" + +#. 4 +#: ../cli/src/devices.c:76 +msgid "IP4-SETTINGS" +msgstr "IP4 设置" + +#. 5 +#: ../cli/src/devices.c:77 +msgid "IP4-DNS" +msgstr "IP4-DNS" + +#. 2 +#: ../cli/src/devices.c:88 +msgid "DRIVER" +msgstr "驱动程序" + +#. 3 +#: ../cli/src/devices.c:89 +msgid "HWADDR" +msgstr "硬盘" + +#. 0 +#: ../cli/src/devices.c:99 +msgid "CARRIER-DETECT" +msgstr "容器探测" + +#. 1 +#: ../cli/src/devices.c:100 +msgid "SPEED" +msgstr "速度" + +#. 0 +#: ../cli/src/devices.c:109 +msgid "CARRIER" +msgstr "容器" + +#. 0 +#: ../cli/src/devices.c:119 +msgid "WEP" +msgstr "WEP" + +#. 1 +#: ../cli/src/devices.c:120 +msgid "WPA" +msgstr "WPA" + +#. 2 +#: ../cli/src/devices.c:121 +msgid "WPA2" +msgstr "WPA2" + +#. 3 +#: ../cli/src/devices.c:122 +msgid "TKIP" +msgstr "TKIP" + +#. 4 +#: ../cli/src/devices.c:123 +msgid "CCMP" +msgstr "CCMP" + +#. 0 +#: ../cli/src/devices.c:132 +msgid "ADDRESS" +msgstr "地址" + +#. 1 +#: ../cli/src/devices.c:133 +msgid "PREFIX" +msgstr "前缀" + +#. 2 +#: ../cli/src/devices.c:134 +msgid "GATEWAY" +msgstr "网关" + +#. 0 +#: ../cli/src/devices.c:143 +msgid "DNS" +msgstr "DNS" + +#. 0 +#: ../cli/src/devices.c:153 +msgid "SSID" +msgstr "SSID" + +#. 1 +#: ../cli/src/devices.c:154 +msgid "BSSID" +msgstr "BSSID" + +#. 2 +#: ../cli/src/devices.c:155 +msgid "MODE" +msgstr "型号" + +#. 3 +#: ../cli/src/devices.c:156 +msgid "FREQ" +msgstr "FREQ" + +#. 4 +#: ../cli/src/devices.c:157 +msgid "RATE" +msgstr "频率" + +#. 5 +#: ../cli/src/devices.c:158 +msgid "SIGNAL" +msgstr "信号" + +#. 6 +#: ../cli/src/devices.c:159 +msgid "SECURITY" +msgstr "安全性" + +#. 7 +#: ../cli/src/devices.c:160 +msgid "WPA-FLAGS" +msgstr "WPA-标志" + +#. 8 +#: ../cli/src/devices.c:161 +msgid "RSN-FLAGS" +msgstr "RSN-标志" + +#. 10 +#: ../cli/src/devices.c:163 +msgid "ACTIVE" +msgstr "活跃" + +#: ../cli/src/devices.c:186 +#, c-format +msgid "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +"\n" +msgstr "" +"用法:nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] | apinfo iface hwaddr ]\n" +"\n" + +#: ../cli/src/devices.c:206 +msgid "unmanaged" +msgstr "未管理的" + +#: ../cli/src/devices.c:208 +msgid "unavailable" +msgstr "不可用的" + +#: ../cli/src/devices.c:210 ../cli/src/network-manager.c:89 +msgid "disconnected" +msgstr "断开连接" + +#: ../cli/src/devices.c:212 +msgid "connecting (prepare)" +msgstr "连接中(准备)" + +#: ../cli/src/devices.c:214 +msgid "connecting (configuring)" +msgstr "连接中(配置中)" + +#: ../cli/src/devices.c:216 +msgid "connecting (need authentication)" +msgstr "连接中(需要验证)" + +#: ../cli/src/devices.c:218 +msgid "connecting (getting IP configuration)" +msgstr "连接中(获得 IP 配置)" + +#: ../cli/src/devices.c:220 ../cli/src/network-manager.c:87 +msgid "connected" +msgstr "连接的" + +#: ../cli/src/devices.c:222 +msgid "connection failed" +msgstr "连接失败" + +#: ../cli/src/devices.c:245 ../cli/src/devices.c:380 +msgid "Unknown" +msgstr "未知" + +#: ../cli/src/devices.c:277 +msgid "(none)" +msgstr "(无)" + +#: ../cli/src/devices.c:302 +#, c-format +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s:转换 IP4 地址 0x%X 出错" + +#: ../cli/src/devices.c:349 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" + +#: ../cli/src/devices.c:350 +#, c-format +msgid "%u MB/s" +msgstr "%u MB/s" + +#: ../cli/src/devices.c:359 +msgid "Encrypted: " +msgstr "加密的:" + +#: ../cli/src/devices.c:364 +msgid "WEP " +msgstr "WEP" + +#: ../cli/src/devices.c:366 +msgid "WPA " +msgstr "WPA" + +#: ../cli/src/devices.c:368 +msgid "WPA2 " +msgstr "WPA2" + +#: ../cli/src/devices.c:371 +msgid "Enterprise " +msgstr "企业级" + +#: ../cli/src/devices.c:380 +msgid "Ad-Hoc" +msgstr "Ad-Hoc" + +#: ../cli/src/devices.c:380 +msgid "Infrastructure" +msgstr "基础构架" + +#: ../cli/src/devices.c:442 +#, c-format +msgid "Error: 'dev list': %s" +msgstr "错误:'dev list': %s" + +#: ../cli/src/devices.c:444 +#, c-format +msgid "Error: 'dev list': %s; allowed fields: %s" +msgstr "错误:'dev list': %s;允许的字段:%s" + +#: ../cli/src/devices.c:453 +msgid "Device details" +msgstr "设备详情" + +#: ../cli/src/devices.c:483 ../cli/src/devices.c:827 +msgid "(unknown)" +msgstr "(未知)" + +#: ../cli/src/devices.c:484 +msgid "unknown)" +msgstr "未知)" + +#: ../cli/src/devices.c:510 +#, c-format +msgid "%u Mb/s" +msgstr "%u Mb/s" + +#. Print header +#. "WIRED-PROPERTIES" +#: ../cli/src/devices.c:583 +msgid "on" +msgstr "开" + +#: ../cli/src/devices.c:583 +msgid "off" +msgstr "关" + +#: ../cli/src/devices.c:710 +#, c-format +msgid "Error: 'dev status': %s" +msgstr "错误:'dev status': %s" + +#: ../cli/src/devices.c:712 +#, c-format +msgid "Error: 'dev status': %s; allowed fields: %s" +msgstr "错误:'dev status': %s;允许的字段:%s" + +#: ../cli/src/devices.c:719 +msgid "Status of devices" +msgstr "设备状态" + +#: ../cli/src/devices.c:747 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "错误:缺少 '%s' 参数。" + +#: ../cli/src/devices.c:776 ../cli/src/devices.c:915 ../cli/src/devices.c:1035 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "错误:没有找到设备 '%s'。" + +#: ../cli/src/devices.c:799 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "成功:成功断开设备 '%s'。" + +#: ../cli/src/devices.c:824 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "错误:断开设备 '%s'(%s)失败:%s" + +#: ../cli/src/devices.c:832 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "设备状态:%d (%s)\n" + +#: ../cli/src/devices.c:896 +#, c-format +msgid "Error: iface has to be specified." +msgstr "错误:没有指定 iface。" + +#: ../cli/src/devices.c:1011 +#, c-format +msgid "Error: 'dev wifi': %s" +msgstr "错误:'dev wifi':%s" + +#: ../cli/src/devices.c:1013 +#, c-format +msgid "Error: 'dev wifi': %s; allowed fields: %s" +msgstr "错误:'dev wifi': %s;允许的字段:%s" + +#: ../cli/src/devices.c:1020 +msgid "WiFi scan list" +msgstr "WiFi 扫描列表" + +#: ../cli/src/devices.c:1055 ../cli/src/devices.c:1109 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "错误:没有找到使用 hwaddr '%s' 的访问点。" + +#: ../cli/src/devices.c:1072 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "错误:设备 '%s' 不是 WiFi 设备。" + +#: ../cli/src/devices.c:1136 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "错误:'dev wifi' 命令 '%s' 无效。" + +#: ../cli/src/devices.c:1183 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "错误:'dev' 命令 '%s' 无效。" + +#: ../cli/src/network-manager.c:35 +msgid "RUNNING" +msgstr "运行中" + +#. 1 +#: ../cli/src/network-manager.c:37 +msgid "WIFI-HARDWARE" +msgstr "WIFI 硬件" + +#. 2 +#: ../cli/src/network-manager.c:38 +msgid "WIFI" +msgstr "WIFI" + +#. 3 +#: ../cli/src/network-manager.c:39 +msgid "WWAN-HARDWARE" +msgstr "WWAN 硬件" + +#. 4 +#: ../cli/src/network-manager.c:40 +msgid "WWAN" +msgstr "WWAN" + +#: ../cli/src/network-manager.c:62 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" +msgstr "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + +#: ../cli/src/network-manager.c:83 +msgid "asleep" +msgstr "asleep" + +#: ../cli/src/network-manager.c:85 +msgid "connecting" +msgstr "连接中" + +#: ../cli/src/network-manager.c:125 +#, c-format +msgid "Error: 'nm status': %s" +msgstr "错误:'nm status': %s" + +#: ../cli/src/network-manager.c:127 +#, c-format +msgid "Error: 'nm status': %s; allowed fields: %s" +msgstr "错误:'nm status': %s;允许的字段:%s" + +#: ../cli/src/network-manager.c:134 +msgid "NetworkManager status" +msgstr "网络管理器状态" + +#. Print header +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "enabled" +msgstr "启用的" + +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "disabled" +msgstr "禁用的" + +#: ../cli/src/network-manager.c:148 +msgid "running" +msgstr "运行中" + +#: ../cli/src/network-manager.c:148 +msgid "not running" +msgstr "没有运行" + +#: ../cli/src/network-manager.c:201 ../cli/src/network-manager.c:233 +#, c-format +msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s" +msgstr "错误:'--fields' 值 '%s' 在此无效;允许的字段:%s" + +#: ../cli/src/network-manager.c:209 +msgid "WiFi enabled" +msgstr "启用 WiFi" + +#: ../cli/src/network-manager.c:220 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "错误:无效 'wifi' 参数:'%s'。" + +#: ../cli/src/network-manager.c:241 +msgid "WWAN enabled" +msgstr "启用 WWAN" + +#: ../cli/src/network-manager.c:252 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "错误:无效 'wwan' 参数:'%s'。" + +#: ../cli/src/network-manager.c:263 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "错误:'nm' 命令 '%s' 无效。" + +#: ../cli/src/nmcli.c:69 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -m[ode] tabular|multiline output mode\n" +" -f[ields] |all|common specify fields to output\n" +" -e[scape] yes|no escape columns separators in " +"values\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"用法:%s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" + +#: ../cli/src/nmcli.c:113 +#, c-format +msgid "Error: Object '%s' is unknown, try 'nmcli help'." +msgstr "错误:对象 '%s' 未知,尝试 'nmcli help'。" + +#: ../cli/src/nmcli.c:143 +#, c-format +msgid "Error: Option '--terse' is specified the second time." +msgstr "错误:第二此指定选项 '--terse'。" + +#: ../cli/src/nmcli.c:148 +#, c-format +msgid "Error: Option '--terse' is mutually exclusive with '--pretty'." +msgstr "错误:选项 '--terse' 与 '--pretty' 相互排斥。" + +#: ../cli/src/nmcli.c:156 +#, c-format +msgid "Error: Option '--pretty' is specified the second time." +msgstr "错误:第二次指定选项 '--pretty'。" + +#: ../cli/src/nmcli.c:161 +#, c-format +msgid "Error: Option '--pretty' is mutually exclusive with '--terse'." +msgstr "错误:选项 '--pretty' 与 '--terse' 相互排斥。" + +#: ../cli/src/nmcli.c:171 ../cli/src/nmcli.c:187 +#, c-format +msgid "Error: missing argument for '%s' option." +msgstr "错误:'%s' 选项缺少参数。" + +#: ../cli/src/nmcli.c:180 ../cli/src/nmcli.c:196 +#, c-format +msgid "Error: '%s' is not valid argument for '%s' option." +msgstr "错误:'%s' 不是 '%s' 选项的有效参数。" + +#: ../cli/src/nmcli.c:203 +#, c-format +msgid "Error: fields for '%s' options are missing." +msgstr "错误:缺少 '%s' 选项字段。" + +#: ../cli/src/nmcli.c:209 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "nmcli 工具,版本 %s\n" + +#: ../cli/src/nmcli.c:215 +#, c-format +msgid "Error: Option '%s' is unknown, try 'nmcli -help'." +msgstr "错误:选项 '%s' 未知,尝试 'nmcli -help'。" + +#: ../cli/src/nmcli.c:234 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "捕获信号 %d,关闭中......" + +#: ../cli/src/nmcli.c:259 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "错误:无法连接到网络管理器。" + +#: ../cli/src/nmcli.c:275 +msgid "Success" +msgstr "成功" + +#: ../cli/src/settings.c:407 +#, c-format +msgid "%d (hex-ascii-key)" +msgstr "%d (hex-ascii-key)" + +#: ../cli/src/settings.c:409 +#, c-format +msgid "%d (104/128-bit passphrase)" +msgstr "%d(104/128 位密码短语)" + +#: ../cli/src/settings.c:412 +#, c-format +msgid "%d (unknown)" +msgstr "%d(未知)" + +#: ../cli/src/settings.c:438 +msgid "0 (unknown)" +msgstr "0(未知)" + +#: ../cli/src/settings.c:444 +msgid "any, " +msgstr "任意," + +#: ../cli/src/settings.c:446 +msgid "900 MHz, " +msgstr "900 MHz," + +#: ../cli/src/settings.c:448 +msgid "1800 MHz, " +msgstr "1800 MHz," + +#: ../cli/src/settings.c:450 +msgid "1900 MHz, " +msgstr "1900 MHz," + +#: ../cli/src/settings.c:452 +msgid "850 MHz, " +msgstr "850 MHz," + +#: ../cli/src/settings.c:454 +msgid "WCDMA 3GPP UMTS 2100 MHz, " +msgstr "WCDMA 3GPP UMTS 2100 MHz," + +#: ../cli/src/settings.c:456 +msgid "WCDMA 3GPP UMTS 1800 MHz, " +msgstr "WCDMA 3GPP UMTS 1800 MHz," + +#: ../cli/src/settings.c:458 +msgid "WCDMA 3GPP UMTS 1700/2100 MHz, " +msgstr "WCDMA 3GPP UMTS 1700/2100 MHz," + +#: ../cli/src/settings.c:460 +msgid "WCDMA 3GPP UMTS 800 MHz, " +msgstr "WCDMA 3GPP UMTS 800 MHz," + +#: ../cli/src/settings.c:462 +msgid "WCDMA 3GPP UMTS 850 MHz, " +msgstr "WCDMA 3GPP UMTS 850 MHz," + +#: ../cli/src/settings.c:464 +msgid "WCDMA 3GPP UMTS 900 MHz, " +msgstr "WCDMA 3GPP UMTS 900 MHz," + +#: ../cli/src/settings.c:466 +msgid "WCDMA 3GPP UMTS 1700 MHz, " +msgstr "WCDMA 3GPP UMTS 1700 MHz," + +#: ../cli/src/settings.c:546 ../cli/src/settings.c:708 +msgid "auto" +msgstr "自动" + +#: ../cli/src/settings.c:704 ../cli/src/settings.c:707 ../cli/src/utils.c:172 +msgid "not set" +msgstr "未设置" + +#: ../cli/src/utils.c:124 +#, c-format +msgid "field '%s' has to be alone" +msgstr "字段 '%s' 必须是单独的" + +#: ../cli/src/utils.c:127 +#, c-format +msgid "invalid field '%s'" +msgstr "无效字段 '%s'" + +#: ../cli/src/utils.c:146 +#, c-format +msgid "Option '--terse' requires specifying '--fields'" +msgstr "选项 '--terse' 要求指定 '--fields'" + +#: ../cli/src/utils.c:150 +#, c-format +msgid "Option '--terse' requires specific '--fields' option values , not '%s'" +msgstr "选项 '--terse' 需要特定 '--fields' 选项值,不是 '%s'" #: ../libnm-util/crypto.c:120 #, c-format @@ -60,7 +1199,7 @@ msgstr "错误的 PEM 文件格式:DEK-Info 标签中的初始向量格式无 #: ../libnm-util/crypto.c:203 #, c-format msgid "Malformed PEM file: unknown private key cipher '%s'." -msgstr "" +msgstr "对 PEM 文件进行操作:未知专用密钥 '%s'。" #: ../libnm-util/crypto.c:222 #, c-format @@ -90,7 +1229,7 @@ msgstr "没有足够的空间储存文件数据。" #: ../libnm-util/crypto.c:324 #, c-format msgid "IV must be an even number of bytes in length." -msgstr "" +msgstr "IV 长度必须是偶数字节。" #: ../libnm-util/crypto.c:333 #, c-format @@ -102,11 +1241,12 @@ msgstr "没有足够的空间储存初始向量。" msgid "IV contains non-hexadecimal digits." msgstr "初始向量中包含非十六进制数字。" -#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:143 -#: ../libnm-util/crypto_nss.c:169 +#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:336 #, c-format msgid "Private key cipher '%s' was unknown." -msgstr "" +msgstr "未知专用密钥密码 '%s'。" #: ../libnm-util/crypto.c:391 #, c-format @@ -123,72 +1263,106 @@ msgstr "无法确定私钥类型。" msgid "Not enough memory to store decrypted private key." msgstr "没有足够的空间储存解密后的私钥。" -#: ../libnm-util/crypto_gnutls.c:46 +#: ../libnm-util/crypto_gnutls.c:49 msgid "Failed to initialize the crypto engine." msgstr "初始化加密引擎失败。" -#: ../libnm-util/crypto_gnutls.c:90 +#: ../libnm-util/crypto_gnutls.c:93 #, c-format msgid "Failed to initialize the MD5 engine: %s / %s." msgstr "初始化 MD5 引擎失败:%s / %s。" -#: ../libnm-util/crypto_gnutls.c:152 ../libnm-util/crypto_nss.c:178 +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "无效 IV 长度(必须至少为 %zd)。" + +#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188 #, c-format msgid "Not enough memory for decrypted key buffer." msgstr "没有足够的空间作为已解密密钥缓冲。" -#: ../libnm-util/crypto_gnutls.c:160 +#: ../libnm-util/crypto_gnutls.c:173 #, c-format msgid "Failed to initialize the decryption cipher context: %s / %s." -msgstr "" +msgstr "初始化解密计算内容失败:%s / %s。" -#: ../libnm-util/crypto_gnutls.c:169 +#: ../libnm-util/crypto_gnutls.c:182 #, c-format msgid "Failed to set symmetric key for decryption: %s / %s." -msgstr "" +msgstr "为解密设定对称密钥失败:%s / %s。" -#: ../libnm-util/crypto_gnutls.c:178 +#: ../libnm-util/crypto_gnutls.c:191 #, c-format msgid "Failed to set IV for decryption: %s / %s." msgstr "为解密设置初始向量失败:%s / %s。" -#: ../libnm-util/crypto_gnutls.c:187 +#: ../libnm-util/crypto_gnutls.c:200 #, c-format msgid "Failed to decrypt the private key: %s / %s." msgstr "解密私钥失败:%s / %s" -#: ../libnm-util/crypto_gnutls.c:200 +#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 +#, c-format +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "解密私钥失败:意外的填充长度。" + +#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 #, c-format msgid "Failed to decrypt the private key." msgstr "解密私钥失败。" -#: ../libnm-util/crypto_gnutls.c:235 +#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "无法为加密分配内存。" + +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "初始化加密计算内容失败:%s / %s。" + +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "为加密设置对称密钥失败:%s / %s。" + +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +msgid "Failed to set IV for encryption: %s / %s." +msgstr "为加密设置 IV 失败:%s / %s。" + +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +msgid "Failed to encrypt the data: %s / %s." +msgstr "加密数据失败:%s / %s。" + +#: ../libnm-util/crypto_gnutls.c:362 #, c-format msgid "Error initializing certificate data: %s" msgstr "初始化证书数据出错:%s" -#: ../libnm-util/crypto_gnutls.c:257 +#: ../libnm-util/crypto_gnutls.c:384 #, c-format msgid "Couldn't decode certificate: %s" msgstr "无法解码证书:%s" -#: ../libnm-util/crypto_gnutls.c:281 +#: ../libnm-util/crypto_gnutls.c:408 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %s" msgstr "无法初始化 PKCS#12 解码器:%s" -#: ../libnm-util/crypto_gnutls.c:294 +#: ../libnm-util/crypto_gnutls.c:421 #, c-format msgid "Couldn't decode PKCS#12 file: %s" msgstr "无法解码 PKCS#12 文件:%s" -#: ../libnm-util/crypto_gnutls.c:306 +#: ../libnm-util/crypto_gnutls.c:433 #, c-format msgid "Couldn't verify PKCS#12 file: %s" msgstr "无法校验 PKCS#12 文件:%s" -#: ../libnm-util/crypto_nss.c:57 -#: ../system-settings/plugins/ifcfg-rh/crypto.c:52 +#: ../libnm-util/crypto_nss.c:56 #, c-format msgid "Failed to initialize the crypto engine: %d." msgstr "初始化加密引擎失败:%d。" @@ -198,100 +1372,184 @@ msgstr "初始化加密引擎失败:%d。" msgid "Failed to initialize the MD5 context: %d." msgstr "初始化 MD5 环境失败:%d。" -#: ../libnm-util/crypto_nss.c:186 +#: ../libnm-util/crypto_nss.c:179 #, c-format -msgid "Failed to initialize the decryption cipher slot." -msgstr "" +msgid "Invalid IV length (must be at least %d)." +msgstr "无效 IV 长度(必须至少 %d)。" #: ../libnm-util/crypto_nss.c:196 #, c-format -msgid "Failed to set symmetric key for decryption." -msgstr "" +msgid "Failed to initialize the decryption cipher slot." +msgstr "初始化解密计算插槽失败。" #: ../libnm-util/crypto_nss.c:206 #, c-format +msgid "Failed to set symmetric key for decryption." +msgstr "为解密设置对称密钥失败。" + +#: ../libnm-util/crypto_nss.c:216 +#, c-format msgid "Failed to set IV for decryption." msgstr "为解密设置初始向量失败。" -#: ../libnm-util/crypto_nss.c:214 +#: ../libnm-util/crypto_nss.c:224 #, c-format msgid "Failed to initialize the decryption context." msgstr "初始化解密环境失败。" -#: ../libnm-util/crypto_nss.c:227 +#: ../libnm-util/crypto_nss.c:237 #, c-format msgid "Failed to decrypt the private key: %d." msgstr "解密私钥失败:%d。" -#: ../libnm-util/crypto_nss.c:239 +#: ../libnm-util/crypto_nss.c:245 +#, c-format +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "解密私钥失败:解密数据太大。" + +#: ../libnm-util/crypto_nss.c:256 #, c-format msgid "Failed to finalize decryption of the private key: %d." msgstr "结束解密私钥失败:%d。" -#: ../libnm-util/crypto_nss.c:284 +#: ../libnm-util/crypto_nss.c:364 +#, c-format +msgid "Failed to initialize the encryption cipher slot." +msgstr "初始化加密计算插槽失败。" + +#: ../libnm-util/crypto_nss.c:372 +#, c-format +msgid "Failed to set symmetric key for encryption." +msgstr "为加密设置对称密钥失败。" + +#: ../libnm-util/crypto_nss.c:380 +#, c-format +msgid "Failed to set IV for encryption." +msgstr "为加密设置 IV 失败。" + +#: ../libnm-util/crypto_nss.c:388 +#, c-format +msgid "Failed to initialize the encryption context." +msgstr "初始化加密内容失败。" + +#: ../libnm-util/crypto_nss.c:396 +#, c-format +msgid "Failed to encrypt: %d." +msgstr "加密失败:%d。" + +#: ../libnm-util/crypto_nss.c:404 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "加密后意外的数据量。" + +#: ../libnm-util/crypto_nss.c:447 #, c-format msgid "Couldn't decode certificate: %d" msgstr "无法解码证书:%d" -#: ../libnm-util/crypto_nss.c:319 +#: ../libnm-util/crypto_nss.c:482 #, c-format msgid "Couldn't convert password to UCS2: %d" msgstr "无法将密码转换为 USC2 方式:%d" -#: ../libnm-util/crypto_nss.c:347 +#: ../libnm-util/crypto_nss.c:510 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %d" msgstr "无法初始化 PKCS#12 解码器:%d" -#: ../libnm-util/crypto_nss.c:356 +#: ../libnm-util/crypto_nss.c:519 #, c-format msgid "Couldn't decode PKCS#12 file: %d" msgstr "无法解码 PKCS#12 文件:%d" -#: ../libnm-util/crypto_nss.c:365 +#: ../libnm-util/crypto_nss.c:528 #, c-format msgid "Couldn't verify PKCS#12 file: %d" msgstr "无法校验 PKCS#12 文件:%d" -#: ../src/nm-netlink-monitor.c:194 ../src/nm-netlink-monitor.c:464 +#: ../libnm-util/crypto_nss.c:557 +msgid "Could not generate random data." +msgstr "无法生成随机数据。" + +#: ../libnm-util/nm-utils.c:1925 +#, c-format +msgid "Not enough memory to make encryption key." +msgstr "没有足够的空间生成加密密钥。" + +#: ../libnm-util/nm-utils.c:2035 +msgid "Could not allocate memory for PEM file creation." +msgstr "无法为创建 PEM 文件分配内存。" + +#: ../libnm-util/nm-utils.c:2047 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "无法为在 PEM 文件中写入 IV 分配内存。" + +#: ../libnm-util/nm-utils.c:2059 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "无法为在 PEM 文件中写入加密密钥分配内存。" + +#: ../libnm-util/nm-utils.c:2078 +#, c-format +msgid "Could not allocate memory for PEM file data." +msgstr "无法为 PEM 文件数据分配内存。" + +#: ../src/nm-netlink-monitor.c:100 ../src/nm-netlink-monitor.c:231 +#: ../src/nm-netlink-monitor.c:653 #, c-format msgid "error processing netlink message: %s" msgstr "处理网路信息出错:%s" -#: ../src/nm-netlink-monitor.c:260 -#, c-format -msgid "unable to allocate netlink handle for monitoring link status: %s" -msgstr "无法为监视连接状态分配网路句柄:%s" +#: ../src/nm-netlink-monitor.c:214 +msgid "error occurred while waiting for data on socket" +msgstr "等候套接字上的数据时发生了错误" -#: ../src/nm-netlink-monitor.c:270 +#: ../src/nm-netlink-monitor.c:254 #, c-format msgid "unable to connect to netlink for monitoring link status: %s" msgstr "无法为监视连接状态连接到网路:%s" -#: ../src/nm-netlink-monitor.c:278 +#: ../src/nm-netlink-monitor.c:265 #, c-format -msgid "unable to join netlink group for monitoring link status: %s" -msgstr "无法为监视连接状态加入网路组:%s" +msgid "unable to enable netlink handle credential passing: %s" +msgstr "无法启用网络链接句柄证书通过:%s" -#: ../src/nm-netlink-monitor.c:286 +#: ../src/nm-netlink-monitor.c:291 ../src/nm-netlink-monitor.c:353 +#, c-format +msgid "unable to allocate netlink handle for monitoring link status: %s" +msgstr "无法为监视连接状态分配网路句柄:%s" + +#: ../src/nm-netlink-monitor.c:376 #, c-format msgid "unable to allocate netlink link cache for monitoring link status: %s" msgstr "无法为监视连接状态分配网路连接:%s" -#: ../src/nm-netlink-monitor.c:494 -msgid "error occurred while waiting for data on socket" -msgstr "等候套接字上的数据时发生了错误" +#: ../src/nm-netlink-monitor.c:502 +#, c-format +msgid "unable to join netlink group: %s" +msgstr "无法加入网络链接组群:%s" -#: ../src/NetworkManager.c:330 +#: ../src/nm-netlink-monitor.c:629 ../src/nm-netlink-monitor.c:642 +#, c-format +msgid "error updating link cache: %s" +msgstr "更新链接缓存出错:%s" + +#: ../src/main.c:502 #, c-format msgid "Invalid option. Please use --help to see a list of valid options.\n" msgstr "无效选项。请使用 --help 查看有效选项列表。\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:304 +#: ../src/main.c:562 +#, c-format +msgid "%s. Please use --help to see a list of valid options.\n" +msgstr "%s。请使用 --help 查看有效选项列表。\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:325 msgid "# Created by NetworkManager\n" msgstr "# 由 NetworkManger 创建\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:310 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:341 #, c-format msgid "" "# Merged from %s\n" @@ -300,20 +1558,47 @@ msgstr "" "# 合并自 %s\n" "\n" -#: ../src/named-manager/nm-named-manager.c:315 +#: ../src/dhcp-manager/nm-dhcp-manager.c:279 +msgid "no usable DHCP client could be found." +msgstr "找到无法使用的 DHCP 客户端。" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:288 +msgid "'dhclient' could be found." +msgstr "找到 'dhclient'。" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:298 +msgid "'dhcpcd' could be found." +msgstr "找到 'dhcpcd'。" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:306 +#, c-format +msgid "unsupported DHCP client '%s'" +msgstr "不支持的 DHCP 客户端 '%s'" + +#: ../src/logging/nm-logging.c:146 +#, c-format +msgid "Unknown log level '%s'" +msgstr "未知日志等级 '%s'" + +#: ../src/logging/nm-logging.c:171 +#, c-format +msgid "Unknown log domain '%s'" +msgstr "未知日志域 '%s'" + +#: ../src/named-manager/nm-named-manager.c:343 msgid "NOTE: the libc resolver may not support more than 3 nameservers." msgstr "注意:libc 解析器可能不支持超过三个名字服务器。" -#: ../src/named-manager/nm-named-manager.c:317 +#: ../src/named-manager/nm-named-manager.c:345 msgid "The nameservers listed below may not be recognized." msgstr "以下列出的名字服务器可能无法被识别。" -#: ../src/system-settings/nm-default-wired-connection.c:194 +#: ../src/system-settings/nm-default-wired-connection.c:157 #, c-format msgid "Auto %s" msgstr "自动 %s" -#: ../system-settings/plugins/ifcfg-rh/reader.c:2446 +#: ../system-settings/plugins/ifcfg-rh/reader.c:3256 msgid "System" msgstr "系统" @@ -349,642 +1634,3 @@ msgstr "系统策略阻止使用受保护的 WiFi 网络共享连接" msgid "System policy prevents sharing connections via an open WiFi network" msgstr "系统策略组织使用公开 WiFi 网络共享连接" -#~ msgid "Passphrase for wireless network %s" -#~ msgstr "无线网络 %s 的密码句" - -#~ msgid "Connection to the wireless network '%s' failed." -#~ msgstr "到无线网络“%s”的连接失败。" - -#~ msgid "Connection to the wired network failed." -#~ msgstr "连接到有线网络失败。" - -#~ msgid "Error displaying connection information:" -#~ msgstr "显示连接信息出错:" - -#~ msgid "Could not find some required resources (the glade file)!" -#~ msgstr "序找不到所需的资源(glade 文件未找到)!" - -#~ msgid "Wired Ethernet (%s)" -#~ msgstr "有线以太网(%s)" - -#~ msgid "Wireless Ethernet (%s)" -#~ msgstr "无线以太网(%s)" - -#~ msgid "NetworkManager Applet" -#~ msgstr "网络管理器小程序" - -#~ msgid "Copyright © 2004-2005 Red Hat, Inc." -#~ msgstr "版权 (C) 2004-2005 Red Hat, Inc." - -#~ msgid "" -#~ "Notification area applet for managing your network devices and " -#~ "connections." -#~ msgstr "管理您网络设备和连接的通知区域小程序" - -#~ msgid "translator-credits" -#~ msgstr "Funda Wang " - -#~ msgid "VPN Login Failure" -#~ msgstr "VPN 登录失败" - -#~ msgid "Could not start the VPN connection '%s' due to a login failure." -#~ msgstr "无法启动 VPN 连接“%s”,原因是登录失败。" - -#~ msgid "VPN Start Failure" -#~ msgstr "VPN 启动失败" - -#~ msgid "" -#~ "Could not start the VPN connection '%s' due to a failure launching the " -#~ "VPN program." -#~ msgstr "无法启动 VPN 连接“%s”,原因是调用 VPN 程序失败。" - -#~ msgid "VPN Connect Failure" -#~ msgstr "VPN 连接失败" - -#~ msgid "Could not start the VPN connection '%s' due to a connection error." -#~ msgstr "无法启动 VPN 连接“%s”,原因是连接出错。" - -#~ msgid "VPN Configuration Error" -#~ msgstr "VPN 配置错误" - -#~ msgid "The VPN connection '%s' was not correctly configured." -#~ msgstr "VPN 连接“%s”未正确配置。" - -#~ msgid "" -#~ "Could not start the VPN connection '%s' because the VPN server did not " -#~ "return an adequate network configuration." -#~ msgstr "无法启动 VPN 连接“%s”,原因是 VPN 服务器未返回足够的网络配置。" - -#~ msgid "VPN Login Message" -#~ msgstr "VPN 登录消息" - -#~ msgid "" -#~ "The NetworkManager Applet could not find some required resources (the " -#~ "glade file was not found)." -#~ msgstr "网络管理器小程序找不到所需的资源(glade 文件未找到)。" - -#~ msgid "The network device \"%s (%s)\" does not support wireless scanning." -#~ msgstr "网络设备“%s(%s)”不支持无线扫描。" - -#~ msgid "The network device \"%s (%s)\" does not support link detection." -#~ msgstr "网络设备“%s(%s)”不支持链接检测。" - -#~ msgid "Preparing device %s for the wired network..." -#~ msgstr "正在为有线网络准备设备 %s..." - -#~ msgid "Preparing device %s for the wireless network '%s'..." -#~ msgstr "正在为无线网络“%2$s”准备设备 %1$s..." - -#~ msgid "Configuring device %s for the wired network..." -#~ msgstr "正在为有线网络配置设备 %s..." - -#~ msgid "Attempting to join the wireless network '%s'..." -#~ msgstr "正在试图加入无线网络“%s”..." - -#~ msgid "Waiting for Network Key for the wireless network '%s'..." -#~ msgstr "正在等待无线网络“%s”的网络密钥..." - -#~ msgid "Requesting a network address from the wired network..." -#~ msgstr "正在从有线网络请求网络地址..." - -#~ msgid "Requesting a network address from the wireless network '%s'..." -#~ msgstr "正在从无线网络“%s”请求网络地址..." - -#~ msgid "Finishing connection to the wired network..." -#~ msgstr "正在完成到有线网络的连接..." - -#~ msgid "Finishing connection to the wireless network '%s'..." -#~ msgstr "正在完成到无线网络“%s”的连接..." - -#~ msgid "NetworkManager is not running" -#~ msgstr "网络管理器未运行" - -#~ msgid "Networking disabled" -#~ msgstr "网络已禁用" - -#~ msgid "No network connection" -#~ msgstr "没有网络连接" - -#~ msgid "Wired network connection" -#~ msgstr "有线网络连接" - -#~ msgid "Connected to an Ad-Hoc wireless network" -#~ msgstr "已连接到 Ad-Hoc 无线网络" - -#~ msgid "Wireless network connection to '%s' (%d%%)" -#~ msgstr "到“%s”的无线网络连接(%d%%)" - -#~ msgid "VPN connection to '%s'" -#~ msgstr "到“%s”的 VPN 连接" - -#~ msgid "VPN connecting to '%s'" -#~ msgstr "连接到“%s”的 VPN" - -#~ msgid "_Connect to Other Wireless Network..." -#~ msgstr "连接到其它无线网络(_C)..." - -#~ msgid "Create _New Wireless Network..." -#~ msgstr "创建新的无线网络(_N)..." - -#~ msgid "_VPN Connections" -#~ msgstr "_VPN 连接" - -#~ msgid "_Configure VPN..." -#~ msgstr "配置 VPN(_C)..." - -#~ msgid "_Disconnect VPN..." -#~ msgstr "断开 VPN(_D)..." - -#~ msgid "_Dial Up Connections" -#~ msgstr "拨号连接(_D)" - -#~ msgid "Connect to %s..." -#~ msgstr "正在连接到 %s..." - -#~ msgid "Disconnect from %s..." -#~ msgstr "正在从 %s 断开..." - -#~ msgid "No network devices have been found" -#~ msgstr "没有发现网络设备" - -#~ msgid "NetworkManager is not running..." -#~ msgstr "网络管理器未运行..." - -#~ msgid "Enable _Networking" -#~ msgstr "启用联网(_N)" - -#~ msgid "Enable _Wireless" -#~ msgstr "启用无线(_W)" - -#~ msgid "Connection _Information" -#~ msgstr "连接信息(_I)" - -#~ msgid "_Help" -#~ msgstr "帮助(_H)" - -#~ msgid "_About" -#~ msgstr "关于(_A)" - -#~ msgid "" -#~ "The NetworkManager applet could not find some required resources. It " -#~ "cannot continue.\n" -#~ msgstr "网络管理器小程序找不到所需的资源。无法继续。\n" - -#~ msgid "Shared Key" -#~ msgstr "共享密钥" - -#~ msgid "Automatic (Default)" -#~ msgstr "自动(默认)" - -#~ msgid "AES-CCMP" -#~ msgstr "AES-CCMP" - -#~ msgid "TKIP" -#~ msgstr "TKIP" - -#~ msgid "Dynamic WEP" -#~ msgstr "动态 WEP" - -#~ msgid "None" -#~ msgstr "无" - -#~ msgid "WEP 64/128-bit ASCII" -#~ msgstr "WEP 64/128 位 ASCII" - -#~ msgid "WEP 64/128-bit Hex" -#~ msgstr "WEP 64/128 位十六进制" - -#~ msgid "WEP 128-bit Passphrase" -#~ msgstr "WEP 128 位密码句" - -#~ msgid "PEAP" -#~ msgstr "PEAP" - -#~ msgid "TLS" -#~ msgstr "TLS" - -#~ msgid "TTLS" -#~ msgstr "TTLS" - -#~ msgid "WPA2 Enterprise" -#~ msgstr "WPA2 企业" - -#~ msgid "WPA Enterprise" -#~ msgstr "WPA 企业" - -#~ msgid "WPA2 Personal" -#~ msgstr "WPA2 个人" - -#~ msgid "WPA Personal" -#~ msgstr "WPA 个人" - -#~ msgid "Orientation" -#~ msgstr "方向" - -#~ msgid "The orientation of the tray." -#~ msgstr "托盘方向。" - -#~ msgid "Wired Network (%s)" -#~ msgstr "有线网络(%s)" - -#~ msgid "_Wired Network" -#~ msgstr "有线网络(_W)" - -#~ msgid "Wireless Network (%s)" -#~ msgid_plural "Wireless Networks (%s)" -#~ msgstr[0] "无线网络(%s)" - -#~ msgid "Wireless Network" -#~ msgid_plural "Wireless Networks" -#~ msgstr[0] "无线网络" - -#~ msgid " (invalid Unicode)" -#~ msgstr " (无效的 Unicode)" - -#~ msgid "" -#~ "By default, the wireless network's name is set to your computer's name, %" -#~ "s, with no encryption enabled" -#~ msgstr "" -#~ "默认情况下,无线网络的名称会设定为您的计算机名称,%s,如果没有加密的话" - -#~ msgid "Create new wireless network" -#~ msgstr "创建新的无线网络" - -#~ msgid "" -#~ "Enter the name and security settings of the wireless network you wish to " -#~ "create." -#~ msgstr "输入您想要创建的无线网络的名称和安全设置。" - -#~ msgid "Create New Wireless Network" -#~ msgstr "创建新的无线网络" - -#~ msgid "Existing wireless network" -#~ msgstr "现有无线网络" - -#~ msgid "Enter the name of the wireless network to which you wish to connect." -#~ msgstr "输入您想要连接的无线网络的名称。" - -#~ msgid "Connect to Other Wireless Network" -#~ msgstr "连接到其它无线网络" - -#~ msgid "Error connecting to wireless network" -#~ msgstr "连接到无线网络出错" - -#~ msgid "" -#~ "The requested wireless network requires security capabilities unsupported " -#~ "by your hardware." -#~ msgstr "您的硬件不支持请求的无线网络所需的安全特性。" - -#~ msgid "Cannot start VPN connection '%s'" -#~ msgstr "无法启动 VPN 连接“%s”" - -#~ msgid "" -#~ "Could not find the authentication dialog for VPN connection type '%s'. " -#~ "Contact your system administrator." -#~ msgstr "找不到 VPN 连接类型“%s”的身份验证对话。请联系您的系统管理员。" - -#~ msgid "" -#~ "There was a problem launching the authentication dialog for VPN " -#~ "connection type '%s'. Contact your system administrator." -#~ msgstr "调用 VPN 连接类型“%s”的身份验证对话有问题。请联系您的系统管理员。" - -#~ msgid " " -#~ msgstr " " - -#~ msgid "" -#~ "Active Connection Information" -#~ msgstr "活动连接信息" - -#~ msgid "" -#~ "Passphrase Required by Wireless " -#~ "Network\n" -#~ "\n" -#~ "A passphrase or encryption key is required to access the wireless network " -#~ "'%s'." -#~ msgstr "" -#~ "无线网络需要密码句\n" -#~ "\n" -#~ "要访问无线网络“%s”,需要提供密码句或加密密钥。" - -#~ msgid "" -#~ "Reduced Network Functionality\n" -#~ "\n" -#~ "%s It will not be completely functional." -#~ msgstr "" -#~ "削减的网络功能\n" -#~ "\n" -#~ "%s 该网络无法完整工作。" - -#~ msgid "" -#~ "Wireless Network Login " -#~ "Confirmation\n" -#~ "\n" -#~ "You have chosen to log in to the wireless network '%s'. If you are sure " -#~ "that this wireless network is secure, click the checkbox below and " -#~ "NetworkManager will not require confirmation on subsequent log ins." -#~ msgstr "" -#~ "无线网络登录确认\n" -#~ "\n" -#~ "您选择登录到无线网络“%s”。如果您确定此无线网络是安全的,请选中下面的复选" -#~ "框,网络管理器在以后登录时将不会请求确认。" - -#~ msgid "Anonymous Identity:" -#~ msgstr "匿名身份:" - -#~ msgid "Authentication:" -#~ msgstr "认证:" - -#~ msgid "Broadcast Address:" -#~ msgstr "广播地址:" - -#~ msgid "CA Certificate File:" -#~ msgstr "CA 证书文件:" - -#~ msgid "C_onnect" -#~ msgstr "连接(_O)" - -#~ msgid "Client Certificate File:" -#~ msgstr "客户端证书文件:" - -#~ msgid "Connection Information" -#~ msgstr "连接信息" - -#~ msgid "Default Route:" -#~ msgstr "默认路由:" - -#~ msgid "Destination Address:" -#~ msgstr "目的地址:" - -#~ msgid "Driver:" -#~ msgstr "驱动程序:" - -#~ msgid "EAP Method:" -#~ msgstr "EAP 方法:" - -#~ msgid "Hardware Address:" -#~ msgstr "硬件地址:" - -#~ msgid "IP Address:" -#~ msgstr "IP 地址:" - -#~ msgid "Identity:" -#~ msgstr "身份:" - -#~ msgid "Interface:" -#~ msgstr "接口:" - -#~ msgid "Key Type:" -#~ msgstr "密钥类型:" - -#~ msgid "Key:" -#~ msgstr "密钥:" - -#~ msgid "" -#~ "None\n" -#~ "WEP 128-bit Passphrase\n" -#~ "WEP 64/128-bit Hex\n" -#~ "WEP 64/128-bit ASCII\n" -#~ msgstr "" -#~ "无\n" -#~ "WEP 128 位密码句\n" -#~ "WEP 64/128 位十六进制\n" -#~ "WEP 64/128 位 ASCII\n" - -#~ msgid "" -#~ "Open System\n" -#~ "Shared Key" -#~ msgstr "" -#~ "开放式系统\n" -#~ "共享密钥" - -#~ msgid "Other Wireless Network..." -#~ msgstr "其它无线网络..." - -#~ msgid "Passphrase:" -#~ msgstr "密码句:" - -#~ msgid "Password:" -#~ msgstr "密码:" - -#~ msgid "Primary DNS:" -#~ msgstr "主 DNS:" - -#~ msgid "Private Key File:" -#~ msgstr "私钥文件:" - -#~ msgid "Private Key Password:" -#~ msgstr "私用密钥密码:" - -#~ msgid "Secondary DNS:" -#~ msgstr "辅 DNS:" - -#~ msgid "Select the CA Certificate File" -#~ msgstr "选择 CA 证书文件" - -#~ msgid "Select the Client Certificate File" -#~ msgstr "选择客户端证书文件" - -#~ msgid "Select the Private Key File" -#~ msgstr "选择私钥文件" - -#~ msgid "Show key" -#~ msgstr "显示密钥" - -#~ msgid "Show passphrase" -#~ msgstr "显示密码句" - -#~ msgid "Show password" -#~ msgstr "显示密码" - -#~ msgid "Show passwords" -#~ msgstr "显示密码" - -#~ msgid "Speed:" -#~ msgstr "速度:" - -#~ msgid "Subnet Mask:" -#~ msgstr "子网掩码:" - -#~ msgid "Type:" -#~ msgstr "类型:" - -#~ msgid "User Name:" -#~ msgstr "用户名:" - -#~ msgid "Wireless Network Key Required" -#~ msgstr "需要无线网络密钥" - -#~ msgid "Wireless _adapter:" -#~ msgstr "无线适配器(_A):" - -#~ msgid "_Always Trust this Wireless Network" -#~ msgstr "总是信任此无线网络(_A)" - -#~ msgid "_Don't remind me again" -#~ msgstr "以后不再提醒(_D)" - -#~ msgid "_Login to Network" -#~ msgstr "登录到网络(_L)" - -#~ msgid "_Network Name:" -#~ msgstr "网络名称(_N):" - -#~ msgid "_Wireless Security:" -#~ msgstr "无线安全性(_W):" - -#~ msgid "Cannot add VPN connection" -#~ msgstr "无法添加 VPN 连接" - -#~ msgid "" -#~ "No suitable VPN software was found on your system. Contact your system " -#~ "administrator." -#~ msgstr "您的系统上未找到合适的 VPN 软件。请联系您的系统管理员。" - -#~ msgid "Cannot import VPN connection" -#~ msgstr "无法导入 VPN 连接" - -#~ msgid "" -#~ "Cannot find suitable software for VPN connection type '%s' to import the " -#~ "file '%s'. Contact your system administrator." -#~ msgstr "" -#~ "找不到合适的软件来导入 VPN 连接类型“%s”的文件“%s”。请联系您的系统管理员。" - -#~ msgid "Error retrieving VPN connection '%s'" -#~ msgstr "获取 VPN 连接“%s”出错" - -#~ msgid "" -#~ "Could not find the UI files for VPN connection type '%s'. Contact your " -#~ "system administrator." -#~ msgstr "找不到 VPN 连接类型“%s”的用户界面文件。请联系您的系统管理员。" - -#~ msgid "Delete VPN connection \"%s\"?" -#~ msgstr "删除 VPN 连接“%s”吗?" - -#~ msgid "" -#~ "All information about the VPN connection \"%s\" will be lost and you may " -#~ "need your system administrator to provide information to create a new " -#~ "connection." -#~ msgstr "" -#~ "关于 VPN 连接“%s”的全部信息都将丢失。要创建新连接的话,您就必须请求您的系" -#~ "统管理员提供相应信息。" - -#~ msgid "Unable to load" -#~ msgstr "无法装入" - -#~ msgid "Cannot find some needed resources (the glade file)!" -#~ msgstr "找不到所需的资源(glade 文件)!" - -#~ msgid "Edit VPN Connection" -#~ msgstr "编辑 VPN 连接" - -#~ msgid "Add a new VPN connection" -#~ msgstr "添加新的 VPN 连接" - -#~ msgid "Choose which type of VPN connection you wish to create." -#~ msgstr "选择您想要创建的 VPN 连接类型。" - -#~ msgid "Connect to:" -#~ msgstr "连接到:" - -#~ msgid "Create VPN Connection" -#~ msgstr "创建 VPN 连接" - -#~ msgid "Create VPN Connection - 1 of 2" -#~ msgstr "创建 VPN 连接 - 第一步,共两步" - -#~ msgid "Create VPN Connection - 2 of 2" -#~ msgstr "创建 VPN 连接 - 第二步,共两步" - -#~ msgid "Delete the selected VPN connection" -#~ msgstr "删除选中的 VPN 连接" - -#~ msgid "E_xport" -#~ msgstr "导出(_X)" - -#~ msgid "Edit the selected VPN connection" -#~ msgstr "编辑选中的 VPN 连接" - -#~ msgid "Export the VPN settings to a file" -#~ msgstr "将 VPN 设置导出到文件" - -#~ msgid "Export the selected VPN connection to a file" -#~ msgstr "将选中的 VPN 连接导出到文件" - -#~ msgid "Finish Creating VPN Connection" -#~ msgstr "创建 VPN 连接完成" - -#~ msgid "Manage Virtual Private Network Connections" -#~ msgstr "管理虚拟私网连接" - -#~ msgid "" -#~ "This assistant will guide you through the creation of a connection to a " -#~ "Virtual Private Network (VPN).\n" -#~ "\n" -#~ "It will require some information, such as IP addresses and secrets. " -#~ "Please see your system administrator to obtain this information." -#~ msgstr "" -#~ "此助手将指引您创建到虚拟私网(VPN)的连接。\n" -#~ "\n" -#~ "此向导需要您提供的某些信息,比如 IP 地址和机密问题,您可能需要求助系统管理" -#~ "员才能知晓。" - -#~ msgid "VPN Connections" -#~ msgstr "VPN 连接" - -#~ msgid "40-bit WEP" -#~ msgstr "40 位 WEP" - -#~ msgid "104-bit WEP" -#~ msgstr "104 位 WEP" - -#~ msgid "WPA TKIP" -#~ msgstr "WPA TKIP" - -#~ msgid "WPA CCMP" -#~ msgstr "WPA CCMP" - -#~ msgid "WPA Automatic" -#~ msgstr "WPA 自动" - -#~ msgid "WPA2 TKIP" -#~ msgstr "WPA2 TKIP" - -#~ msgid "WPA2 CCMP" -#~ msgstr "WPA2 CCMP" - -#~ msgid "WPA2 Automatic" -#~ msgstr "WPA2 自动" - -#~ msgid "none" -#~ msgstr "无" - -#~ msgid "operation took too long" -#~ msgstr "操作时间太长" - -#~ msgid "received data from wrong type of sender" -#~ msgstr "从错误的发送者类型收到数据" - -#~ msgid "received data from unexpected sender" -#~ msgstr "从未知的发送者收到数据" - -#~ msgid "too much data was sent over socket and some of it was lost" -#~ msgstr "向套接字发送的数据太多,其中有些已经丢失" - -#~ msgid "You are now connected to the Ad-Hoc wireless network '%s'." -#~ msgstr "您现在已连接到 Ad-Hoc 无线网络“%s”。" - -#~ msgid "You are now connected to the wireless network '%s'." -#~ msgstr "您现在已连接到无线网络“%s”。" - -#~ msgid "You are now connected to the wired network." -#~ msgstr "您现在已连接到有线网络。" - -#~ msgid "Connection Established" -#~ msgstr "连接已建立" - -#~ msgid "Disconnected" -#~ msgstr "已断开连接" - -#~ msgid "The network connection has been disconnected." -#~ msgstr "网络连接现已断开。" diff --git a/po/zh_TW.po b/po/zh_TW.po index 835875aa5e..4357e26699 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -1,41 +1,1561 @@ +# translation of zh_TW.po to Traditional Chinese # Traditional Chinese translation of Network Manager. -# Copyright (C) 2005 Free Software Foundation, Inc. +# Copyright (C) 2005, 2010 Free Software Foundation, Inc. +# # Woodman Tuen , 2005. # Chao-Hsiung Liao , 2008. -# +# Chester Cheng , 2010. +# Chester Cheng , 2010. +# Terry Chuang , 2010. +# Terry Chuang , 2010. msgid "" msgstr "" -"Project-Id-Version: Network Manager 0.7.0\n" +"Project-Id-Version: zh_TW\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-08-21 20:14+0800\n" -"PO-Revision-Date: 2008-08-21 15:37+0800\n" -"Last-Translator: Chao-Hsiung Liao \n" -"Language-Team: Chinese/Traditional \n" +"POT-Creation-Date: 2010-05-06 14:31+0530\n" +"PO-Revision-Date: 2010-05-07 10:59+1000\n" +"Last-Translator: Terry Chuang \n" +"Language-Team: Traditional Chinese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: KBabel 1.11.4\n" -#: ../src/nm-netlink-monitor.c:193 ../src/nm-netlink-monitor.c:474 +#: ../cli/src/connections.c:59 ../cli/src/connections.c:74 +#: ../cli/src/devices.c:85 ../cli/src/devices.c:98 ../cli/src/devices.c:108 +#: ../cli/src/devices.c:118 ../cli/src/devices.c:131 ../cli/src/devices.c:142 +#: ../cli/src/devices.c:152 +msgid "NAME" +msgstr "NAME" + +#. 0 +#: ../cli/src/connections.c:60 ../cli/src/connections.c:75 +msgid "UUID" +msgstr "UUID" + +#. 1 +#: ../cli/src/connections.c:61 +msgid "DEVICES" +msgstr "DEVICES" + +#. 2 +#: ../cli/src/connections.c:62 ../cli/src/connections.c:77 +msgid "SCOPE" +msgstr "SCOPE" + +#. 3 +#: ../cli/src/connections.c:63 +msgid "DEFAULT" +msgstr "DEFAULT" + +#. 4 +#: ../cli/src/connections.c:64 +msgid "DBUS-SERVICE" +msgstr "DBUS-SERVICE" + +#. 5 +#: ../cli/src/connections.c:65 +msgid "SPEC-OBJECT" +msgstr "SPEC-OBJECT" + +#. 6 +#: ../cli/src/connections.c:66 +msgid "VPN" +msgstr "VPN" + +#. 1 +#. 0 +#. 1 +#: ../cli/src/connections.c:76 ../cli/src/devices.c:61 ../cli/src/devices.c:87 +msgid "TYPE" +msgstr "TYPE" + +#. 3 +#: ../cli/src/connections.c:78 +msgid "TIMESTAMP" +msgstr "TIMESTAMP" + +#. 4 +#: ../cli/src/connections.c:79 +msgid "TIMESTAMP-REAL" +msgstr "TIMESTAMP-REAL" + +#. 5 +#: ../cli/src/connections.c:80 +msgid "AUTOCONNECT" +msgstr "AUTOCONNECT" + +#. 6 +#: ../cli/src/connections.c:81 +msgid "READONLY" +msgstr "READONLY" + +#: ../cli/src/connections.c:157 +#, c-format +msgid "" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" +msgstr "" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" + +#: ../cli/src/connections.c:197 ../cli/src/connections.c:536 +#, c-format +msgid "Error: 'con list': %s" +msgstr "錯誤:'con list': %s" + +#: ../cli/src/connections.c:199 ../cli/src/connections.c:538 +#, c-format +msgid "Error: 'con list': %s; allowed fields: %s" +msgstr "錯誤:'con list': %s; 允許的欄位為:%s" + +#: ../cli/src/connections.c:207 +msgid "Connection details" +msgstr "連線詳情" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "system" +msgstr "系統" + +#: ../cli/src/connections.c:381 ../cli/src/connections.c:601 +msgid "user" +msgstr "使用者" + +#: ../cli/src/connections.c:383 +msgid "never" +msgstr "永不" + +#. "CAPABILITIES" +#. Print header +#. "WIFI-PROPERTIES" +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:544 ../cli/src/settings.c:643 +#: ../cli/src/settings.c:912 ../cli/src/settings.c:913 +#: ../cli/src/settings.c:915 ../cli/src/settings.c:917 +#: ../cli/src/settings.c:1042 ../cli/src/settings.c:1043 +#: ../cli/src/settings.c:1044 ../cli/src/settings.c:1123 +#: ../cli/src/settings.c:1124 ../cli/src/settings.c:1125 +#: ../cli/src/settings.c:1126 ../cli/src/settings.c:1127 +#: ../cli/src/settings.c:1128 ../cli/src/settings.c:1129 +#: ../cli/src/settings.c:1130 ../cli/src/settings.c:1131 +#: ../cli/src/settings.c:1132 ../cli/src/settings.c:1133 +#: ../cli/src/settings.c:1134 ../cli/src/settings.c:1135 +#: ../cli/src/settings.c:1210 +msgid "yes" +msgstr "是" + +#: ../cli/src/connections.c:384 ../cli/src/connections.c:385 +#: ../cli/src/connections.c:602 ../cli/src/connections.c:605 +#: ../cli/src/devices.c:388 ../cli/src/devices.c:513 ../cli/src/devices.c:539 +#: ../cli/src/devices.c:540 ../cli/src/devices.c:541 ../cli/src/devices.c:542 +#: ../cli/src/devices.c:543 ../cli/src/settings.c:504 +#: ../cli/src/settings.c:506 ../cli/src/settings.c:544 +#: ../cli/src/settings.c:643 ../cli/src/settings.c:912 +#: ../cli/src/settings.c:913 ../cli/src/settings.c:915 +#: ../cli/src/settings.c:917 ../cli/src/settings.c:1042 +#: ../cli/src/settings.c:1043 ../cli/src/settings.c:1044 +#: ../cli/src/settings.c:1123 ../cli/src/settings.c:1124 +#: ../cli/src/settings.c:1125 ../cli/src/settings.c:1126 +#: ../cli/src/settings.c:1127 ../cli/src/settings.c:1128 +#: ../cli/src/settings.c:1129 ../cli/src/settings.c:1130 +#: ../cli/src/settings.c:1131 ../cli/src/settings.c:1132 +#: ../cli/src/settings.c:1133 ../cli/src/settings.c:1134 +#: ../cli/src/settings.c:1135 ../cli/src/settings.c:1210 +msgid "no" +msgstr "否" + +#: ../cli/src/connections.c:457 ../cli/src/connections.c:500 +msgid "System connections" +msgstr "系統連線" + +#: ../cli/src/connections.c:462 ../cli/src/connections.c:513 +msgid "User connections" +msgstr "使用者連線" + +#: ../cli/src/connections.c:474 ../cli/src/connections.c:1334 +#: ../cli/src/connections.c:1350 ../cli/src/connections.c:1359 +#: ../cli/src/connections.c:1370 ../cli/src/connections.c:1452 +#: ../cli/src/devices.c:864 ../cli/src/devices.c:874 ../cli/src/devices.c:973 +#: ../cli/src/devices.c:980 +#, c-format +msgid "Error: %s argument is missing." +msgstr "錯誤:沒有 %s 參數。" + +#: ../cli/src/connections.c:487 +#, c-format +msgid "Error: %s - no such connection." +msgstr "錯誤:%s - 此連線不存在。" + +#: ../cli/src/connections.c:519 ../cli/src/connections.c:1383 +#: ../cli/src/connections.c:1470 ../cli/src/devices.c:687 +#: ../cli/src/devices.c:754 ../cli/src/devices.c:888 ../cli/src/devices.c:986 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "不明的參數:%s\n" + +#: ../cli/src/connections.c:528 +#, c-format +msgid "Error: no valid parameter specified." +msgstr "錯誤:未指定合於規定的參數。" + +#: ../cli/src/connections.c:543 ../cli/src/connections.c:1572 +#: ../cli/src/devices.c:1192 ../cli/src/network-manager.c:274 +#, c-format +msgid "Error: %s." +msgstr "錯誤:%s。" + +#: ../cli/src/connections.c:649 +#, c-format +msgid "Error: 'con status': %s" +msgstr "錯誤:'con status': %s" + +#: ../cli/src/connections.c:651 +#, c-format +msgid "Error: 'con status': %s; allowed fields: %s" +msgstr "錯誤:'con status': %s; 允許的欄位為:%s" + +#: ../cli/src/connections.c:658 +msgid "Active connections" +msgstr "使用中的連線" + +#: ../cli/src/connections.c:1026 +#, c-format +msgid "no active connection on device '%s'" +msgstr "裝置「%s」沒有使用中的連線" + +#: ../cli/src/connections.c:1034 +#, c-format +msgid "no active connection or device" +msgstr "沒有使用中的連線或裝置" + +#: ../cli/src/connections.c:1084 +#, c-format +msgid "device '%s' not compatible with connection '%s'" +msgstr "裝置 '%s' 和連線 '%s' 不相容" + +#: ../cli/src/connections.c:1086 +#, c-format +msgid "no device found for connection '%s'" +msgstr "連線「%s」沒有找到任何裝置" + +#: ../cli/src/connections.c:1097 +msgid "activating" +msgstr "啟用中" + +#: ../cli/src/connections.c:1099 +msgid "activated" +msgstr "已啟用" + +#: ../cli/src/connections.c:1102 ../cli/src/connections.c:1125 +#: ../cli/src/connections.c:1158 ../cli/src/devices.c:224 +#: ../cli/src/devices.c:514 ../cli/src/network-manager.c:92 +#: ../cli/src/network-manager.c:145 ../cli/src/settings.c:469 +msgid "unknown" +msgstr "不明" + +#: ../cli/src/connections.c:1111 +msgid "VPN connecting (prepare)" +msgstr "VPN 連線(準備)" + +#: ../cli/src/connections.c:1113 +msgid "VPN connecting (need authentication)" +msgstr "VPN 連線(需要身份認證)" + +#: ../cli/src/connections.c:1115 +msgid "VPN connecting" +msgstr "VPN 連線" + +#: ../cli/src/connections.c:1117 +msgid "VPN connecting (getting IP configuration)" +msgstr "VPN 連線(取得 IP 配置)" + +#: ../cli/src/connections.c:1119 +msgid "VPN connected" +msgstr "VPN 已連線" + +#: ../cli/src/connections.c:1121 +msgid "VPN connection failed" +msgstr "VPN 連線失敗" + +#: ../cli/src/connections.c:1123 +msgid "VPN disconnected" +msgstr "VPN 已離線" + +#: ../cli/src/connections.c:1134 +msgid "unknown reason" +msgstr "原因不明" + +#: ../cli/src/connections.c:1136 +msgid "none" +msgstr "none" + +#: ../cli/src/connections.c:1138 +msgid "the user was disconnected" +msgstr "該使用者已經斷線" + +#: ../cli/src/connections.c:1140 +msgid "the base network connection was interrupted" +msgstr "基礎的網路連線已經中斷" + +#: ../cli/src/connections.c:1142 +msgid "the VPN service stopped unexpectedly" +msgstr "VPN 服務無預期停止" + +#: ../cli/src/connections.c:1144 +msgid "the VPN service returned invalid configuration" +msgstr "VPN 服務傳回無效的配置" + +#: ../cli/src/connections.c:1146 +msgid "the connection attempt timed out" +msgstr "嚐試連線已經逾時" + +#: ../cli/src/connections.c:1148 +msgid "the VPN service did not start in time" +msgstr "VPN 服務並沒有按時開始" + +#: ../cli/src/connections.c:1150 +msgid "the VPN service failed to start" +msgstr "VPN 服務無法開始" + +#: ../cli/src/connections.c:1152 +msgid "no valid VPN secrets" +msgstr "VPN 密碼不正確" + +#: ../cli/src/connections.c:1154 +msgid "invalid VPN secrets" +msgstr "VPN 密碼不正確" + +#: ../cli/src/connections.c:1156 +msgid "the connection was removed" +msgstr "連線已移除" + +#: ../cli/src/connections.c:1170 +#, c-format +msgid "state: %s\n" +msgstr "狀態:%s\n" + +#: ../cli/src/connections.c:1173 ../cli/src/connections.c:1199 +#, c-format +msgid "Connection activated\n" +msgstr "連線已啟動\n" + +#: ../cli/src/connections.c:1176 +#, c-format +msgid "Error: Connection activation failed." +msgstr "錯誤:啟動連線失敗。" + +#: ../cli/src/connections.c:1195 +#, c-format +msgid "state: %s (%d)\n" +msgstr "狀態:%s (%d)\n" + +#: ../cli/src/connections.c:1205 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "錯誤:啟動連線失敗:%s。" + +#: ../cli/src/connections.c:1222 ../cli/src/devices.c:811 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "錯誤:逾時 %d 秒。" + +#: ../cli/src/connections.c:1265 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "錯誤:啟動連線失敗:%s" + +#: ../cli/src/connections.c:1279 +#, c-format +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "錯誤:為「%s」取得啟用中的連線失敗。" + +#: ../cli/src/connections.c:1288 +#, c-format +msgid "Active connection state: %s\n" +msgstr "啟用中連線的狀態:%s\n" + +#: ../cli/src/connections.c:1289 +#, c-format +msgid "Active connection path: %s\n" +msgstr "啟用中連線的路徑:%s\n" + +#: ../cli/src/connections.c:1343 ../cli/src/connections.c:1461 +#, c-format +msgid "Error: Unknown connection: %s." +msgstr "錯誤:不明的連線:%s。" + +#: ../cli/src/connections.c:1378 ../cli/src/devices.c:882 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "錯誤:逾時值「%s」不合乎規定。" + +#: ../cli/src/connections.c:1391 ../cli/src/connections.c:1478 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "錯誤:未指定 id 或 uuid。" + +#: ../cli/src/connections.c:1411 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "錯誤:找不到適用的裝置:%s。" + +#: ../cli/src/connections.c:1413 +#, c-format +msgid "Error: No suitable device found." +msgstr "錯誤:找不到適用的裝置。" + +#: ../cli/src/connections.c:1505 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "警告:連線並未啟用\n" + +#: ../cli/src/connections.c:1561 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "錯誤:「con」指令「%s」不合乎規定。" + +#: ../cli/src/connections.c:1597 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "錯誤:無法連到 D-Bus。" + +#: ../cli/src/connections.c:1604 +#, c-format +msgid "Error: Could not get system settings." +msgstr "錯誤:無法取得系統設定。" + +#: ../cli/src/connections.c:1612 +#, c-format +msgid "Error: Could not get user settings." +msgstr "錯誤:無法取得使用者設定。" + +#: ../cli/src/connections.c:1622 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "錯誤:無法取得連線:設定服務並未執行。" + +#. 0 +#. 9 +#: ../cli/src/devices.c:60 ../cli/src/devices.c:86 ../cli/src/devices.c:162 +msgid "DEVICE" +msgstr "DEVICE" + +#. 1 +#. 4 +#. 0 +#: ../cli/src/devices.c:62 ../cli/src/devices.c:90 +#: ../cli/src/network-manager.c:36 +msgid "STATE" +msgstr "STATE" + +#: ../cli/src/devices.c:71 +msgid "GENERAL" +msgstr "GENERAL" + +#. 0 +#: ../cli/src/devices.c:72 +msgid "CAPABILITIES" +msgstr "CAPABILITIES" + +#. 1 +#: ../cli/src/devices.c:73 +msgid "WIFI-PROPERTIES" +msgstr "WIFI-PROPERTIES" + +#. 2 +#: ../cli/src/devices.c:74 +msgid "AP" +msgstr "AP" + +#. 3 +#: ../cli/src/devices.c:75 +msgid "WIRED-PROPERTIES" +msgstr "WIRED-PROPERTIES" + +#. 4 +#: ../cli/src/devices.c:76 +msgid "IP4-SETTINGS" +msgstr "IP4-SETTINGS" + +#. 5 +#: ../cli/src/devices.c:77 +msgid "IP4-DNS" +msgstr "IP4-DNS" + +#. 2 +#: ../cli/src/devices.c:88 +msgid "DRIVER" +msgstr "DRIVER" + +#. 3 +#: ../cli/src/devices.c:89 +msgid "HWADDR" +msgstr "HWADDR" + +#. 0 +#: ../cli/src/devices.c:99 +msgid "CARRIER-DETECT" +msgstr "CARRIER-DETECT" + +#. 1 +#: ../cli/src/devices.c:100 +msgid "SPEED" +msgstr "SPEED" + +#. 0 +#: ../cli/src/devices.c:109 +msgid "CARRIER" +msgstr "CARRIER" + +#. 0 +#: ../cli/src/devices.c:119 +msgid "WEP" +msgstr "WEP" + +#. 1 +#: ../cli/src/devices.c:120 +msgid "WPA" +msgstr "WPA" + +#. 2 +#: ../cli/src/devices.c:121 +msgid "WPA2" +msgstr "WPA2" + +#. 3 +#: ../cli/src/devices.c:122 +msgid "TKIP" +msgstr "TKIP" + +#. 4 +#: ../cli/src/devices.c:123 +msgid "CCMP" +msgstr "CCMP" + +#. 0 +#: ../cli/src/devices.c:132 +msgid "ADDRESS" +msgstr "ADDRESS" + +#. 1 +#: ../cli/src/devices.c:133 +msgid "PREFIX" +msgstr "PREFIX" + +#. 2 +#: ../cli/src/devices.c:134 +msgid "GATEWAY" +msgstr "GATEWAY" + +#. 0 +#: ../cli/src/devices.c:143 +msgid "DNS" +msgstr "DNS" + +#. 0 +#: ../cli/src/devices.c:153 +msgid "SSID" +msgstr "SSID" + +#. 1 +#: ../cli/src/devices.c:154 +msgid "BSSID" +msgstr "BSSID" + +#. 2 +#: ../cli/src/devices.c:155 +msgid "MODE" +msgstr "MODE" + +#. 3 +#: ../cli/src/devices.c:156 +msgid "FREQ" +msgstr "FREQ" + +#. 4 +#: ../cli/src/devices.c:157 +msgid "RATE" +msgstr "RATE" + +#. 5 +#: ../cli/src/devices.c:158 +msgid "SIGNAL" +msgstr "SIGNAL" + +#. 6 +#: ../cli/src/devices.c:159 +msgid "SECURITY" +msgstr "SECURITY" + +#. 7 +#: ../cli/src/devices.c:160 +msgid "WPA-FLAGS" +msgstr "WPA-FLAGS" + +#. 8 +#: ../cli/src/devices.c:161 +msgid "RSN-FLAGS" +msgstr "RSN-FLAGS" + +#. 10 +#: ../cli/src/devices.c:163 +msgid "ACTIVE" +msgstr "ACTIVE" + +#: ../cli/src/devices.c:186 +#, c-format +msgid "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +"\n" +msgstr "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] [hwaddr ]]\n" +"\n" + +#: ../cli/src/devices.c:206 +msgid "unmanaged" +msgstr "不受管理的" + +#: ../cli/src/devices.c:208 +msgid "unavailable" +msgstr "無法使用" + +#: ../cli/src/devices.c:210 ../cli/src/network-manager.c:89 +msgid "disconnected" +msgstr "離線" + +#: ../cli/src/devices.c:212 +msgid "connecting (prepare)" +msgstr "連線中(準備)" + +#: ../cli/src/devices.c:214 +msgid "connecting (configuring)" +msgstr "連線中(配置中)" + +#: ../cli/src/devices.c:216 +msgid "connecting (need authentication)" +msgstr "連線中(需要身份認證)" + +#: ../cli/src/devices.c:218 +msgid "connecting (getting IP configuration)" +msgstr "連線中(正在取得 IP 配置)" + +#: ../cli/src/devices.c:220 ../cli/src/network-manager.c:87 +msgid "connected" +msgstr "已連線" + +#: ../cli/src/devices.c:222 +msgid "connection failed" +msgstr "連線失敗" + +#: ../cli/src/devices.c:245 ../cli/src/devices.c:380 +msgid "Unknown" +msgstr "不明" + +#: ../cli/src/devices.c:277 +msgid "(none)" +msgstr "(none)" + +#: ../cli/src/devices.c:302 +#, c-format +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s:轉換 IP4 位址 0x%x 時發生錯誤" + +#: ../cli/src/devices.c:349 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" + +#: ../cli/src/devices.c:350 +#, c-format +msgid "%u MB/s" +msgstr "%u MB/s" + +#: ../cli/src/devices.c:359 +msgid "Encrypted: " +msgstr "已加密:" + +#: ../cli/src/devices.c:364 +msgid "WEP " +msgstr "WEP " + +#: ../cli/src/devices.c:366 +msgid "WPA " +msgstr "WPA " + +#: ../cli/src/devices.c:368 +msgid "WPA2 " +msgstr "WPA2 " + +#: ../cli/src/devices.c:371 +msgid "Enterprise " +msgstr "企業版 " + +#: ../cli/src/devices.c:380 +msgid "Ad-Hoc" +msgstr "點對點" + +#: ../cli/src/devices.c:380 +msgid "Infrastructure" +msgstr "基礎建設" + +#: ../cli/src/devices.c:442 +#, c-format +msgid "Error: 'dev list': %s" +msgstr "錯誤:'dev list': %s" + +#: ../cli/src/devices.c:444 +#, c-format +msgid "Error: 'dev list': %s; allowed fields: %s" +msgstr "錯誤:'dev list': %s; 允許的欄位為:%s" + +#: ../cli/src/devices.c:453 +msgid "Device details" +msgstr "裝置詳細資訊" + +#: ../cli/src/devices.c:483 ../cli/src/devices.c:827 +msgid "(unknown)" +msgstr "(不明)" + +#: ../cli/src/devices.c:484 +msgid "unknown)" +msgstr "不明)" + +#: ../cli/src/devices.c:510 +#, c-format +msgid "%u Mb/s" +msgstr "%u Mb/s" + +#. Print header +#. "WIRED-PROPERTIES" +#: ../cli/src/devices.c:583 +msgid "on" +msgstr "開" + +#: ../cli/src/devices.c:583 +msgid "off" +msgstr "關" + +#: ../cli/src/devices.c:710 +#, c-format +msgid "Error: 'dev status': %s" +msgstr "錯誤:'dev status': %s" + +#: ../cli/src/devices.c:712 +#, c-format +msgid "Error: 'dev status': %s; allowed fields: %s" +msgstr "錯誤:'dev status':%s; 允許的欄位為:%s" + +#: ../cli/src/devices.c:719 +msgid "Status of devices" +msgstr "裝置的狀態" + +#: ../cli/src/devices.c:747 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "錯誤:找不到「%s」參數。" + +#: ../cli/src/devices.c:776 ../cli/src/devices.c:915 ../cli/src/devices.c:1035 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "錯誤:找不到「%s」裝置。" + +#: ../cli/src/devices.c:799 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "成功:裝置「%s」已經成功地斷線。" + +#: ../cli/src/devices.c:824 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "錯誤:裝置「%s」(%s)斷線失敗:%s" + +#: ../cli/src/devices.c:832 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "裝置狀態:%d (%s)\n" + +#: ../cli/src/devices.c:896 +#, c-format +msgid "Error: iface has to be specified." +msgstr "錯誤:必須指定 iface。" + +#: ../cli/src/devices.c:1011 +#, c-format +msgid "Error: 'dev wifi': %s" +msgstr "錯誤:'dev wifi':%s" + +#: ../cli/src/devices.c:1013 +#, c-format +msgid "Error: 'dev wifi': %s; allowed fields: %s" +msgstr "錯誤:'dev wifi':%s; 允許的欄位為:%s" + +#: ../cli/src/devices.c:1020 +msgid "WiFi scan list" +msgstr "WiFi 掃描清單" + +#: ../cli/src/devices.c:1055 ../cli/src/devices.c:1109 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "錯誤:找不到擁有 hwaddr「%s」的存取點。" + +#: ../cli/src/devices.c:1072 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "錯誤:「%s」不是 WiFi 裝置。" + +#: ../cli/src/devices.c:1136 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "錯誤:「dev wifi」指令「%s」不合乎規定。" + +#: ../cli/src/devices.c:1183 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "錯誤:「dev」指令「%s」不合乎規定。" + +#: ../cli/src/network-manager.c:35 +msgid "RUNNING" +msgstr "RUNNING" + +#. 1 +#: ../cli/src/network-manager.c:37 +msgid "WIFI-HARDWARE" +msgstr "WIFI-HARDWARE" + +#. 2 +#: ../cli/src/network-manager.c:38 +msgid "WIFI" +msgstr "WIFI-HARDWARE" + +#. 3 +#: ../cli/src/network-manager.c:39 +msgid "WWAN-HARDWARE" +msgstr "WWAN-HARDWARE" + +#. 4 +#: ../cli/src/network-manager.c:40 +msgid "WWAN" +msgstr "WWAN" + +#: ../cli/src/network-manager.c:62 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" +msgstr "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + +#: ../cli/src/network-manager.c:83 +msgid "asleep" +msgstr "asleep" + +#: ../cli/src/network-manager.c:85 +msgid "connecting" +msgstr "連線中" + +#: ../cli/src/network-manager.c:125 +#, c-format +msgid "Error: 'nm status': %s" +msgstr "錯誤:'nm status':%s" + +#: ../cli/src/network-manager.c:127 +#, c-format +msgid "Error: 'nm status': %s; allowed fields: %s" +msgstr "錯誤:'nm status':%s; 允許的欄位為:%s" + +#: ../cli/src/network-manager.c:134 +msgid "NetworkManager status" +msgstr "NetworkManager 狀態" + +#. Print header +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "enabled" +msgstr "已啟用" + +#: ../cli/src/network-manager.c:140 ../cli/src/network-manager.c:141 +#: ../cli/src/network-manager.c:142 ../cli/src/network-manager.c:143 +#: ../cli/src/network-manager.c:211 ../cli/src/network-manager.c:243 +msgid "disabled" +msgstr "已停用" + +#: ../cli/src/network-manager.c:148 +msgid "running" +msgstr "執行中" + +#: ../cli/src/network-manager.c:148 +msgid "not running" +msgstr "非執行中" + +#: ../cli/src/network-manager.c:201 ../cli/src/network-manager.c:233 +#, c-format +msgid "Error: '--fields' value '%s' is not valid here; allowed fields: %s" +msgstr "錯誤:'--fields' 值 '%s' 在此無效; 允許的欄位為:%s" + +#: ../cli/src/network-manager.c:209 +msgid "WiFi enabled" +msgstr "WiFi 已啟用" + +#: ../cli/src/network-manager.c:220 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "錯誤:不合乎規定的「wifi」參數:%s。" + +#: ../cli/src/network-manager.c:241 +msgid "WWAN enabled" +msgstr "WWAN 已啟用" + +#: ../cli/src/network-manager.c:252 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "錯誤:不合乎規定的「wwan」參數:%s。" + +#: ../cli/src/network-manager.c:263 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "錯誤:「nm」指令「%s」不合乎規定。" + +#: ../cli/src/nmcli.c:69 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -m[ode] tabular|multiline output mode\n" +" -f[ields] |all|common specify fields to output\n" +" -e[scape] yes|no escape columns separators in " +"values\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -m[ode] tabular|multiline output mode\n" +" -f[ields] |all|common specify fields to output\n" +" -e[scape] yes|no escape columns separators in " +"values\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" + +#: ../cli/src/nmcli.c:113 +#, c-format +msgid "Error: Object '%s' is unknown, try 'nmcli help'." +msgstr "錯誤:物件 '%s' 不明,請嘗試 'nmcli help'。" + +#: ../cli/src/nmcli.c:143 +#, c-format +msgid "Error: Option '--terse' is specified the second time." +msgstr "錯誤:選項 '--terse' 已指定了第二次。" + +#: ../cli/src/nmcli.c:148 +#, c-format +msgid "Error: Option '--terse' is mutually exclusive with '--pretty'." +msgstr "錯誤:選項 '--terse' 和 '--pretty' 是互斥的。" + +#: ../cli/src/nmcli.c:156 +#, c-format +msgid "Error: Option '--pretty' is specified the second time." +msgstr "錯誤:選項 '--pretty' 已指定了第二次。" + +#: ../cli/src/nmcli.c:161 +#, c-format +msgid "Error: Option '--pretty' is mutually exclusive with '--terse'." +msgstr "錯誤:選項 '--pretty' 和 '--terse' 是互斥的。" + +#: ../cli/src/nmcli.c:171 ../cli/src/nmcli.c:187 +#, c-format +msgid "Error: missing argument for '%s' option." +msgstr "錯誤:'%s' 選項的引數遺失。" + +#: ../cli/src/nmcli.c:180 ../cli/src/nmcli.c:196 +#, c-format +msgid "Error: '%s' is not valid argument for '%s' option." +msgstr "錯誤:'%s' 不是 '%s' 選項的有效引數。" + +#: ../cli/src/nmcli.c:203 +#, c-format +msgid "Error: fields for '%s' options are missing." +msgstr "錯誤:找不到 '%s' 選項的欄位。" + +#: ../cli/src/nmcli.c:209 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "nmcli 工具,版本 %s\n" + +#: ../cli/src/nmcli.c:215 +#, c-format +msgid "Error: Option '%s' is unknown, try 'nmcli -help'." +msgstr "錯誤:選項 '%s' 不明,請嚐試 'nmcli -help'。" + +#: ../cli/src/nmcli.c:234 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "捕捉到訊號 %d,關閉..." + +#: ../cli/src/nmcli.c:259 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "錯誤:無法連上 NetworkManager。" + +#: ../cli/src/nmcli.c:275 +msgid "Success" +msgstr "成功" + +#: ../cli/src/settings.c:407 +#, c-format +msgid "%d (hex-ascii-key)" +msgstr "%d(十六進位的 ascii-key)" + +#: ../cli/src/settings.c:409 +#, c-format +msgid "%d (104/128-bit passphrase)" +msgstr "%d(104/128 位元密碼)" + +#: ../cli/src/settings.c:412 +#, c-format +msgid "%d (unknown)" +msgstr "%d(不明)" + +#: ../cli/src/settings.c:438 +msgid "0 (unknown)" +msgstr "0(不明)" + +#: ../cli/src/settings.c:444 +msgid "any, " +msgstr "任何," + +#: ../cli/src/settings.c:446 +msgid "900 MHz, " +msgstr "900 MHz, " + +#: ../cli/src/settings.c:448 +msgid "1800 MHz, " +msgstr "1800 MHz, " + +#: ../cli/src/settings.c:450 +msgid "1900 MHz, " +msgstr "1900 MHz, " + +#: ../cli/src/settings.c:452 +msgid "850 MHz, " +msgstr "850 MHz, " + +#: ../cli/src/settings.c:454 +msgid "WCDMA 3GPP UMTS 2100 MHz, " +msgstr "WCDMA 3GPP UMTS 2100 MHz, " + +#: ../cli/src/settings.c:456 +msgid "WCDMA 3GPP UMTS 1800 MHz, " +msgstr "WCDMA 3GPP UMTS 1800 MHz, " + +#: ../cli/src/settings.c:458 +msgid "WCDMA 3GPP UMTS 1700/2100 MHz, " +msgstr "WCDMA 3GPP UMTS 1700/2100 MHz, " + +#: ../cli/src/settings.c:460 +msgid "WCDMA 3GPP UMTS 800 MHz, " +msgstr "WCDMA 3GPP UMTS 800 MHz, " + +#: ../cli/src/settings.c:462 +msgid "WCDMA 3GPP UMTS 850 MHz, " +msgstr "WCDMA 3GPP UMTS 850 MHz, " + +#: ../cli/src/settings.c:464 +msgid "WCDMA 3GPP UMTS 900 MHz, " +msgstr "WCDMA 3GPP UMTS 900 MHz, " + +#: ../cli/src/settings.c:466 +msgid "WCDMA 3GPP UMTS 1700 MHz, " +msgstr "WCDMA 3GPP UMTS 1700 MHz, " + +#: ../cli/src/settings.c:546 ../cli/src/settings.c:708 +msgid "auto" +msgstr "自動" + +#: ../cli/src/settings.c:704 ../cli/src/settings.c:707 ../cli/src/utils.c:172 +msgid "not set" +msgstr "不設置" + +#: ../cli/src/utils.c:124 +#, c-format +msgid "field '%s' has to be alone" +msgstr "欄位 '%s' 必須是單獨的" + +#: ../cli/src/utils.c:127 +#, c-format +msgid "invalid field '%s'" +msgstr "無效的欄位 '%s'" + +#: ../cli/src/utils.c:146 +#, c-format +msgid "Option '--terse' requires specifying '--fields'" +msgstr "選項 '--terse' 需指定 '--fields'" + +#: ../cli/src/utils.c:150 +#, c-format +msgid "Option '--terse' requires specific '--fields' option values , not '%s'" +msgstr "選項 '--terse' 需要特定的 '--fields' 選項值,而不是 '%s'" + +#: ../libnm-util/crypto.c:120 +#, c-format +msgid "PEM key file had no end tag '%s'." +msgstr "PEM 金鑰檔案沒有結束標籤「%s」。" + +#: ../libnm-util/crypto.c:130 +#, c-format +msgid "Doesn't look like a PEM private key file." +msgstr "看起來不像是 PEM 私密金鑰檔案。" + +#: ../libnm-util/crypto.c:138 +#, c-format +msgid "Not enough memory to store PEM file data." +msgstr "沒有足夠的記憶體可儲存 PEM 檔案資料。" + +#: ../libnm-util/crypto.c:154 +#, c-format +msgid "Malformed PEM file: Proc-Type was not first tag." +msgstr "格式不良的 PEM 檔案:Proc-Type 不是第一個標籤。" + +#: ../libnm-util/crypto.c:162 +#, c-format +msgid "Malformed PEM file: unknown Proc-Type tag '%s'." +msgstr "格式不良的 PEM 檔案:不明的 Proc-Type 標籤「%s」" + +#: ../libnm-util/crypto.c:172 +#, c-format +msgid "Malformed PEM file: DEK-Info was not the second tag." +msgstr "格式不良的 PEM 檔案:DEK-Info 不是第二個標籤。" + +#: ../libnm-util/crypto.c:183 +#, c-format +msgid "Malformed PEM file: no IV found in DEK-Info tag." +msgstr "格式不良的 PEM 檔案:在 DEK-Info 標籤中找不到 IV。" + +#: ../libnm-util/crypto.c:190 +#, c-format +msgid "Malformed PEM file: invalid format of IV in DEK-Info tag." +msgstr "格式不良的 PEM 檔案:DEK-Info 標籤中的 IV 格式是無效的。" + +#: ../libnm-util/crypto.c:203 +#, c-format +msgid "Malformed PEM file: unknown private key cipher '%s'." +msgstr "格式不良的 PEM 檔案:不明的私密金鑰加密器「%s」。" + +#: ../libnm-util/crypto.c:222 +#, c-format +msgid "Could not decode private key." +msgstr "無法解碼私密金鑰。" + +#: ../libnm-util/crypto.c:267 +#, c-format +msgid "PEM certificate '%s' had no end tag '%s'." +msgstr "PEM 憑證「%s」沒有結束標籤「%s」。" + +#: ../libnm-util/crypto.c:277 +#, c-format +msgid "Failed to decode certificate." +msgstr "解碼憑證失敗。" + +#: ../libnm-util/crypto.c:286 +#, c-format +msgid "Not enough memory to store certificate data." +msgstr "沒有足夠的記憶體可儲存憑證資料。" + +#: ../libnm-util/crypto.c:294 +#, c-format +msgid "Not enough memory to store file data." +msgstr "沒有足夠的記憶體可儲存檔案資料。" + +#: ../libnm-util/crypto.c:324 +#, c-format +msgid "IV must be an even number of bytes in length." +msgstr "IV 的長度必須為偶數位元組。" + +#: ../libnm-util/crypto.c:333 +#, c-format +msgid "Not enough memory to store the IV." +msgstr "沒有足夠的記憶體可儲存 IV。" + +#: ../libnm-util/crypto.c:344 +#, c-format +msgid "IV contains non-hexadecimal digits." +msgstr "IV 包含非十六進位的數字。" + +#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:336 +#, c-format +msgid "Private key cipher '%s' was unknown." +msgstr "私密金鑰加密器「%s」不明。" + +#: ../libnm-util/crypto.c:391 +#, c-format +msgid "Not enough memory to decrypt private key." +msgstr "沒有足夠的記憶體可解密私密金鑰。" + +#: ../libnm-util/crypto.c:511 +#, c-format +msgid "Unable to determine private key type." +msgstr "無法決定私密金鑰的類型。" + +#: ../libnm-util/crypto.c:530 +#, c-format +msgid "Not enough memory to store decrypted private key." +msgstr "沒有足夠的記憶體可儲存解密的私密金鑰。" + +#: ../libnm-util/crypto_gnutls.c:49 +msgid "Failed to initialize the crypto engine." +msgstr "初始化 crypto 引擎失敗。" + +#: ../libnm-util/crypto_gnutls.c:93 +#, c-format +msgid "Failed to initialize the MD5 engine: %s / %s." +msgstr "初始化 MD5 引擎失敗: %s / %s。" + +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "不合乎規定的 IV 長度(必須至少是 %zd)。" + +#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188 +#, c-format +msgid "Not enough memory for decrypted key buffer." +msgstr "沒有足夠的記憶體供作解密金鑰緩衝區。" + +#: ../libnm-util/crypto_gnutls.c:173 +#, c-format +msgid "Failed to initialize the decryption cipher context: %s / %s." +msgstr "初始化解密用的加密器失敗: %s / %s。" + +#: ../libnm-util/crypto_gnutls.c:182 +#, c-format +msgid "Failed to set symmetric key for decryption: %s / %s." +msgstr "設定解密用的對稱式金鑰失敗: %s / %s。" + +#: ../libnm-util/crypto_gnutls.c:191 +#, c-format +msgid "Failed to set IV for decryption: %s / %s." +msgstr "設定解密用的 IV 失敗: %s / %s。" + +#: ../libnm-util/crypto_gnutls.c:200 +#, c-format +msgid "Failed to decrypt the private key: %s / %s." +msgstr "解密私密金鑰失敗: %s / %s。" + +#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 +#, c-format +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "解密私密金鑰失敗:無預期的填空長度。" + +#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 +#, c-format +msgid "Failed to decrypt the private key." +msgstr "解密私密金鑰失敗。" + +#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "無法分配記憶體,以供加密。" + +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "初始化加密用的加密器失敗: %s / %s。" + +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "設定加密用的對稱式金鑰失敗: %s / %s。" + +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +msgid "Failed to set IV for encryption: %s / %s." +msgstr "設定加密用的 IV 失敗: %s / %s。" + +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +msgid "Failed to encrypt the data: %s / %s." +msgstr "加密私密金鑰失敗: %s / %s。" + +#: ../libnm-util/crypto_gnutls.c:362 +#, c-format +msgid "Error initializing certificate data: %s" +msgstr "初始化憑證資料時發生錯誤:%s" + +#: ../libnm-util/crypto_gnutls.c:384 +#, c-format +msgid "Couldn't decode certificate: %s" +msgstr "無法解碼憑證:%s" + +#: ../libnm-util/crypto_gnutls.c:408 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %s" +msgstr "無法啟動 PKCS#12 解碼程式:%s" + +#: ../libnm-util/crypto_gnutls.c:421 +#, c-format +msgid "Couldn't decode PKCS#12 file: %s" +msgstr "無法解碼 PKCS#12 檔案:%s" + +#: ../libnm-util/crypto_gnutls.c:433 +#, c-format +msgid "Couldn't verify PKCS#12 file: %s" +msgstr "無法驗證 PKCS# 12 檔案:%s" + +#: ../libnm-util/crypto_nss.c:56 +#, c-format +msgid "Failed to initialize the crypto engine: %d." +msgstr "初始化 crypto 引擎失敗: %d。" + +#: ../libnm-util/crypto_nss.c:111 +#, c-format +msgid "Failed to initialize the MD5 context: %d." +msgstr "初始化 MD5 本文失敗:%d。" + +#: ../libnm-util/crypto_nss.c:179 +#, c-format +msgid "Invalid IV length (must be at least %d)." +msgstr "不合於規定的 IV 長度(必須至少是 %d)。" + +#: ../libnm-util/crypto_nss.c:196 +#, c-format +msgid "Failed to initialize the decryption cipher slot." +msgstr "初始化解密用的加密器插槽失敗。" + +#: ../libnm-util/crypto_nss.c:206 +#, c-format +msgid "Failed to set symmetric key for decryption." +msgstr "設定解密用的對稱式金鑰失敗。" + +#: ../libnm-util/crypto_nss.c:216 +#, c-format +msgid "Failed to set IV for decryption." +msgstr "設定解密用的 IV 失敗。" + +#: ../libnm-util/crypto_nss.c:224 +#, c-format +msgid "Failed to initialize the decryption context." +msgstr "初始化解密上下文失敗。" + +#: ../libnm-util/crypto_nss.c:237 +#, c-format +msgid "Failed to decrypt the private key: %d." +msgstr "解密私密金鑰失敗:%d。" + +#: ../libnm-util/crypto_nss.c:245 +#, c-format +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "解密私密金鑰失敗:解密的資料太龐大。" + +#: ../libnm-util/crypto_nss.c:256 +#, c-format +msgid "Failed to finalize decryption of the private key: %d." +msgstr "結束私密金鑰的解密失敗:%d。" + +#: ../libnm-util/crypto_nss.c:364 +#, c-format +msgid "Failed to initialize the encryption cipher slot." +msgstr "初始化加密用的加密器插槽失敗。" + +#: ../libnm-util/crypto_nss.c:372 +#, c-format +msgid "Failed to set symmetric key for encryption." +msgstr "設定加密用的對稱式金鑰失敗。" + +#: ../libnm-util/crypto_nss.c:380 +#, c-format +msgid "Failed to set IV for encryption." +msgstr "設定加密用的 IV 失敗。" + +#: ../libnm-util/crypto_nss.c:388 +#, c-format +msgid "Failed to initialize the encryption context." +msgstr "初始化加密本文失敗。" + +#: ../libnm-util/crypto_nss.c:396 +#, c-format +msgid "Failed to encrypt: %d." +msgstr "加密失敗:%d。" + +#: ../libnm-util/crypto_nss.c:404 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "加密後無預期的資料量。" + +#: ../libnm-util/crypto_nss.c:447 +#, c-format +msgid "Couldn't decode certificate: %d" +msgstr "無法解碼憑證:%d" + +#: ../libnm-util/crypto_nss.c:482 +#, c-format +msgid "Couldn't convert password to UCS2: %d" +msgstr "無法將密碼轉為 UCS2:%d" + +#: ../libnm-util/crypto_nss.c:510 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %d" +msgstr "無法初始化 PKCS#12 解碼程式:%d" + +#: ../libnm-util/crypto_nss.c:519 +#, c-format +msgid "Couldn't decode PKCS#12 file: %d" +msgstr "無法解碼 PKCS#12 檔案:%d" + +#: ../libnm-util/crypto_nss.c:528 +#, c-format +msgid "Couldn't verify PKCS#12 file: %d" +msgstr "無法驗證 PKCS#12 檔案:%d" + +#: ../libnm-util/crypto_nss.c:557 +msgid "Could not generate random data." +msgstr "無法產生隨機資料。" + +#: ../libnm-util/nm-utils.c:1925 +#, c-format +msgid "Not enough memory to make encryption key." +msgstr "沒有足夠的記憶體建立加密金鑰。" + +#: ../libnm-util/nm-utils.c:2035 +msgid "Could not allocate memory for PEM file creation." +msgstr "無法分配記憶體,以建立 PEM 檔案。" + +#: ../libnm-util/nm-utils.c:2047 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "無法分配記憶體,好將 IV 寫入 PEM 檔案。" + +#: ../libnm-util/nm-utils.c:2059 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "無法分配記憶體,將加密金鑰寫入 PEM 檔案。" + +#: ../libnm-util/nm-utils.c:2078 +#, c-format +msgid "Could not allocate memory for PEM file data." +msgstr "無法分配記憶體給 PEM 檔案資料。" + +#: ../src/nm-netlink-monitor.c:100 ../src/nm-netlink-monitor.c:231 +#: ../src/nm-netlink-monitor.c:653 #, c-format msgid "error processing netlink message: %s" msgstr "處理 netlink 訊息時發生錯誤:%s" -#: ../src/nm-netlink-monitor.c:439 +#: ../src/nm-netlink-monitor.c:214 +msgid "error occurred while waiting for data on socket" +msgstr "等待 socket 上的資料時發生錯誤" + +#: ../src/nm-netlink-monitor.c:254 +#, c-format +msgid "unable to connect to netlink for monitoring link status: %s" +msgstr "無法連結 netlink 以監控連線狀態:%s" + +#: ../src/nm-netlink-monitor.c:265 +#, c-format +msgid "unable to enable netlink handle credential passing: %s" +msgstr "無法啟用 netlink handle credential passing:%s" + +#: ../src/nm-netlink-monitor.c:291 ../src/nm-netlink-monitor.c:353 +#, c-format +msgid "unable to allocate netlink handle for monitoring link status: %s" +msgstr "無法配置 netlink 處理器以監控連線狀態:%s" + +#: ../src/nm-netlink-monitor.c:376 +#, c-format +msgid "unable to allocate netlink link cache for monitoring link status: %s" +msgstr "無法配置 netlink 連線快取以監控連線狀態:%s" + +#: ../src/nm-netlink-monitor.c:502 +#, c-format +msgid "unable to join netlink group: %s" +msgstr "無法加入 netlink 群組:%s" + +#: ../src/nm-netlink-monitor.c:629 ../src/nm-netlink-monitor.c:642 #, c-format msgid "error updating link cache: %s" msgstr "更新連線快取時發生錯誤:%s" -#: ../src/NetworkManager.c:250 +#: ../src/main.c:502 #, c-format msgid "Invalid option. Please use --help to see a list of valid options.\n" msgstr "無效的選項。請使用 --help 來查看有效選項的清單。\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:87 +#: ../src/main.c:562 +#, c-format +msgid "%s. Please use --help to see a list of valid options.\n" +msgstr "%s。請使用 --help 來查看有效選項的清單。\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:325 msgid "# Created by NetworkManager\n" msgstr "# Created by NetworkManager\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:93 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:341 #, c-format msgid "" "# Merged from %s\n" @@ -44,961 +1564,79 @@ msgstr "" "# Merged from %s\n" "\n" -#: ../src/named-manager/nm-named-manager.c:257 -msgid "NOTE: the glibc resolver does not support more than 3 nameservers." -msgstr "注意:glibc 解析器不支援 3 個以上的名稱伺服器。" +#: ../src/dhcp-manager/nm-dhcp-manager.c:279 +msgid "no usable DHCP client could be found." +msgstr "找不到可重複使用的 DHCP 用戶端。" -#: ../src/named-manager/nm-named-manager.c:259 +#: ../src/dhcp-manager/nm-dhcp-manager.c:288 +msgid "'dhclient' could be found." +msgstr "找不到「dhclient」。" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:298 +msgid "'dhcpcd' could be found." +msgstr "找不到「dhcpcd」。" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:306 +#, c-format +msgid "unsupported DHCP client '%s'" +msgstr "不支援的 DHCP 用戶端「%s」" + +#: ../src/logging/nm-logging.c:146 +#, c-format +msgid "Unknown log level '%s'" +msgstr "不明日誌層級「%s」" + +#: ../src/logging/nm-logging.c:171 +#, c-format +msgid "Unknown log domain '%s'" +msgstr "不明日誌網域「%s」" + +#: ../src/named-manager/nm-named-manager.c:343 +msgid "NOTE: the libc resolver may not support more than 3 nameservers." +msgstr "注意:libc 解析器不支援 3 個以上的名稱伺服器。" + +#: ../src/named-manager/nm-named-manager.c:345 msgid "The nameservers listed below may not be recognized." msgstr "下面列出的名稱伺服器可能不會被辨識。" -#: ../system-settings/src/main.c:365 +#: ../src/system-settings/nm-default-wired-connection.c:157 #, c-format msgid "Auto %s" msgstr "自動 %s" -#: ../libnm-util/crypto.c:125 -#, c-format -msgid "PEM key file had no end tag '%s'." -msgstr "PEM 金鑰檔案沒有結束標籤「%s」。" +#: ../system-settings/plugins/ifcfg-rh/reader.c:3256 +msgid "System" +msgstr "系統" -#: ../libnm-util/crypto.c:135 -#, c-format -msgid "Doesn't look like a PEM private key file." -msgstr "看起來不像是 PEM 私密金鑰檔案。" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "透過受保護的 WiFi 網路共享連線" -#: ../libnm-util/crypto.c:143 -#, c-format -msgid "Not enough memory to store PEM file data." -msgstr "沒有足夠的記憶體可儲存 PEM 檔案資料。" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "透過開放的 WiFi 網路共享連線" -#: ../libnm-util/crypto.c:159 -#, c-format -msgid "Malformed PEM file: Proc-Type was not first tag." -msgstr "格式不良的 PEM 檔案:Proc-Type 不是第一個標籤。" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "修改永久系統的主機名稱" -#: ../libnm-util/crypto.c:167 -#, c-format -msgid "Malformed PEM file: unknown Proc-Type tag '%s'." -msgstr "格式不良的 PEM 檔案:未知的 Proc-Type 標籤「%s」" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 +msgid "Modify system connections" +msgstr "修改系統連線" -#: ../libnm-util/crypto.c:177 -#, c-format -msgid "Malformed PEM file: DEK-Info was not the second tag." -msgstr "格式不良的 PEM 檔案:DEK-Info 不是第二個標籤。" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 +msgid "System policy prevents modification of system settings" +msgstr "系統政策讓您無法修改系統設定" -#: ../libnm-util/crypto.c:188 -#, c-format -msgid "Malformed PEM file: no IV found in DEK-Info tag." -msgstr "格式不良的 PEM 檔案:在 DEK-Info 標籤中找不到 IV。" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +msgid "System policy prevents modification of the persistent system hostname" +msgstr "系統政策讓您無法修改永久的系統主機名稱" -#: ../libnm-util/crypto.c:195 -#, c-format -msgid "Malformed PEM file: invalid format of IV in DEK-Info tag." -msgstr "格式不良的 PEM 檔案:DEK-Info 標籤中的 IV 格式是無效的。" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "系統政策讓您無法透過受保護的 WiFi 網路共享連結" -#: ../libnm-util/crypto.c:208 -#, c-format -msgid "Malformed PEM file: unknown private key cipher '%s'." -msgstr "格式不良的 PEM 檔案:未知的私密金鑰加密器「%s」。" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "系統政策讓您無法透過開放的 WiFi 網路共享連線" -#: ../libnm-util/crypto.c:227 -#, c-format -msgid "Could not decode private key." -msgstr "無法解碼私密金鑰。" - -#: ../libnm-util/crypto.c:271 -#, c-format -msgid "PEM certificate '%s' had no end tag '%s'." -msgstr "PEM 憑證「%s」沒有結束標籤「%s」。" - -#: ../libnm-util/crypto.c:281 -#, c-format -msgid "Failed to decode certificate." -msgstr "解碼憑證失敗。" - -#: ../libnm-util/crypto.c:290 ../libnm-util/crypto.c:298 -#, c-format -msgid "Not enough memory to store certificate data." -msgstr "沒有足夠的記憶體可儲存憑證資料。" - -#: ../libnm-util/crypto.c:328 -#, c-format -msgid "IV must be an even number of bytes in length." -msgstr "IV 的長度必須為偶數位元組。" - -#: ../libnm-util/crypto.c:337 -#, c-format -msgid "Not enough memory to store the IV." -msgstr "沒有足夠的記憶體可儲存 IV。" - -#: ../libnm-util/crypto.c:348 -#, c-format -msgid "IV contains non-hexadecimal digits." -msgstr "IV 包含非十六進位的數字。" - -#: ../libnm-util/crypto.c:386 ../libnm-util/crypto_gnutls.c:126 -#: ../libnm-util/crypto_nss.c:136 -#, c-format -msgid "Private key cipher '%s' was unknown." -msgstr "私密金鑰加密器「%s」不明。" - -#: ../libnm-util/crypto.c:395 -#, c-format -msgid "Not enough memory to create private key decryption key." -msgstr "沒有足夠的記憶體可建立私密金鑰的解密鑰匙。" - -#: ../libnm-util/crypto.c:513 -#, c-format -msgid "Not enough memory to store decrypted private key." -msgstr "沒有足夠的記憶體可儲存解密的私密金鑰。" - -#: ../libnm-util/crypto_gnutls.c:73 -#, c-format -msgid "Failed to initialize the MD5 engine: %s / %s." -msgstr "初始化 MD5 引擎失敗: %s / %s。" - -#: ../libnm-util/crypto_gnutls.c:135 ../libnm-util/crypto_nss.c:145 -#, c-format -msgid "Not enough memory for decrypted key buffer." -msgstr "沒有足夠的記憶體供作解密金鑰緩衝區。" - -#: ../libnm-util/crypto_gnutls.c:143 -#, c-format -msgid "Failed to initialize the decryption cipher context: %s / %s." -msgstr "初始化解密用的加密器失敗: %s / %s。" - -#: ../libnm-util/crypto_gnutls.c:152 -#, c-format -msgid "Failed to set symmetric key for decryption: %s / %s." -msgstr "設定解密用的對稱式金鑰失敗: %s / %s。" - -#: ../libnm-util/crypto_gnutls.c:161 -#, c-format -msgid "Failed to set IV for decryption: %s / %s." -msgstr "設定解密用的 IV 失敗: %s / %s。" - -#: ../libnm-util/crypto_gnutls.c:170 -#, c-format -msgid "Failed to decrypt the private key: %s / %s." -msgstr "解密私密金鑰失敗: %s / %s。" - -#: ../libnm-util/crypto_gnutls.c:208 -#, c-format -msgid "Error initializing certificate data: %s" -msgstr "初始化憑證資料時發生錯誤:%s" - -#: ../libnm-util/crypto_gnutls.c:220 -#, c-format -msgid "Couldn't decode certificate: %s" -msgstr "無法解碼憑證:%s" - -#: ../libnm-util/crypto_nss.c:78 -#, c-format -msgid "Failed to initialize the MD5 context: %d." -msgstr "初始化 MD5 失敗:%d。" - -#: ../libnm-util/crypto_nss.c:153 -#, c-format -msgid "Failed to initialize the decryption cipher slot." -msgstr "初始化解密用的加密器插槽失敗。" - -#: ../libnm-util/crypto_nss.c:163 -#, c-format -msgid "Failed to set symmetric key for decryption." -msgstr "設定解密用的對稱式金鑰失敗。" - -#: ../libnm-util/crypto_nss.c:173 -#, c-format -msgid "Failed to set IV for decryption." -msgstr "設定解密用的 IV 失敗。" - -#: ../libnm-util/crypto_nss.c:181 -#, c-format -msgid "Failed to initialize the decryption context." -msgstr "初始化解密上下文失敗。" - -#: ../libnm-util/crypto_nss.c:194 -#, c-format -msgid "Failed to decrypt the private key: %d." -msgstr "解密私密金鑰失敗:%d。" - -#: ../libnm-util/crypto_nss.c:206 -#, c-format -msgid "Failed to finalize decryption of the private key: %d." -msgstr "結束私密金鑰的解密失敗:%d。" - -#: ../libnm-util/crypto_nss.c:250 -#, c-format -msgid "Couldn't decode certificate: %d" -msgstr "無法解碼憑證:%d" - -#: ../src/nm-netlink-monitor.c:250 -#, c-format -msgid "unable to allocate netlink handle for monitoring link status: %s" -msgstr "無法配置 netlink 處理器以監控連線狀態:%s" - -#: ../src/nm-netlink-monitor.c:260 -#, c-format -msgid "unable to connect to netlink for monitoring link status: %s" -msgstr "無法連結 netlink 以監控連線狀態:%s" - -#: ../src/nm-netlink-monitor.c:268 -#, c-format -msgid "unable to join netlink group for monitoring link status: %s" -msgstr "無法加入 netlink 群組以監控連線狀態:%s" - -#: ../src/nm-netlink-monitor.c:276 -#, c-format -msgid "unable to allocate netlink link cache for monitoring link status: %s" -msgstr "無法配置 netlink 連線快取以監控連線狀態:%s" - -#: ../src/nm-netlink-monitor.c:497 -#, c-format -msgid "error occurred while waiting for data on socket" -msgstr "等待 socket 上的資料時發生錯誤" - -#~ msgid "Passphrase for wireless network %s" -#~ msgstr "無線網路 %s 的通行碼" - -#~ msgid "Connection to the wireless network '%s' failed." -#~ msgstr "連接無線網路‘%s’失敗。" - -#~ msgid "Connection to the wired network failed." -#~ msgstr "連接有線網路失敗。" - -#~ msgid "Error displaying connection information:" -#~ msgstr "顯示連線資訊時發生錯誤:" - -#~ msgid "Could not find some required resources (the glade file)!" -#~ msgstr "無法找到一些需要的資源(glade 檔)!" - -#~ msgid "No active connections!" -#~ msgstr "沒有使用中的連線" - -#~ msgid "%d Mb/s" -#~ msgstr "%d Mb/s" - -#~ msgid "Wired Ethernet (%s)" -#~ msgstr "有線乙太網路 (%s)" - -#~ msgid "Wireless Ethernet (%s)" -#~ msgstr "有線乙太網路 (%s)" - -#~ msgid "Unknown" -#~ msgstr "不明" - -#~ msgid "NetworkManager Applet" -#~ msgstr "NetworkManager 面板程式" - -#~ msgid "" -#~ "Copyright © 2004-2006 Red Hat, Inc.\n" -#~ "Copyright © 2005-2006 Novell, Inc." -#~ msgstr "" -#~ "版權所有 (C) 2004-2006 Red Hat, Inc.\n" -#~ "版權所有 (C) 2005-2006 Novell, Inc." - -#~ msgid "" -#~ "Notification area applet for managing your network devices and " -#~ "connections." -#~ msgstr "管理網路裝置與連線的通知區面板程式。" - -#~ msgid "translator-credits" -#~ msgstr "" -#~ "如對翻譯有任何意見,請送一封電子郵件給\n" -#~ "以下地址,GNOME 翻譯團隊會盡快回覆您:\n" -#~ "community@linuxhall.org\n" -#~ "\n" -#~ "Woodman Tuen , 2005." - -#~ msgid "" -#~ "Copyright © 2004-2005 Red Hat, Inc.\n" -#~ "Copyright © 2005-2006 Novell, Inc." -#~ msgstr "" -#~ "版權所有 (C) 2004-2005 Red Hat, Inc.\n" -#~ "版權所有 (C) 2005-2006 Novell, Inc." - -#~ msgid "VPN Login Failure" -#~ msgstr "VPN 登入失敗" - -#~ msgid "Could not start the VPN connection '%s' due to a login failure." -#~ msgstr "因為登入失敗所以無法執行 VPN 連線‘%s’。" - -#~ msgid "VPN Start Failure" -#~ msgstr "VPN 啟動失敗" - -#~ msgid "" -#~ "Could not start the VPN connection '%s' due to a failure launching the " -#~ "VPN program." -#~ msgstr "因為執行 VPN 程式失敗所以無法建立 VPN 連線‘%s’。" - -#~ msgid "VPN Connect Failure" -#~ msgstr "VPN 連線失敗" - -#~ msgid "Could not start the VPN connection '%s' due to a connection error." -#~ msgstr "因為連線錯誤,所以無法啟動 VPN 連線‘%s’。" - -#~ msgid "VPN Configuration Error" -#~ msgstr "VPN 組態發生錯誤" - -#~ msgid "The VPN connection '%s' was not correctly configured." -#~ msgstr "VPN 連線‘%s’沒有設定正確。" - -#~ msgid "" -#~ "Could not start the VPN connection '%s' because the VPN server did not " -#~ "return an adequate network configuration." -#~ msgstr "因為 VPN 伺服器沒有傳回足夠的網路組態所以無法建立 VPN 連線‘%s’。" - -#~ msgid "VPN Login Message" -#~ msgstr "VPN 登入訊息" - -#~ msgid "" -#~ "The NetworkManager Applet could not find some required resources (the " -#~ "glade file was not found)." -#~ msgstr "NetworkManager 面板程式無法找到一些需要的資源(找不到 glade 檔)" - -#~ msgid "The network device \"%s (%s)\" does not support wireless scanning." -#~ msgstr "網路裝置“%s (%s)”不支援無線網路掃描。" - -#~ msgid "The network device \"%s (%s)\" does not support link detection." -#~ msgstr "網路裝置“%s (%s)”不支援連接偵測" - -#~ msgid "(unknown)" -#~ msgstr "(未知)" - -#~ msgid "Preparing device %s for the wired network..." -#~ msgstr "裝置 %s 正準備連接有線網路..." - -#~ msgid "Preparing device %s for the wireless network '%s'..." -#~ msgstr "裝置 %s 正準備連接無線網路‘%s’..." - -#~ msgid "Configuring device %s for the wired network..." -#~ msgstr "設定有線網路裝置 %s ..." - -#~ msgid "Attempting to join the wireless network '%s'..." -#~ msgstr "正在嘗試加入無線網路‘%s’..." - -#~ msgid "Waiting for Network Key for the wireless network '%s'..." -#~ msgstr "正在等待無線網路‘%s’的網路金鑰..." - -#~ msgid "Requesting a network address from the wired network..." -#~ msgstr "正要求有線網路提供網路位址..." - -#~ msgid "Requesting a network address from the wireless network '%s'..." -#~ msgstr "正要求無線網路‘%s’提供網路位址..." - -#~ msgid "Finishing connection to the wired network..." -#~ msgstr "連接有線網路完成..." - -#~ msgid "Finishing connection to the wireless network '%s'..." -#~ msgstr "連接無線網路‘%s’完成..." - -#~ msgid "NetworkManager is not running" -#~ msgstr "NetworkManager 沒有執行" - -#~ msgid "Networking disabled" -#~ msgstr "網路功能停用" - -#~ msgid "No network connection" -#~ msgstr "沒有網路連接" - -#~ msgid "Wired network connection" -#~ msgstr "有線網路連接" - -#~ msgid "Connected to an Ad-Hoc wireless network" -#~ msgstr "連接到 Ad-Hoc 點對點式無線網路" - -#~ msgid "Wireless network connection to '%s' (%d%%)" -#~ msgstr "無線網路連接到‘%s’ (%d%%)" - -#~ msgid "VPN connection to '%s'" -#~ msgstr "VPN 連線連接到‘%s’" - -#~ msgid "VPN connecting to '%s'" -#~ msgstr "VPN 連線至‘%s’" - -#~ msgid "_Connect to Other Wireless Network..." -#~ msgstr "連接到其它的無線網路(_C)..." - -#~ msgid "Create _New Wireless Network..." -#~ msgstr "建立新的無線網路(_N)..." - -#~ msgid "_VPN Connections" -#~ msgstr "_VPN 連線" - -#~ msgid "_Configure VPN..." -#~ msgstr "設定 VP_N..." - -#~ msgid "_Disconnect VPN..." -#~ msgstr "與 V_PN 斷線..." - -#~ msgid "_Dial Up Connections" -#~ msgstr "播接連線(_D)" - -#~ msgid "Connect to %s..." -#~ msgstr "連線到 %s..." - -#~ msgid "Disconnect from %s..." -#~ msgstr "與 %s 斷線..." - -#~ msgid "No network devices have been found" -#~ msgstr "找不到任何網路裝置" - -#~ msgid "NetworkManager is not running..." -#~ msgstr "NetworkManager 沒有執行...." - -#~ msgid "Enable _Networking" -#~ msgstr "啟用網路功能(_N)" - -#~ msgid "Enable _Wireless" -#~ msgstr "啟用無線網路(_W)" - -#~ msgid "Connection _Information" -#~ msgstr "連線資訊(_I)" - -#~ msgid "_Help" -#~ msgstr "求助(_H)" - -#~ msgid "_About" -#~ msgstr "關於(_A)" - -#~ msgid "" -#~ "The NetworkManager applet could not find some required resources. It " -#~ "cannot continue.\n" -#~ msgstr "NetworkManager 面板程式無法找到一些需要的資源。它無法繼續。\n" - -#~ msgid "Open System" -#~ msgstr "開放系統" - -#~ msgid "Shared Key" -#~ msgstr "分享金鑰" - -#~ msgid "Automatic (Default)" -#~ msgstr "自動(預設值)" - -#~ msgid "AES-CCMP" -#~ msgstr "AES-CCMP" - -#~ msgid "TKIP" -#~ msgstr "TKIP" - -#~ msgid "Dynamic WEP" -#~ msgstr "動態 WEP" - -#~ msgid "None" -#~ msgstr "None" - -#~ msgid "WEP 64/128-bit ASCII" -#~ msgstr "WEP 64/128-bit ASCII" - -#~ msgid "WEP 64/128-bit Hex" -#~ msgstr "WEP 64/128-bit Hex" - -#~ msgid "WEP 128-bit Passphrase" -#~ msgstr "WEP 128-bit 密語" - -#~ msgid "PEAP" -#~ msgstr "PEAP" - -#~ msgid "TLS" -#~ msgstr "TLS" - -#~ msgid "TTLS" -#~ msgstr "TTLS" - -#~ msgid "WPA2 Enterprise" -#~ msgstr "WPA2 企業版" - -#~ msgid "WPA Enterprise" -#~ msgstr "WPA 企業版" - -#~ msgid "WPA2 Personal" -#~ msgstr "WPA2 個人版" - -#~ msgid "WPA Personal" -#~ msgstr "WPA 個人版" - -#~ msgid "Orientation" -#~ msgstr "方向" - -#~ msgid "The orientation of the tray." -#~ msgstr "面板的方向" - -#~ msgid "Wired Network (%s)" -#~ msgstr "有線網路 (%s)" - -#~ msgid "_Wired Network" -#~ msgstr "有線網路(_W)" - -#~ msgid "Wireless Network (%s)" -#~ msgid_plural "Wireless Networks (%s)" -#~ msgstr[0] "無線網路 (%s)" - -#~ msgid "Wireless Network" -#~ msgid_plural "Wireless Networks" -#~ msgstr[0] "無線網路" - -#~ msgid " (invalid Unicode)" -#~ msgstr "(無效的統一碼)" - -#~ msgid "" -#~ "By default, the wireless network's name is set to your computer's name, %" -#~ "s, with no encryption enabled" -#~ msgstr "預設上無線網路的名稱是設為您的電腦名稱,%s,並不使用加密" - -#~ msgid "Create new wireless network" -#~ msgstr "建立新的無線網路" - -#~ msgid "" -#~ "Enter the name and security settings of the wireless network you wish to " -#~ "create." -#~ msgstr "輸入您要建立的無線網路的名稱及安全設定。" - -#~ msgid "Create New Wireless Network" -#~ msgstr "建立一個新的無線網路" - -#~ msgid "Existing wireless network" -#~ msgstr "現有的無線網路" - -#~ msgid "Enter the name of the wireless network to which you wish to connect." -#~ msgstr "輸入您要連接的無線網路的名稱。" - -#~ msgid "Connect to Other Wireless Network" -#~ msgstr "連接到其它的無線網路" - -#~ msgid "Error connecting to wireless network" -#~ msgstr "連接到無線網路發生錯誤" - -#~ msgid "" -#~ "The requested wireless network requires security capabilities unsupported " -#~ "by your hardware." -#~ msgstr "您的硬體不支援該無線網路所需的安全性機能。" - -#~ msgid "Cannot start VPN connection '%s'" -#~ msgstr "無法執行 VPN 連線‘%s’" - -#~ msgid "" -#~ "Could not find the authentication dialog for VPN connection type '%s'. " -#~ "Contact your system administrator." -#~ msgstr "找不到 VPN 連線類型‘%s’的驗證對話盒。請連絡您的系統管理者。" - -#~ msgid "" -#~ "There was a problem launching the authentication dialog for VPN " -#~ "connection type '%s'. Contact your system administrator." -#~ msgstr "執行 VPN 連線類型‘%s’的驗證對話盒時發生問題。請連絡您的系統管理者。" - -#~ msgid " " -#~ msgstr " " - -#~ msgid "" -#~ "Active Connection Information" -#~ msgstr "使用中的連線資訊:" - -#~ msgid "" -#~ "Passphrase Required by Wireless " -#~ "Network\n" -#~ "\n" -#~ "A passphrase or encryption key is required to access the wireless network " -#~ "'%s'." -#~ msgstr "" -#~ "無線網路通行碼請求\n" -#~ "\n" -#~ "需要一個通行碼或是密鑰來存取無線網路‘%s’" - -#~ msgid "" -#~ "Reduced Network Functionality\n" -#~ "\n" -#~ "%s It will not be completely functional." -#~ msgstr "" -#~ "簡化的網路功能\n" -#~ "\n" -#~ "%s 它並不能完整的作用。" - -#~ msgid "" -#~ "Wireless Network Login " -#~ "Confirmation\n" -#~ "\n" -#~ "You have chosen to log in to the wireless network '%s'. If you are sure " -#~ "that this wireless network is secure, click the checkbox below and " -#~ "NetworkManager will not require confirmation on subsequent log ins." -#~ msgstr "" -#~ "無線網路登入確認\n" -#~ "\n" -#~ "您已經選擇登入無線網路‘%s’。如果確定此無線網路是安全的,按下下面的核取方" -#~ "塊,NetworkManager 在接下來的登入就不會再要求確認。" - -#~ msgid "Anonymous Identity:" -#~ msgstr "匿名身分:" - -#~ msgid "Authentication:" -#~ msgstr "驗證方式:" - -#~ msgid "Broadcast Address:" -#~ msgstr "廣播位址:" - -#~ msgid "CA Certificate File:" -#~ msgstr "CA 憑證檔案:" - -#~ msgid "C_onnect" -#~ msgstr "連線(_O)" - -#~ msgid "Client Certificate File:" -#~ msgstr "客戶端憑證檔案:" - -#~ msgid "Connection Information" -#~ msgstr "連線資訊" - -#~ msgid "Default Route:" -#~ msgstr "預設路由:" - -#~ msgid "Destination Address:" -#~ msgstr "目的地位址:" - -#~ msgid "Driver:" -#~ msgstr "驅動程式:" - -#~ msgid "EAP Method:" -#~ msgstr "EAP 方法:" - -#~ msgid "Hardware Address:" -#~ msgstr "硬體位址:" - -#~ msgid "IP Address:" -#~ msgstr "IP 位址:" - -#~ msgid "Identity:" -#~ msgstr "身分:" - -#~ msgid "Interface:" -#~ msgstr "介面:" - -#~ msgid "Key Type:" -#~ msgstr "金鑰類型:" - -#~ msgid "Key management:" -#~ msgstr "金鑰管理:" - -#~ msgid "Key:" -#~ msgstr "金鑰:" - -#~ msgid "" -#~ "None\n" -#~ "WEP 128-bit Passphrase\n" -#~ "WEP 64/128-bit Hex\n" -#~ "WEP 64/128-bit ASCII\n" -#~ msgstr "" -#~ "無\n" -#~ "WEP 128-bit 密語\n" -#~ "WEP 64/128-bit Hex\n" -#~ "WEP 64/128-bit ASCII\n" - -#~ msgid "" -#~ "Open System\n" -#~ "Shared Key" -#~ msgstr "" -#~ "開放系統\n" -#~ "分享金鑰" - -#~ msgid "Other Wireless Network..." -#~ msgstr "其它無線網路..." - -#~ msgid "Passphrase:" -#~ msgstr "通行碼:" - -#~ msgid "Password:" -#~ msgstr "密碼:" - -#~ msgid "Primary DNS:" -#~ msgstr "主要 DNS:" - -#~ msgid "Private Key File:" -#~ msgstr "私密金鑰檔案:" - -#~ msgid "Private Key Password:" -#~ msgstr "私密金鑰密碼 :" - -#~ msgid "Secondary DNS:" -#~ msgstr "次要 DNS:" - -#~ msgid "Select the CA Certificate File" -#~ msgstr "選擇 CA 憑證檔案" - -#~ msgid "Select the Client Certificate File" -#~ msgstr "選擇客戶端憑證檔案" - -#~ msgid "Select the Private Key File" -#~ msgstr "選擇私密金鑰檔案" - -#~ msgid "Show key" -#~ msgstr "顯示金鑰" - -#~ msgid "Show passphrase" -#~ msgstr "顯示密語" - -#~ msgid "Show password" -#~ msgstr "顯示密碼" - -#~ msgid "Show passwords" -#~ msgstr "顯示密碼" - -#~ msgid "Speed:" -#~ msgstr "連線速度:" - -#~ msgid "Subnet Mask:" -#~ msgstr "子網路遮罩:" - -#~ msgid "Type:" -#~ msgstr "Type:" - -#~ msgid "User Name:" -#~ msgstr "使用者名稱:" - -#~ msgid "Wireless Network Key Required" -#~ msgstr "需要無線網路金鑰" - -#~ msgid "Wireless _adapter:" -#~ msgstr "無線網絡卡(_A):" - -#~ msgid "_Always Trust this Wireless Network" -#~ msgstr "總是信任這無線網路(_A)" - -#~ msgid "_Don't remind me again" -#~ msgstr "不要再提醒我(_D)" - -#~ msgid "_Fallback on this Network" -#~ msgstr "退出此網路(_F)" - -#~ msgid "_Login to Network" -#~ msgstr "登入網路(_L)" - -#~ msgid "_Network Name:" -#~ msgstr "網路名稱(_N):" - -#~ msgid "_Wireless Security:" -#~ msgstr "無線安全性(_W):" - -#~ msgid "Cannot add VPN connection" -#~ msgstr "無法加入 VPN 連線" - -#~ msgid "" -#~ "No suitable VPN software was found on your system. Contact your system " -#~ "administrator." -#~ msgstr "在您的系統上找不到合適的 VPN 軟體。請連絡您的系統管理者。" - -#~ msgid "Cannot import VPN connection" -#~ msgstr "無法匯入 VPN 網路連線" - -#~ msgid "" -#~ "Cannot find suitable software for VPN connection type '%s' to import the " -#~ "file '%s'. Contact your system administrator." -#~ msgstr "" -#~ "找不到適合 VPN 連線類型‘%s’的軟體來匯入檔案‘%s’。請連絡您的系統管理者。" - -#~ msgid "Error retrieving VPN connection '%s'" -#~ msgstr "接收 VPN 連線‘%s’時發生錯誤" - -#~ msgid "" -#~ "Could not find the UI files for VPN connection type '%s'. Contact your " -#~ "system administrator." -#~ msgstr "找不到 VPN 連線類型‘%s’的 UI 檔案。請連絡您的系統管理者。" - -#~ msgid "Delete VPN connection \"%s\"?" -#~ msgstr "刪除 VPN 連線“%s”?" - -#~ msgid "" -#~ "All information about the VPN connection \"%s\" will be lost and you may " -#~ "need your system administrator to provide information to create a new " -#~ "connection." -#~ msgstr "" -#~ "所有 VPN 連線‘%s’的相關資訊都會消失,而您需要請系統管理者提供建立新連線的" -#~ "資訊。" - -#~ msgid "Unable to load" -#~ msgstr "無法載入" - -#~ msgid "Cannot find some needed resources (the glade file)!" -#~ msgstr "無法找到一些需要的資源( glade 檔)!" - -#~ msgid "Create VPN Connection" -#~ msgstr "建立 VPN 連線" - -#~ msgid "Edit VPN Connection" -#~ msgstr "編輯 VPN 連線" - -#~ msgid "Add a new VPN connection" -#~ msgstr "加入新的 VPN 連線" - -#~ msgid "Delete the selected VPN connection" -#~ msgstr "刪除選擇的 VPN 連線" - -#~ msgid "E_xport" -#~ msgstr "匯出(_X)" - -#~ msgid "Edit the selected VPN connection" -#~ msgstr "編輯已選的 VPN 連線" - -#~ msgid "Export the VPN settings to a file" -#~ msgstr "匯出 VPN 設定至檔案" - -#~ msgid "Export the selected VPN connection to a file" -#~ msgstr "匯出選擇的 VPN 連線至檔案" - -#~ msgid "Manage Virtual Private Network Connections" -#~ msgstr "管理虛擬私有網路連線" - -#~ msgid "VPN Connections" -#~ msgstr "VPN 連線" - -#~ msgid "40-bit WEP" -#~ msgstr "40-bit WEP" - -#~ msgid "104-bit WEP" -#~ msgstr "104-bit WEP" - -#~ msgid "WPA TKIP" -#~ msgstr "WPA TKIP" - -#~ msgid "WPA CCMP" -#~ msgstr "WPA CCMP" - -#~ msgid "WPA Automatic" -#~ msgstr "WPA 自動" - -#~ msgid "WPA2 TKIP" -#~ msgstr "WPA2 TKIP" - -#~ msgid "WPA2 CCMP" -#~ msgstr "WPA2 CCMP" - -#~ msgid "WPA2 Automatic" -#~ msgstr "WPA 自動" - -#~ msgid "none" -#~ msgstr "none" - -#~ msgid "operation took too long" -#~ msgstr "操作時間太久" - -#~ msgid "received data from wrong type of sender" -#~ msgstr "從傳送者接收錯誤類型的資料" - -#~ msgid "received data from unexpected sender" -#~ msgstr "從傳送者接收未預期類型的資料" - -#~ msgid "too much data was sent over socket and some of it was lost" -#~ msgstr "透過 socket 傳送太多資料以致其中有些遺失了" - -#~ msgid "You are now connected to the Ad-Hoc wireless network '%s'." -#~ msgstr "您目前連接到 Ad-Hoc 點對點式無線網路‘%s’。" - -#~ msgid "You are now connected to the wireless network '%s'." -#~ msgstr "您目前連接到無線網路‘%s’。" - -#~ msgid "You are now connected to the wired network." -#~ msgstr "您目前連接到有線網路‘%s’。" - -#~ msgid "Connection Established" -#~ msgstr "連線已建立" - -#~ msgid "Disconnected" -#~ msgstr "Disconnected" - -#~ msgid "The network connection has been disconnected." -#~ msgstr "該網路連線已經斷線。" - -#~ msgid "LEAP" -#~ msgstr "LEAP" - -#~ msgid "Failed to get information about the interface!" -#~ msgstr "無法取得網路介面的訊資!" - -#~ msgid "VPN Error" -#~ msgstr "VPN 錯誤" - -#~ msgid "" -#~ "VPN Login Message\n" -#~ "\n" -#~ "VPN connection '%s' said:\n" -#~ "\n" -#~ "\"%s\"" -#~ msgstr "" -#~ "VPN 登入訊息\n" -#~ "\n" -#~ "VPN 連線‘%s’說:\n" -#~ "\n" -#~ "\"%s\"" - -#~ msgid "_Stop All Wireless Devices" -#~ msgstr "停止所有無線網路裝置(_S)" - -#~ msgid "_Start All Wireless Devices" -#~ msgstr "開始執行所有無線網路裝置(_S)" - -#, fuzzy -#~ msgid "_Wireless Network Discovery" -#~ msgstr "無線網路 (%s)" - -#~ msgid "Always Search" -#~ msgstr "總是搜尋" - -#~ msgid "Search Only When Disconnected" -#~ msgstr "在斷線時才搜尋" - -#~ msgid "Never Search" -#~ msgstr "永不搜尋" - -#~ msgid "Stop All Wireless Devices" -#~ msgstr "停止所有無線網路裝置" - -#, fuzzy -#~ msgid "ASCII Key:" -#~ msgstr "Acii 格式金鑰:" - -#~ msgid "" -#~ "128-bit Passphrase (WEP)\n" -#~ "Ascii Key (WEP)\n" -#~ "Hex Key (WEP)" -#~ msgstr "" -#~ "128位元通行碼 (WEP)\n" -#~ "Acii 格式金鑰 (WEP)\n" -#~ "Hex 格式金鑰 (WEP)" - -#~ msgid "" -#~ "128-bit passphrase (WEP)\n" -#~ "Ascii key (WEP)\n" -#~ "Hex key (WEP)" -#~ msgstr "" -#~ "128位元通行碼 (WEP)\n" -#~ "Acii 格式金鑰 (WEP)\n" -#~ "Hex 格式金鑰 (WEP)" - -#~ msgid "Key type:" -#~ msgstr "金鑰類型:" - -#~ msgid "Wireless _network:" -#~ msgstr "無線網路(_N):" - -#~ msgid "_OK" -#~ msgstr "確定(_O)" - -#~ msgid "Create VPN Connection - 1 of 2" -#~ msgstr "建立 VPN 連線 - 第一步" - -#~ msgid "Create VPN Connection - 2 of 2" -#~ msgstr "建立 VPN 連線 - 第二步" - -#~ msgid "Finish create VPN Connection" -#~ msgstr "建立 VPN 連線完成" - -#~ msgid "%s" -#~ msgstr "%s" - -#~ msgid "Modify Wireless Networks" -#~ msgstr "修改無線網路" - -#~ msgid "*" -#~ msgstr "*" - -#~ msgid "You must log in to access the private network %s" -#~ msgstr "您需要登入來存取私有網路 %s" diff --git a/src/Makefile.am b/src/Makefile.am index 14ddec3abe..6bc2a404bb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,5 @@ SUBDIRS= \ + logging \ named-manager \ vpn-manager \ dhcp-manager \ @@ -17,6 +18,7 @@ SUBDIRS= \ INCLUDES = -I${top_srcdir} \ -I${top_srcdir}/include \ -I${top_builddir}/marshallers \ + -I${top_srcdir}/src/logging \ -I${top_srcdir}/src/named-manager \ -I${top_srcdir}/src/vpn-manager \ -I${top_srcdir}/src/dhcp-manager \ @@ -31,14 +33,19 @@ INCLUDES = -I${top_srcdir} \ -I${top_srcdir}/libnm-glib \ -I${top_srcdir}/callouts +########################################### +# Test libraries +########################################### + +noinst_LTLIBRARIES = libtest-dhcp.la libtest-policy-hosts.la + ########################################### # DHCP test library ########################################### -noinst_LTLIBRARIES = libtest-dhcp.la - libtest_dhcp_la_SOURCES = \ nm-ip4-config.c \ + nm-ip6-config.c \ nm-hostname-provider.c \ nm-dbus-manager.c @@ -48,11 +55,28 @@ libtest_dhcp_la_CPPFLAGS = \ $(LIBNL_CFLAGS) libtest_dhcp_la_LIBADD = \ + $(top_builddir)/marshallers/libmarshallers.la \ $(top_builddir)/libnm-util/libnm-util.la \ $(GLIB_LIBS) \ $(DBUS_LIBS) \ $(LIBNL_LIBS) +########################################### +# Hosts policy test library +########################################### + +libtest_policy_hosts_la_SOURCES = \ + nm-policy-hosts.c \ + nm-policy-hosts.h + +libtest_policy_hosts_la_CPPFLAGS = \ + -DSYSCONFDIR=\"$(sysconfdir)\" \ + $(GLIB_CFLAGS) + +libtest_policy_hosts_la_LIBADD = \ + ${top_builddir}/src/logging/libnm-logging.la \ + $(GLIB_LIBS) + ########################################### # NetworkManager @@ -76,8 +100,14 @@ NetworkManager_SOURCES = \ nm-device-olpc-mesh.h \ nm-device-bt.c \ nm-device-bt.h \ - NetworkManagerAP.c \ - NetworkManagerAP.h \ + nm-device-modem.h \ + nm-device-modem.c \ + nm-device-cdma.c \ + nm-device-cdma.h \ + nm-device-gsm.c \ + nm-device-gsm.h \ + nm-wifi-ap.c \ + nm-wifi-ap.h \ nm-dbus-manager.h \ nm-dbus-manager.c \ nm-udev-manager.c \ @@ -92,15 +122,17 @@ NetworkManager_SOURCES = \ nm-secrets-provider-interface.h \ nm-active-connection.h \ nm-active-connection.c \ - NetworkManager.c \ - NetworkManagerPolicy.c \ - NetworkManagerPolicy.h \ + main.c \ + nm-policy.c \ + nm-policy.h \ + nm-policy-hosts.c \ + nm-policy-hosts.h \ + nm-policy-hostname.c \ + nm-policy-hostname.h \ NetworkManagerUtils.c \ NetworkManagerUtils.h \ - NetworkManagerSystem.c \ - NetworkManagerSystem.h \ - nm-logging.c \ - nm-logging.h \ + nm-system.c \ + nm-system.h \ nm-manager.c \ nm-manager.h \ nm-netlink-monitor.c \ @@ -111,10 +143,10 @@ NetworkManager_SOURCES = \ nm-properties-changed-signal.h \ wpa.c \ wpa.h \ - nm-netlink.c \ - nm-netlink.h \ nm-dhcp4-config.c \ nm-dhcp4-config.h \ + nm-dhcp6-config.c \ + nm-dhcp6-config.h \ nm-rfkill.h nm-access-point-glue.h: $(top_srcdir)/introspection/nm-access-point.xml @@ -150,6 +182,15 @@ nm-active-connection-glue.h: $(top_srcdir)/introspection/nm-active-connection.xm nm-dhcp4-config-glue.h: $(top_srcdir)/introspection/nm-dhcp4-config.xml dbus-binding-tool --prefix=nm_dhcp4_config --mode=glib-server --output=$@ $< +nm-dhcp6-config-glue.h: $(top_srcdir)/introspection/nm-dhcp6-config.xml + dbus-binding-tool --prefix=nm_dhcp6_config --mode=glib-server --output=$@ $< + +nm-device-cdma-glue.h: $(top_srcdir)/introspection/nm-device-cdma.xml + dbus-binding-tool --prefix=nm_device_cdma --mode=glib-server --output=$@ $< + +nm-device-gsm-glue.h: $(top_srcdir)/introspection/nm-device-gsm.xml + dbus-binding-tool --prefix=nm_device_gsm --mode=glib-server --output=$@ $< + BUILT_SOURCES = \ nm-access-point-glue.h \ nm-manager-glue.h \ @@ -158,17 +199,18 @@ BUILT_SOURCES = \ nm-device-wifi-glue.h \ nm-device-olpc-mesh-glue.h \ nm-device-bt-glue.h \ + nm-device-cdma-glue.h \ + nm-device-gsm-glue.h \ nm-ip4-config-glue.h \ nm-ip6-config-glue.h \ nm-active-connection-glue.h \ - nm-dhcp4-config-glue.h + nm-dhcp4-config-glue.h \ + nm-dhcp6-config-glue.h NetworkManager_CPPFLAGS = \ $(DBUS_CFLAGS) \ $(GLIB_CFLAGS) \ - $(HAL_CFLAGS) \ $(GUDEV_CFLAGS) \ - $(OPENSSL_CFLAGS) \ $(LIBNL_CFLAGS) \ $(GMODULE_CFLAGS) \ $(WIMAX_CFLAGS) \ @@ -185,6 +227,7 @@ NetworkManager_CPPFLAGS = \ NetworkManager_LDADD = \ $(top_builddir)/marshallers/libmarshallers.la \ + ./logging/libnm-logging.la \ ./named-manager/libnamed-manager.la \ ./vpn-manager/libvpn-manager.la \ ./dhcp-manager/libdhcp-manager.la \ diff --git a/src/NetworkManager.conf b/src/NetworkManager.conf index 87814bec2a..8d08314002 100644 --- a/src/NetworkManager.conf +++ b/src/NetworkManager.conf @@ -56,6 +56,10 @@ + + @@ -64,6 +68,10 @@ + + diff --git a/src/NetworkManagerUtils.c b/src/NetworkManagerUtils.c index 4934d465c6..22cf2fa0d8 100644 --- a/src/NetworkManagerUtils.c +++ b/src/NetworkManagerUtils.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2004 - 2008 Red Hat, Inc. + * Copyright (C) 2004 - 2010 Red Hat, Inc. * Copyright (C) 2005 - 2008 Novell, Inc. */ @@ -28,6 +28,7 @@ #include "NetworkManagerUtils.h" #include "nm-utils.h" +#include "nm-logging.h" #include "nm-device.h" #include "nm-device-wifi.h" #include "nm-device-ethernet.h" @@ -85,13 +86,13 @@ nm_spawn_process (const char *args) g_return_val_if_fail (args != NULL, -1); if (!g_shell_parse_argv (args, &num_args, &argv, &error)) { - nm_warning ("could not parse arguments for '%s': %s", args, error->message); + nm_log_warn (LOGD_CORE, "could not parse arguments for '%s': %s", args, error->message); g_error_free (error); return -1; } if (!g_spawn_sync ("/", argv, NULL, 0, NULL, NULL, NULL, NULL, &status, &error)) { - nm_warning ("could not spawn process '%s': %s", args, error->message); + nm_log_warn (LOGD_CORE, "could not spawn process '%s': %s", args, error->message); g_error_free (error); } @@ -394,7 +395,7 @@ nm_utils_call_dispatcher (const char *action, NM_DISPATCHER_DBUS_PATH, NM_DISPATCHER_DBUS_IFACE); if (!proxy) { - nm_warning ("Error: could not get dispatcher proxy!"); + nm_log_err (LOGD_CORE, "could not get dispatcher proxy!"); g_object_unref (dbus_mgr); return; } @@ -553,6 +554,20 @@ value_hash_add_uint (GHashTable *hash, value_hash_add (hash, key, value); } +void +value_hash_add_bool (GHashTable *hash, + const char *key, + gboolean val) +{ + GValue *value; + + value = g_slice_new0 (GValue); + g_value_init (value, G_TYPE_BOOLEAN); + g_value_set_boolean (value, val); + + value_hash_add (hash, key, value); +} + gboolean nm_utils_do_sysctl (const char *path, const char *value) { @@ -579,3 +594,32 @@ nm_utils_do_sysctl (const char *path, const char *value) return TRUE; } +gboolean +nm_utils_get_proc_sys_net_value (const char *path, + const char *iface, + guint32 *out_value) +{ + GError *error = NULL; + char *contents = NULL; + gboolean success = FALSE; + long int tmp; + + if (!g_file_get_contents (path, &contents, NULL, &error)) { + nm_log_dbg (LOGD_DEVICE, "(%s): error reading %s: (%d) %s", + iface, path, + error ? error->code : -1, + error && error->message ? error->message : "(unknown)"); + g_clear_error (&error); + } else { + errno = 0; + tmp = strtol (contents, NULL, 10); + if ((errno == 0) && (tmp == 0 || tmp == 1)) { + *out_value = (guint32) tmp; + success = TRUE; + } + g_free (contents); + } + + return success; +} + diff --git a/src/NetworkManagerUtils.h b/src/NetworkManagerUtils.h index 05f3b837a3..e3d1793b4d 100644 --- a/src/NetworkManagerUtils.h +++ b/src/NetworkManagerUtils.h @@ -67,6 +67,14 @@ void value_hash_add_uint (GHashTable *hash, const char *key, guint32 val); +void value_hash_add_bool (GHashTable *hash, + const char *key, + gboolean val); + gboolean nm_utils_do_sysctl (const char *path, const char *value); +gboolean nm_utils_get_proc_sys_net_value (const char *path, + const char *iface, + guint32 *out_value); + #endif /* NETWORK_MANAGER_UTILS_H */ diff --git a/src/backends/Makefile.am b/src/backends/Makefile.am index 65c96b591e..c3485e5f9b 100644 --- a/src/backends/Makefile.am +++ b/src/backends/Makefile.am @@ -1,9 +1,11 @@ -INCLUDES = -I${top_srcdir} \ - -I${top_srcdir}/include \ - -I${top_srcdir}/src \ - -I${top_srcdir}/src/vpn-manager \ - -I${top_srcdir}/src/named-manager \ - -I${top_srcdir}/libnm-util +INCLUDES = \ + -I${top_srcdir} \ + -I${top_srcdir}/src/logging \ + -I${top_srcdir}/include \ + -I${top_srcdir}/src \ + -I${top_srcdir}/src/vpn-manager \ + -I${top_srcdir}/src/named-manager \ + -I${top_srcdir}/libnm-util noinst_LTLIBRARIES = libnmbackend.la @@ -49,7 +51,15 @@ if TARGET_MANDRIVA libnmbackend_la_SOURCES += NetworkManagerMandriva.c endif -libnmbackend_la_LIBADD += $(DBUS_LIBS) $(GLIB_LIBS) +if TARGET_PARDUS +libnmbackend_la_SOURCES += NetworkManagerPardus.c +endif + +libnmbackend_la_LIBADD += \ + $(top_builddir)/src/logging/libnm-logging.la \ + $(DBUS_LIBS) \ + $(GLIB_LIBS) + libnmbackend_la_CPPFLAGS = \ $(DBUS_CFLAGS) \ $(GLIB_CFLAGS) \ diff --git a/src/backends/NetworkManagerArch.c b/src/backends/NetworkManagerArch.c index 3ed5677e87..c70e24593c 100644 --- a/src/backends/NetworkManagerArch.c +++ b/src/backends/NetworkManagerArch.c @@ -40,7 +40,7 @@ #include #include "NetworkManagerGeneric.h" -#include "NetworkManagerSystem.h" +#include "nm-system.h" #include "NetworkManagerUtils.h" /* diff --git a/src/backends/NetworkManagerDebian.c b/src/backends/NetworkManagerDebian.c index 2f6abd1285..ef9475af6d 100644 --- a/src/backends/NetworkManagerDebian.c +++ b/src/backends/NetworkManagerDebian.c @@ -32,9 +32,9 @@ #include #include "NetworkManagerGeneric.h" -#include "NetworkManagerSystem.h" +#include "nm-system.h" #include "NetworkManagerUtils.h" -#include "nm-utils.h" +#include "nm-logging.h" /* * nm_system_enable_loopback @@ -57,7 +57,7 @@ void nm_system_enable_loopback (void) void nm_system_update_dns (void) { if (g_file_test ("/usr/sbin/nscd", G_FILE_TEST_IS_EXECUTABLE)) { - nm_info ("Clearing nscd hosts cache."); + nm_log_info (LOGD_DNS, "Clearing nscd hosts cache."); nm_spawn_process ("/usr/sbin/nscd -i hosts"); } } diff --git a/src/backends/NetworkManagerFrugalware.c b/src/backends/NetworkManagerFrugalware.c index 492bf19399..dfe62921c0 100644 --- a/src/backends/NetworkManagerFrugalware.c +++ b/src/backends/NetworkManagerFrugalware.c @@ -27,7 +27,7 @@ #include #include -#include "NetworkManagerSystem.h" +#include "nm-system.h" /* Provided by the frugalwareutils package on Frugalware */ #include diff --git a/src/backends/NetworkManagerGeneric.c b/src/backends/NetworkManagerGeneric.c index 7984f2c02d..8f16066fa3 100644 --- a/src/backends/NetworkManagerGeneric.c +++ b/src/backends/NetworkManagerGeneric.c @@ -1,8 +1,5 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* NetworkManager -- Network link manager - * - * Timothee Lecomte - * - * Heavily based on NetworkManagerRedhat.c by Dan Williams * * 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 @@ -18,7 +15,8 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * (C) Copyright 2004 Red Hat, Inc. + * (C) Copyright 2004 - 2010 Red Hat, Inc. + * (C) Copyright 2006 Timothee Lecomte */ #ifdef HAVE_CONFIG_H @@ -33,10 +31,10 @@ #include #include "NetworkManagerGeneric.h" -#include "NetworkManagerSystem.h" +#include "nm-system.h" #include "NetworkManagerUtils.h" -#include "nm-netlink.h" -#include "nm-utils.h" +#include "nm-logging.h" +#include "nm-netlink-monitor.h" /* Because of a bug in libnl, rtnl.h should be included before route.h */ #include @@ -93,8 +91,9 @@ void nm_generic_enable_loopback (void) rtnl_addr_set_label (addr, "lo"); if ((err = rtnl_addr_add (nlh, addr, 0)) < 0) { - if (err != -EEXIST) - nm_warning ("error %d returned from rtnl_addr_add():\n%s", err, nl_geterror()); + if (err != -EEXIST) { + nm_log_warn (LOGD_CORE, "error %d returned from rtnl_addr_add():\n%s", err, nl_geterror()); + } } out: if (addr) diff --git a/src/backends/NetworkManagerGentoo.c b/src/backends/NetworkManagerGentoo.c index 7fa12078a1..8d9e68c59c 100644 --- a/src/backends/NetworkManagerGentoo.c +++ b/src/backends/NetworkManagerGentoo.c @@ -32,8 +32,9 @@ #include #include "NetworkManagerGeneric.h" -#include "NetworkManagerSystem.h" +#include "nm-system.h" #include "NetworkManagerUtils.h" +#include "nm-logging.h" /* * nm_system_enable_loopback @@ -57,11 +58,9 @@ void nm_system_enable_loopback (void) */ void nm_system_update_dns (void) { - #ifdef NM_NO_NAMED - if (nm_spawn_process ("/etc/init.d/nscd status") == 0) - nm_spawn_process ("/etc/init.d/nscd restart"); - #else - nm_spawn_process("/usr/bin/killall -q nscd"); - #endif + if (g_file_test ("/usr/sbin/nscd", G_FILE_TEST_IS_EXECUTABLE)) { + nm_log_info (LOGD_DNS, "Clearing nscd hosts cache."); + nm_spawn_process ("/usr/sbin/nscd -i hosts"); + } } diff --git a/src/backends/NetworkManagerMandriva.c b/src/backends/NetworkManagerMandriva.c index 527a25d896..8209ff4fe6 100644 --- a/src/backends/NetworkManagerMandriva.c +++ b/src/backends/NetworkManagerMandriva.c @@ -30,7 +30,7 @@ #include #include "NetworkManagerGeneric.h" -#include "NetworkManagerSystem.h" +#include "nm-system.h" #include "NetworkManagerUtils.h" /* diff --git a/src/backends/NetworkManagerPaldo.c b/src/backends/NetworkManagerPaldo.c index 0147a3b0e4..0c67e5bdf6 100644 --- a/src/backends/NetworkManagerPaldo.c +++ b/src/backends/NetworkManagerPaldo.c @@ -31,9 +31,9 @@ #include #include "NetworkManagerGeneric.h" -#include "NetworkManagerSystem.h" +#include "nm-system.h" #include "NetworkManagerUtils.h" -#include "nm-utils.h" +#include "nm-logging.h" /* * nm_system_enable_loopback @@ -55,7 +55,7 @@ void nm_system_enable_loopback (void) */ void nm_system_update_dns (void) { - nm_info ("Clearing nscd hosts cache."); + nm_log_info (LOGD_DNS, "Clearing nscd hosts cache."); nm_spawn_process ("/usr/sbin/nscd -i hosts"); } diff --git a/src/nm-netlink.h b/src/backends/NetworkManagerPardus.c similarity index 55% rename from src/nm-netlink.h rename to src/backends/NetworkManagerPardus.c index 7b5e1ba573..d952cf3657 100644 --- a/src/nm-netlink.h +++ b/src/backends/NetworkManagerPardus.c @@ -1,5 +1,6 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* NetworkManager -- Network link manager + * + * Ozan Caglayan * * 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 @@ -15,22 +16,42 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2007 - 2008 Red Hat, Inc. + * (C) Copyright 2004 RedHat, Inc. + * (C) Copyright 2009 TUBITAK/UEKAE */ -#ifndef NM_NETLINK_H -#define NM_NETLINK_H +#ifdef HAVE_CONFIG_H +#include +#endif -#include -#include -#include -#include -#include +#include +#include +#include -int nm_netlink_iface_to_index (const char *iface); -char * nm_netlink_index_to_iface (int idx); -struct rtnl_link * nm_netlink_index_to_rtnl_link (int idx); +#include "NetworkManagerGeneric.h" +#include "nm-system.h" -struct nl_handle * nm_netlink_get_default_handle (void); +/* + * nm_system_enable_loopback + * + * Bring up the loopback interface + * + */ +void nm_system_enable_loopback (void) +{ + nm_generic_enable_loopback (); +} + + +/* + * nm_system_update_dns + * + * Make glibc/nscd aware of any changes to the resolv.conf file by + * restarting nscd. + * + */ +void nm_system_update_dns (void) +{ + /* I'm not running nscd */ +} -#endif /* NM_NETLINK_H */ diff --git a/src/backends/NetworkManagerRedHat.c b/src/backends/NetworkManagerRedHat.c index 1e3f7e9652..954e58a865 100644 --- a/src/backends/NetworkManagerRedHat.c +++ b/src/backends/NetworkManagerRedHat.c @@ -28,7 +28,7 @@ #include #include "NetworkManagerGeneric.h" -#include "NetworkManagerSystem.h" +#include "nm-system.h" #include "NetworkManagerUtils.h" /* diff --git a/src/backends/NetworkManagerSlackware.c b/src/backends/NetworkManagerSlackware.c index 8d7c5bf294..a35e1bb628 100644 --- a/src/backends/NetworkManagerSlackware.c +++ b/src/backends/NetworkManagerSlackware.c @@ -29,7 +29,7 @@ #include #include "NetworkManagerGeneric.h" -#include "NetworkManagerSystem.h" +#include "nm-system.h" /* * nm_system_enable_loopback diff --git a/src/backends/NetworkManagerSuSE.c b/src/backends/NetworkManagerSuSE.c index a0cd1cb105..6c8ec1a5d6 100644 --- a/src/backends/NetworkManagerSuSE.c +++ b/src/backends/NetworkManagerSuSE.c @@ -32,9 +32,9 @@ #include #include "NetworkManagerGeneric.h" -#include "NetworkManagerSystem.h" +#include "nm-system.h" #include "NetworkManagerUtils.h" -#include "nm-utils.h" +#include "nm-logging.h" /* * nm_system_enable_loopback @@ -56,7 +56,7 @@ void nm_system_enable_loopback (void) */ void nm_system_update_dns (void) { - nm_info ("Clearing nscd hosts cache."); + nm_log_info (LOGD_DNS, "Clearing nscd hosts cache."); nm_spawn_process ("/usr/sbin/nscd -i hosts"); } diff --git a/src/bluez-manager/Makefile.am b/src/bluez-manager/Makefile.am index a96cbe8910..6c199e8ca7 100644 --- a/src/bluez-manager/Makefile.am +++ b/src/bluez-manager/Makefile.am @@ -3,6 +3,7 @@ INCLUDES = \ -I${top_srcdir}/include \ -I${top_srcdir}/libnm-util \ -I${top_srcdir}/src \ + -I${top_srcdir}/src/logging \ -I${top_builddir}/marshallers \ -I$(top_srcdir)/src/nm-bluez-manager @@ -30,6 +31,7 @@ libbluez_manager_la_CPPFLAGS = \ libbluez_manager_la_LIBADD = \ $(top_builddir)/marshallers/libmarshallers.la \ + $(top_builddir)/src/logging/libnm-logging.la \ $(DBUS_LIBS) \ $(GLIB_LIBS) \ $(BLUEZ_LIBS) diff --git a/src/bluez-manager/nm-bluez-adapter.c b/src/bluez-manager/nm-bluez-adapter.c index ba8f7114f2..27a85e78eb 100644 --- a/src/bluez-manager/nm-bluez-adapter.c +++ b/src/bluez-manager/nm-bluez-adapter.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009 - 2010 Red Hat, Inc. */ #include @@ -27,7 +27,7 @@ #include "nm-bluez-device.h" #include "nm-bluez-common.h" #include "nm-dbus-glib-types.h" -#include "nm-utils.h" +#include "nm-logging.h" G_DEFINE_TYPE (NMBluezAdapter, nm_bluez_adapter, G_TYPE_OBJECT) @@ -175,8 +175,8 @@ get_properties_cb (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data) if (!dbus_g_proxy_end_call (proxy, call, &err, DBUS_TYPE_G_MAP_OF_VARIANT, &properties, G_TYPE_INVALID)) { - nm_warning ("bluez error getting adapter properties: %s", - err && err->message ? err->message : "(unknown)"); + nm_log_warn (LOGD_BT, "bluez error getting adapter properties: %s", + err && err->message ? err->message : "(unknown)"); g_error_free (err); goto done; } @@ -209,8 +209,8 @@ query_properties (NMBluezAdapter *self) self, NULL, G_TYPE_INVALID); if (!call) { - nm_warning ("failed to request Bluetooth adapter properties for %s.", - priv->path); + nm_log_warn (LOGD_BT, "failed to request Bluetooth adapter properties for %s.", + priv->path); } } diff --git a/src/bluez-manager/nm-bluez-device.c b/src/bluez-manager/nm-bluez-device.c index 6ecd6b43c0..72acaa6906 100644 --- a/src/bluez-manager/nm-bluez-device.c +++ b/src/bluez-manager/nm-bluez-device.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009 - 2010 Red Hat, Inc. */ #include @@ -26,7 +26,7 @@ #include "nm-bluez-device.h" #include "nm-bluez-common.h" #include "nm-dbus-glib-types.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-marshal.h" @@ -228,8 +228,8 @@ get_properties_cb (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data) if (!dbus_g_proxy_end_call (proxy, call, &err, DBUS_TYPE_G_MAP_OF_VARIANT, &properties, G_TYPE_INVALID)) { - nm_warning ("bluez error getting device properties: %s", - err && err->message ? err->message : "(unknown)"); + nm_log_warn (LOGD_BT, "bluez error getting device properties: %s", + err && err->message ? err->message : "(unknown)"); g_error_free (err); g_signal_emit (self, signals[INITIALIZED], 0, FALSE); return; @@ -270,8 +270,8 @@ query_properties (NMBluezDevice *self) self, NULL, G_TYPE_INVALID); if (!call) { - nm_warning ("failed to request Bluetooth device properties for %s.", - priv->path); + nm_log_warn (LOGD_BT, "failed to request Bluetooth device properties for %s.", + priv->path); } } diff --git a/src/bluez-manager/nm-bluez-manager.c b/src/bluez-manager/nm-bluez-manager.c index 96cb3e725e..fe027c4ff5 100644 --- a/src/bluez-manager/nm-bluez-manager.c +++ b/src/bluez-manager/nm-bluez-manager.c @@ -16,7 +16,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 2007 - 2008 Novell, Inc. - * Copyright (C) 2007 - 2009 Red Hat, Inc. + * Copyright (C) 2007 - 2010 Red Hat, Inc. */ #include @@ -24,7 +24,7 @@ #include #include -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-dbus-glib-types.h" #include "nm-marshal.h" #include "nm-bluez-manager.h" @@ -181,8 +181,8 @@ default_adapter_cb (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data) if (!dbus_g_proxy_end_call (proxy, call, &err, DBUS_TYPE_G_OBJECT_PATH, &default_adapter, G_TYPE_INVALID)) { - nm_warning ("bluez error getting default adapter: %s", - err && err->message ? err->message : "(unknown)"); + nm_log_warn (LOGD_BT, "bluez error getting default adapter: %s", + err && err->message ? err->message : "(unknown)"); g_error_free (err); return; } @@ -201,7 +201,7 @@ query_default_adapter (NMBluezManager *self) self, NULL, G_TYPE_INVALID); if (!call) - nm_warning ("failed to request default Bluetooth adapter."); + nm_log_warn (LOGD_BT, "failed to request default Bluetooth adapter."); } static void diff --git a/src/dhcp-manager/Makefile.am b/src/dhcp-manager/Makefile.am index b7b0c6581c..f75e6b3d07 100644 --- a/src/dhcp-manager/Makefile.am +++ b/src/dhcp-manager/Makefile.am @@ -2,6 +2,7 @@ INCLUDES = \ -I${top_srcdir} \ -I${top_srcdir}/include \ -I${top_builddir}/marshallers \ + -I${top_srcdir}/src/logging \ -I${top_srcdir}/libnm-util \ -I${top_srcdir}/src \ -I${top_srcdir}/src/named-manager @@ -9,9 +10,14 @@ INCLUDES = \ noinst_LTLIBRARIES = libdhcp-manager.la libdhcp_manager_la_SOURCES = \ + nm-dhcp-client.c \ + nm-dhcp-client.h \ nm-dhcp-manager.c \ nm-dhcp-manager.h \ - nm-dhcp-@DHCP_CLIENT@.c + nm-dhcp-dhclient.h \ + nm-dhcp-dhclient.c \ + nm-dhcp-dhcpcd.h \ + nm-dhcp-dhcpcd.c libdhcp_manager_la_CPPFLAGS = \ $(DBUS_CFLAGS) \ @@ -22,13 +28,12 @@ libdhcp_manager_la_CPPFLAGS = \ -DSYSCONFDIR=\"$(sysconfdir)\" \ -DLIBEXECDIR=\"$(libexecdir)\" \ -DLOCALSTATEDIR=\"$(localstatedir)\" \ - -DDHCP_CLIENT_PATH=\"$(DHCP_CLIENT_PATH)\" + -DDHCLIENT_PATH=\"$(DHCLIENT_PATH)\" \ + -DDHCPCD_PATH=\"$(DHCPCD_PATH)\" libdhcp_manager_la_LIBADD = \ $(top_builddir)/marshallers/libmarshallers.la \ + $(top_builddir)/src/logging/libnm-logging.la \ $(DBUS_LIBS) \ $(GLIB_LIBS) -EXTRA_DIST = \ - nm-dhcp-dhclient.c \ - nm-dhcp-dhcpcd.c diff --git a/src/dhcp-manager/nm-dhcp-client.c b/src/dhcp-manager/nm-dhcp-client.c new file mode 100644 index 0000000000..5cebaa84ee --- /dev/null +++ b/src/dhcp-manager/nm-dhcp-client.c @@ -0,0 +1,1222 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* 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, 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2005 - 2010 Red Hat, Inc. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "nm-utils.h" +#include "nm-logging.h" +#include "nm-dbus-glib-types.h" +#include "nm-dhcp-client.h" + +typedef struct { + char * iface; + gboolean ipv6; + char * uuid; + guint32 timeout; + + guchar state; + GPid pid; + gboolean dead; + guint timeout_id; + guint watch_id; + guint32 remove_id; + GHashTable * options; + gboolean info_only; + +} NMDHCPClientPrivate; + +#define NM_DHCP_CLIENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DHCP_CLIENT, NMDHCPClientPrivate)) + +G_DEFINE_TYPE_EXTENDED (NMDHCPClient, nm_dhcp_client, G_TYPE_OBJECT, G_TYPE_FLAG_ABSTRACT, {}) + +enum { + STATE_CHANGED, + TIMEOUT, + REMOVE, + LAST_SIGNAL +}; + +static guint signals[LAST_SIGNAL] = { 0 }; + +enum { + PROP_0, + PROP_IFACE, + PROP_IPV6, + PROP_UUID, + PROP_TIMEOUT, + LAST_PROP +}; + +/********************************************/ + +GPid +nm_dhcp_client_get_pid (NMDHCPClient *self) +{ + g_return_val_if_fail (self != NULL, -1); + g_return_val_if_fail (NM_IS_DHCP_CLIENT (self), -1); + + return NM_DHCP_CLIENT_GET_PRIVATE (self)->pid; +} + +const char * +nm_dhcp_client_get_iface (NMDHCPClient *self) +{ + g_return_val_if_fail (self != NULL, NULL); + g_return_val_if_fail (NM_IS_DHCP_CLIENT (self), NULL); + + return NM_DHCP_CLIENT_GET_PRIVATE (self)->iface; +} + +gboolean +nm_dhcp_client_get_ipv6 (NMDHCPClient *self) +{ + g_return_val_if_fail (self != NULL, FALSE); + g_return_val_if_fail (NM_IS_DHCP_CLIENT (self), FALSE); + + return NM_DHCP_CLIENT_GET_PRIVATE (self)->ipv6; +} + +const char * +nm_dhcp_client_get_uuid (NMDHCPClient *self) +{ + g_return_val_if_fail (self != NULL, NULL); + g_return_val_if_fail (NM_IS_DHCP_CLIENT (self), NULL); + + return NM_DHCP_CLIENT_GET_PRIVATE (self)->uuid; +} + +/********************************************/ + +static void +timeout_cleanup (NMDHCPClient *self) +{ + NMDHCPClientPrivate *priv = NM_DHCP_CLIENT_GET_PRIVATE (self); + + if (priv->timeout_id) { + g_source_remove (priv->timeout_id); + priv->timeout_id = 0; + } +} + +static void +watch_cleanup (NMDHCPClient *self) +{ + NMDHCPClientPrivate *priv = NM_DHCP_CLIENT_GET_PRIVATE (self); + + if (priv->watch_id) { + g_source_remove (priv->watch_id); + priv->watch_id = 0; + } +} + +static void +stop_process (GPid pid, const char *iface) +{ + int i = 15; /* 3 seconds */ + + g_return_if_fail (pid > 0); + + /* Tell it to quit; maybe it wants to send out a RELEASE message */ + kill (pid, SIGTERM); + + while (i-- > 0) { + gint child_status; + int ret; + + ret = waitpid (pid, &child_status, WNOHANG); + if (ret > 0) + break; + + if (ret == -1) { + /* Child already exited */ + if (errno == ECHILD) + break; + /* Took too long; shoot it in the head */ + i = 0; + break; + } + g_usleep (G_USEC_PER_SEC / 5); + } + + if (i <= 0) { + if (iface) { + nm_log_warn (LOGD_DHCP, "(%s): DHCP client pid %d didn't exit, will kill it.", + iface, pid); + } + kill (pid, SIGKILL); + + nm_log_dbg (LOGD_DHCP, "waiting for DHCP client pid %d to exit", pid); + waitpid (pid, NULL, 0); + nm_log_dbg (LOGD_DHCP, "DHCP client pid %d cleaned up", pid); + } +} + +static void +real_stop (NMDHCPClient *self) +{ + NMDHCPClientPrivate *priv; + + g_return_if_fail (self != NULL); + g_return_if_fail (NM_IS_DHCP_CLIENT (self)); + + priv = NM_DHCP_CLIENT_GET_PRIVATE (self); + g_return_if_fail (priv->pid > 0); + + /* Clean up the watch handler since we're explicitly killing the daemon */ + watch_cleanup (self); + + stop_process (priv->pid, priv->iface); + + priv->info_only = FALSE; +} + +static gboolean +daemon_timeout (gpointer user_data) +{ + NMDHCPClient *self = NM_DHCP_CLIENT (user_data); + NMDHCPClientPrivate *priv = NM_DHCP_CLIENT_GET_PRIVATE (self); + + if (priv->ipv6) { + nm_log_warn (LOGD_DHCP6, "(%s): DHCPv6 request timed out.", priv->iface); + } else { + nm_log_warn (LOGD_DHCP4, "(%s): DHCPv4 request timed out.", priv->iface); + } + g_signal_emit (G_OBJECT (self), signals[TIMEOUT], 0); + return FALSE; +} + +static gboolean +signal_remove (gpointer user_data) +{ + NMDHCPClient *self = NM_DHCP_CLIENT (user_data); + + NM_DHCP_CLIENT_GET_PRIVATE (self)->remove_id = 0; + g_signal_emit (G_OBJECT (self), signals[REMOVE], 0); + return FALSE; +} + +static void +dhcp_client_set_state (NMDHCPClient *self, + NMDHCPState state, + gboolean emit_state, + gboolean remove_now) +{ + NMDHCPClientPrivate *priv = NM_DHCP_CLIENT_GET_PRIVATE (self); + + priv->state = state; + + if (emit_state) + g_signal_emit (G_OBJECT (self), signals[STATE_CHANGED], 0, priv->state); + + if (state == DHC_END || state == DHC_ABEND) { + /* Start the remove signal timer */ + if (remove_now) { + g_signal_emit (G_OBJECT (self), signals[REMOVE], 0); + } else { + if (!priv->remove_id) + priv->remove_id = g_timeout_add_seconds (5, signal_remove, self); + } + } +} + +static void +daemon_watch_cb (GPid pid, gint status, gpointer user_data) +{ + NMDHCPClient *self = NM_DHCP_CLIENT (user_data); + NMDHCPClientPrivate *priv = NM_DHCP_CLIENT_GET_PRIVATE (self); + NMDHCPState new_state; + + if (priv->ipv6) { + nm_log_info (LOGD_DHCP6, "(%s): DHCPv6 client pid %d exited with status %d", + priv->iface, pid, + WIFEXITED (status) ? WEXITSTATUS (status) : -1); + } else { + nm_log_info (LOGD_DHCP6, "(%s): DHCPv4 client pid %d exited with status %d", + priv->iface, pid, + WIFEXITED (status) ? WEXITSTATUS (status) : -1); + } + + if (!WIFEXITED (status)) { + new_state = DHC_ABEND; + nm_log_warn (LOGD_DHCP, "DHCP client died abnormally"); + } else + new_state = DHC_END; + + watch_cleanup (self); + timeout_cleanup (self); + priv->dead = TRUE; + + dhcp_client_set_state (self, new_state, TRUE, FALSE); +} + +static void +start_monitor (NMDHCPClient *self) +{ + NMDHCPClientPrivate *priv = NM_DHCP_CLIENT_GET_PRIVATE (self); + + g_return_if_fail (priv->pid > 0); + + /* Set up a timeout on the transaction to kill it after the timeout */ + priv->timeout_id = g_timeout_add_seconds (priv->timeout, + daemon_timeout, + self); + priv->watch_id = g_child_watch_add (priv->pid, + (GChildWatchFunc) daemon_watch_cb, + self); +} + +gboolean +nm_dhcp_client_start_ip4 (NMDHCPClient *self, + NMSettingIP4Config *s_ip4, + guint8 *dhcp_anycast_addr) +{ + NMDHCPClientPrivate *priv; + + g_return_val_if_fail (self != NULL, FALSE); + g_return_val_if_fail (NM_IS_DHCP_CLIENT (self), FALSE); + + priv = NM_DHCP_CLIENT_GET_PRIVATE (self); + g_return_val_if_fail (priv->pid == -1, FALSE); + g_return_val_if_fail (priv->ipv6 == FALSE, FALSE); + g_return_val_if_fail (priv->uuid != NULL, FALSE); + + nm_log_info (LOGD_DHCP, "Activation (%s) Beginning DHCPv4 transaction (timeout in %d seconds)", + priv->iface, priv->timeout); + + priv->pid = NM_DHCP_CLIENT_GET_CLASS (self)->ip4_start (self, s_ip4, dhcp_anycast_addr); + if (priv->pid) + start_monitor (self); + + return priv->pid ? TRUE : FALSE; +} + +gboolean +nm_dhcp_client_start_ip6 (NMDHCPClient *self, + NMSettingIP6Config *s_ip6, + guint8 *dhcp_anycast_addr, + gboolean info_only) +{ + NMDHCPClientPrivate *priv; + + g_return_val_if_fail (self != NULL, FALSE); + g_return_val_if_fail (NM_IS_DHCP_CLIENT (self), FALSE); + + priv = NM_DHCP_CLIENT_GET_PRIVATE (self); + g_return_val_if_fail (priv->pid == -1, FALSE); + g_return_val_if_fail (priv->ipv6 == TRUE, FALSE); + g_return_val_if_fail (priv->uuid != NULL, FALSE); + + priv->info_only = info_only; + + nm_log_info (LOGD_DHCP, "Activation (%s) Beginning DHCPv6 transaction (timeout in %d seconds)", + priv->iface, priv->timeout); + + priv->pid = NM_DHCP_CLIENT_GET_CLASS (self)->ip6_start (self, s_ip6, dhcp_anycast_addr, info_only); + if (priv->pid > 0) + start_monitor (self); + + return priv->pid ? TRUE : FALSE; +} + +void +nm_dhcp_client_stop_existing (const char *pid_file, const char *binary_name) +{ + char *pid_contents = NULL, *proc_contents = NULL, *proc_path = NULL; + long int tmp; + + /* Check for an existing instance and stop it */ + if (!g_file_get_contents (pid_file, &pid_contents, NULL, NULL)) + return; + + errno = 0; + tmp = strtol (pid_contents, NULL, 10); + if ((errno == 0) && (tmp > 1)) { + const char *exe; + + /* Ensure the process is a DHCP client */ + proc_path = g_strdup_printf ("/proc/%ld/cmdline", tmp); + if (g_file_get_contents (proc_path, &proc_contents, NULL, NULL)) { + exe = strrchr (proc_contents, '/'); + if (exe) + exe++; + else + exe = proc_contents; + + if (!strcmp (exe, binary_name)) + stop_process ((GPid) tmp, NULL); + } + } + + remove (pid_file); + g_free (proc_path); + g_free (pid_contents); + g_free (proc_contents); +} + +void +nm_dhcp_client_stop (NMDHCPClient *self) +{ + NMDHCPClientPrivate *priv; + + g_return_if_fail (self != NULL); + g_return_if_fail (NM_IS_DHCP_CLIENT (self)); + + priv = NM_DHCP_CLIENT_GET_PRIVATE (self); + + /* Kill the DHCP client */ + if (!priv->dead) { + NM_DHCP_CLIENT_GET_CLASS (self)->stop (self); + priv->dead = TRUE; + + nm_log_info (LOGD_DHCP, "(%s): canceled DHCP transaction, DHCP client pid %d", + priv->iface, priv->pid); + } + + /* And clean stuff up */ + + priv->pid = -1; + dhcp_client_set_state (self, DHC_END, FALSE, TRUE); + + g_hash_table_remove_all (priv->options); + + timeout_cleanup (self); + watch_cleanup (self); +} + +/********************************************/ + +static gboolean +state_is_bound (guint32 state) +{ + if ( (state == DHC_BOUND4) + || (state == DHC_BOUND6) + || (state == DHC_RENEW4) + || (state == DHC_RENEW6) + || (state == DHC_REBOOT) + || (state == DHC_REBIND4) + || (state == DHC_REBIND6) + || (state == DHC_IPV4LL)) + return TRUE; + + return FALSE; +} + +typedef struct { + NMDHCPState state; + const char *name; +} DhcState; + +#define STATE_TABLE_SIZE (sizeof (state_table) / sizeof (state_table[0])) + +static DhcState state_table[] = { + { DHC_NBI, "nbi" }, + { DHC_PREINIT, "preinit" }, + { DHC_PREINIT6,"preinit6" }, + { DHC_BOUND4, "bound" }, + { DHC_BOUND6, "bound6" }, + { DHC_IPV4LL, "ipv4ll" }, + { DHC_RENEW4, "renew" }, + { DHC_RENEW6, "renew6" }, + { DHC_REBOOT, "reboot" }, + { DHC_REBIND4, "rebind" }, + { DHC_REBIND6, "rebind6" }, + { DHC_STOP, "stop" }, + { DHC_STOP6, "stop6" }, + { DHC_MEDIUM, "medium" }, + { DHC_TIMEOUT, "timeout" }, + { DHC_FAIL, "fail" }, + { DHC_EXPIRE, "expire" }, + { DHC_EXPIRE6, "expire6" }, + { DHC_RELEASE, "release" }, + { DHC_RELEASE6,"release6" }, + { DHC_START, "start" }, + { DHC_ABEND, "abend" }, + { DHC_END, "end" }, + { DHC_DEPREF6, "depref6" }, +}; + +static inline const char * +state_to_string (guint32 state) +{ + int i; + + for (i = 0; i < STATE_TABLE_SIZE; i++) { + if (state == state_table[i].state) + return state_table[i].name; + } + + return NULL; +} + +static inline NMDHCPState +string_to_state (const char *name) +{ + int i; + + for (i = 0; i < STATE_TABLE_SIZE; i++) { + if (!strcasecmp (name, state_table[i].name)) + return state_table[i].state; + } + + return 255; +} + +static char * +garray_to_string (GArray *array, const char *key) +{ + GString *str; + int i; + unsigned char c; + char *converted = NULL; + + g_return_val_if_fail (array != NULL, NULL); + + /* Since the DHCP options come through environment variables, they should + * already be UTF-8 safe, but just make sure. + */ + str = g_string_sized_new (array->len); + for (i = 0; i < array->len; i++) { + c = array->data[i]; + + /* Convert NULLs to spaces and non-ASCII characters to ? */ + if (c == '\0') + c = ' '; + else if (c > 127) + c = '?'; + str = g_string_append_c (str, c); + } + str = g_string_append_c (str, '\0'); + + converted = str->str; + if (!g_utf8_validate (converted, -1, NULL)) + nm_log_warn (LOGD_DHCP, "DHCP option '%s' couldn't be converted to UTF-8", key); + g_string_free (str, FALSE); + return converted; +} + +static void +copy_option (gpointer key, + gpointer value, + gpointer user_data) +{ + GHashTable *hash = user_data; + const char *str_key = (const char *) key; + char *str_value = NULL; + + if (G_VALUE_TYPE (value) != DBUS_TYPE_G_UCHAR_ARRAY) { + nm_log_warn (LOGD_DHCP, "unexpected key %s value type was not " + "DBUS_TYPE_G_UCHAR_ARRAY", + str_key); + return; + } + + str_value = garray_to_string ((GArray *) g_value_get_boxed (value), str_key); + if (str_value) + g_hash_table_insert (hash, g_strdup (str_key), str_value); +} + +void +nm_dhcp_client_new_options (NMDHCPClient *self, + GHashTable *options, + const char *reason) +{ + NMDHCPClientPrivate *priv; + guint32 old_state; + guint32 new_state; + + g_return_if_fail (self != NULL); + g_return_if_fail (NM_IS_DHCP_CLIENT (self)); + g_return_if_fail (options != NULL); + g_return_if_fail (reason != NULL); + + priv = NM_DHCP_CLIENT_GET_PRIVATE (self); + old_state = priv->state; + new_state = string_to_state (reason); + + /* Clear old and save new DHCP options */ + g_hash_table_remove_all (priv->options); + g_hash_table_foreach (options, copy_option, priv->options); + + if (old_state == new_state) + return; + + /* Handle changed device state */ + if (state_is_bound (new_state)) { + /* Cancel the timeout if the DHCP client is now bound */ + timeout_cleanup (self); + } + + if (priv->ipv6) { + nm_log_info (LOGD_DHCP6, "(%s): DHCPv6 state changed %s -> %s", + priv->iface, + state_to_string (old_state), + state_to_string (new_state)); + } else { + nm_log_info (LOGD_DHCP4, "(%s): DHCPv4 state changed %s -> %s", + priv->iface, + state_to_string (old_state), + state_to_string (new_state)); + } + + dhcp_client_set_state (self, new_state, TRUE, FALSE); +} + +#define NEW_TAG "new_" +#define OLD_TAG "old_" + +gboolean +nm_dhcp_client_foreach_option (NMDHCPClient *self, + GHFunc func, + gpointer user_data) +{ + NMDHCPClientPrivate *priv; + GHashTableIter iter; + gpointer iterkey, itervalue; + + g_return_val_if_fail (self != NULL, FALSE); + g_return_val_if_fail (NM_IS_DHCP_CLIENT (self), FALSE); + g_return_val_if_fail (func != NULL, FALSE); + + priv = NM_DHCP_CLIENT_GET_PRIVATE (self); + + if (!state_is_bound (priv->state)) { + if (priv->ipv6) { + nm_log_warn (LOGD_DHCP6, "(%s): DHCPv6 client didn't bind to a lease.", priv->iface); + } else { + nm_log_warn (LOGD_DHCP4, "(%s): DHCPv4 client didn't bind to a lease.", priv->iface); + } + } + + g_hash_table_iter_init (&iter, priv->options); + while (g_hash_table_iter_next (&iter, &iterkey, &itervalue)) { + const char *key = iterkey, *value = itervalue; + const char **p; + static const char *filter_options[] = { + "interface", "pid", "reason", "dhcp_message_type", NULL + }; + gboolean ignore = FALSE; + + /* Filter out stuff that's not actually new DHCP options */ + for (p = filter_options; *p; p++) { + if (!strcmp (*p, key) || !strncmp (key, OLD_TAG, strlen (OLD_TAG))) { + ignore = TRUE; + break; + } + } + + if (!ignore) { + const char *tmp_key = value; + + /* Remove the "new_" prefix that dhclient passes back */ + if (!strncmp (key, NEW_TAG, strlen (NEW_TAG))) + tmp_key = key + strlen (NEW_TAG); + + func ((gpointer) tmp_key, (gpointer) value, user_data); + } + } + return TRUE; +} + +/********************************************/ + +static void +process_classful_routes (GHashTable *options, NMIP4Config *ip4_config) +{ + const char *str; + char **searches, **s; + + str = g_hash_table_lookup (options, "new_static_routes"); + if (!str) + return; + + searches = g_strsplit (str, " ", 0); + if ((g_strv_length (searches) % 2)) { + nm_log_info (LOGD_DHCP, " static routes provided, but invalid"); + goto out; + } + + for (s = searches; *s; s += 2) { + NMIP4Route *route; + struct in_addr rt_addr; + struct in_addr rt_route; + + if (inet_pton (AF_INET, *s, &rt_addr) <= 0) { + nm_log_warn (LOGD_DHCP, "DHCP provided invalid static route address: '%s'", *s); + continue; + } + if (inet_pton (AF_INET, *(s + 1), &rt_route) <= 0) { + nm_log_warn (LOGD_DHCP, "DHCP provided invalid static route gateway: '%s'", *(s + 1)); + continue; + } + + // FIXME: ensure the IP addresse and route are sane + + route = nm_ip4_route_new (); + nm_ip4_route_set_dest (route, (guint32) rt_addr.s_addr); + nm_ip4_route_set_prefix (route, 32); /* 255.255.255.255 */ + nm_ip4_route_set_next_hop (route, (guint32) rt_route.s_addr); + + nm_ip4_config_take_route (ip4_config, route); + nm_log_info (LOGD_DHCP, " static route %s gw %s", *s, *(s + 1)); + } + +out: + g_strfreev (searches); +} + +static void +process_domain_search (const char *str, GFunc add_func, gpointer user_data) +{ + char **searches, **s; + char *unescaped, *p; + int i; + + g_return_if_fail (str != NULL); + g_return_if_fail (add_func != NULL); + + p = unescaped = g_strdup (str); + do { + p = strstr (p, "\\032"); + if (!p) + break; + + /* Clear the escaped space with real spaces */ + for (i = 0; i < 4; i++) + *p++ = ' '; + } while (*p++); + + if (strchr (unescaped, '\\')) { + nm_log_warn (LOGD_DHCP, " invalid domain search: '%s'", unescaped); + goto out; + } + + searches = g_strsplit (unescaped, " ", 0); + for (s = searches; *s; s++) { + if (strlen (*s)) { + nm_log_info (LOGD_DHCP, " domain search '%s'", *s); + add_func (*s, user_data); + } + } + g_strfreev (searches); + +out: + g_free (unescaped); +} + +static void +ip4_add_domain_search (gpointer data, gpointer user_data) +{ + nm_ip4_config_add_search (NM_IP4_CONFIG (user_data), (const char *) data); +} + +/* Given a table of DHCP options from the client, convert into an IP4Config */ +static NMIP4Config * +ip4_options_to_config (NMDHCPClient *self) +{ + NMDHCPClientPrivate *priv; + NMIP4Config *ip4_config = NULL; + struct in_addr tmp_addr; + NMIP4Address *addr = NULL; + char *str = NULL; + guint32 gwaddr = 0, prefix = 0; + gboolean have_classless = FALSE; + + g_return_val_if_fail (self != NULL, NULL); + g_return_val_if_fail (NM_IS_DHCP_CLIENT (self), NULL); + + priv = NM_DHCP_CLIENT_GET_PRIVATE (self); + g_return_val_if_fail (priv->options != NULL, NULL); + + ip4_config = nm_ip4_config_new (); + if (!ip4_config) { + nm_log_warn (LOGD_DHCP4, "(%s): couldn't allocate memory for an IP4Config!", priv->iface); + return NULL; + } + + addr = nm_ip4_address_new (); + if (!addr) { + nm_log_warn (LOGD_DHCP4, "(%s): couldn't allocate memory for an IP4 Address!", priv->iface); + goto error; + } + + str = g_hash_table_lookup (priv->options, "new_ip_address"); + if (str && (inet_pton (AF_INET, str, &tmp_addr) > 0)) { + nm_ip4_address_set_address (addr, tmp_addr.s_addr); + nm_log_info (LOGD_DHCP4, " address %s", str); + } else + goto error; + + str = g_hash_table_lookup (priv->options, "new_subnet_mask"); + if (str && (inet_pton (AF_INET, str, &tmp_addr) > 0)) { + prefix = nm_utils_ip4_netmask_to_prefix (tmp_addr.s_addr); + nm_log_info (LOGD_DHCP4, " prefix %d (%s)", prefix, str); + } else { + /* Get default netmask for the IP according to appropriate class. */ + prefix = nm_utils_ip4_get_default_prefix (nm_ip4_address_get_address (addr)); + nm_log_info (LOGD_DHCP4, " prefix %d (default)", prefix); + } + nm_ip4_address_set_prefix (addr, prefix); + + /* Routes: if the server returns classless static routes, we MUST ignore + * the 'static_routes' option. + */ + if (NM_DHCP_CLIENT_GET_CLASS (self)->ip4_process_classless_routes) { + have_classless = NM_DHCP_CLIENT_GET_CLASS (self)->ip4_process_classless_routes (self, + priv->options, + ip4_config, + &gwaddr); + } + + if (!have_classless) { + gwaddr = 0; /* Ensure client code doesn't lie */ + process_classful_routes (priv->options, ip4_config); + } + + if (gwaddr) { + char buf[INET_ADDRSTRLEN + 1]; + + inet_ntop (AF_INET, &gwaddr, buf, sizeof (buf)); + nm_log_info (LOGD_DHCP4, " gateway %s", buf); + nm_ip4_address_set_gateway (addr, gwaddr); + } else { + /* If the gateway wasn't provided as a classless static route with a + * subnet length of 0, try to find it using the old-style 'routers' option. + */ + str = g_hash_table_lookup (priv->options, "new_routers"); + if (str) { + char **routers = g_strsplit (str, " ", 0); + char **s; + + for (s = routers; *s; s++) { + /* FIXME: how to handle multiple routers? */ + if (inet_pton (AF_INET, *s, &tmp_addr) > 0) { + nm_ip4_address_set_gateway (addr, tmp_addr.s_addr); + nm_log_info (LOGD_DHCP4, " gateway %s", *s); + break; + } else + nm_log_warn (LOGD_DHCP4, "ignoring invalid gateway '%s'", *s); + } + g_strfreev (routers); + } + } + + nm_ip4_config_take_address (ip4_config, addr); + addr = NULL; + + str = g_hash_table_lookup (priv->options, "new_host_name"); + if (str) + nm_log_info (LOGD_DHCP4, " hostname '%s'", str); + + str = g_hash_table_lookup (priv->options, "new_domain_name_servers"); + if (str) { + char **searches = g_strsplit (str, " ", 0); + char **s; + + for (s = searches; *s; s++) { + if (inet_pton (AF_INET, *s, &tmp_addr) > 0) { + nm_ip4_config_add_nameserver (ip4_config, tmp_addr.s_addr); + nm_log_info (LOGD_DHCP4, " nameserver '%s'", *s); + } else + nm_log_warn (LOGD_DHCP4, "ignoring invalid nameserver '%s'", *s); + } + g_strfreev (searches); + } + + str = g_hash_table_lookup (priv->options, "new_domain_name"); + if (str) { + char **domains = g_strsplit (str, " ", 0); + char **s; + + for (s = domains; *s; s++) { + nm_log_info (LOGD_DHCP4, " domain name '%s'", *s); + nm_ip4_config_add_domain (ip4_config, *s); + } + g_strfreev (domains); + } + + str = g_hash_table_lookup (priv->options, "new_domain_search"); + if (str) + process_domain_search (str, ip4_add_domain_search, ip4_config); + + str = g_hash_table_lookup (priv->options, "new_netbios_name_servers"); + if (str) { + char **searches = g_strsplit (str, " ", 0); + char **s; + + for (s = searches; *s; s++) { + if (inet_pton (AF_INET, *s, &tmp_addr) > 0) { + nm_ip4_config_add_wins (ip4_config, tmp_addr.s_addr); + nm_log_info (LOGD_DHCP4, " wins '%s'", *s); + } else + nm_log_warn (LOGD_DHCP4, "ignoring invalid WINS server '%s'", *s); + } + g_strfreev (searches); + } + + str = g_hash_table_lookup (priv->options, "new_interface_mtu"); + if (str) { + int int_mtu; + + errno = 0; + int_mtu = strtol (str, NULL, 10); + if ((errno == EINVAL) || (errno == ERANGE)) + goto error; + + if (int_mtu > 576) + nm_ip4_config_set_mtu (ip4_config, int_mtu); + } + + return ip4_config; + +error: + if (addr) + nm_ip4_address_unref (addr); + g_object_unref (ip4_config); + return NULL; +} + +NMIP4Config * +nm_dhcp_client_get_ip4_config (NMDHCPClient *self, gboolean test) +{ + NMDHCPClientPrivate *priv; + + g_return_val_if_fail (self != NULL, NULL); + g_return_val_if_fail (NM_IS_DHCP_CLIENT (self), NULL); + + priv = NM_DHCP_CLIENT_GET_PRIVATE (self); + + if (test && !state_is_bound (priv->state)) { + nm_log_warn (LOGD_DHCP4, "(%s): DHCPv4 client didn't bind to a lease.", priv->iface); + return NULL; + } + + if (!g_hash_table_size (priv->options)) { + /* We never got a response from the DHCP client */ + return NULL; + } + + return ip4_options_to_config (self); +} + +/********************************************/ + +static void +ip6_add_domain_search (gpointer data, gpointer user_data) +{ + nm_ip6_config_add_search (NM_IP6_CONFIG (user_data), (const char *) data); +} + +/* Given a table of DHCP options from the client, convert into an IP6Config */ +static NMIP6Config * +ip6_options_to_config (NMDHCPClient *self) +{ + NMDHCPClientPrivate *priv; + NMIP6Config *ip6_config = NULL; + struct in6_addr tmp_addr; + NMIP6Address *addr = NULL; + char *str = NULL; + GHashTableIter iter; + gpointer key, value; + + g_return_val_if_fail (self != NULL, NULL); + g_return_val_if_fail (NM_IS_DHCP_CLIENT (self), NULL); + + priv = NM_DHCP_CLIENT_GET_PRIVATE (self); + g_return_val_if_fail (priv->options != NULL, NULL); + + g_hash_table_iter_init (&iter, priv->options); + while (g_hash_table_iter_next (&iter, &key, &value)) { + nm_log_dbg (LOGD_DHCP6, "(%s): option '%s'=>'%s'", + priv->iface, (const char *) key, (const char *) value); + } + + ip6_config = nm_ip6_config_new (); + if (!ip6_config) { + nm_log_warn (LOGD_DHCP6, "(%s): couldn't allocate memory for an IP6Config!", priv->iface); + return NULL; + } + + addr = nm_ip6_address_new (); + if (!addr) { + nm_log_warn (LOGD_DHCP6, "(%s): couldn't allocate memory for an IP6 Address!", priv->iface); + goto error; + } + + str = g_hash_table_lookup (priv->options, "new_ip6_address"); + if (str) { + if (!inet_pton (AF_INET6, str, &tmp_addr)) { + nm_log_warn (LOGD_DHCP6, "(%s): DHCP returned invalid address '%s'", + priv->iface); + goto error; + } + + nm_ip6_address_set_address (addr, &tmp_addr); + nm_log_info (LOGD_DHCP6, " address %s", str); + } else { + /* No address in managed mode is a hard error */ + if (priv->info_only == FALSE) + goto error; + + /* But "info-only" setups don't necessarily need an address */ + nm_ip6_address_unref (addr); + addr = NULL; + } + + /* Only care about prefix if we got an address */ + if (addr) { + str = g_hash_table_lookup (priv->options, "new_ip6_prefixlen"); + if (str) { + long unsigned int prefix; + + errno = 0; + prefix = strtoul (str, NULL, 10); + if (errno != 0 || prefix > 128) + goto error; + + nm_ip6_address_set_prefix (addr, (guint32) prefix); + nm_log_info (LOGD_DHCP6, " prefix %lu", prefix); + } + + nm_ip6_config_take_address (ip6_config, addr); + addr = NULL; + } + + str = g_hash_table_lookup (priv->options, "new_host_name"); + if (str) + nm_log_info (LOGD_DHCP6, " hostname '%s'", str); + + str = g_hash_table_lookup (priv->options, "new_dhcp6_name_servers"); + if (str) { + char **searches = g_strsplit (str, " ", 0); + char **s; + + for (s = searches; *s; s++) { + if (inet_pton (AF_INET6, *s, &tmp_addr) > 0) { + nm_ip6_config_add_nameserver (ip6_config, &tmp_addr); + nm_log_info (LOGD_DHCP6, " nameserver '%s'", *s); + } else + nm_log_warn (LOGD_DHCP6, "ignoring invalid nameserver '%s'", *s); + } + g_strfreev (searches); + } + + str = g_hash_table_lookup (priv->options, "new_dhcp6_domain_search"); + if (str) + process_domain_search (str, ip6_add_domain_search, ip6_config); + + return ip6_config; + +error: + if (addr) + nm_ip6_address_unref (addr); + g_object_unref (ip6_config); + return NULL; +} + +NMIP6Config * +nm_dhcp_client_get_ip6_config (NMDHCPClient *self, gboolean test) +{ + NMDHCPClientPrivate *priv; + + g_return_val_if_fail (self != NULL, NULL); + g_return_val_if_fail (NM_IS_DHCP_CLIENT (self), NULL); + + priv = NM_DHCP_CLIENT_GET_PRIVATE (self); + + if (test && !state_is_bound (priv->state)) { + nm_log_warn (LOGD_DHCP6, "(%s): DHCPv6 client didn't bind to a lease.", priv->iface); + return NULL; + } + + if (!g_hash_table_size (priv->options)) { + /* We never got a response from the DHCP client */ + return NULL; + } + + return ip6_options_to_config (self); +} + +/********************************************/ + +static void +nm_dhcp_client_init (NMDHCPClient *self) +{ + NMDHCPClientPrivate *priv = NM_DHCP_CLIENT_GET_PRIVATE (self); + + priv->options = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); + priv->pid = -1; +} + +static void +get_property (GObject *object, guint prop_id, + GValue *value, GParamSpec *pspec) +{ + NMDHCPClientPrivate *priv = NM_DHCP_CLIENT_GET_PRIVATE (object); + + switch (prop_id) { + case PROP_IFACE: + g_value_set_string (value, priv->iface); + break; + case PROP_IPV6: + g_value_set_boolean (value, priv->ipv6); + break; + case PROP_UUID: + g_value_set_string (value, priv->uuid); + break; + case PROP_TIMEOUT: + g_value_set_uint (value, priv->timeout); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +set_property (GObject *object, guint prop_id, + const GValue *value, GParamSpec *pspec) +{ + NMDHCPClientPrivate *priv = NM_DHCP_CLIENT_GET_PRIVATE (object); + + switch (prop_id) { + case PROP_IFACE: + /* construct-only */ + priv->iface = g_strdup (g_value_get_string (value)); + break; + case PROP_IPV6: + /* construct-only */ + priv->ipv6 = g_value_get_boolean (value); + break; + case PROP_UUID: + /* construct-only */ + priv->uuid = g_value_dup_string (value); + break; + case PROP_TIMEOUT: + priv->timeout = g_value_get_uint (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +dispose (GObject *object) +{ + NMDHCPClient *self = NM_DHCP_CLIENT (object); + NMDHCPClientPrivate *priv = NM_DHCP_CLIENT_GET_PRIVATE (self); + + /* Stopping the client is left up to the controlling device + * explicitly since we may want to quit NetworkManager but not terminate + * the DHCP client. + */ + + if (priv->remove_id) + g_source_remove (priv->remove_id); + + g_hash_table_destroy (priv->options); + g_free (priv->iface); + + G_OBJECT_CLASS (nm_dhcp_client_parent_class)->dispose (object); +} + +static void +nm_dhcp_client_class_init (NMDHCPClientClass *client_class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (client_class); + + g_type_class_add_private (client_class, sizeof (NMDHCPClientPrivate)); + + /* virtual methods */ + object_class->dispose = dispose; + object_class->get_property = get_property; + object_class->set_property = set_property; + + client_class->stop = real_stop; + + g_object_class_install_property + (object_class, PROP_IFACE, + g_param_spec_string (NM_DHCP_CLIENT_INTERFACE, + "iface", + "Interface", + NULL, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + g_object_class_install_property + (object_class, PROP_IPV6, + g_param_spec_boolean (NM_DHCP_CLIENT_IPV6, + "ipv6", + "IPv6", + FALSE, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + g_object_class_install_property + (object_class, PROP_UUID, + g_param_spec_string (NM_DHCP_CLIENT_UUID, + "uuid", + "UUID", + NULL, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + g_object_class_install_property + (object_class, PROP_TIMEOUT, + g_param_spec_uint (NM_DHCP_CLIENT_TIMEOUT, + "timeout", + "Timeout", + 0, G_MAXUINT, 45, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + /* signals */ + signals[STATE_CHANGED] = + g_signal_new ("state-changed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (NMDHCPClientClass, state_changed), + NULL, NULL, + g_cclosure_marshal_VOID__UINT, + G_TYPE_NONE, 1, G_TYPE_UINT); + + signals[TIMEOUT] = + g_signal_new ("timeout", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (NMDHCPClientClass, timeout), + NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0); + + signals[REMOVE] = + g_signal_new ("remove", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (NMDHCPClientClass, remove), + NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0); +} + diff --git a/src/dhcp-manager/nm-dhcp-client.h b/src/dhcp-manager/nm-dhcp-client.h new file mode 100644 index 0000000000..92b2b8fe51 --- /dev/null +++ b/src/dhcp-manager/nm-dhcp-client.h @@ -0,0 +1,142 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* 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, 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2005 - 2010 Red Hat, Inc. + */ + +#ifndef NM_DHCP_CLIENT_H +#define NM_DHCP_CLIENT_H + +#include +#include + +#include +#include +#include +#include + +#define NM_TYPE_DHCP_CLIENT (nm_dhcp_client_get_type ()) +#define NM_DHCP_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DHCP_CLIENT, NMDHCPClient)) +#define NM_DHCP_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DHCP_CLIENT, NMDHCPClientClass)) +#define NM_IS_DHCP_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DHCP_CLIENT)) +#define NM_IS_DHCP_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_DHCP_CLIENT)) +#define NM_DHCP_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DHCP_CLIENT, NMDHCPClientClass)) + +#define NM_DHCP_CLIENT_INTERFACE "iface" +#define NM_DHCP_CLIENT_IPV6 "ipv6" +#define NM_DHCP_CLIENT_UUID "uuid" +#define NM_DHCP_CLIENT_TIMEOUT "timeout" + +typedef enum { + DHC_NBI = 0, /* no broadcast interfaces found */ + DHC_PREINIT, /* configuration started */ + DHC_PREINIT6, /* configuration started */ + DHC_BOUND4, /* IPv4 lease obtained */ + DHC_BOUND6, /* IPv6 lease obtained */ + DHC_IPV4LL, /* IPv4LL address obtained */ + DHC_RENEW4, /* IPv4 lease renewed */ + DHC_RENEW6, /* IPv6 lease renewed */ + DHC_REBOOT, /* have valid lease, but now obtained a different one */ + DHC_REBIND4, /* IPv4 new/different lease */ + DHC_REBIND6, /* IPv6 new/different lease */ + DHC_DEPREF6, /* IPv6 lease depreferred */ + DHC_STOP, /* remove old lease */ + DHC_STOP6, /* remove old lease */ + DHC_MEDIUM, /* media selection begun */ + DHC_TIMEOUT, /* timed out contacting DHCP server */ + DHC_FAIL, /* all attempts to contact server timed out, sleeping */ + DHC_EXPIRE, /* lease has expired, renewing */ + DHC_EXPIRE6, /* lease has expired, renewing */ + DHC_RELEASE, /* releasing lease */ + DHC_RELEASE6, /* releasing lease */ + DHC_START, /* sent when dhclient started OK */ + DHC_ABEND, /* dhclient exited abnormally */ + DHC_END, /* dhclient exited normally */ + DHC_END_OPTIONS, /* last option in subscription sent */ +} NMDHCPState; + +typedef struct { + GObject parent; +} NMDHCPClient; + +typedef struct { + GObjectClass parent; + + /* Methods */ + + /* Given the options table, extract any classless routes, add them to + * the IP4 config and return TRUE if any existed. If a gateway was sent + * as a classless route return that in out_gwaddr. + */ + gboolean (*ip4_process_classless_routes) (NMDHCPClient *self, + GHashTable *options, + NMIP4Config *ip4_config, + guint32 *out_gwaddr); + + GPid (*ip4_start) (NMDHCPClient *self, + NMSettingIP4Config *s_ip4, + guint8 *anycast_addr); + + GPid (*ip6_start) (NMDHCPClient *self, + NMSettingIP6Config *s_ip6, + guint8 *anycast_addr, + gboolean info_only); + + void (*stop) (NMDHCPClient *self); + + /* Signals */ + void (*state_changed) (NMDHCPClient *self, NMDHCPState state); + void (*timeout) (NMDHCPClient *self); + void (*remove) (NMDHCPClient *self); +} NMDHCPClientClass; + +GType nm_dhcp_client_get_type (void); + +GPid nm_dhcp_client_get_pid (NMDHCPClient *self); + +const char *nm_dhcp_client_get_iface (NMDHCPClient *self); + +gboolean nm_dhcp_client_get_ipv6 (NMDHCPClient *self); + +const char *nm_dhcp_client_get_uuid (NMDHCPClient *self); + +gboolean nm_dhcp_client_start_ip4 (NMDHCPClient *self, + NMSettingIP4Config *s_ip4, + guint8 *dhcp_anycast_addr); + +gboolean nm_dhcp_client_start_ip6 (NMDHCPClient *self, + NMSettingIP6Config *s_ip6, + guint8 *dhcp_anycast_addr, + gboolean info_only); + +void nm_dhcp_client_stop (NMDHCPClient *self); + +void nm_dhcp_client_new_options (NMDHCPClient *self, + GHashTable *options, + const char *reason); + +gboolean nm_dhcp_client_foreach_option (NMDHCPClient *self, + GHFunc func, + gpointer user_data); + +NMIP4Config *nm_dhcp_client_get_ip4_config (NMDHCPClient *self, gboolean test); + +NMIP6Config *nm_dhcp_client_get_ip6_config (NMDHCPClient *self, gboolean test); + +/* Backend helpers */ +void nm_dhcp_client_stop_existing (const char *pid_file, const char *binary_name); + +#endif /* NM_DHCP_CLIENT_H */ + diff --git a/src/dhcp-manager/nm-dhcp-dhclient.c b/src/dhcp-manager/nm-dhcp-dhclient.c index 478ac298f0..d7a6e32fb3 100644 --- a/src/dhcp-manager/nm-dhcp-dhclient.c +++ b/src/dhcp-manager/nm-dhcp-dhclient.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2005 - 2008 Red Hat, Inc. + * Copyright (C) 2005 - 2010 Red Hat, Inc. */ #define _XOPEN_SOURCE @@ -36,46 +36,63 @@ #include -#include "nm-dhcp-manager.h" +#include "nm-dhcp-dhclient.h" #include "nm-utils.h" +#include "nm-logging.h" +G_DEFINE_TYPE (NMDHCPDhclient, nm_dhcp_dhclient, NM_TYPE_DHCP_CLIENT) -#define NM_DHCP_MANAGER_PID_FILENAME "dhclient" -#define NM_DHCP_MANAGER_PID_FILE_EXT "pid" +#define NM_DHCP_DHCLIENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DHCP_DHCLIENT, NMDHCPDhclientPrivate)) #if defined(TARGET_DEBIAN) -#define NM_DHCP_MANAGER_LEASE_DIR LOCALSTATEDIR "/lib/dhcp3" +#define NM_DHCLIENT_LEASE_DIR LOCALSTATEDIR "/lib/dhcp3" #elif defined(TARGET_SUSE) || defined(TARGET_MANDRIVA) -#define NM_DHCP_MANAGER_LEASE_DIR LOCALSTATEDIR "/lib/dhcp" +#define NM_DHCLIENT_LEASE_DIR LOCALSTATEDIR "/lib/dhcp" #else -#define NM_DHCP_MANAGER_LEASE_DIR LOCALSTATEDIR "/lib/dhclient" +#define NM_DHCLIENT_LEASE_DIR LOCALSTATEDIR "/lib/dhclient" #endif -#define NM_DHCP_MANAGER_LEASE_FILENAME "dhclient" -#define NM_DHCP_MANAGER_LEASE_FILE_EXT "lease" #define ACTION_SCRIPT_PATH LIBEXECDIR "/nm-dhcp-client.action" +typedef struct { + const char *path; + char *conf_file; + char *lease_file; + char *pid_file; +} NMDHCPDhclientPrivate; -static char * -get_pidfile_for_iface (const char * iface) +const char * +nm_dhcp_dhclient_get_path (const char *try_first) { - return g_strdup_printf ("%s/%s-%s.%s", - NM_DHCP_MANAGER_RUN_DIR, - NM_DHCP_MANAGER_PID_FILENAME, - iface, - NM_DHCP_MANAGER_PID_FILE_EXT); + static const char *dhclient_paths[] = { + "/sbin/dhclient", + "/usr/sbin/dhclient", + "/usr/pkg/sbin/dhclient", + "/usr/local/sbin/dhclient", + NULL + }; + const char **path = dhclient_paths; + + if (strlen (try_first) && g_file_test (try_first, G_FILE_TEST_EXISTS)) + return try_first; + + while (*path != NULL) { + if (g_file_test (*path, G_FILE_TEST_EXISTS)) + break; + path++; + } + + return *path; } - static char * -get_leasefile_for_iface (const char * iface, const char *uuid) +get_leasefile_for_iface (const char * iface, const char *uuid, gboolean ipv6) { - return g_strdup_printf ("%s/%s-%s-%s.%s", - NM_DHCP_MANAGER_LEASE_DIR, - NM_DHCP_MANAGER_LEASE_FILENAME, + return g_strdup_printf ("%s/dhclient%s-%s-%s.lease", + NM_DHCLIENT_LEASE_DIR, + ipv6 ? "6" : "", uuid, - iface, - NM_DHCP_MANAGER_LEASE_FILE_EXT); + iface); } static void @@ -85,7 +102,7 @@ add_lease_option (GHashTable *hash, char *line) spc = strchr (line, ' '); if (!spc) { - g_warning ("%s: line '%s' did not contain a space", __func__, line); + nm_log_warn (LOGD_DHCP, "DHCP lease file line '%s' did not contain a space", line); return; } @@ -93,8 +110,8 @@ add_lease_option (GHashTable *hash, char *line) if (g_str_has_prefix (line, "option ")) { spc = strchr (spc + 1, ' '); if (!spc) { - g_warning ("%s: option line '%s' did not contain a second space", - __func__, line); + nm_log_warn (LOGD_DHCP, "DHCP lease file option line '%s' did not contain a second space", + line); return; } } @@ -119,7 +136,7 @@ add_lease_option (GHashTable *hash, char *line) } GSList * -nm_dhcp_client_get_lease_ip4_config (const char *iface, const char *uuid) +nm_dhcp_dhclient_get_lease_config (const char *iface, const char *uuid) { GSList *parsed = NULL, *iter, *leases = NULL; char *contents = NULL; @@ -127,7 +144,7 @@ nm_dhcp_client_get_lease_ip4_config (const char *iface, const char *uuid) char **line, **split = NULL; GHashTable *hash = NULL; - leasefile = get_leasefile_for_iface (iface, uuid); + leasefile = get_leasefile_for_iface (iface, uuid, FALSE); if (!leasefile) return NULL; @@ -152,9 +169,9 @@ nm_dhcp_client_get_lease_ip4_config (const char *iface, const char *uuid) } else if (!strcmp (*line, "lease {")) { /* Beginning of a new lease */ if (hash) { - g_warning ("%s: lease file %s malformed; new lease started " - "without ending previous lease", - __func__, leasefile); + nm_log_warn (LOGD_DHCP, "DHCP lease file %s malformed; new lease started " + "without ending previous lease", + leasefile); g_hash_table_destroy (hash); } @@ -166,9 +183,9 @@ nm_dhcp_client_get_lease_ip4_config (const char *iface, const char *uuid) /* Check if the last lease in the file was properly ended */ if (hash) { - g_warning ("%s: lease file %s malformed; new lease started " - "without ending previous lease", - __func__, leasefile); + nm_log_warn (LOGD_DHCP, "DHCP lease file %s malformed; new lease started " + "without ending previous lease", + leasefile); g_hash_table_destroy (hash); hash = NULL; } @@ -195,8 +212,8 @@ nm_dhcp_client_get_lease_ip4_config (const char *iface, const char *uuid) /* Read lease expiration (in UTC) */ if (!strptime (data, "%w %Y/%m/%d %H:%M:%S", &expire)) { - g_warning ("%s: couldn't parse expire time '%s'", - __func__, data); + nm_log_warn (LOGD_DHCP, "couldn't parse DHCP lease file expire time '%s'", + data); continue; } @@ -238,27 +255,30 @@ nm_dhcp_client_get_lease_ip4_config (const char *iface, const char *uuid) /* IP4 address */ if (!inet_pton (AF_INET, data, &tmp)) { - g_warning ("%s: couldn't parse IP4 address '%s'", __func__, data); + nm_log_warn (LOGD_DHCP, "couldn't parse DHCP lease file IP4 address '%s'", data); goto error; } nm_ip4_address_set_address (addr, tmp.s_addr); /* Netmask */ data = g_hash_table_lookup (hash, "option subnet-mask"); - if (!data) - data = "255.255.255.0"; /* FIXME: assume class C? */ - if (!inet_pton (AF_INET, data, &tmp)) { - g_warning ("%s: couldn't parse IP4 subnet mask '%s'", __func__, data); - goto error; + if (data) { + if (!inet_pton (AF_INET, data, &tmp)) { + nm_log_warn (LOGD_DHCP, "couldn't parse DHCP lease file IP4 subnet mask '%s'", data); + goto error; + } + prefix = nm_utils_ip4_netmask_to_prefix (tmp.s_addr); + } else { + /* Get default netmask for the IP according to appropriate class. */ + prefix = nm_utils_ip4_get_default_prefix (nm_ip4_address_get_address (addr)); } - prefix = nm_utils_ip4_netmask_to_prefix (tmp.s_addr); nm_ip4_address_set_prefix (addr, prefix); /* Gateway */ data = g_hash_table_lookup (hash, "option routers"); if (data) { if (!inet_pton (AF_INET, data, &tmp)) { - g_warning ("%s: couldn't parse IP4 gateway '%s'", __func__, data); + nm_log_warn (LOGD_DHCP, "couldn't parse DHCP lease file IP4 gateway '%s'", data); goto error; } nm_ip4_address_set_gateway (addr, tmp.s_addr); @@ -288,28 +308,39 @@ out: #define DHCP_HOSTNAME_FORMAT DHCP_HOSTNAME_TAG " \"%s\"; # added by NetworkManager" static gboolean -merge_dhclient_config (NMDHCPDevice *device, +merge_dhclient_config (const char *iface, + const char *conf_file, NMSettingIP4Config *s_ip4, guint8 *anycast_addr, - const char *contents, - const char *orig, + const char *orig_path, GError **error) { GString *new_contents; + char *orig_contents = NULL; gboolean success = FALSE; - g_return_val_if_fail (device != NULL, FALSE); - g_return_val_if_fail (device->iface != NULL, FALSE); - + g_return_val_if_fail (iface != NULL, FALSE); + g_return_val_if_fail (conf_file != NULL, FALSE); + new_contents = g_string_new (_("# Created by NetworkManager\n")); + if (g_file_test (orig_path, G_FILE_TEST_EXISTS)) { + GError *read_error = NULL; + + if (!g_file_get_contents (orig_path, &orig_contents, NULL, &read_error)) { + nm_log_warn (LOGD_DHCP, "(%s): error reading dhclient configuration %s: %s", + iface, orig_path, read_error->message); + g_error_free (read_error); + } + } + /* Add existing options, if any, but ignore stuff NM will replace. */ - if (contents) { + if (orig_contents) { char **lines = NULL, **line; - g_string_append_printf (new_contents, _("# Merged from %s\n\n"), orig); + g_string_append_printf (new_contents, _("# Merged from %s\n\n"), orig_path); - lines = g_strsplit_set (contents, "\n\r", 0); + lines = g_strsplit_set (orig_contents, "\n\r", 0); for (line = lines; lines && *line; line++) { gboolean ignore = FALSE; @@ -334,6 +365,7 @@ merge_dhclient_config (NMDHCPDevice *device, if (lines) g_strfreev (lines); + g_free (orig_contents); } else g_string_append_c (new_contents, '\n'); @@ -374,14 +406,13 @@ merge_dhclient_config (NMDHCPDevice *device, " initial-interval 1; \n" " anycast-mac ethernet %02x:%02x:%02x:%02x:%02x:%02x;\n" "}\n", - device->iface, + iface, anycast_addr[0], anycast_addr[1], anycast_addr[2], anycast_addr[3], anycast_addr[4], anycast_addr[5]); } - if (g_file_set_contents (device->conf_file, new_contents->str, -1, error)) - success = TRUE; + success = g_file_set_contents (conf_file, new_contents->str, -1, error); g_string_free (new_contents, TRUE); return success; @@ -393,17 +424,16 @@ merge_dhclient_config (NMDHCPDevice *device, * read their single config file and merge that into a custom per-interface * config file along with the NM options. */ -static gboolean -create_dhclient_config (NMDHCPDevice *device, +static char * +create_dhclient_config (const char *iface, NMSettingIP4Config *s_ip4, guint8 *dhcp_anycast_addr) { - char *orig = NULL, *contents = NULL; + char *orig = NULL, *tmp, *conf_file = NULL; GError *error = NULL; gboolean success = FALSE; - char *tmp; - g_return_val_if_fail (device != NULL, FALSE); + g_return_val_if_fail (iface != NULL, FALSE); #if defined(TARGET_SUSE) orig = g_strdup (SYSCONFDIR "/dhclient.conf"); @@ -412,41 +442,28 @@ create_dhclient_config (NMDHCPDevice *device, #elif defined(TARGET_GENTOO) orig = g_strdup (SYSCONFDIR "/dhcp/dhclient.conf"); #else - orig = g_strdup_printf (SYSCONFDIR "/dhclient-%s.conf", device->iface); + orig = g_strdup_printf (SYSCONFDIR "/dhclient-%s.conf", iface); #endif if (!orig) { - nm_warning ("%s: not enough memory for dhclient options.", device->iface); + nm_log_warn (LOGD_DHCP, "(%s): not enough memory for dhclient options.", iface); return FALSE; } - tmp = g_strdup_printf ("nm-dhclient-%s.conf", device->iface); - device->conf_file = g_build_filename ("/var", "run", tmp, NULL); + tmp = g_strdup_printf ("nm-dhclient-%s.conf", iface); + conf_file = g_build_filename ("/var", "run", tmp, NULL); g_free (tmp); - if (!g_file_test (orig, G_FILE_TEST_EXISTS)) - goto out; - - if (!g_file_get_contents (orig, &contents, NULL, &error)) { - nm_warning ("%s: error reading dhclient configuration %s: %s", - device->iface, orig, error->message); - g_error_free (error); - goto out; - } - -out: error = NULL; - if (merge_dhclient_config (device, s_ip4, dhcp_anycast_addr, contents, orig, &error)) - success = TRUE; - else { - nm_warning ("%s: error creating dhclient configuration: %s", - device->iface, error->message); + success = merge_dhclient_config (iface, conf_file, s_ip4, dhcp_anycast_addr, orig, &error); + if (!success) { + nm_log_warn (LOGD_DHCP, "(%s): error creating dhclient configuration: %s", + iface, error->message); g_error_free (error); } - g_free (contents); g_free (orig); - return success; + return conf_file; } @@ -458,80 +475,136 @@ dhclient_child_setup (gpointer user_data G_GNUC_UNUSED) setpgid (pid, pid); } - -GPid -nm_dhcp_client_start (NMDHCPDevice *device, - const char *uuid, - NMSettingIP4Config *s_ip4, - guint8 *dhcp_anycast_addr) +static GPid +dhclient_start (NMDHCPClient *client, + const char *ip_opt, + const char *mode_opt) { - GPtrArray *dhclient_argv = NULL; - GPid pid = 0; + NMDHCPDhclientPrivate *priv = NM_DHCP_DHCLIENT_GET_PRIVATE (client); + GPtrArray *argv = NULL; + GPid pid = -1; GError *error = NULL; - char *pid_contents = NULL; + const char *iface, *uuid; + char *binary_name, *cmd_str; + gboolean ipv6; + guint log_domain; - if (!g_file_test (DHCP_CLIENT_PATH, G_FILE_TEST_EXISTS)) { - nm_warning (DHCP_CLIENT_PATH " does not exist."); - goto out; + g_return_val_if_fail (priv->pid_file == NULL, -1); + g_return_val_if_fail (ip_opt != NULL, -1); + + iface = nm_dhcp_client_get_iface (client); + uuid = nm_dhcp_client_get_uuid (client); + ipv6 = nm_dhcp_client_get_ipv6 (client); + + log_domain = ipv6 ? LOGD_DHCP6 : LOGD_DHCP4; + + priv->pid_file = g_strdup_printf (LOCALSTATEDIR "/run/dhclient%s-%s.pid", + ipv6 ? "6" : "", + iface); + if (!priv->pid_file) { + nm_log_warn (log_domain, "(%s): not enough memory for dhcpcd options.", iface); + return -1; } - device->pid_file = get_pidfile_for_iface (device->iface); - if (!device->pid_file) { - nm_warning ("%s: not enough memory for dhclient options.", device->iface); - goto out; + if (!g_file_test (priv->path, G_FILE_TEST_EXISTS)) { + nm_log_warn (log_domain, "%s does not exist.", priv->path); + return -1; } - device->lease_file = get_leasefile_for_iface (device->iface, uuid); - if (!device->lease_file) { - nm_warning ("%s: not enough memory for dhclient options.", device->iface); - goto out; + /* Kill any existing dhclient from the pidfile */ + binary_name = g_path_get_basename (priv->path); + nm_dhcp_client_stop_existing (priv->pid_file, binary_name); + g_free (binary_name); + + priv->lease_file = get_leasefile_for_iface (iface, uuid, ipv6); + if (!priv->lease_file) { + nm_log_warn (log_domain, "(%s): not enough memory for dhclient options.", iface); + return -1; } - if (!create_dhclient_config (device, s_ip4, dhcp_anycast_addr)) - goto out; + argv = g_ptr_array_new (); + g_ptr_array_add (argv, (gpointer) priv->path); - /* Kill any existing dhclient bound to this interface */ - if (g_file_get_contents (device->pid_file, &pid_contents, NULL, NULL)) { - unsigned long int tmp = strtoul (pid_contents, NULL, 10); + g_ptr_array_add (argv, (gpointer) "-d"); - if (!((tmp == ULONG_MAX) && (errno == ERANGE))) - nm_dhcp_client_stop (device, (pid_t) tmp); - remove (device->pid_file); + g_ptr_array_add (argv, (gpointer) ip_opt); + + if (mode_opt) + g_ptr_array_add (argv, (gpointer) mode_opt); + + g_ptr_array_add (argv, (gpointer) "-sf"); /* Set script file */ + g_ptr_array_add (argv, (gpointer) ACTION_SCRIPT_PATH ); + + g_ptr_array_add (argv, (gpointer) "-pf"); /* Set pid file */ + g_ptr_array_add (argv, (gpointer) priv->pid_file); + + g_ptr_array_add (argv, (gpointer) "-lf"); /* Set lease file */ + g_ptr_array_add (argv, (gpointer) priv->lease_file); + + if (priv->conf_file) { + g_ptr_array_add (argv, (gpointer) "-cf"); /* Set interface config file */ + g_ptr_array_add (argv, (gpointer) priv->conf_file); } - dhclient_argv = g_ptr_array_new (); - g_ptr_array_add (dhclient_argv, (gpointer) DHCP_CLIENT_PATH); + g_ptr_array_add (argv, (gpointer) iface); + g_ptr_array_add (argv, NULL); - g_ptr_array_add (dhclient_argv, (gpointer) "-d"); + cmd_str = g_strjoinv (" ", (gchar **) argv->pdata); + nm_log_dbg (log_domain, "running: %s", cmd_str); + g_free (cmd_str); - g_ptr_array_add (dhclient_argv, (gpointer) "-sf"); /* Set script file */ - g_ptr_array_add (dhclient_argv, (gpointer) ACTION_SCRIPT_PATH ); - - g_ptr_array_add (dhclient_argv, (gpointer) "-pf"); /* Set pid file */ - g_ptr_array_add (dhclient_argv, (gpointer) device->pid_file); - - g_ptr_array_add (dhclient_argv, (gpointer) "-lf"); /* Set lease file */ - g_ptr_array_add (dhclient_argv, (gpointer) device->lease_file); - - g_ptr_array_add (dhclient_argv, (gpointer) "-cf"); /* Set interface config file */ - g_ptr_array_add (dhclient_argv, (gpointer) device->conf_file); - - g_ptr_array_add (dhclient_argv, (gpointer) device->iface); - g_ptr_array_add (dhclient_argv, NULL); - - if (!g_spawn_async (NULL, (char **) dhclient_argv->pdata, NULL, G_SPAWN_DO_NOT_REAP_CHILD, + if (!g_spawn_async (NULL, (char **) argv->pdata, NULL, G_SPAWN_DO_NOT_REAP_CHILD, &dhclient_child_setup, NULL, &pid, &error)) { - nm_warning ("dhclient failed to start. error: '%s'", error->message); + nm_log_warn (log_domain, "dhclient failed to start: '%s'", error->message); g_error_free (error); - goto out; + pid = -1; + } else + nm_log_info (log_domain, "dhclient started with pid %d", pid); + + g_ptr_array_free (argv, TRUE); + return pid; +} + +static GPid +real_ip4_start (NMDHCPClient *client, + NMSettingIP4Config *s_ip4, + guint8 *dhcp_anycast_addr) +{ + NMDHCPDhclientPrivate *priv = NM_DHCP_DHCLIENT_GET_PRIVATE (client); + const char *iface; + + iface = nm_dhcp_client_get_iface (client); + + priv->conf_file = create_dhclient_config (iface, s_ip4, dhcp_anycast_addr); + if (!priv->conf_file) { + nm_log_warn (LOGD_DHCP4, "(%s): error creating dhclient configuration file.", iface); + return -1; } - nm_info ("dhclient started with pid %d", pid); + return dhclient_start (client, "-4", NULL); +} -out: - g_free (pid_contents); - g_ptr_array_free (dhclient_argv, TRUE); - return pid; +static GPid +real_ip6_start (NMDHCPClient *client, + NMSettingIP6Config *s_ip6, + guint8 *dhcp_anycast_addr, + gboolean info_only) +{ + return dhclient_start (client, "-6", info_only ? "-S" : "-N"); +} + +static void +real_stop (NMDHCPClient *client) +{ + NMDHCPDhclientPrivate *priv = NM_DHCP_DHCLIENT_GET_PRIVATE (client); + + /* Chain up to parent */ + NM_DHCP_CLIENT_CLASS (nm_dhcp_dhclient_parent_class)->stop (client); + + if (priv->conf_file) + remove (priv->conf_file); + if (priv->pid_file) + remove (priv->pid_file); } static const char ** @@ -595,10 +668,11 @@ error: return o; } -gboolean -nm_dhcp_client_process_classless_routes (GHashTable *options, - NMIP4Config *ip4_config, - guint32 *gwaddr) +static gboolean +real_ip4_process_classless_routes (NMDHCPClient *client, + GHashTable *options, + NMIP4Config *ip4_config, + guint32 *gwaddr) { const char *str; char **octets, **o; @@ -624,7 +698,7 @@ nm_dhcp_client_process_classless_routes (GHashTable *options, o = octets = g_strsplit (str, " ", 0); if (g_strv_length (octets) < 5) { - nm_warning ("Ignoring invalid classless static routes '%s'", str); + nm_log_warn (LOGD_DHCP4, "ignoring invalid classless static routes '%s'", str); goto out; } @@ -632,7 +706,7 @@ nm_dhcp_client_process_classless_routes (GHashTable *options, route = NULL; o = (char **) process_rfc3442_route ((const char **) o, &route); if (!route) { - nm_warning ("Ignoring invalid classless static routes"); + nm_log_warn (LOGD_DHCP4, "ignoring invalid classless static routes"); break; } @@ -653,8 +727,8 @@ nm_dhcp_client_process_classless_routes (GHashTable *options, inet_ntop (AF_INET, &tmp, addr, sizeof (addr)); tmp.s_addr = nm_ip4_route_get_next_hop (route); inet_ntop (AF_INET, &tmp, nh, sizeof (nh)); - nm_info (" classless static route %s/%d gw %s", - addr, nm_ip4_route_get_prefix (route), nh); + nm_log_info (LOGD_DHCP4, " classless static route %s/%d gw %s", + addr, nm_ip4_route_get_prefix (route), nh); } } @@ -663,3 +737,42 @@ out: return have_routes; } +/***************************************************/ + +static void +nm_dhcp_dhclient_init (NMDHCPDhclient *self) +{ + NMDHCPDhclientPrivate *priv = NM_DHCP_DHCLIENT_GET_PRIVATE (self); + + priv->path = nm_dhcp_dhclient_get_path (DHCLIENT_PATH); +} + +static void +dispose (GObject *object) +{ + NMDHCPDhclientPrivate *priv = NM_DHCP_DHCLIENT_GET_PRIVATE (object); + + g_free (priv->pid_file); + g_free (priv->conf_file); + g_free (priv->lease_file); + + G_OBJECT_CLASS (nm_dhcp_dhclient_parent_class)->dispose (object); +} + +static void +nm_dhcp_dhclient_class_init (NMDHCPDhclientClass *dhclient_class) +{ + NMDHCPClientClass *client_class = NM_DHCP_CLIENT_CLASS (dhclient_class); + GObjectClass *object_class = G_OBJECT_CLASS (dhclient_class); + + g_type_class_add_private (dhclient_class, sizeof (NMDHCPDhclientPrivate)); + + /* virtual methods */ + object_class->dispose = dispose; + + client_class->ip4_start = real_ip4_start; + client_class->ip6_start = real_ip6_start; + client_class->stop = real_stop; + client_class->ip4_process_classless_routes = real_ip4_process_classless_routes; +} + diff --git a/src/dhcp-manager/nm-dhcp-dhclient.h b/src/dhcp-manager/nm-dhcp-dhclient.h new file mode 100644 index 0000000000..be242de057 --- /dev/null +++ b/src/dhcp-manager/nm-dhcp-dhclient.h @@ -0,0 +1,49 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* 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, 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2005 - 2010 Red Hat, Inc. + */ + +#ifndef NM_DHCP_DHCLIENT_H +#define NM_DHCP_DHCLIENT_H + +#include +#include + +#include "nm-dhcp-client.h" + +#define NM_TYPE_DHCP_DHCLIENT (nm_dhcp_dhclient_get_type ()) +#define NM_DHCP_DHCLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DHCP_DHCLIENT, NMDHCPDhclient)) +#define NM_DHCP_DHCLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DHCP_DHCLIENT, NMDHCPDhclientClass)) +#define NM_IS_DHCP_DHCLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DHCP_DHCLIENT)) +#define NM_IS_DHCP_DHCLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_DHCP_DHCLIENT)) +#define NM_DHCP_DHCLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DHCP_DHCLIENT, NMDHCPDhclientClass)) + +typedef struct { + NMDHCPClient parent; +} NMDHCPDhclient; + +typedef struct { + NMDHCPClientClass parent; +} NMDHCPDhclientClass; + +GType nm_dhcp_dhclient_get_type (void); + +GSList *nm_dhcp_dhclient_get_lease_config (const char *iface, const char *uuid); + +const char *nm_dhcp_dhclient_get_path (const char *try_first); + +#endif /* NM_DHCP_DHCLIENT_H */ + diff --git a/src/dhcp-manager/nm-dhcp-dhcpcd.c b/src/dhcp-manager/nm-dhcp-dhcpcd.c index a8d929a528..403431fcb4 100644 --- a/src/dhcp-manager/nm-dhcp-dhcpcd.c +++ b/src/dhcp-manager/nm-dhcp-dhcpcd.c @@ -2,6 +2,7 @@ /* nm-dhcp-dhcpcd.c - dhcpcd specific hooks for NetworkManager * * Copyright (C) 2008 Roy Marples + * Copyright (C) 2010 Dan Williams * * 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 @@ -31,26 +32,47 @@ #include #include -#include "nm-dhcp-manager.h" +#include "nm-dhcp-dhcpcd.h" #include "nm-utils.h" +#include "nm-logging.h" -#define NM_DHCP_MANAGER_PID_FILENAME "dhcpcd" -#define NM_DHCP_MANAGER_PID_FILE_EXT "pid" +G_DEFINE_TYPE (NMDHCPDhcpcd, nm_dhcp_dhcpcd, NM_TYPE_DHCP_CLIENT) + +#define NM_DHCP_DHCPCD_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DHCP_DHCPCD, NMDHCPDhcpcdPrivate)) #define ACTION_SCRIPT_PATH LIBEXECDIR "/nm-dhcp-client.action" +typedef struct { + const char *path; + char *pid_file; +} NMDHCPDhcpcdPrivate; -static char * -get_pidfile_for_iface (const char * iface) +const char * +nm_dhcp_dhcpcd_get_path (const char *try_first) { - return g_strdup_printf ("/var/run/%s-%s.%s", - NM_DHCP_MANAGER_PID_FILENAME, - iface, - NM_DHCP_MANAGER_PID_FILE_EXT); + static const char *dhcpcd_paths[] = { + "/sbin/dhcpcd", + "/usr/sbin/dhcpcd", + "/usr/pkg/sbin/dhcpcd", + "/usr/local/sbin/dhcpcd", + NULL + }; + const char **path = dhcpcd_paths; + + if (strlen (try_first) && g_file_test (try_first, G_FILE_TEST_EXISTS)) + return try_first; + + while (*path != NULL) { + if (g_file_test (*path, G_FILE_TEST_EXISTS)) + break; + path++; + } + + return *path; } GSList * -nm_dhcp_client_get_lease_ip4_config (const char *iface, const char *uuid) +nm_dhcp_dhcpcd_get_lease_config (const char *iface, const char *uuid) { return NULL; } @@ -63,40 +85,41 @@ dhcpcd_child_setup (gpointer user_data G_GNUC_UNUSED) setpgid (pid, pid); } - -GPid -nm_dhcp_client_start (NMDHCPDevice *device, - const char *uuid, - NMSettingIP4Config *s_ip4, - guint8 *dhcp_anycast_addr) +static GPid +real_ip4_start (NMDHCPClient *client, + NMSettingIP4Config *s_ip4, + guint8 *dhcp_anycast_addr) { + NMDHCPDhcpcdPrivate *priv = NM_DHCP_DHCPCD_GET_PRIVATE (client); GPtrArray *argv = NULL; - GPid pid = 0; + GPid pid = -1; GError *error = NULL; - char *pid_contents = NULL; + char *pid_contents = NULL, *binary_name, *cmd_str; + const char *iface, *uuid, *hostname; - if (!g_file_test (DHCP_CLIENT_PATH, G_FILE_TEST_EXISTS)) { - nm_warning (DHCP_CLIENT_PATH " does not exist."); - goto out; + g_return_val_if_fail (priv->pid_file == NULL, -1); + + iface = nm_dhcp_client_get_iface (client); + uuid = nm_dhcp_client_get_uuid (client); + + priv->pid_file = g_strdup_printf (LOCALSTATEDIR "/run/dhcpcd-%s.pid", iface); + if (!priv->pid_file) { + nm_log_warn (LOGD_DHCP4, "(%s): not enough memory for dhcpcd options.", iface); + return -1; } - device->pid_file = get_pidfile_for_iface (device->iface); - if (!device->pid_file) { - nm_warning ("%s: not enough memory for dhcpcd options.", device->iface); - goto out; + if (!g_file_test (priv->path, G_FILE_TEST_EXISTS)) { + nm_log_warn (LOGD_DHCP4, "%s does not exist.", priv->path); + return -1; } - /* Kill any existing dhcpcd bound to this interface */ - if (g_file_get_contents (device->pid_file, &pid_contents, NULL, NULL)) { - unsigned long int tmp = strtoul (pid_contents, NULL, 10); - - if (!((tmp == ULONG_MAX) && (errno == ERANGE))) - nm_dhcp_client_stop (device, (pid_t) tmp); - remove (device->pid_file); - } + /* Kill any existing dhcpcd from the pidfile */ + binary_name = g_path_get_basename (priv->path); + nm_dhcp_client_stop_existing (priv->pid_file, binary_name); + g_free (binary_name); argv = g_ptr_array_new (); - g_ptr_array_add (argv, (gpointer) DHCP_CLIENT_PATH); + g_ptr_array_add (argv, (gpointer) priv->path); g_ptr_array_add (argv, (gpointer) "-B"); /* Don't background on lease (disable fork()) */ @@ -107,28 +130,59 @@ nm_dhcp_client_start (NMDHCPDevice *device, g_ptr_array_add (argv, (gpointer) "-c"); /* Set script file */ g_ptr_array_add (argv, (gpointer) ACTION_SCRIPT_PATH ); - g_ptr_array_add (argv, (gpointer) device->iface); + hostname = nm_setting_ip4_config_get_dhcp_hostname (s_ip4); + if (hostname && strlen (hostname)) { + g_ptr_array_add (argv, (gpointer) "-h"); /* Send hostname to DHCP server */ + g_ptr_array_add (argv, (gpointer) hostname ); + } + + g_ptr_array_add (argv, (gpointer) iface); g_ptr_array_add (argv, NULL); + cmd_str = g_strjoinv (" ", (gchar **) argv->pdata); + nm_log_dbg (LOGD_DHCP4, "running: %s", cmd_str); + g_free (cmd_str); + if (!g_spawn_async (NULL, (char **) argv->pdata, NULL, G_SPAWN_DO_NOT_REAP_CHILD, &dhcpcd_child_setup, NULL, &pid, &error)) { - nm_warning ("dhcpcd failed to start. error: '%s'", error->message); + nm_log_warn (LOGD_DHCP4, "dhcpcd failed to start. error: '%s'", error->message); g_error_free (error); - goto out; - } + pid = -1; + } else + nm_log_info (LOGD_DHCP4, "dhcpcd started with pid %d", pid); - nm_info ("dhcpcd started with pid %d", pid); - -out: g_free (pid_contents); g_ptr_array_free (argv, TRUE); return pid; } -gboolean -nm_dhcp_client_process_classless_routes (GHashTable *options, - NMIP4Config *ip4_config, - guint32 *gwaddr) +static GPid +real_ip6_start (NMDHCPClient *client, + NMSettingIP6Config *s_ip6, + guint8 *dhcp_anycast_addr, + gboolean info_only) +{ + nm_log_warn (LOGD_DHCP6, "the dhcpcd backend does not support IPv6."); + return -1; +} + +static void +real_stop (NMDHCPClient *client) +{ + NMDHCPDhcpcdPrivate *priv = NM_DHCP_DHCPCD_GET_PRIVATE (client); + + /* Chain up to parent */ + NM_DHCP_CLIENT_CLASS (nm_dhcp_dhcpcd_parent_class)->stop (client); + + if (priv->pid_file) + remove (priv->pid_file); +} + +static gboolean +real_ip4_process_classless_routes (NMDHCPClient *client, + GHashTable *options, + NMIP4Config *ip4_config, + guint32 *gwaddr) { const char *str; char **routes, **r; @@ -150,7 +204,7 @@ nm_dhcp_client_process_classless_routes (GHashTable *options, goto out; if ((g_strv_length (routes) % 2) != 0) { - nm_info (" classless static routes provided, but invalid"); + nm_log_warn (LOGD_DHCP4, " classless static routes provided, but invalid"); goto out; } @@ -167,16 +221,16 @@ nm_dhcp_client_process_classless_routes (GHashTable *options, errno = 0; rt_cidr = strtol (slash + 1, NULL, 10); if ((errno == EINVAL) || (errno == ERANGE)) { - nm_warning ("DHCP provided invalid classless static route cidr: '%s'", slash + 1); + nm_log_warn (LOGD_DHCP4, "DHCP provided invalid classless static route cidr: '%s'", slash + 1); continue; } } if (inet_pton (AF_INET, *r, &rt_addr) <= 0) { - nm_warning ("DHCP provided invalid classless static route address: '%s'", *r); + nm_log_warn (LOGD_DHCP4, "DHCP provided invalid classless static route address: '%s'", *r); continue; } if (inet_pton (AF_INET, *(r + 1), &rt_route) <= 0) { - nm_warning ("DHCP provided invalid classless static route gateway: '%s'", *(r + 1)); + nm_log_warn (LOGD_DHCP4, "DHCP provided invalid classless static route gateway: '%s'", *(r + 1)); continue; } @@ -192,7 +246,7 @@ nm_dhcp_client_process_classless_routes (GHashTable *options, nm_ip4_config_take_route (ip4_config, route); - nm_info (" classless static route %s/%d gw %s", *r, rt_cidr, *(r + 1)); + nm_log_info (LOGD_DHCP4, " classless static route %s/%d gw %s", *r, rt_cidr, *(r + 1)); } } @@ -201,3 +255,40 @@ out: return have_routes; } +/***************************************************/ + +static void +nm_dhcp_dhcpcd_init (NMDHCPDhcpcd *self) +{ + NMDHCPDhcpcdPrivate *priv = NM_DHCP_DHCPCD_GET_PRIVATE (self); + + priv->path = nm_dhcp_dhcpcd_get_path (DHCPCD_PATH); +} + +static void +dispose (GObject *object) +{ + NMDHCPDhcpcdPrivate *priv = NM_DHCP_DHCPCD_GET_PRIVATE (object); + + g_free (priv->pid_file); + + G_OBJECT_CLASS (nm_dhcp_dhcpcd_parent_class)->dispose (object); +} + +static void +nm_dhcp_dhcpcd_class_init (NMDHCPDhcpcdClass *dhcpcd_class) +{ + NMDHCPClientClass *client_class = NM_DHCP_CLIENT_CLASS (dhcpcd_class); + GObjectClass *object_class = G_OBJECT_CLASS (dhcpcd_class); + + g_type_class_add_private (dhcpcd_class, sizeof (NMDHCPDhcpcdPrivate)); + + /* virtual methods */ + object_class->dispose = dispose; + + client_class->ip4_start = real_ip4_start; + client_class->ip6_start = real_ip6_start; + client_class->stop = real_stop; + client_class->ip4_process_classless_routes = real_ip4_process_classless_routes; +} + diff --git a/src/dhcp-manager/nm-dhcp-dhcpcd.h b/src/dhcp-manager/nm-dhcp-dhcpcd.h new file mode 100644 index 0000000000..586c569786 --- /dev/null +++ b/src/dhcp-manager/nm-dhcp-dhcpcd.h @@ -0,0 +1,49 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* 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, 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2005 - 2010 Red Hat, Inc. + */ + +#ifndef NM_DHCP_DHCPCD_H +#define NM_DHCP_DHCPCD_H + +#include +#include + +#include "nm-dhcp-client.h" + +#define NM_TYPE_DHCP_DHCPCD (nm_dhcp_dhcpcd_get_type ()) +#define NM_DHCP_DHCPCD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DHCP_DHCPCD, NMDHCPDhcpcd)) +#define NM_DHCP_DHCPCD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DHCP_DHCPCD, NMDHCPDhcpcdClass)) +#define NM_IS_DHCP_DHCPCD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DHCP_DHCPCD)) +#define NM_IS_DHCP_DHCPCD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_DHCP_DHCPCD)) +#define NM_DHCP_DHCPCD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DHCP_DHCPCD, NMDHCPDhcpcdClass)) + +typedef struct { + NMDHCPClient parent; +} NMDHCPDhcpcd; + +typedef struct { + NMDHCPClientClass parent; +} NMDHCPDhcpcdClass; + +GType nm_dhcp_dhcpcd_get_type (void); + +GSList *nm_dhcp_dhcpcd_get_lease_config (const char *iface, const char *uuid); + +const char *nm_dhcp_dhcpcd_get_path (const char *try_first); + +#endif /* NM_DHCP_DHCPCD_H */ + diff --git a/src/dhcp-manager/nm-dhcp-manager.c b/src/dhcp-manager/nm-dhcp-manager.c index c3ca358dca..7b110fb232 100644 --- a/src/dhcp-manager/nm-dhcp-manager.c +++ b/src/dhcp-manager/nm-dhcp-manager.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2005 - 2008 Red Hat, Inc. + * Copyright (C) 2005 - 2010 Red Hat, Inc. * Copyright (C) 2006 - 2008 Novell, Inc. * */ @@ -25,8 +25,6 @@ #include #include #include -#include -#include #include #include #include @@ -37,22 +35,60 @@ #include #include "nm-dhcp-manager.h" +#include "nm-dhcp-dhclient.h" +#include "nm-dhcp-dhcpcd.h" #include "nm-marshal.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-dbus-manager.h" #include "nm-hostname-provider.h" #include "nm-dbus-glib-types.h" #include "nm-glib-compat.h" +#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC } + +GQuark +nm_dhcp_manager_error_quark (void) +{ + static GQuark ret = 0; + + if (ret == 0) + ret = g_quark_from_static_string ("nm_dhcp_manager_error"); + + return ret; +} + +GType +nm_dhcp_manager_error_get_type (void) +{ + static GType etype = 0; + + if (etype == 0) { + static const GEnumValue values[] = { + ENUM_ENTRY (NM_DHCP_MANAGER_ERROR_BAD_CLIENT, "BadClient"), + ENUM_ENTRY (NM_DHCP_MANAGER_ERROR_INTERNAL, "InternalError"), + { 0, 0, 0 } + }; + etype = g_enum_register_static ("NMDhcpManagerError", values); + } + return etype; +} + #define NM_DHCP_CLIENT_DBUS_SERVICE "org.freedesktop.nm_dhcp_client" #define NM_DHCP_CLIENT_DBUS_IFACE "org.freedesktop.nm_dhcp_client" -#define NM_DHCP_TIMEOUT 45 /* DHCP timeout, in seconds */ +#define DHCP_TIMEOUT 45 /* default DHCP timeout, in seconds */ + +static NMDHCPManager *singleton = NULL; + +typedef GSList * (*GetLeaseConfigFunc) (const char *iface, const char *uuid); typedef struct { - NMDBusManager * dbus_mgr; - GHashTable * devices; - DBusGProxy * proxy; + GType client_type; + GetLeaseConfigFunc get_lease_config_func; + + NMDBusManager * dbus_mgr; + GHashTable * clients; + DBusGProxy * proxy; NMHostnameProvider *hostname_provider; } NMDHCPManagerPrivate; @@ -61,224 +97,6 @@ typedef struct { G_DEFINE_TYPE (NMDHCPManager, nm_dhcp_manager, G_TYPE_OBJECT) -enum { - STATE_CHANGED, - TIMEOUT, - LAST_SIGNAL -}; - -static guint signals[LAST_SIGNAL] = { 0 }; - -static NMDHCPManager *nm_dhcp_manager_new (void); - -static void nm_dhcp_manager_cancel_transaction_real (NMDHCPDevice *device); - -static void hostname_provider_destroyed (gpointer data, GObject *destroyed_object); - -NMDHCPManager * -nm_dhcp_manager_get (void) -{ - static NMDHCPManager *singleton = NULL; - - if (!singleton) - singleton = nm_dhcp_manager_new (); - else - g_object_ref (singleton); - - g_assert (singleton); - return singleton; -} - -static void -nm_dhcp_manager_init (NMDHCPManager *manager) -{ -} - -static void -finalize (GObject *object) -{ - NMDHCPManagerPrivate *priv = NM_DHCP_MANAGER_GET_PRIVATE (object); - - if (priv->hostname_provider) { - g_object_weak_unref (G_OBJECT (priv->hostname_provider), hostname_provider_destroyed, object); - priv->hostname_provider = NULL; - } - - g_hash_table_destroy (priv->devices); - g_object_unref (priv->proxy); - g_object_unref (priv->dbus_mgr); - - G_OBJECT_CLASS (nm_dhcp_manager_parent_class)->finalize (object); -} - -static void -nm_dhcp_manager_class_init (NMDHCPManagerClass *manager_class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (manager_class); - - g_type_class_add_private (manager_class, sizeof (NMDHCPManagerPrivate)); - - /* virtual methods */ - object_class->finalize = finalize; - - /* signals */ - signals[STATE_CHANGED] = - g_signal_new ("state-changed", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (NMDHCPManagerClass, state_changed), - NULL, NULL, - _nm_marshal_VOID__STRING_UCHAR, - G_TYPE_NONE, 2, - G_TYPE_STRING, - G_TYPE_UCHAR); - - signals[TIMEOUT] = - g_signal_new ("timeout", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (NMDHCPManagerClass, timeout), - NULL, NULL, - g_cclosure_marshal_VOID__STRING, - G_TYPE_NONE, 1, - G_TYPE_STRING); -} - -static gboolean state_is_bound (guint8 state) -{ - if ((state == DHC_BOUND) - || (state == DHC_RENEW) - || (state == DHC_REBOOT) - || (state == DHC_REBIND) - || (state == DHC_IPV4LL)) - return TRUE; - - return FALSE; -} - - -static void -nm_dhcp_device_timeout_cleanup (NMDHCPDevice * device) -{ - if (device->timeout_id) { - g_source_remove (device->timeout_id); - device->timeout_id = 0; - } -} - -static void -nm_dhcp_device_watch_cleanup (NMDHCPDevice * device) -{ - if (device->watch_id) { - g_source_remove (device->watch_id); - device->watch_id = 0; - } -} - -static void -nm_dhcp_device_destroy (NMDHCPDevice *device) -{ - int ignored; - - nm_dhcp_device_timeout_cleanup (device); - - if (device->pid) - nm_dhcp_client_stop (device, device->pid); - - if (device->options) - g_hash_table_destroy (device->options); - - if (device->conf_file) { - ignored = unlink (device->conf_file); - g_free (device->conf_file); - } - - g_free (device->pid_file); - g_free (device->lease_file); - g_free (device->iface); - - g_slice_free (NMDHCPDevice, device); -} - - -static inline const char * -state_to_string (guint32 state) -{ - switch (state) - { - case DHC_PREINIT: - return "preinit"; - case DHC_BOUND: - return "bound"; - case DHC_IPV4LL: - return "bound (ipv4ll)"; - case DHC_RENEW: - return "renew"; - case DHC_REBOOT: - return "reboot"; - case DHC_REBIND: - return "rebind"; - case DHC_STOP: - return "stop"; - case DHC_MEDIUM: - return "medium"; - case DHC_TIMEOUT: - return "timeout"; - case DHC_FAIL: - return "fail"; - case DHC_EXPIRE: - return "expire"; - case DHC_RELEASE: - return "release"; - case DHC_START: - return "successfully started"; - case DHC_ABEND: - return "abnormal exit"; - case DHC_END: - return "normal exit"; - default: - break; - } - return NULL; -} - -static inline guint32 -string_to_state (const char *state) -{ - if (strcmp("PREINIT", state) == 0) - return DHC_PREINIT; - else if (strcmp("BOUND", state) == 0) - return DHC_BOUND; - else if (strcmp("IPV4LL", state) == 0) - return DHC_IPV4LL; - else if (strcmp("RENEW", state) == 0) - return DHC_RENEW; - else if (strcmp("REBOOT", state) == 0) - return DHC_REBOOT; - else if (strcmp("REBIND", state) == 0) - return DHC_REBIND; - else if (strcmp("STOP", state) == 0) - return DHC_STOP; - else if (strcmp("MEDIUM", state) == 0) - return DHC_MEDIUM; - else if (strcmp("TIMEOUT", state) == 0) - return DHC_TIMEOUT; - else if (strcmp("FAIL", state) == 0) - return DHC_FAIL; - else if (strcmp("EXPIRE", state) == 0) - return DHC_EXPIRE; - else if (strcmp("RELEASE", state) == 0) - return DHC_RELEASE; - else if (strcmp("START", state) == 0) - return DHC_START; - else if (strcmp("ABEND", state) == 0) - return DHC_ABEND; - else if (strcmp("END", state) == 0) - return DHC_END; - else - return 255; -} - static char * garray_to_string (GArray *array, const char *key) { @@ -307,11 +125,61 @@ garray_to_string (GArray *array, const char *key) converted = str->str; if (!g_utf8_validate (converted, -1, NULL)) - nm_warning ("%s: DHCP option '%s' couldn't be converted to UTF-8", __func__, key); + nm_log_warn (LOGD_DHCP, "DHCP option '%s' couldn't be converted to UTF-8", key); g_string_free (str, FALSE); return converted; } +static NMDHCPClient * +get_client_for_pid (NMDHCPManager *manager, GPid pid) +{ + NMDHCPManagerPrivate *priv; + GHashTableIter iter; + gpointer value; + + g_return_val_if_fail (manager != NULL, NULL); + g_return_val_if_fail (NM_IS_DHCP_MANAGER (manager), NULL); + + priv = NM_DHCP_MANAGER_GET_PRIVATE (manager); + + g_hash_table_iter_init (&iter, priv->clients); + while (g_hash_table_iter_next (&iter, NULL, &value)) { + NMDHCPClient *candidate = NM_DHCP_CLIENT (value); + + if (nm_dhcp_client_get_pid (candidate) == pid) + return candidate; + } + + return NULL; +} + +static NMDHCPClient * +get_client_for_iface (NMDHCPManager *manager, + const char *iface, + gboolean ip6) +{ + NMDHCPManagerPrivate *priv; + GHashTableIter iter; + gpointer value; + + g_return_val_if_fail (manager != NULL, NULL); + g_return_val_if_fail (NM_IS_DHCP_MANAGER (manager), NULL); + g_return_val_if_fail (iface, NULL); + + priv = NM_DHCP_MANAGER_GET_PRIVATE (manager); + + g_hash_table_iter_init (&iter, priv->clients); + while (g_hash_table_iter_next (&iter, NULL, &value)) { + NMDHCPClient *candidate = NM_DHCP_CLIENT (value); + + if ( !strcmp (iface, nm_dhcp_client_get_iface (candidate)) + && (nm_dhcp_client_get_ipv6 (candidate) == ip6)) + return candidate; + } + + return NULL; +} + static char * get_option (GHashTable *hash, const char *key) { @@ -322,127 +190,68 @@ get_option (GHashTable *hash, const char *key) return NULL; if (G_VALUE_TYPE (value) != DBUS_TYPE_G_UCHAR_ARRAY) { - nm_warning ("Unexpected key %s value type was not " - "DBUS_TYPE_G_UCHAR_ARRAY", - (char *) key); + nm_log_warn (LOGD_DHCP, "unexpected key %s value type was not " + "DBUS_TYPE_G_UCHAR_ARRAY", + (char *) key); return NULL; } return garray_to_string ((GArray *) g_value_get_boxed (value), key); } -static void -copy_option (gpointer key, - gpointer value, - gpointer user_data) -{ - NMDHCPDevice * device = (NMDHCPDevice *) user_data; - const char *str_key = (const char *) key; - char *str_value = NULL; - - if (G_VALUE_TYPE (value) != DBUS_TYPE_G_UCHAR_ARRAY) { - nm_warning ("Unexpected key %s value type was not " - "DBUS_TYPE_G_UCHAR_ARRAY", - str_key); - return; - } - - str_value = garray_to_string ((GArray *) g_value_get_boxed (value), str_key); - if (str_value) - g_hash_table_insert (device->options, g_strdup (str_key), str_value); -} - -static void -handle_options (NMDHCPManager * manager, - NMDHCPDevice * device, - GHashTable * options, - const char * reason) -{ - guint32 old_state = device->state; - guint32 new_state = string_to_state (reason); - - /* Clear old and save new DHCP options */ - g_hash_table_remove_all (device->options); - g_hash_table_foreach (options, copy_option, device); - - if (old_state == new_state) - return; - - /* Handle changed device state */ - if (state_is_bound (new_state)) { - /* Cancel the timeout if the DHCP client is now bound */ - nm_dhcp_device_timeout_cleanup (device); - } - - device->state = new_state; - nm_info ("DHCP: device %s state changed %s -> %s", - device->iface, - state_to_string (old_state), - state_to_string (device->state)); - - g_signal_emit (G_OBJECT (device->manager), - signals[STATE_CHANGED], - 0, - device->iface, - device->state); -} - static void nm_dhcp_manager_handle_event (DBusGProxy *proxy, GHashTable *options, gpointer user_data) { - NMDHCPManager * manager; - NMDHCPManagerPrivate * priv; - NMDHCPDevice * device; - char * iface = NULL; - char * pid_str = NULL; - char * reason = NULL; + NMDHCPManager *manager; + NMDHCPManagerPrivate *priv; + NMDHCPClient *client; + char *iface = NULL; + char *pid_str = NULL; + char *reason = NULL; unsigned long temp; - pid_t pid; manager = NM_DHCP_MANAGER (user_data); priv = NM_DHCP_MANAGER_GET_PRIVATE (manager); iface = get_option (options, "interface"); if (iface == NULL) { - nm_warning ("DHCP event didn't have associated interface."); - goto out; - } - - device = (NMDHCPDevice *) g_hash_table_lookup (priv->devices, iface); - if (device == NULL) { - nm_warning ("Unhandled DHCP event for interface %s", iface); + nm_log_warn (LOGD_DHCP, "DHCP event didn't have associated interface."); goto out; } pid_str = get_option (options, "pid"); if (pid_str == NULL) { - nm_warning ("DHCP event didn't have associated PID."); + nm_log_warn (LOGD_DHCP, "DHCP event didn't have associated PID."); goto out; } - temp = strtoul(pid_str, NULL, 10); + temp = strtoul (pid_str, NULL, 10); if ((temp == ULONG_MAX) && (errno == ERANGE)) { - nm_warning ("Couldn't convert PID"); + nm_log_warn (LOGD_DHCP, "couldn't convert PID"); goto out; } - pid = (pid_t) temp; - if (pid != device->pid) { - nm_warning ("Received DHCP event from unexpected PID %u (expected %u)", - pid, - device->pid); + client = get_client_for_pid (manager, (GPid) temp); + if (client == NULL) { + nm_log_warn (LOGD_DHCP, "(pid %d) unhandled DHCP event for interface %s", temp, iface); + goto out; + } + + if (strcmp (iface, nm_dhcp_client_get_iface (client))) { + nm_log_warn (LOGD_DHCP, "(pid %d) received DHCP event from unexpected interface '%s' (expected '%s')", + temp, iface, nm_dhcp_client_get_iface (client)); goto out; } reason = get_option (options, "reason"); if (reason == NULL) { - nm_warning ("DHCP event didn't have a reason"); + nm_log_warn (LOGD_DHCP, "(pid %d) DHCP event didn't have a reason", temp); goto out; } - handle_options (manager, device, options, reason); + nm_dhcp_client_new_options (client, options, reason); out: g_free (iface); @@ -450,37 +259,91 @@ out: g_free (reason); } -static NMDHCPManager * -nm_dhcp_manager_new (void) +static GType +get_client_type (const char *client, GError **error) { - NMDHCPManager *manager; - NMDHCPManagerPrivate *priv; - DBusGConnection * g_connection; + const char *dhclient_path = NULL; + const char *dhcpcd_path = NULL; - manager = g_object_new (NM_TYPE_DHCP_MANAGER, NULL); - priv = NM_DHCP_MANAGER_GET_PRIVATE (manager); + dhclient_path = nm_dhcp_dhclient_get_path (DHCLIENT_PATH); + dhcpcd_path = nm_dhcp_dhcpcd_get_path (DHCPCD_PATH); - priv->devices = g_hash_table_new_full (g_str_hash, g_str_equal, - NULL, - (GDestroyNotify) nm_dhcp_device_destroy); - if (!priv->devices) { - nm_warning ("Error: not enough memory to initialize DHCP manager " - "tables"); - g_object_unref (manager); - manager = NULL; - goto out; + if (!client) { + if (dhclient_path) + return NM_TYPE_DHCP_DHCLIENT; + else if (dhcpcd_path) + return NM_TYPE_DHCP_DHCPCD; + else { + g_set_error_literal (error, + NM_DHCP_MANAGER_ERROR, NM_DHCP_MANAGER_ERROR_BAD_CLIENT, + _("no usable DHCP client could be found.")); + return 0; + } } + if (!strcmp (client, "dhclient")) { + if (!dhclient_path) { + g_set_error_literal (error, + NM_DHCP_MANAGER_ERROR, NM_DHCP_MANAGER_ERROR_BAD_CLIENT, + _("'dhclient' could be found.")); + return 0; + } + return NM_TYPE_DHCP_DHCLIENT; + } + + if (!strcmp (client, "dhcpcd")) { + if (!dhcpcd_path) { + g_set_error_literal (error, + NM_DHCP_MANAGER_ERROR, NM_DHCP_MANAGER_ERROR_BAD_CLIENT, + _("'dhcpcd' could be found.")); + return 0; + } + return NM_TYPE_DHCP_DHCPCD; + } + + g_set_error (error, + NM_DHCP_MANAGER_ERROR, NM_DHCP_MANAGER_ERROR_BAD_CLIENT, + _("unsupported DHCP client '%s'"), client); + return 0; +} + +NMDHCPManager * +nm_dhcp_manager_new (const char *client, GError **error) +{ + NMDHCPManagerPrivate *priv; + DBusGConnection *g_connection; + GType client_type; + + client_type = get_client_type (client, error); + if (!client_type) + return NULL; + + g_warn_if_fail (singleton == NULL); + + singleton = g_object_new (NM_TYPE_DHCP_MANAGER, NULL); + priv = NM_DHCP_MANAGER_GET_PRIVATE (singleton); + + /* Client-specific setup */ + priv->client_type = client_type; + if (priv->client_type == NM_TYPE_DHCP_DHCLIENT) + priv->get_lease_config_func = nm_dhcp_dhclient_get_lease_config; + else if (priv->client_type == NM_TYPE_DHCP_DHCPCD) + priv->get_lease_config_func = nm_dhcp_dhcpcd_get_lease_config; + else + g_assert_not_reached (); + + priv->clients = g_hash_table_new_full (g_direct_hash, g_direct_equal, + NULL, + (GDestroyNotify) g_object_unref); + g_assert (priv->clients); + priv->dbus_mgr = nm_dbus_manager_get (); g_connection = nm_dbus_manager_get_connection (priv->dbus_mgr); priv->proxy = dbus_g_proxy_new_for_name (g_connection, NM_DHCP_CLIENT_DBUS_SERVICE, "/", NM_DHCP_CLIENT_DBUS_IFACE); - if (!priv->proxy) { - nm_warning ("Error: could not init DHCP manager proxy"); - g_object_unref (manager); - } + g_assert (priv->proxy); dbus_g_proxy_add_signal (priv->proxy, "Event", @@ -488,611 +351,167 @@ nm_dhcp_manager_new (void) G_TYPE_INVALID); dbus_g_proxy_connect_signal (priv->proxy, "Event", - G_CALLBACK (nm_dhcp_manager_handle_event), - manager, - NULL); + G_CALLBACK (nm_dhcp_manager_handle_event), + singleton, + NULL); -out: - return manager; + return singleton; } +#define REMOVE_ID_TAG "remove-id" +#define TIMEOUT_ID_TAG "timeout-id" -/* - * nm_dhcp_manager_handle_timeout - * - * Called after timeout of a DHCP transaction to notify device of the failure. - * - */ -static gboolean -nm_dhcp_manager_handle_timeout (gpointer user_data) +static void +remove_client (NMDHCPManager *self, NMDHCPClient *client) { - NMDHCPDevice *device = (NMDHCPDevice *) user_data; + NMDHCPManagerPrivate *priv = NM_DHCP_MANAGER_GET_PRIVATE (self); + guint id; - nm_info ("(%s): DHCP transaction took too long, stopping it.", device->iface); + id = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (client), REMOVE_ID_TAG)); + if (id) + g_signal_handler_disconnect (client, id); - nm_dhcp_manager_cancel_transaction (device->manager, device->iface); + id = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (client), TIMEOUT_ID_TAG)); + if (id) + g_signal_handler_disconnect (client, id); - g_signal_emit (G_OBJECT (device->manager), signals[TIMEOUT], 0, device->iface); - - return FALSE; -} - -static NMDHCPDevice * -nm_dhcp_device_new (NMDHCPManager *manager, const char *iface) -{ - NMDHCPDevice *device; - GHashTable * hash = NM_DHCP_MANAGER_GET_PRIVATE (manager)->devices; - - device = g_slice_new0 (NMDHCPDevice); - if (!device) { - nm_warning ("%s: Out of memory creating DHCP transaction object.", iface); - return NULL; - } - - device->iface = g_strdup (iface); - if (!device) { - nm_warning ("%s: Out of memory creating DHCP transaction object " - "property 'iface'.", - iface); - goto error; - } - - device->manager = manager; - - /* Do this after the transaction cancel since that clears options out */ - device->options = g_hash_table_new_full (g_str_hash, - g_str_equal, - g_free, - g_free); - if (!device->options) { - nm_warning ("%s: Out of memory creating DHCP transaction object " - "property 'options'.", - iface); - goto error; - } - - g_hash_table_insert (hash, device->iface, device); - return device; - -error: - nm_dhcp_device_destroy (device); - return NULL; -} - - -/* - * dhcp_watch_cb - * - * Watch our child dhclient process and get notified of events from it. - * - */ -static void dhcp_watch_cb (GPid pid, gint status, gpointer user_data) -{ - NMDHCPDevice *device = (NMDHCPDevice *)user_data; - - if (!WIFEXITED (status)) { - device->state = DHC_ABEND; - nm_warning ("dhcp client died abnormally"); - } - device->pid = 0; - - nm_dhcp_device_watch_cleanup (device); - nm_dhcp_device_timeout_cleanup (device); - - g_signal_emit (G_OBJECT (device->manager), signals[STATE_CHANGED], 0, device->iface, device->state); -} - -gboolean -nm_dhcp_manager_begin_transaction (NMDHCPManager *manager, - const char *iface, - const char *uuid, - NMSettingIP4Config *s_ip4, - guint32 timeout, - guint8 *dhcp_anycast_addr) -{ - NMDHCPManagerPrivate *priv; - NMDHCPDevice *device; - NMSettingIP4Config *setting; - - g_return_val_if_fail (NM_IS_DHCP_MANAGER (manager), FALSE); - g_return_val_if_fail (iface != NULL, FALSE); - - priv = NM_DHCP_MANAGER_GET_PRIVATE (manager); - - device = (NMDHCPDevice *) g_hash_table_lookup (priv->devices, iface); - if (!device) - device = nm_dhcp_device_new (manager, iface); - - if (device->pid && (device->state < DHC_ABEND)) { - /* Cancel any DHCP transaction already in progress */ - nm_dhcp_manager_cancel_transaction_real (device); - } - - if (s_ip4 && - nm_setting_ip4_config_get_dhcp_send_hostname (s_ip4) && - nm_setting_ip4_config_get_dhcp_hostname (s_ip4) == NULL && - priv->hostname_provider != NULL) { - /* We're asked to send the hostname to DHCP server, - the hostname isn't specified, - and a hostname provider is registered: use that */ - - setting = NM_SETTING_IP4_CONFIG (nm_setting_duplicate (NM_SETTING (s_ip4))); - g_object_set (G_OBJECT (setting), - NM_SETTING_IP4_CONFIG_DHCP_HOSTNAME, - nm_hostname_provider_get_hostname (priv->hostname_provider), - NULL); - } else { - setting = s_ip4 ? g_object_ref (s_ip4) : NULL; - } - - if (timeout == 0) - timeout = NM_DHCP_TIMEOUT; - - nm_info ("Activation (%s) Beginning DHCP transaction (timeout in %d seconds)", - iface, timeout); - device->pid = nm_dhcp_client_start (device, uuid, setting, dhcp_anycast_addr); - - if (setting) - g_object_unref (setting); - - if (device->pid == 0) - return FALSE; - - /* Set up a timeout on the transaction to kill it after the timeout */ - device->timeout_id = g_timeout_add_seconds (timeout, - nm_dhcp_manager_handle_timeout, - device); - device->watch_id = g_child_watch_add (device->pid, - (GChildWatchFunc) dhcp_watch_cb, - device); - return TRUE; -} - -void -nm_dhcp_client_stop (NMDHCPDevice *device, pid_t pid) -{ - int i = 15; /* 3 seconds */ - - g_return_if_fail (pid > 0); - - /* Clean up the watch handler since we're explicitly killing - * the daemon + /* Stopping the client is left up to the controlling device + * explicitly since we may want to quit NetworkManager but not terminate + * the DHCP client. */ - nm_dhcp_device_watch_cleanup (device); - /* Tell it to quit; maybe it wants to send out a RELEASE message */ - kill (pid, SIGTERM); - - while (i-- > 0) { - gint child_status; - int ret; - - ret = waitpid (pid, &child_status, WNOHANG); - if (ret > 0) - break; - - if (ret == -1) { - /* Child already exited */ - if (errno == ECHILD) - break; - /* Took too long; shoot it in the head */ - i = 0; - break; - } - g_usleep (G_USEC_PER_SEC / 5); - } - - if (i <= 0) { - nm_warning ("%s: dhcp client pid %d didn't exit, will kill it.", device->iface, pid); - kill (pid, SIGKILL); - - nm_debug ("waiting for dhcp client pid %d to exit", pid); - waitpid (pid, NULL, 0); - nm_debug ("dhcp client pid %d cleaned up", pid); - } + g_hash_table_remove (priv->clients, client); } static void -nm_dhcp_manager_cancel_transaction_real (NMDHCPDevice *device) +add_client (NMDHCPManager *self, NMDHCPClient *client) { - g_return_if_fail (device->pid > 0); + NMDHCPManagerPrivate *priv = NM_DHCP_MANAGER_GET_PRIVATE (self); + guint id; - nm_dhcp_client_stop (device, device->pid); + id = g_signal_connect_swapped (client, "remove", G_CALLBACK (remove_client), self); + g_object_set_data (G_OBJECT (client), REMOVE_ID_TAG, GUINT_TO_POINTER (id)); - nm_info ("(%s): canceled DHCP transaction, dhcp client pid %d", - device->iface, - device->pid); + id = g_signal_connect_swapped (client, "timeout", G_CALLBACK (remove_client), self); + g_object_set_data (G_OBJECT (client), TIMEOUT_ID_TAG, GUINT_TO_POINTER (id)); - device->pid = 0; - device->state = DHC_END; - - /* Clean up the pidfile if it got left around */ - if (device->pid_file) { - remove (device->pid_file); - g_free (device->pid_file); - device->pid_file = NULL; - } - - /* Free leasefile (but don't delete) */ - if (device->lease_file) { - g_free (device->lease_file); - device->lease_file = NULL; - } - - /* Clean up config file if it got left around */ - if (device->conf_file) { - remove (device->conf_file); - g_free (device->conf_file); - device->conf_file = NULL; - } - - nm_dhcp_device_timeout_cleanup (device); - g_hash_table_remove_all (device->options); + g_hash_table_insert (priv->clients, client, g_object_ref (client)); } - -/* - * nm_dhcp_manager_cancel_transaction - * - * Stop any in-progress DHCP transaction on a particular device. - * - */ -void -nm_dhcp_manager_cancel_transaction (NMDHCPManager *manager, - const char *iface) +static NMDHCPClient * +client_start (NMDHCPManager *self, + const char *iface, + const char *uuid, + gboolean ipv6, + NMSettingIP4Config *s_ip4, + NMSettingIP6Config *s_ip6, + guint32 timeout, + guint8 *dhcp_anycast_addr, + gboolean info_only) { - NMDHCPDevice *device; NMDHCPManagerPrivate *priv; + NMDHCPClient *client; + gboolean success = FALSE; - g_return_if_fail (NM_IS_DHCP_MANAGER (manager)); - g_return_if_fail (iface != NULL); - - priv = NM_DHCP_MANAGER_GET_PRIVATE (manager); - - device = (NMDHCPDevice *) g_hash_table_lookup (priv->devices, iface); - - if (!device || !device->pid) - return; - - nm_dhcp_manager_cancel_transaction_real (device); -} - -static void -process_classful_routes (GHashTable *options, NMIP4Config *ip4_config) -{ - const char *str; - char **searches, **s; - - str = g_hash_table_lookup (options, "new_static_routes"); - if (!str) - return; - - searches = g_strsplit (str, " ", 0); - if ((g_strv_length (searches) % 2)) { - nm_info (" static routes provided, but invalid"); - goto out; - } - - for (s = searches; *s; s += 2) { - NMIP4Route *route; - struct in_addr rt_addr; - struct in_addr rt_route; - - if (inet_pton (AF_INET, *s, &rt_addr) <= 0) { - nm_warning ("DHCP provided invalid static route address: '%s'", *s); - continue; - } - if (inet_pton (AF_INET, *(s + 1), &rt_route) <= 0) { - nm_warning ("DHCP provided invalid static route gateway: '%s'", *(s + 1)); - continue; - } - - // FIXME: ensure the IP addresse and route are sane - - route = nm_ip4_route_new (); - nm_ip4_route_set_dest (route, (guint32) rt_addr.s_addr); - nm_ip4_route_set_prefix (route, 32); /* 255.255.255.255 */ - nm_ip4_route_set_next_hop (route, (guint32) rt_route.s_addr); - - nm_ip4_config_take_route (ip4_config, route); - nm_info (" static route %s gw %s", *s, *(s + 1)); - } - -out: - g_strfreev (searches); -} - -static void -process_domain_search (NMIP4Config *ip4_config, const char *str) -{ - char **searches, **s; - char *unescaped, *p; - int i; - - g_return_if_fail (str != NULL); - g_return_if_fail (ip4_config != NULL); - - p = unescaped = g_strdup (str); - do { - p = strstr (p, "\\032"); - if (!p) - break; - - /* Clear the escaped space with real spaces */ - for (i = 0; i < 4; i++) - *p++ = ' '; - } while (*p++); - - if (strchr (unescaped, '\\')) { - nm_info (" invalid domain search: '%s'", unescaped); - goto out; - } - - searches = g_strsplit (unescaped, " ", 0); - for (s = searches; *s; s++) { - if (strlen (*s)) { - nm_info (" domain search '%s'", *s); - nm_ip4_config_add_search (ip4_config, *s); - } - } - g_strfreev (searches); - -out: - g_free (unescaped); -} - -/* Given a table of DHCP options from the client, convert into an IP4Config */ -NMIP4Config * -nm_dhcp_manager_options_to_ip4_config (const char *iface, GHashTable *options) -{ - NMIP4Config *ip4_config = NULL; - struct in_addr tmp_addr; - NMIP4Address *addr = NULL; - char *str = NULL; - guint32 gwaddr = 0; - gboolean have_classless = FALSE; - + g_return_val_if_fail (self, NULL); + g_return_val_if_fail (NM_IS_DHCP_MANAGER (self), NULL); g_return_val_if_fail (iface != NULL, NULL); - g_return_val_if_fail (options != NULL, NULL); - - ip4_config = nm_ip4_config_new (); - if (!ip4_config) { - nm_warning ("%s: couldn't allocate memory for an IP4Config!", iface); - return NULL; - } - - addr = nm_ip4_address_new (); - if (!addr) { - nm_warning ("%s: couldn't allocate memory for an IP4 Address!", iface); - goto error; - } - - str = g_hash_table_lookup (options, "new_ip_address"); - if (str && (inet_pton (AF_INET, str, &tmp_addr) > 0)) { - nm_ip4_address_set_address (addr, tmp_addr.s_addr); - nm_info (" address %s", str); - } else - goto error; - - str = g_hash_table_lookup (options, "new_subnet_mask"); - if (str && (inet_pton (AF_INET, str, &tmp_addr) > 0)) { - nm_ip4_address_set_prefix (addr, nm_utils_ip4_netmask_to_prefix (tmp_addr.s_addr)); - nm_info (" prefix %d (%s)", nm_ip4_address_get_prefix (addr), str); - } - - /* Routes: if the server returns classless static routes, we MUST ignore - * the 'static_routes' option. - */ - have_classless = nm_dhcp_client_process_classless_routes (options, ip4_config, &gwaddr); - if (!have_classless) { - gwaddr = 0; /* Ensure client code doesn't lie */ - process_classful_routes (options, ip4_config); - } - - if (gwaddr) { - char buf[INET_ADDRSTRLEN + 1]; - - inet_ntop (AF_INET, &gwaddr, buf, sizeof (buf)); - nm_info (" gateway %s", buf); - nm_ip4_address_set_gateway (addr, gwaddr); - } else { - /* If the gateway wasn't provided as a classless static route with a - * subnet length of 0, try to find it using the old-style 'routers' option. - */ - str = g_hash_table_lookup (options, "new_routers"); - if (str) { - char **routers = g_strsplit (str, " ", 0); - char **s; - - for (s = routers; *s; s++) { - /* FIXME: how to handle multiple routers? */ - if (inet_pton (AF_INET, *s, &tmp_addr) > 0) { - nm_ip4_address_set_gateway (addr, tmp_addr.s_addr); - nm_info (" gateway %s", *s); - break; - } else - nm_warning ("Ignoring invalid gateway '%s'", *s); - } - g_strfreev (routers); - } - } - - nm_ip4_config_take_address (ip4_config, addr); - addr = NULL; - - str = g_hash_table_lookup (options, "new_host_name"); - if (str) - nm_info (" hostname '%s'", str); - - str = g_hash_table_lookup (options, "new_domain_name_servers"); - if (str) { - char **searches = g_strsplit (str, " ", 0); - char **s; - - for (s = searches; *s; s++) { - if (inet_pton (AF_INET, *s, &tmp_addr) > 0) { - nm_ip4_config_add_nameserver (ip4_config, tmp_addr.s_addr); - nm_info (" nameserver '%s'", *s); - } else - nm_warning ("Ignoring invalid nameserver '%s'", *s); - } - g_strfreev (searches); - } - - str = g_hash_table_lookup (options, "new_domain_name"); - if (str) { - char **domains = g_strsplit (str, " ", 0); - char **s; - - for (s = domains; *s; s++) { - nm_info (" domain name '%s'", *s); - nm_ip4_config_add_domain (ip4_config, *s); - } - g_strfreev (domains); - } - - str = g_hash_table_lookup (options, "new_domain_search"); - if (str) - process_domain_search (ip4_config, str); - - str = g_hash_table_lookup (options, "new_netbios_name_servers"); - if (str) { - char **searches = g_strsplit (str, " ", 0); - char **s; - - for (s = searches; *s; s++) { - if (inet_pton (AF_INET, *s, &tmp_addr) > 0) { - nm_ip4_config_add_wins (ip4_config, tmp_addr.s_addr); - nm_info (" wins '%s'", *s); - } else - nm_warning ("Ignoring invalid WINS server '%s'", *s); - } - g_strfreev (searches); - } - - str = g_hash_table_lookup (options, "new_interface_mtu"); - if (str) { - int int_mtu; - - errno = 0; - int_mtu = strtol (str, NULL, 10); - if ((errno == EINVAL) || (errno == ERANGE)) - goto error; - - if (int_mtu > 576) - nm_ip4_config_set_mtu (ip4_config, int_mtu); - } - - return ip4_config; - -error: - if (addr) - nm_ip4_address_unref (addr); - g_object_unref (ip4_config); - return NULL; -} - -/* - * nm_dhcp_manager_get_ip4_config - * - * Get IP4 configuration values from the DHCP daemon - * - */ -NMIP4Config * -nm_dhcp_manager_get_ip4_config (NMDHCPManager *manager, - const char *iface) -{ - NMDHCPManagerPrivate *priv; - NMDHCPDevice *device; - - g_return_val_if_fail (NM_IS_DHCP_MANAGER (manager), NULL); - g_return_val_if_fail (iface != NULL, NULL); - - priv = NM_DHCP_MANAGER_GET_PRIVATE (manager); - - device = (NMDHCPDevice *) g_hash_table_lookup (priv->devices, iface); - if (!device) { - nm_warning ("Device '%s' transaction not started.", iface); - return NULL; - } - - if (!state_is_bound (device->state)) { - nm_warning ("%s: dhcp client didn't bind to a lease.", device->iface); - return NULL; - } - - return nm_dhcp_manager_options_to_ip4_config (iface, device->options); -} - -#define NEW_TAG "new_" -#define OLD_TAG "old_" - -typedef struct { - GHFunc func; - gpointer user_data; -} Dhcp4ForeachInfo; - -static void -iterate_dhcp4_config_option (gpointer key, - gpointer value, - gpointer user_data) -{ - Dhcp4ForeachInfo *info = (Dhcp4ForeachInfo *) user_data; - char *tmp_key = NULL; - const char **p; - static const char *filter_options[] = { - "interface", "pid", "reason", "dhcp_message_type", NULL - }; - - /* Filter out stuff that's not actually new DHCP options */ - for (p = filter_options; *p; p++) { - if (!strcmp (*p, (const char *) key)) - return; - if (!strncmp ((const char *) key, OLD_TAG, strlen (OLD_TAG))) - return; - } - - /* Remove the "new_" prefix that dhclient passes back */ - if (!strncmp ((const char *) key, NEW_TAG, strlen (NEW_TAG))) - tmp_key = g_strdup ((const char *) (key + strlen (NEW_TAG))); - else - tmp_key = g_strdup ((const char *) key); - - (*info->func) ((gpointer) tmp_key, value, info->user_data); - g_free (tmp_key); -} - -gboolean -nm_dhcp_manager_foreach_dhcp4_option (NMDHCPManager *self, - const char *iface, - GHFunc func, - gpointer user_data) -{ - NMDHCPManagerPrivate *priv; - NMDHCPDevice *device; - Dhcp4ForeachInfo info = { NULL, NULL }; - - g_return_val_if_fail (NM_IS_DHCP_MANAGER (self), FALSE); - g_return_val_if_fail (iface != NULL, FALSE); - g_return_val_if_fail (func != NULL, FALSE); + g_return_val_if_fail (uuid != NULL, NULL); priv = NM_DHCP_MANAGER_GET_PRIVATE (self); - device = (NMDHCPDevice *) g_hash_table_lookup (priv->devices, iface); - if (!device) { - nm_warning ("Device '%s' transaction not started.", iface); - return FALSE; + /* Kill any old client instance */ + client = get_client_for_iface (self, iface, ipv6); + if (client) { + nm_dhcp_client_stop (client); + remove_client (self, client); } - if (!state_is_bound (device->state)) { - nm_warning ("%s: dhclient didn't bind to a lease.", device->iface); - return FALSE; + /* And make a new one */ + client = g_object_new (priv->client_type, + NM_DHCP_CLIENT_INTERFACE, iface, + NM_DHCP_CLIENT_IPV6, ipv6, + NM_DHCP_CLIENT_UUID, uuid, + NM_DHCP_CLIENT_TIMEOUT, timeout ? timeout : DHCP_TIMEOUT, + NULL); + g_return_val_if_fail (client != NULL, NULL); + add_client (self, client); + + if (ipv6) + success = nm_dhcp_client_start_ip6 (client, s_ip6, dhcp_anycast_addr, info_only); + else + success = nm_dhcp_client_start_ip4 (client, s_ip4, dhcp_anycast_addr); + + if (!success) { + remove_client (self, client); + g_object_unref (client); + client = NULL; } - info.func = func; - info.user_data = user_data; - g_hash_table_foreach (device->options, iterate_dhcp4_config_option, &info); - return TRUE; + return client; +} + +/* Caller owns a reference to the NMDHCPClient on return */ +NMDHCPClient * +nm_dhcp_manager_start_ip4 (NMDHCPManager *self, + const char *iface, + const char *uuid, + NMSettingIP4Config *s_ip4, + guint32 timeout, + guint8 *dhcp_anycast_addr) +{ + NMDHCPManagerPrivate *priv; + NMDHCPClient *client = NULL; + + g_return_val_if_fail (self, NULL); + g_return_val_if_fail (NM_IS_DHCP_MANAGER (self), NULL); + + priv = NM_DHCP_MANAGER_GET_PRIVATE (self); + + if (s_ip4) { + const char *method = nm_setting_ip4_config_get_method (s_ip4); + + if (method) { + /* Method must be 'auto' */ + g_return_val_if_fail (strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_AUTO) == 0, NULL); + } + + if ( nm_setting_ip4_config_get_dhcp_send_hostname (s_ip4) + && (nm_setting_ip4_config_get_dhcp_hostname (s_ip4) == NULL) + && priv->hostname_provider != NULL) { + + s_ip4 = NM_SETTING_IP4_CONFIG (nm_setting_duplicate (NM_SETTING (s_ip4))); + + /* We're asked to send the hostname to DHCP server, the hostname + * isn't specified, and a hostname provider is registered: use that + */ + g_object_set (G_OBJECT (s_ip4), + NM_SETTING_IP4_CONFIG_DHCP_HOSTNAME, + nm_hostname_provider_get_hostname (priv->hostname_provider), + NULL); + } else + g_object_ref (s_ip4); + } + + client = client_start (self, iface, uuid, FALSE, s_ip4, NULL, timeout, dhcp_anycast_addr, FALSE); + + if (s_ip4) + g_object_unref (s_ip4); + + return client; +} + +/* Caller owns a reference to the NMDHCPClient on return */ +NMDHCPClient * +nm_dhcp_manager_start_ip6 (NMDHCPManager *self, + const char *iface, + const char *uuid, + NMSettingIP6Config *s_ip6, + guint32 timeout, + guint8 *dhcp_anycast_addr, + gboolean info_only) +{ + return client_start (self, iface, uuid, TRUE, NULL, s_ip6, timeout, dhcp_anycast_addr, info_only); } static void @@ -1123,14 +542,106 @@ nm_dhcp_manager_set_hostname_provider (NMDHCPManager *manager, } GSList * -nm_dhcp_manager_get_lease_ip4_config (NMDHCPManager *self, - const char *iface, - const char *uuid) +nm_dhcp_manager_get_lease_config (NMDHCPManager *self, + const char *iface, + const char *uuid) { + g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (NM_IS_DHCP_MANAGER (self), NULL); g_return_val_if_fail (iface != NULL, NULL); g_return_val_if_fail (uuid != NULL, NULL); - return nm_dhcp_client_get_lease_ip4_config (iface, uuid); + return NM_DHCP_MANAGER_GET_PRIVATE (self)->get_lease_config_func (iface, uuid); +} + +NMIP4Config * +nm_dhcp_manager_test_ip4_options_to_config (const char *dhcp_client, + const char *iface, + GHashTable *options, + const char *reason) +{ + NMDHCPClient *client; + NMIP4Config *config; + GType client_type; + GError *error = NULL; + + client_type = get_client_type (dhcp_client, &error); + if (!client_type) { + nm_log_err (LOGD_DHCP4, "error: %s", error ? error->message : "(unknown)"); + g_clear_error (&error); + return NULL; + } + + client = (NMDHCPClient *) g_object_new (client_type, + NM_DHCP_CLIENT_INTERFACE, iface, + NULL); + g_return_val_if_fail (client != NULL, NULL); + nm_dhcp_client_new_options (client, options, reason); + config = nm_dhcp_client_get_ip4_config (client, TRUE); + g_object_unref (client); + + return config; +} + +/***************************************************/ + +NMDHCPManager * +nm_dhcp_manager_get (void) +{ + g_warn_if_fail (singleton != NULL); + return g_object_ref (singleton); +} + +static void +nm_dhcp_manager_init (NMDHCPManager *manager) +{ +} + +static void +dispose (GObject *object) +{ + NMDHCPManagerPrivate *priv = NM_DHCP_MANAGER_GET_PRIVATE (object); + GList *values, *iter; + + if (priv->clients) { + values = g_hash_table_get_values (priv->clients); + for (iter = values; iter; iter = g_list_next (iter)) + remove_client (NM_DHCP_MANAGER (object), NM_DHCP_CLIENT (iter->data)); + g_list_free (values); + } + + G_OBJECT_CLASS (nm_dhcp_manager_parent_class)->dispose (object); +} + +static void +finalize (GObject *object) +{ + NMDHCPManagerPrivate *priv = NM_DHCP_MANAGER_GET_PRIVATE (object); + + if (priv->hostname_provider) { + g_object_weak_unref (G_OBJECT (priv->hostname_provider), hostname_provider_destroyed, object); + priv->hostname_provider = NULL; + } + + if (priv->clients) + g_hash_table_destroy (priv->clients); + if (priv->proxy) + g_object_unref (priv->proxy); + if (priv->dbus_mgr) + g_object_unref (priv->dbus_mgr); + + G_OBJECT_CLASS (nm_dhcp_manager_parent_class)->finalize (object); +} + +static void +nm_dhcp_manager_class_init (NMDHCPManagerClass *manager_class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (manager_class); + + g_type_class_add_private (manager_class, sizeof (NMDHCPManagerPrivate)); + + /* virtual methods */ + object_class->finalize = finalize; + object_class->dispose = dispose; } diff --git a/src/dhcp-manager/nm-dhcp-manager.h b/src/dhcp-manager/nm-dhcp-manager.h index 124008493a..9d83d09605 100644 --- a/src/dhcp-manager/nm-dhcp-manager.h +++ b/src/dhcp-manager/nm-dhcp-manager.h @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2005 - 2008 Red Hat, Inc. + * Copyright (C) 2005 - 2010 Red Hat, Inc. * Copyright (C) 2006 - 2008 Novell, Inc. */ @@ -26,12 +26,24 @@ #include #include +#include +#include "nm-dhcp-client.h" #include "nm-ip4-config.h" #include "nm-dhcp4-config.h" #include "nm-hostname-provider.h" -#define NM_DHCP_MANAGER_RUN_DIR LOCALSTATEDIR "/run" +enum { + NM_DHCP_MANAGER_ERROR_BAD_CLIENT = 0, + NM_DHCP_MANAGER_ERROR_INTERNAL = 1, +}; + +#define NM_DHCP_MANAGER_ERROR (nm_dhcp_manager_error_quark ()) +#define NN_TYPE_DHCP_MANAGER_ERROR (nm_dhcp_manager_error_get_type ()) + +GQuark nm_dhcp_manager_error_quark (void); +GType nm_dhcp_manager_error_get_type (void); + #define NM_TYPE_DHCP_MANAGER (nm_dhcp_manager_get_type ()) #define NM_DHCP_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DHCP_MANAGER, NMDHCPManager)) @@ -40,93 +52,47 @@ #define NM_IS_DHCP_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_DHCP_MANAGER)) #define NM_DHCP_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DHCP_MANAGER, NMDHCPManagerClass)) -typedef enum { - DHC_NBI=0, /* no broadcast interfaces found */ - DHC_PREINIT, /* configuration started */ - DHC_BOUND, /* lease obtained */ - DHC_IPV4LL, /* IPv4LL address obtained */ - DHC_RENEW, /* lease renewed */ - DHC_REBOOT, /* have valid lease, but now obtained a different one */ - DHC_REBIND, /* new, different lease */ - DHC_STOP, /* remove old lease */ - DHC_MEDIUM, /* media selection begun */ - DHC_TIMEOUT, /* timed out contacting DHCP server */ - DHC_FAIL, /* all attempts to contact server timed out, sleeping */ - DHC_EXPIRE, /* lease has expired, renewing */ - DHC_RELEASE, /* releasing lease */ - DHC_START, /* sent when dhclient started OK */ - DHC_ABEND, /* dhclient exited abnormally */ - DHC_END, /* dhclient exited normally */ - DHC_END_OPTIONS, /* last option in subscription sent */ -} NMDHCPState; - typedef struct { GObject parent; } NMDHCPManager; typedef struct { GObjectClass parent; - - /* Signals */ - void (*state_changed) (NMDHCPManager *manager, char *iface, NMDHCPState state); - void (*timeout) (NMDHCPManager *manager, char *iface); } NMDHCPManagerClass; -typedef struct { - char * iface; - guchar state; - GPid pid; - char * pid_file; - char * conf_file; - char * lease_file; - guint timeout_id; - guint watch_id; - NMDHCPManager * manager; - GHashTable * options; -} NMDHCPDevice; - GType nm_dhcp_manager_get_type (void); NMDHCPManager *nm_dhcp_manager_get (void); + void nm_dhcp_manager_set_hostname_provider(NMDHCPManager *manager, NMHostnameProvider *provider); -gboolean nm_dhcp_manager_begin_transaction (NMDHCPManager *manager, - const char *iface, - const char *uuid, - NMSettingIP4Config *s_ip4, - guint32 timeout, - guint8 *dhcp_anycast_addr); -void nm_dhcp_manager_cancel_transaction (NMDHCPManager *manager, - const char *iface); -NMIP4Config * nm_dhcp_manager_get_ip4_config (NMDHCPManager *manager, const char *iface); -NMDHCPState nm_dhcp_manager_get_state_for_device (NMDHCPManager *manager, const char *iface); +NMDHCPClient * nm_dhcp_manager_start_ip4 (NMDHCPManager *manager, + const char *iface, + const char *uuid, + NMSettingIP4Config *s_ip4, + guint32 timeout, + guint8 *dhcp_anycast_addr); -gboolean nm_dhcp_manager_foreach_dhcp4_option (NMDHCPManager *self, - const char *iface, - GHFunc func, - gpointer user_data); +NMDHCPClient * nm_dhcp_manager_start_ip6 (NMDHCPManager *manager, + const char *iface, + const char *uuid, + NMSettingIP6Config *s_ip6, + guint32 timeout, + guint8 *dhcp_anycast_addr, + gboolean info_only); -GSList * nm_dhcp_manager_get_lease_ip4_config (NMDHCPManager *self, - const char *iface, - const char *uuid); +GSList * nm_dhcp_manager_get_lease_config (NMDHCPManager *self, + const char *iface, + const char *uuid); -/* The following are implemented by the DHCP client backends */ -GPid nm_dhcp_client_start (NMDHCPDevice *device, - const char *uuid, - NMSettingIP4Config *s_ip4, - guint8 *anycast_addr); -void nm_dhcp_client_stop (NMDHCPDevice *device, pid_t pid); +/* For testing only */ +NMIP4Config *nm_dhcp_manager_test_ip4_options_to_config (const char *dhcp_client, + const char *iface, + GHashTable *options, + const char *reason); -gboolean nm_dhcp_client_process_classless_routes (GHashTable *options, - NMIP4Config *ip4_config, - guint32 *gwaddr); - -GSList * nm_dhcp_client_get_lease_ip4_config (const char *iface, - const char *uuid); - -/* Test functions */ -NMIP4Config *nm_dhcp_manager_options_to_ip4_config (const char *iface, - GHashTable *options); +/* Only for main.c */ +NMDHCPManager *nm_dhcp_manager_new (const char *client, GError **error); #endif /* NM_DHCP_MANAGER_H */ diff --git a/src/dnsmasq-manager/Makefile.am b/src/dnsmasq-manager/Makefile.am index 71d3873ecb..66bbdd83f8 100644 --- a/src/dnsmasq-manager/Makefile.am +++ b/src/dnsmasq-manager/Makefile.am @@ -1,5 +1,6 @@ INCLUDES = \ -I${top_srcdir}/libnm-util \ + -I${top_srcdir}/src/logging \ -I${top_srcdir}/src \ -I${top_srcdir}/include @@ -13,4 +14,6 @@ libdnsmasq_manager_la_CPPFLAGS = \ $(GLIB_CFLAGS) \ -DLOCALSTATEDIR=\"$(localstatedir)\" -libdnsmasq_manager_la_LIBADD = $(GLIB_LIBS) +libdnsmasq_manager_la_LIBADD = \ + $(top_builddir)/src/logging/libnm-logging.la \ + $(GLIB_LIBS) diff --git a/src/dnsmasq-manager/nm-dnsmasq-manager.c b/src/dnsmasq-manager/nm-dnsmasq-manager.c index 5538c82ff2..ea529c77eb 100644 --- a/src/dnsmasq-manager/nm-dnsmasq-manager.c +++ b/src/dnsmasq-manager/nm-dnsmasq-manager.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2008 Red Hat, Inc. + * Copyright (C) 2008 - 2010 Red Hat, Inc. */ #include @@ -27,7 +27,7 @@ #include #include "nm-dnsmasq-manager.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-glib-compat.h" typedef struct { @@ -168,13 +168,12 @@ nm_cmd_line_add_string (NMCmdLine *cmd, const char *str) static inline const char * nm_find_dnsmasq (void) { - static const char *dnsmasq_binary_paths[] = - { - "/usr/local/sbin/dnsmasq", - "/usr/sbin/dnsmasq", - "/sbin/dnsmasq", - NULL - }; + static const char *dnsmasq_binary_paths[] = { + "/usr/local/sbin/dnsmasq", + "/usr/sbin/dnsmasq", + "/sbin/dnsmasq", + NULL + }; const char **dnsmasq_binary = dnsmasq_binary_paths; @@ -214,7 +213,7 @@ dm_exit_code (guint dm_exit_status) break; } - g_warning ("dnsmasq exited with error: %s (%d)", msg, dm_exit_status); + nm_log_warn (LOGD_SHARING, "dnsmasq exited with error: %s (%d)", msg, dm_exit_status); } static void @@ -228,12 +227,13 @@ dm_watch_cb (GPid pid, gint status, gpointer user_data) err = WEXITSTATUS (status); if (err != 0) dm_exit_code (err); - } else if (WIFSTOPPED (status)) - g_warning ("dnsmasq stopped unexpectedly with signal %d", WSTOPSIG (status)); - else if (WIFSIGNALED (status)) - g_warning ("dnsmasq died with signal %d", WTERMSIG (status)); - else - g_warning ("dnsmasq died from an unknown cause"); + } else if (WIFSTOPPED (status)) { + nm_log_warn (LOGD_SHARING, "dnsmasq stopped unexpectedly with signal %d", WSTOPSIG (status)); + } else if (WIFSIGNALED (status)) { + nm_log_warn (LOGD_SHARING, "dnsmasq died with signal %d", WTERMSIG (status)); + } else { + nm_log_warn (LOGD_SHARING, "dnsmasq died from an unknown cause"); + } priv->pid = 0; @@ -288,8 +288,8 @@ create_dm_cmd_line (const char *iface, s = g_string_new ("--listen-address="); addr.s_addr = nm_ip4_address_get_address (tmp); if (!inet_ntop (AF_INET, &addr, &localaddr[0], INET_ADDRSTRLEN)) { - nm_warning ("%s: error converting IP4 address 0x%X", - __func__, ntohl (addr.s_addr)); + nm_log_warn (LOGD_SHARING, "error converting IP4 address 0x%X", + ntohl (addr.s_addr)); goto error; } g_string_append (s, localaddr); @@ -301,8 +301,8 @@ create_dm_cmd_line (const char *iface, /* Add start of address range */ addr.s_addr = nm_ip4_address_get_address (tmp) + htonl (9); if (!inet_ntop (AF_INET, &addr, &buf[0], INET_ADDRSTRLEN)) { - nm_warning ("%s: error converting IP4 address 0x%X", - __func__, ntohl (addr.s_addr)); + nm_log_warn (LOGD_SHARING, "error converting IP4 address 0x%X", + ntohl (addr.s_addr)); goto error; } g_string_append (s, buf); @@ -312,8 +312,8 @@ create_dm_cmd_line (const char *iface, /* Add end of address range */ addr.s_addr = nm_ip4_address_get_address (tmp) + htonl (99); if (!inet_ntop (AF_INET, &addr, &buf[0], INET_ADDRSTRLEN)) { - nm_warning ("%s: error converting IP4 address 0x%X", - __func__, ntohl (addr.s_addr)); + nm_log_warn (LOGD_SHARING, "error converting IP4 address 0x%X", + ntohl (addr.s_addr)); goto error; } g_string_append (s, buf); @@ -370,7 +370,7 @@ kill_existing_for_iface (const char *iface, const char *pidfile) if (strstr (cmdline_contents, "bin/dnsmasq")) { if (kill (pid, 0)) { - nm_info ("Killing stale dnsmasq process %ld", pid); + nm_log_dbg (LOGD_SHARING, "Killing stale dnsmasq process %ld", pid); kill (pid, SIGKILL); } unlink (pidfile); @@ -405,10 +405,10 @@ nm_dnsmasq_manager_start (NMDnsMasqManager *manager, g_ptr_array_add (dm_cmd->array, NULL); - nm_info ("Starting dnsmasq..."); + nm_log_info (LOGD_SHARING, "Starting dnsmasq..."); cmd_str = nm_cmd_line_to_str (dm_cmd); - nm_debug ("Command line: %s", cmd_str); + nm_log_dbg (LOGD_SHARING, "Command line: %s", cmd_str); g_free (cmd_str); priv->pid = 0; @@ -419,7 +419,7 @@ nm_dnsmasq_manager_start (NMDnsMasqManager *manager, goto out; } - nm_debug ("dnsmasq started with pid %d", priv->pid); + nm_log_dbg (LOGD_SHARING, "dnsmasq started with pid %d", priv->pid); priv->dm_watch_id = g_child_watch_add (priv->pid, (GChildWatchFunc) dm_watch_cb, manager); @@ -439,9 +439,9 @@ ensure_killed (gpointer data) kill (pid, SIGKILL); /* ensure the child is reaped */ - nm_debug ("waiting for dnsmasq pid %d to exit", pid); + nm_log_dbg (LOGD_SHARING, "waiting for dnsmasq pid %d to exit", pid); waitpid (pid, NULL, 0); - nm_debug ("dnsmasq pid %d cleaned up", pid); + nm_log_dbg (LOGD_SHARING, "dnsmasq pid %d cleaned up", pid); return FALSE; } @@ -467,9 +467,9 @@ nm_dnsmasq_manager_stop (NMDnsMasqManager *manager) kill (priv->pid, SIGKILL); /* ensure the child is reaped */ - nm_debug ("waiting for dnsmasq pid %d to exit", priv->pid); + nm_log_dbg (LOGD_SHARING, "waiting for dnsmasq pid %d to exit", priv->pid); waitpid (priv->pid, NULL, 0); - nm_debug ("dnsmasq pid %d cleaned up", priv->pid); + nm_log_dbg (LOGD_SHARING, "dnsmasq pid %d cleaned up", priv->pid); } priv->pid = 0; diff --git a/src/ip6-manager/Makefile.am b/src/ip6-manager/Makefile.am index 50db421fcd..c2f5591429 100644 --- a/src/ip6-manager/Makefile.am +++ b/src/ip6-manager/Makefile.am @@ -3,6 +3,7 @@ INCLUDES = \ -I${top_srcdir}/include \ -I${top_builddir}/marshallers \ -I${top_srcdir}/libnm-util \ + -I${top_srcdir}/src/logging \ -I${top_srcdir}/src \ -I${top_srcdir}/src/named-manager @@ -10,17 +11,16 @@ noinst_LTLIBRARIES = libip6-manager.la libip6_manager_la_SOURCES = \ nm-ip6-manager.c \ - nm-ip6-manager.h \ - nm-netlink-listener.c \ - nm-netlink-listener.h + nm-ip6-manager.h libip6_manager_la_CPPFLAGS = \ $(DBUS_CFLAGS) \ $(GLIB_CFLAGS) \ - $(HAL_CFLAGS) \ -DG_DISABLE_DEPRECATED libip6_manager_la_LIBADD = \ + $(top_builddir)/marshallers/libmarshallers.la \ + $(top_builddir)/src/logging/libnm-logging.la \ $(DBUS_LIBS) \ - $(GLIB_LIBS) \ - $(top_builddir)/marshallers/libmarshallers.la + $(GLIB_LIBS) + diff --git a/src/ip6-manager/nm-ip6-manager.c b/src/ip6-manager/nm-ip6-manager.c index f41169cb15..f6f6127ce7 100644 --- a/src/ip6-manager/nm-ip6-manager.c +++ b/src/ip6-manager/nm-ip6-manager.c @@ -15,23 +15,25 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009 - 2010 Red Hat, Inc. */ #include #include +#include #include #include #include "nm-ip6-manager.h" -#include "nm-netlink-listener.h" +#include "nm-netlink-monitor.h" #include "NetworkManagerUtils.h" #include "nm-marshal.h" -#include "nm-utils.h" +#include "nm-logging.h" +#include "nm-system.h" /* Pre-DHCP addrconf timeout, in seconds */ -#define NM_IP6_TIMEOUT 10 +#define NM_IP6_TIMEOUT 20 /* FIXME? Stolen from the kernel sources */ #define IF_RA_OTHERCONF 0x80 @@ -40,50 +42,17 @@ #define IF_RS_SENT 0x10 typedef struct { - NMNetlinkListener *netlink; - GHashTable *devices_by_iface, *devices_by_index; + NMNetlinkMonitor *monitor; + GHashTable *devices; struct nl_handle *nlh; struct nl_cache *addr_cache, *route_cache; + + guint netlink_id; } NMIP6ManagerPrivate; #define NM_IP6_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_IP6_MANAGER, NMIP6ManagerPrivate)) -typedef enum { - NM_IP6_DEVICE_UNCONFIGURED, - NM_IP6_DEVICE_GOT_LINK_LOCAL, - NM_IP6_DEVICE_GOT_ROUTER_ADVERTISEMENT, - NM_IP6_DEVICE_GOT_ADDRESS, - NM_IP6_DEVICE_WAITING_FOR_DHCP, - NM_IP6_DEVICE_GOT_DHCP, - NM_IP6_DEVICE_TIMED_OUT -} NMIP6DeviceState; - -typedef struct { - struct in6_addr addr; - time_t expires; -} NMIP6RDNSS; - -typedef struct { - NMIP6Manager *manager; - char *iface; - int index; - - char *accept_ra_path; - gboolean accept_ra_save_valid; - guint32 accept_ra_save; - - guint finish_addrconf_id; - guint config_changed_id; - - NMIP6DeviceState state; - NMIP6DeviceState target_state; - gboolean addrconf_complete; - - GArray *rdnss_servers; - guint rdnss_timeout_id; -} NMIP6Device; - G_DEFINE_TYPE (NMIP6Manager, nm_ip6_manager, G_TYPE_OBJECT) enum { @@ -94,102 +63,54 @@ enum { static guint signals[LAST_SIGNAL] = { 0 }; -static NMIP6Manager *nm_ip6_manager_new (void); +typedef enum { + NM_IP6_DEVICE_UNCONFIGURED, + NM_IP6_DEVICE_GOT_LINK_LOCAL, + NM_IP6_DEVICE_GOT_ROUTER_ADVERTISEMENT, + NM_IP6_DEVICE_GOT_ADDRESS, + NM_IP6_DEVICE_TIMED_OUT +} NMIP6DeviceState; -static void netlink_notification (NMNetlinkListener *listener, struct nl_msg *msg, gpointer user_data); +typedef struct { + struct in6_addr addr; + time_t expires; +} NMIP6RDNSS; -static void nm_ip6_device_destroy (NMIP6Device *device); +/******************************************************************/ -NMIP6Manager * -nm_ip6_manager_get (void) -{ - static NMIP6Manager *singleton = NULL; +typedef struct { + NMIP6Manager *manager; + char *iface; + int ifindex; - if (!singleton) - singleton = nm_ip6_manager_new (); - g_assert (singleton); + char *disable_ip6_path; + gboolean disable_ip6_save_valid; + guint32 disable_ip6_save; - return g_object_ref (singleton); -} + guint finish_addrconf_id; + guint config_changed_id; -static void -nm_ip6_manager_init (NMIP6Manager *manager) -{ - NMIP6ManagerPrivate *priv = NM_IP6_MANAGER_GET_PRIVATE (manager); + NMIP6DeviceState state; + NMIP6DeviceState target_state; + gboolean addrconf_complete; - priv->devices_by_iface = g_hash_table_new_full (g_str_hash, g_str_equal, - NULL, - (GDestroyNotify) nm_ip6_device_destroy); - priv->devices_by_index = g_hash_table_new (NULL, NULL); + GArray *rdnss_servers; + guint rdnss_timeout_id; - priv->netlink = nm_netlink_listener_get (); - g_signal_connect (priv->netlink, "notification", - G_CALLBACK (netlink_notification), manager); - nm_netlink_listener_subscribe (priv->netlink, RTNLGRP_IPV6_IFADDR, NULL); - nm_netlink_listener_subscribe (priv->netlink, RTNLGRP_IPV6_PREFIX, NULL); - nm_netlink_listener_subscribe (priv->netlink, RTNLGRP_ND_USEROPT, NULL); + guint ip6flags_poll_id; - priv->nlh = nm_netlink_get_default_handle (); - priv->addr_cache = rtnl_addr_alloc_cache (priv->nlh); - priv->route_cache = rtnl_route_alloc_cache (priv->nlh); -} - -static void -finalize (GObject *object) -{ - NMIP6ManagerPrivate *priv = NM_IP6_MANAGER_GET_PRIVATE (object); - - g_hash_table_destroy (priv->devices_by_iface); - g_hash_table_destroy (priv->devices_by_index); - g_object_unref (priv->netlink); - nl_cache_free (priv->addr_cache); - nl_cache_free (priv->route_cache); - - G_OBJECT_CLASS (nm_ip6_manager_parent_class)->finalize (object); -} - -static void -nm_ip6_manager_class_init (NMIP6ManagerClass *manager_class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (manager_class); - - g_type_class_add_private (manager_class, sizeof (NMIP6ManagerPrivate)); - - /* virtual methods */ - object_class->finalize = finalize; - - /* signals */ - signals[ADDRCONF_COMPLETE] = - g_signal_new ("addrconf-complete", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (NMIP6ManagerClass, addrconf_complete), - NULL, NULL, - _nm_marshal_VOID__STRING_BOOLEAN, - G_TYPE_NONE, 2, - G_TYPE_STRING, - G_TYPE_BOOLEAN); - - signals[CONFIG_CHANGED] = - g_signal_new ("config-changed", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (NMIP6ManagerClass, config_changed), - NULL, NULL, - g_cclosure_marshal_VOID__STRING, - G_TYPE_NONE, 1, - G_TYPE_STRING); -} + guint32 ra_flags; +} NMIP6Device; static void nm_ip6_device_destroy (NMIP6Device *device) { g_return_if_fail (device != NULL); - /* reset the saved RA value */ - if (device->accept_ra_save_valid) { - nm_utils_do_sysctl (device->accept_ra_path, - device->accept_ra_save ? "1\n" : "0\n"); + /* reset the saved IPv6 value */ + if (device->disable_ip6_save_valid) { + nm_utils_do_sysctl (device->disable_ip6_path, + device->disable_ip6_save ? "1\n" : "0\n"); } if (device->finish_addrconf_id) @@ -201,62 +122,105 @@ nm_ip6_device_destroy (NMIP6Device *device) g_array_free (device->rdnss_servers, TRUE); if (device->rdnss_timeout_id) g_source_remove (device->rdnss_timeout_id); + if (device->ip6flags_poll_id) + g_source_remove (device->ip6flags_poll_id); - g_free (device->accept_ra_path); g_slice_free (NMIP6Device, device); } -static NMIP6Manager * -nm_ip6_manager_new (void) +static NMIP6Device * +nm_ip6_device_new (NMIP6Manager *manager, int ifindex) { - NMIP6Manager *manager; - NMIP6ManagerPrivate *priv; + NMIP6ManagerPrivate *priv = NM_IP6_MANAGER_GET_PRIVATE (manager); + NMIP6Device *device; - manager = g_object_new (NM_TYPE_IP6_MANAGER, NULL); - priv = NM_IP6_MANAGER_GET_PRIVATE (manager); + g_return_val_if_fail (ifindex > 0, NULL); - if (!priv->devices_by_iface || !priv->devices_by_index) { - nm_warning ("Error: not enough memory to initialize IP6 manager tables"); - g_object_unref (manager); - manager = NULL; + device = g_slice_new0 (NMIP6Device); + if (!device) { + nm_log_err (LOGD_IP6, "(%d): out of memory creating IP6 addrconf object.", + ifindex); + return NULL; } - return manager; + device->ifindex = ifindex; + device->iface = g_strdup (nm_netlink_index_to_iface (ifindex)); + if (!device->iface) { + nm_log_err (LOGD_IP6, "(%d): could not find interface name from index.", + ifindex); + goto error; + } + + device->manager = manager; + + device->rdnss_servers = g_array_new (FALSE, FALSE, sizeof (NMIP6RDNSS)); + + g_hash_table_replace (priv->devices, GINT_TO_POINTER (device->ifindex), device); + + /* and the original value of IPv6 enable/disable */ + device->disable_ip6_path = g_strdup_printf ("/proc/sys/net/ipv6/conf/%s/disable_ipv6", + device->iface); + g_assert (device->disable_ip6_path); + device->disable_ip6_save_valid = nm_utils_get_proc_sys_net_value (device->disable_ip6_path, + device->iface, + &device->disable_ip6_save); + + return device; + +error: + nm_ip6_device_destroy (device); + return NULL; } static NMIP6Device * nm_ip6_manager_get_device (NMIP6Manager *manager, int ifindex) { - NMIP6ManagerPrivate *priv = NM_IP6_MANAGER_GET_PRIVATE (manager); + NMIP6ManagerPrivate *priv; - return g_hash_table_lookup (priv->devices_by_index, - GINT_TO_POINTER (ifindex)); + g_return_val_if_fail (manager != NULL, NULL); + g_return_val_if_fail (NM_IS_IP6_MANAGER (manager), NULL); + + priv = NM_IP6_MANAGER_GET_PRIVATE (manager); + return g_hash_table_lookup (priv->devices, GINT_TO_POINTER (ifindex)); } +/******************************************************************/ + +typedef struct { + NMIP6Device *device; + guint dhcp_opts; + gboolean success; +} CallbackInfo; + static gboolean finish_addrconf (gpointer user_data) { - NMIP6Device *device = user_data; + CallbackInfo *info = user_data; + NMIP6Device *device = info->device; NMIP6Manager *manager = device->manager; - char *iface_copy; + int ifindex; device->finish_addrconf_id = 0; device->addrconf_complete = TRUE; + ifindex = device->ifindex; - if (device->state >= device->target_state) { + /* We're done, stop polling IPv6 flags */ + if (device->ip6flags_poll_id) { + g_source_remove (device->ip6flags_poll_id); + device->ip6flags_poll_id = 0; + } + + /* And tell listeners that addrconf is complete */ + if (info->success) { g_signal_emit (manager, signals[ADDRCONF_COMPLETE], 0, - device->iface, TRUE); + ifindex, info->dhcp_opts, TRUE); } else { - nm_info ("Device '%s' IP6 addrconf timed out or failed.", - device->iface); + nm_log_info (LOGD_IP6, "(%s): IP6 addrconf timed out or failed.", + device->iface); - iface_copy = g_strdup (device->iface); - - nm_ip6_manager_cancel_addrconf (manager, device->iface); + nm_ip6_manager_cancel_addrconf (manager, ifindex); g_signal_emit (manager, signals[ADDRCONF_COMPLETE], 0, - iface_copy, FALSE); - - g_free (iface_copy); + ifindex, info->dhcp_opts, FALSE); } return FALSE; @@ -265,11 +229,15 @@ finish_addrconf (gpointer user_data) static gboolean emit_config_changed (gpointer user_data) { - NMIP6Device *device = user_data; + CallbackInfo *info = user_data; + NMIP6Device *device = info->device; NMIP6Manager *manager = device->manager; device->config_changed_id = 0; - g_signal_emit (manager, signals[CONFIG_CHANGED], 0, device->iface); + g_signal_emit (manager, signals[CONFIG_CHANGED], 0, + device->ifindex, + info->dhcp_opts, + info->success); return FALSE; } @@ -279,9 +247,12 @@ static gboolean rdnss_expired (gpointer user_data) { NMIP6Device *device = user_data; + CallbackInfo info = { device, IP6_DHCP_OPT_NONE }; + + nm_log_dbg (LOGD_IP6, "(%s): IPv6 RDNSS information expired", device->iface); set_rdnss_timeout (device); - emit_config_changed (device); + emit_config_changed (&info); return FALSE; } @@ -308,6 +279,12 @@ set_rdnss_timeout (NMIP6Device *device) * bit. */ if (rdnss->expires <= now + 1) { + char buf[INET6_ADDRSTRLEN + 1]; + + if (inet_ntop (AF_INET6, &(rdnss->addr), buf, sizeof (buf)) > 0) { + nm_log_dbg (LOGD_IP6, "(%s): removing expired RA-provided nameserver %s", + device->iface, buf); + } g_array_remove_index_fast (device->rdnss_servers, i--); continue; } @@ -323,6 +300,37 @@ set_rdnss_timeout (NMIP6Device *device) } } +static CallbackInfo * +callback_info_new (NMIP6Device *device, guint dhcp_opts, gboolean success) +{ + CallbackInfo *info; + + info = g_malloc0 (sizeof (CallbackInfo)); + info->device = device; + info->dhcp_opts = dhcp_opts; + info->success = success; + return info; +} + +static const char * +state_to_string (NMIP6DeviceState state) +{ + switch (state) { + case NM_IP6_DEVICE_UNCONFIGURED: + return "unconfigured"; + case NM_IP6_DEVICE_GOT_LINK_LOCAL: + return "got-link-local"; + case NM_IP6_DEVICE_GOT_ROUTER_ADVERTISEMENT: + return "got-ra"; + case NM_IP6_DEVICE_GOT_ADDRESS: + return "got-address"; + case NM_IP6_DEVICE_TIMED_OUT: + return "timed-out"; + default: + return "unknown"; + } +} + static void nm_ip6_device_sync_from_netlink (NMIP6Device *device, gboolean config_changed) { @@ -331,13 +339,22 @@ nm_ip6_device_sync_from_netlink (NMIP6Device *device, gboolean config_changed) struct rtnl_addr *rtnladdr; struct nl_addr *nladdr; struct in6_addr *addr; - struct rtnl_link *link; - guint flags; + CallbackInfo *info; + guint dhcp_opts = IP6_DHCP_OPT_NONE; + gboolean found_linklocal = FALSE, found_other = FALSE; - for (rtnladdr = (struct rtnl_addr *)nl_cache_get_first (priv->addr_cache); + nm_log_dbg (LOGD_IP6, "(%s): syncing with netlink (ra_flags 0x%X) (state/target '%s'/'%s')", + device->iface, device->ra_flags, + state_to_string (device->state), + state_to_string (device->target_state)); + + /* Look for any IPv6 addresses the kernel may have set for the device */ + for (rtnladdr = (struct rtnl_addr *) nl_cache_get_first (priv->addr_cache); rtnladdr; - rtnladdr = (struct rtnl_addr *)nl_cache_get_next ((struct nl_object *)rtnladdr)) { - if (rtnl_addr_get_ifindex (rtnladdr) != device->index) + rtnladdr = (struct rtnl_addr *) nl_cache_get_next ((struct nl_object *) rtnladdr)) { + char buf[INET6_ADDRSTRLEN]; + + if (rtnl_addr_get_ifindex (rtnladdr) != device->ifindex) continue; nladdr = rtnl_addr_get_local (rtnladdr); @@ -345,44 +362,92 @@ nm_ip6_device_sync_from_netlink (NMIP6Device *device, gboolean config_changed) continue; addr = nl_addr_get_binary_addr (nladdr); + + if (inet_ntop (AF_INET6, addr, buf, INET6_ADDRSTRLEN) > 0) { + nm_log_dbg (LOGD_IP6, "(%s): netlink address: %s", + device->iface, buf); + } + if (IN6_IS_ADDR_LINKLOCAL (addr)) { if (device->state == NM_IP6_DEVICE_UNCONFIGURED) device->state = NM_IP6_DEVICE_GOT_LINK_LOCAL; + found_linklocal = TRUE; } else { if (device->state < NM_IP6_DEVICE_GOT_ADDRESS) device->state = NM_IP6_DEVICE_GOT_ADDRESS; + found_other = TRUE; } } - /* Note: we don't want to keep a cache of links, because the - * kernel doesn't send notifications when the flags change, so the - * cached rtnl_links would have out-of-date flags. + /* There might be a LL address hanging around on the interface from + * before in the initial run, but if it goes away later, make sure we + * regress from GOT_LINK_LOCAL back to UNCONFIGURED. */ - link = nm_netlink_index_to_rtnl_link (device->index); - flags = rtnl_link_get_flags (link); - rtnl_link_put (link); + if ((device->state == NM_IP6_DEVICE_GOT_LINK_LOCAL) && !found_linklocal) + device->state = NM_IP6_DEVICE_UNCONFIGURED; - if ((flags & IF_RA_RCVD) && device->state < NM_IP6_DEVICE_GOT_ROUTER_ADVERTISEMENT) - device->state = NM_IP6_DEVICE_GOT_ROUTER_ADVERTISEMENT; + nm_log_dbg (LOGD_IP6, "(%s): addresses synced (state %s)", + device->iface, state_to_string (device->state)); -// if (flags & (IF_RA_MANAGED | IF_RA_OTHERCONF)) -// device->need_dhcp = TRUE; + /* We only care about router advertisements if we want a real IPv6 address */ + if ( (device->target_state == NM_IP6_DEVICE_GOT_ADDRESS) + && (device->ra_flags & IF_RA_RCVD)) { + + if (device->state < NM_IP6_DEVICE_GOT_ROUTER_ADVERTISEMENT) + device->state = NM_IP6_DEVICE_GOT_ROUTER_ADVERTISEMENT; + + if (device->ra_flags & IF_RA_MANAGED) { + dhcp_opts = IP6_DHCP_OPT_MANAGED; + nm_log_dbg (LOGD_IP6, "router advertisement deferred to DHCPv6"); + } else if (device->ra_flags & IF_RA_OTHERCONF) { + dhcp_opts = IP6_DHCP_OPT_OTHERCONF; + nm_log_dbg (LOGD_IP6, "router advertisement requests parallel DHCPv6"); + } + } if (!device->addrconf_complete) { - if (device->state >= device->target_state || - device->state == NM_IP6_DEVICE_GOT_ROUTER_ADVERTISEMENT) { + /* Managed mode (ie DHCP only) short-circuits automatic addrconf, so + * we don't bother waiting for the device's target state to be reached + * when the RA requests managed mode. + */ + if ( (device->state >= device->target_state) + || (dhcp_opts == IP6_DHCP_OPT_MANAGED)) { /* device->finish_addrconf_id may currently be a timeout * rather than an idle, so we remove the existing source. */ if (device->finish_addrconf_id) g_source_remove (device->finish_addrconf_id); - device->finish_addrconf_id = g_idle_add (finish_addrconf, - device); + + nm_log_dbg (LOGD_IP6, "(%s): reached target state or Managed-mode requested (state '%s') (dhcp opts 0x%X)", + device->iface, state_to_string (device->state), + dhcp_opts); + + info = callback_info_new (device, dhcp_opts, TRUE); + device->finish_addrconf_id = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, + finish_addrconf, + info, + (GDestroyNotify) g_free); } } else if (config_changed) { if (!device->config_changed_id) { - device->config_changed_id = g_idle_add (emit_config_changed, - device); + gboolean success = TRUE; + + /* If for some reason an RA-provided address disappeared, we need + * to make sure we fail the connection as it's no longer valid. + */ + if ( (device->state == NM_IP6_DEVICE_GOT_ADDRESS) + && (device->target_state == NM_IP6_DEVICE_GOT_ADDRESS) + && !found_other) { + nm_log_dbg (LOGD_IP6, "(%s): RA-provided address no longer valid", + device->iface); + success = FALSE; + } + + info = callback_info_new (device, dhcp_opts, success); + device->config_changed_id = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, + emit_config_changed, + info, + (GDestroyNotify) g_free); } } } @@ -404,12 +469,20 @@ process_addr (NMIP6Manager *manager, struct nl_msg *msg) struct rtnl_addr *rtnladdr; int old_size; + nm_log_dbg (LOGD_IP6, "processing netlink new/del address message"); + rtnladdr = NULL; nl_msg_parse (msg, ref_object, &rtnladdr); - if (!rtnladdr) + if (!rtnladdr) { + nm_log_dbg (LOGD_IP6, "error processing netlink new/del address message"); return NULL; + } device = nm_ip6_manager_get_device (manager, rtnl_addr_get_ifindex (rtnladdr)); + if (!device) { + nm_log_dbg (LOGD_IP6, "ignoring message for unknown device"); + return NULL; + } old_size = nl_cache_nitems (priv->addr_cache); nl_cache_include (priv->addr_cache, (struct nl_object *)rtnladdr, NULL); @@ -419,8 +492,11 @@ process_addr (NMIP6Manager *manager, struct nl_msg *msg) * every time it gets another router advertisement. We only want * to notify higher levels if we actually changed something. */ - if (nl_cache_nitems (priv->addr_cache) == old_size) + if (nl_cache_nitems (priv->addr_cache) == old_size) { + nm_log_dbg (LOGD_IP6, "(%s): address cache unchanged, ignoring message", + device->iface); return NULL; + } return device; } @@ -433,20 +509,31 @@ process_route (NMIP6Manager *manager, struct nl_msg *msg) struct rtnl_route *rtnlroute; int old_size; + nm_log_dbg (LOGD_IP6, "processing netlink new/del route message"); + rtnlroute = NULL; nl_msg_parse (msg, ref_object, &rtnlroute); - if (!rtnlroute) + if (!rtnlroute) { + nm_log_dbg (LOGD_IP6, "error processing netlink new/del route message"); return NULL; + } device = nm_ip6_manager_get_device (manager, rtnl_route_get_oif (rtnlroute)); + if (!device) { + nm_log_dbg (LOGD_IP6, "ignoring message for unknown device"); + return NULL; + } old_size = nl_cache_nitems (priv->route_cache); nl_cache_include (priv->route_cache, (struct nl_object *)rtnlroute, NULL); rtnl_route_put (rtnlroute); /* As above in process_addr */ - if (nl_cache_nitems (priv->route_cache) == old_size) + if (nl_cache_nitems (priv->route_cache) == old_size) { + nm_log_dbg (LOGD_IP6, "(%s): route cache unchanged, ignoring message", + device->iface); return NULL; + } return device; } @@ -463,11 +550,16 @@ process_prefix (NMIP6Manager *manager, struct nl_msg *msg) * way to notice immediately that an RA was received. */ + nm_log_dbg (LOGD_IP6, "processing netlink new prefix message"); + pmsg = (struct prefixmsg *) NLMSG_DATA (nlmsg_hdr (msg)); device = nm_ip6_manager_get_device (manager, pmsg->prefix_ifindex); - if (!device || device->addrconf_complete) + if (!device || device->addrconf_complete) { + nm_log_dbg (LOGD_IP6, "(%s): ignoring unknown or completed device", + device ? device->iface : "(none)"); return NULL; + } return device; } @@ -499,16 +591,22 @@ process_nduseropt (NMIP6Manager *manager, struct nl_msg *msg) NMIP6RDNSS server, *sa, *sb; gboolean changed; + nm_log_dbg (LOGD_IP6, "processing netlink nduseropt message"); + ndmsg = (struct nduseroptmsg *) NLMSG_DATA (nlmsg_hdr (msg)); if (ndmsg->nduseropt_family != AF_INET6 || ndmsg->nduseropt_icmp_type != ND_ROUTER_ADVERT || - ndmsg->nduseropt_icmp_code != 0) + ndmsg->nduseropt_icmp_code != 0) { + nm_log_dbg (LOGD_IP6, "ignoring non-Router Advertisement message"); return NULL; + } device = nm_ip6_manager_get_device (manager, ndmsg->nduseropt_ifindex); - if (!device) + if (!device) { + nm_log_dbg (LOGD_IP6, "ignoring message for unknown device"); return NULL; + } servers = g_array_new (FALSE, FALSE, sizeof (NMIP6RDNSS)); @@ -529,8 +627,21 @@ process_nduseropt (NMIP6Manager *manager, struct nl_msg *msg) rdnss_opt = (struct nd_opt_rdnss *) opt; - server.expires = now + ntohl (rdnss_opt->nd_opt_rdnss_lifetime); + /* Pad the DNS server expiry somewhat to give a bit of slack in cases + * where one RA gets lost or something (which can happen on unreliable + * links like wifi where certain types of frames are not retransmitted). + */ + server.expires = now + ntohl (rdnss_opt->nd_opt_rdnss_lifetime) + 10; + for (addr = (struct in6_addr *) (rdnss_opt + 1); nd_opt_len >= 2; addr++, nd_opt_len -= 2) { + char buf[INET6_ADDRSTRLEN + 1]; + + if (inet_ntop (AF_INET6, addr, buf, sizeof (buf))) { + nm_log_dbg (LOGD_IP6, "(%s): found RA-provided nameserver %s (expires in %d seconds)", + device->iface, buf, + ntohl (rdnss_opt->nd_opt_rdnss_lifetime)); + } + server.addr = *addr; g_array_append_val (servers, server); } @@ -547,7 +658,7 @@ process_nduseropt (NMIP6Manager *manager, struct nl_msg *msg) for (i = 0; i < servers->len; i++) { sa = &(g_array_index (servers, NMIP6RDNSS, i)); sb = &(g_array_index (device->rdnss_servers, NMIP6RDNSS, i)); - if (memcmp (&sa->addr, &sb->addr, sizeof (struct in6_addr)) != 0) { + if (IN6_ARE_ADDR_EQUAL (&sa->addr, &sb->addr) == FALSE) { changed = TRUE; break; } @@ -556,10 +667,14 @@ process_nduseropt (NMIP6Manager *manager, struct nl_msg *msg) } if (changed) { - g_array_free (device->rdnss_servers, TRUE); - device->rdnss_servers = servers; - } else - g_array_free (servers, TRUE); + nm_log_dbg (LOGD_IP6, "(%s): RA-provided nameservers changed", device->iface); + } + + /* Always copy in new servers (even if unchanged) to get their updated + * expiration times. + */ + g_array_free (device->rdnss_servers, TRUE); + device->rdnss_servers = servers; /* Timeouts may have changed even if IPs didn't */ set_rdnss_timeout (device); @@ -570,8 +685,72 @@ process_nduseropt (NMIP6Manager *manager, struct nl_msg *msg) return NULL; } +static struct nla_policy link_policy[IFLA_MAX + 1] = { + [IFLA_PROTINFO] = { .type = NLA_NESTED }, +}; + +static struct nla_policy link_prot_policy[IFLA_INET6_MAX + 1] = { + [IFLA_INET6_FLAGS] = { .type = NLA_U32 }, +}; + +static NMIP6Device * +process_newlink (NMIP6Manager *manager, struct nl_msg *msg) +{ + struct nlmsghdr *hdr = nlmsg_hdr (msg); + struct ifinfomsg *ifi; + NMIP6Device *device; + struct nlattr *tb[IFLA_MAX + 1]; + struct nlattr *pi[IFLA_INET6_MAX + 1]; + int err; + + ifi = nlmsg_data (hdr); + if (ifi->ifi_family != AF_INET6) { + nm_log_dbg (LOGD_IP6, "ignoring netlink message family %d", ifi->ifi_family); + return NULL; + } + + device = nm_ip6_manager_get_device (manager, ifi->ifi_index); + if (!device || device->addrconf_complete) { + nm_log_dbg (LOGD_IP6, "(%s): ignoring unknown or completed device", + device ? device->iface : "(none)"); + return NULL; + } + + /* FIXME: we have to do this manually for now since libnl doesn't yet + * support the IFLA_PROTINFO attribute of NEWLINK messages. When it does, + * we can get rid of this function and just grab IFLA_PROTINFO from + * nm_ip6_device_sync_from_netlink(), then get the IFLA_INET6_FLAGS out of + * the PROTINFO. + */ + + err = nlmsg_parse (hdr, sizeof (*ifi), tb, IFLA_MAX, link_policy); + if (err < 0) { + nm_log_dbg (LOGD_IP6, "(%s): error parsing PROTINFO attribute", device->iface); + return NULL; + } + if (!tb[IFLA_PROTINFO]) { + nm_log_dbg (LOGD_IP6, "(%s): message had no PROTINFO attribute", device->iface); + return NULL; + } + + err = nla_parse_nested (pi, IFLA_INET6_MAX, tb[IFLA_PROTINFO], link_prot_policy); + if (err < 0) { + nm_log_dbg (LOGD_IP6, "(%s): error parsing PROTINFO flags", device->iface); + return NULL; + } + if (!pi[IFLA_INET6_FLAGS]) { + nm_log_dbg (LOGD_IP6, "(%s): message had no PROTINFO flags", device->iface); + return NULL; + } + + device->ra_flags = nla_get_u32 (pi[IFLA_INET6_FLAGS]); + nm_log_dbg (LOGD_IP6, "(%s): got IPv6 flags 0x%X", device->iface, device->ra_flags); + + return device; +} + static void -netlink_notification (NMNetlinkListener *listener, struct nl_msg *msg, gpointer user_data) +netlink_notification (NMNetlinkMonitor *monitor, struct nl_msg *msg, gpointer user_data) { NMIP6Manager *manager = (NMIP6Manager *) user_data; NMIP6Device *device; @@ -579,161 +758,123 @@ netlink_notification (NMNetlinkListener *listener, struct nl_msg *msg, gpointer gboolean config_changed = FALSE; hdr = nlmsg_hdr (msg); + nm_log_dbg (LOGD_HW, "netlink notificate type %d", hdr->nlmsg_type); switch (hdr->nlmsg_type) { case RTM_NEWADDR: case RTM_DELADDR: device = process_addr (manager, msg); config_changed = TRUE; break; - case RTM_NEWROUTE: case RTM_DELROUTE: device = process_route (manager, msg); config_changed = TRUE; break; - case RTM_NEWPREFIX: device = process_prefix (manager, msg); break; - case RTM_NEWNDUSEROPT: device = process_nduseropt (manager, msg); config_changed = TRUE; break; - + case RTM_NEWLINK: + device = process_newlink (manager, msg); + config_changed = TRUE; + break; default: return; } - if (device) + if (device) { + nm_log_dbg (LOGD_IP6, "(%s): syncing device with netlink changes", device->iface); nm_ip6_device_sync_from_netlink (device, config_changed); -} - -static NMIP6Device * -nm_ip6_device_new (NMIP6Manager *manager, const char *iface) -{ - NMIP6ManagerPrivate *priv = NM_IP6_MANAGER_GET_PRIVATE (manager); - NMIP6Device *device; - GError *error = NULL; - char *contents = NULL; - - device = g_slice_new0 (NMIP6Device); - if (!device) { - nm_warning ("%s: Out of memory creating IP6 addrconf object.", iface); - return NULL; } - - device->iface = g_strdup (iface); - if (!device->iface) { - nm_warning ("%s: Out of memory creating IP6 addrconf object " - "property 'iface'.", - iface); - goto error; - } - device->index = nm_netlink_iface_to_index (iface); - - device->accept_ra_path = g_strdup_printf ("/proc/sys/net/ipv6/conf/%s/accept_ra", iface); - if (!device->accept_ra_path) { - nm_warning ("%s: Out of memory creating IP6 addrconf object " - "property 'accept_ra_path'.", - iface); - goto error; - } - - device->manager = manager; - - device->rdnss_servers = g_array_new (FALSE, FALSE, sizeof (NMIP6RDNSS)); - - g_hash_table_replace (priv->devices_by_iface, device->iface, device); - g_hash_table_replace (priv->devices_by_index, GINT_TO_POINTER (device->index), device); - - /* Grab the original value of "accept_ra" so we can restore it when the - * device is taken down. - */ - if (!g_file_get_contents (device->accept_ra_path, &contents, NULL, &error)) { - nm_warning ("%s: error reading %s: (%d) %s", - iface, device->accept_ra_path, - error ? error->code : -1, - error && error->message ? error->message : "(unknown)"); - g_clear_error (&error); - } else { - long int tmp; - - errno = 0; - tmp = strtol (contents, NULL, 10); - if ((errno == 0) && (tmp == 0 || tmp == 1)) { - device->accept_ra_save = (guint32) tmp; - device->accept_ra_save_valid = TRUE; - } - g_free (contents); - } - - return device; - -error: - nm_ip6_device_destroy (device); - return NULL; } void nm_ip6_manager_prepare_interface (NMIP6Manager *manager, - const char *iface, - NMSettingIP6Config *s_ip6) + int ifindex, + NMSettingIP6Config *s_ip6, + const char *accept_ra_path) { NMIP6ManagerPrivate *priv; NMIP6Device *device; const char *method = NULL; g_return_if_fail (NM_IS_IP6_MANAGER (manager)); - g_return_if_fail (iface != NULL); + g_return_if_fail (ifindex > 0); priv = NM_IP6_MANAGER_GET_PRIVATE (manager); - device = nm_ip6_device_new (manager, iface); + device = nm_ip6_device_new (manager, ifindex); + g_return_if_fail (device != NULL); + g_return_if_fail ( strchr (device->iface, '/') == NULL + && strcmp (device->iface, "all") != 0 + && strcmp (device->iface, "default") != 0); if (s_ip6) method = nm_setting_ip6_config_get_method (s_ip6); if (!method) method = NM_SETTING_IP6_CONFIG_METHOD_AUTO; - if ( !strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_MANUAL) - || !strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_LINK_LOCAL)) + /* Establish target state and turn router advertisement acceptance on or off */ + if (!strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_LINK_LOCAL)) { device->target_state = NM_IP6_DEVICE_GOT_LINK_LOCAL; - else + nm_utils_do_sysctl (accept_ra_path, "0\n"); + } else { device->target_state = NM_IP6_DEVICE_GOT_ADDRESS; + nm_utils_do_sysctl (accept_ra_path, "1\n"); + } +} - g_return_if_fail (strchr (iface, '/') == NULL && - strcmp (iface, "all") != 0 && - strcmp (iface, "default") != 0); - - /* Turn router advertisement acceptance on or off... */ - nm_utils_do_sysctl (device->accept_ra_path, - device->target_state >= NM_IP6_DEVICE_GOT_ADDRESS ? "1\n" : "0\n"); +static gboolean +poll_ip6_flags (gpointer user_data) +{ + nm_netlink_monitor_request_ip6_info (NM_NETLINK_MONITOR (user_data), NULL); + return TRUE; } void -nm_ip6_manager_begin_addrconf (NMIP6Manager *manager, - const char *iface) +nm_ip6_manager_begin_addrconf (NMIP6Manager *manager, int ifindex) { NMIP6ManagerPrivate *priv; NMIP6Device *device; + CallbackInfo *info; g_return_if_fail (NM_IS_IP6_MANAGER (manager)); - g_return_if_fail (iface != NULL); + g_return_if_fail (ifindex > 0); priv = NM_IP6_MANAGER_GET_PRIVATE (manager); - device = (NMIP6Device *) g_hash_table_lookup (priv->devices_by_iface, iface); + device = (NMIP6Device *) g_hash_table_lookup (priv->devices, GINT_TO_POINTER (ifindex)); g_return_if_fail (device != NULL); - nm_info ("Activation (%s) Beginning IP6 addrconf.", iface); + nm_log_info (LOGD_IP6, "Activation (%s) Beginning IP6 addrconf.", device->iface); device->addrconf_complete = FALSE; + device->ra_flags = 0; /* Set up a timeout on the transaction to kill it after the timeout */ - device->finish_addrconf_id = g_timeout_add_seconds (NM_IP6_TIMEOUT, - finish_addrconf, - device); + info = callback_info_new (device, 0, FALSE); + device->finish_addrconf_id = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, + NM_IP6_TIMEOUT, + finish_addrconf, + info, + (GDestroyNotify) g_free); + + /* Bounce IPv6 on the interface to ensure the kernel will start looking for + * new RAs; there doesn't seem to be a better way to do this right now. + */ + if (device->target_state >= NM_IP6_DEVICE_GOT_ADDRESS) { + nm_utils_do_sysctl (device->disable_ip6_path, "1\n"); + g_usleep (200); + nm_utils_do_sysctl (device->disable_ip6_path, "0\n"); + } + + device->ip6flags_poll_id = g_timeout_add_seconds (1, poll_ip6_flags, priv->monitor); + + /* Kick off the initial IPv6 flags request */ + nm_netlink_monitor_request_ip6_info (priv->monitor, NULL); /* Sync flags, etc, from netlink; this will also notice if the * device is already fully configured and schedule the @@ -743,27 +884,23 @@ nm_ip6_manager_begin_addrconf (NMIP6Manager *manager, } void -nm_ip6_manager_cancel_addrconf (NMIP6Manager *manager, - const char *iface) +nm_ip6_manager_cancel_addrconf (NMIP6Manager *manager, int ifindex) { - NMIP6ManagerPrivate *priv; - NMIP6Device *device; - g_return_if_fail (NM_IS_IP6_MANAGER (manager)); - g_return_if_fail (iface != NULL); + g_return_if_fail (ifindex > 0); - priv = NM_IP6_MANAGER_GET_PRIVATE (manager); - - device = g_hash_table_lookup (priv->devices_by_iface, iface); - if (device) { - g_hash_table_remove (priv->devices_by_index, GINT_TO_POINTER (device->index)); - g_hash_table_remove (priv->devices_by_iface, iface); - } + g_hash_table_remove (NM_IP6_MANAGER_GET_PRIVATE (manager)->devices, + GINT_TO_POINTER (ifindex)); } +#define FIRST_ROUTE(m) ((struct rtnl_route *) nl_cache_get_first (m)) +#define NEXT_ROUTE(m) ((struct rtnl_route *) nl_cache_get_next ((struct nl_object *) m)) + +#define FIRST_ADDR(m) ((struct rtnl_addr *) nl_cache_get_first (m)) +#define NEXT_ADDR(m) ((struct rtnl_addr *) nl_cache_get_next ((struct nl_object *) m)) + NMIP6Config * -nm_ip6_manager_get_ip6_config (NMIP6Manager *manager, - const char *iface) +nm_ip6_manager_get_ip6_config (NMIP6Manager *manager, int ifindex) { NMIP6ManagerPrivate *priv; NMIP6Device *device; @@ -775,51 +912,44 @@ nm_ip6_manager_get_ip6_config (NMIP6Manager *manager, struct rtnl_route *rtnlroute; struct nl_addr *nldest, *nlgateway; struct in6_addr *dest, *gateway; + gboolean defgw_set = FALSE; + struct in6_addr defgw; uint32_t metric; NMIP6Route *ip6route; int i; g_return_val_if_fail (NM_IS_IP6_MANAGER (manager), NULL); - g_return_val_if_fail (iface != NULL, NULL); + g_return_val_if_fail (ifindex > 0, NULL); priv = NM_IP6_MANAGER_GET_PRIVATE (manager); - device = (NMIP6Device *) g_hash_table_lookup (priv->devices_by_iface, iface); + device = (NMIP6Device *) g_hash_table_lookup (priv->devices, + GINT_TO_POINTER (ifindex)); if (!device) { - nm_warning ("Device '%s' addrconf not started.", iface); + nm_log_warn (LOGD_IP6, "(%d): addrconf not started.", ifindex); return NULL; } config = nm_ip6_config_new (); if (!config) { - nm_warning ("%s: Out of memory creating IP6 config object.", - iface); + nm_log_err (LOGD_IP6, "(%s): out of memory creating IP6 config object.", + device->iface); return NULL; } - /* Add addresses */ - for (rtnladdr = (struct rtnl_addr *)nl_cache_get_first (priv->addr_cache); - rtnladdr; - rtnladdr = (struct rtnl_addr *)nl_cache_get_next ((struct nl_object *)rtnladdr)) { - if (rtnl_addr_get_ifindex (rtnladdr) != device->index) - continue; - - nladdr = rtnl_addr_get_local (rtnladdr); - if (!nladdr || nl_addr_get_family (nladdr) != AF_INET6) - continue; - - addr = nl_addr_get_binary_addr (nladdr); - ip6addr = nm_ip6_address_new (); - nm_ip6_address_set_prefix (ip6addr, rtnl_addr_get_prefixlen (rtnladdr)); - nm_ip6_address_set_address (ip6addr, addr); - nm_ip6_config_take_address (config, ip6addr); - } + /* Make sure we refill the route and address caches, otherwise we won't get + * up-to-date information here since the netlink route/addr change messages + * may be lagging a bit. + */ + nl_cache_refill (priv->nlh, priv->route_cache); + nl_cache_refill (priv->nlh, priv->addr_cache); /* Add routes */ - for (rtnlroute = (struct rtnl_route *)nl_cache_get_first (priv->route_cache); - rtnlroute; - rtnlroute = (struct rtnl_route *)nl_cache_get_next ((struct nl_object *)rtnlroute)) { - if (rtnl_route_get_oif (rtnlroute) != device->index) + for (rtnlroute = FIRST_ROUTE (priv->route_cache); rtnlroute; rtnlroute = NEXT_ROUTE (rtnlroute)) { + /* Make sure it's an IPv6 route for this device */ + if (rtnl_route_get_oif (rtnlroute) != device->ifindex) + continue; + if (rtnl_route_get_family (rtnlroute) != AF_INET6) continue; nldest = rtnl_route_get_dst (rtnlroute); @@ -832,6 +962,22 @@ nm_ip6_manager_get_ip6_config (NMIP6Manager *manager, continue; gateway = nl_addr_get_binary_addr (nlgateway); + if (rtnl_route_get_dst_len (rtnlroute) == 0) { + /* Default gateway route; don't add to normal routes but to each address */ + if (!defgw_set) { + memcpy (&defgw, gateway, sizeof (defgw)); + defgw_set = TRUE; + } + continue; + } + + /* Also ignore link-local routes where the destination and gateway are + * the same, which apparently get added by the kernel but return -EINVAL + * when we try to add them via netlink. + */ + if (gateway && IN6_ARE_ADDR_EQUAL (dest, gateway)) + continue; + ip6route = nm_ip6_route_new (); nm_ip6_route_set_dest (ip6route, dest); nm_ip6_route_set_prefix (ip6route, rtnl_route_get_dst_len (rtnlroute)); @@ -842,6 +988,24 @@ nm_ip6_manager_get_ip6_config (NMIP6Manager *manager, nm_ip6_config_take_route (config, ip6route); } + /* Add addresses */ + for (rtnladdr = FIRST_ADDR (priv->addr_cache); rtnladdr; rtnladdr = NEXT_ADDR (rtnladdr)) { + if (rtnl_addr_get_ifindex (rtnladdr) != device->ifindex) + continue; + + nladdr = rtnl_addr_get_local (rtnladdr); + if (!nladdr || nl_addr_get_family (nladdr) != AF_INET6) + continue; + + addr = nl_addr_get_binary_addr (nladdr); + ip6addr = nm_ip6_address_new (); + nm_ip6_address_set_prefix (ip6addr, rtnl_addr_get_prefixlen (rtnladdr)); + nm_ip6_address_set_address (ip6addr, addr); + nm_ip6_config_take_address (config, ip6addr); + if (defgw_set) + nm_ip6_address_set_gateway (ip6addr, &defgw); + } + /* Add DNS servers */ if (device->rdnss_servers) { NMIP6RDNSS *rdnss = (NMIP6RDNSS *)(device->rdnss_servers->data); @@ -852,3 +1016,108 @@ nm_ip6_manager_get_ip6_config (NMIP6Manager *manager, return config; } + +/******************************************************************/ + +static NMIP6Manager * +nm_ip6_manager_new (void) +{ + NMIP6Manager *manager; + NMIP6ManagerPrivate *priv; + + manager = g_object_new (NM_TYPE_IP6_MANAGER, NULL); + priv = NM_IP6_MANAGER_GET_PRIVATE (manager); + + if (!priv->devices) { + nm_log_err (LOGD_IP6, "not enough memory to initialize IP6 manager tables"); + g_object_unref (manager); + manager = NULL; + } + + return manager; +} + +static NMIP6Manager *singleton = NULL; + +NMIP6Manager * +nm_ip6_manager_get (void) +{ + if (!singleton) { + singleton = nm_ip6_manager_new (); + g_assert (singleton); + } else + g_object_ref (singleton); + + return singleton; +} + +static void +nm_ip6_manager_init (NMIP6Manager *manager) +{ + NMIP6ManagerPrivate *priv = NM_IP6_MANAGER_GET_PRIVATE (manager); + + priv->devices = g_hash_table_new_full (g_direct_hash, g_direct_equal, + NULL, + (GDestroyNotify) nm_ip6_device_destroy); + + priv->monitor = nm_netlink_monitor_get (); + nm_netlink_monitor_subscribe (priv->monitor, RTNLGRP_IPV6_IFADDR, NULL); + nm_netlink_monitor_subscribe (priv->monitor, RTNLGRP_IPV6_PREFIX, NULL); + nm_netlink_monitor_subscribe (priv->monitor, RTNLGRP_ND_USEROPT, NULL); + nm_netlink_monitor_subscribe (priv->monitor, RTNLGRP_LINK, NULL); + + priv->netlink_id = g_signal_connect (priv->monitor, "notification", + G_CALLBACK (netlink_notification), manager); + + priv->nlh = nm_netlink_get_default_handle (); + priv->addr_cache = rtnl_addr_alloc_cache (priv->nlh); + priv->route_cache = rtnl_route_alloc_cache (priv->nlh); +} + +static void +finalize (GObject *object) +{ + NMIP6ManagerPrivate *priv = NM_IP6_MANAGER_GET_PRIVATE (object); + + g_signal_handler_disconnect (priv->monitor, priv->netlink_id); + + g_hash_table_destroy (priv->devices); + g_object_unref (priv->monitor); + nl_cache_free (priv->addr_cache); + nl_cache_free (priv->route_cache); + + singleton = NULL; + + G_OBJECT_CLASS (nm_ip6_manager_parent_class)->finalize (object); +} + +static void +nm_ip6_manager_class_init (NMIP6ManagerClass *manager_class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (manager_class); + + g_type_class_add_private (manager_class, sizeof (NMIP6ManagerPrivate)); + + /* virtual methods */ + object_class->finalize = finalize; + + /* signals */ + signals[ADDRCONF_COMPLETE] = + g_signal_new ("addrconf-complete", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (NMIP6ManagerClass, addrconf_complete), + NULL, NULL, + _nm_marshal_VOID__INT_UINT_BOOLEAN, + G_TYPE_NONE, 3, G_TYPE_INT, G_TYPE_UINT, G_TYPE_BOOLEAN); + + signals[CONFIG_CHANGED] = + g_signal_new ("config-changed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (NMIP6ManagerClass, config_changed), + NULL, NULL, + _nm_marshal_VOID__INT_UINT_BOOLEAN, + G_TYPE_NONE, 3, G_TYPE_INT, G_TYPE_UINT, G_TYPE_BOOLEAN); +} + diff --git a/src/ip6-manager/nm-ip6-manager.h b/src/ip6-manager/nm-ip6-manager.h index 33b2b9893a..77c1106841 100644 --- a/src/ip6-manager/nm-ip6-manager.h +++ b/src/ip6-manager/nm-ip6-manager.h @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009 - 2010 Red Hat, Inc. */ #ifndef NM_IP6_MANAGER_H @@ -35,6 +35,12 @@ #define NM_IS_IP6_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_IP6_MANAGER)) #define NM_IP6_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_IP6_MANAGER, NMIP6ManagerClass)) +enum { + IP6_DHCP_OPT_NONE = 0, + IP6_DHCP_OPT_OTHERCONF, + IP6_DHCP_OPT_MANAGED +}; + typedef struct { GObject parent; } NMIP6Manager; @@ -47,27 +53,34 @@ typedef struct { /* addrconf_complete is emitted only during initial configuration to indicate * that the initial configuration is complete. */ - void (*addrconf_complete) (NMIP6Manager *manager, char *iface, gboolean success); + void (*addrconf_complete) (NMIP6Manager *manager, + guint32 ifindex, + guint dhcp_opts, + gboolean success); /* config_changed gets emitted only *after* initial configuration is * complete; it's like DHCP renew and indicates that the existing config * of the interface has changed. */ - void (*config_changed) (NMIP6Manager *manager, char *iface); + void (*config_changed) (NMIP6Manager *manager, + guint32 ifindex, + guint dhcp_opts, + gboolean success); } NMIP6ManagerClass; GType nm_ip6_manager_get_type (void); -NMIP6Manager *nm_ip6_manager_get (void); -void nm_ip6_manager_prepare_interface (NMIP6Manager *manager, - const char *iface, - NMSettingIP6Config *s_ip6); -void nm_ip6_manager_begin_addrconf (NMIP6Manager *manager, - const char *iface); -void nm_ip6_manager_cancel_addrconf (NMIP6Manager *manager, - const char *iface); +NMIP6Manager *nm_ip6_manager_get (void); +void nm_ip6_manager_prepare_interface (NMIP6Manager *manager, + int ifindex, + NMSettingIP6Config *s_ip6, + const char *accept_ra_path); +void nm_ip6_manager_begin_addrconf (NMIP6Manager *manager, + int ifindex); +void nm_ip6_manager_cancel_addrconf (NMIP6Manager *manager, + int ifindex); -NMIP6Config * nm_ip6_manager_get_ip6_config (NMIP6Manager *manager, - const char *iface); +NMIP6Config * nm_ip6_manager_get_ip6_config (NMIP6Manager *manager, + int ifindex); #endif /* NM_IP6_MANAGER_H */ diff --git a/src/ip6-manager/nm-netlink-listener.c b/src/ip6-manager/nm-netlink-listener.c deleted file mode 100644 index bfcc22f630..0000000000 --- a/src/ip6-manager/nm-netlink-listener.c +++ /dev/null @@ -1,407 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* NetworkManager -- Network link manager - * - * 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Copyright (C) 2005 - 2009 Red Hat, Inc. - * Copyright (C) 2005 - 2008 Novell, Inc. - * Copyright (C) 2005 Ray Strode - * - * Some code borrowed from HAL: - * - * Copyright (C) 2003 David Zeuthen, - * Copyright (C) 2004 Novell, Inc. - */ - -/* FIXME: this should be merged with src/nm-netlink-monitor.c */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "NetworkManager.h" -#include "NetworkManagerSystem.h" -#include "nm-netlink-listener.h" -#include "nm-utils.h" -#include "nm-marshal.h" -#include "nm-netlink.h" - -#define NM_NETLINK_LISTENER_EVENT_CONDITIONS \ - ((GIOCondition) (G_IO_IN | G_IO_PRI)) - -#define NM_NETLINK_LISTENER_ERROR_CONDITIONS \ - ((GIOCondition) (G_IO_ERR | G_IO_NVAL)) - -#define NM_NETLINK_LISTENER_DISCONNECT_CONDITIONS \ - ((GIOCondition) (G_IO_HUP)) - -#define NM_NETLINK_LISTENER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \ - NM_TYPE_NETLINK_LISTENER, \ - NMNetlinkListenerPrivate)) - -typedef struct { - struct nl_handle *nlh; - struct nl_cb * nlh_cb; - struct nl_cache * nlh_link_cache; - - GIOChannel * io_channel; - guint event_id; - - guint request_status_id; -} NMNetlinkListenerPrivate; - -static gboolean nm_netlink_listener_event_handler (GIOChannel *channel, - GIOCondition io_condition, - gpointer user_data); - -static gboolean nm_netlink_listener_error_handler (GIOChannel *channel, - GIOCondition io_condition, - NMNetlinkListener *listener); - -static gboolean nm_netlink_listener_disconnect_handler (GIOChannel *channel, - GIOCondition io_condition, - NMNetlinkListener *listener); - -static void close_connection (NMNetlinkListener *listener); - -enum { - NOTIFICATION = 0, - ERROR, - - LAST_SIGNAL -}; - -static guint signals[LAST_SIGNAL] = { 0 }; - -G_DEFINE_TYPE (NMNetlinkListener, nm_netlink_listener, G_TYPE_OBJECT); - -NMNetlinkListener * -nm_netlink_listener_get (void) -{ - static NMNetlinkListener *singleton = NULL; - - if (!singleton) - singleton = NM_NETLINK_LISTENER (g_object_new (NM_TYPE_NETLINK_LISTENER, NULL)); - else - g_object_ref (singleton); - - return singleton; -} - -static void -nm_netlink_listener_init (NMNetlinkListener *listener) -{ -} - -static void -finalize (GObject *object) -{ - NMNetlinkListenerPrivate *priv = NM_NETLINK_LISTENER_GET_PRIVATE (object); - - if (priv->request_status_id) - g_source_remove (priv->request_status_id); - - if (priv->io_channel) - close_connection (NM_NETLINK_LISTENER (object)); - - if (priv->nlh) { - nl_handle_destroy (priv->nlh); - priv->nlh = NULL; - } - - if (priv->nlh_cb) { - nl_cb_put (priv->nlh_cb); - priv->nlh_cb = NULL; - } - - G_OBJECT_CLASS (nm_netlink_listener_parent_class)->finalize (object); -} - -static void -nm_netlink_listener_class_init (NMNetlinkListenerClass *listener_class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (listener_class); - - g_type_class_add_private (listener_class, sizeof (NMNetlinkListenerPrivate)); - - /* Virtual methods */ - object_class->finalize = finalize; - - /* Signals */ - signals[NOTIFICATION] = - g_signal_new ("notification", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (NMNetlinkListenerClass, notification), - NULL, NULL, g_cclosure_marshal_VOID__POINTER, - G_TYPE_NONE, 1, G_TYPE_POINTER); - - signals[ERROR] = - g_signal_new ("error", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (NMNetlinkListenerClass, error), - NULL, NULL, _nm_marshal_VOID__POINTER, - G_TYPE_NONE, 1, G_TYPE_POINTER); -} - -static int -netlink_event_input (struct nl_msg *msg, void *listener) -{ - struct nlmsghdr *hdr = nlmsg_hdr (msg); - - if (hdr->nlmsg_pid != 0) - return NL_STOP; - - g_signal_emit (listener, signals[NOTIFICATION], 0, msg); - - /* Stop processing messages */ - return NL_STOP; -} - -static gboolean -open_connection (NMNetlinkListener *listener, GError **error) -{ - NMNetlinkListenerPrivate *priv = NM_NETLINK_LISTENER_GET_PRIVATE (listener); - int fd; - GError *channel_error = NULL; - GIOFlags channel_flags; - - g_return_val_if_fail (priv->io_channel == NULL, FALSE); - - priv->nlh_cb = nl_cb_alloc (NL_CB_DEFAULT); - priv->nlh = nl_handle_alloc_cb (priv->nlh_cb); - if (!priv->nlh) { - g_set_error (error, NM_NETLINK_LISTENER_ERROR, - NM_NETLINK_LISTENER_ERROR_NETLINK_ALLOC_HANDLE, - _("unable to allocate netlink handle: %s"), - nl_geterror ()); - goto error; - } - - nl_disable_sequence_check (priv->nlh); - nl_socket_modify_cb (priv->nlh, NL_CB_VALID, NL_CB_CUSTOM, netlink_event_input, listener); - if (nl_connect (priv->nlh, NETLINK_ROUTE) < 0) { - g_set_error (error, NM_NETLINK_LISTENER_ERROR, - NM_NETLINK_LISTENER_ERROR_NETLINK_CONNECT, - _("unable to connect to netlink: %s"), - nl_geterror ()); - goto error; - } - - fd = nl_socket_get_fd (priv->nlh); - priv->io_channel = g_io_channel_unix_new (fd); - - g_io_channel_set_encoding (priv->io_channel, NULL, &channel_error); - /* Encoding is NULL, so no conversion error can possibly occur */ - g_assert (channel_error == NULL); - - g_io_channel_set_close_on_unref (priv->io_channel, TRUE); - channel_flags = g_io_channel_get_flags (priv->io_channel); - channel_error = NULL; - g_io_channel_set_flags (priv->io_channel, - channel_flags | G_IO_FLAG_NONBLOCK, - &channel_error); - if (channel_error != NULL) { - g_propagate_error (error, channel_error); - goto error; - } - - priv->event_id = g_io_add_watch (priv->io_channel, - (NM_NETLINK_LISTENER_EVENT_CONDITIONS | - NM_NETLINK_LISTENER_ERROR_CONDITIONS | - NM_NETLINK_LISTENER_DISCONNECT_CONDITIONS), - nm_netlink_listener_event_handler, - listener); - return TRUE; - -error: - if (priv->io_channel) - close_connection (listener); - - if (priv->nlh) { - nl_handle_destroy (priv->nlh); - priv->nlh = NULL; - } - - if (priv->nlh_cb) { - nl_cb_put (priv->nlh_cb); - priv->nlh_cb = NULL; - } - return FALSE; -} - -static void -close_connection (NMNetlinkListener *listener) -{ - NMNetlinkListenerPrivate *priv = NM_NETLINK_LISTENER_GET_PRIVATE (listener); - - g_return_if_fail (priv->io_channel != NULL); - - if (priv->event_id) { - g_source_remove (priv->event_id); - priv->event_id = 0; - } - - g_io_channel_shutdown (priv->io_channel, - TRUE /* flush pending data */, - NULL); - - g_io_channel_unref (priv->io_channel); - priv->io_channel = NULL; -} - -GQuark -nm_netlink_listener_error_quark (void) -{ - static GQuark error_quark = 0; - - if (error_quark == 0) - error_quark = g_quark_from_static_string ("nm-netlink-listener-error-quark"); - - return error_quark; -} - -gboolean -nm_netlink_listener_subscribe (NMNetlinkListener *listener, - int group, - GError **error) -{ - NMNetlinkListenerPrivate *priv; - - g_return_val_if_fail (NM_IS_NETLINK_LISTENER (listener), FALSE); - - priv = NM_NETLINK_LISTENER_GET_PRIVATE (listener); - - if (!priv->nlh) { - if (!open_connection (listener, error)) - return FALSE; - } - - if (nl_socket_add_membership (priv->nlh, group) < 0) { - g_set_error (error, NM_NETLINK_LISTENER_ERROR, - NM_NETLINK_LISTENER_ERROR_NETLINK_JOIN_GROUP, - _("unable to join netlink group: %s"), - nl_geterror ()); - return FALSE; - } - - return TRUE; -} - -void -nm_netlink_listener_unsubscribe (NMNetlinkListener *listener, int group) -{ - NMNetlinkListenerPrivate *priv; - - g_return_if_fail (NM_IS_NETLINK_LISTENER (listener)); - - priv = NM_NETLINK_LISTENER_GET_PRIVATE (listener); - g_return_if_fail (priv->nlh != NULL); - - nl_socket_drop_membership (priv->nlh, group); -} - -static gboolean -nm_netlink_listener_event_handler (GIOChannel *channel, - GIOCondition io_condition, - gpointer user_data) -{ - NMNetlinkListener *listener = (NMNetlinkListener *) user_data; - NMNetlinkListenerPrivate *priv; - GError *error = NULL; - - g_return_val_if_fail (NM_IS_NETLINK_LISTENER (listener), TRUE); - - priv = NM_NETLINK_LISTENER_GET_PRIVATE (listener); - g_return_val_if_fail (priv->event_id > 0, TRUE); - - if (io_condition & NM_NETLINK_LISTENER_ERROR_CONDITIONS) - return nm_netlink_listener_error_handler (channel, io_condition, listener); - else if (io_condition & NM_NETLINK_LISTENER_DISCONNECT_CONDITIONS) - return nm_netlink_listener_disconnect_handler (channel, io_condition, listener); - - g_return_val_if_fail (!(io_condition & ~(NM_NETLINK_LISTENER_EVENT_CONDITIONS)), FALSE); - - if (nl_recvmsgs_default (priv->nlh) < 0) { - error = g_error_new (NM_NETLINK_LISTENER_ERROR, - NM_NETLINK_LISTENER_ERROR_PROCESSING_MESSAGE, - _("error processing netlink message: %s"), - nl_geterror ()); - - g_signal_emit (G_OBJECT (listener), - signals[ERROR], - 0, error); - g_error_free (error); - } - - return TRUE; -} - -static gboolean -nm_netlink_listener_error_handler (GIOChannel *channel, - GIOCondition io_condition, - NMNetlinkListener *listener) -{ - GError *socket_error; - const char *err_msg; - int err_code; - socklen_t err_len; - - g_return_val_if_fail (io_condition & NM_NETLINK_LISTENER_ERROR_CONDITIONS, FALSE); - - err_code = 0; - err_len = sizeof (err_code); - if (getsockopt (g_io_channel_unix_get_fd (channel), - SOL_SOCKET, SO_ERROR, (void *) &err_code, &err_len)) - err_msg = strerror (err_code); - else - err_msg = _("error occurred while waiting for data on socket"); - - socket_error = g_error_new (NM_NETLINK_LISTENER_ERROR, - NM_NETLINK_LISTENER_ERROR_WAITING_FOR_SOCKET_DATA, - "%s", - err_msg); - - g_signal_emit (G_OBJECT (listener), - signals[ERROR], - 0, socket_error); - - g_error_free (socket_error); - - return TRUE; -} - -static gboolean -nm_netlink_listener_disconnect_handler (GIOChannel *channel, - GIOCondition io_condition, - NMNetlinkListener *listener) -{ - - g_return_val_if_fail (!(io_condition & ~(NM_NETLINK_LISTENER_DISCONNECT_CONDITIONS)), FALSE); - return FALSE; -} - diff --git a/src/ip6-manager/nm-netlink-listener.h b/src/ip6-manager/nm-netlink-listener.h deleted file mode 100644 index 0baabac004..0000000000 --- a/src/ip6-manager/nm-netlink-listener.h +++ /dev/null @@ -1,78 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* NetworkManager -- Netlink socket listener - * - * 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Copyright (C) 2005 - 2009 Red Hat, Inc. - * Copyright (C) 2005 - 2008 Novell, Inc. - * Copyright (C) 2005 Ray Strode - */ - -#ifndef NM_NETLINK_LISTENER_H -#define NM_NETLINK_LISTENER_H - -#include -#include - -#include "nm-netlink.h" - -G_BEGIN_DECLS - -#define NM_TYPE_NETLINK_LISTENER (nm_netlink_listener_get_type ()) -#define NM_NETLINK_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_NETLINK_LISTENER, NMNetlinkListener)) -#define NM_NETLINK_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_NETLINK_LISTENER, NMNetlinkListenerClass)) -#define NM_IS_NETLINK_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_NETLINK_LISTENER)) -#define NM_IS_NETLINK_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_NETLINK_LISTENER)) -#define NM_NETLINK_LISTENER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_NETLINK_LISTENER, NMNetlinkListenerClass)) -#define NM_NETLINK_LISTENER_ERROR (nm_netlink_listener_error_quark ()) - -typedef enum { - NM_NETLINK_LISTENER_ERROR_GENERIC = 0, - NM_NETLINK_LISTENER_ERROR_NETLINK_ALLOC_HANDLE, - NM_NETLINK_LISTENER_ERROR_NETLINK_CONNECT, - NM_NETLINK_LISTENER_ERROR_NETLINK_JOIN_GROUP, - NM_NETLINK_LISTENER_ERROR_NETLINK_ALLOC_LINK_CACHE, - NM_NETLINK_LISTENER_ERROR_PROCESSING_MESSAGE, - NM_NETLINK_LISTENER_ERROR_BAD_ALLOC, - NM_NETLINK_LISTENER_ERROR_WAITING_FOR_SOCKET_DATA, - NM_NETLINK_LISTENER_ERROR_LINK_CACHE_UPDATE -} NMNetlinkListenerError; - -typedef struct { - GObject parent; -} NMNetlinkListener; - -typedef struct { - GObjectClass parent_class; - - /* Signals */ - void (*notification) (NMNetlinkListener *listener, struct nl_msg *msg); - void (*error) (NMNetlinkListener *listener, GError *error); -} NMNetlinkListenerClass; - -GType nm_netlink_listener_get_type (void) G_GNUC_CONST; -GQuark nm_netlink_listener_error_quark (void) G_GNUC_CONST; - -NMNetlinkListener *nm_netlink_listener_get (void); - -gboolean nm_netlink_listener_subscribe (NMNetlinkListener *listener, - int group, - GError **error); -void nm_netlink_listener_unsubscribe (NMNetlinkListener *listener, - int group); - -G_END_DECLS - -#endif /* NM_NETLINK_LISTENER_H */ diff --git a/src/logging/Makefile.am b/src/logging/Makefile.am new file mode 100644 index 0000000000..51a6b25dc0 --- /dev/null +++ b/src/logging/Makefile.am @@ -0,0 +1,15 @@ +noinst_LTLIBRARIES = libnm-logging.la + +libnm_logging_la_SOURCES = \ + nm-logging.c \ + nm-logging.h + +libnm_logging_la_CPPFLAGS = \ + $(GLIB_CFLAGS) \ + -DLIBEXECDIR=\"$(libexecdir)\" \ + -DG_DISABLE_DEPRECATED + +libnm_logging_la_LIBADD = \ + -ldl \ + $(GLIB_LIBS) + diff --git a/src/logging/nm-logging.c b/src/logging/nm-logging.c new file mode 100644 index 0000000000..9d1905da08 --- /dev/null +++ b/src/logging/nm-logging.c @@ -0,0 +1,377 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager -- Network link manager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2006 - 2010 Red Hat, Inc. + * Copyright (C) 2006 - 2008 Novell, Inc. + */ + +#define _GNU_SOURCE +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "nm-logging.h" + +static guint32 log_level = LOGL_INFO | LOGL_WARN | LOGL_ERR; +static guint32 log_domains = \ + LOGD_HW | LOGD_RFKILL | LOGD_ETHER | LOGD_WIFI | LOGD_BT | LOGD_MB | \ + LOGD_DHCP4 | LOGD_DHCP6 | LOGD_PPP | LOGD_IP4 | LOGD_IP6 | LOGD_AUTOIP4 | \ + LOGD_DNS | LOGD_VPN | LOGD_SHARING | LOGD_SUPPLICANT | LOGD_USER_SET | \ + LOGD_SYS_SET | LOGD_SUSPEND | LOGD_CORE | LOGD_DEVICE | LOGD_OLPC_MESH; + +typedef struct { + guint32 num; + const char *name; +} LogDesc; + +static const LogDesc level_descs[] = { + { LOGL_ERR, "ERR" }, + { LOGL_WARN | LOGL_ERR, "WARN" }, + { LOGL_INFO | LOGL_WARN | LOGL_ERR, "INFO" }, + { LOGL_DEBUG | LOGL_INFO | LOGL_WARN | LOGL_ERR, "DEBUG" }, + { 0, NULL } +}; + +static const LogDesc domain_descs[] = { + { LOGD_NONE, "NONE" }, + { LOGD_HW, "HW" }, + { LOGD_RFKILL, "RFKILL" }, + { LOGD_ETHER, "ETHER" }, + { LOGD_WIFI, "WIFI" }, + { LOGD_BT, "BT" }, + { LOGD_MB, "MB" }, + { LOGD_DHCP4, "DHCP4" }, + { LOGD_DHCP6, "DHCP6" }, + { LOGD_PPP, "PPP" }, + { LOGD_WIFI_SCAN, "WIFI_SCAN" }, + { LOGD_IP4, "IP4" }, + { LOGD_IP6, "IP6" }, + { LOGD_AUTOIP4, "AUTOIP4" }, + { LOGD_DNS, "DNS" }, + { LOGD_VPN, "VPN" }, + { LOGD_SHARING, "SHARING" }, + { LOGD_SUPPLICANT,"SUPPLICANT" }, + { LOGD_USER_SET, "USER_SET" }, + { LOGD_SYS_SET, "SYS_SET" }, + { LOGD_SUSPEND, "SUSPEND" }, + { LOGD_CORE, "CORE" }, + { LOGD_DEVICE, "DEVICE" }, + { LOGD_OLPC_MESH, "OLPC" }, + { 0, NULL } +}; + +/************************************************************************/ + +enum { + NM_LOGGING_ERROR_UNKNOWN_LEVEL = 0, + NM_LOGGING_ERROR_UNKNOWN_DOMAIN = 1, +}; + +#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC } + +GQuark +nm_logging_error_quark (void) +{ + static GQuark ret = 0; + + if (ret == 0) + ret = g_quark_from_static_string ("nm_logging_error"); + return ret; +} + +GType +nm_logging_error_get_type (void) +{ + static GType etype = 0; + + if (etype == 0) { + static const GEnumValue values[] = { + ENUM_ENTRY (NM_LOGGING_ERROR_UNKNOWN_LEVEL, "UnknownLevel"), + ENUM_ENTRY (NM_LOGGING_ERROR_UNKNOWN_DOMAIN, "UnknownDomain"), + { 0, 0, 0 } + }; + etype = g_enum_register_static ("NMLoggingError", values); + } + return etype; +} + +/************************************************************************/ + +gboolean +nm_logging_setup (const char *level, const char *domains, GError **error) +{ + char **tmp, **iter; + guint32 new_domains = 0; + + /* levels */ + if (level && strlen (level)) { + gboolean found = FALSE; + const LogDesc *diter; + + for (diter = &level_descs[0]; diter->name; diter++) { + if (!strcasecmp (diter->name, level)) { + log_level = diter->num; + found = TRUE; + break; + } + } + + if (!found) { + g_set_error (error, NM_LOGGING_ERROR, NM_LOGGING_ERROR_UNKNOWN_LEVEL, + _("Unknown log level '%s'"), level); + return FALSE; + } + } + + /* domains */ + if (domains && strlen (domains)) { + tmp = g_strsplit_set (domains, ", ", 0); + for (iter = tmp; iter && *iter; iter++) { + const LogDesc *diter; + gboolean found = FALSE; + + if (!strlen (*iter)) + continue; + + for (diter = &domain_descs[0]; diter->name; diter++) { + if (!strcasecmp (diter->name, *iter)) { + new_domains |= diter->num; + found = TRUE; + break; + } + } + + if (!found) { + g_set_error (error, NM_LOGGING_ERROR, NM_LOGGING_ERROR_UNKNOWN_DOMAIN, + _("Unknown log domain '%s'"), *iter); + return FALSE; + } + } + g_strfreev (tmp); + log_domains = new_domains; + } + + return TRUE; +} + +const char * +nm_logging_level_to_string (void) +{ + const LogDesc *diter; + + for (diter = &level_descs[0]; diter->name; diter++) { + if (diter->num == log_level) + return diter->name; + } + g_warn_if_reached (); + return ""; +} + +char * +nm_logging_domains_to_string (void) +{ + const LogDesc *diter; + GString *str; + + str = g_string_sized_new (75); + for (diter = &domain_descs[0]; diter->name; diter++) { + if (diter->num & log_domains) { + if (str->len) + g_string_append_c (str, ','); + g_string_append (str, diter->name); + } + } + return g_string_free (str, FALSE); +} + +void _nm_log (const char *loc, + const char *func, + guint32 domain, + guint32 level, + const char *fmt, + ...) +{ + va_list args; + char *msg; + GTimeVal tv; + + if (!(log_level & level) || !(log_domains & domain)) + return; + + va_start (args, fmt); + msg = g_strdup_vprintf (fmt, args); + va_end (args); + + if ((log_level & LOGL_DEBUG) && (level == LOGL_DEBUG)) { + g_get_current_time (&tv); + syslog (LOG_INFO, " [%ld.%ld] [%s] %s(): %s\n", tv.tv_sec, tv.tv_usec, loc, func, msg); + } else if ((log_level & LOGL_INFO) && (level == LOGL_INFO)) + syslog (LOG_INFO, " %s\n", msg); + else if ((log_level & LOGL_WARN) && (level == LOGL_WARN)) + syslog (LOG_WARNING, " %s\n", msg); + else if ((log_level & LOGL_ERR) && (level == LOGL_ERR)) { + g_get_current_time (&tv); + syslog (LOG_ERR, " [%ld.%ld] [%s] %s(): %s\n", tv.tv_sec, tv.tv_usec, loc, func, msg); + } + g_free (msg); +} + +/************************************************************************/ + +static void +fallback_get_backtrace (void) +{ + void *frames[64]; + Dl_info info; + size_t size; + guint32 i; + const char *name; + + size = backtrace (frames, G_N_ELEMENTS (frames)); + + syslog (LOG_CRIT, "******************* START **********************************"); + for (i = 0; i < size; i++) { + dladdr (frames[i], &info); + name = (info.dli_fname && *info.dli_fname) ? info.dli_fname : "(vdso)"; + if (info.dli_saddr) { + syslog (LOG_CRIT, "Frame %d: %s (%s+0x%lx) [%p]", + i, name, + info.dli_sname, + (gulong)(frames[i] - info.dli_saddr), + frames[i]); + } else { + syslog (LOG_CRIT, "Frame %d: %s (%p+0x%lx) [%p]", + i, name, + info.dli_fbase, + (gulong)(frames[i] - info.dli_saddr), + frames[i]); + } + } + syslog (LOG_CRIT, "******************* END **********************************"); +} + + +static gboolean +crashlogger_get_backtrace (void) +{ + gboolean success = FALSE; + int pid; + + pid = fork(); + if (pid > 0) + { + /* Wait for the child to finish */ + int estatus; + if (waitpid (pid, &estatus, 0) != -1) + { + /* Only succeed if the crashlogger succeeded */ + if (WIFEXITED (estatus) && (WEXITSTATUS (estatus) == 0)) + success = TRUE; + } + } + else if (pid == 0) + { + /* Child process */ + execl (LIBEXECDIR"/nm-crash-logger", + LIBEXECDIR"/nm-crash-logger", NULL); + } + + return success; +} + + +void +nm_logging_backtrace (void) +{ + struct stat s; + gboolean fallback = TRUE; + + /* Try to use gdb via nm-crash-logger if it exists, since + * we get much better information out of it. Otherwise + * fall back to execinfo. + */ + if (stat (LIBEXECDIR"/nm-crash-logger", &s) == 0) + fallback = crashlogger_get_backtrace () ? FALSE : TRUE; + + if (fallback) + fallback_get_backtrace (); +} + + +static void +nm_log_handler (const gchar *log_domain, + GLogLevelFlags level, + const gchar *message, + gpointer ignored) +{ + int syslog_priority; + + switch (level) { + case G_LOG_LEVEL_ERROR: + syslog_priority = LOG_CRIT; + break; + case G_LOG_LEVEL_CRITICAL: + syslog_priority = LOG_ERR; + break; + case G_LOG_LEVEL_WARNING: + syslog_priority = LOG_WARNING; + break; + case G_LOG_LEVEL_MESSAGE: + syslog_priority = LOG_NOTICE; + break; + case G_LOG_LEVEL_DEBUG: + syslog_priority = LOG_DEBUG; + break; + case G_LOG_LEVEL_INFO: + default: + syslog_priority = LOG_INFO; + break; + } + + syslog (syslog_priority, "%s", message); +} + +void +nm_logging_start (gboolean become_daemon) +{ + if (become_daemon) + openlog (G_LOG_DOMAIN, LOG_PID, LOG_DAEMON); + else + openlog (G_LOG_DOMAIN, LOG_CONS | LOG_PERROR | LOG_PID, LOG_USER); + + g_log_set_handler (G_LOG_DOMAIN, + G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION, + nm_log_handler, + NULL); +} + +void +nm_logging_shutdown (void) +{ + closelog (); +} diff --git a/src/logging/nm-logging.h b/src/logging/nm-logging.h new file mode 100644 index 0000000000..2eedf5ff14 --- /dev/null +++ b/src/logging/nm-logging.h @@ -0,0 +1,111 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager -- Network link manager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2006 - 2010 Red Hat, Inc. + * Copyright (C) 2006 - 2008 Novell, Inc. + */ + +#ifndef NM_LOGGING_H +#define NM_LOGGING_H + +#include +#include + +/* Log domains */ +enum { + LOGD_NONE = 0x00000000, + LOGD_HW = 0x00000001, /* Hardware detection and info */ + LOGD_RFKILL = 0x00000002, + LOGD_ETHER = 0x00000004, + LOGD_WIFI = 0x00000008, + LOGD_BT = 0x00000010, + LOGD_MB = 0x00000020, /* mobile broadband */ + LOGD_DHCP4 = 0x00000040, + LOGD_DHCP6 = 0x00000080, + LOGD_PPP = 0x00000100, + LOGD_WIFI_SCAN = 0x00000200, + LOGD_IP4 = 0x00000400, + LOGD_IP6 = 0x00000800, + LOGD_AUTOIP4 = 0x00001000, + LOGD_DNS = 0x00002000, + LOGD_VPN = 0x00004000, + LOGD_SHARING = 0x00008000, /* Connection sharing/dnsmasq */ + LOGD_SUPPLICANT = 0x00010000, /* WiFi and 802.1x */ + LOGD_USER_SET = 0x00020000, /* User settings */ + LOGD_SYS_SET = 0x00040000, /* System settings */ + LOGD_SUSPEND = 0x00080000, /* Suspend/Resume */ + LOGD_CORE = 0x00100000, /* Core daemon and policy stuff */ + LOGD_DEVICE = 0x00200000, /* Device state and activation */ + LOGD_OLPC_MESH = 0x00400000, +}; + +#define LOGD_DHCP (LOGD_DHCP4 | LOGD_DHCP6) + +/* Log levels */ +enum { + LOGL_ERR = 0x00000001, + LOGL_WARN = 0x00000002, + LOGL_INFO = 0x00000004, + LOGL_DEBUG = 0x00000008 +}; + +#define NM_LOGGING_ERROR (nm_logging_error_quark ()) +#define NM_TYPE_LOGGING_ERROR (nm_logging_error_get_type ()) +GQuark nm_logging_error_quark (void); +GType nm_logging_error_get_type (void); + + +#define nm_log_err(domain, fmt, args...) \ + { _nm_log (G_STRLOC, G_STRFUNC, domain, LOGL_ERR, fmt, ##args); } + +#define nm_log_warn(domain, fmt, args...) \ + { _nm_log (G_STRLOC, G_STRFUNC, domain, LOGL_WARN, fmt, ##args); } + +#define nm_log_info(domain, fmt, args...) \ + { _nm_log (G_STRLOC, G_STRFUNC, domain, LOGL_INFO, fmt, ##args); } + +#define nm_log_dbg(domain, fmt, args...) \ + { _nm_log (G_STRLOC, G_STRFUNC, domain, LOGL_DEBUG, fmt, ##args); } + +#define nm_log(domain, level, fmt, args...) \ + { _nm_log (G_STRLOC, G_STRFUNC, domain, level, fmt, ##args); } + +void _nm_log (const char *loc, const char *func, + guint32 domain, guint32 level, + const char *fmt, ...); + +const char *nm_logging_level_to_string (void); +char *nm_logging_domains_to_string (void); + +/* Undefine the nm-utils.h logging stuff to ensure errors */ +#undef nm_print_backtrace +#undef nm_get_timestamp +#undef nm_info +#undef nm_info_str +#undef nm_debug +#undef nm_debug_str +#undef nm_warning +#undef nm_warning_str +#undef nm_error +#undef nm_error_str + +gboolean nm_logging_setup (const char *level, const char *domains, GError **error); +void nm_logging_start (gboolean become_daemon); +void nm_logging_backtrace (void); +void nm_logging_shutdown (void); + +#endif /* NM_LOGGING_H */ diff --git a/src/NetworkManager.c b/src/main.c similarity index 69% rename from src/NetworkManager.c rename to src/main.c index e815745ca2..ff7805636a 100644 --- a/src/NetworkManager.c +++ b/src/main.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2004 - 2008 Red Hat, Inc. + * Copyright (C) 2004 - 2010 Red Hat, Inc. * Copyright (C) 2005 - 2008 Novell, Inc. */ @@ -40,11 +40,10 @@ #include #include "NetworkManager.h" -#include "nm-utils.h" #include "NetworkManagerUtils.h" #include "nm-manager.h" -#include "NetworkManagerPolicy.h" -#include "NetworkManagerSystem.h" +#include "nm-policy.h" +#include "nm-system.h" #include "nm-named-manager.h" #include "nm-dbus-manager.h" #include "nm-supplicant-manager.h" @@ -54,9 +53,14 @@ #include "nm-vpn-manager.h" #include "nm-logging.h" -#define NM_DEFAULT_PID_FILE LOCALSTATEDIR"/run/NetworkManager.pid" -#define NM_DEFAULT_SYSTEM_CONF_FILE SYSCONFDIR"/NetworkManager/nm-system-settings.conf" -#define NM_DEFAULT_SYSTEM_STATE_FILE LOCALSTATEDIR"/lib/NetworkManager/NetworkManager.state" +#if !defined(NM_DIST_VERSION) +# define NM_DIST_VERSION VERSION +#endif + +#define NM_DEFAULT_PID_FILE LOCALSTATEDIR"/run/NetworkManager.pid" +#define NM_DEFAULT_SYSTEM_CONF_FILE SYSCONFDIR"/NetworkManager/NetworkManager.conf" +#define NM_OLD_SYSTEM_CONF_FILE SYSCONFDIR"/NetworkManager/nm-system-settings.conf" +#define NM_DEFAULT_SYSTEM_STATE_FILE LOCALSTATEDIR"/lib/NetworkManager/NetworkManager.state" /* * Globals @@ -74,7 +78,7 @@ typedef struct { static gboolean detach_monitor (gpointer data) { - nm_info ("Detaching netlink event monitor"); + nm_log_warn (LOGD_HW, "detaching netlink event monitor"); nm_netlink_monitor_detach (NM_NETLINK_MONITOR (data)); return FALSE; } @@ -89,10 +93,11 @@ nm_error_monitoring_device_link_state (NMNetlinkMonitor *monitor, now = time (NULL); - if (info->domain != error->domain || info->code != error->code || (info->time && now > info->time + 10)) { + if ( (info->domain != error->domain) + || (info->code != error->code) + || (info->time && now > info->time + 10)) { /* FIXME: Try to handle the error instead of just printing it. */ - nm_warning ("error monitoring device for netlink events: %s\n", - error->message); + nm_log_warn (LOGD_HW, "error monitoring device for netlink events: %s\n", error->message); info->time = now; info->domain = error->domain; @@ -105,26 +110,20 @@ nm_error_monitoring_device_link_state (NMNetlinkMonitor *monitor, /* Broken drivers will sometimes cause a flood of netlink errors. * rh #459205, novell #443429, lp #284507 */ - nm_warning ("Excessive netlink errors ocurred, disabling netlink monitor."); - nm_warning ("Link change events will not be processed."); + nm_log_warn (LOGD_HW, "excessive netlink errors ocurred, disabling netlink monitor."); + nm_log_warn (LOGD_HW, "link change events will not be processed."); g_idle_add_full (G_PRIORITY_HIGH, detach_monitor, monitor, NULL); } } static gboolean -nm_monitor_setup (void) +nm_monitor_setup (GError **error) { - GError *error = NULL; NMNetlinkMonitor *monitor; MonitorInfo *info; monitor = nm_netlink_monitor_get (); - nm_netlink_monitor_open_connection (monitor, &error); - if (error != NULL) - { - nm_warning ("could not monitor wired ethernet devices: %s", - error->message); - g_error_free (error); + if (!nm_netlink_monitor_open_connection (monitor, error)) { g_object_unref (monitor); return FALSE; } @@ -135,7 +134,6 @@ nm_monitor_setup (void) info, (GClosureNotify) g_free, 0); - nm_netlink_monitor_attach (monitor); /* Request initial status of cards */ @@ -162,7 +160,7 @@ nm_signal_handler (int signo) case SIGBUS: case SIGILL: case SIGABRT: - nm_warning ("Caught signal %d. Generating backtrace...", signo); + nm_log_warn (LOGD_CORE, "caught signal %d. Generating backtrace...", signo); nm_logging_backtrace (); exit (1); break; @@ -172,7 +170,7 @@ nm_signal_handler (int signo) /* let the fatal signals interrupt us */ --in_fatal; - nm_warning ("Caught signal %d, shutting down abnormally. Generating backtrace...", signo); + nm_log_warn (LOGD_CORE, "caught signal %d, shutting down abnormally. Generating backtrace...", signo); nm_logging_backtrace (); g_main_loop_quit (main_loop); break; @@ -182,7 +180,7 @@ nm_signal_handler (int signo) /* let the fatal signals interrupt us */ --in_fatal; - nm_warning ("Caught signal %d, shutting down normally.", signo); + nm_log_info (LOGD_CORE, "caught signal %d, shutting down normally.", signo); quit_early = TRUE; g_main_loop_quit (main_loop); break; @@ -236,18 +234,18 @@ write_pidfile (const char *pidfile) gboolean success = FALSE; if ((fd = open (pidfile, O_CREAT|O_WRONLY|O_TRUNC, 00644)) < 0) { - nm_warning ("Opening %s failed: %s", pidfile, strerror (errno)); + fprintf (stderr, "Opening %s failed: %s\n", pidfile, strerror (errno)); return FALSE; } snprintf (pid, sizeof (pid), "%d", getpid ()); if (write (fd, pid, strlen (pid)) < 0) - nm_warning ("Writing to %s failed: %s", pidfile, strerror (errno)); + fprintf (stderr, "Writing to %s failed: %s\n", pidfile, strerror (errno)); else success = TRUE; if (close (fd)) - nm_warning ("Closing %s failed: %s", pidfile, strerror (errno)); + fprintf (stderr, "Closing %s failed: %s\n", pidfile, strerror (errno)); return success; } @@ -290,7 +288,7 @@ check_pidfile (const char *pidfile) if (strcmp (process_name, "NetworkManager") == 0) { /* Check that the process exists */ if (kill (pid, 0) == 0) { - g_warning ("NetworkManager is already running (pid %ld)", pid); + fprintf (stderr, "NetworkManager is already running (pid %ld)\n", pid); nm_running = TRUE; } } @@ -302,7 +300,12 @@ done: } static gboolean -parse_config_file (const char *filename, char **plugins, GError **error) +parse_config_file (const char *filename, + char **plugins, + char **dhcp_client, + char **log_level, + char **log_domains, + GError **error) { GKeyFile *config; @@ -321,6 +324,11 @@ parse_config_file (const char *filename, char **plugins, GError **error) if (*error) return FALSE; + *dhcp_client = g_key_file_get_value (config, "main", "dhcp", NULL); + + *log_level = g_key_file_get_value (config, "logging", "level", NULL); + *log_domains = g_key_file_get_value (config, "logging", "domains", NULL); + g_key_file_free (config); return TRUE; } @@ -445,9 +453,9 @@ main (int argc, char *argv[]) GOptionContext *opt_ctx = NULL; gboolean become_daemon = FALSE; gboolean g_fatal_warnings = FALSE; - char *pidfile = NULL, *user_pidfile = NULL; - char *config = NULL, *plugins = NULL; - char *state_file = NM_DEFAULT_SYSTEM_STATE_FILE; + char *pidfile = NULL, *state_file = NULL, *dhcp = NULL; + char *config = NULL, *plugins = NULL, *conf_plugins = NULL; + char *log_level = NULL, *log_domains = NULL; gboolean wifi_enabled = TRUE, net_enabled = TRUE, wwan_enabled = TRUE, wimax_enabled = TRUE; gboolean success; NMPolicy *policy = NULL; @@ -458,24 +466,29 @@ main (int argc, char *argv[]) NMDHCPManager *dhcp_mgr = NULL; GError *error = NULL; gboolean wrote_pidfile = FALSE; + char *cfg_log_level = NULL, *cfg_log_domains = NULL; GOptionEntry options[] = { { "no-daemon", 0, 0, G_OPTION_ARG_NONE, &become_daemon, "Don't become a daemon", NULL }, { "g-fatal-warnings", 0, 0, G_OPTION_ARG_NONE, &g_fatal_warnings, "Make all warnings fatal", NULL }, - { "pid-file", 0, 0, G_OPTION_ARG_FILENAME, &user_pidfile, "Specify the location of a PID file", "filename" }, + { "pid-file", 0, 0, G_OPTION_ARG_FILENAME, &pidfile, "Specify the location of a PID file", "filename" }, { "state-file", 0, 0, G_OPTION_ARG_FILENAME, &state_file, "State file location", "/path/to/state.file" }, { "config", 0, 0, G_OPTION_ARG_FILENAME, &config, "Config file location", "/path/to/config.file" }, - { "plugins", 0, 0, G_OPTION_ARG_STRING, &plugins, "List of plugins separated by ,", "plugin1,plugin2" }, + { "plugins", 0, 0, G_OPTION_ARG_STRING, &plugins, "List of plugins separated by ','", "plugin1,plugin2" }, + { "log-level", 0, 0, G_OPTION_ARG_STRING, &log_level, "Log level: one of [ERR, WARN, INFO, DEBUG]", "INFO" }, + { "log-domains", 0, 0, G_OPTION_ARG_STRING, &log_domains, + "Log domains separated by ',': any combination of [NONE,HW,RKILL,ETHER,WIFI,BT,MB,DHCP4,DHCP6,PPP,WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,SHARING,SUPPLICANT,USER_SET,SYS_SET,SUSPEND,CORE,DEVICE,OLPC]", + "HW,RFKILL,WIFI" }, {NULL} }; if (getuid () != 0) { - g_printerr ("You must be root to run NetworkManager!\n"); + fprintf (stderr, "You must be root to run NetworkManager!\n"); exit (1); } if (!g_module_supported ()) { - g_printerr ("GModules are not supported on your platform!"); + fprintf (stderr, "GModules are not supported on your platform!\n"); exit (1); } @@ -501,7 +514,14 @@ main (int argc, char *argv[]) exit (1); } - pidfile = g_strdup (user_pidfile ? user_pidfile : NM_DEFAULT_PID_FILE); + /* Make GIO ignore the remote VFS service; otherwise it tries to use the + * session bus to contact the remote service, and NM shouldn't ever be + * talking on the session bus. See rh #588745 + */ + setenv ("GIO_USE_VFS", "local", 1); + + pidfile = pidfile ? pidfile : g_strdup (NM_DEFAULT_PID_FILE); + state_file = state_file ? state_file : g_strdup (NM_DEFAULT_SYSTEM_STATE_FILE); /* check pid file */ if (check_pidfile (pidfile)) @@ -509,35 +529,71 @@ main (int argc, char *argv[]) /* Parse the config file */ if (config) { - if (!parse_config_file (config, &plugins, &error)) { - g_warning ("Config file %s invalid: (%d) %s.", - config, - error ? error->code : -1, - (error && error->message) ? error->message : "unknown"); + if (!parse_config_file (config, &conf_plugins, &dhcp, &cfg_log_level, &cfg_log_domains, &error)) { + fprintf (stderr, "Config file %s invalid: (%d) %s\n", + config, + error ? error->code : -1, + (error && error->message) ? error->message : "unknown"); exit (1); } } else { - config = NM_DEFAULT_SYSTEM_CONF_FILE; - if (!parse_config_file (config, &plugins, &error)) { - g_warning ("Default config file %s invalid: (%d) %s.", - config, - error ? error->code : -1, - (error && error->message) ? error->message : "unknown"); - config = NULL; - /* Not a hard failure */ + gboolean parsed = FALSE; + + /* Try NetworkManager.conf first */ + if (g_file_test (NM_DEFAULT_SYSTEM_CONF_FILE, G_FILE_TEST_EXISTS)) { + config = g_strdup (NM_DEFAULT_SYSTEM_CONF_FILE); + parsed = parse_config_file (config, &conf_plugins, &dhcp, &cfg_log_level, &cfg_log_domains, &error); + if (!parsed) { + fprintf (stderr, "Default config file %s invalid: (%d) %s\n", + config, + error ? error->code : -1, + (error && error->message) ? error->message : "unknown"); + g_free (config); + config = NULL; + g_clear_error (&error); + /* Not a hard failure */ + } + } + + /* Try old nm-system-settings.conf next */ + if (!parsed) { + config = g_strdup (NM_OLD_SYSTEM_CONF_FILE); + if (!parse_config_file (config, &conf_plugins, &dhcp, &cfg_log_level, &cfg_log_domains, &error)) { + fprintf (stderr, "Default config file %s invalid: (%d) %s\n", + config, + error ? error->code : -1, + (error && error->message) ? error->message : "unknown"); + g_free (config); + config = NULL; + g_clear_error (&error); + /* Not a hard failure */ + } } } - g_clear_error (&error); + /* Logging setup */ + if (!nm_logging_setup (log_level ? log_level : cfg_log_level, + log_domains ? log_domains : cfg_log_domains, + &error)) { + fprintf (stderr, + _("%s. Please use --help to see a list of valid options.\n"), + error->message); + exit (1); + } + + /* Plugins specified with '--plugins' override those of config file */ + plugins = plugins ? plugins : g_strdup (conf_plugins); + g_free (conf_plugins); /* Parse the state file */ if (!parse_state_file (state_file, &net_enabled, &wifi_enabled, &wwan_enabled, &wimax_enabled, &error)) { - g_warning ("State file %s parsing failed: (%d) %s.", - state_file, - error ? error->code : -1, - (error && error->message) ? error->message : "unknown"); + fprintf (stderr, "State file %s parsing failed: (%d) %s\n", + state_file, + error ? error->code : -1, + (error && error->message) ? error->message : "unknown"); /* Not a hard failure */ } + g_clear_error (&error); /* Tricky: become_daemon is FALSE by default, so unless it's TRUE because * of a CLI option, it'll become TRUE after this @@ -548,9 +604,9 @@ main (int argc, char *argv[]) int saved_errno; saved_errno = errno; - nm_error ("Could not daemonize: %s [error %u]", - g_strerror (saved_errno), - saved_errno); + fprintf (stderr, "Could not daemonize: %s [error %u]\n", + g_strerror (saved_errno), + saved_errno); exit (1); } if (write_pidfile (pidfile)) @@ -579,29 +635,32 @@ main (int argc, char *argv[]) setup_signals (); - nm_logging_setup (become_daemon); + nm_logging_start (become_daemon); - nm_info ("starting..."); + nm_log_info (LOGD_CORE, "NetworkManager (version " NM_DIST_VERSION ") is starting..."); success = FALSE; main_loop = g_main_loop_new (NULL, FALSE); /* Create watch functions that monitor cards for link status. */ - if (!nm_monitor_setup ()) + if (!nm_monitor_setup (&error)) { + nm_log_err (LOGD_CORE, "failed to start monitoring devices: %s.", + error && error->message ? error->message : "(unknown)"); goto done; + } /* Initialize our DBus service & connection */ dbus_mgr = nm_dbus_manager_get (); vpn_manager = nm_vpn_manager_get (); if (!vpn_manager) { - nm_warning ("Failed to start the VPN manager."); + nm_log_err (LOGD_CORE, "failed to start the VPN manager."); goto done; } named_mgr = nm_named_manager_get (); if (!named_mgr) { - nm_warning ("Failed to start the named manager."); + nm_log_err (LOGD_CORE, "failed to start the named manager."); goto done; } @@ -614,27 +673,28 @@ main (int argc, char *argv[]) wimax_enabled, &error); if (manager == NULL) { - nm_error ("Failed to initialize the network manager: %s", + nm_log_err (LOGD_CORE, "failed to initialize the network manager: %s", error && error->message ? error->message : "(unknown)"); goto done; } policy = nm_policy_new (manager, vpn_manager); if (policy == NULL) { - nm_error ("Failed to initialize the policy."); + nm_log_err (LOGD_CORE, "failed to initialize the policy."); goto done; } /* Initialize the supplicant manager */ sup_mgr = nm_supplicant_manager_get (); if (!sup_mgr) { - nm_error ("Failed to initialize the supplicant manager."); + nm_log_err (LOGD_CORE, "failed to initialize the supplicant manager."); goto done; } - dhcp_mgr = nm_dhcp_manager_get (); + /* Initialize DHCP manager */ + dhcp_mgr = nm_dhcp_manager_new (dhcp, &error); if (!dhcp_mgr) { - nm_warning ("Failed to start the DHCP manager."); + nm_log_err (LOGD_CORE, "failed to start the DHCP manager: %s.", error->message); goto done; } @@ -642,7 +702,7 @@ main (int argc, char *argv[]) /* Start our DBus service */ if (!nm_dbus_manager_start_service (dbus_mgr)) { - nm_warning ("Failed to start the dbus service."); + nm_log_err (LOGD_CORE, "failed to start the dbus service."); goto done; } @@ -685,8 +745,18 @@ done: if (pidfile && wrote_pidfile) unlink (pidfile); - g_free (pidfile); - nm_info ("exiting (%s)", success ? "success" : "error"); + /* Free options */ + g_free (pidfile); + g_free (state_file); + g_free (config); + g_free (plugins); + g_free (dhcp); + g_free (log_level); + g_free (log_domains); + g_free (cfg_log_level); + g_free (cfg_log_domains); + + nm_log_info (LOGD_CORE, "exiting (%s)", success ? "success" : "error"); exit (success ? 0 : 1); } diff --git a/src/modem-manager/Makefile.am b/src/modem-manager/Makefile.am index fef879ac44..a0f65c1bae 100644 --- a/src/modem-manager/Makefile.am +++ b/src/modem-manager/Makefile.am @@ -1,5 +1,6 @@ INCLUDES = \ -I${top_srcdir}/src \ + -I${top_srcdir}/src/logging \ -I${top_srcdir}/include \ -I${top_srcdir}/libnm-util \ -I${top_builddir}/marshallers @@ -7,12 +8,12 @@ INCLUDES = \ noinst_LTLIBRARIES = libmodem-manager.la libmodem_manager_la_SOURCES = \ + nm-modem.c \ + nm-modem.h \ nm-modem-cdma.c \ nm-modem-cdma.h \ nm-modem-gsm.c \ nm-modem-gsm.h \ - nm-modem.c \ - nm-modem.h \ nm-modem-manager.h \ nm-modem-manager.c \ nm-modem-types.h @@ -22,20 +23,13 @@ libmodem_manager_la_CPPFLAGS = \ libmodem_manager_la_LIBADD = \ $(top_builddir)/marshallers/libmarshallers.la \ + $(top_builddir)/src/logging/libnm-logging.la \ $(DBUS_LIBS) -nm-device-cdma-glue.h: $(top_srcdir)/introspection/nm-device-cdma.xml - dbus-binding-tool --prefix=nm_device_cdma --mode=glib-server --output=$@ $< - -nm-device-gsm-glue.h: $(top_srcdir)/introspection/nm-device-gsm.xml - dbus-binding-tool --prefix=nm_device_gsm --mode=glib-server --output=$@ $< - nm-serial-device-glue.h: $(top_srcdir)/introspection/nm-device-serial.xml dbus-binding-tool --prefix=nm_serial_device --mode=glib-server --output=$@ $< BUILT_SOURCES = \ - nm-device-cdma-glue.h \ - nm-device-gsm-glue.h \ nm-serial-device-glue.h CLEANFILES = $(BUILT_SOURCES) diff --git a/src/modem-manager/nm-modem-cdma.c b/src/modem-manager/nm-modem-cdma.c index 07f1cf83bd..c32c18222c 100644 --- a/src/modem-manager/nm-modem-cdma.c +++ b/src/modem-manager/nm-modem-cdma.c @@ -1,22 +1,46 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager -- Network link manager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2009 - 2010 Red Hat, Inc. + * Copyright (C) 2009 Novell, Inc. + */ #include #include "nm-dbus-glib-types.h" #include "nm-modem-cdma.h" #include "nm-modem-types.h" -#include "nm-device-interface.h" -#include "nm-device-private.h" +#include "nm-device.h" #include "nm-dbus-manager.h" #include "nm-setting-connection.h" #include "nm-setting-cdma.h" -#include "nm-utils.h" #include "NetworkManagerUtils.h" - -#include "nm-device-cdma-glue.h" +#include "nm-logging.h" G_DEFINE_TYPE (NMModemCdma, nm_modem_cdma, NM_TYPE_MODEM) +#define NM_MODEM_CDMA_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_MODEM_CDMA, NMModemCdmaPrivate)) + +typedef struct { + DBusGProxyCall *call; + + GHashTable *connect_properties; +} NMModemCdmaPrivate; + typedef enum { NM_CDMA_ERROR_CONNECTION_NOT_CDMA = 0, @@ -60,43 +84,77 @@ nm_cdma_error_get_type (void) } -NMDevice * +NMModem * nm_modem_cdma_new (const char *path, const char *device, const char *data_device, - const char *driver) + guint32 ip_method) { g_return_val_if_fail (path != NULL, NULL); g_return_val_if_fail (device != NULL, NULL); g_return_val_if_fail (data_device != NULL, NULL); - g_return_val_if_fail (driver != NULL, NULL); - return (NMDevice *) g_object_new (NM_TYPE_MODEM_CDMA, - NM_DEVICE_INTERFACE_UDI, path, - NM_DEVICE_INTERFACE_IFACE, data_device, - NM_DEVICE_INTERFACE_DRIVER, driver, - NM_MODEM_PATH, path, - NM_MODEM_DEVICE, device, - NM_DEVICE_INTERFACE_TYPE_DESC, "CDMA", - NM_DEVICE_INTERFACE_DEVICE_TYPE, NM_DEVICE_TYPE_CDMA, - NULL); + return (NMModem *) g_object_new (NM_TYPE_MODEM_CDMA, + NM_MODEM_PATH, path, + NM_MODEM_DEVICE, device, + NM_MODEM_IFACE, data_device, + NM_MODEM_IP_METHOD, ip_method, + NULL); } static void -stage1_prepare_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) +stage1_prepare_done (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data) { - NMDevice *device = NM_DEVICE (user_data); + NMModemCdma *self = NM_MODEM_CDMA (user_data); + NMModemCdmaPrivate *priv = NM_MODEM_CDMA_GET_PRIVATE (self); GError *error = NULL; - dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_INVALID); - if (!error) - nm_device_activate_schedule_stage2_device_config (device); + priv->call = NULL; + + if (priv->connect_properties) { + g_hash_table_destroy (priv->connect_properties); + priv->connect_properties = NULL; + } + + if (dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID)) + g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, TRUE, NM_DEVICE_STATE_REASON_NONE); else { - nm_warning ("CDMA modem connection failed: (%d) %s", - error ? error->code : -1, - error && error->message ? error->message : "(unknown)"); + nm_log_warn (LOGD_MB, "CDMA connection failed: (%d) %s", + error ? error->code : -1, + error && error->message ? error->message : "(unknown)"); g_error_free (error); - nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_NONE); + g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, FALSE, NM_DEVICE_STATE_REASON_NONE); + } +} + +static void +do_connect (NMModemCdma *self) +{ + NMModemCdmaPrivate *priv = NM_MODEM_CDMA_GET_PRIVATE (self); + DBusGProxy *proxy; + + proxy = nm_modem_get_proxy (NM_MODEM (self), MM_DBUS_INTERFACE_MODEM_SIMPLE); + priv->call = dbus_g_proxy_begin_call_with_timeout (proxy, + "Connect", stage1_prepare_done, + self, NULL, 120000, + DBUS_TYPE_G_MAP_OF_VARIANT, priv->connect_properties, + G_TYPE_INVALID); +} + +static void +stage1_enable_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) +{ + NMModemCdma *self = NM_MODEM_CDMA (user_data); + GError *error = NULL; + + if (dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_INVALID)) + do_connect (self); + else { + nm_log_warn (LOGD_MB, "CDMA modem enable failed: (%d) %s", + error ? error->code : -1, + error && error->message ? error->message : "(unknown)"); + g_error_free (error); + g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, FALSE, NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED); } } @@ -117,61 +175,48 @@ create_connect_properties (NMConnection *connection) return properties; } -static void -do_connect (NMModem *modem) +static NMActStageReturn +real_act_stage1_prepare (NMModem *modem, + NMActRequest *req, + GPtrArray **out_hints, + const char **out_setting_name, + NMDeviceStateReason *reason) { + NMModemCdma *self = NM_MODEM_CDMA (modem); + NMModemCdmaPrivate *priv = NM_MODEM_CDMA_GET_PRIVATE (self); NMConnection *connection; - GHashTable *properties; - connection = nm_act_request_get_connection (nm_device_get_act_request (NM_DEVICE (modem))); + connection = nm_act_request_get_connection (req); g_assert (connection); - properties = create_connect_properties (connection); - dbus_g_proxy_begin_call_with_timeout (nm_modem_get_proxy (modem, MM_DBUS_INTERFACE_MODEM_SIMPLE), - "Connect", stage1_prepare_done, - modem, NULL, 120000, - DBUS_TYPE_G_MAP_OF_VARIANT, properties, - G_TYPE_INVALID); - g_hash_table_destroy (properties); -} + *out_setting_name = nm_connection_need_secrets (connection, out_hints); + if (!*out_setting_name) { + gboolean enabled = nm_modem_get_mm_enabled (modem); + DBusGProxy *proxy; -static void -stage1_enable_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) -{ - NMDevice *device = NM_DEVICE (user_data); - GError *error = NULL; + if (priv->connect_properties) + g_hash_table_destroy (priv->connect_properties); + priv->connect_properties = create_connect_properties (connection); - if (dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_INVALID)) - do_connect (NM_MODEM (device)); - else { - nm_warning ("CDMA modem enable failed: (%d) %s", - error ? error->code : -1, - error && error->message ? error->message : "(unknown)"); - g_error_free (error); - nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_NONE); - } -} - -static NMActStageReturn -real_act_stage1_prepare (NMDevice *device, NMDeviceStateReason *reason) -{ - gboolean enabled = nm_modem_get_mm_enabled (NM_MODEM (device)); - - if (enabled) - do_connect (NM_MODEM (device)); - else { - dbus_g_proxy_begin_call_with_timeout (nm_modem_get_proxy (NM_MODEM (device), MM_DBUS_INTERFACE_MODEM), - "Enable", stage1_enable_done, - device, NULL, 20000, - G_TYPE_BOOLEAN, TRUE, - G_TYPE_INVALID); + if (enabled) + do_connect (self); + else { + proxy = nm_modem_get_proxy (modem, MM_DBUS_INTERFACE_MODEM); + dbus_g_proxy_begin_call_with_timeout (proxy, + "Enable", stage1_enable_done, + modem, NULL, 20000, + G_TYPE_BOOLEAN, TRUE, + G_TYPE_INVALID); + } + } else { + /* NMModem will handle requesting secrets... */ } return NM_ACT_STAGE_RETURN_POSTPONE; } static NMConnection * -real_get_best_auto_connection (NMDevice *dev, +real_get_best_auto_connection (NMModem *modem, GSList *connections, char **specific_object) { @@ -195,71 +240,8 @@ real_get_best_auto_connection (NMDevice *dev, return NULL; } -static void -real_connection_secrets_updated (NMDevice *dev, - NMConnection *connection, - GSList *updated_settings, - RequestSecretsCaller caller) -{ - NMActRequest *req; - gboolean found = FALSE; - GSList *iter; - - g_return_if_fail (IS_ACTIVATING_STATE (nm_device_get_state (dev))); - - if (caller == SECRETS_CALLER_PPP) { - NMPPPManager *ppp_manager; - NMSettingCdma *s_cdma = NULL; - - ppp_manager = nm_modem_get_ppp_manager (NM_MODEM (dev)); - g_return_if_fail (ppp_manager != NULL); - - s_cdma = (NMSettingCdma *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CDMA); - if (!s_cdma) { - /* Shouldn't ever happen */ - nm_ppp_manager_update_secrets (ppp_manager, - nm_device_get_iface (dev), - NULL, - NULL, - "missing CDMA setting; no secrets could be found."); - } else { - const char *username = nm_setting_cdma_get_username (s_cdma); - const char *password = nm_setting_cdma_get_password (s_cdma); - - nm_ppp_manager_update_secrets (ppp_manager, - nm_device_get_iface (dev), - username ? username : "", - password ? password : "", - NULL); - } - return; - } - - g_return_if_fail (caller == SECRETS_CALLER_CDMA); - g_return_if_fail (nm_device_get_state (dev) == NM_DEVICE_STATE_NEED_AUTH); - - for (iter = updated_settings; iter; iter = g_slist_next (iter)) { - const char *setting_name = (const char *) iter->data; - - if (!strcmp (setting_name, NM_SETTING_CDMA_SETTING_NAME)) - found = TRUE; - else - nm_warning ("Ignoring updated secrets for setting '%s'.", setting_name); - } - - if (!found) - return; - - req = nm_device_get_act_request (dev); - g_assert (req); - - g_return_if_fail (nm_act_request_get_connection (req) == connection); - - nm_device_activate_schedule_stage1_device_prepare (dev); -} - static gboolean -real_check_connection_compatible (NMDevice *device, +real_check_connection_compatible (NMModem *modem, NMConnection *connection, GError **error) { @@ -287,15 +269,46 @@ real_check_connection_compatible (NMDevice *device, return TRUE; } -static const char * -real_get_ppp_name (NMModem *device, NMConnection *connection) +static gboolean +real_get_user_pass (NMModem *modem, + NMConnection *connection, + const char **user, + const char **pass) { NMSettingCdma *s_cdma; s_cdma = (NMSettingCdma *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CDMA); - g_assert (s_cdma); + if (!s_cdma) + return FALSE; - return nm_setting_cdma_get_username (s_cdma); + if (user) + *user = nm_setting_cdma_get_username (s_cdma); + if (pass) + *pass = nm_setting_cdma_get_password (s_cdma); + + return TRUE; +} + +static const char * +real_get_setting_name (NMModem *modem) +{ + return NM_SETTING_CDMA_SETTING_NAME; +} + +static void +real_deactivate_quickly (NMModem *modem, NMDevice *device) +{ + NMModemCdmaPrivate *priv = NM_MODEM_CDMA_GET_PRIVATE (modem); + + if (priv->call) { + DBusGProxy *proxy; + + proxy = nm_modem_get_proxy (modem, MM_DBUS_INTERFACE_MODEM_SIMPLE); + dbus_g_proxy_cancel_call (proxy, priv->call); + priv->call = NULL; + } + + NM_MODEM_CLASS (nm_modem_cdma_parent_class)->deactivate_quickly (modem, device); } /*****************************************************************************/ @@ -305,22 +318,34 @@ nm_modem_cdma_init (NMModemCdma *self) { } +static void +dispose (GObject *object) +{ + NMModemCdma *self = NM_MODEM_CDMA (object); + NMModemCdmaPrivate *priv = NM_MODEM_CDMA_GET_PRIVATE (self); + + if (priv->connect_properties) + g_hash_table_destroy (priv->connect_properties); + + G_OBJECT_CLASS (nm_modem_cdma_parent_class)->dispose (object); +} + static void nm_modem_cdma_class_init (NMModemCdmaClass *klass) { - NMDeviceClass *device_class = NM_DEVICE_CLASS (klass); + GObjectClass *object_class = G_OBJECT_CLASS (klass); NMModemClass *modem_class = NM_MODEM_CLASS (klass); + g_type_class_add_private (object_class, sizeof (NMModemCdmaPrivate)); + /* Virtual methods */ - device_class->get_best_auto_connection = real_get_best_auto_connection; - device_class->connection_secrets_updated = real_connection_secrets_updated; - device_class->act_stage1_prepare = real_act_stage1_prepare; - device_class->check_connection_compatible = real_check_connection_compatible; - - modem_class->get_ppp_name = real_get_ppp_name; - - dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (klass), - &dbus_glib_nm_device_cdma_object_info); + object_class->dispose = dispose; + modem_class->get_user_pass = real_get_user_pass; + modem_class->get_setting_name = real_get_setting_name; + modem_class->get_best_auto_connection = real_get_best_auto_connection; + modem_class->check_connection_compatible = real_check_connection_compatible; + modem_class->act_stage1_prepare = real_act_stage1_prepare; + modem_class->deactivate_quickly = real_deactivate_quickly; dbus_g_error_domain_register (NM_CDMA_ERROR, NULL, NM_TYPE_CDMA_ERROR); } diff --git a/src/modem-manager/nm-modem-cdma.h b/src/modem-manager/nm-modem-cdma.h index 25dd9dcb1d..0abe4e0cfa 100644 --- a/src/modem-manager/nm-modem-cdma.h +++ b/src/modem-manager/nm-modem-cdma.h @@ -1,4 +1,23 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager -- Network link manager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009 Novell, Inc. + */ #ifndef NM_MODEM_CDMA_H #define NM_MODEM_CDMA_H @@ -27,10 +46,10 @@ typedef struct { GType nm_modem_cdma_get_type (void); -NMDevice *nm_modem_cdma_new (const char *path, - const char *device, - const char *data_device, - const char *driver); +NMModem *nm_modem_cdma_new (const char *path, + const char *device, + const char *data_device, + guint32 ip_method); G_END_DECLS diff --git a/src/modem-manager/nm-modem-gsm.c b/src/modem-manager/nm-modem-gsm.c index 8484d0ae4f..abb96db1fd 100644 --- a/src/modem-manager/nm-modem-gsm.c +++ b/src/modem-manager/nm-modem-gsm.c @@ -1,40 +1,72 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager -- Network link manager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2009 - 2010 Red Hat, Inc. + * Copyright (C) 2009 Novell, Inc. + */ #include #include "nm-dbus-glib-types.h" #include "nm-modem-gsm.h" -#include "nm-device-private.h" -#include "nm-device-interface.h" +#include "nm-device.h" #include "nm-setting-connection.h" #include "nm-setting-gsm.h" #include "nm-modem-types.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "NetworkManagerUtils.h" -#include "nm-device-gsm-glue.h" +typedef enum { + MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_ANY = 0, + MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_GPRS, + MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_EDGE, + MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_UMTS, + MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_HSDPA, + MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_2G_PREFERRED, + MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_3G_PREFERRED, + MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_2G_ONLY, + MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_3G_ONLY, + MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_HSUPA, + MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_HSPA, + + MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_LAST = MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_HSPA +} MMModemDeprecatedMode; typedef enum { - MM_MODEM_GSM_MODE_UNKNOWN = 0x00000000, - MM_MODEM_GSM_MODE_ANY = 0x00000001, - MM_MODEM_GSM_MODE_GPRS = 0x00000002, - MM_MODEM_GSM_MODE_EDGE = 0x00000004, - MM_MODEM_GSM_MODE_UMTS = 0x00000008, - MM_MODEM_GSM_MODE_HSDPA = 0x00000010, - MM_MODEM_GSM_MODE_2G_PREFERRED = 0x00000020, - MM_MODEM_GSM_MODE_3G_PREFERRED = 0x00000040, - MM_MODEM_GSM_MODE_2G_ONLY = 0x00000080, - MM_MODEM_GSM_MODE_3G_ONLY = 0x00000100, - MM_MODEM_GSM_MODE_HSUPA = 0x00000200, - MM_MODEM_GSM_MODE_HSPA = 0x00000400, + MM_MODEM_GSM_ALLOWED_MODE_ANY = 0, + MM_MODEM_GSM_ALLOWED_MODE_2G_PREFERRED = 1, + MM_MODEM_GSM_ALLOWED_MODE_3G_PREFERRED = 2, + MM_MODEM_GSM_ALLOWED_MODE_2G_ONLY = 3, + MM_MODEM_GSM_ALLOWED_MODE_3G_ONLY = 4, - MM_MODEM_GSM_MODE_LAST = MM_MODEM_GSM_MODE_HSPA -} MMModemGsmMode; + MM_MODEM_GSM_ALLOWED_MODE_LAST = MM_MODEM_GSM_ALLOWED_MODE_3G_ONLY +} MMModemGsmAllowedMode; -#define GSM_SECRETS_TRIES "gsm-secrets-tries" - G_DEFINE_TYPE (NMModemGsm, nm_modem_gsm, NM_TYPE_MODEM) +#define NM_MODEM_GSM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_MODEM_GSM, NMModemGsmPrivate)) + +typedef struct { + DBusGProxyCall *call; + + GHashTable *connect_properties; + guint32 pin_tries; +} NMModemGsmPrivate; + typedef enum { NM_GSM_ERROR_CONNECTION_NOT_GSM = 0, @@ -78,28 +110,22 @@ nm_gsm_error_get_type (void) } -NMDevice * +NMModem * nm_modem_gsm_new (const char *path, const char *device, const char *data_device, - const char *driver, guint32 ip_method) { g_return_val_if_fail (path != NULL, NULL); g_return_val_if_fail (device != NULL, NULL); g_return_val_if_fail (data_device != NULL, NULL); - g_return_val_if_fail (driver != NULL, NULL); - return (NMDevice *) g_object_new (NM_TYPE_MODEM_GSM, - NM_DEVICE_INTERFACE_UDI, path, - NM_DEVICE_INTERFACE_IFACE, data_device, - NM_DEVICE_INTERFACE_DRIVER, driver, - NM_MODEM_PATH, path, - NM_MODEM_IP_METHOD, ip_method, - NM_MODEM_DEVICE, device, - NM_DEVICE_INTERFACE_TYPE_DESC, "GSM", - NM_DEVICE_INTERFACE_DEVICE_TYPE, NM_DEVICE_TYPE_GSM, - NULL); + return (NMModem *) g_object_new (NM_TYPE_MODEM_GSM, + NM_MODEM_PATH, path, + NM_MODEM_DEVICE, device, + NM_MODEM_IFACE, data_device, + NM_MODEM_IP_METHOD, ip_method, + NULL); } static NMDeviceStateReason @@ -138,62 +164,159 @@ translate_mm_error (GError *error) } static void -clear_pin (NMDevice *device) +ask_for_pin (NMModemGsm *self, gboolean always_ask) { - NMActRequest *req; - NMConnection *connection; - NMSettingGsm *setting; + NMModemGsmPrivate *priv; + guint32 tries = 0; - req = nm_device_get_act_request (device); - g_assert (req); - connection = nm_act_request_get_connection (req); - g_assert (connection); - setting = NM_SETTING_GSM (nm_connection_get_setting (connection, NM_TYPE_SETTING_GSM)); - g_assert (setting); + g_return_if_fail (self != NULL); + g_return_if_fail (NM_IS_MODEM_GSM (self)); - g_object_set (G_OBJECT (setting), NM_SETTING_GSM_PIN, NULL, NULL); + priv = NM_MODEM_GSM_GET_PRIVATE (self); + + if (!always_ask) + tries = priv->pin_tries++; + + g_signal_emit_by_name (self, NM_MODEM_NEED_AUTH, + NM_SETTING_GSM_SETTING_NAME, + (tries || always_ask) ? TRUE : FALSE, + SECRETS_CALLER_MOBILE_BROADBAND, + NM_SETTING_GSM_PIN, + NULL); } static void -stage1_prepare_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) +stage1_prepare_done (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data) { - NMDevice *device = NM_DEVICE (user_data); + NMModemGsm *self = NM_MODEM_GSM (user_data); + NMModemGsmPrivate *priv = NM_MODEM_GSM_GET_PRIVATE (self); GError *error = NULL; - dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_INVALID); - if (!error) - nm_device_activate_schedule_stage2_device_config (device); + priv->call = NULL; + + if (priv->connect_properties) { + g_hash_table_destroy (priv->connect_properties); + priv->connect_properties = NULL; + } + + if (dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID)) + g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, TRUE, NM_DEVICE_STATE_REASON_NONE); else { - const char *required_secret = NULL; - gboolean retry_secret = FALSE; - if (dbus_g_error_has_name (error, MM_MODEM_ERROR_SIM_PIN)) - required_secret = NM_SETTING_GSM_PIN; - else if (dbus_g_error_has_name (error, MM_MODEM_ERROR_SIM_WRONG)) { - clear_pin (device); - required_secret = NM_SETTING_GSM_PIN; - retry_secret = TRUE; - } else { - nm_warning ("GSM modem connection failed: (%d) %s", - error ? error->code : -1, - error && error->message ? error->message : "(unknown)"); - } + ask_for_pin (self, FALSE); + else if (dbus_g_error_has_name (error, MM_MODEM_ERROR_SIM_WRONG)) + ask_for_pin (self, TRUE); + else { + nm_log_warn (LOGD_MB, "GSM connection failed: (%d) %s", + error ? error->code : -1, + error && error->message ? error->message : "(unknown)"); - if (required_secret) { - nm_device_state_changed (device, NM_DEVICE_STATE_NEED_AUTH, NM_DEVICE_STATE_REASON_NONE); - nm_act_request_get_secrets (nm_device_get_act_request (device), - NM_SETTING_GSM_SETTING_NAME, - retry_secret, - SECRETS_CALLER_GSM, - required_secret, - NULL); - } else - nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, translate_mm_error (error)); + g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, FALSE, translate_mm_error (error)); + } g_error_free (error); } } +static void +do_connect (NMModemGsm *self) +{ + NMModemGsmPrivate *priv = NM_MODEM_GSM_GET_PRIVATE (self); + DBusGProxy *proxy; + + proxy = nm_modem_get_proxy (NM_MODEM (self), MM_DBUS_INTERFACE_MODEM_SIMPLE); + dbus_g_proxy_begin_call_with_timeout (proxy, + "Connect", stage1_prepare_done, + self, NULL, 120000, + DBUS_TYPE_G_MAP_OF_VARIANT, priv->connect_properties, + G_TYPE_INVALID); +} + +static void stage1_enable_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data); + +static void +do_enable (NMModemGsm *self) +{ + DBusGProxy *proxy; + + g_return_if_fail (self != NULL); + g_return_if_fail (NM_IS_MODEM_GSM (self)); + + proxy = nm_modem_get_proxy (NM_MODEM (self), MM_DBUS_INTERFACE_MODEM); + dbus_g_proxy_begin_call_with_timeout (proxy, + "Enable", stage1_enable_done, + self, NULL, 20000, + G_TYPE_BOOLEAN, TRUE, + G_TYPE_INVALID); +} + +static void +stage1_pin_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) +{ + NMModemGsm *self = NM_MODEM_GSM (user_data); + GError *error = NULL; + + if (dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_INVALID)) { + /* Success; go back and try the enable again */ + do_enable (self); + } else { + nm_log_warn (LOGD_MB, "GSM PIN unlock failed: (%d) %s", + error ? error->code : -1, + error && error->message ? error->message : "(unknown)"); + g_error_free (error); + + g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, FALSE, NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED); + } +} + +static void +handle_enable_pin_required (NMModemGsm *self) +{ + NMModemGsmPrivate *priv = NM_MODEM_GSM_GET_PRIVATE (self); + const char *pin = NULL; + GValue *value; + DBusGProxy *proxy; + + /* See if we have a PIN already */ + value = g_hash_table_lookup (priv->connect_properties, "pin"); + if (value && G_VALUE_HOLDS_STRING (value)) + pin = g_value_get_string (value); + + /* If we do, send it */ + if (pin) { + proxy = nm_modem_get_proxy (NM_MODEM (self), MM_DBUS_INTERFACE_MODEM_GSM_CARD); + dbus_g_proxy_begin_call_with_timeout (proxy, + "SendPin", stage1_pin_done, + self, NULL, 10000, + G_TYPE_STRING, pin, + G_TYPE_INVALID); + } else + ask_for_pin (self, FALSE); +} + +static void +stage1_enable_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) +{ + NMModemGsm *self = NM_MODEM_GSM (user_data); + GError *error = NULL; + + if (dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_INVALID)) + do_connect (self); + else { + nm_log_warn (LOGD_MB, "GSM modem enable failed: (%d) %s", + error ? error->code : -1, + error && error->message ? error->message : "(unknown)"); + + if (dbus_g_error_has_name (error, MM_MODEM_ERROR_SIM_PIN)) + handle_enable_pin_required (self); + else + g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, FALSE, NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED); + + g_error_free (error); + } +} + + static GHashTable * create_connect_properties (NMConnection *connection) { @@ -228,122 +351,72 @@ create_connect_properties (NMConnection *connection) if (str) value_hash_add_str (properties, "password", str); + /* Add both old and new preferred modes */ switch (nm_setting_gsm_get_network_type (setting)) { case NM_SETTING_GSM_NETWORK_TYPE_UMTS_HSPA: - value_hash_add_uint (properties, "network_mode", MM_MODEM_GSM_MODE_3G_ONLY); + value_hash_add_uint (properties, "network_mode", MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_3G_ONLY); + value_hash_add_uint (properties, "allowed_mode", MM_MODEM_GSM_ALLOWED_MODE_3G_ONLY); break; case NM_SETTING_GSM_NETWORK_TYPE_GPRS_EDGE: - value_hash_add_uint (properties, "network_mode", MM_MODEM_GSM_MODE_2G_ONLY); + value_hash_add_uint (properties, "network_mode", MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_2G_ONLY); + value_hash_add_uint (properties, "allowed_mode", MM_MODEM_GSM_ALLOWED_MODE_2G_ONLY); break; case NM_SETTING_GSM_NETWORK_TYPE_PREFER_UMTS_HSPA: - value_hash_add_uint (properties, "network_mode", MM_MODEM_GSM_MODE_3G_PREFERRED); + value_hash_add_uint (properties, "network_mode", MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_3G_PREFERRED); + value_hash_add_uint (properties, "allowed_mode", MM_MODEM_GSM_ALLOWED_MODE_3G_PREFERRED); break; case NM_SETTING_GSM_NETWORK_TYPE_PREFER_GPRS_EDGE: - value_hash_add_uint (properties, "network_mode", MM_MODEM_GSM_MODE_2G_PREFERRED); + value_hash_add_uint (properties, "network_mode", MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_2G_PREFERRED); + value_hash_add_uint (properties, "allowed_mode", MM_MODEM_GSM_ALLOWED_MODE_2G_PREFERRED); break; default: - value_hash_add_uint (properties, "network_mode", MM_MODEM_GSM_MODE_ANY); + value_hash_add_uint (properties, "network_mode", MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_ANY); + value_hash_add_uint (properties, "allowed_mode", MM_MODEM_GSM_ALLOWED_MODE_ANY); break; } - /* FIXME: band */ + /* Roaming */ + if (nm_setting_gsm_get_home_only (setting)) + value_hash_add_bool (properties, "home_only", TRUE); + return properties; } -static void -do_connect (NMModem *modem) -{ - NMConnection *connection; - GHashTable *properties; - - connection = nm_act_request_get_connection (nm_device_get_act_request (NM_DEVICE (modem))); - g_assert (connection); - - properties = create_connect_properties (connection); - dbus_g_proxy_begin_call_with_timeout (nm_modem_get_proxy (modem, MM_DBUS_INTERFACE_MODEM_SIMPLE), - "Connect", stage1_prepare_done, - modem, NULL, 120000, - DBUS_TYPE_G_MAP_OF_VARIANT, properties, - G_TYPE_INVALID); - g_hash_table_destroy (properties); -} - -static void -stage1_enable_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) -{ - NMDevice *device = NM_DEVICE (user_data); - GError *error = NULL; - - if (dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_INVALID)) - do_connect (NM_MODEM (device)); - else { - nm_warning ("GSM modem enable failed: (%d) %s", - error ? error->code : -1, - error && error->message ? error->message : "(unknown)"); - g_error_free (error); - nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_NONE); - } -} - static NMActStageReturn -real_act_stage1_prepare (NMDevice *device, NMDeviceStateReason *reason) +real_act_stage1_prepare (NMModem *modem, + NMActRequest *req, + GPtrArray **out_hints, + const char **out_setting_name, + NMDeviceStateReason *reason) { - NMActRequest *req; + NMModemGsm *self = NM_MODEM_GSM (modem); + NMModemGsmPrivate *priv = NM_MODEM_GSM_GET_PRIVATE (self); NMConnection *connection; - const char *setting_name; - GPtrArray *hints = NULL; - const char *hint1 = NULL, *hint2 = NULL; - guint32 tries; - req = nm_device_get_act_request (device); - g_assert (req); connection = nm_act_request_get_connection (req); g_assert (connection); - setting_name = nm_connection_need_secrets (connection, &hints); - if (!setting_name) { - NMModem *modem = NM_MODEM (device); + *out_setting_name = nm_connection_need_secrets (connection, out_hints); + if (!*out_setting_name) { gboolean enabled = nm_modem_get_mm_enabled (modem); + if (priv->connect_properties) + g_hash_table_destroy (priv->connect_properties); + priv->connect_properties = create_connect_properties (connection); + if (enabled) - do_connect (modem); - else { - dbus_g_proxy_begin_call_with_timeout (nm_modem_get_proxy (modem, MM_DBUS_INTERFACE_MODEM), - "Enable", stage1_enable_done, - modem, NULL, 20000, - G_TYPE_BOOLEAN, TRUE, - G_TYPE_INVALID); - } - - return NM_ACT_STAGE_RETURN_POSTPONE; + do_connect (self); + else + do_enable (self); + } else { + /* NMModem will handle requesting secrets... */ } - if (hints) { - if (hints->len > 0) - hint1 = g_ptr_array_index (hints, 0); - if (hints->len > 1) - hint2 = g_ptr_array_index (hints, 1); - } - - nm_device_state_changed (device, NM_DEVICE_STATE_NEED_AUTH, NM_DEVICE_STATE_REASON_NONE); - - tries = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (connection), GSM_SECRETS_TRIES)); - nm_act_request_get_secrets (req, - setting_name, - tries ? TRUE : FALSE, - SECRETS_CALLER_GSM, - hint1, - hint2); - g_object_set_data (G_OBJECT (connection), GSM_SECRETS_TRIES, GUINT_TO_POINTER (++tries)); - - if (hints) - g_ptr_array_free (hints, TRUE); - return NM_ACT_STAGE_RETURN_POSTPONE; } static NMConnection * -real_get_best_auto_connection (NMDevice *dev, +real_get_best_auto_connection (NMModem *modem, GSList *connections, char **specific_object) { @@ -367,111 +440,8 @@ real_get_best_auto_connection (NMDevice *dev, return NULL; } -static void -real_connection_secrets_updated (NMDevice *dev, - NMConnection *connection, - GSList *updated_settings, - RequestSecretsCaller caller) -{ - NMActRequest *req; - gboolean found = FALSE; - GSList *iter; - - g_return_if_fail (IS_ACTIVATING_STATE (nm_device_get_state (dev))); - - if (caller == SECRETS_CALLER_PPP) { - NMPPPManager *ppp_manager; - NMSettingGsm *s_gsm = NULL; - - ppp_manager = nm_modem_get_ppp_manager (NM_MODEM (dev)); - g_return_if_fail (ppp_manager != NULL); - - s_gsm = (NMSettingGsm *) nm_connection_get_setting (connection, NM_TYPE_SETTING_GSM); - if (!s_gsm) { - /* Shouldn't ever happen */ - nm_ppp_manager_update_secrets (ppp_manager, - nm_device_get_iface (dev), - NULL, - NULL, - "missing GSM setting; no secrets could be found."); - } else { - const char *username = nm_setting_gsm_get_username (s_gsm); - const char *password = nm_setting_gsm_get_password (s_gsm); - - nm_ppp_manager_update_secrets (ppp_manager, - nm_device_get_iface (dev), - username ? username : "", - password ? password : "", - NULL); - } - return; - } - - g_return_if_fail (caller == SECRETS_CALLER_GSM); - g_return_if_fail (nm_device_get_state (dev) == NM_DEVICE_STATE_NEED_AUTH); - - for (iter = updated_settings; iter; iter = g_slist_next (iter)) { - const char *setting_name = (const char *) iter->data; - - if (!strcmp (setting_name, NM_SETTING_GSM_SETTING_NAME)) - found = TRUE; - else - nm_warning ("Ignoring updated secrets for setting '%s'.", setting_name); - } - - if (!found) - return; - - req = nm_device_get_act_request (dev); - g_assert (req); - - g_return_if_fail (nm_act_request_get_connection (req) == connection); - - nm_device_activate_schedule_stage1_device_prepare (dev); -} - -static NMActStageReturn -real_act_stage2_config (NMDevice *device, NMDeviceStateReason *reason) -{ - NMActRequest *req; - NMConnection *connection; - - req = nm_device_get_act_request (device); - g_assert (req); - - /* Clear secrets tries counter since secrets were successfully used - * already if we get here. - */ - connection = nm_act_request_get_connection (req); - g_assert (connection); - g_object_set_data (G_OBJECT (connection), GSM_SECRETS_TRIES, NULL); - - if (NM_DEVICE_CLASS (nm_modem_gsm_parent_class)->act_stage2_config) - return NM_DEVICE_CLASS (nm_modem_gsm_parent_class)->act_stage2_config (device, reason); - - return NM_ACT_STAGE_RETURN_SUCCESS; -} - -static void -real_deactivate_quickly (NMDevice *device) -{ - NMActRequest *req; - NMConnection *connection; - - req = nm_device_get_act_request (device); - if (req) { - /* Clear the secrets attempts counter */ - connection = nm_act_request_get_connection (req); - g_assert (connection); - g_object_set_data (G_OBJECT (connection), GSM_SECRETS_TRIES, NULL); - } - - if (NM_DEVICE_CLASS (nm_modem_gsm_parent_class)->deactivate_quickly) - NM_DEVICE_CLASS (nm_modem_gsm_parent_class)->deactivate_quickly (device); -} - static gboolean -real_check_connection_compatible (NMDevice *device, +real_check_connection_compatible (NMModem *modem, NMConnection *connection, GError **error) { @@ -499,17 +469,51 @@ real_check_connection_compatible (NMDevice *device, return TRUE; } -static const char * -real_get_ppp_name (NMModem *device, NMConnection *connection) +static gboolean +real_get_user_pass (NMModem *modem, + NMConnection *connection, + const char **user, + const char **pass) { NMSettingGsm *s_gsm; s_gsm = (NMSettingGsm *) nm_connection_get_setting (connection, NM_TYPE_SETTING_GSM); - g_assert (s_gsm); + if (!s_gsm) + return FALSE; - return nm_setting_gsm_get_username (s_gsm); + if (user) + *user = nm_setting_gsm_get_username (s_gsm); + if (pass) + *pass = nm_setting_gsm_get_password (s_gsm); + + return TRUE; } +static const char * +real_get_setting_name (NMModem *modem) +{ + return NM_SETTING_GSM_SETTING_NAME; +} + +static void +real_deactivate_quickly (NMModem *modem, NMDevice *device) +{ + NMModemGsmPrivate *priv = NM_MODEM_GSM_GET_PRIVATE (modem); + + if (priv->call) { + DBusGProxy *proxy; + + proxy = nm_modem_get_proxy (modem, MM_DBUS_INTERFACE_MODEM_SIMPLE); + dbus_g_proxy_cancel_call (proxy, priv->call); + priv->call = NULL; + } + + priv->pin_tries = 0; + + NM_MODEM_CLASS (nm_modem_gsm_parent_class)->deactivate_quickly (modem, device); +} + + /*****************************************************************************/ static void @@ -517,24 +521,34 @@ nm_modem_gsm_init (NMModemGsm *self) { } +static void +dispose (GObject *object) +{ + NMModemGsm *self = NM_MODEM_GSM (object); + NMModemGsmPrivate *priv = NM_MODEM_GSM_GET_PRIVATE (self); + + if (priv->connect_properties) + g_hash_table_destroy (priv->connect_properties); + + G_OBJECT_CLASS (nm_modem_gsm_parent_class)->dispose (object); +} + static void nm_modem_gsm_class_init (NMModemGsmClass *klass) { - NMDeviceClass *device_class = NM_DEVICE_CLASS (klass); + GObjectClass *object_class = G_OBJECT_CLASS (klass); NMModemClass *modem_class = NM_MODEM_CLASS (klass); + g_type_class_add_private (object_class, sizeof (NMModemGsmPrivate)); + /* Virtual methods */ - device_class->get_best_auto_connection = real_get_best_auto_connection; - device_class->connection_secrets_updated = real_connection_secrets_updated; - device_class->act_stage1_prepare = real_act_stage1_prepare; - device_class->act_stage2_config = real_act_stage2_config; - device_class->deactivate_quickly = real_deactivate_quickly; - device_class->check_connection_compatible = real_check_connection_compatible; - - modem_class->get_ppp_name = real_get_ppp_name; - - dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (klass), - &dbus_glib_nm_device_gsm_object_info); + object_class->dispose = dispose; + modem_class->get_user_pass = real_get_user_pass; + modem_class->get_setting_name = real_get_setting_name; + modem_class->get_best_auto_connection = real_get_best_auto_connection; + modem_class->check_connection_compatible = real_check_connection_compatible; + modem_class->act_stage1_prepare = real_act_stage1_prepare; + modem_class->deactivate_quickly = real_deactivate_quickly; dbus_g_error_domain_register (NM_GSM_ERROR, NULL, NM_TYPE_GSM_ERROR); } diff --git a/src/modem-manager/nm-modem-gsm.h b/src/modem-manager/nm-modem-gsm.h index 4e45811641..f481bdb817 100644 --- a/src/modem-manager/nm-modem-gsm.h +++ b/src/modem-manager/nm-modem-gsm.h @@ -1,4 +1,23 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager -- Network link manager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009 Novell, Inc. + */ #ifndef NM_MODEM_GSM_H #define NM_MODEM_GSM_H @@ -27,11 +46,10 @@ typedef struct { GType nm_modem_gsm_get_type (void); -NMDevice *nm_modem_gsm_new (const char *path, - const char *device, - const char *data_device, - const char *driver, - guint32 ip_method); +NMModem *nm_modem_gsm_new (const char *path, + const char *device, + const char *data_device, + guint32 ip_method); G_END_DECLS diff --git a/src/modem-manager/nm-modem-manager.c b/src/modem-manager/nm-modem-manager.c index 3b9f6438a6..28f7b94d0c 100644 --- a/src/modem-manager/nm-modem-manager.c +++ b/src/modem-manager/nm-modem-manager.c @@ -1,13 +1,34 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager -- Network link manager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2009 - 2010 Red Hat, Inc. + * Copyright (C) 2009 Novell, Inc. + * Copyright (C) 2009 Canonical Ltd. + */ #include #include "nm-modem-manager.h" +#include "nm-logging.h" #include "nm-modem.h" #include "nm-modem-gsm.h" #include "nm-modem-cdma.h" #include "nm-dbus-manager.h" -#include "nm-utils.h" #include "nm-modem-types.h" +#include "nm-marshal.h" #define MODEM_POKE_INTERVAL 120 @@ -24,8 +45,8 @@ typedef struct { } NMModemManagerPrivate; enum { - DEVICE_ADDED, - DEVICE_REMOVED, + MODEM_ADDED, + MODEM_REMOVED, LAST_SIGNAL }; @@ -47,25 +68,6 @@ nm_modem_manager_get (void) return singleton; } -gboolean -nm_modem_manager_has_modem_for_iface (NMModemManager *manager, - const gchar *iface) -{ - NMModemManagerPrivate *priv = NM_MODEM_MANAGER_GET_PRIVATE (manager); - GList *iter; - g_assert (manager); - g_assert (NM_IS_MODEM_MANAGER(manager)); - g_assert (iface); - - for (iter = g_hash_table_get_values(priv->modems); iter != NULL; iter = iter->next) { - NMDevice *device = NM_DEVICE(iter->data); - const gchar *device_iface = nm_device_get_iface (device); - if (!g_strcmp0 (iface, device_iface)) - return TRUE; - } - return FALSE; -} - static gboolean get_modem_properties (DBusGConnection *connection, const char *path, @@ -93,7 +95,7 @@ get_modem_properties (DBusGConnection *connection, *type = g_value_get_uint (&value); g_value_unset (&value); } else { - g_warning ("Could not get device type: %s", err->message); + nm_log_warn (LOGD_MB, "could not get device type: %s", err->message); goto out; } @@ -106,7 +108,7 @@ get_modem_properties (DBusGConnection *connection, *device = g_value_dup_string (&value); g_value_unset (&value); } else { - g_warning ("Could not get device: %s", err->message); + nm_log_warn (LOGD_MB, "could not get device: %s", err->message); goto out; } @@ -119,7 +121,7 @@ get_modem_properties (DBusGConnection *connection, *ip_method = g_value_get_uint (&value); g_value_unset (&value); } else { - g_warning ("Could not get IP method: %s", err->message); + nm_log_warn (LOGD_MB, "could not get IP method: %s", err->message); goto out; } @@ -132,7 +134,7 @@ get_modem_properties (DBusGConnection *connection, *data_device = g_value_dup_string (&value); g_value_unset (&value); } else { - g_warning ("Could not get modem data device: %s", err->message); + nm_log_warn (LOGD_MB, "could not get modem data device: %s", err->message); goto out; } @@ -145,7 +147,7 @@ get_modem_properties (DBusGConnection *connection, *driver = g_value_dup_string (&value); g_value_unset (&value); } else { - g_warning ("Could not get modem driver: %s", err->message); + nm_log_warn (LOGD_MB, "could not get modem driver: %s", err->message); goto out; } @@ -162,13 +164,13 @@ static void create_modem (NMModemManager *manager, const char *path) { NMModemManagerPrivate *priv = NM_MODEM_MANAGER_GET_PRIVATE (manager); - NMDevice *device; + NMModem *modem = NULL; char *data_device = NULL, *driver = NULL, *master_device = NULL; uint modem_type = MM_MODEM_TYPE_UNKNOWN; uint ip_method = MM_MODEM_IP_METHOD_PPP; if (g_hash_table_lookup (priv->modems, path)) { - nm_warning ("Modem with path %s already exists, ignoring", path); + nm_log_warn (LOGD_MB, "modem with path %s already exists, ignoring", path); return; } @@ -178,39 +180,40 @@ create_modem (NMModemManager *manager, const char *path) return; if (modem_type == MM_MODEM_TYPE_UNKNOWN) { - nm_warning ("Modem with path %s has unknown type, ignoring", path); + nm_log_warn (LOGD_MB, "modem with path %s has unknown type, ignoring", path); return; } if (!master_device || !strlen (master_device)) { - nm_warning ("Modem with path %s has unknown device, ignoring", path); + nm_log_warn (LOGD_MB, "modem with path %s has unknown device, ignoring", path); return; } if (!driver || !strlen (driver)) { - nm_warning ("Modem with path %s has unknown driver, ignoring", path); + nm_log_warn (LOGD_MB, "modem with path %s has unknown driver, ignoring", path); return; } if (!data_device || !strlen (data_device)) { - nm_warning ("Modem with path %s has unknown data device, ignoring", path); + nm_log_warn (LOGD_MB, "modem with path %s has unknown data device, ignoring", path); return; } if (modem_type == MM_MODEM_TYPE_GSM) - device = nm_modem_gsm_new (path, master_device, data_device, driver, ip_method); + modem = nm_modem_gsm_new (path, master_device, data_device, ip_method); else if (modem_type == MM_MODEM_TYPE_CDMA) - device = nm_modem_cdma_new (path, master_device, data_device, driver); + modem = nm_modem_cdma_new (path, master_device, data_device, ip_method); else - g_error ("Invalid modem type"); + nm_log_warn (LOGD_MB, "unknown modem type '%d'", modem_type); g_free (data_device); - g_free (driver); - if (device) { - g_hash_table_insert (priv->modems, g_strdup (path), device); - g_signal_emit (manager, signals[DEVICE_ADDED], 0, device); + if (modem) { + g_hash_table_insert (priv->modems, g_strdup (path), modem); + g_signal_emit (manager, signals[MODEM_ADDED], 0, modem, driver); } + + g_free (driver); } static void @@ -227,7 +230,7 @@ modem_removed (DBusGProxy *proxy, const char *path, gpointer user_data) modem = (NMModem *) g_hash_table_lookup (priv->modems, path); if (modem) { - g_signal_emit (user_data, signals[DEVICE_REMOVED], 0, modem); + g_signal_emit (user_data, signals[MODEM_REMOVED], 0, modem); g_hash_table_remove (priv->modems, path); } } @@ -262,7 +265,7 @@ enumerate_devices_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer dat if (!dbus_g_proxy_end_call (proxy, call_id, &error, dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH), &modems, G_TYPE_INVALID)) { - nm_warning ("Could not get modem list: %s", error->message); + nm_log_warn (LOGD_MB, "could not get modem list: %s", error->message); g_error_free (error); } else { int i; @@ -288,7 +291,7 @@ modem_manager_appeared (NMModemManager *self, gboolean enumerate_devices) priv->poke_id = 0; } - nm_info ("modem-manager is now available"); + nm_log_info (LOGD_MB, "modem-manager is now available"); priv->proxy = dbus_g_proxy_new_for_name (nm_dbus_manager_get_connection (priv->dbus_mgr), MM_DBUS_SERVICE, MM_DBUS_PATH, MM_DBUS_INTERFACE); @@ -310,7 +313,7 @@ modem_manager_appeared (NMModemManager *self, gboolean enumerate_devices) static gboolean remove_one_modem (gpointer key, gpointer value, gpointer user_data) { - g_signal_emit (user_data, signals[DEVICE_REMOVED], 0, value); + g_signal_emit (user_data, signals[MODEM_REMOVED], 0, value); return TRUE; } @@ -328,7 +331,7 @@ modem_manager_disappeared (NMModemManager *self) } /* Try to activate the modem-manager */ - nm_info ("Trying to start the modem-manager..."); + nm_log_info (LOGD_MB, "trying to start the modem manager..."); poke_modem_cb (self); priv->poke_id = g_timeout_add_seconds (MODEM_POKE_INTERVAL, poke_modem_cb, self); } @@ -353,7 +356,7 @@ nm_modem_manager_name_owner_changed (NMDBusManager *dbus_mgr, if (!old_owner_good && new_owner_good) { modem_manager_appeared (NM_MODEM_MANAGER (user_data), FALSE); } else if (old_owner_good && !new_owner_good) { - nm_info ("modem manager disappeared"); + nm_log_info (LOGD_MB, "the modem manager disappeared"); modem_manager_disappeared (NM_MODEM_MANAGER (user_data)); } } @@ -420,23 +423,21 @@ nm_modem_manager_class_init (NMModemManagerClass *klass) object_class->dispose = dispose; /* signals */ - signals[DEVICE_ADDED] = - g_signal_new ("device-added", + signals[MODEM_ADDED] = + g_signal_new ("modem-added", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (NMModemManagerClass, device_added), + G_STRUCT_OFFSET (NMModemManagerClass, modem_added), NULL, NULL, - g_cclosure_marshal_VOID__OBJECT, - G_TYPE_NONE, 1, - G_TYPE_OBJECT); + _nm_marshal_VOID__OBJECT_STRING, + G_TYPE_NONE, 2, G_TYPE_OBJECT, G_TYPE_STRING); - signals[DEVICE_REMOVED] = - g_signal_new ("device-removed", + signals[MODEM_REMOVED] = + g_signal_new ("modem-removed", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (NMModemManagerClass, device_removed), + G_STRUCT_OFFSET (NMModemManagerClass, modem_removed), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, - G_TYPE_NONE, 1, - G_TYPE_OBJECT); + G_TYPE_NONE, 1, G_TYPE_OBJECT); } diff --git a/src/modem-manager/nm-modem-manager.h b/src/modem-manager/nm-modem-manager.h index 34e99f1ec8..56427baf0d 100644 --- a/src/modem-manager/nm-modem-manager.h +++ b/src/modem-manager/nm-modem-manager.h @@ -1,10 +1,30 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager -- Network link manager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009 Novell, Inc. + * Copyright (C) 2009 Canonical Ltd. + */ #ifndef NM_MODEM_MANAGER_H #define NM_MODEM_MANAGER_H #include -#include "nm-device.h" +#include "nm-modem.h" #define NM_TYPE_MODEM_MANAGER (nm_modem_manager_get_type ()) #define NM_MODEM_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_MODEM_MANAGER, NMModemManager)) @@ -21,18 +41,13 @@ typedef struct { GObjectClass parent; /* Signals */ - void (*device_added) (NMModemManager *manager, - NMDevice *device); + void (*modem_added) (NMModemManager *manager, NMModem *modem, const char *driver); - void (*device_removed) (NMModemManager *manager, - NMDevice *device); + void (*modem_removed) (NMModemManager *manager, NMModem *modem); } NMModemManagerClass; GType nm_modem_manager_get_type (void); NMModemManager *nm_modem_manager_get (void); -gboolean nm_modem_manager_has_modem_for_iface (NMModemManager *manager, - const gchar *iface); - #endif /* NM_MODEM_MANAGER_H */ diff --git a/src/modem-manager/nm-modem-types.h b/src/modem-manager/nm-modem-types.h index a251d2a953..e805cb2135 100644 --- a/src/modem-manager/nm-modem-types.h +++ b/src/modem-manager/nm-modem-types.h @@ -1,4 +1,22 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager -- Network link manager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2009 Novell, Inc. + */ #ifndef NM_MODEM_TYPES_H #define NM_MODEM_TYPES_H diff --git a/src/modem-manager/nm-modem.c b/src/modem-manager/nm-modem.c index d7187ab6ff..e07b818bbb 100644 --- a/src/modem-manager/nm-modem.c +++ b/src/modem-manager/nm-modem.c @@ -1,32 +1,48 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager -- Network link manager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2009 - 2010 Red Hat, Inc. + * Copyright (C) 2009 Novell, Inc. + */ #include #include "nm-modem.h" -#include "nm-device-private.h" -#include "NetworkManagerSystem.h" -#include "nm-device-interface.h" +#include "nm-system.h" #include "nm-dbus-manager.h" #include "nm-setting-connection.h" -#include "nm-setting-gsm.h" -#include "nm-setting-cdma.h" #include "nm-marshal.h" #include "nm-properties-changed-signal.h" #include "nm-modem-types.h" -#include "nm-utils.h" -#include "nm-serial-device-glue.h" +#include "nm-logging.h" #include "NetworkManagerUtils.h" +#include "nm-device-private.h" +#include "nm-device-interface.h" #include "nm-dbus-glib-types.h" -static void device_interface_init (NMDeviceInterface *iface_class); +#include "nm-serial-device-glue.h" -G_DEFINE_TYPE_EXTENDED (NMModem, nm_modem, NM_TYPE_DEVICE, 0, - G_IMPLEMENT_INTERFACE (NM_TYPE_DEVICE_INTERFACE, device_interface_init)) +G_DEFINE_TYPE (NMModem, nm_modem, G_TYPE_OBJECT) #define NM_MODEM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_MODEM, NMModemPrivate)) enum { PROP_0, PROP_DEVICE, + PROP_IFACE, PROP_PATH, PROP_IP_METHOD, PROP_ENABLED, @@ -44,6 +60,11 @@ typedef struct { NMIP4Config *pending_ip4_config; guint32 ip_method; char *device; + char *iface; + + guint32 secrets_tries; + + DBusGProxyCall *call; gboolean mm_enabled; @@ -54,7 +75,10 @@ typedef struct { enum { PPP_STATS, - PROPERTIES_CHANGED, + PPP_FAILED, + PREPARE_RESULT, + IP4_CONFIG_RESULT, + NEED_AUTH, LAST_SIGNAL }; @@ -101,17 +125,19 @@ nm_modem_get_proxy (NMModem *self, return priv->proxy; } -const char * -nm_modem_get_ppp_name (NMModem *self, - NMConnection *connection) +static void +merge_ip4_config (NMActRequest *req, NMIP4Config *config) { - g_return_val_if_fail (NM_IS_MODEM (self), NULL); - g_return_val_if_fail (NM_IS_CONNECTION (connection), NULL); + NMConnection *connection; + NMSettingIP4Config *s_ip4; - if (NM_MODEM_GET_CLASS (self)->get_ppp_name) - return NM_MODEM_GET_CLASS (self)->get_ppp_name (self, connection); + /* Merge user-defined overrides into the IP4Config to be applied */ + connection = nm_act_request_get_connection (req); + g_assert (connection); - return NULL; + s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG); + if (s_ip4) + nm_utils_merge_ip4_config (config, s_ip4); } /*****************************************************************************/ @@ -120,14 +146,12 @@ nm_modem_get_ppp_name (NMModem *self, static void ppp_state_changed (NMPPPManager *ppp_manager, NMPPPStatus status, gpointer user_data) { - NMDevice *device = NM_DEVICE (user_data); - switch (status) { case NM_PPP_STATUS_DISCONNECT: - nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_PPP_DISCONNECT); + g_signal_emit (NM_MODEM (user_data), signals[PPP_FAILED], 0, NM_DEVICE_STATE_REASON_PPP_DISCONNECT); break; case NM_PPP_STATUS_DEAD: - nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_PPP_FAILED); + g_signal_emit (NM_MODEM (user_data), signals[PPP_FAILED], 0, NM_DEVICE_STATE_REASON_PPP_FAILED); break; default: break; @@ -140,7 +164,8 @@ ppp_ip4_config (NMPPPManager *ppp_manager, NMIP4Config *config, gpointer user_data) { - NMDevice *device = NM_DEVICE (user_data); + NMModem *self = NM_MODEM (user_data); + NMModemPrivate *priv = NM_MODEM_GET_PRIVATE (self); guint32 i, num; guint32 bad_dns1 = htonl (0x0A0B0C0D); guint32 good_dns1 = htonl (0x04020201); /* GTE nameserver */ @@ -148,10 +173,6 @@ ppp_ip4_config (NMPPPManager *ppp_manager, guint32 good_dns2 = htonl (0x04020202); /* GTE nameserver */ gboolean dns_workaround = FALSE; - /* Ignore PPP IP4 events that come in after initial configuration */ - if (nm_device_get_state (device) != NM_DEVICE_STATE_IP_CONFIG) - return; - /* Work around a PPP bug (#1732) which causes many mobile broadband * providers to return 10.11.12.13 and 10.11.12.14 for the DNS servers. * Apparently fixed in ppp-2.4.5 but we've had some reports that this is @@ -182,14 +203,14 @@ ppp_ip4_config (NMPPPManager *ppp_manager, } if (!num || dns_workaround) { + nm_log_warn (LOGD_PPP, "compensating for invalid PPP-provided nameservers"); nm_ip4_config_reset_nameservers (config); nm_ip4_config_add_nameserver (config, good_dns1); nm_ip4_config_add_nameserver (config, good_dns2); } - nm_device_set_ip_iface (device, iface); - NM_MODEM_GET_PRIVATE (device)->pending_ip4_config = g_object_ref (config); - nm_device_activate_schedule_stage4_ip4_config_get (device); + priv->pending_ip4_config = g_object_ref (config); + g_signal_emit (self, signals[IP4_CONFIG_RESULT], 0, iface, config, NULL); } static void @@ -210,36 +231,47 @@ ppp_stats (NMPPPManager *ppp_manager, } static NMActStageReturn -ppp_stage3_ip4_config_start (NMDevice *device, NMDeviceStateReason *reason) +ppp_stage3_ip4_config_start (NMModem *self, + NMActRequest *req, + NMDeviceStateReason *reason) { - NMModemPrivate *priv = NM_MODEM_GET_PRIVATE (device); - NMActRequest *req; + NMModemPrivate *priv = NM_MODEM_GET_PRIVATE (self); const char *ppp_name = NULL; - GError *err = NULL; + GError *error = NULL; NMActStageReturn ret; - req = nm_device_get_act_request (device); - g_assert (req); + g_return_val_if_fail (self != NULL, NM_ACT_STAGE_RETURN_FAILURE); + g_return_val_if_fail (NM_IS_MODEM (self), NM_ACT_STAGE_RETURN_FAILURE); + g_return_val_if_fail (req != NULL, NM_ACT_STAGE_RETURN_FAILURE); + g_return_val_if_fail (NM_IS_ACT_REQUEST (req), NM_ACT_STAGE_RETURN_FAILURE); + g_return_val_if_fail (reason != NULL, NM_ACT_STAGE_RETURN_FAILURE); - ppp_name = nm_modem_get_ppp_name (NM_MODEM (device), - nm_act_request_get_connection (req)); + if (NM_MODEM_GET_CLASS (self)->get_user_pass) { + NMConnection *connection = nm_act_request_get_connection (req); - priv->ppp_manager = nm_ppp_manager_new (nm_device_get_iface (device)); - if (nm_ppp_manager_start (priv->ppp_manager, req, ppp_name, 20, &err)) { + g_assert (connection); + if (!NM_MODEM_GET_CLASS (self)->get_user_pass (self, connection, &ppp_name, NULL)) + return NM_ACT_STAGE_RETURN_FAILURE; + } + + priv->ppp_manager = nm_ppp_manager_new (priv->iface); + if (nm_ppp_manager_start (priv->ppp_manager, req, ppp_name, 20, &error)) { g_signal_connect (priv->ppp_manager, "state-changed", G_CALLBACK (ppp_state_changed), - device); + self); g_signal_connect (priv->ppp_manager, "ip4-config", G_CALLBACK (ppp_ip4_config), - device); + self); g_signal_connect (priv->ppp_manager, "stats", G_CALLBACK (ppp_stats), - device); + self); ret = NM_ACT_STAGE_RETURN_POSTPONE; } else { - nm_warning ("%s", err->message); - g_error_free (err); + nm_log_err (LOGD_PPP, "error starting PPP: (%d) %s", + error ? error->code : -1, + error && error->message ? error->message : "(unknown)"); + g_error_free (error); g_object_unref (priv->ppp_manager); priv->ppp_manager = NULL; @@ -252,20 +284,17 @@ ppp_stage3_ip4_config_start (NMDevice *device, NMDeviceStateReason *reason) } static NMActStageReturn -ppp_stage4 (NMDevice *device, NMIP4Config **config, NMDeviceStateReason *reason) +ppp_stage4 (NMModem *self, + NMActRequest *req, + NMIP4Config **config, + NMDeviceStateReason *reason) { - NMModemPrivate *priv = NM_MODEM_GET_PRIVATE (device); - NMConnection *connection; - NMSettingIP4Config *s_ip4; + NMModemPrivate *priv = NM_MODEM_GET_PRIVATE (self); *config = priv->pending_ip4_config; priv->pending_ip4_config = NULL; - /* Merge user-defined overrides into the IP4Config to be applied */ - connection = nm_act_request_get_connection (nm_device_get_act_request (device)); - g_assert (connection); - s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG); - nm_utils_merge_ip4_config (*config, s_ip4); + merge_ip4_config (req, *config); return NM_ACT_STAGE_RETURN_SUCCESS; } @@ -274,57 +303,75 @@ ppp_stage4 (NMDevice *device, NMIP4Config **config, NMDeviceStateReason *reason) /* IP method static */ static void -static_stage3_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) +static_stage3_done (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data) { - NMDevice *device = NM_DEVICE (user_data); + NMModem *self = NM_MODEM (user_data); + NMModemPrivate *priv = NM_MODEM_GET_PRIVATE (self); GValueArray *ret_array = NULL; GError *error = NULL; + NMIP4Config *config = NULL; - if (dbus_g_proxy_end_call (proxy, call_id, &error, + priv->call = NULL; + + if (dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_VALUE_ARRAY, &ret_array, G_TYPE_INVALID)) { - - NMModemPrivate *priv = NM_MODEM_GET_PRIVATE (device); NMIP4Address *addr; int i; + config = nm_ip4_config_new (); + addr = nm_ip4_address_new (); nm_ip4_address_set_address (addr, g_value_get_uint (g_value_array_get_nth (ret_array, 0))); nm_ip4_address_set_prefix (addr, 32); + nm_ip4_config_take_address (config, addr); - priv->pending_ip4_config = nm_ip4_config_new (); - nm_ip4_config_take_address (priv->pending_ip4_config, addr); - - for (i = 1; i < ret_array->n_values; i++) - nm_ip4_config_add_nameserver (priv->pending_ip4_config, - g_value_get_uint (g_value_array_get_nth (ret_array, i))); + for (i = 0; i < ret_array->n_values; i++) { + GValue *value = g_value_array_get_nth (ret_array, i); + nm_ip4_config_add_nameserver (config, g_value_get_uint (value)); + } g_value_array_free (ret_array); - nm_device_activate_schedule_stage4_ip4_config_get (device); - } else { - nm_warning ("Retrieving IP4 configuration failed: %s", error->message); - g_error_free (error); - nm_device_state_changed (device, - NM_DEVICE_STATE_FAILED, - NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE); + + priv->pending_ip4_config = g_object_ref (config); + g_signal_emit (self, signals[IP4_CONFIG_RESULT], 0, NULL, config, NULL); } + + g_signal_emit (self, signals[IP4_CONFIG_RESULT], 0, NULL, config, error); + g_clear_error (&error); } static NMActStageReturn -static_stage3_ip4_config_start (NMDevice *device, NMDeviceStateReason *reason) +static_stage3_ip4_config_start (NMModem *self, + NMActRequest *req, + NMDeviceStateReason *reason) { - dbus_g_proxy_begin_call (nm_modem_get_proxy (NM_MODEM (device), MM_DBUS_INTERFACE_MODEM), - "GetIP4Config", static_stage3_done, - device, NULL, - G_TYPE_INVALID); + NMModemPrivate *priv; + + g_return_val_if_fail (self != NULL, NM_ACT_STAGE_RETURN_FAILURE); + g_return_val_if_fail (NM_IS_MODEM (self), NM_ACT_STAGE_RETURN_FAILURE); + g_return_val_if_fail (req != NULL, NM_ACT_STAGE_RETURN_FAILURE); + g_return_val_if_fail (NM_IS_ACT_REQUEST (req), NM_ACT_STAGE_RETURN_FAILURE); + g_return_val_if_fail (reason != NULL, NM_ACT_STAGE_RETURN_FAILURE); + + priv = NM_MODEM_GET_PRIVATE (self); + + priv->call = dbus_g_proxy_begin_call (nm_modem_get_proxy (self, MM_DBUS_INTERFACE_MODEM), + "GetIP4Config", static_stage3_done, + self, NULL, + G_TYPE_INVALID); return NM_ACT_STAGE_RETURN_POSTPONE; } static NMActStageReturn -static_stage4 (NMDevice *device, NMIP4Config **config, NMDeviceStateReason *reason) +static_stage4 (NMModem *self, + NMActRequest *req, + NMDevice *device, + NMIP4Config **config, + NMDeviceStateReason *reason) { - NMModemPrivate *priv = NM_MODEM_GET_PRIVATE (device); + NMModemPrivate *priv = NM_MODEM_GET_PRIVATE (self); gboolean no_firmware = FALSE; if (!nm_device_hw_bring_up (device, TRUE, &no_firmware)) { @@ -338,28 +385,47 @@ static_stage4 (NMDevice *device, NMIP4Config **config, NMDeviceStateReason *reas *config = priv->pending_ip4_config; priv->pending_ip4_config = NULL; + merge_ip4_config (req, *config); + return NM_ACT_STAGE_RETURN_SUCCESS; } /*****************************************************************************/ -static NMActStageReturn -real_act_stage3_ip4_config_start (NMDevice *device, NMDeviceStateReason *reason) +NMActStageReturn +nm_modem_stage3_ip4_config_start (NMModem *self, + NMDevice *device, + NMDeviceClass *device_class, + NMDeviceStateReason *reason) { + NMModemPrivate *priv; + NMActRequest *req; NMActStageReturn ret; - switch (NM_MODEM_GET_PRIVATE (device)->ip_method) { + g_return_val_if_fail (self != NULL, NM_ACT_STAGE_RETURN_FAILURE); + g_return_val_if_fail (NM_IS_MODEM (self), NM_ACT_STAGE_RETURN_FAILURE); + g_return_val_if_fail (device != NULL, NM_ACT_STAGE_RETURN_FAILURE); + g_return_val_if_fail (NM_IS_DEVICE (device), NM_ACT_STAGE_RETURN_FAILURE); + g_return_val_if_fail (device_class != NULL, NM_ACT_STAGE_RETURN_FAILURE); + g_return_val_if_fail (NM_IS_DEVICE_CLASS (device_class), NM_ACT_STAGE_RETURN_FAILURE); + g_return_val_if_fail (reason != NULL, NM_ACT_STAGE_RETURN_FAILURE); + + req = nm_device_get_act_request (device); + g_assert (req); + + priv = NM_MODEM_GET_PRIVATE (self); + switch (priv->ip_method) { case MM_MODEM_IP_METHOD_PPP: - ret = ppp_stage3_ip4_config_start (device, reason); + ret = ppp_stage3_ip4_config_start (self, req, reason); break; case MM_MODEM_IP_METHOD_STATIC: - ret = static_stage3_ip4_config_start (device, reason); + ret = static_stage3_ip4_config_start (self, req, reason); break; case MM_MODEM_IP_METHOD_DHCP: - ret = NM_DEVICE_CLASS (nm_modem_parent_class)->act_stage3_ip4_config_start (device, reason); + ret = device_class->act_stage3_ip4_config_start (device, reason); break; default: - g_warning ("Invalid IP method"); + nm_log_err (LOGD_MB, "unknown IP method %d", priv->ip_method); ret = NM_ACT_STAGE_RETURN_FAILURE; break; } @@ -367,25 +433,41 @@ real_act_stage3_ip4_config_start (NMDevice *device, NMDeviceStateReason *reason) return ret; } -static NMActStageReturn -real_act_stage4_get_ip4_config (NMDevice *device, +NMActStageReturn +nm_modem_stage4_get_ip4_config (NMModem *self, + NMDevice *device, + NMDeviceClass *device_class, NMIP4Config **config, NMDeviceStateReason *reason) { + NMModemPrivate *priv; + NMActRequest *req; NMActStageReturn ret; - switch (NM_MODEM_GET_PRIVATE (device)->ip_method) { + g_return_val_if_fail (self != NULL, NM_ACT_STAGE_RETURN_FAILURE); + g_return_val_if_fail (NM_IS_MODEM (self), NM_ACT_STAGE_RETURN_FAILURE); + g_return_val_if_fail (device != NULL, NM_ACT_STAGE_RETURN_FAILURE); + g_return_val_if_fail (NM_IS_DEVICE (device), NM_ACT_STAGE_RETURN_FAILURE); + g_return_val_if_fail (device_class != NULL, NM_ACT_STAGE_RETURN_FAILURE); + g_return_val_if_fail (NM_IS_DEVICE_CLASS (device_class), NM_ACT_STAGE_RETURN_FAILURE); + g_return_val_if_fail (reason != NULL, NM_ACT_STAGE_RETURN_FAILURE); + + req = nm_device_get_act_request (device); + g_assert (req); + + priv = NM_MODEM_GET_PRIVATE (self); + switch (priv->ip_method) { case MM_MODEM_IP_METHOD_PPP: - ret = ppp_stage4 (device, config, reason); + ret = ppp_stage4 (self, req, config, reason); break; case MM_MODEM_IP_METHOD_STATIC: - ret = static_stage4 (device, config, reason); + ret = static_stage4 (self, req, device, config, reason); break; case MM_MODEM_IP_METHOD_DHCP: - ret = NM_DEVICE_CLASS (nm_modem_parent_class)->act_stage4_get_ip4_config (device, config, reason); + ret = device_class->act_stage4_get_ip4_config (device, config, reason); break; default: - g_warning ("Invalid IP method"); + nm_log_err (LOGD_MB, "unknown IP method %d", priv->ip_method); ret = NM_ACT_STAGE_RETURN_FAILURE; break; } @@ -393,12 +475,175 @@ real_act_stage4_get_ip4_config (NMDevice *device, return ret; } -static void -real_deactivate_quickly (NMDevice *device) +gboolean +nm_modem_connection_secrets_updated (NMModem *self, + NMActRequest *req, + NMConnection *connection, + GSList *updated_settings, + RequestSecretsCaller caller) { - NMModemPrivate *priv = NM_MODEM_GET_PRIVATE (device); + NMModemPrivate *priv; + gboolean found = FALSE; + const char *setting_name; + GSList *iter; + + g_return_val_if_fail (self != NULL, FALSE); + g_return_val_if_fail (NM_IS_MODEM (self), FALSE); + g_return_val_if_fail (req != NULL, FALSE); + g_return_val_if_fail (NM_IS_ACT_REQUEST (req), FALSE); + g_return_val_if_fail (connection != NULL, FALSE); + g_return_val_if_fail (NM_IS_ACT_REQUEST (req), FALSE); + + priv = NM_MODEM_GET_PRIVATE (self); + + if (caller == SECRETS_CALLER_PPP) { + const char *user = NULL; + const char *pass = NULL; + + g_return_val_if_fail (priv->ppp_manager != NULL, FALSE); + + if (!NM_MODEM_GET_CLASS (self)->get_user_pass (self, connection, &user, &pass)) { + /* Shouldn't ever happen */ + nm_ppp_manager_update_secrets (priv->ppp_manager, + priv->iface, + NULL, + NULL, + "missing GSM/CDMA setting; no secrets could be found."); + } else { + nm_ppp_manager_update_secrets (priv->ppp_manager, + priv->iface, + user ? user : "", + pass ? pass : "", + NULL); + } + return TRUE; + } + + g_return_val_if_fail (caller == SECRETS_CALLER_MOBILE_BROADBAND, FALSE); + + g_assert (NM_MODEM_GET_CLASS (self)->get_setting_name); + setting_name = NM_MODEM_GET_CLASS (self)->get_setting_name (self); + + for (iter = updated_settings; iter; iter = g_slist_next (iter)) { + const char *candidate_setting_name = (const char *) iter->data; + + if (!strcmp (candidate_setting_name, setting_name)) + found = TRUE; + else { + nm_log_warn (LOGD_MB, "ignoring updated secrets for setting '%s'.", + candidate_setting_name); + } + } + + return found; +} + +static NMActStageReturn +real_act_stage1_prepare (NMModem *modem, + NMActRequest *req, + GPtrArray **out_hints, + const char **out_setting_name, + NMDeviceStateReason *reason) +{ + *reason = NM_DEVICE_STATE_REASON_UNKNOWN; + return NM_ACT_STAGE_RETURN_FAILURE; +} + +NMActStageReturn +nm_modem_act_stage1_prepare (NMModem *self, + NMActRequest *req, + NMDeviceStateReason *reason) +{ + NMModemPrivate *priv = NM_MODEM_GET_PRIVATE (self); + NMActStageReturn ret; + GPtrArray *hints = NULL; + const char *setting_name = NULL; + + ret = NM_MODEM_GET_CLASS (self)->act_stage1_prepare (self, + req, + &hints, + &setting_name, + reason); + if ((ret == NM_ACT_STAGE_RETURN_POSTPONE) && setting_name) { + const char *hint1 = NULL, *hint2 = NULL; + + /* Need some secrets */ + if (hints) { + if (hints->len > 0) + hint1 = g_ptr_array_index (hints, 0); + if (hints->len > 1) + hint2 = g_ptr_array_index (hints, 1); + } + + g_signal_emit (self, signals[NEED_AUTH], 0, + setting_name, + priv->secrets_tries++ ? TRUE : FALSE, + SECRETS_CALLER_MOBILE_BROADBAND, + hint1, + hint2); + + if (hints) + g_ptr_array_free (hints, TRUE); + } + + return ret; +} + +NMActStageReturn +nm_modem_act_stage2_config (NMModem *self, + NMActRequest *req, + NMDeviceStateReason *reason) +{ + NMModemPrivate *priv = NM_MODEM_GET_PRIVATE (self); + + /* Clear secrets tries counter since secrets were successfully used + * already if we get here. + */ + priv->secrets_tries = 0; + + return NM_ACT_STAGE_RETURN_SUCCESS; +} + +NMConnection * +nm_modem_get_best_auto_connection (NMModem *self, + GSList *connections, + char **specific_object) +{ + if (NM_MODEM_GET_CLASS (self)->get_best_auto_connection) + return NM_MODEM_GET_CLASS (self)->get_best_auto_connection (self, connections, specific_object); + return NULL; +} + +gboolean +nm_modem_check_connection_compatible (NMModem *self, + NMConnection *connection, + GError **error) +{ + if (NM_MODEM_GET_CLASS (self)->check_connection_compatible) + return NM_MODEM_GET_CLASS (self)->check_connection_compatible (self, connection, error); + return FALSE; +} + +static void +real_deactivate_quickly (NMModem *self, NMDevice *device) +{ + NMModemPrivate *priv; const char *iface; + g_return_if_fail (self != NULL); + g_return_if_fail (NM_IS_MODEM (self)); + g_return_if_fail (device != NULL); + g_return_if_fail (NM_IS_DEVICE (device)); + + priv = NM_MODEM_GET_PRIVATE (self); + + priv->secrets_tries = 0; + + if (priv->call) { + dbus_g_proxy_cancel_call (priv->proxy, priv->call); + priv->call = NULL; + } + if (priv->pending_ip4_config) { g_object_unref (priv->pending_ip4_config); priv->pending_ip4_config = NULL; @@ -406,7 +651,7 @@ real_deactivate_quickly (NMDevice *device) priv->in_bytes = priv->out_bytes = 0; - switch (NM_MODEM_GET_PRIVATE (device)->ip_method) { + switch (priv->ip_method) { case MM_MODEM_IP_METHOD_PPP: if (priv->ppp_manager) { g_object_unref (priv->ppp_manager); @@ -415,45 +660,54 @@ real_deactivate_quickly (NMDevice *device) break; case MM_MODEM_IP_METHOD_STATIC: case MM_MODEM_IP_METHOD_DHCP: - iface = nm_device_get_iface (device); - - nm_system_device_flush_routes_with_iface (iface); + iface = nm_device_get_ip_iface (device); + /* FIXME: use AF_UNSPEC here when we have IPv6 support */ + nm_system_device_flush_routes_with_iface (iface, AF_INET); nm_system_device_flush_addresses_with_iface (iface); nm_system_device_set_up_down_with_iface (iface, FALSE, NULL); break; default: - g_warning ("Invalid IP method"); + nm_log_err (LOGD_MB, "unknown IP method %d", priv->ip_method); break; } - - if (NM_DEVICE_CLASS (nm_modem_parent_class)->deactivate) - NM_DEVICE_CLASS (nm_modem_parent_class)->deactivate (device); } -static guint32 -real_get_generic_capabilities (NMDevice *dev) +void +nm_modem_deactivate_quickly (NMModem *self, NMDevice *device) { - return NM_DEVICE_CAP_NM_SUPPORTED; + NM_MODEM_GET_CLASS (self)->deactivate_quickly (self, device); } static void -device_state_changed (NMDeviceInterface *device, - NMDeviceState new_state, - NMDeviceState old_state, - NMDeviceStateReason reason, - gpointer user_data) +disconnect_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) +{ + GError *error = NULL; + + if (!dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_INVALID)) { + nm_log_info (LOGD_MB, "disconnect failed: (%d) %s", + error ? error->code : -1, + error && error->message ? error->message : "(unknown)"); + } +} + +void +nm_modem_device_state_changed (NMModem *self, + NMDeviceState new_state, + NMDeviceState old_state, + NMDeviceStateReason reason) { - NMModem *self = NM_MODEM (user_data); - NMModemPrivate *priv = NM_MODEM_GET_PRIVATE (self); gboolean was_connected = FALSE; + g_return_if_fail (self != NULL); + g_return_if_fail (NM_IS_MODEM (self)); + if (IS_ACTIVATING_STATE (old_state) || (old_state == NM_DEVICE_STATE_ACTIVATED)) was_connected = TRUE; /* Make sure we don't leave the serial device open */ switch (new_state) { case NM_DEVICE_STATE_NEED_AUTH: - if (priv->ppp_manager) + if (NM_MODEM_GET_PRIVATE (self)->ppp_manager) break; /* else fall through */ case NM_DEVICE_STATE_UNMANAGED: @@ -461,9 +715,12 @@ device_state_changed (NMDeviceInterface *device, case NM_DEVICE_STATE_FAILED: case NM_DEVICE_STATE_DISCONNECTED: if (was_connected) { - dbus_g_proxy_call_no_reply (nm_modem_get_proxy (self, MM_DBUS_INTERFACE_MODEM), - "Disconnect", - G_TYPE_INVALID); + dbus_g_proxy_begin_call (nm_modem_get_proxy (self, MM_DBUS_INTERFACE_MODEM), + "Disconnect", + disconnect_done, + self, + NULL, + G_TYPE_INVALID); } break; default: @@ -471,13 +728,13 @@ device_state_changed (NMDeviceInterface *device, } } -static gboolean -real_hw_is_up (NMDevice *device) +gboolean +nm_modem_hw_is_up (NMModem *self, NMDevice *device) { - guint32 ip_method = NM_MODEM_GET_PRIVATE (device)->ip_method; + guint32 ip_method = NM_MODEM_GET_PRIVATE (self)->ip_method; if (ip_method == MM_MODEM_IP_METHOD_STATIC || ip_method == MM_MODEM_IP_METHOD_DHCP) { - NMModemPrivate *priv = NM_MODEM_GET_PRIVATE (device); + NMModemPrivate *priv = NM_MODEM_GET_PRIVATE (self); NMDeviceState state; state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (device)); @@ -488,13 +745,13 @@ real_hw_is_up (NMDevice *device) return TRUE; } -static gboolean -real_hw_bring_up (NMDevice *device, gboolean *no_firmware) +gboolean +nm_modem_hw_bring_up (NMModem *self, NMDevice *device, gboolean *no_firmware) { - guint32 ip_method = NM_MODEM_GET_PRIVATE (device)->ip_method; + guint32 ip_method = NM_MODEM_GET_PRIVATE (self)->ip_method; if (ip_method == MM_MODEM_IP_METHOD_STATIC || ip_method == MM_MODEM_IP_METHOD_DHCP) { - NMModemPrivate *priv = NM_MODEM_GET_PRIVATE (device); + NMModemPrivate *priv = NM_MODEM_GET_PRIVATE (self); NMDeviceState state; state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (device)); @@ -505,6 +762,24 @@ real_hw_bring_up (NMDevice *device, gboolean *no_firmware) return TRUE; } +const char * +nm_modem_get_iface (NMModem *self) +{ + g_return_val_if_fail (self != NULL, NULL); + g_return_val_if_fail (NM_IS_MODEM (self), NULL); + + return NM_MODEM_GET_PRIVATE (self)->iface; +} + +const char * +nm_modem_get_path (NMModem *self) +{ + g_return_val_if_fail (self != NULL, NULL); + g_return_val_if_fail (NM_IS_MODEM (self), NULL); + + return NM_MODEM_GET_PRIVATE (self)->path; +} + static void get_mm_enabled_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) { @@ -515,10 +790,9 @@ get_mm_enabled_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_d if (!dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_VALUE, &value, G_TYPE_INVALID)) { - g_warning ("%s: failed get modem enabled state: (%d) %s", - __func__, - error ? error->code : -1, - error && error->message ? error->message : "(unknown)"); + nm_log_warn (LOGD_MB, "failed get modem enabled state: (%d) %s", + error ? error->code : -1, + error && error->message ? error->message : "(unknown)"); return; } @@ -526,7 +800,7 @@ get_mm_enabled_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_d NM_MODEM_GET_PRIVATE (self)->mm_enabled = g_value_get_boolean (&value); g_object_notify (G_OBJECT (self), NM_MODEM_ENABLED); } else - g_warning ("%s: failed get modem enabled state: unexpected reply type", __func__); + nm_log_warn (LOGD_MB, "failed get modem enabled state: unexpected reply type"); g_value_unset (&value); } @@ -548,21 +822,24 @@ set_mm_enabled_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_d GError *error = NULL; if (!dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_INVALID)) { - g_warning ("%s: failed to enable/disable modem: (%d) %s", - __func__, - error ? error->code : -1, - error && error->message ? error->message : "(unknown)"); + nm_log_warn (LOGD_MB, "failed to enable/disable modem: (%d) %s", + error ? error->code : -1, + error && error->message ? error->message : "(unknown)"); } /* Update enabled/disabled state again */ query_mm_enabled (NM_MODEM (user_data)); } -static void -real_set_enabled (NMDeviceInterface *device, gboolean enabled) +void +nm_modem_set_mm_enabled (NMModem *self, gboolean enabled) { - NMModem *self = NM_MODEM (device); - NMModemPrivate *priv = NM_MODEM_GET_PRIVATE (self); + NMModemPrivate *priv; + + g_return_if_fail (self != NULL); + g_return_if_fail (NM_IS_MODEM (self)); + + priv = NM_MODEM_GET_PRIVATE (self); /* FIXME: For now this just toggles the ModemManager enabled state. In the * future we want to tie this into rfkill state instead so that the user can @@ -572,10 +849,10 @@ real_set_enabled (NMDeviceInterface *device, gboolean enabled) if (priv->mm_enabled != enabled) { DBusGProxy *proxy; - proxy = nm_modem_get_proxy (NM_MODEM (device), MM_DBUS_INTERFACE_MODEM); + proxy = nm_modem_get_proxy (self, MM_DBUS_INTERFACE_MODEM); dbus_g_proxy_begin_call (proxy, "Enable", set_mm_enabled_done, - device, NULL, + self, NULL, G_TYPE_BOOLEAN, enabled, G_TYPE_INVALID); } @@ -596,30 +873,13 @@ modem_properties_changed (DBusGProxy *proxy, value = g_hash_table_lookup (props, "Enabled"); if (value && G_VALUE_HOLDS_BOOLEAN (value)) { - NMDeviceState state; - priv->mm_enabled = g_value_get_boolean (value); g_object_notify (G_OBJECT (self), NM_MODEM_ENABLED); - - if (priv->mm_enabled == FALSE) { - state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (self)); - if (IS_ACTIVATING_STATE (state) || (state == NM_DEVICE_STATE_ACTIVATED)) { - nm_device_state_changed (NM_DEVICE (self), - NM_DEVICE_STATE_DISCONNECTED, - NM_DEVICE_STATE_REASON_NONE); - } - } } } /*****************************************************************************/ -static void -device_interface_init (NMDeviceInterface *iface_class) -{ - iface_class->set_enabled = real_set_enabled; -} - static void nm_modem_init (NMModem *self) { @@ -646,12 +906,17 @@ constructor (GType type, priv = NM_MODEM_GET_PRIVATE (object); if (!priv->device) { - g_warning ("Modem device not provided"); + nm_log_err (LOGD_HW, "modem parent device not provided"); + goto err; + } + + if (!priv->device) { + nm_log_err (LOGD_HW, "modem command interface not provided"); goto err; } if (!priv->path) { - g_warning ("DBus path not provided"); + nm_log_err (LOGD_HW, "D-Bus path not provided"); goto err; } @@ -677,8 +942,6 @@ constructor (GType type, object, NULL); - g_signal_connect (object, "state-changed", G_CALLBACK (device_state_changed), object); - query_mm_enabled (NM_MODEM (object)); return object; @@ -701,6 +964,9 @@ get_property (GObject *object, guint prop_id, case PROP_DEVICE: g_value_set_string (value, priv->device); break; + case PROP_IFACE: + g_value_set_string (value, priv->iface); + break; case PROP_IP_METHOD: g_value_set_uint (value, priv->ip_method); break; @@ -729,7 +995,12 @@ set_property (GObject *object, guint prop_id, /* Construct only */ priv->device = g_value_dup_string (value); break; + case PROP_IFACE: + /* Construct only */ + priv->iface = g_value_dup_string (value); + break; case PROP_IP_METHOD: + /* Construct only */ priv->ip_method = g_value_get_uint (value); break; case PROP_ENABLED: @@ -753,6 +1024,7 @@ finalize (GObject *object) g_object_unref (priv->dbus_mgr); + g_free (priv->iface); g_free (priv->path); g_free (priv->device); @@ -763,7 +1035,6 @@ static void nm_modem_class_init (NMModemClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - NMDeviceClass *device_class = NM_DEVICE_CLASS (klass); g_type_class_add_private (object_class, sizeof (NMModemPrivate)); @@ -773,12 +1044,8 @@ nm_modem_class_init (NMModemClass *klass) object_class->get_property = get_property; object_class->finalize = finalize; - device_class->get_generic_capabilities = real_get_generic_capabilities; - device_class->act_stage3_ip4_config_start = real_act_stage3_ip4_config_start; - device_class->act_stage4_get_ip4_config = real_act_stage4_get_ip4_config; - device_class->deactivate_quickly = real_deactivate_quickly; - device_class->hw_is_up = real_hw_is_up; - device_class->hw_bring_up = real_hw_bring_up; + klass->act_stage1_prepare = real_act_stage1_prepare; + klass->deactivate_quickly = real_deactivate_quickly; /* Properties */ g_object_class_install_property @@ -787,7 +1054,7 @@ nm_modem_class_init (NMModemClass *klass) "DBus path", "DBus path", NULL, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | NM_PROPERTY_PARAM_NO_EXPORT)); + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (object_class, PROP_DEVICE, @@ -795,7 +1062,15 @@ nm_modem_class_init (NMModemClass *klass) "Device", "Master modem parent device", NULL, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | NM_PROPERTY_PARAM_NO_EXPORT)); + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + g_object_class_install_property + (object_class, PROP_IFACE, + g_param_spec_string (NM_MODEM_IFACE, + "Interface", + "Modem command interface", + NULL, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (object_class, PROP_IP_METHOD, @@ -805,7 +1080,7 @@ nm_modem_class_init (NMModemClass *klass) MM_MODEM_IP_METHOD_PPP, MM_MODEM_IP_METHOD_DHCP, MM_MODEM_IP_METHOD_PPP, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | NM_PROPERTY_PARAM_NO_EXPORT)); + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (object_class, PROP_ENABLED, @@ -826,10 +1101,47 @@ nm_modem_class_init (NMModemClass *klass) G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT); - signals[PROPERTIES_CHANGED] = - nm_properties_changed_signal_new (object_class, - G_STRUCT_OFFSET (NMModemClass, properties_changed)); + signals[PPP_FAILED] = + g_signal_new ("ppp-failed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (NMModemClass, ppp_failed), + NULL, NULL, + g_cclosure_marshal_VOID__UINT, + G_TYPE_NONE, 1, G_TYPE_UINT); - dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (klass), - &dbus_glib_nm_serial_device_object_info); + signals[IP4_CONFIG_RESULT] = + g_signal_new (NM_MODEM_IP4_CONFIG_RESULT, + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (NMModemClass, ip4_config_result), + NULL, NULL, + _nm_marshal_VOID__STRING_OBJECT_POINTER, + G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_OBJECT, G_TYPE_POINTER); + + signals[PREPARE_RESULT] = + g_signal_new (NM_MODEM_PREPARE_RESULT, + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (NMModemClass, prepare_result), + NULL, NULL, + _nm_marshal_VOID__BOOLEAN_UINT, + G_TYPE_NONE, 2, G_TYPE_BOOLEAN, G_TYPE_UINT); + + signals[NEED_AUTH] = + g_signal_new (NM_MODEM_NEED_AUTH, + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (NMModemClass, need_auth), + NULL, NULL, + _nm_marshal_VOID__STRING_BOOLEAN_UINT_STRING_STRING, + G_TYPE_NONE, 5, + G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRING); } + +const DBusGObjectInfo * +nm_modem_get_serial_dbus_info (void) +{ + return &dbus_glib_nm_serial_device_object_info; +} + diff --git a/src/modem-manager/nm-modem.h b/src/modem-manager/nm-modem.h index fefc6347ca..a2aed57e00 100644 --- a/src/modem-manager/nm-modem.h +++ b/src/modem-manager/nm-modem.h @@ -1,11 +1,31 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager -- Network link manager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009 Novell, Inc. + */ #ifndef NM_MODEM_H #define NM_MODEM_H #include -#include +#include #include "ppp-manager/nm-ppp-manager.h" +#include "nm-device.h" G_BEGIN_DECLS @@ -18,36 +38,119 @@ G_BEGIN_DECLS #define NM_MODEM_PATH "path" #define NM_MODEM_DEVICE "device" +#define NM_MODEM_IFACE "iface" #define NM_MODEM_IP_METHOD "ip-method" #define NM_MODEM_ENABLED "enabled" +#define NM_MODEM_PPP_STATS "ppp-stats" +#define NM_MODEM_PPP_FAILED "ppp-failed" +#define NM_MODEM_PREPARE_RESULT "prepare-result" +#define NM_MODEM_IP4_CONFIG_RESULT "ip4-config-result" +#define NM_MODEM_NEED_AUTH "need-auth" + typedef struct { - NMDevice parent; + GObject parent; } NMModem; typedef struct { - NMDeviceClass parent; + GObjectClass parent; - const char *(*get_ppp_name) (NMModem *self, - NMConnection *connection); + gboolean (*get_user_pass) (NMModem *modem, + NMConnection *connection, + const char **user, + const char **pass); + + const char * (*get_setting_name) (NMModem *modem); + + gboolean (*check_connection_compatible) (NMModem *modem, + NMConnection *connection, + GError **error); + + NMConnection * (*get_best_auto_connection) (NMModem *modem, + GSList *connections, + char **specific_object); + + NMActStageReturn (*act_stage1_prepare) (NMModem *modem, + NMActRequest *req, + GPtrArray **out_hints, + const char **out_setting_name, + NMDeviceStateReason *reason); + + void (*deactivate_quickly) (NMModem *self, NMDevice *device); /* Signals */ - void (*ppp_stats) (NMModem *self, guint32 in_bytes, guint32 out_bytes); - void (*properties_changed) (NMModem *self, GHashTable *properties); + void (*ppp_stats) (NMModem *self, guint32 in_bytes, guint32 out_bytes); + void (*ppp_failed) (NMModem *self, NMDeviceStateReason reason); + + void (*prepare_result) (NMModem *self, gboolean success, NMDeviceStateReason reason); + void (*ip4_config_result) (NMModem *self, const char *iface, NMIP4Config *config, GError *error); + + void (*need_auth) (NMModem *self, + const char *setting_name, + gboolean retry, + RequestSecretsCaller caller, + const char *hint1, + const char *hint2); } NMModemClass; GType nm_modem_get_type (void); /* Protected */ -NMPPPManager *nm_modem_get_ppp_manager (NMModem *self); -DBusGProxy *nm_modem_get_proxy (NMModem *self, - const char *interface); +NMPPPManager *nm_modem_get_ppp_manager (NMModem *modem); +DBusGProxy * nm_modem_get_proxy (NMModem *modem, const char *interface); +const char * nm_modem_get_iface (NMModem *modem); +const char * nm_modem_get_path (NMModem *modem); -const char *nm_modem_get_ppp_name (NMModem *self, - NMConnection *connection); +NMConnection *nm_modem_get_best_auto_connection (NMModem *self, + GSList *connections, + char **specific_object); -gboolean nm_modem_get_mm_enabled (NMModem *self); +gboolean nm_modem_check_connection_compatible (NMModem *self, + NMConnection *connection, + GError **error); + +NMActStageReturn nm_modem_act_stage1_prepare (NMModem *modem, + NMActRequest *req, + NMDeviceStateReason *reason); + +NMActStageReturn nm_modem_act_stage2_config (NMModem *modem, + NMActRequest *req, + NMDeviceStateReason *reason); + +NMActStageReturn nm_modem_stage3_ip4_config_start (NMModem *modem, + NMDevice *device, + NMDeviceClass *device_class, + NMDeviceStateReason *reason); + +NMActStageReturn nm_modem_stage4_get_ip4_config (NMModem *modem, + NMDevice *device, + NMDeviceClass *device_class, + NMIP4Config **config, + NMDeviceStateReason *reason); + +void nm_modem_deactivate_quickly (NMModem *modem, NMDevice *device); + +void nm_modem_device_state_changed (NMModem *modem, + NMDeviceState new_state, + NMDeviceState old_state, + NMDeviceStateReason reason); + +gboolean nm_modem_hw_is_up (NMModem *modem, NMDevice *device); + +gboolean nm_modem_hw_bring_up (NMModem *modem, NMDevice *device, gboolean *no_firmware); + +gboolean nm_modem_connection_secrets_updated (NMModem *modem, + NMActRequest *req, + NMConnection *connection, + GSList *updated_settings, + RequestSecretsCaller caller); + +const DBusGObjectInfo *nm_modem_get_serial_dbus_info (void); + +gboolean nm_modem_get_mm_enabled (NMModem *self); + +void nm_modem_set_mm_enabled (NMModem *self, gboolean enabled); G_END_DECLS diff --git a/src/named-manager/Makefile.am b/src/named-manager/Makefile.am index fe1ec918d5..a33f7d50a9 100644 --- a/src/named-manager/Makefile.am +++ b/src/named-manager/Makefile.am @@ -1,4 +1,8 @@ -INCLUDES = -I${top_srcdir}/libnm-util -I${top_srcdir}/src -I${top_srcdir}/include +INCLUDES = \ + -I${top_srcdir}/src/logging \ + -I${top_srcdir}/libnm-util \ + -I${top_srcdir}/src \ + -I${top_srcdir}/include noinst_LTLIBRARIES = libnamed-manager.la @@ -10,4 +14,8 @@ libnamed_manager_la_CPPFLAGS = \ -DNM_PKGDATADIR=\"$(pkgdatadir)\" \ -DNM_LOCALSTATEDIR=\"$(localstatedir)\" -libnamed_manager_la_LIBADD = $(DBUS_LIBS) $(GLIB_LIBS) +libnamed_manager_la_LIBADD = \ + $(top_builddir)/src/logging/libnm-logging.la \ + $(DBUS_LIBS) \ + $(GLIB_LIBS) + diff --git a/src/named-manager/nm-named-manager.c b/src/named-manager/nm-named-manager.c index c96a2e691b..fc3b6e2c17 100644 --- a/src/named-manager/nm-named-manager.c +++ b/src/named-manager/nm-named-manager.c @@ -16,7 +16,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 2004 - 2005 Colin Walters - * Copyright (C) 2004 - 2008 Red Hat, Inc. + * Copyright (C) 2004 - 2010 Red Hat, Inc. * Copyright (C) 2005 - 2008 Novell, Inc. * and others */ @@ -38,8 +38,9 @@ #include "nm-named-manager.h" #include "nm-ip4-config.h" -#include "nm-utils.h" -#include "NetworkManagerSystem.h" +#include "nm-ip6-config.h" +#include "nm-logging.h" +#include "nm-system.h" #include "NetworkManagerUtils.h" #ifdef HAVE_SELINUX @@ -60,9 +61,11 @@ G_DEFINE_TYPE(NMNamedManager, nm_named_manager, G_TYPE_OBJECT) struct NMNamedManagerPrivate { - NMIP4Config * vpn_config; - NMIP4Config * device_config; - GSList * configs; + NMIP4Config *ip4_vpn_config; + NMIP4Config *ip4_device_config; + NMIP6Config *ip6_vpn_config; + NMIP6Config *ip6_device_config; + GSList *configs; }; @@ -71,11 +74,10 @@ nm_named_manager_get (void) { static NMNamedManager * singleton = NULL; - if (!singleton) { + if (!singleton) singleton = NM_NAMED_MANAGER (g_object_new (NM_TYPE_NAMED_MANAGER, NULL)); - } else { + else g_object_ref (singleton); - } g_assert (singleton); return singleton; @@ -98,6 +100,26 @@ typedef struct { GPtrArray *searches; } NMResolvConfData; +static void +add_string_item (GPtrArray *array, const char *str) +{ + int i; + + g_return_if_fail (array != NULL); + g_return_if_fail (str != NULL); + + /* Check for dupes before adding */ + for (i = 0; i < array->len; i++) { + const char *candidate = g_ptr_array_index (array, i); + + if (candidate && !strcmp (candidate, str)) + return; + } + + /* No dupes, add the new item */ + g_ptr_array_add (array, g_strdup (str)); +} + static void merge_one_ip4_config (NMResolvConfData *rc, NMIP4Config *src) { @@ -110,19 +132,22 @@ merge_one_ip4_config (NMResolvConfData *rc, NMIP4Config *src) addr.s_addr = nm_ip4_config_get_nameserver (src, i); if (inet_ntop (AF_INET, &addr, buf, INET_ADDRSTRLEN) > 0) - g_ptr_array_add (rc->nameservers, g_strdup (buf)); + add_string_item (rc->nameservers, buf); } num = nm_ip4_config_get_num_domains (src); for (i = 0; i < num; i++) { + const char *domain; + + domain = nm_ip4_config_get_domain (src, i); if (!rc->domain) - rc->domain = nm_ip4_config_get_domain (src, i); - g_ptr_array_add (rc->searches, g_strdup (nm_ip4_config_get_domain (src, i))); + rc->domain = domain; + add_string_item (rc->searches, domain); } num = nm_ip4_config_get_num_searches (src); for (i = 0; i < num; i++) - g_ptr_array_add (rc->searches, g_strdup (nm_ip4_config_get_search (src, i))); + add_string_item (rc->searches, nm_ip4_config_get_search (src, i)); } static void @@ -140,23 +165,26 @@ merge_one_ip6_config (NMResolvConfData *rc, NMIP6Config *src) /* inet_ntop is probably supposed to do this for us, but it doesn't */ if (IN6_IS_ADDR_V4MAPPED (addr)) { if (inet_ntop (AF_INET, &(addr->s6_addr32[3]), buf, INET_ADDRSTRLEN) > 0) - g_ptr_array_add (rc->nameservers, g_strdup (buf)); + add_string_item (rc->nameservers, buf); } else { if (inet_ntop (AF_INET6, addr, buf, INET6_ADDRSTRLEN) > 0) - g_ptr_array_add (rc->nameservers, g_strdup (buf)); + add_string_item (rc->nameservers, buf); } } num = nm_ip6_config_get_num_domains (src); for (i = 0; i < num; i++) { + const char *domain; + + domain = nm_ip6_config_get_domain (src, i); if (!rc->domain) - rc->domain = nm_ip6_config_get_domain (src, i); - g_ptr_array_add (rc->searches, g_strdup (nm_ip6_config_get_domain (src, i))); + rc->domain = domain; + add_string_item (rc->searches, domain); } num = nm_ip6_config_get_num_searches (src); for (i = 0; i < num; i++) - g_ptr_array_add (rc->searches, g_strdup (nm_ip6_config_get_search (src, i))); + add_string_item (rc->searches, nm_ip6_config_get_search (src, i)); } @@ -185,7 +213,7 @@ run_netconfig (GError **error, gint *stdin_fd) argv[4] = NULL; tmp = g_strjoinv (" ", argv); - nm_debug ("Spawning '%s'", tmp); + nm_log_dbg (LOGD_DNS, "spawning '%s'", tmp); g_free (tmp); if (!g_spawn_async_with_pipes (NULL, argv, NULL, 0, netconfig_child_setup, @@ -202,7 +230,7 @@ write_to_netconfig (gint fd, const char *key, const char *value) int x; str = g_strdup_printf ("%s='%s'\n", key, value); - nm_debug ("Writing to netconfig: %s", str); + nm_log_dbg (LOGD_DNS, "writing to netconfig: %s", str); x = write (fd, str, strlen (str)); g_free (str); } @@ -327,7 +355,7 @@ write_resolv_conf (FILE *f, const char *domain, } if (fprintf (f, "%s%s%s", - domain_str ? domain_str : "", + domain_str ? domain_str : "", searches_str ? searches_str : "", nameservers_str ? nameservers_str : "") != -1) retval = TRUE; @@ -356,7 +384,7 @@ dispatch_resolvconf (const char *domain, if (domain || searches || nameservers) { cmd = g_strconcat (RESOLVCONF_PATH, " -a ", "NetworkManager", NULL); - nm_info ("(%s): writing resolv.conf to %s", iface, RESOLVCONF_PATH); + nm_log_info (LOGD_DNS, "(%s): writing resolv.conf to %s", iface, RESOLVCONF_PATH); if ((f = popen (cmd, "w")) == NULL) g_set_error (error, NM_NAMED_MANAGER_ERROR, @@ -370,7 +398,7 @@ dispatch_resolvconf (const char *domain, } } else { cmd = g_strconcat (RESOLVCONF_PATH, " -d ", "NetworkManager", NULL); - nm_info ("(%s): removing resolv.conf from %s", iface, RESOLVCONF_PATH); + nm_log_info (LOGD_DNS, "(%s): removing resolv.conf from %s", iface, RESOLVCONF_PATH); if (nm_spawn_process (cmd) == 0) retval = TRUE; } @@ -488,25 +516,33 @@ rewrite_resolv_conf (NMNamedManager *mgr, const char *iface, GError **error) rc.domain = NULL; rc.searches = g_ptr_array_new (); - if (priv->vpn_config) - merge_one_ip4_config (&rc, priv->vpn_config); + if (priv->ip4_vpn_config) + merge_one_ip4_config (&rc, priv->ip4_vpn_config); + if (priv->ip4_device_config) + merge_one_ip4_config (&rc, priv->ip4_device_config); - if (priv->device_config) - merge_one_ip4_config (&rc, priv->device_config); + if (priv->ip6_vpn_config) + merge_one_ip6_config (&rc, priv->ip6_vpn_config); + if (priv->ip6_device_config) + merge_one_ip6_config (&rc, priv->ip6_device_config); for (iter = priv->configs; iter; iter = g_slist_next (iter)) { + if ( (iter->data == priv->ip4_vpn_config) + || (iter->data == priv->ip4_device_config) + || (iter->data == priv->ip6_vpn_config) + || (iter->data == priv->ip6_device_config)) + continue; + if (NM_IS_IP4_CONFIG (iter->data)) { NMIP4Config *config = NM_IP4_CONFIG (iter->data); - if ((config == priv->vpn_config) || (config == priv->device_config)) - continue; - merge_one_ip4_config (&rc, config); - } else { + } else if (NM_IS_IP6_CONFIG (iter->data)) { NMIP6Config *config = NM_IP6_CONFIG (iter->data); merge_one_ip6_config (&rc, config); - } + } else + g_assert_not_reached (); } domain = rc.domain; @@ -573,10 +609,10 @@ nm_named_manager_add_ip4_config (NMNamedManager *mgr, switch (cfg_type) { case NM_NAMED_IP_CONFIG_TYPE_VPN: - priv->vpn_config = config; + priv->ip4_vpn_config = config; break; case NM_NAMED_IP_CONFIG_TYPE_BEST_DEVICE: - priv->device_config = config; + priv->ip4_device_config = config; break; default: break; @@ -587,7 +623,7 @@ nm_named_manager_add_ip4_config (NMNamedManager *mgr, priv->configs = g_slist_append (priv->configs, g_object_ref (config)); if (!rewrite_resolv_conf (mgr, iface, &error)) { - nm_warning ("Could not commit DNS changes. Error: '%s'", error ? error->message : "(none)"); + nm_log_warn (LOGD_DNS, "could not commit DNS changes: '%s'", error ? error->message : "(none)"); g_error_free (error); } @@ -614,16 +650,15 @@ nm_named_manager_remove_ip4_config (NMNamedManager *mgr, priv->configs = g_slist_remove (priv->configs, config); - if (config == priv->vpn_config) - priv->vpn_config = NULL; - - if (config == priv->device_config) - priv->device_config = NULL; + if (config == priv->ip4_vpn_config) + priv->ip4_vpn_config = NULL; + if (config == priv->ip4_device_config) + priv->ip4_device_config = NULL; g_object_unref (config); if (!rewrite_resolv_conf (mgr, iface, &error)) { - nm_warning ("Could not commit DNS changes. Error: '%s'", error ? error->message : "(none)"); + nm_log_warn (LOGD_DNS, "could not commit DNS changes: '%s'", error ? error->message : "(none)"); if (error) g_error_free (error); } @@ -644,16 +679,27 @@ nm_named_manager_add_ip6_config (NMNamedManager *mgr, g_return_val_if_fail (iface != NULL, FALSE); g_return_val_if_fail (config != NULL, FALSE); - g_return_val_if_fail (cfg_type == NM_NAMED_IP_CONFIG_TYPE_DEFAULT, FALSE); - priv = NM_NAMED_MANAGER_GET_PRIVATE (mgr); + switch (cfg_type) { + case NM_NAMED_IP_CONFIG_TYPE_VPN: + /* FIXME: not quite yet... */ + g_return_val_if_fail (cfg_type != NM_NAMED_IP_CONFIG_TYPE_VPN, FALSE); + priv->ip6_vpn_config = config; + break; + case NM_NAMED_IP_CONFIG_TYPE_BEST_DEVICE: + priv->ip6_device_config = config; + break; + default: + break; + } + /* Don't allow the same zone added twice */ if (!g_slist_find (priv->configs, config)) priv->configs = g_slist_append (priv->configs, g_object_ref (config)); if (!rewrite_resolv_conf (mgr, iface, &error)) { - nm_warning ("Could not commit DNS changes. Error: '%s'", error ? error->message : "(none)"); + nm_log_warn (LOGD_DNS, "could not commit DNS changes: '%s'", error ? error->message : "(none)"); g_error_free (error); } @@ -680,10 +726,15 @@ nm_named_manager_remove_ip6_config (NMNamedManager *mgr, priv->configs = g_slist_remove (priv->configs, config); + if (config == priv->ip6_vpn_config) + priv->ip6_vpn_config = NULL; + if (config == priv->ip6_device_config) + priv->ip6_device_config = NULL; + g_object_unref (config); if (!rewrite_resolv_conf (mgr, iface, &error)) { - nm_warning ("Could not commit DNS changes. Error: '%s'", error ? error->message : "(none)"); + nm_log_warn (LOGD_DNS, "could not commit DNS changes: '%s'", error ? error->message : "(none)"); if (error) g_error_free (error); } diff --git a/src/nm-activation-request.c b/src/nm-activation-request.c index f85c12d610..2529e77f65 100644 --- a/src/nm-activation-request.c +++ b/src/nm-activation-request.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2005 - 2008 Red Hat, Inc. + * Copyright (C) 2005 - 2010 Red Hat, Inc. * Copyright (C) 2007 - 2008 Novell, Inc. */ @@ -27,7 +27,7 @@ #include "nm-activation-request.h" #include "nm-marshal.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-setting-wireless-security.h" #include "nm-setting-8021x.h" #include "nm-dbus-manager.h" @@ -72,6 +72,7 @@ typedef struct { NMActiveConnectionState state; gboolean is_default; + gboolean is_default6; gboolean shared; GSList *share_rules; @@ -88,6 +89,7 @@ enum { PROP_DEVICES, PROP_STATE, PROP_DEFAULT, + PROP_DEFAULT6, PROP_VPN, LAST_PROP @@ -104,7 +106,7 @@ device_state_changed (NMDevice *device, NMActRequest *self = NM_ACT_REQUEST (user_data); NMActRequestPrivate *priv = NM_ACT_REQUEST_GET_PRIVATE (self); NMActiveConnectionState new_ac_state; - gboolean new_default = FALSE; + gboolean new_default = FALSE, new_default6 = FALSE; /* Set NMActiveConnection state based on the device's state */ switch (new_state) { @@ -117,6 +119,7 @@ device_state_changed (NMDevice *device, case NM_DEVICE_STATE_ACTIVATED: new_ac_state = NM_ACTIVE_CONNECTION_STATE_ACTIVATED; new_default = priv->is_default; + new_default6 = priv->is_default6; break; default: new_ac_state = NM_ACTIVE_CONNECTION_STATE_UNKNOWN; @@ -132,6 +135,11 @@ device_state_changed (NMDevice *device, priv->is_default = new_default; g_object_notify (G_OBJECT (self), NM_ACTIVE_CONNECTION_DEFAULT); } + + if (new_default6 != priv->is_default6) { + priv->is_default6 = new_default6; + g_object_notify (G_OBJECT (self), NM_ACTIVE_CONNECTION_DEFAULT6); + } } NMActRequest * @@ -271,6 +279,9 @@ get_property (GObject *object, guint prop_id, case PROP_DEFAULT: g_value_set_boolean (value, priv->is_default); break; + case PROP_DEFAULT6: + g_value_set_boolean (value, priv->is_default6); + break; case PROP_VPN: g_value_set_boolean (value, FALSE); break; @@ -334,7 +345,14 @@ nm_act_request_class_init (NMActRequestClass *req_class) (object_class, PROP_DEFAULT, g_param_spec_boolean (NM_ACTIVE_CONNECTION_DEFAULT, "Default", - "Is the default active connection", + "Is the default IPv4 active connection", + FALSE, + G_PARAM_READABLE)); + g_object_class_install_property + (object_class, PROP_DEFAULT6, + g_param_spec_boolean (NM_ACTIVE_CONNECTION_DEFAULT6, + "Default6", + "Is the default IPv6 active connection", FALSE, G_PARAM_READABLE)); g_object_class_install_property @@ -418,9 +436,9 @@ secrets_update_setting (NMSecretsProviderInterface *interface, nm_connection_add_setting (priv->connection, setting); else { if (!nm_connection_update_secrets (priv->connection, setting_name, new, &error)) { - nm_warning ("Failed to update connection secrets: %d %s", - error ? error->code : -1, - error && error->message ? error->message : "(none)"); + nm_log_warn (LOGD_DEVICE, "Failed to update connection secrets: %d %s", + error ? error->code : -1, + error && error->message ? error->message : "(none)"); g_clear_error (&error); } } @@ -548,6 +566,29 @@ nm_act_request_get_default (NMActRequest *req) return NM_ACT_REQUEST_GET_PRIVATE (req)->is_default; } +void +nm_act_request_set_default6 (NMActRequest *req, gboolean is_default6) +{ + NMActRequestPrivate *priv; + + g_return_if_fail (NM_IS_ACT_REQUEST (req)); + + priv = NM_ACT_REQUEST_GET_PRIVATE (req); + if (priv->is_default6 == is_default6) + return; + + priv->is_default6 = is_default6; + g_object_notify (G_OBJECT (req), NM_ACTIVE_CONNECTION_DEFAULT6); +} + +gboolean +nm_act_request_get_default6 (NMActRequest *req) +{ + g_return_val_if_fail (NM_IS_ACT_REQUEST (req), FALSE); + + return NM_ACT_REQUEST_GET_PRIVATE (req)->is_default6; +} + static void share_child_setup (gpointer user_data G_GNUC_UNUSED) { @@ -591,15 +632,17 @@ nm_act_request_set_shared (NMActRequest *req, gboolean shared) int status; GError *error = NULL; - nm_info ("Executing: %s", cmd); + nm_log_info (LOGD_SHARING, "Executing: %s", cmd); if (!g_spawn_sync ("/", argv, envp, G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, share_child_setup, NULL, NULL, NULL, &status, &error)) { - nm_info ("Error executing command: (%d) %s", - error ? error->code : -1, - (error && error->message) ? error->message : "(unknown)"); + nm_log_warn (LOGD_SHARING, "Error executing command: (%d) %s", + error ? error->code : -1, + (error && error->message) ? error->message : "(unknown)"); g_clear_error (&error); - } else if (WEXITSTATUS (status)) - nm_info ("** Command returned exit status %d.", WEXITSTATUS (status)); + } else if (WEXITSTATUS (status)) { + nm_log_warn (LOGD_SHARING, "** Command returned exit status %d.", + WEXITSTATUS (status)); + } } g_free (cmd); if (argv) diff --git a/src/nm-activation-request.h b/src/nm-activation-request.h index a3c0d97446..a243694521 100644 --- a/src/nm-activation-request.h +++ b/src/nm-activation-request.h @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * (C) Copyright 2005 - 2008 Red Hat, Inc. + * (C) Copyright 2005 - 2010 Red Hat, Inc. */ #ifndef NM_ACTIVATION_REQUEST_H @@ -76,6 +76,10 @@ void nm_act_request_set_default (NMActRequest *req, gboolean is_default gboolean nm_act_request_get_default (NMActRequest *req); +void nm_act_request_set_default6 (NMActRequest *req, gboolean is_default6); + +gboolean nm_act_request_get_default6 (NMActRequest *req); + gboolean nm_act_request_get_shared (NMActRequest *req); void nm_act_request_set_shared (NMActRequest *req, gboolean shared); diff --git a/src/nm-active-connection.c b/src/nm-active-connection.c index 019b5c3fc0..4207e14504 100644 --- a/src/nm-active-connection.c +++ b/src/nm-active-connection.c @@ -15,13 +15,14 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2008 Red Hat, Inc. + * Copyright (C) 2008 - 2010 Red Hat, Inc. */ #include #include "nm-active-connection.h" #include "NetworkManager.h" #include "nm-active-connection-glue.h" +#include "nm-logging.h" char * nm_active_connection_get_next_object_path (void) @@ -54,7 +55,7 @@ nm_active_connection_scope_to_value (NMConnection *connection, GValue *value) g_value_set_string (value, NM_DBUS_SERVICE_USER_SETTINGS); break; default: - g_warning ("%s: unknown connection scope!", __func__); + nm_log_err (LOGD_CORE, "unknown connection scope!"); break; } } diff --git a/src/nm-active-connection.h b/src/nm-active-connection.h index 4a1f2e1477..6a463cb257 100644 --- a/src/nm-active-connection.h +++ b/src/nm-active-connection.h @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2008 Red Hat, Inc. + * Copyright (C) 2008 - 2010 Red Hat, Inc. */ #ifndef NM_ACTIVE_CONNECTION_H @@ -30,6 +30,7 @@ #define NM_ACTIVE_CONNECTION_DEVICES "devices" #define NM_ACTIVE_CONNECTION_STATE "state" #define NM_ACTIVE_CONNECTION_DEFAULT "default" +#define NM_ACTIVE_CONNECTION_DEFAULT6 "default6" #define NM_ACTIVE_CONNECTION_VPN "vpn" char *nm_active_connection_get_next_object_path (void); diff --git a/src/nm-call-store.c b/src/nm-call-store.c index 837edf023d..df400d0ff6 100644 --- a/src/nm-call-store.c +++ b/src/nm-call-store.c @@ -16,10 +16,11 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 2007 Novell, Inc. + * Copyright (C) 2010 Red Hat, Inc. */ #include "nm-call-store.h" -#include "nm-utils.h" +#include "nm-logging.h" NMCallStore * nm_call_store_new (void) @@ -68,12 +69,12 @@ nm_call_store_remove (NMCallStore *store, call_ids_hash = g_hash_table_lookup (store, object); if (!call_ids_hash) { - nm_warning ("Trying to remove a non-existant call id."); + nm_log_warn (LOGD_CORE, "Trying to remove a non-existant call id."); return; } if (!g_hash_table_remove (call_ids_hash, call_id)) - nm_warning ("Trying to remove a non-existant call id."); + nm_log_warn (LOGD_CORE, "Trying to remove a non-existant call id."); if (g_hash_table_size (call_ids_hash) == 0) { g_hash_table_remove (store, object); @@ -162,7 +163,7 @@ nm_call_store_foreach (NMCallStore *store, call_ids_hash = g_hash_table_lookup (store, object); if (!call_ids_hash) { - nm_warning ("Object not in store"); + nm_log_warn (LOGD_CORE, "Object not in store"); return -1; } diff --git a/src/nm-dbus-manager.c b/src/nm-dbus-manager.c index 37039f1872..9b621b42ba 100644 --- a/src/nm-dbus-manager.c +++ b/src/nm-dbus-manager.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2006 - 2008 Red Hat, Inc. + * Copyright (C) 2006 - 2010 Red Hat, Inc. * Copyright (C) 2006 - 2008 Novell, Inc. */ @@ -29,7 +29,7 @@ #include #include #include -#include "nm-utils.h" +#include "nm-logging.h" enum { DBUS_CONNECTION_CHANGED = 0, @@ -158,7 +158,7 @@ nm_dbus_manager_reconnect (gpointer user_data) if (nm_dbus_manager_init_bus (self)) { if (nm_dbus_manager_start_service (self)) { - nm_info ("reconnected to the system bus."); + nm_log_info (LOGD_CORE, "reconnected to the system bus."); g_signal_emit (self, signals[DBUS_CONNECTION_CHANGED], 0, priv->connection); priv->reconnect_id = 0; @@ -223,8 +223,8 @@ nm_dbus_manager_name_has_owner (NMDBusManager *self, G_TYPE_INVALID, G_TYPE_BOOLEAN, &has_owner, G_TYPE_INVALID)) { - nm_warning ("NameHasOwner request failed: %s", - (err && err->message) ? err->message : "(unknown)"); + nm_log_warn (LOGD_CORE, "NameHasOwner request failed: %s", + (err && err->message) ? err->message : "(unknown)"); g_clear_error (&err); } @@ -248,7 +248,7 @@ destroy_cb (DBusGProxy *proxy, gpointer user_data) NMDBusManager *self = NM_DBUS_MANAGER (user_data); /* Clean up existing connection */ - nm_info ("disconnected by the system bus."); + nm_log_warn (LOGD_CORE, "disconnected by the system bus."); NM_DBUS_MANAGER_GET_PRIVATE (self)->proxy = NULL; nm_dbus_manager_cleanup (self, FALSE); @@ -265,7 +265,7 @@ nm_dbus_manager_init_bus (NMDBusManager *self) GError *err = NULL; if (priv->connection) { - nm_warning ("DBus Manager already has a valid connection."); + nm_log_warn (LOGD_CORE, "DBus Manager already has a valid connection."); return FALSE; } @@ -273,7 +273,7 @@ nm_dbus_manager_init_bus (NMDBusManager *self) priv->g_connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &err); if (!priv->g_connection) { - nm_warning ("Could not get the system bus. Make sure " + nm_log_err (LOGD_CORE, "Could not get the system bus. Make sure " "the message bus daemon is running! Message: %s", err->message); g_error_free (err); @@ -317,7 +317,7 @@ nm_dbus_manager_start_service (NMDBusManager *self) priv = NM_DBUS_MANAGER_GET_PRIVATE (self); if (priv->started) { - nm_warning ("Service has already started."); + nm_log_err (LOGD_CORE, "Service has already started."); return FALSE; } @@ -327,7 +327,7 @@ nm_dbus_manager_start_service (NMDBusManager *self) G_TYPE_INVALID, G_TYPE_UINT, &result, G_TYPE_INVALID)) { - nm_warning ("Could not acquire the NetworkManager service.\n" + nm_log_err (LOGD_CORE, "Could not acquire the NetworkManager service.\n" " Error: '%s'", (err && err->message) ? err->message : "(unknown)"); g_error_free (err); @@ -335,7 +335,7 @@ nm_dbus_manager_start_service (NMDBusManager *self) } if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { - nm_warning ("Could not acquire the NetworkManager service as it is already taken."); + nm_log_err (LOGD_CORE, "Could not acquire the NetworkManager service as it is already taken."); return FALSE; } @@ -345,15 +345,15 @@ nm_dbus_manager_start_service (NMDBusManager *self) G_TYPE_INVALID, G_TYPE_UINT, &result, G_TYPE_INVALID)) { - g_warning ("Could not acquire the NetworkManagerSystemSettings service.\n" - " Message: '%s'", err->message); + nm_log_warn (LOGD_CORE, "Could not acquire the NetworkManagerSystemSettings service.\n" + " Message: '%s'", err->message); g_error_free (err); return FALSE; } if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { - g_warning ("Could not acquire the NetworkManagerSystemSettings service " - "as it is already taken."); + nm_log_warn (LOGD_CORE, "Could not acquire the NetworkManagerSystemSettings service " + "as it is already taken."); return FALSE; } diff --git a/src/nm-device-bt.c b/src/nm-device-bt.c index 444c7ff056..3ef08de8b6 100644 --- a/src/nm-device-bt.c +++ b/src/nm-device-bt.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009 - 2010 Red Hat, Inc. */ #include @@ -28,7 +28,7 @@ #include "nm-device-bt.h" #include "nm-device-interface.h" #include "nm-device-private.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-marshal.h" #include "ppp-manager/nm-ppp-manager.h" #include "nm-properties-changed-signal.h" @@ -51,14 +51,16 @@ typedef struct { char *name; guint32 capabilities; + gboolean connected; + gboolean have_iface; + DBusGProxy *type_proxy; + DBusGProxy *dev_proxy; - NMPPPManager *ppp_manager; char *rfcomm_iface; - guint32 in_bytes; - guint32 out_bytes; + NMModem *modem; + guint32 timeout_id; - NMIP4Config *pending_ip4_config; guint32 bt_type; /* BT type of the current connection */ } NMDeviceBtPrivate; @@ -122,31 +124,6 @@ nm_bt_error_get_type (void) } -NMDevice * -nm_device_bt_new (const char *udi, - const char *bdaddr, - const char *name, - guint32 capabilities, - gboolean managed) -{ - g_return_val_if_fail (udi != NULL, NULL); - g_return_val_if_fail (bdaddr != NULL, NULL); - g_return_val_if_fail (name != NULL, NULL); - g_return_val_if_fail (capabilities != NM_BT_CAPABILITY_NONE, NULL); - - return (NMDevice *) g_object_new (NM_TYPE_DEVICE_BT, - NM_DEVICE_INTERFACE_UDI, udi, - NM_DEVICE_INTERFACE_IFACE, bdaddr, - NM_DEVICE_INTERFACE_DRIVER, "bluez", - NM_DEVICE_BT_HW_ADDRESS, bdaddr, - NM_DEVICE_BT_NAME, name, - NM_DEVICE_BT_CAPABILITIES, capabilities, - NM_DEVICE_INTERFACE_MANAGED, managed, - NM_DEVICE_INTERFACE_TYPE_DESC, "Bluetooth", - NM_DEVICE_INTERFACE_DEVICE_TYPE, NM_DEVICE_TYPE_BT, - NULL); -} - guint32 nm_device_bt_get_capabilities (NMDeviceBt *self) { g_return_val_if_fail (self != NULL, NM_BT_CAPABILITY_NONE); @@ -281,16 +258,32 @@ real_get_generic_capabilities (NMDevice *dev) /* IP method PPP */ static void -ppp_state_changed (NMPPPManager *ppp_manager, NMPPPStatus status, gpointer user_data) +ppp_stats (NMModem *modem, + guint32 in_bytes, + guint32 out_bytes, + gpointer user_data) +{ + g_signal_emit (NM_DEVICE_BT (user_data), signals[PPP_STATS], 0, in_bytes, out_bytes); +} + +static void +ppp_failed (NMModem *modem, NMDeviceStateReason reason, gpointer user_data) { NMDevice *device = NM_DEVICE (user_data); - switch (status) { - case NM_PPP_STATUS_DISCONNECT: - nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_PPP_DISCONNECT); + switch (nm_device_interface_get_state (NM_DEVICE_INTERFACE (device))) { + case NM_DEVICE_STATE_PREPARE: + case NM_DEVICE_STATE_CONFIG: + case NM_DEVICE_STATE_NEED_AUTH: + case NM_DEVICE_STATE_ACTIVATED: + nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, reason); break; - case NM_PPP_STATUS_DEAD: - nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_PPP_FAILED); + case NM_DEVICE_STATE_IP_CONFIG: + if (nm_device_ip_config_should_fail (device, FALSE)) { + nm_device_state_changed (device, + NM_DEVICE_STATE_FAILED, + NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE); + } break; default: break; @@ -298,68 +291,127 @@ ppp_state_changed (NMPPPManager *ppp_manager, NMPPPStatus status, gpointer user_ } static void -ppp_ip4_config (NMPPPManager *ppp_manager, - const char *iface, - NMIP4Config *config, - gpointer user_data) +modem_need_auth (NMModem *modem, + const char *setting_name, + gboolean retry, + RequestSecretsCaller caller, + const char *hint1, + const char *hint2, + gpointer user_data) { - NMDevice *device = NM_DEVICE (user_data); + NMDeviceBt *self = NM_DEVICE_BT (user_data); + NMActRequest *req; - /* Ignore PPP IP4 events that come in after initial configuration */ - if (nm_device_get_state (device) != NM_DEVICE_STATE_IP_CONFIG) - return; + req = nm_device_get_act_request (NM_DEVICE (self)); + g_assert (req); - nm_device_set_ip_iface (device, iface); - NM_DEVICE_BT_GET_PRIVATE (device)->pending_ip4_config = g_object_ref (config); - nm_device_activate_schedule_stage4_ip4_config_get (device); + nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_NEED_AUTH, NM_DEVICE_STATE_REASON_NONE); + nm_act_request_get_secrets (req, setting_name, retry, caller, hint1, hint2); } static void -ppp_stats (NMPPPManager *ppp_manager, - guint32 in_bytes, - guint32 out_bytes, - gpointer user_data) +modem_prepare_result (NMModem *modem, + gboolean success, + NMDeviceStateReason reason, + gpointer user_data) { - NMDeviceBt *self = NM_DEVICE_BT (user_data); - NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE (self); + NMDevice *device = NM_DEVICE (user_data); + NMDeviceState state; - if (priv->in_bytes != in_bytes || priv->out_bytes != out_bytes) { - priv->in_bytes = in_bytes; - priv->out_bytes = out_bytes; + state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (device)); + g_return_if_fail (state == NM_DEVICE_STATE_CONFIG || state == NM_DEVICE_STATE_NEED_AUTH); - g_signal_emit (self, signals[PPP_STATS], 0, in_bytes, out_bytes); + if (success) { + NMActRequest *req; + NMActStageReturn ret; + NMDeviceStateReason stage2_reason = NM_DEVICE_STATE_REASON_NONE; + + req = nm_device_get_act_request (device); + g_assert (req); + + ret = nm_modem_act_stage2_config (modem, req, &stage2_reason); + switch (ret) { + case NM_ACT_STAGE_RETURN_POSTPONE: + break; + case NM_ACT_STAGE_RETURN_SUCCESS: + nm_device_activate_schedule_stage3_ip_config_start (device); + break; + case NM_ACT_STAGE_RETURN_FAILURE: + default: + nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, stage2_reason); + break; + } + } else + nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, reason); +} + +static void +device_state_changed (NMDevice *device, + NMDeviceState new_state, + NMDeviceState old_state, + NMDeviceStateReason reason, + gpointer user_data) +{ + NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE (device); + + if (priv->modem) + nm_modem_device_state_changed (priv->modem, new_state, old_state, reason); +} + +static void +modem_ip4_config_result (NMModem *self, + const char *iface, + NMIP4Config *config, + GError *error, + gpointer user_data) +{ + NMDevice *device = NM_DEVICE (user_data); + NMDeviceState state; + + state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (device)); + g_return_if_fail (state == NM_DEVICE_STATE_IP_CONFIG); + + if (error) { + nm_log_warn (LOGD_MB | LOGD_IP4 | LOGD_BT, + "(%s): retrieving IP4 configuration failed: (%d) %s", + nm_device_get_ip_iface (device), + error ? error->code : -1, + error && error->message ? error->message : "(unknown)"); + + nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE); + } else { + if (iface) + nm_device_set_ip_iface (device, iface); + + nm_device_activate_schedule_stage4_ip4_config_get (device); } } static gboolean -get_ppp_credentials (NMConnection *connection, - const char **username, - const char **password) +modem_stage1 (NMDeviceBt *self, NMModem *modem, NMDeviceStateReason *reason) { - NMSettingGsm *s_gsm; - NMSettingCdma *s_cdma = NULL; + NMActRequest *req; + NMActStageReturn ret; - s_gsm = (NMSettingGsm *) nm_connection_get_setting (connection, NM_TYPE_SETTING_GSM); - if (s_gsm) { - if (username) - *username = nm_setting_gsm_get_username (s_gsm); - if (password) - *password = nm_setting_gsm_get_password (s_gsm); - } else { - /* Try CDMA then */ - s_cdma = (NMSettingCdma *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CDMA); - if (s_cdma) { - if (username) - *username = nm_setting_cdma_get_username (s_cdma); - if (password) - *password = nm_setting_cdma_get_password (s_cdma); - } + g_return_val_if_fail (reason != NULL, FALSE); + + req = nm_device_get_act_request (NM_DEVICE (self)); + g_assert (req); + + ret = nm_modem_act_stage1_prepare (modem, req, reason); + switch (ret) { + case NM_ACT_STAGE_RETURN_POSTPONE: + case NM_ACT_STAGE_RETURN_SUCCESS: + /* Success, wait for the 'prepare-result' signal */ + return TRUE; + case NM_ACT_STAGE_RETURN_FAILURE: + default: + break; } - return (s_cdma || s_gsm) ? TRUE : FALSE; + return FALSE; } - static void real_connection_secrets_updated (NMDevice *device, NMConnection *connection, @@ -369,111 +421,185 @@ real_connection_secrets_updated (NMDevice *device, NMDeviceBt *self = NM_DEVICE_BT (device); NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE (self); NMActRequest *req; - const char *username = NULL, *password = NULL; - gboolean success = FALSE; + NMDeviceStateReason reason = NM_DEVICE_STATE_REASON_NONE; - if (caller != SECRETS_CALLER_PPP) - return; - - g_return_if_fail (priv->ppp_manager); + g_return_if_fail (IS_ACTIVATING_STATE (nm_device_get_state (device))); req = nm_device_get_act_request (device); g_assert (req); - success = get_ppp_credentials (nm_act_request_get_connection (req), - &username, - &password); - if (success) { - nm_ppp_manager_update_secrets (priv->ppp_manager, - nm_device_get_ip_iface (device), - username ? username : "", - password ? password : "", - NULL); + if (!nm_modem_connection_secrets_updated (priv->modem, + req, + connection, + updated_settings, + caller)) { + nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_NO_SECRETS); return; } - /* Shouldn't ever happen */ - nm_ppp_manager_update_secrets (priv->ppp_manager, - nm_device_get_ip_iface (device), - NULL, - NULL, - "missing GSM/CDMA setting; no secrets could be found."); -} + /* PPP handles stuff itself... */ + if (caller == SECRETS_CALLER_PPP) + return; -static NMActStageReturn -ppp_stage3_start (NMDevice *device, NMDeviceStateReason *reason) -{ - NMDeviceBt *self = NM_DEVICE_BT (device); - NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE (self); - NMActRequest *req; - const char *ppp_name = NULL; - GError *err = NULL; - NMActStageReturn ret; - gboolean success; - - req = nm_device_get_act_request (device); - g_assert (req); - - success = get_ppp_credentials (nm_act_request_get_connection (req), - &ppp_name, - NULL); - if (!success) { - // FIXME: set reason to something plausible - return NM_ACT_STAGE_RETURN_FAILURE; - } - - priv->ppp_manager = nm_ppp_manager_new (priv->rfcomm_iface); - if (nm_ppp_manager_start (priv->ppp_manager, req, ppp_name, 20, &err)) { - g_signal_connect (priv->ppp_manager, "state-changed", - G_CALLBACK (ppp_state_changed), - device); - g_signal_connect (priv->ppp_manager, "ip4-config", - G_CALLBACK (ppp_ip4_config), - device); - g_signal_connect (priv->ppp_manager, "stats", - G_CALLBACK (ppp_stats), - device); - - ret = NM_ACT_STAGE_RETURN_POSTPONE; - } else { - nm_warning ("%s", err->message); - g_error_free (err); - - g_object_unref (priv->ppp_manager); - priv->ppp_manager = NULL; - - *reason = NM_DEVICE_STATE_REASON_PPP_START_FAILED; - ret = NM_ACT_STAGE_RETURN_FAILURE; - } - - return ret; -} - -static NMActStageReturn -ppp_stage4 (NMDevice *device, NMIP4Config **config, NMDeviceStateReason *reason) -{ - NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE (device); - NMConnection *connection; - NMSettingIP4Config *s_ip4; - - *config = priv->pending_ip4_config; - priv->pending_ip4_config = NULL; - - /* Merge user-defined overrides into the IP4Config to be applied */ - connection = nm_act_request_get_connection (nm_device_get_act_request (device)); - g_assert (connection); - s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG); - nm_utils_merge_ip4_config (*config, s_ip4); - - return NM_ACT_STAGE_RETURN_SUCCESS; + /* Otherwise, on success for GSM/CDMA secrets we need to schedule modem stage1 again */ + g_return_if_fail (nm_device_get_state (device) == NM_DEVICE_STATE_NEED_AUTH); + if (!modem_stage1 (self, priv->modem, &reason)) + nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_FAILED, reason); } /*****************************************************************************/ +gboolean +nm_device_bt_modem_added (NMDeviceBt *self, + NMModem *modem, + const char *driver) +{ + NMDeviceBtPrivate *priv; + const char *modem_iface; + char *base; + NMDeviceState state; + NMDeviceStateReason reason = NM_DEVICE_STATE_REASON_NONE; + + g_return_val_if_fail (self != NULL, FALSE); + g_return_val_if_fail (NM_IS_DEVICE_BT (self), FALSE); + g_return_val_if_fail (modem != NULL, FALSE); + g_return_val_if_fail (NM_IS_MODEM (modem), FALSE); + + priv = NM_DEVICE_BT_GET_PRIVATE (self); + modem_iface = nm_modem_get_iface (modem); + g_return_val_if_fail (modem_iface != NULL, FALSE); + + if (!priv->rfcomm_iface) + return FALSE; + + base = g_path_get_basename (priv->rfcomm_iface); + if (strcmp (base, modem_iface)) { + g_free (base); + return FALSE; + } + g_free (base); + + /* Got the modem */ + if (priv->timeout_id) { + g_source_remove (priv->timeout_id); + priv->timeout_id = 0; + } + + /* Can only accept the modem in stage2, but since the interface matched + * what we were expecting, don't let anything else claim the modem either. + */ + state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (self)); + if (state != NM_DEVICE_STATE_CONFIG) { + nm_log_warn (LOGD_BT | LOGD_MB, + "(%s): modem found but device not in correct state (%d)", + nm_device_get_iface (NM_DEVICE (self)), + nm_device_get_state (NM_DEVICE (self))); + return TRUE; + } + + nm_log_info (LOGD_BT | LOGD_MB, + "Activation (%s/bluetooth) Stage 2 of 5 (Device Configure) modem found.", + nm_device_get_iface (NM_DEVICE (self))); + + if (priv->modem) { + g_warn_if_reached (); + g_object_unref (priv->modem); + } + + priv->modem = g_object_ref (modem); + g_signal_connect (modem, NM_MODEM_PPP_STATS, G_CALLBACK (ppp_stats), self); + g_signal_connect (modem, NM_MODEM_PPP_FAILED, G_CALLBACK (ppp_failed), self); + g_signal_connect (modem, NM_MODEM_PREPARE_RESULT, G_CALLBACK (modem_prepare_result), self); + g_signal_connect (modem, NM_MODEM_IP4_CONFIG_RESULT, G_CALLBACK (modem_ip4_config_result), self); + g_signal_connect (modem, NM_MODEM_NEED_AUTH, G_CALLBACK (modem_need_auth), self); + + /* Kick off the modem connection */ + if (!modem_stage1 (self, modem, &reason)) + nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_FAILED, reason); + + return TRUE; +} + +gboolean +nm_device_bt_modem_removed (NMDeviceBt *self, NMModem *modem) +{ + NMDeviceBtPrivate *priv; + NMDeviceState state; + + g_return_val_if_fail (self != NULL, FALSE); + g_return_val_if_fail (NM_IS_DEVICE_BT (self), FALSE); + g_return_val_if_fail (modem != NULL, FALSE); + g_return_val_if_fail (NM_IS_MODEM (modem), FALSE); + + priv = NM_DEVICE_BT_GET_PRIVATE (self); + + if (modem != priv->modem) + return FALSE; + + state = nm_device_get_state (NM_DEVICE (self)); + nm_modem_device_state_changed (priv->modem, + NM_DEVICE_STATE_DISCONNECTED, + state, + NM_DEVICE_STATE_REASON_USER_REQUESTED); + + g_object_unref (priv->modem); + priv->modem = NULL; + return TRUE; +} + +static gboolean +modem_find_timeout (gpointer user_data) +{ + NMDeviceBt *self = NM_DEVICE_BT (user_data); + + NM_DEVICE_BT_GET_PRIVATE (self)->timeout_id = 0; + nm_device_state_changed (NM_DEVICE (self), + NM_DEVICE_STATE_FAILED, + NM_DEVICE_STATE_REASON_MODEM_NOT_FOUND); + return FALSE; +} + static void -nm_device_bt_connect_cb (DBusGProxy *proxy, - DBusGProxyCall *call_id, - void *user_data) +check_connect_continue (NMDeviceBt *self) +{ + NMDevice *device = NM_DEVICE (self); + NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE (self); + gboolean pan = (priv->bt_type == NM_BT_CAPABILITY_NAP); + gboolean dun = (priv->bt_type == NM_BT_CAPABILITY_DUN); + + if (!priv->connected || !priv->have_iface) + return; + + nm_log_info (LOGD_BT, "Activation (%s %s/bluetooth) Stage 2 of 5 (Device Configure) " + "successful. Will connect via %s.", + nm_device_get_iface (device), + nm_device_get_ip_iface (device), + dun ? "DUN" : (pan ? "PAN" : "unknown")); + + /* Kill the connect timeout since we're connected now */ + if (priv->timeout_id) { + g_source_remove (priv->timeout_id); + priv->timeout_id = 0; + } + + if (pan) { + /* Bluez says we're connected now. Start IP config. */ + nm_device_activate_schedule_stage3_ip_config_start (device); + } else if (dun) { + /* Wait for ModemManager to find the modem */ + priv->timeout_id = g_timeout_add_seconds (30, modem_find_timeout, self); + + nm_log_info (LOGD_BT | LOGD_MB, "Activation (%s/bluetooth) Stage 2 of 5 (Device Configure) " + "waiting for modem to appear.", + nm_device_get_iface (device)); + } else + g_assert_not_reached (); +} + +static void +bluez_connect_cb (DBusGProxy *proxy, + DBusGProxyCall *call_id, + void *user_data) { NMDeviceBt *self = NM_DEVICE_BT (user_data); NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE (self); @@ -481,22 +607,24 @@ nm_device_bt_connect_cb (DBusGProxy *proxy, char *device; if (dbus_g_proxy_end_call (proxy, call_id, &error, - G_TYPE_STRING, &device, - G_TYPE_INVALID) == FALSE) { - nm_warning ("Error connecting with bluez: %s", - error && error->message ? error->message : "(unknown)"); + G_TYPE_STRING, &device, + G_TYPE_INVALID) == FALSE) { + nm_log_warn (LOGD_BT, "Error connecting with bluez: %s", + error && error->message ? error->message : "(unknown)"); g_clear_error (&error); - // FIXME: get a better reason code - nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_NONE); + nm_device_state_changed (NM_DEVICE (self), + NM_DEVICE_STATE_FAILED, + NM_DEVICE_STATE_REASON_BT_FAILED); return; } if (!device || !strlen (device)) { - nm_warning ("Invalid network device returned by bluez"); + nm_log_warn (LOGD_BT, "Invalid network device returned by bluez"); - // FIXME: get a better reason code - nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_NONE); + nm_device_state_changed (NM_DEVICE (self), + NM_DEVICE_STATE_FAILED, + NM_DEVICE_STATE_REASON_BT_FAILED); } if (priv->bt_type == NM_BT_CAPABILITY_DUN) { @@ -507,7 +635,12 @@ nm_device_bt_connect_cb (DBusGProxy *proxy, g_free (device); } + nm_log_dbg (LOGD_BT, "(%s): connect request successful", + nm_device_get_iface (NM_DEVICE (self))); + /* Stage 3 gets scheduled when Bluez says we're connected */ + priv->have_iface = TRUE; + check_connect_continue (self); } static void @@ -521,6 +654,17 @@ bluez_property_changed (DBusGProxy *proxy, NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE (self); gboolean connected; NMDeviceState state; + const char *prop_str = "(unknown)"; + + if (G_VALUE_HOLDS_STRING (value)) + prop_str = g_value_get_string (value); + else if (G_VALUE_HOLDS_BOOLEAN (value)) + prop_str = g_value_get_boolean (value) ? "true" : "false"; + + nm_log_dbg (LOGD_BT, "(%s): bluez property '%s' changed to '%s'", + nm_device_get_iface (device), + property, + prop_str); if (strcmp (property, "Connected")) return; @@ -528,18 +672,12 @@ bluez_property_changed (DBusGProxy *proxy, state = nm_device_get_state (device); connected = g_value_get_boolean (value); if (connected) { - /* Bluez says we're connected now. Start IP config. */ - if (state == NM_DEVICE_STATE_CONFIG) { - gboolean pan = (priv->bt_type == NM_BT_CAPABILITY_NAP); - gboolean dun = (priv->bt_type == NM_BT_CAPABILITY_DUN); + nm_log_dbg (LOGD_BT, "(%s): connected to the device", + nm_device_get_iface (device)); - nm_info ("Activation (%s/bluetooth) Stage 2 of 5 (Device Configure) " - "successful. Connected via %s.", - nm_device_get_iface (device), - dun ? "DUN" : (pan ? "PAN" : "unknown")); - - nm_device_activate_schedule_stage3_ip_config_start (device); + priv->connected = TRUE; + check_connect_continue (self); } } else { gboolean fail = FALSE; @@ -547,19 +685,38 @@ bluez_property_changed (DBusGProxy *proxy, /* Bluez says we're disconnected from the device. Suck. */ if (nm_device_is_activating (device)) { - nm_info ("Activation (%s/bluetooth): bluetooth link disconnected.", - nm_device_get_iface (device)); + nm_log_info (LOGD_BT, + "Activation (%s/bluetooth): bluetooth link disconnected.", + nm_device_get_iface (device)); fail = TRUE; } else if (state == NM_DEVICE_STATE_ACTIVATED) { - nm_info ("%s: bluetooth link disconnected.", nm_device_get_iface (device)); + nm_log_info (LOGD_BT, "(%s): bluetooth link disconnected.", + nm_device_get_iface (device)); fail = TRUE; } - if (fail) + if (fail) { nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_CARRIER); + priv->connected = FALSE; + } } } +static gboolean +bt_connect_timeout (gpointer user_data) +{ + NMDeviceBt *self = NM_DEVICE_BT (user_data); + + nm_log_dbg (LOGD_BT, "(%s): initial connection timed out", + nm_device_get_iface (NM_DEVICE (self))); + + NM_DEVICE_BT_GET_PRIVATE (self)->timeout_id = 0; + nm_device_state_changed (NM_DEVICE (self), + NM_DEVICE_STATE_FAILED, + NM_DEVICE_STATE_REASON_BT_FAILED); + return FALSE; +} + static NMActStageReturn real_act_stage2_config (NMDevice *device, NMDeviceStateReason *reason) { @@ -567,6 +724,7 @@ real_act_stage2_config (NMDevice *device, NMDeviceStateReason *reason) NMActRequest *req; NMDBusManager *dbus_mgr; DBusGConnection *g_connection; + gboolean dun = FALSE; req = nm_device_get_act_request (device); g_assert (req); @@ -581,53 +739,57 @@ real_act_stage2_config (NMDevice *device, NMDeviceStateReason *reason) g_connection = nm_dbus_manager_get_connection (dbus_mgr); g_object_unref (dbus_mgr); - if (priv->bt_type == NM_BT_CAPABILITY_DUN) { - priv->type_proxy = dbus_g_proxy_new_for_name (g_connection, - BLUEZ_SERVICE, - nm_device_get_udi (device), - BLUEZ_SERIAL_INTERFACE); - if (!priv->type_proxy) { - // FIXME: set a reason code - return NM_ACT_STAGE_RETURN_FAILURE; - } - - dbus_g_proxy_begin_call_with_timeout (priv->type_proxy, "Connect", - nm_device_bt_connect_cb, - device, - NULL, - 20000, - G_TYPE_STRING, BLUETOOTH_DUN_UUID, - G_TYPE_INVALID); - } else if (priv->bt_type == NM_BT_CAPABILITY_NAP) { - priv->type_proxy = dbus_g_proxy_new_for_name (g_connection, - BLUEZ_SERVICE, - nm_device_get_udi (device), - BLUEZ_NETWORK_INTERFACE); - if (!priv->type_proxy) { - // FIXME: set a reason code - return NM_ACT_STAGE_RETURN_FAILURE; - } - - dbus_g_proxy_begin_call_with_timeout (priv->type_proxy, "Connect", - nm_device_bt_connect_cb, - device, - NULL, - 20000, - G_TYPE_STRING, BLUETOOTH_NAP_UUID, - G_TYPE_INVALID); - } else + if (priv->bt_type == NM_BT_CAPABILITY_DUN) + dun = TRUE; + else if (priv->bt_type == NM_BT_CAPABILITY_NAP) + dun = FALSE; + else g_assert_not_reached (); + priv->dev_proxy = dbus_g_proxy_new_for_name (g_connection, + BLUEZ_SERVICE, + nm_device_get_udi (device), + BLUEZ_DEVICE_INTERFACE); + if (!priv->dev_proxy) { + // FIXME: set a reason code + return NM_ACT_STAGE_RETURN_FAILURE; + } + /* Watch for BT device property changes */ dbus_g_object_register_marshaller (_nm_marshal_VOID__STRING_BOXED, G_TYPE_NONE, G_TYPE_STRING, G_TYPE_VALUE, G_TYPE_INVALID); - dbus_g_proxy_add_signal (priv->type_proxy, "PropertyChanged", + dbus_g_proxy_add_signal (priv->dev_proxy, "PropertyChanged", G_TYPE_STRING, G_TYPE_VALUE, G_TYPE_INVALID); - dbus_g_proxy_connect_signal (priv->type_proxy, "PropertyChanged", + dbus_g_proxy_connect_signal (priv->dev_proxy, "PropertyChanged", G_CALLBACK (bluez_property_changed), device, NULL); + priv->type_proxy = dbus_g_proxy_new_for_name (g_connection, + BLUEZ_SERVICE, + nm_device_get_udi (device), + dun ? BLUEZ_SERIAL_INTERFACE : BLUEZ_NETWORK_INTERFACE); + if (!priv->type_proxy) { + // FIXME: set a reason code + return NM_ACT_STAGE_RETURN_FAILURE; + } + + nm_log_dbg (LOGD_BT, "(%s): requesting connection to the device", + nm_device_get_iface (device)); + + /* Connect to the BT device */ + dbus_g_proxy_begin_call_with_timeout (priv->type_proxy, "Connect", + bluez_connect_cb, + device, + NULL, + 20000, + G_TYPE_STRING, dun ? BLUETOOTH_DUN_UUID : BLUETOOTH_NAP_UUID, + G_TYPE_INVALID); + + if (priv->timeout_id) + g_source_remove (priv->timeout_id); + priv->timeout_id = g_timeout_add_seconds (30, bt_connect_timeout, device); + return NM_ACT_STAGE_RETURN_POSTPONE; } @@ -637,9 +799,12 @@ real_act_stage3_ip4_config_start (NMDevice *device, NMDeviceStateReason *reason) NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE (device); NMActStageReturn ret; - if (priv->bt_type == NM_BT_CAPABILITY_DUN) - ret = ppp_stage3_start (device, reason); - else + if (priv->bt_type == NM_BT_CAPABILITY_DUN) { + ret = nm_modem_stage3_ip4_config_start (NM_DEVICE_BT_GET_PRIVATE (device)->modem, + device, + NM_DEVICE_CLASS (nm_device_bt_parent_class), + reason); + } else ret = NM_DEVICE_CLASS (nm_device_bt_parent_class)->act_stage3_ip4_config_start (device, reason); return ret; @@ -653,9 +818,13 @@ real_act_stage4_get_ip4_config (NMDevice *device, NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE (device); NMActStageReturn ret; - if (priv->bt_type == NM_BT_CAPABILITY_DUN) - ret = ppp_stage4 (device, config, reason); - else + if (priv->bt_type == NM_BT_CAPABILITY_DUN) { + ret = nm_modem_stage4_get_ip4_config (NM_DEVICE_BT_GET_PRIVATE (device)->modem, + device, + NM_DEVICE_CLASS (nm_device_bt_parent_class), + config, + reason); + } else ret = NM_DEVICE_CLASS (nm_device_bt_parent_class)->act_stage4_get_ip4_config (device, config, reason); return ret; @@ -666,17 +835,23 @@ real_deactivate_quickly (NMDevice *device) { NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE (device); - if (priv->pending_ip4_config) { - g_object_unref (priv->pending_ip4_config); - priv->pending_ip4_config = NULL; - } - - priv->in_bytes = priv->out_bytes = 0; + priv->have_iface = FALSE; + priv->connected = FALSE; if (priv->bt_type == NM_BT_CAPABILITY_DUN) { - if (priv->ppp_manager) { - g_object_unref (priv->ppp_manager); - priv->ppp_manager = NULL; + + if (priv->modem) { + nm_modem_deactivate_quickly (priv->modem, device); + + /* Since we're killing the Modem object before it'll get the + * state change signal, simulate the state change here. + */ + nm_modem_device_state_changed (priv->modem, + NM_DEVICE_STATE_DISCONNECTED, + NM_DEVICE_STATE_ACTIVATED, + NM_DEVICE_STATE_REASON_USER_REQUESTED); + g_object_unref (priv->modem); + priv->modem = NULL; } if (priv->type_proxy) { @@ -700,6 +875,16 @@ real_deactivate_quickly (NMDevice *device) } } + if (priv->dev_proxy) { + g_object_unref (priv->dev_proxy); + priv->dev_proxy = NULL; + } + + if (priv->timeout_id) { + g_source_remove (priv->timeout_id); + priv->timeout_id = 0; + } + priv->bt_type = NM_BT_CAPABILITY_NONE; g_free (priv->rfcomm_iface); @@ -709,6 +894,39 @@ real_deactivate_quickly (NMDevice *device) NM_DEVICE_CLASS (nm_device_bt_parent_class)->deactivate_quickly (device); } +/*****************************************************************************/ + +NMDevice * +nm_device_bt_new (const char *udi, + const char *bdaddr, + const char *name, + guint32 capabilities, + gboolean managed) +{ + NMDevice *device; + + g_return_val_if_fail (udi != NULL, NULL); + g_return_val_if_fail (bdaddr != NULL, NULL); + g_return_val_if_fail (name != NULL, NULL); + g_return_val_if_fail (capabilities != NM_BT_CAPABILITY_NONE, NULL); + + device = (NMDevice *) g_object_new (NM_TYPE_DEVICE_BT, + NM_DEVICE_INTERFACE_UDI, udi, + NM_DEVICE_INTERFACE_IFACE, bdaddr, + NM_DEVICE_INTERFACE_DRIVER, "bluez", + NM_DEVICE_BT_HW_ADDRESS, bdaddr, + NM_DEVICE_BT_NAME, name, + NM_DEVICE_BT_CAPABILITIES, capabilities, + NM_DEVICE_INTERFACE_MANAGED, managed, + NM_DEVICE_INTERFACE_TYPE_DESC, "Bluetooth", + NM_DEVICE_INTERFACE_DEVICE_TYPE, NM_DEVICE_TYPE_BT, + NULL); + if (device) + g_signal_connect (device, "state-changed", G_CALLBACK (device_state_changed), device); + + return device; +} + static void nm_device_bt_init (NMDeviceBt *self) { @@ -766,9 +984,21 @@ finalize (GObject *object) { NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE (object); + if (priv->timeout_id) { + g_source_remove (priv->timeout_id); + priv->timeout_id = 0; + } + if (priv->type_proxy) g_object_unref (priv->type_proxy); + if (priv->dev_proxy) + g_object_unref (priv->dev_proxy); + + if (priv->modem) + g_object_unref (priv->modem); + + g_free (priv->rfcomm_iface); g_free (priv->bdaddr); g_free (priv->name); diff --git a/src/nm-device-bt.h b/src/nm-device-bt.h index 67ef6f5f25..d3187d766f 100644 --- a/src/nm-device-bt.h +++ b/src/nm-device-bt.h @@ -22,6 +22,7 @@ #define NM_DEVICE_BT_H #include +#include "nm-modem.h" G_BEGIN_DECLS @@ -60,6 +61,12 @@ guint32 nm_device_bt_get_capabilities (NMDeviceBt *device); const char *nm_device_bt_get_hw_address (NMDeviceBt *device); +gboolean nm_device_bt_modem_added (NMDeviceBt *device, + NMModem *modem, + const char *driver); + +gboolean nm_device_bt_modem_removed (NMDeviceBt *device, NMModem *modem); + G_END_DECLS #endif /* NM_GSM_DEVICE_H */ diff --git a/src/nm-device-cdma.c b/src/nm-device-cdma.c new file mode 100644 index 0000000000..45771f4291 --- /dev/null +++ b/src/nm-device-cdma.c @@ -0,0 +1,75 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager -- Network link manager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2009 - 2010 Red Hat, Inc. + */ + +#include + +#include "nm-modem-cdma.h" +#include "nm-device-interface.h" +#include "nm-device-cdma.h" +#include "nm-properties-changed-signal.h" +#include "nm-rfkill.h" + +#include "nm-device-cdma-glue.h" + +G_DEFINE_TYPE (NMDeviceCdma, nm_device_cdma, NM_TYPE_DEVICE_MODEM) + +enum { + PROPERTIES_CHANGED, + LAST_SIGNAL +}; +static guint signals[LAST_SIGNAL] = { 0 }; + +NMDevice * +nm_device_cdma_new (NMModemCdma *modem, const char *driver) +{ + g_return_val_if_fail (modem != NULL, NULL); + g_return_val_if_fail (NM_IS_MODEM_CDMA (modem), NULL); + g_return_val_if_fail (driver != NULL, NULL); + + return (NMDevice *) g_object_new (NM_TYPE_DEVICE_CDMA, + NM_DEVICE_INTERFACE_UDI, nm_modem_get_path (NM_MODEM (modem)), + NM_DEVICE_INTERFACE_IFACE, nm_modem_get_iface (NM_MODEM (modem)), + NM_DEVICE_INTERFACE_DRIVER, driver, + NM_DEVICE_INTERFACE_TYPE_DESC, "CDMA", + NM_DEVICE_INTERFACE_DEVICE_TYPE, NM_DEVICE_TYPE_CDMA, + NM_DEVICE_INTERFACE_RFKILL_TYPE, RFKILL_TYPE_WWAN, + NM_DEVICE_MODEM_MODEM, modem, + NULL); +} + +static void +nm_device_cdma_init (NMDeviceCdma *self) +{ +} + +static void +nm_device_cdma_class_init (NMDeviceCdmaClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + /* Signals */ + signals[PROPERTIES_CHANGED] = + nm_properties_changed_signal_new (object_class, + G_STRUCT_OFFSET (NMDeviceCdmaClass, properties_changed)); + + dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (klass), + &dbus_glib_nm_device_cdma_object_info); +} + diff --git a/src/nm-device-cdma.h b/src/nm-device-cdma.h new file mode 100644 index 0000000000..f0bf34567c --- /dev/null +++ b/src/nm-device-cdma.h @@ -0,0 +1,55 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager -- Network link manager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2009 Red Hat, Inc. + */ + +#ifndef NM_DEVICE_CDMA_H +#define NM_DEVICE_CDMA_H + +#include "nm-device-modem.h" +#include "nm-modem-cdma.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_CDMA (nm_device_cdma_get_type ()) +#define NM_DEVICE_CDMA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_CDMA, NMDeviceCdma)) +#define NM_DEVICE_CDMA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_CDMA, NMDeviceCdmaClass)) +#define NM_IS_DEVICE_CDMA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_CDMA)) +#define NM_IS_DEVICE_CDMA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_CDMA)) +#define NM_DEVICE_CDMA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_CDMA, NMDeviceCdmaClass)) + +typedef struct { + NMDeviceModem parent; +} NMDeviceCdma; + +typedef struct { + NMDeviceModemClass parent; + + /* Signals */ + void (*signal_quality) (NMDeviceCdma *self, guint32 quality); + + void (*properties_changed) (NMDeviceCdma *self, GHashTable *properties); +} NMDeviceCdmaClass; + +GType nm_device_cdma_get_type (void); + +NMDevice *nm_device_cdma_new (NMModemCdma *modem, const char *driver); + +G_END_DECLS + +#endif /* NM_DEVICE_CDMA_H */ diff --git a/src/nm-device-ethernet.c b/src/nm-device-ethernet.c index 037d603380..be6d4e2f3c 100644 --- a/src/nm-device-ethernet.c +++ b/src/nm-device-ethernet.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2005 - 2008 Red Hat, Inc. + * Copyright (C) 2005 - 2010 Red Hat, Inc. * Copyright (C) 2006 - 2008 Novell, Inc. */ @@ -34,6 +34,8 @@ #include #include +#include + #include "nm-glib-compat.h" #include "nm-device-ethernet.h" #include "nm-device-interface.h" @@ -43,15 +45,14 @@ #include "nm-supplicant-manager.h" #include "nm-supplicant-interface.h" #include "nm-supplicant-config.h" -#include "nm-netlink.h" #include "nm-netlink-monitor.h" -#include "NetworkManagerSystem.h" +#include "nm-system.h" #include "nm-setting-connection.h" #include "nm-setting-wired.h" #include "nm-setting-8021x.h" #include "nm-setting-pppoe.h" #include "ppp-manager/nm-ppp-manager.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-properties-changed-signal.h" #include "nm-dhcp-manager.h" @@ -105,7 +106,6 @@ typedef struct { struct ether_addr hw_addr; gboolean carrier; - guint32 ifindex; NMNetlinkMonitor * monitor; gulong link_connected_id; @@ -133,7 +133,6 @@ enum { PROP_HW_ADDRESS, PROP_SPEED, PROP_CARRIER, - PROP_IFINDEX, LAST_PROP }; @@ -227,11 +226,11 @@ set_carrier (NMDeviceEthernet *self, g_object_notify (G_OBJECT (self), NM_DEVICE_ETHERNET_CARRIER); state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (self)); - nm_info ("(%s): carrier now %s (device state %d%s)", - nm_device_get_iface (NM_DEVICE (self)), - carrier ? "ON" : "OFF", - state, - defer_action ? ", deferring action for 4 seconds" : ""); + nm_log_info (LOGD_HW | LOGD_ETHER, "(%s): carrier now %s (device state %d%s)", + nm_device_get_iface (NM_DEVICE (self)), + carrier ? "ON" : "OFF", + state, + defer_action ? ", deferring action for 4 seconds" : ""); if (defer_action) priv->carrier_action_defer_id = g_timeout_add_seconds (4, carrier_action_defer_cb, self); @@ -246,11 +245,10 @@ carrier_on (NMNetlinkMonitor *monitor, { NMDevice *device = NM_DEVICE (user_data); NMDeviceEthernet *self = NM_DEVICE_ETHERNET (device); - NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self); guint32 caps; /* Make sure signal is for us */ - if (idx == priv->ifindex) { + if (idx == nm_device_get_ifindex (device)) { /* Ignore spurious netlink messages */ caps = nm_device_get_capabilities (device); if (!(caps & NM_DEVICE_CAP_CARRIER_DETECT)) @@ -267,11 +265,10 @@ carrier_off (NMNetlinkMonitor *monitor, { NMDevice *device = NM_DEVICE (user_data); NMDeviceEthernet *self = NM_DEVICE_ETHERNET (device); - NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self); guint32 caps; /* Make sure signal is for us */ - if (idx == priv->ifindex) { + if (idx == nm_device_get_ifindex (device)) { NMDeviceState state; gboolean defer = FALSE; @@ -311,6 +308,10 @@ constructor (GType type, self = NM_DEVICE (object); priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self); + nm_log_dbg (LOGD_HW | LOGD_OLPC_MESH, "(%s): kernel ifindex %d", + nm_device_get_iface (NM_DEVICE (self)), + nm_device_get_ifindex (NM_DEVICE (self))); + caps = nm_device_get_capabilities (self); if (caps & NM_DEVICE_CAP_CARRIER_DETECT) { GError *error = NULL; @@ -328,33 +329,39 @@ constructor (GType type, /* Get initial link state */ if (!nm_netlink_monitor_get_flags_sync (priv->monitor, - priv->ifindex, + nm_device_get_ifindex (NM_DEVICE (self)), &ifflags, &error)) { - nm_warning ("couldn't get initial carrier state: (%d) %s", - error ? error->code : -1, - (error && error->message) ? error->message : "unknown"); + nm_log_warn (LOGD_HW | LOGD_ETHER, + "(%s): couldn't get initial carrier state: (%d) %s", + nm_device_get_iface (NM_DEVICE (self)), + error ? error->code : -1, + (error && error->message) ? error->message : "unknown"); g_clear_error (&error); } else priv->carrier = !!(ifflags & IFF_LOWER_UP); - nm_info ("(%s): carrier is %s", - nm_device_get_iface (NM_DEVICE (self)), - priv->carrier ? "ON" : "OFF"); + nm_log_info (LOGD_HW | LOGD_ETHER, + "(%s): carrier is %s", + nm_device_get_iface (NM_DEVICE (self)), + priv->carrier ? "ON" : "OFF"); /* Request link state again just in case an error occurred getting the * initial link state. */ if (!nm_netlink_monitor_request_status (priv->monitor, &error)) { - nm_warning ("couldn't request carrier state: (%d) %s", - error ? error->code : -1, - (error && error->message) ? error->message : "unknown"); + nm_log_warn (LOGD_HW | LOGD_ETHER, + "(%s): couldn't request carrier state: (%d) %s", + nm_device_get_iface (NM_DEVICE (self)), + error ? error->code : -1, + (error && error->message) ? error->message : "unknown"); g_clear_error (&error); } } else { - nm_info ("(%s): driver '%s' does not support carrier detection.", - nm_device_get_iface (self), - nm_device_get_driver (self)); + nm_log_info (LOGD_HW | LOGD_ETHER, + "(%s): driver '%s' does not support carrier detection.", + nm_device_get_iface (self), + nm_device_get_driver (self)); priv->carrier = TRUE; } @@ -417,8 +424,7 @@ real_hw_take_down (NMDevice *dev) NMDevice * nm_device_ethernet_new (const char *udi, const char *iface, - const char *driver, - guint32 ifindex) + const char *driver) { g_return_val_if_fail (udi != NULL, NULL); g_return_val_if_fail (iface != NULL, NULL); @@ -428,7 +434,6 @@ nm_device_ethernet_new (const char *udi, NM_DEVICE_INTERFACE_UDI, udi, NM_DEVICE_INTERFACE_IFACE, iface, NM_DEVICE_INTERFACE_DRIVER, driver, - NM_DEVICE_ETHERNET_IFINDEX, ifindex, NM_DEVICE_INTERFACE_TYPE_DESC, "Ethernet", NM_DEVICE_INTERFACE_DEVICE_TYPE, NM_DEVICE_TYPE_ETHERNET, NULL); @@ -450,14 +455,6 @@ nm_device_ethernet_get_address (NMDeviceEthernet *self, struct ether_addr *addr) memcpy (addr, &(NM_DEVICE_ETHERNET_GET_PRIVATE (self)->hw_addr), sizeof (struct ether_addr)); } -guint32 -nm_device_ethernet_get_ifindex (NMDeviceEthernet *self) -{ - g_return_val_if_fail (self != NULL, FALSE); - - return NM_DEVICE_ETHERNET_GET_PRIVATE (self)->ifindex; -} - /* Returns speed in Mb/s */ static guint32 nm_device_ethernet_get_speed (NMDeviceEthernet *self) @@ -473,7 +470,7 @@ nm_device_ethernet_get_speed (NMDeviceEthernet *self) fd = socket (PF_INET, SOCK_DGRAM, 0); if (fd < 0) { - nm_warning ("couldn't open control socket."); + nm_log_warn (LOGD_HW, "couldn't open control socket."); return 0; } @@ -508,15 +505,16 @@ real_update_hw_address (NMDevice *dev) fd = socket (PF_INET, SOCK_DGRAM, 0); if (fd < 0) { - nm_warning ("couldn't open control socket."); + nm_log_warn (LOGD_HW, "couldn't open control socket."); return; } memset (&req, 0, sizeof (struct ifreq)); strncpy (req.ifr_name, nm_device_get_iface (dev), IFNAMSIZ); if (ioctl (fd, SIOCGIFHWADDR, &req) < 0) { - nm_warning ("%s: (%s) error getting hardware address: %d", - __func__, nm_device_get_iface (dev), errno); + nm_log_err (LOGD_HW | LOGD_ETHER, + "(%s) error getting hardware address: %d", + nm_device_get_iface (dev), errno); goto out; } @@ -670,7 +668,8 @@ real_connection_secrets_updated (NMDevice *dev, if (!strcmp (setting_name, NM_SETTING_802_1X_SETTING_NAME)) { valid = TRUE; } else { - nm_warning ("Ignoring updated secrets for setting '%s'.", setting_name); + nm_log_warn (LOGD_DEVICE, "Ignoring updated secrets for setting '%s'.", + setting_name); } } @@ -827,8 +826,10 @@ link_timeout_cb (gpointer user_data) if (!setting_name) goto time_out; - nm_info ("Activation (%s/wired): disconnected during authentication," - " asking for new key.", nm_device_get_iface (dev)); + nm_log_info (LOGD_DEVICE | LOGD_ETHER, + "Activation (%s/wired): disconnected during authentication," + " asking for new key.", + nm_device_get_iface (dev)); supplicant_interface_release (self); nm_device_state_changed (dev, NM_DEVICE_STATE_NEED_AUTH, NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT); @@ -842,7 +843,8 @@ link_timeout_cb (gpointer user_data) return FALSE; time_out: - nm_info ("%s: link timed out.", nm_device_get_iface (dev)); + nm_log_warn (LOGD_DEVICE | LOGD_ETHER, + "(%s): link timed out.", nm_device_get_iface (dev)); nm_device_state_changed (dev, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT); return FALSE; @@ -863,7 +865,7 @@ schedule_state_handler (NMDeviceEthernet *self, task = g_slice_new0 (SupplicantStateTask); if (!task) { - nm_warning ("Not enough memory to process supplicant manager state change."); + nm_log_err (LOGD_DEVICE, "Not enough memory to process supplicant manager state change."); return FALSE; } @@ -906,10 +908,11 @@ supplicant_mgr_state_cb (NMSupplicantInterface * iface, guint32 old_state, gpointer user_data) { - nm_info ("(%s): supplicant manager state: %s -> %s", - nm_device_get_iface (NM_DEVICE (user_data)), - nm_supplicant_manager_state_to_string (old_state), - nm_supplicant_manager_state_to_string (new_state)); + nm_log_info (LOGD_DEVICE | LOGD_ETHER, + "(%s): supplicant manager state: %s -> %s", + nm_device_get_iface (NM_DEVICE (user_data)), + nm_supplicant_manager_state_to_string (old_state), + nm_supplicant_manager_state_to_string (new_state)); schedule_state_handler (NM_DEVICE_ETHERNET (user_data), supplicant_mgr_state_cb_handler, @@ -936,7 +939,7 @@ build_supplicant_config (NMDeviceEthernet *self) security = NM_SETTING_802_1X (nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X)); if (!nm_supplicant_config_add_setting_8021x (config, security, con_path, TRUE)) { - nm_warning ("Couldn't add 802.1X security setting to supplicant config."); + nm_log_warn (LOGD_DEVICE, "Couldn't add 802.1X security setting to supplicant config."); g_object_unref (config); config = NULL; } @@ -962,11 +965,17 @@ supplicant_iface_state_cb_handler (gpointer user_data) success = nm_supplicant_interface_set_config (priv->supplicant.iface, config); g_object_unref (config); - if (!success) - nm_warning ("Activation (%s/wired): couldn't send security " - "configuration to the supplicant.", iface); - } else - nm_warning ("Activation (%s/wired): couldn't build security configuration.", iface); + if (!success) { + nm_log_err (LOGD_DEVICE | LOGD_ETHER, + "Activation (%s/wired): couldn't send security " + "configuration to the supplicant.", + iface); + } + } else { + nm_log_warn (LOGD_DEVICE | LOGD_ETHER, + "Activation (%s/wired): couldn't build security configuration.", + iface); + } if (!success) nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED); @@ -990,10 +999,11 @@ supplicant_iface_state_cb (NMSupplicantInterface * iface, gpointer user_data) { - nm_info ("(%s): supplicant interface state: %s -> %s", - nm_device_get_iface (NM_DEVICE (user_data)), - nm_supplicant_interface_state_to_string (old_state), - nm_supplicant_interface_state_to_string (new_state)); + nm_log_info (LOGD_DEVICE | LOGD_ETHER, + "(%s): supplicant interface state: %s -> %s", + nm_device_get_iface (NM_DEVICE (user_data)), + nm_supplicant_interface_state_to_string (old_state), + nm_supplicant_interface_state_to_string (new_state)); schedule_state_handler (NM_DEVICE_ETHERNET (user_data), supplicant_iface_state_cb_handler, @@ -1016,8 +1026,9 @@ supplicant_iface_connection_state_cb_handler (gpointer user_data) * schedule the next activation stage. */ if (nm_device_get_state (dev) == NM_DEVICE_STATE_CONFIG) { - nm_info ("Activation (%s/wired) Stage 2 of 5 (Device Configure) successful.", - nm_device_get_iface (dev)); + nm_log_info (LOGD_DEVICE | LOGD_ETHER, + "Activation (%s/wired) Stage 2 of 5 (Device Configure) successful.", + nm_device_get_iface (dev)); nm_device_activate_schedule_stage3_ip_config_start (dev); } } else if (task->new_state == NM_SUPPLICANT_INTERFACE_CON_STATE_DISCONNECTED) { @@ -1040,10 +1051,11 @@ supplicant_iface_connection_state_cb (NMSupplicantInterface * iface, guint32 old_state, gpointer user_data) { - nm_info ("(%s) supplicant connection state: %s -> %s", - nm_device_get_iface (NM_DEVICE (user_data)), - nm_supplicant_interface_connection_state_to_string (old_state), - nm_supplicant_interface_connection_state_to_string (new_state)); + nm_log_info (LOGD_DEVICE | LOGD_ETHER, + "(%s) supplicant connection state: %s -> %s", + nm_device_get_iface (NM_DEVICE (user_data)), + nm_supplicant_interface_connection_state_to_string (old_state), + nm_supplicant_interface_connection_state_to_string (new_state)); schedule_state_handler (NM_DEVICE_ETHERNET (user_data), supplicant_iface_connection_state_cb_handler, @@ -1075,8 +1087,9 @@ supplicant_iface_connection_error_cb (NMSupplicantInterface *iface, NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self); guint id; - nm_info ("Activation (%s/wired): association request to the supplicant failed: %s - %s", - nm_device_get_iface (NM_DEVICE (self)), name, message); + nm_log_warn (LOGD_DEVICE | LOGD_ETHER, + "Activation (%s/wired): association request to the supplicant failed: %s - %s", + nm_device_get_iface (NM_DEVICE (self)), name, message); if (priv->supplicant.iface_con_error_cb_id) g_source_remove (priv->supplicant.iface_con_error_cb_id); @@ -1120,8 +1133,9 @@ handle_auth_or_fail (NMDeviceEthernet *self, NULL); g_object_set_data (G_OBJECT (connection), WIRED_SECRETS_TRIES, GUINT_TO_POINTER (++tries)); - } else - nm_warning ("Cleared secrets, but setting didn't need any secrets."); + } else { + nm_log_info (LOGD_DEVICE, "Cleared secrets, but setting didn't need any secrets."); + } return NM_ACT_STAGE_RETURN_POSTPONE; } @@ -1140,15 +1154,17 @@ supplicant_connection_timeout_cb (gpointer user_data) iface = nm_device_get_iface (device); /* Authentication failed, encryption key is probably bad */ - nm_info ("Activation (%s/wired): association took too long.", iface); + nm_log_warn (LOGD_DEVICE | LOGD_ETHER, + "Activation (%s/wired): association took too long.", iface); supplicant_interface_release (self); req = nm_device_get_act_request (device); g_assert (req); - if (handle_auth_or_fail (self, req, TRUE) == NM_ACT_STAGE_RETURN_POSTPONE) - nm_info ("Activation (%s/wired): asking for new secrets", iface); - else + if (handle_auth_or_fail (self, req, TRUE) == NM_ACT_STAGE_RETURN_POSTPONE) { + nm_log_info (LOGD_DEVICE | LOGD_ETHER, + "Activation (%s/wired): asking for new secrets", iface); + } else nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_NO_SECRETS); return FALSE; @@ -1165,7 +1181,9 @@ supplicant_interface_init (NMDeviceEthernet *self) /* Create supplicant interface */ priv->supplicant.iface = nm_supplicant_manager_get_iface (priv->supplicant.mgr, iface, FALSE); if (!priv->supplicant.iface) { - nm_warning ("Couldn't initialize supplicant interface for %s.", iface); + nm_log_err (LOGD_DEVICE | LOGD_ETHER, + "Couldn't initialize supplicant interface for %s.", + iface); supplicant_interface_release (self); return FALSE; @@ -1213,7 +1231,7 @@ nm_8021x_stage2_config (NMDeviceEthernet *self, NMDeviceStateReason *reason) connection = nm_act_request_get_connection (nm_device_get_act_request (NM_DEVICE (self))); security = NM_SETTING_802_1X (nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X)); if (!security) { - nm_warning ("Invalid or missing 802.1X security"); + nm_log_err (LOGD_DEVICE, "Invalid or missing 802.1X security"); *reason = NM_DEVICE_STATE_REASON_CONFIG_FAILED; return ret; } @@ -1226,15 +1244,17 @@ nm_8021x_stage2_config (NMDeviceEthernet *self, NMDeviceStateReason *reason) if (setting_name) { NMActRequest *req = nm_device_get_act_request (NM_DEVICE (self)); - nm_info ("Activation (%s/wired): connection '%s' has security, but secrets are required.", - iface, nm_setting_connection_get_id (s_connection)); + nm_log_info (LOGD_DEVICE | LOGD_ETHER, + "Activation (%s/wired): connection '%s' has security, but secrets are required.", + iface, nm_setting_connection_get_id (s_connection)); ret = handle_auth_or_fail (self, req, FALSE); if (ret != NM_ACT_STAGE_RETURN_POSTPONE) *reason = NM_DEVICE_STATE_REASON_NO_SECRETS; } else { - nm_info ("Activation (%s/wired): connection '%s' requires no security. No secrets needed.", - iface, nm_setting_connection_get_id (s_connection)); + nm_log_info (LOGD_DEVICE | LOGD_ETHER, + "Activation (%s/wired): connection '%s' requires no security. No secrets needed.", + iface, nm_setting_connection_get_id (s_connection)); if (supplicant_interface_init (self)) ret = NM_ACT_STAGE_RETURN_POSTPONE; @@ -1311,8 +1331,8 @@ pppoe_stage3_ip4_config_start (NMDeviceEthernet *self, NMDeviceStateReason *reas self); ret = NM_ACT_STAGE_RETURN_POSTPONE; } else { - nm_warning ("(%s): PPPoE failed to start: %s", - nm_device_get_iface (NM_DEVICE (self)), err->message); + nm_log_warn (LOGD_DEVICE, "(%s): PPPoE failed to start: %s", + nm_device_get_iface (NM_DEVICE (self)), err->message); g_error_free (err); g_object_unref (priv->ppp_manager); @@ -1586,7 +1606,7 @@ ip4_match_config (NMDevice *self, NMConnection *connection) int ifindex; AddrData check_data; - ifindex = nm_device_ethernet_get_ifindex (NM_DEVICE_ETHERNET (self)); + ifindex = nm_device_get_ifindex (self); s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION); g_assert (s_con); @@ -1608,9 +1628,9 @@ ip4_match_config (NMDevice *self, NMConnection *connection) /* Get any saved leases that apply to this connection */ dhcp_mgr = nm_dhcp_manager_get (); - leases = nm_dhcp_manager_get_lease_ip4_config (dhcp_mgr, - nm_device_get_iface (self), - nm_setting_connection_get_uuid (s_con)); + leases = nm_dhcp_manager_get_lease_config (dhcp_mgr, + nm_device_get_iface (self), + nm_setting_connection_get_uuid (s_con)); g_object_unref (dhcp_mgr); method = nm_setting_ip4_config_get_method (s_ip4); @@ -1758,9 +1778,6 @@ get_property (GObject *object, guint prop_id, case PROP_CARRIER: g_value_set_boolean (value, priv->carrier); break; - case PROP_IFINDEX: - g_value_set_uint (value, priv->ifindex); - break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -1771,13 +1788,7 @@ static void set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (object); - switch (prop_id) { - case PROP_IFINDEX: - /* construct-only */ - priv->ifindex = g_value_get_uint (value); - break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -1844,14 +1855,6 @@ nm_device_ethernet_class_init (NMDeviceEthernetClass *klass) FALSE, G_PARAM_READABLE)); - g_object_class_install_property - (object_class, PROP_IFINDEX, - g_param_spec_uint (NM_DEVICE_ETHERNET_IFINDEX, - "Ifindex", - "Interface index", - 0, G_MAXUINT32, 0, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | NM_PROPERTY_PARAM_NO_EXPORT)); - /* Signals */ signals[PROPERTIES_CHANGED] = nm_properties_changed_signal_new (object_class, @@ -1880,7 +1883,7 @@ supports_ethtool_carrier_detect (NMDeviceEthernet *self) fd = socket (PF_INET, SOCK_DGRAM, 0); if (fd < 0) { - nm_warning ("couldn't open control socket."); + nm_log_err (LOGD_HW, "couldn't open control socket."); return FALSE; } @@ -1890,13 +1893,18 @@ supports_ethtool_carrier_detect (NMDeviceEthernet *self) edata.cmd = ETHTOOL_GLINK; ifr.ifr_data = (char *) &edata; - if (ioctl (fd, SIOCETHTOOL, &ifr) < 0) + errno = 0; + if (ioctl (fd, SIOCETHTOOL, &ifr) < 0) { + nm_log_dbg (LOGD_HW | LOGD_ETHER, "SIOCETHTOOL failed: %d", errno); goto out; + } supports_ethtool = TRUE; out: close (fd); + nm_log_dbg (LOGD_HW | LOGD_ETHER, "ethtool %s supported", + supports_ethtool ? "is" : "not"); return supports_ethtool; } @@ -1920,8 +1928,13 @@ mdio_read (NMDeviceEthernet *self, int fd, struct ifreq *ifr, int location) mii = (struct mii_ioctl_data *) &ifr->ifr_ifru; mii->reg_num = location; - if (ioctl (fd, SIOCGMIIREG, ifr) == 0) + errno = 0; + if (ioctl (fd, SIOCGMIIREG, ifr) == 0) { + nm_log_dbg (LOGD_HW | LOGD_ETHER, "SIOCGMIIREG result 0x%X", mii->val_out); val = mii->val_out; + } else { + nm_log_dbg (LOGD_HW | LOGD_ETHER, "SIOCGMIIREG failed: %d", errno); + } return val; } @@ -1937,19 +1950,24 @@ supports_mii_carrier_detect (NMDeviceEthernet *self) fd = socket (PF_INET, SOCK_DGRAM, 0); if (fd < 0) { - nm_warning ("couldn't open control socket."); + nm_log_err (LOGD_HW, "couldn't open control socket."); return 0; } memset (&ifr, 0, sizeof (struct ifreq)); strncpy (ifr.ifr_name, nm_device_get_iface (NM_DEVICE (self)), IFNAMSIZ); - if (ioctl (fd, SIOCGMIIPHY, &ifr) < 0) + errno = 0; + if (ioctl (fd, SIOCGMIIPHY, &ifr) < 0) { + nm_log_dbg (LOGD_HW | LOGD_ETHER, "SIOCGMIIPHY failed: %d", errno); goto out; + } /* If we can read the BMSR register, we assume that the card supports MII link detection */ bmsr = mdio_read (self, fd, &ifr, MII_BMSR); supports_mii = (bmsr != -1) ? TRUE : FALSE; + nm_log_dbg (LOGD_HW | LOGD_ETHER, "MII %s supported", + supports_mii ? "is" : "not"); out: close (fd); diff --git a/src/nm-device-ethernet.h b/src/nm-device-ethernet.h index 643572f700..7bb3db0086 100644 --- a/src/nm-device-ethernet.h +++ b/src/nm-device-ethernet.h @@ -39,7 +39,6 @@ G_BEGIN_DECLS #define NM_DEVICE_ETHERNET_HW_ADDRESS "hw-address" #define NM_DEVICE_ETHERNET_SPEED "speed" #define NM_DEVICE_ETHERNET_CARRIER "carrier" -#define NM_DEVICE_ETHERNET_IFINDEX "ifindex" typedef struct { NMDevice parent; @@ -58,14 +57,11 @@ GType nm_device_ethernet_get_type (void); NMDevice *nm_device_ethernet_new (const char *udi, const char *iface, - const char *driver, - guint32 ifindex); + const char *driver); void nm_device_ethernet_get_address (NMDeviceEthernet *dev, struct ether_addr *addr); -guint32 nm_device_ethernet_get_ifindex (NMDeviceEthernet *dev); - G_END_DECLS #endif /* NM_DEVICE_ETHERNET_H */ diff --git a/src/nm-device-gsm.c b/src/nm-device-gsm.c new file mode 100644 index 0000000000..2a98a41f4e --- /dev/null +++ b/src/nm-device-gsm.c @@ -0,0 +1,75 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager -- Network link manager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2009 - 2010 Red Hat, Inc. + */ + +#include + +#include "nm-modem-gsm.h" +#include "nm-device-interface.h" +#include "nm-device-gsm.h" +#include "nm-properties-changed-signal.h" +#include "nm-rfkill.h" + +#include "nm-device-gsm-glue.h" + +G_DEFINE_TYPE (NMDeviceGsm, nm_device_gsm, NM_TYPE_DEVICE_MODEM) + +enum { + PROPERTIES_CHANGED, + LAST_SIGNAL +}; +static guint signals[LAST_SIGNAL] = { 0 }; + +NMDevice * +nm_device_gsm_new (NMModemGsm *modem, const char *driver) +{ + g_return_val_if_fail (modem != NULL, NULL); + g_return_val_if_fail (NM_IS_MODEM_GSM (modem), NULL); + g_return_val_if_fail (driver != NULL, NULL); + + return (NMDevice *) g_object_new (NM_TYPE_DEVICE_GSM, + NM_DEVICE_INTERFACE_UDI, nm_modem_get_path (NM_MODEM (modem)), + NM_DEVICE_INTERFACE_IFACE, nm_modem_get_iface (NM_MODEM (modem)), + NM_DEVICE_INTERFACE_DRIVER, driver, + NM_DEVICE_INTERFACE_TYPE_DESC, "GSM", + NM_DEVICE_INTERFACE_DEVICE_TYPE, NM_DEVICE_TYPE_GSM, + NM_DEVICE_INTERFACE_RFKILL_TYPE, RFKILL_TYPE_WWAN, + NM_DEVICE_MODEM_MODEM, modem, + NULL); +} + +static void +nm_device_gsm_init (NMDeviceGsm *self) +{ +} + +static void +nm_device_gsm_class_init (NMDeviceGsmClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + /* Signals */ + signals[PROPERTIES_CHANGED] = + nm_properties_changed_signal_new (object_class, + G_STRUCT_OFFSET (NMDeviceGsmClass, properties_changed)); + + dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (klass), + &dbus_glib_nm_device_gsm_object_info); +} + diff --git a/src/nm-device-gsm.h b/src/nm-device-gsm.h new file mode 100644 index 0000000000..9b403c63a7 --- /dev/null +++ b/src/nm-device-gsm.h @@ -0,0 +1,55 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager -- Network link manager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2009 Red Hat, Inc. + */ + +#ifndef NM_DEVICE_GSM_H +#define NM_DEVICE_GSM_H + +#include "nm-device-modem.h" +#include "nm-modem-gsm.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_GSM (nm_device_gsm_get_type ()) +#define NM_DEVICE_GSM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_GSM, NMDeviceGsm)) +#define NM_DEVICE_GSM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_GSM, NMDeviceGsmClass)) +#define NM_IS_DEVICE_GSM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_GSM)) +#define NM_IS_DEVICE_GSM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_GSM)) +#define NM_DEVICE_GSM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_GSM, NMDeviceGsmClass)) + +typedef struct { + NMDeviceModem parent; +} NMDeviceGsm; + +typedef struct { + NMDeviceModemClass parent; + + /* Signals */ + void (*signal_quality) (NMDeviceGsm *self, guint32 quality); + + void (*properties_changed) (NMDeviceGsm *self, GHashTable *properties); +} NMDeviceGsmClass; + +GType nm_device_gsm_get_type (void); + +NMDevice *nm_device_gsm_new (NMModemGsm *modem, const char *driver); + +G_END_DECLS + +#endif /* NM_DEVICE_GSM_H */ diff --git a/src/nm-device-interface.c b/src/nm-device-interface.c index 70cce8b624..85f58d5563 100644 --- a/src/nm-device-interface.c +++ b/src/nm-device-interface.c @@ -16,14 +16,15 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 2007 - 2008 Novell, Inc. - * Copyright (C) 2007 - 2008 Red Hat, Inc. + * Copyright (C) 2007 - 2010 Red Hat, Inc. */ #include "nm-marshal.h" #include "nm-setting-connection.h" #include "nm-device-interface.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-properties-changed-signal.h" +#include "nm-rfkill.h" static gboolean impl_device_disconnect (NMDeviceInterface *device, GError **error); @@ -137,6 +138,14 @@ nm_device_interface_init (gpointer g_iface) DBUS_TYPE_G_OBJECT_PATH, G_PARAM_READWRITE)); + g_object_interface_install_property + (g_iface, + g_param_spec_boxed (NM_DEVICE_INTERFACE_DHCP6_CONFIG, + "DHCP6 Config", + "DHCP6 Config", + DBUS_TYPE_G_OBJECT_PATH, + G_PARAM_READWRITE)); + g_object_interface_install_property (g_iface, g_param_spec_uint (NM_DEVICE_INTERFACE_STATE, @@ -168,6 +177,23 @@ nm_device_interface_init (gpointer g_iface) NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | NM_PROPERTY_PARAM_NO_EXPORT)); + g_object_interface_install_property + (g_iface, g_param_spec_uint (NM_DEVICE_INTERFACE_RFKILL_TYPE, + "Rfkill Type", + "Type of rfkill switch (if any) supported by this device", + RFKILL_TYPE_WLAN, + RFKILL_TYPE_MAX, + RFKILL_TYPE_UNKNOWN, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | NM_PROPERTY_PARAM_NO_EXPORT)); + + g_object_interface_install_property + (g_iface, + g_param_spec_int (NM_DEVICE_INTERFACE_IFINDEX, + "Ifindex", + "Ifindex", + 0, G_MAXINT, 0, + G_PARAM_READABLE | NM_PROPERTY_PARAM_NO_EXPORT)); + /* Signals */ g_signal_new ("state-changed", iface_type, @@ -264,8 +290,8 @@ nm_device_interface_activate (NMDeviceInterface *device, g_assert (s_con); iface = nm_device_interface_get_iface (device); - nm_info ("Activation (%s) starting connection '%s'", iface, - nm_setting_connection_get_id (s_con)); + nm_log_info (LOGD_DEVICE, "Activation (%s) starting connection '%s'", iface, + nm_setting_connection_get_id (s_con)); g_free (iface); success = NM_DEVICE_INTERFACE_GET_INTERFACE (device)->activate (device, req, error); @@ -361,6 +387,16 @@ nm_device_interface_set_enabled (NMDeviceInterface *device, gboolean enabled) g_return_if_fail (NM_IS_DEVICE_INTERFACE (device)); if (NM_DEVICE_INTERFACE_GET_INTERFACE (device)->set_enabled) - return NM_DEVICE_INTERFACE_GET_INTERFACE (device)->set_enabled (device, enabled); + NM_DEVICE_INTERFACE_GET_INTERFACE (device)->set_enabled (device, enabled); +} + +gboolean +nm_device_interface_get_enabled (NMDeviceInterface *device) +{ + g_return_val_if_fail (NM_IS_DEVICE_INTERFACE (device), FALSE); + + if (NM_DEVICE_INTERFACE_GET_INTERFACE (device)->get_enabled) + return NM_DEVICE_INTERFACE_GET_INTERFACE (device)->get_enabled (device); + return TRUE; } diff --git a/src/nm-device-interface.h b/src/nm-device-interface.h index 0ec5e3da14..ec27f6e820 100644 --- a/src/nm-device-interface.h +++ b/src/nm-device-interface.h @@ -53,10 +53,13 @@ typedef enum #define NM_DEVICE_INTERFACE_IP4_CONFIG "ip4-config" #define NM_DEVICE_INTERFACE_DHCP4_CONFIG "dhcp4-config" #define NM_DEVICE_INTERFACE_IP6_CONFIG "ip6-config" +#define NM_DEVICE_INTERFACE_DHCP6_CONFIG "dhcp6-config" #define NM_DEVICE_INTERFACE_STATE "state" #define NM_DEVICE_INTERFACE_DEVICE_TYPE "device-type" /* ugh */ #define NM_DEVICE_INTERFACE_MANAGED "managed" -#define NM_DEVICE_INTERFACE_TYPE_DESC "type-desc" /* Internal only */ +#define NM_DEVICE_INTERFACE_TYPE_DESC "type-desc" /* Internal only */ +#define NM_DEVICE_INTERFACE_RFKILL_TYPE "rfkill-type" /* Internal only */ +#define NM_DEVICE_INTERFACE_IFINDEX "ifindex" /* Internal only */ typedef enum { NM_DEVICE_INTERFACE_PROP_FIRST = 0x1000, @@ -69,10 +72,13 @@ typedef enum { NM_DEVICE_INTERFACE_PROP_IP4_CONFIG, NM_DEVICE_INTERFACE_PROP_DHCP4_CONFIG, NM_DEVICE_INTERFACE_PROP_IP6_CONFIG, + NM_DEVICE_INTERFACE_PROP_DHCP6_CONFIG, NM_DEVICE_INTERFACE_PROP_STATE, NM_DEVICE_INTERFACE_PROP_DEVICE_TYPE, NM_DEVICE_INTERFACE_PROP_MANAGED, NM_DEVICE_INTERFACE_PROP_TYPE_DESC, + NM_DEVICE_INTERFACE_PROP_RFKILL_TYPE, + NM_DEVICE_INTERFACE_PROP_IFINDEX, } NMDeviceInterfaceProp; @@ -99,6 +105,8 @@ struct _NMDeviceInterface { void (*set_enabled) (NMDeviceInterface *device, gboolean enabled); + gboolean (*get_enabled) (NMDeviceInterface *device); + /* Signals */ void (*state_changed) (NMDeviceInterface *device, NMDeviceState new_state, @@ -133,6 +141,8 @@ NMConnection * nm_device_interface_connection_match_config (NMDeviceInterface *d gboolean nm_device_interface_can_assume_connection (NMDeviceInterface *device); +gboolean nm_device_interface_get_enabled (NMDeviceInterface *device); + void nm_device_interface_set_enabled (NMDeviceInterface *device, gboolean enabled); #endif /* NM_DEVICE_INTERFACE_H */ diff --git a/src/nm-device-modem.c b/src/nm-device-modem.c new file mode 100644 index 0000000000..3ba26ddcdd --- /dev/null +++ b/src/nm-device-modem.c @@ -0,0 +1,459 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager -- Network link manager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2009 - 2010 Red Hat, Inc. + */ + +#include + +#include "nm-device-modem.h" +#include "nm-device-interface.h" +#include "nm-modem.h" +#include "nm-device-private.h" +#include "nm-properties-changed-signal.h" +#include "nm-marshal.h" +#include "nm-logging.h" + +static void device_interface_init (NMDeviceInterface *iface_class); + +G_DEFINE_TYPE_EXTENDED (NMDeviceModem, nm_device_modem, NM_TYPE_DEVICE, G_TYPE_FLAG_ABSTRACT, + G_IMPLEMENT_INTERFACE (NM_TYPE_DEVICE_INTERFACE, device_interface_init)) + +#define NM_DEVICE_MODEM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_MODEM, NMDeviceModemPrivate)) + +typedef struct { + NMModem *modem; +} NMDeviceModemPrivate; + +enum { + PROP_0, + PROP_MODEM +}; + +enum { + PPP_STATS, + LAST_SIGNAL +}; +static guint signals[LAST_SIGNAL] = { 0 }; + +static void real_set_enabled (NMDeviceInterface *device, gboolean enabled); + +/*****************************************************************************/ + +static void +ppp_stats (NMModem *modem, + guint32 in_bytes, + guint32 out_bytes, + gpointer user_data) +{ + g_signal_emit (G_OBJECT (user_data), signals[PPP_STATS], 0, in_bytes, out_bytes); +} + +static void +ppp_failed (NMModem *modem, NMDeviceStateReason reason, gpointer user_data) +{ + NMDevice *device = NM_DEVICE (user_data); + + switch (nm_device_interface_get_state (NM_DEVICE_INTERFACE (device))) { + case NM_DEVICE_STATE_PREPARE: + case NM_DEVICE_STATE_CONFIG: + case NM_DEVICE_STATE_NEED_AUTH: + case NM_DEVICE_STATE_ACTIVATED: + nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, reason); + break; + case NM_DEVICE_STATE_IP_CONFIG: + if (nm_device_ip_config_should_fail (device, FALSE)) { + nm_device_state_changed (device, + NM_DEVICE_STATE_FAILED, + NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE); + } + break; + default: + break; + } +} + +static void +modem_prepare_result (NMModem *modem, + gboolean success, + NMDeviceStateReason reason, + gpointer user_data) +{ + NMDevice *device = NM_DEVICE (user_data); + NMDeviceState state; + + state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (device)); + g_return_if_fail (state == NM_DEVICE_STATE_PREPARE); + + if (success) + nm_device_activate_schedule_stage2_device_config (device); + else + nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, reason); +} + +static void +modem_need_auth (NMModem *modem, + const char *setting_name, + gboolean retry, + RequestSecretsCaller caller, + const char *hint1, + const char *hint2, + gpointer user_data) +{ + NMDeviceModem *self = NM_DEVICE_MODEM (user_data); + NMActRequest *req; + + req = nm_device_get_act_request (NM_DEVICE (self)); + g_assert (req); + + nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_NEED_AUTH, NM_DEVICE_STATE_REASON_NONE); + nm_act_request_get_secrets (req, setting_name, retry, caller, hint1, hint2); +} + +static void +modem_ip4_config_result (NMModem *self, + const char *iface, + NMIP4Config *config, + GError *error, + gpointer user_data) +{ + NMDevice *device = NM_DEVICE (user_data); + NMDeviceState state; + + state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (device)); + g_return_if_fail (state == NM_DEVICE_STATE_IP_CONFIG); + + if (error) { + nm_log_warn (LOGD_MB | LOGD_IP4, "retrieving IP4 configuration failed: (%d) %s", + error ? error->code : -1, + error && error->message ? error->message : "(unknown)"); + + nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE); + } else { + if (iface) + nm_device_set_ip_iface (device, iface); + + nm_device_activate_schedule_stage4_ip4_config_get (device); + } +} + +static void +modem_enabled_cb (NMModem *modem, GParamSpec *pspec, gpointer user_data) +{ + NMDeviceModem *self = NM_DEVICE_MODEM (user_data); + NMDeviceModemPrivate *priv = NM_DEVICE_MODEM_GET_PRIVATE (self); + + real_set_enabled (NM_DEVICE_INTERFACE (self), nm_modem_get_mm_enabled (priv->modem)); +} + +/*****************************************************************************/ + +NMModem * +nm_device_modem_get_modem (NMDeviceModem *self) +{ + g_return_val_if_fail (self != NULL, NULL); + g_return_val_if_fail (NM_IS_DEVICE_MODEM (self), NULL); + + return NM_DEVICE_MODEM_GET_PRIVATE (self)->modem; +} + +/*****************************************************************************/ + +static void +device_state_changed (NMDevice *device, + NMDeviceState new_state, + NMDeviceState old_state, + NMDeviceStateReason reason, + gpointer user_data) +{ + nm_modem_device_state_changed (NM_DEVICE_MODEM_GET_PRIVATE (device)->modem, + new_state, + old_state, + reason); +} + +static guint32 +real_get_generic_capabilities (NMDevice *device) +{ + return NM_DEVICE_CAP_NM_SUPPORTED; +} + +static NMConnection * +real_get_best_auto_connection (NMDevice *device, + GSList *connections, + char **specific_object) +{ + NMDeviceModemPrivate *priv = NM_DEVICE_MODEM_GET_PRIVATE (device); + + return nm_modem_get_best_auto_connection (priv->modem, connections, specific_object); +} + +static void +real_connection_secrets_updated (NMDevice *device, + NMConnection *connection, + GSList *updated_settings, + RequestSecretsCaller caller) +{ + NMDeviceModemPrivate *priv = NM_DEVICE_MODEM_GET_PRIVATE (device); + NMActRequest *req; + + g_return_if_fail (IS_ACTIVATING_STATE (nm_device_get_state (device))); + + req = nm_device_get_act_request (device); + g_assert (req); + + if (!nm_modem_connection_secrets_updated (priv->modem, + req, + connection, + updated_settings, + caller)) { + nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_NO_SECRETS); + return; + } + + /* PPP handles stuff itself... */ + if (caller == SECRETS_CALLER_PPP) + return; + + /* Otherwise, on success for modem secrets we need to schedule stage1 again */ + g_return_if_fail (nm_device_get_state (device) == NM_DEVICE_STATE_NEED_AUTH); + nm_device_activate_schedule_stage1_device_prepare (device); +} + +static gboolean +real_check_connection_compatible (NMDevice *device, + NMConnection *connection, + GError **error) +{ + NMDeviceModemPrivate *priv = NM_DEVICE_MODEM_GET_PRIVATE (device); + + return nm_modem_check_connection_compatible (priv->modem, connection, error); +} + +static gboolean +real_hw_is_up (NMDevice *device) +{ + return nm_modem_hw_is_up (NM_DEVICE_MODEM_GET_PRIVATE (device)->modem, device); +} + +static gboolean +real_hw_bring_up (NMDevice *device, gboolean *no_firmware) +{ + return nm_modem_hw_bring_up (NM_DEVICE_MODEM_GET_PRIVATE (device)->modem, device, no_firmware); +} + +static void +real_deactivate_quickly (NMDevice *device) +{ + nm_modem_deactivate_quickly (NM_DEVICE_MODEM_GET_PRIVATE (device)->modem, device); +} + +static NMActStageReturn +real_act_stage1_prepare (NMDevice *device, NMDeviceStateReason *reason) +{ + NMActRequest *req; + + req = nm_device_get_act_request (device); + g_assert (req); + + return nm_modem_act_stage1_prepare (NM_DEVICE_MODEM_GET_PRIVATE (device)->modem, req, reason); +} + +static NMActStageReturn +real_act_stage2_config (NMDevice *device, NMDeviceStateReason *reason) +{ + NMActRequest *req; + + req = nm_device_get_act_request (device); + g_assert (req); + + return nm_modem_act_stage2_config (NM_DEVICE_MODEM_GET_PRIVATE (device)->modem, req, reason); +} + +static NMActStageReturn +real_act_stage3_ip4_config_start (NMDevice *device, NMDeviceStateReason *reason) +{ + return nm_modem_stage3_ip4_config_start (NM_DEVICE_MODEM_GET_PRIVATE (device)->modem, + device, + NM_DEVICE_CLASS (nm_device_modem_parent_class), + reason); +} + +static NMActStageReturn +real_act_stage4_get_ip4_config (NMDevice *device, + NMIP4Config **config, + NMDeviceStateReason *reason) +{ + return nm_modem_stage4_get_ip4_config (NM_DEVICE_MODEM_GET_PRIVATE (device)->modem, + device, + NM_DEVICE_CLASS (nm_device_modem_parent_class), + config, + reason); +} + +/*****************************************************************************/ + +static gboolean +real_get_enabled (NMDeviceInterface *device) +{ + return nm_modem_get_mm_enabled (NM_DEVICE_MODEM_GET_PRIVATE (device)->modem); +} + +static void +real_set_enabled (NMDeviceInterface *device, gboolean enabled) +{ + NMDeviceModem *self = NM_DEVICE_MODEM (device); + NMDeviceModemPrivate *priv = NM_DEVICE_MODEM_GET_PRIVATE (self); + NMDeviceState state; + + if (priv->modem) { + nm_modem_set_mm_enabled (priv->modem, enabled); + + if (enabled == FALSE) { + state = nm_device_interface_get_state (device); + if (state == NM_DEVICE_STATE_ACTIVATED) { + nm_device_state_changed (NM_DEVICE (device), + NM_DEVICE_STATE_DISCONNECTED, + NM_DEVICE_STATE_REASON_NONE); + } + } + } +} + +/*****************************************************************************/ + +static void +device_interface_init (NMDeviceInterface *iface_class) +{ + iface_class->get_enabled = real_get_enabled; + iface_class->set_enabled = real_set_enabled; +} + +static void +nm_device_modem_init (NMDeviceModem *self) +{ + g_signal_connect (self, "state-changed", G_CALLBACK (device_state_changed), self); +} + +static void +set_modem (NMDeviceModem *self, NMModem *modem) +{ + NMDeviceModemPrivate *priv = NM_DEVICE_MODEM_GET_PRIVATE (self); + + g_return_if_fail (modem != NULL); + + priv->modem = g_object_ref (modem); + + g_signal_connect (modem, NM_MODEM_PPP_STATS, G_CALLBACK (ppp_stats), self); + g_signal_connect (modem, NM_MODEM_PPP_FAILED, G_CALLBACK (ppp_failed), self); + g_signal_connect (modem, NM_MODEM_PREPARE_RESULT, G_CALLBACK (modem_prepare_result), self); + g_signal_connect (modem, NM_MODEM_IP4_CONFIG_RESULT, G_CALLBACK (modem_ip4_config_result), self); + g_signal_connect (modem, NM_MODEM_NEED_AUTH, G_CALLBACK (modem_need_auth), self); + g_signal_connect (modem, "notify::" NM_MODEM_ENABLED, G_CALLBACK (modem_enabled_cb), self); +} + +static void +set_property (GObject *object, guint prop_id, + const GValue *value, GParamSpec *pspec) +{ + switch (prop_id) { + case PROP_MODEM: + /* construct-only */ + set_modem (NM_DEVICE_MODEM (object), g_value_get_object (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +get_property (GObject *object, guint prop_id, + GValue *value, GParamSpec *pspec) +{ + NMDeviceModemPrivate *priv = NM_DEVICE_MODEM_GET_PRIVATE (object); + + switch (prop_id) { + case PROP_MODEM: + g_value_set_object (value, priv->modem); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +finalize (GObject *object) +{ + NMDeviceModemPrivate *priv = NM_DEVICE_MODEM_GET_PRIVATE (object); + + g_object_unref (priv->modem); + priv->modem = NULL; + + G_OBJECT_CLASS (nm_device_modem_parent_class)->finalize (object); +} + +static void +nm_device_modem_class_init (NMDeviceModemClass *mclass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (mclass); + NMDeviceClass *device_class = NM_DEVICE_CLASS (mclass); + + g_type_class_add_private (object_class, sizeof (NMDeviceModemPrivate)); + + /* Virtual methods */ + object_class->finalize = finalize; + object_class->get_property = get_property; + object_class->set_property = set_property; + + device_class->get_generic_capabilities = real_get_generic_capabilities; + device_class->get_best_auto_connection = real_get_best_auto_connection; + device_class->connection_secrets_updated = real_connection_secrets_updated; + device_class->check_connection_compatible = real_check_connection_compatible; + device_class->hw_is_up = real_hw_is_up; + device_class->hw_bring_up = real_hw_bring_up; + device_class->deactivate_quickly = real_deactivate_quickly; + device_class->act_stage1_prepare = real_act_stage1_prepare; + device_class->act_stage2_config = real_act_stage2_config; + device_class->act_stage3_ip4_config_start = real_act_stage3_ip4_config_start; + device_class->act_stage4_get_ip4_config = real_act_stage4_get_ip4_config; + + /* Properties */ + g_object_class_install_property + (object_class, PROP_MODEM, + g_param_spec_object (NM_DEVICE_MODEM_MODEM, + "Modem", + "Modem", + NM_TYPE_MODEM, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | NM_PROPERTY_PARAM_NO_EXPORT)); + + /* Signals */ + signals[PPP_STATS] = + g_signal_new ("ppp-stats", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (NMDeviceModemClass, ppp_stats), + NULL, NULL, + _nm_marshal_VOID__UINT_UINT, + G_TYPE_NONE, 2, + G_TYPE_UINT, G_TYPE_UINT); + + dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (mclass), + nm_modem_get_serial_dbus_info ()); +} + diff --git a/src/nm-device-modem.h b/src/nm-device-modem.h new file mode 100644 index 0000000000..40e89d4b7c --- /dev/null +++ b/src/nm-device-modem.h @@ -0,0 +1,54 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager -- Network link manager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2010 Red Hat, Inc. + */ + +#ifndef NM_DEVICE_MODEM_H +#define NM_DEVICE_MODEM_H + +#include +#include + +#include "nm-device.h" +#include "nm-modem.h" + +#define NM_TYPE_DEVICE_MODEM (nm_device_modem_get_type ()) +#define NM_DEVICE_MODEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_MODEM, NMDeviceModem)) +#define NM_DEVICE_MODEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_MODEM, NMDeviceModemClass)) +#define NM_IS_DEVICE_MODEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_MODEM)) +#define NM_IS_DEVICE_MODEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_DEVICE_MODEM)) +#define NM_DEVICE_MODEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_MODEM, NMDeviceModemClass)) + +#define NM_DEVICE_MODEM_MODEM "modem" + +typedef struct { + NMDevice parent; +} NMDeviceModem; + +typedef struct { + NMDeviceClass parent; + + void (*ppp_stats) (NMDeviceModem *self, guint32 in_bytes, guint32 out_bytes); +} NMDeviceModemClass; + +GType nm_device_modem_get_type (void); + +/* Private for subclases */ +NMModem *nm_device_modem_get_modem (NMDeviceModem *self); + +#endif /* NM_DEVICE_MODEM_H */ diff --git a/src/nm-device-olpc-mesh.c b/src/nm-device-olpc-mesh.c index b326dfe80a..ec9f5394e8 100644 --- a/src/nm-device-olpc-mesh.c +++ b/src/nm-device-olpc-mesh.c @@ -15,11 +15,11 @@ * 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. + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * (C) Copyright 2005 - 2008 Red Hat, Inc. + * (C) Copyright 2005 - 2010 Red Hat, Inc. * (C) Copyright 2008 Collabora Ltd. * (C) Copyright 2009 One Laptop per Child */ @@ -42,15 +42,19 @@ #include "nm-device-interface.h" #include "nm-device-private.h" #include "nm-utils.h" +#include "nm-logging.h" #include "NetworkManagerUtils.h" -#include "NetworkManagerPolicy.h" #include "nm-activation-request.h" #include "nm-properties-changed-signal.h" #include "nm-setting-connection.h" #include "nm-setting-olpc-mesh.h" -#include "NetworkManagerSystem.h" +#include "nm-system.h" #include "nm-manager.h" +/* This is a bug; but we can't really change API now... */ +#include "NetworkManagerVPN.h" + + #include "nm-device-olpc-mesh-glue.h" static void nm_device_olpc_mesh_set_ssid (NMDeviceOlpcMesh *self, const GByteArray * ssid); @@ -65,7 +69,6 @@ enum { PROP_HW_ADDRESS, PROP_COMPANION, PROP_ACTIVE_CHANNEL, - PROP_IFINDEX, LAST_PROP }; @@ -94,7 +97,6 @@ struct _NMDeviceOlpcMeshPrivate gboolean dispose_has_run; struct ether_addr hw_addr; - guint32 ifindex; GByteArray * ssid; @@ -106,7 +108,7 @@ struct _NMDeviceOlpcMeshPrivate NMDevice * companion; gboolean stage1_waiting; - guint device_added_cb; + guint device_added_id; }; static GQuark @@ -154,7 +156,7 @@ real_get_generic_capabilities (NMDevice *dev) fd = socket (PF_INET, SOCK_DGRAM, 0); if (fd < 0) { - nm_warning ("couldn't open control socket."); + nm_log_warn (LOGD_OLPC_MESH, "couldn't open control socket."); goto out; } @@ -165,13 +167,14 @@ real_get_generic_capabilities (NMDevice *dev) wrq.u.data.length = sizeof (struct iw_range); if (ioctl (fd, SIOCGIWRANGE, &wrq) < 0) { - nm_warning ("couldn't get driver range information."); + nm_log_warn (LOGD_OLPC_MESH, "couldn't get driver range information."); goto out; } if ((wrq.u.data.length < 300) || (range.we_version_compiled < 16)) { - nm_warning ("%s: driver's Wireless Extensions version (%d) is too old.", - iface, range.we_version_compiled); + nm_log_warn (LOGD_OLPC_MESH, + "(%s): driver's Wireless Extensions version (%d) is too old.", + iface, range.we_version_compiled); goto out; } else { caps |= NM_DEVICE_CAP_NM_SUPPORTED; @@ -257,6 +260,10 @@ constructor (GType type, self = NM_DEVICE_OLPC_MESH (object); priv = NM_DEVICE_OLPC_MESH_GET_PRIVATE (self); + nm_log_dbg (LOGD_HW | LOGD_OLPC_MESH, "(%s): kernel ifindex %d", + nm_device_get_iface (NM_DEVICE (self)), + nm_device_get_ifindex (NM_DEVICE (self))); + iface = nm_device_get_iface (NM_DEVICE (self)); fd = socket (PF_INET, SOCK_DGRAM, 0); if (fd < 0) @@ -342,9 +349,7 @@ device_cleanup (NMDeviceOlpcMesh *self) static void real_take_down (NMDevice *dev) { - NMDeviceOlpcMesh *self = NM_DEVICE_OLPC_MESH (dev); - - device_cleanup (self); + device_cleanup (NM_DEVICE_OLPC_MESH (dev)); } static gboolean @@ -403,7 +408,7 @@ create_socket_with_request (NMDevice *self, struct iwreq *req) sk = socket (AF_INET, SOCK_DGRAM, 0); if (!sk) { - nm_error ("Couldn't create socket: %d.", errno); + nm_log_err (LOGD_OLPC_MESH, "Couldn't create socket: %d.", errno); return -1; } @@ -429,8 +434,8 @@ nm_device_olpc_mesh_get_channel (NMDeviceOlpcMesh *self) return 0; if ((ioctl (sk, SIOCGIWFREQ, &req)) != 0) { - nm_warning ("%s: failed to get channel (errno: %d))", - nm_device_get_iface (NM_DEVICE (self)), errno); + nm_log_warn (LOGD_OLPC_MESH, "(%s): failed to get channel (errno: %d)", + nm_device_get_iface (NM_DEVICE (self)), errno); goto out; } @@ -468,10 +473,10 @@ nm_device_olpc_mesh_set_channel (NMDeviceOlpcMesh *self, guint32 channel) req.u.freq.m = channel; } - if (ioctl (sk, SIOCSIWFREQ, &req) != 0) - nm_warning ("%s: failed to set to channel %d (errno: %d))", - nm_device_get_iface (NM_DEVICE (self)), channel, errno); - else + if (ioctl (sk, SIOCSIWFREQ, &req) != 0) { + nm_log_warn (LOGD_OLPC_MESH, "(%s): failed to set to channel %d (errno: %d)", + nm_device_get_iface (NM_DEVICE (self)), channel, errno); + } else g_object_notify (G_OBJECT (self), NM_DEVICE_OLPC_MESH_ACTIVE_CHANNEL); close (sk); @@ -491,7 +496,7 @@ nm_device_olpc_mesh_set_ssid (NMDeviceOlpcMesh *self, const GByteArray * ssid) sk = socket (AF_INET, SOCK_DGRAM, 0); if (!sk) { - nm_error ("Couldn't create socket: %d.", errno); + nm_log_err (LOGD_OLPC_MESH, "Couldn't create socket: %d.", errno); return; } @@ -523,24 +528,16 @@ nm_device_olpc_mesh_set_ssid (NMDeviceOlpcMesh *self, const GByteArray * ssid) if (ioctl (sk, SIOCSIWESSID, &wrq) < 0) { if (errno != ENODEV) { - nm_warning ("error setting SSID to '%s' for device %s: %s", + nm_log_err (LOGD_OLPC_MESH, "(%s): error setting SSID to '%s': %s", + iface, ssid ? nm_utils_escape_ssid (ssid->data, ssid->len) : "(null)", - iface, strerror (errno)); + strerror (errno)); } } close (sk); } - -guint32 -nm_device_olpc_mesh_get_ifindex (NMDeviceOlpcMesh *self) -{ - g_return_val_if_fail (self != NULL, FALSE); - - return NM_DEVICE_OLPC_MESH_GET_PRIVATE (self)->ifindex; -} - /****************************************************************************/ static void @@ -553,7 +550,7 @@ real_update_hw_address (NMDevice *dev) fd = socket (PF_INET, SOCK_DGRAM, 0); if (fd < 0) { - g_warning ("could not open control socket."); + nm_log_warn (LOGD_OLPC_MESH, "could not open control socket."); return; } @@ -561,8 +558,8 @@ real_update_hw_address (NMDevice *dev) strncpy (req.ifr_name, nm_device_get_iface (dev), IFNAMSIZ); ret = ioctl (fd, SIOCGIFHWADDR, &req); if (ret) { - nm_warning ("%s: (%s) error getting hardware address: %d", - __func__, nm_device_get_iface (dev), errno); + nm_log_warn (LOGD_OLPC_MESH, "(%s): error getting hardware address: %d", + nm_device_get_iface (dev), errno); goto out; } @@ -584,16 +581,20 @@ real_act_stage1_prepare (NMDevice *dev, NMDeviceStateReason *reason) /* disconnect companion device, if it is connected */ if (nm_device_get_act_request (NM_DEVICE (priv->companion))) { - nm_warning ("disconnecting companion device"); + nm_log_info (LOGD_OLPC_MESH, "(%s): disconnecting companion device %s", + nm_device_get_iface (dev), + nm_device_get_iface (priv->companion)); + /* FIXME: VPN stuff here is a bug; but we can't really change API now... */ nm_device_state_changed (NM_DEVICE (priv->companion), NM_DEVICE_STATE_DISCONNECTED, NM_VPN_CONNECTION_STATE_REASON_USER_DISCONNECTED); - nm_warning ("companion disconnected"); + nm_log_info (LOGD_OLPC_MESH, "(%s): companion %s disconnected", + nm_device_get_iface (dev), + nm_device_get_iface (priv->companion)); } - /* wait with continuing configuration untill the companion device is done - * scanning */ + /* wait with continuing configuration untill the companion device is done scanning */ g_object_get (priv->companion, "scanning", &scanning, NULL); if (scanning) { priv->stage1_waiting = TRUE; @@ -636,34 +637,25 @@ real_act_stage2_config (NMDevice *dev, NMDeviceStateReason *reason) return NM_ACT_STAGE_RETURN_SUCCESS; } -static NMActStageReturn -real_act_stage4_ip4_config_timeout (NMDevice *dev, - NMIP4Config **config, - NMDeviceStateReason *reason) -{ - return NM_ACT_STAGE_RETURN_FAILURE; -} - - static void -nm_device_olpc_mesh_dispose (GObject *object) +dispose (GObject *object) { NMDeviceOlpcMesh *self = NM_DEVICE_OLPC_MESH (object); NMDeviceOlpcMeshPrivate *priv = NM_DEVICE_OLPC_MESH_GET_PRIVATE (self); + NMManager *manager; if (priv->dispose_has_run) { G_OBJECT_CLASS (nm_device_olpc_mesh_parent_class)->dispose (object); return; } - priv->dispose_has_run = TRUE; device_cleanup (self); - if (priv->device_added_cb != 0) - g_source_remove (priv->device_added_cb); - - priv->device_added_cb = 0; + manager = nm_manager_get (NULL, NULL, NULL, FALSE, FALSE, FALSE, NULL); + if (priv->device_added_id) + g_signal_handler_disconnect (manager, priv->device_added_id); + g_object_unref (manager); G_OBJECT_CLASS (nm_device_olpc_mesh_parent_class)->dispose (object); } @@ -682,14 +674,14 @@ get_property (GObject *object, guint prop_id, g_value_take_string (value, nm_ether_ntop (&hw_addr)); break; case PROP_COMPANION: - g_value_set_string (value, nm_device_get_path (priv->companion)); + if (priv->companion) + g_value_set_boxed (value, nm_device_get_path (priv->companion)); + else + g_value_set_boxed (value, "/"); break; case PROP_ACTIVE_CHANNEL: g_value_set_uint (value, nm_device_olpc_mesh_get_channel (device)); break; - case PROP_IFINDEX: - g_value_set_uint (value, nm_device_olpc_mesh_get_ifindex (device)); - break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -700,13 +692,7 @@ static void set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - NMDeviceOlpcMeshPrivate *priv = NM_DEVICE_OLPC_MESH_GET_PRIVATE (object); - switch (prop_id) { - case PROP_IFINDEX: - /* construct-only */ - priv->ifindex = g_value_get_uint (value); - break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -724,7 +710,7 @@ nm_device_olpc_mesh_class_init (NMDeviceOlpcMeshClass *klass) object_class->constructor = constructor; object_class->get_property = get_property; object_class->set_property = set_property; - object_class->dispose = nm_device_olpc_mesh_dispose; + object_class->dispose = dispose; parent_class->get_type_capabilities = NULL; parent_class->get_generic_capabilities = real_get_generic_capabilities; @@ -739,7 +725,6 @@ nm_device_olpc_mesh_class_init (NMDeviceOlpcMeshClass *klass) parent_class->act_stage1_prepare = real_act_stage1_prepare; parent_class->act_stage2_config = real_act_stage2_config; - parent_class->act_stage4_ip4_config_timeout = real_act_stage4_ip4_config_timeout; /* Properties */ g_object_class_install_property @@ -749,13 +734,15 @@ nm_device_olpc_mesh_class_init (NMDeviceOlpcMeshClass *klass) "Hardware MAC address", NULL, G_PARAM_READABLE)); + g_object_class_install_property (object_class, PROP_COMPANION, - g_param_spec_string (NM_DEVICE_OLPC_MESH_COMPANION, - "Companion device", - "Companion device object path", - NULL, - G_PARAM_READABLE)); + g_param_spec_boxed (NM_DEVICE_OLPC_MESH_COMPANION, + "Companion device", + "Companion device object path", + DBUS_TYPE_G_OBJECT_PATH, + G_PARAM_READABLE)); + g_object_class_install_property (object_class, PROP_ACTIVE_CHANNEL, g_param_spec_uint (NM_DEVICE_OLPC_MESH_ACTIVE_CHANNEL, @@ -764,13 +751,6 @@ nm_device_olpc_mesh_class_init (NMDeviceOlpcMeshClass *klass) 0, G_MAXUINT32, 0, G_PARAM_READABLE)); - g_object_class_install_property (object_class, PROP_IFINDEX, - g_param_spec_uint (NM_DEVICE_OLPC_MESH_IFINDEX, - "Ifindex", - "Interface index", - 0, G_MAXUINT32, 0, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); - signals[PROPERTIES_CHANGED] = nm_properties_changed_signal_new (object_class, G_STRUCT_OFFSET (NMDeviceOlpcMeshClass, properties_changed)); @@ -801,7 +781,11 @@ companion_notify_cb (NMDeviceWifi *companion, GParamSpec *pspec, gpointer user_d /* disconnect from mesh if someone starts using the companion */ static void -companion_state_changed_cb (NMDeviceWifi *companion, NMDeviceState state, NMDeviceState old_state, NMDeviceStateReason reason, gpointer user_data) +companion_state_changed_cb (NMDeviceWifi *companion, + NMDeviceState state, + NMDeviceState old_state, + NMDeviceStateReason reason, + gpointer user_data) { NMDeviceOlpcMesh *self = NM_DEVICE_OLPC_MESH (user_data); NMDeviceState self_state = nm_device_get_state (NM_DEVICE (self)); @@ -812,7 +796,9 @@ companion_state_changed_cb (NMDeviceWifi *companion, NMDeviceState state, NMDevi || state > NM_DEVICE_STATE_ACTIVATED) return; - nm_debug ("disconnecting mesh due to companion connectivity"); + nm_log_dbg (LOGD_OLPC_MESH, "(%s): disconnecting mesh due to companion connectivity", + nm_device_get_iface (NM_DEVICE (self))); + /* FIXME: VPN stuff here is a bug; but we can't really change API now... */ nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_DISCONNECTED, NM_VPN_CONNECTION_STATE_REASON_USER_DISCONNECTED); @@ -848,6 +834,7 @@ is_companion (NMDeviceOlpcMesh *self, NMDevice *other) { NMDeviceOlpcMeshPrivate *priv = NM_DEVICE_OLPC_MESH_GET_PRIVATE (self); struct ether_addr their_addr; + NMManager *manager; if (!NM_IS_DEVICE_WIFI (other)) return FALSE; @@ -862,14 +849,21 @@ is_companion (NMDeviceOlpcMesh *self, NMDevice *other) /* FIXME detect when our companion leaves */ priv->companion = other; - g_source_remove (priv->device_added_cb); - priv->device_added_cb = 0; + /* When we've found the companion, stop listening for other devices */ + manager = nm_manager_get (NULL, NULL, NULL, FALSE, FALSE, FALSE, NULL); + if (priv->device_added_id) { + g_signal_handler_disconnect (manager, priv->device_added_id); + priv->device_added_id = 0; + } + g_object_unref (manager); nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_REASON_NONE); - nm_debug ("Found companion device: %s", nm_device_get_iface (other)); + nm_log_info (LOGD_OLPC_MESH, "(%s): found companion WiFi device %s", + nm_device_get_iface (NM_DEVICE (self)), + nm_device_get_iface (other)); g_signal_connect (G_OBJECT (other), "state-changed", G_CALLBACK (companion_state_changed_cb), self); @@ -880,6 +874,8 @@ is_companion (NMDeviceOlpcMesh *self, NMDevice *other) g_signal_connect (G_OBJECT (other), "autoconnect-allowed", G_CALLBACK (companion_autoconnect_allowed_cb), self); + g_object_notify (G_OBJECT (self), NM_DEVICE_OLPC_MESH_COMPANION); + return TRUE; } @@ -906,18 +902,19 @@ check_companion_cb (gpointer user_data) return FALSE; } - if (priv->device_added_cb != 0) + if (priv->device_added_id != 0) return FALSE; manager = nm_manager_get (NULL, NULL, NULL, FALSE, FALSE, FALSE, FALSE, NULL); - priv->device_added_cb = g_signal_connect (manager, "device-added", + priv->device_added_id = g_signal_connect (manager, "device-added", G_CALLBACK (device_added_cb), self); - list = nm_manager_get_devices (manager); - for (; list != NULL ; list = list->next) + /* Try to find the companion if it's already known to the NMManager */ + for (list = nm_manager_get_devices (manager); list ; list = g_slist_next (list)) { if (is_companion (self, NM_DEVICE (list->data))) break; + } g_object_unref (manager); @@ -953,8 +950,7 @@ state_changed_cb (NMDevice *device, NMDeviceState state, gpointer user_data) NMDevice * nm_device_olpc_mesh_new (const char *udi, const char *iface, - const char *driver, - guint32 ifindex) + const char *driver) { GObject *obj; @@ -966,7 +962,6 @@ nm_device_olpc_mesh_new (const char *udi, NM_DEVICE_INTERFACE_UDI, udi, NM_DEVICE_INTERFACE_IFACE, iface, NM_DEVICE_INTERFACE_DRIVER, driver, - NM_DEVICE_OLPC_MESH_IFINDEX, ifindex, NM_DEVICE_INTERFACE_TYPE_DESC, "802.11 OLPC Mesh", NM_DEVICE_INTERFACE_DEVICE_TYPE, NM_DEVICE_TYPE_OLPC_MESH, NULL); diff --git a/src/nm-device-olpc-mesh.h b/src/nm-device-olpc-mesh.h index 9ec051f468..bcc03e57ab 100644 --- a/src/nm-device-olpc-mesh.h +++ b/src/nm-device-olpc-mesh.h @@ -16,9 +16,9 @@ * 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. + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * (C) Copyright 2005 Red Hat, Inc. * (C) Copyright 2008 Collabora Ltd. @@ -46,7 +46,6 @@ G_BEGIN_DECLS #define NM_DEVICE_OLPC_MESH_COMPANION "companion" #define NM_DEVICE_OLPC_MESH_BITRATE "bitrate" #define NM_DEVICE_OLPC_MESH_ACTIVE_CHANNEL "active-channel" -#define NM_DEVICE_OLPC_MESH_IFINDEX "ifindex" #ifndef NM_DEVICE_OLPC_MESH_DEFINED #define NM_DEVICE_OLPC_MESH_DEFINED @@ -75,10 +74,7 @@ GType nm_device_olpc_mesh_get_type (void); NMDevice *nm_device_olpc_mesh_new (const char *udi, const char *iface, - const char *driver, - guint32 ifindex); - -guint32 nm_device_olpc_mesh_get_ifindex (NMDeviceOlpcMesh *self); + const char *driver); G_END_DECLS diff --git a/src/nm-device-private.h b/src/nm-device-private.h index 5c71aa1a78..371f17f10d 100644 --- a/src/nm-device-private.h +++ b/src/nm-device-private.h @@ -40,4 +40,6 @@ void nm_device_handle_autoip4_event (NMDevice *self, const char *event, const char *address); +gboolean nm_device_ip_config_should_fail (NMDevice *self, gboolean ip6); + #endif /* NM_DEVICE_PRIVATE_H */ diff --git a/src/nm-device-wifi.c b/src/nm-device-wifi.c index e44ac96cd6..1fa2937253 100644 --- a/src/nm-device-wifi.c +++ b/src/nm-device-wifi.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2005 - 2009 Red Hat, Inc. + * Copyright (C) 2005 - 2010 Red Hat, Inc. * Copyright (C) 2006 - 2008 Novell, Inc. */ @@ -37,9 +37,9 @@ #include "nm-device-interface.h" #include "nm-device-private.h" #include "nm-utils.h" +#include "nm-logging.h" #include "nm-marshal.h" #include "NetworkManagerUtils.h" -#include "NetworkManagerPolicy.h" #include "nm-activation-request.h" #include "nm-supplicant-manager.h" #include "nm-supplicant-interface.h" @@ -51,7 +51,7 @@ #include "nm-setting-8021x.h" #include "nm-setting-ip4-config.h" #include "nm-setting-ip6-config.h" -#include "NetworkManagerSystem.h" +#include "nm-system.h" static gboolean impl_device_get_access_points (NMDeviceWifi *device, GPtrArray **aps, @@ -60,8 +60,6 @@ static gboolean impl_device_get_access_points (NMDeviceWifi *device, #include "nm-device-wifi-glue.h" -/* #define IW_QUAL_DEBUG */ - /* All of these are in seconds */ #define SCAN_INTERVAL_MIN 0 #define SCAN_INTERVAL_STEP 20 @@ -84,7 +82,6 @@ enum { PROP_BITRATE, PROP_ACTIVE_ACCESS_POINT, PROP_CAPABILITIES, - PROP_IFINDEX, PROP_SCANNING, PROP_IPW_RFKILL_STATE, @@ -146,7 +143,6 @@ struct _NMDeviceWifiPrivate { gboolean disposed; struct ether_addr hw_addr; - guint32 ifindex; /* Legacy rfkill for ipw2x00; will be fixed with 2.6.33 kernel */ char * ipw_rfkill_path; @@ -183,10 +179,6 @@ struct _NMDeviceWifiPrivate { static guint32 nm_device_wifi_get_frequency (NMDeviceWifi *self); -#if DEBUG -static void nm_device_wifi_ap_list_print (NMDeviceWifi *self); -#endif - static gboolean request_wireless_scan (gpointer user_data); static void schedule_scan (NMDeviceWifi *self, gboolean backoff); @@ -275,6 +267,7 @@ nm_device_wifi_get_ipw_rfkill_state (NMDeviceWifi *self) NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self); char *contents = NULL; RfKillState state = RFKILL_UNBLOCKED; + const char *str_state = NULL; if ( priv->ipw_rfkill_path && g_file_get_contents (priv->ipw_rfkill_path, &contents, NULL, NULL)) { @@ -288,16 +281,23 @@ nm_device_wifi_get_ipw_rfkill_state (NMDeviceWifi *self) switch (contents[0]) { case '1': state = RFKILL_SOFT_BLOCKED; + str_state = "soft-blocked"; break; case '2': case '3': state = RFKILL_HARD_BLOCKED; + str_state = "hard-blocked"; break; case '0': + str_state = "unblocked"; default: break; } g_free (contents); + + nm_log_dbg (LOGD_RFKILL, "(%s): ipw rfkill state '%s'", + nm_device_get_iface (NM_DEVICE (self)), + str_state ? str_state : "(unknown)"); } return state; @@ -377,7 +377,7 @@ wireless_get_range (NMDeviceWifi *self, fd = socket (PF_INET, SOCK_DGRAM, 0); if (fd < 0) { - nm_warning ("(%s): couldn't open control socket.", iface); + nm_log_err (LOGD_HW, "(%s): couldn't open control socket.", iface); return FALSE; } @@ -397,15 +397,20 @@ wireless_get_range (NMDeviceWifi *self, success = TRUE; break; } else if (errno != EAGAIN) { - nm_warning ("(%s): couldn't get driver range information (%d).", iface, errno); + nm_log_err (LOGD_HW | LOGD_WIFI, + "(%s): couldn't get driver range information (%d).", + iface, errno); break; } g_usleep (G_USEC_PER_SEC / 4); } - if (i <= 0) - nm_warning ("(%s): driver took too long to respond to IWRANGE query.", iface); + if (i <= 0) { + nm_log_warn (LOGD_HW | LOGD_WIFI, + "(%s): driver took too long to respond to IWRANGE query.", + iface); + } close (fd); return success; @@ -428,14 +433,15 @@ real_get_generic_capabilities (NMDevice *dev) /* Check for Wireless Extensions support >= 16 for wireless devices */ if ((response_len < 300) || (range.we_version_compiled < 16)) { - nm_warning ("(%s): driver's Wireless Extensions version (%d) is too old.", + nm_log_err (LOGD_HW | LOGD_WIFI, + "(%s): driver's Wireless Extensions version (%d) is too old.", iface, range.we_version_compiled); return NM_DEVICE_CAP_NONE; } fd = socket (PF_INET, SOCK_DGRAM, 0); if (fd < 0) { - nm_warning ("(%s): couldn't open control socket.", iface); + nm_log_err (LOGD_HW, "(%s): couldn't open control socket.", iface); goto out; } @@ -493,16 +499,16 @@ get_wireless_capabilities (NMDeviceWifi *self, /* Check for cipher support but not WPA support */ if ( (caps & (NM_WIFI_DEVICE_CAP_CIPHER_TKIP | NM_WIFI_DEVICE_CAP_CIPHER_CCMP)) && !(caps & (NM_WIFI_DEVICE_CAP_WPA | NM_WIFI_DEVICE_CAP_RSN))) { - nm_warning ("%s: device supports WPA ciphers but not WPA protocol; " - "WPA unavailable.", iface); + nm_log_warn (LOGD_WIFI, "%s: device supports WPA ciphers but not WPA protocol; " + "WPA unavailable.", iface); caps &= ~WPA_CAPS; } /* Check for WPA support but not cipher support */ if ( (caps & (NM_WIFI_DEVICE_CAP_WPA | NM_WIFI_DEVICE_CAP_RSN)) && !(caps & (NM_WIFI_DEVICE_CAP_CIPHER_TKIP | NM_WIFI_DEVICE_CAP_CIPHER_CCMP))) { - nm_warning ("%s: device supports WPA protocol but not WPA ciphers; " - "WPA unavailable.", iface); + nm_log_warn (LOGD_WIFI, "%s: device supports WPA protocol but not WPA ciphers; " + "WPA unavailable.", iface); caps &= ~WPA_CAPS; } } @@ -570,6 +576,10 @@ constructor (GType type, self = NM_DEVICE_WIFI (object); priv = NM_DEVICE_WIFI_GET_PRIVATE (self); + nm_log_dbg (LOGD_HW | LOGD_WIFI, "(%s): kernel ifindex %d", + nm_device_get_iface (NM_DEVICE (self)), + nm_device_get_ifindex (NM_DEVICE (self))); + memset (&range, 0, sizeof (struct iw_range)); success = wireless_get_range (NM_DEVICE_WIFI (object), &range, &response_len); if (!success) @@ -593,13 +603,15 @@ constructor (GType type, scan_capa_range = (struct iw_range_with_scan_capa *) ⦥ if (scan_capa_range->scan_capa & NM_IW_SCAN_CAPA_ESSID) { priv->has_scan_capa_ssid = TRUE; - nm_info ("(%s): driver supports SSID scans (scan_capa 0x%02X).", - nm_device_get_iface (NM_DEVICE (self)), - scan_capa_range->scan_capa); + nm_log_info (LOGD_HW | LOGD_WIFI, + "(%s): driver supports SSID scans (scan_capa 0x%02X).", + nm_device_get_iface (NM_DEVICE (self)), + scan_capa_range->scan_capa); } else { - nm_info ("(%s): driver does not support SSID scans (scan_capa 0x%02X).", - nm_device_get_iface (NM_DEVICE (self)), - scan_capa_range->scan_capa); + nm_log_info (LOGD_HW | LOGD_WIFI, + "(%s): driver does not support SSID scans (scan_capa 0x%02X).", + nm_device_get_iface (NM_DEVICE (self)), + scan_capa_range->scan_capa); } /* 802.11 wireless-specific capabilities */ @@ -653,7 +665,7 @@ supplicant_interface_acquire (NMDeviceWifi *self) nm_device_get_iface (NM_DEVICE (self)), TRUE); if (priv->supplicant.iface == NULL) { - nm_warning ("Couldn't initialize supplicant interface for %s.", + nm_log_err (LOGD_WIFI, "Couldn't initialize supplicant interface for %s.", nm_device_get_iface (NM_DEVICE (self))); return FALSE; } @@ -753,6 +765,8 @@ supplicant_interface_release (NMDeviceWifi *self) /* Reset the scan interval to be pretty frequent when disconnected */ priv->scan_interval = SCAN_INTERVAL_MIN + SCAN_INTERVAL_STEP; + nm_log_dbg (LOGD_WIFI_SCAN, "(%s): reset scanning interval to %d seconds", + nm_device_get_iface (NM_DEVICE (self))); remove_supplicant_interface_error_handler (self); @@ -810,35 +824,30 @@ get_active_ap (NMDeviceWifi *self, const GByteArray *ssid; GSList *iter; int i = 0; - gboolean ap_debug = getenv ("NM_ACTIVE_AP_DEBUG") ? TRUE : FALSE; nm_device_wifi_get_bssid (self, &bssid); - if (G_UNLIKELY (ap_debug)) { - nm_debug ("(%s) BSSID: %02x:%02x:%02x:%02x:%02x:%02x", - iface, - bssid.ether_addr_octet[0], bssid.ether_addr_octet[1], - bssid.ether_addr_octet[2], bssid.ether_addr_octet[3], - bssid.ether_addr_octet[4], bssid.ether_addr_octet[5]); - } + nm_log_dbg (LOGD_WIFI, "(%s): active BSSID: %02x:%02x:%02x:%02x:%02x:%02x", + iface, + bssid.ether_addr_octet[0], bssid.ether_addr_octet[1], + bssid.ether_addr_octet[2], bssid.ether_addr_octet[3], + bssid.ether_addr_octet[4], bssid.ether_addr_octet[5]); + if (!nm_ethernet_address_is_valid (&bssid)) return NULL; ssid = nm_device_wifi_get_ssid (self); - if G_UNLIKELY (ap_debug) { - nm_debug ("(%s) SSID: %s%s%s", - iface, - ssid ? "'" : "", - ssid ? nm_utils_escape_ssid (ssid->data, ssid->len) : "(none)", - ssid ? "'" : ""); - } + nm_log_dbg (LOGD_WIFI, "(%s): active SSID: %s%s%s", + iface, + ssid ? "'" : "", + ssid ? nm_utils_escape_ssid (ssid->data, ssid->len) : "(none)", + ssid ? "'" : ""); /* When matching hidden APs, do a second pass that ignores the SSID check, * because NM might not yet know the SSID of the hidden AP in the scan list * and therefore it won't get matched the first time around. */ while (i++ < (match_hidden ? 2 : 1)) { - if G_UNLIKELY (ap_debug) - nm_debug (" Pass #%d %s", i, i > 1 ? "(ignoring SSID)" : ""); + nm_log_dbg (LOGD_WIFI, " Pass #%d %s", i, i > 1 ? "(ignoring SSID)" : ""); /* Find this SSID + BSSID in the device's AP list */ for (iter = priv->ap_list; iter; iter = g_slist_next (iter)) { @@ -848,63 +857,52 @@ get_active_ap (NMDeviceWifi *self, NM80211Mode devmode, apmode; guint32 devfreq, apfreq; - if G_UNLIKELY (ap_debug) { - nm_debug (" AP: %s%s%s %02x:%02x:%02x:%02x:%02x:%02x", - ap_ssid ? "'" : "", - ap_ssid ? nm_utils_escape_ssid (ap_ssid->data, ap_ssid->len) : "(none)", - ap_ssid ? "'" : "", - ap_bssid->ether_addr_octet[0], ap_bssid->ether_addr_octet[1], - ap_bssid->ether_addr_octet[2], ap_bssid->ether_addr_octet[3], - ap_bssid->ether_addr_octet[4], ap_bssid->ether_addr_octet[5]); - } + nm_log_dbg (LOGD_WIFI, " AP: %s%s%s %02x:%02x:%02x:%02x:%02x:%02x", + ap_ssid ? "'" : "", + ap_ssid ? nm_utils_escape_ssid (ap_ssid->data, ap_ssid->len) : "(none)", + ap_ssid ? "'" : "", + ap_bssid->ether_addr_octet[0], ap_bssid->ether_addr_octet[1], + ap_bssid->ether_addr_octet[2], ap_bssid->ether_addr_octet[3], + ap_bssid->ether_addr_octet[4], ap_bssid->ether_addr_octet[5]); if (ignore_ap && (ap == ignore_ap)) { - if G_UNLIKELY (ap_debug) - nm_debug (" ignored"); + nm_log_dbg (LOGD_WIFI, " ignored"); continue; } if (memcmp (bssid.ether_addr_octet, ap_bssid->ether_addr_octet, ETH_ALEN)) { - if G_UNLIKELY (ap_debug) - nm_debug (" BSSID mismatch"); + nm_log_dbg (LOGD_WIFI, " BSSID mismatch"); continue; } if ((i == 0) && !nm_utils_same_ssid (ssid, ap_ssid, TRUE)) { - if G_UNLIKELY (ap_debug) - nm_debug (" SSID mismatch"); + nm_log_dbg (LOGD_WIFI, " SSID mismatch"); continue; } devmode = nm_device_wifi_get_mode (self); apmode = nm_ap_get_mode (ap); if (devmode != apmode) { - if G_UNLIKELY (ap_debug) { - nm_debug (" mode mismatch (device %d, ap %d)", - devmode, apmode); - } + nm_log_dbg (LOGD_WIFI, " mode mismatch (device %d, ap %d)", + devmode, apmode); continue; } devfreq = nm_device_wifi_get_frequency (self); apfreq = nm_ap_get_freq (ap); if (devfreq != apfreq) { - if G_UNLIKELY (ap_debug) { - nm_debug (" frequency mismatch (device %u, ap %u)", - devfreq, apfreq); - } + nm_log_dbg (LOGD_WIFI, " frequency mismatch (device %u, ap %u)", + devfreq, apfreq); continue; } // FIXME: handle security settings here too - if G_UNLIKELY (ap_debug) - nm_debug (" matched"); + nm_log_dbg (LOGD_WIFI, " matched"); return ap; } } - if G_UNLIKELY (ap_debug) - nm_debug (" No matching AP found."); + nm_log_dbg (LOGD_WIFI, " No matching AP found."); return NULL; } @@ -997,11 +995,12 @@ periodic_update (NMDeviceWifi *self) old_ssid = nm_ap_get_ssid (priv->current_ap); } - nm_debug ("Roamed from BSSID %s (%s) to %s (%s)", - old_addr ? old_addr : "(none)", - old_ssid ? nm_utils_escape_ssid (old_ssid->data, old_ssid->len) : "(none)", - new_addr ? new_addr : "(none)", - new_ssid ? nm_utils_escape_ssid (new_ssid->data, new_ssid->len) : "(none)"); + nm_log_info (LOGD_WIFI, "(%s): roamed from BSSID %s (%s) to %s (%s)", + nm_device_get_iface (NM_DEVICE (self)), + old_addr ? old_addr : "(none)", + old_ssid ? nm_utils_escape_ssid (old_ssid->data, old_ssid->len) : "(none)", + new_addr ? new_addr : "(none)", + new_ssid ? nm_utils_escape_ssid (new_ssid->data, new_ssid->len) : "(none)"); g_free (old_addr); g_free (new_addr); @@ -1211,16 +1210,25 @@ real_is_available (NMDevice *dev) NMSupplicantInterface *sup_iface; guint32 state; - if (!priv->enabled) + if (!priv->enabled) { + nm_log_dbg (LOGD_WIFI, "(%s): not available because not enabled", + nm_device_get_iface (dev)); return FALSE; + } sup_iface = priv->supplicant.iface; - if (!sup_iface) + if (!sup_iface) { + nm_log_dbg (LOGD_WIFI, "(%s): not available because supplicant not running", + nm_device_get_iface (dev)); return FALSE; + } state = nm_supplicant_interface_get_state (sup_iface); - if (state != NM_SUPPLICANT_INTERFACE_STATE_READY) + if (state != NM_SUPPLICANT_INTERFACE_STATE_READY) { + nm_log_dbg (LOGD_WIFI, "(%s): not available because supplicant interface not ready", + nm_device_get_iface (dev)); return FALSE; + } return TRUE; } @@ -1298,7 +1306,6 @@ nm_device_wifi_get_address (NMDeviceWifi *self, memcpy (addr, &(priv->hw_addr), sizeof (struct ether_addr)); } -#if DEBUG static void nm_device_wifi_ap_list_print (NMDeviceWifi *self) { @@ -1308,14 +1315,13 @@ nm_device_wifi_ap_list_print (NMDeviceWifi *self) g_return_if_fail (NM_IS_DEVICE_WIFI (self)); - nm_info ("AP_LIST_PRINT:"); + nm_log_dbg (LOGD_WIFI_SCAN, "Current AP list:"); for (elt = priv->ap_list; elt; elt = g_slist_next (elt), i++) { NMAccessPoint * ap = NM_AP (elt->data); - nm_ap_print_self (ap, "::\t"); + nm_ap_print_self (ap, "AP: "); } - nm_info ("AP_LIST_PRINT: done"); + nm_log_dbg (LOGD_WIFI_SCAN, "Current AP list: done"); } -#endif static gboolean impl_device_get_access_points (NMDeviceWifi *self, @@ -1372,8 +1378,11 @@ nm_device_wifi_get_mode (NMDeviceWifi *self) break; } } else { - if (errno != ENODEV) - nm_warning ("error getting card mode on %s: %s", iface, strerror (errno)); + if (errno != ENODEV) { + nm_log_warn (LOGD_HW | LOGD_WIFI, + "(%s): error %d getting card mode", + iface, strerror (errno)); + } } close (fd); @@ -1423,7 +1432,8 @@ nm_device_wifi_set_mode (NMDeviceWifi *self, const NM80211Mode mode) if (ioctl (fd, SIOCSIWMODE, &wrq) < 0) { if (errno != ENODEV) { - nm_warning ("error setting card %s to mode %d: %s", + nm_log_err (LOGD_HW | LOGD_WIFI, + "(%s): error setting mode %d", iface, mode, strerror (errno)); } } else @@ -1459,9 +1469,11 @@ nm_device_wifi_get_frequency (NMDeviceWifi *self) iface = nm_device_get_iface (NM_DEVICE (self)); strncpy (wrq.ifr_name, iface, IFNAMSIZ); - if (ioctl (fd, SIOCGIWFREQ, &wrq) < 0) - nm_warning ("(%s): error getting frequency: %s", iface, strerror (errno)); - else + if (ioctl (fd, SIOCGIWFREQ, &wrq) < 0) { + nm_log_warn (LOGD_HW | LOGD_WIFI, + "(%s): error getting frequency: %s", + iface, strerror (errno)); + } else freq = iw_freq_to_uint32 (&wrq.u.freq); close (fd); @@ -1485,17 +1497,16 @@ wireless_qual_to_percent (const struct iw_quality *qual, g_return_val_if_fail (qual != NULL, -1); g_return_val_if_fail (max_qual != NULL, -1); -#ifdef IW_QUAL_DEBUG -nm_debug ("QL: qual %d/%u/0x%X, level %d/%u/0x%X, noise %d/%u/0x%X, updated: 0x%X ** MAX: qual %d/%u/0x%X, level %d/%u/0x%X, noise %d/%u/0x%X, updated: 0x%X", -(__s8)qual->qual, qual->qual, qual->qual, -(__s8)qual->level, qual->level, qual->level, -(__s8)qual->noise, qual->noise, qual->noise, -qual->updated, -(__s8)max_qual->qual, max_qual->qual, max_qual->qual, -(__s8)max_qual->level, max_qual->level, max_qual->level, -(__s8)max_qual->noise, max_qual->noise, max_qual->noise, -max_qual->updated); -#endif + nm_log_dbg (LOGD_WIFI, + "QL: qual %d/%u/0x%X, level %d/%u/0x%X, noise %d/%u/0x%X, updated: 0x%X ** MAX: qual %d/%u/0x%X, level %d/%u/0x%X, noise %d/%u/0x%X, updated: 0x%X", + (__s8) qual->qual, qual->qual, qual->qual, + (__s8) qual->level, qual->level, qual->level, + (__s8) qual->noise, qual->noise, qual->noise, + qual->updated, + (__s8) max_qual->qual, max_qual->qual, max_qual->qual, + (__s8) max_qual->level, max_qual->level, max_qual->level, + (__s8) max_qual->noise, max_qual->noise, max_qual->noise, + max_qual->updated); /* Try using the card's idea of the signal quality first as long as it tells us what the max quality is. * Drivers that fill in quality values MUST treat them as percentages, ie the "Link Quality" MUST be @@ -1520,8 +1531,7 @@ max_qual->updated); && !(qual->updated & IW_QUAL_LEVEL_INVALID) /* Must have valid qual->level */ && ( ((max_qual->noise > 0) && !(max_qual->updated & IW_QUAL_NOISE_INVALID)) /* Must have valid max_qual->noise */ || ((qual->noise > 0) && !(qual->updated & IW_QUAL_NOISE_INVALID))) /* OR valid qual->noise */ - ) - { + ) { /* Absolute power values (dBm) */ /* Reasonable fallbacks for dumb drivers that don't specify either level. */ @@ -1543,9 +1553,8 @@ max_qual->updated); level_percent = (int)(100 - 70 *( ((double)max_level - (double)level) / ((double)max_level - (double)noise))); -#ifdef IW_QUAL_DEBUG - nm_debug ("QL1: level_percent is %d. max_level %d, level %d, noise_floor %d.", level_percent, max_level, level, noise); -#endif + nm_log_dbg (LOGD_WIFI, "QL1: level_percent is %d. max_level %d, level %d, noise_floor %d.", + level_percent, max_level, level, noise); } else if ( (max_qual->level != 0) && !(max_qual->updated & IW_QUAL_LEVEL_INVALID) /* Valid max_qual->level as upper bound */ && !(qual->updated & IW_QUAL_LEVEL_INVALID)) { @@ -1556,24 +1565,18 @@ max_qual->updated); /* Signal level is relavtive (0 -> max_qual->level) */ level = CLAMP (level, 0, max_qual->level); level_percent = (int)(100 * ((double)level / (double)max_qual->level)); -#ifdef IW_QUAL_DEBUG - nm_debug ("QL2: level_percent is %d. max_level %d, level %d.", level_percent, max_qual->level, level); -#endif - } - else if (percent == -1) - { -#ifdef IW_QUAL_DEBUG - nm_debug ("QL: Could not get quality %% value from driver. Driver is probably buggy."); -#endif + nm_log_dbg (LOGD_WIFI, "QL2: level_percent is %d. max_level %d, level %d.", + level_percent, max_qual->level, level); + } else if (percent == -1) { + nm_log_dbg (LOGD_WIFI, "QL: Could not get quality %% value from driver. Driver is probably buggy."); } /* If the quality percent was 0 or doesn't exist, then try to use signal levels instead */ if ((percent < 1) && (level_percent >= 0)) percent = level_percent; -#ifdef IW_QUAL_DEBUG - nm_debug ("QL: Final quality percent is %d (%d).", percent, CLAMP (percent, 0, 100)); -#endif + nm_log_dbg (LOGD_WIFI, "QL: Final quality percent is %d (%d).", + percent, CLAMP (percent, 0, 100)); return (CLAMP (percent, 0, 100)); } @@ -1598,7 +1601,7 @@ nm_device_wifi_get_ssid (NMDeviceWifi *self) sk = socket (AF_INET, SOCK_DGRAM, 0); if (!sk) { - nm_error ("Couldn't create socket: %d.", errno); + nm_log_err (LOGD_HW, "couldn't create socket: %d.", errno); return NULL; } @@ -1609,7 +1612,8 @@ nm_device_wifi_get_ssid (NMDeviceWifi *self) strncpy (wrq.ifr_name, nm_device_get_iface (NM_DEVICE (self)), IFNAMSIZ); if (ioctl (sk, SIOCGIWESSID, &wrq) < 0) { - nm_warning ("Couldn't get SSID: %d", errno); + nm_log_err (LOGD_HW | LOGD_WIFI, "(%s): couldn't get SSID: %d", + nm_device_get_iface (NM_DEVICE (self)), errno); goto out; } @@ -1684,7 +1688,7 @@ nm_device_wifi_get_bssid (NMDeviceWifi *self, fd = socket (PF_INET, SOCK_DGRAM, 0); if (fd < 0) { - g_warning ("failed to open control socket."); + nm_log_err (LOGD_WIFI, "failed to open control socket."); return; } @@ -1791,10 +1795,16 @@ request_wireless_scan (gpointer user_data) gboolean backoff = FALSE; if (check_scanning_allowed (self)) { + nm_log_dbg (LOGD_WIFI_SCAN, "(%s): scanning requested", + nm_device_get_iface (NM_DEVICE (self))); + if (nm_supplicant_interface_request_scan (priv->supplicant.iface)) { /* success */ backoff = TRUE; } + } else { + nm_log_dbg (LOGD_WIFI_SCAN, "(%s): scan requested but not allowed at this time", + nm_device_get_iface (NM_DEVICE (self))); } priv->pending_scan_id = 0; @@ -1824,13 +1834,13 @@ schedule_scan (NMDeviceWifi *self, gboolean backoff) } if (!priv->pending_scan_id) { - guint factor = 2; + guint factor = 2, next_scan = priv->scan_interval; if ( nm_device_is_activating (NM_DEVICE (self)) || (nm_device_get_state (NM_DEVICE (self)) == NM_DEVICE_STATE_ACTIVATED)) factor = 1; - priv->pending_scan_id = g_timeout_add_seconds (priv->scan_interval, + priv->pending_scan_id = g_timeout_add_seconds (next_scan, request_wireless_scan, self); @@ -1847,6 +1857,12 @@ schedule_scan (NMDeviceWifi *self, gboolean backoff) */ priv->scan_interval = 5; } + + nm_log_dbg (LOGD_WIFI_SCAN, "(%s): scheduled scan in %d seconds (interval now %d seconds)", + nm_device_get_iface (NM_DEVICE (self)), + next_scan, + priv->scan_interval); + } } @@ -1868,6 +1884,10 @@ supplicant_iface_scan_request_result_cb (NMSupplicantInterface *iface, gboolean success, NMDeviceWifi *self) { + nm_log_dbg (LOGD_WIFI_SCAN, "(%s): scan request %s", + nm_device_get_iface (NM_DEVICE (self)), + success ? "successful" : "failed"); + if (check_scanning_allowed (self)) schedule_scan (self, TRUE); } @@ -1877,11 +1897,15 @@ supplicant_iface_scan_results_cb (NMSupplicantInterface *iface, guint32 num_results, NMDeviceWifi *self) { + nm_log_dbg (LOGD_WIFI_SCAN, "(%s): scan results available (%d APs found)", + nm_device_get_iface (NM_DEVICE (self)), + num_results); if (num_results == 0) { /* ensure that old APs get culled, which otherwise only * happens when there are actual scan results to process. */ cull_scan_list (self); + nm_device_wifi_ap_list_print (self); } } @@ -2035,11 +2059,12 @@ static void cull_scan_list (NMDeviceWifi *self) { NMDeviceWifiPrivate *priv; - GTimeVal cur_time; - GSList * outdated_list = NULL; - GSList * elt; - NMActRequest * req; - const char * cur_ap_path = NULL; + GTimeVal cur_time; + GSList *outdated_list = NULL; + GSList *elt; + NMActRequest *req; + const char *cur_ap_path = NULL; + guint32 removed = 0, total = 0; g_return_if_fail (self != NULL); priv = NM_DEVICE_WIFI_GET_PRIVATE (self); @@ -2050,10 +2075,13 @@ cull_scan_list (NMDeviceWifi *self) if (req) cur_ap_path = nm_act_request_get_specific_object (req); + nm_log_dbg (LOGD_WIFI_SCAN, "(%s): checking scan list for outdated APs", + nm_device_get_iface (NM_DEVICE (self))); + /* Walk the access point list and remove any access points older than * three times the inactive scan interval. */ - for (elt = priv->ap_list; elt; elt = g_slist_next (elt)) { + for (elt = priv->ap_list; elt; elt = g_slist_next (elt), total++) { NMAccessPoint * ap = NM_AP (elt->data); const glong ap_time = nm_ap_get_last_seen (ap); gboolean keep = FALSE; @@ -2071,13 +2099,31 @@ cull_scan_list (NMDeviceWifi *self) /* Remove outdated APs */ for (elt = outdated_list; elt; elt = g_slist_next (elt)) { - NMAccessPoint * outdated_ap = NM_AP (elt->data); + NMAccessPoint *outdated_ap = NM_AP (elt->data); + const struct ether_addr *bssid; + const GByteArray *ssid; + + bssid = nm_ap_get_address (outdated_ap); + ssid = nm_ap_get_ssid (outdated_ap); + nm_log_dbg (LOGD_WIFI_SCAN, + " removing %02x:%02x:%02x:%02x:%02x:%02x (%s%s%s)", + bssid->ether_addr_octet[0], bssid->ether_addr_octet[1], + bssid->ether_addr_octet[2], bssid->ether_addr_octet[3], + bssid->ether_addr_octet[4], bssid->ether_addr_octet[5], + ssid ? "'" : "", + ssid ? nm_utils_escape_ssid (ssid->data, ssid->len) : "(none)", + ssid ? "'" : ""); access_point_removed (self, outdated_ap); priv->ap_list = g_slist_remove (priv->ap_list, outdated_ap); g_object_unref (outdated_ap); + removed++; } g_slist_free (outdated_list); + + nm_log_dbg (LOGD_WIFI_SCAN, "(%s): removed %d APs (of %d)", + nm_device_get_iface (NM_DEVICE (self)), + removed, total); } #define SET_QUALITY_MEMBER(qual_item, lc_member, uc_member) \ @@ -2136,18 +2182,23 @@ supplicant_iface_scanned_ap_cb (NMSupplicantInterface *iface, return; ap = nm_ap_new_from_properties (properties); - if (!ap) - return; + if (ap) { + set_ap_strength_from_properties (self, ap, properties); - set_ap_strength_from_properties (self, ap, properties); + nm_ap_print_self (ap, "AP: "); - /* Add the AP to the device's AP list */ - merge_scanned_ap (self, ap); + /* Add the AP to the device's AP list */ + merge_scanned_ap (self, ap); + g_object_unref (ap); - /* Remove outdated access points */ - cull_scan_list (self); + /* Remove outdated access points */ + cull_scan_list (self); - g_object_unref (ap); + nm_device_wifi_ap_list_print (self); + } else { + nm_log_warn (LOGD_WIFI_SCAN, "(%s): invalid AP properties received", + nm_device_get_iface (NM_DEVICE (self))); + } } @@ -2204,7 +2255,7 @@ link_timeout_cb (gpointer user_data) ap = nm_device_wifi_get_activation_ap (self); if (req == NULL || ap == NULL) { /* shouldn't ever happen */ - nm_warning ("couldn't get activation request or activation AP."); + nm_log_err (LOGD_WIFI, "couldn't get activation request or activation AP."); if (nm_device_is_activating (dev)) { cleanup_association_attempt (self, TRUE); nm_device_state_changed (dev, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_NONE); @@ -2251,8 +2302,9 @@ link_timeout_cb (gpointer user_data) * bad encryption key and the authenticating entity (AP, RADIUS server, etc) * denied the association due to bad credentials. */ - nm_info ("Activation (%s/wireless): disconnected during association," - " asking for new key.", nm_device_get_iface (dev)); + nm_log_info (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s/wireless): disconnected during association," + " asking for new key.", nm_device_get_iface (dev)); cleanup_association_attempt (self, TRUE); nm_device_state_changed (dev, NM_DEVICE_STATE_NEED_AUTH, NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT); nm_act_request_get_secrets (req, @@ -2266,7 +2318,7 @@ link_timeout_cb (gpointer user_data) } time_out: - nm_info ("%s: link timed out.", nm_device_get_iface (dev)); + nm_log_warn (LOGD_WIFI, "(%s): link timed out.", nm_device_get_iface (dev)); return FALSE; } @@ -2290,7 +2342,7 @@ schedule_state_handler (NMDeviceWifi *self, task = g_slice_new0 (SupplicantStateTask); if (!task) { - nm_warning ("Not enough memory to process supplicant manager state change."); + nm_log_err (LOGD_WIFI, "Not enough memory to process supplicant manager state change."); return FALSE; } @@ -2320,10 +2372,10 @@ supplicant_iface_state_cb_handler (gpointer user_data) self = task->self; priv = NM_DEVICE_WIFI_GET_PRIVATE (self); - nm_info ("(%s): supplicant interface state: %s -> %s", - nm_device_get_iface (NM_DEVICE (self)), - nm_supplicant_interface_state_to_string (task->old_state), - nm_supplicant_interface_state_to_string (task->new_state)); + nm_log_info (LOGD_WIFI, "(%s): supplicant interface state: %s -> %s", + nm_device_get_iface (NM_DEVICE (self)), + nm_supplicant_interface_state_to_string (task->old_state), + nm_supplicant_interface_state_to_string (task->new_state)); if (task->new_state == NM_SUPPLICANT_INTERFACE_STATE_READY) { priv->scan_interval = SCAN_INTERVAL_MIN; @@ -2337,6 +2389,9 @@ supplicant_iface_state_cb_handler (gpointer user_data) NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE); } + nm_log_dbg (LOGD_WIFI_SCAN, "(%s): supplicant ready, requesting initial scan", + nm_device_get_iface (NM_DEVICE (self))); + /* Request a scan to get latest results */ cancel_pending_scan (self); request_wireless_scan (self); @@ -2382,10 +2437,10 @@ supplicant_iface_connection_state_cb_handler (gpointer user_data) goto out; } - nm_info ("(%s): supplicant connection state: %s -> %s", - nm_device_get_iface (dev), - nm_supplicant_interface_connection_state_to_string (task->old_state), - nm_supplicant_interface_connection_state_to_string (task->new_state)); + nm_log_info (LOGD_WIFI, "(%s): supplicant connection state: %s -> %s", + nm_device_get_iface (dev), + nm_supplicant_interface_connection_state_to_string (task->old_state), + nm_supplicant_interface_connection_state_to_string (task->new_state)); scanning = nm_supplicant_interface_get_scanning (priv->supplicant.iface); @@ -2400,10 +2455,11 @@ supplicant_iface_connection_state_cb_handler (gpointer user_data) NMAccessPoint *ap = nm_device_wifi_get_activation_ap (self); const GByteArray * ssid = nm_ap_get_ssid (ap); - nm_info ("Activation (%s/wireless) Stage 2 of 5 (Device Configure) " - "successful. Connected to wireless network '%s'.", - nm_device_get_iface (dev), - ssid ? nm_utils_escape_ssid (ssid->data, ssid->len) : "(none)"); + nm_log_info (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s/wireless) Stage 2 of 5 (Device Configure) " + "successful. Connected to wireless network '%s'.", + nm_device_get_iface (dev), + ssid ? nm_utils_escape_ssid (ssid->data, ssid->len) : "(none)"); nm_device_activate_schedule_stage3_ip_config_start (dev); } } else if (task->new_state == NM_SUPPLICANT_INTERFACE_CON_STATE_DISCONNECTED) { @@ -2456,10 +2512,10 @@ supplicant_mgr_state_cb_handler (gpointer user_data) priv = NM_DEVICE_WIFI_GET_PRIVATE (self); dev = NM_DEVICE (self); - nm_info ("(%s): supplicant manager state: %s -> %s", - nm_device_get_iface (NM_DEVICE (self)), - nm_supplicant_manager_state_to_string (task->old_state), - nm_supplicant_manager_state_to_string (task->new_state)); + nm_log_info (LOGD_WIFI, "(%s): supplicant manager state: %s -> %s", + nm_device_get_iface (NM_DEVICE (self)), + nm_supplicant_manager_state_to_string (task->old_state), + nm_supplicant_manager_state_to_string (task->new_state)); /* If the supplicant went away, release the supplicant interface */ if (task->new_state == NM_SUPPLICANT_MANAGER_STATE_DOWN) { @@ -2530,11 +2586,12 @@ supplicant_iface_connection_error_cb_handler (gpointer user_data) if (!nm_device_is_activating (NM_DEVICE (self))) goto out; - nm_info ("Activation (%s/wireless): association request to the supplicant " - "failed: %s - %s", - nm_device_get_iface (NM_DEVICE (self)), - cb_data->name, - cb_data->message); + nm_log_info (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s/wireless): association request to the supplicant " + "failed: %s - %s", + nm_device_get_iface (NM_DEVICE (self)), + cb_data->name, + cb_data->message); cleanup_association_attempt (self, TRUE); nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED); @@ -2563,7 +2620,7 @@ supplicant_iface_connection_error_cb (NMSupplicantInterface * iface, cb_data = g_slice_new0 (struct iface_con_error_cb_data); if (cb_data == NULL) { - nm_warning ("Not enough memory to process supplicant connection error."); + nm_log_err (LOGD_WIFI, "Not enough memory to process supplicant connection error."); return; } @@ -2579,10 +2636,17 @@ supplicant_iface_connection_error_cb (NMSupplicantInterface * iface, } static void -supplicant_iface_notify_scanning_cb (NMSupplicantInterface * iface, - GParamSpec * pspec, - NMDeviceWifi * self) +supplicant_iface_notify_scanning_cb (NMSupplicantInterface *iface, + GParamSpec *pspec, + NMDeviceWifi *self) { + gboolean scanning; + + scanning = nm_supplicant_interface_get_scanning (iface); + nm_log_dbg (LOGD_WIFI_SCAN, "(%s): now %s", + nm_device_get_iface (NM_DEVICE (self)), + scanning ? "scanning" : "not scanning"); + g_object_notify (G_OBJECT (self), "scanning"); } @@ -2612,7 +2676,11 @@ handle_auth_or_fail (NMDeviceWifi *self, NMConnection *connection; g_return_val_if_fail (NM_IS_DEVICE_WIFI (self), NM_ACT_STAGE_RETURN_FAILURE); - g_return_val_if_fail (NM_IS_ACT_REQUEST (req), NM_ACT_STAGE_RETURN_FAILURE); + + if (!req) { + req = nm_device_get_act_request (NM_DEVICE (self)); + g_assert (req); + } connection = nm_act_request_get_connection (req); g_assert (connection); @@ -2644,7 +2712,7 @@ handle_auth_or_fail (NMDeviceWifi *self, g_object_set_data (G_OBJECT (connection), WIRELESS_SECRETS_TRIES, GUINT_TO_POINTER (++tries)); } else { - nm_warning ("Cleared secrets, but setting didn't need any secrets."); + nm_log_warn (LOGD_DEVICE, "Cleared secrets, but setting didn't need any secrets."); } return NM_ACT_STAGE_RETURN_POSTPONE; } @@ -2687,19 +2755,22 @@ supplicant_connection_timeout_cb (gpointer user_data) auth_enforced = ap_auth_enforced (connection, ap, &encrypted); if (!encrypted) { - nm_info ("Activation (%s/wireless): association took too long, " - "failing activation.", - nm_device_get_iface (dev)); + nm_log_warn (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s/wireless): association took too long, " + "failing activation.", + nm_device_get_iface (dev)); nm_device_state_changed (dev, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_SUPPLICANT_TIMEOUT); } else { /* Authentication failed, encryption key is probably bad */ - nm_info ("Activation (%s/wireless): association took too long.", - nm_device_get_iface (dev)); + nm_log_warn (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s/wireless): association took too long.", + nm_device_get_iface (dev)); if (handle_auth_or_fail (self, req, TRUE) == NM_ACT_STAGE_RETURN_POSTPONE) { - nm_info ("Activation (%s/wireless): asking for new secrets", - nm_device_get_iface (dev)); + nm_log_warn (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s/wireless): asking for new secrets", + nm_device_get_iface (dev)); } else { nm_device_state_changed (dev, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_NO_SECRETS); @@ -2722,8 +2793,9 @@ start_supplicant_connection_timeout (NMDeviceWifi *self) /* Set up a timeout on the connection attempt to fail it after 25 seconds */ id = g_timeout_add_seconds (25, supplicant_connection_timeout_cb, self); - if (id <= 0) { - nm_warning ("Activation (%s/wireless): couldn't start supplicant " + if (id == 0) { + nm_log_err (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s/wireless): couldn't start supplicant " "timeout timer.", nm_device_get_iface (NM_DEVICE (self))); return FALSE; @@ -2809,7 +2881,7 @@ build_supplicant_config (NMDeviceWifi *self, nm_ap_get_broadcast (ap), adhoc_freq, priv->has_scan_capa_ssid)) { - nm_warning ("Couldn't add 802-11-wireless setting to supplicant config."); + nm_log_err (LOGD_WIFI, "Couldn't add 802-11-wireless setting to supplicant config."); goto error; } @@ -2824,13 +2896,13 @@ build_supplicant_config (NMDeviceWifi *self, s_wireless_sec, s_8021x, con_path)) { - nm_warning ("Couldn't add 802-11-wireless-security setting to " + nm_log_err (LOGD_WIFI, "Couldn't add 802-11-wireless-security setting to " "supplicant config."); goto error; } } else { if (!nm_supplicant_config_add_no_security (config)) { - nm_warning ("Couldn't add unsecured option to supplicant config."); + nm_log_err (LOGD_WIFI, "Couldn't add unsecured option to supplicant config."); goto error; } } @@ -2854,15 +2926,15 @@ real_update_hw_address (NMDevice *dev) fd = socket (PF_INET, SOCK_DGRAM, 0); if (fd < 0) { - g_warning ("could not open control socket."); + nm_log_err (LOGD_HW, "could not open control socket."); return; } memset (&req, 0, sizeof (struct ifreq)); strncpy (req.ifr_name, nm_device_get_iface (dev), IFNAMSIZ); if (ioctl (fd, SIOCGIFHWADDR, &req) < 0) { - nm_warning ("%s: (%s) error getting hardware address: %d", - __func__, nm_device_get_iface (dev), errno); + nm_log_err (LOGD_HW | LOGD_WIFI, "(%s) error getting hardware address: %d", + nm_device_get_iface (dev), errno); goto out; } @@ -2963,7 +3035,8 @@ real_connection_secrets_updated (NMDevice *dev, || !strcmp (setting_name, NM_SETTING_802_1X_SETTING_NAME)) { valid = TRUE; } else { - nm_warning ("Ignoring updated secrets for setting '%s'.", setting_name); + nm_log_warn (LOGD_DEVICE, "Ignoring updated secrets for setting '%s'.", + setting_name); } } @@ -3013,9 +3086,10 @@ real_act_stage2_config (NMDevice *dev, NMDeviceStateReason *reason) /* If we need secrets, get them */ setting_name = nm_connection_need_secrets (connection, NULL); if (setting_name) { - nm_info ("Activation (%s/wireless): access point '%s' has security," - " but secrets are required.", - iface, nm_setting_connection_get_id (s_connection)); + nm_log_info (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s/wireless): access point '%s' has security," + " but secrets are required.", + iface, nm_setting_connection_get_id (s_connection)); ret = handle_auth_or_fail (self, req, FALSE); if (ret == NM_ACT_STAGE_RETURN_FAILURE) @@ -3025,19 +3099,22 @@ real_act_stage2_config (NMDevice *dev, NMDeviceStateReason *reason) /* have secrets, or no secrets required */ if (nm_setting_wireless_get_security (s_wireless)) { - nm_info ("Activation (%s/wireless): connection '%s' has security" - ", and secrets exist. No new secrets needed.", - iface, nm_setting_connection_get_id (s_connection)); + nm_log_info (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s/wireless): connection '%s' has security" + ", and secrets exist. No new secrets needed.", + iface, nm_setting_connection_get_id (s_connection)); } else { - nm_info ("Activation (%s/wireless): connection '%s' requires no " - "security. No secrets needed.", - iface, nm_setting_connection_get_id (s_connection)); + nm_log_info (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s/wireless): connection '%s' requires no " + "security. No secrets needed.", + iface, nm_setting_connection_get_id (s_connection)); } config = build_supplicant_config (self, connection, ap); if (config == NULL) { - nm_warning ("Activation (%s/wireless): couldn't build wireless " - "configuration.", iface); + nm_log_err (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s/wireless): couldn't build wireless configuration.", + iface); *reason = NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED; goto out; } @@ -3050,8 +3127,9 @@ real_act_stage2_config (NMDevice *dev, NMDeviceStateReason *reason) priv->supplicant.iface_error_id = id; if (!nm_supplicant_interface_set_config (priv->supplicant.iface, config)) { - nm_warning ("Activation (%s/wireless): couldn't send wireless " - "configuration to the supplicant.", iface); + nm_log_err (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s/wireless): couldn't send wireless " + "configuration to the supplicant.", iface); *reason = NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED; goto out; } @@ -3113,21 +3191,19 @@ real_act_stage4_get_ip4_config (NMDevice *dev, static NMActStageReturn -real_act_stage4_ip4_config_timeout (NMDevice *dev, - NMIP4Config **config, - NMDeviceStateReason *reason) +handle_ip_config_timeout (NMDeviceWifi *self, + NMConnection *connection, + gboolean may_fail, + gboolean *chain_up, + NMDeviceStateReason *reason) { - NMDeviceWifi *self = NM_DEVICE_WIFI (dev); - NMAccessPoint *ap = nm_device_wifi_get_activation_ap (self); + NMAccessPoint *ap; NMActStageReturn ret = NM_ACT_STAGE_RETURN_FAILURE; - NMIP4Config *real_config = NULL; - NMActRequest *req = nm_device_get_act_request (dev); - NMConnection *connection; gboolean auth_enforced = FALSE, encrypted = FALSE; - g_return_val_if_fail (config != NULL, NM_ACT_STAGE_RETURN_FAILURE); - g_return_val_if_fail (*config == NULL, NM_ACT_STAGE_RETURN_FAILURE); + g_return_val_if_fail (connection != NULL, NM_ACT_STAGE_RETURN_FAILURE); + ap = nm_device_wifi_get_activation_ap (self); g_assert (ap); /* If nothing checks the security authentication information (as in @@ -3135,48 +3211,93 @@ real_act_stage4_ip4_config_timeout (NMDevice *dev, * the encryption key is likely wrong. Ask the user for a new one. * Otherwise the failure likely happened after a successful authentication. */ - connection = nm_act_request_get_connection (req); auth_enforced = ap_auth_enforced (connection, ap, &encrypted); - if (encrypted && !auth_enforced) { + if (encrypted && !auth_enforced && !may_fail) { NMSettingConnection *s_con; s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION)); /* Activation failed, we must have bad encryption key */ - nm_info ("Activation (%s/wireless): could not get IP configuration for " - "connection '%s'.", - nm_device_get_iface (dev), nm_setting_connection_get_id (s_con)); + nm_log_warn (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s/wireless): could not get IP configuration for " + "connection '%s'.", + nm_device_get_iface (NM_DEVICE (self)), + nm_setting_connection_get_id (s_con)); - ret = handle_auth_or_fail (self, req, TRUE); + ret = handle_auth_or_fail (self, NULL, TRUE); if (ret == NM_ACT_STAGE_RETURN_POSTPONE) { - nm_info ("Activation (%s/wireless): asking for new secrets", - nm_device_get_iface (dev)); + nm_log_info (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s/wireless): asking for new secrets", + nm_device_get_iface (NM_DEVICE (self))); } else { *reason = NM_DEVICE_STATE_REASON_NO_SECRETS; } - } else if (nm_ap_get_mode (ap) == NM_802_11_MODE_ADHOC) { - NMDeviceWifiClass *klass; - NMDeviceClass * parent_class; - - /* For Ad-Hoc networks, chain up to parent to get a Zeroconf IP */ - klass = NM_DEVICE_WIFI_GET_CLASS (self); - parent_class = NM_DEVICE_CLASS (g_type_class_peek_parent (klass)); - ret = parent_class->act_stage4_ip4_config_timeout (dev, &real_config, reason); } else { /* Non-encrypted network or authentication is enforced by some - * entity (AP, RADIUS server, etc), but IP configure failed. Alert - * the user. + * entity (AP, RADIUS server, etc), but IP configure failed. Let the + * superclass handle it. */ - *reason = NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE; - ret = NM_ACT_STAGE_RETURN_FAILURE; + *chain_up = TRUE; } - *config = real_config; - return ret; } +static NMActStageReturn +real_act_stage4_ip4_config_timeout (NMDevice *dev, + NMIP4Config **config, + NMDeviceStateReason *reason) +{ + NMActRequest *req; + NMConnection *connection; + NMSettingIP4Config *s_ip4; + gboolean may_fail = FALSE, chain_up = FALSE; + NMActStageReturn ret; + + req = nm_device_get_act_request (dev); + g_assert (req); + connection = nm_act_request_get_connection (req); + g_assert (connection); + + s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG); + if (s_ip4) + may_fail = nm_setting_ip4_config_get_may_fail (s_ip4); + + ret = handle_ip_config_timeout (NM_DEVICE_WIFI (dev), connection, may_fail, &chain_up, reason); + if (chain_up) + ret = NM_DEVICE_CLASS (nm_device_wifi_parent_class)->act_stage4_ip4_config_timeout (dev, config, reason); + + return ret; +} + +static NMActStageReturn +real_act_stage4_ip6_config_timeout (NMDevice *dev, + NMIP6Config **config, + NMDeviceStateReason *reason) +{ + NMActRequest *req; + NMConnection *connection; + NMSettingIP6Config *s_ip6; + gboolean may_fail = FALSE, chain_up = FALSE; + NMActStageReturn ret; + + req = nm_device_get_act_request (dev); + g_assert (req); + connection = nm_act_request_get_connection (req); + g_assert (connection); + + s_ip6 = (NMSettingIP6Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG); + if (s_ip6) + may_fail = nm_setting_ip6_config_get_may_fail (s_ip6); + + ret = handle_ip_config_timeout (NM_DEVICE_WIFI (dev), connection, may_fail, &chain_up, reason); + if (chain_up) + ret = NM_DEVICE_CLASS (nm_device_wifi_parent_class)->act_stage4_ip6_config_timeout (dev, config, reason); + + return ret; +} + static void activation_success_handler (NMDevice *dev) { @@ -3277,9 +3398,10 @@ activation_failure_handler (NMDevice *dev) } ssid = nm_ap_get_ssid (ap); - nm_info ("Activation (%s) failed for access point (%s)", - nm_device_get_iface (dev), - ssid ? nm_utils_escape_ssid (ssid->data, ssid->len) : "(none)"); + nm_log_warn (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s) failed for access point (%s)", + nm_device_get_iface (dev), + ssid ? nm_utils_escape_ssid (ssid->data, ssid->len) : "(none)"); } static gboolean @@ -3384,14 +3506,6 @@ device_state_changed (NMDevice *device, remove_all_aps (self); } -guint32 -nm_device_wifi_get_ifindex (NMDeviceWifi *self) -{ - g_return_val_if_fail (self != NULL, FALSE); - - return NM_DEVICE_WIFI_GET_PRIVATE (self)->ifindex; -} - NMAccessPoint * nm_device_wifi_get_activation_ap (NMDeviceWifi *self) { @@ -3433,18 +3547,29 @@ real_set_enabled (NMDeviceInterface *device, gboolean enabled) priv->enabled = enabled; + nm_log_dbg (LOGD_WIFI, "(%s): device now %s", + nm_device_get_iface (NM_DEVICE (device)), + enabled ? "enabled" : "disabled"); + state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (self)); - if (state < NM_DEVICE_STATE_UNAVAILABLE) + if (state < NM_DEVICE_STATE_UNAVAILABLE) { + nm_log_dbg (LOGD_WIFI, "(%s): %s blocked by UNMANAGED state", + enabled ? "enable" : "disable", + nm_device_get_iface (NM_DEVICE (device))); return; + } if (enabled) { gboolean no_firmware = FALSE, success; struct iw_range range; if (state != NM_DEVICE_STATE_UNAVAILABLE) - nm_warning ("not in expected unavailable state!"); + nm_log_warn (LOGD_CORE, "not in expected unavailable state!"); if (!nm_device_hw_bring_up (NM_DEVICE (self), TRUE, &no_firmware)) { + nm_log_dbg (LOGD_WIFI, "(%s): enable blocked by failure to bring device up", + nm_device_get_iface (NM_DEVICE (device))); + /* The device sucks, or HAL was lying to us about the killswitch state */ priv->enabled = FALSE; return; @@ -3459,6 +3584,8 @@ real_set_enabled (NMDeviceInterface *device, gboolean enabled) supplicant_interface_release (self); supplicant_interface_acquire (self); + nm_log_dbg (LOGD_WIFI, "(%s): enable waiting on supplicant state", + nm_device_get_iface (NM_DEVICE (device))); } else { nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_UNAVAILABLE, @@ -3472,8 +3599,7 @@ real_set_enabled (NMDeviceInterface *device, gboolean enabled) NMDevice * nm_device_wifi_new (const char *udi, const char *iface, - const char *driver, - guint32 ifindex) + const char *driver) { g_return_val_if_fail (udi != NULL, NULL); g_return_val_if_fail (iface != NULL, NULL); @@ -3483,9 +3609,9 @@ nm_device_wifi_new (const char *udi, NM_DEVICE_INTERFACE_UDI, udi, NM_DEVICE_INTERFACE_IFACE, iface, NM_DEVICE_INTERFACE_DRIVER, driver, - NM_DEVICE_WIFI_IFINDEX, ifindex, NM_DEVICE_INTERFACE_TYPE_DESC, "802.11 WiFi", NM_DEVICE_INTERFACE_DEVICE_TYPE, NM_DEVICE_TYPE_WIFI, + NM_DEVICE_INTERFACE_RFKILL_TYPE, RFKILL_TYPE_WLAN, NULL); } @@ -3583,9 +3709,6 @@ get_property (GObject *object, guint prop_id, else g_value_set_boxed (value, "/"); break; - case PROP_IFINDEX: - g_value_set_uint (value, nm_device_wifi_get_ifindex (device)); - break; case PROP_SCANNING: g_value_set_boolean (value, nm_supplicant_interface_get_scanning (priv->supplicant.iface)); break; @@ -3605,10 +3728,6 @@ set_property (GObject *object, guint prop_id, NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (object); switch (prop_id) { - case PROP_IFINDEX: - /* construct-only */ - priv->ifindex = g_value_get_uint (value); - break; case PROP_IPW_RFKILL_STATE: /* construct only */ priv->ipw_rfkill_state = g_value_get_uint (value); @@ -3651,6 +3770,7 @@ nm_device_wifi_class_init (NMDeviceWifiClass *klass) parent_class->act_stage2_config = real_act_stage2_config; parent_class->act_stage4_get_ip4_config = real_act_stage4_get_ip4_config; parent_class->act_stage4_ip4_config_timeout = real_act_stage4_ip4_config_timeout; + parent_class->act_stage4_ip6_config_timeout = real_act_stage4_ip6_config_timeout; parent_class->deactivate = real_deactivate; parent_class->deactivate_quickly = real_deactivate_quickly; parent_class->can_interrupt_activation = real_can_interrupt_activation; @@ -3696,13 +3816,6 @@ nm_device_wifi_class_init (NMDeviceWifiClass *klass) 0, G_MAXUINT32, NM_WIFI_DEVICE_CAP_NONE, G_PARAM_READABLE)); - g_object_class_install_property (object_class, PROP_IFINDEX, - g_param_spec_uint (NM_DEVICE_WIFI_IFINDEX, - "Ifindex", - "Interface index", - 0, G_MAXUINT32, 0, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | NM_PROPERTY_PARAM_NO_EXPORT)); - g_object_class_install_property (object_class, PROP_SCANNING, g_param_spec_boolean (NM_DEVICE_WIFI_SCANNING, "Scanning", diff --git a/src/nm-device-wifi.h b/src/nm-device-wifi.h index c793844c5c..11ac885735 100644 --- a/src/nm-device-wifi.h +++ b/src/nm-device-wifi.h @@ -28,7 +28,7 @@ #include "nm-rfkill.h" #include "nm-device.h" -#include "NetworkManagerAP.h" +#include "nm-wifi-ap.h" struct NMAccessPointList; @@ -47,7 +47,6 @@ G_BEGIN_DECLS #define NM_DEVICE_WIFI_BITRATE "bitrate" #define NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT "active-access-point" #define NM_DEVICE_WIFI_CAPABILITIES "wireless-capabilities" -#define NM_DEVICE_WIFI_IFINDEX "ifindex" #define NM_DEVICE_WIFI_SCANNING "scanning" #define NM_DEVICE_WIFI_IPW_RFKILL_STATE "ipw-rfkill-state" @@ -84,8 +83,7 @@ GType nm_device_wifi_get_type (void); NMDevice *nm_device_wifi_new (const char *udi, const char *iface, - const char *driver, - guint32 ifindex); + const char *driver); void nm_device_wifi_get_address (NMDeviceWifi *dev, struct ether_addr *addr); @@ -102,8 +100,6 @@ NM80211Mode nm_device_wifi_get_mode (NMDeviceWifi *self); NMAccessPoint * nm_device_wifi_get_activation_ap (NMDeviceWifi *self); -guint32 nm_device_wifi_get_ifindex (NMDeviceWifi *self); - RfKillState nm_device_wifi_get_ipw_rfkill_state (NMDeviceWifi *self); G_END_DECLS diff --git a/src/nm-device.c b/src/nm-device.c index 6c0f99ca47..7d9913d478 100644 --- a/src/nm-device.c +++ b/src/nm-device.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2005 - 2008 Red Hat, Inc. + * Copyright (C) 2005 - 2010 Red Hat, Inc. * Copyright (C) 2006 - 2008 Novell, Inc. */ @@ -38,14 +38,14 @@ #include "nm-device-interface.h" #include "nm-device.h" #include "nm-device-private.h" -#include "NetworkManagerPolicy.h" #include "NetworkManagerUtils.h" -#include "NetworkManagerSystem.h" +#include "nm-system.h" #include "nm-dhcp-manager.h" #include "nm-dbus-manager.h" #include "nm-named-manager.h" #include "nm-utils.h" -#include "nm-netlink.h" +#include "nm-logging.h" +#include "nm-netlink-monitor.h" #include "nm-setting-ip4-config.h" #include "nm-setting-ip6-config.h" #include "nm-setting-connection.h" @@ -53,6 +53,7 @@ #include "nm-dhcp4-config.h" #include "nm-ip6-manager.h" #include "nm-marshal.h" +#include "nm-rfkill.h" #define NM_ACT_REQUEST_IP4_CONFIG "nm-act-request-ip4-config" #define NM_ACT_REQUEST_IP6_CONFIG "nm-act-request-ip6-config" @@ -82,12 +83,15 @@ typedef struct { char * udi; char * path; char * iface; /* may change, could be renamed by user */ + int ifindex; char * ip_iface; + int ip_ifindex; NMDeviceType type; char * type_desc; guint32 capabilities; char * driver; gboolean managed; /* whether managed by NM or not */ + RfKillType rfkill_type; guint32 ip4_address; @@ -102,13 +106,16 @@ typedef struct { gboolean ip4_ready; gboolean ip6_ready; - /* IP4 configuration info */ - NMIP4Config * ip4_config; /* Config from DHCP, PPP, or system config files */ + /* Generic DHCP stuff */ NMDHCPManager * dhcp_manager; guint32 dhcp_timeout; - gulong dhcp_state_sigid; - gulong dhcp_timeout_sigid; GByteArray * dhcp_anycast_address; + + /* IP4 configuration info */ + NMIP4Config * ip4_config; /* Config from DHCP, PPP, or system config files */ + NMDHCPClient * dhcp4_client; + gulong dhcp4_state_sigid; + gulong dhcp4_timeout_sigid; NMDHCP4Config * dhcp4_config; /* dnsmasq stuff for shared connections */ @@ -128,6 +135,15 @@ typedef struct { gulong ip6_config_changed_sigid; gboolean ip6_waiting_for_config; + char * ip6_accept_ra_path; + guint32 ip6_accept_ra_save; + + NMDHCPClient * dhcp6_client; + guint32 dhcp6_mode; + gulong dhcp6_state_sigid; + gulong dhcp6_timeout_sigid; + NMDHCP6Config * dhcp6_config; + /* inhibit autoconnect feature */ gboolean autoconnect_inhibit; } NMDevicePrivate; @@ -159,6 +175,16 @@ static gboolean nm_device_set_ip6_config (NMDevice *dev, gboolean assumed, NMDeviceStateReason *reason); +static NMActStageReturn dhcp6_start (NMDevice *self, + NMConnection *connection, + guint32 dhcp_opt, + NMDeviceStateReason *reason); + +static void addrconf6_cleanup (NMDevice *self); +static void dhcp6_cleanup (NMDevice *self, gboolean stop); +static void dhcp4_cleanup (NMDevice *self, gboolean stop); + + static void device_interface_init (NMDeviceInterface *device_interface_class) { @@ -181,6 +207,42 @@ nm_device_init (NMDevice *self) priv->capabilities = NM_DEVICE_CAP_NONE; priv->state = NM_DEVICE_STATE_UNMANAGED; priv->dhcp_timeout = 0; + priv->rfkill_type = RFKILL_TYPE_UNKNOWN; +} + +static void +update_accept_ra_save (NMDevice *self) +{ + NMDevicePrivate *priv; + const char *ip_iface; + char *new_path; + + g_return_if_fail (self != NULL); + g_return_if_fail (NM_IS_DEVICE (self)); + + priv = NM_DEVICE_GET_PRIVATE (self); + ip_iface = nm_device_get_ip_iface (self); + + new_path = g_strdup_printf ("/proc/sys/net/ipv6/conf/%s/accept_ra", ip_iface); + g_assert (new_path); + + if (priv->ip6_accept_ra_path) { + /* If the IP iface is different from before, use the new value */ + if (!strcmp (new_path, priv->ip6_accept_ra_path)) { + g_free (new_path); + return; + } + g_free (priv->ip6_accept_ra_path); + } + + /* Grab the original value of "accept_ra" so we can restore it when NM exits */ + priv->ip6_accept_ra_path = new_path; + if (!nm_utils_get_proc_sys_net_value (priv->ip6_accept_ra_path, + ip_iface, + &priv->ip6_accept_ra_save)) { + g_free (priv->ip6_accept_ra_path); + priv->ip6_accept_ra_path = NULL; + } } static GObject* @@ -202,24 +264,28 @@ constructor (GType type, priv = NM_DEVICE_GET_PRIVATE (dev); if (!priv->udi) { - nm_warning ("No device udi provided, ignoring"); + nm_log_err (LOGD_DEVICE, "No device udi provided, ignoring"); goto error; } if (!priv->iface) { - nm_warning ("No device interface provided, ignoring"); + nm_log_err (LOGD_DEVICE, "No device interface provided, ignoring"); goto error; } priv->capabilities |= NM_DEVICE_GET_CLASS (dev)->get_generic_capabilities (dev); if (!(priv->capabilities & NM_DEVICE_CAP_NM_SUPPORTED)) { - nm_warning ("(%s): Device unsupported, ignoring.", priv->iface); + nm_log_warn (LOGD_DEVICE, "(%s): Device unsupported, ignoring.", priv->iface); goto error; } if (NM_DEVICE_GET_CLASS (dev)->update_hw_address) NM_DEVICE_GET_CLASS (dev)->update_hw_address (dev); + priv->dhcp_manager = nm_dhcp_manager_get (); + + update_accept_ra_save (dev); + priv->initialized = TRUE; return object; @@ -285,6 +351,13 @@ nm_device_get_iface (NMDevice *self) return NM_DEVICE_GET_PRIVATE (self)->iface; } +int +nm_device_get_ifindex (NMDevice *self) +{ + g_return_val_if_fail (self != NULL, 0); + + return NM_DEVICE_GET_PRIVATE (self)->ifindex; +} const char * nm_device_get_ip_iface (NMDevice *self) @@ -298,14 +371,36 @@ nm_device_get_ip_iface (NMDevice *self) return priv->ip_iface ? priv->ip_iface : priv->iface; } +int +nm_device_get_ip_ifindex (NMDevice *self) +{ + NMDevicePrivate *priv; + + g_return_val_if_fail (self != NULL, 0); + + priv = NM_DEVICE_GET_PRIVATE (self); + /* If it's not set, default to iface */ + return priv->ip_iface ? priv->ip_ifindex : priv->ifindex; +} void nm_device_set_ip_iface (NMDevice *self, const char *iface) { + NMDevicePrivate *priv; + g_return_if_fail (NM_IS_DEVICE (self)); - g_free (NM_DEVICE_GET_PRIVATE (self)->ip_iface); - NM_DEVICE_GET_PRIVATE (self)->ip_iface = iface ? g_strdup (iface) : NULL; + priv = NM_DEVICE_GET_PRIVATE (self); + g_free (priv->ip_iface); + priv->ip_ifindex = 0; + + priv->ip_iface = g_strdup (iface); + if (priv->ip_iface) { + priv->ip_ifindex = nm_netlink_iface_to_index (priv->ip_iface); + if (!priv->ip_ifindex) { + nm_log_warn (LOGD_HW, "(%s): failed to look up interface index", iface); + } + } } @@ -508,8 +603,9 @@ activation_source_schedule (NMDevice *self, GSourceFunc func, int family) act_source_func = &priv->act_source_func; } - if (*act_source_id) - nm_warning ("activation stage already scheduled"); + if (*act_source_id) { + nm_log_err (LOGD_DEVICE, "activation stage already scheduled"); + } /* Don't bother rescheduling the same function that's about to * run anyway. Fixes issues with crappy wireless drivers sending @@ -523,87 +619,186 @@ activation_source_schedule (NMDevice *self, GSourceFunc func, int family) } } +gboolean +nm_device_ip_config_should_fail (NMDevice *self, gboolean ip6) +{ + NMActRequest *req; + NMConnection *connection; + NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; + + g_return_val_if_fail (self != NULL, TRUE); + + req = nm_device_get_act_request (self); + g_assert (req); + connection = nm_act_request_get_connection (req); + g_assert (connection); + + /* Fail the connection if the failed IP method is required to complete */ + if (ip6) { + s_ip6 = (NMSettingIP6Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG); + if (s_ip6 && !nm_setting_ip6_config_get_may_fail (s_ip6)) + return TRUE; + } else { + s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG); + if (s_ip4 && !nm_setting_ip4_config_get_may_fail (s_ip4)) + return TRUE; + } + + return FALSE; +} + static void ip6_addrconf_complete (NMIP6Manager *ip6_manager, - const char *iface, - gboolean success, - gpointer user_data) + int ifindex, + guint dhcp_opts, + gboolean success, + gpointer user_data) { NMDevice *self = NM_DEVICE (user_data); NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); + NMActRequest *req; + NMConnection *connection; + NMActStageReturn ret; + NMDeviceStateReason reason = NM_DEVICE_STATE_REASON_NONE; + NMDeviceState state; - if (strcmp (nm_device_get_ip_iface (self), iface) != 0) + if (ifindex != nm_device_get_ip_ifindex (self)) return; - if (!nm_device_get_act_request (self)) + req = nm_device_get_act_request (self); + if (!req) + return; + connection = nm_act_request_get_connection (req); + g_assert (connection); + + if (!priv->ip6_waiting_for_config) return; - if (priv->ip6_waiting_for_config) { - priv->ip6_waiting_for_config = FALSE; - if (success) - nm_device_activate_schedule_stage4_ip6_config_get (self); - else - nm_device_activate_schedule_stage4_ip6_config_timeout (self); + priv->ip6_waiting_for_config = FALSE; + + if (!success) { + nm_device_activate_schedule_stage4_ip6_config_timeout (self); + return; + } + + priv->dhcp6_mode = dhcp_opts; + + /* If addrconf is all that's required, we're done */ + if (priv->dhcp6_mode == IP6_DHCP_OPT_NONE) { + nm_device_activate_schedule_stage4_ip6_config_get (self); + return; + } + + /* If the router said to use DHCP for managed or otherconf, do it */ + + /* Don't re-start DHCPv6 if it's already in progress */ + state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (self)); + if ((state != NM_DEVICE_STATE_IP_CONFIG) || priv->dhcp6_client) + return; + + nm_log_info (LOGD_DEVICE | LOGD_DHCP6, + "Activation (%s) Stage 3 of 5 (IP Configure Start) starting DHCPv6" + " as requested by IPv6 router...", + priv->iface); + + ret = dhcp6_start (self, connection, priv->dhcp6_mode, &reason); + switch (ret) { + case NM_ACT_STAGE_RETURN_SUCCESS: + /* Shouldn't get this, but handle it anyway */ + g_warn_if_reached (); + nm_device_activate_schedule_stage4_ip6_config_get (self); + break; + case NM_ACT_STAGE_RETURN_POSTPONE: + /* Success; wait for DHCPv6 to complete */ + break; + default: + nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, reason); + break; } } static void ip6_config_changed (NMIP6Manager *ip6_manager, - const char *iface, - gpointer user_data) + int ifindex, + guint dhcp_opts, + gboolean success, + gpointer user_data) { NMDevice *self = NM_DEVICE (user_data); - if (strcmp (nm_device_get_ip_iface (self), iface) != 0) + if (ifindex != nm_device_get_ip_ifindex (self)) return; if (!nm_device_get_act_request (self)) return; + /* FIXME: re-run DHCPv6 here to get any new nameservers or whatever */ + + if (!success && (nm_device_get_state (self) == NM_DEVICE_STATE_ACTIVATED)) { + nm_device_state_changed (self, + NM_DEVICE_STATE_FAILED, + NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE); + return; + } + nm_device_activate_schedule_stage4_ip6_config_get (self); } -static void -nm_device_setup_ip6 (NMDevice *self) +static gboolean +ip6_method_matches (NMConnection *connection, const char *match) +{ + NMSettingIP6Config *s_ip6; + const char *method = NULL; + + s_ip6 = (NMSettingIP6Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG); + if (s_ip6) { + method = nm_setting_ip6_config_get_method (s_ip6); + g_assert (method); + } + + /* Treat missing IP6 setting as IGNORE */ + if (!s_ip6 && !strcmp (match, NM_SETTING_IP6_CONFIG_METHOD_IGNORE)) + return TRUE; + + return method && !strcmp (method, match); +} + +static gboolean +addrconf6_setup (NMDevice *self) { NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); NMActRequest *req; NMConnection *connection; - const char *ip_iface, *method = NULL; NMSettingIP6Config *s_ip6; req = nm_device_get_act_request (self); - if (!req) - return; + g_assert (req); connection = nm_act_request_get_connection (req); - if (!connection) - return; - - s_ip6 = (NMSettingIP6Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG); - if (s_ip6) - method = nm_setting_ip6_config_get_method (s_ip6); - - if (!method || !strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE)) - return; + g_assert (connection); if (!priv->ip6_manager) { priv->ip6_manager = nm_ip6_manager_get (); priv->ip6_addrconf_sigid = g_signal_connect (priv->ip6_manager, - "addrconf-complete", - G_CALLBACK (ip6_addrconf_complete), - self); + "addrconf-complete", + G_CALLBACK (ip6_addrconf_complete), + self); priv->ip6_config_changed_sigid = g_signal_connect (priv->ip6_manager, - "config-changed", - G_CALLBACK (ip6_config_changed), - self); + "config-changed", + G_CALLBACK (ip6_config_changed), + self); } - priv->ip6_waiting_for_config = FALSE; + s_ip6 = (NMSettingIP6Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG); + nm_ip6_manager_prepare_interface (priv->ip6_manager, + nm_device_get_ip_ifindex (self), + s_ip6, + priv->ip6_accept_ra_path); + priv->ip6_waiting_for_config = TRUE; - ip_iface = nm_device_get_ip_iface (self); - nm_ip6_manager_prepare_interface (priv->ip6_manager, ip_iface, s_ip6); + return TRUE; } static void -nm_device_cleanup_ip6 (NMDevice *self) +addrconf6_cleanup (NMDevice *self) { NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); @@ -621,10 +816,17 @@ nm_device_cleanup_ip6 (NMDevice *self) priv->ip6_config_changed_sigid = 0; } + nm_ip6_manager_cancel_addrconf (priv->ip6_manager, nm_device_get_ip_ifindex (self)); g_object_unref (priv->ip6_manager); priv->ip6_manager = NULL; } +static NMActStageReturn +real_act_stage1_prepare (NMDevice *self, NMDeviceStateReason *reason) +{ + return NM_ACT_STAGE_RETURN_SUCCESS; +} + /* * nm_device_activate_stage1_device_prepare * @@ -635,6 +837,7 @@ static gboolean nm_device_activate_stage1_device_prepare (gpointer user_data) { NMDevice *self = NM_DEVICE (user_data); + NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); const char *iface; NMActStageReturn ret; NMDeviceStateReason reason = NM_DEVICE_STATE_REASON_NONE; @@ -642,11 +845,11 @@ nm_device_activate_stage1_device_prepare (gpointer user_data) /* Clear the activation source ID now that this stage has run */ activation_source_clear (self, FALSE, 0); - iface = nm_device_get_iface (self); - nm_info ("Activation (%s) Stage 1 of 5 (Device Prepare) started...", iface); - nm_device_state_changed (self, NM_DEVICE_STATE_PREPARE, NM_DEVICE_STATE_REASON_NONE); + priv->ip4_ready = priv->ip6_ready = FALSE; - nm_device_setup_ip6 (self); + iface = nm_device_get_iface (self); + nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 1 of 5 (Device Prepare) started...", iface); + nm_device_state_changed (self, NM_DEVICE_STATE_PREPARE, NM_DEVICE_STATE_REASON_NONE); ret = NM_DEVICE_GET_CLASS (self)->act_stage1_prepare (self, &reason); if (ret == NM_ACT_STAGE_RETURN_POSTPONE) { @@ -660,7 +863,7 @@ nm_device_activate_stage1_device_prepare (gpointer user_data) nm_device_activate_schedule_stage2_device_config (self); out: - nm_info ("Activation (%s) Stage 1 of 5 (Device Prepare) complete.", iface); + nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 1 of 5 (Device Prepare) complete.", iface); return FALSE; } @@ -683,15 +886,8 @@ nm_device_activate_schedule_stage1_device_prepare (NMDevice *self) activation_source_schedule (self, nm_device_activate_stage1_device_prepare, 0); - nm_info ("Activation (%s) Stage 1 of 5 (Device Prepare) scheduled...", - nm_device_get_iface (self)); -} - -static NMActStageReturn -real_act_stage1_prepare (NMDevice *dev, NMDeviceStateReason *reason) -{ - /* Nothing to do */ - return NM_ACT_STAGE_RETURN_SUCCESS; + nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 1 of 5 (Device Prepare) scheduled...", + nm_device_get_iface (self)); } static NMActStageReturn @@ -721,7 +917,7 @@ nm_device_activate_stage2_device_config (gpointer user_data) activation_source_clear (self, FALSE, 0); iface = nm_device_get_iface (self); - nm_info ("Activation (%s) Stage 2 of 5 (Device Configure) starting...", iface); + nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 2 of 5 (Device Configure) starting...", iface); nm_device_state_changed (self, NM_DEVICE_STATE_CONFIG, NM_DEVICE_STATE_REASON_NONE); if (!nm_device_bring_up (self, FALSE, &no_firmware)) { @@ -742,12 +938,12 @@ nm_device_activate_stage2_device_config (gpointer user_data) } g_assert (ret == NM_ACT_STAGE_RETURN_SUCCESS); - nm_info ("Activation (%s) Stage 2 of 5 (Device Configure) successful.", iface); + nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 2 of 5 (Device Configure) successful.", iface); nm_device_activate_schedule_stage3_ip_config_start (self); out: - nm_info ("Activation (%s) Stage 2 of 5 (Device Configure) complete.", iface); + nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 2 of 5 (Device Configure) complete.", iface); return FALSE; } @@ -770,7 +966,7 @@ nm_device_activate_schedule_stage2_device_config (NMDevice *self) activation_source_schedule (self, nm_device_activate_stage2_device_config, 0); - nm_info ("Activation (%s) Stage 2 of 5 (Device Configure) scheduled...", + nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 2 of 5 (Device Configure) scheduled...", nm_device_get_iface (self)); } @@ -799,9 +995,9 @@ aipd_cleanup (NMDevice *self) kill (priv->aipd_pid, SIGKILL); /* ensure the child is reaped */ - nm_debug ("waiting for ppp pid %d to exit", priv->aipd_pid); + nm_log_dbg (LOGD_AUTOIP4, "waiting for avahi-autoipd pid %d to exit", priv->aipd_pid); waitpid (priv->aipd_pid, NULL, 0); - nm_debug ("ppp pid %d cleaned up", priv->aipd_pid); + nm_log_dbg (LOGD_AUTOIP4, "avahi-autoip pid %d cleaned up", priv->aipd_pid); priv->aipd_pid = -1; } @@ -845,7 +1041,7 @@ handle_autoip_change (NMDevice *self, NMDeviceStateReason *reason) config = aipd_get_ip4_config (self, reason); if (!config) { - nm_warning ("failed to get autoip config for rebind"); + nm_log_err (LOGD_AUTOIP4, "failed to get autoip config for rebind"); return FALSE; } @@ -857,7 +1053,7 @@ handle_autoip_change (NMDevice *self, NMDeviceStateReason *reason) g_object_set_data (G_OBJECT (req), NM_ACT_REQUEST_IP4_CONFIG, config); if (!nm_device_set_ip4_config (self, config, FALSE, reason)) { - nm_warning ("(%s): failed to update IP4 config in response to autoip event.", + nm_log_err (LOGD_AUTOIP4, "(%s): failed to update IP4 config in response to autoip event.", nm_device_get_iface (self)); return FALSE; } @@ -906,14 +1102,14 @@ nm_device_handle_autoip4_event (NMDevice *self, NMDeviceStateReason reason = NM_DEVICE_STATE_REASON_NONE; if (inet_pton (AF_INET, address, &ip) <= 0) { - nm_warning ("(%s): invalid address %s received from avahi-autoipd.", + nm_log_err (LOGD_AUTOIP4, "(%s): invalid address %s received from avahi-autoipd.", iface, address); nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_AUTOIP_ERROR); return; } if ((ip.s_addr & IPV4LL_NETMASK) != IPV4LL_NETWORK) { - nm_warning ("(%s): invalid address %s received from avahi-autoipd.", + nm_log_err (LOGD_AUTOIP4, "(%s): invalid address %s received from avahi-autoipd (not link-local).", iface, address); nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_AUTOIP_ERROR); return; @@ -922,7 +1118,7 @@ nm_device_handle_autoip4_event (NMDevice *self, switch (state) { case NM_DEVICE_STATE_IP_CONFIG: if (priv->aipd_addr) { - nm_warning ("(%s): already have autoip address!", iface); + nm_log_warn (LOGD_AUTOIP4, "(%s): already have autoip address!", iface); return; } @@ -936,12 +1132,12 @@ nm_device_handle_autoip4_event (NMDevice *self, nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, reason); break; default: - nm_warning ("(%s): unexpected avahi-autoip event %s for %s.", + nm_log_warn (LOGD_AUTOIP4, "(%s): unexpected avahi-autoip event %s for %s.", iface, event, address); break; } } else { - nm_warning ("%s: autoip address %s no longer valid because '%s'.", + nm_log_warn (LOGD_AUTOIP4, "(%s): autoip address %s no longer valid because '%s'.", iface, address, event); /* The address is gone; terminate the connection or fail activation */ @@ -963,14 +1159,18 @@ aipd_watch_cb (GPid pid, gint status, gpointer user_data) iface = nm_device_get_iface (self); - if (WIFEXITED (status)) - nm_warning ("%s: avahi-autoipd exited with error code %d", iface, WEXITSTATUS (status)); - else if (WIFSTOPPED (status)) - nm_warning ("%s: avahi-autoipd stopped unexpectedly with signal %d", iface, WSTOPSIG (status)); - else if (WIFSIGNALED (status)) - nm_warning ("%s: avahi-autoipd died with signal %d", iface, WTERMSIG (status)); - else - nm_warning ("%s: avahi-autoipd died from an unknown cause", iface); + if (WIFEXITED (status)) { + nm_log_dbg (LOGD_AUTOIP4, "(%s): avahi-autoipd exited with error code %d", + iface, WEXITSTATUS (status)); + } else if (WIFSTOPPED (status)) { + nm_log_warn (LOGD_AUTOIP4, "(%s): avahi-autoipd stopped unexpectedly with signal %d", + iface, WSTOPSIG (status)); + } else if (WIFSIGNALED (status)) { + nm_log_warn (LOGD_AUTOIP4, "(%s): avahi-autoipd died with signal %d", + iface, WTERMSIG (status)); + } else { + nm_log_warn (LOGD_AUTOIP4, "(%s): avahi-autoipd died from an unknown cause", iface); + } aipd_cleanup (self); @@ -989,7 +1189,7 @@ aipd_timeout_cb (gpointer user_data) return FALSE; priv->aipd_timeout = 0; - nm_info ("%s: avahi-autoipd timed out.", nm_device_get_iface (self)); + nm_log_info (LOGD_AUTOIP4, "(%s): avahi-autoipd timed out.", nm_device_get_iface (self)); aipd_cleanup (self); if (nm_device_get_state (self) == NM_DEVICE_STATE_IP_CONFIG) @@ -1057,9 +1257,207 @@ aipd_exec (NMDevice *self, GError **error) return TRUE; } +static void +dhcp4_add_option_cb (gpointer key, gpointer value, gpointer user_data) +{ + nm_dhcp4_config_add_option (NM_DHCP4_CONFIG (user_data), + (const char *) key, + (const char *) value); +} + +static void +dhcp6_add_option_cb (gpointer key, gpointer value, gpointer user_data) +{ + nm_dhcp6_config_add_option (NM_DHCP6_CONFIG (user_data), + (const char *) key, + (const char *) value); +} + +static void +handle_dhcp_lease_change (NMDevice *device, gboolean ipv6) +{ + NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (device); + NMIP4Config *ip4_config; + NMSettingIP4Config *s_ip4; + NMIP6Config *ip6_config; + NMSettingIP6Config *s_ip6; + NMConnection *connection; + NMActRequest *req; + NMDeviceStateReason reason = NM_DEVICE_STATE_REASON_NONE; + gboolean assumed; + + req = nm_device_get_act_request (device); + g_assert (req); + connection = nm_act_request_get_connection (req); + g_assert (connection); + assumed = nm_act_request_get_assumed (req); + + if (ipv6) { + ip6_config = nm_dhcp_client_get_ip6_config (priv->dhcp6_client, FALSE); + if (!ip6_config) { + nm_log_warn (LOGD_DHCP6, "(%s): failed to get DHCPv6 config for rebind", + nm_device_get_ip_iface (device)); + nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED); + return; + } + + s_ip6 = NM_SETTING_IP6_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG)); + nm_utils_merge_ip6_config (ip6_config, s_ip6); + + g_object_set_data (G_OBJECT (req), NM_ACT_REQUEST_IP6_CONFIG, ip6_config); + + if (nm_device_set_ip6_config (device, ip6_config, assumed, &reason)) { + nm_dhcp6_config_reset (priv->dhcp6_config); + nm_dhcp_client_foreach_option (priv->dhcp6_client, + dhcp6_add_option_cb, + priv->dhcp6_config); + } else { + nm_log_warn (LOGD_DHCP6, "(%s): failed to update IPv6 config in response to DHCP event.", + nm_device_get_ip_iface (device)); + nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, reason); + } + } else { + ip4_config = nm_dhcp_client_get_ip4_config (priv->dhcp4_client, FALSE); + if (!ip4_config) { + nm_log_warn (LOGD_DHCP6, "(%s): failed to get DHCPv4 config for rebind", + nm_device_get_ip_iface (device)); + nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED); + return; + } + + s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG)); + nm_utils_merge_ip4_config (ip4_config, s_ip4); + + g_object_set_data (G_OBJECT (req), NM_ACT_REQUEST_IP4_CONFIG, ip4_config); + + if (nm_device_set_ip4_config (device, ip4_config, assumed, &reason)) { + nm_dhcp4_config_reset (priv->dhcp4_config); + nm_dhcp_client_foreach_option (priv->dhcp4_client, + dhcp4_add_option_cb, + priv->dhcp4_config); + } else { + nm_log_warn (LOGD_DHCP6, "(%s): failed to update IPv4 config in response to DHCP event.", + nm_device_get_ip_iface (device)); + nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, reason); + } + } +} + +static void +dhcp_state_changed (NMDHCPClient *client, + NMDHCPState state, + gpointer user_data) +{ + NMDevice *device = NM_DEVICE (user_data); + NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (device); + NMDeviceState dev_state; + gboolean ipv6; + + ipv6 = nm_dhcp_client_get_ipv6 (client); + dev_state = nm_device_get_state (device); + + if (ipv6) { + nm_log_dbg (LOGD_DHCP6, "(%s): new DHCPv6 client state %d", + nm_device_get_iface (device), dev_state); + } else { + nm_log_dbg (LOGD_DHCP4, "(%s): new DHCPv4 client state %d", + nm_device_get_iface (device), dev_state); + } + + switch (state) { + case DHC_BOUND4: /* lease obtained */ + case DHC_BOUND6: + case DHC_RENEW4: /* lease renewed */ + case DHC_RENEW6: /* lease renewed */ + case DHC_REBOOT: /* have valid lease, but now obtained a different one */ + case DHC_REBIND4: /* new, different lease */ + case DHC_REBIND6: /* new, different lease */ + if (dev_state == NM_DEVICE_STATE_IP_CONFIG) { + if (ipv6) + nm_device_activate_schedule_stage4_ip6_config_get (device); + else + nm_device_activate_schedule_stage4_ip4_config_get (device); + } else if (dev_state == NM_DEVICE_STATE_ACTIVATED) + handle_dhcp_lease_change (device, ipv6); + break; + case DHC_TIMEOUT: /* timed out contacting DHCP server */ + if (ipv6) { + nm_dhcp6_config_reset (priv->dhcp6_config); + if (nm_device_get_state (device) == NM_DEVICE_STATE_IP_CONFIG) + nm_device_activate_schedule_stage4_ip6_config_timeout (device); + } else { + nm_dhcp4_config_reset (priv->dhcp4_config); + if (nm_device_get_state (device) == NM_DEVICE_STATE_IP_CONFIG) + nm_device_activate_schedule_stage4_ip4_config_timeout (device); + } + break; + case DHC_END: /* dhclient exited normally */ + /* In IPv6 info-only mode, the client doesn't handle leases so it + * may exit right after getting a response from the server. That's + * normal. In that case we just ignore the exit. + */ + if (ipv6 && (priv->dhcp6_mode == IP6_DHCP_OPT_OTHERCONF)) + break; + /* Otherwise, fall through */ + case DHC_FAIL: /* all attempts to contact server timed out, sleeping */ + case DHC_ABEND: /* dhclient exited abnormally */ + if (ipv6) + nm_dhcp6_config_reset (priv->dhcp6_config); + else + nm_dhcp4_config_reset (priv->dhcp4_config); + + /* dhclient quit and can't get/renew a lease; so kill the connection */ + if (nm_device_get_state (device) == NM_DEVICE_STATE_IP_CONFIG) { + if (ipv6) + nm_device_activate_schedule_stage4_ip6_config_timeout (device); + else + nm_device_activate_schedule_stage4_ip4_config_timeout (device); + } else if (nm_device_get_state (device) == NM_DEVICE_STATE_ACTIVATED) + nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED); + break; + case DHC_STOP: + case DHC_STOP6: + case DHC_EXPIRE: + case DHC_EXPIRE6: + if (dev_state == NM_DEVICE_STATE_ACTIVATED) { + if (ipv6) + nm_dhcp6_config_reset (priv->dhcp6_config); + else + nm_dhcp4_config_reset (priv->dhcp4_config); + + /* dhclient quit and can't get/renew a lease; so kill the connection */ + nm_device_state_changed (device, + NM_DEVICE_STATE_FAILED, + NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED); + } + break; + default: + break; + } +} + +static void +dhcp_timeout (NMDHCPClient *client, gpointer user_data) +{ + NMDevice *device = NM_DEVICE (user_data); + + if (!nm_device_get_act_request (device)) + return; + + nm_dhcp_client_stop (client); + + if (nm_device_get_state (device) == NM_DEVICE_STATE_IP_CONFIG) { + if (nm_dhcp_client_get_ipv6 (client)) + nm_device_activate_schedule_stage4_ip6_config_timeout (device); + else + nm_device_activate_schedule_stage4_ip4_config_timeout (device); + } +} + static NMActStageReturn real_act_stage3_ip4_config_start (NMDevice *self, NMDeviceStateReason *reason) { + NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); NMConnection *connection; NMSettingConnection *s_con; NMSettingIP4Config *s_ip4; @@ -1089,23 +1487,34 @@ real_act_stage3_ip4_config_start (NMDevice *self, NMDeviceStateReason *reason) method = nm_setting_ip4_config_get_method (s_ip4); if (!s_ip4 || !method || !strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_AUTO)) { - NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); - gboolean success; guint8 *anycast = NULL; + /* Begin a DHCP transaction on the interface */ + if (priv->dhcp_anycast_address) anycast = priv->dhcp_anycast_address->data; - /* Begin a DHCP transaction on the interface */ - nm_device_set_use_dhcp (self, TRUE); + /* Clear old exported DHCP options */ + if (priv->dhcp4_config) + g_object_unref (priv->dhcp4_config); + priv->dhcp4_config = nm_dhcp4_config_new (); - /* DHCP manager will cancel any transaction already in progress and we do not - want to cancel this activation if we get "down" state from that. */ - g_signal_handler_block (priv->dhcp_manager, priv->dhcp_state_sigid); - success = nm_dhcp_manager_begin_transaction (priv->dhcp_manager, ip_iface, uuid, s_ip4, priv->dhcp_timeout, anycast); - g_signal_handler_unblock (priv->dhcp_manager, priv->dhcp_state_sigid); + priv->dhcp4_client = nm_dhcp_manager_start_ip4 (priv->dhcp_manager, + ip_iface, + uuid, + s_ip4, + priv->dhcp_timeout, + anycast); + if (priv->dhcp4_client) { + priv->dhcp4_state_sigid = g_signal_connect (priv->dhcp4_client, + "state-changed", + G_CALLBACK (dhcp_state_changed), + self); + priv->dhcp4_timeout_sigid = g_signal_connect (priv->dhcp4_client, + "timeout", + G_CALLBACK (dhcp_timeout), + self); - if (success) { /* DHCP devices will be notified by the DHCP manager when * stuff happens. */ @@ -1120,17 +1529,90 @@ real_act_stage3_ip4_config_start (NMDevice *self, NMDeviceStateReason *reason) /* Start avahi-autoipd */ if (aipd_exec (self, &error)) { - nm_info ("Activation (%s) Stage 3 of 5 (IP Configure Start) started" - " avahi-autoipd...", iface); + nm_log_info (LOGD_DEVICE | LOGD_AUTOIP4, + "Activation (%s) Stage 3 of 5 (IP Configure Start) started" + " avahi-autoipd...", iface); ret = NM_ACT_STAGE_RETURN_POSTPONE; } else { - nm_info ("Activation (%s) Stage 3 of 5 (IP Configure Start) failed" - " to start avahi-autoipd: %s", iface, error->message); + nm_log_info (LOGD_DEVICE | LOGD_AUTOIP4, + "Activation (%s) Stage 3 of 5 (IP Configure Start) failed" + " to start avahi-autoipd: %s", iface, error->message); g_error_free (error); aipd_cleanup (self); *reason = NM_DEVICE_STATE_REASON_AUTOIP_START_FAILED; ret = NM_ACT_STAGE_RETURN_FAILURE; } + } else if (s_ip4 && !strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED)) { + /* Nothing to do... */ + priv->ip4_ready = TRUE; + ret = NM_ACT_STAGE_RETURN_STOP; + } + + return ret; +} + +static NMActStageReturn +dhcp6_start (NMDevice *self, + NMConnection *connection, + guint32 dhcp_opt, + NMDeviceStateReason *reason) +{ + NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); + NMActStageReturn ret = NM_ACT_STAGE_RETURN_FAILURE; + guint8 *anycast = NULL; + NMSettingIP6Config *s_ip6; + NMSettingConnection *s_con; + const char *uuid; + const char *ip_iface; + + if (!connection) { + NMActRequest *req; + + req = nm_device_get_act_request (self); + g_assert (req); + connection = nm_act_request_get_connection (req); + g_assert (connection); + } + + /* Begin a DHCP transaction on the interface */ + + if (priv->dhcp_anycast_address) + anycast = priv->dhcp_anycast_address->data; + + /* Clear old exported DHCP options */ + if (priv->dhcp6_config) + g_object_unref (priv->dhcp6_config); + priv->dhcp6_config = nm_dhcp6_config_new (); + + s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION); + g_assert (s_con); + uuid = nm_setting_connection_get_uuid (s_con); + + s_ip6 = (NMSettingIP6Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG); + + ip_iface = nm_device_get_ip_iface (self); + priv->dhcp6_client = nm_dhcp_manager_start_ip6 (priv->dhcp_manager, + ip_iface, + uuid, + s_ip6, + priv->dhcp_timeout, + anycast, + (dhcp_opt == IP6_DHCP_OPT_OTHERCONF) ? TRUE : FALSE); + if (priv->dhcp6_client) { + priv->dhcp6_state_sigid = g_signal_connect (priv->dhcp6_client, + "state-changed", + G_CALLBACK (dhcp_state_changed), + self); + priv->dhcp6_timeout_sigid = g_signal_connect (priv->dhcp6_client, + "timeout", + G_CALLBACK (dhcp_timeout), + self); + + /* DHCP devices will be notified by the DHCP manager when stuff happens */ + ret = NM_ACT_STAGE_RETURN_POSTPONE; + } else { + *reason = NM_DEVICE_STATE_REASON_DHCP_START_FAILED; + ret = NM_ACT_STAGE_RETURN_FAILURE; } return ret; @@ -1140,20 +1622,59 @@ static NMActStageReturn real_act_stage3_ip6_config_start (NMDevice *self, NMDeviceStateReason *reason) { NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); - const char *ip_iface = nm_device_get_ip_iface (self); + const char *ip_iface; + NMActStageReturn ret = NM_ACT_STAGE_RETURN_FAILURE; + NMActRequest *req; + NMConnection *connection; g_return_val_if_fail (reason != NULL, NM_ACT_STAGE_RETURN_FAILURE); - /* If we are ignoring IPv6 on this interface then we can go right - * to stage 4. - */ - if (!priv->ip6_manager) - return NM_ACT_STAGE_RETURN_SUCCESS; + req = nm_device_get_act_request (self); + g_assert (req); + connection = nm_act_request_get_connection (req); + g_assert (connection); - priv->ip6_waiting_for_config = TRUE; - nm_ip6_manager_begin_addrconf (priv->ip6_manager, ip_iface); + ip_iface = nm_device_get_ip_iface (self); - return NM_ACT_STAGE_RETURN_POSTPONE; + update_accept_ra_save (self); + + priv->dhcp6_mode = IP6_DHCP_OPT_NONE; + + if ( ip6_method_matches (connection, NM_SETTING_IP6_CONFIG_METHOD_AUTO) + || ip6_method_matches (connection, NM_SETTING_IP6_CONFIG_METHOD_LINK_LOCAL)) { + if (!addrconf6_setup (self)) { + *reason = NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE; + goto out; + } + nm_ip6_manager_begin_addrconf (priv->ip6_manager, nm_device_get_ip_ifindex (self)); + ret = NM_ACT_STAGE_RETURN_POSTPONE; + } else if (ip6_method_matches (connection, NM_SETTING_IP6_CONFIG_METHOD_DHCP)) { + /* Router advertisements shouldn't be used in pure DHCP mode */ + if (priv->ip6_accept_ra_path) + nm_utils_do_sysctl (priv->ip6_accept_ra_path, "0\n"); + + priv->dhcp6_mode = IP6_DHCP_OPT_MANAGED; + ret = dhcp6_start (self, connection, priv->dhcp6_mode, reason); + } else if (ip6_method_matches (connection, NM_SETTING_IP6_CONFIG_METHOD_IGNORE)) { + /* reset the saved RA value when ipv6 is ignored */ + if (priv->ip6_accept_ra_path) { + nm_utils_do_sysctl (priv->ip6_accept_ra_path, + priv->ip6_accept_ra_save ? "1\n" : "0\n"); + } + + priv->ip6_ready = TRUE; + ret = NM_ACT_STAGE_RETURN_STOP; + } else if (ip6_method_matches (connection, NM_SETTING_IP6_CONFIG_METHOD_MANUAL)) { + /* Router advertisements shouldn't be used in manual mode */ + if (priv->ip6_accept_ra_path) + nm_utils_do_sysctl (priv->ip6_accept_ra_path, "0\n"); + ret = NM_ACT_STAGE_RETURN_SUCCESS; + } + + /* Other methods (shared) aren't implemented yet */ + +out: + return ret; } @@ -1167,7 +1688,6 @@ static gboolean nm_device_activate_stage3_ip_config_start (gpointer user_data) { NMDevice *self = NM_DEVICE (user_data); - NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); const char *iface; NMActStageReturn ret; NMDeviceStateReason reason = NM_DEVICE_STATE_REASON_NONE; @@ -1175,10 +1695,8 @@ nm_device_activate_stage3_ip_config_start (gpointer user_data) /* Clear the activation source ID now that this stage has run */ activation_source_clear (self, FALSE, 0); - priv->ip4_ready = priv->ip6_ready = FALSE; - iface = nm_device_get_iface (self); - nm_info ("Activation (%s) Stage 3 of 5 (IP Configure Start) started...", iface); + nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 3 of 5 (IP Configure Start) started...", iface); nm_device_state_changed (self, NM_DEVICE_STATE_IP_CONFIG, NM_DEVICE_STATE_REASON_NONE); ret = NM_DEVICE_GET_CLASS (self)->act_stage3_ip4_config_start (self, &reason); @@ -1187,6 +1705,8 @@ nm_device_activate_stage3_ip_config_start (gpointer user_data) else if (ret == NM_ACT_STAGE_RETURN_FAILURE) { nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, reason); goto out; + } else if (ret == NM_ACT_STAGE_RETURN_STOP) { + /* Nothing to do */ } else g_assert (ret == NM_ACT_STAGE_RETURN_POSTPONE); @@ -1196,11 +1716,13 @@ nm_device_activate_stage3_ip_config_start (gpointer user_data) else if (ret == NM_ACT_STAGE_RETURN_FAILURE) { nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, reason); goto out; + } else if (ret == NM_ACT_STAGE_RETURN_STOP) { + /* Nothing to do */ } else g_assert (ret == NM_ACT_STAGE_RETURN_POSTPONE); out: - nm_info ("Activation (%s) Stage 3 of 5 (IP Configure Start) complete.", iface); + nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 3 of 5 (IP Configure Start) complete.", iface); return FALSE; } @@ -1222,8 +1744,8 @@ nm_device_activate_schedule_stage3_ip_config_start (NMDevice *self) activation_source_schedule (self, nm_device_activate_stage3_ip_config_start, 0); - nm_info ("Activation (%s) Stage 3 of 5 (IP Configure Start) scheduled.", - nm_device_get_iface (self)); + nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 3 of 5 (IP Configure Start) scheduled.", + nm_device_get_iface (self)); } static GHashTable *shared_ips = NULL; @@ -1243,7 +1765,7 @@ reserve_shared_ip (void) while (g_hash_table_lookup (shared_ips, GUINT_TO_POINTER (start + count))) { count += ntohl (0x100); if (count > ntohl (0xFE00)) { - nm_warning ("%s: ran out of shared IP addresses!", __func__); + nm_log_err (LOGD_SHARING, "ran out of shared IP addresses!"); return 0; } } @@ -1283,14 +1805,6 @@ nm_device_new_ip4_shared_config (NMDevice *self, NMDeviceStateReason *reason) return config; } -static void -dhcp4_add_option_cb (gpointer key, gpointer value, gpointer user_data) -{ - nm_dhcp4_config_add_option (NM_DHCP4_CONFIG (user_data), - (const char *) key, - (const char *) value); -} - static NMActStageReturn real_act_stage4_get_ip4_config (NMDevice *self, NMIP4Config **config, @@ -1314,23 +1828,24 @@ real_act_stage4_get_ip4_config (NMDevice *self, s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG); - if (nm_device_get_use_dhcp (self)) { - *config = nm_dhcp_manager_get_ip4_config (priv->dhcp_manager, ip_iface); + if (priv->dhcp4_client) { + /* DHCP */ + *config = nm_dhcp_client_get_ip4_config (priv->dhcp4_client, FALSE); if (*config) { /* Merge user-defined overrides into the IP4Config to be applied */ nm_utils_merge_ip4_config (*config, s_ip4); nm_dhcp4_config_reset (priv->dhcp4_config); - nm_dhcp_manager_foreach_dhcp4_option (priv->dhcp_manager, - ip_iface, - dhcp4_add_option_cb, - priv->dhcp4_config); + nm_dhcp_client_foreach_option (priv->dhcp4_client, + dhcp4_add_option_cb, + priv->dhcp4_config); /* Notify of new DHCP4 config */ g_object_notify (G_OBJECT (self), NM_DEVICE_INTERFACE_DHCP4_CONFIG); } else *reason = NM_DEVICE_STATE_REASON_DHCP_ERROR; } else { + /* Not DHCP */ const char *method; g_assert (s_ip4); @@ -1351,7 +1866,8 @@ real_act_stage4_get_ip4_config (NMDevice *self, *config = nm_device_new_ip4_shared_config (self, reason); if (*config) priv->dnsmasq_manager = nm_dnsmasq_manager_new (ip_iface); - } + } else if (!strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED)) + ret = NM_ACT_STAGE_RETURN_SUCCESS; } if (!*config) { @@ -1382,13 +1898,14 @@ nm_device_activate_stage4_ip4_config_get (gpointer user_data) activation_source_clear (self, FALSE, AF_INET); iface = nm_device_get_iface (self); - nm_info ("Activation (%s) Stage 4 of 5 (IP4 Configure Get) started...", iface); + nm_log_info (LOGD_DEVICE | LOGD_IP4, + "Activation (%s) Stage 4 of 5 (IP4 Configure Get) started...", + iface); ret = NM_DEVICE_GET_CLASS (self)->act_stage4_get_ip4_config (self, &ip4_config, &reason); if (ret == NM_ACT_STAGE_RETURN_POSTPONE) goto out; - else if (!ip4_config || (ret == NM_ACT_STAGE_RETURN_FAILURE)) - { + else if (!ip4_config || (ret == NM_ACT_STAGE_RETURN_FAILURE)) { nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, reason); goto out; } @@ -1400,7 +1917,9 @@ nm_device_activate_stage4_ip4_config_get (gpointer user_data) nm_device_activate_schedule_stage5_ip_config_commit (self, AF_INET); out: - nm_info ("Activation (%s) Stage 4 of 5 (IP4 Configure Get) complete.", iface); + nm_log_info (LOGD_DEVICE | LOGD_IP4, + "Activation (%s) Stage 4 of 5 (IP4 Configure Get) complete.", + iface); return FALSE; } @@ -1423,8 +1942,9 @@ nm_device_activate_schedule_stage4_ip4_config_get (NMDevice *self) activation_source_schedule (self, nm_device_activate_stage4_ip4_config_get, AF_INET); - nm_info ("Activation (%s) Stage 4 of 5 (IP4 Configure Get) scheduled...", - nm_device_get_iface (self)); + nm_log_info (LOGD_DEVICE | LOGD_IP4, + "Activation (%s) Stage 4 of 5 (IP4 Configure Get) scheduled...", + nm_device_get_iface (self)); } @@ -1439,9 +1959,12 @@ real_act_stage4_ip4_config_timeout (NMDevice *self, /* Notify of invalid DHCP4 config object */ g_object_notify (G_OBJECT (self), NM_DEVICE_INTERFACE_DHCP4_CONFIG); - /* DHCP failed; connection must fail */ - *reason = NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE; - return NM_ACT_STAGE_RETURN_FAILURE; + if (nm_device_ip_config_should_fail (self, FALSE)) { + *reason = NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE; + return NM_ACT_STAGE_RETURN_FAILURE; + } + + return NM_ACT_STAGE_RETURN_SUCCESS; } @@ -1464,25 +1987,30 @@ nm_device_activate_stage4_ip4_config_timeout (gpointer user_data) activation_source_clear (self, FALSE, AF_INET); iface = nm_device_get_iface (self); - nm_info ("Activation (%s) Stage 4 of 5 (IP4 Configure Timeout) started...", iface); + nm_log_info (LOGD_DEVICE | LOGD_IP4, + "Activation (%s) Stage 4 of 5 (IP4 Configure Timeout) started...", + iface); ret = NM_DEVICE_GET_CLASS (self)->act_stage4_ip4_config_timeout (self, &ip4_config, &reason); - if (ret == NM_ACT_STAGE_RETURN_POSTPONE) { + if (ret == NM_ACT_STAGE_RETURN_POSTPONE) goto out; - } else if (!ip4_config || (ret == NM_ACT_STAGE_RETURN_FAILURE)) { + else if (ret == NM_ACT_STAGE_RETURN_FAILURE) { nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, reason); goto out; } g_assert (ret == NM_ACT_STAGE_RETURN_SUCCESS); - g_assert (ip4_config); - g_object_set_data (G_OBJECT (nm_device_get_act_request (self)), - NM_ACT_REQUEST_IP4_CONFIG, ip4_config); + if (ip4_config) { + g_object_set_data (G_OBJECT (nm_device_get_act_request (self)), + NM_ACT_REQUEST_IP4_CONFIG, ip4_config); + } nm_device_activate_schedule_stage5_ip_config_commit (self, AF_INET); out: - nm_info ("Activation (%s) Stage 4 of 5 (IP4 Configure Timeout) complete.", iface); + nm_log_info (LOGD_DEVICE | LOGD_IP4, + "Activation (%s) Stage 4 of 5 (IP4 Configure Timeout) complete.", + iface); return FALSE; } @@ -1505,8 +2033,45 @@ nm_device_activate_schedule_stage4_ip4_config_timeout (NMDevice *self) activation_source_schedule (self, nm_device_activate_stage4_ip4_config_timeout, AF_INET); - nm_info ("Activation (%s) Stage 4 of 5 (IP4 Configure Timeout) scheduled...", - nm_device_get_iface (self)); + nm_log_info (LOGD_DEVICE | LOGD_IP4, + "Activation (%s) Stage 4 of 5 (IP4 Configure Timeout) scheduled...", + nm_device_get_iface (self)); +} + +static void +merge_dhcp_config_to_master (NMIP6Config *dst, NMIP6Config *src) +{ + guint32 i; + + g_return_if_fail (src != NULL); + g_return_if_fail (dst != NULL); + + /* addresses */ + for (i = 0; i < nm_ip6_config_get_num_addresses (src); i++) + nm_ip6_config_add_address (dst, nm_ip6_config_get_address (src, i)); + + /* ptp address; only replace if src doesn't have one */ + if (!nm_ip6_config_get_ptp_address (dst)) + nm_ip6_config_set_ptp_address (dst, nm_ip6_config_get_ptp_address (src)); + + /* nameservers */ + for (i = 0; i < nm_ip6_config_get_num_nameservers (src); i++) + nm_ip6_config_add_nameserver (dst, nm_ip6_config_get_nameserver (src, i)); + + /* routes */ + for (i = 0; i < nm_ip6_config_get_num_routes (src); i++) + nm_ip6_config_add_route (dst, nm_ip6_config_get_route (src, i)); + + /* domains */ + for (i = 0; i < nm_ip6_config_get_num_domains (src); i++) + nm_ip6_config_add_domain (dst, nm_ip6_config_get_domain (src, i)); + + /* dns searches */ + for (i = 0; i < nm_ip6_config_get_num_searches (src); i++) + nm_ip6_config_add_search (dst, nm_ip6_config_get_search (src, i)); + + if (!nm_ip6_config_get_mss (dst)) + nm_ip6_config_set_mss (dst, nm_ip6_config_get_mss (src)); } static NMActStageReturn @@ -1514,11 +2079,10 @@ real_act_stage4_get_ip6_config (NMDevice *self, NMIP6Config **config, NMDeviceStateReason *reason) { - NMDevicePrivate *priv; + NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); NMConnection *connection; NMSettingIP6Config *s_ip6; const char *ip_iface; - const char *method = NULL; g_return_val_if_fail (config != NULL, NM_ACT_STAGE_RETURN_FAILURE); g_return_val_if_fail (*config == NULL, NM_ACT_STAGE_RETURN_FAILURE); @@ -1530,26 +2094,68 @@ real_act_stage4_get_ip6_config (NMDevice *self, connection = nm_act_request_get_connection (nm_device_get_act_request (self)); g_assert (connection); - s_ip6 = (NMSettingIP6Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG); - if (s_ip6) - method = nm_setting_ip6_config_get_method (s_ip6); + if ( ip6_method_matches (connection, NM_SETTING_IP6_CONFIG_METHOD_AUTO) + || ip6_method_matches (connection, NM_SETTING_IP6_CONFIG_METHOD_LINK_LOCAL)) { + *config = nm_ip6_manager_get_ip6_config (priv->ip6_manager, + nm_device_get_ip_ifindex (self)); + if (!*config) { + *reason = NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE; + goto out; + } + } else if (ip6_method_matches (connection, NM_SETTING_IP6_CONFIG_METHOD_MANUAL)) { + *config = nm_ip6_config_new (); + if (!*config) { + *reason = NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE; + goto out; + } + } else if (ip6_method_matches (connection, NM_SETTING_IP6_CONFIG_METHOD_DHCP)) + g_assert (priv->dhcp6_client); /* sanity check */ - if (!method || !strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE)) { - *config = NULL; - return NM_ACT_STAGE_RETURN_SUCCESS; - } + /* Autoconf might have triggered DHCPv6 too */ + if (priv->dhcp6_client) { + NMIP6Config *dhcp; - priv = NM_DEVICE_GET_PRIVATE (self); - *config = nm_ip6_manager_get_ip6_config (priv->ip6_manager, ip_iface); - if (!*config) { - *reason = NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE; - return NM_ACT_STAGE_RETURN_FAILURE; + dhcp = nm_dhcp_client_get_ip6_config (priv->dhcp6_client, FALSE); + if (!dhcp) { + *reason = NM_DEVICE_STATE_REASON_DHCP_ERROR; + goto out; + } + + /* For "managed" and DHCP-only setups, we use only the DHCP-supplied + * IPv6 config. But when autoconf is enabled, we have to merge the + * autoconf config and the DHCP-supplied config, then merge the + * user's overrides from the connection to get the final configuration + * that gets applied to the device. + */ + if (*config) { + /* Merge autoconf and DHCP configs */ + merge_dhcp_config_to_master (*config, dhcp); + g_object_unref (dhcp); + dhcp = NULL; + } else { + *config = dhcp; + } + + /* Copy the new DHCPv6 configuration into the DHCP config object that's + * exported over D-Bus to clients. + */ + nm_dhcp6_config_reset (priv->dhcp6_config); + nm_dhcp_client_foreach_option (priv->dhcp6_client, + dhcp6_add_option_cb, + priv->dhcp6_config); + + /* Notify of new DHCP6 config */ + g_object_notify (G_OBJECT (self), NM_DEVICE_INTERFACE_DHCP6_CONFIG); } /* Merge user-defined overrides into the IP6Config to be applied */ - nm_utils_merge_ip6_config (*config, s_ip6); + if (*config) { + s_ip6 = (NMSettingIP6Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG); + nm_utils_merge_ip6_config (*config, s_ip6); + } - return NM_ACT_STAGE_RETURN_SUCCESS; +out: + return *config ? NM_ACT_STAGE_RETURN_SUCCESS : NM_ACT_STAGE_RETURN_FAILURE; } /* @@ -1571,7 +2177,9 @@ nm_device_activate_stage4_ip6_config_get (gpointer user_data) activation_source_clear (self, FALSE, AF_INET6); iface = nm_device_get_iface (self); - nm_info ("Activation (%s) Stage 4 of 5 (IP6 Configure Get) started...", iface); + nm_log_info (LOGD_DEVICE | LOGD_IP6, + "Activation (%s) Stage 4 of 5 (IP6 Configure Get) started...", + iface); ret = NM_DEVICE_GET_CLASS (self)->act_stage4_get_ip6_config (self, &ip6_config, &reason); if (ret == NM_ACT_STAGE_RETURN_POSTPONE) @@ -1589,7 +2197,9 @@ nm_device_activate_stage4_ip6_config_get (gpointer user_data) nm_device_activate_schedule_stage5_ip_config_commit (self, AF_INET6); out: - nm_info ("Activation (%s) Stage 4 of 5 (IP6 Configure Get) complete.", iface); + nm_log_info (LOGD_DEVICE | LOGD_IP6, + "Activation (%s) Stage 4 of 5 (IP6 Configure Get) complete.", + iface); return FALSE; } @@ -1612,8 +2222,9 @@ nm_device_activate_schedule_stage4_ip6_config_get (NMDevice *self) activation_source_schedule (self, nm_device_activate_stage4_ip6_config_get, AF_INET6); - nm_info ("Activation (%s) Stage 4 of 5 (IP6 Configure Get) scheduled...", - nm_device_get_iface (self)); + nm_log_info (LOGD_DEVICE | LOGD_IP6, + "Activation (%s) Stage 4 of 5 (IP6 Configure Get) scheduled...", + nm_device_get_iface (self)); } @@ -1625,8 +2236,15 @@ real_act_stage4_ip6_config_timeout (NMDevice *self, g_return_val_if_fail (config != NULL, NM_ACT_STAGE_RETURN_FAILURE); g_return_val_if_fail (*config == NULL, NM_ACT_STAGE_RETURN_FAILURE); - *reason = NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE; - return NM_ACT_STAGE_RETURN_FAILURE; + /* Notify of invalid DHCP4 config object */ + g_object_notify (G_OBJECT (self), NM_DEVICE_INTERFACE_DHCP6_CONFIG); + + if (nm_device_ip_config_should_fail (self, TRUE)) { + *reason = NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE; + return NM_ACT_STAGE_RETURN_FAILURE; + } + + return NM_ACT_STAGE_RETURN_SUCCESS; } @@ -1649,25 +2267,30 @@ nm_device_activate_stage4_ip6_config_timeout (gpointer user_data) activation_source_clear (self, FALSE, AF_INET6); iface = nm_device_get_iface (self); - nm_info ("Activation (%s) Stage 4 of 5 (IP6 Configure Timeout) started...", iface); + nm_log_info (LOGD_DEVICE | LOGD_IP6, + "Activation (%s) Stage 4 of 5 (IP6 Configure Timeout) started...", + iface); ret = NM_DEVICE_GET_CLASS (self)->act_stage4_ip6_config_timeout (self, &ip6_config, &reason); - if (ret == NM_ACT_STAGE_RETURN_POSTPONE) { + if (ret == NM_ACT_STAGE_RETURN_POSTPONE) goto out; - } else if (ret == NM_ACT_STAGE_RETURN_FAILURE) { + else if (ret == NM_ACT_STAGE_RETURN_FAILURE) { nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, reason); goto out; } g_assert (ret == NM_ACT_STAGE_RETURN_SUCCESS); - /* FIXME g_assert (ip6_config); */ - g_object_set_data (G_OBJECT (nm_device_get_act_request (self)), - NM_ACT_REQUEST_IP6_CONFIG, ip6_config); + if (ip6_config) { + g_object_set_data (G_OBJECT (nm_device_get_act_request (self)), + NM_ACT_REQUEST_IP6_CONFIG, ip6_config); + } nm_device_activate_schedule_stage5_ip_config_commit (self, AF_INET6); out: - nm_info ("Activation (%s) Stage 4 of 5 (IP6 Configure Timeout) complete.", iface); + nm_log_info (LOGD_DEVICE | LOGD_IP6, + "Activation (%s) Stage 4 of 5 (IP6 Configure Timeout) complete.", + iface); return FALSE; } @@ -1690,8 +2313,9 @@ nm_device_activate_schedule_stage4_ip6_config_timeout (NMDevice *self) activation_source_schedule (self, nm_device_activate_stage4_ip6_config_timeout, AF_INET6); - nm_info ("Activation (%s) Stage 4 of 5 (IP6 Configure Timeout) scheduled...", - nm_device_get_iface (self)); + nm_log_info (LOGD_DEVICE | LOGD_IP6, + "Activation (%s) Stage 4 of 5 (IP6 Configure Timeout) scheduled...", + nm_device_get_iface (self)); } static void @@ -1712,14 +2336,14 @@ share_init (void) char **iter; if (!nm_utils_do_sysctl ("/proc/sys/net/ipv4/ip_forward", "1\n")) { - nm_warning ("%s: Error starting IP forwarding: (%d) %s", - __func__, errno, strerror (errno)); + nm_log_err (LOGD_SHARING, "Error starting IP forwarding: (%d) %s", + errno, strerror (errno)); return FALSE; } if (!nm_utils_do_sysctl ("/proc/sys/net/ipv4/ip_dynaddr", "1\n")) { - nm_warning ("%s: Error starting IP forwarding: (%d) %s", - __func__, errno, strerror (errno)); + nm_log_err (LOGD_SHARING, "error starting IP forwarding: (%d) %s", + errno, strerror (errno)); } for (iter = modules; *iter; iter++) { @@ -1729,9 +2353,9 @@ share_init (void) if (!g_spawn_sync ("/", argv, envp, G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, share_child_setup, NULL, NULL, NULL, &status, &error)) { - nm_info ("%s: Error loading NAT module %s: (%d) %s", - __func__, *iter, error ? error->code : 0, - (error && error->message) ? error->message : "unknown"); + nm_log_err (LOGD_SHARING, "error loading NAT module %s: (%d) %s", + *iter, error ? error->code : 0, + (error && error->message) ? error->message : "unknown"); if (error) g_error_free (error); } @@ -1805,7 +2429,7 @@ start_sharing (NMDevice *self) nm_act_request_set_shared (req, TRUE); if (!nm_dnsmasq_manager_start (priv->dnsmasq_manager, ip4_config, &error)) { - nm_warning ("(%s/%s): failed to start dnsmasq: %s", + nm_log_err (LOGD_SHARING, "(%s/%s): failed to start dnsmasq: %s", nm_device_get_iface (self), ip_iface, error->message); g_error_free (error); nm_act_request_set_shared (req, FALSE); @@ -1859,19 +2483,32 @@ nm_device_activate_stage5_ip_config_commit (gpointer user_data) activation_source_clear (self, FALSE, 0); iface = nm_device_get_iface (self); - nm_info ("Activation (%s) Stage 5 of 5 (IP Configure Commit) started...", - iface); + nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 5 of 5 (IP Configure Commit) started...", + iface); assumed = nm_act_request_get_assumed (priv->act_request); + if (!ip6_config && !ip4_config) { + nm_log_info (LOGD_DEVICE, + "Activation (%s) Stage 5 of 5 (IP Configure Commit) failed (no IP configuration found)", + iface); + nm_device_state_changed (self, + NM_DEVICE_STATE_FAILED, + NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE); + goto out; + } + if (ip4_config && !nm_device_set_ip4_config (self, ip4_config, assumed, &reason)) { nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, reason); goto out; } if (ip6_config && !nm_device_set_ip6_config (self, ip6_config, assumed, &reason)) { - nm_info ("Activation (%s) Stage 5 of 5 (IP Configure Commit) IPv6 failed", - iface); + nm_log_info (LOGD_DEVICE | LOGD_IP6, + "Activation (%s) Stage 5 of 5 (IP Configure Commit) IPv6 failed", + iface); + nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, reason); + goto out; } connection = nm_act_request_get_connection (nm_device_get_act_request (self)); @@ -1881,9 +2518,9 @@ nm_device_activate_stage5_ip_config_commit (gpointer user_data) if (s_ip4) method = nm_setting_ip4_config_get_method (s_ip4); - if (s_ip4 && !strcmp (method, "shared")) { + if (s_ip4 && !strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_SHARED)) { if (!start_sharing (self)) { - nm_warning ("Activation (%s) Stage 5 of 5 (IP Configure Commit) start sharing failed.", iface); + nm_log_warn (LOGD_SHARING, "Activation (%s) Stage 5 of 5 (IP Configure Commit) start sharing failed.", iface); nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_SHARED_START_FAILED); goto out; } @@ -1893,8 +2530,8 @@ nm_device_activate_stage5_ip_config_commit (gpointer user_data) nm_device_state_changed (self, NM_DEVICE_STATE_ACTIVATED, NM_DEVICE_STATE_REASON_NONE); out: - nm_info ("Activation (%s) Stage 5 of 5 (IP Configure Commit) complete.", - iface); + nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 5 of 5 (IP Configure Commit) complete.", + iface); /* Balance IP config creation; device takes ownership in set_ip*_config() */ if (ip4_config) @@ -1936,8 +2573,9 @@ nm_device_activate_schedule_stage5_ip_config_commit (NMDevice *self, int family) activation_source_schedule (self, nm_device_activate_stage5_ip_config_commit, 0); - nm_info ("Activation (%s) Stage 5 of 5 (IP Configure Commit) scheduled...", - nm_device_get_iface (self)); + nm_log_info (LOGD_DEVICE, + "Activation (%s) Stage 5 of 5 (IP Configure Commit) scheduled...", + nm_device_get_iface (self)); } @@ -1977,15 +2615,100 @@ delayed_transitions_clear (NMDevice *self) NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); if (priv->failed_to_disconnected_id) { + nm_log_dbg (LOGD_DEVICE, "(%s): clearing failed->disconnected transition", + nm_device_get_iface (self)); g_source_remove (priv->failed_to_disconnected_id); priv->failed_to_disconnected_id = 0; } if (priv->unavailable_to_disconnected_id) { + nm_log_dbg (LOGD_DEVICE, "(%s): clearing unavailable->disconnected transition", + nm_device_get_iface (self)); g_source_remove (priv->unavailable_to_disconnected_id); priv->unavailable_to_disconnected_id = 0; } } +static void +dhcp4_cleanup (NMDevice *self, gboolean stop) +{ + NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); + + if (priv->dhcp4_config) { + g_object_notify (G_OBJECT (self), NM_DEVICE_INTERFACE_DHCP4_CONFIG); + g_object_unref (priv->dhcp4_config); + priv->dhcp4_config = NULL; + } + + if (priv->dhcp4_client) { + /* Stop any ongoing DHCP transaction on this device */ + if (priv->dhcp4_state_sigid) { + g_signal_handler_disconnect (priv->dhcp4_client, priv->dhcp4_state_sigid); + priv->dhcp4_state_sigid = 0; + } + + if (priv->dhcp4_timeout_sigid) { + g_signal_handler_disconnect (priv->dhcp4_client, priv->dhcp4_timeout_sigid); + priv->dhcp4_timeout_sigid = 0; + } + + if (stop) + nm_dhcp_client_stop (priv->dhcp4_client); + + g_object_unref (priv->dhcp4_client); + priv->dhcp4_client = NULL; + } +} + +static void +dhcp6_cleanup (NMDevice *self, gboolean stop) +{ + NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); + + priv->dhcp6_mode = IP6_DHCP_OPT_NONE; + + if (priv->dhcp6_config) { + g_object_notify (G_OBJECT (self), NM_DEVICE_INTERFACE_DHCP6_CONFIG); + g_object_unref (priv->dhcp6_config); + priv->dhcp6_config = NULL; + } + + if (priv->dhcp6_client) { + if (priv->dhcp6_state_sigid) { + g_signal_handler_disconnect (priv->dhcp6_client, priv->dhcp6_state_sigid); + priv->dhcp6_state_sigid = 0; + } + + if (priv->dhcp6_timeout_sigid) { + g_signal_handler_disconnect (priv->dhcp6_client, priv->dhcp6_timeout_sigid); + priv->dhcp6_timeout_sigid = 0; + } + + if (stop) + nm_dhcp_client_stop (priv->dhcp6_client); + + g_object_unref (priv->dhcp6_client); + priv->dhcp6_client = NULL; + } +} + +static void +dnsmasq_cleanup (NMDevice *self) +{ + NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); + + if (!priv->dnsmasq_manager) + return; + + if (priv->dnsmasq_state_id) { + g_signal_handler_disconnect (priv->dnsmasq_manager, priv->dnsmasq_state_id); + priv->dnsmasq_state_id = 0; + } + + nm_dnsmasq_manager_stop (priv->dnsmasq_manager); + g_object_unref (priv->dnsmasq_manager); + priv->dnsmasq_manager = NULL; +} + /* * nm_device_deactivate_quickly * @@ -2010,27 +2733,15 @@ nm_device_deactivate_quickly (NMDevice *self) /* Clear any delayed transitions */ delayed_transitions_clear (self); - /* Stop any ongoing DHCP transaction on this device */ - if (nm_device_get_act_request (self)) { - if (nm_device_get_use_dhcp (self)) { - nm_dhcp_manager_cancel_transaction (priv->dhcp_manager, nm_device_get_ip_iface (self)); - nm_device_set_use_dhcp (self, FALSE); - /* Notify of invalid DHCP4 config */ - g_object_notify (G_OBJECT (self), NM_DEVICE_INTERFACE_DHCP4_CONFIG); - } else if (priv->dnsmasq_manager) { - if (priv->dnsmasq_state_id) { - g_signal_handler_disconnect (priv->dnsmasq_manager, priv->dnsmasq_state_id); - priv->dnsmasq_state_id = 0; - } - - nm_dnsmasq_manager_stop (priv->dnsmasq_manager); - g_object_unref (priv->dnsmasq_manager); - priv->dnsmasq_manager = NULL; - } - } - + dhcp4_cleanup (self, TRUE); + dhcp6_cleanup (self, TRUE); + addrconf6_cleanup (self); + dnsmasq_cleanup (self); aipd_cleanup (self); - nm_device_cleanup_ip6 (self); + + /* Turn off router advertisements until they are needed */ + if (priv->ip6_accept_ra_path) + nm_utils_do_sysctl (priv->ip6_accept_ra_path, "0\n"); /* Call device type-specific deactivation */ if (NM_DEVICE_GET_CLASS (self)->deactivate_quickly) @@ -2056,14 +2767,13 @@ nm_device_deactivate (NMDeviceInterface *device, NMDeviceStateReason reason) g_return_if_fail (self != NULL); - nm_info ("(%s): deactivating device (reason: %d).", - nm_device_get_iface (self), - reason); + nm_log_info (LOGD_DEVICE, "(%s): deactivating device (reason: %d).", + nm_device_get_iface (self), reason); nm_device_deactivate_quickly (self); /* Take out any entries in the routing table and any IP address the device had. */ - nm_system_device_flush_routes (self); + nm_system_device_flush_routes (self, nm_device_get_ip6_config (self) ? AF_UNSPEC : AF_INET); nm_system_device_flush_addresses (self); nm_device_update_ip4_address (self); @@ -2246,193 +2956,20 @@ nm_device_can_interrupt_activation (NMDevice *self) /* IP Configuration stuff */ -static void -handle_dhcp_lease_change (NMDevice *device) -{ - NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (device); - NMIP4Config *config; - NMSettingIP4Config *s_ip4; - NMConnection *connection; - NMActRequest *req; - NMDeviceStateReason reason = NM_DEVICE_STATE_REASON_NONE; - const char *ip_iface; - gboolean assumed; - - if (!nm_device_get_use_dhcp (device)) { - nm_warning ("got DHCP rebind for device that wasn't using DHCP."); - return; - } - - ip_iface = nm_device_get_ip_iface (device); - - config = nm_dhcp_manager_get_ip4_config (priv->dhcp_manager, ip_iface); - if (!config) { - nm_warning ("failed to get DHCP config for rebind"); - nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED); - return; - } - - req = nm_device_get_act_request (device); - g_assert (req); - connection = nm_act_request_get_connection (req); - g_assert (connection); - - s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG)); - nm_utils_merge_ip4_config (config, s_ip4); - - g_object_set_data (G_OBJECT (req), NM_ACT_REQUEST_IP4_CONFIG, config); - - assumed = nm_act_request_get_assumed (req); - if (nm_device_set_ip4_config (device, config, assumed, &reason)) { - nm_dhcp4_config_reset (priv->dhcp4_config); - nm_dhcp_manager_foreach_dhcp4_option (priv->dhcp_manager, - ip_iface, - dhcp4_add_option_cb, - priv->dhcp4_config); - } else { - nm_warning ("Failed to update IP4 config in response to DHCP event."); - nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, reason); - } -} - -static void -dhcp_state_changed (NMDHCPManager *dhcp_manager, - const char *iface, - NMDHCPState state, - gpointer user_data) -{ - NMDevice *device = NM_DEVICE (user_data); - NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (device); - NMDeviceState dev_state; - - if (strcmp (nm_device_get_ip_iface (device), iface) != 0) - return; - - if (!nm_device_get_act_request (device)) - return; - - dev_state = nm_device_get_state (device); - - switch (state) { - case DHC_BOUND: /* lease obtained */ - case DHC_RENEW: /* lease renewed */ - case DHC_REBOOT: /* have valid lease, but now obtained a different one */ - case DHC_REBIND: /* new, different lease */ - if (dev_state == NM_DEVICE_STATE_IP_CONFIG) - nm_device_activate_schedule_stage4_ip4_config_get (device); - else if (dev_state == NM_DEVICE_STATE_ACTIVATED) - handle_dhcp_lease_change (device); - break; - case DHC_TIMEOUT: /* timed out contacting DHCP server */ - nm_dhcp4_config_reset (priv->dhcp4_config); - - if (nm_device_get_state (device) == NM_DEVICE_STATE_IP_CONFIG) - nm_device_activate_schedule_stage4_ip4_config_timeout (device); - break; - case DHC_FAIL: /* all attempts to contact server timed out, sleeping */ - case DHC_ABEND: /* dhclient exited abnormally */ - case DHC_END: /* dhclient exited normally */ - nm_dhcp4_config_reset (priv->dhcp4_config); - - if (nm_device_get_state (device) == NM_DEVICE_STATE_IP_CONFIG) { - nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_DHCP_FAILED); - } else if (nm_device_get_state (device) == NM_DEVICE_STATE_ACTIVATED) { - if (nm_device_get_use_dhcp (device)) { - /* dhclient quit and therefore can't renew our lease, kill the conneciton */ - nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED); - } - } - break; - default: - break; - } -} - -static void -dhcp_timeout (NMDHCPManager *dhcp_manager, - const char *iface, - gpointer user_data) -{ - NMDevice * device = NM_DEVICE (user_data); - - if (strcmp (nm_device_get_ip_iface (device), iface) != 0) - return; - - if (nm_device_get_state (device) == NM_DEVICE_STATE_IP_CONFIG) - nm_device_activate_schedule_stage4_ip4_config_timeout (device); -} - -gboolean -nm_device_get_use_dhcp (NMDevice *self) -{ - g_return_val_if_fail (NM_IS_DEVICE (self), FALSE); - - return NM_DEVICE_GET_PRIVATE (self)->dhcp_manager ? TRUE : FALSE; -} - -void -nm_device_set_use_dhcp (NMDevice *self, - gboolean use_dhcp) -{ - NMDevicePrivate *priv; - - g_return_if_fail (NM_IS_DEVICE (self)); - - priv = NM_DEVICE_GET_PRIVATE (self); - - if (use_dhcp) { - /* New exported DHCP4 config */ - if (priv->dhcp4_config) - g_object_unref (priv->dhcp4_config); - priv->dhcp4_config = nm_dhcp4_config_new (); - - if (!priv->dhcp_manager) { - priv->dhcp_manager = nm_dhcp_manager_get (); - priv->dhcp_state_sigid = g_signal_connect (priv->dhcp_manager, - "state-changed", - G_CALLBACK (dhcp_state_changed), - self); - priv->dhcp_timeout_sigid = g_signal_connect (priv->dhcp_manager, - "timeout", - G_CALLBACK (dhcp_timeout), - self); - } - } else { - if (priv->dhcp4_config) { - g_object_notify (G_OBJECT (self), NM_DEVICE_INTERFACE_DHCP4_CONFIG); - g_object_unref (priv->dhcp4_config); - priv->dhcp4_config = NULL; - } - - if (priv->dhcp_manager) { - g_signal_handler_disconnect (priv->dhcp_manager, priv->dhcp_state_sigid); - priv->dhcp_state_sigid = 0; - g_signal_handler_disconnect (priv->dhcp_manager, priv->dhcp_timeout_sigid); - priv->dhcp_timeout_sigid = 0; - g_object_unref (priv->dhcp_manager); - priv->dhcp_manager = NULL; - } - } -} - NMDHCP4Config * nm_device_get_dhcp4_config (NMDevice *self) { - NMDevicePrivate *priv; + g_return_val_if_fail (self != NULL, NULL); + g_return_val_if_fail (NM_IS_DEVICE (self), NULL); - g_return_val_if_fail (NM_IS_DEVICE (self), FALSE); - - priv = NM_DEVICE_GET_PRIVATE (self); - - if (priv->dhcp_manager) - return priv->dhcp4_config; - return NULL; + return NM_DEVICE_GET_PRIVATE (self)->dhcp4_config; } NMIP4Config * nm_device_get_ip4_config (NMDevice *self) { g_return_val_if_fail (self != NULL, NULL); + g_return_val_if_fail (NM_IS_DEVICE (self), NULL); return NM_DEVICE_GET_PRIVATE (self)->ip4_config; } @@ -2527,7 +3064,7 @@ nm_device_update_ip4_address (NMDevice *self) fd = socket (PF_INET, SOCK_DGRAM, 0); if (fd < 0) { - nm_warning ("couldn't open control socket."); + nm_log_err (LOGD_IP4, "couldn't open control socket."); return; } @@ -2602,10 +3139,20 @@ nm_device_set_ip6_config (NMDevice *self, return success; } +NMDHCP6Config * +nm_device_get_dhcp6_config (NMDevice *self) +{ + g_return_val_if_fail (self != NULL, NULL); + g_return_val_if_fail (NM_IS_DEVICE (self), NULL); + + return NM_DEVICE_GET_PRIVATE (self)->dhcp6_config; +} + NMIP6Config * nm_device_get_ip6_config (NMDevice *self) { g_return_val_if_fail (self != NULL, NULL); + g_return_val_if_fail (NM_IS_DEVICE (self), NULL); return NM_DEVICE_GET_PRIVATE (self)->ip6_config; } @@ -2632,7 +3179,7 @@ nm_device_hw_bring_up (NMDevice *self, gboolean block, gboolean *no_firmware) if (nm_device_hw_is_up (self)) goto out; - nm_info ("(%s): bringing up device.", nm_device_get_iface (self)); + nm_log_info (LOGD_HW, "(%s): bringing up device.", nm_device_get_iface (self)); if (NM_DEVICE_GET_CLASS (self)->hw_bring_up) { success = NM_DEVICE_GET_CLASS (self)->hw_bring_up (self, no_firmware); @@ -2645,7 +3192,7 @@ nm_device_hw_bring_up (NMDevice *self, gboolean block, gboolean *no_firmware) g_usleep (200); if (!nm_device_hw_is_up (self)) { - nm_warning ("(%s): device not up after timeout!", nm_device_get_iface (self)); + nm_log_warn (LOGD_HW, "(%s): device not up after timeout!", nm_device_get_iface (self)); return FALSE; } @@ -2668,7 +3215,7 @@ nm_device_hw_take_down (NMDevice *self, gboolean block) if (!nm_device_hw_is_up (self)) return; - nm_info ("(%s): taking down device.", nm_device_get_iface (self)); + nm_log_info (LOGD_HW, "(%s): taking down device.", nm_device_get_iface (self)); if (NM_DEVICE_GET_CLASS (self)->hw_take_down) NM_DEVICE_GET_CLASS (self)->hw_take_down (self); @@ -2691,7 +3238,7 @@ nm_device_bring_up (NMDevice *self, gboolean block, gboolean *no_firmware) if (nm_device_is_up (self)) return TRUE; - nm_info ("(%s): preparing device.", nm_device_get_iface (self)); + nm_log_info (LOGD_HW, "(%s): preparing device.", nm_device_get_iface (self)); if (NM_DEVICE_GET_CLASS (self)->bring_up) success = NM_DEVICE_GET_CLASS (self)->bring_up (self); @@ -2708,7 +3255,7 @@ nm_device_take_down (NMDevice *self, gboolean block, NMDeviceStateReason reason) nm_device_interface_deactivate (NM_DEVICE_INTERFACE (self), reason); if (nm_device_is_up (self)) { - nm_info ("(%s): cleaning up...", nm_device_get_iface (self)); + nm_log_info (LOGD_HW, "(%s): cleaning up...", nm_device_get_iface (self)); if (NM_DEVICE_GET_CLASS (self)->take_down) NM_DEVICE_GET_CLASS (self)->take_down (self); @@ -2761,6 +3308,20 @@ dispose (GObject *object) /* Clear any delayed transitions */ delayed_transitions_clear (self); + /* Clean up and stop DHCP */ + dhcp4_cleanup (self, take_down); + dhcp6_cleanup (self, take_down); + addrconf6_cleanup (self); + dnsmasq_cleanup (self); + + /* reset the saved RA value */ + if (priv->ip6_accept_ra_path) { + nm_utils_do_sysctl (priv->ip6_accept_ra_path, + priv->ip6_accept_ra_save ? "1\n" : "0\n"); + } + g_free (priv->ip6_accept_ra_path); + + /* Take the device itself down and clear its IPv4 configuration */ if (priv->managed && take_down) { NMDeviceStateReason ignored = NM_DEVICE_STATE_REASON_NONE; @@ -2768,26 +3329,10 @@ dispose (GObject *object) nm_device_set_ip4_config (self, NULL, FALSE, &ignored); } - clear_act_request (self); - activation_source_clear (self, TRUE, AF_INET); activation_source_clear (self, TRUE, AF_INET6); - if (!take_down) { - nm_device_set_use_dhcp (self, FALSE); - nm_device_cleanup_ip6 (self); - } - - if (priv->dnsmasq_manager) { - if (priv->dnsmasq_state_id) { - g_signal_handler_disconnect (priv->dnsmasq_manager, priv->dnsmasq_state_id); - priv->dnsmasq_state_id = 0; - } - - nm_dnsmasq_manager_stop (priv->dnsmasq_manager); - g_object_unref (priv->dnsmasq_manager); - priv->dnsmasq_manager = NULL; - } + clear_act_request (self); out: G_OBJECT_CLASS (nm_device_parent_class)->dispose (object); @@ -2799,6 +3344,8 @@ finalize (GObject *object) NMDevice *self = NM_DEVICE (object); NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); + g_object_unref (priv->dhcp_manager); + g_free (priv->udi); g_free (priv->iface); g_free (priv->ip_iface); @@ -2824,7 +3371,14 @@ set_property (GObject *object, guint prop_id, break; case NM_DEVICE_INTERFACE_PROP_IFACE: g_free (priv->iface); + priv->ifindex = 0; priv->iface = g_value_dup_string (value); + if (priv->iface) { + priv->ifindex = nm_netlink_iface_to_index (priv->iface); + if (priv->ifindex < 0) { + nm_log_warn (LOGD_HW, "(%s): failed to look up interface index", priv->iface); + } + } break; case NM_DEVICE_INTERFACE_PROP_DRIVER: priv->driver = g_strdup (g_value_get_string (value)); @@ -2846,6 +3400,9 @@ set_property (GObject *object, guint prop_id, g_free (priv->type_desc); priv->type_desc = g_value_dup_string (value); break; + case NM_DEVICE_INTERFACE_PROP_RFKILL_TYPE: + priv->rfkill_type = g_value_get_uint (value); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -2869,6 +3426,9 @@ get_property (GObject *object, guint prop_id, case NM_DEVICE_INTERFACE_PROP_IFACE: g_value_set_string (value, priv->iface); break; + case NM_DEVICE_INTERFACE_PROP_IFINDEX: + g_value_set_int (value, priv->ifindex); + break; case NM_DEVICE_INTERFACE_PROP_DRIVER: g_value_set_string (value, priv->driver); break; @@ -2889,7 +3449,7 @@ get_property (GObject *object, guint prop_id, break; case NM_DEVICE_INTERFACE_PROP_DHCP4_CONFIG: if ( ((state == NM_DEVICE_STATE_ACTIVATED) || (state == NM_DEVICE_STATE_IP_CONFIG)) - && nm_device_get_use_dhcp (self)) + && priv->dhcp4_client) g_value_set_boxed (value, nm_dhcp4_config_get_dbus_path (priv->dhcp4_config)); else g_value_set_boxed (value, "/"); @@ -2903,6 +3463,13 @@ get_property (GObject *object, guint prop_id, } g_value_set_boxed (value, "/"); break; + case NM_DEVICE_INTERFACE_PROP_DHCP6_CONFIG: + if ( ((state == NM_DEVICE_STATE_ACTIVATED) || (state == NM_DEVICE_STATE_IP_CONFIG)) + && priv->dhcp6_client) + g_value_set_boxed (value, nm_dhcp6_config_get_dbus_path (priv->dhcp6_config)); + else + g_value_set_boxed (value, "/"); + break; case NM_DEVICE_INTERFACE_PROP_STATE: g_value_set_uint (value, priv->state); break; @@ -2915,6 +3482,9 @@ get_property (GObject *object, guint prop_id, case NM_DEVICE_INTERFACE_PROP_TYPE_DESC: g_value_set_string (value, priv->type_desc); break; + case NM_DEVICE_INTERFACE_PROP_RFKILL_TYPE: + g_value_set_uint (value, priv->rfkill_type); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -2957,6 +3527,10 @@ nm_device_class_init (NMDeviceClass *klass) NM_DEVICE_INTERFACE_PROP_IFACE, NM_DEVICE_INTERFACE_IFACE); + g_object_class_override_property (object_class, + NM_DEVICE_INTERFACE_PROP_IFINDEX, + NM_DEVICE_INTERFACE_IFINDEX); + g_object_class_override_property (object_class, NM_DEVICE_INTERFACE_PROP_DRIVER, NM_DEVICE_INTERFACE_DRIVER); @@ -2981,6 +3555,10 @@ nm_device_class_init (NMDeviceClass *klass) NM_DEVICE_INTERFACE_PROP_IP6_CONFIG, NM_DEVICE_INTERFACE_IP6_CONFIG); + g_object_class_override_property (object_class, + NM_DEVICE_INTERFACE_PROP_DHCP6_CONFIG, + NM_DEVICE_INTERFACE_DHCP6_CONFIG); + g_object_class_override_property (object_class, NM_DEVICE_INTERFACE_PROP_STATE, NM_DEVICE_INTERFACE_STATE); @@ -2997,6 +3575,10 @@ nm_device_class_init (NMDeviceClass *klass) NM_DEVICE_INTERFACE_PROP_TYPE_DESC, NM_DEVICE_INTERFACE_TYPE_DESC); + g_object_class_override_property (object_class, + NM_DEVICE_INTERFACE_PROP_RFKILL_TYPE, + NM_DEVICE_INTERFACE_RFKILL_TYPE); + signals[AUTOCONNECT_ALLOWED] = g_signal_new ("autoconnect-allowed", G_OBJECT_CLASS_TYPE (object_class), @@ -3013,6 +3595,8 @@ failed_to_disconnected (gpointer user_data) NMDevice *self = NM_DEVICE (user_data); NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); + nm_log_dbg (LOGD_DEVICE, "(%s): running failed->disconnected transition", + nm_device_get_iface (self)); priv->failed_to_disconnected_id = 0; nm_device_state_changed (self, NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_REASON_NONE); return FALSE; @@ -3024,6 +3608,8 @@ unavailable_to_disconnected (gpointer user_data) NMDevice *self = NM_DEVICE (user_data); NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); + nm_log_dbg (LOGD_DEVICE, "(%s): running unavailable->disconnected transition", + nm_device_get_iface (self)); priv->unavailable_to_disconnected_id = 0; nm_device_state_changed (self, NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_REASON_NONE); return FALSE; @@ -3047,8 +3633,8 @@ nm_device_state_changed (NMDevice *device, old_state = priv->state; priv->state = state; - nm_info ("(%s): device state change: %d -> %d (reason %d)", - nm_device_get_iface (device), old_state, state, reason); + nm_log_info (LOGD_DEVICE, "(%s): device state change: %d -> %d (reason %d)", + nm_device_get_iface (device), old_state, state, reason); /* Clear any delayed transitions */ delayed_transitions_clear (device); @@ -3066,8 +3652,9 @@ nm_device_state_changed (NMDevice *device, break; case NM_DEVICE_STATE_UNAVAILABLE: if (old_state == NM_DEVICE_STATE_UNMANAGED) { - if (!nm_device_bring_up (device, TRUE, &no_firmware) && no_firmware) - nm_warning ("%s: firmware may be missing.", nm_device_get_iface (device)); + if (!nm_device_bring_up (device, TRUE, &no_firmware) && no_firmware) { + nm_log_warn (LOGD_HW, "%s: firmware may be missing.", nm_device_get_iface (device)); + } } /* Ensure the device gets deactivated in response to stuff like * carrier changes or rfkill. But don't deactivate devices that are @@ -3099,15 +3686,22 @@ nm_device_state_changed (NMDevice *device, * we can't change states again from the state handler for a variety of * reasons. */ - if (nm_device_is_available (device)) + if (nm_device_is_available (device)) { + nm_log_dbg (LOGD_DEVICE, "(%s): device is available, will transition to DISCONNECTED", + nm_device_get_iface (device)); priv->unavailable_to_disconnected_id = g_idle_add (unavailable_to_disconnected, device); + } else { + nm_log_dbg (LOGD_DEVICE, "(%s): device not yet available for transition to DISCONNECTED", + nm_device_get_iface (device)); + } break; case NM_DEVICE_STATE_ACTIVATED: - nm_info ("Activation (%s) successful, device activated.", nm_device_get_iface (device)); + nm_log_info (LOGD_DEVICE, "Activation (%s) successful, device activated.", + nm_device_get_iface (device)); nm_utils_call_dispatcher ("up", nm_act_request_get_connection (req), device, NULL); break; case NM_DEVICE_STATE_FAILED: - nm_info ("Activation (%s) failed.", nm_device_get_iface (device)); + nm_log_warn (LOGD_DEVICE, "Activation (%s) failed.", nm_device_get_iface (device)); /* Schedule the transition to DISCONNECTED. The device can't transition * immediately becuase we can't change states again from the state * handler for a variety of reasons. @@ -3156,7 +3750,9 @@ nm_device_set_managed (NMDevice *device, return; priv->managed = managed; - nm_info ("(%s): now %s", nm_device_get_iface (device), managed ? "managed" : "unmanaged"); + nm_log_info (LOGD_DEVICE, "(%s): now %s", + nm_device_get_iface (device), + managed ? "managed" : "unmanaged"); g_object_notify (G_OBJECT (device), NM_DEVICE_INTERFACE_MANAGED); diff --git a/src/nm-device.h b/src/nm-device.h index b81c460d6e..202f392413 100644 --- a/src/nm-device.h +++ b/src/nm-device.h @@ -31,13 +31,15 @@ #include "nm-ip4-config.h" #include "nm-ip6-config.h" #include "nm-dhcp4-config.h" +#include "nm-dhcp6-config.h" #include "nm-connection.h" typedef enum NMActStageReturn { NM_ACT_STAGE_RETURN_FAILURE = 0, NM_ACT_STAGE_RETURN_SUCCESS, - NM_ACT_STAGE_RETURN_POSTPONE + NM_ACT_STAGE_RETURN_POSTPONE, + NM_ACT_STAGE_RETURN_STOP /* This activation chain is done */ } NMActStageReturn; @@ -127,7 +129,9 @@ void nm_device_set_path (NMDevice *dev, const char *path); const char * nm_device_get_udi (NMDevice *dev); const char * nm_device_get_iface (NMDevice *dev); +int nm_device_get_ifindex (NMDevice *dev); const char * nm_device_get_ip_iface (NMDevice *dev); +int nm_device_get_ip_ifindex(NMDevice *dev); const char * nm_device_get_driver (NMDevice *dev); const char * nm_device_get_type_desc (NMDevice *dev); @@ -140,10 +144,8 @@ int nm_device_get_priority (NMDevice *dev); guint32 nm_device_get_ip4_address (NMDevice *dev); void nm_device_update_ip4_address (NMDevice *dev); -gboolean nm_device_get_use_dhcp (NMDevice *dev); -void nm_device_set_use_dhcp (NMDevice *dev, - gboolean use_dhcp); NMDHCP4Config * nm_device_get_dhcp4_config (NMDevice *dev); +NMDHCP6Config * nm_device_get_dhcp6_config (NMDevice *dev); NMIP4Config * nm_device_get_ip4_config (NMDevice *dev); NMIP6Config * nm_device_get_ip6_config (NMDevice *dev); diff --git a/src/nm-dhcp6-config.c b/src/nm-dhcp6-config.c new file mode 100644 index 0000000000..fb6ccce50a --- /dev/null +++ b/src/nm-dhcp6-config.c @@ -0,0 +1,192 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager -- Network link manager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2008 Red Hat, Inc. + */ + +#include +#include + +#include "NetworkManager.h" +#include "nm-dbus-manager.h" +#include "nm-dhcp6-config.h" +#include "nm-dhcp6-config-glue.h" +#include "nm-dbus-glib-types.h" +#include "nm-properties-changed-signal.h" +#include "nm-utils.h" + + +G_DEFINE_TYPE (NMDHCP6Config, nm_dhcp6_config, G_TYPE_OBJECT) + +#define NM_DHCP6_CONFIG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DHCP6_CONFIG, NMDHCP6ConfigPrivate)) + +typedef struct { + char *dbus_path; + GHashTable *options; +} NMDHCP6ConfigPrivate; + + +enum { + PROP_0, + PROP_OPTIONS, + + LAST_PROP +}; + +enum { + PROPERTIES_CHANGED, + + LAST_SIGNAL +}; + +static guint signals[LAST_SIGNAL] = { 0 }; + + +NMDHCP6Config * +nm_dhcp6_config_new (void) +{ + return NM_DHCP6_CONFIG (g_object_new (NM_TYPE_DHCP6_CONFIG, NULL)); +} + +void +nm_dhcp6_config_add_option (NMDHCP6Config *self, + const char *key, + const char *option) +{ + GValue *svalue; + + g_return_if_fail (NM_IS_DHCP6_CONFIG (self)); + g_return_if_fail (key != NULL); + g_return_if_fail (option != NULL); + + svalue = g_slice_new0 (GValue); + g_value_init (svalue, G_TYPE_STRING); + g_value_set_string (svalue, option); + g_hash_table_insert (NM_DHCP6_CONFIG_GET_PRIVATE (self)->options, g_strdup (key), svalue); + g_object_notify (G_OBJECT (self), NM_DHCP6_CONFIG_OPTIONS); +} + +void +nm_dhcp6_config_reset (NMDHCP6Config *self) +{ + g_return_if_fail (NM_IS_DHCP6_CONFIG (self)); + + g_hash_table_remove_all (NM_DHCP6_CONFIG_GET_PRIVATE (self)->options); + g_object_notify (G_OBJECT (self), NM_DHCP6_CONFIG_OPTIONS); +} + +const char * +nm_dhcp6_config_get_option (NMDHCP6Config *self, const char *key) +{ + GValue *value; + + g_return_val_if_fail (NM_IS_DHCP6_CONFIG (self), NULL); + g_return_val_if_fail (key != NULL, NULL); + + value = g_hash_table_lookup (NM_DHCP6_CONFIG_GET_PRIVATE (self)->options, key); + return value ? g_value_get_string (value) : NULL; +} + +const char * +nm_dhcp6_config_get_dbus_path (NMDHCP6Config *self) +{ + g_return_val_if_fail (NM_IS_DHCP6_CONFIG (self), NULL); + + return NM_DHCP6_CONFIG_GET_PRIVATE (self)->dbus_path; +} + +static void +nm_gvalue_destroy (gpointer data) +{ + GValue *value = (GValue *) data; + + g_value_unset (value); + g_slice_free (GValue, value); +} + +static void +nm_dhcp6_config_init (NMDHCP6Config *self) +{ + NMDHCP6ConfigPrivate *priv = NM_DHCP6_CONFIG_GET_PRIVATE (self); + static guint32 counter = 0; + DBusGConnection *connection; + NMDBusManager *dbus_mgr; + + dbus_mgr = nm_dbus_manager_get (); + connection = nm_dbus_manager_get_connection (dbus_mgr); + priv->dbus_path = g_strdup_printf (NM_DBUS_PATH "/DHCP6Config/%d", counter++); + dbus_g_connection_register_g_object (connection, priv->dbus_path, G_OBJECT (self)); + g_object_unref (dbus_mgr); + + priv->options = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, nm_gvalue_destroy); +} + +static void +finalize (GObject *object) +{ + NMDHCP6ConfigPrivate *priv = NM_DHCP6_CONFIG_GET_PRIVATE (object); + + g_free (priv->dbus_path); + g_hash_table_destroy (priv->options); + + G_OBJECT_CLASS (nm_dhcp6_config_parent_class)->finalize (object); +} + +static void +get_property (GObject *object, guint prop_id, + GValue *value, GParamSpec *pspec) +{ + NMDHCP6ConfigPrivate *priv = NM_DHCP6_CONFIG_GET_PRIVATE (object); + + switch (prop_id) { + case PROP_OPTIONS: + g_value_set_boxed (value, priv->options); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +nm_dhcp6_config_class_init (NMDHCP6ConfigClass *config_class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (config_class); + + g_type_class_add_private (config_class, sizeof (NMDHCP6ConfigPrivate)); + + /* virtual methods */ + object_class->get_property = get_property; + object_class->finalize = finalize; + + /* properties */ + g_object_class_install_property + (object_class, PROP_OPTIONS, + g_param_spec_boxed (NM_DHCP6_CONFIG_OPTIONS, + "Options", + "DHCP configuration options returned by the server", + DBUS_TYPE_G_MAP_OF_VARIANT, + G_PARAM_READABLE)); + + /* Signals */ + signals[PROPERTIES_CHANGED] = + nm_properties_changed_signal_new (object_class, + G_STRUCT_OFFSET (NMDHCP6ConfigClass, properties_changed)); + + dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (config_class), + &dbus_glib_nm_dhcp6_config_object_info); +} diff --git a/src/nm-dhcp6-config.h b/src/nm-dhcp6-config.h new file mode 100644 index 0000000000..90eb10ffb5 --- /dev/null +++ b/src/nm-dhcp6-config.h @@ -0,0 +1,61 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager -- Network link manager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2008 Red Hat, Inc. + */ + +#ifndef NM_DHCP6_CONFIG_H +#define NM_DHCP6_CONFIG_H + +#include +#include + +#define NM_TYPE_DHCP6_CONFIG (nm_dhcp6_config_get_type ()) +#define NM_DHCP6_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DHCP6_CONFIG, NMDHCP6Config)) +#define NM_DHCP6_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DHCP6_CONFIG, NMDHCP6ConfigClass)) +#define NM_IS_DHCP6_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DHCP6_CONFIG)) +#define NM_IS_DHCP6_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_DHCP6_CONFIG)) +#define NM_DHCP6_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DHCP6_CONFIG, NMDHCP6ConfigClass)) + +typedef struct { + GObject parent; +} NMDHCP6Config; + +typedef struct { + GObjectClass parent; + + /* Signals */ + void (*properties_changed) (NMDHCP6Config *config, GHashTable *properties); +} NMDHCP6ConfigClass; + +#define NM_DHCP6_CONFIG_OPTIONS "options" + +GType nm_dhcp6_config_get_type (void); + +NMDHCP6Config *nm_dhcp6_config_new (void); + +const char *nm_dhcp6_config_get_dbus_path (NMDHCP6Config *config); + +void nm_dhcp6_config_add_option (NMDHCP6Config *config, + const char *key, + const char *option); + +void nm_dhcp6_config_reset (NMDHCP6Config *config); + +const char *nm_dhcp6_config_get_option (NMDHCP6Config *config, const char *option); + +#endif /* NM_DHCP6_CONFIG_H */ diff --git a/src/nm-hostname-provider.c b/src/nm-hostname-provider.c index 19498efcf3..1cd1ca6cba 100644 --- a/src/nm-hostname-provider.c +++ b/src/nm-hostname-provider.c @@ -1,4 +1,22 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager -- Network link manager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2009 Novell, Inc. + */ #include "nm-hostname-provider.h" diff --git a/src/nm-hostname-provider.h b/src/nm-hostname-provider.h index 5cfb373583..7fe5c00623 100644 --- a/src/nm-hostname-provider.h +++ b/src/nm-hostname-provider.h @@ -1,4 +1,22 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager -- Network link manager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2009 Novell, Inc. + */ #ifndef NM_HOSTNAME_PROVIDER_H #define NM_HOSTNAME_PROVIDER_H diff --git a/src/nm-ip6-config.c b/src/nm-ip6-config.c index 66c328eef9..2fea38f331 100644 --- a/src/nm-ip6-config.c +++ b/src/nm-ip6-config.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2005 - 2008 Red Hat, Inc. + * Copyright (C) 2005 - 2010 Red Hat, Inc. * Copyright (C) 2006 - 2008 Novell, Inc. */ @@ -183,7 +183,7 @@ const struct in6_addr *nm_ip6_config_get_ptp_address (NMIP6Config *config) return &NM_IP6_CONFIG_GET_PRIVATE (config)->ptp_address; } -void nm_ip6_config_set_ptp_address (NMIP6Config *config, struct in6_addr *ptp_addr) +void nm_ip6_config_set_ptp_address (NMIP6Config *config, const struct in6_addr *ptp_addr) { g_return_if_fail (NM_IS_IP6_CONFIG (config)); @@ -197,15 +197,14 @@ void nm_ip6_config_add_nameserver (NMIP6Config *config, const struct in6_addr *n int i; g_return_if_fail (NM_IS_IP6_CONFIG (config)); - g_return_if_fail (nameserver > 0); + g_return_if_fail (nameserver != NULL); priv = NM_IP6_CONFIG_GET_PRIVATE (config); /* No dupes */ nameservers = (struct in6_addr *)priv->nameservers->data; - for (i = 0; i < priv->nameservers->len; i++) { - g_return_if_fail (memcmp (nameserver, &nameservers[i], sizeof (struct in6_addr)) != 0); - } + for (i = 0; i < priv->nameservers->len; i++) + g_return_if_fail (IN6_ARE_ADDR_EQUAL (nameserver, &nameservers[i]) == FALSE); g_array_append_val (priv->nameservers, *nameserver); } @@ -572,7 +571,7 @@ addr_array_compare (GArray *a, GArray *b) addrs_b = (struct in6_addr *)b->data; for (i = 0; i < a->len; i++) { for (j = 0, found = FALSE; j < b->len; j++) { - if (memcmp (&addrs_a[i], &addrs_b[j], sizeof (struct in6_addr)) == 0) { + if (IN6_ARE_ADDR_EQUAL (&addrs_a[i], &addrs_b[j])) { found = TRUE; break; } @@ -692,34 +691,33 @@ nm_ip6_config_class_init (NMIP6ConfigClass *config_class) object_class->finalize = finalize; /* properties */ - g_object_class_install_property - (object_class, PROP_ADDRESSES, - g_param_spec_boxed (NM_IP6_CONFIG_ADDRESSES, - "Addresses", - "IP6 addresses", - DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UINT, - G_PARAM_READABLE)); - g_object_class_install_property - (object_class, PROP_NAMESERVERS, - g_param_spec_boxed (NM_IP6_CONFIG_NAMESERVERS, - "Nameservers", - "DNS list", - DBUS_TYPE_G_UINT_ARRAY, - G_PARAM_READABLE)); - g_object_class_install_property - (object_class, PROP_DOMAINS, - g_param_spec_boxed (NM_IP6_CONFIG_DOMAINS, - "Domains", - "Domains", - DBUS_TYPE_G_ARRAY_OF_STRING, - G_PARAM_READABLE)); - g_object_class_install_property - (object_class, PROP_ROUTES, - g_param_spec_boxed (NM_IP6_CONFIG_ROUTES, - "Routes", - "Routes", - DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UINT, - G_PARAM_READABLE)); + g_object_class_install_property (object_class, PROP_ADDRESSES, + g_param_spec_boxed (NM_IP6_CONFIG_ADDRESSES, + "Addresses", + "IP6 addresses", + DBUS_TYPE_G_ARRAY_OF_IP6_ADDRESS, + G_PARAM_READABLE)); + + g_object_class_install_property (object_class, PROP_NAMESERVERS, + g_param_spec_boxed (NM_IP6_CONFIG_NAMESERVERS, + "Nameservers", + "DNS list", + DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UCHAR, + G_PARAM_READABLE)); + + g_object_class_install_property (object_class, PROP_DOMAINS, + g_param_spec_boxed (NM_IP6_CONFIG_DOMAINS, + "Domains", + "Domains", + DBUS_TYPE_G_ARRAY_OF_STRING, + G_PARAM_READABLE)); + + g_object_class_install_property (object_class, PROP_ROUTES, + g_param_spec_boxed (NM_IP6_CONFIG_ROUTES, + "Routes", + "Routes", + DBUS_TYPE_G_ARRAY_OF_IP6_ROUTE, + G_PARAM_READABLE)); dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (config_class), &dbus_glib_nm_ip6_config_object_info); diff --git a/src/nm-ip6-config.h b/src/nm-ip6-config.h index 4fd959d531..1e75a121c8 100644 --- a/src/nm-ip6-config.h +++ b/src/nm-ip6-config.h @@ -60,7 +60,7 @@ NMIP6Address *nm_ip6_config_get_address (NMIP6Config *config, guint32 i) guint32 nm_ip6_config_get_num_addresses (NMIP6Config *config); const struct in6_addr *nm_ip6_config_get_ptp_address (NMIP6Config *config); -void nm_ip6_config_set_ptp_address (NMIP6Config *config, struct in6_addr *ptp_addr); +void nm_ip6_config_set_ptp_address (NMIP6Config *config, const struct in6_addr *ptp_addr); void nm_ip6_config_add_nameserver (NMIP6Config *config, const struct in6_addr *nameserver); const struct in6_addr *nm_ip6_config_get_nameserver (NMIP6Config *config, guint i); diff --git a/src/nm-logging.c b/src/nm-logging.c deleted file mode 100644 index f47461526f..0000000000 --- a/src/nm-logging.c +++ /dev/null @@ -1,175 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* NetworkManager -- Network link manager - * - * 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Copyright (C) 2006 - 2008 Red Hat, Inc. - * Copyright (C) 2006 - 2008 Novell, Inc. - */ - -#define _GNU_SOURCE -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "nm-logging.h" -#include "nm-utils.h" - -static void -fallback_get_backtrace (void) -{ - void *frames[64]; - Dl_info info; - size_t size; - guint32 i; - const char *name; - - size = backtrace (frames, G_N_ELEMENTS (frames)); - - syslog (LOG_CRIT, "******************* START **********************************"); - for (i = 0; i < size; i++) { - dladdr (frames[i], &info); - name = (info.dli_fname && *info.dli_fname) ? info.dli_fname : "(vdso)"; - if (info.dli_saddr) { - syslog (LOG_CRIT, "Frame %d: %s (%s+0x%lx) [%p]", - i, name, - info.dli_sname, - (gulong)(frames[i] - info.dli_saddr), - frames[i]); - } else { - syslog (LOG_CRIT, "Frame %d: %s (%p+0x%lx) [%p]", - i, name, - info.dli_fbase, - (gulong)(frames[i] - info.dli_saddr), - frames[i]); - } - } - syslog (LOG_CRIT, "******************* END **********************************"); -} - - -static gboolean -crashlogger_get_backtrace (void) -{ - gboolean success = FALSE; - int pid; - - pid = fork(); - if (pid > 0) - { - /* Wait for the child to finish */ - int estatus; - if (waitpid (pid, &estatus, 0) != -1) - { - /* Only succeed if the crashlogger succeeded */ - if (WIFEXITED (estatus) && (WEXITSTATUS (estatus) == 0)) - success = TRUE; - } - } - else if (pid == 0) - { - /* Child process */ - execl (LIBEXECDIR"/nm-crash-logger", - LIBEXECDIR"/nm-crash-logger", NULL); - } - - return success; -} - - -void -nm_logging_backtrace (void) -{ - struct stat s; - gboolean fallback = TRUE; - - /* Try to use gdb via nm-crash-logger if it exists, since - * we get much better information out of it. Otherwise - * fall back to execinfo. - */ - if (stat (LIBEXECDIR"/nm-crash-logger", &s) == 0) - fallback = crashlogger_get_backtrace () ? FALSE : TRUE; - - if (fallback) - fallback_get_backtrace (); -} - - -static void -nm_log_handler (const gchar * log_domain, - GLogLevelFlags log_level, - const gchar * message, - gpointer ignored) -{ - int syslog_priority; - - switch (log_level) - { - case G_LOG_LEVEL_ERROR: - syslog_priority = LOG_CRIT; - break; - - case G_LOG_LEVEL_CRITICAL: - syslog_priority = LOG_ERR; - break; - - case G_LOG_LEVEL_WARNING: - syslog_priority = LOG_WARNING; - break; - - case G_LOG_LEVEL_MESSAGE: - syslog_priority = LOG_NOTICE; - break; - - case G_LOG_LEVEL_DEBUG: - syslog_priority = LOG_DEBUG; - break; - - case G_LOG_LEVEL_INFO: - default: - syslog_priority = LOG_INFO; - break; - } - - syslog (syslog_priority, "%s", message); -} - - -void -nm_logging_setup (gboolean become_daemon) -{ - if (become_daemon) - openlog (G_LOG_DOMAIN, 0, LOG_DAEMON); - else - openlog (G_LOG_DOMAIN, LOG_CONS | LOG_PERROR, LOG_USER); - - g_log_set_handler (G_LOG_DOMAIN, - G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION, - nm_log_handler, - NULL); -} - -void -nm_logging_shutdown (void) -{ - closelog (); -} diff --git a/src/nm-manager.c b/src/nm-manager.c index 70ba37e2d6..ee7a536ddc 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -16,7 +16,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 2007 - 2009 Novell, Inc. - * Copyright (C) 2007 - 2009 Red Hat, Inc. + * Copyright (C) 2007 - 2010 Red Hat, Inc. */ #include @@ -26,11 +26,10 @@ #include "nm-glib-compat.h" #include "nm-manager.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-dbus-manager.h" #include "nm-vpn-manager.h" #include "nm-modem-manager.h" -#include "nm-modem.h" #include "nm-device-bt.h" #include "nm-device-interface.h" #include "nm-device-private.h" @@ -38,7 +37,9 @@ #include "nm-device-wifi.h" #include "nm-device-olpc-mesh.h" #include "nm-wimax-device.h" -#include "NetworkManagerSystem.h" +#include "nm-device-cdma.h" +#include "nm-device-gsm.h" +#include "nm-system.h" #include "nm-properties-changed-signal.h" #include "nm-setting-bluetooth.h" #include "nm-setting-connection.h" @@ -81,6 +82,11 @@ static gboolean impl_manager_deactivate_connection (NMManager *manager, static gboolean impl_manager_sleep (NMManager *manager, gboolean sleep, GError **err); +static gboolean impl_manager_set_logging (NMManager *manager, + const char *level, + const char *domains, + GError **error); + /* Legacy 0.6 compatibility interface */ static gboolean impl_manager_legacy_sleep (NMManager *manager, GError **err); @@ -130,15 +136,15 @@ static const char *internal_activate_device (NMManager *manager, gboolean assumed, GError **error); -static NMDevice * -find_device_by_iface (NMManager *self, const gchar *iface); +static NMDevice *find_device_by_iface (NMManager *self, const gchar *iface); -static GSList * -remove_one_device (NMManager *manager, - GSList *list, - NMDevice *device, - gboolean quitting, - gboolean force_unmanage); +static GSList * remove_one_device (NMManager *manager, + GSList *list, + NMDevice *device, + gboolean quitting, + gboolean force_unmanage); + +static NMDevice *nm_manager_get_device_by_udi (NMManager *manager, const char *udi); #define SSD_POKE_INTERVAL 120 #define ORIGDEV_TAG "originating-device" @@ -155,16 +161,12 @@ typedef struct { typedef struct { gboolean enabled; gboolean hw_enabled; + RfKillType rtype; const char *desc; const char *key; const char *prop; const char *hw_prop; - /* Hack for WWAN for 0.8 release; we'll start using udev - * after 0.8 gets out. - */ - gboolean ignore_udev; RfKillState (*other_enabled_func) (NMManager *); - gboolean (*object_filter_func) (GObject *); } RadioState; typedef struct { @@ -315,26 +317,17 @@ vpn_manager_connection_deactivated_cb (NMVPNManager *manager, static void modem_added (NMModemManager *modem_manager, - NMDevice *modem, + NMModem *modem, + const char *driver, gpointer user_data) { - NMManagerPrivate *priv; - NMDeviceType type; - NMDevice *replace_device; - const char *type_name; + NMManager *self = NM_MANAGER (user_data); + NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self); + NMDevice *replace_device, *device = NULL; const char *ip_iface; + GSList *iter; - priv = NM_MANAGER_GET_PRIVATE (user_data); - - type = nm_device_get_device_type (NM_DEVICE (modem)); - if (type == NM_DEVICE_TYPE_GSM) - type_name = "GSM modem"; - else if (type == NM_DEVICE_TYPE_CDMA) - type_name = "CDMA modem"; - else - type_name = "Unknown modem"; - - ip_iface = nm_device_get_ip_iface (modem); + ip_iface = nm_modem_get_iface (modem); replace_device = find_device_by_iface (NM_MANAGER (user_data), ip_iface); if (replace_device) { @@ -345,7 +338,33 @@ modem_added (NMModemManager *modem_manager, TRUE); } - add_device (NM_MANAGER (user_data), NM_DEVICE (g_object_ref (modem))); + /* Give Bluetooth DUN devices first chance to claim the modem */ + for (iter = priv->devices; iter; iter = g_slist_next (iter)) { + if (NM_IS_DEVICE_BT (iter->data)) { + if (nm_device_bt_modem_added (NM_DEVICE_BT (iter->data), modem, driver)) + return; + } + } + + /* If it was a Bluetooth modem and no bluetooth device claimed it, ignore + * it. The rfcomm port (and thus the modem) gets created automatically + * by the Bluetooth code during the connection process. + */ + if (driver && !strcmp (driver, "bluetooth")) { + nm_log_info (LOGD_MB, "ignoring modem '%s' (no associated Bluetooth device)", ip_iface); + return; + } + + /* Otherwise make a new top-level NMDevice for it */ + if (NM_IS_MODEM_GSM (modem)) + device = nm_device_gsm_new (NM_MODEM_GSM (modem), driver); + else if (NM_IS_MODEM_CDMA (modem)) + device = nm_device_cdma_new (NM_MODEM_CDMA (modem), driver); + else + nm_log_info (LOGD_MB, "unhandled modem '%s'", ip_iface); + + if (device) + add_device (self, device); } static void @@ -443,13 +462,26 @@ remove_one_device (NMManager *manager, static void modem_removed (NMModemManager *modem_manager, - NMDevice *modem, + NMModem *modem, gpointer user_data) { NMManager *self = NM_MANAGER (user_data); NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self); + NMDevice *found; + GSList *iter; - priv->devices = remove_one_device (self, priv->devices, modem, FALSE, TRUE); + /* Give Bluetooth DUN devices first chance to handle the modem removal */ + for (iter = priv->devices; iter; iter = g_slist_next (iter)) { + if (NM_IS_DEVICE_BT (iter->data)) { + if (nm_device_bt_modem_removed (NM_DEVICE_BT (iter->data), modem)) + return; + } + } + + /* Otherwise remove the standalone modem */ + found = nm_manager_get_device_by_udi (self, nm_modem_get_path (modem)); + if (found) + priv->devices = remove_one_device (self, priv->devices, found, FALSE, TRUE); } static void @@ -465,7 +497,7 @@ aipd_handle_event (DBusGProxy *proxy, gboolean handled = FALSE; if (!event || !iface) { - nm_warning ("Incomplete message received from avahi-autoipd"); + nm_log_warn (LOGD_AUTOIP4, "incomplete message received from avahi-autoipd"); return; } @@ -473,7 +505,7 @@ aipd_handle_event (DBusGProxy *proxy, && (strcmp (event, "CONFLICT") != 0) && (strcmp (event, "UNBIND") != 0) && (strcmp (event, "STOP") != 0)) { - nm_warning ("Unknown event '%s' received from avahi-autoipd", event); + nm_log_warn (LOGD_AUTOIP4, "unknown event '%s' received from avahi-autoipd", event); return; } @@ -488,7 +520,7 @@ aipd_handle_event (DBusGProxy *proxy, } if (!handled) - nm_warning ("Unhandled avahi-autoipd event for '%s'", iface); + nm_log_warn (LOGD_AUTOIP4, "(%s): unhandled avahi-autoipd event", iface); } static const char * @@ -670,7 +702,8 @@ user_connection_get_settings_cb (DBusGProxy *proxy, if (!dbus_g_proxy_end_call (proxy, call_id, &err, DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT, &settings, G_TYPE_INVALID)) { - nm_warning ("Couldn't retrieve connection settings: %s.", err->message); + nm_log_info (LOGD_USER_SET, "couldn't retrieve connection settings: %s.", + err && err->message ? err->message : "(unknown)"); g_error_free (err); goto out; } @@ -685,10 +718,9 @@ user_connection_get_settings_cb (DBusGProxy *proxy, connection = nm_connection_new_from_hash (settings, &error); if (connection == NULL) { - nm_warning ("%s: Invalid connection: '%s' / '%s' invalid: %d", - __func__, - g_type_name (nm_connection_lookup_setting_type_by_quark (error->domain)), - error->message, error->code); + nm_log_warn (LOGD_USER_SET, "invalid connection: '%s' / '%s' invalid: %d", + g_type_name (nm_connection_lookup_setting_type_by_quark (error->domain)), + error->message, error->code); g_error_free (error); goto out; } @@ -731,7 +763,7 @@ user_connection_get_settings_cb (DBusGProxy *proxy, } } else { // FIXME: merge settings? or just replace? - nm_warning ("%s (#%d): implement merge settings", __func__, __LINE__); + nm_log_dbg (LOGD_USER_SET, "implement merge settings"); } out: @@ -779,10 +811,9 @@ user_connection_updated_cb (DBusGProxy *proxy, new_connection = nm_connection_new_from_hash (settings, &error); if (!new_connection) { /* New connection invalid, remove existing connection */ - nm_warning ("%s: Invalid connection: '%s' / '%s' invalid: %d", - __func__, - g_type_name (nm_connection_lookup_setting_type_by_quark (error->domain)), - error->message, error->code); + nm_log_warn (LOGD_USER_SET, "invalid connection: '%s' / '%s' invalid: %d", + g_type_name (nm_connection_lookup_setting_type_by_quark (error->domain)), + error->message, error->code); g_error_free (error); remove_connection (manager, old_connection, priv->user_connections); return; @@ -819,7 +850,7 @@ user_internal_new_connection_cb (DBusGProxy *proxy, path, NM_DBUS_IFACE_SETTINGS_CONNECTION); if (!con_proxy) { - nm_warning ("Error: could not init user connection proxy"); + nm_log_err (LOGD_USER_SET, "could not init user connection proxy"); return; } @@ -865,7 +896,8 @@ user_list_connections_cb (DBusGProxy *proxy, if (!dbus_g_proxy_end_call (proxy, call_id, &err, DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH, &ops, G_TYPE_INVALID)) { - nm_warning ("Couldn't retrieve connections: %s.", err->message); + nm_log_warn (LOGD_USER_SET, "couldn't retrieve connections: %s", + err && err->message ? err->message : "(unknown)"); g_error_free (err); goto out; } @@ -911,7 +943,7 @@ user_query_connections (NMManager *manager) NM_DBUS_PATH_SETTINGS, NM_DBUS_IFACE_SETTINGS); if (!priv->user_proxy) { - nm_warning ("Error: could not init settings proxy"); + nm_log_err (LOGD_USER_SET, "could not init user settings proxy"); return; } @@ -954,16 +986,15 @@ system_connection_updated_cb (NMSettingsConnectionInterface *connection, if (!existing) return; if (existing != connection) { - g_warning ("%s: existing connection didn't matched updated.", __func__); + nm_log_warn (LOGD_SYS_SET, "existing connection didn't matched updated."); return; } if (!nm_connection_verify (NM_CONNECTION (existing), &error)) { /* Updated connection invalid, remove existing connection */ - nm_warning ("%s: Invalid connection: '%s' / '%s' invalid: %d", - __func__, - g_type_name (nm_connection_lookup_setting_type_by_quark (error->domain)), - error->message, error->code); + nm_log_warn (LOGD_SYS_SET, "invalid connection: '%s' / '%s' invalid: %d", + g_type_name (nm_connection_lookup_setting_type_by_quark (error->domain)), + error->message, error->code); g_error_free (error); remove_connection (manager, NM_CONNECTION (existing), priv->system_connections); return; @@ -1205,10 +1236,10 @@ manager_set_radio_enabled (NMManager *manager, "main", rstate->key, G_TYPE_BOOLEAN, (gpointer) &enabled, &error)) { - g_warning ("Writing to state file %s failed: (%d) %s.", - priv->state_file, - error ? error->code : -1, - (error && error->message) ? error->message : "unknown"); + nm_log_warn (LOGD_CORE, "writing to state file %s failed: (%d) %s.", + priv->state_file, + error ? error->code : -1, + (error && error->message) ? error->message : "unknown"); } } @@ -1218,9 +1249,15 @@ manager_set_radio_enabled (NMManager *manager, /* enable/disable wireless devices as required */ for (iter = priv->devices; iter; iter = iter->next) { - if ( rstate->object_filter_func - && rstate->object_filter_func (G_OBJECT (iter->data))) + RfKillType devtype = RFKILL_TYPE_UNKNOWN; + + g_object_get (G_OBJECT (iter->data), NM_DEVICE_INTERFACE_RFKILL_TYPE, &devtype, NULL); + if (devtype == rstate->rtype) { + nm_log_dbg (LOGD_RFKILL, "(%s): setting radio %s", + nm_device_get_iface (NM_DEVICE (iter->data)), + enabled ? "enabled" : "disabled"); nm_device_interface_set_enabled (NM_DEVICE_INTERFACE (iter->data), enabled); + } } } @@ -1319,9 +1356,11 @@ nm_manager_get_modem_enabled_state (NMManager *self) for (iter = priv->devices; iter; iter = g_slist_next (iter)) { NMDevice *candidate = NM_DEVICE (iter->data); RfKillState candidate_state = RFKILL_UNBLOCKED; + RfKillType devtype = RFKILL_TYPE_UNKNOWN; - if (NM_IS_MODEM (candidate)) { - if (nm_modem_get_mm_enabled (NM_MODEM (candidate)) == FALSE) + g_object_get (G_OBJECT (candidate), NM_DEVICE_INTERFACE_RFKILL_TYPE, &devtype, NULL); + if (devtype == RFKILL_TYPE_WWAN) { + if (!nm_device_interface_get_enabled (NM_DEVICE_INTERFACE (candidate))) candidate_state = RFKILL_SOFT_BLOCKED; if (candidate_state > wwan_state) @@ -1332,24 +1371,6 @@ nm_manager_get_modem_enabled_state (NMManager *self) return wwan_state; } -static gboolean -rfkill_wlan_filter (GObject *object) -{ - return NM_IS_DEVICE_WIFI (object); -} - -static gboolean -rfkill_wwan_filter (GObject *object) -{ - return NM_IS_MODEM (object); -} - -static gboolean -rfkill_wimax_filter (GObject *object) -{ - return NM_IS_WIMAX_DEVICE (object); -} - static void manager_rfkill_update_one_type (NMManager *self, RadioState *rstate, @@ -1361,8 +1382,7 @@ manager_rfkill_update_one_type (NMManager *self, RfKillState composite; gboolean new_e = TRUE, new_he = TRUE; - if (!rstate->ignore_udev) - udev_state = nm_udev_manager_get_rfkill_state (priv->udev_mgr, rtype); + udev_state = nm_udev_manager_get_rfkill_state (priv->udev_mgr, rtype); if (rstate->other_enabled_func) other_state = rstate->other_enabled_func (self); @@ -1392,13 +1412,19 @@ manager_rfkill_update_one_type (NMManager *self, break; } + if (rstate->desc) { + nm_log_dbg (LOGD_RFKILL, "%s hw-enabled %d enabled %d", + rstate->desc, new_he, new_e); + } + if (new_he != rstate->hw_enabled) { - nm_info ("%s now %s by radio killswitch", - rstate->desc, - (new_e && new_he) ? "enabled" : "disabled"); + nm_log_info (LOGD_RFKILL, "%s now %s by radio killswitch", + rstate->desc, + (new_e && new_he) ? "enabled" : "disabled"); rstate->hw_enabled = new_he; - g_object_notify (G_OBJECT (self), rstate->hw_prop); + if (rstate->hw_prop) + g_object_notify (G_OBJECT (self), rstate->hw_prop); } manager_set_radio_enabled (self, rstate, new_e); } @@ -1451,7 +1477,7 @@ add_device (NMManager *self, NMDevice *device) iface = nm_device_get_ip_iface (device); g_assert (iface); - if (!NM_IS_MODEM(device) && nm_modem_manager_has_modem_for_iface (priv->modem_manager, iface)) { + if (!NM_IS_DEVICE_MODEM (device) && find_device_by_iface (self, iface)) { g_object_unref (device); return; } @@ -1483,7 +1509,7 @@ add_device (NMManager *self, NMDevice *device) nm_manager_rfkill_update (self, RFKILL_TYPE_WLAN); nm_device_interface_set_enabled (NM_DEVICE_INTERFACE (device), priv->radio_states[RFKILL_TYPE_WLAN].enabled); - } else if (NM_IS_MODEM (device)) { + } else if (NM_IS_DEVICE_MODEM (device)) { g_signal_connect (device, "notify::" NM_MODEM_ENABLED, G_CALLBACK (manager_modem_enabled_changed), self); @@ -1506,14 +1532,15 @@ add_device (NMManager *self, NMDevice *device) driver = nm_device_get_driver (device); if (!driver) driver = "unknown"; - nm_info ("(%s): new %s device (driver: '%s')", iface, type_desc, driver); + nm_log_info (LOGD_HW, "(%s): new %s device (driver: '%s' ifindex: %d)", + iface, type_desc, driver, nm_device_get_ifindex (device)); path = g_strdup_printf ("/org/freedesktop/NetworkManager/Devices/%d", devcount++); nm_device_set_path (device, path); dbus_g_connection_register_g_object (nm_dbus_manager_get_connection (priv->dbus_mgr), path, G_OBJECT (device)); - nm_info ("(%s): exported as %s", iface, path); + nm_log_info (LOGD_CORE, "(%s): exported as %s", iface, path); g_free (path); /* Check if we should assume the device's active connection by matching its @@ -1528,6 +1555,15 @@ add_device (NMManager *self, NMDevice *device) existing = nm_device_interface_connection_match_config (NM_DEVICE_INTERFACE (device), (const GSList *) connections); g_slist_free (connections); + + if (existing) { + NMSettingConnection *s_con; + + s_con = (NMSettingConnection *) nm_connection_get_setting (existing, NM_TYPE_SETTING_CONNECTION); + nm_log_dbg (LOGD_DEVICE, "(%s): found existing device connection '%s'", + nm_device_get_iface (device), + nm_setting_connection_get_id (s_con)); + } } /* Start the device if it's supposed to be managed */ @@ -1549,15 +1585,18 @@ add_device (NMManager *self, NMDevice *device) const char *ac_path; GError *error = NULL; + nm_log_dbg (LOGD_DEVICE, "(%s): will attempt to assume existing connection", + nm_device_get_iface (device)); + ac_path = internal_activate_device (self, device, existing, NULL, FALSE, TRUE, &error); if (ac_path) g_object_notify (G_OBJECT (self), NM_MANAGER_ACTIVE_CONNECTIONS); else { - nm_warning ("Assumed connection (%d) %s failed to activate: (%d) %s", - nm_connection_get_scope (existing), - nm_connection_get_path (existing), - error ? error->code : -1, - error && error->message ? error->message : "(unknown)"); + nm_log_warn (LOGD_DEVICE, "assumed connection (%d) %s failed to activate: (%d) %s", + nm_connection_get_scope (existing), + nm_connection_get_path (existing), + error ? error->code : -1, + error && error->message ? error->message : "(unknown)"); g_error_free (error); } } @@ -1706,13 +1745,12 @@ bluez_manager_bdaddr_added_cb (NMBluezManager *bluez_mgr, device = nm_device_bt_new (object_path, bdaddr, name, capabilities, FALSE); if (device) { - g_message ("%s: BT device %s (%s) added (%s%s%s)", - __func__, - name, - bdaddr, - has_dun ? "DUN" : "", - has_dun && has_nap ? " " : "", - has_nap ? "NAP" : ""); + nm_log_info (LOGD_HW, "BT device %s (%s) added (%s%s%s)", + name, + bdaddr, + has_dun ? "DUN" : "", + has_dun && has_nap ? " " : "", + has_nap ? "NAP" : ""); add_device (manager, device); } @@ -1731,7 +1769,7 @@ bluez_manager_bdaddr_removed_cb (NMBluezManager *bluez_mgr, g_return_if_fail (bdaddr != NULL); g_return_if_fail (object_path != NULL); - g_message ("%s: BT device %s removed", __func__, bdaddr); + nm_log_info (LOGD_HW, "BT device %s removed", bdaddr); for (iter = priv->devices; iter; iter = iter->next) { NMDevice *device = NM_DEVICE (iter->data); @@ -1748,12 +1786,14 @@ find_device_by_iface (NMManager *self, const gchar *iface) { NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self); GSList *iter; + for (iter = priv->devices; iter; iter = g_slist_next (iter)) { NMDevice *device = NM_DEVICE (iter->data); const gchar *d_iface = nm_device_get_ip_iface (device); if (!strcmp (d_iface, iface)) return device; } + return NULL; } @@ -1764,20 +1804,11 @@ find_device_by_ifindex (NMManager *self, guint32 ifindex) GSList *iter; for (iter = priv->devices; iter; iter = g_slist_next (iter)) { - NMDevice *device = NM_DEVICE (iter->data); - gint candidate_idx = 0; + NMDevice *candidate = NM_DEVICE (iter->data); - if (NM_IS_DEVICE_ETHERNET (device)) - candidate_idx = nm_device_ethernet_get_ifindex (NM_DEVICE_ETHERNET (device)); - else if (NM_IS_DEVICE_WIFI (device)) - candidate_idx = nm_device_wifi_get_ifindex (NM_DEVICE_WIFI (device)); - else if (NM_IS_DEVICE_OLPC_MESH (device)) - candidate_idx = nm_device_olpc_mesh_get_ifindex (NM_DEVICE_OLPC_MESH (device)); - - if (candidate_idx == ifindex) - return device; + if (ifindex == nm_device_get_ifindex (candidate)) + return candidate; } - return NULL; } @@ -2004,7 +2035,7 @@ user_get_secrets (NMManager *self, nm_connection_get_path (connection), NM_DBUS_IFACE_SETTINGS_CONNECTION_SECRETS); if (!info->proxy) { - nm_warning ("%s: could not create user connection secrets proxy", __func__); + nm_log_warn (LOGD_USER_SET, "could not create user connection secrets proxy"); g_free (info); return NULL; } @@ -2069,7 +2100,9 @@ system_get_secrets_idle_cb (gpointer user_data) connection = nm_settings_interface_get_connection_by_path (NM_SETTINGS_INTERFACE (priv->sys_settings), info->connection_path); if (!connection) { - error = g_error_new_literal (0, 0, "unknown connection (not exported by system settings)"); + error = g_error_new_literal (NM_MANAGER_ERROR, + NM_MANAGER_ERROR_UNKNOWN_CONNECTION, + "unknown connection (not exported by system settings)"); nm_secrets_provider_interface_get_secrets_result (info->provider, info->setting_name, info->caller, @@ -2219,8 +2252,8 @@ wait_for_connection_expired (gpointer data) g_set_error (&error, NM_MANAGER_ERROR, NM_MANAGER_ERROR_UNKNOWN_CONNECTION, "%s", "Connection was not provided by any settings service"); - nm_warning ("Connection (%d) %s failed to activate (timeout): (%d) %s", - info->scope, info->connection_path, error->code, error->message); + nm_log_warn (LOGD_CORE, "connection (%d) %s failed to activate (timeout): (%d) %s", + info->scope, info->connection_path, error->code, error->message); dbus_g_method_return_error (info->context, error); g_error_free (error); @@ -2371,8 +2404,8 @@ connection_added_default_handler (NMManager *manager, g_object_notify (G_OBJECT (manager), NM_MANAGER_ACTIVE_CONNECTIONS); } else { dbus_g_method_return_error (info->context, error); - nm_warning ("Connection (%d) %s failed to activate: (%d) %s", - scope, info->connection_path, error->code, error->message); + nm_log_warn (LOGD_CORE, "connection (%d) %s failed to activate: (%d) %s", + scope, info->connection_path, error->code, error->message); g_error_free (error); } @@ -2555,8 +2588,8 @@ impl_manager_activate_connection (NMManager *manager, err: if (error) { dbus_g_method_return_error (context, error); - nm_warning ("Connection (%d) %s failed to activate: (%d) %s", - scope, connection_path, error->code, error->message); + nm_log_warn (LOGD_CORE, "connection (%d) %s failed to activate: (%d) %s", + scope, connection_path, error->code, error->message); g_error_free (error); } @@ -2650,16 +2683,16 @@ impl_manager_sleep (NMManager *self, gboolean sleep, GError **error) "main", "NetworkingEnabled", G_TYPE_BOOLEAN, (gpointer) &networking_enabled, &err)) { - g_warning ("Writing to state file %s failed: (%d) %s.", - priv->state_file, - err ? err->code : -1, - (err && err->message) ? err->message : "unknown"); + nm_log_warn (LOGD_SUSPEND, "writing to state file %s failed: (%d) %s.", + priv->state_file, + err ? err->code : -1, + (err && err->message) ? err->message : "unknown"); } } if (sleep) { - nm_info ("Sleeping..."); + nm_log_info (LOGD_SUSPEND, "sleeping..."); /* Just deactivate and down all devices from the device list, * we'll remove them in 'wake' for speed's sake. @@ -2669,7 +2702,7 @@ impl_manager_sleep (NMManager *self, gboolean sleep, GError **error) } else { const GSList *unmanaged_specs; - nm_info ("Waking up..."); + nm_log_info (LOGD_SUSPEND, "waking up..."); unmanaged_specs = nm_sysconfig_settings_get_unmanaged_specs (priv->sys_settings); @@ -2689,11 +2722,17 @@ impl_manager_sleep (NMManager *self, gboolean sleep, GError **error) for (i = 0; i < RFKILL_TYPE_MAX; i++) { RadioState *rstate = &priv->radio_states[i]; gboolean enabled = (rstate->hw_enabled && rstate->enabled); + RfKillType devtype = RFKILL_TYPE_UNKNOWN; - if ( rstate->object_filter_func - && rstate->object_filter_func (G_OBJECT (device))) { - nm_device_interface_set_enabled (NM_DEVICE_INTERFACE (device), enabled); + if (rstate->desc) { + nm_log_dbg (LOGD_RFKILL, "%s %s devices (hw_enabled %d, enabled %d)", + enabled ? "enabling" : "disabling", + rstate->desc, rstate->hw_enabled, rstate->enabled); } + + g_object_get (G_OBJECT (device), NM_DEVICE_INTERFACE_RFKILL_TYPE, &devtype, NULL); + if (devtype == rstate->rtype) + nm_device_interface_set_enabled (NM_DEVICE_INTERFACE (device), enabled); } nm_device_clear_autoconnect_inhibit (device); @@ -2737,6 +2776,23 @@ impl_manager_legacy_state (NMManager *manager, guint32 *state, GError **err) return TRUE; } +static gboolean +impl_manager_set_logging (NMManager *manager, + const char *level, + const char *domains, + GError **error) +{ + if (nm_logging_setup (level, domains, error)) { + char *new_domains = nm_logging_domains_to_string (); + + nm_log_info (LOGD_CORE, "logging: level '%s' domains '%s'", + nm_logging_level_to_string (), + new_domains); + g_free (new_domains); + return TRUE; + } + return FALSE; +} /* Connections */ @@ -2792,7 +2848,7 @@ nm_manager_get_connections (NMManager *manager, else if (scope == NM_CONNECTION_SCOPE_SYSTEM) g_hash_table_foreach (priv->system_connections, connections_to_slist, &list); else - nm_warning ("Unknown NMConnectionScope %d", scope); + nm_log_err (LOGD_CORE, "unknown NMConnectionScope %d", scope); return list; } @@ -2813,7 +2869,7 @@ nm_manager_get_connection_by_object_path (NMManager *manager, else if (scope == NM_CONNECTION_SCOPE_SYSTEM) connection = (NMConnection *) g_hash_table_lookup (priv->system_connections, path); else - nm_warning ("Unknown NMConnectionScope %d", scope); + nm_log_err (LOGD_CORE, "unknown NMConnectionScope %d", scope); return connection; } @@ -2838,33 +2894,35 @@ nm_manager_start (NMManager *self) if (!rstate->desc) continue; - if (!rstate->ignore_udev) { - switch (nm_udev_manager_get_rfkill_state (priv->udev_mgr, i)) { - case RFKILL_UNBLOCKED: - enabled = TRUE; - hw_enabled = TRUE; - break; - case RFKILL_SOFT_BLOCKED: - enabled = FALSE; - hw_enabled = TRUE; - break; - case RFKILL_HARD_BLOCKED: - enabled = FALSE; - hw_enabled = FALSE; - break; - default: - break; - } + switch (nm_udev_manager_get_rfkill_state (priv->udev_mgr, i)) { + case RFKILL_UNBLOCKED: + enabled = TRUE; + hw_enabled = TRUE; + break; + case RFKILL_SOFT_BLOCKED: + enabled = FALSE; + hw_enabled = TRUE; + break; + case RFKILL_HARD_BLOCKED: + enabled = FALSE; + hw_enabled = FALSE; + break; + default: + break; } rstate->hw_enabled = hw_enabled; - nm_info ("%s %s by radio killswitch; %s by state file", - rstate->desc, - (rstate->hw_enabled && enabled) ? "enabled" : "disabled", - (rstate->enabled) ? "enabled" : "disabled"); + nm_log_info (LOGD_RFKILL, "%s %s by radio killswitch; %s by state file", + rstate->desc, + (rstate->hw_enabled && enabled) ? "enabled" : "disabled", + (rstate->enabled) ? "enabled" : "disabled"); manager_set_radio_enabled (self, rstate, rstate->enabled && enabled); } + /* Log overall networking status - asleep/running */ + nm_log_info (LOGD_CORE, "Networking is %s by state file", + priv->sleeping ? "disabled" : "enabled"); + system_unmanaged_devices_changed_cb (priv->sys_settings, NULL, self); system_hostname_changed_cb (priv->sys_settings, NULL, self); system_query_connections (self); @@ -3123,7 +3181,7 @@ nm_manager_init (NMManager *manager) priv->radio_states[RFKILL_TYPE_WLAN].hw_prop = NM_MANAGER_WIRELESS_HARDWARE_ENABLED; priv->radio_states[RFKILL_TYPE_WLAN].desc = "WiFi"; priv->radio_states[RFKILL_TYPE_WLAN].other_enabled_func = nm_manager_get_ipw_rfkill_state; - priv->radio_states[RFKILL_TYPE_WLAN].object_filter_func = rfkill_wlan_filter; + priv->radio_states[RFKILL_TYPE_WLAN].rtype = RFKILL_TYPE_WLAN; priv->radio_states[RFKILL_TYPE_WWAN].enabled = TRUE; priv->radio_states[RFKILL_TYPE_WWAN].key = "WWANEnabled"; @@ -3131,15 +3189,15 @@ nm_manager_init (NMManager *manager) priv->radio_states[RFKILL_TYPE_WWAN].hw_prop = NM_MANAGER_WWAN_HARDWARE_ENABLED; priv->radio_states[RFKILL_TYPE_WWAN].desc = "WWAN"; priv->radio_states[RFKILL_TYPE_WWAN].other_enabled_func = nm_manager_get_modem_enabled_state; - priv->radio_states[RFKILL_TYPE_WWAN].object_filter_func = rfkill_wwan_filter; + priv->radio_states[RFKILL_TYPE_WWAN].rtype = RFKILL_TYPE_WWAN; priv->radio_states[RFKILL_TYPE_WIMAX].enabled = TRUE; - priv->radio_states[RFKILL_TYPE_WIMAX].key = "WimaxEnabled"; + priv->radio_states[RFKILL_TYPE_WIMAX].key = "WiMAXEnabled"; priv->radio_states[RFKILL_TYPE_WIMAX].prop = NM_MANAGER_WIMAX_ENABLED; priv->radio_states[RFKILL_TYPE_WIMAX].hw_prop = NM_MANAGER_WIMAX_HARDWARE_ENABLED; priv->radio_states[RFKILL_TYPE_WIMAX].desc = "WiMAX"; priv->radio_states[RFKILL_TYPE_WIMAX].other_enabled_func = NULL; - priv->radio_states[RFKILL_TYPE_WIMAX].object_filter_func = rfkill_wimax_filter; + priv->radio_states[RFKILL_TYPE_WIMAX].rtype = RFKILL_TYPE_WIMAX; for (i = 0; i < RFKILL_TYPE_MAX; i++) priv->radio_states[i].hw_enabled = TRUE; @@ -3160,9 +3218,9 @@ nm_manager_init (NMManager *manager) g_object_unref); priv->modem_manager = nm_modem_manager_get (); - priv->modem_added_id = g_signal_connect (priv->modem_manager, "device-added", + priv->modem_added_id = g_signal_connect (priv->modem_manager, "modem-added", G_CALLBACK (modem_added), manager); - priv->modem_removed_id = g_signal_connect (priv->modem_manager, "device-removed", + priv->modem_removed_id = g_signal_connect (priv->modem_manager, "modem-removed", G_CALLBACK (modem_removed), manager); priv->vpn_manager = nm_vpn_manager_get (); @@ -3193,7 +3251,7 @@ nm_manager_init (NMManager *manager) manager, NULL); } else - nm_warning ("%s: could not initialize avahi-autoipd D-Bus proxy", __func__); + nm_log_warn (LOGD_AUTOIP4, "could not initialize avahi-autoipd D-Bus proxy"); } static void @@ -3373,5 +3431,6 @@ nm_manager_class_init (NMManagerClass *manager_class) &dbus_glib_nm_manager_object_info); dbus_g_error_domain_register (NM_MANAGER_ERROR, NULL, NM_TYPE_MANAGER_ERROR); + dbus_g_error_domain_register (NM_LOGGING_ERROR, "org.freedesktop.NetworkManager.Logging", NM_TYPE_LOGGING_ERROR); } diff --git a/src/nm-netlink-monitor.c b/src/nm-netlink-monitor.c index e0bf397652..10bf239d5d 100644 --- a/src/nm-netlink-monitor.c +++ b/src/nm-netlink-monitor.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2005 - 2008 Red Hat, Inc. + * Copyright (C) 2005 - 2010 Red Hat, Inc. * Copyright (C) 2005 - 2008 Novell, Inc. * Copyright (C) 2005 Ray Strode * @@ -25,6 +25,9 @@ * Copyright (C) 2004 Novell, Inc. */ +/* for struct ucred and LIBNL_NEEDS_ADDR_CACHING_WORKAROUND */ +#include + #include #include #include @@ -35,157 +38,60 @@ #include #include #include -#include +#include +#include +#include #include #include -#include "NetworkManager.h" -#include "NetworkManagerSystem.h" #include "nm-netlink-monitor.h" -#include "nm-utils.h" -#include "nm-marshal.h" -#include "nm-netlink.h" +#include "nm-logging.h" -#define NM_NETLINK_MONITOR_EVENT_CONDITIONS \ - ((GIOCondition) (G_IO_IN | G_IO_PRI)) - -#define NM_NETLINK_MONITOR_ERROR_CONDITIONS \ - ((GIOCondition) (G_IO_ERR | G_IO_NVAL)) - -#define NM_NETLINK_MONITOR_DISCONNECT_CONDITIONS \ - ((GIOCondition) (G_IO_HUP)) +#define EVENT_CONDITIONS ((GIOCondition) (G_IO_IN | G_IO_PRI)) +#define ERROR_CONDITIONS ((GIOCondition) (G_IO_ERR | G_IO_NVAL)) +#define DISCONNECT_CONDITIONS ((GIOCondition) (G_IO_HUP)) #define NM_NETLINK_MONITOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \ NM_TYPE_NETLINK_MONITOR, \ NMNetlinkMonitorPrivate)) typedef struct { - struct nl_handle *nlh; - struct nl_cb * nlh_cb; - struct nl_cache * nlh_link_cache; - + /* Async event listener connection */ + struct nl_handle *nlh_event; GIOChannel * io_channel; guint event_id; + /* Sync/blocking request/response connection */ + struct nl_handle *nlh_sync; + struct nl_cache * link_cache; + guint request_status_id; + + GHashTable *subscriptions; } NMNetlinkMonitorPrivate; -static gboolean nm_netlink_monitor_event_handler (GIOChannel *channel, - GIOCondition io_condition, - gpointer user_data); - -static gboolean nm_netlink_monitor_error_handler (GIOChannel *channel, - GIOCondition io_condition, - NMNetlinkMonitor *monitor); - -static gboolean nm_netlink_monitor_disconnect_handler (GIOChannel *channel, - GIOCondition io_condition, - NMNetlinkMonitor *monitor); - enum { - CARRIER_ON = 0, - CARRIER_OFF, - ERROR, - - LAST_SIGNAL + NOTIFICATION = 0, + CARRIER_ON, + CARRIER_OFF, + ERROR, + LAST_SIGNAL }; - static guint signals[LAST_SIGNAL] = { 0 }; + G_DEFINE_TYPE (NMNetlinkMonitor, nm_netlink_monitor, G_TYPE_OBJECT); -NMNetlinkMonitor * -nm_netlink_monitor_get (void) -{ - static NMNetlinkMonitor *singleton = NULL; - - if (!singleton) - singleton = NM_NETLINK_MONITOR (g_object_new (NM_TYPE_NETLINK_MONITOR, NULL)); - else - g_object_ref (singleton); - - return singleton; -} - static void -nm_netlink_monitor_init (NMNetlinkMonitor *monitor) +link_msg_handler (struct nl_object *obj, void *arg) { -} - -static void -finalize (GObject *object) -{ - NMNetlinkMonitorPrivate *priv = NM_NETLINK_MONITOR_GET_PRIVATE (object); - - if (priv->request_status_id) - g_source_remove (priv->request_status_id); - - if (priv->io_channel) - nm_netlink_monitor_close_connection (NM_NETLINK_MONITOR (object)); - - if (priv->nlh_link_cache) { - nl_cache_free (priv->nlh_link_cache); - priv->nlh_link_cache = NULL; - } - - if (priv->nlh) { - nl_handle_destroy (priv->nlh); - priv->nlh = NULL; - } - - if (priv->nlh_cb) { - nl_cb_put (priv->nlh_cb); - priv->nlh_cb = NULL; - } - - G_OBJECT_CLASS (nm_netlink_monitor_parent_class)->finalize (object); -} - -static void -nm_netlink_monitor_class_init (NMNetlinkMonitorClass *monitor_class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (monitor_class); - - g_type_class_add_private (monitor_class, sizeof (NMNetlinkMonitorPrivate)); - - /* Virtual methods */ - object_class->finalize = finalize; - - /* Signals */ - signals[CARRIER_ON] = - g_signal_new ("carrier-on", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (NMNetlinkMonitorClass, carrier_on), - NULL, NULL, g_cclosure_marshal_VOID__INT, - G_TYPE_NONE, 1, G_TYPE_INT); - - signals[CARRIER_OFF] = - g_signal_new ("carrier-off", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (NMNetlinkMonitorClass, carrier_off), - NULL, NULL, g_cclosure_marshal_VOID__INT, - G_TYPE_NONE, 1, G_TYPE_INT); - - signals[ERROR] = - g_signal_new ("error", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (NMNetlinkMonitorClass, error), - NULL, NULL, _nm_marshal_VOID__POINTER, - G_TYPE_NONE, 1, G_TYPE_POINTER); -} - -static void -netlink_object_message_handler (struct nl_object *obj, void *arg) -{ - NMNetlinkMonitor *monitor = NM_NETLINK_MONITOR (arg); + NMNetlinkMonitor *self = NM_NETLINK_MONITOR (arg); GError *error; struct rtnl_link *filter; struct rtnl_link *link_obj; guint flags; + guint ifidx; filter = rtnl_link_alloc (); if (!filter) { @@ -193,68 +99,193 @@ netlink_object_message_handler (struct nl_object *obj, void *arg) NM_NETLINK_MONITOR_ERROR_BAD_ALLOC, _("error processing netlink message: %s"), nl_geterror ()); - g_signal_emit (G_OBJECT (monitor), - signals[ERROR], - 0, error); + g_signal_emit (self, signals[ERROR], 0, error); g_error_free (error); return; } /* Ensure it's a link object */ - if (nl_object_match_filter(obj, OBJ_CAST (filter)) == 0) - goto out; + if (nl_object_match_filter (obj, OBJ_CAST (filter)) == 0) { + rtnl_link_put (filter); + return; + } link_obj = (struct rtnl_link *) obj; flags = rtnl_link_get_flags (link_obj); + ifidx = rtnl_link_get_ifindex (link_obj); + + nm_log_dbg (LOGD_HW, "netlink link message: iface idx %d flags 0x%X", ifidx, flags); /* IFF_LOWER_UP is the indicator of carrier status since kernel commit * b00055aacdb172c05067612278ba27265fcd05ce in 2.6.17. */ - if (flags & IFF_LOWER_UP) { - g_signal_emit (G_OBJECT (monitor), - signals[CARRIER_ON], - 0, rtnl_link_get_ifindex (link_obj)); - } else { - g_signal_emit (G_OBJECT (monitor), - signals[CARRIER_OFF], - 0, rtnl_link_get_ifindex (link_obj)); - } + if (flags & IFF_LOWER_UP) + g_signal_emit (self, signals[CARRIER_ON], 0, ifidx); + else + g_signal_emit (self, signals[CARRIER_OFF], 0, ifidx); -out: rtnl_link_put (filter); } static int -netlink_event_input (struct nl_msg *msg, void *arg) +event_msg_recv (struct nl_msg *msg, void *arg) { + struct nl_handle *nlh = arg; struct nlmsghdr *hdr = nlmsg_hdr (msg); + struct ucred *creds = nlmsg_get_creds (msg); + const struct sockaddr_nl *snl; + guint32 local_port; + gboolean accept_msg = FALSE; - if (hdr->nlmsg_pid != 0) - return NL_STOP; + /* Only messages sent from the kernel */ + if (!creds || creds->uid != 0) { + nm_log_dbg (LOGD_HW, "ignoring netlink message from UID %d", + creds ? creds->uid : -1); + return NL_SKIP; + } - nl_msg_parse (msg, &netlink_object_message_handler, arg); + snl = nlmsg_get_src (msg); + g_assert (snl); - /* Stop processing messages */ - return NL_STOP; + /* Accept any messages from the kernel */ + if (hdr->nlmsg_pid == 0 || snl->nl_pid == 0) + accept_msg = TRUE; + + /* And any multicast message directed to our netlink PID, since multicast + * currently requires CAP_ADMIN to use. + */ + local_port = nl_socket_get_local_port (nlh); + if ((hdr->nlmsg_pid == local_port) && snl->nl_groups) + accept_msg = TRUE; + + if (accept_msg == FALSE) { + nm_log_dbg (LOGD_HW, "ignoring netlink message from PID %d (local PID %d, multicast %d)", + hdr->nlmsg_pid, + local_port, + (hdr->nlmsg_flags & NLM_F_MULTI)); + return NL_SKIP; + } + + return NL_OK; } -gboolean -nm_netlink_monitor_open_connection (NMNetlinkMonitor *monitor, - GError **error) +static int +event_msg_ready (struct nl_msg *msg, void *arg) { + NMNetlinkMonitor *self = NM_NETLINK_MONITOR (arg); + + /* By the time the message gets here we've already checked the sender + * and we're sure it's safe to parse this message. + */ + + /* Let clients handle generic messages */ + g_signal_emit (self, signals[NOTIFICATION], 0, msg); + + /* Parse carrier messages */ + nl_msg_parse (msg, &link_msg_handler, self); + + return NL_OK; +} + +static gboolean +event_handler (GIOChannel *channel, + GIOCondition io_condition, + gpointer user_data) +{ + NMNetlinkMonitor *self = (NMNetlinkMonitor *) user_data; NMNetlinkMonitorPrivate *priv; - int fd; + GError *error = NULL; + + g_return_val_if_fail (NM_IS_NETLINK_MONITOR (self), TRUE); + + priv = NM_NETLINK_MONITOR_GET_PRIVATE (self); + g_return_val_if_fail (priv->event_id > 0, TRUE); + + if (io_condition & ERROR_CONDITIONS) { + const char *err_msg; + int err_code = 0; + socklen_t err_len = sizeof (err_code); + + /* Grab error information */ + if (getsockopt (g_io_channel_unix_get_fd (channel), + SOL_SOCKET, SO_ERROR, (void *) &err_code, &err_len)) + err_msg = strerror (err_code); + else + err_msg = _("error occurred while waiting for data on socket"); + + error = g_error_new (NM_NETLINK_MONITOR_ERROR, + NM_NETLINK_MONITOR_ERROR_WAITING_FOR_SOCKET_DATA, + "%s", err_msg); + g_signal_emit (self, signals[ERROR], 0, error); + g_error_free (error); + return TRUE; + } else if (io_condition & DISCONNECT_CONDITIONS) + return FALSE; + + g_return_val_if_fail (!(io_condition & ~EVENT_CONDITIONS), FALSE); + + /* Process the netlink messages */ + if (nl_recvmsgs_default (priv->nlh_event) < 0) { + error = g_error_new (NM_NETLINK_MONITOR_ERROR, + NM_NETLINK_MONITOR_ERROR_PROCESSING_MESSAGE, + _("error processing netlink message: %s"), + nl_geterror ()); + g_signal_emit (self, signals[ERROR], 0, error); + g_error_free (error); + } + + return TRUE; +} + +static gboolean +nlh_setup (struct nl_handle *nlh, + nl_recvmsg_msg_cb_t valid_func, + gpointer cb_data, + GError **error) +{ + nl_socket_modify_cb (nlh, NL_CB_MSG_IN, NL_CB_CUSTOM, event_msg_recv, cb_data); + + if (valid_func) + nl_socket_modify_cb (nlh, NL_CB_VALID, NL_CB_CUSTOM, valid_func, cb_data); + + if (nl_connect (nlh, NETLINK_ROUTE) < 0) { + g_set_error (error, NM_NETLINK_MONITOR_ERROR, + NM_NETLINK_MONITOR_ERROR_NETLINK_CONNECT, + _("unable to connect to netlink for monitoring link status: %s"), + nl_geterror ()); + return FALSE; + } + + /* Enable unix socket peer credentials which we use for verifying that the + * sender of the message is actually the kernel. + */ + if (nl_set_passcred (nlh, 1) < 0) { + g_set_error (error, NM_NETLINK_MONITOR_ERROR, + NM_NETLINK_MONITOR_ERROR_NETLINK_CONNECT, + _("unable to enable netlink handle credential passing: %s"), + nl_geterror ()); + return FALSE; + } + + return TRUE; +} + +static gboolean +event_connection_setup (NMNetlinkMonitor *self, GError **error) +{ + NMNetlinkMonitorPrivate *priv = NM_NETLINK_MONITOR_GET_PRIVATE (self); GError *channel_error = NULL; GIOFlags channel_flags; + struct nl_cb *cb; + int fd; - g_return_val_if_fail (NM_IS_NETLINK_MONITOR (monitor), FALSE); - - priv = NM_NETLINK_MONITOR_GET_PRIVATE (monitor); g_return_val_if_fail (priv->io_channel == NULL, FALSE); - priv->nlh_cb = nl_cb_alloc (NL_CB_VERBOSE); - priv->nlh = nl_handle_alloc_cb (priv->nlh_cb); - if (!priv->nlh) { + /* Set up the event listener connection */ + cb = nl_cb_alloc (NL_CB_VERBOSE); + priv->nlh_event = nl_handle_alloc_cb (cb); + nl_cb_put (cb); + if (!priv->nlh_event) { g_set_error (error, NM_NETLINK_MONITOR_ERROR, NM_NETLINK_MONITOR_ERROR_NETLINK_ALLOC_HANDLE, _("unable to allocate netlink handle for monitoring link status: %s"), @@ -262,35 +293,16 @@ nm_netlink_monitor_open_connection (NMNetlinkMonitor *monitor, goto error; } - nl_disable_sequence_check (priv->nlh); - nl_socket_modify_cb (priv->nlh, NL_CB_VALID, NL_CB_CUSTOM, netlink_event_input, monitor); - if (nl_connect (priv->nlh, NETLINK_ROUTE) < 0) { - g_set_error (error, NM_NETLINK_MONITOR_ERROR, - NM_NETLINK_MONITOR_ERROR_NETLINK_CONNECT, - _("unable to connect to netlink for monitoring link status: %s"), - nl_geterror ()); + if (!nlh_setup (priv->nlh_event, event_msg_ready, self, error)) goto error; - } - if (nl_socket_add_membership (priv->nlh, RTNLGRP_LINK) < 0) { - g_set_error (error, NM_NETLINK_MONITOR_ERROR, - NM_NETLINK_MONITOR_ERROR_NETLINK_JOIN_GROUP, - _("unable to join netlink group for monitoring link status: %s"), - nl_geterror ()); + nl_disable_sequence_check (priv->nlh_event); + + /* Subscribe to the LINK group for internal carrier signals */ + if (!nm_netlink_monitor_subscribe (self, RTNLGRP_LINK, error)) goto error; - } - if ((priv->nlh_link_cache = rtnl_link_alloc_cache (priv->nlh)) == NULL) { - g_set_error (error, NM_NETLINK_MONITOR_ERROR, - NM_NETLINK_MONITOR_ERROR_NETLINK_ALLOC_LINK_CACHE, - _("unable to allocate netlink link cache for monitoring link status: %s"), - nl_geterror ()); - goto error; - } - - nl_cache_mngt_provide (priv->nlh_link_cache); - - fd = nl_socket_get_fd (priv->nlh); + fd = nl_socket_get_fd (priv->nlh_event); priv->io_channel = g_io_channel_unix_new (fd); g_io_channel_set_encoding (priv->io_channel, NULL, &channel_error); @@ -312,211 +324,270 @@ nm_netlink_monitor_open_connection (NMNetlinkMonitor *monitor, error: if (priv->io_channel) - nm_netlink_monitor_close_connection (monitor); + nm_netlink_monitor_close_connection (self); - if (priv->nlh_link_cache) { - nl_cache_free (priv->nlh_link_cache); - priv->nlh_link_cache = NULL; + if (priv->nlh_event) { + nl_handle_destroy (priv->nlh_event); + priv->nlh_event = NULL; } - if (priv->nlh) { - nl_handle_destroy (priv->nlh); - priv->nlh = NULL; - } - - if (priv->nlh_cb) { - nl_cb_put (priv->nlh_cb); - priv->nlh_cb = NULL; - } return FALSE; } -void -nm_netlink_monitor_close_connection (NMNetlinkMonitor *monitor) -{ - NMNetlinkMonitorPrivate *priv; - - g_return_if_fail (NM_IS_NETLINK_MONITOR (monitor)); - - priv = NM_NETLINK_MONITOR_GET_PRIVATE (monitor); - g_return_if_fail (priv->io_channel != NULL); - - if (priv->event_id) - nm_netlink_monitor_detach (monitor); - - g_io_channel_shutdown (priv->io_channel, - TRUE /* flush pending data */, - NULL); - - g_io_channel_unref (priv->io_channel); - priv->io_channel = NULL; -} - -GQuark -nm_netlink_monitor_error_quark (void) -{ - static GQuark error_quark = 0; - - if (error_quark == 0) - error_quark = g_quark_from_static_string ("nm-netlink-monitor-error-quark"); - - return error_quark; -} - -void -nm_netlink_monitor_attach (NMNetlinkMonitor *monitor) -{ - NMNetlinkMonitorPrivate *priv; - - g_return_if_fail (NM_IS_NETLINK_MONITOR (monitor)); - - priv = NM_NETLINK_MONITOR_GET_PRIVATE (monitor); - g_return_if_fail (priv->nlh != NULL); - g_return_if_fail (priv->event_id == 0); - - priv->event_id = g_io_add_watch (priv->io_channel, - (NM_NETLINK_MONITOR_EVENT_CONDITIONS | - NM_NETLINK_MONITOR_ERROR_CONDITIONS | - NM_NETLINK_MONITOR_DISCONNECT_CONDITIONS), - nm_netlink_monitor_event_handler, - monitor); -} - -void -nm_netlink_monitor_detach (NMNetlinkMonitor *monitor) -{ - NMNetlinkMonitorPrivate *priv; - - g_return_if_fail (NM_IS_NETLINK_MONITOR (monitor)); - - priv = NM_NETLINK_MONITOR_GET_PRIVATE (monitor); - g_return_if_fail (priv->event_id > 0); - - g_source_remove (priv->event_id); - priv->event_id = 0; -} - static gboolean -deferred_emit_carrier_state (gpointer user_data) +sync_connection_setup (NMNetlinkMonitor *self, GError **error) { - NMNetlinkMonitor *monitor = NM_NETLINK_MONITOR (user_data); - NMNetlinkMonitorPrivate *priv = NM_NETLINK_MONITOR_GET_PRIVATE (monitor); + NMNetlinkMonitorPrivate *priv = NM_NETLINK_MONITOR_GET_PRIVATE (self); + struct nl_cb *cb; +#ifdef LIBNL_NEEDS_ADDR_CACHING_WORKAROUND + struct nl_cache *addr_cache; +#endif - priv->request_status_id = 0; + /* Set up the event listener connection */ + cb = nl_cb_alloc (NL_CB_VERBOSE); + priv->nlh_sync = nl_handle_alloc_cb (cb); + nl_cb_put (cb); + if (!priv->nlh_sync) { + g_set_error (error, NM_NETLINK_MONITOR_ERROR, + NM_NETLINK_MONITOR_ERROR_NETLINK_ALLOC_HANDLE, + _("unable to allocate netlink handle for monitoring link status: %s"), + nl_geterror ()); + goto error; + } - /* Update the link cache with latest state, and if there are no errors - * emit the link states for all the interfaces in the cache. + if (!nlh_setup (priv->nlh_sync, NULL, self, error)) + goto error; + +#ifdef LIBNL_NEEDS_ADDR_CACHING_WORKAROUND + /* Work around apparent libnl bug; rtnl_addr requires that all + * addresses have the "peer" attribute set in order to be compared + * for equality, but this attribute is not normally set. As a + * result, most addresses will not compare as equal even to + * themselves, busting caching. */ - if (nl_cache_refill (priv->nlh, priv->nlh_link_cache)) - nm_warning ("error updating link cache: %s", nl_geterror ()); - else { - nl_cache_foreach_filter (priv->nlh_link_cache, - NULL, - netlink_object_message_handler, - monitor); + addr_cache = rtnl_addr_alloc_cache (priv->nlh_sync); + nl_cache_get_ops (addr_cache)->co_obj_ops->oo_id_attrs &= ~0x80; + nl_cache_free (addr_cache); +#endif + + if ((priv->link_cache = rtnl_link_alloc_cache (priv->nlh_sync)) == NULL) { + g_set_error (error, NM_NETLINK_MONITOR_ERROR, + NM_NETLINK_MONITOR_ERROR_NETLINK_ALLOC_LINK_CACHE, + _("unable to allocate netlink link cache for monitoring link status: %s"), + nl_geterror ()); + goto error; + } + nl_cache_mngt_provide (priv->link_cache); + + return TRUE; + +error: + if (priv->link_cache) { + nl_cache_free (priv->link_cache); + priv->link_cache = NULL; + } + + if (priv->nlh_sync) { + nl_handle_destroy (priv->nlh_sync); + priv->nlh_sync = NULL; } return FALSE; } gboolean -nm_netlink_monitor_request_status (NMNetlinkMonitor *monitor, - GError **error) +nm_netlink_monitor_open_connection (NMNetlinkMonitor *self, GError **error) +{ + g_return_val_if_fail (self != NULL, FALSE); + g_return_val_if_fail (NM_IS_NETLINK_MONITOR (self), FALSE); + + if (!event_connection_setup (self, error)) + return FALSE; + + if (!sync_connection_setup (self, error)) + return FALSE; + + return TRUE; +} + +void +nm_netlink_monitor_close_connection (NMNetlinkMonitor *self) { NMNetlinkMonitorPrivate *priv; - g_return_val_if_fail (NM_IS_NETLINK_MONITOR (monitor), FALSE); + g_return_if_fail (NM_IS_NETLINK_MONITOR (self)); - priv = NM_NETLINK_MONITOR_GET_PRIVATE (monitor); - g_return_val_if_fail (priv->event_id > 0, FALSE); + priv = NM_NETLINK_MONITOR_GET_PRIVATE (self); + g_return_if_fail (priv->io_channel != NULL); + + if (priv->event_id) + nm_netlink_monitor_detach (self); + + g_io_channel_shutdown (priv->io_channel, + TRUE /* flush pending data */, + NULL); + g_io_channel_unref (priv->io_channel); + priv->io_channel = NULL; +} + +void +nm_netlink_monitor_attach (NMNetlinkMonitor *self) +{ + NMNetlinkMonitorPrivate *priv; + + g_return_if_fail (NM_IS_NETLINK_MONITOR (self)); + + priv = NM_NETLINK_MONITOR_GET_PRIVATE (self); + g_return_if_fail (priv->nlh_event != NULL); + g_return_if_fail (priv->event_id == 0); + + priv->event_id = g_io_add_watch (priv->io_channel, + (EVENT_CONDITIONS | ERROR_CONDITIONS | DISCONNECT_CONDITIONS), + event_handler, self); +} + +void +nm_netlink_monitor_detach (NMNetlinkMonitor *self) +{ + NMNetlinkMonitorPrivate *priv; + + g_return_if_fail (NM_IS_NETLINK_MONITOR (self)); + + priv = NM_NETLINK_MONITOR_GET_PRIVATE (self); + g_return_if_fail (priv->event_id > 0); + + g_source_remove (priv->event_id); + priv->event_id = 0; +} + +static int +get_subs (NMNetlinkMonitor *self, int group) +{ + NMNetlinkMonitorPrivate *priv = NM_NETLINK_MONITOR_GET_PRIVATE (self); + + return GPOINTER_TO_INT (g_hash_table_lookup (priv->subscriptions, + GINT_TO_POINTER (group))); +} + +static void +set_subs (NMNetlinkMonitor *self, int group, int new_subs) +{ + NMNetlinkMonitorPrivate *priv = NM_NETLINK_MONITOR_GET_PRIVATE (self); + + g_hash_table_insert (priv->subscriptions, + GINT_TO_POINTER (group), + GINT_TO_POINTER (new_subs)); +} + +gboolean +nm_netlink_monitor_subscribe (NMNetlinkMonitor *self, int group, GError **error) +{ + NMNetlinkMonitorPrivate *priv; + int subs; + + g_return_val_if_fail (NM_IS_NETLINK_MONITOR (self), FALSE); + + priv = NM_NETLINK_MONITOR_GET_PRIVATE (self); + + if (!priv->nlh_event) { + if (!nm_netlink_monitor_open_connection (self, error)) + return FALSE; + } + + subs = get_subs (self, group) + 1; + if (subs == 1) { + if (nl_socket_add_membership (priv->nlh_event, group) < 0) { + g_set_error (error, NM_NETLINK_MONITOR_ERROR, + NM_NETLINK_MONITOR_ERROR_NETLINK_JOIN_GROUP, + _("unable to join netlink group: %s"), + nl_geterror ()); + return FALSE; + } + } + + /* Update # of subscriptions for this group */ + set_subs (self, group, subs); + + return TRUE; +} + +void +nm_netlink_monitor_unsubscribe (NMNetlinkMonitor *self, int group) +{ + NMNetlinkMonitorPrivate *priv; + int subs; + + g_return_if_fail (self != NULL); + g_return_if_fail (NM_IS_NETLINK_MONITOR (self)); + + priv = NM_NETLINK_MONITOR_GET_PRIVATE (self); + g_return_if_fail (priv->nlh_event != NULL); + + subs = get_subs (self, group) - 1; + if (subs == 0) + nl_socket_drop_membership (priv->nlh_event, group); + + /* Update # of subscriptions for this group */ + set_subs (self, group, subs); +} + +/***************************************************************/ + +gboolean +nm_netlink_monitor_request_ip6_info (NMNetlinkMonitor *self, GError **error) +{ + NMNetlinkMonitorPrivate *priv; + + g_return_val_if_fail (self != NULL, FALSE); + g_return_val_if_fail (NM_IS_NETLINK_MONITOR (self), FALSE); + + priv = NM_NETLINK_MONITOR_GET_PRIVATE (self); + + /* FIXME: nl_rtgen_request() gets the return value screwed up with + * libnl-1.1; revisit this and return a proper error when we port to + * a later libnl. + */ + nl_rtgen_request (priv->nlh_event, RTM_GETLINK, AF_INET6, NLM_F_DUMP); + + return TRUE; +} + + +static gboolean +deferred_emit_carrier_state (gpointer user_data) +{ + NMNetlinkMonitor *self = NM_NETLINK_MONITOR (user_data); + NMNetlinkMonitorPrivate *priv = NM_NETLINK_MONITOR_GET_PRIVATE (self); + + priv->request_status_id = 0; + + /* Update the link cache with latest state, and if there are no errors + * emit the link states for all the interfaces in the cache. + */ + if (nl_cache_refill (priv->nlh_sync, priv->link_cache)) { + nm_log_err (LOGD_HW, "error updating link cache: %s", nl_geterror ()); + } else + nl_cache_foreach_filter (priv->link_cache, NULL, link_msg_handler, self); + + return FALSE; +} + +gboolean +nm_netlink_monitor_request_status (NMNetlinkMonitor *self, GError **error) +{ + NMNetlinkMonitorPrivate *priv; + + g_return_val_if_fail (NM_IS_NETLINK_MONITOR (self), FALSE); + + priv = NM_NETLINK_MONITOR_GET_PRIVATE (self); /* Schedule the carrier state emission */ if (!priv->request_status_id) - priv->request_status_id = g_idle_add (deferred_emit_carrier_state, monitor); + priv->request_status_id = g_idle_add (deferred_emit_carrier_state, self); return TRUE; } -static gboolean -nm_netlink_monitor_event_handler (GIOChannel *channel, - GIOCondition io_condition, - gpointer user_data) -{ - NMNetlinkMonitor *monitor = (NMNetlinkMonitor *) user_data; - NMNetlinkMonitorPrivate *priv; - GError *error = NULL; - - g_return_val_if_fail (NM_IS_NETLINK_MONITOR (monitor), TRUE); - - priv = NM_NETLINK_MONITOR_GET_PRIVATE (monitor); - g_return_val_if_fail (priv->event_id > 0, TRUE); - - if (io_condition & NM_NETLINK_MONITOR_ERROR_CONDITIONS) - return nm_netlink_monitor_error_handler (channel, io_condition, monitor); - else if (io_condition & NM_NETLINK_MONITOR_DISCONNECT_CONDITIONS) - return nm_netlink_monitor_disconnect_handler (channel, io_condition, monitor); - - g_return_val_if_fail (!(io_condition & ~(NM_NETLINK_MONITOR_EVENT_CONDITIONS)), FALSE); - - if (nl_recvmsgs_default (priv->nlh) < 0) { - error = g_error_new (NM_NETLINK_MONITOR_ERROR, - NM_NETLINK_MONITOR_ERROR_PROCESSING_MESSAGE, - _("error processing netlink message: %s"), - nl_geterror ()); - - g_signal_emit (G_OBJECT (monitor), - signals[ERROR], - 0, error); - g_error_free (error); - } - - return TRUE; -} - -static gboolean -nm_netlink_monitor_error_handler (GIOChannel *channel, - GIOCondition io_condition, - NMNetlinkMonitor *monitor) -{ - GError *socket_error; - const char *err_msg; - int err_code; - socklen_t err_len; - - g_return_val_if_fail (io_condition & NM_NETLINK_MONITOR_ERROR_CONDITIONS, FALSE); - - err_code = 0; - err_len = sizeof (err_code); - if (getsockopt (g_io_channel_unix_get_fd (channel), - SOL_SOCKET, SO_ERROR, (void *) &err_code, &err_len)) - err_msg = strerror (err_code); - else - err_msg = _("error occurred while waiting for data on socket"); - - socket_error = g_error_new (NM_NETLINK_MONITOR_ERROR, - NM_NETLINK_MONITOR_ERROR_WAITING_FOR_SOCKET_DATA, - "%s", - err_msg); - - g_signal_emit (G_OBJECT (monitor), - signals[ERROR], - 0, socket_error); - - g_error_free (socket_error); - - return TRUE; -} - -static gboolean -nm_netlink_monitor_disconnect_handler (GIOChannel *channel, - GIOCondition io_condition, - NMNetlinkMonitor *monitor) -{ - - g_return_val_if_fail (!(io_condition & ~(NM_NETLINK_MONITOR_DISCONNECT_CONDITIONS)), FALSE); - return FALSE; -} - typedef struct { NMNetlinkMonitor *self; struct rtnl_link *filter; @@ -551,7 +622,20 @@ nm_netlink_monitor_get_flags_sync (NMNetlinkMonitor *self, priv = NM_NETLINK_MONITOR_GET_PRIVATE (self); /* Update the link cache with the latest information */ - if (nl_cache_refill (priv->nlh, priv->nlh_link_cache)) { + if (nl_cache_refill (priv->nlh_sync, priv->link_cache)) { + g_set_error (error, + NM_NETLINK_MONITOR_ERROR, + NM_NETLINK_MONITOR_ERROR_LINK_CACHE_UPDATE, + _("error updating link cache: %s"), + nl_geterror ()); + return FALSE; + } + + /* HACK: Apparently to get it working we have to refill the cache twice; + * otherwise some kernels (or maybe libnl?) only send a few of the + * interfaces in the refill request. + */ + if (nl_cache_refill (priv->nlh_sync, priv->link_cache)) { g_set_error (error, NM_NETLINK_MONITOR_ERROR, NM_NETLINK_MONITOR_ERROR_LINK_CACHE_UPDATE, @@ -576,7 +660,7 @@ nm_netlink_monitor_get_flags_sync (NMNetlinkMonitor *self, info.self = self; info.filter = filter; info.error = NULL; - nl_cache_foreach_filter (priv->nlh_link_cache, NULL, get_flags_sync_cb, &info); + nl_cache_foreach_filter (priv->link_cache, NULL, get_flags_sync_cb, &info); rtnl_link_put (filter); @@ -592,3 +676,191 @@ nm_netlink_monitor_get_flags_sync (NMNetlinkMonitor *self, return TRUE; /* success */ } +/***************************************************************/ + +struct nl_handle * +nm_netlink_get_default_handle (void) +{ + NMNetlinkMonitor *self; + struct nl_handle *nlh; + + self = nm_netlink_monitor_get (); + nlh = NM_NETLINK_MONITOR_GET_PRIVATE (self)->nlh_sync; + g_object_unref (self); + + return nlh; +} + +int +nm_netlink_iface_to_index (const char *iface) +{ + NMNetlinkMonitor *self; + NMNetlinkMonitorPrivate *priv; + int idx; + + g_return_val_if_fail (iface != NULL, -1); + + self = nm_netlink_monitor_get (); + priv = NM_NETLINK_MONITOR_GET_PRIVATE (self); + + nl_cache_refill (priv->nlh_sync, priv->link_cache); + idx = rtnl_link_name2i (priv->link_cache, iface); + g_object_unref (self); + + return idx; +} + +#define MAX_IFACE_LEN 33 +char * +nm_netlink_index_to_iface (int idx) +{ + NMNetlinkMonitor *self; + NMNetlinkMonitorPrivate *priv; + char *buf = NULL; + + g_return_val_if_fail (idx >= 0, NULL); + + self = nm_netlink_monitor_get (); + priv = NM_NETLINK_MONITOR_GET_PRIVATE (self); + + buf = g_malloc0 (MAX_IFACE_LEN); + g_assert (buf); + + nl_cache_refill (priv->nlh_sync, priv->link_cache); + if (!rtnl_link_i2name (priv->link_cache, idx, buf, MAX_IFACE_LEN - 1)) { + g_free (buf); + buf = NULL; + } + + g_object_unref (self); + return buf; +} + +struct rtnl_link * +nm_netlink_index_to_rtnl_link (int idx) +{ + NMNetlinkMonitor *self; + NMNetlinkMonitorPrivate *priv; + struct rtnl_link *ret = NULL; + + if (idx <= 0) + return NULL; + + self = nm_netlink_monitor_get (); + priv = NM_NETLINK_MONITOR_GET_PRIVATE (self); + + nl_cache_refill (priv->nlh_sync, priv->link_cache); + ret = rtnl_link_get (priv->link_cache, idx); + g_object_unref (self); + + return ret; +} + +/***************************************************************/ + +NMNetlinkMonitor * +nm_netlink_monitor_get (void) +{ + static NMNetlinkMonitor *singleton = NULL; + + if (!singleton) + singleton = NM_NETLINK_MONITOR (g_object_new (NM_TYPE_NETLINK_MONITOR, NULL)); + else + g_object_ref (singleton); + + return singleton; +} + +static void +nm_netlink_monitor_init (NMNetlinkMonitor *self) +{ + NMNetlinkMonitorPrivate *priv = NM_NETLINK_MONITOR_GET_PRIVATE (self); + + priv->subscriptions = g_hash_table_new (g_direct_hash, g_direct_equal); +} + +static void +finalize (GObject *object) +{ + NMNetlinkMonitorPrivate *priv = NM_NETLINK_MONITOR_GET_PRIVATE (object); + + if (priv->request_status_id) + g_source_remove (priv->request_status_id); + + if (priv->io_channel) + nm_netlink_monitor_close_connection (NM_NETLINK_MONITOR (object)); + + if (priv->link_cache) { + nl_cache_free (priv->link_cache); + priv->link_cache = NULL; + } + + if (priv->nlh_event) { + nl_handle_destroy (priv->nlh_event); + priv->nlh_event = NULL; + } + + if (priv->nlh_sync) { + nl_handle_destroy (priv->nlh_sync); + priv->nlh_sync = NULL; + } + + g_hash_table_destroy (priv->subscriptions); + + G_OBJECT_CLASS (nm_netlink_monitor_parent_class)->finalize (object); +} + +static void +nm_netlink_monitor_class_init (NMNetlinkMonitorClass *monitor_class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (monitor_class); + + g_type_class_add_private (monitor_class, sizeof (NMNetlinkMonitorPrivate)); + + /* Virtual methods */ + object_class->finalize = finalize; + + /* Signals */ + signals[NOTIFICATION] = + g_signal_new ("notification", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (NMNetlinkMonitorClass, notification), + NULL, NULL, g_cclosure_marshal_VOID__POINTER, + G_TYPE_NONE, 1, G_TYPE_POINTER); + + signals[CARRIER_ON] = + g_signal_new ("carrier-on", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (NMNetlinkMonitorClass, carrier_on), + NULL, NULL, g_cclosure_marshal_VOID__INT, + G_TYPE_NONE, 1, G_TYPE_INT); + + signals[CARRIER_OFF] = + g_signal_new ("carrier-off", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (NMNetlinkMonitorClass, carrier_off), + NULL, NULL, g_cclosure_marshal_VOID__INT, + G_TYPE_NONE, 1, G_TYPE_INT); + + signals[ERROR] = + g_signal_new ("error", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (NMNetlinkMonitorClass, error), + NULL, NULL, g_cclosure_marshal_VOID__POINTER, + G_TYPE_NONE, 1, G_TYPE_POINTER); +} + +GQuark +nm_netlink_monitor_error_quark (void) +{ + static GQuark error_quark = 0; + + if (G_UNLIKELY (error_quark == 0)) + error_quark = g_quark_from_static_string ("nm-netlink-monitor-error-quark"); + return error_quark; +} + diff --git a/src/nm-netlink-monitor.h b/src/nm-netlink-monitor.h index 115eccaaa3..8b57a312d7 100644 --- a/src/nm-netlink-monitor.h +++ b/src/nm-netlink-monitor.h @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2005 - 2008 Red Hat, Inc. + * Copyright (C) 2005 - 2010 Red Hat, Inc. * Copyright (C) 2005 - 2008 Novell, Inc. * Copyright (C) 2005 Ray Strode */ @@ -25,16 +25,15 @@ #include #include +#include +#include -G_BEGIN_DECLS - -#define NM_TYPE_NETLINK_MONITOR (nm_netlink_monitor_get_type ()) -#define NM_NETLINK_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_NETLINK_MONITOR, NMNetlinkMonitor)) +#define NM_TYPE_NETLINK_MONITOR (nm_netlink_monitor_get_type ()) +#define NM_NETLINK_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_NETLINK_MONITOR, NMNetlinkMonitor)) #define NM_NETLINK_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_NETLINK_MONITOR, NMNetlinkMonitorClass)) -#define NM_IS_NETLINK_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_NETLINK_MONITOR)) +#define NM_IS_NETLINK_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_NETLINK_MONITOR)) #define NM_IS_NETLINK_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_NETLINK_MONITOR)) #define NM_NETLINK_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_NETLINK_MONITOR, NMNetlinkMonitorClass)) -#define NM_NETLINK_MONITOR_ERROR (nm_netlink_monitor_error_quark ()) typedef enum { NM_NETLINK_MONITOR_ERROR_GENERIC = 0, @@ -56,29 +55,45 @@ typedef struct { GObjectClass parent_class; /* Signals */ - void (*carrier_on) (NMNetlinkMonitor *monitor, int index); - void (*carrier_off) (NMNetlinkMonitor *monitor, int index); - void (*error) (NMNetlinkMonitor *monitor, GError *error); + void (*notification) (NMNetlinkMonitor *monitor, struct nl_msg *msg); + void (*carrier_on) (NMNetlinkMonitor *monitor, int index); + void (*carrier_off) (NMNetlinkMonitor *monitor, int index); + void (*error) (NMNetlinkMonitor *monitor, GError *error); } NMNetlinkMonitorClass; -GType nm_netlink_monitor_get_type (void) G_GNUC_CONST; -GQuark nm_netlink_monitor_error_quark (void) G_GNUC_CONST; +#define NM_NETLINK_MONITOR_ERROR (nm_netlink_monitor_error_quark ()) +GType nm_netlink_monitor_get_type (void) G_GNUC_CONST; +GQuark nm_netlink_monitor_error_quark (void) G_GNUC_CONST; NMNetlinkMonitor *nm_netlink_monitor_get (void); -gboolean nm_netlink_monitor_open_connection (NMNetlinkMonitor *monitor, - GError **error); +gboolean nm_netlink_monitor_open_connection (NMNetlinkMonitor *monitor, + GError **error); void nm_netlink_monitor_close_connection (NMNetlinkMonitor *monitor); -void nm_netlink_monitor_attach (NMNetlinkMonitor *monitor); -void nm_netlink_monitor_detach (NMNetlinkMonitor *monitor); +void nm_netlink_monitor_attach (NMNetlinkMonitor *monitor); +void nm_netlink_monitor_detach (NMNetlinkMonitor *monitor); + +gboolean nm_netlink_monitor_subscribe (NMNetlinkMonitor *monitor, + int group, + GError **error); +void nm_netlink_monitor_unsubscribe (NMNetlinkMonitor *monitor, + int group); + +gboolean nm_netlink_monitor_request_ip6_info (NMNetlinkMonitor *monitor, + GError **error); + gboolean nm_netlink_monitor_request_status (NMNetlinkMonitor *monitor, - GError **error); + GError **error); gboolean nm_netlink_monitor_get_flags_sync (NMNetlinkMonitor *monitor, guint32 ifindex, guint32 *ifflags, GError **error); -G_END_DECLS +/* Generic utility functions */ +int nm_netlink_iface_to_index (const char *iface); +char * nm_netlink_index_to_iface (int idx); +struct rtnl_link *nm_netlink_index_to_rtnl_link (int idx); +struct nl_handle *nm_netlink_get_default_handle (void); #endif /* NM_NETLINK_MONITOR_H */ diff --git a/src/nm-netlink.c b/src/nm-netlink.c deleted file mode 100644 index ad68790db1..0000000000 --- a/src/nm-netlink.c +++ /dev/null @@ -1,149 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* NetworkManager -- Network link manager - * - * 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Copyright (C) 2007 - 2008 Red Hat, Inc. - */ - -#include "config.h" - -#include "nm-netlink.h" -#include "nm-utils.h" - -#include -#include -#include -#include -#include - -static struct nl_cache * link_cache = NULL; -static struct nl_handle * def_nl_handle = NULL; - - -static struct nl_cache * -get_link_cache (void) -{ - struct nl_handle * nlh; - - nlh = nm_netlink_get_default_handle (); - if (G_UNLIKELY (!nlh)) { - nm_warning ("couldn't allocate netlink handle."); - return NULL; - } - - if (G_UNLIKELY (!link_cache)) - link_cache = rtnl_link_alloc_cache (nlh); - - if (G_UNLIKELY (!link_cache)) { - nm_warning ("couldn't allocate netlink link cache: %s", nl_geterror ()); - return NULL; - } - - nl_cache_update (nlh, link_cache); - return link_cache; -} - - -struct nl_handle * -nm_netlink_get_default_handle (void) -{ - struct nl_cb *cb; -#ifdef LIBNL_NEEDS_ADDR_CACHING_WORKAROUND - struct nl_cache *addr_cache; -#endif - - if (def_nl_handle) - return def_nl_handle; - - cb = nl_cb_alloc(NL_CB_VERBOSE); - def_nl_handle = nl_handle_alloc_cb (cb); - if (!def_nl_handle) { - nm_warning ("couldn't allocate netlink handle."); - return NULL; - } - - if (nl_connect (def_nl_handle, NETLINK_ROUTE) < 0) { - nm_error ("couldn't connect to netlink: %s", nl_geterror ()); - return NULL; - } - -#ifdef LIBNL_NEEDS_ADDR_CACHING_WORKAROUND - /* Work around apparent libnl bug; rtnl_addr requires that all - * addresses have the "peer" attribute set in order to be compared - * for equality, but this attribute is not normally set. As a - * result, most addresses will not compare as equal even to - * themselves, busting caching. - */ - addr_cache = rtnl_addr_alloc_cache (def_nl_handle); - nl_cache_get_ops (addr_cache)->co_obj_ops->oo_id_attrs &= ~0x80; - nl_cache_free (addr_cache); -#endif - - return def_nl_handle; -} - -int -nm_netlink_iface_to_index (const char *iface) -{ - struct nl_cache * cache; - - g_return_val_if_fail (iface != NULL, -1); - - cache = get_link_cache (); - if (!cache) - return RTNL_LINK_NOT_FOUND; - - return rtnl_link_name2i (cache, iface); -} - - -#define MAX_IFACE_LEN 33 -char * -nm_netlink_index_to_iface (int idx) -{ - struct nl_cache * cache; - char * buf = NULL; - - cache = get_link_cache (); - if (!cache) - return NULL; - - buf = g_malloc0 (MAX_IFACE_LEN); - if (buf == NULL) { - nm_warning ("Not enough memory to allocate interface name buffer."); - return NULL; - } - - if (rtnl_link_i2name (cache, idx, buf, MAX_IFACE_LEN - 1) == NULL) { - g_free (buf); - buf = NULL; - } - - return buf; -} - -struct rtnl_link * -nm_netlink_index_to_rtnl_link (int idx) -{ - struct nl_cache *cache; - - cache = get_link_cache (); - if (!cache) - return NULL; - - return rtnl_link_get (cache, idx); -} - diff --git a/src/nm-policy-hostname.c b/src/nm-policy-hostname.c new file mode 100644 index 0000000000..a273a9202f --- /dev/null +++ b/src/nm-policy-hostname.c @@ -0,0 +1,205 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager -- Network link manager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2004 - 2010 Red Hat, Inc. + * Copyright (C) 2007 - 2008 Novell, Inc. + */ + +#include +#include +#include +#include +#include + +#include + +#include "nm-logging.h" +#include "nm-policy-hostname.h" +#include "nm-policy-hosts.h" + +/************************************************************************/ + +struct HostnameThread { + GThread *thread; + + GMutex *lock; + gboolean dead; + int ret; + + guint32 ip4_addr; + char hostname[NI_MAXHOST + 1]; + + HostnameThreadCallback callback; + gpointer user_data; +}; + +static gboolean +hostname_thread_run_cb (gpointer user_data) +{ + HostnameThread *ht = (HostnameThread *) user_data; + const char *hostname = NULL; + + if (strlen (ht->hostname)) + hostname = ht->hostname; + + (*ht->callback) (ht, ht->ret, hostname, ht->user_data); + return FALSE; +} + +static gpointer +hostname_thread_worker (gpointer data) +{ + HostnameThread *ht = (HostnameThread *) data; + struct sockaddr_in addr; + int i; + + g_mutex_lock (ht->lock); + if (ht->dead) { + g_mutex_unlock (ht->lock); + return (gpointer) NULL; + } + g_mutex_unlock (ht->lock); + + addr.sin_family = AF_INET; + addr.sin_addr.s_addr = ht->ip4_addr; + + ht->ret = getnameinfo ((struct sockaddr *) &addr, sizeof (struct sockaddr_in), + ht->hostname, NI_MAXHOST, NULL, 0, + NI_NAMEREQD); + if (ht->ret == 0) { + for (i = 0; i < strlen (ht->hostname); i++) + ht->hostname[i] = tolower (ht->hostname[i]); + } + + /* Don't track the idle handler ID because by the time the g_idle_add() + * returns the ID, the handler may already have run and freed the + * HostnameThread. + */ + g_idle_add (hostname_thread_run_cb, ht); + return (gpointer) TRUE; +} + +void +hostname_thread_free (HostnameThread *ht) +{ + g_return_if_fail (ht != NULL); + + g_mutex_free (ht->lock); + memset (ht, 0, sizeof (HostnameThread)); + g_free (ht); +} + +HostnameThread * +hostname_thread_new (guint32 ip4_addr, HostnameThreadCallback callback, gpointer user_data) +{ + HostnameThread *ht; + + ht = g_malloc0 (sizeof (HostnameThread)); + g_assert (ht); + + ht->lock = g_mutex_new (); + ht->callback = callback; + ht->user_data = user_data; + ht->ip4_addr = ip4_addr; + + ht->thread = g_thread_create (hostname_thread_worker, ht, FALSE, NULL); + if (!ht->thread) { + hostname_thread_free (ht); + ht = NULL; + } + + return ht; +} + +void +hostname_thread_kill (HostnameThread *ht) +{ + g_return_if_fail (ht != NULL); + + g_mutex_lock (ht->lock); + ht->dead = TRUE; + g_mutex_unlock (ht->lock); +} + +gboolean +hostname_thread_is_dead (HostnameThread *ht) +{ + g_return_val_if_fail (ht != NULL, TRUE); + + return ht->dead; +} + +/************************************************************************/ + +#define FALLBACK_HOSTNAME "localhost.localdomain" + +gboolean +nm_policy_set_system_hostname (const char *new_hostname, const char *msg) +{ + char old_hostname[HOST_NAME_MAX + 1]; + int ret = 0; + const char *name; + gboolean set_hostname = TRUE, changed = FALSE; + + if (new_hostname) + g_warn_if_fail (strlen (new_hostname)); + + name = (new_hostname && strlen (new_hostname)) ? new_hostname : FALLBACK_HOSTNAME; + + old_hostname[HOST_NAME_MAX] = '\0'; + errno = 0; + ret = gethostname (old_hostname, HOST_NAME_MAX); + if (ret != 0) { + nm_log_warn (LOGD_DNS, "couldn't get the system hostname: (%d) %s", + errno, strerror (errno)); + } else { + /* Don't set the hostname if it isn't actually changing */ + if ( (new_hostname && !strcmp (old_hostname, new_hostname)) + || (!new_hostname && !strcmp (old_hostname, FALLBACK_HOSTNAME))) + set_hostname = FALSE; + } + + if (set_hostname) { + nm_log_info (LOGD_DNS, "Setting system hostname to '%s' (%s)", name, msg); + ret = sethostname (name, strlen (name)); + if (ret != 0) { + nm_log_warn (LOGD_DNS, "couldn't set the system hostname to '%s': (%d) %s", + name, errno, strerror (errno)); + return FALSE; + } + } + + /* But even if the hostname isn't changing, always try updating /etc/hosts + * just in case the hostname changed while NM wasn't running; we need to + * make sure that /etc/hosts has valid mappings for '127.0.0.1' and the + * current system hostname. If those exist, + * nm_policy_hosts_update_etc_hosts() will just return and won't touch + * /etc/hosts at all. + */ + if (!nm_policy_hosts_update_etc_hosts (name, FALLBACK_HOSTNAME, &changed)) { + /* error updating /etc/hosts; fallback to localhost.localdomain */ + nm_log_info (LOGD_DNS, "Setting system hostname to '" FALLBACK_HOSTNAME "' (error updating /etc/hosts)"); + ret = sethostname (FALLBACK_HOSTNAME, strlen (FALLBACK_HOSTNAME)); + if (ret != 0) { + nm_log_warn (LOGD_DNS, "couldn't set the fallback system hostname (%s): (%d) %s", + FALLBACK_HOSTNAME, errno, strerror (errno)); + } + } + + return changed; +} + diff --git a/src/nm-policy-hostname.h b/src/nm-policy-hostname.h new file mode 100644 index 0000000000..c59ca41078 --- /dev/null +++ b/src/nm-policy-hostname.h @@ -0,0 +1,47 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager -- Network link manager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2004 - 2010 Red Hat, Inc. + * Copyright (C) 2007 - 2008 Novell, Inc. + */ + +#ifndef NM_POLICY_HOSTNAME_H +#define NM_POLICY_HOSTNAME_H + +#include + +gboolean nm_policy_set_system_hostname (const char *new_hostname, const char *msg); + + +typedef struct HostnameThread HostnameThread; + +typedef void (*HostnameThreadCallback) (HostnameThread *ht, + int error, + const char *hostname, + gpointer user_data); + +HostnameThread * hostname_thread_new (guint32 ip4_addr, + HostnameThreadCallback callback, + gpointer user_data); + +void hostname_thread_free (HostnameThread *ht); + +gboolean hostname_thread_is_dead (HostnameThread *ht); + +void hostname_thread_kill (HostnameThread *ht); + +#endif /* NM_POLICY_HOSTNAME_H */ diff --git a/src/nm-policy-hosts.c b/src/nm-policy-hosts.c new file mode 100644 index 0000000000..7723c99759 --- /dev/null +++ b/src/nm-policy-hosts.c @@ -0,0 +1,235 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager -- Network link manager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2004 - 2010 Red Hat, Inc. + */ + +#include +#include +#include +#include +#include + +#include "nm-policy-hosts.h" +#include "nm-logging.h" + +gboolean +nm_policy_hosts_find_token (const char *line, const char *token) +{ + const char *start = line, *p = line; + + g_return_val_if_fail (line != NULL, FALSE); + g_return_val_if_fail (token != NULL, FALSE); + g_return_val_if_fail (strlen (token) > 0, FALSE); + + /* Walk through the line to find the next whitespace character */ + while (p <= line + strlen (line)) { + if (isblank (*p) || (*p == '\0')) { + /* Token starts with 'start' and ends with 'end' */ + if ((p > start) && *start && (p - start == strlen (token)) && !strncmp (start, token, (p - start))) + return TRUE; /* found */ + + /* not found; advance start and continue looking */ + start = p + 1; + } + p++; + } + + return FALSE; +} + +static gboolean +is_local_mapping (const char *str, const char *hostname) +{ + return ( !strncmp (str, "127.0.0.1", strlen ("127.0.0.1")) + && nm_policy_hosts_find_token (str, hostname ? hostname : "localhost")); +} + +GString * +nm_policy_get_etc_hosts (const char **lines, + gsize existing_len, + const char *hostname, + const char *fallback_hostname, + GError **error) +{ + GString *contents = NULL; + const char **line; + gboolean found_host_nonlocal = FALSE; + gboolean found_host = FALSE; + gboolean found_localhost = FALSE; + gboolean initial_comments = TRUE; + gboolean added = FALSE; + + g_return_val_if_fail (lines != NULL, FALSE); + g_return_val_if_fail (hostname != NULL, FALSE); + + /* /etc/hosts needs at least two things: + * + * 1) current hostname mapped to any address + * 2) 'localhost' mapped to 127.0.0.1 + * + * If both these conditions exist in /etc/hosts, we don't need to bother + * updating the file. + */ + + /* Look for the two cases from above */ + for (line = lines; lines && *line; line++) { + if (strlen (*line) && (*line[0] != '#')) { + if (nm_policy_hosts_find_token (*line, hostname)) { + if (!is_local_mapping (*line, "localhost")) { + /* hostname is not on a 127.0.0.1 line or the line does not + * contain 'localhost'. + */ + found_host_nonlocal = TRUE; + } + found_host = TRUE; + } + + if (is_local_mapping (*line, "localhost")) { + /* a 127.0.0.1 line containing 'localhost' */ + found_localhost = TRUE; + } + } + + if (found_localhost && found_host) + return NULL; /* No update required */ + } + + contents = g_string_sized_new (existing_len ? existing_len + 100 : 200); + if (!contents) { + g_set_error_literal (error, 0, 0, "not enough memory"); + return NULL; + } + + /* Construct the new hosts file; replace any 127.0.0.1 entry that is at the + * beginning of the file or right after initial comments and contains + * the string 'localhost'. If there is no 127.0.0.1 entry at the beginning + * or after initial comments that contains 'localhost', add one there + * and ignore any other 127.0.0.1 entries that contain 'localhost'. + */ + for (line = lines, initial_comments = TRUE; lines && *line; line++) { + gboolean add_line = TRUE; + + /* This is the first line after the initial comments */ + if (strlen (*line) && initial_comments && (*line[0] != '#')) { + initial_comments = FALSE; + + /* If some other line contained the hostname but not 'localhost', + * make a simple localhost mapping and assume the user knows what + * they are doing with their manual hostname entry. Otherwise if + * the hostname wasn't found somewhere else, add it to the localhost + * mapping line to make sure it's mapped to something. + */ + if (found_host_nonlocal) + g_string_append (contents, "127.0.0.1"); + else + g_string_append_printf (contents, "127.0.0.1\t%s", hostname); + + if (strcmp (hostname, fallback_hostname)) { + g_string_append_printf (contents, "\t%s", fallback_hostname); + /* Don't add a standalone 'localhost.localdomain' 127 mapping */ + if (is_local_mapping (*line, fallback_hostname)) + add_line = FALSE; + } + + g_string_append (contents, "\tlocalhost\n"); + added = TRUE; + + /* Don't add the original line if it is a 'localhost' mapping */ + if (is_local_mapping (*line, "localhost")) + add_line = FALSE; + } + + if (add_line) { + g_string_append (contents, *line); + /* Only append the new line if this isn't the last line in the file */ + if (*(line+1)) + g_string_append_c (contents, '\n'); + } + } + + /* Hmm, /etc/hosts was empty for some reason */ + if (!added) { + g_string_append (contents, "# Do not remove the following line, or various programs\n"); + g_string_append (contents, "# that require network functionality will fail.\n"); + g_string_append_printf (contents, "127.0.0.1\t%s\tlocalhost\n", fallback_hostname); + } + + return contents; +} + +gboolean +nm_policy_hosts_update_etc_hosts (const char *hostname, + const char *fallback_hostname, + gboolean *out_changed) +{ + char *contents = NULL; + char **lines = NULL; + GError *error = NULL; + GString *new_contents = NULL; + gsize contents_len = 0; + gboolean success = FALSE; + + g_return_val_if_fail (hostname != NULL, FALSE); + g_return_val_if_fail (out_changed != NULL, FALSE); + + if (!g_file_get_contents (SYSCONFDIR "/hosts", &contents, &contents_len, &error)) { + nm_log_warn (LOGD_DNS, "couldn't read " SYSCONFDIR "/hosts: (%d) %s", + error ? error->code : 0, + (error && error->message) ? error->message : "(unknown)"); + g_clear_error (&error); + return FALSE; + } + + /* Get the new /etc/hosts contents */ + lines = g_strsplit_set (contents, "\n\r", 0); + new_contents = nm_policy_get_etc_hosts ((const char **) lines, + contents_len, + hostname, + fallback_hostname, + &error); + g_strfreev (lines); + g_free (contents); + + if (new_contents) { + nm_log_info (LOGD_DNS, "Updating /etc/hosts with new system hostname"); + + g_clear_error (&error); + /* And actually update /etc/hosts */ + if (!g_file_set_contents (SYSCONFDIR "/hosts", new_contents->str, -1, &error)) { + nm_log_warn (LOGD_DNS, "couldn't update " SYSCONFDIR "/hosts: (%d) %s", + error ? error->code : 0, + (error && error->message) ? error->message : "(unknown)"); + g_clear_error (&error); + } else { + success = TRUE; + *out_changed = TRUE; + } + + g_string_free (new_contents, TRUE); + } else if (!error) { + /* No change required */ + success = TRUE; + } else { + nm_log_warn (LOGD_DNS, "couldn't read " SYSCONFDIR "/hosts: (%d) %s", + error->code, error->message ? error->message : "(unknown)"); + g_clear_error (&error); + } + + return success; +} + diff --git a/src/nm-policy-hosts.h b/src/nm-policy-hosts.h new file mode 100644 index 0000000000..0a77e6678a --- /dev/null +++ b/src/nm-policy-hosts.h @@ -0,0 +1,40 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager -- Network link manager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2004 - 2010 Red Hat, Inc. + */ + +#ifndef NM_POLICY_HOSTS_H +#define NM_POLICT_HOSTS_H + +#include + +gboolean nm_policy_hosts_update_etc_hosts (const char *hostname, + const char *fallback_hostname, + gboolean *out_changed); + +/* Only for testcases; don't use outside of nm-policy-hosts.c */ +gboolean nm_policy_hosts_find_token (const char *line, const char *token); + +GString *nm_policy_get_etc_hosts (const char **lines, + gsize existing_len, + const char *hostname, + const char *fallback_hostname, + GError **error); + +#endif /* NM_POLICY_HOSTS_H */ + diff --git a/src/NetworkManagerPolicy.c b/src/nm-policy.c similarity index 66% rename from src/NetworkManagerPolicy.c rename to src/nm-policy.c index 5b860aae0a..a7bd96f1bb 100644 --- a/src/NetworkManagerPolicy.c +++ b/src/nm-policy.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2004 - 2008 Red Hat, Inc. + * Copyright (C) 2004 - 2010 Red Hat, Inc. * Copyright (C) 2007 - 2008 Novell, Inc. */ @@ -25,40 +25,24 @@ #include #include -#include "NetworkManagerPolicy.h" +#include "nm-policy.h" #include "NetworkManagerUtils.h" -#include "NetworkManagerAP.h" +#include "nm-wifi-ap.h" #include "nm-activation-request.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-device-interface.h" #include "nm-device.h" #include "nm-device-wifi.h" #include "nm-device-ethernet.h" +#include "nm-device-modem.h" #include "nm-dbus-manager.h" #include "nm-setting-ip4-config.h" #include "nm-setting-connection.h" -#include "NetworkManagerSystem.h" +#include "nm-system.h" #include "nm-named-manager.h" #include "nm-vpn-manager.h" -#include "nm-modem.h" - -typedef struct LookupThread LookupThread; - -typedef void (*LookupCallback) (LookupThread *thread, gpointer user_data); - -struct LookupThread { - GThread *thread; - - GMutex *lock; - gboolean die; - int ret; - - guint32 ip4_addr; - char hostname[NI_MAXHOST + 1]; - - LookupCallback callback; - gpointer user_data; -}; +#include "nm-policy-hosts.h" +#include "nm-policy-hostname.h" struct NMPolicy { NMManager *manager; @@ -71,97 +55,14 @@ struct NMPolicy { gulong vpn_activated_id; gulong vpn_deactivated_id; - NMDevice *default_device; + NMDevice *default_device4; + NMDevice *default_device6; - LookupThread *lookup; + HostnameThread *lookup; + + char *orig_hostname; /* hostname at NM start time */ }; -static gboolean -lookup_thread_run_cb (gpointer user_data) -{ - LookupThread *thread = (LookupThread *) user_data; - - (*thread->callback) (thread, thread->user_data); - return FALSE; -} - -static gpointer -lookup_thread_worker (gpointer data) -{ - LookupThread *thread = (LookupThread *) data; - struct sockaddr_in addr; - - g_mutex_lock (thread->lock); - if (thread->die) { - g_mutex_unlock (thread->lock); - return (gpointer) NULL; - } - g_mutex_unlock (thread->lock); - - addr.sin_family = AF_INET; - addr.sin_addr.s_addr = thread->ip4_addr; - - thread->ret = getnameinfo ((struct sockaddr *) &addr, sizeof (struct sockaddr_in), - thread->hostname, NI_MAXHOST, NULL, 0, - NI_NAMEREQD); - if (thread->ret == 0) { - int i; - - for (i = 0; i < strlen (thread->hostname); i++) - thread->hostname[i] = tolower (thread->hostname[i]); - } - - /* Don't track the idle handler ID because by the time the g_idle_add() - * returns the ID, the handler may already have run and freed the - * LookupThread. - */ - g_idle_add (lookup_thread_run_cb, thread); - return (gpointer) TRUE; -} - -static void -lookup_thread_free (LookupThread *thread) -{ - g_return_if_fail (thread != NULL); - - g_mutex_free (thread->lock); - memset (thread, 0, sizeof (LookupThread)); - g_free (thread); -} - -static LookupThread * -lookup_thread_new (guint32 ip4_addr, LookupCallback callback, gpointer user_data) -{ - LookupThread *thread; - - thread = g_malloc0 (sizeof (LookupThread)); - if (!thread) - return NULL; - - thread->lock = g_mutex_new (); - thread->callback = callback; - thread->user_data = user_data; - thread->ip4_addr = ip4_addr; - - thread->thread = g_thread_create (lookup_thread_worker, thread, FALSE, NULL); - if (!thread->thread) { - lookup_thread_free (thread); - return NULL; - } - - return thread; -} - -static void -lookup_thread_die (LookupThread *thread) -{ - g_return_if_fail (thread != NULL); - - g_mutex_lock (thread->lock); - thread->die = TRUE; - g_mutex_unlock (thread->lock); -} - #define INVALID_TAG "invalid" static const char * @@ -178,7 +79,7 @@ get_connection_id (NMConnection *connection) } static NMDevice * -get_best_device (NMManager *manager, NMActRequest **out_req) +get_best_ip4_device (NMManager *manager, NMActRequest **out_req) { GSList *devices, *iter; NMDevice *best = NULL; @@ -232,7 +133,7 @@ get_best_device (NMManager *manager, NMActRequest **out_req) } } - if (!can_default && !NM_IS_MODEM (dev)) + if (!can_default && !NM_IS_DEVICE_MODEM (dev)) continue; /* 'never-default' devices can't ever be the default */ @@ -250,154 +151,107 @@ get_best_device (NMManager *manager, NMActRequest **out_req) return best; } -#define FALLBACK_HOSTNAME "localhost.localdomain" - -static gboolean -update_etc_hosts (const char *hostname) +static NMDevice * +get_best_ip6_device (NMManager *manager, NMActRequest **out_req) { - char *contents = NULL; - char **lines = NULL, **line; - GError *error = NULL; - gboolean initial_comments = TRUE; - gboolean added = FALSE; - gsize contents_len = 0; - GString *new_contents; - gboolean success = FALSE; + GSList *devices, *iter; + NMDevice *best = NULL; + int best_prio = G_MAXINT; - g_return_val_if_fail (hostname != NULL, FALSE); + g_return_val_if_fail (manager != NULL, NULL); + g_return_val_if_fail (NM_IS_MANAGER (manager), NULL); + g_return_val_if_fail (out_req != NULL, NULL); + g_return_val_if_fail (*out_req == NULL, NULL); - if (!g_file_get_contents (SYSCONFDIR "/hosts", &contents, &contents_len, &error)) { - nm_warning ("%s: couldn't read " SYSCONFDIR "/hosts: (%d) %s", - __func__, error ? error->code : 0, - (error && error->message) ? error->message : "(unknown)"); - if (error) - g_error_free (error); - } else { - lines = g_strsplit_set (contents, "\n\r", 0); - g_free (contents); - } + devices = nm_manager_get_devices (manager); + for (iter = devices; iter; iter = g_slist_next (iter)) { + NMDevice *dev = NM_DEVICE (iter->data); + NMActRequest *req; + NMConnection *connection; + NMIP6Config *ip6_config; + NMSettingIP6Config *s_ip6; + int prio; + guint i; + gboolean can_default = FALSE; + const char *method = NULL; - new_contents = g_string_sized_new (contents_len ? contents_len + 100 : 200); - if (!new_contents) { - nm_warning ("%s: not enough memory to update " SYSCONFDIR "/hosts", __func__); - return FALSE; - } + if (nm_device_get_state (dev) != NM_DEVICE_STATE_ACTIVATED) + continue; - /* Replace any 127.0.0.1 entry that is at the beginning of the file or right - * after initial comments. If there is no 127.0.0.1 entry at the beginning - * or after initial comments, add one there and ignore any other 127.0.0.1 - * entries. - */ - for (line = lines; lines && *line; line++) { - gboolean add_line = TRUE; + ip6_config = nm_device_get_ip6_config (dev); + if (!ip6_config) + continue; - /* This is the first line after the initial comments */ - if (initial_comments && (*line[0] != '#')) { - initial_comments = FALSE; - g_string_append_printf (new_contents, "127.0.0.1\t%s", hostname); - if (strcmp (hostname, FALLBACK_HOSTNAME)) - g_string_append_printf (new_contents, "\t" FALLBACK_HOSTNAME); - g_string_append (new_contents, "\tlocalhost\n"); - added = TRUE; + req = nm_device_get_act_request (dev); + g_assert (req); + connection = nm_act_request_get_connection (req); + g_assert (connection); - /* Don't add the entry if it's supposed to be the actual localhost reverse mapping */ - if (!strncmp (*line, "127.0.0.1", strlen ("127.0.0.1")) && strstr (*line, "localhost")) - add_line = FALSE; - } + /* Never set the default route through an IPv4LL-addressed device */ + s_ip6 = (NMSettingIP6Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG); + if (s_ip6) + method = nm_setting_ip6_config_get_method (s_ip6); - if (add_line) { - g_string_append (new_contents, *line); - /* Only append the new line if this isn't the last line in the file */ - if (*(line+1)) - g_string_append_c (new_contents, '\n'); - } - } + if (method && !strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_LINK_LOCAL)) + continue; - /* Hmm, /etc/hosts was empty for some reason */ - if (!added) { - g_string_append (new_contents, "# Do not remove the following line, or various programs"); - g_string_append (new_contents, "# that require network functionality will fail."); - g_string_append (new_contents, "127.0.0.1\t" FALLBACK_HOSTNAME "\tlocalhost"); - } + /* Make sure at least one of this device's IP addresses has a gateway */ + for (i = 0; i < nm_ip6_config_get_num_addresses (ip6_config); i++) { + NMIP6Address *addr; - error = NULL; - if (!g_file_set_contents (SYSCONFDIR "/hosts", new_contents->str, -1, &error)) { - nm_warning ("%s: couldn't update " SYSCONFDIR "/hosts: (%d) %s", - __func__, error ? error->code : 0, - (error && error->message) ? error->message : "(unknown)"); - if (error) - g_error_free (error); - } else - success = TRUE; - - g_string_free (new_contents, TRUE); - return success; -} - -static void -set_system_hostname (const char *new_hostname, const char *msg) -{ - char old_hostname[HOST_NAME_MAX + 1]; - int ret = 0; - const char *name = new_hostname ? new_hostname : FALLBACK_HOSTNAME; - - old_hostname[HOST_NAME_MAX] = '\0'; - errno = 0; - ret = gethostname (old_hostname, HOST_NAME_MAX); - if (ret != 0) { - nm_warning ("%s: couldn't get the system hostname: (%d) %s", - __func__, errno, strerror (errno)); - } else { - /* Do nothing if the hostname isn't actually changing */ - if ( (new_hostname && !strcmp (old_hostname, new_hostname)) - || (!new_hostname && !strcmp (old_hostname, FALLBACK_HOSTNAME))) - return; - } - - nm_info ("Setting system hostname to '%s' (%s)", name, msg); - - ret = sethostname (name, strlen (name)); - if (ret == 0) { - if (!update_etc_hosts (name)) { - /* error updating /etc/hosts; fallback to localhost.localdomain */ - nm_info ("Setting system hostname to '" FALLBACK_HOSTNAME "' (error updating /etc/hosts)"); - ret = sethostname (FALLBACK_HOSTNAME, strlen (FALLBACK_HOSTNAME)); - if (ret != 0) { - nm_warning ("%s: couldn't set the fallback system hostname (%s): (%d) %s", - __func__, FALLBACK_HOSTNAME, errno, strerror (errno)); + addr = nm_ip6_config_get_address (ip6_config, i); + if (nm_ip6_address_get_gateway (addr)) { + can_default = TRUE; + break; } } - nm_utils_call_dispatcher ("hostname", NULL, NULL, NULL); - } else { - nm_warning ("%s: couldn't set the system hostname to '%s': (%d) %s", - __func__, name, errno, strerror (errno)); + + if (!can_default && !NM_IS_DEVICE_MODEM (dev)) + continue; + + /* 'never-default' devices can't ever be the default */ + if (s_ip6 && nm_setting_ip6_config_get_never_default (s_ip6)) + continue; + + prio = nm_device_get_priority (dev); + if (prio > 0 && prio < best_prio) { + best = dev; + best_prio = prio; + *out_req = req; + } } + + return best; } static void -lookup_callback (LookupThread *thread, gpointer user_data) +_set_hostname (const char *new_hostname, const char *msg) +{ + if (nm_policy_set_system_hostname (new_hostname, msg)) + nm_utils_call_dispatcher ("hostname", NULL, NULL, NULL); +} + +static void +lookup_callback (HostnameThread *thread, + int result, + const char *hostname, + gpointer user_data) { NMPolicy *policy = (NMPolicy *) user_data; + char *msg; - /* If the thread was told to die or it's not the current in-progress - * hostname lookup, nothing to do. - */ - if (thread->die || (thread != policy->lookup)) - goto done; - - policy->lookup = NULL; - if (!strlen (thread->hostname)) { - char *msg; - - /* No valid IP4 config (!!); fall back to localhost.localdomain */ - msg = g_strdup_printf ("address lookup failed: %d", thread->ret); - set_system_hostname (NULL, msg); - g_free (msg); - } else - set_system_hostname (thread->hostname, "from address lookup"); - -done: - lookup_thread_free (thread); + /* Update the hostname if the calling lookup thread is the in-progress one */ + if (!hostname_thread_is_dead (thread) && (thread == policy->lookup)) { + policy->lookup = NULL; + if (!hostname) { + /* No valid IP4 config (!!); fall back to localhost.localdomain */ + msg = g_strdup_printf ("address lookup failed: %d", result); + _set_hostname (NULL, msg); + g_free (msg); + } else + _set_hostname (hostname, "from address lookup"); + } + hostname_thread_free (thread); } static void @@ -412,57 +266,75 @@ update_system_hostname (NMPolicy *policy, NMDevice *best) g_return_if_fail (policy != NULL); if (policy->lookup) { - lookup_thread_die (policy->lookup); + hostname_thread_kill (policy->lookup); policy->lookup = NULL; } - /* A configured hostname (via the system-settings service) overrides - * all automatic hostname determination. If there is no configured hostname, - * the best device's automatically determined hostname (from DHCP, VPN, PPP, - * etc) is used. If there is no automatically determined hostname, reverse - * DNS lookup using the best device's IP address is started to determined the - * the hostname. + /* Hostname precedence order: + * + * 1) a configured hostname (from system-settings) + * 2) automatic hostname from the default device's config (DHCP, VPN, etc) + * 3) the original hostname when NM started + * 4) reverse-DNS of the best device's IPv4 address + * */ - /* Try a configured hostname first */ + /* Try a persistent hostname first */ g_object_get (G_OBJECT (policy->manager), NM_MANAGER_HOSTNAME, &configured_hostname, NULL); if (configured_hostname) { - set_system_hostname (configured_hostname, "from system configuration"); + _set_hostname (configured_hostname, "from system configuration"); g_free (configured_hostname); return; } /* Try automatically determined hostname from the best device's IP config */ if (!best) - best = get_best_device (policy->manager, &best_req); + best = get_best_ip4_device (policy->manager, &best_req); if (!best) { - /* No best device; fall back to localhost.localdomain */ - set_system_hostname (NULL, "no default device"); + /* No best device; fall back to original hostname or if there wasn't + * one, 'localhost.localdomain' + */ + _set_hostname (policy->orig_hostname, "no default device"); return; } /* Grab a hostname out of the device's DHCP4 config */ dhcp4_config = nm_device_get_dhcp4_config (best); if (dhcp4_config) { - const char *dhcp4_hostname; + const char *dhcp4_hostname, *p; - dhcp4_hostname = nm_dhcp4_config_get_option (dhcp4_config, "host_name"); + p = dhcp4_hostname = nm_dhcp4_config_get_option (dhcp4_config, "host_name"); if (dhcp4_hostname && strlen (dhcp4_hostname)) { - set_system_hostname (dhcp4_hostname, "from DHCP"); - return; + /* Sanity check */ + while (*p) { + if (!isblank (*p++)) { + _set_hostname (dhcp4_hostname, "from DHCP"); + return; + } + } + nm_log_warn (LOGD_DNS, "DHCP-provided hostname '%s' looks invalid; ignoring it", + dhcp4_hostname); } } - /* No configured hostname, no automatically determined hostname either. Start - * reverse DNS of the current IP address to try and find it. + /* If no automatically-configured hostname, try using the hostname from + * when NM started up. + */ + if (policy->orig_hostname) { + _set_hostname (policy->orig_hostname, "from system startup"); + return; + } + + /* No configured hostname, no automatically determined hostname, and + * no bootup hostname. Start reverse DNS of the current IP address. */ ip4_config = nm_device_get_ip4_config (best); if ( !ip4_config || (nm_ip4_config_get_num_nameservers (ip4_config) == 0) || (nm_ip4_config_get_num_addresses (ip4_config) == 0)) { /* No valid IP4 config (!!); fall back to localhost.localdomain */ - set_system_hostname (NULL, "no IPv4 config"); + _set_hostname (NULL, "no IPv4 config"); return; } @@ -470,15 +342,15 @@ update_system_hostname (NMPolicy *policy, NMDevice *best) g_assert (addr); /* checked for > 1 address above */ /* Start the hostname lookup thread */ - policy->lookup = lookup_thread_new (nm_ip4_address_get_address (addr), lookup_callback, policy); + policy->lookup = hostname_thread_new (nm_ip4_address_get_address (addr), lookup_callback, policy); if (!policy->lookup) { /* Fall back to 'localhost.localdomain' */ - set_system_hostname (NULL, "error starting hostname thread"); + _set_hostname (NULL, "error starting hostname thread"); } } static void -update_routing_and_dns (NMPolicy *policy, gboolean force_update) +update_ip4_routing_and_dns (NMPolicy *policy, gboolean force_update) { NMNamedIPConfigType dns_type = NM_NAMED_IP_CONFIG_TYPE_BEST_DEVICE; NMDevice *best = NULL; @@ -492,10 +364,10 @@ update_routing_and_dns (NMPolicy *policy, gboolean force_update) NMSettingConnection *s_con = NULL; const char *connection_id; - best = get_best_device (policy->manager, &best_req); + best = get_best_ip4_device (policy->manager, &best_req); if (!best) goto out; - if (!force_update && (best == policy->default_device)) + if (!force_update && (best == policy->default_device4)) goto out; /* If a VPN connection is active, it is preferred */ @@ -554,8 +426,8 @@ update_routing_and_dns (NMPolicy *policy, gboolean force_update) } if (!ip_iface || !ip4_config) { - nm_warning ("%s: couldn't determine IP interface (%p) or IPv4 config (%p)!", - __func__, ip_iface, ip4_config); + nm_log_warn (LOGD_CORE, "couldn't determine IP interface (%p) or IPv4 config (%p)!", + ip_iface, ip4_config); goto out; } @@ -588,16 +460,150 @@ update_routing_and_dns (NMPolicy *policy, gboolean force_update) s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION); connection_id = s_con ? nm_setting_connection_get_id (s_con) : NULL; - if (connection_id) - nm_info ("Policy set '%s' (%s) as default for routing and DNS.", connection_id, ip_iface); - else - nm_info ("Policy set (%s) as default for routing and DNS.", ip_iface); + if (connection_id) { + nm_log_info (LOGD_CORE, "Policy set '%s' (%s) as default for IPv4 routing and DNS.", connection_id, ip_iface); + } else { + nm_log_info (LOGD_CORE, "Policy set (%s) as default for IPv4 routing and DNS.", ip_iface); + } out: - /* Update the system hostname */ - update_system_hostname (policy, best); + policy->default_device4 = best; +} - policy->default_device = best; +static void +update_ip6_routing_and_dns (NMPolicy *policy, gboolean force_update) +{ + NMNamedIPConfigType dns_type = NM_NAMED_IP_CONFIG_TYPE_BEST_DEVICE; + NMDevice *best = NULL; + NMActRequest *best_req = NULL; + NMNamedManager *named_mgr; + GSList *devices = NULL, *iter; +#if NOT_YET + GSList *vpns; +#endif + NMIP6Config *ip6_config = NULL; + NMIP6Address *addr; + const char *ip_iface = NULL; + NMConnection *connection = NULL; + NMSettingConnection *s_con = NULL; + const char *connection_id; + + best = get_best_ip6_device (policy->manager, &best_req); + if (!best) + goto out; + if (!force_update && (best == policy->default_device6)) + goto out; + +#if NOT_YET + /* If a VPN connection is active, it is preferred */ + vpns = nm_vpn_manager_get_active_connections (policy->vpn_manager); + for (iter = vpns; iter; iter = g_slist_next (iter)) { + NMVPNConnection *candidate = NM_VPN_CONNECTION (iter->data); + NMConnection *vpn_connection; + NMSettingIP6Config *s_ip6; + gboolean can_default = TRUE; + NMVPNConnectionState vpn_state; + + /* If it's marked 'never-default', don't make it default */ + vpn_connection = nm_vpn_connection_get_connection (candidate); + g_assert (vpn_connection); + s_ip6 = (NMSettingIP6Config *) nm_connection_get_setting (vpn_connection, NM_TYPE_SETTING_IP6_CONFIG); + if (s_ip6 && nm_setting_ip6_config_get_never_default (s_ip6)) + can_default = FALSE; + + vpn_state = nm_vpn_connection_get_vpn_state (candidate); + if (can_default && (vpn_state == NM_VPN_CONNECTION_STATE_ACTIVATED)) { + NMIP6Config *parent_ip6; + NMDevice *parent; + + ip_iface = nm_vpn_connection_get_ip_iface (candidate); + connection = nm_vpn_connection_get_connection (candidate); + ip6_config = nm_vpn_connection_get_ip6_config (candidate); + addr = nm_ip6_config_get_address (ip6_config, 0); + + parent = nm_vpn_connection_get_parent_device (candidate); + parent_ip6 = nm_device_get_ip6_config (parent); + + nm_system_replace_default_ip6_route_vpn (ip_iface, + nm_ip6_address_get_gateway (addr), + nm_vpn_connection_get_ip4_internal_gateway (candidate), + nm_ip6_config_get_mss (ip4_config), + nm_device_get_ip_iface (parent), + nm_ip6_config_get_mss (parent_ip4)); + + dns_type = NM_NAMED_IP_CONFIG_TYPE_VPN; + } + g_object_unref (candidate); + } + g_slist_free (vpns); +#endif + + /* The best device gets the default route if a VPN connection didn't */ + if (!ip_iface || !ip6_config) { + connection = nm_act_request_get_connection (best_req); + ip_iface = nm_device_get_ip_iface (best); + ip6_config = nm_device_get_ip6_config (best); + g_assert (ip6_config); + addr = nm_ip6_config_get_address (ip6_config, 0); + + nm_system_replace_default_ip6_route (ip_iface, nm_ip6_address_get_gateway (addr)); + + dns_type = NM_NAMED_IP_CONFIG_TYPE_BEST_DEVICE; + } + + if (!ip_iface || !ip6_config) { + nm_log_warn (LOGD_CORE, "couldn't determine IP interface (%p) or IPv6 config (%p)!", + ip_iface, ip6_config); + goto out; + } + + /* Update the default active connection. Only mark the new default + * active connection after setting default = FALSE on all other connections + * first. The order is important, we don't want two connections marked + * default at the same time ever. + */ + devices = nm_manager_get_devices (policy->manager); + for (iter = devices; iter; iter = g_slist_next (iter)) { + NMDevice *dev = NM_DEVICE (iter->data); + NMActRequest *req; + + req = nm_device_get_act_request (dev); + if (req && (req != best_req)) + nm_act_request_set_default6 (req, FALSE); + } + + named_mgr = nm_named_manager_get (); + nm_named_manager_add_ip6_config (named_mgr, ip_iface, ip6_config, dns_type); + g_object_unref (named_mgr); + + /* Now set new default active connection _after_ updating DNS info, so that + * if the connection is shared dnsmasq picks up the right stuff. + */ + if (best_req) + nm_act_request_set_default6 (best_req, TRUE); + + if (connection) + s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION); + + connection_id = s_con ? nm_setting_connection_get_id (s_con) : NULL; + if (connection_id) { + nm_log_info (LOGD_CORE, "Policy set '%s' (%s) as default for IPv6 routing and DNS.", connection_id, ip_iface); + } else { + nm_log_info (LOGD_CORE, "Policy set (%s) as default for IPv6 routing and DNS.", ip_iface); + } + +out: + policy->default_device6 = best; +} + +static void +update_routing_and_dns (NMPolicy *policy, gboolean force_update) +{ + update_ip4_routing_and_dns (policy, force_update); + update_ip6_routing_and_dns (policy, force_update); + + /* Update the system hostname */ + update_system_hostname (policy, policy->default_device4); } typedef struct { @@ -660,8 +666,8 @@ auto_activate_device (gpointer user_data) s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (best_connection, NM_TYPE_SETTING_CONNECTION)); g_assert (s_con); - nm_warning ("Connection '%s' auto-activation failed: (%d) %s", - nm_setting_connection_get_id (s_con), error->code, error->message); + nm_log_info (LOGD_DEVICE, "Connection '%s' auto-activation failed: (%d) %s", + nm_setting_connection_get_id (s_con), error->code, error->message); g_error_free (error); } } @@ -786,18 +792,37 @@ device_state_changed (NMDevice *device, /* Mark the connection invalid if it failed during activation so that * it doesn't get automatically chosen over and over and over again. */ - if (connection && IS_ACTIVATING_STATE (old_state)) { - g_object_set_data (G_OBJECT (connection), INVALID_TAG, GUINT_TO_POINTER (TRUE)); - nm_info ("Marking connection '%s' invalid.", get_connection_id (connection)); - nm_connection_clear_secrets (connection); + if (connection) { + gboolean fail = FALSE; + + if (IS_ACTIVATING_STATE (old_state)) { + nm_log_info (LOGD_DEVICE, "Marking connection '%s' invalid.", get_connection_id (connection)); + fail = TRUE; + } else if ( (old_state == NM_DEVICE_STATE_ACTIVATED) + && (reason == NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED)) { + nm_log_info (LOGD_DEVICE, "Marking connection '%s' invalid because IP configuration expired.", + get_connection_id (connection)); + fail = TRUE; + } + + if (fail) { + g_object_set_data (G_OBJECT (connection), INVALID_TAG, GUINT_TO_POINTER (TRUE)); + nm_connection_clear_secrets (connection); + } } schedule_activate_check (policy, device, 3); break; case NM_DEVICE_STATE_ACTIVATED: - /* Clear the invalid tag on the connection */ - if (connection) + if (connection) { + /* Clear the invalid tag on the connection */ g_object_set_data (G_OBJECT (connection), INVALID_TAG, NULL); + /* And clear secrets so they will always be requested from the + * settings service when the next connection is made. + */ + nm_connection_clear_secrets (connection); + } + update_routing_and_dns (policy, FALSE); break; case NM_DEVICE_STATE_UNMANAGED: @@ -812,9 +837,9 @@ device_state_changed (NMDevice *device, } static void -device_ip4_config_changed (NMDevice *device, - GParamSpec *pspec, - gpointer user_data) +device_ip_config_changed (NMDevice *device, + GParamSpec *pspec, + gpointer user_data) { update_routing_and_dns ((NMPolicy *) user_data, TRUE); } @@ -856,7 +881,12 @@ device_added (NMManager *manager, NMDevice *device, gpointer user_data) policy->dev_signal_ids = add_device_signal_id (policy->dev_signal_ids, id, device); id = g_signal_connect (device, "notify::" NM_DEVICE_INTERFACE_IP4_CONFIG, - G_CALLBACK (device_ip4_config_changed), + G_CALLBACK (device_ip_config_changed), + policy); + policy->dev_signal_ids = add_device_signal_id (policy->dev_signal_ids, id, device); + + id = g_signal_connect (device, "notify::" NM_DEVICE_INTERFACE_IP6_CONFIG, + G_CALLBACK (device_ip_config_changed), policy); policy->dev_signal_ids = add_device_signal_id (policy->dev_signal_ids, id, device); @@ -973,8 +1003,8 @@ connection_removed (NMManager *manager, GError *error = NULL; if (!nm_manager_deactivate_connection (manager, path, NM_DEVICE_STATE_REASON_CONNECTION_REMOVED, &error)) { - nm_warning ("Connection '%s' disappeared, but error deactivating it: (%d) %s", - nm_setting_connection_get_id (s_con), error->code, error->message); + nm_log_warn (LOGD_DEVICE, "Connection '%s' disappeared, but error deactivating it: (%d) %s", + nm_setting_connection_get_id (s_con), error->code, error->message); g_error_free (error); } g_free (path); @@ -988,6 +1018,7 @@ nm_policy_new (NMManager *manager, NMVPNManager *vpn_manager) NMPolicy *policy; static gboolean initialized = FALSE; gulong id; + char hostname[HOST_NAME_MAX + 2]; g_return_val_if_fail (NM_IS_MANAGER (manager), NULL); g_return_val_if_fail (initialized == FALSE, NULL); @@ -996,6 +1027,14 @@ nm_policy_new (NMManager *manager, NMVPNManager *vpn_manager) policy->manager = g_object_ref (manager); policy->update_state_id = 0; + /* Grab hostname on startup and use that if nothing provides one */ + memset (hostname, 0, sizeof (hostname)); + if (gethostname (&hostname[0], HOST_NAME_MAX) == 0) { + /* only cache it if it's a valid hostname */ + if (strlen (hostname) && strcmp (hostname, "localhost") && strcmp (hostname, "localhost.localdomain")) + policy->orig_hostname = g_strdup (hostname); + } + policy->vpn_manager = g_object_ref (vpn_manager); id = g_signal_connect (policy->vpn_manager, "connection-activated", G_CALLBACK (vpn_connection_activated), policy); @@ -1058,7 +1097,7 @@ nm_policy_destroy (NMPolicy *policy) * by the lookup thread callback. */ if (policy->lookup) { - lookup_thread_die (policy->lookup); + hostname_thread_kill (policy->lookup); policy->lookup = NULL; } @@ -1086,6 +1125,8 @@ nm_policy_destroy (NMPolicy *policy) } g_slist_free (policy->dev_signal_ids); + g_free (policy->orig_hostname); + g_object_unref (policy->manager); g_free (policy); } diff --git a/src/NetworkManagerPolicy.h b/src/nm-policy.h similarity index 100% rename from src/NetworkManagerPolicy.h rename to src/nm-policy.h diff --git a/src/nm-properties-changed-signal.c b/src/nm-properties-changed-signal.c index 8d6c3a4a22..4a9db8afa9 100644 --- a/src/nm-properties-changed-signal.c +++ b/src/nm-properties-changed-signal.c @@ -106,7 +106,7 @@ properties_changed (gpointer data) { char buf[2048] = { 0, }; g_hash_table_foreach (info->hash, add_to_string, &buf); - g_message ("%s: %s -> %s", __func__, G_OBJECT_TYPE_NAME (object), buf); + nm_log_dbg (LOGD_CORE, "%s -> %s", G_OBJECT_TYPE_NAME (object), buf); } #endif diff --git a/src/nm-secrets-provider-interface.c b/src/nm-secrets-provider-interface.c index 9bbde7a394..47b8e57efa 100644 --- a/src/nm-secrets-provider-interface.c +++ b/src/nm-secrets-provider-interface.c @@ -25,7 +25,7 @@ #include #include -#include "nm-utils.h" +#include "nm-logging.h" static void nm_secrets_provider_interface_init (gpointer g_iface) @@ -108,7 +108,7 @@ nm_secrets_provider_interface_get_secrets (NMSecretsProviderInterface *self, connection, setting_name, request_new, caller, hint1, hint2, &success); if (!success) { - nm_warning ("failed to get connection secrets."); + nm_log_warn (LOGD_CORE, "failed to get connection secrets."); return FALSE; } @@ -193,7 +193,7 @@ nm_secrets_provider_interface_get_secrets_result (NMSecretsProviderInterface *se hash = g_hash_table_lookup (settings, name); if (!hash) { - nm_warning ("couldn't get setting secrets for '%s'", name); + nm_log_warn (LOGD_CORE, "couldn't get setting secrets for '%s'", name); continue; } diff --git a/src/nm-secrets-provider-interface.h b/src/nm-secrets-provider-interface.h index 299e8c2dc8..3d9e08b186 100644 --- a/src/nm-secrets-provider-interface.h +++ b/src/nm-secrets-provider-interface.h @@ -28,8 +28,7 @@ typedef enum { SECRETS_CALLER_NONE = 0, SECRETS_CALLER_ETHERNET, SECRETS_CALLER_WIFI, - SECRETS_CALLER_GSM, - SECRETS_CALLER_CDMA, + SECRETS_CALLER_MOBILE_BROADBAND, SECRETS_CALLER_PPP, SECRETS_CALLER_VPN } RequestSecretsCaller; diff --git a/src/NetworkManagerSystem.c b/src/nm-system.c similarity index 74% rename from src/NetworkManagerSystem.c rename to src/nm-system.c index c514a221e7..35aa36a111 100644 --- a/src/NetworkManagerSystem.c +++ b/src/nm-system.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2004 - 2008 Red Hat, Inc. + * Copyright (C) 2004 - 2010 Red Hat, Inc. * Copyright (C) 2005 - 2008 Novell, Inc. * Copyright (C) 1996 - 1997 Yoichi Hariguchi * Copyright (C) January, 1998 Sergei Viznyuk @@ -42,12 +42,13 @@ #include #include -#include "NetworkManagerSystem.h" +#include "nm-system.h" #include "nm-device.h" #include "nm-named-manager.h" #include "NetworkManagerUtils.h" #include "nm-utils.h" -#include "nm-netlink.h" +#include "nm-logging.h" +#include "nm-netlink-monitor.h" /* Because of a bug in libnl, rtnl.h should be included before route.h */ #include @@ -95,10 +96,11 @@ create_route (int iface_idx, int mss) if (route) { rtnl_route_set_oif (route, iface_idx); - if (mss && rtnl_route_set_metric (route, RTAX_ADVMSS, mss) < 0) - nm_warning ("Could not set mss"); + if (mss && rtnl_route_set_metric (route, RTAX_ADVMSS, mss) < 0) { + nm_log_warn (LOGD_DEVICE, "could not set mss"); + } } else - nm_warning ("Could not allocate route"); + nm_log_err (LOGD_DEVICE, "could not allocate route"); return route; } @@ -141,7 +143,7 @@ nm_system_device_set_ip4_route (const char *iface, rtnl_route_set_gateway (route, gw_addr); rtnl_route_set_scope (route, RT_SCOPE_UNIVERSE); } else { - nm_warning ("Invalid gateway"); + nm_log_err (LOGD_DEVICE | LOGD_IP4, "Invalid gateway 0x%X", ip4_gateway); rtnl_route_put (route); return NULL; } @@ -176,7 +178,9 @@ nm_system_device_set_ip4_route (const char *iface, nl_addr_put (gw_addr); if (err) { - nm_warning ("Failed to set IPv4 route on '%s': %s", iface, nl_geterror ()); + nm_log_err (LOGD_DEVICE | LOGD_IP4, + "(%s): failed to set IPv4 route: %s", + iface, nl_geterror ()); rtnl_route_put (route); route = NULL; } @@ -192,7 +196,12 @@ sync_addresses (const char *iface, int ifindex, int family, struct nl_cache *addr_cache; struct rtnl_addr *filter_addr, *match_addr; struct nl_object *match; + struct nl_addr *nladdr; int i, err; + guint32 log_domain = (family == AF_INET) ? LOGD_IP4 : LOGD_IP6; + char buf[INET6_ADDRSTRLEN + 1]; + + log_domain |= LOGD_DEVICE; nlh = nm_netlink_get_default_handle (); if (!nlh) @@ -211,20 +220,22 @@ sync_addresses (const char *iface, int ifindex, int family, if (family) rtnl_addr_set_family (filter_addr, family); + nm_log_dbg (log_domain, "(%s): syncing addresses (family %d)", iface, family); + /* Walk through the cache, comparing the addresses already on * the interface to the addresses in addrs. */ for (match = nl_cache_get_first (addr_cache); match; match = nl_cache_get_next (match)) { - match_addr = (struct rtnl_addr *)match; + gboolean buf_valid = FALSE; + match_addr = (struct rtnl_addr *) match; /* Skip addresses not on our interface */ - if (!nl_object_match_filter (match, (struct nl_object *)filter_addr)) + if (!nl_object_match_filter (match, (struct nl_object *) filter_addr)) continue; if (addrs) { for (i = 0; i < num_addrs; i++) { - if (addrs[i] && - nl_object_identical (match, (struct nl_object *)addrs[i])) + if (addrs[i] && nl_object_identical (match, (struct nl_object *) addrs[i])) break; } @@ -238,16 +249,37 @@ sync_addresses (const char *iface, int ifindex, int family, } } + nladdr = rtnl_addr_get_local (match_addr); + /* Don't delete IPv6 link-local addresses; they don't belong to NM */ - if (rtnl_addr_get_family (match_addr) == AF_INET6 && - rtnl_addr_get_scope (match_addr) == RT_SCOPE_LINK) { - continue; + if (rtnl_addr_get_family (match_addr) == AF_INET6) { + struct in6_addr *tmp; + + if (rtnl_addr_get_scope (match_addr) == RT_SCOPE_LINK) { + nm_log_dbg (log_domain, "(%s): ignoring IPv6 link-local address", iface); + continue; + } + + tmp = nl_addr_get_binary_addr (nladdr); + if (inet_ntop (AF_INET6, tmp, buf, sizeof (buf))) + buf_valid = TRUE; + } else if (rtnl_addr_get_family (match_addr) == AF_INET) { + struct in_addr *tmp; + + tmp = nl_addr_get_binary_addr (nladdr); + if (inet_ntop (AF_INET, tmp, buf, sizeof (buf))) + buf_valid = TRUE; + } + + if (buf_valid) { + nm_log_dbg (log_domain, "(%s): removing address '%s/%d'", + iface, buf, nl_addr_get_prefixlen (nladdr)); } /* Otherwise, match_addr should be removed from the interface. */ err = rtnl_addr_delete (nlh, match_addr, 0); if (err < 0) { - nm_warning ("(%s) error %d returned from rtnl_addr_delete(): %s", + nm_log_err (log_domain, "(%s): error %d returned from rtnl_addr_delete(): %s", iface, err, nl_geterror ()); } } @@ -257,12 +289,33 @@ sync_addresses (const char *iface, int ifindex, int family, /* Now add the remaining new addresses */ for (i = 0; i < num_addrs; i++) { + struct in6_addr *in6tmp; + struct in_addr *in4tmp; + gboolean buf_valid = FALSE; + if (!addrs[i]) continue; + nladdr = rtnl_addr_get_local (addrs[i]); + if (rtnl_addr_get_family (addrs[i]) == AF_INET6) { + in6tmp = nl_addr_get_binary_addr (nladdr); + if (inet_ntop (AF_INET6, in6tmp, buf, sizeof (buf))) + buf_valid = TRUE; + } else if (rtnl_addr_get_family (addrs[i]) == AF_INET) { + in4tmp = nl_addr_get_binary_addr (nladdr); + if (inet_ntop (AF_INET, in4tmp, buf, sizeof (buf))) + buf_valid = TRUE; + } + + if (buf_valid) { + nm_log_dbg (log_domain, "(%s): adding address '%s/%d'", + iface, buf, nl_addr_get_prefixlen (nladdr)); + } + err = rtnl_addr_add (nlh, addrs[i], 0); if (err < 0) { - nm_warning ("(%s) error %d returned from rtnl_addr_add():\n%s", + nm_log_err (log_domain, + "(%s): error %d returned from rtnl_addr_add():\n%s", iface, err, nl_geterror ()); } @@ -301,7 +354,9 @@ add_ip4_addresses (NMIP4Config *config, const char *iface) addrs[i] = nm_ip4_config_to_rtnl_addr (config, i, flags); if (!addrs[i]) { - nm_warning ("couldn't create rtnl address!\n"); + nm_log_warn (LOGD_DEVICE | LOGD_IP4, + "(%s): couldn't create rtnl address!", + iface); continue; } rtnl_addr_set_ifindex (addrs[i], iface_idx); @@ -450,7 +505,7 @@ nm_system_device_set_ip6_route (const char *iface, g_return_val_if_fail (route != NULL, NULL); /* Destination */ - dest_addr = nl_addr_build (AF_INET6, (struct in6_addr *)ip6_dest, sizeof (*ip6_dest)); + dest_addr = nl_addr_build (AF_INET6, (struct in6_addr *) ip6_dest, sizeof (*ip6_dest)); g_return_val_if_fail (dest_addr != NULL, NULL); nl_addr_set_prefixlen (dest_addr, (int) ip6_prefix); @@ -459,12 +514,12 @@ nm_system_device_set_ip6_route (const char *iface, /* Gateway */ if (ip6_gateway && !IN6_IS_ADDR_UNSPECIFIED (ip6_gateway)) { - gw_addr = nl_addr_build (AF_INET6, (struct in6_addr *)ip6_gateway, sizeof (*ip6_gateway)); + gw_addr = nl_addr_build (AF_INET6, (struct in6_addr *) ip6_gateway, sizeof (*ip6_gateway)); if (gw_addr) { rtnl_route_set_gateway (route, gw_addr); rtnl_route_set_scope (route, RT_SCOPE_UNIVERSE); } else { - nm_warning ("Invalid gateway"); + nm_log_warn (LOGD_DEVICE | LOGD_IP6, "Invalid gateway"); rtnl_route_put (route); return NULL; } @@ -499,7 +554,9 @@ nm_system_device_set_ip6_route (const char *iface, nl_addr_put (gw_addr); if (err) { - nm_warning ("Failed to set IPv6 route on '%s': %s", iface, nl_geterror ()); + nm_log_err (LOGD_DEVICE | LOGD_IP6, + "(%s): failed to set IPv6 route: %s", + iface, nl_geterror ()); rtnl_route_put (route); route = NULL; } @@ -526,7 +583,9 @@ add_ip6_addresses (NMIP6Config *config, const char *iface) addrs[i] = nm_ip6_config_to_rtnl_addr (config, i, NM_RTNL_ADDR_DEFAULT); if (!addrs[i]) { - nm_warning ("couldn't create rtnl address!\n"); + nm_log_warn (LOGD_DEVICE | LOGD_IP6, + "(%s): couldn't create rtnl address!", + iface); continue; } rtnl_addr_set_ifindex (addrs[i], iface_idx); @@ -661,7 +720,7 @@ nm_system_device_is_up_with_iface (const char *iface) fd = socket (PF_INET, SOCK_DGRAM, 0); if (fd < 0) { - nm_warning ("couldn't open control socket."); + nm_log_err (LOGD_HW, "couldn't open control socket."); return FALSE; } @@ -670,8 +729,8 @@ nm_system_device_is_up_with_iface (const char *iface) strncpy (ifr.ifr_name, iface, IFNAMSIZ); if (ioctl (fd, SIOCGIFFLAGS, &ifr) < 0) { if (errno != ENODEV) { - nm_warning ("%s: could not get flags for device %s. errno = %d", - __func__, iface, errno); + nm_log_err (LOGD_HW, "(%s): could not get flags: errno %d", + iface, errno); } } else { up = !!(ifr.ifr_flags & IFF_UP); @@ -753,7 +812,9 @@ add_ip4_route_to_gateway (const char *iface, guint32 gw, guint32 mss) /* Add direct route to the gateway */ err = rtnl_route_add (nlh, route, 0); if (err) { - nm_warning ("(%s): failed to add IPv4 route to gateway (%d)", iface, err); + nm_log_err (LOGD_DEVICE | LOGD_IP4, + "(%s): failed to add IPv4 route to gateway (%d)", + iface, err); goto error; } @@ -853,7 +914,8 @@ nm_system_replace_default_ip4_route_vpn (const char *iface, if (err == 0) { return TRUE; } else if (err != -ESRCH) { - nm_warning ("(%s): failed to set IPv4 default route: %d", + nm_log_err (LOGD_DEVICE | LOGD_IP4, + "(%s): failed to set IPv4 default route: %d", iface, err); return FALSE; } @@ -867,7 +929,8 @@ nm_system_replace_default_ip4_route_vpn (const char *iface, err = replace_default_ip4_route (iface, int_gw, mss); if (err != 0) { rtnl_route_del (nlh, gw_route, 0); - nm_warning ("(%s): failed to set IPv4 default route (pass #2): %d", + nm_log_err (LOGD_DEVICE | LOGD_IP4, + "(%s): failed to set IPv4 default route (pass #2): %d", iface, err); } else success = TRUE; @@ -897,7 +960,8 @@ nm_system_replace_default_ip4_route (const char *iface, guint32 gw, guint32 mss) if (err == 0) { return TRUE; } else if (err != -ESRCH) { - nm_warning ("(%s): failed to set IPv4 default route: %d", + nm_log_err (LOGD_DEVICE | LOGD_IP4, + "(%s): failed to set IPv4 default route: %d", iface, err); return FALSE; } @@ -911,7 +975,155 @@ nm_system_replace_default_ip4_route (const char *iface, guint32 gw, guint32 mss) err = replace_default_ip4_route (iface, gw, mss); if (err != 0) { rtnl_route_del (nlh, gw_route, 0); - nm_warning ("(%s): failed to set IPv4 default route (pass #2): %d", + nm_log_err (LOGD_DEVICE | LOGD_IP4, + "(%s): failed to set IPv4 default route (pass #2): %d", + iface, err); + } else + success = TRUE; + + rtnl_route_put (gw_route); + return success; +} + +static struct rtnl_route * +add_ip6_route_to_gateway (const char *iface, const struct in6_addr *gw) +{ + struct nl_handle *nlh; + struct rtnl_route *route = NULL; + struct nl_addr *gw_addr = NULL; + int iface_idx, err; + + nlh = nm_netlink_get_default_handle (); + g_return_val_if_fail (nlh != NULL, NULL); + + iface_idx = nm_netlink_iface_to_index (iface); + if (iface_idx < 0) + return NULL; + + /* Gateway might be over a bridge; try adding a route to gateway first */ + route = rtnl_route_alloc (); + if (route == NULL) + return NULL; + + rtnl_route_set_family (route, AF_INET6); + rtnl_route_set_table (route, RT_TABLE_MAIN); + rtnl_route_set_oif (route, iface_idx); + rtnl_route_set_scope (route, RT_SCOPE_LINK); + + gw_addr = nl_addr_build (AF_INET, (void *) gw, sizeof (*gw)); + if (!gw_addr) + goto error; + nl_addr_set_prefixlen (gw_addr, 128); + rtnl_route_set_dst (route, gw_addr); + nl_addr_put (gw_addr); + + /* Add direct route to the gateway */ + err = rtnl_route_add (nlh, route, 0); + if (err) { + nm_log_err (LOGD_DEVICE | LOGD_IP6, + "(%s): failed to add IPv4 route to gateway (%d)", + iface, err); + goto error; + } + + return route; + +error: + rtnl_route_put (route); + return NULL; +} + +static int +replace_default_ip6_route (const char *iface, const struct in6_addr *gw) +{ + struct rtnl_route *route = NULL; + struct nl_handle *nlh; + struct nl_addr *gw_addr = NULL; + int iface_idx, err = -1; + + g_return_val_if_fail (iface != NULL, -ENODEV); + + nlh = nm_netlink_get_default_handle (); + g_return_val_if_fail (nlh != NULL, -ENOMEM); + + iface_idx = nm_netlink_iface_to_index (iface); + if (iface_idx < 0) + return -ENODEV; + + route = rtnl_route_alloc(); + g_return_val_if_fail (route != NULL, -ENOMEM); + + rtnl_route_set_family (route, AF_INET6); + rtnl_route_set_table (route, RT_TABLE_MAIN); + rtnl_route_set_scope (route, RT_SCOPE_UNIVERSE); + rtnl_route_set_oif (route, iface_idx); + + if (gw && !IN6_IS_ADDR_UNSPECIFIED (gw)) { + /* Build up the gateway address */ + gw_addr = nl_addr_build (AF_INET6, (void *) gw, sizeof (*gw)); + if (!gw_addr) { + err = -ENOMEM; + goto out; + } + nl_addr_set_prefixlen (gw_addr, -1); + rtnl_route_set_gateway (route, gw_addr); + } + + /* Add the new default route */ + err = rtnl_route_add (nlh, route, NLM_F_REPLACE); + if (err == -EEXIST) { + /* FIXME: even though we use NLM_F_REPLACE the kernel won't replace + * the route if it's the same. Should try to remove it first, then + * add the new one again here. + */ + err = 0; + } + +out: + if (gw_addr) + nl_addr_put (gw_addr); + rtnl_route_put (route); + return err; +} + +/* + * nm_system_replace_default_ip6_route + * + * Replace default IPv6 route with one via the given gateway + * + */ +gboolean +nm_system_replace_default_ip6_route (const char *iface, const struct in6_addr *gw) +{ + struct rtnl_route *gw_route = NULL; + struct nl_handle *nlh; + gboolean success = FALSE; + int err; + + nlh = nm_netlink_get_default_handle (); + g_return_val_if_fail (nlh != NULL, FALSE); + + err = replace_default_ip6_route (iface, gw); + if (err == 0) { + return TRUE; + } else if (err != -ESRCH) { + nm_log_err (LOGD_DEVICE | LOGD_IP6, + "(%s): failed to set IPv6 default route: %d", + iface, err); + return FALSE; + } + + /* Try adding a direct route to the gateway first */ + gw_route = add_ip6_route_to_gateway (iface, gw); + if (!gw_route) + return FALSE; + + /* Try adding the original route again */ + err = replace_default_ip6_route (iface, gw); + if (err != 0) { + rtnl_route_del (nlh, gw_route, 0); + nm_log_err (LOGD_DEVICE | LOGD_IP6, + "(%s): failed to set IPv6 default route (pass #2): %d", iface, err); } else success = TRUE; @@ -927,7 +1139,7 @@ static void flush_addresses (const char *iface, gboolean ipv4_only) g_return_if_fail (iface != NULL); iface_idx = nm_netlink_iface_to_index (iface); if (iface_idx >= 0) - sync_addresses (iface, iface_idx, ipv4_only ? AF_INET : 0, NULL, 0); + sync_addresses (iface, iface_idx, ipv4_only ? AF_INET : AF_UNSPEC, NULL, 0); } /* @@ -966,7 +1178,7 @@ foreach_route (void (*callback)(struct nl_object *, gpointer), nlh = nm_netlink_get_default_handle (); route_cache = rtnl_route_alloc_cache (nlh); - nl_cache_mngt_provide (route_cache); + g_assert (route_cache); nl_cache_foreach (route_cache, callback, user_data); nl_cache_free (route_cache); } @@ -991,28 +1203,52 @@ check_one_route (struct nl_object *object, void *user_data) if (data->family && rtnl_route_get_family (route) != data->family) return; + /* We don't want to flush IPv6 link-local routes that may exist on the + * the interface since the LL address and routes should normally stay + * assigned all the time. + */ + if ( (data->family == AF_INET6 || data->family == AF_UNSPEC) + && (rtnl_route_get_family (route) == AF_INET6)) { + struct nl_addr *nl; + struct in6_addr *addr = NULL; + + nl = rtnl_route_get_dst (route); + if (nl) + addr = nl_addr_get_binary_addr (nl); + + if (addr) { + if (IN6_IS_ADDR_LINKLOCAL (addr) || IN6_IS_ADDR_MC_LINKLOCAL (addr)) + return; + } + } + err = rtnl_route_del (nm_netlink_get_default_handle (), route, 0); if (err < 0) { - nm_warning ("(%s) error %d returned from rtnl_route_del(): %s", + nm_log_err (LOGD_DEVICE, + "(%s): error %d returned from rtnl_route_del(): %s", data->iface, err, nl_geterror()); } } -static void flush_routes (const char *iface, gboolean ipv4_only) +static void flush_routes (int ifindex, const char *iface, int family) { - int iface_idx; RouteCheckData check_data; g_return_if_fail (iface != NULL); - iface_idx = nm_netlink_iface_to_index (iface); - if (iface_idx >= 0) { - memset (&check_data, 0, sizeof (check_data)); - check_data.iface = iface; - check_data.iface_idx = iface_idx; - check_data.family = ipv4_only ? AF_INET : 0; - foreach_route (check_one_route, &check_data); + if (ifindex < 0) { + ifindex = nm_netlink_iface_to_index (iface); + if (ifindex < 0) { + nm_log_dbg (LOGD_DEVICE, "(%s) failed to lookup interface index", iface); + return; + } } + + memset (&check_data, 0, sizeof (check_data)); + check_data.iface = iface; + check_data.iface_idx = ifindex; + check_data.family = family; + foreach_route (check_one_route, &check_data); } /* @@ -1021,23 +1257,25 @@ static void flush_routes (const char *iface, gboolean ipv4_only) * Flush all network addresses associated with a network device * */ -void nm_system_device_flush_routes (NMDevice *dev) +void nm_system_device_flush_routes (NMDevice *dev, int family) { g_return_if_fail (dev != NULL); - flush_routes (nm_device_get_ip_iface (dev), - nm_device_get_ip6_config (dev) == NULL); + flush_routes (nm_device_get_ip_ifindex (dev), + nm_device_get_ip_iface (dev), + family); } /* * nm_system_device_flush_routes_with_iface * - * Flush all routes associated with a network device + * Flush all routes associated with a network device. 'family' is an + * address family, either AF_INET, AF_INET6, or AF_UNSPEC. * */ -void nm_system_device_flush_routes_with_iface (const char *iface) +void nm_system_device_flush_routes_with_iface (const char *iface, int family) { - flush_routes (iface, FALSE); + flush_routes (-1, iface, family); } typedef struct { diff --git a/src/NetworkManagerSystem.h b/src/nm-system.h similarity index 93% rename from src/NetworkManagerSystem.h rename to src/nm-system.h index f2c2693ac1..2eee01417d 100644 --- a/src/NetworkManagerSystem.h +++ b/src/nm-system.h @@ -33,13 +33,16 @@ * implemented in the backend files in backends/ directory */ -void nm_system_device_flush_routes (NMDevice *dev); -void nm_system_device_flush_routes_with_iface (const char *iface); +void nm_system_device_flush_routes (NMDevice *dev, int family); +void nm_system_device_flush_routes_with_iface (const char *iface, int family); gboolean nm_system_replace_default_ip4_route (const char *iface, guint32 gw, guint32 mss); +gboolean nm_system_replace_default_ip6_route (const char *iface, + const struct in6_addr *gw); + gboolean nm_system_replace_default_ip4_route_vpn (const char *iface, guint32 ext_gw, guint32 int_gw, diff --git a/src/nm-udev-manager.c b/src/nm-udev-manager.c index 090c239392..8a590ca137 100644 --- a/src/nm-udev-manager.c +++ b/src/nm-udev-manager.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009 - 2010 Red Hat, Inc. */ #include @@ -33,7 +33,7 @@ #include "nm-udev-manager.h" #include "nm-marshal.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "NetworkManagerUtils.h" #include "nm-device-wifi.h" #include "nm-device-olpc-mesh.h" @@ -83,6 +83,30 @@ nm_udev_manager_get_rfkill_state (NMUdevManager *self, RfKillType rtype) return NM_UDEV_MANAGER_GET_PRIVATE (self)->rfkill_states[rtype]; } +static const char * +rfkill_type_to_desc (RfKillType rtype) +{ + if (rtype == 0) + return "WiFi"; + else if (rtype == 1) + return "WWan"; + else if (rtype == 2) + return "WiMAX"; + return "unknown"; +} + +static const char * +rfkill_state_to_desc (RfKillState rstate) +{ + if (rstate == 0) + return "unblocked"; + else if (rstate == 1) + return "soft-blocked"; + else if (rstate == 2) + return "hard-blocked"; + return "unknown"; +} + static Killswitch * killswitch_new (GUdevDevice *device, RfKillType rtype) { @@ -140,7 +164,7 @@ sysfs_state_to_nm_state (gint sysfs_state) case 2: return RFKILL_HARD_BLOCKED; default: - g_warning ("%s: Unhandled rfkill state %d", __func__, sysfs_state); + nm_log_warn (LOGD_RFKILL, "unhandled rfkill state %d", sysfs_state); break; } return RFKILL_UNBLOCKED; @@ -176,6 +200,10 @@ recheck_killswitches (NMUdevManager *self) for (i = 0; i < RFKILL_TYPE_MAX; i++) { if (poll_states[i] != priv->rfkill_states[i]) { + nm_log_dbg (LOGD_RFKILL, "%s rfkill state now '%s'", + rfkill_type_to_desc (i), + rfkill_state_to_desc (poll_states[i])); + priv->rfkill_states[i] = poll_states[i]; g_signal_emit (self, signals[RFKILL_CHANGED], 0, i, priv->rfkill_states[i]); } @@ -230,11 +258,11 @@ add_one_killswitch (NMUdevManager *self, GUdevDevice *device) ks = killswitch_new (device, rtype); priv->killswitches = g_slist_prepend (priv->killswitches, ks); - nm_info ("Found %s radio killswitch %s (at %s) (driver %s)", - str_type, - ks->name, - ks->path, - ks->driver ? ks->driver : ""); + nm_log_info (LOGD_RFKILL, "found %s radio killswitch %s (at %s) (driver %s)", + rfkill_type_to_desc (rtype), + ks->name, + ks->path, + ks->driver ? ks->driver : ""); } static void @@ -266,7 +294,7 @@ rfkill_remove (NMUdevManager *self, Killswitch *ks = iter->data; if (!strcmp (ks->name, name)) { - nm_info ("Radio killswitch %s disappeared", ks->path); + nm_log_info (LOGD_RFKILL, "radio killswitch %s disappeared", ks->path); priv->killswitches = g_slist_remove (priv->killswitches, ks); killswitch_destroy (ks); break; @@ -329,7 +357,7 @@ device_creator (NMUdevManager *manager, path = g_udev_device_get_sysfs_path (udev_device); if (!path) { - nm_warning ("couldn't determine device path; ignoring..."); + nm_log_warn (LOGD_HW, "couldn't determine device path; ignoring..."); return NULL; } @@ -352,24 +380,24 @@ device_creator (NMUdevManager *manager, } if (!driver) { - nm_warning ("%s: couldn't determine device driver; ignoring...", path); + nm_log_warn (LOGD_HW, "%s: couldn't determine device driver; ignoring...", path); goto out; } ifindex = g_udev_device_get_sysfs_attr_as_int (udev_device, "ifindex"); if (ifindex <= 0) { - nm_warning ("%s: device had invalid ifindex %d; ignoring...", path, (guint32) ifindex); + nm_log_warn (LOGD_HW, "%s: device had invalid ifindex %d; ignoring...", path, (guint32) ifindex); goto out; } if (is_olpc_mesh (udev_device)) /* must be before is_wireless */ - device = (GObject *) nm_device_olpc_mesh_new (path, ifname, driver, ifindex); + device = (GObject *) nm_device_olpc_mesh_new (path, ifname, driver); else if (is_wireless (udev_device)) - device = (GObject *) nm_device_wifi_new (path, ifname, driver, ifindex); + device = (GObject *) nm_device_wifi_new (path, ifname, driver); else if (is_wimax (driver)) - device = (GObject *) nm_wimax_manager_create_device (path, ifname, driver, ifindex); + device = (GObject *) nm_wimax_manager_create_device (path, ifname, driver); else - device = (GObject *) nm_device_ethernet_new (path, ifname, driver, ifindex); + device = (GObject *) nm_device_ethernet_new (path, ifname, driver); out: if (grandparent) @@ -382,18 +410,36 @@ out: static void net_add (NMUdevManager *self, GUdevDevice *device) { - gint devtype; + gint etype; const char *iface; + const char *devtype; g_return_if_fail (device != NULL); - devtype = g_udev_device_get_sysfs_attr_as_int (device, "type"); - if (devtype != 1) + etype = g_udev_device_get_sysfs_attr_as_int (device, "type"); + if (etype != 1) { + nm_log_dbg (LOGD_HW, "ignoring interface with type %d", etype); return; /* Not using ethernet encapsulation, don't care */ + } + + /* Not all ethernet devices are immediately usable; newer mobile broadband + * devices (Ericsson, Option, Sierra) require setup on the tty before the + * ethernet device is usable. 2.6.33 and later kernels set the 'DEVTYPE' + * uevent variable which we can use to ignore the interface as a NMDevice + * subclass. ModemManager will pick it up though and so we'll handle it + * through the mobile broadband stuff. + */ + devtype = g_udev_device_get_property (device, "DEVTYPE"); + if (devtype && !strcmp (devtype, "wwan")) { + nm_log_dbg (LOGD_HW, "ignoring interface with devtype '%s'", devtype); + return; + } iface = g_udev_device_get_name (device); - if (!iface) + if (!iface) { + nm_log_dbg (LOGD_HW, "failed to get device's interface"); return; + } g_signal_emit (self, signals[DEVICE_ADDED], 0, device, device_creator); } @@ -436,6 +482,9 @@ handle_uevent (GUdevClient *client, subsys = g_udev_device_get_subsystem (device); g_return_if_fail (subsys != NULL); + nm_log_dbg (LOGD_HW, "UDEV event: action '%s' subsys '%s' device '%s'", + action, subsys, g_udev_device_get_name (device)); + g_return_if_fail (!strcmp (subsys, "rfkill") || !strcmp (subsys, "net")); if (!strcmp (action, "add")) { diff --git a/src/NetworkManagerAP.c b/src/nm-wifi-ap.c similarity index 96% rename from src/NetworkManagerAP.c rename to src/nm-wifi-ap.c index 9b95924144..c7b5d8a51a 100644 --- a/src/NetworkManagerAP.c +++ b/src/nm-wifi-ap.c @@ -23,9 +23,10 @@ #include -#include "NetworkManagerAP.h" +#include "nm-wifi-ap.h" #include "NetworkManagerUtils.h" #include "nm-utils.h" +#include "nm-logging.h" #include "nm-dbus-manager.h" #include "wpa.h" #include "nm-properties-changed-signal.h" @@ -333,7 +334,7 @@ nm_ap_export_to_dbus (NMAccessPoint *ap) priv = NM_AP_GET_PRIVATE (ap); if (priv->dbus_path) { - nm_warning ("Tried to export AP %s twice.", priv->dbus_path); + nm_log_err (LOGD_CORE, "Tried to export AP %s twice.", priv->dbus_path); return; } @@ -696,25 +697,25 @@ nm_ap_print_self (NMAccessPoint *ap, { NMAccessPointPrivate *priv; + g_return_if_fail (ap != NULL); g_return_if_fail (NM_IS_AP (ap)); priv = NM_AP_GET_PRIVATE (ap); - nm_info ("%s'%s' (%p) stamp=%ld flags=0x%X wpa-flags=0x%X rsn-flags=0x%x " - "bssid=" MAC_FMT " strength=%d freq=%d rate=%d mode=%d seen=%ld", - prefix, - priv->ssid ? nm_utils_escape_ssid (priv->ssid->data, priv->ssid->len) : "(none)", - ap, - priv->timestamp.tv_sec, - priv->flags, - priv->wpa_flags, - priv->rsn_flags, - MAC_ARG (priv->address.ether_addr_octet), - priv->strength, - priv->freq, - priv->max_bitrate, - priv->mode, - priv->last_seen); + nm_log_dbg (LOGD_WIFI_SCAN, "%s'%s' (%p)", + prefix, + priv->ssid ? nm_utils_escape_ssid (priv->ssid->data, priv->ssid->len) : "(none)", + ap); + nm_log_dbg (LOGD_WIFI_SCAN, " BSSID " MAC_FMT, MAC_ARG (priv->address.ether_addr_octet)); + nm_log_dbg (LOGD_WIFI_SCAN, " mode %d", priv->mode); + nm_log_dbg (LOGD_WIFI_SCAN, " timestamp %ld", priv->timestamp.tv_sec); + nm_log_dbg (LOGD_WIFI_SCAN, " flags 0x%X", priv->flags); + nm_log_dbg (LOGD_WIFI_SCAN, " wpa flags 0x%X", priv->wpa_flags); + nm_log_dbg (LOGD_WIFI_SCAN, " rsn flags 0x%X", priv->rsn_flags); + nm_log_dbg (LOGD_WIFI_SCAN, " quality %d", priv->strength); + nm_log_dbg (LOGD_WIFI_SCAN, " frequency %d", priv->freq); + nm_log_dbg (LOGD_WIFI_SCAN, " max rate %d", priv->max_bitrate); + nm_log_dbg (LOGD_WIFI_SCAN, " last-seen %ld", priv->last_seen); } const char * @@ -940,7 +941,7 @@ void nm_ap_set_mode (NMAccessPoint *ap, const NM80211Mode mode) g_object_notify (G_OBJECT (ap), NM_AP_MODE); } } else - nm_warning ("Invalid AP mode '%d'", mode); + nm_log_warn (LOGD_WIFI, "Invalid AP mode '%d'", mode); } @@ -1468,7 +1469,7 @@ channel_to_freq (guint32 channel, const char *band) } else if (!strcmp (band, "bg")) { while (bg_table[i].chan && (bg_table[i].chan != channel)) i++; - return a_table[i].freq; + return bg_table[i].freq; } return 0; diff --git a/src/NetworkManagerAP.h b/src/nm-wifi-ap.h similarity index 100% rename from src/NetworkManagerAP.h rename to src/nm-wifi-ap.h diff --git a/src/ppp-manager/Makefile.am b/src/ppp-manager/Makefile.am index 41cb537c25..2dc7ad94c6 100644 --- a/src/ppp-manager/Makefile.am +++ b/src/ppp-manager/Makefile.am @@ -3,6 +3,7 @@ INCLUDES = \ -I${top_srcdir}/include \ -I${top_srcdir}/libnm-util \ -I${top_srcdir}/src \ + -I${top_srcdir}/src/logging \ -I${top_builddir}/marshallers noinst_LTLIBRARIES = libppp-manager.la @@ -28,6 +29,7 @@ libppp_manager_la_CPPFLAGS = \ libppp_manager_la_LIBADD = \ $(top_builddir)/marshallers/libmarshallers.la \ + $(top_builddir)/src/logging/libnm-logging.la \ $(DBUS_LIBS) \ $(GLIB_LIBS) diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c index d3c9f6e94b..de905b49db 100644 --- a/src/ppp-manager/nm-ppp-manager.c +++ b/src/ppp-manager/nm-ppp-manager.c @@ -49,7 +49,7 @@ #include "nm-setting-gsm.h" #include "nm-setting-cdma.h" #include "nm-dbus-manager.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-marshal.h" static void impl_ppp_manager_need_secrets (NMPPPManager *manager, @@ -296,12 +296,13 @@ monitor_cb (gpointer user_data) req.stats_ptr = (caddr_t) &req.stats; strncpy (req.ifr__name, priv->ip_iface, sizeof (req.ifr__name)); - if (ioctl (priv->monitor_fd, SIOCGPPPSTATS, &req) < 0) - nm_warning ("Could not read ppp stats: %s", strerror (errno)); - else + if (ioctl (priv->monitor_fd, SIOCGPPPSTATS, &req) < 0) { + nm_log_warn (LOGD_PPP, "could not read ppp stats: %s", strerror (errno)); + } else { g_signal_emit (manager, signals[STATS], 0, - req.stats.p.ppp_ibytes, - req.stats.p.ppp_obytes); + req.stats.p.ppp_ibytes, + req.stats.p.ppp_obytes); + } return TRUE; } @@ -315,7 +316,7 @@ monitor_stats (NMPPPManager *manager) if (priv->monitor_fd > 0) priv->monitor_id = g_timeout_add_seconds (5, monitor_cb, manager); else - nm_warning ("Could not open pppd monitor: %s", strerror (errno)); + nm_log_warn (LOGD_PPP, "could not monitor PPP stats: %s", strerror (errno)); } /*******************************************/ @@ -387,8 +388,8 @@ impl_ppp_manager_need_secrets (NMPPPManager *manager, GError *err = NULL; g_set_error (&err, NM_PPP_MANAGER_ERROR, NM_PPP_MANAGER_ERROR_UNKOWN, - "Missing type-specific setting; no secrets could be found."); - nm_warning ("%s", err->message); + "Missing type-specific setting; no secrets could be found."); + nm_log_warn (LOGD_PPP, "%s", err->message); dbus_g_method_return_error (context, err); } return; @@ -442,7 +443,7 @@ impl_ppp_manager_set_ip4_config (NMPPPManager *manager, GValue *val; int i; - nm_info ("PPP manager(IP Config Get) reply received."); + nm_log_info (LOGD_PPP, "PPP manager(IP Config Get) reply received."); remove_timeout_handler (manager); @@ -467,7 +468,7 @@ impl_ppp_manager_set_ip4_config (NMPPPManager *manager, if (nm_ip4_address_get_address (addr) && nm_ip4_address_get_prefix (addr)) { nm_ip4_config_take_address (config, addr); } else { - nm_warning ("%s: invalid IPv4 address received!", __func__); + nm_log_err (LOGD_PPP, "invalid IPv4 address received!"); nm_ip4_address_unref (addr); goto out; } @@ -490,7 +491,7 @@ impl_ppp_manager_set_ip4_config (NMPPPManager *manager, val = (GValue *) g_hash_table_lookup (config_hash, NM_PPP_IP4_CONFIG_INTERFACE); if (!val || !G_VALUE_HOLDS_STRING (val)) { - nm_warning ("No interface"); + nm_log_err (LOGD_PPP, "no interface received!"); goto out; } priv->ip_iface = g_value_dup_string (val); @@ -582,13 +583,12 @@ nm_cmd_line_add_int (NMCmdLine *cmd, int i) static inline const char * nm_find_pppd (void) { - static const char *pppd_binary_paths[] = - { - "/usr/local/sbin/pppd", - "/usr/sbin/pppd", - "/sbin/pppd", - NULL - }; + static const char *pppd_binary_paths[] = { + "/usr/local/sbin/pppd", + "/usr/sbin/pppd", + "/sbin/pppd", + NULL + }; const char **pppd_binary = pppd_binary_paths; @@ -670,7 +670,7 @@ ppp_exit_code (guint pppd_exit_status, GPid pid) msg = "Unknown error"; } - nm_warning ("ppp pid %d exited with error: %s", pid, msg); + nm_log_warn (LOGD_PPP, "pppd pid %d exited with error: %s", pid, msg); } static void @@ -686,14 +686,14 @@ ppp_watch_cb (GPid pid, gint status, gpointer user_data) err = WEXITSTATUS (status); if (err != 0) ppp_exit_code (err, priv->pid); - } else if (WIFSTOPPED (status)) - nm_warning ("ppp pid %d stopped unexpectedly with signal %d", priv->pid, WSTOPSIG (status)); - else if (WIFSIGNALED (status)) - nm_warning ("ppp pid %d died with signal %d", priv->pid, WTERMSIG (status)); - else - nm_warning ("ppp pid %d died from an unknown cause", priv->pid); + } else if (WIFSTOPPED (status)) { + nm_log_info (LOGD_PPP, "pppd pid %d stopped unexpectedly with signal %d", priv->pid, WSTOPSIG (status)); + } else if (WIFSIGNALED (status)) { + nm_log_info (LOGD_PPP, "pppd pid %d died with signal %d", priv->pid, WTERMSIG (status)); + } else + nm_log_info (LOGD_PPP, "pppd pid %d died from an unknown cause", priv->pid); - nm_debug ("ppp pid %d cleaned up", priv->pid); + nm_log_dbg (LOGD_PPP, "pppd pid %d cleaned up", priv->pid); priv->pid = 0; g_signal_emit (manager, signals[STATE_CHANGED], 0, NM_PPP_STATUS_DEAD); } @@ -703,7 +703,7 @@ pppd_timed_out (gpointer data) { NMPPPManager *manager = NM_PPP_MANAGER (data); - nm_warning ("Looks like pppd didn't initialize our dbus module"); + nm_log_warn (LOGD_PPP, "pppd timed out or didn't initialize our dbus module"); nm_ppp_manager_stop (manager); g_signal_emit (manager, signals[STATE_CHANGED], 0, NM_PPP_STATUS_DEAD); @@ -913,10 +913,10 @@ nm_ppp_manager_start (NMPPPManager *manager, priv = NM_PPP_MANAGER_GET_PRIVATE (manager); - nm_info ("Starting pppd connection"); + nm_log_info (LOGD_PPP, "starting PPP connection"); cmd_str = nm_cmd_line_to_str (ppp_cmd); - nm_debug ("Command line: %s", cmd_str); + nm_log_dbg (LOGD_PPP, "command line: %s", cmd_str); g_free (cmd_str); priv->pid = 0; @@ -927,7 +927,7 @@ nm_ppp_manager_start (NMPPPManager *manager, goto out; } - nm_debug ("ppp started with pid %d", priv->pid); + nm_log_info (LOGD_PPP, "pppd started with pid %d", priv->pid); priv->ppp_watch_id = g_child_watch_add (priv->pid, (GChildWatchFunc) ppp_watch_cb, manager); priv->ppp_timeout_handler = g_timeout_add_seconds (timeout_secs, pppd_timed_out, manager); @@ -965,7 +965,7 @@ nm_ppp_manager_update_secrets (NMPPPManager *manager, GError *err = NULL; g_set_error (&err, NM_PPP_MANAGER_ERROR, NM_PPP_MANAGER_ERROR_UNKOWN, "%s", error_message); - nm_warning ("%s", error_message); + nm_log_warn (LOGD_PPP, "%s", error_message); dbus_g_method_return_error (priv->pending_secrets_context, err); g_error_free (err); } else { @@ -989,9 +989,9 @@ ensure_killed (gpointer data) kill (pid, SIGKILL); /* ensure the child is reaped */ - nm_debug ("waiting for ppp pid %d to exit", pid); + nm_log_dbg (LOGD_PPP, "waiting for pppd pid %d to exit", pid); waitpid (pid, NULL, 0); - nm_debug ("ppp pid %d cleaned up", pid); + nm_log_dbg (LOGD_PPP, "pppd pid %d cleaned up", pid); return FALSE; } @@ -1034,9 +1034,9 @@ nm_ppp_manager_stop (NMPPPManager *manager) kill (priv->pid, SIGKILL); /* ensure the child is reaped */ - nm_debug ("waiting for ppp pid %d to exit", priv->pid); + nm_log_dbg (LOGD_PPP, "waiting for pppd pid %d to exit", priv->pid); waitpid (priv->pid, NULL, 0); - nm_debug ("ppp pid %d cleaned up", priv->pid); + nm_log_dbg (LOGD_PPP, "pppd pid %d cleaned up", priv->pid); } priv->pid = 0; diff --git a/src/ppp-manager/nm-pppd-plugin.c b/src/ppp-manager/nm-pppd-plugin.c index b98ec2800f..c64bb87f63 100644 --- a/src/ppp-manager/nm-pppd-plugin.c +++ b/src/ppp-manager/nm-pppd-plugin.c @@ -34,7 +34,6 @@ #include "nm-pppd-plugin.h" #include "nm-ppp-status.h" #include "nm-dbus-glib-types.h" -#include "nm-utils.h" int plugin_init (void); diff --git a/src/supplicant-manager/Makefile.am b/src/supplicant-manager/Makefile.am index 540ef76481..e59ae84319 100644 --- a/src/supplicant-manager/Makefile.am +++ b/src/supplicant-manager/Makefile.am @@ -2,6 +2,7 @@ SUBDIRS=. tests INCLUDES = \ -I${top_srcdir}/src \ + -I${top_srcdir}/src/logging \ -I${top_srcdir}/include \ -I${top_srcdir}/libnm-util \ -I${top_builddir}/marshallers \ @@ -28,6 +29,7 @@ libsupplicant_manager_la_CPPFLAGS = \ libsupplicant_manager_la_LIBADD = \ $(top_builddir)/marshallers/libmarshallers.la \ + $(top_builddir)/src/logging/libnm-logging.la \ $(DBUS_LIBS) \ $(GLIB_LIBS) diff --git a/src/supplicant-manager/nm-supplicant-config.c b/src/supplicant-manager/nm-supplicant-config.c index 5f8c4f45df..b516de520b 100644 --- a/src/supplicant-manager/nm-supplicant-config.c +++ b/src/supplicant-manager/nm-supplicant-config.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2006 - 2008 Red Hat, Inc. + * Copyright (C) 2006 - 2010 Red Hat, Inc. * Copyright (C) 2007 - 2008 Novell, Inc. */ @@ -31,7 +31,7 @@ #include "nm-supplicant-config.h" #include "nm-supplicant-settings-verify.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-setting.h" #include "NetworkManagerUtils.h" @@ -123,26 +123,26 @@ nm_supplicant_config_add_option_with_type (NMSupplicantConfig *self, char buf[255]; memset (&buf[0], 0, sizeof (buf)); memcpy (&buf[0], value, len > 254 ? 254 : len); - nm_debug ("Key '%s' and/or value '%s' invalid.", key, buf); + nm_log_warn (LOGD_SUPPLICANT, "Key '%s' and/or value '%s' invalid.", key, buf); return FALSE; } } old_opt = (ConfigOption *) g_hash_table_lookup (priv->config, key); if (old_opt) { - nm_debug ("Key '%s' already in table.", key); + nm_log_warn (LOGD_SUPPLICANT, "Key '%s' already in table.", key); return FALSE; } opt = g_slice_new0 (ConfigOption); if (opt == NULL) { - nm_debug ("Couldn't allocate memory for new config option."); + nm_log_warn (LOGD_SUPPLICANT, "Couldn't allocate memory for new config option."); return FALSE; } opt->value = g_malloc0 ((sizeof (char) * len) + 1); if (opt->value == NULL) { - nm_debug ("Couldn't allocate memory for new config option value."); + nm_log_warn (LOGD_SUPPLICANT, "Couldn't allocate memory for new config option value."); g_slice_free (ConfigOption, opt); return FALSE; } @@ -151,12 +151,13 @@ nm_supplicant_config_add_option_with_type (NMSupplicantConfig *self, opt->len = len; opt->type = type; -{ -char buf[255]; -memset (&buf[0], 0, sizeof (buf)); -memcpy (&buf[0], opt->value, opt->len > 254 ? 254 : opt->len); -nm_info ("Config: added '%s' value '%s'", key, secret ? "" : &buf[0]); -} + { + char buf[255]; + memset (&buf[0], 0, sizeof (buf)); + memcpy (&buf[0], opt->value, opt->len > 254 ? 254 : opt->len); + nm_log_info (LOGD_SUPPLICANT, "Config: added '%s' value '%s'", key, secret ? "" : &buf[0]); + } + g_hash_table_insert (priv->config, g_strdup (key), opt); return TRUE; @@ -194,33 +195,33 @@ nm_supplicant_config_add_blob (NMSupplicantConfig *self, type = nm_supplicant_settings_verify_setting (key, (const char *) value->data, value->len); if (type == TYPE_INVALID) { - nm_debug ("Key '%s' and/or it's contained value is invalid.", key); + nm_log_warn (LOGD_SUPPLICANT, "Key '%s' and/or it's contained value is invalid.", key); return FALSE; } old_opt = (ConfigOption *) g_hash_table_lookup (priv->config, key); if (old_opt) { - nm_debug ("Key '%s' already in table.", key); + nm_log_warn (LOGD_SUPPLICANT, "Key '%s' already in table.", key); return FALSE; } blob = g_byte_array_sized_new (value->len); if (!blob) { - nm_debug ("Couldn't allocate memory for new config blob."); + nm_log_warn (LOGD_SUPPLICANT, "Couldn't allocate memory for new config blob."); return FALSE; } g_byte_array_append (blob, value->data, value->len); opt = g_slice_new0 (ConfigOption); if (opt == NULL) { - nm_debug ("Couldn't allocate memory for new config option."); + nm_log_warn (LOGD_SUPPLICANT, "Couldn't allocate memory for new config option."); g_byte_array_free (blob, TRUE); return FALSE; } opt->value = g_strdup_printf ("blob://%s", blobid); if (opt->value == NULL) { - nm_debug ("Couldn't allocate memory for new config option value."); + nm_log_warn (LOGD_SUPPLICANT, "Couldn't allocate memory for new config option value."); g_byte_array_free (blob, TRUE); g_slice_free (ConfigOption, opt); return FALSE; @@ -229,7 +230,7 @@ nm_supplicant_config_add_blob (NMSupplicantConfig *self, opt->len = strlen (opt->value); opt->type = type; -nm_info ("Config: added '%s' value '%s'", key, opt->value); + nm_log_info (LOGD_SUPPLICANT, "Config: added '%s' value '%s'", key, opt->value); g_hash_table_insert (priv->config, g_strdup (key), opt); g_hash_table_insert (priv->blobs, g_strdup (blobid), blob); @@ -378,13 +379,13 @@ nm_supplicant_config_add_setting_wireless (NMSupplicantConfig * self, id = nm_setting_wireless_get_ssid (setting); if (!nm_supplicant_config_add_option (self, "ssid", (char *) id->data, id->len, FALSE)) { - nm_warning ("Error adding SSID to supplicant config."); + nm_log_warn (LOGD_SUPPLICANT, "Error adding SSID to supplicant config."); return FALSE; } if (is_adhoc) { if (!nm_supplicant_config_add_option (self, "mode", "1", -1, FALSE)) { - nm_warning ("Error adding mode to supplicant config."); + nm_log_warn (LOGD_SUPPLICANT, "Error adding mode to supplicant config."); return FALSE; } @@ -394,7 +395,7 @@ nm_supplicant_config_add_setting_wireless (NMSupplicantConfig * self, str_freq = g_strdup_printf ("%u", adhoc_freq); if (!nm_supplicant_config_add_option (self, "frequency", str_freq, -1, FALSE)) { g_free (str_freq); - nm_warning ("Error adding Ad-Hoc frequency to supplicant config."); + nm_log_warn (LOGD_SUPPLICANT, "Error adding Ad-Hoc frequency to supplicant config."); return FALSE; } g_free (str_freq); @@ -418,7 +419,7 @@ nm_supplicant_config_add_setting_wireless (NMSupplicantConfig * self, str_bssid, strlen (str_bssid), FALSE)) { g_free (str_bssid); - nm_warning ("Error adding BSSID to supplicant config."); + nm_log_warn (LOGD_SUPPLICANT, "Error adding BSSID to supplicant config."); return FALSE; } g_free (str_bssid); @@ -445,7 +446,7 @@ add_string_val (NMSupplicantConfig *self, value = ucase ? g_ascii_strup (field, -1) : g_strdup (field); success = nm_supplicant_config_add_option (self, name, value, strlen (field), secret); if (!success) - nm_warning ("Error adding %s to supplicant config.", name); + nm_log_warn (LOGD_SUPPLICANT, "Error adding %s to supplicant config.", name); g_free (value); return success; } @@ -471,7 +472,7 @@ add_string_val (NMSupplicantConfig *self, success = TRUE; \ g_string_free (str, TRUE); \ if (!success) { \ - nm_warning ("Error adding %s to supplicant config.", name); \ + nm_log_warn (LOGD_SUPPLICANT, "Error adding %s to supplicant config.", name); \ return FALSE; \ } \ } @@ -494,7 +495,7 @@ get_blob_id (const char *name, const char *seed_uid) success = nm_supplicant_config_add_blob (self, name, field, uid); \ g_free (uid); \ if (!success) { \ - nm_warning ("Error adding %s to supplicant config.", name); \ + nm_log_warn (LOGD_SUPPLICANT, "Error adding %s to supplicant config.", name); \ return FALSE; \ } \ } @@ -550,16 +551,16 @@ add_wep_key (NMSupplicantConfig *self, success = nm_supplicant_config_add_option (self, name, value, key_len / 2, TRUE); g_free (value); if (!success) { - nm_warning ("Error adding %s to supplicant config.", name); + nm_log_warn (LOGD_SUPPLICANT, "Error adding %s to supplicant config.", name); return FALSE; } } else if ((key_len == 5) || (key_len == 13)) { if (!nm_supplicant_config_add_option (self, name, key, key_len, TRUE)) { - nm_warning ("Error adding %s to supplicant config.", name); + nm_log_warn (LOGD_SUPPLICANT, "Error adding %s to supplicant config.", name); return FALSE; } } else { - nm_warning ("Invalid WEP key '%s'", name); + nm_log_warn (LOGD_SUPPLICANT, "Invalid WEP key '%s'", name); return FALSE; } } else if (wep_type == NM_WEP_KEY_TYPE_PASSPHRASE) { @@ -570,7 +571,7 @@ add_wep_key (NMSupplicantConfig *self, if (success) success = nm_supplicant_config_add_option (self, name, (const char *) digest, digest_len, TRUE); if (!success) { - nm_warning ("Error adding %s to supplicant config.", name); + nm_log_warn (LOGD_SUPPLICANT, "Error adding %s to supplicant config.", name); return FALSE; } } @@ -611,7 +612,7 @@ nm_supplicant_config_add_setting_wireless_security (NMSupplicantConfig *self, success = nm_supplicant_config_add_option (self, "psk", value, psk_len / 2, TRUE); g_free (value); if (!success) { - nm_warning ("Error adding 'psk' to supplicant config."); + nm_log_warn (LOGD_SUPPLICANT, "Error adding 'psk' to supplicant config."); return FALSE; } } else if (psk_len >= 8 && psk_len <= 63) { @@ -621,12 +622,12 @@ nm_supplicant_config_add_setting_wireless_security (NMSupplicantConfig *self, * passphrase and not a hex key. */ if (!nm_supplicant_config_add_option_with_type (self, "psk", psk, -1, TYPE_STRING, TRUE)) { - nm_warning ("Error adding 'psk' to supplicant config."); + nm_log_warn (LOGD_SUPPLICANT, "Error adding 'psk' to supplicant config."); return FALSE; } } else { /* Invalid PSK */ - nm_warning ("Invalid PSK length %u: not between 8 and 63 characters inclusive.", (guint32) psk_len); + nm_log_warn (LOGD_SUPPLICANT, "Invalid PSK length %u: not between 8 and 63 characters inclusive.", (guint32) psk_len); return FALSE; } } @@ -662,7 +663,7 @@ nm_supplicant_config_add_setting_wireless_security (NMSupplicantConfig *self, success = nm_supplicant_config_add_option (self, "wep_tx_keyidx", value, -1, FALSE); g_free (value); if (!success) { - nm_warning ("Error adding wep_tx_keyidx to supplicant config."); + nm_log_warn (LOGD_SUPPLICANT, "Error adding wep_tx_keyidx to supplicant config."); return FALSE; } } diff --git a/src/supplicant-manager/nm-supplicant-interface.c b/src/supplicant-manager/nm-supplicant-interface.c index 00f0c307ee..a65a458f5b 100644 --- a/src/supplicant-manager/nm-supplicant-interface.c +++ b/src/supplicant-manager/nm-supplicant-interface.c @@ -25,7 +25,7 @@ #include "nm-supplicant-interface.h" #include "nm-supplicant-manager.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-marshal.h" #include "nm-supplicant-config.h" #include "nm-dbus-manager.h" @@ -144,6 +144,7 @@ typedef struct { DBusGProxy *proxy; NMCallStore *store; DBusGProxyCall *call; + gboolean disposing; } NMSupplicantInfo; static NMSupplicantInfo * @@ -164,10 +165,11 @@ nm_supplicant_info_new (NMSupplicantInterface *interface, static void nm_supplicant_info_set_call (NMSupplicantInfo *info, DBusGProxyCall *call) { - if (call) { - nm_call_store_add (info->store, G_OBJECT (info->proxy), (gpointer) call); - info->call = call; - } + g_return_if_fail (info != NULL); + g_return_if_fail (call != NULL); + + nm_call_store_add (info->store, G_OBJECT (info->proxy), (gpointer) call); + info->call = call; } static void @@ -175,13 +177,30 @@ nm_supplicant_info_destroy (gpointer user_data) { NMSupplicantInfo *info = (NMSupplicantInfo *) user_data; - if (info->call) - nm_call_store_remove (info->store, G_OBJECT (info->proxy), info->call); + /* Guard against double-disposal; since DBusGProxy doesn't guard against + * double-disposal, we could infinite loop here if we're in the middle of + * some wpa_supplicant D-Bus calls. When the supplicant dies we'll dispose + * of the proxy, which kills all its pending calls, which brings us here. + * Then when we unref the proxy here, its dispose() function will get called + * again, and we get right back here until we segfault because our callstack + * is too long. + */ + if (!info->disposing) { + info->disposing = TRUE; - g_object_unref (info->proxy); - g_object_unref (info->interface); + if (info->call) { + nm_call_store_remove (info->store, G_OBJECT (info->proxy), info->call); + info->call = NULL; + } - g_slice_free (NMSupplicantInfo, info); + g_object_unref (info->proxy); + info->proxy = NULL; + g_object_unref (info->interface); + info->interface = NULL; + + memset (info, 0, sizeof (NMSupplicantInfo)); + g_slice_free (NMSupplicantInfo, info); + } } @@ -498,8 +517,10 @@ bssid_properties_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_ if (!dbus_g_proxy_end_call (proxy, call_id, &err, DBUS_TYPE_G_MAP_OF_VARIANT, &hash, G_TYPE_INVALID)) { - if (!strstr (err->message, "The BSSID requested was invalid")) - nm_warning ("Couldn't retrieve BSSID properties: %s.", err->message); + if (!strstr (err->message, "The BSSID requested was invalid")) { + nm_log_warn (LOGD_SUPPLICANT, "Couldn't retrieve BSSID properties: %s.", + err->message); + } g_error_free (err); } else { g_signal_emit (info->interface, @@ -543,7 +564,7 @@ scan_results_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) if (!dbus_g_proxy_end_call (proxy, call_id, &err, DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH, &array, G_TYPE_INVALID)) { - nm_warning ("could not get scan results: %s.", err->message); + nm_log_warn (LOGD_SUPPLICANT, "could not get scan results: %s.", err->message); g_error_free (err); } else { int i; @@ -672,7 +693,7 @@ iface_state_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) if (!dbus_g_proxy_end_call (proxy, call_id, &err, G_TYPE_STRING, &state_str, G_TYPE_INVALID)) { - nm_warning ("could not get interface state: %s.", err->message); + nm_log_warn (LOGD_SUPPLICANT, "could not get interface state: %s.", err->message); g_error_free (err); } else { NMSupplicantInfo *info = (NMSupplicantInfo *) user_data; @@ -766,6 +787,7 @@ static void nm_supplicant_interface_add_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) { NMSupplicantInfo *info = (NMSupplicantInfo *) user_data; + NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (info->interface); GError *err = NULL; char *path = NULL; @@ -780,12 +802,13 @@ nm_supplicant_interface_add_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpoi /* Interface already added, just try to get the interface */ nm_supplicant_interface_add_to_supplicant (info->interface, TRUE); } else { - nm_warning ("Unexpected supplicant error getting interface: %s", err->message); + nm_log_err (LOGD_SUPPLICANT, "(%s): error getting interface: %s", + priv->dev, err->message); } g_error_free (err); } else { - NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (info->interface); + nm_log_dbg (LOGD_SUPPLICANT, "(%s): interface added to supplicant", priv->dev); priv->object_path = path; @@ -884,6 +907,8 @@ nm_supplicant_interface_start (NMSupplicantInterface * self) /* Can only start the interface from INIT state */ g_return_if_fail (priv->state == NM_SUPPLICANT_INTERFACE_STATE_INIT); + nm_log_dbg (LOGD_SUPPLICANT, "(%s): adding interface to supplicant", priv->dev); + state = nm_supplicant_manager_get_state (priv->smgr); if (state == NM_SUPPLICANT_MANAGER_STATE_IDLE) { nm_supplicant_interface_set_state (self, NM_SUPPLICANT_INTERFACE_STATE_STARTING); @@ -893,7 +918,7 @@ nm_supplicant_interface_start (NMSupplicantInterface * self) * that its state has changed. */ } else - nm_warning ("Unknown supplicant manager state!"); + nm_log_warn (LOGD_SUPPLICANT, "Unknown supplicant manager state!"); } static void @@ -914,7 +939,7 @@ nm_supplicant_interface_handle_supplicant_manager_idle_state (NMSupplicantInterf /* Don't do anything here; interface can't get out of DOWN state */ break; default: - nm_warning ("Unknown supplicant interface state!"); + nm_log_warn (LOGD_SUPPLICANT, "Unknown supplicant interface state!"); break; } } @@ -970,7 +995,7 @@ nm_supplicant_interface_smgr_state_changed (NMSupplicantManager * smgr, nm_supplicant_interface_handle_supplicant_manager_idle_state (self); break; default: - nm_warning ("Unknown supplicant manager state!"); + nm_log_warn (LOGD_SUPPLICANT, "Unknown supplicant manager state!"); break; } } @@ -983,7 +1008,8 @@ remove_network_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_dat guint tmp; if (!dbus_g_proxy_end_call (proxy, call_id, &err, G_TYPE_UINT, &tmp, G_TYPE_INVALID)) { - nm_warning ("Couldn't remove network from supplicant interface: %s.", err->message); + nm_log_dbg (LOGD_SUPPLICANT, "Couldn't remove network from supplicant interface: %s.", + err->message); g_error_free (err); } } @@ -995,7 +1021,8 @@ disconnect_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) guint tmp; if (!dbus_g_proxy_end_call (proxy, call_id, &err, G_TYPE_UINT, &tmp, G_TYPE_INVALID)) { - nm_warning ("Couldn't disconnect supplicant interface: %s.", err->message); + nm_log_warn (LOGD_SUPPLICANT, "Couldn't disconnect supplicant interface: %s.", + err->message); g_error_free (err); } } @@ -1057,7 +1084,7 @@ select_network_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_dat guint tmp; if (!dbus_g_proxy_end_call (proxy, call_id, &err, G_TYPE_UINT, &tmp, G_TYPE_INVALID)) { - nm_warning ("Couldn't select network config: %s.", err->message); + nm_log_warn (LOGD_SUPPLICANT, "Couldn't select network config: %s.", err->message); emit_error_helper (info->interface, err); g_error_free (err); } @@ -1072,7 +1099,7 @@ set_network_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) guint tmp; if (!dbus_g_proxy_end_call (proxy, call_id, &err, G_TYPE_UINT, &tmp, G_TYPE_INVALID)) { - nm_warning ("Couldn't set network config: %s.", err->message); + nm_log_warn (LOGD_SUPPLICANT, "Couldn't set network config: %s.", err->message); emit_error_helper (info->interface, err); g_error_free (err); } else { @@ -1116,7 +1143,7 @@ set_blobs_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) guint tmp; if (!dbus_g_proxy_end_call (proxy, call_id, &err, G_TYPE_UINT, &tmp, G_TYPE_INVALID)) { - nm_warning ("Couldn't set network blobs: %s.", err->message); + nm_log_warn (LOGD_SUPPLICANT, "Couldn't set network certificates: %s.", err->message); emit_error_helper (info->interface, err); g_error_free (err); } else { @@ -1165,7 +1192,8 @@ call_set_blobs (NMSupplicantInfo *info, GHashTable *orig_blobs) (GDestroyNotify) blob_free); if (!blobs) { const char *msg = "Not enough memory to create blob table."; - nm_warning ("%s", msg); + + nm_log_warn (LOGD_SUPPLICANT, "%s", msg); g_signal_emit (info->interface, nm_supplicant_interface_signals[CONNECTION_ERROR], 0, "SendBlobError", msg); @@ -1194,7 +1222,8 @@ add_network_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) if (!dbus_g_proxy_end_call (proxy, call_id, &err, DBUS_TYPE_G_OBJECT_PATH, &path, G_TYPE_INVALID)) { - nm_warning ("Couldn't add a network to the supplicant interface: %s.", err->message); + nm_log_warn (LOGD_SUPPLICANT, "Couldn't add a network to the supplicant interface: %s.", + err->message); emit_error_helper (info->interface, err); g_error_free (err); } else { @@ -1225,22 +1254,21 @@ static void set_ap_scan_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) { NMSupplicantInfo *info = (NMSupplicantInfo *) user_data; + NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (info->interface); GError *err = NULL; guint32 tmp; DBusGProxyCall *call; if (!dbus_g_proxy_end_call (proxy, call_id, &err, G_TYPE_UINT, &tmp, G_TYPE_INVALID)) { - nm_warning ("Couldn't send AP scan mode to the supplicant interface: %s.", err->message); + nm_log_warn (LOGD_SUPPLICANT, "Couldn't send AP scan mode to the supplicant interface: %s.", + err->message); emit_error_helper (info->interface, err); g_error_free (err); return; } -{ -NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (info->interface); -int ap_scan = nm_supplicant_config_get_ap_scan (priv->cfg); -nm_info ("Config: set interface ap_scan to %d", ap_scan); -} + nm_log_info (LOGD_SUPPLICANT, "Config: set interface ap_scan to %d", + nm_supplicant_config_get_ap_scan (priv->cfg)); info = nm_supplicant_info_new (info->interface, proxy, info->store); call = dbus_g_proxy_begin_call (proxy, "addNetwork", @@ -1306,7 +1334,7 @@ scan_request_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) if (!dbus_g_proxy_end_call (proxy, call_id, &err, G_TYPE_UINT, &success, G_TYPE_INVALID)) { - nm_warning ("Could not get scan request result: %s", err->message); + nm_log_warn (LOGD_SUPPLICANT, "Could not get scan request result: %s", err->message); g_error_free (err); } diff --git a/src/supplicant-manager/nm-supplicant-manager.c b/src/supplicant-manager/nm-supplicant-manager.c index 7a177ab181..a2cf58eb8f 100644 --- a/src/supplicant-manager/nm-supplicant-manager.c +++ b/src/supplicant-manager/nm-supplicant-manager.c @@ -27,7 +27,7 @@ #include "nm-supplicant-interface.h" #include "nm-dbus-manager.h" #include "nm-marshal.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-glib-compat.h" #define SUPPLICANT_POKE_INTERVAL 120 @@ -97,11 +97,11 @@ poke_supplicant_cb (gpointer user_data) WPAS_DBUS_PATH, WPAS_DBUS_INTERFACE); if (!proxy) { - nm_warning ("Error: could not init wpa_supplicant proxy"); + nm_log_warn (LOGD_SUPPLICANT, "Error: could not init wpa_supplicant proxy"); goto out; } - nm_info ("Trying to start the supplicant..."); + nm_log_info (LOGD_SUPPLICANT, "Trying to start the supplicant..."); dbus_g_proxy_call_no_reply (proxy, "getInterface", G_TYPE_STRING, tmp, G_TYPE_INVALID); g_object_unref (proxy); @@ -288,9 +288,12 @@ nm_supplicant_manager_get_iface (NMSupplicantManager * self, } if (!iface) { + nm_log_dbg (LOGD_SUPPLICANT, "(%s): creating new supplicant interface", ifname); iface = nm_supplicant_interface_new (self, ifname, is_wireless); if (iface) priv->ifaces = g_slist_append (priv->ifaces, iface); + } else { + nm_log_dbg (LOGD_SUPPLICANT, "(%s): returning existing supplicant interface", ifname); } return iface; diff --git a/src/system-settings/Makefile.am b/src/system-settings/Makefile.am index baec81412a..3b616b9084 100644 --- a/src/system-settings/Makefile.am +++ b/src/system-settings/Makefile.am @@ -2,6 +2,7 @@ INCLUDES = -I${top_srcdir} \ -I${top_srcdir}/include \ -I${top_srcdir}/libnm-util \ -I${top_srcdir}/libnm-glib \ + -I${top_srcdir}/src/logging \ -I${top_srcdir}/src \ -I${top_builddir}/marshallers @@ -44,6 +45,7 @@ libsystem_settings_la_LIBADD = \ $(top_builddir)/libnm-util/libnm-util.la \ $(top_builddir)/libnm-glib/libnm-glib.la \ $(top_builddir)/marshallers/libmarshallers.la \ + $(top_builddir)/src/logging/libnm-logging.la \ $(DBUS_LIBS) \ $(GLIB_LIBS) \ $(GMODULE_LIBS) \ diff --git a/src/system-settings/nm-inotify-helper.c b/src/system-settings/nm-inotify-helper.c index 589dbd6917..0ee168e542 100644 --- a/src/system-settings/nm-inotify-helper.c +++ b/src/system-settings/nm-inotify-helper.c @@ -25,6 +25,7 @@ #include "nm-marshal.h" #include "nm-inotify-helper.h" +#include "nm-logging.h" G_DEFINE_TYPE (NMInotifyHelper, nm_inotify_helper, G_TYPE_OBJECT) @@ -122,14 +123,14 @@ init_inotify (NMInotifyHelper *self) priv->ifd = inotify_init (); if (priv->ifd == -1) { - g_warning ("%s: couldn't initialize inotify", __func__); + nm_log_warn (LOGD_SYS_SET, "couldn't initialize inotify"); return FALSE; } /* Watch the inotify descriptor for file/directory change events */ channel = g_io_channel_unix_new (priv->ifd); if (!channel) { - g_warning ("%s: couldn't create new GIOChannel", __func__); + nm_log_warn (LOGD_SYS_SET, "couldn't create new GIOChannel"); close (priv->ifd); priv->ifd = -1; return FALSE; diff --git a/src/system-settings/nm-sysconfig-connection.c b/src/system-settings/nm-sysconfig-connection.c index 7d6074c63d..09cec4000f 100644 --- a/src/system-settings/nm-sysconfig-connection.c +++ b/src/system-settings/nm-sysconfig-connection.c @@ -28,6 +28,7 @@ #include "nm-settings-connection-interface.h" #include "nm-settings-interface.h" #include "nm-polkit-helpers.h" +#include "nm-logging.h" static void settings_connection_interface_init (NMSettingsConnectionInterface *klass); @@ -613,8 +614,9 @@ nm_sysconfig_connection_init (NMSysconfigConnection *self) NMSysconfigConnectionPrivate *priv = NM_SYSCONFIG_CONNECTION_GET_PRIVATE (self); priv->authority = polkit_authority_get (); - if (!priv->authority) - g_warning ("%s: error creating PolicyKit authority", __func__); + if (!priv->authority) { + nm_log_err (LOGD_SYS_SET, "%s: error creating PolicyKit authority"); + } } static void diff --git a/src/system-settings/nm-sysconfig-settings.c b/src/system-settings/nm-sysconfig-settings.c index 7580319db0..4bcfb04bc7 100644 --- a/src/system-settings/nm-sysconfig-settings.c +++ b/src/system-settings/nm-sysconfig-settings.c @@ -19,7 +19,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * (C) Copyright 2007 - 2009 Red Hat, Inc. + * (C) Copyright 2007 - 2010 Red Hat, Inc. * (C) Copyright 2008 Novell, Inc. */ @@ -33,20 +33,32 @@ #include #include #include -#include -#include -#include -#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include "../nm-device-ethernet.h" #include "nm-dbus-glib-types.h" #include "nm-sysconfig-settings.h" #include "nm-sysconfig-connection.h" #include "nm-polkit-helpers.h" #include "nm-system-config-error.h" -#include "nm-utils.h" #include "nm-default-wired-connection.h" +#include "nm-logging.h" #define CONFIG_KEY_NO_AUTO_DEFAULT "no-auto-default" @@ -90,7 +102,6 @@ typedef struct { gboolean connections_loaded; GHashTable *connections; GSList *unmanaged_specs; - char *orig_hostname; } NMSysconfigSettingsPrivate; static void settings_system_interface_init (NMSettingsSystemInterface *klass); @@ -254,7 +265,6 @@ nm_sysconfig_settings_get_hostname (NMSysconfigSettings *self) NMSysconfigSettingsPrivate *priv = NM_SYSCONFIG_SETTINGS_GET_PRIVATE (self); GSList *iter; char *hostname = NULL; - gboolean have_hostname_providers = FALSE; /* Hostname returned is the hostname returned from the first plugin * that provides one. @@ -264,8 +274,6 @@ nm_sysconfig_settings_get_hostname (NMSysconfigSettings *self) g_object_get (G_OBJECT (iter->data), NM_SYSTEM_CONFIG_INTERFACE_CAPABILITIES, &caps, NULL); if (caps & NM_SYSTEM_CONFIG_INTERFACE_CAP_MODIFY_HOSTNAME) { - have_hostname_providers = TRUE; - g_object_get (G_OBJECT (iter->data), NM_SYSTEM_CONFIG_INTERFACE_HOSTNAME, &hostname, NULL); if (hostname && strlen (hostname)) return hostname; @@ -273,10 +281,6 @@ nm_sysconfig_settings_get_hostname (NMSysconfigSettings *self) } } - /* If no plugin provided a hostname, try the original hostname of the machine */ - if (!have_hostname_providers && priv->orig_hostname) - hostname = g_strdup (priv->orig_hostname); - return hostname; } @@ -353,8 +357,6 @@ add_plugin (NMSysconfigSettings *self, NMSystemConfigInterface *plugin) g_signal_connect (plugin, NM_SYSTEM_CONFIG_INTERFACE_CONNECTION_ADDED, G_CALLBACK (plugin_connection_added), self); - g_signal_connect (plugin, NM_SYSTEM_CONFIG_INTERFACE_UNMANAGED_SPECS_CHANGED, - G_CALLBACK (unmanaged_specs_changed), self); g_signal_connect (plugin, "notify::hostname", G_CALLBACK (hostname_changed), self); nm_system_config_interface_init (plugin, NULL); @@ -364,7 +366,10 @@ add_plugin (NMSysconfigSettings *self, NMSystemConfigInterface *plugin) NM_SYSTEM_CONFIG_INTERFACE_INFO, &pinfo, NULL); - g_message ("Loaded plugin %s: %s", pname, pinfo); + g_signal_connect (plugin, NM_SYSTEM_CONFIG_INTERFACE_UNMANAGED_SPECS_CHANGED, + G_CALLBACK (unmanaged_specs_changed), self); + + nm_log_info (LOGD_SYS_SET, "Loaded plugin %s: %s", pname, pinfo); g_free (pname); g_free (pinfo); } @@ -855,11 +860,11 @@ permission_call_done (GObject *object, GAsyncResult *result, gpointer user_data) &error); /* Some random error happened */ if (error) { - g_warning ("%s.%d (%s): error checking '%s' permission: (%d) %s", - __FILE__, __LINE__, __func__, - call->pk_action, - error ? error->code : -1, - error && error->message ? error->message : "(unknown)"); + nm_log_err (LOGD_SYS_SET, "error checking '%s' permission: (%d) %s", + __FILE__, __LINE__, __func__, + call->pk_action, + error ? error->code : -1, + error && error->message ? error->message : "(unknown)"); if (error) g_error_free (error); } else { @@ -1060,7 +1065,7 @@ is_mac_auto_wired_blacklisted (NMSysconfigSettings *self, const GByteArray *mac) config = g_key_file_new (); if (!config) { - g_warning ("%s: not enough memory to load config file.", __func__); + nm_log_warn (LOGD_SYS_SET, "not enough memory to load config file."); return FALSE; } @@ -1212,14 +1217,14 @@ default_wired_try_update (NMDefaultWiredConnection *wired, g_object_set_data (G_OBJECT (nm_default_wired_connection_get_device (wired)), DEFAULT_WIRED_TAG, NULL); - g_message ("Saved default wired connection '%s' to persistent storage", id); + nm_log_info (LOGD_SYS_SET, "Saved default wired connection '%s' to persistent storage", id); return FALSE; } - g_warning ("%s: couldn't save default wired connection '%s': %d / %s", - __func__, id, - error ? error->code : -1, - (error && error->message) ? error->message : "(unknown)"); + nm_log_warn (LOGD_SYS_SET, "couldn't save default wired connection '%s': %d / %s", + id, + error ? error->code : -1, + (error && error->message) ? error->message : "(unknown)"); /* If there was an error, don't destroy the default wired connection, * but add it back to the system settings service. Connection is already @@ -1271,7 +1276,8 @@ nm_sysconfig_settings_device_added (NMSysconfigSettings *self, NMDevice *device) id = nm_setting_connection_get_id (s_con); g_assert (id); - g_message ("Added default wired connection '%s' for %s", id, nm_device_get_udi (device)); + nm_log_info (LOGD_SYS_SET, "Added default wired connection '%s' for %s", + id, nm_device_get_udi (device)); g_signal_connect (wired, "try-update", (GCallback) default_wired_try_update, self); g_signal_connect (wired, "deleted", (GCallback) default_wired_deleted, self); @@ -1323,6 +1329,7 @@ nm_sysconfig_settings_new (const char *config_file, g_object_unref (self); return NULL; } + unmanaged_specs_changed (NULL, self); } return self; @@ -1378,7 +1385,6 @@ finalize (GObject *object) g_slist_foreach (priv->plugins, (GFunc) g_object_unref, NULL); g_slist_free (priv->plugins); - g_free (priv->orig_hostname); g_free (priv->config_file); G_OBJECT_CLASS (nm_sysconfig_settings_parent_class)->finalize (object); @@ -1470,13 +1476,35 @@ nm_sysconfig_settings_class_init (NMSysconfigSettingsClass *class) dbus_g_error_domain_register (NM_SYSCONFIG_SETTINGS_ERROR, NM_DBUS_IFACE_SETTINGS_SYSTEM, NM_TYPE_SYSCONFIG_SETTINGS_ERROR); + + dbus_g_error_domain_register (NM_SETTINGS_INTERFACE_ERROR, + NM_DBUS_IFACE_SETTINGS, + NM_TYPE_SETTINGS_INTERFACE_ERROR); + + /* And register all the settings errors with D-Bus */ + dbus_g_error_domain_register (NM_CONNECTION_ERROR, NULL, NM_TYPE_CONNECTION_ERROR); + dbus_g_error_domain_register (NM_SETTING_802_1X_ERROR, NULL, NM_TYPE_SETTING_802_1X_ERROR); + dbus_g_error_domain_register (NM_SETTING_BLUETOOTH_ERROR, NULL, NM_TYPE_SETTING_BLUETOOTH_ERROR); + dbus_g_error_domain_register (NM_SETTING_CDMA_ERROR, NULL, NM_TYPE_SETTING_CDMA_ERROR); + dbus_g_error_domain_register (NM_SETTING_CONNECTION_ERROR, NULL, NM_TYPE_SETTING_CONNECTION_ERROR); + dbus_g_error_domain_register (NM_SETTING_GSM_ERROR, NULL, NM_TYPE_SETTING_GSM_ERROR); + dbus_g_error_domain_register (NM_SETTING_IP4_CONFIG_ERROR, NULL, NM_TYPE_SETTING_IP4_CONFIG_ERROR); + dbus_g_error_domain_register (NM_SETTING_IP6_CONFIG_ERROR, NULL, NM_TYPE_SETTING_IP6_CONFIG_ERROR); + dbus_g_error_domain_register (NM_SETTING_OLPC_MESH_ERROR, NULL, NM_TYPE_SETTING_OLPC_MESH_ERROR); + dbus_g_error_domain_register (NM_SETTING_PPP_ERROR, NULL, NM_TYPE_SETTING_PPP_ERROR); + dbus_g_error_domain_register (NM_SETTING_PPPOE_ERROR, NULL, NM_TYPE_SETTING_PPPOE_ERROR); + dbus_g_error_domain_register (NM_SETTING_SERIAL_ERROR, NULL, NM_TYPE_SETTING_SERIAL_ERROR); + dbus_g_error_domain_register (NM_SETTING_VPN_ERROR, NULL, NM_TYPE_SETTING_VPN_ERROR); + dbus_g_error_domain_register (NM_SETTING_WIRED_ERROR, NULL, NM_TYPE_SETTING_WIRED_ERROR); + dbus_g_error_domain_register (NM_SETTING_WIRELESS_SECURITY_ERROR, NULL, NM_TYPE_SETTING_WIRELESS_SECURITY_ERROR); + dbus_g_error_domain_register (NM_SETTING_WIRELESS_ERROR, NULL, NM_TYPE_SETTING_WIRELESS_ERROR); + dbus_g_error_domain_register (NM_SETTING_ERROR, NULL, NM_TYPE_SETTING_ERROR); } static void nm_sysconfig_settings_init (NMSysconfigSettings *self) { NMSysconfigSettingsPrivate *priv = NM_SYSCONFIG_SETTINGS_GET_PRIVATE (self); - char hostname[HOST_NAME_MAX + 2]; priv->connections = g_hash_table_new_full (g_direct_hash, g_direct_equal, g_object_unref, NULL); @@ -1487,14 +1515,6 @@ nm_sysconfig_settings_init (NMSysconfigSettings *self) G_CALLBACK (pk_authority_changed_cb), self); } else - g_warning ("%s: failed to create PolicyKit authority.", __func__); - - /* Grab hostname on startup and use that if no plugins provide one */ - memset (hostname, 0, sizeof (hostname)); - if (gethostname (&hostname[0], HOST_NAME_MAX) == 0) { - /* only cache it if it's a valid hostname */ - if (strlen (hostname) && strcmp (hostname, "localhost") && strcmp (hostname, "localhost.localdomain")) - priv->orig_hostname = g_strdup (hostname); - } + nm_log_warn (LOGD_SYS_SET, "failed to create PolicyKit authority."); } diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am index 398042ccb5..62612a0e15 100644 --- a/src/tests/Makefile.am +++ b/src/tests/Makefile.am @@ -6,14 +6,18 @@ INCLUDES = \ -I$(top_srcdir)/src \ -I$(top_builddir)/src -noinst_PROGRAMS = test-dhcp-options +noinst_PROGRAMS = test-dhcp-options test-policy-hosts + +####### DHCP options test ####### test_dhcp_options_SOURCES = \ test-dhcp-options.c test_dhcp_options_CPPFLAGS = \ $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) + $(DBUS_CFLAGS) \ + -DDHCLIENT_PATH=\"$(DHCLIENT_PATH)\" \ + -DDHCPCD_PATH=\"$(DHCPCD_PATH)\" test_dhcp_options_LDADD = \ $(top_builddir)/libnm-util/libnm-util.la \ @@ -22,10 +26,24 @@ test_dhcp_options_LDADD = \ $(GLIB_LIBS) \ $(DBUS_LIBS) +####### policy /etc/hosts test ####### + +test_policy_hosts_SOURCES = \ + test-policy-hosts.c + +test_policy_hosts_CPPFLAGS = \ + $(GLIB_CFLAGS) + +test_policy_hosts_LDADD = \ + -ldl \ + $(top_builddir)/src/libtest-policy-hosts.la \ + $(GLIB_LIBS) + if WITH_TESTS check-local: test-dhcp-options $(abs_builddir)/test-dhcp-options + $(abs_builddir)/test-policy-hosts endif diff --git a/src/tests/test-dhcp-options.c b/src/tests/test-dhcp-options.c index 90828d9dd8..dd1f914959 100644 --- a/src/tests/test-dhcp-options.c +++ b/src/tests/test-dhcp-options.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2008 Red Hat, Inc. + * Copyright (C) 2008 - 2010 Red Hat, Inc. * */ @@ -35,15 +35,43 @@ typedef struct { const char *value; } Option; +static void +destroy_gvalue (gpointer data) +{ + GValue *value = (GValue *) data; + + g_value_unset (value); + g_slice_free (GValue, value); +} + +static GValue * +string_to_byte_array_gvalue (const char *str) +{ + GByteArray *array; + GValue *val; + + array = g_byte_array_sized_new (strlen (str)); + g_byte_array_append (array, (const guint8 *) str, strlen (str)); + + val = g_slice_new0 (GValue); + g_value_init (val, DBUS_TYPE_G_UCHAR_ARRAY); + g_value_take_boxed (val, array); + + return val; +} + static GHashTable * fill_table (Option *test_options, GHashTable *table) { Option *opt; if (!table) - table = g_hash_table_new (g_str_hash, g_str_equal); - for (opt = test_options; opt->name; opt++) - g_hash_table_insert (table, (gpointer) opt->name, (gpointer) opt->value); + table = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, destroy_gvalue); + for (opt = test_options; opt->name; opt++) { + g_hash_table_insert (table, + (gpointer) opt->name, + string_to_byte_array_gvalue (opt->value)); + } return table; } @@ -69,7 +97,7 @@ static Option generic_options[] = { }; static void -test_generic_options (void) +test_generic_options (const char *client) { GHashTable *options; NMIP4Config *ip4_config; @@ -88,7 +116,7 @@ test_generic_options (void) const char *expected_route2_gw = "10.1.1.1"; options = fill_table (generic_options, NULL); - ip4_config = nm_dhcp_manager_options_to_ip4_config ("eth0", options); + ip4_config = nm_dhcp_manager_test_ip4_options_to_config (client, "eth0", options, "rebind"); ASSERT (ip4_config != NULL, "dhcp-generic", "failed to parse DHCP4 options"); @@ -187,7 +215,7 @@ static Option wins_options[] = { }; static void -test_wins_options (void) +test_wins_options (const char *client) { GHashTable *options; NMIP4Config *ip4_config; @@ -199,7 +227,7 @@ test_wins_options (void) options = fill_table (generic_options, NULL); options = fill_table (wins_options, options); - ip4_config = nm_dhcp_manager_options_to_ip4_config ("eth0", options); + ip4_config = nm_dhcp_manager_test_ip4_options_to_config (client, "eth0", options, "rebind"); ASSERT (ip4_config != NULL, "dhcp-wins", "failed to parse DHCP4 options"); @@ -231,7 +259,7 @@ static Option classless_routes_options[] = { }; static void -test_classless_static_routes (void) +test_classless_static_routes (const char *client) { GHashTable *options; NMIP4Config *ip4_config; @@ -245,7 +273,7 @@ test_classless_static_routes (void) options = fill_table (generic_options, NULL); options = fill_table (classless_routes_options, options); - ip4_config = nm_dhcp_manager_options_to_ip4_config ("eth0", options); + ip4_config = nm_dhcp_manager_test_ip4_options_to_config (client, "eth0", options, "rebind"); ASSERT (ip4_config != NULL, "dhcp-rfc3442", "failed to parse DHCP4 options"); @@ -299,7 +327,7 @@ static Option invalid_classless_routes1[] = { }; static void -test_invalid_classless_routes1 (void) +test_invalid_classless_routes1 (const char *client) { GHashTable *options; NMIP4Config *ip4_config; @@ -311,7 +339,7 @@ test_invalid_classless_routes1 (void) options = fill_table (generic_options, NULL); options = fill_table (invalid_classless_routes1, options); - ip4_config = nm_dhcp_manager_options_to_ip4_config ("eth0", options); + ip4_config = nm_dhcp_manager_test_ip4_options_to_config (client, "eth0", options, "rebind"); ASSERT (ip4_config != NULL, "dhcp-rfc3442-invalid-1", "failed to parse DHCP4 options"); @@ -348,7 +376,7 @@ static Option invalid_classless_routes2[] = { }; static void -test_invalid_classless_routes2 (void) +test_invalid_classless_routes2 (const char *client) { GHashTable *options; NMIP4Config *ip4_config; @@ -362,7 +390,7 @@ test_invalid_classless_routes2 (void) options = fill_table (generic_options, NULL); options = fill_table (invalid_classless_routes2, options); - ip4_config = nm_dhcp_manager_options_to_ip4_config ("eth0", options); + ip4_config = nm_dhcp_manager_test_ip4_options_to_config (client, "eth0", options, "rebind"); ASSERT (ip4_config != NULL, "dhcp-rfc3442-invalid-2", "failed to parse DHCP4 options"); @@ -420,7 +448,7 @@ static Option invalid_classless_routes3[] = { }; static void -test_invalid_classless_routes3 (void) +test_invalid_classless_routes3 (const char *client) { GHashTable *options; NMIP4Config *ip4_config; @@ -432,7 +460,7 @@ test_invalid_classless_routes3 (void) options = fill_table (generic_options, NULL); options = fill_table (invalid_classless_routes3, options); - ip4_config = nm_dhcp_manager_options_to_ip4_config ("eth0", options); + ip4_config = nm_dhcp_manager_test_ip4_options_to_config (client, "eth0", options, "rebind"); ASSERT (ip4_config != NULL, "dhcp-rfc3442-invalid-3", "failed to parse DHCP4 options"); @@ -469,7 +497,7 @@ static Option gw_in_classless_routes[] = { }; static void -test_gateway_in_classless_routes (void) +test_gateway_in_classless_routes (const char *client) { GHashTable *options; NMIP4Config *ip4_config; @@ -483,7 +511,7 @@ test_gateway_in_classless_routes (void) options = fill_table (generic_options, NULL); options = fill_table (gw_in_classless_routes, options); - ip4_config = nm_dhcp_manager_options_to_ip4_config ("eth0", options); + ip4_config = nm_dhcp_manager_test_ip4_options_to_config (client, "eth0", options, "rebind"); ASSERT (ip4_config != NULL, "dhcp-rfc3442-gateway", "failed to parse DHCP4 options"); @@ -526,7 +554,7 @@ static Option escaped_searches_options[] = { }; static void -test_escaped_domain_searches (void) +test_escaped_domain_searches (const char *client) { GHashTable *options; NMIP4Config *ip4_config; @@ -537,7 +565,7 @@ test_escaped_domain_searches (void) options = fill_table (generic_options, NULL); options = fill_table (escaped_searches_options, options); - ip4_config = nm_dhcp_manager_options_to_ip4_config ("eth0", options); + ip4_config = nm_dhcp_manager_test_ip4_options_to_config (client, "eth0", options, "rebind"); ASSERT (ip4_config != NULL, "dhcp-escaped-domain-searches", "failed to parse DHCP4 options"); @@ -560,7 +588,7 @@ static Option invalid_escaped_searches_options[] = { }; static void -test_invalid_escaped_domain_searches (void) +test_invalid_escaped_domain_searches (const char *client) { GHashTable *options; NMIP4Config *ip4_config; @@ -568,7 +596,7 @@ test_invalid_escaped_domain_searches (void) options = fill_table (generic_options, NULL); options = fill_table (invalid_escaped_searches_options, options); - ip4_config = nm_dhcp_manager_options_to_ip4_config ("eth0", options); + ip4_config = nm_dhcp_manager_test_ip4_options_to_config (client, "eth0", options, "rebind"); ASSERT (ip4_config != NULL, "dhcp-invalid-escaped-domain-searches", "failed to parse DHCP4 options"); @@ -579,11 +607,76 @@ test_invalid_escaped_domain_searches (void) g_hash_table_destroy (options); } +static void +test_ip4_missing_prefix (const char *client, const char *ip, guint32 expected_prefix) +{ + GHashTable *options; + NMIP4Config *ip4_config; + NMIP4Address *addr; + + options = fill_table (generic_options, NULL); + g_hash_table_insert (options, "new_ip_address", string_to_byte_array_gvalue (ip)); + g_hash_table_remove (options, "new_subnet_mask"); + + ip4_config = nm_dhcp_manager_test_ip4_options_to_config (client, "eth0", options, "rebind"); + ASSERT (ip4_config != NULL, + "dhcp-ip4-missing-prefix", "failed to parse DHCP4 options"); + + ASSERT (nm_ip4_config_get_num_addresses (ip4_config) == 1, + "dhcp-ip4-missing-prefix", "unexpected number of IP4 addresses (not 1)"); + + addr = nm_ip4_config_get_address (ip4_config, 0); + ASSERT (addr != NULL, + "dhcp-ip4-missing-prefix", "missing IP4 address #1"); + + ASSERT (nm_ip4_address_get_prefix (addr) == expected_prefix, + "dhcp-ip4-missing-prefix", "unexpected IP4 address prefix %d (expected %d)", + nm_ip4_address_get_prefix (addr), expected_prefix); + + g_hash_table_destroy (options); +} + +static void +test_ip4_prefix_classless (const char *client) +{ + GHashTable *options; + NMIP4Config *ip4_config; + NMIP4Address *addr; + + /* Ensure that the missing-subnet-mask handler doesn't mangle classless + * subnet masks at all. The handler should trigger only if the server + * doesn't send the subnet mask. + */ + + options = fill_table (generic_options, NULL); + g_hash_table_insert (options, "new_ip_address", string_to_byte_array_gvalue ("172.16.54.22")); + g_hash_table_insert (options, "new_subnet_mask", string_to_byte_array_gvalue ("255.255.252.0")); + + ip4_config = nm_dhcp_manager_test_ip4_options_to_config (client, "eth0", options, "rebind"); + ASSERT (ip4_config != NULL, + "dhcp-ip4-prefix-classless", "failed to parse DHCP4 options"); + + ASSERT (nm_ip4_config_get_num_addresses (ip4_config) == 1, + "dhcp-ip4-prefix-classless", "unexpected number of IP4 addresses (not 1)"); + + addr = nm_ip4_config_get_address (ip4_config, 0); + ASSERT (addr != NULL, + "dhcp-ip4-prefix-classless", "missing IP4 address #1"); + + ASSERT (nm_ip4_address_get_prefix (addr) == 22, + "dhcp-ip4-prefix-classless", "unexpected IP4 address prefix %d (expected 22)", + nm_ip4_address_get_prefix (addr)); + + g_hash_table_destroy (options); +} + int main (int argc, char **argv) { GError *error = NULL; DBusGConnection *bus; char *base; + const char *clients[2][2] = { {DHCLIENT_PATH, "dhclient"}, {DHCPCD_PATH, "dhcpcd"} }; + guint32 i; g_type_init (); bus = dbus_g_bus_get (DBUS_BUS_SESSION, NULL); @@ -592,15 +685,27 @@ int main (int argc, char **argv) FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message); /* The tests */ - test_generic_options (); - test_wins_options (); - test_classless_static_routes (); - test_invalid_classless_routes1 (); - test_invalid_classless_routes2 (); - test_invalid_classless_routes3 (); - test_gateway_in_classless_routes (); - test_escaped_domain_searches (); - test_invalid_escaped_domain_searches (); + for (i = 0; i < 2; i++) { + const char *client_path = clients[i][0]; + const char *client = clients[i][1]; + + if (!client_path || !strlen (client_path)) + continue; + + test_generic_options (client); + test_wins_options (client); + test_classless_static_routes (client); + test_invalid_classless_routes1 (client); + test_invalid_classless_routes2 (client); + test_invalid_classless_routes3 (client); + test_gateway_in_classless_routes (client); + test_escaped_domain_searches (client); + test_invalid_escaped_domain_searches (client); + test_ip4_missing_prefix (client, "192.168.1.10", 24); + test_ip4_missing_prefix (client, "172.16.54.50", 16); + test_ip4_missing_prefix (client, "10.1.2.3", 8); + test_ip4_prefix_classless (client); + } base = g_path_get_basename (argv[0]); fprintf (stdout, "%s: SUCCESS\n", base); diff --git a/src/tests/test-policy-hosts.c b/src/tests/test-policy-hosts.c new file mode 100644 index 0000000000..e14f15e5f2 --- /dev/null +++ b/src/tests/test-policy-hosts.c @@ -0,0 +1,394 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + * 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, 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2010 Red Hat, Inc. + * + */ + +#include +#include + +#include "nm-policy-hosts.h" + +#define FALLBACK_HOSTNAME "localhost.localdomain" + +static void +test_generic (const char *before, + const char *after, + const char *hostname, + gboolean expect_error) +{ + char **lines; + GString *newc; + GError *error = NULL; + + /* Get the new /etc/hosts contents */ + lines = g_strsplit_set (before, "\n\r", 0); + newc = nm_policy_get_etc_hosts ((const char **) lines, + strlen (before), + hostname, + FALLBACK_HOSTNAME, + &error); + g_strfreev (lines); + + if (expect_error) { + g_assert (newc == NULL); + g_assert (error != NULL); + g_clear_error (&error); + } else if (after == NULL) { + /* No change to /etc/hosts required */ + g_assert (newc == NULL); + g_assert (error == NULL); + } else { + g_assert (newc != NULL); + g_assert (error == NULL); + +#if 0 + g_message ("\n--------------------------------------\n" + "%s" + "--------------------------------------", + newc->str); +#endif + g_assert (strlen (newc->str) == strlen (after)); + g_assert (strcmp (newc->str, after) == 0); + g_string_free (newc, TRUE); + } +} + +/*******************************************/ + +static const char *generic_before = \ + "# Do not remove the following line, or various programs\n" + "# that require network functionality will fail.\n" + "127.0.0.1 localhost.localdomain localhost\n" + "::1 localhost6.localdomain6 localhost6\n" + "127.0.0.1 lcmd.us.intellitxt.com\n"; + +static void +test_hosts_generic (void) +{ + test_generic (generic_before, NULL, "localhost.localdomain", FALSE); +} + +/*******************************************/ + +static const char *generic_no_boilerplate_before = \ + "127.0.0.1 localhost.localdomain localhost\n" + "::1 localhost6.localdomain6 localhost6\n" + "127.0.0.1 lcmd.us.intellitxt.com\n"; + +static void +test_hosts_generic_no_boilerplate (void) +{ + test_generic (generic_no_boilerplate_before, NULL, "localhost.localdomain", FALSE); +} + +/*******************************************/ + +static const char *generic_no_boilerplate_no_lh_before = \ + "127.0.0.1 localhost.localdomain\n" + "::1 localhost6.localdomain6 localhost6\n" + "127.0.0.1 lcmd.us.intellitxt.com\n"; + +static const char *generic_no_boilerplate_no_lh_after = \ + "127.0.0.1 localhost\n" + "127.0.0.1 localhost.localdomain\n" + "::1 localhost6.localdomain6 localhost6\n" + "127.0.0.1 lcmd.us.intellitxt.com\n"; + +static void +test_hosts_generic_no_boilerplate_no_lh (void) +{ + test_generic (generic_no_boilerplate_no_lh_before, + generic_no_boilerplate_no_lh_after, + "localhost.localdomain", + FALSE); +} + +/*******************************************/ + + +static const char *generic_no_boilerplate_no_lh_no_host_before = \ + "127.0.0.1 localhost.localdomain\n" + "::1 localhost6.localdomain6 localhost6\n" + "127.0.0.1 lcmd.us.intellitxt.com\n"; + +static const char *generic_no_boilerplate_no_lh_no_host_after = \ + "127.0.0.1 comet localhost.localdomain localhost\n" + "::1 localhost6.localdomain6 localhost6\n" + "127.0.0.1 lcmd.us.intellitxt.com\n"; + +static void +test_hosts_generic_no_boilerplate_no_lh_no_host (void) +{ + test_generic (generic_no_boilerplate_no_lh_no_host_before, + generic_no_boilerplate_no_lh_no_host_after, + "comet", + FALSE); +} + +/*******************************************/ +static const char *named_generic_before = \ + "# Do not remove the following line, or various programs\n" + "# that require network functionality will fail.\n" + "127.0.0.1 playboy localhost\n" + "::1 localhost6.localdomain6 localhost6\n" + "127.0.0.1 lcmd.us.intellitxt.com\n"; + +static void +test_hosts_named_generic (void) +{ + test_generic (named_generic_before, NULL, "playboy", FALSE); +} + +/*******************************************/ + +static const char *named_non127_before = \ + "# Do not remove the following line, or various programs\n" + "# that require network functionality will fail.\n" + "127.0.0.1 localhost.localdomain localhost\n" + "::1 localhost6.localdomain6 localhost6\n" + "127.0.0.1 lcmd.us.intellitxt.com\n" + "192.168.1.2 tomcat\n"; + +static void +test_hosts_named_non127 (void) +{ + test_generic (named_non127_before, NULL, "tomcat", FALSE); +} + +/*******************************************/ + +static const char *named2_non127_before = \ + "# Do not remove the following line, or various programs\n" + "# that require network functionality will fail.\n" + "127.0.0.1 localhost.localdomain localhost\n" + "::1 localhost6.localdomain6 localhost6\n" + "127.0.0.1 lcmd.us.intellitxt.com\n" + "192.168.1.2 tomcat\n" + "127.0.0.1 lcmd.us.intellitxt.com\n" + "127.0.0.1 srx.main.ebayrtm.com\n" + "127.0.0.1 cdn5.tribalfusion.com\n"; + +static void +test_hosts_named2_non127 (void) +{ + test_generic (named2_non127_before, NULL, "tomcat", FALSE); +} + +/*******************************************/ + +static const char *named_no_lh_before = \ + "# Do not remove the following line, or various programs\n" + "# that require network functionality will fail.\n" + "127.0.0.1 localhost.localdomain\n" + "::1 localhost6.localdomain6 localhost6\n" + "127.0.0.1 lcmd.us.intellitxt.com\n" + "192.168.1.2 tomcat\n"; + +static const char *named_no_lh_after = \ + "# Do not remove the following line, or various programs\n" + "# that require network functionality will fail.\n" + "127.0.0.1 localhost.localdomain localhost\n" + "::1 localhost6.localdomain6 localhost6\n" + "127.0.0.1 lcmd.us.intellitxt.com\n" + "192.168.1.2 tomcat\n"; + +static void +test_hosts_named_no_localhost (void) +{ + test_generic (named_no_lh_before, named_no_lh_after, "tomcat", FALSE); +} + +/*******************************************/ + +static const char *no_lh_before = \ + "# Do not remove the following line, or various programs\n" + "# that require network functionality will fail.\n" + "127.0.0.1 tomcat\n" + "::1 localhost6.localdomain6 localhost6\n" + "127.0.0.1 lcmd.us.intellitxt.com\n"; + +static const char *no_lh_after = \ + "# Do not remove the following line, or various programs\n" + "# that require network functionality will fail.\n" + "127.0.0.1 localhost.localdomain localhost\n" + "127.0.0.1 tomcat\n" + "::1 localhost6.localdomain6 localhost6\n" + "127.0.0.1 lcmd.us.intellitxt.com\n"; + +static void +test_hosts_no_localhost (void) +{ + test_generic (no_lh_before, no_lh_after, "tomcat", FALSE); +} + +/*******************************************/ + +static const char *named_last_before = \ + "# Do not remove the following line, or various programs\n" + "# that require network functionality will fail.\n" + "127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 sparcbook.ausil.us\n" + "::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 sparcbook.ausil.us\n"; + +static void +test_hosts_named_last (void) +{ + test_generic (named_last_before, NULL, "sparcbook.ausil.us", FALSE); +} + +/*******************************************/ + +static const char *no_host_before = \ + "# Do not remove the following line, or various programs\n" + "# that require network functionality will fail.\n" + "::1 localhost6.localdomain6 localhost6\n" + "\n" + "127.0.0.1 lcmd.us.intellitxt.com\n" + "127.0.0.1 srx.main.ebayrtm.com\n" + "127.0.0.1 cdn5.tribalfusion.com\n" + "127.0.0.1 a.tribalfusion.com\n"; + +static const char *no_host_after = \ + "# Do not remove the following line, or various programs\n" + "# that require network functionality will fail.\n" + "127.0.0.1 comet localhost.localdomain localhost\n" + "::1 localhost6.localdomain6 localhost6\n" + "\n" + "127.0.0.1 lcmd.us.intellitxt.com\n" + "127.0.0.1 srx.main.ebayrtm.com\n" + "127.0.0.1 cdn5.tribalfusion.com\n" + "127.0.0.1 a.tribalfusion.com\n"; + +static void +test_hosts_no_host (void) +{ + test_generic (no_host_before, no_host_after, "comet", FALSE); +} + +/*******************************************/ + +static const char *long_before = \ + "# Do not remove the following line, or various programs\n" + "# that require network functionality will fail.\n" + "127.0.0.1 localhost.localdomain localhost comet\n" + "::1 localhost6.localdomain6 localhost6\n" + "\n" + "127.0.0.1 lcmd.us.intellitxt.com\n" + "127.0.0.1 adserver.adtech.de\n" + "127.0.0.1 a.as-us.falkag.net\n" + "127.0.0.1 a.as-eu.falkag.net\n" + "127.0.0.1 ads.doubleclick.com\n" + "\n" + "# random comment\n" + "127.0.0.1 m1.2mdn.net\n" + "127.0.0.1 ds.serving-sys.com\n" + "127.0.0.1 pagead2.googlesyndication.com\n" + "127.0.0.1 ad.doubleclick.com\n" + "127.0.0.1 ad.doubleclick.net\n" + "127.0.0.1 oascentral.movietickets.com\n" + "127.0.0.1 view.atdmt.com\n" + "127.0.0.1 ads.chumcity.com\n" + "127.0.0.1 ads.as4x.tmcs.net\n" + "127.0.0.1 n4403ad.doubleclick.net\n" + "127.0.0.1 www.assoc-amazon.com\n" + "127.0.0.1 s25.sitemeter.com\n" + "127.0.0.1 adlog.com.com\n" + "127.0.0.1 ahs.laptopmag.com\n" + "127.0.0.1 altfarm.mediaplex.com\n" + "127.0.0.1 ads.addynamix.com\n" + "127.0.0.1 srx.main.ebayrtm.com\n" + "127.0.0.1 cdn5.tribalfusion.com\n" + "127.0.0.1 a.tribalfusion.com\n"; + + +static void +test_hosts_long (void) +{ + test_generic (long_before, NULL, "comet", FALSE); +} + +/*******************************************/ + +typedef struct { + const char *line; + const char *token; + gboolean expected; +} Foo; + +static Foo foo[] = { + /* Using \t here to easily differentiate tabs vs. spaces for testing */ + { "127.0.0.1\tfoobar\tblah", "blah", TRUE }, + { "", "blah", FALSE }, + { "1.1.1.1\tbork\tfoo", "blah", FALSE }, + { "127.0.0.1 foobar\tblah", "blah", TRUE }, + { "127.0.0.1 foobar blah", "blah", TRUE }, + { "127.0.0.1 localhost", "localhost.localdomain", FALSE }, + { "192.168.1.1 blah borkbork", "blah", TRUE }, + { "192.168.1.1 foobar\tblah borkbork", "blah", TRUE }, + { "192.168.1.1\tfoobar\tblah\tborkbork", "blah", TRUE }, + { "192.168.1.1 \tfoobar \tblah \tborkbork\t ", "blah", TRUE }, + { "\t\t\t\t \t\t\tasdfadf a\t\t\t\t\t \t\t\t\t\t ", "blah", FALSE }, + { NULL, NULL, FALSE } +}; + +static void +test_find_token (void) +{ + Foo *iter = &foo[0]; + + while (iter->line) { + gboolean found; + + found = nm_policy_hosts_find_token (iter->line, iter->token); + if (found != iter->expected) { + g_warning ("find-token: unexpected token result %d for '%s' <= '%s' (expected %d)", + found, iter->line, iter->token, iter->expected); + } + g_assert (found == iter->expected); + iter++; + } +} + +typedef void (*TCFunc)(void); + +#define TESTCASE(t, d) g_test_create_case (#t, 0, d, NULL, (TCFunc) t, NULL) + +int main (int argc, char **argv) +{ + GTestSuite *suite; + + g_test_init (&argc, &argv, NULL); + + suite = g_test_get_root (); + + g_test_suite_add (suite, TESTCASE (test_find_token, NULL)); + g_test_suite_add (suite, TESTCASE (test_hosts_generic, NULL)); + g_test_suite_add (suite, TESTCASE (test_hosts_generic_no_boilerplate, NULL)); + g_test_suite_add (suite, TESTCASE (test_hosts_generic_no_boilerplate_no_lh, NULL)); + g_test_suite_add (suite, TESTCASE (test_hosts_generic_no_boilerplate_no_lh_no_host, NULL)); + g_test_suite_add (suite, TESTCASE (test_hosts_named_generic, NULL)); + g_test_suite_add (suite, TESTCASE (test_hosts_named_non127, NULL)); + g_test_suite_add (suite, TESTCASE (test_hosts_named2_non127, NULL)); + g_test_suite_add (suite, TESTCASE (test_hosts_named_no_localhost, NULL)); + g_test_suite_add (suite, TESTCASE (test_hosts_no_localhost, NULL)); + g_test_suite_add (suite, TESTCASE (test_hosts_named_last, NULL)); + g_test_suite_add (suite, TESTCASE (test_hosts_no_host, NULL)); + g_test_suite_add (suite, TESTCASE (test_hosts_long, NULL)); + + return g_test_run (); +} + diff --git a/src/vpn-manager/Makefile.am b/src/vpn-manager/Makefile.am index 1078603382..56e4a4ced3 100644 --- a/src/vpn-manager/Makefile.am +++ b/src/vpn-manager/Makefile.am @@ -2,6 +2,7 @@ INCLUDES = \ -I${top_srcdir} \ -I${top_srcdir}/include \ -I${top_srcdir}/libnm-util \ + -I${top_srcdir}/src/logging \ -I${top_srcdir}/src \ -I${top_builddir}/marshallers \ -I${top_srcdir}/src/named-manager \ @@ -25,6 +26,7 @@ libvpn_manager_la_CPPFLAGS = \ libvpn_manager_la_LIBADD = \ $(top_builddir)/marshallers/libmarshallers.la \ + $(top_builddir)/src/logging/libnm-logging.la \ $(top_builddir)/libnm-util/libnm-util.la \ $(DBUS_LIBS) \ $(GLIB_LIBS) diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c index f8360dc669..eee181ef01 100644 --- a/src/vpn-manager/nm-vpn-connection.c +++ b/src/vpn-manager/nm-vpn-connection.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2005 - 2009 Red Hat, Inc. + * Copyright (C) 2005 - 2010 Red Hat, Inc. * Copyright (C) 2006 - 2008 Novell, Inc. */ @@ -35,7 +35,8 @@ #include "nm-setting-ip4-config.h" #include "nm-dbus-manager.h" #include "nm-manager.h" -#include "NetworkManagerSystem.h" +#include "nm-system.h" +#include "nm-logging.h" #include "nm-utils.h" #include "nm-vpn-plugin-bindings.h" #include "nm-marshal.h" @@ -44,7 +45,7 @@ #include "nm-dbus-glib-types.h" #include "NetworkManagerUtils.h" #include "nm-named-manager.h" -#include "nm-netlink.h" +#include "nm-netlink-monitor.h" #include "nm-glib-compat.h" #include "nm-vpn-connection-glue.h" @@ -68,6 +69,7 @@ typedef struct { gulong device_ip4; gboolean is_default; + gboolean is_default6; NMActiveConnectionState state; NMVPNConnectionState vpn_state; @@ -76,7 +78,7 @@ typedef struct { guint ipconfig_timeout; NMIP4Config *ip4_config; guint32 ip4_internal_gw; - char *tundev; + char *ip_iface; char *banner; struct rtnl_route *gw_route; @@ -101,6 +103,7 @@ enum { PROP_DEVICES, PROP_STATE, PROP_DEFAULT, + PROP_DEFAULT6, PROP_VPN, PROP_VPN_STATE, PROP_BANNER, @@ -163,7 +166,7 @@ nm_vpn_connection_set_vpn_state (NMVPNConnection *connection, nm_utils_call_dispatcher ("vpn-up", priv->connection, priv->parent_dev, - priv->tundev); + priv->ip_iface); break; case NM_VPN_CONNECTION_STATE_FAILED: case NM_VPN_CONNECTION_STATE_DISCONNECTED: @@ -171,7 +174,7 @@ nm_vpn_connection_set_vpn_state (NMVPNConnection *connection, nm_utils_call_dispatcher ("vpn-down", priv->connection, priv->parent_dev, - priv->tundev); + priv->ip_iface); } break; default: @@ -269,7 +272,7 @@ plugin_failed (DBusGProxy *proxy, { NMVPNConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (user_data); - nm_info ("VPN plugin failed: %d", plugin_failure); + nm_log_warn (LOGD_VPN, "VPN plugin failed: %d", plugin_failure); switch (plugin_failure) { case NM_VPN_PLUGIN_FAILURE_LOGIN_FAILED: @@ -291,7 +294,7 @@ plugin_state_changed (DBusGProxy *proxy, NMVPNConnection *connection = NM_VPN_CONNECTION (user_data); NMVPNConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (connection); - nm_info ("VPN plugin state changed: %d", state); + nm_log_info (LOGD_VPN, "VPN plugin state changed: %d", state); if (state == NM_VPN_SERVICE_STATE_STOPPED) { /* Clear connection secrets to ensure secrets get requested each time the @@ -305,7 +308,7 @@ plugin_state_changed (DBusGProxy *proxy, case NM_VPN_CONNECTION_STATE_CONNECT: case NM_VPN_CONNECTION_STATE_IP_CONFIG_GET: case NM_VPN_CONNECTION_STATE_ACTIVATED: - nm_info ("VPN plugin state change reason: %d", priv->failure_reason); + nm_log_info (LOGD_VPN, "VPN plugin state change reason: %d", priv->failure_reason); nm_vpn_connection_set_vpn_state (connection, NM_VPN_CONNECTION_STATE_FAILED, priv->failure_reason); @@ -331,8 +334,8 @@ ip_address_to_string (guint32 numeric) if (inet_ntop (AF_INET, &temp_addr, buf, INET_ADDRSTRLEN)) { return buf; } else { - nm_warning ("%s: error converting IP4 address 0x%X", - __func__, ntohl (temp_addr.s_addr)); + nm_log_warn (LOGD_VPN, "error converting IP4 address 0x%X", + ntohl (temp_addr.s_addr)); return NULL; } } @@ -340,7 +343,7 @@ ip_address_to_string (guint32 numeric) static void print_vpn_config (NMIP4Config *config, guint32 internal_gw, - const char *tundev, + const char *ip_iface, const char *banner) { NMIP4Address *addr; @@ -351,38 +354,44 @@ print_vpn_config (NMIP4Config *config, addr = nm_ip4_config_get_address (config, 0); - nm_info ("VPN Gateway: %s", ip_address_to_string (nm_ip4_address_get_gateway (addr))); + nm_log_info (LOGD_VPN, "VPN Gateway: %s", ip_address_to_string (nm_ip4_address_get_gateway (addr))); if (internal_gw) - nm_info ("Internal Gateway: %s", ip_address_to_string (internal_gw)); - nm_info ("Tunnel Device: %s", tundev); - nm_info ("Internal IP4 Address: %s", ip_address_to_string (nm_ip4_address_get_address (addr))); - nm_info ("Internal IP4 Prefix: %d", nm_ip4_address_get_prefix (addr)); - nm_info ("Internal IP4 Point-to-Point Address: %s", - ip_address_to_string (nm_ip4_config_get_ptp_address (config))); - nm_info ("Maximum Segment Size (MSS): %d", nm_ip4_config_get_mss (config)); + nm_log_info (LOGD_VPN, "Internal Gateway: %s", ip_address_to_string (internal_gw)); + nm_log_info (LOGD_VPN, "Tunnel Device: %s", ip_iface); + nm_log_info (LOGD_VPN, "Internal IP4 Address: %s", ip_address_to_string (nm_ip4_address_get_address (addr))); + nm_log_info (LOGD_VPN, "Internal IP4 Prefix: %d", nm_ip4_address_get_prefix (addr)); + nm_log_info (LOGD_VPN, "Internal IP4 Point-to-Point Address: %s", + ip_address_to_string (nm_ip4_config_get_ptp_address (config))); + nm_log_info (LOGD_VPN, "Maximum Segment Size (MSS): %d", nm_ip4_config_get_mss (config)); num = nm_ip4_config_get_num_routes (config); for (i = 0; i < num; i++) { NMIP4Route *route; route = nm_ip4_config_get_route (config, i); - nm_info ("Static Route: %s/%d Next Hop: %s", - ip_address_to_string (nm_ip4_route_get_dest (route)), - nm_ip4_route_get_prefix (route), - ip_address_to_string (nm_ip4_route_get_next_hop (route))); + nm_log_info (LOGD_VPN, "Static Route: %s/%d Next Hop: %s", + ip_address_to_string (nm_ip4_route_get_dest (route)), + nm_ip4_route_get_prefix (route), + ip_address_to_string (nm_ip4_route_get_next_hop (route))); } num = nm_ip4_config_get_num_nameservers (config); - for (i = 0; i < num; i++) - nm_info ("Internal IP4 DNS: %s", ip_address_to_string (nm_ip4_config_get_nameserver (config, i))); + for (i = 0; i < num; i++) { + nm_log_info (LOGD_VPN, "Internal IP4 DNS: %s", + ip_address_to_string (nm_ip4_config_get_nameserver (config, i))); + } if (nm_ip4_config_get_num_domains (config) > 0) dns_domain = (char *) nm_ip4_config_get_domain (config, 0); - nm_info ("DNS Domain: '%s'", dns_domain ? dns_domain : "(none)"); - nm_info ("Login Banner:"); - nm_info ("-----------------------------------------"); - nm_info ("%s", banner); - nm_info ("-----------------------------------------"); + + nm_log_info (LOGD_VPN, "DNS Domain: '%s'", dns_domain ? dns_domain : "(none)"); + + if (banner && strlen (banner)) { + nm_log_info (LOGD_VPN, "Login Banner:"); + nm_log_info (LOGD_VPN, "-----------------------------------------"); + nm_log_info (LOGD_VPN, "%s", banner); + nm_log_info (LOGD_VPN, "-----------------------------------------"); + } } static void @@ -399,8 +408,8 @@ nm_vpn_connection_ip4_config_get (DBusGProxy *proxy, int i; guint32 vpn_ext_gw = 0; - nm_info ("VPN connection '%s' (IP Config Get) reply received.", - nm_vpn_connection_get_name (connection)); + nm_log_info (LOGD_VPN, "VPN connection '%s' (IP Config Get) reply received.", + nm_vpn_connection_get_name (connection)); g_source_remove (priv->ipconfig_timeout); priv->ipconfig_timeout = 0; @@ -409,9 +418,9 @@ nm_vpn_connection_ip4_config_get (DBusGProxy *proxy, val = (GValue *) g_hash_table_lookup (config_hash, NM_VPN_PLUGIN_IP4_CONFIG_TUNDEV); if (val) - priv->tundev = g_strdup (g_value_get_string (val)); + priv->ip_iface = g_strdup (g_value_get_string (val)); else { - nm_warning ("%s: invalid or missing tunnel device received!", __func__); + nm_log_err (LOGD_VPN, "invalid or missing tunnel device received!"); goto error; } @@ -445,7 +454,7 @@ nm_vpn_connection_ip4_config_get (DBusGProxy *proxy, if (nm_ip4_address_get_address (addr) && nm_ip4_address_get_prefix (addr)) { nm_ip4_config_take_address (config, addr); } else { - nm_warning ("%s: invalid IP4 config received!", __func__); + nm_log_err (LOGD_VPN, "invalid IP4 config received!"); nm_ip4_address_unref (addr); goto error; } @@ -511,15 +520,15 @@ nm_vpn_connection_ip4_config_get (DBusGProxy *proxy, g_slist_free (routes); } - print_vpn_config (config, priv->ip4_internal_gw, priv->tundev, priv->banner); + print_vpn_config (config, priv->ip4_internal_gw, priv->ip_iface, priv->banner); /* Merge in user overrides from the NMConnection's IPv4 setting */ s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (priv->connection, NM_TYPE_SETTING_IP4_CONFIG)); nm_utils_merge_ip4_config (config, s_ip4); - nm_system_device_set_up_down_with_iface (priv->tundev, TRUE, NULL); + nm_system_device_set_up_down_with_iface (priv->ip_iface, TRUE, NULL); - if (nm_system_apply_ip4_config (priv->tundev, config, 0, NM_IP4_COMPARE_FLAG_ALL)) { + if (nm_system_apply_ip4_config (priv->ip_iface, config, 0, NM_IP4_COMPARE_FLAG_ALL)) { NMNamedManager *named_mgr; /* Add any explicit route to the VPN gateway through the parent device */ @@ -527,13 +536,13 @@ nm_vpn_connection_ip4_config_get (DBusGProxy *proxy, /* Add the VPN to DNS */ named_mgr = nm_named_manager_get (); - nm_named_manager_add_ip4_config (named_mgr, priv->tundev, config, NM_NAMED_IP_CONFIG_TYPE_VPN); + nm_named_manager_add_ip4_config (named_mgr, priv->ip_iface, config, NM_NAMED_IP_CONFIG_TYPE_VPN); g_object_unref (named_mgr); priv->ip4_config = config; - nm_info ("VPN connection '%s' (IP Config Get) complete.", - nm_vpn_connection_get_name (connection)); + nm_log_info (LOGD_VPN, "VPN connection '%s' (IP Config Get) complete.", + nm_vpn_connection_get_name (connection)); nm_vpn_connection_set_vpn_state (connection, NM_VPN_CONNECTION_STATE_ACTIVATED, NM_VPN_CONNECTION_STATE_REASON_NONE); @@ -541,8 +550,8 @@ nm_vpn_connection_ip4_config_get (DBusGProxy *proxy, } error: - nm_warning ("VPN connection '%s' did not receive valid IP config information.", - nm_vpn_connection_get_name (connection)); + nm_log_warn (LOGD_VPN, "VPN connection '%s' did not receive valid IP config information.", + nm_vpn_connection_get_name (connection)); nm_vpn_connection_set_vpn_state (connection, NM_VPN_CONNECTION_STATE_FAILED, NM_VPN_CONNECTION_STATE_REASON_IP_CONFIG_INVALID); @@ -561,8 +570,8 @@ nm_vpn_connection_ip_config_timeout (gpointer user_data) * in this timeout, cancel activation because it's taken too long. */ if (nm_vpn_connection_get_vpn_state (connection) == NM_VPN_CONNECTION_STATE_IP_CONFIG_GET) { - nm_info ("VPN connection '%s' (IP Config Get) timeout exceeded.", - nm_vpn_connection_get_name (connection)); + nm_log_warn (LOGD_VPN, "VPN connection '%s' (IP Config Get) timeout exceeded.", + nm_vpn_connection_get_name (connection)); nm_vpn_connection_set_vpn_state (connection, NM_VPN_CONNECTION_STATE_FAILED, NM_VPN_CONNECTION_STATE_REASON_CONNECT_TIMEOUT); @@ -577,12 +586,12 @@ nm_vpn_connection_connect_cb (DBusGProxy *proxy, GError *err, gpointer user_data NMVPNConnection *connection = NM_VPN_CONNECTION (user_data); NMVPNConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (connection); - nm_info ("VPN connection '%s' (Connect) reply received.", - nm_vpn_connection_get_name (connection)); + nm_log_info (LOGD_VPN, "VPN connection '%s' (Connect) reply received.", + nm_vpn_connection_get_name (connection)); if (err) { - nm_warning ("VPN connection '%s' failed to connect: '%s'.", - nm_vpn_connection_get_name (connection), err->message); + nm_log_warn (LOGD_VPN, "VPN connection '%s' failed to connect: '%s'.", + nm_vpn_connection_get_name (connection), err->message); nm_vpn_connection_set_vpn_state (connection, NM_VPN_CONNECTION_STATE_FAILED, NM_VPN_CONNECTION_STATE_REASON_SERVICE_START_FAILED); @@ -719,7 +728,7 @@ nm_vpn_connection_get_ip_iface (NMVPNConnection *connection) { g_return_val_if_fail (NM_IS_VPN_CONNECTION (connection), NULL); - return NM_VPN_CONNECTION_GET_PRIVATE (connection)->tundev; + return NM_VPN_CONNECTION_GET_PRIVATE (connection)->ip_iface; } NMDevice * @@ -777,9 +786,9 @@ secrets_update_setting (NMSecretsProviderInterface *interface, return FALSE; if (!nm_connection_update_secrets (priv->connection, NM_SETTING_VPN_SETTING_NAME, new, &error)) { - nm_warning ("Failed to update VPN secrets: %d %s", - error ? error->code : -1, - error && error->message ? error->message : "(none)"); + nm_log_warn (LOGD_VPN, "Failed to update VPN secrets: %d %s", + error ? error->code : -1, + error && error->message ? error->message : "(none)"); g_clear_error (&error); return FALSE; } @@ -823,9 +832,9 @@ connection_need_secrets_cb (DBusGProxy *proxy, NMVPNConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (self); if (error) { - g_warning ("%s.%d: NeedSecrets failed: %s %s", - __FILE__, __LINE__, - g_quark_to_string (error->domain), error->message); + nm_log_err (LOGD_VPN, "NeedSecrets failed: %s %s", + g_quark_to_string (error->domain), + error->message); nm_vpn_connection_fail (self, NM_VPN_CONNECTION_STATE_REASON_NO_SECRETS); return; } @@ -867,10 +876,11 @@ vpn_cleanup (NMVPNConnection *connection) { NMVPNConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (connection); - if (priv->tundev) { - nm_system_device_set_up_down_with_iface (priv->tundev, FALSE, NULL); - nm_system_device_flush_routes_with_iface (priv->tundev); - nm_system_device_flush_addresses_with_iface (priv->tundev); + if (priv->ip_iface) { + nm_system_device_set_up_down_with_iface (priv->ip_iface, FALSE, NULL); + /* FIXME: use AF_UNSPEC here when we have IPv6 support */ + nm_system_device_flush_routes_with_iface (priv->ip_iface, AF_INET); + nm_system_device_flush_addresses_with_iface (priv->ip_iface); } if (priv->ip4_config) { @@ -879,7 +889,7 @@ vpn_cleanup (NMVPNConnection *connection) /* Remove attributes of the VPN's IP4 Config */ named_mgr = nm_named_manager_get (); - nm_named_manager_remove_ip4_config (named_mgr, priv->tundev, priv->ip4_config); + nm_named_manager_remove_ip4_config (named_mgr, priv->ip_iface, priv->ip4_config); g_object_unref (named_mgr); /* Remove any previously added VPN gateway host route */ @@ -893,7 +903,7 @@ vpn_cleanup (NMVPNConnection *connection) nm_device_get_ip4_config (priv->parent_dev), nm_device_get_priority (priv->parent_dev), NM_IP4_COMPARE_FLAG_ADDRESSES | NM_IP4_COMPARE_FLAG_ROUTES)) { - nm_warning ("%s: failed to re-apply VPN parent device addresses and routes.", __func__); + nm_log_err (LOGD_VPN, "failed to re-apply VPN parent device addresses and routes."); } } } @@ -908,9 +918,9 @@ vpn_cleanup (NMVPNConnection *connection) priv->banner = NULL; } - if (priv->tundev) { - g_free (priv->tundev); - priv->tundev = NULL; + if (priv->ip_iface) { + g_free (priv->ip_iface); + priv->ip_iface = NULL; } /* Clear out connection secrets to ensure that the settings service @@ -940,7 +950,7 @@ connection_state_changed (NMVPNConnection *connection, org_freedesktop_NetworkManager_VPN_Plugin_disconnect (priv->proxy, &err); if (err) { - nm_warning ("%s", err->message); + nm_log_warn (LOGD_VPN, "error disconnecting VPN: %s", err->message); g_error_free (err); } @@ -1014,7 +1024,7 @@ finalize (GObject *object) NMVPNConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (object); g_free (priv->banner); - g_free (priv->tundev); + g_free (priv->ip_iface); g_free (priv->ac_path); G_OBJECT_CLASS (nm_vpn_connection_parent_class)->finalize (object); @@ -1045,6 +1055,9 @@ get_property (GObject *object, guint prop_id, case PROP_DEFAULT: g_value_set_boolean (value, priv->is_default); break; + case PROP_DEFAULT6: + g_value_set_boolean (value, priv->is_default6); + break; case PROP_VPN: g_value_set_boolean (value, TRUE); break; @@ -1115,7 +1128,14 @@ nm_vpn_connection_class_init (NMVPNConnectionClass *connection_class) (object_class, PROP_DEFAULT, g_param_spec_boolean (NM_ACTIVE_CONNECTION_DEFAULT, "Default", - "Is the default active connection", + "Is the default IPv4 active connection", + FALSE, + G_PARAM_READABLE)); + g_object_class_install_property + (object_class, PROP_DEFAULT6, + g_param_spec_boolean (NM_ACTIVE_CONNECTION_DEFAULT6, + "Default6", + "Is the default IPv6 active connection", FALSE, G_PARAM_READABLE)); g_object_class_install_property diff --git a/src/vpn-manager/nm-vpn-manager.c b/src/vpn-manager/nm-vpn-manager.c index e8fa24c8db..221a8b548c 100644 --- a/src/vpn-manager/nm-vpn-manager.c +++ b/src/vpn-manager/nm-vpn-manager.c @@ -27,7 +27,6 @@ #include "nm-setting-vpn.h" #include "nm-dbus-manager.h" #include "NetworkManagerVPN.h" -#include "nm-utils.h" #include "nm-marshal.h" G_DEFINE_TYPE (NMVPNManager, nm_vpn_manager, G_TYPE_OBJECT) diff --git a/src/vpn-manager/nm-vpn-service.c b/src/vpn-manager/nm-vpn-service.c index 15aa56db5e..bdbb3774a0 100644 --- a/src/vpn-manager/nm-vpn-service.c +++ b/src/vpn-manager/nm-vpn-service.c @@ -29,7 +29,7 @@ #include "nm-vpn-service.h" #include "nm-dbus-manager.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-vpn-manager.h" #include "nm-glib-compat.h" @@ -198,18 +198,20 @@ vpn_service_watch_cb (GPid pid, gint status, gpointer user_data) if (WIFEXITED (status)) { guint err = WEXITSTATUS (status); - if (err != 0) - nm_warning ("VPN service '%s' exited with error: %d", - nm_vpn_service_get_name (service), WSTOPSIG (status)); - } else if (WIFSTOPPED (status)) - nm_warning ("VPN service '%s' stopped unexpectedly with signal %d", - nm_vpn_service_get_name (service), WSTOPSIG (status)); - else if (WIFSIGNALED (status)) - nm_warning ("VPN service '%s' died with signal %d", - nm_vpn_service_get_name (service), WTERMSIG (status)); - else - nm_warning ("VPN service '%s' died from an unknown cause", - nm_vpn_service_get_name (service)); + if (err != 0) { + nm_log_warn (LOGD_VPN, "VPN service '%s' exited with error: %d", + nm_vpn_service_get_name (service), WSTOPSIG (status)); + } + } else if (WIFSTOPPED (status)) { + nm_log_warn (LOGD_VPN, "VPN service '%s' stopped unexpectedly with signal %d", + nm_vpn_service_get_name (service), WSTOPSIG (status)); + } else if (WIFSIGNALED (status)) { + nm_log_warn (LOGD_VPN, "VPN service '%s' died with signal %d", + nm_vpn_service_get_name (service), WTERMSIG (status)); + } else { + nm_log_warn (LOGD_VPN, "VPN service '%s' died from an unknown cause", + nm_vpn_service_get_name (service)); + } priv->pid = 0; priv->service_child_watch = 0; @@ -222,8 +224,8 @@ nm_vpn_service_timeout (gpointer data) { NMVPNService *service = NM_VPN_SERVICE (data); - nm_info ("VPN service '%s' did not start in time, cancelling connections", - nm_vpn_service_get_name (service)); + nm_log_warn (LOGD_VPN, "VPN service '%s' did not start in time, cancelling connections", + nm_vpn_service_get_name (service)); NM_VPN_SERVICE_GET_PRIVATE (service)->service_start_timeout = 0; nm_vpn_service_connections_stop (service, TRUE, NM_VPN_CONNECTION_STATE_REASON_SERVICE_START_TIMEOUT); @@ -250,14 +252,14 @@ nm_vpn_service_daemon_exec (NMVPNService *service, GError **error) nm_vpn_service_child_setup, NULL, &priv->pid, &spawn_error); if (success) { - nm_info ("VPN service '%s' started (%s), PID %d", - nm_vpn_service_get_name (service), priv->dbus_service, priv->pid); + nm_log_info (LOGD_VPN, "VPN service '%s' started (%s), PID %d", + nm_vpn_service_get_name (service), priv->dbus_service, priv->pid); priv->service_child_watch = g_child_watch_add (priv->pid, vpn_service_watch_cb, service); priv->service_start_timeout = g_timeout_add_seconds (5, nm_vpn_service_timeout, service); } else { - nm_warning ("VPN service '%s': could not launch the VPN service. error: (%d) %s.", - nm_vpn_service_get_name (service), spawn_error->code, spawn_error->message); + nm_log_warn (LOGD_VPN, "VPN service '%s': could not launch the VPN service. error: (%d) %s.", + nm_vpn_service_get_name (service), spawn_error->code, spawn_error->message); g_set_error (error, NM_VPN_MANAGER_ERROR, NM_VPN_MANAGER_ERROR_SERVICE_START_FAILED, @@ -334,7 +336,8 @@ nm_vpn_service_activate (NMVPNService *service, // FIXME: fill in error when errors happen nm_vpn_connection_activate (vpn); } else if (priv->service_start_timeout == 0) { - nm_info ("Starting VPN service '%s'...", nm_vpn_service_get_name (service)); + nm_log_info (LOGD_VPN, "Starting VPN service '%s'...", + nm_vpn_service_get_name (service)); if (!nm_vpn_service_daemon_exec (service, error)) vpn = NULL; } @@ -378,16 +381,16 @@ nm_vpn_service_name_owner_changed (NMDBusManager *mgr, /* service just appeared */ GSList *iter; - nm_info ("VPN service '%s' just appeared, activating connections", - nm_vpn_service_get_name (service)); + nm_log_info (LOGD_VPN, "VPN service '%s' appeared, activating connections", + nm_vpn_service_get_name (service)); for (iter = priv->connections; iter; iter = iter->next) nm_vpn_connection_activate (NM_VPN_CONNECTION (iter->data)); } else if (old_owner_good && !new_owner_good) { /* service went away */ - nm_info ("VPN service '%s' disappeared, cancelling connections", - nm_vpn_service_get_name (service)); + nm_log_info (LOGD_VPN, "VPN service '%s' disappeared, cancelling connections", + nm_vpn_service_get_name (service)); nm_vpn_service_connections_stop (service, TRUE, NM_VPN_CONNECTION_STATE_REASON_SERVICE_STOPPED); } } @@ -415,9 +418,9 @@ ensure_killed (gpointer data) kill (pid, SIGKILL); /* ensure the child is reaped */ - nm_debug ("waiting for vpn service pid %d to exit", pid); + nm_log_dbg (LOGD_VPN, "waiting for VPN service pid %d to exit", pid); waitpid (pid, NULL, 0); - nm_debug ("vpn service pid %d cleaned up", pid); + nm_log_dbg (LOGD_VPN, "VPN service pid %d cleaned up", pid); return FALSE; } @@ -446,9 +449,9 @@ finalize (GObject *object) kill (priv->pid, SIGKILL); /* ensure the child is reaped */ - nm_debug ("waiting for vpn service pid %d to exit", priv->pid); + nm_log_dbg (LOGD_VPN, "waiting for VPN service pid %d to exit", priv->pid); waitpid (priv->pid, NULL, 0); - nm_debug ("vpn service pid %d cleaned up", priv->pid); + nm_log_dbg (LOGD_VPN, "VPN service pid %d cleaned up", priv->pid); } priv->pid = 0; diff --git a/src/wimax/nm-wimax-device.c b/src/wimax/nm-wimax-device.c index 66a7b65c88..6a5aed934a 100644 --- a/src/wimax/nm-wimax-device.c +++ b/src/wimax/nm-wimax-device.c @@ -46,7 +46,6 @@ G_DEFINE_TYPE_EXTENDED (NMWimaxDevice, nm_wimax_device, NM_TYPE_DEVICE, 0, enum { PROP_0, PROP_INDEX, - PROP_IFINDEX, PROP_HW_ADDRESS, PROP_ACTIVE_NSP, @@ -71,7 +70,6 @@ typedef struct { gboolean enabled; struct ether_addr hw_addr; - guint32 ifindex; guint activation_timeout_id; GSList *nsp_list; @@ -130,7 +128,6 @@ NMDevice * nm_wimax_device_new (const char *udi, const char *iface, const char *driver, - int ifindex, guchar wimax_device_index) { g_return_val_if_fail (udi != NULL, NULL); @@ -145,7 +142,6 @@ nm_wimax_device_new (const char *udi, NM_DEVICE_INTERFACE_TYPE_DESC, "WiMAX", NM_DEVICE_INTERFACE_DEVICE_TYPE, NM_DEVICE_TYPE_WIMAX, NM_WIMAX_DEVICE_INDEX, wimax_device_index, - NM_WIMAX_DEVICE_IFINDEX, ifindex, NULL)); } @@ -158,14 +154,6 @@ nm_wimax_device_get_hw_address (NMWimaxDevice *self, struct ether_addr *addr) memcpy (addr, &(GET_PRIVATE (self)->hw_addr), sizeof (struct ether_addr)); } -guint32 -nm_wimax_device_get_ifindex (NMWimaxDevice *self) -{ - g_return_val_if_fail (NM_IS_WIMAX_DEVICE (self), 0); - - return GET_PRIVATE (self)->ifindex; -} - static gboolean rf_state_update (NMWimaxDevice *self) { @@ -919,9 +907,6 @@ set_property (GObject *object, guint prop_id, case PROP_INDEX: priv->device_id.deviceIndex = g_value_get_uchar (value); break; - case PROP_IFINDEX: - priv->ifindex = g_value_get_uint (value); - break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -1008,14 +993,6 @@ nm_wimax_device_class_init (NMWimaxDeviceClass *klass) 0, 1, 0, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | NM_PROPERTY_PARAM_NO_EXPORT)); - g_object_class_install_property - (object_class, PROP_IFINDEX, - g_param_spec_uint (NM_WIMAX_DEVICE_IFINDEX, - "Ifindex", - "Interface index", - 0, G_MAXUINT32, 0, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | NM_PROPERTY_PARAM_NO_EXPORT)); - g_object_class_install_property (object_class, PROP_HW_ADDRESS, g_param_spec_string (NM_WIMAX_DEVICE_HW_ADDRESS, diff --git a/src/wimax/nm-wimax-device.h b/src/wimax/nm-wimax-device.h index 301ebdd8db..f461dad73c 100644 --- a/src/wimax/nm-wimax-device.h +++ b/src/wimax/nm-wimax-device.h @@ -36,7 +36,6 @@ G_BEGIN_DECLS #define NM_WIMAX_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_WIMAX_DEVICE, NMWimaxDeviceClass)) #define NM_WIMAX_DEVICE_INDEX "index" -#define NM_WIMAX_DEVICE_IFINDEX "ifindex" #define NM_WIMAX_DEVICE_HW_ADDRESS "hw-address" #define NM_WIMAX_DEVICE_ACTIVE_NSP "active-nsp" @@ -58,13 +57,11 @@ GType nm_wimax_device_get_type (void); NMDevice *nm_wimax_device_new (const char *udi, const char *iface, const char *driver, - int ifindex, guchar wimax_device_index); void nm_wimax_device_get_hw_address (NMWimaxDevice *self, struct ether_addr *addr); -guint32 nm_wimax_device_get_ifindex (NMWimaxDevice *self); GSList *nm_wimax_device_get_nsps (NMWimaxDevice *self); NMWimaxNsp *nm_wimax_device_get_active_nsp (NMWimaxDevice *self); diff --git a/src/wimax/nm-wimax-manager.c b/src/wimax/nm-wimax-manager.c index 1cba7c57d5..e223ee3d70 100644 --- a/src/wimax/nm-wimax-manager.c +++ b/src/wimax/nm-wimax-manager.c @@ -100,8 +100,7 @@ wimax_device_matches (struct WIMAX_API_HW_DEVICE_ID *hw_id, NMDevice * nm_wimax_manager_create_device (const char *path, const char *ifname, - const char *driver, - int ifindex) + const char *driver) { NMWimaxManager *manager; struct WIMAX_API_HW_DEVICE_ID device_id_list[5]; @@ -123,7 +122,7 @@ nm_wimax_manager_create_device (const char *path, for (i = 0; i < device_id_list_size; i++) { if (wimax_device_matches (&device_id_list[i], ifname, ifindex)) { - device = nm_wimax_device_new (path, ifname, driver, ifindex, device_id_list[0].deviceIndex); + device = nm_wimax_device_new (path, ifname, driver, device_id_list[0].deviceIndex); break; } } diff --git a/src/wimax/nm-wimax-manager.h b/src/wimax/nm-wimax-manager.h index e0427dd152..c3b2881ce5 100644 --- a/src/wimax/nm-wimax-manager.h +++ b/src/wimax/nm-wimax-manager.h @@ -25,7 +25,6 @@ NMDevice *nm_wimax_manager_create_device (const char *path, const char *ifname, - const char *driver, - int ifindex); + const char *driver); #endif /* NM_WIMAX_MANAGER_H */ diff --git a/src/wpa.c b/src/wpa.c index 8f500476cd..5f4fd024f4 100644 --- a/src/wpa.c +++ b/src/wpa.c @@ -1,3 +1,4 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* * WPA Supplicant - WPA state machine and EAPOL-Key processing * Copyright (c) 2003-2005, Jouni Malinen @@ -19,7 +20,7 @@ #include #include "wpa.h" -#include "nm-utils.h" +#include "nm-logging.h" typedef guint16 u16; typedef guint8 u8; @@ -207,8 +208,8 @@ static int wpa_parse_wpa_ie_wpa(const u8 *wpa_ie, size_t wpa_ie_len, } if (wpa_ie_len < sizeof(struct wpa_ie_hdr)) { - nm_debug ("%s: ie len too short %lu", - __func__, (unsigned long) wpa_ie_len); + nm_log_dbg (LOGD_WIFI, "IE len too short %lu", + (unsigned long) wpa_ie_len); return -1; } @@ -218,8 +219,7 @@ static int wpa_parse_wpa_ie_wpa(const u8 *wpa_ie, size_t wpa_ie_len, hdr->len != wpa_ie_len - 2 || memcmp(hdr->oui, WPA_OUI_TYPE, WPA_SELECTOR_LEN) != 0 || WPA_GET_LE16(hdr->version) != WPA_VERSION) { - nm_debug ("%s: malformed ie or unknown version", - __func__); + nm_log_dbg (LOGD_WIFI, "malformed IE or unknown version"); return -1; } @@ -231,8 +231,7 @@ static int wpa_parse_wpa_ie_wpa(const u8 *wpa_ie, size_t wpa_ie_len, pos += WPA_SELECTOR_LEN; left -= WPA_SELECTOR_LEN; } else if (left > 0) { - nm_debug ("%s: ie length mismatch, %u too much", - __func__, left); + nm_log_dbg (LOGD_WIFI, "IE length mismatch, %u too much", left); return -1; } @@ -242,8 +241,8 @@ static int wpa_parse_wpa_ie_wpa(const u8 *wpa_ie, size_t wpa_ie_len, pos += 2; left -= 2; if (count == 0 || left < count * WPA_SELECTOR_LEN) { - nm_debug ("%s: ie count botch (pairwise), " - "count %u left %u", __func__, count, left); + nm_log_dbg (LOGD_WIFI, "IE count botch (pairwise), " + "count %u left %u", count, left); return -1; } for (i = 0; i < count; i++) { @@ -252,8 +251,7 @@ static int wpa_parse_wpa_ie_wpa(const u8 *wpa_ie, size_t wpa_ie_len, left -= WPA_SELECTOR_LEN; } } else if (left == 1) { - nm_debug ("%s: ie too short (for key mgmt)", - __func__); + nm_log_dbg (LOGD_WIFI, "IE too short (for key mgmt)"); return -1; } @@ -263,8 +261,8 @@ static int wpa_parse_wpa_ie_wpa(const u8 *wpa_ie, size_t wpa_ie_len, pos += 2; left -= 2; if (count == 0 || left < count * WPA_SELECTOR_LEN) { - nm_debug ("%s: ie count botch (key mgmt), " - "count %u left %u", __func__, count, left); + nm_log_dbg (LOGD_WIFI, "IE count botch (key mgmt), " + "count %u left %u", count, left); return -1; } for (i = 0; i < count; i++) { @@ -273,8 +271,7 @@ static int wpa_parse_wpa_ie_wpa(const u8 *wpa_ie, size_t wpa_ie_len, left -= WPA_SELECTOR_LEN; } } else if (left == 1) { - nm_debug ("%s: ie too short (for capabilities)", - __func__); + nm_log_dbg (LOGD_WIFI, "IE too short (for capabilities)"); return -1; } @@ -286,8 +283,7 @@ static int wpa_parse_wpa_ie_wpa(const u8 *wpa_ie, size_t wpa_ie_len, } if (left > 0) { - nm_debug ("%s: ie has %u trailing bytes", - __func__, left); + nm_log_dbg (LOGD_WIFI, "IE has %u trailing bytes", left); return -1; } @@ -317,8 +313,8 @@ static int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len, } if (rsn_ie_len < sizeof(struct rsn_ie_hdr)) { - nm_debug ("%s: ie len too short %lu", - __func__, (unsigned long) rsn_ie_len); + nm_log_dbg (LOGD_WIFI, "IE len too short %lu", + (unsigned long) rsn_ie_len); return -1; } @@ -327,8 +323,7 @@ static int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len, if (hdr->elem_id != WPA_RSN_INFO_ELEM || hdr->len != rsn_ie_len - 2 || WPA_GET_LE16(hdr->version) != RSN_VERSION) { - nm_debug ("%s: malformed ie or unknown version", - __func__); + nm_log_dbg (LOGD_WIFI, "malformed IE or unknown version"); return -1; } @@ -340,8 +335,7 @@ static int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len, pos += RSN_SELECTOR_LEN; left -= RSN_SELECTOR_LEN; } else if (left > 0) { - nm_debug ("%s: ie length mismatch, %u too much", - __func__, left); + nm_log_dbg (LOGD_WIFI, "IE length mismatch, %u too much", left); return -1; } @@ -351,8 +345,8 @@ static int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len, pos += 2; left -= 2; if (count == 0 || left < count * RSN_SELECTOR_LEN) { - nm_debug ("%s: ie count botch (pairwise), " - "count %u left %u", __func__, count, left); + nm_log_dbg (LOGD_WIFI, "IE count botch (pairwise), " + "count %u left %u", count, left); return -1; } for (i = 0; i < count; i++) { @@ -361,8 +355,7 @@ static int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len, left -= RSN_SELECTOR_LEN; } } else if (left == 1) { - nm_debug ("%s: ie too short (for key mgmt)", - __func__); + nm_log_dbg (LOGD_WIFI, "IE too short (for key mgmt)"); return -1; } @@ -372,8 +365,8 @@ static int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len, pos += 2; left -= 2; if (count == 0 || left < count * RSN_SELECTOR_LEN) { - nm_debug ("%s: ie count botch (key mgmt), " - "count %u left %u", __func__, count, left); + nm_log_dbg (LOGD_WIFI, "IE count botch (key mgmt), " + "count %u left %u", count, left); return -1; } for (i = 0; i < count; i++) { @@ -382,8 +375,7 @@ static int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len, left -= RSN_SELECTOR_LEN; } } else if (left == 1) { - nm_debug ("%s: ie too short (for capabilities)", - __func__); + nm_log_dbg (LOGD_WIFI, "IE too short (for capabilities)"); return -1; } @@ -399,9 +391,9 @@ static int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len, pos += 2; left -= 2; if (left < data->num_pmkid * PMKID_LEN) { - nm_debug ("%s: PMKID underflow " - "(num_pmkid=%d left=%d)", - __func__, data->num_pmkid, left); + nm_log_dbg (LOGD_WIFI, "PMKID underflow " + "(num_pmkid=%d left=%d)", + data->num_pmkid, left); data->num_pmkid = 0; } else { data->pmkid = pos; @@ -411,8 +403,7 @@ static int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len, } if (left > 0) { - nm_debug ("%s: ie has %u trailing bytes - ignored", - __func__, left); + nm_log_dbg (LOGD_WIFI, "IE has %u trailing bytes - ignored", left); } return 0; @@ -430,8 +421,8 @@ static int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len, */ wpa_ie_data * wpa_parse_wpa_ie(const u8 *wpa_ie, size_t wpa_ie_len) { - wpa_ie_data * data = NULL; - int err = -1; + wpa_ie_data *data = NULL; + int err = -1; if (!wpa_ie || wpa_ie_len <= 0) return NULL; @@ -443,25 +434,21 @@ wpa_ie_data * wpa_parse_wpa_ie(const u8 *wpa_ie, size_t wpa_ie_len) else err = wpa_parse_wpa_ie_wpa(wpa_ie, wpa_ie_len, data); - if (err != 0) - { + if (err != 0) { g_slice_free (wpa_ie_data, data); data = NULL; } -#if 0 - if (data) - { - nm_debug ("WPA IE: -------------------"); - nm_debug (" proto 0x%X", data->proto); - nm_debug (" pw cipher 0x%X", data->pairwise_cipher); - nm_debug (" gr cipher 0x%X", data->group_cipher); - nm_debug (" key mgmt 0x%X", data->key_mgmt); - nm_debug (" capabilities 0x%X", data->capabilities); - nm_debug (" # pmkid 0x%X", data->num_pmkid); - nm_debug (""); + if (data) { + nm_log_dbg (LOGD_WIFI, "WPA IE: -------------------"); + nm_log_dbg (LOGD_WIFI, " proto 0x%X", data->proto); + nm_log_dbg (LOGD_WIFI, " pw cipher 0x%X", data->pairwise_cipher); + nm_log_dbg (LOGD_WIFI, " gr cipher 0x%X", data->group_cipher); + nm_log_dbg (LOGD_WIFI, " key mgmt 0x%X", data->key_mgmt); + nm_log_dbg (LOGD_WIFI, " capabilities 0x%X", data->capabilities); + nm_log_dbg (LOGD_WIFI, " # pmkid 0x%X", data->num_pmkid); + nm_log_dbg (LOGD_WIFI, ""); } -#endif return data; } diff --git a/system-settings/plugins/ifcfg-rh/Makefile.am b/system-settings/plugins/ifcfg-rh/Makefile.am index 9998236fb7..3f0bf222fd 100644 --- a/system-settings/plugins/ifcfg-rh/Makefile.am +++ b/system-settings/plugins/ifcfg-rh/Makefile.am @@ -1,5 +1,11 @@ SUBDIRS=. tests +nm-ifcfg-rh-glue.h: nm-ifcfg-rh.xml + dbus-binding-tool --prefix=nm_ifcfg_rh --mode=glib-server --output=$@ $< + +BUILT_SOURCES = \ + nm-ifcfg-rh-glue.h + pkglib_LTLIBRARIES = libnm-settings-plugin-ifcfg-rh.la noinst_LTLIBRARIES = libifcfg-rh-io.la @@ -59,3 +65,12 @@ libnm_settings_plugin_ifcfg_rh_la_LIBADD = \ $(GMODULE_LIBS) \ $(GIO_LIBS) +dbusservicedir = $(DBUS_SYS_DIR) +dbusservice_DATA = nm-ifcfg-rh.conf + +EXTRA_DIST = \ + $(dbusservice_DATA) \ + nm-ifcfg-rh.xml + +CLEANFILES = $(BUILT_SOURCES) + diff --git a/system-settings/plugins/ifcfg-rh/common.h b/system-settings/plugins/ifcfg-rh/common.h index d16e881954..f5ab1c896d 100644 --- a/system-settings/plugins/ifcfg-rh/common.h +++ b/system-settings/plugins/ifcfg-rh/common.h @@ -26,6 +26,8 @@ #define IFCFG_TAG "ifcfg-" #define KEYS_TAG "keys-" #define ROUTE_TAG "route-" +#define ROUTE6_TAG "route6-" + #define BAK_TAG ".bak" #define TILDE_TAG "~" #define ORIG_TAG ".orig" diff --git a/system-settings/plugins/ifcfg-rh/nm-ifcfg-connection.c b/system-settings/plugins/ifcfg-rh/nm-ifcfg-connection.c index 0abf6d4565..b54bc8af21 100644 --- a/system-settings/plugins/ifcfg-rh/nm-ifcfg-connection.c +++ b/system-settings/plugins/ifcfg-rh/nm-ifcfg-connection.c @@ -63,6 +63,9 @@ typedef struct { char *routefile; int routefile_wd; + char *route6file; + int route6file_wd; + char *udi; char *unmanaged; } NMIfcfgConnectionPrivate; @@ -93,7 +96,7 @@ files_changed_cb (NMInotifyHelper *ih, NMIfcfgConnection *self = NM_IFCFG_CONNECTION (user_data); NMIfcfgConnectionPrivate *priv = NM_IFCFG_CONNECTION_GET_PRIVATE (self); - if ((evt->wd != priv->file_wd) && (evt->wd != priv->keyfile_wd) && (evt->wd != priv->routefile_wd)) + if ((evt->wd != priv->file_wd) && (evt->wd != priv->keyfile_wd) && (evt->wd != priv->routefile_wd) && (evt->wd != priv->route6file_wd)) return; /* push the event up to the plugin */ @@ -111,11 +114,12 @@ nm_ifcfg_connection_new (const char *filename, char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; NMInotifyHelper *ih; g_return_val_if_fail (filename != NULL, NULL); - tmp = connection_from_file (filename, NULL, NULL, NULL, &unmanaged, &keyfile, &routefile, error, ignore_error); + tmp = connection_from_file (filename, NULL, NULL, NULL, &unmanaged, &keyfile, &routefile, &route6file, error, ignore_error); if (!tmp) return NULL; @@ -145,6 +149,9 @@ nm_ifcfg_connection_new (const char *filename, priv->routefile = routefile; priv->routefile_wd = nm_inotify_helper_add_watch (ih, routefile); + priv->route6file = route6file; + priv->route6file_wd = nm_inotify_helper_add_watch (ih, route6file); + return NM_IFCFG_CONNECTION (object); } @@ -176,7 +183,6 @@ update (NMSettingsConnectionInterface *connection, IFCFG_DIR, priv->filename, priv->keyfile, - priv->routefile, &error)) { callback (connection, error, user_data); g_error_free (error); @@ -199,6 +205,9 @@ do_delete (NMSettingsConnectionInterface *connection, if (priv->routefile) g_unlink (priv->routefile); + if (priv->route6file) + g_unlink (priv->route6file); + return parent_settings_connection_iface->delete (connection, callback, user_data); } @@ -243,6 +252,10 @@ finalize (GObject *object) if (priv->routefile_wd >= 0) nm_inotify_helper_remove_watch (ih, priv->routefile_wd); + g_free (priv->route6file); + if (priv->route6file_wd >= 0) + nm_inotify_helper_remove_watch (ih, priv->route6file_wd); + G_OBJECT_CLASS (nm_ifcfg_connection_parent_class)->finalize (object); } diff --git a/system-settings/plugins/ifcfg-rh/nm-ifcfg-rh.conf b/system-settings/plugins/ifcfg-rh/nm-ifcfg-rh.conf new file mode 100644 index 0000000000..cade31dd26 --- /dev/null +++ b/system-settings/plugins/ifcfg-rh/nm-ifcfg-rh.conf @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + diff --git a/system-settings/plugins/ifcfg-rh/nm-ifcfg-rh.xml b/system-settings/plugins/ifcfg-rh/nm-ifcfg-rh.xml new file mode 100644 index 0000000000..5279345297 --- /dev/null +++ b/system-settings/plugins/ifcfg-rh/nm-ifcfg-rh.xml @@ -0,0 +1,31 @@ + + + + + + Utility methods for handling NM integration with standard Red Hat ifcfg files. + + + + + Given an ifcfg file, return various internal information about it. + + + + + The full path to an ifcfg file. + + + + + The UUID of the NM connection backed by this ifcfg file. If the ifcfg file does not contain a UUID tag, this UUID is generated by NM, otherwise the UUID from the ifcfg file is used. + + + + + The object path of the NM connected backed by this ifcfg file. + + + + + diff --git a/system-settings/plugins/ifcfg-rh/plugin.c b/system-settings/plugins/ifcfg-rh/plugin.c index 9961c34355..47ce0075f8 100644 --- a/system-settings/plugins/ifcfg-rh/plugin.c +++ b/system-settings/plugins/ifcfg-rh/plugin.c @@ -33,9 +33,12 @@ #include #include +#include #include +#include #include +#include #include "common.h" #include "nm-dbus-glib-types.h" @@ -45,6 +48,18 @@ #include "nm-inotify-helper.h" #include "shvar.h" #include "writer.h" +#include "utils.h" + +#define DBUS_SERVICE_NAME "com.redhat.ifcfgrh1" +#define DBUS_OBJECT_PATH "/com/redhat/ifcfgrh1" + +static gboolean impl_ifcfgrh_get_ifcfg_details (SCPluginIfcfg *plugin, + const char *in_ifcfg, + const char **out_uuid, + const char **out_path, + GError **error); + +#include "nm-ifcfg-rh-glue.h" static void system_config_interface_init (NMSystemConfigInterface *system_config_interface_class); @@ -76,6 +91,8 @@ typedef struct { GFileMonitor *monitor; guint monitor_id; + + DBusGConnection *bus; } SCPluginIfcfgPrivate; @@ -153,44 +170,6 @@ read_one_connection (SCPluginIfcfg *plugin, const char *filename) return connection; } -static gboolean -check_suffix (const char *base, const char *tag) -{ - int len, tag_len; - - g_return_val_if_fail (base != NULL, TRUE); - g_return_val_if_fail (tag != NULL, TRUE); - - len = strlen (base); - tag_len = strlen (tag); - if ((len > tag_len) && !strcasecmp (base + len - tag_len, tag)) - return TRUE; - return FALSE; -} - -static gboolean -should_ignore_file (const char *filename) -{ - char *base; - gboolean ignore = TRUE; - - g_return_val_if_fail (filename != NULL, TRUE); - - base = g_path_get_basename (filename); - g_return_val_if_fail (base != NULL, TRUE); - - if ( !strncmp (base, IFCFG_TAG, strlen (IFCFG_TAG)) - && !check_suffix (base, BAK_TAG) - && !check_suffix (base, TILDE_TAG) - && !check_suffix (base, ORIG_TAG) - && !check_suffix (base, REJ_TAG) - && !check_suffix (base, RPMNEW_TAG)) - ignore = FALSE; - - g_free (base); - return ignore; -} - static void read_connections (SCPluginIfcfg *plugin) { @@ -204,7 +183,7 @@ read_connections (SCPluginIfcfg *plugin) while ((item = g_dir_read_name (dir))) { char *full_path; - if (should_ignore_file (item)) + if (utils_should_ignore_file (item, TRUE)) continue; full_path = g_build_filename (IFCFG_DIR, item, NULL); @@ -331,7 +310,6 @@ handle_connection_remove_or_new (SCPluginIfcfg *plugin, } } } - static void dir_changed (GFileMonitor *monitor, GFile *file, @@ -341,16 +319,20 @@ dir_changed (GFileMonitor *monitor, { SCPluginIfcfg *plugin = SC_PLUGIN_IFCFG (user_data); SCPluginIfcfgPrivate *priv = SC_PLUGIN_IFCFG_GET_PRIVATE (plugin); - char *name; + char *path, *name; NMIfcfgConnection *connection; gboolean do_remove = FALSE, do_new = FALSE; - name = g_file_get_path (file); - if (should_ignore_file (name)) { - g_free (name); + path = g_file_get_path (file); + if (utils_should_ignore_file (path, FALSE)) { + g_free (path); return; } + /* Given any ifcfg, keys, or routes file, get the ifcfg file path */ + name = utils_get_ifcfg_path (path); + g_free (path); + connection = g_hash_table_lookup (priv->connections, name); if (!connection) { do_new = TRUE; @@ -540,6 +522,69 @@ sc_network_changed_cb (NMInotifyHelper *ih, g_free (new_hostname); } +static gboolean +impl_ifcfgrh_get_ifcfg_details (SCPluginIfcfg *plugin, + const char *in_ifcfg, + const char **out_uuid, + const char **out_path, + GError **error) +{ + SCPluginIfcfgPrivate *priv = SC_PLUGIN_IFCFG_GET_PRIVATE (plugin); + NMIfcfgConnection *connection; + NMSettingConnection *s_con; + const char *uuid; + const char *path; + + if (!g_path_is_absolute (in_ifcfg)) { + g_set_error (error, + NM_SETTINGS_INTERFACE_ERROR, + NM_SETTINGS_INTERFACE_ERROR_INVALID_CONNECTION, + "ifcfg path '%s' is not absolute", in_ifcfg); + return FALSE; + } + + connection = g_hash_table_lookup (priv->connections, in_ifcfg); + if (!connection) { + g_set_error (error, + NM_SETTINGS_INTERFACE_ERROR, + NM_SETTINGS_INTERFACE_ERROR_INVALID_CONNECTION, + "ifcfg file '%s' unknown", in_ifcfg); + return FALSE; + } + + s_con = (NMSettingConnection *) nm_connection_get_setting (NM_CONNECTION (connection), NM_TYPE_SETTING_CONNECTION); + if (!s_con) { + g_set_error (error, + NM_SETTINGS_INTERFACE_ERROR, + NM_SETTINGS_INTERFACE_ERROR_INTERNAL_ERROR, + "unable to retrieve the connection setting"); + return FALSE; + } + + uuid = nm_setting_connection_get_uuid (s_con); + if (!uuid) { + g_set_error (error, + NM_SETTINGS_INTERFACE_ERROR, + NM_SETTINGS_INTERFACE_ERROR_INTERNAL_ERROR, + "unable to get the UUID"); + return FALSE; + } + + path = nm_connection_get_path (NM_CONNECTION (connection)); + if (!path) { + g_set_error (error, + NM_SETTINGS_INTERFACE_ERROR, + NM_SETTINGS_INTERFACE_ERROR_INTERNAL_ERROR, + "unable to get the connection D-Bus path"); + return FALSE; + } + + *out_uuid = g_strdup (uuid); + *out_path = g_strdup (path); + + return TRUE; +} + static void init (NMSystemConfigInterface *config) { @@ -550,12 +595,52 @@ sc_plugin_ifcfg_init (SCPluginIfcfg *plugin) { SCPluginIfcfgPrivate *priv = SC_PLUGIN_IFCFG_GET_PRIVATE (plugin); NMInotifyHelper *ih; + GError *error = NULL; + gboolean success = FALSE; ih = nm_inotify_helper_get (); priv->ih_event_id = g_signal_connect (ih, "event", G_CALLBACK (sc_network_changed_cb), plugin); priv->sc_network_wd = nm_inotify_helper_add_watch (ih, SC_NETWORK_FILE); priv->hostname = plugin_get_hostname (plugin); + + priv->bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error); + if (!priv->bus) { + PLUGIN_WARN (IFCFG_PLUGIN_NAME, "Couldn't connect to D-Bus: %s", + error->message); + g_clear_error (&error); + } else { + DBusConnection *tmp; + DBusGProxy *proxy; + int result; + + tmp = dbus_g_connection_get_connection (priv->bus); + dbus_connection_set_exit_on_disconnect (tmp, FALSE); + + proxy = dbus_g_proxy_new_for_name (priv->bus, + "org.freedesktop.DBus", + "/org/freedesktop/DBus", + "org.freedesktop.DBus"); + + if (!dbus_g_proxy_call (proxy, "RequestName", &error, + G_TYPE_STRING, DBUS_SERVICE_NAME, + G_TYPE_UINT, DBUS_NAME_FLAG_DO_NOT_QUEUE, + G_TYPE_INVALID, + G_TYPE_UINT, &result, + G_TYPE_INVALID)) { + PLUGIN_WARN (IFCFG_PLUGIN_NAME, "Couldn't acquire D-Bus service: %s", + error->message); + g_clear_error (&error); + } else if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { + PLUGIN_WARN (IFCFG_PLUGIN_NAME, "Couldn't acquire ifcfgrh1 D-Bus service (already taken)"); + } else + success = TRUE; + } + + if (!success) { + dbus_g_connection_unref (priv->bus); + priv->bus = NULL; + } } static void @@ -565,6 +650,11 @@ dispose (GObject *object) SCPluginIfcfgPrivate *priv = SC_PLUGIN_IFCFG_GET_PRIVATE (plugin); NMInotifyHelper *ih; + if (priv->bus) { + dbus_g_connection_unref (priv->bus); + priv->bus = NULL; + } + ih = nm_inotify_helper_get (); g_signal_handler_disconnect (ih, priv->ih_event_id); @@ -665,6 +755,9 @@ sc_plugin_ifcfg_class_init (SCPluginIfcfgClass *req_class) g_object_class_override_property (object_class, NM_SYSTEM_CONFIG_INTERFACE_PROP_HOSTNAME, NM_SYSTEM_CONFIG_INTERFACE_HOSTNAME); + + dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (req_class), + &dbus_glib_nm_ifcfg_rh_object_info); } static void @@ -681,10 +774,19 @@ G_MODULE_EXPORT GObject * nm_system_config_factory (void) { static SCPluginIfcfg *singleton = NULL; + SCPluginIfcfgPrivate *priv; - if (!singleton) + if (!singleton) { singleton = SC_PLUGIN_IFCFG (g_object_new (SC_TYPE_PLUGIN_IFCFG, NULL)); - else + if (singleton) { + priv = SC_PLUGIN_IFCFG_GET_PRIVATE (singleton); + if (priv->bus) + dbus_g_connection_register_g_object (priv->bus, + DBUS_OBJECT_PATH, + G_OBJECT (singleton)); + PLUGIN_PRINT (IFCFG_PLUGIN_NAME, "Acquired D-Bus service %s", DBUS_SERVICE_NAME); + } + } else g_object_ref (singleton); return G_OBJECT (singleton); diff --git a/system-settings/plugins/ifcfg-rh/reader.c b/system-settings/plugins/ifcfg-rh/reader.c index 99ae55e28e..28244206a9 100644 --- a/system-settings/plugins/ifcfg-rh/reader.c +++ b/system-settings/plugins/ifcfg-rh/reader.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2008 - 2009 Red Hat, Inc. + * Copyright (C) 2008 - 2010 Red Hat, Inc. */ #include @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -111,11 +112,11 @@ make_connection_setting (const char *file, const char *suggested) { NMSettingConnection *s_con; - char *ifcfg_name = NULL; + const char *ifcfg_name = NULL; char *new_id = NULL, *uuid = NULL, *value; char *ifcfg_id; - ifcfg_name = utils_get_ifcfg_name (file); + ifcfg_name = utils_get_ifcfg_name (file, TRUE); if (!ifcfg_name) return NULL; @@ -180,7 +181,6 @@ make_connection_setting (const char *file, g_free (value); } - g_free (ifcfg_name); return NM_SETTING (s_con); } @@ -495,6 +495,31 @@ read_ip4_address (shvarFile *ifcfg, return success; } +static gboolean +parse_ip6_address (const char *value, + struct in6_addr *out_addr, + GError **error) +{ + struct in6_addr ip6_addr; + gboolean success = FALSE; + + g_return_val_if_fail (value != NULL, FALSE); + g_return_val_if_fail (out_addr != NULL, FALSE); + g_return_val_if_fail (error != NULL, FALSE); + g_return_val_if_fail (*error == NULL, FALSE); + + *out_addr = in6addr_any; + + if (inet_pton (AF_INET6, value, &ip6_addr) > 0) { + *out_addr = ip6_addr; + success = TRUE; + } else { + g_set_error (error, ifcfg_plugin_error_quark (), 0, + "Invalid IP6 address '%s'", value); + } + return success; +} + static NMIP4Address * read_full_ip4_address (shvarFile *ifcfg, const char *network_file, @@ -579,9 +604,21 @@ read_full_ip4_address (shvarFile *ifcfg, nm_ip4_address_set_prefix (addr, nm_utils_ip4_netmask_to_prefix (tmp)); } + /* Try to autodetermine the prefix for the address' class */ + if (!nm_ip4_address_get_prefix (addr)) { + guint32 prefix = 0; + + prefix = nm_utils_ip4_get_default_prefix (nm_ip4_address_get_address (addr)); + nm_ip4_address_set_prefix (addr, prefix); + + value = svGetValue (ifcfg, ip_tag, FALSE); + PLUGIN_WARN (IFCFG_PLUGIN_NAME, " warning: missing %s, assuming %s/%u", + prefix_tag, value, prefix); + g_free (value); + } + /* Validate the prefix */ - if ( !nm_ip4_address_get_prefix (addr) - || nm_ip4_address_get_prefix (addr) > 32) { + if (nm_ip4_address_get_prefix (addr) > 32) { g_set_error (error, ifcfg_plugin_error_quark (), 0, "Missing or invalid IP4 prefix '%d'", nm_ip4_address_get_prefix (addr)); @@ -852,11 +889,233 @@ error: return success; } +static NMIP6Address * +parse_full_ip6_address (const char *addr_str, GError **error) +{ + NMIP6Address *addr; + char **list; + char *ip_tag, *prefix_tag; + struct in6_addr tmp = IN6ADDR_ANY_INIT; + gboolean success = FALSE; + + g_return_val_if_fail (addr_str != NULL, NULL); + g_return_val_if_fail (error != NULL, NULL); + g_return_val_if_fail (*error == NULL, NULL); + + /* Split the adddress and prefix */ + list = g_strsplit_set (addr_str, "/", 2); + if (g_strv_length (list) < 1) { + g_set_error (error, ifcfg_plugin_error_quark (), 0, + "Invalid IP6 address '%s'", addr_str); + goto error; + } + + ip_tag = list[0]; + prefix_tag = list[1]; + + addr = nm_ip6_address_new (); + /* IP address */ + if (ip_tag) { + if (!parse_ip6_address (ip_tag, &tmp, error)) + goto error; + } + + nm_ip6_address_set_address (addr, &tmp); + + /* Prefix */ + if (prefix_tag) { + long int prefix; + + errno = 0; + prefix = strtol (prefix_tag, NULL, 10); + if (errno || prefix <= 0 || prefix > 128) { + g_set_error (error, ifcfg_plugin_error_quark (), 0, + "Invalid IP6 prefix '%s'", prefix_tag); + goto error; + } + nm_ip6_address_set_prefix (addr, (guint32) prefix); + } else { + /* Missing prefix is treated as prefix of 64 */ + nm_ip6_address_set_prefix (addr, 64); + } + + success = TRUE; + +error: + if (!success) { + nm_ip6_address_unref (addr); + addr = NULL; + } + + g_strfreev (list); + return addr; +} + +/* IPv6 address is very complex to describe completely by a regular expression, + * so don't try to, rather use looser syntax to comprise all possibilities + * NOTE: The regexes below don't describe all variants allowed by 'ip route add', + * namely destination IP without 'to' keyword is recognized just at line start. + */ +#define IPV6_ADDR_REGEX "[0-9A-Fa-f:.]+" + +static gboolean +read_route6_file (const char *filename, NMSettingIP6Config *s_ip6, GError **error) +{ + char *contents = NULL; + gsize len = 0; + char **lines = NULL, **iter; + GRegex *regex_to1, *regex_to2, *regex_via, *regex_metric; + GMatchInfo *match_info; + NMIP6Route *route; + struct in6_addr ip6_addr; + char *dest = NULL, *prefix = NULL, *next_hop = NULL, *metric = NULL; + long int prefix_int, metric_int; + gboolean success = FALSE; + + const char *pattern_empty = "^\\s*(\\#.*)?$"; + const char *pattern_to1 = "^\\s*(" IPV6_ADDR_REGEX "|default)" /* IPv6 or 'default' keyword */ + "(?:/(\\d{1,2}))?"; /* optional prefix */ + const char *pattern_to2 = "to\\s+(" IPV6_ADDR_REGEX "|default)" /* IPv6 or 'default' keyword */ + "(?:/(\\d{1,2}))?"; /* optional prefix */ + const char *pattern_via = "via\\s+(" IPV6_ADDR_REGEX ")"; /* IPv6 of gateway */ + const char *pattern_metric = "metric\\s+(\\d+)"; /* metric */ + + g_return_val_if_fail (filename != NULL, FALSE); + g_return_val_if_fail (s_ip6 != NULL, FALSE); + g_return_val_if_fail (error != NULL, FALSE); + g_return_val_if_fail (*error == NULL, FALSE); + + /* Read the route file */ + if (!g_file_get_contents (filename, &contents, &len, NULL)) + return FALSE; + + if (len == 0) { + g_free (contents); + return FALSE; + } + + /* Create regexes for pieces to be matched */ + regex_to1 = g_regex_new (pattern_to1, 0, 0, NULL); + regex_to2 = g_regex_new (pattern_to2, 0, 0, NULL); + regex_via = g_regex_new (pattern_via, 0, 0, NULL); + regex_metric = g_regex_new (pattern_metric, 0, 0, NULL); + + /* New NMIP6Route structure */ + route = nm_ip6_route_new (); + + /* Iterate through file lines */ + lines = g_strsplit_set (contents, "\n\r", -1); + for (iter = lines; iter && *iter; iter++) { + + /* Skip empty lines */ + if (g_regex_match_simple (pattern_empty, *iter, 0, 0)) + continue; + + /* Destination */ + g_regex_match (regex_to1, *iter, 0, &match_info); + if (!g_match_info_matches (match_info)) { + g_match_info_free (match_info); + g_regex_match (regex_to2, *iter, 0, &match_info); + if (!g_match_info_matches (match_info)) { + g_match_info_free (match_info); + g_set_error (error, ifcfg_plugin_error_quark (), 0, + "Missing IP6 route destination address in record: '%s'", *iter); + goto error; + } + } + dest = g_match_info_fetch (match_info, 1); + g_match_info_free (match_info); + if (!strcmp (dest, "default")) + strcpy (dest, "::"); + if (inet_pton (AF_INET6, dest, &ip6_addr) != 1) { + g_set_error (error, ifcfg_plugin_error_quark (), 0, + "Invalid IP6 route destination address '%s'", dest); + g_free (dest); + goto error; + } + nm_ip6_route_set_dest (route, &ip6_addr); + g_free (dest); + + /* Prefix - is optional; 128 if missing */ + prefix = g_match_info_fetch (match_info, 2); + prefix_int = 128; + if (prefix) { + errno = 0; + prefix_int = strtol (prefix, NULL, 10); + if (errno || prefix_int < 0 || prefix_int > 128) { + g_set_error (error, ifcfg_plugin_error_quark (), 0, + "Invalid IP6 route destination prefix '%s'", prefix); + g_free (prefix); + goto error; + } + } + + nm_ip6_route_set_prefix (route, (guint32) prefix_int); + g_free (prefix); + + /* Next hop */ + g_regex_match (regex_via, *iter, 0, &match_info); + if (!g_match_info_matches (match_info)) { + g_match_info_free (match_info); + g_set_error (error, ifcfg_plugin_error_quark (), 0, + "Missing IP6 route gateway address in record: '%s'", *iter); + goto error; + } + next_hop = g_match_info_fetch (match_info, 1); + g_match_info_free (match_info); + if (inet_pton (AF_INET6, next_hop, &ip6_addr) != 1) { + g_set_error (error, ifcfg_plugin_error_quark (), 0, + "Invalid IP6 route gateway address '%s'", next_hop); + g_free (next_hop); + goto error; + } + nm_ip6_route_set_next_hop (route, &ip6_addr); + g_free (next_hop); + + /* Metric */ + g_regex_match (regex_metric, *iter, 0, &match_info); + metric_int = 0; + if (g_match_info_matches (match_info)) { + metric = g_match_info_fetch (match_info, 1); + errno = 0; + metric_int = strtol (metric, NULL, 10); + if (errno || metric_int < 0 || metric_int > G_MAXUINT32) { + g_match_info_free (match_info); + g_set_error (error, ifcfg_plugin_error_quark (), 0, + "Invalid IP6 route metric '%s'", metric); + g_free (metric); + goto error; + } + g_free (metric); + } + + nm_ip6_route_set_metric (route, (guint32) metric_int); + g_match_info_free (match_info); + + if (!nm_setting_ip6_config_add_route (s_ip6, route)) + PLUGIN_WARN (IFCFG_PLUGIN_NAME, " warning: duplicate IP6 route"); + } + + success = TRUE; + +error: + g_free (contents); + g_strfreev (lines); + nm_ip6_route_unref (route); + g_regex_unref (regex_to1); + g_regex_unref (regex_to2); + g_regex_unref (regex_via); + g_regex_unref (regex_metric); + + return success; +} + static NMSetting * make_ip4_setting (shvarFile *ifcfg, const char *network_file, const char *iscsiadm_path, + gboolean valid_ip6_config, GError **error) { NMSettingIP4Config *s_ip4 = NULL; @@ -934,14 +1193,17 @@ make_ip4_setting (shvarFile *ifcfg, g_set_error (error, ifcfg_plugin_error_quark (), 0, "Unknown BOOTPROTO '%s'", value); g_free (value); - goto error; + goto done; } g_free (value); } else { char *tmp_ip4, *tmp_prefix, *tmp_netmask; - /* If there is no BOOTPROTO, no IPADDR, no PREFIX, and no NETMASK, - * assume DHCP is to be used. Happens with minimal ifcfg files like: + /* If there is no BOOTPROTO, no IPADDR, no PREFIX, no NETMASK, but + * valid IPv6 configuration, assume that IPv4 is disabled. Otherwise, + * if there is no IPv6 configuration, assume DHCP is to be used. + * Happens with minimal ifcfg files like the following that anaconda + * sometimes used to write out: * * DEVICE=eth0 * HWADDR=11:22:33:44:55:66 @@ -950,8 +1212,17 @@ make_ip4_setting (shvarFile *ifcfg, tmp_ip4 = svGetValue (ifcfg, "IPADDR", FALSE); tmp_prefix = svGetValue (ifcfg, "PREFIX", FALSE); tmp_netmask = svGetValue (ifcfg, "NETMASK", FALSE); - if (!tmp_ip4 && !tmp_prefix && !tmp_netmask) + if (!tmp_ip4 && !tmp_prefix && !tmp_netmask) { + if (valid_ip6_config) { + /* Nope, no IPv4 */ + g_object_set (s_ip4, + NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_DISABLED, + NULL); + return NM_SETTING (s_ip4); + } + method = NM_SETTING_IP4_CONFIG_METHOD_AUTO; + } g_free (tmp_ip4); g_free (tmp_prefix); g_free (tmp_netmask); @@ -962,6 +1233,7 @@ make_ip4_setting (shvarFile *ifcfg, NM_SETTING_IP4_CONFIG_IGNORE_AUTO_DNS, !svTrueValue (ifcfg, "PEERDNS", TRUE), NM_SETTING_IP4_CONFIG_IGNORE_AUTO_ROUTES, !svTrueValue (ifcfg, "PEERROUTES", TRUE), NM_SETTING_IP4_CONFIG_NEVER_DEFAULT, never_default, + NM_SETTING_IP4_CONFIG_MAY_FAIL, !svTrueValue (ifcfg, "IPV4_FAILURE_FATAL", TRUE), NULL); /* Handle manual settings */ @@ -971,7 +1243,7 @@ make_ip4_setting (shvarFile *ifcfg, for (i = 1; i < 256; i++) { addr = read_full_ip4_address (ifcfg, network_file, i, error); if (error && *error) - goto error; + goto done; if (!addr) break; @@ -991,16 +1263,31 @@ make_ip4_setting (shvarFile *ifcfg, g_free (value); } - /* DNS servers */ + /* DNS servers + * Pick up just IPv4 addresses (IPv6 addresses are taken by make_ip6_setting()) + */ for (i = 1, tmp_success = TRUE; i <= 10 && tmp_success; i++) { char *tag; guint32 dns; + struct in6_addr ip6_dns; + GError *tmp_err = NULL; tag = g_strdup_printf ("DNS%u", i); tmp_success = read_ip4_address (ifcfg, tag, &dns, error); if (!tmp_success) { - g_free (tag); - goto error; + /* if it's IPv6, don't exit */ + dns = 0; + value = svGetValue (ifcfg, tag, FALSE); + if (value) { + tmp_success = parse_ip6_address (value, &ip6_dns, &tmp_err); + g_clear_error (&tmp_err); + g_free (value); + } + if (!tmp_success) { + g_free (tag); + goto done; + } + g_clear_error (error); } if (dns && !nm_setting_ip4_config_add_dns (s_ip4, dns)) @@ -1032,7 +1319,7 @@ make_ip4_setting (shvarFile *ifcfg, if (!route_path) { g_set_error (error, ifcfg_plugin_error_quark (), 0, "Could not get route file path for '%s'", ifcfg->fileName); - goto error; + goto done; } /* First test new/legacy syntax */ @@ -1046,7 +1333,7 @@ make_ip4_setting (shvarFile *ifcfg, route = read_one_ip4_route (route_ifcfg, network_file, i, error); if (error && *error) { svCloseFile (route_ifcfg); - goto error; + goto done; } if (!route) break; @@ -1061,7 +1348,7 @@ make_ip4_setting (shvarFile *ifcfg, read_route_file_legacy (route_path, s_ip4, error); g_free (route_path); if (error && *error) - goto error; + goto done; } /* Legacy value NM used for a while but is incorrect (rh #459370) */ @@ -1087,15 +1374,216 @@ make_ip4_setting (shvarFile *ifcfg, return NM_SETTING (s_ip4); -error: +done: g_object_unref (s_ip4); return NULL; } +static NMSetting * +make_ip6_setting (shvarFile *ifcfg, + const char *network_file, + const char *iscsiadm_path, + GError **error) +{ + NMSettingIP6Config *s_ip6 = NULL; + char *value = NULL; + char *str_value; + char *route6_path = NULL; + gboolean bool_value, ipv6forwarding, ipv6_autoconf, dhcp6 = FALSE; + char *method = NM_SETTING_IP6_CONFIG_METHOD_MANUAL; + guint32 i; + shvarFile *network_ifcfg; + gboolean never_default = FALSE, tmp_success; + + s_ip6 = (NMSettingIP6Config *) nm_setting_ip6_config_new (); + if (!s_ip6) { + g_set_error (error, ifcfg_plugin_error_quark (), 0, + "Could not allocate IP6 setting"); + return NULL; + } + + /* Is IPV6 enabled? Set method to "ignored", when not enabled */ + str_value = svGetValue (ifcfg, "IPV6INIT", FALSE); + bool_value = svTrueValue (ifcfg, "IPV6INIT", FALSE); + if (!str_value) { + network_ifcfg = svNewFile (network_file); + if (network_ifcfg) { + bool_value = svTrueValue (network_ifcfg, "IPV6INIT", FALSE); + svCloseFile (network_ifcfg); + } + } + g_free (str_value); + + if (!bool_value) { + /* IPv6 is disabled */ + g_object_set (s_ip6, + NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_IGNORE, + NULL); + return NM_SETTING (s_ip6); + } + + /* First check if IPV6_DEFROUTE is set for this device; IPV6_DEFROUTE has the + * opposite meaning from never-default. The default if IPV6_DEFROUTE is not + * specified is IPV6_DEFROUTE=yes which means that this connection can be used + * as a default route + */ + never_default = !svTrueValue (ifcfg, "IPV6_DEFROUTE", TRUE); + + /* Then check if IPV6_DEFAULTGW or IPV6_DEFAULTDEV is specified; + * they are global and override IPV6_DEFROUTE + * When both are set, the device specified in IPV6_DEFAULTGW takes preference. + */ + network_ifcfg = svNewFile (network_file); + if (network_ifcfg) { + char *ipv6_defaultgw, *ipv6_defaultdev; + char *default_dev = NULL; + + /* Get the connection ifcfg device name and the global default route device */ + value = svGetValue (ifcfg, "DEVICE", FALSE); + ipv6_defaultgw = svGetValue (network_ifcfg, "IPV6_DEFAULTGW", FALSE); + ipv6_defaultdev = svGetValue (network_ifcfg, "IPV6_DEFAULTDEV", FALSE); + + if (ipv6_defaultgw) { + default_dev = strchr (ipv6_defaultgw, '%'); + if (default_dev) + default_dev++; + } + if (!default_dev) + default_dev = ipv6_defaultdev; + + /* If there was a global default route device specified, then only connections + * for that device can be the default connection. + */ + if (default_dev && value) + never_default = !!strcmp (value, default_dev); + + g_free (ipv6_defaultgw); + g_free (ipv6_defaultdev); + g_free (value); + svCloseFile (network_ifcfg); + } + + /* Find out method property */ + ipv6forwarding = svTrueValue (ifcfg, "IPV6FORWARDING", FALSE); + ipv6_autoconf = svTrueValue (ifcfg, "IPV6_AUTOCONF", !ipv6forwarding); + dhcp6 = svTrueValue (ifcfg, "DHCPV6C", FALSE); + + if (ipv6_autoconf) + method = NM_SETTING_IP6_CONFIG_METHOD_AUTO; + else if (dhcp6) + method = NM_SETTING_IP6_CONFIG_METHOD_DHCP; + else { + /* IPV6_AUTOCONF=no and no IPv6 address -> method 'link-local' */ + str_value = svGetValue (ifcfg, "IPV6ADDR", FALSE); + if (!str_value) + str_value = svGetValue (ifcfg, "IPV6ADDR_SECONDARIES", FALSE); + + if (!str_value) + method = NM_SETTING_IP6_CONFIG_METHOD_LINK_LOCAL; + g_free (str_value); + } + /* TODO - handle other methods */ + + g_object_set (s_ip6, + NM_SETTING_IP6_CONFIG_METHOD, method, + NM_SETTING_IP6_CONFIG_IGNORE_AUTO_DNS, !svTrueValue (ifcfg, "IPV6_PEERDNS", TRUE), + NM_SETTING_IP6_CONFIG_IGNORE_AUTO_ROUTES, !svTrueValue (ifcfg, "IPV6_PEERROUTES", TRUE), + NM_SETTING_IP6_CONFIG_NEVER_DEFAULT, never_default, + NM_SETTING_IP6_CONFIG_MAY_FAIL, !svTrueValue (ifcfg, "IPV6_FAILURE_FATAL", FALSE), + NULL); + + if (!strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_MANUAL)) { + NMIP6Address *addr; + char *val; + char *ipv6addr, *ipv6addr_secondaries; + char **list = NULL, **iter; + + ipv6addr = svGetValue (ifcfg, "IPV6ADDR", FALSE); + ipv6addr_secondaries = svGetValue (ifcfg, "IPV6ADDR_SECONDARIES", FALSE); + + val = g_strjoin (ipv6addr && ipv6addr_secondaries ? " " : NULL, + ipv6addr ? ipv6addr : "", + ipv6addr_secondaries ? ipv6addr_secondaries : "", + NULL); + g_free (ipv6addr); + g_free (ipv6addr_secondaries); + + list = g_strsplit_set (val, " ", 0); + g_free (val); + for (iter = list; iter && *iter; iter++, i++) { + addr = parse_full_ip6_address (*iter, error); + if (!addr) { + g_strfreev (list); + goto error; + } + + if (!nm_setting_ip6_config_add_address (s_ip6, addr)) + PLUGIN_WARN (IFCFG_PLUGIN_NAME, " warning: duplicate IP6 address"); + nm_ip6_address_unref (addr); + } + g_strfreev (list); + } else if (!strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_AUTO)) { + /* TODO - autoconf or DHCPv6 stuff goes here */ + } + + /* DNS servers + * Pick up just IPv6 addresses (IPv4 addresses are taken by make_ip4_setting()) + */ + for (i = 1, tmp_success = TRUE; i <= 10 && tmp_success; i++) { + char *tag; + struct in6_addr ip6_dns; + + ip6_dns = in6addr_any; + tag = g_strdup_printf ("DNS%u", i); + value = svGetValue (ifcfg, tag, FALSE); + if (value) + tmp_success = parse_ip6_address (value, &ip6_dns, error); + + if (!tmp_success) { + struct in_addr ip4_addr; + if (inet_pton (AF_INET, value, &ip4_addr) != 1) { + g_free (tag); + g_free (value); + goto error; + } + /* ignore error - it is IPv4 address */ + tmp_success = TRUE; + g_clear_error (error); + } + + if (!IN6_IS_ADDR_UNSPECIFIED (&ip6_dns) && !nm_setting_ip6_config_add_dns (s_ip6, &ip6_dns)) + PLUGIN_WARN (IFCFG_PLUGIN_NAME, " warning: duplicate DNS server %s", tag); + g_free (tag); + g_free (value); + } + + /* DNS searches ('DOMAIN' key) are read by make_ip4_setting() and included in NMSettingIP4Config */ + + /* Read static routes from route6- file */ + route6_path = utils_get_route6_path (ifcfg->fileName); + if (!route6_path) { + g_set_error (error, ifcfg_plugin_error_quark (), 0, + "Could not get route6 file path for '%s'", ifcfg->fileName); + goto error; + } + + read_route6_file (route6_path, s_ip6, error); + g_free (route6_path); + if (error && *error) + goto error; + + return NM_SETTING (s_ip6); + +error: + g_object_unref (s_ip6); + return NULL; +} + static gboolean add_one_wep_key (shvarFile *ifcfg, const char *shvar_key, guint8 key_idx, + gboolean passphrase, NMSettingWirelessSecurity *s_wsec, GError **error) { @@ -1115,42 +1603,51 @@ add_one_wep_key (shvarFile *ifcfg, } /* Validate keys */ - if (strlen (value) == 10 || strlen (value) == 26) { - /* Hexadecimal WEP key */ - char *p = value; - - while (*p) { - if (!g_ascii_isxdigit (*p)) { - g_set_error (error, ifcfg_plugin_error_quark (), 0, - "Invalid hexadecimal WEP key."); - goto out; - } - p++; + if (passphrase) { + if (strlen (value) && strlen (value) < 64) { + key = g_strdup (value); + g_object_set (G_OBJECT (s_wsec), + NM_SETTING_WIRELESS_SECURITY_WEP_KEY_TYPE, + NM_WEP_KEY_TYPE_PASSPHRASE, + NULL); } - key = g_strdup (value); - } else if ( strncmp (value, "s:", 2) - && (strlen (value) == 7 || strlen (value) == 15)) { - /* ASCII passphrase */ - char *p = value + 2; - - while (*p) { - if (!isascii ((int) (*p))) { - g_set_error (error, ifcfg_plugin_error_quark (), 0, - "Invalid ASCII WEP passphrase."); - goto out; - } - p++; - } - - key = utils_bin2hexstr (value, strlen (value), strlen (value) * 2); } else { - g_set_error (error, ifcfg_plugin_error_quark (), 0, "Invalid WEP key length."); + if (strlen (value) == 10 || strlen (value) == 26) { + /* Hexadecimal WEP key */ + char *p = value; + + while (*p) { + if (!g_ascii_isxdigit (*p)) { + g_set_error (error, ifcfg_plugin_error_quark (), 0, + "Invalid hexadecimal WEP key."); + goto out; + } + p++; + } + key = g_strdup (value); + } else if ( strncmp (value, "s:", 2) + && (strlen (value) == 7 || strlen (value) == 15)) { + /* ASCII passphrase */ + char *p = value + 2; + + while (*p) { + if (!isascii ((int) (*p))) { + g_set_error (error, ifcfg_plugin_error_quark (), 0, + "Invalid ASCII WEP passphrase."); + goto out; + } + p++; + } + + key = utils_bin2hexstr (value, strlen (value), strlen (value) * 2); + } } if (key) { nm_setting_wireless_security_set_wep_key (s_wsec, key_idx, key); success = TRUE; - } + } else + g_set_error (error, ifcfg_plugin_error_quark (), 0, "Invalid WEP key length."); out: g_free (value); @@ -1163,15 +1660,26 @@ read_wep_keys (shvarFile *ifcfg, NMSettingWirelessSecurity *s_wsec, GError **error) { - if (!add_one_wep_key (ifcfg, "KEY1", 0, s_wsec, error)) + /* Try hex/ascii keys first */ + if (!add_one_wep_key (ifcfg, "KEY1", 0, FALSE, s_wsec, error)) return FALSE; - if (!add_one_wep_key (ifcfg, "KEY2", 1, s_wsec, error)) + if (!add_one_wep_key (ifcfg, "KEY2", 1, FALSE, s_wsec, error)) return FALSE; - if (!add_one_wep_key (ifcfg, "KEY3", 2, s_wsec, error)) + if (!add_one_wep_key (ifcfg, "KEY3", 2, FALSE, s_wsec, error)) return FALSE; - if (!add_one_wep_key (ifcfg, "KEY4", 3, s_wsec, error)) + if (!add_one_wep_key (ifcfg, "KEY4", 3, FALSE, s_wsec, error)) return FALSE; - if (!add_one_wep_key (ifcfg, "KEY", def_idx, s_wsec, error)) + if (!add_one_wep_key (ifcfg, "KEY", def_idx, FALSE, s_wsec, error)) + return FALSE; + + /* And then passphrases */ + if (!add_one_wep_key (ifcfg, "KEY_PASSPHRASE1", 0, TRUE, s_wsec, error)) + return FALSE; + if (!add_one_wep_key (ifcfg, "KEY_PASSPHRASE2", 1, TRUE, s_wsec, error)) + return FALSE; + if (!add_one_wep_key (ifcfg, "KEY_PASSPHRASE3", 2, TRUE, s_wsec, error)) + return FALSE; + if (!add_one_wep_key (ifcfg, "KEY_PASSPHRASE4", 3, TRUE, s_wsec, error)) return FALSE; return TRUE; @@ -1219,6 +1727,7 @@ make_wep_setting (shvarFile *ifcfg, goto error; } svCloseFile (keys_ifcfg); + g_assert (error == NULL || *error == NULL); } /* If there's a default key, ensure that key exists */ @@ -2576,15 +3085,17 @@ connection_from_file (const char *filename, char **unmanaged, char **keyfile, char **routefile, + char **route6file, GError **error, gboolean *ignore_error) { NMConnection *connection = NULL; shvarFile *parsed; char *type, *nmc = NULL, *bootproto; - NMSetting *s_ip4; - char *ifcfg_name = NULL; + NMSetting *s_ip4, *s_ip6; + const char *ifcfg_name = NULL; gboolean nm_controlled = TRUE; + gboolean ip6_used = FALSE; g_return_val_if_fail (filename != NULL, NULL); g_return_val_if_fail (unmanaged != NULL, NULL); @@ -2593,6 +3104,8 @@ connection_from_file (const char *filename, g_return_val_if_fail (*keyfile == NULL, NULL); g_return_val_if_fail (routefile != NULL, NULL); g_return_val_if_fail (*routefile == NULL, NULL); + g_return_val_if_fail (route6file != NULL, NULL); + g_return_val_if_fail (*route6file == NULL, NULL); /* Non-NULL only for unit tests; normally use /etc/sysconfig/network */ if (!network_file) @@ -2601,13 +3114,12 @@ connection_from_file (const char *filename, if (!iscsiadm_path) iscsiadm_path = SBINDIR "/iscsiadm"; - ifcfg_name = utils_get_ifcfg_name (filename); + ifcfg_name = utils_get_ifcfg_name (filename, TRUE); if (!ifcfg_name) { g_set_error (error, ifcfg_plugin_error_quark (), 0, "Ignoring connection '%s' because it's not an ifcfg file.", filename); return NULL; } - g_free (ifcfg_name); parsed = svNewFile (filename); if (!parsed) { @@ -2687,15 +3199,28 @@ connection_from_file (const char *filename, if (!connection || *unmanaged) goto done; - s_ip4 = make_ip4_setting (parsed, network_file, iscsiadm_path, error); + s_ip6 = make_ip6_setting (parsed, network_file, iscsiadm_path, error); if (*error) { g_object_unref (connection); connection = NULL; goto done; - } else if (s_ip4) { - nm_connection_add_setting (connection, s_ip4); + } else if (s_ip6) { + const char *method; + + nm_connection_add_setting (connection, s_ip6); + method = nm_setting_ip6_config_get_method (NM_SETTING_IP6_CONFIG (s_ip6)); + if (method && strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE)) + ip6_used = TRUE; } + s_ip4 = make_ip4_setting (parsed, network_file, iscsiadm_path, ip6_used, error); + if (*error) { + g_object_unref (connection); + connection = NULL; + goto done; + } else if (s_ip4) + nm_connection_add_setting (connection, s_ip4); + /* iSCSI / ibft connections are read-only since their settings are * stored in NVRAM and can only be changed in BIOS. */ @@ -2718,6 +3243,7 @@ connection_from_file (const char *filename, *keyfile = utils_get_keys_path (filename); *routefile = utils_get_route_path (filename); + *route6file = utils_get_route6_path (filename); done: svCloseFile (parsed); diff --git a/system-settings/plugins/ifcfg-rh/reader.h b/system-settings/plugins/ifcfg-rh/reader.h index a5df59c632..2a031977dc 100644 --- a/system-settings/plugins/ifcfg-rh/reader.h +++ b/system-settings/plugins/ifcfg-rh/reader.h @@ -33,6 +33,7 @@ NMConnection *connection_from_file (const char *filename, char **unmanaged, char **keyfile, char **routefile, + char **route6file, GError **error, gboolean *ignore_error); diff --git a/system-settings/plugins/ifcfg-rh/tests/Makefile.am b/system-settings/plugins/ifcfg-rh/tests/Makefile.am index f4eafb0d04..8933bb2eab 100644 --- a/system-settings/plugins/ifcfg-rh/tests/Makefile.am +++ b/system-settings/plugins/ifcfg-rh/tests/Makefile.am @@ -6,7 +6,7 @@ INCLUDES = \ -I$(top_srcdir)/libnm-glib \ -I$(top_srcdir)/system-settings/plugins/ifcfg-rh -noinst_PROGRAMS = test-ifcfg-rh +noinst_PROGRAMS = test-ifcfg-rh test-ifcfg-rh-utils test_ifcfg_rh_SOURCES = \ test-ifcfg-rh.c @@ -23,9 +23,19 @@ test_ifcfg_rh_LDADD = \ $(top_builddir)/system-settings/plugins/ifcfg-rh/libifcfg-rh-io.la \ $(DBUS_LIBS) +test_ifcfg_rh_utils_SOURCES = \ + test-ifcfg-rh-utils.c + +test_ifcfg_rh_utils_CPPFLAGS = \ + $(GLIB_CFLAGS) + +test_ifcfg_rh_utils_LDADD = \ + $(top_builddir)/system-settings/plugins/ifcfg-rh/libifcfg-rh-io.la + if WITH_TESTS check-local: test-ifcfg-rh + $(abs_builddir)/test-ifcfg-rh-utils $(abs_builddir)/test-ifcfg-rh endif diff --git a/system-settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am b/system-settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am index 7d55382709..66435acbcb 100644 --- a/system-settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am +++ b/system-settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am @@ -52,7 +52,15 @@ EXTRA_DIST = \ ifcfg-test-wired-static-routes \ route-test-wired-static-routes \ ifcfg-test-wired-static-routes-legacy \ - route-test-wired-static-routes-legacy + route-test-wired-static-routes-legacy \ + ifcfg-test-wired-ipv6-manual \ + route6-test-wired-ipv6-manual \ + ifcfg-test-wired-static-no-prefix-8 \ + ifcfg-test-wired-static-no-prefix-16 \ + ifcfg-test-wired-static-no-prefix-24 \ + ifcfg-test-wired-ipv6-only \ + ifcfg-test-wifi-wep-passphrase \ + keys-test-wifi-wep-passphrase check-local: @for f in $(EXTRA_DIST); do \ diff --git a/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-static-routes-legacy b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-static-routes-legacy index 606f56b798..2173729d17 100644 --- a/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-static-routes-legacy +++ b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-static-routes-legacy @@ -7,5 +7,6 @@ BOOTPROTO=dhcp DEFROUTE=yes UUID=ba60d05a-7898-820d-c2db-427a88f8f2a5 ONBOOT=yes +IPV6INIT=no PEERDNS=yes PEERROUTES=yes diff --git a/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wep-passphrase b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wep-passphrase new file mode 100644 index 0000000000..250efa134c --- /dev/null +++ b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wep-passphrase @@ -0,0 +1,14 @@ +TYPE=Wireless +DEVICE=eth2 +HWADDR=00:16:41:11:22:33 +NM_CONTROLLED=yes +BOOTPROTO=dhcp +ESSID=blahblah +CHANNEL=1 +MODE=Managed +RATE=auto +ONBOOT=yes +USERCTL=yes +PEERDNS=yes +IPV6INIT=no +SECURITYMODE=open diff --git a/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-defroute-no b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-defroute-no index 266fe1eebd..fe8b15b29a 100644 --- a/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-defroute-no +++ b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-defroute-no @@ -9,3 +9,7 @@ NM_CONTROLLED=yes PEERDNS=yes DEFROUTE=no +IPV6INIT=yes +IPV6_AUTOCONF=yes +IPV6_DEFROUTE=no + diff --git a/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-defroute-no-gatewaydev-yes b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-defroute-no-gatewaydev-yes index ede2927301..3cf4323dd2 100644 --- a/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-defroute-no-gatewaydev-yes +++ b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-defroute-no-gatewaydev-yes @@ -9,3 +9,7 @@ NM_CONTROLLED=yes PEERDNS=yes DEFROUTE=no +IPV6INIT=yes +IPV6_AUTOCONF=yes +IPV6_DEFROUTE=no + diff --git a/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-ipv6-manual b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-ipv6-manual new file mode 100644 index 0000000000..45db0e4c4b --- /dev/null +++ b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-ipv6-manual @@ -0,0 +1,19 @@ +# Intel Corporation 82567LM Gigabit Network Connection +TYPE=Ethernet +DEVICE=eth2 +HWADDR=00:11:22:33:44:ee +BOOTPROTO=dhcp +ONBOOT=yes +USERCTL=yes +NM_CONTROLLED=yes +PEERDNS=yes +DNS1=10.2.0.4 +DNS2=10.2.0.5 +DNS3=1:2:3:4::a +DNS4=1:2:3:4::b +DOMAIN="lorem.com ipsum.org dolor.edu" +IPV6INIT=yes +IPV6_AUTOCONF=no +IPV6ADDR="1001:abba::1234/56" +IPV6ADDR_SECONDARIES="2001:abba::2234/64 3001:abba::3234/96" +IPV6_FAILURE_FATAL=no diff --git a/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-ipv6-only b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-ipv6-only new file mode 100644 index 0000000000..59ec32e5b6 --- /dev/null +++ b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-ipv6-only @@ -0,0 +1,14 @@ +# Intel Corporation 82567LM Gigabit Network Connection +TYPE=Ethernet +DEVICE=eth2 +HWADDR=00:11:22:33:44:ee +ONBOOT=yes +USERCTL=yes +NM_CONTROLLED=yes +PEERDNS=yes +DNS1=1:2:3:4::a +DOMAIN="lorem.com ipsum.org dolor.edu" +IPV6INIT=yes +IPV6_AUTOCONF=no +IPV6ADDR="1001:abba::1234/56" + diff --git a/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-never-default b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-never-default index c059253075..12d5b5e635 100644 --- a/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-never-default +++ b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-never-default @@ -7,4 +7,5 @@ ONBOOT=yes USERCTL=yes NM_CONTROLLED=yes PEERDNS=yes - +IPV6INIT=yes +IPV6_AUTOCONF=yes diff --git a/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-static b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-static index 7faf49bdae..c8315f45d3 100644 --- a/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-static +++ b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-static @@ -5,7 +5,6 @@ HWADDR=00:11:22:33:44:ee BOOTPROTO=none ONBOOT=yes USERCTL=yes -IPV6INIT=no MTU=1492 NM_CONTROLLED=yes DNS1=4.2.2.1 @@ -13,3 +12,9 @@ DNS2=4.2.2.2 IPADDR=192.168.1.5 NETMASK=255.255.255.0 GATEWAY=192.168.1.1 +IPV6INIT=yes +IPV6_AUTOCONF=no +IPV6ADDR=dead:beaf::1 +IPV6ADDR_SECONDARIES="dead:beaf::2/56" +DNS3=1:2:3:4::a +DNS4=1:2:3:4::b diff --git a/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-static-no-prefix-16 b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-static-no-prefix-16 new file mode 100644 index 0000000000..0799903887 --- /dev/null +++ b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-static-no-prefix-16 @@ -0,0 +1,14 @@ +# Intel Corporation 82540EP Gigabit Ethernet Controller (Mobile) +TYPE=Ethernet +DEVICE=eth0 +HWADDR=00:11:22:33:44:ee +BOOTPROTO=none +ONBOOT=yes +USERCTL=yes +MTU=1492 +NM_CONTROLLED=yes +DNS1=4.2.2.1 +DNS2=4.2.2.2 +IPADDR=172.16.3.4 +GATEWAY=172.16.3.1 + diff --git a/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-static-no-prefix-24 b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-static-no-prefix-24 new file mode 100644 index 0000000000..688143cd2e --- /dev/null +++ b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-static-no-prefix-24 @@ -0,0 +1,14 @@ +# Intel Corporation 82540EP Gigabit Ethernet Controller (Mobile) +TYPE=Ethernet +DEVICE=eth0 +HWADDR=00:11:22:33:44:ee +BOOTPROTO=none +ONBOOT=yes +USERCTL=yes +MTU=1492 +NM_CONTROLLED=yes +DNS1=4.2.2.1 +DNS2=4.2.2.2 +IPADDR=192.168.1.5 +GATEWAY=192.168.1.1 + diff --git a/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-static-no-prefix-8 b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-static-no-prefix-8 new file mode 100644 index 0000000000..0433c62a86 --- /dev/null +++ b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-static-no-prefix-8 @@ -0,0 +1,14 @@ +# Intel Corporation 82540EP Gigabit Ethernet Controller (Mobile) +TYPE=Ethernet +DEVICE=eth0 +HWADDR=00:11:22:33:44:ee +BOOTPROTO=none +ONBOOT=yes +USERCTL=yes +MTU=1492 +NM_CONTROLLED=yes +DNS1=4.2.2.1 +DNS2=4.2.2.2 +IPADDR=10.11.12.13 +GATEWAY=10.0.0.1 + diff --git a/system-settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wep-passphrase b/system-settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wep-passphrase new file mode 100644 index 0000000000..d45c0ea8e8 --- /dev/null +++ b/system-settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wep-passphrase @@ -0,0 +1 @@ +KEY_PASSPHRASE1="foobar222blahblah" diff --git a/system-settings/plugins/ifcfg-rh/tests/network-scripts/network-test-wired-defroute-no-gatewaydev-yes b/system-settings/plugins/ifcfg-rh/tests/network-scripts/network-test-wired-defroute-no-gatewaydev-yes index b5579c67d4..0d6a302f12 100644 --- a/system-settings/plugins/ifcfg-rh/tests/network-scripts/network-test-wired-defroute-no-gatewaydev-yes +++ b/system-settings/plugins/ifcfg-rh/tests/network-scripts/network-test-wired-defroute-no-gatewaydev-yes @@ -1 +1,2 @@ GATEWAYDEV=eth0 +IPV6_DEFAULTDEV=eth0 diff --git a/system-settings/plugins/ifcfg-rh/tests/network-scripts/network-test-wired-never-default b/system-settings/plugins/ifcfg-rh/tests/network-scripts/network-test-wired-never-default index b5579c67d4..9a292679a1 100644 --- a/system-settings/plugins/ifcfg-rh/tests/network-scripts/network-test-wired-never-default +++ b/system-settings/plugins/ifcfg-rh/tests/network-scripts/network-test-wired-never-default @@ -1 +1,4 @@ GATEWAYDEV=eth0 +# when devices in IPV6_DEFAULTDEV and IPV6_DEFAULTGW don't match the one in IPV6_DEFAULTGW is prefered +IPV6_DEFAULTDEV=eth4 +IPV6_DEFAULTGW=2001::1234%eth0 diff --git a/system-settings/plugins/ifcfg-rh/tests/network-scripts/route6-test-wired-ipv6-manual b/system-settings/plugins/ifcfg-rh/tests/network-scripts/route6-test-wired-ipv6-manual new file mode 100644 index 0000000000..ae4e47ae55 --- /dev/null +++ b/system-settings/plugins/ifcfg-rh/tests/network-scripts/route6-test-wired-ipv6-manual @@ -0,0 +1 @@ +9876::1234/96 via 9876::7777 metric 2 diff --git a/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh-utils.c b/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh-utils.c new file mode 100644 index 0000000000..cf2a7c03de --- /dev/null +++ b/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh-utils.c @@ -0,0 +1,162 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* NetworkManager system settings service - keyfile plugin + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2008 - 2009 Red Hat, Inc. + */ + +#include +#include +#include +#include + +#include "nm-test-helpers.h" + +#include "common.h" +#include "utils.h" + + +static void +test_get_ifcfg_name (const char *desc, + const char *path, + gboolean only_ifcfg, + const char *expected) +{ + const char *result; + + result = utils_get_ifcfg_name (path, only_ifcfg); + if (expected == NULL) { + ASSERT (result == NULL, desc, "unexpected valid ifcfg name '%s'", result); + } else { + ASSERT (result != NULL, desc, "failed to create ifcfg name for '%s'", path); + + ASSERT (strcmp (result, expected) == 0, + desc, "unexpected ifcfg name '%s' created for '%s'", result, path); + } +} + +static void +test_get_ifcfg_path (const char *desc, + const char *path, + const char *expected) +{ + const char *result; + + result = utils_get_ifcfg_path (path); + if (expected == NULL) { + ASSERT (result == NULL, desc, "unexpected valid ifcfg name '%s'", result); + } else { + ASSERT (result != NULL, desc, "failed to create ifcfg name for '%s'", path); + + ASSERT (strcmp (result, expected) == 0, + desc, "unexpected ifcfg name '%s' created for '%s'", result, path); + } +} + +static void +test_get_keys_path (const char *desc, + const char *path, + const char *expected) +{ + const char *result; + + result = utils_get_keys_path (path); + if (expected == NULL) { + ASSERT (result == NULL, desc, "unexpected valid extra path '%s'", result); + } else { + ASSERT (result != NULL, desc, "failed to create extra path for '%s'", path); + + ASSERT (strcmp (result, expected) == 0, + desc, "unexpected extra path '%s' created for '%s'", result, path); + } +} + +static void +test_get_route_path (const char *desc, + const char *path, + const char *expected) +{ + const char *result; + + result = utils_get_route_path (path); + if (expected == NULL) { + ASSERT (result == NULL, desc, "unexpected valid extra path '%s'", result); + } else { + ASSERT (result != NULL, desc, "failed to create extra path for '%s'", path); + + ASSERT (strcmp (result, expected) == 0, + desc, "unexpected extra path '%s' created for '%s'", result, path); + } +} + +static void +test_ignored (const char *desc, const char *path, gboolean expected_ignored) +{ + gboolean result; + + result = utils_should_ignore_file (path, FALSE); + ASSERT (result == expected_ignored, desc, "unexpected ignore result for path '%s'", path); +} + +int main (int argc, char **argv) +{ + char *base; + + /* The tests */ + test_get_ifcfg_name ("get-ifcfg-name-bad", "/foo/bar/adfasdfadf", FALSE, NULL); + test_get_ifcfg_name ("get-ifcfg-name-good", "/foo/bar/ifcfg-FooBar", FALSE, "FooBar"); + test_get_ifcfg_name ("get-ifcfg-name-keys", "/foo/bar/keys-BlahLbah", FALSE, "BlahLbah"); + test_get_ifcfg_name ("get-ifcfg-name-route", "/foo/bar/route-Lalalala", FALSE, "Lalalala"); + test_get_ifcfg_name ("get-ifcfg-name-only-ifcfg-route", "/foo/bar/route-Lalalala", TRUE, NULL); + test_get_ifcfg_name ("get-ifcfg-name-only-ifcfg-keys", "/foo/bar/keys-Lalalala", TRUE, NULL); + test_get_ifcfg_name ("get-ifcfg-name-no-path-ifcfg", "ifcfg-Lalalala", FALSE, "Lalalala"); + test_get_ifcfg_name ("get-ifcfg-name-no-path-keys", "keys-Lalalala", FALSE, "Lalalala"); + test_get_ifcfg_name ("get-ifcfg-name-no-path-route", "route-Lalalala", FALSE, "Lalalala"); + + test_get_ifcfg_name ("get-ifcfg-name-bad2-ifcfg", "/foo/bar/asdfasifcfg-Foobar", FALSE, NULL); + test_get_ifcfg_name ("get-ifcfg-name-bad2-keys", "/foo/bar/asdfaskeys-Foobar", FALSE, NULL); + test_get_ifcfg_name ("get-ifcfg-name-bad2-route", "/foo/bar/asdfasroute-Foobar", FALSE, NULL); + + test_get_ifcfg_path ("ifcfg-path-bad", "/foo/bar/adfasdfasdf", NULL); + test_get_ifcfg_path ("ifcfg-path-from-keys-no-path", "keys-BlahBlah", "ifcfg-BlahBlah"); + test_get_ifcfg_path ("ifcfg-path-from-keys", "/foo/bar/keys-BlahBlah", "/foo/bar/ifcfg-BlahBlah"); + test_get_ifcfg_path ("ifcfg-path-from-route", "/foo/bar/route-BlahBlah", "/foo/bar/ifcfg-BlahBlah"); + + test_get_keys_path ("keys-path-bad", "/foo/bar/asdfasdfasdfasdf", NULL); + test_get_keys_path ("keys-path-from-ifcfg-no-path", "ifcfg-FooBar", "keys-FooBar"); + test_get_keys_path ("keys-path-from-ifcfg", "/foo/bar/ifcfg-FooBar", "/foo/bar/keys-FooBar"); + test_get_keys_path ("keys-path-from-route", "/foo/bar/route-FooBar", "/foo/bar/keys-FooBar"); + + test_get_route_path ("route-path-bad", "/foo/bar/asdfasdfasdfasdf", NULL); + test_get_route_path ("route-path-from-ifcfg-no-path", "ifcfg-FooBar", "route-FooBar"); + test_get_route_path ("route-path-from-ifcfg", "/foo/bar/ifcfg-FooBar", "/foo/bar/route-FooBar"); + test_get_route_path ("route-path-from-keys", "/foo/bar/keys-FooBar", "/foo/bar/route-FooBar"); + + test_ignored ("ignored-ifcfg", "ifcfg-FooBar", FALSE); + test_ignored ("ignored-keys", "keys-FooBar", FALSE); + test_ignored ("ignored-route", "route-FooBar", FALSE); + test_ignored ("ignored-bak", "ifcfg-FooBar" BAK_TAG, TRUE); + test_ignored ("ignored-tilde", "ifcfg-FooBar" TILDE_TAG, TRUE); + test_ignored ("ignored-orig", "ifcfg-FooBar" ORIG_TAG, TRUE); + test_ignored ("ignored-rej", "ifcfg-FooBar" REJ_TAG, TRUE); + test_ignored ("ignored-rpmnew", "ifcfg-FooBar" RPMNEW_TAG, TRUE); + + base = g_path_get_basename (argv[0]); + fprintf (stdout, "%s: SUCCESS\n", base); + g_free (base); + return 0; +} + diff --git a/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c b/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c index 5c899acbda..35cea36cf5 100644 --- a/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c +++ b/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2008 - 2009 Red Hat, Inc. + * Copyright (C) 2008 - 2010 Red Hat, Inc. */ #include @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -187,6 +188,7 @@ test_read_minimal (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; const char *tmp; @@ -202,6 +204,7 @@ test_read_minimal (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection != NULL, @@ -319,6 +322,7 @@ test_read_unmanaged (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; const char *tmp; @@ -334,6 +338,7 @@ test_read_unmanaged (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection != NULL, @@ -430,9 +435,11 @@ test_read_wired_static (const char *file, const char *expected_id) NMSettingConnection *s_con; NMSettingWired *s_wired; NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; char *unmanaged = FALSE; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; const GByteArray *array; @@ -441,9 +448,15 @@ test_read_wired_static (const char *file, const char *expected_id) const char *expected_dns1 = "4.2.2.1"; const char *expected_dns2 = "4.2.2.2"; struct in_addr addr; + struct in6_addr addr6; const char *expected_address1 = "192.168.1.5"; const char *expected_address1_gw = "192.168.1.1"; + const char *expected6_address1 = "dead:beaf::1"; + const char *expected6_address2 = "dead:beaf::2"; + const char *expected6_dns1 = "1:2:3:4::a"; + const char *expected6_dns2 = "1:2:3:4::b"; NMIP4Address *ip4_addr; + NMIP6Address *ip6_addr; connection = connection_from_file (file, NULL, @@ -452,6 +465,7 @@ test_read_wired_static (const char *file, const char *expected_id) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection != NULL, @@ -546,6 +560,13 @@ test_read_wired_static (const char *file, const char *expected_id) NM_SETTING_IP4_CONFIG_SETTING_NAME, NM_SETTING_IP4_CONFIG_METHOD); + /* Implicit may-fail */ + ASSERT (nm_setting_ip4_config_get_may_fail (s_ip4) == FALSE, + "wired-static-verify-ip6", "failed to verify %s: unexpected %s / %s key value", + file, + NM_SETTING_IP4_CONFIG_SETTING_NAME, + NM_SETTING_IP4_CONFIG_MAY_FAIL); + /* DNS Addresses */ ASSERT (nm_setting_ip4_config_get_num_dns (s_ip4) == 2, "wired-static-verify-ip4", "failed to verify %s: unexpected %s / %s key value", @@ -617,6 +638,203 @@ test_read_wired_static (const char *file, const char *expected_id) NM_SETTING_IP4_CONFIG_SETTING_NAME, NM_SETTING_IP4_CONFIG_ADDRESSES); + if (!strcmp (expected_id, "System test-wired-static")) { + /* ===== IPv6 SETTING ===== */ + + s_ip6 = NM_SETTING_IP6_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG)); + ASSERT (s_ip6 != NULL, + "wired-static-verify-ip6", "failed to verify %s: missing %s setting", + file, + NM_SETTING_IP6_CONFIG_SETTING_NAME); + + /* Method */ + tmp = nm_setting_ip6_config_get_method (s_ip6); + ASSERT (strcmp (tmp, NM_SETTING_IP6_CONFIG_METHOD_MANUAL) == 0, + "wired-static-verify-ip6", "failed to verify %s: unexpected %s / %s key value", + file, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_METHOD); + + /* Implicit may-fail */ + ASSERT (nm_setting_ip6_config_get_may_fail (s_ip6) == TRUE, + "wired-static-verify-ip6", "failed to verify %s: unexpected %s / %s key value", + file, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_MAY_FAIL); + + /* DNS Addresses */ + ASSERT (nm_setting_ip6_config_get_num_dns (s_ip6) == 2, + "wired-static-verify-ip6", "failed to verify %s: unexpected %s / %s key value", + file, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS); + + ASSERT (inet_pton (AF_INET6, expected6_dns1, &addr6) > 0, + "wired-static-verify-ip6", "failed to verify %s: couldn't convert DNS IP address #1", + file); + ASSERT (IN6_ARE_ADDR_EQUAL (nm_setting_ip6_config_get_dns (s_ip6, 0), &addr6), + "wired-static-verify-ip6", "failed to verify %s: unexpected %s / %s key value #1", + file, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS); + + ASSERT (inet_pton (AF_INET6, expected6_dns2, &addr6) > 0, + "wired-static-verify-ip6", "failed to verify %s: couldn't convert DNS IP address #2", + file); + ASSERT (IN6_ARE_ADDR_EQUAL (nm_setting_ip6_config_get_dns (s_ip6, 1), &addr6), + "wired-static-verify-ip6", "failed to verify %s: unexpected %s / %s key value #2", + file, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS); + + ASSERT (nm_setting_ip6_config_get_num_addresses (s_ip6) == 2, + "wired-static-verify-ip6", "failed to verify %s: unexpected %s / %s key value", + file, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_ADDRESSES); + + /* Address #1 */ + ip6_addr = nm_setting_ip6_config_get_address (s_ip6, 0); + ASSERT (ip6_addr, + "wired-static-verify-ip6", "failed to verify %s: missing IP6 address #1", + file); + + ASSERT (nm_ip6_address_get_prefix (ip6_addr) == 64, + "wired-static-verify-ip6", "failed to verify %s: unexpected IP6 address #1 prefix", + file); + + ASSERT (inet_pton (AF_INET6, expected6_address1, &addr6) > 0, + "wired-static-verify-ip6", "failed to verify %s: couldn't convert IP address #1", + file); + ASSERT (IN6_ARE_ADDR_EQUAL (nm_ip6_address_get_address (ip6_addr), &addr6), + "wired-static-verify-ip6", "failed to verify %s: unexpected IP6 address #1", + file); + + /* Address #2 */ + ip6_addr = nm_setting_ip6_config_get_address (s_ip6, 1); + ASSERT (ip6_addr, + "wired-static-verify-ip6", "failed to verify %s: missing IP6 address #2", + file); + + ASSERT (nm_ip6_address_get_prefix (ip6_addr) == 56, + "wired-static-verify-ip6", "failed to verify %s: unexpected IP6 address #2 prefix", + file); + + ASSERT (inet_pton (AF_INET6, expected6_address2, &addr6) > 0, + "wired-static-verify-ip6", "failed to verify %s: couldn't convert IP address #2", + file); + ASSERT (IN6_ARE_ADDR_EQUAL (nm_ip6_address_get_address (ip6_addr), &addr6), + "wired-static-verify-ip6", "failed to verify %s: unexpected IP6 address #2", + file); + } + + g_object_unref (connection); +} + +#define TEST_IFCFG_STATIC_NO_PREFIX TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-static-no-prefix" + +static void +test_read_wired_static_no_prefix (guint32 expected_prefix) +{ + NMConnection *connection; + NMSettingConnection *s_con; + NMSettingIP4Config *s_ip4; + char *unmanaged = FALSE; + char *keyfile = NULL; + char *routefile = NULL; + char *route6file = NULL; + gboolean ignore_error = FALSE; + GError *error = NULL; + NMIP4Address *ip4_addr; + char *file, *expected_id; + const char *tmp; + + file = g_strdup_printf (TEST_IFCFG_STATIC_NO_PREFIX "-%u", expected_prefix); + ASSERT (file != NULL, + "wired-static-no-prefix-read", "failed to create path to file"); + + expected_id = g_strdup_printf ("System test-wired-static-no-prefix-%u", expected_prefix); + ASSERT (expected_id != NULL, + "wired-static-no-prefix-read", "failed to expected connection ID"); + + connection = connection_from_file (file, + NULL, + TYPE_ETHERNET, + NULL, + &unmanaged, + &keyfile, + &routefile, + &route6file, + &error, + &ignore_error); + ASSERT (connection != NULL, + "wired-static-no-prefix-read", "failed to read %s: %s", file, error->message); + + ASSERT (nm_connection_verify (connection, &error), + "wired-static-no-prefix-verify", "failed to verify %s: %s", file, error->message); + + ASSERT (unmanaged == FALSE, + "wired-static-no-prefix-verify", "failed to verify %s: unexpected unmanaged value", file); + + /* ===== CONNECTION SETTING ===== */ + + s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION)); + ASSERT (s_con != NULL, + "wired-static-no-prefix-verify-connection", "failed to verify %s: missing %s setting", + file, + NM_SETTING_CONNECTION_SETTING_NAME); + + /* ID */ + tmp = nm_setting_connection_get_id (s_con); + ASSERT (tmp != NULL, + "wired-static-no-prefix-verify-connection", "failed to verify %s: missing %s / %s key", + file, + NM_SETTING_CONNECTION_SETTING_NAME, + NM_SETTING_CONNECTION_ID); + ASSERT (strcmp (tmp, expected_id) == 0, + "wired-static-no-prefix-verify-connection", "failed to verify %s: unexpected %s / %s key value", + file, + NM_SETTING_CONNECTION_SETTING_NAME, + NM_SETTING_CONNECTION_ID); + g_free (expected_id); + + /* ===== IPv4 SETTING ===== */ + + s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG)); + ASSERT (s_ip4 != NULL, + "wired-static-no-prefix-verify-ip4", "failed to verify %s: missing %s setting", + file, + NM_SETTING_IP4_CONFIG_SETTING_NAME); + + /* Method */ + tmp = nm_setting_ip4_config_get_method (s_ip4); + ASSERT (strcmp (tmp, NM_SETTING_IP4_CONFIG_METHOD_MANUAL) == 0, + "wired-static-no-prefix-verify-ip4", "failed to verify %s: unexpected %s / %s key value", + file, + NM_SETTING_IP4_CONFIG_SETTING_NAME, + NM_SETTING_IP4_CONFIG_METHOD); + + ASSERT (nm_setting_ip4_config_get_num_addresses (s_ip4) == 1, + "wired-static-no-prefix-verify-ip4", "failed to verify %s: unexpected %s / %s key value", + file, + NM_SETTING_IP4_CONFIG_SETTING_NAME, + NM_SETTING_IP4_CONFIG_DNS); + + /* Address #1 */ + ip4_addr = nm_setting_ip4_config_get_address (s_ip4, 0); + ASSERT (ip4_addr, + "wired-static-no-prefix-verify-ip4", "failed to verify %s: missing IP4 address #1", + file, + NM_SETTING_IP4_CONFIG_SETTING_NAME, + NM_SETTING_IP4_CONFIG_ADDRESSES); + + ASSERT (nm_ip4_address_get_prefix (ip4_addr) == expected_prefix, + "wired-static-no-prefix-verify-ip4", "failed to verify %s: unexpected IP4 address #1 prefix", + file, + NM_SETTING_IP4_CONFIG_SETTING_NAME, + NM_SETTING_IP4_CONFIG_ADDRESSES); + + g_free (file); g_object_unref (connection); } @@ -632,6 +850,7 @@ test_read_wired_dhcp (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; const GByteArray *array; @@ -650,6 +869,7 @@ test_read_wired_dhcp (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection != NULL, @@ -802,6 +1022,7 @@ test_read_wired_global_gateway (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; const char *tmp; @@ -818,6 +1039,7 @@ test_read_wired_global_gateway (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection != NULL, @@ -923,9 +1145,11 @@ test_read_wired_never_default (void) NMSettingConnection *s_con; NMSettingWired *s_wired; NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; const char *tmp; @@ -938,6 +1162,7 @@ test_read_wired_never_default (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection != NULL, @@ -1007,6 +1232,28 @@ test_read_wired_never_default (void) NM_SETTING_IP4_CONFIG_SETTING_NAME, NM_SETTING_IP4_CONFIG_DNS); + /* ===== IPv6 SETTING ===== */ + + s_ip6 = NM_SETTING_IP6_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG)); + ASSERT (s_ip6 != NULL, + "wired-never-default-verify-ip6", "failed to verify %s: missing %s setting", + TEST_IFCFG_WIRED_NEVER_DEFAULT, + NM_SETTING_IP6_CONFIG_SETTING_NAME); + + /* Method */ + tmp = nm_setting_ip6_config_get_method (s_ip6); + ASSERT (strcmp (tmp, NM_SETTING_IP6_CONFIG_METHOD_AUTO) == 0, + "wired-never-default-verify-ip6", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_NEVER_DEFAULT, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_METHOD); + + ASSERT (nm_setting_ip6_config_get_never_default (s_ip6) == TRUE, + "wired-never-default-verify-ip4", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_NEVER_DEFAULT, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_NEVER_DEFAULT); + g_object_unref (connection); } @@ -1019,9 +1266,11 @@ test_read_wired_defroute_no (void) NMSettingConnection *s_con; NMSettingWired *s_wired; NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; const char *tmp; @@ -1034,6 +1283,7 @@ test_read_wired_defroute_no (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection != NULL, @@ -1096,6 +1346,28 @@ test_read_wired_defroute_no (void) NM_SETTING_IP4_CONFIG_SETTING_NAME, NM_SETTING_IP4_CONFIG_NEVER_DEFAULT); + /* ===== IPv6 SETTING ===== */ + + s_ip6 = NM_SETTING_IP6_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG)); + ASSERT (s_ip6 != NULL, + "wired-defroute-no-verify-ip6", "failed to verify %s: missing %s setting", + TEST_IFCFG_WIRED_DEFROUTE_NO, + NM_SETTING_IP6_CONFIG_SETTING_NAME); + + /* Method */ + tmp = nm_setting_ip6_config_get_method (s_ip6); + ASSERT (strcmp (tmp, NM_SETTING_IP6_CONFIG_METHOD_AUTO) == 0, + "wired-defroute-no-verify-ip6", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_DEFROUTE_NO, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_METHOD); + + ASSERT (nm_setting_ip6_config_get_never_default (s_ip6) == TRUE, + "wired-defroute-no-verify-ip6", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_DEFROUTE_NO, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_NEVER_DEFAULT); + g_object_unref (connection); } @@ -1109,9 +1381,11 @@ test_read_wired_defroute_no_gatewaydev_yes (void) NMSettingConnection *s_con; NMSettingWired *s_wired; NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; const char *tmp; @@ -1124,6 +1398,7 @@ test_read_wired_defroute_no_gatewaydev_yes (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection != NULL, @@ -1194,6 +1469,28 @@ test_read_wired_defroute_no_gatewaydev_yes (void) NM_SETTING_IP4_CONFIG_SETTING_NAME, NM_SETTING_IP4_CONFIG_NEVER_DEFAULT); + /* ===== IPv6 SETTING ===== */ + + s_ip6 = NM_SETTING_IP6_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG)); + ASSERT (s_ip6 != NULL, + "wired-defroute-no-gatewaydev-yes-verify-ip6", "failed to verify %s: missing %s setting", + TEST_IFCFG_WIRED_DEFROUTE_NO_GATEWAYDEV_YES, + NM_SETTING_IP6_CONFIG_SETTING_NAME); + + /* Method */ + tmp = nm_setting_ip6_config_get_method (s_ip6); + ASSERT (strcmp (tmp, NM_SETTING_IP4_CONFIG_METHOD_AUTO) == 0, + "wired-defroute-no-gatewaydev-yes-verify-ip4", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_DEFROUTE_NO_GATEWAYDEV_YES, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_METHOD); + + ASSERT (nm_setting_ip6_config_get_never_default (s_ip6) == FALSE, + "wired-defroute-no-gatewaydev-yes-verify-ip4", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_DEFROUTE_NO_GATEWAYDEV_YES, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_NEVER_DEFAULT); + g_object_unref (connection); } @@ -1209,6 +1506,7 @@ test_read_wired_static_routes (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; const char *tmp; @@ -1227,6 +1525,7 @@ test_read_wired_static_routes (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); @@ -1355,6 +1654,7 @@ test_read_wired_static_routes (void) g_free (keyfile); g_free (routefile); + g_free (route6file); g_object_unref (connection); } @@ -1370,6 +1670,7 @@ test_read_wired_static_routes_legacy (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; const char *tmp; @@ -1390,6 +1691,7 @@ test_read_wired_static_routes_legacy (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); @@ -1557,6 +1859,463 @@ test_read_wired_static_routes_legacy (void) g_free (keyfile); g_free (routefile); + g_free (route6file); + g_object_unref (connection); +} + +#define TEST_IFCFG_WIRED_IPV6_MANUAL TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-ipv6-manual" + +static void +test_read_wired_ipv6_manual (void) +{ + NMConnection *connection; + NMSettingConnection *s_con; + NMSettingWired *s_wired; + NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; + char *unmanaged = NULL; + char *keyfile = NULL; + char *routefile = NULL; + char *route6file = NULL; + gboolean ignore_error = FALSE; + GError *error = NULL; + const char *tmp; + const char *expected_id = "System test-wired-ipv6-manual"; + const char *expected_address1 = "1001:abba::1234"; + const char *expected_address2 = "2001:abba::2234"; + const char *expected_address3 = "3001:abba::3234"; + guint32 expected_prefix1 = 56; + guint32 expected_prefix2 = 64; + guint32 expected_prefix3 = 96; + const char *expected_route1_dest = "9876::1234"; + guint32 expected_route1_prefix = 96; + const char *expected_route1_nexthop = "9876::7777"; + guint32 expected_route1_metric = 2; + const char *expected_dns1 = "1:2:3:4::a"; + const char *expected_dns2 = "1:2:3:4::b"; + NMIP6Address *ip6_addr; + NMIP6Route *ip6_route; + struct in6_addr addr; + + connection = connection_from_file (TEST_IFCFG_WIRED_IPV6_MANUAL, + NULL, + TYPE_ETHERNET, + NULL, + &unmanaged, + &keyfile, + &routefile, + &route6file, + &error, + &ignore_error); + ASSERT (connection != NULL, + "wired-ipv6-manual-read", "failed to read %s: %s", TEST_IFCFG_WIRED_IPV6_MANUAL, error->message); + + ASSERT (nm_connection_verify (connection, &error), + "wired-ipv6-manual-verify", "failed to verify %s: %s", TEST_IFCFG_WIRED_IPV6_MANUAL, error->message); + + ASSERT (unmanaged == FALSE, + "wired-ipv6-manual-verify", "failed to verify %s: unexpected unmanaged value", TEST_IFCFG_WIRED_IPV6_MANUAL); + + /* ===== CONNECTION SETTING ===== */ + + s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION)); + ASSERT (s_con != NULL, + "wired-ipv6-manual-verify-connection", "failed to verify %s: missing %s setting", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_CONNECTION_SETTING_NAME); + + /* ID */ + tmp = nm_setting_connection_get_id (s_con); + ASSERT (tmp != NULL, + "wired-ipv6-manual-verify-connection", "failed to verify %s: missing %s / %s key", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_CONNECTION_SETTING_NAME, + NM_SETTING_CONNECTION_ID); + ASSERT (strcmp (tmp, expected_id) == 0, + "wired-ipv6-manual-verify-connection", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_CONNECTION_SETTING_NAME, + NM_SETTING_CONNECTION_ID); + + /* ===== WIRED SETTING ===== */ + + s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED)); + ASSERT (s_wired != NULL, + "wired-ipv6-manual-verify-wired", "failed to verify %s: missing %s setting", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_WIRED_SETTING_NAME); + + /* ===== IPv4 SETTING ===== */ + + s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG)); + ASSERT (s_ip4 != NULL, + "wired-ipv6-manual-verify-ip4", "failed to verify %s: missing %s setting", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP4_CONFIG_SETTING_NAME); + + /* DNS Addresses */ + ASSERT (nm_setting_ip4_config_get_num_dns (s_ip4) == 2, + "wired-ipv6-manual-verify-ip4", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP4_CONFIG_SETTING_NAME, + NM_SETTING_IP4_CONFIG_DNS); + + /* DNS search domains */ + ASSERT (nm_setting_ip4_config_get_num_dns_searches (s_ip4) == 3, + "wired-ipv6-manual-verify-ip4", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP4_CONFIG_SETTING_NAME, + NM_SETTING_IP4_CONFIG_DNS); + + tmp = nm_setting_ip4_config_get_dns_search (s_ip4, 0); + ASSERT (tmp != NULL, + "wired-ipv6-manual-verify-ip4", "failed to verify %s: missing %s / %s key", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP4_CONFIG_SETTING_NAME, + NM_SETTING_IP4_CONFIG_DNS_SEARCH); + ASSERT (strcmp (tmp, "lorem.com") == 0, + "wired-ipv6-manual-verify-ip4", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP4_CONFIG_SETTING_NAME, + NM_SETTING_IP4_CONFIG_DNS_SEARCH); + + tmp = nm_setting_ip4_config_get_dns_search (s_ip4, 1); + ASSERT (tmp != NULL, + "wired-ipv6-manual-verify-ip4", "failed to verify %s: missing %s / %s key", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP4_CONFIG_SETTING_NAME, + NM_SETTING_IP4_CONFIG_DNS_SEARCH); + ASSERT (strcmp (tmp, "ipsum.org") == 0, + "wired-ipv6-manual-verify-ip4", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP4_CONFIG_SETTING_NAME, + NM_SETTING_IP4_CONFIG_DNS_SEARCH); + + tmp = nm_setting_ip4_config_get_dns_search (s_ip4, 2); + ASSERT (tmp != NULL, + "wired-ipv6-manual-verify-ip4", "failed to verify %s: missing %s / %s key", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP4_CONFIG_SETTING_NAME, + NM_SETTING_IP4_CONFIG_DNS_SEARCH); + ASSERT (strcmp (tmp, "dolor.edu") == 0, + "wired-ipv6-manual-verify-ip4", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP4_CONFIG_SETTING_NAME, + NM_SETTING_IP4_CONFIG_DNS_SEARCH); + + /* ===== IPv6 SETTING ===== */ + + s_ip6 = NM_SETTING_IP6_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG)); + ASSERT (s_ip6 != NULL, + "wired-ipv6-manual-verify-ip6", "failed to verify %s: missing %s setting", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP6_CONFIG_SETTING_NAME); + + /* Method */ + tmp = nm_setting_ip6_config_get_method (s_ip6); + ASSERT (strcmp (tmp, NM_SETTING_IP6_CONFIG_METHOD_MANUAL) == 0, + "wired-ipv6-manual-verify-ip6", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_METHOD); + + ASSERT (nm_setting_ip6_config_get_never_default (s_ip6) == FALSE, + "wired-ipv6-manual-verify-ip6", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_NEVER_DEFAULT); + + ASSERT (nm_setting_ip6_config_get_may_fail (s_ip6) == TRUE, + "wired-ipv6-manual-verify-ip6", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_MAY_FAIL); + + /* IP addresses */ + ASSERT (nm_setting_ip6_config_get_num_addresses (s_ip6) == 3, + "wired-ipv6-manual-verify-ip6", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_ADDRESSES); + + /* Address #1 */ + ip6_addr = nm_setting_ip6_config_get_address (s_ip6, 0); + ASSERT (ip6_addr, + "wired-ipv6-manual-verify-ip6", "failed to verify %s: missing IP6 address #1", + TEST_IFCFG_WIRED_IPV6_MANUAL); + + ASSERT (nm_ip6_address_get_prefix (ip6_addr) == expected_prefix1, + "wired-ipv6-manual-verify-ip6", "failed to verify %s: unexpected IP6 address #1 prefix", + TEST_IFCFG_WIRED_IPV6_MANUAL); + + ASSERT (inet_pton (AF_INET6, expected_address1, &addr) > 0, + "wired-ipv6-manual-verify-ip6", "failed to verify %s: couldn't convert IP address #1", + TEST_IFCFG_WIRED_IPV6_MANUAL); + ASSERT (IN6_ARE_ADDR_EQUAL (nm_ip6_address_get_address (ip6_addr), &addr), + "wired-ipv6-manual-verify-ip6", "failed to verify %s: unexpected IP6 address #1", + TEST_IFCFG_WIRED_IPV6_MANUAL); + + /* Address #2 */ + ip6_addr = nm_setting_ip6_config_get_address (s_ip6, 1); + ASSERT (ip6_addr, + "wired-ipv6-manual-verify-ip6", "failed to verify %s: missing IP6 address #2", + TEST_IFCFG_WIRED_IPV6_MANUAL); + + ASSERT (nm_ip6_address_get_prefix (ip6_addr) == expected_prefix2, + "wired-ipv6-manual-verify-ip6", "failed to verify %s: unexpected IP6 address #2 prefix", + TEST_IFCFG_WIRED_IPV6_MANUAL); + + ASSERT (inet_pton (AF_INET6, expected_address2, &addr) > 0, + "wired-ipv6-manual-verify-ip6", "failed to verify %s: couldn't convert IP address #2", + TEST_IFCFG_WIRED_IPV6_MANUAL); + ASSERT (IN6_ARE_ADDR_EQUAL (nm_ip6_address_get_address (ip6_addr), &addr), + "wired-ipv6-manual-verify-ip6", "failed to verify %s: unexpected IP6 address #2", + TEST_IFCFG_WIRED_IPV6_MANUAL); + + /* Address #3 */ + ip6_addr = nm_setting_ip6_config_get_address (s_ip6, 2); + ASSERT (ip6_addr, + "wired-ipv6-manual-verify-ip6", "failed to verify %s: missing IP6 address #3", + TEST_IFCFG_WIRED_IPV6_MANUAL); + + ASSERT (nm_ip6_address_get_prefix (ip6_addr) == expected_prefix3, + "wired-ipv6-manual-verify-ip6", "failed to verify %s: unexpected IP6 address #3 prefix", + TEST_IFCFG_WIRED_IPV6_MANUAL); + + ASSERT (inet_pton (AF_INET6, expected_address3, &addr) > 0, + "wired-ipv6-manual-verify-ip6", "failed to verify %s: couldn't convert IP address #3", + TEST_IFCFG_WIRED_IPV6_MANUAL); + ASSERT (IN6_ARE_ADDR_EQUAL (nm_ip6_address_get_address (ip6_addr), &addr), + "wired-ipv6-manual-verify-ip6", "failed to verify %s: unexpected IP6 address #3", + TEST_IFCFG_WIRED_IPV6_MANUAL); + + /* Routes */ + ASSERT (nm_setting_ip6_config_get_num_routes (s_ip6) == 1, + "wired-ipv6-manual-verify-ip6", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_ROUTES); + + /* Route #1 */ + ip6_route = nm_setting_ip6_config_get_route (s_ip6, 0); + ASSERT (ip6_route, + "wired-ipv6-manual-verify-ip6", "failed to verify %s: missing IP6 route #1", + TEST_IFCFG_WIRED_IPV6_MANUAL); + + ASSERT (inet_pton (AF_INET6, expected_route1_dest, &addr) > 0, + "wired-ipv6-manual-verify-ip6", "failed to verify %s: couldn't convert IP route dest #1", + TEST_IFCFG_WIRED_IPV6_MANUAL); + ASSERT (IN6_ARE_ADDR_EQUAL (nm_ip6_route_get_dest (ip6_route), &addr), + "wired-ipv6-manual-verify-ip6", "failed to verify %s: unexpected IP6 route dest #1", + TEST_IFCFG_WIRED_IPV6_MANUAL); + + ASSERT (nm_ip6_route_get_prefix (ip6_route) == expected_route1_prefix, + "wired-ipv6-manual-verify-ip6", "failed to verify %s: unexpected IP6 route #1 prefix", + TEST_IFCFG_WIRED_IPV6_MANUAL); + + ASSERT (inet_pton (AF_INET6, expected_route1_nexthop, &addr) > 0, + "wired-ipv6-manual-verify-ip6", "failed to verify %s: couldn't convert IP route next_hop #1", + TEST_IFCFG_WIRED_IPV6_MANUAL); + ASSERT (IN6_ARE_ADDR_EQUAL (nm_ip6_route_get_next_hop (ip6_route), &addr), + "wired-ipv6-manual-verify-ip6", "failed to verify %s: unexpected IP6 route next hop #1", + TEST_IFCFG_WIRED_IPV6_MANUAL); + + ASSERT (nm_ip6_route_get_metric (ip6_route) == expected_route1_metric, + "wired-ipv6-manual-verify-ip6", "failed to verify %s: unexpected IP6 route #1 metric", + TEST_IFCFG_WIRED_IPV6_MANUAL); + + /* DNS Addresses */ + ASSERT (nm_setting_ip6_config_get_num_dns (s_ip6) == 2, + "wired-ipv6-manual-verify-ip6", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS); + + ASSERT (inet_pton (AF_INET6, expected_dns1, &addr) > 0, + "wired-ipv6-manual-verify-ip6", "failed to verify %s: couldn't convert DNS IP address #1", + TEST_IFCFG_WIRED_IPV6_MANUAL); + ASSERT (IN6_ARE_ADDR_EQUAL (nm_setting_ip6_config_get_dns (s_ip6, 0), &addr), + "wired-ipv6-manual-verify-ip6", "failed to verify %s: unexpected %s / %s key value #1", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS); + + ASSERT (inet_pton (AF_INET6, expected_dns2, &addr) > 0, + "wired-ipv6-manual-verify-ip6", "failed to verify %s: couldn't convert DNS IP address #2", + TEST_IFCFG_WIRED_IPV6_MANUAL); + ASSERT (IN6_ARE_ADDR_EQUAL (nm_setting_ip6_config_get_dns (s_ip6, 1), &addr), + "wired-ipv6-manual-verify-ip6", "failed to verify %s: unexpected %s / %s key value #2", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS); + + /* DNS domains - none as domains are stuffed to 'ipv4' setting */ + ASSERT (nm_setting_ip6_config_get_num_dns_searches (s_ip6) == 0, + "wired-ipv6-manual-verify-ip6", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS); + + g_free (keyfile); + g_free (routefile); + g_free (route6file); + g_object_unref (connection); +} + +#define TEST_IFCFG_WIRED_IPV6_ONLY TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-ipv6-only" + +static void +test_read_wired_ipv6_only (void) +{ + NMConnection *connection; + NMSettingConnection *s_con; + NMSettingWired *s_wired; + NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; + char *unmanaged = NULL; + char *keyfile = NULL; + char *routefile = NULL; + char *route6file = NULL; + gboolean ignore_error = FALSE; + GError *error = NULL; + const char *tmp; + const char *expected_id = "System test-wired-ipv6-only"; + const char *expected_address1 = "1001:abba::1234"; + guint32 expected_prefix1 = 56; + const char *expected_dns1 = "1:2:3:4::a"; + NMIP6Address *ip6_addr; + struct in6_addr addr; + const char *method; + + connection = connection_from_file (TEST_IFCFG_WIRED_IPV6_ONLY, + NULL, + TYPE_ETHERNET, + NULL, + &unmanaged, + &keyfile, + &routefile, + &route6file, + &error, + &ignore_error); + ASSERT (connection != NULL, + "wired-ipv6-only-read", "failed to read %s: %s", TEST_IFCFG_WIRED_IPV6_ONLY, error->message); + + ASSERT (nm_connection_verify (connection, &error), + "wired-ipv6-only-verify", "failed to verify %s: %s", TEST_IFCFG_WIRED_IPV6_ONLY, error->message); + + ASSERT (unmanaged == FALSE, + "wired-ipv6-only-verify", "failed to verify %s: unexpected unmanaged value", TEST_IFCFG_WIRED_IPV6_MANUAL); + + /* ===== CONNECTION SETTING ===== */ + + s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION)); + ASSERT (s_con != NULL, + "wired-ipv6-only-verify-connection", "failed to verify %s: missing %s setting", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_CONNECTION_SETTING_NAME); + + /* ID */ + tmp = nm_setting_connection_get_id (s_con); + ASSERT (tmp != NULL, + "wired-ipv6-only-verify-connection", "failed to verify %s: missing %s / %s key", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_CONNECTION_SETTING_NAME, + NM_SETTING_CONNECTION_ID); + ASSERT (strcmp (tmp, expected_id) == 0, + "wired-ipv6-only-verify-connection", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_CONNECTION_SETTING_NAME, + NM_SETTING_CONNECTION_ID); + + /* ===== WIRED SETTING ===== */ + + s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED)); + ASSERT (s_wired != NULL, + "wired-ipv6-only-verify-wired", "failed to verify %s: missing %s setting", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_WIRED_SETTING_NAME); + + /* ===== IPv4 SETTING ===== */ + + s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG)); + ASSERT (s_ip4 != NULL, + "wired-ipv6-only-verify-ip4", "failed to verify %s: missing %s setting", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP4_CONFIG_SETTING_NAME); + + method = nm_setting_ip4_config_get_method (s_ip4); + ASSERT (strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED) == 0, + "wired-ipv6-only-verify-ip4", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP4_CONFIG_SETTING_NAME, + NM_SETTING_IP4_CONFIG_METHOD); + + /* ===== IPv6 SETTING ===== */ + + s_ip6 = NM_SETTING_IP6_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG)); + ASSERT (s_ip6 != NULL, + "wired-ipv6-only-verify-ip6", "failed to verify %s: missing %s setting", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP6_CONFIG_SETTING_NAME); + + /* Method */ + tmp = nm_setting_ip6_config_get_method (s_ip6); + ASSERT (strcmp (tmp, NM_SETTING_IP6_CONFIG_METHOD_MANUAL) == 0, + "wired-ipv6-only-verify-ip6", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_METHOD); + + /* IP addresses */ + ASSERT (nm_setting_ip6_config_get_num_addresses (s_ip6) == 1, + "wired-ipv6-only-verify-ip6", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_ADDRESSES); + + /* Address #1 */ + ip6_addr = nm_setting_ip6_config_get_address (s_ip6, 0); + ASSERT (ip6_addr, + "wired-ipv6-only-verify-ip6", "failed to verify %s: missing IP6 address #1", + TEST_IFCFG_WIRED_IPV6_MANUAL); + + ASSERT (nm_ip6_address_get_prefix (ip6_addr) == expected_prefix1, + "wired-ipv6-only-verify-ip6", "failed to verify %s: unexpected IP6 address #1 prefix", + TEST_IFCFG_WIRED_IPV6_MANUAL); + + ASSERT (inet_pton (AF_INET6, expected_address1, &addr) > 0, + "wired-ipv6-only-verify-ip6", "failed to verify %s: couldn't convert IP address #1", + TEST_IFCFG_WIRED_IPV6_MANUAL); + ASSERT (IN6_ARE_ADDR_EQUAL (nm_ip6_address_get_address (ip6_addr), &addr), + "wired-ipv6-only-verify-ip6", "failed to verify %s: unexpected IP6 address #1", + TEST_IFCFG_WIRED_IPV6_MANUAL); + + /* DNS Addresses */ + ASSERT (nm_setting_ip6_config_get_num_dns (s_ip6) == 1, + "wired-ipv6-only-verify-ip6", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS); + + ASSERT (inet_pton (AF_INET6, expected_dns1, &addr) > 0, + "wired-ipv6-only-verify-ip6", "failed to verify %s: couldn't convert DNS IP address #1", + TEST_IFCFG_WIRED_IPV6_MANUAL); + ASSERT (IN6_ARE_ADDR_EQUAL (nm_setting_ip6_config_get_dns (s_ip6, 0), &addr), + "wired-ipv6-only-verify-ip6", "failed to verify %s: unexpected %s / %s key value #1", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS); + + /* DNS domains - none as domains are stuffed to 'ipv4' setting */ + ASSERT (nm_setting_ip6_config_get_num_dns_searches (s_ip6) == 0, + "wired-ipv6-only-verify-ip6", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS); + + g_free (keyfile); + g_free (routefile); + g_free (route6file); g_object_unref (connection); } @@ -1570,6 +2329,7 @@ test_read_onboot_no (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; @@ -1580,6 +2340,7 @@ test_read_onboot_no (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection != NULL, @@ -1623,6 +2384,7 @@ test_read_wired_8021x_peap_mschapv2 (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; const char *tmp; @@ -1639,6 +2401,7 @@ test_read_wired_8021x_peap_mschapv2 (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection != NULL, @@ -1805,6 +2568,7 @@ test_read_wifi_open (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; const char *tmp; @@ -1823,6 +2587,7 @@ test_read_wifi_open (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection != NULL, @@ -1980,6 +2745,7 @@ test_read_wifi_open_auto (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; const char *tmp; @@ -1993,6 +2759,7 @@ test_read_wifi_open_auto (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection != NULL, @@ -2056,6 +2823,7 @@ test_read_wifi_open_ssid_hex (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; const char *tmp; @@ -2070,6 +2838,7 @@ test_read_wifi_open_ssid_hex (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection != NULL, @@ -2135,6 +2904,7 @@ test_read_wifi_open_ssid_bad (const char *file, const char *test) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; @@ -2145,6 +2915,7 @@ test_read_wifi_open_ssid_bad (const char *file, const char *test) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection == NULL, test, "unexpected success reading %s", file); @@ -2162,6 +2933,7 @@ test_read_wifi_open_ssid_quoted (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; const char *tmp; @@ -2176,6 +2948,7 @@ test_read_wifi_open_ssid_quoted (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection != NULL, @@ -2247,6 +3020,7 @@ test_read_wifi_wep (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; const char *tmp; @@ -2258,6 +3032,7 @@ test_read_wifi_wep (void) const char *expected_mode = "infrastructure"; const guint32 expected_channel = 1; const char *expected_wep_key0 = "0123456789abcdef0123456789"; + NMWepKeyType key_type; connection = connection_from_file (TEST_IFCFG_WIFI_WEP, NULL, @@ -2266,6 +3041,7 @@ test_read_wifi_wep (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection != NULL, @@ -2428,6 +3204,13 @@ test_read_wifi_wep (void) NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NM_SETTING_WIRELESS_SECURITY_WEP_TX_KEYIDX); + /* WEP key type */ + key_type = nm_setting_wireless_security_get_wep_key_type (s_wsec); + ASSERT (key_type == NM_WEP_KEY_TYPE_UNKNOWN || key_type == NM_WEP_KEY_TYPE_KEY, + "wifi-wep-verify-wireless", "failed to verify %s: unexpected WEP key type %d", + TEST_IFCFG_WIFI_WEP, + key_type); + /* WEP key index 0 */ tmp = nm_setting_wireless_security_get_wep_key (s_wsec, 0); ASSERT (tmp != NULL, @@ -2510,6 +3293,7 @@ test_read_wifi_wep_adhoc (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; const char *tmp; @@ -2529,6 +3313,7 @@ test_read_wifi_wep_adhoc (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection != NULL, @@ -2759,6 +3544,142 @@ test_read_wifi_wep_adhoc (void) g_object_unref (connection); } +#define TEST_IFCFG_WIFI_WEP_PASSPHRASE TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wifi-wep-passphrase" + +static void +test_read_wifi_wep_passphrase (void) +{ + NMConnection *connection; + NMSettingConnection *s_con; + NMSettingWireless *s_wireless; + NMSettingWirelessSecurity *s_wsec; + char *unmanaged = NULL; + char *keyfile = NULL; + char *routefile = NULL; + char *route6file = NULL; + gboolean ignore_error = FALSE; + GError *error = NULL; + const char *tmp; + const char *expected_wep_key0 = "foobar222blahblah"; + NMWepKeyType key_type; + + connection = connection_from_file (TEST_IFCFG_WIFI_WEP_PASSPHRASE, + NULL, + TYPE_WIRELESS, + NULL, + &unmanaged, + &keyfile, + &routefile, + &route6file, + &error, + &ignore_error); + ASSERT (connection != NULL, + "wifi-wep-passphrase-read", "failed to read %s: %s", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, error->message); + + ASSERT (nm_connection_verify (connection, &error), + "wifi-wep-passphrase-verify", "failed to verify %s: %s", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, error->message); + + /* ===== CONNECTION SETTING ===== */ + + s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION)); + ASSERT (s_con != NULL, + "wifi-wep-passphrase-verify-connection", "failed to verify %s: missing %s setting", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, + NM_SETTING_CONNECTION_SETTING_NAME); + + /* ===== WIRELESS SETTING ===== */ + + s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS)); + ASSERT (s_wireless != NULL, + "wifi-wep-passphrase-verify-wireless", "failed to verify %s: missing %s setting", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, + NM_SETTING_WIRELESS_SETTING_NAME); + + /* Security */ + tmp = nm_setting_wireless_get_security (s_wireless); + ASSERT (tmp != NULL, + "wifi-wep-passphrase-verify-wireless", "failed to verify %s: missing %s / %s key", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, + NM_SETTING_WIRELESS_SETTING_NAME, + NM_SETTING_WIRELESS_SEC); + ASSERT (strcmp (tmp, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME) == 0, + "wifi-wep-passphrase-verify-wireless", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, + NM_SETTING_WIRELESS_SETTING_NAME, + NM_SETTING_WIRELESS_SEC); + + + /* ===== WIRELESS SECURITY SETTING ===== */ + + s_wsec = NM_SETTING_WIRELESS_SECURITY (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY)); + ASSERT (s_wsec != NULL, + "wifi-wep-passphrase-verify-wireless", "failed to verify %s: missing %s setting", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, + NM_SETTING_WIRELESS_SECURITY_SETTING_NAME); + + /* Key management */ + ASSERT (strcmp (nm_setting_wireless_security_get_key_mgmt (s_wsec), "none") == 0, + "wifi-wep-passphrase-verify-wireless", "failed to verify %s: missing %s / %s key", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, + NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, + NM_SETTING_WIRELESS_SECURITY_KEY_MGMT); + + /* WEP key index */ + ASSERT (nm_setting_wireless_security_get_wep_tx_keyidx (s_wsec) == 0, + "wifi-wep-passphrase-verify-wireless", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, + NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, + NM_SETTING_WIRELESS_SECURITY_WEP_TX_KEYIDX); + + /* WEP key type */ + key_type = nm_setting_wireless_security_get_wep_key_type (s_wsec); + ASSERT (key_type == NM_WEP_KEY_TYPE_PASSPHRASE, + "wifi-wep-passphrase-verify-wireless", "failed to verify %s: unexpected WEP key type %d", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, + key_type); + + /* WEP key index 0 */ + tmp = nm_setting_wireless_security_get_wep_key (s_wsec, 0); + ASSERT (tmp != NULL, + "wifi-wep-passphrase-verify-wireless", "failed to verify %s: missing %s / %s key", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, + NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, + NM_SETTING_WIRELESS_SECURITY_WEP_KEY0); + ASSERT (strcmp (tmp, expected_wep_key0) == 0, + "wifi-wep-passphrase-verify-wireless", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, + NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, + NM_SETTING_WIRELESS_SECURITY_WEP_KEY0); + + /* WEP key index 1 */ + tmp = nm_setting_wireless_security_get_wep_key (s_wsec, 1); + ASSERT (tmp == NULL, + "wifi-wep-passphrase-verify-wireless", "failed to verify %s: unexpected %s / %s key", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, + NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, + NM_SETTING_WIRELESS_SECURITY_WEP_KEY1); + + /* WEP key index 2 */ + tmp = nm_setting_wireless_security_get_wep_key (s_wsec, 2); + ASSERT (tmp == NULL, + "wifi-wep-passphrase-verify-wireless", "failed to verify %s: unexpected %s / %s key", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, + NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, + NM_SETTING_WIRELESS_SECURITY_WEP_KEY2); + + /* WEP key index 3 */ + tmp = nm_setting_wireless_security_get_wep_key (s_wsec, 3); + ASSERT (tmp == NULL, + "wifi-wep-passphrase-verify-wireless", "failed to verify %s: unexpected %s / %s key", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, + NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, + NM_SETTING_WIRELESS_SECURITY_WEP_KEY3); + + g_object_unref (connection); +} + #define TEST_IFCFG_WIFI_LEAP TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wifi-leap" static void @@ -2771,6 +3692,7 @@ test_read_wifi_leap (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; const char *tmp; @@ -2785,6 +3707,7 @@ test_read_wifi_leap (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection != NULL, @@ -2906,6 +3829,7 @@ test_read_wifi_wpa_psk (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; const char *tmp; @@ -2935,6 +3859,7 @@ test_read_wifi_wpa_psk (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection != NULL, @@ -3218,6 +4143,7 @@ test_read_wifi_wpa_psk_unquoted (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; const char *tmp; @@ -3231,6 +4157,7 @@ test_read_wifi_wpa_psk_unquoted (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection != NULL, @@ -3314,6 +4241,7 @@ test_read_wifi_wpa_psk_unquoted2 (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; @@ -3328,6 +4256,7 @@ test_read_wifi_wpa_psk_unquoted2 (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection == NULL, @@ -3348,6 +4277,7 @@ test_read_wifi_wpa_psk_adhoc (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; const char *tmp; @@ -3365,6 +4295,7 @@ test_read_wifi_wpa_psk_adhoc (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection != NULL, @@ -3534,6 +4465,7 @@ test_read_wifi_wpa_psk_hex (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; const char *tmp; @@ -3550,6 +4482,7 @@ test_read_wifi_wpa_psk_hex (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection != NULL, @@ -3686,6 +4619,7 @@ test_read_wifi_wpa_eap_tls (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; const char *tmp, *password; @@ -3699,6 +4633,7 @@ test_read_wifi_wpa_eap_tls (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection != NULL, @@ -3830,6 +4765,7 @@ test_read_wifi_wpa_eap_ttls_tls (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; const char *tmp, *password; @@ -3843,6 +4779,7 @@ test_read_wifi_wpa_eap_ttls_tls (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection != NULL, @@ -3996,6 +4933,7 @@ test_read_wifi_wep_eap_ttls_chap (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; const char *tmp; @@ -4010,6 +4948,7 @@ test_read_wifi_wep_eap_ttls_chap (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection != NULL, @@ -4148,7 +5087,8 @@ test_write_wired_static (void) NMConnection *reread; NMSettingConnection *s_con; NMSettingWired *s_wired; - NMSettingIP4Config *s_ip4; + NMSettingIP4Config *s_ip4, *reread_s_ip4; + NMSettingIP6Config *s_ip6, *reread_s_ip6; static unsigned char tmpmac[] = { 0x31, 0x33, 0x33, 0x37, 0xbe, 0xcd }; GByteArray *mac; guint32 mtu = 1492; @@ -4162,15 +5102,35 @@ test_write_wired_static (void) const guint32 prefix = 24; const char *dns_search1 = "foobar.com"; const char *dns_search2 = "lab.foobar.com"; + const char *dns_search3 = "foobar6.com"; + const char *dns_search4 = "lab6.foobar.com"; + struct in6_addr ip6, ip6_1, ip6_2; + struct in6_addr route1_dest, route2_dest, route1_nexthop, route2_nexthop; + struct in6_addr dns6_1, dns6_2; + const guint32 route1_prefix = 64, route2_prefix = 0; + const guint32 route1_metric = 99, route2_metric = 1; NMIP4Address *addr; + NMIP6Address *addr6; + NMIP6Route *route6; gboolean success; GError *error = NULL; char *testfile = NULL; char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; + inet_pton (AF_INET6, "1003:1234:abcd::1", &ip6); + inet_pton (AF_INET6, "2003:1234:abcd::2", &ip6_1); + inet_pton (AF_INET6, "3003:1234:abcd::3", &ip6_2); + inet_pton (AF_INET6, "2222:aaaa:bbbb:cccc::", &route1_dest); + inet_pton (AF_INET6, "2222:aaaa:bbbb:cccc:dddd:eeee:5555:6666", &route1_nexthop); + inet_pton (AF_INET6, "::", &route2_dest); + inet_pton (AF_INET6, "2222:aaaa::9999", &route2_nexthop); + inet_pton (AF_INET6, "fade:0102:0103::face", &dns6_1); + inet_pton (AF_INET6, "cafe:ffff:eeee:dddd:cccc:bbbb:aaaa:feed", &dns6_2); + connection = nm_connection_new (); ASSERT (connection != NULL, "wired-static-write", "failed to allocate new connection"); @@ -4217,6 +5177,7 @@ test_write_wired_static (void) g_object_set (s_ip4, NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_MANUAL, + NM_SETTING_IP4_CONFIG_MAY_FAIL, TRUE, NULL); addr = nm_ip4_address_new (); @@ -4239,6 +5200,62 @@ test_write_wired_static (void) nm_setting_ip4_config_add_dns_search (s_ip4, dns_search1); nm_setting_ip4_config_add_dns_search (s_ip4, dns_search2); + /* IP6 setting */ + s_ip6 = (NMSettingIP6Config *) nm_setting_ip6_config_new (); + ASSERT (s_ip6 != NULL, + "wired-static-write", "failed to allocate new %s setting", + NM_SETTING_IP6_CONFIG_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_ip6)); + + g_object_set (s_ip6, + NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_MANUAL, + NM_SETTING_IP6_CONFIG_MAY_FAIL, TRUE, + NULL); + + /* Add addresses */ + addr6 = nm_ip6_address_new (); + nm_ip6_address_set_address (addr6, &ip6); + nm_ip6_address_set_prefix (addr6, 11); + nm_setting_ip6_config_add_address (s_ip6, addr6); + nm_ip6_address_unref (addr6); + + addr6 = nm_ip6_address_new (); + nm_ip6_address_set_address (addr6, &ip6_1); + nm_ip6_address_set_prefix (addr6, 22); + nm_setting_ip6_config_add_address (s_ip6, addr6); + nm_ip6_address_unref (addr6); + + addr6 = nm_ip6_address_new (); + nm_ip6_address_set_address (addr6, &ip6_2); + nm_ip6_address_set_prefix (addr6, 33); + nm_setting_ip6_config_add_address (s_ip6, addr6); + nm_ip6_address_unref (addr6); + + /* Add routes */ + route6 = nm_ip6_route_new (); + nm_ip6_route_set_dest (route6, &route1_dest); + nm_ip6_route_set_prefix (route6, route1_prefix); + nm_ip6_route_set_next_hop (route6, &route1_nexthop); + nm_ip6_route_set_metric (route6, route1_metric); + nm_setting_ip6_config_add_route (s_ip6, route6); + nm_ip6_route_unref (route6); + + route6 = nm_ip6_route_new (); + nm_ip6_route_set_dest (route6, &route2_dest); + nm_ip6_route_set_prefix (route6, route2_prefix); + nm_ip6_route_set_next_hop (route6, &route2_nexthop); + nm_ip6_route_set_metric (route6, route2_metric); + nm_setting_ip6_config_add_route (s_ip6, route6); + nm_ip6_route_unref (route6); + + /* DNS servers */ + nm_setting_ip6_config_add_dns (s_ip6, &dns6_1); + nm_setting_ip6_config_add_dns (s_ip6, &dns6_2); + + /* DNS domains */ + nm_setting_ip6_config_add_dns_search (s_ip6, dns_search3); + nm_setting_ip6_config_add_dns_search (s_ip6, dns_search4); + ASSERT (nm_connection_verify (connection, &error) == TRUE, "wired-static-write", "failed to verify connection: %s", (error && error->message) ? error->message : "(unknown)"); @@ -4263,6 +5280,7 @@ test_write_wired_static (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); unlink (testfile); @@ -4273,10 +5291,27 @@ test_write_wired_static (void) ASSERT (nm_connection_verify (reread, &error), "wired-static-write-reread-verify", "failed to verify %s: %s", testfile, error->message); + /* FIXME: currently DNS domains from IPv6 setting are stored in 'DOMAIN' key in ifcfg-file + * However after re-reading they are dropped into IPv4 setting. + * So, in order to comparison succeeded, move DNS domains back to IPv6 setting. + */ + reread_s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (reread, NM_TYPE_SETTING_IP4_CONFIG)); + reread_s_ip6 = NM_SETTING_IP6_CONFIG (nm_connection_get_setting (reread, NM_TYPE_SETTING_IP6_CONFIG)); + nm_setting_ip6_config_add_dns_search (reread_s_ip6, nm_setting_ip4_config_get_dns_search (reread_s_ip4, 2)); + nm_setting_ip6_config_add_dns_search (reread_s_ip6, nm_setting_ip4_config_get_dns_search (reread_s_ip4, 3)); + nm_setting_ip4_config_remove_dns_search (reread_s_ip4, 3); + nm_setting_ip4_config_remove_dns_search (reread_s_ip4, 2); + ASSERT (nm_connection_compare (connection, reread, NM_SETTING_COMPARE_FLAG_EXACT) == TRUE, "wired-static-write", "written and re-read connection weren't the same."); + if (route6file) + unlink (route6file); + g_free (testfile); + g_free (keyfile); + g_free (routefile); + g_free (route6file); g_object_unref (connection); g_object_unref (reread); } @@ -4289,6 +5324,7 @@ test_write_wired_dhcp (void) NMSettingConnection *s_con; NMSettingWired *s_wired; NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; char *uuid; gboolean success; GError *error = NULL; @@ -4296,6 +5332,7 @@ test_write_wired_dhcp (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; connection = nm_connection_new (); @@ -4344,6 +5381,17 @@ test_write_wired_dhcp (void) "wired-dhcp-write", "failed to verify connection: %s", (error && error->message) ? error->message : "(unknown)"); + /* IP6 setting */ + s_ip6 = (NMSettingIP6Config *) nm_setting_ip6_config_new (); + ASSERT (s_ip6 != NULL, + "wired-dhcp-write", "failed to allocate new %s setting", + NM_SETTING_IP6_CONFIG_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_ip6)); + + g_object_set (s_ip6, + NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_IGNORE, + NULL); + /* Save the ifcfg */ success = writer_new_connection (connection, TEST_SCRATCH_DIR "/network-scripts/", @@ -4364,6 +5412,7 @@ test_write_wired_dhcp (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); unlink (testfile); @@ -4382,6 +5431,149 @@ test_write_wired_dhcp (void) g_object_unref (reread); } +static void +test_write_wired_static_ip6_only (void) +{ + NMConnection *connection; + NMConnection *reread; + NMSettingConnection *s_con; + NMSettingWired *s_wired; + NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; + static unsigned char tmpmac[] = { 0x31, 0x33, 0x33, 0x37, 0xbe, 0xcd }; + GByteArray *mac; + char *uuid; + guint64 timestamp = 0x12344433L; + struct in6_addr ip6; + struct in6_addr dns6; + NMIP6Address *addr6; + gboolean success; + GError *error = NULL; + char *testfile = NULL; + char *unmanaged = NULL; + char *keyfile = NULL; + char *routefile = NULL; + char *route6file = NULL; + gboolean ignore_error = FALSE; + + inet_pton (AF_INET6, "1003:1234:abcd::1", &ip6); + inet_pton (AF_INET6, "fade:0102:0103::face", &dns6); + + connection = nm_connection_new (); + ASSERT (connection != NULL, + "wired-static-ip6-only-write", "failed to allocate new connection"); + + /* Connection setting */ + s_con = (NMSettingConnection *) nm_setting_connection_new (); + ASSERT (s_con != NULL, + "wired-static-ip6-only-write", "failed to allocate new %s setting", + NM_SETTING_CONNECTION_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_con)); + + uuid = nm_utils_uuid_generate (); + g_object_set (s_con, + NM_SETTING_CONNECTION_ID, "Test Write Wired Static IP6 Only", + NM_SETTING_CONNECTION_UUID, uuid, + NM_SETTING_CONNECTION_AUTOCONNECT, TRUE, + NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME, + NM_SETTING_CONNECTION_TIMESTAMP, timestamp, + NULL); + g_free (uuid); + + /* Wired setting */ + s_wired = (NMSettingWired *) nm_setting_wired_new (); + ASSERT (s_wired != NULL, + "wired-static-ip6-only-write", "failed to allocate new %s setting", + NM_SETTING_WIRED_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_wired)); + + mac = g_byte_array_sized_new (sizeof (tmpmac)); + g_byte_array_append (mac, &tmpmac[0], sizeof (tmpmac)); + g_object_set (s_wired, NM_SETTING_WIRED_MAC_ADDRESS, mac, NULL); + g_byte_array_free (mac, TRUE); + + /* IP4 setting */ + s_ip4 = (NMSettingIP4Config *) nm_setting_ip4_config_new (); + ASSERT (s_ip4 != NULL, + "wired-static-ip6-only-write", "failed to allocate new %s setting", + NM_SETTING_IP4_CONFIG_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_ip4)); + + g_object_set (s_ip4, + NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_DISABLED, + NULL); + + /* IP6 setting */ + s_ip6 = (NMSettingIP6Config *) nm_setting_ip6_config_new (); + ASSERT (s_ip6 != NULL, + "wired-static-ip6-only-write", "failed to allocate new %s setting", + NM_SETTING_IP6_CONFIG_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_ip6)); + + g_object_set (s_ip6, + NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_MANUAL, + NULL); + + /* Add addresses */ + addr6 = nm_ip6_address_new (); + nm_ip6_address_set_address (addr6, &ip6); + nm_ip6_address_set_prefix (addr6, 11); + nm_setting_ip6_config_add_address (s_ip6, addr6); + nm_ip6_address_unref (addr6); + + /* DNS server */ + nm_setting_ip6_config_add_dns (s_ip6, &dns6); + + ASSERT (nm_connection_verify (connection, &error) == TRUE, + "wired-static-ip6-only-write", "failed to verify connection: %s", + (error && error->message) ? error->message : "(unknown)"); + + /* Save the ifcfg */ + success = writer_new_connection (connection, + TEST_SCRATCH_DIR "/network-scripts/", + &testfile, + &error); + ASSERT (success == TRUE, + "wired-static-ip6-only-write", "failed to write connection to disk: %s", + (error && error->message) ? error->message : "(unknown)"); + + ASSERT (testfile != NULL, + "wired-static-ip6-only-write", "didn't get ifcfg file path back after writing connection"); + + /* re-read the connection for comparison */ + reread = connection_from_file (testfile, + NULL, + TYPE_ETHERNET, + NULL, + &unmanaged, + &keyfile, + &routefile, + &route6file, + &error, + &ignore_error); + unlink (testfile); + + ASSERT (reread != NULL, + "wired-static-ip6-only-write-reread", "failed to read %s: %s", testfile, error->message); + + ASSERT (nm_connection_verify (reread, &error), + "wired-static-ip6-only-write-reread-verify", "failed to verify %s: %s", testfile, error->message); + + ASSERT (nm_connection_compare (connection, reread, NM_SETTING_COMPARE_FLAG_EXACT) == TRUE, + "wired-static-ip6-only-write", "written and re-read connection weren't the same."); + + if (route6file) + unlink (route6file); + + g_free (testfile); + g_free (keyfile); + g_free (routefile); + g_free (route6file); + g_object_unref (connection); + g_object_unref (reread); +} + + #define TEST_IFCFG_READ_WRITE_STATIC_ROUTES_LEGACY TEST_IFCFG_DIR"/network-scripts/ifcfg-test-static-routes-legacy" static void @@ -4397,6 +5589,8 @@ test_read_write_static_routes_legacy (void) char *keyfile2 = NULL; char *routefile = NULL; char *routefile2 = NULL; + char *route6file = NULL; + char *route6file2 = NULL; gboolean ignore_error = FALSE; gboolean success; GError *error = NULL; @@ -4409,6 +5603,7 @@ test_read_write_static_routes_legacy (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection != NULL, @@ -4495,10 +5690,12 @@ test_read_write_static_routes_legacy (void) &unmanaged, &keyfile2, &routefile2, + &route6file2, &error, &ignore_error); unlink (testfile); unlink (routefile2); + unlink (route6file2); ASSERT (reread != NULL, "read-write-static-routes-legacy-reread", "failed to read %s: %s", testfile, error->message); @@ -4517,6 +5714,8 @@ test_read_write_static_routes_legacy (void) g_free (keyfile2); g_free (routefile); g_free (routefile2); + g_free (route6file); + g_free (route6file2); g_object_unref (connection); g_object_unref (reread); } @@ -4529,6 +5728,7 @@ test_write_wired_static_routes (void) NMSettingConnection *s_con; NMSettingWired *s_wired; NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; static unsigned char tmpmac[] = { 0x31, 0x33, 0x33, 0x37, 0xbe, 0xcd }; GByteArray *mac; guint32 mtu = 1492; @@ -4554,6 +5754,7 @@ test_write_wired_static_routes (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; connection = nm_connection_new (); @@ -4640,6 +5841,15 @@ test_write_wired_static_routes (void) nm_setting_ip4_config_add_dns_search (s_ip4, dns_search1); nm_setting_ip4_config_add_dns_search (s_ip4, dns_search2); + /* IP6 setting */ + s_ip6 = (NMSettingIP6Config *) nm_setting_ip6_config_new (); + ASSERT (s_ip6 != NULL, + "wired-dhcp-8021x-peap-mschapv2write", "failed to allocate new %s setting", + NM_SETTING_IP6_CONFIG_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_ip6)); + + g_object_set (s_ip6, NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_IGNORE, NULL); + ASSERT (nm_connection_verify (connection, &error) == TRUE, "wired-static-routes-write", "failed to verify connection: %s", (error && error->message) ? error->message : "(unknown)"); @@ -4664,6 +5874,7 @@ test_write_wired_static_routes (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); unlink (testfile); @@ -4684,6 +5895,7 @@ test_write_wired_static_routes (void) g_free (testfile); g_free (keyfile); g_free (routefile); + g_free (route6file); g_object_unref (connection); g_object_unref (reread); } @@ -4696,6 +5908,7 @@ test_write_wired_dhcp_8021x_peap_mschapv2 (void) NMSettingConnection *s_con; NMSettingWired *s_wired; NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; NMSetting8021x *s_8021x; char *uuid; gboolean success; @@ -4704,6 +5917,7 @@ test_write_wired_dhcp_8021x_peap_mschapv2 (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; connection = nm_connection_new (); @@ -4742,6 +5956,15 @@ test_write_wired_dhcp_8021x_peap_mschapv2 (void) g_object_set (s_ip4, NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL); + /* IP6 setting */ + s_ip6 = (NMSettingIP6Config *) nm_setting_ip6_config_new (); + ASSERT (s_ip6 != NULL, + "wired-dhcp-8021x-peap-mschapv2write", "failed to allocate new %s setting", + NM_SETTING_IP6_CONFIG_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_ip6)); + + g_object_set (s_ip6, NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_IGNORE, NULL); + /* 802.1x setting */ s_8021x = (NMSetting8021x *) nm_setting_802_1x_new (); ASSERT (s_8021x != NULL, @@ -4792,6 +6015,7 @@ test_write_wired_dhcp_8021x_peap_mschapv2 (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); unlink (testfile); @@ -4822,6 +6046,7 @@ test_write_wifi_open (void) NMSettingConnection *s_con; NMSettingWireless *s_wifi; NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; char *uuid; gboolean success; GError *error = NULL; @@ -4829,6 +6054,7 @@ test_write_wifi_open (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GByteArray *ssid; const unsigned char ssid_data[] = { 0x54, 0x65, 0x73, 0x74, 0x20, 0x53, 0x53, 0x49, 0x44 }; @@ -4895,6 +6121,15 @@ test_write_wifi_open (void) g_object_set (s_ip4, NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL); + /* IP6 setting */ + s_ip6 = (NMSettingIP6Config *) nm_setting_ip6_config_new (); + ASSERT (s_ip6 != NULL, + "wifi-open-write", "failed to allocate new %s setting", + NM_SETTING_IP6_CONFIG_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_ip6)); + + g_object_set (s_ip6, NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_IGNORE, NULL); + ASSERT (nm_connection_verify (connection, &error) == TRUE, "wifi-open-write", "failed to verify connection: %s", (error && error->message) ? error->message : "(unknown)"); @@ -4919,6 +6154,7 @@ test_write_wifi_open (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); unlink (testfile); @@ -4945,6 +6181,7 @@ test_write_wifi_open_hex_ssid (void) NMSettingConnection *s_con; NMSettingWireless *s_wifi; NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; char *uuid; gboolean success; GError *error = NULL; @@ -4952,6 +6189,7 @@ test_write_wifi_open_hex_ssid (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GByteArray *ssid; const unsigned char ssid_data[] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd }; @@ -5002,6 +6240,15 @@ test_write_wifi_open_hex_ssid (void) g_object_set (s_ip4, NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL); + /* IP6 setting */ + s_ip6 = (NMSettingIP6Config *) nm_setting_ip6_config_new (); + ASSERT (s_ip6 != NULL, + "wifi-open-hex-ssid-write", "failed to allocate new %s setting", + NM_SETTING_IP6_CONFIG_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_ip6)); + + g_object_set (s_ip6, NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_IGNORE, NULL); + ASSERT (nm_connection_verify (connection, &error) == TRUE, "wifi-open-hex-ssid-write", "failed to verify connection: %s", (error && error->message) ? error->message : "(unknown)"); @@ -5026,6 +6273,7 @@ test_write_wifi_open_hex_ssid (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); unlink (testfile); @@ -5053,6 +6301,7 @@ test_write_wifi_wep (void) NMSettingWireless *s_wifi; NMSettingWirelessSecurity *s_wsec; NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; char *uuid; gboolean success; GError *error = NULL; @@ -5060,6 +6309,7 @@ test_write_wifi_wep (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GByteArray *ssid; const unsigned char ssid_data[] = "blahblah"; @@ -5129,6 +6379,15 @@ test_write_wifi_wep (void) g_object_set (s_ip4, NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL); + /* IP6 setting */ + s_ip6 = (NMSettingIP6Config *) nm_setting_ip6_config_new (); + ASSERT (s_ip6 != NULL, + "wifi-wep-write", "failed to allocate new %s setting", + NM_SETTING_IP6_CONFIG_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_ip6)); + + g_object_set (s_ip6, NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_IGNORE, NULL); + ASSERT (nm_connection_verify (connection, &error) == TRUE, "wifi-wep-write", "failed to verify connection: %s", (error && error->message) ? error->message : "(unknown)"); @@ -5153,6 +6412,7 @@ test_write_wifi_wep (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); unlink (testfile); @@ -5192,6 +6452,7 @@ test_write_wifi_wep_adhoc (void) NMSettingWireless *s_wifi; NMSettingWirelessSecurity *s_wsec; NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; char *uuid; gboolean success; GError *error = NULL; @@ -5199,6 +6460,7 @@ test_write_wifi_wep_adhoc (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GByteArray *ssid; const unsigned char ssid_data[] = "blahblah"; @@ -5276,6 +6538,15 @@ test_write_wifi_wep_adhoc (void) nm_setting_ip4_config_add_dns (s_ip4, dns1); + /* IP6 setting */ + s_ip6 = (NMSettingIP6Config *) nm_setting_ip6_config_new (); + ASSERT (s_ip6 != NULL, + "wifi-wep-adhoc-write", "failed to allocate new %s setting", + NM_SETTING_IP6_CONFIG_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_ip6)); + + g_object_set (s_ip6, NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_IGNORE, NULL); + ASSERT (nm_connection_verify (connection, &error) == TRUE, "wifi-wep-adhoc-write", "failed to verify connection: %s", (error && error->message) ? error->message : "(unknown)"); @@ -5300,6 +6571,7 @@ test_write_wifi_wep_adhoc (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); unlink (testfile); @@ -5330,6 +6602,155 @@ test_write_wifi_wep_adhoc (void) g_object_unref (reread); } +static void +test_write_wifi_wep_passphrase (void) +{ + NMConnection *connection; + NMConnection *reread; + NMSettingConnection *s_con; + NMSettingWireless *s_wifi; + NMSettingWirelessSecurity *s_wsec; + NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; + char *uuid; + gboolean success; + GError *error = NULL; + char *testfile = NULL; + char *unmanaged = NULL; + char *keyfile = NULL; + char *routefile = NULL; + char *route6file = NULL; + gboolean ignore_error = FALSE; + GByteArray *ssid; + const unsigned char ssid_data[] = "blahblah"; + struct stat statbuf; + + connection = nm_connection_new (); + ASSERT (connection != NULL, + "wifi-wep-passphrase-write", "failed to allocate new connection"); + + /* Connection setting */ + s_con = (NMSettingConnection *) nm_setting_connection_new (); + ASSERT (s_con != NULL, + "wifi-wep-passphrase-write", "failed to allocate new %s setting", + NM_SETTING_CONNECTION_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_con)); + + uuid = nm_utils_uuid_generate (); + g_object_set (s_con, + NM_SETTING_CONNECTION_ID, "Test Write Wifi WEP Passphrase", + NM_SETTING_CONNECTION_UUID, uuid, + NM_SETTING_CONNECTION_AUTOCONNECT, TRUE, + NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRELESS_SETTING_NAME, + NULL); + g_free (uuid); + + /* Wifi setting */ + s_wifi = (NMSettingWireless *) nm_setting_wireless_new (); + ASSERT (s_wifi != NULL, + "wifi-wep-passphrase-write", "failed to allocate new %s setting", + NM_SETTING_WIRELESS_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_wifi)); + + ssid = g_byte_array_sized_new (sizeof (ssid_data)); + g_byte_array_append (ssid, ssid_data, sizeof (ssid_data)); + + g_object_set (s_wifi, + NM_SETTING_WIRELESS_SSID, ssid, + NM_SETTING_WIRELESS_MODE, "infrastructure", + NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, + NULL); + + g_byte_array_free (ssid, TRUE); + + /* Wireless security setting */ + s_wsec = (NMSettingWirelessSecurity *) nm_setting_wireless_security_new (); + ASSERT (s_wsec != NULL, + "wifi-wep-passphrase-write", "failed to allocate new %s setting", + NM_SETTING_WIRELESS_SECURITY_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_wsec)); + + g_object_set (s_wsec, + NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "none", + NM_SETTING_WIRELESS_SECURITY_WEP_TX_KEYIDX, 0, + NM_SETTING_WIRELESS_SECURITY_AUTH_ALG, "shared", + NM_SETTING_WIRELESS_SECURITY_WEP_KEY_TYPE, NM_WEP_KEY_TYPE_PASSPHRASE, + NULL); + nm_setting_wireless_security_set_wep_key (s_wsec, 0, "asdfdjaslfjasd;flasjdfl;aksdf"); + + /* IP4 setting */ + s_ip4 = (NMSettingIP4Config *) nm_setting_ip4_config_new (); + ASSERT (s_ip4 != NULL, + "wifi-wep-passphrase-write", "failed to allocate new %s setting", + NM_SETTING_IP4_CONFIG_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_ip4)); + + g_object_set (s_ip4, NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL); + + /* IP6 setting */ + s_ip6 = (NMSettingIP6Config *) nm_setting_ip6_config_new (); + ASSERT (s_ip6 != NULL, + "wifi-wep-adhoc-write", "failed to allocate new %s setting", + NM_SETTING_IP6_CONFIG_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_ip6)); + + g_object_set (s_ip6, NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_IGNORE, NULL); + + ASSERT (nm_connection_verify (connection, &error) == TRUE, + "wifi-wep-passphrase-write", "failed to verify connection: %s", + (error && error->message) ? error->message : "(unknown)"); + + /* Save the ifcfg */ + success = writer_new_connection (connection, + TEST_SCRATCH_DIR "/network-scripts/", + &testfile, + &error); + ASSERT (success == TRUE, + "wifi-wep-passphrase-write", "failed to write connection to disk: %s", + (error && error->message) ? error->message : "(unknown)"); + + ASSERT (testfile != NULL, + "wifi-wep-passphrase-write", "didn't get ifcfg file path back after writing connection"); + + /* re-read the connection for comparison */ + reread = connection_from_file (testfile, + NULL, + TYPE_WIRELESS, + NULL, + &unmanaged, + &keyfile, + &routefile, + &route6file, + &error, + &ignore_error); + unlink (testfile); + + ASSERT (keyfile != NULL, + "wifi-wep-passphrase-write-reread", "expected keyfile for '%s'", testfile); + + ASSERT (stat (keyfile, &statbuf) == 0, + "wifi-wep-passphrase-write-reread", "couldn't stat() '%s'", keyfile); + ASSERT (S_ISREG (statbuf.st_mode), + "wifi-wep-passphrase-write-reread", "keyfile '%s' wasn't a normal file", keyfile); + ASSERT ((statbuf.st_mode & 0077) == 0, + "wifi-wep-passphrase-write-reread", "keyfile '%s' wasn't readable only by its owner", keyfile); + + unlink (keyfile); + + ASSERT (reread != NULL, + "wifi-wep-passphrase-write-reread", "failed to read %s: %s", testfile, error->message); + + ASSERT (nm_connection_verify (reread, &error), + "wifi-wep-passphrase-write-reread-verify", "failed to verify %s: %s", testfile, error->message); + + ASSERT (nm_connection_compare (connection, reread, NM_SETTING_COMPARE_FLAG_EXACT) == TRUE, + "wifi-wep-passphrase-write", "written and re-read connection weren't the same."); + + g_free (testfile); + g_object_unref (connection); + g_object_unref (reread); +} + static void test_write_wifi_leap (void) { @@ -5339,6 +6760,7 @@ test_write_wifi_leap (void) NMSettingWireless *s_wifi; NMSettingWirelessSecurity *s_wsec; NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; char *uuid; gboolean success; GError *error = NULL; @@ -5346,6 +6768,7 @@ test_write_wifi_leap (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GByteArray *ssid; const unsigned char ssid_data[] = "blahblah"; @@ -5412,6 +6835,15 @@ test_write_wifi_leap (void) g_object_set (s_ip4, NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL); + /* IP6 setting */ + s_ip6 = (NMSettingIP6Config *) nm_setting_ip6_config_new (); + ASSERT (s_ip6 != NULL, + "wifi-leap-write", "failed to allocate new %s setting", + NM_SETTING_IP6_CONFIG_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_ip6)); + + g_object_set (s_ip6, NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_IGNORE, NULL); + ASSERT (nm_connection_verify (connection, &error) == TRUE, "wifi-leap-write", "failed to verify connection: %s", (error && error->message) ? error->message : "(unknown)"); @@ -5436,6 +6868,7 @@ test_write_wifi_leap (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); unlink (testfile); @@ -5480,6 +6913,7 @@ test_write_wifi_wpa_psk (const char *name, NMSettingWireless *s_wifi; NMSettingWirelessSecurity *s_wsec; NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; char *uuid, *tmp; gboolean success; GError *error = NULL; @@ -5487,6 +6921,7 @@ test_write_wifi_wpa_psk (const char *name, char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GByteArray *ssid; const unsigned char ssid_data[] = "blahblah"; @@ -5567,6 +7002,15 @@ test_write_wifi_wpa_psk (const char *name, g_object_set (s_ip4, NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL); + /* IP6 setting */ + s_ip6 = (NMSettingIP6Config *) nm_setting_ip6_config_new (); + ASSERT (s_ip6 != NULL, + test_name, "failed to allocate new %s setting", + NM_SETTING_IP6_CONFIG_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_ip6)); + + g_object_set (s_ip6, NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_IGNORE, NULL); + ASSERT (nm_connection_verify (connection, &error) == TRUE, test_name, "failed to verify connection: %s", (error && error->message) ? error->message : "(unknown)"); @@ -5591,6 +7035,7 @@ test_write_wifi_wpa_psk (const char *name, &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); unlink (testfile); @@ -5624,6 +7069,7 @@ test_write_wifi_wpa_psk_adhoc (void) NMSettingWireless *s_wifi; NMSettingWirelessSecurity *s_wsec; NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; char *uuid; gboolean success; GError *error = NULL; @@ -5631,6 +7077,7 @@ test_write_wifi_wpa_psk_adhoc (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GByteArray *ssid; const unsigned char ssid_data[] = "blahblah"; @@ -5714,6 +7161,15 @@ test_write_wifi_wpa_psk_adhoc (void) nm_setting_ip4_config_add_dns (s_ip4, dns1); + /* IP6 setting */ + s_ip6 = (NMSettingIP6Config *) nm_setting_ip6_config_new (); + ASSERT (s_ip6 != NULL, + "wifi-wpa-psk-adhoc-write", "failed to allocate new %s setting", + NM_SETTING_IP6_CONFIG_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_ip6)); + + g_object_set (s_ip6, NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_IGNORE, NULL); + ASSERT (nm_connection_verify (connection, &error) == TRUE, "wifi-wpa-psk-adhoc-write", "failed to verify connection: %s", (error && error->message) ? error->message : "(unknown)"); @@ -5738,6 +7194,7 @@ test_write_wifi_wpa_psk_adhoc (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); unlink (testfile); @@ -5770,6 +7227,7 @@ test_write_wifi_wpa_eap_tls (void) NMSettingWirelessSecurity *s_wsec; NMSetting8021x *s_8021x; NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; char *uuid; gboolean success; GError *error = NULL; @@ -5777,6 +7235,7 @@ test_write_wifi_wpa_eap_tls (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GByteArray *ssid; const char *ssid_data = "blahblah"; @@ -5879,6 +7338,15 @@ test_write_wifi_wpa_eap_tls (void) g_object_set (s_ip4, NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL); + /* IP6 setting */ + s_ip6 = (NMSettingIP6Config *) nm_setting_ip6_config_new (); + ASSERT (s_ip6 != NULL, + "wifi-wpa-eap-tls-write", "failed to allocate new %s setting", + NM_SETTING_IP6_CONFIG_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_ip6)); + + g_object_set (s_ip6, NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_IGNORE, NULL); + ASSERT (nm_connection_verify (connection, &error) == TRUE, "wifi-wpa-eap-tls-write", "failed to verify connection: %s", (error && error->message) ? error->message : "(unknown)"); @@ -5903,6 +7371,7 @@ test_write_wifi_wpa_eap_tls (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); unlink (testfile); @@ -5935,6 +7404,7 @@ test_write_wifi_wpa_eap_ttls_tls (void) NMSettingWirelessSecurity *s_wsec; NMSetting8021x *s_8021x; NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; char *uuid; gboolean success; GError *error = NULL; @@ -5942,6 +7412,7 @@ test_write_wifi_wpa_eap_ttls_tls (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GByteArray *ssid; const char *ssid_data = "blahblah"; @@ -6062,6 +7533,15 @@ test_write_wifi_wpa_eap_ttls_tls (void) g_object_set (s_ip4, NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL); + /* IP6 setting */ + s_ip6 = (NMSettingIP6Config *) nm_setting_ip6_config_new (); + ASSERT (s_ip6 != NULL, + "wifi-wpa-eap-ttls-tls-write", "failed to allocate new %s setting", + NM_SETTING_IP6_CONFIG_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_ip6)); + + g_object_set (s_ip6, NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_IGNORE, NULL); + ASSERT (nm_connection_verify (connection, &error) == TRUE, "wifi-wpa-eap-ttls-tls-write", "failed to verify connection: %s", (error && error->message) ? error->message : "(unknown)"); @@ -6086,6 +7566,7 @@ test_write_wifi_wpa_eap_ttls_tls (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); unlink (testfile); @@ -6118,6 +7599,7 @@ test_write_wifi_wpa_eap_ttls_mschapv2 (void) NMSettingWirelessSecurity *s_wsec; NMSetting8021x *s_8021x; NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; char *uuid; gboolean success; GError *error = NULL; @@ -6125,6 +7607,7 @@ test_write_wifi_wpa_eap_ttls_mschapv2 (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GByteArray *ssid; const char *ssid_data = "blahblah"; @@ -6217,6 +7700,15 @@ test_write_wifi_wpa_eap_ttls_mschapv2 (void) g_object_set (s_ip4, NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL); + /* IP6 setting */ + s_ip6 = (NMSettingIP6Config *) nm_setting_ip6_config_new (); + ASSERT (s_ip6 != NULL, + "wifi-wpa-eap-ttls-mschapv2-write", "failed to allocate new %s setting", + NM_SETTING_IP6_CONFIG_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_ip6)); + + g_object_set (s_ip6, NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_IGNORE, NULL); + ASSERT (nm_connection_verify (connection, &error) == TRUE, "wifi-wpa-eap-ttls-mschapv2-write", "failed to verify connection: %s", (error && error->message) ? error->message : "(unknown)"); @@ -6241,6 +7733,7 @@ test_write_wifi_wpa_eap_ttls_mschapv2 (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); unlink (testfile); @@ -6275,6 +7768,7 @@ test_read_ibft_dhcp (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; const char *tmp; @@ -6290,6 +7784,7 @@ test_read_ibft_dhcp (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection != NULL, @@ -6408,6 +7903,7 @@ test_read_ibft_static (void) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; const char *tmp; @@ -6429,6 +7925,7 @@ test_read_ibft_static (void) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection != NULL, @@ -6613,6 +8110,7 @@ test_read_ibft_malformed (const char *name, const char *iscsiadm_path) char *unmanaged = NULL; char *keyfile = NULL; char *routefile = NULL; + char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; @@ -6623,6 +8121,7 @@ test_read_ibft_malformed (const char *name, const char *iscsiadm_path) &unmanaged, &keyfile, &routefile, + &route6file, &error, &ignore_error); ASSERT (connection == NULL, @@ -6918,6 +8417,9 @@ int main (int argc, char **argv) test_read_minimal (); test_read_wired_static (TEST_IFCFG_WIRED_STATIC, "System test-wired-static"); test_read_wired_static (TEST_IFCFG_WIRED_STATIC_BOOTPROTO, "System test-wired-static-bootproto"); + test_read_wired_static_no_prefix (8); + test_read_wired_static_no_prefix (16); + test_read_wired_static_no_prefix (24); test_read_wired_dhcp (); test_read_wired_global_gateway (); test_read_wired_never_default (); @@ -6925,6 +8427,8 @@ int main (int argc, char **argv) test_read_wired_defroute_no_gatewaydev_yes (); test_read_wired_static_routes (); test_read_wired_static_routes_legacy (); + test_read_wired_ipv6_manual (); + test_read_wired_ipv6_only (); test_read_onboot_no (); test_read_wired_8021x_peap_mschapv2 (); test_read_wifi_open (); @@ -6936,6 +8440,7 @@ int main (int argc, char **argv) test_read_wifi_open_ssid_quoted (); test_read_wifi_wep (); test_read_wifi_wep_adhoc (); + test_read_wifi_wep_passphrase (); test_read_wifi_leap (); test_read_wifi_wpa_psk (); test_read_wifi_wpa_psk_unquoted (); @@ -6947,6 +8452,7 @@ int main (int argc, char **argv) test_read_wifi_wep_eap_ttls_chap (); test_write_wired_static (); + test_write_wired_static_ip6_only (); test_write_wired_static_routes (); test_read_write_static_routes_legacy (); test_write_wired_dhcp (); @@ -6955,6 +8461,7 @@ int main (int argc, char **argv) test_write_wifi_open_hex_ssid (); test_write_wifi_wep (); test_write_wifi_wep_adhoc (); + test_write_wifi_wep_passphrase (); test_write_wifi_leap (); test_write_wifi_wpa_psk ("Test Write Wifi WPA PSK", "wifi-wpa-psk-write", diff --git a/system-settings/plugins/ifcfg-rh/utils.c b/system-settings/plugins/ifcfg-rh/utils.c index b0e5a3379b..211458bec8 100644 --- a/system-settings/plugins/ifcfg-rh/utils.c +++ b/system-settings/plugins/ifcfg-rh/utils.c @@ -115,59 +115,139 @@ utils_hexstr2bin (const char *hex, size_t len) /* End from hostap */ -char * -utils_cert_path (const char *parent, const char *suffix) +static gboolean +check_suffix (const char *base, const char *tag) { - char *name, *dir, *path; + int len, tag_len; - name = utils_get_ifcfg_name (parent); - dir = g_path_get_dirname (parent); - path = g_strdup_printf ("%s/%s-%s", dir, name, suffix); - g_free (dir); - g_free (name); - return path; + g_return_val_if_fail (base != NULL, TRUE); + g_return_val_if_fail (tag != NULL, TRUE); + + len = strlen (base); + tag_len = strlen (tag); + if ((len > tag_len) && !strcasecmp (base + len - tag_len, tag)) + return TRUE; + return FALSE; +} + +gboolean +utils_should_ignore_file (const char *filename, gboolean only_ifcfg) +{ + char *base; + gboolean ignore = TRUE; + gboolean is_ifcfg = FALSE; + gboolean is_other = FALSE; + + g_return_val_if_fail (filename != NULL, TRUE); + + base = g_path_get_basename (filename); + g_return_val_if_fail (base != NULL, TRUE); + + /* Only handle ifcfg, keys, and routes files */ + if (!strncmp (base, IFCFG_TAG, strlen (IFCFG_TAG))) + is_ifcfg = TRUE; + + if (only_ifcfg == FALSE) { + if ( !strncmp (base, KEYS_TAG, strlen (KEYS_TAG)) + || !strncmp (base, ROUTE_TAG, strlen (ROUTE_TAG)) + || !strncmp (base, ROUTE6_TAG, strlen (ROUTE6_TAG))) + is_other = TRUE; + } + + /* But not those that have certain suffixes */ + if ( (is_ifcfg || is_other) + && !check_suffix (base, BAK_TAG) + && !check_suffix (base, TILDE_TAG) + && !check_suffix (base, ORIG_TAG) + && !check_suffix (base, REJ_TAG) + && !check_suffix (base, RPMNEW_TAG)) + ignore = FALSE; + + g_free (base); + return ignore; } char * -utils_get_ifcfg_name (const char *file) +utils_cert_path (const char *parent, const char *suffix) { - char *ifcfg_name; + const char *name; + char *dir, *path; + + g_return_val_if_fail (parent != NULL, NULL); + g_return_val_if_fail (suffix != NULL, NULL); + + name = utils_get_ifcfg_name (parent, FALSE); + dir = g_path_get_dirname (parent); + path = g_strdup_printf ("%s/%s-%s", dir, name, suffix); + g_free (dir); + return path; +} + +const char * +utils_get_ifcfg_name (const char *file, gboolean only_ifcfg) +{ + const char *name = NULL, *start = NULL; char *base; + g_return_val_if_fail (file != NULL, NULL); + base = g_path_get_basename (file); if (!base) return NULL; - ifcfg_name = g_strdup (base + strlen (IFCFG_TAG)); + /* Find the point in 'file' where 'base' starts. We use 'file' since it's + * const and thus will survive after we free 'base'. + */ + start = file + strlen (file) - strlen (base); + g_assert (strcmp (start, base) == 0); g_free (base); - return ifcfg_name; + + if (!strncmp (start, IFCFG_TAG, strlen (IFCFG_TAG))) + name = start + strlen (IFCFG_TAG); + else if (only_ifcfg == FALSE) { + if (!strncmp (start, KEYS_TAG, strlen (KEYS_TAG))) + name = start + strlen (KEYS_TAG); + else if (!strncmp (start, ROUTE_TAG, strlen (ROUTE_TAG))) + name = start + strlen (ROUTE_TAG); + else if (!strncmp (start, ROUTE6_TAG, strlen (ROUTE6_TAG))) + name = start + strlen (ROUTE6_TAG); + } + + return name; } -/* Used to get an extra file path for ifcfg- in the form . - * Currently used for: keys- - * route- +/* Used to get any ifcfg/extra file path from any other ifcfg/extra path + * in the form . */ -char * +static char * utils_get_extra_path (const char *parent, const char *tag) { - char *ifcfg_name; - char *extra_file = NULL; - char *tmp = NULL; + char *item_path = NULL, *dirname; + const char *name; - ifcfg_name = utils_get_ifcfg_name (parent); - if (!ifcfg_name) + g_return_val_if_fail (parent != NULL, NULL); + g_return_val_if_fail (tag != NULL, NULL); + + dirname = g_path_get_dirname (parent); + if (!dirname) return NULL; - tmp = g_path_get_dirname (parent); - if (!tmp) - goto out; + name = utils_get_ifcfg_name (parent, FALSE); + if (name) { + if (!strcmp (dirname, ".")) + item_path = g_strdup_printf ("%s%s", tag, name); + else + item_path = g_strdup_printf ("%s/%s%s", dirname, tag, name); + } + g_free (dirname); - extra_file = g_strdup_printf ("%s/%s%s", tmp, tag, ifcfg_name); + return item_path; +} -out: - g_free (tmp); - g_free (ifcfg_name); - return extra_file; +char * +utils_get_ifcfg_path (const char *parent) +{ + return utils_get_extra_path (parent, IFCFG_TAG); } char * @@ -182,6 +262,12 @@ utils_get_route_path (const char *parent) return utils_get_extra_path (parent, ROUTE_TAG); } +char * +utils_get_route6_path (const char *parent) +{ + return utils_get_extra_path (parent, ROUTE6_TAG); +} + shvarFile * utils_get_extra_ifcfg (const char *parent, const char *tag, gboolean should_create) { @@ -214,9 +300,15 @@ utils_get_route_ifcfg (const char *parent, gboolean should_create) return utils_get_extra_ifcfg (parent, ROUTE_TAG, should_create); } +shvarFile * +utils_get_route6_ifcfg (const char *parent, gboolean should_create) +{ + return utils_get_extra_ifcfg (parent, ROUTE6_TAG, should_create); +} + /* Finds out if route file has new or older format * Returns TRUE - new syntax (ADDRESS=a.b.c.d ...), error opening file or empty - * FALSE - legacy syntax (1.2.3.0/24 via 11.22.33.44) + * FALSE - older syntax, i.e. argument to 'ip route add' (1.2.3.0/24 via 11.22.33.44) */ gboolean utils_has_route_file_new_syntax (const char *filename) diff --git a/system-settings/plugins/ifcfg-rh/utils.h b/system-settings/plugins/ifcfg-rh/utils.h index 2c7eaee62e..d5e3a13354 100644 --- a/system-settings/plugins/ifcfg-rh/utils.h +++ b/system-settings/plugins/ifcfg-rh/utils.h @@ -31,15 +31,19 @@ char *utils_hexstr2bin (const char *hex, size_t len); char *utils_cert_path (const char *parent, const char *suffix); -char *utils_get_ifcfg_name (const char *file); +const char *utils_get_ifcfg_name (const char *file, gboolean only_ifcfg); -char *utils_get_extra_path (const char *parent, const char *tag); +gboolean utils_should_ignore_file (const char *filename, gboolean only_ifcfg); + +char *utils_get_ifcfg_path (const char *parent); char *utils_get_keys_path (const char *parent); char *utils_get_route_path (const char *parent); +char *utils_get_route6_path (const char *parent); shvarFile *utils_get_extra_ifcfg (const char *parent, const char *tag, gboolean should_create); shvarFile *utils_get_keys_ifcfg (const char *parent, gboolean should_create); shvarFile *utils_get_route_ifcfg (const char *parent, gboolean should_create); +shvarFile *utils_get_route6_ifcfg (const char *parent, gboolean should_create); gboolean utils_has_route_file_new_syntax (const char *filename); diff --git a/system-settings/plugins/ifcfg-rh/writer.c b/system-settings/plugins/ifcfg-rh/writer.c index 8a54855cb5..30ef6e3941 100644 --- a/system-settings/plugins/ifcfg-rh/writer.c +++ b/system-settings/plugins/ifcfg-rh/writer.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009 - 2010 Red Hat, Inc. */ #include @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -578,20 +579,46 @@ write_wireless_security_setting (NMConnection *connection, } } + /* WEP keys */ + + /* Clear existing keys */ + set_secret (ifcfg, "KEY", NULL, FALSE); /* Clear any default key */ + for (i = 0; i < 4; i++) { + tmp = g_strdup_printf ("KEY_PASSPHRASE%d", i + 1); + set_secret (ifcfg, tmp, NULL, FALSE); + g_free (tmp); + + tmp = g_strdup_printf ("KEY%d", i + 1); + set_secret (ifcfg, tmp, NULL, FALSE); + g_free (tmp); + } + + /* And write the new ones out */ if (wep) { /* Default WEP TX key index */ tmp = g_strdup_printf ("%d", nm_setting_wireless_security_get_wep_tx_keyidx (s_wsec) + 1); svSetValue (ifcfg, "DEFAULTKEY", tmp, FALSE); g_free (tmp); - } - /* WEP keys */ - set_secret (ifcfg, "KEY", NULL, FALSE); /* Clear any default key */ - for (i = 0; i < 4; i++) { - key = nm_setting_wireless_security_get_wep_key (s_wsec, i); - tmp = g_strdup_printf ("KEY%d", i + 1); - set_secret (ifcfg, tmp, (wep && key) ? key : NULL, FALSE); - g_free (tmp); + for (i = 0; i < 4; i++) { + NMWepKeyType key_type; + + key = nm_setting_wireless_security_get_wep_key (s_wsec, i); + if (key) { + /* Passphrase needs a different ifcfg key since with WEP, there + * are some passphrases that are indistinguishable from WEP hex + * keys. + */ + key_type = nm_setting_wireless_security_get_wep_key_type (s_wsec); + if (key_type == NM_WEP_KEY_TYPE_PASSPHRASE) + tmp = g_strdup_printf ("KEY_PASSPHRASE%d", i + 1); + else + tmp = g_strdup_printf ("KEY%d", i + 1); + + set_secret (ifcfg, tmp, key, FALSE); + g_free (tmp); + } + } } /* WPA protos */ @@ -806,6 +833,7 @@ write_wired_setting (NMConnection *connection, shvarFile *ifcfg, GError **error) g_free (tmp); } + svSetValue (ifcfg, "MTU", NULL, FALSE); mtu = nm_setting_wired_get_mtu (s_wired); if (mtu) { tmp = g_strdup_printf ("%u", mtu); @@ -855,8 +883,10 @@ write_route_file_legacy (const char *filename, NMSettingIP4Config *s_ip4, GError g_return_val_if_fail (*error == NULL, FALSE); num = nm_setting_ip4_config_get_num_routes (s_ip4); - if (num == 0) + if (num == 0) { + unlink (filename); return TRUE; + } route_items = g_malloc0 (sizeof (char*) * (num + 1)); for (i = 0; i < num; i++) { @@ -904,12 +934,41 @@ write_ip4_setting (NMConnection *connection, shvarFile *ifcfg, GError **error) guint32 i, num; GString *searches; gboolean success = FALSE; + const char *method = NULL; s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG); - if (!s_ip4) { - g_set_error (error, ifcfg_plugin_error_quark (), 0, - "Missing '%s' setting", NM_SETTING_IP4_CONFIG_SETTING_NAME); - return FALSE; + if (s_ip4) + method = nm_setting_ip4_config_get_method (s_ip4); + + /* Missing IP4 setting is assumed to be DHCP */ + if (!method) + method = NM_SETTING_IP4_CONFIG_METHOD_AUTO; + + if (!strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED)) { + int result; + + /* IPv4 disabled, clear IPv4 related parameters */ + svSetValue (ifcfg, "BOOTPROTO", NULL, FALSE); + for (i = 0; i < 254; i++) { + if (i == 0) { + addr_key = g_strdup ("IPADDR"); + prefix_key = g_strdup ("PREFIX"); + gw_key = g_strdup ("GATEWAY"); + } else { + addr_key = g_strdup_printf ("IPADDR%d", i + 1); + prefix_key = g_strdup_printf ("PREFIX%d", i + 1); + gw_key = g_strdup_printf ("GATEWAY%d", i + 1); + } + + svSetValue (ifcfg, addr_key, NULL, FALSE); + svSetValue (ifcfg, prefix_key, NULL, FALSE); + svSetValue (ifcfg, gw_key, NULL, FALSE); + } + + route_path = utils_get_route_path (ifcfg->fileName); + result = unlink (route_path); + g_free (route_path); + return TRUE; } value = nm_setting_ip4_config_get_method (s_ip4); @@ -1028,6 +1087,10 @@ write_ip4_setting (NMConnection *connection, shvarFile *ifcfg, GError **error) svSetValue (ifcfg, "DHCP_CLIENT_ID", value, FALSE); } + svSetValue (ifcfg, "IPV4_FAILURE_FATAL", + nm_setting_ip4_config_get_may_fail (s_ip4) ? "no" : "yes", + FALSE); + /* Static routes - route- file */ route_path = utils_get_route_path (ifcfg->fileName); if (!route_path) { @@ -1117,6 +1180,225 @@ out: return success; } +static gboolean +write_route6_file (const char *filename, NMSettingIP6Config *s_ip6, GError **error) +{ + char dest[INET6_ADDRSTRLEN]; + char next_hop[INET6_ADDRSTRLEN]; + char **route_items; + char *route_contents; + NMIP6Route *route; + const struct in6_addr *ip; + guint32 prefix, metric; + guint32 i, num; + gboolean success = FALSE; + + g_return_val_if_fail (filename != NULL, FALSE); + g_return_val_if_fail (s_ip6 != NULL, FALSE); + g_return_val_if_fail (error != NULL, FALSE); + g_return_val_if_fail (*error == NULL, FALSE); + + num = nm_setting_ip6_config_get_num_routes (s_ip6); + if (num == 0) { + unlink (filename); + return TRUE; + } + + route_items = g_malloc0 (sizeof (char*) * (num + 1)); + for (i = 0; i < num; i++) { + route = nm_setting_ip6_config_get_route (s_ip6, i); + + memset (dest, 0, sizeof (dest)); + ip = nm_ip6_route_get_dest (route); + inet_ntop (AF_INET6, (const void *) ip, &dest[0], sizeof (dest)); + + prefix = nm_ip6_route_get_prefix (route); + + memset (next_hop, 0, sizeof (next_hop)); + ip = nm_ip6_route_get_next_hop (route); + inet_ntop (AF_INET6, (const void *) ip, &next_hop[0], sizeof (next_hop)); + + metric = nm_ip6_route_get_metric (route); + + route_items[i] = g_strdup_printf ("%s/%u via %s metric %u\n", dest, prefix, next_hop, metric); + } + route_items[num] = NULL; + route_contents = g_strjoinv (NULL, route_items); + g_strfreev (route_items); + + if (!g_file_set_contents (filename, route_contents, -1, NULL)) { + g_set_error (error, ifcfg_plugin_error_quark (), 0, + "Writing route6 file '%s' failed", filename); + goto error; + } + + success = TRUE; + +error: + g_free (route_contents); + return success; +} + +static gboolean +write_ip6_setting (NMConnection *connection, shvarFile *ifcfg, GError **error) +{ + NMSettingIP6Config *s_ip6; + NMSettingIP4Config *s_ip4; + const char *value; + char *addr_key, *prefix; + guint32 i, num, num4; + GString *searches; + char buf[INET6_ADDRSTRLEN]; + NMIP6Address *addr; + const struct in6_addr *ip; + GString *ip_str1, *ip_str2, *ip_ptr; + char *route6_path; + + s_ip6 = (NMSettingIP6Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG); + if (!s_ip6) { + g_set_error (error, ifcfg_plugin_error_quark (), 0, + "Missing '%s' setting", NM_SETTING_IP6_CONFIG_SETTING_NAME); + return FALSE; + } + + value = nm_setting_ip6_config_get_method (s_ip6); + g_assert (value); + if (!strcmp (value, NM_SETTING_IP6_CONFIG_METHOD_IGNORE)) { + svSetValue (ifcfg, "IPV6INIT", "no", FALSE); + svSetValue (ifcfg, "DHCPV6C", NULL, FALSE); + return TRUE; + } else if (!strcmp (value, NM_SETTING_IP6_CONFIG_METHOD_AUTO)) { + svSetValue (ifcfg, "IPV6INIT", "yes", FALSE); + svSetValue (ifcfg, "IPV6_AUTOCONF", "yes", FALSE); + svSetValue (ifcfg, "DHCPV6C", NULL, FALSE); + } else if (!strcmp (value, NM_SETTING_IP6_CONFIG_METHOD_DHCP)) { + svSetValue (ifcfg, "IPV6INIT", "yes", FALSE); + svSetValue (ifcfg, "IPV6_AUTOCONF", "no", FALSE); + svSetValue (ifcfg, "DHCPV6C", "yes", FALSE); + } else if (!strcmp (value, NM_SETTING_IP6_CONFIG_METHOD_MANUAL)) { + svSetValue (ifcfg, "IPV6INIT", "yes", FALSE); + svSetValue (ifcfg, "IPV6_AUTOCONF", "no", FALSE); + svSetValue (ifcfg, "DHCPV6C", NULL, FALSE); + } else if (!strcmp (value, NM_SETTING_IP6_CONFIG_METHOD_LINK_LOCAL)) { + svSetValue (ifcfg, "IPV6INIT", "yes", FALSE); + svSetValue (ifcfg, "IPV6_AUTOCONF", "no", FALSE); + svSetValue (ifcfg, "DHCPV6C", NULL, FALSE); + } else if (!strcmp (value, NM_SETTING_IP6_CONFIG_METHOD_SHARED)) { + svSetValue (ifcfg, "IPV6INIT", "yes", FALSE); + svSetValue (ifcfg, "DHCPV6C", NULL, FALSE); + /* TODO */ + } + + if (!strcmp (value, NM_SETTING_IP6_CONFIG_METHOD_MANUAL)) { + /* Write out IP addresses */ + num = nm_setting_ip6_config_get_num_addresses (s_ip6); + + ip_str1 = g_string_new (NULL); + ip_str2 = g_string_new (NULL); + for (i = 0; i < num; i++) { + if (i == 0) + ip_ptr = ip_str1; + else + ip_ptr = ip_str2; + + addr = nm_setting_ip6_config_get_address (s_ip6, i); + ip = nm_ip6_address_get_address (addr); + prefix = g_strdup_printf ("%u", nm_ip6_address_get_prefix (addr)); + memset (buf, 0, sizeof (buf)); + inet_ntop (AF_INET6, (const void *) ip, buf, sizeof (buf)); + if (i > 1) + g_string_append_c (ip_ptr, ' '); /* separate addresses in IPV6ADDR_SECONDARIES */ + g_string_append (ip_ptr, buf); + g_string_append_c (ip_ptr, '/'); + g_string_append (ip_ptr, prefix); + g_free (prefix); + } + + svSetValue (ifcfg, "IPV6ADDR", ip_str1->str, FALSE); + svSetValue (ifcfg, "IPV6ADDR_SECONDARIES", ip_str2->str, FALSE); + g_string_free (ip_str1, TRUE); + g_string_free (ip_str2, TRUE); + } else { + svSetValue (ifcfg, "IPV6ADDR", NULL, FALSE); + svSetValue (ifcfg, "IPV6ADDR_SECONDARIES", NULL, FALSE); + } + + /* Write out DNS - 'DNS' key is used both for IPv4 and IPv6 */ + s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG); + num4 = s_ip4 ? nm_setting_ip4_config_get_num_dns (s_ip4) : 0; /* from where to start with IPv6 entries */ + num = nm_setting_ip6_config_get_num_dns (s_ip6); + for (i = 0; i < 254; i++) { + addr_key = g_strdup_printf ("DNS%d", i + num4 + 1); + + if (i >= num) + svSetValue (ifcfg, addr_key, NULL, FALSE); + else { + ip = nm_setting_ip6_config_get_dns (s_ip6, i); + + memset (buf, 0, sizeof (buf)); + inet_ntop (AF_INET6, (const void *) ip, buf, sizeof (buf)); + svSetValue (ifcfg, addr_key, buf, FALSE); + } + g_free (addr_key); + } + + /* Write out DNS domains - 'DOMAIN' key is shared for both IPv4 and IPv6 domains */ + num = nm_setting_ip6_config_get_num_dns_searches (s_ip6); + if (num > 0) { + char *ip4_domains; + ip4_domains = svGetValue (ifcfg, "DOMAIN", FALSE); + searches = g_string_new (ip4_domains); + for (i = 0; i < num; i++) { + if (searches->len > 0) + g_string_append_c (searches, ' '); + g_string_append (searches, nm_setting_ip6_config_get_dns_search (s_ip6, i)); + } + svSetValue (ifcfg, "DOMAIN", searches->str, FALSE); + g_string_free (searches, TRUE); + g_free (ip4_domains); + } + + /* handle IPV6_DEFROUTE */ + /* IPV6_DEFROUTE has the opposite meaning from 'never-default' */ + if (nm_setting_ip6_config_get_never_default(s_ip6)) + svSetValue (ifcfg, "IPV6_DEFROUTE", "no", FALSE); + else + svSetValue (ifcfg, "IPV6_DEFROUTE", "yes", FALSE); + + svSetValue (ifcfg, "IPV6_PEERDNS", NULL, FALSE); + svSetValue (ifcfg, "IPV6_PEERROUTES", NULL, FALSE); + if (!strcmp (value, NM_SETTING_IP6_CONFIG_METHOD_AUTO)) { + svSetValue (ifcfg, "IPV6_PEERDNS", + nm_setting_ip6_config_get_ignore_auto_dns (s_ip6) ? "no" : "yes", + FALSE); + + svSetValue (ifcfg, "IPV6_PEERROUTES", + nm_setting_ip6_config_get_ignore_auto_routes (s_ip6) ? "no" : "yes", + FALSE); + } + + svSetValue (ifcfg, "IPV6_FAILURE_FATAL", + nm_setting_ip6_config_get_may_fail (s_ip6) ? "no" : "yes", + FALSE); + + /* Static routes go to route6- file */ + route6_path = utils_get_route6_path (ifcfg->fileName); + if (!route6_path) { + g_set_error (error, ifcfg_plugin_error_quark (), 0, + "Could not get route6 file path for '%s'", ifcfg->fileName); + goto error; + } + write_route6_file (route6_path, s_ip6, error); + g_free (route6_path); + if (error && *error) + goto error; + + return TRUE; + +error: + return FALSE; +} + static char * escape_id (const char *id) { @@ -1142,11 +1424,11 @@ write_connection (NMConnection *connection, const char *ifcfg_dir, const char *filename, const char *keyfile, - const char *routefile, char **out_filename, GError **error) { NMSettingConnection *s_con; + NMSettingIP6Config *s_ip6; gboolean success = FALSE; shvarFile *ifcfg = NULL; char *ifcfg_name = NULL; @@ -1216,6 +1498,12 @@ write_connection (NMConnection *connection, if (!write_ip4_setting (connection, ifcfg, error)) goto out; + s_ip6 = (NMSettingIP6Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG); + if (s_ip6) { + if (!write_ip6_setting (connection, ifcfg, error)) + goto out; + } + write_connection_setting (s_con, ifcfg); if (svWriteFile (ifcfg, 0644)) { @@ -1243,7 +1531,7 @@ writer_new_connection (NMConnection *connection, char **out_filename, GError **error) { - return write_connection (connection, ifcfg_dir, NULL, NULL, NULL, out_filename, error); + return write_connection (connection, ifcfg_dir, NULL, NULL, out_filename, error); } gboolean @@ -1251,9 +1539,8 @@ writer_update_connection (NMConnection *connection, const char *ifcfg_dir, const char *filename, const char *keyfile, - const char *routefile, GError **error) { - return write_connection (connection, ifcfg_dir, filename, keyfile, routefile, NULL, error); + return write_connection (connection, ifcfg_dir, filename, keyfile, NULL, error); } diff --git a/system-settings/plugins/ifcfg-rh/writer.h b/system-settings/plugins/ifcfg-rh/writer.h index 2762705312..edeac0cccc 100644 --- a/system-settings/plugins/ifcfg-rh/writer.h +++ b/system-settings/plugins/ifcfg-rh/writer.h @@ -34,7 +34,6 @@ gboolean writer_update_connection (NMConnection *connection, const char *ifcfg_dir, const char *filename, const char *keyfile, - const char *routefile, GError **error); #endif /* _WRITER_H_ */ diff --git a/system-settings/plugins/ifupdown/plugin.c b/system-settings/plugins/ifupdown/plugin.c index 18afce4f4a..e2358b9f51 100644 --- a/system-settings/plugins/ifupdown/plugin.c +++ b/system-settings/plugins/ifupdown/plugin.c @@ -59,7 +59,9 @@ #define IFUPDOWN_PLUGIN_INFO "(C) 2008 Canonical Ltd. To report bugs please use the NetworkManager mailing list." #define IFUPDOWN_SYSTEM_HOSTNAME_FILE "/etc/hostname" -#define IFUPDOWN_SYSTEM_SETTINGS_KEY_FILE SYSCONFDIR "/NetworkManager/nm-system-settings.conf" +#define IFUPDOWN_SYSTEM_SETTINGS_KEY_FILE SYSCONFDIR "/NetworkManager/NetworkManager.conf" +#define IFUPDOWN_OLD_SYSTEM_SETTINGS_KEY_FILE SYSCONFDIR "/NetworkManager/nm-system-settings.conf" + #define IFUPDOWN_KEY_FILE_GROUP "ifupdown" #define IFUPDOWN_KEY_FILE_KEY_MANAGED "managed" #define IFUPDOWN_UNMANAGE_WELL_KNOWN_DEFAULT TRUE @@ -78,6 +80,7 @@ typedef struct { GHashTable *well_known_interfaces; GHashTable *well_known_ifaces; gboolean unmanage_well_known; + const char *conf_file; gulong inotify_event_id; int inotify_system_hostname_wd; @@ -355,7 +358,7 @@ SCPluginIfupdown_init (NMSystemConfigInterface *config) ifparser_init (); block = ifparser_getfirst (); while (block) { - if(!strcmp ("auto", block->type)) + if(!strcmp ("auto", block->type) || !strcmp ("allow-hotplug", block->type)) g_hash_table_insert (auto_ifaces, block->name, GUINT_TO_POINTER (1)); else if (!strcmp ("iface", block->type) && strcmp ("lo", block->name)) { NMIfupdownConnection *exported; @@ -374,7 +377,6 @@ SCPluginIfupdown_init (NMSystemConfigInterface *config) if (exported) { g_hash_table_insert (priv->iface_connections, block->name, exported); g_hash_table_insert (priv->well_known_interfaces, block->name, "known"); - g_signal_emit_by_name (self, NM_SYSTEM_CONFIG_INTERFACE_CONNECTION_ADDED, exported); } } else if (!strcmp ("mapping", block->type)) { g_hash_table_insert (priv->well_known_interfaces, block->name, "known"); @@ -404,13 +406,19 @@ SCPluginIfupdown_init (NMSystemConfigInterface *config) g_list_free (keys); g_hash_table_destroy (auto_ifaces); + /* Find the config file */ + if (g_file_test (IFUPDOWN_SYSTEM_SETTINGS_KEY_FILE, G_FILE_TEST_EXISTS)) + priv->conf_file = IFUPDOWN_SYSTEM_SETTINGS_KEY_FILE; + else + priv->conf_file = IFUPDOWN_OLD_SYSTEM_SETTINGS_KEY_FILE; + keyfile = g_key_file_new (); if (!g_key_file_load_from_file (keyfile, - IFUPDOWN_SYSTEM_SETTINGS_KEY_FILE, + priv->conf_file, G_KEY_FILE_NONE, &error)) { nm_info ("loading system config file (%s) caused error: (%d) %s", - IFUPDOWN_SYSTEM_SETTINGS_KEY_FILE, + priv->conf_file, error ? error->code : -1, error && error->message ? error->message : "(unknown)"); } else { @@ -442,6 +450,19 @@ SCPluginIfupdown_init (NMSystemConfigInterface *config) } g_list_free (keys); + /* Now if we're running in managed mode, let NM know there are new connections */ + if (!priv->unmanage_well_known) { + GList *con_list = g_hash_table_get_values (priv->iface_connections); + GList *cl_iter; + + for (cl_iter = con_list; cl_iter; cl_iter = g_list_next (cl_iter)) { + g_signal_emit_by_name (self, + NM_SYSTEM_CONFIG_INTERFACE_CONNECTION_ADDED, + NM_EXPORTED_CONNECTION (cl_iter->data)); + } + g_list_free (con_list); + } + PLUGIN_PRINT("SCPlugin-Ifupdown", "end _init."); } diff --git a/system-settings/plugins/keyfile/io/reader.c b/system-settings/plugins/keyfile/io/reader.c index 13c4b12703..a71c05c577 100644 --- a/system-settings/plugins/keyfile/io/reader.c +++ b/system-settings/plugins/keyfile/io/reader.c @@ -15,8 +15,8 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2008 Novell, Inc. - * Copyright (C) 2008 Red Hat, Inc. + * Copyright (C) 2008 - 2009 Novell, Inc. + * Copyright (C) 2008 - 2010 Red Hat, Inc. */ #include @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -69,7 +70,7 @@ get_one_int (const char *str, guint32 max_val, const char *key_name, guint32 *ou errno = 0; tmp = strtol (str, NULL, 10); if (errno || (tmp < 0) || (tmp > max_val)) { - g_warning ("%s: ignoring invalid IPv4 %s item '%s'", __func__, key_name, str); + g_warning ("%s: ignoring invalid IP %s item '%s'", __func__, key_name, str); return FALSE; } @@ -78,13 +79,13 @@ get_one_int (const char *str, guint32 max_val, const char *key_name, guint32 *ou } static void -free_one_address (gpointer data, gpointer user_data) +free_one_ip4_address (gpointer data, gpointer user_data) { g_array_free ((GArray *) data, TRUE); } static GPtrArray * -read_addresses (GKeyFile *file, +read_ip4_addresses (GKeyFile *file, const char *setting_name, const char *key) { @@ -166,27 +167,27 @@ ip4_addr_parser (NMSetting *setting, const char *key, GKeyFile *keyfile) GPtrArray *addresses; const char *setting_name = nm_setting_get_name (setting); - addresses = read_addresses (keyfile, setting_name, key); + addresses = read_ip4_addresses (keyfile, setting_name, key); /* Work around for previous syntax */ if (!addresses && !strcmp (key, NM_SETTING_IP4_CONFIG_ADDRESSES)) - addresses = read_addresses (keyfile, setting_name, "address"); + addresses = read_ip4_addresses (keyfile, setting_name, "address"); if (addresses) { g_object_set (setting, key, addresses, NULL); - g_ptr_array_foreach (addresses, free_one_address, NULL); + g_ptr_array_foreach (addresses, free_one_ip4_address, NULL); g_ptr_array_free (addresses, TRUE); } } static void -free_one_route (gpointer data, gpointer user_data) +free_one_ip4_route (gpointer data, gpointer user_data) { g_array_free ((GArray *) data, TRUE); } static GPtrArray * -read_routes (GKeyFile *file, +read_ip4_routes (GKeyFile *file, const char *setting_name, const char *key) { @@ -272,10 +273,10 @@ ip4_route_parser (NMSetting *setting, const char *key, GKeyFile *keyfile) GPtrArray *routes; const char *setting_name = nm_setting_get_name (setting); - routes = read_routes (keyfile, setting_name, key); + routes = read_ip4_routes (keyfile, setting_name, key); if (routes) { g_object_set (setting, key, routes, NULL); - g_ptr_array_foreach (routes, free_one_route, NULL); + g_ptr_array_foreach (routes, free_one_ip4_route, NULL); g_ptr_array_free (routes, TRUE); } } @@ -303,8 +304,9 @@ ip4_dns_parser (NMSetting *setting, const char *key, GKeyFile *keyfile) continue; } - g_array_append_val (array, addr.s_addr); + g_array_append_val (array, addr.s_addr); } + g_strfreev (list); if (array) { g_object_set (setting, key, array, NULL); @@ -312,6 +314,332 @@ ip4_dns_parser (NMSetting *setting, const char *key, GKeyFile *keyfile) } } +static void +free_one_ip6_address (gpointer data, gpointer user_data) +{ + g_value_array_free ((GValueArray *) data); +} + +static char * +split_prefix (char *addr) +{ + char *slash; + + g_return_val_if_fail (addr != NULL, NULL); + + /* Find the prefix and split the string */ + slash = strchr (addr, '/'); + if (slash && slash > addr) { + slash++; + *(slash - 1) = '\0'; + } + + return slash; +} + +static char * +split_gw (char *str) +{ + char *comma; + + g_return_val_if_fail (str != NULL, NULL); + + /* Find the prefix and split the string */ + comma = strchr (str, ','); + if (comma && comma > str) { + comma++; + *(comma - 1) = '\0'; + return comma; + } + return NULL; +} + +static GPtrArray * +read_ip6_addresses (GKeyFile *file, + const char *setting_name, + const char *key) +{ + GPtrArray *addresses; + struct in6_addr addr, gw; + guint32 prefix; + int i = 0; + + addresses = g_ptr_array_sized_new (3); + + /* Look for individual addresses */ + while (i++ < 1000) { + char *tmp, *key_name, *str_prefix, *str_gw; + int ret; + GValueArray *values; + GByteArray *address; + GByteArray *gateway; + GValue value = { 0 }; + + key_name = g_strdup_printf ("%s%d", key, i); + tmp = g_key_file_get_string (file, setting_name, key_name, NULL); + g_free (key_name); + + if (!tmp) + break; /* all done */ + + /* convert the string array into IPv6 addresses */ + values = g_value_array_new (2); /* NMIP6Address has 2 items */ + + /* Split the address and prefix */ + str_prefix = split_prefix (tmp); + + /* address */ + ret = inet_pton (AF_INET6, tmp, &addr); + if (ret <= 0) { + g_warning ("%s: ignoring invalid IPv6 %s element '%s'", __func__, key_name, tmp); + g_value_array_free (values); + goto next; + } + + address = g_byte_array_new (); + g_byte_array_append (address, (guint8 *) addr.s6_addr, 16); + g_value_init (&value, DBUS_TYPE_G_UCHAR_ARRAY); + g_value_take_boxed (&value, address); + g_value_array_append (values, &value); + g_value_unset (&value); + + /* prefix */ + prefix = 0; + if (str_prefix) { + if (!get_one_int (str_prefix, 128, key_name, &prefix)) { + g_value_array_free (values); + goto next; + } + } else { + /* Missing prefix defaults to /64 */ + prefix = 64; + } + + g_value_init (&value, G_TYPE_UINT); + g_value_set_uint (&value, prefix); + g_value_array_append (values, &value); + g_value_unset (&value); + + /* Gateway (optional) */ + str_gw = split_gw (str_prefix); + if (str_gw) { + ret = inet_pton (AF_INET6, str_gw, &gw); + if (ret <= 0) { + g_warning ("%s: ignoring invalid IPv6 %s gateway '%s'", __func__, key_name, tmp); + g_value_array_free (values); + goto next; + } + + if (!IN6_IS_ADDR_UNSPECIFIED (&gw)) { + gateway = g_byte_array_new (); + g_byte_array_append (gateway, (guint8 *) gw.s6_addr, 16); + g_value_init (&value, DBUS_TYPE_G_UCHAR_ARRAY); + g_value_take_boxed (&value, gateway); + g_value_array_append (values, &value); + g_value_unset (&value); + } + } + + g_ptr_array_add (addresses, values); + +next: + g_free (tmp); + } + + if (addresses->len < 1) { + g_ptr_array_free (addresses, TRUE); + addresses = NULL; + } + + return addresses; +} + +static void +ip6_addr_parser (NMSetting *setting, const char *key, GKeyFile *keyfile) +{ + GPtrArray *addresses; + const char *setting_name = nm_setting_get_name (setting); + + addresses = read_ip6_addresses (keyfile, setting_name, key); + if (addresses) { + g_object_set (setting, key, addresses, NULL); + g_ptr_array_foreach (addresses, free_one_ip6_address, NULL); + g_ptr_array_free (addresses, TRUE); + } +} + +static void +free_one_ip6_route (gpointer data, gpointer user_data) +{ + g_value_array_free ((GValueArray *) data); +} + +static GPtrArray * +read_ip6_routes (GKeyFile *file, + const char *setting_name, + const char *key) +{ + GPtrArray *routes; + struct in6_addr addr; + guint32 prefix, metric; + int i = 0; + + routes = g_ptr_array_sized_new (3); + + /* Look for individual routes */ + while (i++ < 1000) { + gchar **tmp; + char *key_name, *str_prefix; + gsize length = 0; + int ret; + GValueArray *values; + GByteArray *address; + GValue value = { 0 }; + + key_name = g_strdup_printf ("%s%d", key, i); + tmp = g_key_file_get_string_list (file, setting_name, key_name, &length, NULL); + g_free (key_name); + + if (!tmp || !length) + break; /* all done */ + + if (length != 3) { + g_warning ("%s: ignoring invalid IPv6 address item '%s'", __func__, key_name); + goto next; + } + + /* convert the string array into IPv6 routes */ + values = g_value_array_new (4); /* NMIP6Route has 4 items */ + + /* Split the route and prefix */ + str_prefix = split_prefix (tmp[0]); + + /* destination address */ + ret = inet_pton (AF_INET6, tmp[0], &addr); + if (ret <= 0) { + g_warning ("%s: ignoring invalid IPv6 %s element '%s'", __func__, key_name, tmp[0]); + g_value_array_free (values); + goto next; + } + address = g_byte_array_new (); + g_byte_array_append (address, (guint8 *) addr.s6_addr, 16); + g_value_init (&value, DBUS_TYPE_G_UCHAR_ARRAY); + g_value_take_boxed (&value, address); + g_value_array_append (values, &value); + g_value_unset (&value); + + /* prefix */ + prefix = 0; + if (str_prefix) { + if (!get_one_int (str_prefix, 128, key_name, &prefix)) { + g_value_array_free (values); + goto next; + } + } else { + /* default to 64 if unspecified */ + prefix = 64; + } + g_value_init (&value, G_TYPE_UINT); + g_value_set_uint (&value, prefix); + g_value_array_append (values, &value); + g_value_unset (&value); + + /* next hop address */ + ret = inet_pton (AF_INET6, tmp[1], &addr); + if (ret <= 0) { + g_warning ("%s: ignoring invalid IPv6 %s element '%s'", __func__, key_name, tmp[1]); + g_value_array_free (values); + goto next; + } + address = g_byte_array_new (); + g_byte_array_append (address, (guint8 *) addr.s6_addr, 16); + g_value_init (&value, DBUS_TYPE_G_UCHAR_ARRAY); + g_value_take_boxed (&value, address); + g_value_array_append (values, &value); + g_value_unset (&value); + + /* metric */ + metric = 0; + if (!get_one_int (tmp[2], G_MAXUINT32, key_name, &metric)) { + g_value_array_free (values); + goto next; + } + g_value_init (&value, G_TYPE_UINT); + g_value_set_uint (&value, metric); + g_value_array_append (values, &value); + g_value_unset (&value); + + g_ptr_array_add (routes, values); + +next: + g_strfreev (tmp); + } + + if (routes->len < 1) { + g_ptr_array_free (routes, TRUE); + routes = NULL; + } + + return routes; +} + +static void +ip6_route_parser (NMSetting *setting, const char *key, GKeyFile *keyfile) +{ + GPtrArray *routes; + const char *setting_name = nm_setting_get_name (setting); + + routes = read_ip6_routes (keyfile, setting_name, key); + + if (routes) { + g_object_set (setting, key, routes, NULL); + g_ptr_array_foreach (routes, free_one_ip6_route, NULL); + g_ptr_array_free (routes, TRUE); + } +} + +static void +free_one_ip6_dns (gpointer data, gpointer user_data) +{ + g_byte_array_free ((GByteArray *) data, TRUE); +} + +static void +ip6_dns_parser (NMSetting *setting, const char *key, GKeyFile *keyfile) +{ + const char *setting_name = nm_setting_get_name (setting); + GPtrArray *array = NULL; + gsize length; + char **list, **iter; + int ret; + + list = g_key_file_get_string_list (keyfile, setting_name, key, &length, NULL); + if (!list || !g_strv_length (list)) + return; + + array = g_ptr_array_sized_new (length); + for (iter = list; *iter; iter++) { + GByteArray *byte_array; + struct in6_addr addr; + + ret = inet_pton (AF_INET6, *iter, &addr); + if (ret <= 0) { + g_warning ("%s: ignoring invalid DNS server IPv6 address '%s'", __func__, *iter); + continue; + } + byte_array = g_byte_array_new (); + g_byte_array_append (byte_array, (guint8 *) addr.s6_addr, 16); + + g_ptr_array_add (array, byte_array); + } + g_strfreev (list); + + if (array) { + g_object_set (setting, key, array, NULL); + g_ptr_array_foreach (array, free_one_ip6_dns, NULL); + g_ptr_array_free (array, TRUE); + } +} static void mac_address_parser (NMSetting *setting, const char *key, GKeyFile *keyfile) @@ -407,22 +735,35 @@ typedef struct { /* A table of keys that require further parsing/conversion becuase they are * stored in a format that can't be automatically read using the key's type. - * i.e. IP addresses, which are stored in NetworkManager as guint32, but are - * stored in keyfiles as strings, eg "10.1.1.2". + * i.e. IPv4 addresses, which are stored in NetworkManager as guint32, but are + * stored in keyfiles as strings, eg "10.1.1.2" or IPv6 addresses stored + * in struct in6_addr internally, but as string in keyfiles. */ static KeyParser key_parsers[] = { { NM_SETTING_IP4_CONFIG_SETTING_NAME, NM_SETTING_IP4_CONFIG_ADDRESSES, FALSE, ip4_addr_parser }, + { NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_ADDRESSES, + FALSE, + ip6_addr_parser }, { NM_SETTING_IP4_CONFIG_SETTING_NAME, NM_SETTING_IP4_CONFIG_ROUTES, FALSE, ip4_route_parser }, + { NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_ROUTES, + FALSE, + ip6_route_parser }, { NM_SETTING_IP4_CONFIG_SETTING_NAME, NM_SETTING_IP4_CONFIG_DNS, FALSE, ip4_dns_parser }, + { NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS, + FALSE, + ip6_dns_parser }, { NM_SETTING_WIRED_SETTING_NAME, NM_SETTING_WIRED_MAC_ADDRESS, TRUE, diff --git a/system-settings/plugins/keyfile/io/writer.c b/system-settings/plugins/keyfile/io/writer.c index efa5d1d4e5..355d624c19 100644 --- a/system-settings/plugins/keyfile/io/writer.c +++ b/system-settings/plugins/keyfile/io/writer.c @@ -16,7 +16,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 2008 Novell, Inc. - * Copyright (C) 2008 Red Hat, Inc. + * Copyright (C) 2008 - 2010 Red Hat, Inc. */ #include @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -184,6 +185,207 @@ ip4_route_writer (GKeyFile *file, write_ip4_values (file, setting_name, key, array, 4, 0, 2); } +static void +ip6_dns_writer (GKeyFile *file, + NMSetting *setting, + const char *key, + const GValue *value) +{ + GPtrArray *array; + GByteArray *byte_array; + char **list; + int i, num = 0; + + g_return_if_fail (G_VALUE_HOLDS (value, DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UCHAR)); + + array = (GPtrArray *) g_value_get_boxed (value); + if (!array || !array->len) + return; + + list = g_new0 (char *, array->len + 1); + + for (i = 0; i < array->len; i++) { + char buf[INET6_ADDRSTRLEN]; + + byte_array = g_ptr_array_index (array, i); + if (!inet_ntop (AF_INET6, (struct in6_addr *) byte_array->data, buf, sizeof (buf))) { + int j; + GString *ip6_str = g_string_new (NULL); + g_string_append_printf (ip6_str, "%02X", byte_array->data[0]); + for (j = 1; j < 16; j++) + g_string_append_printf (ip6_str, " %02X", byte_array->data[j]); + nm_warning ("%s: error converting IP6 address %s", + __func__, ip6_str->str); + g_string_free (ip6_str, TRUE); + } else + list[num++] = g_strdup (buf); + } + + g_key_file_set_string_list (file, nm_setting_get_name (setting), key, (const char **) list, num); + g_strfreev (list); +} + +static gboolean +ip6_array_to_addr (GValueArray *values, + guint32 idx, + char *buf, + size_t buflen, + gboolean *out_is_unspec) +{ + GByteArray *byte_array; + GValue *addr_val; + struct in6_addr *addr; + + g_return_val_if_fail (buflen >= INET6_ADDRSTRLEN, FALSE); + + addr_val = g_value_array_get_nth (values, idx); + byte_array = g_value_get_boxed (addr_val); + addr = (struct in6_addr *) byte_array->data; + + if (out_is_unspec && IN6_IS_ADDR_UNSPECIFIED (addr)) + *out_is_unspec = TRUE; + + errno = 0; + if (!inet_ntop (AF_INET6, addr, buf, buflen)) { + GString *ip6_str = g_string_sized_new (INET6_ADDRSTRLEN + 10); + + /* error converting the address */ + g_string_append_printf (ip6_str, "%02X", byte_array->data[0]); + for (idx = 1; idx < 16; idx++) + g_string_append_printf (ip6_str, " %02X", byte_array->data[idx]); + nm_warning ("%s: error %d converting IP6 address %s", + __func__, errno, ip6_str->str); + g_string_free (ip6_str, TRUE); + return FALSE; + } + + return TRUE; +} + +static char * +ip6_array_to_addr_prefix (GValueArray *values) +{ + GValue *prefix_val; + char *ret = NULL; + GString *ip6_str; + char buf[INET6_ADDRSTRLEN + 1]; + gboolean is_unspec = FALSE; + + /* address */ + if (ip6_array_to_addr (values, 0, buf, sizeof (buf), NULL)) { + /* Enough space for the address, '/', and the prefix */ + ip6_str = g_string_sized_new ((INET6_ADDRSTRLEN * 2) + 5); + + /* prefix */ + g_string_append (ip6_str, buf); + prefix_val = g_value_array_get_nth (values, 1); + g_string_append_printf (ip6_str, "/%u", g_value_get_uint (prefix_val)); + + if (ip6_array_to_addr (values, 2, buf, sizeof (buf), &is_unspec)) { + if (!is_unspec) + g_string_append_printf (ip6_str, ",%s", buf); + } + + ret = ip6_str->str; + g_string_free (ip6_str, FALSE); + } + + return ret; +} + +static void +ip6_addr_writer (GKeyFile *file, + NMSetting *setting, + const char *key, + const GValue *value) +{ + GPtrArray *array; + const char *setting_name = nm_setting_get_name (setting); + int i, j; + + g_return_if_fail (G_VALUE_HOLDS (value, DBUS_TYPE_G_ARRAY_OF_IP6_ADDRESS)); + + array = (GPtrArray *) g_value_get_boxed (value); + if (!array || !array->len) + return; + + for (i = 0, j = 1; i < array->len; i++) { + GValueArray *values = g_ptr_array_index (array, i); + char *key_name, *ip6_addr; + + if (values->n_values != 3) { + nm_warning ("%s: error writing IP6 address %d (address array length " + "%d is not 3)", + __func__, i, values->n_values); + continue; + } + + ip6_addr = ip6_array_to_addr_prefix (values); + if (ip6_addr) { + /* Write it out */ + key_name = g_strdup_printf ("%s%d", key, j++); + g_key_file_set_string (file, setting_name, key_name, ip6_addr); + g_free (key_name); + g_free (ip6_addr); + } + } +} + +static void +ip6_route_writer (GKeyFile *file, + NMSetting *setting, + const char *key, + const GValue *value) +{ + GPtrArray *array; + const char *setting_name = nm_setting_get_name (setting); + char *list[3]; + int i, j; + + g_return_if_fail (G_VALUE_HOLDS (value, DBUS_TYPE_G_ARRAY_OF_IP6_ROUTE)); + + array = (GPtrArray *) g_value_get_boxed (value); + if (!array || !array->len) + return; + + for (i = 0, j = 1; i < array->len; i++) { + GValueArray *values = g_ptr_array_index (array, i); + char *key_name; + guint32 int_val; + char buf[INET6_ADDRSTRLEN + 1]; + gboolean is_unspec = FALSE; + + memset (list, 0, sizeof (list)); + + /* Address and prefix */ + list[0] = ip6_array_to_addr_prefix (values); + if (!list[0]) + continue; + + /* Next Hop */ + if (!ip6_array_to_addr (values, 2, buf, sizeof (buf), &is_unspec)) + continue; + if (is_unspec) + continue; + list[1] = g_strdup (buf); + + /* Metric */ + value = g_value_array_get_nth (values, 3); + int_val = g_value_get_uint (value); + list[2] = g_strdup_printf ("%d", int_val); + + /* Write it out */ + key_name = g_strdup_printf ("%s%d", key, j++); + g_key_file_set_string_list (file, setting_name, key_name, (const char **) list, 3); + g_free (key_name); + + g_free (list[0]); + g_free (list[1]); + g_free (list[2]); + } +} + + static void mac_address_writer (GKeyFile *file, NMSetting *setting, @@ -259,19 +461,29 @@ typedef struct { /* A table of keys that require further parsing/conversion becuase they are * stored in a format that can't be automatically read using the key's type. - * i.e. IP addresses, which are stored in NetworkManager as guint32, but are - * stored in keyfiles as strings, eg "10.1.1.2". + * i.e. IPv4 addresses, which are stored in NetworkManager as guint32, but are + * stored in keyfiles as strings, eg "10.1.1.2" or IPv6 addresses stored + * in struct in6_addr internally, but as string in keyfiles. */ static KeyWriter key_writers[] = { { NM_SETTING_IP4_CONFIG_SETTING_NAME, NM_SETTING_IP4_CONFIG_ADDRESSES, ip4_addr_writer }, + { NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_ADDRESSES, + ip6_addr_writer }, { NM_SETTING_IP4_CONFIG_SETTING_NAME, NM_SETTING_IP4_CONFIG_ROUTES, ip4_route_writer }, + { NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_ROUTES, + ip6_route_writer }, { NM_SETTING_IP4_CONFIG_SETTING_NAME, NM_SETTING_IP4_CONFIG_DNS, ip4_dns_writer }, + { NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS, + ip6_dns_writer }, { NM_SETTING_WIRED_SETTING_NAME, NM_SETTING_WIRED_MAC_ADDRESS, mac_address_writer }, diff --git a/system-settings/plugins/keyfile/nm-keyfile-connection.c b/system-settings/plugins/keyfile/nm-keyfile-connection.c index b64c2f906e..ed56d69d2e 100644 --- a/system-settings/plugins/keyfile/nm-keyfile-connection.c +++ b/system-settings/plugins/keyfile/nm-keyfile-connection.c @@ -88,7 +88,8 @@ update (NMSettingsConnectionInterface *connection, success = parent_settings_connection_iface->update (connection, callback, user_data); } else { callback (connection, error, user_data); - g_error_free (error); + if (error) + g_error_free (error); g_free (filename); } diff --git a/system-settings/plugins/keyfile/plugin.c b/system-settings/plugins/keyfile/plugin.c index 40f0960ff8..36f47ccdc5 100644 --- a/system-settings/plugins/keyfile/plugin.c +++ b/system-settings/plugins/keyfile/plugin.c @@ -42,7 +42,8 @@ #define KEYFILE_PLUGIN_NAME "keyfile" #define KEYFILE_PLUGIN_INFO "(c) 2007 - 2008 Red Hat, Inc. To report bugs please use the NetworkManager mailing list." -#define CONF_FILE SYSCONFDIR "/NetworkManager/nm-system-settings.conf" +#define CONF_FILE SYSCONFDIR "/NetworkManager/NetworkManager.conf" +#define OLD_CONF_FILE SYSCONFDIR "/NetworkManager/nm-system-settings.conf" static char *plugin_get_hostname (SCPluginKeyfile *plugin); static void system_config_interface_init (NMSystemConfigInterface *system_config_interface_class); @@ -59,6 +60,7 @@ typedef struct { GFileMonitor *monitor; guint monitor_id; + const char *conf_file; GFileMonitor *conf_file_monitor; guint conf_file_monitor_id; @@ -297,7 +299,7 @@ setup_monitoring (NMSystemConfigInterface *config) priv->monitor = monitor; } - file = g_file_new_for_path (CONF_FILE); + file = g_file_new_for_path (priv->conf_file); monitor = g_file_monitor_file (file, G_FILE_MONITOR_NONE, NULL, NULL); g_object_unref (file); @@ -344,12 +346,13 @@ add_connection (NMSystemConfigInterface *config, static GSList * get_unmanaged_specs (NMSystemConfigInterface *config) { + SCPluginKeyfilePrivate *priv = SC_PLUGIN_KEYFILE_GET_PRIVATE (config); GKeyFile *key_file; GSList *specs = NULL; GError *error = NULL; key_file = g_key_file_new (); - if (g_key_file_load_from_file (key_file, CONF_FILE, G_KEY_FILE_NONE, &error)) { + if (g_key_file_load_from_file (key_file, priv->conf_file, G_KEY_FILE_NONE, &error)) { char *str; str = g_key_file_get_value (key_file, "keyfile", "unmanaged-devices", NULL); @@ -366,7 +369,7 @@ get_unmanaged_specs (NMSystemConfigInterface *config) g_free (udis); /* Yes, g_free, not g_strfreev because we need the strings in the list */ } } else { - g_warning ("Error parsing file '%s': %s", CONF_FILE, error->message); + g_warning ("Error parsing file '%s': %s", priv->conf_file, error->message); g_error_free (error); } @@ -378,15 +381,16 @@ get_unmanaged_specs (NMSystemConfigInterface *config) static char * plugin_get_hostname (SCPluginKeyfile *plugin) { + SCPluginKeyfilePrivate *priv = SC_PLUGIN_KEYFILE_GET_PRIVATE (plugin); GKeyFile *key_file; char *hostname = NULL; GError *error = NULL; key_file = g_key_file_new (); - if (g_key_file_load_from_file (key_file, CONF_FILE, G_KEY_FILE_NONE, &error)) + if (g_key_file_load_from_file (key_file, priv->conf_file, G_KEY_FILE_NONE, &error)) hostname = g_key_file_get_value (key_file, "keyfile", "hostname", NULL); else { - g_warning ("Error parsing file '%s': %s", CONF_FILE, error->message); + g_warning ("Error parsing file '%s': %s", priv->conf_file, error->message); g_error_free (error); } @@ -404,7 +408,7 @@ plugin_set_hostname (SCPluginKeyfile *plugin, const char *hostname) gboolean result = FALSE; key_file = g_key_file_new (); - if (g_key_file_load_from_file (key_file, CONF_FILE, G_KEY_FILE_NONE, &error)) { + if (g_key_file_load_from_file (key_file, priv->conf_file, G_KEY_FILE_NONE, &error)) { char *data; gsize len; @@ -412,7 +416,7 @@ plugin_set_hostname (SCPluginKeyfile *plugin, const char *hostname) data = g_key_file_to_data (key_file, &len, &error); if (data) { - g_file_set_contents (CONF_FILE, data, len, &error); + g_file_set_contents (priv->conf_file, data, len, &error); g_free (data); g_free (priv->hostname); @@ -425,7 +429,7 @@ plugin_set_hostname (SCPluginKeyfile *plugin, const char *hostname) g_error_free (error); } } else { - g_warning ("Error parsing file '%s': %s", CONF_FILE, error->message); + g_warning ("Error parsing file '%s': %s", priv->conf_file, error->message); g_error_free (error); } @@ -441,6 +445,11 @@ sc_plugin_keyfile_init (SCPluginKeyfile *plugin) { SCPluginKeyfilePrivate *priv = SC_PLUGIN_KEYFILE_GET_PRIVATE (plugin); + if (g_file_test (CONF_FILE, G_FILE_TEST_EXISTS)) + priv->conf_file = CONF_FILE; + else + priv->conf_file = OLD_CONF_FILE; + priv->hostname = plugin_get_hostname (plugin); } diff --git a/system-settings/plugins/keyfile/tests/keyfiles/Makefile.am b/system-settings/plugins/keyfile/tests/keyfiles/Makefile.am index ed2acb96f1..bf5a5ab060 100644 --- a/system-settings/plugins/keyfile/tests/keyfiles/Makefile.am +++ b/system-settings/plugins/keyfile/tests/keyfiles/Makefile.am @@ -1,7 +1,9 @@ EXTRA_DIST = \ Test_Wired_Connection \ Test_GSM_Connection \ - Test_Wireless_Connection + Test_Wireless_Connection \ + Test_Wired_Connection_MAC_Case \ + Test_Wired_Connection_IP6 check-local: @for f in $(EXTRA_DIST); do \ diff --git a/system-settings/plugins/keyfile/tests/keyfiles/Test_Wired_Connection b/system-settings/plugins/keyfile/tests/keyfiles/Test_Wired_Connection index f542811551..5785dc2485 100644 --- a/system-settings/plugins/keyfile/tests/keyfiles/Test_Wired_Connection +++ b/system-settings/plugins/keyfile/tests/keyfiles/Test_Wired_Connection @@ -20,3 +20,13 @@ addresses1=192.168.0.5;24;192.168.0.1; addresses2=1.2.3.4;16;1.2.1.1; ignore-auto-routes=false ignore-auto-dns=false + +[ipv6] +method=manual +dns=1111:dddd::aaaa;1::cafe; +dns-search=super-domain.com;redhat.com;gnu.org; +addresses1=abcd:1234:ffff::cdde/64 +addresses2=1:2:3:4:5:6:7:8/96 +routes1=a:b:c:d::/64;f:e:d:c:1:2:3:4;99; +ignore-auto-routes=false +ignore-auto-dns=false diff --git a/system-settings/plugins/keyfile/tests/keyfiles/Test_Wired_Connection_IP6 b/system-settings/plugins/keyfile/tests/keyfiles/Test_Wired_Connection_IP6 new file mode 100644 index 0000000000..a42dd5d2a5 --- /dev/null +++ b/system-settings/plugins/keyfile/tests/keyfiles/Test_Wired_Connection_IP6 @@ -0,0 +1,20 @@ + +[connection] +id=Test Wired Connection IP6 +uuid=4e80a56d-c99f-4aad-a6dd-b449bc398c57 +type=802-3-ethernet +autoconnect=true +timestamp=6654332 + +[802-3-ethernet] +auto-negotiate=true +mtu=1400 + +[ipv4] +method=disabled + +[ipv6] +method=manual +addresses1=abcd:1234:ffff::cdde/64,abcd:1234:ffff::cdd1 +dns=1111:dddd::aaaa;1::cafe; + diff --git a/system-settings/plugins/keyfile/tests/keyfiles/Test_Wired_Connection_MAC_Case b/system-settings/plugins/keyfile/tests/keyfiles/Test_Wired_Connection_MAC_Case new file mode 100644 index 0000000000..29aef49494 --- /dev/null +++ b/system-settings/plugins/keyfile/tests/keyfiles/Test_Wired_Connection_MAC_Case @@ -0,0 +1,32 @@ + +[connection] +id=Test Wired Connection MAC Case +uuid=4e80a56d-c99f-4aad-a6dd-b449bc398c57 +type=802-3-ethernet +autoconnect=true +timestamp=6654332 + +[802-3-ethernet] +mac-address=00:11:aa:BB:CC:55 +speed=0 +duplex=full +auto-negotiate=true +mtu=1400 + +[ipv4] +method=manual +dns=4.2.2.1;4.2.2.2; +addresses1=192.168.0.5;24;192.168.0.1; +addresses2=1.2.3.4;16;1.2.1.1; +ignore-auto-routes=false +ignore-auto-dns=false + +[ipv6] +method=manual +dns=1111:dddd::aaaa;1::cafe; +dns-search=super-domain.com;redhat.com;gnu.org; +addresses1=abcd:1234:ffff::cdde/64 +addresses2=1:2:3:4:5:6:7:8/96 +routes1=a:b:c:d::/64;f:e:d:c:1:2:3:4;99; +ignore-auto-routes=false +ignore-auto-dns=false diff --git a/system-settings/plugins/keyfile/tests/test-keyfile.c b/system-settings/plugins/keyfile/tests/test-keyfile.c index 0f8c2ccbe3..aae823642b 100644 --- a/system-settings/plugins/keyfile/tests/test-keyfile.c +++ b/system-settings/plugins/keyfile/tests/test-keyfile.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2008 Red Hat, Inc. + * Copyright (C) 2008 - 2010 Red Hat, Inc. */ #include @@ -34,6 +34,7 @@ #include #include #include +#include #include "nm-test-helpers.h" @@ -50,6 +51,7 @@ test_read_valid_wired_connection (void) NMSettingConnection *s_con; NMSettingWired *s_wired; NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; GError *error = NULL; const GByteArray *array; char expected_mac_address[ETH_ALEN] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55 }; @@ -66,6 +68,18 @@ test_read_valid_wired_connection (void) const char *expected_address1_gw = "192.168.0.1"; const char *expected_address2_gw = "1.2.1.1"; NMIP4Address *ip4_addr; + const char *expected6_dns1 = "1111:dddd::aaaa"; + const char *expected6_dns2 = "1::cafe"; + const char *expected6_dnssearch1 = "super-domain.com"; + const char *expected6_dnssearch2 = "redhat.com"; + const char *expected6_dnssearch3 = "gnu.org"; + struct in6_addr addr6; + const char *expected6_address1 = "abcd:1234:ffff::cdde"; + const char *expected6_address2 = "1:2:3:4:5:6:7:8"; + const char *expected6_route_dest = "a:b:c:d::"; + const char *expected6_route_nh = "f:e:d:c:1:2:3:4"; + NMIP6Address *ip6_addr; + NMIP6Route *ip6_route; connection = connection_from_file (TEST_WIRED_FILE); ASSERT (connection != NULL, @@ -215,7 +229,7 @@ test_read_valid_wired_connection (void) NM_SETTING_IP4_CONFIG_ADDRESSES); ASSERT (nm_ip4_address_get_prefix (ip4_addr) == 24, - "connection-verify-wired", "failed to verify %s: unexpected IP4 address #1 gateway", + "connection-verify-wired", "failed to verify %s: unexpected IP4 address #1 prefix", TEST_WIRED_FILE, NM_SETTING_IP4_CONFIG_SETTING_NAME, NM_SETTING_IP4_CONFIG_ADDRESSES); @@ -251,7 +265,7 @@ test_read_valid_wired_connection (void) NM_SETTING_IP4_CONFIG_ADDRESSES); ASSERT (nm_ip4_address_get_prefix (ip4_addr) == 16, - "connection-verify-wired", "failed to verify %s: unexpected IP4 address #2 gateway", + "connection-verify-wired", "failed to verify %s: unexpected IP4 address #2 prefix", TEST_WIRED_FILE, NM_SETTING_IP4_CONFIG_SETTING_NAME, NM_SETTING_IP4_CONFIG_ADDRESSES); @@ -278,6 +292,172 @@ test_read_valid_wired_connection (void) NM_SETTING_IP4_CONFIG_SETTING_NAME, NM_SETTING_IP4_CONFIG_ADDRESSES); + /* ===== IPv6 SETTING ===== */ + + s_ip6 = NM_SETTING_IP6_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG)); + ASSERT (s_ip6 != NULL, + "connection-verify-ip6", "failed to verify %s: missing %s setting", + TEST_WIRED_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME); + + /* Method */ + tmp = nm_setting_ip6_config_get_method (s_ip6); + ASSERT (strcmp (tmp, NM_SETTING_IP6_CONFIG_METHOD_MANUAL) == 0, + "connection-verify-wired", "failed to verify %s: unexpected %s / %s key value", + TEST_WIRED_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_METHOD); + + /* DNS Addresses */ + ASSERT (nm_setting_ip6_config_get_num_dns (s_ip6) == 2, + "connection-verify-wired", "failed to verify %s: unexpected %s / %s key value", + TEST_WIRED_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS); + + ASSERT (inet_pton (AF_INET6, expected6_dns1, &addr6) > 0, + "connection-verify-wired", "failed to verify %s: couldn't convert DNS IP6 address #1", + TEST_WIRED_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS); + ASSERT (IN6_ARE_ADDR_EQUAL (nm_setting_ip6_config_get_dns (s_ip6, 0), &addr6), + "connection-verify-wired", "failed to verify %s: unexpected %s / %s key value #1", + TEST_WIRED_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS); + + ASSERT (inet_pton (AF_INET6, expected6_dns2, &addr6) > 0, + "connection-verify-wired", "failed to verify %s: couldn't convert DNS IP address #2", + TEST_WIRED_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS); + ASSERT (IN6_ARE_ADDR_EQUAL (nm_setting_ip6_config_get_dns (s_ip6, 1), &addr6), + "connection-verify-wired", "failed to verify %s: unexpected %s / %s key value #2", + TEST_WIRED_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS); + + ASSERT (nm_setting_ip6_config_get_num_addresses (s_ip6) == 2, + "connection-verify-wired", "failed to verify %s: unexpected %s / %s key value", + TEST_WIRED_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS); + + /* DNS Searches */ + ASSERT (nm_setting_ip6_config_get_num_dns_searches (s_ip6) == 3, + "connection-verify-wired", "failed to verify %s: unexpected %s / %s key value", + TEST_WIRED_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS_SEARCH); + + ASSERT (!strcmp (nm_setting_ip6_config_get_dns_search (s_ip6, 0), expected6_dnssearch1), + "connection-verify-wired", "failed to verify %s: unexpected %s / %s key value #1", + TEST_WIRED_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS_SEARCH); + ASSERT (!strcmp (nm_setting_ip6_config_get_dns_search (s_ip6, 1), expected6_dnssearch2), + "connection-verify-wired", "failed to verify %s: unexpected %s / %s key value #2", + TEST_WIRED_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS_SEARCH); + ASSERT (!strcmp (nm_setting_ip6_config_get_dns_search (s_ip6, 2), expected6_dnssearch3), + "connection-verify-wired", "failed to verify %s: unexpected %s / %s key value #3", + TEST_WIRED_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS_SEARCH); + + /* Address #1 */ + ip6_addr = nm_setting_ip6_config_get_address (s_ip6, 0); + ASSERT (ip6_addr, + "connection-verify-wired", "failed to verify %s: missing IP6 address #1", + TEST_WIRED_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_ADDRESSES); + + ASSERT (nm_ip6_address_get_prefix (ip6_addr) == 64, + "connection-verify-wired", "failed to verify %s: unexpected IP6 address #1 prefix", + TEST_WIRED_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_ADDRESSES); + + ASSERT (inet_pton (AF_INET6, expected6_address1, &addr6) > 0, + "connection-verify-wired", "failed to verify %s: couldn't convert IP address #1", + TEST_WIRED_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS); + ASSERT (IN6_ARE_ADDR_EQUAL (nm_ip6_address_get_address (ip6_addr), &addr6), + "connection-verify-wired", "failed to verify %s: unexpected IP4 address #1", + TEST_WIRED_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_ADDRESSES); + + /* Address #2 */ + ip6_addr = nm_setting_ip6_config_get_address (s_ip6, 1); + ASSERT (ip6_addr, + "connection-verify-wired", "failed to verify %s: missing IP6 address #2", + TEST_WIRED_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_ADDRESSES); + + ASSERT (nm_ip6_address_get_prefix (ip6_addr) == 96, + "connection-verify-wired", "failed to verify %s: unexpected IP6 address #2 prefix", + TEST_WIRED_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_ADDRESSES); + + ASSERT (inet_pton (AF_INET6, expected6_address2, &addr6) > 0, + "connection-verify-wired", "failed to verify %s: couldn't convert IP address #2", + TEST_WIRED_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS); + ASSERT (IN6_ARE_ADDR_EQUAL (nm_ip6_address_get_address (ip6_addr), &addr6), + "connection-verify-wired", "failed to verify %s: unexpected IP6 address #2", + TEST_WIRED_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_ADDRESSES); + + /* Route #1 */ + ip6_route = nm_setting_ip6_config_get_route (s_ip6, 0); + ASSERT (ip6_route, + "connection-verify-wired", "failed to verify %s: missing IP6 route #1", + TEST_WIRED_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_ROUTES); + + ASSERT (inet_pton (AF_INET6, expected6_route_dest, &addr6) > 0, + "connection-verify-wired", "failed to verify %s: couldn't convert IP route dest #1", + TEST_WIRED_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS); + ASSERT (IN6_ARE_ADDR_EQUAL (nm_ip6_route_get_dest (ip6_route), &addr6), + "connection-verify-wired", "failed to verify %s: unexpected IP4 route dest #1", + TEST_WIRED_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_ROUTES); + + ASSERT (nm_ip6_route_get_prefix (ip6_route) == 64, + "connection-verify-wired", "failed to verify %s: unexpected IP6 route #1 prefix", + TEST_WIRED_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_ROUTES); + + ASSERT (inet_pton (AF_INET6, expected6_route_nh, &addr6) > 0, + "connection-verify-wired", "failed to verify %s: couldn't convert IP route next hop #1", + TEST_WIRED_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS); + ASSERT (IN6_ARE_ADDR_EQUAL (nm_ip6_route_get_next_hop (ip6_route), &addr6), + "connection-verify-wired", "failed to verify %s: unexpected IP4 route dest #1", + TEST_WIRED_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_ROUTES); + + ASSERT (nm_ip6_route_get_metric (ip6_route) == 99, + "connection-verify-wired", "failed to verify %s: unexpected IP6 route #1 metric", + TEST_WIRED_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_ROUTES); + g_object_unref (connection); } @@ -327,6 +507,55 @@ add_one_ip4_route (NMSettingIP4Config *s_ip4, nm_ip4_route_unref (route); } +static void +add_one_ip6_address (NMSettingIP6Config *s_ip6, + const char *addr, + guint32 prefix, + const char *gw) +{ + struct in6_addr tmp; + NMIP6Address *ip6_addr; + + ip6_addr = nm_ip6_address_new (); + nm_ip6_address_set_prefix (ip6_addr, prefix); + + inet_pton (AF_INET6, addr, &tmp); + nm_ip6_address_set_address (ip6_addr, &tmp); + + if (gw) { + inet_pton (AF_INET6, gw, &tmp); + nm_ip6_address_set_gateway (ip6_addr, &tmp); + } + + nm_setting_ip6_config_add_address (s_ip6, ip6_addr); + nm_ip6_address_unref (ip6_addr); +} + +static void +add_one_ip6_route (NMSettingIP6Config *s_ip6, + const char *dest, + const char *nh, + guint32 prefix, + guint32 metric) +{ + struct in6_addr addr; + NMIP6Route *route; + + route = nm_ip6_route_new (); + nm_ip6_route_set_prefix (route, prefix); + nm_ip6_route_set_metric (route, metric); + + inet_pton (AF_INET6, dest, &addr); + nm_ip6_route_set_dest (route, &addr); + + inet_pton (AF_INET6, nh, &addr); + nm_ip6_route_set_next_hop (route, &addr); + + nm_setting_ip6_config_add_route (s_ip6, route); + nm_ip6_route_unref (route); +} + + static void test_write_wired_connection (void) { @@ -334,6 +563,7 @@ test_write_wired_connection (void) NMSettingConnection *s_con; NMSettingWired *s_wired; NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; char *uuid; GByteArray *mac; unsigned char tmpmac[] = { 0x99, 0x88, 0x77, 0x66, 0x55, 0x44 }; @@ -344,6 +574,7 @@ test_write_wired_connection (void) pid_t owner_grp; uid_t owner_uid; struct in_addr addr; + struct in6_addr addr6; const char *dns1 = "4.2.2.1"; const char *dns2 = "4.2.2.2"; const char *address1 = "192.168.0.5"; @@ -354,6 +585,14 @@ test_write_wired_connection (void) const char *route1_nh = "10.10.10.1"; const char *route2 = "0.0.0.0"; const char *route2_nh = "1.2.1.1"; + const char *dns6_1 = "1::cafe"; + const char *dns6_2 = "2::cafe"; + const char *address6_1 = "abcd::beef"; + const char *address6_2 = "dcba::beef"; + const char *route6_1 = "1:2:3:4:5:6:7:8"; + const char *route6_1_nh = "8:7:6:5:4:3:2:1"; + const char *route6_2 = "::"; + const char *route6_2_nh = "2001::1111"; guint64 timestamp = 0x12345678L; connection = nm_connection_new (); @@ -420,6 +659,35 @@ test_write_wired_connection (void) inet_pton (AF_INET, dns2, &addr); nm_setting_ip4_config_add_dns (s_ip4, addr.s_addr); + /* IP6 setting */ + + s_ip6 = NM_SETTING_IP6_CONFIG (nm_setting_ip6_config_new ()); + ASSERT (s_ip6 != NULL, + "connection-write", "failed to allocate new %s setting", + NM_SETTING_IP6_CONFIG_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_ip6)); + + g_object_set (s_ip6, + NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_MANUAL, + NULL); + + /* Addresses */ + add_one_ip6_address (s_ip6, address6_1, 64, NULL); + add_one_ip6_address (s_ip6, address6_2, 56, NULL); + + /* Routes */ + add_one_ip6_route (s_ip6, route6_1, route6_1_nh, 64, 3); + add_one_ip6_route (s_ip6, route6_2, route6_2_nh, 56, 1); + + /* DNS servers */ + inet_pton (AF_INET6, dns6_1, &addr6); + nm_setting_ip6_config_add_dns (s_ip6, &addr6); + inet_pton (AF_INET6, dns6_2, &addr6); + nm_setting_ip6_config_add_dns (s_ip6, &addr6); + + /* DNS searches */ + nm_setting_ip6_config_add_dns_search (s_ip6, "wallaceandgromit.com"); + /* Write out the connection */ owner_uid = geteuid (); owner_grp = getegid (); @@ -446,6 +714,351 @@ test_write_wired_connection (void) g_object_unref (connection); } +#define TEST_WIRED_IP6_FILE TEST_KEYFILES_DIR"/Test_Wired_Connection_IP6" + +static void +test_read_ip6_wired_connection (void) +{ + NMConnection *connection; + NMSettingConnection *s_con; + NMSettingWired *s_wired; + NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; + GError *error = NULL; + const char *tmp; + const char *expected_id = "Test Wired Connection IP6"; + const char *expected_uuid = "4e80a56d-c99f-4aad-a6dd-b449bc398c57"; + struct in6_addr addr6; + const char *expected6_address1 = "abcd:1234:ffff::cdde"; + const char *expected6_gw1 = "abcd:1234:ffff::cdd1"; + NMIP6Address *ip6_addr; + + connection = connection_from_file (TEST_WIRED_IP6_FILE); + ASSERT (connection != NULL, + "connection-read", "failed to read %s", TEST_WIRED_IP6_FILE); + + ASSERT (nm_connection_verify (connection, &error), + "connection-verify", "failed to verify %s: %s", TEST_WIRED_IP6_FILE, error->message); + + /* ===== CONNECTION SETTING ===== */ + + s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION)); + ASSERT (s_con != NULL, + "connection-verify-connection", "failed to verify %s: missing %s setting", + TEST_WIRED_IP6_FILE, + NM_SETTING_CONNECTION_SETTING_NAME); + + /* ID */ + tmp = nm_setting_connection_get_id (s_con); + ASSERT (tmp != NULL, + "connection-verify-connection", "failed to verify %s: missing %s / %s key", + TEST_WIRED_IP6_FILE, + NM_SETTING_CONNECTION_SETTING_NAME, + NM_SETTING_CONNECTION_ID); + ASSERT (strcmp (tmp, expected_id) == 0, + "connection-verify-connection", "failed to verify %s: unexpected %s / %s key value", + TEST_WIRED_IP6_FILE, + NM_SETTING_CONNECTION_SETTING_NAME, + NM_SETTING_CONNECTION_ID); + + /* UUID */ + tmp = nm_setting_connection_get_uuid (s_con); + ASSERT (tmp != NULL, + "connection-verify-connection", "failed to verify %s: missing %s / %s key", + TEST_WIRED_IP6_FILE, + NM_SETTING_CONNECTION_SETTING_NAME, + NM_SETTING_CONNECTION_UUID); + ASSERT (strcmp (tmp, expected_uuid) == 0, + "connection-verify-connection", "failed to verify %s: unexpected %s / %s key value", + TEST_WIRED_IP6_FILE, + NM_SETTING_CONNECTION_SETTING_NAME, + NM_SETTING_CONNECTION_UUID); + + /* ===== WIRED SETTING ===== */ + + s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED)); + ASSERT (s_wired != NULL, + "connection-verify-wired", "failed to verify %s: missing %s setting", + TEST_WIRED_IP6_FILE, + NM_SETTING_WIRED_SETTING_NAME); + + /* ===== IPv4 SETTING ===== */ + + s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG)); + ASSERT (s_ip4 != NULL, + "connection-verify-ip4", "failed to verify %s: missing %s setting", + TEST_WIRED_IP6_FILE, + NM_SETTING_IP4_CONFIG_SETTING_NAME); + + /* Method */ + tmp = nm_setting_ip4_config_get_method (s_ip4); + ASSERT (strcmp (tmp, NM_SETTING_IP4_CONFIG_METHOD_DISABLED) == 0, + "connection-verify-wired", "failed to verify %s: unexpected %s / %s key value", + TEST_WIRED_IP6_FILE, + NM_SETTING_IP4_CONFIG_SETTING_NAME, + NM_SETTING_IP4_CONFIG_METHOD); + + ASSERT (nm_setting_ip4_config_get_num_addresses (s_ip4) == 0, + "connection-verify-wired", "failed to verify %s: unexpected %s / %s key value", + TEST_WIRED_IP6_FILE, + NM_SETTING_IP4_CONFIG_SETTING_NAME, + NM_SETTING_IP4_CONFIG_DNS); + + /* ===== IPv6 SETTING ===== */ + + s_ip6 = NM_SETTING_IP6_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG)); + ASSERT (s_ip6 != NULL, + "connection-verify-ip6", "failed to verify %s: missing %s setting", + TEST_WIRED_IP6_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME); + + /* Method */ + tmp = nm_setting_ip6_config_get_method (s_ip6); + ASSERT (strcmp (tmp, NM_SETTING_IP6_CONFIG_METHOD_MANUAL) == 0, + "connection-verify-wired", "failed to verify %s: unexpected %s / %s key value", + TEST_WIRED_IP6_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_METHOD); + + ASSERT (nm_setting_ip6_config_get_num_addresses (s_ip6) == 1, + "connection-verify-wired", "failed to verify %s: unexpected %s / %s key value", + TEST_WIRED_IP6_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS); + + /* Address #1 */ + ip6_addr = nm_setting_ip6_config_get_address (s_ip6, 0); + ASSERT (ip6_addr, + "connection-verify-wired", "failed to verify %s: missing IP6 address #1", + TEST_WIRED_IP6_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_ADDRESSES); + + ASSERT (nm_ip6_address_get_prefix (ip6_addr) == 64, + "connection-verify-wired", "failed to verify %s: unexpected IP6 address #1 prefix", + TEST_WIRED_IP6_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_ADDRESSES); + + ASSERT (inet_pton (AF_INET6, expected6_address1, &addr6) > 0, + "connection-verify-wired", "failed to verify %s: couldn't convert IP address #1", + TEST_WIRED_IP6_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_ADDRESSES); + ASSERT (IN6_ARE_ADDR_EQUAL (nm_ip6_address_get_address (ip6_addr), &addr6), + "connection-verify-wired", "failed to verify %s: unexpected IP4 address #1", + TEST_WIRED_IP6_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_ADDRESSES); + + ASSERT (inet_pton (AF_INET6, expected6_gw1, &addr6) > 0, + "connection-verify-wired", "failed to verify %s: couldn't convert GW address #1", + TEST_WIRED_IP6_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_ADDRESSES); + ASSERT (IN6_ARE_ADDR_EQUAL (nm_ip6_address_get_gateway (ip6_addr), &addr6), + "connection-verify-wired", "failed to verify %s: unexpected IP4 address #1", + TEST_WIRED_IP6_FILE, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_ADDRESSES); + + g_object_unref (connection); +} + +static void +test_write_ip6_wired_connection (void) +{ + NMConnection *connection; + NMSettingConnection *s_con; + NMSettingWired *s_wired; + NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; + char *uuid; + gboolean success; + NMConnection *reread; + char *testfile = NULL; + GError *error = NULL; + pid_t owner_grp; + uid_t owner_uid; + struct in6_addr addr6; + const char *dns = "1::cafe"; + const char *address = "abcd::beef"; + const char *gw = "dcba::beef"; + + connection = nm_connection_new (); + ASSERT (connection != NULL, + "connection-write", "failed to allocate new connection"); + + /* Connection setting */ + + s_con = NM_SETTING_CONNECTION (nm_setting_connection_new ()); + ASSERT (s_con != NULL, + "connection-write", "failed to allocate new %s setting", + NM_SETTING_CONNECTION_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_con)); + + uuid = nm_utils_uuid_generate (); + g_object_set (s_con, + NM_SETTING_CONNECTION_ID, "Work Wired IP6", + NM_SETTING_CONNECTION_UUID, uuid, + NM_SETTING_CONNECTION_AUTOCONNECT, FALSE, + NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME, + NULL); + g_free (uuid); + + /* Wired setting */ + + s_wired = NM_SETTING_WIRED (nm_setting_wired_new ()); + ASSERT (s_wired != NULL, + "connection-write", "failed to allocate new %s setting", + NM_SETTING_WIRED_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_wired)); + + /* IP4 setting */ + + s_ip4 = NM_SETTING_IP4_CONFIG (nm_setting_ip4_config_new ()); + ASSERT (s_ip4 != NULL, + "connection-write", "failed to allocate new %s setting", + NM_SETTING_IP4_CONFIG_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_ip4)); + + g_object_set (s_ip4, + NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_DISABLED, + NULL); + + /* IP6 setting */ + + s_ip6 = NM_SETTING_IP6_CONFIG (nm_setting_ip6_config_new ()); + ASSERT (s_ip6 != NULL, + "connection-write", "failed to allocate new %s setting", + NM_SETTING_IP6_CONFIG_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_ip6)); + + g_object_set (s_ip6, + NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_MANUAL, + NULL); + + /* Addresses */ + add_one_ip6_address (s_ip6, address, 64, gw); + + /* DNS servers */ + inet_pton (AF_INET6, dns, &addr6); + nm_setting_ip6_config_add_dns (s_ip6, &addr6); + + /* DNS searches */ + nm_setting_ip6_config_add_dns_search (s_ip6, "wallaceandgromit.com"); + + /* Write out the connection */ + owner_uid = geteuid (); + owner_grp = getegid (); + success = write_connection (connection, TEST_SCRATCH_DIR, owner_uid, owner_grp, &testfile, &error); + ASSERT (success == TRUE, + "connection-write", "failed to allocate write keyfile: %s", + error ? error->message : "(none)"); + + ASSERT (testfile != NULL, + "connection-write", "didn't get keyfile name back after writing connection"); + + /* Read the connection back in and compare it to the one we just wrote out */ + reread = connection_from_file (testfile); + ASSERT (reread != NULL, "connection-write", "failed to re-read test connection"); + + ASSERT (nm_connection_compare (connection, reread, NM_SETTING_COMPARE_FLAG_EXACT) == TRUE, + "connection-write", "written and re-read connection weren't the same"); + + g_clear_error (&error); + unlink (testfile); + g_free (testfile); + + g_object_unref (reread); + g_object_unref (connection); +} + +#define TEST_WIRED_MAC_CASE_FILE TEST_KEYFILES_DIR"/Test_Wired_Connection_MAC_Case" + +static void +test_read_wired_mac_case (void) +{ + NMConnection *connection; + NMSettingConnection *s_con; + NMSettingWired *s_wired; + GError *error = NULL; + const GByteArray *array; + char expected_mac_address[ETH_ALEN] = { 0x00, 0x11, 0xaa, 0xbb, 0xcc, 0x55 }; + const char *tmp; + const char *expected_id = "Test Wired Connection MAC Case"; + const char *expected_uuid = "4e80a56d-c99f-4aad-a6dd-b449bc398c57"; + + connection = connection_from_file (TEST_WIRED_MAC_CASE_FILE); + ASSERT (connection != NULL, + "connection-read", "failed to read %s", TEST_WIRED_MAC_CASE_FILE); + + ASSERT (nm_connection_verify (connection, &error), + "connection-verify", "failed to verify %s: %s", TEST_WIRED_MAC_CASE_FILE, error->message); + + /* ===== CONNECTION SETTING ===== */ + + s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION)); + ASSERT (s_con != NULL, + "connection-verify-connection", "failed to verify %s: missing %s setting", + TEST_WIRED_MAC_CASE_FILE, + NM_SETTING_CONNECTION_SETTING_NAME); + + /* ID */ + tmp = nm_setting_connection_get_id (s_con); + ASSERT (tmp != NULL, + "connection-verify-connection", "failed to verify %s: missing %s / %s key", + TEST_WIRED_MAC_CASE_FILE, + NM_SETTING_CONNECTION_SETTING_NAME, + NM_SETTING_CONNECTION_ID); + ASSERT (strcmp (tmp, expected_id) == 0, + "connection-verify-connection", "failed to verify %s: unexpected %s / %s key value", + TEST_WIRED_MAC_CASE_FILE, + NM_SETTING_CONNECTION_SETTING_NAME, + NM_SETTING_CONNECTION_ID); + + /* UUID */ + tmp = nm_setting_connection_get_uuid (s_con); + ASSERT (tmp != NULL, + "connection-verify-connection", "failed to verify %s: missing %s / %s key", + TEST_WIRED_MAC_CASE_FILE, + NM_SETTING_CONNECTION_SETTING_NAME, + NM_SETTING_CONNECTION_UUID); + ASSERT (strcmp (tmp, expected_uuid) == 0, + "connection-verify-connection", "failed to verify %s: unexpected %s / %s key value", + TEST_WIRED_MAC_CASE_FILE, + NM_SETTING_CONNECTION_SETTING_NAME, + NM_SETTING_CONNECTION_UUID); + + /* ===== WIRED SETTING ===== */ + + s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED)); + ASSERT (s_wired != NULL, + "connection-verify-wired", "failed to verify %s: missing %s setting", + TEST_WIRED_MAC_CASE_FILE, + NM_SETTING_WIRED_SETTING_NAME); + + /* MAC address */ + array = nm_setting_wired_get_mac_address (s_wired); + ASSERT (array != NULL, + "connection-verify-wired", "failed to verify %s: missing %s / %s key", + TEST_WIRED_MAC_CASE_FILE, + NM_SETTING_WIRED_SETTING_NAME, + NM_SETTING_WIRED_MAC_ADDRESS); + ASSERT (array->len == ETH_ALEN, + "connection-verify-wired", "failed to verify %s: unexpected %s / %s key value length", + TEST_WIRED_MAC_CASE_FILE, + NM_SETTING_WIRED_SETTING_NAME, + NM_SETTING_WIRED_MAC_ADDRESS); + ASSERT (memcmp (array->data, &expected_mac_address[0], sizeof (expected_mac_address)) == 0, + "connection-verify-wired", "failed to verify %s: unexpected %s / %s key value", + TEST_WIRED_MAC_CASE_FILE, + NM_SETTING_WIRED_SETTING_NAME, + NM_SETTING_WIRED_MAC_ADDRESS); + + g_object_unref (connection); +} + static void test_read_valid_wireless_connection (void) { @@ -570,6 +1183,7 @@ test_write_wireless_connection (void) NMSettingConnection *s_con; NMSettingWireless *s_wireless; NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; char *uuid; GByteArray *bssid; unsigned char tmpbssid[] = { 0xaa, 0xb9, 0xa1, 0x74, 0x55, 0x44 }; @@ -640,6 +1254,18 @@ test_write_wireless_connection (void) NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL); + /* IP6 setting */ + + s_ip6 = NM_SETTING_IP6_CONFIG (nm_setting_ip6_config_new ()); + ASSERT (s_ip6 != NULL, + "connection-write", "failed to allocate new %s setting", + NM_SETTING_IP6_CONFIG_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_ip6)); + + g_object_set (s_ip6, + NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_AUTO, + NULL); + /* Write out the connection */ owner_uid = geteuid (); owner_grp = getegid (); @@ -682,12 +1308,18 @@ int main (int argc, char **argv) test_read_valid_wired_connection (); test_write_wired_connection (); + test_read_ip6_wired_connection (); + test_write_ip6_wired_connection (); + + test_read_wired_mac_case (); + test_read_valid_wireless_connection (); test_write_wireless_connection (); base = g_path_get_basename (argv[0]); fprintf (stdout, "%s: SUCCESS\n", base); g_free (base); + dbus_g_connection_unref (bus); return 0; } diff --git a/test/Makefile.am b/test/Makefile.am index 9a07f91564..8e235e4322 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -28,6 +28,9 @@ nm_online_LDADD = \ $(GLIB_LIBS) libnm_glib_test_SOURCES = libnm-glib-test.c +libnm_glib_test_CFLAGS = \ + -Wno-deprecated-declarations \ + -Wno-deprecated libnm_glib_test_LDADD = \ $(top_builddir)/libnm-glib/libnm-glib.la \ $(top_builddir)/libnm-util/libnm-util.la \