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

Abstract server object to be used with L4::Server and L4::Basic_registry. More...

#include <ipc_server>

+ Inheritance diagram for L4::Server_object:
+ Collaboration diagram for L4::Server_object:

Public Member Functions

virtual int dispatch (unsigned long rights, Ipc::Iostream &ios)=0
 The abstract handler for client requests to the object.
 
l4_msgtag_t dispatch (l4_msgtag_t tag, unsigned rights, l4_utcb_t *utcb) override
 The abstract handler for client requests to the object.
 
- Public Member Functions inherited from L4::Epiface
 Epiface ()
 Make a server 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.
 

Additional Inherited Members

- Public Types inherited from L4::Epiface
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.
 

Detailed Description

Abstract server object to be used with L4::Server and L4::Basic_registry.

Note
Usually L4::Server_object_t is used as a base class when writing server objects.

This server object provides an abstract interface that is used by the L4::Registry_dispatcher model. You can derive subclasses from this interface and implement application specific server objects.

Definition at line 49 of file ipc_server.

Member Function Documentation

◆ dispatch() [1/2]

l4_msgtag_t L4::Server_object::dispatch ( l4_msgtag_t  tag,
unsigned  rights,
l4_utcb_t utcb 
)
inlineoverridevirtual

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.

Implements L4::Epiface.

Definition at line 71 of file ipc_server.

References dispatch().

+ Here is the call graph for this function:

◆ dispatch() [2/2]

virtual int L4::Server_object::dispatch ( unsigned long  rights,
Ipc::Iostream ios 
)
pure virtual

The abstract handler for client requests to the object.

Parameters
rightsThe rights bits in the invoked capability.
iosThe Ipc::Iostream for reading the request and writing the reply.
Return values
-L4_ENOREPLYInstructs the server loop to not send a reply.
<0Error, reply with error code.
>=0Success, reply with return value.

This function must be implemented by application specific server objects. The implementation must unmarshall data from the stream (ios) and create a reply by marshalling to the stream (ios). For details about the IPC stream see IPC stream operators.

Note
You need to extract the complete message from the ios stream before inserting any reply data or before doing any function call that may use the UTCB. Otherwise, the incoming message may get lost.

Implemented in L4::Server_object_x< Derived, IFACE, BASE >.

Examples
examples/libs/l4re/c++/shared_ds/ds_srv.cc, and examples/libs/l4re/streammap/server.cc.

Referenced by dispatch().

+ Here is the caller graph for this function:

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