epdg: Include BearerContext in CreateSessionResponse
Change-Id: I89e364a5be68105ae8811e8bc917f32511f9e6ef
This commit is contained in:
parent
1344e47a59
commit
8c74649358
|
@ -393,9 +393,12 @@ private altstep as_GTP2C_CreateSession_success() runs on EPDG_ConnHdlr {
|
|||
var PDU_GTPCv2 rx_msg;
|
||||
var template (value) FullyQualifiedTEID fteid_c_ie, fteid_u_ie;
|
||||
var template (value) PDN_AddressAllocation paa;
|
||||
var uint4_t bid;
|
||||
var template (value) BearerContextIEs bctx_ies;
|
||||
|
||||
[] GTP2.receive(tr_GTP2C_CreateSessionReq(g_pars.imsi)) -> value rx_msg {
|
||||
/* TODO: parse TEIC and TEID and store it in g_pars.remote_tei{c,d} */
|
||||
bid := rx_msg.gtpcv2_pdu.createSessionRequest.bearerContextGrouped[0].bearerContextIEs.ePS_Bearer_ID.ePS_Bearer_ID_Value;
|
||||
|
||||
/* allocate + register TEID-C on local side */
|
||||
g_pars.teic := f_gtp2_allocate_teid();
|
||||
|
@ -409,8 +412,11 @@ private altstep as_GTP2C_CreateSession_success() runs on EPDG_ConnHdlr {
|
|||
fteid_u_ie := ts_GTP2C_FTEID(FTEID_IF_S2bU_ePDG_GTPU, g_pars.teid, 2,
|
||||
f_inet_addr(mp_s2b_local_ip), omit);
|
||||
paa := ts_GTP2C_PdnAddrAlloc_v4(f_inet_addr(g_pars.ue_ip));
|
||||
|
||||
GTP2.send(ts_GTP2C_CreateSessionResp({ fteid_c_ie }, paa));
|
||||
bctx_ies := ts_GTP2C_BcContextIE(bid := bid,
|
||||
teid_list := { fteid_u_ie },
|
||||
qos := ts_GTP2C_BearerQos('09'O, 0,0,0,0),
|
||||
charging_id := ts_GTP2C_ChargingID(g_pars.teic));
|
||||
GTP2.send(ts_GTP2C_CreateSessionResp({ fteid_c_ie }, paa, { ts_GTP2C_BcGrouped(bctx_ies) } ));
|
||||
setverdict(pass);
|
||||
}
|
||||
[] GTP2.receive(PDU_GTPCv2:?) -> value rx_msg {
|
||||
|
|
|
@ -505,6 +505,25 @@ tr_GTP2C_FTEID(template (present) integer if_type, template (present) OCT4 teid,
|
|||
}
|
||||
|
||||
/* 8.28 */
|
||||
template (value) BearerContextIEs
|
||||
ts_GTP2C_BcContextIE(template (value) uint4_t bid,
|
||||
template (omit) FullyQualifiedTEID_List teid_list := omit,
|
||||
template (omit) Bearer_QoS qos := ts_GTP2C_BearerQos('09'O, 0,0,0,0),
|
||||
template (omit) ChargingID charging_id := omit) := {
|
||||
ePS_Bearer_ID := ts_GTP2C_EpsBearerId(bid),
|
||||
cause := ts_GTP2C_Cause(Request_accepted, '0'B),
|
||||
ePS_Bearer_TFT := omit,
|
||||
fullyQualifiedTEID := teid_list,
|
||||
bearerLevel_QoS := qos,
|
||||
chargingID := charging_id,
|
||||
bearerFlags := omit,
|
||||
transactionIdentifier := omit,
|
||||
protocolConfigOptions := omit,
|
||||
rAN_NASCause := omit,
|
||||
additionalProtocolConfigOptions := omit,
|
||||
extendedProtocolConfigOptions := omit
|
||||
}
|
||||
|
||||
template (value) BearerContextGrouped
|
||||
ts_GTP2C_BcGrouped(template (value) BearerContextIEs ies) := {
|
||||
elementIdentifier := '5D'O,
|
||||
|
@ -522,7 +541,16 @@ tr_GTP2C_BcGrouped(template (present) BearerContextIEs ies) := {
|
|||
bearerContextIEs := ies
|
||||
}
|
||||
|
||||
|
||||
/* 8.29 */
|
||||
template (value) ChargingID
|
||||
ts_GTP2C_ChargingID(template (value) OCT4 chargingID_Value) := {
|
||||
elementIdentifier := '5D'O,
|
||||
lengthIndicator := 0, /* overwritten */
|
||||
instance := '0000'B,
|
||||
spare := '0000'B,
|
||||
chargingID_Value := chargingID_Value,
|
||||
additionalOctets := omit
|
||||
}
|
||||
|
||||
/* 8.30 */
|
||||
template (value) ChargingCharacteristics
|
||||
|
@ -811,7 +839,8 @@ tr_PDU_GTP2C('00000000'O, ?, {
|
|||
|
||||
template (value) PDU_GTPCv2
|
||||
ts_GTP2C_CreateSessionResp(template (value) FullyQualifiedTEID_List fteids,
|
||||
template (value) PDN_AddressAllocation addr) :=
|
||||
template (value) PDN_AddressAllocation addr,
|
||||
template (omit) BearerContextGrouped_List bearerContextGrouped := omit) :=
|
||||
ts_PDU_GTP2C('00000000'O, '000000'O, '21'O, {
|
||||
createSessionResponse := {
|
||||
cause := ts_GTP2C_Cause(Request_accepted, '0'B),
|
||||
|
@ -824,7 +853,7 @@ ts_PDU_GTP2C('00000000'O, '000000'O, '21'O, {
|
|||
ambr := omit,
|
||||
linkedEPS_Bearer_ID := omit,
|
||||
protocolConfigOptions := omit,
|
||||
bearerContextGrouped := omit,
|
||||
bearerContextGrouped := bearerContextGrouped,
|
||||
recovery := omit,
|
||||
chargingGatewayName := omit,
|
||||
chargingGatewayAddress := omit,
|
||||
|
|
Loading…
Reference in New Issue