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 -----
  • November
  • 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

July 2024

  • 1 participants
  • 1379 discussions
[M] Change in pysim[master]: pySim-shell: enable export of DF and ADF files
by dexter 26 Jul '24

26 Jul '24
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/37641?usp=email ) Change subject: pySim-shell: enable export of DF and ADF files ...................................................................... pySim-shell: enable export of DF and ADF files Since we now have the ability to provide export methods for all files in the file system (this also includes DF and ADF files), we need to support this at shell command level as well. Related: OS#6092 Change-Id: I3ee661dbae5c11fec23911775f352ac13bc2c6e5 --- M pySim-shell.py 1 file changed, 82 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/41/37641/1 diff --git a/pySim-shell.py b/pySim-shell.py index 168c916..8fc348e 100755 --- a/pySim-shell.py +++ b/pySim-shell.py @@ -494,12 +494,22 @@ self._cmd.poutput(directory_str) self._cmd.poutput("%d files" % len(selectables)) + def _walk_action(self, action, file, context, **kwargs): + df_before_action = self._cmd.lchan.selected_file + action(file, context, **kwargs) + # When walking through the file system tree the action must not + # always restore the currently selected file to the file that + # was selected before executing the action() callback. + if df_before_action != self._cmd.lchan.selected_file: + raise RuntimeError("inconsistent walk, %s is currently selected but expecting %s to be selected" + % (str(self._cmd.lchan.selected_file), str(df_before_action))) + def walk(self, indent=0, action_ef=None, action_df=None, context=None, **kwargs): """Recursively walk through the file system, starting at the currently selected DF""" if isinstance(self._cmd.lchan.selected_file, CardDF): if action_df: - action_df(context, **kwargs) + self._walk_action(action_df, self._cmd.lchan.selected_file.name, context, **kwargs) files = self._cmd.lchan.selected_file.get_selectables( flags=['FNAMES', 'ANAMES']) @@ -536,14 +546,7 @@ self._cmd.lchan.select_parent(self._cmd) elif action_ef: - df_before_action = self._cmd.lchan.selected_file - action_ef(f, context, **kwargs) - # When walking through the file system tree the action must not - # always restore the currently selected file to the file that - # was selected before executing the action() callback. - if df_before_action != self._cmd.lchan.selected_file: - raise RuntimeError("inconsistent walk, %s is currently selected but expecting %s to be selected" - % (str(self._cmd.lchan.selected_file), str(df_before_action))) + self._walk_action(action_ef, f, context, **kwargs) def do_tree(self, opts): """Display a filesystem-tree with all selectable files""" @@ -594,11 +597,58 @@ self._cmd.poutput("#") + def export_df(self, filename, context, as_json): + """ Select and export a single application dedicated file (ADF) """ + context['COUNT'] += 1 + df = self._cmd.lchan.selected_file + + # The currently selected file (not the file we are going to export) + # must always be an ADF or DF. From this starting point we select + # the ADF we want to export. To maintain consistency we will then + # select the current DF again (see comment below). + if not isinstance(df, CardDF): + raise RuntimeError( + "currently selected file %s is not a DF or ADF" % str(df)) + + df_path_list = df.fully_qualified_path(True) + df_path = df.fully_qualified_path_str(True) + df_path_fid = df.fully_qualified_path_str(False) + + file_str = df_path + "/" + str(filename) + self._cmd.poutput(boxed_heading_str(file_str)) + + self._cmd.poutput("# directory: %s (%s)" % (df_path, df_path_fid)) + try: + fcp_dec = self._cmd.lchan.select(filename, self._cmd) + self._cmd.poutput("# file: %s (%s)" % + (self._cmd.lchan.selected_file.name, self._cmd.lchan.selected_file.aid)) + self._cmd.poutput("# RAW FCP Template: %s" % str(self._cmd.lchan.selected_file_fcp_hex)) + self._cmd.poutput("# Decoded FCP Template: %s" % str(self._cmd.lchan.selected_file_fcp)) + self._cmd.poutput("select " + self._cmd.lchan.selected_file.fully_qualified_path_str()) + self._cmd.poutput(self._cmd.lchan.selected_file.export(as_json, self._cmd.lchan)) + + except Exception as e: + bad_file_str = df_path + "/" + str(filename) + ", " + str(e) + self._cmd.poutput("# bad file: %s" % bad_file_str) + context['ERR'] += 1 + context['BAD'].append(bad_file_str) + + # When reading the file is done, make sure the parent file is + # selected again. This will be the usual case, however we need + # to check before since we must not select the same DF twice + if df != self._cmd.lchan.selected_file: + self._cmd.lchan.select_parent(self._cmd) + + self._cmd.poutput("#") + + export_parser = argparse.ArgumentParser() export_parser.add_argument( '--filename', type=str, default=None, help='only export specific file') export_parser.add_argument( '--json', action='store_true', help='export as JSON (less reliable)') + export_parser.add_argument( + '--include_df', action='store_true', help='also export DF and ADF files (where possible)') @cmd2.with_argparser(export_parser) def do_export(self, opts): @@ -609,10 +659,17 @@ exception_str_add = "" if opts.filename: - self.export_ef(opts.filename, context, **kwargs_export) + file = self._cmd.lchan.get_file_for_filename(opts.filename) + if isinstance(file, CardDF): + self.export_df(opts.filename, context, **kwargs_export) + else: + self.export_ef(opts.filename, context, **kwargs_export) else: try: - self.walk(0, self.export_ef, None, context, **kwargs_export) + if opts.include_df: + self.walk(0, self.export_ef, self.export_df, context, **kwargs_export) + else: + self.walk(0, self.export_ef, None, context, **kwargs_export) except Exception as e: print("# Stopping early here due to exception: " + str(e)) print("#") -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37641?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I3ee661dbae5c11fec23911775f352ac13bc2c6e5 Gerrit-Change-Number: 37641 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-sgsn[master]: Fix DeactPDPCtxAcc when UE goes PMM ENABLED but lost its PDP context
by pespin 26 Jul '24

