Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

TS-672 cleanup Win32 references

nuke win32 completely.
  • Loading branch information...
commit 53ebc2f729d41c76a7cdbd8e9e1930544976c083 1 parent a79a638
@mingzym mingzym authored
Showing with 50 additions and 1,247 deletions.
  1. +2 −0  CHANGES
  2. +0 −4 example/append-transform/append-transform.c
  3. +1 −45 example/basic-auth/basic-auth.c
  4. +0 −4 example/output-header/output-header.c
  5. +0 −12 example/redirect-1/redirect-1.c
  6. +0 −8 example/server-transform/server-transform.c
  7. +0 −4 iocore/aio/P_AIO.h
  8. +1 −1  iocore/aio/test_AIO.i
  9. +0 −13 iocore/cache/Cache.cc
  10. +0 −4 iocore/cache/P_CacheVol.h
  11. +1 −1  iocore/cluster/test_I_Cluster.cc
  12. +1 −1  iocore/cluster/test_P_Cluster.cc
  13. +1 −1  iocore/dns/test_I_DNS.cc
  14. +1 −1  iocore/eventsystem/I_ProxyAllocator.h
  15. +0 −12 iocore/eventsystem/I_VConnection.h
  16. +1 −5 iocore/eventsystem/test_Buffer.cc
  17. +1 −1  iocore/eventsystem/test_Event.i
  18. +0 −17 iocore/hostdb/HostDB.cc
  19. +0 −15 iocore/hostdb/P_MultiCache.h
  20. +1 −1  iocore/hostdb/test_I_HostDB.cc
  21. +0 −2  iocore/net/P_CompletionUtil.h
  22. +0 −12 iocore/net/P_SSLConfig.h
  23. +0 −3  iocore/net/P_SSLNetAccept.h
  24. +0 −11 iocore/net/P_SSLNetProcessor.h
  25. +0 −4 iocore/net/P_SSLNetVConnection.h
  26. +0 −5 iocore/net/P_Socks.h
  27. +0 −44 iocore/net/P_UDPNet.h
  28. +0 −4 iocore/net/P_UnixCompletionUtil.h
  29. +0 −3  iocore/net/P_UnixUDPConnection.h
  30. +1 −15 iocore/net/SSLConfig.cc
  31. +1 −5 iocore/net/test_I_Net.cc
  32. +1 −1  iocore/net/test_I_UDPNet.cc
  33. +1 −1  iocore/net/test_P_UDPNet.cc
  34. +1 −1  iocore/utils/diags.i
  35. +0 −9 lib/records/P_RecCompatibility.h
  36. +0 −4 lib/ts/ink_res_init.cc
  37. +0 −19 lib/ts/test_atomic.cc
  38. +0 −44 mgmt/Alarms.cc
  39. +2 −49 mgmt/FileManager.cc
  40. +1 −4 mgmt/LocalManager.cc
  41. +0 −11 mgmt/LocalManager.h
  42. +0 −11 mgmt/Main.cc
  43. +0 −37 mgmt/MultiFile.cc
  44. +0 −55 mgmt/ProcessManager.cc
  45. +0 −12 mgmt/ProcessManager.h
  46. +1 −86 mgmt/Rollback.cc
  47. +0 −3  mgmt/api/CoreAPI.cc
  48. +1 −49 mgmt/api/CoreAPIShared.cc
  49. +0 −4 mgmt/api/GenericParser.cc
  50. +0 −3  mgmt/api/INKMgmtAPIStub.cc
  51. +0 −11 mgmt/api/include/mgmtapi.h
  52. +0 −4 mgmt/api/remote/EventRegistration.cc
  53. +0 −3  mgmt/api/remote/EventRegistration.h
  54. +0 −97 mgmt/cluster/ClusterCom.cc
  55. +0 −54 mgmt/cluster/VMap.h
  56. +0 −4 mgmt/preparse/IPRange.cc
  57. +1 −162 mgmt/utils/MgmtUtils.cc
  58. +0 −5 mgmt/utils/MgmtUtils.h
  59. +2 −39 mgmt/utils/WebMgmtUtils.cc
  60. +0 −9 mgmt/web2/WebCompatibility.h
  61. +1 −63 mgmt/web2/WebHttp.cc
  62. +1 −1  mgmt/web2/WebIntrMain.cc
  63. +0 −9 mgmt/web2/WebUtils.cc
  64. +1 −7 proxy/CoreUtils.cc
  65. +20 −28 proxy/ICP.cc
  66. +1 −1  proxy/Initialize.cc
  67. +0 −4 proxy/InkIOCoreAPI.cc
  68. +1 −1  proxy/Main.cc
  69. +0 −30 proxy/StatSystem.h
  70. +0 −5 proxy/Update.cc
  71. +1 −3 proxy/config/plugin.config.default
  72. +0 −9 proxy/config/vaddrs.config.default
  73. +0 −17 proxy/config/winnt_intr.config.default
  74. +0 −6 proxy/hdrs/HdrTest.cc
  75. +0 −14 proxy/http/HttpSM.cc
