Little changes to make PSX server compile again.
[reactos.git] / posix / include / psx / lpcproto.h
1 /* $Id: lpcproto.h,v 1.7 2004/01/18 21:27:32 ea Exp $
2 *
3 * ReactOS POSIX+ Environment Subsystem
4 * LPC protocol spoken by PSXSS.EXE, PSXDLL.DLL, CSRTERM.EXE.
5 */
6 #ifndef _PSX_LPCPROTO_H
7 #define _PSX_LPCPROTO_H
8
9 #define NTOS_MODE_USER
10 #include <ntos.h>
11
12 #ifndef PRIVATE
13 #define PRIVATE static
14 #endif
15
16 /* Protocol version */
17 #define PSX_LPC_PROTOCOL_VERSION 1
18
19 /* POSIX+ system name space */
20 #define PSX_NS_SUBSYSTEM_DIRECTORY_NAME L"POSIX+"
21 #define PSX_NS_SESSION_DIRECTORY_NAME L"Sessions"
22 #define PSX_NS_SYSTEM_DIRECTORY_NAME L"System"
23 #define PSX_NS_API_PORT_NAME L"ApiPort"
24 #define PSX_NS_SBAPI_PORT_NAME L"SbApiPort"
25 #define PSX_NS_SESSIONAPI_PORT_NAME L"SessionPort"
26 #define PSX_NS_API_PORT_TEMPLATE L"\\%s\\%s"
27 #define PSX_NS_SESSION_PORT_TEMPLATE L"\\%s\\%s\\P%d"
28 #define PSX_NS_SESSION_DATA_TEMPLATE L"\\%s\\%s\\D%d"
29
30 /* ConnectData protocol */
31
32 typedef enum {
33 PSX_CONNECTION_TYPE_PROCESS,
34 PSX_CONNECTION_TYPE_TERMINAL,
35 PSX_CONNECTION_TYPE_SERVER
36 } PSX_CONNECTION_TYPE;
37
38 typedef struct _PSX_CONNECT_PORT_DATA
39 {
40 PSX_CONNECTION_TYPE ConnectionType; /* IN OUT */
41 ULONG Version; /* IN OUT */
42 ULONG PortIdentifier; /* OUT */
43 } PSX_CONNECT_PORT_DATA, * PPSX_CONNECT_PORT_DATA;
44
45 /* LPC message subsystem-specific header */
46
47 typedef struct _PSX_MESSAGE_HEADER
48 {
49 WORD Context;
50 WORD Procedure;
51 NTSTATUS Status;
52 } PSX_MESSAGE_HEADER, * PPSX_MESSAGE_HEADER;
53
54 typedef PSX_MESSAGE_HEADER PSX_MESSAGE, * PPSX_MESSAGE;
55
56 #define PSX_MAX_LPC_DATA_SIZE 128 /* compute it*/
57
58 typedef struct _PSX_MAX_MESSAGE
59 {
60 //LPC_MESSAGE_HEADER Header;
61 LPC_MESSAGE Header;
62 PSX_MESSAGE_HEADER PsxHeader;
63 BYTE Data [PSX_MAX_LPC_DATA_SIZE];
64 } PSX_MAX_MESSAGE, * PPSX_MAX_MESSAGE;
65
66 /* Terminal I/O */
67
68 /* \POSIX+\SessionPort API */
69
70 #define PSX_TERMINAL_SECTION_SIZE 65536L
71 #define PSX_TERMINAL_SECTION_OFFSET 8192L
72
73 typedef enum {
74 PSX_TERMINAL_INTERRUPT,
75 PSX_TERMINAL_SESSION_STATUS_REQUEST
76 } PSX_TERMINAL_API;
77
78 typedef struct _PSX_TERMINAL_IO
79 {
80 //LPC_MESSAGE_HEADER Header;
81 LPC_MESSAGE Header;
82 PSX_MESSAGE_HEADER PsxHeader;
83 ULONG Size;
84 ULONG Offset;
85 } PSX_TERMINAL_READ, * PPSX_TERMINAL_READ;
86
87 /* System I/O (system calls) */
88
89 #include <psx/syscall.h>
90
91 #endif /* ndef _PSX_LPCPROTO_H */