aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2021-04-19 02:57:26 +0200
committerlaforge <laforge@osmocom.org>2021-06-05 15:49:44 +0000
commitc56a3b2f12b461db1ff8e6d1eb9bb8f2b1f945cc (patch)
tree77f0c5502402ba29a3596d6a8b14e751e8b00106
parent3f1d6615510b436ddab302aa0cafafafb6a2c674 (diff)
RAW_NS: add support for an incoming SNS ADD procedure
-rw-r--r--library/RAW_NS.ttcnpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/library/RAW_NS.ttcnpp b/library/RAW_NS.ttcnpp
index 93c43f00..d601ccd8 100644
--- a/library/RAW_NS.ttcnpp
+++ b/library/RAW_NS.ttcnpp
@@ -427,6 +427,27 @@ runs on RAW_NS_CT {
}
+/* perform inbound SNS-ADD procedure */
+function f_incoming_sns_add(integer idx_add, uint8_t w_sig := 1, uint8_t w_user := 1, integer idx := 0, template (omit) NsCause cause := omit)
+runs on RAW_NS_CT {
+ log("f_incoming_sns_add(idx=", idx, ")");
+ var PDU_NS rx;
+ var NSVCConfiguration nsvc_cfg := g_nsconfig.nsvc[idx_add];
+
+ if (nsvc_cfg.provider.ip.address_family == AF_INET) {
+ var template (omit) IP4_Elements v4_elem := { ts_SNS_IPv4(nsvc_cfg.provider.ip.remote_ip,
+ nsvc_cfg.provider.ip.remote_udp_port,
+ w_sig, w_user) };
+ rx := f_ns_exp(tr_SNS_ADD(g_nsconfig.nsei, ?, v4 := v4_elem), idx);
+ } else {
+ var template (omit) IP6_Elements v6_elem := { ts_SNS_IPv6(nsvc_cfg.provider.ip.remote_ip,
+ nsvc_cfg.provider.ip.remote_udp_port,
+ w_sig, w_user) };
+ rx := f_ns_exp(tr_SNS_ADD(g_nsconfig.nsei, ?, omit, v6_elem), idx);
+ }
+ NSCP[idx].send(ts_SNS_ACK(g_nsconfig.nsei, rx.pDU_SNS_Add.transactionID));
+}
+
function f_outgoing_sns_add(integer idx_add, uint8_t w_sig := 1, uint8_t w_user := 1, integer idx := 0, template (omit) NsCause cause := omit)
runs on RAW_NS_CT {
log("f_outgoing_sns_add(idx_add=", idx_add, ")");