nx_netscope_dissect.nx
buildroot/runtime/nx_netscope_dissect.nx
about
nx_netscope_dissect.nx -- NX-NETSCOPE L4: layered PURE typed dissectors
(Wireshark/Zeek-EXCEED) + the canonical hashable dissection digest.
Charter principles honored: pure bytes->typed-tree functions (no state,
no syscalls in the dissectors themselves), DETERMINISTIC (same bytes +
same ruleset -> byte-identical digest -- the headline determinism
EXCEED no incumbent gates), LOUD-fail on unresolved cases (a clear
UNRESOLVED verdict in the tree, never a silent mis-parse).
REUSES nx_dns_get_u16_be (big-endian u16) from nx_dns.nx and
nx_sha256_one_shot from nx_sha256_wasm.nx (now compilable on the native
lane after the `~` parser fix) for the canonical digest.
Stack: Ethernet II -> IPv4 -> {TCP, UDP, ICMP}. IPv6/ARP tagged but
not deep-parsed yet (LOUD UNRESOLVED, not silent).
license_tier: ORIGINAL
genealogy_id: nishi_nx_netscope_l4_dissect
dependencies 3 imports · 2 importers
imports: nx_syscalls.nxnx_dns.nxnx_sha256_wasm.nx
imported by: nx_netscope_capture.nxnx_netscope_dissect_test.nx
structs
| 50 | struct Dissection |
consts
| 25 | const NXD_ETHERTYPE_IPV4: i64 = 0x0800 |
| 26 | const NXD_ETHERTYPE_ARP: i64 = 0x0806 |
| 27 | const NXD_ETHERTYPE_IPV6: i64 = 0x86dd |
| 28 | const NXD_PROTO_ICMP: i64 = 1 |
| 29 | const NXD_PROTO_TCP: i64 = 6 |
| 30 | const NXD_PROTO_UDP: i64 = 17 |
| 33 | const NXD_L_UNRESOLVED: i64 = 0 |
| 34 | const NXD_L_ETH: i64 = 1 |
| 35 | const NXD_L_IPV4: i64 = 2 |
| 36 | const NXD_L_TCP: i64 = 3 |
| 37 | const NXD_L_UDP: i64 = 4 |
| 38 | const NXD_L_ICMP: i64 = 5 |
| 39 | const NXD_L_ARP: i64 = 6 |
| 40 | const NXD_L_IPV6: i64 = 7 |
| 43 | const NXD_TCP_FIN: i64 = 0x01 |
| 44 | const NXD_TCP_SYN: i64 = 0x02 |
| 45 | const NXD_TCP_RST: i64 = 0x04 |
| 46 | const NXD_TCP_PSH: i64 = 0x08 |
| 47 | const NXD_TCP_ACK: i64 = 0x10 |
| 63 | const NXD_DISSECTION_BYTES: i64 = 88 |
functions
| 66 | func nxd_be32(b: *u8, o: i64) -> i64 called by 1: nx_packet_dissect |
| 74 | func nx_packet_dissect(buf: *u8, len: i64, d: *Dissection) -> i64 |
| 149 | func nx_dissect_digest(d: *Dissection, sc: *u8, out32: *u8) -> i64 |
| 162 | func nxd_put_be64(b: *u8, o: i64, v: i64) -> i64 called by 1: nx_dissect_digest |