L4Re Operating System Framework – Interface and Usage Documentation
Loading...
Searching...
No Matches
L4::Epiface Struct Referenceabstract

Base class for interface implementations. More...

#include <ipc_epiface>

+ Inheritance diagram for L4::Epiface:
+ Collaboration diagram for L4::Epiface:

Public Types

typedef Ipc_svr::Server_iface Server_iface
 Type for abstract server interface.
 
typedef Ipc_svr::Server_iface::Demand Demand
 Type for server-side receive buffer demand.
 

Public Member Functions

 Epiface ()
 Make a server object.
 
virtual l4_msgtag_t dispatch (l4_msgtag_t tag, unsigned rights, l4_utcb_t *utcb)=0
 The abstract handler for client requests to the object.
 
virtual Demand get_buffer_demand () const =0
 Get the server-side receive buffer demand for this object.
 
virtual ~Epiface ()=0
 Destroy the object.
 
Stored_cap obj_cap () const
 Get the capability to the kernel object belonging to this object.
 
Server_ifaceserver_iface () const
 Get pointer to server interface at which the object is currently registered.
 
int set_server (Server_iface *srv, Cap< void > cap, bool managed=false)
 Set server registration info for the object.
 
void set_obj_cap (Cap< void > const &cap)
 Deprecated server registration function.
 

Detailed Description

Base class for interface implementations.

An Epiface is the base interface of objects registered in the server loop. Incomming IPC gets dispatched to the appropriate Epiface object where the call is then handled appropriately.

Note
Server loops are allowed to internally keep raw pointers to Epiface objects for dispatching calls. Instances must therefore never be copied or moved.

Definition at line 156 of file ipc_epiface.

Member Function Documentation

◆ dispatch()

virtual l4_msgtag_t L4::Epiface::dispatch ( l4_msgtag_t  tag,
unsigned  rights,
l4_utcb_t utcb 
)
pure virtual

The abstract handler for client requests to the object.

Parameters
tagThe message tag for this invocation.
rightsThe rights bits in the invoked capability.
utcbThe UTCB used for the invocation.
Return values
-L4_ENOREPLYNo reply message is send.
<0Error, reply with error code.
>=0Success, reply with return value.

This function must be implemented by application specific server objects.

Implemented in L4::Epiface_t< Block_dev< Ds_data >, L4virtio::Device >, L4::Epiface_t< Null_handler, L4::Kobject >, L4::Epiface_t< Virtio_client< DEV >, L4virtio::Device >, L4::Epiface_t< Derived, IFACE, BASE, bool >, L4::Server_object, L4::Irqep_t< Irq_object >, and L4::Irqep_t< Derived, BASE, bool >.

Referenced by L4::Basic_registry::dispatch().

+ Here is the caller graph for this function:

◆ get_buffer_demand()

virtual Demand L4::Epiface::get_buffer_demand ( ) const
pure virtual

Get the server-side receive buffer demand for this object.

Note
This function is usually not implemented directly, but by using Server_object_t template with an IPC interface definition.
Returns
The needed server-side receive buffers for this object

Implemented in L4::Epiface_t0< IFACE, L4::Epiface >, L4::Epiface_t0< L4::Kobject, L4::Epiface >, L4::Epiface_t0< L4virtio::Device, L4::Epiface >, L4::Epiface_t0< void, Epiface >, L4::Epiface_t0< RPC_IFACE, BASE >, L4::Server_object_t< IFACE, BASE >, L4::Server_object_t< IFACE, L4::Server_object >, and L4::Server_object_t< Kobject >.

◆ obj_cap()

Stored_cap L4::Epiface::obj_cap ( ) const
inline

Get the capability to the kernel object belonging to this object.

Returns
Capability for the kernel object behind the server.

This is usually either an Ipc_gate or an Irq.

Definition at line 217 of file ipc_epiface.

Referenced by L4Re::Util::Object_registry::unregister_obj().

+ Here is the caller graph for this function:

◆ server_iface()

Server_iface * L4::Epiface::server_iface ( ) const
inline

Get pointer to server interface at which the object is currently registered.

Returns
Pointer to the server at which the object is currently registered, NULL if the object is not registered at any server.

Definition at line 224 of file ipc_epiface.

◆ set_server()

int L4::Epiface::set_server ( Server_iface srv,
Cap< void >  cap,
bool  managed = false 
)
inline

Set server registration info for the object.

Parameters
srvThe server to register at
capThe capability that connects the object.
managedMark the capability as managed or unmanaged. Typical server implementations use this flag to remember whether the capability was internally allocated or not.
Returns
0 on success, -L4_EINVAL if the srv and cap are not consistent.

Definition at line 235 of file ipc_epiface.

References L4_EINVAL.

Referenced by L4Re::Util::Object_registry::unregister_obj().

+ Here is the caller graph for this function:

The documentation for this struct was generated from the following file: