lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

January 2024

  • 1 participants
  • 1559 discussions
[M] Change in osmo-hnbgw[master]: pfcp: implement sending Network Instance IEs
by pespin 25 Jan '24

25 Jan '24
Attention is currently required from: fixeria, neels. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/35645?usp=email ) Change subject: pfcp: implement sending Network Instance IEs ...................................................................... Patch Set 3: (1 comment) File src/osmo-hnbgw/ps_rab_fsm.c: https://gerrit.osmocom.org/c/osmo-hnbgw/+/35645/comment/4cf59fc6_d25d9aa7 PS3, Line 244: set_netinst(ser->create_pdr[ser->create_pdr_count].pdi.network_inst, g_hnbgw->config.pfcp.netinst.core); > (re macro: I mean, look at this, do you want to have a third one of these miles long arguments here? […] better than some macro which one for sure has to go look at when looking at the code because god knows what may be doing? yes. Do as you please, not blocking. -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/35645?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: Ief53dbfacf1645c32a07847d590c4884d4c8ca56 Gerrit-Change-Number: 35645 Gerrit-PatchSet: 3 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Thu, 25 Jan 2024 13:57:43 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: DIAMETER: Split Gy and Gx messages to their own TS files
by pespin 25 Jan '24

25 Jan '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35671?usp=email ) Change subject: DIAMETER: Split Gy and Gx messages to their own TS files ...................................................................... DIAMETER: Split Gy and Gx messages to their own TS files Those interfaces reuse messages from other Diameter RFCs, but changing the contents of the messages, eg some Mandatory fields like Service-Context-Id which are mandatory in RFC5006, doesn't even appear in Gx CCR in TS 29.212. Keeping them well separated helps in avoiding confusion on users fo the messages. Change-Id: Ibe0d5f263813d5083e020c942283f214983162b4 --- M ggsn_tests/GGSN_Tests.ttcn M ggsn_tests/gen_links.sh M library/DIAMETER_Templates.ttcn A library/DIAMETER_ts29_212_Templates.ttcn A library/DIAMETER_ts32_299_Templates.ttcn M pgw/PGW_Tests.ttcn M pgw/gen_links.sh 7 files changed, 262 insertions(+), 187 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved osmith: Looks good to me, but someone else must approve diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn index a1aab9b..d7de443 100644 --- a/ggsn_tests/GGSN_Tests.ttcn +++ b/ggsn_tests/GGSN_Tests.ttcn @@ -34,7 +34,9 @@ import from DIAMETER_Types all; import from DIAMETER_Templates all; + import from DIAMETER_ts29_212_Templates all; import from DIAMETER_ts29_272_Templates all; + import from DIAMETER_ts32_299_Templates all; import from DIAMETER_Emulation all; const integer GTP0_PORT := 3386; diff --git a/ggsn_tests/gen_links.sh b/ggsn_tests/gen_links.sh index b51620e..4981e64 100755 --- a/ggsn_tests/gen_links.sh +++ b/ggsn_tests/gen_links.sh @@ -61,7 +61,7 @@ FILES="Misc_Helpers.ttcn General_Types.ttcn GSM_Types.ttcn Osmocom_Types.ttcn Native_Functions.ttcn Native_FunctionDefs.cc IPCP_Types.ttcn PAP_Types.ttcn " FILES+="GTP_CodecPort.ttcn GTP_CodecPort_CtrlFunct.ttcn GTP_CodecPort_CtrlFunctDef.cc GTP_Templates.ttcn Osmocom_Gb_Types.ttcn " FILES+="DIAMETER_Types.ttcn DIAMETER_CodecPort.ttcn DIAMETER_CodecPort_CtrlFunct.ttcn DIAMETER_CodecPort_CtrlFunctDef.cc DIAMETER_Emulation.ttcn " -FILES+="DIAMETER_Templates.ttcn DIAMETER_ts29_272_Templates.ttcn " +FILES+="DIAMETER_Templates.ttcn DIAMETER_ts29_212_Templates.ttcn DIAMETER_ts29_272_Templates.ttcn DIAMETER_ts32_299_Templates.ttcn " FILES+="Osmocom_VTY_Functions.ttcn " gen_links $DIR $FILES diff --git a/library/DIAMETER_Templates.ttcn b/library/DIAMETER_Templates.ttcn index 05b63d2..82a433c 100644 --- a/library/DIAMETER_Templates.ttcn +++ b/library/DIAMETER_Templates.ttcn @@ -102,10 +102,9 @@ DIAMETER_ERROR_EAP_CODE_UNKNOWN (5048) }; -/* Gy : 3GPP TS 32.299 7.1.6, RFC4006 3.1 */ +/* RFC4006 3.1 */ const uint32_t c_DIAMETER_CREDIT_CONTROL_AID := 4; -const uint32_t c_DIAMETER_3GPP_Gx_AID := 16777238; const uint32_t c_DIAMETER_3GPP_S7_AID := 16777308; const octetstring c_def_sess_id := char2oct("ttcn3.session"); @@ -1215,142 +1214,6 @@ return diam_pdu; } -/* RFC 4006 3.1. Credit-Control-Request (CCR) Command */ -template (present) PDU_DIAMETER -tr_DIA_Gx_CCR(template (present) DCC_NONE_CC_Request_Type req_type := INITIAL_REQUEST) -:= tr_DIAMETER(flags:='11000000'B, cmd_code:=Credit_Control, - avps := superset( - tr_AVP_SessionId, - tr_AVP_OriginHost, - tr_AVP_OriginRealm, - tr_AVP_DestinationRealm, - tr_AVP_AuthAppId(int2oct(c_DIAMETER_3GPP_Gx_AID, 4)), - tr_AVP_CcReqType(req_type), - tr_AVP_CcReqNum(?) - )); -template (present) PDU_DIAMETER -tr_DIA_Gy_CCR(template (present) DCC_NONE_CC_Request_Type req_type := INITIAL_REQUEST) -:= tr_DIAMETER(flags:='11000000'B, cmd_code:=Credit_Control, - avps := superset( - tr_AVP_SessionId, - tr_AVP_OriginHost, - tr_AVP_OriginRealm, - tr_AVP_DestinationRealm, - tr_AVP_AuthAppId(int2oct(c_DIAMETER_CREDIT_CONTROL_AID, 4)), - tr_AVP_CcReqType(req_type), - tr_AVP_CcReqNum(?) - )); - - - -/* RFC 4006 3.2. Credit-Control-Answer (CCA) Command */ -template (value) PDU_DIAMETER -ts_DIA_Gx_CCA(template (value) UINT32 hbh_id, template (value) UINT32 ete_id, - template (value) octetstring sess_id, - template (value) DCC_NONE_CC_Request_Type req_type, - template (value) AVP_Unsigned32 req_num) -:= ts_DIAMETER(flags:='01000000'B, cmd_code:=Credit_Control, - app_id:=int2oct(c_DIAMETER_3GPP_Gx_AID, 4), hbh_id:=hbh_id, ete_id:=ete_id, - avps := { - ts_AVP_SessionId(sess_id), - ts_AVP_ResultCode(DIAMETER_SUCCESS), - ts_AVP_OriginHost("pcrf.localdomain"), - ts_AVP_OriginRealm("localdomain"), - ts_AVP_AuthAppId(int2oct(c_DIAMETER_3GPP_Gx_AID, 4)), - ts_AVP_CcReqType(req_type), - ts_AVP_CcReqNum(req_num), - ts_AVP_PCC_3GPP_QoS_Information({ - ts_AVP_PCC_3GPP_APN_Aggregate_Max_Bitrate_UL(33554432), - ts_AVP_PCC_3GPP_APN_Aggregate_Max_Bitrate_DL(52428800) - }), - ts_AVP_PCC_3GPP_Default_EPS_Bearer_QoS({ - ts_AVP_PCC_3GPP_QoS_Class_Identifier(9), - ts_AVP_PCC_3GPP_AllocRetenPrio(2) - }) - // supported features - // origin - }); -template (value) PDU_DIAMETER -ts_DIA_Gy_CCA(template (value) UINT32 hbh_id, template (value) UINT32 ete_id, - template (value) octetstring sess_id, - template (value) DCC_NONE_CC_Request_Type req_type, - template (value) AVP_Unsigned32 req_num) -:= ts_DIAMETER(flags:='01000000'B, cmd_code:=Credit_Control, - app_id:=int2oct(c_DIAMETER_CREDIT_CONTROL_AID, 4), hbh_id:=hbh_id, ete_id:=ete_id, - avps := { - ts_AVP_SessionId(sess_id), - ts_AVP_ResultCode(DIAMETER_SUCCESS), - ts_AVP_OriginHost("ocs.localdomain"), - ts_AVP_OriginRealm("localdomain"), - ts_AVP_AuthAppId(int2oct(c_DIAMETER_CREDIT_CONTROL_AID, 4)), - ts_AVP_CcReqType(req_type), - ts_AVP_CcReqNum(req_num)//, - // qos - // default eps bearer qos - // supported features - // origin - }); -/* Same as ts_DIA_Gy_CCA, but with extra AVP to grant access for limited amount of seconds */ -template (value) PDU_DIAMETER -ts_DIA_Gy_CCA_ValidityTime(template (value) UINT32 hbh_id, template (value) UINT32 ete_id, - template (value) octetstring sess_id, - template (value) DCC_NONE_CC_Request_Type req_type, - template (value) AVP_Unsigned32 req_num, - uint32_t validity_time) -:= ts_DIAMETER(flags:='01000000'B, cmd_code:=Credit_Control, - app_id:=int2oct(c_DIAMETER_CREDIT_CONTROL_AID, 4), hbh_id:=hbh_id, ete_id:=ete_id, - avps := { - ts_AVP_SessionId(sess_id), - ts_AVP_ResultCode(DIAMETER_SUCCESS), - ts_AVP_OriginHost("ocs.localdomain"), - ts_AVP_OriginRealm("localdomain"), - ts_AVP_AuthAppId(int2oct(c_DIAMETER_CREDIT_CONTROL_AID, 4)), - ts_AVP_CcReqType(req_type), - ts_AVP_CcReqNum(req_num), - ts_AVP_Multiple_Services_Credit_Control({ - ts_AVP_Validity_Time(validity_time), - ts_AVP_Granted_Service_Unit({ - //ts_AVP_CC_Time(validity_time*2), - ts_AVP_CC_Total_Octets(1000) - }) - }) - //, - // qos - // default eps bearer qos - // supported features - // origin - }); -/* Same as ts_DIA_Gy_CCA_ValidityTime, but with extra AVP to grant access for limited amount of octets */ -template (value) PDU_DIAMETER -ts_DIA_Gy_CCA_ValidityTimeVolumeThreshold(template (value) UINT32 hbh_id, template (value) UINT32 ete_id, - template (value) octetstring sess_id, - template (value) DCC_NONE_CC_Request_Type req_type, - template (value) AVP_Unsigned32 req_num, - uint32_t validity_time, uint32_t volume_threhsold) -:= ts_DIAMETER(flags:='01000000'B, cmd_code:=Credit_Control, - app_id:=int2oct(c_DIAMETER_CREDIT_CONTROL_AID, 4), hbh_id:=hbh_id, ete_id:=ete_id, - avps := { - ts_AVP_SessionId(sess_id), - ts_AVP_ResultCode(DIAMETER_SUCCESS), - ts_AVP_OriginHost("ocs.localdomain"), - ts_AVP_OriginRealm("localdomain"), - ts_AVP_AuthAppId(int2oct(c_DIAMETER_CREDIT_CONTROL_AID, 4)), - ts_AVP_CcReqType(req_type), - ts_AVP_CcReqNum(req_num), - ts_AVP_Multiple_Services_Credit_Control({ - ts_AVP_Validity_Time(validity_time), - ts_AVP_Granted_Service_Unit({ - ts_AVP_CC_Total_Octets(volume_threhsold*100) - }), - ts_AVP_3GPP_VolumeQuotaThreshold(volume_threhsold) - }) - //, - // qos - // default eps bearer qos - // supported features - // origin - }); - /* RFC 6733, section 5.5.1 "Device-Watchdog-Request" */ template (value) PDU_DIAMETER ts_DIA_DWR(template (value) OCTET4 state_id := '00000000'O, @@ -1477,53 +1340,6 @@ return valueof(avp); } -function f_validate_gy_cc_report(PDU_DIAMETER rx_dia, template (present) DCA_3GPP_Reporting_Reason repreason_exp := ?, - template (present) integer cc_time_exp := ?, - template (present) integer cc_in_oct_exp := ?, - template (present) integer cc_out_oct_exp := ?) -{ - var AVP multi_services_cc, used_service_unit; - var AVP_Grouped multi_services_cc_data, used_service_unit_data; - var template (omit) AVP repreason_tpl; - var AVP repreason, cc_time, cc_in_oct, cc_out_oct; - - multi_services_cc := f_DIAMETER_get_avp_or_fail(rx_dia, c_AVP_Code_DCC_NONE_Multiple_Services_Credit_Control); - multi_services_cc_data := valueof(multi_services_cc.avp_data.avp_DCC_NONE_Multiple_Services_Credit_Control); - - used_service_unit := f_AVP_Grouped_get_avp_or_fail(multi_services_cc_data, c_AVP_Code_DCC_NONE_Used_Service_Unit); - used_service_unit_data := valueof(used_service_unit.avp_data.avp_DCC_NONE_Used_Service_Unit); - - /* Reporting-Reason can be either inside Multiple-Services-Credit-Control or inside Used-Service-Unit */ - repreason_tpl := f_AVP_Grouped_get_avp(multi_services_cc_data, c_AVP_Code_DCA_3GPP_Reporting_Reason); - if (istemplatekind(repreason_tpl, "omit")) { - repreason := f_AVP_Grouped_get_avp_or_fail(used_service_unit_data, c_AVP_Code_DCA_3GPP_Reporting_Reason); - } else { - repreason := valueof(repreason_tpl); - } - if (not match(repreason.avp_data.avp_DCA_3GPP_Reporting_Reason, repreason_exp)) { - Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, - log2str("3GPP-Reporting-Reason mismatch ", repreason, " vs exp ", repreason_exp)); - } - - cc_time := f_AVP_Grouped_get_avp_or_fail(used_service_unit_data, c_AVP_Code_DCC_NONE_CC_Time); - if (not match(oct2int(cc_time.avp_data.avp_DCC_NONE_CC_Time), cc_time_exp)) { - Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, - log2str("3GPP-CC-Time mismatch ", cc_time, " vs exp ", cc_time_exp)); - } - - cc_in_oct := f_AVP_Grouped_get_avp_or_fail(used_service_unit_data, c_AVP_Code_DCC_NONE_CC_Input_Octets); - if (not match(oct2int(cc_in_oct.avp_data.avp_DCC_NONE_CC_Input_Octets), cc_in_oct_exp)) { - Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, - log2str("3GPP-CC-Input-Octets mismatch ", cc_in_oct, " vs exp ", cc_in_oct_exp)); - } - - cc_out_oct := f_AVP_Grouped_get_avp_or_fail(used_service_unit_data, c_AVP_Code_DCC_NONE_CC_Output_Octets); - if (not match(oct2int(cc_out_oct.avp_data.avp_DCC_NONE_CC_Output_Octets), cc_out_oct_exp)) { - Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, - log2str("3GPP-CC-Output-Octets mismatch ", cc_out_oct, " vs exp ", cc_out_oct_exp)); - } -} - /***************************** * Cx, Dx, 3GPP TS 29.229 diff --git a/library/DIAMETER_ts29_212_Templates.ttcn b/library/DIAMETER_ts29_212_Templates.ttcn new file mode 100644 index 0000000..209ac10 --- /dev/null +++ b/library/DIAMETER_ts29_212_Templates.ttcn @@ -0,0 +1,69 @@ +module DIAMETER_ts29_212_Templates { + +/* (C) 2023 by sysmocom s.f.m.c. GmbH <info(a)sysmocom.de + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Templates for AVPs and messages for TS 29.212 + */ + +import from General_Types all; +import from DIAMETER_Types all; +import from DIAMETER_Templates all; +import from Osmocom_Types all; +import from Misc_Helpers all; + +/******************************* + * S6a 3GPP TS 29.212 section 7 + *******************************/ + +/* 3GPP TS 29.212 Section 5.1 */ +const uint32_t c_DIAMETER_3GPP_Gx_AID := 16777238; + +/* 3GPP TS 29.212 5.6.2 Credit-Control-Request (CC-Request, CCR) Command */ +template (present) PDU_DIAMETER +tr_DIA_Gx_CCR(template (present) DCC_NONE_CC_Request_Type req_type := INITIAL_REQUEST) +:= tr_DIAMETER(flags:='11000000'B, cmd_code:=Credit_Control, + avps := superset( + tr_AVP_SessionId, + tr_AVP_OriginHost, + tr_AVP_OriginRealm, + tr_AVP_DestinationRealm, + tr_AVP_AuthAppId(int2oct(c_DIAMETER_3GPP_Gx_AID, 4)), + tr_AVP_CcReqType(req_type), + tr_AVP_CcReqNum(?) + )); + +/* 3GPP TS 29.212 5.6.3 Credit-Control-Answer (CC-Answer, CCA) Command */ +template (value) PDU_DIAMETER +ts_DIA_Gx_CCA(template (value) UINT32 hbh_id, template (value) UINT32 ete_id, + template (value) octetstring sess_id, + template (value) DCC_NONE_CC_Request_Type req_type, + template (value) AVP_Unsigned32 req_num) +:= ts_DIAMETER(flags:='01000000'B, cmd_code:=Credit_Control, + app_id:=int2oct(c_DIAMETER_3GPP_Gx_AID, 4), hbh_id:=hbh_id, ete_id:=ete_id, + avps := { + ts_AVP_SessionId(sess_id), + ts_AVP_ResultCode(DIAMETER_SUCCESS), + ts_AVP_OriginHost("pcrf.localdomain"), + ts_AVP_OriginRealm("localdomain"), + ts_AVP_AuthAppId(int2oct(c_DIAMETER_3GPP_Gx_AID, 4)), + ts_AVP_CcReqType(req_type), + ts_AVP_CcReqNum(req_num), + ts_AVP_PCC_3GPP_QoS_Information({ + ts_AVP_PCC_3GPP_APN_Aggregate_Max_Bitrate_UL(33554432), + ts_AVP_PCC_3GPP_APN_Aggregate_Max_Bitrate_DL(52428800) + }), + ts_AVP_PCC_3GPP_Default_EPS_Bearer_QoS({ + ts_AVP_PCC_3GPP_QoS_Class_Identifier(9), + ts_AVP_PCC_3GPP_AllocRetenPrio(2) + }) + // supported features + // origin + }); + +} /* module */ diff --git a/library/DIAMETER_ts32_299_Templates.ttcn b/library/DIAMETER_ts32_299_Templates.ttcn new file mode 100644 index 0000000..af8f514 --- /dev/null +++ b/library/DIAMETER_ts32_299_Templates.ttcn @@ -0,0 +1,169 @@ +module DIAMETER_ts32_299_Templates { + +/* (C) 2023 by sysmocom s.f.m.c. GmbH <info(a)sysmocom.de + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Templates for AVPs and messages for TS 32.299 + */ + +import from General_Types all; +import from DIAMETER_Types all; +import from DIAMETER_Templates all; +import from Osmocom_Types all; +import from Misc_Helpers all; + +/******************************* + * S6a 3GPP TS 32.299 section 7 + *******************************/ + +/* Gy AID : 3GPP TS 32.299 7.1.6, RFC4006 3.1: c_DIAMETER_CREDIT_CONTROL_AID */ + +/* 3GPP TS 32.299 6.4.2 Credit-Control-Request */ +template (present) PDU_DIAMETER +tr_DIA_Gy_CCR(template (present) DCC_NONE_CC_Request_Type req_type := INITIAL_REQUEST) +:= tr_DIAMETER(flags:='11000000'B, cmd_code:=Credit_Control, + avps := superset( + tr_AVP_SessionId, + tr_AVP_OriginHost, + tr_AVP_OriginRealm, + tr_AVP_DestinationRealm, + tr_AVP_AuthAppId(int2oct(c_DIAMETER_CREDIT_CONTROL_AID, 4)), + tr_AVP_CcReqType(req_type), + tr_AVP_CcReqNum(?) + )); + +/* 3GPP TS 32.299 6.4.3 Credit-Control-Answer message */ +template (value) PDU_DIAMETER +ts_DIA_Gy_CCA(template (value) UINT32 hbh_id, template (value) UINT32 ete_id, + template (value) octetstring sess_id, + template (value) DCC_NONE_CC_Request_Type req_type, + template (value) AVP_Unsigned32 req_num) +:= ts_DIAMETER(flags:='01000000'B, cmd_code:=Credit_Control, + app_id:=int2oct(c_DIAMETER_CREDIT_CONTROL_AID, 4), hbh_id:=hbh_id, ete_id:=ete_id, + avps := { + ts_AVP_SessionId(sess_id), + ts_AVP_ResultCode(DIAMETER_SUCCESS), + ts_AVP_OriginHost("ocs.localdomain"), + ts_AVP_OriginRealm("localdomain"), + ts_AVP_AuthAppId(int2oct(c_DIAMETER_CREDIT_CONTROL_AID, 4)), + ts_AVP_CcReqType(req_type), + ts_AVP_CcReqNum(req_num)//, + // qos + // default eps bearer qos + // supported features + // origin + }); +/* Same as ts_DIA_Gy_CCA, but with extra AVP to grant access for limited amount of seconds */ +template (value) PDU_DIAMETER +ts_DIA_Gy_CCA_ValidityTime(template (value) UINT32 hbh_id, template (value) UINT32 ete_id, + template (value) octetstring sess_id, + template (value) DCC_NONE_CC_Request_Type req_type, + template (value) AVP_Unsigned32 req_num, + uint32_t validity_time) +:= ts_DIAMETER(flags:='01000000'B, cmd_code:=Credit_Control, + app_id:=int2oct(c_DIAMETER_CREDIT_CONTROL_AID, 4), hbh_id:=hbh_id, ete_id:=ete_id, + avps := { + ts_AVP_SessionId(sess_id), + ts_AVP_ResultCode(DIAMETER_SUCCESS), + ts_AVP_OriginHost("ocs.localdomain"), + ts_AVP_OriginRealm("localdomain"), + ts_AVP_AuthAppId(int2oct(c_DIAMETER_CREDIT_CONTROL_AID, 4)), + ts_AVP_CcReqType(req_type), + ts_AVP_CcReqNum(req_num), + ts_AVP_Multiple_Services_Credit_Control({ + ts_AVP_Validity_Time(validity_time), + ts_AVP_Granted_Service_Unit({ + //ts_AVP_CC_Time(validity_time*2), + ts_AVP_CC_Total_Octets(1000) + }) + }) + //, + // qos + // default eps bearer qos + // supported features + // origin + }); +/* Same as ts_DIA_Gy_CCA_ValidityTime, but with extra AVP to grant access for limited amount of octets */ +template (value) PDU_DIAMETER +ts_DIA_Gy_CCA_ValidityTimeVolumeThreshold(template (value) UINT32 hbh_id, template (value) UINT32 ete_id, + template (value) octetstring sess_id, + template (value) DCC_NONE_CC_Request_Type req_type, + template (value) AVP_Unsigned32 req_num, + uint32_t validity_time, uint32_t volume_threhsold) +:= ts_DIAMETER(flags:='01000000'B, cmd_code:=Credit_Control, + app_id:=int2oct(c_DIAMETER_CREDIT_CONTROL_AID, 4), hbh_id:=hbh_id, ete_id:=ete_id, + avps := { + ts_AVP_SessionId(sess_id), + ts_AVP_ResultCode(DIAMETER_SUCCESS), + ts_AVP_OriginHost("ocs.localdomain"), + ts_AVP_OriginRealm("localdomain"), + ts_AVP_AuthAppId(int2oct(c_DIAMETER_CREDIT_CONTROL_AID, 4)), + ts_AVP_CcReqType(req_type), + ts_AVP_CcReqNum(req_num), + ts_AVP_Multiple_Services_Credit_Control({ + ts_AVP_Validity_Time(validity_time), + ts_AVP_Granted_Service_Unit({ + ts_AVP_CC_Total_Octets(volume_threhsold*100) + }), + ts_AVP_3GPP_VolumeQuotaThreshold(volume_threhsold) + }) + //, + // qos + // default eps bearer qos + // supported features + // origin + }); + +function f_validate_gy_cc_report(PDU_DIAMETER rx_dia, template (present) DCA_3GPP_Reporting_Reason repreason_exp := ?, + template (present) integer cc_time_exp := ?, + template (present) integer cc_in_oct_exp := ?, + template (present) integer cc_out_oct_exp := ?) +{ + var AVP multi_services_cc, used_service_unit; + var AVP_Grouped multi_services_cc_data, used_service_unit_data; + var template (omit) AVP repreason_tpl; + var AVP repreason, cc_time, cc_in_oct, cc_out_oct; + + multi_services_cc := f_DIAMETER_get_avp_or_fail(rx_dia, c_AVP_Code_DCC_NONE_Multiple_Services_Credit_Control); + multi_services_cc_data := valueof(multi_services_cc.avp_data.avp_DCC_NONE_Multiple_Services_Credit_Control); + + used_service_unit := f_AVP_Grouped_get_avp_or_fail(multi_services_cc_data, c_AVP_Code_DCC_NONE_Used_Service_Unit); + used_service_unit_data := valueof(used_service_unit.avp_data.avp_DCC_NONE_Used_Service_Unit); + + /* Reporting-Reason can be either inside Multiple-Services-Credit-Control or inside Used-Service-Unit */ + repreason_tpl := f_AVP_Grouped_get_avp(multi_services_cc_data, c_AVP_Code_DCA_3GPP_Reporting_Reason); + if (istemplatekind(repreason_tpl, "omit")) { + repreason := f_AVP_Grouped_get_avp_or_fail(used_service_unit_data, c_AVP_Code_DCA_3GPP_Reporting_Reason); + } else { + repreason := valueof(repreason_tpl); + } + if (not match(repreason.avp_data.avp_DCA_3GPP_Reporting_Reason, repreason_exp)) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("3GPP-Reporting-Reason mismatch ", repreason, " vs exp ", repreason_exp)); + } + + cc_time := f_AVP_Grouped_get_avp_or_fail(used_service_unit_data, c_AVP_Code_DCC_NONE_CC_Time); + if (not match(oct2int(cc_time.avp_data.avp_DCC_NONE_CC_Time), cc_time_exp)) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("3GPP-CC-Time mismatch ", cc_time, " vs exp ", cc_time_exp)); + } + + cc_in_oct := f_AVP_Grouped_get_avp_or_fail(used_service_unit_data, c_AVP_Code_DCC_NONE_CC_Input_Octets); + if (not match(oct2int(cc_in_oct.avp_data.avp_DCC_NONE_CC_Input_Octets), cc_in_oct_exp)) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("3GPP-CC-Input-Octets mismatch ", cc_in_oct, " vs exp ", cc_in_oct_exp)); + } + + cc_out_oct := f_AVP_Grouped_get_avp_or_fail(used_service_unit_data, c_AVP_Code_DCC_NONE_CC_Output_Octets); + if (not match(oct2int(cc_out_oct.avp_data.avp_DCC_NONE_CC_Output_Octets), cc_out_oct_exp)) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("3GPP-CC-Output-Octets mismatch ", cc_out_oct, " vs exp ", cc_out_oct_exp)); + } +} + +} /* module */ diff --git a/pgw/PGW_Tests.ttcn b/pgw/PGW_Tests.ttcn index fa7be47..81fea12 100644 --- a/pgw/PGW_Tests.ttcn +++ b/pgw/PGW_Tests.ttcn @@ -18,7 +18,9 @@ import from DIAMETER_Types all; import from DIAMETER_Templates all; +import from DIAMETER_ts29_212_Templates all; import from DIAMETER_ts29_272_Templates all; +import from DIAMETER_ts32_299_Templates all; import from DIAMETER_Emulation all; diff --git a/pgw/gen_links.sh b/pgw/gen_links.sh index 0bf264a..9aebfc2 100755 --- a/pgw/gen_links.sh +++ b/pgw/gen_links.sh @@ -64,7 +64,7 @@ FILES+="GTPv2_CodecPort.ttcn GTPv2_CodecPort_CtrlFunctDef.cc GTPv2_CodecPort_CtrlFunct.ttcn GTPv2_Emulation.ttcn " FILES+="DNS_Helpers.ttcn " FILES+="DIAMETER_Types.ttcn DIAMETER_CodecPort.ttcn DIAMETER_CodecPort_CtrlFunct.ttcn DIAMETER_CodecPort_CtrlFunctDef.cc DIAMETER_Emulation.ttcn " -FILES+="DIAMETER_Templates.ttcn DIAMETER_ts29_272_Templates.ttcn " +FILES+="DIAMETER_Templates.ttcn DIAMETER_ts29_212_Templates.ttcn DIAMETER_ts29_272_Templates.ttcn DIAMETER_ts32_299_Templates.ttcn " gen_links $DIR $FILES ignore_pp_results -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35671?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ibe0d5f263813d5083e020c942283f214983162b4 Gerrit-Change-Number: 35671 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in libosmocore[master]: gsm: add more definitions from Table 10.5.112/3GPP TS 24.008
by laforge 25 Jan '24

25 Jan '24
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35680?usp=email ) Change subject: gsm: add more definitions from Table 10.5.112/3GPP TS 24.008 ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35680?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I25e40853ace09fa98b614f3893eeba600be8fcdc Gerrit-Change-Number: 35680 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Thu, 25 Jan 2024 12:26:48 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmocore[master]: tests/a5: fix bit-wise vs logical and in test_a5[34]()
by laforge 25 Jan '24

25 Jan '24
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35679?usp=email ) Change subject: tests/a5: fix bit-wise vs logical and in test_a5[34]() ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35679?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6ae0d13882ab7a6b1ca35ccd7f9a5e1d9cac911d Gerrit-Change-Number: 35679 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Thu, 25 Jan 2024 12:26:26 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmocore[master]: tests/sockaddr_str: comment out unused code (make clang happy)
by laforge 25 Jan '24

