aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/sgsn/gprs_sgsn.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/osmocom/sgsn/gprs_sgsn.h')
-rw-r--r--include/osmocom/sgsn/gprs_sgsn.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/osmocom/sgsn/gprs_sgsn.h b/include/osmocom/sgsn/gprs_sgsn.h
index c47fb0905..64e5619d6 100644
--- a/include/osmocom/sgsn/gprs_sgsn.h
+++ b/include/osmocom/sgsn/gprs_sgsn.h
@@ -224,7 +224,7 @@ struct sgsn_mm_ctx {
* whether one of them can be dropped. */
enum sgsn_auth_state auth_state;
- int is_authenticated;
+ enum osmo_sub_auth_type sec_ctx;
/* the string representation of the current hlr */
char hlr[GSM_EXTENSION_LENGTH];
@@ -235,6 +235,17 @@ struct sgsn_mm_ctx {
struct gprs_subscr *subscr;
};
+static inline bool sgsn_mm_ctx_is_authenticated(struct sgsn_mm_ctx *ctx)
+{
+ switch (ctx->sec_ctx) {
+ case OSMO_AUTH_TYPE_GSM:
+ case OSMO_AUTH_TYPE_UMTS:
+ return true;
+ default:
+ return false;
+ }
+}
+
#define LOGMMCTXP(level, mm, fmt, args...) \
LOGP(DMM, level, "MM(%s/%08x) " fmt, (mm) ? (mm)->imsi : "---", \
(mm) ? (mm)->p_tmsi : GSM_RESERVED_TMSI, ## args)