aboutsummaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2021-03-23 10:16:42 +0100
committerAleksander Morgado <aleksander@aleksander.es>2021-04-29 10:13:22 +0000
commitff8e21b535bc43d0ecfb135628711b3c32c47de8 (patch)
tree968c26d1269c0ea70f8ceae4e82f07bb7537657c /cli
parent21ae558fe3600c84b3ca7dcd9bf50a3ba576c7c9 (diff)
api,bearer: new 'apn-type' setting
This new setting allows the user setting up the connection to specify the purpose of the connection being brought up. Until now, we would always assume that connections are exclusively brought up for connecting to the Internet, also limited by the inability to connect to multiple different APNs at the same time. But that may really not be true as there may be additional services that may be accessed through other APNs, like MMS services or even private networks for companies that have their own APNs on a given operator (e.g. not that uncommon with banks and connected cars). The new APN type setting will not change the way the bearer is connected, but will allow the connection manager to decide what kind of networking setup the specific connection needs. This new setting can be provided by the user itself, or implicitly read from the device if the device stores this information.
Diffstat (limited to 'cli')
-rw-r--r--cli/mmcli-bearer.c3
-rw-r--r--cli/mmcli-output.c1
-rw-r--r--cli/mmcli-output.h1
3 files changed, 5 insertions, 0 deletions
diff --git a/cli/mmcli-bearer.c b/cli/mmcli-bearer.c
index eab31c05..913b6780 100644
--- a/cli/mmcli-bearer.c
+++ b/cli/mmcli-bearer.c
@@ -155,6 +155,7 @@ print_bearer_info (MMBearer *bearer)
/* Properties */
{
const gchar *apn = NULL;
+ gchar *apn_type_str = NULL;
const gchar *roaming = NULL;
gchar *ip_family_str = NULL;
const gchar *user = NULL;
@@ -164,6 +165,7 @@ print_bearer_info (MMBearer *bearer)
if (properties) {
apn = mm_bearer_properties_get_apn (properties);
+ apn_type_str = (properties ? mm_bearer_apn_type_build_string_from_mask (mm_bearer_properties_get_apn_type (properties)) : NULL);
ip_family_str = (properties ? mm_bearer_ip_family_build_string_from_mask (mm_bearer_properties_get_ip_type (properties)) : NULL);
allowed_auth_str = (properties ? mm_bearer_allowed_auth_build_string_from_mask (mm_bearer_properties_get_allowed_auth (properties)) : NULL);
user = mm_bearer_properties_get_user (properties);
@@ -175,6 +177,7 @@ print_bearer_info (MMBearer *bearer)
}
mmcli_output_string (MMC_F_BEARER_PROPERTIES_APN, apn);
+ mmcli_output_string_take (MMC_F_BEARER_PROPERTIES_APN_TYPE, apn_type_str);
mmcli_output_string (MMC_F_BEARER_PROPERTIES_ROAMING, roaming);
mmcli_output_string_take (MMC_F_BEARER_PROPERTIES_IP_TYPE, ip_family_str);
mmcli_output_string (MMC_F_BEARER_PROPERTIES_USER, user);
diff --git a/cli/mmcli-output.c b/cli/mmcli-output.c
index 6040d5d5..69448562 100644
--- a/cli/mmcli-output.c
+++ b/cli/mmcli-output.c
@@ -212,6 +212,7 @@ static FieldInfo field_infos[] = {
[MMC_F_BEARER_STATUS_INTERFACE] = { "bearer.status.interface", "interface", MMC_S_BEARER_STATUS, },
[MMC_F_BEARER_STATUS_IP_TIMEOUT] = { "bearer.status.ip-timeout", "ip timeout", MMC_S_BEARER_STATUS, },
[MMC_F_BEARER_PROPERTIES_APN] = { "bearer.properties.apn", "apn", MMC_S_BEARER_PROPERTIES, },
+ [MMC_F_BEARER_PROPERTIES_APN_TYPE] = { "bearer.properties.apn-type", "apn type", MMC_S_BEARER_PROPERTIES, },
[MMC_F_BEARER_PROPERTIES_ROAMING] = { "bearer.properties.roaming", "roaming", MMC_S_BEARER_PROPERTIES, },
[MMC_F_BEARER_PROPERTIES_IP_TYPE] = { "bearer.properties.ip-type", "ip type", MMC_S_BEARER_PROPERTIES, },
[MMC_F_BEARER_PROPERTIES_ALLOWED_AUTH] = { "bearer.properties.allowed-auth", "allowed-auth", MMC_S_BEARER_PROPERTIES, },
diff --git a/cli/mmcli-output.h b/cli/mmcli-output.h
index 283f2d43..faf8abbe 100644
--- a/cli/mmcli-output.h
+++ b/cli/mmcli-output.h
@@ -229,6 +229,7 @@ typedef enum {
MMC_F_BEARER_STATUS_IP_TIMEOUT,
/* Bearer properties section */
MMC_F_BEARER_PROPERTIES_APN,
+ MMC_F_BEARER_PROPERTIES_APN_TYPE,
MMC_F_BEARER_PROPERTIES_ROAMING,
MMC_F_BEARER_PROPERTIES_IP_TYPE,
MMC_F_BEARER_PROPERTIES_ALLOWED_AUTH,