aboutsummaryrefslogtreecommitdiff
path: root/src
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 /src
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 'src')
-rw-r--r--src/mm-iface-modem-simple.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mm-iface-modem-simple.c b/src/mm-iface-modem-simple.c
index 00b8d894..002671ba 100644
--- a/src/mm-iface-modem-simple.c
+++ b/src/mm-iface-modem-simple.c
@@ -691,6 +691,7 @@ connect_auth_ready (MMBaseModem *self,
{
MMBearerMultiplexSupport multiplex;
MMBearerAllowedAuth allowed_auth;
+ MMBearerApnType apn_type;
gchar *str;
MMBearerIpFamily ip_family;
@@ -701,6 +702,14 @@ connect_auth_ready (MMBaseModem *self,
mm_obj_dbg (self, " allowed roaming: %s", mm_simple_connect_properties_get_allow_roaming (ctx->properties) ? "yes" : "no");
mm_obj_dbg (self, " APN: %s", VALIDATE_UNSPECIFIED (mm_simple_connect_properties_get_apn (ctx->properties)));
+ apn_type = mm_simple_connect_properties_get_apn_type (ctx->properties);
+ if (apn_type != MM_BEARER_APN_TYPE_NONE) {
+ str = mm_bearer_apn_type_build_string_from_mask (apn_type);
+ mm_obj_dbg (self, " APN type: %s", str);
+ g_free (str);
+ } else
+ mm_obj_dbg (self, " APN type: %s", VALIDATE_UNSPECIFIED (NULL));
+
ip_family = mm_simple_connect_properties_get_ip_type (ctx->properties);
if (ip_family != MM_BEARER_IP_FAMILY_NONE) {
str = mm_bearer_ip_family_build_string_from_mask (ip_family);