shared_globals.c 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. #ifndef CONFIG
  2. #define CONFIG "config.h"
  3. #endif // CONFIG
  4. #include CONFIG
  5. #include "shared_globals.h"
  6. int global_argc, multi_argc = 0;
  7. CARGV global_argv, multi_argv = NULL;
  8. const char *const Version = VERSION;
  9. DWORD VLActivationInterval = 60 * 2; // 2 hours
  10. DWORD VLRenewalInterval = 60 * 24 * 7; // 7 days
  11. int_fast8_t DisconnectImmediately = FALSE;
  12. const char *const cIPv4 = "IPv4";
  13. const char *const cIPv6 = "IPv6";
  14. #ifndef USE_MSRPC
  15. int_fast8_t UseMultiplexedRpc = TRUE;
  16. int_fast8_t UseRpcNDR64 = TRUE;
  17. int_fast8_t UseRpcBTFN = TRUE;
  18. #endif // USE_MSRPC
  19. #ifndef NO_SOCKETS
  20. const char *defaultport = "1688";
  21. #endif // NO_SOCKETS
  22. KmsResponseParam_t KmsResponseParameters[MAX_KMSAPPS];
  23. #if !defined(NO_SOCKETS) && !defined(NO_SIGHUP) && !defined(_WIN32)
  24. int_fast8_t IsRestarted = FALSE;
  25. #endif // !defined(NO_SOCKETS) && !defined(NO_SIGHUP) && !defined(_WIN32)
  26. #if !defined(NO_TIMEOUT) && !__minix__
  27. DWORD ServerTimeout = 30;
  28. #endif // !defined(NO_TIMEOUT) && !__minix__
  29. #if !defined(NO_LIMIT) && !defined (NO_SOCKETS) && !__minix__
  30. #ifdef USE_MSRPC
  31. uint32_t MaxTasks = RPC_C_LISTEN_MAX_CALLS_DEFAULT;
  32. #else // !USE_MSRPC
  33. uint32_t MaxTasks = SEM_VALUE_MAX;
  34. #endif // !USE_MSRPC
  35. #endif // !defined(NO_LIMIT) && !defined (NO_SOCKETS) && !__minix__
  36. #ifndef NO_LOG
  37. char *fn_log = NULL;
  38. int_fast8_t logstdout = 0;
  39. #ifndef NO_VERBOSE_LOG
  40. int_fast8_t logverbose = 0;
  41. #endif // NO_VERBOSE_LOG
  42. #endif // NO_LOG
  43. #ifndef NO_SOCKETS
  44. int_fast8_t nodaemon = 0;
  45. int_fast8_t InetdMode = 0;
  46. #else
  47. int_fast8_t nodaemon = 1;
  48. int_fast8_t InetdMode = 1;
  49. #endif
  50. #ifndef NO_RANDOM_EPID
  51. int_fast8_t RandomizationLevel = 1;
  52. uint16_t Lcid = 0;
  53. #endif
  54. #ifndef NO_SOCKETS
  55. SOCKET *SocketList;
  56. int numsockets = 0;
  57. #if !defined(NO_LIMIT) && !__minix__
  58. #ifndef _WIN32 // Posix
  59. sem_t *Semaphore;
  60. #else // _WIN32
  61. HANDLE Semaphore;
  62. #endif // _WIN32
  63. #endif // !defined(NO_LIMIT) && !__minix__
  64. #endif // NO_SOCKETS
  65. #ifdef _NTSERVICE
  66. int_fast8_t IsNTService = TRUE;
  67. int_fast8_t ServiceShutdown = FALSE;
  68. #endif // _NTSERVICE
  69. #ifndef NO_LOG
  70. #ifdef USE_THREADS
  71. #if !defined(_WIN32) && !defined(__CYGWIN__)
  72. pthread_mutex_t logmutex = PTHREAD_MUTEX_INITIALIZER;
  73. #else
  74. CRITICAL_SECTION logmutex;
  75. #endif // !defined(_WIN32) && !defined(__CYGWIN__)
  76. #endif // USE_THREADS
  77. #endif // NO_LOG