/*****************************************************************************/ /* Service.h Function prototypes for service configuration module. */ /*****************************************************************************/ #ifndef SERVICE_H_LOADED #define SERVICE_H_LOADED 1 #include "wasd.h" #define SERVICE_ERROR_REPORT_PATH_CODES_MAX 16 /**************/ /* structures */ /**************/ /* Store these structures naturally-aligned on AXP. Uses a bit more storage but makes access as efficient as possible. */ #ifndef __VAX # pragma member_alignment __save # pragma member_alignment #endif typedef struct ServiceStruct SERVICE_STRUCT; struct ServiceStruct { SERVICE_STRUCT *NextPtr, *SesolaNextPtr; BOOL AdminService, ConnectService, GenericService, Http2Enabled, LogFileError, LogFileOpen, LogFormatCommon, LogFormatCommonServer, LogFormatCombined, LogFormatProblem, LogFormatStamp, LogTimeoutEvents, LocalAuthRequired, NoLog, ProxyAffinity, ProxyAuthRequired, ProxyChainAuthRequired, ProxyFileCacheEnabled, ProxyService, RawSocket, SSLclientEnabled, ServiceErrorReportPath, SharedSocket; int AcceptQueued, AdminPort, ConnectCount, ErrorReportPathLength, ErrorReportPathCodesCount, ListenBacklog, LogDayNumber, LogFileNameLength, LogHourNumber, LogMonthNumber, LogYearNumber, ProxyChainHostNameLength, ProxyChainPort, ProxyTunnel, ReadErrorCount, RequestScheme, ShareSSH, ServerBindStatus, ServerHostNameLength, ServerHostPortLength, ServerPort, WriteErrorCount; int ErrorReportPathCodes [SERVICE_ERROR_REPORT_PATH_CODES_MAX]; unsigned long BytesRawRx [2], BytesRawTx [2]; char *LogFormatPtr, *ErrorReportPathCodesPtr, *RequestSchemeNamePtr; char BgDevName [64], BindIpAddressString [TCPIP_ADDRESS_STRING_MAX+1], BodyTag [256], ErrorReportPath [128], LogFileName [256], LogFormat [128], LogHostName [64], NonSslRedirect [TCPIP_HOSTNAME_MAX+1+8], ProxyBindIpAddressString [TCPIP_ADDRESS_STRING_MAX+1], ProxyChainCred [63+1], ProxyChainHostName [TCPIP_HOSTNAME_MAX+1], ProxyChainHostPort [TCPIP_HOSTNAME_MAX+1+8], ProxyChainIpAddressString [TCPIP_ADDRESS_STRING_MAX+1], ProxyChainPortString [16], ServerHostName [TCPIP_HOSTNAME_MAX+1], ServerHostPort [TCPIP_HOSTNAME_MAX+1+8], ServerIpAddressString [TCPIP_ADDRESS_STRING_MAX+1], ServerPortString [16]; /* we'll have to cast these when we need them */ void *SSLclientPtr, *SSLserverPtr; IPADDRESS BindIpAddress, MultiHomeIpAddress, ProxyBindIpAddress, ProxyChainIpAddress, ServerIpAddress; IO_SB ServerIOsb; struct dsc$descriptor LogFileNameDsc; struct FAB LogFileFab; struct RAB LogFileRab; unsigned short ServerChannel; SOCKADDRESS ServerSocketName; }; typedef struct ServiceMetaStruct SERVICE_META; struct ServiceMetaStruct { BOOL ServiceLooksValid; int ServiceCount; SERVICE_STRUCT *ListHead, *ListTail; SERVICE_STRUCT **HashTable; /* used during configuration load */ SERVICE_STRUCT ConfigService; int ServiceLineNumber; char ServiceLine [128]; /* only used when reporting or changing configuration */ void *RequestPtr; }; #ifndef __VAX # pragma member_alignment __restore #endif /***********************/ /* function prototypes */ /***********************/ BOOL ServiceChange (REQUEST_STRUCT*, char*); int ServiceConfigFromString (META_CONFIG**); int ServiceConfigAdd (META_CONFIG*, SERVICE_STRUCT*); void* ServiceConfigFind (char*); int ServiceConfigLoad (META_CONFIG**); ServiceConfigUnload (META_CONFIG*); ServiceConfigPostProcess (META_CONFIG*); BOOL ServiceConfigLoadCallback (META_CONFIG*); void ServiceFudgeServerHostPort (); BOOL ServiceIsConfigured (char*); ServiceConfigRevise (REQUEST_STRUCT*, REQUEST_AST, BOOL); ServiceConfigReviseNow (REQUEST_STRUCT*, META_CONFIG*); int ServiceParse (char*, int*, char*, int, int*, BOOL*); BOOL ServiceFindVirtual (REQUEST_STRUCT*); ServiceReport (REQUEST_STRUCT*, REQUEST_AST, BOOL); ServiceReportNow (REQUEST_STRUCT*, META_CONFIG*); int ServiceReportConfigFromString (REQUEST_STRUCT*, CONFIG_STRUCT*); #endif /* SERVICE_H_LOADED */ /*****************************************************************************/