Commit Graph

22 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 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
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 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 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 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 2e4004150b map_masq is part of mgw_nat, not osmo_map 2011-02-10 09:49:21 +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 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 7a23af3323 add erlang MAP code (from OTP) 2011-02-07 21:24:26 +01:00