code wiki / _hdl_build / nx_hr_serve3_slot_gate.nx

nx_hr_serve3_slot_gate.nx

buildroot/runtime/_hdl_build/nx_hr_serve3_slot_gate.nx

9296 B210 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic hr
docsdependenciesstructsconstsfunctions

about

nx_hr_serve3_slot_gate.nx -- GATE for hr_serve3_slot (universal ad-slot injection at the file server). Proves on REAL files in a hermetic /tmp docroot: (T1) html gets the slot immediately before the LAST </body> with a CORRECT Content-Length; (T2) non-html untouched; (T3) html without </body> untouched; (T4) nx-ad-optout page untouched; (T5) slot_n==0 -> BYTE-IDENTICAL to hr_serve3 (the do-no-harm law); (T6) canonical 301 path identical in both; (T7) helper detectors FIRE on planted vectors. expect_exit: 0 license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_host_router.nx nx_hr_serve3_slot_gate.nx

imports: nx_syscalls.nxnx_host_router.nx

imported by: nobody (leaf or entry point)

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

main hg_puts sys_write sys_mkdir hg_wfile sys_openat_wr sys_write ↻ sys_close sys_mmap hg_cat hr_slen hg_req hg_cat ↻ hr_serve3_slot sys_mmap ↻ hr_req_host hr_ieq hr_lower hr_lower ↻ hr_req_path hr_lookup_root hr_eq hr_copy hr_path_safe hr_emit_b hr_putdec sys_mmap ↻ hr_slen ↻ hr_canon hr_ends2 hr_resolve_read sys_mmap ↻ hr_join sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ↻ hr_req_query

structs

none

consts

none

functions

10func hg_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 2: hg_putnmain calls 1: sys_write
11func hg_putn(v: i64) -> i64 { var m: i64 = v; if m < 0 { hg_puts("-" as *u8); m = 0 - m } let t: *u8 = sys_mmap(24); var k: i64 = 0; if m == 0 { t[0] = 48 as u8; k = 1 } while m > 0 { t[k] = (48 + (m % 10)) as u8; m = m / 10; k = k + 1 } let o: *u8 = sys_mmap(24); var i: i64 = 0; while i < k { o[i] = t[k - 1 - i]; i = i + 1 } sys_write(1, o, k); return 0 }
called by 1: main calls 3: hg_putssys_mmapsys_write
12func hg_cat(dst: *u8, off: i64, s: *u8) -> i64 { var o: i64 = off; var i: i64 = 0; while s[i] != (0 as u8) { dst[o] = s[i]; o = o + 1; i = i + 1 } return o }
called by 2: hg_reqmain
14func hg_has(hay: *u8, n: i64, needle: *u8) -> i64
called by 1: main
29func hg_memeq(a: *u8, b: *u8, n: i64) -> i64
called by 2: hg_cl_coherentmain
35func hg_wfile(path: *u8, content: *u8) -> i64
46func hg_cl_coherent(resp: *u8, n: i64) -> i64
called by 1: main calls 1: hg_memeq
75func hg_req(dst: *u8, path: *u8) -> i64
called by 1: main calls 1: hg_cat
83func main() -> i64