Introduction   User API Reference   DSMlib Reference   IDL Interface   File List   Index  

Client Handling
[Dataspace Manager Server Support Library]


Data Structures

struct  dsmlib_client_desc

Typedefs

typedef struct dsmlib_client_desc dsmlib_client_desc_t

Functions

L4_CV int dsmlib_add_client (dsmlib_ds_desc_t *ds, l4_threadid_t client, l4_uint32_t rights)
 Add client to dataspace.
L4_CV int dsmlib_remove_client (dsmlib_ds_desc_t *ds, l4_threadid_t client)
 Remove dataspace client.
L4_CV int dsmlib_remove_all_clients (dsmlib_ds_desc_t *ds)
 Remove all clients from dataspace.
L4_CV int dsmlib_is_client (const dsmlib_ds_desc_t *ds, l4_threadid_t client)
 Check if someone is a client of a dataspace.
L4_CV int dsmlib_set_rights (const dsmlib_ds_desc_t *ds, l4_threadid_t client, l4_uint32_t rights)
 Set client rights.
L4_CV l4_uint32_t dsmlib_get_rights (const dsmlib_ds_desc_t *ds, l4_threadid_t client)
 Return client rights.
L4_CV int dsmlib_check_rights (const dsmlib_ds_desc_t *ds, l4_threadid_t client, l4_uint32_t rights)
 Check client rights.

Typedef Documentation

Dataspace client descriptor


Function Documentation

L4_CV int dsmlib_add_client ( dsmlib_ds_desc_t ds,
l4_threadid_t  client,
l4_uint32_t  rights 
)

Add client to dataspace.

Parameters:
ds Dataspace descriptor
client Client thread id
rights Rights bit mask (user defined)
Returns:
0 on success, error code otherwise:
  • -L4_EINVAL invalid dataspace descriptor
  • -L4_ENOMEM out of memory allocating client descriptor
Add client to the client list of the dataspace. If the client already exists, the rights are added to the client descriptor.

L4_CV int dsmlib_remove_client ( dsmlib_ds_desc_t ds,
l4_threadid_t  client 
)

Remove dataspace client.

Parameters:
ds Dataspace descriptor
client Client thread id
Returns:
0 on success, error code otherwise:
  • -L4_EINVAL invalid dataspace descriptor
  • -L4_ENOTFOUND client id not found
Remove client from the client list of the dataspace.

L4_CV int dsmlib_remove_all_clients ( dsmlib_ds_desc_t ds  ) 

Remove all clients from dataspace.

Parameters:
ds Dataspace descriptor
Returns:
0 on success, error code otherwise:
  • -L4_EINVAL invalid dataspace descriptor

L4_CV int dsmlib_is_client ( const dsmlib_ds_desc_t ds,
l4_threadid_t  client 
)

Check if someone is a client of a dataspace.

Parameters:
ds Dataspace descriptor
client Client thread id
Returns:
!= 0 if client is a client of the dataspace, 0 otherwise.
Note:
This only checks the client list of the dataspace, not if client is the owner of the dataspace.

L4_CV int dsmlib_set_rights ( const dsmlib_ds_desc_t ds,
l4_threadid_t  client,
l4_uint32_t  rights 
)

Set client rights.

Parameters:
ds Dataspace descriptor
client Client thread id
rights Rights bit mask (user defined)
Returns:
0 on success, error code otherwise:
  • -L4_EINVAL invalid datatspace descriptor
  • -L4_ENOTFOUND client id not found
Set rights for client to rights.

L4_CV l4_uint32_t dsmlib_get_rights ( const dsmlib_ds_desc_t ds,
l4_threadid_t  client 
)

Return client rights.

Parameters:
ds Dataspace descriptor
client Client thread id
Returns:
Rights bit mask, 0 if invalid dataspace descriptor or client id not found
Return rights bit mask for client.

Note:
This function only returns the rights of the client stored in the client list. It does not check if the client is the owner of the dataspace.

L4_CV int dsmlib_check_rights ( const dsmlib_ds_desc_t ds,
l4_threadid_t  client,
l4_uint32_t  rights 
)

Check client rights.

Parameters:
ds Dataspace descriptor
client Client thread id
rights Rights bit mask
Returns:
1 if the client is allowed to perform the requested operations, 0 otherwise
Note:
This function only checks the rights of the client stored in the client list. It does not check if the client is the owner of the dataspace.


DMphys Reference Manual, written by Lars Reuther  © 2000-2003