[Slirp] [Git][slirp/libslirp][master] TODO for generalizing the hostfwd calls
Samuel Thibault
gitlab at gitlab.freedesktop.org
Sun Feb 28 21:42:04 UTC 2021
Samuel Thibault pushed to branch master at slirp / libslirp
Commits:
4873017e by Samuel Thibault at 2021-02-28T22:41:59+01:00
TODO for generalizing the hostfwd calls
- - - - -
3 changed files:
- src/libslirp.h
- src/socket.c
- src/udp.c
Changes:
=====================================
src/libslirp.h
=====================================
@@ -166,6 +166,7 @@ int slirp_add_hostfwd(Slirp *slirp, int is_udp, struct in_addr host_addr,
int host_port, struct in_addr guest_addr, int guest_port);
int slirp_remove_hostfwd(Slirp *slirp, int is_udp, struct in_addr host_addr,
int host_port);
+/* TODO: rather introduce a function that takes two sockaddr */
int slirp_add_ipv6_hostfwd(Slirp *slirp, int is_udp,
struct in6_addr host_addr, int host_port,
struct in6_addr guest_addr, int guest_port);
=====================================
src/socket.c
=====================================
@@ -832,6 +832,8 @@ static struct socket *tcpx_listen(Slirp *slirp, int family,
return so;
}
+/* TODO: rather fuse tcp_listen and tcp6_listen into tcp_listen that takes two
+ * sockaddr */
struct socket *tcp_listen(Slirp *slirp, uint32_t haddr, unsigned hport,
uint32_t laddr, unsigned lport, int flags)
{
=====================================
src/udp.c
=====================================
@@ -415,6 +415,8 @@ static struct socket *udpx_listen(Slirp *slirp, int family,
return so;
}
+/* TODO: rather fuse udp_listen and udp6_listen into udp_listen that takes two
+ * sockaddr */
struct socket *udp_listen(Slirp *slirp, uint32_t haddr, unsigned hport,
uint32_t laddr, unsigned lport, int flags)
{
View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/-/commit/4873017efa263636d8082b28730c5e738944a0e0
--
View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/-/commit/4873017efa263636d8082b28730c5e738944a0e0
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/slirp/attachments/20210228/5bef2b25/attachment-0001.htm>
More information about the Slirp
mailing list