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-ttcn3-hacks[master]: DIAMETER_ts29_272_Templates: Add missing templates for CLR and CLA me...
by pespin 02 Jan '24

02 Jan '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35407?usp=email ) Change subject: DIAMETER_ts29_272_Templates: Add missing templates for CLR and CLA messages ...................................................................... DIAMETER_ts29_272_Templates: Add missing templates for CLR and CLA messages Change-Id: I9366b434e856828c5d441cbc7b0d952060cdc71b --- M library/DIAMETER_ts29_272_Templates.ttcn 1 file changed, 69 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/library/DIAMETER_ts29_272_Templates.ttcn b/library/DIAMETER_ts29_272_Templates.ttcn index 443e372..d3c7a95 100644 --- a/library/DIAMETER_ts29_272_Templates.ttcn +++ b/library/DIAMETER_ts29_272_Templates.ttcn @@ -301,6 +301,16 @@ } } +/* TS 29.272 7.3.24 Cancellation-Type */ +template (value) GenericAVP ts_AVP_3GPP_CancellationType(template (value) AAA_3GPP_Cancellation_Type t) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Cancellation_Type), + avp_data := { + avp_AAA_3GPP_Cancellation_Type := t + } + } +} + /* TS 29.272 7.3.34 APN-Configuration-Profile */ template (present) GenericAVP tr_AVP_3GPP_ApnConfigProfile(template (present) AVP_list content := ?) := { avp := { @@ -629,4 +639,53 @@ tr_AVP_3GPP_VisitedPlmnId )); -} +/* TS 29.272 7.2.7 Cancel-Location-Request */ +template (value) PDU_DIAMETER +ts_DIA_CLR(/* template (value) */ hexstring imsi, + template (value) AAA_3GPP_Cancellation_Type cancel_type, + template (value) octetstring sess_id := c_def_sess_id, + template (value) charstring orig_host := "ttcn3.localdomain", + template (value) charstring orig_realm := "localdomain", + template (value) charstring dest_host := "iut.localdomain", + template (value) charstring dest_realm := "localdomain", + template (value) UINT32 hbh_id := '00000000'O, + template (value) UINT32 ete_id := '00000000'O) := + ts_DIAMETER(flags := '11000000'B, + cmd_code := Cancel_Location, + app_id := int2oct(c_DIAMETER_3GPP_S6_AID, 4), + hbh_id := hbh_id, + ete_id := ete_id, + avps := { + ts_AVP_SessionId(sess_id), + ts_AVP_AuthSessionState(NO_STATE_MAINTAINED), + ts_AVP_OriginHost(orig_host), + ts_AVP_OriginRealm(orig_realm), + ts_AVP_DestinationHost(dest_host), + ts_AVP_DestinationRealm(dest_realm), + ts_AVP_UserNameImsi(imsi), + /* [Supported-Features ] */ + ts_AVP_3GPP_CancellationType(cancel_type) + }); + +/* TS 29.272 7.2.8 Cancel-Location-Answer */ +template (present) PDU_DIAMETER +tr_DIA_CLA(template (present) AVP_list sub_data := ?, + template (present) octetstring sess_id := ?, + template (present) charstring orig_host := ?, + template (present) charstring orig_realm := ?, + template (present) UINT32 hbh_id := ?, + template (present) UINT32 ete_id := ?) := + tr_DIAMETER(flags := '0???????'B, + cmd_code := Cancel_Location, + app_id := int2oct(c_DIAMETER_3GPP_S6_AID, 4), + hbh_id := hbh_id, + ete_id := ete_id, + avps := superset( + tr_AVP_SessionId(sess_id), + tr_AVP_ResultCode(DIAMETER_SUCCESS), + tr_AVP_AuthSessionState, + tr_AVP_OriginHost(orig_host), + tr_AVP_OriginRealm(orig_realm) + )); + +} /* module */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35407?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: I9366b434e856828c5d441cbc7b0d952060cdc71b Gerrit-Change-Number: 35407 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: DIAMETER_Templates: Add missing ts_AVP_DestinationHost
by pespin 02 Jan '24

02 Jan '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35406?usp=email ) Change subject: DIAMETER_Templates: Add missing ts_AVP_DestinationHost ...................................................................... DIAMETER_Templates: Add missing ts_AVP_DestinationHost Change-Id: Ifcbd68c48b273fe7b0753c5b31c33d4e51493de9 --- M library/DIAMETER_Templates.ttcn 1 file changed, 17 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/library/DIAMETER_Templates.ttcn b/library/DIAMETER_Templates.ttcn index 05a6ea7..05b63d2 100644 --- a/library/DIAMETER_Templates.ttcn +++ b/library/DIAMETER_Templates.ttcn @@ -601,6 +601,14 @@ } } +template (value) GenericAVP ts_AVP_DestinationHost(template (value) charstring dest_host) := { + avp := { + avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Destination_Host), + avp_data := { + avp_BASE_NONE_Destination_Host := dest_host + } + } +} template (present) GenericAVP tr_AVP_DestinationHost(template (present) charstring host := ?) := { avp := { avp_header := tr_DIA_Hdr(c_AVP_Code_BASE_NONE_Destination_Host), -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35406?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: Ifcbd68c48b273fe7b0753c5b31c33d4e51493de9 Gerrit-Change-Number: 35406 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[XL] Change in osmo-ttcn3-hacks[master]: Split Diameter TS 29.272 templates into its own file
by pespin 02 Jan '24

