Revision b7221056

b/slirp/slirp.h
88 88
void free(void *ptr);
89 89
#endif
90 90

  
91
#ifndef HAVE_INET_ATON
92
int inet_aton(const char *cp, struct in_addr *ia);
93
#endif
94

  
95 91
#include <fcntl.h>
96 92
#ifndef NO_UNIX_SOCKETS
97 93
#include <sys/un.h>
......
144 140
#include "debug.h"
145 141

  
146 142
#include "qemu-queue.h"
143
#include "qemu_socket.h"
147 144

  
148 145
#include "libslirp.h"
149 146
#include "ip.h"
......
167 164
#include "bootp.h"
168 165
#include "tftp.h"
169 166

  
170
/* osdep.c */
171
int qemu_socket(int domain, int type, int protocol);
172

  
173 167
#define ETH_ALEN 6
174 168
#define ETH_HLEN 14
175 169

  
b/slirp/tcp.h
45 45
 * TCP header.
46 46
 * Per RFC 793, September, 1981.
47 47
 */
48
#define tcphdr slirp_tcphdr
48 49
struct tcphdr {
49 50
	uint16_t th_sport;              /* source port */
50 51
	uint16_t th_dport;              /* destination port */
......
58 59
		th_off:4;		/* data offset */
59 60
#endif
60 61
	uint8_t th_flags;
61
#define	TH_FIN	0x01
62
#define	TH_SYN	0x02
63
#define	TH_RST	0x04
64
#define	TH_PUSH	0x08
65
#define	TH_ACK	0x10
66
#define	TH_URG	0x20
67 62
	uint16_t th_win;                /* window */
68 63
	uint16_t th_sum;                /* checksum */
69 64
	uint16_t th_urp;                /* urgent pointer */
......
71 66

  
72 67
#include "tcp_var.h"
73 68

  
69
#ifndef TH_FIN
70
#define	TH_FIN	0x01
71
#define	TH_SYN	0x02
72
#define	TH_RST	0x04
73
#define	TH_PUSH	0x08
74
#define	TH_ACK	0x10
75
#define	TH_URG	0x20
76
#endif
77

  
78
#ifndef TCPOPT_EOL
74 79
#define	TCPOPT_EOL		0
75 80
#define	TCPOPT_NOP		1
76 81
#define	TCPOPT_MAXSEG		2
......
86 91

  
87 92
#define TCPOPT_TSTAMP_HDR	\
88 93
    (TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP)
94
#endif
89 95

  
90 96
/*
91 97
 * Default maximum segment size for TCP.
......
95 101
 *
96 102
 * We make this 1460 because we only care about Ethernet in the qemu context.
97 103
 */
104
#undef TCP_MSS
98 105
#define	TCP_MSS	1460
99 106

  
107
#undef TCP_MAXWIN
100 108
#define	TCP_MAXWIN	65535	/* largest value for (unscaled) window */
101 109

  
110
#undef TCP_MAX_WINSHIFT
102 111
#define TCP_MAX_WINSHIFT	14	/* maximum window shift */
103 112

  
104 113
/*

Also available in: Unified diff