nx_iot_classify.nx
buildroot/runtime/nx_iot_classify.nx
about
nx_iot_classify.nx -- universal device-type probe / vendor router.
Roadmap: NISHI_IOT_HUB_ROADMAP.md Epoch 1 (DISCOVER). The operator's
ask (2026-06-18): "device-driver-type probing to find out and use
their driver, or build it autonomously from the ground up." This is
the probe: given whatever signals discovery captured about an unknown
device, decide which vendor driver to route it to -- or report
UNKNOWN so the hub can fall back to active probing / autonomous
driver synthesis.
Four independent signal classifiers, fused by confidence priority:
1. reply content (strongest -- the device literally told us)
2. MAC OUI (hardware identity, survives firmware)
3. service port (which port answered)
4. SoftAP SSID (pairing-mode name -- works BEFORE the device
has joined the LAN, the "scan for unpaired" case)
HONEST coverage note: the OUI + SSID tables are SEEDS, not exhaustive
(there are thousands of IoT OUIs). UNKNOWN is a first-class result,
not a failure -- it is the signal that triggers active probing /
autonomous driver work. The tables grow data-driven over time.
S-class invariants: S6 (no cloud), S7 (sealed-enum verdict -- returns
the shared NX_IOT_VENDOR_* enum), S8-orchestrator (this is the
cross-vendor router by design; icl_override on kind_isolated like
nx_iot_announce).
Vendor enum is the shared one from nx_iot_anchor.nx (single source).
genealogy_id: NISHI_IOT_HUB_ROADMAP.md Epoch 1 + project-iot-hub-*
license_tier: ORIGINAL
nx_capability_claims:
needs: [pointer_arithmetic]
provides: [classify_by_ssid, classify_by_oui, classify_by_port,
classify_by_reply, classify_fuse]
safety: [no_unchecked_deref, no_floating_point, no_syscall,
bounded_iteration, kind_isolated_orchestrator]
verdict: [sealed_enum_vendor, no_silent_failure]
license: ORIGINAL
dependencies 1 imports · 4 importers
imports: nx_iot_anchor.nx
imported by: nx_iot_classify_test.nxnx_iot_ctl_lib.nxnx_iot_discover.nxnx_iot_provision_softap.nx
structs
| none |
consts
| none |
functions
| 52 | func nx_iot_cls_strlen(s: *u8) -> i64 |
| 63 | func nx_iot_cls_starts_with(s: *u8, n: i64, pre: *u8) -> i64 |
| 84 | func nx_iot_cls_find(buf: *u8, len: i64, pat: *u8) -> i64 |
| 112 | func nx_iot_classify_by_ssid(ssid: *u8, n: i64) -> i64 |
| 125 | func nx_iot_classify_by_oui(mac: *u8) -> i64 |
| 145 | func nx_iot_classify_by_port(port: i64) -> i64 |
| 158 | func nx_iot_classify_by_reply(plain: *u8, n: i64) -> i64 |
| 174 | func nx_iot_classify_fuse(v_reply: i64, v_oui: i64, |