Harald Welte | 033cef0 | 2010-12-19 22:47:14 +0100 | [diff] [blame] | 1 | % SCCP connectionles control (SCLC) |
| 2 | |
| 3 | % (C) 2010 by Harald Welte <laforge@gnumonks.org> |
| 4 | % |
| 5 | % All Rights Reserved |
| 6 | % |
| 7 | % This program is free software; you can redistribute it and/or modify |
| 8 | % it under the terms of the GNU Affero General Public License as |
| 9 | % published by the Free Software Foundation; either version 3 of the |
| 10 | % License, or (at your option) any later version. |
| 11 | % |
| 12 | % This program is distributed in the hope that it will be useful, |
| 13 | % but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | % GNU General Public License for more details. |
| 16 | % |
| 17 | % You should have received a copy of the GNU Affero General Public License |
| 18 | % along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 19 | |
| 20 | -module(sccp_sclc). |
| 21 | -behaviour(gen_fsm). |
| 22 | -export([start_link/1]). |
| 23 | |
| 24 | |
| 25 | % TODO: |
| 26 | |
| 27 | start_link(Init) -> |
| 28 | gen_fsm:start_link({local, sccp_sclc}, sccp_sclc, Init, []). |
| 29 | |
| 30 | init(InitData) -> |
| 31 | {ok, idle, {[], InitData}}. |
| 32 | |
| 33 | idle(connectionless_msg, |
| 34 | %idle(changes_needed, LoopDat) -> |
| 35 | idle({'N', 'UNITDATA', request, Parms}, LoopDat) -> |
| 36 | % assign SLS |
| 37 | gen_fsm:send_event(sccp_scrc, connectionless_msg |
| 38 | {next_state, idle, LoopDat}; |
| 39 | %idle(scmg_msg, LoopDat) -> |
| 40 | idle(routing_failure, LoopDat) -> |
| 41 | |