aboutsummaryrefslogtreecommitdiff
path: root/if.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:11 +0100
commit59ec4a16cee98e0103d008f5d49ea0236ac49bbd (patch)
treedc7be38090b148bd49043716b0916bfe1d4a41d6 /if.h
parent5323d22ecdfcdde00865c9af9eb8e03a9d759762 (diff)
downloadslirp-59ec4a16cee98e0103d008f5d49ea0236ac49bbd.zip
slirp-59ec4a16cee98e0103d008f5d49ea0236ac49bbd.tar.gz
slirp-59ec4a16cee98e0103d008f5d49ea0236ac49bbd.tar.bz2
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>
Diffstat (limited to 'if.h')
-rw-r--r--if.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/if.h b/if.h
index 6ee566d..44e4774 100644
--- a/if.h
+++ b/if.h
@@ -17,7 +17,7 @@
#define IF_MRU 1500
#define IF_COMP IF_AUTOCOMP /* Flags for compression */
-/* 2 for alignment, 14 for ethernet, 40 for TCP/IP */
-#define IF_MAXLINKHDR (2 + 14 + 40)
+/* 2 for alignment, 14 for ethernet */
+#define IF_MAXLINKHDR (2 + ETH_HLEN)
#endif