pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-sigtran/+/41409?usp=email )


Change subject: ss7_instance: Introduce API 
osmo_ss7_instance_get_network_indicator()
......................................................................

ss7_instance: Introduce API osmo_ss7_instance_get_network_indicator()

This is usually needed for users (eg. osmo-bsc) willing to use the
MTP SAP (eg. MTP-TRANSFER.req) since it needs to fill in
prim.u.transfer.sio.

Related: OS#6880
Change-Id: I3eb8a562c8f032fe5fd3bfb8282c1a5d9699218c
---
M TODO-RELEASE
M include/osmocom/sigtran/osmo_ss7.h
M src/ss7_instance.c
3 files changed, 8 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran 
refs/changes/09/41409/1

diff --git a/TODO-RELEASE b/TODO-RELEASE
index a89255b..2ecfd57 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -9,3 +9,4 @@
 #library       what                    description / commit summary line
 libosmo-netif >1.6.0  stream OSMO_STREAM_{CLI,SRV}_TCP_SOCKOPT_KEEP*
 libosmo-sigtran add   enum mtp_network_indicator, mtp_network_indicator_vals
+libosmo-sigtran add   osmo_ss7_instance_get_network_indicator()
diff --git a/include/osmocom/sigtran/osmo_ss7.h 
b/include/osmocom/sigtran/osmo_ss7.h
index dc9aada..5a51ba3 100644
--- a/include/osmocom/sigtran/osmo_ss7.h
+++ b/include/osmocom/sigtran/osmo_ss7.h
@@ -59,6 +59,7 @@
 osmo_ss7_instance_get_pc_fmt(const struct osmo_ss7_instance *inst);

 uint32_t osmo_ss7_instance_get_primary_pc(const struct osmo_ss7_instance 
*inst);
+uint8_t osmo_ss7_instance_get_network_indicator(const struct osmo_ss7_instance 
*inst);

 struct osmo_sccp_instance *osmo_ss7_ensure_sccp(struct osmo_ss7_instance 
*inst);
 struct osmo_sccp_instance *osmo_ss7_get_sccp(const struct osmo_ss7_instance 
*inst);
diff --git a/src/ss7_instance.c b/src/ss7_instance.c
index b583b98..a4cbe1e 100644
--- a/src/ss7_instance.c
+++ b/src/ss7_instance.c
@@ -125,6 +125,12 @@
        return inst->cfg.primary_pc;
 }

+/* Q.704 14.2.2 Sub-service field, bits D C (= Network Indicator) */
+uint8_t osmo_ss7_instance_get_network_indicator(const struct osmo_ss7_instance 
*inst)
+{
+       return inst->cfg.network_indicator;
+}
+
 /*! \brief Set the point code format used in given SS7 instance */
 int osmo_ss7_instance_set_pc_fmt(struct osmo_ss7_instance *inst,
                                uint8_t c0, uint8_t c1, uint8_t c2)

--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/41409?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I3eb8a562c8f032fe5fd3bfb8282c1a5d9699218c
Gerrit-Change-Number: 41409
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>

Reply via email to