+/**
+ * \brief stack for BER constructed items
+ *
+ * data structure for con stack.. a little peculiar. Since we can't
+ * deallocate memory we reuse stack items (popped items gets reused)
+ *
+ *\verbatim
+ * +---+ +---+ +---+ +---+
+ * NULL -|p n|-----|p n|-----|p n|-----|p n|-- NULL
+ * +---+ +---+ +---+ +---+
+ * | |
+ * stack_first stack_top reused item
+ *\endverbatim
+ */
+struct odr_constack
+{
+ const unsigned char *base; /** starting point of data */
+ int base_offset;
+ int len; /** length of data, if known, else -1
+ (decoding only) */
+ const unsigned char *lenb; /** where to encode length */
+ int len_offset;
+ int lenlen; /** length of length-field */
+ const char *name; /** name of stack entry */
+
+ struct odr_constack *prev; /** pointer back in stack */
+ struct odr_constack *next; /** pointer forward */
+};
+
+#define ODR_MAX_STACK 2000
+
+/**
+ * \brief ODR private data
+ */