Content deleted Content added
Ivan Štambuk (talk | contribs) No edit summary |
m formatting fix |
||
(21 intermediate revisions by 15 users not shown) | |||
Line 1:
The '''Local
The (A)LPC interface is part of Windows NT's undocumented [[Windows Native API|Native API]], and as such is not available to applications for direct use. However, it can be used indirectly in the following instances:
* when using the [[
* by calling Windows
==Implementation==
(A)LPC is implemented using kernel "port" objects, which are securable (with [[Access
The typical communication scenario between the server and the client is as follows: # A server process first creates a ''named server connection port'' object, and waits for clients to connect.
# A client requests a connection to that named port by sending a connect message.
# If the server accepts the connection, two ''unnamed'' ports are created:
#* ''client communication port'' - used by client threads to communicate with a particular server
#* ''server communication port'' - used by the server to
# The client receives a handle to the client communication port, and server receives a handle to the server communication port, and the inter-process communication channel is established.
(A)LPC supports the following three modes of message exchange between the server and client:<ref>{{Harvcoltxt|Russinovich|Solomon|Ionescu|2009|p=203}}</ref>
* For short messages (fewer than 256 bytes) the kernel copies the message buffers between processes, from the [[address space]] of the sending process to the system address space, and from there to the receiving process' address space.
*
* Server can directly read and write data from the client's address space, when the amount of data is too large to fit in a shared section.
ALPC has a performance advantage over the former LPC interface, as it can be configured to use [[Input/output completion port|I/O completion ports]] instead of synchronous request/reply mechanism that LPC exclusively uses.<ref>{{Harvcoltxt|Russinovich|Solomon|Ionescu|2009|p=204}}</ref> This enables ALPC ports high-speed communication which automatically
==Known usage==
(A)LPC is used heavily in communication between internal subsystems in Windows NT. The Win32 subsystem
The [[Local Security Authority Subsystem Service]] (LSASS), [[Session Manager]] (SMSS), and [[Service Control Manager]] all use (A)LPC ports directly to communicate with client processes. [[Winlogon]] and the [[Reference monitor|Security Reference Monitor]] use it to communicate with the LSASS process.
As mentioned, Microsoft RPC can use (A)LPC as a transport when the client and server are both on the same machine. Many services that are designed to communicate only on the local computer use (A)LPC as the only transport through RPC. The implementation of remote [[
==See also==
Line 37 ⟶ 39:
==References==
* {{citation |first1=Prasad |last1=Dabak |first2=Milind |last2=Borate |first3=Sandeep |last3=Phadke |title=Undocumented Windows NT |publisher=[[Hungry Minds]] |year=1999 |isbn=0-7645-4569-8}}
* {{citation |title=Windows® Internals| edition=5th |first1=Mark |last1=Russinovich |author1-link=Mark Russinovich |first2=David |last2=Solomon |first3=Alex |last3=Ionescu |year=2009 |publisher=[[Microsoft Press]] |isbn=
==External links==
*
* [http://www.zezula.net/en/prog/lpc.html LPC Communication]
|