02 Jan '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35405?usp=email ) Change subject: Split Diameter TS 29.272 templates into its own file ...................................................................... Split Diameter TS 29.272 templates into its own file This allows more easily finding, understanding and using the tons of templates coming from different specs. Change-Id: I2e6b813a9e4ff98eef575aaaf46dbcf9f1a5d2d4 --- M dia2gsup/DIA2GSUP_Tests.ttcn M dia2gsup/gen_links.sh M ggsn_tests/GGSN_Tests.ttcn M ggsn_tests/gen_links.sh M hss/HSS_Tests.ttcn M hss/gen_links.sh M library/DIAMETER_Templates.ttcn A library/DIAMETER_ts29_272_Templates.ttcn M mme/MME_Tests.ttcn M mme/gen_links.sh M pgw/PGW_Tests.ttcn M pgw/gen_links.sh 12 files changed, 660 insertions(+), 616 deletions(-) Approvals: osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/dia2gsup/DIA2GSUP_Tests.ttcn b/dia2gsup/DIA2GSUP_Tests.ttcn index e12f17b..6e59460 100644 --- a/dia2gsup/DIA2GSUP_Tests.ttcn +++ b/dia2gsup/DIA2GSUP_Tests.ttcn @@ -11,6 +11,7 @@ import from DIAMETER_Types all; import from DIAMETER_Templates all; +import from DIAMETER_ts29_272_Templates all; import from DIAMETER_Emulation all; type component MTC_CT { diff --git a/dia2gsup/gen_links.sh b/dia2gsup/gen_links.sh index d0002eb..52939f6 100755 --- a/dia2gsup/gen_links.sh +++ b/dia2gsup/gen_links.sh @@ -36,7 +36,8 @@ FILES="Misc_Helpers.ttcn General_Types.ttcn GSM_Types.ttcn Osmocom_Types.ttcn Native_Functions.ttcn Native_FunctionDefs.cc " FILES+="Osmocom_CTRL_Types.ttcn " FILES+="L3_Common.ttcn " -FILES+="DIAMETER_Types.ttcn DIAMETER_CodecPort.ttcn DIAMETER_CodecPort_CtrlFunct.ttcn DIAMETER_CodecPort_CtrlFunctDef.cc DIAMETER_Emulation.ttcn DIAMETER_Templates.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+="IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp " FILES+="GSUP_Types.ttcn GSUP_Emulation.ttcn " diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn index 435f71d..a1aab9b 100644 --- a/ggsn_tests/GGSN_Tests.ttcn +++ b/ggsn_tests/GGSN_Tests.ttcn @@ -34,6 +34,7 @@ import from DIAMETER_Types all; import from DIAMETER_Templates all; + import from DIAMETER_ts29_272_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 c30e3da..b51620e 100755 --- a/ggsn_tests/gen_links.sh +++ b/ggsn_tests/gen_links.sh @@ -60,7 +60,8 @@ DIR=../library 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 DIAMETER_Templates.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+="Osmocom_VTY_Functions.ttcn " gen_links $DIR $FILES diff --git a/hss/HSS_Tests.ttcn b/hss/HSS_Tests.ttcn index bd493c4..a5503a7 100644 --- a/hss/HSS_Tests.ttcn +++ b/hss/HSS_Tests.ttcn @@ -7,6 +7,7 @@ import from DIAMETER_Types all; import from DIAMETER_Templates all; +import from DIAMETER_ts29_272_Templates all; import from DIAMETER_Emulation all; type record of hexstring SubscriberConfigs; diff --git a/hss/gen_links.sh b/hss/gen_links.sh index b97d53f..7160832 100755 --- a/hss/gen_links.sh +++ b/hss/gen_links.sh @@ -23,7 +23,8 @@ DIR=../library FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn Native_Functions.ttcn Native_FunctionDefs.cc " -FILES+="DIAMETER_Types.ttcn DIAMETER_CodecPort.ttcn DIAMETER_CodecPort_CtrlFunct.ttcn DIAMETER_CodecPort_CtrlFunctDef.cc DIAMETER_Emulation.ttcn DIAMETER_Templates.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 " gen_links $DIR $FILES ignore_pp_results diff --git a/library/DIAMETER_Templates.ttcn b/library/DIAMETER_Templates.ttcn index 9a3e739..05a6ea7 100644 --- a/library/DIAMETER_Templates.ttcn +++ b/library/DIAMETER_Templates.ttcn @@ -102,28 +102,10 @@ DIAMETER_ERROR_EAP_CODE_UNKNOWN (5048) }; -/* 3GPP TS 29.272 section 7.4. Errors in Experimental-Result-Code */ -type enumerated DIAMETER_ExperimentalResultcode { - /* transient */ - DIAMETER_AUTHENTICATION_DATA_UNAVAILABLE (4181), - DIAMETER_ERROR_CAMEL_SUBSCRIPTION_PRESENT (4182), - /* permanent */ - DIAMETER_ERROR_USER_UNKNOWN (5001), - DIAMETER_AUTHORIZATION_REJECTED (5003), - DIAMETER_ERROR_ROAMING_NOT_ALLOWED (5004), - DIAMETER_MISSING_AVP (5005), - DIAMETER_ERROR_UNKNOWN_EPS_SUBSCRIPTION (5420), - DIAMETER_ERROR_RAT_NOT_ALLOWED (5421), - DIAMETER_ERROR_EQUIPMENT_UNKNOWN (5422), - DIAMETER_ERROR_UNKOWN_SERVING_NODE (5423) -} - /* Gy : 3GPP TS 32.299 7.1.6, RFC4006 3.1 */ const uint32_t c_DIAMETER_CREDIT_CONTROL_AID := 4; -/* 3GPP TS 29.272 Section 7.1.8 */ + const uint32_t c_DIAMETER_3GPP_Gx_AID := 16777238; -const uint32_t c_DIAMETER_3GPP_S6_AID := 16777251; -const uint32_t c_DIAMETER_3GPP_S13_AID := 16777252; const uint32_t c_DIAMETER_3GPP_S7_AID := 16777308; const octetstring c_def_sess_id := char2oct("ttcn3.session"); @@ -667,196 +649,6 @@ template (present) GenericAVP tr_AVP_UserNameImsi(template (present) hexstring imsi := ?) := tr_AVP_UserName(char2oct_tmpl(hex2str_tmpl(imsi))); - -/* TS 29.272 7.3.53 RAND */ -template (value) GenericAVP ts_AVP_RAND(template (value) octetstring rand) := { - avp := { - avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_RAND), - avp_data := { - avp_AAA_3GPP_RAND := rand - } - } -} - -/* TS 29.272 7.3.54 XRES */ -template (value) GenericAVP ts_AVP_XRES(template (value) octetstring xres) := { - avp := { - avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_XRES), - avp_data := { - avp_AAA_3GPP_XRES := xres - } - } -} - -/* TS 29.272 7.3.55 XRES */ -template (value) GenericAVP ts_AVP_AUTN(template (value) octetstring autn) := { - avp := { - avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_AUTN), - avp_data := { - avp_AAA_3GPP_AUTN := autn - } - } -} - -/* TS 29.272 7.3.56 KASME */ -template (value) GenericAVP ts_AVP_KASME(template (value) octetstring kasme) := { - avp := { - avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_KASME), - avp_data := { - avp_AAA_3GPP_KASME := kasme - } - } -} - -/* TS 29.272 7.3.23 Item-Number */ -template (value) GenericAVP ts_AVP_ItemNumber(uint32_t num) := { - avp := { - avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_KASME), - avp_data := { - avp_AAA_3GPP_Item_Number := int2oct(num, 4) - } - } -} - -/* TS 29.272 7.3.18 E-UTRAN Vector */ -template (value) GenericAVP ts_AVP_EutranVec(uint32_t item_num, octetstring rand, octetstring xres, - octetstring autn, octetstring kasme) := { - avp := { - avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_E_UTRAN_Vector), - avp_data := { - avp_AAA_3GPP_E_UTRAN_Vector := { - ts_AVP_ItemNumber(item_num), - ts_AVP_RAND(rand), - ts_AVP_XRES(xres), - ts_AVP_AUTN(autn), - ts_AVP_KASME(kasme) - } - } - } -} - -/* TS 29.272 7.3.2 Subscription-Data */ -template (value) GenericAVP ts_AVP_3GPP_SubscriptionData(template (value) AVP_list content) := { - avp := { - avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Subscription_Data), - avp_data := { - avp_AAA_3GPP_Subscription_Data := content - } - } -} -template (present) GenericAVP -tr_AVP_3GPP_SubscriptionData(template (present) AVP_list content := ?) := { - avp := { - avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Subscription_Data), - avp_data := { - avp_AAA_3GPP_Subscription_Data := content - } - } -} - - -/* TS 29.272 7.3.17 Authentication-Info */ -template (value) GenericAVP ts_AVP_3GPP_AuthInfo(template (value) AVP_list content) := { - avp := { - avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Authentication_Info), - avp_data := { - avp_AAA_3GPP_Authentication_Info := content - } - } -} -template (present) GenericAVP -tr_AVP_3GPP_AuthInfo(template (present) AVP_list content := ?) := { - avp := { - avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Authentication_Info), - avp_data := { - avp_AAA_3GPP_Authentication_Info := content - } - } -} - -/* TS 29.272 7.3.9 Visited-PLMN-Id */ -template (value) GenericAVP ts_AVP_3GPP_VisitedPlmnId(template (value) octetstring id) := { - avp := { - avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Visited_PLMN_Id), - avp_data := { - avp_AAA_3GPP_Visited_PLMN_Id := id - } - } -} -template (present) GenericAVP tr_AVP_3GPP_VisitedPlmnId(template (present) octetstring id := ?) := { - avp := { - avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Visited_PLMN_Id), - avp_data := { - avp_AAA_3GPP_Visited_PLMN_Id := id - } - } -} - -/* TS 29.272 7.3.13 RAT-Type */ -template (value) GenericAVP ts_AVP_PCC_3GPP_RatType(template (value) PCC_3GPP_RAT_Type rat_type) := { - avp := { - avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_PCC_3GPP_RAT_Type), - avp_data := { - avp_PCC_3GPP_RAT_Type := rat_type - } - } -} -template (present) GenericAVP tr_AVP_PCC_3GPP_RatType(template (present) PCC_3GPP_RAT_Type rat_type := ?) := { - avp := { - avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_PCC_3GPP_RAT_Type), - avp_data := { - avp_PCC_3GPP_RAT_Type := rat_type - } - } -} - -template (present) GenericAVP tr_AVP_GI_3GPP_RatType(template (present) GI_3GPP_3GPP_RAT_Type rat_type := ?) := { - avp := { - avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_GI_3GPP_3GPP_RAT_Type), - avp_data := { - avp_GI_3GPP_3GPP_RAT_Type := rat_type - } - } -} - -/* TS 29.272 7.3.7 ULR-Flags */ -template (value) GenericAVP ts_AVP_3GPP_UlrFlags(template (value) UINT32 flags) := { - avp := { - avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_ULR_Flags), - avp_data := { - avp_AAA_3GPP_ULR_Flags := flags - } - } -} -template (present) GenericAVP tr_AVP_3GPP_UlrFlags(template (present) UINT32 flags := ?) := { - avp := { - avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_ULR_Flags), - avp_data := { - avp_AAA_3GPP_ULR_Flags := flags - } - } -} - -/* TS 29.272 7.3.8 ULA-Flags */ -template (value) GenericAVP ts_AVP_3GPP_UlaFlags(template (value) UINT32 flags) := { - avp := { - avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_ULA_Flags), - avp_data := { - avp_AAA_3GPP_ULA_Flags := flags - } - } -} -template (present) GenericAVP tr_AVP_3GPP_UlaFlags(template (present) UINT32 flags := ?) := { - avp := { - avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_ULA_Flags), - avp_data := { - avp_AAA_3GPP_ULA_Flags := flags - } - } -} - - - template (value) GenericAVP ts_AVP_NumOfReqVectors(template (value) UINT32 num_req := '00000004'O) := { avp := { avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Number_Of_Requested_Vectors), @@ -889,61 +681,6 @@ } } - -/* TS 29.272 7.3.27 Context-Identifier */ -template (present) GenericAVP tr_AVP_3GPP_ContextId(template (present) uint32_t ctx := ?) := { - avp := { - avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Context_Identifier), - avp_data := { - avp_AAA_3GPP_Context_Identifier := int2oct_tmpl(ctx, 4) - } - } -} -template (value) GenericAVP ts_AVP_3GPP_ContextId(uint32_t ctx) := { - avp := { - avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Context_Identifier), - avp_data := { - avp_AAA_3GPP_Context_Identifier := int2oct(ctx, 4) - } - } -} - -/* Ts 29.272 7.3.29 Subscriber-Status */ -template (present) GenericAVP tr_AVP_3GPP_SubscriberStatus(template (present) AAA_3GPP_Subscriber_Status sts) := { - avp := { - avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Subscriber_Status), - avp_data := { - avp_AAA_3GPP_Subscriber_Status := sts - } - } -} -template (value) GenericAVP ts_AVP_3GPP_SubscriberStatus(template (value) AAA_3GPP_Subscriber_Status sts) := { - avp := { - avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Subscriber_Status), - avp_data := { - avp_AAA_3GPP_Subscriber_Status := sts - } - } -} - -/* Ts 29.272 7.3.30 Operator-Determined-Barring */ -template (present) GenericAVP tr_AVP_3GPP_OperatorDeterminedBarring(template (present) uint32_t val := ?) := { - avp := { - avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Operator_Determined_Barring), - avp_data := { - avp_AAA_3GPP_Operator_Determined_Barring := int2oct_tmpl(val, 4) - } - } -} -template (value) GenericAVP ts_AVP_3GPP_OperatorDeterminedBarring(uint32_t val) := { - avp := { - avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Operator_Determined_Barring), - avp_data := { - avp_AAA_3GPP_Operator_Determined_Barring := int2oct(val, 4) - } - } -} - template (present) GenericAVP tr_AVP_3GPP_SubscrRauTauTmr(template (present) uint32_t tmr := ?) := { avp := { avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Subscribed_Periodic_RAU_TAU_Timer), @@ -962,73 +699,6 @@ } } -/* TS 29.272 7.3.33 All-APN-Configurations-Included-Indicator */ -template (present) GenericAVP tr_AVP_3GPP_AllApnConfigsIncl(template (present) AAA_3GPP_All_APN_Configurations_Included_Indicator ind := ?) := { - avp := { - avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_All_APN_Configurations_Included_Indicator), - avp_data := { - avp_AAA_3GPP_All_APN_Configurations_Included_Indicator := ind - } - } -} -template (value) GenericAVP ts_AVP_3GPP_AllApnConfigsIncl(template (value) AAA_3GPP_All_APN_Configurations_Included_Indicator ind := All_APN_CONFIGURATIONS_INCLUDED) := { - avp := { - avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_All_APN_Configurations_Included_Indicator), - avp_data := { - avp_AAA_3GPP_All_APN_Configurations_Included_Indicator := ind - } - } -} - -/* TS 29.272 7.3.34 APN-Configuration-Profile */ -template (present) GenericAVP tr_AVP_3GPP_ApnConfigProfile(template (present) AVP_list content := ?) := { - avp := { - avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_APN_Configuration_Profile), - avp_data := { - avp_AAA_3GPP_APN_Configuration_Profile := content - } - } -} -template (value) GenericAVP ts_AVP_3GPP_ApnConfigProfile(template (value) AVP_list content) := { - avp := { - avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_APN_Configuration_Profile), - avp_data := { - avp_AAA_3GPP_APN_Configuration_Profile := content - } - } -} - -/* TS 29.272 7.3.35 APN-Configuration */ -template (present) GenericAVP tr_AVP_3GPP_ApnConfig(template (present) uint32_t ctx := ?, - template (present) AAA_3GPP_PDN_Type pdn_type := ?, - template (present) charstring apn := ?) := { - avp := { - avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_APN_Configuration), - avp_data := { - avp_AAA_3GPP_APN_Configuration := superset( - tr_AVP_3GPP_ContextId(ctx), - tr_AVP_3GPP_PdnType(pdn_type), - tr_AVP_ServiceSelection(apn), - tr_AVP_3GPP_EpsSubscrQosProfile(?, ?) - ) - } - } -} -template (value) GenericAVP ts_AVP_3GPP_ApnConfig(uint32_t ctx, AAA_3GPP_PDN_Type pdn_type, - charstring apn) := { - avp := { - avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_APN_Configuration), - avp_data := { - avp_AAA_3GPP_APN_Configuration := { - ts_AVP_3GPP_ContextId(ctx), - ts_AVP_3GPP_PdnType(pdn_type), - ts_AVP_ServiceSelection(apn), - ts_AVP_3GPP_EpsSubscrQosProfile(1, 1) - } - } - } -} - /* Service-Selection, TS 29.272 7.3.36, TS 29.273 5.2.3.5, (RFC 5778) */ template (present) GenericAVP tr_AVP_ServiceSelection(template (present) charstring apn := ?) := { avp := { @@ -1179,67 +849,6 @@ } } - -/* TS 29.272 7.3.41 AMBR */ -template (present) GenericAVP tr_AVP_3GPP_AMBR(template (present) uint32_t ul := ?, template (present) uint32_t dl := ?) := { - avp := { - avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_AMBR), - avp_data := { - avp_AAA_3GPP_AMBR := { - tr_AVP_3GPP_MaxReqBwUL(ul), - tr_AVP_3GPP_MaxReqBwDL(dl) - } - } - } -} -template (value) GenericAVP ts_AVP_3GPP_AMBR(uint32_t ul, uint32_t dl) := { - avp := { - avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_AMBR), - avp_data := { - avp_AAA_3GPP_AMBR := { - ts_AVP_3GPP_MaxReqBwUL(ul), - ts_AVP_3GPP_MaxReqBwDL(dl) - } - } - } -} - -template (present) GenericAVP tr_AVP_3GPP_MaxReqBwUL(template (present) uint32_t bw := ?) := { - avp := { - avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_RX_3GPP_Max_Requested_Bandwidth_UL), - avp_data := { - avp_RX_3GPP_Max_Requested_Bandwidth_UL := int2oct_tmpl(bw, 4) - } - } -} - -template (value) GenericAVP ts_AVP_3GPP_MaxReqBwUL(uint32_t bw) := { - avp := { - avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_RX_3GPP_Max_Requested_Bandwidth_UL), - avp_data := { - avp_RX_3GPP_Max_Requested_Bandwidth_UL := int2oct(bw, 4) - } - } -} - -template (present) GenericAVP tr_AVP_3GPP_MaxReqBwDL(template (present) uint32_t bw := ?) := { - avp := { - avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_RX_3GPP_Max_Requested_Bandwidth_DL), - avp_data := { - avp_RX_3GPP_Max_Requested_Bandwidth_DL := int2oct_tmpl(bw, 4) - } - } -} - -template (value) GenericAVP ts_AVP_3GPP_MaxReqBwDL(uint32_t bw) := { - avp := { - avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_RX_3GPP_Max_Requested_Bandwidth_DL), - avp_data := { - avp_RX_3GPP_Max_Requested_Bandwidth_DL := int2oct(bw, 4) - } - } -} - template (present) GenericAVP tr_AVP_3GPP_Reporting_Reason(template (present) DCA_3GPP_Reporting_Reason r := ?) := { avp := { avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_DCA_3GPP_Reporting_Reason), @@ -1402,24 +1011,6 @@ } } -/* TS 29.272 7.3.62 PDN-Type */ -template (present) GenericAVP tr_AVP_3GPP_PdnType(template (present) AAA_3GPP_PDN_Type pdn_type := ?) := { - avp := { - avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_PDN_Type), - avp_data := { - avp_AAA_3GPP_PDN_Type := pdn_type - } - } -} -template (value) GenericAVP ts_AVP_3GPP_PdnType(template (value) AAA_3GPP_PDN_Type pdn_type) := { - avp := { - avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_PDN_Type), - avp_data := { - avp_AAA_3GPP_PDN_Type := pdn_type - } - } -} - /* RFC4006 8.16 Multiple-Services-Credit-Control AVP */ template (value) GenericAVP ts_AVP_Multiple_Services_Credit_Control(template (value) AVP_list content) := { avp := { @@ -1616,207 +1207,6 @@ return diam_pdu; } - -template (value) PDU_DIAMETER -ts_DIA_AIR(/* template (value) */ hexstring imsi, - template (value) octetstring mcc_mnc := '111F11'O, - template (value) octetstring sess_id := c_def_sess_id, - template (value) charstring orig_host := "ttcn3.localdomain", - template (value) charstring orig_realm := "localdomain", - template (value) charstring dest_realm := "localdomain", - template (value) UINT32 hbh_id := '00000000'O, - template (value) UINT32 ete_id := '00000000'O) := - ts_DIAMETER(flags := '11000000'B, - cmd_code := Authentication_Information, - app_id := int2oct(c_DIAMETER_3GPP_S6_AID, 4), - hbh_id := hbh_id, - ete_id := ete_id, - avps := { - ts_AVP_SessionId(sess_id), - ts_AVP_DestinationRealm(dest_realm), - ts_AVP_OriginHost(orig_host), - ts_AVP_OriginRealm(orig_realm), - ts_AVP_UserNameImsi(imsi), - /* Requested EUTRAN Auth Info */ - ts_AVP_RequestedEutranAuthInfo, - ts_AVP_AuthSessionState(NO_STATE_MAINTAINED), - ts_AVP_3GPP_VisitedPlmnId(mcc_mnc) - }); -template (present) PDU_DIAMETER -tr_DIA_AIR(/* template (present) */ hexstring imsi, - template (present) octetstring sess_id := ?, - template (present) charstring dest_realm := ?, - template (present) UINT32 hbh_id := ?, - template (present) UINT32 ete_id := ?) := - tr_DIAMETER(flags := '1???????'B, - cmd_code := Authentication_Information, - app_id := int2oct(c_DIAMETER_3GPP_S6_AID, 4), - hbh_id := hbh_id, ete_id := ete_id, - avps := superset( - tr_AVP_SessionId(sess_id), - tr_AVP_DestinationRealm(dest_realm), - tr_AVP_UserNameImsi(imsi), - tr_AVP_3GPP_VisitedPlmnId - )); - -/* TS 29.272 5.2.3.1 + 7.2.6 Authentication Information Answer */ -template (value) PDU_DIAMETER -ts_DIA_AIA(template (value) AVP_list auth_info_contents, - template (value) octetstring sess_id := c_def_sess_id, - template (value) charstring orig_host := "hss.localdomain", - template (value) charstring orig_realm := "localdomain", - template (value) UINT32 hbh_id := '00000000'O, - template (value) UINT32 ete_id := '00000000'O) := - ts_DIAMETER(flags := '01000000'B, - cmd_code := Authentication_Information, - app_id := int2oct(c_DIAMETER_3GPP_S6_AID, 4), - hbh_id := hbh_id, - ete_id := ete_id, - avps := { - ts_AVP_SessionId(sess_id), - ts_AVP_ResultCode(DIAMETER_SUCCESS), - ts_AVP_AuthSessionState(NO_STATE_MAINTAINED), - ts_AVP_OriginHost(orig_host), - ts_AVP_OriginRealm(orig_realm), - ts_AVP_3GPP_AuthInfo(auth_info_contents) - }); -template (present) PDU_DIAMETER -tr_DIA_AIA(template (present) AVP_list auth_info_contents := ?, - template (present) octetstring sess_id := ?, - template (present) charstring orig_host := ?, - template (present) charstring orig_realm := ?, - template (present) UINT32 hbh_id := ?, - template (present) UINT32 ete_id := ?) := - tr_DIAMETER(flags := '0???????'B, - cmd_code := Authentication_Information, - app_id := int2oct(c_DIAMETER_3GPP_S6_AID, 4), - hbh_id := hbh_id, - ete_id := ete_id, - avps := superset( - tr_AVP_SessionId(sess_id), - tr_AVP_AuthSessionState(NO_STATE_MAINTAINED), - tr_AVP_OriginHost(orig_host), - tr_AVP_OriginRealm(orig_realm), - tr_AVP_ResultCode(DIAMETER_SUCCESS), - tr_AVP_3GPP_AuthInfo(auth_info_contents) - )); -template (present) PDU_DIAMETER -tr_DIA_AIA_ERR(template (present) GenericAVP err_avp := ?, - template (present) octetstring sess_id := ?, - template (present) charstring orig_host := ?, - template (present) charstring orig_realm := ?, - template (present) UINT32 hbh_id := ?, - template (present) UINT32 ete_id := ?) := - tr_DIAMETER(flags := '0???????'B, - cmd_code := Authentication_Information, - app_id := int2oct(c_DIAMETER_3GPP_S6_AID, 4), - hbh_id := hbh_id, - ete_id := ete_id, - avps := superset( - tr_AVP_SessionId(sess_id), - tr_AVP_AuthSessionState(NO_STATE_MAINTAINED), - tr_AVP_OriginHost(orig_host), - tr_AVP_OriginRealm(orig_realm), - err_avp - )); - - -/* TS 29.272 7.2.3 Update Location Request */ -template (value) PDU_DIAMETER -ts_DIA_ULR(/* template (value) */ hexstring imsi, - template (value) octetstring mcc_mnc := '111F11'O, - template (value) octetstring sess_id := c_def_sess_id, - template (value) charstring orig_host := "ttcn3.localdomain", - template (value) charstring orig_realm := "localdomain", - template (value) charstring dest_realm := "localdomain", - template (value) UINT32 hbh_id := '00000000'O, - template (value) UINT32 ete_id := '00000000'O) := - ts_DIAMETER(flags := '11000000'B, - cmd_code := Update_Location, - app_id := int2oct(c_DIAMETER_3GPP_S6_AID, 4), - hbh_id := hbh_id, - ete_id := ete_id, - avps := { - ts_AVP_SessionId(sess_id), - ts_AVP_AuthSessionState(NO_STATE_MAINTAINED), - ts_AVP_UserNameImsi(imsi), - ts_AVP_3GPP_UlrFlags('00000000'O), - ts_AVP_3GPP_VisitedPlmnId(mcc_mnc), - ts_AVP_PCC_3GPP_RatType(EUTRAN), - ts_AVP_OriginHost(orig_host), - ts_AVP_OriginRealm(orig_realm), - ts_AVP_DestinationRealm(dest_realm) - }); -template (present) PDU_DIAMETER -tr_DIA_ULR(/* template (present) */ hexstring imsi, - template (present) octetstring sess_id := ?, - template (present) charstring orig_host := ?, - template (present) charstring orig_realm := ?, - template (present) charstring dest_realm := ?, - template (present) UINT32 hbh_id := ?, - template (present) UINT32 ete_id := ?) := - tr_DIAMETER(flags := '11000000'B, - cmd_code := Update_Location, - app_id := int2oct(c_DIAMETER_3GPP_S6_AID, 4), - hbh_id := hbh_id, - ete_id := ete_id, - avps := superset( - tr_AVP_SessionId(sess_id), - tr_AVP_AuthSessionState, - tr_AVP_OriginHost(orig_host), - tr_AVP_OriginRealm(orig_realm), - tr_AVP_DestinationRealm(dest_realm), - tr_AVP_UserNameImsi(imsi), - tr_AVP_PCC_3GPP_RatType, - tr_AVP_3GPP_UlrFlags, - tr_AVP_3GPP_VisitedPlmnId - )); - -template (value) PDU_DIAMETER -ts_DIA_ULA(template (value) AVP_list sub_data, - template (value) octetstring sess_id := c_def_sess_id, - template (value) charstring orig_host := "hss.localdomain", - template (value) charstring orig_realm := "localdomain", - template (value) UINT32 hbh_id := '00000000'O, - template (value) UINT32 ete_id := '00000000'O) := - ts_DIAMETER(flags:='01000000'B, - cmd_code := Update_Location, - app_id := int2oct(c_DIAMETER_3GPP_S6_AID, 4), - hbh_id := hbh_id, - ete_id := ete_id, - avps := { - ts_AVP_SessionId(sess_id), - ts_AVP_ResultCode(DIAMETER_SUCCESS), /* optional */ - ts_AVP_AuthSessionState(NO_STATE_MAINTAINED), - ts_AVP_OriginHost(orig_host), - ts_AVP_OriginRealm(orig_realm), - ts_AVP_3GPP_UlaFlags('00000002'O), - ts_AVP_3GPP_SubscriptionData(sub_data) - }); -template (present) PDU_DIAMETER -tr_DIA_ULA(template (present) AVP_list sub_data := ?, - template (present) octetstring sess_id := ?, - template (present) charstring orig_host := ?, - template (present) charstring orig_realm := ?, - template (present) UINT32 hbh_id := ?, - template (present) UINT32 ete_id := ?) := - tr_DIAMETER(flags := '0???????'B, - cmd_code := Update_Location, - app_id := int2oct(c_DIAMETER_3GPP_S6_AID, 4), - hbh_id := hbh_id, - ete_id := ete_id, - avps := superset( - tr_AVP_SessionId(sess_id), - tr_AVP_ResultCode(DIAMETER_SUCCESS), - tr_AVP_AuthSessionState, - tr_AVP_OriginHost(orig_host), - tr_AVP_OriginRealm(orig_realm), - tr_AVP_3GPP_UlaFlags, - tr_AVP_3GPP_SubscriptionData(sub_data) - )); - - - /* 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) diff --git a/library/DIAMETER_ts29_272_Templates.ttcn b/library/DIAMETER_ts29_272_Templates.ttcn new file mode 100644 index 0000000..443e372 --- /dev/null +++ b/library/DIAMETER_ts29_272_Templates.ttcn @@ -0,0 +1,632 @@ +module DIAMETER_ts29_272_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.272 + */ + +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.272 section 7 + *******************************/ + +/* 3GPP TS 29.272 Section 7.1.8 */ +const uint32_t c_DIAMETER_3GPP_S6_AID := 16777251; /* S6a/S6d */ +const uint32_t c_DIAMETER_3GPP_S13_AID := 16777252; + +/* 3GPP TS 29.272 section 7.4. Errors in Experimental-Result-Code */ +type enumerated DIAMETER_ExperimentalResultcode { + /* transient */ + DIAMETER_AUTHENTICATION_DATA_UNAVAILABLE (4181), + DIAMETER_ERROR_CAMEL_SUBSCRIPTION_PRESENT (4182), + /* permanent */ + DIAMETER_ERROR_USER_UNKNOWN (5001), + DIAMETER_AUTHORIZATION_REJECTED (5003), + DIAMETER_ERROR_ROAMING_NOT_ALLOWED (5004), + DIAMETER_MISSING_AVP (5005), + DIAMETER_ERROR_UNKNOWN_EPS_SUBSCRIPTION (5420), + DIAMETER_ERROR_RAT_NOT_ALLOWED (5421), + DIAMETER_ERROR_EQUIPMENT_UNKNOWN (5422), + DIAMETER_ERROR_UNKOWN_SERVING_NODE (5423) +} + +/* TS 29.272 7.3.53 RAND */ +template (value) GenericAVP ts_AVP_RAND(template (value) octetstring rand) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_RAND), + avp_data := { + avp_AAA_3GPP_RAND := rand + } + } +} + +/* TS 29.272 7.3.54 XRES */ +template (value) GenericAVP ts_AVP_XRES(template (value) octetstring xres) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_XRES), + avp_data := { + avp_AAA_3GPP_XRES := xres + } + } +} + +/* TS 29.272 7.3.55 XRES */ +template (value) GenericAVP ts_AVP_AUTN(template (value) octetstring autn) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_AUTN), + avp_data := { + avp_AAA_3GPP_AUTN := autn + } + } +} + +/* TS 29.272 7.3.56 KASME */ +template (value) GenericAVP ts_AVP_KASME(template (value) octetstring kasme) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_KASME), + avp_data := { + avp_AAA_3GPP_KASME := kasme + } + } +} + +/* TS 29.272 7.3.23 Item-Number */ +template (value) GenericAVP ts_AVP_ItemNumber(uint32_t num) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_KASME), + avp_data := { + avp_AAA_3GPP_Item_Number := int2oct(num, 4) + } + } +} + +/* TS 29.272 7.3.18 E-UTRAN Vector */ +template (value) GenericAVP ts_AVP_EutranVec(uint32_t item_num, octetstring rand, octetstring xres, + octetstring autn, octetstring kasme) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_E_UTRAN_Vector), + avp_data := { + avp_AAA_3GPP_E_UTRAN_Vector := { + ts_AVP_ItemNumber(item_num), + ts_AVP_RAND(rand), + ts_AVP_XRES(xres), + ts_AVP_AUTN(autn), + ts_AVP_KASME(kasme) + } + } + } +} + +/* TS 29.272 7.3.2 Subscription-Data */ +template (value) GenericAVP ts_AVP_3GPP_SubscriptionData(template (value) AVP_list content) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Subscription_Data), + avp_data := { + avp_AAA_3GPP_Subscription_Data := content + } + } +} +template (present) GenericAVP +tr_AVP_3GPP_SubscriptionData(template (present) AVP_list content := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Subscription_Data), + avp_data := { + avp_AAA_3GPP_Subscription_Data := content + } + } +} + + +/* TS 29.272 7.3.17 Authentication-Info */ +template (value) GenericAVP ts_AVP_3GPP_AuthInfo(template (value) AVP_list content) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Authentication_Info), + avp_data := { + avp_AAA_3GPP_Authentication_Info := content + } + } +} +template (present) GenericAVP +tr_AVP_3GPP_AuthInfo(template (present) AVP_list content := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Authentication_Info), + avp_data := { + avp_AAA_3GPP_Authentication_Info := content + } + } +} + +/* TS 29.272 7.3.9 Visited-PLMN-Id */ +template (value) GenericAVP ts_AVP_3GPP_VisitedPlmnId(template (value) octetstring id) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Visited_PLMN_Id), + avp_data := { + avp_AAA_3GPP_Visited_PLMN_Id := id + } + } +} +template (present) GenericAVP tr_AVP_3GPP_VisitedPlmnId(template (present) octetstring id := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Visited_PLMN_Id), + avp_data := { + avp_AAA_3GPP_Visited_PLMN_Id := id + } + } +} + +/* TS 29.272 7.3.13 RAT-Type */ +template (value) GenericAVP ts_AVP_PCC_3GPP_RatType(template (value) PCC_3GPP_RAT_Type rat_type) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_PCC_3GPP_RAT_Type), + avp_data := { + avp_PCC_3GPP_RAT_Type := rat_type + } + } +} +template (present) GenericAVP tr_AVP_PCC_3GPP_RatType(template (present) PCC_3GPP_RAT_Type rat_type := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_PCC_3GPP_RAT_Type), + avp_data := { + avp_PCC_3GPP_RAT_Type := rat_type + } + } +} + +template (present) GenericAVP tr_AVP_GI_3GPP_RatType(template (present) GI_3GPP_3GPP_RAT_Type rat_type := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_GI_3GPP_3GPP_RAT_Type), + avp_data := { + avp_GI_3GPP_3GPP_RAT_Type := rat_type + } + } +} + +/* TS 29.272 7.3.7 ULR-Flags */ +template (value) GenericAVP ts_AVP_3GPP_UlrFlags(template (value) UINT32 flags) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_ULR_Flags), + avp_data := { + avp_AAA_3GPP_ULR_Flags := flags + } + } +} +template (present) GenericAVP tr_AVP_3GPP_UlrFlags(template (present) UINT32 flags := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_ULR_Flags), + avp_data := { + avp_AAA_3GPP_ULR_Flags := flags + } + } +} + +/* TS 29.272 7.3.8 ULA-Flags */ +template (value) GenericAVP ts_AVP_3GPP_UlaFlags(template (value) UINT32 flags) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_ULA_Flags), + avp_data := { + avp_AAA_3GPP_ULA_Flags := flags + } + } +} +template (present) GenericAVP tr_AVP_3GPP_UlaFlags(template (present) UINT32 flags := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_ULA_Flags), + avp_data := { + avp_AAA_3GPP_ULA_Flags := flags + } + } +} + + +/* TS 29.272 7.3.27 Context-Identifier */ +template (present) GenericAVP tr_AVP_3GPP_ContextId(template (present) uint32_t ctx := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Context_Identifier), + avp_data := { + avp_AAA_3GPP_Context_Identifier := int2oct_tmpl(ctx, 4) + } + } +} +template (value) GenericAVP ts_AVP_3GPP_ContextId(uint32_t ctx) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Context_Identifier), + avp_data := { + avp_AAA_3GPP_Context_Identifier := int2oct(ctx, 4) + } + } +} + +/* Ts 29.272 7.3.29 Subscriber-Status */ +template (present) GenericAVP tr_AVP_3GPP_SubscriberStatus(template (present) AAA_3GPP_Subscriber_Status sts) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Subscriber_Status), + avp_data := { + avp_AAA_3GPP_Subscriber_Status := sts + } + } +} +template (value) GenericAVP ts_AVP_3GPP_SubscriberStatus(template (value) AAA_3GPP_Subscriber_Status sts) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Subscriber_Status), + avp_data := { + avp_AAA_3GPP_Subscriber_Status := sts + } + } +} + +/* Ts 29.272 7.3.30 Operator-Determined-Barring */ +template (present) GenericAVP tr_AVP_3GPP_OperatorDeterminedBarring(template (present) uint32_t val := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Operator_Determined_Barring), + avp_data := { + avp_AAA_3GPP_Operator_Determined_Barring := int2oct_tmpl(val, 4) + } + } +} +template (value) GenericAVP ts_AVP_3GPP_OperatorDeterminedBarring(uint32_t val) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Operator_Determined_Barring), + avp_data := { + avp_AAA_3GPP_Operator_Determined_Barring := int2oct(val, 4) + } + } +} + +/* TS 29.272 7.3.33 All-APN-Configurations-Included-Indicator */ +template (present) GenericAVP tr_AVP_3GPP_AllApnConfigsIncl(template (present) AAA_3GPP_All_APN_Configurations_Included_Indicator ind := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_All_APN_Configurations_Included_Indicator), + avp_data := { + avp_AAA_3GPP_All_APN_Configurations_Included_Indicator := ind + } + } +} +template (value) GenericAVP ts_AVP_3GPP_AllApnConfigsIncl(template (value) AAA_3GPP_All_APN_Configurations_Included_Indicator ind := All_APN_CONFIGURATIONS_INCLUDED) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_All_APN_Configurations_Included_Indicator), + avp_data := { + avp_AAA_3GPP_All_APN_Configurations_Included_Indicator := ind + } + } +} + +/* TS 29.272 7.3.34 APN-Configuration-Profile */ +template (present) GenericAVP tr_AVP_3GPP_ApnConfigProfile(template (present) AVP_list content := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_APN_Configuration_Profile), + avp_data := { + avp_AAA_3GPP_APN_Configuration_Profile := content + } + } +} +template (value) GenericAVP ts_AVP_3GPP_ApnConfigProfile(template (value) AVP_list content) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_APN_Configuration_Profile), + avp_data := { + avp_AAA_3GPP_APN_Configuration_Profile := content + } + } +} + +/* TS 29.272 7.3.35 APN-Configuration */ +template (present) GenericAVP tr_AVP_3GPP_ApnConfig(template (present) uint32_t ctx := ?, + template (present) AAA_3GPP_PDN_Type pdn_type := ?, + template (present) charstring apn := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_APN_Configuration), + avp_data := { + avp_AAA_3GPP_APN_Configuration := superset( + tr_AVP_3GPP_ContextId(ctx), + tr_AVP_3GPP_PdnType(pdn_type), + tr_AVP_ServiceSelection(apn), + tr_AVP_3GPP_EpsSubscrQosProfile(?, ?) + ) + } + } +} +template (value) GenericAVP ts_AVP_3GPP_ApnConfig(uint32_t ctx, AAA_3GPP_PDN_Type pdn_type, + charstring apn) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_APN_Configuration), + avp_data := { + avp_AAA_3GPP_APN_Configuration := { + ts_AVP_3GPP_ContextId(ctx), + ts_AVP_3GPP_PdnType(pdn_type), + ts_AVP_ServiceSelection(apn), + ts_AVP_3GPP_EpsSubscrQosProfile(1, 1) + } + } + } +} + + +/* TS 29.272 7.3.41 AMBR */ +template (present) GenericAVP tr_AVP_3GPP_AMBR(template (present) uint32_t ul := ?, template (present) uint32_t dl := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_AMBR), + avp_data := { + avp_AAA_3GPP_AMBR := { + tr_AVP_3GPP_MaxReqBwUL(ul), + tr_AVP_3GPP_MaxReqBwDL(dl) + } + } + } +} +template (value) GenericAVP ts_AVP_3GPP_AMBR(uint32_t ul, uint32_t dl) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_AMBR), + avp_data := { + avp_AAA_3GPP_AMBR := { + ts_AVP_3GPP_MaxReqBwUL(ul), + ts_AVP_3GPP_MaxReqBwDL(dl) + } + } + } +} + +template (present) GenericAVP tr_AVP_3GPP_MaxReqBwUL(template (present) uint32_t bw := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_RX_3GPP_Max_Requested_Bandwidth_UL), + avp_data := { + avp_RX_3GPP_Max_Requested_Bandwidth_UL := int2oct_tmpl(bw, 4) + } + } +} + +template (value) GenericAVP ts_AVP_3GPP_MaxReqBwUL(uint32_t bw) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_RX_3GPP_Max_Requested_Bandwidth_UL), + avp_data := { + avp_RX_3GPP_Max_Requested_Bandwidth_UL := int2oct(bw, 4) + } + } +} + +template (present) GenericAVP tr_AVP_3GPP_MaxReqBwDL(template (present) uint32_t bw := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_RX_3GPP_Max_Requested_Bandwidth_DL), + avp_data := { + avp_RX_3GPP_Max_Requested_Bandwidth_DL := int2oct_tmpl(bw, 4) + } + } +} + +template (value) GenericAVP ts_AVP_3GPP_MaxReqBwDL(uint32_t bw) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_RX_3GPP_Max_Requested_Bandwidth_DL), + avp_data := { + avp_RX_3GPP_Max_Requested_Bandwidth_DL := int2oct(bw, 4) + } + } +} + +/* TS 29.272 7.3.62 PDN-Type */ +template (present) GenericAVP tr_AVP_3GPP_PdnType(template (present) AAA_3GPP_PDN_Type pdn_type := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_PDN_Type), + avp_data := { + avp_AAA_3GPP_PDN_Type := pdn_type + } + } +} +template (value) GenericAVP ts_AVP_3GPP_PdnType(template (value) AAA_3GPP_PDN_Type pdn_type) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_PDN_Type), + avp_data := { + avp_AAA_3GPP_PDN_Type := pdn_type + } + } +} + + +/* TS 29.272 5.2.3.1 + 7.2.6 Authentication Information Answer */ +template (value) PDU_DIAMETER +ts_DIA_AIA(template (value) AVP_list auth_info_contents, + template (value) octetstring sess_id := c_def_sess_id, + template (value) charstring orig_host := "hss.localdomain", + template (value) charstring orig_realm := "localdomain", + template (value) UINT32 hbh_id := '00000000'O, + template (value) UINT32 ete_id := '00000000'O) := + ts_DIAMETER(flags := '01000000'B, + cmd_code := Authentication_Information, + app_id := int2oct(c_DIAMETER_3GPP_S6_AID, 4), + hbh_id := hbh_id, + ete_id := ete_id, + avps := { + ts_AVP_SessionId(sess_id), + ts_AVP_ResultCode(DIAMETER_SUCCESS), + ts_AVP_AuthSessionState(NO_STATE_MAINTAINED), + ts_AVP_OriginHost(orig_host), + ts_AVP_OriginRealm(orig_realm), + ts_AVP_3GPP_AuthInfo(auth_info_contents) + }); +template (present) PDU_DIAMETER +tr_DIA_AIA(template (present) AVP_list auth_info_contents := ?, + template (present) octetstring sess_id := ?, + template (present) charstring orig_host := ?, + template (present) charstring orig_realm := ?, + template (present) UINT32 hbh_id := ?, + template (present) UINT32 ete_id := ?) := + tr_DIAMETER(flags := '0???????'B, + cmd_code := Authentication_Information, + app_id := int2oct(c_DIAMETER_3GPP_S6_AID, 4), + hbh_id := hbh_id, + ete_id := ete_id, + avps := superset( + tr_AVP_SessionId(sess_id), + tr_AVP_AuthSessionState(NO_STATE_MAINTAINED), + tr_AVP_OriginHost(orig_host), + tr_AVP_OriginRealm(orig_realm), + tr_AVP_ResultCode(DIAMETER_SUCCESS), + tr_AVP_3GPP_AuthInfo(auth_info_contents) + )); +template (present) PDU_DIAMETER +tr_DIA_AIA_ERR(template (present) GenericAVP err_avp := ?, + template (present) octetstring sess_id := ?, + template (present) charstring orig_host := ?, + template (present) charstring orig_realm := ?, + template (present) UINT32 hbh_id := ?, + template (present) UINT32 ete_id := ?) := + tr_DIAMETER(flags := '0???????'B, + cmd_code := Authentication_Information, + app_id := int2oct(c_DIAMETER_3GPP_S6_AID, 4), + hbh_id := hbh_id, + ete_id := ete_id, + avps := superset( + tr_AVP_SessionId(sess_id), + tr_AVP_AuthSessionState(NO_STATE_MAINTAINED), + tr_AVP_OriginHost(orig_host), + tr_AVP_OriginRealm(orig_realm), + err_avp + )); + + +/* TS 29.272 7.2.3 Update Location Request */ +template (value) PDU_DIAMETER +ts_DIA_ULR(/* template (value) */ hexstring imsi, + template (value) octetstring mcc_mnc := '111F11'O, + template (value) octetstring sess_id := c_def_sess_id, + template (value) charstring orig_host := "ttcn3.localdomain", + template (value) charstring orig_realm := "localdomain", + template (value) charstring dest_realm := "localdomain", + template (value) UINT32 hbh_id := '00000000'O, + template (value) UINT32 ete_id := '00000000'O) := + ts_DIAMETER(flags := '11000000'B, + cmd_code := Update_Location, + app_id := int2oct(c_DIAMETER_3GPP_S6_AID, 4), + hbh_id := hbh_id, + ete_id := ete_id, + avps := { + ts_AVP_SessionId(sess_id), + ts_AVP_AuthSessionState(NO_STATE_MAINTAINED), + ts_AVP_UserNameImsi(imsi), + ts_AVP_3GPP_UlrFlags('00000000'O), + ts_AVP_3GPP_VisitedPlmnId(mcc_mnc), + ts_AVP_PCC_3GPP_RatType(EUTRAN), + ts_AVP_OriginHost(orig_host), + ts_AVP_OriginRealm(orig_realm), + ts_AVP_DestinationRealm(dest_realm) + }); +template (present) PDU_DIAMETER +tr_DIA_ULR(/* template (present) */ hexstring imsi, + template (present) octetstring sess_id := ?, + template (present) charstring orig_host := ?, + template (present) charstring orig_realm := ?, + template (present) charstring dest_realm := ?, + template (present) UINT32 hbh_id := ?, + template (present) UINT32 ete_id := ?) := + tr_DIAMETER(flags := '11000000'B, + cmd_code := Update_Location, + app_id := int2oct(c_DIAMETER_3GPP_S6_AID, 4), + hbh_id := hbh_id, + ete_id := ete_id, + avps := superset( + tr_AVP_SessionId(sess_id), + tr_AVP_AuthSessionState, + tr_AVP_OriginHost(orig_host), + tr_AVP_OriginRealm(orig_realm), + tr_AVP_DestinationRealm(dest_realm), + tr_AVP_UserNameImsi(imsi), + tr_AVP_PCC_3GPP_RatType, + tr_AVP_3GPP_UlrFlags, + tr_AVP_3GPP_VisitedPlmnId + )); + +template (value) PDU_DIAMETER +ts_DIA_ULA(template (value) AVP_list sub_data, + template (value) octetstring sess_id := c_def_sess_id, + template (value) charstring orig_host := "hss.localdomain", + template (value) charstring orig_realm := "localdomain", + template (value) UINT32 hbh_id := '00000000'O, + template (value) UINT32 ete_id := '00000000'O) := + ts_DIAMETER(flags:='01000000'B, + cmd_code := Update_Location, + app_id := int2oct(c_DIAMETER_3GPP_S6_AID, 4), + hbh_id := hbh_id, + ete_id := ete_id, + avps := { + ts_AVP_SessionId(sess_id), + ts_AVP_ResultCode(DIAMETER_SUCCESS), /* optional */ + ts_AVP_AuthSessionState(NO_STATE_MAINTAINED), + ts_AVP_OriginHost(orig_host), + ts_AVP_OriginRealm(orig_realm), + ts_AVP_3GPP_UlaFlags('00000002'O), + ts_AVP_3GPP_SubscriptionData(sub_data) + }); +template (present) PDU_DIAMETER +tr_DIA_ULA(template (present) AVP_list sub_data := ?, + template (present) octetstring sess_id := ?, + template (present) charstring orig_host := ?, + template (present) charstring orig_realm := ?, + template (present) UINT32 hbh_id := ?, + template (present) UINT32 ete_id := ?) := + tr_DIAMETER(flags := '0???????'B, + cmd_code := Update_Location, + app_id := int2oct(c_DIAMETER_3GPP_S6_AID, 4), + hbh_id := hbh_id, + ete_id := ete_id, + avps := superset( + tr_AVP_SessionId(sess_id), + tr_AVP_ResultCode(DIAMETER_SUCCESS), + tr_AVP_AuthSessionState, + tr_AVP_OriginHost(orig_host), + tr_AVP_OriginRealm(orig_realm), + tr_AVP_3GPP_UlaFlags, + tr_AVP_3GPP_SubscriptionData(sub_data) + )); + +/* TS 29.272 7.2.5 Authentication-Information-Request */ +template (value) PDU_DIAMETER +ts_DIA_AIR(/* template (value) */ hexstring imsi, + template (value) octetstring mcc_mnc := '111F11'O, + template (value) octetstring sess_id := c_def_sess_id, + template (value) charstring orig_host := "ttcn3.localdomain", + template (value) charstring orig_realm := "localdomain", + template (value) charstring dest_realm := "localdomain", + template (value) UINT32 hbh_id := '00000000'O, + template (value) UINT32 ete_id := '00000000'O) := + ts_DIAMETER(flags := '11000000'B, + cmd_code := Authentication_Information, + app_id := int2oct(c_DIAMETER_3GPP_S6_AID, 4), + hbh_id := hbh_id, + ete_id := ete_id, + avps := { + ts_AVP_SessionId(sess_id), + ts_AVP_DestinationRealm(dest_realm), + ts_AVP_OriginHost(orig_host), + ts_AVP_OriginRealm(orig_realm), + ts_AVP_UserNameImsi(imsi), + /* Requested EUTRAN Auth Info */ + ts_AVP_RequestedEutranAuthInfo, + ts_AVP_AuthSessionState(NO_STATE_MAINTAINED), + ts_AVP_3GPP_VisitedPlmnId(mcc_mnc) + }); +template (present) PDU_DIAMETER +tr_DIA_AIR(/* template (present) */ hexstring imsi, + template (present) octetstring sess_id := ?, + template (present) charstring dest_realm := ?, + template (present) UINT32 hbh_id := ?, + template (present) UINT32 ete_id := ?) := + tr_DIAMETER(flags := '1???????'B, + cmd_code := Authentication_Information, + app_id := int2oct(c_DIAMETER_3GPP_S6_AID, 4), + hbh_id := hbh_id, ete_id := ete_id, + avps := superset( + tr_AVP_SessionId(sess_id), + tr_AVP_DestinationRealm(dest_realm), + tr_AVP_UserNameImsi(imsi), + tr_AVP_3GPP_VisitedPlmnId + )); + +} diff --git a/mme/MME_Tests.ttcn b/mme/MME_Tests.ttcn index 973c097..7f714fc 100644 --- a/mme/MME_Tests.ttcn +++ b/mme/MME_Tests.ttcn @@ -27,6 +27,7 @@ import from DIAMETER_Types all; import from DIAMETER_Templates all; +import from DIAMETER_ts29_272_Templates all; import from DIAMETER_Emulation all; import from SGsAP_Types all; diff --git a/mme/gen_links.sh b/mme/gen_links.sh index f10a161..32c782f 100755 --- a/mme/gen_links.sh +++ b/mme/gen_links.sh @@ -75,7 +75,8 @@ FILES+="L3_Templates.ttcn RLCMAC_CSN1_Templates.ttcn RLCMAC_CSN1_Types.ttcn " FILES+="S1AP_CodecPort.ttcn S1AP_CodecPort_CtrlFunctDef.cc S1AP_CodecPort_CtrlFunct.ttcn S1AP_Emulation.ttcn " FILES+="NAS_Templates.ttcn GTPv2_PrivateExtensions.ttcn GTPv2_Templates.ttcn " -FILES+="DIAMETER_Types.ttcn DIAMETER_CodecPort.ttcn DIAMETER_CodecPort_CtrlFunct.ttcn DIAMETER_CodecPort_CtrlFunctDef.cc DIAMETER_Emulation.ttcn DIAMETER_Templates.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+="GTP_CodecPort.ttcn GTP_CodecPort_CtrlFunct.ttcn GTP_CodecPort_CtrlFunctDef.cc GTP_Emulation.ttcn GTP_Templates.ttcn Osmocom_Gb_Types.ttcn " FILES+="GTPv2_PrivateExtensions.ttcn GTPv2_Templates.ttcn " FILES+="GTPv2_CodecPort.ttcn GTPv2_CodecPort_CtrlFunctDef.cc GTPv2_CodecPort_CtrlFunct.ttcn GTPv2_Emulation.ttcn " diff --git a/pgw/PGW_Tests.ttcn b/pgw/PGW_Tests.ttcn index bafabdf..b8eb471 100644 --- a/pgw/PGW_Tests.ttcn +++ b/pgw/PGW_Tests.ttcn @@ -18,6 +18,7 @@ import from DIAMETER_Types all; import from DIAMETER_Templates all; +import from DIAMETER_ts29_272_Templates all; import from DIAMETER_Emulation all; diff --git a/pgw/gen_links.sh b/pgw/gen_links.sh index c8333c7..0bf264a 100755 --- a/pgw/gen_links.sh +++ b/pgw/gen_links.sh @@ -63,7 +63,8 @@ FILES+="GTPv2_PrivateExtensions.ttcn GTPv2_Templates.ttcn " 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 DIAMETER_Templates.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 " gen_links $DIR $FILES ignore_pp_results -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35405?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: I2e6b813a9e4ff98eef575aaaf46dbcf9f1a5d2d4 Gerrit-Change-Number: 35405 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-bsc[master]: abis_rsl: Add rach expiry timeout
by matanp 02 Jan '24

