fixeria has uploaded this change for review.

View Change

library/gsup: add src/dst name IE to add SS templates

This enables us to send/match OSMO_GSUP_{SOURCE,DESTINATION}_NAME
IEs (if needed) and brings consistency to all SS related templates.

Change-Id: I8d947313a99491d2e4790bc06db863fe09d8b5cf
---
M library/GSUP_Templates.ttcn
1 file changed, 58 insertions(+), 22 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/85/38585/1
diff --git a/library/GSUP_Templates.ttcn b/library/GSUP_Templates.ttcn
index 9a0805e..0abc489 100644
--- a/library/GSUP_Templates.ttcn
+++ b/library/GSUP_Templates.ttcn
@@ -1331,7 +1331,8 @@
template (value) GSUP_SessionState state,
template (omit) octetstring ss := omit,
template (omit) integer cause := omit,
- template (omit) octetstring source_name := omit)
+ template (omit) octetstring src_name := omit,
+ template (omit) octetstring dst_name := omit)
return template (value) GSUP_IEs {
/* Mandatory IEs */
var template (value) GSUP_IEs ies := {
@@ -1357,9 +1358,13 @@
idx := idx + 1;
}

- /* OSMO_GSUP_SOURCE_NAME_IE */
- if (not istemplatekind(source_name, "omit")) {
- ies[idx] := ts_GSUP_IE_Source_Name(source_name);
+ /* OSMO_GSUP_{SOURCE,DESTINATION}_NAME_IE */
+ if (not istemplatekind(src_name, "omit")) {
+ ies[idx] := ts_GSUP_IE_Source_Name(src_name);
+ idx := idx + 1;
+ }
+ if (not istemplatekind(dst_name, "omit")) {
+ ies[idx] := ts_GSUP_IE_Destination_Name(dst_name);
idx := idx + 1;
}

@@ -1370,7 +1375,8 @@
template (present) GSUP_SessionState state := ?,
template octetstring ss := *,
template integer cause := *,
- template octetstring destination_name := *)
+ template octetstring src_name := *,
+ template octetstring dst_name := *)
return template GSUP_IEs {
/* Mandatory IEs */
var template GSUP_IEs ies := {
@@ -1403,13 +1409,19 @@
}

/* FIXME: OSMO_GSUP_MESSAGE_CLASS_IE goes here */
- /* TODO: OSMO_GSUP_SOURCE_NAME_IE goes here */

- /* OSMO_GSUP_DESTINATION_NAME_IE */
- if (ispresent(destination_name)) {
- ies[idx] := tr_GSUP_IE_Destination_Name(destination_name);
+ /* OSMO_GSUP_{SOURCE,DESTINATION}_NAME_IE */
+ if (ispresent(src_name)) {
+ ies[idx] := tr_GSUP_IE_Source_Name(src_name);
idx := idx + 1;
- } else if (istemplatekind(destination_name, "*")) {
+ } else if (istemplatekind(src_name, "*")) {
+ ies[idx] := *;
+ idx := idx + 1;
+ }
+ if (ispresent(dst_name)) {
+ ies[idx] := tr_GSUP_IE_Destination_Name(dst_name);
+ idx := idx + 1;
+ } else if (istemplatekind(dst_name, "*")) {
ies[idx] := *;
idx := idx + 1;
}
@@ -1427,52 +1439,76 @@
template (value) OCT4 sid,
template (value) GSUP_SessionState state,
template (omit) octetstring ss := omit,
- template (omit) octetstring source_name := omit) := {
+ template (omit) octetstring src_name := omit,
+ template (omit) octetstring dst_name := omit) := {
msg_type := OSMO_GSUP_MSGT_PROC_SS_REQUEST,
- ies := f_gen_ts_ss_ies(imsi, sid, state, ss, source_name := source_name)
+ ies := f_gen_ts_ss_ies(imsi, sid, state, ss,
+ src_name := src_name,
+ dst_name := dst_name)
};
template (present) GSUP_PDU
tr_GSUP_PROC_SS_REQ(template (present) hexstring imsi,
template (present) OCT4 sid := ?,
template (present) GSUP_SessionState state := ?,
- template octetstring ss := *) := {
+ template octetstring ss := *,
+ template octetstring src_name := *,
+ template octetstring dst_name := *) := {
msg_type := OSMO_GSUP_MSGT_PROC_SS_REQUEST,
- ies := f_gen_tr_ss_ies(imsi, sid, state, ss)
+ ies := f_gen_tr_ss_ies(imsi, sid, state, ss,
+ src_name := src_name,
+ dst_name := dst_name)
};

template (value) GSUP_PDU
ts_GSUP_PROC_SS_RES(template (value) hexstring imsi,
template (value) OCT4 sid,
template (value) GSUP_SessionState state,
- template (omit) octetstring ss := omit) := {
+ template (omit) octetstring ss := omit,
+ template (omit) octetstring src_name := omit,
+ template (omit) octetstring dst_name := omit) := {
msg_type := OSMO_GSUP_MSGT_PROC_SS_RESULT,
- ies := f_gen_ts_ss_ies(imsi, sid, state, ss)
+ ies := f_gen_ts_ss_ies(imsi, sid, state, ss,
+ src_name := src_name,
+ dst_name := dst_name)
};
template (present) GSUP_PDU
tr_GSUP_PROC_SS_RES(template (present) hexstring imsi,
template (present) OCT4 sid := ?,
template (present) GSUP_SessionState state := ?,
template octetstring ss := *,
- template octetstring destination_name := omit) := {
+ template octetstring src_name := *,
+ template octetstring dst_name := *) := {
msg_type := OSMO_GSUP_MSGT_PROC_SS_RESULT,
- ies := f_gen_tr_ss_ies(imsi, sid, state, ss, destination_name := destination_name)
+ ies := f_gen_tr_ss_ies(imsi, sid, state, ss,
+ src_name := src_name,
+ dst_name := dst_name)
};

template (value) GSUP_PDU
ts_GSUP_PROC_SS_ERR(template (value) hexstring imsi,
template (value) OCT4 sid,
template (value) GSUP_SessionState state,
- template (value) integer cause) := {
+ template (value) integer cause,
+ template (omit) octetstring src_name := omit,
+ template (omit) octetstring dst_name := omit) := {
msg_type := OSMO_GSUP_MSGT_PROC_SS_ERROR,
- ies := f_gen_ts_ss_ies(imsi, sid, state, cause := cause)
+ ies := f_gen_ts_ss_ies(imsi, sid, state,
+ cause := cause,
+ src_name := src_name,
+ dst_name := dst_name)
};
template (present) GSUP_PDU
tr_GSUP_PROC_SS_ERR(template (present) hexstring imsi,
template (present) OCT4 sid := ?,
template (present) GSUP_SessionState state := ?,
- template (present) integer cause := ?) := {
+ template (present) integer cause := ?,
+ template octetstring src_name := *,
+ template octetstring dst_name := *) := {
msg_type := OSMO_GSUP_MSGT_PROC_SS_ERROR,
- ies := f_gen_tr_ss_ies(imsi, sid, state, cause := cause)
+ ies := f_gen_tr_ss_ies(imsi, sid, state,
+ cause := cause,
+ src_name := src_name,
+ dst_name := dst_name)
};

template (value) GSUP_PDU ts_GSUP_MO_FORWARD_SM_REQ(

To view, visit change 38585. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I8d947313a99491d2e4790bc06db863fe09d8b5cf
Gerrit-Change-Number: 38585
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de>