|
Squid Web Cache v8/master
|
#include "squid.h"#include "debug/Stream.h"#include "globals.h"#include "protos.h"#include "SquidConfig.h"#include "tools.h"#include "windows_service.h"Go to the source code of this file.
Macros | |
| #define | NOTIFYADDRCHANGE "NotifyAddrChange" |
| #define | VENDOR "squid-cache.org" |
| #define | SOFTWARENAME PACKAGE_NAME |
| #define | SOFTWARE "SOFTWARE" |
| #define | COMMANDLINE "CommandLine" |
| #define | CONFIGFILE "ConfigFile" |
| #define | CHANGESERVICECONFIG2 "ChangeServiceConfig2A" |
Typedefs | |
| typedef DWORD(WINAPI * | PFNotifyAddrChange) (OUT PHANDLE, IN LPOVERLAPPED) |
| typedef BOOL(WINAPI * | PFChangeServiceConfig2) (SC_HANDLE, DWORD, LPVOID) |
Functions | |
| static void | WIN32_Exit (void) |
| static unsigned int | GetOSVersion () |
| void | WIN32_svcstatusupdate (DWORD, DWORD) |
| void WINAPI | WIN32_svcHandler (DWORD) |
| void WINAPI | SquidWinSvcMain (DWORD, char **) |
| static void | WIN32_Abort (int) |
| static int | WIN32_StoreKey (const char *, DWORD, unsigned char *, int) |
| static int | WIN32_create_key (void) |
| static void | WIN32_build_argv (char *) |
| static int | Win32SockInit (void) |
| static void | Win32SockCleanup (void) |
| void | WIN32_ExceptionHandlerCleanup (void) |
| void | WIN32_IpAddrChangeMonitorExit () |
| static DWORD WINAPI | WIN32_IpAddrChangeMonitor (LPVOID lpParam) |
| DWORD | WIN32_IpAddrChangeMonitorInit () |
| int | WIN32_Subsystem_Init (int *argc, char ***argv) |
| void | WIN32_RemoveService () |
| void | WIN32_SetServiceCommandLine () |
| void | WIN32_InstallService () |
| void | WIN32_sendSignal (int WIN32_signal) |
| int | WIN32_StartService (int argc, char **argv) |
| void | Squid_Win32InvalidParameterHandler (const wchar_t *expression, const wchar_t *function, const wchar_t *file, unsigned int line, uintptr_t pReserved) |
Variables | |
| SQUIDCEXTERN LPCRITICAL_SECTION | dbg_mutex |
| static int | s_iInitCount = 0 |
| static HANDLE | NotifyAddrChange_thread = INVALID_HANDLE_VALUE |
| static SERVICE_STATUS | svcStatus |
| static SERVICE_STATUS_HANDLE | svcHandle |
| static int | WIN32_argc |
| static char ** | WIN32_argv |
| static char * | WIN32_module_name |
| static char | VENDORString [] = VENDOR |
| static char | SOFTWARENAMEString [] = SOFTWARENAME |
| static char | SOFTWAREString [] = SOFTWARE |
| static SC_ACTION | Squid_SCAction [] = { { SC_ACTION_RESTART, 60000 } } |
| static char | Squid_ServiceDescriptionString [] = SOFTWARENAME " " VERSION " WWW Proxy Server" |
| static SERVICE_DESCRIPTION | Squid_ServiceDescription = { Squid_ServiceDescriptionString } |
| static SERVICE_FAILURE_ACTIONS | Squid_ServiceFailureActions = { INFINITE, nullptr, nullptr, 1, Squid_SCAction } |
| static char | REGKEY [256] = SOFTWARE "\\" VENDOR "\\" SOFTWARENAME "\\" |
| static char * | keys [] |
| static int | Squid_Aborting = 0 |
| #define CHANGESERVICECONFIG2 "ChangeServiceConfig2A" |
Definition at line 77 of file windows_service.cc.
| #define COMMANDLINE "CommandLine" |
Definition at line 70 of file windows_service.cc.
| #define CONFIGFILE "ConfigFile" |
Definition at line 71 of file windows_service.cc.
| #define NOTIFYADDRCHANGE "NotifyAddrChange" |
Definition at line 55 of file windows_service.cc.
| #define SOFTWARE "SOFTWARE" |
Definition at line 68 of file windows_service.cc.
| #define SOFTWARENAME PACKAGE_NAME |
Definition at line 66 of file windows_service.cc.
| #define VENDOR "squid-cache.org" |
Definition at line 64 of file windows_service.cc.
| typedef BOOL(WINAPI * PFChangeServiceConfig2) (SC_HANDLE, DWORD, LPVOID) |
Definition at line 73 of file windows_service.cc.
| typedef DWORD(WINAPI * PFNotifyAddrChange) (OUT PHANDLE, IN LPOVERLAPPED) |
Definition at line 54 of file windows_service.cc.
|
static |
Definition at line 285 of file windows_service.cc.
References safe_free, and xstrdup.
Referenced by WIN32_Subsystem_Init().
| void Squid_Win32InvalidParameterHandler | ( | const wchar_t * | expression, |
| const wchar_t * | function, | ||
| const wchar_t * | file, | ||
| unsigned int | line, | ||
| uintptr_t | pReserved | ||
| ) |
Definition at line 989 of file windows_service.cc.
Referenced by WIN32_Subsystem_Init().
| void WINAPI SquidWinSvcMain | ( | DWORD | , |
| char ** | |||
| ) |
Referenced by WIN32_StartService().
|
static |
Definition at line 375 of file windows_service.cc.
References Squid_Aborting, svcStatus, and WIN32_Exit().
Referenced by WIN32_Subsystem_Init().
|
static |
Definition at line 238 of file windows_service.cc.
References WIN32_argc, WIN32_argv, WIN32_module_name, xisspace, xmalloc, xrealloc(), and xstrdup.
Referenced by WIN32_Subsystem_Init().
|
static |
Definition at line 101 of file windows_service.cc.
Referenced by WIN32_StoreKey().
| void WIN32_ExceptionHandlerCleanup | ( | void | ) |
Referenced by WIN32_Exit().
|
static |
Definition at line 396 of file windows_service.cc.
References dbg_mutex, Squid_Aborting, svcHandle, svcStatus, WIN32_ExceptionHandlerCleanup(), WIN32_IpAddrChangeMonitorExit(), and Win32SockCleanup().
Referenced by WIN32_Abort(), and WIN32_Subsystem_Init().
| void WIN32_InstallService | ( | void | ) |
Definition at line 719 of file windows_service.cc.
References APP_SHORTNAME, SBuf::c_str(), CHANGESERVICECONFIG2, CONFIG_HOST_TYPE, ConfigFile, CONFIGFILE, SBuf::isEmpty(), keys, REGKEY, service_name, Squid_ServiceDescription, Squid_ServiceFailureActions, SQUIDSBUFPH, SQUIDSBUFPRINT, version_string, WIN32_StoreKey(), and xstrdup.
Referenced by SquidMain().
|
static |
Definition at line 418 of file windows_service.cc.
References DBG_IMPORTANT, debugs, NOTIFYADDRCHANGE, NULL, and reconfigure().
Referenced by WIN32_IpAddrChangeMonitorInit().
| void WIN32_IpAddrChangeMonitorExit | ( | ) |
Definition at line 385 of file windows_service.cc.
References NotifyAddrChange_thread.
Referenced by WIN32_Exit().
| DWORD WIN32_IpAddrChangeMonitorInit | ( | ) |
Definition at line 441 of file windows_service.cc.
References Config, DBG_IMPORTANT, debugs, NotifyAddrChange_thread, NULL, SquidConfig::onoff, SquidConfig::WIN32_IpAddrChangeMonitor, and WIN32_IpAddrChangeMonitor().
Referenced by mainInitialize().
| void WIN32_RemoveService | ( | void | ) |
Definition at line 648 of file windows_service.cc.
References APP_SHORTNAME, SBuf::c_str(), SBuf::isEmpty(), keys, NULL, REGKEY, service_name, SQUIDSBUFPH, SQUIDSBUFPRINT, and svcStatus.
Referenced by SquidMain().
| void WIN32_sendSignal | ( | int | WIN32_signal | ) |
Definition at line 799 of file windows_service.cc.
References APP_SHORTNAME, SBuf::c_str(), SBuf::isEmpty(), NULL, service_name, SQUIDSBUFPH, and SQUIDSBUFPRINT.
Referenced by sendSignal().
| void WIN32_SetServiceCommandLine | ( | void | ) |
Definition at line 704 of file windows_service.cc.
References APP_SHORTNAME, SBuf::c_str(), COMMANDLINE, SBuf::isEmpty(), keys, REGKEY, service_name, and WIN32_StoreKey().
Referenced by SquidMain().
Definition at line 894 of file windows_service.cc.
References SBuf::c_str(), keys, O_TEXT, REGKEY, service_name, and SquidWinSvcMain().
Referenced by main().
|
static |
Definition at line 167 of file windows_service.cc.
References REGKEY, and WIN32_create_key().
Referenced by WIN32_InstallService(), and WIN32_SetServiceCommandLine().
Definition at line 459 of file windows_service.cc.
References SBuf::c_str(), COMMANDLINE, ConfigFile, CONFIGFILE, GetOSVersion(), REGKEY, safe_free, service_name, Squid_MaxFD, Squid_Win32InvalidParameterHandler(), svcHandle, svcStatus, WIN32_Abort(), WIN32_argc, WIN32_argv, WIN32_build_argv(), WIN32_Exit(), WIN32_module_name, WIN32_svcHandler(), Win32SockInit(), xmalloc, and xstrdup.
Referenced by SquidMain().
| void WINAPI WIN32_svcHandler | ( | DWORD | Opcode | ) |
Definition at line 578 of file windows_service.cc.
References DBG_IMPORTANT, debugs, reconfigure(), rotate_logs(), shut_down(), sigusr2_handle(), svcHandle, and svcStatus.
Referenced by WIN32_Subsystem_Init().
| void WIN32_svcstatusupdate | ( | DWORD | svcstate, |
| DWORD | WaitHint | ||
| ) |
Definition at line 567 of file windows_service.cc.
References svcHandle, and svcStatus.
Referenced by SignalEngine::doShutdown(), SquidMain(), and SquidShutdown().
|
static |
Definition at line 981 of file windows_service.cc.
References s_iInitCount.
Referenced by main(), IcmpPinger::Open(), and WIN32_Exit().
|
static |
Definition at line 930 of file windows_service.cc.
References s_iInitCount.
Referenced by WIN32_Subsystem_Init().
| SQUIDCEXTERN LPCRITICAL_SECTION dbg_mutex |
Definition at line 48 of file windows_service.cc.
Referenced by Debug::LogMessage(), and WIN32_Exit().
|
static |
Definition at line 84 of file windows_service.cc.
Referenced by Security::ServerOptions::createStaticServerContext(), Ssl::InitClientContext(), Notes::ReservedKeys(), WIN32_create_key(), WIN32_InstallService(), WIN32_RemoveService(), WIN32_SetServiceCommandLine(), and WIN32_StartService().
|
static |
Definition at line 51 of file windows_service.cc.
Referenced by WIN32_IpAddrChangeMonitorExit(), and WIN32_IpAddrChangeMonitorInit().
|
static |
Definition at line 83 of file windows_service.cc.
Referenced by WIN32_InstallService(), WIN32_RemoveService(), WIN32_SetServiceCommandLine(), WIN32_StartService(), WIN32_StoreKey(), and WIN32_Subsystem_Init().
|
static |
Definition at line 50 of file windows_service.cc.
Referenced by Win32SockCleanup(), and Win32SockInit().
|
static |
Definition at line 67 of file windows_service.cc.
|
static |
Definition at line 69 of file windows_service.cc.
|
static |
Definition at line 92 of file windows_service.cc.
Referenced by WIN32_Abort(), and WIN32_Exit().
|
static |
Definition at line 79 of file windows_service.cc.
|
static |
Definition at line 81 of file windows_service.cc.
Referenced by WIN32_InstallService().
|
static |
Definition at line 80 of file windows_service.cc.
|
static |
Definition at line 82 of file windows_service.cc.
Referenced by WIN32_InstallService().
|
static |
Definition at line 59 of file windows_service.cc.
Referenced by WIN32_Exit(), WIN32_Subsystem_Init(), WIN32_svcHandler(), and WIN32_svcstatusupdate().
|
static |
Definition at line 58 of file windows_service.cc.
Referenced by WIN32_Abort(), WIN32_Exit(), WIN32_RemoveService(), WIN32_Subsystem_Init(), WIN32_svcHandler(), and WIN32_svcstatusupdate().
|
static |
Definition at line 65 of file windows_service.cc.
|
static |
Definition at line 60 of file windows_service.cc.
Referenced by WIN32_build_argv(), and WIN32_Subsystem_Init().
|
static |
Definition at line 61 of file windows_service.cc.
Referenced by WIN32_build_argv(), and WIN32_Subsystem_Init().
|
static |
Definition at line 62 of file windows_service.cc.
Referenced by WIN32_build_argv(), and WIN32_Subsystem_Init().