2004-06-03 03:38:44 +00:00
|
|
|
#ifndef ASN1_COMPILER_H
|
|
|
|
#define ASN1_COMPILER_H
|
|
|
|
|
|
|
|
#include <asn1parser.h>
|
|
|
|
|
|
|
|
enum asn1c_flags {
|
|
|
|
A1C_NOFLAGS,
|
|
|
|
/*
|
|
|
|
* Debug the compiler.
|
|
|
|
*/
|
|
|
|
A1C_DEBUG = 0x0001,
|
|
|
|
/*
|
|
|
|
* Do not split the target output in several files, just print it.
|
|
|
|
* (Note: the output is not likely to be compilable in this case).
|
|
|
|
*/
|
|
|
|
A1C_PRINT_COMPILED = 0x0002,
|
|
|
|
/*
|
|
|
|
* Generate only the tables for ASN.1 types,
|
|
|
|
* do not emit ASN.1 parsing support code.
|
|
|
|
*/
|
|
|
|
A1C_OMIT_SUPPORT_CODE = 0x0004,
|
|
|
|
/*
|
2013-03-27 08:56:23 +00:00
|
|
|
* Use wide types by default (INTEGER_t etc) instead of native/long.
|
2004-06-03 03:38:44 +00:00
|
|
|
*/
|
2013-03-27 08:56:23 +00:00
|
|
|
A1C_USE_WIDE_TYPES = 0x0008,
|
2004-06-03 03:38:44 +00:00
|
|
|
/*
|
|
|
|
* Do not use C99 extensions.
|
|
|
|
*/
|
|
|
|
A1C_NO_C99 = 0x0010,
|
|
|
|
/*
|
|
|
|
* Enable use of unnamed unions (non-portable feature).
|
|
|
|
*/
|
|
|
|
A1C_UNNAMED_UNIONS = 0x0020,
|
2004-09-06 08:07:29 +00:00
|
|
|
/*
|
|
|
|
* Don't make the asn1_DEF_'s of structure members "static".
|
|
|
|
*/
|
|
|
|
A1C_ALL_DEFS_GLOBAL = 0x0040,
|
2004-09-26 13:11:31 +00:00
|
|
|
/*
|
|
|
|
* Do not generate constraint checking code.
|
|
|
|
*/
|
|
|
|
A1C_NO_CONSTRAINTS = 0x0080,
|
2005-01-28 12:18:50 +00:00
|
|
|
/*
|
|
|
|
* Generate type_id_PR_member things identifiers of id_PR_member.
|
|
|
|
*/
|
2005-03-04 08:52:50 +00:00
|
|
|
A1C_COMPOUND_NAMES = 0x0100,
|
2005-03-05 00:33:27 +00:00
|
|
|
/*
|
|
|
|
* Do not generate courtesy #includes for external dependencies.
|
|
|
|
*/
|
|
|
|
A1C_NO_INCLUDE_DEPS = 0x0200,
|
2005-07-24 08:28:39 +00:00
|
|
|
/*
|
|
|
|
* Compile members of CHOICE as indirect pointers.
|
|
|
|
*/
|
|
|
|
A1C_INDIRECT_CHOICE = 0x0400,
|
2005-10-06 10:09:34 +00:00
|
|
|
/*
|
2013-03-26 02:09:04 +00:00
|
|
|
* -flink-skeletons
|
|
|
|
* Symlink support files rather than copy them.
|
2005-10-06 10:09:34 +00:00
|
|
|
*/
|
2013-03-26 02:09:04 +00:00
|
|
|
A1C_LINK_SKELETONS = 0x0800,
|
2017-07-06 14:52:39 +00:00
|
|
|
|
2005-11-26 11:25:14 +00:00
|
|
|
/*
|
2006-09-23 02:52:12 +00:00
|
|
|
* -pdu={all|auto|Type}
|
2005-11-26 11:25:14 +00:00
|
|
|
* Generate PDU table
|
|
|
|
*/
|
2013-10-11 21:29:38 +00:00
|
|
|
A1C_PDU_ALL = 0x2000,
|
2006-09-23 02:52:12 +00:00
|
|
|
A1C_PDU_AUTO = 0x4000,
|
2010-10-07 08:25:37 +00:00
|
|
|
A1C_PDU_TYPE = 0x8000,
|
|
|
|
/*
|
|
|
|
* -fincludes-quoted
|
|
|
|
* Avoid generating #include <foo>, generate "foo" instead.
|
|
|
|
*/
|
2013-10-11 21:29:38 +00:00
|
|
|
A1C_INCLUDES_QUOTED = 0x10000,
|
|
|
|
/*
|
|
|
|
* -fline-refs
|
|
|
|
* Include ASN.1 module's line numbers in comments.
|
|
|
|
*/
|
2017-07-06 14:52:39 +00:00
|
|
|
A1C_LINE_REFS = 0x20000,
|
|
|
|
/*
|
|
|
|
* -gen-OER
|
|
|
|
* Generate Octet Encoding Rules support code
|
|
|
|
*/
|
|
|
|
A1C_GEN_OER = 0x40000,
|
|
|
|
/*
|
|
|
|
* -gen-PER
|
|
|
|
* Generate Packed Encoding Rules support code
|
|
|
|
*/
|
|
|
|
A1C_GEN_PER = 0x80000,
|
2017-11-12 02:04:26 +00:00
|
|
|
/*
|
2017-11-15 07:06:47 +00:00
|
|
|
* Generate converter-example.c and converter-example.mk
|
2017-11-12 02:04:26 +00:00
|
|
|
*/
|
|
|
|
A1C_GEN_EXAMPLE = 0x100000,
|
2004-06-03 03:38:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Compile the ASN.1 specification.
|
|
|
|
*/
|
2017-11-15 06:22:02 +00:00
|
|
|
int asn1_compile(asn1p_t *asn, const char *datadir, const char *destdir, enum asn1c_flags,
|
2006-03-17 01:47:57 +00:00
|
|
|
int argc, int optc, char **argv);
|
2004-06-03 03:38:44 +00:00
|
|
|
|
2006-09-23 02:52:12 +00:00
|
|
|
void asn1c__add_pdu_type(const char *typename);
|
|
|
|
|
2004-06-03 03:38:44 +00:00
|
|
|
#endif /* ASN1_COMPILER_H */
|