code wiki / (root) / nx_ipfilter_seed_gate.nx

nx_ipfilter_seed_gate.nx

buildroot/runtime/nx_ipfilter_seed_gate.nx

2816 B36 linesdepth 8pulls 17 transitivereach 0 importersview sourcekind gate/prooftopic ipfilter
docsdependenciesstructsconstsfunctions

about

nx_ipfilter_seed_gate.nx -- EXECUTION-level proof the seeder actually rejects a blocked peer (not just that ipf_blocked() returns 1). Opens a real loopback TCP connection, accepts it, resolves the peer IP via the same getpeername path the seeder uses (ts_peer_ip), then asserts ts_ipf_reject = 1 when 127.0.0.1 is blocked and 0 when the blocklist is empty. license_tier: ORIGINAL depends: nx_torrent_seed (ts_peer_ip/ts_ipf_reject/ts_sockaddr)

dependencies 2 imports · 0 importers

nx_torrent_seed.nx nx_connect.nx nx_ipfilter_seed_gate.nx

imports: nx_torrent_seed.nxnx_connect.nx

imported by: nobody (leaf or entry point)

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

main gp sys_socket sys_setsockopt ts_sockaddr sys_bind sys_listen nx_connect_bounded nx_fcntl sys_connect sys_mmap sys_poll sys_accept ts_peer_ip sys_munmap ipf_ip gn ts_ipf_reject ts_peer_ip ↻ ipf_blocked

structs

none

consts

none

functions

8func gp(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
9func gn(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
11func main() -> i64