#include <kern/host.h>
kern/host.h
kern/host.h
Definitions for host data structures.
functionhost_self
extern host_t host_self(void)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu osfmk/kern/host.c
Returns a pointer to the canonical host structure, realhost. In-kernel equivalent of the host name port; unlike the mach_host_self trap it returns the host_t itself rather than a port right, and no reference is consumed or produced.
functionhost_priv_self
extern host_priv_t host_priv_self(void)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu osfmk/kern/host.c
Returns the host control (host_priv) representation of the canonical host structure, realhost. Grants the holder access to privileged host operations; no reference is consumed or produced.