From 9bfab7c6f9d791bba830368077a7ff68cde3252b Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 12 Oct 2011 00:02:42 +0200 Subject: ss7_routes: some pretty printing of point codes --- src/ss7_routes.erl | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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 . + +% 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 -- cgit v1.2.3