25 Jan '24
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35678?usp=email ) Change subject: tests/sockaddr_str: comment out unused code (make clang happy) ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35678?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I45e9044f80e1f634c811e729f4314ec9bcf6a9ad Gerrit-Change-Number: 35678 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Thu, 25 Jan 2024 12:26:03 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmocore[master]: tests/iuup: fix duplicate assignment in def_configure_req
by laforge 25 Jan '24

25 Jan '24
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35677?usp=email ) Change subject: tests/iuup: fix duplicate assignment in def_configure_req ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35677?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id29237d212a05dec1c57bbfd53d9cb7e71ca0991 Gerrit-Change-Number: 35677 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Thu, 25 Jan 2024 12:25:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in ...osmo-epdg[master]: Use call() instead of cast() in ue_fsm
by laforge 25 Jan '24

25 Jan '24
Attention is currently required from: pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35675?usp=email ) Change subject: Use call() instead of cast() in ue_fsm ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35675?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: erlang/osmo-epdg Gerrit-Branch: master Gerrit-Change-Id: I235d3c8fb3a863d288b5433c39e0da65f747936b Gerrit-Change-Number: 35675 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 25 Jan 2024 12:24:12 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in ...osmo-epdg[master]: gsup_server: Introduce tx_gsup() internal function
by laforge 25 Jan '24