02 Jan '24
matanp has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/35475?usp=email ) Change subject: abis_rsl: Add rach expiry timeout ...................................................................... abis_rsl: Add rach expiry timeout This allows controlling the RACH DoS attack protection without increasing call drops rate. Change-Id: Iff7266672dd8bc9ce2b34b0478d98fb70691f425 --- M include/osmocom/bsc/bts.h M src/osmo-bsc/abis_rsl.c M src/osmo-bsc/bts.c M src/osmo-bsc/bts_vty.c 4 files changed, 33 insertions(+), 3 deletions(-) Approvals: matanp: Looks good to me, approved pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h index 6974dca..a1799eb 100644 --- a/include/osmocom/bsc/bts.h +++ b/include/osmocom/bsc/bts.h @@ -663,6 +663,9 @@ /* We will ignore CHAN RQD with access delay greater than rach_max_delay */ uint8_t rach_max_delay; + /* We will ignore CHAN RQD sitting in the queue for period greater than rach_expiry_timeout */ + uint8_t rach_expiry_timeout; + /* Is Fast return to LTE allowed during Chan Release in this BTS? */ bool srvcc_fast_return_allowed; diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 860e4a2..49e8b52 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -1975,7 +1975,6 @@ * requests from the queue to prevent the queue from growing indefinetly. */ static void reduce_rach_dos(struct gsm_bts *bts) { - int rlt = gsm_bts_get_radio_link_timeout(bts); time_t timestamp_current = time(NULL); struct chan_rqd *rqd; struct chan_rqd *rqd_tmp; @@ -1983,9 +1982,9 @@ /* Drop all expired channel requests in the list */ llist_for_each_entry_safe(rqd, rqd_tmp, &bts->chan_rqd_queue, entry) { - /* If the channel request is older than the radio link timeout we drop it. This also means that the + /* If the channel request is older than the rach expiry timeout we drop it. This also means that the * queue is under its overflow limit again. */ - if (timestamp_current - rqd->timestamp > rlt) { + if (timestamp_current - rqd->timestamp > bts->rach_expiry_timeout) { LOG_BTS(bts, DRSL, LOGL_INFO, "CHAN RQD: tossing expired channel request" "(ra=0x%02x, neci=0x%02x, chreq_reason=0x%02x)\n", rqd->ref.ra, bts->network->neci, rqd->reason); diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c index 814ba41..1904137 100644 --- a/src/osmo-bsc/bts.c +++ b/src/osmo-bsc/bts.c @@ -470,6 +470,7 @@ bts->interf_meas_params_cfg = interf_meas_params_def; bts->rach_max_delay = 63; + bts->rach_expiry_timeout = 32; /* SRVCC is enabled by default */ bts->srvcc_fast_return_allowed = true; diff --git a/src/osmo-bsc/bts_vty.c b/src/osmo-bsc/bts_vty.c index 3af7296..ef8b8bd 100644 --- a/src/osmo-bsc/bts_vty.c +++ b/src/osmo-bsc/bts_vty.c @@ -772,6 +772,19 @@ return CMD_SUCCESS; } +DEFUN_ATTR(cfg_bts_rach_expiry_timeout, + cfg_bts_rach_expiry_timeout_cmd, + "rach expiry-timeout <4-64>", + RACH_STR + "Set the timeout for channel requests expiry\n" + "Maximum timeout before dropping channel requests\n", + CMD_ATTR_IMMEDIATE) +{ + struct gsm_bts *bts = vty->index; + bts->rach_expiry_timeout = atoi(argv[0]); + return CMD_SUCCESS; +} + #define REP_ACCH_STR "FACCH/SACCH repetition\n" DEFUN_USRATTR(cfg_bts_rep_dl_facch, @@ -4516,6 +4529,7 @@ rach_max_trans_raw2val(bts->si_common.rach_control.max_trans), VTY_NEWLINE); vty_out(vty, " rach max-delay %u%s", bts->rach_max_delay, VTY_NEWLINE); + vty_out(vty, " rach expiry-timeout %u%s", bts->rach_expiry_timeout, VTY_NEWLINE); vty_out(vty, " channel-description attach %u%s", bts->si_common.chan_desc.att, VTY_NEWLINE); @@ -4862,6 +4876,7 @@ install_element(BTS_NODE, &cfg_bts_rach_tx_integer_cmd); install_element(BTS_NODE, &cfg_bts_rach_max_trans_cmd); install_element(BTS_NODE, &cfg_bts_rach_max_delay_cmd); + install_element(BTS_NODE, &cfg_bts_rach_expiry_timeout_cmd); install_element(BTS_NODE, &cfg_bts_chan_desc_att_cmd); install_element(BTS_NODE, &cfg_bts_chan_dscr_att_cmd); install_element(BTS_NODE, &cfg_bts_chan_desc_bs_pa_mfrms_cmd); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/35475?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Iff7266672dd8bc9ce2b34b0478d98fb70691f425 Gerrit-Change-Number: 35475 Gerrit-PatchSet: 4 Gerrit-Owner: matanp <matan1008(a)gmail.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: matanp <matan1008(a)gmail.com> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-bsc[master]: abis_rsl: Add rach expiry timeout
by matanp 02 Jan '24

02 Jan '24
matanp has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/35475?usp=email ) Change subject: abis_rsl: Add rach expiry timeout ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/35475?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Iff7266672dd8bc9ce2b34b0478d98fb70691f425 Gerrit-Change-Number: 35475 Gerrit-PatchSet: 4 Gerrit-Owner: matanp <matan1008(a)gmail.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: matanp <matan1008(a)gmail.com> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 02 Jan 2024 10:53:10 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-bsc[master]: abis_rsl: Add rach expiry timeout
by pespin 02 Jan '24

02 Jan '24
Attention is currently required from: matanp. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/35475?usp=email ) Change subject: abis_rsl: Add rach expiry timeout ...................................................................... Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/35475?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Iff7266672dd8bc9ce2b34b0478d98fb70691f425 Gerrit-Change-Number: 35475 Gerrit-PatchSet: 4 Gerrit-Owner: matanp <matan1008(a)gmail.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: matanp <matan1008(a)gmail.com> Gerrit-Comment-Date: Tue, 02 Jan 2024 10:39:14 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmocore[master]: utils: osmo_bcd2str(): fix applying non-zero offset to null pointer
by pespin 02 Jan '24

02 Jan '24
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35470?usp=email ) Change subject: utils: osmo_bcd2str(): fix applying non-zero offset to null pointer ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35470?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: I542aef1ac220891b6bbdb0c60c39232f0df0a43c Gerrit-Change-Number: 35470 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 02 Jan 2024 10:35:24 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmocore[master]: tests/utils: do not test strbuf_example2() with buf=NULL
by pespin 02 Jan '24

