nx_stun_gate.nx
buildroot/runtime/nx_stun_gate.nx
about
nx_stun_gate.nx -- KAT the sovereign STUN codec BYTE-EXACT against the IETF's own RFC 5769 test vectors.
If GREEN, our NishiLang STUN implementation interoperates with the real protocol from the first byte up:
T1 CRC-32 check value: crc32("123456789") == 0xCBF43926 (proves our CRC-32 vs the standard check)
T2 XOR-MAPPED-ADDRESS DECODE of the RFC 5769 2.2 sample response -> IPv4 192.0.2.1 : 32853
T3 XOR-MAPPED-ADDRESS ENCODE of 192.0.2.1:32853 -> the exact 8 attribute bytes in the sample
T4 FINGERPRINT: CRC-32(first 72 bytes) XOR 0x5354554E == the sample's 0xB5BE215B
T5 MESSAGE-INTEGRITY: HMAC-SHA1(password, first 48 bytes w/ len field 0x0034) == the sample's 20 bytes
T6 header build+parse round-trip for a Binding Request
license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_stun.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
| 13 | 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 } |
| 14 | func gn(v: i64) -> i64 |
| 19 | func gx(v: i64) -> i64 |
| 23 | func gck(pass: i64, name: *u8, fails: *i64) -> i64 |
| 27 | func hxv(c: i64) -> i64 called by 1: hexdec |
| 33 | func hexdec(hex: *u8, nbytes: i64, out: *u8) -> i64 |
| 38 | func beq(a: *u8, b: *u8, n: i64) -> i64 { var i: i64=0; while i<n { if a[i]!=b[i] { return 0 } i=i+1 } return 1 } called by 1: main |
| 40 | func main() -> i64 |