<p style="white-space: pre-wrap; word-wrap: break-word;">I'm not opposed to merging this, I'm just raising some random questions that come to my mind.  Feel free to use or ignore them.  To me it seems like quite a bit of extra "abstraction" for what is essentialy containing the exact same information as sockaddr_storage.</p><p><a href="https://gerrit.osmocom.org/13123">View Change</a></p><p>3 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/13123/4/include/osmocom/core/ip_port.h">File include/osmocom/core/ip_port.h:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/13123/4/include/osmocom/core/ip_port.h@47">Patch Set #4, Line 47:</a> <code style="font-family:monospace,monospace">osmo_ip_port</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">basically this looks like you're reinventing sockaddr_storage which is usually typecast to sockaddr_in / sockaddr_in6?</p><p style="white-space: pre-wrap; word-wrap: break-word;">I guess the only difference is that you're keeping the ip address as string, where as sockaddr_* keeps it in binary format.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Is that really worth it?  Could we not simply have a set of utility functions that work on sockaddr_storage instead?  O r are our accesses 99% of the time for the string, and we basically want to cache the string and avoid converting from binary to string all the time?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/13123/4/include/osmocom/core/ip_port.h@51">Patch Set #4, Line 51:</a> <code style="font-family:monospace,monospace">46</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">there is a #define for the maximum length of an IPv6 address in string format somewhere in libc, AFAIR</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/13123/4/include/osmocom/core/ip_port.h@80">Patch Set #4, Line 80:</a> <code style="font-family:monospace,monospace">osmo_ip_port_to_32</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">normal convention in osmocom is lke memcpy(): Output argument is first, followed by input argument[s].</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/13123">change 13123</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/13123"/><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: Id617265337f09dfb6ddfe111ef5e578cd3dc9f63 </div>
<div style="display:none"> Gerrit-Change-Number: 13123 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </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-CC: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 05 Mar 2019 10:05:32 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>