From d43b2c0a61c1dc7af60196f03579feaba0fcb534 Mon Sep 17 00:00:00 2001 From: Yang Gu Date: Tue, 31 Aug 2010 17:58:00 +0800 Subject: sim: Read EFsst --- src/simutil.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/simutil.c') diff --git a/src/simutil.c b/src/simutil.c index ac054ae3..4af68109 100644 --- a/src/simutil.c +++ b/src/simutil.c @@ -1434,3 +1434,21 @@ gboolean sim_est_is_active(unsigned char *efest, unsigned char len, return (efest[index / 8] >> (index % 8)) & 1; } + +gboolean sim_sst_is_available(unsigned char *efsst, unsigned char len, + enum sim_sst_service index) +{ + if (index >= len * 4u) + return FALSE; + + return (efsst[index / 4] >> ((index % 4) * 2)) & 1; +} + +gboolean sim_sst_is_active(unsigned char *efsst, unsigned char len, + enum sim_sst_service index) +{ + if (index >= len * 4u) + return FALSE; + + return (efsst[index / 4] >> (((index % 4) * 2) + 1)) & 1; +} -- cgit v1.2.3