2004-06-03 03:38:44 +00:00
|
|
|
/*-
|
|
|
|
* Copyright (c) 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
|
|
|
|
* Redistribution and modifications are permitted subject to BSD license.
|
|
|
|
*/
|
|
|
|
/*
|
|
|
|
* Please read the NativeInteger.h for the explanation wrt. differences between
|
|
|
|
* INTEGER and NativeInteger.
|
|
|
|
* Basically, both are decoders and encoders of ASN.1 INTEGER type, but this
|
|
|
|
* implementation deals with the standard (machine-specific) representation
|
|
|
|
* of them instead of using the platform-independent buffer.
|
|
|
|
*/
|
2004-09-22 16:06:28 +00:00
|
|
|
#include <asn_internal.h>
|
2004-06-03 03:38:44 +00:00
|
|
|
#include <NativeEnumerated.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
* NativeEnumerated basic type description.
|
|
|
|
*/
|
2004-09-29 13:26:15 +00:00
|
|
|
static ber_tlv_tag_t asn_DEF_NativeEnumerated_tags[] = {
|
2004-06-03 03:38:44 +00:00
|
|
|
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
|
|
|
|
};
|
2004-09-29 13:26:15 +00:00
|
|
|
asn_TYPE_descriptor_t asn_DEF_NativeEnumerated = {
|
2004-06-03 03:38:44 +00:00
|
|
|
"ENUMERATED", /* The ASN.1 type is still ENUMERATED */
|
2004-10-20 15:50:55 +00:00
|
|
|
"ENUMERATED",
|
2004-09-22 16:06:28 +00:00
|
|
|
NativeInteger_free,
|
|
|
|
NativeInteger_print,
|
2004-06-03 03:38:44 +00:00
|
|
|
asn_generic_no_constraint,
|
|
|
|
NativeInteger_decode_ber,
|
|
|
|
NativeInteger_encode_der,
|
2004-09-22 16:06:28 +00:00
|
|
|
0, /* Not implemented yet */
|
|
|
|
NativeInteger_encode_xer,
|
2004-06-03 03:38:44 +00:00
|
|
|
0, /* Use generic outmost tag fetcher */
|
2004-09-29 13:26:15 +00:00
|
|
|
asn_DEF_NativeEnumerated_tags,
|
|
|
|
sizeof(asn_DEF_NativeEnumerated_tags) / sizeof(asn_DEF_NativeEnumerated_tags[0]),
|
|
|
|
asn_DEF_NativeEnumerated_tags, /* Same as above */
|
|
|
|
sizeof(asn_DEF_NativeEnumerated_tags) / sizeof(asn_DEF_NativeEnumerated_tags[0]),
|
2004-08-20 13:23:42 +00:00
|
|
|
0, 0, /* No members */
|
2004-06-05 08:17:50 +00:00
|
|
|
0 /* No specifics */
|
2004-06-03 03:38:44 +00:00
|
|
|
};
|
2004-08-20 13:23:42 +00:00
|
|
|
|