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
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
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
structs
| none |
consts
| none |
functions
| 10 | func 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 } |
| 11 | func 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 } |
| 12 | func 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 } |
| 14 | func hg_has(hay: *u8, n: i64, needle: *u8) -> i64 called by 1: main |
| 29 | func hg_memeq(a: *u8, b: *u8, n: i64) -> i64 |
| 35 | func hg_wfile(path: *u8, content: *u8) -> i64 |
| 46 | func hg_cl_coherent(resp: *u8, n: i64) -> i64 |
| 75 | func hg_req(dst: *u8, path: *u8) -> i64 |
| 83 | func main() -> i64 |