pespin submitted this change.

View Change


Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved
gmm: Store received PDP Ctx Status and List of Receive N-PDU Numbers

Those IEs are aimed at upper layers (SM, SNDCP) and will be relayed in
follow-up patches.

Change-Id: I3a43b5e0417796f7dce4010cd6a6d3fd2d9c543e
---
M include/osmocom/gprs/gmm/gmm_private.h
M src/gmm/gmm.c
M src/gmm/gmm_pdu.c
3 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/include/osmocom/gprs/gmm/gmm_private.h b/include/osmocom/gprs/gmm/gmm_private.h
index 66ea8d7..46795c8 100644
--- a/include/osmocom/gprs/gmm/gmm_private.h
+++ b/include/osmocom/gprs/gmm/gmm_private.h
@@ -66,6 +66,10 @@

uint8_t radio_prio; /* TS 24.008 10.5.7.2 */
struct gprs_ra_id ra; /* TS 24.008 10.5.5.15 (decoded) */
+ uint8_t pdp_ctx_status[2]; /* TS 24.008 10.5.7.1 */
+ bool rx_npdu_numbers_list_present;
+ uint8_t rx_npdu_numbers_list[17]; /* TS 24.008 10.5.5.11 */
+ uint8_t rx_npdu_numbers_list_len; /* bitmask TS 24.008 10.5.5.11 */

struct {
/* Input params received from network: */
diff --git a/src/gmm/gmm.c b/src/gmm/gmm.c
index 8a293a3..6eaf461 100644
--- a/src/gmm/gmm.c
+++ b/src/gmm/gmm.c
@@ -1084,7 +1084,17 @@
/* TODO: */
}

- /* 10.5.5.11 List of Receive N-PDU Numbers: TODO */
+ /* 10.5.5.11 List of Receive N-PDU Numbers: */
+ if (TLVP_PRES_LEN(&tp, GSM48_IE_GMM_RX_NPDU_NUM_LIST, 2)) {
+ unsigned int ie_len = TLVP_LEN(&tp, GSM48_IE_GMM_RX_NPDU_NUM_LIST);
+ if (ie_len > sizeof(gmme->rx_npdu_numbers_list))
+ ie_len = sizeof(gmme->rx_npdu_numbers_list);
+ gmme->rx_npdu_numbers_list_present = true;
+ gmme->rx_npdu_numbers_list_len = ie_len;
+ memcpy(gmme->rx_npdu_numbers_list, TLVP_VAL(&tp, GSM48_IE_GMM_RX_NPDU_NUM_LIST), ie_len);
+ } else {
+ gmme->rx_npdu_numbers_list_present = false;
+ }

/* 10.5.7.3 Negotiated READY timer value */
if (TLVP_PRESENT(&tp, GSM48_IE_GMM_TIMER_READY)) {
@@ -1111,6 +1121,8 @@

/* 10.5.1.13 Equivalent PLMNs: TODO */
/* 10.5.7.1 PDP context status: TODO */
+ if (TLVP_PRES_LEN(&tp, GSM48_IE_GMM_PDP_CTX_STATUS, 2))
+ memcpy(gmme->pdp_ctx_status, TLVP_VAL(&tp, GSM48_IE_GMM_PDP_CTX_STATUS), 2);

/* TODO: lots more Optional IEs */
}
diff --git a/src/gmm/gmm_pdu.c b/src/gmm/gmm_pdu.c
index 7c83ac5..27c06fd 100644
--- a/src/gmm/gmm_pdu.c
+++ b/src/gmm/gmm_pdu.c
@@ -142,6 +142,7 @@
[GSM48_IE_GMM_TIMER_T3302] = { TLV_TYPE_TLV, 0 },
[GSM48_IE_GMM_AUTH_FAIL_PAR] = { TLV_TYPE_TLV, 0 },
[GSM48_IE_GMM_IMEISV] = { TLV_TYPE_TLV, 0 },
+ [GSM48_IE_GMM_RX_NPDU_NUM_LIST] = { TLV_TYPE_TLV, 0 },
[GSM48_IE_GMM_DRX_PARAM] = { TLV_TYPE_FIXED, 2 },
[GSM48_IE_GMM_MS_NET_CAPA] = { TLV_TYPE_TLV, 0 },
[GSM48_IE_GMM_PDP_CTX_STATUS] = { TLV_TYPE_TLV, 0 },

To view, visit change 33808. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: I3a43b5e0417796f7dce4010cd6a6d3fd2d9c543e
Gerrit-Change-Number: 33808
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin@sysmocom.de>
Gerrit-MessageType: merged