<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-pcu/+/16537">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Support Gb PAGING-CS<br><br>The paging is sent over PACCH towards MS with an active TBF.<br><br>Related: OS#2406<br>Change-Id: I9501e02e1d7f6944497e724dbccb9a19c3f5221f<br>---<br>M src/gprs_bssgp_pcu.cpp<br>1 file changed, 30 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/37/16537/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp</span><br><span>index 67c8653..983c22c 100644</span><br><span>--- a/src/gprs_bssgp_pcu.cpp</span><br><span>+++ b/src/gprs_bssgp_pcu.cpp</span><br><span>@@ -173,6 +173,33 @@</span><br><span>                         ms_class, egprs_ms_class, delay_csec, data, len);</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+static int gprs_bssgp_pcu_rx_paging_cs(struct msgb *msg, struct tlv_parsed *tp)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+        uint8_t identity_lv[9];</span><br><span style="color: hsl(120, 100%, 40%);">+       uint8_t *chan_needed = (uint8_t *)TLVP_VAL(tp, BSSGP_IE_CHAN_NEEDED);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       if (TLVP_PRESENT(tp, BSSGP_IE_TMSI)) {</span><br><span style="color: hsl(120, 100%, 40%);">+                identity_lv[0] = TLVP_LEN(tp, BSSGP_IE_TMSI);</span><br><span style="color: hsl(120, 100%, 40%);">+         if (identity_lv[0] >= sizeof(identity_lv)) {</span><br><span style="color: hsl(120, 100%, 40%);">+                       LOGP(DBSSGP, LOGL_NOTICE, "TMSI IE too big (%" PRIu8 ")\n", identity_lv[0]);</span><br><span style="color: hsl(120, 100%, 40%);">+                      return bssgp_tx_status(BSSGP_CAUSE_COND_IE_ERR, NULL, msg);</span><br><span style="color: hsl(120, 100%, 40%);">+           }</span><br><span style="color: hsl(120, 100%, 40%);">+             memcpy(&identity_lv[1], TLVP_VAL(tp, BSSGP_IE_TMSI), identity_lv[0]);</span><br><span style="color: hsl(120, 100%, 40%);">+     } else if (TLVP_PRESENT(tp, BSSGP_IE_IMSI)) { /* Use IMSI if TMSI not available: */</span><br><span style="color: hsl(120, 100%, 40%);">+           identity_lv[0] = TLVP_LEN(tp, BSSGP_IE_IMSI);</span><br><span style="color: hsl(120, 100%, 40%);">+         if (identity_lv[0] >= sizeof(identity_lv)) {</span><br><span style="color: hsl(120, 100%, 40%);">+                       LOGP(DBSSGP, LOGL_NOTICE, "IMSI IE too big (%" PRIu8 ")\n", identity_lv[0]);</span><br><span style="color: hsl(120, 100%, 40%);">+                      return bssgp_tx_status(BSSGP_CAUSE_COND_IE_ERR, NULL, msg);</span><br><span style="color: hsl(120, 100%, 40%);">+           }</span><br><span style="color: hsl(120, 100%, 40%);">+             memcpy(&identity_lv[1], TLVP_VAL(tp, BSSGP_IE_IMSI), identity_lv[0]);</span><br><span style="color: hsl(120, 100%, 40%);">+     } else {</span><br><span style="color: hsl(120, 100%, 40%);">+              LOGP(DBSSGP, LOGL_ERROR, "No IMSI\n");</span><br><span style="color: hsl(120, 100%, 40%);">+              return bssgp_tx_status(BSSGP_CAUSE_COND_IE_ERR, NULL, msg);</span><br><span style="color: hsl(120, 100%, 40%);">+   }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   return BTS::main_bts()->add_paging(chan_needed ? *chan_needed : 0, identity_lv);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> static int gprs_bssgp_pcu_rx_paging_ps(struct msgb *msg, struct tlv_parsed *tp)</span><br><span> {</span><br><span>     uint8_t identity_lv[9];</span><br><span>@@ -311,6 +338,9 @@</span><br><span>                        the_pcu.bvc_reset = 1;</span><br><span>               bvc_timeout(NULL);</span><br><span>           break;</span><br><span style="color: hsl(120, 100%, 40%);">+        case BSSGP_PDUT_PAGING_CS:</span><br><span style="color: hsl(120, 100%, 40%);">+            gprs_bssgp_pcu_rx_paging_cs(msg, tp);</span><br><span style="color: hsl(120, 100%, 40%);">+         break;</span><br><span>       case BSSGP_PDUT_PAGING_PS:</span><br><span>           gprs_bssgp_pcu_rx_paging_ps(msg, tp);</span><br><span>                break;</span><br><span>@@ -323,7 +353,6 @@</span><br><span>                 break;</span><br><span>       case BSSGP_PDUT_SUSPEND_NACK:</span><br><span>        case BSSGP_PDUT_RESUME_NACK:</span><br><span style="color: hsl(0, 100%, 40%);">-    case BSSGP_PDUT_PAGING_CS:</span><br><span>   case BSSGP_PDUT_FLUSH_LL:</span><br><span>    case BSSGP_PDUT_SGSN_INVOKE_TRACE:</span><br><span>           LOGP(DBSSGP, LOGL_INFO, "Rx BSSGP BVCI=%d (SIGN) PDU type %s not implemented\n",</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-pcu/+/16537">change 16537</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-pcu/+/16537"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-pcu </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I9501e02e1d7f6944497e724dbccb9a19c3f5221f </div>
<div style="display:none"> Gerrit-Change-Number: 16537 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>