aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-03-21 21:32:45 +0100
committerHarald Welte <laforge@gnumonks.org>2019-03-27 11:17:49 +0000
commit23989a64da481633a43158d23f90bb7028b3f03e (patch)
treeb4cad7e1732a0c4dd77979f82227a206a9e8d40c
parentb16516c0afb283ffd01465e13e16867d84a68ac6 (diff)
Osmocom_Gb_Types: Add more templates for BSSGP SUSPEND/RESUME
-rw-r--r--library/Osmocom_Gb_Types.ttcn177
1 files changed, 176 insertions, 1 deletions
diff --git a/library/Osmocom_Gb_Types.ttcn b/library/Osmocom_Gb_Types.ttcn
index 780c768f..623be330 100644
--- a/library/Osmocom_Gb_Types.ttcn
+++ b/library/Osmocom_Gb_Types.ttcn
@@ -732,6 +732,40 @@ octetstring sdu) := {
unstructured_value := f_oct_or_wc(bvci, 2)
}
+ template (value) TLLI_BSSGP ts_BSSGP_TLLI(template (value) GprsTlli tlli) := {
+ iEI := '1F'O,
+ ext := '1'B,
+ lengthIndicator := {
+ length1 := 4
+ },
+ tLLI_Value := tlli
+ }
+ template TLLI_BSSGP tr_BSSGP_TLLI(template GprsTlli tlli) := {
+ iEI := '1F'O,
+ ext := '1'B,
+ lengthIndicator := {
+ length1 := 4
+ },
+ tLLI_Value := tlli
+ }
+
+ template (value) Suspend_Reference_Number ts_BSSGP_SUSP_REF(template (value) OCT1 susp_ref) := {
+ iEI := '1D'O,
+ ext := '1'B,
+ lengthIndicator := {
+ length1 := 1
+ },
+ suspend_Reference_Number_value := susp_ref
+ }
+ template Suspend_Reference_Number tr_BSSGP_SUSP_REF(template OCT1 susp_ref) := {
+ iEI := '1D'O,
+ ext := '1'B,
+ lengthIndicator := {
+ length1 := 1
+ },
+ suspend_Reference_Number_value := susp_ref
+ }
+
template IMSI_BSSGP tr_BSSGP_IMSI(template hexstring imsi) := {
iEI := '0D'O,
ext := '1'B,
@@ -781,6 +815,18 @@ octetstring sdu) := {
lLC_PDU := pdu
}
+ function ts_BSSGP_CAUSE(template (omit) BssgpCause cause) return template (omit) Cause_BSSGP {
+ var template (omit) Cause_BSSGP ret;
+ if (istemplatekind(cause, "omit")) {
+ ret := omit;
+ } else {
+ ret.iEI := '07'O;
+ ret.ext := '1'B;
+ ret.lengthIndicator := { length1 := 1 };
+ ret.cause_Value := int2oct(enum2int(valueof(cause)), 1);
+ }
+ return ret;
+ }
function t_BSSGP_CAUSE(template BssgpCause cause) return template Cause_BSSGP {
var template Cause_BSSGP ret;
ret.iEI := '07'O;
@@ -843,7 +889,7 @@ octetstring sdu) := {
pDU_BSSGP_BVC_RESET := {
bssgpPduType := '22'O,
bVCI := t_BSSGP_BVCI(bvci),
- cause := t_BSSGP_CAUSE(cause),
+ cause := ts_BSSGP_CAUSE(cause),
cell_Identifier := t_BSSGP_IE_CellId(cell_id),
feature_bitmap := omit,
extended_Feature_Bitmap := omit
@@ -1222,5 +1268,134 @@ octetstring sdu) := {
}
}
+ template (value) Routeing_Area ts_BSSGP_RA_ID(RoutingAreaIdentification input) := {
+ iEI := '1B'O,
+ ext := '1'B,
+ lengthIndicator := {
+ length1 := 6
+ },
+ mccDigit1 := input.lai.mcc_mnc[0],
+ mccDigit2 := input.lai.mcc_mnc[1],
+ mccDigit3 := input.lai.mcc_mnc[2],
+ mncDigit3 := input.lai.mcc_mnc[3],
+ mncDigit1 := input.lai.mcc_mnc[4],
+ mncDigit2 := input.lai.mcc_mnc[5],
+ lac := int2oct(input.lai.lac, 2),
+ rac := int2oct(input.rac, 1)
+ }
+
+ template (value) PDU_BSSGP ts_BSSGP_SUSPEND(GprsTlli tlli, RoutingAreaIdentification ra_id) := {
+ pDU_BSSGP_SUSPEND := {
+ bssgpPduType := '0B'O,
+ tLLI := ts_BSSGP_TLLI(tlli),
+ routeing_Area := ts_BSSGP_RA_ID(ra_id)
+ }
+ }
+ template PDU_BSSGP tr_BSSGP_SUSPEND(template GprsTlli tlli, RoutingAreaIdentification ra_id) := {
+ pDU_BSSGP_SUSPEND := {
+ bssgpPduType := '0B'O,
+ tLLI := tr_BSSGP_TLLI(tlli),
+ routeing_Area := ts_BSSGP_RA_ID(ra_id)
+ }
+ }
+
+ template (value) PDU_BSSGP ts_BSSGP_SUSPEND_ACK(GprsTlli tlli, RoutingAreaIdentification ra_id,
+ template (value) OCT1 susp_ref) := {
+ pDU_BSSGP_SUSPEND_ACK := {
+ bssgpPduType := '0C'O,
+ tLLI := ts_BSSGP_TLLI(tlli),
+ routeing_Area := ts_BSSGP_RA_ID(ra_id),
+ suspend_Reference_Number := ts_BSSGP_SUSP_REF(susp_ref)
+ }
+ }
+ template PDU_BSSGP tr_BSSGP_SUSPEND_ACK(GprsTlli tlli, RoutingAreaIdentification ra_id,
+ template OCT1 susp_ref) := {
+ pDU_BSSGP_SUSPEND_ACK := {
+ bssgpPduType := '0C'O,
+ tLLI := tr_BSSGP_TLLI(tlli),
+ routeing_Area := ts_BSSGP_RA_ID(ra_id),
+ suspend_Reference_Number := tr_BSSGP_SUSP_REF(susp_ref)
+ }
+ }
+
+ template (value) PDU_BSSGP ts_BSSGP_SUSPEND_NACK(GprsTlli tlli, RoutingAreaIdentification ra_id,
+ template (omit) BssgpCause cause) := {
+ pDU_BSSGP_SUSPEND_NACK := {
+ bssgpPduType := '0D'O,
+ tLLI := ts_BSSGP_TLLI(tlli),
+ routeing_Area := ts_BSSGP_RA_ID(ra_id),
+ cause := ts_BSSGP_CAUSE(cause)
+ }
+ }
+ template PDU_BSSGP tr_BSSGP_SUSPEND_NACK(GprsTlli tlli, RoutingAreaIdentification ra_id,
+ template BssgpCause cause) := {
+ pDU_BSSGP_SUSPEND_NACK := {
+ bssgpPduType := '0D'O,
+ tLLI := tr_BSSGP_TLLI(tlli),
+ routeing_Area := ts_BSSGP_RA_ID(ra_id),
+ cause := t_BSSGP_CAUSE(cause)
+ }
+ }
+
+
+
+ template (value) PDU_BSSGP ts_BSSGP_RESUME(GprsTlli tlli, RoutingAreaIdentification ra_id,
+ OCT1 susp_ref) := {
+ pDU_BSSGP_RESUME := {
+ bssgpPduType := '0E'O,
+ tLLI := ts_BSSGP_TLLI(tlli),
+ routeing_Area := ts_BSSGP_RA_ID(ra_id),
+ suspend_Reference_Number := ts_BSSGP_SUSP_REF(susp_ref)
+ }
+ }
+ template PDU_BSSGP tr_BSSGP_RESUME(template GprsTlli tlli, RoutingAreaIdentification ra_id,
+ template OCT1 susp_ref) := {
+ pDU_BSSGP_RESUME := {
+ bssgpPduType := '0E'O,
+ tLLI := tr_BSSGP_TLLI(tlli),
+ routeing_Area := ts_BSSGP_RA_ID(ra_id),
+ suspend_Reference_Number := tr_BSSGP_SUSP_REF(susp_ref)
+ }
+ }
+
+ template (value) PDU_BSSGP ts_BSSGP_RESUME_ACK(GprsTlli tlli, RoutingAreaIdentification ra_id)
+ := {
+ pDU_BSSGP_RESUME_ACK := {
+ bssgpPduType := '0F'O,
+ tLLI := ts_BSSGP_TLLI(tlli),
+ routeing_Area := ts_BSSGP_RA_ID(ra_id)
+ }
+ }
+ template PDU_BSSGP tr_BSSGP_RESUME_ACK(template GprsTlli tlli,
+ RoutingAreaIdentification ra_id) := {
+ pDU_BSSGP_RESUME_ACK := {
+ bssgpPduType := '0F'O,
+ tLLI := tr_BSSGP_TLLI(tlli),
+ routeing_Area := ts_BSSGP_RA_ID(ra_id)
+ }
+ }
+
+ template (value) PDU_BSSGP ts_BSSGP_RESUME_NACK(GprsTlli tlli, RoutingAreaIdentification ra_id,
+ template (omit) BssgpCause cause) := {
+ pDU_BSSGP_RESUME_NACK := {
+ bssgpPduType := '10'O,
+ tLLI := ts_BSSGP_TLLI(tlli),
+ routeing_Area := ts_BSSGP_RA_ID(ra_id),
+ cause := ts_BSSGP_CAUSE(cause)
+ }
+ }
+ template PDU_BSSGP tr_BSSGP_RESUME_NACK(template GprsTlli tlli,
+ RoutingAreaIdentification ra_id,
+ template BssgpCause cause) := {
+ pDU_BSSGP_RESUME_NACK := {
+ bssgpPduType := '10'O,
+ tLLI := tr_BSSGP_TLLI(tlli),
+ routeing_Area := ts_BSSGP_RA_ID(ra_id),
+ cause := t_BSSGP_CAUSE(cause)
+ }
+ }
+
+
+
} with { encode "RAW" };