1 #ifndef INCLUDED_SHARED_GLOBALS_H
2 #define INCLUDED_SHARED_GLOBALS_H
5 #define CONFIG "config.h"
12 #include <sys/socket.h>
13 #include <netinet/in.h>
14 #include <arpa/inet.h>
19 #if (!defined(NO_LIMIT) || defined(USE_THREADS)) && !__minix__
21 #endif // (!defined(NO_LIMIT) || defined(USE_THREADS)) && !__minix__
24 #if !defined(NO_LIMIT) && !__minix__
25 #include <semaphore.h>
26 #endif // !defined(NO_LIMIT) && !__minix__
45 #include <semaphore.h>
54 const char* EpidSource
;
56 } KmsResponseParam_t
, *PKmsResponseParam_t
;
58 #if !defined(NO_LIMIT) && !__minix__
59 #ifndef SEM_VALUE_MAX // Android does not define this
61 #define SEM_VALUE_MAX 0x3fffffff
62 #elif !defined(_WIN32)
63 #define SEM_VALUE_MAX 0x7fffffff
65 #define SEM_VALUE_MAX 0x7fff // Be cautious if unknown
67 #endif // !defined(SEM_VALUE_MAX)
68 #endif // !defined(NO_LIMIT) && !__minix__
70 extern const char *const Version
;
72 //Fix for stupid eclipse parser
74 #define UINT_MAX 4294967295
78 extern int global_argc
, multi_argc
;
79 extern CARGV global_argv
, multi_argv
;
80 extern int_fast8_t nodaemon
;
81 extern DWORD VLActivationInterval
;
82 extern DWORD VLRenewalInterval
;
83 extern int_fast8_t DisconnectImmediately
;
84 extern KmsResponseParam_t KmsResponseParameters
[MAX_KMSAPPS
];
85 extern const char *const cIPv4
;
86 extern const char *const cIPv6
;
87 extern int_fast8_t InetdMode
;
90 extern int_fast8_t UseMultiplexedRpc
;
91 extern int_fast8_t UseRpcNDR64
;
92 extern int_fast8_t UseRpcBTFN
;
96 extern const char *defaultport
;
99 #if !defined(NO_SOCKETS) && !defined(NO_SIGHUP) && !defined(_WIN32)
100 extern int_fast8_t IsRestarted
;
101 #endif // !defined(NO_SOCKETS) && !defined(NO_SIGHUP) && !defined(_WIN32)
103 #if !defined(NO_TIMEOUT) && !__minix__
104 extern DWORD ServerTimeout
;
105 #endif // !defined(NO_TIMEOUT) && !__minix__
107 #if !defined(NO_LIMIT) && !defined (NO_SOCKETS) && !__minix__
108 extern uint32_t MaxTasks
;
109 #endif // !defined(NO_LIMIT) && !defined (NO_SOCKETS) && !__minix__
113 extern int_fast8_t logstdout
;
114 #ifndef NO_VERBOSE_LOG
115 extern int_fast8_t logverbose
;
119 #ifndef NO_RANDOM_EPID
120 extern int_fast8_t RandomizationLevel
;
121 extern uint16_t Lcid
;
124 #if !defined(NO_SOCKETS) && !defined(USE_MSRPC)
125 extern SOCKET
*SocketList
;
126 extern int numsockets
;
128 #if !defined(NO_LIMIT) && !__minix__
131 extern sem_t
*Semaphore
;
133 extern HANDLE Semaphore
;
136 #endif // !defined(NO_LIMIT) && !__minix__
138 #endif // !defined(NO_SOCKETS) && !defined(USE_MSRPC)
141 extern int_fast8_t IsNTService
;
142 extern int_fast8_t ServiceShutdown
;
147 #if !defined(_WIN32) && !defined(__CYGWIN__)
148 extern pthread_mutex_t logmutex
;
150 extern CRITICAL_SECTION logmutex
;
152 #endif // USE_THREADS
156 #endif // INCLUDED_SHARED_GLOBALS_H