NOVA User-Level Environment  Version testbox/changed-memory-timing-317-g320d8b5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
s0_ParentProtocol Class Reference

#include <parent_protocol.h>

Inheritance diagram for s0_ParentProtocol:
CapAllocator InternalCapAllocator

Classes

struct  ClientData
 Missing: kill a client, mem+cap quota support. More...
struct  ServerData

Public Member Functions

unsigned portal_func (Utcb &utcb, Utcb::Frame &input, bool &free_cap, cap_sel pid)
 s0_ParentProtocol (unsigned cap_start, unsigned cap_order, unsigned cap_all_start, unsigned cap_all_order)
 The first set of caps is used by ParentProtocol for internal stuff, the second range is the client capability range, which includes the first.
unsigned alloc_crd ()
template<class T >
unsigned create_pt_per_client (unsigned base, T *__sigma0)
template<class T >
unsigned create_threads (T *__sigma0)
- Public Member Functions inherited from CapAllocator
 CapAllocator (unsigned long cap_, unsigned long cap_start, unsigned long cap_order)
unsigned alloc_cap (unsigned count=1)
void dealloc_cap (unsigned cap, unsigned count=1)

Public Attributes

unsigned _cap_all_start
unsigned _cap_all_order
unsigned cap_ec_parent
- Public Attributes inherited from CapAllocator
unsigned long _cap_
unsigned long _cap_start
unsigned long _cap_order

Private Types

typedef ClientDataStorage
< ClientData,
s0_ParentProtocol, false >
::Guard 
GuardC
typedef ClientDataStorage
< ServerData,
s0_ParentProtocol, false >
::Guard 
GuardS

Private Member Functions

 ALIGNED (8) ClientDataStorage< ClientData
 ALIGNED (8) ClientDataStorage< ServerData
 client "registry" of sessions to services
unsigned get_portal (Utcb &utcb, unsigned cap_client, unsigned &portal)
unsigned check_permission (unsigned identity, const char *request, unsigned request_len, unsigned instance, char const *&cmdline, unsigned &namelen)
 Check whether a client has the permission to access a service.
unsigned free_service (Utcb &utcb, ServerData *sdata)
void notify_service (Utcb &utcb, ClientData *c)

Static Private Member Functions

static char const * get_client_cmdline (unsigned identity, unsigned long &s0_cmdlen)
static char * get_client_memory (unsigned identity, unsigned client_mem_revoke)
static unsigned get_client_number (unsigned cap)
 Service "registry".

Private Attributes

struct {
   unsigned   cap_ec_parent
_percpu [MAXCPUS]
 s0_ParentProtocol
false session
false _server

Member Typedef Documentation

Constructor & Destructor Documentation

s0_ParentProtocol::s0_ParentProtocol ( unsigned  cap_start,
unsigned  cap_order,
unsigned  cap_all_start,
unsigned  cap_all_order 
)
inline

The first set of caps is used by ParentProtocol for internal stuff, the second range is the client capability range, which includes the first.

We need those two to be in a single naturally aligned block in order to create a translation window that spans both.

Member Function Documentation

s0_ParentProtocol::ALIGNED ( )
private
s0_ParentProtocol::ALIGNED ( )
private

client "registry" of sessions to services

unsigned s0_ParentProtocol::alloc_crd ( )
inline
unsigned s0_ParentProtocol::check_permission ( unsigned  identity,
const char *  request,
unsigned  request_len,
unsigned  instance,
char const *&  cmdline,
unsigned &  namelen 
)
inlineprivate

Check whether a client has the permission to access a service.

Parse the client's cmdline for "name::" prefixes and check whether the postfix matches the requested name. In the current implementation, it is only checked whether the trailing part of the postfix (without the namespace) matches the requested name.

Parameters
identityThe identity of the client (i.e. ParentProtocol::CAP_PARENT_ID)
requestName of the requested service
request_lenLength of the name
instanceWhich instance of the service is requested
[out]cmdlinePointer to the postfix of the matching "name::" parameter (including the namespace)
[out]namelenThe length the postfix
template<class T >
unsigned s0_ParentProtocol::create_pt_per_client ( unsigned  base,
T *  __sigma0 
)
inline
template<class T >
unsigned s0_ParentProtocol::create_threads ( T *  __sigma0)
inline
unsigned s0_ParentProtocol::free_service ( Utcb utcb,
ServerData sdata 
)
inlineprivate
char const * s0_ParentProtocol::get_client_cmdline ( unsigned  identity,
unsigned long &  s0_cmdlen 
)
staticprivate
char * s0_ParentProtocol::get_client_memory ( unsigned  identity,
unsigned  client_mem_revoke 
)
staticprivate
static unsigned s0_ParentProtocol::get_client_number ( unsigned  cap)
inlinestaticprivate

Service "registry".

unsigned s0_ParentProtocol::get_portal ( Utcb utcb,
unsigned  cap_client,
unsigned &  portal 
)
inlineprivate
void s0_ParentProtocol::notify_service ( Utcb utcb,
ClientData c 
)
inlineprivate
unsigned s0_ParentProtocol::portal_func ( Utcb utcb,
Utcb::Frame input,
bool &  free_cap,
cap_sel  pid 
)
inline

Member Data Documentation

unsigned s0_ParentProtocol::_cap_all_order
unsigned s0_ParentProtocol::_cap_all_start
struct { ... } s0_ParentProtocol::_percpu[MAXCPUS]
false s0_ParentProtocol::_server
private
unsigned s0_ParentProtocol::cap_ec_parent
s0_ParentProtocol::s0_ParentProtocol
private
false s0_ParentProtocol::session
private

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