<p>Neels Hofmeyr has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/13580">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">add osmo_bssap_tlv_parse2() for multiple identical T<br><br>In BSSMAP messages, at least the Cell Identifier IE can appear more than once.<br><br>We have tlv_parse2() which allows decoding into an array of tlv_parsed to<br>cleanly handle multiple occurences. Hence add osmo_bssap_tlv_parse2() which<br>supports multiple occurences.<br><br>An alternative would be to directly call tlv_parse2() with gsm0808_att_tlvdef()<br>when multiple T occurences are needed, and I'm not really sure why<br>osmo_bssap_tlv_parse() exists in the first place. But because it does, add a<br>similar definition that is capable of handling multiple IEs with identical Tag<br>discriminator.<br><br>Change-Id: Ib9a2095f7498dc2cda2a57154b2dbe4621df72f8<br>---<br>M include/osmocom/gsm/gsm0808.h<br>1 file changed, 3 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/80/13580/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h</span><br><span>index b31f07d..a4e63a9 100644</span><br><span>--- a/include/osmocom/gsm/gsm0808.h</span><br><span>+++ b/include/osmocom/gsm/gsm0808.h</span><br><span>@@ -305,6 +305,9 @@</span><br><span> </span><br><span> /*! Parse BSSAP TLV structure using \ref tlv_parse */</span><br><span> #define osmo_bssap_tlv_parse(dec, buf, len) tlv_parse(dec, gsm0808_att_tlvdef(), buf, len, 0, 0)</span><br><span style="color: hsl(120, 100%, 40%);">+/*! Parse BSSAP TLV structure using \ref tlv_parse2 */</span><br><span style="color: hsl(120, 100%, 40%);">+#define osmo_bssap_tlv_parse2(dec, dec_multiples, buf, len) \</span><br><span style="color: hsl(120, 100%, 40%);">+ tlv_parse2(dec, dec_multiples, gsm0808_att_tlvdef(), buf, len, 0, 0)</span><br><span> </span><br><span> const char *gsm0808_bssmap_name(uint8_t msg_type);</span><br><span> const char *gsm0808_bssap_name(uint8_t msg_type);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/13580">change 13580</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/13580"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ib9a2095f7498dc2cda2a57154b2dbe4621df72f8 </div>
<div style="display:none"> Gerrit-Change-Number: 13580 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>