nx_stun_server_gate.nx
buildroot/runtime/nx_stun_server_gate.nx
about
nx_stun_server_gate.nx -- proves the sovereign STUN reflexive responder two ways:
PART A (pure): ss_handle reflects a request's source sockaddr into a valid Binding Response whose
XOR-MAPPED-ADDRESS decodes back to that source IP:port, with the txid preserved and a self-consistent
FINGERPRINT; a non-STUN packet is ignored (returns 0).
PART B (LIVE, real UDP sockets): a fork loopback -- child = the server, parent = a client bound to a
KNOWN port -- proves end-to-end that a client sending a real Binding Request LEARNS ITS OWN REFLEXIVE
ADDRESS (127.0.0.1:<client port>) back from the server. This is srflx discovery working, sovereignly.
license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_stun_server.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
| 23 | const SGT_SPORT: i64 = 53218 // server loopback port for the live proof |
| 24 | const SGT_CPORT: i64 = 53219 // client loopback port (its known source port) |
functions
| 12 | func gw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 13 | func gn(v: i64) -> i64 |
| 18 | func gck(pass: i64, name: *u8, fails: *i64) -> i64 |
| 26 | func main() -> i64 |