/* Copyright (c) 2003-2004, Roger Dingledine * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson. * Copyright (c) 2007-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ #ifndef TOR_COMPAT_H #define TOR_COMPAT_H #include "orconfig.h" #ifdef _WIN32 #include #include #ifndef SIO_IDEAL_SEND_BACKLOG_QUERY #define SIO_IDEAL_SEND_BACKLOG_QUERY 0x4004747b #endif #endif #include "lib/cc/torint.h" #include "lib/testsupport/testsupport.h" #ifdef HAVE_SYS_PARAM_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_SYS_TIME_H #include #endif #ifdef HAVE_TIME_H #include #endif #ifdef HAVE_STRING_H #include #endif #include #ifdef HAVE_SYS_RESOURCE_H #include #endif #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_NETINET_IN_H #include #endif #ifdef HAVE_NETINET6_IN6_H #include #endif #include "lib/cc/compat_compiler.h" #include "lib/arch/bytes.h" #include "lib/time/compat_time.h" #include "lib/string/compat_ctype.h" #include "lib/string/compat_string.h" #include "lib/string/printf.h" #include "lib/log/win32err.h" #include "lib/net/socket.h" #include "lib/net/ipv4.h" #include "lib/net/ipv6.h" #include "lib/net/resolve.h" #include "lib/fs/files.h" #include "lib/fs/mmap.h" #include "lib/fs/userdb.h" #include "lib/wallclock/timeval.h" #include "lib/intmath/cmp.h" #include #include /* ===== Time compatibility */ /* ===== File compatibility */ /* ===== Net compatibility */ /** Specified SOCKS5 status codes. */ typedef enum { SOCKS5_SUCCEEDED = 0x00, SOCKS5_GENERAL_ERROR = 0x01, SOCKS5_NOT_ALLOWED = 0x02, SOCKS5_NET_UNREACHABLE = 0x03, SOCKS5_HOST_UNREACHABLE = 0x04, SOCKS5_CONNECTION_REFUSED = 0x05, SOCKS5_TTL_EXPIRED = 0x06, SOCKS5_COMMAND_NOT_SUPPORTED = 0x07, SOCKS5_ADDRESS_TYPE_NOT_SUPPORTED = 0x08, } socks5_reply_status_t; /* ===== OS compatibility */ /* This needs some of the declarations above so we include it here. */ #include "lib/thread/threads.h" #endif /* !defined(TOR_COMPAT_H) */