aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-03-02 22:04:54 +0100
committerHarald Welte <laforge@gnumonks.org>2018-03-03 22:40:01 +0100
commitedcdd90c497a529dd266bd1e091270264b1c21ed (patch)
treebd48a5c6e784fd8b4a4bf77466732c8f21142de7
parent1cd673dd011ebb753da93ddac3e41905d17e7675 (diff)
BSSGP_Emulation: Fix automatic BVC flow control ACK in SGSN role
This code had been intended to be used, but commented out, and never really been completed or tested. Change-Id: Iaa573219548f2a6a2eb13408fec65c55f9e88ddb
-rw-r--r--library/BSSGP_Emulation.ttcn11
-rw-r--r--library/Osmocom_Gb_Types.ttcn57
2 files changed, 61 insertions, 7 deletions
diff --git a/library/BSSGP_Emulation.ttcn b/library/BSSGP_Emulation.ttcn
index 06e47338..c7766dc9 100644
--- a/library/BSSGP_Emulation.ttcn
+++ b/library/BSSGP_Emulation.ttcn
@@ -496,12 +496,13 @@ altstep as_unblocked() runs on BSSGP_CT {
}
/* simply acknowledge all Flow Control Messages */
-/*
- [g_cfg.sgsn_role] BSCP.receive(f_BnsUdInd(t_BVC_FC_BVC), g_cfg.bvci) {
- BSCP.send(f_BnsUdReq(t_BVC_FC_BVC_ACK), g_cfg.bvci);
+ [g_cfg.sgsn_role] BSCP.receive(f_BnsUdInd(tr_BVC_FC_BVC, g_cfg.bvci)) -> value udi {
+ var OCT1 tag := udi.bssgp.pDU_BSSGP_FLOW_CONTROL_BVC.tag.unstructured_Value;
+ BSCP.send(f_BnsUdReq(t_BVC_FC_BVC_ACK(tag), g_cfg.bvci));
}
- [g_cfg.sgsn_role] BSCP.receive(f_BnsUdInd(t_BVC_FC_MS), g_cfg.bvci) {
- BSCP.send(f_BnsUdReq(t_BVC_FC_MS_ACK), g_cfg.bvci);
+/*
+ [g_cfg.sgsn_role] BSCP.receive(f_BnsUdInd(t_BVC_FC_MS, g_cfg.bvci)) {
+ BSCP.send(f_BnsUdReq(t_BVC_FC_MS_ACK, g_cfg.bvci));
}
*/
diff --git a/library/Osmocom_Gb_Types.ttcn b/library/Osmocom_Gb_Types.ttcn
index a3121b5a..f943c9c0 100644
--- a/library/Osmocom_Gb_Types.ttcn
+++ b/library/Osmocom_Gb_Types.ttcn
@@ -446,7 +446,7 @@ octetstring sdu) := {
iEI := '1E'O,
ext := '1'B,
lengthIndicator := {
- length1 := 2
+ length1 := 1
},
unstructured_Value := tag
},
@@ -462,7 +462,7 @@ octetstring sdu) := {
iEI := '03'O,
ext := '1'B,
lengthIndicator := {
- length1 := 1
+ length1 := 2
},
r_Value := f_oct_or_wc(bucket_leak_rate, 2)
},
@@ -487,6 +487,59 @@ octetstring sdu) := {
flow_Control_Granularity := omit
}
}
+ template PDU_BSSGP tr_BVC_FC_BVC(template uint16_t bmax := ?,
+ template uint16_t bucket_leak_rate := ?,
+ template uint16_t bmax_default_ms := ?,
+ template uint16_t r_default_ms := ?,
+ template OCT1 tag := ?) := {
+ pDU_BSSGP_FLOW_CONTROL_BVC := {
+ bssgpPduType := '26'O,
+ tag := {
+ iEI := '1E'O,
+ ext := '1'B,
+ lengthIndicator := {
+ length1 := 1
+ },
+ unstructured_Value := tag
+ },
+ bVC_Bucket_Size := {
+ iEI := '05'O,
+ ext := '1'B,
+ lengthIndicator := {
+ length1 := 2
+ },
+ bmax := f_oct_or_wc(bmax, 2)
+ },
+ bucket_Leak_Rate := {
+ iEI := '03'O,
+ ext := '1'B,
+ lengthIndicator := {
+ length1 := 2
+ },
+ r_Value := f_oct_or_wc(bucket_leak_rate, 2)
+ },
+ bmax_default_MS := {
+ iEI := '01'O,
+ ext := '1'B,
+ lengthIndicator := {
+ length1 := 2
+ },
+ bmax := f_oct_or_wc(bmax_default_ms, 2)
+ },
+ r_default_MS := {
+ iEI := '1C'O,
+ ext := '1'B,
+ lengthIndicator := {
+ length1 := 2
+ },
+ r_default_MS_value := f_oct_or_wc(r_default_ms, 2)
+ },
+ bucket_Full_Ratio := *,
+ bVC_Measurement := *,
+ flow_Control_Granularity := *
+ }
+ }
+
template PDU_BSSGP t_BVC_FC_BVC_ACK(template OCT1 tag) := {
pDU_BSSGP_FLOW_CONTROL_BVC_ACK := {
bssgpPduType := '27'O,