02 Jan '24
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35471?usp=email ) Change subject: tests/utils: do not test strbuf_example2() with buf=NULL ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35471?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: Icd2323e93ec64afc1822d48e5e1d090083edf539 Gerrit-Change-Number: 35471 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 02 Jan 2024 10:34:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmocore[master]: bitvec: bitvec_to_string_r(): drop unused variable
by pespin 02 Jan '24

02 Jan '24
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35472?usp=email ) Change subject: bitvec: bitvec_to_string_r(): drop unused variable ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35472?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: I17df6f9263bee06676309c00837f12220803c814 Gerrit-Change-Number: 35472 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 02 Jan 2024 10:33:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmocore[master]: {gsm,vty}: suppress warnings about [total_]len being set but not used
by pespin 02 Jan '24

02 Jan '24
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35473?usp=email ) Change subject: {gsm,vty}: suppress warnings about [total_]len being set but not used ...................................................................... Patch Set 1: Code-Review+1 (1 comment) File src/gsm/gsm0808_utils.c: https://gerrit.osmocom.org/c/libosmocore/+/35473/comment/f14d430d_ddc8be9e PS1, Line 2097: (void)total_len; /* suppress warnings about total_len being set but not used */ sounds like we want to use osmo_strbuf here instead. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35473?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: I0040ef20ba3fc53ee7ccefc4885170f333f80566 Gerrit-Change-Number: 35473 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 02 Jan 2024 10:33:09 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.