slirp.h revision 50bce6f90329f810ed7b9ea1a758f76adba98f61
#ifndef __COMMON_H__
#define __COMMON_H__
#ifdef RT_OS_WINDOWS
# include <winsock2.h>
# include <ws2tcpip.h>
typedef int socklen_t;
typedef int socklen_t;
#define CONFIG_QEMU
#ifdef DEBUG
#ifndef CONFIG_QEMU
# include "version.h"
#ifdef RT_OS_WINDOWS
# include <windows.h>
# include <io.h>
#include "slirp_config.h"
#ifdef RT_OS_WINDOWS
# ifndef _MSC_VER
# include <inttypes.h>
typedef char *caddr_t;
# include <iphlpapi.h>
# define O_BINARY 0
#ifdef HAVE_SYS_BITYPES_H
#ifdef _MSC_VER
# include <time.h>
#ifdef NEED_TYPEDEFS
typedef char int8_t;
typedef unsigned char u_int8_t;
typedef short int16_t;
typedef unsigned short u_int16_t;
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 <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 RT_OS_WINDOWS
#ifndef RT_OS_WINDOWS
#ifdef GETTIMEOFDAY_ONE_ARG
#ifndef HAVE_INET_ATON
#include <fcntl.h>
#ifndef NO_UNIX_SOCKETS
#include <signal.h>
#ifdef HAVE_SYS_SIGNAL_H
#ifndef RT_OS_WINDOWS
#if defined(HAVE_SYS_IOCTL_H)
#ifdef HAVE_SYS_SELECT_H
#ifdef HAVE_SYS_WAIT_H
#ifdef HAVE_SYS_FILIO_H
# include <stdarg.h>
# include <varargs.h>
#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"
#include "bootp.h"
#include "tftp.h"
#include "slirp_state.h"
#ifndef NULL
# define NULL (void *)0
#ifndef HAVE_INDEX
char *index (const char *, int);
#ifndef HAVE_GETHOSTID
long gethostid (void);
#ifndef RT_OS_WINDOWS
#include <netdb.h>
#include "dnsproxy/dnsproxy.h"
/* cksum.c */
#ifndef VBOX_WITH_SLIRP_BSD_MBUF
typedef unsigned int u_int;
#include "in_cksum.h"
/* if.c */
/* ip_input.c */
/* ip_output.c */
/* tcp_input.c */
/* tcp_output.c */
/* tcp_subr.c */
void tcp_respond (PNATState, struct tcpcb *, register struct tcpiphdr *, register struct mbuf *, tcp_seq, tcp_seq, int);
void tcp_drain (void);
/*slirp.c*/
#ifndef RT_OS_WINDOWS
# define min(x, y) ((x) < (y) ? (x) : (y))
# define max(x, y) ((x) > (y) ? (x) : (y))
#ifdef RT_OS_WINDOWS
struct ethhdr
# define NO_FW_PUNCH
# ifdef alias_addr
# ifndef VBOX_SLIRP_BSD
# ifndef __unused
# define __unused
# ifdef DEBUG
# define LIBALIAS_DEBUG
# define fflush(x) do{} while(0)
# include "ext.h"
#ifdef VBOX_WITH_SLIRP_BSD_MBUF
# define max_protohdr 0
# define EVENTHANDLER_INVOKE(a) do{}while(0)
struct dummy_req
void *newptr;
void mbuf_init(void *);