pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/33001 )
Change subject: gmm: Implement rx GMM STATUS msg ......................................................................
gmm: Implement rx GMM STATUS msg
Change-Id: I46719a3bf6d5e93e25f41f01f5c2ab889ff62803 --- M src/gmm/gmm.c 1 file changed, 29 insertions(+), 0 deletions(-)
Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved
diff --git a/src/gmm/gmm.c b/src/gmm/gmm.c index 2fb341e..f4fdd6c 100644 --- a/src/gmm/gmm.c +++ b/src/gmm/gmm.c @@ -1223,6 +1223,23 @@ return rc; }
+/* Rx GMM Status, 9.4.18 */ +static int gprs_gmm_rx_status(struct gprs_gmm_entity *gmme, struct gsm48_hdr *gh, unsigned int len) +{ + enum gsm48_gmm_cause cause; + + if (len < sizeof(struct gsm48_hdr) + 1) { + LOGGMME(gmme, LOGL_ERROR, "Rx GMM STATUS with wrong size %u\n", len); + return -EINVAL; + } + + cause = gh->data[0]; + LOGGMME(gmme, LOGL_INFO, "Rx GMM STATUS cause=0x%02x '%s'\n", + cause, get_value_string(gsm48_gmm_cause_names, cause)); + + return 0; +} + /* Rx GPRS Mobility Management. */ int gprs_gmm_rx(struct gprs_gmm_entity *gmme, struct gsm48_hdr *gh, unsigned int len) { @@ -1250,6 +1267,9 @@ case GSM48_MT_GMM_AUTH_CIPH_REQ: rc = gprs_gmm_rx_auth_ciph_req(gmme, gh, len); break; + case GSM48_MT_GMM_STATUS: + rc = gprs_gmm_rx_status(gmme, gh, len); + break; default: LOGGMME(gmme, LOGL_ERROR, "Rx GMM message not implemented! type=%u len=%u\n",