summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-04-01 18:41:53 +0200
committerHarald Welte <laforge@gnumonks.org>2012-04-01 18:41:53 +0200
commitbd63ade9805e93901ff07879fb03f44290b67d68 (patch)
tree07b2e9b3c1de446f8868f1faa277fa02e6d7c58c /src
parent48a7b19ce07475d8f2f7bf8ccae57c8737ccab94 (diff)
sctp_sua: Pass connectionless msgs to SCCP
Diffstat (limited to 'src')
-rw-r--r--src/sctp_sua.erl10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sctp_sua.erl b/src/sctp_sua.erl
index d64eedc..0d35780 100644
--- a/src/sctp_sua.erl
+++ b/src/sctp_sua.erl
@@ -88,6 +88,7 @@ rx_sctp(#sctp_sndrcvinfo{ppid = ?SUA_PPID}, Data, State, LoopDat) ->
Prim = osmo_util:make_prim('M','ERROR',indication,Sua),
{ok, Prim, LoopDat};
#sua_msg{msg_class = ?M3UA_MSGC_SSNM} ->
+ % FIXME
{ignore, LoopDat};
#sua_msg{msg_class = ?M3UA_MSGC_ASPSM} ->
gen_fsm:send_event(Asp, Sua),
@@ -95,6 +96,10 @@ rx_sctp(#sctp_sndrcvinfo{ppid = ?SUA_PPID}, Data, State, LoopDat) ->
#sua_msg{msg_class = ?M3UA_MSGC_ASPTM} ->
gen_fsm:send_event(Asp, Sua),
{ignore, LoopDat};
+ #sua_msg{msg_class = ?SUA_MSGC_CL} ->
+ Prim = sua_to_prim(Sua, LoopDat),
+ {ok, Prim, LoopDat};
+ %#sua_msg{msg_class = ?SUA_MSGC_C0} ->
_ ->
% do something with link related msgs
io:format("SUA Unknown message ~p in state ~p~n", [Sua, State]),
@@ -130,3 +135,8 @@ tx_sctp(Stream, Payload) when is_integer(Stream), is_binary(Payload) ->
% callback fun for ASP FMS
asp_prim_to_user(Prim, [SctpPid]) ->
gen_fsm:send_event(SctpPid, Prim).
+
+
+sua_to_prim(Sua, LoopDat) when is_record(Sua, sua_msg) ->
+ Sccp = sua_sccp_conv:sua_to_sccp(Sua),
+ osmo_util:make_prim('N','UNITADATA',indication, Sccp).