From e00fd6cff805d6aab67d3702c1630b6d05778943 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 13 Jun 2010 12:44:41 +0200 Subject: asn1c output for some more parts of the ASN1 TCAP spec --- include/AARE-apdu.h | 56 +++++++++++++ include/AARQ-apdu.h | 52 ++++++++++++ include/ABRT-apdu.h | 45 +++++++++++ include/ABRT-source.h | 43 ++++++++++ include/AUDT-apdu.h | 52 ++++++++++++ include/Associate-result.h | 43 ++++++++++ include/Associate-source-diagnostic.h | 57 +++++++++++++ include/DialoguePDU.h | 51 ++++++++++++ include/Makefile.am | 15 +++- include/RLRE-apdu.h | 45 +++++++++++ include/RLRQ-apdu.h | 45 +++++++++++ include/Release-request-reason.h | 44 ++++++++++ include/Release-response-reason.h | 44 ++++++++++ include/UniDialoguePDU.h | 45 +++++++++++ src/AARE-apdu.c | 146 ++++++++++++++++++++++++++++++++++ src/AARQ-apdu.c | 126 +++++++++++++++++++++++++++++ src/ABRT-apdu.c | 116 +++++++++++++++++++++++++++ src/ABRT-source.c | 109 +++++++++++++++++++++++++ src/AUDT-apdu.c | 126 +++++++++++++++++++++++++++++ src/Associate-result.c | 109 +++++++++++++++++++++++++ src/Associate-source-diagnostic.c | 66 +++++++++++++++ src/DialoguePDU.c | 76 ++++++++++++++++++ src/Makefile.am | 15 +++- src/RLRE-apdu.c | 116 +++++++++++++++++++++++++++ src/RLRQ-apdu.c | 116 +++++++++++++++++++++++++++ src/Release-request-reason.c | 109 +++++++++++++++++++++++++ src/Release-response-reason.c | 109 +++++++++++++++++++++++++ src/UniDialoguePDU.c | 56 +++++++++++++ 28 files changed, 2030 insertions(+), 2 deletions(-) create mode 100644 include/AARE-apdu.h create mode 100644 include/AARQ-apdu.h create mode 100644 include/ABRT-apdu.h create mode 100644 include/ABRT-source.h create mode 100644 include/AUDT-apdu.h create mode 100644 include/Associate-result.h create mode 100644 include/Associate-source-diagnostic.h create mode 100644 include/DialoguePDU.h create mode 100644 include/RLRE-apdu.h create mode 100644 include/RLRQ-apdu.h create mode 100644 include/Release-request-reason.h create mode 100644 include/Release-response-reason.h create mode 100644 include/UniDialoguePDU.h create mode 100644 src/AARE-apdu.c create mode 100644 src/AARQ-apdu.c create mode 100644 src/ABRT-apdu.c create mode 100644 src/ABRT-source.c create mode 100644 src/AUDT-apdu.c create mode 100644 src/Associate-result.c create mode 100644 src/Associate-source-diagnostic.c create mode 100644 src/DialoguePDU.c create mode 100644 src/RLRE-apdu.c create mode 100644 src/RLRQ-apdu.c create mode 100644 src/Release-request-reason.c create mode 100644 src/Release-response-reason.c create mode 100644 src/UniDialoguePDU.c diff --git a/include/AARE-apdu.h b/include/AARE-apdu.h new file mode 100644 index 0000000..242a584 --- /dev/null +++ b/include/AARE-apdu.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) + * From ASN.1 module "DialoguePDUs" + * found in "DialoguePDUs.asn" + */ + +#ifndef _AARE_apdu_H_ +#define _AARE_apdu_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include "Associate-result.h" +#include "Associate-source-diagnostic.h" +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum protocol_version { + protocol_version_version1 = 0 +} e_protocol_version; + +/* AARE-apdu */ +typedef struct AARE_apdu { + BIT_STRING_t *protocol_version /* DEFAULT {version1} */; + OBJECT_IDENTIFIER_t application_context_name; + Associate_result_t result; + Associate_source_diagnostic_t result_source_diagnostic; + struct user_information { + A_SEQUENCE_OF(EXTERNAL_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *user_information; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} AARE_apdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_AARE_apdu; + +#ifdef __cplusplus +} +#endif + +#endif /* _AARE_apdu_H_ */ diff --git a/include/AARQ-apdu.h b/include/AARQ-apdu.h new file mode 100644 index 0000000..4edea7c --- /dev/null +++ b/include/AARQ-apdu.h @@ -0,0 +1,52 @@ +/* + * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) + * From ASN.1 module "DialoguePDUs" + * found in "DialoguePDUs.asn" + */ + +#ifndef _AARQ_apdu_H_ +#define _AARQ_apdu_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum protocol_version { + protocol_version_version1 = 0 +} e_protocol_version; + +/* AARQ-apdu */ +typedef struct AARQ_apdu { + BIT_STRING_t *protocol_version /* DEFAULT {version1} */; + OBJECT_IDENTIFIER_t application_context_name; + struct user_information { + A_SEQUENCE_OF(EXTERNAL_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *user_information; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} AARQ_apdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_AARQ_apdu; + +#ifdef __cplusplus +} +#endif + +#endif /* _AARQ_apdu_H_ */ diff --git a/include/ABRT-apdu.h b/include/ABRT-apdu.h new file mode 100644 index 0000000..7ee4c1b --- /dev/null +++ b/include/ABRT-apdu.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) + * From ASN.1 module "DialoguePDUs" + * found in "DialoguePDUs.asn" + */ + +#ifndef _ABRT_apdu_H_ +#define _ABRT_apdu_H_ + + +#include + +/* Including external dependencies */ +#include "ABRT-source.h" +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* ABRT-apdu */ +typedef struct ABRT_apdu { + ABRT_source_t abort_source; + struct user_information { + A_SEQUENCE_OF(EXTERNAL_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *user_information; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ABRT_apdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ABRT_apdu; + +#ifdef __cplusplus +} +#endif + +#endif /* _ABRT_apdu_H_ */ diff --git a/include/ABRT-source.h b/include/ABRT-source.h new file mode 100644 index 0000000..8141e33 --- /dev/null +++ b/include/ABRT-source.h @@ -0,0 +1,43 @@ +/* + * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) + * From ASN.1 module "DialoguePDUs" + * found in "DialoguePDUs.asn" + */ + +#ifndef _ABRT_source_H_ +#define _ABRT_source_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum ABRT_source { + ABRT_source_dialogue_service_user = 0, + ABRT_source_dialogue_service_provider = 1 +} e_ABRT_source; + +/* ABRT-source */ +typedef INTEGER_t ABRT_source_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ABRT_source; +asn_struct_free_f ABRT_source_free; +asn_struct_print_f ABRT_source_print; +asn_constr_check_f ABRT_source_constraint; +ber_type_decoder_f ABRT_source_decode_ber; +der_type_encoder_f ABRT_source_encode_der; +xer_type_decoder_f ABRT_source_decode_xer; +xer_type_encoder_f ABRT_source_encode_xer; + +#ifdef __cplusplus +} +#endif + +#endif /* _ABRT_source_H_ */ diff --git a/include/AUDT-apdu.h b/include/AUDT-apdu.h new file mode 100644 index 0000000..5da32a0 --- /dev/null +++ b/include/AUDT-apdu.h @@ -0,0 +1,52 @@ +/* + * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) + * From ASN.1 module "UnidialoguePDUs" + * found in "UnidialoguePDUs.asn" + */ + +#ifndef _AUDT_apdu_H_ +#define _AUDT_apdu_H_ + + +#include + +/* Including external dependencies */ +#include +#include +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum protocol_version { + protocol_version_version1 = 0 +} e_protocol_version; + +/* AUDT-apdu */ +typedef struct AUDT_apdu { + BIT_STRING_t *protocol_version /* DEFAULT {version1} */; + OBJECT_IDENTIFIER_t application_context_name; + struct user_information { + A_SEQUENCE_OF(EXTERNAL_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *user_information; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} AUDT_apdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_AUDT_apdu; + +#ifdef __cplusplus +} +#endif + +#endif /* _AUDT_apdu_H_ */ diff --git a/include/Associate-result.h b/include/Associate-result.h new file mode 100644 index 0000000..e412716 --- /dev/null +++ b/include/Associate-result.h @@ -0,0 +1,43 @@ +/* + * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) + * From ASN.1 module "DialoguePDUs" + * found in "DialoguePDUs.asn" + */ + +#ifndef _Associate_result_H_ +#define _Associate_result_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Associate_result { + Associate_result_accepted = 0, + Associate_result_reject_permanent = 1 +} e_Associate_result; + +/* Associate-result */ +typedef INTEGER_t Associate_result_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Associate_result; +asn_struct_free_f Associate_result_free; +asn_struct_print_f Associate_result_print; +asn_constr_check_f Associate_result_constraint; +ber_type_decoder_f Associate_result_decode_ber; +der_type_encoder_f Associate_result_encode_der; +xer_type_decoder_f Associate_result_decode_xer; +xer_type_encoder_f Associate_result_encode_xer; + +#ifdef __cplusplus +} +#endif + +#endif /* _Associate_result_H_ */ diff --git a/include/Associate-source-diagnostic.h b/include/Associate-source-diagnostic.h new file mode 100644 index 0000000..24911e9 --- /dev/null +++ b/include/Associate-source-diagnostic.h @@ -0,0 +1,57 @@ +/* + * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) + * From ASN.1 module "DialoguePDUs" + * found in "DialoguePDUs.asn" + */ + +#ifndef _Associate_source_diagnostic_H_ +#define _Associate_source_diagnostic_H_ + + +#include + +/* Including external dependencies */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Associate_source_diagnostic_PR { + Associate_source_diagnostic_PR_NOTHING, /* No components present */ + Associate_source_diagnostic_PR_dialogue_service_user, + Associate_source_diagnostic_PR_dialogue_service_provider +} Associate_source_diagnostic_PR; +typedef enum dialogue_service_user { + dialogue_service_user_null = 0, + dialogue_service_user_no_reason_given = 1, + dialogue_service_user_application_context_name_not_supported = 2 +} e_dialogue_service_user; +typedef enum dialogue_service_provider { + dialogue_service_provider_null = 0, + dialogue_service_provider_no_reason_given = 1, + dialogue_service_provider_no_common_dialogue_portion = 2 +} e_dialogue_service_provider; + +/* Associate-source-diagnostic */ +typedef struct Associate_source_diagnostic { + Associate_source_diagnostic_PR present; + union Associate_source_diagnostic_u { + INTEGER_t dialogue_service_user; + INTEGER_t dialogue_service_provider; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Associate_source_diagnostic_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Associate_source_diagnostic; + +#ifdef __cplusplus +} +#endif + +#endif /* _Associate_source_diagnostic_H_ */ diff --git a/include/DialoguePDU.h b/include/DialoguePDU.h new file mode 100644 index 0000000..f04bb85 --- /dev/null +++ b/include/DialoguePDU.h @@ -0,0 +1,51 @@ +/* + * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) + * From ASN.1 module "DialoguePDUs" + * found in "DialoguePDUs.asn" + */ + +#ifndef _DialoguePDU_H_ +#define _DialoguePDU_H_ + + +#include + +/* Including external dependencies */ +#include "AARQ-apdu.h" +#include "AARE-apdu.h" +#include "ABRT-apdu.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum DialoguePDU_PR { + DialoguePDU_PR_NOTHING, /* No components present */ + DialoguePDU_PR_dialogueRequest, + DialoguePDU_PR_dialogueResponse, + DialoguePDU_PR_dialogueAbort +} DialoguePDU_PR; + +/* DialoguePDU */ +typedef struct DialoguePDU { + DialoguePDU_PR present; + union DialoguePDU_u { + AARQ_apdu_t dialogueRequest; + AARE_apdu_t dialogueResponse; + ABRT_apdu_t dialogueAbort; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} DialoguePDU_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_DialoguePDU; + +#ifdef __cplusplus +} +#endif + +#endif /* _DialoguePDU_H_ */ diff --git a/include/Makefile.am b/include/Makefile.am index 35b0ca0..8490c7b 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,4 +1,15 @@ osmo_asn1_tcap_HEADERS = \ + DialoguePDU.h \ + AARQ-apdu.h \ + AARE-apdu.h \ + RLRQ-apdu.h \ + RLRE-apdu.h \ + ABRT-apdu.h \ + ABRT-source.h \ + Associate-result.h \ + Associate-source-diagnostic.h \ + Release-request-reason.h \ + Release-response-reason.h \ ExternalPDU.h \ Dialog1.h \ TCMessage.h \ @@ -27,7 +38,9 @@ osmo_asn1_tcap_HEADERS = \ InvokeProblem.h \ ReturnResultProblem.h \ ReturnErrorProblem.h \ - ErrorCode.h + ErrorCode.h \ + UniDialoguePDU.h \ + AUDT-apdu.h osmo_asn1_tcapdir = $(includedir)/osmocom/tcap diff --git a/include/RLRE-apdu.h b/include/RLRE-apdu.h new file mode 100644 index 0000000..6df667b --- /dev/null +++ b/include/RLRE-apdu.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) + * From ASN.1 module "DialoguePDUs" + * found in "DialoguePDUs.asn" + */ + +#ifndef _RLRE_apdu_H_ +#define _RLRE_apdu_H_ + + +#include + +/* Including external dependencies */ +#include "Release-response-reason.h" +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RLRE-apdu */ +typedef struct RLRE_apdu { + Release_response_reason_t *reason /* OPTIONAL */; + struct user_information { + A_SEQUENCE_OF(EXTERNAL_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *user_information; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RLRE_apdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RLRE_apdu; + +#ifdef __cplusplus +} +#endif + +#endif /* _RLRE_apdu_H_ */ diff --git a/include/RLRQ-apdu.h b/include/RLRQ-apdu.h new file mode 100644 index 0000000..a9d441a --- /dev/null +++ b/include/RLRQ-apdu.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) + * From ASN.1 module "DialoguePDUs" + * found in "DialoguePDUs.asn" + */ + +#ifndef _RLRQ_apdu_H_ +#define _RLRQ_apdu_H_ + + +#include + +/* Including external dependencies */ +#include "Release-request-reason.h" +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* RLRQ-apdu */ +typedef struct RLRQ_apdu { + Release_request_reason_t *reason /* OPTIONAL */; + struct user_information { + A_SEQUENCE_OF(EXTERNAL_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *user_information; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} RLRQ_apdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_RLRQ_apdu; + +#ifdef __cplusplus +} +#endif + +#endif /* _RLRQ_apdu_H_ */ diff --git a/include/Release-request-reason.h b/include/Release-request-reason.h new file mode 100644 index 0000000..ec82eea --- /dev/null +++ b/include/Release-request-reason.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) + * From ASN.1 module "DialoguePDUs" + * found in "DialoguePDUs.asn" + */ + +#ifndef _Release_request_reason_H_ +#define _Release_request_reason_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Release_request_reason { + Release_request_reason_normal = 0, + Release_request_reason_urgent = 1, + Release_request_reason_user_defined = 30 +} e_Release_request_reason; + +/* Release-request-reason */ +typedef INTEGER_t Release_request_reason_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Release_request_reason; +asn_struct_free_f Release_request_reason_free; +asn_struct_print_f Release_request_reason_print; +asn_constr_check_f Release_request_reason_constraint; +ber_type_decoder_f Release_request_reason_decode_ber; +der_type_encoder_f Release_request_reason_encode_der; +xer_type_decoder_f Release_request_reason_decode_xer; +xer_type_encoder_f Release_request_reason_encode_xer; + +#ifdef __cplusplus +} +#endif + +#endif /* _Release_request_reason_H_ */ diff --git a/include/Release-response-reason.h b/include/Release-response-reason.h new file mode 100644 index 0000000..5ab9b18 --- /dev/null +++ b/include/Release-response-reason.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) + * From ASN.1 module "DialoguePDUs" + * found in "DialoguePDUs.asn" + */ + +#ifndef _Release_response_reason_H_ +#define _Release_response_reason_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Release_response_reason { + Release_response_reason_normal = 0, + Release_response_reason_not_finished = 1, + Release_response_reason_user_defined = 30 +} e_Release_response_reason; + +/* Release-response-reason */ +typedef INTEGER_t Release_response_reason_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Release_response_reason; +asn_struct_free_f Release_response_reason_free; +asn_struct_print_f Release_response_reason_print; +asn_constr_check_f Release_response_reason_constraint; +ber_type_decoder_f Release_response_reason_decode_ber; +der_type_encoder_f Release_response_reason_encode_der; +xer_type_decoder_f Release_response_reason_decode_xer; +xer_type_encoder_f Release_response_reason_encode_xer; + +#ifdef __cplusplus +} +#endif + +#endif /* _Release_response_reason_H_ */ diff --git a/include/UniDialoguePDU.h b/include/UniDialoguePDU.h new file mode 100644 index 0000000..b553324 --- /dev/null +++ b/include/UniDialoguePDU.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) + * From ASN.1 module "UnidialoguePDUs" + * found in "UnidialoguePDUs.asn" + */ + +#ifndef _UniDialoguePDU_H_ +#define _UniDialoguePDU_H_ + + +#include + +/* Including external dependencies */ +#include "AUDT-apdu.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum UniDialoguePDU_PR { + UniDialoguePDU_PR_NOTHING, /* No components present */ + UniDialoguePDU_PR_unidialoguePDU +} UniDialoguePDU_PR; + +/* UniDialoguePDU */ +typedef struct UniDialoguePDU { + UniDialoguePDU_PR present; + union UniDialoguePDU_u { + AUDT_apdu_t unidialoguePDU; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} UniDialoguePDU_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UniDialoguePDU; + +#ifdef __cplusplus +} +#endif + +#endif /* _UniDialoguePDU_H_ */ diff --git a/src/AARE-apdu.c b/src/AARE-apdu.c new file mode 100644 index 0000000..2f41c3a --- /dev/null +++ b/src/AARE-apdu.c @@ -0,0 +1,146 @@ +/* + * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) + * From ASN.1 module "DialoguePDUs" + * found in "DialoguePDUs.asn" + */ + +#include + +#include "AARE-apdu.h" + +static asn_TYPE_member_t asn_MBR_user_information_7[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (8 << 2)), + 0, + &asn_DEF_EXTERNAL, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "" + }, +}; +static ber_tlv_tag_t asn_DEF_user_information_tags_7[] = { + (ASN_TAG_CLASS_CONTEXT | (30 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_user_information_specs_7 = { + sizeof(struct user_information), + offsetof(struct user_information, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_user_information_7 = { + "user-information", + "user-information", + SEQUENCE_OF_free, + SEQUENCE_OF_print, + SEQUENCE_OF_constraint, + SEQUENCE_OF_decode_ber, + SEQUENCE_OF_encode_der, + SEQUENCE_OF_decode_xer, + SEQUENCE_OF_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_user_information_tags_7, + sizeof(asn_DEF_user_information_tags_7) + /sizeof(asn_DEF_user_information_tags_7[0]) - 1, /* 1 */ + asn_DEF_user_information_tags_7, /* Same as above */ + sizeof(asn_DEF_user_information_tags_7) + /sizeof(asn_DEF_user_information_tags_7[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_user_information_7, + 1, /* Single element */ + &asn_SPC_user_information_specs_7 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_AARE_apdu_1[] = { + { ATF_POINTER, 1, offsetof(struct AARE_apdu, protocol_version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "protocol-version" + }, + { ATF_NOFLAGS, 0, offsetof(struct AARE_apdu, application_context_name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_OBJECT_IDENTIFIER, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "application-context-name" + }, + { ATF_NOFLAGS, 0, offsetof(struct AARE_apdu, result), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Associate_result, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "result" + }, + { ATF_NOFLAGS, 0, offsetof(struct AARE_apdu, result_source_diagnostic), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Associate_source_diagnostic, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "result-source-diagnostic" + }, + { ATF_POINTER, 1, offsetof(struct AARE_apdu, user_information), + (ASN_TAG_CLASS_CONTEXT | (30 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_user_information_7, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "user-information" + }, +}; +static ber_tlv_tag_t asn_DEF_AARE_apdu_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_AARE_apdu_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* protocol-version at 28 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* application-context-name at 29 */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* result at 30 */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* result-source-diagnostic at 31 */ + { (ASN_TAG_CLASS_CONTEXT | (30 << 2)), 4, 0, 0 } /* user-information at 32 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_AARE_apdu_specs_1 = { + sizeof(struct AARE_apdu), + offsetof(struct AARE_apdu, _asn_ctx), + asn_MAP_AARE_apdu_tag2el_1, + 5, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* Start extensions */ + -1 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_AARE_apdu = { + "AARE-apdu", + "AARE-apdu", + SEQUENCE_free, + SEQUENCE_print, + SEQUENCE_constraint, + SEQUENCE_decode_ber, + SEQUENCE_encode_der, + SEQUENCE_decode_xer, + SEQUENCE_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_AARE_apdu_tags_1, + sizeof(asn_DEF_AARE_apdu_tags_1) + /sizeof(asn_DEF_AARE_apdu_tags_1[0]) - 1, /* 1 */ + asn_DEF_AARE_apdu_tags_1, /* Same as above */ + sizeof(asn_DEF_AARE_apdu_tags_1) + /sizeof(asn_DEF_AARE_apdu_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_AARE_apdu_1, + 5, /* Elements count */ + &asn_SPC_AARE_apdu_specs_1 /* Additional specs */ +}; + diff --git a/src/AARQ-apdu.c b/src/AARQ-apdu.c new file mode 100644 index 0000000..bb2f908 --- /dev/null +++ b/src/AARQ-apdu.c @@ -0,0 +1,126 @@ +/* + * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) + * From ASN.1 module "DialoguePDUs" + * found in "DialoguePDUs.asn" + */ + +#include + +#include "AARQ-apdu.h" + +static asn_TYPE_member_t asn_MBR_user_information_5[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (8 << 2)), + 0, + &asn_DEF_EXTERNAL, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "" + }, +}; +static ber_tlv_tag_t asn_DEF_user_information_tags_5[] = { + (ASN_TAG_CLASS_CONTEXT | (30 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_user_information_specs_5 = { + sizeof(struct user_information), + offsetof(struct user_information, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_user_information_5 = { + "user-information", + "user-information", + SEQUENCE_OF_free, + SEQUENCE_OF_print, + SEQUENCE_OF_constraint, + SEQUENCE_OF_decode_ber, + SEQUENCE_OF_encode_der, + SEQUENCE_OF_decode_xer, + SEQUENCE_OF_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_user_information_tags_5, + sizeof(asn_DEF_user_information_tags_5) + /sizeof(asn_DEF_user_information_tags_5[0]) - 1, /* 1 */ + asn_DEF_user_information_tags_5, /* Same as above */ + sizeof(asn_DEF_user_information_tags_5) + /sizeof(asn_DEF_user_information_tags_5[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_user_information_5, + 1, /* Single element */ + &asn_SPC_user_information_specs_5 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_AARQ_apdu_1[] = { + { ATF_POINTER, 1, offsetof(struct AARQ_apdu, protocol_version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "protocol-version" + }, + { ATF_NOFLAGS, 0, offsetof(struct AARQ_apdu, application_context_name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_OBJECT_IDENTIFIER, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "application-context-name" + }, + { ATF_POINTER, 1, offsetof(struct AARQ_apdu, user_information), + (ASN_TAG_CLASS_CONTEXT | (30 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_user_information_5, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "user-information" + }, +}; +static ber_tlv_tag_t asn_DEF_AARQ_apdu_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_AARQ_apdu_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* protocol-version at 21 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* application-context-name at 22 */ + { (ASN_TAG_CLASS_CONTEXT | (30 << 2)), 2, 0, 0 } /* user-information at 23 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_AARQ_apdu_specs_1 = { + sizeof(struct AARQ_apdu), + offsetof(struct AARQ_apdu, _asn_ctx), + asn_MAP_AARQ_apdu_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* Start extensions */ + -1 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_AARQ_apdu = { + "AARQ-apdu", + "AARQ-apdu", + SEQUENCE_free, + SEQUENCE_print, + SEQUENCE_constraint, + SEQUENCE_decode_ber, + SEQUENCE_encode_der, + SEQUENCE_decode_xer, + SEQUENCE_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_AARQ_apdu_tags_1, + sizeof(asn_DEF_AARQ_apdu_tags_1) + /sizeof(asn_DEF_AARQ_apdu_tags_1[0]) - 1, /* 1 */ + asn_DEF_AARQ_apdu_tags_1, /* Same as above */ + sizeof(asn_DEF_AARQ_apdu_tags_1) + /sizeof(asn_DEF_AARQ_apdu_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_AARQ_apdu_1, + 3, /* Elements count */ + &asn_SPC_AARQ_apdu_specs_1 /* Additional specs */ +}; + diff --git a/src/ABRT-apdu.c b/src/ABRT-apdu.c new file mode 100644 index 0000000..c0085d1 --- /dev/null +++ b/src/ABRT-apdu.c @@ -0,0 +1,116 @@ +/* + * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) + * From ASN.1 module "DialoguePDUs" + * found in "DialoguePDUs.asn" + */ + +#include + +#include "ABRT-apdu.h" + +static asn_TYPE_member_t asn_MBR_user_information_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (8 << 2)), + 0, + &asn_DEF_EXTERNAL, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "" + }, +}; +static ber_tlv_tag_t asn_DEF_user_information_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (30 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_user_information_specs_3 = { + sizeof(struct user_information), + offsetof(struct user_information, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_user_information_3 = { + "user-information", + "user-information", + SEQUENCE_OF_free, + SEQUENCE_OF_print, + SEQUENCE_OF_constraint, + SEQUENCE_OF_decode_ber, + SEQUENCE_OF_encode_der, + SEQUENCE_OF_decode_xer, + SEQUENCE_OF_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_user_information_tags_3, + sizeof(asn_DEF_user_information_tags_3) + /sizeof(asn_DEF_user_information_tags_3[0]) - 1, /* 1 */ + asn_DEF_user_information_tags_3, /* Same as above */ + sizeof(asn_DEF_user_information_tags_3) + /sizeof(asn_DEF_user_information_tags_3[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_user_information_3, + 1, /* Single element */ + &asn_SPC_user_information_specs_3 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_ABRT_apdu_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ABRT_apdu, abort_source), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ABRT_source, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "abort-source" + }, + { ATF_POINTER, 1, offsetof(struct ABRT_apdu, user_information), + (ASN_TAG_CLASS_CONTEXT | (30 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_user_information_3, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "user-information" + }, +}; +static ber_tlv_tag_t asn_DEF_ABRT_apdu_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (4 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_ABRT_apdu_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* abort-source at 50 */ + { (ASN_TAG_CLASS_CONTEXT | (30 << 2)), 1, 0, 0 } /* user-information at 51 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_ABRT_apdu_specs_1 = { + sizeof(struct ABRT_apdu), + offsetof(struct ABRT_apdu, _asn_ctx), + asn_MAP_ABRT_apdu_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* Start extensions */ + -1 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_ABRT_apdu = { + "ABRT-apdu", + "ABRT-apdu", + SEQUENCE_free, + SEQUENCE_print, + SEQUENCE_constraint, + SEQUENCE_decode_ber, + SEQUENCE_encode_der, + SEQUENCE_decode_xer, + SEQUENCE_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_ABRT_apdu_tags_1, + sizeof(asn_DEF_ABRT_apdu_tags_1) + /sizeof(asn_DEF_ABRT_apdu_tags_1[0]) - 1, /* 1 */ + asn_DEF_ABRT_apdu_tags_1, /* Same as above */ + sizeof(asn_DEF_ABRT_apdu_tags_1) + /sizeof(asn_DEF_ABRT_apdu_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_ABRT_apdu_1, + 2, /* Elements count */ + &asn_SPC_ABRT_apdu_specs_1 /* Additional specs */ +}; + diff --git a/src/ABRT-source.c b/src/ABRT-source.c new file mode 100644 index 0000000..748d17f --- /dev/null +++ b/src/ABRT-source.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) + * From ASN.1 module "DialoguePDUs" + * found in "DialoguePDUs.asn" + */ + +#include + +#include "ABRT-source.h" + +int +ABRT_source_constraint(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + /* Replace with underlying type checker */ + td->check_constraints = asn_DEF_INTEGER.check_constraints; + return td->check_constraints(td, sptr, ctfailcb, app_key); +} + +/* + * This type is implemented using INTEGER, + * so here we adjust the DEF accordingly. + */ +static void +ABRT_source_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { + td->free_struct = asn_DEF_INTEGER.free_struct; + td->print_struct = asn_DEF_INTEGER.print_struct; + td->ber_decoder = asn_DEF_INTEGER.ber_decoder; + td->der_encoder = asn_DEF_INTEGER.der_encoder; + td->xer_decoder = asn_DEF_INTEGER.xer_decoder; + td->xer_encoder = asn_DEF_INTEGER.xer_encoder; + td->uper_decoder = asn_DEF_INTEGER.uper_decoder; + td->uper_encoder = asn_DEF_INTEGER.uper_encoder; + if(!td->per_constraints) + td->per_constraints = asn_DEF_INTEGER.per_constraints; + td->elements = asn_DEF_INTEGER.elements; + td->elements_count = asn_DEF_INTEGER.elements_count; + td->specifics = asn_DEF_INTEGER.specifics; +} + +void +ABRT_source_free(asn_TYPE_descriptor_t *td, + void *struct_ptr, int contents_only) { + ABRT_source_1_inherit_TYPE_descriptor(td); + td->free_struct(td, struct_ptr, contents_only); +} + +int +ABRT_source_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + ABRT_source_1_inherit_TYPE_descriptor(td); + return td->print_struct(td, struct_ptr, ilevel, cb, app_key); +} + +asn_dec_rval_t +ABRT_source_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const void *bufptr, size_t size, int tag_mode) { + ABRT_source_1_inherit_TYPE_descriptor(td); + return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); +} + +asn_enc_rval_t +ABRT_source_encode_der(asn_TYPE_descriptor_t *td, + void *structure, int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + ABRT_source_1_inherit_TYPE_descriptor(td); + return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); +} + +asn_dec_rval_t +ABRT_source_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const char *opt_mname, const void *bufptr, size_t size) { + ABRT_source_1_inherit_TYPE_descriptor(td); + return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); +} + +asn_enc_rval_t +ABRT_source_encode_xer(asn_TYPE_descriptor_t *td, void *structure, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + ABRT_source_1_inherit_TYPE_descriptor(td); + return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); +} + +static ber_tlv_tag_t asn_DEF_ABRT_source_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_ABRT_source = { + "ABRT-source", + "ABRT-source", + ABRT_source_free, + ABRT_source_print, + ABRT_source_constraint, + ABRT_source_decode_ber, + ABRT_source_encode_der, + ABRT_source_decode_xer, + ABRT_source_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_ABRT_source_tags_1, + sizeof(asn_DEF_ABRT_source_tags_1) + /sizeof(asn_DEF_ABRT_source_tags_1[0]), /* 1 */ + asn_DEF_ABRT_source_tags_1, /* Same as above */ + sizeof(asn_DEF_ABRT_source_tags_1) + /sizeof(asn_DEF_ABRT_source_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + 0, 0, /* Defined elsewhere */ + 0 /* No specifics */ +}; + diff --git a/src/AUDT-apdu.c b/src/AUDT-apdu.c new file mode 100644 index 0000000..1ec47fc --- /dev/null +++ b/src/AUDT-apdu.c @@ -0,0 +1,126 @@ +/* + * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) + * From ASN.1 module "UnidialoguePDUs" + * found in "UnidialoguePDUs.asn" + */ + +#include + +#include "AUDT-apdu.h" + +static asn_TYPE_member_t asn_MBR_user_information_5[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (8 << 2)), + 0, + &asn_DEF_EXTERNAL, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "" + }, +}; +static ber_tlv_tag_t asn_DEF_user_information_tags_5[] = { + (ASN_TAG_CLASS_CONTEXT | (30 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_user_information_specs_5 = { + sizeof(struct user_information), + offsetof(struct user_information, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_user_information_5 = { + "user-information", + "user-information", + SEQUENCE_OF_free, + SEQUENCE_OF_print, + SEQUENCE_OF_constraint, + SEQUENCE_OF_decode_ber, + SEQUENCE_OF_encode_der, + SEQUENCE_OF_decode_xer, + SEQUENCE_OF_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_user_information_tags_5, + sizeof(asn_DEF_user_information_tags_5) + /sizeof(asn_DEF_user_information_tags_5[0]) - 1, /* 1 */ + asn_DEF_user_information_tags_5, /* Same as above */ + sizeof(asn_DEF_user_information_tags_5) + /sizeof(asn_DEF_user_information_tags_5[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_user_information_5, + 1, /* Single element */ + &asn_SPC_user_information_specs_5 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_AUDT_apdu_1[] = { + { ATF_POINTER, 1, offsetof(struct AUDT_apdu, protocol_version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "protocol-version" + }, + { ATF_NOFLAGS, 0, offsetof(struct AUDT_apdu, application_context_name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_OBJECT_IDENTIFIER, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "application-context-name" + }, + { ATF_POINTER, 1, offsetof(struct AUDT_apdu, user_information), + (ASN_TAG_CLASS_CONTEXT | (30 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_user_information_5, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "user-information" + }, +}; +static ber_tlv_tag_t asn_DEF_AUDT_apdu_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_AUDT_apdu_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* protocol-version at 17 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* application-context-name at 18 */ + { (ASN_TAG_CLASS_CONTEXT | (30 << 2)), 2, 0, 0 } /* user-information at 19 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_AUDT_apdu_specs_1 = { + sizeof(struct AUDT_apdu), + offsetof(struct AUDT_apdu, _asn_ctx), + asn_MAP_AUDT_apdu_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* Start extensions */ + -1 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_AUDT_apdu = { + "AUDT-apdu", + "AUDT-apdu", + SEQUENCE_free, + SEQUENCE_print, + SEQUENCE_constraint, + SEQUENCE_decode_ber, + SEQUENCE_encode_der, + SEQUENCE_decode_xer, + SEQUENCE_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_AUDT_apdu_tags_1, + sizeof(asn_DEF_AUDT_apdu_tags_1) + /sizeof(asn_DEF_AUDT_apdu_tags_1[0]) - 1, /* 1 */ + asn_DEF_AUDT_apdu_tags_1, /* Same as above */ + sizeof(asn_DEF_AUDT_apdu_tags_1) + /sizeof(asn_DEF_AUDT_apdu_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_AUDT_apdu_1, + 3, /* Elements count */ + &asn_SPC_AUDT_apdu_specs_1 /* Additional specs */ +}; + diff --git a/src/Associate-result.c b/src/Associate-result.c new file mode 100644 index 0000000..81b79a9 --- /dev/null +++ b/src/Associate-result.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) + * From ASN.1 module "DialoguePDUs" + * found in "DialoguePDUs.asn" + */ + +#include + +#include "Associate-result.h" + +int +Associate_result_constraint(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + /* Replace with underlying type checker */ + td->check_constraints = asn_DEF_INTEGER.check_constraints; + return td->check_constraints(td, sptr, ctfailcb, app_key); +} + +/* + * This type is implemented using INTEGER, + * so here we adjust the DEF accordingly. + */ +static void +Associate_result_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { + td->free_struct = asn_DEF_INTEGER.free_struct; + td->print_struct = asn_DEF_INTEGER.print_struct; + td->ber_decoder = asn_DEF_INTEGER.ber_decoder; + td->der_encoder = asn_DEF_INTEGER.der_encoder; + td->xer_decoder = asn_DEF_INTEGER.xer_decoder; + td->xer_encoder = asn_DEF_INTEGER.xer_encoder; + td->uper_decoder = asn_DEF_INTEGER.uper_decoder; + td->uper_encoder = asn_DEF_INTEGER.uper_encoder; + if(!td->per_constraints) + td->per_constraints = asn_DEF_INTEGER.per_constraints; + td->elements = asn_DEF_INTEGER.elements; + td->elements_count = asn_DEF_INTEGER.elements_count; + td->specifics = asn_DEF_INTEGER.specifics; +} + +void +Associate_result_free(asn_TYPE_descriptor_t *td, + void *struct_ptr, int contents_only) { + Associate_result_1_inherit_TYPE_descriptor(td); + td->free_struct(td, struct_ptr, contents_only); +} + +int +Associate_result_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + Associate_result_1_inherit_TYPE_descriptor(td); + return td->print_struct(td, struct_ptr, ilevel, cb, app_key); +} + +asn_dec_rval_t +Associate_result_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const void *bufptr, size_t size, int tag_mode) { + Associate_result_1_inherit_TYPE_descriptor(td); + return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); +} + +asn_enc_rval_t +Associate_result_encode_der(asn_TYPE_descriptor_t *td, + void *structure, int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + Associate_result_1_inherit_TYPE_descriptor(td); + return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); +} + +asn_dec_rval_t +Associate_result_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const char *opt_mname, const void *bufptr, size_t size) { + Associate_result_1_inherit_TYPE_descriptor(td); + return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); +} + +asn_enc_rval_t +Associate_result_encode_xer(asn_TYPE_descriptor_t *td, void *structure, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + Associate_result_1_inherit_TYPE_descriptor(td); + return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); +} + +static ber_tlv_tag_t asn_DEF_Associate_result_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Associate_result = { + "Associate-result", + "Associate-result", + Associate_result_free, + Associate_result_print, + Associate_result_constraint, + Associate_result_decode_ber, + Associate_result_encode_der, + Associate_result_decode_xer, + Associate_result_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_Associate_result_tags_1, + sizeof(asn_DEF_Associate_result_tags_1) + /sizeof(asn_DEF_Associate_result_tags_1[0]), /* 1 */ + asn_DEF_Associate_result_tags_1, /* Same as above */ + sizeof(asn_DEF_Associate_result_tags_1) + /sizeof(asn_DEF_Associate_result_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + 0, 0, /* Defined elsewhere */ + 0 /* No specifics */ +}; + diff --git a/src/Associate-source-diagnostic.c b/src/Associate-source-diagnostic.c new file mode 100644 index 0000000..c99ed71 --- /dev/null +++ b/src/Associate-source-diagnostic.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) + * From ASN.1 module "DialoguePDUs" + * found in "DialoguePDUs.asn" + */ + +#include + +#include "Associate-source-diagnostic.h" + +static asn_TYPE_member_t asn_MBR_Associate_source_diagnostic_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Associate_source_diagnostic, choice.dialogue_service_user), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_INTEGER, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "dialogue-service-user" + }, + { ATF_NOFLAGS, 0, offsetof(struct Associate_source_diagnostic, choice.dialogue_service_provider), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_INTEGER, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "dialogue-service-provider" + }, +}; +static asn_TYPE_tag2member_t asn_MAP_Associate_source_diagnostic_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* dialogue-service-user at 61 */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 } /* dialogue-service-provider at 64 */ +}; +static asn_CHOICE_specifics_t asn_SPC_Associate_source_diagnostic_specs_1 = { + sizeof(struct Associate_source_diagnostic), + offsetof(struct Associate_source_diagnostic, _asn_ctx), + offsetof(struct Associate_source_diagnostic, present), + sizeof(((struct Associate_source_diagnostic *)0)->present), + asn_MAP_Associate_source_diagnostic_tag2el_1, + 2, /* Count of tags in the map */ + 0, + -1 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Associate_source_diagnostic = { + "Associate-source-diagnostic", + "Associate-source-diagnostic", + CHOICE_free, + CHOICE_print, + CHOICE_constraint, + CHOICE_decode_ber, + CHOICE_encode_der, + CHOICE_decode_xer, + CHOICE_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + CHOICE_outmost_tag, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + 0, /* No PER visible constraints */ + asn_MBR_Associate_source_diagnostic_1, + 2, /* Elements count */ + &asn_SPC_Associate_source_diagnostic_specs_1 /* Additional specs */ +}; + diff --git a/src/DialoguePDU.c b/src/DialoguePDU.c new file mode 100644 index 0000000..a7398d7 --- /dev/null +++ b/src/DialoguePDU.c @@ -0,0 +1,76 @@ +/* + * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) + * From ASN.1 module "DialoguePDUs" + * found in "DialoguePDUs.asn" + */ + +#include + +#include "DialoguePDU.h" + +static asn_TYPE_member_t asn_MBR_DialoguePDU_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct DialoguePDU, choice.dialogueRequest), + (ASN_TAG_CLASS_APPLICATION | (0 << 2)), + 0, + &asn_DEF_AARQ_apdu, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "dialogueRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct DialoguePDU, choice.dialogueResponse), + (ASN_TAG_CLASS_APPLICATION | (1 << 2)), + 0, + &asn_DEF_AARE_apdu, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "dialogueResponse" + }, + { ATF_NOFLAGS, 0, offsetof(struct DialoguePDU, choice.dialogueAbort), + (ASN_TAG_CLASS_APPLICATION | (4 << 2)), + 0, + &asn_DEF_ABRT_apdu, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "dialogueAbort" + }, +}; +static asn_TYPE_tag2member_t asn_MAP_DialoguePDU_tag2el_1[] = { + { (ASN_TAG_CLASS_APPLICATION | (0 << 2)), 0, 0, 0 }, /* dialogueRequest at 14 */ + { (ASN_TAG_CLASS_APPLICATION | (1 << 2)), 1, 0, 0 }, /* dialogueResponse at 15 */ + { (ASN_TAG_CLASS_APPLICATION | (4 << 2)), 2, 0, 0 } /* dialogueAbort at 17 */ +}; +static asn_CHOICE_specifics_t asn_SPC_DialoguePDU_specs_1 = { + sizeof(struct DialoguePDU), + offsetof(struct DialoguePDU, _asn_ctx), + offsetof(struct DialoguePDU, present), + sizeof(((struct DialoguePDU *)0)->present), + asn_MAP_DialoguePDU_tag2el_1, + 3, /* Count of tags in the map */ + 0, + -1 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_DialoguePDU = { + "DialoguePDU", + "DialoguePDU", + CHOICE_free, + CHOICE_print, + CHOICE_constraint, + CHOICE_decode_ber, + CHOICE_encode_der, + CHOICE_decode_xer, + CHOICE_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + CHOICE_outmost_tag, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + 0, /* No PER visible constraints */ + asn_MBR_DialoguePDU_1, + 3, /* Elements count */ + &asn_SPC_DialoguePDU_specs_1 /* Additional specs */ +}; + diff --git a/src/Makefile.am b/src/Makefile.am index d8ca20d..aaa9772 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -7,6 +7,17 @@ INCLUDES = $(all_includes) -I/usr/local/include/asn1c -I$(top_srcdir)/include AM_CFLAGS = -fPIC -Wall libosmo_asn1_tcap_la_SOURCES = \ + DialoguePDU.c \ + AARQ-apdu.c \ + AARE-apdu.c \ + RLRQ-apdu.c \ + RLRE-apdu.c \ + ABRT-apdu.c \ + ABRT-source.c \ + Associate-result.c \ + Associate-source-diagnostic.c \ + Release-request-reason.c \ + Release-response-reason.c \ ExternalPDU.c \ Dialog1.c \ TCMessage.c \ @@ -35,6 +46,8 @@ libosmo_asn1_tcap_la_SOURCES = \ InvokeProblem.c \ ReturnResultProblem.c \ ReturnErrorProblem.c \ - ErrorCode.c + ErrorCode.c \ + UniDialoguePDU.c \ + AUDT-apdu.c lib_LTLIBRARIES=libosmo-asn1-tcap.la diff --git a/src/RLRE-apdu.c b/src/RLRE-apdu.c new file mode 100644 index 0000000..bddba0b --- /dev/null +++ b/src/RLRE-apdu.c @@ -0,0 +1,116 @@ +/* + * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) + * From ASN.1 module "DialoguePDUs" + * found in "DialoguePDUs.asn" + */ + +#include + +#include "RLRE-apdu.h" + +static asn_TYPE_member_t asn_MBR_user_information_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (8 << 2)), + 0, + &asn_DEF_EXTERNAL, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "" + }, +}; +static ber_tlv_tag_t asn_DEF_user_information_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (30 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_user_information_specs_3 = { + sizeof(struct user_information), + offsetof(struct user_information, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_user_information_3 = { + "user-information", + "user-information", + SEQUENCE_OF_free, + SEQUENCE_OF_print, + SEQUENCE_OF_constraint, + SEQUENCE_OF_decode_ber, + SEQUENCE_OF_encode_der, + SEQUENCE_OF_decode_xer, + SEQUENCE_OF_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_user_information_tags_3, + sizeof(asn_DEF_user_information_tags_3) + /sizeof(asn_DEF_user_information_tags_3[0]) - 1, /* 1 */ + asn_DEF_user_information_tags_3, /* Same as above */ + sizeof(asn_DEF_user_information_tags_3) + /sizeof(asn_DEF_user_information_tags_3[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_user_information_3, + 1, /* Single element */ + &asn_SPC_user_information_specs_3 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_RLRE_apdu_1[] = { + { ATF_POINTER, 2, offsetof(struct RLRE_apdu, reason), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Release_response_reason, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "reason" + }, + { ATF_POINTER, 1, offsetof(struct RLRE_apdu, user_information), + (ASN_TAG_CLASS_CONTEXT | (30 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_user_information_3, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "user-information" + }, +}; +static ber_tlv_tag_t asn_DEF_RLRE_apdu_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (3 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_RLRE_apdu_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* reason at 45 */ + { (ASN_TAG_CLASS_CONTEXT | (30 << 2)), 1, 0, 0 } /* user-information at 46 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_RLRE_apdu_specs_1 = { + sizeof(struct RLRE_apdu), + offsetof(struct RLRE_apdu, _asn_ctx), + asn_MAP_RLRE_apdu_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* Start extensions */ + -1 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_RLRE_apdu = { + "RLRE-apdu", + "RLRE-apdu", + SEQUENCE_free, + SEQUENCE_print, + SEQUENCE_constraint, + SEQUENCE_decode_ber, + SEQUENCE_encode_der, + SEQUENCE_decode_xer, + SEQUENCE_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_RLRE_apdu_tags_1, + sizeof(asn_DEF_RLRE_apdu_tags_1) + /sizeof(asn_DEF_RLRE_apdu_tags_1[0]) - 1, /* 1 */ + asn_DEF_RLRE_apdu_tags_1, /* Same as above */ + sizeof(asn_DEF_RLRE_apdu_tags_1) + /sizeof(asn_DEF_RLRE_apdu_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_RLRE_apdu_1, + 2, /* Elements count */ + &asn_SPC_RLRE_apdu_specs_1 /* Additional specs */ +}; + diff --git a/src/RLRQ-apdu.c b/src/RLRQ-apdu.c new file mode 100644 index 0000000..153e473 --- /dev/null +++ b/src/RLRQ-apdu.c @@ -0,0 +1,116 @@ +/* + * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) + * From ASN.1 module "DialoguePDUs" + * found in "DialoguePDUs.asn" + */ + +#include + +#include "RLRQ-apdu.h" + +static asn_TYPE_member_t asn_MBR_user_information_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (8 << 2)), + 0, + &asn_DEF_EXTERNAL, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "" + }, +}; +static ber_tlv_tag_t asn_DEF_user_information_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (30 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_user_information_specs_3 = { + sizeof(struct user_information), + offsetof(struct user_information, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_user_information_3 = { + "user-information", + "user-information", + SEQUENCE_OF_free, + SEQUENCE_OF_print, + SEQUENCE_OF_constraint, + SEQUENCE_OF_decode_ber, + SEQUENCE_OF_encode_der, + SEQUENCE_OF_decode_xer, + SEQUENCE_OF_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_user_information_tags_3, + sizeof(asn_DEF_user_information_tags_3) + /sizeof(asn_DEF_user_information_tags_3[0]) - 1, /* 1 */ + asn_DEF_user_information_tags_3, /* Same as above */ + sizeof(asn_DEF_user_information_tags_3) + /sizeof(asn_DEF_user_information_tags_3[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_user_information_3, + 1, /* Single element */ + &asn_SPC_user_information_specs_3 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_RLRQ_apdu_1[] = { + { ATF_POINTER, 2, offsetof(struct RLRQ_apdu, reason), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Release_request_reason, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "reason" + }, + { ATF_POINTER, 1, offsetof(struct RLRQ_apdu, user_information), + (ASN_TAG_CLASS_CONTEXT | (30 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_user_information_3, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "user-information" + }, +}; +static ber_tlv_tag_t asn_DEF_RLRQ_apdu_tags_1[] = { + (ASN_TAG_CLASS_APPLICATION | (2 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_TYPE_tag2member_t asn_MAP_RLRQ_apdu_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* reason at 38 */ + { (ASN_TAG_CLASS_CONTEXT | (30 << 2)), 1, 0, 0 } /* user-information at 39 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_RLRQ_apdu_specs_1 = { + sizeof(struct RLRQ_apdu), + offsetof(struct RLRQ_apdu, _asn_ctx), + asn_MAP_RLRQ_apdu_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* Start extensions */ + -1 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_RLRQ_apdu = { + "RLRQ-apdu", + "RLRQ-apdu", + SEQUENCE_free, + SEQUENCE_print, + SEQUENCE_constraint, + SEQUENCE_decode_ber, + SEQUENCE_encode_der, + SEQUENCE_decode_xer, + SEQUENCE_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_RLRQ_apdu_tags_1, + sizeof(asn_DEF_RLRQ_apdu_tags_1) + /sizeof(asn_DEF_RLRQ_apdu_tags_1[0]) - 1, /* 1 */ + asn_DEF_RLRQ_apdu_tags_1, /* Same as above */ + sizeof(asn_DEF_RLRQ_apdu_tags_1) + /sizeof(asn_DEF_RLRQ_apdu_tags_1[0]), /* 2 */ + 0, /* No PER visible constraints */ + asn_MBR_RLRQ_apdu_1, + 2, /* Elements count */ + &asn_SPC_RLRQ_apdu_specs_1 /* Additional specs */ +}; + diff --git a/src/Release-request-reason.c b/src/Release-request-reason.c new file mode 100644 index 0000000..0330d40 --- /dev/null +++ b/src/Release-request-reason.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) + * From ASN.1 module "DialoguePDUs" + * found in "DialoguePDUs.asn" + */ + +#include + +#include "Release-request-reason.h" + +int +Release_request_reason_constraint(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + /* Replace with underlying type checker */ + td->check_constraints = asn_DEF_INTEGER.check_constraints; + return td->check_constraints(td, sptr, ctfailcb, app_key); +} + +/* + * This type is implemented using INTEGER, + * so here we adjust the DEF accordingly. + */ +static void +Release_request_reason_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { + td->free_struct = asn_DEF_INTEGER.free_struct; + td->print_struct = asn_DEF_INTEGER.print_struct; + td->ber_decoder = asn_DEF_INTEGER.ber_decoder; + td->der_encoder = asn_DEF_INTEGER.der_encoder; + td->xer_decoder = asn_DEF_INTEGER.xer_decoder; + td->xer_encoder = asn_DEF_INTEGER.xer_encoder; + td->uper_decoder = asn_DEF_INTEGER.uper_decoder; + td->uper_encoder = asn_DEF_INTEGER.uper_encoder; + if(!td->per_constraints) + td->per_constraints = asn_DEF_INTEGER.per_constraints; + td->elements = asn_DEF_INTEGER.elements; + td->elements_count = asn_DEF_INTEGER.elements_count; + td->specifics = asn_DEF_INTEGER.specifics; +} + +void +Release_request_reason_free(asn_TYPE_descriptor_t *td, + void *struct_ptr, int contents_only) { + Release_request_reason_1_inherit_TYPE_descriptor(td); + td->free_struct(td, struct_ptr, contents_only); +} + +int +Release_request_reason_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + Release_request_reason_1_inherit_TYPE_descriptor(td); + return td->print_struct(td, struct_ptr, ilevel, cb, app_key); +} + +asn_dec_rval_t +Release_request_reason_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const void *bufptr, size_t size, int tag_mode) { + Release_request_reason_1_inherit_TYPE_descriptor(td); + return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); +} + +asn_enc_rval_t +Release_request_reason_encode_der(asn_TYPE_descriptor_t *td, + void *structure, int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + Release_request_reason_1_inherit_TYPE_descriptor(td); + return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); +} + +asn_dec_rval_t +Release_request_reason_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const char *opt_mname, const void *bufptr, size_t size) { + Release_request_reason_1_inherit_TYPE_descriptor(td); + return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); +} + +asn_enc_rval_t +Release_request_reason_encode_xer(asn_TYPE_descriptor_t *td, void *structure, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + Release_request_reason_1_inherit_TYPE_descriptor(td); + return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); +} + +static ber_tlv_tag_t asn_DEF_Release_request_reason_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Release_request_reason = { + "Release-request-reason", + "Release-request-reason", + Release_request_reason_free, + Release_request_reason_print, + Release_request_reason_constraint, + Release_request_reason_decode_ber, + Release_request_reason_encode_der, + Release_request_reason_decode_xer, + Release_request_reason_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_Release_request_reason_tags_1, + sizeof(asn_DEF_Release_request_reason_tags_1) + /sizeof(asn_DEF_Release_request_reason_tags_1[0]), /* 1 */ + asn_DEF_Release_request_reason_tags_1, /* Same as above */ + sizeof(asn_DEF_Release_request_reason_tags_1) + /sizeof(asn_DEF_Release_request_reason_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + 0, 0, /* Defined elsewhere */ + 0 /* No specifics */ +}; + diff --git a/src/Release-response-reason.c b/src/Release-response-reason.c new file mode 100644 index 0000000..712fb74 --- /dev/null +++ b/src/Release-response-reason.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) + * From ASN.1 module "DialoguePDUs" + * found in "DialoguePDUs.asn" + */ + +#include + +#include "Release-response-reason.h" + +int +Release_response_reason_constraint(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + /* Replace with underlying type checker */ + td->check_constraints = asn_DEF_INTEGER.check_constraints; + return td->check_constraints(td, sptr, ctfailcb, app_key); +} + +/* + * This type is implemented using INTEGER, + * so here we adjust the DEF accordingly. + */ +static void +Release_response_reason_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { + td->free_struct = asn_DEF_INTEGER.free_struct; + td->print_struct = asn_DEF_INTEGER.print_struct; + td->ber_decoder = asn_DEF_INTEGER.ber_decoder; + td->der_encoder = asn_DEF_INTEGER.der_encoder; + td->xer_decoder = asn_DEF_INTEGER.xer_decoder; + td->xer_encoder = asn_DEF_INTEGER.xer_encoder; + td->uper_decoder = asn_DEF_INTEGER.uper_decoder; + td->uper_encoder = asn_DEF_INTEGER.uper_encoder; + if(!td->per_constraints) + td->per_constraints = asn_DEF_INTEGER.per_constraints; + td->elements = asn_DEF_INTEGER.elements; + td->elements_count = asn_DEF_INTEGER.elements_count; + td->specifics = asn_DEF_INTEGER.specifics; +} + +void +Release_response_reason_free(asn_TYPE_descriptor_t *td, + void *struct_ptr, int contents_only) { + Release_response_reason_1_inherit_TYPE_descriptor(td); + td->free_struct(td, struct_ptr, contents_only); +} + +int +Release_response_reason_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + Release_response_reason_1_inherit_TYPE_descriptor(td); + return td->print_struct(td, struct_ptr, ilevel, cb, app_key); +} + +asn_dec_rval_t +Release_response_reason_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const void *bufptr, size_t size, int tag_mode) { + Release_response_reason_1_inherit_TYPE_descriptor(td); + return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); +} + +asn_enc_rval_t +Release_response_reason_encode_der(asn_TYPE_descriptor_t *td, + void *structure, int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + Release_response_reason_1_inherit_TYPE_descriptor(td); + return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); +} + +asn_dec_rval_t +Release_response_reason_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, + void **structure, const char *opt_mname, const void *bufptr, size_t size) { + Release_response_reason_1_inherit_TYPE_descriptor(td); + return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); +} + +asn_enc_rval_t +Release_response_reason_encode_xer(asn_TYPE_descriptor_t *td, void *structure, + int ilevel, enum xer_encoder_flags_e flags, + asn_app_consume_bytes_f *cb, void *app_key) { + Release_response_reason_1_inherit_TYPE_descriptor(td); + return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); +} + +static ber_tlv_tag_t asn_DEF_Release_response_reason_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Release_response_reason = { + "Release-response-reason", + "Release-response-reason", + Release_response_reason_free, + Release_response_reason_print, + Release_response_reason_constraint, + Release_response_reason_decode_ber, + Release_response_reason_encode_der, + Release_response_reason_decode_xer, + Release_response_reason_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + 0, /* Use generic outmost tag fetcher */ + asn_DEF_Release_response_reason_tags_1, + sizeof(asn_DEF_Release_response_reason_tags_1) + /sizeof(asn_DEF_Release_response_reason_tags_1[0]), /* 1 */ + asn_DEF_Release_response_reason_tags_1, /* Same as above */ + sizeof(asn_DEF_Release_response_reason_tags_1) + /sizeof(asn_DEF_Release_response_reason_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + 0, 0, /* Defined elsewhere */ + 0 /* No specifics */ +}; + diff --git a/src/UniDialoguePDU.c b/src/UniDialoguePDU.c new file mode 100644 index 0000000..e45a1f8 --- /dev/null +++ b/src/UniDialoguePDU.c @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) + * From ASN.1 module "UnidialoguePDUs" + * found in "UnidialoguePDUs.asn" + */ + +#include + +#include "UniDialoguePDU.h" + +static asn_TYPE_member_t asn_MBR_UniDialoguePDU_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct UniDialoguePDU, choice.unidialoguePDU), + (ASN_TAG_CLASS_APPLICATION | (0 << 2)), + 0, + &asn_DEF_AUDT_apdu, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "unidialoguePDU" + }, +}; +static asn_TYPE_tag2member_t asn_MAP_UniDialoguePDU_tag2el_1[] = { + { (ASN_TAG_CLASS_APPLICATION | (0 << 2)), 0, 0, 0 } /* unidialoguePDU at 13 */ +}; +static asn_CHOICE_specifics_t asn_SPC_UniDialoguePDU_specs_1 = { + sizeof(struct UniDialoguePDU), + offsetof(struct UniDialoguePDU, _asn_ctx), + offsetof(struct UniDialoguePDU, present), + sizeof(((struct UniDialoguePDU *)0)->present), + asn_MAP_UniDialoguePDU_tag2el_1, + 1, /* Count of tags in the map */ + 0, + -1 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_UniDialoguePDU = { + "UniDialoguePDU", + "UniDialoguePDU", + CHOICE_free, + CHOICE_print, + CHOICE_constraint, + CHOICE_decode_ber, + CHOICE_encode_der, + CHOICE_decode_xer, + CHOICE_encode_xer, + 0, 0, /* No PER support, use "-gen-PER" to enable */ + CHOICE_outmost_tag, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + 0, /* No PER visible constraints */ + asn_MBR_UniDialoguePDU_1, + 1, /* Elements count */ + &asn_SPC_UniDialoguePDU_specs_1 /* Additional specs */ +}; + -- cgit v1.2.3