jolly has uploaded this change for review.
V1.2: Add StateChangeCause to GetEimPackageRequest
State change notification is optional and currently not supported by
IPA.
Reference: SGP.32 Section 6.3.2.6
Related: SYS#8101
Change-Id: I1ae561f6709a9eb490fa7a53420c332ff20bd058
---
M asn1/SGP32Definitions.asn
M src/ipa/libasn/CMakeLists.txt
M src/ipa/libasn/GetEimPackageRequest.c
M src/ipa/libasn/GetEimPackageRequest.h
A src/ipa/libasn/StateChangeCause.c
A src/ipa/libasn/StateChangeCause.h
6 files changed, 124 insertions(+), 13 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/57/43057/1
diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn
index b99168b..3bc2398 100644
--- a/asn1/SGP32Definitions.asn
+++ b/asn1/SGP32Definitions.asn
@@ -989,10 +989,21 @@
-- Section 6.3.2.6
-- ASN1START
+StateChangeCause ::= INTEGER {
+ otherEim(0), -- for change(s) requested by another registered eIM
+ fallback(1), -- for change(s) following fallback requested by IPA
+ emergencyProfile(2), -- for change(s) following Emergency Profile swap requested by IPA
+ local(3), -- for change(s) applied locally (RFU, not supported in this version)
+ reset(4), -- for change(s) following an euicc reset
+ immediateEnableProfile(5), -- for change(s) following immediate Profile enabling requested by IPA
+ deviceChange(6), -- for change(s) detected by IPAe following a IoT Device change (removable eSIMs)
+ undefined(127) -- unknown cause
+}
GetEimPackageRequest ::= [79] SEQUENCE { -- Tag 'BF4F'
eidValue [APPLICATION 26] Octet16, -- Tag '5A'
notifyStateChange [0] NULL OPTIONAL, -- Notification to the eIM that it should update its information about the eUICC (e.g. list of profiles, profile states...)
- rPLMN [1] OCTET STRING (SIZE(3)) OPTIONAL -- MCC and MNC of the last registered PLMN, coded as defined in 3GPP TS 24.008 [22]
+ stateChangeCause [1] StateChangeCause OPTIONAL, -- Provide the cause of the notified state change(s)
+ rPLMN [2] OCTET STRING (SIZE(3)) OPTIONAL -- MCC and MNC of the last registered PLMN, coded as defined in 3GPP TS 24.008 [22]
}
GetEimPackageResponse ::= [79] CHOICE { -- Tag 'BF4F'
euiccPackageRequest [81] EuiccPackageRequest, -- Tag 'BF51'
diff --git a/src/ipa/libasn/CMakeLists.txt b/src/ipa/libasn/CMakeLists.txt
index 3d5d649..3ab0559 100644
--- a/src/ipa/libasn/CMakeLists.txt
+++ b/src/ipa/libasn/CMakeLists.txt
@@ -880,6 +880,8 @@
SkipCerts.h
SmdpSigned2.c
SmdpSigned2.h
+StateChangeCause.c
+StateChangeCause.h
StoreMetadataRequest.c
StoreMetadataRequest.h
StreetAddress.c
diff --git a/src/ipa/libasn/GetEimPackageRequest.c b/src/ipa/libasn/GetEimPackageRequest.c
index 1d58a9d..8528351 100644
--- a/src/ipa/libasn/GetEimPackageRequest.c
+++ b/src/ipa/libasn/GetEimPackageRequest.c
@@ -33,10 +33,10 @@
}
}
-static asn_oer_constraints_t asn_OER_memb_rPLMN_constr_4 CC_NOTUSED = {
+static asn_oer_constraints_t asn_OER_memb_rPLMN_constr_5 CC_NOTUSED = {
{ 0, 0 },
3 /* (SIZE(3..3)) */};
-static asn_per_constraints_t asn_PER_memb_rPLMN_constr_4 CC_NOTUSED = {
+static asn_per_constraints_t asn_PER_memb_rPLMN_constr_5 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 0, 0, 3, 3 } /* (SIZE(3..3)) */,
0, 0 /* No PER value map */
@@ -51,7 +51,7 @@
0, 0, /* No default value */
"eidValue"
},
- { ATF_POINTER, 2, offsetof(struct GetEimPackageRequest, notifyStateChange),
+ { ATF_POINTER, 3, offsetof(struct GetEimPackageRequest, notifyStateChange),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_NULL,
@@ -60,17 +60,26 @@
0, 0, /* No default value */
"notifyStateChange"
},
- { ATF_POINTER, 1, offsetof(struct GetEimPackageRequest, rPLMN),
+ { ATF_POINTER, 2, offsetof(struct GetEimPackageRequest, stateChangeCause),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
+ &asn_DEF_StateChangeCause,
+ 0,
+ { 0, 0, 0 },
+ 0, 0, /* No default value */
+ "stateChangeCause"
+ },
+ { ATF_POINTER, 1, offsetof(struct GetEimPackageRequest, rPLMN),
+ (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
+ -1, /* IMPLICIT tag at current level */
&asn_DEF_OCTET_STRING,
0,
- { &asn_OER_memb_rPLMN_constr_4, &asn_PER_memb_rPLMN_constr_4, memb_rPLMN_constraint_1 },
+ { &asn_OER_memb_rPLMN_constr_5, &asn_PER_memb_rPLMN_constr_5, memb_rPLMN_constraint_1 },
0, 0, /* No default value */
"rPLMN"
},
};
-static const int asn_MAP_GetEimPackageRequest_oms_1[] = { 1, 2 };
+static const int asn_MAP_GetEimPackageRequest_oms_1[] = { 1, 2, 3 };
static const ber_tlv_tag_t asn_DEF_GetEimPackageRequest_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (79 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
@@ -78,16 +87,17 @@
static const asn_TYPE_tag2member_t asn_MAP_GetEimPackageRequest_tag2el_1[] = {
{ (ASN_TAG_CLASS_APPLICATION | (26 << 2)), 0, 0, 0 }, /* eidValue */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* notifyStateChange */
- { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 } /* rPLMN */
+ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 }, /* stateChangeCause */
+ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 3, 0, 0 } /* rPLMN */
};
asn_SEQUENCE_specifics_t asn_SPC_GetEimPackageRequest_specs_1 = {
sizeof(struct GetEimPackageRequest),
offsetof(struct GetEimPackageRequest, _asn_ctx),
asn_MAP_GetEimPackageRequest_tag2el_1,
- 3, /* Count of tags in the map */
+ 4, /* Count of tags in the map */
asn_MAP_GetEimPackageRequest_oms_1, /* Optional members */
- 2, 0, /* Root/Additions */
- 3, /* First extension addition */
+ 3, 0, /* Root/Additions */
+ 4, /* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_GetEimPackageRequest = {
"GetEimPackageRequest",
@@ -101,7 +111,7 @@
/sizeof(asn_DEF_GetEimPackageRequest_tags_1[0]), /* 2 */
{ 0, 0, SEQUENCE_constraint },
asn_MBR_GetEimPackageRequest_1,
- 3, /* Elements count */
+ 4, /* Elements count */
&asn_SPC_GetEimPackageRequest_specs_1 /* Additional specs */
};
diff --git a/src/ipa/libasn/GetEimPackageRequest.h b/src/ipa/libasn/GetEimPackageRequest.h
index 3075bd9..994c28f 100644
--- a/src/ipa/libasn/GetEimPackageRequest.h
+++ b/src/ipa/libasn/GetEimPackageRequest.h
@@ -14,6 +14,7 @@
/* Including external dependencies */
#include "Octet16.h"
#include <NULL.h>
+#include "StateChangeCause.h"
#include <OCTET_STRING.h>
#include <constr_SEQUENCE.h>
@@ -25,6 +26,7 @@
typedef struct GetEimPackageRequest {
Octet16_t eidValue;
NULL_t *notifyStateChange /* OPTIONAL */;
+ StateChangeCause_t *stateChangeCause /* OPTIONAL */;
OCTET_STRING_t *rPLMN /* OPTIONAL */;
/*
* This type is extensible,
@@ -38,7 +40,7 @@
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_GetEimPackageRequest;
extern asn_SEQUENCE_specifics_t asn_SPC_GetEimPackageRequest_specs_1;
-extern asn_TYPE_member_t asn_MBR_GetEimPackageRequest_1[3];
+extern asn_TYPE_member_t asn_MBR_GetEimPackageRequest_1[4];
#ifdef __cplusplus
}
diff --git a/src/ipa/libasn/StateChangeCause.c b/src/ipa/libasn/StateChangeCause.c
new file mode 100644
index 0000000..64e6e29
--- /dev/null
+++ b/src/ipa/libasn/StateChangeCause.c
@@ -0,0 +1,31 @@
+/*
+ * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
+ * From ASN.1 module "SGP32Definitions"
+ * found in "../../../asn1/SGP32Definitions.asn"
+ * `asn1c -fcompound-names -no-gen-example`
+ */
+
+#include "StateChangeCause.h"
+
+/*
+ * This type is implemented using NativeInteger,
+ * so here we adjust the DEF accordingly.
+ */
+static const ber_tlv_tag_t asn_DEF_StateChangeCause_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
+};
+asn_TYPE_descriptor_t asn_DEF_StateChangeCause = {
+ "StateChangeCause",
+ "StateChangeCause",
+ &asn_OP_NativeInteger,
+ asn_DEF_StateChangeCause_tags_1,
+ sizeof(asn_DEF_StateChangeCause_tags_1)
+ /sizeof(asn_DEF_StateChangeCause_tags_1[0]), /* 1 */
+ asn_DEF_StateChangeCause_tags_1, /* Same as above */
+ sizeof(asn_DEF_StateChangeCause_tags_1)
+ /sizeof(asn_DEF_StateChangeCause_tags_1[0]), /* 1 */
+ { 0, 0, NativeInteger_constraint },
+ 0, 0, /* Defined elsewhere */
+ 0 /* No specifics */
+};
+
diff --git a/src/ipa/libasn/StateChangeCause.h b/src/ipa/libasn/StateChangeCause.h
new file mode 100644
index 0000000..db0e315
--- /dev/null
+++ b/src/ipa/libasn/StateChangeCause.h
@@ -0,0 +1,55 @@
+/*
+ * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
+ * From ASN.1 module "SGP32Definitions"
+ * found in "../../../asn1/SGP32Definitions.asn"
+ * `asn1c -fcompound-names -no-gen-example`
+ */
+
+#ifndef _StateChangeCause_H_
+#define _StateChangeCause_H_
+
+
+#include <asn_application.h>
+
+/* Including external dependencies */
+#include <NativeInteger.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Dependencies */
+typedef enum StateChangeCause {
+ StateChangeCause_otherEim = 0,
+ StateChangeCause_fallback = 1,
+ StateChangeCause_emergencyProfile = 2,
+ StateChangeCause_local = 3,
+ StateChangeCause_reset = 4,
+ StateChangeCause_immediateEnableProfile = 5,
+ StateChangeCause_deviceChange = 6,
+ StateChangeCause_undefined = 127
+} e_StateChangeCause;
+
+/* StateChangeCause */
+typedef long StateChangeCause_t;
+
+/* Implementation */
+extern asn_TYPE_descriptor_t asn_DEF_StateChangeCause;
+asn_struct_free_f StateChangeCause_free;
+asn_struct_print_f StateChangeCause_print;
+asn_constr_check_f StateChangeCause_constraint;
+ber_type_decoder_f StateChangeCause_decode_ber;
+der_type_encoder_f StateChangeCause_encode_der;
+xer_type_decoder_f StateChangeCause_decode_xer;
+xer_type_encoder_f StateChangeCause_encode_xer;
+oer_type_decoder_f StateChangeCause_decode_oer;
+oer_type_encoder_f StateChangeCause_encode_oer;
+per_type_decoder_f StateChangeCause_decode_uper;
+per_type_encoder_f StateChangeCause_encode_uper;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _StateChangeCause_H_ */
+#include <asn_internal.h>
To view, visit change 43057. To unsubscribe, or for help writing mail filters, visit settings.