aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Yan <tom.yan@nokia-sbell.com>2020-09-25 05:14:11 +0000
committerTom Yan <tom.yan@nokia-sbell.com>2020-09-25 07:37:25 +0000
commitd0256f168a457e40ea1caf88e65591a9b28063f3 (patch)
tree82667fdc6e8b72198d8fe006c4aa429b5e195658
parent572c1ae5a36b35f13773b32cc127a6d538c1aae1 (diff)
extract_asn1_from_spec.pl : fix export of S1AP
-rwxr-xr-xtools/extract_asn1_from_spec.pl12
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/extract_asn1_from_spec.pl b/tools/extract_asn1_from_spec.pl
index 40307b5a9e..ed65e73902 100755
--- a/tools/extract_asn1_from_spec.pl
+++ b/tools/extract_asn1_from_spec.pl
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
-# This script extracts the ASN1 definition from TS 36.331/36.355/25.331/38.331/37.355/38.413/36.423/38.423
+# This script extracts the ASN1 definition from TS 36.331/36.355/25.331/38.331/37.355/36.413/38.413/36.423/38.423
# /38.463/38.473 , and generates asn files that can be processed by asn2wrs
# First download the specification from 3gpp.org as a word document and open it
# Then in "view" menu, select normal, draft or web layout (any kind that removes page header and footers)
@@ -35,7 +35,7 @@ close(INPUT_FILE);
sub extract_spec_version {
my $line;
while($line = <INPUT_FILE>){
- if($line =~ m/3GPP TS ((25|36|38)\.331|(36|37)\.355|38\.413|(36|38).423|38\.463|38\.473) V/){
+ if($line =~ m/3GPP TS ((25|36|38)\.331|(36|37)\.355|(36|38)\.413|(36|38).423|38\.463|38\.473) V/){
$version = $line;
return;
}
@@ -65,6 +65,14 @@ sub extract_asn1 {
$file_name_found = 1;
}
+ if(($file_name_found == 0) && ($line =~ m/SonTransfer-IEs/)){
+ $output_file_name = "S1AP-SonTransfer-IEs.asn";
+ print "generating $output_file_name\n";
+ open(OUTPUT_FILE, "> $output_file_name") or die "Can not open file $output_file_name";
+ $is_asn1 = 1;
+ $file_name_found = 1;
+ }
+
if(($file_name_found == 0) && ($line =~ m/itu-t \(0\) identified-organization \(4\) etsi \(0\) mobileDomain \(0\)/)){
($output_file_name) = ($prev_line =~ m/^([a-zA-Z0-9\-]+)\s/);
$output_file_name = "$output_file_name".".asn";