26 Jul '24
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/37636?usp=email ) Change subject: Fix DeactPDPCtxAcc when UE goes PMM ENABLED but lost its PDP context ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: Issue observed by SGSN_Tests_iu.TC_attach_pdp_act_pmm_idle_lost_pdp_status, introduced here: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37625 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/37636?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I0ccd9228d71c29248b5f510356dbfdb09565dc30 Gerrit-Change-Number: 37636 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Fri, 26 Jul 2024 14:37:20 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-sgsn[master]: Fix DeactPDPCtxAcc when UE goes PMM ENABLED but lost its PDP context
by pespin 26 Jul '24

26 Jul '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/37636?usp=email ) Change subject: Fix DeactPDPCtxAcc when UE goes PMM ENABLED but lost its PDP context ...................................................................... Fix DeactPDPCtxAcc when UE goes PMM ENABLED but lost its PDP context Scenario: UE activates a PDP context, then after a while goes PMM IDLE (Iu conn is destroyed but PDP is kept). When UE connects through Iu again, it sends eg. RAU or ServiceRequest with pdp_status bitmask statis the active NSAPIs. If some NSAPI (PDP context) is enabled at SGSN but doesn't show up in the bitmask, SGSN will destroy the PDP context with GGSN (DeletePDPContextReq) towards GGSN prior to re-creating it. When SGSN receives the DeletePDPContextResp, it would forward a DeactivatePDPContextReq to the UE for a PDP context which was not known by the UE anymore, this is wrong. With this patch, the state of the NSAPI/PDP at the UE side is tracked, and used to know whether when the PDP gets deleted on the GGSN side then it needs to also be deleted on the Iu side. Change-Id: I0ccd9228d71c29248b5f510356dbfdb09565dc30 --- M include/osmocom/sgsn/pdpctx.h M src/sgsn/gprs_gmm.c M src/sgsn/sgsn_libgtp.c 3 files changed, 32 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/36/37636/1 diff --git a/include/osmocom/sgsn/pdpctx.h b/include/osmocom/sgsn/pdpctx.h index 255a77d..f3cf0ed 100644 --- a/include/osmocom/sgsn/pdpctx.h +++ b/include/osmocom/sgsn/pdpctx.h @@ -68,6 +68,7 @@ //uint32_t qos_profile_neg; uint8_t radio_prio; //uint32_t charging_id; + bool ue_pdp_active; /* PDP Context is active for this NSAPI? */ struct osmo_timer_list timer; unsigned int T; /* Txxxx number */ diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c index 653c425..ab8b7ef 100644 --- a/src/sgsn/gprs_gmm.c +++ b/src/sgsn/gprs_gmm.c @@ -1591,6 +1591,7 @@ LOGMMCTXP(LOGL_NOTICE, mmctx, "Dropping PDP context for NSAPI=%u " "due to PDP CTX STATUS IE=0x%02x%02x\n", pdp->nsapi, pdp_status[1], pdp_status[0]); + pdp->ue_pdp_active = false; if (pdp->ggsn) sgsn_delete_pdp_ctx(pdp); else /* GTP side already detached, freeing */ diff --git a/src/sgsn/sgsn_libgtp.c b/src/sgsn/sgsn_libgtp.c index 9edd0c6..4885ada 100644 --- a/src/sgsn/sgsn_libgtp.c +++ b/src/sgsn/sgsn_libgtp.c @@ -378,6 +378,7 @@ rc = gsm48_tx_gsm_act_pdp_acc(pctx); if (rc < 0) return rc; + pctx->ue_pdp_active = true; if (pctx->mm->ran_type == MM_CTX_T_GERAN_Gb) { /* Send SNDCP XID to MS */ @@ -567,9 +568,11 @@ return -ENOTSUP; #endif } - - /* Confirm deactivation of PDP context to MS */ - rc = gsm48_tx_gsm_deact_pdp_acc(pctx); + if (pctx->ue_pdp_active) { + /* Confirm deactivation of PDP context to MS */ + rc = gsm48_tx_gsm_deact_pdp_acc(pctx); + pctx->ue_pdp_active = false; + } } else { LOGPDPCTXP(LOGL_NOTICE, pctx, "Not deactivating SNDCP layer since the MM context " -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/37636?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I0ccd9228d71c29248b5f510356dbfdb09565dc30 Gerrit-Change-Number: 37636 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: sgsn: Introduce test TC_attach_pdp_act_pmm_idle_lost_pdp_status
by pespin 26 Jul '24

