code wiki / _hdl_build / nx_gallery_gateway_smoke.nx
nx_gallery_gateway_smoke.nx
buildroot/runtime/_hdl_build/nx_gallery_gateway_smoke.nx
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
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
structs
| none |
consts
| 9 | const SMK_MAGIC_8388608: i64 = 8388608 |
| 10 | const SMK_MAGIC_4096: i64 = 4096 |
| 11 | const SMK_MAGIC_8388607: i64 = 8388607 |
| 13 | const SMK_PORT: i64 = 18091 |
| 14 | const DAEMON_ELF: *u8 = "/tmp/nx_gallery_gateway.sov.elf" as *u8 |
functions
| 16 | func 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 |
| 17 | func smk_find(buf: *u8, n: i64, needle: *u8, nl: i64) -> i64 called by 1: main |
| 23 | func smk_http(req: *u8, reqn: i64, resp: *u8, cap: i64) -> i64 called by 1: main calls 7: sys_socketsys_set_socket_timeoutsys_mmapnx_connect_boundedsys_closesys_write+1 |
| 36 | func smk_post(reqbuf: *u8, path: *u8, body: *u8) -> i64 |
| 48 | func smk_get(reqbuf: *u8, path: *u8, tok: *u8) -> i64 called by 1: main |
| 62 | func main() -> i64 |