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

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

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


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

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(-)


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

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: newchange
Gerrit-Change-Id: Ie96d78512b8e3907753272d75471b882365968c4
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list