PCU: Add a bit more logging/tracing to ease debugging of SNS tests

Change-Id: Ic558f02f3c3ddbde0f16a7656b84486a8462b0a4
Related: OS#3372
This commit is contained in:
Harald Welte 2019-02-22 23:27:12 +01:00
parent bf76824482
commit b63c3a1e4f
1 changed files with 5 additions and 0 deletions

View File

@ -14,6 +14,7 @@ import from NS_Types all;
/* perform inbound SNS-SIZE procedure */
function f_incoming_sns_size(template (omit) NsCause cause := omit, integer idx := 0)
runs on RAW_NS_CT {
log("f_incoming_sns_size(idx=", idx, ")");
var PDU_NS rx;
/* expect one single SNS-SIZE with RESET flag; one remote v4 EP; no v6 EP */
rx := f_ns_exp(tr_SNS_SIZE(g_nsconfig[idx].nsei, rst_flag := true, max_nsvcs := 8,
@ -24,6 +25,7 @@ runs on RAW_NS_CT {
/* perform outbound SNS-SIZE procedure */
function f_outgoing_sns_size(template (omit) NsCause cause := omit, integer idx:= 0)
runs on RAW_NS_CT {
log("f_outgoing_sns_size(idx=", idx, ")");
var PDU_NS rx;
NSCP[idx].send(t_NS_Send(g_ns_conn_id[idx], ts_SNS_SIZE(g_nsconfig[idx].nsei, rst_flag := true, max_nsvcs := 1,
num_v4 := 1, num_v6 := omit)
@ -35,6 +37,7 @@ runs on RAW_NS_CT {
/* perform inbound SNS-CONFIG procedure */
function f_incoming_sns_config(template (omit) NsCause cause := omit, integer idx := 0)
runs on RAW_NS_CT {
log("f_incoming_sns_config(idx=", idx, ")");
var PDU_NS rx;
rx := f_ns_exp(tr_SNS_CONFIG(g_nsconfig[idx].nsei, end_flag := true, v4 := ?), idx);
NSCP[idx].send(t_NS_Send(g_ns_conn_id[idx], ts_SNS_CONFIG_ACK(g_nsconfig[idx].nsei, cause)));
@ -43,6 +46,7 @@ runs on RAW_NS_CT {
/* perform outbound SNS-CONFIG procedure */
function f_outgoing_sns_config(template (omit) NsCause cause := omit, integer idx := 0)
runs on RAW_NS_CT {
log("f_outgoing_sns_config(idx=", idx, ")");
var PDU_NS rx;
var template (omit) IP4_Elements v4 := { ts_SNS_IPv4(g_nsconfig[idx].local_ip,
g_nsconfig[idx].local_udp_port) }
@ -53,6 +57,7 @@ runs on RAW_NS_CT {
/* perform outbound SNS-CONFIG procedure (separate endpoints: 1 for control, 1 for user */
function f_outgoing_sns_config_1c1u(template (omit) NsCause cause := omit, integer idx := 0)
runs on RAW_NS_CT {
log("f_outgoing_sns_config_1c1u(idx=", idx, ")");
var PDU_NS rx;
var template (omit) IP4_Elements v4 := { ts_SNS_IPv4(g_nsconfig[0].local_ip,
g_nsconfig[0].local_udp_port, 1, 0),