ReactOS  0.4.11-dev-946-g431643b
tcpsvcs.h
Go to the documentation of this file.
1 #ifndef _TCPSVCS_H
2 #define _TCPSVCS_H
3 
4 #include <stdarg.h>
5 
6 #define WIN32_NO_STATUS
7 #include <windef.h>
8 #include <winbase.h>
9 #define _INC_WINDOWS
10 #include <winsock2.h>
11 #include <tchar.h>
12 #include <strsafe.h>
13 
14 #define LOG_FILE 1
15 #define LOG_EVENTLOG 2
16 #define LOG_ERROR 4
17 #define LOG_ALL (LOG_FILE | LOG_EVENTLOG | LOG_ERROR)
18 
19 /* default port numbers */
20 #define ECHO_PORT 7
21 #define DISCARD_PORT 9
22 #define DAYTIME_PORT 13
23 #define QOTD_PORT 17
24 #define CHARGEN_PORT 19
25 
26 #define NUM_SERVICES 5
27 #define CS_TIMEOUT 1000
28 
29 
30 /* data structure to pass to threads */
31 typedef struct _Services
32 {
37 
38 extern volatile BOOL bShutdown;
39 extern volatile BOOL bPause;
40 
41 /* logging functions */
44 VOID LogEvent(LPCWSTR lpMsg, DWORD errNum, DWORD exitCode, UINT flags);
45 
46 /* skelserver functions */
49 
50 /* server thread handlers */
56 
57 #endif /* _TCPSVCS_H */
DWORD(WINAPI * LPTHREAD_START_ROUTINE)(LPVOID)
Definition: winbase.h:707
struct _Services * PSERVICES
DWORD WINAPI QotdHandler(VOID *sock_)
Definition: qotd.c:135
volatile BOOL bShutdown
Definition: tcpsvcs.c:16
DWORD WINAPI EchoHandler(VOID *sock_)
Definition: echo.c:69
DWORD WINAPI DiscardHandler(VOID *sock_)
Definition: discard.c:44
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
volatile BOOL bPause
Definition: tcpsvcs.c:17
USHORT Port
Definition: tcpsvcs.h:33
LPWSTR lpName
Definition: tcpsvcs.h:34
unsigned int BOOL
Definition: ntddk_ex.h:94
VOID UninitLogging(VOID)
unsigned int UINT
Definition: ndis.h:50
unsigned long DWORD
Definition: ntddk_ex.h:95
GLbitfield flags
Definition: glext.h:7161
VOID LogEvent(LPCWSTR lpMsg, DWORD errNum, DWORD exitCode, UINT flags)
Definition: log.c:196
DWORD WINAPI DaytimeHandler(VOID *sock_)
Definition: daytime.c:29
LPTHREAD_START_ROUTINE lpService
Definition: tcpsvcs.h:35
#define WINAPI
Definition: msvc.h:20
BOOL ShutdownConnection(SOCKET Sock, BOOL bRec)
Definition: skelserver.c:126
DWORD WINAPI StartServer(LPVOID lpParam)
Definition: skelserver.c:165
unsigned short USHORT
Definition: pedump.c:61
struct _Services SERVICES
DWORD WINAPI ChargenHandler(VOID *sock_)
Definition: chargen.c:96
UINT_PTR SOCKET
Definition: winsock.h:47
WCHAR * LPWSTR
Definition: xmlstorage.h:184
BOOL InitLogging(VOID)