code wiki / (root) / nx_netscope_dissect.nx

nx_netscope_dissect.nx

buildroot/runtime/nx_netscope_dissect.nx

6560 B172 linesdepth 2pulls 4 transitivereach 2 importersview sourcekind librarytopic netscope
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_dns.nx nx_sha256_wasm.nx nx_netscope_dissect.nx nx_netscope_capture.nx nx_netscope_dissect_test.nx

imports: nx_syscalls.nxnx_dns.nxnx_sha256_wasm.nx

imported by: nx_netscope_capture.nxnx_netscope_dissect_test.nx

structs

50struct Dissection

consts

25const NXD_ETHERTYPE_IPV4: i64 = 0x0800
26const NXD_ETHERTYPE_ARP: i64 = 0x0806
27const NXD_ETHERTYPE_IPV6: i64 = 0x86dd
28const NXD_PROTO_ICMP: i64 = 1
29const NXD_PROTO_TCP: i64 = 6
30const NXD_PROTO_UDP: i64 = 17
33const NXD_L_UNRESOLVED: i64 = 0
34const NXD_L_ETH: i64 = 1
35const NXD_L_IPV4: i64 = 2
36const NXD_L_TCP: i64 = 3
37const NXD_L_UDP: i64 = 4
38const NXD_L_ICMP: i64 = 5
39const NXD_L_ARP: i64 = 6
40const NXD_L_IPV6: i64 = 7
43const NXD_TCP_FIN: i64 = 0x01
44const NXD_TCP_SYN: i64 = 0x02
45const NXD_TCP_RST: i64 = 0x04
46const NXD_TCP_PSH: i64 = 0x08
47const NXD_TCP_ACK: i64 = 0x10
63const NXD_DISSECTION_BYTES: i64 = 88

functions

66func nxd_be32(b: *u8, o: i64) -> i64
called by 1: nx_packet_dissect
74func nx_packet_dissect(buf: *u8, len: i64, d: *Dissection) -> i64
called by 2: mainmain calls 2: nx_dns_get_u16_benxd_be32
149func nx_dissect_digest(d: *Dissection, sc: *u8, out32: *u8) -> i64
162func nxd_put_be64(b: *u8, o: i64, v: i64) -> i64
called by 1: nx_dissect_digest