2002-04-10 21:30:22 +00:00
|
|
|
/* $Id: lpcproto.h,v 1.3 2002/04/10 21:30:20 ea Exp $
|
2002-03-17 22:19:37 +00:00
|
|
|
*
|
|
|
|
* ReactOS POSIX+ Environment Subsystem
|
|
|
|
* LPC protocol spoken by PSXSS.EXE, PSXDLL.DLL, CSRTERM.EXE.
|
|
|
|
*/
|
|
|
|
#ifndef _PSX_LPCPROTO_H
|
|
|
|
#define _PSX_LPCPROTO_H
|
2002-04-07 13:56:16 +00:00
|
|
|
|
2002-03-17 22:19:37 +00:00
|
|
|
#include <napi/lpc.h>
|
2002-04-07 13:56:16 +00:00
|
|
|
|
|
|
|
#ifndef PRIVATE
|
|
|
|
#define PRIVATE static
|
|
|
|
#endif
|
|
|
|
|
2002-03-17 22:19:37 +00:00
|
|
|
/* Protocol version */
|
|
|
|
#define PSX_LPC_PROTOCOL_VERSION 1
|
2002-04-07 13:56:16 +00:00
|
|
|
|
2002-03-17 22:19:37 +00:00
|
|
|
/* POSIX+ system name space */
|
|
|
|
#define PSX_NS_SUBSYSTEM_DIRECTORY_NAME L"POSIX+"
|
|
|
|
#define PSX_NS_SESSION_DIRECTORY_NAME L"Sessions"
|
|
|
|
#define PSX_NS_SYSTEM_DIRECTORY_NAME L"System"
|
|
|
|
#define PSX_NS_API_PORT_NAME L"ApiPort"
|
|
|
|
#define PSX_NS_SBAPI_PORT_NAME L"SbApiPort"
|
|
|
|
#define PSX_NS_SESSIONAPI_PORT_NAME L"SessionPort"
|
|
|
|
#define PSX_NS_API_PORT_TEMPLATE L"\\%s\\%s"
|
|
|
|
#define PSX_NS_SESSION_PORT_TEMPLATE L"\\%s\\%s\\P%d"
|
|
|
|
#define PSX_NS_SESSION_DATA_TEMPLATE L"\\%s\\%s\\D%d"
|
2002-04-07 13:56:16 +00:00
|
|
|
|
2002-03-17 22:19:37 +00:00
|
|
|
/* ConnectData protocol */
|
2002-04-07 13:56:16 +00:00
|
|
|
|
2002-03-17 22:19:37 +00:00
|
|
|
typedef enum {
|
|
|
|
PSX_CONNECTION_TYPE_PROCESS,
|
2002-04-10 21:30:22 +00:00
|
|
|
PSX_CONNECTION_TYPE_TERMINAL,
|
|
|
|
PSX_CONNECTION_TYPE_SERVER
|
2002-03-17 22:19:37 +00:00
|
|
|
} PSX_CONNECTION_TYPE;
|
2002-04-07 13:56:16 +00:00
|
|
|
|
2002-03-17 22:19:37 +00:00
|
|
|
typedef struct _PSX_CONNECT_PORT_DATA
|
|
|
|
{
|
|
|
|
PSX_CONNECTION_TYPE ConnectionType; /* IN OUT */
|
|
|
|
ULONG Version; /* IN OUT */
|
|
|
|
ULONG PortIdentifier; /* OUT */
|
2002-04-10 21:30:22 +00:00
|
|
|
} PSX_CONNECT_PORT_DATA, * PPSX_CONNECT_PORT_DATA;
|
2002-04-07 13:56:16 +00:00
|
|
|
|
2002-03-17 22:19:37 +00:00
|
|
|
/* LPC message subsystem-specific header */
|
2002-04-07 13:56:16 +00:00
|
|
|
|
2002-03-17 22:19:37 +00:00
|
|
|
typedef struct _PSX_MESSAGE_HEADER
|
|
|
|
{
|
|
|
|
WORD Context;
|
|
|
|
WORD Procedure;
|
|
|
|
NTSTATUS Status;
|
|
|
|
} PSX_MESSAGE_HEADER, * PPSX_MESSAGE_HEADER;
|
2002-04-07 13:56:16 +00:00
|
|
|
|
2002-03-17 22:19:37 +00:00
|
|
|
typedef PSX_MESSAGE_HEADER PSX_MESSAGE, * PPSX_MESSAGE;
|
2002-04-07 13:56:16 +00:00
|
|
|
|
2002-03-17 22:19:37 +00:00
|
|
|
#define PSX_MAX_LPC_DATA_SIZE 128 /* compute it*/
|
2002-04-07 13:56:16 +00:00
|
|
|
|
2002-03-17 22:19:37 +00:00
|
|
|
typedef struct _PSX_MAX_MESSAGE
|
|
|
|
{
|
|
|
|
LPC_MESSAGE_HEADER Header;
|
|
|
|
PSX_MESSAGE_HEADER PsxHeader;
|
|
|
|
BYTE Data [PSX_MAX_LPC_DATA_SIZE];
|
|
|
|
} PSX_MAX_MESSAGE, * PPSX_MAX_MESSAGE;
|
2002-04-07 13:56:16 +00:00
|
|
|
|
2002-03-17 22:19:37 +00:00
|
|
|
/* Terminal I/O */
|
2002-04-07 13:56:16 +00:00
|
|
|
|
2002-03-17 22:19:37 +00:00
|
|
|
/* \POSIX+\SessionPort API */
|
2002-04-07 13:56:16 +00:00
|
|
|
|
2002-04-10 21:30:22 +00:00
|
|
|
#define PSX_TERMINAL_SECTION_SIZE 65536L
|
|
|
|
#define PSX_TERMINAL_SECTION_OFFSET 8192L
|
|
|
|
|
2002-03-17 22:19:37 +00:00
|
|
|
typedef enum {
|
|
|
|
PSX_TERMINAL_INTERRUPT,
|
|
|
|
PSX_TERMINAL_SESSION_STATUS_REQUEST
|
|
|
|
} PSX_TERMINAL_API;
|
2002-04-07 13:56:16 +00:00
|
|
|
|
2002-04-10 21:30:22 +00:00
|
|
|
typedef struct _PSX_TERMINAL_IO
|
2002-03-17 22:19:37 +00:00
|
|
|
{
|
|
|
|
LPC_MESSAGE_HEADER Header;
|
|
|
|
PSX_MESSAGE_HEADER PsxHeader;
|
|
|
|
ULONG Size;
|
2002-04-10 21:30:22 +00:00
|
|
|
ULONG Offset;
|
2002-03-17 22:19:37 +00:00
|
|
|
} PSX_TERMINAL_READ, * PPSX_TERMINAL_READ;
|
2002-04-07 13:56:16 +00:00
|
|
|
|
2002-03-17 22:19:37 +00:00
|
|
|
/* System I/O (system calls) */
|
2002-04-07 13:56:16 +00:00
|
|
|
|
|
|
|
#include <psx/syscall.h>
|
|
|
|
|
2002-03-17 22:19:37 +00:00
|
|
|
#endif /* ndef _PSX_LPCPROTO_H */
|