IPC wire — message_type index (curated)

Transport: syscall 50 (IpcMessage*) and 51 (recv). Legacy 30 / 31 hit the same broker but lack present-window remap — prefer 50 / 51 (see ipc-broker.md).

Struct layout: src/sys/ipc_osl.rs (IpcMessage: sender_pid, target_pid, message_type, 24-byte payload → p1 / p2 / p3 as u64 each in libc helpers).

Policy / broker semantics: ipc-broker.md — coalescing, overflow, purge_target_dead.

This page lists message_type numbers the way syscalls-reference.md lists syscall IDs. Constants are scattered across apps/deskgui, SDK/lib/cstd, and src/net; if code and this table disagree, fix the table in the same PR as the wire change.


Kernel special cases (syscall 50 — before / instead of generic enqueue)

Type

Behavior

crate::net::WIRE_NETD_RX_RAW (260)

In-kernel RX injection into netd queue; not a normal broker send. See src/net/mod.rs.

9

Legacy “IPC SIGKILL”: terminate_task_by_id(target) — dangerous; see syscalls.rs syscall 50 arm.

All other types (after routing target_pid == 0 → deskgui.elf by name) go through IPC_BROKER.


WM / compositor (apps/deskgui/src/api/window.rs)

Canonical names live in window.rs (and partially duplicated in SDK/lib/cstd/src/wm_v1.rs).

Type

Const (typical)

Direction

Summary

1

WIRE_LEGACY_OPEN_WINDOW

app → compositor

Legacy open inner size.

2

WIRE_LEGACY_DRAW_FRAME

app → compositor

Legacy full-frame present (kernel remaps p1 pages).

3

WIRE_INPUT_MOUSE

compositor → app

Mouse (coalesced in broker).

4

WIRE_INPUT_KEYBOARD

compositor → app

Keyboard: p1 = scancode (& 0x7F), p2 = 1 down / 0 up, p3 = ps2d modifier mask (shift 1, ctrl 2, alt 4); 0 if forwarded from legacy poll_ui only.

5

WIRE_LEGACY_OPEN_CANVAS

app → compositor

Legacy titled open (kernel remaps like 2).

6

WIRE_QUERY_DISPLAY

app → compositor

Workspace query.

7

WIRE_DISPLAY_INFO

compositor → app

Workspace reply.

16

WIRE_WM_V1_REQUEST

app → compositor

WM v1 envelope.

17

WIRE_WM_V1_CONT

app → compositor

Title / bulk continuation.

18

WIRE_WM_V1_PRESENT

app → compositor

WM v1 present (kernel remaps like 2).

32

WIRE_WM_REPLY_OK

compositor → app

Create / op success.

33

WIRE_WM_REPLY_ERR

compositor → app

Failure.

34

WIRE_WM_EVENT_FOCUS

compositor → app

Focus changed.

35

WIRE_WM_EVENT_CLOSE

compositor → app

Window close.

36

WIRE_WM_EVENT_DISPLAY_CHANGED

compositor → app

Workspace / scale.

37

WIRE_WM_EVENT_CLIENT_BOUNDS

compositor → app

Client surface size (p1 = handle); coalesced per (sender, target, type, p1) in broker.

38

WIRE_WM_PEER_DIED

kernel → compositor

sender_pid == 0, p1 = dead client PID.

39

WIRE_FILE_PICKER_REQUEST

app → compositor

System file picker: p1 = request_id (u32); p2/p3 reserved 0.

40

WIRE_FILE_PICKER_REPLY_BEGIN

compositor → app

p1 = request_id, p2 = status (0 cancel, 1 ok), p3 = UTF-8 path length when ok.

41

WIRE_FILE_PICKER_PATH_CHUNK

compositor → app

Path fragment: same p1–p3 packing as WM WIRE_WM_V1_CONT; p1 continuation kind 2 (CONT_KIND_FILE_PICKER_PATH).

250

WIRE_PS2D_KEY_EVENT

ps2d → compositor

Decoded key; compositor forwards as 4.

251

WIRE_PS2D_MOUSE_EVENT

ps2d → compositor

Mouse relative + buttons.

280

WIRE_GAME_SVC

client ↔ p1-gamesvc

See SDK/lib/cstd/src/game_runtime.rs.

281

WIRE_GAME_STATUS

service → clients

Status / events.

282

WIRE_GAME_INPUT_POLICY

↔ compositor / gamesvc

Policy negotiation.

Present remap: types 2, 5, 18 — see wm-surface-lifecycle.md §4.


Services (libc / app-local consts)

Type

Const

Module / app

Role

99

(parent exit notify)

syscall path / generic

Used in kernel paths for child-exit notification (see process-lifecycle.md); not a single WIRE_* const.

100

(informal SERVICE_READY)

e.g. ps2d → init

Init / bring-up “ready” ping (not a named const in one header — grep 100); broker treats as normal datagram.

260

WIRE_NETD_RX_RAW

src/net/mod.rs

Kernel RX inject.

261

WIRE_KERNEL_NETD_TX

src/net/mod.rs

Raw Ethernet TX to netd.

270

WIRE_NET_MGR_EVENT

src/net/mod.rs

p1-netmgr events.

271

WIRE_TIME_SVC

apps/p1-timesvc, deskgui/compositor.rs

Time daemon RPC surface.

272

WIRE_DISPLAY_SVC

apps/p1-dispsvc, dispctl, settings

Display daemon RPC surface.

273

WIRE_LUA_SVC

SDK/lib/cstd/src/lua_runtime.rs

Lua control plane (luactl ↔ p1-luasvc).

280–282

game wire

game_runtime.rs / window.rs

See WM table.

290

WIRE_PXL_WALLET

SDK/lib/cstd/src/pxl_wallet.rs

Wallet stub RPC.


Coalescing (broker)

From src/sys/ipc.rs: types 2, 18 (same sender + type), 3 (same sender + target + type), 37 (same sender + target + type + p1 window handle). See ipc-broker.md §3.


See also