Remove unused.
[libtasn1.git] / lib / int.h
blob09680de94b1eb11e74931589bde85558c5d95a0d
1 /*
2 * Copyright (C) 2004, 2006 Free Software Foundation, Inc.
3 * Copyright (C) 2002 Fabio Fiorina
5 * This file is part of LIBTASN1.
7 * The LIBTASN1 library is free software; you can redistribute it
8 * and/or modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 * 02110-1301, USA
23 #ifndef INT_H
24 #define INT_H
26 #include <libtasn1.h>
28 #include <defines.h>
31 #define LIBTASN1_DEBUG
32 #define LIBTASN1_DEBUG_PARSER
33 #define LIBTASN1_DEBUG_INTEGER
36 #include <mem.h>
38 #define MAX_LOG_SIZE 1024 /* maximum number of characters of a log message */
39 #define MAX_NAME_SIZE 128 /* maximum number of characters of a name inside an ASN1 file definiton */
40 #define MAX_ERROR_DESCRIPTION_SIZE 128 /* maximum number of characters of a description message */
42 /* define used for visiting trees */
43 #define UP 1
44 #define RIGHT 2
45 #define DOWN 3
47 /****************************************/
48 /* Returns the first 8 bits. */
49 /* Used with the field type of node_asn */
50 /****************************************/
51 #define type_field(x) (x&0xFF)
53 /* List of constants for field type of typedef node_asn */
54 #define TYPE_CONSTANT 1
55 #define TYPE_IDENTIFIER 2
56 #define TYPE_INTEGER 3
57 #define TYPE_BOOLEAN 4
58 #define TYPE_SEQUENCE 5
59 #define TYPE_BIT_STRING 6
60 #define TYPE_OCTET_STRING 7
61 #define TYPE_TAG 8
62 #define TYPE_DEFAULT 9
63 #define TYPE_SIZE 10
64 #define TYPE_SEQUENCE_OF 11
65 #define TYPE_OBJECT_ID 12
66 #define TYPE_ANY 13
67 #define TYPE_SET 14
68 #define TYPE_SET_OF 15
69 #define TYPE_DEFINITIONS 16
70 #define TYPE_TIME 17
71 #define TYPE_CHOICE 18
72 #define TYPE_IMPORTS 19
73 #define TYPE_NULL 20
74 #define TYPE_ENUMERATED 21
75 #define TYPE_GENERALSTRING 27
78 /***********************************************************************/
79 /* List of constants to better specify the type of typedef node_asn. */
80 /***********************************************************************/
81 /* Used with TYPE_TAG */
82 #define CONST_UNIVERSAL (1<<8)
83 #define CONST_PRIVATE (1<<9)
84 #define CONST_APPLICATION (1<<10)
85 #define CONST_EXPLICIT (1<<11)
86 #define CONST_IMPLICIT (1<<12)
88 #define CONST_TAG (1<<13) /* Used in ASN.1 assignement */
89 #define CONST_OPTION (1<<14)
90 #define CONST_DEFAULT (1<<15)
91 #define CONST_TRUE (1<<16)
92 #define CONST_FALSE (1<<17)
94 #define CONST_LIST (1<<18) /* Used with TYPE_INTEGER and TYPE_BIT_STRING */
95 #define CONST_MIN_MAX (1<<19)
97 #define CONST_1_PARAM (1<<20)
99 #define CONST_SIZE (1<<21)
101 #define CONST_DEFINED_BY (1<<22)
103 #define CONST_GENERALIZED (1<<23)
104 #define CONST_UTC (1<<24)
106 /* #define CONST_IMPORTS (1<<25) */
108 #define CONST_NOT_USED (1<<26)
109 #define CONST_SET (1<<27)
110 #define CONST_ASSIGN (1<<28)
112 #define CONST_DOWN (1<<29)
113 #define CONST_RIGHT (1<<30)
115 #endif /* INT_H */