Loading...
Searching...
No Matches
Namespace interface
L4Re C Interface

Namespace C interface. More...

Collaboration diagram for Namespace interface:

## Enumerations

enum | l4re_ns_register_flags
| Namespace register flags. More...

## Functions

long | l4re_ns_query_to_srv (l4re_namespace_t srv, char const *name, l4_cap_idx_t const cap, int timeout) L4_NOTHROW
| Query the name space for the object named by name.
long | l4re_ns_query_srv (l4re_namespace_t srv, char const *name, l4_cap_idx_t const cap) L4_NOTHROW
| Query the name space for the object named by name.
long | l4re_ns_register_obj_srv (l4re_namespace_t srv, char const *name, l4_cap_idx_t const obj, unsigned flags) L4_NOTHROW
| Register an object with a name.

## Variables

L4_BEGIN_DECLS typedef l4_cap_idx_t | l4re_namespace_t
| Namespace type.

## Detailed Description

Namespace C interface.

## Enumeration Type Documentation

## l4re_ns_register_flags

enum l4re_ns_register_flags

Namespace register flags.

See also
  L4Re::Namespace::Register_flags

Definition at line 29 of file namespace.h.

## Function Documentation

## l4re_ns_query_srv()

long l4re_ns_query_srv | ( | l4re_namespace_t | srv,
|  | char const * | name,
|  | l4_cap_idx_t const | cap )

inline

Query the name space for the object named by name.

Parameters

  srv | Name space server to use for the query.
  name | String to query.
  cap | Capability slot where the received capability will be stored.

Return values

  0 | Name could be fully resolved.
  >0 | Name could only be partly resolved. The number of remaining characters is returned.
  -L4_ENOENT | Entry could not be found.
  -L4_EAGAIN | Entry exists but no object is yet attached. Try again later.
  <0 | IPC errors, see l4_error_code_t.

Definition at line 95 of file namespace.h.

References L4_NOTHROW, l4re_namespace_t, and l4re_ns_query_to_srv().

Here is the call graph for this function:

## l4re_ns_query_to_srv()

long l4re_ns_query_to_srv | ( | l4re_namespace_t | srv,
|  | char const * | name,
|  | l4_cap_idx_t const | cap,
|  | int | timeout )

Query the name space for the object named by name.

Parameters

  timeout | Timeout of query in milliseconds. The client will only wait if a name already has been registered with the server but no object has been attached yet.
  srv | Name space server to use for the query.
  name | String to query.
  cap | Capability slot where the received capability will be stored.

Return values

  0 | Name could be fully resolved.
  >0 | Name could only be partly resolved. The number of remaining characters is returned.
  -L4_ENOENT | Entry could not be found.
  -L4_EAGAIN | Entry exists but no object is yet attached. Try again later.
  <0 | IPC errors, see l4_error_code_t.

References L4_CV, L4_INLINE, L4_NOTHROW, and l4re_namespace_t.

Referenced by l4re_ns_query_srv().

Here is the caller graph for this function:

## l4re_ns_register_obj_srv()

long l4re_ns_register_obj_srv | ( | l4re_namespace_t | srv,
|  | char const * | name,
|  | l4_cap_idx_t const | obj,
|  | unsigned | flags )

Register an object with a name.

Parameters

  srv | Name space server to use for the query.
  name | Name under which the object should be registered.
  obj | Capability to object to register. An invalid capability may be given to only reserve the name for later use.
  flags | Flags to assign to the entry, see L4Re::Namespace::Register_flags. Note that the rights that are assigned to a capability are not only determined by the rights given in these flags but also by the rights with which the obj capability was mapped to the name space.

Return values

  0 | Object was successfully registered with name.
  -L4_EEXIST | Name already registered.
  -L4_EPERM | Insufficient permissions; see precondition.
  -L4_ENOMEM | Server has insufficient resources.
  -L4_EINVAL | Invalid parameter.
  <0 | IPC errors, see l4_error_code_t.

Precondition
  The invoked Namespace capability must have the permission L4_CAP_FPAGE_W.

References L4_CV, L4_INLINE, L4_NOTHROW, and l4re_namespace_t.