View
2  CHANGES
@@ -1,5 +1,7 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 3.1.4
+ *) [TS-672] cleanup Win32 references.
+
*) [TS-1181] Make the overridable configs work with "byte" configs.
*) [TS-1252] Fixed include issues when using mgmtapi.h.
View
4 example/append-transform/append-transform.c
@@ -268,11 +268,7 @@ transformable(TSHttpTxn txnp)
}
value = TSMimeHdrFieldValueStringGet(bufp, hdr_loc, field_loc, 0, &val_length);
-#ifndef _WIN32
if (value && (strncasecmp(value, "text/html", sizeof("text/html") - 1) == 0)) {
-#else
- if (value && (strnicmp(value, "text/html", sizeof("text/html") - 1) == 0)) {
-#endif
ASSERT_SUCCESS(TSHandleMLocRelease(bufp, hdr_loc, field_loc));
ASSERT_SUCCESS(TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc));
View
46 example/basic-auth/basic-auth.c
@@ -25,11 +25,7 @@
#include <stdio.h>
#include <string.h>
-#if !defined (_WIN32)
#include <unistd.h>
-#else
-#include <windows.h>
-#endif
#include <ts/ts.h>
@@ -76,34 +72,10 @@ authorized(char *user, char *password)
{
/*
* This routine checks the validity of the user name and
- * password. Sample NT code is provided for illustration.
- * For UNIX systems, enter your own authorization code
+ * password. UNIX systems, enter your own authorization code
* here.
*/
-#if !defined (_WIN32)
-
-#else
- // LogonUser() will work only if the account is set with
- // SE_TCB_NAME privilege. If SE_TCB_NAME is missing,
- // Traffic server will attempt to add this privilege to
- // the running account, but may fail depending on the access
- // levels provided to the said account. In such a case, an
- // NT systems administrator will have to set the privilege
- // "Act as part of the operating system" from the NT user manager.
- //
- int nErr = 0;
- HANDLE hToken = 0;
- BOOL bRet = LogonUser(user, NULL, password, LOGON32_LOGON_NETWORK,
- LOGON32_PROVIDER_DEFAULT, &hToken);
-
- if (FALSE == bRet) {
- nErr = GetLastError();
- return 0;
- }
-
- CloseHandle(hToken);
-#endif
return 1;
}
@@ -297,19 +269,3 @@ TSPluginInit(int argc, const char *argv[])
TSHttpHookAdd(TS_HTTP_OS_DNS_HOOK, TSContCreate(auth_plugin, NULL));
}
-
-#if defined (_WIN32)
-BOOL APIENTRY
-DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
-{
- switch (ul_reason_for_call) {
- case DLL_PROCESS_ATTACH:
- case DLL_THREAD_ATTACH:
- case DLL_THREAD_DETACH:
- case DLL_PROCESS_DETACH:
- break;
- }
- return TRUE;
-}
-#endif
-
View
4 example/output-header/output-header.c
@@ -37,11 +37,7 @@
#include <stdio.h>
#include <string.h>
-#if !defined (_WIN32)
#include <unistd.h>
-#else
-#include <windows.h>
-#endif
#include <ts/ts.h>
View
12 example/redirect-1/redirect-1.c
@@ -36,21 +36,13 @@
#include <stdio.h>
#include <string.h>
-#if !defined (_WIN32)
# include <unistd.h>
# include <netinet/in.h>
# include <arpa/inet.h>
-#else
-# include <windows.h>
-#endif
#include <ts/ts.h>
-#if !defined (_WIN32)
static in_addr_t ip_deny;
-#else
-static unsigned int ip_deny;
-#endif
/*
* uncoupled statistics variables:
@@ -94,11 +86,7 @@ handle_client_lookup(TSHttpTxn txnp, TSCont contp)
TSMLoc hdr_loc, url_loc;
int host_length;
-#if !defined (_WIN32)
in_addr_t clientip = 0;
-#else
- unsigned int clientip;
-#endif
const char *host;
View
8 example/server-transform/server-transform.c
@@ -55,11 +55,7 @@
#include <string.h>
#include <stdio.h>
-#if !defined (_WIN32)
# include <netinet/in.h>
-#else
-# include <windows.h>
-#endif
#include <ts/ts.h>
@@ -105,11 +101,7 @@ static int transform_read_event(TSCont contp, TransformData * data, TSEvent even
static int transform_bypass_event(TSCont contp, TransformData * data, TSEvent event, void *edata);
static int transform_handler(TSCont contp, TSEvent event, void *edata);
-#if !defined (_WIN32)
static in_addr_t server_ip;
-#else
-static unsigned int server_ip;
-#endif
static int server_port;
View
4 iocore/aio/P_AIO.h
@@ -126,8 +126,4 @@ enum aio_stat_enum
};
extern RecRawStatBlock *aio_rsb;
-#ifdef _WIN32
-extern NTIOCompletionPort aio_completion_port;
-#endif
-
#endif
View
2  iocore/aio/test_AIO.i
@@ -80,7 +80,7 @@ reconfigure_diags()
////////////////////////////////////
// change the diags config values //
////////////////////////////////////
-#if !defined (_WIN32) && !defined(__GNUC__) && !defined(hpux)
+#if !defined(__GNUC__) && !defined(hpux)
diags->config = c;
#else
memcpy(((void *) &diags->config), ((void *) &c), sizeof(DiagsConfigState));
View
13 iocore/cache/Cache.cc
@@ -532,11 +532,9 @@ CacheProcessor::start_internal(int flags)
int opts = O_RDWR;
ink_strlcpy(path, sd->pathname, sizeof(path));
if (!sd->file_pathname) {
-#if !defined(_WIN32)
if (config_volumes.num_http_volumes && config_volumes.num_stream_volumes) {
Warning("It is suggested that you use raw disks if streaming and http are in the same cache");
}
-#endif
ink_strlcat(path, "/cache.db", sizeof(path));
opts |= O_CREAT;
}
@@ -551,21 +549,10 @@ CacheProcessor::start_internal(int flags)
int fd = open(path, opts, 0644);
int blocks = sd->blocks;
if (fd > 0) {
-#if defined (_WIN32)
- aio_completion_port.register_handle((void *) fd, 0);
-#endif
if (!sd->file_pathname) {
if (ftruncate(fd, ((uint64_t) blocks) * STORE_BLOCK_SIZE) < 0) {
Warning("unable to truncate cache file '%s' to %d blocks", path, blocks);
diskok = 0;
-#if defined(_WIN32)
- /* We can do a specific check for FAT32 systems on NT,
- * to print a specific warning */
- if ((((uint64_t) blocks) * STORE_BLOCK_SIZE) > (1 << 32)) {
- Warning("If you are using a FAT32 file system, please ensure that cachesize"
- "specified in storage.config, does not exceed 4GB!. ");
- }
-#endif
}
}
if (diskok) {
View
4 iocore/cache/P_CacheVol.h
@@ -256,11 +256,7 @@ struct Vol: public Continuation
evacuate_size(0), disk(NULL), last_sync_serial(0), last_write_serial(0), recover_wrapped(false),
dir_sync_waiting(0), dir_sync_in_progress(0), writing_end_marker(0) {
open_dir.mutex = mutex;
-#if defined(_WIN32)
- agg_buffer = (char *)ats_malloc(AGG_SIZE);
-#else
agg_buffer = (char *)ats_memalign(sysconf(_SC_PAGESIZE), AGG_SIZE);
-#endif
memset(agg_buffer, 0, AGG_SIZE);
SET_HANDLER(&Vol::aggWrite);
}
View
2  iocore/cluster/test_I_Cluster.cc
@@ -89,7 +89,7 @@ reconfigure_diags()
// change the diags config values //
////////////////////////////////////
// XXX: HP-UX ???
-#if !defined (_WIN32) && !defined(__GNUC__) && !defined(hpux)
+#if !defined(__GNUC__) && !defined(hpux)
diags->config = c;
#else
memcpy(((void *) &diags->config), ((void *) &c), sizeof(DiagsConfigState));
View
2  iocore/cluster/test_P_Cluster.cc
@@ -89,7 +89,7 @@ reconfigure_diags()
// change the diags config values //
////////////////////////////////////
// XXX: HP-UX ???
-#if !defined (_WIN32) && !defined(__GNUC__) && !defined(hpux)
+#if !defined(__GNUC__) && !defined(hpux)
diags->config = c;
#else
memcpy(((void *) &diags->config), ((void *) &c), sizeof(DiagsConfigState));
View
2  iocore/dns/test_I_DNS.cc
@@ -81,7 +81,7 @@ reconfigure_diags()
////////////////////////////////////
// change the diags config values //
////////////////////////////////////
-#if !defined (_WIN32) && !defined(__GNUC__) && !defined(hpux)
+#if !defined(__GNUC__) && !defined(hpux)
diags->config = c;
#else
memcpy(((void *) &diags->config), ((void *) &c), sizeof(DiagsConfigState));
View
2  iocore/eventsystem/I_ProxyAllocator.h
@@ -81,7 +81,7 @@ thread_freeup(ClassAllocator<C> &a, ProxyAllocator & l)
ink_assert(!l.allocated);
}
-#if !defined(_IOCORE_WIN32) && defined(TS_USE_FREELIST)
+#if defined(TS_USE_FREELIST)
#define THREAD_ALLOC(_a, _t) thread_alloc(::_a, _t->_a)
#define THREAD_ALLOC_INIT(_a, _t) thread_alloc_init(::_a, _t->_a)
#define THREAD_FREE_TO(_p, _a, _t, _m) do { \
View
12 iocore/eventsystem/I_VConnection.h
@@ -317,10 +317,6 @@ class VConnection:public Continuation
VConnection(ProxyMutex *aMutex);
-#if defined (_IOCORE_WIN32_WINNT)
- virtual void set_nbytes(VIO *vio, int64_t nbytes);
-#endif
-
/** @deprecated */
VIO *do_io(int op, Continuation *c = NULL, int64_t nbytes = INT64_MAX, MIOBuffer *buf = 0, int data = 0);
@@ -411,14 +407,6 @@ struct DummyVConnection: public VConnection
(void) howto;
ink_debug_assert(!"VConnection::do_io_shutdown -- " "cannot use default implementation");
}
-#ifdef _IOCORE_WIN32_WINNT
- virtual void set_nbytes(VIO *vio, int64_t nbytes)
- {
- (void) vio;
- (void) nbytes;
- ink_debug_assert(!"DummyVConnection::set_nbytes -- " "cannot use default implementation");
- }
-#endif
DummyVConnection(ProxyMutex *m):VConnection(m) {
}
};
View
6 iocore/eventsystem/test_Buffer.cc
@@ -83,7 +83,7 @@ reconfigure_diags()
////////////////////////////////////
// change the diags config values //
////////////////////////////////////
-#if !defined (_IOCORE_WIN32) && !defined(__GNUC__) && !defined(hpux)
+#if !defined(__GNUC__) && !defined(hpux)
diags->config = c;
#else
memcpy(((void *) &diags->config), ((void *) &c), sizeof(DiagsConfigState));
@@ -151,10 +151,6 @@ main()
}
exit(0);
-#ifndef _IOCORE_WIN32_WINNT
this_thread()->execute();
-#else
- Sleep(INFINITE);
-#endif
return 0;
}
View
2  iocore/eventsystem/test_Event.i
@@ -81,7 +81,7 @@ reconfigure_diags()
////////////////////////////////////
// change the diags config values //
////////////////////////////////////
-#if !defined (_WIN32) && !defined(__GNUC__) && !defined(hpux)
+#if !defined(__GNUC__) && !defined(hpux)
diags->config = c;
#else
memcpy(((void *) &diags->config), ((void *) &c), sizeof(DiagsConfigState));
View
17 iocore/hostdb/HostDB.cc
@@ -317,24 +317,7 @@ HostDBCache::start(int flags)
IOCORE_ReadConfigInt32(hostdb_enable, "proxy.config.hostdb");
IOCORE_ReadConfigString(hostdb_filename, "proxy.config.hostdb.filename", PATH_NAME_MAX);
IOCORE_ReadConfigInt32(hostdb_size, "proxy.config.hostdb.size");
-
-#if defined (_IOCORE_WIN32)
- // since the config directory is always based of TSBase, we make sure
- // all the internal paths correctly get set.
- char szPath[PATH_NAME_MAX + 1];
- IOCORE_ReadConfigString(szPath, "proxy.config.hostdb.storage_path", PATH_NAME_MAX);
- int i = 0;
- while (szPath[i] != 0) {
- if (szPath[i] == '/')
- szPath[i] = '\\';
- i++;
- }
- ink_strlcpy(storage_path, system_root_dir, sizeof(storage_path));
- ink_strlcat(storage_path, "\\", sizeof(storage_path));
- ink_strlcat(storage_path, szPath, sizeof(storage_path));
-#else
IOCORE_ReadConfigString(storage_path, "proxy.config.hostdb.storage_path", PATH_NAME_MAX);
-#endif
IOCORE_ReadConfigInt32(storage_size, "proxy.config.hostdb.storage_size");
if (storage_path[0] != '/') {
View
15 iocore/hostdb/P_MultiCache.h
@@ -202,12 +202,6 @@ struct MultiCacheBase: public MultiCacheHeader
MultiCacheHeader header_snap;
-#ifdef _WIN32
- // windows exclusive //
- int m_nEntry;
- Unmaper m_mUnmapTable[MULTI_CACHE_MAX_FILES];
-#endif
-
// mmap-ed region
//
char *data;
@@ -328,24 +322,15 @@ struct MultiCacheBase: public MultiCacheHeader
uint64_t make_tag(uint64_t folded_md5)
{
uint64_t ttag = folded_md5 / (uint64_t) buckets;
-#if !defined (_WIN32)
if (!ttag)
return 1LL;
-#else
- if (!ttag)
- return 1i 64;
-#endif
// beeping gcc 2.7.2 is broken
if (tag_bits > 32) {
uint64_t mask = 0x100000000LL << (tag_bits - 32);
mask = mask - 1;
return ttag & mask;
} else {
-#if !defined (_WIN32)
uint64_t mask = 1LL;
-#else
- uint64_t mask = 1i 64;
-#endif
mask <<= tag_bits;
mask = mask - 1;
return ttag & mask;
View
2  iocore/hostdb/test_I_HostDB.cc
@@ -81,7 +81,7 @@ reconfigure_diags()
////////////////////////////////////
// change the diags config values //
////////////////////////////////////
-#if !defined (_WIN32) && !defined(__GNUC__) && !defined(hpux)
+#if !defined(__GNUC__) && !defined(hpux)
diags->config = c;
#else
memcpy(((void *) &diags->config), ((void *) &c), sizeof(DiagsConfigState));
View
2  iocore/net/P_CompletionUtil.h
@@ -42,8 +42,6 @@ class completionUtil
static void releaseReferences(Event * e);
};
-#ifndef _IOCORE_WIN32_WINNT
#include "P_UnixCompletionUtil.h"
-#endif
#endif
View
12 iocore/net/P_SSLConfig.h
@@ -130,23 +130,11 @@ DebugBufferPrint(const char *tag, char *buff, int blen, const char *message = NU
#if defined (_DEBUG)
if (is_debug_tag_set(tag)) {
if (message != NULL)
-#if defined (_IOCORE_WIN32)
- _RPT1(_CRT_WARN, "%s\n", message);
-#else
fprintf(stdout, "%s\n", message);
-#endif
for (int ii = 0; ii < blen; ii++) {
-#if defined (_IOCORE_WIN32)
- _RPT1(_CRT_WARN, "%c", buff[ii]);
-#else
putc(buff[ii], stdout);
-#endif
}
-#if defined (_IOCORE_WIN32)
- _RPT1(_CRT_WARN, "%c", '\n');
-#else
putc('\n', stdout);
-#endif
}
#endif
}
View
3  iocore/net/P_SSLNetAccept.h
@@ -52,13 +52,10 @@ class UnixNetVConnection;
//
struct SSLNetAccept: public NetAccept
{
-
-#ifndef _IOCORE_WIN32_WINNT
virtual UnixNetVConnection *allocateThread(EThread * t);
virtual void freeThread(UnixNetVConnection * vc, EThread * t);
virtual UnixNetVConnection *allocateGlobal();
virtual EventType getEtype();
-#endif
virtual void init_accept_per_thread();
SSLNetAccept()
View
11 iocore/net/P_SSLNetProcessor.h
@@ -50,11 +50,7 @@ struct NetAccept;
//
//////////////////////////////////////////////////////////////////
struct SSLNetProcessor:public
-#ifndef _IOCORE_WIN32_WINNT
UnixNetProcessor
-#else
- NTNetProcessor
-#endif
{
public:
@@ -84,7 +80,6 @@ struct SSLNetProcessor:public
//
// Private
//
-#if !defined (_IOCORE_WIN32_WINNT)
// Virtual function allows etype
// to be upgraded to ET_SSL for SSLNetProcessor.
@@ -96,12 +91,6 @@ struct SSLNetProcessor:public
virtual UnixNetVConnection *allocateThread(EThread * t);
virtual void freeThread(UnixNetVConnection * vc, EThread * t);
virtual NetAccept *createNetAccept();
-#else // #if defined (_IOCORE_WIN32)
-
-public:
- virtual NTNetVConnection * newNetVConnection(void);
- virtual NTNetVConnection *newClientNetVConnection(void);
-#endif // #if defined (_IOCORE_WIN32)
private:
void initSSLLocks(void);
View
4 iocore/net/P_SSLNetVConnection.h
@@ -60,11 +60,7 @@ class SSLNextProtocolSet;
// A VConnection for a network socket.
//
//////////////////////////////////////////////////////////////////
-#ifdef _IOCORE_WIN32_WINNT
-class SSLNetVConnection:public NTNetVConnection
-#else
class SSLNetVConnection:public UnixNetVConnection
-#endif
{
public:
virtual int sslStartHandShake(int event, int &err);
View
5 iocore/net/P_Socks.h
@@ -97,13 +97,8 @@ int socks5BasicAuthHandler(int event, unsigned char *p, void (**)(void));
int socks5PasswdAuthHandler(int event, unsigned char *p, void (**)(void));
int socks5ServerAuthHandler(int event, unsigned char *p, void (**)(void));
-#if defined(_IOCORE_WIN32)
-class NTNetVConnection;
-typedef NTNetVConnection SocksNetVC;
-#else
class UnixNetVConnection;
typedef UnixNetVConnection SocksNetVC;
-#endif
struct SocksEntry:public Continuation
{
View
44 iocore/net/P_UDPNet.h
@@ -47,20 +47,11 @@ struct UDPNetHandler;
struct UDPNetProcessorInternal : public UDPNetProcessor
{
virtual int start(int n_udp_threads);
-#if defined (_IOCORE_WIN32)
- SOCKET create_dgram_socket_internal();
-#else
void udp_read_from_net(UDPNetHandler * nh, UDPConnection * uc, PollDescriptor * pd, EThread * thread);
int udp_callback(UDPNetHandler * nh, UDPConnection * uc, EThread * thread);
-#endif
-#if defined (_IOCORE_WIN32)
- EThread *ethread;
- UDPNetHandler *udpNetHandler;
-#else
off_t pollCont_offset;
off_t udpNetHandler_offset;
-#endif
public:
virtual void UDPNetProcessor_is_abstract() { }
@@ -316,8 +307,6 @@ class PacketQueue
};
#endif
-#if !defined (_IOCORE_WIN32)
-
void initialize_thread_for_udp_net(EThread * thread);
struct UDPNetHandler: public Continuation
@@ -344,39 +333,6 @@ struct UDPNetHandler: public Continuation
UDPNetHandler();
};
-#endif
-
-#if defined(_IOCORE_WIN32)
-void initialize_thread_for_udp_net(EThread * thread);
-
-class UDPQueue;
-
-class UDPNetHandler:Continuation
-{
-public:
- // to be polled for read
- Queue(UnixUDPConnection, polling_link) udp_polling;
- // to be called back with data
- Queue(UnixUDPConnection, callback_link) udp_callbacks;
- // outgoing packets
- InkAtomicList udpAtomicQueue;
- UDPQueue udpOutQueue;
- // to hold the newly created descriptors before scheduling them on
- // the servicing buckets.
- // atomically added to by a thread creating a new connection with
- // UDPBind
- InkAtomicList udpNewConnections;
- Event *trigger_event;
- ink_hrtime nextCheck;
- ink_hrtime lastCheck;
-
- int startNetEvent(int event, Event * data);
- int mainNetEvent(int event, Event * data);
-
- UDPNetHandler();
- virtual ~ UDPNetHandler();
-};
-#endif
struct PollCont;
static inline PollCont *
View
4 iocore/net/P_UnixCompletionUtil.h
@@ -24,10 +24,6 @@
#ifndef _UNIX_COMPLETION_UTIL_H_
#define _UNIX_COMPLETION_UTIL_H_
-#ifdef _IOCORE_WIN32_WINNT
-#error "Some kind of problem with your include path"
-#endif
-
// platform specific wrappers for dealing with I/O completion events
// passed into and back from the I/O core.
#include "P_UDPIOEvent.h"
View
3  iocore/net/P_UnixUDPConnection.h
@@ -31,8 +31,6 @@
#ifndef __UNIXUDPCONNECTION_H_
#define __UNIXUDPCONNECTION_H_
-#ifndef _IOCORE_WIN32
-
#include "P_UDPConnection.h"
#include "P_UDPPacket.h"
@@ -119,5 +117,4 @@ new_UDPConnection(int fd)
return (fd >= 0) ? NEW(new UnixUDPConnection(fd)) : 0;
}
-#endif //_IOCORE_WIN32
#endif //__UNIXUDPCONNECTION_H_
View
16 iocore/net/SSLConfig.cc
@@ -111,22 +111,8 @@ set_paths_helper(const char *path, const char *filename, char **final_path, char
*final_filename = filename ? ats_strdup(Layout::get()->relative_to(path, filename)) : NULL;
}
-#ifdef _WIN32
- i = 0;
- while (final_path[i] != 0) {
- if (final_path[i] == '/')
- final_path[i] = '\\';
- i++;
- }
-
- i = 0;
- while (final_filename[i] != 0) {
- if (final_filename[i] == '/')
- final_filename[i] = '\\';
- i++;
- }
-#endif
}
+
void
SslConfigParams::initialize()
{
View
6 iocore/net/test_I_Net.cc
@@ -22,9 +22,7 @@
*/
#include "P_Net.h"
-#ifndef _WIN32
#include <netdb.h>
-#endif
Diags *diags;
#define DIAGS_LOG_FILE "diags.log"
@@ -83,7 +81,7 @@ reconfigure_diags()
////////////////////////////////////
// change the diags config values //
////////////////////////////////////
-#if !defined (_WIN32) && !defined(__GNUC__) && !defined(hpux)
+#if !defined(__GNUC__) && !defined(hpux)
diags->config = c;
#else
memcpy(((void *) &diags->config), ((void *) &c), sizeof(DiagsConfigState));
@@ -150,9 +148,7 @@ main()
/*
* ignore broken pipe
*/
-#ifndef _WIN32
signal(SIGPIPE, SIG_IGN);
-#endif
/*
* start processors
View
2  iocore/net/test_I_UDPNet.cc
@@ -85,7 +85,7 @@ reconfigure_diags()
////////////////////////////////////
// change the diags config values //
////////////////////////////////////
-#if !defined (_IOCORE_WIN32) && !defined(__GNUC__) && !defined(hpux)
+#if !defined(__GNUC__) && !defined(hpux)
diags->config = c;
#else
memcpy(((void *) &diags->config), ((void *) &c), sizeof(DiagsConfigState));
View
2  iocore/net/test_P_UDPNet.cc
@@ -85,7 +85,7 @@ reconfigure_diags()
////////////////////////////////////
// change the diags config values //
////////////////////////////////////
-#if !defined (_IOCORE_WIN32) && !defined(__GNUC__) && !defined(hpux)
+#if !defined(__GNUC__) && !defined(hpux)
diags->config = c;
#else
memcpy(((void *) &diags->config), ((void *) &c), sizeof(DiagsConfigState));
View
2  iocore/utils/diags.i
@@ -79,7 +79,7 @@ reconfigure_diags()
////////////////////////////////////
// change the diags config values //
////////////////////////////////////
-#if !defined (_WIN32) && !defined(__GNUC__) && !defined(hpux)
+#if !defined(__GNUC__) && !defined(hpux)
diags->config = c;
#else
memcpy(((void *) &diags->config), ((void *) &c), sizeof(DiagsConfigState));
View
9 lib/records/P_RecCompatibility.h
@@ -30,18 +30,9 @@
// types/defines
//-------------------------------------------------------------------------
-#if defined(_WIN32)
-
-#define REC_HANDLE_INVALID INVALID_HANDLE_VALUE
-typedef HANDLE RecHandle;
-
-#else
-
#define REC_HANDLE_INVALID -1
typedef int RecHandle;
-#endif
-
//-------------------------------------------------------------------------
// RecFile
//-------------------------------------------------------------------------
View
4 lib/ts/ink_res_init.cc
@@ -65,8 +65,6 @@
*/
-#if !defined (_WIN32)
-
#include "ink_platform.h"
#include <sys/types.h>
@@ -562,5 +560,3 @@ ink_res_init(
statp->options |= INK_RES_INIT;
return (statp->res_h_errno);
}
-
-#endif
View
19 lib/ts/test_atomic.cc
@@ -22,25 +22,6 @@
*/
-
-////////////////////////////////////////////////////////////////////////////
-// NT Build Notes:
-// 1) Enable the following #include.
-// Visual C++ does not allow this under #ifdef
-// #include "stdafx.h"
-//
-// 2) Create a new project within the existing TS project
-// which is a "WIN32 Console Application"
-// with the "Simple Application" option.
-// 3) Replace C/C++ Preprocessor definitions with traffic_server
-// definitions.
-// 4) Replace C/C++ Additional includes with traffic server
-// definitions. Prepend "..\proxy" to directories in proxy.
-// Add "..\proxy".
-// 5) Replace C/C++ project option "/MLd" with "/MTd"
-// 6) Add libts as dependency.
-////////////////////////////////////////////////////////////////////////////
-
#include <unistd.h>
#include <stdlib.h>
#include <time.h>
View
44 mgmt/Alarms.cc
@@ -558,8 +558,6 @@ Alarms::execAlarmBin(const char *desc)
if (!found)
alarm_email_to_addr = 0;
-#ifndef _WIN32
-
int status;
pid_t pid;
@@ -607,49 +605,7 @@ Alarms::execAlarmBin(const char *desc)
_exit(res);
}
-#else
-
- bool is_exe = true;
- char *fileExt = NULL;
-
- if ((fileExt = strchr(alarm_bin, '.')) != NULL) {
- if (ink_strcasecmp(fileExt, ".CMD") == 0 || ink_strcasecmp(fileExt, ".BAT") == 0) {
- is_exe = false;
- }
- }
-
- if (is_exe) {
- ink_filepath_make(cmd_line, alarm_bin_path, alarm_bin);
- } else {
- sprintf(cmd_line, "CMD.EXE /C \"%s\\%s\"", alarm_bin_path, alarm_bin);
- }
-
- SetEnvironmentVariable("TRAFFIC_SERVER_ALARM_MSG", desc);
- SetEnvironmentVariable("ADMIN_EMAIL", alarm_email_to_addr);
-
- STARTUPINFO suInfo;
- PROCESS_INFORMATION procInfo;
- ZeroMemory((PVOID) & suInfo, sizeof(suInfo));
-
- // hide the new console window from the user
- suInfo.cb = sizeof(STARTUPINFO);
- suInfo.dwFlags = STARTF_USESHOWWINDOW;
- suInfo.wShowWindow = SW_HIDE;
-
- if (CreateProcess(NULL, cmd_line, NULL, // FIX THIS: process security attributes
- NULL, // FIX THIS: thread security attributes
- FALSE, // no need to make handles inheritable
- 0, // FIX THIS: specify a priority
- NULL, // FIX THIS: specify environment variables
- ts_base_dir, // make script run from TSBase
- &suInfo, &procInfo) == FALSE) {
- mgmt_elog(stderr, "[Alarm::execAlarmBin] CreateProcess error: %s\n", ink_last_err());
- } else {
- CloseHandle(procInfo.hThread);
- CloseHandle(procInfo.hProcess);
- }
-#endif // !_WIN32
// free memory
ats_free(alarm_email_from_name);
View
51 mgmt/FileManager.cc
@@ -36,12 +36,8 @@
static const char snapDir[] = "snapshots";
-#ifndef _WIN32
#define DIR_MODE S_IRWXU
#define FILE_MODE S_IRWXU
-#else
-#define FILE_MODE S_IWRITE
-#endif
typedef fileEntry snapshot;
@@ -100,11 +96,7 @@ FileManager::FileManager()
// Check to see if the directory already exists, if not create
// it
if (access(snapshotDir, F_OK) == -1) {
-#ifndef _WIN32
if (mkdir(snapshotDir, DIR_MODE) < 0) {
-#else
- if (mkdir(snapshotDir) < 0) {
-#endif
// Failed to create the snapshot directory
mgmt_fatal(stderr, "[FileManager::FileManager] Failed to create the snapshot directory %s: %s\n", snapshotDir, strerror(errno));
}
@@ -443,21 +435,15 @@ FileManager::restoreSnap(const char *snapName, const char *snapDir)
SnapResult
FileManager::removeSnap(const char *snapName, const char *snapDir)
{
-#ifndef _WIN32
struct dirent *dirEntrySpace;
struct dirent *entryPtr;
DIR *dir;
-#else
- char *searchPattern;
- WIN32_FIND_DATA W32FD;
-#endif
char *snapPath;
char *snapFilePath;
bool unlinkFailed = false;
SnapResult result = SNAP_OK;
snapPath = newPathString(snapDir, snapName);
-#ifndef _WIN32
dir = opendir(snapPath);
if (dir == NULL) {
@@ -488,33 +474,6 @@ FileManager::removeSnap(const char *snapName, const char *snapDir)
ats_free(dirEntrySpace);
closedir(dir);
-#else
- // Append '\*' as a wildcard for FindFirstFile()
- searchPattern = newPathString(snapPath, "*");
- HANDLE hDInfo = FindFirstFile(searchPattern, &W32FD);
-
- if (INVALID_HANDLE_VALUE == hDInfo) {
- mgmt_log(stderr, "[FileManager::removeSnap] FindFirstFile failed for %s: %s\n", searchPattern, ink_last_err());
- delete[]searchPattern;
- return SNAP_NOT_FOUND;
- }
- delete[]searchPattern;
-
- while (FindNextFile(hDInfo, &W32FD)) {
- if (W32FD.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
- continue; // ignore directories
- }
- snapFilePath = newPathString(snapPath, W32FD.cFileName);
-
- if (unlink(snapFilePath) < 0) {
- mgmt_log(stderr, "[FileManager::removeSnap] Unlink failed for %s: %s\n", snapFilePath, strerror(errno));
- unlinkFailed = true;
- result = SNAP_REMOVE_FAILED;
- }
- delete[]snapFilePath;
- }
- FindClose(hDInfo);
-#endif // !_WIN32
// If we managed to get everything, remove the directory
//
@@ -581,11 +540,7 @@ FileManager::takeSnap(const char *snapName, const char *snapDir)
return SNAP_DIR_CREATE_FAILED;
}
}
-#ifndef _WIN32
if (mkdir(snapPath, DIR_MODE) < 0) {
-#else
- if (mkdir(snapPath) < 0) {
-#endif
mgmt_log(stderr, "[FileManager::takeSnap] Failed to create directory for snapshot %s: %s\n",
snapName, strerror(errno));
delete[]snapPath;
@@ -653,9 +608,8 @@ FileManager::readFile(const char *filePath, textBuffer * contents)
mgmt_log(stderr, "[FileManager::readFile] Open of snapshot file failed %s: %s\n", filePath, strerror(errno));
return SNAP_FILE_ACCESS_FAILED;
}
-#ifndef _WIN32 // no need to set close-on-exec on NT
+
fcntl(diskFD, F_SETFD, 1);
-#endif
while ((readResult = contents->readFromFD(diskFD)) > 0);
close(diskFD);
@@ -701,9 +655,8 @@ FileManager::copyFile(Rollback * rb, const char *snapPath)
delete copyBuf;
return SNAP_FILE_CREATE_FAILED;
}
-#ifndef _WIN32 // no need to set close-on-exec on NT
+
fcntl(diskFD, F_SETFD, 1);
-#endif
// Write the file contents to the copy
if (write(diskFD, copyBuf->bufPtr(), copyBuf->spaceUsed()) < 0) {
View
5 mgmt/LocalManager.cc
@@ -382,8 +382,7 @@ LocalManager::initCCom(int port, char *addr, int sport)
/*
* initMgmtProcessServer()
- * - On UNIX, this function sets up the server socket that proxy processes connect to.
- * - On WIN32, named pipes are used instead.
+ * sets up the server socket that proxy processes connect to.
*/
void
LocalManager::initMgmtProcessServer()
@@ -1132,7 +1131,6 @@ elevateFileAccess(bool state)
//
// - Returns true on success
// and false on failure
-// - no-op on WIN32
bool
removeRootPriv(uid_t euid)
{
@@ -1149,7 +1147,6 @@ removeRootPriv(uid_t euid)
//
// - Returns true on success
// and false on failure
-// - no-op on WIN32
bool
restoreRootPriv(uid_t *old_euid)
{
View
11 mgmt/LocalManager.h
@@ -44,10 +44,8 @@
#include <wccp/Wccp.h>
#endif
-#if !defined(WIN32)
#define ink_get_hrtime ink_get_hrtime_internal
#define ink_get_based_hrtime ink_get_based_hrtime_internal
-#endif
class LocalManager: public BaseManager
{
@@ -135,18 +133,9 @@ class LocalManager: public BaseManager
char *proxy_options;
char *env_prep;
-#ifndef _WIN32
int process_server_sockfd;
volatile int watched_process_fd;
volatile pid_t proxy_launch_pid;
-#else
- bool process_server_connected;
- int proxy_valid_server_ports;
- HANDLE process_server_hpipe;
- HANDLE process_connect_hevent;
- HANDLE proxy_launch_hproc;
- HANDLE proxy_IOCPort;
-#endif
int mgmt_sync_key;
View
11 mgmt/Main.cc
@@ -177,7 +177,6 @@ check_lockfile()
void
initSignalHandlers()
{
-#ifndef _WIN32
struct sigaction sigHandler, sigChldHandler, sigAlrmHandler;
sigset_t sigsToBlock;
@@ -255,7 +254,6 @@ initSignalHandlers()
sigChldHandler.sa_flags = SA_RESTART;
sigemptyset(&sigChldHandler.sa_mask);
sigaction(SIGCHLD, &sigChldHandler, NULL);
-#endif /* !_WIN32 */
}
#if defined(linux)
@@ -837,7 +835,6 @@ main(int argc, char **argv)
if (lmgmt->proxy_launch_outstanding && !lmgmt->processRunning() && just_started >= 120) {
just_started = 0;
lmgmt->proxy_launch_outstanding = false;
-#ifndef _WIN32
if (lmgmt->proxy_launch_pid != -1) {
int res;
kill(lmgmt->proxy_launch_pid, 9);
@@ -851,11 +848,6 @@ main(int argc, char **argv)
#endif /* NEED_PSIGNAL */
}
}
-#else
- if (lmgmt->proxy_launch_hproc != INVALID_HANDLE_VALUE) {
- TerminateProcess(lmgmt->proxy_launch_hproc, 1);
- }
-#endif /* !_WIN32 */
mgmt_log(stderr, "[main] Proxy launch failed, retrying...\n");
}
@@ -872,7 +864,6 @@ main(int argc, char **argv)
} /* End main */
-#ifndef _WIN32
#if !defined(linux) && !defined(freebsd) && !defined(darwin)
void
SignalAlrmHandler(int sig, siginfo_t * t, void *c)
@@ -1008,8 +999,6 @@ SigHupHandler(int sig, ...)
Debug("lm", "[SigHupHandler] hup caught\n");
sigHupNotifier = 1;
} /* End SigHupHandler */
-#endif /* !_WIN32 */
-
void
printUsage()
View
37 mgmt/MultiFile.cc
@@ -98,13 +98,8 @@ MultiFile::addTableEntries(ExpandingArray * fileList, textBuffer * output)
MFresult
MultiFile::WalkFiles(ExpandingArray * fileList)
{
-#ifndef _WIN32
struct dirent *dirEntry;
DIR *dir;
-#else
- char *searchPattern;
- WIN32_FIND_DATA W32FD;
-#endif
char *fileName;
char *filePath;
char *records_config_filePath = NULL;
@@ -112,7 +107,6 @@ MultiFile::WalkFiles(ExpandingArray * fileList)
struct stat records_config_fileInfo;
fileEntry *fileListEntry;
-#ifndef _WIN32
if ((dir = opendir(managedDir)) == NULL) {
mgmt_log(stderr, "[MultiFile::WalkFiles] Unable to open %s directory: %s: %s\n",
dirDescript, managedDir, strerror(errno));
@@ -150,37 +144,6 @@ MultiFile::WalkFiles(ExpandingArray * fileList)
ats_free(dirEntry);
closedir(dir);
-#else
- // Append '\*' as a wildcard for FindFirstFile()
- searchPattern = newPathString(managedDir, "*");
- HANDLE hDInfo = FindFirstFile(searchPattern, &W32FD);
-
- if (INVALID_HANDLE_VALUE == hDInfo) {
- mgmt_log(stderr, "[MultiFile::WalkFiles] FindFirstFile failed for %s: %s\n", searchPattern, ink_last_err());
- delete[]searchPattern;
- return MF_NO_DIR;
- }
- delete[]searchPattern;
-
- while (FindNextFile(hDInfo, &W32FD)) {
- fileName = W32FD.cFileName;
- filePath = newPathString(managedDir, fileName);
- if (stat(filePath, &fileInfo) < 0) {
- mgmt_log(stderr, "[MultiFile::WalkFiles] Stat of a %s failed %s: %s\n", dirDescript, fileName, strerror(errno));
- } else {
- // Ignore ., .., and any dot files
- if (*fileName != '.' && isManaged(fileName)) {
- fileListEntry = (fileEntry *)ats_malloc(sizeof(fileEntry));
- fileListEntry->c_time = fileInfo.st_ctime;
- ink_strlcpy(fileListEntry->name, fileName, sizeof(fileListEntry->name));
- fileList->addEntry(fileListEntry);
- }
- }
- delete[]filePath;
- }
-
- FindClose(hDInfo);
-#endif
fileList->sortWithFunction(fileEntryCmpFunc);
delete[]records_config_filePath;
View
55 mgmt/ProcessManager.cc
@@ -156,14 +156,7 @@ ProcessManager::processSignalQueue()
Debug("pmgmt", "[ProcessManager] ==> Signalling local manager '%d'\n", mh->msg_id);
-#ifndef _WIN32
if (require_lm && mgmt_write_pipe(local_manager_sockfd, (char *) mh, sizeof(MgmtMessageHdr) + mh->data_len) <= 0) {
-#else
-
-#error "[ewong] need to port the new messaging mechanism to windows!"
-
- if (require_lm && mgmt_write_pipe(local_manager_hpipe, tmp, strlen(tmp)) != 0) {
-#endif
mgmt_fatal(stderr, "[ProcessManager::processSignalQueue] Error writing message!");
//ink_assert(enqueue(mgmt_signal_queue, mh));
} else {
@@ -186,7 +179,6 @@ ProcessManager::initLMConnection()
int data_len;
char *sync_key_raw = NULL;
-#ifndef _WIN32
int servlen;
struct sockaddr_un serv_addr;
@@ -235,27 +227,7 @@ ProcessManager::initLMConnection()
}
}
-#else
-
-#error "[ewong] need to port the new messaging mechanism to windows!"
-
- sprintf(message, "\\\\.\\pipe\\traffic_server_%s", LM_CONNECTION_SERVER);
- local_manager_hpipe = CreateFile(message, GENERIC_READ | GENERIC_WRITE,
- 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED | FILE_ATTRIBUTE_NORMAL, NULL);
-
- if (local_manager_hpipe == INVALID_HANDLE_VALUE) {
- mgmt_fatal(stderr, "[ProcessManager::initLMConnection] Error opening named pipe: %s\n", ink_last_err());
- }
-
- sprintf(message, "pid: %ld", pid);
- if (mgmt_write_pipe(local_manager_hpipe, message, strlen(message)) != 0) {
- mgmt_fatal(stderr, "[ProcessManager::initLMConnection] Error writing message! %s\n", ink_last_err());
- }
- if (mgmt_read_pipe(local_manager_hpipe, message, 1024) < 0) {
- mgmt_fatal(stderr, "[ProcessManager::initLMConnection] Error reading sem message! %s\n", ink_last_err());
- }
-#endif
if (sync_key_raw)
memcpy(&mgmt_sync_key, sync_key_raw, sizeof(mgmt_sync_key));
@@ -274,7 +246,6 @@ ProcessManager::pollLMConnection()
MgmtMessageHdr *mh_full;
char *data_raw;
-#ifndef _WIN32
int num;
fd_set fdlist;
@@ -317,32 +288,6 @@ ProcessManager::pollLMConnection()
}
}
-#else
-
-#error "[ewong] need to port the new messaging mechanism to windows!"
-
- char message[1024];
- DWORD bytesAvail = 0;
- BOOL status = PeekNamedPipe(local_manager_hpipe, NULL, 0, NULL, &bytesAvail, NULL);
-
- if (status != FALSE && bytesAvail != 0) {
- res = mgmt_read_pipe(local_manager_hpipe, message, 1024);
-
- if (res < 0) { /* Error */
- status = FALSE;
- } else {
- Debug("pmgmt", "[ProcessManager::pollLMConnection] Message: '%s'\n", message);
- handleMgmtMsgFromLM(message);
- }
- } else {
- // avoid tight poll loop -- select() in Unix version above times out if no data.
- mgmt_sleep_msec(poll_timeout.tv_sec * 1000 + poll_timeout.tv_usec / 1000);
- }
- if (status == FALSE) {
- CloseHandle(local_manager_hpipe);
- mgmt_fatal(stderr, "[ProcessManager::pollLMConnection] Lost Manager! %s\n", ink_last_err());
- }
-#endif // !_WIN32
} /* End ProcessManager::pollLMConnection */
View
12 mgmt/ProcessManager.h
@@ -50,11 +50,7 @@ class ProcessManager:public BaseManager
ProcessManager(bool rlm, char *mpath);
~ProcessManager()
{
-#ifndef _WIN32
close_socket(local_manager_sockfd);
-#else
- CloseHandle(local_manager_hpipe);
-#endif
while (!queue_is_empty(mgmt_signal_queue))
{
char *sig = (char *) dequeue(mgmt_signal_queue);
@@ -71,11 +67,7 @@ class ProcessManager:public BaseManager
void stop()
{
mgmt_log(stderr, "[ProcessManager::stop] Bringing down connection\n");
-#ifndef _WIN32
close_socket(local_manager_sockfd);
-#else
- CloseHandle(local_manager_hpipe);
-#endif
}
inkcoreapi void signalManager(int msg_id, const char *data_str);
@@ -98,11 +90,7 @@ class ProcessManager:public BaseManager
pid_t pid;
-#ifndef _WIN32
int local_manager_sockfd;
-#else
- HANDLE local_manager_hpipe;
-#endif
private:
View
87 mgmt/Rollback.cc
@@ -148,11 +148,7 @@ root_access_needed(root_access_needed_)
}
if (needZeroLength == true) {
-#ifndef _WIN32
int fd = openFile(ACTIVE_VERSION, O_RDWR | O_CREAT);
-#else
- int fd = openFile(ACTIVE_VERSION, O_RDWR | O_CREAT | O_BINARY);
-#endif
if (fd >= 0) {
alarmMsg = (char *)ats_malloc(2048);
snprintf(alarmMsg, 2048, "Created zero length place holder for config file %s", fileName);
@@ -368,9 +364,8 @@ Rollback::openFile(version_t version, int oflags, int *errnoPtr)
}
mgmt_log(stderr, "[Rollback::openFile] Open of %s failed: %s\n", fileName, strerror(errno));
}
-#ifndef _WIN32 // no need to set close-on-exec on NT
+
fcntl(fd, F_SETFD, 1);
-#endif
delete[]filePath;
@@ -380,7 +375,6 @@ Rollback::openFile(version_t version, int oflags, int *errnoPtr)
int
Rollback::closeFile(int fd)
{
-#ifndef _WIN32
if (fsync(fd) == -1) {
// INKqa11574: SGI fsync will return EBADF error if the file was
// open w/o write access (e.g. read-only). Do not print an error
@@ -390,7 +384,6 @@ Rollback::closeFile(int fd)
mgmt_log(stderr, "[Rollback::closeFile] fsync failed for file '%s' (%d: %s)\n", fileName, errno, strerror(errno));
}
}
-#endif /* _WIN32 */
return (close(fd));
}
@@ -486,11 +479,7 @@ Rollback::internalUpdate(textBuffer * buf, version_t newVersion, bool notifyChan
// Create the new configuration file
// TODO: Make sure they are not created in Sysconfigdir!
-#ifndef _WIN32
diskFD = openFile(newVersion, O_WRONLY | O_CREAT | O_TRUNC);
-#else
- diskFD = openFile(newVersion, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY);
-#endif
if (diskFD < 0) {
// Could not create the new file. The operation is aborted
@@ -506,7 +495,6 @@ Rollback::internalUpdate(textBuffer * buf, version_t newVersion, bool notifyChan
returnCode = SYS_CALL_ERROR_ROLLBACK;
goto UPDATE_CLEANUP;
}
-#ifndef _WIN32
// Now that we got a the new version on the disk lets do some renaming
if (link(activeVersion, currentVersion_local) < 0) {
@@ -533,33 +521,6 @@ Rollback::internalUpdate(textBuffer * buf, version_t newVersion, bool notifyChan
returnCode = SYS_CALL_ERROR_ROLLBACK;
goto UPDATE_CLEANUP;
}
-#else
-
- // have to use CopyFile() because there is no sym link on NT
- if (strcmp(activeVersion, currentVersion_local) != 0) {
- if (CopyFile(activeVersion, currentVersion_local, FALSE) == FALSE) {
- mgmt_log(stderr, "[Rollback::internalUpdate] CopyFile failed : %s\n", ink_last_err());
- DWORD lastError = GetLastError();
- if (lastError == ERROR_FILE_NOT_FOUND || lastError == ERROR_PATH_NOT_FOUND) {
- mgmt_log(stderr,
- "[Rollback::internalUpdate] The active version of %s was lost.\n\tThe updated copy was installed.\n",
- fileName);
- failedLink = true;
- } else {
- returnCode = SYS_CALL_ERROR_ROLLBACK;
- goto UPDATE_CLEANUP;
- }
- }
- }
-
- if (MoveFileEx(nextVersion, activeVersion, MOVEFILE_REPLACE_EXISTING | MOVEFILE_WRITE_THROUGH) == FALSE) {
- mgmt_log(stderr, "[Rollback::internalUpdate] MoveFileEx failed : %s\n", ink_last_err());
- mgmt_log(stderr, "[Rollback::internalUpdate] Unable to create new version of %s. Using prior version\n", fileName);
-
- returnCode = SYS_CALL_ERROR_ROLLBACK;
- goto UPDATE_CLEANUP;
- }
-#endif
// Now we need to get the modification time off of the new active file
if (statFile(ACTIVE_VERSION, &fileInfo) >= 0) {
@@ -660,15 +621,7 @@ Rollback::getVersion_ml(version_t version, textBuffer ** buffer)
if (version == currentVersion) {
version = ACTIVE_VERSION;
}
-#ifndef _WIN32
diskFD = openFile(version, O_RDONLY);
-#else
- // - Specify O_BINARY on WIN32 because we don't want the CR-LF
- // sequences to be translated.
- // - If we don't open with O_BINARY, the size we get from fstat()
- // would not match with # bytes read from the file.
- diskFD = openFile(version, O_RDONLY | O_BINARY);
-#endif
if (diskFD < 0) {
returnCode = FILE_NOT_FOUND_ROLLBACK;
@@ -786,8 +739,6 @@ Rollback::findVersions_ml(ExpandingArray * listNames)
int count = 0;
version_t highestSeen = 0, version = 0;
-#ifndef _WIN32
-
DIR *dir;
struct dirent *dirEntrySpace;
struct dirent *entryPtr;
@@ -823,42 +774,6 @@ Rollback::findVersions_ml(ExpandingArray * listNames)
ats_free(dirEntrySpace);
closedir(dir);
-#else
-
- char *searchPattern;
- WIN32_FIND_DATA W32FD;
-
- // Append '*' as a wildcard for FindFirstFile()
- size_t configDirLen = strlen(configDir) + 2;
- searchPattern = new char[configDirLen];
- snprintf(searchPattern, configDirLen, "%s*", configDir);
- HANDLE hDInfo = FindFirstFile(searchPattern, &W32FD);
-
- if (INVALID_HANDLE_VALUE == hDInfo) {
- mgmt_log(stderr, "[Rollback::findVersions_ml] FindFirstFile failed for %s: %s\n", searchPattern, ink_last_err());
- delete[]searchPattern;
- return INVALID_VERSION;
- }
- delete[]searchPattern;
-
- while (FindNextFile(hDInfo, &W32FD)) {
-
- if ((version = extractVersionInfo(listNames, W32FD.cFileName))
- != INVALID_VERSION) {
- count++;
-
- if (version > highestSeen) {
- highestSeen = version;
- }
-
- }
-
- }
-
- FindClose(hDInfo);
-
-#endif // !_WIN32
-
numVersions = count;
return highestSeen;
}
View
3  mgmt/api/CoreAPI.cc
@@ -560,9 +560,6 @@ ReadFile(TSFileNameT file, char **text, int *size, int *version)
*version = ver;
// don't need to allocate memory b/c "getVersion" allocates memory
-#ifdef _WIN32 // BZ48741
- convertHtmlToUnix(old_file_content->bufPtr());
-#endif
old_file_lines = old_file_content->bufPtr();
old_file_len = strlen(old_file_lines);
View
50 mgmt/api/CoreAPIShared.cc
@@ -28,10 +28,8 @@
// Forward declarations, used to be in the CoreAPIShared.h include file but
// that doesn't make any sense since these are both statically declared. /leif
-#ifndef _WIN32
static int poll_write(int fd, int timeout);
static int poll_read(int fd, int timeout);
-#endif
/* parseHTTPResponse
* - parse the response buffer into header and body and calculate
@@ -82,20 +80,6 @@ parseHTTPResponse(char *buffer, char **header, int *hdr_size, char **body, int *
TSError
readHTTPResponse(int sock, char *buffer, int bufsize, uint64_t timeout)
{
-#ifdef _WIN32
- TimedIOStatus ret;
- unsigned long bytesRead = 0L;
-
- ret = TimedRead(sock, buffer, bufsize, &bytesRead, timeout);
-
- if (ret != ERR_NONE) {
- // printf("(test) TimedRead failed: %d\n", ret);
- goto error;
- } else {
- close_socket(sock);
- return TS_ERR_OKAY;
- }
-#else
int64_t err, idx;
idx = 0;
@@ -132,7 +116,6 @@ readHTTPResponse(int sock, char *buffer, int bufsize, uint64_t timeout)
idx += err;
}
}
-#endif
error: /* "Houston, we have a problem!" (Apollo 13) */
if (sock >= 0) {
@@ -159,18 +142,6 @@ sendHTTPRequest(int sock, char *req, uint64_t timeout)
snprintf(request, BUFSIZ, "GET %s HTTP/1.0\r\n\r\n", req);
length = strlen(request);
-#ifdef _WIN32
- TimedIOStatus ret;
- unsigned long bytesWritten = 0L;
-
- // Write the request to the server.
- ret = TimedWrite(sock, request, length, &bytesWritten, timeout);
-
- if (ret != ERR_NONE || bytesWritten != length) {
- // print("(test) TimedWrite failed: %d\n", ret);
- goto error;
- }
-#else
int err = poll_write(sock, timeout);
if (err < 0) {
// printf("(test) poll write failed [%d '%s']\n", errno, strerror (errno));
@@ -193,7 +164,6 @@ sendHTTPRequest(int sock, char *req, uint64_t timeout)
requestPtr += err;
length -= err;
}
-#endif
/* everything went well */
return TS_ERR_OKAY;
@@ -212,9 +182,6 @@ int
connectDirect(const char *host, int port, uint64_t timeout)
{
NOWARN_UNUSED(timeout);
-#ifdef _WIN32
- TimedIOStatus ret;
-#endif
int sock;
// Create a socket
@@ -226,18 +193,7 @@ connectDirect(const char *host, int port, uint64_t timeout)
// printf("(test) unable to create socket [%d '%s']\n", errno, strerror(errno));
goto error;
}
-#ifdef _WIN32
- struct hostent *pHostent;
- pHostent = gethostbyname(host);
- if (!pHostent) {
- return -1;
- }
- ret = TimedConnect(sock, pHostent->h_addr, port, (int) timeout);
- if (ret != ERR_NONE) {
- // printf("(test) TimedConnect failed: %d\n", ret);
- goto error;
- }
-#else
+
struct sockaddr_in name;
memset((void *) &name, 0, sizeof(sockaddr_in));
@@ -272,7 +228,6 @@ connectDirect(const char *host, int port, uint64_t timeout)
// printf("(test) unable to connect to server [%d '%s'] at port %d\n", errno, strerror (errno), port);
goto error;
}
-#endif
return sock;
error:
@@ -283,7 +238,6 @@ connectDirect(const char *host, int port, uint64_t timeout)
} /* connectDirect */
/* COPIED direclty form TrafficCop.cc */
-#ifndef _WIN32
static int
poll_read(int fd, int timeout)
{
@@ -327,8 +281,6 @@ poll_write(int fd, int timeout)
return err;
}
-#endif // !_WIN32
-
/***************************************************************************
* socket_read_timeout
*
View
4 mgmt/api/GenericParser.cc
@@ -979,11 +979,7 @@ RuleList::parse(char *fileBuf, const char *filename)
void
RuleList::parse(char *fileBuf, TSFileNameT filetype)
{
-#ifdef _WIN32
- Tokenizer lineTok("\r\n");
-#else
Tokenizer lineTok("\n");
-#endif
tok_iter_state lineTok_state;
const char *line;
View
3  mgmt/api/INKMgmtAPIStub.cc
@@ -31,8 +31,6 @@
#include "mgmtapi.h"
-#ifndef _WIN32
-
/***************************************************************************
* API Helper Functions for Data Carrier Structures
***************************************************************************/
@@ -805,4 +803,3 @@ INKIsValid(INKCfgEle * ele)
return true;
}
-#endif
View
11 mgmt/api/include/mgmtapi.h
@@ -39,21 +39,10 @@
* System Specific Items
***************************************************************************/
-#if defined (_WIN32) && defined (_TS_EXPORT)
-#define tsapi __declspec( dllexport )
-#elif defined (_WIN32)
-#define tsapi __declspec( dllimport )
-#else
#define tsapi
-#endif
-#if defined (_WIN32)
-#define inkexp __declspec( dllexport )
-#define inkimp __declspec( dllimport )
-#else
#define inkexp
#define inkimp
-#endif
#if !defined(linux)
#if defined (__SUNPRO_CC) || (defined (__GNUC__) || ! defined(__cplusplus))
View
4 mgmt/api/remote/EventRegistration.cc
@@ -48,8 +48,6 @@
#include "NetworkUtilsRemote.h"
#include "EventCallback.h"
-#ifndef _WIN32
-
CallbackTable *remote_event_callbacks;
/**********************************************************************
@@ -165,5 +163,3 @@ event_callback_thread(void *arg)
// all done!
return NULL;
}
-
-#endif
View
3  mgmt/api/remote/EventRegistration.h
@@ -34,7 +34,6 @@
#include <stdio.h>
-#ifndef _WIN32
#ifdef __cplusplus
extern "C"
{
@@ -47,6 +46,4 @@ void *event_poll_thread_main(void *arg);
}
#endif /* __cplusplus */
-#endif /* !_WIN32 */
-
#endif /* _EVENT_REGISTRATION_H */
View
97 mgmt/cluster/ClusterCom.cc
@@ -155,13 +155,11 @@ drainIncomingChannel(void *arg)
mgmt_elog(stderr, "[drainIncomingChannel] error accepting " "reliable connection\n");
continue;
}
-#ifndef _WIN32 /* no need to set close-on-exec on NT */
if (fcntl(req_fd, F_SETFD, 1) < 0) {
mgmt_elog(stderr, "[drainIncomingChannel] Unable to set close " "on exec flag\n");
close(req_fd);
continue;
}
-#endif
// In no cluster mode, the rsport should not be listening.
ink_release_assert(lmgmt->ccom->cluster_type != NO_CLUSTER);
@@ -1575,11 +1573,9 @@ ClusterCom::establishChannels()
if ((reliable_server_fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
mgmt_fatal("[ClusterCom::establishChannels] Unable to create socket\n");
}
-#ifndef _WIN32 /* no need to set close-on-exec on NT */
if (fcntl(reliable_server_fd, F_SETFD, 1) < 0) {
mgmt_fatal("[ClusterCom::establishChannels] Unable to set close-on-exec.\n");
}
-#endif
if (setsockopt(reliable_server_fd, SOL_SOCKET, SO_REUSEADDR, (char *) &one, sizeof(int)) < 0) {
mgmt_fatal("[ClusterCom::establishChannels] Unable to set socket options.\n");
@@ -1613,7 +1609,6 @@ ClusterCom::establishChannels()
void
ClusterCom::establishBroadcastChannel(void)
{
-#ifndef _WIN32
if ((broadcast_fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
mgmt_fatal("[ClusterCom::establishBroadcastChannel] Unable to open socket.\n");
}
@@ -1621,23 +1616,6 @@ ClusterCom::establishBroadcastChannel(void)
if (fcntl(broadcast_fd, F_SETFD, 1) < 0) {
mgmt_fatal("[ClusterCom::establishBroadcastChannel] Unable to set close-on-exec.\n");
}
-#else
- if ((broadcast_fd = WSASocket(AF_INET, SOCK_DGRAM, 0, NULL, 0,
- WSA_FLAG_MULTIPOINT_C_LEAF | WSA_FLAG_MULTIPOINT_D_LEAF)) == INVALID_SOCKET) {
- mgmt_fatal("[ClusterCom::establishBroadcastChannel] Unable to open socket.\n");
- }
- // To fix INKqa04541, we need to explicitly bind the
- // multicast socket to the cluster interface.
- struct sockaddr_in cluster_intr_addr;
- memset(&cluster_intr_addr, 0, sizeof(cluster_intr_addr));
- cluster_intr_addr.sin_family = AF_INET;
- cluster_intr_addr.sin_addr.s_addr = our_ip;
- cluster_intr_addr.sin_port = htons(mc_port);
-
- if (bind(broadcast_fd, (struct sockaddr *) &cluster_intr_addr, sizeof(cluster_intr_addr)) < 0) {
- mgmt_fatal("[ClusterCom::establishBroadcastChannel] Unable to bind to socket, port %d\n", mc_port);
- }
-#endif // !_WIN32
int one = 1;
if (setsockopt(broadcast_fd, SOL_SOCKET, SO_REUSEADDR, (const char *) &one, sizeof(one)) < 0) {
@@ -1649,7 +1627,6 @@ ClusterCom::establishBroadcastChannel(void)
broadcast_addr.sin_addr.s_addr = inet_addr(mc_group);
broadcast_addr.sin_port = htons(mc_port);
-#ifndef _WIN32
u_char ttl = mc_ttl, loop = 0;
/* Set ttl(max forwards), 1 should be default(same subnetwork). */
@@ -1661,32 +1638,6 @@ ClusterCom::establishBroadcastChannel(void)
if (setsockopt(broadcast_fd, IPPROTO_IP, IP_MULTICAST_LOOP, (const char *) &loop, sizeof(loop)) < 0) {
mgmt_fatal("[ClusterCom::establishBroadcastChannel] Unable to disable loopback\n");
}
-#else
- DWORD ttl = mc_ttl;
- BOOL loop = FALSE;
-
- if (WSAJoinLeaf(broadcast_fd, (struct sockaddr *) &broadcast_addr,
- sizeof(struct sockaddr_in), NULL, NULL, NULL, NULL, JL_SENDER_ONLY) == INVALID_SOCKET) {
- mgmt_fatal("[ClusterCom::establishBroadcastChannel] Unable to join group\n");
- }
-
- DWORD retcount = 0;
- /* Set ttl(max forwards), 1 should be default(same subnetwork). */
- if (WSAIoctl(broadcast_fd, SIO_MULTICAST_SCOPE, (LPVOID) & ttl, sizeof(ttl), NULL, 0, &retcount, NULL, NULL) != 0) {
- mgmt_fatal("[ClusterCom::establishBroadcastChannel] Unable to setsocketopt, ttl\n");
- }
-// FIX THIS: elam 02/03/1999
-// Loopback disable is currently not working on NT.
-// We need to filter when we recv.
-//
-// retcount = 0;
-// /* Disable broadcast loopback, that is broadcasting to self */
-// if (WSAIoctl(broadcast_fd, SIO_MULTIPOINT_LOOPBACK, (LPVOID) &loop, sizeof(loop),
-// NULL, 0, &retcount, NULL, NULL) != 0) {
-// mgmt_fatal(
-// "[ClusterCom::establishBroadcastChannel] Unable to disable loopback\n");
-// }
-#endif
return;
} /* End ClusterCom::establishBroadcastChannel */
@@ -1701,7 +1652,6 @@ ClusterCom::establishBroadcastChannel(void)
int
ClusterCom::establishReceiveChannel(int fatal_on_error)
{
-#ifndef _WIN32
if ((receive_fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
if (!fatal_on_error) {
Debug("ccom", "establishReceiveChannel: Unable to open socket");
@@ -1719,18 +1669,6 @@ ClusterCom::establishReceiveChannel(int fatal_on_error)
}
mgmt_fatal("[ClusterCom::establishReceiveChannel] Unable to set close-on-exec.\n");
}
-#else
- if ((receive_fd = WSASocket(AF_INET, SOCK_DGRAM, 0, NULL, 0,
- WSA_FLAG_MULTIPOINT_C_LEAF | WSA_FLAG_MULTIPOINT_D_LEAF)) == INVALID_SOCKET) {
- if (!fatal_on_error) {
- close(receive_fd);
- receive_fd = -1;
- Debug("ccom", "establishReceiveChannel: Unable to open socket");
- return 1;
- }
- mgmt_fatal("[ClusterCom::establishReceiveChannel] Unable to open socket.\n");
- }
-#endif // !_WIN32
int one = 1;
if (setsockopt(receive_fd, SOL_SOCKET, SO_REUSEADDR, (char *) &one, sizeof(int)) < 0) {
@@ -1745,12 +1683,7 @@ ClusterCom::establishReceiveChannel(int fatal_on_error)
memset(&receive_addr, 0, sizeof(receive_addr));
receive_addr.sin_family = AF_INET;
-#ifndef _WIN32
receive_addr.sin_addr.s_addr = htonl(INADDR_ANY);
-#else
- // Fix INKqa04541, see above.
- receive_addr.sin_addr.s_addr = our_ip;
-#endif
receive_addr.sin_port = htons(mc_port);
if (bind(receive_fd, (struct sockaddr *) &receive_addr, sizeof(receive_addr)) < 0) {
@@ -1762,7 +1695,6 @@ ClusterCom::establishReceiveChannel(int fatal_on_error)
}
mgmt_fatal("[ClusterCom::establishReceiveChannel] Unable to bind to socket, port %d\n", mc_port);
}
-#ifndef _WIN32
/* Add ourselves to the group */
struct ip_mreq mc_request;
mc_request.imr_multiaddr.s_addr = inet_addr(mc_group);
@@ -1777,23 +1709,6 @@ ClusterCom::establishReceiveChannel(int fatal_on_error)
}
mgmt_fatal("[ClusterCom::establishReceiveChannel] Can't add ourselves to multicast group %s\n", mc_group);
}
-#else
- struct sockaddr_in mc_sa;
- memset(&mc_sa, 0, sizeof(mc_sa));
- mc_sa.sin_family = AF_INET;
- mc_sa.sin_addr.s_addr = inet_addr(mc_group);
- mc_sa.sin_port = htons(mc_port);
- if (WSAJoinLeaf(receive_fd, (struct sockaddr *) &mc_sa,
- sizeof(mc_sa), NULL, NULL, NULL, NULL, JL_RECEIVER_ONLY) == INVALID_SOCKET) {
- if (!fatal_on_error) {
- close(receive_fd);
- receive_fd = -1;
- Debug("ccom", "establishReceiveChannel: Can't add ourselves to multicast group %s", mc_group);
- return 1;
- }
- mgmt_fatal("[ClusterCom::establishReceiveChannel] Can't add ourselves to multicast group %s\n", mc_group);
- }
-#endif
return 0;
} /* End ClusterCom::establishReceiveChannel */
@@ -1922,13 +1837,11 @@ ClusterCom::rl_sendReliableMessage(unsigned long addr, const char *buf, int len)
mgmt_elog("[ClusterCom::rl_sendReliableMessage] Unable to create socket\n");
return false;
}
-#ifndef _WIN32 /* no need to set close-on-exec on NT */
if (fcntl(fd, F_SETFD, 1) < 0) {
mgmt_log("[ClusterCom::rl_sendReliableMessage] Unable to set close-on-exec.\n");
close(fd);
return false;
}
-#endif
if (connect(fd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0) {
mgmt_elog("[ClusterCom::rl_sendReliableMessage] Unable to connect to peer\n");
@@ -1984,7 +1897,6 @@ ClusterCom::sendReliableMessage(unsigned long addr, char *buf, int len, char *re
}
return false;
}
-#ifndef _WIN32 /* no need to set close-on-exec on NT */
if (fcntl(fd, F_SETFD, 1) < 0) {
mgmt_elog("[ClusterCom::sendReliableMessage] Unable to set close-on-exec.\n");
if (take_lock) {
@@ -1993,7 +1905,6 @@ ClusterCom::sendReliableMessage(unsigned long addr, char *buf, int len, char *re
close(fd);
return false;
}
-#endif
if (connect(fd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0) {
mgmt_elog("[ClusterCom::sendReliableMessage] Unable to connect to peer\n");
@@ -2064,14 +1975,12 @@ ClusterCom::sendReliableMessageReadTillClose(unsigned long addr, char *buf, int
ink_mutex_release(&mutex);
return false;
}
-#ifndef _WIN32 /* no need to set close-on-exec on NT */
if (fcntl(fd, F_SETFD, 1) < 0) {
mgmt_elog("[ClusterCom::sendReliableMessageReadTillClose] Unable to set close-on-exec.\n");
ink_mutex_release(&mutex);
close(fd);
return false;
}
-#endif
if (connect(fd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0) {
mgmt_elog("[ClusterCom::sendReliableMessageReadTillClose] Unable to connect\n");
@@ -2455,7 +2364,6 @@ checkBackDoor(int req_fd, char *message)
(lmgmt->mgmt_shutdown_outstanding ? "true" : "false"));
mgmt_writeline(req_fd, reply, strlen(reply));
-#if !defined(_WIN32)
// XXX: Again multiple code caused by misssing PID_T_FMT
// TODO: Was #if defined(solaris) && (!defined(_FILE_OFFSET_BITS) || _FILE_OFFSET_BITS != 64)
#if defined(solaris)
@@ -2466,11 +2374,6 @@ checkBackDoor(int req_fd, char *message)
lmgmt->watched_process_fd, lmgmt->watched_process_pid);
#endif
mgmt_writeline(req_fd, reply, strlen(reply));
-#else // We don't have unix domain sockets on NT
- snprintf(reply, sizeof(reply), "\tprocess_server_hpipe: %d watched_process_pid: %ld\n",
- lmgmt->process_server_hpipe, lmgmt->watched_process_pid);
- mgmt_writeline(req_fd, reply, strlen(reply));
-#endif
ink_strlcpy(reply, "---------------------------\n", sizeof(reply));
mgmt_writeline(req_fd, reply, strlen(reply));
View
54 mgmt/cluster/VMap.h
@@ -26,40 +26,6 @@
#include "libts.h"
-#ifdef _WIN32
-/* Currently, iphlpapi.h is not present in VC98\include;
- However, its present in sdk
-*/
-# include <iphlpapi.h>
-
-#define NULL_IP_ADDR 0
-#define IP_ADDR_EQUAL(ip1, ip2) ((ip1) == (ip2))
-
-#define MAX_INTERFACE_LENGTH 20
-
-#define INVALID_NTE_CONTEXT 0xffffffff
-
-typedef struct _vip_info
-{
- char interface[MAX_INTERFACE_LENGTH];
-} VIPInfo;
-
-
-typedef struct _realip_info
-{
- DWORD ifindex;
- IPAddr subnet_mask;
-} RealIPInfo;
-
-typedef struct _vmap_info
-{
- bool mapping;
- ULONG nte_context;
-} VMAPInfo;
-
-
-#else // _WIN32
-
#define MAX_INTERFACE 16
#define MAX_SUB_ID 8
@@ -77,8 +43,6 @@ typedef struct _realip_info
bool mappings_for_interface;
} RealIPInfo;
-#endif