summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-07-27 13:51:20 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-08-07 16:04:39 +0200
commit473048d0d26f2ac06eec5ce6346967eb293492be (patch)
tree104dc99b55f74f95195c4148e0b9e5fa15605fc8
parent882f340b6c394f581f6c32cafefa10c7b57073b9 (diff)
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
-rw-r--r--include/osmocom/sigtran/sccp_helpers.h2
-rw-r--r--src/sccp_helpers.c6
2 files changed, 8 insertions, 0 deletions
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 @@ int osmo_sccp_tx_unitdata_msg(struct osmo_sccp_user *scu,
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 @@ void osmo_sccp_make_addr_pc_ssn(struct osmo_sccp_addr *addr, uint32_t pc, uint32
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,