From c3cc853c6e393246faea585cce4733b2742cc4af Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 27 Jul 2013 14:54:23 +0800 Subject: add ss7_links:role2sctp_role() helps to translate from asp -> active and sg -> passive --- src/ss7_links.erl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/ss7_links.erl') 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 @@ propagate_linkstate_to_linkset(LsName, Sls, State) -> _ -> {error, ets_lookup} end. + +role2sctp_role(asp) -> + active; +role2sctp_role(sg) -> + passive. -- cgit v1.2.3