<p>fixeria <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/22758">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">tlv: add msgb_tv32_put(), similar to msgb_tv16_put()<br><br>Change-Id: I11301b20038aa5d90d46d968f7eda3d53b560022<br>---<br>M include/osmocom/gsm/tlv.h<br>1 file changed, 10 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/osmocom/gsm/tlv.h b/include/osmocom/gsm/tlv.h</span><br><span>index fe057f4..bcdebb3 100644</span><br><span>--- a/include/osmocom/gsm/tlv.h</span><br><span>+++ b/include/osmocom/gsm/tlv.h</span><br><span>@@ -414,6 +414,16 @@</span><br><span>    return tv16_put(buf, tag, val);</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/*! put (append) a TV32 field to a \ref msgb</span><br><span style="color: hsl(120, 100%, 40%);">+ *  \returns pointer to first byte after newly-put information */</span><br><span style="color: hsl(120, 100%, 40%);">+static inline uint8_t *msgb_tv32_put(struct msgb *msg, uint8_t tag, uint32_t val)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+       uint8_t *buf = msgb_put(msg, 1 + 4);</span><br><span style="color: hsl(120, 100%, 40%);">+  *buf++ = tag;</span><br><span style="color: hsl(120, 100%, 40%);">+ osmo_store32be(val, buf);</span><br><span style="color: hsl(120, 100%, 40%);">+     return msg->tail;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /*! push (prepend) a TLV field to a \ref msgb</span><br><span>  *  \returns pointer to first byte of newly-pushed information */</span><br><span> static inline uint8_t *msgb_tlv_push(struct msgb *msg, uint8_t tag, uint8_t len, const uint8_t *val)</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/22758">change 22758</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/libosmocore/+/22758"/><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-Change-Id: I11301b20038aa5d90d46d968f7eda3d53b560022 </div>
<div style="display:none"> Gerrit-Change-Number: 22758 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>