L4Re - L4 Runtime Environment
IPC-Gate API

Secure communication object. More...

+ Collaboration diagram for IPC-Gate API:

Functions

l4_msgtag_t l4_ipc_gate_bind_thread (l4_cap_idx_t gate, l4_cap_idx_t thread, l4_umword_t label)
 Bind the IPC gate to a thread. More...
 
l4_msgtag_t l4_ipc_gate_get_infos (l4_cap_idx_t gate, l4_umword_t *label)
 Get information about the IPC-gate. More...
 
l4_msgtag_t l4_rcv_ep_bind_thread (l4_cap_idx_t ep, l4_cap_idx_t thread, l4_umword_t label)
 Bind the IPC gate to a thread. More...
 

Detailed Description

Secure communication object.

IPC-Gate objects provide a means to establish secure communication channels to L4 Threads (Thread). An IPC-Gate object can be created using a Factory (l4_factory_create_gate()) and get assigned a specific L4 thread and a label as protected payload. The label has the size of one machine word and can only be seen by the Task running the thread that is assigned of the IPC-gate. The label is received as part of the IPC message. The label can thus be used to securely identify the IPC-gate that was used to send a message.

An IPC-gate is usually used to represent an user-level object and may be the address of the data structure for the object in the server task.

With client privileges an IPC-gate does not provide any direct API and thus an IPC-gate kernel object cannot be modified by invocations. Each invocation of an IPC-gate kernel object is translated into an IPC message to the assigned thread.

Include File
#include <l4/sys/ipc_gate.h>

For the C++ interface refer to the L4::Ipc_gate documentation.

See also
Object Invocation

Function Documentation

◆ l4_ipc_gate_bind_thread()

l4_msgtag_t l4_ipc_gate_bind_thread ( l4_cap_idx_t  gate,
l4_cap_idx_t  thread,
l4_umword_t  label 
)
inline

Bind the IPC gate to a thread.

Parameters
gateThe IPC gate object.
threadThe thread object that shall be bound to gate.
labelLabel to assign to gate. The two least significant bits should usually be set to zero.
Returns
Syscall return tag containing one of the following return codes.
Return values
L4_EOKOperation successful.
-L4_EINVALthread is not a thread object or other arguments were malformed.
-L4_EPERMthread is missing L4_CAP_FPAGE_S right.

Definition at line 130 of file ipc_gate.h.

◆ l4_ipc_gate_get_infos()

l4_msgtag_t l4_ipc_gate_get_infos ( l4_cap_idx_t  gate,
l4_umword_t label 
)
inline

Get information about the IPC-gate.

Parameters
gateThe IPC gate object to get information about.
[out]labelThe label of the IPC gate is returned here.
Returns
System call return tag.

Definition at line 137 of file ipc_gate.h.

◆ l4_rcv_ep_bind_thread()

l4_msgtag_t l4_rcv_ep_bind_thread ( l4_cap_idx_t  ep,
l4_cap_idx_t  thread,
l4_umword_t  label 
)
inline

Bind the IPC gate to a thread.

Parameters
epThe IPC receive endpoint object.
threadThe thread object that shall be bound to ep.
labelLabel to assign to ep. The two least significant bits should usually be set to zero.
Returns
Syscall return tag containing one of the following return codes.
Return values
L4_EOKOperation successful.
-L4_EINVALthread is not a thread object or other arguments were malformed.
-L4_EPERMthread is missing L4_CAP_FPAGE_S right.
Examples:
examples/sys/isr/main.c.

Definition at line 79 of file rcv_endpoint.h.