nx_ice_gate.nx
buildroot/runtime/nx_ice_gate.nx
about
nx_ice_gate.nx -- KAT the sovereign ICE primitives against RFC 8445 (priority) + RFC 5769 (2.1 sample
request, byte-exact). GREEN => a Nishi endpoint builds ICE connectivity checks that interoperate with any
standard peer, from the first byte up, no third-party code.
T0 header parse: Binding Request, magic, length 0x58
T1 candidate priority: ic_priority(host=126, local=65535, comp=1) == 0x7EFFFFFF (RFC 8445 host example)
T2 candidate priority: ic_priority(prflx=110, local=1, comp=1) == 0x6E0001FF (the RFC 5769 2.1 value)
T3 build the full connectivity-check request -> 108 bytes BYTE-EXACT vs RFC 5769 2.1 (incl MI + FINGERPRINT)
T4 candidate-pair priority comparator orders pairs + honours the controlling>controlled tie-break
T5 USE-CANDIDATE is a zero-length flag attribute
license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_ice.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
| 14 | 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 } |
| 15 | func gn(v: i64) -> i64 |
| 20 | func gxh(v: i64) -> i64 { gw("0x" as *u8); let d: *u8="0123456789abcdef" as *u8; let b: *u8=sys_mmap(16); var i: i64=7; while i>=0 { b[7-i]=d[(v>>(i*4))&0xf]; i=i-1 } sys_write(1,b,8); return 0 } |
| 21 | func gck(pass: i64, name: *u8, fails: *i64) -> i64 |
| 25 | func hxv(c: i64) -> i64 called by 1: hexdec |
| 31 | func hexdec(hex: *u8, nbytes: i64, out: *u8) -> i64 { var i: i64=0; while i<nbytes { out[i]=((hxv(hex[i*2] as i64)<<4) | hxv(hex[i*2+1] as i64)) as u8; i=i+1 } return 0 } |
| 32 | 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 |
| 34 | func main() -> i64 |