[MERGED] libosmo-sccp[master]: add osmo_sccp_addr_set_ssn()

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
Tue Aug 8 18:25:52 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: add osmo_sccp_addr_set_ssn()
......................................................................


add osmo_sccp_addr_set_ssn()

Will be used by e.g. osmo-hnbgw to add an SSN to addresses obtained from the
sccp address book.

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

Approvals:
  dexter: Looks good to me, but someone else must approve
  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 ecf583e..2f318f4 100644
--- a/include/osmocom/sigtran/sccp_helpers.h
+++ b/include/osmocom/sigtran/sccp_helpers.h
@@ -17,6 +17,8 @@
 void osmo_sccp_make_addr_pc_ssn(struct osmo_sccp_addr *addr,
 				uint32_t pc, uint32_t ssn);
 
+void osmo_sccp_addr_set_ssn(struct osmo_sccp_addr *addr, uint32_t ssn);
+
 int osmo_sccp_tx_unitdata_ranap(struct osmo_sccp_user *scu,
 				uint32_t src_point_code,
 				uint32_t dst_point_code,
diff --git a/src/sccp_helpers.c b/src/sccp_helpers.c
index 76a7c1c..2320fe5 100644
--- a/src/sccp_helpers.c
+++ b/src/sccp_helpers.c
@@ -44,6 +44,12 @@
 	addr->pc = pc;
 }
 
+void osmo_sccp_addr_set_ssn(struct osmo_sccp_addr *addr, uint32_t ssn)
+{
+	addr->presence |= OSMO_SCCP_ADDR_T_SSN;
+	addr->ssn = ssn;
+}
+
 int osmo_sccp_tx_unitdata(struct osmo_sccp_user *scu,
 			  const struct osmo_sccp_addr *calling_addr,
 			  const struct osmo_sccp_addr *called_addr,

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

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



More information about the gerrit-log mailing list