pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/32051 )
Change subject: layer23: rlcmac: Support GMM detaching from VTY ...................................................................... layer23: rlcmac: Support GMM detaching from VTY Related: OS#5501 Depends: libosmo-gprs.git Change-Id If6cbb1d425b3a9f713348f1dea4747e2b6be0a44 Change-Id: Idca0bff6fc3e6a16b5e8379eae3315e3af012d78 --- M src/host/layer23/src/modem/vty.c 1 file changed, 39 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/51/32051/1 diff --git a/src/host/layer23/src/modem/vty.c b/src/host/layer23/src/modem/vty.c index 0d13c93..69848df 100644 --- a/src/host/layer23/src/modem/vty.c +++ b/src/host/layer23/src/modem/vty.c @@ -172,7 +172,33 @@ gmm_prim->gmmreg.attach_req.attach_type = OSMO_GPRS_GMM_ATTACH_TYPE_GPRS; if (osmo_gprs_gmm_prim_upper_down(gmm_prim) != 0) { - vty_out(vty, "Failed to enqueue an GMM PDU%s", VTY_NEWLINE); + vty_out(vty, "Failed to enqueue a GMM PDU%s", VTY_NEWLINE); + return CMD_WARNING; + } + + return CMD_SUCCESS; +} + +DEFUN_HIDDEN(test_gmm_reg_detach, + test_gmm_reg_detach_cmd, + "test MS_NAME gmm detach", + TEST_CMD_DESC MS_NAME_DESC GMM_CMDG_DESC + "Enqueue a GMM GMMREG-DETACH.req for transmission\n") +{ + struct osmo_gprs_gmm_prim *gmm_prim; + const uint32_t tlli = 0xe1c5d364; + struct osmocom_ms *ms; + + if ((ms = l23_vty_get_ms(argv[0], vty)) == NULL) + return CMD_WARNING; + + gmm_prim = osmo_gprs_gmm_prim_alloc_gmmreg_detach_req(); + gmm_prim->gmmreg.detach_req.ptmsi = tlli; + gmm_prim->gmmreg.detach_req.detach_type = OSMO_GPRS_GMM_DETACH_MS_TYPE_GPRS; + gmm_prim->gmmreg.detach_req.poweroff_type = OSMO_GPRS_GMM_DETACH_POWEROFF_TYPE_NORMAL; + + if (osmo_gprs_gmm_prim_upper_down(gmm_prim) != 0) { + vty_out(vty, "Failed to enqueue a GMM PDU%s", VTY_NEWLINE); return CMD_WARNING; } @@ -363,6 +389,7 @@ install_element_ve(&test_llc_unitdata_req_hexpdu_cmd); install_element_ve(&test_llc_unitdata_req_gmm_attch_cmd); install_element_ve(&test_gmm_reg_attach_cmd); + install_element_ve(&test_gmm_reg_detach_cmd); install_element(CONFIG_NODE, &l23_cfg_ms_cmd); install_element(MS_NODE, &cfg_ms_apn_cmd); -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/32051 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Idca0bff6fc3e6a16b5e8379eae3315e3af012d78 Gerrit-Change-Number: 32051 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pes...@sysmocom.de> Gerrit-MessageType: newchange