code wiki / _hdl_build / nx_gallery_gateway_smoke.nx

nx_gallery_gateway_smoke.nx

buildroot/runtime/_hdl_build/nx_gallery_gateway_smoke.nx

7637 B138 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind smoketopic gallery
docsdependenciesstructsconstsfunctions

about

nx_gallery_gateway_smoke.nx -- R1 GATE PROOF. Forks the gallery gateway and drives it as a real HTTP client over the wire: register -> login -> GET /gallery/api/list (no token)=401 -> (valid token)=200 PROXIED from the live gallery (:18090) -> (bad token)=401 -> GET /gallery/sw.js=200 -> /gallery/login=200. Proves the OPAQUE session gate + the reverse-proxy. Requires /tmp/nx_gallery_gateway.sov.elf built in the same WSL session AND the gallery backend live on 127.0.0.1:18090. exit 0 = GREEN, N = assertion N failed.

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_connect.nx nx_assert.nx nx_gallery_gateway_smoke.nx

imports: nx_syscalls.nxnx_connect.nxnx_assert.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_openat_wr sys_close sys_fork sys_mmap sys_execve sys_exit sys_sleep_ms sys_mmap ↻ sys_munmap smk_post smk_slen sys_mmap ↻ smk_http sys_socket sys_set_socket_timeout sys_mmap ↻ sys_setsockopt sys_munmap ↻ sys_mmap ↻ nx_connect_bounded nx_fcntl sys_connect sys_mmap ↻ sys_poll sys_close ↻ sys_write sys_read nx_puts_err sys_write ↻ nx_puti_err sys_mmap ↻ sys_write ↻ smk_find nx_kill smk_get sys_wait4

structs

none

consts

9const SMK_MAGIC_8388608: i64 = 8388608
10const SMK_MAGIC_4096: i64 = 4096
11const SMK_MAGIC_8388607: i64 = 8388607
13const SMK_PORT: i64 = 18091
14const DAEMON_ELF: *u8 = "/tmp/nx_gallery_gateway.sov.elf" as *u8

functions

16func smk_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: smk_post
17func smk_find(buf: *u8, n: i64, needle: *u8, nl: i64) -> i64
called by 1: main
23func smk_http(req: *u8, reqn: i64, resp: *u8, cap: i64) -> i64
36func smk_post(reqbuf: *u8, path: *u8, body: *u8) -> i64
called by 1: main calls 2: smk_slensys_mmap
48func smk_get(reqbuf: *u8, path: *u8, tok: *u8) -> i64
called by 1: main
62func main() -> i64