nx_netscope_verdict.nx
buildroot/runtime/nx_netscope_verdict.nx
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
imports: nx_netscope_dns.nx
imported by: nx_netscope_diag.nxnx_netscope_heal.nxnx_netscope_verdict_test.nx
structs
| none |
consts
| 26 | const NXV_OK: i64 = 0 |
| 27 | const NXV_NOTE: i64 = 1 |
| 28 | const NXV_WARN: i64 = 2 |
| 29 | const NXV_ERROR: i64 = 3 |
| 32 | const NXV_CAT_OK: i64 = 0 |
| 33 | const NXV_CAT_SPLIT_DNS: i64 = 1 // resolvers disagree (the race) -> ERROR |
| 34 | const NXV_CAT_RESOLVE_FAIL: i64 = 2 // no resolver has a usable answer -> ERROR |
| 35 | const NXV_CAT_HAIRPIN: i64 = 3 // owned name resolves to a PUBLIC ip -> WARN |
| 36 | const NXV_CAT_TIMEOUT: i64 = 4 // works, but a resolver is slow/silent -> WARN |
functions
| 38 | func nxv_w(s: *u8, n: i64) -> i64 { sys_write(1, s, n); return 0 } |
| 40 | func nxv_dec(n: i64) -> i64 |
| 52 | func nxv_ip(p: i64) -> i64 |
| 61 | func nxv_cell(cells: *ProbeCell, n_hosts: i64, s: i64, h: i64) -> *ProbeCell |
| 70 | func nxv_count_ok(cells: *ProbeCell, ns: i64, nh: i64, col: i64) -> i64 |
| 80 | func nxv_count_timeout(cells: *ProbeCell, ns: i64, nh: i64, col: i64) -> i64 calls 1: nxv_cell |
| 92 | func nxv_host_category(cells: *ProbeCell, ns: i64, nh: i64, col: i64) -> i64 called by 2: nx_netscope_verdict_hostmain calls 3: nx_dns_host_would_poisonnxv_count_oknx_dns_host_hairpin_risk |
| 103 | func nxv_cat_severity(cat: i64) -> i64 |
| 112 | func nxv_sym(sev: i64) -> i64 |
| 118 | func nxv_cat_name(cat: i64) -> i64 |
| 127 | func nxv_answer(c: *ProbeCell) -> i64 |
| 141 | func nxv_cell_mark(c: *ProbeCell) -> i64 |
| 148 | func nxv_fix(cat: i64) -> i64 |
| 183 | func nx_netscope_verdict_host(cells: *ProbeCell, ns: i64, nh: i64, col: i64, called by 2: nx_netscope_verdict_allmain calls 10: nxv_host_categorynxv_cat_severitynxv_wnxv_symnxv_cat_namenxv_cell+4 |
| 218 | func nx_netscope_verdict_all(cells: *ProbeCell, ns: i64, nh: i64, |