code wiki / (root) / nx_ipfilter_gate.nx

nx_ipfilter_gate.nx

buildroot/runtime/nx_ipfilter_gate.nx

3445 B43 linesdepth 22pulls 149 transitivereach 0 importersview sourcekind gate/prooftopic ipfilter
docsdependenciesstructsconstsfunctions

about

nx_ipfilter_gate.nx -- proves the ip-filter: (1) ipf_load reads the binary + ipf_blocked correctly matches in-range / passes out-of-range; (2) if_parse_cidr expands "a.b.c.d/n" and bare IPs to the right start-end. license_tier: ORIGINAL depends: nx_ipfilter_fetch (if_parse_cidr) + nx_ipfilter (ipf_* transitively)

dependencies 2 imports · 0 importers

nx_ipfilter_fetch.nx nx_gate_verdict.nx nx_ipfilter_gate.nx

imports: nx_ipfilter_fetch.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

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

main g_p ipf_put_u32le ipf_ip sys_openat_wr ipf_load sys_openat_rd sys_mmap sys_read sys_close ipf_u32le ipf_blocked g_n if_parse_cidr ipf_ip ↻ gv_ctr sys_mmap ↻ gv_verdict gv_puts sys_write gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_journal sys_openat_append sys_mmap ↻ gv_catn sys_mmap ↻ sys_munmap ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real gv_cat sys_write ↻ sys_close ↻ sys_munmap ↻

structs

none

consts

none

functions

7func g_p(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 1: main
8func g_n(v: i64) -> i64 { if v==0 { sys_write(1,"0" as *u8,1); return 0 } var m: i64=v; if m<0 { sys_write(1,"-" as *u8,1); m=0-m } let t: *u8=sys_mmap(28); var k: i64=0; while m>0 { t[k]=(48+(m%10)) as u8; m=m/10; k=k+1 } while k>0 { k=k-1; sys_write(1,(((t as i64)+k) as *u8),1) } return 0 }
called by 1: main
10func main() -> i64