summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common.c23
-rw-r--r--src/common.h13
2 files changed, 36 insertions, 0 deletions
diff --git a/src/common.c b/src/common.c
index 4d934888..4d6fa64a 100644
--- a/src/common.c
+++ b/src/common.c
@@ -714,6 +714,29 @@ const char *registration_tech_to_string(int tech)
}
}
+const char *packet_bearer_to_string(int bearer)
+{
+ switch (bearer) {
+ case PACKET_BEARER_NONE:
+ return "none";
+ case PACKET_BEARER_GPRS:
+ return "gprs";
+ case PACKET_BEARER_EGPRS:
+ return "edge";
+ case PACKET_BEARER_UMTS:
+ return "umts";
+ case PACKET_BEARER_HSUPA:
+ return "hsupa";
+ case PACKET_BEARER_HSDPA:
+ return "hsdpa";
+ case PACKET_BEARER_HSUPA_HSDPA:
+ return "hspa";
+ case PACKET_BEARER_EPS:
+ return "lte";
+ }
+ return "";
+}
+
gboolean is_valid_apn(const char *apn)
{
int i;
diff --git a/src/common.h b/src/common.h
index 50c418d8..d4bcd364 100644
--- a/src/common.h
+++ b/src/common.h
@@ -87,6 +87,18 @@ enum bearer_class {
BEARER_CLASS_PAD = 128,
};
+/* 27.007 Section 7.29 */
+enum packet_bearer {
+ PACKET_BEARER_NONE = 0,
+ PACKET_BEARER_GPRS = 1,
+ PACKET_BEARER_EGPRS = 2,
+ PACKET_BEARER_UMTS = 3,
+ PACKET_BEARER_HSUPA = 4,
+ PACKET_BEARER_HSDPA = 5,
+ PACKET_BEARER_HSUPA_HSDPA = 6,
+ PACKET_BEARER_EPS = 7,
+};
+
/* 22.030 Section 6.5.2 */
enum ss_control_type {
SS_CONTROL_TYPE_ACTIVATION,
@@ -164,5 +176,6 @@ gboolean is_valid_pin(const char *pin, enum pin_type type);
const char *registration_status_to_string(int status);
const char *registration_tech_to_string(int tech);
+const char *packet_bearer_to_string(int bearer);
gboolean is_valid_apn(const char *apn);