[MERGED] libosmo-sccp[master]: sccp_helpers: add convenience function for RANAP unitdata

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon Feb 13 13:58:13 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: sccp_helpers: add convenience function for RANAP unitdata
......................................................................


sccp_helpers: add convenience function for RANAP unitdata

Change-Id: Ie96d78512b8e3907753272d75471b882365968c4
---
M include/osmocom/sigtran/sccp_helpers.h
M src/sccp_helpers.c
2 files changed, 20 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/sigtran/sccp_helpers.h b/include/osmocom/sigtran/sccp_helpers.h
index d5916a9..3384630 100644
--- a/include/osmocom/sigtran/sccp_helpers.h
+++ b/include/osmocom/sigtran/sccp_helpers.h
@@ -17,6 +17,11 @@
 void osmo_sccp_make_addr_pc_ssn(struct osmo_sccp_addr *addr,
 				uint32_t pc, uint32_t ssn);
 
+int osmo_sccp_tx_unitdata_ranap(struct osmo_sccp_link *link,
+				uint32_t src_point_code,
+				uint32_t dst_point_code,
+				uint8_t *data, unsigned int len);
+
 int osmo_sccp_tx_conn_req(struct osmo_sccp_link *link, uint32_t conn_id,
 			  const struct osmo_sccp_addr *calling_addr,
 			  const struct osmo_sccp_addr *called_addr,
diff --git a/src/sccp_helpers.c b/src/sccp_helpers.c
index ce9cd06..c6248de 100644
--- a/src/sccp_helpers.c
+++ b/src/sccp_helpers.c
@@ -53,6 +53,21 @@
 	return osmo_sua_user_link_down(link, &prim->oph);
 }
 
+int osmo_sccp_tx_unitdata_ranap(struct osmo_sccp_link *link,
+				uint32_t src_point_code,
+				uint32_t dst_point_code,
+				uint8_t *data, unsigned int len)
+{
+	struct osmo_sccp_addr calling_addr;
+	struct osmo_sccp_addr called_addr;
+	osmo_sccp_make_addr_pc_ssn(&calling_addr, src_point_code,
+				   OSMO_SCCP_SSN_RANAP);
+	osmo_sccp_make_addr_pc_ssn(&called_addr, dst_point_code,
+				   OSMO_SCCP_SSN_RANAP);
+	return osmo_sccp_tx_unitdata(link, &calling_addr, &called_addr,
+				     data, len);
+}
+
 int osmo_sccp_tx_unitdata_msg(struct osmo_sccp_link *link,
 			      const struct osmo_sccp_addr *calling_addr,
 			      const struct osmo_sccp_addr *called_addr,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie96d78512b8e3907753272d75471b882365968c4
Gerrit-PatchSet: 2
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>


More information about the gerrit-log mailing list