aboutsummaryrefslogtreecommitdiffstats
path: root/skeletons/INTEGER_oer.c
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2017-07-07 10:09:51 -0700
committerLev Walkin <vlm@lionet.info>2017-08-02 13:32:17 -0700
commited3a4ae4ace5c4a1cc2d5b2c58222376e11b3c08 (patch)
treecb836fd72b30717e756950addff52602cc93c7b7 /skeletons/INTEGER_oer.c
parenta7a240e8a154811b7dde14062bbea54734a76799 (diff)
INTEGER decoding stub
Diffstat (limited to 'skeletons/INTEGER_oer.c')
-rw-r--r--skeletons/INTEGER_oer.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/skeletons/INTEGER_oer.c b/skeletons/INTEGER_oer.c
new file mode 100644
index 00000000..f21850ea
--- /dev/null
+++ b/skeletons/INTEGER_oer.c
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2017 Lev Walkin <vlm@lionet.info>.
+ * All rights reserved.
+ * Redistribution and modifications are permitted subject to BSD license.
+ */
+#ifndef ASN_DISABLE_OER_SUPPORT
+
+#include <asn_internal.h>
+#include <INTEGER.h>
+#include <errno.h>
+
+asn_dec_rval_t
+INTEGER_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_oer_constraints_t *constraints, void **sptr,
+ const void *ptr, size_t size) {
+ asn_INTEGER_specifics_t *specs = (asn_INTEGER_specifics_t *)td->specifics;
+ asn_dec_rval_t rval = {RC_OK, 0};
+ INTEGER_t *st = (INTEGER_t *)*sptr;
+ asn_oer_constraint_t *ct;
+ int repeat;
+
+ (void)opt_codec_ctx;
+
+ if(!st) {
+ st = (INTEGER_t *)(*sptr = CALLOC(1, sizeof(*st)));
+ if(!st) ASN__DECODE_FAILED;
+ }
+
+ if(!constraints) constraints = td->oer_constraints;
+ ct = constraints ? &constraints->value : 0;
+
+ FREEMEM(st->buf);
+ st->buf = 0;
+ st->size = 0;
+}
+
+#endif /* ASN_DISABLE_OER_SUPPORT */