Review at  https://gerrit.osmocom.org/2243

Add osmo_sccp_get_ss7() accessor function

as 'struct osmo_sccp_instance' is opaque to the user application, it is
useful to have an accessor function that resolves the ss7 instance used
by the SCCP instance.

Change-Id: I8057a6d69584239b9781c5cece42066293ea1dd6
---
M include/osmocom/sigtran/sccp_sap.h
M src/sccp_user.c
2 files changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/43/2243/1

diff --git a/include/osmocom/sigtran/sccp_sap.h 
b/include/osmocom/sigtran/sccp_sap.h
index a35af56..03891e7 100644
--- a/include/osmocom/sigtran/sccp_sap.h
+++ b/include/osmocom/sigtran/sccp_sap.h
@@ -230,6 +230,7 @@
 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);
+struct osmo_ss7_instance *osmo_sccp_get_ss7(struct osmo_sccp_instance *sccp);
 
 void osmo_sccp_user_unbind(struct osmo_sccp_user *scu);
 void *osmo_sccp_user_get_priv(struct osmo_sccp_user *scu);
diff --git a/src/sccp_user.c b/src/sccp_user.c
index 825d545..73b6a60 100644
--- a/src/sccp_user.c
+++ b/src/sccp_user.c
@@ -383,3 +383,8 @@
 
        return NULL;
 }
+
+struct osmo_ss7_instance *osmo_sccp_get_ss7(struct osmo_sccp_instance *sccp)
+{
+       return sccp->ss7;
+}

-- 
To view, visit https://gerrit.osmocom.org/2243
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8057a6d69584239b9781c5cece42066293ea1dd6
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <[email protected]>

Reply via email to