slirp.h revision a68b0110cd3338c318b355c0ac5ac72f92e510b7
2N/A#ifndef __COMMON_H__
2N/A#define __COMMON_H__
2N/A# include <winsock2.h>
2N/A#define CONFIG_QEMU
2N/A#ifndef CONFIG_QEMU
2N/A#include "slirp_config.h"
2N/A# include <inttypes.h>
2N/A# include <iphlpapi.h>
2N/A#ifdef HAVE_SYS_BITYPES_H
2N/A#ifdef NEED_TYPEDEFS
typedef int int16_t;
typedef unsigned int u_int16_t;
typedef short int32_t;
typedef unsigned short u_int32_t;
typedef int int32_t;
typedef unsigned int u_int32_t;
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#ifndef HAVE_MEMMOVE
# include <time.h>
# if HAVE_SYS_TIME_H
# include <time.h>
#ifdef HAVE_STRING_H
# include <string.h>
# include <strings.h>
#ifndef _WIN32
#ifndef _P
#ifndef NO_PROTOTYPES
# define _P(x) x
# define _P(x) ()
#ifndef _WIN32
#ifdef GETTIMEOFDAY_ONE_ARG
/* Systems lacking strdup() definition in <string.h>. */
#if defined(ultrix)
/* Systems lacking malloc() definition in <stdlib.h>. */
#ifndef HAVE_INET_ATON
#include <fcntl.h>
#ifndef NO_UNIX_SOCKETS
#include <signal.h>
#ifdef HAVE_SYS_SIGNAL_H
#ifndef _WIN32
#if defined(HAVE_SYS_IOCTL_H)
#ifdef HAVE_SYS_SELECT_H
#ifdef HAVE_SYS_WAIT_H
#ifdef HAVE_SYS_FILIO_H
#ifdef USE_PPP
#include <stdarg.h>
#include <varargs.h>
#ifndef _MSC_VER
#ifdef HAVE_SYS_STROPTS_H
#include "libslirp.h"
#include "debug.h"
#include "ip.h"
#include "tcp.h"
#include "tcp_timer.h"
#include "tcp_var.h"
#include "tcpip.h"
#include "udp.h"
#include "icmp_var.h"
#include "mbuf.h"
#include "sbuf.h"
#include "socket.h"
#include "if.h"
#include "main.h"
#include "misc.h"
#include "ctl.h"
#ifdef USE_PPP
#include "bootp.h"
#include "tftp.h"
#include "slirp_state.h"
#ifndef NULL
#define NULL (void *)0
#ifdef BAD_SPRINTF
#ifdef DECLARE_SPRINTF
# ifndef BAD_SPRINTF
#ifndef HAVE_STRERROR
#ifndef HAVE_INDEX
#ifndef HAVE_GETHOSTID
#ifdef LOG_ENABLED
extern int do_echo;
# ifdef _MSC_VER
#ifndef _WIN32
#include <netdb.h>
/* cksum.c */
/* if.c */
/* ip_input.c */
/* ip_output.c */
/* tcp_input.c */
/* tcp_output.c */
/* tcp_subr.c */
void tcp_respond _P((PNATState, struct tcpcb *, register struct tcpiphdr *, register struct mbuf *, tcp_seq, tcp_seq, int));
#ifdef USE_PPP
#ifndef _WIN32
#define min(x,y) ((x) < (y) ? (x) : (y))
#define max(x,y) ((x) > (y) ? (x) : (y))
#ifdef _WIN32