25 Jan '24
Attention is currently required from: pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35674?usp=email ) Change subject: gsup_server: Introduce tx_gsup() internal function ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35674?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: erlang/osmo-epdg Gerrit-Branch: master Gerrit-Change-Id: I95d37182da89e39993eb7d5aaf63446e5f99ae2a Gerrit-Change-Number: 35674 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 25 Jan 2024 12:23:20 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in ...osmo-epdg[master]: gsup_server: Use new GSUP Cause defines from osmo_gsup
by laforge 25 Jan '24

25 Jan '24
Attention is currently required from: pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35673?usp=email ) Change subject: gsup_server: Use new GSUP Cause defines from osmo_gsup ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35673?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: erlang/osmo-epdg Gerrit-Branch: master Gerrit-Change-Id: Ie19a0d0b81e0a264401ea37e0cfd74802aee68fe Gerrit-Change-Number: 35673 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 25 Jan 2024 12:22:58 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-hnbgw[master]: pfcp: implement sending Network Instance IEs
by laforge 25 Jan '24

25 Jan '24
Attention is currently required from: fixeria, neels, pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/35645?usp=email ) Change subject: pfcp: implement sending Network Instance IEs ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/35645?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: Ief53dbfacf1645c32a07847d590c4884d4c8ca56 Gerrit-Change-Number: 35645 Gerrit-PatchSet: 3 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Thu, 25 Jan 2024 12:21:43 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • ...
  • 156
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.