code wiki / (root) / nx_netscope_verdict.nx

nx_netscope_verdict.nx

buildroot/runtime/nx_netscope_verdict.nx

10321 B229 linesdepth 3pulls 4 transitivereach 6 importersview sourcekind librarytopic netscope
docsdependenciesstructsconstsfunctions

about

nx_netscope_verdict.nx -- NX-NETSCOPE "easy-for-anyone" verdict layer. The operator's #1 directive: move tooling from esoteric/engineer-only to understandable by ANYONE. Research finding (dog/doggo/q/trippy/mtr + Wireshark Expert-Info + clig.dev + APNIC + NO_COLOR): every modern tool stops at PRETTIER RAW DATA; none ships a pre-interpreted plain-language VERDICT with the FIX attached for the home/dual-homed failure classes. NX-NETSCOPE's L1 detectors already COMPUTE those verdicts -- this layer is the human-readable, fix-attached shell around them (the real exceed). Design (grounded): Wireshark severity ladder OK/NOTE/WARN/ERROR with the worst child propagated to a one-line headline; named problem CATEGORY; every protocol fact translated to plain language (raw token in parens); every non-OK finding ships a copy-pasteable FIX; symbol+WORD+color so color is never load-bearing (ASCII canonical: [OK]/[!!]/[XX]); exit code 0 all-clear / 2 problem-found (clig.dev, machine-gateable). Reuses nx_dns_host_would_poison / nx_dns_host_hairpin_risk and the ProbeCell fields from nx_netscope_dns.nx -- presentation only, no probing. license_tier: ORIGINAL

dependencies 1 imports · 3 importers

nx_netscope_dns.nx nx_netscope_verdict.nx nx_netscope_diag.nx nx_netscope_heal.nx nx_netscope_verdict_test.nx

imports: nx_netscope_dns.nx

imported by: nx_netscope_diag.nxnx_netscope_heal.nxnx_netscope_verdict_test.nx

structs

none

consts

26const NXV_OK: i64 = 0
27const NXV_NOTE: i64 = 1
28const NXV_WARN: i64 = 2
29const NXV_ERROR: i64 = 3
32const NXV_CAT_OK: i64 = 0
33const NXV_CAT_SPLIT_DNS: i64 = 1 // resolvers disagree (the race) -> ERROR
34const NXV_CAT_RESOLVE_FAIL: i64 = 2 // no resolver has a usable answer -> ERROR
35const NXV_CAT_HAIRPIN: i64 = 3 // owned name resolves to a PUBLIC ip -> WARN
36const NXV_CAT_TIMEOUT: i64 = 4 // works, but a resolver is slow/silent -> WARN

functions

38func nxv_w(s: *u8, n: i64) -> i64 { sys_write(1, s, n); return 0 }
40func nxv_dec(n: i64) -> i64
called by 2: heal_rendernxv_ip
52func nxv_ip(p: i64) -> i64
61func nxv_cell(cells: *ProbeCell, n_hosts: i64, s: i64, h: i64) -> *ProbeCell
70func nxv_count_ok(cells: *ProbeCell, ns: i64, nh: i64, col: i64) -> i64
called by 1: nxv_host_category calls 1: nxv_cell
80func nxv_count_timeout(cells: *ProbeCell, ns: i64, nh: i64, col: i64) -> i64
calls 1: nxv_cell
92func nxv_host_category(cells: *ProbeCell, ns: i64, nh: i64, col: i64) -> i64
103func nxv_cat_severity(cat: i64) -> i64
112func nxv_sym(sev: i64) -> i64
called by 1: nx_netscope_verdict_host calls 1: nxv_w
118func nxv_cat_name(cat: i64) -> i64
called by 1: nx_netscope_verdict_host calls 1: nxv_w
127func nxv_answer(c: *ProbeCell) -> i64
141func nxv_cell_mark(c: *ProbeCell) -> i64
called by 1: nx_netscope_verdict_host calls 1: nxv_w
148func nxv_fix(cat: i64) -> i64
called by 1: nx_netscope_verdict_host calls 1: nxv_w
183func nx_netscope_verdict_host(cells: *ProbeCell, ns: i64, nh: i64, col: i64,
218func nx_netscope_verdict_all(cells: *ProbeCell, ns: i64, nh: i64,
called by 2: mainmain calls 1: nx_netscope_verdict_host