1 This new release, 1.3, consists of some improvements and bug fixes:
4 * Corrected bug in generic table decoder wrt. indefinite length elements
5 * Corrected compiler access to freed memory (bug reported by Markku Savela)
6 * Broke asnwish.c into two pieces so that one can build ones own wish
7 * Added "beredit" tool (based on asnwish, allowes to edit BER messages)
10 * Generic table decoding routines with callback mechanism in tbl library
11 * New tool "berdecode", decoding any BER data, can also use table file
12 * New Tcl/Tk tool "asnwish", reads table files, access to grammar, en-/decoding
13 * Fix for tag values > 2^14 (credits to Enrico Badella)
14 * Fix for table-encoding tag values dividable by 128
15 * Small fix in AsnBits::GetBit to return TRUE (i.e., 1) instead of #bit in byte
18 * Added isPdu flag to tables
19 * Added number range checks during parsing
22 * Small fix of C value string generation w char >127 (credits to Marc LeFur)
23 * Added (limited) size constraints, bitstring and enumeration names to tables
26 * Made snacc.h more C++-readable (credits to Steve Walker).
27 * Improved dependency generation for stupid makedepends.
28 * Corrected PeekTag to peek into buffer only as far as necessary.
29 * Added installable error handler.
30 * Fixed small glitch in idl-code generator (credits to Markku Savela).
31 * Finally fixed cut-and-paste error in SEQUENCE OF parsing.
34 * Continued porting C, C++, tbl to 64 bit, any endianness: Hash typedef,
35 PeekTag algorithm used by tables.
36 * Fixed cut-and-paste error in SEQUENCE OF parsing.
37 * Added missing initialisation of exponent in asn-real.[Cc].
38 * Fixed tbl-free.c and some other table-related bugs.
39 * Added casts and stuff for picky C++ compilers.
40 * Incorporated all valid bug fixes from snacc-bugs.
41 * Initial move of tcl stuff to tcl7.6/tk4.2/tree4.1.
44 WARNING: the rest of this README is out of date!
47 For the newer releases, please look at
49 http://www.fokus.gmd.de/ovma/freeware/snacc/entry.html
51 Please send comments and bug reports to the new maintainer you will find
52 in the above web page.
54 Newer Snacc versions will continue to be made available at:
56 ftp://ftp.fokus.gmd.de/pub/freeware/snacc/
58 Robert Joop, 1997-02-16
62 For more up-to-date information, please refer to doc/snacc.ps.
64 The bug-report address given below was for Snacc 1.1.
69 snacc ASN.1 Compiler Release 1.1 - (updated Jul 93)
70 -----------------------------------------------------
72 This package provides the C/yacc/lex source code for snacc, an ASN.1
73 to C or C++ compiler. Snacc is short for "Sample Neufeld Asn.1 to C
74 Compiler" and ASN.1 stands for Abstract Syntax Notation One (CCITT
75 X.208/ ISO 8824). See the COPYRIGHT file for copyright information.
81 Given an ASN.1 source file(s) snacc can produce:
83 1. C routines for BER encoding, decoding, printing and freeing.
84 2. C++ routines for BER encoding, decoding, and printing.
85 3. A type table that can be used with C driver routines
86 for BER encoding, decoding, printing and freeing.
87 4. if you are really lucky, a core dump! :)
89 Snacc produces reasonably efficient C or C++ routines and data
90 structures to support BER encoding and decoding values of the given
91 ASN.1 data structures. Printing routines for the decoded values are
92 also generated. For C only, hierarchical freeing routines are
93 generated (but are not recommended for efficiency reasons).
95 When using the C or C++ (not table) options, snacc creates the
96 following C files for each ASN.1 source file (module):
98 1. .h file for the C/C++ translation of the ASN.1 data
99 structure and prototypes for the generated routines.
101 2. .c/.C file for the C/C++ encode, decode, print and free
104 When using the table option, snacc produces a type table file
105 (a BER encoding) that can later be loaded at runtime by the
106 table driven encoding and decoding routines.
108 See the latex or PostScript version of the documentation in the
109 snacc/doc directory for indepth information on this tool. For a quick
110 introduction, look at the examples in snacc/c_examples,
111 snacc/c++_examples and snacc/tbl_example.
114 Features of ASN.1 Supported
115 ---------------------------
117 - parses ASN.1 '90 (subtype notation etc.)
118 - macro definitions do not generate syntax errors but are
119 are not processed. (retained as string)
120 - value notation is parsed and for OBJECT IDENTIFIERs, INTEGERs
121 and BOOLEANS (any other value in { }'s is currently kept as a string)
122 - handles multiple ASN.1 module compiling/linking (IMPORTS/EXPORTS)
123 - some X.400 and SNMP macros are parsed
124 - supports ";" separted type or value definitions in the ASN.1 source.
125 This is useful when dealing with some macros that introduce parsing
126 problems. Does not require the ";"'s though.
127 - ANY DEFINED BY types are handled using the SNMP OBJECT-TYPE
128 macro to define the identifier to type mapping.
131 Bugs are still quite likely even though this is the second release of
132 snacc. if you find any or have other comments please email:
139 By default, the snacc makefile uses GNU bison and GNU flex (instead of
140 yacc and lex). If you do not have these installed, see the
141 snacc/src/README and snacc/src/makefile. Otherwise, type "make" in
142 this directory. Hopefully this will put the snacc binary in the
143 snacc/bin directory and build the C runtime library, the table library
144 and the table tools. Alternatively, type "make all" to install these
147 Compiling problems may occurr on different flavours of UNIX but they
148 should not be too difficult fix. Likely sources of problems include
149 non-standard include files and lex, yacc and cc idiosyncrasies.
150 If your yacc croaks with a message about too many productions use
151 bison. Same thing with lex -> use flex. Bison and flex are both
152 freely available from numerous ftp sites. (even cs.ubc.ca in /mirror2/gnu)
154 The makefiles take advantage of the file inclusion feature. Since this
155 has already been supported by UNIX System III make (somewhen around
156 1980), I consider it to be pretty portable. If your make is crippled,
157 either use a newer one (e.g. GNU make), or as a last resort, remove the
158 include statements and call make with `-f makehead makefile maketail'.
159 The dependencies have been moved into a separate file that is not
160 under cvs control. Otherwise, the makefiles would inflate the
161 repository unnecessarily. GNU make automatically makes the dependencies
162 if the file does not exist, but other makes simply give up. In that
163 case, an initial (empty) file has to be generated. The top level
164 makefile does this for you.
165 The behaviour of makedepend has been changed between X11R5 and R6.
166 The new version keeps the source files' dirname and replaces the suffix
167 only, the old version removed the dirname. The makefiles expect the
168 new behaviour. If you've still got the R5 makedepend, the compiler's
169 dependencies will be useless. (If you only install the code and don't
170 make any changes, this won't hurt you.)
172 The snacc compiler and the generated code will compile under ANSI and
173 non-ANSI C compilers. See the README and the makefile in the
174 snacc/src directory for more compiling information. Snacc has been
175 successfully installed on Sun SPARCs, HP700s, IBM RS 6000s, MIPS,
176 i486/Linux, Alpha OSF/1 and many other machines.
178 #-------------------------------------------------------------------------------
179 # $Header: /cvs/root/Security/SecuritySNACCRuntime/Attic/README,v 1.1.1.1 2001/05/18 23:14:04 mb Exp $
181 # Revision 1.1.1.1 2001/05/18 23:14:04 mb
182 # Move from private repository to open source repository
184 # Revision 1.1.1.1 1999/03/16 18:05:50 aram
185 # Originals from SMIME Free Library.
187 # Revision 1.14 1997/10/10 13:42:31 wan
188 # Corrected bug in generic table decoder wrt. indefinite length elements
189 # Corrected compiler access to freed memory (bug reported by Markku Savela)
190 # Broke asnwish.c into two pieces so that one can build ones on wish
191 # Added beredit tool (based on asnwish, allowes to edit BER messages)
193 # Revision 1.13 1997/09/16 14:57:59 wan
194 # Proper description of last-minute changes
196 # Revision 1.12 1997/09/05 07:51:04 wan
199 # Revision 1.11 1997/08/28 09:48:08 wan
200 # Added description of changes
202 # Revision 1.10 1997/06/19 09:32:22 wan
203 # Added 1.3b3 change description
205 # Revision 1.9 1997/05/07 15:20:57 wan
206 # Added (limited) size constraints, bitstring and enumeration names to tables
208 # Revision 1.8 1997/04/07 13:14:16 wan
209 # Final README for 1.3b1
211 # Revision 1.7 1997/03/20 15:50:24 wan
214 # Revision 1.6 1997/02/16 22:26:40 rj
217 # Revision 1.5 1997/02/16 20:23:14 rj
218 # final release of snacc 1.2rj
220 # Revision 1.4 1995/09/07 20:54:03 rj
221 # check-in for release 1.2rj.8
223 # Revision 1.3 1995/02/22 09:54:05 rj
224 # added Alpha OSF/1 to the list of supported platforms.
226 # Revision 1.2 1994/09/01 01:40:54 rj
227 # some word about makefile inclusion and dependencies added.
229 # Revision 1.1 1994/08/28 11:02:04 rj