summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-10-12 00:02:42 +0200
committerHarald Welte <laforge@gnumonks.org>2011-10-12 00:02:42 +0200
commit9bfab7c6f9d791bba830368077a7ff68cde3252b (patch)
treeda2f0eb1df0447052315f7a74a86d130c7e68221
parentb8bfc4eb837fbcb538b2e6b43e8ce04a9437214d (diff)
ss7_routes: some pretty printing of point codes
-rw-r--r--src/ss7_routes.erl15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/ss7_routes.erl b/src/ss7_routes.erl
index 70fd5c9..98954c4 100644
--- a/src/ss7_routes.erl
+++ b/src/ss7_routes.erl
@@ -17,6 +17,17 @@
% You should have received a copy of the GNU Affero General Public License
% along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+% this module is keeping the point code routing table for the MTP3 layer
+% of the Omsocom SS7 protocol stack. Routes are created and deleted
+% with create_route() and delete_route(), the arguments are
+% * destination point code
+% * point code mask
+% * name of the linkset
+%
+% there is one function to actually make a routing decision: route_dpc/1
+% with a single argument: the destination point code.
+
-module(ss7_routes).
-behaviour(gen_server).
@@ -91,8 +102,10 @@ dump_routes([Head|Tail]) when is_record(Head, ss7route) ->
dump_single_route(#ss7route{remote_pc_mask = {Pc, Mask},
linkset_name = Name}) ->
+ PcTuple = osmo_util:pointcode_fmt(itu, Pc),
+ MaskTuple = osmo_util:pointcode_fmt(itu, Mask),
io:format("Dest PC ~p/~p -> Linkset ~p~n",
- [Pc, Mask, Name]).
+ [PcTuple, MaskTuple, Name]).
% server side code