<p style="white-space: pre-wrap; word-wrap: break-word;">This quirk explained in the commit log is a minor detail but it bugs me. If we merge this once, we will always keep this sockaddr_storage as pointer instead of as member chiseled in stone.</p><p style="white-space: pre-wrap; word-wrap: break-word;">The long term perspective could have been to also provide these structs like struct gsm0808_handover_request_ack as the output of decoding in libosmocore, instead of just as input to encoding. So far the situation is that libosmocore can only *encode* BSSAP, but *decoding* is done separately in each program. i.e., osmo-bsc implements TLV parsing of some BSSAP messages, while osmo-msc implements TLV parsing for others.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Now, if at some point I would add a gsm0808_decode_handover_request_ack() function, I would like to provide struct gsm0808_handover_request_ack as out-argument, and I would also like to then have the sockaddr_storage as direct member. Otherwise the caller would need to first populate with a pointer before calling. All possible of course, but rather quirky IMO.</p><p style="white-space: pre-wrap; word-wrap: break-word;">This just because the use of sockaddr_storage isn't properly separated from implementations that get compiled on embedded and can't use it; embedded builds include headers naming struct sockaddr_storage even though the platform doesn't support it, and even function implementations using sockaddr_storage get compiled there but can't ever be used because they have unresolved references to functions handling sockaddr_storage ... meh</p><p style="white-space: pre-wrap; word-wrap: break-word;">If we reshuffled the files to separate sockaddr_storage from embedded properly, we could include netinet/in.h directly in gsm0808.h and just use struct sockaddr_* as members.</p><p style="white-space: pre-wrap; word-wrap: break-word;">A similar quirk shows up in that osmo_ip_port patch, I have to carefully navigate around what includes what.</p><p style="white-space: pre-wrap; word-wrap: break-word;">In the regression tests, it is even weirder. There is an "if ENABLE_MSGFILE" in testsuite.at, but an 'if' like that doesn't seem to have any effect at all. So we can't actually exclude individual tests on embedded. How does that work, we just don't run any tests there apparently?</p><p style="white-space: pre-wrap; word-wrap: break-word;">What do you guys think, should I try to separate sockaddr_storage from embedded builds before merging (or releasing) this, or is this a can of worms and incompatibilities that will suck me into realms where I don't want to go?</p><p><a href="https://gerrit.osmocom.org/13259">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.osmocom.org/13259">change 13259</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/13259"/><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: comment </div>
<div style="display:none"> Gerrit-Change-Id: Ia71542ea37d4fd2c9fb9b40357db7aeb111ec576 </div>
<div style="display:none"> Gerrit-Change-Number: 13259 </div>
<div style="display:none"> Gerrit-PatchSet: 6 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Fri, 15 Mar 2019 05:05:23 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-HasLabels: No </div>