summaryrefslogtreecommitdiffstats
path: root/src/mtp3_codec.erl
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-01-25 01:28:56 +0100
committerHarald Welte <laforge@gnumonks.org>2012-01-25 01:28:56 +0100
commit1180b7cf00254b3dcc1d6a6b7379eb4253b29085 (patch)
tree731a9dc9414e676759699d4ea31efd83f08e78dd /src/mtp3_codec.erl
parentcbddf84dde7ca74a55cfd10da7d58d799080d651 (diff)
move invert_rout_lbl to mtp3_codec and export it there
Diffstat (limited to 'src/mtp3_codec.erl')
-rw-r--r--src/mtp3_codec.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mtp3_codec.erl b/src/mtp3_codec.erl
index 9dc50c2..3c34a6e 100644
--- a/src/mtp3_codec.erl
+++ b/src/mtp3_codec.erl
@@ -21,7 +21,7 @@
-author('Harald Welte <laforge@gnumonks.org>').
-include("mtp3.hrl").
--export([parse_mtp3_msg/1, encode_mtp3_msg/1]).
+-export([parse_mtp3_msg/1, encode_mtp3_msg/1, invert_rout_lbl/1]).
-compile({parse_transform, exprecs}).
-export_records([mtp3_routing_label, mtp3_msg]).
@@ -74,3 +74,6 @@ payload_to_binary(?MTP3_SERV_MGMT, #mtp3mg_msg{h0=H0, h1=H1, payload=Payload}) -
payload_to_binary(_, Whatever) ->
Whatever.
+
+invert_rout_lbl(L = #mtp3_routing_label{origin_pc = Opc, dest_pc = Dpc}) ->
+ L#mtp3_routing_label{origin_pc = Dpc, dest_pc = Opc}.