jolly has uploaded this change for review. ( https://gerrit.osmocom.org/c/onomondo-ipa/+/43024?usp=email )
Change subject: V1.2: Rename internal structure names from "auto" to "immediate" ......................................................................
V1.2: Rename internal structure names from "auto" to "immediate"
Rename all occurrences of "auto" or similar to "immediate" or similar respectively.
Reference: SGP.32 Section 2.9.2
Related: SYS#8101 Change-Id: Iad212f9b3e4430d4eaa6d4afdac0e73009275dfb --- M include/onomondo/ipa/ipad.h M src/ipa/libipa/context.h M src/ipa/libipa/es10b_enable_using_dd.c M src/ipa/libipa/es10b_euicc_mem_rst.c M src/ipa/libipa/es10b_euicc_mem_rst.h M src/ipa/libipa/es10b_load_bnd_prfle_pkg.c M src/ipa/libipa/es10b_load_euicc_pkg.c M src/ipa/libipa/ipad.c 8 files changed, 75 insertions(+), 75 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/24/43024/1
diff --git a/include/onomondo/ipa/ipad.h b/include/onomondo/ipa/ipad.h index c2ce394..bb4a05a 100644 --- a/include/onomondo/ipa/ipad.h +++ b/include/onomondo/ipa/ipad.h @@ -93,7 +93,7 @@ int eim_init(struct ipa_context *ctx); int ipa_add_init_eim_cfg(struct ipa_context *ctx, struct ipa_buf *cfg); int ipa_euicc_mem_rst(struct ipa_context *ctx, bool operatnl_profiles, bool test_profiles, bool default_smdp_addr, - bool eim_cfg_data, bool auto_enable_cfg); + bool eim_cfg_data, bool immediate_enable_cfg); int ipa_poll(struct ipa_context *ctx); void ipa_close(struct ipa_context *ctx); struct ipa_buf *ipa_free_ctx(struct ipa_context *ctx); diff --git a/src/ipa/libipa/context.h b/src/ipa/libipa/context.h index 067daff..5065286 100644 --- a/src/ipa/libipa/context.h +++ b/src/ipa/libipa/context.h @@ -27,12 +27,12 @@ int association_token_counter; struct ipa_buf *eim_cfg_ber;
- /*! Automatic Profile Enabling configuration (set via configureAutoEnable PSMO) */ + /*! Immediate Profile Enabling configuration (set via configureImmidiateEnable PSMO) */ struct { bool flag; struct ipa_buf *smdp_oid; struct ipa_buf *smdp_address; - } auto_enable; + } immediate_enable; } iot_euicc_emu;
} __attribute__((packed)); @@ -58,12 +58,12 @@ * ipa_proc_eucc_pkg_dwnld_exec is called. */ struct ipa_buf *rollback_iccid;
- /*! cached data to support the emulation of the ES10b function EnableUsingDD */ + /*! cached data to support the emulation of the ES10b function ImmidiateEnable */ struct { struct ipa_buf *smdp_oid; struct ipa_buf *smdp_address; struct ipa_buf *profile_aid; - } auto_enable; + } immediate_enable; } iot_euicc_emu;
/*! cached eimId (read from eUICC when ipa_init is called) */ diff --git a/src/ipa/libipa/es10b_enable_using_dd.c b/src/ipa/libipa/es10b_enable_using_dd.c index 61ba9bb..87e731d 100644 --- a/src/ipa/libipa/es10b_enable_using_dd.c +++ b/src/ipa/libipa/es10b_enable_using_dd.c @@ -93,57 +93,57 @@ int rc = EnableUsingDDResponse__enableUsingDDResult_undefinedError;
/* Auto enable must be active */ - if (ctx->nvstate.iot_euicc_emu.auto_enable.flag == false) { + if (ctx->nvstate.iot_euicc_emu.immediate_enable.flag == false) { rc = EnableUsingDDResponse__enableUsingDDResult_immediateEnableNotAvailable; goto error; }
/* We also need either the smdp_oid or the smdp_address to verify against */ - if (ctx->nvstate.iot_euicc_emu.auto_enable.smdp_oid == NULL && - ctx->nvstate.iot_euicc_emu.auto_enable.smdp_address == NULL) { + if (ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid == NULL && + ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address == NULL) { rc = EnableUsingDDResponse__enableUsingDDResult_immediateEnableNotAvailable; goto error; }
/* Ensure the session context is present and complete */ - if (ctx->iot_euicc_emu.auto_enable.smdp_address == NULL) { + if (ctx->iot_euicc_emu.immediate_enable.smdp_address == NULL) { rc = EnableUsingDDResponse__enableUsingDDResult_noSessionContext; goto error; } - if (ctx->iot_euicc_emu.auto_enable.smdp_oid == NULL) { + if (ctx->iot_euicc_emu.immediate_enable.smdp_oid == NULL) { rc = EnableUsingDDResponse__enableUsingDDResult_noSessionContext; goto error; } - if (ctx->iot_euicc_emu.auto_enable.profile_aid == NULL) { + if (ctx->iot_euicc_emu.immediate_enable.profile_aid == NULL) { rc = EnableUsingDDResponse__enableUsingDDResult_noSessionContext; goto error; }
/* Verify smdp OID (if configured) */ - if (ctx->nvstate.iot_euicc_emu.auto_enable.smdp_oid) { - if (ctx->nvstate.iot_euicc_emu.auto_enable.smdp_oid->len != - ctx->iot_euicc_emu.auto_enable.smdp_oid->len) { + if (ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid) { + if (ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid->len != + ctx->iot_euicc_emu.immediate_enable.smdp_oid->len) { rc = EnableUsingDDResponse__enableUsingDDResult_immediateEnableNotAvailable; goto error; } - if (memcmp(ctx->nvstate.iot_euicc_emu.auto_enable.smdp_oid->data, - ctx->iot_euicc_emu.auto_enable.smdp_oid->data, - ctx->iot_euicc_emu.auto_enable.smdp_oid->len)) { + if (memcmp(ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid->data, + ctx->iot_euicc_emu.immediate_enable.smdp_oid->data, + ctx->iot_euicc_emu.immediate_enable.smdp_oid->len)) { rc = EnableUsingDDResponse__enableUsingDDResult_immediateEnableNotAvailable; goto error; } }
/* Verify smdp address (if configured) */ - if (ctx->nvstate.iot_euicc_emu.auto_enable.smdp_address) { - if (ctx->nvstate.iot_euicc_emu.auto_enable.smdp_address->len != - ctx->iot_euicc_emu.auto_enable.smdp_address->len) { + if (ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address) { + if (ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address->len != + ctx->iot_euicc_emu.immediate_enable.smdp_address->len) { rc = EnableUsingDDResponse__enableUsingDDResult_immediateEnableNotAvailable; goto error; } - if (memcmp(ctx->nvstate.iot_euicc_emu.auto_enable.smdp_address->data, - ctx->iot_euicc_emu.auto_enable.smdp_address->data, - ctx->iot_euicc_emu.auto_enable.smdp_address->len)) { + if (memcmp(ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address->data, + ctx->iot_euicc_emu.immediate_enable.smdp_address->data, + ctx->iot_euicc_emu.immediate_enable.smdp_address->len)) { rc = EnableUsingDDResponse__enableUsingDDResult_immediateEnableNotAvailable; goto error; } @@ -152,8 +152,8 @@ /* Enable profile */ enable_prfle_req.req.profileIdentifier.present = EnableProfileRequest__profileIdentifier_PR_isdpAid; IPA_ASSIGN_BUF_TO_ASN(enable_prfle_req.req.profileIdentifier.choice.isdpAid, - ctx->iot_euicc_emu.auto_enable.profile_aid->data, - ctx->iot_euicc_emu.auto_enable.profile_aid->len); + ctx->iot_euicc_emu.immediate_enable.profile_aid->data, + ctx->iot_euicc_emu.immediate_enable.profile_aid->len);
enable_prfle_res = ipa_es10c_enable_prfle(ctx, &enable_prfle_req); if (enable_prfle_res && enable_prfle_res->res->enableResult == EnableProfileResponse__enableResult_ok) @@ -173,12 +173,12 @@ }
/* Ensure the auto enable data is cleared after use */ - ipa_buf_free(ctx->iot_euicc_emu.auto_enable.smdp_oid); - ctx->iot_euicc_emu.auto_enable.smdp_oid = NULL; - ipa_buf_free(ctx->iot_euicc_emu.auto_enable.smdp_address); - ctx->iot_euicc_emu.auto_enable.smdp_address = NULL; - ipa_buf_free(ctx->iot_euicc_emu.auto_enable.profile_aid); - ctx->iot_euicc_emu.auto_enable.profile_aid = NULL; + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.smdp_oid); + ctx->iot_euicc_emu.immediate_enable.smdp_oid = NULL; + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.smdp_address); + ctx->iot_euicc_emu.immediate_enable.smdp_address = NULL; + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.profile_aid); + ctx->iot_euicc_emu.immediate_enable.profile_aid = NULL;
ipa_es10c_enable_prfle_res_free(enable_prfle_res); return rc; diff --git a/src/ipa/libipa/es10b_euicc_mem_rst.c b/src/ipa/libipa/es10b_euicc_mem_rst.c index f57eb8e..5b2040f 100644 --- a/src/ipa/libipa/es10b_euicc_mem_rst.c +++ b/src/ipa/libipa/es10b_euicc_mem_rst.c @@ -150,7 +150,7 @@ rst_opt[0] |= (1 << (7 - SGP32_EuiccMemoryResetRequest__resetOptions_resetDefaultSmdpAddress)); if (req->eim_cfg_data) rst_opt[0] |= (1 << (7 - SGP32_EuiccMemoryResetRequest__resetOptions_resetEimConfigData)); - if (req->auto_enable_cfg) + if (req->immediate_enable_cfg) rst_opt[0] |= (1 << (7 - SGP32_EuiccMemoryResetRequest__resetOptions_resetImmediateEnableConfig));
es10b_req = ipa_es10x_req_enc(&asn_DEF_SGP32_EuiccMemoryResetRequest, &mem_rst_req, "eUICCMemoryReset"); @@ -200,14 +200,14 @@ IPA_FREE(ctx->nvstate.iot_euicc_emu.eim_cfg_ber); ctx->nvstate.iot_euicc_emu.eim_cfg_ber = NULL; } - if (req->auto_enable_cfg) { + if (req->immediate_enable_cfg) { IPA_LOGP_ES10X("eUICCMemoryReset", LINFO, - "IoT eUICC emulation active, also clearing auto enable configuration...\n"); - IPA_FREE(ctx->nvstate.iot_euicc_emu.auto_enable.smdp_oid); - ctx->nvstate.iot_euicc_emu.auto_enable.smdp_oid = NULL; - IPA_FREE(ctx->nvstate.iot_euicc_emu.auto_enable.smdp_address); - ctx->nvstate.iot_euicc_emu.auto_enable.smdp_address = NULL; - ctx->nvstate.iot_euicc_emu.auto_enable.flag = false; + "IoT eUICC emulation active, also clearing immediate enable configuration...\n"); + IPA_FREE(ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid); + ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid = NULL; + IPA_FREE(ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address); + ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address = NULL; + ctx->nvstate.iot_euicc_emu.immediate_enable.flag = false; }
es10b_req = ipa_es10x_req_enc(&asn_DEF_EuiccMemoryResetRequest, &mem_rst_req, "eUICCMemoryReset"); diff --git a/src/ipa/libipa/es10b_euicc_mem_rst.h b/src/ipa/libipa/es10b_euicc_mem_rst.h index 81c9c01..8f4d304 100644 --- a/src/ipa/libipa/es10b_euicc_mem_rst.h +++ b/src/ipa/libipa/es10b_euicc_mem_rst.h @@ -15,7 +15,7 @@ bool test_profiles; bool default_smdp_addr; bool eim_cfg_data; - bool auto_enable_cfg; + bool immediate_enable_cfg; };
int ipa_es10b_euicc_mem_rst(struct ipa_context *ctx, const struct ipa_es10b_euicc_mem_rst *req); diff --git a/src/ipa/libipa/es10b_load_bnd_prfle_pkg.c b/src/ipa/libipa/es10b_load_bnd_prfle_pkg.c index 52b70dc..d11eb7d 100644 --- a/src/ipa/libipa/es10b_load_bnd_prfle_pkg.c +++ b/src/ipa/libipa/es10b_load_bnd_prfle_pkg.c @@ -23,22 +23,22 @@ #include "es10x.h" #include "es10b_load_bnd_prfle_pkg.h"
-static void collect_auto_enable_data_from_prfle_inst_rslt(struct ipa_context *ctx, - struct ProfileInstallationResult *prfle_inst_rslt) +static void collect_immediate_enable_data_from_prfle_inst_rslt(struct ipa_context *ctx, + struct ProfileInstallationResult *prfle_inst_rslt) { struct ProfileInstallationResultData *prfle_inst_res_data = &prfle_inst_rslt->profileInstallationResultData;
- /* When the profile was not successfully installed, then there is no point in collecting any auto enable data. */ + /* When the profile was not successfully installed, then there is no point in collecting any immediate enable data. */ if (prfle_inst_res_data->finalResult.present != ProfileInstallationResultData__finalResult_PR_successResult) return;
- /* Collect smdpOid and smdpAddress so that we can verify later whether the auto enable is granted or not. */ - ctx->iot_euicc_emu.auto_enable.smdp_oid = IPA_BUF_FROM_ASN(&prfle_inst_res_data->smdpOid); - ctx->iot_euicc_emu.auto_enable.smdp_address = + /* Collect smdpOid and smdpAddress so that we can verify later whether the immediate enable is granted or not. */ + ctx->iot_euicc_emu.immediate_enable.smdp_oid = IPA_BUF_FROM_ASN(&prfle_inst_res_data->smdpOid); + ctx->iot_euicc_emu.immediate_enable.smdp_address = IPA_BUF_FROM_ASN(&prfle_inst_res_data->notificationMetadata.notificationAddress);
/* Collect AID of the profile so that we later know which profile to enable. */ - ctx->iot_euicc_emu.auto_enable.profile_aid = + ctx->iot_euicc_emu.immediate_enable.profile_aid = IPA_BUF_FROM_ASN(&prfle_inst_res_data->finalResult.choice.successResult.aid); }
@@ -67,14 +67,14 @@ struct ipa_es10b_load_bnd_prfle_pkg_res *res = IPA_ALLOC_ZERO(struct ipa_es10b_load_bnd_prfle_pkg_res); int rc;
- /* In case IoT eUICC emulation is active, ensure that the auto enable data is cleared. (This data has no + /* In case IoT eUICC emulation is active, ensure that the immediate enable data is cleared. (This data has no * relevance in case a real IoT eUICC is used.) */ - ipa_buf_free(ctx->iot_euicc_emu.auto_enable.smdp_oid); - ctx->iot_euicc_emu.auto_enable.smdp_oid = NULL; - ipa_buf_free(ctx->iot_euicc_emu.auto_enable.smdp_address); - ctx->iot_euicc_emu.auto_enable.smdp_address = NULL; - ipa_buf_free(ctx->iot_euicc_emu.auto_enable.profile_aid); - ctx->iot_euicc_emu.auto_enable.profile_aid = NULL; + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.smdp_oid); + ctx->iot_euicc_emu.immediate_enable.smdp_oid = NULL; + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.smdp_address); + ctx->iot_euicc_emu.immediate_enable.smdp_address = NULL; + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.profile_aid); + ctx->iot_euicc_emu.immediate_enable.profile_aid = NULL;
/* The ES10b LoadBoundProfilePackage function is a pseudo function that only exists as a placeholder in the * specification. In practice it is just a STORE DATA command that carries a profile segment without any @@ -94,10 +94,10 @@ if (rc < 0) goto error;
- /* In case IoT eUICC emulation is active, collect auto enable data to support the emulation of + /* In case IoT eUICC emulation is active, collect immediate enable data to support the emulation of * the ES10b function EnableUsingDD. */ if (ctx->cfg->iot_euicc_emu_enabled) - collect_auto_enable_data_from_prfle_inst_rslt(ctx, res->res); + collect_immediate_enable_data_from_prfle_inst_rslt(ctx, res->res); }
IPA_FREE(es10b_res); diff --git a/src/ipa/libipa/es10b_load_euicc_pkg.c b/src/ipa/libipa/es10b_load_euicc_pkg.c index c25ebc9..fd3f1df 100644 --- a/src/ipa/libipa/es10b_load_euicc_pkg.c +++ b/src/ipa/libipa/es10b_load_euicc_pkg.c @@ -242,21 +242,21 @@
/* Update immediateEnableFlag */ if (configureImmediateEnable_psmo->immediateEnableFlag) - ctx->nvstate.iot_euicc_emu.auto_enable.flag = true; + ctx->nvstate.iot_euicc_emu.immediate_enable.flag = true; else - ctx->nvstate.iot_euicc_emu.auto_enable.flag = false; + ctx->nvstate.iot_euicc_emu.immediate_enable.flag = false;
/* Update smdpOid */ - ipa_buf_free(ctx->nvstate.iot_euicc_emu.auto_enable.smdp_oid); - ctx->nvstate.iot_euicc_emu.auto_enable.smdp_oid = NULL; + ipa_buf_free(ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid); + ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid = NULL; if (configureImmediateEnable_psmo->smdpOid) - ctx->nvstate.iot_euicc_emu.auto_enable.smdp_oid = IPA_BUF_FROM_ASN(configureImmediateEnable_psmo->smdpOid); + ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid = IPA_BUF_FROM_ASN(configureImmediateEnable_psmo->smdpOid);
/* Update smdpAddress */ - ipa_buf_free(ctx->nvstate.iot_euicc_emu.auto_enable.smdp_address); - ctx->nvstate.iot_euicc_emu.auto_enable.smdp_address = NULL; + ipa_buf_free(ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address); + ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address = NULL; if (configureImmediateEnable_psmo->smdpAddress) - ctx->nvstate.iot_euicc_emu.auto_enable.smdp_address = + ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address = IPA_BUF_FROM_ASN(configureImmediateEnable_psmo->smdpAddress);
euicc_result_data->choice.configureImmediateEnableResult = ConfigureImmediateEnableResult_ok; diff --git a/src/ipa/libipa/ipad.c b/src/ipa/libipa/ipad.c index fa1fb21..5d4c0a9 100644 --- a/src/ipa/libipa/ipad.c +++ b/src/ipa/libipa/ipad.c @@ -38,8 +38,8 @@ { /* free dynamically allocated struct members (append code for new members here) */ IPA_FREE(nvstate->iot_euicc_emu.eim_cfg_ber); - IPA_FREE(nvstate->iot_euicc_emu.auto_enable.smdp_oid); - IPA_FREE(nvstate->iot_euicc_emu.auto_enable.smdp_address); + IPA_FREE(nvstate->iot_euicc_emu.immediate_enable.smdp_oid); + IPA_FREE(nvstate->iot_euicc_emu.immediate_enable.smdp_address); }
static void nvstate_reset(struct ipa_nvstate *nvstate) @@ -77,8 +77,8 @@
/* serialize dynamically allocated struct members (append code for new members here) */ nvstate_bin = nvstate_serialize_ipa_buf(nvstate_bin, nvstate->iot_euicc_emu.eim_cfg_ber); - nvstate_bin = nvstate_serialize_ipa_buf(nvstate_bin, nvstate->iot_euicc_emu.auto_enable.smdp_oid); - nvstate_bin = nvstate_serialize_ipa_buf(nvstate_bin, nvstate->iot_euicc_emu.auto_enable.smdp_address); + nvstate_bin = nvstate_serialize_ipa_buf(nvstate_bin, nvstate->iot_euicc_emu.immediate_enable.smdp_oid); + nvstate_bin = nvstate_serialize_ipa_buf(nvstate_bin, nvstate->iot_euicc_emu.immediate_enable.smdp_address); return nvstate_bin; }
@@ -126,8 +126,8 @@
/* deserialize dynamically allocated struct members (append code for new members here) */ nvstate->iot_euicc_emu.eim_cfg_ber = nvstate_deserialize_ipa_buf(&nvstate_data, &nvstate_data_len); - nvstate->iot_euicc_emu.auto_enable.smdp_oid = nvstate_deserialize_ipa_buf(&nvstate_data, &nvstate_data_len); - nvstate->iot_euicc_emu.auto_enable.smdp_address = nvstate_deserialize_ipa_buf(&nvstate_data, &nvstate_data_len); + nvstate->iot_euicc_emu.immediate_enable.smdp_oid = nvstate_deserialize_ipa_buf(&nvstate_data, &nvstate_data_len); + nvstate->iot_euicc_emu.immediate_enable.smdp_address = nvstate_deserialize_ipa_buf(&nvstate_data, &nvstate_data_len); }
/*! Read eIM configuration from eUICC and pick a suitable eIM. @@ -252,14 +252,14 @@ * \param[inout] default_smdp_addr apply reset option "resetDefaultSmdpAddress". * \returns 0 on success, negative on error. */ int ipa_euicc_mem_rst(struct ipa_context *ctx, bool operatnl_profiles, bool test_profiles, bool default_smdp_addr, - bool eim_cfg_data, bool auto_enable_cfg) + bool eim_cfg_data, bool immediate_enable_cfg) { struct ipa_es10b_euicc_mem_rst euicc_mem_rst = { 0 }; euicc_mem_rst.operatnl_profiles = operatnl_profiles; euicc_mem_rst.test_profiles = test_profiles; euicc_mem_rst.default_smdp_addr = default_smdp_addr; euicc_mem_rst.eim_cfg_data = eim_cfg_data; - euicc_mem_rst.auto_enable_cfg = auto_enable_cfg; + euicc_mem_rst.immediate_enable_cfg = immediate_enable_cfg; return ipa_es10b_euicc_mem_rst(ctx, &euicc_mem_rst); }
@@ -346,9 +346,9 @@ nvstate = nvstate_serialize(&ctx->nvstate);
IPA_FREE(ctx->iot_euicc_emu.rollback_iccid); - ipa_buf_free(ctx->iot_euicc_emu.auto_enable.smdp_oid); - ipa_buf_free(ctx->iot_euicc_emu.auto_enable.smdp_address); - ipa_buf_free(ctx->iot_euicc_emu.auto_enable.profile_aid); + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.smdp_oid); + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.smdp_address); + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.profile_aid); IPA_FREE(ctx->eim_id); IPA_FREE(ctx->eim_fqdn); ipa_proc_eucc_pkg_dwnld_exec_res_free(ctx->proc_eucc_pkg_dwnld_exec_res);