26 Jul '24
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37625?usp=email ) Change subject: sgsn: Introduce test TC_attach_pdp_act_pmm_idle_lost_pdp_status ...................................................................... Patch Set 2: This change is ready for review. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37625?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: I34a0dabc37ba24d0c9fb1ae2587e7ec8c1b606fa Gerrit-Change-Number: 37625 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Comment-Date: Fri, 26 Jul 2024 14:36:15 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: GTP1C_Templates,Osmocom_Gb_types: Use/move conversion functions at Os...
by pespin 26 Jul '24

26 Jul '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37635?usp=email ) Change subject: GTP1C_Templates,Osmocom_Gb_types: Use/move conversion functions at Osmocom_Types ...................................................................... GTP1C_Templates,Osmocom_Gb_types: Use/move conversion functions at Osmocom_Types Change-Id: I29948bfcb2b344d5aca293fa60455fcc6de66c72 --- M library/GTPv1C_Templates.ttcn M library/Osmocom_Gb_Types.ttcn M library/Osmocom_Types.ttcn 3 files changed, 46 insertions(+), 70 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/35/37635/1 diff --git a/library/GTPv1C_Templates.ttcn b/library/GTPv1C_Templates.ttcn index a632b47..33efb3a 100644 --- a/library/GTPv1C_Templates.ttcn +++ b/library/GTPv1C_Templates.ttcn @@ -108,28 +108,6 @@ } } - private function f_oct_or_wc(template integer inp, integer len) return template octetstring { - if (istemplatekind(inp, "omit")) { - return omit; - } else if (istemplatekind(inp, "*")) { - return *; - } else if (istemplatekind(inp, "?")) { - return ?; - } - return int2oct(valueof(inp), len); - } - - private function f_hex_or_wc(template integer inp, integer len) return template hexstring { - if (istemplatekind(inp, "omit")) { - return omit; - } else if (istemplatekind(inp, "*")) { - return *; - } else if (istemplatekind(inp, "?")) { - return ?; - } - return int2hex(valueof(inp), len); - } - /* generalized GTP-C receive template */ template (present) PDU_GTPC tr_GTP1C_PDU(template (present) OCT1 msg_type, template (present) OCT4 teid, template (present) GTPC_PDUs pdu := ?) := { /* N-PDU Number flag (PN) shall be set to '0'. A GTP-C receiver shall not return an @@ -1520,14 +1498,14 @@ ret.mncDigit2 := cid.ra_id.lai.mcc_mnc[5]; } if (isvalue(cid.ra_id.lai.lac)) { - ret.lac := f_oct_or_wc(cid.ra_id.lai.lac, 2); + ret.lac := int2oct_tmpl(cid.ra_id.lai.lac, 2); } } if (isvalue(cid) and isvalue(cid.ra_id)) { - ret.rac := f_oct_or_wc(cid.ra_id.rac, 1); + ret.rac := int2oct_tmpl(cid.ra_id.rac, 1); } if (isvalue(cid)) { - ret.cI_value := f_oct_or_wc(cid.cell_id, 2); + ret.cI_value := int2oct_tmpl(cid.cell_id, 2); } return ret; } diff --git a/library/Osmocom_Gb_Types.ttcn b/library/Osmocom_Gb_Types.ttcn index 42866ff..c387ea3 100644 --- a/library/Osmocom_Gb_Types.ttcn +++ b/library/Osmocom_Gb_Types.ttcn @@ -161,28 +161,6 @@ return ret; } - private function f_oct_or_wc(template integer inp, integer len) return template octetstring { - if (istemplatekind(inp, "omit")) { - return omit; - } else if (istemplatekind(inp, "*")) { - return *; - } else if (istemplatekind(inp, "?")) { - return ?; - } - return int2oct(valueof(inp), len); - } - - private function f_hex_or_wc(template integer inp, integer len) return template hexstring { - if (istemplatekind(inp, "omit")) { - return omit; - } else if (istemplatekind(inp, "*")) { - return *; - } else if (istemplatekind(inp, "?")) { - return ?; - } - return int2hex(valueof(inp), len); - } - template (value) NS_VCI ts_NS_IE_NSVCI(Nsvci nsvci) := { iEI := '01'O, ext := '1'B, @@ -197,7 +175,7 @@ lengthIndicator := { length1 := 2 }, - nS_VCI := f_oct_or_wc(nsvci, 2) + nS_VCI := int2oct_tmpl(nsvci, 2) } template (value) NSEI_NS ts_NS_IE_NSEI(Nsei nsei) := { @@ -214,7 +192,7 @@ lengthIndicator := { length1 := 2 }, - nSEI := f_oct_or_wc(nsei, 2) + nSEI := int2oct_tmpl(nsei, 2) } template (value) IP4_Element ts_SNS_IPv4(charstring ip, integer udp_port, @@ -414,7 +392,7 @@ pDU_NS_Unitdata := { nsPduType := '00'O, nS_SDU_ControlBits := bits, - bVCI := f_oct_or_wc(bvci, 2), + bVCI := int2oct_tmpl(bvci, 2), nS_SDU := sdu } } @@ -483,7 +461,7 @@ } template MaxNumberOfNSVCs tr_SNS_IE_MaxNumOfNSVCs(template uint16_t num) := { iEI := '07'O, - maxNumberOfNSVCs := f_oct_or_wc(num, 2) + maxNumberOfNSVCs := int2oct_tmpl(num, 2) } template (value) PDU_NS ts_SNS_SIZE(Nsei nsei, boolean rst_flag := true, @@ -858,7 +836,7 @@ lengthIndicator := { length1 := 3 }, - number_of_octets_transfered_or_deleted := f_oct_or_wc(oct_aff, 3) + number_of_octets_transfered_or_deleted := int2oct_tmpl(oct_aff, 3) } return r; } @@ -886,7 +864,7 @@ lengthIndicator := { length1 := 1 }, - number_of_frames_discarded := f_hex_or_wc(frames_discarded, 2) + number_of_frames_discarded := int2hex_tmpl(frames_discarded, 2) } return r; } @@ -915,7 +893,7 @@ lengthIndicator := { length1 := 2 }, - unstructured_value := f_oct_or_wc(bvci, 2) + unstructured_value := int2oct_tmpl(bvci, 2) } return r; } @@ -951,7 +929,7 @@ lengthIndicator := { length1 := 2 }, - nSEI := f_oct_or_wc(nsei, 2) + nSEI := int2oct_tmpl(nsei, 2) } return r; } @@ -1170,14 +1148,14 @@ ret.mncDigit2 := cid.ra_id.lai.mcc_mnc[5]; } if (isvalue(cid.ra_id.lai.lac)) { - ret.lac := f_oct_or_wc(cid.ra_id.lai.lac, 2); + ret.lac := int2oct_tmpl(cid.ra_id.lai.lac, 2); } } if (isvalue(cid) and isvalue(cid.ra_id)) { - ret.rac := f_oct_or_wc(cid.ra_id.rac, 1); + ret.rac := int2oct_tmpl(cid.ra_id.rac, 1); } if (isvalue(cid)) { - ret.cI_value := f_oct_or_wc(cid.cell_id, 2); + ret.cI_value := int2oct_tmpl(cid.cell_id, 2); } return ret; } @@ -1415,7 +1393,7 @@ lengthIndicator := { length1 := 2 }, - bmax := f_oct_or_wc(bmax, 2) + bmax := int2oct_tmpl(bmax, 2) }, bucket_Leak_Rate := { iEI := '03'O, @@ -1423,7 +1401,7 @@ lengthIndicator := { length1 := 2 }, - r_Value := f_oct_or_wc(bucket_leak_rate, 2) + r_Value := int2oct_tmpl(bucket_leak_rate, 2) }, bmax_default_MS := { iEI := '01'O, @@ -1431,7 +1409,7 @@ lengthIndicator := { length1 := 2 }, - bmax := f_oct_or_wc(bmax_default_ms, 2) + bmax := int2oct_tmpl(bmax_default_ms, 2) }, r_default_MS := { iEI := '1C'O, @@ -1439,7 +1417,7 @@ lengthIndicator := { length1 := 2 }, - r_default_MS_value := f_oct_or_wc(r_default_ms, 2) + r_default_MS_value := int2oct_tmpl(r_default_ms, 2) }, bucket_Full_Ratio := *, bVC_Measurement := *, @@ -1530,7 +1508,7 @@ lengthIndicator := { length1 := 2 }, - bmax := f_oct_or_wc(bmax, 2) + bmax := int2oct_tmpl(bmax, 2) }, bucket_Leak_Rate := { iEI := '03'O, @@ -1538,7 +1516,7 @@ lengthIndicator := { length1 := 2 }, - r_Value := f_oct_or_wc(bucket_leak_rate, 2) + r_Value := int2oct_tmpl(bucket_leak_rate, 2) }, bucket_Full_Ratio := *, flow_Control_Granularity := * @@ -3195,7 +3173,7 @@ ret.mncDigit2 := cid.ra_id.lai.mcc_mnc[5]; } if (isvalue(cid.ra_id.lai.lac)) { - ret.lac := f_oct_or_wc(cid.ra_id.lai.lac, 2); + ret.lac := int2oct_tmpl(cid.ra_id.lai.lac, 2); } } return ret; @@ -3406,14 +3384,14 @@ ret.mncDigit2 := cid.ra_id.lai.mcc_mnc[5]; } if (isvalue(cid.ra_id.lai.lac)) { - ret.lac := f_oct_or_wc(cid.ra_id.lai.lac, 2); + ret.lac := int2oct_tmpl(cid.ra_id.lai.lac, 2); } } if (isvalue(cid) and isvalue(cid.ra_id)) { - ret.rac := f_oct_or_wc(cid.ra_id.rac, 1); + ret.rac := int2oct_tmpl(cid.ra_id.rac, 1); } if (isvalue(cid)) { - ret.cI_value := f_oct_or_wc(cid.cell_id, 2); + ret.cI_value := int2oct_tmpl(cid.cell_id, 2); } return ret; } @@ -3459,11 +3437,11 @@ ret.mncDigit2 := cid.ra_id.lai.mcc_mnc[5]; } if (isvalue(cid.ra_id.lai.lac)) { - ret.lac := f_oct_or_wc(cid.ra_id.lai.lac, 2); + ret.lac := int2oct_tmpl(cid.ra_id.lai.lac, 2); } } if (isvalue(cid) and isvalue(cid.ra_id)) { - ret.rac := f_oct_or_wc(cid.ra_id.rac, 1); + ret.rac := int2oct_tmpl(cid.ra_id.rac, 1); } if (isvalue(rnc_id)) { ret.spare := '0'H; diff --git a/library/Osmocom_Types.ttcn b/library/Osmocom_Types.ttcn index 6653408..57912de 100644 --- a/library/Osmocom_Types.ttcn +++ b/library/Osmocom_Types.ttcn @@ -153,6 +153,17 @@ } } +function int2hex_tmpl(template integer inp, integer len) return template hexstring { + if (istemplatekind(inp, "omit")) { + return omit; + } else if (istemplatekind(inp, "*")) { + return *; + } else if (istemplatekind(inp, "?")) { + return ?; + } + return int2hex(valueof(inp), len); +} + function int2oct_tmpl(template integer inp, integer num_oct) return template octetstring { if (istemplatekind(inp, "omit")) { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37635?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: I29948bfcb2b344d5aca293fa60455fcc6de66c72 Gerrit-Change-Number: 37635 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: Improve use of enumareted type GTP_Clause
by pespin 26 Jul '24

