path: root/include/osmocom/sigtran/sccp_sap.h
diff options
authorHarald Welte <>2017-04-03 20:39:26 +0200
committerHarald Welte <>2017-04-10 11:48:34 +0200
commitee350893cfad730d4a62a5f332d2b9e1ae95b597 (patch)
treec01efb247404759ec15791e9c9874219dcf84fed /include/osmocom/sigtran/sccp_sap.h
parent192cf0c2ace9316d9ca05e30494b9de6bcacb08c (diff)
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
Diffstat (limited to 'include/osmocom/sigtran/sccp_sap.h')
1 files changed, 20 insertions, 0 deletions
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);