aboutsummaryrefslogtreecommitdiff
path: root/cli/mmcli-modem.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2018-12-06 07:55:58 +0100
committerDan Williams <dcbw@redhat.com>2018-12-07 16:20:53 +0000
commit8281b5048bc002dd2b049fdad041a35b7175eca7 (patch)
treef0d63ac18cdb5031f7209d7d4175d140a31a7326 /cli/mmcli-modem.c
parent9c3ac2fb6023b87d065221f845969b0f06e26363 (diff)
api,modem-3gpp: new 'InitialEpsBearerSettings' property
This property shows the settings stored in the device to be used during the initial LTE attach procedure.
Diffstat (limited to 'cli/mmcli-modem.c')
-rw-r--r--cli/mmcli-modem.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/cli/mmcli-modem.c b/cli/mmcli-modem.c
index a98434b1..86de4ef0 100644
--- a/cli/mmcli-modem.c
+++ b/cli/mmcli-modem.c
@@ -368,8 +368,29 @@ print_modem_info (void)
mmcli_output_pco_list (pco_list);
if (mm_modem_get_current_capabilities (ctx->modem) & (MM_MODEM_CAPABILITY_LTE | MM_MODEM_CAPABILITY_LTE_ADVANCED)) {
+ MMBearerProperties *properties = NULL;
+ const gchar *apn = NULL;
+ gchar *ip_family_str = NULL;
+ const gchar *user = NULL;
+ const gchar *password = NULL;
+
mmcli_output_string (MMC_F_3GPP_EPS_UE_MODE, eps_ue_mode);
mmcli_output_string (MMC_F_3GPP_EPS_INITIAL_BEARER_PATH, g_strcmp0 (initial_eps_bearer_path, "/") != 0 ? initial_eps_bearer_path : NULL);
+
+ if (ctx->modem_3gpp) {
+ properties = mm_modem_3gpp_peek_initial_eps_bearer_settings (ctx->modem_3gpp);
+ if (properties) {
+ apn = mm_bearer_properties_get_apn (properties);
+ ip_family_str = (properties ? mm_bearer_ip_family_build_string_from_mask (mm_bearer_properties_get_ip_type (properties)) : NULL);
+ user = mm_bearer_properties_get_user (properties);
+ password = mm_bearer_properties_get_password (properties);
+ }
+ }
+
+ mmcli_output_string (MMC_F_3GPP_EPS_BEARER_SETTINGS_APN, apn);
+ mmcli_output_string_take (MMC_F_3GPP_EPS_BEARER_SETTINGS_IP_TYPE, ip_family_str);
+ mmcli_output_string (MMC_F_3GPP_EPS_BEARER_SETTINGS_USER, user);
+ mmcli_output_string (MMC_F_3GPP_EPS_BEARER_SETTINGS_PASSWORD, password);
}
g_free (facility_locks);