ReactOS 0.4.15-dev-8102-g108db8f
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 */
31typedef struct _Services
32{
37
38extern volatile BOOL bShutdown;
39extern volatile BOOL bPause;
40
41/* logging functions */
44VOID LogEvent(LPCWSTR lpMsg, DWORD errNum, DWORD exitCode, UINT flags);
45
46/* skelserver functions */
49
50/* server thread handlers */
56
57#endif /* _TCPSVCS_H */
VOID UninitLogging()
Definition: log.c:263
BOOL InitLogging()
Definition: log.c:210
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLbitfield flags
Definition: glext.h:7161
unsigned int UINT
Definition: ndis.h:50
unsigned short USHORT
Definition: pedump.c:61
USHORT Port
Definition: tcpsvcs.h:33
LPWSTR lpName
Definition: tcpsvcs.h:34
LPTHREAD_START_ROUTINE lpService
Definition: tcpsvcs.h:35
struct _Services * PSERVICES
volatile BOOL bShutdown
Definition: tcpsvcs.c:16
DWORD WINAPI ChargenHandler(VOID *sock_)
Definition: chargen.c:96
DWORD WINAPI QotdHandler(VOID *sock_)
Definition: qotd.c:135
DWORD WINAPI DiscardHandler(VOID *sock_)
Definition: discard.c:44
DWORD WINAPI DaytimeHandler(VOID *sock_)
Definition: daytime.c:29
VOID LogEvent(LPCWSTR lpMsg, DWORD errNum, DWORD exitCode, UINT flags)
Definition: log.c:196
struct _Services SERVICES
DWORD WINAPI StartServer(LPVOID lpParam)
Definition: skelserver.c:165
DWORD WINAPI EchoHandler(VOID *sock_)
Definition: echo.c:69
volatile BOOL bPause
Definition: tcpsvcs.c:17
BOOL ShutdownConnection(SOCKET Sock, BOOL bRec)
Definition: skelserver.c:126
DWORD(WINAPI * LPTHREAD_START_ROUTINE)(LPVOID)
Definition: winbase.h:729
#define WINAPI
Definition: msvc.h:6
UINT_PTR SOCKET
Definition: winsock.h:47
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185