GSUP_Types: Add tr_GSUP_IMSI as helper for messages with IMSI as first IE

Change-Id: Ie1b9682d102da28fa7de4cb391d61aeb52f1676b
This commit is contained in:
Harald Welte 2018-01-27 15:38:18 +01:00
parent 6aa04e313b
commit 8a1dd53367
1 changed files with 9 additions and 7 deletions

View File

@ -222,6 +222,11 @@ template GSUP_PDU tr_GSUP(template GSUP_MessageType msgt := ?, template GSUP_IEs
ies := ies
}
template GSUP_PDU tr_GSUP_IMSI(template GSUP_MessageType msgt := ?, template hexstring imsi) := {
msg_type := msgt,
ies := { tr_GSUP_IE_IMSI(imsi), * }
}
template GSUP_PDU ts_GSUP(GSUP_MessageType msgt, GSUP_IEs ies := {}) := {
msg_type := msgt,
ies := ies
@ -231,7 +236,7 @@ template (value) GSUP_PDU ts_GSUP_SAI_REQ(hexstring imsi) :=
ts_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST, { valueof(ts_GSUP_IE_IMSI(imsi)) });
template GSUP_PDU tr_GSUP_SAI_REQ(template hexstring imsi) :=
tr_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST, { tr_GSUP_IE_IMSI(imsi), * });
tr_GSUP_IMSI(OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST, imsi);
template (value) GSUP_PDU ts_GSUP_SAI_RES(hexstring imsi, GSUP_IE auth_tuple) :=
ts_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT, {
@ -251,8 +256,7 @@ template GSUP_PDU tr_GSUP_SAI_RES(template hexstring imsi) :=
tr_GSUP_IE_IMSI(imsi), *, tr_GSUP_IE(OSMO_GSUP_AUTH_TUPLE_IE), * });
template GSUP_PDU tr_GSUP_UL_REQ(template hexstring imsi) :=
tr_GSUP(OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST, {
tr_GSUP_IE_IMSI(imsi), * });
tr_GSUP_IMSI(OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST, imsi);
template (value) GSUP_PDU ts_GSUP_UL_RES(hexstring imsi) :=
ts_GSUP(OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT, { valueof(ts_GSUP_IE_IMSI(imsi)) });
@ -266,12 +270,10 @@ template (value) GSUP_PDU ts_GSUP_ISD_REQ(hexstring imsi, hexstring msisdn) :=
valueof(ts_GSUP_IE_IMSI(imsi)), valueof(ts_GSUP_IE_MSISDN(msisdn)) });
template GSUP_PDU tr_GSUP_ISD_RES(template hexstring imsi) :=
tr_GSUP(OSMO_GSUP_MSGT_INSERT_DATA_RESULT, {
tr_GSUP_IE_IMSI(imsi), * });
tr_GSUP_IMSI(OSMO_GSUP_MSGT_INSERT_DATA_RESULT, imsi);
template GSUP_PDU tr_GSUP_AUTH_FAIL_IND(hexstring imsi) :=
tr_GSUP(OSMO_GSUP_MSGT_AUTH_FAIL_REPORT, {
tr_GSUP_IE_IMSI(imsi), * });
tr_GSUP_IMSI(OSMO_GSUP_MSGT_AUTH_FAIL_REPORT, imsi);
template GSUP_IE tr_GSUP_IE(template GSUP_IEI iei, template GSUP_IeValue val := ?) := {
tag := iei,