add ss7_links:role2sctp_role()
helps to translate from asp -> active and sg -> passive
diff --git a/src/ss7_links.erl b/src/ss7_links.erl
index 11cd96b..c713700 100644
--- a/src/ss7_links.erl
+++ b/src/ss7_links.erl
@@ -52,7 +52,8 @@
-export([get_pid_for_link/2, get_pid_for_dpc_sls/2,
mtp3_tx/1, mtp3_tx/2,
get_linkset_for_dpc/1, get_opc_for_linkset/1, is_pc_local/1,
- get_user_pid_for_service/1, mtp3_rx/1, dump/0]).
+ get_user_pid_for_service/1, mtp3_rx/1, dump/0,
+ role2sctp_role/1]).
-type link_state() :: down | up_inactive | active.
-opaque tid() :: integer().
@@ -465,3 +466,8 @@
_ ->
{error, ets_lookup}
end.
+
+role2sctp_role(asp) ->
+ active;
+role2sctp_role(sg) ->
+ passive.