26 Jul '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37634?usp=email ) Change subject: Improve use of enumareted type GTP_Clause ...................................................................... Improve use of enumareted type GTP_Clause Change-Id: Ib071fa97a354cb27263cd46dba8f468b4ddc0018 --- M library/GTPv1C_Templates.ttcn M sgsn/BSSGP_ConnHdlr.ttcn M sgsn/SGSN_Tests.ttcn 3 files changed, 46 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/34/37634/1 diff --git a/library/GTPv1C_Templates.ttcn b/library/GTPv1C_Templates.ttcn index fe0db2b..a632b47 100644 --- a/library/GTPv1C_Templates.ttcn +++ b/library/GTPv1C_Templates.ttcn @@ -68,13 +68,18 @@ GTP_CAUSE_MS_IS_NOT_GPRS_RESPONDING (5), /* reserved */ GTP_CAUSE_REQUEST_ACCEPTED (128), - GTP_CAUSE_INVALID_MSG_FORMAT (193) + GTP_CAUSE_INVALID_MSG_FORMAT (193), + GTP_CAUSE_NO_RESOURCES_AVAILABLE (199) /* FIXME */ - }; + } with { encode "RAW" + variant "FIELDLENGTH(8)"; }; + private function f_GTP_Cause_2_OCT1(template (value) GTP_Cause cause) return OCT1 { + return int2oct(enum2int(valueof(cause)), 1); + } template (value) Cause_gtpc ts_Cause_gtpc(template (value) GTP_Cause cause) := { type_gtpc := '01'O, - causevalue := enum2oct1_Cause_gtpc_tmpl(cause) + causevalue := f_GTP_Cause_2_OCT1(cause) } private function enum2oct1_Cause_gtpc_tmpl(template GTP_Cause inp) return template OCT1 { @@ -85,7 +90,7 @@ } else if (istemplatekind(inp, "?")) { return ?; } else { - return int2oct(enum2int(valueof(inp)), 1); + return f_GTP_Cause_2_OCT1(inp); } } template (present) Cause_gtpc tr_Cause_gtpc(template (present) GTP_Cause cause) := { @@ -937,13 +942,14 @@ spare := '0000000'B } - template (value) GTPC_PDUs ts_CreatePdpRespPDU(OCT1 cause, OCT4 teid_data, OCT4 teid_ctrl, BIT4 nsapi, + template (value) GTPC_PDUs ts_CreatePdpRespPDU(template (value) GTP_Cause cause, + OCT4 teid_data, OCT4 teid_ctrl, BIT4 nsapi, octetstring ggsn_ip_sign, octetstring ggsn_ip_data, OCT4 chg_id, template (omit) EndUserAddress eua := omit, template (omit) Recovery_gtpc recovery := omit, template (omit) ProtConfigOptions pco := omit) := { createPDPContextResponse := { - cause := { '00'O, cause }, + cause := ts_Cause_gtpc(cause), reorderingRequired := ts_ReorderReq(false), recovery := recovery, teidDataI := { @@ -980,7 +986,7 @@ } template (value) Gtp1cUnitdata ts_GTPC_CreatePdpResp(Gtp1cPeer peer, uint16_t seq, OCT4 teid, - OCT1 cause, + template (value) GTP_Cause cause, OCT4 teid_ctrl, OCT4 teid_data, BIT4 nsapi, octetstring ggsn_ip_sign, octetstring ggsn_ip_data, OCT4 chg_id, @@ -994,7 +1000,8 @@ eua, recovery, pco)), seq) } - template (value) GTPC_PDUs ts_UpdatePdpRespGGSNPDU(OCT1 cause, OCT4 teid_data, OCT4 teid_ctrl, + template (value) GTPC_PDUs ts_UpdatePdpRespGGSNPDU(template (value) GTP_Cause cause, + OCT4 teid_data, OCT4 teid_ctrl, octetstring ggsn_ip_sign, octetstring ggsn_ip_data, OCT4 chg_id, template (omit) EndUserAddress eua := omit, template (omit) Recovery_gtpc recovery := omit, @@ -1002,7 +1009,7 @@ updatePDPContextResponse := { updatePDPContextResponseGGSN := { - cause := { '00'O, cause }, + cause := ts_Cause_gtpc(cause), recovery := recovery, teidDataI := { type_gtpc := '00'O, @@ -1035,7 +1042,7 @@ } template (value) Gtp1cUnitdata ts_GTPC_UpdatePdpRespGGSN(Gtp1cPeer peer, uint16_t seq, OCT4 teid, - OCT1 cause, + template (value) GTP_Cause cause, OCT4 teid_ctrl, OCT4 teid_data, octetstring ggsn_ip_sign, octetstring ggsn_ip_data, OCT4 chg_id, @@ -1245,10 +1252,10 @@ valueof(ts_DeletePdpPDU(nsapi, teardown_ind)), seq) } - template (value) GTPC_PDUs ts_DeletePdpRespPDU(OCT1 cause, + template (value) GTPC_PDUs ts_DeletePdpRespPDU(template (value) GTP_Cause cause := GTP_CAUSE_REQUEST_ACCEPTED, template (omit) ProtConfigOptions pco := omit) := { deletePDPContextResponse := { - cause := { '00'O, cause }, + cause := ts_Cause_gtpc(cause), protConfigOptions := pco, userLocationInformation := omit, mS_TimeZone := omit, @@ -1258,7 +1265,7 @@ } template (value) Gtp1cUnitdata ts_GTPC_DeletePdpResp(Gtp1cPeer peer, uint16_t seq, OCT4 teid, - OCT1 cause, + template (value) GTP_Cause cause := GTP_CAUSE_REQUEST_ACCEPTED, template (omit) ProtConfigOptions pco := omit) := { peer := peer, gtpc := ts_GTP1C_PDU(deletePDPContextResponse, teid, diff --git a/sgsn/BSSGP_ConnHdlr.ttcn b/sgsn/BSSGP_ConnHdlr.ttcn index 33d1f33..1dae0a0 100644 --- a/sgsn/BSSGP_ConnHdlr.ttcn +++ b/sgsn/BSSGP_ConnHdlr.ttcn @@ -699,7 +699,7 @@ octetstring apn optional, /* APN name */ ProtocolConfigOptionsV pco optional, /* protoco config opts */ OCT1 exp_rej_cause optional, /* expected SM reject cause */ - OCT1 gtp_resp_cause, /* GTP response cause */ + GTP_Cause gtp_resp_cause, /* GTP response cause */ OCT4 chg_id, /* GTP Charging Identifier */ OCT4 ggsn_tei_c, /* GGSN TEI Control*/ @@ -892,7 +892,9 @@ if (is_gb(ran_index)) { BSSGP[ran_index].clear; } - GTP[GTP_GGSN_IDX].send(ts_GTPC_DeletePdpResp(g_ud.peer, seq_nr, apars.sgsn_tei_c, '7F'O)); + GTP[GTP_GGSN_IDX].send(ts_GTPC_DeletePdpResp(g_ud.peer, seq_nr, + apars.sgsn_tei_c, + GTP_CAUSE_REQUEST_ACCEPTED)); } alt { [is_gb(ran_index)] BSSGP[ran_index].receive(tr_SM_DEACT_PDP_ACCEPT_MT(apars.tid)); @@ -995,7 +997,7 @@ apn := omit, pco := omit, exp_rej_cause := omit, - gtp_resp_cause := int2oct(128, 1), + gtp_resp_cause := GTP_CAUSE_REQUEST_ACCEPTED, chg_id := f_rnd_octstring(4), /* FIXME: make below dynamic !! */ diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index 92f081d..fe4b086 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -1071,7 +1071,7 @@ private function f_TC_attach_pdp_act_ggsn_reject(charstring id) runs on BSSGP_ConnHdlr { var PdpActPars apars := valueof(t_PdpActPars(mp_ggsn_ip)); - apars.gtp_resp_cause := int2oct(199, 1); /* no resources available */ + apars.gtp_resp_cause := GTP_CAUSE_NO_RESOURCES_AVAILABLE; apars.exp_rej_cause := '1a'O; /* insufficient resources */ /* first perform regular attach */ @@ -1149,7 +1149,9 @@ GTP[GTP_GGSN_IDX].receive(tr_GTPC_MsgType(?, deletePDPContextRequest, apars.ggsn_tei_c)) -> value g_ud { var integer seq_nr := oct2int(g_ud.gtpc.opt_part.sequenceNumber); log("Received deletePDPContextResponse " & int2str(i) & ", seq_nr=" & int2str(seq_nr)); - GTP[GTP_GGSN_IDX].send(ts_GTPC_DeletePdpResp(g_ud.peer, seq_nr, apars.sgsn_tei_c, '7F'O)); + GTP[GTP_GGSN_IDX].send(ts_GTPC_DeletePdpResp(g_ud.peer, seq_nr, + apars.sgsn_tei_c, + GTP_CAUSE_REQUEST_ACCEPTED)); } } @@ -1233,7 +1235,9 @@ /* SGSN currently doesn't send this message because it expects GGSN to be non-reachable anyway */ seq_nr := oct2int(g_ud.gtpc.opt_part.sequenceNumber); log("Received deletePDPContextRequest seq_nr=" & int2str(seq_nr)); - GTP[GTP_GGSN_IDX].send(ts_GTPC_DeletePdpResp(g_ud.peer, seq_nr, apars.sgsn_tei_c, '7F'O)); + GTP[GTP_GGSN_IDX].send(ts_GTPC_DeletePdpResp(g_ud.peer, seq_nr, + apars.sgsn_tei_c, + GTP_CAUSE_REQUEST_ACCEPTED)); repeat; } [] GTP[GTP_GGSN_IDX].receive(tr_GTPC_MsgType(?, echoRequest, ?)) -> value g_ud { @@ -1312,7 +1316,7 @@ f_TC_attach(id); /* Use this CTX ACT to send initial Restart counter to SGSN. */ - apars.gtp_resp_cause := int2oct(199, 1); /* no resources available */ + apars.gtp_resp_cause := GTP_CAUSE_NO_RESOURCES_AVAILABLE; apars.exp_rej_cause := '1a'O; /* insufficient resources */ f_pdp_ctx_act(apars, true); @@ -1329,7 +1333,7 @@ IE. This should trigger the recovery path, but still this specific CTX activation should work. */ apars.exp_rej_cause := omit; /* default value for tests */ - apars.gtp_resp_cause := int2oct(128, 1); /* default value for tests */ + apars.gtp_resp_cause := GTP_CAUSE_REQUEST_ACCEPTED; /* default value for tests */ f_pdp_ctx_act(apars, true); setverdict(pass); @@ -1420,7 +1424,9 @@ } var integer seq_nr := oct2int(g_ud_second.gtpc.opt_part.sequenceNumber); BSSGP[0].clear; - GTP[GTP_GGSN_IDX].send(ts_GTPC_DeletePdpResp(g_ud_second.peer, seq_nr, apars.sgsn_tei_c, '7F'O)); + GTP[GTP_GGSN_IDX].send(ts_GTPC_DeletePdpResp(g_ud_second.peer, seq_nr, + apars.sgsn_tei_c, + GTP_CAUSE_REQUEST_ACCEPTED)); } alt { [] BSSGP[0].receive(tr_SM_DEACT_PDP_ACCEPT_MT(apars.tid)) { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37634?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: Ib071fa97a354cb27263cd46dba8f468b4ddc0018 Gerrit-Change-Number: 37634 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-ci[master]: osmo-depcheck: add osmo-e1d provided libraries
by osmith 26 Jul '24

26 Jul '24
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/37632?usp=email ) Change subject: osmo-depcheck: add osmo-e1d provided libraries ...................................................................... osmo-depcheck: add osmo-e1d provided libraries Change-Id: I3350049d4a944f03fd14594578cd437c474aec4d --- M scripts/osmo-depcheck/config.py 1 file changed, 12 insertions(+), 1 deletion(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/scripts/osmo-depcheck/config.py b/scripts/osmo-depcheck/config.py index e01fffe..708c0ac 100644 --- a/scripts/osmo-depcheck/config.py +++ b/scripts/osmo-depcheck/config.py @@ -43,4 +43,6 @@ "osmo-hlr": ("libosmo-gsup-client"), "osmo-iuh": ("libosmo-ranap"), "osmo-mgw": ("libosmo-mgcp-client", - "libosmo-legacy-mgcp")} + "libosmo-legacy-mgcp"), + "osmo-e1d": ("libosmo-e1d", + "libosmo-octoi")} -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/37632?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I3350049d4a944f03fd14594578cd437c474aec4d Gerrit-Change-Number: 37632 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder 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-ci[master]: osmo-depcheck: add new libosmocore libraries
by osmith 26 Jul '24

