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
d0625682
Commit
d0625682
authored
Aug 25, 2006
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-Dasn_DEF is not -DPDU
parent
5e2f23e5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
9 deletions
+14
-9
doc/asn1c-quick.pdf
doc/asn1c-quick.pdf
+0
-0
examples/sample.source.MHEG5/Makefile
examples/sample.source.MHEG5/Makefile
+1
-1
examples/sample.source.PKIX1/Makefile
examples/sample.source.PKIX1/Makefile
+1
-1
examples/sample.source.TAP3/Makefile
examples/sample.source.TAP3/Makefile
+1
-1
skeletons/converter-sample.c
skeletons/converter-sample.c
+11
-6
No files found.
doc/asn1c-quick.pdf
View file @
d0625682
No preview for this file type
examples/sample.source.MHEG5/Makefile
View file @
d0625682
...
@@ -472,7 +472,7 @@ InterchangedObject.c: ../ISO13522-MHEG-5.asn regenerate.Makefile
...
@@ -472,7 +472,7 @@ InterchangedObject.c: ../ISO13522-MHEG-5.asn regenerate.Makefile
ASN_CONVERTER
=
../../skeletons/converter-sample.c
ASN_CONVERTER
=
../../skeletons/converter-sample.c
$(TARGET).o
:
$(ASN_CONVERTER)
$(TARGET).o
:
$(ASN_CONVERTER)
$(CC)
$(CFLAGS)
-D
asn_DEF
=
asn_DEF_
InterchangedObject
-o
$(TARGET)
.o
-c
$(ASN_CONVERTER)
$(CC)
$(CFLAGS)
-D
PDU
=
InterchangedObject
-o
$(TARGET)
.o
-c
$(ASN_CONVERTER)
distclean
:
clean
distclean
:
clean
rm
-f
$(ASN_MODULE_SOURCES)
$(ASN_MODULE_HEADERS)
rm
-f
$(ASN_MODULE_SOURCES)
$(ASN_MODULE_HEADERS)
...
...
examples/sample.source.PKIX1/Makefile
View file @
d0625682
...
@@ -375,7 +375,7 @@ Certificate.c: regenerate.Makefile
...
@@ -375,7 +375,7 @@ Certificate.c: regenerate.Makefile
ASN_CONVERTER
=
../../skeletons/converter-sample.c
ASN_CONVERTER
=
../../skeletons/converter-sample.c
$(TARGET).o
:
$(ASN_CONVERTER)
$(TARGET).o
:
$(ASN_CONVERTER)
$(CC)
$(CFLAGS)
-D
asn_DEF
=
asn_DEF_
Certificate
-o
$(TARGET)
.o
-c
$(ASN_CONVERTER)
$(CC)
$(CFLAGS)
-D
PDU
=
Certificate
-o
$(TARGET)
.o
-c
$(ASN_CONVERTER)
distclean
:
clean
distclean
:
clean
rm
-f
$(ASN_MODULE_SOURCES)
$(ASN_MODULE_HEADERS)
rm
-f
$(ASN_MODULE_SOURCES)
$(ASN_MODULE_HEADERS)
...
...
examples/sample.source.TAP3/Makefile
View file @
d0625682
...
@@ -702,7 +702,7 @@ DataInterChange.c: ../tap3.asn1 regenerate.Makefile
...
@@ -702,7 +702,7 @@ DataInterChange.c: ../tap3.asn1 regenerate.Makefile
ASN_CONVERTER
=
../../skeletons/converter-sample.c
ASN_CONVERTER
=
../../skeletons/converter-sample.c
$(TARGET).o
:
$(ASN_CONVERTER)
$(TARGET).o
:
$(ASN_CONVERTER)
$(CC)
$(CFLAGS)
-D
asn_DEF
=
asn_DEF_
DataInterChange
-o
$(TARGET)
.o
-c
$(ASN_CONVERTER)
$(CC)
$(CFLAGS)
-D
PDU
=
DataInterChange
-o
$(TARGET)
.o
-c
$(ASN_CONVERTER)
distclean
:
clean
distclean
:
clean
rm
-f
$(ASN_MODULE_SOURCES)
$(ASN_MODULE_HEADERS)
rm
-f
$(ASN_MODULE_SOURCES)
$(ASN_MODULE_HEADERS)
...
...
skeletons/converter-sample.c
View file @
d0625682
/*
/*
* Generic
decod
er template for a selected ASN.1 type.
* Generic
convert
er template for a selected ASN.1 type.
* Copyright (c) 2005 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Copyright (c) 2005
, 2006
Lev Walkin <vlm@lionet.info>. All rights reserved.
*
*
* To compile with your own ASN.1 type, please redefine the
asn_DEF
as shown:
* To compile with your own ASN.1 type, please redefine the
PDU
as shown:
*
*
* cc -D
asn_DEF=asn_DEF_MyCustomType -o myDecoder.o -c asn-decoder-templat
e.c
* cc -D
PDU=MyCustomType -o myDecoder.o -c converter-sampl
e.c
*/
*/
#ifdef HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#include <config.h>
...
@@ -21,7 +21,12 @@
...
@@ -21,7 +21,12 @@
#include <asn_application.h>
#include <asn_application.h>
#include <asn_internal.h>
/* for _ASN_DEFAULT_STACK_MAX */
#include <asn_internal.h>
/* for _ASN_DEFAULT_STACK_MAX */
extern
asn_TYPE_descriptor_t
asn_DEF
;
/* ASN.1 type to be decoded */
/* Convert "Type" defined by -DPDU into "asn_DEF_Type" */
#define ASN_DEF_PDU(t) asn_DEF_ ## t
#define DEF_PDU_Type(t) ASN_DEF_PDU(t)
#define PDU_Type DEF_PDU_Type(PDU)
extern
asn_TYPE_descriptor_t
PDU_Type
;
/* ASN.1 type to be decoded */
#ifdef ASN_PDU_COLLECTION
/* Generated by asn1c: -pdu=... */
#ifdef ASN_PDU_COLLECTION
/* Generated by asn1c: -pdu=... */
extern
asn_TYPE_descriptor_t
*
asn_pdu_collection
[];
extern
asn_TYPE_descriptor_t
*
asn_pdu_collection
[];
#endif
#endif
...
@@ -66,7 +71,7 @@ DEBUG(const char *fmt, ...) {
...
@@ -66,7 +71,7 @@ DEBUG(const char *fmt, ...) {
int
int
main
(
int
ac
,
char
**
av
)
{
main
(
int
ac
,
char
**
av
)
{
static
asn_TYPE_descriptor_t
*
pduType
=
&
asn_DEF
;
static
asn_TYPE_descriptor_t
*
pduType
=
&
PDU_Type
;
ssize_t
suggested_bufsize
=
8192
;
/* close or equal to stdio buffer */
ssize_t
suggested_bufsize
=
8192
;
/* close or equal to stdio buffer */
int
number_of_iterations
=
1
;
int
number_of_iterations
=
1
;
int
num
;
int
num
;
...
...
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