aboutsummaryrefslogtreecommitdiff
path: root/socket.h
diff options
context:
space:
mode:
authorGuillaume Subiron <maethor@subiron.org>2016-03-15 10:31:20 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-03-15 10:35:08 +0100
commit5323d22ecdfcdde00865c9af9eb8e03a9d759762 (patch)
treedaac4908f956991dc1289d0bcc5e4611173f22f1 /socket.h
parentc274a8197c5073560285de2bcdf7989f595710ca (diff)
downloadslirp-5323d22ecdfcdde00865c9af9eb8e03a9d759762.zip
slirp-5323d22ecdfcdde00865c9af9eb8e03a9d759762.tar.gz
slirp-5323d22ecdfcdde00865c9af9eb8e03a9d759762.tar.bz2
slirp: Adding IPv6 UDP support
This adds the sin6 case in the fhost and lhost unions and related macros. It adds udp6_input() and udp6_output(). It adds the IPv6 case in sorecvfrom(). Finally, udp_input() is called by ip6_input(). Signed-off-by: Guillaume Subiron <maethor@subiron.org> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'socket.h')
-rw-r--r--socket.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/socket.h b/socket.h
index 62c66d6..dc28728 100644
--- a/socket.h
+++ b/socket.h
@@ -34,17 +34,23 @@ struct socket {
union { /* foreign host */
struct sockaddr_storage ss;
struct sockaddr_in sin;
+ struct sockaddr_in6 sin6;
} fhost;
#define so_faddr fhost.sin.sin_addr
#define so_fport fhost.sin.sin_port
+#define so_faddr6 fhost.sin6.sin6_addr
+#define so_fport6 fhost.sin6.sin6_port
#define so_ffamily fhost.ss.ss_family
union { /* local host */
struct sockaddr_storage ss;
struct sockaddr_in sin;
+ struct sockaddr_in6 sin6;
} lhost;
#define so_laddr lhost.sin.sin_addr
#define so_lport lhost.sin.sin_port
+#define so_laddr6 lhost.sin6.sin6_addr
+#define so_lport6 lhost.sin6.sin6_port
#define so_lfamily lhost.ss.ss_family
uint8_t so_iptos; /* Type of service */