26 Jul '24
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/37631?usp=email ) Change subject: osmo-depcheck: add new libosmocore libraries ...................................................................... osmo-depcheck: add new libosmocore libraries Change-Id: I40b8338f9e1e3ff38b7468133e30300b3f2236fb --- M scripts/osmo-depcheck/config.py 1 file changed, 11 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/scripts/osmo-depcheck/config.py b/scripts/osmo-depcheck/config.py index 94a1cb5..e01fffe 100644 --- a/scripts/osmo-depcheck/config.py +++ b/scripts/osmo-depcheck/config.py @@ -30,7 +30,9 @@ "libosmoctrl", "libosmogb", "libosmogsm", + "libosmoisdn", "libosmosim", + "libosmousb", "libosmovty"), "libosmo-abis": ("libosmoabis", "libosmotrau"), -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/37631?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I40b8338f9e1e3ff38b7468133e30300b3f2236fb Gerrit-Change-Number: 37631 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-ci[master]: jobs/osmocom-depcheck: remove
by pespin 26 Jul '24

26 Jul '24
Attention is currently required from: osmith. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/37633?usp=email ) Change subject: jobs/osmocom-depcheck: remove ...................................................................... Patch Set 1: Code-Review+1 (1 comment) Patchset: PS1: This may still be useful in case where a single project is released for instance. I'm not sure we should simply remove it, but you know better. -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/37633?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I8b159ececaed86369fe272ae8a8bf0e88b0effa2 Gerrit-Change-Number: 37633 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Fri, 26 Jul 2024 11:44:23 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ci[master]: osmo-depcheck: add osmo-e1d provided libraries
by pespin 26 Jul '24

26 Jul '24
Attention is currently required from: osmith. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/37632?usp=email ) Change subject: osmo-depcheck: add osmo-e1d provided libraries ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/37632?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I3350049d4a944f03fd14594578cd437c474aec4d Gerrit-Change-Number: 37632 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Fri, 26 Jul 2024 11:43:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • ...
  • 138
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.