libosmosim 1.13.1.1-afb4 Osmocom SIM library

Functions | Variables
card_fs_usim.c File Reference

3GPP USIM specific structures / routines. More...

`#include <errno.h>`
`#include <string.h>`
`#include <osmocom/sim/sim.h>`
`#include <osmocom/core/talloc.h>`
`#include <osmocom/gsm/gsm48.h>`
`#include "sim_int.h"`
`#include "gsm_int.h"`

## Functions
struct osim_card_app_profile * | osim_aprof_usim (void *ctx)

## Variables
const struct osim_card_sw | ts31_102_sw []
static const struct osim_file_desc | usim_ef_in_df_gsm_access []
static const struct osim_file_desc | usim_ef_in_adf_usim []
static const struct osim_file_desc | usim_ef_in_solsa []
static const struct osim_file_desc | usim_ef_in_df_mexe []
static const struct osim_file_desc | usim_ef_in_df_wlan []
static const struct osim_file_desc | usim_ef_in_df_hnb []
static const struct osim_file_desc | usim_ef_in_df_prose []
static const struct osim_file_desc | usim_ef_in_df_acdc []
static const struct osim_file_desc | usim_ef_in_df_5gs []
static const uint8_t | adf_usim_aid [] = { 0xA0, 0x00, 0x00, 0x00, 0x87, 0x10, 0x02 }

## Detailed Description

3GPP USIM specific structures / routines.

## Function Documentation

## ◆ osim_aprof_usim()

struct osim_card_app_profile * osim_aprof_usim | ( | void * | ctx | ) |

References add_df_with_ef(), osim_card_app_profile::adf, adf_usim_aid, osim_card_app_profile::aid, osim_card_app_profile::aid_len, alloc_adf_with_ef(), ARRAY_SIZE, osim_card_app_profile::name, osim_card_app_profile::sw, ts31_102_sw, usim_ef_in_adf_usim, usim_ef_in_df_5gs, usim_ef_in_df_acdc, usim_ef_in_df_gsm_access, usim_ef_in_df_hnb, usim_ef_in_df_mexe, usim_ef_in_df_prose, usim_ef_in_df_wlan, and usim_ef_in_solsa.

Referenced by osim_init().

## Variable Documentation

## ◆ adf_usim_aid

const uint8_t adf_usim_aid[] = { 0xA0, 0x00, 0x00, 0x00, 0x87, 0x10, 0x02 }
| static

Referenced by osim_aprof_usim().

## ◆ ts31_102_sw

const struct osim_card_sw ts31_102_sw[]

Initial value:
= {
{
0x9862, 0xffff, SW_TYPE_STR, SW_CLS_ERROR,
.u.str = "Security management - Authentication error, incorrect MAC",
}, {
0x9864, 0xffff, SW_TYPE_STR, SW_CLS_ERROR,
.u.str = "Security management - Authentication error, security context not supported",
}, {
0x9865, 0xffff, SW_TYPE_STR, SW_CLS_ERROR,
.u.str = "Security management - Key freshness error",
}, {
0x9866, 0xffff, SW_TYPE_STR, SW_CLS_ERROR,
.u.str = "Security management - Authentication error, no memory space available",
}, {
0x9867, 0xffff, SW_TYPE_STR, SW_CLS_ERROR,
.u.str = "Security management - Authentication error, no memory space available in EF_MUK",
},
OSIM_CARD_SW_LAST
}
SW_CLS_ERROR
@ SW_CLS_ERROR
Definition: sim.h:275
OSIM_CARD_SW_LAST
#define OSIM_CARD_SW_LAST
Definition: sim.h:292
SW_TYPE_STR
@ SW_TYPE_STR
Definition: sim.h:267

Referenced by osim_aprof_usim().

## ◆ usim_ef_in_adf_usim

const struct osim_file_desc usim_ef_in_adf_usim[]
| static

Referenced by osim_aprof_usim().

## ◆ usim_ef_in_df_5gs

const struct osim_file_desc usim_ef_in_df_5gs[]
| static

