summaryrefslogtreecommitdiff
path: root/slirp/tcpip.h
diff options
context:
space:
mode:
authorGuillaume Subiron <maethor@subiron.org>2016-03-15 10:31:21 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-03-15 10:35:19 +0100
commit3feea4447f1b9b04816ee6977b5ecc0eb704e07a (patch)
treefc7a5cb36318171ffd51c4698a5517429b9a9e55 /slirp/tcpip.h
parent1252cf40a83ed91e0ee30cc5f206ce9372c640d8 (diff)
slirp: Handle IPv6 in TCP functions
This patch adds IPv6 case in TCP functions refactored by the last patches. This also adds IPv6 pseudo-header in tcpiphdr structure. Finally, tcp_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 'slirp/tcpip.h')
-rw-r--r--slirp/tcpip.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/slirp/tcpip.h b/slirp/tcpip.h
index 3c5d1275df..124b4a9f62 100644
--- a/slirp/tcpip.h
+++ b/slirp/tcpip.h
@@ -45,6 +45,12 @@ struct tcpiphdr {
uint8_t ih_x1; /* (unused) */
uint8_t ih_pr; /* protocol */
} ti_i4;
+ struct {
+ struct in6_addr ih_src;
+ struct in6_addr ih_dst;
+ uint8_t ih_x1;
+ uint8_t ih_nh;
+ } ti_i6;
} ti;
uint16_t ti_x0;
uint16_t ti_len; /* protocol length */
@@ -54,6 +60,9 @@ struct tcpiphdr {
#define ti_pr ti.ti_i4.ih_pr
#define ti_src ti.ti_i4.ih_src
#define ti_dst ti.ti_i4.ih_dst
+#define ti_src6 ti.ti_i6.ih_src
+#define ti_dst6 ti.ti_i6.ih_dst
+#define ti_nh6 ti.ti_i6.ih_nh
#define ti_sport ti_t.th_sport
#define ti_dport ti_t.th_dport
#define ti_seq ti_t.th_seq