FrameAssembly (.frasm v3.3.0) — Syntax Highlighting & Live Linter
CLI & Releases (GitHub) • Crates.io (cargo install frameassembly) • Documentation • Use Cases
Official syntax highlighting and live error linting for FrameAssembly (.frasm v3.3.0) Packets as Code files across all 146 Layer 2 through Layer 7 network protocols.
Built for network engineers, firewall administrators, SOC/NDR analysts, pentesters, and OT/SCADA integrators writing .frasm traffic scenarios for Wireshark, tshark, tcpreplay, Suricata, Zeek, Checkmk, and Zabbix.
What This Extension Does
This extension adds zero toolbar buttons, side panels, or startup popups and focuses on three capabilities:
Syntax Highlighting (.frasm & Markdown Runbooks):
- Highlights
host, flow, repeat, and compile blocks, all 146 protocol keywords, protocol modifiers, IPv4/IPv6 addresses, IEEE/Cisco MAC formats (00:1a:2b:3c:4d:5e, 00-1A-2B-3C-4D-5E, 001a.2b3c.4d5e), SNMP OIDs, hex values, and post-packet wait durations (ns, us, ms, s, m) using the dedicated source.frameassembly (text/vnd.frameassembly) grammar so x86 Flat Assembler (; comments) and FPGA bitstream (# comments) extensions never collide with your packet files.
- Highlights fenced
```frameassembly and ```frasm code blocks inside Markdown documentation and incident runbooks (markdown.frameassembly.codeblock).
- Configures
// line-comment toggling (Ctrl+/ / Cmd+/), hyphen-aware identifier selection (fw-dmz-01), and {...}, (...), "..." auto-closing pairs without inserting unsupported 'single quotes' or [brackets].
- Displays the
.frasm Explorer and editor-tab language file icon (icons/frasm.svg) alongside the 256x256 rounded-square FrameAssembly brand icon (icon.png).
Live In-Editor Linting & 1-Click Typo Quick Fixes:
- Validates
.frasm code in memory as you type using the embedded WebAssembly validator. It flags unknown keywords, out-of-range ports or VLAN IDs, mixed IPv4/IPv6 endpoints, invalid transport modifiers, and missing host declarations with red squiggles in the Problems panel.
- Pasted an older snippet with uppercase or underscored keywords such as
ECHO_REQUEST, inner_vlan, or sport? Press Ctrl+. / Cmd+. (or click the lightbulb) for a 1-click Quick Fix to replace it with the valid lowercase keyword (echorequest, innervlan, srcport).
Restricted Mode & Browser Editor Ready:
- Runs read-only in memory: it never writes files, spawns shell processes, or opens network connections.
- Works immediately in VS Code Restricted Mode (untrusted folders of downloaded captures), VS Code for the Web (
vscode.dev / github.dev), Cursor, Windsurf, VSCodium, and Antigravity IDE.
Upgrading from .fasm files? FrameAssembly 3.x uses the .frasm file extension instead of .fasm. Rename existing files to .frasm.
Installing the frameassembly CLI (Compile & Reverse Captures)
To compile .frasm code into .pcap or .pcapng packet captures, inspect the packet ladder in your terminal, or reverse existing .pcap / .pcapng captures back into .frasm code, install the companion frameassembly CLI.
Recommended install via Cargo (Windows, macOS, and Linux):
cargo install frameassembly
Prebuilt standalone archives, Debian/Ubuntu .deb packages, and install.sh / install.ps1 installer scripts are also available on GitHub Releases.
Once installed, run frameassembly from your terminal:
# Compile demo.frasm into demo.pcap (classic libpcap), demo.pcapng, or stream PCAPNG to stdout
frameassembly demo.frasm
frameassembly demo.frasm demo.pcapng
frameassembly demo.frasm - | tshark -r -
# Print the packet ladder table for a .frasm file or capture without writing files
frameassembly show demo.frasm
# Reverse an existing .pcap or .pcapng capture into .frasm code
frameassembly reverse capture.pcap
# Self-update frameassembly with zero flags (Cargo/rustup-first, or SHA-256-verified GitHub Release binary fallback)
# All 5 subcommands: show, reverse, update, help, version
frameassembly update
frameassembly help
frameassembly version
Example .frasm Workflows
Note that wait <duration> sets the post-packet delay after that frame is sent (defaulting to 10ms when omitted), so the final frame in a sequence needs no trailing wait.
Simulating Encrypted SNMPv3 authPriv Traps & Syslog Alerts (Checkmk, Zabbix, PRTG)
Test whether Checkmk, Zabbix, PRTG, LibreNMS, or snmptrapd triggers an alert without pulling fiber on a live switch:
// SNMPv3 authPriv linkDown trap + RFC 5424 Syslog alert (5ms later)
host core_sw { ip 10.10.1.2 mac 001a.2b3c.4d01 }
host zabbix { ip 10.10.1.50 mac 00:1a:2b:3c:4d:50 }
flow link_down_alert(sw, nms) {
sw -> nms vlan 100 snmp3 trap user "netops" engineid "80001f8880510001" engineboots 5 enginetime 3600 auth sha256 "AuthPass123!" priv aes "PrivPass123!" oid 1.3.6.1.6.3.1.1.5.3 varbind 1.3.6.1.2.1.2.2.1.8.1 int 2 wait 5ms
sw -> nms vlan 100 syslog facility 16 severity 3 hostname "core-sw-01" app "link" msg "Gi0/1 changed state to down"
}
compile { link_down_alert(core_sw, zabbix) }
Testing Shadow IT, NDR Policies & Stateful IDS Rules (Suricata, Zeek, Snort)
Stateful firewalls and IDS sensors ignore mid-stream packets without a valid 3-way TCP handshake and advancing sequence numbers. FrameAssembly advances 4-tuple seq and acknum counters across tcp and Layer 7 frames:
// Stateful DNS lookup + Shadow IT TLS SNI policy test
host workstation { ip 10.40.5.25 mac 00:50:56:40:05:25 }
host sec_gateway { ip 10.40.5.1 mac 00:1c:73:40:05:01 }
flow shadow_it_policy_check(ws, gw) {
ws -> gw dns query txid 0x4401 qname "c2-beacon.bad-domain.test" qtype "a" wait 1ms
ws <- gw dns response txid 0x4401 qname "c2-beacon.bad-domain.test" qtype "a" rcode 5 wait 2ms
ws -> gw tcp syn srcport 53443 dstport 443 win 65535 mss 1460 wait 1ms
ws <- gw tcp syn ack win 65535 mss 1460 wait 1ms
ws -> gw tcp ack wait 1ms
ws -> gw tls clienthello sni "shadow-upload.example.net" ciphersuite 4866 alpn "h2" wait 2ms
ws <- gw tls alert payload "BLOCKED_BY_SNI_POLICY"
}
compile {
shadow_it_policy_check(workstation, sec_gateway)
}
Verifying 802.1Q VLAN, 802.1ad QinQ & Industrial OT / SCADA Rules (Modbus, DNP3)
Generate carrier QinQ double tags, DSCP markings, and SCADA register polls offline without touching production PLCs or fighting NIC VLAN tag stripping:
// VLAN-tagged Modbus/TCP register poll + DNP3 read request
host scada_hmi { ip 172.22.10.5 mac 00:1b:21:22:0a:05 }
host field_plc { ip 172.22.10.50 mac 00:0e:8c:22:0a:32 }
flow ot_conduit_audit(hmi, plc) {
hmi -> plc vlan 110 tcp syn srcport 54000 dstport 502 win 64240 mss 1460 wait 1ms
hmi <- plc vlan 110 tcp syn ack win 64240 mss 1460 wait 1ms
hmi -> plc vlan 110 tcp ack wait 2ms
hmi -> plc vlan 110 modbus readholdingregisters txid 1 unitid 1 addr 100 count 2 wait 2ms
hmi <- plc vlan 110 modbus readholdingregisters txid 1 unitid 1 count 2 value 42 isresponse wait 5ms
hmi -> plc vlan 110 dnp3 read src 1 dst 10 group 60 variation 1
}
compile { ot_conduit_audit(scada_hmi, field_plc) }
Testing 5G Mobile Core Signaling (NGAP, PFCP)
Build 5G N2 SCTP control-plane signaling and N4 PFCP session setup frames in a few lines:
// 5G N2 NGAP InitialUEMessage + N4 PFCP Session Establishment
host gnb { ip 10.60.1.10 mac 00:1a:2b:60:01:10 }
host amf { ip 10.60.1.20 mac 00:1a:2b:60:01:20 }
host smf { ip 10.60.2.10 mac 00:1a:2b:60:02:10 }
host upf { ip 10.60.2.20 mac 00:1a:2b:60:02:20 }
compile {
gnb -> amf ngap initialuemessage amfueid 101 ranueid 202 plmn "310410" tac 7 wait 2ms
smf -> upf pfcp sessionestablishmentrequest seid 1001 seqnum 1 nodeid "10.60.2.10"
}
Protocol Coverage (146 Native Protocols)
All built-in keywords, protocols, modifiers, and duration units (ns, us, ms, s, m) in FrameAssembly 3.3.0 use lowercase without _ or - (echorequest, innervlan, clienthello, readholdingregisters):
| OSI Layer |
Count |
Native Protocol Keywords |
| Layer 2 (Switching, Discovery & Industrial Link) |
18 |
arp, vlan (802.1Q), qinq (802.1ad), mpls, lldp, stp, lacp, eapol (802.1X), cdp, isis, macsec, pfc, pppoe, nsh, profinet, goose, sv, ethercat |
| Layer 3 (Control, Tunnel, VPN & Routing) |
31 |
icmp, ndp, igmp, mld, gre, vxlan, geneve, ipsec, esp, ah, ikev2, wireguard, ospf, bgp, rip, vrrp, hsrp, pim, bfd, openflow, ipip, srv6, erspan, rsvp, ldp, bmp, rpkirtr, l2tp, lisp, glbp, gtpu |
| Layer 4 (Transport) |
3 |
tcp, udp, sctp |
| Layer 7 (SNMP, Infra, Naming, AAA & Telemetry) |
21 |
snmp1, snmp2, snmp3, dns, mdns, llmnr, nbns, doh, dhcp, ntp, ptp, radius, tacacs, syslog, netflow, ipfix, sflow, twamp, netconf, ipmi, wsdiscovery |
| Layer 7 (Web, Cloud, Remote Access & VoIP/Media) |
27 |
http, http2, grpc, websocket, tls, quic, tftp, ftp, ssh, telnet, whois, ssdp, rdp, vnc, socks, dcerpc, ntlm, irc, stun, turn, sip, rtp, rtcp, rtsp, h323, sccp, mgcp |
| Layer 7 (Telecom & Mobile Core) |
5 |
diameter, gtpc, pfcp, ngap, s1ap |
| Layer 7 (Mail, Auth, Storage, Databases & Brokers) |
21 |
smtp, imap, pop3, kerberos, ldap, smb, nfs, iscsi, nvmetcp, rocev2, redis, memcached, mysql, postgres, mssql, mongodb, tns, kafka, mqtt, coap, amqp |
| Layer 7 (Industrial OT, Grid, Building & Automotive) |
20 |
modbus, bacnet, dnp3, s7comm, s7commplus, ethernetip, opcua, iec104, mms, synchrophasor, hartip, fins, melsec, someip, doip, c1222, gesrtp, rocplus, bsap, knxnetip |
License
MIT License. Copyright (c) 2026 Steve Winschel.
| |