Initial value:
= {
EF_TRANSP_N(0x4F01, 0x01, "EF.5GS3GPPLOCI", F_OPTIONAL, 20, 20,
"5GS 3GPP location information"),
EF_TRANSP_N(0x4F02, 0x02, "EF.5GSN3GPPLOCI", F_OPTIONAL, 20, 20,
"5GS non-3GPP location information"),
EF_LIN_FIX_N(0x4F03, 0x03, "EF.5GS3GPPNSC", F_OPTIONAL, 57, 57,
"5GS 3GPP Access NAS Security Context"),
EF_LIN_FIX_N(0x4F04, 0x04, "EF.5GSN3GPPNSC", F_OPTIONAL, 57, 57,
"5GS non-3GPP Access NAS Security Context"),
EF_TRANSP_N(0x4F05, 0x05, "EF.5GAUTHKEYS", F_OPTIONAL, 68, 68,
"5GS authentication keys"),
EF_TRANSP_N(0x4F06, 0x06, "EF.UAC_AIC", F_OPTIONAL, 4, 4,
"UAC Access Identities Configuration"),
EF_TRANSP_N(0x4F07, 0x07, "EF.SUCI_Calc_Info", F_OPTIONAL, 2, 64,
"Subscription Concealed Identifier Calculation Information"),
EF_LIN_FIX_N(0x4F08, 0x08, "EF.OPL5G", F_OPTIONAL, 10, 10,
"5GS Operator PLMN List"),
EF_TRANSP_N(0x4F09, 0x09, "EF.NSI", F_OPTIONAL, 1, 64,
"Network Specific Identifier"),
EF_TRANSP_N(0x4F0A, 0x0A, "EF.Routing_Indicator", F_OPTIONAL, 4, 4,
"Routing Indicator"),
}
EF_TRANSP_N
#define EF_TRANSP_N(fid, sfi, ns, flags, smin, srec, nl)
Convenience macros for defining EF.
Definition: sim.h:219
EF_LIN_FIX_N
#define EF_LIN_FIX_N(fid, sfi, ns, flags, smin, srec, nl)
Convenience macros for defining EF.
Definition: sim.h:237
F_OPTIONAL
#define F_OPTIONAL
Definition: sim.h:157

Referenced by osim_aprof_usim().

## ◆ usim_ef_in_df_acdc

const struct osim_file_desc usim_ef_in_df_acdc[]
| static

Initial value:
= {
EF_TRANSP_N(0x4F01, 0x01, "EF.ACDC_LIST", F_OPTIONAL, 1, 128,
"ACDC List"),
}

Referenced by osim_aprof_usim().

## ◆ usim_ef_in_df_gsm_access

const struct osim_file_desc usim_ef_in_df_gsm_access[]
| static

Initial value:
= {
EF_TRANSP_N(0x4f20, 0x01, "EF.Kc", 0, 9, 9,
"Ciphering Key Kc"),
EF_TRANSP_N(0x4f52, 0x02, "EF.KcGPRS", F_OPTIONAL, 9, 9,
"GPRS Ciphering key KcGPRS"),
EF_TRANSP_N(0x4f63, SFI_NONE, "EF.CPBCCH", F_OPTIONAL, 2, 20,
"CPBCCH Information"),
EF_TRANSP_N(0x4f64, SFI_NONE, "EF.invSCAN", F_OPTIONAL, 1, 1,
"Investigation Scan"),
}
SFI_NONE
#define SFI_NONE
Definition: sim.h:159

Referenced by osim_aprof_usim().

## ◆ usim_ef_in_df_hnb

const struct osim_file_desc usim_ef_in_df_hnb[]
| static

Initial value:
= {
EF_LIN_FIX_N(0x4F81, 0x01, "EF.ACSGL", F_OPTIONAL, 1, 128,
"Allowed CSG Lists"),
EF_LIN_FIX_N(0x4F82, 0x02, "EF.CSGT", F_OPTIONAL, 1, 64,
"CSG Type"),
EF_LIN_FIX_N(0x4F83, 0x03, "EF.HNBN", F_OPTIONAL, 1, 64,
"Home NodeB Name"),
EF_LIN_FIX_N(0x4F84, 0x04, "EF.OCSGL", F_OPTIONAL, 1, 64,
"Operator CSG List"),
EF_LIN_FIX_N(0x4F85, 0x05, "EF.OCSGT", F_OPTIONAL, 1, 64,
"Operator CSG Type"),
EF_LIN_FIX_N(0x4F86, 0x06, "EF.OHNBN", F_OPTIONAL, 1, 64,
"Oprator Home NodeB Name"),
}

Referenced by osim_aprof_usim().

## ◆ usim_ef_in_df_mexe

const struct osim_file_desc usim_ef_in_df_mexe[]
| static

Initial value:
= {
EF_TRANSP_N(0x4F40, SFI_NONE, "EF.MexE-ST", F_OPTIONAL, 1, 4,
"MexE Service table"),
EF_LIN_FIX_N(0x4F41, SFI_NONE, "EF.ORPK", F_OPTIONAL, 10, 16,
"Operator Root Public Key"),
EF_LIN_FIX_N(0x4F42, SFI_NONE, "EF.ARPK", F_OPTIONAL, 10, 16,
"Administrator Root Public Key"),
EF_LIN_FIX_N(0x4F43, SFI_NONE, "EF.TPRPK", F_OPTIONAL, 10, 16,
"Third Party Root Public Key"),
}

Referenced by osim_aprof_usim().

## ◆ usim_ef_in_df_prose

const struct osim_file_desc usim_ef_in_df_prose[]
| static

