slirp: Make Socket structure IPv6 compatible
commiteae303ff23f51259eddc8856c71453d887ffe51a
authorGuillaume Subiron <maethor@subiron.org>
Sat, 19 Dec 2015 21:24:58 +0000 (19 22:24 +0100)
committerJason Wang <jasowang@redhat.com>
Thu, 4 Feb 2016 05:22:06 +0000 (4 13:22 +0800)
treee6ebb289e43d60bb5687264b5fc88dae2a595b03
parent18137fba35980de428664fca3576b5d187e96fef
slirp: Make Socket structure IPv6 compatible

This patch replaces foreign and local address/port couples in Socket
structure by 2 sockaddr_storage which can be casted in sockaddr_in.
Direct access to address and port is still possible thanks to some
\#define, so retrocompatibility of the existing code is assured.

The ss_family field of sockaddr_storage is declared after each socket
creation.

The whole structure is also saved/restored when a Qemu session is
saved/restored.

This prepares for IPv6 support.

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>
Signed-off-by: Jason Wang <jasowang@redhat.com>
slirp/ip_icmp.c
slirp/slirp.c
slirp/socket.c
slirp/socket.h
slirp/tcp_input.c
slirp/tcp_subr.c
slirp/udp.c