aboutsummaryrefslogtreecommitdiff
path: root/cli/mmcli-bearer.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2021-04-03 21:58:25 +0200
committerAleksander Morgado <aleksander@aleksander.es>2021-04-29 10:13:22 +0000
commit9fd5aced67d9a5e548f706e62990fa24abda65d5 (patch)
treea3e914928c729a5042f3838b1d6d2428a412e5d2 /cli/mmcli-bearer.c
parent2d43ea48e1d2bae37f9d0594c385451739287bef (diff)
api,bearer: new 'ProfileId' property
To report which is the currently active profile with this bearer, if known. If the modem doesn't support profiles, or if the bearer is disconnected, -1 (MM_3GPP_PROFILE_ID_UNKNOWN) will be reported. It is guaranteed that no two connected bearers will have the same ProfileId property value.
Diffstat (limited to 'cli/mmcli-bearer.c')
-rw-r--r--cli/mmcli-bearer.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/mmcli-bearer.c b/cli/mmcli-bearer.c
index 8dbcece5..54d2d4c7 100644
--- a/cli/mmcli-bearer.c
+++ b/cli/mmcli-bearer.c
@@ -137,11 +137,16 @@ print_bearer_info (MMBearer *bearer)
MMBearerIpConfig *ipv6_config;
MMBearerProperties *properties;
MMBearerStats *stats;
+ gint profile_id;
+ gchar *profile_id_str;
ipv4_config = mm_bearer_get_ipv4_config (bearer);
ipv6_config = mm_bearer_get_ipv6_config (bearer);
properties = mm_bearer_get_properties (bearer);
stats = mm_bearer_get_stats (bearer);
+ profile_id = mm_bearer_get_profile_id (bearer);
+
+ profile_id_str = (profile_id != MM_3GPP_PROFILE_ID_UNKNOWN) ? g_strdup_printf ("%d", profile_id) : NULL;
mmcli_output_string (MMC_F_BEARER_GENERAL_DBUS_PATH, mm_bearer_get_path (bearer));
mmcli_output_string (MMC_F_BEARER_GENERAL_TYPE, mm_bearer_type_get_string (mm_bearer_get_bearer_type (bearer)));
@@ -151,6 +156,7 @@ print_bearer_info (MMBearer *bearer)
mmcli_output_string (MMC_F_BEARER_STATUS_MULTIPLEXED, mm_bearer_get_multiplexed (bearer) ? "yes" : "no");
mmcli_output_string (MMC_F_BEARER_STATUS_INTERFACE, mm_bearer_get_interface (bearer));
mmcli_output_string_take (MMC_F_BEARER_STATUS_IP_TIMEOUT, g_strdup_printf ("%u", mm_bearer_get_ip_timeout (bearer)));
+ mmcli_output_string_take (MMC_F_BEARER_STATUS_PROFILE_ID, profile_id_str);
/* Properties */
{