blob: c15729ca62a6f375a90c231b091d9ecc88954a31 [file] [log] [blame]
Lev Walkinf15320b2004-06-03 03:38:44 +00001/*-
2 * Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
3 * Redistribution and modifications are permitted subject to BSD license.
4 */
5#ifndef _CONSTR_SEQUENCE_H_
6#define _CONSTR_SEQUENCE_H_
7
8#include <constr_TYPE.h>
9
10/*
11 * A single element of the SEQUENCE type.
12 */
13typedef struct asn1_SEQUENCE_element_s {
14 int memb_offset; /* Offset of the element */
15 int optional; /* Whether the element is optional */
16 ber_tlv_tag_t tag; /* Outmost (most immediate) tag */
17 int tag_mode; /* IMPLICIT/no/EXPLICIT tag at current level */
18 asn1_TYPE_descriptor_t
19 *type; /* Member type descriptor */
20 char *name; /* ASN.1 identifier of the element */
21} asn1_SEQUENCE_element_t;
22
23typedef struct asn1_SEQUENCE_specifics_s {
24 /*
25 * Target structure description.
26 */
27 int struct_size; /* Size of the target structure. */
28 int ctx_offset; /* Offset of the ber_dec_ctx_t member */
29
30 /*
31 * Members of the SEQUENCE structure.
32 */
33 asn1_SEQUENCE_element_t *elements;
34 int elements_count;
35
36 /*
37 * Description of an extensions group.
38 */
39 int ext_after; /* Extensions start after this member */
40 int ext_before; /* Extensions stop before this member */
41} asn1_SEQUENCE_specifics_t;
42
43
44/*
45 * A set specialized functions dealing with the SEQUENCE type.
46 */
47asn_constr_check_f SEQUENCE_constraint;
48ber_type_decoder_f SEQUENCE_decode_ber;
49der_type_encoder_f SEQUENCE_encode_der;
50asn_struct_print_f SEQUENCE_print;
51asn_struct_free_f SEQUENCE_free;
52
53#endif /* _CONSTR_SEQUENCE_H_ */