summaryrefslogtreecommitdiff
path: root/cli/src/settings.c
diff options
context:
space:
mode:
Diffstat (limited to 'cli/src/settings.c')
-rw-r--r--cli/src/settings.c55
1 files changed, 5 insertions, 50 deletions
diff --git a/cli/src/settings.c b/cli/src/settings.c
index c23853702..8b6287647 100644
--- a/cli/src/settings.c
+++ b/cli/src/settings.c
@@ -17,8 +17,6 @@
* (C) Copyright 2010 Red Hat, Inc.
*/
-#include "config.h"
-
#include <glib.h>
#include <glib/gi18n.h>
#include <libnm-util/nm-utils.h>
@@ -95,7 +93,8 @@ static NmcOutputField nmc_fields_setting_8021X[] = {
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_SYSTEM_CA_CERTS, 17), /* 21 */
+ 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"","\
@@ -119,6 +118,7 @@ static NmcOutputField nmc_fields_setting_8021X[] = {
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
@@ -402,18 +402,6 @@ static NmcOutputField nmc_fields_setting_vpn[] = {
NM_SETTING_VPN_SECRETS
#define NMC_FIELDS_SETTING_VPN_COMMON NMC_FIELDS_SETTING_VPN_ALL
-/* Available fields for NM_SETTING_WIMAX_SETTING_NAME */
-static NmcOutputField nmc_fields_setting_wimax[] = {
- SETTING_FIELD ("name", 6), /* 0 */
- SETTING_FIELD (NM_SETTING_WIMAX_MAC_ADDRESS, 19), /* 1 */
- SETTING_FIELD (NM_SETTING_WIMAX_NETWORK_NAME, 40), /* 2 */
- {NULL, NULL, 0, NULL, 0}
-};
-#define NMC_FIELDS_SETTING_WIMAX_ALL "name"","\
- NM_SETTING_WIMAX_MAC_ADDRESS","\
- NM_SETTING_WIMAX_NETWORK_NAME
-#define NMC_FIELDS_SETTING_WIMAX_COMMON NMC_FIELDS_SETTING_WIMAX_ALL
-
static char *
wep_key_type_to_string (NMWepKeyType type)
@@ -660,7 +648,8 @@ setting_802_1X_details (NMSetting *setting, NmCli *nmc)
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_system_ca_certs (s_8021X) ? _("yes") : _("no");
+ 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 */
@@ -1392,37 +1381,3 @@ setting_vpn_details (NMSetting *setting, NmCli *nmc)
return TRUE;
}
-gboolean
-setting_wimax_details (NMSetting *setting, NmCli *nmc)
-{
- NMSettingWimax *s_wimax;
- const GByteArray *mac;
- char *device_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_WIMAX (setting), FALSE);
- s_wimax = (NMSettingWimax *) setting;
-
- nmc->allowed_fields = nmc_fields_setting_wimax;
- nmc->print_fields.indices = parse_output_fields (NMC_FIELDS_SETTING_WIMAX_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 */
-
- mac = nm_setting_wimax_get_mac_address (s_wimax);
- if (mac)
- device_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_WIMAX_SETTING_NAME;
- nmc->allowed_fields[1].value = device_mac_str;
- nmc->allowed_fields[2].value = nm_setting_wimax_get_network_name (s_wimax);
-
- 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 (device_mac_str);
-
- return TRUE;
-}
-