diff options
Diffstat (limited to 'lib/megaco/src')
58 files changed, 176 insertions, 2203 deletions
diff --git a/lib/megaco/src/app/Makefile b/lib/megaco/src/app/Makefile index a7b458845d..d18da5326a 100644 --- a/lib/megaco/src/app/Makefile +++ b/lib/megaco/src/app/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 2007-2009. All Rights Reserved. +# Copyright Ericsson AB 2007-2012. All Rights Reserved. # # The contents of this file are subject to the Erlang Public License, # Version 1.1, (the "License"); you may not use this file except in @@ -94,10 +94,10 @@ info: # ---------------------------------------------------- $(APP_TARGET): $(APP_SRC) ../../vsn.mk - sed -e 's;%VSN%;$(VSN);' $< > $@ + $(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@ $(APPUP_TARGET): $(APPUP_SRC) ../../vsn.mk - sed -e 's;%VSN%;$(VSN);' $< > $@ + $(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@ diff --git a/lib/megaco/src/app/megaco.app.src b/lib/megaco/src/app/megaco.app.src index c0d8218ac8..0ba2a866f9 100644 --- a/lib/megaco/src/app/megaco.app.src +++ b/lib/megaco/src/app/megaco.app.src @@ -23,19 +23,6 @@ {modules, [ megaco, - megaco_ber_bin_encoder, - megaco_ber_bin_drv_media_gateway_control_v1, - megaco_ber_bin_drv_media_gateway_control_v2, - megaco_ber_bin_drv_media_gateway_control_prev3a, - megaco_ber_bin_drv_media_gateway_control_prev3b, - megaco_ber_bin_drv_media_gateway_control_prev3c, - megaco_ber_bin_drv_media_gateway_control_v3, - megaco_ber_bin_media_gateway_control_v1, - megaco_ber_bin_media_gateway_control_v2, - megaco_ber_bin_media_gateway_control_prev3a, - megaco_ber_bin_media_gateway_control_prev3b, - megaco_ber_bin_media_gateway_control_prev3c, - megaco_ber_bin_media_gateway_control_v3, megaco_ber_encoder, megaco_ber_media_gateway_control_v1, megaco_ber_media_gateway_control_v2, @@ -87,19 +74,6 @@ megaco_per_media_gateway_control_prev3b, megaco_per_media_gateway_control_prev3c, megaco_per_media_gateway_control_v3, - megaco_per_bin_encoder, - megaco_per_bin_drv_media_gateway_control_v1, - megaco_per_bin_drv_media_gateway_control_v2, - megaco_per_bin_drv_media_gateway_control_prev3a, - megaco_per_bin_drv_media_gateway_control_prev3b, - megaco_per_bin_drv_media_gateway_control_prev3c, - megaco_per_bin_drv_media_gateway_control_v3, - megaco_per_bin_media_gateway_control_v1, - megaco_per_bin_media_gateway_control_v2, - megaco_per_bin_media_gateway_control_prev3a, - megaco_per_bin_media_gateway_control_prev3b, - megaco_per_bin_media_gateway_control_prev3c, - megaco_per_bin_media_gateway_control_v3, megaco_pretty_text_encoder, megaco_pretty_text_encoder_v1, megaco_pretty_text_encoder_v2, diff --git a/lib/megaco/src/app/megaco.appup.src b/lib/megaco/src/app/megaco.appup.src index 7f89fa8bc2..a7b38eb107 100644 --- a/lib/megaco/src/app/megaco.appup.src +++ b/lib/megaco/src/app/megaco.appup.src @@ -145,10 +145,17 @@ %% | %% v %% 3.16.0.1 +%% | +%% v +%% 3.16.0.2 %% %% {"%VSN%", [ + {"3.16.0.1", + [ + ] + }, {"3.16", [ ] @@ -170,6 +177,10 @@ } ], [ + {"3.16.0.1", + [ + ] + }, {"3.16", [ ] diff --git a/lib/megaco/src/binary/Makefile b/lib/megaco/src/binary/Makefile index 77b06c81d3..c1fd66b848 100644 --- a/lib/megaco/src/binary/Makefile +++ b/lib/megaco/src/binary/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 2000-2009. All Rights Reserved. +# Copyright Ericsson AB 2000-2012. All Rights Reserved. # # The contents of this file are subject to the Erlang Public License, # Version 1.1, (the "License"); you may not use this file except in @@ -50,46 +50,22 @@ ASN1_SPECS = $(ASN1_V1_SPEC) \ ASN1_FILES = $(ASN1_SPECS:%=%.asn) V1_SPECS = $(BER_ASN1_V1_SPEC) \ - $(BER_BIN_ASN1_V1_SPEC) \ - $(BER_BIN_DRV_ASN1_V1_SPEC) \ - $(PER_ASN1_V1_SPEC) \ - $(PER_BIN_ASN1_V1_SPEC) \ - $(PER_BIN_DRV_ASN1_V1_SPEC) + $(PER_ASN1_V1_SPEC) V2_SPECS = $(BER_ASN1_V2_SPEC) \ - $(BER_BIN_ASN1_V2_SPEC) \ - $(BER_BIN_DRV_ASN1_V2_SPEC) \ - $(PER_ASN1_V2_SPEC) \ - $(PER_BIN_ASN1_V2_SPEC) \ - $(PER_BIN_DRV_ASN1_V2_SPEC) + $(PER_ASN1_V2_SPEC) PREV3A_SPECS = $(BER_ASN1_PREV3A_SPEC) \ - $(BER_BIN_ASN1_PREV3A_SPEC) \ - $(BER_BIN_DRV_ASN1_PREV3A_SPEC) \ - $(PER_ASN1_PREV3A_SPEC) \ - $(PER_BIN_ASN1_PREV3A_SPEC) \ - $(PER_BIN_DRV_ASN1_PREV3A_SPEC) + $(PER_ASN1_PREV3A_SPEC) PREV3B_SPECS = $(BER_ASN1_PREV3B_SPEC) \ - $(BER_BIN_ASN1_PREV3B_SPEC) \ - $(BER_BIN_DRV_ASN1_PREV3B_SPEC) \ - $(PER_ASN1_PREV3B_SPEC) \ - $(PER_BIN_ASN1_PREV3B_SPEC) \ - $(PER_BIN_DRV_ASN1_PREV3B_SPEC) + $(PER_ASN1_PREV3B_SPEC) PREV3C_SPECS = $(BER_ASN1_PREV3C_SPEC) \ - $(BER_BIN_ASN1_PREV3C_SPEC) \ - $(BER_BIN_DRV_ASN1_PREV3C_SPEC) \ - $(PER_ASN1_PREV3C_SPEC) \ - $(PER_BIN_ASN1_PREV3C_SPEC) \ - $(PER_BIN_DRV_ASN1_PREV3C_SPEC) + $(PER_ASN1_PREV3C_SPEC) V3_SPECS = $(BER_ASN1_V3_SPEC) \ - $(BER_BIN_ASN1_V3_SPEC) \ - $(BER_BIN_DRV_ASN1_V3_SPEC) \ $(PER_ASN1_V3_SPEC) \ - $(PER_BIN_ASN1_V3_SPEC) \ - $(PER_BIN_DRV_ASN1_V3_SPEC) \ $(PREV3A_SPECS) $(PREV3B_SPECS) $(PREV3C_SPECS) SPECS = $(V1_SPECS) $(V2_SPECS) $(V3_SPECS) @@ -153,12 +129,13 @@ opt: prebuild $(TARGET_FILES) prebuild: prebuild.skip prebuild.skip: - @echo "Building prebuild.skip\c" + $(gen_verbose) + $(V_colon)@echo "Building prebuild.skip\c" @touch prebuild.skip @for a in $(SPEC_ASN1DB); do \ echo $$a >> prebuild.skip; \ done - @echo "" + $(V_colon)@echo "" v1: $(V2_SPEC_BINS) diff --git a/lib/megaco/src/binary/depend.mk b/lib/megaco/src/binary/depend.mk index c9ca34bcf6..2dce45981f 100644 --- a/lib/megaco/src/binary/depend.mk +++ b/lib/megaco/src/binary/depend.mk @@ -19,17 +19,8 @@ # Flag description: # -# +optimize -# For ber_bin this means "optimize" (whatever that is), -# but for per_bin it means that a stage in the encode -# is done in the asn1 driver. -# -# +nif -# For ber_bin this means that part of the decode is done -# in the asn1 nif. -# # +asn1config -# This is only used by the ber_bin, and means that +# This is only used by the ber, and means that # some partial decode functions will be created # (as described by the asn1config file). # @@ -43,42 +34,18 @@ ifeq ($(MEGACO_INLINE_ASN1_RT),true) ASN1_CT_OPTS += +inline endif -BER_V1_FLAGS = $(ASN1_CT_OPTS) -BER_BIN_V1_FLAGS = $(ASN1_CT_OPTS) +asn1config +optimize -BER_BIN_DRV_V1_FLAGS = $(ASN1_CT_OPTS) +asn1config +optimize +nif -BER_V2_FLAGS = $(ASN1_CT_OPTS) -BER_BIN_V2_FLAGS = $(ASN1_CT_OPTS) +asn1config +optimize -BER_BIN_DRV_V2_FLAGS = $(ASN1_CT_OPTS) +asn1config +optimize +nif -BER_PREV3A_FLAGS = $(ASN1_CT_OPTS) -BER_BIN_PREV3A_FLAGS = $(ASN1_CT_OPTS) +asn1config +optimize -BER_BIN_DRV_PREV3A_FLAGS = $(ASN1_CT_OPTS) +asn1config +optimize +nif -BER_PREV3B_FLAGS = $(ASN1_CT_OPTS) -BER_BIN_PREV3B_FLAGS = $(ASN1_CT_OPTS) +asn1config +optimize -BER_BIN_DRV_PREV3B_FLAGS = $(ASN1_CT_OPTS) +asn1config +optimize +nif -BER_PREV3C_FLAGS = $(ASN1_CT_OPTS) -BER_BIN_PREV3C_FLAGS = $(ASN1_CT_OPTS) +asn1config +optimize -BER_BIN_DRV_PREV3C_FLAGS = $(ASN1_CT_OPTS) +asn1config +optimize +nif -BER_V3_FLAGS = $(ASN1_CT_OPTS) -BER_BIN_V3_FLAGS = $(ASN1_CT_OPTS) +asn1config +optimize -BER_BIN_DRV_V3_FLAGS = $(ASN1_CT_OPTS) +asn1config +optimize +nif +BER_V1_FLAGS = $(ASN1_CT_OPTS) +asn1config +BER_V2_FLAGS = $(ASN1_CT_OPTS) +asn1config +BER_PREV3A_FLAGS = $(ASN1_CT_OPTS) +asn1config +BER_PREV3B_FLAGS = $(ASN1_CT_OPTS) +asn1config +BER_PREV3C_FLAGS = $(ASN1_CT_OPTS) +asn1config +BER_V3_FLAGS = $(ASN1_CT_OPTS) +asn1config PER_V1_FLAGS = $(ASN1_CT_OPTS) -PER_BIN_V1_FLAGS = $(ASN1_CT_OPTS) -PER_BIN_DRV_V1_FLAGS = $(ASN1_CT_OPTS) +optimize PER_V2_FLAGS = $(ASN1_CT_OPTS) -PER_BIN_V2_FLAGS = $(ASN1_CT_OPTS) -PER_BIN_DRV_V2_FLAGS = $(ASN1_CT_OPTS) +optimize PER_PREV3A_FLAGS = $(ASN1_CT_OPTS) -PER_BIN_PREV3A_FLAGS = $(ASN1_CT_OPTS) -PER_BIN_DRV_PREV3A_FLAGS = $(ASN1_CT_OPTS) +optimize PER_PREV3B_FLAGS = $(ASN1_CT_OPTS) -PER_BIN_PREV3B_FLAGS = $(ASN1_CT_OPTS) -PER_BIN_DRV_PREV3B_FLAGS = $(ASN1_CT_OPTS) +optimize PER_PREV3C_FLAGS = $(ASN1_CT_OPTS) -PER_BIN_PREV3C_FLAGS = $(ASN1_CT_OPTS) -PER_BIN_DRV_PREV3C_FLAGS = $(ASN1_CT_OPTS) +optimize PER_V3_FLAGS = $(ASN1_CT_OPTS) -PER_BIN_V3_FLAGS = $(ASN1_CT_OPTS) -PER_BIN_DRV_V3_FLAGS = $(ASN1_CT_OPTS) +optimize # --- Version 1 --- @@ -86,119 +53,42 @@ PER_BIN_DRV_V3_FLAGS = $(ASN1_CT_OPTS) +optimize $(BER_ASN1_V1_SPEC).erl: \ $(BER_ASN1_V1_SPEC).set.asn \ $(ASN1_V1_SPEC).asn - @echo "$(BER_ASN1_V1_SPEC):" - $(ERLC) -bber $(BER_V1_FLAGS) $(BER_ASN1_V1_SPEC).set.asn + $(V_colon)@echo "$(BER_ASN1_V1_SPEC):" + $(asn_verbose)$(ERLC) -bber $(BER_V1_FLAGS) $(BER_ASN1_V1_SPEC).set.asn $(EBIN)/$(BER_ASN1_V1_SPEC).$(EMULATOR): \ $(BER_ASN1_V1_SPEC).erl -$(BER_BIN_ASN1_V1_SPEC).erl: \ - $(BER_BIN_ASN1_V1_SPEC).set.asn \ - $(BER_BIN_ASN1_V1_SPEC).asn1config \ - $(ASN1_V1_SPEC).asn - @echo "$(BER_BIN_ASN1_V1_SPEC):" - $(ERLC) -bber_bin $(BER_BIN_V1_FLAGS) $(BER_BIN_ASN1_V1_SPEC).set.asn - -$(EBIN)/$(BER_BIN_ASN1_V1_SPEC).$(EMULATOR): \ - $(BER_BIN_ASN1_V1_SPEC).erl - -$(BER_BIN_DRV_ASN1_V1_SPEC).erl: \ - $(BER_BIN_DRV_ASN1_V1_SPEC).set.asn \ - $(BER_BIN_DRV_ASN1_V1_SPEC).asn1config \ - $(ASN1_V1_SPEC).asn - @echo "$(BER_BIN_DRV_ASN1_V1_SPEC):" - $(ERLC) -bber_bin $(BER_BIN_DRV_V1_FLAGS) $(BER_BIN_DRV_ASN1_V1_SPEC).set.asn - -$(EBIN)/$(BER_BIN_DRV_ASN1_V1_SPEC).$(EMULATOR): \ - $(BER_BIN_DRV_ASN1_V1_SPEC).erl - $(PER_ASN1_V1_SPEC).erl: \ $(PER_ASN1_V1_SPEC).set.asn \ $(ASN1_V1_SPEC).asn - @echo "$(PER_ASN1_V1_SPEC):" - $(ERLC) -bper $(PER_V1_FLAGS) $(PER_ASN1_V1_SPEC).set.asn + $(V_colon)@echo "$(PER_ASN1_V1_SPEC):" + $(asn_verbose)$(ERLC) -bper $(PER_V1_FLAGS) $(PER_ASN1_V1_SPEC).set.asn $(EBIN)/$(PER_ASN1_V1_SPEC).$(EMULATOR): \ $(PER_ASN1_V1_SPEC).erl -$(PER_BIN_ASN1_V1_SPEC).erl: \ - $(PER_BIN_ASN1_V1_SPEC).set.asn \ - $(ASN1_V1_SPEC).asn - @echo "$(PER_BIN_ASN1_V1_SPEC):" - $(ERLC) -bper_bin $(PER_BIN_V1_FLAGS) $(PER_BIN_ASN1_V1_SPEC).set.asn - -$(EBIN)/$(PER_BIN_ASN1_V1_SPEC).$(EMULATOR): \ - $(PER_BIN_ASN1_V1_SPEC).erl - -$(PER_BIN_DRV_ASN1_V1_SPEC).erl: \ - $(PER_BIN_DRV_ASN1_V1_SPEC).set.asn \ - $(ASN1_V1_SPEC).asn - @echo "$(PER_BIN_DRV_ASN1_V1_SPEC):" - $(ERLC) -bper_bin $(PER_BIN_DRV_V1_FLAGS) $(PER_BIN_DRV_ASN1_V1_SPEC).set.asn - -$(EBIN)/$(PER_BIN_DRV_ASN1_V1_SPEC).$(EMULATOR): \ - $(PER_BIN_DRV_ASN1_V1_SPEC).erl - # --- Version 2 --- $(BER_ASN1_V2_SPEC).erl: \ $(BER_ASN1_V2_SPEC).set.asn \ $(ASN1_V2_SPEC).asn - @echo "$(BER_ASN1_V2_SPEC):" - $(ERLC) -bber $(BER_V2_FLAGS) $(BER_ASN1_V2_SPEC).set.asn + $(V_colon)@echo "$(BER_ASN1_V2_SPEC):" + $(asn_verbose)$(ERLC) -bber $(BER_V2_FLAGS) $(BER_ASN1_V2_SPEC).set.asn $(EBIN)/$(BER_ASN1_V2_SPEC).$(EMULATOR): \ $(BER_ASN1_V2_SPEC).erl -$(BER_BIN_ASN1_V2_SPEC).erl: \ - $(BER_BIN_ASN1_V2_SPEC).set.asn \ - $(BER_BIN_ASN1_V2_SPEC).asn1config \ - $(ASN1_V2_SPEC).asn - @echo "$(BER_BIN_ASN1_V2_SPEC):" - $(ERLC) -bber_bin $(BER_BIN_V2_FLAGS) $(BER_BIN_ASN1_V2_SPEC).set.asn - -$(EBIN)/$(BER_BIN_ASN1_V2_SPEC).$(EMULATOR): \ - $(BER_BIN_ASN1_V2_SPEC).erl - -$(BER_BIN_DRV_ASN1_V2_SPEC).erl: \ - $(BER_BIN_DRV_ASN1_V2_SPEC).set.asn \ - $(BER_BIN_DRV_ASN1_V2_SPEC).asn1config \ - $(ASN1_V2_SPEC).asn - @echo "$(BER_BIN_DRV_ASN1_V2_SPEC):" - $(ERLC) -bber_bin $(BER_BIN_DRV_V2_FLAGS) $(BER_BIN_DRV_ASN1_V2_SPEC).set.asn - -$(EBIN)/$(BER_BIN_DRV_ASN1_V2_SPEC).$(EMULATOR): \ - $(BER_BIN_DRV_ASN1_V2_SPEC).erl - $(PER_ASN1_V2_SPEC).erl: \ $(PER_ASN1_V2_SPEC).set.asn \ $(ASN1_V2_SPEC).asn - @echo "$(PER_ASN1_V2_SPEC):" - $(ERLC) -bper $(PER_V2_FLAGS) $(PER_ASN1_V2_SPEC).set.asn + $(V_colon)@echo "$(PER_ASN1_V2_SPEC):" + $(asn_verbose)$(ERLC) -bper $(PER_V2_FLAGS) $(PER_ASN1_V2_SPEC).set.asn $(EBIN)/$(PER_ASN1_V2_SPEC).$(EMULATOR): \ $(PER_ASN1_V2_SPEC).erl -$(PER_BIN_ASN1_V2_SPEC).erl: \ - $(PER_BIN_ASN1_V2_SPEC).set.asn \ - $(ASN1_V2_SPEC).asn - @echo "$(PER_BIN_ASN1_V2_SPEC):" - $(ERLC) -bper_bin $(PER_BIN_V2_FLAGS) $(PER_BIN_ASN1_V2_SPEC).set.asn - -$(EBIN)/$(PER_BIN_ASN1_V2_SPEC).$(EMULATOR): \ - $(PER_BIN_ASN1_V2_SPEC).erl - -$(PER_BIN_DRV_ASN1_V2_SPEC).erl: \ - $(PER_BIN_DRV_ASN1_V2_SPEC).set.asn \ - $(ASN1_V2_SPEC).asn - @echo "$(PER_BIN_DRV_ASN1_V2_SPEC):" - $(ERLC) -bper_bin $(PER_BIN_DRV_V2_FLAGS) $(PER_BIN_DRV_ASN1_V2_SPEC).set.asn - -$(EBIN)/$(PER_BIN_DRV_ASN1_V2_SPEC).$(EMULATOR): \ - $(PER_BIN_DRV_ASN1_V2_SPEC).erl - - # --- Version 3 --- # -- (prev3a) -- @@ -206,250 +96,93 @@ $(EBIN)/$(PER_BIN_DRV_ASN1_V2_SPEC).$(EMULATOR): \ $(BER_ASN1_PREV3A_SPEC).erl: \ $(BER_ASN1_PREV3A_SPEC).set.asn \ $(ASN1_PREV3A_SPEC).asn - @echo "$(BER_ASN1_PREV3A_SPEC):" - $(ERLC) -bber $(BER_PREV3A_FLAGS) $(BER_ASN1_PREV3A_SPEC).set.asn + $(V_colon)@echo "$(BER_ASN1_PREV3A_SPEC):" + $(asn_verbose)$(ERLC) -bber $(BER_PREV3A_FLAGS) $(BER_ASN1_PREV3A_SPEC).set.asn $(EBIN)/$(BER_ASN1_PREV3A_SPEC).$(EMULATOR): \ $(BER_ASN1_PREV3A_SPEC).erl -$(BER_BIN_ASN1_PREV3A_SPEC).erl: \ - $(BER_BIN_ASN1_PREV3A_SPEC).set.asn \ - $(BER_BIN_ASN1_PREV3A_SPEC).asn1config \ - $(ASN1_PREV3A_SPEC).asn - @echo "$(BER_BIN_ASN1_PREV3A_SPEC):" - $(ERLC) -bber_bin $(BER_BIN_PREV3A_FLAGS) $(BER_BIN_ASN1_PREV3A_SPEC).set.asn - -$(EBIN)/$(BER_BIN_ASN1_PREV3A_SPEC).$(EMULATOR): \ - $(BER_BIN_ASN1_PREV3A_SPEC).erl - -$(BER_BIN_DRV_ASN1_PREV3A_SPEC).erl: \ - $(BER_BIN_DRV_ASN1_PREV3A_SPEC).set.asn \ - $(BER_BIN_DRV_ASN1_PREV3A_SPEC).asn1config \ - $(ASN1_PREV3A_SPEC).asn - @echo "$(BER_BIN_DRV_ASN1_PREV3A_SPEC):" - $(ERLC) -bber_bin $(BER_BIN_DRV_PREV3A_FLAGS) $(BER_BIN_DRV_ASN1_PREV3A_SPEC).set.asn - -$(EBIN)/$(BER_BIN_DRV_ASN1_PREV3A_SPEC).$(EMULATOR): \ - $(BER_BIN_DRV_ASN1_PREV3A_SPEC).erl - $(PER_ASN1_PREV3A_SPEC).erl: \ $(PER_ASN1_PREV3A_SPEC).set.asn \ $(ASN1_PREV3A_SPEC).asn - @echo "$(PER_ASN1_PREV3A_SPEC):" - $(ERLC) -bper $(PER_PREV3A_FLAGS) $(PER_ASN1_PREV3A_SPEC).set.asn + $(V_colon)@echo "$(PER_ASN1_PREV3A_SPEC):" + $(asn_verbose)$(ERLC) -bper $(PER_PREV3A_FLAGS) $(PER_ASN1_PREV3A_SPEC).set.asn $(EBIN)/$(PER_ASN1_PREV3A_SPEC).$(EMULATOR): \ $(PER_ASN1_PREV3A_SPEC).erl -$(PER_BIN_ASN1_PREV3A_SPEC).erl: \ - $(PER_BIN_ASN1_PREV3A_SPEC).set.asn \ - $(ASN1_PREV3A_SPEC).asn - @echo "$(PER_BIN_ASN1_PREV3A_SPEC):" - $(ERLC) -bper_bin $(PER_BIN_PREV3A_FLAGS) $(PER_BIN_ASN1_PREV3A_SPEC).set.asn - -$(EBIN)/$(PER_BIN_ASN1_PREV3A_SPEC).$(EMULATOR): \ - $(PER_BIN_ASN1_PREV3A_SPEC).erl - -$(PER_BIN_DRV_ASN1_PREV3A_SPEC).erl: \ - $(PER_BIN_DRV_ASN1_PREV3A_SPEC).set.asn \ - $(ASN1_PREV3A_SPEC).asn - @echo "$(PER_BIN_DRV_ASN1_PREV3A_SPEC):" - $(ERLC) -bper_bin $(PER_BIN_DRV_PREV3A_FLAGS) $(PER_BIN_DRV_ASN1_PREV3A_SPEC).set.asn - -$(EBIN)/$(PER_BIN_DRV_ASN1_PREV3A_SPEC).$(EMULATOR): \ - $(PER_BIN_DRV_ASN1_PREV3A_SPEC).erl # -- (prev3b) -- $(BER_ASN1_PREV3B_SPEC).erl: \ $(BER_ASN1_PREV3B_SPEC).set.asn \ $(ASN1_PREV3B_SPEC).asn - @echo "$(BER_ASN1_PREV3B_SPEC):" - $(ERLC) -bber $(BER_PREV3B_FLAGS) $(BER_ASN1_PREV3B_SPEC).set.asn + $(V_colon)@echo "$(BER_ASN1_PREV3B_SPEC):" + $(asn_verbose)$(ERLC) -bber $(BER_PREV3B_FLAGS) $(BER_ASN1_PREV3B_SPEC).set.asn $(EBIN)/$(BER_ASN1_PREV3B_SPEC).$(EMULATOR): \ $(BER_ASN1_PREV3B_SPEC).erl -$(BER_BIN_ASN1_PREV3B_SPEC).erl: \ - $(BER_BIN_ASN1_PREV3B_SPEC).set.asn \ - $(BER_BIN_ASN1_PREV3B_SPEC).asn1config \ - $(ASN1_PREV3B_SPEC).asn - @echo "$(BER_BIN_ASN1_PREV3B_SPEC):" - $(ERLC) -bber_bin $(BER_BIN_PREV3B_FLAGS) $(BER_BIN_ASN1_PREV3B_SPEC).set.asn - -$(EBIN)/$(BER_BIN_ASN1_PREV3B_SPEC).$(EMULATOR): \ - $(BER_BIN_ASN1_PREV3B_SPEC).erl - -$(BER_BIN_DRV_ASN1_PREV3B_SPEC).erl: \ - $(BER_BIN_DRV_ASN1_PREV3B_SPEC).set.asn \ - $(BER_BIN_DRV_ASN1_PREV3B_SPEC).asn1config \ - $(ASN1_PREV3B_SPEC).asn - @echo "$(BER_BIN_DRV_ASN1_PREV3B_SPEC):" - $(ERLC) -bber_bin $(BER_BIN_DRV_PREV3B_FLAGS) $(BER_BIN_DRV_ASN1_PREV3B_SPEC).set.asn - -$(EBIN)/$(BER_BIN_DRV_ASN1_PREV3B_SPEC).$(EMULATOR): \ - $(BER_BIN_DRV_ASN1_PREV3B_SPEC).erl - $(PER_ASN1_PREV3B_SPEC).erl: \ $(PER_ASN1_PREV3B_SPEC).set.asn \ $(ASN1_PREV3B_SPEC).asn - @echo "$(PER_ASN1_PREV3B_SPEC):" - $(ERLC) -bper $(PER_PREV3B_FLAGS) $(PER_ASN1_PREV3B_SPEC).set.asn + $(V_colon)@echo "$(PER_ASN1_PREV3B_SPEC):" + $(asn_verbose)$(ERLC) -bper $(PER_PREV3B_FLAGS) $(PER_ASN1_PREV3B_SPEC).set.asn $(EBIN)/$(PER_ASN1_PREV3B_SPEC).$(EMULATOR): \ $(PER_ASN1_PREV3B_SPEC).erl -$(PER_BIN_ASN1_PREV3B_SPEC).erl: \ - $(PER_BIN_ASN1_PREV3B_SPEC).set.asn \ - $(ASN1_PREV3B_SPEC).asn - @echo "$(PER_BIN_ASN1_PREV3B_SPEC):" - $(ERLC) -bper_bin $(PER_BIN_PREV3B_FLAGS) $(PER_BIN_ASN1_PREV3B_SPEC).set.asn - -$(EBIN)/$(PER_BIN_ASN1_PREV3B_SPEC).$(EMULATOR): \ - $(PER_BIN_ASN1_PREV3B_SPEC).erl - -$(PER_BIN_DRV_ASN1_PREV3B_SPEC).erl: \ - $(PER_BIN_DRV_ASN1_PREV3B_SPEC).set.asn \ - $(ASN1_PREV3B_SPEC).asn - @echo "$(PER_BIN_DRV_ASN1_PREV3B_SPEC):" - $(ERLC) -bper_bin $(PER_BIN_DRV_PREV3B_FLAGS) $(PER_BIN_DRV_ASN1_PREV3B_SPEC).set.asn - -$(EBIN)/$(PER_BIN_DRV_ASN1_PREV3B_SPEC).$(EMULATOR): \ - $(PER_BIN_DRV_ASN1_PREV3B_SPEC).erl - # -- (prev3c) -- $(BER_ASN1_PREV3C_SPEC).erl: \ $(BER_ASN1_PREV3C_SPEC).set.asn \ $(ASN1_PREV3C_SPEC).asn - @echo "$(BER_ASN1_PREV3C_SPEC):" - $(ERLC) -bber $(BER_PREV3C_FLAGS) $(BER_ASN1_PREV3C_SPEC).set.asn + $(V_colon)@echo "$(BER_ASN1_PREV3C_SPEC):" + $(asn_verbose)$(ERLC) -bber $(BER_PREV3C_FLAGS) $(BER_ASN1_PREV3C_SPEC).set.asn $(EBIN)/$(BER_ASN1_PREV3C_SPEC).$(EMULATOR): \ $(BER_ASN1_PREV3C_SPEC).erl -$(BER_BIN_ASN1_PREV3C_SPEC).erl: \ - $(BER_BIN_ASN1_PREV3C_SPEC).set.asn \ - $(BER_BIN_ASN1_PREV3C_SPEC).asn1config \ - $(ASN1_PREV3C_SPEC).asn - @echo "$(BER_BIN_ASN1_PREV3C_SPEC):" - $(ERLC) -bber_bin $(BER_BIN_PREV3C_FLAGS) $(BER_BIN_ASN1_PREV3C_SPEC).set.asn - -$(EBIN)/$(BER_BIN_ASN1_PREV3C_SPEC).$(EMULATOR): \ - $(BER_BIN_ASN1_PREV3C_SPEC).erl - -$(BER_BIN_DRV_ASN1_PREV3C_SPEC).erl: \ - $(BER_BIN_DRV_ASN1_PREV3C_SPEC).set.asn \ - $(BER_BIN_DRV_ASN1_PREV3C_SPEC).asn1config \ - $(ASN1_PREV3C_SPEC).asn - @echo "$(BER_BIN_DRV_ASN1_PREV3C_SPEC):" - $(ERLC) -bber_bin $(BER_BIN_DRV_PREV3C_FLAGS) $(BER_BIN_DRV_ASN1_PREV3C_SPEC).set.asn - -$(EBIN)/$(BER_BIN_DRV_ASN1_PREV3C_SPEC).$(EMULATOR): \ - $(BER_BIN_DRV_ASN1_PREV3C_SPEC).erl - $(PER_ASN1_PREV3C_SPEC).erl: \ $(PER_ASN1_PREV3C_SPEC).set.asn \ $(ASN1_PREV3C_SPEC).asn - @echo "$(PER_ASN1_PREV3C_SPEC):" - $(ERLC) -bper $(PER_PREV3C_FLAGS) $(PER_ASN1_PREV3C_SPEC).set.asn + $(V_colon)@echo "$(PER_ASN1_PREV3C_SPEC):" + $(asn_verbose)$(ERLC) -bper $(PER_PREV3C_FLAGS) $(PER_ASN1_PREV3C_SPEC).set.asn $(EBIN)/$(PER_ASN1_PREV3C_SPEC).$(EMULATOR): \ $(PER_ASN1_PREV3C_SPEC).erl -$(PER_BIN_ASN1_PREV3C_SPEC).erl: \ - $(PER_BIN_ASN1_PREV3C_SPEC).set.asn \ - $(ASN1_PREV3C_SPEC).asn - @echo "$(PER_BIN_ASN1_PREV3C_SPEC):" - $(ERLC) -bper_bin $(PER_BIN_PREV3C_FLAGS) $(PER_BIN_ASN1_PREV3C_SPEC).set.asn - -$(EBIN)/$(PER_BIN_ASN1_PREV3C_SPEC).$(EMULATOR): \ - $(PER_BIN_ASN1_PREV3C_SPEC).erl - -$(PER_BIN_DRV_ASN1_PREV3C_SPEC).erl: \ - $(PER_BIN_DRV_ASN1_PREV3C_SPEC).set.asn \ - $(ASN1_PREV3C_SPEC).asn - @echo "$(PER_BIN_DRV_ASN1_PREV3C_SPEC):" - $(ERLC) -bper_bin $(PER_BIN_DRV_PREV3C_FLAGS) $(PER_BIN_DRV_ASN1_PREV3C_SPEC).set.asn - -$(EBIN)/$(PER_BIN_DRV_ASN1_PREV3C_SPEC).$(EMULATOR): \ - $(PER_BIN_DRV_ASN1_PREV3C_SPEC).erl - # -- (v3) -- $(BER_ASN1_V3_SPEC).erl: \ $(BER_ASN1_V3_SPEC).set.asn \ $(ASN1_V3_SPEC).asn - @echo "$(BER_ASN1_V3_SPEC):" - $(ERLC) -bber $(BER_V3_FLAGS) $(BER_ASN1_V3_SPEC).set.asn + $(V_colon)@echo "$(BER_ASN1_V3_SPEC):" + $(asn_verbose)$(ERLC) -bber $(BER_V3_FLAGS) $(BER_ASN1_V3_SPEC).set.asn $(EBIN)/$(BER_ASN1_V3_SPEC).$(EMULATOR): \ $(BER_ASN1_V3_SPEC).erl -$(BER_BIN_ASN1_V3_SPEC).erl: \ - $(BER_BIN_ASN1_V3_SPEC).set.asn \ - $(BER_BIN_ASN1_V3_SPEC).asn1config \ - $(ASN1_V3_SPEC).asn - @echo "$(BER_BIN_ASN1_V3_SPEC):" - $(ERLC) -bber_bin $(BER_BIN_V3_FLAGS) $(BER_BIN_ASN1_V3_SPEC).set.asn - -$(EBIN)/$(BER_BIN_ASN1_V3_SPEC).$(EMULATOR): \ - $(BER_BIN_ASN1_V3_SPEC).erl - -$(BER_BIN_DRV_ASN1_V3_SPEC).erl: \ - $(BER_BIN_DRV_ASN1_V3_SPEC).set.asn \ - $(BER_BIN_DRV_ASN1_V3_SPEC).asn1config \ - $(ASN1_V3_SPEC).asn - @echo "$(BER_BIN_DRV_ASN1_V3_SPEC):" - $(ERLC) -bber_bin $(BER_BIN_DRV_V3_FLAGS) $(BER_BIN_DRV_ASN1_V3_SPEC).set.asn - -$(EBIN)/$(BER_BIN_DRV_ASN1_V3_SPEC).$(EMULATOR): \ - $(BER_BIN_DRV_ASN1_V3_SPEC).erl - $(PER_ASN1_V3_SPEC).erl: \ $(PER_ASN1_V3_SPEC).set.asn \ $(ASN1_V3_SPEC).asn - @echo "$(PER_ASN1_V3_SPEC):" - $(ERLC) -bper $(PER_V3_FLAGS) $(PER_ASN1_V3_SPEC).set.asn + $(V_colon)@echo "$(PER_ASN1_V3_SPEC):" + $(asn_verbose)$(ERLC) -bper $(PER_V3_FLAGS) $(PER_ASN1_V3_SPEC).set.asn $(EBIN)/$(PER_ASN1_V3_SPEC).$(EMULATOR): \ $(PER_ASN1_V3_SPEC).erl -$(PER_BIN_ASN1_V3_SPEC).erl: \ - $(PER_BIN_ASN1_V3_SPEC).set.asn \ - $(ASN1_V3_SPEC).asn - @echo "$(PER_BIN_ASN1_V3_SPEC):" - $(ERLC) -bper_bin $(PER_BIN_V3_FLAGS) $(PER_BIN_ASN1_V3_SPEC).set.asn - -$(EBIN)/$(PER_BIN_ASN1_V3_SPEC).$(EMULATOR): \ - $(PER_BIN_ASN1_V3_SPEC).erl - -$(PER_BIN_DRV_ASN1_V3_SPEC).erl: \ - $(PER_BIN_DRV_ASN1_V3_SPEC).set.asn \ - $(ASN1_V3_SPEC).asn - @echo "$(PER_BIN_DRV_ASN1_V3_SPEC):" - $(ERLC) -bper_bin $(PER_BIN_DRV_V3_FLAGS) $(PER_BIN_DRV_ASN1_V3_SPEC).set.asn - -$(EBIN)/$(PER_BIN_DRV_ASN1_V3_SPEC).$(EMULATOR): \ - $(PER_BIN_DRV_ASN1_V3_SPEC).erl - # ------------- $(EBIN)/megaco_ber_encoder.$(EMULATOR): megaco_ber_encoder.erl \ $(MEGACO_ENGINEDIR)/megaco_message_internal.hrl -$(EBIN)/megaco_ber_bin_encoder.$(EMULATOR): megaco_ber_bin_encoder.erl \ - $(MEGACO_ENGINEDIR)/megaco_message_internal.hrl - $(EBIN)/megaco_per_encoder.$(EMULATOR): megaco_per_encoder.erl \ $(MEGACO_ENGINEDIR)/megaco_message_internal.hrl -$(EBIN)/megaco_per_bin_encoder.$(EMULATOR): megaco_per_bin_encoder.erl \ - $(MEGACO_ENGINEDIR)/megaco_message_internal.hrl - $(EBIN)/megaco_binary_encoder_lib.$(EMULATOR): megaco_binary_encoder_lib.erl \ $(MEGACO_ENGINEDIR)/megaco_message_internal.hrl diff --git a/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_prev3a.asn1config b/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_prev3a.asn1config deleted file mode 100644 index 179473717d..0000000000 --- a/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_prev3a.asn1config +++ /dev/null @@ -1,43 +0,0 @@ -{exclusive_decode, - {'megaco_ber_bin_drv_media_gateway_control_prev3a', - [ - {decode_message_trans_partial, - [ - 'MegacoMessage',[{mess,[{messageBody,[{transactions,parts}]}]}] - ] - }, - {decode_message_acts_partial, - ['Transaction', - [ - {transactionRequest, - [ - {actions,parts} - ] - }, - {transactionReply, - [ - {transactionResult, [{actionReplies,parts}]} - ] - } - ] - ] - }, - {decode_message_version, - ['MegacoMessage', - [ - {authHeader,undecoded}, - {mess,[{mId,undecoded},{messageBody,undecoded}]} - ] - ] - }, - {decode_message_mId, - ['MegacoMessage', - [ - {authHeader,undecoded}, - {mess,[{messageBody,undecoded}]} - ] - ] - } - ] - } -}. diff --git a/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_prev3a.set.asn b/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_prev3a.set.asn deleted file mode 100644 index b9ba7ffdb4..0000000000 --- a/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_prev3a.set.asn +++ /dev/null @@ -1 +0,0 @@ -MEDIA-GATEWAY-CONTROL-prev3a.asn diff --git a/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_prev3b.asn1config b/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_prev3b.asn1config deleted file mode 100644 index ceda97fbd1..0000000000 --- a/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_prev3b.asn1config +++ /dev/null @@ -1,43 +0,0 @@ -{exclusive_decode, - {'megaco_ber_bin_drv_media_gateway_control_prev3b', - [ - {decode_message_trans_partial, - [ - 'MegacoMessage',[{mess,[{messageBody,[{transactions,parts}]}]}] - ] - }, - {decode_message_acts_partial, - ['Transaction', - [ - {transactionRequest, - [ - {actions,parts} - ] - }, - {transactionReply, - [ - {transactionResult, [{actionReplies,parts}]} - ] - } - ] - ] - }, - {decode_message_version, - ['MegacoMessage', - [ - {authHeader,undecoded}, - {mess,[{mId,undecoded},{messageBody,undecoded}]} - ] - ] - }, - {decode_message_mId, - ['MegacoMessage', - [ - {authHeader,undecoded}, - {mess,[{messageBody,undecoded}]} - ] - ] - } - ] - } -}. diff --git a/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_prev3b.set.asn b/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_prev3b.set.asn deleted file mode 100644 index 0437bde310..0000000000 --- a/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_prev3b.set.asn +++ /dev/null @@ -1 +0,0 @@ -MEDIA-GATEWAY-CONTROL-prev3b.asn diff --git a/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_prev3c.asn1config b/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_prev3c.asn1config deleted file mode 100644 index d181ef44bd..0000000000 --- a/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_prev3c.asn1config +++ /dev/null @@ -1,43 +0,0 @@ -{exclusive_decode, - {'megaco_ber_bin_drv_media_gateway_control_prev3c', - [ - {decode_message_trans_partial, - [ - 'MegacoMessage',[{mess,[{messageBody,[{transactions,parts}]}]}] - ] - }, - {decode_message_acts_partial, - ['Transaction', - [ - {transactionRequest, - [ - {actions,parts} - ] - }, - {transactionReply, - [ - {transactionResult, [{actionReplies,parts}]} - ] - } - ] - ] - }, - {decode_message_version, - ['MegacoMessage', - [ - {authHeader,undecoded}, - {mess,[{mId,undecoded},{messageBody,undecoded}]} - ] - ] - }, - {decode_message_mId, - ['MegacoMessage', - [ - {authHeader,undecoded}, - {mess,[{messageBody,undecoded}]} - ] - ] - } - ] - } -}. diff --git a/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_prev3c.set.asn b/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_prev3c.set.asn deleted file mode 100644 index e78055fbad..0000000000 --- a/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_prev3c.set.asn +++ /dev/null @@ -1 +0,0 @@ -MEDIA-GATEWAY-CONTROL-prev3c.asn diff --git a/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_v1.set.asn b/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_v1.set.asn deleted file mode 100644 index 0f5a92dba1..0000000000 --- a/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_v1.set.asn +++ /dev/null @@ -1 +0,0 @@ -MEDIA-GATEWAY-CONTROL-v1.asn diff --git a/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_v2.asn1config b/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_v2.asn1config deleted file mode 100644 index 3d0cb9a019..0000000000 --- a/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_v2.asn1config +++ /dev/null @@ -1,43 +0,0 @@ -{exclusive_decode, - {'megaco_ber_bin_drv_media_gateway_control_v2', - [ - {decode_message_trans_partial, - [ - 'MegacoMessage',[{mess,[{messageBody,[{transactions,parts}]}]}] - ] - }, - {decode_message_acts_partial, - ['Transaction', - [ - {transactionRequest, - [ - {actions,parts} - ] - }, - {transactionReply, - [ - {transactionResult, [{actionReplies,parts}]} - ] - } - ] - ] - }, - {decode_message_version, - ['MegacoMessage', - [ - {authHeader,undecoded}, - {mess,[{mId,undecoded},{messageBody,undecoded}]} - ] - ] - }, - {decode_message_mId, - ['MegacoMessage', - [ - {authHeader,undecoded}, - {mess,[{messageBody,undecoded}]} - ] - ] - } - ] - } -}. diff --git a/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_v2.set.asn b/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_v2.set.asn deleted file mode 100644 index 7fc82b127f..0000000000 --- a/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_v2.set.asn +++ /dev/null @@ -1 +0,0 @@ -MEDIA-GATEWAY-CONTROL-v2.asn diff --git a/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_v3.asn1config b/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_v3.asn1config deleted file mode 100644 index cc662c0145..0000000000 --- a/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_v3.asn1config +++ /dev/null @@ -1,43 +0,0 @@ -{exclusive_decode, - {'megaco_ber_bin_drv_media_gateway_control_v3', - [ - {decode_message_trans_partial, - [ - 'MegacoMessage',[{mess,[{messageBody,[{transactions,parts}]}]}] - ] - }, - {decode_message_acts_partial, - ['Transaction', - [ - {transactionRequest, - [ - {actions,parts} - ] - }, - {transactionReply, - [ - {transactionResult, [{actionReplies,parts}]} - ] - } - ] - ] - }, - {decode_message_version, - ['MegacoMessage', - [ - {authHeader,undecoded}, - {mess,[{mId,undecoded},{messageBody,undecoded}]} - ] - ] - }, - {decode_message_mId, - ['MegacoMessage', - [ - {authHeader,undecoded}, - {mess,[{messageBody,undecoded}]} - ] - ] - } - ] - } -}. diff --git a/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_v3.set.asn b/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_v3.set.asn deleted file mode 100644 index 1d7950a283..0000000000 --- a/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_v3.set.asn +++ /dev/null @@ -1 +0,0 @@ -MEDIA-GATEWAY-CONTROL-v3.asn diff --git a/lib/megaco/src/binary/megaco_ber_bin_encoder.erl b/lib/megaco/src/binary/megaco_ber_bin_encoder.erl deleted file mode 100644 index bf9926c7e5..0000000000 --- a/lib/megaco/src/binary/megaco_ber_bin_encoder.erl +++ /dev/null @@ -1,716 +0,0 @@ -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2000-2009. All Rights Reserved. -%% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. -%% -%% %CopyrightEnd% -%% - -%% -%%---------------------------------------------------------------------- -%% Purpose : Handle ASN.1 BER encoding of Megaco/H.248 -%%---------------------------------------------------------------------- - --module(megaco_ber_bin_encoder). - --behaviour(megaco_encoder). - --export([encode_message/3, decode_message/3, - decode_mini_message/3, - - encode_transaction/3, - encode_action_requests/3, - encode_action_request/3, - encode_action_reply/3, - - version_of/2]). - -%% Backward compatible functions: --export([encode_message/2, decode_message/2]). - --include_lib("megaco/src/engine/megaco_message_internal.hrl"). - --define(V1_ASN1_MOD, megaco_ber_bin_media_gateway_control_v1). --define(V2_ASN1_MOD, megaco_ber_bin_media_gateway_control_v2). --define(V3_ASN1_MOD, megaco_ber_bin_media_gateway_control_v3). --define(PREV3A_ASN1_MOD, megaco_ber_bin_media_gateway_control_prev3a). --define(PREV3B_ASN1_MOD, megaco_ber_bin_media_gateway_control_prev3b). --define(PREV3C_ASN1_MOD, megaco_ber_bin_media_gateway_control_prev3c). --define(V1_ASN1_MOD_DRV, megaco_ber_bin_drv_media_gateway_control_v1). --define(V2_ASN1_MOD_DRV, megaco_ber_bin_drv_media_gateway_control_v2). --define(V3_ASN1_MOD_DRV, megaco_ber_bin_drv_media_gateway_control_v3). --define(PREV3A_ASN1_MOD_DRV, megaco_ber_bin_drv_media_gateway_control_prev3a). --define(PREV3B_ASN1_MOD_DRV, megaco_ber_bin_drv_media_gateway_control_prev3b). --define(PREV3C_ASN1_MOD_DRV, megaco_ber_bin_drv_media_gateway_control_prev3c). - --define(V1_TRANS_MOD, megaco_binary_transformer_v1). --define(V2_TRANS_MOD, megaco_binary_transformer_v2). --define(V3_TRANS_MOD, megaco_binary_transformer_v3). --define(PREV3A_TRANS_MOD, megaco_binary_transformer_prev3a). --define(PREV3B_TRANS_MOD, megaco_binary_transformer_prev3b). --define(PREV3C_TRANS_MOD, megaco_binary_transformer_prev3c). - --define(BIN_LIB, megaco_binary_encoder_lib). - - -%%---------------------------------------------------------------------- -%% Detect (check/get) message version -%% Return {ok, Version} | {error, Reason} -%%---------------------------------------------------------------------- - -version_of([{version3,v3},driver|EC], Binary) -> - Decoders = [?V1_ASN1_MOD_DRV, ?V2_ASN1_MOD_DRV, ?V3_ASN1_MOD_DRV], - ?BIN_LIB:version_of(EC, Binary, dynamic, Decoders); -version_of([{version3,prev3c},driver|EC], Binary) -> - Decoders = [?V1_ASN1_MOD_DRV, ?V2_ASN1_MOD_DRV, ?PREV3C_ASN1_MOD_DRV], - ?BIN_LIB:version_of(EC, Binary, dynamic, Decoders); -version_of([{version3,prev3b},driver|EC], Binary) -> - Decoders = [?V1_ASN1_MOD_DRV, ?V2_ASN1_MOD_DRV, ?PREV3B_ASN1_MOD_DRV], - ?BIN_LIB:version_of(EC, Binary, dynamic, Decoders); -version_of([{version3,prev3a},driver|EC], Binary) -> - Decoders = [?V1_ASN1_MOD_DRV, ?V2_ASN1_MOD_DRV, ?PREV3A_ASN1_MOD_DRV], - ?BIN_LIB:version_of(EC, Binary, dynamic, Decoders); -version_of([{version3,v3}|EC], Binary) -> - Decoders = [?V1_ASN1_MOD, ?V2_ASN1_MOD, ?V3_ASN1_MOD], - ?BIN_LIB:version_of(EC, Binary, dynamic, Decoders); -version_of([{version3,prev3c}|EC], Binary) -> - Decoders = [?V1_ASN1_MOD, ?V2_ASN1_MOD, ?PREV3C_ASN1_MOD], - ?BIN_LIB:version_of(EC, Binary, dynamic, Decoders); -version_of([{version3,prev3b}|EC], Binary) -> - Decoders = [?V1_ASN1_MOD, ?V2_ASN1_MOD, ?PREV3B_ASN1_MOD], - ?BIN_LIB:version_of(EC, Binary, dynamic, Decoders); -version_of([{version3,prev3a}|EC], Binary) -> - Decoders = [?V1_ASN1_MOD, ?V2_ASN1_MOD, ?PREV3A_ASN1_MOD], - ?BIN_LIB:version_of(EC, Binary, dynamic, Decoders); -version_of([driver|EC], Binary) -> - Decoders = [?V1_ASN1_MOD_DRV, ?V2_ASN1_MOD_DRV, ?V3_ASN1_MOD_DRV], - ?BIN_LIB:version_of(EC, Binary, dynamic, Decoders); - -%% All values we need to take (special) care of has been delt with, -%% so just pass the rest on -version_of(EC, Binary) -> - Decoders = [?V1_ASN1_MOD, ?V2_ASN1_MOD, ?V3_ASN1_MOD], - ?BIN_LIB:version_of(EC, Binary, dynamic, Decoders). - - -%%---------------------------------------------------------------------- -%% Convert a 'MegacoMessage' record into a binary -%% Return {ok, Binary} | {error, Reason} -%%---------------------------------------------------------------------- - - -encode_message(EC, - #'MegacoMessage'{mess = #'Message'{version = V}} = MegaMsg) -> - encode_message(EC, V, MegaMsg). - - -%% -- Version 1 -- - -encode_message([{version3, _},driver|EC], 1, MegaMsg) -> - AsnMod = ?V1_ASN1_MOD_DRV, - TransMod = ?V1_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); -encode_message([driver|EC], 1, MegaMsg) -> - AsnMod = ?V1_ASN1_MOD_DRV, - TransMod = ?V1_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); -encode_message([{version3,_}|EC], 1, MegaMsg) -> - AsnMod = ?V1_ASN1_MOD, - TransMod = ?V1_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); - -%% All values we need to take (special) care of has been delt with, -%% so just pass the rest on -encode_message(EC, 1, MegaMsg) -> - AsnMod = ?V1_ASN1_MOD, - TransMod = ?V1_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); - - -%% -- Version 2 -- - -encode_message([{version3,_},driver|EC], 2, MegaMsg) -> - AsnMod = ?V2_ASN1_MOD_DRV, - TransMod = ?V2_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); -encode_message([driver|EC], 2, MegaMsg) -> - AsnMod = ?V2_ASN1_MOD_DRV, - TransMod = ?V2_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); -encode_message([{version3,_}|EC], 2, MegaMsg) -> - AsnMod = ?V2_ASN1_MOD, - TransMod = ?V2_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); - -%% All values we need to take (special) care of has been delt with, -%% so just pass the rest on -encode_message(EC, 2, MegaMsg) -> - AsnMod = ?V2_ASN1_MOD, - TransMod = ?V2_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); - - -%% -- Version 3 -- - -encode_message([{version3,v3},driver|EC], 3, MegaMsg) -> - AsnMod = ?V3_ASN1_MOD_DRV, - TransMod = ?V3_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); -encode_message([{version3,prev3c},driver|EC], 3, MegaMsg) -> - AsnMod = ?PREV3C_ASN1_MOD_DRV, - TransMod = ?PREV3C_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); -encode_message([{version3,prev3b},driver|EC], 3, MegaMsg) -> - AsnMod = ?PREV3B_ASN1_MOD_DRV, - TransMod = ?PREV3B_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); -encode_message([{version3,prev3a},driver|EC], 3, MegaMsg) -> - AsnMod = ?PREV3A_ASN1_MOD_DRV, - TransMod = ?PREV3A_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); -encode_message([{version3,v3}|EC], 3, MegaMsg) -> - AsnMod = ?V3_ASN1_MOD, - TransMod = ?V3_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); -encode_message([{version3,prev3c}|EC], 3, MegaMsg) -> - AsnMod = ?PREV3C_ASN1_MOD, - TransMod = ?PREV3C_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); -encode_message([{version3,prev3b}|EC], 3, MegaMsg) -> - AsnMod = ?PREV3B_ASN1_MOD, - TransMod = ?PREV3B_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); -encode_message([{version3,prev3a}|EC], 3, MegaMsg) -> - AsnMod = ?PREV3A_ASN1_MOD, - TransMod = ?PREV3A_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); -encode_message([driver|EC], 3, MegaMsg) -> - AsnMod = ?V3_ASN1_MOD_DRV, - TransMod = ?V3_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); - -%% All values we need to take (special) care of has been delt with, -%% so just pass the rest on -encode_message(EC, 3, MegaMsg) -> - AsnMod = ?V3_ASN1_MOD, - TransMod = ?V3_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list). - - -%%---------------------------------------------------------------------- -%% Convert a transaction (or transactions in the case of ack) record(s) -%% into a binary -%% Return {ok, Binary} | {error, Reason} -%%---------------------------------------------------------------------- - -%% encode_transaction([] = EC, 1, Trans) -> -%% AsnMod = ?V1_ASN1_MOD, -%% TransMod = ?V1_TRANS_MOD, -%% ?BIN_LIB:encode_transaction(EC, Trans, AsnMod, TransMod, -%% io_list); -%% encode_transaction([native] = EC, 1, Trans) -> -%% AsnMod = ?V1_ASN1_MOD, -%% TransMod = ?V1_TRANS_MOD, -%% ?BIN_LIB:encode_transaction(EC, Trans, AsnMod, TransMod, -%% io_list); -%% encode_transaction([driver|EC], 1, Trans) -> -%% AsnMod = ?V1_ASN1_MOD_DRV, -%% TransMod = ?V1_TRANS_MOD, -%% ?BIN_LIB:encode_transaction(EC, Trans, AsnMod, TransMod, -%% io_list); -%% encode_transaction(_EC, 1, _Trans) -> -%% AsnMod = ?V1_ASN1_MOD, -%% TransMod = ?V1_TRANS_MOD, -%% ?BIN_LIB:encode_transaction(EC, Trans, AsnMod, TransMod, -%% io_list); -%% encode_transaction([] = EC, 2, Trans) -> -%% AsnMod = ?V2_ASN1_MOD, -%% TransMod = ?V2_TRANS_MOD, -%% ?BIN_LIB:encode_transaction(EC, Trans, AsnMod, TransMod, -%% io_list); -%% encode_transaction([native] = EC, 2, Trans) -> -%% AsnMod = ?V2_ASN1_MOD, -%% TransMod = ?V2_TRANS_MOD, -%% ?BIN_LIB:encode_transaction(EC, Trans, AsnMod, TransMod, -%% io_list); -%% encode_transaction([driver|EC], 2, Trans) -> -%% AsnMod = ?V2_ASN1_MOD_DRV, -%% TransMod = ?V2_TRANS_MOD, -%% ?BIN_LIB:encode_transaction(EC, Trans, AsnMod, TransMod, -%% io_list); -%%encode_transaction(_EC, 2, _Trans) -> -%% AsnMod = ?V2_ASN1_MOD, -%% TransMod = ?V2_TRANS_MOD, -%% ?BIN_LIB:encode_transaction(EC, Trans, AsnMod, TransMod, -%% io_list). -%% encode_transaction([] = EC, 3, Trans) -> -%% AsnMod = ?V3_ASN1_MOD, -%% TransMod = ?V3_TRANS_MOD, -%% ?BIN_LIB:encode_transaction(EC, Trans, AsnMod, TransMod, -%% io_list); -%% encode_transaction([native] = EC, 3, Trans) -> -%% AsnMod = ?V3_ASN1_MOD, -%% TransMod = ?V3_TRANS_MOD, -%% ?BIN_LIB:encode_transaction(EC, Trans, AsnMod, TransMod, -%% io_list); -%% encode_transaction([driver|EC], 3, Trans) -> -%% AsnMod = ?V3_ASN1_MOD_DRV, -%% TransMod = ?V3_TRANS_MOD, -%% ?BIN_LIB:encode_transaction(EC, Trans, AsnMod, TransMod, -%% io_list); -%%encode_transaction(_EC, 3, _Trans) -> -%% AsnMod = ?V3_ASN1_MOD, -%% TransMod = ?V3_TRANS_MOD, -%% ?BIN_LIB:encode_transaction(EC, Trans, AsnMod, TransMod, -%% io_list). -encode_transaction(_EC, _V, _Trans) -> - {error, not_implemented}. - - -%%---------------------------------------------------------------------- -%% Convert a list of ActionRequest record's into a binary -%% Return {ok, DeepIoList} | {error, Reason} -%%---------------------------------------------------------------------- -%% encode_action_requests([] = EC, 1, ActReqs) when is_list(ActReqs) -> -%% AsnMod = ?V1_ASN1_MOD, -%% TransMod = ?V1_TRANS_MOD, -%% ?BIN_LIB:encode_action_requests(EC, ActReqs, -%% AsnMod, TransMod, -%% io_list); -%% encode_action_requests([native] = EC, 1, ActReqs) when is_list(ActReqs) -> -%% AsnMod = ?V1_ASN1_MOD, -%% TransMod = ?V1_TRANS_MOD, -%% ?BIN_LIB:encode_action_requests(EC, ActReqs, -%% AsnMod, TransMod, -%% io_list); -%% encode_action_requests([driver|EC], 1, ActReqs) when is_list(ActReqs) -> -%% AsnMod = ?V1_ASN1_MOD_DRV, -%% TransMod = ?V1_TRANS_MOD, -%% ?BIN_LIB:encode_action_requests(EC, ActReqs, -%% AsnMod, TransMod, -%% io_list); -%% encode_action_requests(_EC, 1, ActReqs) when is_list(ActReqs) -> -%% AsnMod = ?V1_ASN1_MOD, -%% TransMod = ?V1_TRANS_MOD, -%% ?BIN_LIB:encode_action_requests(EC, ActReqs, -%% AsnMod, TransMod, -%% io_list); -%% encode_action_requests([] = EC, 2, ActReqs) when is_list(ActReqs) -> -%% AsnMod = ?V2_ASN1_MOD, -%% TransMod = ?V2_TRANS_MOD, -%% ?BIN_LIB:encode_action_requests(EC, ActReqs, -%% AsnMod, TransMod, -%% io_list); -%% encode_action_requests([native] = EC, 2, ActReqs) when is_list(ActReqs) -> -%% AsnMod = ?V2_ASN1_MOD, -%% TransMod = ?V2_TRANS_MOD, -%% ?BIN_LIB:encode_action_requests(EC, ActReqs, -%% AsnMod, TransMod, -%% io_list); -%% encode_action_requests([driver|EC], 2, ActReqs) when is_list(ActReqs) -> -%% AsnMod = ?V2_ASN1_MOD_DRV, -%% TransMod = ?V2_TRANS_MOD, -%% ?BIN_LIB:encode_action_requests(EC, ActReqs, -%% AsnMod, TransMod, -%% io_list); -%% encode_action_requests(_EC, 2, ActReqs) when is_list(ActReqs) -> -%% AsnMod = ?V2_ASN1_MOD, -%% TransMod = ?V2_TRANS_MOD, -%% ?BIN_LIB:encode_action_requests(EC, ActReqs, -%% AsnMod, TransMod, -%% io_list); -%% encode_action_requests([] = EC, 3, ActReqs) when is_list(ActReqs) -> -%% AsnMod = ?V3_ASN1_MOD, -%% TransMod = ?V3_TRANS_MOD, -%% ?BIN_LIB:encode_action_requests(EC, ActReqs, -%% AsnMod, TransMod, -%% io_list); -%% encode_action_requests([native] = EC, 3, ActReqs) when is_list(ActReqs) -> -%% AsnMod = ?V3_ASN1_MOD, -%% TransMod = ?V3_TRANS_MOD, -%% ?BIN_LIB:encode_action_requests(EC, ActReqs, -%% AsnMod, TransMod, -%% io_list); -%% encode_action_requests([driver|EC], 3, ActReqs) when is_list(ActReqs) -> -%% AsnMod = ?V3_ASN1_MOD_DRV, -%% TransMod = ?V3_TRANS_MOD, -%% ?BIN_LIB:encode_action_requests(EC, ActReqs, -%% AsnMod, TransMod, -%% io_list); -%%encode_action_requests(_EC, 3, ActReqs) when is_list(ActReqs) -> -%% AsnMod = ?V3_ASN1_MOD, -%% TransMod = ?V3_TRANS_MOD, -%% ?BIN_LIB:encode_action_requests(EC, ActReqs, -%% AsnMod, TransMod, -%% io_list); -%% encode_action_requests(_EC, V, _ActReqs) -> -%% {error, {bad_version, V}}. -encode_action_requests(_EC, _V, _ActReqs) -> - {error, not_implemented}. - - -%%---------------------------------------------------------------------- -%% Convert a ActionRequest record into a binary -%% Return {ok, DeepIoList} | {error, Reason} -%%---------------------------------------------------------------------- -%% encode_action_request([] = EC, 1, ActReq) -> -%% AsnMod = ?V1_ASN1_MOD, -%% TransMod = ?V1_TRANS_MOD, -%% ?BIN_LIB:encode_action_request(EC, ActReq, -%% AsnMod, TransMod, -%% io_list); -%% encode_action_request([native] = EC, 1, ActReq) -> -%% AsnMod = ?V1_ASN1_MOD, -%% TransMod = ?V1_TRANS_MOD, -%% ?BIN_LIB:encode_action_request(EC, ActReq, -%% AsnMod, TransMod, -%% io_list); -%% encode_action_request([driver|EC], 1, ActReq) -> -%% AsnMod = ?V1_ASN1_MOD_DRV, -%% TransMod = ?V1_TRANS_MOD, -%% ?BIN_LIB:encode_action_request(EC, ActReq, -%% AsnMod, TransMod, -%% io_list); -%% encode_action_request(_EC, 1, ActReq) -> -%% AsnMod = ?V1_ASN1_MOD, -%% TransMod = ?V1_TRANS_MOD, -%% ?BIN_LIB:encode_action_request(EC, ActReq, -%% AsnMod, TransMod, -%% io_list); -%% encode_action_request([] = EC, 2, ActReq) -> -%% AsnMod = ?V2_ASN1_MOD, -%% TransMod = ?V2_TRANS_MOD, -%% ?BIN_LIB:encode_action_request(EC, ActReq, -%% AsnMod, TransMod, -%% io_list); -%% encode_action_request([native] = EC, 2, ActReq) -> -%% AsnMod = ?V2_ASN1_MOD, -%% TransMod = ?V2_TRANS_MOD, -%% ?BIN_LIB:encode_action_request(EC, ActReq, -%% AsnMod, TransMod, -%% io_list); -%% encode_action_request([driver|EC], 2, ActReq) -> -%% AsnMod = ?V2_ASN1_MOD_DRV, -%% TransMod = ?V2_TRANS_MOD, -%% ?BIN_LIB:encode_action_request(EC, ActReq, -%% AsnMod, TransMod, -%% io_list); -%% encode_action_request(_EC, 2, ActReq) -> -%% AsnMod = ?V2_ASN1_MOD, -%% TransMod = ?V2_TRANS_MOD, -%% ?BIN_LIB:encode_action_request(EC, ActReq, -%% AsnMod, TransMod, -%% io_list); -%% encode_action_request([] = EC, 3, ActReq) -> -%% AsnMod = ?V3_ASN1_MOD, -%% TransMod = ?V3_TRANS_MOD, -%% ?BIN_LIB:encode_action_request(EC, ActReq, -%% AsnMod, TransMod, -%% io_list); -%% encode_action_request([native] = EC, 3, ActReq) -> -%% AsnMod = ?V3_ASN1_MOD, -%% TransMod = ?V3_TRANS_MOD, -%% ?BIN_LIB:encode_action_request(EC, ActReq, -%% AsnMod, TransMod, -%% io_list); -%% encode_action_request([driver|EC], 3, ActReq) -> -%% AsnMod = ?V3_ASN1_MOD_DRV, -%% TransMod = ?V3_TRANS_MOD, -%% ?BIN_LIB:encode_action_request(EC, ActReq, -%% AsnMod, TransMod, -%% io_list); -%% encode_action_request(_EC, 3, ActReq) -> -%% AsnMod = ?V3_ASN1_MOD, -%% TransMod = ?V3_TRANS_MOD, -%% ?BIN_LIB:encode_action_request(EC, ActReq, -%% AsnMod, TransMod, -%% io_list); -encode_action_request(_EC, _V, _ActReq) -> - {error, not_implemented}. - - -%%---------------------------------------------------------------------- -%% Convert a action reply into a deep io list -%% Not yest supported by this binary codec! -%% Return {ok, DeepIoList} | {error, Reason} -%%---------------------------------------------------------------------- - -encode_action_reply(_EC, _V, _AcionReply) -> - {error, not_implemented}. - - -%%---------------------------------------------------------------------- -%% Convert a binary into a 'MegacoMessage' record -%% Return {ok, MegacoMessageRecord} | {error, Reason} -%%---------------------------------------------------------------------- - -%% Old decode function -decode_message(EC, Binary) -> - decode_message(EC, 1, Binary). - -%% -- Dynamic version detection -- - -%% Select from message -decode_message([{version3,v3},driver|EC], dynamic, Binary) -> - Mods = [{?V1_ASN1_MOD_DRV, ?V1_TRANS_MOD}, - {?V2_ASN1_MOD_DRV, ?V2_TRANS_MOD}, - {?V3_ASN1_MOD_DRV, ?V3_TRANS_MOD}], - ?BIN_LIB:decode_message_dynamic(EC, Binary, Mods, binary); -decode_message([{version3,prev3c},driver|EC], dynamic, Binary) -> - Mods = [{?V1_ASN1_MOD_DRV, ?V1_TRANS_MOD}, - {?V2_ASN1_MOD_DRV, ?V2_TRANS_MOD}, - {?PREV3C_ASN1_MOD_DRV, ?PREV3C_TRANS_MOD}], - ?BIN_LIB:decode_message_dynamic(EC, Binary, Mods, binary); -decode_message([{version3,prev3b},driver|EC], dynamic, Binary) -> - Mods = [{?V1_ASN1_MOD_DRV, ?V1_TRANS_MOD}, - {?V2_ASN1_MOD_DRV, ?V2_TRANS_MOD}, - {?PREV3B_ASN1_MOD_DRV, ?PREV3B_TRANS_MOD}], - ?BIN_LIB:decode_message_dynamic(EC, Binary, Mods, binary); -decode_message([{version3,prev3a},driver|EC], dynamic, Binary) -> - Mods = [{?V1_ASN1_MOD_DRV, ?V1_TRANS_MOD}, - {?V2_ASN1_MOD_DRV, ?V2_TRANS_MOD}, - {?PREV3A_ASN1_MOD_DRV, ?PREV3A_TRANS_MOD}], - ?BIN_LIB:decode_message_dynamic(EC, Binary, Mods, binary); -decode_message([{version3,v3}|EC], dynamic, Binary) -> - Mods = [{?V1_ASN1_MOD, ?V1_TRANS_MOD}, - {?V2_ASN1_MOD, ?V2_TRANS_MOD}, - {?V3_ASN1_MOD, ?V3_TRANS_MOD}], - ?BIN_LIB:decode_message_dynamic(EC, Binary, Mods, binary); -decode_message([{version3,prev3c}|EC], dynamic, Binary) -> - Mods = [{?V1_ASN1_MOD, ?V1_TRANS_MOD}, - {?V2_ASN1_MOD, ?V2_TRANS_MOD}, - {?PREV3C_ASN1_MOD, ?PREV3C_TRANS_MOD}], - ?BIN_LIB:decode_message_dynamic(EC, Binary, Mods, binary); -decode_message([{version3,prev3b}|EC], dynamic, Binary) -> - Mods = [{?V1_ASN1_MOD, ?V1_TRANS_MOD}, - {?V2_ASN1_MOD, ?V2_TRANS_MOD}, - {?PREV3B_ASN1_MOD, ?PREV3B_TRANS_MOD}], - ?BIN_LIB:decode_message_dynamic(EC, Binary, Mods, binary); -decode_message([{version3,prev3a}|EC], dynamic, Binary) -> - Mods = [{?V1_ASN1_MOD, ?V1_TRANS_MOD}, - {?V2_ASN1_MOD, ?V2_TRANS_MOD}, - {?PREV3A_ASN1_MOD, ?PREV3A_TRANS_MOD}], - ?BIN_LIB:decode_message_dynamic(EC, Binary, Mods, binary); -decode_message([driver|EC], dynamic, Binary) -> - Mods = [{?V1_ASN1_MOD_DRV, ?V1_TRANS_MOD}, - {?V2_ASN1_MOD_DRV, ?V2_TRANS_MOD}, - {?V3_ASN1_MOD_DRV, ?V3_TRANS_MOD}], - ?BIN_LIB:decode_message_dynamic(EC, Binary, Mods, binary); - -%% All values we need to take (special) care of has been delt with, -%% so just pass the rest on -decode_message(EC, dynamic, Binary) -> - Mods = [{?V1_ASN1_MOD, ?V1_TRANS_MOD}, - {?V2_ASN1_MOD, ?V2_TRANS_MOD}, - {?V3_ASN1_MOD, ?V3_TRANS_MOD}], - ?BIN_LIB:decode_message_dynamic(EC, Binary, Mods, binary); - - -%% -- Version 1 -- - -decode_message([{version3,_},driver|EC], 1, Binary) -> - AsnMod = ?V1_ASN1_MOD_DRV, - TransMod = ?V1_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); -decode_message([driver|EC], 1, Binary) -> - AsnMod = ?V1_ASN1_MOD_DRV, - TransMod = ?V1_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); -decode_message([{version3,_}|EC], 1, Binary) -> - AsnMod = ?V1_ASN1_MOD, - TransMod = ?V1_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); - -%% All values we need to take (special) care of has been delt with, -%% so just pass the rest on -decode_message(EC, 1, Binary) -> - AsnMod = ?V1_ASN1_MOD, - TransMod = ?V1_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); - - -%% -- Version 2 -- - -decode_message([{version3,_},driver|EC], 2, Binary) -> - AsnMod = ?V2_ASN1_MOD_DRV, - TransMod = ?V2_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); -decode_message([driver|EC], 2, Binary) -> - AsnMod = ?V2_ASN1_MOD_DRV, - TransMod = ?V2_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); -decode_message([{version3,_}|EC], 2, Binary) -> - AsnMod = ?V2_ASN1_MOD, - TransMod = ?V2_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); - -%% All values we need to take (special) care of has been delt with, -%% so just pass the rest on -decode_message(EC, 2, Binary) -> - AsnMod = ?V2_ASN1_MOD, - TransMod = ?V2_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); - - -%% -- Version 3 -- - -decode_message([{version3,v3},driver|EC], 3, Binary) -> - AsnMod = ?V3_ASN1_MOD_DRV, - TransMod = ?V3_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); -decode_message([{version3,prev3c},driver|EC], 3, Binary) -> - AsnMod = ?PREV3C_ASN1_MOD_DRV, - TransMod = ?PREV3C_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); -decode_message([{version3,prev3b},driver|EC], 3, Binary) -> - AsnMod = ?PREV3B_ASN1_MOD_DRV, - TransMod = ?PREV3B_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); -decode_message([{version3,prev3a},driver|EC], 3, Binary) -> - AsnMod = ?PREV3A_ASN1_MOD_DRV, - TransMod = ?PREV3A_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); -decode_message([{version3,v3}|EC], 3, Binary) -> - AsnMod = ?V3_ASN1_MOD, - TransMod = ?V3_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); -decode_message([{version3,prev3c}|EC], 3, Binary) -> - AsnMod = ?PREV3C_ASN1_MOD, - TransMod = ?PREV3C_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); -decode_message([{version3,prev3b}|EC], 3, Binary) -> - AsnMod = ?PREV3B_ASN1_MOD, - TransMod = ?PREV3B_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); -decode_message([{version3,prev3a}|EC], 3, Binary) -> - AsnMod = ?PREV3A_ASN1_MOD, - TransMod = ?PREV3A_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); -decode_message([driver|EC], 3, Binary) -> - AsnMod = ?V3_ASN1_MOD_DRV, - TransMod = ?V3_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); - -%% All values we need to take (special) care of has been delt with, -%% so just pass the rest on -decode_message(EC, 3, Binary) -> - AsnMod = ?V3_ASN1_MOD, - TransMod = ?V3_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary). - - -decode_mini_message([{version3,v3},driver|EC], dynamic, Bin) -> - Mods = [?V1_ASN1_MOD_DRV, - ?V2_ASN1_MOD_DRV, - ?V3_ASN1_MOD_DRV], - ?BIN_LIB:decode_mini_message_dynamic(EC, Bin, Mods, binary); -decode_mini_message([{version3,prev3c},driver|EC], dynamic, Bin) -> - Mods = [?V1_ASN1_MOD_DRV, - ?V2_ASN1_MOD_DRV, - ?PREV3C_ASN1_MOD_DRV], - ?BIN_LIB:decode_mini_message_dynamic(EC, Bin, Mods, binary); -decode_mini_message([{version3,prev3b},driver|EC], dynamic, Bin) -> - Mods = [?V1_ASN1_MOD_DRV, - ?V2_ASN1_MOD_DRV, - ?PREV3B_ASN1_MOD_DRV], - ?BIN_LIB:decode_mini_message_dynamic(EC, Bin, Mods, binary); -decode_mini_message([{version3,prev3a},driver|EC], dynamic, Bin) -> - Mods = [?V1_ASN1_MOD_DRV, - ?V2_ASN1_MOD_DRV, - ?PREV3A_ASN1_MOD_DRV], - ?BIN_LIB:decode_mini_message_dynamic(EC, Bin, Mods, binary); -decode_mini_message([{version3,v3}|EC], dynamic, Bin) -> - Mods = [?V1_ASN1_MOD, - ?V2_ASN1_MOD, - ?V3_ASN1_MOD], - ?BIN_LIB:decode_mini_message_dynamic(EC, Bin, Mods, binary); -decode_mini_message([{version3,prev3c}|EC], dynamic, Bin) -> - Mods = [?V1_ASN1_MOD, - ?V2_ASN1_MOD, - ?PREV3C_ASN1_MOD], - ?BIN_LIB:decode_mini_message_dynamic(EC, Bin, Mods, binary); -decode_mini_message([{version3,prev3b}|EC], dynamic, Bin) -> - Mods = [?V1_ASN1_MOD, - ?V2_ASN1_MOD, - ?PREV3B_ASN1_MOD], - ?BIN_LIB:decode_mini_message_dynamic(EC, Bin, Mods, binary); -decode_mini_message([{version3,prev3a}|EC], dynamic, Bin) -> - Mods = [?V1_ASN1_MOD, - ?V2_ASN1_MOD, - ?PREV3A_ASN1_MOD], - ?BIN_LIB:decode_mini_message_dynamic(EC, Bin, Mods, binary); -decode_mini_message([driver|EC], dynamic, Bin) -> - Mods = [?V1_ASN1_MOD_DRV, - ?V2_ASN1_MOD_DRV, - ?V3_ASN1_MOD_DRV], - ?BIN_LIB:decode_mini_message_dynamic(EC, Bin, Mods, binary); -decode_mini_message(EC, dynamic, Bin) -> - Mods = [?V1_ASN1_MOD, - ?V2_ASN1_MOD, - ?V3_ASN1_MOD], - ?BIN_LIB:decode_mini_message_dynamic(EC, Bin, Mods, binary); -decode_mini_message([{version3,_},driver|EC], 1, Bin) -> - AsnMod = ?V1_ASN1_MOD_DRV, - ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); -decode_mini_message([{version3,_}|EC], 1, Bin) -> - AsnMod = ?V1_ASN1_MOD, - ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); -decode_mini_message([driver|EC], 1, Bin) -> - AsnMod = ?V1_ASN1_MOD_DRV, - ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); -decode_mini_message(EC, 1, Bin) -> - AsnMod = ?V1_ASN1_MOD, - ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); -decode_mini_message([{version3,_},driver|EC], 2, Bin) -> - AsnMod = ?V2_ASN1_MOD_DRV, - ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); -decode_mini_message([{version3,_}|EC], 2, Bin) -> - AsnMod = ?V2_ASN1_MOD, - ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); -decode_mini_message([driver|EC], 2, Bin) -> - AsnMod = ?V2_ASN1_MOD_DRV, - ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); -decode_mini_message(EC, 2, Bin) -> - AsnMod = ?V2_ASN1_MOD, - ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); -decode_mini_message([{version3,v3},driver|EC], 3, Bin) -> - AsnMod = ?V3_ASN1_MOD_DRV, - ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); -decode_mini_message([{version3,prev3c},driver|EC], 3, Bin) -> - AsnMod = ?PREV3C_ASN1_MOD_DRV, - ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); -decode_mini_message([{version3,prev3b},driver|EC], 3, Bin) -> - AsnMod = ?PREV3B_ASN1_MOD_DRV, - ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); -decode_mini_message([{version3,prev3a},driver|EC], 3, Bin) -> - AsnMod = ?PREV3A_ASN1_MOD_DRV, - ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); -decode_mini_message([{version3,v3}|EC], 3, Bin) -> - AsnMod = ?V3_ASN1_MOD, - ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); -decode_mini_message([{version3,prev3c}|EC], 3, Bin) -> - AsnMod = ?PREV3C_ASN1_MOD, - ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); -decode_mini_message([{version3,prev3b}|EC], 3, Bin) -> - AsnMod = ?PREV3B_ASN1_MOD, - ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); -decode_mini_message([{version3,prev3a}|EC], 3, Bin) -> - AsnMod = ?PREV3A_ASN1_MOD, - ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); -decode_mini_message([driver|EC], 3, Bin) -> - AsnMod = ?V3_ASN1_MOD_DRV, - ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); -decode_mini_message(EC, 3, Bin) -> - AsnMod = ?V3_ASN1_MOD, - ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary). diff --git a/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_prev3a.set.asn b/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_prev3a.set.asn deleted file mode 100644 index b9ba7ffdb4..0000000000 --- a/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_prev3a.set.asn +++ /dev/null @@ -1 +0,0 @@ -MEDIA-GATEWAY-CONTROL-prev3a.asn diff --git a/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_prev3b.set.asn b/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_prev3b.set.asn deleted file mode 100644 index 0437bde310..0000000000 --- a/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_prev3b.set.asn +++ /dev/null @@ -1 +0,0 @@ -MEDIA-GATEWAY-CONTROL-prev3b.asn diff --git a/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_prev3c.asn1config b/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_prev3c.asn1config deleted file mode 100644 index c74422b9a2..0000000000 --- a/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_prev3c.asn1config +++ /dev/null @@ -1,43 +0,0 @@ -{exclusive_decode, - {'megaco_ber_bin_media_gateway_control_prev3c', - [ - {decode_message_trans_partial, - [ - 'MegacoMessage',[{mess,[{messageBody,[{transactions,parts}]}]}] - ] - }, - {decode_message_acts_partial, - ['Transaction', - [ - {transactionRequest, - [ - {actions,parts} - ] - }, - {transactionReply, - [ - {transactionResult, [{actionReplies,parts}]} - ] - } - ] - ] - }, - {decode_message_version, - ['MegacoMessage', - [ - {authHeader,undecoded}, - {mess,[{mId,undecoded},{messageBody,undecoded}]} - ] - ] - }, - {decode_message_mId, - ['MegacoMessage', - [ - {authHeader,undecoded}, - {mess,[{messageBody,undecoded}]} - ] - ] - } - ] - } -}. diff --git a/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_prev3c.set.asn b/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_prev3c.set.asn deleted file mode 100644 index e78055fbad..0000000000 --- a/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_prev3c.set.asn +++ /dev/null @@ -1 +0,0 @@ -MEDIA-GATEWAY-CONTROL-prev3c.asn diff --git a/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_v1.asn1config b/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_v1.asn1config deleted file mode 100644 index e815e90948..0000000000 --- a/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_v1.asn1config +++ /dev/null @@ -1,44 +0,0 @@ -{exclusive_decode, - {'megaco_ber_bin_media_gateway_control_v1', - [ - {decode_message_trans_partial, - [ - 'MegacoMessage',[{mess,[{messageBody,[{transactions,parts}]}]}] - ] - }, - {decode_message_acts_partial, - ['Transaction', - [ - {transactionRequest, - [ - {actions,parts} - ] - }, - {transactionReply, - [ - {transactionResult, [{actionReplies,parts}]} - ] - } - ] - ] - }, - {decode_message_version, - ['MegacoMessage', - [ - {authHeader,undecoded}, - {mess,[{mId,undecoded},{messageBody,undecoded}]} - ] - ] - }, - {decode_message_mId, - ['MegacoMessage', - [ - {authHeader,undecoded}, - {mess,[{messageBody,undecoded}]} - ] - ] - } - - ] - } -}. diff --git a/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_v1.set.asn b/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_v1.set.asn deleted file mode 100644 index 0f5a92dba1..0000000000 --- a/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_v1.set.asn +++ /dev/null @@ -1 +0,0 @@ -MEDIA-GATEWAY-CONTROL-v1.asn diff --git a/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_v2.set.asn b/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_v2.set.asn deleted file mode 100644 index 7fc82b127f..0000000000 --- a/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_v2.set.asn +++ /dev/null @@ -1 +0,0 @@ -MEDIA-GATEWAY-CONTROL-v2.asn diff --git a/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_v3.set.asn b/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_v3.set.asn deleted file mode 100644 index 1d7950a283..0000000000 --- a/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_v3.set.asn +++ /dev/null @@ -1 +0,0 @@ -MEDIA-GATEWAY-CONTROL-v3.asn diff --git a/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_v2.asn1config b/lib/megaco/src/binary/megaco_ber_media_gateway_control_prev3a.asn1config index cc072b30ee..da67561f1b 100644 --- a/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_v2.asn1config +++ b/lib/megaco/src/binary/megaco_ber_media_gateway_control_prev3a.asn1config @@ -1,5 +1,5 @@ {exclusive_decode, - {'megaco_ber_bin_media_gateway_control_v2', + {'megaco_ber_media_gateway_control_prev3a', [ {decode_message_trans_partial, [ @@ -14,7 +14,7 @@ {actions,parts} ] }, - {transactionReply, + {transactionReply, [ {transactionResult, [{actionReplies,parts}]} ] diff --git a/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_v3.asn1config b/lib/megaco/src/binary/megaco_ber_media_gateway_control_prev3b.asn1config index deeb2b2da9..2f25f03d97 100644 --- a/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_v3.asn1config +++ b/lib/megaco/src/binary/megaco_ber_media_gateway_control_prev3b.asn1config @@ -1,5 +1,5 @@ {exclusive_decode, - {'megaco_ber_bin_media_gateway_control_v3', + {'megaco_ber_media_gateway_control_prev3b', [ {decode_message_trans_partial, [ @@ -14,7 +14,7 @@ {actions,parts} ] }, - {transactionReply, + {transactionReply, [ {transactionResult, [{actionReplies,parts}]} ] diff --git a/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_prev3a.asn1config b/lib/megaco/src/binary/megaco_ber_media_gateway_control_prev3c.asn1config index 456ce750ad..23c343eed0 100644 --- a/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_prev3a.asn1config +++ b/lib/megaco/src/binary/megaco_ber_media_gateway_control_prev3c.asn1config @@ -1,5 +1,5 @@ {exclusive_decode, - {'megaco_ber_bin_media_gateway_control_prev3a', + {'megaco_ber_media_gateway_control_prev3c', [ {decode_message_trans_partial, [ @@ -14,7 +14,7 @@ {actions,parts} ] }, - {transactionReply, + {transactionReply, [ {transactionResult, [{actionReplies,parts}]} ] diff --git a/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_v1.asn1config b/lib/megaco/src/binary/megaco_ber_media_gateway_control_v1.asn1config index ea10a7d527..951825c0aa 100644 --- a/lib/megaco/src/binary/megaco_ber_bin_drv_media_gateway_control_v1.asn1config +++ b/lib/megaco/src/binary/megaco_ber_media_gateway_control_v1.asn1config @@ -1,5 +1,5 @@ {exclusive_decode, - {'megaco_ber_bin_drv_media_gateway_control_v1', + {'megaco_ber_media_gateway_control_v1', [ {decode_message_trans_partial, [ @@ -14,7 +14,7 @@ {actions,parts} ] }, - {transactionReply, + {transactionReply, [ {transactionResult, [{actionReplies,parts}]} ] @@ -38,7 +38,7 @@ ] ] } + ] } }. - diff --git a/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_prev3b.asn1config b/lib/megaco/src/binary/megaco_ber_media_gateway_control_v3.asn1config index fa5cd80baf..e4b1f9ece9 100644 --- a/lib/megaco/src/binary/megaco_ber_bin_media_gateway_control_prev3b.asn1config +++ b/lib/megaco/src/binary/megaco_ber_media_gateway_control_v3.asn1config @@ -1,5 +1,5 @@ {exclusive_decode, - {'megaco_ber_bin_media_gateway_control_prev3b', + {'megaco_ber_media_gateway_control_v3', [ {decode_message_trans_partial, [ @@ -14,7 +14,7 @@ {actions,parts} ] }, - {transactionReply, + {transactionReply, [ {transactionResult, [{actionReplies,parts}]} ] diff --git a/lib/megaco/src/binary/megaco_binary_encoder.erl b/lib/megaco/src/binary/megaco_binary_encoder.erl index f825f91a45..51e167590d 100644 --- a/lib/megaco/src/binary/megaco_binary_encoder.erl +++ b/lib/megaco/src/binary/megaco_binary_encoder.erl @@ -241,55 +241,30 @@ encode_action_reply(_EC, _V, _AcionReply) -> %% Return {ok, Version} | {error, Reason} %%---------------------------------------------------------------------- -version_of([{version3,v3},driver|EC], Binary) -> - Decoders = [megaco_ber_bin_drv_media_gateway_control_v1, - megaco_ber_bin_drv_media_gateway_control_v2, - megaco_ber_bin_drv_media_gateway_control_v3], - ?BIN_LIB:version_of(EC, Binary, dynamic, Decoders); -version_of([{version3,prev3c},driver|EC], Binary) -> - Decoders = [megaco_ber_bin_drv_media_gateway_control_v1, - megaco_ber_bin_drv_media_gateway_control_v2, - megaco_ber_bin_drv_media_gateway_control_prev3c], - ?BIN_LIB:version_of(EC, Binary, dynamic, Decoders); -version_of([{version3,prev3b},driver|EC], Binary) -> - Decoders = [megaco_ber_bin_drv_media_gateway_control_v1, - megaco_ber_bin_drv_media_gateway_control_v2, - megaco_ber_bin_drv_media_gateway_control_prev3b], - ?BIN_LIB:version_of(EC, Binary, dynamic, Decoders); -version_of([{version3,prev3a},driver|EC], Binary) -> - Decoders = [megaco_ber_bin_drv_media_gateway_control_v1, - megaco_ber_bin_drv_media_gateway_control_v2, - megaco_ber_bin_drv_media_gateway_control_prev3a], - ?BIN_LIB:version_of(EC, Binary, dynamic, Decoders); -version_of([driver|EC], Binary) -> - Decoders = [megaco_ber_bin_drv_media_gateway_control_v1, - megaco_ber_bin_drv_media_gateway_control_v2, - megaco_ber_bin_drv_media_gateway_control_v3], - ?BIN_LIB:version_of(EC, Binary, dynamic, Decoders); version_of([{version3,v3}|EC], Binary) -> - Decoders = [megaco_ber_bin_media_gateway_control_v1, - megaco_ber_bin_media_gateway_control_v2, - megaco_ber_bin_media_gateway_control_v3], + Decoders = [megaco_ber_media_gateway_control_v1, + megaco_ber_media_gateway_control_v2, + megaco_ber_media_gateway_control_v3], ?BIN_LIB:version_of(EC, Binary, dynamic, Decoders); version_of([{version3,prev3c}|EC], Binary) -> - Decoders = [megaco_ber_bin_media_gateway_control_v1, - megaco_ber_bin_media_gateway_control_v2, - megaco_ber_bin_media_gateway_control_prev3c], + Decoders = [megaco_ber_media_gateway_control_v1, + megaco_ber_media_gateway_control_v2, + megaco_ber_media_gateway_control_prev3c], ?BIN_LIB:version_of(EC, Binary, dynamic, Decoders); version_of([{version3,prev3b}|EC], Binary) -> - Decoders = [megaco_ber_bin_media_gateway_control_v1, - megaco_ber_bin_media_gateway_control_v2, - megaco_ber_bin_media_gateway_control_prev3b], + Decoders = [megaco_ber_media_gateway_control_v1, + megaco_ber_media_gateway_control_v2, + megaco_ber_media_gateway_control_prev3b], ?BIN_LIB:version_of(EC, Binary, dynamic, Decoders); version_of([{version3,prev3a}|EC], Binary) -> - Decoders = [megaco_ber_bin_media_gateway_control_v1, - megaco_ber_bin_media_gateway_control_v2, - megaco_ber_bin_media_gateway_control_prev3a], + Decoders = [megaco_ber_media_gateway_control_v1, + megaco_ber_media_gateway_control_v2, + megaco_ber_media_gateway_control_prev3a], ?BIN_LIB:version_of(EC, Binary, dynamic, Decoders); version_of(EC, Binary) -> - Decoders = [megaco_ber_bin_media_gateway_control_v1, - megaco_ber_bin_media_gateway_control_v2, - megaco_ber_bin_media_gateway_control_v3], + Decoders = [megaco_ber_media_gateway_control_v1, + megaco_ber_media_gateway_control_v2, + megaco_ber_media_gateway_control_v3], ?BIN_LIB:version_of(EC, Binary, dynamic, Decoders). @@ -301,287 +276,153 @@ version_of(EC, Binary) -> decode_message(EC, Binary) -> decode_message(EC, 1, Binary). -decode_message([{version3,v3},driver|EC], dynamic, Binary) -> - Decoders = [{megaco_ber_bin_drv_media_gateway_control_v1, - megaco_binary_transformer_v1}, - {megaco_ber_bin_drv_media_gateway_control_v2, - megaco_binary_transformer_v2}, - {megaco_ber_bin_drv_media_gateway_control_v3, - megaco_binary_transformer_v3}], - ?BIN_LIB:decode_message_dynamic(EC, Binary, Decoders, binary); -decode_message([{version3,prev3c},driver|EC], dynamic, Binary) -> - Decoders = [{megaco_ber_bin_drv_media_gateway_control_v1, - megaco_binary_transformer_v1}, - {megaco_ber_bin_drv_media_gateway_control_v2, - megaco_binary_transformer_v2}, - {megaco_ber_bin_drv_media_gateway_control_prev3c, - megaco_binary_transformer_prev3c}], - ?BIN_LIB:decode_message_dynamic(EC, Binary, Decoders, binary); -decode_message([{version3,prev3b},driver|EC], dynamic, Binary) -> - Decoders = [{megaco_ber_bin_drv_media_gateway_control_v1, - megaco_binary_transformer_v1}, - {megaco_ber_bin_drv_media_gateway_control_v2, - megaco_binary_transformer_v2}, - {megaco_ber_bin_drv_media_gateway_control_prev3b, - megaco_binary_transformer_prev3b}], - ?BIN_LIB:decode_message_dynamic(EC, Binary, Decoders, binary); -decode_message([{version3,prev3a},driver|EC], dynamic, Binary) -> - Decoders = [{megaco_ber_bin_drv_media_gateway_control_v1, - megaco_binary_transformer_v1}, - {megaco_ber_bin_drv_media_gateway_control_v2, - megaco_binary_transformer_v2}, - {megaco_ber_bin_drv_media_gateway_control_prev3a, - megaco_binary_transformer_prev3a}], - ?BIN_LIB:decode_message_dynamic(EC, Binary, Decoders, binary); -decode_message([driver|EC], dynamic, Binary) -> - Decoders = [{megaco_ber_bin_drv_media_gateway_control_v1, - megaco_binary_transformer_v1}, - {megaco_ber_bin_drv_media_gateway_control_v2, - megaco_binary_transformer_v2}, - {megaco_ber_bin_drv_media_gateway_control_v3, - megaco_binary_transformer_v3}], - ?BIN_LIB:decode_message_dynamic(EC, Binary, Decoders, binary); decode_message([{version3,v3}|EC], dynamic, Binary) -> - Decoders = [{megaco_ber_bin_media_gateway_control_v1, + Decoders = [{megaco_ber_media_gateway_control_v1, megaco_binary_transformer_v1}, - {megaco_ber_bin_media_gateway_control_v2, + {megaco_ber_media_gateway_control_v2, megaco_binary_transformer_v2}, - {megaco_ber_bin_media_gateway_control_v3, + {megaco_ber_media_gateway_control_v3, megaco_binary_transformer_v3}], ?BIN_LIB:decode_message_dynamic(EC, Binary, Decoders, binary); decode_message([{version3,prev3c}|EC], dynamic, Binary) -> - Decoders = [{megaco_ber_bin_media_gateway_control_v1, + Decoders = [{megaco_ber_media_gateway_control_v1, megaco_binary_transformer_v1}, - {megaco_ber_bin_media_gateway_control_v2, + {megaco_ber_media_gateway_control_v2, megaco_binary_transformer_v2}, - {megaco_ber_bin_media_gateway_control_prev3c, + {megaco_ber_media_gateway_control_prev3c, megaco_binary_transformer_prev3c}], ?BIN_LIB:decode_message_dynamic(EC, Binary, Decoders, binary); decode_message([{version3,prev3b}|EC], dynamic, Binary) -> - Decoders = [{megaco_ber_bin_media_gateway_control_v1, + Decoders = [{megaco_ber_media_gateway_control_v1, megaco_binary_transformer_v1}, - {megaco_ber_bin_media_gateway_control_v2, + {megaco_ber_media_gateway_control_v2, megaco_binary_transformer_v2}, - {megaco_ber_bin_media_gateway_control_prev3b, + {megaco_ber_media_gateway_control_prev3b, megaco_binary_transformer_prev3b}], ?BIN_LIB:decode_message_dynamic(EC, Binary, Decoders, binary); decode_message([{version3,prev3a}|EC], dynamic, Binary) -> - Decoders = [{megaco_ber_bin_media_gateway_control_v1, + Decoders = [{megaco_ber_media_gateway_control_v1, megaco_binary_transformer_v1}, - {megaco_ber_bin_media_gateway_control_v2, + {megaco_ber_media_gateway_control_v2, megaco_binary_transformer_v2}, - {megaco_ber_bin_media_gateway_control_prev3a, + {megaco_ber_media_gateway_control_prev3a, megaco_binary_transformer_prev3a}], ?BIN_LIB:decode_message_dynamic(EC, Binary, Decoders, binary); decode_message(EC, dynamic, Binary) -> - Decoders = [{megaco_ber_bin_media_gateway_control_v1, + Decoders = [{megaco_ber_media_gateway_control_v1, megaco_binary_transformer_v1}, - {megaco_ber_bin_media_gateway_control_v2, + {megaco_ber_media_gateway_control_v2, megaco_binary_transformer_v2}, - {megaco_ber_bin_media_gateway_control_v3, + {megaco_ber_media_gateway_control_v3, megaco_binary_transformer_v3}], ?BIN_LIB:decode_message_dynamic(EC, Binary, Decoders, binary); %% -- Version 1 -- -decode_message([{version3,_},driver|EC], 1, Binary) -> - AsnMod = megaco_ber_bin_drv_media_gateway_control_v1, - TransMod = megaco_binary_transformer_v1, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); - -decode_message([driver|EC], 1, Binary) -> - AsnMod = megaco_ber_bin_drv_media_gateway_control_v1, - TransMod = megaco_binary_transformer_v1, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); - decode_message([{version3,_}|EC], 1, Binary) -> - AsnMod = megaco_ber_bin_media_gateway_control_v1, + AsnMod = megaco_ber_media_gateway_control_v1, TransMod = megaco_binary_transformer_v1, ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); decode_message(EC, 1, Binary) -> - AsnMod = megaco_ber_bin_media_gateway_control_v1, + AsnMod = megaco_ber_media_gateway_control_v1, TransMod = megaco_binary_transformer_v1, ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); %% -- Version 2 -- -decode_message([{version3,_},driver|EC], 2, Binary) -> - AsnMod = megaco_ber_bin_drv_media_gateway_control_v2, - TransMod = megaco_binary_transformer_v2, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); - -decode_message([driver|EC], 2, Binary) -> - AsnMod = megaco_ber_bin_drv_media_gateway_control_v2, - TransMod = megaco_binary_transformer_v2, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); - decode_message([{version3,_}|EC], 2, Binary) -> - AsnMod = megaco_ber_bin_media_gateway_control_v2, + AsnMod = megaco_ber_media_gateway_control_v2, TransMod = megaco_binary_transformer_v2, ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); decode_message(EC, 2, Binary) -> - AsnMod = megaco_ber_bin_media_gateway_control_v2, + AsnMod = megaco_ber_media_gateway_control_v2, TransMod = megaco_binary_transformer_v2, ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); %% -- Version 3 -- -decode_message([{version3,v3},driver|EC], 3, Binary) -> - AsnMod = megaco_ber_bin_drv_media_gateway_control_v3, - TransMod = megaco_binary_transformer_v3, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); -decode_message([{version3,prev3c},driver|EC], 3, Binary) -> - AsnMod = megaco_ber_bin_drv_media_gateway_control_prev3c, - TransMod = megaco_binary_transformer_prev3c, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); -decode_message([{version3,prev3b},driver|EC], 3, Binary) -> - AsnMod = megaco_ber_bin_drv_media_gateway_control_prev3b, - TransMod = megaco_binary_transformer_prev3b, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); -decode_message([{version3,prev3a},driver|EC], 3, Binary) -> - AsnMod = megaco_ber_bin_drv_media_gateway_control_prev3a, - TransMod = megaco_binary_transformer_prev3a, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); - -decode_message([driver|EC], 3, Binary) -> - AsnMod = megaco_ber_bin_drv_media_gateway_control_v3, - TransMod = megaco_binary_transformer_v3, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); - decode_message([{version3,v3}|EC], 3, Binary) -> - AsnMod = megaco_ber_bin_media_gateway_control_v3, + AsnMod = megaco_ber_media_gateway_control_v3, TransMod = megaco_binary_transformer_v3, ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); decode_message([{version3,prev3c}|EC], 3, Binary) -> - AsnMod = megaco_ber_bin_media_gateway_control_prev3c, + AsnMod = megaco_ber_media_gateway_control_prev3c, TransMod = megaco_binary_transformer_prev3c, ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); decode_message([{version3,prev3b}|EC], 3, Binary) -> - AsnMod = megaco_ber_bin_media_gateway_control_prev3b, + AsnMod = megaco_ber_media_gateway_control_prev3b, TransMod = megaco_binary_transformer_prev3b, ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); decode_message([{version3,prev3a}|EC], 3, Binary) -> - AsnMod = megaco_ber_bin_media_gateway_control_prev3a, + AsnMod = megaco_ber_media_gateway_control_prev3a, TransMod = megaco_binary_transformer_prev3a, ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); decode_message(EC, 3, Binary) -> - AsnMod = megaco_ber_bin_media_gateway_control_v3, + AsnMod = megaco_ber_media_gateway_control_v3, TransMod = megaco_binary_transformer_v3, ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary). -decode_mini_message([{version3,v3},driver|EC], dynamic, Bin) -> - Mods = [megaco_ber_bin_drv_media_gateway_control_v1, - megaco_ber_bin_drv_media_gateway_control_v2, - megaco_ber_bin_drv_media_gateway_control_v3], - ?BIN_LIB:decode_mini_message_dynamic(EC, Bin, Mods, binary); -decode_mini_message([{version3,prev3c},driver|EC], dynamic, Bin) -> - Mods = [megaco_ber_bin_drv_media_gateway_control_v1, - megaco_ber_bin_drv_media_gateway_control_v2, - megaco_ber_bin_drv_media_gateway_control_prev3c], - ?BIN_LIB:decode_mini_message_dynamic(EC, Bin, Mods, binary); -decode_mini_message([{version3,prev3b},driver|EC], dynamic, Bin) -> - Mods = [megaco_ber_bin_drv_media_gateway_control_v1, - megaco_ber_bin_drv_media_gateway_control_v2, - megaco_ber_bin_drv_media_gateway_control_prev3b], - ?BIN_LIB:decode_mini_message_dynamic(EC, Bin, Mods, binary); -decode_mini_message([{version3,prev3a},driver|EC], dynamic, Bin) -> - Mods = [megaco_ber_bin_drv_media_gateway_control_v1, - megaco_ber_bin_drv_media_gateway_control_v2, - megaco_ber_bin_drv_media_gateway_control_prev3a], - ?BIN_LIB:decode_mini_message_dynamic(EC, Bin, Mods, binary); -decode_mini_message([driver|EC], dynamic, Bin) -> - Mods = [megaco_ber_bin_drv_media_gateway_control_v1, - megaco_ber_bin_drv_media_gateway_control_v2, - megaco_ber_bin_drv_media_gateway_control_v3], - ?BIN_LIB:decode_mini_message_dynamic(EC, Bin, Mods, binary); decode_mini_message([{version3,v3}|EC], dynamic, Bin) -> - Mods = [megaco_ber_bin_media_gateway_control_v1, - megaco_ber_bin_media_gateway_control_v2, - megaco_ber_bin_media_gateway_control_v3], + Mods = [megaco_ber_media_gateway_control_v1, + megaco_ber_media_gateway_control_v2, + megaco_ber_media_gateway_control_v3], ?BIN_LIB:decode_mini_message_dynamic(EC, Bin, Mods, binary); decode_mini_message([{version3,prev3c}|EC], dynamic, Bin) -> - Mods = [megaco_ber_bin_media_gateway_control_v1, - megaco_ber_bin_media_gateway_control_v2, - megaco_ber_bin_media_gateway_control_prev3c], + Mods = [megaco_ber_media_gateway_control_v1, + megaco_ber_media_gateway_control_v2, + megaco_ber_media_gateway_control_prev3c], ?BIN_LIB:decode_mini_message_dynamic(EC, Bin, Mods, binary); decode_mini_message([{version3,prev3b}|EC], dynamic, Bin) -> - Mods = [megaco_ber_bin_media_gateway_control_v1, - megaco_ber_bin_media_gateway_control_v2, - megaco_ber_bin_media_gateway_control_prev3b], + Mods = [megaco_ber_media_gateway_control_v1, + megaco_ber_media_gateway_control_v2, + megaco_ber_media_gateway_control_prev3b], ?BIN_LIB:decode_mini_message_dynamic(EC, Bin, Mods, binary); decode_mini_message([{version3,prev3a}|EC], dynamic, Bin) -> - Mods = [megaco_ber_bin_media_gateway_control_v1, - megaco_ber_bin_media_gateway_control_v2, - megaco_ber_bin_media_gateway_control_prev3a], + Mods = [megaco_ber_media_gateway_control_v1, + megaco_ber_media_gateway_control_v2, + megaco_ber_media_gateway_control_prev3a], ?BIN_LIB:decode_mini_message_dynamic(EC, Bin, Mods, binary); decode_mini_message(EC, dynamic, Bin) -> - Mods = [megaco_ber_bin_media_gateway_control_v1, - megaco_ber_bin_media_gateway_control_v2, - megaco_ber_bin_media_gateway_control_v3], + Mods = [megaco_ber_media_gateway_control_v1, + megaco_ber_media_gateway_control_v2, + megaco_ber_media_gateway_control_v3], ?BIN_LIB:decode_mini_message_dynamic(EC, Bin, Mods, binary); -decode_mini_message([{version3,_},driver|EC], 1, Bin) -> - AsnMod = megaco_ber_bin_drv_media_gateway_control_v1, - ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); -decode_mini_message([driver|EC], 1, Bin) -> - AsnMod = megaco_ber_bin_drv_media_gateway_control_v1, - ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); decode_mini_message([{version3,_}|EC], 1, Bin) -> - AsnMod = megaco_ber_bin_media_gateway_control_v1, + AsnMod = megaco_ber_media_gateway_control_v1, ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); decode_mini_message(EC, 1, Bin) -> - AsnMod = megaco_ber_bin_media_gateway_control_v1, + AsnMod = megaco_ber_media_gateway_control_v1, ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); -decode_mini_message([{version3,_},driver|EC], 2, Bin) -> - AsnMod = megaco_ber_bin_drv_media_gateway_control_v2, - ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); -decode_mini_message([driver|EC], 2, Bin) -> - AsnMod = megaco_ber_bin_drv_media_gateway_control_v2, - ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); decode_mini_message([{version3,_}|EC], 2, Bin) -> - AsnMod = megaco_ber_bin_media_gateway_control_v2, + AsnMod = megaco_ber_media_gateway_control_v2, ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); decode_mini_message(EC, 2, Bin) -> - AsnMod = megaco_ber_bin_media_gateway_control_v2, + AsnMod = megaco_ber_media_gateway_control_v2, ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); -decode_mini_message([{version3,v3},driver|EC], 3, Bin) -> - AsnMod = megaco_ber_bin_drv_media_gateway_control_v3, - ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); -decode_mini_message([{version3,prev3c},driver|EC], 3, Bin) -> - AsnMod = megaco_ber_bin_drv_media_gateway_control_prev3c, - ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); -decode_mini_message([{version3,prev3b},driver|EC], 3, Bin) -> - AsnMod = megaco_ber_bin_drv_media_gateway_control_prev3b, - ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); -decode_mini_message([{version3,prev3a},driver|EC], 3, Bin) -> - AsnMod = megaco_ber_bin_drv_media_gateway_control_prev3a, - ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); -decode_mini_message([driver|EC], 3, Bin) -> - AsnMod = megaco_ber_bin_drv_media_gateway_control_v3, - ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); decode_mini_message([{version3,v3}|EC], 3, Bin) -> - AsnMod = megaco_ber_bin_media_gateway_control_v3, + AsnMod = megaco_ber_media_gateway_control_v3, ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); decode_mini_message([{version3,prev3c}|EC], 3, Bin) -> - AsnMod = megaco_ber_bin_media_gateway_control_prev3c, + AsnMod = megaco_ber_media_gateway_control_prev3c, ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); decode_mini_message([{version3,prev3b}|EC], 3, Bin) -> - AsnMod = megaco_ber_bin_media_gateway_control_prev3b, + AsnMod = megaco_ber_media_gateway_control_prev3b, ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); decode_mini_message([{version3,prev3a}|EC], 3, Bin) -> - AsnMod = megaco_ber_bin_media_gateway_control_prev3a, + AsnMod = megaco_ber_media_gateway_control_prev3a, ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary); decode_mini_message(EC, 3, Bin) -> - AsnMod = megaco_ber_bin_media_gateway_control_v3, + AsnMod = megaco_ber_media_gateway_control_v3, ?BIN_LIB:decode_mini_message(EC, Bin, AsnMod, binary). diff --git a/lib/megaco/src/binary/megaco_binary_encoder_lib.erl b/lib/megaco/src/binary/megaco_binary_encoder_lib.erl index 967ee93935..262889db39 100644 --- a/lib/megaco/src/binary/megaco_binary_encoder_lib.erl +++ b/lib/megaco/src/binary/megaco_binary_encoder_lib.erl @@ -275,7 +275,7 @@ decode_message_dynamic(_EC, _BadBin, _Mods, _Type) -> {error, no_binary}. -decode_message(EC, Bin, AsnMod, TransMod, binary) -> +decode_message(EC, Bin, AsnMod, TransMod, _) -> case asn1rt:decode(AsnMod, 'MegacoMessage', Bin) of {ok, MegaMsg} -> case EC of @@ -286,19 +286,6 @@ decode_message(EC, Bin, AsnMod, TransMod, binary) -> end; {error, Reason} -> {error, Reason} - end; -decode_message(EC, Bin, AsnMod, TransMod, io_list) -> - ShallowIoList = erlang:binary_to_list(Bin), - case asn1rt:decode(AsnMod, 'MegacoMessage', ShallowIoList) of - {ok, MegaMsg} -> - case EC of - [native] -> - {ok, MegaMsg}; - _ -> - {ok, TransMod:tr_message(MegaMsg, decode, EC)} - end; - {error, Reason} -> - {error, Reason} end. diff --git a/lib/megaco/src/binary/megaco_binary_name_resolver_prev3a.erl b/lib/megaco/src/binary/megaco_binary_name_resolver_prev3a.erl index 72b3112053..24dc410dbe 100644 --- a/lib/megaco/src/binary/megaco_binary_name_resolver_prev3a.erl +++ b/lib/megaco/src/binary/megaco_binary_name_resolver_prev3a.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2004-2009. All Rights Reserved. +%% Copyright Ericsson AB 2004-2012. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -204,7 +204,7 @@ decode_name(_Config, Scope, Item) -> %% to command requests from the MGC that audit %% ObservedEventsDescriptor, and found in the %% ObservedEventsDescriptor. See 12.2. If there are no parameters -%% for the ObservedEvents Descriptor, then �none� shall be specified. +%% for the ObservedEvents Descriptor, then 'none' shall be specified. %% %% %% 12.1.4 Signals @@ -225,7 +225,7 @@ decode_name(_Config, Scope, Item) -> %% %% BR (Brief) %% -%% NOTE -�SignalType may be defined such that it is dependent on +%% NOTE - SignalType may be defined such that it is dependent on %% the value of one or more parameters. The package MUST specify a %% default signal type. If the default type is TO, the package MUST %% specify a default duration which may be provisioned. A default diff --git a/lib/megaco/src/binary/megaco_binary_name_resolver_prev3b.erl b/lib/megaco/src/binary/megaco_binary_name_resolver_prev3b.erl index 12e673ac81..d89717c00a 100644 --- a/lib/megaco/src/binary/megaco_binary_name_resolver_prev3b.erl +++ b/lib/megaco/src/binary/megaco_binary_name_resolver_prev3b.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2009. All Rights Reserved. +%% Copyright Ericsson AB 2005-2012. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -204,7 +204,7 @@ decode_name(_Config, Scope, Item) -> %% to command requests from the MGC that audit %% ObservedEventsDescriptor, and found in the %% ObservedEventsDescriptor. See 12.2. If there are no parameters -%% for the ObservedEvents Descriptor, then �none� shall be specified. +%% for the ObservedEvents Descriptor, then 'none' shall be specified. %% %% %% 12.1.4 Signals @@ -225,7 +225,7 @@ decode_name(_Config, Scope, Item) -> %% %% BR (Brief) %% -%% NOTE -�SignalType may be defined such that it is dependent on +%% NOTE - SignalType may be defined such that it is dependent on %% the value of one or more parameters. The package MUST specify a %% default signal type. If the default type is TO, the package MUST %% specify a default duration which may be provisioned. A default diff --git a/lib/megaco/src/binary/megaco_binary_name_resolver_prev3c.erl b/lib/megaco/src/binary/megaco_binary_name_resolver_prev3c.erl index d08231caac..8b4192ad44 100644 --- a/lib/megaco/src/binary/megaco_binary_name_resolver_prev3c.erl +++ b/lib/megaco/src/binary/megaco_binary_name_resolver_prev3c.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2009. All Rights Reserved. +%% Copyright Ericsson AB 2005-2012. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -204,7 +204,7 @@ decode_name(_Config, Scope, Item) -> %% to command requests from the MGC that audit %% ObservedEventsDescriptor, and found in the %% ObservedEventsDescriptor. See 12.2. If there are no parameters -%% for the ObservedEvents Descriptor, then �none� shall be specified. +%% for the ObservedEvents Descriptor, then 'none' shall be specified. %% %% %% 12.1.4 Signals @@ -225,7 +225,7 @@ decode_name(_Config, Scope, Item) -> %% %% BR (Brief) %% -%% NOTE -�SignalType may be defined such that it is dependent on +%% NOTE - SignalType may be defined such that it is dependent on %% the value of one or more parameters. The package MUST specify a %% default signal type. If the default type is TO, the package MUST %% specify a default duration which may be provisioned. A default diff --git a/lib/megaco/src/binary/megaco_binary_name_resolver_v3.erl b/lib/megaco/src/binary/megaco_binary_name_resolver_v3.erl index c101aa15bc..20954d4c9d 100644 --- a/lib/megaco/src/binary/megaco_binary_name_resolver_v3.erl +++ b/lib/megaco/src/binary/megaco_binary_name_resolver_v3.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2009. All Rights Reserved. +%% Copyright Ericsson AB 2005-2012. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -204,7 +204,7 @@ decode_name(_Config, Scope, Item) -> %% to command requests from the MGC that audit %% ObservedEventsDescriptor, and found in the %% ObservedEventsDescriptor. See 12.2. If there are no parameters -%% for the ObservedEvents Descriptor, then �none� shall be specified. +%% for the ObservedEvents Descriptor, then 'none' shall be specified. %% %% %% 12.1.4 Signals @@ -225,7 +225,7 @@ decode_name(_Config, Scope, Item) -> %% %% BR (Brief) %% -%% NOTE -�SignalType may be defined such that it is dependent on +%% NOTE - SignalType may be defined such that it is dependent on %% the value of one or more parameters. The package MUST specify a %% default signal type. If the default type is TO, the package MUST %% specify a default duration which may be provisioned. A default diff --git a/lib/megaco/src/binary/megaco_per_bin_drv_media_gateway_control_prev3a.set.asn b/lib/megaco/src/binary/megaco_per_bin_drv_media_gateway_control_prev3a.set.asn deleted file mode 100644 index b9ba7ffdb4..0000000000 --- a/lib/megaco/src/binary/megaco_per_bin_drv_media_gateway_control_prev3a.set.asn +++ /dev/null @@ -1 +0,0 @@ -MEDIA-GATEWAY-CONTROL-prev3a.asn diff --git a/lib/megaco/src/binary/megaco_per_bin_drv_media_gateway_control_prev3b.set.asn b/lib/megaco/src/binary/megaco_per_bin_drv_media_gateway_control_prev3b.set.asn deleted file mode 100644 index 0437bde310..0000000000 --- a/lib/megaco/src/binary/megaco_per_bin_drv_media_gateway_control_prev3b.set.asn +++ /dev/null @@ -1 +0,0 @@ -MEDIA-GATEWAY-CONTROL-prev3b.asn diff --git a/lib/megaco/src/binary/megaco_per_bin_drv_media_gateway_control_prev3c.set.asn b/lib/megaco/src/binary/megaco_per_bin_drv_media_gateway_control_prev3c.set.asn deleted file mode 100644 index e78055fbad..0000000000 --- a/lib/megaco/src/binary/megaco_per_bin_drv_media_gateway_control_prev3c.set.asn +++ /dev/null @@ -1 +0,0 @@ -MEDIA-GATEWAY-CONTROL-prev3c.asn diff --git a/lib/megaco/src/binary/megaco_per_bin_drv_media_gateway_control_v1.set.asn b/lib/megaco/src/binary/megaco_per_bin_drv_media_gateway_control_v1.set.asn deleted file mode 100644 index 0f5a92dba1..0000000000 --- a/lib/megaco/src/binary/megaco_per_bin_drv_media_gateway_control_v1.set.asn +++ /dev/null @@ -1 +0,0 @@ -MEDIA-GATEWAY-CONTROL-v1.asn diff --git a/lib/megaco/src/binary/megaco_per_bin_drv_media_gateway_control_v2.set.asn b/lib/megaco/src/binary/megaco_per_bin_drv_media_gateway_control_v2.set.asn deleted file mode 100644 index 7fc82b127f..0000000000 --- a/lib/megaco/src/binary/megaco_per_bin_drv_media_gateway_control_v2.set.asn +++ /dev/null @@ -1 +0,0 @@ -MEDIA-GATEWAY-CONTROL-v2.asn diff --git a/lib/megaco/src/binary/megaco_per_bin_drv_media_gateway_control_v3.set.asn b/lib/megaco/src/binary/megaco_per_bin_drv_media_gateway_control_v3.set.asn deleted file mode 100644 index 1d7950a283..0000000000 --- a/lib/megaco/src/binary/megaco_per_bin_drv_media_gateway_control_v3.set.asn +++ /dev/null @@ -1 +0,0 @@ -MEDIA-GATEWAY-CONTROL-v3.asn diff --git a/lib/megaco/src/binary/megaco_per_bin_encoder.erl b/lib/megaco/src/binary/megaco_per_bin_encoder.erl deleted file mode 100644 index f7280f4e04..0000000000 --- a/lib/megaco/src/binary/megaco_per_bin_encoder.erl +++ /dev/null @@ -1,447 +0,0 @@ -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2001-2009. All Rights Reserved. -%% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. -%% -%% %CopyrightEnd% -%% - -%% -%%---------------------------------------------------------------------- -%% Purpose : Handle ASN.1 PER encoding of Megaco/H.248 -%%---------------------------------------------------------------------- - --module(megaco_per_bin_encoder). - --behaviour(megaco_encoder). - --export([encode_message/3, decode_message/3, - decode_mini_message/3, - - encode_transaction/3, - encode_action_requests/3, - encode_action_request/3, - encode_action_reply/3, - - version_of/2]). - -%% Backward compatible functions: --export([encode_message/2, decode_message/2]). - --include_lib("megaco/src/engine/megaco_message_internal.hrl"). - --define(V1_ASN1_MOD, megaco_per_bin_media_gateway_control_v1). --define(V2_ASN1_MOD, megaco_per_bin_media_gateway_control_v2). --define(V3_ASN1_MOD, megaco_per_bin_media_gateway_control_v3). --define(PREV3A_ASN1_MOD, megaco_per_bin_media_gateway_control_prev3a). --define(PREV3B_ASN1_MOD, megaco_per_bin_media_gateway_control_prev3b). --define(PREV3C_ASN1_MOD, megaco_per_bin_media_gateway_control_prev3c). --define(V1_ASN1_MOD_DRV, megaco_per_bin_drv_media_gateway_control_v1). --define(V2_ASN1_MOD_DRV, megaco_per_bin_drv_media_gateway_control_v2). --define(V3_ASN1_MOD_DRV, megaco_per_bin_drv_media_gateway_control_v3). --define(PREV3A_ASN1_MOD_DRV, megaco_per_bin_drv_media_gateway_control_prev3a). --define(PREV3B_ASN1_MOD_DRV, megaco_per_bin_drv_media_gateway_control_prev3b). --define(PREV3C_ASN1_MOD_DRV, megaco_per_bin_drv_media_gateway_control_prev3c). - --define(V1_TRANS_MOD, megaco_binary_transformer_v1). --define(V2_TRANS_MOD, megaco_binary_transformer_v2). --define(V3_TRANS_MOD, megaco_binary_transformer_v3). --define(PREV3A_TRANS_MOD, megaco_binary_transformer_prev3a). --define(PREV3B_TRANS_MOD, megaco_binary_transformer_prev3b). --define(PREV3C_TRANS_MOD, megaco_binary_transformer_prev3c). - --define(BIN_LIB, megaco_binary_encoder_lib). - - -%%---------------------------------------------------------------------- -%% Detect (check/get) message version -%% Return {ok, Version} | {error, Reason} -%%---------------------------------------------------------------------- - -version_of([{version3,v3},driver|EC], Binary) -> - Decoders = [?V1_ASN1_MOD_DRV, ?V2_ASN1_MOD_DRV, ?V3_ASN1_MOD_DRV], - ?BIN_LIB:version_of(EC, Binary, 1, Decoders); -version_of([{version3,prev3c},driver|EC], Binary) -> - Decoders = [?V1_ASN1_MOD_DRV, ?V2_ASN1_MOD_DRV, ?PREV3C_ASN1_MOD_DRV], - ?BIN_LIB:version_of(EC, Binary, 1, Decoders); -version_of([{version3,prev3b},driver|EC], Binary) -> - Decoders = [?V1_ASN1_MOD_DRV, ?V2_ASN1_MOD_DRV, ?PREV3B_ASN1_MOD_DRV], - ?BIN_LIB:version_of(EC, Binary, 1, Decoders); -version_of([{version3,prev3a},driver|EC], Binary) -> - Decoders = [?V1_ASN1_MOD_DRV, ?V2_ASN1_MOD_DRV, ?PREV3A_ASN1_MOD_DRV], - ?BIN_LIB:version_of(EC, Binary, 1, Decoders); -version_of([driver|EC], Binary) -> - Decoders = [?V1_ASN1_MOD_DRV, ?V2_ASN1_MOD_DRV, ?V3_ASN1_MOD_DRV], - ?BIN_LIB:version_of(EC, Binary, 1, Decoders); -version_of([{version3,v3}|EC], Binary) -> - Decoders = [?V1_ASN1_MOD, ?V2_ASN1_MOD, ?V3_ASN1_MOD], - ?BIN_LIB:version_of(EC, Binary, 1, Decoders); -version_of([{version3,prev3c}|EC], Binary) -> - Decoders = [?V1_ASN1_MOD, ?V2_ASN1_MOD, ?PREV3C_ASN1_MOD], - ?BIN_LIB:version_of(EC, Binary, 1, Decoders); -version_of([{version3,prev3b}|EC], Binary) -> - Decoders = [?V1_ASN1_MOD, ?V2_ASN1_MOD, ?PREV3B_ASN1_MOD], - ?BIN_LIB:version_of(EC, Binary, 1, Decoders); -version_of([{version3,prev3a}|EC], Binary) -> - Decoders = [?V1_ASN1_MOD, ?V2_ASN1_MOD, ?PREV3A_ASN1_MOD], - ?BIN_LIB:version_of(EC, Binary, 1, Decoders); - -%% All values we need to take (special) care of has been delt with, -%% so just pass the rest on -version_of(EC, Binary) -> - Decoders = [?V1_ASN1_MOD, ?V2_ASN1_MOD, ?V3_ASN1_MOD], - ?BIN_LIB:version_of(EC, Binary, 1, Decoders). - - -%%---------------------------------------------------------------------- -%% Convert a 'MegacoMessage' record into a binary -%% Return {ok, Binary} | {error, Reason} -%%---------------------------------------------------------------------- - -encode_message(EC, - #'MegacoMessage'{mess = #'Message'{version = V}} = MegaMsg) -> - encode_message(EC, V, MegaMsg). - - -%% -- Version 1 -- - -encode_message([{version3, _},driver|EC], 1, MegaMsg) -> - AsnMod = ?V1_ASN1_MOD_DRV, - TransMod = ?V1_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); -encode_message([driver|EC], 1, MegaMsg) -> - AsnMod = ?V1_ASN1_MOD_DRV, - TransMod = ?V1_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); -encode_message([{version3,_}|EC], 1, MegaMsg) -> - AsnMod = ?V1_ASN1_MOD, - TransMod = ?V1_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); - -%% All values we need to take (special) care of has been delt with, -%% so just pass the rest on -encode_message(EC, 1, MegaMsg) -> - AsnMod = ?V1_ASN1_MOD, - TransMod = ?V1_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); - - -%% -- Version 2 -- - -encode_message([{version3,_},driver|EC], 2, MegaMsg) -> - AsnMod = ?V2_ASN1_MOD_DRV, - TransMod = ?V2_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); -encode_message([driver|EC], 2, MegaMsg) -> - AsnMod = ?V2_ASN1_MOD_DRV, - TransMod = ?V2_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); -encode_message([{version3,_}|EC], 2, MegaMsg) -> - AsnMod = ?V2_ASN1_MOD, - TransMod = ?V2_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); - -%% All values we need to take (special) care of has been delt with, -%% so just pass the rest on -encode_message(EC, 2, MegaMsg) -> - AsnMod = ?V2_ASN1_MOD, - TransMod = ?V2_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); - - -%% -- Version 3 -- - -encode_message([{version3,v3},driver|EC], 3, MegaMsg) -> - AsnMod = ?V3_ASN1_MOD_DRV, - TransMod = ?V3_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); -encode_message([{version3,prev3c},driver|EC], 3, MegaMsg) -> - AsnMod = ?PREV3C_ASN1_MOD_DRV, - TransMod = ?PREV3C_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); -encode_message([{version3,prev3b},driver|EC], 3, MegaMsg) -> - AsnMod = ?PREV3B_ASN1_MOD_DRV, - TransMod = ?PREV3B_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); -encode_message([{version3,prev3a},driver|EC], 3, MegaMsg) -> - AsnMod = ?PREV3A_ASN1_MOD_DRV, - TransMod = ?PREV3A_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); -encode_message([driver|EC], 3, MegaMsg) -> - AsnMod = ?V3_ASN1_MOD_DRV, - TransMod = ?V3_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); -encode_message([{version3,v3}|EC], 3, MegaMsg) -> - AsnMod = ?V3_ASN1_MOD, - TransMod = ?V3_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); -encode_message([{version3,prev3c}|EC], 3, MegaMsg) -> - AsnMod = ?PREV3C_ASN1_MOD, - TransMod = ?PREV3C_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); -encode_message([{version3,prev3b}|EC], 3, MegaMsg) -> - AsnMod = ?PREV3B_ASN1_MOD, - TransMod = ?PREV3B_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); -encode_message([{version3,prev3a}|EC], 3, MegaMsg) -> - AsnMod = ?PREV3A_ASN1_MOD, - TransMod = ?PREV3A_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list); - -%% All values we need to take (special) care of has been delt with, -%% so just pass the rest on -encode_message(EC, 3, MegaMsg) -> - AsnMod = ?V3_ASN1_MOD, - TransMod = ?V3_TRANS_MOD, - ?BIN_LIB:encode_message(EC, MegaMsg, AsnMod, TransMod, io_list). - - -%%---------------------------------------------------------------------- -%% Convert a transaction (or transactions in the case of ack) record(s) -%% into a binary -%% Return {ok, Binary} | {error, Reason} -%%---------------------------------------------------------------------- - -%% encode_transaction([] = EC, 1, Trans) -> -%% AsnMod = ?V1_ASN1_MOD, -%% TransMod = ?V1_TRANS_MOD, -%% ?BIN_LIB:encode_transaction(EC, Trans, AsnMod, TransMod, -%% io_list); -%% encode_transaction([native] = EC, 1, Trans) -> -%% AsnMod = ?V1_ASN1_MOD, -%% TransMod = ?V1_TRANS_MOD, -%% ?BIN_LIB:encode_transaction(EC, Trans, AsnMod, TransMod, -%% io_list); -%% encode_transaction([driver|EC], 1, Trans) -> -%% AsnMod = ?V1_ASN1_MOD_DRV, -%% TransMod = ?V1_TRANS_MOD, -%% ?BIN_LIB:encode_transaction(EC, Trans, AsnMod, TransMod, -%% io_list); -encode_transaction(_EC, 1, _Trans) -> - %% AsnMod = ?V1_ASN1_MOD, - %% TransMod = ?V1_TRANS_MOD, - %% ?BIN_LIB:encode_transaction(EC, Trans, AsnMod, TransMod, - %% io_list); - {error, not_implemented}; - -%% encode_transaction([] = EC, 2, Trans) -> -%% AsnMod = ?V2_ASN1_MOD, -%% TransMod = ?V2_TRANS_MOD, -%% ?BIN_LIB:encode_transaction(EC, Trans, AsnMod, TransMod, -%% io_list); -%% encode_transaction([native] = EC, 2, Trans) -> -%% AsnMod = ?V2_ASN1_MOD, -%% TransMod = ?V2_TRANS_MOD, -%% ?BIN_LIB:encode_transaction(EC, Trans, AsnMod, TransMod, -%% io_list); -%% encode_transaction([driver|EC], 2, Trans) -> -%% AsnMod = ?V2_ASN1_MOD_DRV, -%% TransMod = ?V2_TRANS_MOD, -%% ?BIN_LIB:encode_transaction(EC, Trans, AsnMod, TransMod, -%% io_list); -encode_transaction(_EC, 2, _Trans) -> - %% AsnMod = ?V2_ASN1_MOD, - %% TransMod = ?V2_TRANS_MOD, - %% ?BIN_LIB:encode_transaction(EC, Trans, AsnMod, TransMod, - %% io_list). - {error, not_implemented}; - -%% encode_transaction([] = EC, 3, Trans) -> -%% AsnMod = ?V3_ASN1_MOD, -%% TransMod = ?V3_TRANS_MOD, -%% ?BIN_LIB:encode_transaction(EC, Trans, AsnMod, TransMod, -%% io_list); -%% encode_transaction([native] = EC, 3, Trans) -> -%% AsnMod = ?V3_ASN1_MOD, -%% TransMod = ?V3_TRANS_MOD, -%% ?BIN_LIB:encode_transaction(EC, Trans, AsnMod, TransMod, -%% io_list); -%% encode_transaction([driver|EC], 3, Trans) -> -%% AsnMod = ?V3_ASN1_MOD_DRV, -%% TransMod = ?V3_TRANS_MOD, -%% ?BIN_LIB:encode_transaction(EC, Trans, AsnMod, TransMod, -%% io_list); -encode_transaction(_EC, 3, _Trans) -> - %% AsnMod = ?V3_ASN1_MOD, - %% TransMod = ?V3_TRANS_MOD, - %% ?BIN_LIB:encode_transaction(EC, Trans, AsnMod, TransMod, %% io_list). - {error, not_implemented}. - - -%%---------------------------------------------------------------------- -%% Convert a list of ActionRequest record's into a binary -%% Return {ok, DeepIoList} | {error, Reason} -%%---------------------------------------------------------------------- -encode_action_requests(_EC, 1, ActReqs) when is_list(ActReqs) -> - %% ?BIN_LIB:encode_action_requests(EC, ActReqs, - %% ?V1_ASN1_MOD, - %% ?V1_TRANS_MOD, - %% io_list); - {error, not_implemented}; -encode_action_requests(_EC, 2, ActReqs) when is_list(ActReqs) -> - %% ?BIN_LIB:encode_action_requests(EC, ActReqs, - %% ?V1_ASN1_MOD, - %% ?V1_TRANS_MOD, - %% io_list). - {error, not_implemented}; -encode_action_requests(_EC, 3, ActReqs) when is_list(ActReqs) -> - %% ?BIN_LIB:encode_action_requests(EC, ActReqs, - %% ?V1_ASN1_MOD, - %% ?V1_TRANS_MOD, - %% io_list). - {error, not_implemented}. - - -%%---------------------------------------------------------------------- -%% Convert a ActionRequest record into a binary -%% Return {ok, DeepIoList} | {error, Reason} -%%---------------------------------------------------------------------- -encode_action_request(_EC, 1, _ActReq) -> - %% ?BIN_LIB:encode_action_request(EC, ActReq, - %% ?V1_ASN1_MOD, - %% ?V1_TRANS_MOD, - %% io_list); - {error, not_implemented}; -encode_action_request(_EC, 2, _ActReq) -> - %% ?BIN_LIB:encode_action_request(EC, ActReq, - %% ?V1_ASN1_MOD, - %% ?V1_TRANS_MOD, - %% io_list). - {error, not_implemented}; -encode_action_request(_EC, 3, _ActReq) -> - %% ?BIN_LIB:encode_action_request(EC, ActReq, - %% ?V1_ASN1_MOD, - %% ?V1_TRANS_MOD, - %% io_list). - {error, not_implemented}. - - -%%---------------------------------------------------------------------- -%% Convert a action reply into a deep io list -%% Not yest supported by this binary codec! -%% Return {ok, DeepIoList} | {error, Reason} -%%---------------------------------------------------------------------- - -encode_action_reply(_EC, _V, _AcionReply) -> - {error, not_implemented}. - - -%%---------------------------------------------------------------------- -%% Convert a binary into a 'MegacoMessage' record -%% Return {ok, MegacoMessageRecord} | {error, Reason} -%%---------------------------------------------------------------------- - -decode_message(EC, Binary) -> - decode_message(EC, 1, Binary). - -%% PER does not support partial decode, so this means V1 -decode_message(EC, dynamic, Binary) -> - decode_message(EC, 1, Binary); - - -%% -- Version 1 -- - -decode_message([{version3,_},driver|EC], 1, Binary) -> - AsnMod = ?V1_ASN1_MOD_DRV, - TransMod = ?V1_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); -decode_message([driver|EC], 1, Binary) -> - AsnMod = ?V1_ASN1_MOD_DRV, - TransMod = ?V1_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); -decode_message([{version3,_}|EC], 1, Binary) -> - AsnMod = ?V1_ASN1_MOD, - TransMod = ?V1_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); - -%% All values we need to take (special) care of has been delt with, -%% so just pass the rest on -decode_message(EC, 1, Binary) -> - AsnMod = ?V1_ASN1_MOD, - TransMod = ?V1_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); - - -%% -- Version 2 -- - -decode_message([{version3,_},driver|EC], 2, Binary) -> - AsnMod = ?V2_ASN1_MOD_DRV, - TransMod = ?V2_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); -decode_message([driver|EC], 2, Binary) -> - AsnMod = ?V2_ASN1_MOD_DRV, - TransMod = ?V2_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); -decode_message([{version3,_}|EC], 2, Binary) -> - AsnMod = ?V2_ASN1_MOD, - TransMod = ?V2_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); - -%% All values we need to take (special) care of has been delt with, -%% so just pass the rest on -decode_message(EC, 2, Binary) -> - AsnMod = ?V2_ASN1_MOD, - TransMod = ?V2_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); - - -%% -- Version 3 -- - -decode_message([{version3,v3},driver|EC], 3, Binary) -> - AsnMod = ?V3_ASN1_MOD_DRV, - TransMod = ?V3_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); -decode_message([{version3,prev3c},driver|EC], 3, Binary) -> - AsnMod = ?PREV3C_ASN1_MOD_DRV, - TransMod = ?PREV3C_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); -decode_message([{version3,prev3b},driver|EC], 3, Binary) -> - AsnMod = ?PREV3B_ASN1_MOD_DRV, - TransMod = ?PREV3B_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); -decode_message([{version3,prev3a},driver|EC], 3, Binary) -> - AsnMod = ?PREV3A_ASN1_MOD_DRV, - TransMod = ?PREV3A_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); -decode_message([driver|EC], 3, Binary) -> - AsnMod = ?V3_ASN1_MOD_DRV, - TransMod = ?V3_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); -decode_message([{version3,v3}|EC], 3, Binary) -> - AsnMod = ?V3_ASN1_MOD, - TransMod = ?V3_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); -decode_message([{version3,prev3c}|EC], 3, Binary) -> - AsnMod = ?PREV3C_ASN1_MOD, - TransMod = ?PREV3C_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); -decode_message([{version3,prev3b}|EC], 3, Binary) -> - AsnMod = ?PREV3B_ASN1_MOD, - TransMod = ?PREV3B_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); -decode_message([{version3,prev3a}|EC], 3, Binary) -> - AsnMod = ?PREV3A_ASN1_MOD, - TransMod = ?PREV3A_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary); - -%% All values we need to take (special) care of has been delt with, -%% so just pass the rest on -decode_message(EC, 3, Binary) -> - AsnMod = ?V3_ASN1_MOD, - TransMod = ?V3_TRANS_MOD, - ?BIN_LIB:decode_message(EC, Binary, AsnMod, TransMod, binary). - - -decode_mini_message(_EC, _Vsn, _Bin) -> - {error, not_implemented}. diff --git a/lib/megaco/src/binary/megaco_per_bin_media_gateway_control_prev3a.set.asn b/lib/megaco/src/binary/megaco_per_bin_media_gateway_control_prev3a.set.asn deleted file mode 100644 index b9ba7ffdb4..0000000000 --- a/lib/megaco/src/binary/megaco_per_bin_media_gateway_control_prev3a.set.asn +++ /dev/null @@ -1 +0,0 @@ -MEDIA-GATEWAY-CONTROL-prev3a.asn diff --git a/lib/megaco/src/binary/megaco_per_bin_media_gateway_control_prev3b.set.asn b/lib/megaco/src/binary/megaco_per_bin_media_gateway_control_prev3b.set.asn deleted file mode 100644 index 0437bde310..0000000000 --- a/lib/megaco/src/binary/megaco_per_bin_media_gateway_control_prev3b.set.asn +++ /dev/null @@ -1 +0,0 @@ -MEDIA-GATEWAY-CONTROL-prev3b.asn diff --git a/lib/megaco/src/binary/megaco_per_bin_media_gateway_control_prev3c.set.asn b/lib/megaco/src/binary/megaco_per_bin_media_gateway_control_prev3c.set.asn deleted file mode 100644 index e78055fbad..0000000000 --- a/lib/megaco/src/binary/megaco_per_bin_media_gateway_control_prev3c.set.asn +++ /dev/null @@ -1 +0,0 @@ -MEDIA-GATEWAY-CONTROL-prev3c.asn diff --git a/lib/megaco/src/binary/megaco_per_bin_media_gateway_control_v1.set.asn b/lib/megaco/src/binary/megaco_per_bin_media_gateway_control_v1.set.asn deleted file mode 100644 index 0f5a92dba1..0000000000 --- a/lib/megaco/src/binary/megaco_per_bin_media_gateway_control_v1.set.asn +++ /dev/null @@ -1 +0,0 @@ -MEDIA-GATEWAY-CONTROL-v1.asn diff --git a/lib/megaco/src/binary/megaco_per_bin_media_gateway_control_v2.set.asn b/lib/megaco/src/binary/megaco_per_bin_media_gateway_control_v2.set.asn deleted file mode 100644 index 7fc82b127f..0000000000 --- a/lib/megaco/src/binary/megaco_per_bin_media_gateway_control_v2.set.asn +++ /dev/null @@ -1 +0,0 @@ -MEDIA-GATEWAY-CONTROL-v2.asn diff --git a/lib/megaco/src/binary/megaco_per_bin_media_gateway_control_v3.set.asn b/lib/megaco/src/binary/megaco_per_bin_media_gateway_control_v3.set.asn deleted file mode 100644 index 1d7950a283..0000000000 --- a/lib/megaco/src/binary/megaco_per_bin_media_gateway_control_v3.set.asn +++ /dev/null @@ -1 +0,0 @@ -MEDIA-GATEWAY-CONTROL-v3.asn diff --git a/lib/megaco/src/binary/modules.mk b/lib/megaco/src/binary/modules.mk index a86ce2aecc..bbaf087ceb 100644 --- a/lib/megaco/src/binary/modules.mk +++ b/lib/megaco/src/binary/modules.mk @@ -27,19 +27,6 @@ MODULES = \ megaco_ber_media_gateway_control_prev3b \ megaco_ber_media_gateway_control_prev3c \ megaco_ber_media_gateway_control_v3 \ - megaco_ber_bin_encoder \ - megaco_ber_bin_media_gateway_control_v1 \ - megaco_ber_bin_media_gateway_control_v2 \ - megaco_ber_bin_media_gateway_control_prev3a \ - megaco_ber_bin_media_gateway_control_prev3b \ - megaco_ber_bin_media_gateway_control_prev3c \ - megaco_ber_bin_media_gateway_control_v3 \ - megaco_ber_bin_drv_media_gateway_control_v1 \ - megaco_ber_bin_drv_media_gateway_control_v2 \ - megaco_ber_bin_drv_media_gateway_control_prev3a \ - megaco_ber_bin_drv_media_gateway_control_prev3b \ - megaco_ber_bin_drv_media_gateway_control_prev3c \ - megaco_ber_bin_drv_media_gateway_control_v3 \ megaco_per_encoder \ megaco_per_media_gateway_control_v1 \ megaco_per_media_gateway_control_v2 \ @@ -47,19 +34,6 @@ MODULES = \ megaco_per_media_gateway_control_prev3b \ megaco_per_media_gateway_control_prev3c \ megaco_per_media_gateway_control_v3 \ - megaco_per_bin_encoder \ - megaco_per_bin_media_gateway_control_v1 \ - megaco_per_bin_media_gateway_control_v2 \ - megaco_per_bin_media_gateway_control_prev3a \ - megaco_per_bin_media_gateway_control_prev3b \ - megaco_per_bin_media_gateway_control_prev3c \ - megaco_per_bin_media_gateway_control_v3 \ - megaco_per_bin_drv_media_gateway_control_v1 \ - megaco_per_bin_drv_media_gateway_control_v2 \ - megaco_per_bin_drv_media_gateway_control_prev3a \ - megaco_per_bin_drv_media_gateway_control_prev3b \ - megaco_per_bin_drv_media_gateway_control_prev3c \ - megaco_per_bin_drv_media_gateway_control_v3 \ megaco_binary_name_resolver_v1 \ megaco_binary_name_resolver_v2 \ megaco_binary_name_resolver_prev3a \ @@ -85,44 +59,20 @@ ASN1_PREV3C_SPEC = MEDIA-GATEWAY-CONTROL-prev3c ASN1_V3_SPEC = MEDIA-GATEWAY-CONTROL-v3 BER_ASN1_V1_SPEC = megaco_ber_media_gateway_control_v1 -BER_BIN_ASN1_V1_SPEC = megaco_ber_bin_media_gateway_control_v1 -BER_BIN_DRV_ASN1_V1_SPEC = megaco_ber_bin_drv_media_gateway_control_v1 PER_ASN1_V1_SPEC = megaco_per_media_gateway_control_v1 -PER_BIN_ASN1_V1_SPEC = megaco_per_bin_media_gateway_control_v1 -PER_BIN_DRV_ASN1_V1_SPEC = megaco_per_bin_drv_media_gateway_control_v1 BER_ASN1_V2_SPEC = megaco_ber_media_gateway_control_v2 -BER_BIN_ASN1_V2_SPEC = megaco_ber_bin_media_gateway_control_v2 -BER_BIN_DRV_ASN1_V2_SPEC = megaco_ber_bin_drv_media_gateway_control_v2 PER_ASN1_V2_SPEC = megaco_per_media_gateway_control_v2 -PER_BIN_ASN1_V2_SPEC = megaco_per_bin_media_gateway_control_v2 -PER_BIN_DRV_ASN1_V2_SPEC = megaco_per_bin_drv_media_gateway_control_v2 BER_ASN1_PREV3A_SPEC = megaco_ber_media_gateway_control_prev3a -BER_BIN_ASN1_PREV3A_SPEC = megaco_ber_bin_media_gateway_control_prev3a -BER_BIN_DRV_ASN1_PREV3A_SPEC = megaco_ber_bin_drv_media_gateway_control_prev3a PER_ASN1_PREV3A_SPEC = megaco_per_media_gateway_control_prev3a -PER_BIN_ASN1_PREV3A_SPEC = megaco_per_bin_media_gateway_control_prev3a -PER_BIN_DRV_ASN1_PREV3A_SPEC = megaco_per_bin_drv_media_gateway_control_prev3a BER_ASN1_PREV3B_SPEC = megaco_ber_media_gateway_control_prev3b -BER_BIN_ASN1_PREV3B_SPEC = megaco_ber_bin_media_gateway_control_prev3b -BER_BIN_DRV_ASN1_PREV3B_SPEC = megaco_ber_bin_drv_media_gateway_control_prev3b PER_ASN1_PREV3B_SPEC = megaco_per_media_gateway_control_prev3b -PER_BIN_ASN1_PREV3B_SPEC = megaco_per_bin_media_gateway_control_prev3b -PER_BIN_DRV_ASN1_PREV3B_SPEC = megaco_per_bin_drv_media_gateway_control_prev3b BER_ASN1_PREV3C_SPEC = megaco_ber_media_gateway_control_prev3c -BER_BIN_ASN1_PREV3C_SPEC = megaco_ber_bin_media_gateway_control_prev3c -BER_BIN_DRV_ASN1_PREV3C_SPEC = megaco_ber_bin_drv_media_gateway_control_prev3c PER_ASN1_PREV3C_SPEC = megaco_per_media_gateway_control_prev3c -PER_BIN_ASN1_PREV3C_SPEC = megaco_per_bin_media_gateway_control_prev3c -PER_BIN_DRV_ASN1_PREV3C_SPEC = megaco_per_bin_drv_media_gateway_control_prev3c BER_ASN1_V3_SPEC = megaco_ber_media_gateway_control_v3 -BER_BIN_ASN1_V3_SPEC = megaco_ber_bin_media_gateway_control_v3 -BER_BIN_DRV_ASN1_V3_SPEC = megaco_ber_bin_drv_media_gateway_control_v3 PER_ASN1_V3_SPEC = megaco_per_media_gateway_control_v3 -PER_BIN_ASN1_V3_SPEC = megaco_per_bin_media_gateway_control_v3 -PER_BIN_DRV_ASN1_V3_SPEC = megaco_per_bin_drv_media_gateway_control_v3 diff --git a/lib/megaco/src/engine/Makefile b/lib/megaco/src/engine/Makefile index ae2fadb3fc..7cecef1444 100644 --- a/lib/megaco/src/engine/Makefile +++ b/lib/megaco/src/engine/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 1999-2009. All Rights Reserved. +# Copyright Ericsson AB 1999-2012. All Rights Reserved. # # The contents of this file are subject to the Erlang Public License, # Version 1.1, (the "License"); you may not use this file except in diff --git a/lib/megaco/src/engine/modules.mk b/lib/megaco/src/engine/modules.mk index 6e2f9246f0..e6e5e29829 100644 --- a/lib/megaco/src/engine/modules.mk +++ b/lib/megaco/src/engine/modules.mk @@ -2,7 +2,7 @@ # %CopyrightBegin% # -# Copyright Ericsson AB 2001-2011. All Rights Reserved. +# Copyright Ericsson AB 2001-2012. All Rights Reserved. # # The contents of this file are subject to the Erlang Public License, # Version 1.1, (the "License"); you may not use this file except in diff --git a/lib/megaco/src/flex/Makefile.in b/lib/megaco/src/flex/Makefile.in index 976ecaa4f7..6111cf2304 100644 --- a/lib/megaco/src/flex/Makefile.in +++ b/lib/megaco/src/flex/Makefile.in @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 2001-2011. All Rights Reserved. +# Copyright Ericsson AB 2001-2012. All Rights Reserved. # # The contents of this file are subject to the Erlang Public License, # Version 1.1, (the "License"); you may not use this file except in @@ -104,10 +104,6 @@ ENABLE_MEGACO_FLEX_SCANNER_LINENO = @ENABLE_MEGACO_FLEX_SCANNER_LINENO@ endif endif -ifeq ($(findstring vxworks,$(TARGET)),vxworks) - DED_INCLUDES += -I$(ERL_TOP)/erts/etc/vxworks -endif - PRIVDIR = ../../priv LIBDIR = $(PRIVDIR)/lib/$(TARGET) OBJDIR = $(PRIVDIR)/obj/$(TARGET) @@ -146,15 +142,10 @@ ifeq ($(findstring win32,$(TARGET)), win32) FLEX_SCANNER_SO = SOLIBS = $(FLEX_SCANNER_SO) else -ifeq ($(findstring vxworks,$(TARGET)),vxworks) -FLEX_SCANNER_SO = -SOLIBS = $(FLEX_SCANNER_SO) -else FLEX_SCANNER_SO = $(LIBDIR)/$(STD_DRV).$(DED_EXT) FLEX_SCANNER_MT_SO = $(LIBDIR)/$(MT_DRV).$(DED_EXT) SOLIBS = $(FLEX_SCANNER_SO) $(FLEX_SCANNER_MT_SO) endif -endif # ---------------------------------------------------- @@ -328,16 +319,16 @@ release_docs_spec: $(STD_DRV).flex: megaco_flex_scanner_drv.flex.src ifeq ($(ENABLE_MEGACO_FLEX_SCANNER_LINENO),true) - @printf "std [flex] scanner - lineno enabled\n" - $(PERL) -p -e \ + $(V_colon)@printf "std [flex] scanner - lineno enabled\n" + $(gen_verbose)$(PERL) -p -e \ 's/%FLEX_VERSION%/$(FLEX_VSN)/ ; \ s/%MEGACO_YY_LINENO_OPTION%/%option yylineno/ ; \ s/%MEGACO_YY_REENTRANT_OPTION%/\/\* %option reentrant \*\// ; \ s/%MEGACO_DUMMY_DECL_YY_LINENO%/\/* static int yylineno = 1; *\//' \ < $< > $@ else - @printf "std [flex] scanner - lineno disabled\n" - $(PERL) -p -e \ + $(V_colon)@printf "std [flex] scanner - lineno disabled\n" + $(gen_verbose)$(PERL) -p -e \ 's/%FLEX_VERSION%/$(FLEX_VSN)/ ; \ s/%MEGACO_YY_LINENO_OPTION%/\/\* %option yylineno \*\// ; \ s/%MEGACO_YY_REENTRANT_OPTION%/\/\* %option reentrant \*\// ; \ @@ -348,16 +339,16 @@ endif $(MT_DRV).flex: megaco_flex_scanner_drv.flex.src ifeq ($(ENABLE_MEGACO_FLEX_SCANNER_LINENO),true) ifeq ($(ENABLE_REENTRANT_MEGACO_FLEX_SCANNER),true) - @printf "multi-threaded reentrant [flex] scanner - lineno enabled\n" - $(PERL) -p -e \ + $(V_colon)@printf "multi-threaded reentrant [flex] scanner - lineno enabled\n" + $(gen_verbose)$(PERL) -p -e \ 's/%FLEX_VERSION%/$(FLEX_VSN)/ ; \ s/%MEGACO_YY_LINENO_OPTION%/%option yylineno/ ; \ s/%MEGACO_YY_REENTRANT_OPTION%/%option reentrant/ ; \ s/%MEGACO_DUMMY_DECL_YY_LINENO%/\/* static int yylineno = 1; *\//' \ < $< > $@ else - @printf "multi-threaded non-reentrant [flex] scanner - lineno enabled\n" - $(PERL) -p -e \ + $(V_colon)@printf "multi-threaded non-reentrant [flex] scanner - lineno enabled\n" + $(gen_verbose)$(PERL) -p -e \ 's/%FLEX_VERSION%/$(FLEX_VSN)/ ; \ s/%MEGACO_YY_LINENO_OPTION%/%option yylineno/ ; \ s/%MEGACO_YY_REENTRANT_OPTION%/\/\* %option reentrant \*\// ; \ @@ -366,16 +357,16 @@ else endif else ifeq ($(ENABLE_REENTRANT_MEGACO_FLEX_SCANNER),true) - @printf "multi-threaded reentrant [flex] scanner - lineno disabled\n" - $(PERL) -p -e \ + $(V_colon)@printf "multi-threaded reentrant [flex] scanner - lineno disabled\n" + $(gen_verbose)$(PERL) -p -e \ 's/%FLEX_VERSION%/$(FLEX_VSN)/ ; \ s/%MEGACO_YY_LINENO_OPTION%/\/\* %option yylineno \*\// ; \ s/%MEGACO_YY_REENTRANT_OPTION%/%option reentrant/ ; \ s/%MEGACO_DUMMY_DECL_YY_LINENO%/\/* static int yylineno = 1; - REENTRANT SCANNER*\//' \ < $< > $@ else - @printf "multi-threaded non-reentrant [flex] scanner - lineno disabled\n" - $(PERL) -p -e \ + $(V_colon)@printf "multi-threaded non-reentrant [flex] scanner - lineno disabled\n" + $(gen_verbose)$(PERL) -p -e \ 's/%FLEX_VERSION%/$(FLEX_VSN)/ ; \ s/%MEGACO_YY_LINENO_OPTION%/\/\* %option yylineno \*\// ; \ s/%MEGACO_YY_REENTRANT_OPTION%/\/\* %option reentrant \*\// ; \ @@ -385,31 +376,31 @@ endif endif # megaco_flex_scanner_drv.c: megaco_flex_scanner_drv.flex -# $(LEX) $(LEX_FLAGS) -P$* -o$@ $< +# $(V_LEX) $(LEX_FLAGS) -P$* -o$@ $< $(STD_DRV).c: $(STD_DRV).flex - $(LEX) $(STD_LEX_FLAGS) -P$* -o$@ $< + $(V_LEX) $(STD_LEX_FLAGS) -P$* -o$@ $< $(MT_DRV).c: $(MT_DRV).flex - $(LEX) $(MT_LEX_FLAGS) -P$* -o$@ $< + $(V_LEX) $(MT_LEX_FLAGS) -P$* -o$@ $< _create_dirs := $(shell mkdir -p $(OBJDIR) $(LIBDIR)) solibs: $(SOLIBS) $(OBJDIR)/$(STD_DRV).o: $(STD_DRV).c - @echo "compiling std driver:" - $(CC) -c $(STD_DRV_NAME) $(CFLAGS) -o $@ $< + $(V_colon)@echo "compiling std driver:" + $(V_CC) -c $(STD_DRV_NAME) $(CFLAGS) -o $@ $< $(OBJDIR)/$(MT_DRV).o: $(MT_DRV).c - @echo "compiling multi-threaded driver:" - $(CC) -c $(MT_DRV_NAME) $(CFLAGS_MT) -o $@ $< + $(V_colon)@echo "compiling multi-threaded driver:" + $(V_CC) -c $(MT_DRV_NAME) $(CFLAGS_MT) -o $@ $< # No need to link with -lfl as we have also defined %option noyywrap - # and having -lfl doesn't work under Darwin for some reason. - Sean $(LIBDIR)/$(STD_DRV).$(DED_EXT): $(OBJDIR)/$(STD_DRV).o - @echo "linking std driver:" - $(LD) $(LDFLAGS) -o $@ $< + $(V_colon)@echo "linking std driver:" + $(V_LD) $(LDFLAGS) -o $@ $< $(LIBDIR)/$(MT_DRV).$(DED_EXT): $(OBJDIR)/$(MT_DRV).o - @echo "linking multi-threaded driver:" - $(LD) $(LDFLAGS) -o $@ $< + $(V_colon)@echo "linking multi-threaded driver:" + $(V_LD) $(LDFLAGS) -o $@ $< diff --git a/lib/megaco/src/flex/megaco_flex_scanner_drv.flex.src b/lib/megaco/src/flex/megaco_flex_scanner_drv.flex.src index b8146c345d..5faddb08c5 100644 --- a/lib/megaco/src/flex/megaco_flex_scanner_drv.flex.src +++ b/lib/megaco/src/flex/megaco_flex_scanner_drv.flex.src @@ -76,6 +76,7 @@ typedef struct { ErlDrvPort port; + ErlDrvTermData port_id; char* digit_map_name_ptr; int digit_map_name_len; char* digit_map_value_ptr; @@ -1497,6 +1498,7 @@ static ErlDrvData mfs_start(ErlDrvPort port, char *buf) DBG( ("mfs_start -> entry\n") ); dataP->port = port; + dataP->port_id = driver_mk_port(port); dataP->digit_map_name_ptr = NULL; dataP->digit_map_name_len = 0; dataP->digit_map_value_ptr = NULL; @@ -1841,10 +1843,10 @@ static ErlDrvSSizeT mfs_control(ErlDrvData handle, "\n term_spec_size: %d\n", dataP->term_spec_index, dataP->term_spec_size) ); - driver_send_term(dataP->port, - driver_caller(dataP->port), - dataP->term_spec, - dataP->term_spec_index); + erl_drv_send_term(dataP->port_id, + driver_caller(dataP->port), + dataP->term_spec, + dataP->term_spec_index); if (dataP->text_buf != NULL) FREE(dataP->text_buf); if (dataP->term_spec != NULL) FREE(dataP->term_spec); diff --git a/lib/megaco/src/rules.mk b/lib/megaco/src/rules.mk index 20fbed2a76..a59060032d 100644 --- a/lib/megaco/src/rules.mk +++ b/lib/megaco/src/rules.mk @@ -29,10 +29,6 @@ PERL = perl # Erlang language section # ---------------------------------------------------- EMULATOR = beam -ifeq ($(findstring vxworks,$(TARGET)),vxworks) -# VxWorks jam object files should be compressed -ERL_COMPILE_FLAGS += +compressed -endif ERLC_WFLAGS = -W ERLC = erlc $(ERLC_WFLAGS) $(ERLC_FLAGS) ERL.beam = erl.beam -boot start_clean diff --git a/lib/megaco/src/tcp/Makefile b/lib/megaco/src/tcp/Makefile index efc76bb2c5..0c30abae2c 100644 --- a/lib/megaco/src/tcp/Makefile +++ b/lib/megaco/src/tcp/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 2000-2009. All Rights Reserved. +# Copyright Ericsson AB 2000-2012. All Rights Reserved. # # The contents of this file are subject to the Erlang Public License, # Version 1.1, (the "License"); you may not use this file except in diff --git a/lib/megaco/src/text/Makefile b/lib/megaco/src/text/Makefile index 2c7703cd33..cab4256e68 100644 --- a/lib/megaco/src/text/Makefile +++ b/lib/megaco/src/text/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 2000-2009. All Rights Reserved. +# Copyright Ericsson AB 2000-2012. All Rights Reserved. # # The contents of this file are subject to the Erlang Public License, # Version 1.1, (the "License"); you may not use this file except in diff --git a/lib/megaco/src/udp/Makefile b/lib/megaco/src/udp/Makefile index db9bb72d82..9486804d38 100644 --- a/lib/megaco/src/udp/Makefile +++ b/lib/megaco/src/udp/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 2000-2009. All Rights Reserved. +# Copyright Ericsson AB 2000-2012. All Rights Reserved. # # The contents of this file are subject to the Erlang Public License, # Version 1.1, (the "License"); you may not use this file except in |