Harald Welte | 20ad1ba | 2011-02-07 20:50:39 +0100 | [diff] [blame] | 1 | % OTP Supervisor for MGW NAT |
| 2 | |
| 3 | % (C) 2011 by Harald Welte <laforge@gnumonks.org> |
| 4 | % (C) 2011 OnWaves |
| 5 | % |
| 6 | % All Rights Reserved |
| 7 | % |
| 8 | % This program is free software; you can redistribute it and/or modify |
| 9 | % it under the terms of the GNU Affero General Public License as |
| 10 | % published by the Free Software Foundation; either version 3 of the |
| 11 | % License, or (at your option) any later version. |
| 12 | % |
| 13 | % This program is distributed in the hope that it will be useful, |
| 14 | % but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | % GNU General Public License for more details. |
| 17 | % |
| 18 | % You should have received a copy of the GNU Affero General Public License |
| 19 | % along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 20 | |
| 21 | -module(mgw_nat_sup). |
| 22 | -behavior(supervisor). |
| 23 | |
| 24 | -export([start_link/0]). |
| 25 | -export([init/1]). |
| 26 | |
| 27 | start_link() -> |
| 28 | supervisor:start_link({local, ?MODULE}, ?MODULE, []). |
| 29 | |
Harald Welte | 5df8338 | 2011-03-08 15:17:32 +0100 | [diff] [blame^] | 30 | init(Args) -> |
| 31 | MgwChild = {mgw_nat_usr, {mgw_nat_usr, start_link, [Args]}, |
Harald Welte | 20ad1ba | 2011-02-07 20:50:39 +0100 | [diff] [blame] | 32 | permanent, 2000, worker, [mgw_nat_usr, sctp_handler, mgw_nat]}, |
Harald Welte | eb4913f | 2011-02-25 21:34:22 +0100 | [diff] [blame] | 33 | {ok,{{one_for_all,60,600}, [MgwChild]}}. |