vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1 | /*- |
| 2 | * Copyright (c) 2004 Lev Walkin <vlm@lionet.info>. All rights reserved. |
| 3 | * Redistribution and modifications are permitted subject to BSD license. |
| 4 | */ |
| 5 | /* |
| 6 | * Please read the NativeInteger.h for the explanation wrt. differences between |
| 7 | * INTEGER and NativeInteger. |
| 8 | * Basically, both are decoders and encoders of ASN.1 INTEGER type, but this |
| 9 | * implementation deals with the standard (machine-specific) representation |
| 10 | * of them instead of using the platform-independent buffer. |
| 11 | */ |
| 12 | #include <NativeEnumerated.h> |
| 13 | |
| 14 | /* |
| 15 | * NativeEnumerated basic type description. |
| 16 | */ |
| 17 | static ber_tlv_tag_t asn1_DEF_NativeEnumerated_tags[] = { |
| 18 | (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) |
| 19 | }; |
| 20 | asn1_TYPE_descriptor_t asn1_DEF_NativeEnumerated = { |
| 21 | "ENUMERATED", /* The ASN.1 type is still ENUMERATED */ |
| 22 | asn_generic_no_constraint, |
| 23 | NativeInteger_decode_ber, |
| 24 | NativeInteger_encode_der, |
| 25 | NativeInteger_print, |
| 26 | NativeInteger_free, |
| 27 | 0, /* Use generic outmost tag fetcher */ |
| 28 | asn1_DEF_NativeEnumerated_tags, |
| 29 | sizeof(asn1_DEF_NativeEnumerated_tags)/sizeof(asn1_DEF_NativeEnumerated_tags[0]), |
| 30 | 1, /* Single UNIVERSAL tag may be implicitly overriden */ |
vlm | b42843a | 2004-06-05 08:17:50 +0000 | [diff] [blame] | 31 | 0, /* Always in primitive form */ |
| 32 | 0 /* No specifics */ |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 33 | }; |