code wiki / _hdl_build / nx_roku_install_gate.nx
nx_roku_install_gate.nx
buildroot/runtime/_hdl_build/nx_roku_install_gate.nx
dependencies 3 imports · 0 importers
imports: nx_gate_gn.nxnx_syscalls.nxnx_digest_auth.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 gp(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 gw(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 } |
| 16 | func gwn(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=(48 as u8);k=1}; while m>0{t[k]=((48+(m%10)) as u8);m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(fd,bb,k); return 0 } |
| 17 | func gstrlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 18 | func gcat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){ dst[off+i]=s[i]; i=i+1 } return off+i } |
| 19 | func gcatb(dst: *u8, off: i64, src: *u8, n: i64) -> i64 { var i: i64=0; while i<n { dst[off+i]=src[i]; i=i+1 } return off+n } called by 1: gsend_200 |
| 20 | func gcatn(dst: *u8, off: i64, v: i64) -> i64 { var m: i64=v; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1}; while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1}; var o: i64=off; var i: i64=0; while i<k{dst[o]=t[k-1-i];o=o+1;i=i+1} return o } |
| 21 | func gread_file(path: *u8, buf: *u8, cap: i64) -> i64 |
| 27 | func gwrite_file(path: *u8, data: *u8, len: i64) -> i64 { let fd: i64=sys_openat_wr(path, 0x1a4); if fd<0 { return 0-1 } sys_write(fd, data, len); sys_close(fd); return len } |
| 28 | func gfind(hay: *u8, n: i64, needle: *u8) -> i64 |
| 34 | func gcontains(hay: *u8, n: i64, needle: *u8) -> i64 { if gfind(hay,n,needle)>=0 { return 1 } return 0 } |
| 35 | func gextract_q(hay: *u8, n: i64, key: *u8, out: *u8, cap: i64) -> i64 |
| 41 | func gextract_tok(hay: *u8, n: i64, key: *u8, out: *u8, cap: i64) -> i64 |
| 51 | func gparse_clen(buf: *u8, n: i64) -> i64 |
| 59 | func has_pk(buf: *u8, n: i64) -> i64 called by 1: gvalidate |
| 64 | func gsockaddr(buf: *u8, port: i64, a: i64, b: i64, c: i64, d: i64) -> i64 called by 1: gbind_listen |
| 69 | func gbind_listen(port: i64) -> i64 |
| 79 | func grecv_request(cfd: i64, buf: *u8, cap: i64) -> i64 |
| 92 | func gsend_401(cfd: i64) -> i64 |
| 97 | func gsend_200(cfd: i64) -> i64 |
| 105 | func gvalidate(req: *u8, n: i64) -> i64 called by 1: gserve_round calls 9: sys_mmapgextract_qgextract_tokdigest_auth_ha1digest_auth_ha2digest_auth_response+3 |
| 124 | func gserve_round(lfd: i64) -> i64 |
| 140 | func g_run(elf: *u8, args: *i64, nargs: i64, out_path: *u8) -> i64 |
| 152 | func ginstall_round(port: i64, portstr: *u8, zippath: *u8, passfile: *u8, clilog: *u8) -> i64 |
| 169 | func dump_log(path: *u8) -> i64 { let b: *u8=sys_mmap(8192); let n: i64=gread_file(path, b, 8191); sys_write(1, b, n); return 0 } |
| 171 | func main() -> i64 |