aboutsummaryrefslogtreecommitdiffstats
path: root/src/mgw_nat_usr.erl
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-02-25 10:36:43 +0100
committerHarald Welte <laforge@gnumonks.org>2011-02-25 10:36:43 +0100
commitaf3a9fc7167770a1b85722a5190a9fa7e1f481e7 (patch)
tree93d781b314fbc31d769deb0ea4ae56437d96de7e /src/mgw_nat_usr.erl
parent0a4ff609a9eed38b84077b9e859800c92b8a87fa (diff)
SCCP MASQ: Add function to dump current masquerading state table
It can be called from the shell using "mgw_nat_usr:sccp_masq_dump()."
Diffstat (limited to 'src/mgw_nat_usr.erl')
-rw-r--r--src/mgw_nat_usr.erl9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mgw_nat_usr.erl b/src/mgw_nat_usr.erl
index f102958..fb1392a 100644
--- a/src/mgw_nat_usr.erl
+++ b/src/mgw_nat_usr.erl
@@ -23,7 +23,7 @@
-behavior(gen_server).
--export([start_link/1, stop/0, sccp_masq_reset/0]).
+-export([start_link/1, stop/0, sccp_masq_reset/0, sccp_masq_dump/0]).
-export([init/1, handle_cast/2, handle_info/2, terminate/2]).
@@ -36,6 +36,9 @@ stop() ->
sccp_masq_reset() ->
gen_server:cast(?MODULE, sccp_masq_reset).
+sccp_masq_dump() ->
+ gen_server:cast(?MODULE, sccp_masq_dump).
+
%% Callback functions of the OTP behavior
@@ -49,6 +52,10 @@ handle_cast(stop, LoopData) ->
handle_cast(sccp_masq_reset, LoopData) ->
sccp_masq:reset(),
+ {noreply, LoopData};
+
+handle_cast(sccp_masq_dump, LoopData) ->
+ sccp_masq:dump(),
{noreply, LoopData}.
terminate(_Reason, _LoopData) ->