summaryrefslogtreecommitdiffstats
path: root/slirp/tcp.h
diff options
context:
space:
mode:
authorAnthony Liguori2012-04-02 16:46:45 +0200
committerAnthony Liguori2012-04-02 16:46:45 +0200
commitcefc898806e0346eef87d15ddaac9475b57b7d84 (patch)
treece4a6312d22ba96fe33fd4c5f1f2306807a07422 /slirp/tcp.h
parentMerge remote-tracking branch 'stefanha/tracing' into staging (diff)
parentslirp: Signal free input buffer space to io-thread (diff)
downloadqemu-cefc898806e0346eef87d15ddaac9475b57b7d84.tar.gz
qemu-cefc898806e0346eef87d15ddaac9475b57b7d84.tar.xz
qemu-cefc898806e0346eef87d15ddaac9475b57b7d84.zip
Merge remote-tracking branch 'kiszka/queues/slirp' into staging
* kiszka/queues/slirp: slirp: Signal free input buffer space to io-thread w32/slirp: Undefine error constants before their redefinition slirp: use socket_set_nonblock slirp: clean up conflicts with system headers
Diffstat (limited to 'slirp/tcp.h')
-rw-r--r--slirp/tcp.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/slirp/tcp.h b/slirp/tcp.h
index b3817cb13c..82996031e0 100644
--- a/slirp/tcp.h
+++ b/slirp/tcp.h
@@ -45,6 +45,7 @@ typedef uint32_t tcp_seq;
* TCP header.
* Per RFC 793, September, 1981.
*/
+#define tcphdr slirp_tcphdr
struct tcphdr {
uint16_t th_sport; /* source port */
uint16_t th_dport; /* destination port */
@@ -58,12 +59,6 @@ struct tcphdr {
th_off:4; /* data offset */
#endif
uint8_t th_flags;
-#define TH_FIN 0x01
-#define TH_SYN 0x02
-#define TH_RST 0x04
-#define TH_PUSH 0x08
-#define TH_ACK 0x10
-#define TH_URG 0x20
uint16_t th_win; /* window */
uint16_t th_sum; /* checksum */
uint16_t th_urp; /* urgent pointer */
@@ -71,6 +66,16 @@ struct tcphdr {
#include "tcp_var.h"
+#ifndef TH_FIN
+#define TH_FIN 0x01
+#define TH_SYN 0x02
+#define TH_RST 0x04
+#define TH_PUSH 0x08
+#define TH_ACK 0x10
+#define TH_URG 0x20
+#endif
+
+#ifndef TCPOPT_EOL
#define TCPOPT_EOL 0
#define TCPOPT_NOP 1
#define TCPOPT_MAXSEG 2
@@ -86,6 +91,7 @@ struct tcphdr {
#define TCPOPT_TSTAMP_HDR \
(TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP)
+#endif
/*
* Default maximum segment size for TCP.
@@ -95,10 +101,13 @@ struct tcphdr {
*
* We make this 1460 because we only care about Ethernet in the qemu context.
*/
+#undef TCP_MSS
#define TCP_MSS 1460
+#undef TCP_MAXWIN
#define TCP_MAXWIN 65535 /* largest value for (unscaled) window */
+#undef TCP_MAX_WINSHIFT
#define TCP_MAX_WINSHIFT 14 /* maximum window shift */
/*