Initial value:
= {
EF_LIN_FIX_N(0x4F01, 0x01, "EF.PROSE_MON", F_OPTIONAL, 1, 64,
"ProSe Monitoring Parameters"),
EF_LIN_FIX_N(0x4F02, 0x02, "EF.PROSE_ANN", F_OPTIONAL, 1, 64,
"ProSe Announcing Parameters"),
EF_LIN_FIX_N(0x4F03, 0x03, "EF.PROSEFUNC", F_OPTIONAL, 1, 64,
"HPLMN ProSe Function"),
EF_TRANSP_N(0x4F04, 0x04, "EF.PROSE_RADIO_COM", F_OPTIONAL, 1, 128,
"ProSe Direct Communication Radio Parameters"),
EF_TRANSP_N(0x4F05, 0x05, "EF.PROSE_RADIO_MON", F_OPTIONAL, 1, 128,
"ProSe Direct Discovery Monitoring Radio Parameters"),
EF_TRANSP_N(0x4F06, 0x06, "EF.PROSE_RADIO_ANN", F_OPTIONAL, 1, 128,
"ProSe Direct Discovery Announcing Radio Parameters"),
EF_LIN_FIX_N(0x4F07, 0x07, "EF.PROSE_POLICY", F_OPTIONAL, 1, 64,
"ProSe Direct Discovery Announcing Radio Parameters"),
EF_LIN_FIX_N(0x4F08, 0x08, "EF.PROSE_PLMN", F_OPTIONAL, 1, 64,
"ProSe PLMN Parametes"),
EF_TRANSP_N(0x4F09, 0x09, "EF.PROSE_GC", F_OPTIONAL, 8, 64,
"ProSe Direct Discovery Announcing Radio Parameters"),
EF_TRANSP_N(0x4F10, 0x10, "EF.PST", F_OPTIONAL, 1, 2,
"ProSe Service Table"),
EF_TRANSP_N(0x4F11, 0x11, "EF.PROSE_UIRC", F_OPTIONAL, 1, 128,
"ProSe UsageInformationReportingConfiguration"),
EF_LIN_FIX_N(0x4F12, 0x12, "EF.PROSE_GM_DISCOVERY", F_OPTIONAL, 1, 64,
"ProSe Group Member Discovery Parameters"),
EF_LIN_FIX_N(0x4F13, 0x13, "EF.PROSE_RELAY", F_OPTIONAL, 1, 64,
"ProSe Relay Parameters"),
EF_TRANSP_N(0x4F14, 0x14, "EF.PROSE_RELAY_DISCOVERY", F_OPTIONAL, 5, 64,
"ProSe Relay Discovery Parameters"),
}

Referenced by osim_aprof_usim().

## ◆ usim_ef_in_df_wlan

const struct osim_file_desc usim_ef_in_df_wlan[]
| static

Initial value:
= {
EF_TRANSP_N(0x4F41, 0x01, "EF.Pseudo", F_OPTIONAL, 2, 16,
"Pseudonym"),
EF_TRANSP_N(0x4F42, 0x02, "EF.UPLMNWLAN", F_OPTIONAL, 30, 60,
"User controlled PLMN selector for I-WLAN Access"),
EF_TRANSP_N(0x4F43, 0x03, "EF.OPLMNWLAN", F_OPTIONAL, 30, 60,
"Operator controlled PLMN selector for I-WLAN Access"),
EF_LIN_FIX_N(0x4F44, 0x04, "EF.UWSIDL", F_OPTIONAL, 1, 16,
"User controlled WLAN Specific Identifier List"),
EF_LIN_FIX_N(0x4F45, 0x05, "EF.OWSIDL", F_OPTIONAL, 1, 16,
"Operator controlled WLAN Specific Identifier List"),
EF_TRANSP_N(0x4F46, 0x06, "EF.WRI", F_OPTIONAL, 1, 64,
"WLAN Reauthentication Identity"),
EF_LIN_FIX_N(0x4F47, 0x07, "EF.HWSIDL", F_OPTIONAL, 1, 16,
"Home I-WLAN Specific Identifier List"),
EF_TRANSP_N(0x4F48, 0x08, "EF.WEPLMNPI", F_OPTIONAL, 1, 1,
"I-WLAN Equivalent HPLMN Presentation Indication"),
EF_TRANSP_N(0x4F49, 0x09, "EF.WHPI", F_OPTIONAL, 1, 1,
"I-WLAN HPLMN Priority Indiation"),
EF_TRANSP_N(0x4F4A, 0x0a, "EF.WLRPLMN", F_OPTIONAL, 3, 3,
"I-WLAN Last Registered PLMN"),
}

Referenced by osim_aprof_usim().

## ◆ usim_ef_in_solsa

const struct osim_file_desc usim_ef_in_solsa[]
| static

Initial value:
= {
EF_TRANSP_N(0x4F30, SFI_NONE, "EF.SAI", F_OPTIONAL, 2, 32,
"SoLSA Access Indicator"),
EF_LIN_FIX_N(0x4F31, SFI_NONE, "EF.SLL", F_OPTIONAL, 11, 32,
"SoLSA LSA List"),
}

Referenced by osim_aprof_usim().