nx_pex_gate.nx
buildroot/runtime/nx_pex_gate.nx
about
nx_pex_gate.nx -- SOVEREIGN LOOPBACK gate for BEP-11 ut_pex: proves PEX rides the REAL BEP-10
extension channel over a real TCP socket (not just the deterministic parser, which nx_pex's baked
KAT already covers). A mock peer does the BEP-3 handshake (ext bit) + BEP-10 ext handshake
(advertising ut_pex) + sends a real ut_pex ext message carrying a compact peer list; the client
dispatches on the ext-id WE advertised, learns the peer's ut_pex id, and pex_parse_added's the
gossiped peers. This is the live-channel proof that, once connected to ONE peer, we harvest MORE.
license_tier: ORIGINAL
module: nishi-core.torrent.pex_gate
depends: nishi-core.torrent.pex, nishi-core.torrent.peerwire
dependencies 4 imports · 0 importers
imports: nx_pex.nxnx_connect.nxnx_peerwire.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
structs
| none |
consts
| 16 | const PW_EXTENDED: i64 = 20 |
functions
| 18 | func gx_w(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 } called by 1: main |
| 19 | func gx_wn(fd: i64, v: i64) -> i64 called by 1: main |
| 24 | func gx_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: main |
| 25 | func gx_sockaddr(sa: *u8, port: i64, i0: i64, i1: i64, i2: i64, i3: i64) -> i64 called by 1: main |
| 32 | func gx_read_n(fd: i64, buf: *u8, n: i64) -> i64 |
| 37 | func gx_write_n(fd: i64, buf: *u8, n: i64) -> i64 called by 1: main |
| 42 | func gx_read_msg(fd: i64, mb: *u8, cap: i64) -> i64 |
| 52 | func px_build_ext(ext_id: i64, ben: *u8, benlen: i64, out: *u8) -> i64 |
| 59 | func main() -> i64 |