forked from acouzens/open5gs
Compare commits
17 Commits
3886891833
...
9a515e9b1d
Author | SHA1 | Date |
---|---|---|
Sukchan Lee | 9a515e9b1d | |
Sukchan Lee | 41d8934677 | |
Sukchan Lee | 843c4950ac | |
Sukchan Lee | 94bd68aa7b | |
Sukchan Lee | 290df460ef | |
Sukchan Lee | 82398811db | |
Sukchan Lee | 8762425fbc | |
Sukchan Lee | 7e8f145973 | |
Sukchan Lee | d1d3ec6fcb | |
Sukchan Lee | be12610fb6 | |
Sukchan Lee | 47419be650 | |
Sukchan Lee | 3f0979dab2 | |
Sukchan Lee | 93110d011e | |
Pau Espin | 88a77f7bc5 | |
Pau Espin | a613be8c4c | |
Pau Espin | d95c82b21c | |
Pau Espin | a5feccf4c8 |
|
@ -0,0 +1 @@
|
||||||
|
latest
|
|
@ -0,0 +1 @@
|
||||||
|
../debian
|
|
@ -0,0 +1 @@
|
||||||
|
../ubuntu
|
|
@ -0,0 +1 @@
|
||||||
|
latest
|
|
@ -0,0 +1 @@
|
||||||
|
latest
|
|
@ -10,6 +10,62 @@ head_inline: "<style> .blue { color: blue; } </style>"
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
#### How to run wireshark from within Docker?
|
||||||
|
|
||||||
|
In the following, I will explain how to run wireshark on Ubuntu 32bit.
|
||||||
|
|
||||||
|
First, make the following modifications to get wireshark working.
|
||||||
|
|
||||||
|
```diff
|
||||||
|
$ diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
|
||||||
|
index 01925303b..8d5e23a4f 100644
|
||||||
|
--- a/docker/docker-compose.yml
|
||||||
|
+++ b/docker/docker-compose.yml
|
||||||
|
@@ -105,7 +105,7 @@ services:
|
||||||
|
volumes:
|
||||||
|
- home:/home/${USER}
|
||||||
|
- ${HOME}:/mnt
|
||||||
|
- # - /tmp/.X11-unix:/tmp/.X11-unix
|
||||||
|
+ - /tmp/.X11-unix:/tmp/.X11-unix
|
||||||
|
# - /etc/localtime:/etc/localtime:ro
|
||||||
|
# - /usr/share/zoneinfo/Europe/Helsinki:/etc/localtime:ro
|
||||||
|
hostname: open5gs-dev
|
||||||
|
|
||||||
|
$ diff --git a/docker/ubuntu/latest/dev/Dockerfile b/docker/ubuntu/latest/dev/Dockerfile
|
||||||
|
index 970dddb72..6902fc59c 100644
|
||||||
|
--- a/docker/ubuntu/latest/dev/Dockerfile
|
||||||
|
+++ b/docker/ubuntu/latest/dev/Dockerfile
|
||||||
|
@@ -23,12 +23,12 @@ RUN apt-get update && \
|
||||||
|
net-tools && \
|
||||||
|
apt-get clean
|
||||||
|
|
||||||
|
-#RUN apt-get update && \
|
||||||
|
-# apt-get install -y software-properties-common && \
|
||||||
|
-# sudo add-apt-repository ppa:wireshark-dev/stable -y && \
|
||||||
|
-# apt-get update && \
|
||||||
|
-# DEBIAN_FRONTEND=noninteractive \
|
||||||
|
-# apt-get install -y wireshark
|
||||||
|
+RUN apt-get update && \
|
||||||
|
+ apt-get install -y software-properties-common && \
|
||||||
|
+ sudo add-apt-repository ppa:wireshark-dev/stable -y && \
|
||||||
|
+ apt-get update && \
|
||||||
|
+ DEBIAN_FRONTEND=noninteractive \
|
||||||
|
+ apt-get install -y wireshark
|
||||||
|
|
||||||
|
COPY setup.sh /root
|
||||||
|
```
|
||||||
|
|
||||||
|
It allows any program run by the docker user to communicate with X windows.
|
||||||
|
```
|
||||||
|
$ xhost +local:docker
|
||||||
|
```
|
||||||
|
|
||||||
|
And run 32bit ubuntu like below.
|
||||||
|
```
|
||||||
|
$ cd docker
|
||||||
|
$ DIST=i386/ubuntu docker compose run dev
|
||||||
|
```
|
||||||
|
|
||||||
#### What to do if a FATAL occurs?
|
#### What to do if a FATAL occurs?
|
||||||
|
|
||||||
You may occasionally encounter a FATAL like the one below.
|
You may occasionally encounter a FATAL like the one below.
|
||||||
|
|
|
@ -18,9 +18,9 @@ head_inline: "<style> ul { padding-bottom: 1em; } </style>"
|
||||||
- [Dockerized VoLTE Setup](tutorial/03-VoLTE-dockerized)
|
- [Dockerized VoLTE Setup](tutorial/03-VoLTE-dockerized)
|
||||||
- [Roaming](tutorial/05-roaming)
|
- [Roaming](tutorial/05-roaming)
|
||||||
|
|
||||||
- Inside Source Code
|
- In the lab
|
||||||
- [UPF Code Explanation](https://medium.com/@aditya.koranga/open5gs-upf-code-explanation-with-flow-c-79c50f253dd1)
|
- [A Demonstration of 30 Gbps Load Testing for Accelerated UPF with Open5gs](https://nextepc.com/technology)
|
||||||
- [SMF Code Explanation](https://medium.com/@aditya.koranga/open5gs-smf-code-explanation-with-flow-charts-a3b3cd38c991)
|
- [Measurement of UPF Performance](https://github.com/s5uishida/simple_measurement_of_upf_performance)
|
||||||
|
|
||||||
- Troubleshooting
|
- Troubleshooting
|
||||||
- [Simple Issues](troubleshoot/01-simple-issues)
|
- [Simple Issues](troubleshoot/01-simple-issues)
|
||||||
|
@ -38,6 +38,10 @@ head_inline: "<style> ul { padding-bottom: 1em; } </style>"
|
||||||
- Hardware Specific Notes
|
- Hardware Specific Notes
|
||||||
- [eNodeBs/gNodeBs tested on Open5GS](hardware/01-genodebs)
|
- [eNodeBs/gNodeBs tested on Open5GS](hardware/01-genodebs)
|
||||||
|
|
||||||
|
- Inside Source Code
|
||||||
|
- [UPF Code Explanation](https://medium.com/@aditya.koranga/open5gs-upf-code-explanation-with-flow-c-79c50f253dd1)
|
||||||
|
- [SMF Code Explanation](https://medium.com/@aditya.koranga/open5gs-smf-code-explanation-with-flow-charts-a3b3cd38c991)
|
||||||
|
|
||||||
- @infinitydon
|
- @infinitydon
|
||||||
- [Open5GS on Amazon Elastic Kubernetes Service](https://aws.amazon.com/blogs/opensource/open-source-mobile-core-network-implementation-on-amazon-elastic-kubernetes-service/)
|
- [Open5GS on Amazon Elastic Kubernetes Service](https://aws.amazon.com/blogs/opensource/open-source-mobile-core-network-implementation-on-amazon-elastic-kubernetes-service/)
|
||||||
- [Kubernetes Open5GS Deployment](https://dev.to/infinitydon/virtual-4g-simulation-using-kubernetes-and-gns3-3b7k?fbclid=IwAR1p99h13a-mCfejanbBQe0H0-jp5grXkn5mWf1WrTHf47UtegB2-UHGGZQ)
|
- [Kubernetes Open5GS Deployment](https://dev.to/infinitydon/virtual-4g-simulation-using-kubernetes-and-gns3-3b7k?fbclid=IwAR1p99h13a-mCfejanbBQe0H0-jp5grXkn5mWf1WrTHf47UtegB2-UHGGZQ)
|
||||||
|
@ -69,7 +73,6 @@ head_inline: "<style> ul { padding-bottom: 1em; } </style>"
|
||||||
- [VPP-UPF with DPDK](https://github.com/s5uishida/open5gs_5gc_ueransim_vpp_upf_dpdk_sample_config)
|
- [VPP-UPF with DPDK](https://github.com/s5uishida/open5gs_5gc_ueransim_vpp_upf_dpdk_sample_config)
|
||||||
- [UERANSIM with eUPF(eBPF/XDP UPF)](https://github.com/s5uishida/open5gs_5gc_ueransim_eupf_sample_config)
|
- [UERANSIM with eUPF(eBPF/XDP UPF)](https://github.com/s5uishida/open5gs_5gc_ueransim_eupf_sample_config)
|
||||||
- [srsRAN with eUPF(eBPF/XDP UPF)](https://github.com/s5uishida/open5gs_epc_srsran_eupf_sample_config)
|
- [srsRAN with eUPF(eBPF/XDP UPF)](https://github.com/s5uishida/open5gs_epc_srsran_eupf_sample_config)
|
||||||
- [Measurement of UPF Performance](https://github.com/s5uishida/simple_measurement_of_upf_performance)
|
|
||||||
|
|
||||||
- @gradiant helm charts
|
- @gradiant helm charts
|
||||||
- [Open5GS EPC and SRS LTE in kubernetes](https://gradiant.github.io/openverso-charts/open5gs-srslte.html)
|
- [Open5GS EPC and SRS LTE in kubernetes](https://gradiant.github.io/openverso-charts/open5gs-srslte.html)
|
||||||
|
|
|
@ -18,6 +18,7 @@ asn_TYPE_operation_t asn_OP_ANY = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
OCTET_STRING_compare,
|
OCTET_STRING_compare,
|
||||||
|
OCTET_STRING_copy,
|
||||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||||
OCTET_STRING_decode_ber,
|
OCTET_STRING_decode_ber,
|
||||||
OCTET_STRING_encode_der,
|
OCTET_STRING_encode_der,
|
||||||
|
@ -33,9 +34,11 @@ asn_TYPE_operation_t asn_OP_ANY = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
OCTET_STRING_decode_jer_hex,
|
||||||
ANY_encode_jer,
|
ANY_encode_jer,
|
||||||
#else
|
#else
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||||
0,
|
0,
|
||||||
|
|
|
@ -29,6 +29,7 @@ extern asn_OCTET_STRING_specifics_t asn_SPC_ANY_specs;
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
|
|
||||||
#define ANY_compare OCTET_STRING_compare
|
#define ANY_compare OCTET_STRING_compare
|
||||||
|
#define ANY_copy OCTET_STRING_copy
|
||||||
|
|
||||||
#define ANY_constraint asn_generic_no_constraint
|
#define ANY_constraint asn_generic_no_constraint
|
||||||
|
|
||||||
|
@ -43,6 +44,7 @@ xer_type_encoder_f ANY_encode_xer;
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
|
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
jer_type_decoder_f ANY_decode_jer;
|
||||||
jer_type_encoder_f ANY_encode_jer;
|
jer_type_encoder_f ANY_encode_jer;
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ asn_TYPE_operation_t asn_OP_BIT_STRING = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
BIT_STRING_compare,
|
BIT_STRING_compare,
|
||||||
|
BIT_STRING_copy,
|
||||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||||
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
|
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
|
||||||
OCTET_STRING_encode_der, /* Implemented in terms of OCTET STRING */
|
OCTET_STRING_encode_der, /* Implemented in terms of OCTET STRING */
|
||||||
|
@ -39,9 +40,11 @@ asn_TYPE_operation_t asn_OP_BIT_STRING = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
OCTET_STRING_decode_jer_hex,
|
||||||
BIT_STRING_encode_jer,
|
BIT_STRING_encode_jer,
|
||||||
#else
|
#else
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||||
BIT_STRING_decode_oer,
|
BIT_STRING_decode_oer,
|
||||||
|
@ -211,3 +214,37 @@ BIT_STRING_compare(const asn_TYPE_descriptor_t *td, const void *aptr,
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
BIT_STRING_copy(const asn_TYPE_descriptor_t *td, void **aptr,
|
||||||
|
const void *bptr) {
|
||||||
|
const asn_OCTET_STRING_specifics_t *specs = td->specifics;
|
||||||
|
BIT_STRING_t *a = (BIT_STRING_t *)*aptr;
|
||||||
|
const BIT_STRING_t *b = (const BIT_STRING_t *)bptr;
|
||||||
|
|
||||||
|
if(!b) {
|
||||||
|
if(a) {
|
||||||
|
FREEMEM(a->buf);
|
||||||
|
FREEMEM(a);
|
||||||
|
*aptr = 0;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!a) {
|
||||||
|
a = *aptr = CALLOC(1, specs->struct_size);
|
||||||
|
if(!a) return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t* buf = MALLOC(b->size + 1);
|
||||||
|
if(!buf) return -1;
|
||||||
|
memcpy(buf, b->buf, b->size);
|
||||||
|
buf[b->size] = 0;
|
||||||
|
|
||||||
|
FREEMEM(a->buf);
|
||||||
|
a->buf = buf;
|
||||||
|
a->size = b->size;
|
||||||
|
a->bits_unused = b->bits_unused;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@ asn_struct_print_f BIT_STRING_print; /* Human-readable output */
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
|
|
||||||
asn_struct_compare_f BIT_STRING_compare;
|
asn_struct_compare_f BIT_STRING_compare;
|
||||||
|
asn_struct_copy_f BIT_STRING_copy;
|
||||||
|
|
||||||
asn_constr_check_f BIT_STRING_constraint;
|
asn_constr_check_f BIT_STRING_constraint;
|
||||||
|
|
||||||
|
@ -45,6 +46,7 @@ xer_type_encoder_f BIT_STRING_encode_xer;
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
|
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
#define BIT_STRING_decode_jer OCTET_STRING_decode_jer_binary
|
||||||
jer_type_encoder_f BIT_STRING_encode_jer;
|
jer_type_encoder_f BIT_STRING_encode_jer;
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,92 @@
|
||||||
|
/*-
|
||||||
|
* Copyright (c) 2003, 2005, 2006 Lev Walkin <vlm@lionet.info>.
|
||||||
|
* All rights reserved.
|
||||||
|
* Redistribution and modifications are permitted subject to BSD license.
|
||||||
|
*/
|
||||||
|
#include <asn_internal.h>
|
||||||
|
#include <ENUMERATED.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ENUMERATED basic type description.
|
||||||
|
*/
|
||||||
|
static const ber_tlv_tag_t asn_DEF_ENUMERATED_tags[] = {
|
||||||
|
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
|
||||||
|
};
|
||||||
|
asn_TYPE_operation_t asn_OP_ENUMERATED = {
|
||||||
|
ASN__PRIMITIVE_TYPE_free,
|
||||||
|
#if !defined(ASN_DISABLE_PRINT_SUPPORT)
|
||||||
|
INTEGER_print, /* Implemented in terms of INTEGER */
|
||||||
|
#else
|
||||||
|
0,
|
||||||
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
|
INTEGER_compare, /* Implemented in terms of INTEGER */
|
||||||
|
INTEGER_copy, /* Implemented in terms of INTEGER */
|
||||||
|
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||||
|
ber_decode_primitive,
|
||||||
|
INTEGER_encode_der, /* Implemented in terms of INTEGER */
|
||||||
|
#else
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */
|
||||||
|
#if !defined(ASN_DISABLE_XER_SUPPORT)
|
||||||
|
INTEGER_decode_xer, /* This is temporary! */
|
||||||
|
INTEGER_encode_xer,
|
||||||
|
#else
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
ENUMERATED_decode_jer,
|
||||||
|
INTEGER_encode_jer,
|
||||||
|
#else
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
|
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||||
|
ENUMERATED_decode_oer,
|
||||||
|
ENUMERATED_encode_oer,
|
||||||
|
#else
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
|
||||||
|
#if !defined(ASN_DISABLE_UPER_SUPPORT)
|
||||||
|
ENUMERATED_decode_uper, /* Unaligned PER decoder */
|
||||||
|
ENUMERATED_encode_uper, /* Unaligned PER encoder */
|
||||||
|
#else
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */
|
||||||
|
#if !defined(ASN_DISABLE_APER_SUPPORT)
|
||||||
|
ENUMERATED_decode_aper, /* Aligned PER decoder */
|
||||||
|
ENUMERATED_encode_aper, /* Aligned PER encoder */
|
||||||
|
#else
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */
|
||||||
|
#if !defined(ASN_DISABLE_RFILL_SUPPORT)
|
||||||
|
ENUMERATED_random_fill,
|
||||||
|
#else
|
||||||
|
0,
|
||||||
|
#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */
|
||||||
|
0 /* Use generic outmost tag fetcher */
|
||||||
|
};
|
||||||
|
asn_TYPE_descriptor_t asn_DEF_ENUMERATED = {
|
||||||
|
"ENUMERATED",
|
||||||
|
"ENUMERATED",
|
||||||
|
&asn_OP_ENUMERATED,
|
||||||
|
asn_DEF_ENUMERATED_tags,
|
||||||
|
sizeof(asn_DEF_ENUMERATED_tags) / sizeof(asn_DEF_ENUMERATED_tags[0]),
|
||||||
|
asn_DEF_ENUMERATED_tags, /* Same as above */
|
||||||
|
sizeof(asn_DEF_ENUMERATED_tags) / sizeof(asn_DEF_ENUMERATED_tags[0]),
|
||||||
|
{
|
||||||
|
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||||
|
0,
|
||||||
|
#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
|
||||||
|
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
|
||||||
|
0,
|
||||||
|
#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
|
||||||
|
asn_generic_no_constraint
|
||||||
|
},
|
||||||
|
0, 0, /* No members */
|
||||||
|
0 /* No specifics */
|
||||||
|
};
|
|
@ -0,0 +1,67 @@
|
||||||
|
/*-
|
||||||
|
* Copyright (c) 2003-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
|
||||||
|
* Redistribution and modifications are permitted subject to BSD license.
|
||||||
|
*/
|
||||||
|
#ifndef _ENUMERATED_H_
|
||||||
|
#define _ENUMERATED_H_
|
||||||
|
|
||||||
|
#include <INTEGER.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef INTEGER_t ENUMERATED_t; /* Implemented via INTEGER */
|
||||||
|
|
||||||
|
extern asn_TYPE_descriptor_t asn_DEF_ENUMERATED;
|
||||||
|
extern asn_TYPE_operation_t asn_OP_ENUMERATED;
|
||||||
|
|
||||||
|
#define ENUMERATED_free ASN__PRIMITIVE_TYPE_free
|
||||||
|
|
||||||
|
#if !defined(ASN_DISABLE_PRINT_SUPPORT)
|
||||||
|
#define ENUMERATED_print INTEGER_print
|
||||||
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
|
|
||||||
|
#define ENUMERATED_compare INTEGER_compare
|
||||||
|
#define ENUMERATED_copy INTEGER_copy
|
||||||
|
|
||||||
|
#define ENUMERATED_constraint asn_generic_no_constraint
|
||||||
|
|
||||||
|
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||||
|
#define ENUMERATED_decode_ber ber_decode_primitive
|
||||||
|
#define ENUMERATED_encode_der INTEGER_encode_der
|
||||||
|
#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */
|
||||||
|
|
||||||
|
#if !defined(ASN_DISABLE_XER_SUPPORT)
|
||||||
|
#define ENUMERATED_decode_xer INTEGER_decode_xer
|
||||||
|
#define ENUMERATED_encode_xer INTEGER_encode_xer
|
||||||
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
|
|
||||||
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
jer_type_decoder_f ENUMERATED_decode_jer;
|
||||||
|
#define ENUMERATED_encode_jer INTEGER_encode_jer
|
||||||
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
|
|
||||||
|
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||||
|
oer_type_decoder_f ENUMERATED_decode_oer;
|
||||||
|
oer_type_encoder_f ENUMERATED_encode_oer;
|
||||||
|
#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
|
||||||
|
|
||||||
|
#if !defined(ASN_DISABLE_UPER_SUPPORT)
|
||||||
|
per_type_decoder_f ENUMERATED_decode_uper;
|
||||||
|
per_type_encoder_f ENUMERATED_encode_uper;
|
||||||
|
#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */
|
||||||
|
#if !defined(ASN_DISABLE_APER_SUPPORT)
|
||||||
|
per_type_decoder_f ENUMERATED_decode_aper;
|
||||||
|
per_type_encoder_f ENUMERATED_encode_aper;
|
||||||
|
#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */
|
||||||
|
|
||||||
|
#if !defined(ASN_DISABLE_RFILL_SUPPORT)
|
||||||
|
#define ENUMERATED_random_fill INTEGER_random_fill
|
||||||
|
#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* _ENUMERATED_H_ */
|
|
@ -0,0 +1,43 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2017 Lev Walkin <vlm@lionet.info>.
|
||||||
|
* All rights reserved.
|
||||||
|
* Redistribution and modifications are permitted subject to BSD license.
|
||||||
|
*/
|
||||||
|
#include <asn_internal.h>
|
||||||
|
#include <ENUMERATED.h>
|
||||||
|
#include <NativeEnumerated.h>
|
||||||
|
|
||||||
|
asn_dec_rval_t
|
||||||
|
ENUMERATED_decode_aper(const asn_codec_ctx_t *opt_codec_ctx,
|
||||||
|
const asn_TYPE_descriptor_t *td,
|
||||||
|
const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) {
|
||||||
|
asn_dec_rval_t rval;
|
||||||
|
ENUMERATED_t *st = (ENUMERATED_t *)*sptr;
|
||||||
|
long value;
|
||||||
|
void *vptr = &value;
|
||||||
|
|
||||||
|
if(!st) {
|
||||||
|
st = (ENUMERATED_t *)(*sptr = CALLOC(1, sizeof(*st)));
|
||||||
|
if(!st) ASN__DECODE_FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
|
rval = NativeEnumerated_decode_aper(opt_codec_ctx, td, constraints,
|
||||||
|
(void **)&vptr, pd);
|
||||||
|
if(rval.code == RC_OK)
|
||||||
|
if(asn_long2INTEGER(st, value))
|
||||||
|
rval.code = RC_FAIL;
|
||||||
|
return rval;
|
||||||
|
}
|
||||||
|
|
||||||
|
asn_enc_rval_t
|
||||||
|
ENUMERATED_encode_aper(const asn_TYPE_descriptor_t *td,
|
||||||
|
const asn_per_constraints_t *constraints,
|
||||||
|
const void *sptr, asn_per_outp_t *po) {
|
||||||
|
const ENUMERATED_t *st = (const ENUMERATED_t *)sptr;
|
||||||
|
long value;
|
||||||
|
|
||||||
|
if(asn_INTEGER2long(st, &value))
|
||||||
|
ASN__ENCODE_FAILED;
|
||||||
|
|
||||||
|
return NativeEnumerated_encode_aper(td, constraints, &value, po);
|
||||||
|
}
|
|
@ -20,6 +20,7 @@ asn_TYPE_operation_t asn_OP_GraphicString = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
OCTET_STRING_compare,
|
OCTET_STRING_compare,
|
||||||
|
OCTET_STRING_copy,
|
||||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||||
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
|
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
|
||||||
OCTET_STRING_encode_der,
|
OCTET_STRING_encode_der,
|
||||||
|
@ -35,9 +36,11 @@ asn_TYPE_operation_t asn_OP_GraphicString = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
OCTET_STRING_decode_jer_hex,
|
||||||
OCTET_STRING_encode_jer, /* Can't expect it to be ASCII/UTF8 */
|
OCTET_STRING_encode_jer, /* Can't expect it to be ASCII/UTF8 */
|
||||||
#else
|
#else
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||||
OCTET_STRING_decode_oer,
|
OCTET_STRING_decode_oer,
|
||||||
|
|
|
@ -23,6 +23,7 @@ extern asn_TYPE_operation_t asn_OP_GraphicString;
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
|
|
||||||
#define GraphicString_compare OCTET_STRING_compare
|
#define GraphicString_compare OCTET_STRING_compare
|
||||||
|
#define GraphicString_copy OCTET_STRING_copy
|
||||||
|
|
||||||
#define GraphicString_constraint asn_generic_unknown_constraint
|
#define GraphicString_constraint asn_generic_unknown_constraint
|
||||||
|
|
||||||
|
@ -37,6 +38,7 @@ extern asn_TYPE_operation_t asn_OP_GraphicString;
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
|
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
#define GraphicString_decode_jer OCTET_STRING_decode_jer
|
||||||
#define GraphicString_encode_jer OCTET_STRING_encode_jer
|
#define GraphicString_encode_jer OCTET_STRING_encode_jer
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ asn_TYPE_operation_t asn_OP_INTEGER = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
INTEGER_compare,
|
INTEGER_compare,
|
||||||
|
INTEGER_copy,
|
||||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||||
ber_decode_primitive,
|
ber_decode_primitive,
|
||||||
INTEGER_encode_der,
|
INTEGER_encode_der,
|
||||||
|
@ -37,9 +38,11 @@ asn_TYPE_operation_t asn_OP_INTEGER = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
INTEGER_decode_jer,
|
||||||
INTEGER_encode_jer,
|
INTEGER_encode_jer,
|
||||||
#else
|
#else
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||||
INTEGER_decode_oer, /* OER decoder */
|
INTEGER_decode_oer, /* OER decoder */
|
||||||
|
@ -411,6 +414,33 @@ asn_ulong2INTEGER(INTEGER_t *st, unsigned long value) {
|
||||||
return asn_imax2INTEGER(st, value);
|
return asn_imax2INTEGER(st, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int asn_INTEGER2int64(const INTEGER_t *st, int64_t *value) {
|
||||||
|
intmax_t v;
|
||||||
|
if(asn_INTEGER2imax(st, &v) == 0) {
|
||||||
|
if(v < INT64_MIN || v > INT64_MAX) {
|
||||||
|
errno = ERANGE;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
*value = v;
|
||||||
|
return 0;
|
||||||
|
} else {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int asn_INTEGER2uint64(const INTEGER_t *st, uint64_t *value) {
|
||||||
|
uintmax_t v;
|
||||||
|
if(asn_INTEGER2umax(st, &v) == 0) {
|
||||||
|
if(v > UINT64_MAX) {
|
||||||
|
errno = ERANGE;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
*value = v;
|
||||||
|
return 0;
|
||||||
|
} else {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
asn_uint642INTEGER(INTEGER_t *st, uint64_t value) {
|
asn_uint642INTEGER(INTEGER_t *st, uint64_t value) {
|
||||||
|
@ -736,3 +766,40 @@ INTEGER_compare(const asn_TYPE_descriptor_t *td, const void *aptr,
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
INTEGER_copy(const asn_TYPE_descriptor_t *td, void **aptr,
|
||||||
|
const void *bptr) {
|
||||||
|
(void)td;
|
||||||
|
INTEGER_t *a = *aptr;
|
||||||
|
const INTEGER_t *b = bptr;
|
||||||
|
|
||||||
|
if(!b) {
|
||||||
|
if(a) {
|
||||||
|
FREEMEM(a->buf);
|
||||||
|
FREEMEM(a);
|
||||||
|
*aptr = 0;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!a) {
|
||||||
|
a = *aptr = CALLOC(1, sizeof(*a));
|
||||||
|
if(!a) return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(b->size) {
|
||||||
|
uint8_t* buf = MALLOC(b->size);
|
||||||
|
if(!buf) return -1;
|
||||||
|
memcpy(buf, b->buf, b->size);
|
||||||
|
FREEMEM(a->buf);
|
||||||
|
a->buf = buf;
|
||||||
|
a->size = b->size;
|
||||||
|
} else {
|
||||||
|
FREEMEM(a->buf);
|
||||||
|
a->buf = 0;
|
||||||
|
a->size = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
|
@ -47,6 +47,7 @@ asn_struct_print_f INTEGER_print;
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
|
|
||||||
asn_struct_compare_f INTEGER_compare;
|
asn_struct_compare_f INTEGER_compare;
|
||||||
|
asn_struct_copy_f INTEGER_copy;
|
||||||
|
|
||||||
#define INTEGER_constraint asn_generic_no_constraint
|
#define INTEGER_constraint asn_generic_no_constraint
|
||||||
|
|
||||||
|
@ -61,6 +62,7 @@ xer_type_encoder_f INTEGER_encode_xer;
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
|
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
jer_type_decoder_f INTEGER_decode_jer;
|
||||||
jer_type_encoder_f INTEGER_encode_jer;
|
jer_type_encoder_f INTEGER_encode_jer;
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
|
|
||||||
|
@ -106,6 +108,8 @@ int asn_INTEGER2long(const INTEGER_t *i, long *l);
|
||||||
int asn_INTEGER2ulong(const INTEGER_t *i, unsigned long *l);
|
int asn_INTEGER2ulong(const INTEGER_t *i, unsigned long *l);
|
||||||
int asn_long2INTEGER(INTEGER_t *i, long l);
|
int asn_long2INTEGER(INTEGER_t *i, long l);
|
||||||
int asn_ulong2INTEGER(INTEGER_t *i, unsigned long l);
|
int asn_ulong2INTEGER(INTEGER_t *i, unsigned long l);
|
||||||
|
int asn_INTEGER2int64(const INTEGER_t *i, int64_t *l);
|
||||||
|
int asn_INTEGER2uint64(const INTEGER_t *i, uint64_t *l);
|
||||||
int asn_int642INTEGER(INTEGER_t *i, int64_t l);
|
int asn_int642INTEGER(INTEGER_t *i, int64_t l);
|
||||||
int asn_uint642INTEGER(INTEGER_t *i, uint64_t l);
|
int asn_uint642INTEGER(INTEGER_t *i, uint64_t l);
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ INTEGER_decode_aper(const asn_codec_ctx_t *opt_codec_ctx,
|
||||||
int max_range_bytes = (ct->range_bits >> 3) +
|
int max_range_bytes = (ct->range_bits >> 3) +
|
||||||
(((ct->range_bits % 8) > 0) ? 1 : 0);
|
(((ct->range_bits % 8) > 0) ? 1 : 0);
|
||||||
int length = 0, i;
|
int length = 0, i;
|
||||||
long value = 0;
|
intmax_t value = 0;
|
||||||
|
|
||||||
for (i = 1; ; i++) {
|
for (i = 1; ; i++) {
|
||||||
int upper = 1 << i;
|
int upper = 1 << i;
|
||||||
|
@ -79,18 +79,18 @@ INTEGER_decode_aper(const asn_codec_ctx_t *opt_codec_ctx,
|
||||||
int buf = per_get_few_bits(pd, 8);
|
int buf = per_get_few_bits(pd, 8);
|
||||||
if (buf < 0)
|
if (buf < 0)
|
||||||
ASN__DECODE_FAILED;
|
ASN__DECODE_FAILED;
|
||||||
value += (((long)buf) << (8 * length));
|
value += (((intmax_t)buf) << (8 * length));
|
||||||
}
|
}
|
||||||
|
|
||||||
value += ct->lower_bound;
|
value += ct->lower_bound;
|
||||||
if((specs && specs->field_unsigned)
|
if((specs && specs->field_unsigned)
|
||||||
? asn_uint642INTEGER(st, (unsigned long)value)
|
? asn_umax2INTEGER(st, (uintmax_t)value)
|
||||||
: asn_int642INTEGER(st, value))
|
: asn_imax2INTEGER(st, value))
|
||||||
ASN__DECODE_FAILED;
|
ASN__DECODE_FAILED;
|
||||||
ASN_DEBUG("Got value %ld + low %lld",
|
ASN_DEBUG("Got value %ld + low %lld",
|
||||||
value, (long long int)ct->lower_bound);
|
value, (intmax_t)ct->lower_bound);
|
||||||
} else {
|
} else {
|
||||||
long value = 0;
|
intmax_t value = 0;
|
||||||
if (ct->range_bits < 8) {
|
if (ct->range_bits < 8) {
|
||||||
value = per_get_few_bits(pd, ct->range_bits);
|
value = per_get_few_bits(pd, ct->range_bits);
|
||||||
if(value < 0) ASN__DECODE_STARVED;
|
if(value < 0) ASN__DECODE_STARVED;
|
||||||
|
@ -108,11 +108,11 @@ INTEGER_decode_aper(const asn_codec_ctx_t *opt_codec_ctx,
|
||||||
}
|
}
|
||||||
value += ct->lower_bound;
|
value += ct->lower_bound;
|
||||||
if((specs && specs->field_unsigned)
|
if((specs && specs->field_unsigned)
|
||||||
? asn_ulong2INTEGER(st, value)
|
? asn_umax2INTEGER(st, (uintmax_t)value)
|
||||||
: asn_long2INTEGER(st, value))
|
: asn_imax2INTEGER(st, value))
|
||||||
ASN__DECODE_FAILED;
|
ASN__DECODE_FAILED;
|
||||||
ASN_DEBUG("Got value %ld + low %lld",
|
ASN_DEBUG("Got value %ld + low %lld",
|
||||||
value, (long long int)ct->lower_bound);
|
value, (intmax_t)ct->lower_bound);
|
||||||
}
|
}
|
||||||
return rval;
|
return rval;
|
||||||
} else {
|
} else {
|
||||||
|
@ -167,7 +167,7 @@ INTEGER_encode_aper(const asn_TYPE_descriptor_t *td,
|
||||||
const uint8_t *buf;
|
const uint8_t *buf;
|
||||||
const uint8_t *end;
|
const uint8_t *end;
|
||||||
const asn_per_constraint_t *ct;
|
const asn_per_constraint_t *ct;
|
||||||
long value = 0;
|
intmax_t value = 0;
|
||||||
|
|
||||||
if(!st || st->size == 0) ASN__ENCODE_FAILED;
|
if(!st || st->size == 0) ASN__ENCODE_FAILED;
|
||||||
|
|
||||||
|
@ -179,26 +179,26 @@ INTEGER_encode_aper(const asn_TYPE_descriptor_t *td,
|
||||||
if(ct) {
|
if(ct) {
|
||||||
int inext = 0;
|
int inext = 0;
|
||||||
if(specs && specs->field_unsigned) {
|
if(specs && specs->field_unsigned) {
|
||||||
unsigned long uval;
|
uintmax_t uval;
|
||||||
if(asn_INTEGER2ulong(st, &uval))
|
if(asn_INTEGER2umax(st, &uval))
|
||||||
ASN__ENCODE_FAILED;
|
ASN__ENCODE_FAILED;
|
||||||
/* Check proper range */
|
/* Check proper range */
|
||||||
if(ct->flags & APC_SEMI_CONSTRAINED) {
|
if(ct->flags & APC_SEMI_CONSTRAINED) {
|
||||||
if(uval < (unsigned long)ct->lower_bound)
|
if(uval < (uintmax_t)ct->lower_bound)
|
||||||
inext = 1;
|
inext = 1;
|
||||||
} else if(ct->range_bits >= 0) {
|
} else if(ct->range_bits >= 0) {
|
||||||
if(uval < (unsigned long)ct->lower_bound
|
if(uval < (uintmax_t)ct->lower_bound
|
||||||
|| uval > (unsigned long)ct->upper_bound)
|
|| uval > (uintmax_t)ct->upper_bound)
|
||||||
inext = 1;
|
inext = 1;
|
||||||
}
|
}
|
||||||
ASN_DEBUG("Value %lu (%02x/%zu) lb %lld ub %lld %s",
|
ASN_DEBUG("Value %lu (%02x/%zu) lb %lld ub %lld %s",
|
||||||
uval, st->buf[0], st->size,
|
uval, st->buf[0], st->size,
|
||||||
(long long int)ct->lower_bound,
|
(intmax_t)ct->lower_bound,
|
||||||
(long long int)ct->upper_bound,
|
(intmax_t)ct->upper_bound,
|
||||||
inext ? "ext" : "fix");
|
inext ? "ext" : "fix");
|
||||||
value = uval;
|
value = uval;
|
||||||
} else {
|
} else {
|
||||||
if(asn_INTEGER2long(st, &value)) ASN__ENCODE_FAILED;
|
if(asn_INTEGER2imax(st, &value)) ASN__ENCODE_FAILED;
|
||||||
/* Check proper range */
|
/* Check proper range */
|
||||||
if(ct->flags & APC_SEMI_CONSTRAINED) {
|
if(ct->flags & APC_SEMI_CONSTRAINED) {
|
||||||
if(value < ct->lower_bound)
|
if(value < ct->lower_bound)
|
||||||
|
@ -210,8 +210,8 @@ INTEGER_encode_aper(const asn_TYPE_descriptor_t *td,
|
||||||
}
|
}
|
||||||
ASN_DEBUG("Value %lu (%02x/%zu) lb %lld ub %lld %s",
|
ASN_DEBUG("Value %lu (%02x/%zu) lb %lld ub %lld %s",
|
||||||
value, st->buf[0], st->size,
|
value, st->buf[0], st->size,
|
||||||
(long long int)ct->lower_bound,
|
(intmax_t)ct->lower_bound,
|
||||||
(long long int)ct->upper_bound,
|
(intmax_t)ct->upper_bound,
|
||||||
inext ? "ext" : "fix");
|
inext ? "ext" : "fix");
|
||||||
}
|
}
|
||||||
if(ct->flags & APC_EXTENSIBLE) {
|
if(ct->flags & APC_EXTENSIBLE) {
|
||||||
|
@ -225,11 +225,11 @@ INTEGER_encode_aper(const asn_TYPE_descriptor_t *td,
|
||||||
|
|
||||||
/* X.691, #12.2.2 */
|
/* X.691, #12.2.2 */
|
||||||
if(ct && ct->range_bits >= 0) {
|
if(ct && ct->range_bits >= 0) {
|
||||||
unsigned long v;
|
uintmax_t v;
|
||||||
|
|
||||||
/* #10.5.6 */
|
/* #10.5.6 */
|
||||||
ASN_DEBUG("Encoding integer %ld (%lld) with range %d bits",
|
ASN_DEBUG("Encoding integer %ld (%lld) with range %d bits",
|
||||||
value, (long long int)(value - ct->lower_bound),
|
value, (intmax_t)(value - ct->lower_bound),
|
||||||
ct->range_bits);
|
ct->range_bits);
|
||||||
|
|
||||||
v = value - ct->lower_bound;
|
v = value - ct->lower_bound;
|
||||||
|
@ -287,7 +287,7 @@ INTEGER_encode_aper(const asn_TYPE_descriptor_t *td,
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ct && ct->lower_bound) {
|
if(ct && ct->lower_bound) {
|
||||||
ASN_DEBUG("Adjust lower bound to %lld", (long long int)ct->lower_bound);
|
ASN_DEBUG("Adjust lower bound to %lld", (intmax_t)ct->lower_bound);
|
||||||
/* TODO: adjust lower bound */
|
/* TODO: adjust lower bound */
|
||||||
ASN__ENCODE_FAILED;
|
ASN__ENCODE_FAILED;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@ asn_TYPE_operation_t asn_OP_NULL = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
NULL_compare,
|
NULL_compare,
|
||||||
|
NULL_copy,
|
||||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||||
NULL_decode_ber,
|
NULL_decode_ber,
|
||||||
NULL_encode_der, /* Special handling of DER encoding */
|
NULL_encode_der, /* Special handling of DER encoding */
|
||||||
|
@ -34,9 +35,11 @@ asn_TYPE_operation_t asn_OP_NULL = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
NULL_decode_jer,
|
||||||
NULL_encode_jer,
|
NULL_encode_jer,
|
||||||
#else
|
#else
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||||
NULL_decode_oer,
|
NULL_decode_oer,
|
||||||
|
@ -111,3 +114,15 @@ NULL_compare(const asn_TYPE_descriptor_t *td, const void *a, const void *b) {
|
||||||
(void)b;
|
(void)b;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
NULL_copy(const asn_TYPE_descriptor_t *td, void **a, const void *b) {
|
||||||
|
(void)td;
|
||||||
|
|
||||||
|
if(b && !*a) {
|
||||||
|
*a = CALLOC(1, sizeof(NULL_t));
|
||||||
|
if (!*a) return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@ asn_struct_print_f NULL_print;
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
|
|
||||||
asn_struct_compare_f NULL_compare;
|
asn_struct_compare_f NULL_compare;
|
||||||
|
asn_struct_copy_f NULL_copy;
|
||||||
|
|
||||||
#define NULL_constraint asn_generic_no_constraint
|
#define NULL_constraint asn_generic_no_constraint
|
||||||
|
|
||||||
|
@ -41,6 +42,7 @@ xer_type_encoder_f NULL_encode_xer;
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
|
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
jer_type_decoder_f NULL_decode_jer;
|
||||||
jer_type_encoder_f NULL_encode_jer;
|
jer_type_encoder_f NULL_encode_jer;
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ asn_TYPE_operation_t asn_OP_NativeEnumerated = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
NativeInteger_compare,
|
NativeInteger_compare,
|
||||||
|
NativeInteger_copy,
|
||||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||||
NativeInteger_decode_ber,
|
NativeInteger_decode_ber,
|
||||||
NativeInteger_encode_der,
|
NativeInteger_encode_der,
|
||||||
|
@ -41,9 +42,11 @@ asn_TYPE_operation_t asn_OP_NativeEnumerated = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
NativeEnumerated_decode_jer,
|
||||||
NativeEnumerated_encode_jer,
|
NativeEnumerated_encode_jer,
|
||||||
#else
|
#else
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||||
NativeEnumerated_decode_oer,
|
NativeEnumerated_decode_oer,
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#define _NativeEnumerated_H_
|
#define _NativeEnumerated_H_
|
||||||
|
|
||||||
#include <NativeInteger.h>
|
#include <NativeInteger.h>
|
||||||
|
#include <ENUMERATED.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -28,6 +29,7 @@ extern asn_TYPE_operation_t asn_OP_NativeEnumerated;
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
|
|
||||||
#define NativeEnumerated_compare NativeInteger_compare
|
#define NativeEnumerated_compare NativeInteger_compare
|
||||||
|
#define NativeEnumerated_copy NativeInteger_copy
|
||||||
|
|
||||||
#define NativeEnumerated_constraint asn_generic_no_constraint
|
#define NativeEnumerated_constraint asn_generic_no_constraint
|
||||||
|
|
||||||
|
@ -42,6 +44,7 @@ xer_type_encoder_f NativeEnumerated_encode_xer;
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
|
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
jer_type_decoder_f NativeEnumerated_decode_jer;
|
||||||
jer_type_encoder_f NativeEnumerated_encode_jer;
|
jer_type_encoder_f NativeEnumerated_encode_jer;
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ NativeEnumerated_decode_aper(const asn_codec_ctx_t *opt_codec_ctx,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* XXX handle indefinite index length > 64k */
|
/* XXX handle indefinite index length > 64k */
|
||||||
value = aper_get_nsnnwn(pd, 65537);
|
value = aper_get_nsnnwn(pd);
|
||||||
if(value < 0) ASN__DECODE_STARVED;
|
if(value < 0) ASN__DECODE_STARVED;
|
||||||
value += specs->extension - 1;
|
value += specs->extension - 1;
|
||||||
//if(value >= specs->map_count)
|
//if(value >= specs->map_count)
|
||||||
|
@ -148,9 +148,7 @@ NativeEnumerated_encode_aper(const asn_TYPE_descriptor_t *td,
|
||||||
ASN_DEBUG("value = %ld, ext = %d, inext = %d, res = %ld",
|
ASN_DEBUG("value = %ld, ext = %d, inext = %d, res = %ld",
|
||||||
value, specs->extension, inext,
|
value, specs->extension, inext,
|
||||||
value - (inext ? (specs->extension - 1) : 0));
|
value - (inext ? (specs->extension - 1) : 0));
|
||||||
if(aper_put_nsnnwn(po,
|
if(aper_put_nsnnwn(po, value - (inext ? (specs->extension - 1) : 0)))
|
||||||
ct->upper_bound - ct->lower_bound + 1,
|
|
||||||
value - (inext ? (specs->extension - 1) : 0)))
|
|
||||||
ASN__ENCODE_FAILED;
|
ASN__ENCODE_FAILED;
|
||||||
|
|
||||||
ASN__ENCODED_OK(er);
|
ASN__ENCODED_OK(er);
|
||||||
|
|
|
@ -27,6 +27,7 @@ asn_TYPE_operation_t asn_OP_NativeInteger = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
NativeInteger_compare,
|
NativeInteger_compare,
|
||||||
|
NativeInteger_copy,
|
||||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||||
NativeInteger_decode_ber,
|
NativeInteger_decode_ber,
|
||||||
NativeInteger_encode_der,
|
NativeInteger_encode_der,
|
||||||
|
@ -42,9 +43,11 @@ asn_TYPE_operation_t asn_OP_NativeInteger = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
NativeInteger_decode_jer,
|
||||||
NativeInteger_encode_jer,
|
NativeInteger_encode_jer,
|
||||||
#else
|
#else
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||||
NativeInteger_decode_oer, /* OER decoder */
|
NativeInteger_decode_oer, /* OER decoder */
|
||||||
|
@ -150,3 +153,30 @@ NativeInteger_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const v
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
NativeInteger_copy(const asn_TYPE_descriptor_t *td, void **aptr, const void *bptr) {
|
||||||
|
unsigned long *a = *aptr;
|
||||||
|
const unsigned long *b = bptr;
|
||||||
|
|
||||||
|
(void)td;
|
||||||
|
|
||||||
|
/* Check if source has data */
|
||||||
|
if(!b) {
|
||||||
|
/* Clear destination */
|
||||||
|
if(a) {
|
||||||
|
FREEMEM(a);
|
||||||
|
*aptr = 0;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!a) {
|
||||||
|
a = *aptr = MALLOC(sizeof(*a));
|
||||||
|
if(!a) return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
*a = *b;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@ asn_struct_print_f NativeInteger_print;
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
|
|
||||||
asn_struct_compare_f NativeInteger_compare;
|
asn_struct_compare_f NativeInteger_compare;
|
||||||
|
asn_struct_copy_f NativeInteger_copy;
|
||||||
|
|
||||||
#define NativeInteger_constraint asn_generic_no_constraint
|
#define NativeInteger_constraint asn_generic_no_constraint
|
||||||
|
|
||||||
|
@ -43,6 +44,7 @@ xer_type_encoder_f NativeInteger_encode_xer;
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
|
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
jer_type_decoder_f NativeInteger_decode_jer;
|
||||||
jer_type_encoder_f NativeInteger_encode_jer;
|
jer_type_encoder_f NativeInteger_encode_jer;
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
|
|
||||||
|
|
|
@ -63,8 +63,10 @@ NativeInteger_random_fill(const asn_TYPE_descriptor_t *td, void **sptr,
|
||||||
0, sizeof(variants) / sizeof(variants[0]) - 1)];
|
0, sizeof(variants) / sizeof(variants[0]) - 1)];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!constraints) constraints = &td->encoding_constraints;
|
|
||||||
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
|
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
|
||||||
|
if(!constraints || !constraints->per_constraints)
|
||||||
|
constraints = &td->encoding_constraints;
|
||||||
|
|
||||||
const asn_per_constraints_t *ct;
|
const asn_per_constraints_t *ct;
|
||||||
|
|
||||||
ct = constraints ? constraints->per_constraints : 0;
|
ct = constraints ? constraints->per_constraints : 0;
|
||||||
|
@ -74,6 +76,8 @@ NativeInteger_random_fill(const asn_TYPE_descriptor_t *td, void **sptr,
|
||||||
ct->value.upper_bound);
|
ct->value.upper_bound);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
if(!constraints) constraints = &td->encoding_constraints;
|
||||||
#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ asn_TYPE_operation_t asn_OP_OBJECT_IDENTIFIER = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
OCTET_STRING_compare, /* Implemented in terms of a string comparison */
|
OCTET_STRING_compare, /* Implemented in terms of a string comparison */
|
||||||
|
OCTET_STRING_copy, /* Implemented in terms of a string copy */
|
||||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||||
ber_decode_primitive,
|
ber_decode_primitive,
|
||||||
der_encode_primitive,
|
der_encode_primitive,
|
||||||
|
@ -39,9 +40,11 @@ asn_TYPE_operation_t asn_OP_OBJECT_IDENTIFIER = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
OBJECT_IDENTIFIER_decode_jer,
|
||||||
OBJECT_IDENTIFIER_encode_jer,
|
OBJECT_IDENTIFIER_encode_jer,
|
||||||
#else
|
#else
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||||
OBJECT_IDENTIFIER_decode_oer,
|
OBJECT_IDENTIFIER_decode_oer,
|
||||||
|
|
|
@ -32,6 +32,7 @@ asn_struct_print_f OBJECT_IDENTIFIER_print;
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
|
|
||||||
#define OBJECT_IDENTIFIER_compare OCTET_STRING_compare
|
#define OBJECT_IDENTIFIER_compare OCTET_STRING_compare
|
||||||
|
#define OBJECT_IDENTIFIER_copy OCTET_STRING_copy
|
||||||
|
|
||||||
asn_constr_check_f OBJECT_IDENTIFIER_constraint;
|
asn_constr_check_f OBJECT_IDENTIFIER_constraint;
|
||||||
|
|
||||||
|
@ -46,6 +47,7 @@ xer_type_encoder_f OBJECT_IDENTIFIER_encode_xer;
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
|
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
jer_type_decoder_f OBJECT_IDENTIFIER_decode_jer;
|
||||||
jer_type_encoder_f OBJECT_IDENTIFIER_encode_jer;
|
jer_type_encoder_f OBJECT_IDENTIFIER_encode_jer;
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ asn_TYPE_operation_t asn_OP_OCTET_STRING = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
OCTET_STRING_compare,
|
OCTET_STRING_compare,
|
||||||
|
OCTET_STRING_copy,
|
||||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||||
OCTET_STRING_decode_ber,
|
OCTET_STRING_decode_ber,
|
||||||
OCTET_STRING_encode_der,
|
OCTET_STRING_encode_der,
|
||||||
|
@ -41,9 +42,11 @@ asn_TYPE_operation_t asn_OP_OCTET_STRING = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
OCTET_STRING_decode_jer_hex,
|
||||||
OCTET_STRING_encode_jer,
|
OCTET_STRING_encode_jer,
|
||||||
#else
|
#else
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||||
OCTET_STRING_decode_oer,
|
OCTET_STRING_decode_oer,
|
||||||
|
@ -247,6 +250,43 @@ OCTET_STRING_compare(const asn_TYPE_descriptor_t *td, const void *aptr,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
OCTET_STRING_copy(const asn_TYPE_descriptor_t *td, void **aptr,
|
||||||
|
const void *bptr) {
|
||||||
|
const asn_OCTET_STRING_specifics_t *specs =
|
||||||
|
td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics
|
||||||
|
: &asn_SPC_OCTET_STRING_specs;
|
||||||
|
OCTET_STRING_t *a = *aptr;
|
||||||
|
const OCTET_STRING_t *b = bptr;
|
||||||
|
|
||||||
|
if(!b) {
|
||||||
|
if(a) {
|
||||||
|
FREEMEM(a->buf);
|
||||||
|
a->buf = 0;
|
||||||
|
a->size = 0;
|
||||||
|
FREEMEM(a);
|
||||||
|
}
|
||||||
|
*aptr = 0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!a) {
|
||||||
|
a = *aptr = (OCTET_STRING_t *)CALLOC(1, specs->struct_size);
|
||||||
|
if(!a) return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void *buf = MALLOC(b->size + 1);
|
||||||
|
if(!buf) return -1;
|
||||||
|
memcpy(buf, b->buf, b->size);
|
||||||
|
((uint8_t *)buf)[b->size] = '\0';
|
||||||
|
|
||||||
|
FREEMEM(a->buf);
|
||||||
|
a->buf = (uint8_t *)buf;
|
||||||
|
a->size = b->size;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
|
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
|
||||||
int
|
int
|
||||||
OCTET_STRING_per_get_characters(asn_per_data_t *po, uint8_t *buf,
|
OCTET_STRING_per_get_characters(asn_per_data_t *po, uint8_t *buf,
|
||||||
|
|
|
@ -29,6 +29,7 @@ asn_struct_print_f OCTET_STRING_print_utf8;
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
|
|
||||||
asn_struct_compare_f OCTET_STRING_compare;
|
asn_struct_compare_f OCTET_STRING_compare;
|
||||||
|
asn_struct_copy_f OCTET_STRING_copy;
|
||||||
|
|
||||||
#define OCTET_STRING_constraint asn_generic_no_constraint
|
#define OCTET_STRING_constraint asn_generic_no_constraint
|
||||||
|
|
||||||
|
@ -46,6 +47,8 @@ xer_type_encoder_f OCTET_STRING_encode_xer_utf8;
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
|
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
jer_type_decoder_f OCTET_STRING_decode_jer_hex; /* Hexadecimal */
|
||||||
|
jer_type_decoder_f OCTET_STRING_decode_jer_utf8; /* ASCII/UTF-8 */
|
||||||
jer_type_encoder_f OCTET_STRING_encode_jer;
|
jer_type_encoder_f OCTET_STRING_encode_jer;
|
||||||
jer_type_encoder_f OCTET_STRING_encode_jer_utf8;
|
jer_type_encoder_f OCTET_STRING_encode_jer_utf8;
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
|
|
|
@ -179,7 +179,6 @@ OCTET_STRING_decode_aper(const asn_codec_ctx_t *opt_codec_ctx,
|
||||||
raw_len = aper_get_length(pd, csiz->lower_bound, csiz->upper_bound,
|
raw_len = aper_get_length(pd, csiz->lower_bound, csiz->upper_bound,
|
||||||
csiz->effective_bits, &repeat);
|
csiz->effective_bits, &repeat);
|
||||||
if(raw_len < 0) RETURN(RC_WMORE);
|
if(raw_len < 0) RETURN(RC_WMORE);
|
||||||
raw_len += csiz->lower_bound;
|
|
||||||
|
|
||||||
ASN_DEBUG("Got PER length eb %ld, len %ld, %s (%s)",
|
ASN_DEBUG("Got PER length eb %ld, len %ld, %s (%s)",
|
||||||
(long)csiz->effective_bits, (long)raw_len,
|
(long)csiz->effective_bits, (long)raw_len,
|
||||||
|
|
|
@ -14,6 +14,7 @@ asn_TYPE_operation_t asn_OP_OPEN_TYPE = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
OPEN_TYPE_compare,
|
OPEN_TYPE_compare,
|
||||||
|
OPEN_TYPE_copy,
|
||||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||||
OPEN_TYPE_decode_ber,
|
OPEN_TYPE_decode_ber,
|
||||||
OPEN_TYPE_encode_der,
|
OPEN_TYPE_encode_der,
|
||||||
|
@ -29,9 +30,11 @@ asn_TYPE_operation_t asn_OP_OPEN_TYPE = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
OPEN_TYPE_decode_jer,
|
||||||
OPEN_TYPE_encode_jer,
|
OPEN_TYPE_encode_jer,
|
||||||
#else
|
#else
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||||
OPEN_TYPE_decode_oer,
|
OPEN_TYPE_decode_oer,
|
||||||
|
|
|
@ -33,6 +33,7 @@ extern "C" {
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
|
|
||||||
#define OPEN_TYPE_compare CHOICE_compare
|
#define OPEN_TYPE_compare CHOICE_compare
|
||||||
|
#define OPEN_TYPE_copy CHOICE_copy
|
||||||
|
|
||||||
#define OPEN_TYPE_constraint CHOICE_constraint
|
#define OPEN_TYPE_constraint CHOICE_constraint
|
||||||
|
|
||||||
|
@ -59,6 +60,13 @@ asn_dec_rval_t OPEN_TYPE_xer_get(
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
|
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
asn_dec_rval_t OPEN_TYPE_jer_get(
|
||||||
|
const asn_codec_ctx_t *opt_codec_ctx,
|
||||||
|
const asn_TYPE_descriptor_t *parent_type,
|
||||||
|
void *parent_structure,
|
||||||
|
const asn_TYPE_member_t *element,
|
||||||
|
const void *ptr, size_t size);
|
||||||
|
#define OPEN_TYPE_decode_jer NULL
|
||||||
#define OPEN_TYPE_encode_jer CHOICE_encode_jer
|
#define OPEN_TYPE_encode_jer CHOICE_encode_jer
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
|
|
||||||
|
@ -70,7 +78,10 @@ asn_dec_rval_t OPEN_TYPE_oer_get(
|
||||||
asn_TYPE_member_t *element, const void *ptr,
|
asn_TYPE_member_t *element, const void *ptr,
|
||||||
size_t size);
|
size_t size);
|
||||||
#define OPEN_TYPE_decode_oer NULL
|
#define OPEN_TYPE_decode_oer NULL
|
||||||
#define OPEN_TYPE_encode_oer CHOICE_encode_oer
|
asn_enc_rval_t OPEN_TYPE_encode_oer(
|
||||||
|
const asn_TYPE_descriptor_t *type_descriptor,
|
||||||
|
const asn_oer_constraints_t *constraints, const void *struct_ptr,
|
||||||
|
asn_app_consume_bytes_f *consume_bytes_cb, void *app_key);
|
||||||
#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
|
||||||
|
|
||||||
#if !defined(ASN_DISABLE_UPER_SUPPORT)
|
#if !defined(ASN_DISABLE_UPER_SUPPORT)
|
||||||
|
|
|
@ -53,7 +53,8 @@ OPEN_TYPE_aper_get(const asn_codec_ctx_t *opt_codec_ctx,
|
||||||
(char *)*memb_ptr2
|
(char *)*memb_ptr2
|
||||||
+ elm->type->elements[selected.presence_index - 1].memb_offset;
|
+ elm->type->elements[selected.presence_index - 1].memb_offset;
|
||||||
|
|
||||||
rv = aper_open_type_get(opt_codec_ctx, selected.type_descriptor, NULL,
|
rv = aper_open_type_get(opt_codec_ctx, selected.type_descriptor,
|
||||||
|
elm->type->elements[selected.presence_index - 1].encoding_constraints.per_constraints,
|
||||||
&inner_value, pd);
|
&inner_value, pd);
|
||||||
switch(rv.code) {
|
switch(rv.code) {
|
||||||
case RC_OK:
|
case RC_OK:
|
||||||
|
@ -110,7 +111,7 @@ OPEN_TYPE_encode_aper(const asn_TYPE_descriptor_t *td,
|
||||||
memb_ptr = (const char *)sptr + elm->memb_offset;
|
memb_ptr = (const char *)sptr + elm->memb_offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(aper_open_type_put(elm->type, NULL, memb_ptr, po) < 0) {
|
if(aper_open_type_put(elm->type, elm->encoding_constraints.per_constraints, memb_ptr, po) < 0) {
|
||||||
ASN__ENCODE_FAILED;
|
ASN__ENCODE_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ asn_TYPE_operation_t asn_OP_ObjectDescriptor = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
OCTET_STRING_compare,
|
OCTET_STRING_compare,
|
||||||
|
OCTET_STRING_copy,
|
||||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||||
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
|
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
|
||||||
OCTET_STRING_encode_der,
|
OCTET_STRING_encode_der,
|
||||||
|
@ -35,9 +36,11 @@ asn_TYPE_operation_t asn_OP_ObjectDescriptor = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
OCTET_STRING_decode_jer_utf8,
|
||||||
OCTET_STRING_encode_jer_utf8,
|
OCTET_STRING_encode_jer_utf8,
|
||||||
#else
|
#else
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||||
0,
|
0,
|
||||||
|
|
|
@ -35,6 +35,7 @@ extern asn_TYPE_operation_t asn_OP_ObjectDescriptor;
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
|
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
#define ObjectDescriptor_decode_jer OCTET_STRING_decode_jer_utf8
|
||||||
#define ObjectDescriptor_encode_jer OCTET_STRING_encode_jer_utf8
|
#define ObjectDescriptor_encode_jer OCTET_STRING_encode_jer_utf8
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,7 @@ asn_TYPE_operation_t asn_OP_PrintableString = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
OCTET_STRING_compare,
|
OCTET_STRING_compare,
|
||||||
|
OCTET_STRING_copy,
|
||||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||||
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
|
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
|
||||||
OCTET_STRING_encode_der,
|
OCTET_STRING_encode_der,
|
||||||
|
@ -72,9 +73,11 @@ asn_TYPE_operation_t asn_OP_PrintableString = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
OCTET_STRING_decode_jer_utf8,
|
||||||
OCTET_STRING_encode_jer_utf8,
|
OCTET_STRING_encode_jer_utf8,
|
||||||
#else
|
#else
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||||
OCTET_STRING_decode_oer,
|
OCTET_STRING_decode_oer,
|
||||||
|
|
|
@ -23,6 +23,7 @@ extern asn_TYPE_operation_t asn_OP_PrintableString;
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
|
|
||||||
#define PrintableString_compare OCTET_STRING_compare
|
#define PrintableString_compare OCTET_STRING_compare
|
||||||
|
#define PrintableString_copy OCTET_STRING_copy
|
||||||
|
|
||||||
asn_constr_check_f PrintableString_constraint;
|
asn_constr_check_f PrintableString_constraint;
|
||||||
|
|
||||||
|
@ -37,6 +38,7 @@ asn_constr_check_f PrintableString_constraint;
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
|
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
#define PrintableString_decode_jer OCTET_STRING_decode_jer_utf8
|
||||||
#define PrintableString_encode_jer OCTET_STRING_encode_jer_utf8
|
#define PrintableString_encode_jer OCTET_STRING_encode_jer_utf8
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ asn_TYPE_operation_t asn_OP_UTF8String = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
OCTET_STRING_compare,
|
OCTET_STRING_compare,
|
||||||
|
OCTET_STRING_copy,
|
||||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||||
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
|
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
|
||||||
OCTET_STRING_encode_der,
|
OCTET_STRING_encode_der,
|
||||||
|
@ -36,9 +37,11 @@ asn_TYPE_operation_t asn_OP_UTF8String = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
OCTET_STRING_decode_jer_utf8,
|
||||||
OCTET_STRING_encode_jer_utf8,
|
OCTET_STRING_encode_jer_utf8,
|
||||||
#else
|
#else
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||||
OCTET_STRING_decode_oer,
|
OCTET_STRING_decode_oer,
|
||||||
|
|
|
@ -23,6 +23,7 @@ asn_struct_print_f UTF8String_print;
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
|
|
||||||
#define UTF8String_compare OCTET_STRING_compare
|
#define UTF8String_compare OCTET_STRING_compare
|
||||||
|
#define UTF8String_copy OCTET_STRING_copy
|
||||||
|
|
||||||
asn_constr_check_f UTF8String_constraint;
|
asn_constr_check_f UTF8String_constraint;
|
||||||
|
|
||||||
|
@ -37,6 +38,7 @@ asn_constr_check_f UTF8String_constraint;
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
|
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
#define UTF8String_decode_jer OCTET_STRING_decode_jer_utf8
|
||||||
#define UTF8String_encode_jer OCTET_STRING_encode_jer_utf8
|
#define UTF8String_encode_jer OCTET_STRING_encode_jer_utf8
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@ asn_TYPE_operation_t asn_OP_VisibleString = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
OCTET_STRING_compare,
|
OCTET_STRING_compare,
|
||||||
|
OCTET_STRING_copy,
|
||||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||||
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
|
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
|
||||||
OCTET_STRING_encode_der,
|
OCTET_STRING_encode_der,
|
||||||
|
@ -42,9 +43,11 @@ asn_TYPE_operation_t asn_OP_VisibleString = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
OCTET_STRING_decode_jer_utf8,
|
||||||
OCTET_STRING_encode_jer_utf8,
|
OCTET_STRING_encode_jer_utf8,
|
||||||
#else
|
#else
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||||
OCTET_STRING_decode_oer,
|
OCTET_STRING_decode_oer,
|
||||||
|
|
|
@ -23,6 +23,7 @@ extern asn_TYPE_operation_t asn_OP_VisibleString;
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
|
|
||||||
#define VisibleString_compare OCTET_STRING_compare
|
#define VisibleString_compare OCTET_STRING_compare
|
||||||
|
#define VisibleString_copy OCTET_STRING_copy
|
||||||
|
|
||||||
asn_constr_check_f VisibleString_constraint;
|
asn_constr_check_f VisibleString_constraint;
|
||||||
|
|
||||||
|
@ -37,6 +38,7 @@ asn_constr_check_f VisibleString_constraint;
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
|
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
#define VisibleString_decode_jer OCTET_STRING_decode_jer_hex
|
||||||
#define VisibleString_encode_jer OCTET_STRING_encode_jer
|
#define VisibleString_encode_jer OCTET_STRING_encode_jer
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,7 @@ aper_get_length(asn_per_data_t *pd, ssize_t lb, ssize_t ub,
|
||||||
*repeat = 0;
|
*repeat = 0;
|
||||||
|
|
||||||
if (constrained && ub < 65536) {
|
if (constrained && ub < 65536) {
|
||||||
int range = ub - lb + 1;
|
return aper_get_constrained_whole_number(pd, lb, ub);
|
||||||
return aper_get_nsnnwn(pd, range);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aper_get_align(pd) < 0)
|
if (aper_get_align(pd) < 0)
|
||||||
|
@ -70,55 +69,117 @@ aper_get_nslength(asn_per_data_t *pd) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ssize_t
|
ssize_t
|
||||||
aper_get_nsnnwn(asn_per_data_t *pd, int range) {
|
aper_get_nsnnwn(asn_per_data_t *pd) {
|
||||||
ssize_t value;
|
int b;
|
||||||
int bytes = 0;
|
int length;
|
||||||
|
|
||||||
ASN_DEBUG("getting nsnnwn with range %d", range);
|
ASN_DEBUG("getting nsnnwn");
|
||||||
|
|
||||||
if(range <= 255) {
|
b = per_get_few_bits(pd, 1);
|
||||||
int i;
|
if (b == -1)
|
||||||
|
return -1;
|
||||||
|
|
||||||
if (range < 0) return -1;
|
/* X.691 2002 10.6.1 */
|
||||||
/* 1 -> 8 bits */
|
if (b == 0)
|
||||||
for (i = 1; i <= 8; i++) {
|
return per_get_few_bits(pd, 6);
|
||||||
int upper = 1 << i;
|
|
||||||
if (upper >= range)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
value = per_get_few_bits(pd, i);
|
|
||||||
return value;
|
|
||||||
} else if (range == 256){
|
|
||||||
/* 1 byte */
|
|
||||||
bytes = 1;
|
|
||||||
} else if (range <= 65536) {
|
|
||||||
/* 2 bytes */
|
|
||||||
bytes = 2;
|
|
||||||
} else {
|
|
||||||
//return -1;
|
|
||||||
int length;
|
|
||||||
|
|
||||||
/* handle indefinite range */
|
|
||||||
length = per_get_few_bits(pd, 1);
|
|
||||||
if (length == 0)
|
|
||||||
return per_get_few_bits(pd, 6);
|
|
||||||
|
|
||||||
if (aper_get_align(pd) < 0)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
length = per_get_few_bits(pd, 8);
|
|
||||||
/* the length is not likely to be that big */
|
|
||||||
if (length > 4)
|
|
||||||
return -1;
|
|
||||||
value = 0;
|
|
||||||
if (per_get_many_bits(pd, (uint8_t *)&value, 0, length * 8) < 0)
|
|
||||||
return -1;
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
if (aper_get_align(pd) < 0)
|
if (aper_get_align(pd) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
value = per_get_few_bits(pd, 8 * bytes);
|
|
||||||
return value;
|
/* X.691 2002 10.6.2 */
|
||||||
|
/* X.691 2002 10.9.3.5 */
|
||||||
|
b = per_get_few_bits(pd, 1);
|
||||||
|
if (b == -1)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
if (b == 1) {
|
||||||
|
/* other 10.9.3.x cases not handled, it's doubtful we reach them in practice */
|
||||||
|
ASN_DEBUG("todo: X.691 2002 10.9.3.x");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* X.691 2002 10.9.3.6 */
|
||||||
|
length = per_get_few_bits(pd, 7);
|
||||||
|
if (length > 4) {
|
||||||
|
/* todo */
|
||||||
|
ASN_DEBUG("todo: X.691 2002 10.9.3.6 for length > 4");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
ASN_DEBUG("length %d\n", length);
|
||||||
|
|
||||||
|
/* todo: 0xffffffff will be seen as -1 and will lead to decoding failure */
|
||||||
|
return per_get_few_bits(pd, length * 8);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* X.691 2002 10.5 - Decoding of a constrained whole number */
|
||||||
|
long
|
||||||
|
aper_get_constrained_whole_number(asn_per_data_t *pd, long lb, long ub) {
|
||||||
|
assert(ub >= lb);
|
||||||
|
long range = ub - lb + 1;
|
||||||
|
int range_len;
|
||||||
|
int value_len;
|
||||||
|
long value;
|
||||||
|
|
||||||
|
ASN_DEBUG("aper get constrained_whole_number with lb %ld and ub %ld", lb, ub);
|
||||||
|
|
||||||
|
/* X.691 2002 10.5.4 */
|
||||||
|
if (range == 1)
|
||||||
|
return lb;
|
||||||
|
|
||||||
|
/* X.691 2002 10.5.7.1 - The bit-field case. */
|
||||||
|
if (range <= 255) {
|
||||||
|
int bitfield_size = 8;
|
||||||
|
for (bitfield_size = 8; bitfield_size >= 2; bitfield_size--)
|
||||||
|
if ((range - 1) & (1 << (bitfield_size-1)))
|
||||||
|
break;
|
||||||
|
value = per_get_few_bits(pd, bitfield_size);
|
||||||
|
if (value < 0 || value >= range)
|
||||||
|
return -1;
|
||||||
|
return value + lb;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* X.691 2002 10.5.7.2 - The one-octet case. */
|
||||||
|
if (range == 256) {
|
||||||
|
if (aper_get_align(pd))
|
||||||
|
return -1;
|
||||||
|
value = per_get_few_bits(pd, 8);
|
||||||
|
if (value < 0 || value >= range)
|
||||||
|
return -1;
|
||||||
|
return value + lb;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* X.691 2002 10.5.7.3 - The two-octet case. */
|
||||||
|
if (range <= 65536) {
|
||||||
|
if (aper_get_align(pd))
|
||||||
|
return -1;
|
||||||
|
value = per_get_few_bits(pd, 16);
|
||||||
|
if (value < 0 || value >= range)
|
||||||
|
return -1;
|
||||||
|
return value + lb;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* X.691 2002 10.5.7.4 - The indefinite length case. */
|
||||||
|
/* since we limit input to be 'long' we don't handle all numbers */
|
||||||
|
/* and so length determinant is retrieved as X.691 2002 10.9.3.3 */
|
||||||
|
/* number of bytes to store the range */
|
||||||
|
for (range_len = 3; ; range_len++) {
|
||||||
|
long bits = ((long)1) << (8 * range_len);
|
||||||
|
if (range - 1 < bits)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
value_len = aper_get_constrained_whole_number(pd, 1, range_len);
|
||||||
|
if (value_len == -1)
|
||||||
|
return -1;
|
||||||
|
if (value_len > 4) {
|
||||||
|
ASN_DEBUG("todo: aper_get_constrained_whole_number: value_len > 4");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (aper_get_align(pd))
|
||||||
|
return -1;
|
||||||
|
value = per_get_few_bits(pd, value_len * 8);
|
||||||
|
if (value < 0 || value >= range)
|
||||||
|
return -1;
|
||||||
|
return value + lb;
|
||||||
}
|
}
|
||||||
|
|
||||||
int aper_put_align(asn_per_outp_t *po) {
|
int aper_put_align(asn_per_outp_t *po) {
|
||||||
|
@ -142,11 +203,9 @@ aper_put_length(asn_per_outp_t *po, ssize_t lb, ssize_t ub, size_t n, int *need_
|
||||||
|
|
||||||
ASN_DEBUG("APER put length %zu with range (%zd..%zd)", n, lb, ub);
|
ASN_DEBUG("APER put length %zu with range (%zd..%zd)", n, lb, ub);
|
||||||
|
|
||||||
/* 11.9 X.691 Note 2 */
|
/* X.691 2002 10.9.3.3 */
|
||||||
if (constrained && ub < 65536) {
|
if (constrained && ub < 65536)
|
||||||
int range = ub - lb + 1;
|
return aper_put_constrained_whole_number(po, lb, ub, n + lb) ? -1 : (ssize_t)n;
|
||||||
return aper_put_nsnnwn(po, range, n) ? -1 : (ssize_t)n;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (aper_put_align(po) < 0)
|
if (aper_put_align(po) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -189,51 +248,113 @@ aper_put_nslength(asn_per_outp_t *po, size_t length) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
aper_put_nsnnwn(asn_per_outp_t *po, int range, int number) {
|
aper_put_nsnnwn(asn_per_outp_t *po, int number) {
|
||||||
int bytes;
|
int len;
|
||||||
|
|
||||||
ASN_DEBUG("aper put nsnnwn %d with range %d", number, range);
|
ASN_DEBUG("aper put nsnnwn %d", number);
|
||||||
/* 10.5.7.1 X.691 */
|
|
||||||
if(range < 0) {
|
if (number <= 63) {
|
||||||
int i;
|
if (per_put_few_bits(po, 0, 1))
|
||||||
for (i = 1; ; i++) {
|
return -1;
|
||||||
int bits = 1 << (8 * i);
|
return per_put_few_bits(po, number, 6);
|
||||||
if (number <= bits)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
bytes = i;
|
|
||||||
assert(i <= 4);
|
|
||||||
}
|
}
|
||||||
if(range <= 255) {
|
|
||||||
|
if (per_put_few_bits(po, 1, 1))
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
if (number < 256) {
|
||||||
|
len = 1;
|
||||||
|
} else if (number < 65536) {
|
||||||
|
len = 2;
|
||||||
|
} else { /* number > 64K */
|
||||||
int i;
|
int i;
|
||||||
for (i = 1; i <= 8; i++) {
|
for (i = 3; ; i++) {
|
||||||
int bits = 1 << i;
|
|
||||||
if (range <= bits)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return per_put_few_bits(po, number, i);
|
|
||||||
} else if(range == 256) {
|
|
||||||
if (number >= range)
|
|
||||||
return -1;
|
|
||||||
bytes = 1;
|
|
||||||
} else if(range <= 65536) {
|
|
||||||
if (number >= range)
|
|
||||||
return -1;
|
|
||||||
bytes = 2;
|
|
||||||
} else { /* Ranges > 64K */
|
|
||||||
int i;
|
|
||||||
for (i = 1; ; i++) {
|
|
||||||
int bits = 1 << (8 * i);
|
int bits = 1 << (8 * i);
|
||||||
if (range <= bits)
|
if (number < bits)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
assert(i <= 4);
|
len = i;
|
||||||
bytes = i;
|
}
|
||||||
|
|
||||||
|
if (aper_put_align(po) < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
/* put the length which is a non-constrained whole number */
|
||||||
|
if (len <= 127) {
|
||||||
|
if(per_put_few_bits(po, 0, 1))
|
||||||
|
return -1;
|
||||||
|
if(per_put_few_bits(po, len, 7))
|
||||||
|
return -1;
|
||||||
|
} else {
|
||||||
|
/* todo but not big problem, it's very doubtful that the
|
||||||
|
* number of bytes to encode 'number' will be > 127
|
||||||
|
*/
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
if(aper_put_align(po) < 0) /* Aligning on octet */
|
if(aper_put_align(po) < 0) /* Aligning on octet */
|
||||||
return -1;
|
return -1;
|
||||||
/* if(per_put_few_bits(po, bytes, 8))
|
return per_put_few_bits(po, number, 8 * len);
|
||||||
return -1;
|
}
|
||||||
*/
|
|
||||||
return per_put_few_bits(po, number, 8 * bytes);
|
/* X.691 2002 10.5 - Encoding of a constrained whole number */
|
||||||
|
int
|
||||||
|
aper_put_constrained_whole_number(asn_per_outp_t *po, long lb, long ub, long number) {
|
||||||
|
assert(ub >= lb);
|
||||||
|
long range = ub - lb + 1;
|
||||||
|
long value = number - lb;
|
||||||
|
int range_len;
|
||||||
|
int value_len;
|
||||||
|
|
||||||
|
ASN_DEBUG("aper put constrained_whole_number %ld with lb %ld and ub %ld", number, lb, ub);
|
||||||
|
|
||||||
|
if (number < lb || number > ub)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
/* X.691 2002 10.5.4 */
|
||||||
|
if (range == 1)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* X.691 2002 10.5.7.1 - The bit-field case. */
|
||||||
|
if (range <= 255) {
|
||||||
|
int bitfield_size = 8;
|
||||||
|
for (bitfield_size = 8; bitfield_size >= 2; bitfield_size--)
|
||||||
|
if ((range - 1) & (1 << (bitfield_size-1)))
|
||||||
|
break;
|
||||||
|
return per_put_few_bits(po, value, bitfield_size);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* X.691 2002 10.5.7.2 - The one-octet case. */
|
||||||
|
if (range == 256) {
|
||||||
|
if (aper_put_align(po))
|
||||||
|
return -1;
|
||||||
|
return per_put_few_bits(po, value, 8);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* X.691 2002 10.5.7.3 - The two-octet case. */
|
||||||
|
if (range <= 65536) {
|
||||||
|
if (aper_put_align(po))
|
||||||
|
return -1;
|
||||||
|
return per_put_few_bits(po, value, 16);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* X.691 2002 10.5.7.4 - The indefinite length case. */
|
||||||
|
/* since we limit input to be 'long' we don't handle all numbers */
|
||||||
|
/* and so length determinant is stored as X.691 2002 10.9.3.3 */
|
||||||
|
/* number of bytes to store the range */
|
||||||
|
for (range_len = 3; ; range_len++) {
|
||||||
|
int bits = 1 << (8 * range_len);
|
||||||
|
if (range - 1 < bits)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
/* number of bytes to store the value */
|
||||||
|
for (value_len = 1; ; value_len++) {
|
||||||
|
long bits = ((long)1) << (8 * value_len);
|
||||||
|
if (value < bits)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (aper_put_constrained_whole_number(po, 1, range_len, value_len))
|
||||||
|
return -1;
|
||||||
|
if (aper_put_align(po))
|
||||||
|
return -1;
|
||||||
|
return per_put_few_bits(po, value, value_len * 8);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,12 @@ ssize_t aper_get_nslength(asn_per_data_t *pd);
|
||||||
/*
|
/*
|
||||||
* Get the normally small non-negative whole number.
|
* Get the normally small non-negative whole number.
|
||||||
*/
|
*/
|
||||||
ssize_t aper_get_nsnnwn(asn_per_data_t *pd, int range);
|
ssize_t aper_get_nsnnwn(asn_per_data_t *pd);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get the constrained whole number.
|
||||||
|
*/
|
||||||
|
long aper_get_constrained_whole_number(asn_per_data_t *po, long lb, long ub);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* X.691 (08/2015) #11.9 "General rules for encoding a length determinant"
|
* X.691 (08/2015) #11.9 "General rules for encoding a length determinant"
|
||||||
|
@ -54,7 +59,12 @@ int aper_put_nslength(asn_per_outp_t *po, size_t length);
|
||||||
/*
|
/*
|
||||||
* Put the normally small non-negative whole number.
|
* Put the normally small non-negative whole number.
|
||||||
*/
|
*/
|
||||||
int aper_put_nsnnwn(asn_per_outp_t *po, int range, int number);
|
int aper_put_nsnnwn(asn_per_outp_t *po, int number);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Put the constrained whole number.
|
||||||
|
*/
|
||||||
|
int aper_put_constrained_whole_number(asn_per_outp_t *po, long lb, long ub, long number);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,6 +229,9 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx,
|
||||||
#if !defined(ASN_DISABLE_XER_SUPPORT)
|
#if !defined(ASN_DISABLE_XER_SUPPORT)
|
||||||
enum xer_encoder_flags_e xer_flags = XER_F_CANONICAL;
|
enum xer_encoder_flags_e xer_flags = XER_F_CANONICAL;
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
enum jer_encoder_flags_e jer_flags = JER_F;
|
||||||
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
|
|
||||||
(void)opt_codec_ctx; /* Parameters are not checked on encode yet. */
|
(void)opt_codec_ctx; /* Parameters are not checked on encode yet. */
|
||||||
|
|
||||||
|
@ -432,9 +435,15 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx,
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
|
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
case ATS_JER_MINIFIED:
|
||||||
|
/* Currently JER_F and JER_F_MINIFIED have opposite purposes
|
||||||
|
* so we just flip the flag. */
|
||||||
|
jer_flags &= ~JER_F;
|
||||||
|
jer_flags |= JER_F_MINIFIED;
|
||||||
|
/* Fall through. */
|
||||||
case ATS_JER:
|
case ATS_JER:
|
||||||
if(td->op->jer_encoder) {
|
if(td->op->jer_encoder) {
|
||||||
er = jer_encode(td, sptr, callback, callback_key);
|
er = jer_encode(td, sptr, jer_flags, callback, callback_key);
|
||||||
if(er.encoded == -1) {
|
if(er.encoded == -1) {
|
||||||
if(er.failed_type && er.failed_type->op->jer_encoder) {
|
if(er.failed_type && er.failed_type->op->jer_encoder) {
|
||||||
errno = EBADF; /* Structure has incorrect form. */
|
errno = EBADF; /* Structure has incorrect form. */
|
||||||
|
@ -533,6 +542,15 @@ asn_decode(const asn_codec_ctx_t *opt_codec_ctx,
|
||||||
errno = ENOENT;
|
errno = ENOENT;
|
||||||
ASN__DECODE_FAILED;
|
ASN__DECODE_FAILED;
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
|
|
||||||
|
case ATS_JER:
|
||||||
|
case ATS_JER_MINIFIED:
|
||||||
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
return jer_decode(opt_codec_ctx, td, sptr, buffer, size);
|
||||||
|
#else
|
||||||
|
errno = ENOENT;
|
||||||
|
ASN__DECODE_FAILED;
|
||||||
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,13 @@ enum asn_transfer_syntax {
|
||||||
*/
|
*/
|
||||||
ATS_BASIC_XER,
|
ATS_BASIC_XER,
|
||||||
ATS_CANONICAL_XER,
|
ATS_CANONICAL_XER,
|
||||||
|
/*
|
||||||
|
* X.697:
|
||||||
|
* JER: JSON Encoding Rules.
|
||||||
|
* MINIFIED produces a whitespace-free JSON.
|
||||||
|
*/
|
||||||
ATS_JER,
|
ATS_JER,
|
||||||
|
ATS_JER_MINIFIED,
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -49,6 +49,32 @@ asn_dec_rval_t xer_decode_primitive(
|
||||||
xer_primitive_body_decoder_f *prim_body_decoder);
|
xer_primitive_body_decoder_f *prim_body_decoder);
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
|
|
||||||
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
/*
|
||||||
|
* A callback specification for the jer_decode_primitive() function below.
|
||||||
|
*/
|
||||||
|
enum jer_pbd_rval {
|
||||||
|
JPBD_SYSTEM_FAILURE, /* System failure (memory shortage, etc) */
|
||||||
|
JPBD_DECODER_LIMIT, /* Hit some decoder limitation or deficiency */
|
||||||
|
JPBD_BROKEN_ENCODING, /* Encoding of a primitive body is broken */
|
||||||
|
JPBD_NOT_BODY_IGNORE, /* Not a body format, but safe to ignore */
|
||||||
|
JPBD_BODY_CONSUMED /* Body is recognized and consumed */
|
||||||
|
};
|
||||||
|
typedef enum jer_pbd_rval(jer_primitive_body_decoder_f)(
|
||||||
|
const asn_TYPE_descriptor_t *td, void *struct_ptr, const void *chunk_buf,
|
||||||
|
size_t chunk_size);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Specific function to decode simple primitive types.
|
||||||
|
* Also see jer_decode_general() in jer_decoder.h
|
||||||
|
*/
|
||||||
|
asn_dec_rval_t jer_decode_primitive(
|
||||||
|
const asn_codec_ctx_t *opt_codec_ctx,
|
||||||
|
const asn_TYPE_descriptor_t *type_descriptor, void **struct_ptr,
|
||||||
|
size_t struct_size, const void *buf_ptr, size_t size,
|
||||||
|
jer_primitive_body_decoder_f *prim_body_decoder);
|
||||||
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -4,3 +4,4 @@
|
||||||
#define ASN_DISABLE_XER_SUPPORT 1
|
#define ASN_DISABLE_XER_SUPPORT 1
|
||||||
#define ASN_DISABLE_OER_SUPPORT 1
|
#define ASN_DISABLE_OER_SUPPORT 1
|
||||||
#define ASN_DISABLE_UPER_SUPPORT 1
|
#define ASN_DISABLE_UPER_SUPPORT 1
|
||||||
|
#define ASN_DISABLE_JER_SUPPORT 1
|
||||||
|
|
|
@ -26,7 +26,9 @@ asn__format_to_callback(int (*cb)(const void *, size_t, void *key), void *key,
|
||||||
buf_size <<= 1;
|
buf_size <<= 1;
|
||||||
if(buf == scratch) {
|
if(buf == scratch) {
|
||||||
buf = MALLOC(buf_size);
|
buf = MALLOC(buf_size);
|
||||||
if(!buf) return -1;
|
if(!buf) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
void *p = REALLOC(buf, buf_size);
|
void *p = REALLOC(buf, buf_size);
|
||||||
if(!p) {
|
if(!p) {
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include <asn_internal.h>
|
#include <asn_internal.h>
|
||||||
#include <asn_random_fill.h>
|
#include <asn_random_fill.h>
|
||||||
#include <constr_TYPE.h>
|
#include <constr_TYPE.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
asn_random_fill(const struct asn_TYPE_descriptor_s *td, void **struct_ptr,
|
asn_random_fill(const struct asn_TYPE_descriptor_s *td, void **struct_ptr,
|
||||||
|
|
|
@ -13,6 +13,7 @@ asn_TYPE_operation_t asn_OP_CHOICE = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
CHOICE_compare,
|
CHOICE_compare,
|
||||||
|
CHOICE_copy,
|
||||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||||
CHOICE_decode_ber,
|
CHOICE_decode_ber,
|
||||||
CHOICE_encode_der,
|
CHOICE_encode_der,
|
||||||
|
@ -28,9 +29,11 @@ asn_TYPE_operation_t asn_OP_CHOICE = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
CHOICE_decode_jer,
|
||||||
CHOICE_encode_jer,
|
CHOICE_encode_jer,
|
||||||
#else
|
#else
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||||
CHOICE_decode_oer,
|
CHOICE_decode_oer,
|
||||||
|
@ -154,13 +157,14 @@ CHOICE_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
|
||||||
void
|
void
|
||||||
CHOICE_free(const asn_TYPE_descriptor_t *td, void *ptr,
|
CHOICE_free(const asn_TYPE_descriptor_t *td, void *ptr,
|
||||||
enum asn_struct_free_method method) {
|
enum asn_struct_free_method method) {
|
||||||
const asn_CHOICE_specifics_t *specs =
|
const asn_CHOICE_specifics_t *specs;
|
||||||
(const asn_CHOICE_specifics_t *)td->specifics;
|
|
||||||
unsigned present;
|
unsigned present;
|
||||||
|
|
||||||
if(!td || !ptr)
|
if(!td || !ptr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
specs = (const asn_CHOICE_specifics_t *)td->specifics;
|
||||||
|
|
||||||
ASN_DEBUG("Freeing %s as CHOICE", td->name);
|
ASN_DEBUG("Freeing %s as CHOICE", td->name);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -311,6 +315,59 @@ CHOICE_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const void *bp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
CHOICE_copy(const asn_TYPE_descriptor_t *td, void **aptr, const void *bptr) {
|
||||||
|
if(!td) return -1;
|
||||||
|
|
||||||
|
void *st = *aptr;
|
||||||
|
const asn_CHOICE_specifics_t *specs =
|
||||||
|
(const asn_CHOICE_specifics_t *)td->specifics;
|
||||||
|
const asn_TYPE_member_t *elm; /* CHOICE's element */
|
||||||
|
int present;
|
||||||
|
int ret;
|
||||||
|
void *amemb;
|
||||||
|
void **amembp;
|
||||||
|
const void *bmemb;
|
||||||
|
|
||||||
|
if(!bptr) {
|
||||||
|
if(st) {
|
||||||
|
ASN_STRUCT_FREE(*td, st);
|
||||||
|
*aptr = NULL;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!st) {
|
||||||
|
st = *aptr = CALLOC(1, specs->struct_size);
|
||||||
|
if(!st) return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
present = _fetch_present_idx(bptr,
|
||||||
|
specs->pres_offset, specs->pres_size);
|
||||||
|
|
||||||
|
if(present <= 0 && (unsigned)present > td->elements_count) return -1;
|
||||||
|
--present;
|
||||||
|
|
||||||
|
elm = &td->elements[present];
|
||||||
|
if(elm->flags & ATF_POINTER) {
|
||||||
|
/* Member is a pointer to another structure */
|
||||||
|
amembp = (void **)((char *)st + elm->memb_offset);
|
||||||
|
bmemb = *(const void* const*)((const char*)bptr + elm->memb_offset);
|
||||||
|
} else {
|
||||||
|
amemb = (char *)st + elm->memb_offset;
|
||||||
|
amembp = &amemb;
|
||||||
|
bmemb = (const void*)((const char*)bptr + elm->memb_offset);
|
||||||
|
}
|
||||||
|
ret = elm->type->op->copy_struct(elm->type, amembp, bmemb);
|
||||||
|
if (ret != 0) return ret;
|
||||||
|
|
||||||
|
_set_present_idx(st,
|
||||||
|
specs->pres_offset,
|
||||||
|
specs->pres_size, present + 1);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return the 1-based choice variant presence index.
|
* Return the 1-based choice variant presence index.
|
||||||
* Returns 0 in case of error.
|
* Returns 0 in case of error.
|
||||||
|
|
|
@ -46,6 +46,7 @@ asn_struct_print_f CHOICE_print;
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
|
|
||||||
asn_struct_compare_f CHOICE_compare;
|
asn_struct_compare_f CHOICE_compare;
|
||||||
|
asn_struct_copy_f CHOICE_copy;
|
||||||
|
|
||||||
asn_constr_check_f CHOICE_constraint;
|
asn_constr_check_f CHOICE_constraint;
|
||||||
|
|
||||||
|
@ -60,6 +61,7 @@ xer_type_encoder_f CHOICE_encode_xer;
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
|
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
jer_type_decoder_f CHOICE_decode_jer;
|
||||||
jer_type_encoder_f CHOICE_encode_jer;
|
jer_type_encoder_f CHOICE_encode_jer;
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
|
|
||||||
|
|
|
@ -55,8 +55,8 @@ CHOICE_decode_aper(const asn_codec_ctx_t *opt_codec_ctx,
|
||||||
if(specs->ext_start == -1)
|
if(specs->ext_start == -1)
|
||||||
ASN__DECODE_FAILED;
|
ASN__DECODE_FAILED;
|
||||||
|
|
||||||
if(specs && specs->tag2el_count > specs->ext_start) {
|
if(specs && specs->tag2el_count > (unsigned)specs->ext_start) {
|
||||||
value = aper_get_nsnnwn(pd, specs->tag2el_count - specs->ext_start); /* extension elements range */
|
value = aper_get_nsnnwn(pd); /* extension elements range */
|
||||||
if(value < 0) ASN__DECODE_STARVED;
|
if(value < 0) ASN__DECODE_STARVED;
|
||||||
value += specs->ext_start;
|
value += specs->ext_start;
|
||||||
if((unsigned)value >= td->elements_count)
|
if((unsigned)value >= td->elements_count)
|
||||||
|
@ -168,11 +168,7 @@ CHOICE_encode_aper(const asn_TYPE_descriptor_t *td,
|
||||||
asn_enc_rval_t rval = {0,0,0};
|
asn_enc_rval_t rval = {0,0,0};
|
||||||
if(specs->ext_start == -1)
|
if(specs->ext_start == -1)
|
||||||
ASN__ENCODE_FAILED;
|
ASN__ENCODE_FAILED;
|
||||||
int n = present - specs->ext_start;
|
if(aper_put_nsnnwn(po, present - specs->ext_start))
|
||||||
if(n <= 63) {
|
|
||||||
if(n < 0) ASN__ENCODE_FAILED;
|
|
||||||
if(per_put_few_bits(po, n, 7)) ASN__ENCODE_FAILED;
|
|
||||||
} else
|
|
||||||
ASN__ENCODE_FAILED;
|
ASN__ENCODE_FAILED;
|
||||||
if(aper_open_type_put(elm->type, elm->encoding_constraints.per_constraints,
|
if(aper_open_type_put(elm->type, elm->encoding_constraints.per_constraints,
|
||||||
memb_ptr, po))
|
memb_ptr, po))
|
||||||
|
|
|
@ -14,6 +14,7 @@ asn_TYPE_operation_t asn_OP_SEQUENCE = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
SEQUENCE_compare,
|
SEQUENCE_compare,
|
||||||
|
SEQUENCE_copy,
|
||||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||||
SEQUENCE_decode_ber,
|
SEQUENCE_decode_ber,
|
||||||
SEQUENCE_encode_der,
|
SEQUENCE_encode_der,
|
||||||
|
@ -29,9 +30,11 @@ asn_TYPE_operation_t asn_OP_SEQUENCE = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
SEQUENCE_decode_jer,
|
||||||
SEQUENCE_encode_jer,
|
SEQUENCE_encode_jer,
|
||||||
#else
|
#else
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||||
SEQUENCE_decode_oer,
|
SEQUENCE_decode_oer,
|
||||||
|
@ -66,13 +69,14 @@ void
|
||||||
SEQUENCE_free(const asn_TYPE_descriptor_t *td, void *sptr,
|
SEQUENCE_free(const asn_TYPE_descriptor_t *td, void *sptr,
|
||||||
enum asn_struct_free_method method) {
|
enum asn_struct_free_method method) {
|
||||||
size_t edx;
|
size_t edx;
|
||||||
const asn_SEQUENCE_specifics_t *specs =
|
const asn_SEQUENCE_specifics_t *specs;
|
||||||
(const asn_SEQUENCE_specifics_t *)td->specifics;
|
|
||||||
asn_struct_ctx_t *ctx; /* Decoder context */
|
asn_struct_ctx_t *ctx; /* Decoder context */
|
||||||
|
|
||||||
if(!td || !sptr)
|
if(!td || !sptr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
specs = (const asn_SEQUENCE_specifics_t *)td->specifics;
|
||||||
|
|
||||||
ASN_DEBUG("Freeing %s as SEQUENCE", td->name);
|
ASN_DEBUG("Freeing %s as SEQUENCE", td->name);
|
||||||
|
|
||||||
for(edx = 0; edx < td->elements_count; edx++) {
|
for(edx = 0; edx < td->elements_count; edx++) {
|
||||||
|
@ -195,3 +199,53 @@ SEQUENCE_compare(const asn_TYPE_descriptor_t *td, const void *aptr,
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
SEQUENCE_copy(const asn_TYPE_descriptor_t *td, void **aptr,
|
||||||
|
const void *bptr) {
|
||||||
|
if(!td) return -1;
|
||||||
|
|
||||||
|
const asn_SEQUENCE_specifics_t *specs =
|
||||||
|
(const asn_SEQUENCE_specifics_t *)td->specifics;
|
||||||
|
size_t edx;
|
||||||
|
void *st = *aptr; /* Target structure */
|
||||||
|
|
||||||
|
if(!bptr) {
|
||||||
|
if(st) {
|
||||||
|
SEQUENCE_free(td, st, 0);
|
||||||
|
*aptr = 0;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Create the target structure if it is not present already.
|
||||||
|
*/
|
||||||
|
if(st == 0) {
|
||||||
|
st = *aptr = CALLOC(1, specs->struct_size);
|
||||||
|
if(st == 0) return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
for(edx = 0; edx < td->elements_count; edx++) {
|
||||||
|
asn_TYPE_member_t *elm = &td->elements[edx];
|
||||||
|
void *amemb;
|
||||||
|
void **amembp;
|
||||||
|
const void *bmemb;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
if(elm->flags & ATF_POINTER) {
|
||||||
|
/* Member is a pointer to another structure */
|
||||||
|
amembp = (void **)((char *)st + elm->memb_offset);
|
||||||
|
bmemb = *(const void* const*)((const char*)bptr + elm->memb_offset);
|
||||||
|
} else {
|
||||||
|
amemb = (char *)st + elm->memb_offset;
|
||||||
|
amembp = &amemb;
|
||||||
|
bmemb = (const void*)((const char*)bptr + elm->memb_offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = elm->type->op->copy_struct(elm->type, amembp, bmemb);
|
||||||
|
if(ret != 0) return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
|
@ -51,6 +51,7 @@ asn_struct_print_f SEQUENCE_print;
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
|
|
||||||
asn_struct_compare_f SEQUENCE_compare;
|
asn_struct_compare_f SEQUENCE_compare;
|
||||||
|
asn_struct_copy_f SEQUENCE_copy;
|
||||||
|
|
||||||
asn_constr_check_f SEQUENCE_constraint;
|
asn_constr_check_f SEQUENCE_constraint;
|
||||||
|
|
||||||
|
@ -65,6 +66,7 @@ xer_type_encoder_f SEQUENCE_encode_xer;
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
|
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
jer_type_decoder_f SEQUENCE_decode_jer;
|
||||||
jer_type_encoder_f SEQUENCE_encode_jer;
|
jer_type_encoder_f SEQUENCE_encode_jer;
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ asn_TYPE_operation_t asn_OP_SEQUENCE_OF = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
SEQUENCE_OF_compare,
|
SEQUENCE_OF_compare,
|
||||||
|
SEQUENCE_OF_copy,
|
||||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||||
SEQUENCE_OF_decode_ber,
|
SEQUENCE_OF_decode_ber,
|
||||||
SEQUENCE_OF_encode_der,
|
SEQUENCE_OF_encode_der,
|
||||||
|
@ -30,9 +31,11 @@ asn_TYPE_operation_t asn_OP_SEQUENCE_OF = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
SEQUENCE_OF_decode_jer,
|
||||||
SEQUENCE_OF_encode_jer,
|
SEQUENCE_OF_encode_jer,
|
||||||
#else
|
#else
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||||
SEQUENCE_OF_decode_oer, /* Same as SET OF decoder. */
|
SEQUENCE_OF_decode_oer, /* Same as SET OF decoder. */
|
||||||
|
|
|
@ -23,6 +23,7 @@ extern "C" {
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
|
|
||||||
asn_struct_compare_f SEQUENCE_OF_compare;
|
asn_struct_compare_f SEQUENCE_OF_compare;
|
||||||
|
#define SEQUENCE_OF_copy SET_OF_copy
|
||||||
|
|
||||||
#define SEQUENCE_OF_constraint SET_OF_constraint
|
#define SEQUENCE_OF_constraint SET_OF_constraint
|
||||||
|
|
||||||
|
@ -37,6 +38,7 @@ xer_type_encoder_f SEQUENCE_OF_encode_xer;
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
|
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
#define SEQUENCE_OF_decode_jer SET_OF_decode_jer
|
||||||
jer_type_encoder_f SEQUENCE_OF_encode_jer;
|
jer_type_encoder_f SEQUENCE_OF_encode_jer;
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ asn_TYPE_operation_t asn_OP_SET_OF = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
SET_OF_compare,
|
SET_OF_compare,
|
||||||
|
SET_OF_copy,
|
||||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||||
SET_OF_decode_ber,
|
SET_OF_decode_ber,
|
||||||
SET_OF_encode_der,
|
SET_OF_encode_der,
|
||||||
|
@ -29,9 +30,11 @@ asn_TYPE_operation_t asn_OP_SET_OF = {
|
||||||
0,
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
SET_OF_decode_jer,
|
||||||
SET_OF_encode_jer,
|
SET_OF_encode_jer,
|
||||||
#else
|
#else
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||||
SET_OF_decode_oer,
|
SET_OF_decode_oer,
|
||||||
|
@ -369,3 +372,58 @@ SET_OF_compare(const asn_TYPE_descriptor_t *td, const void *aptr,
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
SET_OF_copy(const asn_TYPE_descriptor_t *td, void **aptr,
|
||||||
|
const void *bptr) {
|
||||||
|
if(!td) return -1;
|
||||||
|
|
||||||
|
const asn_SET_OF_specifics_t *specs =
|
||||||
|
(const asn_SET_OF_specifics_t *)td->specifics;
|
||||||
|
void *st = *aptr;
|
||||||
|
|
||||||
|
if(!bptr) {
|
||||||
|
if(*aptr) {
|
||||||
|
asn_set_empty(_A_SET_FROM_VOID(*aptr));
|
||||||
|
*aptr = 0;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(st == 0) {
|
||||||
|
st = *aptr = CALLOC(1, specs->struct_size);
|
||||||
|
if(st == 0) return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
asn_anonymous_set_ *a = _A_SET_FROM_VOID(*aptr);
|
||||||
|
const asn_anonymous_set_ *b = _A_CSET_FROM_VOID(bptr);
|
||||||
|
|
||||||
|
if(b->size) {
|
||||||
|
void *_new_arr;
|
||||||
|
_new_arr = REALLOC(a->array, b->size * sizeof(b->array[0]));
|
||||||
|
if(_new_arr) {
|
||||||
|
a->array = (void **)_new_arr;
|
||||||
|
a->size = b->size;
|
||||||
|
} else {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
a->count = b->count;
|
||||||
|
|
||||||
|
for(int i = 0; i < b->count; i++) {
|
||||||
|
void *bmemb = b->array[i];
|
||||||
|
if(bmemb) {
|
||||||
|
void *amemb = 0;
|
||||||
|
int ret;
|
||||||
|
ret = td->elements->type->op->copy_struct(
|
||||||
|
td->elements->type,
|
||||||
|
&amemb, bmemb);
|
||||||
|
if(ret != 0) return ret;
|
||||||
|
a->array[i] = amemb;
|
||||||
|
} else {
|
||||||
|
a->array[i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@ asn_struct_print_f SET_OF_print;
|
||||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||||
|
|
||||||
asn_struct_compare_f SET_OF_compare;
|
asn_struct_compare_f SET_OF_compare;
|
||||||
|
asn_struct_copy_f SET_OF_copy;
|
||||||
|
|
||||||
asn_constr_check_f SET_OF_constraint;
|
asn_constr_check_f SET_OF_constraint;
|
||||||
|
|
||||||
|
@ -47,6 +48,7 @@ xer_type_encoder_f SET_OF_encode_xer;
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
|
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
jer_type_decoder_f SET_OF_decode_jer;
|
||||||
jer_type_encoder_f SET_OF_encode_jer;
|
jer_type_encoder_f SET_OF_encode_jer;
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
|
|
||||||
|
|
|
@ -129,13 +129,12 @@ SET_OF_decode_aper(const asn_codec_ctx_t *opt_codec_ctx,
|
||||||
if(value) ct = 0; /* Not restricted! */
|
if(value) ct = 0; /* Not restricted! */
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ct && ct->effective_bits >= 0) {
|
if(ct && ct->upper_bound >= 1 && ct->upper_bound <= 65535
|
||||||
|
&& ct->upper_bound == ct->lower_bound) {
|
||||||
/* X.691, #19.5: No length determinant */
|
/* X.691, #19.5: No length determinant */
|
||||||
nelems = aper_get_nsnnwn(pd, ct->upper_bound - ct->lower_bound + 1);
|
nelems = ct->upper_bound;
|
||||||
ASN_DEBUG("Preparing to fetch %ld+%lld elements from %s",
|
ASN_DEBUG("Preparing to fetch %ld elements from %s",
|
||||||
(long)nelems, (long long int)ct->lower_bound, td->name);
|
(long)nelems, td->name);
|
||||||
if(nelems < 0) ASN__DECODE_STARVED;
|
|
||||||
nelems += ct->lower_bound;
|
|
||||||
} else {
|
} else {
|
||||||
nelems = -1;
|
nelems = -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,26 @@ asn_fprint(FILE *stream, const asn_TYPE_descriptor_t *td,
|
||||||
return fflush(stream);
|
return fflush(stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copy a structuture.
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
asn_copy(const asn_TYPE_descriptor_t *td,
|
||||||
|
void **struct_dst, const void *struct_src) {
|
||||||
|
|
||||||
|
if(!td || !struct_dst || !struct_src) {
|
||||||
|
errno = EINVAL;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!td->op) {
|
||||||
|
errno = ENOSYS;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return td->op->copy_struct(td, struct_dst, struct_src);
|
||||||
|
}
|
||||||
|
|
||||||
/* Dump the data into the specified stdio stream */
|
/* Dump the data into the specified stdio stream */
|
||||||
static int
|
static int
|
||||||
_print2fp(const void *buffer, size_t size, void *app_key) {
|
_print2fp(const void *buffer, size_t size, void *app_key) {
|
||||||
|
|
|
@ -51,8 +51,10 @@ typedef void (xer_type_encoder_f)(void);
|
||||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||||
|
|
||||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||||
|
#include <jer_decoder.h> /* Decoder of JER (JSON, text) */
|
||||||
#include <jer_encoder.h> /* Encoder into JER (JSON, text) */
|
#include <jer_encoder.h> /* Encoder into JER (JSON, text) */
|
||||||
#else
|
#else
|
||||||
|
typedef void (jer_type_decoder_f)(void);
|
||||||
typedef void (jer_type_encoder_f)(void);
|
typedef void (jer_type_encoder_f)(void);
|
||||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||||
|
|
||||||
|
@ -141,6 +143,16 @@ typedef int (asn_struct_compare_f)(
|
||||||
const void *struct_A,
|
const void *struct_A,
|
||||||
const void *struct_B);
|
const void *struct_B);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copies struct B into struct A.
|
||||||
|
* Allocates memory for struct A, if necessary.
|
||||||
|
*/
|
||||||
|
typedef int (asn_struct_copy_f)(
|
||||||
|
const struct asn_TYPE_descriptor_s *type_descriptor,
|
||||||
|
void **struct_A,
|
||||||
|
const void *struct_B
|
||||||
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return the outmost tag of the type.
|
* Return the outmost tag of the type.
|
||||||
* If the type is untagged CHOICE, the dynamic operation is performed.
|
* If the type is untagged CHOICE, the dynamic operation is performed.
|
||||||
|
@ -173,10 +185,12 @@ typedef struct asn_TYPE_operation_s {
|
||||||
asn_struct_free_f *free_struct; /* Free the structure */
|
asn_struct_free_f *free_struct; /* Free the structure */
|
||||||
asn_struct_print_f *print_struct; /* Human readable output */
|
asn_struct_print_f *print_struct; /* Human readable output */
|
||||||
asn_struct_compare_f *compare_struct; /* Compare two structures */
|
asn_struct_compare_f *compare_struct; /* Compare two structures */
|
||||||
|
asn_struct_copy_f *copy_struct; /* Copy method */
|
||||||
ber_type_decoder_f *ber_decoder; /* Generic BER decoder */
|
ber_type_decoder_f *ber_decoder; /* Generic BER decoder */
|
||||||
der_type_encoder_f *der_encoder; /* Canonical DER encoder */
|
der_type_encoder_f *der_encoder; /* Canonical DER encoder */
|
||||||
xer_type_decoder_f *xer_decoder; /* Generic XER decoder */
|
xer_type_decoder_f *xer_decoder; /* Generic XER decoder */
|
||||||
xer_type_encoder_f *xer_encoder; /* [Canonical] XER encoder */
|
xer_type_encoder_f *xer_encoder; /* [Canonical] XER encoder */
|
||||||
|
jer_type_decoder_f *jer_decoder; /* Generic JER encoder */
|
||||||
jer_type_encoder_f *jer_encoder; /* Generic JER encoder */
|
jer_type_encoder_f *jer_encoder; /* Generic JER encoder */
|
||||||
oer_type_decoder_f *oer_decoder; /* Generic OER decoder */
|
oer_type_decoder_f *oer_decoder; /* Generic OER decoder */
|
||||||
oer_type_encoder_f *oer_encoder; /* Canonical OER encoder */
|
oer_type_encoder_f *oer_encoder; /* Canonical OER encoder */
|
||||||
|
@ -288,6 +302,17 @@ int asn_fprint(FILE *stream, /* Destination stream descriptor */
|
||||||
const asn_TYPE_descriptor_t *td, /* ASN.1 type descriptor */
|
const asn_TYPE_descriptor_t *td, /* ASN.1 type descriptor */
|
||||||
const void *struct_ptr); /* Structure to be printed */
|
const void *struct_ptr); /* Structure to be printed */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copies a source structure (struct_src) into destination structure
|
||||||
|
* (struct_dst). Allocates memory for the destination structure, if necessary.
|
||||||
|
* RETURN VALUES:
|
||||||
|
* 0: Copy OK.
|
||||||
|
* -1: Problem copying the structure.
|
||||||
|
*/
|
||||||
|
int asn_copy(const asn_TYPE_descriptor_t *td, /* ASN.1 type descriptor */
|
||||||
|
void **struct_dst, /* Structure to be populated */
|
||||||
|
const void *struct_src); /* Structure to be copied */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -22,6 +22,8 @@ libasn1c_common_sources = files('''
|
||||||
OPEN_TYPE.h
|
OPEN_TYPE.h
|
||||||
OPEN_TYPE.c
|
OPEN_TYPE.c
|
||||||
constr_CHOICE.h
|
constr_CHOICE.h
|
||||||
|
ENUMERATED.h
|
||||||
|
ENUMERATED.c
|
||||||
GraphicString.h
|
GraphicString.h
|
||||||
GraphicString.c
|
GraphicString.c
|
||||||
INTEGER.h
|
INTEGER.h
|
||||||
|
@ -92,6 +94,7 @@ libasn1c_common_sources = files('''
|
||||||
aper_support.c
|
aper_support.c
|
||||||
aper_opentype.c
|
aper_opentype.c
|
||||||
ANY_aper.c
|
ANY_aper.c
|
||||||
|
ENUMERATED_aper.c
|
||||||
INTEGER_aper.c
|
INTEGER_aper.c
|
||||||
NULL_aper.c
|
NULL_aper.c
|
||||||
NativeEnumerated_aper.c
|
NativeEnumerated_aper.c
|
||||||
|
@ -124,26 +127,13 @@ libasn1c_common_sources = files('''
|
||||||
constr_CHOICE_rfill.c
|
constr_CHOICE_rfill.c
|
||||||
constr_SEQUENCE_rfill.c
|
constr_SEQUENCE_rfill.c
|
||||||
constr_SET_OF_rfill.c
|
constr_SET_OF_rfill.c
|
||||||
ANY_jer.c
|
|
||||||
BIT_STRING_jer.c
|
|
||||||
INTEGER_jer.c
|
|
||||||
NULL_jer.c
|
|
||||||
NativeEnumerated_jer.c
|
|
||||||
NativeInteger_jer.c
|
|
||||||
OBJECT_IDENTIFIER_jer.c
|
|
||||||
OCTET_STRING_jer.c
|
|
||||||
jer_encoder.c
|
|
||||||
jer_encoder.h
|
|
||||||
constr_CHOICE_jer.c
|
|
||||||
constr_SEQUENCE_OF_jer.c
|
|
||||||
constr_SEQUENCE_jer.c
|
|
||||||
constr_SET_OF_jer.c
|
|
||||||
'''.split())
|
'''.split())
|
||||||
|
|
||||||
libasn1c_common_cc_flags = ['-DASN_DISABLE_BER_SUPPORT',
|
libasn1c_common_cc_flags = ['-DASN_DISABLE_BER_SUPPORT',
|
||||||
'-DASN_DISABLE_XER_SUPPORT',
|
'-DASN_DISABLE_XER_SUPPORT',
|
||||||
'-DASN_DISABLE_OER_SUPPORT',
|
'-DASN_DISABLE_OER_SUPPORT',
|
||||||
'-DASN_DISABLE_UPER_SUPPORT']
|
'-DASN_DISABLE_UPER_SUPPORT',
|
||||||
|
'-DASN_DISABLE_JER_SUPPORT']
|
||||||
|
|
||||||
#libasn1c_common_cc_flags += cc.get_supported_arguments([
|
#libasn1c_common_cc_flags += cc.get_supported_arguments([
|
||||||
# '-Wno-parentheses-equality',
|
# '-Wno-parentheses-equality',
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-IEs"
|
* From ASN.1 module "NGAP-IEs"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "NGAP_AMF-TNLAssociationSetupItem.h"
|
#include "NGAP_AMF-TNLAssociationSetupItem.h"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-IEs"
|
* From ASN.1 module "NGAP-IEs"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _NGAP_AMF_TNLAssociationSetupItem_H_
|
#ifndef _NGAP_AMF_TNLAssociationSetupItem_H_
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-IEs"
|
* From ASN.1 module "NGAP-IEs"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "NGAP_AMF-TNLAssociationSetupList.h"
|
#include "NGAP_AMF-TNLAssociationSetupList.h"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-IEs"
|
* From ASN.1 module "NGAP-IEs"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _NGAP_AMF_TNLAssociationSetupList_H_
|
#ifndef _NGAP_AMF_TNLAssociationSetupList_H_
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-IEs"
|
* From ASN.1 module "NGAP-IEs"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "NGAP_AMF-TNLAssociationToAddItem.h"
|
#include "NGAP_AMF-TNLAssociationToAddItem.h"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-IEs"
|
* From ASN.1 module "NGAP-IEs"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _NGAP_AMF_TNLAssociationToAddItem_H_
|
#ifndef _NGAP_AMF_TNLAssociationToAddItem_H_
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-IEs"
|
* From ASN.1 module "NGAP-IEs"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "NGAP_AMF-TNLAssociationToAddList.h"
|
#include "NGAP_AMF-TNLAssociationToAddList.h"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-IEs"
|
* From ASN.1 module "NGAP-IEs"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _NGAP_AMF_TNLAssociationToAddList_H_
|
#ifndef _NGAP_AMF_TNLAssociationToAddList_H_
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-IEs"
|
* From ASN.1 module "NGAP-IEs"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "NGAP_AMF-TNLAssociationToRemoveItem.h"
|
#include "NGAP_AMF-TNLAssociationToRemoveItem.h"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-IEs"
|
* From ASN.1 module "NGAP-IEs"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _NGAP_AMF_TNLAssociationToRemoveItem_H_
|
#ifndef _NGAP_AMF_TNLAssociationToRemoveItem_H_
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-IEs"
|
* From ASN.1 module "NGAP-IEs"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "NGAP_AMF-TNLAssociationToRemoveList.h"
|
#include "NGAP_AMF-TNLAssociationToRemoveList.h"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-IEs"
|
* From ASN.1 module "NGAP-IEs"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _NGAP_AMF_TNLAssociationToRemoveList_H_
|
#ifndef _NGAP_AMF_TNLAssociationToRemoveList_H_
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-IEs"
|
* From ASN.1 module "NGAP-IEs"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "NGAP_AMF-TNLAssociationToUpdateItem.h"
|
#include "NGAP_AMF-TNLAssociationToUpdateItem.h"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-IEs"
|
* From ASN.1 module "NGAP-IEs"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _NGAP_AMF_TNLAssociationToUpdateItem_H_
|
#ifndef _NGAP_AMF_TNLAssociationToUpdateItem_H_
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-IEs"
|
* From ASN.1 module "NGAP-IEs"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "NGAP_AMF-TNLAssociationToUpdateList.h"
|
#include "NGAP_AMF-TNLAssociationToUpdateList.h"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-IEs"
|
* From ASN.1 module "NGAP-IEs"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _NGAP_AMF_TNLAssociationToUpdateList_H_
|
#ifndef _NGAP_AMF_TNLAssociationToUpdateList_H_
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-IEs"
|
* From ASN.1 module "NGAP-IEs"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "NGAP_AMF-UE-NGAP-ID.h"
|
#include "NGAP_AMF-UE-NGAP-ID.h"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-IEs"
|
* From ASN.1 module "NGAP-IEs"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _NGAP_AMF_UE_NGAP_ID_H_
|
#ifndef _NGAP_AMF_UE_NGAP_ID_H_
|
||||||
|
@ -27,7 +27,6 @@ extern asn_TYPE_descriptor_t asn_DEF_NGAP_AMF_UE_NGAP_ID;
|
||||||
asn_struct_free_f NGAP_AMF_UE_NGAP_ID_free;
|
asn_struct_free_f NGAP_AMF_UE_NGAP_ID_free;
|
||||||
asn_struct_print_f NGAP_AMF_UE_NGAP_ID_print;
|
asn_struct_print_f NGAP_AMF_UE_NGAP_ID_print;
|
||||||
asn_constr_check_f NGAP_AMF_UE_NGAP_ID_constraint;
|
asn_constr_check_f NGAP_AMF_UE_NGAP_ID_constraint;
|
||||||
jer_type_encoder_f NGAP_AMF_UE_NGAP_ID_encode_jer;
|
|
||||||
per_type_decoder_f NGAP_AMF_UE_NGAP_ID_decode_aper;
|
per_type_decoder_f NGAP_AMF_UE_NGAP_ID_decode_aper;
|
||||||
per_type_encoder_f NGAP_AMF_UE_NGAP_ID_encode_aper;
|
per_type_encoder_f NGAP_AMF_UE_NGAP_ID_encode_aper;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-PDU-Contents"
|
* From ASN.1 module "NGAP-PDU-Contents"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "NGAP_AMFCPRelocationIndication.h"
|
#include "NGAP_AMFCPRelocationIndication.h"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-PDU-Contents"
|
* From ASN.1 module "NGAP-PDU-Contents"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _NGAP_AMFCPRelocationIndication_H_
|
#ifndef _NGAP_AMFCPRelocationIndication_H_
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-PDU-Contents"
|
* From ASN.1 module "NGAP-PDU-Contents"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "NGAP_AMFConfigurationUpdate.h"
|
#include "NGAP_AMFConfigurationUpdate.h"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-PDU-Contents"
|
* From ASN.1 module "NGAP-PDU-Contents"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _NGAP_AMFConfigurationUpdate_H_
|
#ifndef _NGAP_AMFConfigurationUpdate_H_
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-PDU-Contents"
|
* From ASN.1 module "NGAP-PDU-Contents"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "NGAP_AMFConfigurationUpdateAcknowledge.h"
|
#include "NGAP_AMFConfigurationUpdateAcknowledge.h"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-PDU-Contents"
|
* From ASN.1 module "NGAP-PDU-Contents"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _NGAP_AMFConfigurationUpdateAcknowledge_H_
|
#ifndef _NGAP_AMFConfigurationUpdateAcknowledge_H_
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-PDU-Contents"
|
* From ASN.1 module "NGAP-PDU-Contents"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "NGAP_AMFConfigurationUpdateFailure.h"
|
#include "NGAP_AMFConfigurationUpdateFailure.h"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-PDU-Contents"
|
* From ASN.1 module "NGAP-PDU-Contents"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _NGAP_AMFConfigurationUpdateFailure_H_
|
#ifndef _NGAP_AMFConfigurationUpdateFailure_H_
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-IEs"
|
* From ASN.1 module "NGAP-IEs"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "NGAP_AMFName.h"
|
#include "NGAP_AMFName.h"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-IEs"
|
* From ASN.1 module "NGAP-IEs"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _NGAP_AMFName_H_
|
#ifndef _NGAP_AMFName_H_
|
||||||
|
@ -27,7 +27,6 @@ extern asn_TYPE_descriptor_t asn_DEF_NGAP_AMFName;
|
||||||
asn_struct_free_f NGAP_AMFName_free;
|
asn_struct_free_f NGAP_AMFName_free;
|
||||||
asn_struct_print_f NGAP_AMFName_print;
|
asn_struct_print_f NGAP_AMFName_print;
|
||||||
asn_constr_check_f NGAP_AMFName_constraint;
|
asn_constr_check_f NGAP_AMFName_constraint;
|
||||||
jer_type_encoder_f NGAP_AMFName_encode_jer;
|
|
||||||
per_type_decoder_f NGAP_AMFName_decode_aper;
|
per_type_decoder_f NGAP_AMFName_decode_aper;
|
||||||
per_type_encoder_f NGAP_AMFName_encode_aper;
|
per_type_encoder_f NGAP_AMFName_encode_aper;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-IEs"
|
* From ASN.1 module "NGAP-IEs"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "NGAP_AMFNameUTF8String.h"
|
#include "NGAP_AMFNameUTF8String.h"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-IEs"
|
* From ASN.1 module "NGAP-IEs"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _NGAP_AMFNameUTF8String_H_
|
#ifndef _NGAP_AMFNameUTF8String_H_
|
||||||
|
@ -27,7 +27,6 @@ extern asn_TYPE_descriptor_t asn_DEF_NGAP_AMFNameUTF8String;
|
||||||
asn_struct_free_f NGAP_AMFNameUTF8String_free;
|
asn_struct_free_f NGAP_AMFNameUTF8String_free;
|
||||||
asn_struct_print_f NGAP_AMFNameUTF8String_print;
|
asn_struct_print_f NGAP_AMFNameUTF8String_print;
|
||||||
asn_constr_check_f NGAP_AMFNameUTF8String_constraint;
|
asn_constr_check_f NGAP_AMFNameUTF8String_constraint;
|
||||||
jer_type_encoder_f NGAP_AMFNameUTF8String_encode_jer;
|
|
||||||
per_type_decoder_f NGAP_AMFNameUTF8String_decode_aper;
|
per_type_decoder_f NGAP_AMFNameUTF8String_decode_aper;
|
||||||
per_type_encoder_f NGAP_AMFNameUTF8String_encode_aper;
|
per_type_encoder_f NGAP_AMFNameUTF8String_encode_aper;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-IEs"
|
* From ASN.1 module "NGAP-IEs"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "NGAP_AMFNameVisibleString.h"
|
#include "NGAP_AMFNameVisibleString.h"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-IEs"
|
* From ASN.1 module "NGAP-IEs"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _NGAP_AMFNameVisibleString_H_
|
#ifndef _NGAP_AMFNameVisibleString_H_
|
||||||
|
@ -27,7 +27,6 @@ extern asn_TYPE_descriptor_t asn_DEF_NGAP_AMFNameVisibleString;
|
||||||
asn_struct_free_f NGAP_AMFNameVisibleString_free;
|
asn_struct_free_f NGAP_AMFNameVisibleString_free;
|
||||||
asn_struct_print_f NGAP_AMFNameVisibleString_print;
|
asn_struct_print_f NGAP_AMFNameVisibleString_print;
|
||||||
asn_constr_check_f NGAP_AMFNameVisibleString_constraint;
|
asn_constr_check_f NGAP_AMFNameVisibleString_constraint;
|
||||||
jer_type_encoder_f NGAP_AMFNameVisibleString_encode_jer;
|
|
||||||
per_type_decoder_f NGAP_AMFNameVisibleString_decode_aper;
|
per_type_decoder_f NGAP_AMFNameVisibleString_decode_aper;
|
||||||
per_type_encoder_f NGAP_AMFNameVisibleString_encode_aper;
|
per_type_encoder_f NGAP_AMFNameVisibleString_encode_aper;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-IEs"
|
* From ASN.1 module "NGAP-IEs"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "NGAP_AMFPagingTarget.h"
|
#include "NGAP_AMFPagingTarget.h"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-IEs"
|
* From ASN.1 module "NGAP-IEs"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _NGAP_AMFPagingTarget_H_
|
#ifndef _NGAP_AMFPagingTarget_H_
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-IEs"
|
* From ASN.1 module "NGAP-IEs"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "NGAP_AMFPointer.h"
|
#include "NGAP_AMFPointer.h"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
|
||||||
* From ASN.1 module "NGAP-IEs"
|
* From ASN.1 module "NGAP-IEs"
|
||||||
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
* found in "../support/ngap-r17.3.0/38413-h30.asn"
|
||||||
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
|
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER -no-gen-JER`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _NGAP_AMFPointer_H_
|
#ifndef _NGAP_AMFPointer_H_
|
||||||
|
@ -27,7 +27,6 @@ extern asn_TYPE_descriptor_t asn_DEF_NGAP_AMFPointer;
|
||||||
asn_struct_free_f NGAP_AMFPointer_free;
|
asn_struct_free_f NGAP_AMFPointer_free;
|
||||||
asn_struct_print_f NGAP_AMFPointer_print;
|
asn_struct_print_f NGAP_AMFPointer_print;
|
||||||
asn_constr_check_f NGAP_AMFPointer_constraint;
|
asn_constr_check_f NGAP_AMFPointer_constraint;
|
||||||
jer_type_encoder_f NGAP_AMFPointer_encode_jer;
|
|
||||||
per_type_decoder_f NGAP_AMFPointer_decode_aper;
|
per_type_decoder_f NGAP_AMFPointer_decode_aper;
|
||||||
per_type_encoder_f NGAP_AMFPointer_encode_aper;
|
per_type_encoder_f NGAP_AMFPointer_encode_aper;
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue