<p></p>
<p><b>@benpicco</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/16494#discussion_r684228781">sys/net/gnrc/sock/tcp/gnrc_sock_tcp.c</a>:</p>
<pre style='color:#555'>> +    return gnrc_tcp_get_local(tcb, local);
+}
+
+int sock_tcp_get_remote(sock_tcp_t *sock, sock_tcp_ep_t *ep)
+{
+    /* Asserts defined by API. */
+    assert(sock != NULL);
+    assert(ep != NULL);
+
+    /* Asserts to protect GNRC_TCP. */
+    assert(sizeof(sock_tcp_t) == sizeof(gnrc_tcp_tcb_t));
+    assert(sizeof(sock_tcp_ep_t) == sizeof(gnrc_tcp_ep_t));
+
+    /* NOTE: GNRC_TCP and GNRC_SOCK_TCP types must have the same memory representation. */
+    gnrc_tcp_tcb_t *tcb = (gnrc_tcp_tcb_t *) sock;
+    gnrc_tcp_ep_t *remote = (gnrc_tcp_ep_t *) ep;
</pre>
<p>I don't see how implicitly relying that those two structs are the same is any better than including a generic header file <g-emoji class="g-emoji" alias="fearful" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f628.png">😨</g-emoji></p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/16494#discussion_r684228781">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYA6VXIEBHRH254KB63T3POOBANCNFSM45KSNSZA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email">Android</a>.<img src="https://github.com/notifications/beacon/ABE7WYFISSFOM3CSXSWRBDDT3POOBA5CNFSM45KSNSZKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOFMWK42Q.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/16494#discussion_r684228781",
"url": "https://github.com/RIOT-OS/RIOT/pull/16494#discussion_r684228781",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>