PSX: file needed to compile csrterm.
[reactos.git] / posix / include / psx / lpcproto.h
1 /* $Id: lpcproto.h,v 1.1 2002/03/17 22:19:37 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 #include <napi/lpc.h>
9 /* Protocol version */
10 #define PSX_LPC_PROTOCOL_VERSION 1
11 /* POSIX+ system name space */
12 #define PSX_NS_SUBSYSTEM_DIRECTORY_NAME L"POSIX+"
13 #define PSX_NS_SESSION_DIRECTORY_NAME L"Sessions"
14 #define PSX_NS_SYSTEM_DIRECTORY_NAME L"System"
15 #define PSX_NS_API_PORT_NAME L"ApiPort"
16 #define PSX_NS_SBAPI_PORT_NAME L"SbApiPort"
17 #define PSX_NS_SESSIONAPI_PORT_NAME L"SessionPort"
18 #define PSX_NS_API_PORT_TEMPLATE L"\\%s\\%s"
19 #define PSX_NS_SESSION_PORT_TEMPLATE L"\\%s\\%s\\P%d"
20 #define PSX_NS_SESSION_DATA_TEMPLATE L"\\%s\\%s\\D%d"
21 /* ConnectData protocol */
22 typedef enum {
23 PSX_CONNECTION_TYPE_PROCESS,
24 PSX_CONNECTION_TYPE_TERMINAL
25 } PSX_CONNECTION_TYPE;
26 typedef struct _PSX_CONNECT_PORT_DATA
27 {
28 PSX_CONNECTION_TYPE ConnectionType; /* IN OUT */
29 ULONG Version; /* IN OUT */
30 ULONG PortIdentifier; /* OUT */
31 } PSX_CONNECT_PORT_DATA;
32 /* LPC message subsystem-specific header */
33 typedef struct _PSX_MESSAGE_HEADER
34 {
35 WORD Context;
36 WORD Procedure;
37 NTSTATUS Status;
38 } PSX_MESSAGE_HEADER, * PPSX_MESSAGE_HEADER;
39 typedef PSX_MESSAGE_HEADER PSX_MESSAGE, * PPSX_MESSAGE;
40 #define PSX_MAX_LPC_DATA_SIZE 128 /* compute it*/
41 typedef struct _PSX_MAX_MESSAGE
42 {
43 LPC_MESSAGE_HEADER Header;
44 PSX_MESSAGE_HEADER PsxHeader;
45 BYTE Data [PSX_MAX_LPC_DATA_SIZE];
46 } PSX_MAX_MESSAGE, * PPSX_MAX_MESSAGE;
47 /* Terminal I/O */
48 /* \POSIX+\SessionPort API */
49 typedef enum {
50 PSX_TERMINAL_INTERRUPT,
51 PSX_TERMINAL_SESSION_STATUS_REQUEST
52 } PSX_TERMINAL_API;
53 typedef struct _PSX_TERMINAL_READ
54 {
55 LPC_MESSAGE_HEADER Header;
56 PSX_MESSAGE_HEADER PsxHeader;
57 ULONG Size;
58 CHAR Buffer [80]; /* FIXME! */
59 } PSX_TERMINAL_READ, * PPSX_TERMINAL_READ;
60 /* System I/O (system calls) */
61 /* #include <psx/syscall.h> */
62 #endif /* ndef _PSX_LPCPROTO_H */