Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

lpc.h

Go to the documentation of this file.
00001 /*++ BUILD Version: 0002 // Increment this if a change has global effects 00002 00003 Copyright (c) 1989 Microsoft Corporation 00004 00005 Module Name: 00006 00007 lpc.h 00008 00009 Abstract: 00010 00011 This module contains the public data structures and procedure 00012 prototypes for the Local Inter-Process Communication (LPC) 00013 sub-component of NTOS. 00014 00015 Author: 00016 00017 Steve Wood (stevewo) 15-May-1989 00018 00019 Revision History: 00020 00021 --*/ 00022 00023 #ifndef _LPC_ 00024 #define _LPC_ 00025 00026 // 00027 // System Initialization procedure for Lpc subcomponent of NTOS 00028 // 00029 00030 BOOLEAN 00031 LpcInitSystem( VOID ); 00032 00033 VOID 00034 LpcExitThread( 00035 PETHREAD Thread 00036 ); 00037 00038 VOID 00039 LpcDumpThread( 00040 PETHREAD Thread, 00041 IN POB_DUMP_CONTROL Control OPTIONAL 00042 ); 00043 00044 NTKERNELAPI 00045 NTSTATUS 00046 LpcRequestPort( 00047 IN PVOID PortAddress, 00048 IN PPORT_MESSAGE RequestMessage 00049 ); 00050 00051 NTSTATUS 00052 LpcRequestWaitReplyPort( 00053 IN PVOID PortAddress, 00054 IN PPORT_MESSAGE RequestMessage, 00055 OUT PPORT_MESSAGE ReplyMessage 00056 ); 00057 00058 00059 // 00060 // The following are global counters used by the LPC component to indicate 00061 // the amount of LPC calls being performed in the system. 00062 // 00063 00064 extern ULONG LpcCallOperationCount; 00065 extern ULONG LpcCallBackOperationCount; 00066 extern ULONG LpcDatagramOperationCount; 00067 00068 // 00069 // Nonpagable portion of a port queue 00070 // 00071 typedef struct _LPCP_NONPAGED_PORT_QUEUE { 00072 KSEMAPHORE Semaphore; // Counting semaphore that is incremented 00073 // whenever a message is put in receive queue 00074 struct _LPCP_PORT_OBJECT *BackPointer; 00075 } LPCP_NONPAGED_PORT_QUEUE, *PLPCP_NONPAGED_PORT_QUEUE; 00076 00077 typedef struct _LPCP_PORT_QUEUE { 00078 PLPCP_NONPAGED_PORT_QUEUE NonPagedPortQueue; 00079 PKSEMAPHORE Semaphore; // Counting semaphore that is incremented 00080 // whenever a message is put in receive queue 00081 LIST_ENTRY ReceiveHead; // list of messages to receive 00082 } LPCP_PORT_QUEUE, *PLPCP_PORT_QUEUE; 00083 00084 #define LPCP_ZONE_ALIGNMENT 16 00085 #define LPCP_ZONE_ALIGNMENT_MASK ~(LPCP_ZONE_ALIGNMENT-1) 00086 00087 // 00088 // This allows ~96 outstanding messages 00089 // 00090 00091 #define LPCP_ZONE_MAX_POOL_USAGE (8*PAGE_SIZE) 00092 typedef struct _LPCP_PORT_ZONE { 00093 KEVENT FreeEvent; // Autoclearing event that is whenever the 00094 // zone free list goes from empty to non-empty 00095 ULONG MaxPoolUsage; 00096 ULONG GrowSize; 00097 ZONE_HEADER Zone; 00098 } LPCP_PORT_ZONE, *PLPCP_PORT_ZONE; 00099 00100 // 00101 // Data Types and Constants 00102 // 00103 00104 typedef struct _LPCP_PORT_OBJECT { 00105 ULONG Length; 00106 ULONG Flags; 00107 struct _LPCP_PORT_OBJECT *ConnectionPort; 00108 struct _LPCP_PORT_OBJECT *ConnectedPort; 00109 LPCP_PORT_QUEUE MsgQueue; 00110 CLIENT_ID Creator; 00111 PVOID ClientSectionBase; 00112 PVOID ServerSectionBase; 00113 PVOID PortContext; 00114 ULONG MaxMessageLength; 00115 ULONG MaxConnectionInfoLength; 00116 PETHREAD ClientThread; 00117 SECURITY_QUALITY_OF_SERVICE SecurityQos; 00118 SECURITY_CLIENT_CONTEXT StaticSecurity; 00119 LIST_ENTRY LpcReplyChainHead; // Only in _COMMUNICATION ports 00120 LIST_ENTRY LpcDataInfoChainHead; // Only in _COMMUNICATION ports 00121 PEPROCESS ServerProcess; // Only in SERVER_CONNECTION ports 00122 ULONG Reserved; 00123 KEVENT WaitEvent ; 00124 } LPCP_PORT_OBJECT, *PLPCP_PORT_OBJECT; 00125 00126 // 00127 // Valid values for Flags field 00128 // 00129 00130 #define PORT_TYPE 0x0000000F 00131 #define SERVER_CONNECTION_PORT 0x00000001 00132 #define UNCONNECTED_COMMUNICATION_PORT 0x00000002 00133 #define SERVER_COMMUNICATION_PORT 0x00000003 00134 #define CLIENT_COMMUNICATION_PORT 0x00000004 00135 #define PORT_WAITABLE 0x20000000 00136 #define PORT_NAME_DELETED 0x40000000 00137 #define PORT_DYNAMIC_SECURITY 0x80000000 00138 #define PORT_DELETED 0x10000000 00139 00140 typedef struct _LPCP_MESSAGE { 00141 union { 00142 LIST_ENTRY Entry; 00143 struct { 00144 SINGLE_LIST_ENTRY FreeEntry; 00145 ULONG Reserved0; 00146 }; 00147 }; 00148 USHORT Reserved1; 00149 USHORT ZoneIndex; 00150 ULONG Reserved; 00151 PETHREAD RepliedToThread; // Filled in when reply is sent so recipient 00152 // of reply can dereference it. 00153 PVOID PortContext; // Captured from senders communication port. 00154 PORT_MESSAGE Request; 00155 } LPCP_MESSAGE, *PLPCP_MESSAGE; 00156 00157 #if DEVL 00158 // 00159 // This bit set in the ZoneIndex field to mark allocated messages. 00160 // 00161 00162 #define LPCP_ZONE_MESSAGE_ALLOCATED (USHORT)0x8000 00163 #endif 00164 00165 // 00166 // This data is placed at the beginning of the Request data for an 00167 // LPC_CONNECTION_REQUEST message. 00168 // 00169 00170 typedef struct _LPCP_CONNECTION_MESSAGE { 00171 PORT_VIEW ClientView; 00172 PLPCP_PORT_OBJECT ClientPort; 00173 PVOID SectionToMap; 00174 REMOTE_PORT_VIEW ServerView; 00175 } LPCP_CONNECTION_MESSAGE, *PLPCP_CONNECTION_MESSAGE; 00176 00177 00178 #endif // _LPC_

Generated on Sat May 15 19:40:39 2004 for test by doxygen 1.3.7