Loading...
Searching...
No Matches
L4::Server_object_t< IFACE, BASE > Struct Template Reference
The L4Re IPC Framework » Server-Side IPC framework

Base class (template) for server implementing server objects. More...

`#include <ipc_server>`

Inheritance diagram for L4::Server_object_t< IFACE, BASE >:
Collaboration diagram for L4::Server_object_t< IFACE, BASE >:

## Public Types

typedef IFACE | Interface
| Data type of the IPC interface definition.
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.

## Public Member Functions

BASE::Demand | get_buffer_demand () const override
int | dispatch_meta_request (L4::Ipc::Iostream &ios)
| Implementation of the meta protocol based on IFACE.
Public Member Functions inherited from L4::Server_object
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 | ~Epiface ()=0
| Destroy the object.
Stored_cap | obj_cap () const
| Get the capability to the kernel object belonging to this object.
Server_iface * | server_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.

## Static Public Member Functions

template<typename THIS>
static int | proto_dispatch (THIS *self, l4_umword_t rights, L4::Ipc::Iostream &ios)
| Implementation of protocol-based dispatch for this server object.

## Detailed Description

template<typename IFACE, typename BASE = L4::Server_object>
struct L4::Server_object_t< IFACE, BASE >

Base class (template) for server implementing server objects.

Template Parameters

  IFACE | The IPC interface class that defines the interface that shall be implemented.
  BASE | The server object base class (usually L4::Server_object).

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

Definition at line 80 of file ipc_server.

## Member Function Documentation

## dispatch_meta_request()

template<typename IFACE, typename BASE = L4::Server_object>

int L4::Server_object_t< IFACE, BASE >::dispatch_meta_request | ( | L4::Ipc::Iostream & | ios | ) |

inline

Implementation of the meta protocol based on IFACE.

Parameters

  ios | The IO stream used for receiving the message.

This function can be used to handle incoming L4_PROTO_META protocol requests. The implementation uses the L4::Type_info of IFACE to handle the requests. Call this function in the implementation of Server_object::dispatch() when the received message tag has protocol L4_PROTO_META (L4::Meta::Protocol).

Definition at line 99 of file ipc_server.

## get_buffer_demand()

template<typename IFACE, typename BASE = L4::Server_object>

BASE::Demand L4::Server_object_t< IFACE, BASE >::get_buffer_demand | ( |  | ) | const

inlineoverridevirtual

Returns
  the server-side buffer demand based in IFACE.

Implements L4::Epiface.

Definition at line 86 of file ipc_server.

## proto_dispatch()

template<typename IFACE, typename BASE = L4::Server_object>
template<typename THIS>

int L4::Server_object_t< IFACE, BASE >::proto_dispatch | ( | THIS * | self,
|  | l4_umword_t | rights,
|  | L4::Ipc::Iostream & | ios )

inlinestatic

Implementation of protocol-based dispatch for this server object.

Parameters

  self | The this pointer for the object (inherits from Server_object_t).
  rights | The rights from the received IPC (forwarded to p_dispatch()).
  ios | The message stream for the incoming and the reply message.

Server objects may call this function from their dispatch() function. This function reads the protocol ID from the message tag and uses the p_dispatch code to dispatch to overloaded p_dispatch functions of self.

Definition at line 114 of file ipc_server.

References l4_msgtag_t::label(), and L4::Kobject_typeid< T >::proto_dispatch().

Referenced by L4::Server_object_x< Derived, IFACE, BASE >::dispatch().

Here is the call graph for this function:
Here is the caller graph for this function:

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

- l4/cxx/ipc_server