[riot-notifications] [RIOT-OS/RIOT] gnrc_sock_tcp: add gnrc sock tcp (#16494)
notifications at github.com
Fri Aug 6 15:53:12 CEST 2021
@benpicco commented on this pull request.
> + 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;
In `sys/net/gnrc/sock/tcp/gnrc_sock_tcp.c` you include `net/sock/tcp.h` which in turn includes `net/sock.h`
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications