Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
1f756280
Commit
1f756280
authored
Sep 29, 2004
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asn1_* renamed into asn_*; also added an argument to ber_decode[r] routines
parent
5e03376b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
27 deletions
+33
-27
doc/asn1c-usage.lyx
doc/asn1c-usage.lyx
+33
-27
doc/asn1c-usage.pdf
doc/asn1c-usage.pdf
+0
-0
No files found.
doc/asn1c-usage.lyx
View file @
1f756280
...
...
@@ -283,7 +283,7 @@ SimpleInteger ::= INTEGER
-- An integer with a very limited range
\layout LyX-Code
SmallInt ::= INTEGER (0..127)
Small
Positive
Int ::= INTEGER (0..127)
\layout LyX-Code
...
...
@@ -512,7 +512,11 @@ The character string with the following alphabet: space,
\begin_inset Quotes sld
\end_inset
\series bold
,
\series default
\begin_inset Quotes srd
\end_inset
...
...
@@ -636,14 +640,14 @@ z
\begin_inset Quotes srd
\end_inset
)
)
.
\layout Subsection
The VisibleString type
\layout Standard
The character string with the alphabet which is more or less a subset of
ASCII between
space and
ASCII between
the space and the
\begin_inset Quotes sld
\end_inset
...
...
@@ -655,8 +659,10 @@ The character string with the alphabet which is more or less a subset of
\begin_inset Quotes srd
\end_inset
(tilde).
Alternatively, the alphabet may be described as the PrintableString alphabet
symbol (tilde).
\layout Standard
Alternatively, the alphabet may be described as the PrintableString alphabet
presented earlier, plus the following characters:
\begin_inset Quotes sld
\end_inset
...
...
@@ -1586,10 +1592,10 @@ Description
\layout Standard
Normally the compiler hides the definitions (asn
1_DEF_xxx) of the inner
structure
elements (members of SEQUENCE, SET and other types).
Normally the compiler hides the definitions (asn
_DEF_xxx) of the inner structure
elements (members of SEQUENCE, SET and other types).
This option makes all such definitions global.
Enabling this option may pollute the namespace by making lots of asn
1
_DEF_xxx
Enabling this option may pollute the namespace by making lots of asn_DEF_xxx
structures globally visible, but will allow you to manipulate (encode and
decode) the individual members of any complex ASN.1 structure.
\end_inset
...
...
@@ -1894,7 +1900,7 @@ Rectangle_t *rect = ...;
\layout LyX-Code
asn
1_DEF_Rectangle->free_struct(&asn1
_DEF_Rectangle,
asn
_DEF_Rectangle->free_struct(&asn
_DEF_Rectangle,
\layout LyX-Code
rect, 0);
...
...
@@ -1909,7 +1915,7 @@ rect
for this Rectangle_t structure.
The
\emph on
asn
1
_DEF_Rectangle
asn_DEF_Rectangle
\emph default
is the type descriptor, which holds a collection of generic routines to
deal with the Rectangle_t structure.
...
...
@@ -2008,7 +2014,7 @@ ly valid and constrained to appropriate implicit or explicit subtype constraints
Each of the above function takes the type descriptor (
\emph on
asn
1
_DEF_\SpecialChar \ldots{}
asn_DEF_\SpecialChar \ldots{}
\emph default
) and the target structure (
...
...
@@ -2038,10 +2044,10 @@ simple_deserializer(const void *buffer, size_t buf_size) {
\layout LyX-Code
rval = asn
1_DEF_Rectangle->ber_decoder(
rval = asn
_DEF_Rectangle->ber_decoder(0,
\layout LyX-Code
&asn
1
_DEF_Rectangle,
&asn_DEF_Rectangle,
\layout LyX-Code
(void **)&rect,
...
...
@@ -2072,10 +2078,10 @@ simple_deserializer(const void *buffer, size_t buf_size) {
/* Free partially decoded rect */
\layout LyX-Code
asn
1
_DEF_Rectangle->free_struct(
asn_DEF_Rectangle->free_struct(
\layout LyX-Code
&asn
1
_DEF_Rectangle, rect, 0);
&asn_DEF_Rectangle, rect, 0);
\layout LyX-Code
return 0;
...
...
@@ -2188,13 +2194,13 @@ ber_decode
less wordy notation:
\layout LyX-Code
rval = ber_decode(
&asn1
_DEF_Rectangle, (void **)&rect,
rval = ber_decode(
0, &asn
_DEF_Rectangle, (void **)&rect,
\layout LyX-Code
buffer, buf_size);
\layout Standard
Note that the initial (asn
1
_DEF_Rectangle->ber_decoder) reference is gone,
Note that the initial (asn_DEF_Rectangle->ber_decoder) reference is gone,
and also the last argument (0) is no longer necessary.
\layout Standard
...
...
@@ -2205,7 +2211,7 @@ The BER de
\emph on
coder
\emph default
may fail because (
may fail because
of
(
\emph on
the following RC_\SpecialChar \ldots{}
codes are defined in ber_decoder.h
...
...
@@ -2262,7 +2268,7 @@ canonical
\layout Standard
As with BER decoder, the DER encoder may be invoked either directly from
the ASN.1 type descriptor (asn
1
_DEF_Rectangle) or from the stand-alone function,
the ASN.1 type descriptor (asn_DEF_Rectangle) or from the stand-alone function,
which is somewhat simpler:
\layout LyX-Code
...
...
@@ -2335,7 +2341,7 @@ simple_serializer(FILE *ostream, Rectangle_t *rect) {
\layout LyX-Code
er = der_encode(&asn
1
_DEF_Rect, rect,
er = der_encode(&asn_DEF_Rect, rect,
\layout LyX-Code
write_stream, ostream);
...
...
@@ -2495,7 +2501,7 @@ print_as_XML(FILE *ostream, Rectangle_t *rect) {
\layout LyX-Code
er = xer_encode(&asn
1
_DEF_Rect, rect,
er = xer_encode(&asn_DEF_Rect, rect,
\layout LyX-Code
XER_F_BASIC, /* BASIC-XER or CANONICAL-XER */
...
...
@@ -2570,7 +2576,7 @@ There are two ways to print the target structure: either invoke the print_struct
which is a simpler wrapper of the former:
\layout LyX-Code
asn_fprint(stdout, &asn
1
_DEF_Rectangle, rect);
asn_fprint(stdout, &asn_DEF_Rectangle, rect);
\layout Standard
Please look into constr_TYPE.h for the precise definition of asn_fprint()
...
...
@@ -2585,7 +2591,7 @@ Another practical alternative to this custom format printing would be to
xer_fprint() call:
\layout LyX-Code
xer_fprint(stdout, &asn
1
_DEF_Rectangle, rect);
xer_fprint(stdout, &asn_DEF_Rectangle, rect);
\layout Standard
See Section
...
...
@@ -2669,10 +2675,10 @@ struct my_figure *mf =
*/
\layout LyX-Code
asn
1
_DEF_Rectangle->free_struct(
asn_DEF_Rectangle->free_struct(
\layout LyX-Code
&asn
1
_DEF_Rectangle, &mf->rect,
&asn_DEF_Rectangle, &mf->rect,
\emph on
1
\emph default
...
...
@@ -2704,10 +2710,10 @@ Rectangle_t *rect =
*/
\layout LyX-Code
asn
1
_DEF_Rectangle->free_struct(
asn_DEF_Rectangle->free_struct(
\layout LyX-Code
&asn
1
_DEF_Rectangle, rect,
&asn_DEF_Rectangle, rect,
\emph on
0
\emph default
...
...
doc/asn1c-usage.pdf
View file @
1f756280
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment