mirror of https://gerrit.osmocom.org/asn1c
*** empty log message ***
git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@1116 59561ff5-6e30-0410-9f3c-9617f08c8826
This commit is contained in:
parent
ffc852398f
commit
af68ef5391
|
@ -0,0 +1,219 @@
|
|||
#undef NDEBUG
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <T.h>
|
||||
|
||||
|
||||
uint8_t buf1[] = {
|
||||
32 | (2 << 6), /* [0], constructed */
|
||||
25, /* L */
|
||||
|
||||
/* string [0] IMPLICIT UTF8String, */
|
||||
(2 << 6), /* [0] */
|
||||
16, /* L */
|
||||
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
|
||||
|
||||
/* beta [2] IMPLICIT INTEGER OPTIONAL */
|
||||
(2 << 6) + 2, /* [2] */
|
||||
5, /* L */
|
||||
0,
|
||||
75,
|
||||
0x4b,
|
||||
75,
|
||||
75,
|
||||
};
|
||||
|
||||
uint8_t buf1_reconstr[] = {
|
||||
32 | (2 << 6), /* [0], constructed */
|
||||
24, /* L */
|
||||
|
||||
/* string [0] IMPLICIT UTF8String, */
|
||||
(2 << 6), /* [0] */
|
||||
16, /* L */
|
||||
'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z',
|
||||
|
||||
/* beta [2] IMPLICIT INTEGER OPTIONAL */
|
||||
(2 << 6) + 2, /* [2] */
|
||||
4, /* L */
|
||||
75,
|
||||
75,
|
||||
75,
|
||||
0x4b,
|
||||
};
|
||||
|
||||
|
||||
static void
|
||||
check(T_t *tp, uint8_t *buf, int size, size_t consumed) {
|
||||
asn_dec_rval_t rval;
|
||||
|
||||
tp = memset(tp, 0, sizeof(*tp));
|
||||
|
||||
fprintf(stderr, "Buf %p (%d)\n", buf, size);
|
||||
rval = ber_decode(0, &asn_DEF_T, (void **)&tp, buf, size);
|
||||
fprintf(stderr, "Returned code %d, consumed %d\n",
|
||||
(int)rval.code, (int)rval.consumed);
|
||||
|
||||
assert(rval.code == RC_OK);
|
||||
assert(rval.consumed == consumed);
|
||||
|
||||
assert(tp->choice.seq.string.size == 16);
|
||||
assert(strcmp(tp->choice.seq.string.buf, "zzzzzzzzzzzzzzzz") == 0);
|
||||
assert(tp->choice.seq.alpha == NULL);
|
||||
assert(tp->choice.seq.beta);
|
||||
assert(*tp->choice.seq.beta == 0x4b4b4b4b);
|
||||
}
|
||||
|
||||
size_t buf_pos;
|
||||
size_t buf_size;
|
||||
uint8_t *buf;
|
||||
|
||||
static int
|
||||
buf_fill(const void *buffer, size_t size, void *app_key) {
|
||||
|
||||
(void)app_key; /* Unused argument */
|
||||
|
||||
if(buf_pos + size > buf_size) {
|
||||
fprintf(stderr, "%d + %d > %d\n",
|
||||
(int)buf_pos, (int)size, (int)buf_size);
|
||||
return -1;
|
||||
}
|
||||
|
||||
memcpy(buf + buf_pos, buffer, size);
|
||||
buf_pos += size;
|
||||
fprintf(stderr, " written %d (%d)\n", (int)size, (int)buf_pos);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
compare(T_t *tp, uint8_t *cmp_buf, int cmp_buf_size) {
|
||||
asn_enc_rval_t erval;
|
||||
int i;
|
||||
|
||||
buf_size = cmp_buf_size + 100;
|
||||
buf = alloca(buf_size);
|
||||
buf_pos = 0;
|
||||
|
||||
/*
|
||||
* Try to re-create using DER encoding.
|
||||
*/
|
||||
erval = der_encode(&asn_DEF_T, tp, buf_fill, 0);
|
||||
assert(erval.encoded != -1);
|
||||
if(erval.encoded != cmp_buf_size) {
|
||||
printf("%d != %d\n", erval.encoded, cmp_buf_size);
|
||||
}
|
||||
assert(erval.encoded == cmp_buf_size);
|
||||
for(i = 0; i < cmp_buf_size; i++) {
|
||||
if(buf[i] != cmp_buf[i]) {
|
||||
fprintf(stderr, "Recreated buffer content mismatch:\n");
|
||||
fprintf(stderr, "Byte %d, %x != %x (%d != %d)\n",
|
||||
i,
|
||||
buf[i], cmp_buf[i],
|
||||
buf[i], cmp_buf[i]
|
||||
);
|
||||
}
|
||||
assert(buf[i] == cmp_buf[i]);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
partial_read(uint8_t *buf_0, size_t size) {
|
||||
T_t t, *tp;
|
||||
asn_dec_rval_t rval;
|
||||
size_t i1, i2;
|
||||
uint8_t *buf_1 = alloca(size);
|
||||
uint8_t *buf_2 = alloca(size);
|
||||
uint8_t *buf_3 = alloca(size);
|
||||
|
||||
fprintf(stderr, "\nPartial read sequence...\n");
|
||||
|
||||
/*
|
||||
* Divide the space (size) into three blocks in various combinations:
|
||||
* |<----->i1<----->i2<----->|
|
||||
* ^ buf_0 ^ buf_0+size
|
||||
* Try to read block by block.
|
||||
*/
|
||||
for(i1 = 0; i1 < size; i1++) {
|
||||
for(i2 = i1; i2 < size; i2++) {
|
||||
uint8_t *chunk1 = buf_0;
|
||||
size_t size1 = i1;
|
||||
uint8_t *chunk2 = buf_0 + size1;
|
||||
size_t size2 = i2 - i1;
|
||||
uint8_t *chunk3 = buf_0 + size1 + size2;
|
||||
size_t size3 = size - size1 - size2;
|
||||
|
||||
fprintf(stderr, "\n%d:{%d, %d, %d}...\n",
|
||||
(int)size, (int)size1, (int)size2, (int)size3);
|
||||
|
||||
memset(buf_1, 0, size);
|
||||
memset(buf_2, 0, size);
|
||||
memset(buf_3, 0, size);
|
||||
memcpy(buf_1, chunk1, size1);
|
||||
memcpy(buf_2, chunk2, size2);
|
||||
memcpy(buf_3, chunk3, size3);
|
||||
|
||||
tp = memset(&t, 0, sizeof(t));
|
||||
|
||||
fprintf(stderr, "=> Chunk 1 (%d):\n", (int)size1);
|
||||
rval = ber_decode(0, &asn_DEF_T, (void **)&tp,
|
||||
buf_1, size1);
|
||||
assert(rval.code == RC_WMORE);
|
||||
assert(rval.consumed <= size1);
|
||||
if(rval.consumed < size1) {
|
||||
int leftover = size1 - rval.consumed;
|
||||
memcpy(buf_2, buf_1 + rval.consumed, leftover);
|
||||
memcpy(buf_2 + leftover, chunk2, size2);
|
||||
size2 += leftover;
|
||||
}
|
||||
|
||||
fprintf(stderr, "=> Chunk 2 (%d):\n", (int)size2);
|
||||
rval = ber_decode(0, &asn_DEF_T, (void **)&tp,
|
||||
buf_2, size2);
|
||||
assert(rval.code == RC_WMORE);
|
||||
assert(rval.consumed <= size2);
|
||||
if(rval.consumed < size2) {
|
||||
int leftover = size2 - rval.consumed;
|
||||
memcpy(buf_3, buf_2 + rval.consumed, leftover);
|
||||
memcpy(buf_3 + leftover, chunk3, size3);
|
||||
size3 += leftover;
|
||||
}
|
||||
|
||||
fprintf(stderr, "=> Chunk 3 (%d):\n", (int)size3);
|
||||
rval = ber_decode(0, &asn_DEF_T, (void **)&tp,
|
||||
buf_3, size3);
|
||||
assert(rval.code == RC_OK);
|
||||
assert(rval.consumed == size3);
|
||||
|
||||
asn_DEF_T.free_struct(&asn_DEF_T, &t, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
main(int ac, char **av) {
|
||||
T_t t;
|
||||
|
||||
(void)ac; /* Unused argument */
|
||||
(void)av; /* Unused argument */
|
||||
|
||||
/* Check exact buf1 */
|
||||
check(&t, buf1, sizeof(buf1), sizeof(buf1));
|
||||
compare(&t, buf1_reconstr, sizeof(buf1_reconstr));
|
||||
asn_fprint(stderr, &asn_DEF_T, &t);
|
||||
asn_DEF_T.free_struct(&asn_DEF_T, &t, 1);
|
||||
|
||||
/* Check slightly more than buf1 */
|
||||
check(&t, buf1, sizeof(buf1) + 10, sizeof(buf1));
|
||||
compare(&t, buf1_reconstr, sizeof(buf1_reconstr));
|
||||
asn_fprint(stderr, &asn_DEF_T, &t);
|
||||
asn_DEF_T.free_struct(&asn_DEF_T, &t, 1);
|
||||
|
||||
/* Split the buffer in parts and check decoder restartability */
|
||||
partial_read(buf1, sizeof(buf1));
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,142 @@
|
|||
#undef NDEBUG
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <LogLine.h>
|
||||
|
||||
uint8_t buf0[] = {
|
||||
48, /* LogLine SEQUENCE */
|
||||
24, /* L */
|
||||
22, /* IA5String */
|
||||
4, /* L */
|
||||
/* "zzz\007" */
|
||||
122, 122, 122, 7,
|
||||
48, /* varsets SEQUENCE OF VariablePartSet */
|
||||
16, /* L */
|
||||
48, /* VariablePart */
|
||||
14, /* L */
|
||||
48, /* vparts SEQUENCE OF VariablePart */
|
||||
7, /* L */
|
||||
49, /* VariablePart */
|
||||
5,
|
||||
26, /* VisibleString */
|
||||
3,
|
||||
49, 50, 51, /* 1 2 3 */
|
||||
48, /* ActionItem SEQUENCE */
|
||||
3, /* L */
|
||||
10, /* accept-as ENUMERATED */
|
||||
1, /* L */
|
||||
0,
|
||||
};
|
||||
|
||||
uint8_t buf1[] = {
|
||||
48, /* LogLine SEQUENCE */
|
||||
19, /* L */
|
||||
22, /* IA5String */
|
||||
6, /* L */
|
||||
/* "static" */
|
||||
115, 116, 97, 116, 105, 99,
|
||||
48, /* varsets SEQUENCE OF VariablePartSet */
|
||||
9, /* L */
|
||||
48, /* VariablePart */
|
||||
7, /* L */
|
||||
48, /* vparts SEQUENCE OF VariablePart */
|
||||
0, /* L */
|
||||
48, /* ActionItem SEQUENCE */
|
||||
3, /* L */
|
||||
10, /* accept-as ENUMERATED */
|
||||
1, /* L */
|
||||
0,
|
||||
};
|
||||
|
||||
static void
|
||||
check(LogLine_t *tp, uint8_t *ptr, int size, size_t consumed) {
|
||||
asn_dec_rval_t rval;
|
||||
|
||||
tp = memset(tp, 0, sizeof(*tp));
|
||||
|
||||
fprintf(stderr, "Buf %p (%d)\n", ptr, size);
|
||||
rval = ber_decode(0, &asn_DEF_LogLine, (void **)&tp, ptr, size);
|
||||
fprintf(stderr, "Returned code %d, consumed %d\n",
|
||||
(int)rval.code, (int)rval.consumed);
|
||||
|
||||
assert(rval.code == RC_OK);
|
||||
assert(rval.consumed == consumed);
|
||||
asn_fprint(stderr, &asn_DEF_LogLine, tp);
|
||||
asn_DEF_LogLine.free_struct(&asn_DEF_LogLine, tp, 1);
|
||||
}
|
||||
|
||||
uint8_t *buf;
|
||||
uint8_t buf_size;
|
||||
uint8_t buf_pos;
|
||||
|
||||
|
||||
static int
|
||||
buf_fill(const void *buffer, size_t size, void *app_key) {
|
||||
|
||||
(void)app_key; /* Unused argument */
|
||||
|
||||
assert(buf_pos + size <= buf_size);
|
||||
|
||||
memcpy(buf + buf_pos, buffer, size);
|
||||
buf_pos += size;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
check_serialize() {
|
||||
LogLine_t ll;
|
||||
VariablePartSet_t vps;
|
||||
VariablePart_t vp;
|
||||
VisibleString_t vpart;
|
||||
asn_enc_rval_t erval;
|
||||
int i;
|
||||
|
||||
memset(&ll, 0, sizeof(ll));
|
||||
memset(&vps, 0, sizeof(vps));
|
||||
memset(&vp, 0, sizeof(vp));
|
||||
memset(&vpart, 0, sizeof(vpart));
|
||||
vpart.buf = "123";
|
||||
vpart.size = 3;
|
||||
|
||||
vp.present = VariablePart_PR_vset;
|
||||
ASN_SET_ADD(&vp.choice.vset, &vpart);
|
||||
vps.resolution.accept_as = accept_as_unknown;
|
||||
ASN_SEQUENCE_ADD(&vps.vparts, &vp);
|
||||
ASN_SEQUENCE_ADD(&ll.varsets, &vps);
|
||||
ll.line_digest.buf = "zzz\007";
|
||||
ll.line_digest.size = 4;
|
||||
|
||||
asn_fprint(stderr, &asn_DEF_LogLine, &ll);
|
||||
buf_size = 128;
|
||||
buf = alloca(buf_size);
|
||||
erval = der_encode(&asn_DEF_LogLine, &ll, buf_fill, 0);
|
||||
assert(erval.encoded > 1);
|
||||
fprintf(stderr, "Encoded in %d bytes\n", erval.encoded);
|
||||
fprintf(stderr, "\n");
|
||||
for(i = 0; i < buf_pos; i++) {
|
||||
fprintf(stderr, "%d ", buf[i]);
|
||||
}
|
||||
fprintf(stderr, "\n\n");
|
||||
assert(erval.encoded == sizeof(buf0));
|
||||
assert(memcmp(buf0, buf, sizeof(buf0)) == 0);
|
||||
}
|
||||
|
||||
int
|
||||
main(int ac, char **av) {
|
||||
LogLine_t t;
|
||||
|
||||
(void)ac; /* Unused argument */
|
||||
(void)av; /* Unused argument */
|
||||
|
||||
check_serialize();
|
||||
|
||||
check(&t, buf0, sizeof(buf0), sizeof(buf0));
|
||||
check(&t, buf1, sizeof(buf1), sizeof(buf1));
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,203 @@
|
|||
#undef NDEBUG
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <T1.h>
|
||||
#include <T2.h>
|
||||
|
||||
static unsigned char buf[4096];
|
||||
static int buf_offset;
|
||||
|
||||
static int
|
||||
_buf_writer(const void *buffer, size_t size, void *app_key) {
|
||||
unsigned char *b, *bend;
|
||||
(void)app_key;
|
||||
assert(buf_offset + size < sizeof(buf));
|
||||
memcpy(buf + buf_offset, buffer, size);
|
||||
b = buf + buf_offset;
|
||||
bend = b + size;
|
||||
printf("=> [");
|
||||
for(; b < bend; b++)
|
||||
printf(" %02X", *b);
|
||||
printf("]:%ld\n", (long)size);
|
||||
buf_offset += size;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
save_object(void *bs, asn_TYPE_descriptor_t *td) {
|
||||
asn_enc_rval_t rval; /* Return value */
|
||||
int i;
|
||||
|
||||
buf_offset = 0;
|
||||
|
||||
rval = der_encode(td, bs, _buf_writer, 0);
|
||||
if (rval.encoded == -1) {
|
||||
fprintf(stderr,
|
||||
"Cannot encode %s: %s\n",
|
||||
rval.failed_type->name, strerror(errno));
|
||||
assert(rval.encoded != -1);
|
||||
return -1; /* JIC */
|
||||
}
|
||||
|
||||
buf[buf_offset++] = 0xab; /* Finalize with garbage */
|
||||
|
||||
asn_fprint(stderr, td, bs);
|
||||
|
||||
printf("OUT: [");
|
||||
for(i = 0; i < buf_offset; i++)
|
||||
printf(" %02x", buf[i]);
|
||||
printf("]\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
load_object(void *bs, asn_TYPE_descriptor_t *td) {
|
||||
asn_dec_rval_t rval;
|
||||
|
||||
fprintf(stderr, "\nLOADING OBJECT OF SIZE %d\n", buf_offset);
|
||||
|
||||
rval = ber_decode(0, td, (void **)&bs, buf, buf_offset);
|
||||
assert(rval.code == RC_OK);
|
||||
|
||||
asn_fprint(stderr, td, bs);
|
||||
|
||||
return (rval.code == RC_OK)?0:-1;
|
||||
}
|
||||
|
||||
/* [3] IMPLICIT SEQUENCE { b BOOLEAN } */
|
||||
uint8_t test_any_buf1[] = { 0xa3, 0x80, /* [3], constructed, indefinite */
|
||||
0x01, 0x01, 0xff, /* b BOOLEAN ::= TRUE */
|
||||
0x00, 0x00 /* End of content octets */ };
|
||||
|
||||
/* b BOOLEAN */
|
||||
uint8_t test_any_buf2[] = { 0x01, 0x01, 0x13 };
|
||||
|
||||
int
|
||||
main() {
|
||||
asn_TYPE_descriptor_t *td1 = &asn_DEF_T1;
|
||||
asn_TYPE_descriptor_t *td2 = &asn_DEF_T2;
|
||||
T1_t t1, t1_new;
|
||||
T2_t t2, t2_new;
|
||||
int ret;
|
||||
|
||||
/*
|
||||
* Test the T1 with constructed indefinite length ANY encoding.
|
||||
*/
|
||||
memset(&t1, 0, sizeof(t1));
|
||||
memset(&t1_new, 0, sizeof(t1_new));
|
||||
|
||||
t1.i = 112233;
|
||||
t1.any.buf = test_any_buf1;
|
||||
t1.any.size = sizeof(test_any_buf1);
|
||||
|
||||
/* Save->Load must succeed */
|
||||
save_object(&t1, td1);
|
||||
ret = load_object(&t1_new, td1);
|
||||
|
||||
assert(ret == 0);
|
||||
assert(t1_new.i == 112233);
|
||||
assert(t1_new.any.size == sizeof(test_any_buf1));
|
||||
assert(memcmp(t1_new.any.buf, test_any_buf1, sizeof(test_any_buf1)) == 0);
|
||||
|
||||
/*
|
||||
* Test the T1 with primitive encoding.
|
||||
*/
|
||||
memset(&t1, 0, sizeof(t1));
|
||||
memset(&t1_new, 0, sizeof(t1_new));
|
||||
|
||||
t1.i = -112233;
|
||||
t1.any.buf = test_any_buf2;
|
||||
t1.any.size = sizeof(test_any_buf2);
|
||||
|
||||
/* Save->Load must succeed */
|
||||
save_object(&t1, td1);
|
||||
ret = load_object(&t1_new, td1);
|
||||
|
||||
assert(ret == 0);
|
||||
assert(t1_new.i == -112233);
|
||||
assert(t1_new.any.size == sizeof(test_any_buf2));
|
||||
assert(memcmp(t1_new.any.buf, test_any_buf2, sizeof(test_any_buf2)) == 0);
|
||||
|
||||
/*
|
||||
* Test the T2 empty sequence.
|
||||
*/
|
||||
memset(&t2, 0, sizeof(t2));
|
||||
memset(&t2_new, 0, sizeof(t2_new));
|
||||
|
||||
t2.i = 332211;
|
||||
t2.any = calloc(1, sizeof(*t2.any));
|
||||
t2.any->buf = 0;
|
||||
t2.any->size = 0;
|
||||
|
||||
/* Save->Load must succeed */
|
||||
save_object(&t2, td2);
|
||||
ret = load_object(&t2_new, td2);
|
||||
|
||||
assert(ret == 0);
|
||||
assert(t2_new.i == 332211);
|
||||
assert(t2_new.any->size == 0);
|
||||
|
||||
/*
|
||||
* Test the T2 sequence.
|
||||
*/
|
||||
memset(&t2, 0, sizeof(t2));
|
||||
memset(&t2_new, 0, sizeof(t2_new));
|
||||
|
||||
t2.i = 332211;
|
||||
t2.any = calloc(1, sizeof(*t2.any));
|
||||
t2.any->buf = test_any_buf1;
|
||||
t2.any->size = sizeof(test_any_buf1);
|
||||
|
||||
/* Save->Load must succeed */
|
||||
save_object(&t2, td2);
|
||||
ret = load_object(&t2_new, td2);
|
||||
|
||||
assert(ret == 0);
|
||||
assert(t2_new.i == 332211);
|
||||
assert(t2_new.any->size == sizeof(test_any_buf1));
|
||||
assert(memcmp(t2_new.any->buf, test_any_buf1, sizeof(test_any_buf1)) == 0);
|
||||
|
||||
/*
|
||||
* Test the T2 sequence with primitive encoding.
|
||||
*/
|
||||
memset(&t2, 0, sizeof(t2));
|
||||
memset(&t2_new, 0, sizeof(t2_new));
|
||||
|
||||
t2.i = 0;
|
||||
t2.any = calloc(1, sizeof(*t2.any));
|
||||
t2.any->buf = test_any_buf2;
|
||||
t2.any->size = sizeof(test_any_buf2);
|
||||
|
||||
/* Save->Load must succeed */
|
||||
save_object(&t2, td2);
|
||||
ret = load_object(&t2_new, td2);
|
||||
|
||||
assert(ret == 0);
|
||||
assert(t2_new.i == 0);
|
||||
assert(t2_new.any->size == sizeof(test_any_buf2));
|
||||
assert(memcmp(t2_new.any->buf, test_any_buf2, sizeof(test_any_buf2)) == 0);
|
||||
|
||||
/*
|
||||
* Test T2 with ANY element omitted.
|
||||
*/
|
||||
free(t2.any);
|
||||
t2.any = 0;
|
||||
memset(&t2_new, 0, sizeof(t2_new));
|
||||
|
||||
save_object(&t2, td2);
|
||||
ret = load_object(&t2_new, td2);
|
||||
|
||||
assert(ret == 0);
|
||||
assert(t2_new.i == 0);
|
||||
assert(t2_new.any == 0);
|
||||
|
||||
printf("OK\n");
|
||||
|
||||
return ret;
|
||||
}
|
|
@ -1176,7 +1176,7 @@ asn1c_lang_C_type_SIMPLE_TYPE(arg_t *arg) {
|
|||
if(HIDE_INNER_DEFS) OUT("_%d", expr->_type_unique_index);
|
||||
OUT("_constraint(asn_TYPE_descriptor_t *td, const void *sptr,\n");
|
||||
INDENT(+1);
|
||||
OUT("\t\tasn_app_consume_bytes_f *app_errlog, void *app_key) {");
|
||||
OUT("\t\tasn_app_constraint_failed_f *ctfailcb, void *app_key) {");
|
||||
OUT("\n");
|
||||
if(asn1c_emit_constraint_checking_code(arg) == 1) {
|
||||
OUT("/* Replace with underlying type checker */\n");
|
||||
|
@ -1184,7 +1184,7 @@ asn1c_lang_C_type_SIMPLE_TYPE(arg_t *arg) {
|
|||
"= asn_DEF_%s.check_constraints;\n",
|
||||
asn1c_type_name(arg, expr, TNF_SAFE));
|
||||
OUT("return td->check_constraints"
|
||||
"(td, sptr, app_errlog, app_key);\n");
|
||||
"(td, sptr, ctfailcb, app_key);\n");
|
||||
}
|
||||
INDENT(-1);
|
||||
OUT("}\n");
|
||||
|
@ -2127,12 +2127,12 @@ emit_member_table(arg_t *arg, asn1p_expr_t *expr) {
|
|||
OUT("static int\n");
|
||||
OUT("memb_%s_constraint_%d(asn_TYPE_descriptor_t *td, const void *sptr,\n", p, arg->expr->_type_unique_index);
|
||||
INDENT(+1);
|
||||
OUT("\t\tasn_app_consume_bytes_f *app_errlog, void *app_key) {\n");
|
||||
OUT("\t\tasn_app_constraint_failed_f *ctfailcb, void *app_key) {\n");
|
||||
tmp_arg = *arg;
|
||||
tmp_arg.expr = expr;
|
||||
if(asn1c_emit_constraint_checking_code(&tmp_arg) == 1) {
|
||||
OUT("return td->check_constraints"
|
||||
"(td, sptr, app_errlog, app_key);\n");
|
||||
"(td, sptr, ctfailcb, app_key);\n");
|
||||
}
|
||||
INDENT(-1);
|
||||
OUT("}\n");
|
||||
|
|
|
@ -111,7 +111,7 @@ asn1c_emit_constraint_checking_code(arg_t *arg) {
|
|||
*/
|
||||
OUT("if(!sptr) {\n");
|
||||
INDENT(+1);
|
||||
OUT("_ASN_ERRLOG(app_errlog, app_key,\n");
|
||||
OUT("_ASN_CTFAIL(app_key, td, sptr,\n");
|
||||
OUT("\t\"%%s: value not given (%%s:%%d)\",\n");
|
||||
OUT("\ttd->name, __FILE__, __LINE__);\n");
|
||||
OUT("return -1;\n");
|
||||
|
@ -177,7 +177,7 @@ asn1c_emit_constraint_checking_code(arg_t *arg) {
|
|||
case ASN_CONSTR_SEQUENCE_OF:
|
||||
case ASN_CONSTR_SET_OF:
|
||||
OUT("/* Perform validation of the inner elements */\n");
|
||||
OUT("return td->check_constraints(td, sptr, app_errlog, app_key);\n");
|
||||
OUT("return td->check_constraints(td, sptr, ctfailcb, app_key);\n");
|
||||
break;
|
||||
default:
|
||||
OUT("/* Constraint check succeeded */\n");
|
||||
|
@ -186,7 +186,7 @@ asn1c_emit_constraint_checking_code(arg_t *arg) {
|
|||
INDENT(-1);
|
||||
OUT("} else {\n");
|
||||
INDENT(+1);
|
||||
OUT("_ASN_ERRLOG(app_errlog, app_key,\n");
|
||||
OUT("_ASN_CTFAIL(app_key, td, sptr,\n");
|
||||
OUT("\t\"%%s: constraint failed (%%s:%%d)\",\n");
|
||||
OUT("\ttd->name, __FILE__, __LINE__);\n");
|
||||
OUT("return -1;\n");
|
||||
|
@ -519,7 +519,7 @@ emit_size_determination_code(arg_t *arg, asn1p_expr_type_e etype) {
|
|||
case ASN_STRING_UTF8String:
|
||||
OUT("size = UTF8String_length(st);\n");
|
||||
OUT("if((ssize_t)size < 0) {\n");
|
||||
OUT("\t_ASN_ERRLOG(app_errlog, app_key,\n");
|
||||
OUT("\t_ASN_CTFAIL(app_key, td, sptr,\n");
|
||||
OUT("\t\t\"%%s: UTF-8: broken encoding (%%s:%%d)\",\n");
|
||||
OUT("\t\ttd->name, __FILE__, __LINE__);\n");
|
||||
OUT("\treturn -1;\n");
|
||||
|
@ -581,7 +581,7 @@ emit_value_determination_code(arg_t *arg, asn1p_expr_type_e etype, asn1cnst_rang
|
|||
|
||||
OUT("if(asn_INTEGER2long(st, &value)) {\n");
|
||||
INDENT(+1);
|
||||
OUT("_ASN_ERRLOG(app_errlog, app_key,\n");
|
||||
OUT("_ASN_CTFAIL(app_key, td, sptr,\n");
|
||||
OUT("\t\"%%s: value too large (%%s:%%d)\",\n");
|
||||
OUT("\ttd->name, __FILE__, __LINE__);\n");
|
||||
OUT("return -1;\n");
|
||||
|
@ -595,7 +595,7 @@ emit_value_determination_code(arg_t *arg, asn1p_expr_type_e etype, asn1cnst_rang
|
|||
} else {
|
||||
OUT("if(asn_REAL2double(st, &value)) {\n");
|
||||
INDENT(+1);
|
||||
OUT("_ASN_ERRLOG(app_errlog, app_key,\n");
|
||||
OUT("_ASN_CTFAIL(app_key, td, sptr,\n");
|
||||
OUT("\t\"%%s: value too large (%%s:%%d)\",\n");
|
||||
OUT("\ttd->name, __FILE__, __LINE__);\n");
|
||||
OUT("return -1;\n");
|
||||
|
|
|
@ -45,18 +45,18 @@ asn_TYPE_descriptor_t asn_DEF_BIT_STRING = {
|
|||
*/
|
||||
int
|
||||
BIT_STRING_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
|
||||
|
||||
if(st && st->buf) {
|
||||
if(st->size == 1 && st->bits_unused) {
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
_ASN_CTFAIL(app_key, td,
|
||||
"%s: invalid padding byte (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
_ASN_CTFAIL(app_key, td,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
|
|
|
@ -148,14 +148,14 @@ asn_TYPE_descriptor_t asn_DEF_GeneralizedTime = {
|
|||
*/
|
||||
int
|
||||
GeneralizedTime_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const GeneralizedTime_t *st = (const GeneralizedTime_t *)sptr;
|
||||
time_t tloc;
|
||||
|
||||
errno = EPERM; /* Just an unlikely error code */
|
||||
tloc = asn_GT2time(st, 0, 0);
|
||||
if(tloc == -1 && errno != EPERM) {
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
_ASN_CTFAIL(app_key, td,
|
||||
"%s: Invalid time format: %s (%s:%d)",
|
||||
td->name, strerror(errno), __FILE__, __LINE__);
|
||||
return -1;
|
||||
|
|
|
@ -37,7 +37,7 @@ asn_TYPE_descriptor_t asn_DEF_IA5String = {
|
|||
|
||||
int
|
||||
IA5String_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const IA5String_t *st = (const IA5String_t *)sptr;
|
||||
|
||||
if(st && st->buf) {
|
||||
|
@ -49,7 +49,7 @@ IA5String_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
*/
|
||||
for(; buf < end; buf++) {
|
||||
if(*buf > 0x7F) {
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
_ASN_CTFAIL(app_key, td,
|
||||
"%s: value byte %ld out of range: "
|
||||
"%d > 127 (%s:%d)",
|
||||
td->name,
|
||||
|
@ -60,7 +60,7 @@ IA5String_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
}
|
||||
}
|
||||
} else {
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
_ASN_CTFAIL(app_key, td,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
|
|
|
@ -168,6 +168,7 @@ NativeReal_decode_xer(asn_codec_ctx_t *opt_codec_ctx,
|
|||
const void *buf_ptr, size_t size) {
|
||||
asn_dec_rval_t rval;
|
||||
REAL_t *st = 0;
|
||||
REAL_t **stp = &st;
|
||||
double *Dbl = (double *)*sptr;
|
||||
|
||||
if(!Dbl) {
|
||||
|
@ -180,7 +181,7 @@ NativeReal_decode_xer(asn_codec_ctx_t *opt_codec_ctx,
|
|||
}
|
||||
}
|
||||
|
||||
rval = REAL_decode_xer(opt_codec_ctx, td, (void **)&st, opt_mname,
|
||||
rval = REAL_decode_xer(opt_codec_ctx, td, (void **)stp, opt_mname,
|
||||
buf_ptr, size);
|
||||
if(rval.code == RC_OK) {
|
||||
if(asn_REAL2double(st, Dbl)) {
|
||||
|
|
|
@ -37,7 +37,7 @@ asn_TYPE_descriptor_t asn_DEF_NumericString = {
|
|||
|
||||
int
|
||||
NumericString_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const NumericString_t *st = (const NumericString_t *)sptr;
|
||||
|
||||
if(st && st->buf) {
|
||||
|
@ -55,7 +55,7 @@ NumericString_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
case 0x35: case 0x36: case 0x37: case 0x38: case 0x39:
|
||||
continue;
|
||||
}
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
_ASN_CTFAIL(app_key, td,
|
||||
"%s: value byte %ld (%d) "
|
||||
"not in NumericString alphabet (%s:%d)",
|
||||
td->name,
|
||||
|
@ -65,7 +65,7 @@ NumericString_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
return -1;
|
||||
}
|
||||
} else {
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
_ASN_CTFAIL(app_key, td,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
|
|
|
@ -39,19 +39,19 @@ asn_TYPE_descriptor_t asn_DEF_OBJECT_IDENTIFIER = {
|
|||
|
||||
int
|
||||
OBJECT_IDENTIFIER_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const OBJECT_IDENTIFIER_t *st = (const OBJECT_IDENTIFIER_t *)sptr;
|
||||
|
||||
if(st && st->buf) {
|
||||
if(st->size < 1) {
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
_ASN_CTFAIL(app_key, td,
|
||||
"%s: at least one numerical value "
|
||||
"expected (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
_ASN_CTFAIL(app_key, td,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
|
|
|
@ -60,7 +60,7 @@ static int _PrintableString_alphabet[256] = {
|
|||
|
||||
int
|
||||
PrintableString_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const PrintableString_t *st = (const PrintableString_t *)sptr;
|
||||
|
||||
if(st && st->buf) {
|
||||
|
@ -73,7 +73,7 @@ PrintableString_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
*/
|
||||
for(; buf < end; buf++) {
|
||||
if(!_PrintableString_alphabet[*buf]) {
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
_ASN_CTFAIL(app_key, td,
|
||||
"%s: value byte %ld (%d) "
|
||||
"not in PrintableString alphabet "
|
||||
"(%s:%d)",
|
||||
|
@ -85,7 +85,7 @@ PrintableString_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
}
|
||||
}
|
||||
} else {
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
_ASN_CTFAIL(app_key, td,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
|
|
|
@ -48,14 +48,14 @@ asn_TYPE_descriptor_t asn_DEF_UTCTime = {
|
|||
*/
|
||||
int
|
||||
UTCTime_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const UTCTime_t *st = (const UTCTime_t *)sptr;
|
||||
time_t tloc;
|
||||
|
||||
errno = EPERM; /* Just an unlikely error code */
|
||||
tloc = asn_UT2time(st, 0, 0);
|
||||
if(tloc == -1 && errno != EPERM) {
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
_ASN_CTFAIL(app_key, td,
|
||||
"%s: Invalid time format: %s (%s:%d)",
|
||||
td->name, strerror(errno), __FILE__, __LINE__);
|
||||
return -1;
|
||||
|
|
|
@ -67,30 +67,30 @@ static int32_t UTF8String_mv[7] = { 0, 0,
|
|||
|
||||
int
|
||||
UTF8String_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
ssize_t len = UTF8String_length((const UTF8String_t *)sptr);
|
||||
switch(len) {
|
||||
case U8E_EINVAL:
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
_ASN_CTFAIL(app_key, td,
|
||||
"%s: value not given", td->name);
|
||||
break;
|
||||
case U8E_TRUNC:
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
_ASN_CTFAIL(app_key, td,
|
||||
"%s: truncated UTF-8 sequence (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
break;
|
||||
case U8E_ILLSTART:
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
_ASN_CTFAIL(app_key, td,
|
||||
"%s: UTF-8 illegal start of encoding (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
break;
|
||||
case U8E_NOTCONT:
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
_ASN_CTFAIL(app_key, td,
|
||||
"%s: UTF-8 not continuation (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
break;
|
||||
case U8E_NOTMIN:
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
_ASN_CTFAIL(app_key, td,
|
||||
"%s: UTF-8 not minimal sequence (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
break;
|
||||
|
|
|
@ -37,7 +37,7 @@ asn_TYPE_descriptor_t asn_DEF_VisibleString = {
|
|||
|
||||
int
|
||||
VisibleString_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const VisibleString_t *st = (const VisibleString_t *)sptr;
|
||||
|
||||
if(st && st->buf) {
|
||||
|
@ -52,7 +52,7 @@ VisibleString_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
*/
|
||||
for(; buf < end; buf++) {
|
||||
if(*buf < 0x20 || *buf > 0x7e) {
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
_ASN_CTFAIL(app_key, td,
|
||||
"%s: value byte %ld (%d) "
|
||||
"not in VisibleString alphabet (%s:%d)",
|
||||
td->name,
|
||||
|
@ -63,7 +63,7 @@ VisibleString_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
}
|
||||
}
|
||||
} else {
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
_ASN_CTFAIL(app_key, td,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
/*-
|
||||
* Copyright (c) 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
|
||||
* Copyright (c) 2004, 2006 Lev Walkin <vlm@lionet.info>. All rights reserved.
|
||||
* Redistribution and modifications are permitted subject to BSD license.
|
||||
*/
|
||||
/*
|
||||
* Application-level ASN.1 API.
|
||||
* Application-level ASN.1 callbacks.
|
||||
*/
|
||||
#ifndef _ASN_APPLICATION_H_
|
||||
#define _ASN_APPLICATION_H_
|
||||
|
||||
#include <asn_system.h> /* for platform-dependent types */
|
||||
#include <asn_codecs.h> /* for ASN.1 codecs specifics */
|
||||
#include "asn_system.h" /* for platform-dependent types */
|
||||
#include "asn_codecs.h" /* for ASN.1 codecs specifics */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -25,10 +25,24 @@ extern "C" {
|
|||
typedef int (asn_app_consume_bytes_f)(const void *buffer, size_t size,
|
||||
void *application_specific_key);
|
||||
|
||||
#include <constr_TYPE.h> /* for asn_TYPE_descriptor_t */
|
||||
/*
|
||||
* A callback of this type is called whenever constraint validation fails
|
||||
* on some ASN.1 type. See "constraints.h" for more details on constraint
|
||||
* validation.
|
||||
* This callback specifies a descriptor of the ASN.1 type which failed
|
||||
* the constraint check, as well as human readable message on what
|
||||
* particular constraint has failed.
|
||||
*/
|
||||
typedef void (asn_app_constraint_failed_f)(void *application_specific_key,
|
||||
struct asn_TYPE_descriptor_s *type_descriptor_which_failed,
|
||||
const void *structure_which_failed_ptr,
|
||||
const char *error_message_format, ...)
|
||||
__attribute__((format(printf, 4, 5)));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "constr_TYPE.h" /* for asn_TYPE_descriptor_t */
|
||||
|
||||
#endif /* _ASN_APPLICATION_H_ */
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#ifndef _ASN_INTERNAL_H_
|
||||
#define _ASN_INTERNAL_H_
|
||||
|
||||
#include <asn_application.h> /* Application-visible API */
|
||||
#include "asn_application.h" /* Application-visible API */
|
||||
|
||||
#ifndef __NO_ASSERT_H__ /* Include assert.h only for internal use. */
|
||||
#include <assert.h> /* for assert() macro */
|
||||
|
|
|
@ -475,12 +475,12 @@ CHOICE_outmost_tag(asn_TYPE_descriptor_t *td, const void *ptr, int tag_mode, ber
|
|||
|
||||
int
|
||||
CHOICE_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
asn_CHOICE_specifics_t *specs = (asn_CHOICE_specifics_t *)td->specifics;
|
||||
int present;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
_ASN_CTFAIL(app_key, td,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
|
@ -499,7 +499,7 @@ CHOICE_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
if(!memb_ptr) {
|
||||
if(elm->optional)
|
||||
return 0;
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
_ASN_CTFAIL(app_key, td,
|
||||
"%s: mandatory CHOICE element %s absent (%s:%d)",
|
||||
td->name, elm->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
|
@ -510,10 +510,10 @@ CHOICE_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
|
||||
if(elm->memb_constraints) {
|
||||
return elm->memb_constraints(elm->type, memb_ptr,
|
||||
app_errlog, app_key);
|
||||
ctfailcb, app_key);
|
||||
} else {
|
||||
int ret = elm->type->check_constraints(elm->type,
|
||||
memb_ptr, app_errlog, app_key);
|
||||
memb_ptr, ctfailcb, app_key);
|
||||
/*
|
||||
* Cannot inherit it eralier:
|
||||
* need to make sure we get the updated version.
|
||||
|
@ -522,7 +522,7 @@ CHOICE_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
return ret;
|
||||
}
|
||||
} else {
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
_ASN_CTFAIL(app_key, td,
|
||||
"%s: no CHOICE element given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
|
|
|
@ -972,11 +972,11 @@ SEQUENCE_free(asn_TYPE_descriptor_t *td, void *sptr, int contents_only) {
|
|||
|
||||
int
|
||||
SEQUENCE_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
int edx;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
_ASN_CTFAIL(app_key, td,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
|
@ -994,7 +994,7 @@ SEQUENCE_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
if(!memb_ptr) {
|
||||
if(elm->optional)
|
||||
continue;
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
_ASN_CTFAIL(app_key, td,
|
||||
"%s: mandatory element %s absent (%s:%d)",
|
||||
td->name, elm->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
|
@ -1005,11 +1005,11 @@ SEQUENCE_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
|
||||
if(elm->memb_constraints) {
|
||||
int ret = elm->memb_constraints(elm->type, memb_ptr,
|
||||
app_errlog, app_key);
|
||||
ctfailcb, app_key);
|
||||
if(ret) return ret;
|
||||
} else {
|
||||
int ret = elm->type->check_constraints(elm->type,
|
||||
memb_ptr, app_errlog, app_key);
|
||||
memb_ptr, ctfailcb, app_key);
|
||||
if(ret) return ret;
|
||||
/*
|
||||
* Cannot inherit it earlier:
|
||||
|
|
|
@ -938,11 +938,11 @@ SET_free(asn_TYPE_descriptor_t *td, void *ptr, int contents_only) {
|
|||
|
||||
int
|
||||
SET_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
int edx;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
_ASN_CTFAIL(app_key, td,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
|
@ -960,7 +960,7 @@ SET_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
if(!memb_ptr) {
|
||||
if(elm->optional)
|
||||
continue;
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
_ASN_CTFAIL(app_key, td,
|
||||
"%s: mandatory element %s absent (%s:%d)",
|
||||
td->name, elm->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
|
@ -971,11 +971,11 @@ SET_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
|
||||
if(elm->memb_constraints) {
|
||||
int ret = elm->memb_constraints(elm->type, memb_ptr,
|
||||
app_errlog, app_key);
|
||||
ctfailcb, app_key);
|
||||
if(ret) return ret;
|
||||
} else {
|
||||
int ret = elm->type->check_constraints(elm->type,
|
||||
memb_ptr, app_errlog, app_key);
|
||||
memb_ptr, ctfailcb, app_key);
|
||||
if(ret) return ret;
|
||||
/*
|
||||
* Cannot inherit it earlier:
|
||||
|
|
|
@ -812,14 +812,14 @@ SET_OF_free(asn_TYPE_descriptor_t *td, void *ptr, int contents_only) {
|
|||
|
||||
int
|
||||
SET_OF_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
asn_TYPE_member_t *elm = td->elements;
|
||||
asn_constr_check_f *constr;
|
||||
const asn_anonymous_set_ *list = _A_CSET_FROM_VOID(sptr);
|
||||
int i;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
_ASN_CTFAIL(app_key, td,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
|
@ -838,7 +838,7 @@ SET_OF_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
|
||||
if(!memb_ptr) continue;
|
||||
|
||||
ret = constr(elm->type, memb_ptr, app_errlog, app_key);
|
||||
ret = constr(elm->type, memb_ptr, ctfailcb, app_key);
|
||||
if(ret) return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#include <asn_internal.h>
|
||||
#include <constraints.h>
|
||||
#include "asn_internal.h"
|
||||
#include "constraints.h"
|
||||
|
||||
int
|
||||
asn_generic_no_constraint(asn_TYPE_descriptor_t *type_descriptor,
|
||||
const void *struct_ptr, asn_app_consume_bytes_f *cb, void *key) {
|
||||
const void *struct_ptr, asn_app_constraint_failed_f *cb, void *key) {
|
||||
|
||||
(void)type_descriptor; /* Unused argument */
|
||||
(void)struct_ptr; /* Unused argument */
|
||||
|
@ -16,7 +16,7 @@ asn_generic_no_constraint(asn_TYPE_descriptor_t *type_descriptor,
|
|||
|
||||
int
|
||||
asn_generic_unknown_constraint(asn_TYPE_descriptor_t *type_descriptor,
|
||||
const void *struct_ptr, asn_app_consume_bytes_f *cb, void *key) {
|
||||
const void *struct_ptr, asn_app_constraint_failed_f *cb, void *key) {
|
||||
|
||||
(void)type_descriptor; /* Unused argument */
|
||||
(void)struct_ptr; /* Unused argument */
|
||||
|
@ -27,98 +27,67 @@ asn_generic_unknown_constraint(asn_TYPE_descriptor_t *type_descriptor,
|
|||
return 0;
|
||||
}
|
||||
|
||||
struct __fill_errbuf_arg {
|
||||
char *errbuf;
|
||||
struct errbufDesc {
|
||||
asn_TYPE_descriptor_t *failed_type;
|
||||
const void *failed_struct_ptr;
|
||||
char *errbuf;
|
||||
size_t errlen;
|
||||
size_t erroff;
|
||||
};
|
||||
|
||||
static int
|
||||
__fill_errbuf(const void *buffer, size_t size, void *app_key) {
|
||||
struct __fill_errbuf_arg *arg = (struct __fill_errbuf_arg *)app_key;
|
||||
size_t avail = arg->errlen - arg->erroff;
|
||||
static void
|
||||
_asn_i_ctfailcb(void *key, asn_TYPE_descriptor_t *td, const void *sptr, const char *fmt, ...) {
|
||||
struct errbufDesc *arg = key;
|
||||
va_list ap;
|
||||
ssize_t vlen;
|
||||
ssize_t maxlen;
|
||||
|
||||
if(avail > size)
|
||||
avail = size + 1;
|
||||
arg->failed_type = td;
|
||||
arg->failed_struct_ptr = sptr;
|
||||
|
||||
switch(avail) {
|
||||
default:
|
||||
memcpy(arg->errbuf + arg->erroff, buffer, avail - 1);
|
||||
arg->erroff += avail - 1;
|
||||
case 1:
|
||||
arg->errbuf[arg->erroff] = '\0';
|
||||
case 0:
|
||||
return 0;
|
||||
maxlen = arg->errlen;
|
||||
if(maxlen <= 0)
|
||||
return;
|
||||
|
||||
va_start(ap, fmt);
|
||||
vlen = vsnprintf(arg->errbuf, maxlen, fmt, ap);
|
||||
va_end(ap);
|
||||
if(vlen >= maxlen) {
|
||||
arg->errbuf[maxlen-1] = '\0'; /* Ensuring libc correctness */
|
||||
arg->errlen = maxlen - 1; /* Not counting termination */
|
||||
return;
|
||||
} else if(vlen >= 0) {
|
||||
arg->errbuf[vlen] = '\0'; /* Ensuring libc correctness */
|
||||
arg->errlen = vlen; /* Not counting termination */
|
||||
} else {
|
||||
/*
|
||||
* The libc on this system is broken.
|
||||
*/
|
||||
vlen = sizeof("<broken vsnprintf>") - 1;
|
||||
maxlen--;
|
||||
arg->errlen = vlen < maxlen ? vlen : maxlen;
|
||||
memcpy(arg->errbuf, "<broken vsnprintf>", arg->errlen);
|
||||
arg->errbuf[arg->errlen] = 0;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
int
|
||||
asn_check_constraints(asn_TYPE_descriptor_t *type_descriptor,
|
||||
const void *struct_ptr, char *errbuf, size_t *errlen) {
|
||||
const void *struct_ptr, char *errbuf, size_t *errlen) {
|
||||
struct errbufDesc arg;
|
||||
int ret;
|
||||
|
||||
if(errlen) {
|
||||
struct __fill_errbuf_arg arg;
|
||||
int ret;
|
||||
arg.failed_type = 0;
|
||||
arg.failed_struct_ptr = 0;
|
||||
arg.errbuf = errbuf;
|
||||
arg.errlen = errlen ? *errlen : 0;
|
||||
|
||||
arg.errbuf = errbuf;
|
||||
arg.errlen = *errlen;
|
||||
arg.erroff = 0;
|
||||
|
||||
ret = type_descriptor->check_constraints(type_descriptor,
|
||||
struct_ptr, __fill_errbuf, &arg);
|
||||
|
||||
if(ret == -1)
|
||||
*errlen = arg.erroff;
|
||||
ret = type_descriptor->check_constraints(type_descriptor,
|
||||
struct_ptr, _asn_i_ctfailcb, &arg);
|
||||
if(ret == -1 && errlen)
|
||||
*errlen = arg.errlen;
|
||||
|
||||
return ret;
|
||||
} else {
|
||||
return type_descriptor->check_constraints(type_descriptor,
|
||||
struct_ptr, 0, 0);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
_asn_i_log_error(asn_app_consume_bytes_f *cb, void *key, const char *fmt, ...) {
|
||||
char buf[64];
|
||||
char *p;
|
||||
va_list ap;
|
||||
ssize_t ret;
|
||||
size_t len;
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret = vsnprintf(buf, sizeof(buf), fmt, ap);
|
||||
va_end(ap);
|
||||
if(ret < 0) {
|
||||
/*
|
||||
* The libc on this system is broken.
|
||||
*/
|
||||
ret = sizeof("<broken vsnprintf>") - 1;
|
||||
memcpy(buf, "<broken vsnprintf>", ret + 1);
|
||||
/* Fall through */
|
||||
}
|
||||
|
||||
if(ret < (ssize_t)sizeof(buf)) {
|
||||
(void)cb(buf, ret, key);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* More space required to hold the message.
|
||||
*/
|
||||
len = ret + 1;
|
||||
p = (char *)alloca(len);
|
||||
if(!p) return; /* Can fail on !x86. */
|
||||
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret = vsnprintf(p, len, fmt, ap);
|
||||
va_end(ap);
|
||||
if(ret < 0 || ret >= (ssize_t)len) {
|
||||
ret = sizeof("<broken vsnprintf>") - 1;
|
||||
memcpy(buf, "<broken vsnprintf>", ret + 1);
|
||||
p = buf;
|
||||
}
|
||||
|
||||
(void)cb(p, ret, key);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*-
|
||||
* Copyright (c) 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
|
||||
* Copyright (c) 2004, 2006 Lev Walkin <vlm@lionet.info>. All rights reserved.
|
||||
* Redistribution and modifications are permitted subject to BSD license.
|
||||
*/
|
||||
#ifndef _ASN1_CONSTRAINTS_VALIDATOR_H_
|
||||
|
@ -20,6 +20,10 @@ struct asn_TYPE_descriptor_s; /* Forward declaration */
|
|||
* they could be passed as NULL's. If constraints validation fails,
|
||||
* errlen will contain the actual number of bytes taken from the errbuf
|
||||
* to encode an error message (properly 0-terminated).
|
||||
*
|
||||
* RETURN VALUES:
|
||||
* This function returns 0 in case all ASN.1 constraints are met
|
||||
* and -1 if one or more constraints were failed.
|
||||
*/
|
||||
int
|
||||
asn_check_constraints(struct asn_TYPE_descriptor_s *type_descriptor,
|
||||
|
@ -28,6 +32,7 @@ asn_check_constraints(struct asn_TYPE_descriptor_s *type_descriptor,
|
|||
size_t *errlen /* Length of the error description */
|
||||
);
|
||||
|
||||
|
||||
/*
|
||||
* Generic type for constraint checking callback,
|
||||
* associated with every type descriptor.
|
||||
|
@ -35,8 +40,8 @@ asn_check_constraints(struct asn_TYPE_descriptor_s *type_descriptor,
|
|||
typedef int (asn_constr_check_f)(
|
||||
struct asn_TYPE_descriptor_s *type_descriptor,
|
||||
const void *struct_ptr,
|
||||
asn_app_consume_bytes_f *optional_app_errlog, /* Log the error */
|
||||
void *optional_app_key /* Opaque key passed to app_errlog */
|
||||
asn_app_constraint_failed_f *optional_callback, /* Log the error */
|
||||
void *optional_app_key /* Opaque key passed to a callback */
|
||||
);
|
||||
|
||||
/*******************************
|
||||
|
@ -49,11 +54,7 @@ asn_constr_check_f asn_generic_unknown_constraint; /* Not fully supported */
|
|||
/*
|
||||
* Invoke the callback with a complete error message.
|
||||
*/
|
||||
/* Preprocessor may not support variable args macros, so act strangely */
|
||||
#define _ASN_ERRLOG if(app_errlog) _asn_i_log_error
|
||||
|
||||
void _asn_i_log_error(asn_app_consume_bytes_f *, void *key,
|
||||
const char *fmt, ...) __attribute__ ((format(printf, 3, 4)));
|
||||
#define _ASN_CTFAIL if(ctfailcb) ctfailcb
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -227,10 +227,10 @@ xer_type_encoder_f SignedREAL_encode_xer;
|
|||
|
||||
int
|
||||
SignedREAL_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_SIGNED_16P0.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -350,10 +350,10 @@ xer_type_encoder_f SignedSET_encode_xer;
|
|||
|
||||
int
|
||||
SignedSET_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_SIGNED_16P1.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -23,7 +23,7 @@ extern asn_TYPE_descriptor_t asn_DEF_Narrow_15P0;
|
|||
|
||||
static int
|
||||
memb_narrow1_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -48,7 +48,7 @@ memb_narrow1_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
|
||||
static int
|
||||
memb_narrow2_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -73,7 +73,7 @@ memb_narrow2_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
|
||||
static int
|
||||
memb_narrow3_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -205,10 +205,10 @@ xer_type_encoder_f NarrowInteger_encode_xer;
|
|||
|
||||
int
|
||||
NarrowInteger_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_Narrow_15P0.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -22,7 +22,7 @@ xer_type_encoder_f MinMax_16P0_encode_xer;
|
|||
|
||||
int
|
||||
MinMax_16P0_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -168,7 +168,7 @@ xer_type_encoder_f ThreePlus_encode_xer;
|
|||
|
||||
int
|
||||
ThreePlus_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const MinMax_16P0_t *st = (const MinMax_16P0_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
|
|
@ -43,10 +43,10 @@ extern asn_TYPE_descriptor_t asn_DEF_Flag_16P1;
|
|||
|
||||
static int
|
||||
field_7_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_ENUMERATED.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -306,10 +306,10 @@ xer_type_encoder_f IntegerColorFlag_encode_xer;
|
|||
|
||||
int
|
||||
IntegerColorFlag_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_Flag_16P0.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -429,10 +429,10 @@ xer_type_encoder_f EnumeratedColorFlag_encode_xer;
|
|||
|
||||
int
|
||||
EnumeratedColorFlag_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_Flag_16P1.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -33,7 +33,7 @@ extern asn_TYPE_descriptor_t asn_DEF_SIGNED_15P0;
|
|||
|
||||
static int
|
||||
memb_signature_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
|
||||
size_t size;
|
||||
|
||||
|
@ -230,10 +230,10 @@ xer_type_encoder_f Certificate_encode_xer;
|
|||
|
||||
int
|
||||
Certificate_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_SIGNED_15P0.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -453,7 +453,7 @@ static int check_permitted_alphabet_2(const void *sptr) {
|
|||
|
||||
static int
|
||||
memb_IA5String_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const IA5String_t *st = (const IA5String_t *)sptr;
|
||||
|
||||
if(!sptr) {
|
||||
|
|
|
@ -13,4 +13,14 @@ Error ::= SEQUENCE {
|
|||
|
||||
maxSize INTEGER ::= 10
|
||||
|
||||
SeqWithMandatory ::= SEQUENCE {
|
||||
someString UTF8String,
|
||||
seqOfMan [0] EXPLICIT SEQUENCE OF Error
|
||||
}
|
||||
|
||||
SeqWithOptional ::= SEQUENCE {
|
||||
someString UTF8String,
|
||||
seqOfOpt [0] EXPLICIT SEQUENCE OF Error OPTIONAL
|
||||
}
|
||||
|
||||
END
|
||||
|
|
|
@ -200,3 +200,287 @@ asn_TYPE_descriptor_t asn_DEF_Error = {
|
|||
&asn_SPC_Error_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
|
||||
/*** <<< INCLUDES [SeqWithMandatory] >>> ***/
|
||||
|
||||
#include <UTF8String.h>
|
||||
#include <asn_SEQUENCE_OF.h>
|
||||
#include <constr_SEQUENCE_OF.h>
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
/*** <<< FWD-DECLS [SeqWithMandatory] >>> ***/
|
||||
|
||||
struct Error;
|
||||
|
||||
/*** <<< TYPE-DECLS [SeqWithMandatory] >>> ***/
|
||||
|
||||
typedef struct SeqWithMandatory {
|
||||
UTF8String_t someString;
|
||||
struct seqOfMan {
|
||||
A_SEQUENCE_OF(struct Error) list;
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} seqOfMan;
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} SeqWithMandatory_t;
|
||||
|
||||
/*** <<< FUNC-DECLS [SeqWithMandatory] >>> ***/
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_SeqWithMandatory;
|
||||
|
||||
/*** <<< POST-INCLUDE [SeqWithMandatory] >>> ***/
|
||||
|
||||
#include <Error.h>
|
||||
|
||||
/*** <<< STAT-DEFS [SeqWithMandatory] >>> ***/
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_seqOfMan_3[] = {
|
||||
{ ATF_POINTER, 0, 0,
|
||||
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
|
||||
.tag_mode = 0,
|
||||
.type = &asn_DEF_Error,
|
||||
.memb_constraints = 0, /* Defer constraints checking to the member type */
|
||||
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
|
||||
.default_value = 0,
|
||||
.name = ""
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_seqOfMan_tags_3[] = {
|
||||
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_SET_OF_specifics_t asn_SPC_seqOfMan_specs_3 = {
|
||||
sizeof(struct seqOfMan),
|
||||
offsetof(struct seqOfMan, _asn_ctx),
|
||||
0, /* XER encoding is XMLDelimitedItemList */
|
||||
};
|
||||
static /* Use -fall-defs-global to expose */
|
||||
asn_TYPE_descriptor_t asn_DEF_seqOfMan_3 = {
|
||||
"seqOfMan",
|
||||
"seqOfMan",
|
||||
SEQUENCE_OF_free,
|
||||
SEQUENCE_OF_print,
|
||||
SEQUENCE_OF_constraint,
|
||||
SEQUENCE_OF_decode_ber,
|
||||
SEQUENCE_OF_encode_der,
|
||||
SEQUENCE_OF_decode_xer,
|
||||
SEQUENCE_OF_encode_xer,
|
||||
0, /* No PER decoder, -gen-PER to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_seqOfMan_tags_3,
|
||||
sizeof(asn_DEF_seqOfMan_tags_3)
|
||||
/sizeof(asn_DEF_seqOfMan_tags_3[0]), /* 2 */
|
||||
asn_DEF_seqOfMan_tags_3, /* Same as above */
|
||||
sizeof(asn_DEF_seqOfMan_tags_3)
|
||||
/sizeof(asn_DEF_seqOfMan_tags_3[0]), /* 2 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_seqOfMan_3,
|
||||
1, /* Single element */
|
||||
&asn_SPC_seqOfMan_specs_3 /* Additional specs */
|
||||
};
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_SeqWithMandatory_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct SeqWithMandatory, someString),
|
||||
.tag = (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)),
|
||||
.tag_mode = 0,
|
||||
.type = &asn_DEF_UTF8String,
|
||||
.memb_constraints = 0, /* Defer constraints checking to the member type */
|
||||
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
|
||||
.default_value = 0,
|
||||
.name = "someString"
|
||||
},
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct SeqWithMandatory, seqOfMan),
|
||||
.tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
|
||||
.tag_mode = +1, /* EXPLICIT tag at current level */
|
||||
.type = &asn_DEF_seqOfMan_3,
|
||||
.memb_constraints = 0, /* Defer constraints checking to the member type */
|
||||
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
|
||||
.default_value = 0,
|
||||
.name = "seqOfMan"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_SeqWithMandatory_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_SeqWithMandatory_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 0, 0, 0 }, /* someString at 25 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 } /* seqOfMan at 27 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_SeqWithMandatory_specs_1 = {
|
||||
sizeof(struct SeqWithMandatory),
|
||||
offsetof(struct SeqWithMandatory, _asn_ctx),
|
||||
asn_MAP_SeqWithMandatory_tag2el_1,
|
||||
2, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
-1, /* Start extensions */
|
||||
-1 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_SeqWithMandatory = {
|
||||
"SeqWithMandatory",
|
||||
"SeqWithMandatory",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, /* No PER decoder, -gen-PER to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_SeqWithMandatory_tags_1,
|
||||
sizeof(asn_DEF_SeqWithMandatory_tags_1)
|
||||
/sizeof(asn_DEF_SeqWithMandatory_tags_1[0]), /* 1 */
|
||||
asn_DEF_SeqWithMandatory_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_SeqWithMandatory_tags_1)
|
||||
/sizeof(asn_DEF_SeqWithMandatory_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_SeqWithMandatory_1,
|
||||
2, /* Elements count */
|
||||
&asn_SPC_SeqWithMandatory_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
|
||||
/*** <<< INCLUDES [SeqWithOptional] >>> ***/
|
||||
|
||||
#include <UTF8String.h>
|
||||
#include <asn_SEQUENCE_OF.h>
|
||||
#include <constr_SEQUENCE_OF.h>
|
||||
#include <constr_SEQUENCE.h>
|
||||
|
||||
/*** <<< FWD-DECLS [SeqWithOptional] >>> ***/
|
||||
|
||||
struct Error;
|
||||
|
||||
/*** <<< TYPE-DECLS [SeqWithOptional] >>> ***/
|
||||
|
||||
typedef struct SeqWithOptional {
|
||||
UTF8String_t someString;
|
||||
struct seqOfOpt {
|
||||
A_SEQUENCE_OF(struct Error) list;
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} *seqOfOpt;
|
||||
|
||||
/* Context for parsing across buffer boundaries */
|
||||
asn_struct_ctx_t _asn_ctx;
|
||||
} SeqWithOptional_t;
|
||||
|
||||
/*** <<< FUNC-DECLS [SeqWithOptional] >>> ***/
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_SeqWithOptional;
|
||||
|
||||
/*** <<< POST-INCLUDE [SeqWithOptional] >>> ***/
|
||||
|
||||
#include <Error.h>
|
||||
|
||||
/*** <<< STAT-DEFS [SeqWithOptional] >>> ***/
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_seqOfOpt_3[] = {
|
||||
{ ATF_POINTER, 0, 0,
|
||||
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
|
||||
.tag_mode = 0,
|
||||
.type = &asn_DEF_Error,
|
||||
.memb_constraints = 0, /* Defer constraints checking to the member type */
|
||||
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
|
||||
.default_value = 0,
|
||||
.name = ""
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_seqOfOpt_tags_3[] = {
|
||||
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_SET_OF_specifics_t asn_SPC_seqOfOpt_specs_3 = {
|
||||
sizeof(struct seqOfOpt),
|
||||
offsetof(struct seqOfOpt, _asn_ctx),
|
||||
0, /* XER encoding is XMLDelimitedItemList */
|
||||
};
|
||||
static /* Use -fall-defs-global to expose */
|
||||
asn_TYPE_descriptor_t asn_DEF_seqOfOpt_3 = {
|
||||
"seqOfOpt",
|
||||
"seqOfOpt",
|
||||
SEQUENCE_OF_free,
|
||||
SEQUENCE_OF_print,
|
||||
SEQUENCE_OF_constraint,
|
||||
SEQUENCE_OF_decode_ber,
|
||||
SEQUENCE_OF_encode_der,
|
||||
SEQUENCE_OF_decode_xer,
|
||||
SEQUENCE_OF_encode_xer,
|
||||
0, /* No PER decoder, -gen-PER to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_seqOfOpt_tags_3,
|
||||
sizeof(asn_DEF_seqOfOpt_tags_3)
|
||||
/sizeof(asn_DEF_seqOfOpt_tags_3[0]), /* 2 */
|
||||
asn_DEF_seqOfOpt_tags_3, /* Same as above */
|
||||
sizeof(asn_DEF_seqOfOpt_tags_3)
|
||||
/sizeof(asn_DEF_seqOfOpt_tags_3[0]), /* 2 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_seqOfOpt_3,
|
||||
1, /* Single element */
|
||||
&asn_SPC_seqOfOpt_specs_3 /* Additional specs */
|
||||
};
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_SeqWithOptional_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct SeqWithOptional, someString),
|
||||
.tag = (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)),
|
||||
.tag_mode = 0,
|
||||
.type = &asn_DEF_UTF8String,
|
||||
.memb_constraints = 0, /* Defer constraints checking to the member type */
|
||||
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
|
||||
.default_value = 0,
|
||||
.name = "someString"
|
||||
},
|
||||
{ ATF_POINTER, 1, offsetof(struct SeqWithOptional, seqOfOpt),
|
||||
.tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
|
||||
.tag_mode = +1, /* EXPLICIT tag at current level */
|
||||
.type = &asn_DEF_seqOfOpt_3,
|
||||
.memb_constraints = 0, /* Defer constraints checking to the member type */
|
||||
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
|
||||
.default_value = 0,
|
||||
.name = "seqOfOpt"
|
||||
},
|
||||
};
|
||||
static ber_tlv_tag_t asn_DEF_SeqWithOptional_tags_1[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
|
||||
};
|
||||
static asn_TYPE_tag2member_t asn_MAP_SeqWithOptional_tag2el_1[] = {
|
||||
{ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 0, 0, 0 }, /* someString at 30 */
|
||||
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 } /* seqOfOpt at 31 */
|
||||
};
|
||||
static asn_SEQUENCE_specifics_t asn_SPC_SeqWithOptional_specs_1 = {
|
||||
sizeof(struct SeqWithOptional),
|
||||
offsetof(struct SeqWithOptional, _asn_ctx),
|
||||
asn_MAP_SeqWithOptional_tag2el_1,
|
||||
2, /* Count of tags in the map */
|
||||
0, 0, 0, /* Optional elements (not needed) */
|
||||
-1, /* Start extensions */
|
||||
-1 /* Stop extensions */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_SeqWithOptional = {
|
||||
"SeqWithOptional",
|
||||
"SeqWithOptional",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, /* No PER decoder, -gen-PER to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_SeqWithOptional_tags_1,
|
||||
sizeof(asn_DEF_SeqWithOptional_tags_1)
|
||||
/sizeof(asn_DEF_SeqWithOptional_tags_1[0]), /* 1 */
|
||||
asn_DEF_SeqWithOptional_tags_1, /* Same as above */
|
||||
sizeof(asn_DEF_SeqWithOptional_tags_1)
|
||||
/sizeof(asn_DEF_SeqWithOptional_tags_1[0]), /* 1 */
|
||||
0, /* No PER visible constraints */
|
||||
asn_MBR_SeqWithOptional_1,
|
||||
2, /* Elements count */
|
||||
&asn_SPC_SeqWithOptional_specs_1 /* Additional specs */
|
||||
};
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ extern asn_TYPE_descriptor_t asn_DEF_LogLine;
|
|||
|
||||
static int
|
||||
memb_varsets_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
size_t size;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -215,7 +215,7 @@ extern asn_TYPE_descriptor_t asn_DEF_VariablePartSet;
|
|||
|
||||
static int
|
||||
memb_vparts_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
|
@ -229,7 +229,7 @@ memb_vparts_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
/* Nothing is here. See below */
|
||||
}
|
||||
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
|
||||
|
@ -397,7 +397,7 @@ extern asn_TYPE_descriptor_t asn_DEF_VariablePart;
|
|||
|
||||
static int
|
||||
memb_vset_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
size_t size;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -644,10 +644,10 @@ extern asn_TYPE_descriptor_t asn_DEF_ActionItem;
|
|||
|
||||
static int
|
||||
accept_as_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_ENUMERATED.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -22,10 +22,10 @@ xer_type_encoder_f PrimitiveType_encode_xer;
|
|||
|
||||
int
|
||||
PrimitiveType_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_OCTET_STRING.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -216,10 +216,10 @@ xer_type_encoder_f T_encode_xer;
|
|||
|
||||
int
|
||||
T_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_ConstructedType.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -22,10 +22,10 @@ xer_type_encoder_f Int1_encode_xer;
|
|||
|
||||
int
|
||||
Int1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_INTEGER.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -145,7 +145,7 @@ xer_type_encoder_f Int2_encode_xer;
|
|||
|
||||
int
|
||||
Int2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const Int1_t *st = (const Int1_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -287,7 +287,7 @@ xer_type_encoder_f Int3_encode_xer;
|
|||
|
||||
int
|
||||
Int3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const Int2_t *st = (const Int2_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -433,7 +433,7 @@ xer_type_encoder_f Int4_encode_xer;
|
|||
|
||||
int
|
||||
Int4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const Int3_t *st = (const Int3_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -579,7 +579,7 @@ xer_type_encoder_f Int5_encode_xer;
|
|||
|
||||
int
|
||||
Int5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const Int4_t *st = (const Int4_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -725,7 +725,7 @@ xer_type_encoder_f ExtensibleExtensions_encode_xer;
|
|||
|
||||
int
|
||||
ExtensibleExtensions_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -871,10 +871,10 @@ xer_type_encoder_f Str1_encode_xer;
|
|||
|
||||
int
|
||||
Str1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_IA5String.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1010,7 +1010,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
Str2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const Str1_t *st = (const Str1_t *)sptr;
|
||||
size_t size;
|
||||
|
||||
|
@ -1179,7 +1179,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
Str3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const Str2_t *st = (const Str2_t *)sptr;
|
||||
size_t size;
|
||||
|
||||
|
@ -1337,7 +1337,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
Str4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const IA5String_t *st = (const IA5String_t *)sptr;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -1492,7 +1492,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
PER_Visible_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const IA5String_t *st = (const IA5String_t *)sptr;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -1647,7 +1647,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
PER_Visible_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const PER_Visible_t *st = (const PER_Visible_t *)sptr;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -1802,7 +1802,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
Not_PER_Visible_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const PER_Visible_t *st = (const PER_Visible_t *)sptr;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -1957,7 +1957,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
Not_PER_Visible_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const PER_Visible_t *st = (const PER_Visible_t *)sptr;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -2112,7 +2112,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
Not_PER_Visible_3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const PER_Visible_t *st = (const PER_Visible_t *)sptr;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -2267,7 +2267,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
SIZE_but_not_FROM_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const PER_Visible_t *st = (const PER_Visible_t *)sptr;
|
||||
size_t size;
|
||||
|
||||
|
@ -2425,7 +2425,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
SIZE_and_FROM_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const PER_Visible_t *st = (const PER_Visible_t *)sptr;
|
||||
size_t size;
|
||||
|
||||
|
@ -2583,7 +2583,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
Neither_SIZE_nor_FROM_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const PER_Visible_t *st = (const PER_Visible_t *)sptr;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -2732,7 +2732,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
Utf8_4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const UTF8String_t *st = (const UTF8String_t *)sptr;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -2900,7 +2900,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
Utf8_3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const Utf8_2_t *st = (const Utf8_2_t *)sptr;
|
||||
size_t size;
|
||||
|
||||
|
@ -3048,7 +3048,7 @@ xer_type_encoder_f Utf8_2_encode_xer;
|
|||
|
||||
int
|
||||
Utf8_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const Utf8_1_t *st = (const Utf8_1_t *)sptr;
|
||||
size_t size;
|
||||
|
||||
|
@ -3195,10 +3195,10 @@ xer_type_encoder_f Utf8_1_encode_xer;
|
|||
|
||||
int
|
||||
Utf8_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_UTF8String.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -3346,7 +3346,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
VisibleIdentifier_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const Identifier_t *st = (const Identifier_t *)sptr;
|
||||
size_t size;
|
||||
|
||||
|
@ -3514,10 +3514,10 @@ extern asn_TYPE_descriptor_t asn_DEF_Sequence;
|
|||
|
||||
static int
|
||||
enum_c_6_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_ENUMERATED.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -3586,7 +3586,7 @@ enum_c_6_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
|
|||
|
||||
static int
|
||||
memb_int1_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const Int1_t *st = (const Int1_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -3617,7 +3617,7 @@ memb_int1_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
|
||||
static int
|
||||
memb_int4_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const Int4_t *st = (const Int4_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -3648,7 +3648,7 @@ memb_int4_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
|
||||
static int
|
||||
memb_int5_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const Int5_t *st = (const Int5_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -3962,10 +3962,10 @@ xer_type_encoder_f Enum0_encode_xer;
|
|||
|
||||
int
|
||||
Enum0_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_ENUMERATED.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -4107,7 +4107,7 @@ xer_type_encoder_f Enum1_encode_xer;
|
|||
|
||||
int
|
||||
Enum1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -4290,7 +4290,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
Identifier_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const VisibleString_t *st = (const VisibleString_t *)sptr;
|
||||
size_t size;
|
||||
|
||||
|
|
|
@ -23,10 +23,10 @@ per_type_decoder_f Int1_decode_uper;
|
|||
|
||||
int
|
||||
Int1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_INTEGER.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -154,7 +154,7 @@ per_type_decoder_f Int2_decode_uper;
|
|||
|
||||
int
|
||||
Int2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const Int1_t *st = (const Int1_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -308,7 +308,7 @@ per_type_decoder_f Int3_decode_uper;
|
|||
|
||||
int
|
||||
Int3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const Int2_t *st = (const Int2_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -466,7 +466,7 @@ per_type_decoder_f Int4_decode_uper;
|
|||
|
||||
int
|
||||
Int4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const Int3_t *st = (const Int3_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -624,7 +624,7 @@ per_type_decoder_f Int5_decode_uper;
|
|||
|
||||
int
|
||||
Int5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const Int4_t *st = (const Int4_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -782,7 +782,7 @@ per_type_decoder_f ExtensibleExtensions_decode_uper;
|
|||
|
||||
int
|
||||
ExtensibleExtensions_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -940,10 +940,10 @@ per_type_decoder_f Str1_decode_uper;
|
|||
|
||||
int
|
||||
Str1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_IA5String.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1087,7 +1087,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
Str2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const Str1_t *st = (const Str1_t *)sptr;
|
||||
size_t size;
|
||||
|
||||
|
@ -1268,7 +1268,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
Str3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const Str2_t *st = (const Str2_t *)sptr;
|
||||
size_t size;
|
||||
|
||||
|
@ -1438,7 +1438,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
Str4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const IA5String_t *st = (const IA5String_t *)sptr;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -1605,7 +1605,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
PER_Visible_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const IA5String_t *st = (const IA5String_t *)sptr;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -1772,7 +1772,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
PER_Visible_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const PER_Visible_t *st = (const PER_Visible_t *)sptr;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -1939,7 +1939,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
Not_PER_Visible_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const PER_Visible_t *st = (const PER_Visible_t *)sptr;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -2106,7 +2106,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
Not_PER_Visible_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const PER_Visible_t *st = (const PER_Visible_t *)sptr;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -2273,7 +2273,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
Not_PER_Visible_3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const PER_Visible_t *st = (const PER_Visible_t *)sptr;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -2440,7 +2440,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
SIZE_but_not_FROM_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const PER_Visible_t *st = (const PER_Visible_t *)sptr;
|
||||
size_t size;
|
||||
|
||||
|
@ -2610,7 +2610,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
SIZE_and_FROM_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const PER_Visible_t *st = (const PER_Visible_t *)sptr;
|
||||
size_t size;
|
||||
|
||||
|
@ -2780,7 +2780,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
Neither_SIZE_nor_FROM_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const PER_Visible_t *st = (const PER_Visible_t *)sptr;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -2941,7 +2941,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
Utf8_4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const UTF8String_t *st = (const UTF8String_t *)sptr;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -3121,7 +3121,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
Utf8_3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const Utf8_2_t *st = (const Utf8_2_t *)sptr;
|
||||
size_t size;
|
||||
|
||||
|
@ -3281,7 +3281,7 @@ per_type_decoder_f Utf8_2_decode_uper;
|
|||
|
||||
int
|
||||
Utf8_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const Utf8_1_t *st = (const Utf8_1_t *)sptr;
|
||||
size_t size;
|
||||
|
||||
|
@ -3440,10 +3440,10 @@ per_type_decoder_f Utf8_1_decode_uper;
|
|||
|
||||
int
|
||||
Utf8_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_UTF8String.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -3599,7 +3599,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
VisibleIdentifier_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const Identifier_t *st = (const Identifier_t *)sptr;
|
||||
size_t size;
|
||||
|
||||
|
@ -3774,10 +3774,10 @@ extern asn_TYPE_descriptor_t asn_DEF_Sequence;
|
|||
|
||||
static int
|
||||
enum_c_6_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_ENUMERATED.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -3853,7 +3853,7 @@ enum_c_6_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
|||
|
||||
static int
|
||||
memb_int1_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const Int1_t *st = (const Int1_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -3884,7 +3884,7 @@ memb_int1_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
|
||||
static int
|
||||
memb_int4_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const Int4_t *st = (const Int4_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -3915,7 +3915,7 @@ memb_int4_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
|
||||
static int
|
||||
memb_int5_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const Int5_t *st = (const Int5_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -4256,10 +4256,10 @@ per_type_decoder_f Enum0_decode_uper;
|
|||
|
||||
int
|
||||
Enum0_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_ENUMERATED.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -4413,7 +4413,7 @@ per_type_decoder_f Enum1_decode_uper;
|
|||
|
||||
int
|
||||
Enum1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -4608,7 +4608,7 @@ static int check_permitted_alphabet_1(const void *sptr) {
|
|||
|
||||
int
|
||||
Identifier_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const VisibleString_t *st = (const VisibleString_t *)sptr;
|
||||
size_t size;
|
||||
|
||||
|
|
|
@ -22,10 +22,10 @@ xer_type_encoder_f T1_encode_xer;
|
|||
|
||||
int
|
||||
T1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_T2.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -156,10 +156,10 @@ xer_type_encoder_f T2_encode_xer;
|
|||
|
||||
int
|
||||
T2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_T3.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -288,10 +288,10 @@ xer_type_encoder_f T3_encode_xer;
|
|||
|
||||
int
|
||||
T3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_T4.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -418,10 +418,10 @@ xer_type_encoder_f T4_encode_xer;
|
|||
|
||||
int
|
||||
T4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_T5.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -543,10 +543,10 @@ xer_type_encoder_f T5_encode_xer;
|
|||
|
||||
int
|
||||
T5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_T6.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -667,10 +667,10 @@ xer_type_encoder_f T6_encode_xer;
|
|||
|
||||
int
|
||||
T6_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_REAL.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -790,10 +790,10 @@ xer_type_encoder_f T_encode_xer;
|
|||
|
||||
int
|
||||
T_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_Ts.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -22,10 +22,10 @@ xer_type_encoder_f T1_encode_xer;
|
|||
|
||||
int
|
||||
T1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_T2.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -156,10 +156,10 @@ xer_type_encoder_f T2_encode_xer;
|
|||
|
||||
int
|
||||
T2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_T3.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -288,10 +288,10 @@ xer_type_encoder_f T3_encode_xer;
|
|||
|
||||
int
|
||||
T3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_T4.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -418,10 +418,10 @@ xer_type_encoder_f T4_encode_xer;
|
|||
|
||||
int
|
||||
T4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_T5.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -543,10 +543,10 @@ xer_type_encoder_f T5_encode_xer;
|
|||
|
||||
int
|
||||
T5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_T6.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -667,10 +667,10 @@ xer_type_encoder_f T6_encode_xer;
|
|||
|
||||
int
|
||||
T6_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_NativeReal.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -790,10 +790,10 @@ xer_type_encoder_f T_encode_xer;
|
|||
|
||||
int
|
||||
T_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_Ts.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -95,10 +95,10 @@ xer_type_encoder_f SimpleType_encode_xer;
|
|||
|
||||
int
|
||||
SimpleType_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_ENUMERATED.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -48,7 +48,7 @@ extern asn_TYPE_descriptor_t asn_DEF_T;
|
|||
|
||||
static int
|
||||
memb_char_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
|
||||
size_t size;
|
||||
|
||||
|
|
|
@ -528,10 +528,10 @@ extern asn_TYPE_descriptor_t asn_DEF_ExtensibleSet;
|
|||
|
||||
static int
|
||||
enum_4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_ENUMERATED.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1057,10 +1057,10 @@ extern asn_TYPE_descriptor_t asn_DEF_SetOfEnums;
|
|||
|
||||
static int
|
||||
Member_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_ENUMERATED.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1377,10 +1377,10 @@ extern asn_TYPE_descriptor_t asn_DEF_NamedSetOfEnums;
|
|||
|
||||
static int
|
||||
name_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_ENUMERATED.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -411,7 +411,7 @@ extern asn_TYPE_descriptor_t asn_DEF_Type2;
|
|||
|
||||
static int
|
||||
memb_a_constraint_3(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
|
||||
size_t size;
|
||||
|
||||
|
@ -442,7 +442,7 @@ memb_a_constraint_3(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
|
||||
static int
|
||||
memb_a_constraint_8(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
|
||||
size_t size;
|
||||
|
||||
|
|
|
@ -151,10 +151,10 @@ xer_type_encoder_f EpytRef_encode_xer;
|
|||
|
||||
int
|
||||
EpytRef_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_Epyt.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -494,7 +494,7 @@ static int check_permitted_alphabet_7(const void *sptr) {
|
|||
|
||||
static int
|
||||
memb_patest1_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const IA5String_t *st = (const IA5String_t *)sptr;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -518,7 +518,7 @@ memb_patest1_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
|
||||
static int
|
||||
memb_patest2_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const IA5String_t *st = (const IA5String_t *)sptr;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -724,10 +724,10 @@ xer_type_encoder_f EnumType_encode_xer;
|
|||
|
||||
int
|
||||
EnumType_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_ENUMERATED.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -29,7 +29,7 @@ extern asn_TYPE_descriptor_t asn_DEF_TestType_16P1;
|
|||
|
||||
static int
|
||||
memb_common_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -299,7 +299,7 @@ extern asn_TYPE_descriptor_t asn_DEF_AutoType_34P1;
|
|||
|
||||
static int
|
||||
memb_common_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -324,7 +324,7 @@ memb_common_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
|
||||
static int
|
||||
memb_common_constraint_3(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
BOOLEAN_t value;
|
||||
|
||||
if(!sptr) {
|
||||
|
|
|
@ -29,10 +29,10 @@ xer_type_encoder_f T_encode_xer;
|
|||
|
||||
int
|
||||
T_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_INTEGER.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -22,10 +22,10 @@ xer_type_encoder_f CN_IntegerUnlimited_encode_xer;
|
|||
|
||||
int
|
||||
CN_IntegerUnlimited_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_INTEGER.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -145,7 +145,7 @@ xer_type_encoder_f CN_IntegerMinMax_encode_xer;
|
|||
|
||||
int
|
||||
CN_IntegerMinMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -162,7 +162,7 @@ CN_IntegerMinMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_INTEGER.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -282,7 +282,7 @@ xer_type_encoder_f CN_IntegerMinLow_encode_xer;
|
|||
|
||||
int
|
||||
CN_IntegerMinLow_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -428,7 +428,7 @@ xer_type_encoder_f NO_IntegerMinHigh_encode_xer;
|
|||
|
||||
int
|
||||
NO_IntegerMinHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -574,7 +574,7 @@ xer_type_encoder_f NO_IntegerLowHigh_encode_xer;
|
|||
|
||||
int
|
||||
NO_IntegerLowHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -720,7 +720,7 @@ xer_type_encoder_f CN_IntegerLowMax_encode_xer;
|
|||
|
||||
int
|
||||
CN_IntegerLowMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -866,7 +866,7 @@ xer_type_encoder_f NO_IntegerHighMax_encode_xer;
|
|||
|
||||
int
|
||||
NO_IntegerHighMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -1012,7 +1012,7 @@ xer_type_encoder_f NO_IntegerLowestMax_encode_xer;
|
|||
|
||||
int
|
||||
NO_IntegerLowestMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -1158,7 +1158,7 @@ xer_type_encoder_f NO_IntegerOutRange_encode_xer;
|
|||
|
||||
int
|
||||
NO_IntegerOutRange_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -1304,7 +1304,7 @@ xer_type_encoder_f NO_IntegerOutValue_encode_xer;
|
|||
|
||||
int
|
||||
NO_IntegerOutValue_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -1450,7 +1450,7 @@ xer_type_encoder_f OK_IntegerInRange1_encode_xer;
|
|||
|
||||
int
|
||||
OK_IntegerInRange1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -1590,7 +1590,7 @@ xer_type_encoder_f OK_IntegerInRange2_encode_xer;
|
|||
|
||||
int
|
||||
OK_IntegerInRange2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -1730,7 +1730,7 @@ xer_type_encoder_f OK_IntegerInRange3_encode_xer;
|
|||
|
||||
int
|
||||
OK_IntegerInRange3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -1870,7 +1870,7 @@ xer_type_encoder_f OK_IntegerInRange4_encode_xer;
|
|||
|
||||
int
|
||||
OK_IntegerInRange4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -2010,7 +2010,7 @@ xer_type_encoder_f OK_IntegerInRange5_encode_xer;
|
|||
|
||||
int
|
||||
OK_IntegerInRange5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -2156,7 +2156,7 @@ xer_type_encoder_f NO_IntegerInRange6_encode_xer;
|
|||
|
||||
int
|
||||
NO_IntegerInRange6_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -2309,10 +2309,10 @@ xer_type_encoder_f CN_IntegerEnumerated1_encode_xer;
|
|||
|
||||
int
|
||||
CN_IntegerEnumerated1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_INTEGER.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2439,10 +2439,10 @@ xer_type_encoder_f NO_IntegerEnumerated2_encode_xer;
|
|||
|
||||
int
|
||||
NO_IntegerEnumerated2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_INTEGER.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -22,10 +22,10 @@ xer_type_encoder_f CN_IntegerUnlimited_encode_xer;
|
|||
|
||||
int
|
||||
CN_IntegerUnlimited_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_NativeInteger.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -145,7 +145,7 @@ xer_type_encoder_f CN_IntegerMinMax_encode_xer;
|
|||
|
||||
int
|
||||
CN_IntegerMinMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
|
@ -161,7 +161,7 @@ CN_IntegerMinMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_NativeInteger.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -281,7 +281,7 @@ xer_type_encoder_f CN_IntegerMinLow_encode_xer;
|
|||
|
||||
int
|
||||
CN_IntegerMinLow_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -421,7 +421,7 @@ xer_type_encoder_f NO_IntegerMinHigh_encode_xer;
|
|||
|
||||
int
|
||||
NO_IntegerMinHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -567,7 +567,7 @@ xer_type_encoder_f NO_IntegerLowHigh_encode_xer;
|
|||
|
||||
int
|
||||
NO_IntegerLowHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -713,7 +713,7 @@ xer_type_encoder_f CN_IntegerLowMax_encode_xer;
|
|||
|
||||
int
|
||||
CN_IntegerLowMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -853,7 +853,7 @@ xer_type_encoder_f NO_IntegerHighMax_encode_xer;
|
|||
|
||||
int
|
||||
NO_IntegerHighMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -999,7 +999,7 @@ xer_type_encoder_f NO_IntegerLowestMax_encode_xer;
|
|||
|
||||
int
|
||||
NO_IntegerLowestMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -1145,7 +1145,7 @@ xer_type_encoder_f NO_IntegerOutRange_encode_xer;
|
|||
|
||||
int
|
||||
NO_IntegerOutRange_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -1291,7 +1291,7 @@ xer_type_encoder_f NO_IntegerOutValue_encode_xer;
|
|||
|
||||
int
|
||||
NO_IntegerOutValue_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -1437,7 +1437,7 @@ xer_type_encoder_f OK_IntegerInRange1_encode_xer;
|
|||
|
||||
int
|
||||
OK_IntegerInRange1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -1577,7 +1577,7 @@ xer_type_encoder_f OK_IntegerInRange2_encode_xer;
|
|||
|
||||
int
|
||||
OK_IntegerInRange2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -1717,7 +1717,7 @@ xer_type_encoder_f OK_IntegerInRange3_encode_xer;
|
|||
|
||||
int
|
||||
OK_IntegerInRange3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -1857,7 +1857,7 @@ xer_type_encoder_f OK_IntegerInRange4_encode_xer;
|
|||
|
||||
int
|
||||
OK_IntegerInRange4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -1997,7 +1997,7 @@ xer_type_encoder_f OK_IntegerInRange5_encode_xer;
|
|||
|
||||
int
|
||||
OK_IntegerInRange5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -2137,7 +2137,7 @@ xer_type_encoder_f NO_IntegerInRange6_encode_xer;
|
|||
|
||||
int
|
||||
NO_IntegerInRange6_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -2290,10 +2290,10 @@ xer_type_encoder_f CN_IntegerEnumerated1_encode_xer;
|
|||
|
||||
int
|
||||
CN_IntegerEnumerated1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_NativeInteger.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2420,10 +2420,10 @@ xer_type_encoder_f NO_IntegerEnumerated2_encode_xer;
|
|||
|
||||
int
|
||||
NO_IntegerEnumerated2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_INTEGER.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -23,10 +23,10 @@ per_type_decoder_f CN_IntegerUnlimited_decode_uper;
|
|||
|
||||
int
|
||||
CN_IntegerUnlimited_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_INTEGER.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -154,7 +154,7 @@ per_type_decoder_f CN_IntegerMinMax_decode_uper;
|
|||
|
||||
int
|
||||
CN_IntegerMinMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -171,7 +171,7 @@ CN_IntegerMinMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_INTEGER.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -303,7 +303,7 @@ per_type_decoder_f CN_IntegerMinLow_decode_uper;
|
|||
|
||||
int
|
||||
CN_IntegerMinLow_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -461,7 +461,7 @@ per_type_decoder_f NO_IntegerMinHigh_decode_uper;
|
|||
|
||||
int
|
||||
NO_IntegerMinHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -619,7 +619,7 @@ per_type_decoder_f NO_IntegerLowHigh_decode_uper;
|
|||
|
||||
int
|
||||
NO_IntegerLowHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -777,7 +777,7 @@ per_type_decoder_f CN_IntegerLowMax_decode_uper;
|
|||
|
||||
int
|
||||
CN_IntegerLowMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -935,7 +935,7 @@ per_type_decoder_f NO_IntegerHighMax_decode_uper;
|
|||
|
||||
int
|
||||
NO_IntegerHighMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -1093,7 +1093,7 @@ per_type_decoder_f NO_IntegerLowestMax_decode_uper;
|
|||
|
||||
int
|
||||
NO_IntegerLowestMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -1251,7 +1251,7 @@ per_type_decoder_f NO_IntegerOutRange_decode_uper;
|
|||
|
||||
int
|
||||
NO_IntegerOutRange_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -1409,7 +1409,7 @@ per_type_decoder_f NO_IntegerOutValue_decode_uper;
|
|||
|
||||
int
|
||||
NO_IntegerOutValue_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -1567,7 +1567,7 @@ per_type_decoder_f OK_IntegerInRange1_decode_uper;
|
|||
|
||||
int
|
||||
OK_IntegerInRange1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -1719,7 +1719,7 @@ per_type_decoder_f OK_IntegerInRange2_decode_uper;
|
|||
|
||||
int
|
||||
OK_IntegerInRange2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -1871,7 +1871,7 @@ per_type_decoder_f OK_IntegerInRange3_decode_uper;
|
|||
|
||||
int
|
||||
OK_IntegerInRange3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -2023,7 +2023,7 @@ per_type_decoder_f OK_IntegerInRange4_decode_uper;
|
|||
|
||||
int
|
||||
OK_IntegerInRange4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -2175,7 +2175,7 @@ per_type_decoder_f OK_IntegerInRange5_decode_uper;
|
|||
|
||||
int
|
||||
OK_IntegerInRange5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -2333,7 +2333,7 @@ per_type_decoder_f NO_IntegerInRange6_decode_uper;
|
|||
|
||||
int
|
||||
NO_IntegerInRange6_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
long value;
|
||||
|
||||
|
@ -2498,10 +2498,10 @@ per_type_decoder_f CN_IntegerEnumerated1_decode_uper;
|
|||
|
||||
int
|
||||
CN_IntegerEnumerated1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_INTEGER.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2636,10 +2636,10 @@ per_type_decoder_f NO_IntegerEnumerated2_decode_uper;
|
|||
|
||||
int
|
||||
NO_IntegerEnumerated2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_INTEGER.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -22,7 +22,7 @@ xer_type_encoder_f OK_Integer1_encode_xer;
|
|||
|
||||
int
|
||||
OK_Integer1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
|
@ -38,7 +38,7 @@ OK_Integer1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_NativeInteger.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -158,7 +158,7 @@ xer_type_encoder_f OK_Integer2_encode_xer;
|
|||
|
||||
int
|
||||
OK_Integer2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
|
@ -174,7 +174,7 @@ OK_Integer2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_NativeInteger.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -294,7 +294,7 @@ xer_type_encoder_f OK_Integer3_encode_xer;
|
|||
|
||||
int
|
||||
OK_Integer3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
|
@ -310,7 +310,7 @@ OK_Integer3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_NativeInteger.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -430,7 +430,7 @@ xer_type_encoder_f OK_Integer4_encode_xer;
|
|||
|
||||
int
|
||||
OK_Integer4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
|
@ -446,7 +446,7 @@ OK_Integer4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_NativeInteger.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -566,7 +566,7 @@ xer_type_encoder_f NO_Integer5_encode_xer;
|
|||
|
||||
int
|
||||
NO_Integer5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
const INTEGER_t *st = (const INTEGER_t *)sptr;
|
||||
|
||||
if(!sptr) {
|
||||
|
@ -583,7 +583,7 @@ NO_Integer5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_INTEGER.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -931,10 +931,10 @@ xer_type_encoder_f TypeRef_encode_xer;
|
|||
|
||||
int
|
||||
TypeRef_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_Sequence.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -932,10 +932,10 @@ xer_type_encoder_f TypeRef_encode_xer;
|
|||
|
||||
int
|
||||
TypeRef_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_Sequence.check_constraints;
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -23,7 +23,7 @@ extern asn_TYPE_descriptor_t asn_DEF_Attribute;
|
|||
|
||||
static int
|
||||
memb_identifier_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_consume_bytes_f *app_errlog, void *app_key) {
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_ERRLOG(app_errlog, app_key,
|
||||
|
@ -37,7 +37,7 @@ memb_identifier_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
/* Nothing is here. See below */
|
||||
}
|
||||
|
||||
return td->check_constraints(td, sptr, app_errlog, app_key);
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue