Commit Graph

47 Commits

Author SHA1 Message Date
Harald Welte f17de78ca1 map_helper: We now ned the string of the type, not an atom
... in order to concatenate prefix + Arg/Res before using
list_to_atom().
2013-08-27 12:24:03 +02:00
Harald Welte ca9be44bb5 map_helper: fix typo / copy+paste error 2013-07-14 20:17:28 +02:00
Harald Welte 43fc24b24f fix syntax error 2013-07-14 20:12:39 +02:00
Harald Welte 0174a284e8 add map_operations.hrl as well as rec4op/class4op/timer4op 2013-07-14 20:00:26 +02:00
Harald Welte 002365d895 map_codec_tests: Adapt to new xua_codec based m2ua_codec 2013-01-26 16:40:50 +01:00
Harald Welte 6deda594a6 add more tcap related helper functions 2012-05-28 23:58:42 +02:00
Harald Welte ef30ca82aa add Erlang Public License compatibility notice 2012-04-16 13:14:53 +02:00
Norbert Hartl 0d2a4fd115 Corrected bogus module identifier number.
The current one cannot be resolved. This issue was introduced
in the version9 to version12 upgrade in git revision
b61d0bc663.

Signed-off-by: Holger Hans Peter Freyther <zecke@selfish.org>
2012-02-25 12:45:51 +01:00
Harald Welte f98b8a744e add missing modules 2012-02-21 00:20:49 +01:00
Harald Welte 6aa3366378 remove map_as_server and make module compile again 2012-02-21 00:18:28 +01:00
Harald Welte f188fca9b9 add new map utility functiosn and a skeleton AS server 2012-02-02 23:52:08 +01:00
Harald Welte aa3b39ea6c map_codec: export more functions 2012-02-02 23:52:00 +01:00
Harald Welte 9583bb4107 add a map-only decoder without TCAP 2012-02-02 23:50:41 +01:00
Harald Welte e16d8145c1 add 'tcap_helper' module for unit testing or shell use
This module permits simple generation of common TCAP messages.
2011-12-10 21:40:35 +01:00
Harald Welte 10adfb5933 make sure tcap_asn module contains TR/dialogue portion, too 2011-12-10 21:39:43 +01:00
Harald Welte 6cc415222f Add separate TCAP decoder that is not linked to MAP
this way we can parse only the TCAP layer into dialogue portion
and component portion, but without actually parsing those.
2011-12-09 09:50:26 +01:00
Harald Welte d940afc0e8 update gitignore 2011-11-12 11:48:13 +01:00
Harald Welte 085f198c8b rebar: use eunit_surefire 2011-11-11 23:30:32 +01:00
Harald Welte 21c6b94271 MAP: Fix-up after asn1ct automatic 1990->1994 EXTERNAL conversion
So what the Erlang asn1ct does is:  Decode the incoming EXTERNAL type,
convert it to the 1994 format and hand it to the user program.

The encoder is opposite:  Take what the user supplies (in our case 1994)
and then transform it to 1990 before handing it to the actual encoder function.

The only problem is: The 1994 format does only support OCTET STRING as actual
embedded data type, whereas the 1990 format can also indicate
'singla-asn1-type', i.e. a constructed type.

So since that information is already lost before we ever get the record from
the Erlang asn1 decoder, it will be re-encoded as OCTET STRING :(

Until this is fixed in the asn1ct/asn1rt code, we have to use this workaround...
2011-04-16 20:14:38 +02:00
Harald Welte a87c64ab0c include contracts and operation packages in .set.asn1 2011-04-13 23:27:59 +02:00
Harald Welte c0f6fd9282 fix typo 2011-04-13 23:22:43 +02:00
Harald Welte a864e9d436 Add manually generated MAP-Contracts package
This is a non-standard MAP package creating ROSE CONTRACT information object
class instances which will later be used by TCAP APPLICATION-CONTEXT
information object classes that in turn will formally associate the
OPERATION-PACKAGES with the application context names.
2011-04-13 22:55:44 +02:00
Harald Welte da91cb537f Add manually-created ASN.1 file with MAP Operation Packages
It sems both ETSI and 3GPP violate their own 09.02 / 29.002 specification
by not shipping the MAP-OperationPackages module the specification
mentions.
2011-04-13 22:44:39 +02:00
Harald Welte 2ad4626282 eunit: make test case comply with new MAP codec 2011-04-06 15:46:55 +02:00
Harald Welte 6a49a2d4b2 MAP ASN.1: Add noteSubscriberPresent (from MAP-v1) 2011-03-26 16:40:24 +01:00
Harald Welte 952701b8b8 MAP Protocol: Include SS Operations in supported MAP operations
Otherwise, decoding stuff like lcs-MOLR will fail
2011-03-26 13:43:06 +01:00
Harald Welte 7c44e099c2 MAP ASN1 Workaround: reportSM-DeliveryStatus without DeliveryOutcome
Some MSC apparently don't send this non-OPTIONAL parameter
2011-03-26 13:40:53 +01:00
Harald Welte b61d0bc663 Update MAP specification from version9 to version12
Except from whitespace differences, this is what wireshark svn uses.
2011-03-26 00:11:41 +01:00
Harald Welte 3575d44ee7 MAP codec test: Always try to re-encode and assert verbously in case of error 2011-03-12 10:23:10 +01:00
Harald Welte 49525f8af8 Add MAP codec PCAP based testing
You need to provide your own ./priv/map.pcap file to run the test.

Results from a real SIGTRAN link:
test/map_codec_tests.erl:49: PCAP: 191.795 s
test/map_codec_tests.erl:50: Parsed 807605 PCAP packets
2011-03-11 18:47:23 +01:00
Harald Welte c60e8405a5 add eunit tests for map codec 2011-03-08 23:02:32 +01:00
Harald Welte 5b14641ba2 MAP Codec: Remove last remnance of ISUP OddEven 2011-02-10 17:57:09 +01:00
Harald Welte 4ae92fbc83 MAP Codec: Use our own TBCD / address encoding/decoding routines
The ISUP routines are used to the OddEven bit, which MAP doesn't have.
2011-02-10 17:53:15 +01:00
Harald Welte 8fe3132736 Work around bug in HLR sending invalid CamelCapabilityHandling=0 2011-02-10 14:30:19 +01:00
Harald Welte 2e4004150b map_masq is part of mgw_nat, not osmo_map 2011-02-10 09:49:21 +01:00
Harald Welte 31ee54ec0c add Emakefile 2011-02-10 09:48:34 +01:00
Harald Welte 6ef56d0a73 introcue new MAP translation code 2011-02-10 09:48:15 +01:00
Harald Welte 0aa140b166 don't explicitly specify type in encode_map_msg() 2011-02-09 23:15:22 +01:00
Harald Welte d08ea8d673 use asn1ct/asn1rc in 'ber list' mode, as 'ber binary' mode has bugs
When trying to asn1rt:encode() the DialoguePortion in ber_bin mode,
we get something like

2> asn1rt:encode('MAP', 'MapSpecificPDUs', {'begin', Msg}).
{error,{asn1,{function_clause,[{asn1rt_check,transform_to_EXTERNAL1990,
                                             [[<<96,15,128,2,7,128,161,9,6,7,4,0,0,1,0,5,3>>],
                                              [asn1_NOVALUE,asn1_NOVALUE,{0,0,17,773,1,1,1},'EXTERNAL']]},
                               {'MAP',enc_EXTERNAL,2},
                               {'MAP',enc_MapSpecificPDUs_begin,2},
                               {'MAP',enc_MapSpecificPDUs,2},
                               {'MAP',encode,2},
                               {asn1rt,encode,3},
                               {erl_eval,do_apply,5},
                               {shell,exprs,7}]}}}
2011-02-09 23:13:48 +01:00
Harald Welte fc281c362b map codec: make sure to encode an AddressString to a list, not binary 2011-02-09 22:39:08 +01:00
Harald Welte 74368cc72e MAP codec: Add functions to encode/decode MAP Address-String 2011-02-09 21:41:36 +01:00
Harald Welte d1710cfeb7 add .gitignore file 2011-02-09 14:47:44 +01:00
Harald Welte 8aafe3b368 app file: remove unneeded 'mod' line 2011-02-09 14:46:13 +01:00
Harald Welte 72f06f5c7a Make sure we use the ber_bin option for asn1ct 2011-02-09 14:45:00 +01:00
Harald Welte 268c57291a add map_codec wrapper module to be consistent with isup/sccp and other code 2011-02-09 14:38:15 +01:00
Harald Welte 67799636d7 osmo_er_map -> osmo_map 2011-02-07 22:30:12 +01:00
Harald Welte 7a23af3323 add erlang MAP code (from OTP) 2011-02-07 21:24:26 +01:00