From ee350893cfad730d4a62a5f332d2b9e1ae95b597 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 3 Apr 2017 20:39:26 +0200 Subject: Add new SCCP implementation This is an implementation of SCCP as specified in ITO-T Q.71x, particularly the SCRC (routing), SCLC (Connectionless) and SCOC (Connection Oriented) portions. the elaborate state machines of SCOC are implemented using osmo_fsm, with one state machine for each connection. Interfaces to the top (user application) are the SCCP-USER-SAP and on the bottom (network) side the MTP-USER-SAP as provided by osmo_ss7. Contrary to a straight-forward implementation, the code internally always uses a SUA representation of all messages (in struct xua_msg). This enables us to have one common implementation of all related state machines and use them for both SUA and SCCP. If used with real SCCP wire format, all messages are translated from SCCP to SUA on ingress and translated from SUA to SCCP on egress. As SUA is a super-set of SCCP, this can be done "lossless". Change-Id: I916e895d9a4914b05483fe12ab5251f206d10dee --- include/osmocom/sigtran/sccp_sap.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'include/osmocom/sigtran/sccp_sap.h') diff --git a/include/osmocom/sigtran/sccp_sap.h b/include/osmocom/sigtran/sccp_sap.h index 0cc1531..c1464f0 100644 --- a/include/osmocom/sigtran/sccp_sap.h +++ b/include/osmocom/sigtran/sccp_sap.h @@ -222,3 +222,23 @@ struct osmo_scu_prim { #define msgb_scu_prim(msg) ((struct osmo_scu_prim *)(msg)->l1h) char *osmo_scu_prim_name(struct osmo_prim_hdr *oph); + +struct osmo_ss7_instance; +struct osmo_sccp_instance; +struct osmo_sccp_user; + +struct osmo_sccp_instance * +osmo_sccp_instance_create(struct osmo_ss7_instance *ss7, void *priv); +void osmo_sccp_instance_destroy(struct osmo_sccp_instance *inst); + +void osmo_sccp_user_unbind(struct osmo_sccp_user *scu); + +struct osmo_sccp_user * +osmo_sccp_user_bind_pc(struct osmo_sccp_instance *inst, const char *name, + osmo_prim_cb prim_cb, uint16_t ssn, uint32_t pc); + +struct osmo_sccp_user * +osmo_sccp_user_bind(struct osmo_sccp_instance *inst, const char *name, + osmo_prim_cb prim_cb, uint16_t ssn); + +int osmo_sccp_user_sap_down(struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph); -- cgit v1.2.3