+int z_Permissions(ODR o, Z_Permissions **p, int opt)
+{
+ if (!odr_sequence_begin(o, p, sizeof(**p)))
+ return opt && odr_ok(o);
+ return
+ odr_implicit(o, z_InternationalString, &(*p)->userId, ODR_CONTEXT,
+ 1, 0) &&
+ odr_implicit_settag(o, ODR_CONTEXT, 2) &&
+ odr_sequence_of(o, odr_integer, &(*p)->allowableFunctions,
+ &(*p)->num_allowableFunctions) &&
+ odr_sequence_end(o);
+}
+
+int z_ExtendedServicesRequest(ODR o, Z_ExtendedServicesRequest **p, int opt)
+{
+ if (!odr_sequence_begin(o, p, sizeof(**p)))
+ return opt && odr_ok(o);
+ return
+ z_ReferenceId(o, &(*p)->referenceId, 1) &&
+ odr_implicit(o, odr_integer, &(*p)->function, ODR_CONTEXT, 3, 0) &&
+ odr_implicit(o, odr_oid, &(*p)->packageType, ODR_CONTEXT, 4, 0) &&
+ odr_implicit(o, z_InternationalString, &(*p)->packageName, ODR_CONTEXT, 5, 1) &&
+ odr_implicit(o, z_InternationalString, &(*p)->userId, ODR_CONTEXT, 6, 1) &&
+ odr_implicit(o, z_IntUnit, &(*p)->retentionTime, ODR_CONTEXT, 7, 1) &&
+ odr_implicit(o, z_Permissions, &(*p)->permissions, ODR_CONTEXT, 8, 1) &&
+ odr_implicit(o, z_InternationalString, &(*p)->description, ODR_CONTEXT, 9, 1) &&
+ odr_implicit(o, z_External, &(*p)->taskSpecificParameters, ODR_CONTEXT, 10, 1) &&
+ odr_implicit(o, odr_integer, &(*p)->waitAction, ODR_CONTEXT, 11, 0) &&
+ z_ElementSetName(o, &(*p)->elements, 1) &&
+ z_OtherInformation(o, &(*p)->otherInfo, 1) &&
+ odr_sequence_end(o);
+}
+
+int z_ExtendedServicesResponse(ODR o, Z_ExtendedServicesResponse **p, int opt)
+{
+ if (!odr_sequence_begin(o, p, sizeof(**p)))
+ return opt && odr_ok(o);
+ return
+ z_ReferenceId(o, &(*p)->referenceId, 1) &&
+ odr_implicit(o, odr_integer, &(*p)->operationStatus, ODR_CONTEXT, 3, 0) &&
+ odr_implicit_settag(o, ODR_CONTEXT, 4) &&
+ (odr_sequence_of(o, z_DiagRec, &(*p)->diagnostics,
+ &(*p)->num_diagnostics) || odr_ok(o)) &&
+ odr_implicit(o, z_External, &(*p)->taskPackage, ODR_CONTEXT, 5, 1) &&
+ z_OtherInformation(o, &(*p)->otherInfo, 1) &&
+ odr_sequence_end(o);
+}
+
+/* ------------------------ APDU ------------------------- */
+