IPC messages
In KasperskyOS, entities interact through an exchange of messages.
To call an entity method, a different entity must send it a request message containing input arguments of this method. A response contains the output arguments of the method.
The entity that sends a request is called the client entity, or simply the client. The entity that receives the request and sends a response is called the server entity (server).
A request and response must have a fully defined structure corresponding to the method being called.
A message must contain a constant part and an arena. The constant part of the message contains arguments whose sizes are statically defined (integers, structures, arrays, etc.). An arena is a buffer for storing variable-size arguments.
For more details, refer to "IPC message structure".
Connections (IPC channels)
To enable two entities to exchange messages, an IPC channel, also referred to as "channel" or "connection", must be established between them.
The channel is provided by a pair of IPC handles (client and server), which are linked to each other. A client entity has a client handle, and a server entity has a server handle:
Each entity can have multiple IPC handles and, consequently, multiple connections. An entity can act as a client for some entities while acting as a server for others.
System calls for exchanging messages
KasperskyOS provides three system calls for IPC: Call
, Recv
and Reply
:
Call()
is used by the client to send a request and receive a response. It receives a client handle, buffer containing the request and buffer for the response.Recv()
is used by the server to receive a request. It receives a server handle and buffer for the request.Reply()
is used by the server to send a response. It receives a server handle and buffer with the response.The Call()
and Recv()
system calls are locking calls, meaning that messages are exchanged according to the rendezvous principle:
Recv()
call remains locked until a request is received.Call()
call remains locked until a response is received from the server.
The interaction of entities and IPC transport is examined in more detail in the chapter titled "IPC and transport".
Page top