ZXFoundation™ 26h2
Loading...
Searching...
No Matches
types.cxxm File Reference

Capability system type definitions — opaque resource tokens for the DGP kernel's capability-based authorization model. More...

Include dependency graph for types.cxxm:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  zxfoundation::dgp::cap::cap_token
 Opaque 64-bit capability token. More...

Enumerations

enum class  zxfoundation::dgp::cap::cap_rights : u16 {
  none = 0 , read = 1U << 0 , write = 1U << 1 , exec = 1U << 2 ,
  destroy = 1U << 3 , delegate = 1U << 4 , admin = 1U << 5 , map = 1U << 6 ,
  all = 0xFFFFU
}
 Standard access rights usable with any capability type. More...
enum class  zxfoundation::dgp::cap::cap_type : u16 {
  none = 0 , domain = 1 , gate = 2 , portal = 3 ,
  io_device = 5 , memory = 6 , service = 7 , admin = 8 ,
  memory_extent = 9
}
 Discriminator for the kind of resource a capability token refers to. More...

Functions

constexpr auto zxfoundation::dgp::cap::cap_type_name (cap_type t) noexcept -> const char *
 Return a human-readable label for a capability type.
constexpr auto zxfoundation::dgp::cap::operator& (cap_rights a, cap_rights b) noexcept -> cap_rights
constexpr auto zxfoundation::dgp::cap::operator| (cap_rights a, cap_rights b) noexcept -> cap_rights
constexpr auto zxfoundation::dgp::cap::operator~ (cap_rights r) noexcept -> cap_rights

Variables

constexpr u64 zxfoundation::dgp::cap::CAP_ERROR_SENTINEL = ~0ULL
 Sentinel value indicating an error from capability operations.
constexpr cap_token zxfoundation::dgp::cap::CAP_TOKEN_NULL {}
 Null / invalid capability token sentinel.

Detailed Description

Capability system type definitions — opaque resource tokens for the DGP kernel's capability-based authorization model.

SPDX-License-Identifier: Apache-2.0

Enumeration Type Documentation

◆ cap_rights

enum class zxfoundation::dgp::cap::cap_rights : u16
exportstrong

Standard access rights usable with any capability type.

Enumerator
read 

Read / view the resource.

write 

Write / modify the resource.

exec 

Execute / invoke the resource.

destroy 

Destroy the resource.

delegate 

Delegate this capability to another domain.

admin 

Administrative operations (domain create/destroy).

map 

Map physical memory into address space.

all 

All rights.

◆ cap_type

enum class zxfoundation::dgp::cap::cap_type : u16
exportstrong

Discriminator for the kind of resource a capability token refers to.

Enumerator
none 

Invalid / null capability.

domain 

Reference to a domain.

gate 

Reference to a gate.

portal 

Reference to a portal.

io_device 

Reference to an I/O device binding.

memory 

Reference to a memory grant authority.

service 

Reference to a service registry entry.

admin 

Administrative authority (domain mgmt, etc.).

memory_extent 

Exact physical range authorized for mapping.