]> git.proxmox.com Git - mirror_qemu.git/commit - slirp/tcp_subr.c
slirp: Factorizing tcpiphdr structure with an union
authorGuillaume Subiron <maethor@subiron.org>
Tue, 15 Mar 2016 09:31:20 +0000 (10:31 +0100)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 15 Mar 2016 09:35:11 +0000 (10:35 +0100)
commit98c63057d2144fb81681580cd84c13c93794c96e
tree6f8ae513422d915b55210f4bf350c3a051daf1c4
parent15d62af4b6068d1bac1806ca4625b6d4c475eb09
slirp: Factorizing tcpiphdr structure with an union

This patch factorizes the tcpiphdr structure to put the IPv4 fields in
an union, for addition of version 6 in further patch.
Using some macros, retrocompatibility of the existing code is assured.

This patch also fixes the SLIRP_MSIZE and margin computation in various
functions, and makes them compatible with the new tcpiphdr structure,
whose size will be bigger than sizeof(struct tcphdr) + sizeof(struct ip)

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>
slirp/if.h
slirp/mbuf.c
slirp/slirp.c
slirp/socket.c
slirp/tcp_input.c
slirp/tcp_output.c
slirp/tcp_subr.c
slirp/tcpip.h