blob: 515b0d568464b7c66b8378930592e3beb56ebb24 [file] [log] [blame]
Lev Walkind83172f2006-09-09 04:49:45 +00001ASN_MODULE_SOURCES= \
2 MegacoMessage.c \
3 AuthenticationHeader.c \
4 SecurityParmIndex.c \
5 SequenceNum.c \
6 AuthData.c \
7 Message.c \
8 MId.c \
9 DomainName.c \
10 IP4Address.c \
11 IP6Address.c \
12 PathName.c \
13 Transaction.c \
14 TransactionId.c \
15 TransactionRequest.c \
16 TransactionPending.c \
17 TransactionReply.c \
18 TransactionResponseAck.c \
19 TransactionAck.c \
20 ErrorDescriptor.c \
21 ErrorCode.c \
22 ErrorText.c \
23 ContextID.c \
24 ActionRequest.c \
25 ActionReply.c \
26 ContextRequest.c \
27 ContextAttrAuditRequest.c \
28 CommandRequest.c \
29 Command.c \
30 CommandReply.c \
31 TopologyRequest.c \
32 AmmRequest.c \
33 AmmDescriptor.c \
34 AmmsReply.c \
35 SubtractRequest.c \
36 AuditRequest.c \
37 AuditReply.c \
38 AuditResult.c \
39 TerminationAudit.c \
40 AuditReturnParameter.c \
41 AuditDescriptor.c \
42 NotifyRequest.c \
43 NotifyReply.c \
44 ObservedEventsDescriptor.c \
45 ObservedEvent.c \
46 EventName.c \
47 EventParameter.c \
48 ServiceChangeRequest.c \
49 ServiceChangeReply.c \
50 ServiceChangeResult.c \
51 WildcardField.c \
52 TerminationID.c \
53 TerminationIDList.c \
54 MediaDescriptor.c \
55 StreamDescriptor.c \
56 StreamParms.c \
57 LocalControlDescriptor.c \
58 StreamMode.c \
59 PropertyParm.c \
60 Name.c \
61 PkgdName.c \
62 Relation.c \
63 LocalRemoteDescriptor.c \
64 PropertyGroup.c \
65 TerminationStateDescriptor.c \
66 EventBufferControl.c \
67 ServiceState.c \
68 MuxDescriptor.c \
69 MuxType.c \
70 StreamID.c \
71 EventsDescriptor.c \
72 RequestedEvent.c \
73 RequestedActions.c \
74 EventDM.c \
75 SecondEventsDescriptor.c \
76 SecondRequestedEvent.c \
77 SecondRequestedActions.c \
78 EventBufferDescriptor.c \
79 EventSpec.c \
80 SignalsDescriptor.c \
81 SignalRequest.c \
82 SeqSigList.c \
83 Signal.c \
84 SignalType.c \
85 SignalName.c \
86 NotifyCompletion.c \
87 SigParameter.c \
88 RequestID.c \
89 ModemDescriptor.c \
90 ModemType.c \
91 DigitMapDescriptor.c \
92 DigitMapName.c \
93 DigitMapValue.c \
94 ServiceChangeParm.c \
95 ServiceChangeAddress.c \
96 ServiceChangeResParm.c \
97 ServiceChangeMethod.c \
98 ServiceChangeProfile.c \
99 PackagesDescriptor.c \
100 PackagesItem.c \
101 StatisticsDescriptor.c \
102 StatisticsParameter.c \
103 NonStandardData.c \
104 NonStandardIdentifier.c \
105 H221NonStandard.c \
106 TimeNotation.c \
107 Value.c
108
109ASN_MODULE_HEADERS= \
110 MegacoMessage.h \
111 AuthenticationHeader.h \
112 SecurityParmIndex.h \
113 SequenceNum.h \
114 AuthData.h \
115 Message.h \
116 MId.h \
117 DomainName.h \
118 IP4Address.h \
119 IP6Address.h \
120 PathName.h \
121 Transaction.h \
122 TransactionId.h \
123 TransactionRequest.h \
124 TransactionPending.h \
125 TransactionReply.h \
126 TransactionResponseAck.h \
127 TransactionAck.h \
128 ErrorDescriptor.h \
129 ErrorCode.h \
130 ErrorText.h \
131 ContextID.h \
132 ActionRequest.h \
133 ActionReply.h \
134 ContextRequest.h \
135 ContextAttrAuditRequest.h \
136 CommandRequest.h \
137 Command.h \
138 CommandReply.h \
139 TopologyRequest.h \
140 AmmRequest.h \
141 AmmDescriptor.h \
142 AmmsReply.h \
143 SubtractRequest.h \
144 AuditRequest.h \
145 AuditReply.h \
146 AuditResult.h \
147 TerminationAudit.h \
148 AuditReturnParameter.h \
149 AuditDescriptor.h \
150 NotifyRequest.h \
151 NotifyReply.h \
152 ObservedEventsDescriptor.h \
153 ObservedEvent.h \
154 EventName.h \
155 EventParameter.h \
156 ServiceChangeRequest.h \
157 ServiceChangeReply.h \
158 ServiceChangeResult.h \
159 WildcardField.h \
160 TerminationID.h \
161 TerminationIDList.h \
162 MediaDescriptor.h \
163 StreamDescriptor.h \
164 StreamParms.h \
165 LocalControlDescriptor.h \
166 StreamMode.h \
167 PropertyParm.h \
168 Name.h \
169 PkgdName.h \
170 Relation.h \
171 LocalRemoteDescriptor.h \
172 PropertyGroup.h \
173 TerminationStateDescriptor.h \
174 EventBufferControl.h \
175 ServiceState.h \
176 MuxDescriptor.h \
177 MuxType.h \
178 StreamID.h \
179 EventsDescriptor.h \
180 RequestedEvent.h \
181 RequestedActions.h \
182 EventDM.h \
183 SecondEventsDescriptor.h \
184 SecondRequestedEvent.h \
185 SecondRequestedActions.h \
186 EventBufferDescriptor.h \
187 EventSpec.h \
188 SignalsDescriptor.h \
189 SignalRequest.h \
190 SeqSigList.h \
191 Signal.h \
192 SignalType.h \
193 SignalName.h \
194 NotifyCompletion.h \
195 SigParameter.h \
196 RequestID.h \
197 ModemDescriptor.h \
198 ModemType.h \
199 DigitMapDescriptor.h \
200 DigitMapName.h \
201 DigitMapValue.h \
202 ServiceChangeParm.h \
203 ServiceChangeAddress.h \
204 ServiceChangeResParm.h \
205 ServiceChangeMethod.h \
206 ServiceChangeProfile.h \
207 PackagesDescriptor.h \
208 PackagesItem.h \
209 StatisticsDescriptor.h \
210 StatisticsParameter.h \
211 NonStandardData.h \
212 NonStandardIdentifier.h \
213 H221NonStandard.h \
214 TimeNotation.h \
215 Value.h
216
217ASN_MODULE_HEADERS+=BOOLEAN.h
218ASN_MODULE_SOURCES+=BOOLEAN.c
Lev Walkind83172f2006-09-09 04:49:45 +0000219ASN_MODULE_HEADERS+=INTEGER.h
220ASN_MODULE_HEADERS+=NativeEnumerated.h
221ASN_MODULE_HEADERS+=IA5String.h
222ASN_MODULE_SOURCES+=IA5String.c
223ASN_MODULE_SOURCES+=INTEGER.c
224ASN_MODULE_HEADERS+=NULL.h
225ASN_MODULE_SOURCES+=NULL.c
226ASN_MODULE_SOURCES+=NativeEnumerated.c
227ASN_MODULE_HEADERS+=NativeInteger.h
228ASN_MODULE_SOURCES+=NativeInteger.c
229ASN_MODULE_HEADERS+=OBJECT_IDENTIFIER.h
230ASN_MODULE_SOURCES+=OBJECT_IDENTIFIER.c
231ASN_MODULE_HEADERS+=asn_SEQUENCE_OF.h
232ASN_MODULE_SOURCES+=asn_SEQUENCE_OF.c
233ASN_MODULE_HEADERS+=asn_SET_OF.h
234ASN_MODULE_SOURCES+=asn_SET_OF.c
235ASN_MODULE_HEADERS+=constr_CHOICE.h
236ASN_MODULE_SOURCES+=constr_CHOICE.c
237ASN_MODULE_HEADERS+=constr_SEQUENCE.h
238ASN_MODULE_SOURCES+=constr_SEQUENCE.c
239ASN_MODULE_HEADERS+=constr_SEQUENCE_OF.h
240ASN_MODULE_SOURCES+=constr_SEQUENCE_OF.c
241ASN_MODULE_HEADERS+=constr_SET_OF.h
242ASN_MODULE_SOURCES+=constr_SET_OF.c
243ASN_MODULE_HEADERS+=asn_application.h
244ASN_MODULE_HEADERS+=asn_system.h
245ASN_MODULE_HEADERS+=asn_codecs.h
246ASN_MODULE_HEADERS+=asn_internal.h
247ASN_MODULE_HEADERS+=OCTET_STRING.h
248ASN_MODULE_SOURCES+=OCTET_STRING.c
249ASN_MODULE_HEADERS+=BIT_STRING.h
250ASN_MODULE_SOURCES+=BIT_STRING.c
251ASN_MODULE_SOURCES+=asn_codecs_prim.c
252ASN_MODULE_HEADERS+=asn_codecs_prim.h
253ASN_MODULE_HEADERS+=ber_tlv_length.h
254ASN_MODULE_SOURCES+=ber_tlv_length.c
255ASN_MODULE_HEADERS+=ber_tlv_tag.h
256ASN_MODULE_SOURCES+=ber_tlv_tag.c
257ASN_MODULE_HEADERS+=ber_decoder.h
258ASN_MODULE_SOURCES+=ber_decoder.c
259ASN_MODULE_HEADERS+=der_encoder.h
260ASN_MODULE_SOURCES+=der_encoder.c
261ASN_MODULE_HEADERS+=constr_TYPE.h
262ASN_MODULE_SOURCES+=constr_TYPE.c
263ASN_MODULE_HEADERS+=constraints.h
264ASN_MODULE_SOURCES+=constraints.c
265ASN_MODULE_HEADERS+=xer_support.h
266ASN_MODULE_SOURCES+=xer_support.c
267ASN_MODULE_HEADERS+=xer_decoder.h
268ASN_MODULE_SOURCES+=xer_decoder.c
269ASN_MODULE_HEADERS+=xer_encoder.h
270ASN_MODULE_SOURCES+=xer_encoder.c
271ASN_MODULE_HEADERS+=per_support.h
272ASN_MODULE_SOURCES+=per_support.c
273ASN_MODULE_HEADERS+=per_decoder.h
274ASN_MODULE_SOURCES+=per_decoder.c
275ASN_MODULE_HEADERS+=per_encoder.h
276ASN_MODULE_SOURCES+=per_encoder.c
Lev Walkin5aef2c52007-06-29 12:46:06 +0000277ASN_MODULE_HEADERS+=per_opentype.h
278ASN_MODULE_SOURCES+=per_opentype.c
Lev Walkinf5b49392006-09-12 06:19:15 +0000279ASN_CONVERTER_SOURCES+=converter-sample.c
Lev Walkind83172f2006-09-09 04:49:45 +0000280
281
282lib_LTLIBRARIES=libsomething.la
283libsomething_la_SOURCES=$(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS)
284
285# This file may be used as an input for make(3)
286# Remove the lines below to convert it into a pure .am file
Lev Walkin61c391b2006-09-28 09:19:34 +0000287TARGET = megaco-dump
Lev Walkin1f12da42006-09-24 19:47:07 +0000288CFLAGS += -DHAVE_CONFIG_H -DJUNKTEST -DPDU=MegacoMessage -I.
Lev Walkinf5b49392006-09-12 06:19:15 +0000289OBJS=${ASN_MODULE_SOURCES:.c=.o} ${ASN_CONVERTER_SOURCES:.c=.o}
Lev Walkind83172f2006-09-09 04:49:45 +0000290
291all: MegacoMessage.c $(TARGET)
292
293$(TARGET): ${OBJS}
294 $(CC) $(CFLAGS) -o $(TARGET) ${OBJS} $(LDFLAGS) $(LIBS)
295
296.SUFFIXES:
297.SUFFIXES: .c .o
298
299.c.o:
300 $(CC) $(CFLAGS) -o $@ -c $<
301
302clean:
303 rm -f $(TARGET)
304 rm -f $(OBJS)
305
306regen: regenerate-from-asn1-source
307
308regenerate-from-asn1-source:
Lev Walkind7f5cb92006-09-23 02:56:19 +0000309 ../../asn1c/asn1c -S ../../skeletons -pdu=MegacoMessage -fcompound-names ../rfc3525-MEDIA-GATEWAY-CONTROL.asn1
Lev Walkind83172f2006-09-09 04:49:45 +0000310
311
Lev Walkin13afe532006-09-18 21:30:04 +0000312MegacoMessage.c: ../sample.makefile.regen ../rfc3525-MEDIA-GATEWAY-CONTROL.asn1
Lev Walkincc7c94e2006-09-17 04:01:29 +0000313 make regen-makefile
314 @touch MegacoMessage.c
315 make
316
317regen-makefile:
Lev Walkinf5b49392006-09-12 06:19:15 +0000318 ASN1CMDOPTS="-fcompound-names" \
319 ASN1MODULES="../rfc3525-MEDIA-GATEWAY-CONTROL.asn1" \
320 ASN1PDU=MegacoMessage \
Lev Walkin61c391b2006-09-28 09:19:34 +0000321 PROGNAME=megaco-dump \
Lev Walkin2fd86de2006-09-13 02:10:23 +0000322 ../sample.makefile.regen
Lev Walkind83172f2006-09-09 04:49:45 +0000323
Lev Walkin1f12da42006-09-24 19:47:07 +0000324check: ${TARGET} check-ber check-xer check-per
325 @echo ================
326 @echo All tests passed
327 @echo ================
328
329check-ber:
Lev Walkin13afe532006-09-18 21:30:04 +0000330 @if test -f sample-MegacoMessage-1.[db]er ; then \
331 for f in sample-MegacoMessage-*.[db]er; do \
332 for b in 1 17 33 980 8192; do \
333 echo "Recoding $$f into XER and back ($$b)..."; \
334 ./${TARGET} -b $$b -iber -oxer $$f > ./.tmp.1.$$$$ || exit 2; \
Lev Walkin5aef2c52007-06-29 12:46:06 +0000335 ./${TARGET} -b $$b -ixer -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 3; \
336 diff ./.tmp.1.$$$$ ./.tmp.2.$$$$ || exit 4; \
Lev Walkin13afe532006-09-18 21:30:04 +0000337 rm -f ./.tmp.[12].$$$$; \
Lev Walkin1f12da42006-09-24 19:47:07 +0000338 echo "Test junking $$f (please wait)..."; \
Lev Walkin5aef2c52007-06-29 12:46:06 +0000339 ./${TARGET} -J0.0001 -n 1000 -b $$b -iber -onull $$f || exit 5; \
340 ./${TARGET} -J0.001 -n 1000 -b $$b -iber -onull $$f || exit 6; \
Lev Walkin13afe532006-09-18 21:30:04 +0000341 done; done; fi
Lev Walkin1f12da42006-09-24 19:47:07 +0000342
343check-xer:
Lev Walkin13afe532006-09-18 21:30:04 +0000344 @if test -f sample-MegacoMessage-1.xer ; then \
345 for f in sample-MegacoMessage-*.xer; do \
346 for b in 1 17 33 980 8192; do \
347 echo "Recoding $$f into DER and back ($$b)..."; \
348 ./${TARGET} -b $$b -ixer -oder $$f > ./.tmp.1.$$$$ || exit 2; \
Lev Walkin5aef2c52007-06-29 12:46:06 +0000349 ./${TARGET} -b $$b -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 3; \
350 diff $$f ./.tmp.2.$$$$ || exit 4; \
Lev Walkin13afe532006-09-18 21:30:04 +0000351 rm -f ./.tmp.[12].$$$$; \
Lev Walkin1f12da42006-09-24 19:47:07 +0000352 echo "Test junking $$f (please wait)..."; \
Lev Walkin5aef2c52007-06-29 12:46:06 +0000353 ./${TARGET} -J0.0001 -n 1000 -b $$b -ixer -onull $$f || exit 5; \
354 ./${TARGET} -J0.001 -n 1000 -b $$b -ixer -onull $$f || exit 6; \
Lev Walkin13afe532006-09-18 21:30:04 +0000355 done; done; fi
Lev Walkin1f12da42006-09-24 19:47:07 +0000356
357check-per:
Lev Walkin5aef2c52007-06-29 12:46:06 +0000358 @if test -f sample-MegacoMessage-1-nopad.per ; then \
359 for f in sample-MegacoMessage-[1-9]-nopad.per; do \
Lev Walkin13afe532006-09-18 21:30:04 +0000360 for b in 1 17 33 980 8192; do \
Lev Walkin5aef2c52007-06-29 12:46:06 +0000361 echo "Recoding non-padded $$f into DER into XER and back ($$b)..."; \
362 ./${TARGET} -b $$b -per-nopad -iper -oder $$f > ./.tmp.1.$$$$ || exit 2; \
363 ./${TARGET} -b $$b -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 3; \
364 ./${TARGET} -b $$b -ixer -oder ./.tmp.2.$$$$ > ./.tmp.3.$$$$ || exit 4; \
365 diff ./.tmp.1.$$$$ ./.tmp.3.$$$$ || exit 5; \
Lev Walkin13afe532006-09-18 21:30:04 +0000366 rm -f ./.tmp.[123].$$$$; \
Lev Walkin1f12da42006-09-24 19:47:07 +0000367 echo "Test junking $$f (please wait)..."; \
Lev Walkin5aef2c52007-06-29 12:46:06 +0000368 ./${TARGET} -J0.0001 -n 1000 -b $$b -per-nopad -iper -onull $$f || exit 6; \
369 ./${TARGET} -J0.001 -n 1000 -b $$b -per-nopad -iper -onull $$f || exit 7; \
Lev Walkin13afe532006-09-18 21:30:04 +0000370 done; done; fi
Lev Walkin5aef2c52007-06-29 12:46:06 +0000371 @if test -f sample-MegacoMessage-1.per ; then \
372 for f in sample-*-[1-9].per; do \
Lev Walkin13afe532006-09-18 21:30:04 +0000373 pdu=`echo $$f | sed -E -e "s/sample-([A-Za-z-]+)-[0-9].*/\1/"`; \
374 for b in 1 17 33 980 8192; do \
Lev Walkin5aef2c52007-06-29 12:46:06 +0000375 echo "Recoding $$f into DER into XER and back ($$b)..."; \
376 ./${TARGET} -b $$b -p $$pdu -iper -oder $$f > ./.tmp.1.$$$$ || exit 3; \
377 ./${TARGET} -b $$b -p $$pdu -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 4; \
378 ./${TARGET} -b $$b -p $$pdu -ixer -oper ./.tmp.2.$$$$ > ./.tmp.1.$$$$ || exit 5; \
379 diff $$f ./.tmp.1.$$$$ || exit 6; \
Lev Walkin13afe532006-09-18 21:30:04 +0000380 rm -f ./.tmp.[12].$$$$; \
Lev Walkin1f12da42006-09-24 19:47:07 +0000381 echo "Test junking $$f (please wait)..."; \
Lev Walkin5aef2c52007-06-29 12:46:06 +0000382 ./${TARGET} -J0.0001 -n 1000 -b $$b -iper -onull $$f || exit 7; \
383 ./${TARGET} -J0.001 -n 1000 -b $$b -iper -onull $$f || exit 8; \
Lev Walkin13afe532006-09-18 21:30:04 +0000384 done; done; fi
Lev Walkinc744a022006-09-15 18:33:25 +0000385
Lev Walkind83172f2006-09-09 04:49:45 +0000386distclean: clean
Lev Walkinbcda5ff2006-09-17 03:29:51 +0000387 rm -f $(ASN_MODULE_SOURCES)
388 rm -f $(ASN_MODULE_HEADERS)
Lev Walkinf5b49392006-09-12 06:19:15 +0000389 rm -f $(ASN_CONVERTER_SOURCES) $(ASN_CONVERTER_HEADERS)
Lev Walkind83172f2006-09-09 04:49:45 +0000390 rm -f Makefile.am.sample